mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-11-28 18:28:04 -08:00
update dependencies
This commit is contained in:
1 parent
b7e9091320
commit
fdbf11dcd4
4 files changed
+2034
-1553
No files matched your search
Vendored
+1
-1
@@ -1 +1 @@
|
||||
(()=>{"use strict";var e={652:(e,t,s)=>{var n=s(440),r=s(430),a=s(211),i=s(413),o=s(999),l=s(302);document.addEventListener("DOMContentLoaded",(()=>{m()}));const c=["Land Features","Bay","Channel","Cove","Dam","Delta","Gulf","Lagoon","Lake","Ocean","Reef","Reservoir","Sea","Sound","Strait","Waterfall","Wharf","Amusement Park","Historical Monument","Landmark","Tourist Attraction","Zoo","College","Beach","Campground","Golf Course","Harbor","Nature Reserve","Other Parks and Outdoors","Park","Racetrack","Scenic Overlook","Ski Resort","Sports Center","Sports Field","Wildlife Reserve","Airport","Ferry","Marina","Pier","Port","Resort","Postal","Populated Place"].join(","),u="#txtAddress",d="#ToggleFullScreen",h="#btnGetGps",m=()=>{document.querySelector(u).addEventListener("focus",(e=>{e.target.select()})),(0,a.Fx)(b),document.querySelector("#NavigateMenu").addEventListener("click",S),document.querySelector("#NavigateRefresh").addEventListener("click",C),document.querySelector("#NavigateNext").addEventListener("click",T),document.querySelector("#NavigatePrevious").addEventListener("click",x),document.querySelector("#NavigatePlay").addEventListener("click",I),document.querySelector(d).addEventListener("click",y);const e=document.querySelector(h);e.addEventListener("click",O),navigator.geolocation||(e.style.display="none"),document.querySelector("#divTwc").addEventListener("mousemove",(()=>{document.fullscreenElement&&D()})),window.addEventListener("resize",E),E.wasFull=!1,document.querySelector(u).addEventListener("keydown",(e=>{"Enter"===e.code&&t()})),document.querySelector("#btnGetLatLng").addEventListener("click",(()=>t())),document.addEventListener("keydown",M),document.addEventListener("touchmove",(e=>{document.fullscreenElement&&e.preventDefault()})),$(u).devbridgeAutocomplete({serviceUrl:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest",deferRequestBy:300,paramName:"text",params:{f:"json",countryCode:"USA",category:c,maxSuggestions:10},dataType:"json",transformResult:e=>({suggestions:e.suggestions.map((e=>({value:e.text,data:e.magicKey})))}),minChars:3,showNoSuggestionNotice:!0,noSuggestionNotice:"No results found. Please try a different search string.",onSelect(e){f(e,this)},width:490});const t=()=>{const e=$(u).devbridgeAutocomplete();return e.suggestions[0]&&$(e.suggestionsContainer.children[0]).trigger("click"),!1},s=(0,o.J)(),n=s.latLonQuery&&s.latLon,r=s.latLonQuery??localStorage.getItem("latLonQuery"),i=s.latLon??localStorage.getItem("latLon"),m=localStorage.getItem("latLonFromGPS")&&!n;if(r&&i&&!m){document.querySelector(u).value=r,b(JSON.parse(i))}m&&O(),l.A.kiosk.value="true"===s["settings-kiosk-checkbox"];const g=s["settings-kiosk-checkbox"]??localStorage.getItem("play");null!==g&&"true"!==g||N("navButton","play"),document.querySelector("#btnClearQuery").addEventListener("click",(()=>{document.querySelector("#spanCity").innerHTML="",document.querySelector("#spanState").innerHTML="",document.querySelector("#spanStationId").innerHTML="",document.querySelector("#spanRadarId").innerHTML="",document.querySelector("#spanZoneId").innerHTML="",document.querySelector("#chkAutoRefresh").checked=!0,localStorage.removeItem("autoRefresh"),localStorage.removeItem("play"),N("navButton","play"),localStorage.removeItem("latLonQuery"),localStorage.removeItem("latLon"),localStorage.removeItem("latLonFromGPS"),document.querySelector(h).classList.remove("active")})),document.querySelector("#container").addEventListener("swiped-left",(()=>k("left"))),document.querySelector("#container").addEventListener("swiped-right",(()=>k("right")))},f=async(e,t)=>{if(t.previousSuggestionValue===e.value)return;const s=(await(0,n.Pq)("https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find",{data:{text:e.value,magicKey:e.data,f:"json"}})).locations[0];s?(localStorage.removeItem("latLonFromGPS"),document.querySelector(h).classList.remove("active"),g(s.feature.geometry)):console.error("An unexpected error occurred. Please try a different search string.")},g=(e,t)=>{const s={lat:(0,i.X4)(e.y,4),lon:(0,i.X4)(e.x,4)};localStorage.setItem("latLonQuery",document.querySelector(u).value),localStorage.setItem("latLon",JSON.stringify(s)),b(s,t)},y=()=>(document.fullscreenElement?w():p(),(0,a.F4)()?(0,r.A)(!0):(0,r.A)(!1),D(),!1),p=()=>{const e=document.querySelector("#divTwc"),t=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;t?t.call(e,{navigationUI:"hide"}):window.scrollTo(0,0),(0,a.XR)(),D();const s=document.querySelector(d);s.src="images/nav/ic_fullscreen_exit_white_24dp_2x.png",s.title="Exit fullscreen"},w=()=>{document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),(0,a.XR)(),v()},v=()=>{const e=document.querySelector(d);e.src="images/nav/ic_fullscreen_white_24dp_2x.png",e.title=Line truncated
|
||||
(()=>{"use strict";var e={2:(e,t,s)=>{var n=s(592),r=s(73),a=s(24),i=s(211),o=s(125);class l extends a.A{constructor(e,t,s){super(e,t,"Hourly Graph",s),document.addEventListener("DOMContentLoaded",(()=>{this.moveHeader()}))}moveHeader(){const e=this.fillTemplate("top-right",{});this.elem.querySelector(".header .right").append(e)}async getData(){if(!super.getData())return;const e=await(0,r.A)((()=>this.stillWaiting()));if(void 0===e)return void this.setStatus(n.Ay.failed);const t=e.map((e=>e.temperature)),s=e.map((e=>e.probabilityOfPrecipitation)),a=e.map((e=>e.skyCover));this.data={skyCover:a,temperature:t,probabilityOfPrecipitation:s},this.setStatus(n.Ay.loaded)}drawCanvas(){this.image||(this.image=this.elem.querySelector(".chart img"));const e=285;this.image.width=532,this.image.height=e;const t=document.createElement("canvas");t.width=532,t.height=e;const s=t.getContext("2d");s.imageSmoothingEnabled=!1;const n=c(0,5,this.data.temperature.length-1,532),r=o.c9.now().startOf("hour");document.querySelector(".x-axis .l-1").innerHTML=h(r),document.querySelector(".x-axis .l-2").innerHTML=h(r.plus({hour:6})),document.querySelector(".x-axis .l-3").innerHTML=h(r.plus({hour:12})),document.querySelector(".x-axis .l-4").innerHTML=h(r.plus({hour:18})),document.querySelector(".x-axis .l-5").innerHTML=h(r.plus({hour:24}));const a=c(0,275,100,10),i=u(this.data.skyCover,n,a);d(i,s,{strokeStyle:"lightgrey",lineWidth:3});const l=u(this.data.probabilityOfPrecipitation,n,a);d(l,s,{strokeStyle:"aqua",lineWidth:3});const m=Math.min(...this.data.temperature),f=Math.max(...this.data.temperature),g=Math.round((m+f)/2),y=c(m,275,f,10),p=u(this.data.temperature,n,y);d(p,s,{strokeStyle:"red",lineWidth:3});const w=String.fromCharCode(176);this.elem.querySelector(".y-axis .l-1").innerHTML=(f+w).substring(0,3),this.elem.querySelector(".y-axis .l-2").innerHTML=(g+w).substring(0,3),this.elem.querySelector(".y-axis .l-3").innerHTML=(m+w).substring(0,3),this.image.src=t.toDataURL(),super.drawCanvas(),this.finishDraw()}}const c=(e,t,s,n)=>{const r=(n-t)/(s-e),a=t-r*e;return e=>r*e+a},u=(e,t,s)=>e.map(((e,n)=>[t(n),s(e)])),d=(e,t,s)=>{t.beginPath(),t.strokeStyle="black",t.lineWidth=(s?.lineWidth??2)+2,t.moveTo(e[0][0],e[0][1]),e.slice(1).forEach((e=>t.lineTo(e[0],e[1]+2))),t.stroke(),t.beginPath(),t.strokeStyle=s?.strokeStyle??"red",t.lineWidth=s?.lineWidth??2,t.moveTo(e[0][0],e[0][1]),e.slice(1).forEach((e=>t.lineTo(e[0],e[1]))),t.stroke()},h=e=>e.toFormat("ha").slice(0,-1);(0,i.Kb)(new l(4,"hourly-graph"))},24:(e,t,s)=>{s.d(t,{A:()=>l});var n=s(592),r=s(125),a=s(211),i=s(999),o=s(302);const l=class{constructor(e,t,s,r){this.navId=e,this.elemId=void 0,this.data=void 0,this.loadingStatus=n.Ay.loading,this.name=s??t,this.getDataCallbacks=[],this.stillWaitingCallbacks=[],this.defaultEnabled=r,this.okToDrawCurrentConditions=!0,this.okToDrawCurrentDateTime=!0,this.showOnProgress=!0,this.timing={totalScreens:1,baseDelay:9e3,delay:1},this.navBaseCount=0,this.screenIndex=-1,this.storeElemId(t),this.isEnabled?this.setStatus(n.Ay.loading):this.setStatus(n.Ay.disabled),this.startNavCount(),document.addEventListener("DOMContentLoaded",(()=>{this.loadTemplates()}))}generateCheckbox(e=!0){if("progress"===this.elemId)return!1;const t=(0,i.J)()?.[`${this.elemId}-checkbox`];let s;void 0!==t&&(s="true"===t);let n=s??window.localStorage.getItem(`display-enabled: ${this.elemId}`);null===n&&(n=e),this.isEnabled=!("true"!==n&&!0!==n),window.localStorage.setItem(`display-enabled: ${this.elemId}`,this.isEnabled);const r=document.createElement("label");r.for=`${this.elemId}-checkbox`,r.id=`${this.elemId}-label`;const a=document.createElement("input");a.type="checkbox",a.value=!0,a.id=`${this.elemId}-checkbox`,a.name=`${this.elemId}-checkbox`,a.checked=this.isEnabled,a.addEventListener("change",(e=>this.checkboxChange(e)));const o=document.createElement("span");o.innerHTML=this.name;const l=document.createElement("span");return l.innerHTML="!!!",l.classList.add("alert"),r.append(a,o,l),this.checkbox=r,r}checkboxChange(e){this.isEnabled=e.target.checked,window.localStorage.setItem(`display-enabled: ${this.elemId}`,this.isEnabled),this.getData()}setStatus(e){this.status=e,(0,a.yB)({id:this.navId,status:this.status}),this.checkbox&&(this.checkbox.classList.remove(...n.LR),this.checkbox.classList.add((0,n.qx)(e)))}get status(){return this.loadingStatus}set status(e){this.loadingStatus=e}storeElemId(e){this.elemId||(this.elemId=e)}getData(e){return this.data=void 0,e&&(this.weatherParameters=e),this.isEnabled?(this.setStatus(n.Ay.loading),this.calcNavTiming(),!0):(this.setStatus(n.Ay.disabled),!1)}getDataCallback(){this.getDataCallbacks.forEach((e=>e(this.data))),this.getDataCallbacks=[]}drawCanvas(){this.screenIndex<0&&(this.screenIndex=0),this.okToDrawCurrentDateTime&&this.drawCurrentDateTime()}finishDraw(){this.okToDrawCurrentDateTime&&(this.drawCurrentDateTime(),this.dateTimeInterval||(this.dateTimeInterval=setInterval((()=>this.active&&this.drawCurrentDateTime()),10Line truncated
|
||||
Generated
+2024
-1546
File diff suppressed because it is too large.
Load diff
+3
-3
@@ -20,7 +20,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/netbymatt/ws4kp#readme",
|
||||
"devDependencies": {
|
||||
"del": "^7.1.0",
|
||||
"del": "^8.0.0",
|
||||
"jquery": "^3.6.0",
|
||||
"jquery-touchswipe": "^1.6.19",
|
||||
"luxon": "^3.0.0",
|
||||
@@ -38,7 +38,7 @@
|
||||
"gulp-ejs": "^5.1.0",
|
||||
"gulp-htmlmin": "^5.0.1",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"gulp-sass": "^5.1.0",
|
||||
"gulp-sass": "^6.0.0",
|
||||
"gulp-terser": "^2.0.0",
|
||||
"terser-webpack-plugin": "^5.3.6",
|
||||
"webpack-stream": "^7.0.0",
|
||||
@@ -48,4 +48,4 @@
|
||||
"express": "^4.17.1",
|
||||
"ejs": "^3.1.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,12 +51,15 @@
|
||||
"[html]": {
|
||||
"editor.defaultFormatter": "j69.ejs-beautify"
|
||||
},
|
||||
"files.exclude": {},
|
||||
"files.exclude": {
|
||||
"**/node_modules": true,
|
||||
"**/debug.log": true,
|
||||
"server/scripts/custom.js": true
|
||||
},
|
||||
"files.eol": "\n",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user