PageSourceSearch

https://landlord-home.ephome.org/_next/static/chunks/3700-54f14f6a9a26f50a.js

js ephome.org collected 2026-10-09 03:24:31 UTC 7,402 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3700],{43700:function(e,r,n){n.d(r,{Z:function(){return f}});var t=n(3247),a=n(15311),s=n(92114),o=n(73921),i=n(20743);let d=async e=>{let{data:r}=await i.o.post("LandLord/LandLordUnits/SaveLandlordProperty",e);return r},l=(e,r)=>{let n=(0,s.NL)();return(0,o.D)(()=>d(e),{onSuccess(e){n.invalidateQueries(["properties"]),r(e)}})};var u=n(11888),c=n(26662),p=n(9912);let m=p.Ry({propertyName:p.Z_().nonempty((0,c.L)("COMMON:VALIDATION_REQUIRED")).max(30,(0,c.L)("COMMON:VALIDATION_REQUIRED",{max:30})),addressLine1:p.Z_().nonempty((0,c.L)("COMMON:VALIDATION_REQUIRED")),addressLine2:p.Z_(),addressCity:p.Z_().nonempty((0,c.L)("COMMON:VALIDATION_REQUIRED")),addressStateId:p.Rx(),addressZipcode:p.Z_().nonempty((0,c.L)("COMMON:VALIDATION_REQUIRED")).min(4,(0,c.L)("COMMON:VALIDATION_MIN_LENGTH",{min:4})).regex(u.qC,(0,c.L)("COMMON:VALIDATION_NUMBER"))});var L=n(21236),_=n(72155),x=n(91054),R=n(86192),A=n(57017),O=n(37637),N=n(84819),g=n(28500),h=n(17723),v=n(8487);function D(){let e=(0,t._)(["\n  display: grid;\n  grid-template: repeat(2, 1fr) / repeat(2, 1fr);\n  align-items: center;\n  justify-items: center;\n  margin-top: 20px;\n  width: 100%;\n  gap: 20px;\n\n  "," {\n    grid-template-columns: 1fr;\n    grid-auto-rows: auto;\n  }\n"]);return D=function(){return e},e}function E(){let e=(0,t._)(["\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  gap: 20px;\n  margin: 40px 0;\n\n  "," {\n    flex-direction: column;\n  }\n"]);return E=function(){return e},e}let I=(0,N.ZP)("div")(D(),e=>{let{theme:r}=e;return r.breakpoints.down("mobile")}),M=(0,N.ZP)("div")(E(),e=>{let{theme:r}=e;return r.breakpoints.down("mobile")});var f=function(e){let{onSendSuccess:r,onCancel:n}=e,{data:t,isLoading:s,isError:o,isSuccess:i}=(0,L.g)(),{control:d,handleSubmit:u,formState:{errors:c},trigger:p,getValues:N,setValue:D}=(0,h.cI)({resolver:(0,A.F)(m),mode:"all"}),{isLoading:E,mutate:f}=l(N(),e=>{r(e),(0,v.Am)((0,a.jsx)(x.Z,{text:(0,a.jsx)(g.Z,{i18nKey:"LANDLORD:UNIT_ADD_NEW_PROPERTY"})}))}),T=async()=>{f()};return(0,a.jsxs)("form",{onSubmit:u(T),children:[(0,a.jsxs)(I,{children:[(0,a.jsx)(h.Qr,{name:"propertyName",control:d,defaultValue:"",render:e=>{var r;let{field:n}=e;return(0,a.jsx)(_._l,{variant:"outlined",customlabel:"LANDLORD:RFTA_PROPERTY_NAME",error:!!c.propertyName,helperText:null===(r=c.propertyName)||void 0===r?void 0:r.message,...n,starMark:"*",sx:{maxWidth:"283px"}})}}),(0,a.jsx)(h.Qr,{name:"addressLine1",control:d,defaultValue:"",render:e=>{var r;let{field:n}=e;return(0,a.jsx)(R.h,{customlabel:"LANDLORD:RFTA_FORM_LABEL_ADDRESS_LINE_1",field:n,error:!!c.addressLine1,helperText:null===(r=c.addressLine1)||void 0===r?void 0:r.message,setValue:D,addressLine1:"addressLine1",addressLine2:"addressLine2",cityFormName:"addressCity",stateFormName:"addressStateId",zipCodeFormName:"addressZipcode",starMark:"*",trigger:p})}}),(0,a.jsx)(h.Qr,{name:"addressLine2",control:d,defaultValue:"",render:e=>{var r;let{field:n}=e;return(0,a.jsx)(_._l,{autoComplete:"address-line2",variant:"outlined",customlabel:"LANDLORD:RFTA_FORM_LABEL_ADDRESS_LINE_2",error:!!c.addressLine2,helperText:null===(r=c.addressLine2)||void 0===r?void 0:r.message,...n,sx:{maxWidth:"283px"}})}}),(0,a.jsx)(h.Qr,{name:"addressCity",control:d,defaultValue:"",render:e=>{var r;let{field:n}=e;return(0,a.jsx)(_._l,{variant:"outlined",customlabel:"LANDLORD:RFTA_FORM_LABEL_CITY",error:!!c.addressCity,helperText:null===(r=c.addressCity)||void 0===r?void 0:r.message,...n,starMark:"*",sx:{maxWidth:"283px"}})}}),(0,a.jsxs)(a.Fragment,{children:[s&&(0,a.jsx)(_.RG,{placeholder:"LANDLORD:RFTA_LOADING_UNITS",customlabel:"LANDLORD:RFTA_FORM_LABEL_STATE",defaultValue:"",disabled:!0}),i&&(0,a.jsx)(h.Qr,{name:"addressStateId",control:d,defaultValue:0,render:e=>{let{field:r}=e;return(0,a.jsxs)(_.RG,{...r,customlabel:"LANDLORD:RFTA_FORM_LABEL_STATE",children:[(0,a.jsx)(O.Z,{value:0,children:"Select State"}),t.map(e=>(0,a.jsx)(O.Z,{value:e.id,children:e.state},e.id))]})}}),o&&(0,a.jsx)(_.RG,{error:!0,errormessage:"LANDLORD:RFTA_ERROR_LOADING_STATES",disabled:!0})]}),(0,a.jsx)(h.Qr,{name:"addressZipcode",control:d,defaultValue:"",render:e=>{var r;let{field:n}=e;return(0,a.jsx)(_._l,{autoComplete:"postal-code",variant:"outlined",customlabel:"LANDLORD:RFTA_ZIP_CODE",error:!!c.addressZipcode,helperText:null===(r=c.addressZipcode)||void 0===r?void 0:r.message,...n,starMark:"*",
1sx:{maxWidth:"283px"}})}})]}),(0,a.jsxs)(M,{children:[(0,a.jsx)(_.MG,{size:"medium",styletype:"Secondary",onClick:()=>n(),children:(0,a.jsx)(g.Z,{i18nKey:"COMMON:CANCEL"})}),(0,a.jsx)(_.MG,{size:"medium",type:"submit",disabled:E,children:(0,a.jsx)(g.Z,{i18nKey:"COMMON:SAVE"})})]})]})}},86192:function(e,r,n){n.d(r,{h:function(){return m}});var t=n(15311),a=n(20132),s=n(21236),o=n(67914),i=n(54001),d=n(37637),l=n(25354),u=n(5724),c=n(39361),p=n(81215);function m(e){let{addressLine1:r,error:n,field:m,helperText:L,setValue:_,trigger:x,addressLine2:R,unit:A,cityFormName:O,fullAddress:N,customlabel:g,width:h,stateFormName:v,zipCodeFormName:D,addressRequired:E,starMark:I,disabled:M}=e,{data:f}=(0,s.g)(),{t:T}=(0,u.Z)(),y=(0,a.useRef)(null),b=()=>{y.current&&(y.current.blur(),y.current.focus())},j=(0,a.useCallback)(e=>{(0,c.NU)(e).then(n=>{var t,a;let s=n[0].address_components,o="",i="",d="",l="",u="",p="",m="";if(s.forEach(e=>{let r=e.types;r.includes("locality")?o=e.long_name:r.includes("administrative_area_level_1")?i=e.long_name:r.includes("postal_code")?d=e.long_name:r.includes("street_number")?l=e.long_name:r.includes("route")?u=e.long_name:r.includes("neighborhood")?p=e.long_name:r.includes("subpremise")&&(m=e.long_name)}),"District of Columbia"===i&&(i="Washington"),u&&l?_(r,"".concat(l," ").concat(u).concat(m&&!A?", ".concat(m):"")):_(r,e),x([r]),A&&(_(A,m),x(A)),R&&(_(R,p),x(R)),O&&(_(O,o),x(O)),v&&(null==f?void 0:null===(t=f.find(e=>e.state===i))||void 0===t?void 0:t.id)&&(_(v,null==f?void 0:null===(a=f.find(e=>e.state===i))||void 0===a?void 0:a.id),x(v)),N&&(_(N,"".concat(l," ").concat(u).concat(p?", ".concat(p):"").concat(m&&!A?", ".concat(m):"").concat(o?", ".concat(o):"")),x(N)),D)return _(D,d),x(D),b(),(0,c.WV)(n[0])}).catch(e=>console.error(T("COMMON:ERROR_API_GENERAL_REQUEST_FAILED"),e))},[r,R,O,_,v,N,f,T,x,A,D]);return(0,t.jsx)(c.ZP,{value:m.value,onChange:m.onChange,onSelect:j,searchOptions:{componentRestrictions:{country:"us"}},children:e=>{let{getInputProps:r,suggestions:s,getSuggestionItemProps:u}=e;return(0,t.jsx)(l.Z,{options:s,inputValue:m.value,componentsProps:{popupIndicator:{disableRipple:!0}},sx:{"& .MuiAutocomplete-inputRoot":{padding:"2px 4px 2px 6px"},"& .MuiButtonBase-root":{lineHeight:"0",padding:0,margin:0,height:"100%"},"& .MuiAutocomplete-endAdornment":{right:"0px !important",borderTopRightRadius:"16px",borderBottomRightRadius:"16px",backgroundColor:"primary.light",height:"100%"}},getOptionLabel:e=>e.description,popupIcon:(0,t.jsx)(i.ZP,{width:"40px",color:"secondary.dark",children:(0,t.jsx)(o.K5,{})}),renderInput:e=>(0,t.jsx)(p.Z,{...e,...r({variant:"outlined"}),inputProps:{...e.inputProps,autoComplete:"address-line1"},inputRef:y,customlabel:g||"",starMark:I||"",value:m.value,error:n,helperText:L,width:h,required:E,disabled:M}),renderOption:(e,r)=>(0,a.createElement)(d.Z,{...u(r),key:r.placeId,sx:{whiteSpace:"normal",wordWrap:"break-word"}},r.description)})}})}}}]);

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.