????
Current Path : C:/inetpub/vhost/donthu.gdtsolutions.vn/api/wwwroot/assets/ |
Current File : C:/inetpub/vhost/donthu.gdtsolutions.vn/api/wwwroot/assets/Hidden-BL1wi9gE.js |
var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});import{i as PropTypes,av as getDisplayName,d as useTheme,aw as getThemeProps,f as _objectWithoutPropertiesLoose,b as reactExports,ax as useEnhancedEffect,_ as _extends,j as jsxRuntimeExports,ay as exactProp,g as generateUtilityClass,a as generateUtilityClasses,s as styled,h as clsx,c as capitalize,l as composeClasses}from"./index-D8rI6KyB.js";import{u as useMediaQuery}from"./useMediaQuery-IVKsqjW7.js";const _excluded$2=["initialWidth","width"],breakpointKeys=["xs","sm","md","lg","xl"],isWidthUp=__name((breakpoint,width,inclusive=!0)=>inclusive?breakpointKeys.indexOf(breakpoint)<=breakpointKeys.indexOf(width):breakpointKeys.indexOf(breakpoint)<breakpointKeys.indexOf(width),"isWidthUp"),isWidthDown=__name((breakpoint,width,inclusive=!1)=>inclusive?breakpointKeys.indexOf(width)<=breakpointKeys.indexOf(breakpoint):breakpointKeys.indexOf(width)<breakpointKeys.indexOf(breakpoint),"isWidthDown"),withWidth=__name((options={})=>Component=>{const{withTheme:withThemeOption=!1,noSSR=!1,initialWidth:initialWidthOption}=options;function WithWidth(props){const contextTheme=useTheme(),theme=props.theme||contextTheme,_getThemeProps=getThemeProps({theme,name:"MuiWithWidth",props}),{initialWidth,width}=_getThemeProps,other=_objectWithoutPropertiesLoose(_getThemeProps,_excluded$2),[mountedState,setMountedState]=reactExports.useState(!1);useEnhancedEffect(()=>{setMountedState(!0)},[]);const widthComputed=theme.breakpoints.keys.slice().reverse().reduce((output,key)=>{const matches=useMediaQuery(theme.breakpoints.up(key));return!output&&matches?key:output},null),more=_extends({width:width||(mountedState||noSSR?widthComputed:void 0)||initialWidth||initialWidthOption},withThemeOption?{theme}:{},other);return more.width===void 0?null:jsxRuntimeExports.jsx(Component,_extends({},more))}return __name(WithWidth,"WithWidth"),WithWidth.propTypes={initialWidth:PropTypes.oneOf(["xs","sm","md","lg","xl"]),theme:PropTypes.object,width:PropTypes.oneOf(["xs","sm","md","lg","xl"])},WithWidth.displayName=`WithWidth(${getDisplayName(Component)})`,WithWidth},"withWidth");function HiddenJs(props){const{children,only,width}=props,theme=useTheme();let visible=!0;if(only)if(Array.isArray(only))for(let i=0;i<only.length;i+=1){const breakpoint=only[i];if(width===breakpoint){visible=!1;break}}else only&&width===only&&(visible=!1);if(visible)for(let i=0;i<theme.breakpoints.keys.length;i+=1){const breakpoint=theme.breakpoints.keys[i],breakpointUp=props[`${breakpoint}Up`],breakpointDown=props[`${breakpoint}Down`];if(breakpointUp&&isWidthUp(breakpoint,width)||breakpointDown&&isWidthDown(breakpoint,width)){visible=!1;break}}return visible?jsxRuntimeExports.jsx(reactExports.Fragment,{children}):null}__name(HiddenJs,"HiddenJs");HiddenJs.propTypes={children:PropTypes.node,lgDown:PropTypes.bool,lgUp:PropTypes.bool,mdDown:PropTypes.bool,mdUp:PropTypes.bool,only:PropTypes.oneOfType([PropTypes.oneOf(["xs","sm","md","lg","xl"]),PropTypes.arrayOf(PropTypes.oneOf(["xs","sm","md","lg","xl"]))]),smDown:PropTypes.bool,smUp:PropTypes.bool,width:PropTypes.string.isRequired,xlDown:PropTypes.bool,xlUp:PropTypes.bool,xsDown:PropTypes.bool,xsUp:PropTypes.bool};HiddenJs.propTypes=exactProp(HiddenJs.propTypes);const HiddenJs$1=withWidth()(HiddenJs);function getHiddenCssUtilityClass(slot){return generateUtilityClass("PrivateHiddenCss",slot)}__name(getHiddenCssUtilityClass,"getHiddenCssUtilityClass");generateUtilityClasses("PrivateHiddenCss",["root","xlDown","xlUp","onlyXl","lgDown","lgUp","onlyLg","mdDown","mdUp","onlyMd","smDown","smUp","onlySm","xsDown","xsUp","onlyXs"]);const _excluded$1=["children","className","only"],useUtilityClasses=__name(ownerState=>{const{classes,breakpoints}=ownerState,slots={root:["root",...breakpoints.map(({breakpoint,dir})=>dir==="only"?`${dir}${capitalize(breakpoint)}`:`${breakpoint}${capitalize(dir)}`)]};return composeClasses(slots,getHiddenCssUtilityClass,classes)},"useUtilityClasses"),HiddenCssRoot=styled("div",{name:"PrivateHiddenCss",slot:"Root"})(({theme,ownerState})=>{const hidden={display:"none"};return _extends({},ownerState.breakpoints.map(({breakpoint,dir})=>dir==="only"?{[theme.breakpoints.only(breakpoint)]:hidden}:dir==="up"?{[theme.breakpoints.up(breakpoint)]:hidden}:{[theme.breakpoints.down(breakpoint)]:hidden}).reduce((r,o)=>(Object.keys(o).forEach(k=>{r[k]=o[k]}),r),{}))});function HiddenCss(props){const{children,className,only}=props,other=_objectWithoutPropertiesLoose(props,_excluded$1),theme=useTheme();{const unknownProps=Object.keys(other).filter(propName=>{const isUndeclaredBreakpoint=!theme.breakpoints.keys.some(breakpoint=>`${breakpoint}Up`===propName||`${breakpoint}Down`===propName);return!["classes","theme","isRtl","sx"].includes(propName)&&isUndeclaredBreakpoint});unknownProps.length>0&&console.error(`MUI: Unsupported props received by \`<Hidden implementation="css" />\`: ${unknownProps.join(", ")}. Did you forget to wrap this component in a ThemeProvider declaring these breakpoints?`)}const breakpoints=[];for(let i=0;i<theme.breakpoints.keys.length;i+=1){const breakpoint=theme.breakpoints.keys[i],breakpointUp=other[`${breakpoint}Up`],breakpointDown=other[`${breakpoint}Down`];breakpointUp&&breakpoints.push({breakpoint,dir:"up"}),breakpointDown&&breakpoints.push({breakpoint,dir:"down"})}only&&(Array.isArray(only)?only:[only]).forEach(breakpoint=>{breakpoints.push({breakpoint,dir:"only"})});const ownerState=_extends({},props,{breakpoints}),classes=useUtilityClasses(ownerState);return jsxRuntimeExports.jsx(HiddenCssRoot,{className:clsx(classes.root,className),ownerState,children})}__name(HiddenCss,"HiddenCss");HiddenCss.propTypes={children:PropTypes.node,className:PropTypes.string,implementation:PropTypes.oneOf(["js","css"]),lgDown:PropTypes.bool,lgUp:PropTypes.bool,mdDown:PropTypes.bool,mdUp:PropTypes.bool,only:PropTypes.oneOfType([PropTypes.oneOf(["xs","sm","md","lg","xl"]),PropTypes.arrayOf(PropTypes.oneOf(["xs","sm","md","lg","xl"]))]),smDown:PropTypes.bool,smUp:PropTypes.bool,xlDown:PropTypes.bool,xlUp:PropTypes.bool,xsDown:PropTypes.bool,xsUp:PropTypes.bool};const _excluded=["implementation","lgDown","lgUp","mdDown","mdUp","smDown","smUp","xlDown","xlUp","xsDown","xsUp"];function Hidden(props){const{implementation="js",lgDown=!1,lgUp=!1,mdDown=!1,mdUp=!1,smDown=!1,smUp=!1,xlDown=!1,xlUp=!1,xsDown=!1,xsUp=!1}=props,other=_objectWithoutPropertiesLoose(props,_excluded);return implementation==="js"?jsxRuntimeExports.jsx(HiddenJs$1,_extends({lgDown,lgUp,mdDown,mdUp,smDown,smUp,xlDown,xlUp,xsDown,xsUp},other)):jsxRuntimeExports.jsx(HiddenCss,_extends({lgDown,lgUp,mdDown,mdUp,smDown,smUp,xlDown,xlUp,xsDown,xsUp},other))}__name(Hidden,"Hidden");Hidden.propTypes={children:PropTypes.node,implementation:PropTypes.oneOf(["css","js"]),initialWidth:PropTypes.oneOf(["xs","sm","md","lg","xl"]),lgDown:PropTypes.bool,lgUp:PropTypes.bool,mdDown:PropTypes.bool,mdUp:PropTypes.bool,only:PropTypes.oneOfType([PropTypes.oneOf(["xs","sm","md","lg","xl"]),PropTypes.arrayOf(PropTypes.oneOf(["xs","sm","md","lg","xl"]).isRequired)]),smDown:PropTypes.bool,smUp:PropTypes.bool,xlDown:PropTypes.bool,xlUp:PropTypes.bool,xsDown:PropTypes.bool,xsUp:PropTypes.bool};export{Hidden as H};