PageSourceSearch

https://filmo.com.co/_next/static/chunks/commons-ff2580c7-dd01ddf926ed5760.js

js filmo.com.co collected 2026-10-06 00:54:27 UTC 32,813 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[589],{63857:(e,a,t)=>{t.d(a,{A:()=>d});var r=t(95155),s=t(12115),i=t(20063),o=t(52619),l=t.n(o),n=t(15239),c=t(9589);function d(e){let{initialData:a,isEditing:t=!1,onSubmit:o}=e,d=(0,i.useRouter)(),[m,x]=(0,s.useState)(!1),[u,h]=(0,s.useState)(""),[p,g]=(0,s.useState)(a||{...{title:"",description:"",type:"image",aspectRatio:"square",path:"",isTest:!1},_id:"",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),b=e=>{let{name:a,value:t,type:r}=e.target;if("checkbox"===r){let t=e.target.checked;g(e=>({...e,[a]:t}))}else g(e=>({...e,[a]:t}))},y=async e=>{if(e.preventDefault(),x(!0),h(""),!p.title.trim()){h("El t\xedtulo es obligatorio"),x(!1);return}if(!p.description.trim()){h("La descripci\xf3n es obligatoria"),x(!1);return}if(!p.path.trim()){h("La URL/ruta del archivo es obligatoria"),x(!1);return}try{await o(p),d.push("/dashboard/galeria")}catch(e){console.error("Error submitting gallery item:",e),h(e instanceof Error?e.message:"No se pudo procesar el elemento. Int\xe9ntalo de nuevo m\xe1s tarde.")}finally{x(!1)}};return(0,r.jsxs)("div",{className:"container mx-auto p-6",children:[(0,r.jsx)(c.P.div,{className:"mb-6",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},children:(0,r.jsxs)(l(),{href:"/dashboard/galeria",className:"text-[#D4AF37] hover:text-[#E5C158] flex items-center gap-2",children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Volver a Galer\xeda"]})}),(0,r.jsxs)(c.P.div,{className:"bg-gray-800 rounded-lg shadow border border-gray-700 p-6",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[(0,r.jsx)("h1",{className:"text-3xl font-bold text-white mb-6",children:t?"Editar Elemento de Galer\xeda":"A\xf1adir Nuevo Elemento"}),u&&(0,r.jsx)(c.P.div,{className:"mb-6 bg-red-900 border border-red-700 text-red-100 px-4 py-3 rounded relative",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3},children:(0,r.jsx)("span",{className:"block sm:inline",children:u})}),(0,r.jsxs)("form",{onSubmit:y,children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold text-[#D4AF37] border-b border-[#D4AF37]/30 pb-2",children:"Informaci\xf3n General"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-1",children:"T\xedtulo *"}),(0,r.jsx)("input",{type:"text",name:"title",value:p.title,onChange:b,required:!0,className:"w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-[#D4AF37]"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-1",children:"Descripci\xf3n *"}),(0,r.jsx)("textarea",{name:"description",value:p.description,onChange:b,rows:4,required:!0,className:"w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-[#D4AF37]"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-1",children:"URL/Ruta del Archivo *"}),(0,r.jsx)("input",{type:"text",name:"path",value:p.path,onChange:b,required:!0,placeholder:"https://... o /resources/...",className:"w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-[#D4AF37]"}),(0,r.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Para im\xe1genes: URL completa o ruta relativa. Para videos: URL de YouTube, Vimeo, etc."})]})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold text-[#D4AF37] border-b border-[#D4AF37]/30 pb-2",children:"Configuraci\xf3n del Elemento"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-1",children:"Tipo de Elemento *"}
1),(0,r.jsxs)("select",{name:"type",value:p.type,onChange:b,required:!0,className:"w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-[#D4AF37]",children:[(0,r.jsx)("option",{value:"image",children:"Imagen"}),(0,r.jsx)("option",{value:"video",children:"Video"}),(0,r.jsx)("option",{value:"vimeo",children:"Vimeo"}),(0,r.jsx)("option",{value:"instagram",children:"Instagram"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-1",children:"Relaci\xf3n de Aspecto *"}),(0,r.jsxs)("select",{name:"aspectRatio",value:p.aspectRatio,onChange:b,required:!0,className:"w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-[#D4AF37]",children:[(0,r.jsx)("option",{value:"square",children:"Cuadrado (1:1)"}),(0,r.jsx)("option",{value:"horizontal",children:"Horizontal (16:9)"}),(0,r.jsx)("option",{value:"vertical",children:"Vertical (9:16)"})]})]}),(0,r.jsx)("div",{className:"flex flex-col space-y-3 mt-4",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("input",{type:"checkbox",id:"isTest",name:"isTest",checked:p.isTest,onChange:e=>g({...p,isTest:e.target.checked}),className:"h-4 w-4 text-[#D4AF37] focus:ring-[#D4AF37] bg-gray-700 border-gray-600 rounded"}),(0,r.jsx)("label",{htmlFor:"isTest",className:"ml-2 block text-sm text-gray-300",children:"Guardar como borrador (no visible al p\xfablico)"})]})}),p.path&&(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-[#D4AF37] mb-3",children:"Vista Previa"}),(0,r.jsx)("div",{className:"bg-gray-700 rounded-md p-4",children:"image"===p.type?(0,r.jsx)("div",{className:"relative w-full h-32",children:(0,r.jsx)(n.default,{src:p.path,alt:p.title,fill:!0,className:"object-cover rounded",onError:e=>{e.target.style.display="none"}})}):(0,r.jsx)("div",{className:"h-32 bg-gray-600 rounded flex items-center justify-center",children:(0,r.jsxs)("span",{className:"text-gray-400",children:["video"===p.type&&"\uD83C\uDFA5","vimeo"===p.type&&"\uD83D\uDCF9","instagram"===p.type&&"\uD83D\uDCF1",(0,r.jsx)("br",{}),p.type.toUpperCase()]})})})]})]})]}),(0,r.jsxs)("div",{className:"mt-8 flex justify-end gap-4",children:[(0,r.jsx)(l(),{href:"/dashboard/galeria",className:"px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-md transition",children:"Cancelar"}),(0,r.jsx)(c.P.button,{type:"submit",disabled:m,className:"px-4 py-2 bg-[#D4AF37] hover:bg-[#E5C158] text-gray-900 rounded-md transition ".concat(m?"opacity-70 cursor-not-allowed":""),whileHover:{scale:1.02},whileTap:{scale:.98},children:m?"Guardando...":t?"Actualizar Elemento":"Guardar Elemento"})]})]})]})]})}},99518:(e,a,t)=>{t.d(a,{A:()=>g});var r=t(95155),s=t(88661),i=t.n(s),o=t(12115),l=t(20063),n=t(52619),c=t.n(n),d=t(9589),m=t(16673),x=t(15239),u=t(70740);t(99157);var h=t(74904);let p="\n  .react-datepicker {\n    background-color: #1f2937;\n    border-color: #4b5563;\n    color: white;\n    font-family: inherit;\n    z-index: 100;\n  }\n  .react-datepicker-popper {\n    z-index: 100 !important;\n  }\n  .react-datepicker__header {\n    background-color: #111827;\n    border-bottom-color: #4b5563;\n  }\n  .react-datepicker__current-month, \n  .react-datepicker__day-name, \n  .react-datepicker-time__header {\n    color: white;\n  }\n  .react-datepicker__day {\n    color: #e5e7eb;\n  }\n  .react-datepicker__day:hover {\n    background-color: #374151;\n    color: #000000;\n  }\n  .react-datepicker__day--selected, \n  .react-datepicker__day--keyboard-selected {\n    background-color: #D4AF37;\n    color: #111827;\n  }\n  .react-datepicker__day--disabled {\n    color: #6b7280;\n  }\n  .react-datepicker__time-container {\n    border-left-color: #4b5563;\n  }\n  .react-datepicker__time-container .react-datepicker__time {\n    background-color: #1f2937;\n  }\n  .react-datepicker__time-container .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item {\n    color: #e5e7eb;\n  }\n  .react-datepicker__time-container .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item:hover {\n    background-color: #374151;\n    color: #000000;\n  }\n  .react-datepicker__time-container .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected {\n    background-color: #D4AF37;\n    color: #111827;\n  }\n";function g(e){let{initialData:a,isEditing:t=!1,onSubmit:s}=e,n=(0,l.useRouter)(),[g,b]=(0,o.useState)(!1),[y,v]=(0,o.useState)(""),[j,f]=(0,o.useState)([]),[N,w]=(0,o.useState)(!0),[k,C]=(0,o.useState)(""),[A,D]=(0,o.useState)({desktop:!1,mobile:!1}),[F,_]=(0,o.useState)({desktop:!1,mobile:!1}),[S,E]=(0,o.useState)(null),[L,R]=(0,o.useState)(null),[P,V]=(0,o.useState)(!1),[T,z]=(0,o.useState)(a||{...{name:"",description:"",auditorium:"",dateStart:"",dateEnd:"",bannerPath:"/resources/v2/images/ticket_banner.jpg",longRoadBannerPath:"/resources/v2/images/ticket_banner.jpg",bannerIdPath:"default-banner-id",longRoadBannerIdPath:"default-banner-id",externalLink:"",concertType:"internal",isAvailable:!1,isComingSoon:!0,isSoldOut:!1,isLastTickets:!1,priority:!1,urlVideoMovile:"",seatPrices:[],seatSold:[],songs:[]},_id:"",isTest:!1,urlVideo:"",createdAt:new Date().toISOString()});(0,o.useEffect)(()=>{a&&(a.dateStart&&E(new Date(a.dateStart)),a.dateEnd&&R(new Date(a.dateEnd)))},[a]),(0,o.useEffect)(()=>{S&&z(e=>({...e,dateStart:S.toISOString()})),L&&z(e=>({...e,dateEnd:L.toISOString()}))},[S,L]),(0,o.useEffect)(()=>{(async()=>{try{w(!0);let e=await (0,m.X)();f(e.data)}catch(e){console.error("Error fetching auditoriums:",e),v("No se pudieron cargar los auditorios")}finally{w(!1)}})()},[]);let M=e=>{let{name:a,value:t,type:r}=e.target;if("checkbox"===r){let t=e.target.checked;"priority"===a&&t&&!T.priority?V(!0):z(e=>({...e,[a]:t}))}else z(e=>({...e,[a]:t}))},I=async e=>{if(V(!1),e){try{let e=await fetch("/api/concerts/reset-priority",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentConcertId:t?T._id:null})});if(e.ok){let a=await e.json();console.log("Prioridad reseteada en ".concat(a.affected," conciertos"))}else console.warn("No se pudo resetear la prioridad de otros conciertos")}catch(e){console.error("Error al resetear la prioridad:",e)}z(e=>({...e,priority:!0}))}},B=()=>{k.trim()&&(z(e=>({...e,songs:[...e.songs,k.trim()]})),C(""))},O=async e=>{if(e.preventDefault(),b(!0),v(""),!T.name.trim()){v("El nombre del c
1oncierto es obligatorio"),b(!1);return}if(!T.description.trim()){v("La descripci\xf3n del concierto es obligatoria"),b(!1);return}if(!T.auditorium){v("Debe seleccionar un auditorio"),b(!1);return}try{let e={...T,seatPrices:[]};await s(e),n.push("/dashboard/conciertos")}catch(e){console.error("Error submitting concert:",e),v(e instanceof Error?e.message:"No se pudo procesar el concierto. Int\xe9ntalo de nuevo m\xe1s tarde.")}finally{b(!1)}},q=e=>{let{value:a,onClick:t,label:s,placeholder:i}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-1",children:s}),(0,r.jsx)("div",{className:"relative",children:(0,r.jsxs)("button",{type:"button",onClick:t,className:"w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-[#D4AF37] flex items-center justify-between cursor-pointer",children:[(0,r.jsx)("span",{className:a?"text-white":"text-gray-400",children:a||i}),(0,r.jsx)("svg",{className:"w-5 h-5 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",clipRule:"evenodd"})})]})})]})},H=(e,a)=>{if(!e)return void D(e=>({...e,[a]:!1}));let t=[".mp4",".webm",".ogg",".mov",".avi",".wmv",".flv",".mkv"].some(a=>e.toLowerCase().endsWith(a)),r=e.includes("video")||e.includes("media")||e.includes("stream");D(e=>({...e,[a]:t||r}))};(0,o.useEffect)(()=>{H(T.urlVideo,"desktop")},[T.urlVideo]),(0,o.useEffect)(()=>{H(T.urlVideoMovile,"mobile")},[T.urlVideoMovile]);let U=e=>{_(a=>({...a,[e]:!1})),D(a=>({...a,[e]:!1}))},G=e=>{_(a=>({...a,[e]:!1}))};return(0,r.jsxs)("div",{className:"container mx-auto p-6",children:[(0,r.jsx)(i(),{id:p.__hash,children:p}),(0,r.jsx)(d.P.div,{className:"mb-6",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},children:(0,r.jsxs)(c(),{href:"/dashboard/conciertos",className:"text-[#D4AF37] hover:text-[#E5C158] flex items-center gap-2",children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Volver a Conciertos"]})}),P&&(0,r.jsx)("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50",children:(0,r.jsxs)(d.P.div,{className:"bg-gray-800 rounded-lg p-6 max-w-md w-full border border-gray-700 shadow-xl",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:[(0,r.jsx)("h3",{className:"text-xl font-bold text-white mb-4",children:"\xbfDestacar este concierto?"}),(0,r.jsx)("p",{className:"text-gray-300 mb-6",children:"Al marcar este concierto como destacado, cualquier otro concierto que est\xe9 destacado actualmente se desmarcar\xe1 autom\xe1ticamente. Solo puede haber un concierto destacado a la vez."}),(0,r.jsxs)("div",{className:"flex justify-end gap-3",children:[(0,r.jsx)("button",{type:"button",onClick:()=>I(!1),className:"px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-md transition",children:"Cancelar"}),(0,r.jsx)("button",{type:"button",onClick:()=>I(!0),className:"px-4 py-2 bg-[#D4AF37] hover:bg-[#E5C158] text-gray-900 rounded-md transition",children:"Confirmar"})]})]})}),(0,r.jsxs)(d.P.div,{className:"bg-gray-800 rounded-lg shadow border border-gray-700 p-6",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[(0,r.jsx)("h1",{className:"text-3xl font-bold text-white mb-6",children:t?"Editar Concierto":"A\xf1adir Nuevo Concierto"}),y&&(0,r.jsx)(d.P.div,{className:"mb-6 bg-red-900 border border-red-700 text-red-100 px-4 py-3 rounded relative",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3},children:(0,r.jsx)("span",{className:"block sm:inline",children:y})}),(0,r.jsxs)("form",{onSubmit:O,children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold text-[#D4AF37] border-b border-[#D4AF37]/30 pb-2",children:"Informaci\xf3n General"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-1",children:"Nombre del Concierto *"}),(0,r.jsx)("input",{type:"text",name:"name",value:T.name,onChange:M,required:!0,className:"w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-[#D4AF37]"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-1",children:"Descripci\xf3n"}),(0,r.jsx)("textarea",{name:"description",value:T.description,onChange:M,rows:4,className:"w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-[#D4AF37]"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-1",children:"Auditorio *"}),(0,r.jsxs)("select",{name:"auditorium",value:T.auditorium,onChange:M,required:!0,disabled:N,className:"w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-[#D4AF37]",children:[(0,r.jsx)("option",{value:"",children:"Selecciona un auditorio"}),j.map(e=>(0,r.jsxs)("option",{value:e._id,children:[e.name," - ",e.address]},e._id))]}),N&&(0,r.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Cargando auditorios..."})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsx)("div",{children:(0,r.jsx)(u.Ay,{selected:S,onChange:e=>E(e),showTimeSelect:!0,timeFormat:"hh:mm aa",timeIntervals:15,timeCaption:"Hora",dateFormat:"dd/MM/yyyy hh:mm aa",customInput:(0,r.jsx)(q,{label:"Fecha Inicio *",placeholder:"Seleccionar fecha y hora"}),locale:h.es,required:!0,className:"react-datepicker-wrapper",popperClassName:"react-datepicker-custom",wrapperClassName:"w-full",popperPlacement:"bottom-start",showPopperArrow:!1})}),(0,r.jsx)("div",{children:(0,r.jsx)(u.Ay,{selected:L,onChange:e=>R(e),showTimeSelect:!0,timeFormat:"hh:mm aa",timeIntervals:15,timeCaption:"Hora",dateFormat:"dd/MM/yyyy hh:mm aa",customInput:(0,r.jsx)(q,{label:"Fecha Fin *",placeholder:"Seleccionar fecha y hora"}),locale:h.es,required:!0,className:"react-datepicker-wrapper",popperClassName:"react-datepicker-custom",wrapperClassName:"w-full",popperPlacement:"bottom-start",showPopperArrow:!1,minDate:S||void 0})})]}),(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-[#D4AF37] mb-4",children:"Videos del Concierto"}),(0,r.jsxs)("div",{className:"space-y-5",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-1",children:"URL del Video (Escritorio)"}),(0,r.jsx)("input",{type:"url",name:"urlVideo",value:T.urlVideo,onChange:e=>{M(e),_(e=>({...e,desktop:!0}))},placeholder:"https://...",className:"w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-[#D4AF37]"}),(0,r.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"URL del video para reproducci\xf3n en dispositivos de escritorio (.mp4, .webm, etc)"}),T.urlVideo&&(0,r.jsxs)("div",{className:"mt-3",children:[F.desktop&&(0,r.jsx)("div",{className:"flex items-center justify-center h-20 bg-gray-800 rounded-md",children:(0,r.jsx)("p",{className:"text-gray-400 text-sm",children:"Cargando vista previa..."})}),A.desktop&&(0,r.jsxs)("div",{className:"mt-2 relative bg-gray-900 border border-gray-700 rounded-md overflow-hidden",children:[(0,r.jsx)("div",{className:"text-xs text-gray-400 absolute top-2 left-2 bg-black/50 px-2 py-1 rounded z-10",children:"Vista previa (Escritorio)"}),(0,r.jsx)("div",{className:"aspect-video",children:(0,r.jsx)("video",{src:T.urlVideo,controls:!0,onError:()=>U("desktop"),onLoadedData:()=>G("desktop"),className:"w-full h-full object-contain"})})]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-1",children:"URL del Video (M\xf3vil)"}),(0,r.jsx)("input",{type:"url",name:"urlVideoMovile",value:T.urlVideoMovile,onChange:e=>{M(e),_(e=>({...e,mobile:!0}))},placeholder:"https://...",className:"w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-[#D4AF37]"}),(0,r.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"URL del video optimizado para reproducci\xf3n en dispositivos m\xf3viles (.mp4, .webm, etc)"}),T.urlVideoMovile&&(0,r.jsxs)("div",{className:"mt-3",children:[F.mobile&&(0,r.jsx)("div",{className:"flex items-center justify-center h-20 bg-gray-800 rounded-md",children:(0,r.jsx)("p",{className:"text-gray-400 text-sm",children:"Cargando vista previa..."})}),A.mobile&&(0,r.jsxs)("div",{className:"mt-2 relative bg-gray-900 border border-gray-700 rounded-md overflow-hidden",children:[(0,r.jsx)("div",{className:"text-xs text-gray-400 absolute top-2 left-2 bg-black/50 px-2 py-1 rounded z-10",children:"Vista previa (M\xf3vil)"}),(0,r.jsx)("div",{className:"aspect-video",children:(0,r.jsx)("video",{src:T.urlVideoMovile,controls:!0,onError:()=>U("mobile"),onLoadedData:()=>G("mobile"),className:"w-full h-full object-contain"})})]})]})]})]})]})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold text-[#D4AF37] border-b border-[#D4AF37]/30 pb-2",children:"Configuraci\xf3n y Disponibilidad"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-1",children:"Enlace de compra de tickets"}),(0,r.jsx)("input",{type:"url",name:"externalLink",value:T.externalLink,onChange:M,placeholder:"https://...",className:"w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-[#D4AF37]"})]}),(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-[#D4AF37] mb-4",children:"Im\xe1genes del Concierto"}),(0,r.jsxs)("div",{className:"space-y-5",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-1",children:"URL de imagen banner (Card)"}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("input",{type:"url",name:"bannerPath",value:T.bannerPath,onChange:M,className:"w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-[#D4AF37]"}),(0,r.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Dimensiones recomendadas: 300px x 190px (Horizontal)"}),T.bannerPath&&(0,r.jsxs)("div",{className:"mt-2 relative bg-gray-900 border border-gray-700 rounded-md overflow-hidden",children:[(0,r.jsx)("div",{className:"text-xs text-gray-400 absolute top-2 left-2 bg-black/50 px-2 py-1 rounded",children:"Vista previa"}),(0,r.jsx)("div",{style:{maxWidth:"300px",height:"190px",margin:"0 auto",position:"relative"},className:"w-full",children:(0,r.jsx)(x.default,{src:T.bannerPath,alt:"Vista previa del banner",fill:!0,sizes:"300px",style:{objectFit:"cover"},onError:e=>{e.currentTarget.src="/resources/v2/images/ticket_banner.jpg",e.currentTarget.onerror=null}})})]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-1",children:"URL de banner vertical"}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("input",{type:"url",name:"longRoadBannerPath",value:T.longRoadBannerPath,onChange:M,className:"w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-[#D4AF37]"}),(0,r.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Dimensiones recomendadas: 1080px x 1728px (Relaci\xf3n 5:8 vertical)"}),T.longRoadBannerPath&&(0,r.jsxs)("div",{className:"mt-2 relative bg-gray-900 border border-gray-700 rounded-md overflow-hidden",children:[(0,r.jsx)("div",{className:"text-xs text-gray-400 absolute top-2 left-2 bg-black/50 px-2 py-1 rounded",children:"Vista previa"}),(0,r.jsx)("div",{className:"w-full flex justify-center p-4",children:(0,r.jsx)("div",{style:{width:"200px",height:"320px",position:"relative"},children:(0,r.jsx)(x.default,{src:T.longRoadBannerPath,alt:"Vista previa del banner vertical",fill:!0,sizes:"200px",style:{objectFit:"cover"},onError:e=>{e.currentTarget.src="/resources/v2/images/ticket_banner.jpg",e.currentTarget.onerror=null}})})})]})]})]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-1",children:"Tipo de Concierto"}),(0,r.jsxs)("select",{name:"concertType",value:T.concertType,onCh
1ange:M,className:"w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-[#D4AF37]",children:[(0,r.jsx)("option",{value:"internal",children:"Interno"}),(0,r.jsx)("option",{value:"external",children:"Externo"})]})]}),(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-[#D4AF37] mb-4",children:"Estado del Concierto"}),(0,r.jsxs)("div",{className:"mb-5 bg-gray-700/50 rounded-lg p-4 hover:bg-gray-700/80 transition-colors",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("input",{type:"checkbox",id:"isAvailable",name:"isAvailable",checked:T.isAvailable,onChange:e=>{e.target.checked?z({...T,isAvailable:!0}):z({...T,isAvailable:!1})},className:"h-5 w-5 text-[#D4AF37] focus:ring-[#D4AF37] bg-gray-700 border-gray-600 rounded"}),(0,r.jsxs)("label",{htmlFor:"isAvailable",className:"ml-2 flex items-center gap-2 text-white cursor-pointer",children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-green-400",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),"Disponible"]})]}),(0,r.jsx)("p",{className:"ml-7 text-xs text-gray-400 mt-1",children:"Mostrar al p\xfablico en la plataforma"})]}),(0,r.jsx)("div",{className:"border-t border-gray-700 pt-4 mb-3",children:(0,r.jsx)("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Estado de venta de entradas"})}),(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,r.jsxs)("div",{className:"bg-gray-700/50 rounded-lg p-4 hover:bg-gray-700/80 transition-colors",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("input",{type:"checkbox",id:"isComingSoon",name:"isComingSoon",checked:T.isComingSoon,onChange:e=>{e.target.checked?z({...T,isComingSoon:!0,isSoldOut:!1,isLastTickets:!1}):z({...T,isComingSoon:!1})},className:"h-5 w-5 text-[#D4AF37] focus:ring-[#D4AF37] bg-gray-700 border-gray-600 rounded"}),(0,r.jsxs)("label",{htmlFor:"isComingSoon",className:"ml-2 flex items-center gap-2 text-white cursor-pointer",children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-blue-400",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z",clipRule:"evenodd"})}),"Pr\xf3ximamente"]})]}),(0,r.jsx)("p",{className:"ml-7 text-xs text-gray-400 mt-1",children:"Marcar como evento futuro"})]}),(0,r.jsxs)("div",{className:"bg-gray-700/50 rounded-lg p-4 hover:bg-gray-700/80 transition-colors",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("input",{type:"checkbox",id:"isSoldOut",name:"isSoldOut",checked:T.isSoldOut,onChange:e=>{e.target.checked?z({...T,isComingSoon:!1,isSoldOut:!0,isLastTickets:!1}):z({...T,isSoldOut:!1})},className:"h-5 w-5 text-[#D4AF37] focus:ring-[#D4AF37] bg-gray-700 border-gray-600 rounded"}),(0,r.jsxs)("label",{htmlFor:"isSoldOut",className:"ml-2 flex items-center gap-2 text-white cursor-pointer",children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-red-400",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M13.477 14.89A6 6 0 015.11 6.524l8.367 8.368zm1.414-1.414L6.524 5.11a6 6 0 018.367 8.367zM18 10a8 8 0 11-16 0 8 8 0 0116 0z",clipRule:"evenodd"})}),"Agotado"]})]}),(0,r.jsx)("p",{className:"ml-7 text-xs text-gray-400 mt-1",children:"No hay boletos disponibles"})]}),(0,r.jsxs)("div",{className:"bg-gray-700/50 rounded-lg p-4 hover:bg-gray-700/80 transition-colors",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("input",{type:"checkbox",id:"isLastTickets",name:"isLastTickets",checked:T.isLastTickets,onChange:e=>{e.target.checked?z({...T,isComingSoon:!1,isSoldOut:!1,isLastTickets:!0}):z({...T,isLastTickets:!1})}
1,className:"h-5 w-5 text-[#D4AF37] focus:ring-[#D4AF37] bg-gray-700 border-gray-600 rounded"}),(0,r.jsxs)("label",{htmlFor:"isLastTickets",className:"ml-2 flex items-center gap-2 text-white cursor-pointer",children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-orange-400",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),"\xdaltimas entradas"]})]}),(0,r.jsx)("p",{className:"ml-7 text-xs text-gray-400 mt-1",children:"Quedan pocas boletas disponibles"})]})]}),(0,r.jsxs)("div",{className:"mt-5 bg-gray-700/50 rounded-lg p-4 hover:bg-gray-700/80 transition-colors col-span-1 sm:col-span-2",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("input",{type:"checkbox",id:"priority",name:"priority",checked:T.priority,onChange:M,className:"h-5 w-5 text-[#D4AF37] focus:ring-[#D4AF37] bg-gray-700 border-gray-600 rounded"}),(0,r.jsxs)("label",{htmlFor:"priority",className:"ml-2 flex items-center gap-2 text-white cursor-pointer",children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-[#D4AF37]",children:(0,r.jsx)("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})}),"Destacado (Evento Principal)"]})]}),(0,r.jsx)("p",{className:"ml-7 text-xs text-gray-400 mt-1",children:"Mostrar en banner principal. Solo puede haber un evento destacado a la vez."}),(0,r.jsx)("div",{className:"ml-7 mt-2 bg-amber-900/30 border border-amber-700/30 rounded-md p-3",children:(0,r.jsxs)("p",{className:"text-xs text-amber-200 flex items-start gap-2",children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,className:"h-4 w-4 flex-shrink-0 mt-0.5",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,r.jsx)("span",{children:"Al marcar este concierto como destacado, cualquier otro concierto que ya est\xe9 marcado como destacado dejar\xe1 de serlo autom\xe1ticamente. Esto se aplicar\xe1 inmediatamente en la base de datos."})]})})]})]})]})]}),(0,r.jsxs)("div",{className:"mt-8",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold text-[#D4AF37] border-b border-[#D4AF37]/30 pb-2 mb-4",children:"Canciones"}),(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,r.jsx)("input",{type:"text",value:k,onChange:e=>C(e.target.value),placeholder:"Nombre de la canci\xf3n",onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),B())},className:"flex-1 bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-white focus:outline-none focus:ring-2 focus:ring-[#D4AF37]"}),(0,r.jsx)(d.P.button,{type:"button",onClick:B,className:"px-4 py-2 bg-[#D4AF37] text-gray-900 rounded-md hover:bg-[#E5C158]",whileHover:{scale:1.05},whileTap:{scale:.95},children:"Agregar"})]}),T.songs.length>0?(0,r.jsx)("div",{className:"bg-gray-700 rounded-md p-3",children:(0,r.jsx)("ul",{className:"space-y-2",children:T.songs.map((e,a)=>(0,r.jsxs)("li",{className:"flex items-center justify-between bg-gray-800 p-2 rounded",children:[(0,r.jsx)("span",{className:"text-gray-200",children:e}),(0,r.jsx)("button",{type:"button",onClick:()=>(e=>{let a=[...T.songs];a.splice(e,1),z(e=>({...e,songs:a}))})(a),className:"text-gray-400 hover:text-red-500",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]},a))})}):(0,r.jsx)("p",{className:"text-gray-400 italic",children:"No hay canciones agregadas"})]}),(0,r.jsxs)("div",{className:"mt-8 flex justify-end gap-4",children:[(0,r.jsx)(c(),{href:"/dashboard/conciertos",className:"px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-md transition",children:"Cancelar"}),(0,r.jsx)(d.P.button,{type:"submit",disabled:g,className:"px-4 py-2 bg-[#D4AF37] hover:bg-[#
1E5C158] text-gray-900 rounded-md transition ".concat(g?"opacity-70 cursor-not-allowed":""),whileHover:{scale:1.02},whileTap:{scale:.98},children:g?"Guardando...":t?"Actualizar Concierto":"Guardar Concierto"})]})]})]})]})}}}]);

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.