1/*! licenses: /LICENSE.txt */ 2import{A as e,J as t,L as n,M as r,O as i,a,c as o,et as s,g as c,k as l,l as u,m as d,o as f,s as p,t as m,tt as h,w as g,xt as _,yt as v}from"./runtime-core.esm-bundler-DRVfegLZ.js";import{G as y,d as b}from"./router-CkvA5QaX.js";import{i as x}from"./useMetatag-DzWYzgsj.js";import{t as S}from"./preload-helper-BgYgeOe4.js";import{t as C}from"./_plugin-vue_export-helper-lOWZiE7P.js";import{C as ee,tt as w,w as te}from"./index-D3-qucUW.js";import{t as ne}from"./flightDetail.store-BxxYIWtx.js";import{t as re}from"./flightData.store-glY31ga0.js";import{n as T}from"./text.filter-D0laFwHi.js";import{t as E}from"./IconTrophy-DCs3EycI.js";import{n as ie}from"./image.helpers-jG7vbNeT.js";import{n as D}from"./HorizontalSlider-B_I34svN.js";import{t as O}from"./IconHeart-CIEobaav.js";import{t as k}from"./svg.helpers-BeUk9N6W.js";import{n as ae,r as A,t as j}from"./IconMedal-CMJees2x.js";var M={},N={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 -960 960 960`};function P(t,n){return e(),u(`svg`,N,[...n[0]||(n[0]=[f(`path`,{d:`m480-146.925-44.153-39.691q-99.461-90.231-164.5-155.077-65.038-64.846-103.076-115.423-38.039-50.577-53.154-92.269-15.116-41.692-15.116-84.615 0-85.153 57.423-142.576Q214.847-833.999 300-833.999q52.385 0 99 24.501 46.615 24.5 81 70.269 34.385-45.769 81-70.269 46.615-24.501 99-24.501 85.153 0 142.576 57.423Q859.999-719.153 859.999-634q0 42.923-15.116 84.615-15.115 41.692-53.154 92.269-38.038 50.577-102.884 115.423T524.153-186.616L480-146.925ZM480-228q96-86.385 158-148.077 62-61.692 98-107.192 36-45.5 50-80.808 14-35.308 14-69.923 0-60-40-100t-100-40q-47.385 0-87.577 26.885-40.192 26.884-63.654 74.808h-57.538q-23.846-48.308-63.846-75.001Q347.385-774 300-774q-59.615 0-99.808 40Q160-694 160-634q0 34.615 14 69.923t50 80.808q36 45.5 98 107T480-228Zm0-273Z`},null,-1)])])}var F=C(M,[[`render`,P]]),I={class:`flight-detail-like-action`},L=[`title`],R=[`title`],z=[`src`,`alt`],B=C(c({__name:`FlightDetailLikeAction`,props:{likes:{},isLiked:{type:Boolean},previewCount:{}},emits:[`liked`,`expanded`],setup(n,{emit:i}){let{t:o}=x({useScope:`global`}),s=t(!1),c=n,l=i,d=a(()=>c.likes.filter(e=>e.image).slice(-c.previewCount)),g=()=>{s.value=!s.value,l(`expanded`,s.value)};return(t,i)=>(e(),u(`div`,I,[f(`div`,{class:`counter`,title:n.isLiked?h(o)(`remove`):`Like`,onClick:i[0]||(i[0]=e=>l(`liked`,!n.isLiked))},[n.isLiked?(e(),p(O,{key:0,class:`liked`})):(e(),p(F,{key:1})),f(`span`,{class:v({liked:n.isLiked})},_(n.likes.length),3)],8,L),f(`div`,{class:`images`,title:h(o)(`showAll`),onClick:g},[(e(!0),u(m,null,r(d.value,t=>(e(),u(`img`,{loading:`lazy`,key:t.id,src:h(y)(`VUE_APP_FILE_URL`)+t.image,alt:t.name},null,8,z))),128))],8,R)]))}}),[[`__scopeId`,`data-v-c84fe34a`]]),V={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 -960 960 960`},oe={key:0,d:`M792-56 671-177q-25 16-53 27.5T560-131v-82q14-5 27.5-10t25.5-12L480-368v208L280-360H120v-240h128L56-792l56-56 736 736-56 56Zm-8-232-58-58q17-31 25.5-65t8.5-70q0-94-55-168T560-749v-82q124 28 202 125.5T840-481q0 53-14.5 102T784-288ZM650-422l-90-90v-130q47 22 73.5 66t26.5 96q0 15-2.5 29.5T650-422ZM480-592 376-696l104-104v208Z`},se={key:1,d:`M560-131v-82q90-26 145-100t55-168q0-94-55-168T560-749v-82q124 28 202 125.5T840-481q0 127-78 224.5T560-131ZM120-360v-240h160l200-200v640L280-360H120Zm440 40v-322q47 22 73.5 66t26.5 96q0 51-26.5 94.5T560-320Z`},H=c({__name:`IconVolumeUp`,props:{active:{type:Boolean}},setup(t){return(n,r)=>(e(),u(`svg`,V,[t.active?(e(),u(`path`,oe)):(e(),u(`path`,se))]))}}),U=`Lato, Arial, sans-serif`;async function ce(e,t,n,r,i){let a=await Y(await le(e,await W(n,r,i)),`image/jpeg`),o=new File([a],`${t}.jpg`,{type:`image/jpeg`});if(!navigator.canShare?.({files:[o]})){await q(a,t);return}try{await navigator.share({files:[o]})}catch(e){if(e instanceof Error&&e.name===`AbortError`)return;console.warn(`Navigator.share not supported: `,e),q(a,t)}}async function W(e,t,n,r={distance:`Dist.`,speed:`Geschw.`}){let i=document.createElement(`canvas`),a=i.getContext(`2d`,{alpha:!0});if(!a)throw Error(`Failed to create canvas context`);return i.width=750,i.height=1e3,a.clearRect(0,0,i.width,i.height),G(a,r.distance,e,50,100),G(a,r.speed,t,250,100),await ue(i,a,n,100),await de(i,a),i}async function le(e,t){let n=document.createElement(`canvas`),r=n.getContext(`2d`);if(!r)throw Error(`Failed to create canvas context`);let i=await J(e);n.width=i.width*2,n.height=i.height*2;try{r.drawImage(i,0,0,n.width,n.height);let e=n.height*.4,a=t.width*e/t.height,o=(n.width-a)/2,s=n.height*.5;return r.drawImage(t,o,s,a,e),n}
2catch(e){throw console.error(`Error combining images:`,e),Error(`Failed to combine images - CORS error. Make sure the image server allows cross-origin requests.`)}}async function ue(e,t,n,r){let i=k(n,2e3),a=` 3 <svg xmlns="http://www.w3.org/2000/svg" viewBox="-80 -40 2160 2160"> 4 <defs> 5 <filter id="glow" x="-50%" y="-50%" width="200%" height="200%"> 6 <feGaussianBlur stdDeviation="15" result="blur"/> 7 <feComposite in="SourceGraphic" in2="blur" operator="over"/> 8 </filter> 9 </defs> 10 <path d="${i}" stroke="#ffffff" stroke-width="50" stroke-linecap="round" fill="none" filter="url(#glow)"/> 11 <path d="${i}" stroke="#2d55a6" stroke-width="40" stroke-linecap="round" fill="none"/> 12 </svg>`,o=await J(`data:image/svg+xml;base64,${btoa(a)}`),s=(e.width-480)/2,c=r*3.8+10;t.drawImage(o,s,c,480,480)}async function de(e,t){let n=await J(`data:image/svg+xml;base64,${btoa(`<svg width="54" height="12" viewBox="0 0 54 12" xmlns="http://www.w3.org/2000/svg"> 13 <path d="M14.28 0.968999L11.151 11H9.933L7.392 3.349C7.36867 3.27433 7.34533 3.195 7.322 3.111C7.30333 3.027 7.28233 2.93833 7.259 2.845C7.23567 2.93833 7.21233 3.027 7.189 3.111C7.16567 3.195 7.14233 3.27433 7.119 3.349L4.564 11H3.346L0.217 0.968999H1.344C1.46533 0.968999 1.56567 0.999333 1.645 1.06C1.729 1.12067 1.78267 1.19767 1.806 1.291L3.878 8.263C3.91067 8.389 3.941 8.52433 3.969 8.669C4.00167 8.81367 4.032 8.96767 4.06 9.131C4.09267 8.96767 4.12533 8.81367 4.158 8.669C4.19533 8.51967 4.235 8.38433 4.277 8.263L6.636 1.291C6.664 1.21167 6.71767 1.13933 6.797 1.074C6.881 1.004 6.98133 0.968999 7.098 0.968999H7.49C7.61133 0.968999 7.70933 0.999333 7.784 1.06C7.85867 1.12067 7.91467 1.19767 7.952 1.291L10.304 8.263C10.346 8.38433 10.3833 8.515 10.416 8.655C10.4533 8.795 10.4883 8.942 10.521 9.096C10.5443 8.942 10.57 8.795 10.598 8.655C10.626 8.515 10.6563 8.38433 10.689 8.263L12.768 1.291C12.7913 1.207 12.8427 1.13233 12.922 1.067C13.006 1.00167 13.1063 0.968999 13.223 0.968999H14.28ZM19.4322 6.681C19.4322 6.39167 19.3902 6.128 19.3062 5.89C19.2269 5.64733 19.1079 5.43967 18.9492 5.267C18.7952 5.08967 18.6062 4.95433 18.3822 4.861C18.1582 4.763 17.9039 4.714 17.6192 4.714C17.0219 4.714 16.5482 4.889 16.1982 5.239C15.8529 5.58433 15.6382 6.065 15.5542 6.681H19.4322ZM20.4402 10.006C20.2862 10.1927 20.1019 10.356 19.8872 10.496C19.6726 10.6313 19.4416 10.7433 19.1942 10.832C18.9516 10.9207 18.6996 10.986 18.4382 11.028C18.1769 11.0747 17.9179 11.098 17.6612 11.098C17.1712 11.098 16.7186 11.0163 16.3032 10.853C15.8926 10.685 15.5356 10.4423 15.2322 10.125C14.9336 9.803 14.7002 9.40633 14.5322 8.935C14.3642 8.46367 14.2802 7.92233 14.2802 7.311C14.2802 6.81633 14.3549 6.35433 14.5042 5.925C14.6582 5.49567 14.8776 5.12467 15.1622 4.812C15.4469 4.49467 15.7946 4.24733 16.2052 4.07C16.6159 3.888 17.0779 3.797 17.5912 3.797C18.0159 3.797 18.4079 3.86933 18.7672 4.014C19.1312 4.154 19.4439 4.35933 19.7052 4.63C19.9712 4.896 20.1789 5.22733 20.3282 5.624C20.4776 6.016 20.5522 6.464 20.5522 6.968C20.5522 7.164 20.5312 7.29467 20.4892 7.36C20.4472 7.42533 20.3679 7.458 20.2512 7.458H15.5122C15.5262 7.906 15.5869 8.29567 15.6942 8.627C15.8062 8.95833 15.9602 9.236 16.1562 9.46C16.3522 9.67933 16.5856 9.845 16.8562 9.957C17.1269 10.0643 17.4302 10.118 17.7662 10.118C18.0789 10.118 18.3472 10.083 18.5712 10.013C18.7999 9.93833 18.9959 9.859 19.1592 9.775C19.3226 9.691 19.4579 9.614 19.5652 9.544C19.6772 9.46933 19.7729 9.432 19.8522 9.432C19.9549 9.432 20.0342 9.47167 20.0902 9.551L20.4402 10.006ZM30.5667 5.925V10.02C30.0534 10.398 29.505 10.6757 28.9217 10.853C28.343 11.0257 27.7224 11.112 27.0597 11.112C26.2337 11.112 25.4847 10.9837 24.8127 10.727C24.1454 10.4703 23.5737 10.1133 23.0977 9.656C22.6264 9.19867 22.2624 8.65267 22.0057 8.018C21.749 7.38333 21.6207 6.69033 21.6207 5.939C21.6207 5.17833 21.7444 4.48067 21.9917 3.846C22.239 3.21133 22.589 2.66533 23.0417 2.208C23.499 1.75067 24.052 1.396 24.7007 1.144C25.3494 0.892 26.0774 0.766 26.8847 0.766C27.2954 0.766 27.678 0.798666 28.0327 0.863999C28.392 0.929333 28.7234 1.02033 29.0267 1.137C29.3347 1.249 29.6147 1.38667 29.8667 1.55C30.1187 1.71333 30.3497 1.893 30.5597 2.089L30.0207 2.943C29.9367 3.07833 29.827 3.16233 29.6917 3.195C29.5564 3.223 29.4094 3.188 29.2507 3.09C29.0967 3.00133 28.9427 2.91267 28.7887 2.824C28.6347 2.73533 28.462 2.65833 28.2707 2.593C28.084 2.52767 27.8717 2.474 27.6337 2.432C27.4004 2.39 27.1297 2.369 26.8217 2.369C26.3224 2.369 25.8697 2.453 25.4637 2.621C25.0624 2.789 24.7194 3.02933 24.4347 3.342C24.15 3.65467 23.9307 4.03033 23.7767 4.469C23.6227 4.90767 23.5457 5.39767 23.5457 5.939C23.5457 6.51767 23.6274 7.03567 23.7907 7.493C23.9587 7.94567 24.192 8.33067 24.4907 8.648C24.794 8.96067 25.158 9.201 25.5827 9.369C26.0074 9.53233 26.481 9.614 27.0037 9.614C27.377 9.614 27.7107 9.57433 28.0047 9.495C28.2987 9.41567 28.5857 9.30833 28.8657 9.173V7.339H27.5917C27.4704 7.339 27.3747 7.30633 27.3047 7.241C27.2394 7.171 27.2067 7.087 27.2067 6.989V5.925H30.5667ZM33.8306 0.598V11H32.1016V0.598H33.8306ZM37.3452 3.818V11H35.6092V3.818H37.3452ZM37.5832 1.725C37.5832 1.87433 37.5529 2.01433 37.4922 2.145C37.4316 2.27567 37.3499 2.39 37.2472 2.488C37.1492 2.586 37.0326 2.66533 36.8972 2.726C36.7619 2.782 36.6172 2.81 36.4632 2.81C36.3139 2.81 36.1716 2.782 36.0362 2.726C35.9056 2.66533 35.7912 2.586 35.6932 2.488C35.5952 2.39 35.5159 2.27567 35.4552 2.145C35.3992 2.01433 35.3712 1.87433 35.3712 1.725C35.3712 1.571 35.3992 1.42633 35.4552 1.291C35.5159 1.15567 35.5952 1.039 35.6932 0.941C35.7912 0.843 35.9056 0.766 36.0362 0.71C36.1716 0.649333 36.3139 0.619 36.4632 0.619C36.6172 0.619 36.7619 0.649333 36.8972 0.71C37.0326 0.766 37.1492
130.843 37.2472 0.941C37.3499 1.039 37.4316 1.15567 37.4922 1.291C37.5529 1.42633 37.5832 1.571 37.5832 1.725ZM43.6159 5.652C43.4199 5.414 43.2052 5.246 42.9719 5.148C42.7432 5.05 42.4959 5.001 42.2299 5.001C41.9686 5.001 41.7329 5.05 41.5229 5.148C41.3129 5.246 41.1332 5.39533 40.9839 5.596C40.8346 5.792 40.7202 6.044 40.6409 6.352C40.5616 6.65533 40.5219 7.01467 40.5219 7.43C40.5219 7.85 40.5546 8.207 40.6199 8.501C40.6899 8.79033 40.7879 9.02833 40.9139 9.215C41.0399 9.397 41.1939 9.53 41.3759 9.614C41.5579 9.69333 41.7609 9.733 41.9849 9.733C42.3442 9.733 42.6499 9.65833 42.9019 9.509C43.1539 9.35967 43.3919 9.14733 43.6159 8.872V5.652ZM45.3449 0.598V11H44.2879C44.0592 11 43.9146 10.895 43.8539 10.685L43.7069 9.992C43.4176 10.3233 43.0839 10.5917 42.7059 10.797C42.3326 11.0023 41.8962 11.105 41.3969 11.105C41.0049 11.105 40.6456 11.0233 40.3189 10.86C39.9922 10.6967 39.7099 10.461 39.4719 10.153C39.2386 9.84033 39.0566 9.45533 38.9259 8.998C38.7999 8.54067 38.7369 8.018 38.7369 7.43C38.7369 6.898 38.8092 6.40333 38.9539 5.946C39.0986 5.48867 39.3062 5.092 39.5769 4.756C39.8476 4.42 40.1719 4.15867 40.5499 3.972C40.9279 3.78067 41.3526 3.685 41.8239 3.685C42.2252 3.685 42.5682 3.748 42.8529 3.874C43.1376 4 43.3919 4.17033 43.6159 4.385V0.598H45.3449ZM51.6783 6.583C51.6783 6.359 51.6456 6.149 51.5803 5.953C51.5196 5.75233 51.4263 5.57733 51.3003 5.428C51.1743 5.27867 51.0133 5.162 50.8173 5.078C50.6259 4.98933 50.4019 4.945 50.1453 4.945C49.6459 4.945 49.2516 5.08733 48.9623 5.372C48.6776 5.65667 48.4956 6.06033 48.4163 6.583H51.6783ZM48.3813 7.626C48.4093 7.99467 48.4746 8.31433 48.5773 8.585C48.6799 8.851 48.8153 9.07267 48.9833 9.25C49.1513 9.42267 49.3496 9.55333 49.5783 9.642C49.8116 9.726 50.0683 9.768 50.3483 9.768C50.6283 9.768 50.8686 9.73533 51.0693 9.67C51.2746 9.60467 51.4519 9.53233 51.6013 9.453C51.7553 9.37367 51.8883 9.30133 52.0003 9.236C52.1169 9.17067 52.2289 9.138 52.3363 9.138C52.4809 9.138 52.5883 9.19167 52.6583 9.299L53.1553 9.929C52.9639 10.153 52.7493 10.342 52.5113 10.496C52.2733 10.6453 52.0236 10.7667 51.7623 10.86C51.5056 10.9487 51.2419 11.0117 50.9713 11.049C50.7053 11.0863 50.4463 11.105 50.1943 11.105C49.6949 11.105 49.2306 11.0233 48.8013 10.86C48.3719 10.692 47.9986 10.447 47.6813 10.125C47.3639 9.79833 47.1143 9.397 46.9323 8.921C46.7503 8.44033 46.6593 7.885 46.6593 7.255C46.6593 6.765 46.7386 6.30533 46.8973 5.876C47.0559 5.442 47.2823 5.06633 47.5763 4.749C47.8749 4.427 48.2366 4.17267 48.6613 3.986C49.0906 3.79933 49.5736 3.706 50.1103 3.706C50.5629 3.706 50.9806 3.77833 51.3633 3.923C51.7459 4.06767 52.0749 4.28 52.3503 4.56C52.6256 4.83533 52.8403 5.176 52.9943 5.582C53.1529 5.98333 53.2323 6.443 53.2323 6.961C53.2323 7.22233 53.2043 7.39967 53.1483 7.493C53.0923 7.58167 52.9849 7.626 52.8263 7.626H48.3813Z" fill="#ffffff"/> 14 </svg>`)}`),r=350*n.height/n.width,i=e.height-r-50;t.drawImage(n,(e.width-350)/2,i,350,r)}function G(e,t,n,r,i){K(e,t,r,i/2,300),K(e,n,r+i,i,600)}function K(e,t,n,r,i){e.textAlign=`center`,e.font=`${i} ${r}px ${U}`,e.fillStyle=`#ffffff`,e.fillText(t,e.canvas.width/2,n)}async function q(e,t){let n=URL.createObjectURL(e),r=document.createElement(`a`);try{r.href=n,r.download=`${t}.${e.type===`image/jpeg`?`jpg`:`png`}`,document.body.appendChild(r),r.click()}finally{document.body.removeChild(r),setTimeout(()=>URL.revokeObjectURL(n),6e4)}}async function J(e){let t=await fetch(e);if(!t.ok)throw Error(`Failed to load image`);let n=await t.blob(),r=new Image,i=URL.createObjectURL(n);try{return await new Promise((e,t)=>{r.onload=()=>e(),r.onerror=()=>t(Error(`This image format could not be decoded`)),r.src=i}),r}finally{URL.revokeObjectURL(i)}}function Y(e,t=`image/png`){return new Promise((n,r)=>{e.toBlob(e=>{e?n(e):r(Error(`Failed to export image`))},t,.9)})}var fe=1920,pe=.65,me=.5,he=.8;function ge(e,t){let n=document.createElement(`canvas`),r=Math.min(1,fe/Math.max(e.naturalWidth,e.naturalHeight));n.width=Math.max(1,Math.round(e.naturalWidth*r)),n.height=Math.max(1,Math.round(e.naturalHeight*r));let i=n.getContext(`2d`);if(!i)throw Error(`Failed to create canvas context`);i.drawImage(e,0,0,n.width,n.height);let a=Math.min(n.width/t.width,n.height/t.height)*pe,o=t.width*a,s=t.height*a;return i.drawImage(t,(n.width-o)*me,(n.height-s)*he,o,s),n}function _e(e){let n=t(!1),r={delta:{x:0,y:0},scale:1},a={point:{x:0,y:0},distance:0},o=e=>e.touches[0]&&e.touches[1]?Math.hypot(e.touches[0].pageX-e.touches[1].pageX,e.touches[0].pageY-e.touches[1].pageY):null,s=e=>e.touches[0]&&e.touches[1]?{x:(e.touches[0].pageX+e.touches[1].pageX)/2,y:(e.touches[0].pageY+e.touches[1].pageY)/2}:null,c=e=>{e.style.transform=` 15 translate3d(${r.delta.x}px, ${r.delta.y}px, 0) 16 scale(${r.scale}) 17 `},u=e=>
17{e.style.transition=`150ms transform ease-out`,setTimeout(()=>{e.style.transition=`none`},150)},d=(e,t)=>{let n=e.offsetWidth,i=e.offsetHeight,a=t.offsetWidth*r.scale,o=t.offsetHeight*r.scale;return{minX:-Math.max((a-n)/2,0),maxX:Math.max((a-n)/2,0),minY:-Math.max((o-i)/2,0),maxY:Math.max((o-i)/2,0)}},f=(e,t,n)=>Math.max(t,Math.min(e,n)),p=!1,m=!1,h=0,g=null,_=!1,v=e=>{if(!e.touches[1])return;_=!0,e.preventDefault(),a.distance=o(e)/r.scale;let t=s(e);a.point={x:t.x-r.delta.x,y:t.y-r.delta.y}},y=t=>{if(!e.value||!t.touches[1])return;t.preventDefault(),r.scale=f(o(t)/a.distance,1,6);let n=s(t);r.delta.x=n.x-a.point.x,r.delta.y=n.y-a.point.y;let{minX:i,maxX:l,minY:u,maxY:p}=d(e.value.parentElement,e.value);r.delta.x=f(r.delta.x,i,l),r.delta.y=f(r.delta.y,u,p),c(e.value)},b=e=>{if(e.touches[1]||!e.touches[0])return;p=!0,m=!1;let t={x:e.touches[0].clientX,y:e.touches[0].clientY};a.point={x:t.x-r.delta.x,y:t.y-r.delta.y}},x=t=>{if(!p||!e.value||t.touches[1]||!t.touches[0])return;let i={x:t.touches[0].clientX,y:t.touches[0].clientY},o=i.x-a.point.x,s=i.y-a.point.y,{minX:l,maxX:u,minY:h,maxY:g}=d(e.value.parentElement,e.value),_=g+150*r.scale,v=h-150*r.scale;m||(m=Math.abs(o)>Math.abs(s));let y=!m&&(s>_||s<v),b=r.scale>1;(!m||y||b)&&t.preventDefault(),m?r.delta.x=f(o,l,u):(r.delta.y=s,r.delta.x=o,y&&(n.value=!0)),c(e.value)},S=()=>{if(!p||!e.value)return;p=!1;let{minX:t,maxX:n,minY:i,maxY:a}=d(e.value.parentElement,e.value);r.delta.x=f(r.delta.x,t,n),r.delta.y=f(r.delta.y,i,a),c(e.value),u(e.value)},C=t=>{if(!e.value||_){_=!1;return}let n=Date.now(),i=n-h;if(i<300&&i>0){g&&(clearTimeout(g),g=null),t.preventDefault();let n=t.changedTouches[0];if(!n)return;let i={x:n.clientX,y:n.clientY},a=e.value.getBoundingClientRect();r.scale>1?(r.scale=1,r.delta={x:0,y:0}):(r.scale=2,r.delta={x:f((a.width/2-(i.x-a.left))*r.scale,-((a.width*r.scale-a.width)/2),(a.width*r.scale-a.width)/2),y:f((a.height/2-(i.y-a.top))*r.scale,-((a.height*r.scale-a.height)/2),(a.height*r.scale-a.height)/2)}),c(e.value),u(e.value)}else g=window.setTimeout(()=>{g=null},300);h=n};return i(()=>{if(!e.value?.parentElement)return;let t=e.value.parentElement;t.addEventListener(`touchstart`,v),t.addEventListener(`touchmove`,y),t.addEventListener(`touchstart`,b),t.addEventListener(`touchmove`,x),t.addEventListener(`touchend`,S),t.addEventListener(`touchend`,C)}),l(()=>{if(!e.value?.parentElement)return;let t=e.value.parentElement;t.removeEventListener(`touchstart`,v),t.removeEventListener(`touchmove`,y),t.removeEventListener(`touchstart`,b),t.removeEventListener(`touchmove`,x),t.removeEventListener(`touchend`,S),t.removeEventListener(`touchend`,C)}),{closeSignal:n}}function ve(e){return e?.paused===!0}async function X(e){!e||document.fullscreenElement||(e.paused?(delete e.dataset.paused,await e.play()):(e.dataset.paused=`true`,e.pause()))}function ye(e){return e?.muted===!0}function be(e){!e||document.fullscreenElement||(e.muted=!e.muted)}var Z=new Map;async function xe(e,t){if(e.canPlayType(`application/vnd.apple.mpegURL`)||e.canPlayType(`audio/mpegurl`))e.src=t,console.log(`Native video streaming supported.`);else{let n=(await S(async()=>{let{default:e}=await import(`./hls-d_yRXVjd.js`);return{default:e}},[])).default;if(n.isSupported()){if(Z.get(e)?.url===t)return;Q(e);let r=new n({backBufferLength:90});Z.set(e,{hls:r,url:t}),r.on(n.Events.MANIFEST_PARSED,()=>r.attachMedia(e)),r.on(n.Events.ERROR,(t,n)=>{console.error(t,n),n.fatal&&Q(e)}),r.loadSource(t),console.info(`Video streaming with HLS plugin supported.`)}else console.error(`Video streaming not supported.`)}}function Q(e){let t=Z.get(e);t&&(Z.delete(e),t.hls.destroy())}async function Se(e,t){document.fullscreenElement||e.forEach(async e=>{let n=e.target,r=n.dataset.url,i=!n.src&&e.intersectionRatio>t[0],a=n.src&&n.paused&&e.intersectionRatio>t[1]&&!n.dataset.paused&&n.dataset.canplay,o=n.src&&!n.paused&&e.intersectionRatio<=t[1];i?(await xe(n,r),n.addEventListener(`loadedmetadata`,async()=>{n.dataset.canplay=`true`,a&&await n.play()})):a?await n.play():o&&n.pause()})}var Ce=[`data-src`],we=[`poster`],$=C(c({__name:`StoryLightboxItem`,props:{image:{},videoUrl:{},poster:{},active:{type:Boolean},muted:{type:Boolean}},emits:[`close`,`update:muted`],setup(r,{emit:i}){let a=r,c=i,p=t(null),h=t(null),{closeSignal:g}=_e(p);n(g,_);function _(){c(`close`)}function v(e){let t=!!a.videoUrl,n=t?h.value:p.value,r=e.target!==n,i=window.matchMedia(`(min-width: 59rem)`).matches;if(!r&&t){y();return}(r||i)&&_()}async function y(){await X(h.value??void 0),s(h)}function b(){c(`update:muted`,!a.muted)}async function x(e){e.src||!a.videoUrl||(await xe(e,a.videoUrl),e.addEventListener(`loadedmetadata`,e.play,{once:!0}))}n(h,(e,t)=>{t&&t!==e&&Q(t),e&&x(e)}),l(()=>{h.value&&Q(h.value)});function S(){h.value&&(h.value.muted=!a.active||!!a.muted)}return n([()=>a.muted,()=>a.active,h],S,{immediate:!0}),(t,n)=>(e(),u(`div`,{class:`media-container`,onClick:v}
17,[r.image?(e(),u(`img`,{key:0,"data-src":r.image,src:A,ref_key:`imageElem`,ref:p,class:`image`,draggable:`false`},null,8,Ce)):r.videoUrl?(e(),u(m,{key:1},[f(`video`,{ref_key:`videoElem`,ref:h,class:`video`,poster:r.poster||``,loop:``,playsinline:``,autoplay:``},null,8,we),d(H,{active:r.muted,onClick:n[0]||(n[0]=w(e=>b(),[`stop`])),class:`toggle-sound`},null,8,[`active`])],64)):o(``,!0)]))}}),[[`__scopeId`,`data-v-4bde332a`]]),Te={key:1,class:`comment`},Ee=C(c({__name:`StoryLightbox`,props:{mediaItems:{},comments:{},modelValue:{},isOwner:{type:Boolean},isSocialMediaTeam:{type:Boolean}},emits:[`close`,`update:modelValue`],setup(n,{emit:s}){let c=n,y=s,S=ne(),C=re(),{t:w}=x({useScope:`global`}),T=t(null),E=t(!0),O=t(!1);ae(T);let k=a(()=>c.modelValue>0),A=a(()=>c.modelValue<c.mediaItems.length-1),j=a(()=>c.comments?.some(e=>e!==void 0&&e!==``)),M=a(()=>c.mediaItems[c.modelValue]?.image!==void 0),N=a(()=>C.entity!==null&&S.entity!==null&&(c.isOwner||c.isSocialMediaTeam));function P(e){T.value&&T.value.children[e]?.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})}function F(){k.value&&P(c.modelValue-1)}function I(){A.value&&P(c.modelValue+1)}function L(){if(!T.value)return;let e=T.value.getBoundingClientRect(),t=e.left+e.width/2,n=Array.from(T.value.children).findIndex(e=>{let n=e.getBoundingClientRect();return n.left<=t&&n.right>=t});y(`update:modelValue`,n)}function R(e){switch(e.key){case`ArrowLeft`:F();break;case`ArrowRight`:I();break;case`Escape`:case`ArrowDown`:case`ArrowUp`:B()}}async function z(){let e=c.mediaItems[c.modelValue]?.image,t=C.entity?.geom,n=S.entity?.contest?.[0]?.distance,r=S.entity?.contest?.[0]?.speed,i=S.entity?.scoring_date,a=`WeGlide - ${w(`flight`)} ${i?b(i):``}`;!e||!t||!n||!r||await ce(ie(e),a,ee(n),te(r),t)}function B(){E.value=!0,setTimeout(()=>y(`close`),250)}async function V(){if(!T.value)return;let e=T.value.children;e[c.modelValue]?.scrollIntoView({behavior:`auto`,block:`nearest`,inline:`center`});let t=T.value.querySelectorAll(`img`),n=Array.from(t).slice(0,c.modelValue+1);await Promise.all(n.map(e=>e.complete?Promise.resolve():new Promise(t=>{e.onload=t,e.onerror=t}))),e[c.modelValue]?.scrollIntoView({behavior:`auto`,block:`nearest`,inline:`center`})}return i(async()=>{E.value=!1,await g(),V(),window.addEventListener(`keydown`,R),T.value?.addEventListener(`scroll`,L)}),l(()=>{window.removeEventListener(`keydown`,R),T.value?.removeEventListener(`scroll`,L)}),(t,i)=>(e(),u(`div`,{class:v([`lightbox`,{closing:E.value}])},[f(`div`,{class:`carousel`,ref_key:`carouselRef`,ref:T},[(e(!0),u(m,null,r(n.mediaItems,(t,r)=>(e(),u(m,{key:t.image?t.image:t.videoUrl},[t.image?(e(),p($,{key:0,image:h(ie)(t.image),onClose:B},null,8,[`image`])):(e(),p($,{key:1,"video-url":t.videoUrl,poster:t.poster,active:r===n.modelValue,muted:O.value,onClose:B,"onUpdate:muted":i[0]||(i[0]=e=>O.value=e)},null,8,[`video-url`,`poster`,`active`,`muted`]))],64))),128))],512),d(D,{type:`share`,"mouse-only":!1,"mobile-only":!0,title:h(w)(`sharePicture`),visible:N.value&&M.value,onClick:z},null,8,[`title`,`visible`]),d(D,{type:`close`,"mouse-only":!1,"mobile-only":!1,visible:!0,onClick:B}),d(D,{type:`left`,"mouse-only":!0,"mobile-only":!1,visible:k.value,onClick:F},null,8,[`visible`]),d(D,{type:`right`,"mouse-only":!0,"mobile-only":!1,visible:A.value,onClick:I},null,8,[`visible`]),n.mediaItems.length>1?(e(),u(`div`,{key:0,class:v([{comments:j.value},`dots`])},[(e(!0),u(m,null,r(n.mediaItems,(t,r)=>(e(),u(`i`,{key:t.image||t.videoUrl,class:v([{active:r===n.modelValue},`dot`])},null,2))),128))],2)):o(``,!0),n.comments&&n.comments[n.modelValue]?(e(),u(`div`,Te,_(n.comments[n.modelValue]),1)):o(``,!0)],2))}}),[[`__scopeId`,`data-v-38d5a4cf`]]),De={class:`record`},Oe={key:0},ke={key:1},Ae={key:2},je={key:0},Me={key:1},Ne={key:2},Pe=C(c({__name:`SegmentRecord`,props:{segmentScore:{},userName:{}},setup(t){let n=t,{t:r}=x({useScope:`global`}),i=a(()=>T(n.userName));return(n,a)=>(e(),u(`div`,De,[t.segmentScore.rank<=3?(e(),u(m,{key:0},[d(E,{class:`icon`}),t.segmentScore.rank===1?(e(),u(`span`,Oe,_(h(r)(`segmentTopThreeFirst`,{name:i.value,segment:t.segmentScore.segment.name})),1)):t.segmentScore.rank===2?(e(),u(`span`,ke,_(h(r)(`segmentTopThreeSecond`,{name:i.value,segment:t.segmentScore.segment.name}
17)),1)):t.segmentScore.rank===3?(e(),u(`span`,Ae,_(h(r)(`segmentTopThreeThird`,{name:i.value,segment:t.segmentScore.segment.name})),1)):o(``,!0)],64)):t.segmentScore.personal_rank<=3?(e(),u(m,{key:1},[d(j,{class:`icon`}),a[0]||(a[0]=f(`span`,null,null,-1)),t.segmentScore.personal_rank===1?(e(),u(`span`,je,_(h(r)(`segmentPersonalFirst`,{name:i.value,segment:t.segmentScore.segment.name})),1)):t.segmentScore.personal_rank===2?(e(),u(`span`,Me,_(h(r)(`segmentPersonalSecond`,{name:i.value,segment:t.segmentScore.segment.name})),1)):t.segmentScore.personal_rank===3?(e(),u(`span`,Ne,_(h(r)(`segmentPersonalThird`,{name:i.value,segment:t.segmentScore.segment.name})),1)):o(``,!0)],64)):o(``,!0)]))}}),[[`__scopeId`,`data-v-b77e4635`]]);function Fe(e){let t=[];for(let n of e){if(n.rank===void 0||n.personal_rank===void 0||n.rank>3&&n.personal_rank>3)continue;let e=t.findIndex(e=>e.segment.id===n.segment.id),r=t[e]?.rank;e!==-1&&r!==void 0?n.rank<r&&(t[e]=n):t.push(n)}return t}export{B as _,Se as a,X as c,Y as d,W as f,H as g,ge as h,Q as i,be as l,J as m,Pe as n,ye as o,q as p,Ee as r,ve as s,Fe as t,U as u};
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.