1import x from"./K_PoCfVo.js";import{d as L,m as C,aj as d,o as G,f as F,g as S,a6 as y,ak as V,b0 as f,a$ as k}from"./BJT07f2_.js";import{c as g,f as E,a as O}from"./Bg-iTZhN.js";import{u as A}from"./CebKsqi5.js";import"./Bn7UrF56.js";const B={class:"tide-search-address-lookup"},I=L({__name:"TideSearchAddressLookup",props:{inputValue:{default:null},resultsloaded:{type:Boolean,default:!1},suggestionsIndex:{default:"vic-postcode-localities"},suggestionsKey:{default:"name"},controlMapZooming:{type:Boolean,default:!0},label:{default:"Search by postcode or suburb"},placeholder:{default:"Enter postcode or suburb"},tagsComponent:{default:void 0},mapResultsFnName:{default:""},isGettingLocation:{type:Boolean,default:!1},userGeolocation:{default:null},suggestionsConfig:{default:void 0},onLocationSelectOverrideFn:{default:null},bboxZoomPadding:{default:100},searchCount:{default:0}},emits:["update"],setup(n,{emit:m}){const t=n,p=m,{rplMapRef:l,popup:b,deadSpace:s,defaultExtent:v}=C("rplMapInstance"),r=y(!1),h=e=>{r.value=!0,p("update",e||null)};d([()=>l.value,()=>t.resultsloaded],([e,o],[u,a])=>{(e!==u||o!==a)&&e&&o&&l.value.once("rendercomplete",function(){c(e,t.inputValue,!1)})}),d([()=>t.inputValue?.id,()=>t.searchCount],async()=>{await V(),c(l.value,t.inputValue,r.value),r.value=!1});async function c(e,o,u){if(!(t.onLocationSelectOverrideFn&&A(t.onLocationSelectOverrideFn,"onLocationSelectOverrideFns")(e,b,o,t.userGeolocation,s)!==!1)&&t.controlMapZooming){if(o?.useGeolocation&&t.userGeolocation){const a=[t.userGeolocation.center[0],t.userGeolocation.center[1]];g(e,f(a),16,s.value,null);return}if(e&&o?.bbox){if(o?.bbox){const a=k(o.bbox.map(i=>parseFloat(i)),"EPSG:4326","EPSG:3857");E(e,a,s.value,{padding:t.bboxZoomPadding,animationDuration:u?800:0})}return}if(e&&o?.center){const a=o?.zoomLevel||16;g(e,f(o?.center),a,s.value,null);return}o||O(e,s.value,v)}}return(e,o)=>{const u=x;return G(),F("div",B,[S(u,{inputValue:n.inputValue?.useGeolocation?n.userGeolocation||null:n.inputValue,suggestionsIndex:n.suggestionsIndex,suggestionsKey:n.suggestionsKey,label:n.label,placeholder:n.placeholder,tagsComponent:n.tagsComponent,mapResultsFnName:n.mapResultsFnName,isGettingLocation:n.isGettingLocation,suggestionsConfig:n.suggestionsConfig,onUpdate:h},null,8,["inputValue","suggestionsIndex","suggestionsKey","label","placeholder","tagsComponent","mapResultsFnName","isGettingLocation","suggestionsConfig"])])}}}),M=Object.assign(I,{__name:"TideSearchAddressLookup"});export{M as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.