1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8655],{79817:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/landlord/my-units/edit/[id]",function(){return n(6250)}])},37637:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var i=n(42454),r=n(29947),l=n(20132),a=n(37483),o=n(32568),d=n(58657),s=n(84819),u=n(74760),c=n(9461),p=n(3363),m=n(70363),x=n(70681),h=n(86828),f=n(11330);let A=(0,f.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),b=(0,f.Z)("MuiListItemIcon",["root","alignItemsFlexStart"]),v=(0,f.Z)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);var O=n(4182);function g(e){return(0,O.ZP)("MuiMenuItem",e)}let I=(0,f.Z)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var y=n(15311);let L=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],R=e=>{let{disabled:t,dense:n,divider:i,disableGutters:l,selected:a,classes:d}=e,s=(0,o.Z)({root:["root",n&&"dense",t&&"disabled",!l&&"gutters",i&&"divider",a&&"selected"]},g,d);return(0,r.Z)({},d,s)},N=(0,s.ZP)(m.Z,{shouldForwardProp:e=>(0,u.Z)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(e=>{let{theme:t,ownerState:n}=e;return(0,r.Z)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(I.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,d.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(I.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,d.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(I.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,d.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,d.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(I.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(I.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(A.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(A.inset)]:{marginLeft:52},["& .".concat(v.root)]:{marginTop:0,marginBottom:0},["& .".concat(v.inset)]:{paddingLeft:36},["& .".concat(b.root)]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,r.Z)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(b.root," svg")]:{fontSize:"1.25rem"}}))});var j=l.forwardRef(function(e,t){let n;let o=(0,c.i)({props:e,name:"MuiMenuItem"}),{autoFocus:d=!1,component:s="li",dense:u=!1,divider:m=!1,disableGutters:f=!1,focusVisibleClassName:A,role:b="menuitem",tabIndex:v,className:O}=o,g=(0,i.Z)(o,L),I=l.useContext(p.Z),j=l.useMemo(()=>({dense:u||I.dense||!1,disableGutters:f}),[I.dense,u,f]),_=l.useRef(null);(0,x.Z)(()=>{d&&_.current&&_.current.focus()},[d]);let T=(0,r.Z)({},o,{dense:j.dense,divider:m,disableGutters:f}),M=R(o),D=(0,h.Z)(_,t);return o.disabled||(n=void 0!==v?v:-1),(0,y.jsx)(p.Z.Provider,{value:j,children:(0,y.jsx)(N,(0,r.Z)({ref:D,role:b,tabIndex:n,component:s,focusVisibleClassName:(0,a.Z)(M.focusVisible,A),className:(0,a.Z)(M.root,O)},g,{ownerState:T,classes:M}))})})},54969:function(e,t,n){"use strict";n.d(t,{$T:function(){return p},BN:function(){return c},GJ:function(){return v},GW:function(){return m},H$:function(){return l},L0:function(){return r},Qj:function(){return h},_1:function(){return o},eB:function(){return a},ho:function(){return f},kK:function(){return x},lz:function(){return O},of:function(){return u},ss:function(){return s},t1:function(){return d},u_:function(){return A},zn:function(){return b}});var i=n(20743);let r=async(e,t,n,r,l,a,o)=>{let{data:d}=await i.o.get("Landlord/RFTA/GetAllRftas",{params:{searchTerm:l,pageSize:e,pageNumber:t,sortOrder:n,allRecords:r,filter:a,sortColumn:o}});return d},l=async(e,t,n,r,l,a,o,d)=>{let{data:s}=await i.o.get("LandLord/LandLordUnits/get-units",{params:{searchTerm:l,pageSize:e,pageNumber:t,sortOrder:n,allRecords:r,filter:a,sortBy:o,sortname:d}});return s},a=async e=>{let{data:t}=await i.o.get("LandLord/LandLordUnits/getUnitById/".concat(e));return t},o=async e=>{let{data:t}=await i.o.get("LandLord/LandLordUnits/getPropertyById/".concat(e));return t},d=async(e,t)=>{e.unitAminities=[...e.unitAmenitiesIndoor,...e.unitAmenitiesKitchen,...e.unitAmenitiesMaintenance,...e.unitAmenitiesOutdoor],e.isW9=!1;let{data:n}=await i.o.put("LandLord/LandLordUnits/UpdateLandlordUnits",{...e,noOfBathRooms:Number(e.noOfBathRooms),noOfBedRooms:Number(e.noOfBedRooms),unitAreaSft:Number(e.unitAreaSft),yearOfConstruction:Number(e.yearOfConstruction),unitId:Number(t)});return n},s=async e=>{let{data:t}=await i.o.delete("LandLord/LandLordUnits/DeleteLandLordUnits/".concat(e));return t},u=async(e,t,n,r,l,a,o,d,s)=>{let{data:u}=await i.o.get("LandLord/Documents/GetListofLandlordDocuments",{params:{SearchTerm:l,DisplayLength:e,DisplayStart:t,SortDir:n,allRecords:r,SortCol:a,DocTypeId:0!=o?o:null,StartDate:d,End
1Date:s}});return u},c=async(e,t,n,r,l,a)=>{let{data:o}=await i.o.get("Common/AlertAndNotification/LandlordNotificationAndAlerts",{params:{searchTerm:l,pageSize:e,pageNumber:t,sortOrder:n,allRecords:r,filter:a}});return o},p=async e=>{let{data:t}=await i.o.get("LandLord/LandLordUnits/get-unit-occupants",{params:{unitId:e}});return t.data},m=async e=>{let{data:t}=await i.o.get("LandLord/EFT/get-eft-by-propertiesId/".concat(e));return t},x=async e=>{let{data:t}=await i.o.get("LandLord/LandLordUnits/get-count-units",{params:{propertyName:e}});return t},h=async()=>{let{data:e}=await i.o.get("LandLord/Disclosure/get-doc-types");return e},f=async e=>{let{data:t}=await i.o.post("LandLord/Documents/SaveLandlordLeaseDocument",e,{headers:{"Content-Type":"multipart/form-data"}});return t},A=async(e,t,n,r,l,a,o)=>{let{data:d}=await i.o.get("Landlord/RFTA/GetALlRFTAForLease",{params:{searchTerm:l,pageSize:e,pageNumber:t,sortOrder:n,allRecords:r,filter:a,sortColumn:o}});return d},b=async(e,t,n,r,l,a,o,d)=>{let{data:s}=await i.o.get("LandLord/Documents/GetRFTALeaseDocuments",{params:{searchTerm:l,pageSize:e,page:t,sortOrder:n,allRecords:r,filter:a,sortColumn:o,rftaId:d}});return s},v=async(e,t,n,r,l,a,o,d)=>{let{data:s}=await i.o.get("LandLord/Documents/GetRFTAContractDocuments",{params:{searchTerm:l,pageSize:e,page:t,sortOrder:n,allRecords:r,filter:a,sortColumn:o,rftaId:d}});return s},O=async e=>{let{data:t}=await i.o.delete("LandLord/Documents/DeleteLeaseAndContract?id=".concat(e));return t}},87944:function(e,t,n){"use strict";n.d(t,{EC:function(){return o},EK:function(){return c},FX:function(){return d},H3:function(){return f},M9:function(){return x},Nc:function(){return y},TD:function(){return m},To:function(){return p},Vb:function(){return A},aA:function(){return g},bI:function(){return u},bt:function(){return h},ie:function(){return I},s0:function(){return b},wm:function(){return O},wx:function(){return v},zz:function(){return s}});var i=n(43686),r=n(73921),l=n(92114),a=n(54969);let o=e=>{let{pageSize:t,pageNumber:n,sortOrder:r,allRecords:l,searchTerm:o,filter:d,onError:s,onSuccess:u,sortColumn:c}=e;return(0,i.a)(["all_rftas",t,n,r,l,o,d,c],()=>(0,a.L0)(t,n,r,l,o,d,c),{onSuccess(e){u(e)},onError:()=>{s()},staleTime:0,cacheTime:0,refetchInterval:0})},d=e=>{let{pageSize:t,pageNumber:n,sortOrder:r,allRecords:l,searchTerm:o,filter:d,onError:s,sortBy:u,onSuccess:c}=e;return(0,i.a)(["units",t,n,r,l,u,o,d],()=>(0,a.H$)(t,n,r,l,o,d,u),{onSuccess(e){c(e)},onError:()=>{s()},staleTime:0,cacheTime:0,refetchInterval:0})},s=e=>(0,i.a)(["dashboardUnit",e],()=>(0,a.eB)(e),{enabled:!!e&&-1!==e}),u=e=>(0,i.a)(["dashboardUnitOccupants",e],()=>(0,a.$T)(e),{enabled:!!e}),c=e=>(0,i.a)(["dashboardProperty",e],()=>(0,a._1)(e),{enabled:!!e}),p=e=>(0,r.D)({mutationFn:async e=>{let{unit:t,unitId:n}=e;return await (0,a.t1)(t,n)},onSuccess:async()=>{e()}}),m=e=>(0,i.a)(["EFT_BY_PROPERTY_ID"],()=>(0,a.GW)(e),{staleTime:0,cacheTime:0,refetchInterval:0,enabled:0!=e}),x=e=>{let t=(0,l.NL)();return(0,r.D)({mutationFn:async e=>{let{unitId:t}=e;return await (0,a.ss)(t)},onSuccess:async()=>{await t.invalidateQueries({queryKey:["units"]}),e()}})},h=e=>{let{pageSize:t,pageNumber:n,sortOrder:r,allRecords:l,searchTerm:o,filter:d,onError:s,onSuccess:u}=e;return(0,i.a)(["allAlerts",t,n,r,l,o,d],()=>(0,a.BN)(t,n,r,l,o,d),{onSuccess(e){u(e)},onError:()=>{s()}})},f=e=>(0,i.a)(["unitCounts"],()=>(0,a.kK)(e),{staleTime:1/0,cacheTime:1/0}),A=e=>(0,i.a)(["Counts"],()=>(0,a.kK)(e),{staleTime:0,cacheTime:0,refetchInterval:0}),b=()=>(0,i.a)(["documenttypes"],()=>(0,a.Qj)()),v=(e,t)=>(0,r.D)({mutationFn:async e=>(0,a.ho)(e),onSuccess:t=>{e&&e(t)},onError:t}),O=e=>{let{pageSize:t,pageNumber:n,sortOrder:r,allRecords:l,searchTerm:o,filter:d,onError:s,onSuccess:u,sortColumn:c}=e;return(0,i.a)(["lease contract docs",t,n,r,l,o,d,c],()=>(0,a.u_)(t,n,r,l,o,d,c),{onSuccess(e){u(e)},onError:()=>{s()},staleTime:0,cacheTime:0,refetchInterval:0})},g=e=>{let{pageSize:t,pageNumber:n,sortOrder:r,allRecords:l,searchTerm:o,filter:d,onError:s,onSuccess:u,sortColumn:c,rftaId:p}=e;return(0,i.a)(["leasedocs",t,n,r,l,o,d,c,p],()=>(0,a.zn)(t,n,r,l,o,d,c,p),{onSuccess(e){u(e)},onError:()=>{s()},staleTime:0,cacheTime:0,refetchInterval:0})},I=e=>{let{pageSize:t,pageNumber:n,sortOrder:r,allRecords:l,searchTerm:o,filter:d,onError:s,onSuccess:u,sortColumn:c,rftaId:p}=e;return(0,i.a)(["contractdocs",t,n,r,l,o,d,c,p],()=>(0,a.GJ)(t,n,r,l,o,d,c,p),{onSuccess(e){u(e)},onError:()=>{s()},staleTime:0,cacheTime:0,refetchInterval:0})},y=(e,t)=>(0,r.D)({mutationFn:async e=>(0,a.lz)(e),onSuccess:t=>{e&&e(t)}
1,onError:t})},80064:function(e,t,n){"use strict";n.d(t,{I3:function(){return o},NE:function(){return d}});var i=n(11888),r=n(26662),l=n(9912);let a=l.Ry({landLordPropertiesId:l.Rx().min(1,(0,r.L)("COMMON:VALIDATION_REQUIRED")),unitNoName:l.Z_(),yearOfConstruction:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).max(4,(0,r.L)("COMMON:VALIDATION_MAX_LENGTH",{max:4})).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER")),unitAreaSft:l.Rx({required_error:(0,r.L)("COMMON:VALIDATION_REQUIRED"),invalid_type_error:(0,r.L)("COMMON:VALIDATION_NUMBER")}).or(l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER"))).refine(e=>Number(e)>0,(0,r.L)("COMMON:VALIDATION_MIN",{min:0})),noOfBedRooms:l.Rx({required_error:(0,r.L)("COMMON:VALIDATION_REQUIRED"),invalid_type_error:(0,r.L)("COMMON:VALIDATION_NUMBER")}).or(l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER"))).refine(e=>Number(e)>0,(0,r.L)("COMMON:VALIDATION_MIN",{min:0})),noOfBathRooms:l.Rx({required_error:(0,r.L)("COMMON:VALIDATION_REQUIRED"),invalid_type_error:(0,r.L)("COMMON:VALIDATION_NUMBER")}).or(l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER"))).refine(e=>Number(e)>0,(0,r.L)("COMMON:VALIDATION_MIN",{min:0})),unitStructureTypeId:l.Rx().min(1,(0,r.L)("COMMON:VALIDATION_REQUIRED")),addr1:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")),addr2:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")),city:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")),stateId:l.Rx(),zipcode:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).min(4,(0,r.L)("COMMON:VALIDATION_MIN_LENGTH",{min:4})).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER")),state:l.Z_()}),o=l.Ry({landLordPropertiesId:l.Rx().min(1,(0,r.L)("COMMON:VALIDATION_REQUIRED")),unitNoName:l.Z_(),yearOfConstruction:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).max(4,(0,r.L)("COMMON:VALIDATION_MAX_LENGTH",{max:4})).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER")),unitAreaSft:l.Rx({required_error:(0,r.L)("COMMON:VALIDATION_REQUIRED"),invalid_type_error:(0,r.L)("COMMON:VALIDATION_NUMBER")}).or(l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER"))).refine(e=>Number(e)>0,(0,r.L)("COMMON:VALIDATION_MIN",{min:0})),noOfBedRooms:l.Rx({required_error:(0,r.L)("COMMON:VALIDATION_REQUIRED"),invalid_type_error:(0,r.L)("COMMON:VALIDATION_NUMBER")}).or(l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER"))).refine(e=>Number(e)>0,(0,r.L)("COMMON:VALIDATION_MIN",{min:0})),noOfBathRooms:l.Rx({required_error:(0,r.L)("COMMON:VALIDATION_REQUIRED"),invalid_type_error:(0,r.L)("COMMON:VALIDATION_NUMBER")}).or(l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER"))).refine(e=>Number(e)>0,(0,r.L)("COMMON:VALIDATION_MIN",{min:0})),unitStructureTypeId:l.Rx().min(1,(0,r.L)("COMMON:VALIDATION_REQUIRED")),addr1:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")),addr2:l.Z_(),city:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")),stateId:l.Rx(),zipcode:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).min(4,(0,r.L)("COMMON:VALIDATION_MIN_LENGTH",{min:4})).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER")),state:l.Z_()}),d=a.extend({unitUtility:l.IX(l.Ry({unitAttributeId:l.Rx(),unitAttributeTypeId:l.Rx().or(l.i0("")).optional(),isTenantPayee:l.i0("true").or(l.i0("false")).or(l.O7()).optional(),isSelected:l.O7()})),unitAppliance:l.IX(l.Ry({unitAttributeId:l.Rx(),isTenantPayee:l.i0("true").or(l.i0("false")).or(l.O7()).optional(),isSelected:l.O7()})),unitAminities:l.IX(l.Ry({unitAttributeId:l.Rx(),isSelected:l.O7()})),unitAmenitiesIndoor:l.IX(l.Ry({unitAttributeId:l.Rx(),isSelected:l.O7()})),unitAmenitiesKitchen:l.IX(l.Ry({unitAttributeId:l.Rx(),isSelected:l.O7()})),unitAmenitiesMaintenance:l.IX(l.Ry({unitAttributeId:l.Rx(),isSelected:l.O7()})),unitAmenitiesOutdoor:l.IX(l.Ry({unitAttributeId:l.Rx(),isSelected:l.O7()}))})},21236:function(e,t,n){"use strict";n.d(t,{g:function(){return a}});var i=n(43686),r=n(20743);let l=async()=>{let{data:e}
1=await r.o.get("LookUp/GetStates");return e},a=()=>(0,i.a)(["states"],()=>l(),{staleTime:1/0})},15957:function(e,t,n){"use strict";var i=n(15311);t.Z=e=>(0,i.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,i.jsx)("path",{d:"M5.9165 10.75L1.6665 6.5L5.9165 2.25",stroke:"#2F0B7C",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})})},38382:function(e,t,n){"use strict";var i=n(3247),r=n(15311),l=n(15957),a=n(58571),o=n(80185);function d(){let e=(0,i._)(["\n border: none;\n background: transparent;\n cursor: pointer;\n display: flex;\n gap: 10px;\n align-items: center;\n"]);return d=function(){return e},e}function s(){let e=(0,i._)(["\n height: 48px;\n display: flex;\n align-items: center;\n padding: 8px;\n"]);return s=function(){return e},e}n(20132);let u=(0,a.Z)("button")(d()),c=(0,a.Z)("div")(s());t.Z=e=>{let{onClick:t}=e;return(0,r.jsx)(c,{children:(0,r.jsxs)(u,{onClick:t,children:[(0,r.jsx)(l.Z,{}),(0,r.jsx)(o.Z,{variant:"subtitle1",component:"span",sx:{cursor:"pointer"},children:"Go back"})]})})}},64289:function(e,t,n){"use strict";var i=n(3247),r=n(15311),l=n(64344);function a(){let e=(0,i._)(["\n width: 100%;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n"]);return a=function(){return e},e}let o=(0,n(84819).ZP)("div")(a());t.Z=function(){return(0,r.jsx)(o,{children:(0,r.jsx)(l.Z,{})})}},86192:function(e,t,n){"use strict";n.d(t,{h:function(){return m}});var i=n(15311),r=n(20132),l=n(21236),a=n(67914),o=n(54001),d=n(37637),s=n(25354),u=n(5724),c=n(39361),p=n(81215);function m(e){let{addressLine1:t,error:n,field:m,helperText:x,setValue:h,trigger:f,addressLine2:A,unit:b,cityFormName:v,fullAddress:O,customlabel:g,width:I,stateFormName:y,zipCodeFormName:L,addressRequired:R,starMark:N,disabled:j}=e,{data:_}=(0,l.g)(),{t:T}=(0,u.Z)(),M=(0,r.useRef)(null),D=()=>{M.current&&(M.current.blur(),M.current.focus())},E=(0,r.useCallback)(e=>{(0,c.NU)(e).then(n=>{var i,r;let l=n[0].address_components,a="",o="",d="",s="",u="",p="",m="";if(l.forEach(e=>{let t=e.types;t.includes("locality")?a=e.long_name:t.includes("administrative_area_level_1")?o=e.long_name:t.includes("postal_code")?d=e.long_name:t.includes("street_number")?s=e.long_name:t.includes("route")?u=e.long_name:t.includes("neighborhood")?p=e.long_name:t.includes("subpremise")&&(m=e.long_name)}),"District of Columbia"===o&&(o="Washington"),u&&s?h(t,"".concat(s," ").concat(u).concat(m&&!b?", ".concat(m):"")):h(t,e),f([t]),b&&(h(b,m),f(b)),A&&(h(A,p),f(A)),v&&(h(v,a),f(v)),y&&(null==_?void 0:null===(i=_.find(e=>e.state===o))||void 0===i?void 0:i.id)&&(h(y,null==_?void 0:null===(r=_.find(e=>e.state===o))||void 0===r?void 0:r.id),f(y)),O&&(h(O,"".concat(s," ").concat(u).concat(p?", ".concat(p):"").concat(m&&!b?", ".concat(m):"").concat(a?", ".concat(a):"")),f(O)),L)return h(L,d),f(L),D(),(0,c.WV)(n[0])}).catch(e=>console.error(T("COMMON:ERROR_API_GENERAL_REQUEST_FAILED"),e))},[t,A,v,h,y,O,_,T,f,b,L]);return(0,i.jsx)(c.ZP,{value:m.value,onChange:m.onChange,onSelect:E,searchOptions:{componentRestrictions:{country:"us"}},children:e=>{let{getInputProps:t,suggestions:l,getSuggestionItemProps:u}=e;return(0,i.jsx)(s.Z,{options:l,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,i.jsx)(o.ZP,{width:"40px",color:"secondary.dark",children:(0,i.jsx)(a.K5,{})}),renderInput:e=>(0,i.jsx)(p.Z,{...e,...t({variant:"outlined"}),inputProps:{...e.inputProps,autoComplete:"address-line1"},inputRef:M,customlabel:g||"",starMark:N||"",value:m.value,error:n,helperText:x,width:I,required:R,disabled:j}),renderOption:(e,t)=>(0,r.createElement)(d.Z,{...u(t),key:t.placeId,sx:{whiteSpace:"normal",wordWrap:"break-word"}},t.description)})}})}},33483:function(e,t,n){"use strict";var i=n(3247),r=n(15311),l=n(84819);function a(){let e=(0,i._)(["\n width: 100%;\n height: 2px;\n background-color: ",";\n margin-bottom: 25px;\n"]);return a=function(){return e},e}n(20132);let o=(0,l.ZP)("div")(a(),e=>{let{theme:t}=e;return t.palette.grey[300]});t.Z=()=>(0,r.jsx)(o,{})},11888:function(e,t,n){"use strict";n.d(t,{CU:function(){return i},_D:function(){return o},bn:function(){return r},qC:function(){return a},zU:function(){return l}});let i=/^[\w-\.+]+@([\w-]+\.)+[\w-]{2,4}$/,r=/^[a-zA-Z0-9_]*$/,l=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&#])[A-Za-z\d@$!#%*?&]{8,}$/,a=/^[+-]?\d+(\.\d+)?$/,o=/^[0-9]{10}$/},62025:function(e,t,n){"use strict";n.d(t,{u:function(){return a}});var i=n(33659),r=n(68102),l=n(20132);let a=()=>{let{data:e}=(0,i.v$)();(0,l.useEffect)(()=>
1{if(e){if("1"===e.locale){localStorage.setItem("lang","en"),(0,r.Z)("en");return}localStorage.setItem("lang","es"),(0,r.Z)("es")}},[e])}},69793:function(e,t,n){"use strict";n.d(t,{cE:function(){return c},cq:function(){return p},qn:function(){return m}});var i=n(3247),r=n(80185),l=n(84819);function a(){let e=(0,i._)(["\n display: flex;\n flex-direction: column;\n gap: 15px;\n margin: 15px 0 0px 0;\n\n .selectionRow {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 20px;\n }\n\n "," {\n .selectionRow {\n flex-direction: column;\n align-items: center;\n }\n }\n"]);return a=function(){return e},e}function o(){let e=(0,i._)(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 20px;\n\n "," {\n flex-direction: column;\n }\n"]);return o=function(){return e},e}function d(){let e=(0,i._)(["\n display: grid;\n grid-template: 3fr;\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 s(){let e=(0,i._)(["\n font-size: 27px;\n font-weight: 500;\n margin-top: 10px;\n color: ",";\n"]);return s=function(){return e},e}function u(){let e=(0,i._)(["\n font-size: 15px;\n margin-bottom: 20px;\n color: ",";\n"]);return u=function(){return e},e}let c=(0,l.ZP)("div")(a(),e=>{let{theme:t}=e;return t.breakpoints.down("md")});(0,l.ZP)("div")(o(),e=>{let{theme:t}=e;return t.breakpoints.down("md")}),(0,l.ZP)("div")(d(),e=>{let{theme:t}=e;return t.breakpoints.down("mobile")});let p=(0,l.ZP)(r.Z)(s(),e=>{let{theme:t}=e;return t.palette.secondary.dark}),m=(0,l.ZP)(r.Z)(u(),e=>{let{theme:t}=e;return t.palette.secondary.dark})},94102:function(e,t,n){"use strict";n.d(t,{AF:function(){return x},Ev:function(){return h},UT:function(){return p},Yk:function(){return m}});var i=n(3247),r=n(84819),l=n(39112),a=n(864),o=n(4825);function d(){let e=(0,i._)(["\n background-color: ",";\n\n th {\n color: ",";\n font-weight: 700;\n font-size: 16px;\n padding: 8px 16px;\n }\n"]);return d=function(){return e},e}function s(){let e=(0,i._)(["\n padding: 5px 16px;\n font-size: 15px;\n color: ",";\n font-weight: 400;\n border: none;\n height: 34.5px;\n"]);return s=function(){return e},e}function u(){let e=(0,i._)(["\n :nth-of-type(even) {\n background-color: ",";\n border-top: 1px solid #e8d7d7;\n }\n"]);return u=function(){return e},e}function c(){let e=(0,i._)(["\n :nth-of-type(even) {\n background-color: ",";\n }\n display: flex;\n justify-content: space-between;\n width: 298px;\n"]);return c=function(){return e},e}let p=(0,r.ZP)(a.Z)(d(),e=>{let{theme:t}=e;return t.palette.primary.dark},e=>{let{theme:t}=e;return t.palette.primary.contrastText}),m=(0,r.ZP)(l.Z)(s(),e=>{let{theme:t}=e;return t.color.darkGray}),x=(0,r.ZP)(o.Z)(u(),e=>{let{theme:t}=e;return t.palette.primary.pale}),h=(0,r.ZP)(o.Z)(c(),e=>{let{theme:t}=e;return t.palette.primary.pale})},6250:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return $},default:function(){return J}});var i=n(15311),r=n(33659),l=n(64289),a=n(62025),o=n(23262),d=n(87944),s=n(88207),u=n(36809),c=n(28500),p=n(5762),m=n(8487),x=n(91054),h=n(3247),f=n(38239),A=n(80064),b=n(72155),v=n(73536),O=n(57017),g=n(37637),I=n(81217),y=n(64344),L=n(84819),R=n(20132),N=n(17723),j=n(52691),_=n(36065),T=n(53560),M=n(96404),D=n(9338),E=n(39112),Z=n(36787),C=n(4825),S=n(94102),U=n(69793),w=e=>{var t,n,r,l;let{control:a,watch:o,editDefaultData:d}=e,{data:s}=(0,f.CO)(),{data:u}=(0,f.JA)(),{data:p,isLoading:m,isSuccess:x}=(0,f.tA)(),h=(0,R.useMemo)(()=>(u||[]).map((e,t)=>({unitAttributeid:e.id,isSelected:"unitUtility.".concat(t,".isSelected"),unitAttributeTypeId:"unitUtility.".concat(t,".unitAttributeTypeId"),isTenantPayee:"unitUtility.".concat(t,".isTenantPayee"),control:a,label:e.name})),[a,u]),A=(0,R.useMemo)(()=>[{id:"label",label:"Utility",minWidth:185,align:"left",render:e=>{let{label:t}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{style:{color:j.r.palette.error.main},children:"*"}),t]})}},{id:"available",label:"Available",minWidth:100,align:"center",render:e=>{let{isSelected:t,control:n}=e;return(0,i.jsx)(N.Qr,{name:t,control:n,defaultValue:!1,render:e=>{let{field:{value:t,...n}}=e;return(0,i.jsx)(b.x1,{checked:!!t,size:"small",...n})}})}},{id:"select",label:"Paid by:",minWidth:190,align:"center",render:e=>{let{unitAttributeTypeId:t,unitAttributeid:n,control:r}=e;return(0,i.jsxs)(i.Fragment,{children:[m&&(0,i.jsx)(b.RG,{size:"small",disabled:!0,defaultValue:0}),x&&p.filter(e=>e.llUnitUtilitiesID===n).length>0?(0,i.jsx)(N.Qr,{name:t,control:r,render:e=>{let{field:t}=e;return(0,i.jsxs)(b.RG,{size:"small",...t,value:void 0!==t.value?t.value:0,children:[(0,i.jsx)(g.Z,{value:0,children:"Select"}),p.filter(e=>e.llUnitUtilitiesID===n).map(e=>(0,i.jsx)(g.Z,{value:e.id,children:e.name},e.id))]})}}):null]})}},{id:"owner",label:(0,i.jsxs)("div",{style:{display:"flex"},children:[(0,i.jsx)("span",{style:{flex:"1"},children:(0,i.jsx)(c.Z,{i18nKey:"LANDLORD:RFTA_FORM_LABEL_OWNER"})}),(0,i.jsx)("span",{style:{flex:"1"},children:(0,i.jsx)(c.Z,{i18nKey:"LANDLORD:UNIT_TENANT"})})]}),minWidth:220,align:"center",render:e=>{let{isTenantPayee:t,control:n}=e;return(0,i.jsx)(N.Qr,{name:t,control:n,defaultValue:!1,render:e=>{let{field:t}=e;
1return(0,i.jsxs)(_.Z,{...t,sx:{display:"flex",flexDirection:"row"},itemType:"boolean",children:[(0,i.jsx)(T.Z,{sx:{display:"flex",flex:"1",margin:"0",justifyContent:"center"},value:!1,control:(0,i.jsx)(b.Pj,{size:"small"}),label:""}),(0,i.jsx)(T.Z,{sx:{display:"flex",flex:"1",margin:"0",justifyContent:"center"},value:!0,control:(0,i.jsx)(b.Pj,{size:"small"}),label:""})]})}})}}],[x,m,p]),v=(0,R.useMemo)(()=>(s||[]).map((e,t)=>({unitAttributeid:e.id,isSelected:"unitAppliance.".concat(t,".isSelected"),isTenantPayee:"unitAppliance.".concat(t,".isTenantPayee"),control:a,label:e.name})),[a,s]),O=(0,R.useMemo)(()=>[{id:"label",label:"Appliances",minWidth:185,align:"left",render:e=>{let{label:t}=e;return t}},{id:"available",label:"Available",minWidth:100,align:"center",render:e=>{let{isSelected:t,control:n}=e;return(0,i.jsx)(N.Qr,{name:t,control:n,defaultValue:!1,render:e=>{let{field:{value:t,...n}}=e;return(0,i.jsx)(b.x1,{size:"small",checked:!!t,...n})}})}},{id:"select",label:"",minWidth:190,align:"center",render:()=>null},{id:"owner",label:(0,i.jsxs)("div",{style:{display:"flex"},children:[(0,i.jsx)("span",{style:{flex:"1"},children:(0,i.jsx)(c.Z,{i18nKey:"LANDLORD:RFTA_FORM_LABEL_OWNER"})}),(0,i.jsx)("span",{style:{flex:"1"},children:(0,i.jsx)(c.Z,{i18nKey:"LANDLORD:UNIT_TENANT"})})]}),minWidth:220,align:"center",render:e=>{let{isTenantPayee:t,control:n}=e;return(0,i.jsx)(N.Qr,{name:t,control:n,defaultValue:!1,render:e=>{let{field:t}=e;return(0,i.jsxs)(_.Z,{...t,sx:{display:"flex",flexDirection:"row"},children:[(0,i.jsx)(T.Z,{sx:{display:"flex",flex:"1",margin:"0",justifyContent:"center"},value:!1,control:(0,i.jsx)(b.Pj,{size:"small"}),label:""}),(0,i.jsx)(T.Z,{sx:{display:"flex",flex:"1",margin:"0",justifyContent:"center"},value:!0,control:(0,i.jsx)(b.Pj,{size:"small"}),label:""})]})}})}}],[]),I=(0,R.useMemo)(()=>{var e;return((null==d?void 0:null===(e=d.amenities)||void 0===e?void 0:e.Indoor)||[]).map((e,t)=>({unitAttributeid:e.unitAttributeId,isSelected:"unitAmenitiesIndoor.".concat(t,".isSelected"),control:a,label:e.unitAttributeName}))},[a,null==d?void 0:null===(t=d.amenities)||void 0===t?void 0:t.Indoor]),y=(0,R.useMemo)(()=>{var e;return((null==d?void 0:null===(e=d.amenities)||void 0===e?void 0:e.Kitchen)||[]).map((e,t)=>({unitAttributeid:e.unitAttributeId,isSelected:"unitAmenitiesKitchen.".concat(t,".isSelected"),control:a,label:e.unitAttributeName}))},[a,null==d?void 0:null===(n=d.amenities)||void 0===n?void 0:n.Kitchen]),L=(0,R.useMemo)(()=>{var e;return((null==d?void 0:null===(e=d.amenities)||void 0===e?void 0:e.Maintenance)||[]).map((e,t)=>({unitAttributeid:e.unitAttributeId,isSelected:"unitAmenitiesMaintenance.".concat(t,".isSelected"),control:a,label:e.unitAttributeName}))},[a,null==d?void 0:null===(r=d.amenities)||void 0===r?void 0:r.Maintenance]),w=(0,R.useMemo)(()=>{var e;return((null==d?void 0:null===(e=d.amenities)||void 0===e?void 0:e.Outdoor)||[]).map((e,t)=>({unitAttributeid:e.unitAttributeId,isSelected:"unitAmenitiesOutdoor.".concat(t,".isSelected"),control:a,label:e.unitAttributeName}))},[a,null==d?void 0:null===(l=d.amenities)||void 0===l?void 0:l.Outdoor]),V=(0,R.useMemo)(()=>[{id:"label",label:"Amenities",minWidth:185,align:"left",render:e=>{let{label:t}=e;return t}},{id:"available",label:"Available",minWidth:100,align:"center",render:e=>{let{isSelected:t,control:n}=e;return(0,i.jsx)(N.Qr,{name:t,control:n,defaultValue:!1,render:e=>{let{field:{value:t,...n}}=e;return(0,i.jsx)(b.x1,{size:"small",checked:!!t,...n})}})}}],[]),k=Math.ceil(I.length/2),P=I.slice(0,k),B=I.slice(k),F=Math.ceil(y.length/2),W=y.slice(0,F),Q=y.slice(F),z=Math.ceil(L.length/2),Y=L.slice(0,z),G=L.slice(z);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Z.Z,{children:(0,i.jsxs)(M.Z,{sx:{minWidth:650},"aria-label":"uhit details table",children:[(0,i.jsx)(S.UT,{children:(0,i.jsx)(C.Z,{children:A.map(e=>(0,i.jsx)(E.Z,{align:e.align,style:{minWidth:e.minWidth},children:e.label},e.id))})}),(0,i.jsx)(D.Z,{children:h.map(e=>(0,i.jsx)(S.AF,{children:A.map(t=>{let n=t.id,r="available"===n?"isSelected":"select"===n?"unitAttributeTypeId":"owner"===n?"isTenantPayee":"label"===n?"label":"",l="available"===n?e.isSelected:"select"===n?e.unitAttributeTypeId:"owner"===n?e.isTenantPayee:"label"===n?e.label:"",a=!e.isSelected||o(e.isSelected);return r&&l&&"select"!==n&&"owner"!==n||("select"===n||"owner"===n)&&a?(0,i.jsx)(S.Yk,{align:t.align,children:t.render&&t.render({[r]:l,control:e.control,unitAttributeid:e.unitAttributeid||0,show:e.isSelected&&o(e.isSelected)||void 0})},t.id):(0,i.jsx)(S.Yk,{align:t.align,children:"\xa0"},t.id)})},e.unitAttributeid))}),(0,i.jsx)(S.UT,{children:(0,i.jsx)(C.Z,{children:O.map(e=>(0,i.jsx)(E.Z,{align:e.align,style:{minWidth:e.minWidth},children:e.label},e.id))})}),(0,i.jsx)(D.Z,{children:v.map(e=>(0,i.jsx)(S.AF,{children:O.map(t=>{let n=t.id,r="available"===n?"isSelected":"select"===n?"":"owner"===n?"isTenantPayee":"label"===n?"label":"",l="available"===n?e.isSelected:"select"===n?"":"owner"===n?e.isTenantPayee:"label"===n?e.label:"",a=!!e.isSelected&&o(e.isSelected);return r&&l&&"owner"!==n||"owner"===n&&a?(0,i.jsx)(S.Yk,{align:t.align,children:t.render&&t.render({[r]:l,control:e.control,show:e.isSelected&&o(e.isSelected)||void 0})},t.id):(0,i.jsx)(S.Yk,{align:t.align},t.id)})},e.unitAttributeid))})]})}),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(U.cq,{children:(0,i.jsx)(c.Z,{i18nKey:"LANDLORD:AMENITIES"})}),(0,i.jsx)("div",{children:(0,i.jsx)(U.cq,{style:{backgroundColor:"#270276",width:"100%",padding:"10px",color:"white",fontSize:"13px",fontWeight:700},children:"Indoor"})}),(0,i.jsx)(Z.Z,{children:(0,i.jsx)(M.Z,{sx:{minWidth:650},"aria-label":"uhit details table",children:(0,i.jsx)(D.Z,{children:(0,i.jsxs)(C.Z,{children:[(0,i.jsx)(E.Z,{colSpan:2,style:{borderBottom:"none"},children:(0,i.jsx)(M.Z,{children:(0,i.jsx)(D.Z,{children:P.map((e,t)=>(0,i.jsx)(S.Ev,{children:V.map(t=>{let n=t.id,r="available"===n?"isSelected":"label"===n?"label":"",l="available"===n?e.isSelected:"label"===n?e.label:"";return r&&l?(0,i.jsx)(S.Yk,{align:t.align,style:{padding:"5px 0px"},children:t.render&&t.render({[r]:l,control:e.control})},t.id):(0,i.jsx)(S.Yk,{align:t.align},t.id)})},t))})})}),(0,i.jsx)(E.Z,{style:{borderBottom:"none",minWidth:0}}),(0,i.jsx)(E.Z,{colSpan:2,style:{borderBottom:"none",padding:"0px"},children:(0,i.jsx)(M.Z,{children:(0,i.jsx)(D.Z,{children:B.map((e,t)=>(0,i.jsx)(S.Ev,{children:V.map(t=>{let n=t.id,r="available"===n?"isSelected":"select"===n?"":"owner"===n?"":"label"===n?"label":"",l="available"===n?e.isSelected:"select"===n?"":"owner"===n?"":"label"===n?e.label:"";return r&&l?(0,i.jsx)(S.Yk,{align:t.align,style:{padding:"5px 0px"},children:t.render&&t.render({[r]:l,control:e.control})},t.id):(0,i.jsx)(S.Yk,{align:t.align},t.id)})},t))})})})]})})})}),(0,i.jsx)("div",{children:(0,i.jsx)(U.cq,{style:{backgroundColor:"#270276",width:"100%",padding:"10px",color:"white",fontSize:"13px",fontWeight:700},children:"Kitchen"})}),(0,i.jsx)(Z.Z,{children:(0,i.jsx)(M.Z,{sx:{minWidth:650},"aria-label":"uhit details table",children:(0,i.jsx)(D.Z,{children:(0,i.jsxs)(C.Z,{children:[(0,i.jsx)(E.Z,{colSpan:2,style:{borderBottom:"none"},children:(0,i.jsx)(M.Z,{children:(0,i.jsx)(D.Z,{children:W.map((e,t)=>(0,i.jsx)(S.Ev,{children:V.map(t=>{let n=t.id,r="available"===n?"isSelected":"label"===n?"label":"",l="available"===n?e.isSelected:"label"===n?e.label:"";return r&&l?(0,i.jsx)(S.Yk,{align:t.align,style:{padding:"5px 0px"},children:t.render&&t.render({[r]:l,control:e.control})},t.id):(0,i.jsx)(S.Yk,{align:t.align},t.id)})},t))})})}),(0,i.jsx)(E.Z,{style:{borderBottom:"none",minWidth:0}}),(0,i.jsx)(E.Z,{colSpan:2,style:{borderBottom:"none",padding:"0px"},children:(0,i.jsx)(M.Z,{children:(0,i.jsx)(D.Z,{children:Q.map((e,t)=>(0,i.jsx)(S.Ev,{children:V.map(t=>{let n=t.id,r="available"===n?"isSelected":"select"===n?"":"owner"===n?"":"label"===n?"label":"",l="available"===n?e.isSelected:"select"===n?"":"owner"===n?"":"label"===n?e.label:"";return r&&l?(0,i.jsx)(S.Yk,{align:t.align,style:{padding:"5px 0px"},children:t.render&&t.render({[r]:l,control:e.control})},t.id):(0,i.jsx)(S.Yk,{align:t.align},t.id)})},t))})})})]})})})}),(0,i.jsx)("div",{children:(0,i.jsx)(U.cq,{style:{backgroundColor:"#270276",width:"100%",padding:"10px",color:"white",fontSize:"13px",fontWeight:700},children:"Maintenance"})}),(0,i.jsx)(Z.Z,{children:(0,i.jsx)(M.Z,{sx:{minWidth:650},"aria-label":"uhit details table",children:(0,i.jsx)(D.Z,{children:(0,i.jsxs)(C.Z,{children:[(0,i.jsx)(E.Z,{colSpan:2,style:{borderBottom:"none"},children:(0,i.jsx)(M.Z,{children:(0,i.jsx)(D.Z,{children:Y.map((e,t)=>(0,i.jsx)(S.Ev,{children:V.map(t=>{let n=t.id,r="available"===n?"isSelected":"label"===n?"label":"",l="available"===n?e.isSelected:"label"===n?e.label:"";return r&&l?(0,i.jsx)(S.Yk,{align:t.align,style:{padding:"5px 0px"},children:t.render&&t.render({[r]:l,control:e.control})},t.id):(0,i.jsx)(S.Yk,{align:t.align},t.id)})},t))})})}),(0,i.jsx)(E.Z,{style:{borderBottom:"none",minWidth:0}}),(0,i.jsx)(E.Z,{colSpan:2,style:{borderBottom:"none",padding:"0px"},children:(0,i.jsx)(M.Z,{children:(0,i.jsx)(D.Z,{children:G.map((e,t)=>(0,i.jsx)(S.Ev,{children:V.map(t=>{let n=t.id,r="available"===n?"isSelected":"select"===n?"":"owner"===n?"":"label"===n?"label":"",l="available"===n?e.isSelected:"select"===n?"":"owner"===n?"":"label"===n?e.label:"";return r&&l?(0,i.jsx)(S.Yk,{align:t.align,style:{padding:"5px 0px"},children:t.render&&t.render({[r]:l,control:e.control})},t.id):(0,i.jsx)(S.Yk,{align:t.align},t.id)})},t))})})})]})})})}),(0,i.jsx)("div",{children:(0,i.jsx)(U.cq,{style:{backgroundColor:"#270276",width:"100%",padding:"10px",color:"white",fontSize:"13px",fontWeight:700},children:"Outdoor"})}),(0,i.jsx)(Z.Z,{children:(0,i.jsx)(M.Z,{sx:{minWidth:650},"aria-label":"uhit details table",children:(0,i.jsx)(D.Z,{children:(0,i.jsxs)(C.Z,{children:[(0,i.jsx)(E.Z,{colSpan:2,style:{borderBottom:"none"},children:(0,i.jsx)(M.Z,{children:(0,i.jsx)(D.Z,{children:w.map(e=>[17,18].includes(e.unitAttributeid)?null:(0,i.jsx)(S.Ev,{children:V.map(t=>{let n=t.id,r="available"===n?"isSelected":"select"===n?"":"owner"===n?"":"label"===n?"label":"",l="available"===n?e.isSelected:"select"===n?"":"owner"===n?"":"label"===n?e.label:"";return r&&l?(0,i.jsx)(S.Yk,{align:t.align,style:{padding:"5px 0px"},children:t.render&&t.render({[r]:l,control:e.control})},t.id):(0,i.jsx)(S.Yk,{align:t.align},t.id)})},e.unitAttributeid))})})}),(0,i.jsx)(E.Z,{style:{borderBottom:"none",minWidth:0}}),(0,i.jsx)(E.Z,{colSpan:2,style:{borderBottom:"none",padding:"0px"},children:(0,i.jsx)(M.Z,{children:(0,i.jsx)(D.Z,{children:w.map(e=>{if([17,18].includes(e.unitAttributeid))return(0,i.jsx)(S.Ev,{children:V.map(t=>{let n=t.id,r="available"===n?"isSelected":"select"===n?"":"owner"===n?"":"label"===n?"label":"",l="available"===n?e.isSelected:"select"===n?"":"owner"===n?"":"label"===n?e.label:"";return r&&l?(0,i.jsx)(S.Yk,{align:t.align,style:{padding:"5px 0px"},children:t.render&&t.render({[r]:l,control:e.control})},t.id):(0,i.jsx)(S.Yk,{align:t.align},t.id)})},e.unitAttributeid)})})})})]})})})})]})]})},V=n(21236),k=n(86192);function P(){let e=(0,h._)(["\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 P=function(){return e},e}function B(){let e=(0,h._)(["\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 B=function(){return e},e}let F=(0,L.ZP)("div")(P(),e=>{let{theme:t}=e;return t.breakpoints.down("mobile")}),W=(0,L.ZP)("div")(B(),e=>{let{theme:t}=e;return t.breakpoints.down("mobile")});var Q=function(e){var t,n,r,l,a,o;let{properties:d,selectedPropertyId:s,showAddPropertyButton:h,isLoading:L,onSave:_,onCancel:T,editDefaultData:M}=e,D=(0,p.useRouter)(),{isDesktop:E}=(0,v.Z)(),{data:Z,isError:C,isSuccess:S}=(0,V.g)(),{data:P,isLoading:B}=(0,f.CO)(),{data:Q,isLoading:z}=(0,f.JA)(),{data:Y,isLoading:G}=(0,f.p5)(),{data:q}=(0,f.JN)(),{data:K,isLoading:H,isError:X,isSuccess:$}=(0,f.Um)(),J=R.useMemo(()=>null==K?void 0:K.filter(e=>
1e.hasUnit),[K]),{control:ee,handleSubmit:et,setValue:en,watch:ei,getValues:er,trigger:el,formState:{errors:ea}}=(0,N.cI)({resolver:(0,O.F)(A.NE),values:{...M,unitNoName:(null==M?void 0:M.unitNoName)||"",yearOfConstruction:String((null==M?void 0:M.yearOfConstruction)||""),unitAreaSft:String((null==M?void 0:M.unitAreaSft)||""),noOfBedRooms:String((null==M?void 0:M.noOfBedRooms)||""),noOfBathRooms:String((null==M?void 0:M.noOfBathRooms)||""),unitStructureTypeId:(null==M?void 0:M.unitStructureTypeId)||(null==K?void 0:null===(t=K[0])||void 0===t?void 0:t.id)||0,landLordPropertiesId:s||(null===(n=d[0])||void 0===n?void 0:n.propertyId),unitAminities:(null==M?void 0:M.unitAminities)||[],unitAppliance:(null==M?void 0:M.unitAppliance)||[],unitUtility:(null==M?void 0:M.unitUtility)||[],unitAmenitiesIndoor:(null==M?void 0:null===(r=M.amenities)||void 0===r?void 0:r.Indoor)||[],unitAmenitiesKitchen:(null==M?void 0:null===(l=M.amenities)||void 0===l?void 0:l.Kitchen)||[],unitAmenitiesMaintenance:(null==M?void 0:null===(a=M.amenities)||void 0===a?void 0:a.Maintenance)||[],unitAmenitiesOutdoor:(null==M?void 0:null===(o=M.amenities)||void 0===o?void 0:o.Outdoor)||[],addr1:(null==M?void 0:M.addr1)||"",addr2:(null==M?void 0:M.addr2)||"",city:(null==M?void 0:M.city)||"",stateId:(null==M?void 0:M.stateId)||0,zipcode:(null==M?void 0:M.zipcode)||"",state:(null==M?void 0:M.state)||""},mode:"all"}),eo=async e=>{var t,n,r,l,a,o,d,s,u,p;el(),e.preventDefault();let h=er(),f=null==Z?void 0:Z.filter(e=>e.id===h.stateId);void 0!==f&&0!==f.length&&(h.state=null===(u=f[0])||void 0===u?void 0:u.state,en("state",null===(p=f[0])||void 0===p?void 0:p.state)),h.unitUtility.forEach((e,t)=>{"true"===e.isTenantPayee?en("unitUtility.".concat(t,".isTenantPayee"),!0):"false"===e.isTenantPayee&&en("unitUtility.".concat(t,".isTenantPayee"),!1)}),h.unitAppliance.forEach((e,t)=>{"true"===e.isTenantPayee?en("unitAppliance.".concat(t,".isTenantPayee"),!0):"false"===e.isTenantPayee&&en("unitAppliance.".concat(t,".isTenantPayee"),!1)}),null==q||null===(t=q.data)||void 0===t||t.Indoor.forEach((e,t)=>{en("unitAmenitiesIndoor.".concat(t,".unitAttributeId"),e.unitAttributeId)}),null==q||null===(r=q.data)||void 0===r||null===(n=r.Kitchen)||void 0===n||n.forEach((e,t)=>{en("unitAmenitiesKitchen.".concat(t,".unitAttributeId"),e.unitAttributeId)}),null==q||null===(a=q.data)||void 0===a||null===(l=a.Maintenance)||void 0===l||l.forEach((e,t)=>{en("unitAmenitiesMaintenance.".concat(t,".unitAttributeId"),e.unitAttributeId)}),null==q||null===(d=q.data)||void 0===d||null===(o=d.Outdoor)||void 0===o||o.forEach((e,t)=>{en("unitAmenitiesOutdoor.".concat(t,".unitAttributeId"),e.unitAttributeId)}),null==Y||Y.forEach((e,t)=>{en("unitAminities.".concat(t,".unitAttributeId"),e.id)}),null==Y||Y.forEach((e,t)=>{en("unitAminities.".concat(t,".unitAttributeId"),e.id),en("unitAminities.".concat(t,".isSelected"),!1)}),null==P||P.forEach((e,t)=>{en("unitAppliance.".concat(t,".unitAttributeId"),e.id)}),null==Q||Q.forEach((e,t)=>{en("unitUtility.".concat(t,".unitAttributeId"),e.id)});let A=null===(s=h.unitUtility)||void 0===s?void 0:s.filter(e=>"unitAttributeTypeId"in e),b=!1;
1if(""===ei("addr2")?en("unitNoName"," "):en("unitNoName",ei("addr2")),ei("unitUtility").find(e=>!0!==e.isSelected)){m.Am.error((0,i.jsx)(x.Z,{text:(0,i.jsx)(c.Z,{i18nKey:"LANDLORD:RFTA_UNIT_DETAILS_UTILITIES_MANDATORY_ERROR"})}));return}b=!0;let v=!0;null==A||A.forEach(e=>{if((1===e.unitAttributeId||2===e.unitAttributeId||3===e.unitAttributeId||4===e.unitAttributeId)&&(void 0===e.unitAttributeTypeId||0===e.unitAttributeTypeId)&&v){m.Am.error((0,i.jsx)(x.Z,{text:"Select Paid by Column for Utility"})),v=!1;return}}),b&&v&&h.unitUtility.forEach((e,t)=>{en("unitUtility.".concat(t,".unitAttributeTypeId"),(null==A?void 0:A[t])?null==A?void 0:A[t].unitAttributeTypeId:0)}),b&&v&&et(e=>{_(e)})()};return(0,i.jsx)("div",{children:(0,i.jsxs)("form",{onSubmit:e=>eo(e),children:[(0,i.jsxs)(F,{children:[(0,i.jsx)(N.Qr,{name:"landLordPropertiesId",control:ee,render:e=>{var t;let{field:{onChange:n,...r}}=e;return(0,i.jsx)(b.RG,{customlabel:"LANDLORD:RFTA_PROPERTY_NAME",...r,onChange:e=>{var t;n(e),null==J||null===(t=J.find(e=>e.id===ei("unitStructureTypeId")))||void 0===t||t.name},error:!!ea.landLordPropertiesId,errormessage:null===(t=ea.landLordPropertiesId)||void 0===t?void 0:t.message,disabled:!!M,starMark:"*",children:null==d?void 0:d.map(e=>(0,i.jsx)(g.Z,{value:e.propertyId,children:e.propertyName},e.propertyId))})}}),(0,i.jsx)(N.Qr,{name:"addr1",control:ee,defaultValue:"",render:e=>{var t;let{field:n}=e;return(0,i.jsx)(k.h,{customlabel:"LANDLORD:RFTA_FORM_LABEL_ADDRESS_LINE_1",field:n,error:!!ea.addr1,helperText:null===(t=ea.addr1)||void 0===t?void 0:t.message,setValue:en,addressLine1:"addr1",addressLine2:"addr2",cityFormName:"city",stateFormName:"stateId",zipCodeFormName:"zipcode",starMark:"*",trigger:el})}}),(0,i.jsx)(N.Qr,{name:"addr2",control:ee,defaultValue:"",render:e=>{var t;let{field:n}=e;return(0,i.jsx)(b._l,{autoComplete:"address-line2",variant:"outlined",customlabel:"LANDLORD:RFTA_UNIT_NAME",error:!!ea.addr2,helperText:null===(t=ea.addr2)||void 0===t?void 0:t.message,...n,starMark:"*",sx:{maxWidth:"283px"}})}}),(0,i.jsx)(N.Qr,{name:"city",control:ee,defaultValue:"",render:e=>{var t;let{field:n}=e;return(0,i.jsx)(b._l,{variant:"outlined",customlabel:"LANDLORD:RFTA_FORM_LABEL_CITY",error:!!ea.city,helperText:null===(t=ea.city)||void 0===t?void 0:t.message,...n,starMark:"*",sx:{maxWidth:"283px"}})}}),S&&(0,i.jsx)(N.Qr,{name:"stateId",control:ee,defaultValue:Z[6].id,render:e=>{let{field:t}=e;return(0,i.jsx)(b.RG,{...t,customlabel:"LANDLORD:RFTA_FORM_LABEL_STATE",defaultValue:Z[6].id,children:Z.map(e=>(0,i.jsx)(g.Z,{value:e.id,children:e.state},e.id))})}}),C&&(0,i.jsx)(b.RG,{error:!0,errormessage:"LANDLORD:RFTA_ERROR_LOADING_STATES",disabled:!0}),(0,i.jsx)(N.Qr,{name:"zipcode",control:ee,defaultValue:"",render:e=>{var t;let{field:n}=e;return(0,i.jsx)(b._l,{autoComplete:"postal-code",variant:"outlined",customlabel:"LANDLORD:RFTA_ZIP_CODE",error:!!ea.zipcode,helperText:null===(t=ea.zipcode)||void 0===t?void 0:t.message,...n,starMark:"*",sx:{maxWidth:"283px"}})}}),(0,i.jsxs)(i.Fragment,{children:[H&&(0,i.jsx)(b.RG,{placeholder:"LANDLORD:RFTA_LOADING_STRUCTURE_TYPES",customlabel:"LANDLORD:RFTA_STRUCTURE_TYPE",defaultValue:"",disabled:!0}),$&&(0,i.jsx)(N.Qr,{name:"unitStructureTypeId",control:ee,defaultValue:K[0].id,render:e=>{var t;let{field:{onChange:n,...r}}=e;return(0,i.jsx)(b.RG,{...r,customlabel:"LANDLORD:RFTA_STRUCTURE_TYPE",defaultValue:K[0].id,error:!!ea.unitStructureTypeId,errormessage:null===(t=ea.unitStructureTypeId)||void 0===t?void 0:t.message,onChange:e=>{var t;n(e),null==J||null===(t=J.find(t=>t.id===e.target.value))||void 0===t||t.name},starMark:"*",children:K.map(e=>(0,i.jsx)(g.Z,{value:e.id,children:e.name},e.id))})}}),X&&(0,i.jsx)(b.RG,{customlabel:"LANDLORD:RFTA_STRUCTURE_TYPE",error:!0,errormessage:"LANDLORD:RFTA_ERROR_LOADING_STRUCTURE_TYPES",defaultValue:"",disabled:!0})]}),(0,i.jsx)(N.Qr,{name:"yearOfConstruction",control:ee,defaultValue:"",render:e=>{var t;let{field:n}=e;return(0,i.jsx)(b._l,{variant:"outlined",customlabel:"LANDLORD:RFTA_YEAR_CONSTRUCTED",error:!!ea.yearOfConstruction,helperText:null===(t=ea.yearOfConstruction)||void 0===t?void 0:t.message,...n,starMark:"*",
1sx:{maxWidth:"283px"}})}}),(0,i.jsx)(N.Qr,{name:"unitAreaSft",control:ee,defaultValue:"",render:e=>{var t;let{field:n}=e;return(0,i.jsx)(b._l,{variant:"outlined",customlabel:"LANDLORD:RFTA_SQUARE_FOOTAGE",error:!!ea.unitAreaSft,helperText:null===(t=ea.unitAreaSft)||void 0===t?void 0:t.message,...n,starMark:"*",sx:{maxWidth:"283px"}})}}),(0,i.jsx)(N.Qr,{name:"noOfBedRooms",control:ee,defaultValue:"",render:e=>{var t;let{field:n}=e;return(0,i.jsx)(b._l,{variant:"outlined",customlabel:"LANDLORD:RFTA_NUMBER_OF_BEDROOMS",error:!!ea.noOfBedRooms,helperText:null===(t=ea.noOfBedRooms)||void 0===t?void 0:t.message,...n,starMark:"*",sx:{maxWidth:"283px"}})}}),(0,i.jsx)(N.Qr,{name:"noOfBathRooms",control:ee,defaultValue:"",render:e=>{var t;let{field:n}=e;return(0,i.jsx)(b._l,{variant:"outlined",customlabel:"LANDLORD:RFTA_NUMBER_OF_BATHROOMS",error:!!ea.noOfBathRooms,helperText:null===(t=ea.noOfBathRooms)||void 0===t?void 0:t.message,...n,starMark:"*",sx:{maxWidth:"283px"}})}}),(h||E)&&(0,i.jsx)(I.Z,{mt:{xs:"0",mobile:"12px"},children:h&&(0,i.jsx)(b.MG,{size:"medium",onClick:()=>D.push(u.default.LANDLORD_ADD_NEW_PROPERTY.ROUTE),styletype:"Secondary",sx:E?{width:"281px",height:"56px"}:null,children:(0,i.jsx)(c.Z,{i18nKey:"LANDLORD:RFTA_ADD_NEW_PROPERTY"})})})]}),(0,i.jsx)(I.Z,{mt:2,children:G||z||B?(0,i.jsx)(I.Z,{display:"flex",justifyContent:"center",children:(0,i.jsx)(y.Z,{})}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(U.cq,{children:(0,i.jsx)(c.Z,{i18nKey:"LANDLORD:RFTA_UNIT_DETAILS_TABLE_HEADER"})}),(0,i.jsxs)(U.qn,{children:["(",(0,i.jsx)("span",{style:{color:j.r.palette.error.main},children:"*"}),")"," ",(0,i.jsx)(c.Z,{i18nKey:"COMMON:VALIDATION_MANDATORY_FIELD"})]}),(0,i.jsx)(w,{control:ee,editDefaultData:M,watch:ei})]})}),(0,i.jsxs)(W,{children:[(0,i.jsx)(b.MG,{size:"medium",styletype:"Secondary",onClick:()=>T(),children:(0,i.jsx)(c.Z,{i18nKey:"COMMON:CANCEL"})}),(0,i.jsx)(b.MG,{size:"medium",type:"submit",disabled:L,children:L?(0,i.jsx)(y.Z,{size:20}):(0,i.jsx)(c.Z,{i18nKey:"COMMON:SAVE"})})]})]})})},z=n(38382),Y=n(33483),G=e=>{let{unitId:t}=e,n=(0,p.useRouter)(),{mutate:r}=(0,d.To)(()=>{(0,m.Am)((0,i.jsx)(x.Z,{text:(0,i.jsx)(c.Z,{i18nKey:"LANDLORD:UNIT_EDIT_UNIT"})})),n.push(u.default.LANDLORD_MY_UNITS.ROUTE)}),{data:a}=(0,d.zz)(t),{data:h,isLoading:A,isSuccess:b}=(0,f.Lv)();return A||A||A?(0,i.jsx)(l.Z,{}):(0,i.jsxs)(o._U,{navigation:(0,i.jsx)(s.X,{}),children:[(0,i.jsx)(z.Z,{onClick:()=>{n.push(u.default.LANDLORD_MY_UNITS.ROUTE)}}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",fontSize:"24px",color:"#26284e",fontWeight:700,alignItems:"center"},children:(0,i.jsx)("p",{children:(0,i.jsx)(c.Z,{i18nKey:"LANDLORD:RFTA_EDIT_UNIT"})})}),(0,i.jsx)("div",{style:{margin:"1rem 0px 1rem 0px"},children:(0,i.jsx)(Y.Z,{})}),b&&(0,i.jsx)(Q,{editDefaultData:a,selectedPropertyId:null==a?void 0:a.landLordPropertiesId,properties:(null==h?void 0:h.data)||[],onSave:e=>r({unit:{...e},unitId:t}),onCancel:()=>n.push(u.default.LANDLORD_MY_UNITS.ROUTE)})]})},q=n(5724),K=n(19828),H=n(33326),X=n.n(H),$=!0,J=()=>{let e=(0,K.useRouter)(),{isLoading:t}=(0,r.v$)();(0,a.u)();let{t:n}=(0,q.Z)();return t?(0,i.jsx)(l.Z,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(X(),{children:(0,i.jsx)("title",{children:n("LANDLORD:UNIT_EDIT_HEADER")})}),(0,i.jsx)(o.Nm,{children:(0,i.jsx)(G,{unitId:e.query.id})})]})}},26662:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});let i=(e,t)=>JSON.stringify({translationKey:e,...t})}},function(e){e.O(0,[6637,8753,9912,7017,8830,8686,5262,197,608,2888,9774,179],function(){return e(e.s=79817)}),_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.