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AAoBC,EACpB7C,EAAuB6C,EAAeZ,EAAM7O,KAAI,SAAU0P,EAAKC,GAAS,MAAO,CAC3ED,IAAKA,EACLE,cAAeD,GAASF,GAAiBE,IAAU7C,EACnD,KAEZ,EACIqB,OAAuBrS,EAG3B,QAAkCA,IAA9BkR,EAAkBrQ,QAAuB,CACzC,IAAImR,GAAQ,EAAAC,EAAA,GAAUZ,GACtB,GAAIW,EAAO,CACP,IAAIE,EAAqBF,EAAMG,sBAAsBlB,EAAkBpQ,SACvEwR,EAAuB,WAAc,OAAOL,EAAMK,qBAAqBH,EAAqB,CAChG,CACJ,CACA,OAAO,WACCG,GACAA,IAIJoB,EAAiBV,EAAMzO,QACvB2M,EAAkBpQ,aAAUb,CAChC,CAxEA,CAyEJ,IACO,CAAE2S,cAAeA,EAC5B,C,mCEzHA,IAAIoB,EAAgB,CAAC,EAEjBC,OAAOhU,EACX,IACIgU,EAAOjU,MACX,CACA,MAAOkU,GAEP,CACO,SAASC,EAAWC,EAAaC,GACpC,QAAoB,IAATJ,EAAsB,CAE7B,IAAIK,EAAYL,EAAKM,aAAeN,EAAKM,cAAgB,CAAC,EAG1D,IAAKD,EAASF,KAAiBJ,EAAcI,GACzCJ,EAAcI,GAAeC,GACbC,EAASF,GAAeE,EAASF,IAAgB,IACxD5N,KAAK6N,EAEtB,CACJ,CCrBAF,EAAW,wBAAyB,Q","sources":["file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@fluentui+react@8.122.5_53swvjg5d4vee6odcktdjzlijq/node_modules/@fluentui/react/lib/utilities/dom.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@fluentui+react@8.122.5_53swvjg5d4vee6odcktdjzlijq/node_modules/@fluentui/react/lib/utilities/hooks/useResponsiveMode.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@fluentui+react@8.122.5_53swvjg5d4vee6odcktdjzlijq/node_modules/@fluentui/react/lib/utilities/keytips/KeytipConstants.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@fluentui+react@8.122.5_53swvjg5d4vee6odcktdjzlijq/node_modules/@fluentui/react/lib/utilities/keytips/KeytipManager.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@fluentui+react@8.122.5_53swvjg5d4vee6odcktdjzlijq/node_modules/@fluentui/react/lib/utilities/keytips/KeytipUtils.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@fluentui+react@8.122.5_53swvjg5d4vee6odcktdjzlijq/node_modules/@fluentui/react/lib/utilities/positioning/positioning.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@fluentui+react@8.122.5_53swvjg5d4vee6odcktdjzlijq/node_modules/@fluentui/react/lib/utilities/positioning/positioning.types.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@fluentui+react@8.122.5_53swvjg5d4vee6odcktdjzlijq/node_modules/@fluentui/react/lib/utilities/selectableOption/SelectableOption.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@fluentui+react@8.122.5_53swvjg5d4vee6odcktdjzlijq/node_modules/@fluentui/react/lib/utilities/selectableOption/SelectableOption.types.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@fluentui+react@8.122.5_53swvjg5d4vee6odcktdjzlijq/node_modules/@fluentui/react/lib/utilities/useOverflow.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@fluentui+react@8.122.5_53swvjg5d4vee6odcktdjzlijq/node_modules/@fluentui/react/lib/utilities/observeResize.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@fluentui+set-version@8.2.23/node_modules/@fluentui/set-version/lib/setVersion.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@fluentui+set-version@8.2.23/node_modules/@fluentui/set-version/lib/index.js"],"sourcesContent":["import { useDocument, useWindow } from '@fluentui/react-window-provider';\n/**\n * NOTE: the check for `window`/`document` is a bit verbose and perhaps\n * overkill but it ensures the prior assumbed behavior of directly\n * calling `window`/`document` is preserved.\n *\n * It is possible to set `window` to undefined on `WindowProvider` so\n * we'll fallback to directly accessing the global in that (hopefully unlikely)\n * case.\n */\n/**\n * Get a reference to the `document` object.\n * Use this in place of the global `document` in React function components.\n * @returns Document | undefined\n */\nexport var useDocumentEx = function () {\n var _a;\n // eslint-disable-next-line no-restricted-globals\n return (_a = useDocument()) !== null && _a !== void 0 ? _a : (typeof document !== 'undefined' ? document : undefined);\n};\n/**\n * Get a reference to the `window` object.\n * Use this in place of the global `window` in React function components.\n * @returns Window | undefined\n */\nexport var useWindowEx = function () {\n var _a;\n // eslint-disable-next-line no-restricted-globals\n return (_a = useWindow()) !== null && _a !== void 0 ? _a : (typeof window !== 'undefined' ? window : undefined);\n};\n/**\n * Get a reference to the `document` object.\n * Use this in place of the global `document` in React class components.\n *\n * @param ctx - Class component WindowContext\n * @returns Document | undefined\n */\nexport var getDocumentEx = function (ctx) {\n var _a, _b;\n // eslint-disable-next-line no-restricted-globals\n return (_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.window) === null || _a === void 0 ? void 0 : _a.document) !== null && _b !== void 0 ? _b : (typeof document !== 'undefined' ? document : undefined);\n};\n/**\n * Get a reference to the `window` object.\n * Use this in place of the global `window` in React class components.\n *\n * @param ctx - Class component WindowContext\n * @returns Window | undefined\n */\nexport var getWindowEx = function (ctx) {\n var _a;\n // eslint-disable-next-line no-restricted-globals\n return (_a = ctx === null || ctx === void 0 ? void 0 : ctx.window) !== null && _a !== void 0 ? _a : (typeof window !== 'undefined' ? window : undefined);\n};\n//# sourceMappingURL=dom.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","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, true);\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, true).pop();\n var newKeySequences = __spreadArray([], keySequences, true);\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","var _a;\nimport { __assign } from \"tslib\";\nimport { DirectionalHint } from '../../common/DirectionalHint';\nimport { getScrollbarWidth, getRTL, getWindow } 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 * Returns true if scroll-resizing will move the target edge within the bounding rectangle,\n * and there is room between the target edge and the bounding edge for scrolled content.\n * Returns false otherwise.\n */\nfunction _canScrollResizeToFitEdge(target, bounding, targetEdge, minimumScrollResizeHeight) {\n if (minimumScrollResizeHeight === void 0) { minimumScrollResizeHeight = 200; }\n // Only scroll vertically to fit - cannot scroll to fit right or left edges\n if (targetEdge !== RectangleEdge.bottom && targetEdge !== RectangleEdge.top) {\n return false;\n }\n return _getRelativeEdgeDifference(target, bounding, targetEdge) >= minimumScrollResizeHeight;\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, shouldScroll, minimumScrollResizeHeight, gap) {\n if (shouldScroll === void 0) { shouldScroll = false; }\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 // Edge is in bounds, return current estimate\n return {\n elementRectangle: currentEstimate,\n targetEdge: currentEdge,\n alignmentEdge: currentAlignment,\n };\n }\n else if (shouldScroll && _canScrollResizeToFitEdge(target, bounding, currentEdge, minimumScrollResizeHeight)) {\n // Scrolling will allow edge to fit, move the estimate currentEdge inside the bounds and return\n switch (currentEdge) {\n case RectangleEdge.bottom:\n currentEstimate.bottom = bounding.bottom;\n break;\n case RectangleEdge.top:\n currentEstimate.top = bounding.top;\n break;\n }\n return {\n elementRectangle: currentEstimate,\n targetEdge: currentEdge,\n alignmentEdge: currentAlignment,\n forcedInBounds: true,\n };\n }\n else {\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 }\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, shouldScroll, minimumScrollResizeHeight, gap, directionalHintFixed, coverTarget) {\n if (shouldScroll === void 0) { shouldScroll = false; }\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, shouldScroll, minimumScrollResizeHeight, 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, shouldScroll, minimumScrollResizeHeight, directionalHintFixed, coverTarget) {\n if (shouldScroll === void 0) { shouldScroll = false; }\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, shouldScroll, minimumScrollResizeHeight, 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 // eslint-disable-next-line deprecation/deprecation\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, shouldScroll, minimumScrollResizeHeight) {\n if (shouldScroll === void 0) { shouldScroll = false; }\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, shouldScroll, minimumScrollResizeHeight, 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, win) {\n var theWin = win !== null && win !== void 0 ? win : getWindow();\n var boundingRect = props.bounds\n ? _getRectangleFromIRect(props.bounds)\n : new Rectangle(0, theWin.innerWidth - getScrollbarWidth(), 0, theWin.innerHeight);\n var positionedElement = _positionElementRelative(props, elementToPosition, boundingRect, previousPositions);\n return _finalizePositionData(positionedElement, hostElement, boundingRect, props.coverTarget);\n}\nfunction _calculateGapSpace(isBeakVisible, beakWidth, gapSpace) {\n if (beakWidth === void 0) { beakWidth = 0; }\n if (gapSpace === void 0) { gapSpace = 0; }\n return _calculateActualBeakWidthInPixels(isBeakVisible ? beakWidth : 0) / 2 + gapSpace;\n}\nfunction _positionCallout(props, hostElement, callout, previousPositions, shouldScroll, minimumScrollResizeHeight, doNotFinalizeReturnEdge, win) {\n if (shouldScroll === void 0) { shouldScroll = false; }\n var theWin = win !== null && win !== void 0 ? win : getWindow();\n var beakWidth = props.isBeakVisible ? props.beakWidth || 0 : 0;\n var gap = _calculateGapSpace(props.isBeakVisible, props.beakWidth, props.gapSpace);\n var positionProps = props;\n positionProps.gapSpace = gap;\n var boundingRect = props.bounds\n ? _getRectangleFromIRect(props.bounds)\n : new Rectangle(0, theWin.innerWidth - getScrollbarWidth(), 0, theWin.innerHeight);\n var positionedElement = _positionElementRelative(positionProps, callout, boundingRect, previousPositions, shouldScroll, minimumScrollResizeHeight);\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, win) {\n var theWin = win !== null && win !== void 0 ? win : getWindow();\n return _positionCallout(props, hostElement, callout, previousPositions, false, undefined, true, theWin);\n}\nfunction _getRectangleFromTarget(target) {\n var _a, _b, _c, _d;\n var mouseTarget = target;\n var elementTarget = target;\n var rectOrPointTarget = target;\n var targetRect;\n // eslint-disable-next-line deprecation/deprecation\n var left = (_a = rectOrPointTarget.left) !== null && _a !== void 0 ? _a : rectOrPointTarget.x;\n // eslint-disable-next-line deprecation/deprecation\n var top = (_b = rectOrPointTarget.top) !== null && _b !== void 0 ? _b : rectOrPointTarget.y;\n var right = (_c = rectOrPointTarget.right) !== null && _c !== void 0 ? _c : left;\n var bottom = (_d = rectOrPointTarget.bottom) !== null && _d !== void 0 ? _d : 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 targetRect;\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, win) {\n return _positionElement(props, hostElement, elementToPosition, previousPositions, win);\n}\nexport function positionCallout(props, hostElement, elementToPosition, previousPositions, shouldScroll, minimumScrollResizeHeight, win) {\n return _positionCallout(props, hostElement, elementToPosition, previousPositions, shouldScroll, minimumScrollResizeHeight, undefined, win);\n}\nexport function positionCard(props, hostElement, elementToPosition, previousPositions, win) {\n return _positionCard(props, hostElement, elementToPosition, previousPositions, win);\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, win) {\n if (gapSpace === void 0) { gapSpace = 0; }\n var theWin = win !== null && win !== void 0 ? win : getWindow();\n var targetRect = _getRectangleFromTarget(target);\n var boundingRectangle = bounds\n ? _getRectangleFromIRect(bounds)\n : new Rectangle(0, theWin.innerWidth - getScrollbarWidth(), 0, theWin.innerHeight);\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}\nexport function calculateGapSpace(isBeakVisible, beakWidth, gapSpace) {\n return _calculateGapSpace(isBeakVisible, beakWidth, gapSpace);\n}\nexport function getRectangleFromTarget(target) {\n return _getRectangleFromTarget(target);\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 * as React from 'react';\nimport { useIsomorphicLayoutEffect, 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 *