1import{T as e,q as r}from"./2c1ab0fe.B2yRRyAW.js";import{c as t,v as a}from"./4b4bc88f.JFrEI7LU.js";import{a as o,D as c,c as s}from"./ca3e798e.j1SNghYW.js";import{u as n}from"./app.C_W8kcQ4.js";let i=null,u=null;function l({observability:e,url:r}){if(u)return u;const t=r.sandboxAutocomplete(),a={current:null},{promise:l,resolve:m}=function(){let e,r;const t=new Promise((t,a)=>{e=t,r=a});return{get promise(){return t},resolve(r){e(r)},reject(e){r(e)}}}();if(u=l,!i){const r=r=>async o=>{e.leaveErrorBreadcrumb("Autocomplete iframe loaded",{url:t,event:JSON.stringify(o),time:Date.now(),specialId:r?.getAttribute(c)}),a.current=s(r,t,"autocomplete",e,{}),m(a)};i=o({id:"Autocomplete-IFrame",name:"Autocomplete-IFrame",url:t,privileges:["allow-scripts","allow-same-origin"],iframeSpecialId:n(),onLoad:r}),e.leaveErrorBreadcrumb("Autocomplete iframe created",{url:t,specialId:i.getAttribute(c)})}return u}function m(){const{observability:e,url:a}=t();return r(()=>l({observability:e,url:a}),[e,a])}function f(){const{shop:{id:r},source:{sourceId:o,checkoutSessionIdentifier:c}}=t(),s=m();return e(()=>{function e(){return{shopId:a(r),sourceId:o||"",checkoutSessionIdentifier:c||""}}return{search:async(...e)=>(await s()).current.call.search(...e),fetchAddress:async(...e)=>(await s()).current.call.fetchAddress(...e),formatAddress:async r=>(await s()).current.call.formatAddress(r,e()),fetchCountriesWithPhoneNumberPrefix:async r=>(await s()).current.call.fetchCountriesWithPhoneNumberPrefix(r,e())}},[s,r,o,c])}function d(){const r=m();return e(()=>({validation:async(...e)=>(await r()).current.call.validation(...e)}),[r])}export{d as a,l as g,f as u};
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.