PageSourceSearch

https://www.emtpalma.es/static/js/640.244af55c.chunk.js

js emtpalma.es collected 2026-10-02 11:50:49 UTC 27,889 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkpalma_web=self.webpackChunkpalma_web||[]).push([[640],{49265:(e,n,l)=>{l.d(n,{A:()=>le});var i=l(89379),t=l(65043),o=l(40733),a=l(16855),s=l(61726),d=l(76476),r=l(79405),c=l(61082),u=l(98767),v=l(71676),p=l(62642),m=l(5137),h=l(1917),x=l(73216),f=l(43589),g=l(83372),b=(l(52420),l(70579));function j(){return(0,b.jsx)("div",{className:"skeleton-list",children:new Array(8).fill(null).map((e,n)=>(0,b.jsx)(g.A,{duration:.5},"item-list"+n))})}var y,I=l(84088);const _=["title","titleId"];function N(){return N=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var l=arguments[n];for(var i in l)({}).hasOwnProperty.call(l,i)&&(e[i]=l[i])}return e},N.apply(null,arguments)}function A(e,n){let{title:l,titleId:i}=e,o=function(e,n){if(null==e)return{};var l,i,t=function(e,n){if(null==e)return{};var l={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==n.indexOf(i))continue;l[i]=e[i]}return l}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)l=o[i],-1===n.indexOf(l)&&{}.propertyIsEnumerable.call(e,l)&&(t[l]=e[l])}return t}(e,_);return t.createElement("svg",N({xmlns:"http://www.w3.org/2000/svg",width:"48px",height:"48px",viewBox:"0 0 24 24",ref:n,"aria-labelledby":i},o),l?t.createElement("title",{id:i},l):null,y||(y=t.createElement("g",{fill:"none"},t.createElement("path",{d:"M24 0v24H0V0zM12.593 23.258l-.011.002-.071.035-.02.004-.014-.004-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01-.017.428.005.02.01.013.104.074.015.004.012-.004.104-.074.012-.016.004-.017-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113-.013.002-.185.093-.01.01-.003.011.018.43.005.012.008.007.201.093c.012.004.023 0 .029-.008l.004-.014-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014-.034.614c0 .012.007.02.017.024l.015-.002.201-.093.01-.008.004-.011.017-.43-.003-.012-.01-.01z"}),t.createElement("path",{fill:"#489ACAFF",d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m0 13a1 1 0 1 0 0 2 1 1 0 0 0 0-2m0-9a1 1 0 0 0-.993.883L11 7v6a1 1 0 0 0 1.993.117L13 13V7a1 1 0 0 0-1-1"}))))}const w=t.forwardRef(A);l.p;function C(e){var n;let{subLine:l,direction:o}=e;const[a]=(0,v._H)(),[s,d]=(0,t.useState)([]),c=(0,m.d4)(p.hf),[u,g]=(0,t.useState)([]),[y,I]=(0,t.useState)(!0),[_,N]=(0,t.useState)(null),A=(0,f.ok)(),w=(0,x.zy)(),C=(0,h.zS)(w),F=(0,f.WD)();let L=C.params[5];(0,t.useEffect)(()=>{(async e=>{try{I(!0);const n=await a({subLineId:e,language:A});if(null!==n&&void 0!==n&&n.isSuccess){const e=n.data;g(e),e.length>0&&(N(e[0]),d(e.map((e,n)=>{var l;return{txt:null===(l=e.dayTypeConfiguration)||void 0===l?void 0:l.description,value:n,selected:!1}})))}}catch(n){console.error("Error fetching schedule:",n)}finally{I(!1)}})((null===l||void 0===l?void 0:l.subLineId)||Number(L))},[l,L,null===o||void 0===o?void 0:o.tripId,A]);const O=(0,t.useMemo)(()=>{var e,n;const l=((null===_||void 0===_||null===(e=_.timeTables)||void 0===e||null===(n=e.filter(e=>Number(e.direction.code)===Number(null===o||void 0===o?void 0:o.directionId)))||void 0===n?void 0:n.flatMap(e=>e.trips))||[]).map(e=>{const n=c.find(n=>Number(n.stopCode)===Number(e.fromStopCode)),l=c.find(n=>Number(n.stopCode)===Number(e.toStopCode));return(0,i.A)((0,i.A)({},e),{},{stopFrom:n,stopTo:l})}),t=l.filter(e=>e.completeTrip),a=l.filter(e=>!e.completeTrip);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(S,{trips:t}),(0,b.jsx)(S,{trips:a,reforcements:!0}),(0,b.jsxs)("div",{className:"schedules-notes",children:[1===Number(null===o||void 0===o?void 0:o.directionId)&&(null===_||void 0===_?void 0:_.outgoingComment)&&(0,b.jsx)(E,{note:null===_||void 0===_?void 0:_.outgoingComment}),2===Number(null===o||void 0===o?void 0:o.directionId)&&(null===_||void 0===_?void 0:_.returnComment)&&(0,b.jsx)(E,{note:null===_||void 0===_?void 0:_.returnComment})]})]})},[_,o]);return(0,b.jsxs)(b.Fragment,{children:[y&&(0,b.jsx)("div",{className:"loading-schedules",children:(0,b.jsx)(j,{})}),!y&&(0,b.jsxs)("div",{className:"schedules-container",children:[((null===_||void 0===_?void 0:_.morningInterval)||(null===_||void 0===_?void 0:_.afternoonInterval))&&(0,b.jsxs)("div",{className:"frequency-box",children:[(null===_||void 0===_?void 0:_.morningInterval)&&(0,b.jsx)(k,{feq:null===_||void 0===_?void 0:_.morningInterval,type:"morning"}),(null===_||void 0===_?void 0:_.afternoonInterval)&&(0,b.jsx)(k,{feq:null===_||void 0===_?void 0:_.afternoonInterval,type:"afternoon"})]}),(null===_||void 0===_||null===(n=_.timeTables)||void 0===n?void 0:n.length)>0?(0,b.jsx)("div",{className:"top-stop-movil",children:(0,b.jsx)(r.A,{items:s,width:"100%",icon:null,onChange:e=>N(u[e]),style:{border:"none"}})}):(0,b.jsx)("div",{className:"no-schedules",children:(0,b.jsx)("span",{children:F("lb_lineas_no_hay_horarios_disponibles")})}),O]})]})}const S=e=>{let{trips:n,reforcements:l}=e;const i=(0,f.WD)();return(0,b.jsxs)(b.Fragment,{children:[n.some(e=>!e.completeTrip)&&(0,b.jsx)("div",{className:"schedules-reinforcements",children:(0,b.jsx)("h4",{children:i("lb_salida_refuerzo_desde")})}),n.map((e,n)=>{var t,o;return(0,b.jsxs)("div",{className:"schedules-box",children:[(0,b.jsxs)("div",{className:"schedules-header",children:[e.fromStopCode&&(0,b.jsxs)("div",{className:"title",children:[(0,b.jsx)("span",{children:i(l?"lb__desde":"lb_desde")}),(0,b.jsx)(u.A,{text:e.fromStopCode,transportMode:"1",styles:{cursor:"auto",maxHeight:"18px",minHeight:"18px",height:"18px",padding:"0px 5px",borderRadius:"5px",fontSize:"14px"}}),(0,b.jsx)("h4",{children:null===(t=e.stopFrom)||void 0===t?void 0:t.name})]}),e.toStopCode&&(0,b.jsxs)("div",{className:"title",children:[(0,b.jsx)("h4",{children:i("lb_a")}),(0,b.jsx)(u.A,{text:e.toStopCode,transportMode:"1",styles:{cursor:"auto",maxHeight:"18px",minHeight:"18px",height:"18px",padding:"0px 5px",borderRadius:"5px",fontSize:"14px"}}),(0,b.jsx)("h4",{children:null===(o=e.stopTo)||void 0===o?void 0:o.name})]})]}),(0,b.jsx)("div",{className:"box-schedules",children:e.departureTimes.map((e,n)=>(0,b.jsx)("span",{className:"schedule-item",children:e},n))})]},n)})]})},k=e=>{let{feq:n,type:l}=e;const i=(0,f.ok)(),t=(0,f.WD)(),o="morning"===l;return(0,b.jsx)("span",{className:"frequency ".concat(o?"feq-morning":"feq-afternoon"),children:"en"===i?"Every ".concat(n," min ").concat(o?"(AM)":"(PM)"):"".concat(t(o?"lb_frecuencia_manana":"lb_frecuencia_tarde")," ").concat(n,'"')})},E=e=>{let{note:n}=e;const l=(0,f.WD)();return(0,b.jsxs)("article",{className:"schedule-note",children:[(0,b.jsxs)("div",{className:"top",children:[(0,b.jsx)(I.A,{Icon:w}),(0,b.jsx)("h5",{children:l("lb_nota")})]}),(0,b.jsx)("p",{children:n})]})};var F=l(76155),L=(l(64158),l(92763));function O(e){let{stopName:n,lines:l,color:i,id:t,stopCode:o,time:a,transportMode:d,onClick:r,selected:c}=e;const{getLineInfo:v}=(0,L.A)();return(0,b.jsx)("li",{className:c?"itemStop selectedStop":"itemStop",children:(0,b.jsxs)("div",{className:"item-stop-wrapper ".concat(c?"--selected":""),children:[(0,b.jsxs)("div",{className:"itemStop_header",children:[(0,b.jsx)("div",{children:(0,b.jsx)(u.A,{text:o,styles:{minWidth:"58px",maxWidth:"58px",marginRight:"5px"},transportMode:d,onClick:r,warning:!1})}),(0,b.jsx)("div",{className:"itemStop_label_circle",style:{outlineColor:"#"+i,outlineWidth:"4px",outlineStyle:"solid"}}),(0,b.jsx)("p",{className:"itemStop_label",onClick:r,children:n})]}),a&&!1,(0,b.jsx)("div",{className:"itemStop_list",children:null===l||void 0===l?void 0:l.map(e=>(0,b.jsx)(s.A,{name:e.name,code:e.code,routeColor:e.routeColor,routeTextColor:e.routeTextColor,onClick:()=>v(e),warning:!1},"bli_"+e.code))})]})},"listItemStop_"+t)}var M=l(29196),H=l(10391),P=l(2237),T=l(1206),z=l(26948);function D(e){var n;const{stops:l,loading:i}=e,o=(0,m.wA)(),a=(0,f.ok)(),[s,d]=(0,t.useState)(i),r=(0,m.d4)(p.fT),c=(0,x.zy)(),u="".concat(c.pathname.split("/")[2],"/"),v=(0,m.d4)(T.QL),g=(0,m.d4)(M.YP),y=e=>{window.matchMedia("(max-width: 768px)").matches&&(0,h.F1)(),e.id===(null===r||void 0===r?void 0:r.id)?(o(z.Ae.actions.updateMarkerRef(null)),o((0,p.j9)(null))):o((0,p.j9)(e))};return(0,t.useEffect)(()=>
1{if(r){const e=r;o((0,p.j9)(null)),setTimeout(()=>{o((0,p.j9)(e))},50)}},[v]),(0,t.useEffect)(()=>()=>{u!==P.k$.lines[a]&&(o((0,H.cZ)("")),o((0,M.ve)([])),o((0,H.h9)([])),o((0,H.pH)([])))},[null===(n=e.direction)||void 0===n?void 0:n.tripId,g]),(0,t.useEffect)(()=>{d(i)},[i]),(0,t.useEffect)(()=>()=>{u!==P.k$.lines[a]&&(o((0,H.cZ)("")),o((0,M.ve)([])),o((0,H.h9)([])),o((0,H.pH)([])))},[]),(0,b.jsxs)(b.Fragment,{children:[s&&(0,b.jsx)("div",{className:"loading-contenido-linea",children:(0,b.jsx)(j,{})}),!s&&l.length>0&&(0,b.jsx)("ul",{className:"contenidoInfoLinea",style:{background:"linear-gradient(to bottom, #f3f4f6 23px, transparent 23px),linear-gradient(to top, #f3f4f6 45px, transparent 36px), linear-gradient(to right, transparent 0px, transparent 95px, ".concat("#"+e.line.routeColor," 45px, ").concat("#"+e.line.routeColor," 103px, transparent 0px)"),zIndex:"10",margin:"2px 2px 2px 12px"},children:null===l||void 0===l?void 0:l.map((n,l)=>(0,b.jsx)(O,{id:n.id,stopName:n.stopName,color:e.line.routeColor,lines:n.lines,stopCode:null===n||void 0===n?void 0:n.stopCode,time:"09:31",selected:n.id===(null===r||void 0===r?void 0:r.id),transportMode:n.stopTransportMode,onClick:()=>y(n)},l))})]})}var B=l(13472),W=l(44084),R=l(23994),V=l(46806),q=l(89892),Z=l(75040);function $(e){var n;let{line:l}=e;const[i]=(0,V.Pk)(),[o,a]=(0,t.useState)([]),[s,d]=(0,t.useState)(!0),r=(0,x.Zp)(),[c]=(0,Z.A)(),u=(0,f.ok)(),v=(0,f.WD)();return(0,t.useEffect)(()=>{d(!0),i({language:u}).then(e=>{if(e.isSuccess){const n=e.data.filter(e=>e.lineas.find(e=>e.idLinea===l.id));a(n)}}).finally(()=>d(!1))},[l]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"loading-line-warnings",children:s&&(0,b.jsx)(j,{})}),(0,b.jsx)("div",{className:"box-line-warnings",children:!s&&(0===(null===(n=(0,h.PJ)(o))||void 0===n?void 0:n.length)?(0,b.jsx)("div",{className:"box-line-warnings__no-alerts",children:(0,b.jsx)("h4",{children:v("lb_no_hay_avisos")})}):(0,h.PJ)(o).map(e=>(0,b.jsx)(q.A,{alert:e,onClick:()=>r(c(P.k$.notices,"ADVICE",(0,h.aJ)(String(e.idAlerta)))),favorites:void 0},e.alertStopId)))})]})}var X=l(84790),Y=l(44363),J=l(16154),K=l(7792),Q=l(76495),G=l(38687),U=l(57630);function ee(e){let{setSurveySelected:n}=e;const l=(0,f.WD)(),i=(0,m.d4)(G.Vo).allSurveys,t=(0,m.d4)(M.h$),{handleOpinionResource:o}=(0,U.A)();return(0,b.jsx)(b.Fragment,{children:i.find(e=>(3===e.ambitoId||e.lineId===(null===t||void 0===t?void 0:t.id))&&e.isAllowedToAnswer)?(0,b.jsx)("div",{className:"line-opinion",children:(0,b.jsx)(K.A,{icon:Q.h,text:l("lb_opinion"),onClick:()=>o(3,null===t||void 0===t?void 0:t.id,n),selected:!1})}):null})}var ne=l(57783);function le(e){const n=(0,m.wA)(),l=(0,x.Zp)(),[u]=(0,Z.A)(),g=(0,m.d4)(M.bT),j=(0,m.d4)(M.fD),y=(0,m.d4)(M.h$),I=(0,m.d4)(M.Cm),_=(0,m.d4)(M.YP),{isFavorite:N,deleteFavorites:A,saveFavorites:w}=(0,W.r)(),[S,k]=(0,t.useState)(0),[E,O]=(0,t.useState)(!1),z=(0,m.d4)(T.B_),[V,q]=(0,t.useState)(!1),[K,Q]=(0,t.useState)(!1),G=(0,x.zy)(),U=(0,h.zS)(G),[le,ie]=(0,t.useState)([]),[te,oe]=(0,t.useState)([]),ae=(0,m.d4)(p.fT);let se=U.params[5];const de=(0,f.WD)(),[re,ce]=(0,t.useState)([]),{getStopsAndShape:ue,getAllIntineraries:ve,getStops:pe}=(0,L.A)(),[me]=(0,v.Ge)(),[he]=(0,v.VE)(),{isAlert:xe}=(0,X.Z)(),fe=(0,m.d4)(M.yc),ge=(0,m.d4)(M.oy),{logEventAnalytics:be}=(0,J.A)(),[je,ye]=(0,t.useState)(null);(0,t.useEffect)(()=>{y&&be("line_selected",{code:null===y||void 0===y?void 0:y.code})},[y]);const Ie=[{label:de("lb_lineas_tab_linea"),content:(0,b.jsx)(D,{line:y,stops:le,allItineraries:e.allItineraries,direction:I,loading:E,onBack:()=>e.onBack()}),onClick:()=>k(0)},{label:de("lb_lineas_tab_horarios"),content:(0,b.jsx)(C,{subLine:j,direction:I}),onClick:()=>{be("line_selected_schedule",{code:null===y||void 0===y?void 0:y.code}),k(1)}},{label:de("lb_lineas_tab_avisos"),content:(0,b.jsx)($,{line:y}),alert:xe("line",y.id),onClick:()=>{be("line_selected_advices",{code:null===y||void 0===y?void 0:y.code}),k(2)}}],_e=e=>{setTimeout(()=>{(0,h.F1)(),n((0,p.j9)(e))},50)},Ne=async(e,l)=>{e&&await me(e).then(l=>{if(l.data)if(l.data.length){const t=l.data.find(e=>Number(e.directionId)===Number(null===I||void 0===I?void 0:I.directionId)),o=t?(0,i.A)((0,i.A)({},t),{},{subLineId:e}):(0,i.A)((0,i.A)({},l.data[0]),{},{subLineId:e});n((0,M.Kg)(o)),n((0,M.Y_)(l.data))}else n((0,B.ul)({message:de("lb_msj_error_generico"),type:"error"}))})},Ae=()=>{const e=null===ae||void 0===ae?void 0:ae.id,l=null===ge||void 0===ge?void 0:ge.findIndex(n=>Number(null===n||void 0===n?void 0:n.id)===Number(e));var t=[...ge];t[l]=(0,i.A)((0,i.A)({},t[l]),{},{popUp:!0,selected:!0});try{if(null!==ge&&void 0!==ge&&ge.length&&-1!==l){var o,a,s,d,r,c,u,v;const e=(0,i.A)({},t[l]),p=Y.A.getMidPoint({longitude:null===e||void 0===e||null===(o=e.position)||void 0===o?void 0:o.lng,latitude:null===e||void 0===e||null===(a=e.position)||void 0===a?void 0:a.lat},{longitude:null===e||void 0===e||null===(s=e.position)||void 0===s?void 0:s.lng,latitude:null===e||void 0===e||null===(d=e.position)||void 0===d?void 0:d.lat});(async(e,l,i)=>{try{e.length&&(n((0,H.h9)(e)),n((0,H.jQ)({coords:l,zoom:i})))}catch(t){return t}finally{n((0,B.p9)(!1))}})(t,p,Y.A.getMidZoom({longitude:null===e||void 0===e||null===(r=e.position)||void 0===r?void 0:r.lng,latitude:null===e||void 0===e||null===(c=e.position)||void 0===c?void 0:c.lat},{longitude:null===e||void 0===e||null===(u=e.position)||void 0===u?void 0:u.lng,latitude:null===e||void 0===e||null===(v=e.position)||void 0===v?void 0:v.lat}))}}catch(p){return p}};return(0,t.useEffect)(()=>{y||l(u(P.k$.lines));const e=document.getElementById("panelRecurso");return null===e||void 0===e||e.classList.add("pnael-line-screen"),()=>{const e=document.getElementById("panelRecurso");null===e||void 0===e||e.classList.remove("pnael-line-screen"),y||l(u(P.k$.lines)),n((0,M.bI)(null)),n((0,M.ve)([])),n((0,H.h9)([])),n((0,H.vX)([])),n((0,H.cZ)("")),n((0,H.pH)([]))}},[]),(0,t.useEffect)(()=>{ae&&Ae(),ae||ge.length&&n((0,H.h9)(ge))},[ae]),(0,t.useEffect)(()=>{O(!0),g&&(async()=>{try{O(!0);const{stopsInfo:e}=await pe(y,I,_e,()=>n((0,p.j9)(null)));e&&ie(e)}catch(e){console.error("Error obteniendo paradas:",e)}finally{O(!1)}})()},[null===I||void 0===I?void 0:I.tripId,_]),(0,t.useEffect)(()=>{N("lines",y.id)},[z]),(0,t.useEffect)(()=>{const e=document.getElementById("panelRecurso");null===e||void 0===e||e.classList.add("pnael-line-screen"),0===(null===_||void 0===_?void 0:_.length)?(async e=>{await he(e).then(async e=>{let l;return e.data&&e.data.length&&(l=e.data,n((0,M.br)(e.data)),n((0,M.HY)(e.data[0]))),l}).then(async e=>{(null===e||void 0===e?void 0:e.length)>0&&await Ne(e[0].subLineId,null)})})(null===y||void 0===y?void 0:y.id):(e=>{try{var n;(0,B.p9)(!0);const l=(null===j||void 0===j?void 0:j.subLineId)||se||(null===(n=e[0])||void 0===n?void 0:n.subLineId),i=e.map(e=>({txt:e.longName,subLineId:e.subLineId,value:e,selected:String(e.subLineId)===String(l)}
1));ce(i)}catch(l){console.error("Error formateando subl\xedneas:",l)}finally{(0,B.p9)(!1)}})(_)},[_,null===j||void 0===j?void 0:j.subLineId]),(0,t.useEffect)(()=>{(async()=>{(0,B.p9)(!0);const{stopsInfo:e,shapes:l}=await ue(y,I,_e,()=>n((0,p.j9)(null))).catch(e=>e).finally(()=>O(!1));n((0,H.vX)([])),e&&ie(e),oe(l)})(),g&&(async()=>{(0,B.p9)(!0);const{shapes:e}=await ve().catch(e=>e).finally(()=>O(!1));n((0,H.vX)([])),oe(e),await pe(y,I,_e,()=>n((0,p.j9)(null))).catch(e=>e).finally(()=>O(!1))})(),n((0,p.j9)(null))},[g,null===I||void 0===I?void 0:I.tripId]),(0,t.useEffect)(()=>{n((0,H.vX)(te))},[te]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c.A,{title:de("lb_lineas_detalle_linea"),back:()=>e.onBack()}),(0,b.jsxs)(d.A,{style:{marginBottom:"10px"},children:[(0,b.jsxs)("div",{className:"card-line-favorite",children:[(0,b.jsx)(s.A,{code:y.code,name:y.name,routeTextColor:y.routeTextColor,routeColor:y.routeColor,lineId:y.id,styles:{cursor:"auto",height:"22px"}}),(0,b.jsx)("div",{className:"line-name",children:y.name}),(0,b.jsx)(ee,{setSurveySelected:ye}),(0,b.jsx)(o.A,{filled:N("lines",y.id),onClick:()=>{N("lines",y.id)?q(!0):Q(!0)}})]}),(0,b.jsxs)("div",{className:"card-select-favorite",children:[(0,b.jsx)(r.A,{items:re,selected:function(){let e=re.findIndex(e=>null===e||void 0===e?void 0:e.selected);return-1!==e?e:void 0}(),onChange:e=>{(async e=>{se=null,n((0,M.HY)(e)),await Ne(null===e||void 0===e?void 0:e.subLineId,null),be("line_change_subline",{code:null===y||void 0===y?void 0:y.code,subline:null===e||void 0===e?void 0:e.longName,subLineId:null===e||void 0===e?void 0:e.subLineId,directionId:null===I||void 0===I?void 0:I.directionId})})(e)}}),(0,b.jsx)(a.A,{disabled:fe.length<2,onClick:()=>(async()=>{const e=fe.find(e=>e.tripId!==I.tripId);n((0,M.Kg)(e)),be("line_change_sentido",{code:null===y||void 0===y?void 0:y.code,directionId:null===e||void 0===e?void 0:e.directionId,sublineId:null===j||void 0===j?void 0:j.subLineId,subline:null===j||void 0===j?void 0:j.longName})})(),direction:null===I||void 0===I?void 0:I.directionId})]})]}),(0,b.jsxs)("div",{className:"line-detail-box",children:[(0,b.jsx)(F.A,{options:Ie,selected:S,background:"#FFF",style:{marginBottom:"20px"}}),(0,b.jsx)("div",{className:"line-detail-wrapper",children:Ie[S].content})]}),V&&(0,b.jsx)(R.A,{title:"\xbf".concat(de("lb_favorites_seguro_eliminar_line"),' "').concat(y.name,'"?'),onClose:()=>q(!1),onAccept:()=>A("lines",[y.id],()=>q(!1))}),K&&(0,b.jsx)(R.A,{title:de("lb_favorites_guardar_linea_interrogante"),text:de("lb_favorites_guardar_linea_main"),onClose:()=>Q(!1),onAccept:()=>w("lines",[y],()=>Q(!1))}),je?(0,b.jsx)(ne.A,{survey:je,lineId:null===y||void 0===y?void 0:y.id,sublineId:null===j||void 0===j?void 0:j.subLineId,routeId:I.tripId,onClose:()=>ye(null)}):null]})}},54832:(e,n,l)=>{l.d(n,{A:()=>s});var i=l(26183),t=l(43589),o=l(5137),a=l(13472);function s(){const[e]=(0,i.oN)(),[n]=(0,i.dX)(),l=(0,t.ok)(),s=(0,o.wA)(),d=(0,t.WD)();return{downloadFaqFile:async function(n){const l=await e(n);if(null!==l){const e=document.createElement("a"),n=null===l||void 0===l?void 0:l.data;e.href=n,e.setAttribute("download","Faq archivo"),document.body.appendChild(e),e.click()}},downloadFileByAlert:async function(e){let{language:i,alertId:t,fileId:o}=e;const r=i||l,c=await n({language:r,alertId:t,fileId:o});if(null!==c&&void 0!==c&&c.isSuccess){const e=document.createElement("a"),n=null===c||void 0===c?void 0:c.data,l=null===n||void 0===n?void 0:n.split("/").pop();e.href=n,e.setAttribute("download",l),document.body.appendChild(e),e.click(),document.body.removeChild(e)}else s((0,a.ul)({message:d("lb_msj_error_generico"),type:"error"}))}}}},71821:(e,n,l)=>{l.d(n,{h:()=>d});var i,t=l(65043);const o=["title","titleId"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var l=arguments[n];for(var i in l)({}).hasOwnProperty.call(l,i)&&(e[i]=l[i])}return e},a.apply(null,arguments)}function s(e,n){let{title:l,titleId:s}=e,d=function(e,n){if(null==e)return{};var l,i,t=function(e,n){if(null==e)return{};var l={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==n.indexOf(i))continue;l[i]=e[i]}return l}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)l=o[i],-1===n.indexOf(l)&&{}.propertyIsEnumerable.call(e,l)&&(t[l]=e[l])}return t}(e,o);return t.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:n,"aria-labelledby":s},d),l?t.createElement("title",{id:s},l):null,i||(i=t.createElement("g",{fill:"none",fillRule:"evenodd"},t.createElement("path",{d:"M24 0v24H0V0zM12.594 23.258l-.012.002-.071.035-.02.004-.014-.004-.071-.036c-.01-.003-.019 0-.024.006l-.004.01-.017.428.005.02.01.013.104.074.015.004.012-.004.104-.074.012-.016.004-.017-.017-.427c-.002-.01-.009-.017-.016-.018m.264-.113-.014.002-.184.093-.01.01-.003.011.018.43.005.012.008.008.201.092c.012.004.023 0 .029-.008l.004-.014-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014-.034.614c0 .012.007.02.017.024l.015-.002.201-.093.01-.008.003-.011.018-.43-.003-.012-.01-.01z"}),t.createElement("path",{fill:"#455455FF",d:"M16 3a1 1 0 0 1 1 1v1h2a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2V4a1 1 0 0 1 2 0v1h6V4a1 1 0 0 1 1-1M8.01 16H8a1 1 0 0 0-.117 1.993L8.01 18a1 1 0 1 0 0-2m4 0H12a1 1 0 0 0-.117 1.993l.127.007a1 1 0 1 0 0-2m4 0H16a1 1 0 0 0-.117 1.993l.127.007a1 1 0 1 0 0-2m-8-4H8a1 1 0 0 0-.117 1.993L8.01 14a1 1 0 1 0 0-2m4 0H12a1 1 0 0 0-.117 1.993l.127.007a1 1 0 1 0 0-2m4 0H16a1 1 0 0 0-.117 1.993l.127.007a1 1 0 1 0 0-2M19 7H5v2h14z"}))))}const d=t.forwardRef(s);l.p},76155:(e,n,l)=>{l.d(n,{A:()=>d});var i=l(89379),t=l(85352),o=l(84088),a=l(7802),s=l(70579);function d(e){let{options:n,selected:l,background:d,style:r}=e;const c=(0,t.DP)();return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"tab",style:(0,i.A)({background:null!==d&&void 0!==d?d:c.colors.secondaryBackgroun
1d},r),children:n.map((e,n)=>{var i;return(0,s.jsxs)("div",{className:"tab_option ".concat(n===l&&"tab_option-selected"),onClick:()=>e.onClick(),children:[(0,s.jsx)("span",{children:e.label}),e.alert&&(0,s.jsx)(o.A,{Icon:a.h,className:"tab-option-alert-warning"})]},"tabLabel"+(null!==(i=e.id)&&void 0!==i?i:n))})})})}},83187:(e,n,l)=>{l.d(n,{h:()=>d});var i,t=l(65043);const o=["title","titleId"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var l=arguments[n];for(var i in l)({}).hasOwnProperty.call(l,i)&&(e[i]=l[i])}return e},a.apply(null,arguments)}function s(e,n){let{title:l,titleId:s}=e,d=function(e,n){if(null==e)return{};var l,i,t=function(e,n){if(null==e)return{};var l={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==n.indexOf(i))continue;l[i]=e[i]}return l}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)l=o[i],-1===n.indexOf(l)&&{}.propertyIsEnumerable.call(e,l)&&(t[l]=e[l])}return t}(e,o);return t.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",ref:n,"aria-labelledby":s},d),l?t.createElement("title",{id:s},l):null,i||(i=t.createElement("g",{fill:"none"},t.createElement("path",{d:"M24 0v24H0V0zM12.593 23.258l-.011.002-.071.035-.02.004-.014-.004-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01-.017.428.005.02.01.013.104.074.015.004.012-.004.104-.074.012-.016.004-.017-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113-.013.002-.185.093-.01.01-.003.011.018.43.005.012.008.007.201.093c.012.004.023 0 .029-.008l.004-.014-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014-.034.614c0 .012.007.02.017.024l.015-.002.201-.093.01-.008.004-.011.017-.43-.003-.012-.01-.01z"}),t.createElement("path",{fill:"#455455FF",d:"M16 3a1 1 0 0 1 1 1v1h2a2 2 0 0 1 1.995 1.85L21 7v12a2 2 0 0 1-1.85 1.995L19 21H5a2 2 0 0 1-1.995-1.85L3 19V7a2 2 0 0 1 1.85-1.995L5 5h2V4a1 1 0 0 1 2 0v1h6V4a1 1 0 0 1 1-1m-1.176 6.379-4.242 4.242-1.415-1.414a1 1 0 0 0-1.414 1.414l2.114 2.115a1.01 1.01 0 0 0 1.429 0l4.942-4.943a1 1 0 1 0-1.414-1.414"}))))}const d=t.forwardRef(s);l.p},89892:(e,n,l)=>{l.d(n,{A:()=>N});var i=l(65043),t=l(61726),o=l(98767),a=l(7802),s=l(71821),d=l(83187),r=l(13938),c=l(31629),u=l(71776),v=l(15763),p=l(54832),m=l(84088),h=l(62642),x=l(29196),f=l(5137),g=l(23994),b=l(84790),j=l(59188),y=l(43589),I=l(92763),_=l(70579);function N(e){var n,l,N,A,w,C,S,k,E;let{alert:F,onClick:L,favorites:O,onlyInfo:M=!1,stateOpen:H=!0}=e;const P=null===F||void 0===F||null===(n=F.paradas)||void 0===n?void 0:n.map(e=>e.idParada),T=null===F||void 0===F||null===(l=F.lineas)||void 0===l?void 0:l.map(e=>e.idLinea),z=(0,f.d4)(h.hf),D=(0,f.d4)(x.kD),B=z.filter(e=>P.includes(e.id)),W=D.filter(e=>T.includes(e.id)),[R,V]=(0,i.useState)(!1),{handleDelete:q}=(0,b.Z)(),[Z,$]=(0,i.useState)(H),X=(0,y.WD)(),Y=e=>{const n=null===e||void 0===e?void 0:e.split(" "),l=n[0],i=n[1];return"".concat(l,", ").concat(i)},{downloadFaqFile:J}=(0,p.A)(),K="#".concat(null===(N=F.priority)||void 0===N?void 0:N.iconColor),Q={"--warning-icon-color":K},G="#".concat(null===(A=F.priority)||void 0===A?void 0:A.backgroundColor),{getLineInfo:U,gotToPasoPorParada:ee}=(0,I.A)();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("article",{className:"item-avisos-container",style:{border:"2px solid #".concat(null===(w=F.priority)||void 0===w?void 0:w.iconColor),background:G},onClick:L,children:[(0,_.jsxs)("div",{className:"alert-message",children:[(0,_.jsxs)("div",{className:"alert-message-title-and-icon",children:[(0,_.jsx)("div",{className:"alert-warning-icon",children:(0,_.jsx)(m.A,{ariaLabel:"time",Icon:a.h,style:Q})}),(0,_.jsx)("h2",{className:"alert-warning",style:{color:K},children:F.titulo||X("lb_avisos")})]}),!Z&&M?(0,_.jsx)(m.A,{onClick:()=>$(!Z),Icon:Z?v.h:u.h}):(0,_.jsx)(_.Fragment,{})]}),Z?(0,_.jsx)("div",{className:"item-avisos-list",children:(0,_.jsxs)("div",{className:"alert-container",children:[B.length||W.length?(0,_.jsxs)("div",{className:"lines",children:[W.map((e,n)=>(0,_.jsx)(t.A,{onClick:n=>{U(e),n.stopPropagation()},code:null===e||void 0===e?void 0:e.code,routeColor:null===e||void 0===e?void 0:e.routeColor,styles:{cursor:"pointer",maxHeight:"18px",minHeight:"18px",height:"18px",minWidth:"25px",maxWidth:"30px",padding:"0px 2px",fontSize:"14px"}},"lineCode-".concat(n,"-").concat(Number(F.id)))),null===B||void 0===B?void 0:B.map((e,n)=>(0,_.jsx)(o.A,{onClick:n=>{ee(e),n.stopPropagation()},text:null===e||void 0===e?void 0:e.stopCode,transportMode:null===e||void 0===e?void 0:e.transportMode,styles:{cursor:"pointer",maxHeight:"20px",minHeight:"20px",height:"20px",padding:"0px 5px",borderRadius:"5px",fontSize:"14px"}},"codeStop-".concat(n,"-").concat(Number(F.id))))]}):(0,_.jsx)(_.Fragment,{}),(null===(C=F.fechas[0])||void 0===C?void 0:C.horaInicio)&&(0,_.jsxs)("span",{className:"alert-date",style:{margin:"5px 0px"},children:[(0,_.jsx)(m.A,{ariaLabel:"time",Icon:s.h,className:"alert-date-img"}),(0,_.jsx)("p",{className:"alert-date-text",children:"".concat(X("lb_desde_el")," ").concat(Y(F.fechas[0].horaInicio))})]}),(null===(S=F.fechas[0])||void 0===S?void 0:S.horaFin)&&(0,_.jsxs)("span",{className:"alert-date",style:{margin:"5px 0px"},children:[(0,_.jsx)(m.A,{ariaLabel:"time",Icon:d.h,className:"alert-date-img"}),(0,_.jsx)("p",{className:"alert-date-text",children:"".concat(X("lb_hasta_el")," ").concat(Y(null===(k=F.fechas[0])||void 0===k?void 0:k.horaFin)," (aprox.)")})]}),F.descripcion&&M?(0,_.jsxs)("span",{className:"alert-date ",style:{margin:"5px 0px"},children:[(0,_.jsx)(m.A,{ariaLabel:"time",Icon:a.h,className:"alert-date-img"}),(0,_.jsx)("p",{className:"alert-date-text",children:F.descripcion})]}):(0,_.jsx)(_.Fragment,{})]})}):(0,_.jsx)(_.Fragment,{}),M?(0,_.jsx)(_.Fragment,{children:Z?(0,_.jsxs)("div",{className:"actions-onlyinfo",children:[(0,_.jsx)("div",{className:"download-action",children:(null===F||void 0===F||null===(E=F.files)||void 0===E?void 0:E.length)>0&&(null===F||void 0===F?void 0:F.files.map((e,n)=>(0,_.jsxs)("div",{className:"file-download-box",children:[(0,_.jsx)(m.A,{Icon:c.h}),(0,_.jsx)("span",{style:{textDecoration:"underline"},onClick:()=>J(e),children:X("lb_avisos_descargar")})]},"alert-file-".concat(n))))}),(0,_.jsx)(j.A,{onClick:()=>$(!Z),icon:Z?v.h:u.h,background:"transparent",style:{marginTop:"auto"}})]}):(0,_.jsx)(_.Fragment,{})}):(0,_.jsxs)("div",{className:"actions",children:[(0,_.jsx)("span",{style:{textDecoration:"underline"},children:X("lb_avisos_ampliar")}),(0,_.jsx)(m.A,{Icon:r.h})]})]}),R&&(0,_.jsx)(g.A,{onClose:()=>V(!1),onAccept:()=>q(F,()=>V(!1)),title:'Esta acci\xf3n eliminar\xe1 la l\xednea/parada de la lista de "Favoritos" y "Alertas/Mis avisos" \xbfDesea continuar?'})]})}}}]);
2//# sourceMappingURL=640.244af55c.chunk.js.map

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.