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,GACzBD,IAAsBC,IACtBD,EAAoBC,EACpBhC,EAAuBgC,EAAel5B,EAAMmB,KAAI,SAAUg4B,EAAKt2B,GAAS,MAAO,CAC3Es2B,IAAKA,EACLC,cAAev2B,GAASq2B,GAAiBr2B,IAAUs0B,EACnD,KAEZ,EACIc,OAAuBl4B,EAG3B,QAAkCA,IAA9Bs3B,EAAkB9rB,QAAuB,CACzC,IAAIqsB,GAAQ,EAAAC,EAAA,GAAUL,GACtB,GAAII,EAAO,CACP,IAAIE,EAAqBF,EAAMG,sBAAsBX,EAAkB7rB,SACvE0sB,EAAuB,WAAc,OAAOL,EAAMK,qBAAqBH,EAAqB,CAChG,CACJ,CACA,OAAO,WACCG,GACAA,IAIJe,EAAiBh5B,EAAMsJ,QACvB8tB,EAAkB7rB,aAAUxL,CAChC,CAxEA,CAyEJ,IACO,CAAEw4B,cAAeA,EAC5B,C,0BEzHA,E,UAAA,GAAW,kBAAmB,S","sources":["../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/ButtonGrid/ButtonGrid.base.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/ButtonGrid/ButtonGrid.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/ButtonGrid/ButtonGrid.styles.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/ButtonGrid/ButtonGridCell.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/DraggableZone/DraggableZone.styles.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/DraggableZone/DraggableZone.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/MenuContext/MenuContext.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/ThemeProvider/ThemeContext.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/ThemeProvider/useTheme.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/ThemeProvider/styleRenderers/mergeStylesRenderer.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/ThemeProvider/makeStyles.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/ThemeProvider/useThemeProviderClasses.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/ThemeProvider/renderThemeProvider.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/ThemeProvider/useThemeProviderState.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/ThemeProvider/ThemeProvider.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/ThemeProvider/useThemeProvider.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/_rgbaOrHexString.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/clamp.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/consts.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/correctHex.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/correctRGB.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/cssColor.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/getColorFromRGBA.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/getColorFromString.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/getFullColorString.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/hsl2hsv.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/hsl2rgb.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/hsv2hex.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/hsv2hsl.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/hsv2rgb.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/getColorFromHSV.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/updateRGB.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/correctHSV.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/rgb2hex.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/rgb2hsv.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/shades.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/updateA.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/updateH.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/updateSV.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/color/updateT.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/contextualMenu/contextualMenuUtility.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/decorators/BaseDecorator.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/decorators/withResponsiveMode.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/decorators/withViewport.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/dragdrop/DragDropHelper.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/groupedList/GroupedListUtility.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/hooks/useResponsiveMode.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/keytips/IKeytipTransitionKey.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/keytips/KeytipConstants.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/keytips/KeytipManager.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/keytips/KeytipUtils.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/keytips/KeytipConfig.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/positioning/positioning.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/positioning/positioning.types.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/selectableOption/SelectableOption.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/selectableOption/SelectableOption.types.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/selection/SelectionZone.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/useOverflow.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/utilities/observeResize.js","../../../../node_modules/.pnpm/@fluentui+react@8.48.0_react-dom@17.0.1_react@17.0.1__react@17.0.1/node_modules/@fluentui/react/lib/version.js"],"sourcesContent":["import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { toMatrix, classNamesFunction, getNativeProps, htmlElementProperties } from '../../Utilities';\nimport { FocusZone } from '../../FocusZone';\nimport { useId } from '@fluentui/react-hooks';\nvar getClassNames = classNamesFunction();\nexport var ButtonGridBase = React.forwardRef(function (props, forwardedRef) {\n var id = useId(undefined, props.id);\n var items = props.items, columnCount = props.columnCount, onRenderItem = props.onRenderItem, \n // eslint-disable-next-line deprecation/deprecation\n _a = props.ariaPosInSet, \n // eslint-disable-next-line deprecation/deprecation\n ariaPosInSet = _a === void 0 ? props.positionInSet : _a, \n // eslint-disable-next-line deprecation/deprecation\n _b = props.ariaSetSize, \n // eslint-disable-next-line deprecation/deprecation\n ariaSetSize = _b === void 0 ? props.setSize : _b, styles = props.styles, doNotContainWithinFocusZone = props.doNotContainWithinFocusZone;\n var htmlProps = getNativeProps(props, htmlElementProperties, \n // avoid applying onBlur on the table if it's being used in the FocusZone\n doNotContainWithinFocusZone ? [] : ['onBlur']);\n var classNames = getClassNames(styles, { theme: props.theme });\n // Array to store the cells in the correct row index\n var rowsOfItems = toMatrix(items, columnCount);\n var content = (React.createElement(\"table\", __assign({ \"aria-posinset\": ariaPosInSet, \"aria-setsize\": ariaSetSize, id: id, role: \"grid\" }, htmlProps, { className: classNames.root }),\n React.createElement(\"tbody\", null, rowsOfItems.map(function (rows, rowIndex) {\n return (React.createElement(\"tr\", { role: 'row', key: rowIndex }, rows.map(function (cell, cellIndex) {\n return (React.createElement(\"td\", { role: \"presentation\", key: cellIndex + '-cell', className: classNames.tableCell }, onRenderItem(cell, cellIndex)));\n })));\n }))));\n return doNotContainWithinFocusZone ? (content) : (React.createElement(FocusZone, { elementRef: forwardedRef, isCircularNavigation: props.shouldFocusCircularNavigate, className: classNames.focusedContainer, onBlur: props.onBlur }, content));\n});\n//# sourceMappingURL=ButtonGrid.base.js.map","import { styled } from '../../Utilities';\nimport { ButtonGridBase } from './ButtonGrid.base';\nimport { getStyles } from './ButtonGrid.styles';\nexport var ButtonGrid = styled(ButtonGridBase, getStyles);\nButtonGrid.displayName = 'ButtonGrid';\n//# sourceMappingURL=ButtonGrid.js.map","export var getStyles = function (props) {\n return {\n root: {\n padding: 2,\n outline: 'none',\n },\n tableCell: {\n padding: 0,\n },\n };\n};\n//# sourceMappingURL=ButtonGrid.styles.js.map","import * as React from 'react';\nimport { css } from '../../Utilities';\nimport { CommandButton } from '../../Button';\nimport { useId } from '@fluentui/react-hooks';\nexport var ButtonGridCell = function (props) {\n var _a;\n var defaultId = useId('gridCell');\n var item = props.item, _b = props.id, id = _b === void 0 ? defaultId : _b, className = props.className, role = props.role, selected = props.selected, _c = props.disabled, disabled = _c === void 0 ? false : _c, onRenderItem = props.onRenderItem, cellDisabledStyle = props.cellDisabledStyle, cellIsSelectedStyle = props.cellIsSelectedStyle, index = props.index, label = props.label, getClassNames = props.getClassNames, onClick = props.onClick, onHover = props.onHover, onMouseMove = props.onMouseMove, onMouseLeave = props.onMouseLeave, onMouseEnter = props.onMouseEnter, onFocus = props.onFocus;\n var handleClick = React.useCallback(function () {\n if (onClick && !disabled) {\n onClick(item);\n }\n }, [disabled, item, onClick]);\n var handleMouseEnter = React.useCallback(function (ev) {\n var didUpdateOnEnter = onMouseEnter && onMouseEnter(ev);\n if (!didUpdateOnEnter && onHover && !disabled) {\n onHover(item);\n }\n }, [disabled, item, onHover, onMouseEnter]);\n var handleMouseMove = React.useCallback(function (ev) {\n var didUpdateOnMove = onMouseMove && onMouseMove(ev);\n if (!didUpdateOnMove && onHover && !disabled) {\n onHover(item);\n }\n }, [disabled, item, onHover, onMouseMove]);\n var handleMouseLeave = React.useCallback(function (ev) {\n var didUpdateOnLeave = onMouseLeave && onMouseLeave(ev);\n if (!didUpdateOnLeave && onHover && !disabled) {\n onHover();\n }\n }, [disabled, onHover, onMouseLeave]);\n var handleFocus = React.useCallback(function () {\n if (onFocus && !disabled) {\n onFocus(item);\n }\n }, [disabled, item, onFocus]);\n return (React.createElement(CommandButton, { id: id, \"data-index\": index, \"data-is-focusable\": true, disabled: disabled, className: css(className, (_a = {},\n _a['' + cellIsSelectedStyle] = selected,\n _a['' + cellDisabledStyle] = disabled,\n _a)), onClick: handleClick, onMouseEnter: handleMouseEnter, onMouseMove: handleMouseMove, onMouseLeave: handleMouseLeave, onFocus: handleFocus, role: role, \"aria-selected\": selected, ariaLabel: label, title: label, getClassNames: getClassNames }, onRenderItem(item)));\n};\n//# sourceMappingURL=ButtonGridCell.js.map","import { memoizeFunction } from '../../Utilities';\nimport { mergeStyles } from '../../Styling';\nexport var getClassNames = memoizeFunction(function (className, isDragging) {\n return {\n root: mergeStyles(className, isDragging && {\n touchAction: 'none',\n selectors: {\n '& *': {\n userSelect: 'none',\n },\n },\n }),\n };\n});\n//# sourceMappingURL=DraggableZone.styles.js.map","import { __assign, __extends } from \"tslib\";\nimport * as React from 'react';\nimport { getClassNames } from './DraggableZone.styles';\nimport { on } from '../../Utilities';\nvar eventMapping = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend',\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup',\n },\n};\nvar DraggableZone = /** @class */ (function (_super) {\n __extends(DraggableZone, _super);\n function DraggableZone(props) {\n var _this = _super.call(this, props) || this;\n _this._currentEventType = eventMapping.mouse;\n _this._events = [];\n _this._onMouseDown = function (event) {\n var onMouseDown = React.Children.only(_this.props.children).props.onMouseDown;\n if (onMouseDown) {\n onMouseDown(event);\n }\n _this._currentEventType = eventMapping.mouse;\n return _this._onDragStart(event);\n };\n _this._onMouseUp = function (event) {\n var onMouseUp = React.Children.only(_this.props.children).props.onMouseUp;\n if (onMouseUp) {\n onMouseUp(event);\n }\n _this._currentEventType = eventMapping.mouse;\n return _this._onDragStop(event);\n };\n _this._onTouchStart = function (event) {\n var onTouchStart = React.Children.only(_this.props.children).props.onTouchStart;\n if (onTouchStart) {\n onTouchStart(event);\n }\n _this._currentEventType = eventMapping.touch;\n return _this._onDragStart(event);\n };\n _this._onTouchEnd = function (event) {\n var onTouchEnd = React.Children.only(_this.props.children).props.onTouchEnd;\n if (onTouchEnd) {\n onTouchEnd(event);\n }\n _this._currentEventType = eventMapping.touch;\n _this._onDragStop(event);\n };\n _this._onDragStart = function (event) {\n // Only handle left click for dragging\n if (typeof event.button === 'number' && event.button !== 0) {\n return false;\n }\n // If the target doesn't match the handleSelector OR\n // if the target does match the preventDragSelector, bail out\n if ((_this.props.handleSelector && !_this._matchesSelector(event.target, _this.props.handleSelector)) ||\n (_this.props.preventDragSelector &&\n _this._matchesSelector(event.target, _this.props.preventDragSelector))) {\n return;\n }\n // Remember the touch identifier if this is a touch event so we can\n // distinguish between individual touches in multitouch scenarios\n // by remembering which touch point we were given\n _this._touchId = _this._getTouchId(event);\n var position = _this._getControlPosition(event);\n if (position === undefined) {\n return;\n }\n var dragData = _this._createDragDataFromPosition(position);\n _this.props.onStart && _this.props.onStart(event, dragData);\n _this.setState({\n isDragging: true,\n lastPosition: position,\n });\n // hook up the appropriate mouse/touch events to the body to ensure\n // smooth dragging\n _this._events = [\n on(document.body, _this._currentEventType.move, _this._onDrag, true /* use capture phase */),\n on(document.body, _this._currentEventType.stop, _this._onDragStop, true /* use capture phase */),\n ];\n };\n _this._onDrag = function (event) {\n // Prevent scrolling on mobile devices\n if (event.type === 'touchmove') {\n event.preventDefault();\n }\n var position = _this._getControlPosition(event);\n if (!position) {\n return;\n }\n // create the updated drag data from the position data\n var updatedData = _this._createUpdatedDragData(_this._createDragDataFromPosition(position));\n var updatedPosition = updatedData.position;\n _this.props.onDragChange && _this.props.onDragChange(event, updatedData);\n _this.setState({\n position: updatedPosition,\n lastPosition: position,\n });\n };\n _this._onDragStop = function (event) {\n if (!_this.state.isDragging) {\n return;\n }\n var position = _this._getControlPosition(event);\n if (!position) {\n return;\n }\n var baseDragData = _this._createDragDataFromPosition(position);\n // Set dragging to false and reset the lastPosition\n _this.setState({\n isDragging: false,\n lastPosition: undefined,\n });\n _this.props.onStop && _this.props.onStop(event, baseDragData);\n if (_this.props.position) {\n _this.setState({\n position: _this.props.position,\n });\n }\n // Remove event handlers\n _this._events.forEach(function (dispose) { return dispose(); });\n };\n _this.state = {\n isDragging: false,\n position: _this.props.position || { x: 0, y: 0 },\n lastPosition: undefined,\n };\n return _this;\n }\n DraggableZone.prototype.componentDidUpdate = function (prevProps) {\n if (this.props.position && (!prevProps.position || this.props.position !== prevProps.position)) {\n this.setState({ position: this.props.position });\n }\n };\n DraggableZone.prototype.componentWillUnmount = function () {\n this._events.forEach(function (dispose) { return dispose(); });\n };\n DraggableZone.prototype.render = function () {\n var child = React.Children.only(this.props.children);\n var props = child.props;\n var position = this.props.position;\n var _a = this.state, statePosition = _a.position, isDragging = _a.isDragging;\n var x = statePosition.x;\n var y = statePosition.y;\n if (position && !isDragging) {\n x = position.x;\n y = position.y;\n }\n return React.cloneElement(child, {\n style: __assign(__assign({}, props.style), { transform: \"translate(\" + x + \"px, \" + y + \"px)\" }),\n className: getClassNames(props.className, this.state.isDragging).root,\n onMouseDown: this._onMouseDown,\n onMouseUp: this._onMouseUp,\n onTouchStart: this._onTouchStart,\n onTouchEnd: this._onTouchEnd,\n });\n };\n /**\n * Get the control position based off the event that fired\n * @param event - The event to get offsets from\n */\n DraggableZone.prototype._getControlPosition = function (event) {\n var touchObj = this._getActiveTouch(event);\n // did we get the right touch?\n if (this._touchId !== undefined && !touchObj) {\n return undefined;\n }\n var eventToGetOffset = touchObj || event;\n return {\n x: eventToGetOffset.clientX,\n y: eventToGetOffset.clientY,\n };\n };\n /**\n * Get the active touch point that we have saved from the event's TouchList\n * @param event - The event used to get the TouchList for the active touch point\n */\n DraggableZone.prototype._getActiveTouch = function (event) {\n return ((event.targetTouches && this._findTouchInTouchList(event.targetTouches)) ||\n (event.changedTouches && this._findTouchInTouchList(event.changedTouches)));\n };\n /**\n * Get the initial touch identifier associated with the given event\n * @param event - The event that contains the TouchList\n */\n DraggableZone.prototype._getTouchId = function (event) {\n var touch = (event.targetTouches && event.targetTouches[0]) || (event.changedTouches && event.changedTouches[0]);\n if (touch) {\n return touch.identifier;\n }\n };\n /**\n * Returns if an element (or any of the element's parents) match the given selector\n */\n DraggableZone.prototype._matchesSelector = function (element, selector) {\n if (!element || element === document.body) {\n return false;\n }\n var matchesSelectorFn = element.matches || element.webkitMatchesSelector || element.msMatchesSelector; /* for IE */\n if (!matchesSelectorFn) {\n return false;\n }\n return matchesSelectorFn.call(element, selector) || this._matchesSelector(element.parentElement, selector);\n };\n /**\n * Attempts to find the Touch that matches the identifier we stored in dragStart\n * @param touchList The TouchList to look for the stored identifier from dragStart\n */\n DraggableZone.prototype._findTouchInTouchList = function (touchList) {\n if (this._touchId === undefined) {\n return;\n }\n for (var i = 0; i < touchList.length; i++) {\n if (touchList[i].identifier === this._touchId) {\n return touchList[i];\n }\n }\n return undefined;\n };\n /**\n * Create DragData based off of the last known position and the new position passed in\n * @param position The new position as part of the drag\n */\n DraggableZone.prototype._createDragDataFromPosition = function (position) {\n var lastPosition = this.state.lastPosition;\n // If we have no lastPosition, use the given position\n // for last position\n if (lastPosition === undefined) {\n return {\n delta: { x: 0, y: 0 },\n lastPosition: position,\n position: position,\n };\n }\n return {\n delta: {\n x: position.x - lastPosition.x,\n y: position.y - lastPosition.y,\n },\n lastPosition: lastPosition,\n position: position,\n };\n };\n /**\n * Creates an updated DragData based off the current position and given baseDragData\n * @param baseDragData The base DragData (from _createDragDataFromPosition) used to calculate the updated positions\n */\n DraggableZone.prototype._createUpdatedDragData = function (baseDragData) {\n var position = this.state.position;\n return {\n position: {\n x: position.x + baseDragData.delta.x,\n y: position.y + baseDragData.delta.y,\n },\n delta: baseDragData.delta,\n lastPosition: position,\n };\n };\n return DraggableZone;\n}(React.Component));\nexport { DraggableZone };\n//# sourceMappingURL=DraggableZone.js.map","import * as React from 'react';\nexport var MenuContext = React.createContext({});\nexport var useMenuContext = function () {\n return React.useContext(MenuContext);\n};\n//# sourceMappingURL=MenuContext.js.map","import * as React from 'react';\nexport var ThemeContext = React.createContext(undefined);\n//# sourceMappingURL=ThemeContext.js.map","import { useContext } from 'react';\nimport { useCustomizationSettings } from '@fluentui/utilities';\nimport { createTheme } from '@fluentui/theme';\nimport { ThemeContext } from './ThemeContext';\n/**\n * Get theme from CustomizerContext or Customizations singleton.\n */\nfunction useCompatTheme() {\n return useCustomizationSettings(['theme']).theme;\n}\n/**\n * React hook for programmatically accessing the theme.\n */\nexport var useTheme = function () {\n var theme = useContext(ThemeContext);\n var legacyTheme = useCompatTheme();\n return theme || legacyTheme || createTheme({});\n};\n//# sourceMappingURL=useTheme.js.map","import { Stylesheet, mergeCssSets, fontFace as mergeFontFace, keyframes as mergeKeyframes, } from '@fluentui/merge-styles';\nvar _seed = 0;\nexport var mergeStylesRenderer = {\n reset: function () {\n // If the stylesheet reset call is made, invalidate the cache keys.\n Stylesheet.getInstance().onReset(function () { return _seed++; });\n },\n getId: function () { return _seed; },\n renderStyles: function (styleSet, options) {\n return mergeCssSets((Array.isArray(styleSet) ? styleSet : [styleSet]), options);\n },\n renderFontFace: function (fontFace, options) {\n return mergeFontFace(fontFace);\n },\n renderKeyframes: function (keyframes) {\n return mergeKeyframes(keyframes);\n },\n};\n//# sourceMappingURL=mergeStylesRenderer.js.map","import { useTheme } from './useTheme';\nimport { useWindow } from '@fluentui/react-window-provider';\nimport { mergeStylesRenderer } from './styleRenderers/mergeStylesRenderer';\nvar graphGet = function (graphNode, path) {\n for (var _i = 0, path_1 = path; _i < path_1.length; _i++) {\n var key = path_1[_i];\n graphNode = graphNode.get(key);\n if (!graphNode) {\n return;\n }\n }\n return graphNode;\n};\nvar graphSet = function (graphNode, path, value) {\n for (var i = 0; i < path.length - 1; i++) {\n var key = path[i];\n var current = graphNode.get(key);\n if (!current) {\n current = new Map();\n graphNode.set(key, current);\n }\n graphNode = current;\n }\n graphNode.set(path[path.length - 1], value);\n};\n/**\n * Registers a css object, optionally as a function of the theme.\n *\n * @param styleOrFunction - Either a css javascript object, or a function which takes in `ITheme`\n * and returns a css javascript object.\n *\n * @deprecated Use `mergeStyles` instead for v8 related code. We will be using a new implementation of `makeStyles` in\n * future versions of the library.\n */\nexport function makeStyles(styleOrFunction) {\n // Create graph of inputs to map to output.\n var graph = new Map();\n // eslint-disable-next-line deprecation/deprecation\n return function (options) {\n if (options === void 0) { options = {}; }\n var theme = options.theme;\n var win = useWindow();\n var contextualTheme = useTheme();\n theme = theme || contextualTheme;\n var renderer = mergeStylesRenderer;\n var id = renderer.getId();\n var isStyleFunction = typeof styleOrFunction === 'function';\n var path = isStyleFunction ? [id, win, theme] : [id, win];\n var value = graphGet(graph, path);\n if (!value) {\n var styles = isStyleFunction ? styleOrFunction(theme) : styleOrFunction;\n value = mergeStylesRenderer.renderStyles(styles, { targetWindow: win, rtl: !!theme.rtl });\n graphSet(graph, path, value);\n }\n return value;\n };\n}\n//# sourceMappingURL=makeStyles.js.map","import * as React from 'react';\nimport { css } from '@fluentui/utilities';\nimport { useDocument } from '@fluentui/react-window-provider';\nimport { makeStyles } from './makeStyles';\n// eslint-disable-next-line deprecation/deprecation\nvar useThemeProviderStyles = makeStyles(function (theme) {\n var semanticColors = theme.semanticColors, fonts = theme.fonts;\n return {\n body: [\n {\n color: semanticColors.bodyText,\n background: semanticColors.bodyBackground,\n fontFamily: fonts.medium.fontFamily,\n fontWeight: fonts.medium.fontWeight,\n fontSize: fonts.medium.fontSize,\n MozOsxFontSmoothing: fonts.medium.MozOsxFontSmoothing,\n WebkitFontSmoothing: fonts.medium.WebkitFontSmoothing,\n },\n ],\n };\n});\n/**\n * Hook to add class to body element.\n */\nfunction useApplyClassToBody(state, classesToApply) {\n var _a;\n var applyTo = state.applyTo;\n var applyToBody = applyTo === 'body';\n var body = (_a = useDocument()) === null || _a === void 0 ? void 0 : _a.body;\n React.useEffect(function () {\n if (!applyToBody || !body) {\n return;\n }\n for (var _i = 0, classesToApply_1 = classesToApply; _i < classesToApply_1.length; _i++) {\n var classToApply = classesToApply_1[_i];\n if (classToApply) {\n body.classList.add(classToApply);\n }\n }\n return function () {\n if (!applyToBody || !body) {\n return;\n }\n for (var _i = 0, classesToApply_2 = classesToApply; _i < classesToApply_2.length; _i++) {\n var classToApply = classesToApply_2[_i];\n if (classToApply) {\n body.classList.remove(classToApply);\n }\n }\n };\n }, [applyToBody, body, classesToApply]);\n}\nexport function useThemeProviderClasses(state) {\n var classes = useThemeProviderStyles(state);\n var className = state.className, applyTo = state.applyTo;\n useApplyClassToBody(state, [classes.root, classes.body]);\n state.className = css(className, classes.root, applyTo === 'element' && classes.body);\n}\n//# sourceMappingURL=useThemeProviderClasses.js.map","import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { CustomizerContext, getNativeElementProps, omit } from '@fluentui/utilities';\nimport { ThemeContext } from './ThemeContext';\nexport var renderThemeProvider = function (state) {\n var theme = state.theme, customizerContext = state.customizerContext;\n var Root = state.as || 'div';\n var rootProps = typeof state.as === 'string' ? getNativeElementProps(state.as, state) : omit(state, ['as']);\n return (React.createElement(ThemeContext.Provider, { value: theme },\n React.createElement(CustomizerContext.Provider, { value: customizerContext },\n React.createElement(Root, __assign({}, rootProps)))));\n};\n//# sourceMappingURL=renderThemeProvider.js.map","import { mergeThemes } from '@fluentui/theme';\nimport * as React from 'react';\nimport { useTheme } from './useTheme';\nimport { getId } from '@fluentui/utilities';\nvar themeToIdMap = new Map();\nvar getThemeId = function () {\n var themes = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n themes[_i] = arguments[_i];\n }\n var ids = [];\n for (var _a = 0, themes_1 = themes; _a < themes_1.length; _a++) {\n var theme = themes_1[_a];\n if (theme) {\n var id = theme.id || themeToIdMap.get(theme);\n if (!id) {\n id = getId('');\n themeToIdMap.set(theme, id);\n }\n ids.push(id);\n }\n }\n return ids.join('-');\n};\nexport var useThemeProviderState = function (draftState) {\n var userTheme = draftState.theme;\n // Pull contextual theme.\n var parentTheme = useTheme();\n // Update the incoming theme with a memoized version of the merged theme.\n var theme = (draftState.theme = React.useMemo(function () {\n var mergedTheme = mergeThemes(parentTheme, userTheme);\n mergedTheme.id = getThemeId(parentTheme, userTheme);\n return mergedTheme;\n }, [parentTheme, userTheme]));\n draftState.customizerContext = React.useMemo(function () { return ({\n customizations: {\n inCustomizerContext: true,\n settings: { theme: theme },\n scopedSettings: theme.components || {},\n },\n }); }, [theme]);\n if (draftState.theme.rtl !== parentTheme.rtl) {\n draftState.dir = draftState.theme.rtl ? 'rtl' : 'ltr';\n }\n};\n//# sourceMappingURL=useThemeProviderState.js.map","import * as React from 'react';\nimport { useThemeProviderClasses } from './useThemeProviderClasses';\nimport { useThemeProvider } from './useThemeProvider';\nimport { useFocusRects } from '@fluentui/utilities';\nimport { useMergedRefs } from '@fluentui/react-hooks';\n/**\n * ThemeProvider, used for providing css variables and registering stylesheets.\n */\nexport var ThemeProvider = React.forwardRef(function (props, ref) {\n var rootRef = useMergedRefs(ref, React.useRef(null));\n var _a = useThemeProvider(props, {\n ref: rootRef,\n as: 'div',\n applyTo: 'element',\n }), render = _a.render, state = _a.state;\n // Render styles.\n useThemeProviderClasses(state);\n // Apply focus rect class on key presses.\n useFocusRects(state.ref);\n // Return the rendered content.\n return render(state);\n});\nThemeProvider.displayName = 'ThemeProvider';\n//# sourceMappingURL=ThemeProvider.js.map","import { renderThemeProvider as render } from './renderThemeProvider';\nimport { useThemeProviderState } from './useThemeProviderState';\nimport { getPropsWithDefaults } from '@fluentui/utilities';\n/**\n * Returns the ThemeProvider render function and calculated state, given user input, ref, and\n * a set of default prop values.\n */\nexport var useThemeProvider = function (props, defaultProps) {\n var state = getPropsWithDefaults(defaultProps, props);\n // Apply changes to state.\n useThemeProviderState(state);\n return {\n state: state,\n render: render,\n };\n};\n//# sourceMappingURL=useThemeProvider.js.map","import { MAX_COLOR_ALPHA } from './consts';\n/**\n * @internal\n * Get a CSS color string from some color components.\n * If `a` is specified and not 100, returns an `rgba()` string.\n * Otherwise returns `hex` prefixed with #.\n */\nexport function _rgbaOrHexString(r, g, b, a, hex) {\n return a === MAX_COLOR_ALPHA || typeof a !== 'number' ? \"#\" + hex : \"rgba(\" + r + \", \" + g + \", \" + b + \", \" + a / MAX_COLOR_ALPHA + \")\";\n}\n//# sourceMappingURL=_rgbaOrHexString.js.map","/** Clamp a value to ensure it falls within a given range. */\nexport function clamp(value, max, min) {\n if (min === void 0) { min = 0; }\n return value < min ? min : value > max ? max : value;\n}\n//# sourceMappingURL=clamp.js.map","export var MAX_COLOR_SATURATION = 100;\nexport var MAX_COLOR_HUE = 359;\nexport var MAX_COLOR_VALUE = 100;\nexport var MAX_COLOR_RGB = 255;\n/** @deprecated Use MAX_COLOR_RGB (255) or MAX_COLOR_ALPHA (100) */\nexport var MAX_COLOR_RGBA = MAX_COLOR_RGB;\nexport var MAX_COLOR_ALPHA = 100;\n/** Minimum length for a hexadecimal color string (not including the #) */\nexport var MIN_HEX_LENGTH = 3;\n/** Maximum length for a hexadecimal color string (not including the #) */\nexport var MAX_HEX_LENGTH = 6;\n/** Minimum length for a string of an RGBA color component */\nexport var MIN_RGBA_LENGTH = 1;\n/** Maximum length for a string of an RGBA color component */\nexport var MAX_RGBA_LENGTH = 3;\n/** Regular expression matching only valid hexadecimal chars */\nexport var HEX_REGEX = /^[\\da-f]{0,6}$/i;\n/** Regular expression matching only numbers */\nexport var RGBA_REGEX = /^\\d{0,3}$/;\n//# sourceMappingURL=consts.js.map","import { MIN_HEX_LENGTH, MAX_HEX_LENGTH } from './consts';\n/**\n * Corrects a hex color to have length 3 or 6. Defaults to white if too short.\n * Does NOT check anything besides the length (such as valid characters) and does NOT handle\n * hex values starting with # sign.\n */\nexport function correctHex(hex) {\n if (!hex || hex.length < MIN_HEX_LENGTH) {\n return 'ffffff'; // not a valid color--default to white\n }\n if (hex.length >= MAX_HEX_LENGTH) {\n return hex.substring(0, MAX_HEX_LENGTH);\n }\n return hex.substring(0, MIN_HEX_LENGTH);\n}\n//# sourceMappingURL=correctHex.js.map","import { MAX_COLOR_ALPHA, MAX_COLOR_RGB } from './consts';\nimport { clamp } from './clamp';\n/** Corrects an RGB color to fall within the valid range. */\nexport function correctRGB(color) {\n return {\n r: clamp(color.r, MAX_COLOR_RGB),\n g: clamp(color.g, MAX_COLOR_RGB),\n b: clamp(color.b, MAX_COLOR_RGB),\n a: typeof color.a === 'number' ? clamp(color.a, MAX_COLOR_ALPHA) : color.a,\n };\n}\n//# sourceMappingURL=correctRGB.js.map","import { MAX_COLOR_ALPHA } from './consts';\nimport { hsl2rgb } from './hsl2rgb';\n/**\n * Converts a valid CSS color string to an RGB color.\n * Note that hex colors *must* be prefixed with # to be considered valid.\n * Alpha in returned color defaults to 100.\n * Four and eight digit hex values (with alpha) are supported if the current browser supports them.\n */\nexport function cssColor(color) {\n if (!color) {\n return undefined;\n }\n // Need to check the following valid color formats: RGB(A), HSL(A), hex, named color\n // First check for well formatted RGB(A), HSL(A), and hex formats at the start.\n // This is for perf (no creating an element) and catches the intentional \"transparent\" color\n // case early on.\n var easyColor = _rgba(color) || _hex6(color) || _hex3(color) || _hsla(color);\n if (easyColor) {\n return easyColor;\n }\n // if the above fails, do the more expensive catch-all\n return _browserCompute(color);\n}\n/**\n * Uses the browser's getComputedStyle() to determine what the passed-in color is.\n * This assumes _rgba, _hex6, _hex3, and _hsla have already been tried and all failed.\n * This works by attaching an element to the DOM, which may fail in server-side rendering\n * or with headless browsers.\n */\nfunction _browserCompute(str) {\n if (typeof document === 'undefined') {\n // don't throw an error when used server-side\n return undefined;\n }\n var elem = document.createElement('div');\n elem.style.backgroundColor = str;\n // This element must be attached to the DOM for getComputedStyle() to have a value\n elem.style.position = 'absolute';\n elem.style.top = '-9999px';\n elem.style.left = '-9999px';\n elem.style.height = '1px';\n elem.style.width = '1px';\n document.body.appendChild(elem);\n var eComputedStyle = getComputedStyle(elem);\n var computedColor = eComputedStyle && eComputedStyle.backgroundColor;\n document.body.removeChild(elem);\n // computedColor is always an RGB(A) string, except for invalid colors in IE/Edge which return 'transparent'\n // browsers return one of these if the color string is invalid,\n // so need to differentiate between an actual error and intentionally passing in this color\n if (computedColor === 'rgba(0, 0, 0, 0)' || computedColor === 'transparent') {\n switch (str.trim()) {\n // RGB and HSL were already checked at the start of the function\n case 'transparent':\n case '#0000':\n case '#00000000':\n return { r: 0, g: 0, b: 0, a: 0 };\n }\n return undefined;\n }\n return _rgba(computedColor);\n}\n/**\n * If `str` is in valid `rgb()` or `rgba()` format, returns an RGB color (alpha defaults to 100).\n * Otherwise returns undefined.\n */\nfunction _rgba(str) {\n if (!str) {\n return undefined;\n }\n var match = str.match(/^rgb(a?)\\(([\\d., ]+)\\)$/);\n if (match) {\n var hasAlpha = !!match[1];\n var expectedPartCount = hasAlpha ? 4 : 3;\n var parts = match[2].split(/ *, */).map(Number);\n if (parts.length === expectedPartCount) {\n return {\n r: parts[0],\n g: parts[1],\n b: parts[2],\n a: hasAlpha ? parts[3] * 100 : MAX_COLOR_ALPHA,\n };\n }\n }\n}\n/**\n * If `str` is in `hsl()` or `hsla()` format, returns an RGB color (alpha defaults to 100).\n * Otherwise returns undefined.\n */\nfunction _hsla(str) {\n var match = str.match(/^hsl(a?)\\(([\\d., ]+)\\)$/);\n if (match) {\n var hasAlpha = !!match[1];\n var expectedPartCount = hasAlpha ? 4 : 3;\n var parts = match[2].split(/ *, */).map(Number);\n if (parts.length === expectedPartCount) {\n var rgba = hsl2rgb(parts[0], parts[1], parts[2]);\n rgba.a = hasAlpha ? parts[3] * 100 : MAX_COLOR_ALPHA;\n return rgba;\n }\n }\n}\n/**\n * If `str` is in valid 6-digit hex format *with* # prefix, returns an RGB color (with alpha 100).\n * Otherwise returns undefined.\n */\nfunction _hex6(str) {\n if (str[0] === '#' && str.length === 7 && /^#[\\da-fA-F]{6}$/.test(str)) {\n return {\n r: parseInt(str.slice(1, 3), 16),\n g: parseInt(str.slice(3, 5), 16),\n b: parseInt(str.slice(5, 7), 16),\n a: MAX_COLOR_ALPHA,\n };\n }\n}\n/**\n * If `str` is in valid 3-digit hex format *with* # prefix, returns an RGB color (with alpha 100).\n * Otherwise returns undefined.\n */\nfunction _hex3(str) {\n if (str[0] === '#' && str.length === 4 && /^#[\\da-fA-F]{3}$/.test(str)) {\n return {\n r: parseInt(str[1] + str[1], 16),\n g: parseInt(str[2] + str[2], 16),\n b: parseInt(str[3] + str[3], 16),\n a: MAX_COLOR_ALPHA,\n };\n }\n}\n//# sourceMappingURL=cssColor.js.map","import { MAX_COLOR_ALPHA } from './consts';\nimport { rgb2hsv } from './rgb2hsv';\nimport { rgb2hex } from './rgb2hex';\nimport { _rgbaOrHexString } from './_rgbaOrHexString';\n/** Converts an RGBA color to a color object (alpha defaults to 100). */\nexport function getColorFromRGBA(rgba) {\n var _a = rgba.a, a = _a === void 0 ? MAX_COLOR_ALPHA : _a, b = rgba.b, g = rgba.g, r = rgba.r;\n var _b = rgb2hsv(r, g, b), h = _b.h, s = _b.s, v = _b.v;\n var hex = rgb2hex(r, g, b);\n var str = _rgbaOrHexString(r, g, b, a, hex);\n var t = MAX_COLOR_ALPHA - a;\n return { a: a, b: b, g: g, h: h, hex: hex, r: r, s: s, str: str, v: v, t: t };\n}\n//# sourceMappingURL=getColorFromRGBA.js.map","import { __assign } from \"tslib\";\nimport { cssColor } from './cssColor';\nimport { getColorFromRGBA } from './getColorFromRGBA';\n/**\n * Converts a CSS color string to a color object.\n * Note that hex colors *must* be prefixed with # to be considered valid.\n *\n * `inputColor` will be used unmodified as the `str` property of the returned object.\n * Alpha defaults to 100 if not specified in `inputColor`.\n * Returns undefined if the color string is invalid/not recognized.\n */\nexport function getColorFromString(inputColor) {\n var color = cssColor(inputColor);\n if (!color) {\n return;\n }\n return __assign(__assign({}, getColorFromRGBA(color)), { str: inputColor });\n}\n//# sourceMappingURL=getColorFromString.js.map","import { MAX_COLOR_SATURATION, MAX_COLOR_VALUE } from './consts';\nimport { hsv2hex } from './hsv2hex';\n/**\n * Converts a color hue to an HTML color string (with # prefix).\n * This implementation ignores all components of `color` except hue.\n */\nexport function getFullColorString(color) {\n return \"#\" + hsv2hex(color.h, MAX_COLOR_SATURATION, MAX_COLOR_VALUE);\n}\n//# sourceMappingURL=getFullColorString.js.map","/** Converts HSL components to an HSV color. */\nexport function hsl2hsv(h, s, l) {\n s *= (l < 50 ? l : 100 - l) / 100;\n var v = l + s;\n return {\n h: h,\n s: v === 0 ? 0 : ((2 * s) / v) * 100,\n v: v,\n };\n}\n//# sourceMappingURL=hsl2hsv.js.map","import { hsl2hsv } from './hsl2hsv';\nimport { hsv2rgb } from './hsv2rgb';\n/** Converts HSL components to an RGB color. Does not set the alpha value. */\nexport function hsl2rgb(h, s, l) {\n var hsv = hsl2hsv(h, s, l);\n return hsv2rgb(hsv.h, hsv.s, hsv.v);\n}\n//# sourceMappingURL=hsl2rgb.js.map","import { hsv2rgb } from './hsv2rgb';\nimport { rgb2hex } from './rgb2hex';\n/** Converts HSV components to a hex color string (without # prefix). */\nexport function hsv2hex(h, s, v) {\n var _a = hsv2rgb(h, s, v), r = _a.r, g = _a.g, b = _a.b;\n return rgb2hex(r, g, b);\n}\n//# sourceMappingURL=hsv2hex.js.map","import { MAX_COLOR_SATURATION, MAX_COLOR_VALUE } from './consts';\n/** Converts HSV components to an HSL color. */\nexport function hsv2hsl(h, s, v) {\n s /= MAX_COLOR_SATURATION;\n v /= MAX_COLOR_VALUE;\n var l = (2 - s) * v;\n var sl = s * v;\n sl /= l <= 1 ? l : 2 - l;\n sl = sl || 0;\n l /= 2;\n return { h: h, s: sl * 100, l: l * 100 };\n}\n//# sourceMappingURL=hsv2hsl.js.map","import { MAX_COLOR_RGB } from './consts';\n/** Converts HSV components to an RGB color. Does not set the alpha value. */\nexport function hsv2rgb(h, s, v) {\n s = s / 100;\n v = v / 100;\n var rgb = [];\n var c = v * s;\n var hh = h / 60;\n var x = c * (1 - Math.abs((hh % 2) - 1));\n var m = v - c;\n switch (Math.floor(hh)) {\n case 0:\n rgb = [c, x, 0];\n break;\n case 1:\n rgb = [x, c, 0];\n break;\n case 2:\n rgb = [0, c, x];\n break;\n case 3:\n rgb = [0, x, c];\n break;\n case 4:\n rgb = [x, 0, c];\n break;\n case 5:\n rgb = [c, 0, x];\n break;\n }\n return {\n r: Math.round(MAX_COLOR_RGB * (rgb[0] + m)),\n g: Math.round(MAX_COLOR_RGB * (rgb[1] + m)),\n b: Math.round(MAX_COLOR_RGB * (rgb[2] + m)),\n };\n}\n//# sourceMappingURL=hsv2rgb.js.map","import { MAX_COLOR_ALPHA } from './consts';\nimport { hsv2rgb } from './hsv2rgb';\nimport { hsv2hex } from './hsv2hex';\nimport { _rgbaOrHexString } from './_rgbaOrHexString';\n/**\n * Converts an HSV color (and optional alpha value) to a color object.\n * If `a` is not given, a default of 100 is used.\n * Hex in the returned value will *not* be prefixed with #.\n * If `a` is unspecified or 100, the result's `str` property will contain a hex value\n * (*not* prefixed with #)\n */\nexport function getColorFromHSV(hsv, a) {\n var h = hsv.h, s = hsv.s, v = hsv.v;\n a = typeof a === 'number' ? a : MAX_COLOR_ALPHA;\n var _a = hsv2rgb(h, s, v), r = _a.r, g = _a.g, b = _a.b;\n var hex = hsv2hex(h, s, v);\n var str = _rgbaOrHexString(r, g, b, a, hex);\n var t = MAX_COLOR_ALPHA - a;\n return { a: a, b: b, g: g, h: h, hex: hex, r: r, s: s, str: str, v: v, t: t };\n}\n//# sourceMappingURL=getColorFromHSV.js.map","import { getColorFromRGBA } from './getColorFromRGBA';\n/**\n * Gets a color with a single RGBA component updated to a new value.\n * Does not modify the original `color`. Alpha defaults to 100 if not set.\n */\nexport function updateRGB(color, component, value) {\n var _a;\n return getColorFromRGBA((_a = {\n r: color.r,\n g: color.g,\n b: color.b,\n a: color.a\n },\n _a[component] = value,\n _a));\n}\n//# sourceMappingURL=updateRGB.js.map","import { MAX_COLOR_HUE, MAX_COLOR_SATURATION, MAX_COLOR_VALUE } from './consts';\nimport { clamp } from './clamp';\n/** Corrects an HSV color to fall within the valid range. */\nexport function correctHSV(color) {\n return {\n h: clamp(color.h, MAX_COLOR_HUE),\n s: clamp(color.s, MAX_COLOR_SATURATION),\n v: clamp(color.v, MAX_COLOR_VALUE),\n };\n}\n//# sourceMappingURL=correctHSV.js.map","import { MAX_COLOR_RGB } from './consts';\nimport { clamp } from './clamp';\n/** Converts RGB components to a hex color string (without # prefix). */\nexport function rgb2hex(r, g, b) {\n return [_rgbToPaddedHex(r), _rgbToPaddedHex(g), _rgbToPaddedHex(b)].join('');\n}\n/** Converts an RGB component to a 0-padded hex component of length 2. */\nfunction _rgbToPaddedHex(num) {\n num = clamp(num, MAX_COLOR_RGB);\n var hex = num.toString(16);\n return hex.length === 1 ? '0' + hex : hex;\n}\n//# sourceMappingURL=rgb2hex.js.map","import { MAX_COLOR_RGB } from './consts';\n/** Converts RGB components to an HSV color. */\nexport function rgb2hsv(r, g, b) {\n var h = NaN;\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var delta = max - min;\n // hue\n if (delta === 0) {\n h = 0;\n }\n else if (r === max) {\n h = ((g - b) / delta) % 6;\n }\n else if (g === max) {\n h = (b - r) / delta + 2;\n }\n else if (b === max) {\n h = (r - g) / delta + 4;\n }\n h = Math.round(h * 60);\n if (h < 0) {\n h += 360;\n }\n // saturation\n var s = Math.round((max === 0 ? 0 : delta / max) * 100);\n // value\n var v = Math.round((max / MAX_COLOR_RGB) * 100);\n return { h: h, s: s, v: v };\n}\n//# sourceMappingURL=rgb2hsv.js.map","// Technically this should be shades and tints, but for simplicity we'll call everything a shade.\n/*\n * This utility module is used with theming. Given a color to shade, whether the theme is inverted\n * (i.e. is a dark color), and the desired shade enum, this will return an appropriate shade of that color.\n */\nimport { MAX_COLOR_RGB } from './consts';\nimport { assign } from '../../Utilities';\nimport { clamp } from './clamp';\nimport { getColorFromRGBA } from './getColorFromRGBA';\nimport { hsv2hsl } from './hsv2hsl';\nimport { hsv2rgb } from './hsv2rgb';\n// Soften: to get closer to the background color's luminance\n// (softening with a white background would be lightening, with black it'd be darkening)\n// Strongen: opposite of soften\n// Luminance multiplier constants for generating shades of a given color\nvar WhiteShadeTableBG = [0.027, 0.043, 0.082, 0.145, 0.184, 0.216, 0.349, 0.537]; // white bg\nvar BlackTintTableBG = [0.537, 0.45, 0.349, 0.216, 0.184, 0.145, 0.082, 0.043]; // black bg\nvar WhiteShadeTable = [0.537, 0.349, 0.216, 0.184, 0.145, 0.082, 0.043, 0.027]; // white fg\nvar BlackTintTable = [0.537, 0.45, 0.349, 0.216, 0.184, 0.145, 0.082, 0.043]; // black fg\nvar LumTintTable = [0.88, 0.77, 0.66, 0.55, 0.44, 0.33, 0.22, 0.11]; // light (strongen all)\nvar LumShadeTable = [0.11, 0.22, 0.33, 0.44, 0.55, 0.66, 0.77, 0.88]; // dark (soften all)\nvar ColorTintTable = [0.96, 0.84, 0.7, 0.4, 0.12]; // default soften\nvar ColorShadeTable = [0.1, 0.24, 0.44]; // default strongen\n// If the given shade's luminance is below/above these values, we'll swap to using the White/Black tables above\nvar LowLuminanceThreshold = 0.2;\nvar HighLuminanceThreshold = 0.8;\n/** Shades of a given color, from softest to strongest. */\nexport var Shade;\n(function (Shade) {\n Shade[Shade[\"Unshaded\"] = 0] = \"Unshaded\";\n Shade[Shade[\"Shade1\"] = 1] = \"Shade1\";\n Shade[Shade[\"Shade2\"] = 2] = \"Shade2\";\n Shade[Shade[\"Shade3\"] = 3] = \"Shade3\";\n Shade[Shade[\"Shade4\"] = 4] = \"Shade4\";\n Shade[Shade[\"Shade5\"] = 5] = \"Shade5\";\n Shade[Shade[\"Shade6\"] = 6] = \"Shade6\";\n Shade[Shade[\"Shade7\"] = 7] = \"Shade7\";\n Shade[Shade[\"Shade8\"] = 8] = \"Shade8\";\n // remember to update isValidShade()!\n})(Shade || (Shade = {}));\n/**\n * Returns true if the argument is a valid Shade value\n * @param shade - The Shade value to validate.\n */\nexport function isValidShade(shade) {\n return typeof shade === 'number' && shade >= Shade.Unshaded && shade <= Shade.Shade8;\n}\nfunction _isBlack(color) {\n return color.r === 0 && color.g === 0 && color.b === 0;\n}\nfunction _isWhite(color) {\n return color.r === MAX_COLOR_RGB && color.g === MAX_COLOR_RGB && color.b === MAX_COLOR_RGB;\n}\nfunction _darken(hsv, factor) {\n return {\n h: hsv.h,\n s: hsv.s,\n v: clamp(hsv.v - hsv.v * factor, 100, 0),\n };\n}\nfunction _lighten(hsv, factor) {\n return {\n h: hsv.h,\n s: clamp(hsv.s - hsv.s * factor, 100, 0),\n v: clamp(hsv.v + (100 - hsv.v) * factor, 100, 0),\n };\n}\nexport function isDark(color) {\n return hsv2hsl(color.h, color.s, color.v).l < 50;\n}\n/**\n * Given a color and a shade specification, generates the requested shade of the color.\n * Logic:\n * if white\n * darken via tables defined above\n * if black\n * lighten\n * if light\n * strongen\n * if dark\n * soften\n * else default\n * soften or strongen depending on shade#\n * @param color - The base color whose shade is to be computed\n * @param shade - The shade of the base color to compute\n * @param isInverted - Default false. Whether the given theme is inverted (reverse strongen/soften logic)\n */\nexport function getShade(color, shade, isInverted) {\n if (isInverted === void 0) { isInverted = false; }\n if (!color) {\n return null;\n }\n if (shade === Shade.Unshaded || !isValidShade(shade)) {\n return color;\n }\n var hsl = hsv2hsl(color.h, color.s, color.v);\n var hsv = { h: color.h, s: color.s, v: color.v };\n var tableIndex = shade - 1;\n var _soften = _lighten;\n var _strongen = _darken;\n if (isInverted) {\n _soften = _darken;\n _strongen = _lighten;\n }\n if (_isWhite(color)) {\n // white\n hsv = _darken(hsv, WhiteShadeTable[tableIndex]);\n }\n else if (_isBlack(color)) {\n // black\n hsv = _lighten(hsv, BlackTintTable[tableIndex]);\n }\n else if (hsl.l / 100 > HighLuminanceThreshold) {\n // light\n hsv = _strongen(hsv, LumShadeTable[tableIndex]);\n }\n else if (hsl.l / 100 < LowLuminanceThreshold) {\n // dark\n hsv = _soften(hsv, LumTintTable[tableIndex]);\n }\n else {\n // default\n if (tableIndex < ColorTintTable.length) {\n hsv = _soften(hsv, ColorTintTable[tableIndex]);\n }\n else {\n hsv = _strongen(hsv, ColorShadeTable[tableIndex - ColorTintTable.length]);\n }\n }\n return getColorFromRGBA(assign(hsv2rgb(hsv.h, hsv.s, hsv.v), { a: color.a }));\n}\n// Background shades/tints are generated differently. The provided color will be guaranteed\n// to be the darkest or lightest one. If it is <50% luminance, it will always be the darkest,\n// otherwise it will always be the lightest.\nexport function getBackgroundShade(color, shade, isInverted) {\n if (isInverted === void 0) { isInverted = false; }\n if (!color) {\n return null;\n }\n if (shade === Shade.Unshaded || !isValidShade(shade)) {\n return color;\n }\n var hsv = { h: color.h, s: color.s, v: color.v };\n var tableIndex = shade - 1;\n if (!isInverted) {\n // lightish\n hsv = _darken(hsv, WhiteShadeTableBG[tableIndex]);\n }\n else {\n // default: if (hsl.l / 100 < .5) { // darkish\n hsv = _lighten(hsv, BlackTintTableBG[BlackTintTable.length - 1 - tableIndex]);\n }\n return getColorFromRGBA(assign(hsv2rgb(hsv.h, hsv.s, hsv.v), { a: color.a }));\n}\n/* Calculates the contrast ratio between two colors. Used for verifying\n * color pairs meet minimum accessibility requirements.\n * See: https://www.w3.org/TR/WCAG20/ section 1.4.3\n */\nexport function getContrastRatio(color1, color2) {\n // Formula defined by: http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html#contrast-ratiodef\n // relative luminance: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n /* calculate the intermediate value needed to calculating relative luminance */\n function _getThing(x) {\n if (x <= 0.03928) {\n return x / 12.92;\n }\n else {\n return Math.pow((x + 0.055) / 1.055, 2.4);\n }\n }\n var r1 = _getThing(color1.r / MAX_COLOR_RGB);\n var g1 = _getThing(color1.g / MAX_COLOR_RGB);\n var b1 = _getThing(color1.b / MAX_COLOR_RGB);\n var L1 = 0.2126 * r1 + 0.7152 * g1 + 0.0722 * b1; // relative luminance of first color\n L1 += 0.05;\n var r2 = _getThing(color2.r / MAX_COLOR_RGB);\n var g2 = _getThing(color2.g / MAX_COLOR_RGB);\n var b2 = _getThing(color2.b / MAX_COLOR_RGB);\n var L2 = 0.2126 * r2 + 0.7152 * g2 + 0.0722 * b2; // relative luminance of second color\n L2 += 0.05;\n // return the lighter color divided by darker\n return L1 / L2 > 1 ? L1 / L2 : L2 / L1;\n}\n//# sourceMappingURL=shades.js.map","import { __assign } from \"tslib\";\nimport { _rgbaOrHexString } from './_rgbaOrHexString';\nimport { MAX_COLOR_ALPHA } from './consts';\n/**\n * Gets a color with the given alpha value and the same other components as `color`.\n * Does not modify the original color.\n */\nexport function updateA(color, a) {\n return __assign(__assign({}, color), { a: a, t: MAX_COLOR_ALPHA - a, str: _rgbaOrHexString(color.r, color.g, color.b, a, color.hex) });\n}\n//# sourceMappingURL=updateA.js.map","import { __assign } from \"tslib\";\nimport { hsv2rgb } from './hsv2rgb';\nimport { rgb2hex } from './rgb2hex';\nimport { _rgbaOrHexString } from './_rgbaOrHexString';\n/**\n * Gets a color with the same saturation and value as `color` and the other components updated\n * to match the given hue.\n *\n * Does not modify the original `color` and does not supply a default alpha value.\n */\nexport function updateH(color, h) {\n var _a = hsv2rgb(h, color.s, color.v), r = _a.r, g = _a.g, b = _a.b;\n var hex = rgb2hex(r, g, b);\n return __assign(__assign({}, color), { h: h, r: r, g: g, b: b, hex: hex, str: _rgbaOrHexString(r, g, b, color.a, hex) });\n}\n//# sourceMappingURL=updateH.js.map","import { __assign } from \"tslib\";\nimport { hsv2rgb } from './hsv2rgb';\nimport { rgb2hex } from './rgb2hex';\nimport { _rgbaOrHexString } from './_rgbaOrHexString';\n/**\n * Gets a color with the same hue as `color` and other components updated to match the given\n * saturation and value.\n *\n * Does not modify the original `color` and does not supply a default alpha value.\n */\nexport function updateSV(color, s, v) {\n var _a = hsv2rgb(color.h, s, v), r = _a.r, g = _a.g, b = _a.b;\n var hex = rgb2hex(r, g, b);\n return __assign(__assign({}, color), { s: s, v: v, r: r, g: g, b: b, hex: hex, str: _rgbaOrHexString(r, g, b, color.a, hex) });\n}\n//# sourceMappingURL=updateSV.js.map","import { __assign } from \"tslib\";\nimport { _rgbaOrHexString } from './_rgbaOrHexString';\nimport { MAX_COLOR_ALPHA } from './consts';\n/**\n * Gets a color with the given transparency value and the same other components as `color`.\n * Does not modify the original color.\n */\nexport function updateT(color, t) {\n var a = MAX_COLOR_ALPHA - t;\n return __assign(__assign({}, color), { t: t, a: a, str: _rgbaOrHexString(color.r, color.g, color.b, a, color.hex) });\n}\n//# sourceMappingURL=updateT.js.map","/**\n * Determines the effective checked state of a menu item.\n *\n * @param item {IContextualMenuItem} to get the check state of.\n * @returns {true} if the item is checked.\n * @returns {false} if the item is unchecked.\n * @returns {null} if the item is not checkable.\n */\nexport function getIsChecked(item) {\n if (item.canCheck) {\n return !!(item.isChecked || item.checked);\n }\n if (typeof item.isChecked === 'boolean') {\n return item.isChecked;\n }\n if (typeof item.checked === 'boolean') {\n return item.checked;\n }\n // Item is not checkable.\n return null;\n}\nexport function hasSubmenu(item) {\n // eslint-disable-next-line deprecation/deprecation\n return !!(item.subMenuProps || item.items);\n}\nexport function isItemDisabled(item) {\n return !!(item.isDisabled || item.disabled);\n}\nexport function getMenuItemAriaRole(item) {\n var isChecked = getIsChecked(item);\n var canCheck = isChecked !== null;\n return canCheck ? 'menuitemcheckbox' : 'menuitem';\n}\n//# sourceMappingURL=contextualMenuUtility.js.map","import { __extends } from \"tslib\";\nimport * as React from 'react';\nimport { hoistMethods, unhoistMethods } from '../../Utilities';\nvar BaseDecorator = /** @class */ (function (_super) {\n __extends(BaseDecorator, _super);\n function BaseDecorator(props) {\n var _this = _super.call(this, props) || this;\n _this._updateComposedComponentRef = _this._updateComposedComponentRef.bind(_this);\n return _this;\n }\n /**\n * Updates the ref to the component composed by the decorator, which will also take care of hoisting\n * (and unhoisting as appropriate) methods from said component.\n *\n * Pass this method as the argument to the 'ref' property of the composed component.\n */\n BaseDecorator.prototype._updateComposedComponentRef = function (composedComponentInstance) {\n this._composedComponentInstance = composedComponentInstance;\n if (composedComponentInstance) {\n this._hoisted = hoistMethods(this, composedComponentInstance);\n }\n else if (this._hoisted) {\n unhoistMethods(this, this._hoisted);\n }\n };\n return BaseDecorator;\n}(React.Component));\nexport { BaseDecorator };\n//# sourceMappingURL=BaseDecorator.js.map","import { __assign, __extends } from \"tslib\";\nimport * as React from 'react';\nimport { BaseDecorator } from './BaseDecorator';\nimport { getWindow, hoistStatics, EventGroup } from '../../Utilities';\nimport { WindowContext } from '../../WindowProvider';\nexport var ResponsiveMode;\n(function (ResponsiveMode) {\n /** Width \\<= 479px */\n ResponsiveMode[ResponsiveMode[\"small\"] = 0] = \"small\";\n /** Width \\> 479px and \\<= 639px */\n ResponsiveMode[ResponsiveMode[\"medium\"] = 1] = \"medium\";\n /** Width \\> 639px and \\<= 1023px */\n ResponsiveMode[ResponsiveMode[\"large\"] = 2] = \"large\";\n /** Width \\> 1023px and \\<= 1365px */\n ResponsiveMode[ResponsiveMode[\"xLarge\"] = 3] = \"xLarge\";\n /** Width \\> 1365px and \\<= 1919px */\n ResponsiveMode[ResponsiveMode[\"xxLarge\"] = 4] = \"xxLarge\";\n /** Width \\> 1919px */\n ResponsiveMode[ResponsiveMode[\"xxxLarge\"] = 5] = \"xxxLarge\";\n ResponsiveMode[ResponsiveMode[\"unknown\"] = 999] = \"unknown\";\n})(ResponsiveMode || (ResponsiveMode = {}));\nvar RESPONSIVE_MAX_CONSTRAINT = [479, 639, 1023, 1365, 1919, 99999999];\n/**\n * User specified mode to default to, useful for server side rendering scenarios.\n */\nvar _defaultMode;\n/**\n * Tracking the last mode we successfully rendered, which allows us to\n * paint initial renders with the correct size.\n */\nvar _lastMode;\n/**\n * Allows a server rendered scenario to provide a **default** responsive mode.\n * This WILL NOT trigger any updates to components that have already consumed the responsive mode!\n */\nexport function setResponsiveMode(responsiveMode) {\n _defaultMode = responsiveMode;\n}\n/**\n * Initializes the responsive mode to the current window size. This can be used to avoid\n * a re-render during first component mount since the window would otherwise not be measured\n * until after mounting.\n *\n * This WILL NOT trigger any updates to components that have already consumed the responsive mode!\n */\nexport function initializeResponsiveMode(element) {\n var currentWindow = getWindow(element);\n if (currentWindow) {\n getResponsiveMode(currentWindow);\n }\n}\nexport function getInitialResponsiveMode() {\n var _a;\n return (_a = _defaultMode !== null && _defaultMode !== void 0 ? _defaultMode : _lastMode) !== null && _a !== void 0 ? _a : ResponsiveMode.large;\n}\n/**\n * @deprecated Decorator usage is deprecated. Either call `getResponsiveMode` manually, or\n * use the `useResponsiveMode` hook within a function component.\n */\nexport function withResponsiveMode(ComposedComponent) {\n var _a;\n // eslint-disable-next-line deprecation/deprecation\n var resultClass = (_a = /** @class */ (function (_super) {\n __extends(WithResponsiveMode, _super);\n function WithResponsiveMode(props) {\n var _this = _super.call(this, props) || this;\n _this._onResize = function () {\n var responsiveMode = getResponsiveMode(_this.context.window);\n if (responsiveMode !== _this.state.responsiveMode) {\n _this.setState({\n responsiveMode: responsiveMode,\n });\n }\n };\n _this._events = new EventGroup(_this);\n _this._updateComposedComponentRef = _this._updateComposedComponentRef.bind(_this);\n _this.state = {\n responsiveMode: getInitialResponsiveMode(),\n };\n return _this;\n }\n WithResponsiveMode.prototype.componentDidMount = function () {\n this._events.on(this.context.window, 'resize', this._onResize);\n this._onResize();\n };\n WithResponsiveMode.prototype.componentWillUnmount = function () {\n this._events.dispose();\n };\n WithResponsiveMode.prototype.render = function () {\n var responsiveMode = this.state.responsiveMode;\n return responsiveMode === ResponsiveMode.unknown ? null : (React.createElement(ComposedComponent, __assign({ ref: this._updateComposedComponentRef, responsiveMode: responsiveMode }, this.props)));\n };\n return WithResponsiveMode;\n }(BaseDecorator)),\n _a.contextType = WindowContext,\n _a);\n return hoistStatics(ComposedComponent, resultClass);\n}\n/**\n * Hook to get the current responsive mode (window size category).\n * @param currentWindow - Use this window when determining the responsive mode.\n */\nexport function getResponsiveMode(currentWindow) {\n var responsiveMode = ResponsiveMode.small;\n if (currentWindow) {\n try {\n while (currentWindow.innerWidth > RESPONSIVE_MAX_CONSTRAINT[responsiveMode]) {\n responsiveMode++;\n }\n }\n catch (e) {\n // Return a best effort result in cases where we're in the browser but it throws on getting innerWidth.\n responsiveMode = getInitialResponsiveMode();\n }\n // Tracking last mode just gives us a better default in future renders,\n // which avoids starting with the wrong value if we've measured once.\n _lastMode = responsiveMode;\n }\n else {\n if (_defaultMode !== undefined) {\n responsiveMode = _defaultMode;\n }\n else {\n throw new Error('Content was rendered in a server environment without providing a default responsive mode. ' +\n 'Call setResponsiveMode to define what the responsive mode is.');\n }\n }\n return responsiveMode;\n}\n//# sourceMappingURL=withResponsiveMode.js.map","import { __assign, __extends } from \"tslib\";\nimport * as React from 'react';\nimport { BaseDecorator } from './BaseDecorator';\nimport { findScrollableParent, getRect, getWindow, Async, EventGroup } from '../../Utilities';\nvar RESIZE_DELAY = 500;\nvar MAX_RESIZE_ATTEMPTS = 3;\n/**\n * A decorator to update decorated component on viewport or window resize events.\n *\n * @param ComposedComponent decorated React component reference.\n */\nexport function withViewport(ComposedComponent) {\n return /** @class */ (function (_super) {\n __extends(WithViewportComponent, _super);\n function WithViewportComponent(props) {\n var _this = _super.call(this, props) || this;\n _this._root = React.createRef();\n _this._registerResizeObserver = function () {\n var win = getWindow(_this._root.current);\n _this._viewportResizeObserver = new win.ResizeObserver(_this._onAsyncResize);\n _this._viewportResizeObserver.observe(_this._root.current);\n };\n _this._unregisterResizeObserver = function () {\n if (_this._viewportResizeObserver) {\n _this._viewportResizeObserver.disconnect();\n delete _this._viewportResizeObserver;\n }\n };\n /* Note: using lambda here because decorators don't seem to work in decorators. */\n _this._updateViewport = function (withForceUpdate) {\n var viewport = _this.state.viewport;\n var viewportElement = _this._root.current;\n var scrollElement = findScrollableParent(viewportElement);\n var scrollRect = getRect(scrollElement);\n var clientRect = getRect(viewportElement);\n var updateComponent = function () {\n if (withForceUpdate && _this._composedComponentInstance) {\n _this._composedComponentInstance.forceUpdate();\n }\n };\n var isSizeChanged = (clientRect && clientRect.width) !== viewport.width || (scrollRect && scrollRect.height) !== viewport.height;\n if (isSizeChanged && _this._resizeAttempts < MAX_RESIZE_ATTEMPTS && clientRect && scrollRect) {\n _this._resizeAttempts++;\n _this.setState({\n viewport: {\n width: clientRect.width,\n height: scrollRect.height,\n },\n }, function () {\n _this._updateViewport(withForceUpdate);\n });\n }\n else {\n _this._resizeAttempts = 0;\n updateComponent();\n }\n };\n _this._async = new Async(_this);\n _this._events = new EventGroup(_this);\n _this._resizeAttempts = 0;\n _this.state = {\n viewport: {\n width: 0,\n height: 0,\n },\n };\n return _this;\n }\n WithViewportComponent.prototype.componentDidMount = function () {\n var _this = this;\n var _a = this.props, delayFirstMeasure = _a.delayFirstMeasure, disableResizeObserver = _a.disableResizeObserver, skipViewportMeasures = _a.skipViewportMeasures;\n var win = getWindow(this._root.current);\n this._onAsyncResize = this._async.debounce(this._onAsyncResize, RESIZE_DELAY, {\n leading: false,\n });\n if (!skipViewportMeasures) {\n if (!disableResizeObserver && this._isResizeObserverAvailable()) {\n this._registerResizeObserver();\n }\n else {\n this._events.on(win, 'resize', this._onAsyncResize);\n }\n if (delayFirstMeasure) {\n this._async.setTimeout(function () {\n _this._updateViewport();\n }, RESIZE_DELAY);\n }\n else {\n this._updateViewport();\n }\n }\n };\n WithViewportComponent.prototype.componentDidUpdate = function (previousProps) {\n var previousSkipViewportMeasures = previousProps.skipViewportMeasures;\n var _a = this.props, disableResizeObserver = _a.disableResizeObserver, skipViewportMeasures = _a.skipViewportMeasures;\n var win = getWindow(this._root.current);\n if (skipViewportMeasures !== previousSkipViewportMeasures) {\n if (!skipViewportMeasures) {\n if (!disableResizeObserver && this._isResizeObserverAvailable()) {\n if (!this._viewportResizeObserver) {\n this._registerResizeObserver();\n }\n }\n else {\n this._events.on(win, 'resize', this._onAsyncResize);\n }\n this._updateViewport();\n }\n else {\n this._unregisterResizeObserver();\n this._events.off(win, 'resize', this._onAsyncResize);\n }\n }\n };\n WithViewportComponent.prototype.componentWillUnmount = function () {\n this._events.dispose();\n this._async.dispose();\n this._unregisterResizeObserver();\n };\n WithViewportComponent.prototype.render = function () {\n var viewport = this.state.viewport;\n var newViewport = viewport.width > 0 && viewport.height > 0 ? viewport : undefined;\n return (React.createElement(\"div\", { className: \"ms-Viewport\", ref: this._root, style: { minWidth: 1, minHeight: 1 } },\n React.createElement(ComposedComponent, __assign({ ref: this._updateComposedComponentRef, viewport: newViewport }, this.props))));\n };\n WithViewportComponent.prototype.forceUpdate = function () {\n this._updateViewport(true);\n };\n WithViewportComponent.prototype._onAsyncResize = function () {\n this._updateViewport();\n };\n WithViewportComponent.prototype._isResizeObserverAvailable = function () {\n var win = getWindow(this._root.current);\n return win && win.ResizeObserver;\n };\n return WithViewportComponent;\n }(BaseDecorator));\n}\n//# sourceMappingURL=withViewport.js.map","import { EventGroup, getDocument } from '../../Utilities';\nvar MOUSEDOWN_PRIMARY_BUTTON = 0; // for mouse down event we are using ev.button property, 0 means left button\nvar MOUSEMOVE_PRIMARY_BUTTON = 1; // for mouse move event we are using ev.buttons property, 1 means left button\nvar DragDropHelper = /** @class */ (function () {\n function DragDropHelper(params) {\n this._selection = params.selection;\n this._dragEnterCounts = {};\n this._activeTargets = {};\n this._lastId = 0;\n // To make this class cheap to create, which allows simplifying some logic elsewhere,\n // only initialize the event group and global event handlers as needed.\n this._initialized = false;\n }\n DragDropHelper.prototype.dispose = function () {\n if (this._events) {\n this._events.dispose();\n }\n };\n DragDropHelper.prototype.subscribe = function (root, events, dragDropOptions) {\n var _this = this;\n if (!this._initialized) {\n this._events = new EventGroup(this);\n var doc = getDocument();\n // clear drag data when mouse up, use capture event to ensure it will be run\n if (doc) {\n this._events.on(doc.body, 'mouseup', this._onMouseUp.bind(this), true);\n this._events.on(doc, 'mouseup', this._onDocumentMouseUp.bind(this), true);\n }\n this._initialized = true;\n }\n var _a = dragDropOptions.key, key = _a === void 0 ? \"\" + ++this._lastId : _a;\n var handlers = [];\n var onDragStart;\n var onDragLeave;\n var onDragEnter;\n var onDragEnd;\n var onDrop;\n var onDragOver;\n var onMouseDown;\n var isDraggable;\n var isDroppable;\n var activeTarget;\n if (dragDropOptions && root) {\n var eventMap = dragDropOptions.eventMap, context = dragDropOptions.context, updateDropState_1 = dragDropOptions.updateDropState;\n var dragDropTarget = {\n root: root,\n options: dragDropOptions,\n key: key,\n };\n isDraggable = this._isDraggable(dragDropTarget);\n isDroppable = this._isDroppable(dragDropTarget);\n if (isDraggable || isDroppable) {\n if (eventMap) {\n for (var _i = 0, eventMap_1 = eventMap; _i < eventMap_1.length; _i++) {\n var event_1 = eventMap_1[_i];\n var handler = {\n callback: event_1.callback.bind(null, context),\n eventName: event_1.eventName,\n };\n handlers.push(handler);\n this._events.on(root, handler.eventName, handler.callback);\n }\n }\n }\n if (isDroppable) {\n // If the target is droppable, wire up global event listeners to track drop-related events.\n onDragLeave = function (event) {\n if (!event.isHandled) {\n event.isHandled = true;\n _this._dragEnterCounts[key]--;\n if (_this._dragEnterCounts[key] === 0) {\n updateDropState_1(false /* isDropping */, event);\n }\n }\n };\n onDragEnter = function (event) {\n event.preventDefault(); // needed for IE\n if (!event.isHandled) {\n event.isHandled = true;\n _this._dragEnterCounts[key]++;\n if (_this._dragEnterCounts[key] === 1) {\n updateDropState_1(true /* isDropping */, event);\n }\n }\n };\n onDragEnd = function (event) {\n _this._dragEnterCounts[key] = 0;\n updateDropState_1(false /* isDropping */, event);\n };\n onDrop = function (event) {\n _this._dragEnterCounts[key] = 0;\n updateDropState_1(false /* isDropping */, event);\n if (dragDropOptions.onDrop) {\n dragDropOptions.onDrop(dragDropOptions.context.data, event);\n }\n };\n onDragOver = function (event) {\n event.preventDefault();\n if (dragDropOptions.onDragOver) {\n dragDropOptions.onDragOver(dragDropOptions.context.data, event);\n }\n };\n this._dragEnterCounts[key] = 0;\n // dragenter and dragleave will be fired when hover to the child element\n // but we only want to change state when enter or leave the current element\n // use the count to ensure it.\n events.on(root, 'dragenter', onDragEnter);\n events.on(root, 'dragleave', onDragLeave);\n events.on(root, 'dragend', onDragEnd);\n events.on(root, 'drop', onDrop);\n events.on(root, 'dragover', onDragOver);\n }\n if (isDraggable) {\n // If the target is draggable, wire up local event listeners for mouse events.\n onMouseDown = this._onMouseDown.bind(this, dragDropTarget);\n onDragEnd = this._onDragEnd.bind(this, dragDropTarget);\n // We need to add in data so that on Firefox we show the ghost element when dragging\n onDragStart = function (event) {\n var options = dragDropOptions;\n if (options && options.onDragStart) {\n options.onDragStart(options.context.data, options.context.index, _this._selection.getSelection(), event);\n }\n _this._isDragging = true;\n if (event.dataTransfer) {\n event.dataTransfer.setData('id', root.id);\n }\n };\n events.on(root, 'dragstart', onDragStart);\n events.on(root, 'mousedown', onMouseDown);\n events.on(root, 'dragend', onDragEnd);\n }\n activeTarget = {\n target: dragDropTarget,\n dispose: function () {\n if (_this._activeTargets[key] === activeTarget) {\n delete _this._activeTargets[key];\n }\n if (root) {\n for (var _i = 0, handlers_1 = handlers; _i < handlers_1.length; _i++) {\n var handler = handlers_1[_i];\n _this._events.off(root, handler.eventName, handler.callback);\n }\n if (isDroppable) {\n events.off(root, 'dragenter', onDragEnter);\n events.off(root, 'dragleave', onDragLeave);\n events.off(root, 'dragend', onDragEnd);\n events.off(root, 'dragover', onDragOver);\n events.off(root, 'drop', onDrop);\n }\n if (isDraggable) {\n events.off(root, 'dragstart', onDragStart);\n events.off(root, 'mousedown', onMouseDown);\n events.off(root, 'dragend', onDragEnd);\n }\n }\n },\n };\n this._activeTargets[key] = activeTarget;\n }\n return {\n key: key,\n dispose: function () {\n if (activeTarget) {\n activeTarget.dispose();\n }\n },\n };\n };\n DragDropHelper.prototype.unsubscribe = function (root, key) {\n var activeTarget = this._activeTargets[key];\n if (activeTarget) {\n activeTarget.dispose();\n }\n };\n DragDropHelper.prototype._onDragEnd = function (target, event) {\n var options = target.options;\n if (options.onDragEnd) {\n options.onDragEnd(options.context.data, event);\n }\n };\n /**\n * clear drag data when mouse up on body\n */\n DragDropHelper.prototype._onMouseUp = function (event) {\n this._isDragging = false;\n if (this._dragData) {\n for (var _i = 0, _a = Object.keys(this._activeTargets); _i < _a.length; _i++) {\n var key = _a[_i];\n var activeTarget = this._activeTargets[key];\n if (activeTarget.target.root) {\n this._events.off(activeTarget.target.root, 'mousemove');\n this._events.off(activeTarget.target.root, 'mouseleave');\n }\n }\n if (this._dragData.dropTarget) {\n // raise dragleave event to let dropTarget know it need to remove dropping style\n EventGroup.raise(this._dragData.dropTarget.root, 'dragleave');\n EventGroup.raise(this._dragData.dropTarget.root, 'drop');\n }\n }\n this._dragData = null;\n };\n /**\n * clear drag data when mouse up outside of the document\n */\n DragDropHelper.prototype._onDocumentMouseUp = function (event) {\n var doc = getDocument();\n if (doc && event.target === doc.documentElement) {\n this._onMouseUp(event);\n }\n };\n /**\n * when mouse move over a new drop target while dragging some items,\n * fire dragleave on the old target and fire dragenter to the new target\n * The target will handle style change on dragenter and dragleave events.\n */\n DragDropHelper.prototype._onMouseMove = function (target, event) {\n var \n // use buttons property here since ev.button in some edge case is not updating well during the move.\n // but firefox doesn't support it, so we set the default value when it is not defined.\n _a = event.buttons, \n // use buttons property here since ev.button in some edge case is not updating well during the move.\n // but firefox doesn't support it, so we set the default value when it is not defined.\n buttons = _a === void 0 ? MOUSEMOVE_PRIMARY_BUTTON : _a;\n if (this._dragData && buttons !== MOUSEMOVE_PRIMARY_BUTTON) {\n // cancel mouse down event and return early when the primary button is not pressed\n this._onMouseUp(event);\n return;\n }\n var root = target.root, key = target.key;\n if (this._isDragging) {\n if (this._isDroppable(target)) {\n // we can have nested drop targets in the DOM, like a folder inside a group. In that case, when we drag into\n // the inner target (folder), we first set dropTarget to the inner element. But the same event is bubbled to the\n // outer target too, and we need to prevent the outer one from taking over.\n // So, check if the last dropTarget is not a child of the current.\n if (this._dragData) {\n if (this._dragData.dropTarget &&\n this._dragData.dropTarget.key !== key &&\n !this._isChild(root, this._dragData.dropTarget.root)) {\n if (this._dragEnterCounts[this._dragData.dropTarget.key] > 0) {\n EventGroup.raise(this._dragData.dropTarget.root, 'dragleave');\n EventGroup.raise(root, 'dragenter');\n this._dragData.dropTarget = target;\n }\n }\n }\n }\n }\n };\n /**\n * when mouse leave a target while dragging some items, fire dragleave to the target\n */\n DragDropHelper.prototype._onMouseLeave = function (target, event) {\n if (this._isDragging) {\n if (this._dragData && this._dragData.dropTarget && this._dragData.dropTarget.key === target.key) {\n EventGroup.raise(target.root, 'dragleave');\n this._dragData.dropTarget = undefined;\n }\n }\n };\n /**\n * when mouse down on a draggable item, we start to track dragdata.\n */\n DragDropHelper.prototype._onMouseDown = function (target, event) {\n if (event.button !== MOUSEDOWN_PRIMARY_BUTTON) {\n // Ignore anything except the primary button.\n return;\n }\n if (this._isDraggable(target)) {\n this._dragData = {\n clientX: event.clientX,\n clientY: event.clientY,\n eventTarget: event.target,\n dragTarget: target,\n };\n for (var _i = 0, _a = Object.keys(this._activeTargets); _i < _a.length; _i++) {\n var key = _a[_i];\n var activeTarget = this._activeTargets[key];\n if (activeTarget.target.root) {\n this._events.on(activeTarget.target.root, 'mousemove', this._onMouseMove.bind(this, activeTarget.target));\n this._events.on(activeTarget.target.root, 'mouseleave', this._onMouseLeave.bind(this, activeTarget.target));\n }\n }\n }\n else {\n this._dragData = null;\n }\n };\n /**\n * determine whether the child target is a descendant of the parent\n */\n DragDropHelper.prototype._isChild = function (parentElement, childElement) {\n while (childElement && childElement.parentElement) {\n if (childElement.parentElement === parentElement) {\n return true;\n }\n childElement = childElement.parentElement;\n }\n return false;\n };\n DragDropHelper.prototype._isDraggable = function (target) {\n var options = target.options;\n return !!(options.canDrag && options.canDrag(options.context.data));\n };\n DragDropHelper.prototype._isDroppable = function (target) {\n // TODO: take the drag item into consideration to prevent dragging an item into the same group\n var options = target.options;\n var dragContext = this._dragData && this._dragData.dragTarget ? this._dragData.dragTarget.options.context : undefined;\n return !!(options.canDrop && options.canDrop(options.context, dragContext));\n };\n return DragDropHelper;\n}());\nexport { DragDropHelper };\n//# sourceMappingURL=DragDropHelper.js.map","import { __spreadArray } from \"tslib\";\n/**\n * Takes an array of groups and returns a count of the groups and all descendant groups.\n * @param groups - The array of groups to count.\n */\nexport var GetGroupCount = function (groups) {\n var total = 0;\n if (groups) {\n var remainingGroups = __spreadArray([], groups);\n var currentGroup = void 0;\n while (remainingGroups && remainingGroups.length > 0) {\n ++total;\n currentGroup = remainingGroups.pop();\n if (currentGroup && currentGroup.children) {\n remainingGroups.push.apply(remainingGroups, currentGroup.children);\n }\n }\n }\n return total;\n};\n//# sourceMappingURL=GroupedListUtility.js.map","import * as React from 'react';\nimport { getWindow } from '@fluentui/utilities';\nimport { useOnEvent } from '@fluentui/react-hooks';\nimport { getResponsiveMode, getInitialResponsiveMode } from '../decorators/withResponsiveMode';\nimport { useWindow } from '../../WindowProvider';\n/**\n * Hook to get the current responsive mode (window size category).\n * @param elementRef - Use this element's parent window when determining the responsive mode.\n * @param overrideResponsiveMode - Override the responsive mode. If this param is present, it's always returned.\n */\nexport var useResponsiveMode = function (elementRef, overrideResponsiveMode) {\n var _a = React.useState(getInitialResponsiveMode()), lastResponsiveMode = _a[0], setLastResponsiveMode = _a[1];\n var onResize = React.useCallback(function () {\n var newResponsiveMode = getResponsiveMode(getWindow(elementRef.current));\n // Setting the same value should not cause a re-render.\n if (lastResponsiveMode !== newResponsiveMode) {\n setLastResponsiveMode(newResponsiveMode);\n }\n }, [elementRef, lastResponsiveMode]);\n var win = useWindow();\n useOnEvent(win, 'resize', onResize);\n // Call resize function initially on mount, or if the override changes from defined to undefined\n // (the effect will run on all override changes, but onResize will only be called if it changed to undefined)\n React.useEffect(function () {\n if (overrideResponsiveMode === undefined) {\n onResize();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- only meant to run on mount or when override changes\n }, [overrideResponsiveMode]);\n return overrideResponsiveMode !== null && overrideResponsiveMode !== void 0 ? overrideResponsiveMode : lastResponsiveMode;\n};\n//# sourceMappingURL=useResponsiveMode.js.map","import { find } from '../../Utilities';\n/**\n * Tests for equality between two IKeytipTransitionKeys.\n *\n * @param key1 - First IKeytipTransitionKey.\n * @param key2 - Second IKeytipTransitionKey.\n * @returns T/F if the transition keys are equal.\n */\nexport function transitionKeysAreEqual(key1, key2) {\n if (key1.key !== key2.key) {\n return false;\n }\n var mod1 = key1.modifierKeys;\n var mod2 = key2.modifierKeys;\n if ((!mod1 && mod2) || (mod1 && !mod2)) {\n // Not equal if one modifier is defined and the other isn't\n return false;\n }\n if (mod1 && mod2) {\n if (mod1.length !== mod2.length) {\n return false;\n }\n // Sort both arrays\n mod1 = mod1.sort();\n mod2 = mod2.sort();\n for (var i = 0; i < mod1.length; i++) {\n if (mod1[i] !== mod2[i]) {\n return false;\n }\n }\n }\n return true;\n}\n/**\n * Tests if 'key' is present in 'keys'.\n *\n * @param keys - Array of IKeytipTransitionKey.\n * @param key - IKeytipTransitionKey to find in 'keys'.\n * @returns T/F if 'keys' contains 'key'.\n */\nexport function transitionKeysContain(keys, key) {\n return !!find(keys, function (transitionKey) {\n return transitionKeysAreEqual(transitionKey, key);\n });\n}\n//# sourceMappingURL=IKeytipTransitionKey.js.map","export var KTP_PREFIX = 'ktp';\nexport var KTP_SEPARATOR = '-';\nexport var KTP_FULL_PREFIX = KTP_PREFIX + KTP_SEPARATOR;\nexport var DATAKTP_TARGET = 'data-ktp-target';\nexport var DATAKTP_EXECUTE_TARGET = 'data-ktp-execute-target';\nexport var DATAKTP_ARIA_TARGET = 'data-ktp-aria-target';\nexport var KTP_LAYER_ID = 'ktp-layer-id';\nexport var KTP_ARIA_SEPARATOR = ', ';\n// Events\nexport var KeytipEvents;\n(function (KeytipEvents) {\n KeytipEvents.KEYTIP_ADDED = 'keytipAdded';\n KeytipEvents.KEYTIP_REMOVED = 'keytipRemoved';\n KeytipEvents.KEYTIP_UPDATED = 'keytipUpdated';\n KeytipEvents.PERSISTED_KEYTIP_ADDED = 'persistedKeytipAdded';\n KeytipEvents.PERSISTED_KEYTIP_REMOVED = 'persistedKeytipRemoved';\n KeytipEvents.PERSISTED_KEYTIP_EXECUTE = 'persistedKeytipExecute';\n KeytipEvents.ENTER_KEYTIP_MODE = 'enterKeytipMode';\n KeytipEvents.EXIT_KEYTIP_MODE = 'exitKeytipMode';\n})(KeytipEvents || (KeytipEvents = {}));\n//# sourceMappingURL=KeytipConstants.js.map","import { __assign, __spreadArray } from \"tslib\";\nimport { EventGroup, getId } from '../../Utilities';\nimport { KeytipEvents } from '../../utilities/keytips/KeytipConstants';\n/**\n * This class is responsible for handling registering, updating, and unregistering of keytips\n */\nvar KeytipManager = /** @class */ (function () {\n function KeytipManager() {\n this.keytips = {};\n this.persistedKeytips = {};\n this.sequenceMapping = {};\n // This is (and should be) updated and kept in sync\n // with the inKeytipMode in KeytipLayer.\n this.inKeytipMode = false;\n // Boolean that gets checked before entering keytip mode by the KeytipLayer\n // Used for an override in special cases (e.g. Disable entering keytip mode when a modal is shown)\n this.shouldEnterKeytipMode = true;\n // Boolean to indicate whether to delay firing an event to update subscribers of\n // keytip data changed.\n this.delayUpdatingKeytipChange = false;\n }\n /**\n * Static function to get singleton KeytipManager instance\n *\n * @returns Singleton KeytipManager instance\n */\n KeytipManager.getInstance = function () {\n return this._instance;\n };\n /**\n * Initialization code to set set parameters to define\n * how the KeytipManager handles keytip data.\n *\n * @param delayUpdatingKeytipChange - T/F if we should delay notifiying keytip subscribers\n * of keytip changes\n */\n KeytipManager.prototype.init = function (delayUpdatingKeytipChange) {\n this.delayUpdatingKeytipChange = delayUpdatingKeytipChange;\n };\n /**\n * Registers a keytip\n *\n * @param keytipProps - Keytip to register\n * @param persisted - T/F if this keytip should be persisted, default is false\n * @returns Unique ID for this keytip\n */\n KeytipManager.prototype.register = function (keytipProps, persisted) {\n if (persisted === void 0) { persisted = false; }\n var props = keytipProps;\n if (!persisted) {\n // Add the overflowSetSequence if necessary\n props = this.addParentOverflow(keytipProps);\n this.sequenceMapping[props.keySequences.toString()] = props;\n }\n // Create a unique keytip\n var uniqueKeytip = this._getUniqueKtp(props);\n // Add to dictionary\n persisted\n ? (this.persistedKeytips[uniqueKeytip.uniqueID] = uniqueKeytip)\n : (this.keytips[uniqueKeytip.uniqueID] = uniqueKeytip);\n // We only want to add something new if we are currently showing keytip mode\n if (this.inKeytipMode || !this.delayUpdatingKeytipChange) {\n var event_1 = persisted ? KeytipEvents.PERSISTED_KEYTIP_ADDED : KeytipEvents.KEYTIP_ADDED;\n EventGroup.raise(this, event_1, {\n keytip: props,\n uniqueID: uniqueKeytip.uniqueID,\n });\n }\n return uniqueKeytip.uniqueID;\n };\n /**\n * Update a keytip\n *\n * @param keytipProps - Keytip to update\n * @param uniqueID - Unique ID of this keytip\n */\n KeytipManager.prototype.update = function (keytipProps, uniqueID) {\n var newKeytipProps = this.addParentOverflow(keytipProps);\n var uniqueKeytip = this._getUniqueKtp(newKeytipProps, uniqueID);\n var oldKeyTip = this.keytips[uniqueID];\n if (oldKeyTip) {\n // Update everything except 'visible'\n uniqueKeytip.keytip.visible = oldKeyTip.keytip.visible;\n // Update keytip in this.keytips\n this.keytips[uniqueID] = uniqueKeytip;\n // Update the sequence to be up to date\n delete this.sequenceMapping[oldKeyTip.keytip.keySequences.toString()];\n this.sequenceMapping[uniqueKeytip.keytip.keySequences.toString()] = uniqueKeytip.keytip;\n // Raise event only if we are currently in keytip mode\n if (this.inKeytipMode || !this.delayUpdatingKeytipChange) {\n EventGroup.raise(this, KeytipEvents.KEYTIP_UPDATED, {\n keytip: uniqueKeytip.keytip,\n uniqueID: uniqueKeytip.uniqueID,\n });\n }\n }\n };\n /**\n * Unregisters a keytip\n *\n * @param keytipToRemove - IKeytipProps of the keytip to remove\n * @param uniqueID - Unique ID of this keytip\n * @param persisted - T/F if this keytip should be persisted, default is false\n */\n KeytipManager.prototype.unregister = function (keytipToRemove, uniqueID, persisted) {\n if (persisted === void 0) { persisted = false; }\n persisted ? delete this.persistedKeytips[uniqueID] : delete this.keytips[uniqueID];\n !persisted && delete this.sequenceMapping[keytipToRemove.keySequences.toString()];\n var event = persisted ? KeytipEvents.PERSISTED_KEYTIP_REMOVED : KeytipEvents.KEYTIP_REMOVED;\n // Update keytips only if we're in keytip mode\n if (this.inKeytipMode || !this.delayUpdatingKeytipChange) {\n EventGroup.raise(this, event, {\n keytip: keytipToRemove,\n uniqueID: uniqueID,\n });\n }\n };\n /**\n * Manual call to enter keytip mode\n */\n KeytipManager.prototype.enterKeytipMode = function () {\n EventGroup.raise(this, KeytipEvents.ENTER_KEYTIP_MODE);\n };\n /**\n * Manual call to exit keytip mode\n */\n KeytipManager.prototype.exitKeytipMode = function () {\n EventGroup.raise(this, KeytipEvents.EXIT_KEYTIP_MODE);\n };\n /**\n * Gets all IKeytipProps from this.keytips\n *\n * @returns All keytips stored in the manager\n */\n KeytipManager.prototype.getKeytips = function () {\n var _this = this;\n return Object.keys(this.keytips).map(function (key) { return _this.keytips[key].keytip; });\n };\n /**\n * Adds the overflowSetSequence to the keytipProps if its parent keytip also has it\n *\n * @param keytipProps - Keytip props to add overflowSetSequence to if necessary\n * @returns - Modified keytip props, if needed to be modified\n */\n KeytipManager.prototype.addParentOverflow = function (keytipProps) {\n var fullSequence = __spreadArray([], keytipProps.keySequences);\n fullSequence.pop();\n if (fullSequence.length !== 0) {\n var parentKeytip = this.sequenceMapping[fullSequence.toString()];\n if (parentKeytip && parentKeytip.overflowSetSequence) {\n return __assign(__assign({}, keytipProps), { overflowSetSequence: parentKeytip.overflowSetSequence });\n }\n }\n return keytipProps;\n };\n /**\n * Public function to bind for overflow items that have a submenu\n */\n KeytipManager.prototype.menuExecute = function (overflowButtonSequences, keytipSequences) {\n EventGroup.raise(this, KeytipEvents.PERSISTED_KEYTIP_EXECUTE, {\n overflowButtonSequences: overflowButtonSequences,\n keytipSequences: keytipSequences,\n });\n };\n /**\n * Creates an IUniqueKeytip object\n *\n * @param keytipProps - IKeytipProps\n * @param uniqueID - Unique ID, will default to the next unique ID if not passed\n * @returns IUniqueKeytip object\n */\n KeytipManager.prototype._getUniqueKtp = function (keytipProps, uniqueID) {\n if (uniqueID === void 0) { uniqueID = getId(); }\n return { keytip: __assign({}, keytipProps), uniqueID: uniqueID };\n };\n KeytipManager._instance = new KeytipManager();\n return KeytipManager;\n}());\nexport { KeytipManager };\n//# sourceMappingURL=KeytipManager.js.map","import { __spreadArray } from \"tslib\";\nimport { KTP_SEPARATOR, KTP_PREFIX, DATAKTP_TARGET, DATAKTP_EXECUTE_TARGET, KTP_LAYER_ID } from './KeytipConstants';\nimport { addElementAtIndex } from '../../Utilities';\n/**\n * Converts a whole set of KeySequences into one keytip ID, which will be the ID for the last keytip sequence specified\n * keySequences should not include the initial keytip 'start' sequence.\n *\n * @param keySequences - Full path of IKeySequences for one keytip.\n * @returns String to use for the keytip ID.\n */\nexport function sequencesToID(keySequences) {\n return keySequences.reduce(function (prevValue, keySequence) {\n return prevValue + KTP_SEPARATOR + keySequence.split('').join(KTP_SEPARATOR);\n }, KTP_PREFIX);\n}\n/**\n * Merges an overflow sequence with a key sequence.\n *\n * @param keySequences - Full sequence for one keytip.\n * @param overflowKeySequences - Full overflow keytip sequence.\n * @returns Sequence that will be used by the keytip when in the overflow.\n */\nexport function mergeOverflows(keySequences, overflowKeySequences) {\n var overflowSequenceLen = overflowKeySequences.length;\n var overflowSequence = __spreadArray([], overflowKeySequences).pop();\n var newKeySequences = __spreadArray([], keySequences);\n return addElementAtIndex(newKeySequences, overflowSequenceLen - 1, overflowSequence);\n}\n/**\n * Constructs the data-ktp-target attribute selector from a full key sequence.\n *\n * @param keySequences - Full string[] for a Keytip.\n * @returns String selector to use to query for the keytip target.\n */\nexport function ktpTargetFromSequences(keySequences) {\n return '[' + DATAKTP_TARGET + '=\"' + sequencesToID(keySequences) + '\"]';\n}\n/**\n * Constructs the data-ktp-execute-target attribute selector from a keytip ID.\n *\n * @param keytipId - ID of the Keytip.\n * @returns String selector to use to query for the keytip execute target.\n */\nexport function ktpTargetFromId(keytipId) {\n return '[' + DATAKTP_EXECUTE_TARGET + '=\"' + keytipId + '\"]';\n}\n/**\n * Gets the aria-describedby value to put on the component with this keytip.\n *\n * @param keySequences - KeySequences of the keytip.\n * @returns The aria-describedby value to set on the component with this keytip.\n */\nexport function getAriaDescribedBy(keySequences) {\n var describedby = ' ' + KTP_LAYER_ID;\n if (!keySequences.length) {\n // Return just the layer ID\n return describedby;\n }\n return describedby + ' ' + sequencesToID(keySequences);\n}\n//# sourceMappingURL=KeytipUtils.js.map","import { __assign } from \"tslib\";\n/**\n * Builds a map of ID to IKeytipProps\n *\n * @param config - IKeytipConfig object\n * @returns Config map\n */\nexport function buildKeytipConfigMap(config) {\n var configMap = {};\n for (var _i = 0, _a = config.keytips; _i < _a.length; _i++) {\n var keytip = _a[_i];\n constructKeytip(configMap, [], keytip);\n }\n return configMap;\n}\n/**\n * Constructs a keytip from an IKeytipConfigItem and puts it in the configMap\n *\n * @param configMap - IKeytipConfigMap to store the keytip in\n * @param parentSequence - string of the parent keytip\n * @param keytip - IKeytipConfigItem data\n */\nexport function constructKeytip(configMap, parentSequence, keytip) {\n // Compute full key sequence\n var sequence = keytip.sequence ? keytip.sequence : keytip.content.toLocaleLowerCase();\n var keytipSequence = parentSequence.concat(sequence);\n // Save props in configMap\n var keytipProps = __assign(__assign({}, keytip.optionalProps), { keySequences: keytipSequence, content: keytip.content });\n configMap[keytip.id] = keytipProps;\n if (keytip.children) {\n for (var _i = 0, _a = keytip.children; _i < _a.length; _i++) {\n var child = _a[_i];\n // Create keytips for all children\n constructKeytip(configMap, keytipSequence, child);\n }\n }\n}\n//# sourceMappingURL=KeytipConfig.js.map","var _a;\nimport { __assign } from \"tslib\";\nimport { DirectionalHint } from '../../common/DirectionalHint';\nimport { getScrollbarWidth, getRTL } from '../../Utilities';\nimport { RectangleEdge } from './positioning.types';\nimport { Rectangle } from '../../Utilities';\nfunction _createPositionData(targetEdge, alignmentEdge, isAuto) {\n return {\n targetEdge: targetEdge,\n alignmentEdge: alignmentEdge,\n isAuto: isAuto,\n };\n}\n// Currently the beakPercent is set to 50 for all positions meaning that it should tend to the center of the target\nvar DirectionalDictionary = (_a = {},\n _a[DirectionalHint.topLeftEdge] = _createPositionData(RectangleEdge.top, RectangleEdge.left),\n _a[DirectionalHint.topCenter] = _createPositionData(RectangleEdge.top),\n _a[DirectionalHint.topRightEdge] = _createPositionData(RectangleEdge.top, RectangleEdge.right),\n _a[DirectionalHint.topAutoEdge] = _createPositionData(RectangleEdge.top, undefined, true),\n _a[DirectionalHint.bottomLeftEdge] = _createPositionData(RectangleEdge.bottom, RectangleEdge.left),\n _a[DirectionalHint.bottomCenter] = _createPositionData(RectangleEdge.bottom),\n _a[DirectionalHint.bottomRightEdge] = _createPositionData(RectangleEdge.bottom, RectangleEdge.right),\n _a[DirectionalHint.bottomAutoEdge] = _createPositionData(RectangleEdge.bottom, undefined, true),\n _a[DirectionalHint.leftTopEdge] = _createPositionData(RectangleEdge.left, RectangleEdge.top),\n _a[DirectionalHint.leftCenter] = _createPositionData(RectangleEdge.left),\n _a[DirectionalHint.leftBottomEdge] = _createPositionData(RectangleEdge.left, RectangleEdge.bottom),\n _a[DirectionalHint.rightTopEdge] = _createPositionData(RectangleEdge.right, RectangleEdge.top),\n _a[DirectionalHint.rightCenter] = _createPositionData(RectangleEdge.right),\n _a[DirectionalHint.rightBottomEdge] = _createPositionData(RectangleEdge.right, RectangleEdge.bottom),\n _a);\nfunction _isRectangleWithinBounds(rect, boundingRect) {\n if (rect.top < boundingRect.top) {\n return false;\n }\n if (rect.bottom > boundingRect.bottom) {\n return false;\n }\n if (rect.left < boundingRect.left) {\n return false;\n }\n if (rect.right > boundingRect.right) {\n return false;\n }\n return true;\n}\n/**\n * Gets all of the edges of a rectangle that are outside of the given bounds.\n * If there are no out of bounds edges it returns an empty array.\n */\nfunction _getOutOfBoundsEdges(rect, boundingRect) {\n var outOfBounds = [];\n if (rect.top < boundingRect.top) {\n outOfBounds.push(RectangleEdge.top);\n }\n if (rect.bottom > boundingRect.bottom) {\n outOfBounds.push(RectangleEdge.bottom);\n }\n if (rect.left < boundingRect.left) {\n outOfBounds.push(RectangleEdge.left);\n }\n if (rect.right > boundingRect.right) {\n outOfBounds.push(RectangleEdge.right);\n }\n return outOfBounds;\n}\nfunction _getEdgeValue(rect, edge) {\n return rect[RectangleEdge[edge]];\n}\nfunction _setEdgeValue(rect, edge, value) {\n rect[RectangleEdge[edge]] = value;\n return rect;\n}\n/**\n * Returns the middle value of an edge. Only returns 1 value rather than xy coordinates as\n * the itself already contains the other coordinate.\n * For instance, a bottom edge's current value is it's y coordinate, so the number returned is the x.\n */\nfunction _getCenterValue(rect, edge) {\n var edges = _getFlankingEdges(edge);\n return (_getEdgeValue(rect, edges.positiveEdge) + _getEdgeValue(rect, edges.negativeEdge)) / 2;\n}\n/**\n * Flips the value depending on the edge.\n * If the edge is a \"positive\" edge, Top or Left, then the value should stay as it is.\n * If the edge is a \"negative\" edge, Bottom or Right, then the value should be flipped.\n * This is to account for the fact that the coordinates are effectively reserved in certain cases for the\n * \"negative\" edges.\n *\n * For example, when testing to see if a bottom edge 1 is within the bounds of another bottom edge 2:\n * If edge 1 is greater than edge 2 then it is out of bounds. This is reversed for top edge 1 and top edge 2.\n * If top edge 1 is less than edge 2 then it is out of bounds.\n */\nfunction _getRelativeEdgeValue(edge, value) {\n if (edge > 0) {\n return value;\n }\n else {\n return value * -1;\n }\n}\nfunction _getRelativeRectEdgeValue(edge, rect) {\n return _getRelativeEdgeValue(edge, _getEdgeValue(rect, edge));\n}\nfunction _getRelativeEdgeDifference(rect, hostRect, edge) {\n var edgeDifference = _getEdgeValue(rect, edge) - _getEdgeValue(hostRect, edge);\n return _getRelativeEdgeValue(edge, edgeDifference);\n}\n/**\n * Moves the edge of a rectangle to the value given. It only moves the edge in a linear direction based on that edge.\n * For example, if it's a bottom edge it will only change y coordinates.\n * if maintainSize is set to false, it will only adjust the specified edge value\n */\nfunction _moveEdge(rect, edge, newValue, maintainSize) {\n if (maintainSize === void 0) { maintainSize = true; }\n var difference = _getEdgeValue(rect, edge) - newValue;\n var returnRect = _setEdgeValue(rect, edge, newValue);\n if (maintainSize) {\n returnRect = _setEdgeValue(rect, edge * -1, _getEdgeValue(rect, edge * -1) - difference);\n }\n return returnRect;\n}\n/**\n * Aligns the edge on the passed in rect to the target. If there is a gap then it will have that space between the two.\n */\nfunction _alignEdges(rect, target, edge, gap) {\n if (gap === void 0) { gap = 0; }\n return _moveEdge(rect, edge, _getEdgeValue(target, edge) + _getRelativeEdgeValue(edge, gap));\n}\n/**\n * Aligns the targetEdge on the passed in target to the rects corresponding opposite edge.\n * For instance if targetEdge is bottom, then the rects top will be moved to match it.\n */\nfunction _alignOppositeEdges(rect, target, targetEdge, gap) {\n if (gap === void 0) { gap = 0; }\n var oppositeEdge = targetEdge * -1;\n var adjustedGap = _getRelativeEdgeValue(oppositeEdge, gap);\n return _moveEdge(rect, targetEdge * -1, _getEdgeValue(target, targetEdge) + adjustedGap);\n}\n/**\n * Tests to see if the given edge is within the bounds of the given rectangle.\n */\nfunction _isEdgeInBounds(rect, bounds, edge) {\n var adjustedRectValue = _getRelativeRectEdgeValue(edge, rect);\n return adjustedRectValue > _getRelativeRectEdgeValue(edge, bounds);\n}\n/**\n * Returns a measure of how much a rectangle is out of bounds for a given alignment;\n * this can be used to compare which rectangle is more or less out of bounds.\n * A value of 0 means the rectangle is entirely in bounds\n */\nfunction _getOutOfBoundsDegree(rect, bounds) {\n var breakingEdges = _getOutOfBoundsEdges(rect, bounds);\n var total = 0;\n for (var _i = 0, breakingEdges_1 = breakingEdges; _i < breakingEdges_1.length; _i++) {\n var edge = breakingEdges_1[_i];\n total += Math.pow(_getRelativeEdgeDifference(rect, bounds, edge), 2);\n }\n return total;\n}\n/**\n * Attempts to move the rectangle through various sides of the target to find a place to fit.\n * If no fit is found, the least bad option should be returned.\n */\nfunction _flipToFit(rect, target, bounding, positionData, gap) {\n if (gap === void 0) { gap = 0; }\n var directions = [\n RectangleEdge.left,\n RectangleEdge.right,\n RectangleEdge.bottom,\n RectangleEdge.top,\n ];\n // In RTL page, RectangleEdge.right has a higher priority than RectangleEdge.left, so the order should be updated.\n if (getRTL()) {\n directions[0] *= -1;\n directions[1] *= -1;\n }\n var currentEstimate = rect;\n var currentEdge = positionData.targetEdge;\n var currentAlignment = positionData.alignmentEdge;\n // keep track of least bad option, in case no sides fit\n var oobDegree;\n var bestEdge = currentEdge;\n var bestAlignment = currentAlignment;\n // Keep switching sides until one is found with enough space.\n // If all sides don't fit then return the unmodified element.\n for (var i = 0; i < 4; i++) {\n if (!_isEdgeInBounds(currentEstimate, bounding, currentEdge)) {\n // update least-bad edges\n var currentOOBDegree = _getOutOfBoundsDegree(currentEstimate, bounding);\n if (!oobDegree || currentOOBDegree < oobDegree) {\n oobDegree = currentOOBDegree;\n bestEdge = currentEdge;\n bestAlignment = currentAlignment;\n }\n directions.splice(directions.indexOf(currentEdge), 1);\n if (directions.length > 0) {\n if (directions.indexOf(currentEdge * -1) > -1) {\n currentEdge = currentEdge * -1;\n }\n else {\n currentAlignment = currentEdge;\n currentEdge = directions.slice(-1)[0];\n }\n currentEstimate = _estimatePosition(rect, target, { targetEdge: currentEdge, alignmentEdge: currentAlignment }, gap);\n }\n }\n else {\n return {\n elementRectangle: currentEstimate,\n targetEdge: currentEdge,\n alignmentEdge: currentAlignment,\n };\n }\n }\n // nothing fits, use least-bad option\n currentEstimate = _estimatePosition(rect, target, { targetEdge: bestEdge, alignmentEdge: bestAlignment }, gap);\n return {\n elementRectangle: currentEstimate,\n targetEdge: bestEdge,\n alignmentEdge: bestAlignment,\n };\n}\n/**\n * Flips only the alignment edge of an element rectangle. This is used instead of nudging the alignment edges\n * into position, when `alignTargetEdge` is specified.\n */\nfunction _flipAlignmentEdge(elementEstimate, target, gap, coverTarget) {\n var alignmentEdge = elementEstimate.alignmentEdge, targetEdge = elementEstimate.targetEdge, elementRectangle = elementEstimate.elementRectangle;\n var oppositeEdge = alignmentEdge * -1;\n var newEstimate = _estimatePosition(elementRectangle, target, { targetEdge: targetEdge, alignmentEdge: oppositeEdge }, gap, coverTarget);\n return {\n elementRectangle: newEstimate,\n targetEdge: targetEdge,\n alignmentEdge: oppositeEdge,\n };\n}\n/**\n * Adjusts a element rectangle to fit within the bounds given. If directionalHintFixed or covertarget is passed in\n * then the element will not flip sides on the target. They will, however, be nudged to fit within the bounds given.\n */\nfunction _adjustFitWithinBounds(element, target, bounding, positionData, gap, directionalHintFixed, coverTarget) {\n if (gap === void 0) { gap = 0; }\n var alignmentEdge = positionData.alignmentEdge, alignTargetEdge = positionData.alignTargetEdge;\n var elementEstimate = {\n elementRectangle: element,\n targetEdge: positionData.targetEdge,\n alignmentEdge: alignmentEdge,\n };\n if (!directionalHintFixed && !coverTarget) {\n elementEstimate = _flipToFit(element, target, bounding, positionData, gap);\n }\n var outOfBounds = _getOutOfBoundsEdges(elementEstimate.elementRectangle, bounding);\n // if directionalHintFixed is specified, we need to force the target edge to not change\n // we need *-1 because targetEdge refers to the target's edge; the callout edge is the opposite\n var fixedEdge = directionalHintFixed ? -elementEstimate.targetEdge : undefined;\n if (outOfBounds.length > 0) {\n if (alignTargetEdge) {\n // The edge opposite to the alignment edge might be out of bounds.\n // Flip alignment to see if we can get it within bounds.\n if (elementEstimate.alignmentEdge && outOfBounds.indexOf(elementEstimate.alignmentEdge * -1) > -1) {\n var flippedElementEstimate = _flipAlignmentEdge(elementEstimate, target, gap, coverTarget);\n if (_isRectangleWithinBounds(flippedElementEstimate.elementRectangle, bounding)) {\n return flippedElementEstimate;\n }\n else {\n // If the flipped elements edges are still out of bounds, try nudging it.\n elementEstimate = _alignOutOfBoundsEdges(_getOutOfBoundsEdges(flippedElementEstimate.elementRectangle, bounding), elementEstimate, bounding, fixedEdge);\n }\n }\n else {\n elementEstimate = _alignOutOfBoundsEdges(outOfBounds, elementEstimate, bounding, fixedEdge);\n }\n }\n else {\n elementEstimate = _alignOutOfBoundsEdges(outOfBounds, elementEstimate, bounding, fixedEdge);\n }\n }\n return elementEstimate;\n}\n/**\n * Iterates through a list of out of bounds edges and tries to nudge and align them.\n * @param outOfBoundsEdges - Array of edges that are out of bounds\n * @param elementEstimate - The current element positioning estimate\n * @param bounding - The current bounds\n * @param preserveEdge - Specify an edge that should not be modified\n */\nfunction _alignOutOfBoundsEdges(outOfBoundsEdges, elementEstimate, bounding, preserveEdge) {\n for (var _i = 0, outOfBoundsEdges_1 = outOfBoundsEdges; _i < outOfBoundsEdges_1.length; _i++) {\n var direction = outOfBoundsEdges_1[_i];\n var edgeAttempt = void 0;\n // if preserveEdge is specified, do not call _alignEdges, skip directly to _moveEdge\n // this is because _alignEdges will move the opposite edge\n if (preserveEdge && preserveEdge === direction * -1) {\n edgeAttempt = _moveEdge(elementEstimate.elementRectangle, direction, _getEdgeValue(bounding, direction), false);\n elementEstimate.forcedInBounds = true;\n }\n else {\n edgeAttempt = _alignEdges(elementEstimate.elementRectangle, bounding, direction);\n var inBounds = _isEdgeInBounds(edgeAttempt, bounding, direction * -1);\n // only update estimate if the attempt didn't break out of the opposite bounding edge\n if (!inBounds) {\n edgeAttempt = _moveEdge(edgeAttempt, direction * -1, _getEdgeValue(bounding, direction * -1), false);\n elementEstimate.forcedInBounds = true;\n }\n }\n elementEstimate.elementRectangle = edgeAttempt;\n }\n return elementEstimate;\n}\n/**\n * Moves the middle point on an edge to the point given.\n * Only moves in one direction. For instance if a bottom edge is passed in, then\n * the bottom edge will be moved in the x axis to match the point.\n */\nfunction _centerEdgeToPoint(rect, edge, point) {\n var positiveEdge = _getFlankingEdges(edge).positiveEdge;\n var elementMiddle = _getCenterValue(rect, edge);\n var distanceToMiddle = elementMiddle - _getEdgeValue(rect, positiveEdge);\n return _moveEdge(rect, positiveEdge, point - distanceToMiddle);\n}\n/**\n * Moves the element rectangle to be appropriately positioned relative to a given target.\n * Does not flip or adjust the element.\n */\nfunction _estimatePosition(elementToPosition, target, positionData, gap, coverTarget) {\n if (gap === void 0) { gap = 0; }\n var estimatedElementPosition = new Rectangle(elementToPosition.left, elementToPosition.right, elementToPosition.top, elementToPosition.bottom);\n var alignmentEdge = positionData.alignmentEdge, targetEdge = positionData.targetEdge;\n var elementEdge = coverTarget ? targetEdge : targetEdge * -1;\n estimatedElementPosition = coverTarget\n ? _alignEdges(estimatedElementPosition, target, targetEdge, gap)\n : _alignOppositeEdges(estimatedElementPosition, target, targetEdge, gap);\n // if no alignment edge is provided it's supposed to be centered.\n if (!alignmentEdge) {\n var targetMiddlePoint = _getCenterValue(target, targetEdge);\n estimatedElementPosition = _centerEdgeToPoint(estimatedElementPosition, elementEdge, targetMiddlePoint);\n }\n else {\n estimatedElementPosition = _alignEdges(estimatedElementPosition, target, alignmentEdge);\n }\n return estimatedElementPosition;\n}\n/**\n * Returns the non-opposite edges of the target edge.\n * For instance if bottom is passed in then left and right will be returned.\n */\nfunction _getFlankingEdges(edge) {\n if (edge === RectangleEdge.top || edge === RectangleEdge.bottom) {\n return {\n positiveEdge: RectangleEdge.left,\n negativeEdge: RectangleEdge.right,\n };\n }\n else {\n return {\n positiveEdge: RectangleEdge.top,\n negativeEdge: RectangleEdge.bottom,\n };\n }\n}\n/**\n * Retrieve the final value for the return edge of `elementRectangle`. If the `elementRectangle` is closer to one side\n * of the bounds versus the other, the return edge is flipped to grow inward.\n */\nfunction _finalizeReturnEdge(elementRectangle, returnEdge, bounds) {\n if (bounds &&\n Math.abs(_getRelativeEdgeDifference(elementRectangle, bounds, returnEdge)) >\n Math.abs(_getRelativeEdgeDifference(elementRectangle, bounds, returnEdge * -1))) {\n return returnEdge * -1;\n }\n return returnEdge;\n}\n/**\n * Whether or not the considered edge of the elementRectangle is lying on the edge of the bounds\n * @param elementRectangle The rectangle whose edge we are considering\n * @param bounds The rectangle marking the bounds\n * @param edge The target edge we're considering\n * @returns If the target edge of the elementRectangle is in the same location as that edge of the bounds\n */\nfunction _isEdgeOnBounds(elementRectangle, edge, bounds) {\n return bounds !== undefined && _getEdgeValue(elementRectangle, edge) === _getEdgeValue(bounds, edge);\n}\n/**\n * Finalizes the element position based on the hostElement. Only returns the\n * rectangle values to position such that they are anchored to the target.\n * This helps prevent resizing from looking very strange.\n * For instance, if the target edge is top and aligned with the left side then\n * the bottom and left values are returned so as the Callout shrinks it shrinks towards that corner.\n */\nfunction _finalizeElementPosition(elementRectangle, hostElement, targetEdge, bounds, alignmentEdge, coverTarget, doNotFinalizeReturnEdge, forceWithinBounds) {\n var returnValue = {};\n var hostRect = _getRectangleFromElement(hostElement);\n var elementEdge = coverTarget ? targetEdge : targetEdge * -1;\n var returnEdge = alignmentEdge ? alignmentEdge : _getFlankingEdges(targetEdge).positiveEdge;\n // If we are finalizing the return edge, choose the edge such that we grow away from the bounds\n // If we are not finalizing the return edge but the opposite edge is flush against the bounds,\n // choose that as the anchor edge so the element rect can grow away from the bounds' edge\n // In this case there will not be a visual difference because there is no more room for the elementRectangle to grow\n // in the usual direction\n if (!doNotFinalizeReturnEdge || _isEdgeOnBounds(elementRectangle, getOppositeEdge(returnEdge), bounds)) {\n returnEdge = _finalizeReturnEdge(elementRectangle, returnEdge, bounds);\n }\n returnValue[RectangleEdge[elementEdge]] = _getRelativeEdgeDifference(elementRectangle, hostRect, elementEdge);\n returnValue[RectangleEdge[returnEdge]] = _getRelativeEdgeDifference(elementRectangle, hostRect, returnEdge);\n // if the positioned element will still overflow, return all four edges with in-bounds values\n if (forceWithinBounds) {\n returnValue[RectangleEdge[elementEdge * -1]] = _getRelativeEdgeDifference(elementRectangle, hostRect, elementEdge * -1);\n returnValue[RectangleEdge[returnEdge * -1]] = _getRelativeEdgeDifference(elementRectangle, hostRect, returnEdge * -1);\n }\n return returnValue;\n}\n// Since the beak is rotated 45 degrees the actual height/width is the length of the diagonal.\n// We still want to position the beak based on it's midpoint which does not change. It will\n// be at (beakwidth / 2, beakwidth / 2)\nfunction _calculateActualBeakWidthInPixels(beakWidth) {\n return Math.sqrt(beakWidth * beakWidth * 2);\n}\n/**\n * Returns the appropriate IPositionData based on the props altered for RTL.\n * If directionalHintForRTL is passed in that is used if the page is RTL.\n * If directionalHint is specified, no directionalHintForRTL is available, and the page is RTL, the hint will be\n * flipped (e.g. bottomLeftEdge would become bottomRightEdge).\n *\n * If there is no directionalHint passed in, bottomAutoEdge is chosen automatically.\n */\nfunction _getPositionData(directionalHint, directionalHintForRTL, previousPositions) {\n if (directionalHint === void 0) { directionalHint = DirectionalHint.bottomAutoEdge; }\n if (previousPositions) {\n return {\n alignmentEdge: previousPositions.alignmentEdge,\n isAuto: previousPositions.isAuto,\n targetEdge: previousPositions.targetEdge,\n };\n }\n var positionInformation = __assign({}, DirectionalDictionary[directionalHint]);\n if (getRTL()) {\n // If alignment edge exists and that alignment edge is -2 or 2, right or left, then flip it.\n if (positionInformation.alignmentEdge && positionInformation.alignmentEdge % 2 === 0) {\n positionInformation.alignmentEdge = positionInformation.alignmentEdge * -1;\n }\n return directionalHintForRTL !== undefined ? DirectionalDictionary[directionalHintForRTL] : positionInformation;\n }\n return positionInformation;\n}\n/**\n * Gets the alignment data for the given information. This only really matters if the positioning is Auto.\n * If it is auto then the alignmentEdge should be chosen based on the target edge's position relative to\n * the center of the page.\n */\nfunction _getAlignmentData(positionData, target, boundingRect, coverTarget, alignTargetEdge) {\n if (positionData.isAuto) {\n positionData.alignmentEdge = getClosestEdge(positionData.targetEdge, target, boundingRect);\n }\n positionData.alignTargetEdge = alignTargetEdge;\n return positionData;\n}\nfunction getClosestEdge(targetEdge, target, boundingRect) {\n var targetCenter = _getCenterValue(target, targetEdge);\n var boundingCenter = _getCenterValue(boundingRect, targetEdge);\n var _a = _getFlankingEdges(targetEdge), positiveEdge = _a.positiveEdge, negativeEdge = _a.negativeEdge;\n if (targetCenter <= boundingCenter) {\n return positiveEdge;\n }\n else {\n return negativeEdge;\n }\n}\nfunction _positionElementWithinBounds(elementToPosition, target, bounding, positionData, gap, directionalHintFixed, coverTarget) {\n var estimatedElementPosition = _estimatePosition(elementToPosition, target, positionData, gap, coverTarget);\n if (_isRectangleWithinBounds(estimatedElementPosition, bounding)) {\n return {\n elementRectangle: estimatedElementPosition,\n targetEdge: positionData.targetEdge,\n alignmentEdge: positionData.alignmentEdge,\n };\n }\n else {\n return _adjustFitWithinBounds(estimatedElementPosition, target, bounding, positionData, gap, directionalHintFixed, coverTarget);\n }\n}\nfunction _finalizeBeakPosition(elementPosition, positionedBeak, bounds) {\n var targetEdge = elementPosition.targetEdge * -1;\n // The \"host\" element that we will use to help position the beak.\n var actualElement = new Rectangle(0, elementPosition.elementRectangle.width, 0, elementPosition.elementRectangle.height);\n var returnValue = {};\n var returnEdge = _finalizeReturnEdge(elementPosition.elementRectangle, elementPosition.alignmentEdge ? elementPosition.alignmentEdge : _getFlankingEdges(targetEdge).positiveEdge, bounds);\n // only show the beak if the callout is not fully covering the target\n var beakEdgeDifference = _getRelativeEdgeDifference(elementPosition.elementRectangle, elementPosition.targetRectangle, targetEdge);\n var showBeak = beakEdgeDifference > Math.abs(_getEdgeValue(positionedBeak, targetEdge));\n returnValue[RectangleEdge[targetEdge]] = _getEdgeValue(positionedBeak, targetEdge);\n returnValue[RectangleEdge[returnEdge]] = _getRelativeEdgeDifference(positionedBeak, actualElement, returnEdge);\n return {\n elementPosition: __assign({}, returnValue),\n closestEdge: getClosestEdge(elementPosition.targetEdge, positionedBeak, actualElement),\n targetEdge: targetEdge,\n hideBeak: !showBeak,\n };\n}\nfunction _positionBeak(beakWidth, elementPosition) {\n var target = elementPosition.targetRectangle;\n /**\n * Note about beak positioning: The actual beak width only matters for getting the gap between the callout and\n * target, it does not impact the beak placement within the callout. For example example, if the beakWidth is 8,\n * then the actual beakWidth is sqrroot(8^2 + 8^2) = 11.31x11.31. So the callout will need to be an extra 3 pixels\n * away from its target. While the beak is being positioned in the callout it still acts as though it were 8x8.\n */\n var _a = _getFlankingEdges(elementPosition.targetEdge), positiveEdge = _a.positiveEdge, negativeEdge = _a.negativeEdge;\n var beakTargetPoint = _getCenterValue(target, elementPosition.targetEdge);\n var elementBounds = new Rectangle(beakWidth / 2, elementPosition.elementRectangle.width - beakWidth / 2, beakWidth / 2, elementPosition.elementRectangle.height - beakWidth / 2);\n var beakPosition = new Rectangle(0, beakWidth, 0, beakWidth);\n beakPosition = _moveEdge(beakPosition, elementPosition.targetEdge * -1, -beakWidth / 2);\n beakPosition = _centerEdgeToPoint(beakPosition, elementPosition.targetEdge * -1, beakTargetPoint - _getRelativeRectEdgeValue(positiveEdge, elementPosition.elementRectangle));\n if (!_isEdgeInBounds(beakPosition, elementBounds, positiveEdge)) {\n beakPosition = _alignEdges(beakPosition, elementBounds, positiveEdge);\n }\n else if (!_isEdgeInBounds(beakPosition, elementBounds, negativeEdge)) {\n beakPosition = _alignEdges(beakPosition, elementBounds, negativeEdge);\n }\n return beakPosition;\n}\nfunction _getRectangleFromElement(element) {\n var clientRect = element.getBoundingClientRect();\n return new Rectangle(clientRect.left, clientRect.right, clientRect.top, clientRect.bottom);\n}\nfunction _getRectangleFromIRect(rect) {\n return new Rectangle(rect.left, rect.right, rect.top, rect.bottom);\n}\nfunction _getTargetRect(bounds, target) {\n var targetRectangle;\n if (target) {\n // eslint-disable-next-line no-extra-boolean-cast\n if (!!target.preventDefault) {\n var ev = target;\n targetRectangle = new Rectangle(ev.clientX, ev.clientX, ev.clientY, ev.clientY);\n // eslint-disable-next-line no-extra-boolean-cast\n }\n else if (!!target.getBoundingClientRect) {\n targetRectangle = _getRectangleFromElement(target);\n // HTMLImgElements can have x and y values. The check for it being a point must go last.\n }\n else {\n var rectOrPoint = target;\n // eslint-disable-next-line deprecation/deprecation\n var left = rectOrPoint.left || rectOrPoint.x;\n // eslint-disable-next-line deprecation/deprecation\n var top_1 = rectOrPoint.top || rectOrPoint.y;\n var right = rectOrPoint.right || left;\n var bottom = rectOrPoint.bottom || top_1;\n targetRectangle = new Rectangle(left, right, top_1, bottom);\n }\n if (!_isRectangleWithinBounds(targetRectangle, bounds)) {\n var outOfBounds = _getOutOfBoundsEdges(targetRectangle, bounds);\n for (var _i = 0, outOfBounds_1 = outOfBounds; _i < outOfBounds_1.length; _i++) {\n var direction = outOfBounds_1[_i];\n targetRectangle[RectangleEdge[direction]] = bounds[RectangleEdge[direction]];\n }\n }\n }\n else {\n targetRectangle = new Rectangle(0, 0, 0, 0);\n }\n return targetRectangle;\n}\n/**\n * If max height is less than zero it returns the bounds height instead.\n */\nfunction _getMaxHeightFromTargetRectangle(targetRectangle, targetEdge, gapSpace, bounds, coverTarget) {\n var maxHeight = 0;\n var directionalHint = DirectionalDictionary[targetEdge];\n // If cover target is set, then the max height should be calculated using the opposite of the target edge since\n // that's the direction that the callout will expand in.\n // For instance, if the directionalhint is bottomLeftEdge then the callout will position so it's bottom edge\n // is aligned with the bottom of the target and expand up towards the top of the screen and the calculated max height\n // is (bottom of target) - (top of screen) - gapSpace.\n var target = coverTarget ? directionalHint.targetEdge * -1 : directionalHint.targetEdge;\n if (target === RectangleEdge.top) {\n maxHeight = _getEdgeValue(targetRectangle, directionalHint.targetEdge) - bounds.top - gapSpace;\n }\n else if (target === RectangleEdge.bottom) {\n maxHeight = bounds.bottom - _getEdgeValue(targetRectangle, directionalHint.targetEdge) - gapSpace;\n }\n else {\n maxHeight = bounds.bottom - targetRectangle.top - gapSpace;\n }\n return maxHeight > 0 ? maxHeight : bounds.height;\n}\nfunction _positionElementRelative(props, elementToPosition, boundingRect, previousPositions) {\n var gap = props.gapSpace ? props.gapSpace : 0;\n var targetRect = _getTargetRect(boundingRect, props.target);\n var positionData = _getAlignmentData(_getPositionData(props.directionalHint, props.directionalHintForRTL, previousPositions), targetRect, boundingRect, props.coverTarget, props.alignTargetEdge);\n var positionedElement = _positionElementWithinBounds(_getRectangleFromElement(elementToPosition), targetRect, boundingRect, positionData, gap, props.directionalHintFixed, props.coverTarget);\n return __assign(__assign({}, positionedElement), { targetRectangle: targetRect });\n}\nfunction _finalizePositionData(positionedElement, hostElement, bounds, coverTarget, doNotFinalizeReturnEdge) {\n var finalizedElement = _finalizeElementPosition(positionedElement.elementRectangle, hostElement, positionedElement.targetEdge, bounds, positionedElement.alignmentEdge, coverTarget, doNotFinalizeReturnEdge, positionedElement.forcedInBounds);\n return {\n elementPosition: finalizedElement,\n targetEdge: positionedElement.targetEdge,\n alignmentEdge: positionedElement.alignmentEdge,\n };\n}\nfunction _positionElement(props, hostElement, elementToPosition, previousPositions) {\n var boundingRect = props.bounds\n ? _getRectangleFromIRect(props.bounds)\n : new Rectangle(0, window.innerWidth - getScrollbarWidth(), 0, window.innerHeight);\n var positionedElement = _positionElementRelative(props, elementToPosition, boundingRect, previousPositions);\n return _finalizePositionData(positionedElement, hostElement, boundingRect, props.coverTarget);\n}\nfunction _positionCallout(props, hostElement, callout, previousPositions, doNotFinalizeReturnEdge) {\n var beakWidth = props.isBeakVisible ? props.beakWidth || 0 : 0;\n var gap = _calculateActualBeakWidthInPixels(beakWidth) / 2 + (props.gapSpace ? props.gapSpace : 0);\n var positionProps = props;\n positionProps.gapSpace = gap;\n var boundingRect = props.bounds\n ? _getRectangleFromIRect(props.bounds)\n : new Rectangle(0, window.innerWidth - getScrollbarWidth(), 0, window.innerHeight);\n var positionedElement = _positionElementRelative(positionProps, callout, boundingRect, previousPositions);\n var beakPositioned = _positionBeak(beakWidth, positionedElement);\n var finalizedBeakPosition = _finalizeBeakPosition(positionedElement, beakPositioned, boundingRect);\n return __assign(__assign({}, _finalizePositionData(positionedElement, hostElement, boundingRect, props.coverTarget, doNotFinalizeReturnEdge)), { beakPosition: finalizedBeakPosition });\n}\nfunction _positionCard(props, hostElement, callout, previousPositions) {\n return _positionCallout(props, hostElement, callout, previousPositions, true);\n}\n// END PRIVATE FUNCTIONS\nexport var __positioningTestPackage = {\n _finalizePositionData: _finalizePositionData,\n _finalizeBeakPosition: _finalizeBeakPosition,\n _calculateActualBeakWidthInPixels: _calculateActualBeakWidthInPixels,\n _positionElementWithinBounds: _positionElementWithinBounds,\n _positionBeak: _positionBeak,\n _getPositionData: _getPositionData,\n _getMaxHeightFromTargetRectangle: _getMaxHeightFromTargetRectangle,\n};\n/**\n * Used to position an element relative to the given positioning props.\n * If positioning has been completed before, previousPositions can be passed to ensure that the positioning element\n * repositions based on its previous targets rather than starting with directionalhint.\n */\nexport function positionElement(props, hostElement, elementToPosition, previousPositions) {\n return _positionElement(props, hostElement, elementToPosition, previousPositions);\n}\nexport function positionCallout(props, hostElement, elementToPosition, previousPositions) {\n return _positionCallout(props, hostElement, elementToPosition, previousPositions);\n}\nexport function positionCard(props, hostElement, elementToPosition, previousPositions) {\n return _positionCard(props, hostElement, elementToPosition, previousPositions);\n}\n/**\n * Gets the maximum height that a rectangle can have in order to fit below or above a target.\n * If the directional hint specifies a left or right edge (i.e. leftCenter) it will limit the height to the topBorder\n * of the target given.\n * If no bounds are provided then the window is treated as the bounds.\n */\nexport function getMaxHeight(target, targetEdge, gapSpace, bounds, coverTarget) {\n if (gapSpace === void 0) { gapSpace = 0; }\n var mouseTarget = target;\n var elementTarget = target;\n var rectOrPointTarget = target;\n var targetRect;\n var boundingRectangle = bounds\n ? _getRectangleFromIRect(bounds)\n : new Rectangle(0, window.innerWidth - getScrollbarWidth(), 0, window.innerHeight);\n // eslint-disable-next-line deprecation/deprecation\n var left = rectOrPointTarget.left || rectOrPointTarget.x;\n // eslint-disable-next-line deprecation/deprecation\n var top = rectOrPointTarget.top || rectOrPointTarget.y;\n var right = rectOrPointTarget.right || left;\n var bottom = rectOrPointTarget.bottom || top;\n // eslint-disable-next-line no-extra-boolean-cast -- may not actually be a MouseEvent\n if (!!mouseTarget.stopPropagation) {\n targetRect = new Rectangle(mouseTarget.clientX, mouseTarget.clientX, mouseTarget.clientY, mouseTarget.clientY);\n }\n else if (left !== undefined && top !== undefined) {\n targetRect = new Rectangle(left, right, top, bottom);\n }\n else {\n targetRect = _getRectangleFromElement(elementTarget);\n }\n return _getMaxHeightFromTargetRectangle(targetRect, targetEdge, gapSpace, boundingRectangle, coverTarget);\n}\n/**\n * Returns the opposite edge of the given RectangleEdge.\n */\nexport function getOppositeEdge(edge) {\n return edge * -1;\n}\nfunction _getBoundsFromTargetWindow(target, targetWindow) {\n var segments = undefined;\n if (targetWindow.getWindowSegments) {\n segments = targetWindow.getWindowSegments();\n }\n // Identify if we're dealing with single screen scenarios.\n if (segments === undefined || segments.length <= 1) {\n return {\n top: 0,\n left: 0,\n right: targetWindow.innerWidth,\n bottom: targetWindow.innerHeight,\n width: targetWindow.innerWidth,\n height: targetWindow.innerHeight,\n };\n }\n // Logic for determining dual screen scenarios.\n var x = 0;\n var y = 0;\n // If the target is an Element get coordinates for its center.\n if (target !== null && !!target.getBoundingClientRect) {\n var clientRect = target.getBoundingClientRect();\n x = (clientRect.left + clientRect.right) / 2;\n y = (clientRect.top + clientRect.bottom) / 2;\n }\n // If the target is not null get x-axis and y-axis coordinates directly.\n else if (target !== null) {\n // eslint-disable-next-line deprecation/deprecation\n x = target.left || target.x;\n // eslint-disable-next-line deprecation/deprecation\n y = target.top || target.y;\n }\n var bounds = { top: 0, left: 0, right: 0, bottom: 0, width: 0, height: 0 };\n // Define which window segment are the coordinates in and calculate bounds based on that.\n for (var _i = 0, segments_1 = segments; _i < segments_1.length; _i++) {\n var segment = segments_1[_i];\n if (x && segment.left <= x && segment.right >= x && y && segment.top <= y && segment.bottom >= y) {\n bounds = {\n top: segment.top,\n left: segment.left,\n right: segment.right,\n bottom: segment.bottom,\n width: segment.width,\n height: segment.height,\n };\n }\n }\n return bounds;\n}\nexport function getBoundsFromTargetWindow(target, targetWindow) {\n return _getBoundsFromTargetWindow(target, targetWindow);\n}\n//# sourceMappingURL=positioning.js.map","export var RectangleEdge;\n(function (RectangleEdge) {\n RectangleEdge[RectangleEdge[\"top\"] = 1] = \"top\";\n RectangleEdge[RectangleEdge[\"bottom\"] = -1] = \"bottom\";\n RectangleEdge[RectangleEdge[\"left\"] = 2] = \"left\";\n RectangleEdge[RectangleEdge[\"right\"] = -2] = \"right\";\n})(RectangleEdge || (RectangleEdge = {}));\nexport var Position;\n(function (Position) {\n Position[Position[\"top\"] = 0] = \"top\";\n Position[Position[\"bottom\"] = 1] = \"bottom\";\n Position[Position[\"start\"] = 2] = \"start\";\n Position[Position[\"end\"] = 3] = \"end\";\n})(Position || (Position = {}));\n//# sourceMappingURL=positioning.types.js.map","export function getAllSelectedOptions(options, selectedIndices) {\n var selectedOptions = [];\n for (var _i = 0, selectedIndices_1 = selectedIndices; _i < selectedIndices_1.length; _i++) {\n var index = selectedIndices_1[_i];\n var option = options[index];\n if (option) {\n selectedOptions.push(option);\n }\n }\n return selectedOptions;\n}\n//# sourceMappingURL=SelectableOption.js.map","export var SelectableOptionMenuItemType;\n(function (SelectableOptionMenuItemType) {\n SelectableOptionMenuItemType[SelectableOptionMenuItemType[\"Normal\"] = 0] = \"Normal\";\n SelectableOptionMenuItemType[SelectableOptionMenuItemType[\"Divider\"] = 1] = \"Divider\";\n SelectableOptionMenuItemType[SelectableOptionMenuItemType[\"Header\"] = 2] = \"Header\";\n SelectableOptionMenuItemType[SelectableOptionMenuItemType[\"SelectAll\"] = 3] = \"SelectAll\";\n})(SelectableOptionMenuItemType || (SelectableOptionMenuItemType = {}));\n//# sourceMappingURL=SelectableOption.types.js.map","import { __assign, __extends } from \"tslib\";\nimport * as React from 'react';\nimport { Async, EventGroup, KeyCodes, elementContains, findScrollableParent, getParent, getDocument, getWindow, isElementTabbable, css, initializeComponentRef, FocusRects, } from '../../Utilities';\nimport { SelectionMode } from './interfaces';\n// Selection definitions:\n//\n// Anchor index: the point from which a range selection starts.\n// Focus index: the point from which layout movement originates from.\n//\n// These two can differ. Tests:\n//\n// If you start at index 5\n// Shift click to index 10\n// The focus is 10, the anchor is 5.\n// If you shift click at index 0\n// The anchor remains at 5, the items between 0 and 5 are selected and everything else is cleared.\n// If you click index 8\n// The anchor and focus are set to 8.\nvar SELECTION_DISABLED_ATTRIBUTE_NAME = 'data-selection-disabled';\nvar SELECTION_INDEX_ATTRIBUTE_NAME = 'data-selection-index';\nvar SELECTION_TOGGLE_ATTRIBUTE_NAME = 'data-selection-toggle';\nvar SELECTION_INVOKE_ATTRIBUTE_NAME = 'data-selection-invoke';\nvar SELECTION_INVOKE_TOUCH_ATTRIBUTE_NAME = 'data-selection-touch-invoke';\nvar SELECTALL_TOGGLE_ALL_ATTRIBUTE_NAME = 'data-selection-all-toggle';\nvar SELECTION_SELECT_ATTRIBUTE_NAME = 'data-selection-select';\n/**\n * {@docCategory Selection}\n */\nvar SelectionZone = /** @class */ (function (_super) {\n __extends(SelectionZone, _super);\n function SelectionZone(props) {\n var _this = _super.call(this, props) || this;\n _this._root = React.createRef();\n /**\n * In some cases, the consuming scenario requires to set focus on a row without having SelectionZone\n * react to the event. Note that focus events in IE \\<= 11 will occur asynchronously after .focus() has\n * been called on an element, so we need a flag to store the idea that we will bypass the \"next\"\n * focus event that occurs. This method does that.\n */\n _this.ignoreNextFocus = function () {\n _this._handleNextFocus(false);\n };\n _this._onSelectionChange = function () {\n var selection = _this.props.selection;\n var isModal = selection.isModal && selection.isModal();\n _this.setState({\n isModal: isModal,\n });\n };\n _this._onMouseDownCapture = function (ev) {\n var target = ev.target;\n if (document.activeElement !== target && !elementContains(document.activeElement, target)) {\n _this.ignoreNextFocus();\n return;\n }\n if (!elementContains(target, _this._root.current)) {\n return;\n }\n while (target !== _this._root.current) {\n if (_this._hasAttribute(target, SELECTION_INVOKE_ATTRIBUTE_NAME)) {\n _this.ignoreNextFocus();\n break;\n }\n target = getParent(target);\n }\n };\n /**\n * When we focus an item, for single/multi select scenarios, we should try to select it immediately\n * as long as the focus did not originate from a mouse down/touch event. For those cases, we handle them\n * specially.\n */\n _this._onFocus = function (ev) {\n var target = ev.target;\n var selection = _this.props.selection;\n var isToggleModifierPressed = _this._isCtrlPressed || _this._isMetaPressed;\n var selectionMode = _this._getSelectionMode();\n if (_this._shouldHandleFocus && selectionMode !== SelectionMode.none) {\n var isToggle = _this._hasAttribute(target, SELECTION_TOGGLE_ATTRIBUTE_NAME);\n var itemRoot = _this._findItemRoot(target);\n if (!isToggle && itemRoot) {\n var index = _this._getItemIndex(itemRoot);\n if (isToggleModifierPressed) {\n // set anchor only.\n selection.setIndexSelected(index, selection.isIndexSelected(index), true);\n if (_this.props.enterModalOnTouch && _this._isTouch && selection.setModal) {\n selection.setModal(true);\n _this._setIsTouch(false);\n }\n }\n else {\n if (_this.props.isSelectedOnFocus) {\n _this._onItemSurfaceClick(ev, index);\n }\n }\n }\n }\n _this._handleNextFocus(false);\n };\n _this._onMouseDown = function (ev) {\n _this._updateModifiers(ev);\n var target = ev.target;\n var itemRoot = _this._findItemRoot(target);\n // No-op if selection is disabled\n if (_this._isSelectionDisabled(target)) {\n return;\n }\n while (target !== _this._root.current) {\n if (_this._hasAttribute(target, SELECTALL_TOGGLE_ALL_ATTRIBUTE_NAME)) {\n break;\n }\n else if (itemRoot) {\n if (_this._hasAttribute(target, SELECTION_TOGGLE_ATTRIBUTE_NAME)) {\n break;\n }\n else if (_this._hasAttribute(target, SELECTION_INVOKE_ATTRIBUTE_NAME)) {\n break;\n }\n else if ((target === itemRoot || _this._shouldAutoSelect(target)) &&\n !_this._isShiftPressed &&\n !_this._isCtrlPressed &&\n !_this._isMetaPressed) {\n _this._onInvokeMouseDown(ev, _this._getItemIndex(itemRoot));\n break;\n }\n else if (_this.props.disableAutoSelectOnInputElements &&\n (target.tagName === 'A' || target.tagName === 'BUTTON' || target.tagName === 'INPUT')) {\n return;\n }\n }\n target = getParent(target);\n }\n };\n _this._onTouchStartCapture = function (ev) {\n _this._setIsTouch(true);\n };\n _this._onClick = function (ev) {\n var _a = _this.props.enableTouchInvocationTarget, enableTouchInvocationTarget = _a === void 0 ? false : _a;\n _this._updateModifiers(ev);\n var target = ev.target;\n var itemRoot = _this._findItemRoot(target);\n var isSelectionDisabled = _this._isSelectionDisabled(target);\n while (target !== _this._root.current) {\n if (_this._hasAttribute(target, SELECTALL_TOGGLE_ALL_ATTRIBUTE_NAME)) {\n if (!isSelectionDisabled) {\n _this._onToggleAllClick(ev);\n }\n break;\n }\n else if (itemRoot) {\n var index = _this._getItemIndex(itemRoot);\n if (_this._hasAttribute(target, SELECTION_TOGGLE_ATTRIBUTE_NAME)) {\n if (!isSelectionDisabled) {\n if (_this._isShiftPressed) {\n _this._onItemSurfaceClick(ev, index);\n }\n else {\n _this._onToggleClick(ev, index);\n }\n }\n break;\n }\n else if ((_this._isTouch &&\n enableTouchInvocationTarget &&\n _this._hasAttribute(target, SELECTION_INVOKE_TOUCH_ATTRIBUTE_NAME)) ||\n _this._hasAttribute(target, SELECTION_INVOKE_ATTRIBUTE_NAME)) {\n // Items should be invokable even if selection is disabled.\n _this._onInvokeClick(ev, index);\n break;\n }\n else if (target === itemRoot) {\n if (!isSelectionDisabled) {\n _this._onItemSurfaceClick(ev, index);\n }\n break;\n }\n else if (target.tagName === 'A' || target.tagName === 'BUTTON' || target.tagName === 'INPUT') {\n return;\n }\n }\n target = getParent(target);\n }\n };\n _this._onContextMenu = function (ev) {\n var target = ev.target;\n var _a = _this.props, onItemContextMenu = _a.onItemContextMenu, selection = _a.selection;\n if (onItemContextMenu) {\n var itemRoot = _this._findItemRoot(target);\n if (itemRoot) {\n var index = _this._getItemIndex(itemRoot);\n _this._onInvokeMouseDown(ev, index);\n var skipPreventDefault = onItemContextMenu(selection.getItems()[index], index, ev.nativeEvent);\n // In order to keep back compat, if the value here is undefined, then we should still\n // call preventDefault(). Only in the case where true is explicitly returned should\n // the call be skipped.\n if (!skipPreventDefault) {\n ev.preventDefault();\n }\n }\n }\n };\n /**\n * In multi selection, if you double click within an item's root (but not within the invoke element or\n * input elements), we should execute the invoke handler.\n */\n _this._onDoubleClick = function (ev) {\n var target = ev.target;\n var onItemInvoked = _this.props.onItemInvoked;\n var itemRoot = _this._findItemRoot(target);\n if (itemRoot && onItemInvoked && !_this._isInputElement(target)) {\n var index = _this._getItemIndex(itemRoot);\n while (target !== _this._root.current) {\n if (_this._hasAttribute(target, SELECTION_TOGGLE_ATTRIBUTE_NAME) ||\n _this._hasAttribute(target, SELECTION_INVOKE_ATTRIBUTE_NAME)) {\n break;\n }\n else if (target === itemRoot) {\n _this._onInvokeClick(ev, index);\n break;\n }\n target = getParent(target);\n }\n target = getParent(target);\n }\n };\n _this._onKeyDownCapture = function (ev) {\n _this._updateModifiers(ev);\n _this._handleNextFocus(true);\n };\n _this._onKeyDown = function (ev) {\n _this._updateModifiers(ev);\n var target = ev.target;\n var isSelectionDisabled = _this._isSelectionDisabled(target);\n var selection = _this.props.selection;\n // eslint-disable-next-line deprecation/deprecation\n var isSelectAllKey = ev.which === KeyCodes.a && (_this._isCtrlPressed || _this._isMetaPressed);\n // eslint-disable-next-line deprecation/deprecation\n var isClearSelectionKey = ev.which === KeyCodes.escape;\n // Ignore key downs from input elements.\n if (_this._isInputElement(target)) {\n // A key was pressed while an item in this zone was focused.\n return;\n }\n var selectionMode = _this._getSelectionMode();\n // If ctrl-a is pressed, select all (if all are not already selected.)\n if (isSelectAllKey && selectionMode === SelectionMode.multiple && !selection.isAllSelected()) {\n if (!isSelectionDisabled) {\n selection.setAllSelected(true);\n }\n ev.stopPropagation();\n ev.preventDefault();\n return;\n }\n // If escape is pressed, clear selection (if any are selected.)\n if (isClearSelectionKey && selection.getSelectedCount() > 0) {\n if (!isSelectionDisabled) {\n selection.setAllSelected(false);\n }\n ev.stopPropagation();\n ev.preventDefault();\n return;\n }\n var itemRoot = _this._findItemRoot(target);\n // If a key was pressed within an item, we should treat \"enters\" as invokes and \"space\" as toggle\n if (itemRoot) {\n var index = _this._getItemIndex(itemRoot);\n while (target !== _this._root.current) {\n if (_this._hasAttribute(target, SELECTION_TOGGLE_ATTRIBUTE_NAME)) {\n // For toggle elements, assuming they are rendered as buttons, they will generate a click event,\n // so we can no-op for any keydowns in this case.\n break;\n }\n else if (_this._shouldAutoSelect(target)) {\n if (!isSelectionDisabled) {\n // If the event went to an element which should trigger auto-select, select it and then let\n // the default behavior kick in.\n _this._onInvokeMouseDown(ev, index);\n }\n break;\n }\n else if (\n // eslint-disable-next-line deprecation/deprecation\n (ev.which === KeyCodes.enter || ev.which === KeyCodes.space) &&\n (target.tagName === 'BUTTON' || target.tagName === 'A' || target.tagName === 'INPUT')) {\n return false;\n }\n else if (target === itemRoot) {\n // eslint-disable-next-line deprecation/deprecation\n if (ev.which === KeyCodes.enter) {\n // Items should be invokable even if selection is disabled.\n _this._onInvokeClick(ev, index);\n ev.preventDefault();\n return;\n // eslint-disable-next-line deprecation/deprecation\n }\n else if (ev.which === KeyCodes.space) {\n if (!isSelectionDisabled) {\n _this._onToggleClick(ev, index);\n }\n ev.preventDefault();\n return;\n }\n break;\n }\n target = getParent(target);\n }\n }\n };\n _this._events = new EventGroup(_this);\n _this._async = new Async(_this);\n initializeComponentRef(_this);\n var selection = _this.props.selection;\n // Reflect the initial modal state of selection into the state.\n var isModal = selection.isModal && selection.isModal();\n _this.state = {\n isModal: isModal,\n };\n return _this;\n }\n SelectionZone.getDerivedStateFromProps = function (nextProps, prevState) {\n var isModal = nextProps.selection.isModal && nextProps.selection.isModal();\n return __assign(__assign({}, prevState), { isModal: isModal });\n };\n SelectionZone.prototype.componentDidMount = function () {\n var win = getWindow(this._root.current);\n // Track the latest modifier keys globally.\n this._events.on(win, 'keydown, keyup', this._updateModifiers, true);\n this._events.on(document, 'click', this._findScrollParentAndTryClearOnEmptyClick);\n this._events.on(document.body, 'touchstart', this._onTouchStartCapture, true);\n this._events.on(document.body, 'touchend', this._onTouchStartCapture, true);\n // Subscribe to the selection to keep modal state updated.\n this._events.on(this.props.selection, 'change', this._onSelectionChange);\n };\n SelectionZone.prototype.render = function () {\n var isModal = this.state.isModal;\n return (React.createElement(\"div\", { className: css('ms-SelectionZone', this.props.className, {\n 'ms-SelectionZone--modal': !!isModal,\n }), ref: this._root, onKeyDown: this._onKeyDown, onMouseDown: this._onMouseDown, onKeyDownCapture: this._onKeyDownCapture, onClick: this._onClick, role: \"presentation\", onDoubleClick: this._onDoubleClick, onContextMenu: this._onContextMenu, onMouseDownCapture: this._onMouseDownCapture, onFocusCapture: this._onFocus, \"data-selection-is-modal\": isModal ? true : undefined },\n this.props.children,\n React.createElement(FocusRects, null)));\n };\n SelectionZone.prototype.componentDidUpdate = function (previousProps) {\n var selection = this.props.selection;\n if (selection !== previousProps.selection) {\n // Whenever selection changes, update the subscripton to keep modal state updated.\n this._events.off(previousProps.selection);\n this._events.on(selection, 'change', this._onSelectionChange);\n }\n };\n SelectionZone.prototype.componentWillUnmount = function () {\n this._events.dispose();\n this._async.dispose();\n };\n SelectionZone.prototype._isSelectionDisabled = function (target) {\n if (this._getSelectionMode() === SelectionMode.none) {\n return true;\n }\n while (target !== this._root.current) {\n if (this._hasAttribute(target, SELECTION_DISABLED_ATTRIBUTE_NAME)) {\n return true;\n }\n target = getParent(target);\n }\n return false;\n };\n SelectionZone.prototype._onToggleAllClick = function (ev) {\n var selection = this.props.selection;\n var selectionMode = this._getSelectionMode();\n if (selectionMode === SelectionMode.multiple) {\n selection.toggleAllSelected();\n ev.stopPropagation();\n ev.preventDefault();\n }\n };\n SelectionZone.prototype._onToggleClick = function (ev, index) {\n var selection = this.props.selection;\n var selectionMode = this._getSelectionMode();\n selection.setChangeEvents(false);\n if (this.props.enterModalOnTouch && this._isTouch && !selection.isIndexSelected(index) && selection.setModal) {\n selection.setModal(true);\n this._setIsTouch(false);\n }\n if (selectionMode === SelectionMode.multiple) {\n selection.toggleIndexSelected(index);\n }\n else if (selectionMode === SelectionMode.single) {\n var isSelected = selection.isIndexSelected(index);\n var isModal = selection.isModal && selection.isModal();\n selection.setAllSelected(false);\n selection.setIndexSelected(index, !isSelected, true);\n if (isModal && selection.setModal) {\n // Since the above call to setAllSelected(false) clears modal state,\n // restore it. This occurs because the SelectionMode of the Selection\n // may differ from the SelectionZone.\n selection.setModal(true);\n }\n }\n else {\n selection.setChangeEvents(true);\n return;\n }\n selection.setChangeEvents(true);\n ev.stopPropagation();\n // NOTE: ev.preventDefault is not called for toggle clicks, because this will kill the browser behavior\n // for checkboxes if you use a checkbox for the toggle.\n };\n SelectionZone.prototype._onInvokeClick = function (ev, index) {\n var _a = this.props, selection = _a.selection, onItemInvoked = _a.onItemInvoked;\n if (onItemInvoked) {\n onItemInvoked(selection.getItems()[index], index, ev.nativeEvent);\n ev.preventDefault();\n ev.stopPropagation();\n }\n };\n SelectionZone.prototype._onItemSurfaceClick = function (ev, index) {\n var selection = this.props.selection;\n var isToggleModifierPressed = this._isCtrlPressed || this._isMetaPressed;\n var selectionMode = this._getSelectionMode();\n if (selectionMode === SelectionMode.multiple) {\n if (this._isShiftPressed && !this._isTabPressed) {\n selection.selectToIndex(index, !isToggleModifierPressed);\n }\n else if (isToggleModifierPressed) {\n selection.toggleIndexSelected(index);\n }\n else {\n this._clearAndSelectIndex(index);\n }\n }\n else if (selectionMode === SelectionMode.single) {\n this._clearAndSelectIndex(index);\n }\n };\n SelectionZone.prototype._onInvokeMouseDown = function (ev, index) {\n var selection = this.props.selection;\n // Only do work if item is not selected.\n if (selection.isIndexSelected(index)) {\n return;\n }\n this._clearAndSelectIndex(index);\n };\n /**\n * To avoid high startup cost of traversing the DOM on component mount,\n * defer finding the scrollable parent until a click interaction.\n *\n * The styles will probably already calculated since we're running in a click handler,\n * so this is less likely to cause layout thrashing then doing it in mount.\n */\n SelectionZone.prototype._findScrollParentAndTryClearOnEmptyClick = function (ev) {\n var scrollParent = findScrollableParent(this._root.current);\n // unbind this handler and replace binding with a binding on the actual scrollable parent\n this._events.off(document, 'click', this._findScrollParentAndTryClearOnEmptyClick);\n this._events.on(scrollParent, 'click', this._tryClearOnEmptyClick);\n // If we clicked inside the scrollable parent, call through to the handler on this click.\n if ((scrollParent && ev.target instanceof Node && scrollParent.contains(ev.target)) || scrollParent === ev.target) {\n this._tryClearOnEmptyClick(ev);\n }\n };\n SelectionZone.prototype._tryClearOnEmptyClick = function (ev) {\n if (!this.props.selectionPreservedOnEmptyClick && this._isNonHandledClick(ev.target)) {\n this.props.selection.setAllSelected(false);\n }\n };\n SelectionZone.prototype._clearAndSelectIndex = function (index) {\n var selection = this.props.selection;\n var isAlreadySingleSelected = selection.getSelectedCount() === 1 && selection.isIndexSelected(index);\n if (!isAlreadySingleSelected) {\n var isModal = selection.isModal && selection.isModal();\n selection.setChangeEvents(false);\n selection.setAllSelected(false);\n selection.setIndexSelected(index, true, true);\n if (isModal || (this.props.enterModalOnTouch && this._isTouch)) {\n if (selection.setModal) {\n selection.setModal(true);\n }\n if (this._isTouch) {\n this._setIsTouch(false);\n }\n }\n selection.setChangeEvents(true);\n }\n };\n /**\n * We need to track the modifier key states so that when focus events occur, which do not contain\n * modifier states in the Event object, we know how to behave.\n */\n SelectionZone.prototype._updateModifiers = function (ev) {\n this._isShiftPressed = ev.shiftKey;\n this._isCtrlPressed = ev.ctrlKey;\n this._isMetaPressed = ev.metaKey;\n var keyCode = ev.keyCode;\n this._isTabPressed = keyCode ? keyCode === KeyCodes.tab : false;\n };\n SelectionZone.prototype._findItemRoot = function (target) {\n var selection = this.props.selection;\n while (target !== this._root.current) {\n var indexValue = target.getAttribute(SELECTION_INDEX_ATTRIBUTE_NAME);\n var index = Number(indexValue);\n if (indexValue !== null && index >= 0 && index < selection.getItems().length) {\n break;\n }\n target = getParent(target);\n }\n if (target === this._root.current) {\n return undefined;\n }\n return target;\n };\n SelectionZone.prototype._getItemIndex = function (itemRoot) {\n return Number(itemRoot.getAttribute(SELECTION_INDEX_ATTRIBUTE_NAME));\n };\n SelectionZone.prototype._shouldAutoSelect = function (element) {\n return this._hasAttribute(element, SELECTION_SELECT_ATTRIBUTE_NAME);\n };\n SelectionZone.prototype._hasAttribute = function (element, attributeName) {\n var isToggle = false;\n while (!isToggle && element !== this._root.current) {\n isToggle = element.getAttribute(attributeName) === 'true';\n element = getParent(element);\n }\n return isToggle;\n };\n SelectionZone.prototype._isInputElement = function (element) {\n return element.tagName === 'INPUT' || element.tagName === 'TEXTAREA';\n };\n SelectionZone.prototype._isNonHandledClick = function (element) {\n var doc = getDocument();\n if (doc && element) {\n while (element && element !== doc.documentElement) {\n if (isElementTabbable(element)) {\n return false;\n }\n element = getParent(element);\n }\n }\n return true;\n };\n SelectionZone.prototype._handleNextFocus = function (handleFocus) {\n var _this = this;\n if (this._shouldHandleFocusTimeoutId) {\n this._async.clearTimeout(this._shouldHandleFocusTimeoutId);\n this._shouldHandleFocusTimeoutId = undefined;\n }\n this._shouldHandleFocus = handleFocus;\n if (handleFocus) {\n this._async.setTimeout(function () {\n _this._shouldHandleFocus = false;\n }, 100);\n }\n };\n SelectionZone.prototype._setIsTouch = function (isTouch) {\n var _this = this;\n if (this._isTouchTimeoutId) {\n this._async.clearTimeout(this._isTouchTimeoutId);\n this._isTouchTimeoutId = undefined;\n }\n this._isTouch = true;\n if (isTouch) {\n this._async.setTimeout(function () {\n _this._isTouch = false;\n }, 300);\n }\n };\n SelectionZone.prototype._getSelectionMode = function () {\n var selection = this.props.selection;\n var _a = this.props.selectionMode, selectionMode = _a === void 0 ? selection ? selection.mode : SelectionMode.none : _a;\n return selectionMode;\n };\n SelectionZone.defaultProps = {\n isSelectedOnFocus: true,\n selectionMode: SelectionMode.multiple,\n };\n return SelectionZone;\n}(React.Component));\nexport { SelectionZone };\n//# sourceMappingURL=SelectionZone.js.map","import * as React from 'react';\nimport { useRefEffect } from '@fluentui/react-hooks';\nimport { getWindow } from '@fluentui/utilities';\nimport { observeResize } from './observeResize';\n/**\n * Track whether any items don't fit within their container, and move them to the overflow menu.\n * Items are moved into the overflow menu from back to front, excluding pinned items.\n *\n * The overflow menu button must be the last sibling of all of the items that can be put into the overflow, and it\n * must be hooked up to the `setMenuButtonRef` setter function that's returned by `useOverflow`:\n * ```ts\n * const overflow = useOverflow(...);\n * ```\n * ```jsx\n * \n * // Index 0\n * // Index 1\n * ...\n *