1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[45497],{63999:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/components/custom-autocomplete/places-to-visit",function(){return o(70075)}])},70075:function(e,t,o){"use strict";o.r(t);var a=o(85893),n=o(5306),c=o(50135),r=o(6154),s=o(67294);let u="".concat("".concat("https://api.immi.gov.bt"),"/svc/common-data"),l=()=>window.localStorage.getItem("accessToken"),i=e=>{let{onChange:t,error:o,defaultValue:i}=e,[p,d]=(0,s.useState)([]),[h,f]=(0,s.useState)(""),[g,m]=(0,s.useState)(null);return(0,s.useEffect)(()=>{let e=async()=>{if(i)try{let e=await r.Z.get("".concat(u,"/dzongkhags/").concat(i),{headers:{Authorization:"Bearer ".concat(l())}});m(e.data)}catch(e){console.error("Error fetching default value:",e)}};e()},[i]),(0,s.useEffect)(()=>{let e=async()=>{let e="".concat(u,"/dzongkhags");""!==h.trim()&&(e+="?q=".concat(encodeURIComponent(h)));try{let t=await r.Z.get(e,{headers:{Authorization:"Bearer ".concat(l())}});d(t.data.data||[])}catch(e){console.error("Error fetching dzongkhags:",e),d([])}};e()},[h]),(0,a.jsx)(n.Z,{freeSolo:!0,openOnFocus:!0,value:g,onChange:(e,o)=>{m(o),t(o?o.id:null)},inputValue:h,onInputChange:(e,t)=>
1{f(t)},options:p,getOptionLabel:e=>e.name||"",renderInput:e=>(0,a.jsx)(c.Z,{...e,placeholder:"Select or type a place",variant:"outlined",error:!!o,helperText:o||""}),id:"places-to-visit-autocomplete"})};t.default=i}},function(e){e.O(0,[18360,50135,5306,49774,92888,40179],function(){return e(e.s=63999)}),_N_E=e.O()}]);
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.