PageSourceSearch

https://portal.foxtons.co.uk/assets/index-08b7a94b.js

js foxtons.co.uk collected 2026-09-24 18:16:17 UTC 13,629 bytes, 1 lines download raw bytes

1import{bJ as de,bK as ue,j as e,c4 as me,aS as he,ax as xe,r as P,c5 as re,c6 as te,bH as ae,B as c,S as h,c8 as ne,bg as k,o as M,q as oe,aP as ie,gD as ge,aQ as l,fN as se,X as pe,c7 as fe,Y as G,D as be,b$ as ye,b1 as le,aO as je,eY as ke}from"./index-51b326a0.js";import{B as U}from"./index-100570c8.js";import T from"./index-3607604a.js";import{s as L,f as Pe}from"./styles-d563b864.js";import"./RadioGroup-2f2b0407.js";import"./FormGroup-c590a0b4.js";import"./regexes-b6d92512.js";var O={},we=ue;Object.defineProperty(O,"__esModule",{value:!0});var _=O.default=void 0,Se=we(de()),ve=e,Ce=(0,Se.default)((0,ve.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked");_=O.default=Ce;const{palette:V}=he,J={boxShadow:"none",border:`0.063rem solid ${V.secondary[600]}`,".MuiAccordionDetails-root":{padding:"1.5rem"}},Ae={accordionSummary:{padding:"1.5rem",height:"3.875rem","& .MuiAccordionSummary-content":{justifyContent:"space-between",alignItems:"center"},"& .MuiAccordionSummary-expandIconWrapper":{transition:"none !important"}},accordionWrapper:{...J,backgroundColor:V.grey[50]},accordionExpandedWrapper:{...J},label:{...me(800,"1.25rem","1.625rem"),color:V.primary.main},checkCircle:{transform:"rotate(180deg)",color:`${V.primary.main} !important`}},R=Ae;function De({label:r,children:a,defaultExpanded:o,getExpandedState:s}){const[n,u]=P.useState(!1);return P.useEffect(()=>{u(o)},[o]),e.jsxs(re,{expanded:n,onChange:(g,f)=>{u(f),s(f)},sx:n?R.accordionExpandedWrapper:R.accordionWrapper,disableGutters:!0,children:[e.jsx(te,{sx:R.accordionSummary,expandIcon:n?e.jsx(ae,{color:"primary",sx:R.checkCircle}):e.jsx(_,{sx:{color:"grey"}}),children:e.jsx(c,{children:e.jsx(h,{sx:R.label,children:r})})}),e.jsx(ne,{children:a})]})}const Q=xe.memo(De),{palette:p}=oe,i={inputBase:{display:"flex",position:"relative",flex:1,boxShadow:"none",".MuiOutlinedInput-input":{fontSize:"0.875rem",fontWeight:500,backgroundColor:p.grey[50],height:"0.94rem"}},dateBox:{marginTop:"1.5rem",gap:"0.69rem",display:"flex",maxWidth:{sm:"18.938rem",xs:"100%"},flexDirection:"column"},priceAccordion:{boxShadow:"none"},accordionSummary:{padding:0},mainContainer:{width:"100%"},checkedIcon:{transform:"rotate(180deg)"},title:{...k(800,"1.25rem","1.625rem"),color:p.primary.main},accordionDetails:{padding:0,borderLeft:`0.25rem solid ${p.lightishAqua.main}`,pl:{lg:"1.5rem",xs:"1rem"}},lettingsWrapper:{...M("flex","flex-start","flex-start"),flexDirection:{sm:"row",xs:"column"},gap:"1rem"},priceSectionWrapper:{...M("flex","center","center"),gap:"0.875rem",alignItems:"baseline"},priceText:{...k(400,"1rem","1.25rem"),color:p.grey.main??"",margin:"1.25rem 0 0.75rem 0"}
1,closeIcon:{width:"1rem",height:"1rem",cursor:"pointer"},header:{...M("flex","space-between","center"),width:"100%",padding:"1rem 0"},container:{width:{sm:"30rem",xs:"100vw"},display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",padding:{sm:"2rem",xs:"0.5rem"},height:"100%","& button":{minHeight:"3rem"}},InfoDrawerLabel:{...k(700,"1.5rem","1.875rem"),color:p.grey.main??""},InfoDrawerDescription:{...k(400,"1rem","1.25rem"),color:p.primary.main},InfoDrawerInfo:{...k(400,"1rem","1.25rem"),color:p.grey.main??"",mt:"1.5rem"},selected:{background:p.lightishAqua.main},accordion:{width:{xs:"auto",md:"19.5625rem"},height:"8.5rem",border:`0.0625rem solid ${p.secondary[600]}`,boxShadow:"none"},boldText:{...k(800,"1rem","1.25rem")},wrapper:{maxWidth:{sm:"18.938rem",xs:"100%"},width:{sm:"inherit",xs:"100%"}},priceAndPackagesDescription:{...k(400,"1rem","1.25rem"),color:p.grey.main??"",mb:"0.875rem",marginTop:"1.25rem"},priceInput:{mb:"0.75rem","& input[type=number]":{"-moz-appearance":"textfield"},"& input[type=number]::-webkit-outer-spin-button, & input[type=number]::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:0}},poundSign:{mr:"0.10rem","& p":{color:p.grey.main}},error:{color:p.bloodRed.main,...k(500,"0.75rem","1rem"),mt:"0.5rem"}},Ie={width:"100%",marginTop:"0.75rem"},E=[{label:"week",value:"W"},{label:"month",value:"M"}];function X(r){const{handleBlur:a,handleChange:o,values:s,pricePeriod:n,priceKey:u,touched:g,errors:f}=r;return e.jsxs(c,{sx:i.mainContainer,children:[e.jsx(h,{sx:i.priceText,children:"Great, what price would you like to start marketing?"}),e.jsxs(c,{sx:i.priceSectionWrapper,children:[e.jsx(ie,{onBlur:a,name:u,id:u,fullWidth:!0,placeholder:"Price",type:"number",onKeyDown:ge,onChange:o,sx:L.formTextField,autoComplete:"off",value:l(s,u),error:l(g,u)&&!!l(f,u),helperText:l(g,u)&&l(f,u),InputProps:{startAdornment:e.jsx(se,{position:"start",children:"£"})}}),e.jsxs(pe,{onBlur:a,fullWidth:!0,displayEmpty:!0,name:n,id:n,"aria-label":"tabs",MenuProps:{variant:"menu",disableScrollLock:!0},sx:L.selectField,value:l(s,n)||"",onChange:o,renderValue:m=>{var C,w;return m?(w=E.find(({value:A})=>A===m))==null?void 0:w.label:(C=E[0])==null?void 0:C.label},IconComponent:fe,children:[e.jsx(G,{disabled:!0,value:"Select",children:"Select"}),E.map(m=>e.jsx(G,{value:m.value,sx:i[".MuiMenuItem-root"],children:m.label},m.value))]})]})]})}function Re({isOpen:r,onClose:a,label:o,description:s,info:n}){return e.jsx(be,{anchor:"right",open:r,onClose:a,children:e.jsxs(c,{sx:i.container,children:[e.jsxs(c,{width:"100%",children:[e.jsxs(c,{sx:i.header,children:[e.jsxs(c,{children:[e.jsx(h,{sx:i.InfoDrawerLabel,children:o}),e.jsx(h,{sx:i.InfoDrawerDescription,children:s})]}),e.jsx(c,{onClick:a,children:e.jsx(ye,{sx:i.closeIcon})})]}),e.jsx(h,{sx:i.InfoDrawerInfo,children:n})]}),e.jsx(le,{onClick:a,fullWidth:!0,variant:"primary-dark",children:"Ok"})]})})}const{palette:F}=oe,Z={boxShadow:"none",border:`0.063rem solid ${F.secondary[600]}`,".MuiAccordionDetails-root":{padding:"1.5rem"}},$={accordionSummary:{padding:"1.5rem","& .MuiAccordionSummary-content":{justifyContent:"space-between",alignItems:"center"},height:"3.875rem"},accordionWrapper:{...Z,backgroundColor:F.grey[50]},accordionExpandedWrapper:{...Z},label:{...k(800,"1.25rem","1.625rem"),color:F.primary.main},checkCircle:{transform:"rotate(180deg)",color:`${F.primary.main} !important`}};function Te({label:r,children:a,checked:o,...s}){return e.jsxs(re,{expanded:!0,sx:$.accordionExpandedWrapper,disableGutters:!0,...s,children:[e.jsx(te,{sx:$.accordionSummary,expandIcon:o?e.jsx(ae,{color:"primary",sx:$.checkCircle}):e.jsx(_,{sx:{color:"grey"}}),children:e.jsx(c,{children:e.jsx(h,{sx:$.label,children:r})})}),e.jsx(ne,{children:a})]})}const $e=1.2,W=r=>Number((r*$e).toFixed(2)).toString(),ee=r=>Number(r.toFixed(2)).toString(),Ve=r=>r.length>1?r.map((o,s)=>{const n=ee(o.lettingsCommissionRate+o.managedCommissionRate);return s===0?`${n}% excl. VAT on first ${o.duration} months`:o.duration!==null?`${n}% excl. VAT on next ${o.duration} months`:`${n}% excl. VAT thereafter`}):[`${ee(r[0].lettingsCommissionRate+r[0].managedCommissionRate)}% excl. VAT`],Fe=r=>r.length>1?r.map((o,s)=>{const n=W(o.lettingsCommissionRate+o.managedCommissionRate);return s===0?`${n}% incl. VAT for first ${o.duration} months`:o.duration!==null?`${n}% incl. VAT for next ${o.duration} months`:`${n}% incl. VAT thereafter`}):[`${W(r[0].lettingsCommissionRate+r[0].managedCommissionRate)}% incl. VAT`],Le=r=>{const a=r[0],o=a.lettingsType==="SHO"?"You want a short tenancy (where the tenant will not use the property as their main home) where management is obligatory":a.isManaged?"You want a long term letting and want Foxtons to manage the tenancy for you":"You want a long term letting but want to manage the tenancy yourself";let s;r.length>1?s=`Foxtons would charge ${r.map((g,f)=>{const m=W(g.lettingsCommissionRate+g.managedCommissionRate);return f===0?`${m}% for the first ${g.duration} months`:g.duration!==null&&g.duration>0?`${m}% for the next ${g.duration} months`:`${m}% thereafter`}).join(", then ")}.`:s=`Foxtons would charge ${W(a.lettingsCommissionRate+a.managedCommissionRate)}%.`;const n=a.agencyStatus==="S"?"Foxtons will be the only estate agent marketing your property.":"Other estate agents will also be able to market your property.";return[o,s,n]};function qe(r){const{values:a,errors:o,touched:s,setFieldValue:n,handleChange:u,handleBlur:g,lettingsInstructionTimeslots:f}=r,[m,C]=P.useState({open:!1,infoData:{label:"",description:"",drawerDescription:"",info:"",value:""}}),[w,A]=P.useMemo(()=>r!=null&&r.isPropertyForSale||!f?[[],[]]:f.reduce((d,x)=>{const y=Ve(x).map((I,v)=>e.jsx(h,{variant:"body2",children:I},v)),j=Fe(x).map((I,v)=>e.jsx(h,{variant:"body2",children:I},v)),t=Le(x).map((I,v)=>e.jsx(h,{variant:"body2",mt:v>0?.5:0,children:I},v)),{groupName:b,lettingsType:Y}=x[0],H={label:b,description:y,drawerDescription:j,info:t,value:b};return Y==="LON"?d[0].push(H):Y==="SHO"&&d[1].push(H),d},[[],[]]),[f]),N=(d,x)=>{const y=x.find(({value:j})=>j===d);C({open:!0,infoData:y?{...y,description:y.drawerDescription}:{label:"",description:"",drawerDescription:"",info:"",value:""}})},S=l(r.values,"longLetValue"),D=l(r.values,"shortLetValue"),q=l(r.values,"commissionRates"),B=P.useCallback(d=>{var x;(x=a==null?void 0:a.commissionRates)==null||x.forEach((y,j)=>{n(`commissionRates.${j}
1.commissionRateSelected`,j===d)})},[n,a==null?void 0:a.commissionRates]),z=P.useCallback(d=>{const x=d.target.value.replace(/[^0-9.]/g,"");u({target:{name:"salesAskingPrice",value:x}})},[u]),K=r!=null&&r.isPropertyForSale&&q?q.every(d=>d.commissionRateSelected===!1):(S==""||!S)&&(D==""||!D),ce=P.useMemo(()=>{var d,x,y,j;return e.jsx(c,{sx:i.mainContainer,children:e.jsxs(je,{accordionProps:{disabled:r.disabled,onChange:r.onChangeAccordionState,expanded:r.accordionState},label:"Price And Packages",children:[(r==null?void 0:r.isPropertyForSale)&&e.jsxs(e.Fragment,{children:[e.jsx(h,{mb:"0.75rem",children:"What price would you like to start marketing your property at? *"}),e.jsx(ie,{onBlur:g,name:"salesAskingPrice",id:"salesAskingPrice",placeholder:"Asking price",type:"text",onChange:z,sx:{...L.formTextField,...i.priceInput},autoComplete:"off",value:Pe(+`${l(a,"salesAskingPrice")}`),error:!!(l(s,"salesAskingPrice")&&l(o,"salesAskingPrice")),helperText:l(s,"salesAskingPrice")&&l(o,"salesAskingPrice"),InputProps:{startAdornment:e.jsx(se,{position:"start",sx:i.poundSign,children:"£"})}}),e.jsx(c,{sx:{...i.lettingsWrapper,...(r==null?void 0:r.isPropertyForSale)&&{gap:{xs:"1rem",md:"1.5rem"}}},children:(d=a==null?void 0:a.commissionRates)==null?void 0:d.map((t,b)=>e.jsx(T,{otherProps:{},children:e.jsx(c,{sx:i.wrapper,children:e.jsx(Te,{label:t==null?void 0:t.commissionTitle,checked:t==null?void 0:t.commissionRateSelected,onChange:()=>B(b),sx:{...i.accordion,...(t==null?void 0:t.commissionRateSelected)&&i.selected},children:e.jsxs(c,{onClick:()=>B(b),pl:"0.5rem",children:[e.jsxs(h,{sx:i.boldText,children:[t==null?void 0:t.commissionRatePercentage,"% + VAT (",t==null?void 0:t.commissionRatePercentageIncVat,"% inc VAT)"]}),e.jsxs(h,{children:[t==null?void 0:t.commissionRateMinimumTerm," week minimum term"]})]})})})},t==null?void 0:t.commissionRateId))}),((x=r==null?void 0:r.errors)==null?void 0:x.commissionRates)&&((y=r==null?void 0:r.touched)==null?void 0:y.commissionRates)&&e.jsx(h,{sx:i.error,children:(j=r==null?void 0:r.errors)==null?void 0:j.commissionRates})]}),!r.isPropertyForSale&&e.jsxs(e.Fragment,{children:[e.jsx(T,{otherProps:{},children:e.jsx(h,{sx:i.priceAndPackagesDescription,children:"We can advertise your property for both long and short lets to maximize your rental opportunities."})}),e.jsxs(c,{sx:i.lettingsWrapper,children:[e.jsx(T,{otherProps:{longLetValue:S,longAskingPricePeriod:r.values.longAskingPricePeriod,longAskingPrice:r.values.longAskingPrice},children:e.jsx(c,{sx:i.wrapper,children:e.jsxs(Q,{label:"Long let",defaultExpanded:!!S,getExpandedState:t=>{var b;return t?n("longLetValue",((b=w[0])==null?void 0:b.value)||""):n("longLetValue","")},children:[e.jsx(U,{allButtons:w,onClickViewDetails:t=>N(t,w),getSelectedValue:t=>{n("longLetValue",t)},defaultValue:S}),e.jsx(X,{...r,priceKey:"longAskingPrice",pricePeriod:"longAskingPricePeriod"})]})})}),e.jsx(T,{otherProps:{shortLetValue:D,shortAskingPrice:r.values.shortAskingPrice,shortAskingPricePeriod:r.values.shortAskingPricePeriod},children:e.jsx(c,{sx:i.wrapper,children:e.jsxs(Q,{defaultExpanded:l(r.values,"shortLetValue")==="short-let",label:"Short let",getExpandedState:t=>{var b;return t?n("shortLetValue",((b=A[0])==null?void 0:b.value)||""):n("shortLetValue","")},children:[e.jsx(U,{allButtons:A,onClickViewDetails:t=>N(t,A),getSelectedValue:t=>{n("shortLetValue",t)},defaultValue:D}),e.jsx(X,{...r,priceKey:"shortAskingPrice",pricePeriod:"shortAskingPricePeriod"})]})})})]}),e.jsxs(c,{sx:i.dateBox,children:[e.jsx(h,{children:"Property available from"}),e.jsx(ke,{width:"auto",inputFormat:"dd/MM/yyyy",showToolbar:!1,value:r.values.availableFromDate||null,datePickerProps:{showDaysOutsideCurrentMonth:!1},wrapperProps:Ie,textFieldProps:{error:l(s,"availableFromDate")&&!!l(o,"availableFromDate"),helperText:l(s,"availableFromDate")&&l(o,"availableFromDate"),value:r.values.availableFromDate,InputProps:{id:"availableFromDate",sx:Object.assign(i.inputBase||{},i.inputElementProp||{},{cursor:"pointer"})}},name:"availableFromDate",setValue:n})]})]}),e.jsx(le,{disabled:K,variant:"primary",color:"primary",sx:L.continueButton,onClick:r.onContinue,children:"Continue"})]})})},[r,g,z,a,s,o,S,D,K,B,n]);return e.jsxs(e.Fragment,{children:[ce,e.jsx(Re,{isOpen:m.open,label:m.infoData.label,description:m.infoData.description,info:m.infoData.info,onClose:()=>C(d=>({...d,open:!1}))})]})}export{qe as default};

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.