PageSourceSearch

https://vidapeps.com/assets/AddressFormFields-Byy1VLUa.js

js vidapeps.com collected 2026-10-04 08:11:14 UTC 3,248 bytes, 1 lines download raw bytes

1import{j as t}from"./vendor-query-CniT1WJL.js";import{r as F}from"./vendor-react-69GsFwrV.js";import{aV as S,aW as $,aX as A,aY as C,aZ as v,a_ as z,f as B}from"./index-KjAD5lCC.js";function h(e){return{address1:e.line1??"",...e.line2?.trim()?{address2:e.line2.trim()}:{},city:e.city??"",state:e.state??"",zip:e.zip??""}}function w(){const e=S();return{...e,check:n=>e.check(h(n)),ensureResolvedForSubmit:n=>e.ensureResolvedForSubmit(h(n))}}const d="block text-xs font-medium text-muted-foreground mb-1",x="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm";function E({value:e,onChange:n,check:l,required:c,disabled:p,showLine2:j=!0,compact:m=!1,line1Label:y="Street address",children:g,className:f,idPrefix:b,names:o}){const N=F.useId(),i=b??`addr-${N}`;function u(s){n({...e,...s})}function r(s){l?.check(s)}return t.jsxs("div",{className:B("space-y-3",f),children:[g,t.jsxs("div",{children:[t.jsx("label",{className:d,htmlFor:`${i}-line1`,children:y}),t.jsx($,{id:`${i}-line1`,value:e.line1??"",required:c,className:x,onChange:s=>u({line1:s}),onSelect:s=>{const a={...e,line1:s.address1,city:s.city,state:s.state,zip:s.zip5};n(a),r(a)},onBlur:()=>r(e)})]}),j?t.jsxs("div",{children:[t.jsx("label",{className:d,htmlFor:`${i}-line2`,children:"Apartment, suite, unit (optional)"}),t.jsx("input",{id:`${i}-line2`,className:x,value:e.line2??"",disabled:p,autoComplete:"address-line2",onChange:s=>u({line2:s.target.value}),onBlur:()=>r(e)})]}):null,t.jsxs("div",{className:m?"grid grid-cols-2 gap-3":"grid grid-cols-2 gap-3 sm:grid-cols-6",children:[t.jsxs("div",{className:m?"col-span-2":"col-span-2 sm:col-span-3",children:[t.jsx("label",{className:d,htmlFor:`${i}-city`,children:"City"}),t.jsx("input",{id:`${i}-city`,className:x,value:e.city??"",required:c,disabled:p,autoComplete:"address-level2",onChange:s=>u({city:s.target.value}),onBlur:()=>r(e)})]}),t.jsxs("div",{className:m?void 0:"sm:col-span-2",children:[t.jsx("label",{className:d,htmlFor:`${i}-state`,children:"State"}),t.jsx(A,{id:`${i}-state`,value:e.state??"",required:c,disabled:p,onChange:s=>{const a={...e,state:s};n(a),r(a)}})]}),t.jsxs("div",{className:m?void 0:"sm:col-span-1",children:[t.jsx("label",{className:d,htmlFor:`${i}-zip`,children:"ZIP"}),t.jsx("input",{id:`${i}-zip`,className:x,value:e.zip??"",required:c,disabled:p,inputMode:"numeric",autoComplete:"postal-code",onChange:s=>u({zip:s.target.value}),onBlur:()=>r(e)})]})]}),o?t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"hidden",name:o.line1,value:e.line1??""}),o.line2?t.jsx("input",{type:"hidden",name:o.line2,value:e.line2??""}):null,t.jsx("input",{type:"hidden",name:o.city,value:e.city??""}),t.jsx("input",{type:"hidden",name:o.state,value:e.state??""}),t.jsx("input",{type:"hidden",name:o.zip,value:e.zip??""})]}):null,l?.outcome&&l.entered?t.jsx(C,{outcome:l.outcome,entered:l.entered,onUseSuggested:s=>{n({...e,line1:s.address1,line2:z(s,e.line2),city:s.city,state:s.state.toUpperCase(),zip:v(s)}),l.acceptSuggested(s)},onKeepMine:l.keepMine}):null]})}export{E as A,w 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.