"use strict";function buildCustomSearch(e,o){return new L.Control.Search({sourceData:function(o,t){const n=e.map((e=>e+o+".cbor"));return console.log(n),Promise.all(n.map((e=>fetch(e).then((e=>e.ok?e.arrayBuffer():Promise.resolve(null))).then((e=>e?cbor.decodeAll(e):Promise.resolve(null))).then((e=>e&&e.length?e[0]:Promise.resolve(null)))))).then((e=>{const o=e.filter((e=>e)).map((e=>{const o=e.v.length-3,t=e.v.length-2,n=e.v.length-1;return{title:e.id+":"+e.v[n],loc:[e.v[o],e.v[t]]}}));t(o)})),{abort:function(){console.log("aborted request:"+o)}}},textPlaceholder:"Enter Catalog ID",textErr:"Catalog ID not found",markerLocation:!0,hideMarkerOnCollapse:!0,moveToLocation:function(e,t,n){n.setView(e,o)}})}