{"size": 6207, "ext": "js", "max_stars_repo_path": "public/js/cljs-runtime/module$node_modules$$mui$base$node$ButtonUnstyled$useButton.js", "max_stars_repo_name": "clojure-finance/HKU-TDLEG-WeJure", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/js/cljs-runtime/module$node_modules$$mui$base$node$ButtonUnstyled$useButton.js", "max_issues_repo_name": "clojure-finance/HKU-TDLEG-WeJure", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/js/cljs-runtime/module$node_modules$$mui$base$node$ButtonUnstyled$useButton.js", "max_forks_repo_name": "clojure-finance/HKU-TDLEG-WeJure", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 443.3571428571, "max_line_length": 522, "alphanum_fraction": 0.8277750926}
shadow$provide.module$node_modules$$mui$base$node$ButtonUnstyled$useButton=function(global,require,module,exports){function _getRequireWildcardCache(nodeInterop$jscomp$0){if("function"!==typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop$jscomp$0)}global=require("module$node_modules$$babel$runtime$helpers$interopRequireDefault");Object.defineProperty(exports,
"__esModule",{value:!0});exports.default=function(props){var _ref;const {component,components={},disabled=!1,href,ref,tabIndex=0,to,type}=props,buttonRef=React.useRef(),[active,setActive]=React.useState(!1),{isFocusVisibleRef,onFocus:handleFocusVisible,onBlur:handleBlurVisible,ref:focusVisibleRef}=(0,_utils.unstable_useIsFocusVisible)(),[focusVisible,setFocusVisible]=React.useState(!1);disabled&&focusVisible&&setFocusVisible(!1);React.useEffect(()=>{isFocusVisibleRef.current=focusVisible},[focusVisible,
isFocusVisibleRef]);const createHandleMouseLeave=otherHandlers=>event=>{var _otherHandlers$onMous;focusVisible&&event.preventDefault();null==(_otherHandlers$onMous=otherHandlers.onMouseLeave)?void 0:_otherHandlers$onMous.call(otherHandlers,event)},createHandleBlur=otherHandlers=>event=>{var _otherHandlers$onBlur;handleBlurVisible(event);!1===isFocusVisibleRef.current&&setFocusVisible(!1);null==(_otherHandlers$onBlur=otherHandlers.onBlur)?void 0:_otherHandlers$onBlur.call(otherHandlers,event)},createHandleFocus=
otherHandlers=>event=>{var _otherHandlers$onFocu2;buttonRef.current||(buttonRef.current=event.currentTarget);handleFocusVisible(event);if(!0===isFocusVisibleRef.current){var _otherHandlers$onFocu;setFocusVisible(!0);null==(_otherHandlers$onFocu=otherHandlers.onFocusVisible)?void 0:_otherHandlers$onFocu.call(otherHandlers,event)}null==(_otherHandlers$onFocu2=otherHandlers.onFocus)?void 0:_otherHandlers$onFocu2.call(otherHandlers,event)},elementType=null!=(_ref=null!=component?component:components.Root)?
_ref:"button",isNonNativeButton=()=>{const button=buttonRef.current;return"button"!==elementType&&!("A"===(null==button?void 0:button.tagName)&&null!=button&&button.href)},createHandleMouseDown=otherHandlers=>event=>{var _otherHandlers$onMous2;event.target!==event.currentTarget||disabled||setActive(!0);null==(_otherHandlers$onMous2=otherHandlers.onMouseDown)?void 0:_otherHandlers$onMous2.call(otherHandlers,event)},createHandleMouseUp=otherHandlers=>event=>{var _otherHandlers$onMous3;event.target===
event.currentTarget&&setActive(!1);null==(_otherHandlers$onMous3=otherHandlers.onMouseUp)?void 0:_otherHandlers$onMous3.call(otherHandlers,event)},createHandleKeyDown=otherHandlers=>event=>{var _otherHandlers$onKeyD;event.target===event.currentTarget&&isNonNativeButton()&&" "===event.key&&event.preventDefault();event.target!==event.currentTarget||" "!==event.key||disabled||setActive(!0);null==(_otherHandlers$onKeyD=otherHandlers.onKeyDown)?void 0:_otherHandlers$onKeyD.call(otherHandlers,event);if(event.target===
event.currentTarget&&isNonNativeButton()&&"Enter"===event.key&&!disabled){var _otherHandlers$onClic;event.preventDefault();null==(_otherHandlers$onClic=otherHandlers.onClick)?void 0:_otherHandlers$onClic.call(otherHandlers,event)}},createHandleKeyUp=otherHandlers=>event=>{var _otherHandlers$onKeyU;event.target===event.currentTarget&&setActive(!1);null==(_otherHandlers$onKeyU=otherHandlers.onKeyUp)?void 0:_otherHandlers$onKeyU.call(otherHandlers,event);if(event.target===event.currentTarget&&isNonNativeButton()&&
" "===event.key&&!event.defaultPrevented){var _otherHandlers$onClic2;null==(_otherHandlers$onClic2=otherHandlers.onClick)?void 0:_otherHandlers$onClic2.call(otherHandlers,event)}};_ref=(0,_utils.unstable_useForkRef)(focusVisibleRef,buttonRef);const handleRef=(0,_utils.unstable_useForkRef)(ref,_ref),[hostElementName,setHostElementName]=React.useState(""),updateRef=instance=>{var _instance$tagName;setHostElementName(null!=(_instance$tagName=null==instance?void 0:instance.tagName)?_instance$tagName:
"");(0,_utils.unstable_setRef)(handleRef,instance)},buttonProps={};"BUTTON"===hostElementName?(buttonProps.type=null!=type?type:"button",buttonProps.disabled=disabled):""!==hostElementName&&(href||to||(buttonProps.role="button"),disabled&&(buttonProps["aria-disabled"]=disabled));return{getRootProps:otherHandlers=>{var propsEventHandlers=(0,_extractEventHandlers.default)(props);otherHandlers=(0,_extends2.default)({},propsEventHandlers,otherHandlers);propsEventHandlers={onBlur:createHandleBlur(otherHandlers),
onFocus:createHandleFocus(otherHandlers),onKeyDown:createHandleKeyDown(otherHandlers),onKeyUp:createHandleKeyUp(otherHandlers),onMouseDown:createHandleMouseDown(otherHandlers),onMouseLeave:createHandleMouseLeave(otherHandlers),onMouseUp:createHandleMouseUp(otherHandlers)};otherHandlers=(0,_extends2.default)({},otherHandlers,propsEventHandlers);delete otherHandlers.onFocusVisible;return(0,_extends2.default)({tabIndex:disabled?-1:tabIndex,type,ref:updateRef},buttonProps,otherHandlers)},focusVisible,
setFocusVisible,disabled,active}};var _extends2=global(require("module$node_modules$$babel$runtime$helpers$extends")),React=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!==typeof obj&&"function"!==typeof obj)return{default:obj};if((nodeInterop=_getRequireWildcardCache(nodeInterop))&&nodeInterop.has(obj))return nodeInterop.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor,key;for(key in obj)if("default"!==
key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj;nodeInterop&&nodeInterop.set(obj,newObj);return newObj}(require("module$node_modules$react$index")),_utils=require("module$node_modules$$mui$utils$index"),_extractEventHandlers=global(require("module$node_modules$$mui$base$node$utils$extractEventHandlers"))}
//# sourceMappingURL=module$node_modules$$mui$base$node$ButtonUnstyled$useButton.js.map
