????

Your IP : 216.73.216.234


Current Path : C:/inetpub/vhost/tracnghiem.gdtsolutions.vn/wwwroot/assets/
Upload File :
Current File : C:/inetpub/vhost/tracnghiem.gdtsolutions.vn/wwwroot/assets/AppAutoComplete-1159343f.js

import{b0 as Ft,b as C,aL as ct,aM as Ze,b7 as _t,_ as A,g as St,a as Pt,s as F,c as rt,u as Ct,e as Lt,j as p,f as Ce,p as n,h as $t,b8 as dt,b9 as et,ba as Ot,bb as tt,F as Rt,P as Et,l as ft,bc as Nt,aS as vt,i as Ut,bd as Vt,aB as Ht,a4 as Le,ax as ve,aD as zt,z as Wt,V as Gt,E as ht,ai as qt,aj as bt}from"./index-9bcd78a9.js";import{C as Kt}from"./Close-1f3816f8.js";import{P as Bt}from"./Popper-151dcaf9.js";import{C as jt}from"./Chip-76b2389c.js";import"./popper-578b62a7.js";import"./unsupportedProp-e368368f.js";function It(t){return typeof t.normalize<"u"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):t}function kt(t={}){const{ignoreAccents:a=!0,ignoreCase:h=!0,limit:O,matchFrom:s="any",stringify:u,trim:g=!1}=t;return(b,{inputValue:H,getOptionLabel:L})=>{let D=g?H.trim():H;h&&(D=D.toLowerCase()),a&&(D=It(D));const _=D?b.filter(te=>{let N=(u||L)(te);return h&&(N=N.toLowerCase()),a&&(N=It(N)),s==="start"?N.indexOf(D)===0:N.indexOf(D)>-1}):b;return typeof O=="number"?_.slice(0,O):_}}function gt(t,a){for(let h=0;h<t.length;h+=1)if(a(t[h]))return h;return-1}const Jt=kt(),At=5,Xt=t=>{var a;return t.current!==null&&((a=t.current.parentElement)==null?void 0:a.contains(document.activeElement))};function Yt(t){const{unstable_isActiveElementInListbox:a=Xt,unstable_classNamePrefix:h="Mui",autoComplete:O=!1,autoHighlight:s=!1,autoSelect:u=!1,blurOnSelect:g=!1,clearOnBlur:b=!t.freeSolo,clearOnEscape:H=!1,componentName:L="useAutocomplete",defaultValue:D=t.multiple?[]:null,disableClearable:_=!1,disableCloseOnSelect:te=!1,disabled:N,disabledItemsFocusable:w=!1,disableListWrap:ye=!1,filterOptions:$e=Jt,filterSelectedOptions:me=!1,freeSolo:Y=!1,getOptionDisabled:Q,getOptionLabel:Ie=r=>{var o;return(o=r.label)!=null?o:r},groupBy:ne,handleHomeEndKeys:Re=!t.freeSolo,id:ae,includeInputInList:Z=!1,inputValue:He,isOptionEqualToValue:q=(r,o)=>r===o,multiple:y=!1,onChange:xe,onClose:ie,onHighlightChange:e,onInputChange:i,onOpen:f,open:$,openOnFocus:R=!1,options:x,readOnly:U=!1,selectOnFocus:le=!t.freeSolo,value:Oe}=t,V=Ft(ae);let se=Ie;se=r=>{const o=Ie(r);if(typeof o!="string"){{const l=o===void 0?"undefined":`${typeof o} (${o})`;console.error(`MUI: The \`getOptionLabel\` method of ${L} returned ${l} instead of a string for ${JSON.stringify(r)}.`)}return String(o)}return o};const Ee=C.useRef(!1),Be=C.useRef(!0),P=C.useRef(null),K=C.useRef(null),[je,nt]=C.useState(null),[z,Ae]=C.useState(-1),ze=s?0:-1,J=C.useRef(ze),[c,We]=ct({controlled:Oe,default:D,name:L}),[T,de]=ct({controlled:He,default:"",name:L,state:"inputValue"}),[ue,Ge]=C.useState(!1),Te=C.useCallback((r,o)=>{if(!(y?c.length<o.length:o!==null)&&!b)return;let d;if(y)d="";else if(o==null)d="";else{const I=se(o);d=typeof I=="string"?I:""}T!==d&&(de(d),i&&i(r,d,"reset"))},[se,T,y,i,de,b,c]),ke=C.useRef();C.useEffect(()=>{const r=c!==ke.current;ke.current=c,!(ue&&!r)&&(Y&&!r||Te(null,c))},[c,Te,ue,ke,Y]);const[fe,qe]=ct({controlled:$,default:!1,name:L,state:"open"}),[at,Ke]=C.useState(!0),Je=!y&&c!=null&&T===se(c),W=fe&&!U,E=W?$e(x.filter(r=>!(me&&(y?c:[c]).some(o=>o!==null&&q(r,o)))),{inputValue:Je&&at?"":T,getOptionLabel:se}):[],De=fe&&E.length>0&&!U;if(c!==null&&!Y&&x.length>0){const r=(y?c:[c]).filter(o=>!x.some(l=>q(l,o)));r.length>0&&console.warn([`MUI: The value provided to ${L} is invalid.`,`None of the options match with \`${r.length>1?JSON.stringify(r):JSON.stringify(r[0])}\`.`,"You can use the `isOptionEqualToValue` prop to customize the equality test."].join(`
`))}const we=Ze(r=>{r===-1?P.current.focus():je.querySelector(`[data-tag-index="${r}"]`).focus()});C.useEffect(()=>{y&&z>c.length-1&&(Ae(-1),we(-1))},[c,y,z,we]);function Se(r,o){if(!K.current||r===-1)return-1;let l=r;for(;;){if(o==="next"&&l===E.length||o==="previous"&&l===-1)return-1;const d=K.current.querySelector(`[data-option-index="${l}"]`),I=w?!1:!d||d.disabled||d.getAttribute("aria-disabled")==="true";if(d&&!d.hasAttribute("tabindex")||I)l+=o==="next"?1:-1;else return l}}const pe=Ze(({event:r,index:o,reason:l="auto"})=>{if(J.current=o,o===-1?P.current.removeAttribute("aria-activedescendant"):P.current.setAttribute("aria-activedescendant",`${V}-option-${o}`),e&&e(r,o===-1?null:E[o],l),!K.current)return;const d=K.current.querySelector(`[role="option"].${h}-focused`);d&&(d.classList.remove(`${h}-focused`),d.classList.remove(`${h}-focusVisible`));const I=K.current.parentElement.querySelector('[role="listbox"]');if(!I)return;if(o===-1){I.scrollTop=0;return}const S=K.current.querySelector(`[data-option-index="${o}"]`);if(S&&(S.classList.add(`${h}-focused`),l==="keyboard"&&S.classList.add(`${h}-focusVisible`),I.scrollHeight>I.clientHeight&&l!=="mouse")){const j=S,G=I.clientHeight+I.scrollTop,Qe=j.offsetTop+j.offsetHeight;Qe>G?I.scrollTop=Qe-I.clientHeight:j.offsetTop-j.offsetHeight*(ne?1.3:0)<I.scrollTop&&(I.scrollTop=j.offsetTop-j.offsetHeight*(ne?1.3:0))}}),ee=Ze(({event:r,diff:o,direction:l="next",reason:d="auto"})=>{if(!W)return;const S=Se((()=>{const j=E.length-1;if(o==="reset")return ze;if(o==="start")return 0;if(o==="end")return j;const G=J.current+o;return G<0?G===-1&&Z?-1:ye&&J.current!==-1||Math.abs(o)>1?0:j:G>j?G===j+1&&Z?-1:ye||Math.abs(o)>1?j:0:G})(),l);if(pe({index:S,reason:d,event:r}),O&&o!=="reset")if(S===-1)P.current.value=T;else{const j=se(E[S]);P.current.value=j,j.toLowerCase().indexOf(T.toLowerCase())===0&&T.length>0&&P.current.setSelectionRange(T.length,j.length)}}),he=C.useCallback(()=>{if(!W)return;const r=y?c[0]:c;if(E.length===0||r==null){ee({diff:"reset"});return}if(K.current){if(r!=null){const o=E[J.current];if(y&&o&&gt(c,d=>q(o,d))!==-1)return;const l=gt(E,d=>q(d,r));l===-1?ee({diff:"reset"}):pe({index:l});return}if(J.current>=E.length-1){pe({index:E.length-1});return}pe({index:J.current})}},[E.length,y?!1:c,me,ee,pe,W,T,y]),it=Ze(r=>{_t(K,r),r&&he()});C.useEffect(()=>{(!P.current||P.current.nodeName!=="INPUT")&&(P.current&&P.current.nodeName==="TEXTAREA"?console.warn([`A textarea element was provided to ${L} where input was expected.`,"This is not a supported scenario but it may work under certain conditions.","A textarea keyboard navigation may conflict with Autocomplete controls (e.g. enter and arrow keys).","Make sure to test keyboard navigation and add custom event handlers if necessary."].join(`
`)):console.error([`MUI: Unable to find the input element. It was resolved to ${P.current} while an HTMLInputElement was expected.`,`Instead, ${L} expects an input element.`,"",L==="useAutocomplete"?"Make sure you have bound getInputProps correctly and that the normal ref/effect resolutions order is guaranteed.":"Make sure you have customized the input component correctly."].join(`
`)))},[L]),C.useEffect(()=>{he()},[he]);const ce=r=>{fe||(qe(!0),Ke(!0),f&&f(r))},oe=(r,o)=>{fe&&(qe(!1),ie&&ie(r,o))},re=(r,o,l,d)=>{if(y){if(c.length===o.length&&c.every((I,S)=>I===o[S]))return}else if(c===o)return;xe&&xe(r,o,l,d),We(o)},be=C.useRef(!1),B=(r,o,l="selectOption",d="options")=>{let I=l,S=o;if(y){S=Array.isArray(c)?c.slice():[];{const G=S.filter(Qe=>q(o,Qe));G.length>1&&console.error([`MUI: The \`isOptionEqualToValue\` method of ${L} does not handle the arguments correctly.`,`The component expects a single value to match a given option but found ${G.length} matches.`].join(`
`))}const j=gt(S,G=>q(o,G));j===-1?S.push(o):d!=="freeSolo"&&(S.splice(j,1),I="removeOption")}Te(r,S),re(r,S,I,{option:o}),!te&&(!r||!r.ctrlKey&&!r.metaKey)&&oe(r,I),(g===!0||g==="touch"&&be.current||g==="mouse"&&!be.current)&&P.current.blur()};function k(r,o){if(r===-1)return-1;let l=r;for(;;){if(o==="next"&&l===c.length||o==="previous"&&l===-1)return-1;const d=je.querySelector(`[data-tag-index="${l}"]`);if(!d||!d.hasAttribute("tabindex")||d.disabled||d.getAttribute("aria-disabled")==="true")l+=o==="next"?1:-1;else return l}}const X=(r,o)=>{if(!y)return;T===""&&oe(r,"toggleInput");let l=z;z===-1?T===""&&o==="previous"&&(l=c.length-1):(l+=o==="next"?1:-1,l<0&&(l=0),l===c.length&&(l=-1)),l=k(l,o),Ae(l),we(l)},lt=r=>{Ee.current=!0,de(""),i&&i(r,"","clear"),re(r,y?[]:null,"clear")},st=r=>o=>{if(r.onKeyDown&&r.onKeyDown(o),!o.defaultMuiPrevented&&(z!==-1&&["ArrowLeft","ArrowRight"].indexOf(o.key)===-1&&(Ae(-1),we(-1)),o.which!==229))switch(o.key){case"Home":W&&Re&&(o.preventDefault(),ee({diff:"start",direction:"next",reason:"keyboard",event:o}));break;case"End":W&&Re&&(o.preventDefault(),ee({diff:"end",direction:"previous",reason:"keyboard",event:o}));break;case"PageUp":o.preventDefault(),ee({diff:-At,direction:"previous",reason:"keyboard",event:o}),ce(o);break;case"PageDown":o.preventDefault(),ee({diff:At,direction:"next",reason:"keyboard",event:o}),ce(o);break;case"ArrowDown":o.preventDefault(),ee({diff:1,direction:"next",reason:"keyboard",event:o}),ce(o);break;case"ArrowUp":o.preventDefault(),ee({diff:-1,direction:"previous",reason:"keyboard",event:o}),ce(o);break;case"ArrowLeft":X(o,"previous");break;case"ArrowRight":X(o,"next");break;case"Enter":if(J.current!==-1&&W){const l=E[J.current],d=Q?Q(l):!1;if(o.preventDefault(),d)return;B(o,l,"selectOption"),O&&P.current.setSelectionRange(P.current.value.length,P.current.value.length)}else Y&&T!==""&&Je===!1&&(y&&o.preventDefault(),B(o,T,"createOption","freeSolo"));break;case"Escape":W?(o.preventDefault(),o.stopPropagation(),oe(o,"escape")):H&&(T!==""||y&&c.length>0)&&(o.preventDefault(),o.stopPropagation(),lt(o));break;case"Backspace":if(y&&!U&&T===""&&c.length>0){const l=z===-1?c.length-1:z,d=c.slice();d.splice(l,1),re(o,d,"removeOption",{option:c[l]})}break;case"Delete":if(y&&!U&&T===""&&c.length>0&&z!==-1){const l=z,d=c.slice();d.splice(l,1),re(o,d,"removeOption",{option:c[l]})}break}},mt=r=>{Ge(!0),R&&!Ee.current&&ce(r)},Xe=r=>{if(a(K)){P.current.focus();return}Ge(!1),Be.current=!0,Ee.current=!1,u&&J.current!==-1&&W?B(r,E[J.current],"blur"):u&&Y&&T!==""?B(r,T,"blur","freeSolo"):b&&Te(r,c),oe(r,"blur")},Ye=r=>{const o=r.target.value;T!==o&&(de(o),Ke(!1),i&&i(r,o,"input")),o===""?!_&&!y&&re(r,null,"clear"):ce(r)},Me=r=>{pe({event:r,index:Number(r.currentTarget.getAttribute("data-option-index")),reason:"mouse"})},Fe=()=>{be.current=!0},_e=r=>{const o=Number(r.currentTarget.getAttribute("data-option-index"));B(r,E[o],"selectOption"),be.current=!1},Ne=r=>o=>{const l=c.slice();l.splice(r,1),re(o,l,"removeOption",{option:c[r]})},v=r=>{fe?oe(r,"toggleInput"):ce(r)},M=r=>{r.target.getAttribute("id")!==V&&r.preventDefault()},ge=()=>{P.current.focus(),le&&Be.current&&P.current.selectionEnd-P.current.selectionStart===0&&P.current.select(),Be.current=!1},ut=r=>{(T===""||!fe)&&v(r)};let pt=Y&&T.length>0;pt=pt||(y?c.length>0:c!==null);let xt=E;if(ne){const r=new Map;let o=!1;xt=E.reduce((l,d,I)=>{const S=ne(d);return l.length>0&&l[l.length-1].group===S?l[l.length-1].options.push(d):(r.get(S)&&!o&&(console.warn(`MUI: The options provided combined with the \`groupBy\` method of ${L} returns duplicated headers.`,"You can solve the issue by sorting the options with the output of `groupBy`."),o=!0),r.set(S,!0),l.push({key:I,index:I,group:S,options:[d]})),l},[])}return N&&ue&&Xe(),{getRootProps:(r={})=>A({"aria-owns":De?`${V}-listbox`:null},r,{onKeyDown:st(r),onMouseDown:M,onClick:ge}),getInputLabelProps:()=>({id:`${V}-label`,htmlFor:V}),getInputProps:()=>({id:V,value:T,onBlur:Xe,onFocus:mt,onChange:Ye,onMouseDown:ut,"aria-activedescendant":W?"":null,"aria-autocomplete":O?"both":"list","aria-controls":De?`${V}-listbox`:void 0,"aria-expanded":De,autoComplete:"off",ref:P,autoCapitalize:"none",spellCheck:"false",role:"combobox"}),getClearProps:()=>({tabIndex:-1,onClick:lt}),getPopupIndicatorProps:()=>({tabIndex:-1,onClick:v}),getTagProps:({index:r})=>A({key:r,"data-tag-index":r,tabIndex:-1},!U&&{onDelete:Ne(r)}),getListboxProps:()=>({role:"listbox",id:`${V}-listbox`,"aria-labelledby":`${V}-label`,ref:it,onMouseDown:r=>{r.preventDefault()}}),getOptionProps:({index:r,option:o})=>{const l=(y?c:[c]).some(I=>I!=null&&q(o,I)),d=Q?Q(o):!1;return{key:se(o),tabIndex:-1,role:"option",id:`${V}-option-${r}`,onMouseOver:Me,onClick:_e,onTouchStart:Fe,"data-option-index":r,"aria-disabled":d,"aria-selected":l}},id:V,inputValue:T,value:c,dirty:pt,popupOpen:W,focused:ue||z!==-1,anchorEl:je,setAnchorEl:nt,focusedTag:z,groupedOptions:xt}}function Qt(t){return St("MuiListSubheader",t)}Pt("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const Zt=["className","color","component","disableGutters","disableSticky","inset"],eo=t=>{const{classes:a,color:h,disableGutters:O,inset:s,disableSticky:u}=t,g={root:["root",h!=="default"&&`color${rt(h)}`,!O&&"gutters",s&&"inset",!u&&"sticky"]};return $t(g,Qt,a)},to=F("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(t,a)=>{const{ownerState:h}=t;return[a.root,h.color!=="default"&&a[`color${rt(h.color)}`],!h.disableGutters&&a.gutters,h.inset&&a.inset,!h.disableSticky&&a.sticky]}})(({theme:t,ownerState:a})=>A({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(t.vars||t).palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14)},a.color==="primary"&&{color:(t.vars||t).palette.primary.main},a.color==="inherit"&&{color:"inherit"},!a.disableGutters&&{paddingLeft:16,paddingRight:16},a.inset&&{paddingLeft:72},!a.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper})),Dt=C.forwardRef(function(a,h){const O=Ct({props:a,name:"MuiListSubheader"}),{className:s,color:u="default",component:g="li",disableGutters:b=!1,disableSticky:H=!1,inset:L=!1}=O,D=Lt(O,Zt),_=A({},O,{color:u,component:g,disableGutters:b,disableSticky:H,inset:L}),te=eo(_);return p.jsx(to,A({as:g,className:Ce(te.root,s),ref:h,ownerState:_},D))});Dt.propTypes={children:n.node,classes:n.object,className:n.string,color:n.oneOf(["default","inherit","primary"]),component:n.elementType,disableGutters:n.bool,disableSticky:n.bool,inset:n.bool,sx:n.oneOfType([n.arrayOf(n.oneOfType([n.func,n.object,n.bool])),n.func,n.object])};const oo=Dt;function ro(t){return St("MuiAutocomplete",t)}const no=Pt("MuiAutocomplete",["root","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]),m=no;var Tt,wt;const ao=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],io=t=>{const{classes:a,disablePortal:h,focused:O,fullWidth:s,hasClearIcon:u,hasPopupIcon:g,inputFocused:b,popupOpen:H,size:L}=t,D={root:["root",O&&"focused",s&&"fullWidth",u&&"hasClearIcon",g&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",b&&"inputFocused"],tag:["tag",`tagSize${rt(L)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",H&&"popupIndicatorOpen"],popper:["popper",h&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return $t(D,ro,a)},lo=F("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(t,a)=>{const{ownerState:h}=t,{fullWidth:O,hasClearIcon:s,hasPopupIcon:u,inputFocused:g,size:b}=h;return[{[`& .${m.tag}`]:a.tag},{[`& .${m.tag}`]:a[`tagSize${rt(b)}`]},{[`& .${m.inputRoot}`]:a.inputRoot},{[`& .${m.input}`]:a.input},{[`& .${m.input}`]:g&&a.inputFocused},a.root,O&&a.fullWidth,u&&a.hasPopupIcon,s&&a.hasClearIcon]}})(({ownerState:t})=>A({[`&.${m.focused} .${m.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${m.clearIndicator}`]:{visibility:"visible"}}},t.fullWidth&&{width:"100%"},{[`& .${m.tag}`]:A({margin:3,maxWidth:"calc(100% - 6px)"},t.size==="small"&&{margin:2,maxWidth:"calc(100% - 4px)"}),[`& .${m.inputRoot}`]:{flexWrap:"wrap",[`.${m.hasPopupIcon}&, .${m.hasClearIcon}&`]:{paddingRight:26+4},[`.${m.hasPopupIcon}.${m.hasClearIcon}&`]:{paddingRight:52+4},[`& .${m.input}`]:{width:0,minWidth:30}},[`& .${dt.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${dt.root}.${et.sizeSmall}`]:{[`& .${dt.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Ot.root}`]:{padding:9,[`.${m.hasPopupIcon}&, .${m.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${m.hasPopupIcon}.${m.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${m.input}`]:{padding:"7.5px 4px 7.5px 6px"},[`& .${m.endAdornment}`]:{right:9}},[`& .${Ot.root}.${et.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${m.input}`]:{padding:"2.5px 4px 2.5px 6px"}},[`& .${tt.root}`]:{paddingTop:19,paddingLeft:8,[`.${m.hasPopupIcon}&, .${m.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${m.hasPopupIcon}.${m.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${tt.input}`]:{padding:"7px 4px"},[`& .${m.endAdornment}`]:{right:9}},[`& .${tt.root}.${et.sizeSmall}`]:{paddingBottom:1,[`& .${tt.input}`]:{padding:"2.5px 4px"}},[`& .${et.hiddenLabel}`]:{paddingTop:8},[`& .${m.input}`]:A({flexGrow:1,textOverflow:"ellipsis",opacity:0},t.inputFocused&&{opacity:1})})),so=F("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(t,a)=>a.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),uo=F(Rt,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(t,a)=>a.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),po=F(Rt,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:t},a)=>A({},a.popupIndicator,t.popupOpen&&a.popupIndicatorOpen)})(({ownerState:t})=>A({padding:2,marginRight:-2},t.popupOpen&&{transform:"rotate(180deg)"})),co=F(Bt,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(t,a)=>{const{ownerState:h}=t;return[{[`& .${m.option}`]:a.option},a.popper,h.disablePortal&&a.popperDisablePortal]}})(({theme:t,ownerState:a})=>A({zIndex:(t.vars||t).zIndex.modal},a.disablePortal&&{position:"absolute"})),fo=F(Et,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(t,a)=>a.paper})(({theme:t})=>A({},t.typography.body1,{overflow:"auto"})),ho=F("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(t,a)=>a.loading})(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"})),bo=F("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(t,a)=>a.noOptions})(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"})),go=F("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(t,a)=>a.listbox})(({theme:t})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${m.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[t.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${m.focused}`]:{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${m.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:ft(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${m.focused}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:ft(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},[`&.${m.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:ft(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}}})),yo=F(oo,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(t,a)=>a.groupLabel})(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,top:-8})),mo=F("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(t,a)=>a.groupUl})({padding:0,[`& .${m.option}`]:{paddingLeft:24}}),Mt=C.forwardRef(function(a,h){var O,s,u,g;const b=Ct({props:a,name:"MuiAutocomplete"}),{autoComplete:H=!1,autoHighlight:L=!1,autoSelect:D=!1,blurOnSelect:_=!1,ChipProps:te,className:N,clearIcon:w=Tt||(Tt=p.jsx(Kt,{fontSize:"small"})),clearOnBlur:ye=!b.freeSolo,clearOnEscape:$e=!1,clearText:me="Clear",closeText:Y="Close",componentsProps:Q={},defaultValue:Ie=b.multiple?[]:null,disableClearable:ne=!1,disableCloseOnSelect:Re=!1,disabled:ae=!1,disabledItemsFocusable:Z=!1,disableListWrap:He=!1,disablePortal:q=!1,filterSelectedOptions:y=!1,forcePopupIcon:xe="auto",freeSolo:ie=!1,fullWidth:e=!1,getLimitTagsText:i=v=>`+${v}`,getOptionLabel:f=v=>{var M;return(M=v.label)!=null?M:v},groupBy:$,handleHomeEndKeys:R=!b.freeSolo,includeInputInList:x=!1,limitTags:U=-1,ListboxComponent:le="ul",ListboxProps:Oe,loading:V=!1,loadingText:se="Loading…",multiple:Ee=!1,noOptionsText:Be="No options",openOnFocus:P=!1,openText:K="Open",PaperComponent:je=Et,PopperComponent:nt=Bt,popupIcon:z=wt||(wt=p.jsx(Nt,{})),readOnly:Ae=!1,renderGroup:ze,renderInput:J,renderOption:c,renderTags:We,selectOnFocus:T=!b.freeSolo,size:de="medium",slotProps:ue={}}=b,Ge=Lt(b,ao),{getRootProps:Te,getInputProps:ke,getInputLabelProps:fe,getPopupIndicatorProps:qe,getClearProps:at,getTagProps:Ke,getListboxProps:Je,getOptionProps:W,value:E,dirty:De,id:we,popupOpen:Se,focused:pe,focusedTag:ee,anchorEl:he,setAnchorEl:it,inputValue:ce,groupedOptions:oe}=Yt(A({},b,{componentName:"Autocomplete"})),re=!ne&&!ae&&De&&!Ae,be=(!ie||xe===!0)&&xe!==!1,B=A({},b,{disablePortal:q,focused:pe,fullWidth:e,hasClearIcon:re,hasPopupIcon:be,inputFocused:ee===-1,popupOpen:Se,size:de}),k=io(B);let X;if(Ee&&E.length>0){const v=M=>A({className:k.tag,disabled:ae},Ke(M));We?X=We(E,v,B):X=E.map((M,ge)=>p.jsx(jt,A({label:f(M),size:de},v({index:ge}),te)))}if(U>-1&&Array.isArray(X)){const v=X.length-U;!pe&&v>0&&(X=X.splice(0,U),X.push(p.jsx("span",{className:k.tag,children:i(v)},X.length)))}const st=ze||(v=>p.jsxs("li",{children:[p.jsx(yo,{className:k.groupLabel,ownerState:B,component:"div",children:v.group}),p.jsx(mo,{className:k.groupUl,ownerState:B,children:v.children})]},v.key)),Xe=c||((v,M)=>p.jsx("li",A({},v,{children:f(M)}))),Ye=(v,M)=>{const ge=W({option:v,index:M});return Xe(A({},ge,{className:k.option}),v,{selected:ge["aria-selected"],index:M,inputValue:ce})},Me=(O=ue.clearIndicator)!=null?O:Q.clearIndicator,Fe=(s=ue.paper)!=null?s:Q.paper,_e=(u=ue.popper)!=null?u:Q.popper,Ne=(g=ue.popupIndicator)!=null?g:Q.popupIndicator;return p.jsxs(C.Fragment,{children:[p.jsx(lo,A({ref:h,className:Ce(k.root,N),ownerState:B},Te(Ge),{children:J({id:we,disabled:ae,fullWidth:!0,size:de==="small"?"small":void 0,InputLabelProps:fe(),InputProps:A({ref:it,className:k.inputRoot,startAdornment:X},(re||be)&&{endAdornment:p.jsxs(so,{className:k.endAdornment,ownerState:B,children:[re?p.jsx(uo,A({},at(),{"aria-label":me,title:me,ownerState:B},Me,{className:Ce(k.clearIndicator,Me==null?void 0:Me.className),children:w})):null,be?p.jsx(po,A({},qe(),{disabled:ae,"aria-label":Se?Y:K,title:Se?Y:K,ownerState:B},Ne,{className:Ce(k.popupIndicator,Ne==null?void 0:Ne.className),children:z})):null]})}),inputProps:A({className:k.input,disabled:ae,readOnly:Ae},ke())})})),he?p.jsx(co,A({as:nt,disablePortal:q,style:{width:he?he.clientWidth:null},ownerState:B,role:"presentation",anchorEl:he,open:Se},_e,{className:Ce(k.popper,_e==null?void 0:_e.className),children:p.jsxs(fo,A({ownerState:B,as:je},Fe,{className:Ce(k.paper,Fe==null?void 0:Fe.className),children:[V&&oe.length===0?p.jsx(ho,{className:k.loading,ownerState:B,children:se}):null,oe.length===0&&!ie&&!V?p.jsx(bo,{className:k.noOptions,ownerState:B,role:"presentation",onMouseDown:v=>{v.preventDefault()},children:Be}):null,oe.length>0?p.jsx(go,A({as:le,className:k.listbox,ownerState:B},Je(),Oe,{children:oe.map((v,M)=>$?st({key:v.key,group:v.group,children:v.options.map((ge,ut)=>Ye(ge,v.index+ut))}):Ye(v,M))})):null]}))})):null]})});Mt.propTypes={autoComplete:n.bool,autoHighlight:n.bool,autoSelect:n.bool,blurOnSelect:n.oneOfType([n.oneOf(["mouse","touch"]),n.bool]),ChipProps:n.object,classes:n.object,className:n.string,clearIcon:n.node,clearOnBlur:n.bool,clearOnEscape:n.bool,clearText:n.string,closeText:n.string,componentsProps:n.shape({clearIndicator:n.object,paper:n.object,popper:n.object,popupIndicator:n.object}),defaultValue:vt(n.any,t=>t.multiple&&t.defaultValue!==void 0&&!Array.isArray(t.defaultValue)?new Error(["MUI: The Autocomplete expects the `defaultValue` prop to be an array when `multiple={true}` or undefined.",`However, ${t.defaultValue} was provided.`].join(`
`)):null),disableClearable:n.bool,disableCloseOnSelect:n.bool,disabled:n.bool,disabledItemsFocusable:n.bool,disableListWrap:n.bool,disablePortal:n.bool,filterOptions:n.func,filterSelectedOptions:n.bool,forcePopupIcon:n.oneOfType([n.oneOf(["auto"]),n.bool]),freeSolo:n.bool,fullWidth:n.bool,getLimitTagsText:n.func,getOptionDisabled:n.func,getOptionLabel:n.func,groupBy:n.func,handleHomeEndKeys:n.bool,id:n.string,includeInputInList:n.bool,inputValue:n.string,isOptionEqualToValue:n.func,limitTags:Ut,ListboxComponent:n.elementType,ListboxProps:n.object,loading:n.bool,loadingText:n.node,multiple:n.bool,noOptionsText:n.node,onChange:n.func,onClose:n.func,onHighlightChange:n.func,onInputChange:n.func,onOpen:n.func,open:n.bool,openOnFocus:n.bool,openText:n.string,options:n.array.isRequired,PaperComponent:n.elementType,PopperComponent:n.elementType,popupIcon:n.node,readOnly:n.bool,renderGroup:n.func,renderInput:n.func.isRequired,renderOption:n.func,renderTags:n.func,selectOnFocus:n.bool,size:n.oneOfType([n.oneOf(["small","medium"]),n.string]),slotProps:n.shape({clearIndicator:n.object,paper:n.object,popper:n.object,popupIndicator:n.object}),sx:n.oneOfType([n.arrayOf(n.oneOfType([n.func,n.object,n.bool])),n.func,n.object]),value:vt(n.any,t=>t.multiple&&t.value!==void 0&&!Array.isArray(t.value)?new Error(["MUI: The Autocomplete expects the `value` prop to be an array when `multiple={true}` or undefined.",`However, ${t.value} was provided.`].join(`
`)):null)};const Ve=Mt;var ot={},xo={get exports(){return ot},set exports(t){ot=t}};(function(t,a){var h=typeof self<"u"?self:Ht,O=function(){function u(){this.fetch=!1,this.DOMException=h.DOMException}return u.prototype=h,new u}();(function(u){(function(g){var b={searchParams:"URLSearchParams"in u,iterable:"Symbol"in u&&"iterator"in Symbol,blob:"FileReader"in u&&"Blob"in u&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in u,arrayBuffer:"ArrayBuffer"in u};function H(e){return e&&DataView.prototype.isPrototypeOf(e)}if(b.arrayBuffer)var L=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],D=ArrayBuffer.isView||function(e){return e&&L.indexOf(Object.prototype.toString.call(e))>-1};function _(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function te(e){return typeof e!="string"&&(e=String(e)),e}function N(e){var i={next:function(){var f=e.shift();return{done:f===void 0,value:f}}};return b.iterable&&(i[Symbol.iterator]=function(){return i}),i}function w(e){this.map={},e instanceof w?e.forEach(function(i,f){this.append(f,i)},this):Array.isArray(e)?e.forEach(function(i){this.append(i[0],i[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(i){this.append(i,e[i])},this)}w.prototype.append=function(e,i){e=_(e),i=te(i);var f=this.map[e];this.map[e]=f?f+", "+i:i},w.prototype.delete=function(e){delete this.map[_(e)]},w.prototype.get=function(e){return e=_(e),this.has(e)?this.map[e]:null},w.prototype.has=function(e){return this.map.hasOwnProperty(_(e))},w.prototype.set=function(e,i){this.map[_(e)]=te(i)},w.prototype.forEach=function(e,i){for(var f in this.map)this.map.hasOwnProperty(f)&&e.call(i,this.map[f],f,this)},w.prototype.keys=function(){var e=[];return this.forEach(function(i,f){e.push(f)}),N(e)},w.prototype.values=function(){var e=[];return this.forEach(function(i){e.push(i)}),N(e)},w.prototype.entries=function(){var e=[];return this.forEach(function(i,f){e.push([f,i])}),N(e)},b.iterable&&(w.prototype[Symbol.iterator]=w.prototype.entries);function ye(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function $e(e){return new Promise(function(i,f){e.onload=function(){i(e.result)},e.onerror=function(){f(e.error)}})}function me(e){var i=new FileReader,f=$e(i);return i.readAsArrayBuffer(e),f}function Y(e){var i=new FileReader,f=$e(i);return i.readAsText(e),f}function Q(e){for(var i=new Uint8Array(e),f=new Array(i.length),$=0;$<i.length;$++)f[$]=String.fromCharCode(i[$]);return f.join("")}function Ie(e){if(e.slice)return e.slice(0);var i=new Uint8Array(e.byteLength);return i.set(new Uint8Array(e)),i.buffer}function ne(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:b.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:b.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:b.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():b.arrayBuffer&&b.blob&&H(e)?(this._bodyArrayBuffer=Ie(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):b.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||D(e))?this._bodyArrayBuffer=Ie(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||(typeof e=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):b.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},b.blob&&(this.blob=function(){var e=ye(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?ye(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(me)}),this.text=function(){var e=ye(this);if(e)return e;if(this._bodyBlob)return Y(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Q(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},b.formData&&(this.formData=function(){return this.text().then(He)}),this.json=function(){return this.text().then(JSON.parse)},this}var Re=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ae(e){var i=e.toUpperCase();return Re.indexOf(i)>-1?i:e}function Z(e,i){i=i||{};var f=i.body;if(e instanceof Z){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,i.headers||(this.headers=new w(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!f&&e._bodyInit!=null&&(f=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=i.credentials||this.credentials||"same-origin",(i.headers||!this.headers)&&(this.headers=new w(i.headers)),this.method=ae(i.method||this.method||"GET"),this.mode=i.mode||this.mode||null,this.signal=i.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&f)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(f)}Z.prototype.clone=function(){return new Z(this,{body:this._bodyInit})};function He(e){var i=new FormData;return e.trim().split("&").forEach(function(f){if(f){var $=f.split("="),R=$.shift().replace(/\+/g," "),x=$.join("=").replace(/\+/g," ");i.append(decodeURIComponent(R),decodeURIComponent(x))}}),i}function q(e){var i=new w,f=e.replace(/\r?\n[\t ]+/g," ");return f.split(/\r?\n/).forEach(function($){var R=$.split(":"),x=R.shift().trim();if(x){var U=R.join(":").trim();i.append(x,U)}}),i}ne.call(Z.prototype);function y(e,i){i||(i={}),this.type="default",this.status=i.status===void 0?200:i.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in i?i.statusText:"OK",this.headers=new w(i.headers),this.url=i.url||"",this._initBody(e)}ne.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new w(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var xe=[301,302,303,307,308];y.redirect=function(e,i){if(xe.indexOf(i)===-1)throw new RangeError("Invalid status code");return new y(null,{status:i,headers:{location:e}})},g.DOMException=u.DOMException;try{new g.DOMException}catch{g.DOMException=function(i,f){this.message=i,this.name=f;var $=Error(i);this.stack=$.stack},g.DOMException.prototype=Object.create(Error.prototype),g.DOMException.prototype.constructor=g.DOMException}function ie(e,i){return new Promise(function(f,$){var R=new Z(e,i);if(R.signal&&R.signal.aborted)return $(new g.DOMException("Aborted","AbortError"));var x=new XMLHttpRequest;function U(){x.abort()}x.onload=function(){var le={status:x.status,statusText:x.statusText,headers:q(x.getAllResponseHeaders()||"")};le.url="responseURL"in x?x.responseURL:le.headers.get("X-Request-URL");var Oe="response"in x?x.response:x.responseText;f(new y(Oe,le))},x.onerror=function(){$(new TypeError("Network request failed"))},x.ontimeout=function(){$(new TypeError("Network request failed"))},x.onabort=function(){$(new g.DOMException("Aborted","AbortError"))},x.open(R.method,R.url,!0),R.credentials==="include"?x.withCredentials=!0:R.credentials==="omit"&&(x.withCredentials=!1),"responseType"in x&&b.blob&&(x.responseType="blob"),R.headers.forEach(function(le,Oe){x.setRequestHeader(Oe,le)}),R.signal&&(R.signal.addEventListener("abort",U),x.onreadystatechange=function(){x.readyState===4&&R.signal.removeEventListener("abort",U)}),x.send(typeof R._bodyInit>"u"?null:R._bodyInit)})}return ie.polyfill=!0,u.fetch||(u.fetch=ie,u.Headers=w,u.Request=Z,u.Response=y),g.Headers=w,g.Request=Z,g.Response=y,g.fetch=ie,Object.defineProperty(g,"__esModule",{value:!0}),g})({})})(O),O.fetch.ponyfill=!0,delete O.fetch.polyfill;var s=O;a=s.fetch,a.default=s.fetch,a.fetch=s.fetch,a.Headers=s.Headers,a.Request=s.Request,a.Response=s.Response,t.exports=a})(xo,ot);const Oo=Vt(ot),vo=F(Ve)(()=>({width:300}));function Io(t=0){return new Promise(a=>setTimeout(a,t))}function Ao(){const[t,a]=Le.useState(!1),[h,O]=Le.useState([]),s=t&&h.length===0;return Le.useEffect(()=>{let u=!0;if(s)return(async()=>{const g=await Oo("https://country.register.gov.uk/records.json?page-size=5000");await Io(3e3);const b=await g.json();u&&O(Object.keys(b).map(H=>b[H].item[0]))})(),()=>{u=!1}},[s]),Le.useEffect(()=>{t||O([])},[t]),p.jsx(vo,{open:t,options:h,loading:s,id:"asynchronous-demo",onOpen:()=>a(!0),onClose:()=>a(!1),getOptionLabel:u=>u.name,renderInput:u=>p.jsx(ve,{...u,fullWidth:!0,variant:"outlined",label:"Asynchronous",InputProps:{...u.InputProps,endAdornment:p.jsxs(Le.Fragment,{children:[s?p.jsx(zt,{color:"inherit",size:20}):null,u.InputProps.endAdornment]})}})})}const yt=F(Ve)(()=>({width:300,marginBottom:"16px"})),Ue=[{label:"Afghanistan"},{label:"Aland Islands"},{label:"Albania"},{label:"Algeria"},{label:"American Samoa"},{label:"Andorra"},{label:"Angola"},{label:"Anguilla"},{label:"Antarctica"},{label:"Antigua and Barbuda"},{label:"Argentina"},{label:"Armenia"},{label:"Aruba"},{label:"Australia"},{label:"Austria"},{label:"Azerbaijan"},{label:"Bahamas"},{label:"Bahrain"},{label:"Bangladesh"},{label:"Barbados"},{label:"Belarus"},{label:"Belgium"},{label:"Belize"},{label:"Benin"},{label:"Bermuda"},{label:"Bhutan"},{label:"Bolivia, Plurinational State of"},{label:"Bonaire, Sint Eustatius and Saba"},{label:"Bosnia and Herzegovina"},{label:"Botswana"},{label:"Bouvet Island"},{label:"Brazil"},{label:"British Indian Ocean Territory"},{label:"Brunei Darussalam"}],To=kt(),wo=()=>{const[t,a]=Le.useState(null),h=(s,u)=>{if(u&&u.inputValue){a({label:u.inputValue});return}a(u)},O=(s,u)=>{const g=To(s,u);return u.inputValue!==""&&g.push({inputValue:u.inputValue,label:`Add "${u.inputValue}"`}),g};return p.jsxs(C.Fragment,{children:[p.jsx(yt,{options:Ue,getOptionLabel:s=>s.label,renderInput:s=>p.jsx(ve,{...s,label:"Combo box",variant:"outlined",fullWidth:!0})}),p.jsx(yt,{value:t,options:Ue,onChange:h,filterOptions:O,getOptionLabel:s=>typeof s=="string"?s:s.inputValue?s.inputValue:s.label,renderOption:s=>s.label,style:{width:300},freeSolo:!0,renderInput:s=>p.jsx(ve,{...s,label:"Free solo with text demo",variant:"outlined",fullWidth:!0})}),p.jsx(yt,{options:Ue,getOptionLabel:s=>s.label,getOptionDisabled:s=>s===Ue[0]||s===Ue[2],renderInput:s=>p.jsx(ve,{...s,label:"Disabled option",variant:"outlined",fullWidth:!0})})]})},So=()=>{const t=Wt();return p.jsxs(Gt,{sx:{width:500,"& > * + *":{marginTop:t.spacing(3)}},children:[p.jsx(Ve,{multiple:!0,id:"tags-standard",options:Pe,getOptionLabel:a=>a.title,defaultValue:[Pe[13]],renderInput:a=>p.jsx(ve,{...a,variant:"standard",label:"Multiple values",placeholder:"Favorites",fullWidth:!0})}),p.jsx(Ve,{multiple:!0,id:"tags-outlined",options:Pe,getOptionLabel:a=>a.title,defaultValue:[Pe[13]],filterSelectedOptions:!0,renderInput:a=>p.jsx(ve,{...a,variant:"outlined",label:"filterSelectedOptions",placeholder:"Favorites",fullWidth:!0})}),p.jsx(Ve,{multiple:!0,id:"tags-filled",options:Pe.map(a=>a.title),defaultValue:[Pe[13].title],freeSolo:!0,renderTags:(a,h)=>a.map((O,s)=>p.jsx(jt,{variant:"outlined",label:O,...h({index:s})})),renderInput:a=>p.jsx(ve,{...a,variant:"filled",label:"freeSolo",placeholder:"Favorites",fullWidth:!0})})]})},Pe=[{title:"The Shawshank Redemption",year:1994},{title:"The Godfather",year:1972},{title:"The Godfather: Part II",year:1974},{title:"The Dark Knight",year:2008},{title:"12 Angry Men",year:1957},{title:"Schindler's List",year:1993},{title:"Pulp Fiction",year:1994},{title:"The Lord of the Rings: The Return of the King",year:2003},{title:"The Good, the Bad and the Ugly",year:1966},{title:"Fight Club",year:1999},{title:"The Lord of the Rings: The Fellowship of the Ring",year:2001},{title:"Star Wars: Episode V - The Empire Strikes Back",year:1980},{title:"Forrest Gump",year:1994},{title:"Inception",year:2010},{title:"The Lord of the Rings: The Two Towers",year:2002},{title:"One Flew Over the Cuckoo's Nest",year:1975},{title:"Goodfellas",year:1990},{title:"The Matrix",year:1999},{title:"Seven Samurai",year:1954},{title:"Star Wars: Episode IV - A New Hope",year:1977},{title:"City of God",year:2002},{title:"Se7en",year:1995},{title:"The Silence of the Lambs",year:1991},{title:"It's a Wonderful Life",year:1946},{title:"Life Is Beautiful",year:1997},{title:"The Usual Suspects",year:1995},{title:"Léon: The Professional",year:1994},{title:"Spirited Away",year:2001},{title:"Saving Private Ryan",year:1998},{title:"Once Upon a Time in the West",year:1968},{title:"American History X",year:1998},{title:"Interstellar",year:2014},{title:"Casablanca",year:1942},{title:"City Lights",year:1931},{title:"Psycho",year:1960},{title:"The Green Mile",year:1999},{title:"The Intouchables",year:2011},{title:"Modern Times",year:1936},{title:"Raiders of the Lost Ark",year:1981},{title:"Rear Window",year:1954},{title:"The Pianist",year:2002},{title:"The Departed",year:2006},{title:"Terminator 2: Judgment Day",year:1991},{title:"Back to the Future",year:1985},{title:"Whiplash",year:2014},{title:"Gladiator",year:2e3},{title:"Memento",year:2e3},{title:"The Prestige",year:2006},{title:"The Lion King",year:1994},{title:"Apocalypse Now",year:1979},{title:"Alien",year:1979},{title:"Sunset Boulevard",year:1950},{title:"Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb",year:1964},{title:"The Great Dictator",year:1940},{title:"Cinema Paradiso",year:1988},{title:"The Lives of Others",year:2006},{title:"Grave of the Fireflies",year:1988},{title:"Paths of Glory",year:1957},{title:"Django Unchained",year:2012},{title:"The Shining",year:1980},{title:"WALL·E",year:2008},{title:"American Beauty",year:1999},{title:"The Dark Knight Rises",year:2012},{title:"Princess Mononoke",year:1997},{title:"Aliens",year:1986},{title:"Oldboy",year:2003},{title:"Once Upon a Time in America",year:1984},{title:"Witness for the Prosecution",year:1957},{title:"Das Boot",year:1981},{title:"Citizen Kane",year:1941},{title:"North by Northwest",year:1959},{title:"Vertigo",year:1958},{title:"Star Wars: Episode VI - Return of the Jedi",year:1983},{title:"Reservoir Dogs",year:1992},{title:"Braveheart",year:1995},{title:"M",year:1931},{title:"Requiem for a Dream",year:2e3},{title:"Amélie",year:2001},{title:"A Clockwork Orange",year:1971},{title:"Like Stars on Earth",year:2007},{title:"Taxi Driver",year:1976},{title:"Lawrence of Arabia",year:1962},{title:"Double Indemnity",year:1944},{title:"Eternal Sunshine of the Spotless Mind",year:2004},{title:"Amadeus",year:1984},{title:"To Kill a Mockingbird",year:1962},{title:"Toy Story 3",year:2010},{title:"Logan",year:2017},{title:"Full Metal Jacket",year:1987},{title:"Dangal",year:2016},{title:"The Sting",year:1973},{title:"2001: A Space Odyssey",year:1968},{title:"Singin' in the Rain",year:1952},{title:"Toy Story",year:1995},{title:"Bicycle Thieves",year:1948},{title:"The Kid",year:1921},{title:"Inglourious Basterds",year:2009},{title:"Snatch",year:2e3},{title:"3 Idiots",year:2009},{title:"Monty Python and the Holy Grail",year:1975}],Po=F("div")(({theme:t})=>({margin:"30px",[t.breakpoints.down("sm")]:{margin:"16px"},"& .breadcrumb":{marginBottom:"30px",[t.breakpoints.down("sm")]:{marginBottom:"16px"}}})),jo=()=>p.jsxs(Po,{children:[p.jsx(ht,{className:"breadcrumb",children:p.jsx(qt,{routeSegments:[{name:"Material",path:"/material"},{name:"Autocomplete"}]})}),p.jsx(bt,{title:"autocomplete combo",children:p.jsx(wo,{})}),p.jsx(ht,{py:"12px"}),p.jsx(bt,{title:"Asyncronous Autocomplete",children:p.jsx(Ao,{})}),p.jsx(ht,{py:"12px"}),p.jsx(bt,{title:"Asyncronous Autocomplete",children:p.jsx(So,{})})]});export{jo as default};