2022-12-13 21:43:43 +00:00
|
|
|
(()=>{"use strict";var e={407:(e,t,n)=>{var s=n(929),r=n(739),a=n(325),i=n(594);document.addEventListener("DOMContentLoaded",(()=>{c()}));let o=!1;const l=["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(","),c=()=>{document.getElementById("txtAddress").addEventListener("focus",(e=>{e.target.select()})),(0,a.uL)(y),document.getElementById("NavigateMenu").addEventListener("click",g),document.getElementById("NavigateRefresh").addEventListener("click",w),document.getElementById("NavigateNext").addEventListener("click",v),document.getElementById("NavigatePrevious").addEventListener("click",S),document.getElementById("NavigatePlay").addEventListener("click",I),document.getElementById("ToggleFullScreen").addEventListener("click",h);const e=document.getElementById("btnGetGps");e.addEventListener("click",D),navigator.geolocation||(e.style.display="none"),document.getElementById("divTwc").addEventListener("click",(()=>{document.fullscreenElement&&T()})),document.addEventListener("keydown",C),document.addEventListener("touchmove",(e=>{o&&e.preventDefault()})),$("#frmGetLatLng #txtAddress").devbridgeAutocomplete({serviceUrl:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest",deferRequestBy:300,paramName:"text",params:{f:"json",countryCode:"USA",category:l,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){u(e,this)},width:490}),$("#frmGetLatLng").on("submit",(()=>{const e=$("#frmGetLatLng #txtAddress").devbridgeAutocomplete();return e.suggestions[0]&&$(e.suggestionsContainer.children[0]).trigger("click"),!1}));const t=localStorage.getItem("latLonQuery"),n=localStorage.getItem("latLon"),s=localStorage.getItem("latLonFromGPS");if(t&&n&&!s){document.getElementById("txtAddress").value=t,y(JSON.parse(n))}s&&D();const r=localStorage.getItem("play");null!==r&&"true"!==r||M("navButton","play"),document.getElementById("btnClearQuery").addEventListener("click",(()=>{document.getElementById("spanCity").innerHTML="",document.getElementById("spanState").innerHTML="",document.getElementById("spanStationId").innerHTML="",document.getElementById("spanRadarId").innerHTML="",document.getElementById("spanZoneId").innerHTML="",document.getElementById("chkAutoRefresh").checked=!0,localStorage.removeItem("autoRefresh"),localStorage.removeItem("play"),M("navButton","play"),localStorage.removeItem("latLonQuery"),localStorage.removeItem("latLon"),localStorage.removeItem("latLonFromGPS"),document.getElementById("btnGetGps").classList.remove("active")})),document.getElementById("container").addEventListener("swiped-left",(()=>p("left"))),document.getElementById("container").addEventListener("swiped-right",(()=>p("right")))},u=async(e,t)=>{if(t.previousSuggestionValue===e.value)return;const n=(await(0,s.AV)("https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find",{data:{text:e.value,magicKey:e.data,f:"json"}})).locations[0];n?d(n.feature.geometry):console.error("An unexpected error occurred. Please try a different search string.")},d=(e,t)=>{const n={lat:(0,i.Xp)(e.y,4),lon:(0,i.Xp)(e.x,4)};localStorage.setItem("latLonQuery",document.getElementById("txtAddress").value),localStorage.setItem("latLon",JSON.stringify(n)),y(n,t)},h=()=>(document.fullscreenElement?f():m(),(0,a.yA)()?(0,r.Z)(!0):(0,r.Z)(!1),T(),!1),m=()=>{const e=document.getElementById("divTwc"),t=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;t?t.call(e,{navigat
|