PageSourceSearch

https://portal.foxtons.co.uk/assets/SwitchBase-BGugWX-M.js

js foxtons.co.uk collected 2026-10-02 03:59:17 UTC 2,679 bytes, 1 lines download raw bytes

vendor: 2,679 bytes, line 1
1import{o as e}from"./chunk-zsgVPwQN.js";import{t}from"./react-D4cBbUL-.js";import{c as n,l as r}from"./identifier-BK_nswqK.js";import{_ as i,a,g as o,o as s}from"./DefaultPropsProvider-DbThyb-J.js";import{t as c}from"./jsx-runtime-1samV3Jg.js";import{t as l}from"./useControlled-B-6ctJfC.js";import{t as u}from"./ButtonBase-CzTsqwO3.js";import{t as d}from"./useSlot-BBxtnTiO.js";import{t as f}from"./useFormControl-Yw3wQY_Y.js";function p(e){return r(`PrivateSwitchBase`,e)}n(`PrivateSwitchBase`,[`root`,`checked`,`disabled`,`input`,`edgeStart`,`edgeEnd`]);var m=e(t()),h=c(),g=e=>{let{classes:t,checked:n,disabled:r,edge:a}=e;return i({root:[`root`,n&&`checked`,r&&`disabled`,a&&`edge${o(a)}`],input:[`input`]},p,t)},_=a(u,{name:`MuiSwitchBase`})({padding:9,borderRadius:`50%`,variants:[{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e===`start`&&t.size!==`small`,style:{marginLeft:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e===`end`&&t.size!==`small`,style:{marginRight:-12}}]}),v=a(`input`,{name:`MuiSwitchBase`,shouldForwardProp:s})({cursor:`inherit`,position:`absolute`,opacity:0,width:`100%`,height:`100%`,top:0,left:0,margin:0,padding:0,zIndex:1}),y=m.forwardRef(function(e,t){let{autoFocus:n,checked:r,checkedIcon:i,defaultChecked:a,disabled:o,disableFocusRipple:s=!1,edge:c=!1,icon:u,id:p,inputProps:m,inputRef:y,name:b,onBlur:x,onChange:S,onFocus:C,readOnly:w,required:T=!1,tabIndex:E,type:D,value:O,slots:k={},slotProps:A={},...j}=e,[M,N]=l({controlled:r,default:!!a,name:`SwitchBase`,state:`checked`}),P=f(),F=e=>{C&&C(e),P&&P.onFocus&&P.onFocus(e)},I=e=>{x&&x(e),P&&P.onBlur&&P.onBlur(e)},L=e=>{if(e.nativeEvent.defaultPrevented||w)return;let t=e.target.checked;N(t),S&&S(e,t)},R=o;P&&R===void 0&&(R=P.disabled);let z=D===`checkbox`||D===`radio`,B={...e,checked:M,disabled:R,disableFocusRipple:s,edge:c},V=g(B),H={slots:k,slotProps:{input:m,...A}},[U,W]=d(`root`,{ref:t,elementType:_,className:V.root,shouldForwardComponentProp:!0,externalForwardedProps:{...H,component:`span`,...j},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),F(t)},onBlur:t=>{e.onBlur?.(t),I(t)}}),ownerState:B,additionalProps:{centerRipple:!0,focusRipple:!s,role:void 0,tabIndex:null}}),[G,K]=d(`input`,{ref:y,elementType:v,className:V.input,externalForwardedProps:H,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),L(t)}}),ownerState:B,additionalProps:{autoFocus:n,checked:r,defaultChecked:a,disabled:R,id:z?p:void 0,name:b,readOnly:w,required:T,tabIndex:E,type:D,...D===`checkbox`&&O===void 0?{}:{value:O}}});return(0,h.jsxs)(U,{...W,children:[(0,h.jsx)(G,{...K}),M?i:u]})});export{y as t};

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.