1(function(){"use strict";function l(n,t){var i=(n*3600-169028.66)/1e4,r=(t*3600-26782.5)/1e4;return{E:2600072.37+211455.93*r-10938.51*r*i-.36*r*i*i-44.54*r*r*r,N:1200147.07+308807.95*i+3745.25*r*r+76.63*i*i-194.56*r*r*i+119.79*i*i*i}}function a(n,t){var i=(n-26e5)/1e6,r=(t-12e5)/1e6,u=2.6779094+4.728982*i+.791484*i*r+.1306*i*r*r-.0436*i*i*i,f=16.9023892+3.238272*r-.270978*i*i-.002528*r*r-.0447*i*i*r-.014*r*r*r;return{lat:f*100/36,lng:u*100/36}}function v(n,t){return n>=45.6&&n<=48&&t>=5.7&&t<=10.8}function o(n,t){if(!v(n,t))return null;var i=l(n,t);return{E:Math.round(i.E*10)/10,N:Math.round(i.N*10)/10,e03:Math.round((i.E-2e6)*10)/10,n03:Math.round((i.N-1e6)*10)/10}}function f(n,t){if(!(n>=245e4&&n<=285e4)||!(t>=106e4&&t<=131e4))return null;var i=a(n,t);return v(i.lat,i.lng)?i:null}function s(n,t){return!(n>=45e4&&n<=85e4)||!(t>=6e4&&t<=31e4)?null:f(n+2e6,t+1e6)}function t(n,t){var i=window.WIML_I18N;return i&&i[n]||t}function i(n){return String(Math.round(n)).replace(/\B(?=(\d{3})+(?!\d))/g,"'")}function e(f,e,s){var h=o(f,e);if(n("sg-out").hidden=!1,!h){n("sg-lv95-out").textContent=t("t_outside_swiss_grid","Outside the Swiss grid");n("sg-lv03-out").textContent=t("t_sg_elsewhere","Switzerland and Liechtenstein only â neighbours have their own grids, and UTM/MGRS works worldwide.");n("sg-latlng-out").textContent=f.toFixed(6)+", "+e.toFixed(6);return}n("sg-lv95-out").textContent="E "+i(h.E)+" · N "+i(h.N);n("sg-lv03-out").textContent=i(h.e03)+" / "+i(h.n03);n("sg-latlng-out").textContent=f.toFixed(6)+", "+e.toFixed(6)+(s?" â "+s:"");r.loadLeaflet(function(){u||(u=r.makeMap("sg-map",{lat:f,lng:e},{zoom:14,staticPin:!0}));n("sg-map-card").hidden=!1;u.setPoint(f,e,14);u.map.invalidateSize()})}function p(n){var r=n.split(/[,/;]/),u,t,i,e,o,h,c;if(r.length!==2){if(u=n.match(/^(\d{6,7}(?:\.\d+)?)\s+(\d{6,7}(?:\.\d+)?)$/),!u)return null;r=[u[1],u[2]]}return(t=parseFloat(r[0].replace(/[\s'âʼ]/g,"")),i=parseFloat(r[1].replace(/[\s'âʼ]/g,"")),isNaN(t)||isNaN(i))?null:(e=function(n){return n>=24e5&&n<=29e5},o=function(n){return n>=1e6&&n<=135e4},e(t)&&o(i))?{kind:"LV95",r:f(t,i),E:t,N:i}:e(i)&&o(t)?{kind:"LV95",r:f(i,t),E:i,N:t}:(h=function(n){return n>=45e4&&n<=85e4},c=function(n){return n>=6e4&&n<=31e4},h(t)&&c(i)&&t>i)?{kind:"LV03",r:s(t,i),E:t,N:i}:h(i)&&c(t)&&i>t?{kind:"LV03",r:s(i,t),E:i,N:t}:null}function h(){var f=n("sg-q").value.trim(),u,o;if(f){if(u=/\d{6}/.test(f.replace(/[\s'âʼ]/g,""))?p(f):null,u){if(u.r){e(u.r.lat,u.r.lng,u.kind+" "+i(u.E)+" / "+i(u.N));n("sg-conv-status").textContent="";return}n("sg-conv-status").textContent=t("t_sg_out_of_range","That pair doesnât land in Switzerland â LV95 runs ~2,485,000â2,834,000 E / 1,075,000â1,296,000 N (LV03: minus 2,000,000 / 1,000,000).");return}if(o=r.coords.parseCoordinates(f),o){e(o.lat,o.lng,null);n("sg-conv-status").textContent="";return}n("sg-conv-status").textContent=t("t_resolving","Resolvingâ¦");r.resolveLocation(f).then(function(t){n("sg-conv-status").textContent="";e(t.lat,t.lng,t.label)}).catch(function(){n("sg-conv-status").textContent=t("t_sg_no_match","Not a Swiss pair, coordinates, or a findable place â try â2600667, 1199657â, â600667, 199657â, or a town name.")})}}var r=window.WIML=window.WIML||{},y,n,u,c;(r.swissgrid={toLV:o,fromLV95:f,fromLV03:s,_fwd:l,_inv:a},y=document.getElementById("swissgrid-tool"),y)&&(n=function(n){return document.getElementById(n)},u=null,n("btn-sg-locate").addEventListener("click",function(){if(!navigator.geolocation){n("sg-status").textContent=t("t_geolocation_not_supported","Geolocation not supported.");return}n("sg-status").textContent=t("t_getting_your_position","Getting your positionâ¦");navigator.geolocation.getCurrentPosition(function(r){n("sg-status").textContent="";n("sg-mine-card").hidden=!1;var u=o(r.coords.latitude,r.coords.longitude);if(!u){n("sg-mine").textContent=t("t_outside_swiss_grid","Outside the Swiss grid");n("sg-lv03").textContent=t("t_sg_ch_only","The Swiss grid covers Switzerland and Liechtenstein â see the notes below for neighbours.");return}n("sg-mine").textContent="E "+i(u.E)+" · N "+i(u.N);n("sg-lv03").textContent="LV03: "+i(u.e03)+" / "+i(u.n03)+(r.coords.accuracy?" (±"+Math.round(r.coords.accuracy)+" m GPS)":"")},function(){n("sg-status").textContent=t("t_osg_denied","Permission denied â you can still convert below.")},{enableHighAccuracy:!0,timeout:12e3,maximumAge:0})}),n("btn-sg-copy").addEventListener("click",function(){var i=n("sg-mine").textContent;i&&i!=="â"&&navigator.clipboard.writeText(i).then(function(){n("btn-sg-copy").textContent=t("t_copied","â Copied");setTimeout(function(){n("btn-sg-copy").textContent=t("t_copy","Copy")},1500)})}),n("btn-sg-go").addEventListener("click",h),n("sg-q").addEventListener("keydown",function(n){n.key==="Enter"&&(n.preventDefault(),h())}),n("sg-q").addEventListener("recent-selected",function(n){e(n.detail.lat,n.detail.lng,n.detail.name)}),c=new URLSearchParams(location.search).get("q"),c&&(n("sg-q").value=c,h()))})()
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.