1import{d as H,r as C,a,c as o,b as m,w as g,u as s,m as p,_ as B,t as l,i as c,F as R,f as E,p as F,v as L,q as N,e as w,j as f}from"./d74OVHi6.js";import{u as V}from"./CSVzbXGK.js";const O={key:0,class:"text-sm"},U=["aria-expanded"],j={key:0,class:"bg-orange-100 dark:bg-orange-900/40 text-orange-800 dark:text-orange-200 text-xs font-semibold px-1.5 py-0.5 rounded"},q={key:0,class:"mt-2 space-y-2 pl-5"},I={class:"font-medium"},z={key:0,class:"tabular-nums"},A={key:2,class:"text-gray-600 dark:text-gray-400"},G=["href"],J={key:1,class:"flex items-center gap-1 text-sm text-orange-700 dark:text-orange-400 font-medium"},K=H({__name:"RepresentationsExpand",props:{representations:{},countUpcoming:{},fallbackShowTime:{},initiallyExpanded:{type:Boolean}},setup(d){const r=d,u=C(!!r.initiallyExpanded),{formatRelativeDate:_,formatRepresentationDateShort:b,isUpcoming:S}=V(),v=f(()=>{const e=r.representations?.[0];if(!e)return"";const t=Math.floor(Date.now()/1e3),x=e.date_end&&e.date_end!==e.date_start&&e.date_start<=t&&t<=e.date_end+86399?t:e.date_start,n=b(x,{withTime:!1}),y=$(e.hour)??D(e.date_start);return y?`${n} ${y}`:n}),$=e=>{if(!e)return null;const t=e.match(/(\d{1,2})[:.](\d{2})/);return t?`${t[1].padStart(2,"0")}:${t[2]}`:null},D=e=>{const t=new Date(e*1e3);return t.getHours()===0&&t.getMinutes()===0?null:`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`},M=f(()=>r.fallbackShowTime?_(r.fallbackShowTime,{withTime:!0}):""),k=f(()=>{const e=r.countUpcoming??r.representations?.length??0;return Math.max(0,e-1)}),T=e=>{const t=_(e.date_start,{weekdayStyle:"long"});if(!e.date_end||e.date_end===e.date_start)return t;const i=_(e.date_end,{weekdayStyle:"long"});return`${t} â ${i}`},h=e=>{if(e.hour&&e.hour.trim())return e.hour.trim();const t=new Date(e.date_start*1e3);return t.getHours()===0&&t.getMinutes()===0?null:`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`};return(e,t)=>{const i=B,x=L;return d.representations&&d.representations.length>0?(a(),o("div",O,[m("button",{type:"button",class:"flex items-center gap-1 text-orange-700 dark:text-orange-400 font-medium hover:underline","aria-expanded":s(u),onClick:t[0]||(t[0]=g(n=>u.value=!s(u),["stop","prevent"]))},[p(i,{name:"mdi:clock-outline",class:"w-4 h-4 shrink-0"}),m("span",null,l(s(v)),1),s(k)>0?(a(),o("span",j,"+"+l(s(k)),1)):c("",!0),p(i,{name:s(u)?"mdi:chevron-up":"mdi:chevron-down",class:"w-4 h-4 shrink-0 opacity-70"},null,8,["name"])],8,U),s(u)?(a(),o("div",q,[(a(!0),o(R,null,E(r.representations??[],n=>(a(),o("div",{key:n.id,class:"text-gray-700 dark:text-gray-300 flex flex-wrap gap-x-2 gap-y-0.5 items-baseline"},[m("span",I,l(T(n)),1),h(n)?(a(),o("span",z,l(h(n)),1)):c("",!0),n.location_name&&n.location_url?(a(),F(x,{key:1,to:`/despre/${n.location_url}/`,class:"text-red-700 hover:text-red-800 dark:text-red-400 truncate",onClick:t[1]||(t[1]=g(()=>{},["stop"]))},{default:N(()=>[w(l(n.location_name),1)]),_:2},1032,["to"])):n.location_name?(a(),o("span",A,l(n.location_name),1)):c("",!0),n.ext_url?(a(),o("a",{key:3,href:n.ext_url,target:"_blank",rel:"nofollow noopener",class:"inline-flex items-center gap-0.5 text-xs text-blue-600 hover:text-blue-800 dark:text-blue-400",onClick:t[2]||(t[2]=g(()=>{},["stop"]))},[p(i,{name:"mdi:ticket-outline",class:"w-3.5 h-3.5"}),t[3]||(t[3]=w(" Bilete ",-1))],8,G)):c("",!0)]))),128))])):c("",!0)])):d.fallbackShowTime&&s(S)(d.fallbackShowTime)?(a(),o("div",J,[p(i,{name:"mdi:clock-outline",class:"w-4 h-4 shrink-0"}),m("span",null,l(s(M)),1)])):c("",!0)}}}),W=Object.assign(K,{__name:"RepresentationsExpand"});export{W as _};
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.