vendor: 5,530 bytes, lines 1-11
1import{c as me,a as Be,b as Re,r as u,u as Me,j as e,d as _,e as z,f as Te,P as X,g as Ie,h as Le,i as he,k as Ve,l as J,m as xe,C as Z,n as ee,o as te,p as se,q as ae,L as D,I as w,B as E,s as $,t as _e,v as pe,A as Ue,T as Ke,w as ze,x as H,y as G,S as q,z as Y,D as Q,E as W,F as C,G as Oe,U as He,H as ue}from"./index-CM5AyZOk.js";/** 2 * @license lucide-react v0.453.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Ge=me("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/** 7 * @license lucide-react v0.453.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const $e=me("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);var ge=["PageUp","PageDown"],fe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Fe={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},U="Slider",[le,qe,Ye]=Be(U),[ve,gt]=Re(U,[Ye]),[Qe,re]=ve(U),je=u.forwardRef((t,s)=>{const{name:r,min:a=0,max:c=100,step:n=1,orientation:i="horizontal",disabled:d=!1,minStepsBetweenThumbs:m=0,defaultValue:g=[a],value:h,onValueChange:l=()=>{},onValueCommit:x=()=>{},inverted:f=!1,form:N,...p}=t,F=u.useRef(new Set),v=u.useRef(0),S=i==="horizontal"?We:Xe,[b=[],o]=Me({prop:h,defaultProp:g,onChange:y=>{var R;(R=[...F.current][v.current])==null||R.focus(),l(y)}}),j=u.useRef(b);function A(y){const k=st(b,y);P(y,k)}function K(y){P(y,v.current)}function ne(){const y=j.current[v.current];b[v.current]!==y&&x(b)}function P(y,k,{commit:R}={commit:!1}){const O=ot(n),I=lt(Math.round((y-a)/n)*n+a,O),L=he(I,[a,c]);o((T=[])=>{const M=et(T,L,k);if(nt(M,m*n)){v.current=M.indexOf(L);const V=String(M)!==String(T);return V&&R&&x(M),V?M:T}else return T})}return e.jsx(Qe,{scope:t.__scopeSlider,name:r,disabled:d,min:a,max:c,valueIndexToChangeRef:v,thumbs:F.current,values:b,orientation:i,form:N,children:e.jsx(le.Provider,{scope:t.__scopeSlider,children:e.jsx(le.Slot,{scope:t.__scopeSlider,children:e.jsx(S,{"aria-disabled":d,"data-disabled":d?"":void 0,...p,ref:s,onPointerDown:_(p.onPointerDown,()=>{d||(j.current=b)}),min:a,max:c,inverted:f,onSlideStart:d?void 0:A,onSlideMove:d?void 0:K,onSlideEnd:d?void 0:ne,onHomeKeyDown:()=>!d&&P(a,0,{commit:!0}),onEndKeyDown:()=>!d&&P(c,b.length-1,{commit:!0}),onStepKeyDown:({event:y,direction:k})=>{if(!d){const I=ge.includes(y.key)||y.shiftKey&&fe.includes(y.key)?10:1,L=v.current,T=b[L],M=n*I*k;P(T+M,L,{commit:!0})}}})})})})});je.displayName=U;var[be,ye]=ve(U,{startEdge:"left",endEdge:"right",size:"width",direction:1}),We=u.forwardRef((t,s)=>{const{min:r,max:a,dir:c,inverted:n,onSlideStart:i,onSlideMove:d,onSlideEnd:m,onStepKeyDown:g,...h}=t,[l,x]=u.useState(null),f=z(s,S=>x(S)),N=u.useRef(void 0),p=Te(c),F=p==="ltr",v=F&&!n||!F&&n;function B(S){const b=N.current||l.getBoundingClientRect(),o=[0,b.width],A=de(o,v?[r,a]:[a,r]);return N.current=b,A(S-b.left)}return e.jsx(be,{scope:t.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:e.jsx(De,{dir:p,"data-orientation":"horizontal",...h,ref:f,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:S=>{const b=B(S.clientX);i==null||i(b)},onSlideMove:S=>{const b=B(S.clientX);d==null||d(b)},onSlideEnd:()=>{N.current=void 0,m==null||m()},onStepKeyDown:S=>{const o=Fe[v?"from-left":"from-right"].includes(S.key);g==null||g({event:S,direction:o?-1:1})}})})}),Xe=u.forwardRef((t,s)=>{const{min:r,max:a,inverted:c,onSlideStart:n,onSlideMove:i,onSlideEnd:d,onStepKeyDown:m,...g}=t,h=u.useRef(null),l=z(s,h),x=u.useRef(void 0),f=!c;function N(p){const F=x.current||h.current.getBoundingClientRect(),v=[0,F.height],S=de(v,f?[a,r]:[r,a]);return x.current=F,S(p-F.top)}return e.jsx(be,{scope:t.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:e.jsx(De,{"data-orientation":"vertical",...g,ref:l,style:{...g.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:p=>{const F=N(p.clientY);n==null||n(F)},onSlideMove:p=>{const F=N(p.clientY);i==null||i(F)},onSlideEnd:()=>{x.current=void 0,d==null||d()},onStepKeyDown:p=>{const v=Fe[f?"from-bottom":"from-top"].includes(p.key);m==null||m({event:p,direction:v?-1:1})}})})}),De=u.forwardRef((t,s)=>{const{__scopeSlider:r,onSlideStart:a,onSlideMove:c,onSlideEnd:n,onHomeKeyDown:i,onEndKeyDown:d,onStepKeyDown:m,...g}=t,h=re(U,r);return e.jsx(X.span,{...g,ref:s,onKeyDown:_(t.onKeyDown,l=>{l.key==="Home"?(i(l),l.preventDefault()):l.key==="End"?(d(l),l.preventDefault()):ge.concat(fe).includes(l.key)&&
11(m(l),l.preventDefault())}),onPointerDown:_(t.onPointerDown,l=>{const x=l.target;x.setPointerCapture(l.pointerId),l.preventDefault(),h.thumbs.has(x)?x.focus():a(l)}),onPointerMove:_(t.onPointerMove,l=>{l.target.hasPointerCapture(l.pointerId)&&c(l)}),onPointerUp:_(t.onPointerUp,l=>{const x=l.target;x.hasPointerCapture(l.pointerId)&&(x.releasePointerCapture(l.pointerId),n(l))})})}),Ne="SliderTrack",Se=u.forwardRef((t,s)=>{const{__scopeSlider:r,...a}=t,c=re(Ne,r);return e.jsx(X.span,{"data-disabled":c.disabled?"":void 0,"data-orientation":c.orientation,...a,ref:s})});Se.displayName=Ne;var ie="SliderRange",Ce=u.forwardRef((t,s)=>{const{__scopeSlider:r,...a}=t,c=re(ie,r),n=ye(ie,r),i=u.useRef(null),d=z(s,i),m=c.values.length,g=c.values.map(x=>Ae(x,c.min,c.max)),h=m>1?Math.min(...g):0,l=100-Math.max(...g);return e.jsx(X.span,{"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,...a,ref:d,style:{...t.style,[n.startEdge]:h+"%",[n.endEdge]:l+"%"}})});Ce.displayName=ie;var ce="SliderThumb",we=u.forwardRef((t,s)=>{const r=qe(t.__scopeSlider),[a,c]=u.useState(null),n=z(s,d=>c(d)),i=u.useMemo(()=>a?r().findIndex(d=>d.ref.current===a):-1,[r,a]);return e.jsx(Je,{...t,ref:n,index:i})}),Je=u.forwardRef((t,s)=>{const{__scopeSlider:r,index:a,name:c,...n}=t,i=re(ce,r),d=ye(ce,r),[m,g]=u.useState(null),h=z(s,B=>g(B)),l=m?i.form||!!m.closest("form"):!0,x=Ie(m),f=i.values[a],N=f===void 0?0:Ae(f,i.min,i.max),p=tt(a,i.values.length),F=x==null?void 0:x[d.size],v=F?at(F,N,d.direction):0;return u.useEffect(()=>{if(m)return i.thumbs.add(m),()=>{i.thumbs.delete(m)}},[m,i.thumbs]),e.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[d.startEdge]:`calc(${N}% + ${v}px)`},children:[e.jsx(le.ItemSlot,{scope:t.__scopeSlider,children:e.jsx(X.span,{role:"slider","aria-label":t["aria-label"]||p,"aria-valuemin":i.min,"aria-valuenow":f,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...n,ref:h,style:f===void 0?{display:"none"}:t.style,onFocus:_(t.onFocus,()=>{i.valueIndexToChangeRef.current=a})})}),l&&e.jsx(Ze,{name:c??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:f},a)]})});we.displayName=ce;var Ze=t=>{const{value:s,...r}=t,a=u.useRef(null),c=Le(s);return u.useEffect(()=>{const n=a.current,i=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(i,"value").set;if(c!==s&&m){const g=new Event("input",{bubbles:!0});m.call(n,s),n.dispatchEvent(g)}},[c,s]),e.jsx("input",{style:{display:"none"},...r,ref:a,defaultValue:s})};function et(t=[],s,r){const a=[...t];return a[r]=s,a.sort((c,n)=>c-n)}function Ae(t,s,r){const n=100/(r-s)*(t-s);return he(n,[0,100])}function tt(t,s){return s>2?`Value ${t+1} of ${s}`:s===2?["Minimum","Maximum"][t]:void 0}function st(t,s){if(t.length===1)return 0;const r=t.map(c=>Math.abs(c-s)),a=Math.min(...r);return r.indexOf(a)}function at(t,s,r){const a=t/2,n=de([0,50],[0,a]);return(a-n(s)*r)*r}function rt(t){return t.slice(0,-1).map((s,r)=>t[r+1]-s)}function nt(t,s){if(s>0){const r=rt(t);return Math.min(...r)>=s}return!0}function de(t,s){return r=>{if(t[0]===t[1]||s[0]===s[1])return s[0];const a=(s[1]-s[0])/(t[1]-t[0]);return s[0]+a*(r-t[0])}}function ot(t){return(String(t).split(".")[1]||"").length}function lt(t,s){const r=Math.pow(10,s);return Math.round(t*r)/r}var Ee=je,it=Se,ct=Ce,dt=we;const Pe=u.forwardRef(({className:t,...s},r)=>e.jsxs(Ee,{ref:r,className:Ve("relative flex w-full touch-none select-none items-center",t),...s,children:[e.jsx(it,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:e.jsx(ct,{className:"absolute h-full bg-primary"})}),e.jsx(dt,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));Pe.displayName=Ee.displayName;const oe=[{id:"energetic",name:"Energetic",description:"Bold, vibrant colors inspired by high-energy performances",colors:{primary:"#FB3939",secondary:"#FFD700",accent:"#3A86FF",background:"#121212",text:"#FFFFFF"}},{id:"dark",name:"Dark & Brooding",description:"Deep, shadowy colors for introspective themes",colors:{primary:"#8A0303",secondary:"#380036",accent:"#540D5A",background:"#0A0A0A",text:"#
11E0E0E0"}},{id:"nostalgic",name:"Nostalgic",description:"Warm, vintage tones reminiscent of classic hip-hop era",colors:{primary:"#D2691E",secondary:"#CD853F",accent:"#B87333",background:"#211E1C",text:"#F5F5DC"}},{id:"futuristic",name:"Futuristic",description:"Sleek, modern colors inspired by forward-thinking artists",colors:{primary:"#00FFFF",secondary:"#9933FF",accent:"#FF00FF",background:"#101020",text:"#E6E6FA"}},{id:"eminem",name:"Eminem-inspired",description:"Striking red, black and white palette inspired by Eminem's brand",colors:{primary:"#FB3939",secondary:"#8B0000",accent:"#CCCCCC",background:"#121212",text:"#FFFFFF"}}];function ut(){const{toast:t}=J(),[s,r]=u.useState("eminem"),[a,c]=u.useState(""),[n,i]=u.useState(""),[d,m]=u.useState(!1),[g,h]=u.useState([75]),[l,x]=u.useState(oe[4].colors),[f,N]=u.useState([]),p=o=>{const j=oe.find(A=>A.id===o);j&&(r(o),x(j.colors))},F=async()=>{if(!a.trim()){t({title:"Artist name required",description:"Please enter an artist name to generate a mood palette",variant:"destructive"});return}m(!0);try{await new Promise(V=>setTimeout(V,1500));const o=a.split("").reduce((V,ke)=>V+ke.charCodeAt(0),0),j=g[0]/100,A=o%360,K=o*1.5%360,ne=o*2.1%360,P=70+j*30,y=45+j*15,k=`hsl(${A}, ${P}%, ${y}%)`,R=`hsl(${K}, ${P-10}%, ${y-5}%)`,O=`hsl(${ne}, ${P+5}%, ${y+10}%)`,I=o%3!==0;x({primary:k,secondary:R,accent:O,background:I?"#121212":"#F9F9F9",text:I?"#FFFFFF":"#121212"}),t({title:"Palette generated",description:`Custom palette for "${a}" created successfully`})}catch{t({title:"Generation failed",description:"Failed to generate color palette",variant:"destructive"})}finally{m(!1)}},v=()=>{N(o=>[...o,l]),t({title:"Palette saved",description:"This palette has been saved to your collection"})},B=xe({mutationFn:async()=>{const o=await fetch("/api/admin/site-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:"colorPalette",value:l}),credentials:"include"});if(!o.ok){const j=await o.text();throw new Error(`Failed to save color palette: ${j}`)}return await o.json()},onSuccess:()=>{document.documentElement.style.setProperty("--primary",l.primary),document.documentElement.style.setProperty("--secondary",l.secondary),document.documentElement.style.setProperty("--accent",l.accent),document.documentElement.style.setProperty("--background-color",l.background),document.documentElement.style.setProperty("--text",l.text),document.querySelectorAll(".bg-\\[\\#FB3939\\]").forEach(o=>{o.style.backgroundColor=l.primary}),document.querySelectorAll(".text-\\[\\#FB3939\\]").forEach(o=>{o.style.color=l.primary}),document.querySelectorAll(".border-\\[\\#FB3939\\]").forEach(o=>{o.style.borderColor=l.primary}),document.querySelectorAll('[data-state="active"]').forEach(o=>{(o.classList.contains("bg-[#FB3939]")||o.classList.contains("data-[state=active]:bg-[#FB3939]"))&&(o.style.backgroundColor=l.primary)}),pe.invalidateQueries({queryKey:["/api/admin/site-settings/colorPalette"]}),t({title:"Palette applied",description:"Your selected color palette has been applied to the site"})},onError:o=>{console.error("Error saving color palette:",o),t({title:"Error",description:"Failed to apply color palette to the site",variant:"destructive"})}}),S=()=>{B.mutate()},b=o=>{navigator.clipboard.writeText(o),t({title:"Copied!",description:`${o} copied to clipboard`})};return e.jsxs(Z,{className:"bg-[#1E1E1E] border-[#2D2D2D]",children:[e.jsxs(ee,{children:[e.jsx(te,{className:"text-[#F5F5F5]",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(Ge,{className:"mr-2 h-5 w-5"}),"Artist Mood Color Palette Generator"]})}),e.jsx(se,{className:"text-[#A0A0A0]",children:"Create color palettes based on artist moods and styles"})]}),e.jsxs(ae,{className:"space-y-6",children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium text-[#F5F5F5] mb-3",children:"Predefined Moods"}),e.jsx("div",{className:"space-y-3",children:oe.map(o=>e.jsxs("div",{className:`p-3 rounded-md cursor-pointer transition-colors ${s===o.id?"bg-[#2D2D2D] border border-[#FB3939]":"bg-[#252525] hover:bg-[#2A2A2A] border border-[#333333]"}`,onClick:()=>p(o.id),children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("h4",{className:"font-medium text-[#F5F5F5]",children:o.name}),e.jsx("div",{className:"flex space-x-1",children:Object.values(o.colors).slice(0,3).map((j,A)=>e.jsx("div",{style:{backgroundColor:j},className:"w-4 h-4 rounded-full"},A))})]}),e.jsx("p",{className:"text-sm text-[#A0A0A0] mt-1",children:o.description})]},o.id))})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium text-[#F5F5F5] mb-3",children:"Custom Generator"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(D,{htmlFor:"artistName",className:"text-[#F5F5F5]",children:"Artist Name"}),e.jsx(w,{id:"artistName",value:a,onChange:o=>c(o.target.value),placeholder:"Enter artist name",className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(D,{htmlFor:"moodDescription",className:"text-[#F5F5F5]",children:"Mood Description (Optional)"}),e.jsx(w,{id:"moodDescription",value:n,onChange:o=>i(o.target.value),placeholder:"e.g., aggressive, reflective, upbeat",className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(D,{htmlFor:"intensity",className:"text-[#F5F5F5]",children:"Color Intensity"}),e.jsx(Pe,{id:"intensity",defaultValue:[75],max:100,step:1,value:g,onValueChange:h,className:"py-4"}),e.jsxs("div",{className:"flex justify-between text-xs text-[#A0A0A0]",children:[e.jsx("span",{children:"Subtle"}),e.jsxs("span",{children:[g[0],"%"]}),e.jsx("span",{children:"Vibrant"})]})]}),e.jsx(E,{onClick:F,disabled:d||!a.trim(),className:"w-full mt-2 bg-[#FB3939] hover:bg-opacity-90 text-white",children:d?e.jsxs(e.Fragment,{children:[e.jsx($,{className:"mr-2 h-4 w-4 animate-spin"}),"Generating..."]}):"Generate Palette"})]})]})]}),e.jsxs("div",{className:"pt-6 border-t border-[#2D2D2D]",children:[e.jsx("h3",{className:"text-lg font-medium text-[#F5F5F5] mb-4",children:"Current Palette"}),e.jsx("div",{className:"p-6 rounded-lg shadow-inner mb-4",style:{backgroundColor:l.background},children:e.jsx("div",{className:"flex flex-col md:flex-row space-y-4 md:space-y-0 md:space-x-4",children:Object.entries(l).map(([o,j])=>e.jsxs("div",{className:"flex-1 rounded-md overflow-hidden shadow-md",children:[e.jsx("div",{className:"aspect-square flex items-center justify-center relative group",style:{backgroundColor:j},children:e.jsx("button",{onClick:()=>b(j),className:"absolute inset-0 bg-black bg-opacity-0 group-hover:bg-opacity-30 flex items-center justify-center transition-all opacity-0 group-hover:opacity-100",children:e.jsx(_e,{className:"h-6 w-6 text-white"})})}),e.jsxs("div",{className:"bg-[#1E1E1E] p-2",children:[e.jsx("p",{className:"text-xs font-medium text-[#F5F5F5] capitalize",children:o}),e.jsx("p",{className:"text-xs text-[#A0A0A0]",children:j})]})]},o))})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(E,{onClick:v,variant:"outline",className:"border-[#3D3D3D] text-[#F5F5F5]",children:"Save Palette"}),e.jsx(E,{onClick:S,className:"bg-[#FB3939] hover:bg-opacity-90 text-white",children:"Apply to Site"})]})]}),f.length>0&&e.jsxs("div",{className:"pt-6 border-t border-[#2D2D2D]",children:[e.jsx("h3",{className:"text-lg font-medium text-[#F5F5F5] mb-4",children:"Saved Palettes"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:f.map((o,j)=>e.jsxs("div",{className:"p-3 rounded-md bg-[#252525] border border-[#333333] cursor-pointer hover:border-[#FB3939]",onClick:()=>x(o),children:[e.jsx("div",{className:"flex mb-2",children:Object.values(o).map((A,K)=>e.jsx("div",{style:{backgroundColor:A},className:"flex-1 h-8"},K))}),e.jsxs("p",{className:"text-sm text-[#A0A0A0]",children:["Saved Palette ",j+1]})]},j))})]})]})]})}function ft(){return e.jsx(Ue,{children:e.jsxs("div",{className:"container mx-auto px-4 py-8",children:[e.jsx("div",{className:"flex justify-between items-center mb-8",children:e.jsx("h1",{className:"text-3xl md:text-4xl font-heading text-[#F5F5F5]",children:"Site Customization"})}),e.jsxs(Ke,{defaultValue:"layout",className:"mt-6",children:[e.jsxs(ze,{className:"mb-8 bg-[#1E1E1E] text-[#F5F5F5]",children:[e.jsx(H,{value:"layout",className:"data-[state=active]:bg-[#FB3939]",children:"Layout Settings"}),e.jsx(H,{value:"assets",className:"data-[state=active]:bg-[#FB3939]",children:"Image Assets"}),e.jsx(H,{value:"colors",className:"data-[state=active]:bg-[#FB3939]",children:"Color Themes"}),e.jsx(H,{value:"mood",className:"data-[state=active]:bg-[#FB3939]",children:"Mood Palette"})]}),e.jsx(G,{value:"layout",children:e.jsx(mt,{})}),e.jsx(G,{value:"assets",children:e.jsx(ht,{})}),e.jsx(G,{value:"colors",children:e.jsx(xt,{})}),e.jsx(G,{value:"mood",children:e.jsx(ut,{})})]})]})})}function mt(){const{toast:t}=J(),[s,r]=u.useState({heroLayout:"centered",showFeaturedArtists:!0,featuredArtistsCount:3,showGenreExplorer:!0,showEraExplorer:!0,footerLayout:"standard"}),a=(n,i)=>{r(d=>({...d,[n]:i}))},c=()=>{t({title:"Layout settings saved",description:"Your site layout preferences have been updated."})};return e.jsxs(Z,{className:"bg-[#1E1E1E] border-[#2D2D2D]",children:[e.jsxs(ee,{children:[e.jsx(te,{className:"text-[#F5F5F5]",children:"Layout Settings"}),e.jsx(se,{className:"text-[#A0A0A0]",children:"Customize the layout of different sections of your site"})]}),e.jsxs(ae,{className:"space-y-6",children:[e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(D,{htmlFor:"heroLayout",className:"text-[#F5F5F5]",children:"Hero Section Layout"}),e.jsxs(q,{value:s.heroLayout,onValueChange:n=>a("heroLayout",n),children:[e.jsx(Y,{className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]",children:e.jsx(Q,{placeholder:"Select hero layout"})}),e.jsxs(W,{className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]",children:[e.jsx(C,{value:"centered",children:"Centered"}),e.jsx(C,{value:"left-aligned",children:"Left Aligned"}),e.jsx(C,{value:"fullscreen",children:"Fullscreen"})]})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("input",{type:"checkbox",id:"showFeaturedArtists",checked:s.show
11FeaturedArtists,onChange:n=>a("showFeaturedArtists",n.target.checked),className:"accent-[#FB3939]"}),e.jsx(D,{htmlFor:"showFeaturedArtists",className:"text-[#F5F5F5]",children:"Show Featured Artists Section"})]}),s.showFeaturedArtists&&e.jsxs("div",{className:"space-y-2 ml-6",children:[e.jsx(D,{htmlFor:"featuredArtistsCount",className:"text-[#F5F5F5]",children:"Number of Featured Artists"}),e.jsxs(q,{value:s.featuredArtistsCount.toString(),onValueChange:n=>a("featuredArtistsCount",parseInt(n)),children:[e.jsx(Y,{className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]",children:e.jsx(Q,{placeholder:"Select count"})}),e.jsxs(W,{className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]",children:[e.jsx(C,{value:"3",children:"3"}),e.jsx(C,{value:"4",children:"4"}),e.jsx(C,{value:"5",children:"5"}),e.jsx(C,{value:"6",children:"6"})]})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("input",{type:"checkbox",id:"showGenreExplorer",checked:s.showGenreExplorer,onChange:n=>a("showGenreExplorer",n.target.checked),className:"accent-[#FB3939]"}),e.jsx(D,{htmlFor:"showGenreExplorer",className:"text-[#F5F5F5]",children:"Show Genre Explorer Section"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("input",{type:"checkbox",id:"showEraExplorer",checked:s.showEraExplorer,onChange:n=>a("showEraExplorer",n.target.checked),className:"accent-[#FB3939]"}),e.jsx(D,{htmlFor:"showEraExplorer",className:"text-[#F5F5F5]",children:"Show Era Explorer Section"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(D,{htmlFor:"footerLayout",className:"text-[#F5F5F5]",children:"Footer Layout"}),e.jsxs(q,{value:s.footerLayout,onValueChange:n=>a("footerLayout",n),children:[e.jsx(Y,{className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]",children:e.jsx(Q,{placeholder:"Select footer layout"})}),e.jsxs(W,{className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]",children:[e.jsx(C,{value:"standard",children:"Standard"}),e.jsx(C,{value:"expanded",children:"Expanded"}),e.jsx(C,{value:"minimal",children:"Minimal"})]})]})]})]}),e.jsx(E,{onClick:c,className:"mt-4 bg-[#FB3939] hover:bg-opacity-90 text-white",children:"Save Layout Settings"})]})]})}function ht(){const{toast:t}=J(),[s,r]=u.useState(""),[a,c]=u.useState(""),[n,i]=u.useState(null),[d,m]=u.useState(""),[g,h]=u.useState("hero"),{data:l,isLoading:x}=Oe({queryKey:["/api/admin/site-assets"],queryFn:async()=>[]}),f=xe({mutationFn:async p=>({id:Date.now(),...p,active:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),onSuccess:()=>{pe.invalidateQueries({queryKey:["/api/admin/site-assets"]}),c(""),i(null),m(""),r(""),t({title:"Asset uploaded",description:"Your new image has been uploaded successfully."})}}),N=()=>{if(s==="url"&&(!a||!d)){t({title:"Missing information",description:"Please provide both a name and URL for the asset.",variant:"destructive"});return}if(s==="file"&&(!a||!n)){t({title:"Missing information",description:"Please provide both a name and file for the asset.",variant:"destructive"});return}f.mutate({name:a,section:g,url:s==="url"?d:URL.createObjectURL(n),type:s==="url"?"external":"uploaded"})};return e.jsxs(Z,{className:"bg-[#1E1E1E] border-[#2D2D2D]",children:[e.jsxs(ee,{children:[e.jsx(te,{className:"text-[#F5F5F5]",children:"Image Assets"}),e.jsx(se,{className:"text-[#A0A0A0]",children:"Upload and manage images used throughout the site"})]}),e.jsx(ae,{children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-col space-y-2",children:[e.jsx(D,{htmlFor:"assetSection",className:"text-[#F5F5F5]",children:"Section"}),e.jsxs(q,{value:g,onValueChange:h,children:[e.jsx(Y,{className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]",children:e.jsx(Q,{placeholder:"Select section"})}),e.jsxs(W,{className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]",children:[e.jsx(C,{value:"hero",children:"Hero Section"}),e.jsx(C,{value:"eminem",children:"Eminem Profile"}
11),e.jsx(C,{value:"background",children:"Background Images"}),e.jsx(C,{value:"genre",children:"Genre Thumbnails"}),e.jsx(C,{value:"era",children:"Era Thumbnails"})]})]})]}),e.jsxs("div",{className:"flex space-x-4",children:[e.jsxs(E,{variant:s==="file"?"default":"outline",onClick:()=>r("file"),className:s==="file"?"bg-[#FB3939] text-white":"border-[#3D3D3D] text-[#F5F5F5]",children:[e.jsx(He,{className:"w-4 h-4 mr-2"}),"Upload File"]}),e.jsxs(E,{variant:s==="url"?"default":"outline",onClick:()=>r("url"),className:s==="url"?"bg-[#FB3939] text-white":"border-[#3D3D3D] text-[#F5F5F5]",children:[e.jsx(ue,{className:"w-4 h-4 mr-2"}),"Image URL"]})]}),s==="file"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(D,{htmlFor:"assetName",className:"text-[#F5F5F5]",children:"Asset Name"}),e.jsx(w,{id:"assetName",value:a,onChange:p=>c(p.target.value),placeholder:"Enter a name for this asset",className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(D,{htmlFor:"assetFile",className:"text-[#F5F5F5]",children:"File"}),e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(w,{id:"assetFile",type:"file",accept:"image/*",onChange:p=>{var F;return i(((F=p.target.files)==null?void 0:F[0])||null)},className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]"})})]}),e.jsx(E,{onClick:N,disabled:f.isPending,className:"mt-2 bg-[#FB3939] hover:bg-opacity-90 text-white",children:f.isPending?e.jsxs(e.Fragment,{children:[e.jsx($,{className:"mr-2 h-4 w-4 animate-spin"}),"Uploading..."]}):"Upload Image"})]}),s==="url"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(D,{htmlFor:"assetName",className:"text-[#F5F5F5]",children:"Asset Name"}),e.jsx(w,{id:"assetName",value:a,onChange:p=>c(p.target.value),placeholder:"Enter a name for this asset",className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(D,{htmlFor:"assetUrl",className:"text-[#F5F5F5]",children:"Image URL"}),e.jsx(w,{id:"assetUrl",value:d,onChange:p=>m(p.target.value),placeholder:"https://example.com/image.jpg",className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]"})]}),e.jsx(E,{onClick:N,disabled:f.isPending,className:"mt-2 bg-[#FB3939] hover:bg-opacity-90 text-white",children:f.isPending?e.jsxs(e.Fragment,{children:[e.jsx($,{className:"mr-2 h-4 w-4 animate-spin"}),"Adding..."]}):"Add Image"})]})]}),e.jsxs("div",{className:"mt-8",children:[e.jsxs("h3",{className:"text-xl font-medium text-[#F5F5F5] mb-4",children:["Current Assets for ",g]}),x?e.jsx("div",{className:"flex justify-center py-8",children:e.jsx($,{className:"h-8 w-8 animate-spin text-[#FB3939]"})}):l&&l.length>0?e.jsx("div",{className:"grid gap-4 sm:grid-cols-2 md:grid-cols-3",children:e.jsxs("div",{className:"p-4 border rounded-md border-[#3D3D3D] bg-[#2D2D2D]",children:[e.jsxs("div",{className:"flex justify-between mb-2",children:[e.jsx("span",{className:"text-[#F5F5F5] font-medium",children:"Example Asset"}),e.jsx(E,{size:"sm",variant:"destructive",children:e.jsx($e,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"aspect-video bg-[#1E1E1E] rounded-md flex items-center justify-center",children:e.jsx(ue,{className:"w-6 h-6 text-[#A0A0A0]"})})]})}):e.jsx("div",{className:"text-center py-8 text-[#A0A0A0]",children:"No assets found for this section. Upload some images to get started."})]})]})})]})}function xt(){const{toast:t}=J(),[s,r]=u.useState("#FB3939"),[a,c]=u.useState("#3A86FF"),[n,i]=u.useState("#121212"),[d,m]=u.useState("#F5F5F5"),g=()=>{t({title:"Color theme saved",description:"Your site color preferences have been updated."})};return e.jsxs(Z,{className:"bg-[#1E1E1E] border-[#2D2D2D]",children:[e.jsxs(ee,{children:[e.jsx(te,{className:"text-[#F5F5F5]",children:"Color Themes"}),e.jsx(se,{className:"text-[#A0A0A0]",children:"Customize the color scheme of your site"})]}),e.jsx(ae,{children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(D,{htmlFor:"primaryColor",className:"text-[#F5F5F5]",children:"Primary Color"}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(w,{id:"primaryColor",type:"color",value:s,onChange:h=>r(h.target.value),className:"w-12 h-12 p-1 border-[#3D3D3D] bg-[#2D2D2D]"}),e.jsx(w,{value:s,onChange:h=>r(h.target.value),className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]"})]}),e.jsx("p",{className:"text-sm text-[#A0A0A0]",children:"Used for buttons, links, and highlights"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(D,{htmlFor:"secondaryColor",className:"text-[#F5F5F5]",children:"Secondary Color"}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(w,{id:"secondaryColor",type:"color",value:a,onChange:h=>c(h.target.value),className:"w-12 h-12 p-1 border-[#3D3D3D] bg-[#2D2D2D]"}),e.jsx(w,{value:a,onChange:h=>c(h.target.value),className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]"})]}),e.jsx("p",{className:"text-sm text-[#A0A0A0]",children:"Used for secondary elements and accents"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(D,{htmlFor:"backgroundColor",className:"text-[#F5F5F5]",children:"Backgroun
11d Color"}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(w,{id:"backgroundColor",type:"color",value:n,onChange:h=>i(h.target.value),className:"w-12 h-12 p-1 border-[#3D3D3D] bg-[#2D2D2D]"}),e.jsx(w,{value:n,onChange:h=>i(h.target.value),className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]"})]}),e.jsx("p",{className:"text-sm text-[#A0A0A0]",children:"Main background color of the site"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(D,{htmlFor:"textColor",className:"text-[#F5F5F5]",children:"Text Color"}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(w,{id:"textColor",type:"color",value:d,onChange:h=>m(h.target.value),className:"w-12 h-12 p-1 border-[#3D3D3D] bg-[#2D2D2D]"}),e.jsx(w,{value:d,onChange:h=>m(h.target.value),className:"border-[#3D3D3D] bg-[#2D2D2D] text-[#F5F5F5]"})]}),e.jsx("p",{className:"text-sm text-[#A0A0A0]",children:"Primary text color throughout the site"})]})]}),e.jsxs("div",{className:"pt-4 mt-4 border-t border-[#3D3D3D]",children:[e.jsx("h3",{className:"text-xl font-medium text-[#F5F5F5] mb-4",children:"Preview"}),e.jsxs("div",{className:"p-6 rounded-md",style:{backgroundColor:n,color:d},children:[e.jsx("h3",{className:"text-xl font-bold mb-2",children:"Sample Content"}),e.jsx("p",{className:"mb-4",children:"This is how your content will look with the selected colors."}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx("button",{className:"px-4 py-2 rounded-md",style:{backgroundColor:s,color:"#ffffff"},children:"Primary Button"}),e.jsx("button",{className:"px-4 py-2 rounded-md",style:{backgroundColor:a,color:"#ffffff"},children:"Secondary Button"})]}),e.jsx("div",{className:"mt-4",children:e.jsx("a",{href:"#",style:{color:s},children:"This is a link"})})]})]}),e.jsx(E,{onClick:g,className:"mt-6 bg-[#FB3939] hover:bg-opacity-90 text-white",children:"Save Color Theme"})]})})]})}export{ft as default};
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.