{"version":3,"sources":["../../../node_modules/@fluentui/react-utilities/lib/hooks/useOnClickOutside.js","../../../node_modules/@fluentui/react-positioning/lib/utils/mergeArrowOffset.js","../../../node_modules/@fluentui/react-portal/lib/virtualParent/getParent.js","../../../node_modules/@fluentui/react-portal/lib/virtualParent/isVirtualElement.js","../../../node_modules/@fluentui/react-portal/lib/virtualParent/elementContains.js","../../../node_modules/@fluentui/react-popover/lib/components/Popover/constants.js","../../../node_modules/@fluentui/react-popover/lib/components/Popover/usePopover.js","../../../node_modules/@fluentui/react-positioning/lib/usePositioningMouseTarget.js","../../../node_modules/@fluentui/react-positioning/lib/createVirtualElementFromClick.js","../../../node_modules/@fluentui/react-utilities/lib/hooks/useOnScrollOutside.js","../../../node_modules/@fluentui/react-popover/lib/components/Popover/renderPopover.js","../../../node_modules/@fluentui/react-popover/lib/components/Popover/Popover.js","../../../node_modules/@fluentui/react-tabster/lib/hooks/useModalAttributes.js","../../../node_modules/@fluentui/react-popover/lib/popoverContext.js","../../../node_modules/@fluentui/react-popover/lib/components/PopoverSurface/PopoverSurface.js","../../../node_modules/@fluentui/react-popover/lib/components/PopoverSurface/usePopoverSurface.js","../../../node_modules/@fluentui/react-popover/lib/components/PopoverSurface/renderPopoverSurface.js","../../../node_modules/@fluentui/react-popover/lib/components/PopoverSurface/usePopoverSurfaceStyles.js","../../../node_modules/@fluentui/react-utilities/lib/trigger/isFluentTrigger.js","../../../node_modules/@fluentui/react-utilities/lib/trigger/applyTriggerPropsToChildren.js","../../../node_modules/@fluentui/react-popover/lib/components/PopoverTrigger/usePopoverTrigger.js","../../../node_modules/@fluentui/react-utilities/lib/trigger/getTriggerChild.js","../../../node_modules/@fluentui/react-popover/lib/components/PopoverTrigger/PopoverTrigger.js","../../../node_modules/@fluentui/react-popover/lib/components/PopoverTrigger/renderPopoverTrigger.js"],"names":["getWindowEvent","target","_target_ownerDocument","_target_ownerDocument_defaultView","_target_ownerDocument_defaultView_event","window","event","ownerDocument","defaultView","undefined","useIFrameFocus","options","disabled","element","targetDocument","callback","contains","containsProp","parent","child","pollDuration","refs","timeoutRef","react","listener","Object","useEventCallback","e","every","ref","current","addEventListener","removeEventListener","_targetDocument_defaultView","setInterval","activeElement","tagName","CustomEvent","bubbles","dispatchEvent","clearTimeout","addArrowOffset","offset","arrowHeight","mainAxis","_offset_mainAxis","getParent","skipVirtual","virtualParent","_virtual","getVirtualParent","parentNode","elementContains","set","WeakSet","nextParent","has","add","popoverSurfaceBorderRadius","usePopover_unstable","props","contextTarget","setContextTarget","initialState","virtualElement","setVirtualElement","mouseevent","MouseEvent","nativeEvent","left","clientX","top","clientY","right","bottom","getBoundingClientRect","x","y","height","width","createVirtualElementFromClick","usePositioningMouseTarget","size","children","toArray","popoverTrigger","popoverSurface","length","open","setOpenState","state","onOpenChange","data","_state_onOpenChange","call","useControllableState","defaultState","defaultOpen","setOpen","shouldOpen","type","useOpenState","setOpenTimeoutRef","_props_mouseLeaveDelay","Event","persist","setTimeout","mouseLeaveDelay","toggleOpen","positioningRefs","positioningOptions","position","align","arrowPadding","openOnContext","resolvePositioningShorthand","positioning","coverTarget","withArrow","userOffset","usePopoverSurfaceStyles","offsetParams","targetRef","triggerRef","containerRef","contentRef","arrowRef","usePositioning","usePopoverRefs","ProviderContext","timeoutId","ev","currentEvent","conditionalHandler","useOnClickOutside","closeOnScroll","useOnScrollOutside","findFirstFocusable","useFocusFinders","_props_inertTrapFocus","_props_inline","unstable_disableAutoFocus","_positioningRefs_contentRef_current_getAttribute","containerTabIndex","getAttribute","firstFocusable","isNaN","focus","inertTrapFocus","legacyTrapFocus","inline","Popover","appearance","mountNode","openOnHover","trapFocus","popoverContext","Provider","value","renderPopover_unstable","displayName","__webpack_require__","d","__webpack_exports__","useModalAttributes","_fluentui_react_utilities__WEBPACK_IMPORTED_MODULE_0__","_useTabsterAttributes__WEBPACK_IMPORTED_MODULE_1__","tabster__WEBPACK_IMPORTED_MODULE_2__","_useTabster__WEBPACK_IMPORTED_MODULE_3__","alwaysFocusable","tabster","id","modalAttributes","deloser","modalizer","isOthersAccessible","isAlwaysAccessible","isTrapped","triggerAttributes","PopoverContext","usePopoverContext_unstable","_fluentui_react_context_selector__WEBPACK_IMPORTED_MODULE_0__","_fluentui_react_context_selector__WEBPACK_IMPORTED_MODULE_1__","popoverContextDefaultValue","selector","ctx","PopoverSurface","context","components","root","getNativeElementProps","useMergedRefs","role","aria-modal","onMouseEnter","onMouseEnterOriginal","onMouseLeave","onMouseLeaveOriginal","onKeyDown","onKeyDownOriginal","_contentRef_current","key","usePopoverSurface_unstable","usePopoverSurfaceStyles_unstable","useCustomStyles","CustomStyleHooksContext","slots","slotProps","getSlotsNext","surface","createElement","className","arrowClassName","Portal","renderPopoverSurface_unstable","arrowHeights","_griffel_react__WEBPACK_IMPORTED_MODULE_0__","_griffel_react__WEBPACK_IMPORTED_MODULE_1__","popoverSurfaceClassNames","small","medium","large","useStyles","sj55zd","De3pzq","E5pizo","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","inverted","brand","smallPadding","z8tnut","z189sj","Byoj8tv","uwmqm3","mediumPadding","largePadding","smallArrow","a9b677","Bqenvij","mediumLargeArrow","arrow","qhf8xq","Bcdw1i0","Bj3rh1h","Ftih45","B1puzpu","Brfgrao","Bcvre1j","Ccq8qp","Baz25je","cmx5o7","B4f6apu","m598lv","Bk5zm6e","y0oebl","qa3bma","Bqjgrrk","Budzafs","Hv9wc6","hl6cv3","Bh2vraf","yayu3t","wedwtw","rhl9o9","Bu8t5uz","B6q6orb","Bwwlvwl","styles","isFluentTrigger","Boolean","isFluentTriggerComponent","applyTriggerPropsToChildren","triggerChildProps","cloneTriggerTree","triggerProps","Error","grandchild","usePopoverTrigger_unstable","disableButtonEnhancement","getTriggerChild","contextMenuProps","aria-expanded","mergeCallbacks","onContextMenu","preventDefault","onClick","keys","stopPropagation","ariaButtonTriggerChildProps","useARIAButtonProps","PopoverTrigger","renderPopoverTrigger_unstable"],"mappings":"yJAMO,MAoDPA,EAAAC,IAEA,IAAAC,EAAAC,EAKAC,EANA,GAAAH,EAEA,wBAAAA,EAAAI,QAAAJ,EAAAI,SAAAJ,EAEAA,EAAAK,MAIA,QAAAF,EAAA,QAAAF,EAAAD,EAAAM,qBAAA,IAAAL,OAAA,UAAAC,EAAAD,EAAAM,mBAAA,IAAAL,OAAA,EAAAA,EAAAG,aAAA,IAAAF,SAAAK,GAeAC,EAAAC,IACA,MAAAC,SACAA,EACAC,QAAAC,EAAAC,SACAA,EACAC,SAAAC,EAAA,EAAAC,EAAAC,OACA,OAAAD,QAAA,IAAAA,OAAA,EAAAA,EAAAF,SAAAG,KACKC,aACLA,EAAA,IAAAC,KACAA,GACGV,EACHW,EAAqBC,EAAA,SACrBC,EAAmBC,OAAAC,EAAA,EAAAD,CAAgBE,IACnC,MAAAX,EAAAC,GAAA,EAAAC,EAAAC,OACA,OAAAD,QAAA,IAAAA,OAAA,EAAAA,EAAAF,SAAAG,KAEAE,EAAAO,MAAAC,IAAAb,EAAAa,EAAAC,SAAA,KAAAH,EAAA1B,WACAW,GACAG,EAAAY,KAIEJ,EAAA,UAAe,KACjB,IAAAX,EAIA,OADA,OAAAE,QAAA,IAAAA,KAAAiB,iBArCA,gBAqCAP,GAAA,GACA,KACA,OAAAV,QAAA,IAAAA,KAAAkB,oBAvCA,gBAuCAR,GAAA,KAEG,CAAAV,EAAAF,EAAAY,IAEDD,EAAA,UAAe,KACjB,IAAAU,EACA,IAAArB,EAYA,OATAU,EAAAQ,QAAA,OAAAhB,QAAA,IAAAA,OAAA,UAAAmB,EAAAnB,EAAAN,mBAAA,IAAAyB,OAAA,EAAAA,EAAAC,YAAA,KACA,MAAAC,EAAA,OAAArB,QAAA,IAAAA,OAAA,EAAAA,EAAAqB,cACA,sBAAAA,QAAA,I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AAAzP,IAEP,MCNU8B,IACVA,EAAAP,SDKSmO,CADOd,EAA0B5O,KAG1CyP,EAAArJ,YAAA,iBAEAqJ,EAAApB,0BAAA","file":"static/js/2.f46b4eda.chunk.js","sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from './useEventCallback';\n/**\n * @internal\n * Utility to perform checks where a click/touch event was made outside a component\n */\nexport const useOnClickOutside = options => {\n  const {\n    refs,\n    callback,\n    element,\n    disabled,\n    contains: containsProp\n  } = options;\n  const timeoutId = React.useRef(undefined);\n  useIFrameFocus(options);\n  const listener = useEventCallback(ev => {\n    const contains = containsProp || ((parent, child) => {\n      return !!(parent === null || parent === void 0 ? void 0 : parent.contains(child));\n    });\n    const isOutside = refs.every(ref => !contains(ref.current || null, ev.target));\n    if (isOutside && !disabled) {\n      callback(ev);\n    }\n  });\n  React.useEffect(() => {\n    if (disabled) {\n      return;\n    }\n    // Store the current event to avoid triggering handlers immediately\n    // Note this depends on a deprecated but extremely well supported quirk of the web platform\n    // https://github.com/facebook/react/issues/20074\n    let currentEvent = getWindowEvent(window);\n    const conditionalHandler = event => {\n      // Skip if this event is the same as the one running when we added the handlers\n      if (event === currentEvent) {\n        currentEvent = undefined;\n        return;\n      }\n      listener(event);\n    };\n    // use capture phase because React can update DOM before the event bubbles to the document\n    element === null || element === void 0 ? void 0 : element.addEventListener('click', conditionalHandler, true);\n    element === null || element === void 0 ? void 0 : element.addEventListener('touchstart', conditionalHandler, true);\n    element === null || element === void 0 ? void 0 : element.addEventListener('contextmenu', conditionalHandler, true);\n    // Garbage collect this event after it's no longer useful to avoid memory leaks\n    timeoutId.current = window.setTimeout(() => {\n      currentEvent = undefined;\n    }, 1);\n    return () => {\n      element === null || element === void 0 ? void 0 : element.removeEventListener('click', conditionalHandler, true);\n      element === null || element === void 0 ? void 0 : element.removeEventListener('touchstart', conditionalHandler, true);\n      element === null || element === void 0 ? void 0 : element.removeEventListener('contextmenu', conditionalHandler, true);\n      clearTimeout(timeoutId.current);\n      currentEvent = undefined;\n    };\n  }, [listener, element, disabled]);\n};\nconst getWindowEvent = target => {\n  if (target) {\n    var _target_ownerDocument, _target_ownerDocument_defaultView;\n    if (typeof target.window === 'object' && target.window === target) {\n      // eslint-disable-next-line deprecation/deprecation\n      return target.event;\n    }\n    var _target_ownerDocument_defaultView_event;\n    // eslint-disable-next-line deprecation/deprecation\n    return (_target_ownerDocument_defaultView_event = (_target_ownerDocument = target.ownerDocument) === null || _target_ownerDocument === void 0 ? void 0 : (_target_ownerDocument_defaultView = _target_ownerDocument.defaultView) === null || _target_ownerDocument_defaultView === void 0 ? void 0 : _target_ownerDocument_defaultView.event) !== null && _target_ownerDocument_defaultView_event !== void 0 ? _target_ownerDocument_defaultView_event : undefined;\n  }\n  return undefined;\n};\nconst FUI_FRAME_EVENT = 'fuiframefocus';\n/**\n * Since click events do not propagate past iframes, we use focus to detect if a\n * click has happened inside an iframe, since the only ways of focusing inside an\n * iframe are:\n *   - clicking inside\n *   - tabbing inside\n *\n * Polls the value of `document.activeElement`. If it is an iframe, then dispatch\n * a custom DOM event. When the custom event is received call the provided callback\n */\nconst useIFrameFocus = options => {\n  const {\n    disabled,\n    element: targetDocument,\n    callback,\n    contains: containsProp = (parent, child) => {\n      return !!(parent === null || parent === void 0 ? void 0 : parent.contains(child));\n    },\n    pollDuration = 1000,\n    refs\n  } = options;\n  const timeoutRef = React.useRef();\n  const listener = useEventCallback(e => {\n    const contains = containsProp || ((parent, child) => {\n      return !!(parent === null || parent === void 0 ? void 0 : parent.contains(child));\n    });\n    const isOutside = refs.every(ref => !contains(ref.current || null, e.target));\n    if (isOutside && !disabled) {\n      callback(e);\n    }\n  });\n  // Adds listener to the custom iframe focus event\n  React.useEffect(() => {\n    if (disabled) {\n      return;\n    }\n    targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.addEventListener(FUI_FRAME_EVENT, listener, true);\n    return () => {\n      targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.removeEventListener(FUI_FRAME_EVENT, listener, true);\n    };\n  }, [targetDocument, disabled, listener]);\n  // Starts polling for the active element\n  React.useEffect(() => {\n    var _targetDocument_defaultView;\n    if (disabled) {\n      return;\n    }\n    timeoutRef.current = targetDocument === null || targetDocument === void 0 ? void 0 : (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.setInterval(() => {\n      const activeElement = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.activeElement;\n      if ((activeElement === null || activeElement === void 0 ? void 0 : activeElement.tagName) === 'IFRAME' || (activeElement === null || activeElement === void 0 ? void 0 : activeElement.tagName) === 'WEBVIEW') {\n        const event = new CustomEvent(FUI_FRAME_EVENT, {\n          bubbles: true\n        });\n        activeElement.dispatchEvent(event);\n      }\n    }, pollDuration);\n    return () => {\n      var _targetDocument_defaultView;\n      targetDocument === null || targetDocument === void 0 ? void 0 : (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.clearTimeout(timeoutRef.current);\n    };\n  }, [targetDocument, disabled, pollDuration]);\n};\n//# sourceMappingURL=useOnClickOutside.js.map","/**\n * Generally when adding an arrow to popper, it's necessary to offset the position of the popper by the\n * height of the arrow. A simple utility to merge a provided offset with an arrow height to return the final offset\n *\n * @internal\n * @param userOffset - The offset provided by the user\n * @param arrowHeight - The height of the arrow in px\n * @returns User offset augmented with arrow height\n */export function mergeArrowOffset(userOffset, arrowHeight) {\n  if (typeof userOffset === 'number') {\n    return addArrowOffset(userOffset, arrowHeight);\n  }\n  if (typeof userOffset === 'object' && userOffset !== null) {\n    return addArrowOffset(userOffset, arrowHeight);\n  }\n  if (typeof userOffset === 'function') {\n    return offsetParams => {\n      const offset = userOffset(offsetParams);\n      return addArrowOffset(offset, arrowHeight);\n    };\n  }\n  return {\n    mainAxis: arrowHeight\n  };\n}\nconst addArrowOffset = (offset, arrowHeight) => {\n  if (typeof offset === 'number') {\n    return {\n      mainAxis: offset + arrowHeight\n    };\n  }\n  var _offset_mainAxis;\n  return {\n    ...offset,\n    mainAxis: ((_offset_mainAxis = offset.mainAxis) !== null && _offset_mainAxis !== void 0 ? _offset_mainAxis : 0) + arrowHeight\n  };\n};\n//# sourceMappingURL=mergeArrowOffset.js.map","import { isVirtualElement } from './isVirtualElement';\n/**\n * Gets the virtual parent given the child element, if it exists.\n */\nfunction getVirtualParent(child) {\n  return isVirtualElement(child) ? child._virtual.parent || null : null;\n}\n/**\n * Gets the element which is the parent of a given element.\n * This method prefers the virtual parent over real DOM parent when present.\n */\nexport function getParent(child, options = {}) {\n  if (!child) {\n    return null;\n  }\n  if (!options.skipVirtual) {\n    const virtualParent = getVirtualParent(child);\n    if (virtualParent) {\n      return virtualParent;\n    }\n  }\n  return (child === null || child === void 0 ? void 0 : child.parentNode) || null;\n}\n//# sourceMappingURL=getParent.js.map","/**\n * Determines whether or not an element has the virtual hierarchy extension.\n */export function isVirtualElement(element) {\n  return element && !!element._virtual;\n}\n//# sourceMappingURL=isVirtualElement.js.map","import { getParent } from './getParent';\n/**\n * Similar functionality to `element.contains` DOM API for use without of order DOM elements that\n * checks the virtual parent hierarchy. If a virtual parents exists, it is chosen over the actual parent\n *\n * @returns true if the child can find the parent in its virtual hierarchy\n */\nexport function elementContains(parent, child) {\n  if (!parent || !child) {\n    return false;\n  }\n  if (parent === child) {\n    return true;\n  } else {\n    // Tracks references of nodes that have been visited to prevent infinite loops\n    const set = new WeakSet();\n    while (child) {\n      const nextParent = getParent(child, {\n        skipVirtual: set.has(child)\n      });\n      set.add(child);\n      if (nextParent === parent) {\n        return true;\n      }\n      child = nextParent;\n    }\n  }\n  return false;\n}\n//# sourceMappingURL=elementContains.js.map","/**\n * @internal\n * The default value of the tooltip's border radius (borderRadiusMedium).\n *\n * Unfortunately, Popper requires it to be specified as a variable instead of using CSS.\n * While we could use getComputedStyle, that adds a performance penalty for something that\n * will likely never change.\n */export const popoverSurfaceBorderRadius = 4;\n//# sourceMappingURL=constants.js.map","import * as React from 'react';\nimport { useControllableState, useEventCallback, useOnClickOutside, useOnScrollOutside } from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { usePositioning, resolvePositioningShorthand, mergeArrowOffset, usePositioningMouseTarget } from '@fluentui/react-positioning';\nimport { elementContains } from '@fluentui/react-portal';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { arrowHeights } from '../PopoverSurface/index';\nimport { popoverSurfaceBorderRadius } from './constants';\n/**\n * Create the state required to render Popover.\n *\n * The returned state can be modified with hooks such as usePopoverStyles,\n * before being passed to renderPopover_unstable.\n *\n * @param props - props from this instance of Popover\n */\nexport const usePopover_unstable = props => {\n  const [contextTarget, setContextTarget] = usePositioningMouseTarget();\n  const initialState = {\n    size: 'medium',\n    contextTarget,\n    setContextTarget,\n    ...props\n  };\n  const children = React.Children.toArray(props.children);\n  if (process.env.NODE_ENV !== 'production') {\n    if (children.length === 0) {\n      // eslint-disable-next-line no-console\n      console.warn('Popover must contain at least one child');\n    }\n    if (children.length > 2) {\n      // eslint-disable-next-line no-console\n      console.warn('Popover must contain at most two children');\n    }\n  }\n  let popoverTrigger = undefined;\n  let popoverSurface = undefined;\n  if (children.length === 2) {\n    popoverTrigger = children[0];\n    popoverSurface = children[1];\n  } else if (children.length === 1) {\n    popoverSurface = children[0];\n  }\n  const [open, setOpenState] = useOpenState(initialState);\n  const setOpenTimeoutRef = React.useRef(0);\n  const setOpen = useEventCallback((e, shouldOpen) => {\n    clearTimeout(setOpenTimeoutRef.current);\n    if (!(e instanceof Event) && e.persist) {\n      // < React 17 still uses pooled synthetic events\n      e.persist();\n    }\n    if (e.type === 'mouseleave') {\n      var _props_mouseLeaveDelay;\n      // FIXME leaking Node timeout type\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-ignore\n      setOpenTimeoutRef.current = setTimeout(() => {\n        setOpenState(e, shouldOpen);\n      }, (_props_mouseLeaveDelay = props.mouseLeaveDelay) !== null && _props_mouseLeaveDelay !== void 0 ? _props_mouseLeaveDelay : 500);\n    } else {\n      setOpenState(e, shouldOpen);\n    }\n  });\n  // Clear timeout on unmount\n  // Setting state after a component unmounts can cause memory leaks\n  React.useEffect(() => {\n    return () => {\n      clearTimeout(setOpenTimeoutRef.current);\n    };\n  }, []);\n  const toggleOpen = React.useCallback(e => {\n    setOpen(e, !open);\n  }, [setOpen, open]);\n  const positioningRefs = usePopoverRefs(initialState);\n  const {\n    targetDocument\n  } = useFluent();\n  useOnClickOutside({\n    contains: elementContains,\n    element: targetDocument,\n    callback: ev => setOpen(ev, false),\n    refs: [positioningRefs.triggerRef, positioningRefs.contentRef],\n    disabled: !open\n  });\n  // only close on scroll for context, or when closeOnScroll is specified\n  const closeOnScroll = initialState.openOnContext || initialState.closeOnScroll;\n  useOnScrollOutside({\n    contains: elementContains,\n    element: targetDocument,\n    callback: ev => setOpen(ev, false),\n    refs: [positioningRefs.triggerRef, positioningRefs.contentRef],\n    disabled: !open || !closeOnScroll\n  });\n  const {\n    findFirstFocusable\n  } = useFocusFinders();\n  React.useEffect(() => {\n    if (props.unstable_disableAutoFocus) {\n      return;\n    }\n    if (open && positioningRefs.contentRef.current) {\n      var _positioningRefs_contentRef_current_getAttribute;\n      const containerTabIndex = (_positioningRefs_contentRef_current_getAttribute = positioningRefs.contentRef.current.getAttribute('tabIndex')) !== null && _positioningRefs_contentRef_current_getAttribute !== void 0 ? _positioningRefs_contentRef_current_getAttribute : undefined;\n      const firstFocusable = isNaN(containerTabIndex) ? findFirstFocusable(positioningRefs.contentRef.current) : positioningRefs.contentRef.current;\n      firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();\n    }\n  }, [findFirstFocusable, open, positioningRefs.contentRef, props.unstable_disableAutoFocus]);\n  var _props_inertTrapFocus, _props_inline;\n  return {\n    ...initialState,\n    ...positioningRefs,\n    // eslint-disable-next-line deprecation/deprecation\n    inertTrapFocus: (_props_inertTrapFocus = props.inertTrapFocus) !== null && _props_inertTrapFocus !== void 0 ? _props_inertTrapFocus : props.legacyTrapFocus === undefined ? false : !props.legacyTrapFocus,\n    popoverTrigger,\n    popoverSurface,\n    open,\n    setOpen,\n    toggleOpen,\n    setContextTarget,\n    contextTarget,\n    inline: (_props_inline = props.inline) !== null && _props_inline !== void 0 ? _props_inline : false\n  };\n};\n/**\n * Creates and manages the Popover open state\n */\nfunction useOpenState(state) {\n  const onOpenChange = useEventCallback((e, data) => {\n    var _state_onOpenChange;\n    return (_state_onOpenChange = state.onOpenChange) === null || _state_onOpenChange === void 0 ? void 0 : _state_onOpenChange.call(state, e, data);\n  });\n  const [open, setOpenState] = useControllableState({\n    state: state.open,\n    defaultState: state.defaultOpen,\n    initialState: false\n  });\n  state.open = open !== undefined ? open : state.open;\n  const setContextTarget = state.setContextTarget;\n  const setOpen = React.useCallback((e, shouldOpen) => {\n    if (shouldOpen && e.type === 'contextmenu') {\n      setContextTarget(e);\n    }\n    if (!shouldOpen) {\n      setContextTarget(undefined);\n    }\n    setOpenState(shouldOpen);\n    onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(e, {\n      open: shouldOpen\n    });\n  }, [setOpenState, onOpenChange, setContextTarget]);\n  return [open, setOpen];\n}\n/**\n * Creates and sets the necessary trigger, target and content refs used by Popover\n */\nfunction usePopoverRefs(state) {\n  const positioningOptions = {\n    position: 'above',\n    align: 'center',\n    arrowPadding: 2 * popoverSurfaceBorderRadius,\n    target: state.openOnContext ? state.contextTarget : undefined,\n    ...resolvePositioningShorthand(state.positioning)\n  };\n  // no reason to render arrow when covering the target\n  if (positioningOptions.coverTarget) {\n    state.withArrow = false;\n  }\n  if (state.withArrow) {\n    positioningOptions.offset = mergeArrowOffset(positioningOptions.offset, arrowHeights[state.size]);\n  }\n  const {\n    targetRef: triggerRef,\n    containerRef: contentRef,\n    arrowRef\n  } = usePositioning(positioningOptions);\n  return {\n    triggerRef,\n    contentRef,\n    arrowRef\n  };\n}\n//# sourceMappingURL=usePopover.js.map","import * as React from 'react';\nimport { createVirtualElementFromClick } from './createVirtualElementFromClick';\n/**\n * @internal\n * A state hook that manages a popper virtual element from mouseevents.\n * Useful for scenarios where a component needs to be positioned by mouse click (e.g. contextmenu)\n * React synthetic events are not persisted by this hook\n *\n * @param initialState - initializes a user provided state similare to useState\n * @returns state and dispatcher for a Popper virtual element that uses native/synthetic mouse events\n */\nexport const usePositioningMouseTarget = initialState => {\n  const [virtualElement, setVirtualElement] = React.useState(initialState);\n  const setVirtualMouseTarget = event => {\n    if (event === undefined || event === null) {\n      setVirtualElement(undefined);\n      return;\n    }\n    let mouseevent;\n    if (!(event instanceof MouseEvent)) {\n      mouseevent = event.nativeEvent;\n    } else {\n      mouseevent = event;\n    }\n    if (!(mouseevent instanceof MouseEvent) && process.env.NODE_ENV !== 'production') {\n      // eslint-disable-next-line no-console\n      console.error('usePositioningMouseTarget should only be used with MouseEvent');\n    }\n    const contextTarget = createVirtualElementFromClick(mouseevent);\n    setVirtualElement(contextTarget);\n  };\n  return [virtualElement, setVirtualMouseTarget];\n};\n//# sourceMappingURL=usePositioningMouseTarget.js.map","/**\n * Creates a virtual element based on the position of a click event\n * Can be used as a target for popper in scenarios such as context menus\n */export function createVirtualElementFromClick(nativeEvent) {\n  const left = nativeEvent.clientX;\n  const top = nativeEvent.clientY;\n  const right = left + 1;\n  const bottom = top + 1;\n  function getBoundingClientRect() {\n    return {\n      left,\n      top,\n      right,\n      bottom,\n      x: left,\n      y: top,\n      height: 1,\n      width: 1\n    };\n  }\n  return {\n    getBoundingClientRect\n  };\n}\n//# sourceMappingURL=createVirtualElementFromClick.js.map","import * as React from 'react';\nimport { useEventCallback } from './useEventCallback';\n/**\n * @internal\n * Utility to perform checks where a click/touch event was made outside a component\n */\nexport const useOnScrollOutside = options => {\n  const {\n    refs,\n    callback,\n    element,\n    disabled,\n    contains: containsProp\n  } = options;\n  const listener = useEventCallback(ev => {\n    const contains = containsProp || ((parent, child) => {\n      return !!(parent === null || parent === void 0 ? void 0 : parent.contains(child));\n    });\n    const isOutside = refs.every(ref => !contains(ref.current || null, ev.target));\n    if (isOutside && !disabled) {\n      callback(ev);\n    }\n  });\n  React.useEffect(() => {\n    if (disabled) {\n      return;\n    }\n    element === null || element === void 0 ? void 0 : element.addEventListener('wheel', listener);\n    element === null || element === void 0 ? void 0 : element.addEventListener('touchmove', listener);\n    return () => {\n      element === null || element === void 0 ? void 0 : element.removeEventListener('wheel', listener);\n      element === null || element === void 0 ? void 0 : element.removeEventListener('touchmove', listener);\n    };\n  }, [listener, element, disabled]);\n};\n//# sourceMappingURL=useOnScrollOutside.js.map","import * as React from 'react';\nimport { PopoverContext } from '../../popoverContext';\n/**\n * Render the final JSX of Popover\n */\nexport const renderPopover_unstable = state => {\n  const {\n    appearance,\n    arrowRef,\n    contentRef,\n    inline,\n    mountNode,\n    open,\n    openOnContext,\n    openOnHover,\n    setOpen,\n    size,\n    toggleOpen,\n    trapFocus,\n    triggerRef,\n    withArrow,\n    inertTrapFocus\n  } = state;\n  return /*#__PURE__*/React.createElement(PopoverContext.Provider, {\n    value: {\n      appearance,\n      arrowRef,\n      contentRef,\n      inline,\n      mountNode,\n      open,\n      openOnContext,\n      openOnHover,\n      setOpen,\n      toggleOpen,\n      triggerRef,\n      size,\n      trapFocus,\n      inertTrapFocus,\n      withArrow\n    }\n  }, state.popoverTrigger, state.open && state.popoverSurface);\n};\n//# sourceMappingURL=renderPopover.js.map","import * as React from 'react';\nimport { usePopover_unstable } from './usePopover';\nimport { renderPopover_unstable } from './renderPopover';\n/**\n * Wrapper component that manages state for a PopoverTrigger and a PopoverSurface components.\n */\nexport const Popover = props => {\n  const state = usePopover_unstable(props);\n  return renderPopover_unstable(state);\n};\nPopover.displayName = 'Popover';\n//# sourceMappingURL=Popover.js.map","import { useId } from '@fluentui/react-utilities';\nimport { useTabsterAttributes } from './useTabsterAttributes';\nimport { getDeloser, getModalizer } from 'tabster';\nimport { useTabster } from './useTabster';\n/**\n * Applies modal dialog behaviour through DOM attributes\n * Modal element will focus trap and hide other content on the page\n * The trigger element will be focused if focus is lost after the modal element is removed\n *\n * @returns DOM attributes to apply to the modal element and its trigger\n */\nexport const useModalAttributes = (options = {}) => {\n  const {\n    trapFocus,\n    alwaysFocusable,\n    legacyTrapFocus\n  } = options;\n  const tabster = useTabster();\n  // Initializes the modalizer and deloser APIs\n  if (tabster) {\n    getModalizer(tabster);\n    getDeloser(tabster);\n  }\n  const id = useId('modal-', options.id);\n  const modalAttributes = useTabsterAttributes({\n    deloser: {},\n    modalizer: {\n      id,\n      isOthersAccessible: !trapFocus,\n      isAlwaysAccessible: alwaysFocusable,\n      isTrapped: legacyTrapFocus && trapFocus\n    }\n  });\n  const triggerAttributes = useTabsterAttributes({\n    deloser: {}\n  });\n  return {\n    modalAttributes,\n    triggerAttributes\n  };\n};\n//# sourceMappingURL=useModalAttributes.js.map","import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nexport const PopoverContext = /*#__PURE__*/createContext(undefined);\nconst popoverContextDefaultValue = {\n  open: false,\n  setOpen: () => null,\n  toggleOpen: () => null,\n  triggerRef: {\n    current: null\n  },\n  contentRef: {\n    current: null\n  },\n  arrowRef: {\n    current: null\n  },\n  openOnContext: false,\n  openOnHover: false,\n  size: 'medium',\n  trapFocus: false,\n  inline: false\n};\nexport const PopoverProvider = PopoverContext.Provider;\nexport const usePopoverContext_unstable = selector => useContextSelector(PopoverContext, (ctx = popoverContextDefaultValue) => selector(ctx));\n//# sourceMappingURL=popoverContext.js.map","import * as React from 'react';\nimport { usePopoverSurface_unstable } from './usePopoverSurface';\nimport { renderPopoverSurface_unstable } from './renderPopoverSurface';\nimport { usePopoverSurfaceStyles_unstable } from './usePopoverSurfaceStyles';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n/**\n * PopoverSurface component renders react children in a positioned box\n */\nexport const PopoverSurface = /*#__PURE__*/React.forwardRef((props, ref) => {\n  const state = usePopoverSurface_unstable(props, ref);\n  usePopoverSurfaceStyles_unstable(state);\n  const {\n    usePopoverSurfaceStyles_unstable: useCustomStyles\n  } = useCustomStyleHooks_unstable();\n  useCustomStyles(state);\n  return renderPopoverSurface_unstable(state);\n});\nPopoverSurface.displayName = 'PopoverSurface';\n//# sourceMappingURL=PopoverSurface.js.map","import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\n/**\n * Create the state required to render PopoverSurface.\n *\n * The returned state can be modified with hooks such as usePopoverSurfaceStyles_unstable,\n * before being passed to renderPopoverSurface_unstable.\n *\n * @param props - props from this instance of PopoverSurface\n * @param ref - reference to root HTMLDivElement of PopoverSurface\n */\nexport const usePopoverSurface_unstable = (props, ref) => {\n  const contentRef = usePopoverContext_unstable(context => context.contentRef);\n  const openOnHover = usePopoverContext_unstable(context => context.openOnHover);\n  const setOpen = usePopoverContext_unstable(context => context.setOpen);\n  const mountNode = usePopoverContext_unstable(context => context.mountNode);\n  const arrowRef = usePopoverContext_unstable(context => context.arrowRef);\n  const size = usePopoverContext_unstable(context => context.size);\n  const withArrow = usePopoverContext_unstable(context => context.withArrow);\n  const appearance = usePopoverContext_unstable(context => context.appearance);\n  const trapFocus = usePopoverContext_unstable(context => context.trapFocus);\n  const inertTrapFocus = usePopoverContext_unstable(context => context.inertTrapFocus);\n  const inline = usePopoverContext_unstable(context => context.inline);\n  const {\n    modalAttributes\n  } = useModalAttributes({\n    trapFocus,\n    legacyTrapFocus: !inertTrapFocus,\n    alwaysFocusable: !trapFocus\n  });\n  const state = {\n    inline,\n    appearance,\n    withArrow,\n    size,\n    arrowRef,\n    mountNode,\n    components: {\n      root: 'div'\n    },\n    root: getNativeElementProps('div', {\n      ref: useMergedRefs(ref, contentRef),\n      role: trapFocus ? 'dialog' : 'group',\n      'aria-modal': trapFocus ? true : undefined,\n      ...modalAttributes,\n      ...props\n    })\n  };\n  const {\n    onMouseEnter: onMouseEnterOriginal,\n    onMouseLeave: onMouseLeaveOriginal,\n    onKeyDown: onKeyDownOriginal\n  } = state.root;\n  state.root.onMouseEnter = e => {\n    if (openOnHover) {\n      setOpen(e, true);\n    }\n    onMouseEnterOriginal === null || onMouseEnterOriginal === void 0 ? void 0 : onMouseEnterOriginal(e);\n  };\n  state.root.onMouseLeave = e => {\n    if (openOnHover) {\n      setOpen(e, false);\n    }\n    onMouseLeaveOriginal === null || onMouseLeaveOriginal === void 0 ? void 0 : onMouseLeaveOriginal(e);\n  };\n  state.root.onKeyDown = e => {\n    var _contentRef_current;\n    // only close if the event happened inside the current popover\n    // If using a stack of inline popovers, the user should call `stopPropagation` to avoid dismissing the entire stack\n    if (e.key === 'Escape' && ((_contentRef_current = contentRef.current) === null || _contentRef_current === void 0 ? void 0 : _contentRef_current.contains(e.target))) {\n      setOpen(e, false);\n    }\n    onKeyDownOriginal === null || onKeyDownOriginal === void 0 ? void 0 : onKeyDownOriginal(e);\n  };\n  return state;\n};\n//# sourceMappingURL=usePopoverSurface.js.map","/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport { Portal } from '@fluentui/react-portal';\n/**\n * Render the final JSX of PopoverSurface\n */\nexport const renderPopoverSurface_unstable = state => {\n  const {\n    slots,\n    slotProps\n  } = getSlotsNext(state);\n  const surface = /*#__PURE__*/createElement(slots.root, slotProps.root, state.withArrow && /*#__PURE__*/createElement(\"div\", {\n    ref: state.arrowRef,\n    className: state.arrowClassName\n  }), slotProps.root.children);\n  if (state.inline) {\n    return surface;\n  }\n  return /*#__PURE__*/createElement(Portal, {\n    mountNode: state.mountNode\n  }, surface);\n};\n//# sourceMappingURL=renderPopoverSurface.js.map","import { shorthands, __styles, mergeClasses } from '@griffel/react';\nimport { createArrowHeightStyles, createArrowStyles } from '@fluentui/react-positioning';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const popoverSurfaceClassNames = {\n  root: 'fui-PopoverSurface'\n};\nexport const arrowHeights = {\n  small: 6,\n  medium: 8,\n  large: 8\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n  root: {\n    sj55zd: \"f19n0e5\",\n    De3pzq: \"fxugw4r\",\n    E5pizo: \"f1hg901r\",\n    Bbmb7ep: [\"f1aa9q02\", \"f16jpd5f\"],\n    Beyfa6y: [\"f16jpd5f\", \"f1aa9q02\"],\n    B7oj6ja: [\"f1jar5jt\", \"fyu767a\"],\n    Btl43ni: [\"fyu767a\", \"f1jar5jt\"],\n    B4j52fo: \"f5ogflp\",\n    Bekrc4i: [\"f1hqa2wf\", \"finvdd3\"],\n    Bn0qgzm: \"f1f09k3d\",\n    ibv6hh: [\"finvdd3\", \"f1hqa2wf\"],\n    icvyot: \"fzkkow9\",\n    vrafjx: [\"fcdblym\", \"fjik90z\"],\n    oivjwe: \"fg706s2\",\n    wvpqe5: [\"fjik90z\", \"fcdblym\"],\n    g2u3we: \"fghlq4f\",\n    h3c5rm: [\"f1gn591s\", \"fjscplz\"],\n    B9xav0g: \"fb073pr\",\n    zhjwy3: [\"fjscplz\", \"f1gn591s\"],\n    Bahqtrf: \"fk6fouc\",\n    Be2twd7: \"fkhj508\",\n    Bhrd7zp: \"figsok6\",\n    Bg96gwp: \"f1i3iumi\"\n  },\n  inverted: {\n    De3pzq: \"fg3r6xk\",\n    sj55zd: \"fonrgv7\"\n  },\n  brand: {\n    De3pzq: \"ffp7eso\",\n    sj55zd: \"f1phragk\"\n  },\n  smallPadding: {\n    z8tnut: \"f1kcqot9\",\n    z189sj: [\"f11qrl6u\", \"fjlbh76\"],\n    Byoj8tv: \"fpe6lb7\",\n    uwmqm3: [\"fjlbh76\", \"f11qrl6u\"]\n  },\n  mediumPadding: {\n    z8tnut: \"fqag9an\",\n    z189sj: [\"f1gbmcue\", \"f1rh9g5y\"],\n    Byoj8tv: \"fp67ikv\",\n    uwmqm3: [\"f1rh9g5y\", \"f1gbmcue\"]\n  },\n  largePadding: {\n    z8tnut: \"fc7z3ec\",\n    z189sj: [\"fat0sn4\", \"fekwl8i\"],\n    Byoj8tv: \"fe2my4m\",\n    uwmqm3: [\"fekwl8i\", \"fat0sn4\"]\n  },\n  smallArrow: {\n    a9b677: \"f1ekdpwm\",\n    Bqenvij: \"f83vc9z\"\n  },\n  mediumLargeArrow: {\n    a9b677: \"f1kmc0fn\",\n    Bqenvij: \"fb6lvc5\"\n  },\n  arrow: {\n    qhf8xq: \"f1euv43f\",\n    De3pzq: \"f1u2r49w\",\n    Bcdw1i0: \"fd7fpy0\",\n    Bj3rh1h: \"f1bsuimh\",\n    Ftih45: \"f1wl9k8s\",\n    B1puzpu: \"f1wkw4r9\",\n    Brfgrao: \"f1j7ml58\",\n    Bcvre1j: \"fyl8oag\",\n    Ccq8qp: \"frdoeuz\",\n    Baz25je: \"fb81m9q\",\n    cmx5o7: \"f1ljr5q2\",\n    B4f6apu: \"fyfemzf\",\n    m598lv: \"focyt6c\",\n    Bk5zm6e: \"fnhxbxj\",\n    y0oebl: \"fdw6hkg\",\n    qa3bma: \"f11yjt3y\",\n    Bqjgrrk: \"f1172wan\",\n    Budzafs: [\"f9e5op9\", \"f112wvtl\"],\n    Hv9wc6: [\"ftj5xct\", \"fyavhwi\"],\n    hl6cv3: \"f1773hnp\",\n    Bh2vraf: \"f1n8855c\",\n    yayu3t: \"f1v7783n\",\n    wedwtw: \"fsw6im5\",\n    rhl9o9: \"fh2hsk5\",\n    Bu8t5uz: \"f159pzir\",\n    B6q6orb: \"f11yvu4\",\n    Bwwlvwl: \"fm1ycve\"\n  }\n}, {\n  d: [\".f19n0e5{color:var(--colorNeutralForeground1);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".f1hg901r{box-shadow:var(--shadow16);}\", \".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}\", \".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}\", \".f5ogflp{border-top-width:1px;}\", \".f1hqa2wf{border-right-width:1px;}\", \".finvdd3{border-left-width:1px;}\", \".f1f09k3d{border-bottom-width:1px;}\", \".fzkkow9{border-top-style:solid;}\", \".fcdblym{border-right-style:solid;}\", \".fjik90z{border-left-style:solid;}\", \".fg706s2{border-bottom-style:solid;}\", \".fghlq4f{border-top-color:var(--colorTransparentStroke);}\", \".f1gn591s{border-right-color:var(--colorTransparentStroke);}\", \".fjscplz{border-left-color:var(--colorTransparentStroke);}\", \".fb073pr{border-bottom-color:var(--colorTransparentStroke);}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\", \".fg3r6xk{background-color:var(--colorNeutralBackgroundStatic);}\", \".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}\", \".ffp7eso{background-color:var(--colorBrandBackground);}\", \".f1phragk{color:var(--colorNeutralForegroundOnBrand);}\", \".f1kcqot9{padding-top:12px;}\", \".f11qrl6u{padding-right:12px;}\", \".fjlbh76{padding-left:12px;}\", \".fpe6lb7{padding-bottom:12px;}\", \".fqag9an{padding-top:16px;}\", \".f1gbmcue{padding-right:16px;}\", \".f1rh9g5y{padding-left:16px;}\", \".fp67ikv{padding-bottom:16px;}\", \".fc7z3ec{padding-top:20px;}\", \".fat0sn4{padding-right:20px;}\", \".fekwl8i{padding-left:20px;}\", \".fe2my4m{padding-bottom:20px;}\", \".f1ekdpwm{width:8.484px;}\", \".f83vc9z{height:8.484px;}\", \".f1kmc0fn{width:11.312px;}\", \".fb6lvc5{height:11.312px;}\", \".f1euv43f{position:absolute;}\", \".f1u2r49w{background-color:inherit;}\", \".fd7fpy0{visibility:hidden;}\", \".f1bsuimh{z-index:-1;}\", \".f1wl9k8s::before{content:\\\"\\\";}\", \".f1wkw4r9::before{visibility:visible;}\", \".f1j7ml58::before{position:absolute;}\", \".fyl8oag::before{box-sizing:border-box;}\", \".frdoeuz::before{width:inherit;}\", \".fb81m9q::before{height:inherit;}\", \".f1ljr5q2::before{background-color:inherit;}\", \".fyfemzf::before{border-right-width:1px;}\", \".focyt6c::before{border-right-style:solid;}\", \".fnhxbxj::before{border-right-color:var(--colorTransparentStroke);}\", \".fdw6hkg::before{border-bottom-width:1px;}\", \".f11yjt3y::before{border-bottom-style:solid;}\", \".f1172wan::before{border-bottom-color:var(--colorTransparentStroke);}\", \".f9e5op9::before{border-bottom-right-radius:var(--borderRadiusSmall);}\", \".f112wvtl::before{border-bottom-left-radius:var(--borderRadiusSmall);}\", \".ftj5xct::before{-webkit-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);-moz-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);-ms-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);}\", \".fyavhwi::before{-webkit-transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);-moz-transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);-ms-transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);}\", \"[data-popper-placement^=\\\"top\\\"] .f1773hnp{bottom:-1px;}\", \"[data-popper-placement^=\\\"top\\\"] .f1n8855c{--angle:0;}\", \"[data-popper-placement^=\\\"right\\\"] .f1v7783n{left:-1px;}\", \"[data-popper-placement^=\\\"right\\\"] .fsw6im5{--angle:90deg;}\", \"[data-popper-placement^=\\\"bottom\\\"] .fh2hsk5{top:-1px;}\", \"[data-popper-placement^=\\\"bottom\\\"] .f159pzir{--angle:180deg;}\", \"[data-popper-placement^=\\\"left\\\"] .f11yvu4{right:-1px;}\", \"[data-popper-placement^=\\\"left\\\"] .fm1ycve{--angle:270deg;}\"]\n});\n/**\n * Apply styling to the PopoverSurface slots based on the state\n */\nexport const usePopoverSurfaceStyles_unstable = state => {\n  const styles = useStyles();\n  state.root.className = mergeClasses(popoverSurfaceClassNames.root, styles.root, state.size === 'small' && styles.smallPadding, state.size === 'medium' && styles.mediumPadding, state.size === 'large' && styles.largePadding, state.appearance === 'inverted' && styles.inverted, state.appearance === 'brand' && styles.brand, state.root.className);\n  state.arrowClassName = mergeClasses(styles.arrow, state.size === 'small' ? styles.smallArrow : styles.mediumLargeArrow);\n  return state;\n};\n//# sourceMappingURL=usePopoverSurfaceStyles.js.map","import * as React from 'react';\n/**\n * @internal\n * Checks if a given element is a FluentUI trigger (e.g. `MenuTrigger` or `Tooltip`).\n * See the {@link FluentTriggerComponent} type for more info.\n */\nexport function isFluentTrigger(element) {\n  return Boolean(element.type.isFluentTriggerComponent);\n}\n//# sourceMappingURL=isFluentTrigger.js.map","import * as React from 'react';\nimport { isFluentTrigger } from './isFluentTrigger';\n/**\n * @internal\n * resolve the trigger props to the children, either by calling the render function, or cloning with the new props.\n */\nexport function applyTriggerPropsToChildren(children, triggerChildProps) {\n  if (typeof children === 'function') {\n    return children(triggerChildProps);\n  } else if (children) {\n    return cloneTriggerTree(children, triggerChildProps);\n  }\n  // Components in React should return either JSX elements or \"null\", otherwise React will throw:\n  //   Nothing was returned from render.\n  //   This usually means a return statement is missing. Or, to render nothing, return null.\n  return children || null;\n}\n/**\n * Clones a React element tree, and applies the given props to the first grandchild that is not\n * a FluentTriggerComponent or React Fragment (the same element returned by {@link getTriggerChild}).\n */\nfunction cloneTriggerTree(child, triggerProps) {\n  if (! /*#__PURE__*/React.isValidElement(child) || child.type === React.Fragment) {\n    throw new Error('A trigger element must be a single element for this component. ' + \"Please ensure that you're not using React Fragments.\");\n  }\n  if (isFluentTrigger(child)) {\n    const grandchild = cloneTriggerTree(child.props.children, triggerProps);\n    return /*#__PURE__*/React.cloneElement(child, undefined, grandchild);\n  } else {\n    return /*#__PURE__*/React.cloneElement(child, triggerProps);\n  }\n}\n//# sourceMappingURL=applyTriggerPropsToChildren.js.map","import * as React from 'react';\nimport { applyTriggerPropsToChildren, getTriggerChild, mergeCallbacks, useMergedRefs, useEventCallback } from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { Escape } from '@fluentui/keyboard-keys';\n/**\n * Create the state required to render PopoverTrigger.\n *\n * The returned state can be modified with hooks such as usePopoverTriggerStyles,\n * before being passed to renderPopoverTrigger_unstable.\n *\n * @param props - props from this instance of PopoverTrigger\n */\nexport const usePopoverTrigger_unstable = props => {\n  const {\n    children,\n    disableButtonEnhancement = false\n  } = props;\n  const child = getTriggerChild(children);\n  const open = usePopoverContext_unstable(context => context.open);\n  const setOpen = usePopoverContext_unstable(context => context.setOpen);\n  const toggleOpen = usePopoverContext_unstable(context => context.toggleOpen);\n  const triggerRef = usePopoverContext_unstable(context => context.triggerRef);\n  const openOnHover = usePopoverContext_unstable(context => context.openOnHover);\n  const openOnContext = usePopoverContext_unstable(context => context.openOnContext);\n  const {\n    triggerAttributes\n  } = useModalAttributes();\n  const onContextMenu = e => {\n    if (openOnContext) {\n      e.preventDefault();\n      setOpen(e, true);\n    }\n  };\n  const onClick = e => {\n    if (!openOnContext) {\n      toggleOpen(e);\n    }\n  };\n  const onKeyDown = e => {\n    if (e.key === Escape && open) {\n      setOpen(e, false);\n      // stop propagation to avoid conflicting with other elements that listen for `Escape`\n      // e,g: Dialog, Menu\n      e.stopPropagation();\n    }\n  };\n  const onMouseEnter = e => {\n    if (openOnHover) {\n      setOpen(e, true);\n    }\n  };\n  const onMouseLeave = e => {\n    if (openOnHover) {\n      setOpen(e, false);\n    }\n  };\n  const contextMenuProps = {\n    ...triggerAttributes,\n    'aria-expanded': `${open}`,\n    ...(child === null || child === void 0 ? void 0 : child.props),\n    onMouseEnter: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onMouseEnter, onMouseEnter)),\n    onMouseLeave: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onMouseLeave, onMouseLeave)),\n    onContextMenu: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onContextMenu, onContextMenu)),\n    ref: useMergedRefs(triggerRef, child === null || child === void 0 ? void 0 : child.ref)\n  };\n  const triggerChildProps = {\n    ...contextMenuProps,\n    onClick: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onClick, onClick)),\n    onKeyDown: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onKeyDown, onKeyDown))\n  };\n  const ariaButtonTriggerChildProps = useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', triggerChildProps);\n  return {\n    children: applyTriggerPropsToChildren(props.children, useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', openOnContext ? contextMenuProps : disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps))\n  };\n};\n//# sourceMappingURL=usePopoverTrigger.js.map","import * as React from 'react';\nimport { isFluentTrigger } from './isFluentTrigger';\n/**\n * @internal\n * Gets the trigger element of a FluentTriggerComponent (such as Tooltip or MenuTrigger).\n *\n * In the case where the immediate child is itself a FluentTriggerComponent and/or React Fragment,\n * it returns the first descendant that is _not_ a FluentTriggerComponent or Fragment.\n * This allows multiple triggers to be stacked, and still apply their props to the actual trigger element.\n *\n * For example, the following returns `<div id=\"child\" />`:\n * ```jsx\n * getTriggerChild(\n *   <Tooltip>\n *     <MenuTrigger>\n *       <div id=\"child\" />\n *     </MenuTrigger>\n *   </Tooltip>\n * );\n * ```\n *\n * In the case where the immediate child is not a valid element,\n * null is returned\n */\nexport function getTriggerChild(children) {\n  if (! /*#__PURE__*/React.isValidElement(children)) {\n    return null;\n  }\n  return isFluentTrigger(children) ? getTriggerChild(\n  // FIXME: This casting should be unnecessary as isFluentTrigger is a guard type method,\n  // but for some reason it's failing on build\n  children.props.children) : children;\n}\n//# sourceMappingURL=getTriggerChild.js.map","import * as React from 'react';\nimport { usePopoverTrigger_unstable } from './usePopoverTrigger';\nimport { renderPopoverTrigger_unstable } from './renderPopoverTrigger';\n/**\n * Wraps a trigger element as an only child and adds the necessary event handling to open a popover.\n */\nexport const PopoverTrigger = props => {\n  const state = usePopoverTrigger_unstable(props);\n  return renderPopoverTrigger_unstable(state);\n};\nPopoverTrigger.displayName = 'PopoverTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\nPopoverTrigger.isFluentTriggerComponent = true;\n//# sourceMappingURL=PopoverTrigger.js.map","/**\n * Render the final JSX of PopoverTrigger\n */export const renderPopoverTrigger_unstable = state => {\n  return state.children;\n};\n//# sourceMappingURL=renderPopoverTrigger.js.map"],"sourceRoot":""}