Sid Gifari File Manager
🏠 Root
/
home
/
genremedia08
/
musicjukebox.overlookedtracks.com
/
public
/
build
/
assets
/
Editing: play-arrow-filled-8e87b0ae.js
import{a as W,j as d,aU as Gt,r as f,c as I,a3 as Ce,cz as Kt,a7 as _t,bc as Xt,cA as Se,cB as Zt,bM as Ke,bX as J,bt as Wt,b as _e,L as Yt,B as Xe,p as ge,A as qt,o as Qt,k as we,aL as Ze,bD as Jt,$ as Ee,h as er,cl as tr,R as Ie,cC as rr,ak as nr,d as sr,cD as Z,cE as P,cF as Te,cG as Pe,cH as ye,bW as je,bC as ar,co as We,l as ir,n as or,a$ as Fe,cI as lr,m as U,aX as $e,bv as Ye,aw as Re,ao as De,Z as pe,bu as ae,T as ce,b2 as cr,I as ne,b4 as ur,b3 as dr,X as qe,aB as fr,ap as hr,ax as gr,V as pr,W as me,Y as br,a8 as mr,q as Ve,M as xr,E as vr}from"./main-1406e08c.js";const Bn=W(d.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"KeyboardArrowLeftOutlined"),zn=W(d.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRightOutlined");function Un(t){return Gt("(max-width: 1024px)",t)}const wr=f.forwardRef(({className:t,circle:e,size:r="md",src:n,link:s,label:a,fallback:i="generic",...o},l)=>{let c=n?d.jsx("img",{ref:l,src:n,alt:a,className:"block object-cover w-full h-full"}):d.jsx("div",{className:"bg-alt dark:bg-chip w-full h-full",children:d.jsx(Kt,{viewBox:"0 0 48 48",className:"w-full h-full text-muted"})});a&&(c=d.jsx(_t,{label:a,children:c}));const u={...o,className:I(t,"relative block overflow-hidden select-none flex-shrink-0",yr(r),e?"rounded-full":"rounded")};return s?d.jsx(Ce,{...u,to:s,children:c}):d.jsx("div",{...u,children:c})});function yr(t){switch(t){case"xs":return"w-18 h-18";case"sm":return"w-24 h-24";case"md":return"w-32 h-32";case"lg":return"w-40 h-40";case"xl":return"w-60 h-60";default:return t}}function fe(t){return Xt()?t.metaKey:t.ctrlKey}function $r(t){const{cellCount:e,rowCount:r}=t;return{onKeyDown:s=>{switch(s.key){case"ArrowLeft":V(s,{cell:{op:"decrement"}},t);break;case"ArrowRight":V(s,{cell:{op:"increment"}},t);break;case"ArrowUp":V(s,{row:{op:"decrement"}},t);break;case"ArrowDown":V(s,{row:{op:"increment"}},t);break;case"PageUp":V(s,{row:{op:"decrement",count:5}},t);break;case"PageDown":V(s,{row:{op:"increment",count:5}},t);break;case"Tab":Ar(s);break;case"Home":fe(s)?V(s,{row:{op:"decrement",count:r},cell:{op:"decrement",count:e}},t):V(s,{cell:{op:"decrement",count:e}},t);break;case"End":fe(s)?V(s,{row:{op:"increment",count:r},cell:{op:"increment",count:e}},t):V(s,{cell:{op:"increment",count:e}},t);break}}}}function V(t,e,{cellCount:r,rowCount:n}){var w,v,x,h,m,$,E;if(((w=document.activeElement)==null?void 0:w.tagName)==="input")return;t.preventDefault();const s=t.currentTarget,a=t.target.closest("[aria-colindex]");if(!a||!s)return;const i=a.closest("[aria-rowindex]");if(!i)return;let o=parseInt(i.getAttribute("aria-rowindex")),l=parseInt(a.getAttribute("aria-colindex"));if(Number.isNaN(o)||Number.isNaN(l))return;const c=((v=e.row)==null?void 0:v.count)??1;((x=e.row)==null?void 0:x.op)==="increment"?o=Math.min(n,o+c):((h=e.row)==null?void 0:h.op)==="decrement"&&(o=Math.max(1,o-c));const u=((m=e.cell)==null?void 0:m.count)??1;(($=e.cell)==null?void 0:$.op)==="increment"?l=Math.min(r,l+u):((E=e.cell)==null?void 0:E.op)==="decrement"&&(l=Math.max(1,l-u));const A=s.querySelector(`[aria-rowindex="${o}"] [aria-colindex="${l}"]`);if(!A)return;const b=Se(A).nextNode()||A;a.setAttribute("tabindex","-1"),b.setAttribute("tabindex","0"),b.focus()}function Ar(t){const e=t.currentTarget;if(t.shiftKey)e.focus();else{const r=Se(e,{tabbable:!0});let n,s;do s=r.lastChild(),s&&(n=s);while(s);n&&!n.contains(document.activeElement)&&Zt(n)}}const H=f.createContext(null);function Qe({index:t,isHeader:e}){const{columns:r,cellHeight:n="h-46"}=f.useContext(H),s=r[t],a=s==null?void 0:s.padding;let i="justify-start";return(s==null?void 0:s.align)==="center"?i="justify-center":(s==null?void 0:s.align)==="end"&&(i="justify-end"),I("flex items-center overflow-hidden whitespace-nowrap overflow-ellipsis outline-none focus-visible:outline focus-visible:outline-offset-2",e?"h-46":n,(s==null?void 0:s.width)??"flex-1",s==null?void 0:s.maxWidth,s==null?void 0:s.minWidth,i,a,s==null?void 0:s.className)}function kr({rowIndex:t,rowIsHovered:e,index:r,item:n,id:s}){const{columns:a}=f.useContext(H),i=a[r],o=f.useMemo(()=>({index:t,isHovered:e,isPlaceholder:n.isPlaceholder}),[t,e,n.isPlaceholder]),l=Qe({index:r,isHeader:!1});return d.jsx("div",{tabIndex:-1,role:"gridcell","aria-colindex":r+1,id:s,className:l,children:d.jsx("div",{className:"overflow-x-hidden overflow-ellipsis min-w-0 w-full",children:i.body(n,o)})})}function Cr({onMoveStart:t,onMove:e,onMoveEnd:r,minimumMovement:n=0,preventDefault:s,stopPropagation:a=!0,onPress:i,onLongPress:o,...l}){const u=f.useRef({lastPosition:{x:0,y:0},started:!1,longPressTriggered:!1}).current,{addGlobalListener:A,removeGlobalListener:g}=Ke(),b=h=>{!u.el||(t==null?void 0:t(h,u.el))===!1||(u.originalTouchAction=u.el.style.touchAction,u.el.style.touchAction="none",u.originalUserSelect=document.documentElement.style.userSelect,document.documentElement.style.userSelect="none",u.started=!0)},w=h=>{var m;if(h.button===0&&u.id==null){if(u.started=!1,((m=l.onPointerDown)==null?void 0:m.call(l,h))===!1)return;a&&h.stopPropagation(),s&&h.preventDefault(),u.id=h.pointerId,u.el=h.currentTarget,u.lastPosition={x:h.clientX,y:h.clientY},o&&(u.longPressTimer=setTimeout(()=>{o(h,u.el),u.longPressTriggered=!0},400)),(t||e)&&A(window,"pointermove",v,!1),A(window,"pointerup",x,!1),A(window,"pointercancel",x,!1)}},v=h=>{if(h.pointerId===u.id){const m=h.clientX-u.lastPosition.x,$=h.clientY-u.lastPosition.y;(Math.abs(m)>=n||Math.abs($)>=n)&&!u.started&&b(h),u.started&&(e==null||e(h,m,$),u.lastPosition={x:h.clientX,y:h.clientY})}},x=h=>{var m;if(h.pointerId===u.id){u.longPressTimer&&clearTimeout(u.longPressTimer);const $=u.longPressTriggered;u.longPressTriggered=!1,u.started&&(r==null||r(h)),u.el&&(h.type!=="pointercancel"&&((m=l.onPointerUp)==null||m.call(l,h,u.el),h.target&&u.el.contains(h.target)&&($?o==null||o(h,u.el):i==null||i(h,u.el))),document.documentElement.style.userSelect=u.originalUserSelect||"",u.el.style.touchAction=u.originalTouchAction||""),u.id=void 0,u.started=!1,g(window,"pointermove",v,!1),g(window,"pointerup",x,!1),g(window,"pointercancel",x,!1)}};return{domProps:{onPointerDown:J(w)}}}function Sr(t){return t.shiftKey||fe(t)}function Er({index:t,isSelected:e,isHeader:r}){const n=Wt(),s=_e(),{hideBorder:a,enableSelection:i,collapseOnMobile:o}=f.useContext(H);return I("flex gap-x-16 break-inside-avoid outline-none border border-transparent",s&&o&&a?"mb-8 pl-8 pr-0 rounded":"px-16",!a&&"border-b-divider",!a&&t===0&&"border-t-divider",e&&!n&&"bg-primary/selected hover:bg-primary/focus focus-visible:bg-primary/focus",e&&n&&"bg-selected hover:bg-focus focus-visible:bg-focus",!e&&!r&&i&&"focus-visible:bg-focus hover:bg-hover")}const Ir=["button","a","input","select","textarea"];function Tr({item:t,index:e,renderAs:r,className:n,style:s}){const{selectedRows:a,columns:i,toggleRow:o,selectRow:l,onAction:c,selectRowOnContextMenu:u,enableSelection:A,selectionStyle:g,hideHeaderRow:b}=f.useContext(H),w=f.useRef(!1),v=a.includes(t.id),[x,h]=f.useState(!1),m=y=>y.target.closest(Ir.join(",")),$=y=>{g==="highlight"&&c&&!w.current&&!m(y)&&(y.preventDefault(),y.stopPropagation(),c(t,e))},E=!!a.length,C=y=>{m(y)||(g==="checkbox"?A&&(E||!c)?o(t):c&&c(t,e):g==="highlight"&&(w.current?A&&E?o(t):c==null||c(t,e):A&&l(t,Sr(y))))},{domProps:T}=Cr({onPointerDown:y=>{w.current=y.pointerType==="touch"},onPress:C,onLongPress:A?()=>{w.current&&o(t)}:void 0}),R=y=>{A&&y.key===" "?(y.preventDefault(),y.stopPropagation(),g==="checkbox"?o(t):l(t)):y.key==="Enter"&&!a.length&&c&&(y.preventDefault(),y.stopPropagation(),c(t,e))},N=y=>{u&&A&&(a.includes(t.id)||l(t)),w.current&&(y.preventDefault(),y.stopPropagation())},D=Er({index:e,isSelected:v}),z=r||"div";return d.jsx(z,{role:"row","aria-rowindex":e+1+(b?0:1),"aria-selected":v,tabIndex:-1,className:I(n,D),item:z==="div"?void 0:t,onDoubleClick:J($),onKeyDown:J(R),onContextMenu:J(N),onPointerEnter:J(()=>h(!0)),onPointerLeave:J(()=>h(!1)),style:s,...T,children:i.map((y,F)=>d.jsx(kr,{rowIndex:e,rowIsHovered:x,index:F,item:t},`${t.id}-${y.key}`))})}const Pr={key:"checkbox",header:()=>d.jsx(Dr,{}),align:"center",width:"w-24 flex-shrink-0",body:(t,e)=>e.isPlaceholder?d.jsx(Yt,{size:"w-24 h-24",variant:"rect"}):d.jsx(Rr,{item:t})};function Rr({item:t}){const{selectedRows:e,toggleRow:r}=f.useContext(H);return d.jsx(Xe,{checked:e.includes(t.id),onChange:()=>r(t)})}function Dr(){const{trans:t}=ge(),{data:e,selectedRows:r,onSelectionChange:n}=f.useContext(H),s=!!e.length&&e.length===r.length,a=!s&&!!r.length;return d.jsx(Xe,{"aria-label":t({message:"Select all"}),isIndeterminate:a,checked:s,onChange:()=>{n(s?[]:e.map(i=>i.id))}})}const Nr=W(d.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownwardOutlined");function Lr({index:t}){const{columns:e,sortDescriptor:r,onSortChange:n,enableSorting:s}=f.useContext(H),a=e[t],i=Qe({index:t,isHeader:!0}),[o,l]=f.useState(!1),c=a.sortingKey||a.key,u=a.allowsSorting&&s,{orderBy:A,orderDir:g}=r||{},b=u&&A===c;let w;b&&g==="asc"?w="ascending":b&&g==="desc"?w="descending":u&&(w="none");const v=()=>{if(!u)return;let m;b&&g==="desc"?m={orderDir:"asc",orderBy:c}:b&&g==="asc"?m={orderBy:void 0,orderDir:void 0}:m={orderDir:"desc",orderBy:c},n==null||n(m)},x=b||o,h={visible:{opacity:1,y:0},hidden:{opacity:0,y:"-25%"}};return d.jsxs("div",{role:"columnheader",tabIndex:-1,"aria-colindex":t+1,"aria-sort":w,className:I(i,"text-muted font-medium text-xs",u&&"cursor-pointer"),onMouseEnter:()=>{l(!0)},onMouseLeave:()=>{l(!1)},onKeyDown:m=>{(m.key===" "||m.key==="Enter")&&(m.preventDefault(),v())},onClick:v,children:[a.hideHeader?d.jsx("div",{className:"sr-only",children:a.header()}):a.header(),d.jsx(qt,{children:u&&d.jsx(Qt.span,{variants:h,animate:x?"visible":"hidden",initial:!1,transition:{type:"tween"},className:"inline-block ml-6 -mt-2","data-testid":"table-sort-button","aria-hidden":!x,children:d.jsx(Nr,{size:"xs",className:I("text-muted",g==="asc"&&A===c&&"rotate-180 transition-transform")})},"sort-icon")})]})}function Mr(){const{columns:t}=f.useContext(H);return d.jsx("div",{role:"row","aria-rowindex":1,tabIndex:-1,className:"flex gap-x-16 px-16",children:t.map((e,r)=>d.jsx(Lr,{index:r},e.key))})}function Gn({className:t,columns:e,collapseOnMobile:r=!0,hideHeaderRow:n=!1,hideBorder:s=!1,data:a,selectedRows:i,defaultSelectedRows:o,onSelectionChange:l,sortDescriptor:c,onSortChange:u,enableSorting:A=!0,onDelete:g,enableSelection:b=!0,selectionStyle:w="checkbox",ariaLabelledBy:v,selectRowOnContextMenu:x,onAction:h,renderRowAs:m,tableBody:$,meta:E,tableRef:C,closeOnInteractOutside:T=!1,cellHeight:R,...N}){const D=_e(),z=!!D&&r;z&&(n=!0,s=!0);const[y,F]=we(i,o||[],l),[Ft,Vt]=we(c,void 0,u),Ht=f.useCallback(S=>{const L=[...y];if(!L.includes(S.id))L.push(S.id);else{const q=L.indexOf(S.id);L.splice(q,1)}F(L)},[y,F]),Bt=f.useCallback((S,L)=>{let q=[];S&&(q=L?[...y==null?void 0:y.filter(te=>te!==S.id),S.id]:[S.id]),F(q)},[y,F]),le=f.useMemo(()=>{const S=e.filter(q=>{const te=q.visibleInMode||"regular";if(te==="all"||te==="compact"&&z||te==="regular"&&!z)return!0});return b&&w!=="highlight"&&!D&&S.unshift(Pr),S},[D,e,b,w,z]),zt={isCollapsedMode:z,cellHeight:R,hideBorder:s,hideHeaderRow:n,selectedRows:y,onSelectionChange:F,enableSorting:A,enableSelection:b,selectionStyle:w,data:a,columns:le,sortDescriptor:Ft,onSortChange:Vt,toggleRow:Ht,selectRow:Bt,onAction:h,selectRowOnContextMenu:x,meta:E,collapseOnMobile:r},Ut=$r({cellCount:b?le.length+1:le.length,rowCount:a.length+1}),Me={renderRowAs:m};$?$=f.cloneElement($,Me):$=d.jsx(Or,{...Me});const Oe=Ze(C);return Jt({ref:Oe,onInteractOutside:S=>{T&&b&&(y!=null&&y.length)&&!S.target.closest('[role="dialog"]')&&F([])}}),d.jsx(H.Provider,{value:zt,children:d.jsxs("div",{...Ee(N,Ut,{onKeyDown:S=>{S.key==="Escape"?(S.preventDefault(),S.stopPropagation(),y!=null&&y.length&&F([])):S.key==="Delete"?(S.preventDefault(),S.stopPropagation(),y!=null&&y.length&&(g==null||g(a.filter(L=>y==null?void 0:y.includes(L.id))))):fe(S)&&S.key==="a"&&(S.preventDefault(),S.stopPropagation(),b&&F(a.map(L=>L.id)))}}),role:"grid",tabIndex:0,"aria-rowcount":a.length+1,"aria-colcount":le.length+1,ref:Oe,"aria-multiselectable":b?!0:void 0,"aria-labelledby":v,className:I(t,"select-none isolate outline-none text-sm focus-visible:ring-2"),children:[!n&&d.jsx(Mr,{}),$]})})}function Or({renderRowAs:t}){const{data:e}=f.useContext(H);return d.jsx(f.Fragment,{children:e.map((r,n)=>d.jsx(Tr,{item:r,index:n,renderAs:t},r.id))})}function Kn({className:t,children:e,size:r,color:n,radius:s,selectable:a}){return d.jsx("div",{className:I(t,"flex items-center gap-8 flex-wrap"),children:f.Children.map(e,i=>{if(f.isValidElement(i))return f.cloneElement(i,{size:r,color:n,selectable:a,radius:s})})})}const _n=f.memo(({value:t,...e})=>{const r=er(e);return isNaN(t)&&(t=0),d.jsx(f.Fragment,{children:r.format(t)})},tr),jr=W(d.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"AddOutlined"),Fr=Ie.forwardRef((t,e)=>{const{children:r,size:n="sm",description:s,className:a,invalid:i,autoFocus:o,errorMessage:l,...c}=t,u=Ze(e);rr({autoFocus:o},u);const A=Vr(n),g=nr(t),b=f.useId();return d.jsxs("div",{className:I(a,"isolate"),children:[d.jsxs("label",{className:"flex items-center select-none",children:[d.jsx("input",{...c,type:"checkbox",role:"switch","aria-invalid":i||void 0,"aria-describedby":s?b:void 0,ref:u,"aria-checked":c.checked,className:I(A,!i&&"checked:bg-primary dark:checked:bg-primary-dark checked:border-primary dark:checked:border-primary-dark",i&&"checked:bg-danger checked:border-danger","outline-none cursor-pointer bg-chip border-chip border checked:bg-primary checked:border-primary p-0 overflow-hidden relative rounded-3xl appearance-none transition-colors flex-shrink-0 flex items-center outline-none","before:z-10 before:border before:rounded-3xl before:block before:bg-white before:transition-transform before:translate-x-2","checked:before:border-white","focus-visible:ring",t.disabled&&"opacity-80 cursor-not-allowed")}),r&&d.jsx("span",{className:I(g.size.font,"ml-12",i&&"text-danger",t.disabled&&"text-disabled"),children:r})]}),s&&!l&&d.jsx("div",{id:b,className:g.description,children:s}),l&&d.jsx("div",{id:b,className:g.error,children:l})]})});function Xn(t){const{field:{onChange:e,onBlur:r,value:n=!1,ref:s},fieldState:{invalid:a,error:i}}=sr({name:t.name}),o={onChange:l=>{l.target.value&&l.target.value!=="on"?e(l.target.checked?l.target.value:!1):e(l)},onBlur:r,checked:!!n,invalid:a,errorMessage:i==null?void 0:i.message,name:t.name};return d.jsx(Fr,{ref:s,...Ee(t,o)})}function Vr(t){switch(t){case"xl":return"w-68 h-36 before:w-28 before:h-28 checked:before:translate-x-36";case"lg":return"w-56 h-30 before:w-22 before:h-22 checked:before:translate-x-30";case"md":return"w-46 h-24 before:w-18 before:h-18 checked:before:translate-x-24";case"xs":return"w-30 h-16 before:w-12 before:h-12 checked:before:translate-x-16";default:return"w-38 h-20 before:w-14 before:h-14 checked:before:translate-x-20"}}class Hr{getStringForLocale(e,r){let n=this.strings[r];n||(n=Br(r,this.strings,this.defaultLocale),this.strings[r]=n);let s=n[e];if(!s)throw new Error(`Could not find intl message ${e} in ${r} locale`);return s}constructor(e,r="en-US"){this.strings={...e},this.defaultLocale=r}}function Br(t,e,r="en-US"){if(e[t])return e[t];let n=zr(t);if(e[n])return e[n];for(let s in e)if(s.startsWith(n+"-"))return e[s];return e[r]}function zr(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}function Ur(t){return t&&t.__esModule?t.default:t}var Je={},et={};et={alpha:"ألفا",blue:"أزرق",brightness:"السطوع",green:"أخضر",hue:"درجة اللون",lightness:"الإضاءة",red:"أحمر",saturation:"التشبع"};var tt={};tt={alpha:"Алфа",blue:"Синьо",brightness:"Яркост",green:"Зелено",hue:"Оттенък",lightness:"Лекота",red:"Червено",saturation:"Наситеност"};var rt={};rt={alpha:"Alfa",blue:"Modrá",brightness:"Jas",green:"Zelená",hue:"Odstín",lightness:"Světlost",red:"Červená",saturation:"Sytost"};var nt={};nt={alpha:"Alfa",blue:"Blå",brightness:"Lysstyrke",green:"Grøn",hue:"Tone",lightness:"Lyshed",red:"Rød",saturation:"Farvemætning"};var st={};st={alpha:"Alpha",blue:"Blau",brightness:"Helligkeit",green:"Grün",hue:"Farbton",lightness:"Leuchtkraft",red:"Rot",saturation:"Sättigung"};var at={};at={alpha:"Άλφα",blue:"Μπλε",brightness:"Φωτεινότητα",green:"Πράσινο",hue:"Τόνος",lightness:"Φωτεινότητα",red:"Κόκκινο",saturation:"Κορεσμός"};var it={};it={hue:"Hue",saturation:"Saturation",lightness:"Lightness",brightness:"Brightness",red:"Red",green:"Green",blue:"Blue",alpha:"Alpha"};var ot={};ot={alpha:"Alpha",blue:"Azul",brightness:"Brillo",green:"Verde",hue:"Tono",lightness:"Luminosidad",red:"Rojo",saturation:"Saturación"};var lt={};lt={alpha:"Alfa",blue:"Sinine",brightness:"Heledus",green:"Roheline",hue:"Värv",lightness:"Valgus",red:"Punane",saturation:"Küllastus"};var ct={};ct={alpha:"Alpha",blue:"Sininen",brightness:"Kirkkaus",green:"Vihreä",hue:"Sävy",lightness:"Valomäärä",red:"Punainen",saturation:"Värikylläisyys"};var ut={};ut={alpha:"Alpha",blue:"Bleu",brightness:"Luminosité",green:"Vert",hue:"Teinte",lightness:"Luminosité",red:"Rouge",saturation:"Saturation"};var dt={};dt={alpha:"אלפא",blue:"כחול",brightness:"בהירות",green:"ירוק",hue:"גוון",lightness:"כמות אור",red:"אדום",saturation:"רוויה"};var ft={};ft={alpha:"Alfa",blue:"Plava",brightness:"Svjetlina",green:"Zelena",hue:"Nijansa",lightness:"Osvijetljenost",red:"Crvena",saturation:"Zasićenost"};var ht={};ht={alpha:"Alfa",blue:"Kék",brightness:"Fényesség",green:"Zöld",hue:"Színárnyalat",lightness:"Világosság",red:"Piros",saturation:"Telítettség"};var gt={};gt={alpha:"Alfa",blue:"Blu",brightness:"Luminosità",green:"Verde",hue:"Tonalità",lightness:"Luminosità",red:"Rosso",saturation:"Saturazione"};var pt={};pt={alpha:"アルファ",blue:"青",brightness:"明るさ",green:"緑",hue:"色相",lightness:"明度",red:"赤",saturation:"彩度"};var bt={};bt={alpha:"알파",blue:"파랑",brightness:"명도",green:"초록",hue:"색조",lightness:"밝기",red:"빨강",saturation:"채도"};var mt={};mt={alpha:"Alfa",blue:"Mėlyna",brightness:"Ryškumas",green:"Žalia",hue:"Atspalvis",lightness:"Šviesumas",red:"Raudona",saturation:"Įsotinimas"};var xt={};xt={alpha:"Alfa",blue:"Zila",brightness:"Spilgtums",green:"Zaļa",hue:"Nokrāsa",lightness:"Gaišums",red:"Sarkana",saturation:"Piesātinājums"};var vt={};vt={alpha:"Alfa",blue:"Blå",brightness:"Lysstyrke",green:"Grønn",hue:"Fargetone",lightness:"Lyshet",red:"Rød",saturation:"Metning"};var wt={};wt={alpha:"Alfa",blue:"Blauw",brightness:"Helderheid",green:"Groen",hue:"Kleurtoon",lightness:"Lichtsterkte",red:"Rood",saturation:"Verzadiging"};var yt={};yt={alpha:"Alfa",blue:"Niebieski",brightness:"Jasność",green:"Zielony",hue:"Odcień",lightness:"Jaskrawość",red:"Czerwony",saturation:"Nasycenie"};var $t={};$t={alpha:"Alfa",blue:"Azul",brightness:"Brilho",green:"Verde",hue:"Matiz",lightness:"Luminosidade",red:"Vermelho",saturation:"Saturação"};var At={};At={alpha:"Alfa",blue:"Azul",brightness:"Luminosidade",green:"Verde",hue:"Tonalidade",lightness:"Claridade",red:"Vermelho",saturation:"Saturação"};var kt={};kt={alpha:"Alfa",blue:"Albastru",brightness:"Luminozitate",green:"Verde",hue:"Nuanță",lightness:"Luminozitate",red:"Roșu",saturation:"Saturație"};var Ct={};Ct={alpha:"Альфа",blue:"Синий",brightness:"Яркость",green:"Зеленый",hue:"Оттенок",lightness:"Освещенность",red:"Красный",saturation:"Насыщенность"};var St={};St={alpha:"Alfa",blue:"Modrá",brightness:"Jas",green:"Zelená",hue:"Odtieň",lightness:"Svetlosť",red:"Červená",saturation:"Sýtosť"};var Et={};Et={alpha:"Alfa",blue:"Modra",brightness:"Svetlost",green:"Zelena",hue:"Barva",lightness:"Lahkost",red:"Rdeča",saturation:"Nasičenost"};var It={};It={alpha:"Alfa",blue:"Plava",brightness:"Osvetljenost",green:"Zelena",hue:"Nijansa",lightness:"Osvetljenje",red:"Crvena",saturation:"Zasićenje"};var Tt={};Tt={alpha:"Alfa",blue:"Blått",brightness:"Ljusstyrka",green:"Grönt",hue:"Nyans",lightness:"Ljushet",red:"Rött",saturation:"Mättnad"};var Pt={};Pt={alpha:"Alfa",blue:"Mavi",brightness:"Parlaklık",green:"Yeşil",hue:"Ton",lightness:"Canlılık",red:"Kırmızı",saturation:"Doygunluk"};var Rt={};Rt={alpha:"Альфа",blue:"Синій",brightness:"Яскравість",green:"Зелений",hue:"Тон",lightness:"Освітленість",red:"Червоний",saturation:"Насиченість"};var Dt={};Dt={alpha:"Alpha",blue:"蓝色",brightness:"亮度",green:"绿色",hue:"色相",lightness:"明亮度",red:"红色",saturation:"饱和度"};var Nt={};Nt={alpha:"Alpha",blue:"藍色",brightness:"亮度",green:"綠色",hue:"色相",lightness:"明亮",red:"紅色",saturation:"飽和度"};Je={"ar-AE":et,"bg-BG":tt,"cs-CZ":rt,"da-DK":nt,"de-DE":st,"el-GR":at,"en-US":it,"es-ES":ot,"et-EE":lt,"fi-FI":ct,"fr-FR":ut,"he-IL":dt,"hr-HR":ft,"hu-HU":ht,"it-IT":gt,"ja-JP":pt,"ko-KR":bt,"lt-LT":mt,"lv-LV":xt,"nb-NO":vt,"nl-NL":wt,"pl-PL":yt,"pt-BR":$t,"pt-PT":At,"ro-RO":kt,"ru-RU":Ct,"sk-SK":St,"sl-SI":Et,"sr-SP":It,"sv-SE":Tt,"tr-TR":Pt,"uk-UA":Rt,"zh-CN":Dt,"zh-TW":Nt};const Gr=new Hr(Ur(Je));function ie(t){let e=G.parse(t)||K.parse(t)||_.parse(t);if(e)return e;throw new Error("Invalid color value: "+t)}class Ne{toHexInt(){return this.toFormat("rgb").toHexInt()}getChannelValue(e){if(e in this)return this[e];throw new Error("Unsupported color channel: "+e)}withChannelValue(e,r){if(e in this){let n=this.clone();return n[e]=r,n}throw new Error("Unsupported color channel: "+e)}getChannelName(e,r){return Gr.getStringForLocale(e,r)}getColorSpaceAxes(e){let{xChannel:r,yChannel:n}=e,s=r||this.getColorChannels().find(o=>o!==n),a=n||this.getColorChannels().find(o=>o!==s),i=this.getColorChannels().find(o=>o!==s&&o!==a);return{xChannel:s,yChannel:a,zChannel:i}}}class G extends Ne{static parse(e){let r=[];if(/^#[\da-f]+$/i.test(e)&&[4,5,7,9].includes(e.length)){const a=(e.length<6?e.replace(/[^#]/gi,"$&$&"):e).slice(1).split("");for(;a.length>0;)r.push(parseInt(a.splice(0,2).join(""),16));r[3]=r[3]!==void 0?r[3]/255:void 0}const n=e.match(/^rgba?\((.*)\)$/);n!=null&&n[1]&&(r=n[1].split(",").map(a=>Number(a.trim())),r=r.map((a,i)=>Z(a,0,i<3?255:1)));var s;return r.length<3?void 0:new G(r[0],r[1],r[2],(s=r[3])!==null&&s!==void 0?s:1)}toString(e){switch(e){case"hex":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")).toUpperCase();case"hexa":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")+Math.round(this.alpha*255).toString(16).padStart(2,"0")).toUpperCase();case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"css":case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;default:return this.toFormat(e).toString(e)}}toFormat(e){switch(e){case"hex":case"hexa":case"rgb":case"rgba":return this;case"hsb":case"hsba":return this.toHSB();case"hsl":case"hsla":return this.toHSL();default:throw new Error("Unsupported color conversion: rgb -> "+e)}}toHexInt(){return this.red<<16|this.green<<8|this.blue}toHSB(){const e=this.red/255,r=this.green/255,n=this.blue/255,s=Math.min(e,r,n),a=Math.max(e,r,n),i=a-s,o=a===0?0:i/a;let l=0;if(i!==0){switch(a){case e:l=(r-n)/i+(r<n?6:0);break;case r:l=(n-e)/i+2;break;case n:l=(e-r)/i+4;break}l/=6}return new K(P(l*360,2),P(o*100,2),P(a*100,2),this.alpha)}toHSL(){const e=this.red/255,r=this.green/255,n=this.blue/255,s=Math.min(e,r,n),a=Math.max(e,r,n),i=(a+s)/2,o=a-s;let l,c;if(o===0)l=c=0;else{switch(c=o/(i<.5?a+s:2-a-s),a){case e:l=(r-n)/o+(r<n?6:0);break;case r:l=(n-e)/o+2;break;case n:l=(e-r)/o+4;break}l/=6}return new _(P(l*360,2),P(c*100,2),P(i*100,2),this.alpha)}clone(){return new G(this.red,this.green,this.blue,this.alpha)}getChannelRange(e){switch(e){case"red":case"green":case"blue":return{minValue:0,maxValue:255,step:1,pageSize:17};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+e)}}formatChannelValue(e,r){let n,s=this.getChannelValue(e);switch(e){case"red":case"green":case"blue":n={style:"decimal"};break;case"alpha":n={style:"percent"};break;default:throw new Error("Unknown color channel: "+e)}return new Te(r,n).format(s)}getColorSpace(){return"rgb"}getColorChannels(){return G.colorChannels}constructor(e,r,n,s){super(),this.red=e,this.green=r,this.blue=n,this.alpha=s}}Pe(G,"colorChannels",["red","green","blue"]);const Kr=/hsb\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsba\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/;class K extends Ne{static parse(e){let r;if(r=e.match(Kr)){var n;const[s,a,i,o]=((n=r[1])!==null&&n!==void 0?n:r[2]).split(",").map(l=>Number(l.trim().replace("%","")));return new K(Lt(s,360),Z(a,0,100),Z(i,0,100),Z(o??1,0,1))}}toString(e){switch(e){case"css":return this.toHSL().toString("css");case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsb":return`hsb(${this.hue}, ${P(this.saturation,2)}%, ${P(this.brightness,2)}%)`;case"hsba":return`hsba(${this.hue}, ${P(this.saturation,2)}%, ${P(this.brightness,2)}%, ${this.alpha})`;default:return this.toFormat(e).toString(e)}}toFormat(e){switch(e){case"hsb":case"hsba":return this;case"hsl":case"hsla":return this.toHSL();case"rgb":case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsb -> "+e)}}toHSL(){let e=this.saturation/100,r=this.brightness/100,n=r*(1-e/2);return e=n===0||n===1?0:(r-n)/Math.min(n,1-n),new _(P(this.hue,2),P(e*100,2),P(n*100,2),this.alpha)}toRGB(){let e=this.hue,r=this.saturation/100,n=this.brightness/100,s=(a,i=(a+e/60)%6)=>n-r*n*Math.max(Math.min(i,4-i,1),0);return new G(Math.round(s(5)*255),Math.round(s(3)*255),Math.round(s(1)*255),this.alpha)}clone(){return new K(this.hue,this.saturation,this.brightness,this.alpha)}getChannelRange(e){switch(e){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"brightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+e)}}formatChannelValue(e,r){let n,s=this.getChannelValue(e);switch(e){case"hue":n={style:"unit",unit:"degree",unitDisplay:"narrow"};break;case"saturation":case"brightness":n={style:"percent"},s/=100;break;case"alpha":n={style:"percent"};break;default:throw new Error("Unknown color channel: "+e)}return new Te(r,n).format(s)}getColorSpace(){return"hsb"}getColorChannels(){return K.colorChannels}constructor(e,r,n,s){super(),this.hue=e,this.saturation=r,this.brightness=n,this.alpha=s}}Pe(K,"colorChannels",["hue","saturation","brightness"]);const _r=/hsl\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsla\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/;function Lt(t,e){return(t%e+e)%e}class _ extends Ne{static parse(e){let r;if(r=e.match(_r)){var n;const[s,a,i,o]=((n=r[1])!==null&&n!==void 0?n:r[2]).split(",").map(l=>Number(l.trim().replace("%","")));return new _(Lt(s,360),Z(a,0,100),Z(i,0,100),Z(o??1,0,1))}}toString(e){switch(e){case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsl":return`hsl(${this.hue}, ${P(this.saturation,2)}%, ${P(this.lightness,2)}%)`;case"css":case"hsla":return`hsla(${this.hue}, ${P(this.saturation,2)}%, ${P(this.lightness,2)}%, ${this.alpha})`;default:return this.toFormat(e).toString(e)}}toFormat(e){switch(e){case"hsl":case"hsla":return this;case"hsb":case"hsba":return this.toHSB();case"rgb":case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsl -> "+e)}}toHSB(){let e=this.saturation/100,r=this.lightness/100,n=r+e*Math.min(r,1-r);return e=n===0?0:2*(1-r/n),new K(P(this.hue,2),P(e*100,2),P(n*100,2),this.alpha)}toRGB(){let e=this.hue,r=this.saturation/100,n=this.lightness/100,s=r*Math.min(n,1-n),a=(i,o=(i+e/30)%12)=>n-s*Math.max(Math.min(o-3,9-o,1),-1);return new G(Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255),this.alpha)}clone(){return new _(this.hue,this.saturation,this.lightness,this.alpha)}getChannelRange(e){switch(e){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"lightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+e)}}formatChannelValue(e,r){let n,s=this.getChannelValue(e);switch(e){case"hue":n={style:"unit",unit:"degree",unitDisplay:"narrow"};break;case"saturation":case"lightness":n={style:"percent"},s/=100;break;case"alpha":n={style:"percent"};break;default:throw new Error("Unknown color channel: "+e)}return new Te(r,n).format(s)}getColorSpace(){return"hsl"}getColorChannels(){return _.colorChannels}constructor(e,r,n,s){super(),this.hue=e,this.saturation=r,this.lightness=n,this.alpha=s}}Pe(_,"colorChannels",["hue","saturation","lightness"]);ie("#ffffff");ie("hsl(0, 100%, 50%)");const Xr=ie("#000000"),Zr=ie("#FFFFFF");Xr.toHexInt();Zr.toHexInt();const B=new Map,M=new Map,Wr=new Map,O={status:"inactive"};function xe({e:t,rect:e,deltaX:r,deltaY:n}){return{rect:e,x:t.clientX,y:t.clientY,deltaX:r??0,deltaY:n??0,nativeEvent:t}}let Mt=null;function He(t){Mt=t}function Yr(t){return{left:t.left,top:t.top,width:t.width,height:t.height}}function Ot(t){const e=new IntersectionObserver(r=>{r.forEach(n=>{const{width:s,height:a,left:i,top:o}=n.boundingClientRect,[l,c]=[...t].find(([,A])=>A.ref.current===n.target)||[];if(l==null||c==null)return;const u={width:s,height:a,left:i,top:o};t.set(l,{...c,rect:u})}),e.disconnect()});[...t.values()].forEach(r=>{r.ref.current&&e.observe(r.ref.current)})}function qr({id:t,disabled:e,ref:r,preview:n,hidePreview:s,...a}){const i=f.useRef(null),{addGlobalListener:o,removeAllGlobalListeners:l}=Ke(),c=f.useRef({lastPosition:{x:0,y:0}}).current,u=f.useRef(a);u.current=a,f.useLayoutEffect(()=>(e?B.delete(t):B.set(t,{...B.get(t),id:t,ref:r,type:u.current.type,getData:u.current.getData}),()=>{B.delete(t)}),[t,e,u,r]);const A=x=>{Wr.forEach(h=>{var m;h.type===((m=B.get(t))==null?void 0:m.type)&&x(h)})},g=x=>{var C,T;const h=B.get(t),m=r.current,$=!i.current||!c.clickedEl||i.current.contains(c.clickedEl);if(Mt||!m||!h||!$){x.preventDefault(),x.stopPropagation();return}Ot(M),He("drag"),s&&Qr(x),x.dataTransfer.effectAllowed="move",c.lastPosition={x:x.clientX,y:x.clientY},c.currentRect=Yr(m.getBoundingClientRect());const E=xe({rect:c.currentRect,e:x});n!=null&&n.current&&n.current(h,R=>{x.dataTransfer.setDragImage(R,0,0)}),O.status="dragging",O.dragTargetId=t,r.current&&(r.current.dataset.dragging="true"),(T=(C=u.current).onDragStart)==null||T.call(C,E,h),requestAnimationFrame(()=>{A(R=>{var N;return(N=R.onDragStart)==null?void 0:N.call(R,E,h)})}),o(window,"dragover",b,!0)},b=x=>{var T,R;if(x.preventDefault(),!c.currentRect)return;const h=x.clientX-c.lastPosition.x,m=x.clientY-c.lastPosition.y,$={...c.currentRect,left:c.currentRect.left+h,top:c.currentRect.top+m},E=xe({rect:$,e:x,deltaX:h,deltaY:m}),C=B.get(t);C&&((R=(T=u.current).onDragMove)==null||R.call(T,E,C),A(N=>{var D;return(D=N.onDragMove)==null?void 0:D.call(N,E,C)})),c.lastPosition={x:x.clientX,y:x.clientY},c.currentRect=$};return{draggableProps:{draggable:!e,onDragStart:g,onDragEnd:x=>{var $,E;if(l(),!c.currentRect)return;He(null),X&&X.remove();const h=xe({rect:c.currentRect,e:x}),m=B.get(t);m&&((E=($=u.current).onDragEnd)==null||E.call($,h,m),A(C=>{var T;return(T=C.onDragEnd)==null?void 0:T.call(C,h,m,O.status)})),requestAnimationFrame(()=>{O.dragTargetId=void 0,O.status="inactive",r.current&&delete r.current.dataset.dragging})},onPointerDown:x=>{c.clickedEl=x.target}},dragHandleRef:i}}let X;function Qr(t){X||(X=new Image,document.body.append(X),X.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),t.dataTransfer.setDragImage(X,0,0)}async function*Jr(t){for(const e of t.items)if(e.kind==="file")if(typeof e.webkitGetAsEntry=="function"){const r=e.webkitGetAsEntry();if(!r)continue;if(r.isFile){if(r.name===".DS_Store")continue;yield new ye(e.getAsFile(),r.fullPath)}else r.isDirectory&&(yield*jt(r))}else{const r=e.getAsFile();if(!r||r.name===".DS_Store")continue;yield new ye(r,e.fullPath)}}async function*jt(t){const e=t.createReader();let r;do{r=await new Promise((n,s)=>{e.readEntries(n,s)});for(const n of r)if(n.isFile){if(n.name===".DS_Store")continue;const s=await en(n);yield new ye(s,n.fullPath)}else n.isDirectory&&(yield*jt(n))}while(r.length>0)}function en(t){return new Promise((e,r)=>t.file(e,r))}async function tn(t){const e=[];for await(const r of t)e.push(r);return e}const rn=400;function nn({id:t,disabled:e,ref:r,...n}){const s=f.useRef({dragOverElements:new Set,dropActivateTimer:void 0}).current,a=f.useRef(n);a.current=n,f.useLayoutEffect(()=>(M.set(t,{...M.get(t),disabled:e,id:t,ref:r}),()=>{M.delete(t)}),[t,a,e,r]);const i=g=>{var v;const b=a.current,w=b.allowDragEventsFromItself||r.current!==((v=g.ref)==null?void 0:v.current);return!!(g!=null&&g.type&&w&&b.types.includes(g.type)&&(!b.acceptsDrop||b.acceptsDrop(g)))},o=g=>{var w,v;const b=re(g);b&&((v=(w=a.current).onDragLeave)==null||v.call(w,b))};return{droppableProps:e?{}:{onDragOver:g=>{var w,v;g.preventDefault(),g.stopPropagation();const b=re(g);b&&i(b)&&((v=(w=a.current).onDragOver)==null||v.call(w,b,g))},onDragEnter:g=>{var w,v;if(g.stopPropagation(),s.dragOverElements.add(g.target),s.dragOverElements.size>1)return;const b=re(g);b&&i(b)&&((v=(w=a.current).onDragEnter)==null||v.call(w,b),clearTimeout(s.dropActivateTimer),typeof a.current.onDropActivate=="function"&&(s.dropActivateTimer=setTimeout(()=>{var x,h;b&&((h=(x=a.current).onDropActivate)==null||h.call(x,b))},rn)))},onDragLeave:g=>{g.stopPropagation(),s.dragOverElements.delete(g.target);for(const w of s.dragOverElements)g.currentTarget.contains(w)||s.dragOverElements.delete(w);if(s.dragOverElements.size>0)return;const b=re(g);b&&i(b)&&(o(g),clearTimeout(s.dropActivateTimer))},onDrop:async g=>{var w,v,x,h;g.preventDefault(),g.stopPropagation(),s.dragOverElements.clear(),o(g),clearTimeout(s.dropActivateTimer);const b=re(g);if(b)if((v=(w=a.current).onDragLeave)==null||v.call(w,b),!i(b))O.status!=="inactive"&&(O.status="dropFail");else{const m=(h=(x=a.current).onDrop)==null?void 0:h.call(x,b);O.status!=="inactive"&&(O.status=m===!1?"dropFail":"dropSuccess")}}}}}function re(t){if(O.dragTargetId!=null)return B.get(O.dragTargetId);if(t.dataTransfer.types.includes("Files"))return{type:"nativeFile",el:null,ref:null,getData:()=>tn(Jr(t.dataTransfer))}}function sn(t,e,r){const n=je(e,0,t.length-1),s=je(r,0,t.length-1);if(n===s)return t;const a=t[n],i=s<n?-1:1;for(let o=n;o!==s;o+=i)t[o]=t[o+i];return t[s]=a,t}function an(t,e,r){const n=t.slice();return n.splice(r<0?n.length+r:r,0,n.splice(e,1)[0]),n}let p=null;function Zn({item:t,items:e,type:r,ref:n,onSortEnd:s,onSortStart:a,onDragEnd:i,preview:o,disabled:l,onDropPositionChange:c,previewVariant:u="liveSort"}){const A=f.useRef(null);f.useEffect(()=>{p&&p.sortables.length!==e.length&&(p.sortables=[...e],p.activeIndex=e.indexOf(t))},[e,t]);const{draggableProps:g,dragHandleRef:b}=qr({id:t,ref:n,type:r,preview:o,disabled:l,onDragStart:()=>{var v;A.current=null,p={sortables:[...e],activeSortable:t,activeIndex:e.indexOf(t),finalIndex:e.indexOf(t),dropPosition:null,scrollParent:n.current?ar(n.current):void 0,scrollListener:()=>{Ot(M)}},u==="liveSort"&&ln(),a==null||a(),(v=p.scrollParent)==null||v.addEventListener("scroll",p.scrollListener)},onDragEnd:()=>{var v;p&&(u==="liveSort"&&cn(),p.dropPosition=null,c==null||c(p.dropPosition),p.activeIndex!==p.finalIndex&&(s==null||s(p.activeIndex,p.finalIndex)),(v=p.scrollParent)==null||v.removeEventListener("scroll",p.scrollListener),Be(),i==null||i(),p=null)},getData:()=>{}}),{droppableProps:w}=nn({id:t,ref:n,types:[r],disabled:l,allowDragEventsFromItself:!0,onDragOver:(v,x)=>{var E;if(!p||u!=="line")return;const h=p.dropPosition;let m=null;const $=(E=M.get(t))==null?void 0:E.rect;if($){const C=$.top+$.height/2;x.clientY<=C?m="before":x.clientY>=C&&(m="after")}if(m!==h){const C=p.sortables.indexOf(t);if(p.dropPosition=m,c==null||c(p.dropPosition),Be(),n.current)if(p.dropPosition==="after")ve(n.current,"bottom");else if(C===0)ve(n.current,"top");else{const N=p.sortables[C-1],D=M.get(N);D!=null&&D.ref.current&&ve(D.ref.current,"bottom")}const T=e.indexOf(t);if(p.activeIndex===T){p.finalIndex=p.activeIndex;return}(C>p.activeIndex?"after":"before")==="after"?p.finalIndex=p.dropPosition==="before"?T-1:T:p.finalIndex=p.dropPosition==="after"?T+1:T}},onDragEnter:()=>{if(!p||u==="line")return;const v=p.sortables.indexOf(t),x=p.sortables.indexOf(p.activeSortable);sn(p.sortables,x,v);const h=p.sortables.map(m=>{var $;return($=M.get(m))==null?void 0:$.rect});p.sortables.forEach((m,$)=>{if(!p)return;const E=an(h,v,p.activeIndex),C=h[$],T=E[$],R=M.get(m);if(R!=null&&R.ref.current&&T&&C){const N=T.left-C.left,D=T.top-C.top;R.ref.current.style.transform=`translate3d(${N}px, ${D}px, 0)`}}),p.finalIndex=v},onDragLeave:()=>{!p||u!=="line"||(p.dropPosition=null,c==null||c(p.dropPosition))}});return{sortableProps:{...Ee(g,w)},dragHandleRef:b}}const on="transform 0.2s cubic-bezier(0.2, 0, 0, 1)";function ln(){p&&p.sortables.forEach((t,e)=>{const r=M.get(t);r!=null&&r.ref.current&&(r.ref.current.style.transition=on,(p==null?void 0:p.activeIndex)===e&&(r.ref.current.style.opacity="0.4"))})}function cn(){p&&p.sortables.forEach(t=>{const e=M.get(t);e!=null&&e.ref.current&&(e.ref.current.style.transform="",e.ref.current.style.transition="",e.ref.current.style.opacity="",e.ref.current.style.zIndex="")})}function Be(){p!=null&&p.linePreviewEl&&(p.linePreviewEl.style.borderBottomColor="",p.linePreviewEl.style.borderTopColor="",p.linePreviewEl=void 0)}function ve(t,e){const r="rgb(var(--be-primary))";e==="top"?t.style.borderTopColor=r:t.style.borderBottomColor=r,p&&(p.linePreviewEl=t)}function Y(t,e){var r,n;if(typeof e=="function")n=e(t),n!==void 0&&(t=n);else if(Array.isArray(e))for(r=0;r<e.length;r++)n=e[r](t),n!==void 0&&(t=n);return t}function un(t,e){return t[0]==="-"&&Array.isArray(e)&&/^-\d+$/.test(t)?e.length+parseInt(t,10):t}function dn(t){return/^\d+$/.test(t)}function ue(t){return Object.prototype.toString.call(t)==="[object Object]"}function se(t){return Object(t)===t}function de(t){return Object.keys(t).length===0}var fn=["__proto__","prototype","constructor"],hn=function(t){return fn.indexOf(t)===-1};function be(t,e){t.indexOf("[")>=0&&(t=t.replace(/\[/g,e).replace(/]/g,""));var r=t.split(e),n=r.filter(hn);if(n.length!==r.length)throw Error("Refusing to update blacklisted property "+t);return r}var ze=Object.prototype.hasOwnProperty;function k(t,e,r,n){if(!(this instanceof k))return new k(t,e,r,n);typeof e>"u"&&(e=!1),typeof r>"u"&&(r=!0),typeof n>"u"&&(n=!0),this.separator=t||".",this.override=e,this.useArray=r,this.useBrackets=n,this.keepArray=!1,this.cleanup=[]}var ee=new k(".",!1,!0,!0);function j(t){return function(){return ee[t].apply(ee,arguments)}}k.prototype._fill=function(t,e,r,n){var s=t.shift();if(t.length>0){if(e[s]=e[s]||(this.useArray&&dn(t[0])?[]:{}),!se(e[s]))if(this.override)e[s]={};else{if(!(se(r)&&de(r)))throw new Error("Trying to redefine `"+s+"` which is a "+typeof e[s]);return}this._fill(t,e[s],r,n)}else{if(!this.override&&se(e[s])&&!de(e[s])){if(!(se(r)&&de(r)))throw new Error("Trying to redefine non-empty obj['"+s+"']");return}e[s]=Y(r,n)}};k.prototype.object=function(t,e){var r=this;return Object.keys(t).forEach(function(n){var s=e===void 0?null:e[n],a=be(n,r.separator).join(r.separator);a.indexOf(r.separator)!==-1?(r._fill(a.split(r.separator),t,t[n],s),delete t[n]):t[n]=Y(t[n],s)}),t};k.prototype.str=function(t,e,r,n){var s=be(t,this.separator).join(this.separator);return t.indexOf(this.separator)!==-1?this._fill(s.split(this.separator),r,e,n):r[t]=Y(e,n),r};k.prototype.pick=function(t,e,r,n){var s,a,i,o,l;for(a=be(t,this.separator),s=0;s<a.length;s++)if(o=un(a[s],e),e&&typeof e=="object"&&o in e){if(s===a.length-1)return r?(i=e[o],n&&Array.isArray(e)?e.splice(o,1):delete e[o],Array.isArray(e)&&(l=a.slice(0,-1).join("."),this.cleanup.indexOf(l)===-1&&this.cleanup.push(l)),i):e[o];e=e[o]}else return;return r&&Array.isArray(e)&&(e=e.filter(function(c){return c!==void 0})),e};k.prototype.delete=function(t,e){return this.remove(t,e,!0)};k.prototype.remove=function(t,e,r){var n;if(this.cleanup=[],Array.isArray(t)){for(n=0;n<t.length;n++)this.pick(t[n],e,!0,r);return r||this._cleanup(e),e}else return this.pick(t,e,!0,r)};k.prototype._cleanup=function(t){var e,r,n,s;if(this.cleanup.length){for(r=0;r<this.cleanup.length;r++)n=this.cleanup[r].split("."),s=n.splice(0,-1).join("."),e=s?this.pick(s,t):t,e=e[n[0]].filter(function(a){return a!==void 0}),this.set(this.cleanup[r],e,t);this.cleanup=[]}};k.prototype.del=k.prototype.remove;k.prototype.move=function(t,e,r,n,s){return typeof n=="function"||Array.isArray(n)?this.set(e,Y(this.pick(t,r,!0),n),r,s):(s=n,this.set(e,this.pick(t,r,!0),r,s)),r};k.prototype.transfer=function(t,e,r,n,s,a){return typeof s=="function"||Array.isArray(s)?this.set(e,Y(this.pick(t,r,!0),s),n,a):(a=s,this.set(e,this.pick(t,r,!0),n,a)),n};k.prototype.copy=function(t,e,r,n,s,a){return typeof s=="function"||Array.isArray(s)?this.set(e,Y(JSON.parse(JSON.stringify(this.pick(t,r,!1))),s),n,a):(a=s,this.set(e,this.pick(t,r,!1),n,a)),n};k.prototype.set=function(t,e,r,n){var s,a,i,o;if(typeof e>"u")return r;for(i=be(t,this.separator),s=0;s<i.length;s++){if(o=i[s],s===i.length-1)if(n&&ue(e)&&ue(r[o]))for(a in e)ze.call(e,a)&&(r[o][a]=e[a]);else if(n&&Array.isArray(r[o])&&Array.isArray(e))for(var l=0;l<e.length;l++)r[i[s]].push(e[l]);else r[o]=e;else(!ze.call(r,o)||!ue(r[o])&&!Array.isArray(r[o]))&&(/^\d+$/.test(i[s+1])?r[o]=[]:r[o]={});r=r[o]}return r};k.prototype.transform=function(t,e,r){return e=e||{},r=r||{},Object.keys(t).forEach(function(n){this.set(t[n],this.pick(n,e),r)}.bind(this)),r};k.prototype.dot=function(t,e,r){e=e||{},r=r||[];var n=Array.isArray(t);return Object.keys(t).forEach(function(s){var a=n&&this.useBrackets?"["+s+"]":s;if(se(t[s])&&(ue(t[s])&&!de(t[s])||Array.isArray(t[s])&&!this.keepArray&&t[s].length!==0))if(n&&this.useBrackets){var i=r[r.length-1]||"";return this.dot(t[s],e,r.slice(0,-1).concat(i+a))}else return this.dot(t[s],e,r.concat(a));else n&&this.useBrackets?e[r.join(this.separator).concat("["+s+"]")]=t[s]:e[r.concat(a).join(this.separator)]=t[s]}.bind(this)),e};k.pick=j("pick");k.move=j("move");k.transfer=j("transfer");k.transform=j("transform");k.copy=j("copy");k.object=j("object");k.str=j("str");k.set=j("set");k.delete=j("delete");k.del=k.remove=j("remove");k.dot=j("dot");["override","overwrite"].forEach(function(t){Object.defineProperty(k,t,{get:function(){return ee.override},set:function(e){ee.override=!!e}})});["useArray","keepArray","useBrackets"].forEach(function(t){Object.defineProperty(k,t,{get:function(){return ee[t]},set:function(e){ee[t]=e}})});k._process=Y;var gn=k;function Wn(t){try{return ie(`rgb(${t.split(" ").join(",")})`).toString("hex")}catch{return t}}const oe=Ie.createContext(null);function pn(){const{tabsRef:t,selectedTab:e}=f.useContext(oe),[r,n]=f.useState({width:void 0,transform:void 0,className:void 0});return We(()=>{if(e!=null&&t.current){const s=t.current[e];if(!s)return;n(a=>({width:`${s.offsetWidth}px`,transform:`translateX(${s.offsetLeft}px)`,className:a.width===void 0?"":"transition-all"}))}},[n,e,t]),d.jsx("div",{className:I("absolute bottom-0 left-0 h-2 bg-primary",r.className),role:"presentation",style:{width:r.width,transform:r.transform}})}function Yn({children:t,center:e,expand:r,className:n}){const s=f.Children.toArray(t);return d.jsx(ir,{children:d.jsxs("div",{className:I("flex relative max-w-full overflow-auto border-b max-sm:hidden-scrollbar md:compact-scrollbar",n),role:"tablist","aria-orientation":"horizontal",children:[s.map((a,i)=>f.isValidElement(a)?f.cloneElement(a,{index:i,className:I(a.props.className,r&&"flex-auto",e&&i===0&&"ml-auto",e&&i===s.length-1&&"mr-auto")}):null),d.jsx(pn,{})]})})}function qn({index:t,className:e,isDisabled:r,children:n,padding:s,elementType:a="button",to:i,relative:o,width:l="min-w-min"}){const{selectedTab:c,setSelectedTab:u,tabsRef:A,size:g="md",id:b}=f.useContext(oe),w=t===c,v=or(),x=s||(g==="sm"?"px-12":"px-18"),h=I("tracking-wide overflow-hidden capitalize text-sm flex items-center justify-center outline-none transition-colors","focus-visible:ring focus-visible:ring-2 ring-inset rounded whitespace-nowrap cursor-pointer",l,bn({isDisabled:r,isSelected:w}),e,g==="md"&&`${x} h-48`,g==="sm"&&`${x} h-32`,r&&"pointer-events-none"),m=C=>{switch(C.key){case"ArrowLeft":v.focusPrevious();break;case"ArrowRight":v.focusNext();break;case"Home":v.focusFirst();break;case"End":v.focusLast();break}},$=w?0:-1,E=a;return d.jsx(E,{disabled:r,id:`${b}-${t}-tab`,"aria-controls":`${b}-${t}-tabpanel`,type:"button",role:"tab","aria-selected":w,tabIndex:r?void 0:$,onKeyDown:m,onClick:()=>{u(t)},to:i,relative:o,className:h,ref:C=>{A.current&&C&&(A.current[t]=C)},children:n})}function bn({isDisabled:t,isSelected:e}){return t?"text-disabled cursor-default":e?"text-primary":"text-muted hover:text-main"}function Qn({children:t,className:e}){const{selectedTab:r,isLazy:n}=f.useContext(oe),s=f.Children.toArray(t).filter(i=>!!i);let a;if(n){const i=s[r];a=f.isValidElement(i)?f.cloneElement(s[r],{index:r}):null}else a=s.map((i,o)=>{if(f.isValidElement(i)){const l=o===r;return f.cloneElement(i,{index:o,"aria-hidden":!l,className:l?i.props.className:I(i.props.className,"hidden")})}return null});return d.jsx("div",{className:e,children:a})}function Jn({className:t,children:e,index:r,...n}){const{id:s}=f.useContext(oe),[a,i]=f.useState(0),o=f.useRef(null);return We(()=>{if(o!=null&&o.current){const l=()=>{const u=Se(o.current,{tabbable:!0});i(u.nextNode()?void 0:0)};l();const c=new MutationObserver(l);return c.observe(o.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{c.disconnect()}}},[o]),d.jsx("div",{tabIndex:a,ref:o,id:`${s}-${r}-tabpanel`,"aria-labelledby":`${s}-${r}-tab`,className:I(t,"focus-visible:outline-primary-light"),role:"tabpanel",...n,children:e})}function es(t){const{size:e="md",children:r,className:n,isLazy:s,overflow:a="overflow-hidden"}=t,i=f.useRef([]),o=f.useId(),[l,c]=we(t.selectedTab,t.defaultSelectedTab||0,t.onTabChange),u=f.useMemo(()=>({selectedTab:l,setSelectedTab:c,tabsRef:i,size:e,isLazy:s,id:o}),[l,o,s,c,e]);return d.jsx(oe.Provider,{value:u,children:d.jsx("div",{className:I(n,a,"max-w-full"),children:r})})}const ts=Ie.forwardRef((t,e)=>{const r=t.children,[n,s]=f.useState(null),a=f.useRef(null);return f.useImperativeHandle(e,()=>(i,o)=>{Fe.flushSync(()=>{s(r(i))}),o(a.current),requestAnimationFrame(()=>{s(null)})},[r]),n?Fe.createPortal(d.jsx("div",{style:{zIndex:-100,position:"absolute",top:0,left:-1e5},ref:a,children:n}),lr):null}),rs="artist",ns="album",ss="genre",mn=""+new URL("default-album-image-8101141b.png",import.meta.url).href,xn=""+new URL("default-album-image-8101141b.png",import.meta.url).href;function as({track:t,className:e,size:r}){const{trans:n}=ge();return d.jsx("img",{className:I(e,r,"object-cover bg-fg-base/4"),draggable:!1,loading:"lazy",src:vn(t),alt:n(U("Image for :name",{values:{name:t.name}}))})}function vn(t,e=!0){var r;if(t.image)return t.image;if((r=t.album)!=null&&r.image)return t.album.image;if(e)return xn}const is=f.memo(({minutes:t,seconds:e,ms:r,verbose:n=!1,addZeroToFirstUnit:s=!0})=>{const{trans:a}=ge();t?r=t*6e4:e&&(r=e*1e3),r||(r=0);const i=r<0?-r:r,o={days:Math.trunc(i/864e5),hours:Math.trunc(i/36e5)%24,minutes:Math.trunc(i/6e4)%60,seconds:Math.trunc(i/1e3)%60};let l;return n?l=wn(o,a):l=yn(o,s),d.jsx(f.Fragment,{children:l})});function wn(t,e){const r=[];return t.days&&r.push(`${t.days}${e(U("d"))}`),t.hours&&r.push(`${t.hours}${e(U("hr"))}`),t.minutes&&r.push(`${t.minutes}${e(U("min"))}`),t.seconds&&!t.hours&&r.push(`${t.seconds}${e(U("sec"))}`),r.join(" ")}function yn(t,e=!0){const r=Q(t.seconds);let n="";return t.days&&!n&&(n=`${t.days}:${Q(t.hours)}:${Q(t.minutes)}:${r}`),t.hours&&!n&&(n=`${Q(t.hours,e)}:${Q(t.minutes)}:${r}`),n||(n=`${Q(t.minutes,e)}:${r}`),n}function Q(t,e=!0){if(!e)return t;let r=`${t}`;return r.length===1&&(r="0"+r),r}function os({track:t,className:e,...r}){const n=f.useMemo(()=>$n(t),[t]);return d.jsx(Ce,{...r,className:I("hover:underline overflow-x-hidden overflow-ellipsis",e),to:n,children:t.name})}function $n(t,{absolute:e}={}){let r=`/track/${t.id}/${$e(t.name)}`;return e&&(r=`${Ye().settings.base_url}${r}`),r}const Ae=1240,he=45,ke=3,An=.5;function ls(t){const e=new window.AudioContext;return new Promise((r,n)=>{const s=document.createElement("canvas"),a=s.getContext("2d");if(!a){n();return}s.width=Ae,s.height=he;const i=new FileReader;i.onload=o=>{var c;const l=(c=o.target)==null?void 0:c.result;l?e.decodeAudioData(l,u=>{const A=kn(u,a);r(A)},()=>r(null)):n()},i.readAsArrayBuffer(t)})}function kn(t,e){const r=[],n=t.getChannelData(0),s=Ae,a=Math.floor(n.length/s),i=he,o=[];for(let l=0;l<s;l+=ke)o.push(Ue(l*a,a,n)*1e4);for(let l=0;l<s;l+=ke){const c=i/Math.max(...o);let u=Ue(l*a,a,n)*1e4;u*=c,u+=1,r.push(Cn(l,u))}return e.clearRect(0,0,Ae,he),r}function Ue(t,e,r){let n=0;for(let s=t;s<=t+e-1;s++)n+=Math.pow(r[s],2);return Math.sqrt(n/r.length)}function Cn(t,e){let r=ke;r*=Math.abs(1-An);const n=t+r/2,s=he-e;return[n,s,r,e]}function Le(t){var e;return t.tracks=(e=t.tracks)==null?void 0:e.map(r=>(r.album||(r.album={...t,tracks:void 0}),r)),t}function cs(t){const{trackId:e}=Re();return De(["tracks",+e,t],()=>Sn(e,t))}function Sn(t,e){return pe.get(`tracks/${t}`,{params:{defaultRelations:!0,...e}}).then(r=>(r.data.track.album&&(r.data.track={...r.data.track,album:Le(r.data.track.album)}),r.data))}function us(t){const{user:e,hasPermission:r}=ae();return f.useMemo(()=>{const n={canEdit:!0,canDelete:!0,managesTrack:!0};return t.every(s=>{var o,l;if(!s){n.canEdit=!1,n.canDelete=!1,n.managesTrack=!1;return}const a=(o=s.artists)==null?void 0:o.map(c=>c.id),i=s.owner_id===(e==null?void 0:e.id)||!!((l=e==null?void 0:e.artists)!=null&&l.find(c=>a==null?void 0:a.includes(c.id)));i||(n.managesTrack=!1),!r("tracks.update")&&!r("music.update")&&!i&&(n.canEdit=!1),!r("tracks.delete")&&!r("music.delete")&&!i&&(n.canDelete=!1)}),n},[e,t,r])}function ds({album:t,className:e,size:r}){const{trans:n}=ge();return d.jsx("img",{className:I(e,r,"object-cover bg-fg-base/4"),draggable:!1,loading:"lazy",src:En(t),alt:n(U("Image for :name",{values:{name:t.name}}))})}function En(t){return(t==null?void 0:t.image)||mn}function fs({album:t,artist:e,className:r,target:n}){!e&&t.artists&&(e=t.artists[0]);const s=f.useMemo(()=>In(t,{artist:e}),[e,t]);return d.jsx(Ce,{target:n,className:I("hover:underline outline-none focus-visible:underline overflow-x-hidden overflow-ellipsis",r),to:s,children:t.name})}function In(t,e={}){var i;const r=e.artist||((i=t.artists)==null?void 0:i[0]),n=$e((r==null?void 0:r.name)||"Various Artists"),s=$e(t.name);let a=`/album/${t.id}/${n}/${s}`;return e.absolute&&(a=`${Ye().settings.base_url}${a}`),a}function hs(t){const{albumId:e}=Re();return De(["albums",+e],()=>Tn(e,t))}function Tn(t,e){return pe.get(`albums/${t}`,{params:e}).then(r=>(r.data.album=Le(r.data.album),r.data))}function gs(t){const{user:e,hasPermission:r}=ae();return f.useMemo(()=>{var s,a;const n={canEdit:!1,canDelete:!1,managesAlbum:!1};if(e!=null&&e.id&&t){const i=(s=t.artists)==null?void 0:s.map(l=>l.id),o=t.owner_id===e.id||!!((a=e.artists)!=null&&a.find(l=>i==null?void 0:i.includes(l.id)));n.canEdit=r("albums.update")||r("music.update")||o,n.canDelete=r("albums.delete")||r("music.delete")||o,n.managesAlbum=o}return n},[e,t,r])}function ps(){var e;const{user:t}=ae();return(e=t==null?void 0:t.artists)==null?void 0:e.find(r=>r.role==="artist")}function bs({artists:t,className:e,target:r,linkClassName:n}){return t!=null&&t.length?d.jsx("div",{className:I(e,"overflow-x-hidden overflow-ellipsis"),children:t.map((s,a)=>d.jsxs(f.Fragment,{children:[a>0&&", ",d.jsx(cr,{artist:s,target:r,className:n})]},s.id))}):d.jsx("div",{className:e,children:d.jsx(ce,{message:"Various artists"})})}function Pn(t,e,r,n){const s=Dn(t,e,r,n);t==="mail"?window.location.href=s:Rn(s)}function Rn(t){const n=(window.innerWidth-575)/2,s=(window.innerHeight-400)/2,a="status=1, scrollbars=1,width=575,height=400,top="+s+",left="+n;window.open(t,"share",a)}function Dn(t,e,r,n){switch(t){case"facebook":return"https://www.facebook.com/sharer/sharer.php?u="+e;case"twitter":return`https://twitter.com/intent/tweet?text=${r}&url=${e}`;case"pinterest":return"https://pinterest.com/pin/create/button/?url="+e+"&media="+n;case"tumblr":return"https://www.tumblr.com/widgets/share/tool?shareSource=legacy&canonicalUrl=&posttype=photo&title=&caption="+r+"&content="+n+"&url="+e;case"blogger":return"https://www.blogger.com/blog_this.pyra?t&u="+e+"&n="+r;case"mail":return`mailto:?subject=Check out this link.&body=${e}`}}const Nn=W(d.jsx("path",{d:"M390,32H120c-49.19,0-88,38.81-88,88V390c0,49.19,38.81,90,88,90H390c49.19,0,90-40.81,90-90V120C480,70.81,439.19,32,390,32ZM336,396H284c-42.51,0-72-23.68-72-76V240H176V192c42.51-11,57.95-48.32,60-80h44v72h52v56H280l-.39,70.51c0,21.87,11,29.43,28.62,29.43L336,340Z"})),Ln=W(d.jsx("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92c0-1.61-1.31-2.92-2.92-2.92zM18 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM6 13c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm12 7.02c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"}),"ShareOutlined");function ms({link:t,name:e,image:r,size:n="lg"}){const s=a=>{Pn(a,t,e,r)};return d.jsxs("div",{children:[d.jsx(ne,{size:n,onClick:()=>s("facebook"),className:"text-facebook",children:d.jsx(ur,{})}),d.jsx(ne,{size:n,onClick:()=>s("twitter"),className:"text-twitter",children:d.jsx(dr,{})}),d.jsx(ne,{size:n,onClick:()=>s("tumblr"),className:"text-tumblr",children:d.jsx(Nn,{viewBox:"0 0 512 512"})}),navigator.share&&d.jsx(ne,{size:n,onClick:()=>{try{navigator.share({title:e,url:t})}catch(a){a.name!=="AbortError"&&qe(U("Could not share link"))}},className:"text-muted",children:d.jsx(Ln,{})})]})}function xs({user:t,...e}){var n;const{auth:r}=f.useContext(fr);return d.jsx(wr,{...e,label:t==null?void 0:t.display_name,src:t==null?void 0:t.avatar,link:(t==null?void 0:t.id)&&((n=r.getUserProfileLink)==null?void 0:n.call(r,t))})}const Mn=9007199254740991;function On(t,e,r="desc"){return t.sort((n,s)=>{let a=Ge(n,e),i=Ge(s,e);const o=typeof a,l=typeof i;o!==l&&(o==="number"&&(a+=""),l==="number"&&(i+=""));let c=0;return a!=null&&i!=null?a>i?c=1:a<i&&(c=-1):a!=null?c=1:i!=null&&(c=-1),c*(r==="asc"?1:-1)})}function Ge(t,e){const r=gn.pick(e,t);if(jn(r)){const n=Number(r);return n<Mn?n:r}return r}function jn(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function vs(t){const[e,r]=f.useState({});return{data:f.useMemo(()=>{if(t){if(e!=null&&e.orderBy)return On([...t],e.orderBy,e.orderDir)}else return[];return t},[e,t]),sortDescriptor:e,onSortChange:r}}function ws(){const{pathname:t}=hr(),e=gr(),{getRedirectUri:r}=ae();return pr(n=>Fn(n),{onSuccess:(n,{albumId:s})=>{qe(U("Album deleted")),t.startsWith(`/album/${s}`)&&e(r()),me.invalidateQueries(["tracks"]),me.invalidateQueries(["albums"]),me.invalidateQueries(["artists"])},onError:n=>br(n)})}function Fn({albumId:t}){return pe.delete(`albums/${t}`).then(e=>e.data)}function ys(){const{fields:t,append:e,remove:r}=mr({name:"links"});return d.jsxs("div",{children:[t.map((n,s)=>d.jsxs("div",{className:"flex gap-10 mb-10 items-end",children:[d.jsx(Ve,{required:!0,type:"url",label:d.jsx(ce,{message:"URL"}),name:`links.${s}.url`,size:"sm",className:"flex-auto"}),d.jsx(Ve,{required:!0,label:d.jsx(ce,{message:"Short title"}),name:`links.${s}.title`,size:"sm",className:"flex-auto"}),d.jsx(ne,{size:"sm",color:"primary",className:"flex-shrink-0",onClick:()=>{r(s)},children:d.jsx(xr,{})})]},n.id)),d.jsx(vr,{variant:"text",color:"primary",startIcon:d.jsx(jr,{}),size:"xs",onClick:()=>{e({url:"",title:""})},children:d.jsx(ce,{message:"Add another link"})})]})}const $s="artistPage.albumLayout";function As(t){const{artistId:e}=Re();return De(["artists",e,t],()=>Vn(e,t))}function Vn(t,e){return pe.get(`artists/${t}`,{params:e}).then(r=>(r.data.albums&&(r.data.albums.data=r.data.albums.data.map(n=>Le(n))),r.data))}function ks(t){const{user:e,hasPermission:r}=ae();return f.useMemo(()=>{var s;const n={canEdit:!1,canDelete:!1};if(e!=null&&e.id){const a=!!((s=e.artists)!=null&&s.find(i=>i.id===t.id));n.canEdit=r("artists.update")||r("music.update")||a,n.canDelete=r("artists.delete")||r("music.delete")||a}return n},[e,t,r])}const Cs=W(d.jsx("path",{d:"M8 19V5l11 7Z"}),"PlayArrowFilled");export{ie as $,wr as A,ks as B,Kn as C,ts as D,gs as E,_n as F,ss as G,bs as H,ws as I,us as J,Bn as K,Tr as L,he as M,Ln as N,ps as O,Cs as P,Le as Q,vs as R,Fr as S,Gn as T,xs as U,As as V,Ae as W,$s as X,hs as Y,cs as Z,ys as _,zn as a,Un as a0,Cr as a1,ls as a2,nn as a3,Nr as a4,jr as b,Xn as c,gn as d,es as e,Yn as f,qn as g,Qn as h,Jn as i,rs as j,ns as k,mn as l,an as m,H as n,as as o,os as p,is as q,ds as r,fs as s,Wn as t,Zn as u,Sr as v,vn as w,ms as x,$n as y,In as z}; //# sourceMappingURL=play-arrow-filled-8e87b0ae.js.map
Save
Cancel