Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd63500117 |
No files matched your search
+3
-4
@@ -40,9 +40,9 @@ GEM
|
|||||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||||
rb-inotify (~> 0.9, >= 0.9.10)
|
rb-inotify (~> 0.9, >= 0.9.10)
|
||||||
logger (1.7.0)
|
logger (1.7.0)
|
||||||
minitest (6.1.0)
|
minitest (6.0.6)
|
||||||
drb (~> 2.0)
|
drb (~> 2.0)
|
||||||
prism (>= 1.5, < 3)
|
prism (~> 1.5)
|
||||||
multi_json (1.21.1)
|
multi_json (1.21.1)
|
||||||
multi_xml (0.9.1)
|
multi_xml (0.9.1)
|
||||||
bigdecimal (>= 3.1, < 5)
|
bigdecimal (>= 3.1, < 5)
|
||||||
@@ -132,7 +132,6 @@ CHECKSUMS
|
|||||||
auth-sanitizer (0.2.5) sha256=eec0f5ee354931a1431be6f7025bc38d03db1731a2185726cbe6248e49bee177
|
auth-sanitizer (0.2.5) sha256=eec0f5ee354931a1431be6f7025bc38d03db1731a2185726cbe6248e49bee177
|
||||||
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
|
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
|
||||||
bigdecimal (4.1.3) sha256=61ebe1e5e559bdc3cc6f2c0ee7f427321fc838f59611c294356eb04d6e21cf66
|
bigdecimal (4.1.3) sha256=61ebe1e5e559bdc3cc6f2c0ee7f427321fc838f59611c294356eb04d6e21cf66
|
||||||
bundler (4.0.20) sha256=7978a8ac648767f5e635bc522445b79e80a52b907a39a36c2d8085ed6bc762ae
|
|
||||||
domain_name (0.6.20260902) sha256=4fac7f8e0a77dc85ec02f6534fdeff38e143d434ab8a86528fe68ca5bc45a042
|
domain_name (0.6.20260902) sha256=4fac7f8e0a77dc85ec02f6534fdeff38e143d434ab8a86528fe68ca5bc45a042
|
||||||
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
||||||
faraday (2.15.1) sha256=8708154deda739c5e86cc42b74960e23e8491fce0eba9e11639a6a34b1ac288f
|
faraday (2.15.1) sha256=8708154deda739c5e86cc42b74960e23e8491fce0eba9e11639a6a34b1ac288f
|
||||||
@@ -154,7 +153,7 @@ CHECKSUMS
|
|||||||
jwt (3.3.0) sha256=44cc34fbc341c148233cf66641522b4bce0dfb1ce55e8073f05c56f44f4ee546
|
jwt (3.3.0) sha256=44cc34fbc341c148233cf66641522b4bce0dfb1ce55e8073f05c56f44f4ee546
|
||||||
listen (3.10.0) sha256=c6e182db62143aeccc2e1960033bebe7445309c7272061979bb098d03760c9d2
|
listen (3.10.0) sha256=c6e182db62143aeccc2e1960033bebe7445309c7272061979bb098d03760c9d2
|
||||||
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
|
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
|
||||||
minitest (6.1.0) sha256=ff373595aa8888631e8a5463986a76b3845346ae6d7fa46e139c1633d418076e
|
minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1
|
||||||
multi_json (1.21.1) sha256=e6126a31808e3b4d19f483c775ceac34df190dffa62adfb63a165ee14ba68080
|
multi_json (1.21.1) sha256=e6126a31808e3b4d19f483c775ceac34df190dffa62adfb63a165ee14ba68080
|
||||||
multi_xml (0.9.1) sha256=7ce766b59c17241ed62976caeae1fae9b2431b263398c35396239a68c4a64e57
|
multi_xml (0.9.1) sha256=7ce766b59c17241ed62976caeae1fae9b2431b263398c35396239a68c4a64e57
|
||||||
mustermann (3.1.1) sha256=4c6170c7234d5499c345562ba7c7dfe73e1754286dcc1abb053064d66a127198
|
mustermann (3.1.1) sha256=4c6170c7234d5499c345562ba7c7dfe73e1754286dcc1abb053064d66a127198
|
||||||
|
|||||||
Generated
+8
-8
@@ -9,9 +9,9 @@
|
|||||||
"flag-icons": "7.6.0",
|
"flag-icons": "7.6.0",
|
||||||
"maplibre-contour": "0.1.1",
|
"maplibre-contour": "0.1.1",
|
||||||
"maplibre-gl": "6.17.0",
|
"maplibre-gl": "6.17.0",
|
||||||
"maplibre-gl-lanes": "1.4.1",
|
"maplibre-gl-lanes": "1.4.0",
|
||||||
"pmtiles": "4.5.0",
|
"pmtiles": "4.5.0",
|
||||||
"suncalc": "2.1.3"
|
"suncalc": "2.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@mapbox/jsonlint-lines-primitives": {
|
"node_modules/@mapbox/jsonlint-lines-primitives": {
|
||||||
@@ -210,9 +210,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/maplibre-gl-lanes": {
|
"node_modules/maplibre-gl-lanes": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/maplibre-gl-lanes/-/maplibre-gl-lanes-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/maplibre-gl-lanes/-/maplibre-gl-lanes-1.4.0.tgz",
|
||||||
"integrity": "sha512-xlq/bUfbRG/7dXd+P5jZkXOW0FA2RwadNNv8KR8LLzNuiZUWuqQxXmPlk3PXNoCWNMFQ3aaro6BSgFQpNomlhg==",
|
"integrity": "sha512-N4zVCmit4uMyoJ4OF/38NBhXp8DMR9NxBcuZ0aew6QuvbRgI8gQh2dAHQWSM7OGG+QvoUN+ffbancggXpBtlww==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -304,9 +304,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/suncalc": {
|
"node_modules/suncalc": {
|
||||||
"version": "2.1.3",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/suncalc/-/suncalc-2.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/suncalc/-/suncalc-2.1.1.tgz",
|
||||||
"integrity": "sha512-7DWCsxPKRPMtylyGqSrgNBr+pseyczJGqb4NCpW2EziwNHaSuHc9w1lL4i91IyDw5CnPUWqBNBWyd/vFjr4rTw==",
|
"integrity": "sha512-ufMOPzYRk5aomEs3g+qeJGdCPZWC3TL94E0HQagoSusFnNXCvfuewWBroY3lxRHqA7IA8UGvgg7dcrSSDJsuEg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/tinyqueue": {
|
"node_modules/tinyqueue": {
|
||||||
|
|||||||
+2
-2
@@ -6,8 +6,8 @@
|
|||||||
"flag-icons": "7.6.0",
|
"flag-icons": "7.6.0",
|
||||||
"maplibre-contour": "0.1.1",
|
"maplibre-contour": "0.1.1",
|
||||||
"maplibre-gl": "6.17.0",
|
"maplibre-gl": "6.17.0",
|
||||||
"maplibre-gl-lanes": "1.4.1",
|
"maplibre-gl-lanes": "1.4.0",
|
||||||
"pmtiles": "4.5.0",
|
"pmtiles": "4.5.0",
|
||||||
"suncalc": "2.1.3"
|
"suncalc": "2.1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-14
@@ -1373,7 +1373,7 @@ function getWorker(kind) {
|
|||||||
if (failed[kind] || typeof Worker > "u") return null;
|
if (failed[kind] || typeof Worker > "u") return null;
|
||||||
let worker;
|
let worker;
|
||||||
try {
|
try {
|
||||||
blobUrl || (blobUrl = URL.createObjectURL(new Blob(['"use strict";(()=>{var Rn=Object.defineProperty;var Tn=(e,n,t)=>n in e?Rn(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var G=(e,n,t)=>Tn(e,typeof n!="symbol"?n+"":n,t);function Se(e){let n=e.edges.map(o=>({...o,direction:new Map(o.direction??[]),order:o.order.slice()})),t=e.routes?new Map(e.routes.map(o=>[o.id,o])):new Map(e.routeIds.map(o=>[o,{id:o,color:"#000"}]));return{nodes:e.nodes,edges:n,routes:t,chains:new Map(e.chains)}}function Ie(e){let n=e.length,t=new Uint32Array(n+1),o=0;for(let l=0;l<n;l++)o+=e[l].coords.length,t[l+1]=o;let r={coords:new Float64Array(o),anchors:new Float64Array(o),offsets:t,routeIds:[],route:new Uint32Array(n),looks:[],look:new Uint32Array(n),kind:new Uint8Array(n),travel:new Int8Array(n),startDistance:new Float64Array(n),edge:new Int32Array(n),node:new Int32Array(n),betweenU:new Int32Array(n),betweenV:new Int32Array(n)},s=new Map,u=new Map;for(let l=0;l<n;l++){let a=e[l],i=t[l];for(let m=0;m<a.coords.length;m++)r.coords[i+m]=a.coords[m],r.anchors[i+m]=a.anchors[m];let c=s.get(a.route);c===void 0&&(c=r.routeIds.push(a.route)-1,s.set(a.route,c));let d=u.get(a.look);d===void 0&&(d=r.looks.push(a.look)-1,u.set(a.look,d)),r.route[l]=c,r.look[l]=d,r.kind[l]=a.kind==="lane"?0:1,r.travel[l]=a.travel,r.startDistance[l]=a.startDistance,r.edge[l]=a.edge,r.node[l]=a.node??-1,r.betweenU[l]=a.between?a.between[0]:-1,r.betweenV[l]=a.between?a.between[1]:-1}return r}function Ve(e){return[e.coords.buffer,e.anchors.buffer,e.offsets.buffer,e.route.buffer,e.look.buffer,e.kind.buffer,e.travel.buffer,e.startDistance.buffer,e.edge.buffer,e.node.buffer,e.betweenU.buffer,e.betweenV.buffer]}function K(e){let n=0;for(let t=2;t<e.length;t+=2)n+=Math.hypot(e[t]-e[t-2],e[t+1]-e[t-1]);return n}function W(e){let n=new Array(e.length);for(let t=0,o=e.length-2;t<e.length;t+=2,o-=2)n[t]=e[o],n[t+1]=e[o+1];return n}function ne(e){for(let n=2;n<e.length;n+=2){let t=e[n]-e[0],o=e[n+1]-e[1],r=Math.hypot(t,o);if(r>0)return[t/r,o/r]}return[0,0]}function te(e){let n=e.length;for(let t=n-4;t>=0;t-=2){let o=e[n-2]-e[t],r=e[n-1]-e[t+1],s=Math.hypot(o,r);if(s>0)return[o/s,r/s]}return[0,0]}function Xe(e,n){let t=Ze(e,n),o=t[0]-e[0],r=t[1]-e[1],s=Math.hypot(o,r);return s>0?[o/s,r/s]:ne(e)}function Ce(e,n){let t=e.length,o=Ze(W(e),n),r=e[t-2]-o[0],s=e[t-1]-o[1],u=Math.hypot(r,s);return u>0?[r/u,s/u]:te(e)}function Ze(e,n){let t=0;for(let o=2;o<e.length;o+=2){let r=Math.hypot(e[o]-e[o-2],e[o+1]-e[o-1]);if(t+r>=n){let s=r>0?(n-t)/r:0;return[e[o-2]+(e[o]-e[o-2])*s,e[o-1]+(e[o+1]-e[o-1])*s]}t+=r}return[e[e.length-2],e[e.length-1]]}function ue(e,n,t,o=.2){let r=e.length/2,s=new Float64Array(Math.max(0,r-1)),u=0;for(let m=0;m<r-1;m++)s[m]=Math.hypot(e[m*2+2]-e[m*2],e[m*2+3]-e[m*2+1]),u+=s[m];if(u<=0)return e.slice();let l=u*(1-o);if(n+t>l){let m=l/(n+t);n*=m,t*=m}let a=ze(e,s,n),i=ze(e,s,u-t),c=[a.x,a.y],d=0;for(let m=0;m<r-1;m++)d+=s[m],d>n&&d<u-t&&c.push(e[m*2+2],e[m*2+3]);return c.push(i.x,i.y),c}function ze(e,n,t){if(t<=0)return{x:e[0],y:e[1]};let o=0;for(let r=0;r<n.length;r++){let s=n[r];if(o+s>=t){let u=s>0?(t-o)/s:0;return{x:e[r*2]+(e[r*2+2]-e[r*2])*u,y:e[r*2+1]+(e[r*2+3]-e[r*2+1])*u}}o+=s}return{x:e[e.length-2],y:e[e.length-1]}}function pe(e,n){let t=e.length/2;if(t<=2||n<=0)return e.slice();let o=new Uint8Array(t);o[0]=1,o[t-1]=1;let r=n*n,s=[0,t-1];for(;s.length;){let l=s.pop(),a=s.pop(),i=0,c=-1,d=e[a*2],m=e[a*2+1],b=e[l*2],f=e[l*2+1];for(let h=a+1;h<l;h++){let p=He(e[h*2],e[h*2+1],d,m,b,f);p>i&&(i=p,c=h)}i>r&&c>0&&(o[c]=1,s.push(a,c,c,l))}let u=[];for(let l=0;l<t;l++)o[l]&&u.push(e[l*2],e[l*2+1]);return u}function Je(e){let n=e.length/2,t=new Float64Array(n);if(n===0||(t[0]=1/0,t[n-1]=1/0,n<=2))return t;let o=[0,n-1],r=[1/0];for(;o.length;){let s=o.pop(),u=o.pop(),l=r.pop(),a=0,i=-1,c=e[u*2],d=e[u*2+1],m=e[s*2],b=e[s*2+1];for(let f=u+1;f<s;f++){let h=He(e[f*2],e[f*2+1],c,d,m,b);h>a&&(a=h,i=f)}if(a>0&&i>0){let f=a<l?a:l;t[i]=f,o.push(u,i,i,s),r.push(f,f)}}return t}function Ye(e,n,t){let o=e.length/2;if(o<=2||t<=0)return e.slice();let r=t*t,s=[];for(let u=0;u<o;u++)n[u]>r&&s.push(e[u*2],e[u*2+1]);return s}function He(e,n,t,o,r,s){let u=r-t,l=s-o,a=u*u+l*l;if(a>0){let i=Math.max(0,Math.min(1,((e-t)*u+(n-o)*l)/a));u=t+u*i,l=o+l*i}else u=t,l=o;return(e-u)*(e-u)+(n-l)*(n-l)}function Ke(e,n=1e-9){let t=[];for(let o=0;o<e.length;o+=2){let r=t.length;r>=2&&Math.abs(t[r-2]-e[o])<n&&Math.abs(t[r-1]-e[o+1])<n||t.push(e[o],e[o+1])}return t}var qe=12,Nn=8;function Qe(e,n,t=Math.PI/9){return H(e,n,t).points}function H(e,n,t=Math.PI/9){let o=Ke(e),r=o.length/2;if(r<2||n===0)return{points:o.slice(),anchors:o.slice()};let s=new Float64Array((r-1)*4);for(let i=0;i<r-1;i++){let c=o[i*2],d=o[i*2+1],m=o[i*2+2],b=o[i*2+3],f=m-c,h=b-d,p=Math.hypot(f,h),g=h/p,A=-f/p;s[i*4]=c+g*n,s[i*4+1]=d+A*n,s[i*4+2]=m+g*n,s[i*4+3]=b+A*n}let u=[s[0],s[1]],l=[o[0],o[1]];for(let i=1;i<r-1;i++){let c=(i-1)*4,d=i*4,m=s[c],b=s[c+1],f=s[c+2],h=s[c+3],p=s[d],g=s[d+1],A=s[d+2],M=s[d+3],yLine truncated
|
blobUrl || (blobUrl = URL.createObjectURL(new Blob(['"use strict";(()=>{var Rn=Object.defineProperty;var Tn=(e,n,t)=>n in e?Rn(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var G=(e,n,t)=>Tn(e,typeof n!="symbol"?n+"":n,t);function Se(e){let n=e.edges.map(o=>({...o,direction:new Map(o.direction??[]),order:o.order.slice()})),t=e.routes?new Map(e.routes.map(o=>[o.id,o])):new Map(e.routeIds.map(o=>[o,{id:o,color:"#000"}]));return{nodes:e.nodes,edges:n,routes:t,chains:new Map(e.chains)}}function Ie(e){let n=e.length,t=new Uint32Array(n+1),o=0;for(let l=0;l<n;l++)o+=e[l].coords.length,t[l+1]=o;let r={coords:new Float64Array(o),anchors:new Float64Array(o),offsets:t,routeIds:[],route:new Uint32Array(n),looks:[],look:new Uint32Array(n),kind:new Uint8Array(n),travel:new Int8Array(n),startDistance:new Float64Array(n),edge:new Int32Array(n),node:new Int32Array(n),betweenU:new Int32Array(n),betweenV:new Int32Array(n)},s=new Map,u=new Map;for(let l=0;l<n;l++){let a=e[l],i=t[l];for(let m=0;m<a.coords.length;m++)r.coords[i+m]=a.coords[m],r.anchors[i+m]=a.anchors[m];let c=s.get(a.route);c===void 0&&(c=r.routeIds.push(a.route)-1,s.set(a.route,c));let d=u.get(a.look);d===void 0&&(d=r.looks.push(a.look)-1,u.set(a.look,d)),r.route[l]=c,r.look[l]=d,r.kind[l]=a.kind==="lane"?0:1,r.travel[l]=a.travel,r.startDistance[l]=a.startDistance,r.edge[l]=a.edge,r.node[l]=a.node??-1,r.betweenU[l]=a.between?a.between[0]:-1,r.betweenV[l]=a.between?a.between[1]:-1}return r}function Ve(e){return[e.coords.buffer,e.anchors.buffer,e.offsets.buffer,e.route.buffer,e.look.buffer,e.kind.buffer,e.travel.buffer,e.startDistance.buffer,e.edge.buffer,e.node.buffer,e.betweenU.buffer,e.betweenV.buffer]}function K(e){let n=0;for(let t=2;t<e.length;t+=2)n+=Math.hypot(e[t]-e[t-2],e[t+1]-e[t-1]);return n}function W(e){let n=new Array(e.length);for(let t=0,o=e.length-2;t<e.length;t+=2,o-=2)n[t]=e[o],n[t+1]=e[o+1];return n}function ne(e){for(let n=2;n<e.length;n+=2){let t=e[n]-e[0],o=e[n+1]-e[1],r=Math.hypot(t,o);if(r>0)return[t/r,o/r]}return[0,0]}function te(e){let n=e.length;for(let t=n-4;t>=0;t-=2){let o=e[n-2]-e[t],r=e[n-1]-e[t+1],s=Math.hypot(o,r);if(s>0)return[o/s,r/s]}return[0,0]}function Xe(e,n){let t=Ze(e,n),o=t[0]-e[0],r=t[1]-e[1],s=Math.hypot(o,r);return s>0?[o/s,r/s]:ne(e)}function Ce(e,n){let t=e.length,o=Ze(W(e),n),r=e[t-2]-o[0],s=e[t-1]-o[1],u=Math.hypot(r,s);return u>0?[r/u,s/u]:te(e)}function Ze(e,n){let t=0;for(let o=2;o<e.length;o+=2){let r=Math.hypot(e[o]-e[o-2],e[o+1]-e[o-1]);if(t+r>=n){let s=r>0?(n-t)/r:0;return[e[o-2]+(e[o]-e[o-2])*s,e[o-1]+(e[o+1]-e[o-1])*s]}t+=r}return[e[e.length-2],e[e.length-1]]}function ue(e,n,t,o=.2){let r=e.length/2,s=new Float64Array(Math.max(0,r-1)),u=0;for(let m=0;m<r-1;m++)s[m]=Math.hypot(e[m*2+2]-e[m*2],e[m*2+3]-e[m*2+1]),u+=s[m];if(u<=0)return e.slice();let l=u*(1-o);if(n+t>l){let m=l/(n+t);n*=m,t*=m}let a=ze(e,s,n),i=ze(e,s,u-t),c=[a.x,a.y],d=0;for(let m=0;m<r-1;m++)d+=s[m],d>n&&d<u-t&&c.push(e[m*2+2],e[m*2+3]);return c.push(i.x,i.y),c}function ze(e,n,t){if(t<=0)return{x:e[0],y:e[1]};let o=0;for(let r=0;r<n.length;r++){let s=n[r];if(o+s>=t){let u=s>0?(t-o)/s:0;return{x:e[r*2]+(e[r*2+2]-e[r*2])*u,y:e[r*2+1]+(e[r*2+3]-e[r*2+1])*u}}o+=s}return{x:e[e.length-2],y:e[e.length-1]}}function pe(e,n){let t=e.length/2;if(t<=2||n<=0)return e.slice();let o=new Uint8Array(t);o[0]=1,o[t-1]=1;let r=n*n,s=[0,t-1];for(;s.length;){let l=s.pop(),a=s.pop(),i=0,c=-1,d=e[a*2],m=e[a*2+1],p=e[l*2],f=e[l*2+1];for(let h=a+1;h<l;h++){let b=He(e[h*2],e[h*2+1],d,m,p,f);b>i&&(i=b,c=h)}i>r&&c>0&&(o[c]=1,s.push(a,c,c,l))}let u=[];for(let l=0;l<t;l++)o[l]&&u.push(e[l*2],e[l*2+1]);return u}function Je(e){let n=e.length/2,t=new Float64Array(n);if(n===0||(t[0]=1/0,t[n-1]=1/0,n<=2))return t;let o=[0,n-1],r=[1/0];for(;o.length;){let s=o.pop(),u=o.pop(),l=r.pop(),a=0,i=-1,c=e[u*2],d=e[u*2+1],m=e[s*2],p=e[s*2+1];for(let f=u+1;f<s;f++){let h=He(e[f*2],e[f*2+1],c,d,m,p);h>a&&(a=h,i=f)}if(a>0&&i>0){let f=a<l?a:l;t[i]=f,o.push(u,i,i,s),r.push(f,f)}}return t}function Ye(e,n,t){let o=e.length/2;if(o<=2||t<=0)return e.slice();let r=t*t,s=[];for(let u=0;u<o;u++)n[u]>r&&s.push(e[u*2],e[u*2+1]);return s}function He(e,n,t,o,r,s){let u=r-t,l=s-o,a=u*u+l*l;if(a>0){let i=Math.max(0,Math.min(1,((e-t)*u+(n-o)*l)/a));u=t+u*i,l=o+l*i}else u=t,l=o;return(e-u)*(e-u)+(n-l)*(n-l)}function Ke(e,n=1e-9){let t=[];for(let o=0;o<e.length;o+=2){let r=t.length;r>=2&&Math.abs(t[r-2]-e[o])<n&&Math.abs(t[r-1]-e[o+1])<n||t.push(e[o],e[o+1])}return t}var qe=12,Nn=8;function Qe(e,n,t=Math.PI/9){return H(e,n,t).points}function H(e,n,t=Math.PI/9){let o=Ke(e),r=o.length/2;if(r<2||n===0)return{points:o.slice(),anchors:o.slice()};let s=new Float64Array((r-1)*4);for(let i=0;i<r-1;i++){let c=o[i*2],d=o[i*2+1],m=o[i*2+2],p=o[i*2+3],f=m-c,h=p-d,b=Math.hypot(f,h),g=h/b,A=-f/b;s[i*4]=c+g*n,s[i*4+1]=d+A*n,s[i*4+2]=m+g*n,s[i*4+3]=p+A*n}let u=[s[0],s[1]],l=[o[0],o[1]];for(let i=1;i<r-1;i++){let c=(i-1)*4,d=i*4,m=s[c],p=s[c+1],f=s[c+2],h=s[c+3],b=s[d],g=s[d+1],A=s[d+2],M=s[d+3],yLine truncated
|
||||||
} catch {
|
} catch {
|
||||||
return failed[kind] = !0, null;
|
return failed[kind] = !0, null;
|
||||||
}
|
}
|
||||||
@@ -2236,11 +2236,7 @@ function cutDirection(st, edge, end, leaving = !1) {
|
|||||||
return d[0] === 0 && d[1] === 0 ? null : leaving ? [-d[0], -d[1]] : d;
|
return d[0] === 0 && d[1] === 0 ? null : leaving ? [-d[0], -d[1]] : d;
|
||||||
}
|
}
|
||||||
function leavesLine(st, m, coords) {
|
function leavesLine(st, m, coords) {
|
||||||
let uPx = preparedPx(st, m.pu.edge), vPx = preparedPx(st, m.pv.edge), line = lastPortion(m.pu.end === "b" ? uPx : reversed(uPx), m.pu.end === "b" ? st.frontB[m.pu.edge] : st.frontA[m.pu.edge]).concat(firstPortion(m.pv.end === "a" ? vPx : reversed(vPx), m.pv.end === "a" ? st.frontA[m.pv.edge] : st.frontB[m.pv.edge])), limit = Math.max(Math.abs(m.lateral), Math.abs(m.lateralOut)) + FOLLOW_ABOVE_LANES * st.spacing, g = st.graph;
|
let uPx = preparedPx(st, m.pu.edge), vPx = preparedPx(st, m.pv.edge), line = lastPortion(m.pu.end === "b" ? uPx : reversed(uPx), m.pu.end === "b" ? st.frontB[m.pu.edge] : st.frontA[m.pu.edge]).concat(firstPortion(m.pv.end === "a" ? vPx : reversed(vPx), m.pv.end === "a" ? st.frontA[m.pv.edge] : st.frontB[m.pv.edge])), limit = Math.max(Math.abs(m.lateral), Math.abs(m.lateralOut)) + FOLLOW_ABOVE_LANES * st.spacing;
|
||||||
if (g.edges[m.pu.edge].order.length === 1 && g.edges[m.pv.edge].order.length === 1) {
|
|
||||||
let node = g.nodes[m.pu.node], cover = Math.max(Math.abs(m.lateral), Math.abs(m.lateralOut)) + st.width / 2 + st.casing;
|
|
||||||
if (distToPolyline(node.x * st.scale, node.y * st.scale, coords) > cover) return !0;
|
|
||||||
}
|
|
||||||
for (let i = 0; i < coords.length; i += 2) {
|
for (let i = 0; i < coords.length; i += 2) {
|
||||||
let within = !1;
|
let within = !1;
|
||||||
for (let k = 2; k < line.length && !within; k += 2) {
|
for (let k = 2; k < line.length && !within; k += 2) {
|
||||||
@@ -2251,14 +2247,6 @@ function leavesLine(st, m, coords) {
|
|||||||
}
|
}
|
||||||
return !1;
|
return !1;
|
||||||
}
|
}
|
||||||
function distToPolyline(x, y, p) {
|
|
||||||
let best = 1 / 0;
|
|
||||||
for (let k = 2; k < p.length; k += 2) {
|
|
||||||
let x1 = p[k - 2], y1 = p[k - 1], dx = p[k] - x1, dy = p[k + 1] - y1, len = dx * dx + dy * dy, t = len ? Math.max(0, Math.min(1, ((x - x1) * dx + (y - y1) * dy) / len)) : 0;
|
|
||||||
best = Math.min(best, Math.hypot(x - x1 - t * dx, y - y1 - t * dy));
|
|
||||||
}
|
|
||||||
return best;
|
|
||||||
}
|
|
||||||
function buildTailConnector(st, m, clique) {
|
function buildTailConnector(st, m, clique) {
|
||||||
let t = m.plan.tail, p = m.pu, step = t.edges[t.side === "end" ? 0 : t.edges.length - 1], portLane = laneOf(st, p.edge, t.route), lane = laneOf(st, step.edge, t.route), tailPts = step.forward ? lane.points : reversed(lane.points), from = t.side === "end" ? p.end === "b" ? portLane.points : reversed(portLane.points) : tailPts, to = t.side === "end" ? tailPts : p.end === "a" ? portLane.points : reversed(portLane.points), made = connector(from, to, st.spacing);
|
let t = m.plan.tail, p = m.pu, step = t.edges[t.side === "end" ? 0 : t.edges.length - 1], portLane = laneOf(st, p.edge, t.route), lane = laneOf(st, step.edge, t.route), tailPts = step.forward ? lane.points : reversed(lane.points), from = t.side === "end" ? p.end === "b" ? portLane.points : reversed(portLane.points) : tailPts, to = t.side === "end" ? tailPts : p.end === "a" ? portLane.points : reversed(portLane.points), made = connector(from, to, st.spacing);
|
||||||
made.coords.length < 4 || clique.push({ member: m, lateral: 0, own: made.coords, coords: made.coords, corner: made.corner });
|
made.coords.length < 4 || clique.push({ member: m, lateral: 0, own: made.coords, coords: made.coords, corner: made.corner });
|
||||||
|
|||||||
Vendored
+20
-55
@@ -139,36 +139,22 @@ function solarTransit(dt, lw) {
|
|||||||
return dt;
|
return dt;
|
||||||
}
|
}
|
||||||
|
|
||||||
// time the Sun reaches altitude h0 within the half day [a, b] between transit and nadir, given the
|
// time the Sun reaches altitude h0 on the given side of transit (sign -1 = rise, +1 = set);
|
||||||
// sine of its altitude at both ends; NaN if it doesn't cross h0 there (altitude is monotonic over the
|
// starts from the hour angle at transit and converges with Meeus' altitude correction (15.2).
|
||||||
// half day, so a sign change means exactly one crossing). Seeds from the hour angle at transit
|
function getSetJ(h0, dt, sign, lw, phi, decT) {
|
||||||
// declination, then Newton on sin(h) kept inside a shrinking bracket, bisecting whenever a step
|
const cosH0 = (sin(h0) - sin(phi) * sin(decT)) / (cos(phi) * cos(decT));
|
||||||
// leaves it — on near-grazing days the slope is tiny and plain Newton steps land days away.
|
if (cosH0 < -1 || cosH0 > 1) return NaN; // sun stays above / below this altitude all day
|
||||||
function getSetJ(h0, a, b, sa, sb, dt, lw, phi, decT) {
|
|
||||||
const s0 = sin(h0);
|
|
||||||
const rising = sa < sb;
|
|
||||||
if ((sa - s0) * (sb - s0) > 0) return NaN; // sun stays above / below this altitude all half day
|
|
||||||
|
|
||||||
const cosH0 = (s0 - sin(phi) * sin(decT)) / (cos(phi) * cos(decT));
|
let d = dt + sign * acos(cosH0) / (2 * PI);
|
||||||
const H0 = cosH0 <= -1 ? PI : cosH0 >= 1 ? 0 : acos(cosH0);
|
for (let i = 0; i < 2; i++) {
|
||||||
let d = dt + (rising ? -H0 : H0) / (2 * PI);
|
|
||||||
|
|
||||||
for (;;) {
|
|
||||||
const c = sunCoords(toDaysTT(d));
|
const c = sunCoords(toDaysTT(d));
|
||||||
const H = siderealTime(d, lw) - c.ra;
|
const H = wrapPi(siderealTime(d, lw) - c.ra);
|
||||||
const k = cos(phi) * cos(c.dec);
|
const h = altitude(H, phi, c.dec);
|
||||||
const f = sin(phi) * sin(c.dec) + k * cos(H) - s0;
|
const sinH = cos(phi) * cos(c.dec) * sin(H);
|
||||||
if ((f < 0) === rising) a = d; else b = d;
|
if (abs(sinH) < 1e-6) break; // grazing the horizon — correction is ill-conditioned
|
||||||
|
d += (h - h0) / (2 * PI * sinH);
|
||||||
const step = f / (2 * PI * k * sin(H));
|
|
||||||
if (d + step > a && d + step < b) {
|
|
||||||
d += step;
|
|
||||||
if (abs(step) < 1e-5) return d; // ~1 s step, so quadratic convergence leaves ~µs error
|
|
||||||
} else {
|
|
||||||
d = (a + b) / 2;
|
|
||||||
if (b - a < 1e-8) return d;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
// start of the civil day containing date in a zone utcOffset minutes ahead of UTC, as a ms timestamp
|
// start of the civil day containing date in a zone utcOffset minutes ahead of UTC, as a ms timestamp
|
||||||
@@ -196,45 +182,24 @@ export function getTimes(date, lat, lng, height = 0, utcOffset) {
|
|||||||
const dt = solarDayTransit(date, lw, utcOffset);
|
const dt = solarDayTransit(date, lw, utcOffset);
|
||||||
const dec = sunCoords(toDaysTT(dt)).dec; // declination at transit, shared by every rise/set solve
|
const dec = sunCoords(toDaysTT(dt)).dec; // declination at transit, shared by every rise/set solve
|
||||||
|
|
||||||
// sine of the Sun's altitude at transit and at the nadirs either side (H = 0 and π), bracketing
|
|
||||||
// every rise and set; the nadirs use their own declination, which matters on regime-boundary days
|
|
||||||
const sNoon = cos(phi - dec);
|
|
||||||
const sNadir1 = -cos(phi + sunCoords(toDaysTT(dt - 0.5)).dec);
|
|
||||||
const sNadir2 = -cos(phi + sunCoords(toDaysTT(dt + 0.5)).dec);
|
|
||||||
|
|
||||||
// the window is the solar day [dt - 0.5, dt + 0.5), or with an offset the civil day, which is just as
|
|
||||||
// long but shifted by up to half a day: it then also takes in the evening of the previous solar day
|
|
||||||
// or the morning of the next one, where events cut off from this solar day are looked up instead
|
|
||||||
const start = utcOffset === undefined ? dt - 0.5 : toDays(civilMidnight(date, utcOffset));
|
|
||||||
const end = start + 1;
|
|
||||||
const prev = start < dt - 0.5;
|
|
||||||
const next = end > dt + 0.5;
|
|
||||||
const dt2 = prev ? solarTransit(dt - 1, lw) : next ? solarTransit(dt + 1, lw) : dt;
|
|
||||||
const dec2 = dt2 === dt ? dec : sunCoords(toDaysTT(dt2)).dec;
|
|
||||||
const sNoon2 = cos(phi - dec2);
|
|
||||||
|
|
||||||
// solar days run up to ~30 s longer than 24 h, so a civil day can miss a nadir by seconds; keep
|
|
||||||
// this solar day's one then
|
|
||||||
const result = {
|
const result = {
|
||||||
solarNoon: fromJulian(dt + J2000),
|
solarNoon: fromJulian(dt + J2000),
|
||||||
nadir: fromJulian((next && dt2 - 0.5 < end ? dt2 : dt) - 0.5 + J2000)
|
nadir: fromJulian(dt + J2000 - 0.5)
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const [angle, riseName, setName] of times) {
|
for (const [angle, riseName, setName] of times) {
|
||||||
const h0 = (angle + dh) * rad;
|
const h0 = (angle + dh) * rad;
|
||||||
let jrise = getSetJ(h0, dt - 0.5, dt, sNadir1, sNoon, dt, lw, phi, dec);
|
const jrise = getSetJ(h0, dt, -1, lw, phi, dec);
|
||||||
let jset = getSetJ(h0, dt, dt + 0.5, sNoon, sNadir2, dt, lw, phi, dec);
|
const jset = getSetJ(h0, dt, 1, lw, phi, dec);
|
||||||
if (next && !(jrise >= start)) jrise = getSetJ(h0, dt + 0.5, dt2, sNadir2, sNoon2, dt2, lw, phi, dec2);
|
|
||||||
if (prev && !(jset < end)) jset = getSetJ(h0, dt2, dt - 0.5, sNoon2, sNadir1, dt2, lw, phi, dec2);
|
|
||||||
|
|
||||||
// NaN (the Sun never reaches this altitude) or outside the window: report null, not Invalid Date
|
// a NaN means the Sun never reaches this altitude on this day — report null, not Invalid Date
|
||||||
result[riseName] = jrise >= start && jrise < end ? fromJulian(jrise + J2000) : null;
|
result[riseName] = Number.isNaN(jrise) ? null : fromJulian(jrise + J2000);
|
||||||
result[setName] = jset >= start && jset < end ? fromJulian(jset + J2000) : null;
|
result[setName] = Number.isNaN(jset) ? null : fromJulian(jset + J2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// polar day/night: when the Sun never crosses the standard rise/set altitude, flag which side it
|
// polar day/night: when the Sun never crosses the standard rise/set altitude, flag which side it
|
||||||
// stays on by comparing its altitude at solar noon (its daily maximum) against that threshold.
|
// stays on by comparing its altitude at solar noon (its daily maximum) against that threshold.
|
||||||
if (result.sunrise === null && result.sunset === null) {
|
if (result.sunrise === null) {
|
||||||
const noonAlt = altitude(0, phi, dec);
|
const noonAlt = altitude(0, phi, dec);
|
||||||
const riseSetAlt = (times[0][0] + dh) * rad;
|
const riseSetAlt = (times[0][0] + dh) * rad;
|
||||||
result.alwaysUp = noonAlt > riseSetAlt;
|
result.alwaysUp = noonAlt > riseSetAlt;
|
||||||
|
|||||||
Reference in new issue
Block a user