1import{n as e,t}from"./preload-helper.GcZ-5Mok.js";var n=`https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit`,r=async()=>{let e=window;if(e.turnstile||(e.__turnstileScriptPromise??=new Promise((t,r)=>{let i=t=>{e.__turnstileScriptPromise=void 0,t.remove(),r(Error(`Turnstile failed to load`))},a=document.querySelector(`script[data-turnstile-script="true"]`);if(a){a.addEventListener(`load`,()=>t(),{once:!0}),a.addEventListener(`error`,()=>i(a),{once:!0});return}let o=document.createElement(`script`);o.src=n,o.async=!0,o.defer=!0,o.dataset.turnstileScript=`true`,o.onload=()=>t(),o.onerror=()=>i(o),document.head.appendChild(o)}),await e.__turnstileScriptPromise),!e.turnstile)throw Error(`Turnstile failed to load`);return e.turnstile};e();var i=15e3,a=()=>{let e=document.getElementById(`submit-button`),n=document.getElementById(`submit-button-label`),a=document.getElementById(`phone-form`),o=document.getElementById(`phone-input`),s=document.getElementById(`feedback`),c=document.getElementById(`phone-result-overlay`),l=document.getElementById(`phone-turnstile`);if(!a||!e||!o||!s)return;let u=a.dataset.i18nInvalid||`Please enter a valid US phone number.`,d=a.dataset.i18nVerifying||`One momentâ¦`,f=!1,p=(e=>new URLSearchParams(window.location.search).get(e))(`gclid`),m=(e,t)=>{try{window.posthog?.capture(e,{page:window.location.pathname,...t})}catch{}};a.addEventListener(`focusin`,()=>{m(`phone_capture_form_start`)},{once:!0});let h=async e=>{if(!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches)try{let{default:n}=await t(async()=>{let{default:e}=await import(`./dist.uz1BdELP.js`);return{default:e}},[]),r=e.closest(`dialog`);r&&(r.classList.remove(`animate-fade-in-up`),r.style.setProperty(`transform`,`none`,`important`),r.style.setProperty(`overflow`,`visible`,`important`));let i=e.getBoundingClientRect(),a=i.left+i.width/2,o=i.top+i.height/2,s=e=>{r&&document.body.querySelectorAll(`:scope > canvas`).forEach(t=>{e.has(t)||r.appendChild(t)})},c=new Set(document.body.querySelectorAll(`:scope > canvas`));n({position:{x:a,y:o},count:120,size:1.1,velocity:260,fade:!0}),s(c),setTimeout(()=>{let e=new Set(document.body.querySelectorAll(`:scope > canvas`));n({position:{x:a-60,y:o},count:40,size:.9,velocity:200,fade:!0}),n({position:{x:a+60,y:o},count:40,size:.9,velocity:200,fade:!0}),s(e)},220),r&&setTimeout(()=>{r.style.removeProperty(`overflow`),r.style.removeProperty(`transform`)},2600)}catch{}},g=window.posthog,_=()=>{try{let t=g?.getFeatureFlag?.(`phone-cta-discount`);(t===`variant-b`||t===!0)&&e?.dataset.variantText&&(n?n.textContent=e.dataset.variantText:e.textContent=e.dataset.variantText)}catch{}};g?.onFeatureFlags?g.onFeatureFlags(_):_();let v=e=>{if(!e)return e;let t=e.replace(/[^\d]/g,``).substring(0,10),n=t.length;return n<4?t:n<7?`${t.slice(0,3)}-${t.slice(3)}`:`${t.slice(0,3)}-${t.slice(3,6)}-${t.slice(6,10)}`},y=e=>/^\d{3}-\d{3}-\d{4}$/.test(e);o&&o.addEventListener(`input`,function(e){let t=e.target;t&&(o.value=v(t.value))});let b=()=>{I({name:`dialogShown`,value:`true`,days:365})},x=()=>{if(e.disabled=!0,c){c.classList.add(`visible`);let e=c.querySelector(`.phone-success-badge-wrap`)??c;h(e)}b()},S=async(e,t)=>{f=!0;try{let n=await fetch(`/api/phonenumber`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({phoneNumber:e,gclid:p,turnstileToken:t})});if(n.ok){m(`phone_capture_submit`,{has_gclid:!!p});try{window.posthog?.setPersonProperties({$phone:e})}catch{}}else m(`phone_capture_error`,{reason:`server`,status:n.status})}catch{m(`phone_capture_error`,{reason:`network`})}finally{x(),f=!1}},C=``,w,T=null,E,D=!1,O=``,k=n??e,A=t=>{t?(O=k.textContent??``,k.textContent=d,e.setAttribute(`aria-busy`,`true`)):(k.textContent=O,e.removeAttribute(`aria-busy`)),e.disabled=t},j=()=>{window.clearTimeout(E),E=void 0,T=null,A(!1)},M=(e,t)=>{T!==null&&(j(),m(`phone_capture_error`,{reason:`turnstile`,cause:e,...t?{error_code:t}:{}}),x())},N=()=>{let e=l?.parentElement?.clientWidth??0;l&&(l.style.transform=e>0&&e<300?`scale(${e/300})`:``)},P=async()=>{if(w!==void 0||!l)return;let e=l.dataset.sitekey;if(!e){M(`unavailable`);return}try{let t=await r();if(w!==void 0)return;w=t.render(l,{sitekey:e,action:l.dataset.action,appearance:`interaction-only`,theme:`light`,callback:e=>{if(T===null){C=e;return}let t=T;j(),S(t,e)},"expired-callback":()=>{C=``},"error-callback":e=>{C=``,M(`error`,e)},"before-interactive-callback":()=>{D=!0,window.clearTimeout(E),l.parentElement?.classList.add(`has-challenge`),N(),window.addEventListener(`resize`,N,{passive:!0})},"after-interactive-callback":()=>{D=!1}})}catch{M(`load`)}},F=()=>{P()};a.addEventListener(`focusin`,F,{once:!0}),a.addEventListener(`pointerdown`,F,{once:!0}),a.addEventListener(`submit`,e=>{if(e.preventDefault(),f||T!==null)return;let t=o.value;if(s.classList.remove(`text-green-500`,`text-red-500`),!y(t)){m(`phone_capture_validation_fail`,{reason:`invali
1d_format`,digits_entered:t.replace(/\D/g,``).length}),s&&(s.textContent=u,s.classList.remove(`hidden`),s.classList.add(`text-red-500`));return}if(s&&s.classList.add(`hidden`),m(`phone_capture_submit_attempt`),C){let e=C;C=``,S(t,e);return}m(`phone_capture_verification_wait`),T=t,A(!0),D||(E=window.setTimeout(()=>M(`timeout`),i)),P()});function I({name:e,value:t,days:n}){let r=new Date;r.setTime(r.getTime()+n*24*60*60*1e3);let i=`expires=`+r.toUTCString();document.cookie=e+`=`+encodeURIComponent(t)+`;`+i+`;path=/`}};a(),document.addEventListener(`astro:after-swap`,a);
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.