1import{a as G}from"./chunk-FGKMQMYD.js";import"./chunk-ZBSEIHE5.js";import{a as J}from"./chunk-FE2BZ3DQ.js";import{b}from"./chunk-2LKIBAP4.js";import{x as Q}from"./chunk-DY5AGGTC.js";import{d as $}from"./chunk-VGXV6ATU.js";import{b as D,c as V,d as w,e as S}from"./chunk-IVHNOYTO.js";import{c as W}from"./chunk-XWE7H3HT.js";import"./chunk-7TOLEIK7.js";import"./chunk-27XKJMCV.js";import"./chunk-IEHBLZGY.js";import"./chunk-UFPWKMEN.js";import{c as R}from"./chunk-GCCEWEET.js";import"./chunk-NFIAYGHJ.js";import{a as q,b as F,e as K}from"./chunk-PAM3RPUJ.js";import"./chunk-GCTRA7JF.js";import"./chunk-3UF247RB.js";import{t as Z,w as I}from"./chunk-VJGCODMT.js";import{$b as m,Aa as k,D as N,Ga as z,Hb as y,Ic as A,Jc as u,Mc as p,Nc as E,Oc as h,Pc as L,Tc as B,Uc as H,Vc as j,ac as g,dd as M,ed as P,fc as x,gc as c,hc as l,ic as f,ma as _,md as s,tb as a,td as O,xc as d}from"./chunk-HBQGYQK3.js";import"./chunk-PVQQOPSA.js";import"./chunk-PCOOZPAX.js";function tt(e,i){if(e&1&&f(0,"img",6),e&2){let o=d(2);u("left-arrow",!o.isMoon())}}function et(e,i){if(e&1&&f(0,"img",7),e&2){let o=d(2);u("left-arrow",!o.isMoon())}}function nt(e,i){if(e&1&&(c(0,"div",1),m(1,tt,1,2,"img",4)(2,et,1,2,"img",5),p(3),l()),e&2){let o=d();a(),g(o.device.isMobile()?1:2),a(2),h(" ",o.rise()," ")}}function it(e,i){if(e&1&&(c(0,"div"),p(1),l()),e&2){let o=d();a(),h(" ",o.special()," ")}}function ot(e,i){if(e&1&&f(0,"img",10),e&2){let o=d(2);u("left-arrow",!o.isMoon())}}function at(e,i){if(e&1&&f(0,"img",11),e&2){let o=d(2);u("left-arrow",!o.isMoon())}}function rt(e,i){if(e&1&&(c(0,"div",2),m(1,ot,1,2,"img",8)(2,at,1,2,"img",9),p(3),l()),e&2){let o=d();a(),g(o.device.isMobile()?1:2),a(2),h(" ",o.set()," ")}}function st(e,i){if(e&1&&(f(0,"img",12),p(1)),e&2){let o=d(),t=d();x("width",t.hourlyIconWidth)("height",t.hourlyIconHeight),a(),h(" ",o," ")}}function dt(e,i){if(e&1&&(c(0,"div",3),m(1,st,2,3),l()),e&2){let o=d();a(),g(o.isPolarDayOrNight()===!1?1:-1)}}var U=(()=>{let i=class i{constructor(){this.device=_(W),this.translate=_(q),this.i18n=_(b),this.hourlyIconWidth=13,this.hourlyIconHeight=14,this.noRiseOrSet=this.translate.instant("astro_no_moon_rise_or_set"),this.isPolarDayOrNight=s(()=>{let t=this.data();if(t!=null)return t.courseType===w.polarDay||t.courseType===w.polarNight}),this.data=O(),this.showInfo=O(!1),this.rise=s(()=>{let t=this.data();if(t!=null)return t.rise?this.i18n.formatTime(t.rise):this.noRiseOrSet}),this.set=s(()=>{let t=this.data();if(t!=null)return t.set?this.i18n.formatTime(t.set):this.noRiseOrSet}),this.title=s(()=>{let t=this.data();if(t!=null)return t instanceof S?this.translate.instant("astro_sun"):this.translate.instant("astro_moon")}),this.isMoon=s(()=>this.data()instanceof V),this.special=s(()=>{let t=this.data();if(t!=null)switch(t.courseType){case w.polarDay:return this.translate.instant("current_sun_description_polar_day");case w.polarNight:return this.translate.instant("current_sun_description_polar_night");case D.overTheHorizon:return this.translate.instant("astro_moon_above_the_horizon");case D.underTheHorizon:return this.translate.instant("astro_moon_below_the_horizon")}}),this.dayLength=s(()=>{let t=this.data();if(t==null||!(t instanceof S))return;let n=t.dayLength;if(n==null)return;let r=this.translate.instant("units_hour_unit"),C=this.translate.instant("units_minutes_unit");return`${n.hours}${r} ${n.minutes}${C}`})}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=y({type:i,selectors:[["wo-astro-card-info"]],hostVars:2,hostBindings:function(n,r){n&2&&A("--hourly-icon-width",r.hourlyIconWidth,"px")},inputs:{data:[1,"data"],showInfo:[1,"showInfo"]},decls:6,vars:6,consts:[[1,"title"],[1,"info-line"],[1,"info-line","middle"],[1,"info-line","bottom"],["ngSrc","assets/forecast/ic_sun_arrow_g.svg","alt","","width","7","height","9",3,"left-arrow"],["ngSrc","assets/forecast/ic_sun_arrow_g.svg","alt","","width","9","height","11",3,"left-arrow"],["ngSrc","assets/forecast/ic_sun_arrow_g.svg","alt","","width","7","height","9"],["ngSrc","assets/forecast/ic_sun_arrow_g.svg","alt","","width","9","height","11"],["ngSrc","assets/forecast/ic_sun_arrow_g.svg","alt","","width","7","height","9",1,"set",3,"left-arrow"],["ngSrc","assets/forecast/ic_sun_arrow_g.svg","alt","","width","9","height","11",1,"set",3,"left-arrow"],["ngSrc","assets/forecast/ic_sun_arrow_g.svg","alt","","width","7","height","9",1,"set"],["ngSrc","assets/forecast/ic_sun_arrow_g.svg","alt","","width","9","height","11",1,"set"],["ngSrc","assets/forecast/ic_hourly.svg","alt","",1,"arrow",3,"width","height"]],template:function(n,r){if(n&1&&(c(0,"span",0),p(1),l(),m(2,nt,4,2,"div",1)(3,it,2,1,"div"),m(4,rt,4,2,"div",2),m(5,dt,2,1,"div",3)),n&2){let C;u("moon",r.isMoon()),a(),h(" ",r.title()),a(),g(r.showInfo()&&!r.special()?2:3),a(2),g(r.showInfo()?4:-1),a(),g((C=r.dayLength())?5:-1,C)}},dependencies:[I],styles:["[_nghost-%COMP%]{display:contents}.info-line[_ngcontent-%COMP%]{display:grid;align-items:center;gap:8px;grid-template-columns:var(--hourly-icon-width) 1fr}html[data-device=desktop][_nghost-%COMP%] .info-line.middle[_ng
1content-%COMP%], html[data-device=desktop] [_nghost-%COMP%] .info-line.middle[_ngcontent-%COMP%], html[data-device=desktop][_nghost-%COMP%] .info-line.bottom[_ngcontent-%COMP%], html[data-device=desktop] [_nghost-%COMP%] .info-line.bottom[_ngcontent-%COMP%]{margin-top:3px}[data-device=desktop][_nghost-%COMP%] .info-line.middle[_ngcontent-%COMP%], [data-device=desktop][_nghost-%COMP%] .info-line.bottom[_ngcontent-%COMP%]{margin-top:3px}.left-arrow[_ngcontent-%COMP%]{justify-self:center}.set[_ngcontent-%COMP%]{transform:rotate(180deg)}.title[_ngcontent-%COMP%]{grid-row:1;color:#ffbe00}.title.moon[_ngcontent-%COMP%]{color:#10658e}"]});let e=i;return e})();function lt(e,i){if(e&1&&(p(0),M(1,"localizedDayOfWeek")),e&2){d();let o=j(7);h(" ",P(1,1,o)," ")}}function ct(e,i){if(e&1&&f(0,"img",11),e&2){let o=d();u("flip",o.flipImage()),x("ngSrc",i)}}function mt(e,i){e&1&&(c(0,"div",10),p(1),M(2,"translate"),l()),e&2&&(a(),E(P(2,1,i)))}var zt=(()=>{let i=class i{constructor(){this.i18nConfigService=_(b),this.ngZone=_(k),this.platform=_(z),this.insertionConfig=O.required(),this.placemark=s(()=>this.insertionConfig().placemark),this.astroDay=s(()=>this.insertionConfig().astroDay),this.flipImage=s(()=>this.placemark().coordinates.lat<0),this.moonImage=s(()=>{let t=this.astroDay()?.moon.age;return t==null?null:Q(t)}),this.moonPhase=s(()=>this.getMoonphaseKey(this.astroDay()?.moon.age??-1)),this.time=(()=>{let t;return Z(this.platform)&&(t=this.ngZone.runOutsideAngular(()=>$(N(1e3)))),s(()=>(t?.(),this.currentTime()))})()}currentTime(){return this.i18nConfigService.formatTime(R.utc().setZone(this.astroDay()?.date.zone))}getMoonphaseKey(t){let n=.9843333333333334;return t<=n-n/2?"moonphase_new_moon":t<7*n?"moonphase_waxing_crescent":t<=8*n?"moonphase_first_quarter":t<14*n+n/2?"moonphase_waxing_gibbous":t<=15*n+n/2?"moonphase_full_moon":t<22*n?"moonphase_waning_gibbous":t<=23*n?"moonphase_third_quarter":t<29*n+n/2?"moonphase_waning_crescent":t<=30*n?"moonphase_new_moon":""}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=y({type:i,selectors:[["wo-astro-card"]],inputs:{insertionConfig:[1,"insertionConfig"]},decls:19,vars:15,consts:[[1,"card-content"],[1,"title-and-date"],[1,"title"],[1,"date"],[1,"info-container"],[1,"info"],[3,"showInfo","data"],[1,"moon-info"],[1,"moon"],["alt","","crossorigin","anonymous","width","55","height","55",3,"flip","ngSrc"],[1,"moon-text"],["alt","","crossorigin","anonymous","width","55","height","55",3,"ngSrc"]],template:function(n,r){if(n&1&&(c(0,"wo-card")(1,"div",0)(2,"div",1)(3,"h2",2),p(4),M(5,"translate"),l(),c(6,"div",3),B(7),m(8,lt,2,3),l()(),p(9),M(10,"translate"),c(11,"div",4)(12,"div",5),f(13,"wo-astro-card-info",6)(14,"wo-astro-card-info",6),l(),c(15,"div",7)(16,"div",8),m(17,ct,1,3,"img",9),l(),m(18,mt,3,3,"div",10),l()()()()),n&2){let C,T,v=r.astroDay();a(4),h(" ",P(5,10,"weather_stream_title_astro_info")," "),a(3);let X=H(v?.date);a(),g(X!=null?8:-1),a(),L(" ",r.time()," ",P(10,13,"local_time")," "),a(4),x("showInfo",v?.sun?.courseType==="sunrise_and_sunset")("data",v?.sun),a(),x("showInfo",v?.moon?.courseType==="moonrise_and_moonset")("data",v?.moon),a(3),g((C=r.moonImage())?17:-1,C),a(),g((T=r.moonPhase())?18:-1,T)}},dependencies:[K,J,U,I,F,G],styles:[".card-content[_ngcontent-%COMP%]{font-weight:300}html[data-device=mobile][_nghost-%COMP%] .card-content[_ngcontent-%COMP%], html[data-device=mobile] [_nghost-%COMP%] .card-content[_ngcontent-%COMP%]{font-size:13px;padding:16px}[data-device=mobile][_nghost-%COMP%] .card-content[_ngcontent-%COMP%]{font-size:13px;padding:16px}html[data-device=desktop][_nghost-%COMP%] .card-content[_ngcontent-%COMP%], html[data-device=desktop] [_nghost-%COMP%] .card-content[_ngcontent-%COMP%]{font-size:16px;padding:19px 16px 10px}[data-device=desktop][_nghost-%COMP%] .card-content[_ngcontent-%COMP%]{font-size:16px;padding:19px 16px 10px}.title-and-date[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:8px}.date[_ngcontent-%COMP%]{font-size:16px;display:flex}.title[_ngcontent-%COMP%]{font-weight:300;margin:0}html[data-device=mobile][_nghost-%COMP%] .title[_ngcontent-%COMP%], html[data-device=mobile] [_nghost-%COMP%] .title[_ngcontent-%COMP%]{font-size:22px}[data-device=mobile][_nghost-%COMP%] .title[_ngcontent-%COMP%]{font-size:22px}html[data-device=desktop][_nghost-%COMP%] .title[_ngcontent-%COMP%], html[data-device=desktop] [_nghost-%COMP%] .title[_ngcontent-%COMP%]{font-size:24px}[data-device=desktop][_nghost-%COMP%] .title[_ngcontent-%COMP%]{font-size:24px}.title[_ngcontent-%COMP%]{color:#003959}.info[_ngcontent-%COMP%]{display:grid;flex-grow:2;grid-template-columns:repeat(2,1fr);row-gap:10px;grid-template-rows:repeat(4,auto);grid-auto-flow:column}html[data-device=mobile][_nghost-%COMP%] .info[_ngcontent-%COMP%], html[data-device=mobile] [_nghost-%COMP%] .info[_ngcontent-%COMP%]{margin-top:12px;column-gap:5px}[data-device=mobile][_nghost-%COMP%] .info[_ngcontent-%COMP%]{margin-top:12px;column-gap:5px}html[data-device=desktop][_nghost-%COMP%] .info[_ngcontent-%COMP%], html[data-device=desktop] [_nghost-%COMP%] .info[_ngcontent-%COMP%]{margin-top:20px;column-gap:18px}[data-device=desktop][_nghost-%COMP%] .info[_ngcontent-%COMP%]{margin-top:20px;column-gap:18px}.moon[_ngcontent-%COMP%]{width:70px;height:70px;align-self:flex-end;background-color:#0b3158;border-radius:4px;display:flex;justify-content:center;align-items:center}.moon[_ngcontent-%COMP%] img.flip[_ngcontent-%COMP%]{transform:rotate(180deg)}.moon-info[_ngcontent-%COMP%]{display:flex;flex-direction:column}.moon-text[_ngcontent-%COMP%]{font-weight:300;font-size:13px;margin-top:7px;text-align:right;max-width:80px}.info-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-start;font-weight:400}wo-astro-card-info[_ngcontent-%COMP%]:last-of-type{margin-left:-5px}"]});let e=i;return e})();export{zt as AstroCardComponent};
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.