diff --git a/assets/backend_bg.wasm b/assets/backend_bg.wasm index 69b4fe1..13d7f4e 100644 Binary files a/assets/backend_bg.wasm and b/assets/backend_bg.wasm differ diff --git a/assets/main-be82bd2f.js b/assets/main-e9b67758.js similarity index 99% rename from assets/main-be82bd2f.js rename to assets/main-e9b67758.js index b0bf77d..4ff2f27 100644 --- a/assets/main-be82bd2f.js +++ b/assets/main-e9b67758.js @@ -4,7 +4,7 @@ var UP=Object.defineProperty;var VP=(t,e,n)=>e in t?UP(t,e,{enumerable:!0,config * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 */const YE=Symbol("Comlink.proxy"),pM=Symbol("Comlink.endpoint"),dM=Symbol("Comlink.releaseProxy"),x0=Symbol("Comlink.finalizer"),qg=Symbol("Comlink.thrown"),KE=t=>typeof t=="object"&&t!==null||typeof t=="function",mM={canHandle:t=>KE(t)&&t[YE],serialize(t){const{port1:e,port2:n}=new MessageChannel;return e1(t,e),[n,[n]]},deserialize(t){return t.start(),$E(t)}},gM={canHandle:t=>KE(t)&&qg in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},JE=new Map([["proxy",mM],["throw",gM]]);function _M(t,e){for(const n of t)if(e===n||n==="*"||n instanceof RegExp&&n.test(e))return!0;return!1}function e1(t,e=globalThis,n=["*"]){e.addEventListener("message",function r(i){if(!i||!i.data)return;if(!_M(n,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:a,type:c,path:l}=Object.assign({path:[]},i.data),d=(i.data.argumentList||[]).map(Oc);let b;try{const w=l.slice(0,-1).reduce((C,k)=>C[k],t),E=l.reduce((C,k)=>C[k],t);switch(c){case"GET":b=E;break;case"SET":w[l.slice(-1)[0]]=Oc(i.data.value),b=!0;break;case"APPLY":b=E.apply(w,d);break;case"CONSTRUCT":{const C=new E(...d);b=t1(C)}break;case"ENDPOINT":{const{port1:C,port2:k}=new MessageChannel;e1(t,k),b=wM(C,[C])}break;case"RELEASE":b=void 0;break;default:return}}catch(w){b={value:w,[qg]:0}}Promise.resolve(b).catch(w=>({value:w,[qg]:0})).then(w=>{const[E,C]=o_(w);e.postMessage(Object.assign(Object.assign({},E),{id:a}),C),c==="RELEASE"&&(e.removeEventListener("message",r),QE(e),x0 in t&&typeof t[x0]=="function"&&t[x0]())}).catch(w=>{const[E,C]=o_({value:new TypeError("Unserializable return value"),[qg]:0});e.postMessage(Object.assign(Object.assign({},E),{id:a}),C)})}),e.start&&e.start()}function yM(t){return t.constructor.name==="MessagePort"}function QE(t){yM(t)&&t.close()}function $E(t,e){return $0(t,[],e)}function Ag(t){if(t)throw new Error("Proxy has been released and is not useable")}function eI(t){return _f(t,{type:"RELEASE"}).then(()=>{QE(t)})}const r_=new WeakMap,i_="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(r_.get(t)||0)-1;r_.set(t,e),e===0&&eI(t)});function vM(t,e){const n=(r_.get(e)||0)+1;r_.set(e,n),i_&&i_.register(t,e,t)}function bM(t){i_&&i_.unregister(t)}function $0(t,e=[],n=function(){}){let r=!1;const i=new Proxy(n,{get(a,c){if(Ag(r),c===dM)return()=>{bM(i),eI(t),r=!0};if(c==="then"){if(e.length===0)return{then:()=>i};const l=_f(t,{type:"GET",path:e.map(d=>d.toString())}).then(Oc);return l.then.bind(l)}return $0(t,[...e,c])},set(a,c,l){Ag(r);const[d,b]=o_(l);return _f(t,{type:"SET",path:[...e,c].map(w=>w.toString()),value:d},b).then(Oc)},apply(a,c,l){Ag(r);const d=e[e.length-1];if(d===pM)return _f(t,{type:"ENDPOINT"}).then(Oc);if(d==="bind")return $0(t,e.slice(0,-1));const[b,w]=Fx(l);return _f(t,{type:"APPLY",path:e.map(E=>E.toString()),argumentList:b},w).then(Oc)},construct(a,c){Ag(r);const[l,d]=Fx(c);return _f(t,{type:"CONSTRUCT",path:e.map(b=>b.toString()),argumentList:l},d).then(Oc)}});return vM(i,t),i}function xM(t){return Array.prototype.concat.apply([],t)}function Fx(t){const e=t.map(o_);return[e.map(n=>n[0]),xM(e.map(n=>n[1]))]}const tI=new WeakMap;function wM(t,e){return tI.set(t,e),t}function t1(t){return Object.assign(t,{[YE]:!0})}function o_(t){for(const[e,n]of JE)if(n.canHandle(t)){const[r,i]=n.serialize(t);return[{type:"HANDLER",name:e,value:r},i]}return[{type:"RAW",value:t},tI.get(t)||[]]}function Oc(t){switch(t.type){case"HANDLER":return JE.get(t.name).deserialize(t.value);case"RAW":return t.value}}function _f(t,e,n){return new Promise(r=>{const i=SM();t.addEventListener("message",function a(c){!c.data||!c.data.id||c.data.id!==i||(t.removeEventListener("message",a),r(c.data))}),t.start&&t.start(),t.postMessage(Object.assign({id:i},e),n)})}function SM(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}let kt;const eu=new Array(128).fill(void 0);eu.push(void 0,null,!0,!1);function mt(t){return eu[t]}let Dd=eu.length;function Ut(t){Dd===eu.length&&eu.push(eu.length+1);const e=Dd;return Dd=eu[e],eu[e]=t,e}function EM(t){t<132||(eu[t]=Dd,Dd=t)}function ea(t){const e=mt(t);return EM(t),e}const nI=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&nI.decode();let Cd=null;function Rd(){return(Cd===null||Cd.byteLength===0)&&(Cd=new Uint8Array(kt.memory.buffer)),Cd}function Hi(t,e){return t=t>>>0,nI.decode(Rd().subarray(t,t+e))}let vl=0;const Hg=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},IM=typeof Hg.encodeInto=="function"?function(t,e){return Hg.encodeInto(t,e)}:function(t,e){const n=Hg.encode(t);return e.set(n),{read:t.length,written:n.length}};function bf(t,e,n){if(n===void 0){const l=Hg.encode(t),d=e(l.length,1)>>>0;return Rd().subarray(d,d+l.length).set(l),vl=l.length,d}let r=t.length,i=e(r,1)>>>0;const a=Rd();let c=0;for(;c127)break;a[i+c]=l}if(c!==r){c!==0&&(t=t.slice(c)),i=n(i,r,r=c+t.length*3,1)>>>0;const l=Rd().subarray(i+c,i+r),d=IM(t,l);c+=d.written,i=n(i,r,c,1)>>>0}return vl=c,i}function ra(t){return t==null}let Td=null;function pn(){return(Td===null||Td.byteLength===0)&&(Td=new Int32Array(kt.memory.buffer)),Td}let Ld=null;function rI(){return(Ld===null||Ld.byteLength===0)&&(Ld=new Float64Array(kt.memory.buffer)),Ld}let Pd=null;function CM(){return(Pd===null||Pd.byteLength===0)&&(Pd=new BigInt64Array(kt.memory.buffer)),Pd}function ev(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){const i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){const i=t.length;let a="[";i>0&&(a+=ev(t[0]));for(let c=1;c1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} -${t.stack}`:r}const Bx=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>{kt.__wbindgen_export_2.get(t.dtor)(t.a,t.b)});function Ux(t,e,n,r){const i={a:t,b:e,cnt:1,dtor:n},a=(...c)=>{i.cnt++;const l=i.a;i.a=0;try{return r(l,i.b,...c)}finally{--i.cnt===0?(kt.__wbindgen_export_2.get(i.dtor)(l,i.b),Bx.unregister(i)):i.a=l}};return a.original=i,Bx.register(a,i,i),a}function TM(t,e,n){kt._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha0b106c86a4071f7(t,e,Ut(n))}function LM(t,e,n){kt._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4a3a4bb5c4c0b039(t,e,Ut(n))}function PM(t,e){const n=e(t.length*1,1)>>>0;return Rd().set(t,n/1),vl=t.length,n}function MM(t,e){return t=t>>>0,rI().subarray(t/8,t/8+e)}function yi(t,e){try{return t.apply(this,e)}catch(n){kt.__wbindgen_exn_store(Ut(n))}}function AM(t,e,n,r){kt.wasm_bindgen__convert__closures__invoke2_mut__h5b77cba7b0f68717(t,e,Ut(n),Ut(r))}typeof FinalizationRegistry>"u"||new FinalizationRegistry(t=>kt.__wbg_intounderlyingbytesource_free(t>>>0));typeof FinalizationRegistry>"u"||new FinalizationRegistry(t=>kt.__wbg_intounderlyingsink_free(t>>>0));typeof FinalizationRegistry>"u"||new FinalizationRegistry(t=>kt.__wbg_intounderlyingsource_free(t>>>0));const Vx=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>kt.__wbg_mapmodel_free(t>>>0));class Gd{static __wrap(e){e=e>>>0;const n=Object.create(Gd.prototype);return n.__wbg_ptr=e,Vx.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Vx.unregister(this),e}free(){const e=this.__destroy_into_raw();kt.__wbg_mapmodel_free(e)}constructor(e,n,r,i,a){const c=PM(e,kt.__wbindgen_malloc),l=vl;var d=ra(r)?0:bf(r,kt.__wbindgen_malloc,kt.__wbindgen_realloc),b=vl,w=ra(i)?0:bf(i,kt.__wbindgen_malloc,kt.__wbindgen_realloc),E=vl;const C=kt.mapmodel_new(c,l,n,d,b,w,E,ra(a)?0:Ut(a));return ea(C)}renderDebug(){let e,n;try{const b=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_renderDebug(b,this.__wbg_ptr);var r=pn()[b/4+0],i=pn()[b/4+1],a=pn()[b/4+2],c=pn()[b/4+3],l=r,d=i;if(c)throw l=0,d=0,ea(a);return e=l,n=d,Hi(l,d)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(e,n,1)}}renderAmenities(){let e,n;try{const b=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_renderAmenities(b,this.__wbg_ptr);var r=pn()[b/4+0],i=pn()[b/4+1],a=pn()[b/4+2],c=pn()[b/4+3],l=r,d=i;if(c)throw l=0,d=0,ea(a);return e=l,n=d,Hi(l,d)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(e,n,1)}}getInvertedBoundary(){let e,n;try{const b=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_getInvertedBoundary(b,this.__wbg_ptr);var r=pn()[b/4+0],i=pn()[b/4+1],a=pn()[b/4+2],c=pn()[b/4+3],l=r,d=i;if(c)throw l=0,d=0,ea(a);return e=l,n=d,Hi(l,d)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(e,n,1)}}getBounds(){try{const i=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_getBounds(i,this.__wbg_ptr);var e=pn()[i/4+0],n=pn()[i/4+1],r=MM(e,n).slice();return kt.__wbindgen_free(e,n*8,8),r}finally{kt.__wbindgen_add_to_stack_pointer(16)}}renderZones(){let e,n;try{const b=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_renderZones(b,this.__wbg_ptr);var r=pn()[b/4+0],i=pn()[b/4+1],a=pn()[b/4+2],c=pn()[b/4+3],l=r,d=i;if(c)throw l=0,d=0,ea(a);return e=l,n=d,Hi(l,d)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(e,n,1)}}isochrone(e){let n,r;try{const w=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_isochrone(w,this.__wbg_ptr,Ut(e));var i=pn()[w/4+0],a=pn()[w/4+1],c=pn()[w/4+2],l=pn()[w/4+3],d=i,b=a;if(l)throw d=0,b=0,ea(c);return n=d,r=b,Hi(d,b)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(n,r,1)}}route(e){let n,r;try{const w=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_route(w,this.__wbg_ptr,Ut(e));var i=pn()[w/4+0],a=pn()[w/4+1],c=pn()[w/4+2],l=pn()[w/4+3],d=i,b=a;if(l)throw d=0,b=0,ea(c);return n=d,r=b,Hi(d,b)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(n,r,1)}}bufferRoute(e){let n,r;try{const w=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_bufferRoute(w,this.__wbg_ptr,Ut(e));var i=pn()[w/4+0],a=pn()[w/4+1],c=pn()[w/4+2],l=pn()[w/4+3],d=i,b=a;if(l)throw d=0,b=0,ea(c);return n=d,r=b,Hi(d,b)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(n,r,1)}}score(e,n){let r,i;try{const E=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_score(E,this.__wbg_ptr,Ut(e),ra(n)?0:Ut(n));var a=pn()[E/4+0],c=pn()[E/4+1],l=pn()[E/4+2],d=pn()[E/4+3],b=a,w=c;if(d)throw b=0,w=0,ea(l);return r=b,i=w,Hi(b,w)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(r,i,1)}}snapAndBufferRoute(e){let n,r;try{const w=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_snapAndBufferRoute(w,this.__wbg_ptr,Ut(e));var i=pn()[w/4+0],a=pn()[w/4+1],c=pn()[w/4+2],l=pn()[w/4+3],d=i,b=a;if(l)throw d=0,b=0,ea(c);return n=d,r=b,Hi(d,b)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(n,r,1)}}}async function kM(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{const n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function DM(){const t={};return t.wbg={},t.wbg.__wbindgen_is_bigint=function(e){return typeof mt(e)=="bigint"},t.wbg.__wbindgen_bigint_from_u64=function(e){const n=BigInt.asUintN(64,e);return Ut(n)},t.wbg.__wbindgen_jsval_eq=function(e,n){return mt(e)===mt(n)},t.wbg.__wbindgen_object_drop_ref=function(e){ea(e)},t.wbg.__wbindgen_error_new=function(e,n){const r=new Error(Hi(e,n));return Ut(r)},t.wbg.__wbindgen_string_get=function(e,n){const r=mt(n),i=typeof r=="string"?r:void 0;var a=ra(i)?0:bf(i,kt.__wbindgen_malloc,kt.__wbindgen_realloc),c=vl;pn()[e/4+1]=c,pn()[e/4+0]=a},t.wbg.__wbindgen_boolean_get=function(e){const n=mt(e);return typeof n=="boolean"?n?1:0:2},t.wbg.__wbindgen_is_object=function(e){const n=mt(e);return typeof n=="object"&&n!==null},t.wbg.__wbindgen_is_undefined=function(e){return mt(e)===void 0},t.wbg.__wbindgen_in=function(e,n){return mt(e)in mt(n)},t.wbg.__wbindgen_number_get=function(e,n){const r=mt(n),i=typeof r=="number"?r:void 0;rI()[e/8+1]=ra(i)?0:i,pn()[e/4+0]=!ra(i)},t.wbg.__wbg_mapmodel_new=function(e){const n=Gd.__wrap(e);return Ut(n)},t.wbg.__wbindgen_string_new=function(e,n){const r=Hi(e,n);return Ut(r)},t.wbg.__wbindgen_jsval_loose_eq=function(e,n){return mt(e)==mt(n)},t.wbg.__wbindgen_object_clone_ref=function(e){const n=mt(e);return Ut(n)},t.wbg.__wbg_getwithrefkey_3b3c46ba20582127=function(e,n){const r=mt(e)[mt(n)];return Ut(r)},t.wbg.__wbg_new_abda76e883ba8a5f=function(){const e=new Error;return Ut(e)},t.wbg.__wbg_stack_658279fe44541cf6=function(e,n){const r=mt(n).stack,i=bf(r,kt.__wbindgen_malloc,kt.__wbindgen_realloc),a=vl;pn()[e/4+1]=a,pn()[e/4+0]=i},t.wbg.__wbg_error_f851667af71bcfc6=function(e,n){let r,i;try{r=e,i=n,console.error(Hi(e,n))}finally{kt.__wbindgen_free(r,i,1)}},t.wbg.__wbindgen_cb_drop=function(e){const n=ea(e).original;return n.cnt--==1?(n.a=0,!0):!1},t.wbg.__wbg_fetch_1e4e8ed1f64c7e28=function(e){const n=fetch(mt(e));return Ut(n)},t.wbg.__wbg_performance_a1b8bde2ee512264=function(e){const n=mt(e).performance;return Ut(n)},t.wbg.__wbg_now_abd80e969af37148=function(e){return mt(e).now()},t.wbg.__wbg_fetch_bc7c8e27076a5c84=function(e){const n=fetch(mt(e));return Ut(n)},t.wbg.__wbg_done_2ffa852272310e47=function(e){return mt(e).done},t.wbg.__wbg_getReader_ab94afcb5cb7689a=function(){return yi(function(e){const n=mt(e).getReader();return Ut(n)},arguments)},t.wbg.__wbg_value_9f6eeb1e2aab8d96=function(e){const n=mt(e).value;return Ut(n)},t.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(e){const n=mt(e).queueMicrotask;return Ut(n)},t.wbg.__wbindgen_is_function=function(e){return typeof mt(e)=="function"},t.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(e){queueMicrotask(mt(e))},t.wbg.__wbg_fetch_693453ca3f88c055=function(e,n){const r=mt(e).fetch(mt(n));return Ut(r)},t.wbg.__wbg_debug_34c9290896ec9856=function(e){console.debug(mt(e))},t.wbg.__wbg_error_e60eff06f24ab7a4=function(e){console.error(mt(e))},t.wbg.__wbg_info_d7d58472d0bab115=function(e){console.info(mt(e))},t.wbg.__wbg_log_a4530b4fe289336f=function(e){console.log(mt(e))},t.wbg.__wbg_warn_f260f49434e45e62=function(e){console.warn(mt(e))},t.wbg.__wbg_newwithstrandinit_f581dff0d19a8b03=function(){return yi(function(e,n,r){const i=new Request(Hi(e,n),mt(r));return Ut(i)},arguments)},t.wbg.__wbg_instanceof_Response_4c3b1446206114d1=function(e){let n;try{n=mt(e)instanceof Response}catch{n=!1}return n},t.wbg.__wbg_url_83a6a4f65f7a2b38=function(e,n){const r=mt(n).url,i=bf(r,kt.__wbindgen_malloc,kt.__wbindgen_realloc),a=vl;pn()[e/4+1]=a,pn()[e/4+0]=i},t.wbg.__wbg_status_d6d47ad2837621eb=function(e){return mt(e).status},t.wbg.__wbg_headers_24def508a7518df9=function(e){const n=mt(e).headers;return Ut(n)},t.wbg.__wbg_body_69be35dff3d68d53=function(e){const n=mt(e).body;return ra(n)?0:Ut(n)},t.wbg.__wbg_arrayBuffer_5b2688e3dd873fed=function(){return yi(function(e){const n=mt(e).arrayBuffer();return Ut(n)},arguments)},t.wbg.__wbg_signal_3c701f5f40a5f08d=function(e){const n=mt(e).signal;return Ut(n)},t.wbg.__wbg_new_0ae46f44b7485bb2=function(){return yi(function(){const e=new AbortController;return Ut(e)},arguments)},t.wbg.__wbg_abort_2c4fb490d878d2b2=function(e){mt(e).abort()},t.wbg.__wbg_byobRequest_05466bb0cacd89fa=function(e){const n=mt(e).byobRequest;return ra(n)?0:Ut(n)},t.wbg.__wbg_close_d29a75e8efc5fa94=function(){return yi(function(e){mt(e).close()},arguments)},t.wbg.__wbg_view_1fe68975176283b3=function(e){const n=mt(e).view;return ra(n)?0:Ut(n)},t.wbg.__wbg_respond_6272b341f88864a2=function(){return yi(function(e,n){mt(e).respond(n>>>0)},arguments)},t.wbg.__wbg_read_79c1f6a58844174c=function(e){const n=mt(e).read();return Ut(n)},t.wbg.__wbg_releaseLock_6eb6fa75435874b8=function(e){mt(e).releaseLock()},t.wbg.__wbg_cancel_ef8b2c6f99da9cde=function(e){const n=mt(e).cancel();return Ut(n)},t.wbg.__wbg_new_7a20246daa6eec7e=function(){return yi(function(){const e=new Headers;return Ut(e)},arguments)},t.wbg.__wbg_append_aa3f462f9e2b5ff2=function(){return yi(function(e,n,r,i,a){mt(e).append(Hi(n,r),Hi(i,a))},arguments)},t.wbg.__wbg_close_79df9bcee94a607c=function(){return yi(function(e){mt(e).close()},arguments)},t.wbg.__wbg_enqueue_e8019641f9877e27=function(){return yi(function(e,n){mt(e).enqueue(mt(n))},arguments)},t.wbg.__wbg_get_bd8e338fbd5f5cc8=function(e,n){const r=mt(e)[n>>>0];return Ut(r)},t.wbg.__wbg_length_cd7af8117672b8b8=function(e){return mt(e).length},t.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(e,n){const r=new Function(Hi(e,n));return Ut(r)},t.wbg.__wbg_next_40fc327bfc8770e6=function(e){const n=mt(e).next;return Ut(n)},t.wbg.__wbg_next_196c84450b364254=function(){return yi(function(e){const n=mt(e).next();return Ut(n)},arguments)},t.wbg.__wbg_done_298b57d23c0fc80c=function(e){return mt(e).done},t.wbg.__wbg_value_d93c65011f51a456=function(e){const n=mt(e).value;return Ut(n)},t.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return Ut(Symbol.iterator)},t.wbg.__wbg_get_e3c254076557e348=function(){return yi(function(e,n){const r=Reflect.get(mt(e),mt(n));return Ut(r)},arguments)},t.wbg.__wbg_call_27c0f87801dedf93=function(){return yi(function(e,n){const r=mt(e).call(mt(n));return Ut(r)},arguments)},t.wbg.__wbg_new_72fb9a18b5ae2624=function(){const e=new Object;return Ut(e)},t.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return yi(function(){const e=self.self;return Ut(e)},arguments)},t.wbg.__wbg_window_c6fb939a7f436783=function(){return yi(function(){const e=window.window;return Ut(e)},arguments)},t.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return yi(function(){const e=globalThis.globalThis;return Ut(e)},arguments)},t.wbg.__wbg_global_207b558942527489=function(){return yi(function(){const e=global.global;return Ut(e)},arguments)},t.wbg.__wbg_isArray_2ab64d95e09ea0ae=function(e){return Array.isArray(mt(e))},t.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2=function(e){let n;try{n=mt(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_new_28c511d9baebfa89=function(e,n){const r=new Error(Hi(e,n));return Ut(r)},t.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return yi(function(e,n,r){const i=mt(e).call(mt(n),mt(r));return Ut(i)},arguments)},t.wbg.__wbg_isSafeInteger_f7b04ef02296c4d2=function(e){return Number.isSafeInteger(mt(e))},t.wbg.__wbg_new_81740750da40724f=function(e,n){try{var r={a:e,b:n},i=(c,l)=>{const d=r.a;r.a=0;try{return AM(d,r.b,c,l)}finally{r.a=d}};const a=new Promise(i);return Ut(a)}finally{r.a=r.b=0}},t.wbg.__wbg_resolve_b0083a7967828ec8=function(e){const n=Promise.resolve(mt(e));return Ut(n)},t.wbg.__wbg_catch_0260e338d10f79ae=function(e,n){const r=mt(e).catch(mt(n));return Ut(r)},t.wbg.__wbg_then_0c86a60e8fcfe9f6=function(e,n){const r=mt(e).then(mt(n));return Ut(r)},t.wbg.__wbg_then_a73caa9a87991566=function(e,n,r){const i=mt(e).then(mt(n),mt(r));return Ut(i)},t.wbg.__wbg_buffer_12d079cc21e14bdb=function(e){const n=mt(e).buffer;return Ut(n)},t.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(e,n,r){const i=new Uint8Array(mt(e),n>>>0,r>>>0);return Ut(i)},t.wbg.__wbg_new_63b92bc8671ed464=function(e){const n=new Uint8Array(mt(e));return Ut(n)},t.wbg.__wbg_set_a47bac70306a19a7=function(e,n,r){mt(e).set(mt(n),r>>>0)},t.wbg.__wbg_length_c20a40f15020d68a=function(e){return mt(e).length},t.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6=function(e){let n;try{n=mt(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_buffer_dd7f74bc60f1faab=function(e){const n=mt(e).buffer;return Ut(n)},t.wbg.__wbg_byteLength_58f7b4fab1919d44=function(e){return mt(e).byteLength},t.wbg.__wbg_byteOffset_81d60f7392524f62=function(e){return mt(e).byteOffset},t.wbg.__wbg_has_0af94d20077affa2=function(){return yi(function(e,n){return Reflect.has(mt(e),mt(n))},arguments)},t.wbg.__wbg_set_1f9b04f170055d33=function(){return yi(function(e,n,r){return Reflect.set(mt(e),mt(n),mt(r))},arguments)},t.wbg.__wbg_stringify_8887fe74e1c50d81=function(){return yi(function(e){const n=JSON.stringify(mt(e));return Ut(n)},arguments)},t.wbg.__wbindgen_bigint_get_as_i64=function(e,n){const r=mt(n),i=typeof r=="bigint"?r:void 0;CM()[e/8+1]=ra(i)?BigInt(0):i,pn()[e/4+0]=!ra(i)},t.wbg.__wbindgen_debug_string=function(e,n){const r=ev(mt(n)),i=bf(r,kt.__wbindgen_malloc,kt.__wbindgen_realloc),a=vl;pn()[e/4+1]=a,pn()[e/4+0]=i},t.wbg.__wbindgen_throw=function(e,n){throw new Error(Hi(e,n))},t.wbg.__wbindgen_memory=function(){const e=kt.memory;return Ut(e)},t.wbg.__wbindgen_closure_wrapper3129=function(e,n,r){const i=Ux(e,n,907,TM);return Ut(i)},t.wbg.__wbindgen_closure_wrapper3148=function(e,n,r){const i=Ux(e,n,914,LM);return Ut(i)},t}function RM(t,e){return kt=t.exports,tv.__wbindgen_wasm_module=e,Pd=null,Ld=null,Td=null,Cd=null,kt}async function tv(t){if(kt!==void 0)return kt;typeof t>"u"&&(t="/15m/assets/backend_bg.wasm");const e=DM();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:n,module:r}=await kM(await t,e);return RM(n,r)}class NM{constructor(){_i(this,"inner");this.inner=null}async loadOsmFile(e,n,r,i){await tv(),this.inner=await new Gd(e,!0,n,r,i)}async loadGraphFile(e){await tv(),this.inner=await new Gd(e,!1,void 0,void 0,void 0)}isLoaded(){return this.inner!=null}unset(){this.inner=null}getBounds(){if(!this.inner)throw new Error("Backend used without a file loaded");return Array.from(this.inner.getBounds())}getInvertedBoundary(){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.getInvertedBoundary())}renderDebug(){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.renderDebug())}renderAmenities(){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.renderAmenities())}renderZones(){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.renderZones())}isochrone(e){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.isochrone({x:e.start.lng,y:e.start.lat,mode:e.mode,style:e.style,start_time:e.startTime,max_seconds:e.maxSeconds}))}route(e){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.route({x1:e.start.lng,y1:e.start.lat,x2:e.end[0],y2:e.end[1],mode:e.mode,debug_search:e.debugSearch,use_heuristic:e.useHeuristic,start_time:e.startTime}))}bufferRoute(e){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.bufferRoute({x1:e.start.lng,y1:e.start.lat,x2:e.end[0],y2:e.end[1],mode:e.mode,use_heuristic:e.useHeuristic,start_time:e.startTime,max_seconds:e.maxSeconds}))}score(e,n){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.score({poi_kinds:e.poiKinds,max_seconds:e.maxSeconds},n))}snapAndBufferRoute(e){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.snapAndBufferRoute({input:JSON.stringify(e.input),mode:e.mode,start_time:e.startTime,max_seconds:e.maxSeconds}))}}e1(NM);let iI="MZEJTanw3WpxRvt7qDfo",Ms=qn({kind:"title"}),j_=qn(null),s_=qn(!0),nv=qn(!1);function Gx(t){return["!=",["get",`access_${t}`],"None"]}let Wu=qn("foot"),jd=qn("07:00"),Fc=qn(null),kf=qn(null),jx=qn(!0),a_=qn(!1),qd=qn(!1),qx=qn(15),l_=qn(5),wl=qn(null),If=qn(!1);function u_(t){let e=t.properties.name||`a ${t.properties.amenity_kind}`;return t.properties.brand&&(e+=` (${t.properties.brand})`),t.properties.cuisine&&(e+=` (${t.properties.cuisine})`),e}function Hx(t){let e,n;return e=new Qv({props:{$$slots:{default:[OM,({dialog:r})=>({3:r}),({dialog:r})=>r?8:0]},$$scope:{ctx:t}}}),e.$on("close",t[2]),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,i){const a={};i&24&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function OM(t){let e,n,r,i,a,c,l,d,b,w;function E(){return t[1](t[3])}return{c(){e=Pe("h1"),e.textContent="15-minute neighborhood tool",n=nt(),r=Pe("p"),r.textContent="TODO. Extremely early in development.",i=nt(),a=Pe("p"),a.innerHTML=`This open source +${t.stack}`:r}const Bx=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>{kt.__wbindgen_export_2.get(t.dtor)(t.a,t.b)});function Ux(t,e,n,r){const i={a:t,b:e,cnt:1,dtor:n},a=(...c)=>{i.cnt++;const l=i.a;i.a=0;try{return r(l,i.b,...c)}finally{--i.cnt===0?(kt.__wbindgen_export_2.get(i.dtor)(l,i.b),Bx.unregister(i)):i.a=l}};return a.original=i,Bx.register(a,i,i),a}function TM(t,e,n){kt._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha0b106c86a4071f7(t,e,Ut(n))}function LM(t,e,n){kt._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4a3a4bb5c4c0b039(t,e,Ut(n))}function PM(t,e){const n=e(t.length*1,1)>>>0;return Rd().set(t,n/1),vl=t.length,n}function MM(t,e){return t=t>>>0,rI().subarray(t/8,t/8+e)}function yi(t,e){try{return t.apply(this,e)}catch(n){kt.__wbindgen_exn_store(Ut(n))}}function AM(t,e,n,r){kt.wasm_bindgen__convert__closures__invoke2_mut__h5b77cba7b0f68717(t,e,Ut(n),Ut(r))}typeof FinalizationRegistry>"u"||new FinalizationRegistry(t=>kt.__wbg_intounderlyingbytesource_free(t>>>0));typeof FinalizationRegistry>"u"||new FinalizationRegistry(t=>kt.__wbg_intounderlyingsink_free(t>>>0));typeof FinalizationRegistry>"u"||new FinalizationRegistry(t=>kt.__wbg_intounderlyingsource_free(t>>>0));const Vx=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>kt.__wbg_mapmodel_free(t>>>0));class Gd{static __wrap(e){e=e>>>0;const n=Object.create(Gd.prototype);return n.__wbg_ptr=e,Vx.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Vx.unregister(this),e}free(){const e=this.__destroy_into_raw();kt.__wbg_mapmodel_free(e)}constructor(e,n,r,i,a){const c=PM(e,kt.__wbindgen_malloc),l=vl;var d=ra(r)?0:bf(r,kt.__wbindgen_malloc,kt.__wbindgen_realloc),b=vl,w=ra(i)?0:bf(i,kt.__wbindgen_malloc,kt.__wbindgen_realloc),E=vl;const C=kt.mapmodel_new(c,l,n,d,b,w,E,ra(a)?0:Ut(a));return ea(C)}renderDebug(){let e,n;try{const b=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_renderDebug(b,this.__wbg_ptr);var r=pn()[b/4+0],i=pn()[b/4+1],a=pn()[b/4+2],c=pn()[b/4+3],l=r,d=i;if(c)throw l=0,d=0,ea(a);return e=l,n=d,Hi(l,d)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(e,n,1)}}renderAmenities(){let e,n;try{const b=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_renderAmenities(b,this.__wbg_ptr);var r=pn()[b/4+0],i=pn()[b/4+1],a=pn()[b/4+2],c=pn()[b/4+3],l=r,d=i;if(c)throw l=0,d=0,ea(a);return e=l,n=d,Hi(l,d)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(e,n,1)}}getInvertedBoundary(){let e,n;try{const b=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_getInvertedBoundary(b,this.__wbg_ptr);var r=pn()[b/4+0],i=pn()[b/4+1],a=pn()[b/4+2],c=pn()[b/4+3],l=r,d=i;if(c)throw l=0,d=0,ea(a);return e=l,n=d,Hi(l,d)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(e,n,1)}}getBounds(){try{const i=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_getBounds(i,this.__wbg_ptr);var e=pn()[i/4+0],n=pn()[i/4+1],r=MM(e,n).slice();return kt.__wbindgen_free(e,n*8,8),r}finally{kt.__wbindgen_add_to_stack_pointer(16)}}renderZones(){let e,n;try{const b=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_renderZones(b,this.__wbg_ptr);var r=pn()[b/4+0],i=pn()[b/4+1],a=pn()[b/4+2],c=pn()[b/4+3],l=r,d=i;if(c)throw l=0,d=0,ea(a);return e=l,n=d,Hi(l,d)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(e,n,1)}}isochrone(e){let n,r;try{const w=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_isochrone(w,this.__wbg_ptr,Ut(e));var i=pn()[w/4+0],a=pn()[w/4+1],c=pn()[w/4+2],l=pn()[w/4+3],d=i,b=a;if(l)throw d=0,b=0,ea(c);return n=d,r=b,Hi(d,b)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(n,r,1)}}route(e){let n,r;try{const w=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_route(w,this.__wbg_ptr,Ut(e));var i=pn()[w/4+0],a=pn()[w/4+1],c=pn()[w/4+2],l=pn()[w/4+3],d=i,b=a;if(l)throw d=0,b=0,ea(c);return n=d,r=b,Hi(d,b)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(n,r,1)}}bufferRoute(e){let n,r;try{const w=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_bufferRoute(w,this.__wbg_ptr,Ut(e));var i=pn()[w/4+0],a=pn()[w/4+1],c=pn()[w/4+2],l=pn()[w/4+3],d=i,b=a;if(l)throw d=0,b=0,ea(c);return n=d,r=b,Hi(d,b)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(n,r,1)}}score(e,n){let r,i;try{const E=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_score(E,this.__wbg_ptr,Ut(e),ra(n)?0:Ut(n));var a=pn()[E/4+0],c=pn()[E/4+1],l=pn()[E/4+2],d=pn()[E/4+3],b=a,w=c;if(d)throw b=0,w=0,ea(l);return r=b,i=w,Hi(b,w)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(r,i,1)}}snapAndBufferRoute(e){let n,r;try{const w=kt.__wbindgen_add_to_stack_pointer(-16);kt.mapmodel_snapAndBufferRoute(w,this.__wbg_ptr,Ut(e));var i=pn()[w/4+0],a=pn()[w/4+1],c=pn()[w/4+2],l=pn()[w/4+3],d=i,b=a;if(l)throw d=0,b=0,ea(c);return n=d,r=b,Hi(d,b)}finally{kt.__wbindgen_add_to_stack_pointer(16),kt.__wbindgen_free(n,r,1)}}}async function kM(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{const n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function DM(){const t={};return t.wbg={},t.wbg.__wbindgen_is_bigint=function(e){return typeof mt(e)=="bigint"},t.wbg.__wbindgen_bigint_from_u64=function(e){const n=BigInt.asUintN(64,e);return Ut(n)},t.wbg.__wbindgen_jsval_eq=function(e,n){return mt(e)===mt(n)},t.wbg.__wbindgen_object_drop_ref=function(e){ea(e)},t.wbg.__wbindgen_error_new=function(e,n){const r=new Error(Hi(e,n));return Ut(r)},t.wbg.__wbindgen_string_get=function(e,n){const r=mt(n),i=typeof r=="string"?r:void 0;var a=ra(i)?0:bf(i,kt.__wbindgen_malloc,kt.__wbindgen_realloc),c=vl;pn()[e/4+1]=c,pn()[e/4+0]=a},t.wbg.__wbindgen_boolean_get=function(e){const n=mt(e);return typeof n=="boolean"?n?1:0:2},t.wbg.__wbindgen_is_object=function(e){const n=mt(e);return typeof n=="object"&&n!==null},t.wbg.__wbindgen_is_undefined=function(e){return mt(e)===void 0},t.wbg.__wbindgen_in=function(e,n){return mt(e)in mt(n)},t.wbg.__wbindgen_number_get=function(e,n){const r=mt(n),i=typeof r=="number"?r:void 0;rI()[e/8+1]=ra(i)?0:i,pn()[e/4+0]=!ra(i)},t.wbg.__wbg_mapmodel_new=function(e){const n=Gd.__wrap(e);return Ut(n)},t.wbg.__wbindgen_string_new=function(e,n){const r=Hi(e,n);return Ut(r)},t.wbg.__wbindgen_jsval_loose_eq=function(e,n){return mt(e)==mt(n)},t.wbg.__wbindgen_object_clone_ref=function(e){const n=mt(e);return Ut(n)},t.wbg.__wbg_getwithrefkey_3b3c46ba20582127=function(e,n){const r=mt(e)[mt(n)];return Ut(r)},t.wbg.__wbg_new_abda76e883ba8a5f=function(){const e=new Error;return Ut(e)},t.wbg.__wbg_stack_658279fe44541cf6=function(e,n){const r=mt(n).stack,i=bf(r,kt.__wbindgen_malloc,kt.__wbindgen_realloc),a=vl;pn()[e/4+1]=a,pn()[e/4+0]=i},t.wbg.__wbg_error_f851667af71bcfc6=function(e,n){let r,i;try{r=e,i=n,console.error(Hi(e,n))}finally{kt.__wbindgen_free(r,i,1)}},t.wbg.__wbindgen_cb_drop=function(e){const n=ea(e).original;return n.cnt--==1?(n.a=0,!0):!1},t.wbg.__wbg_fetch_1e4e8ed1f64c7e28=function(e){const n=fetch(mt(e));return Ut(n)},t.wbg.__wbg_performance_a1b8bde2ee512264=function(e){const n=mt(e).performance;return Ut(n)},t.wbg.__wbg_now_abd80e969af37148=function(e){return mt(e).now()},t.wbg.__wbg_fetch_bc7c8e27076a5c84=function(e){const n=fetch(mt(e));return Ut(n)},t.wbg.__wbg_done_2ffa852272310e47=function(e){return mt(e).done},t.wbg.__wbg_getReader_ab94afcb5cb7689a=function(){return yi(function(e){const n=mt(e).getReader();return Ut(n)},arguments)},t.wbg.__wbg_value_9f6eeb1e2aab8d96=function(e){const n=mt(e).value;return Ut(n)},t.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(e){const n=mt(e).queueMicrotask;return Ut(n)},t.wbg.__wbindgen_is_function=function(e){return typeof mt(e)=="function"},t.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(e){queueMicrotask(mt(e))},t.wbg.__wbg_fetch_693453ca3f88c055=function(e,n){const r=mt(e).fetch(mt(n));return Ut(r)},t.wbg.__wbg_debug_34c9290896ec9856=function(e){console.debug(mt(e))},t.wbg.__wbg_error_e60eff06f24ab7a4=function(e){console.error(mt(e))},t.wbg.__wbg_info_d7d58472d0bab115=function(e){console.info(mt(e))},t.wbg.__wbg_log_a4530b4fe289336f=function(e){console.log(mt(e))},t.wbg.__wbg_warn_f260f49434e45e62=function(e){console.warn(mt(e))},t.wbg.__wbg_newwithstrandinit_f581dff0d19a8b03=function(){return yi(function(e,n,r){const i=new Request(Hi(e,n),mt(r));return Ut(i)},arguments)},t.wbg.__wbg_instanceof_Response_4c3b1446206114d1=function(e){let n;try{n=mt(e)instanceof Response}catch{n=!1}return n},t.wbg.__wbg_url_83a6a4f65f7a2b38=function(e,n){const r=mt(n).url,i=bf(r,kt.__wbindgen_malloc,kt.__wbindgen_realloc),a=vl;pn()[e/4+1]=a,pn()[e/4+0]=i},t.wbg.__wbg_status_d6d47ad2837621eb=function(e){return mt(e).status},t.wbg.__wbg_headers_24def508a7518df9=function(e){const n=mt(e).headers;return Ut(n)},t.wbg.__wbg_body_69be35dff3d68d53=function(e){const n=mt(e).body;return ra(n)?0:Ut(n)},t.wbg.__wbg_arrayBuffer_5b2688e3dd873fed=function(){return yi(function(e){const n=mt(e).arrayBuffer();return Ut(n)},arguments)},t.wbg.__wbg_signal_3c701f5f40a5f08d=function(e){const n=mt(e).signal;return Ut(n)},t.wbg.__wbg_new_0ae46f44b7485bb2=function(){return yi(function(){const e=new AbortController;return Ut(e)},arguments)},t.wbg.__wbg_abort_2c4fb490d878d2b2=function(e){mt(e).abort()},t.wbg.__wbg_byobRequest_05466bb0cacd89fa=function(e){const n=mt(e).byobRequest;return ra(n)?0:Ut(n)},t.wbg.__wbg_close_d29a75e8efc5fa94=function(){return yi(function(e){mt(e).close()},arguments)},t.wbg.__wbg_view_1fe68975176283b3=function(e){const n=mt(e).view;return ra(n)?0:Ut(n)},t.wbg.__wbg_respond_6272b341f88864a2=function(){return yi(function(e,n){mt(e).respond(n>>>0)},arguments)},t.wbg.__wbg_read_79c1f6a58844174c=function(e){const n=mt(e).read();return Ut(n)},t.wbg.__wbg_releaseLock_6eb6fa75435874b8=function(e){mt(e).releaseLock()},t.wbg.__wbg_cancel_ef8b2c6f99da9cde=function(e){const n=mt(e).cancel();return Ut(n)},t.wbg.__wbg_new_7a20246daa6eec7e=function(){return yi(function(){const e=new Headers;return Ut(e)},arguments)},t.wbg.__wbg_append_aa3f462f9e2b5ff2=function(){return yi(function(e,n,r,i,a){mt(e).append(Hi(n,r),Hi(i,a))},arguments)},t.wbg.__wbg_close_79df9bcee94a607c=function(){return yi(function(e){mt(e).close()},arguments)},t.wbg.__wbg_enqueue_e8019641f9877e27=function(){return yi(function(e,n){mt(e).enqueue(mt(n))},arguments)},t.wbg.__wbg_get_bd8e338fbd5f5cc8=function(e,n){const r=mt(e)[n>>>0];return Ut(r)},t.wbg.__wbg_length_cd7af8117672b8b8=function(e){return mt(e).length},t.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(e,n){const r=new Function(Hi(e,n));return Ut(r)},t.wbg.__wbg_next_40fc327bfc8770e6=function(e){const n=mt(e).next;return Ut(n)},t.wbg.__wbg_next_196c84450b364254=function(){return yi(function(e){const n=mt(e).next();return Ut(n)},arguments)},t.wbg.__wbg_done_298b57d23c0fc80c=function(e){return mt(e).done},t.wbg.__wbg_value_d93c65011f51a456=function(e){const n=mt(e).value;return Ut(n)},t.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return Ut(Symbol.iterator)},t.wbg.__wbg_get_e3c254076557e348=function(){return yi(function(e,n){const r=Reflect.get(mt(e),mt(n));return Ut(r)},arguments)},t.wbg.__wbg_call_27c0f87801dedf93=function(){return yi(function(e,n){const r=mt(e).call(mt(n));return Ut(r)},arguments)},t.wbg.__wbg_new_72fb9a18b5ae2624=function(){const e=new Object;return Ut(e)},t.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return yi(function(){const e=self.self;return Ut(e)},arguments)},t.wbg.__wbg_window_c6fb939a7f436783=function(){return yi(function(){const e=window.window;return Ut(e)},arguments)},t.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return yi(function(){const e=globalThis.globalThis;return Ut(e)},arguments)},t.wbg.__wbg_global_207b558942527489=function(){return yi(function(){const e=global.global;return Ut(e)},arguments)},t.wbg.__wbg_isArray_2ab64d95e09ea0ae=function(e){return Array.isArray(mt(e))},t.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2=function(e){let n;try{n=mt(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_new_28c511d9baebfa89=function(e,n){const r=new Error(Hi(e,n));return Ut(r)},t.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return yi(function(e,n,r){const i=mt(e).call(mt(n),mt(r));return Ut(i)},arguments)},t.wbg.__wbg_isSafeInteger_f7b04ef02296c4d2=function(e){return Number.isSafeInteger(mt(e))},t.wbg.__wbg_new_81740750da40724f=function(e,n){try{var r={a:e,b:n},i=(c,l)=>{const d=r.a;r.a=0;try{return AM(d,r.b,c,l)}finally{r.a=d}};const a=new Promise(i);return Ut(a)}finally{r.a=r.b=0}},t.wbg.__wbg_resolve_b0083a7967828ec8=function(e){const n=Promise.resolve(mt(e));return Ut(n)},t.wbg.__wbg_catch_0260e338d10f79ae=function(e,n){const r=mt(e).catch(mt(n));return Ut(r)},t.wbg.__wbg_then_0c86a60e8fcfe9f6=function(e,n){const r=mt(e).then(mt(n));return Ut(r)},t.wbg.__wbg_then_a73caa9a87991566=function(e,n,r){const i=mt(e).then(mt(n),mt(r));return Ut(i)},t.wbg.__wbg_buffer_12d079cc21e14bdb=function(e){const n=mt(e).buffer;return Ut(n)},t.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(e,n,r){const i=new Uint8Array(mt(e),n>>>0,r>>>0);return Ut(i)},t.wbg.__wbg_new_63b92bc8671ed464=function(e){const n=new Uint8Array(mt(e));return Ut(n)},t.wbg.__wbg_set_a47bac70306a19a7=function(e,n,r){mt(e).set(mt(n),r>>>0)},t.wbg.__wbg_length_c20a40f15020d68a=function(e){return mt(e).length},t.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6=function(e){let n;try{n=mt(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_buffer_dd7f74bc60f1faab=function(e){const n=mt(e).buffer;return Ut(n)},t.wbg.__wbg_byteLength_58f7b4fab1919d44=function(e){return mt(e).byteLength},t.wbg.__wbg_byteOffset_81d60f7392524f62=function(e){return mt(e).byteOffset},t.wbg.__wbg_has_0af94d20077affa2=function(){return yi(function(e,n){return Reflect.has(mt(e),mt(n))},arguments)},t.wbg.__wbg_set_1f9b04f170055d33=function(){return yi(function(e,n,r){return Reflect.set(mt(e),mt(n),mt(r))},arguments)},t.wbg.__wbg_stringify_8887fe74e1c50d81=function(){return yi(function(e){const n=JSON.stringify(mt(e));return Ut(n)},arguments)},t.wbg.__wbindgen_bigint_get_as_i64=function(e,n){const r=mt(n),i=typeof r=="bigint"?r:void 0;CM()[e/8+1]=ra(i)?BigInt(0):i,pn()[e/4+0]=!ra(i)},t.wbg.__wbindgen_debug_string=function(e,n){const r=ev(mt(n)),i=bf(r,kt.__wbindgen_malloc,kt.__wbindgen_realloc),a=vl;pn()[e/4+1]=a,pn()[e/4+0]=i},t.wbg.__wbindgen_throw=function(e,n){throw new Error(Hi(e,n))},t.wbg.__wbindgen_memory=function(){const e=kt.memory;return Ut(e)},t.wbg.__wbindgen_closure_wrapper3129=function(e,n,r){const i=Ux(e,n,909,TM);return Ut(i)},t.wbg.__wbindgen_closure_wrapper3148=function(e,n,r){const i=Ux(e,n,916,LM);return Ut(i)},t}function RM(t,e){return kt=t.exports,tv.__wbindgen_wasm_module=e,Pd=null,Ld=null,Td=null,Cd=null,kt}async function tv(t){if(kt!==void 0)return kt;typeof t>"u"&&(t="/15m/assets/backend_bg.wasm");const e=DM();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:n,module:r}=await kM(await t,e);return RM(n,r)}class NM{constructor(){_i(this,"inner");this.inner=null}async loadOsmFile(e,n,r,i){await tv(),this.inner=await new Gd(e,!0,n,r,i)}async loadGraphFile(e){await tv(),this.inner=await new Gd(e,!1,void 0,void 0,void 0)}isLoaded(){return this.inner!=null}unset(){this.inner=null}getBounds(){if(!this.inner)throw new Error("Backend used without a file loaded");return Array.from(this.inner.getBounds())}getInvertedBoundary(){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.getInvertedBoundary())}renderDebug(){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.renderDebug())}renderAmenities(){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.renderAmenities())}renderZones(){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.renderZones())}isochrone(e){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.isochrone({x:e.start.lng,y:e.start.lat,mode:e.mode,style:e.style,start_time:e.startTime,max_seconds:e.maxSeconds}))}route(e){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.route({x1:e.start.lng,y1:e.start.lat,x2:e.end[0],y2:e.end[1],mode:e.mode,debug_search:e.debugSearch,use_heuristic:e.useHeuristic,start_time:e.startTime}))}bufferRoute(e){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.bufferRoute({x1:e.start.lng,y1:e.start.lat,x2:e.end[0],y2:e.end[1],mode:e.mode,use_heuristic:e.useHeuristic,start_time:e.startTime,max_seconds:e.maxSeconds}))}score(e,n){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.score({poi_kinds:e.poiKinds,max_seconds:e.maxSeconds},n))}snapAndBufferRoute(e){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.snapAndBufferRoute({input:JSON.stringify(e.input),mode:e.mode,start_time:e.startTime,max_seconds:e.maxSeconds}))}}e1(NM);let iI="MZEJTanw3WpxRvt7qDfo",Ms=qn({kind:"title"}),j_=qn(null),s_=qn(!0),nv=qn(!1);function Gx(t){return["!=",["get",`access_${t}`],"None"]}let Wu=qn("foot"),jd=qn("07:00"),Fc=qn(null),kf=qn(null),jx=qn(!0),a_=qn(!1),qd=qn(!1),qx=qn(15),l_=qn(5),wl=qn(null),If=qn(!1);function u_(t){let e=t.properties.name||`a ${t.properties.amenity_kind}`;return t.properties.brand&&(e+=` (${t.properties.brand})`),t.properties.cuisine&&(e+=` (${t.properties.cuisine})`),e}function Hx(t){let e,n;return e=new Qv({props:{$$slots:{default:[OM,({dialog:r})=>({3:r}),({dialog:r})=>r?8:0]},$$scope:{ctx:t}}}),e.$on("close",t[2]),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,i){const a={};i&24&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function OM(t){let e,n,r,i,a,c,l,d,b,w;function E(){return t[1](t[3])}return{c(){e=Pe("h1"),e.textContent="15-minute neighborhood tool",n=nt(),r=Pe("p"),r.textContent="TODO. Extremely early in development.",i=nt(),a=Pe("p"),a.innerHTML=`This open source tool is created by Dustin Carlino and relies heavily on @@ -653,4 +653,4 @@ and limitations under the License. Show: `),a=Pe("input"),c=nt(),et(l.$$.fragment),Oe(a,"type","checkbox")},m(E,C){Ce(E,e,C),ge(e,r),ge(e,i),ge(e,a),a.checked=t[8],Ce(E,c,C),Qe(l,E,C),d=!0,b||(w=zt(a,"change",t[15]),b=!0)},p(E,C){(!d||C&32)&&n!==(n=E[5].toLocaleString()+"")&&En(r,n),C&256&&(a.checked=E[8]);const k={};C&128&&(k.limits=E[7].map(zE)),l.$set(k)},i(E){d||(ce(l.$$.fragment,E),d=!0)},o(E){ye(l.$$.fragment,E),d=!1},d(E){E&&(Ie(e),Ie(c)),$e(l,E),b=!1,w()}}}function A8(t){let e,n,r,i,a,c,l,d,b,w,E,C,k,D,U;function q(V){t[12](V)}let Q={};t[3]!==void 0&&(Q.travelMode=t[3]),w=new hy({props:Q}),Un.push(()=>Oi(w,"travelMode",q));let F=t[0]&&DE(t);return{c(){e=Pe("div"),n=Pe("h2"),n.textContent="Upload Route mode",r=nt(),i=Pe("p"),i.textContent=`This is an experimental tool to snap routes drawn elsewhere to this network for analysis.`,a=nt(),c=Pe("label"),l=ht(`Select a GeoJSON file with LineStrings: - `),d=Pe("input"),b=nt(),et(w.$$.fragment),C=nt(),F&&F.c(),Oe(d,"type","file"),Oe(e,"slot","sidebar")},m(V,J){Ce(V,e,J),ge(e,n),ge(e,r),ge(e,i),ge(e,a),ge(e,c),ge(c,l),ge(c,d),t[11](d),ge(e,b),Qe(w,e,null),ge(e,C),F&&F.m(e,null),k=!0,D||(U=zt(d,"change",t[9]),D=!0)},p(V,J){const oe={};!E&&J&8&&(E=!0,oe.travelMode=V[3],Ni(()=>E=!1)),w.$set(oe),V[0]?F?(F.p(V,J),J&1&&ce(F,1)):(F=DE(V),F.c(),ce(F,1),F.m(e,null)):F&&(gn(),ye(F,1,1,()=>{F=null}),_n())},i(V){k||(ce(w.$$.fragment,V),ce(F),k=!0)},o(V){ye(w.$$.fragment,V),ye(F),k=!1},d(V){V&&Ie(e),t[11](null),$e(w),F&&F.d(),D=!1,U()}}}function NE(t){let e,n;return e=new Vs({props:{data:t[0],generateId:!0,$$slots:{default:[k8]},$$scope:{ctx:t}}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,i){const a={};i&1&&(a.data=r[0]),i&262144&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function k8(t){let e,n;return e=new Ca({props:{paint:{"line-width":20,"line-color":"cyan","line-opacity":Ml(.5,1)},manageHoverState:!0}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p:it,i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function OE(t){let e,n;return e=new Vs({props:{data:t[4],generateId:!0,$$slots:{default:[N8]},$$scope:{ctx:t}}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,i){const a={};i&16&&(a.data=r[4]),i&262308&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function D8(t){let e,n;return e=new Ca({props:{filter:["==",["get","kind"],"route"],paint:{"line-width":20,"line-color":"red","line-opacity":Ml(.5,1)},manageHoverState:!0}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p:it,i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function R8(t){let e,n;return e=new DT({props:{totalPopulationInBuffer:t[5],limits:t[7]}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,i){const a={};i&32&&(a.totalPopulationInBuffer=r[5]),i&128&&(a.limits=r[7]),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function N8(t){let e,n,r,i;const a=[R8,D8],c=[];function l(d,b){return d[2]?0:1}return e=l(t),n=c[e]=a[e](t),{c(){n.c(),r=Yn()},m(d,b){c[e].m(d,b),Ce(d,r,b),i=!0},p(d,b){let w=e;e=l(d),e===w?c[e].p(d,b):(gn(),ye(c[w],1,1,()=>{c[w]=null}),_n(),n=c[e],n?n.p(d,b):(n=c[e]=a[e](d),n.c()),ce(n,1),n.m(r.parentNode,r))},i(d){i||(ce(n),i=!0)},o(d){ye(n),i=!1},d(d){d&&Ie(r),c[e].d(d)}}}function O8(t){let e,n,r,i=t[0]&&NE(t),a=t[4]&&OE(t);return{c(){e=Pe("div"),i&&i.c(),n=nt(),a&&a.c(),Oe(e,"slot","map")},m(c,l){Ce(c,e,l),i&&i.m(e,null),ge(e,n),a&&a.m(e,null),r=!0},p(c,l){c[0]?i?(i.p(c,l),l&1&&ce(i,1)):(i=NE(c),i.c(),ce(i,1),i.m(e,n)):i&&(gn(),ye(i,1,1,()=>{i=null}),_n()),c[4]?a?(a.p(c,l),l&16&&ce(a,1)):(a=OE(c),a.c(),ce(a,1),a.m(e,null)):a&&(gn(),ye(a,1,1,()=>{a=null}),_n())},i(c){r||(ce(i),ce(a),r=!0)},o(c){ye(i),ye(a),r=!1},d(c){c&&Ie(e),i&&i.d(),a&&a.d()}}}function z8(t){let e,n;return e=new uh({props:{$$slots:{map:[O8],sidebar:[A8],top:[M8]},$$scope:{ctx:t}}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,[i]){const a={};i&262655&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}const zE=t=>t/60;function F8(t,e,n){let r,i,a,c,l,d,b;Pt(t,l_,oe=>n(1,i=oe)),Pt(t,a_,oe=>n(2,a=oe)),Pt(t,jd,oe=>n(10,c=oe)),Pt(t,Wu,oe=>n(3,l=oe)),Pt(t,wl,oe=>n(16,d=oe)),Pt(t,qd,oe=>n(8,b=oe));let w=null,E=null,C=0,k;async function D(oe){try{let le=JSON.parse(await k.files[0].text());le.features=le.features.filter(de=>de.geometry.type=="LineString"),n(0,w=le)}catch(le){window.alert(`Couldn't snap routes from file: ${le}`)}}async function U(oe,le,de,te,_e){if(n(5,C=0),n(4,E=null),!!oe)try{n(4,E=await d.snapAndBufferRoute({input:oe,mode:l,startTime:c,maxSeconds:i*60})),n(5,C=E.total_population)}catch(be){window.alert(`Problem: ${be}`)}}function q(oe){Un[oe?"unshift":"push"](()=>{k=oe,n(6,k)})}function Q(oe){l=oe,Wu.set(l)}function F(){a=this.checked,a_.set(a)}function V(){i=_u(this.value),l_.set(i)}function J(){b=this.checked,qd.set(b)}return t.$$.update=()=>{t.$$.dirty&1039&&U(w),t.$$.dirty&2&&n(7,r=Array.from(Array(6).keys()).map(oe=>i*60/(6-1)*oe))},[w,i,a,l,E,C,k,r,b,D,c,q,Q,F,V,J]}class B8 extends Kt{constructor(e){super(),Yt(this,e,F8,z8,Ht,{})}}function U8(){return new Worker("/15m/assets/worker-0f938e3f.js")}function V8(t){let e,n,r,i,a,c;return{c(){e=Pe("div"),n=Pe("button"),n.innerHTML=`A/B Street logo`,r=nt(),i=Pe("span"),Oe(n,"class","outline"),Ci(i,"width","100%"),Oe(e,"slot","top"),Ci(e,"display","flex")},m(l,d){Ce(l,e,d),ge(e,n),ge(e,r),ge(e,i),t[19](i),a||(c=zt(n,"click",t[18]),a=!0)},p:it,d(l){l&&Ie(e),t[19](null),a=!1,c()}}}function FE(t){let e,n,r,i,a,c;return{c(){e=Pe("hr"),n=nt(),r=Pe("div"),i=Pe("button"),i.textContent="Zoom to fit"},m(l,d){Ce(l,e,d),Ce(l,n,d),Ce(l,r,d),ge(r,i),a||(c=zt(i,"click",t[10]),a=!0)},p:it,d(l){l&&(Ie(e),Ie(n),Ie(r)),a=!1,c()}}}function G8(t){let e,n,r,i,a,c=t[5].kind!="title"&&FE(t);return{c(){e=Pe("div"),n=Pe("h1"),n.textContent="15-minute neighbourhood tool",r=nt(),i=Pe("div"),a=nt(),c&&c.c(),Oe(e,"slot","left")},m(l,d){Ce(l,e,d),ge(e,n),ge(e,r),ge(e,i),t[17](i),ge(e,a),c&&c.m(e,null)},p(l,d){l[5].kind!="title"?c?c.p(l,d):(c=FE(l),c.c(),c.m(e,null)):c&&(c.d(1),c=null)},d(l){l&&Ie(e),t[17](null),c&&c.d()}}}function j8(t){let e,n;return e=new UN({props:{map:t[0],apiKey:iI}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,i){const a={};i&1&&(a.map=r[0]),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function BE(t){let e,n;return e=new P8({}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function UE(t){let e,n,r,i,a,c,l,d={ctx:t,current:null,token:null,hasCatch:!1,pending:Z8,then:H8,catch:q8,value:24,blocks:[,,,]};Af(e=fs(t[6]).getInvertedBoundary(),d);const b=[$8,Q8,J8,K8,Y8,X8],w=[];function E(k,D){return k[5].kind=="debug"?0:k[5].kind=="isochrone"?1:k[5].kind=="route"?2:k[5].kind=="score"?3:k[5].kind=="debug-route"?4:k[5].kind=="upload-route"?5:-1}~(r=E(t))&&(i=w[r]=b[r](t));let C=t[7]&&VE(t);return{c(){d.block.c(),n=nt(),i&&i.c(),a=nt(),C&&C.c(),c=Yn()},m(k,D){d.block.m(k,d.anchor=D),d.mount=()=>n.parentNode,d.anchor=n,Ce(k,n,D),~r&&w[r].m(k,D),Ce(k,a,D),C&&C.m(k,D),Ce(k,c,D),l=!0},p(k,D){t=k,d.ctx=t,D&64&&e!==(e=fs(t[6]).getInvertedBoundary())&&Af(e,d)||Jv(d,t,D);let U=r;r=E(t),r===U?~r&&w[r].p(t,D):(i&&(gn(),ye(w[U],1,1,()=>{w[U]=null}),_n()),~r?(i=w[r],i?i.p(t,D):(i=w[r]=b[r](t),i.c()),ce(i,1),i.m(a.parentNode,a)):i=null),t[7]?C?(C.p(t,D),D&128&&ce(C,1)):(C=VE(t),C.c(),ce(C,1),C.m(c.parentNode,c)):C&&(gn(),ye(C,1,1,()=>{C=null}),_n())},i(k){l||(ce(d.block),ce(i),ce(C),l=!0)},o(k){for(let D=0;D<3;D+=1){const U=d.blocks[D];ye(U)}ye(i),ye(C),l=!1},d(k){k&&(Ie(n),Ie(a),Ie(c)),d.block.d(k),d.token=null,d=null,~r&&w[r].d(k),C&&C.d(k)}}}function q8(t){return{c:it,m:it,p:it,i:it,o:it,d:it}}function H8(t){let e,n;return e=new Vs({props:{data:t[24],$$slots:{default:[W8]},$$scope:{ctx:t}}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,i){const a={};i&64&&(a.data=r[24]),i&33554432&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function W8(t){let e,n;return e=new xm({props:{paint:{"fill-color":"black","fill-opacity":.3}}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p:it,i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function Z8(t){return{c:it,m:it,p:it,i:it,o:it,d:it}}function X8(t){let e,n;return e=new B8({}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p:it,i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function Y8(t){let e,n;return e=new AF({props:{debugGj:t[5].debugGj,start:t[5].start,end:t[5].end,routeGj:t[5].routeGj}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,i){const a={};i&32&&(a.debugGj=r[5].debugGj),i&32&&(a.start=r[5].start),i&32&&(a.end=r[5].end),i&32&&(a.routeGj=r[5].routeGj),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function K8(t){let e,n;return e=new jF({}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p:it,i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function J8(t){let e,n;return e=new xF({}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p:it,i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function Q8(t){let e,n;return e=new W6({}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p:it,i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function $8(t){let e,n;return e=new N6({}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p:it,i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function VE(t){let e,n,r,i={ctx:t,current:null,token:null,hasCatch:!1,pending:n7,then:t7,catch:e7,value:23,blocks:[,,,]};return Af(n=fs(t[6]).renderZones(),i),{c(){e=Yn(),i.block.c()},m(a,c){Ce(a,e,c),i.block.m(a,i.anchor=c),i.mount=()=>e.parentNode,i.anchor=e,r=!0},p(a,c){t=a,i.ctx=t,c&64&&n!==(n=fs(t[6]).renderZones())&&Af(n,i)||Jv(i,t,c)},i(a){r||(ce(i.block),r=!0)},o(a){for(let c=0;c<3;c+=1){const l=i.blocks[c];ye(l)}r=!1},d(a){a&&Ie(e),i.block.d(a),i.token=null,i=null}}}function e7(t){return{c:it,m:it,p:it,i:it,o:it,d:it}}function t7(t){let e,n;return e=new b6({props:{gj:t[23]}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,i){const a={};i&64&&(a.gj=r[23]),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function n7(t){return{c:it,m:it,p:it,i:it,o:it,d:it}}function r7(t){let e,n,r,i,a,c,l=!t[9]&&j8(t),d=t[5].kind=="title"&&BE(),b=t[4]&&UE(t);return{c(){l&&l.c(),e=nt(),n=Pe("div"),r=nt(),d&&d.c(),i=nt(),b&&b.c(),a=Yn()},m(w,E){l&&l.m(w,E),Ce(w,e,E),Ce(w,n,E),t[14](n),Ce(w,r,E),d&&d.m(w,E),Ce(w,i,E),b&&b.m(w,E),Ce(w,a,E),c=!0},p(w,E){w[9]||l.p(w,E),w[5].kind=="title"?d?E&32&&ce(d,1):(d=BE(),d.c(),ce(d,1),d.m(i.parentNode,i)):d&&(gn(),ye(d,1,1,()=>{d=null}),_n()),w[4]?b?(b.p(w,E),E&16&&ce(b,1)):(b=UE(w),b.c(),ce(b,1),b.m(a.parentNode,a)):b&&(gn(),ye(b,1,1,()=>{b=null}),_n())},i(w){c||(ce(l),ce(d),ce(b),c=!0)},o(w){ye(l),ye(d),ye(b),c=!1},d(w){w&&(Ie(e),Ie(n),Ie(r),Ie(i),Ie(a)),l&&l.d(w),t[14](null),d&&d.d(w),b&&b.d(w)}}}function i7(t){let e,n,r,i;function a(l){t[15](l)}let c={style:t[9]?"http://localhost:5173/offline/light_style.json":`https://api.maptiler.com/maps/dataviz/style.json?key=${iI}`,standardControls:!0,hash:!0,images:[{id:"cycle_parking",url:nM}],$$slots:{default:[r7]},$$scope:{ctx:t}};return t[0]!==void 0&&(c.map=t[0]),n=new Pz({props:c}),Un.push(()=>Oi(n,"map",a)),n.$on("error",t[16]),{c(){e=Pe("div"),et(n.$$.fragment),Oe(e,"slot","main"),Ci(e,"position","relative"),Ci(e,"width","100%"),Ci(e,"height","100vh")},m(l,d){Ce(l,e,d),Qe(n,e,null),i=!0},p(l,d){const b={};d&33554681&&(b.$$scope={dirty:d,ctx:l}),!r&&d&1&&(r=!0,b.map=l[0],Ni(()=>r=!1)),n.$set(b)},i(l){i||(ce(n.$$.fragment,l),i=!0)},o(l){ye(n.$$.fragment,l),i=!1},d(l){l&&Ie(e),$e(n)}}}function o7(t){let e,n,r,i;return e=new BM({}),r=new jz({props:{$$slots:{main:[i7],left:[G8],top:[V8]},$$scope:{ctx:t}}}),{c(){et(e.$$.fragment),n=nt(),et(r.$$.fragment)},m(a,c){Qe(e,a,c),Ce(a,n,c),Qe(r,a,c),i=!0},p(a,[c]){const l={};c&33554943&&(l.$$scope={dirty:c,ctx:a}),r.$set(l)},i(a){i||(ce(e.$$.fragment,a),ce(r.$$.fragment,a),i=!0)},o(a){ye(e.$$.fragment,a),ye(r.$$.fragment,a),i=!1},d(a){a&&Ie(n),$e(e,a),$e(r,a)}}}function Gg(t,e,n){return e+t*(n-e)}function s7(t,e,n){let r,i,a,c,l,d,b,w,E,C;Pt(t,Hv,be=>n(11,r=be)),Pt(t,qv,be=>n(12,i=be)),Pt(t,jv,be=>n(13,a=be)),Pt(t,If,be=>n(4,c=be)),Pt(t,Ms,be=>n(5,l=be)),Pt(t,kf,be=>n(20,d=be)),Pt(t,Fc,be=>n(21,b=be)),Pt(t,wl,be=>n(6,w=be)),Pt(t,nv,be=>n(7,E=be)),Pt(t,s_,be=>n(8,C=be));let k=new URLSearchParams(window.location.search).has("offline");if(k){let be=new EO;as.addProtocol("pmtiles",be.tile)}rc(async()=>{const be=$E(new U8);let W=await new be;wl.set(W)});let D;async function U(){D&&c&&D.fitBounds(await w.getBounds(),{animate:!1})}async function q(be){if(be){console.log("New map model loaded");let W=await w.getBounds();jn(Fc,b={lng:Gg(.4,W[0],W[2]),lat:Gg(.4,W[1],W[3])},b),jn(kf,d={lng:Gg(.6,W[0],W[2]),lat:Gg(.6,W[1],W[3])},d),await U(),jn(Ms,l={kind:"isochrone"},l)}}let Q,F,V;function J(be){Un[be?"unshift":"push"](()=>{V=be,n(3,V),n(11,r)})}function oe(be){D=be,n(0,D)}const le=be=>{console.log(be.detail.error)};function de(be){Un[be?"unshift":"push"](()=>{F=be,n(2,F),n(12,i)})}const te=()=>jn(s_,C=!0,C);function _e(be){Un[be?"unshift":"push"](()=>{Q=be,n(1,Q),n(13,a)})}return t.$$.update=()=>{t.$$.dirty&1&&D&&j_.set(D),t.$$.dirty&16&&q(c),t.$$.dirty&8194&&Q&&a&&(n(1,Q.innerHTML="",Q),Q.appendChild(a)),t.$$.dirty&4100&&F&&i&&(n(2,F.innerHTML="",F),F.appendChild(i)),t.$$.dirty&2056&&V&&r&&(n(3,V.innerHTML="",V),V.appendChild(r))},[D,Q,F,V,c,l,w,E,C,k,U,r,i,a,J,oe,le,de,te,_e]}class a7 extends Kt{constructor(e){super(),Yt(this,e,s7,o7,Ht,{})}}new a7({target:document.getElementById("app")}); + `),d=Pe("input"),b=nt(),et(w.$$.fragment),C=nt(),F&&F.c(),Oe(d,"type","file"),Oe(e,"slot","sidebar")},m(V,J){Ce(V,e,J),ge(e,n),ge(e,r),ge(e,i),ge(e,a),ge(e,c),ge(c,l),ge(c,d),t[11](d),ge(e,b),Qe(w,e,null),ge(e,C),F&&F.m(e,null),k=!0,D||(U=zt(d,"change",t[9]),D=!0)},p(V,J){const oe={};!E&&J&8&&(E=!0,oe.travelMode=V[3],Ni(()=>E=!1)),w.$set(oe),V[0]?F?(F.p(V,J),J&1&&ce(F,1)):(F=DE(V),F.c(),ce(F,1),F.m(e,null)):F&&(gn(),ye(F,1,1,()=>{F=null}),_n())},i(V){k||(ce(w.$$.fragment,V),ce(F),k=!0)},o(V){ye(w.$$.fragment,V),ye(F),k=!1},d(V){V&&Ie(e),t[11](null),$e(w),F&&F.d(),D=!1,U()}}}function NE(t){let e,n;return e=new Vs({props:{data:t[0],generateId:!0,$$slots:{default:[k8]},$$scope:{ctx:t}}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,i){const a={};i&1&&(a.data=r[0]),i&262144&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function k8(t){let e,n;return e=new Ca({props:{paint:{"line-width":20,"line-color":"cyan","line-opacity":Ml(.5,1)},manageHoverState:!0}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p:it,i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function OE(t){let e,n;return e=new Vs({props:{data:t[4],generateId:!0,$$slots:{default:[N8]},$$scope:{ctx:t}}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,i){const a={};i&16&&(a.data=r[4]),i&262308&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function D8(t){let e,n;return e=new Ca({props:{filter:["==",["get","kind"],"route"],paint:{"line-width":20,"line-color":"red","line-opacity":Ml(.5,1)},manageHoverState:!0}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p:it,i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function R8(t){let e,n;return e=new DT({props:{totalPopulationInBuffer:t[5],limits:t[7]}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,i){const a={};i&32&&(a.totalPopulationInBuffer=r[5]),i&128&&(a.limits=r[7]),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function N8(t){let e,n,r,i;const a=[R8,D8],c=[];function l(d,b){return d[2]?0:1}return e=l(t),n=c[e]=a[e](t),{c(){n.c(),r=Yn()},m(d,b){c[e].m(d,b),Ce(d,r,b),i=!0},p(d,b){let w=e;e=l(d),e===w?c[e].p(d,b):(gn(),ye(c[w],1,1,()=>{c[w]=null}),_n(),n=c[e],n?n.p(d,b):(n=c[e]=a[e](d),n.c()),ce(n,1),n.m(r.parentNode,r))},i(d){i||(ce(n),i=!0)},o(d){ye(n),i=!1},d(d){d&&Ie(r),c[e].d(d)}}}function O8(t){let e,n,r,i=t[0]&&NE(t),a=t[4]&&OE(t);return{c(){e=Pe("div"),i&&i.c(),n=nt(),a&&a.c(),Oe(e,"slot","map")},m(c,l){Ce(c,e,l),i&&i.m(e,null),ge(e,n),a&&a.m(e,null),r=!0},p(c,l){c[0]?i?(i.p(c,l),l&1&&ce(i,1)):(i=NE(c),i.c(),ce(i,1),i.m(e,n)):i&&(gn(),ye(i,1,1,()=>{i=null}),_n()),c[4]?a?(a.p(c,l),l&16&&ce(a,1)):(a=OE(c),a.c(),ce(a,1),a.m(e,null)):a&&(gn(),ye(a,1,1,()=>{a=null}),_n())},i(c){r||(ce(i),ce(a),r=!0)},o(c){ye(i),ye(a),r=!1},d(c){c&&Ie(e),i&&i.d(),a&&a.d()}}}function z8(t){let e,n;return e=new uh({props:{$$slots:{map:[O8],sidebar:[A8],top:[M8]},$$scope:{ctx:t}}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,[i]){const a={};i&262655&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}const zE=t=>t/60;function F8(t,e,n){let r,i,a,c,l,d,b;Pt(t,l_,oe=>n(1,i=oe)),Pt(t,a_,oe=>n(2,a=oe)),Pt(t,jd,oe=>n(10,c=oe)),Pt(t,Wu,oe=>n(3,l=oe)),Pt(t,wl,oe=>n(16,d=oe)),Pt(t,qd,oe=>n(8,b=oe));let w=null,E=null,C=0,k;async function D(oe){try{let le=JSON.parse(await k.files[0].text());le.features=le.features.filter(de=>de.geometry.type=="LineString"),n(0,w=le)}catch(le){window.alert(`Couldn't snap routes from file: ${le}`)}}async function U(oe,le,de,te,_e){if(n(5,C=0),n(4,E=null),!!oe)try{n(4,E=await d.snapAndBufferRoute({input:oe,mode:l,startTime:c,maxSeconds:i*60})),n(5,C=E.total_population)}catch(be){window.alert(`Problem: ${be}`)}}function q(oe){Un[oe?"unshift":"push"](()=>{k=oe,n(6,k)})}function Q(oe){l=oe,Wu.set(l)}function F(){a=this.checked,a_.set(a)}function V(){i=_u(this.value),l_.set(i)}function J(){b=this.checked,qd.set(b)}return t.$$.update=()=>{t.$$.dirty&1039&&U(w),t.$$.dirty&2&&n(7,r=Array.from(Array(6).keys()).map(oe=>i*60/(6-1)*oe))},[w,i,a,l,E,C,k,r,b,D,c,q,Q,F,V,J]}class B8 extends Kt{constructor(e){super(),Yt(this,e,F8,z8,Ht,{})}}function U8(){return new Worker("/15m/assets/worker-2b2b0ea0.js")}function V8(t){let e,n,r,i,a,c;return{c(){e=Pe("div"),n=Pe("button"),n.innerHTML=`A/B Street logo`,r=nt(),i=Pe("span"),Oe(n,"class","outline"),Ci(i,"width","100%"),Oe(e,"slot","top"),Ci(e,"display","flex")},m(l,d){Ce(l,e,d),ge(e,n),ge(e,r),ge(e,i),t[19](i),a||(c=zt(n,"click",t[18]),a=!0)},p:it,d(l){l&&Ie(e),t[19](null),a=!1,c()}}}function FE(t){let e,n,r,i,a,c;return{c(){e=Pe("hr"),n=nt(),r=Pe("div"),i=Pe("button"),i.textContent="Zoom to fit"},m(l,d){Ce(l,e,d),Ce(l,n,d),Ce(l,r,d),ge(r,i),a||(c=zt(i,"click",t[10]),a=!0)},p:it,d(l){l&&(Ie(e),Ie(n),Ie(r)),a=!1,c()}}}function G8(t){let e,n,r,i,a,c=t[5].kind!="title"&&FE(t);return{c(){e=Pe("div"),n=Pe("h1"),n.textContent="15-minute neighbourhood tool",r=nt(),i=Pe("div"),a=nt(),c&&c.c(),Oe(e,"slot","left")},m(l,d){Ce(l,e,d),ge(e,n),ge(e,r),ge(e,i),t[17](i),ge(e,a),c&&c.m(e,null)},p(l,d){l[5].kind!="title"?c?c.p(l,d):(c=FE(l),c.c(),c.m(e,null)):c&&(c.d(1),c=null)},d(l){l&&Ie(e),t[17](null),c&&c.d()}}}function j8(t){let e,n;return e=new UN({props:{map:t[0],apiKey:iI}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,i){const a={};i&1&&(a.map=r[0]),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function BE(t){let e,n;return e=new P8({}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function UE(t){let e,n,r,i,a,c,l,d={ctx:t,current:null,token:null,hasCatch:!1,pending:Z8,then:H8,catch:q8,value:24,blocks:[,,,]};Af(e=fs(t[6]).getInvertedBoundary(),d);const b=[$8,Q8,J8,K8,Y8,X8],w=[];function E(k,D){return k[5].kind=="debug"?0:k[5].kind=="isochrone"?1:k[5].kind=="route"?2:k[5].kind=="score"?3:k[5].kind=="debug-route"?4:k[5].kind=="upload-route"?5:-1}~(r=E(t))&&(i=w[r]=b[r](t));let C=t[7]&&VE(t);return{c(){d.block.c(),n=nt(),i&&i.c(),a=nt(),C&&C.c(),c=Yn()},m(k,D){d.block.m(k,d.anchor=D),d.mount=()=>n.parentNode,d.anchor=n,Ce(k,n,D),~r&&w[r].m(k,D),Ce(k,a,D),C&&C.m(k,D),Ce(k,c,D),l=!0},p(k,D){t=k,d.ctx=t,D&64&&e!==(e=fs(t[6]).getInvertedBoundary())&&Af(e,d)||Jv(d,t,D);let U=r;r=E(t),r===U?~r&&w[r].p(t,D):(i&&(gn(),ye(w[U],1,1,()=>{w[U]=null}),_n()),~r?(i=w[r],i?i.p(t,D):(i=w[r]=b[r](t),i.c()),ce(i,1),i.m(a.parentNode,a)):i=null),t[7]?C?(C.p(t,D),D&128&&ce(C,1)):(C=VE(t),C.c(),ce(C,1),C.m(c.parentNode,c)):C&&(gn(),ye(C,1,1,()=>{C=null}),_n())},i(k){l||(ce(d.block),ce(i),ce(C),l=!0)},o(k){for(let D=0;D<3;D+=1){const U=d.blocks[D];ye(U)}ye(i),ye(C),l=!1},d(k){k&&(Ie(n),Ie(a),Ie(c)),d.block.d(k),d.token=null,d=null,~r&&w[r].d(k),C&&C.d(k)}}}function q8(t){return{c:it,m:it,p:it,i:it,o:it,d:it}}function H8(t){let e,n;return e=new Vs({props:{data:t[24],$$slots:{default:[W8]},$$scope:{ctx:t}}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,i){const a={};i&64&&(a.data=r[24]),i&33554432&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function W8(t){let e,n;return e=new xm({props:{paint:{"fill-color":"black","fill-opacity":.3}}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p:it,i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function Z8(t){return{c:it,m:it,p:it,i:it,o:it,d:it}}function X8(t){let e,n;return e=new B8({}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p:it,i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function Y8(t){let e,n;return e=new AF({props:{debugGj:t[5].debugGj,start:t[5].start,end:t[5].end,routeGj:t[5].routeGj}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,i){const a={};i&32&&(a.debugGj=r[5].debugGj),i&32&&(a.start=r[5].start),i&32&&(a.end=r[5].end),i&32&&(a.routeGj=r[5].routeGj),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function K8(t){let e,n;return e=new jF({}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p:it,i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function J8(t){let e,n;return e=new xF({}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p:it,i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function Q8(t){let e,n;return e=new W6({}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p:it,i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function $8(t){let e,n;return e=new N6({}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p:it,i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function VE(t){let e,n,r,i={ctx:t,current:null,token:null,hasCatch:!1,pending:n7,then:t7,catch:e7,value:23,blocks:[,,,]};return Af(n=fs(t[6]).renderZones(),i),{c(){e=Yn(),i.block.c()},m(a,c){Ce(a,e,c),i.block.m(a,i.anchor=c),i.mount=()=>e.parentNode,i.anchor=e,r=!0},p(a,c){t=a,i.ctx=t,c&64&&n!==(n=fs(t[6]).renderZones())&&Af(n,i)||Jv(i,t,c)},i(a){r||(ce(i.block),r=!0)},o(a){for(let c=0;c<3;c+=1){const l=i.blocks[c];ye(l)}r=!1},d(a){a&&Ie(e),i.block.d(a),i.token=null,i=null}}}function e7(t){return{c:it,m:it,p:it,i:it,o:it,d:it}}function t7(t){let e,n;return e=new b6({props:{gj:t[23]}}),{c(){et(e.$$.fragment)},m(r,i){Qe(e,r,i),n=!0},p(r,i){const a={};i&64&&(a.gj=r[23]),e.$set(a)},i(r){n||(ce(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){$e(e,r)}}}function n7(t){return{c:it,m:it,p:it,i:it,o:it,d:it}}function r7(t){let e,n,r,i,a,c,l=!t[9]&&j8(t),d=t[5].kind=="title"&&BE(),b=t[4]&&UE(t);return{c(){l&&l.c(),e=nt(),n=Pe("div"),r=nt(),d&&d.c(),i=nt(),b&&b.c(),a=Yn()},m(w,E){l&&l.m(w,E),Ce(w,e,E),Ce(w,n,E),t[14](n),Ce(w,r,E),d&&d.m(w,E),Ce(w,i,E),b&&b.m(w,E),Ce(w,a,E),c=!0},p(w,E){w[9]||l.p(w,E),w[5].kind=="title"?d?E&32&&ce(d,1):(d=BE(),d.c(),ce(d,1),d.m(i.parentNode,i)):d&&(gn(),ye(d,1,1,()=>{d=null}),_n()),w[4]?b?(b.p(w,E),E&16&&ce(b,1)):(b=UE(w),b.c(),ce(b,1),b.m(a.parentNode,a)):b&&(gn(),ye(b,1,1,()=>{b=null}),_n())},i(w){c||(ce(l),ce(d),ce(b),c=!0)},o(w){ye(l),ye(d),ye(b),c=!1},d(w){w&&(Ie(e),Ie(n),Ie(r),Ie(i),Ie(a)),l&&l.d(w),t[14](null),d&&d.d(w),b&&b.d(w)}}}function i7(t){let e,n,r,i;function a(l){t[15](l)}let c={style:t[9]?"http://localhost:5173/offline/light_style.json":`https://api.maptiler.com/maps/dataviz/style.json?key=${iI}`,standardControls:!0,hash:!0,images:[{id:"cycle_parking",url:nM}],$$slots:{default:[r7]},$$scope:{ctx:t}};return t[0]!==void 0&&(c.map=t[0]),n=new Pz({props:c}),Un.push(()=>Oi(n,"map",a)),n.$on("error",t[16]),{c(){e=Pe("div"),et(n.$$.fragment),Oe(e,"slot","main"),Ci(e,"position","relative"),Ci(e,"width","100%"),Ci(e,"height","100vh")},m(l,d){Ce(l,e,d),Qe(n,e,null),i=!0},p(l,d){const b={};d&33554681&&(b.$$scope={dirty:d,ctx:l}),!r&&d&1&&(r=!0,b.map=l[0],Ni(()=>r=!1)),n.$set(b)},i(l){i||(ce(n.$$.fragment,l),i=!0)},o(l){ye(n.$$.fragment,l),i=!1},d(l){l&&Ie(e),$e(n)}}}function o7(t){let e,n,r,i;return e=new BM({}),r=new jz({props:{$$slots:{main:[i7],left:[G8],top:[V8]},$$scope:{ctx:t}}}),{c(){et(e.$$.fragment),n=nt(),et(r.$$.fragment)},m(a,c){Qe(e,a,c),Ce(a,n,c),Qe(r,a,c),i=!0},p(a,[c]){const l={};c&33554943&&(l.$$scope={dirty:c,ctx:a}),r.$set(l)},i(a){i||(ce(e.$$.fragment,a),ce(r.$$.fragment,a),i=!0)},o(a){ye(e.$$.fragment,a),ye(r.$$.fragment,a),i=!1},d(a){a&&Ie(n),$e(e,a),$e(r,a)}}}function Gg(t,e,n){return e+t*(n-e)}function s7(t,e,n){let r,i,a,c,l,d,b,w,E,C;Pt(t,Hv,be=>n(11,r=be)),Pt(t,qv,be=>n(12,i=be)),Pt(t,jv,be=>n(13,a=be)),Pt(t,If,be=>n(4,c=be)),Pt(t,Ms,be=>n(5,l=be)),Pt(t,kf,be=>n(20,d=be)),Pt(t,Fc,be=>n(21,b=be)),Pt(t,wl,be=>n(6,w=be)),Pt(t,nv,be=>n(7,E=be)),Pt(t,s_,be=>n(8,C=be));let k=new URLSearchParams(window.location.search).has("offline");if(k){let be=new EO;as.addProtocol("pmtiles",be.tile)}rc(async()=>{const be=$E(new U8);let W=await new be;wl.set(W)});let D;async function U(){D&&c&&D.fitBounds(await w.getBounds(),{animate:!1})}async function q(be){if(be){console.log("New map model loaded");let W=await w.getBounds();jn(Fc,b={lng:Gg(.4,W[0],W[2]),lat:Gg(.4,W[1],W[3])},b),jn(kf,d={lng:Gg(.6,W[0],W[2]),lat:Gg(.6,W[1],W[3])},d),await U(),jn(Ms,l={kind:"isochrone"},l)}}let Q,F,V;function J(be){Un[be?"unshift":"push"](()=>{V=be,n(3,V),n(11,r)})}function oe(be){D=be,n(0,D)}const le=be=>{console.log(be.detail.error)};function de(be){Un[be?"unshift":"push"](()=>{F=be,n(2,F),n(12,i)})}const te=()=>jn(s_,C=!0,C);function _e(be){Un[be?"unshift":"push"](()=>{Q=be,n(1,Q),n(13,a)})}return t.$$.update=()=>{t.$$.dirty&1&&D&&j_.set(D),t.$$.dirty&16&&q(c),t.$$.dirty&8194&&Q&&a&&(n(1,Q.innerHTML="",Q),Q.appendChild(a)),t.$$.dirty&4100&&F&&i&&(n(2,F.innerHTML="",F),F.appendChild(i)),t.$$.dirty&2056&&V&&r&&(n(3,V.innerHTML="",V),V.appendChild(r))},[D,Q,F,V,c,l,w,E,C,k,U,r,i,a,J,oe,le,de,te,_e]}class a7 extends Kt{constructor(e){super(),Yt(this,e,s7,o7,Ht,{})}}new a7({target:document.getElementById("app")}); diff --git a/assets/worker-0f938e3f.js b/assets/worker-2b2b0ea0.js similarity index 99% rename from assets/worker-0f938e3f.js rename to assets/worker-2b2b0ea0.js index 2266400..c46af2e 100644 --- a/assets/worker-0f938e3f.js +++ b/assets/worker-2b2b0ea0.js @@ -3,4 +3,4 @@ var Me=Object.defineProperty;var Te=(A,k,R)=>k in A?Me(A,k,{enumerable:!0,config * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 */const A=Symbol("Comlink.proxy"),k=Symbol("Comlink.endpoint"),R=Symbol("Comlink.releaseProxy"),H=Symbol("Comlink.finalizer"),z=Symbol("Comlink.thrown"),Z=n=>typeof n=="object"&&n!==null||typeof n=="function",ie={canHandle:n=>Z(n)&&n[A],serialize(n){const{port1:e,port2:t}=new MessageChannel;return J(n,e),[t,[t]]},deserialize(n){return n.start(),ue(n)}},ae={canHandle:n=>Z(n)&&z in n,serialize({value:n}){let e;return n instanceof Error?e={isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:e={isError:!1,value:n},[e,[]]},deserialize(n){throw n.isError?Object.assign(new Error(n.value.message),n.value):n.value}},Y=new Map([["proxy",ie],["throw",ae]]);function se(n,e){for(const t of n)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function J(n,e=globalThis,t=["*"]){e.addEventListener("message",function r(o){if(!o||!o.data)return;if(!se(t,o.origin)){console.warn(`Invalid origin '${o.origin}' for comlink proxy`);return}const{id:b,type:c,path:u}=Object.assign({path:[]},o.data),f=(o.data.argumentList||[]).map(S);let s;try{const g=u.slice(0,-1).reduce((m,I)=>m[I],n),y=u.reduce((m,I)=>m[I],n);switch(c){case"GET":s=y;break;case"SET":g[u.slice(-1)[0]]=S(o.data.value),s=!0;break;case"APPLY":s=y.apply(g,f);break;case"CONSTRUCT":{const m=new y(...f);s=we(m)}break;case"ENDPOINT":{const{port1:m,port2:I}=new MessageChannel;J(n,I),s=ge(m,[m])}break;case"RELEASE":s=void 0;break;default:return}}catch(g){s={value:g,[z]:0}}Promise.resolve(s).catch(g=>({value:g,[z]:0})).then(g=>{const[y,m]=U(g);e.postMessage(Object.assign(Object.assign({},y),{id:b}),m),c==="RELEASE"&&(e.removeEventListener("message",r),K(e),H in n&&typeof n[H]=="function"&&n[H]())}).catch(g=>{const[y,m]=U({value:new TypeError("Unserializable return value"),[z]:0});e.postMessage(Object.assign(Object.assign({},y),{id:b}),m)})}),e.start&&e.start()}function ce(n){return n.constructor.name==="MessagePort"}function K(n){ce(n)&&n.close()}function ue(n,e){return V(n,[],e)}function C(n){if(n)throw new Error("Proxy has been released and is not useable")}function X(n){return x(n,{type:"RELEASE"}).then(()=>{K(n)})}const P=new WeakMap,W="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{const e=(P.get(n)||0)-1;P.set(n,e),e===0&&X(n)});function fe(n,e){const t=(P.get(e)||0)+1;P.set(e,t),W&&W.register(n,e,n)}function be(n){W&&W.unregister(n)}function V(n,e=[],t=function(){}){let r=!1;const o=new Proxy(t,{get(b,c){if(C(r),c===R)return()=>{be(o),X(n),r=!0};if(c==="then"){if(e.length===0)return{then:()=>o};const u=x(n,{type:"GET",path:e.map(f=>f.toString())}).then(S);return u.then.bind(u)}return V(n,[...e,c])},set(b,c,u){C(r);const[f,s]=U(u);return x(n,{type:"SET",path:[...e,c].map(g=>g.toString()),value:f},s).then(S)},apply(b,c,u){C(r);const f=e[e.length-1];if(f===k)return x(n,{type:"ENDPOINT"}).then(S);if(f==="bind")return V(n,e.slice(0,-1));const[s,g]=Q(u);return x(n,{type:"APPLY",path:e.map(y=>y.toString()),argumentList:s},g).then(S)},construct(b,c){C(r);const[u,f]=Q(c);return x(n,{type:"CONSTRUCT",path:e.map(s=>s.toString()),argumentList:u},f).then(S)}});return fe(o,n),o}function de(n){return Array.prototype.concat.apply([],n)}function Q(n){const e=n.map(U);return[e.map(t=>t[0]),de(e.map(t=>t[1]))]}const q=new WeakMap;function ge(n,e){return q.set(n,e),n}function we(n){return Object.assign(n,{[A]:!0})}function U(n){for(const[e,t]of Y)if(t.canHandle(n)){const[r,o]=t.serialize(n);return[{type:"HANDLER",name:e,value:r},o]}return[{type:"RAW",value:n},q.get(n)||[]]}function S(n){switch(n.type){case"HANDLER":return Y.get(n.name).deserialize(n.value);case"RAW":return n.value}}function x(n,e,t){return new Promise(r=>{const o=le();n.addEventListener("message",function b(c){!c.data||!c.data.id||c.data.id!==o||(n.removeEventListener("message",b),r(c.data))}),n.start&&n.start(),n.postMessage(Object.assign({id:o},e),t)})}function le(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}let i;const E=new Array(128).fill(void 0);E.push(void 0,null,!0,!1);function _(n){return E[n]}let M=E.length;function a(n){M===E.length&&E.push(E.length+1);const e=M;return M=E[e],E[e]=n,e}function ye(n){n<132||(E[n]=M,M=n)}function h(n){const e=_(n);return ye(n),e}const ee=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&ee.decode();let T=null;function B(){return(T===null||T.byteLength===0)&&(T=new Uint8Array(i.memory.buffer)),T}function l(n,e){return n=n>>>0,ee.decode(B().subarray(n,n+e))}let v=0;const D=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},me=typeof D.encodeInto=="function"?function(n,e){return D.encodeInto(n,e)}:function(n,e){const t=D.encode(n);return e.set(t),{read:n.length,written:t.length}};function O(n,e,t){if(t===void 0){const u=D.encode(n),f=e(u.length,1)>>>0;return B().subarray(f,f+u.length).set(u),v=u.length,f}let r=n.length,o=e(r,1)>>>0;const b=B();let c=0;for(;c127)break;b[o+c]=u}if(c!==r){c!==0&&(n=n.slice(c)),o=t(o,r,r=c+n.length*3,1)>>>0;const u=B().subarray(o+c,o+r),f=me(n,u);c+=f.written,o=t(o,r,c,1)>>>0}return v=c,o}function p(n){return n==null}let F=null;function d(){return(F===null||F.byteLength===0)&&(F=new Int32Array(i.memory.buffer)),F}let L=null;function ne(){return(L===null||L.byteLength===0)&&(L=new Float64Array(i.memory.buffer)),L}let N=null;function he(){return(N===null||N.byteLength===0)&&(N=new BigInt64Array(i.memory.buffer)),N}function $(n){const e=typeof n;if(e=="number"||e=="boolean"||n==null)return`${n}`;if(e=="string")return`"${n}"`;if(e=="symbol"){const o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){const o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){const o=n.length;let b="[";o>0&&(b+=$(n[0]));for(let c=1;c1)r=t[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message} -${n.stack}`:r}const te=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>{i.__wbindgen_export_2.get(n.dtor)(n.a,n.b)});function re(n,e,t,r){const o={a:n,b:e,cnt:1,dtor:t},b=(...c)=>{o.cnt++;const u=o.a;o.a=0;try{return r(u,o.b,...c)}finally{--o.cnt===0?(i.__wbindgen_export_2.get(o.dtor)(u,o.b),te.unregister(o)):o.a=u}};return b.original=o,te.register(b,o,o),b}function pe(n,e,t){i._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha0b106c86a4071f7(n,e,a(t))}function ve(n,e,t){i._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4a3a4bb5c4c0b039(n,e,a(t))}function ke(n,e){const t=e(n.length*1,1)>>>0;return B().set(n,t/1),v=n.length,t}function Ee(n,e){return n=n>>>0,ne().subarray(n/8,n/8+e)}function w(n,e){try{return n.apply(this,e)}catch(t){i.__wbindgen_exn_store(a(t))}}function Ae(n,e,t,r){i.wasm_bindgen__convert__closures__invoke2_mut__h5b77cba7b0f68717(n,e,a(t),a(r))}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>i.__wbg_intounderlyingbytesource_free(n>>>0)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>i.__wbg_intounderlyingsink_free(n>>>0)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>i.__wbg_intounderlyingsource_free(n>>>0));const oe=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_mapmodel_free(n>>>0));class j{static __wrap(e){e=e>>>0;const t=Object.create(j.prototype);return t.__wbg_ptr=e,oe.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,oe.unregister(this),e}free(){const e=this.__destroy_into_raw();i.__wbg_mapmodel_free(e)}constructor(e,t,r,o,b){const c=ke(e,i.__wbindgen_malloc),u=v;var f=p(r)?0:O(r,i.__wbindgen_malloc,i.__wbindgen_realloc),s=v,g=p(o)?0:O(o,i.__wbindgen_malloc,i.__wbindgen_realloc),y=v;const m=i.mapmodel_new(c,u,t,f,s,g,y,p(b)?0:a(b));return h(m)}renderDebug(){let e,t;try{const s=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_renderDebug(s,this.__wbg_ptr);var r=d()[s/4+0],o=d()[s/4+1],b=d()[s/4+2],c=d()[s/4+3],u=r,f=o;if(c)throw u=0,f=0,h(b);return e=u,t=f,l(u,f)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(e,t,1)}}renderAmenities(){let e,t;try{const s=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_renderAmenities(s,this.__wbg_ptr);var r=d()[s/4+0],o=d()[s/4+1],b=d()[s/4+2],c=d()[s/4+3],u=r,f=o;if(c)throw u=0,f=0,h(b);return e=u,t=f,l(u,f)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(e,t,1)}}getInvertedBoundary(){let e,t;try{const s=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_getInvertedBoundary(s,this.__wbg_ptr);var r=d()[s/4+0],o=d()[s/4+1],b=d()[s/4+2],c=d()[s/4+3],u=r,f=o;if(c)throw u=0,f=0,h(b);return e=u,t=f,l(u,f)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(e,t,1)}}getBounds(){try{const o=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_getBounds(o,this.__wbg_ptr);var e=d()[o/4+0],t=d()[o/4+1],r=Ee(e,t).slice();return i.__wbindgen_free(e,t*8,8),r}finally{i.__wbindgen_add_to_stack_pointer(16)}}renderZones(){let e,t;try{const s=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_renderZones(s,this.__wbg_ptr);var r=d()[s/4+0],o=d()[s/4+1],b=d()[s/4+2],c=d()[s/4+3],u=r,f=o;if(c)throw u=0,f=0,h(b);return e=u,t=f,l(u,f)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(e,t,1)}}isochrone(e){let t,r;try{const g=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_isochrone(g,this.__wbg_ptr,a(e));var o=d()[g/4+0],b=d()[g/4+1],c=d()[g/4+2],u=d()[g/4+3],f=o,s=b;if(u)throw f=0,s=0,h(c);return t=f,r=s,l(f,s)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(t,r,1)}}route(e){let t,r;try{const g=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_route(g,this.__wbg_ptr,a(e));var o=d()[g/4+0],b=d()[g/4+1],c=d()[g/4+2],u=d()[g/4+3],f=o,s=b;if(u)throw f=0,s=0,h(c);return t=f,r=s,l(f,s)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(t,r,1)}}bufferRoute(e){let t,r;try{const g=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_bufferRoute(g,this.__wbg_ptr,a(e));var o=d()[g/4+0],b=d()[g/4+1],c=d()[g/4+2],u=d()[g/4+3],f=o,s=b;if(u)throw f=0,s=0,h(c);return t=f,r=s,l(f,s)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(t,r,1)}}score(e,t){let r,o;try{const y=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_score(y,this.__wbg_ptr,a(e),p(t)?0:a(t));var b=d()[y/4+0],c=d()[y/4+1],u=d()[y/4+2],f=d()[y/4+3],s=b,g=c;if(f)throw s=0,g=0,h(u);return r=s,o=g,l(s,g)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(r,o,1)}}snapAndBufferRoute(e){let t,r;try{const g=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_snapAndBufferRoute(g,this.__wbg_ptr,a(e));var o=d()[g/4+0],b=d()[g/4+1],c=d()[g/4+2],u=d()[g/4+3],f=o,s=b;if(u)throw f=0,s=0,h(c);return t=f,r=s,l(f,s)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(t,r,1)}}}async function Re(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{const t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function Se(){const n={};return n.wbg={},n.wbg.__wbindgen_is_bigint=function(e){return typeof _(e)=="bigint"},n.wbg.__wbindgen_bigint_from_u64=function(e){const t=BigInt.asUintN(64,e);return a(t)},n.wbg.__wbindgen_jsval_eq=function(e,t){return _(e)===_(t)},n.wbg.__wbindgen_object_drop_ref=function(e){h(e)},n.wbg.__wbindgen_error_new=function(e,t){const r=new Error(l(e,t));return a(r)},n.wbg.__wbindgen_string_get=function(e,t){const r=_(t),o=typeof r=="string"?r:void 0;var b=p(o)?0:O(o,i.__wbindgen_malloc,i.__wbindgen_realloc),c=v;d()[e/4+1]=c,d()[e/4+0]=b},n.wbg.__wbindgen_boolean_get=function(e){const t=_(e);return typeof t=="boolean"?t?1:0:2},n.wbg.__wbindgen_is_object=function(e){const t=_(e);return typeof t=="object"&&t!==null},n.wbg.__wbindgen_is_undefined=function(e){return _(e)===void 0},n.wbg.__wbindgen_in=function(e,t){return _(e)in _(t)},n.wbg.__wbindgen_number_get=function(e,t){const r=_(t),o=typeof r=="number"?r:void 0;ne()[e/8+1]=p(o)?0:o,d()[e/4+0]=!p(o)},n.wbg.__wbg_mapmodel_new=function(e){const t=j.__wrap(e);return a(t)},n.wbg.__wbindgen_string_new=function(e,t){const r=l(e,t);return a(r)},n.wbg.__wbindgen_jsval_loose_eq=function(e,t){return _(e)==_(t)},n.wbg.__wbindgen_object_clone_ref=function(e){const t=_(e);return a(t)},n.wbg.__wbg_getwithrefkey_3b3c46ba20582127=function(e,t){const r=_(e)[_(t)];return a(r)},n.wbg.__wbg_new_abda76e883ba8a5f=function(){const e=new Error;return a(e)},n.wbg.__wbg_stack_658279fe44541cf6=function(e,t){const r=_(t).stack,o=O(r,i.__wbindgen_malloc,i.__wbindgen_realloc),b=v;d()[e/4+1]=b,d()[e/4+0]=o},n.wbg.__wbg_error_f851667af71bcfc6=function(e,t){let r,o;try{r=e,o=t,console.error(l(e,t))}finally{i.__wbindgen_free(r,o,1)}},n.wbg.__wbindgen_cb_drop=function(e){const t=h(e).original;return t.cnt--==1?(t.a=0,!0):!1},n.wbg.__wbg_fetch_1e4e8ed1f64c7e28=function(e){const t=fetch(_(e));return a(t)},n.wbg.__wbg_performance_a1b8bde2ee512264=function(e){const t=_(e).performance;return a(t)},n.wbg.__wbg_now_abd80e969af37148=function(e){return _(e).now()},n.wbg.__wbg_fetch_bc7c8e27076a5c84=function(e){const t=fetch(_(e));return a(t)},n.wbg.__wbg_done_2ffa852272310e47=function(e){return _(e).done},n.wbg.__wbg_getReader_ab94afcb5cb7689a=function(){return w(function(e){const t=_(e).getReader();return a(t)},arguments)},n.wbg.__wbg_value_9f6eeb1e2aab8d96=function(e){const t=_(e).value;return a(t)},n.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(e){const t=_(e).queueMicrotask;return a(t)},n.wbg.__wbindgen_is_function=function(e){return typeof _(e)=="function"},n.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(e){queueMicrotask(_(e))},n.wbg.__wbg_fetch_693453ca3f88c055=function(e,t){const r=_(e).fetch(_(t));return a(r)},n.wbg.__wbg_debug_34c9290896ec9856=function(e){console.debug(_(e))},n.wbg.__wbg_error_e60eff06f24ab7a4=function(e){console.error(_(e))},n.wbg.__wbg_info_d7d58472d0bab115=function(e){console.info(_(e))},n.wbg.__wbg_log_a4530b4fe289336f=function(e){console.log(_(e))},n.wbg.__wbg_warn_f260f49434e45e62=function(e){console.warn(_(e))},n.wbg.__wbg_newwithstrandinit_f581dff0d19a8b03=function(){return w(function(e,t,r){const o=new Request(l(e,t),_(r));return a(o)},arguments)},n.wbg.__wbg_instanceof_Response_4c3b1446206114d1=function(e){let t;try{t=_(e)instanceof Response}catch{t=!1}return t},n.wbg.__wbg_url_83a6a4f65f7a2b38=function(e,t){const r=_(t).url,o=O(r,i.__wbindgen_malloc,i.__wbindgen_realloc),b=v;d()[e/4+1]=b,d()[e/4+0]=o},n.wbg.__wbg_status_d6d47ad2837621eb=function(e){return _(e).status},n.wbg.__wbg_headers_24def508a7518df9=function(e){const t=_(e).headers;return a(t)},n.wbg.__wbg_body_69be35dff3d68d53=function(e){const t=_(e).body;return p(t)?0:a(t)},n.wbg.__wbg_arrayBuffer_5b2688e3dd873fed=function(){return w(function(e){const t=_(e).arrayBuffer();return a(t)},arguments)},n.wbg.__wbg_signal_3c701f5f40a5f08d=function(e){const t=_(e).signal;return a(t)},n.wbg.__wbg_new_0ae46f44b7485bb2=function(){return w(function(){const e=new AbortController;return a(e)},arguments)},n.wbg.__wbg_abort_2c4fb490d878d2b2=function(e){_(e).abort()},n.wbg.__wbg_byobRequest_05466bb0cacd89fa=function(e){const t=_(e).byobRequest;return p(t)?0:a(t)},n.wbg.__wbg_close_d29a75e8efc5fa94=function(){return w(function(e){_(e).close()},arguments)},n.wbg.__wbg_view_1fe68975176283b3=function(e){const t=_(e).view;return p(t)?0:a(t)},n.wbg.__wbg_respond_6272b341f88864a2=function(){return w(function(e,t){_(e).respond(t>>>0)},arguments)},n.wbg.__wbg_read_79c1f6a58844174c=function(e){const t=_(e).read();return a(t)},n.wbg.__wbg_releaseLock_6eb6fa75435874b8=function(e){_(e).releaseLock()},n.wbg.__wbg_cancel_ef8b2c6f99da9cde=function(e){const t=_(e).cancel();return a(t)},n.wbg.__wbg_new_7a20246daa6eec7e=function(){return w(function(){const e=new Headers;return a(e)},arguments)},n.wbg.__wbg_append_aa3f462f9e2b5ff2=function(){return w(function(e,t,r,o,b){_(e).append(l(t,r),l(o,b))},arguments)},n.wbg.__wbg_close_79df9bcee94a607c=function(){return w(function(e){_(e).close()},arguments)},n.wbg.__wbg_enqueue_e8019641f9877e27=function(){return w(function(e,t){_(e).enqueue(_(t))},arguments)},n.wbg.__wbg_get_bd8e338fbd5f5cc8=function(e,t){const r=_(e)[t>>>0];return a(r)},n.wbg.__wbg_length_cd7af8117672b8b8=function(e){return _(e).length},n.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(e,t){const r=new Function(l(e,t));return a(r)},n.wbg.__wbg_next_40fc327bfc8770e6=function(e){const t=_(e).next;return a(t)},n.wbg.__wbg_next_196c84450b364254=function(){return w(function(e){const t=_(e).next();return a(t)},arguments)},n.wbg.__wbg_done_298b57d23c0fc80c=function(e){return _(e).done},n.wbg.__wbg_value_d93c65011f51a456=function(e){const t=_(e).value;return a(t)},n.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return a(Symbol.iterator)},n.wbg.__wbg_get_e3c254076557e348=function(){return w(function(e,t){const r=Reflect.get(_(e),_(t));return a(r)},arguments)},n.wbg.__wbg_call_27c0f87801dedf93=function(){return w(function(e,t){const r=_(e).call(_(t));return a(r)},arguments)},n.wbg.__wbg_new_72fb9a18b5ae2624=function(){const e=new Object;return a(e)},n.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return w(function(){const e=self.self;return a(e)},arguments)},n.wbg.__wbg_window_c6fb939a7f436783=function(){return w(function(){const e=window.window;return a(e)},arguments)},n.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return w(function(){const e=globalThis.globalThis;return a(e)},arguments)},n.wbg.__wbg_global_207b558942527489=function(){return w(function(){const e=global.global;return a(e)},arguments)},n.wbg.__wbg_isArray_2ab64d95e09ea0ae=function(e){return Array.isArray(_(e))},n.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2=function(e){let t;try{t=_(e)instanceof ArrayBuffer}catch{t=!1}return t},n.wbg.__wbg_new_28c511d9baebfa89=function(e,t){const r=new Error(l(e,t));return a(r)},n.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return w(function(e,t,r){const o=_(e).call(_(t),_(r));return a(o)},arguments)},n.wbg.__wbg_isSafeInteger_f7b04ef02296c4d2=function(e){return Number.isSafeInteger(_(e))},n.wbg.__wbg_new_81740750da40724f=function(e,t){try{var r={a:e,b:t},o=(c,u)=>{const f=r.a;r.a=0;try{return Ae(f,r.b,c,u)}finally{r.a=f}};const b=new Promise(o);return a(b)}finally{r.a=r.b=0}},n.wbg.__wbg_resolve_b0083a7967828ec8=function(e){const t=Promise.resolve(_(e));return a(t)},n.wbg.__wbg_catch_0260e338d10f79ae=function(e,t){const r=_(e).catch(_(t));return a(r)},n.wbg.__wbg_then_0c86a60e8fcfe9f6=function(e,t){const r=_(e).then(_(t));return a(r)},n.wbg.__wbg_then_a73caa9a87991566=function(e,t,r){const o=_(e).then(_(t),_(r));return a(o)},n.wbg.__wbg_buffer_12d079cc21e14bdb=function(e){const t=_(e).buffer;return a(t)},n.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(e,t,r){const o=new Uint8Array(_(e),t>>>0,r>>>0);return a(o)},n.wbg.__wbg_new_63b92bc8671ed464=function(e){const t=new Uint8Array(_(e));return a(t)},n.wbg.__wbg_set_a47bac70306a19a7=function(e,t,r){_(e).set(_(t),r>>>0)},n.wbg.__wbg_length_c20a40f15020d68a=function(e){return _(e).length},n.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6=function(e){let t;try{t=_(e)instanceof Uint8Array}catch{t=!1}return t},n.wbg.__wbg_buffer_dd7f74bc60f1faab=function(e){const t=_(e).buffer;return a(t)},n.wbg.__wbg_byteLength_58f7b4fab1919d44=function(e){return _(e).byteLength},n.wbg.__wbg_byteOffset_81d60f7392524f62=function(e){return _(e).byteOffset},n.wbg.__wbg_has_0af94d20077affa2=function(){return w(function(e,t){return Reflect.has(_(e),_(t))},arguments)},n.wbg.__wbg_set_1f9b04f170055d33=function(){return w(function(e,t,r){return Reflect.set(_(e),_(t),_(r))},arguments)},n.wbg.__wbg_stringify_8887fe74e1c50d81=function(){return w(function(e){const t=JSON.stringify(_(e));return a(t)},arguments)},n.wbg.__wbindgen_bigint_get_as_i64=function(e,t){const r=_(t),o=typeof r=="bigint"?r:void 0;he()[e/8+1]=p(o)?BigInt(0):o,d()[e/4+0]=!p(o)},n.wbg.__wbindgen_debug_string=function(e,t){const r=$(_(t)),o=O(r,i.__wbindgen_malloc,i.__wbindgen_realloc),b=v;d()[e/4+1]=b,d()[e/4+0]=o},n.wbg.__wbindgen_throw=function(e,t){throw new Error(l(e,t))},n.wbg.__wbindgen_memory=function(){const e=i.memory;return a(e)},n.wbg.__wbindgen_closure_wrapper3129=function(e,t,r){const o=re(e,t,907,pe);return a(o)},n.wbg.__wbindgen_closure_wrapper3148=function(e,t,r){const o=re(e,t,914,ve);return a(o)},n}function xe(n,e){return i=n.exports,G.__wbindgen_wasm_module=e,N=null,L=null,F=null,T=null,i}async function G(n){if(i!==void 0)return i;typeof n>"u"&&(n="/15m/assets/backend_bg.wasm");const e=Se();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));const{instance:t,module:r}=await Re(await n,e);return xe(t,r)}class Oe{constructor(){_e(this,"inner");this.inner=null}async loadOsmFile(e,t,r,o){await G(),this.inner=await new j(e,!0,t,r,o)}async loadGraphFile(e){await G(),this.inner=await new j(e,!1,void 0,void 0,void 0)}isLoaded(){return this.inner!=null}unset(){this.inner=null}getBounds(){if(!this.inner)throw new Error("Backend used without a file loaded");return Array.from(this.inner.getBounds())}getInvertedBoundary(){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.getInvertedBoundary())}renderDebug(){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.renderDebug())}renderAmenities(){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.renderAmenities())}renderZones(){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.renderZones())}isochrone(e){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.isochrone({x:e.start.lng,y:e.start.lat,mode:e.mode,style:e.style,start_time:e.startTime,max_seconds:e.maxSeconds}))}route(e){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.route({x1:e.start.lng,y1:e.start.lat,x2:e.end[0],y2:e.end[1],mode:e.mode,debug_search:e.debugSearch,use_heuristic:e.useHeuristic,start_time:e.startTime}))}bufferRoute(e){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.bufferRoute({x1:e.start.lng,y1:e.start.lat,x2:e.end[0],y2:e.end[1],mode:e.mode,use_heuristic:e.useHeuristic,start_time:e.startTime,max_seconds:e.maxSeconds}))}score(e,t){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.score({poi_kinds:e.poiKinds,max_seconds:e.maxSeconds},t))}snapAndBufferRoute(e){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.snapAndBufferRoute({input:JSON.stringify(e.input),mode:e.mode,start_time:e.startTime,max_seconds:e.maxSeconds}))}}J(Oe)})(); +${n.stack}`:r}const te=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>{i.__wbindgen_export_2.get(n.dtor)(n.a,n.b)});function re(n,e,t,r){const o={a:n,b:e,cnt:1,dtor:t},b=(...c)=>{o.cnt++;const u=o.a;o.a=0;try{return r(u,o.b,...c)}finally{--o.cnt===0?(i.__wbindgen_export_2.get(o.dtor)(u,o.b),te.unregister(o)):o.a=u}};return b.original=o,te.register(b,o,o),b}function pe(n,e,t){i._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha0b106c86a4071f7(n,e,a(t))}function ve(n,e,t){i._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4a3a4bb5c4c0b039(n,e,a(t))}function ke(n,e){const t=e(n.length*1,1)>>>0;return B().set(n,t/1),v=n.length,t}function Ee(n,e){return n=n>>>0,ne().subarray(n/8,n/8+e)}function w(n,e){try{return n.apply(this,e)}catch(t){i.__wbindgen_exn_store(a(t))}}function Ae(n,e,t,r){i.wasm_bindgen__convert__closures__invoke2_mut__h5b77cba7b0f68717(n,e,a(t),a(r))}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>i.__wbg_intounderlyingbytesource_free(n>>>0)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>i.__wbg_intounderlyingsink_free(n>>>0)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>i.__wbg_intounderlyingsource_free(n>>>0));const oe=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_mapmodel_free(n>>>0));class j{static __wrap(e){e=e>>>0;const t=Object.create(j.prototype);return t.__wbg_ptr=e,oe.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,oe.unregister(this),e}free(){const e=this.__destroy_into_raw();i.__wbg_mapmodel_free(e)}constructor(e,t,r,o,b){const c=ke(e,i.__wbindgen_malloc),u=v;var f=p(r)?0:O(r,i.__wbindgen_malloc,i.__wbindgen_realloc),s=v,g=p(o)?0:O(o,i.__wbindgen_malloc,i.__wbindgen_realloc),y=v;const m=i.mapmodel_new(c,u,t,f,s,g,y,p(b)?0:a(b));return h(m)}renderDebug(){let e,t;try{const s=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_renderDebug(s,this.__wbg_ptr);var r=d()[s/4+0],o=d()[s/4+1],b=d()[s/4+2],c=d()[s/4+3],u=r,f=o;if(c)throw u=0,f=0,h(b);return e=u,t=f,l(u,f)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(e,t,1)}}renderAmenities(){let e,t;try{const s=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_renderAmenities(s,this.__wbg_ptr);var r=d()[s/4+0],o=d()[s/4+1],b=d()[s/4+2],c=d()[s/4+3],u=r,f=o;if(c)throw u=0,f=0,h(b);return e=u,t=f,l(u,f)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(e,t,1)}}getInvertedBoundary(){let e,t;try{const s=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_getInvertedBoundary(s,this.__wbg_ptr);var r=d()[s/4+0],o=d()[s/4+1],b=d()[s/4+2],c=d()[s/4+3],u=r,f=o;if(c)throw u=0,f=0,h(b);return e=u,t=f,l(u,f)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(e,t,1)}}getBounds(){try{const o=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_getBounds(o,this.__wbg_ptr);var e=d()[o/4+0],t=d()[o/4+1],r=Ee(e,t).slice();return i.__wbindgen_free(e,t*8,8),r}finally{i.__wbindgen_add_to_stack_pointer(16)}}renderZones(){let e,t;try{const s=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_renderZones(s,this.__wbg_ptr);var r=d()[s/4+0],o=d()[s/4+1],b=d()[s/4+2],c=d()[s/4+3],u=r,f=o;if(c)throw u=0,f=0,h(b);return e=u,t=f,l(u,f)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(e,t,1)}}isochrone(e){let t,r;try{const g=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_isochrone(g,this.__wbg_ptr,a(e));var o=d()[g/4+0],b=d()[g/4+1],c=d()[g/4+2],u=d()[g/4+3],f=o,s=b;if(u)throw f=0,s=0,h(c);return t=f,r=s,l(f,s)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(t,r,1)}}route(e){let t,r;try{const g=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_route(g,this.__wbg_ptr,a(e));var o=d()[g/4+0],b=d()[g/4+1],c=d()[g/4+2],u=d()[g/4+3],f=o,s=b;if(u)throw f=0,s=0,h(c);return t=f,r=s,l(f,s)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(t,r,1)}}bufferRoute(e){let t,r;try{const g=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_bufferRoute(g,this.__wbg_ptr,a(e));var o=d()[g/4+0],b=d()[g/4+1],c=d()[g/4+2],u=d()[g/4+3],f=o,s=b;if(u)throw f=0,s=0,h(c);return t=f,r=s,l(f,s)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(t,r,1)}}score(e,t){let r,o;try{const y=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_score(y,this.__wbg_ptr,a(e),p(t)?0:a(t));var b=d()[y/4+0],c=d()[y/4+1],u=d()[y/4+2],f=d()[y/4+3],s=b,g=c;if(f)throw s=0,g=0,h(u);return r=s,o=g,l(s,g)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(r,o,1)}}snapAndBufferRoute(e){let t,r;try{const g=i.__wbindgen_add_to_stack_pointer(-16);i.mapmodel_snapAndBufferRoute(g,this.__wbg_ptr,a(e));var o=d()[g/4+0],b=d()[g/4+1],c=d()[g/4+2],u=d()[g/4+3],f=o,s=b;if(u)throw f=0,s=0,h(c);return t=f,r=s,l(f,s)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_free(t,r,1)}}}async function Re(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{const t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function Se(){const n={};return n.wbg={},n.wbg.__wbindgen_is_bigint=function(e){return typeof _(e)=="bigint"},n.wbg.__wbindgen_bigint_from_u64=function(e){const t=BigInt.asUintN(64,e);return a(t)},n.wbg.__wbindgen_jsval_eq=function(e,t){return _(e)===_(t)},n.wbg.__wbindgen_object_drop_ref=function(e){h(e)},n.wbg.__wbindgen_error_new=function(e,t){const r=new Error(l(e,t));return a(r)},n.wbg.__wbindgen_string_get=function(e,t){const r=_(t),o=typeof r=="string"?r:void 0;var b=p(o)?0:O(o,i.__wbindgen_malloc,i.__wbindgen_realloc),c=v;d()[e/4+1]=c,d()[e/4+0]=b},n.wbg.__wbindgen_boolean_get=function(e){const t=_(e);return typeof t=="boolean"?t?1:0:2},n.wbg.__wbindgen_is_object=function(e){const t=_(e);return typeof t=="object"&&t!==null},n.wbg.__wbindgen_is_undefined=function(e){return _(e)===void 0},n.wbg.__wbindgen_in=function(e,t){return _(e)in _(t)},n.wbg.__wbindgen_number_get=function(e,t){const r=_(t),o=typeof r=="number"?r:void 0;ne()[e/8+1]=p(o)?0:o,d()[e/4+0]=!p(o)},n.wbg.__wbg_mapmodel_new=function(e){const t=j.__wrap(e);return a(t)},n.wbg.__wbindgen_string_new=function(e,t){const r=l(e,t);return a(r)},n.wbg.__wbindgen_jsval_loose_eq=function(e,t){return _(e)==_(t)},n.wbg.__wbindgen_object_clone_ref=function(e){const t=_(e);return a(t)},n.wbg.__wbg_getwithrefkey_3b3c46ba20582127=function(e,t){const r=_(e)[_(t)];return a(r)},n.wbg.__wbg_new_abda76e883ba8a5f=function(){const e=new Error;return a(e)},n.wbg.__wbg_stack_658279fe44541cf6=function(e,t){const r=_(t).stack,o=O(r,i.__wbindgen_malloc,i.__wbindgen_realloc),b=v;d()[e/4+1]=b,d()[e/4+0]=o},n.wbg.__wbg_error_f851667af71bcfc6=function(e,t){let r,o;try{r=e,o=t,console.error(l(e,t))}finally{i.__wbindgen_free(r,o,1)}},n.wbg.__wbindgen_cb_drop=function(e){const t=h(e).original;return t.cnt--==1?(t.a=0,!0):!1},n.wbg.__wbg_fetch_1e4e8ed1f64c7e28=function(e){const t=fetch(_(e));return a(t)},n.wbg.__wbg_performance_a1b8bde2ee512264=function(e){const t=_(e).performance;return a(t)},n.wbg.__wbg_now_abd80e969af37148=function(e){return _(e).now()},n.wbg.__wbg_fetch_bc7c8e27076a5c84=function(e){const t=fetch(_(e));return a(t)},n.wbg.__wbg_done_2ffa852272310e47=function(e){return _(e).done},n.wbg.__wbg_getReader_ab94afcb5cb7689a=function(){return w(function(e){const t=_(e).getReader();return a(t)},arguments)},n.wbg.__wbg_value_9f6eeb1e2aab8d96=function(e){const t=_(e).value;return a(t)},n.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(e){const t=_(e).queueMicrotask;return a(t)},n.wbg.__wbindgen_is_function=function(e){return typeof _(e)=="function"},n.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(e){queueMicrotask(_(e))},n.wbg.__wbg_fetch_693453ca3f88c055=function(e,t){const r=_(e).fetch(_(t));return a(r)},n.wbg.__wbg_debug_34c9290896ec9856=function(e){console.debug(_(e))},n.wbg.__wbg_error_e60eff06f24ab7a4=function(e){console.error(_(e))},n.wbg.__wbg_info_d7d58472d0bab115=function(e){console.info(_(e))},n.wbg.__wbg_log_a4530b4fe289336f=function(e){console.log(_(e))},n.wbg.__wbg_warn_f260f49434e45e62=function(e){console.warn(_(e))},n.wbg.__wbg_newwithstrandinit_f581dff0d19a8b03=function(){return w(function(e,t,r){const o=new Request(l(e,t),_(r));return a(o)},arguments)},n.wbg.__wbg_instanceof_Response_4c3b1446206114d1=function(e){let t;try{t=_(e)instanceof Response}catch{t=!1}return t},n.wbg.__wbg_url_83a6a4f65f7a2b38=function(e,t){const r=_(t).url,o=O(r,i.__wbindgen_malloc,i.__wbindgen_realloc),b=v;d()[e/4+1]=b,d()[e/4+0]=o},n.wbg.__wbg_status_d6d47ad2837621eb=function(e){return _(e).status},n.wbg.__wbg_headers_24def508a7518df9=function(e){const t=_(e).headers;return a(t)},n.wbg.__wbg_body_69be35dff3d68d53=function(e){const t=_(e).body;return p(t)?0:a(t)},n.wbg.__wbg_arrayBuffer_5b2688e3dd873fed=function(){return w(function(e){const t=_(e).arrayBuffer();return a(t)},arguments)},n.wbg.__wbg_signal_3c701f5f40a5f08d=function(e){const t=_(e).signal;return a(t)},n.wbg.__wbg_new_0ae46f44b7485bb2=function(){return w(function(){const e=new AbortController;return a(e)},arguments)},n.wbg.__wbg_abort_2c4fb490d878d2b2=function(e){_(e).abort()},n.wbg.__wbg_byobRequest_05466bb0cacd89fa=function(e){const t=_(e).byobRequest;return p(t)?0:a(t)},n.wbg.__wbg_close_d29a75e8efc5fa94=function(){return w(function(e){_(e).close()},arguments)},n.wbg.__wbg_view_1fe68975176283b3=function(e){const t=_(e).view;return p(t)?0:a(t)},n.wbg.__wbg_respond_6272b341f88864a2=function(){return w(function(e,t){_(e).respond(t>>>0)},arguments)},n.wbg.__wbg_read_79c1f6a58844174c=function(e){const t=_(e).read();return a(t)},n.wbg.__wbg_releaseLock_6eb6fa75435874b8=function(e){_(e).releaseLock()},n.wbg.__wbg_cancel_ef8b2c6f99da9cde=function(e){const t=_(e).cancel();return a(t)},n.wbg.__wbg_new_7a20246daa6eec7e=function(){return w(function(){const e=new Headers;return a(e)},arguments)},n.wbg.__wbg_append_aa3f462f9e2b5ff2=function(){return w(function(e,t,r,o,b){_(e).append(l(t,r),l(o,b))},arguments)},n.wbg.__wbg_close_79df9bcee94a607c=function(){return w(function(e){_(e).close()},arguments)},n.wbg.__wbg_enqueue_e8019641f9877e27=function(){return w(function(e,t){_(e).enqueue(_(t))},arguments)},n.wbg.__wbg_get_bd8e338fbd5f5cc8=function(e,t){const r=_(e)[t>>>0];return a(r)},n.wbg.__wbg_length_cd7af8117672b8b8=function(e){return _(e).length},n.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(e,t){const r=new Function(l(e,t));return a(r)},n.wbg.__wbg_next_40fc327bfc8770e6=function(e){const t=_(e).next;return a(t)},n.wbg.__wbg_next_196c84450b364254=function(){return w(function(e){const t=_(e).next();return a(t)},arguments)},n.wbg.__wbg_done_298b57d23c0fc80c=function(e){return _(e).done},n.wbg.__wbg_value_d93c65011f51a456=function(e){const t=_(e).value;return a(t)},n.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return a(Symbol.iterator)},n.wbg.__wbg_get_e3c254076557e348=function(){return w(function(e,t){const r=Reflect.get(_(e),_(t));return a(r)},arguments)},n.wbg.__wbg_call_27c0f87801dedf93=function(){return w(function(e,t){const r=_(e).call(_(t));return a(r)},arguments)},n.wbg.__wbg_new_72fb9a18b5ae2624=function(){const e=new Object;return a(e)},n.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return w(function(){const e=self.self;return a(e)},arguments)},n.wbg.__wbg_window_c6fb939a7f436783=function(){return w(function(){const e=window.window;return a(e)},arguments)},n.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return w(function(){const e=globalThis.globalThis;return a(e)},arguments)},n.wbg.__wbg_global_207b558942527489=function(){return w(function(){const e=global.global;return a(e)},arguments)},n.wbg.__wbg_isArray_2ab64d95e09ea0ae=function(e){return Array.isArray(_(e))},n.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2=function(e){let t;try{t=_(e)instanceof ArrayBuffer}catch{t=!1}return t},n.wbg.__wbg_new_28c511d9baebfa89=function(e,t){const r=new Error(l(e,t));return a(r)},n.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return w(function(e,t,r){const o=_(e).call(_(t),_(r));return a(o)},arguments)},n.wbg.__wbg_isSafeInteger_f7b04ef02296c4d2=function(e){return Number.isSafeInteger(_(e))},n.wbg.__wbg_new_81740750da40724f=function(e,t){try{var r={a:e,b:t},o=(c,u)=>{const f=r.a;r.a=0;try{return Ae(f,r.b,c,u)}finally{r.a=f}};const b=new Promise(o);return a(b)}finally{r.a=r.b=0}},n.wbg.__wbg_resolve_b0083a7967828ec8=function(e){const t=Promise.resolve(_(e));return a(t)},n.wbg.__wbg_catch_0260e338d10f79ae=function(e,t){const r=_(e).catch(_(t));return a(r)},n.wbg.__wbg_then_0c86a60e8fcfe9f6=function(e,t){const r=_(e).then(_(t));return a(r)},n.wbg.__wbg_then_a73caa9a87991566=function(e,t,r){const o=_(e).then(_(t),_(r));return a(o)},n.wbg.__wbg_buffer_12d079cc21e14bdb=function(e){const t=_(e).buffer;return a(t)},n.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(e,t,r){const o=new Uint8Array(_(e),t>>>0,r>>>0);return a(o)},n.wbg.__wbg_new_63b92bc8671ed464=function(e){const t=new Uint8Array(_(e));return a(t)},n.wbg.__wbg_set_a47bac70306a19a7=function(e,t,r){_(e).set(_(t),r>>>0)},n.wbg.__wbg_length_c20a40f15020d68a=function(e){return _(e).length},n.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6=function(e){let t;try{t=_(e)instanceof Uint8Array}catch{t=!1}return t},n.wbg.__wbg_buffer_dd7f74bc60f1faab=function(e){const t=_(e).buffer;return a(t)},n.wbg.__wbg_byteLength_58f7b4fab1919d44=function(e){return _(e).byteLength},n.wbg.__wbg_byteOffset_81d60f7392524f62=function(e){return _(e).byteOffset},n.wbg.__wbg_has_0af94d20077affa2=function(){return w(function(e,t){return Reflect.has(_(e),_(t))},arguments)},n.wbg.__wbg_set_1f9b04f170055d33=function(){return w(function(e,t,r){return Reflect.set(_(e),_(t),_(r))},arguments)},n.wbg.__wbg_stringify_8887fe74e1c50d81=function(){return w(function(e){const t=JSON.stringify(_(e));return a(t)},arguments)},n.wbg.__wbindgen_bigint_get_as_i64=function(e,t){const r=_(t),o=typeof r=="bigint"?r:void 0;he()[e/8+1]=p(o)?BigInt(0):o,d()[e/4+0]=!p(o)},n.wbg.__wbindgen_debug_string=function(e,t){const r=$(_(t)),o=O(r,i.__wbindgen_malloc,i.__wbindgen_realloc),b=v;d()[e/4+1]=b,d()[e/4+0]=o},n.wbg.__wbindgen_throw=function(e,t){throw new Error(l(e,t))},n.wbg.__wbindgen_memory=function(){const e=i.memory;return a(e)},n.wbg.__wbindgen_closure_wrapper3129=function(e,t,r){const o=re(e,t,909,pe);return a(o)},n.wbg.__wbindgen_closure_wrapper3148=function(e,t,r){const o=re(e,t,916,ve);return a(o)},n}function xe(n,e){return i=n.exports,G.__wbindgen_wasm_module=e,N=null,L=null,F=null,T=null,i}async function G(n){if(i!==void 0)return i;typeof n>"u"&&(n="/15m/assets/backend_bg.wasm");const e=Se();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));const{instance:t,module:r}=await Re(await n,e);return xe(t,r)}class Oe{constructor(){_e(this,"inner");this.inner=null}async loadOsmFile(e,t,r,o){await G(),this.inner=await new j(e,!0,t,r,o)}async loadGraphFile(e){await G(),this.inner=await new j(e,!1,void 0,void 0,void 0)}isLoaded(){return this.inner!=null}unset(){this.inner=null}getBounds(){if(!this.inner)throw new Error("Backend used without a file loaded");return Array.from(this.inner.getBounds())}getInvertedBoundary(){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.getInvertedBoundary())}renderDebug(){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.renderDebug())}renderAmenities(){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.renderAmenities())}renderZones(){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.renderZones())}isochrone(e){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.isochrone({x:e.start.lng,y:e.start.lat,mode:e.mode,style:e.style,start_time:e.startTime,max_seconds:e.maxSeconds}))}route(e){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.route({x1:e.start.lng,y1:e.start.lat,x2:e.end[0],y2:e.end[1],mode:e.mode,debug_search:e.debugSearch,use_heuristic:e.useHeuristic,start_time:e.startTime}))}bufferRoute(e){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.bufferRoute({x1:e.start.lng,y1:e.start.lat,x2:e.end[0],y2:e.end[1],mode:e.mode,use_heuristic:e.useHeuristic,start_time:e.startTime,max_seconds:e.maxSeconds}))}score(e,t){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.score({poi_kinds:e.poiKinds,max_seconds:e.maxSeconds},t))}snapAndBufferRoute(e){if(!this.inner)throw new Error("Backend used without a file loaded");return JSON.parse(this.inner.snapAndBufferRoute({input:JSON.stringify(e.input),mode:e.mode,start_time:e.startTime,max_seconds:e.maxSeconds}))}}J(Oe)})(); diff --git a/index.html b/index.html index 554c064..d4726c2 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ 15-minute neighborhood tool - +