construct-hub 0.3.140 → 0.3.144

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. package/.jsii +22 -22
  2. package/lib/construct-hub.js +1 -1
  3. package/lib/package-sources/code-artifact.js +1 -1
  4. package/lib/package-sources/npmjs.js +1 -1
  5. package/lib/package-tag/index.js +2 -2
  6. package/lib/s3/vpc-endpoint-bucket.js +30 -1
  7. package/lib/spdx-license.js +1 -1
  8. package/lib/webapp/index.js +1 -15
  9. package/lib/webapp/response-function/response-function.d.ts +1 -0
  10. package/lib/webapp/response-function/response-function.js +4 -6
  11. package/package.json +2 -2
  12. package/website/android-chrome-192x192.png +0 -0
  13. package/website/apple-touch-icon.png +0 -0
  14. package/website/asset-manifest.json +31 -31
  15. package/website/assets/favicon-16x16.png +0 -0
  16. package/website/assets/favicon-32x32.png +0 -0
  17. package/website/assets/favicon.ico +0 -0
  18. package/website/favicon-16x16.png +0 -0
  19. package/website/favicon-32x32.png +0 -0
  20. package/website/favicon.ico +0 -0
  21. package/website/index.html +1 -1
  22. package/website/manifest.json +3 -8
  23. package/website/mstile-150x150.png +0 -0
  24. package/website/static/js/{10.30ecd71a.chunk.js → 10.5f66f973.chunk.js} +2 -2
  25. package/website/static/js/{10.30ecd71a.chunk.js.map → 10.5f66f973.chunk.js.map} +1 -1
  26. package/website/static/js/11.d6a2b77e.chunk.js +2 -0
  27. package/website/static/js/11.d6a2b77e.chunk.js.map +1 -0
  28. package/website/static/js/12.519faaaf.chunk.js +2 -0
  29. package/website/static/js/12.519faaaf.chunk.js.map +1 -0
  30. package/website/static/js/13.6fe7d275.chunk.js +2 -0
  31. package/website/static/js/13.6fe7d275.chunk.js.map +1 -0
  32. package/website/static/js/14.079eb5e1.chunk.js +2 -0
  33. package/website/static/js/14.079eb5e1.chunk.js.map +1 -0
  34. package/website/static/js/{4.e051c405.chunk.js → 4.862b4ce7.chunk.js} +3 -3
  35. package/website/static/js/{4.e051c405.chunk.js.LICENSE.txt → 4.862b4ce7.chunk.js.LICENSE.txt} +0 -0
  36. package/website/static/js/{4.e051c405.chunk.js.map → 4.862b4ce7.chunk.js.map} +1 -1
  37. package/website/static/js/{5.05213cd1.chunk.js → 5.0e0c97cb.chunk.js} +3 -3
  38. package/website/static/js/{5.05213cd1.chunk.js.LICENSE.txt → 5.0e0c97cb.chunk.js.LICENSE.txt} +0 -0
  39. package/website/static/js/5.0e0c97cb.chunk.js.map +1 -0
  40. package/website/static/js/6.78d88d4c.chunk.js +2 -0
  41. package/website/static/js/6.78d88d4c.chunk.js.map +1 -0
  42. package/website/static/js/7.a053380e.chunk.js +2 -0
  43. package/website/static/js/7.a053380e.chunk.js.map +1 -0
  44. package/website/static/js/8.c99e08cd.chunk.js +2 -0
  45. package/website/static/js/8.c99e08cd.chunk.js.map +1 -0
  46. package/website/static/js/{9.174f64fc.chunk.js → 9.d40d7958.chunk.js} +2 -2
  47. package/website/static/js/{9.174f64fc.chunk.js.map → 9.d40d7958.chunk.js.map} +1 -1
  48. package/website/static/js/main.6de5586a.chunk.js +2 -0
  49. package/website/static/js/main.6de5586a.chunk.js.map +1 -0
  50. package/website/static/js/{runtime-main.6f10a9e2.js → runtime-main.2c215cbd.js} +2 -2
  51. package/website/static/js/{runtime-main.6f10a9e2.js.map → runtime-main.2c215cbd.js.map} +1 -1
  52. package/lib/webapp/home-response-function/home-response-function.d.ts +0 -8
  53. package/lib/webapp/home-response-function/home-response-function.js +0 -24
  54. package/lib/webapp/home-response-function/index.d.ts +0 -7
  55. package/lib/webapp/home-response-function/index.js +0 -17
  56. package/website/logo192.png +0 -0
  57. package/website/logo512.png +0 -0
  58. package/website/static/js/11.9e53aff3.chunk.js +0 -2
  59. package/website/static/js/11.9e53aff3.chunk.js.map +0 -1
  60. package/website/static/js/12.7d44c985.chunk.js +0 -2
  61. package/website/static/js/12.7d44c985.chunk.js.map +0 -1
  62. package/website/static/js/13.9c0ba67b.chunk.js +0 -2
  63. package/website/static/js/13.9c0ba67b.chunk.js.map +0 -1
  64. package/website/static/js/14.924c14cb.chunk.js +0 -2
  65. package/website/static/js/14.924c14cb.chunk.js.map +0 -1
  66. package/website/static/js/5.05213cd1.chunk.js.map +0 -1
  67. package/website/static/js/6.4a34e978.chunk.js +0 -2
  68. package/website/static/js/6.4a34e978.chunk.js.map +0 -1
  69. package/website/static/js/7.ebf6a179.chunk.js +0 -2
  70. package/website/static/js/7.ebf6a179.chunk.js.map +0 -1
  71. package/website/static/js/8.8e96ad43.chunk.js +0 -2
  72. package/website/static/js/8.8e96ad43.chunk.js.map +0 -1
  73. package/website/static/js/main.8038c15f.chunk.js +0 -2
  74. package/website/static/js/main.8038c15f.chunk.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/index.ts","../../../src/use-radio-group.ts","../../../src/radio-group.tsx","../../../src/link-box.tsx","../node_modules/date-fns/esm/compareAsc/index.js","../node_modules/date-fns/esm/_lib/cloneObject/index.js","../node_modules/date-fns/esm/_lib/assign/index.js","../node_modules/date-fns/esm/formatDistanceStrict/index.js","../node_modules/date-fns/esm/formatDistanceToNowStrict/index.js","../../../src/popover-context.ts","../../../src/popover-transition.tsx","../../../src/pointer-event.ts","../../../src/use-focus-on-pointerdown.ts","../../../src/user-agent.ts","../../../src/use-pointer-event.ts","../../../src/use-focus-on-show.ts","../../../src/use-popover.ts","../../../src/popover.tsx","../../../src/use-radio.ts","../../../src/radio.tsx"],"names":["useRadioGroup","props","onChange","value","name","isNative","React","defaultValue","useControllableProp","valueProp","ref","focus","rootNode","query","firstEnabledAndCheckedInput","firstEnabledInput","fallbackName","useId","undefined","nameProp","eventOrValue","nextValue","isInputEvent","setValue","onChangeProp","String","getRootProps","forwardedRef","mergeRefs","role","getRadioProps","checkedKey","isDisabled","isFocusable","htmlProps","createContext","strict","RadioGroup","forwardRef","group","size","colorScheme","variant","groupProps","_className","cx","className","LinkOverlay","rel","isExternal","target","__css","position","content","cursor","display","top","left","zIndex","width","height","LinkBox","compareAsc","dirtyDateLeft","dirtyDateRight","requiredArgs","arguments","dateLeft","toDate","dateRight","diff","getTime","cloneObject","dirtyObject","TypeError","property","Object","prototype","hasOwnProperty","call","assign","MILLISECONDS_IN_MINUTE","MINUTES_IN_DAY","MINUTES_IN_MONTH","MINUTES_IN_YEAR","formatDistanceStrict","dirtyDate","dirtyBaseDate","options","length","locale","defaultLocale","formatDistance","RangeError","comparison","isNaN","localizeOptions","addSuffix","Boolean","roundingMethodFn","roundingMethod","Math","floor","ceil","round","unit","milliseconds","minutes","timezoneOffset","getTimezoneOffsetInMilliseconds","dstNormalizedMinutes","seconds","roundedMinutes","hours","days","months","years","formatDistanceToNowStrict","dirtyOptions","Date","now","errorMessage","mergeVariants","variants","mergeWith","enter","visibility","exit","transitionEnd","Section","motion","chakra","PopoverTransition","isOpen","usePopoverContext","initial","animate","opacity","scale","transition","duration","ease","isTouchEvent","event","defaultPagePoint","pageX","pageY","pointFromTouch","e","pointType","point","x","y","pointFromMouse","extractEventInfo","wrapPointerEventHandler","shouldFilterPrimaryPointer","eventHandler","listener","handler","isMouseEvent","getEventWindow","mouseEventNames","pointerdown","pointermove","pointerup","pointercancel","pointerover","pointerout","pointerenter","pointerleave","touchEventNames","getPointerEventName","isBrowser","window","useFocusOnPointerDown","browser","enabled","isSafari","navigator","userAgent","vendor","android","test","ua","getUserAgentBrowser","getOwnerDocument","isValidTarget","elements","elementOrRef","el","isRefObject","contains","isActiveElement","useEventListener","eventName","defaultOptions","preventScroll","shouldFocus","TRIGGER","usePopover","closeOnBlur","closeOnEsc","returnFocusOnClose","autoFocus","trigger","openDelay","closeDelay","lazyBehavior","computePositionOnMount","useDisclosure","onToggle","triggerRef","useRef","popoverRef","isHoveringRef","hasBeenOpened","useState","useIds","usePopper","forceUpdate","useFocusOnHide","focusRef","visible","element","onFocus","useCallback","document","nextTick","tabbableEls","getAllFocusable","useUpdateEffect","useFocusOnShow","shouldRenderChildren","determineLazyBehavior","hasBeenSelected","isLazy","isSelected","getPopoverProps","_ref","popoverProps","style","transformOrigin","popperCSSVars","arrowSize","px","arrowShadowColor","children","id","tabIndex","onKeyDown","callAllHandlers","onClose","onBlur","relatedTarget","getRelatedTarget","targetIsPopover","targetIsTrigger","hasHeader","headerId","hasBody","bodyId","setTimeout","getPopoverPositionerProps","getPopperProps","openTimeout","closeTimeout","getTriggerProps","triggerProps","popoverId","clearTimeout","useEffect","getHeaderProps","node","setHasHeader","getBodyProps","setHasBody","getArrowProps","getArrowInnerProps","Popover","styles","useMultiStyleConfig","omitThemingProps","context","direction","useTheme","runIfFn","PopoverTrigger","child","PopoverContent","rootProps","useStyles","contentStyles","flexDirection","contentProps","PopoverHeader","header","PopoverBody","body","PopoverArrow","backgroundColor","arrowBg","bg","useRadio","defaultChecked","isChecked","isReadOnly","isRequired","isInvalid","dataRadioGroup","uuid","formControl","useFormControlContext","useRadioGroupContext","isWithinFormControl","idProp","isDisabledProp","isReadOnlyProp","isRequiredProp","isInvalidProp","useBoolean","warn","condition","message","handleChange","setChecked","isControlled","setActive","onKeyUp","getCheckboxProps","dataAttr","onMouseDown","onMouseUp","onMouseEnter","setHovering","onMouseLeave","getInputProps","trulyDisabled","type","setFocused","checked","disabled","readOnly","required","ariaAttr","visuallyHiddenStyle","state","isFocused","isActive","isHovered","getLabelProps","onTouchStart","pros","stop","Radio","ownProps","spacing","callAll","split","checkboxProps","inputProps","labelProps","rootStyles","isFullWidth","alignItems","verticalAlign","checkboxStyles","justifyContent","flexShrink","labelStyles","userSelect","marginStart"],"mappings":"oIAAA,sX,qaCyDO,SAASA,EAAcC,QAAgC,IAAhCA,MAA4B,IACxD,QAAM,EAAN,EACEC,SADI,EAAN,EAEEC,MAFI,EAAN,EAAM,eAAN,EAIEC,KAJI,EAAN,EAAM,aAAN,EAAM,YAOJC,EAPF,EAOEA,SAPF,E,oIAAA,qFAWA,EAA+BC,WAC7BC,GADF,uBAAM,EAAN,KAAM,EAAN,KAGA,EAA8BC,YAAoBC,EAAlD,sBAAM,EAAN,KAAM,EAAN,KAEMC,EAAMJ,SAAZ,M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qBAAJ,MAAuB9B,IACrBP,EAAWmW,YAAQ9T,EAAD,SAAlBrC,IAGF,IAEA,EAMI6S,EAAS,EAAD,MAEVE,YACAhR,cACAD,aACA9B,WACAE,KAdQ,eAAGH,OAAH,EAAGA,EAAH,cAAkBsC,OAAlB,EAAkBA,EAA5B,QAEM,EAAN,EAAM,gBAAN,EAAM,mBAAN,EAAM,gBAAN,EAAM,aAKJL,EALF,EAKEA,UAUF,EAAkCoU,YAAMpU,EAAxC,sCAAM,EAAN,KAEMqU,EAAgB9B,EAFtB,MAGM+B,EAAaxB,EAAc,GAAjC,GACMyB,EAAaX,IACb5D,EAAYtN,gBAA2BlD,KAEvCgV,EAAa,EAAH,CACd/S,MAAOgT,EAAc,YADP,EAEdpT,QAFc,cAGdqT,WAHc,SAIdC,cAAe,OACZrF,EALL,WAQMsF,EAAiB,EAAH,CAClBvT,QADkB,cAElBqT,WAFkB,SAGlBG,eAHkB,SAIlBC,WAAY,GACTxF,EALL,SAQMyF,EAAiC,EAAH,CAClCC,WADkC,OAElCC,YAAaf,GACV5E,EAHL,OAMA,OACE,gBAAC,IAAD,SAAc1O,UAAU,gBAAxB,GAAsDK,MAAOuT,IAC3D,2BAAO5T,UAAU,uBADnB,IAEE,gBAAC,IAAD,QACEA,UAAU,yBADZ,GAGEK,MAAO2T,KAERvH,GACC,gBAAC,IAAD,QACEzM,UAAU,uBADZ,GAGEK,MAAO8T,IAZf,OAqBE,EAAJ,IACEf","file":"static/js/10.30ecd71a.chunk.js","sourcesContent":["export * from \"@chakra-ui/color-mode\"\nexport * from \"@chakra-ui/styled-system\"\nexport { keyframes } from \"@emotion/react\"\nexport type { Interpolation } from \"@emotion/react\"\nexport * from \"./hooks\"\nexport * from \"./system.types\"\nexport * from \"./providers\"\nexport { omitThemingProps } from \"./system.utils\"\nexport * from \"./system\"\nexport * from \"./forward-ref\"\nexport * from \"./use-style-config\"\nexport { shouldForwardProp } from \"./should-forward-prop\"\n","import { useControllableProp, useId } from \"@chakra-ui/hooks\"\nimport { StringOrNumber, isInputEvent } from \"@chakra-ui/utils\"\nimport * as React from \"react\"\nimport { mergeRefs, PropGetter } from \"@chakra-ui/react-utils\"\n\ntype EventOrValue = React.ChangeEvent<HTMLInputElement> | StringOrNumber\n\nexport interface UseRadioGroupProps {\n /**\n * The value of the radio to be `checked`\n * (in controlled mode)\n */\n value?: StringOrNumber\n /**\n * The value of the radio to be `checked`\n * initially (in uncontrolled mode)\n */\n defaultValue?: StringOrNumber\n /**\n * Function called once a radio is checked\n * @param nextValue the value of the checked radio\n */\n onChange?(nextValue: string): void\n /**\n * If `true`, all wrapped radio inputs will be disabled\n */\n isDisabled?: boolean\n\n /**\n * If `true` and `isDisabled` is true, all wrapped radio inputs will remain\n * focusable but not interactive.\n */\n isFocusable?: boolean\n /**\n * The `name` attribute forwarded to each `radio` element\n */\n name?: string\n /**\n * If `true`, input elements will receive\n * `checked` attribute instead of `isChecked`.\n *\n * This assumes, you're using native radio inputs\n */\n isNative?: boolean\n}\n\ntype RadioPropGetter = PropGetter<\n HTMLInputElement,\n { onChange?: (e: EventOrValue) => void; value?: StringOrNumber } & Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n \"onChange\" | \"size\" | \"value\"\n >\n>\n\n/**\n * React hook to manage a group of radio inputs\n */\nexport function useRadioGroup(props: UseRadioGroupProps = {}) {\n const {\n onChange: onChangeProp,\n value: valueProp,\n defaultValue,\n name: nameProp,\n isDisabled,\n isFocusable,\n isNative,\n ...htmlProps\n } = props\n\n const [valueState, setValue] = React.useState<StringOrNumber>(\n defaultValue || \"\",\n )\n const [isControlled, value] = useControllableProp(valueProp, valueState)\n\n const ref = React.useRef<any>(null)\n\n const focus = React.useCallback(() => {\n const rootNode = ref.current\n if (!rootNode) return\n\n let query = `input:not(:disabled):checked`\n\n const firstEnabledAndCheckedInput = rootNode.querySelector(\n query,\n ) as HTMLElement\n\n if (firstEnabledAndCheckedInput) {\n firstEnabledAndCheckedInput.focus()\n return\n }\n\n query = `input:not(:disabled)`\n\n const firstEnabledInput = rootNode.querySelector(query) as HTMLElement\n firstEnabledInput?.focus()\n }, [])\n\n /**\n * All radio options must use the same name\n */\n const fallbackName = useId(undefined, `radio`)\n const name = nameProp || fallbackName\n\n const onChange = React.useCallback(\n (eventOrValue: EventOrValue) => {\n const nextValue = isInputEvent(eventOrValue)\n ? eventOrValue.target.value\n : eventOrValue\n\n if (!isControlled) {\n setValue(nextValue)\n }\n\n onChangeProp?.(String(nextValue))\n },\n [onChangeProp, isControlled],\n )\n\n const getRootProps: PropGetter = React.useCallback(\n (props = {}, forwardedRef = null) => ({\n ...props,\n ref: mergeRefs(forwardedRef, ref),\n role: \"radiogroup\",\n }),\n [],\n )\n\n const getRadioProps: RadioPropGetter = React.useCallback(\n (props = {}, ref = null) => {\n const checkedKey = isNative ? \"checked\" : \"isChecked\"\n return {\n ...props,\n ref,\n name,\n [checkedKey]: value != null ? props.value === value : undefined,\n onChange,\n \"data-radiogroup\": true,\n }\n },\n [isNative, name, onChange, value],\n )\n\n return {\n getRootProps,\n getRadioProps,\n name,\n ref,\n focus,\n setValue,\n value,\n onChange,\n isDisabled,\n isFocusable,\n htmlProps,\n }\n}\n\nexport type UseRadioGroupReturn = ReturnType<typeof useRadioGroup>\n","import {\n chakra,\n forwardRef,\n ThemingProps,\n HTMLChakraProps,\n} from \"@chakra-ui/system\"\nimport { cx, __DEV__ } from \"@chakra-ui/utils\"\nimport { createContext } from \"@chakra-ui/react-utils\"\nimport * as React from \"react\"\nimport {\n useRadioGroup,\n UseRadioGroupProps,\n UseRadioGroupReturn,\n} from \"./use-radio-group\"\n\nexport interface RadioGroupContext\n extends Pick<\n UseRadioGroupReturn,\n \"onChange\" | \"value\" | \"name\" | \"isDisabled\" | \"isFocusable\"\n >,\n Omit<ThemingProps<\"Radio\">, \"orientation\"> {}\n\nconst [\n RadioGroupProvider,\n useRadioGroupContext,\n] = createContext<RadioGroupContext>({\n name: \"RadioGroupContext\",\n strict: false,\n})\n\nexport { useRadioGroupContext }\n\ntype Omitted =\n | \"onChange\"\n | \"value\"\n | \"defaultValue\"\n | \"defaultChecked\"\n | \"children\"\nexport interface RadioGroupProps\n extends UseRadioGroupProps,\n Omit<HTMLChakraProps<\"div\">, Omitted>,\n Omit<ThemingProps<\"Radio\">, \"orientation\"> {\n children: React.ReactNode\n}\n\n/**\n * Used for multiple radios which are bound in one group,\n * and it indicates which option is selected.\n *\n * @see Docs https://chakra-ui.com/radio\n */\nexport const RadioGroup = forwardRef<RadioGroupProps, \"div\">((props, ref) => {\n const {\n colorScheme,\n size,\n variant,\n children,\n className,\n isDisabled,\n isFocusable,\n ...rest\n } = props\n\n const { value, onChange, getRootProps, name, htmlProps } = useRadioGroup(rest)\n\n const group = React.useMemo(\n () => ({\n name,\n size,\n onChange,\n colorScheme,\n value,\n variant,\n isDisabled,\n isFocusable,\n }),\n [\n name,\n size,\n onChange,\n colorScheme,\n value,\n variant,\n isDisabled,\n isFocusable,\n ],\n )\n\n const groupProps = getRootProps(htmlProps, ref)\n const _className = cx(\"chakra-radio-group\", className)\n\n return (\n <RadioGroupProvider value={group}>\n <chakra.div {...groupProps} className={_className}>\n {children}\n </chakra.div>\n </RadioGroupProvider>\n )\n})\n\nif (__DEV__) {\n RadioGroup.displayName = \"RadioGroup\"\n}\n","import { chakra, forwardRef, HTMLChakraProps } from \"@chakra-ui/system\"\nimport { cx } from \"@chakra-ui/utils\"\nimport * as React from \"react\"\n\nexport interface LinkOverlayProps extends HTMLChakraProps<\"a\"> {\n /**\n * If `true`, the link will open in new tab\n */\n isExternal?: boolean\n}\n\nexport const LinkOverlay = forwardRef<LinkOverlayProps, \"a\">((props, ref) => {\n const { isExternal, target, rel, className, ...rest } = props\n return (\n <chakra.a\n {...rest}\n ref={ref}\n className={cx(\"chakra-linkbox__overlay\", className)}\n rel={isExternal ? \"noopener noreferrer\" : rel}\n target={isExternal ? \"_blank\" : target}\n __css={{\n position: \"static\",\n \"&::before\": {\n content: \"''\",\n cursor: \"inherit\",\n display: \"block\",\n position: \"absolute\",\n top: 0,\n left: 0,\n zIndex: 0,\n width: \"100%\",\n height: \"100%\",\n },\n }}\n />\n )\n})\n\nexport interface LinkBoxProps extends HTMLChakraProps<\"div\"> {}\n\n/**\n * `LinkBox` is used to wrap content areas within a link while ensuring semantic html\n *\n * @see Docs https://chakra-ui.com/docs/navigation/link-overlay\n * @see Resources https://www.sarasoueidan.com/blog/nested-links\n */\nexport const LinkBox = forwardRef<LinkBoxProps, \"div\">((props, ref) => {\n const { className, ...rest } = props\n\n return (\n <chakra.div\n ref={ref}\n position=\"relative\"\n {...rest}\n className={cx(\"chakra-linkbox\", className)}\n __css={{\n /* Elevate the links and abbreviations up */\n \"a[href]:not(.chakra-linkbox__overlay), abbr[title]\": {\n position: \"relative\",\n zIndex: 1,\n },\n }}\n />\n )\n})\n","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Number} the result of the comparison\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\n\nexport default function compareAsc(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var diff = dateLeft.getTime() - dateRight.getTime();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1; // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}","import assign from \"../assign/index.js\";\nexport default function cloneObject(dirtyObject) {\n return assign({}, dirtyObject);\n}","export default function assign(target, dirtyObject) {\n if (target == null) {\n throw new TypeError('assign requires that input parameter not be null or undefined');\n }\n\n dirtyObject = dirtyObject || {};\n\n for (var property in dirtyObject) {\n if (Object.prototype.hasOwnProperty.call(dirtyObject, property)) {\n target[property] = dirtyObject[property];\n }\n }\n\n return target;\n}","import getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport compareAsc from \"../compareAsc/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport cloneObject from \"../_lib/cloneObject/index.js\";\nimport defaultLocale from \"../locale/en-US/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_MINUTE = 1000 * 60;\nvar MINUTES_IN_DAY = 60 * 24;\nvar MINUTES_IN_MONTH = MINUTES_IN_DAY * 30;\nvar MINUTES_IN_YEAR = MINUTES_IN_DAY * 365;\n/**\n * @name formatDistanceStrict\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words, using strict units.\n * This is like `formatDistance`, but does not use helpers like 'almost', 'over',\n * 'less than' and the like.\n *\n * | Distance between dates | Result |\n * |------------------------|---------------------|\n * | 0 ... 59 secs | [0..59] seconds |\n * | 1 ... 59 mins | [1..59] minutes |\n * | 1 ... 23 hrs | [1..23] hours |\n * | 1 ... 29 days | [1..29] days |\n * | 1 ... 11 months | [1..11] months |\n * | 1 ... N years | [1..N] years |\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The function was renamed from `distanceInWordsStrict` to `formatDistanceStrict`\n * to make its name consistent with `format` and `formatRelative`.\n *\n * - The order of arguments is swapped to make the function\n * consistent with `differenceIn...` functions.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWordsStrict(\n * new Date(2015, 0, 2),\n * new Date(2014, 6, 2)\n * ) //=> '6 months'\n *\n * // v2.0.0 onward\n *\n * formatDistanceStrict(\n * new Date(2014, 6, 2),\n * new Date(2015, 0, 2)\n * ) //=> '6 months'\n * ```\n *\n * - `partialMethod` option is renamed to `roundingMethod`.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWordsStrict(\n * new Date(1986, 3, 4, 10, 32, 0),\n * new Date(1986, 3, 4, 10, 33, 1),\n * { partialMethod: 'ceil' }\n * ) //=> '2 minutes'\n *\n * // v2.0.0 onward\n *\n * formatDistanceStrict(\n * new Date(1986, 3, 4, 10, 33, 1),\n * new Date(1986, 3, 4, 10, 32, 0),\n * { roundingMethod: 'ceil' }\n * ) //=> '2 minutes'\n * ```\n *\n * - If `roundingMethod` is not specified, it now defaults to `round` instead of `floor`.\n *\n * - `unit` option now accepts one of the strings:\n * 'second', 'minute', 'hour', 'day', 'month' or 'year' instead of 's', 'm', 'h', 'd', 'M' or 'Y'\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWordsStrict(\n * new Date(1986, 3, 4, 10, 32, 0),\n * new Date(1986, 3, 4, 10, 33, 1),\n * { unit: 'm' }\n * )\n *\n * // v2.0.0 onward\n *\n * formatDistanceStrict(\n * new Date(1986, 3, 4, 10, 33, 1),\n * new Date(1986, 3, 4, 10, 32, 0),\n * { unit: 'minute' }\n * )\n * ```\n *\n * @param {Date|Number} date - the date\n * @param {Date|Number} baseDate - the date to compare with\n * @param {Object} [options] - an object with options.\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {'second'|'minute'|'hour'|'day'|'month'|'year'} [options.unit] - if specified, will force a unit\n * @param {'floor'|'ceil'|'round'} [options.roundingMethod='round'] - which way to round partial units\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `baseDate` must not be Invalid Date\n * @throws {RangeError} `options.roundingMethod` must be 'floor', 'ceil' or 'round'\n * @throws {RangeError} `options.unit` must be 'second', 'minute', 'hour', 'day', 'month' or 'year'\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistanceStrict(new Date(2014, 6, 2), new Date(2015, 0, 2))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00?\n * const result = formatDistanceStrict(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0)\n * )\n * //=> '15 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistanceStrict(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> '1 year ago'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, in minutes?\n * const result = formatDistanceStrict(new Date(2016, 0, 1), new Date(2015, 0, 1), {\n * unit: 'minute'\n * })\n * //=> '525600 minutes'\n *\n * @example\n * // What is the distance from 1 January 2015\n * // to 28 January 2015, in months, rounded up?\n * const result = formatDistanceStrict(new Date(2015, 0, 28), new Date(2015, 0, 1), {\n * unit: 'month',\n * roundingMethod: 'ceil'\n * })\n * //=> '1 month'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistanceStrict(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> '1 jaro'\n */\n\nexport default function formatDistanceStrict(dirtyDate, dirtyBaseDate) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n requiredArgs(2, arguments);\n var locale = options.locale || defaultLocale;\n\n if (!locale.formatDistance) {\n throw new RangeError('locale must contain localize.formatDistance property');\n }\n\n var comparison = compareAsc(dirtyDate, dirtyBaseDate);\n\n if (isNaN(comparison)) {\n throw new RangeError('Invalid time value');\n }\n\n var localizeOptions = cloneObject(options);\n localizeOptions.addSuffix = Boolean(options.addSuffix);\n localizeOptions.comparison = comparison;\n var dateLeft;\n var dateRight;\n\n if (comparison > 0) {\n dateLeft = toDate(dirtyBaseDate);\n dateRight = toDate(dirtyDate);\n } else {\n dateLeft = toDate(dirtyDate);\n dateRight = toDate(dirtyBaseDate);\n }\n\n var roundingMethod = options.roundingMethod == null ? 'round' : String(options.roundingMethod);\n var roundingMethodFn;\n\n if (roundingMethod === 'floor') {\n roundingMethodFn = Math.floor;\n } else if (roundingMethod === 'ceil') {\n roundingMethodFn = Math.ceil;\n } else if (roundingMethod === 'round') {\n roundingMethodFn = Math.round;\n } else {\n throw new RangeError(\"roundingMethod must be 'floor', 'ceil' or 'round'\");\n }\n\n var milliseconds = dateRight.getTime() - dateLeft.getTime();\n var minutes = milliseconds / MILLISECONDS_IN_MINUTE;\n var timezoneOffset = getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft); // Use DST-normalized difference in minutes for years, months and days;\n // use regular difference in minutes for hours, minutes and seconds.\n\n var dstNormalizedMinutes = (milliseconds - timezoneOffset) / MILLISECONDS_IN_MINUTE;\n var unit;\n\n if (options.unit == null) {\n if (minutes < 1) {\n unit = 'second';\n } else if (minutes < 60) {\n unit = 'minute';\n } else if (minutes < MINUTES_IN_DAY) {\n unit = 'hour';\n } else if (dstNormalizedMinutes < MINUTES_IN_MONTH) {\n unit = 'day';\n } else if (dstNormalizedMinutes < MINUTES_IN_YEAR) {\n unit = 'month';\n } else {\n unit = 'year';\n }\n } else {\n unit = String(options.unit);\n } // 0 up to 60 seconds\n\n\n if (unit === 'second') {\n var seconds = roundingMethodFn(milliseconds / 1000);\n return locale.formatDistance('xSeconds', seconds, localizeOptions); // 1 up to 60 mins\n } else if (unit === 'minute') {\n var roundedMinutes = roundingMethodFn(minutes);\n return locale.formatDistance('xMinutes', roundedMinutes, localizeOptions); // 1 up to 24 hours\n } else if (unit === 'hour') {\n var hours = roundingMethodFn(minutes / 60);\n return locale.formatDistance('xHours', hours, localizeOptions); // 1 up to 30 days\n } else if (unit === 'day') {\n var days = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_DAY);\n return locale.formatDistance('xDays', days, localizeOptions); // 1 up to 12 months\n } else if (unit === 'month') {\n var months = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_MONTH);\n return months === 12 && options.unit !== 'month' ? locale.formatDistance('xYears', 1, localizeOptions) : locale.formatDistance('xMonths', months, localizeOptions); // 1 year up to max Date\n } else if (unit === 'year') {\n var years = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_YEAR);\n return locale.formatDistance('xYears', years, localizeOptions);\n }\n\n throw new RangeError(\"unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'\");\n}","import formatDistanceStrict from \"../formatDistanceStrict/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name formatDistanceToNowStrict\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n * @pure false\n *\n * @description\n * Return the distance between the given dates in words, using strict units.\n * This is like `formatDistance`, but does not use helpers like 'almost', 'over',\n * 'less than' and the like.\n *\n * | Distance between dates | Result |\n * |------------------------|---------------------|\n * | 0 ... 59 secs | [0..59] seconds |\n * | 1 ... 59 mins | [1..59] minutes |\n * | 1 ... 23 hrs | [1..23] hours |\n * | 1 ... 29 days | [1..29] days |\n * | 1 ... 11 months | [1..11] months |\n * | 1 ... N years | [1..N] years |\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - an object with options.\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {'second'|'minute'|'hour'|'day'|'month'|'year'} [options.unit] - if specified, will force a unit\n * @param {'floor'|'ceil'|'round'} [options.roundingMethod='round'] - which way to round partial units\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * var result = formatDistanceToNowStrict(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * var result = formatDistanceToNowStrict(\n * new Date(2015, 0, 1, 0, 0, 15)\n * )\n * //=> '20 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * var result = formatDistanceToNowStrict(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in 1 year'\n *\n * @example\n * // If today is 28 January 2015,\n * // what is the distance to 1 January 2015, in months, rounded up??\n * var result = formatDistanceToNowStrict(new Date(2015, 0, 1), {\n * unit: 'month',\n * roundingMethod: 'ceil'\n * })\n * //=> '1 month'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 August 2016 in Esperanto?\n * var eoLocale = require('date-fns/locale/eo')\n * var result = formatDistanceToNowStrict(\n * new Date(2016, 7, 1),\n * {locale: eoLocale}\n * )\n * //=> '1 jaro'\n */\n\nexport default function formatDistanceToNowStrict(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n return formatDistanceStrict(dirtyDate, Date.now(), dirtyOptions);\n}","import { createContext } from \"@chakra-ui/react-utils\"\nimport { UsePopoverReturn } from \"./use-popover\"\n\nexport const [\n PopoverProvider,\n usePopoverContext,\n] = createContext<UsePopoverReturn>({\n name: \"PopoverContext\",\n errorMessage:\n \"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`\",\n})\n","import { chakra, HTMLChakraProps } from \"@chakra-ui/system\"\nimport { HTMLMotionProps, motion, Variant } from \"framer-motion\"\nimport { mergeWith } from \"@chakra-ui/utils\"\nimport React from \"react\"\nimport { usePopoverContext } from \"./popover-context\"\n\n// TODO: consider moving this to some util\ntype HTMLMotionChakraProps<T extends keyof React.ReactHTML> = Omit<\n HTMLChakraProps<T>,\n keyof HTMLMotionProps<T>\n> &\n Omit<\n HTMLMotionProps<T>,\n | \"style\"\n | \"onDrag\"\n | \"onDragEnd\"\n | \"onDragStart\"\n | \"onAnimationStart\"\n | \"variants\"\n > & {\n variants?: MotionVariants\n }\n\ntype MotionVariants = Partial<Record<\"enter\" | \"exit\", Variant>>\n\nconst mergeVariants = (variants?: MotionVariants) => {\n if (!variants) return\n return mergeWith(variants, {\n enter: {\n visibility: \"visible\",\n },\n exit: {\n transitionEnd: {\n visibility: \"hidden\",\n },\n },\n })\n}\n\nconst scaleFade: MotionVariants = {\n exit: {\n opacity: 0,\n scale: 0.95,\n transition: {\n duration: 0.1,\n ease: [0.4, 0, 1, 1],\n },\n },\n enter: {\n scale: 1,\n opacity: 1,\n transition: {\n duration: 0.15,\n ease: [0, 0, 0.2, 1],\n },\n },\n}\n\nconst Section = motion(chakra.section)\n\nexport interface PopoverTransitionProps\n extends HTMLMotionChakraProps<\"section\"> {}\n\nexport const PopoverTransition = React.forwardRef(\n (props: HTMLMotionChakraProps<\"section\">, ref: React.Ref<any>) => {\n const { isOpen } = usePopoverContext()\n return (\n <Section\n ref={ref}\n variants={mergeVariants(props.variants)}\n {...props}\n initial={false}\n animate={isOpen ? \"enter\" : \"exit\"}\n />\n )\n },\n)\n\nPopoverTransition.defaultProps = {\n variants: scaleFade,\n}\n","/**\n * Credit goes to `framer-motion` of this useful utilities.\n * License can be found here: https://github.com/framer/motion\n */\n\nimport { addDomEvent, getEventWindow, isBrowser } from \"./dom\"\n\nexport type AnyPointerEvent = MouseEvent | TouchEvent | PointerEvent\n\ntype PointType = \"page\" | \"client\"\n\nexport function isMouseEvent(event: AnyPointerEvent): event is MouseEvent {\n const win = getEventWindow(event)\n\n // PointerEvent inherits from MouseEvent so we can't use a straight instanceof check.\n if (\n typeof win.PointerEvent !== \"undefined\" &&\n event instanceof win.PointerEvent\n ) {\n return !!(event.pointerType === \"mouse\")\n }\n\n return event instanceof win.MouseEvent\n}\n\nexport function isTouchEvent(event: AnyPointerEvent): event is TouchEvent {\n const hasTouches = !!(event as TouchEvent).touches\n return hasTouches\n}\n\nexport interface Point {\n x: number\n y: number\n}\n\nexport interface PointerEventInfo {\n point: Point\n}\n\nexport type EventHandler = (\n event: AnyPointerEvent,\n info: PointerEventInfo,\n) => void\n\n/**\n * Filters out events not attached to the primary pointer (currently left mouse button)\n * @param eventHandler\n */\nfunction filterPrimaryPointer(eventHandler: EventListener): EventListener {\n return (event: Event) => {\n const win = getEventWindow(event)\n const isMouseEvent = event instanceof win.MouseEvent\n const isPrimaryPointer =\n !isMouseEvent || (isMouseEvent && (event as MouseEvent).button === 0)\n if (isPrimaryPointer) {\n eventHandler(event)\n }\n }\n}\n\nexport type EventListenerWithPointInfo = (\n e: AnyPointerEvent,\n info: PointerEventInfo,\n) => void\n\nconst defaultPagePoint = { pageX: 0, pageY: 0 }\n\nfunction pointFromTouch(e: TouchEvent, pointType: PointType = \"page\") {\n const primaryTouch = e.touches[0] || e.changedTouches[0]\n const point = primaryTouch || defaultPagePoint\n\n return {\n x: point[`${pointType}X`],\n y: point[`${pointType}Y`],\n }\n}\n\nfunction pointFromMouse(\n point: MouseEvent | PointerEvent,\n pointType: PointType = \"page\",\n) {\n return {\n x: point[`${pointType}X`],\n y: point[`${pointType}Y`],\n }\n}\n\nexport function extractEventInfo(\n event: AnyPointerEvent,\n pointType: PointType = \"page\",\n): PointerEventInfo {\n return {\n point: isTouchEvent(event)\n ? pointFromTouch(event, pointType)\n : pointFromMouse(event, pointType),\n }\n}\n\nexport function getViewportPointFromEvent(event: AnyPointerEvent) {\n return extractEventInfo(event, \"client\")\n}\n\nexport const wrapPointerEventHandler = (\n handler: EventListenerWithPointInfo,\n shouldFilterPrimaryPointer = false,\n): EventListener => {\n const listener: EventListener = (event: any) =>\n handler(event, extractEventInfo(event))\n\n return shouldFilterPrimaryPointer ? filterPrimaryPointer(listener) : listener\n}\n\n// We check for event support via functions in case they've been mocked by a testing suite.\nconst supportsPointerEvents = () => isBrowser && window.onpointerdown === null\nconst supportsTouchEvents = () => isBrowser && window.ontouchstart === null\nconst supportsMouseEvents = () => isBrowser && window.onmousedown === null\n\ninterface PointerNameMap {\n pointerdown: string\n pointermove: string\n pointerup: string\n pointercancel: string\n pointerover?: string\n pointerout?: string\n pointerenter?: string\n pointerleave?: string\n}\n\nconst mouseEventNames: PointerNameMap = {\n pointerdown: \"mousedown\",\n pointermove: \"mousemove\",\n pointerup: \"mouseup\",\n pointercancel: \"mousecancel\",\n pointerover: \"mouseover\",\n pointerout: \"mouseout\",\n pointerenter: \"mouseenter\",\n pointerleave: \"mouseleave\",\n}\n\nconst touchEventNames: PointerNameMap = {\n pointerdown: \"touchstart\",\n pointermove: \"touchmove\",\n pointerup: \"touchend\",\n pointercancel: \"touchcancel\",\n}\n\nexport function getPointerEventName(name: string): string {\n if (supportsPointerEvents()) {\n return name\n }\n if (supportsTouchEvents()) {\n return touchEventNames[name]\n }\n if (supportsMouseEvents()) {\n return mouseEventNames[name]\n }\n\n return name\n}\n\nexport function addPointerEvent(\n target: EventTarget,\n eventName: string,\n handler: EventListenerWithPointInfo,\n options?: AddEventListenerOptions,\n) {\n return addDomEvent(\n target,\n getPointerEventName(eventName),\n wrapPointerEventHandler(handler, eventName === \"pointerdown\"),\n options,\n )\n}\n\nexport function isMultiTouchEvent(event: AnyPointerEvent) {\n return isTouchEvent(event) && event.touches.length > 1\n}\n","import {\n contains,\n detectBrowser,\n focus,\n getOwnerDocument,\n isActiveElement,\n isRefObject,\n} from \"@chakra-ui/utils\"\nimport { RefObject } from \"react\"\nimport { usePointerEvent } from \"./use-pointer-event\"\n\nexport interface UseFocusOnMouseDownProps {\n enabled?: boolean\n ref: RefObject<HTMLElement>\n elements?: Array<RefObject<HTMLElement> | HTMLElement | null>\n}\n\n/**\n * Polyfill to get `relatedTarget` working correctly consistently\n * across all browsers.\n *\n * It ensures that elements receives focus on pointer down if\n * it's not the active active element.\n *\n * @internal\n */\nexport function useFocusOnPointerDown(props: UseFocusOnMouseDownProps) {\n const { ref, elements, enabled } = props\n\n const isSafari = detectBrowser(\"Safari\")\n const doc = () => getOwnerDocument(ref.current)\n\n usePointerEvent(doc, \"pointerdown\", (event) => {\n if (!isSafari || !enabled) return\n const target = event.target as HTMLElement\n\n const els = elements ?? [ref]\n const isValidTarget = els.some((elementOrRef) => {\n const el = isRefObject(elementOrRef) ? elementOrRef.current : elementOrRef\n return contains(el, target)\n })\n\n if (!isActiveElement(target) && isValidTarget) {\n event.preventDefault()\n focus(target)\n }\n })\n}\n","import { isBrowser } from \"./dom\"\n\nfunction getUserAgentBrowser(navigator: Navigator) {\n const { userAgent: ua, vendor } = navigator\n const android = /(android)/i.test(ua)\n\n switch (true) {\n case /CriOS/.test(ua):\n return \"Chrome for iOS\"\n case /Edg\\//.test(ua):\n return \"Edge\"\n case android && /Silk\\//.test(ua):\n return \"Silk\"\n case /Chrome/.test(ua) && /Google Inc/.test(vendor):\n return \"Chrome\"\n case /Firefox\\/\\d+\\.\\d+$/.test(ua):\n return \"Firefox\"\n case android:\n return \"AOSP\"\n case /MSIE|Trident/.test(ua):\n return \"IE\"\n case /Safari/.test(navigator.userAgent) && /Apple Computer/.test(ua):\n return \"Safari\"\n case /AppleWebKit/.test(ua):\n return \"WebKit\"\n default:\n return null\n }\n}\n\nexport type UserAgentBrowser = NonNullable<\n ReturnType<typeof getUserAgentBrowser>\n>\n\nfunction getUserAgentOS(navigator: Navigator) {\n const { userAgent: ua, platform } = navigator\n switch (true) {\n case /Android/.test(ua):\n return \"Android\"\n case /iPhone|iPad|iPod/.test(platform):\n return \"iOS\"\n case /Win/.test(platform):\n return \"Windows\"\n case /Mac/.test(platform):\n return \"Mac\"\n case /CrOS/.test(ua):\n return \"Chrome OS\"\n case /Firefox/.test(ua):\n return \"Firefox OS\"\n default:\n return null\n }\n}\n\nexport type UserAgentOS = NonNullable<ReturnType<typeof getUserAgentOS>>\n\nexport function detectDeviceType(navigator: Navigator) {\n const { userAgent: ua } = navigator\n if (/(tablet)|(iPad)|(Nexus 9)/i.test(ua)) return \"tablet\"\n if (/(mobi)/i.test(ua)) return \"phone\"\n return \"desktop\"\n}\n\nexport type UserAgentDeviceType = NonNullable<\n ReturnType<typeof detectDeviceType>\n>\n\nexport function detectOS(os: UserAgentOS) {\n if (!isBrowser) return false\n return getUserAgentOS(window.navigator) === os\n}\n\nexport function detectBrowser(browser: UserAgentBrowser) {\n if (!isBrowser) return false\n return getUserAgentBrowser(window.navigator) === browser\n}\n\nexport function detectTouch() {\n if (!isBrowser) return false\n return (\n window.ontouchstart === null &&\n window.ontouchmove === null &&\n window.ontouchend === null\n )\n}\n","/**\n * Credit goes to `framer-motion` of this useful utilities.\n * License can be found here: https://github.com/framer/motion\n */\n\nimport {\n EventListenerWithPointInfo,\n getPointerEventName,\n wrapPointerEventHandler,\n} from \"@chakra-ui/utils\"\nimport { EventListenerEnv, useEventListener } from \"./use-event-listener\"\n\n/**\n * @internal\n */\nexport function usePointerEvent(\n env: EventListenerEnv,\n eventName: string,\n handler: EventListenerWithPointInfo,\n options?: AddEventListenerOptions,\n) {\n return useEventListener(\n getPointerEventName(eventName),\n wrapPointerEventHandler(handler, eventName === \"pointerdown\"),\n env,\n options,\n )\n}\n","import {\n contains,\n focus,\n FocusableElement,\n getAllFocusable,\n isRefObject,\n} from \"@chakra-ui/utils\"\nimport React, { useCallback } from \"react\"\nimport { useEventListener } from \"./use-event-listener\"\nimport { useUpdateEffect } from \"./use-update-effect\"\n\nexport interface UseFocusOnShowOptions {\n visible?: boolean\n shouldFocus?: boolean\n preventScroll?: boolean\n focusRef?: React.RefObject<FocusableElement>\n}\n\nconst defaultOptions: UseFocusOnShowOptions = {\n preventScroll: true,\n shouldFocus: false,\n}\n\nexport function useFocusOnShow<T extends HTMLElement>(\n target: React.RefObject<T> | T,\n options = defaultOptions,\n) {\n const { focusRef, preventScroll, shouldFocus, visible } = options\n const element = isRefObject(target) ? target.current : target\n\n const autoFocus = shouldFocus && visible\n\n const onFocus = useCallback(() => {\n if (!element || !autoFocus) return\n\n if (contains(element, document.activeElement as HTMLElement)) return\n\n if (focusRef?.current) {\n focus(focusRef.current, { preventScroll, nextTick: true })\n } else {\n const tabbableEls = getAllFocusable(element)\n if (tabbableEls.length > 0) {\n focus(tabbableEls[0], { preventScroll, nextTick: true })\n }\n }\n }, [autoFocus, preventScroll, element, focusRef])\n\n useUpdateEffect(() => {\n onFocus()\n }, [onFocus])\n\n useEventListener(\"transitionend\", onFocus, element)\n}\n","import {\n useDisclosure,\n useFocusOnHide,\n useFocusOnPointerDown,\n useFocusOnShow,\n useIds,\n} from \"@chakra-ui/hooks\"\nimport { popperCSSVars, usePopper, UsePopperProps } from \"@chakra-ui/popper\"\nimport { HTMLProps, mergeRefs, PropGetter } from \"@chakra-ui/react-utils\"\nimport {\n callAllHandlers,\n contains,\n determineLazyBehavior,\n FocusableElement,\n getRelatedTarget,\n LazyBehavior,\n px,\n} from \"@chakra-ui/utils\"\nimport { RefObject, useCallback, useEffect, useRef, useState } from \"react\"\n\nconst TRIGGER = {\n click: \"click\",\n hover: \"hover\",\n} as const\n\nexport interface UsePopoverProps extends UsePopperProps {\n /**\n * The html `id` attribute of the popover.\n * If not provided, we generate a unique id.\n *\n * This `id` is also used to auto-generate the `aria-labelledby`\n * and `aria-decribedby` attributes that points to the `PopoverHeader` and `PopoverBody`\n */\n id?: string\n /**\n * If `true`, the popover will be opened in controlled mode.\n */\n isOpen?: boolean\n /**\n * If `true`, the popover will be initially opened.\n */\n defaultIsOpen?: boolean\n /**\n * The `ref` of the element that should receive focus when the popover opens.\n */\n initialFocusRef?: RefObject<FocusableElement>\n /**\n * If `true`, focus will be returned to the element that triggers the popover\n * when it closes\n */\n returnFocusOnClose?: boolean\n /**\n * If `true`, focus will be transferred to the first interactive element\n * when the popover opens\n */\n autoFocus?: boolean\n /**\n * If `true`, the popover will close when you blur out it by\n * clicking outside or tabbing out\n */\n closeOnBlur?: boolean\n /**\n * If `true`, the popover will close when you hit the `Esc` key\n */\n closeOnEsc?: boolean\n /**\n * Callback fired when the popover opens\n */\n onOpen?: () => void\n /**\n * Callback fired when the popover closes\n */\n onClose?: () => void\n /**\n * The size of the popover arrow\n */\n arrowSize?: number\n /**\n * The `box-shadow` of the popover arrow\n */\n arrowShadowColor?: string\n /**\n * The interaction that triggers the popover.\n *\n * `hover` - means the popover will open when you hover with mouse or\n * focus with keyboard on the popover trigger\n *\n * `click` - means the popover will open on click or\n * press `Enter` to `Space` on keyboard\n */\n trigger?: keyof typeof TRIGGER\n openDelay?: number\n closeDelay?: number\n /**\n * Performance 🚀:\n * If `true`, the PopoverContent rendering will be deferred\n * until the popover is open.\n */\n isLazy?: boolean\n /**\n * Performance 🚀:\n * The lazy behavior of popover's content when not visible.\n * Only works when `isLazy={true}`\n *\n * - \"unmount\": The popover's content is always unmounted when not open.\n * - \"keepMounted\": The popover's content initially unmounted,\n * but stays mounted when popover is open.\n *\n * @default \"unmount\"\n */\n lazyBehavior?: LazyBehavior\n /**\n * If `true`, the popover will be positioned when it mounts\n * (even if it's not open)\n *\n * Note 🚨: We don't recommend using this in a popover/menu intensive UI or page\n * as it might affect scrolling performance.\n */\n computePositionOnMount?: boolean\n}\n\n/**\n * @internal\n */\nexport function usePopover(props: UsePopoverProps = {}) {\n const {\n closeOnBlur = true,\n closeOnEsc = true,\n initialFocusRef,\n id,\n returnFocusOnClose = true,\n autoFocus = true,\n arrowSize,\n arrowShadowColor,\n trigger = TRIGGER.click,\n openDelay = 200,\n closeDelay = 200,\n isLazy,\n lazyBehavior = \"unmount\",\n computePositionOnMount,\n ...popperProps\n } = props\n\n const { isOpen, onClose, onOpen, onToggle } = useDisclosure(props)\n\n const triggerRef = useRef<HTMLElement>(null)\n const popoverRef = useRef<HTMLElement>(null)\n\n const isHoveringRef = useRef(false)\n\n const hasBeenOpened = useRef(false)\n if (isOpen) {\n hasBeenOpened.current = true\n }\n\n const [hasHeader, setHasHeader] = useState(false)\n const [hasBody, setHasBody] = useState(false)\n\n const [triggerId, popoverId, headerId, bodyId] = useIds(\n id,\n \"popover-trigger\",\n \"popover-content\",\n \"popover-header\",\n \"popover-body\",\n )\n\n const {\n referenceRef,\n getArrowProps,\n getPopperProps,\n getArrowInnerProps,\n forceUpdate,\n } = usePopper({\n ...popperProps,\n enabled: isOpen || !!computePositionOnMount,\n })\n\n useFocusOnPointerDown({\n enabled: isOpen,\n ref: triggerRef,\n })\n\n useFocusOnHide(popoverRef, {\n focusRef: triggerRef,\n visible: isOpen,\n shouldFocus: returnFocusOnClose && trigger === TRIGGER.click,\n })\n\n useFocusOnShow(popoverRef, {\n focusRef: initialFocusRef,\n visible: isOpen,\n shouldFocus: autoFocus && trigger === TRIGGER.click,\n })\n\n const shouldRenderChildren = determineLazyBehavior({\n hasBeenSelected: hasBeenOpened.current,\n isLazy,\n lazyBehavior,\n isSelected: isOpen,\n })\n\n const getPopoverProps: PropGetter = useCallback(\n (props = {}, _ref = null) => {\n const popoverProps: HTMLProps = {\n ...props,\n style: {\n ...props.style,\n transformOrigin: popperCSSVars.transformOrigin.varRef,\n [popperCSSVars.arrowSize.var]: arrowSize ? px(arrowSize) : undefined,\n [popperCSSVars.arrowShadowColor.var]: arrowShadowColor,\n },\n ref: mergeRefs(popoverRef, _ref),\n children: shouldRenderChildren ? props.children : null,\n id: popoverId,\n tabIndex: -1,\n role: \"dialog\",\n onKeyDown: callAllHandlers(props.onKeyDown, (event) => {\n if (closeOnEsc && event.key === \"Escape\") {\n onClose()\n }\n }),\n onBlur: callAllHandlers(props.onBlur, (event) => {\n const relatedTarget = getRelatedTarget(event)\n const targetIsPopover = contains(popoverRef.current, relatedTarget)\n const targetIsTrigger = contains(triggerRef.current, relatedTarget)\n const isValidBlur = !targetIsPopover && !targetIsTrigger\n\n if (isOpen && closeOnBlur && isValidBlur) {\n onClose()\n }\n }),\n \"aria-labelledby\": hasHeader ? headerId : undefined,\n \"aria-describedby\": hasBody ? bodyId : undefined,\n }\n\n if (trigger === TRIGGER.hover) {\n popoverProps.role = \"tooltip\"\n popoverProps.onMouseEnter = callAllHandlers(props.onMouseEnter, () => {\n isHoveringRef.current = true\n })\n popoverProps.onMouseLeave = callAllHandlers(props.onMouseLeave, () => {\n isHoveringRef.current = false\n setTimeout(onClose, closeDelay)\n })\n }\n\n return popoverProps\n },\n [\n shouldRenderChildren,\n popoverId,\n hasHeader,\n headerId,\n hasBody,\n bodyId,\n trigger,\n closeOnEsc,\n onClose,\n isOpen,\n closeOnBlur,\n closeDelay,\n arrowShadowColor,\n arrowSize,\n ],\n )\n\n const getPopoverPositionerProps: PropGetter = useCallback(\n (props = {}, forwardedRef = null) =>\n getPopperProps(\n {\n ...props,\n style: {\n visibility: isOpen ? \"visible\" : \"hidden\",\n ...props.style,\n },\n },\n forwardedRef,\n ),\n [isOpen, getPopperProps],\n )\n\n const openTimeout = useRef<number>()\n const closeTimeout = useRef<number>()\n\n const getTriggerProps: PropGetter = useCallback(\n (props = {}, _ref = null) => {\n const triggerProps: HTMLProps = {\n ...props,\n ref: mergeRefs(triggerRef, _ref, referenceRef),\n id: triggerId,\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": isOpen,\n \"aria-controls\": popoverId,\n }\n\n if (trigger === TRIGGER.click) {\n triggerProps.onClick = callAllHandlers(props.onClick, onToggle)\n }\n\n if (trigger === TRIGGER.hover) {\n /**\n * Any content that shows on pointer hover should also show on keyboard focus.\n * Consider focus and blur to be the `hover` for keyboard users.\n *\n * @see https://www.w3.org/WAI/WCAG21/Understanding/content-on-hover-or-focus.html\n */\n triggerProps.onFocus = callAllHandlers(props.onFocus, onOpen)\n triggerProps.onBlur = callAllHandlers(props.onBlur, onClose)\n\n /**\n * Any content that shows on hover or focus must be dismissible.\n * This case pressing `Escape` will dismiss the popover\n */\n triggerProps.onKeyDown = callAllHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Escape\") {\n onClose()\n }\n })\n\n triggerProps.onMouseEnter = callAllHandlers(props.onMouseEnter, () => {\n isHoveringRef.current = true\n openTimeout.current = window.setTimeout(onOpen, openDelay)\n })\n\n triggerProps.onMouseLeave = callAllHandlers(props.onMouseLeave, () => {\n isHoveringRef.current = false\n\n if (openTimeout.current) {\n clearTimeout(openTimeout.current)\n openTimeout.current = undefined\n }\n\n closeTimeout.current = window.setTimeout(() => {\n if (isHoveringRef.current === false) {\n onClose()\n }\n }, closeDelay)\n })\n }\n\n return triggerProps\n },\n [\n triggerId,\n isOpen,\n popoverId,\n trigger,\n referenceRef,\n onToggle,\n onOpen,\n onClose,\n openDelay,\n closeDelay,\n ],\n )\n\n useEffect(() => {\n return () => {\n if (openTimeout.current) {\n clearTimeout(openTimeout.current)\n }\n if (closeTimeout.current) {\n clearTimeout(closeTimeout.current)\n }\n }\n }, [])\n\n const getHeaderProps: PropGetter = useCallback(\n (props = {}, ref = null) => ({\n ...props,\n id: headerId,\n ref: mergeRefs(ref, (node: HTMLElement | null) => {\n setHasHeader(!!node)\n }),\n }),\n [headerId],\n )\n\n const getBodyProps: PropGetter = useCallback(\n (props = {}, ref = null) => ({\n ...props,\n id: bodyId,\n ref: mergeRefs(ref, (node) => {\n setHasBody(!!node)\n }),\n }),\n [bodyId],\n )\n\n return {\n forceUpdate,\n isOpen,\n onClose,\n getArrowProps,\n getArrowInnerProps,\n getPopoverPositionerProps,\n getPopoverProps,\n getTriggerProps,\n getHeaderProps,\n getBodyProps,\n }\n}\n\nexport type UsePopoverReturn = ReturnType<typeof usePopover>\n","import { CloseButton, CloseButtonProps } from \"@chakra-ui/close-button\"\nimport { MaybeRenderProp } from \"@chakra-ui/react-utils\"\nimport {\n chakra,\n forwardRef,\n HTMLChakraProps,\n omitThemingProps,\n StylesProvider,\n SystemStyleObject,\n ThemingProps,\n useMultiStyleConfig,\n useStyles,\n useTheme,\n} from \"@chakra-ui/system\"\nimport { cx, runIfFn, __DEV__ } from \"@chakra-ui/utils\"\nimport * as React from \"react\"\nimport { PopoverProvider, usePopoverContext } from \"./popover-context\"\nimport { PopoverTransition, PopoverTransitionProps } from \"./popover-transition\"\nimport { usePopover, UsePopoverProps } from \"./use-popover\"\n\nexport { usePopoverContext }\n\nexport interface PopoverProps extends UsePopoverProps, ThemingProps<\"Popover\"> {\n /**\n * The content of the popover. It is usually the `PopoverTrigger`,\n * and `PopoverContent`\n */\n children?: MaybeRenderProp<{\n isOpen: boolean\n onClose: () => void\n forceUpdate: (() => void) | undefined\n }>\n}\n\n/**\n * Popover is used to bring attention to specific user interface elements,\n * typically to suggest an action or to guide users through a new experience.\n */\nexport const Popover: React.FC<PopoverProps> = (props) => {\n const styles = useMultiStyleConfig(\"Popover\", props)\n\n const { children, ...rest } = omitThemingProps(props)\n const theme = useTheme()\n const context = usePopover({ ...rest, direction: theme.direction })\n\n return (\n <PopoverProvider value={context}>\n <StylesProvider value={styles}>\n {runIfFn(children, {\n isOpen: context.isOpen,\n onClose: context.onClose,\n forceUpdate: context.forceUpdate,\n })}\n </StylesProvider>\n </PopoverProvider>\n )\n}\n\nif (__DEV__) {\n Popover.displayName = \"Popover\"\n}\n\n/**\n * PopoverTrigger opens the popover's content. It must be an interactive element\n * such as `button` or `a`.\n */\nexport const PopoverTrigger: React.FC = (props) => {\n // enforce a single child\n const child: any = React.Children.only(props.children)\n const { getTriggerProps } = usePopoverContext()\n return React.cloneElement(child, getTriggerProps(child.props, child.ref))\n}\n\nif (__DEV__) {\n PopoverTrigger.displayName = \"PopoverTrigger\"\n}\n\nexport interface PopoverContentProps extends PopoverTransitionProps {\n rootProps?: HTMLChakraProps<\"div\">\n}\n\nexport const PopoverContent = forwardRef<PopoverContentProps, \"section\">(\n (props, ref) => {\n const { rootProps, ...contentProps } = props\n\n const { getPopoverProps, getPopoverPositionerProps } = usePopoverContext()\n\n const styles = useStyles()\n const contentStyles: SystemStyleObject = {\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n ...styles.content,\n }\n\n return (\n <chakra.div\n {...getPopoverPositionerProps(rootProps)}\n __css={styles.popper}\n className=\"chakra-popover__popper\"\n >\n <PopoverTransition\n {...getPopoverProps(contentProps, ref)}\n className={cx(\"chakra-popover__content\", props.className)}\n __css={contentStyles}\n />\n </chakra.div>\n )\n },\n)\n\nif (__DEV__) {\n PopoverContent.displayName = \"PopoverContent\"\n}\n\nexport interface PopoverHeaderProps extends HTMLChakraProps<\"header\"> {}\n\n/**\n * PopoverHeader is the accessible header or label\n * for the popover's content and it is first announced by screenreaders.\n */\nexport const PopoverHeader = forwardRef<PopoverHeaderProps, \"header\">(\n (props, ref) => {\n const { getHeaderProps } = usePopoverContext()\n\n const styles = useStyles()\n\n return (\n <chakra.header\n {...getHeaderProps(props, ref)}\n className={cx(\"chakra-popover__header\", props.className)}\n __css={styles.header}\n />\n )\n },\n)\n\nif (__DEV__) {\n PopoverHeader.displayName = \"PopoverHeader\"\n}\n\nexport interface PopoverBodyProps extends HTMLChakraProps<\"div\"> {}\n\n/**\n * PopoverBody is the main content area for the popover. Should contain\n * at least one interactive element.\n */\nexport const PopoverBody = forwardRef<PopoverBodyProps, \"div\">((props, ref) => {\n const { getBodyProps } = usePopoverContext()\n\n const styles = useStyles()\n\n return (\n <chakra.div\n {...getBodyProps(props, ref)}\n className={cx(\"chakra-popover__body\", props.className)}\n __css={styles.body}\n />\n )\n})\n\nif (__DEV__) {\n PopoverBody.displayName = \"PopoverBody\"\n}\nexport interface PopoverFooterProps extends HTMLChakraProps<\"footer\"> {}\n\nexport const PopoverFooter: React.FC<PopoverFooterProps> = (props) => {\n const styles = useStyles()\n return (\n <chakra.footer\n {...props}\n className={cx(\"chakra-popover__footer\", props.className)}\n __css={styles.footer}\n />\n )\n}\n\nif (__DEV__) {\n PopoverFooter.displayName = \"PopoverFooter\"\n}\n\nexport type PopoverCloseButtonProps = CloseButtonProps\n\nexport const PopoverCloseButton: React.FC<CloseButtonProps> = (props) => {\n const { onClose } = usePopoverContext()\n return (\n <CloseButton\n size=\"sm\"\n onClick={onClose}\n position=\"absolute\"\n borderRadius=\"md\"\n top=\"0.25rem\"\n insetEnd=\"0.5rem\"\n padding=\"0.5rem\"\n {...props}\n />\n )\n}\n\nif (__DEV__) {\n PopoverCloseButton.displayName = \"PopoverCloseButton\"\n}\n\nexport interface PopoverArrowProps extends HTMLChakraProps<\"div\"> {}\n\nexport const PopoverArrow: React.FC<PopoverArrowProps> = (props) => {\n const { bg, bgColor, backgroundColor } = props\n const { getArrowProps, getArrowInnerProps } = usePopoverContext()\n const styles = useStyles()\n const arrowBg = bg ?? bgColor ?? backgroundColor\n return (\n <chakra.div\n {...getArrowProps()}\n className=\"chakra-popover__arrow-positioner\"\n >\n <chakra.div\n className={cx(\"chakra-popover__arrow\", props.className)}\n {...getArrowInnerProps(props)}\n __css={{\n ...styles.arrow,\n \"--popper-arrow-bg\": arrowBg\n ? `colors.${arrowBg}, ${arrowBg}`\n : undefined,\n }}\n />\n </chakra.div>\n )\n}\n\nif (__DEV__) {\n PopoverArrow.displayName = \"PopoverArrow\"\n}\n","import { useFormControlContext } from \"@chakra-ui/form-control\"\nimport { useBoolean, useControllableProp, useId } from \"@chakra-ui/hooks\"\nimport { mergeRefs, PropGetter } from \"@chakra-ui/react-utils\"\nimport { ariaAttr, callAllHandlers, dataAttr, warn } from \"@chakra-ui/utils\"\nimport { visuallyHiddenStyle } from \"@chakra-ui/visually-hidden\"\nimport {\n ChangeEvent,\n SyntheticEvent,\n useCallback,\n useRef,\n useState,\n} from \"react\"\nimport { useRadioGroupContext } from \"./radio-group\"\n\n/**\n * @todo use the `useClickable` hook here\n * to manage the isFocusable & isDisabled props\n */\nexport interface UseRadioProps {\n /**\n * id assigned to input\n */\n id?: string\n /**\n * The name of the input field in a radio\n * (Useful for form submission).\n */\n name?: string\n /**\n * The value to be used in the radio button.\n * This is the value that will be returned on form submission.\n */\n value?: string | number\n /**\n * If `true`, the radio will be checked.\n * You'll need to pass `onChange` to update its value (since it is now controlled)\n */\n isChecked?: boolean\n /**\n * If `true`, the radio will be initially checked.\n *\n * @deprecated Please use `defaultChecked` which mirrors the default prop\n * name for radio elements.\n */\n defaultIsChecked?: boolean\n /**\n * If `true`, the radio will be initially checked.\n */\n defaultChecked?: boolean\n /**\n * If `true`, the radio will be disabled\n */\n isDisabled?: boolean\n /**\n * If `true` and `isDisabled` is true, the radio will remain\n * focusable but not interactive.\n */\n isFocusable?: boolean\n /**\n * If `true`, the radio will be read-only\n */\n isReadOnly?: boolean\n /**\n * If `true`, the radio button will be invalid. This also sets `aria-invalid` to `true`.\n */\n isInvalid?: boolean\n /**\n * If `true`, the radio button will be required. This also sets `aria-required` to `true`.\n */\n isRequired?: boolean\n /**\n * Function called when checked state of the `input` changes\n */\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void\n /**\n * @internal\n */\n \"data-radiogroup\"?: any\n}\n\nexport function useRadio(props: UseRadioProps = {}) {\n const {\n defaultIsChecked,\n defaultChecked = defaultIsChecked,\n isChecked: isCheckedProp,\n isFocusable,\n isDisabled: isDisabledProp,\n isReadOnly: isReadOnlyProp,\n isRequired: isRequiredProp,\n onChange,\n isInvalid: isInvalidProp,\n name,\n value,\n id: idProp,\n \"data-radiogroup\": dataRadioGroup,\n ...htmlProps\n } = props\n\n const uuid = useId(undefined, \"radio\")\n\n const formControl = useFormControlContext()\n const group = useRadioGroupContext()\n\n const isWithinRadioGroup = !!group || !!dataRadioGroup\n const isWithinFormControl = !!formControl\n\n let id = isWithinFormControl && !isWithinRadioGroup ? formControl.id : uuid\n id = idProp ?? id\n\n const isDisabled = isDisabledProp ?? formControl?.isDisabled\n const isReadOnly = isReadOnlyProp ?? formControl?.isReadOnly\n const isRequired = isRequiredProp ?? formControl?.isRequired\n const isInvalid = isInvalidProp ?? formControl?.isInvalid\n\n const [isFocused, setFocused] = useBoolean()\n const [isHovered, setHovering] = useBoolean()\n const [isActive, setActive] = useBoolean()\n\n const ref = useRef<HTMLInputElement>(null)\n\n const [isCheckedState, setChecked] = useState(Boolean(defaultChecked))\n\n const [isControlled, isChecked] = useControllableProp(\n isCheckedProp,\n isCheckedState,\n )\n\n warn({\n condition: !!defaultIsChecked,\n message:\n 'The \"defaultIsChecked\" prop has been deprecated and will be removed in a future version. ' +\n 'Please use the \"defaultChecked\" prop instead, which mirrors default React checkbox behavior.',\n })\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (isReadOnly || isDisabled) {\n event.preventDefault()\n return\n }\n\n if (!isControlled) {\n setChecked(event.target.checked)\n }\n\n onChange?.(event)\n },\n [isControlled, isDisabled, isReadOnly, onChange],\n )\n\n const onKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === \" \") {\n setActive.on()\n }\n },\n [setActive],\n )\n\n const onKeyUp = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === \" \") {\n setActive.off()\n }\n },\n [setActive],\n )\n\n const getCheckboxProps: PropGetter = useCallback(\n (props = {}, ref = null) => ({\n ...props,\n ref,\n \"data-active\": dataAttr(isActive),\n \"data-hover\": dataAttr(isHovered),\n \"data-disabled\": dataAttr(isDisabled),\n \"data-invalid\": dataAttr(isInvalid),\n \"data-checked\": dataAttr(isChecked),\n \"data-focus\": dataAttr(isFocused),\n \"data-readonly\": dataAttr(isReadOnly),\n \"aria-hidden\": true,\n onMouseDown: callAllHandlers(props.onMouseDown, setActive.on),\n onMouseUp: callAllHandlers(props.onMouseUp, setActive.off),\n onMouseEnter: callAllHandlers(props.onMouseEnter, setHovering.on),\n onMouseLeave: callAllHandlers(props.onMouseLeave, setHovering.off),\n }),\n [\n isActive,\n isHovered,\n isDisabled,\n isInvalid,\n isChecked,\n isFocused,\n isReadOnly,\n setActive.on,\n setActive.off,\n setHovering.on,\n setHovering.off,\n ],\n )\n\n const { onFocus, onBlur } = formControl ?? {}\n\n const getInputProps: PropGetter<HTMLInputElement> = useCallback(\n (props = {}, forwardedRef = null) => {\n const trulyDisabled = isDisabled && !isFocusable\n\n return {\n ...props,\n id,\n ref: mergeRefs(forwardedRef, ref),\n type: \"radio\",\n name,\n value,\n onChange: callAllHandlers(props.onChange, handleChange),\n onBlur: callAllHandlers(onBlur, props.onBlur, setFocused.off),\n onFocus: callAllHandlers(onFocus, props.onFocus, setFocused.on),\n onKeyDown: callAllHandlers(props.onKeyDown, onKeyDown),\n onKeyUp: callAllHandlers(props.onKeyUp, onKeyUp),\n checked: isChecked,\n disabled: trulyDisabled,\n readOnly: isReadOnly,\n required: isRequired,\n \"aria-invalid\": ariaAttr(isInvalid),\n \"aria-disabled\": ariaAttr(trulyDisabled),\n \"aria-readonly\": ariaAttr(isReadOnly),\n \"aria-required\": ariaAttr(isRequired),\n style: visuallyHiddenStyle,\n }\n },\n [\n isDisabled,\n isFocusable,\n id,\n name,\n value,\n handleChange,\n onBlur,\n setFocused,\n onFocus,\n onKeyDown,\n onKeyUp,\n isChecked,\n isReadOnly,\n isRequired,\n isInvalid,\n ],\n )\n\n const getLabelProps: PropGetter = (props = {}, ref = null) => ({\n ...props,\n ref,\n onMouseDown: callAllHandlers(props.onMouseDown, stop),\n onTouchStart: callAllHandlers(props.onTouchStart, stop),\n \"data-disabled\": dataAttr(isDisabled),\n \"data-checked\": dataAttr(isChecked),\n \"data-invalid\": dataAttr(isInvalid),\n })\n\n const getRootProps: PropGetter = (pros, ref = null) => ({\n ...props,\n ref,\n \"data-disabled\": dataAttr(isDisabled),\n \"data-checked\": dataAttr(isChecked),\n \"data-invalid\": dataAttr(isInvalid),\n })\n\n return {\n state: {\n isInvalid,\n isFocused,\n isChecked,\n isActive,\n isHovered,\n isDisabled,\n isReadOnly,\n isRequired,\n },\n getCheckboxProps,\n getInputProps,\n getLabelProps,\n getRootProps,\n htmlProps,\n }\n}\n\n/**\n * Prevent `onBlur` being fired when the checkbox label is touched\n */\nfunction stop(event: SyntheticEvent) {\n event.preventDefault()\n event.stopPropagation()\n}\n\nexport type UseRadioReturn = ReturnType<typeof useRadio>\n","import {\n chakra,\n forwardRef,\n layoutPropNames,\n omitThemingProps,\n SystemProps,\n SystemStyleObject,\n ThemingProps,\n useMultiStyleConfig,\n HTMLChakraProps,\n} from \"@chakra-ui/system\"\nimport { callAll, split, __DEV__ } from \"@chakra-ui/utils\"\nimport * as React from \"react\"\nimport { useRadioGroupContext } from \"./radio-group\"\nimport { useRadio, UseRadioProps } from \"./use-radio\"\n\ntype Omitted = \"onChange\" | \"defaultChecked\" | \"checked\"\ninterface BaseControlProps extends Omit<HTMLChakraProps<\"div\">, Omitted> {}\n\nexport interface RadioProps\n extends UseRadioProps,\n ThemingProps<\"Radio\">,\n BaseControlProps {\n /**\n * The spacing between the checkbox and its label text\n * @default 0.5rem\n * @type SystemProps[\"marginLeft\"]\n */\n spacing?: SystemProps[\"marginLeft\"]\n /**\n * If `true`, the radio will occupy the full width of its parent container\n *\n * @deprecated\n * This component defaults to 100% width,\n * please use the props `maxWidth` or `width` to configure\n */\n isFullWidth?: boolean\n}\n\n/**\n * Radio component is used in forms when a user needs to select a single value from\n * several options.\n *\n * @see Docs https://chakra-ui.com/radio\n */\nexport const Radio = forwardRef<RadioProps, \"input\">((props, ref) => {\n const group = useRadioGroupContext()\n const { onChange: onChangeProp, value: valueProp } = props\n\n const styles = useMultiStyleConfig(\"Radio\", { ...group, ...props })\n\n const ownProps = omitThemingProps(props)\n\n const {\n spacing = \"0.5rem\",\n children,\n isFullWidth,\n isDisabled = group?.isDisabled,\n isFocusable = group?.isFocusable,\n ...rest\n } = ownProps\n\n let isChecked = props.isChecked\n if (group?.value != null && valueProp != null) {\n isChecked = group.value === valueProp\n }\n\n let onChange = onChangeProp\n if (group?.onChange && valueProp != null) {\n onChange = callAll(group.onChange, onChangeProp)\n }\n\n const name = props?.name ?? group?.name\n\n const {\n getInputProps,\n getCheckboxProps,\n getLabelProps,\n getRootProps,\n htmlProps,\n } = useRadio({\n ...rest,\n isChecked,\n isFocusable,\n isDisabled,\n onChange,\n name,\n })\n\n const [layoutProps, otherProps] = split(htmlProps, layoutPropNames as any)\n\n const checkboxProps = getCheckboxProps(otherProps)\n const inputProps = getInputProps({}, ref)\n const labelProps = getLabelProps()\n const rootProps = Object.assign(layoutProps, getRootProps())\n\n const rootStyles = {\n width: isFullWidth ? \"full\" : undefined,\n display: \"inline-flex\",\n alignItems: \"center\",\n verticalAlign: \"top\",\n ...styles.container,\n }\n\n const checkboxStyles = {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flexShrink: 0,\n ...styles.control,\n }\n\n const labelStyles: SystemStyleObject = {\n userSelect: \"none\",\n marginStart: spacing,\n ...styles.label,\n }\n\n return (\n <chakra.label className=\"chakra-radio\" {...rootProps} __css={rootStyles}>\n <input className=\"chakra-radio__input\" {...inputProps} />\n <chakra.span\n className=\"chakra-radio__control\"\n {...checkboxProps}\n __css={checkboxStyles}\n />\n {children && (\n <chakra.span\n className=\"chakra-radio__label\"\n {...labelProps}\n __css={labelStyles}\n >\n {children}\n </chakra.span>\n )}\n </chakra.label>\n )\n})\n\nif (__DEV__) {\n Radio.displayName = \"Radio\"\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/index.ts","../../../src/use-radio-group.ts","../../../src/radio-group.tsx","../../../src/link-box.tsx","../node_modules/date-fns/esm/compareAsc/index.js","../node_modules/date-fns/esm/_lib/cloneObject/index.js","../node_modules/date-fns/esm/_lib/assign/index.js","../node_modules/date-fns/esm/formatDistanceStrict/index.js","../node_modules/date-fns/esm/formatDistanceToNowStrict/index.js","../../../src/popover-context.ts","../../../src/popover-transition.tsx","../../../src/pointer-event.ts","../../../src/use-focus-on-pointerdown.ts","../../../src/user-agent.ts","../../../src/use-pointer-event.ts","../../../src/use-focus-on-show.ts","../../../src/use-popover.ts","../../../src/popover.tsx","../../../src/use-radio.ts","../../../src/radio.tsx"],"names":["useRadioGroup","props","onChange","value","name","isNative","React","defaultValue","useControllableProp","valueProp","ref","focus","rootNode","query","firstEnabledAndCheckedInput","firstEnabledInput","fallbackName","useId","undefined","nameProp","eventOrValue","nextValue","isInputEvent","setValue","onChangeProp","String","getRootProps","forwardedRef","mergeRefs","role","getRadioProps","checkedKey","isDisabled","isFocusable","htmlProps","createContext","strict","RadioGroup","forwardRef","group","size","colorScheme","variant","groupProps","_className","cx","className","LinkOverlay","rel","isExternal","target","__css","position","content","cursor","display","top","left","zIndex","width","height","LinkBox","compareAsc","dirtyDateLeft","dirtyDateRight","requiredArgs","arguments","dateLeft","toDate","dateRight","diff","getTime","cloneObject","dirtyObject","TypeError","property","Object","prototype","hasOwnProperty","call","assign","MILLISECONDS_IN_MINUTE","MINUTES_IN_DAY","MINUTES_IN_MONTH","MINUTES_IN_YEAR","formatDistanceStrict","dirtyDate","dirtyBaseDate","options","length","locale","defaultLocale","formatDistance","RangeError","comparison","isNaN","localizeOptions","addSuffix","Boolean","roundingMethodFn","roundingMethod","Math","floor","ceil","round","unit","milliseconds","minutes","timezoneOffset","getTimezoneOffsetInMilliseconds","dstNormalizedMinutes","seconds","roundedMinutes","hours","days","months","years","formatDistanceToNowStrict","dirtyOptions","Date","now","errorMessage","mergeVariants","variants","mergeWith","enter","visibility","exit","transitionEnd","Section","motion","chakra","PopoverTransition","isOpen","usePopoverContext","initial","animate","opacity","scale","transition","duration","ease","isTouchEvent","event","defaultPagePoint","pageX","pageY","pointFromTouch","e","pointType","point","x","y","pointFromMouse","extractEventInfo","wrapPointerEventHandler","shouldFilterPrimaryPointer","eventHandler","listener","handler","isMouseEvent","getEventWindow","mouseEventNames","pointerdown","pointermove","pointerup","pointercancel","pointerover","pointerout","pointerenter","pointerleave","touchEventNames","getPointerEventName","isBrowser","window","useFocusOnPointerDown","browser","enabled","isSafari","navigator","userAgent","vendor","android","test","ua","getUserAgentBrowser","getOwnerDocument","isValidTarget","elements","elementOrRef","el","isRefObject","contains","isActiveElement","useEventListener","eventName","defaultOptions","preventScroll","shouldFocus","TRIGGER","usePopover","closeOnBlur","closeOnEsc","returnFocusOnClose","autoFocus","trigger","openDelay","closeDelay","lazyBehavior","computePositionOnMount","useDisclosure","onToggle","triggerRef","useRef","popoverRef","isHoveringRef","hasBeenOpened","useState","useIds","usePopper","forceUpdate","useFocusOnHide","focusRef","visible","element","onFocus","useCallback","document","nextTick","tabbableEls","getAllFocusable","useUpdateEffect","useFocusOnShow","shouldRenderChildren","determineLazyBehavior","hasBeenSelected","isLazy","isSelected","getPopoverProps","_ref","popoverProps","style","transformOrigin","popperCSSVars","arrowSize","px","arrowShadowColor","children","id","tabIndex","onKeyDown","callAllHandlers","onClose","onBlur","relatedTarget","getRelatedTarget","targetIsPopover","targetIsTrigger","hasHeader","headerId","hasBody","bodyId","setTimeout","getPopoverPositionerProps","getPopperProps","openTimeout","closeTimeout","getTriggerProps","triggerProps","popoverId","clearTimeout","useEffect","getHeaderProps","node","setHasHeader","getBodyProps","setHasBody","getArrowProps","getArrowInnerProps","Popover","styles","useMultiStyleConfig","omitThemingProps","context","direction","useTheme","runIfFn","PopoverTrigger","child","PopoverContent","rootProps","useStyles","contentStyles","flexDirection","contentProps","PopoverHeader","header","PopoverBody","body","PopoverArrow","backgroundColor","arrowBg","bg","useRadio","defaultChecked","isChecked","isReadOnly","isRequired","isInvalid","dataRadioGroup","uuid","formControl","useFormControlContext","useRadioGroupContext","isWithinFormControl","idProp","isDisabledProp","isReadOnlyProp","isRequiredProp","isInvalidProp","useBoolean","warn","condition","message","handleChange","setChecked","isControlled","setActive","onKeyUp","getCheckboxProps","dataAttr","onMouseDown","onMouseUp","onMouseEnter","setHovering","onMouseLeave","getInputProps","trulyDisabled","type","setFocused","checked","disabled","readOnly","required","ariaAttr","visuallyHiddenStyle","state","isFocused","isActive","isHovered","getLabelProps","onTouchStart","pros","stop","Radio","ownProps","spacing","callAll","split","checkboxProps","inputProps","labelProps","rootStyles","isFullWidth","alignItems","verticalAlign","checkboxStyles","justifyContent","flexShrink","labelStyles","userSelect","marginStart"],"mappings":"oIAAA,sX,qaCyDO,SAASA,EAAcC,QAAgC,IAAhCA,MAA4B,IACxD,QAAM,EAAN,EACEC,SADI,EAAN,EAEEC,MAFI,EAAN,EAAM,eAAN,EAIEC,KAJI,EAAN,EAAM,aAAN,EAAM,YAOJC,EAPF,EAOEA,SAPF,E,oIAAA,qFAWA,EAA+BC,WAC7BC,GADF,uBAAM,EAAN,KAAM,EAAN,KAGA,EAA8BC,YAAoBC,EAAlD,sBAAM,EAAN,KAAM,EAAN,KAEMC,EAAMJ,SAAZ,MAEMK,EAAQ,eAAkB,WAC9B,IAAMC,EAAWF,EAAjB,QACA,MAEA,IAAIG,EAAJ,+BAEMC,EAA8BF,gBAApC,GAIA,KACEE,cADF,CAKAD,yBAEA,IAAME,EAAoBH,gBAA1B,GACAG,uBAlBF,IAwBMC,EAAeC,iBAAMC,EAA3B,SACMd,EAAOe,GAAb,EAEMjB,EAAW,eACdkB,YACC,IAAMC,EAAYC,eACdF,SADcE,MAAlB,EAIA,GACEC,KAGFC,WAAeC,OAAfD,MAEF,CAACA,EAZH,IAeME,EAA2B,eAC/B,8BAACzB,MAAD,aAAa0B,MAAb,cAEEjB,IAAKkB,YAAUD,EAFjB,GAGEE,KAAM,iBAJV,IASMC,EAAiC,eACrC,cAA4B,eAA3B7B,MAAQ,SAAmB,IAAfS,MAAM,MACjB,IAAMqB,EAAa1B,EAAW,UAA9B,YACA,kBAEEK,MACAN,QAHF,cAIE,EAAcD,QAAgBF,UAAhBE,OAJhB,6CAME,mBAAmB,GANrB,MASF,CAACE,EAAUD,EAAMF,EAZnB,IAeA,MAAO,CACLwB,eACAI,gBACA1B,OACAM,MACAC,QACAY,WACApB,QACAD,WACA8B,aACAC,cACAC,a,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IAC3D,2BAAO5T,UAAU,uBADnB,IAEE,gBAAC,IAAD,QACEA,UAAU,yBADZ,GAGEK,MAAO2T,KAERvH,GACC,gBAAC,IAAD,QACEzM,UAAU,uBADZ,GAGEK,MAAO8T,IAZf,OAqBE,EAAJ,IACEf","file":"static/js/10.5f66f973.chunk.js","sourcesContent":["export * from \"@chakra-ui/color-mode\"\nexport * from \"@chakra-ui/styled-system\"\nexport { keyframes } from \"@emotion/react\"\nexport type { Interpolation } from \"@emotion/react\"\nexport * from \"./hooks\"\nexport * from \"./system.types\"\nexport * from \"./providers\"\nexport { omitThemingProps } from \"./system.utils\"\nexport * from \"./system\"\nexport * from \"./forward-ref\"\nexport * from \"./use-style-config\"\nexport { shouldForwardProp } from \"./should-forward-prop\"\n","import { useControllableProp, useId } from \"@chakra-ui/hooks\"\nimport { StringOrNumber, isInputEvent } from \"@chakra-ui/utils\"\nimport * as React from \"react\"\nimport { mergeRefs, PropGetter } from \"@chakra-ui/react-utils\"\n\ntype EventOrValue = React.ChangeEvent<HTMLInputElement> | StringOrNumber\n\nexport interface UseRadioGroupProps {\n /**\n * The value of the radio to be `checked`\n * (in controlled mode)\n */\n value?: StringOrNumber\n /**\n * The value of the radio to be `checked`\n * initially (in uncontrolled mode)\n */\n defaultValue?: StringOrNumber\n /**\n * Function called once a radio is checked\n * @param nextValue the value of the checked radio\n */\n onChange?(nextValue: string): void\n /**\n * If `true`, all wrapped radio inputs will be disabled\n */\n isDisabled?: boolean\n\n /**\n * If `true` and `isDisabled` is true, all wrapped radio inputs will remain\n * focusable but not interactive.\n */\n isFocusable?: boolean\n /**\n * The `name` attribute forwarded to each `radio` element\n */\n name?: string\n /**\n * If `true`, input elements will receive\n * `checked` attribute instead of `isChecked`.\n *\n * This assumes, you're using native radio inputs\n */\n isNative?: boolean\n}\n\ntype RadioPropGetter = PropGetter<\n HTMLInputElement,\n { onChange?: (e: EventOrValue) => void; value?: StringOrNumber } & Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n \"onChange\" | \"size\" | \"value\"\n >\n>\n\n/**\n * React hook to manage a group of radio inputs\n */\nexport function useRadioGroup(props: UseRadioGroupProps = {}) {\n const {\n onChange: onChangeProp,\n value: valueProp,\n defaultValue,\n name: nameProp,\n isDisabled,\n isFocusable,\n isNative,\n ...htmlProps\n } = props\n\n const [valueState, setValue] = React.useState<StringOrNumber>(\n defaultValue || \"\",\n )\n const [isControlled, value] = useControllableProp(valueProp, valueState)\n\n const ref = React.useRef<any>(null)\n\n const focus = React.useCallback(() => {\n const rootNode = ref.current\n if (!rootNode) return\n\n let query = `input:not(:disabled):checked`\n\n const firstEnabledAndCheckedInput = rootNode.querySelector(\n query,\n ) as HTMLElement\n\n if (firstEnabledAndCheckedInput) {\n firstEnabledAndCheckedInput.focus()\n return\n }\n\n query = `input:not(:disabled)`\n\n const firstEnabledInput = rootNode.querySelector(query) as HTMLElement\n firstEnabledInput?.focus()\n }, [])\n\n /**\n * All radio options must use the same name\n */\n const fallbackName = useId(undefined, `radio`)\n const name = nameProp || fallbackName\n\n const onChange = React.useCallback(\n (eventOrValue: EventOrValue) => {\n const nextValue = isInputEvent(eventOrValue)\n ? eventOrValue.target.value\n : eventOrValue\n\n if (!isControlled) {\n setValue(nextValue)\n }\n\n onChangeProp?.(String(nextValue))\n },\n [onChangeProp, isControlled],\n )\n\n const getRootProps: PropGetter = React.useCallback(\n (props = {}, forwardedRef = null) => ({\n ...props,\n ref: mergeRefs(forwardedRef, ref),\n role: \"radiogroup\",\n }),\n [],\n )\n\n const getRadioProps: RadioPropGetter = React.useCallback(\n (props = {}, ref = null) => {\n const checkedKey = isNative ? \"checked\" : \"isChecked\"\n return {\n ...props,\n ref,\n name,\n [checkedKey]: value != null ? props.value === value : undefined,\n onChange,\n \"data-radiogroup\": true,\n }\n },\n [isNative, name, onChange, value],\n )\n\n return {\n getRootProps,\n getRadioProps,\n name,\n ref,\n focus,\n setValue,\n value,\n onChange,\n isDisabled,\n isFocusable,\n htmlProps,\n }\n}\n\nexport type UseRadioGroupReturn = ReturnType<typeof useRadioGroup>\n","import {\n chakra,\n forwardRef,\n ThemingProps,\n HTMLChakraProps,\n} from \"@chakra-ui/system\"\nimport { cx, __DEV__ } from \"@chakra-ui/utils\"\nimport { createContext } from \"@chakra-ui/react-utils\"\nimport * as React from \"react\"\nimport {\n useRadioGroup,\n UseRadioGroupProps,\n UseRadioGroupReturn,\n} from \"./use-radio-group\"\n\nexport interface RadioGroupContext\n extends Pick<\n UseRadioGroupReturn,\n \"onChange\" | \"value\" | \"name\" | \"isDisabled\" | \"isFocusable\"\n >,\n Omit<ThemingProps<\"Radio\">, \"orientation\"> {}\n\nconst [\n RadioGroupProvider,\n useRadioGroupContext,\n] = createContext<RadioGroupContext>({\n name: \"RadioGroupContext\",\n strict: false,\n})\n\nexport { useRadioGroupContext }\n\ntype Omitted =\n | \"onChange\"\n | \"value\"\n | \"defaultValue\"\n | \"defaultChecked\"\n | \"children\"\nexport interface RadioGroupProps\n extends UseRadioGroupProps,\n Omit<HTMLChakraProps<\"div\">, Omitted>,\n Omit<ThemingProps<\"Radio\">, \"orientation\"> {\n children: React.ReactNode\n}\n\n/**\n * Used for multiple radios which are bound in one group,\n * and it indicates which option is selected.\n *\n * @see Docs https://chakra-ui.com/radio\n */\nexport const RadioGroup = forwardRef<RadioGroupProps, \"div\">((props, ref) => {\n const {\n colorScheme,\n size,\n variant,\n children,\n className,\n isDisabled,\n isFocusable,\n ...rest\n } = props\n\n const { value, onChange, getRootProps, name, htmlProps } = useRadioGroup(rest)\n\n const group = React.useMemo(\n () => ({\n name,\n size,\n onChange,\n colorScheme,\n value,\n variant,\n isDisabled,\n isFocusable,\n }),\n [\n name,\n size,\n onChange,\n colorScheme,\n value,\n variant,\n isDisabled,\n isFocusable,\n ],\n )\n\n const groupProps = getRootProps(htmlProps, ref)\n const _className = cx(\"chakra-radio-group\", className)\n\n return (\n <RadioGroupProvider value={group}>\n <chakra.div {...groupProps} className={_className}>\n {children}\n </chakra.div>\n </RadioGroupProvider>\n )\n})\n\nif (__DEV__) {\n RadioGroup.displayName = \"RadioGroup\"\n}\n","import { chakra, forwardRef, HTMLChakraProps } from \"@chakra-ui/system\"\nimport { cx } from \"@chakra-ui/utils\"\nimport * as React from \"react\"\n\nexport interface LinkOverlayProps extends HTMLChakraProps<\"a\"> {\n /**\n * If `true`, the link will open in new tab\n */\n isExternal?: boolean\n}\n\nexport const LinkOverlay = forwardRef<LinkOverlayProps, \"a\">((props, ref) => {\n const { isExternal, target, rel, className, ...rest } = props\n return (\n <chakra.a\n {...rest}\n ref={ref}\n className={cx(\"chakra-linkbox__overlay\", className)}\n rel={isExternal ? \"noopener noreferrer\" : rel}\n target={isExternal ? \"_blank\" : target}\n __css={{\n position: \"static\",\n \"&::before\": {\n content: \"''\",\n cursor: \"inherit\",\n display: \"block\",\n position: \"absolute\",\n top: 0,\n left: 0,\n zIndex: 0,\n width: \"100%\",\n height: \"100%\",\n },\n }}\n />\n )\n})\n\nexport interface LinkBoxProps extends HTMLChakraProps<\"div\"> {}\n\n/**\n * `LinkBox` is used to wrap content areas within a link while ensuring semantic html\n *\n * @see Docs https://chakra-ui.com/docs/navigation/link-overlay\n * @see Resources https://www.sarasoueidan.com/blog/nested-links\n */\nexport const LinkBox = forwardRef<LinkBoxProps, \"div\">((props, ref) => {\n const { className, ...rest } = props\n\n return (\n <chakra.div\n ref={ref}\n position=\"relative\"\n {...rest}\n className={cx(\"chakra-linkbox\", className)}\n __css={{\n /* Elevate the links and abbreviations up */\n \"a[href]:not(.chakra-linkbox__overlay), abbr[title]\": {\n position: \"relative\",\n zIndex: 1,\n },\n }}\n />\n )\n})\n","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Number} the result of the comparison\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\n\nexport default function compareAsc(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var diff = dateLeft.getTime() - dateRight.getTime();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1; // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}","import assign from \"../assign/index.js\";\nexport default function cloneObject(dirtyObject) {\n return assign({}, dirtyObject);\n}","export default function assign(target, dirtyObject) {\n if (target == null) {\n throw new TypeError('assign requires that input parameter not be null or undefined');\n }\n\n dirtyObject = dirtyObject || {};\n\n for (var property in dirtyObject) {\n if (Object.prototype.hasOwnProperty.call(dirtyObject, property)) {\n target[property] = dirtyObject[property];\n }\n }\n\n return target;\n}","import getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport compareAsc from \"../compareAsc/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport cloneObject from \"../_lib/cloneObject/index.js\";\nimport defaultLocale from \"../locale/en-US/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_MINUTE = 1000 * 60;\nvar MINUTES_IN_DAY = 60 * 24;\nvar MINUTES_IN_MONTH = MINUTES_IN_DAY * 30;\nvar MINUTES_IN_YEAR = MINUTES_IN_DAY * 365;\n/**\n * @name formatDistanceStrict\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words, using strict units.\n * This is like `formatDistance`, but does not use helpers like 'almost', 'over',\n * 'less than' and the like.\n *\n * | Distance between dates | Result |\n * |------------------------|---------------------|\n * | 0 ... 59 secs | [0..59] seconds |\n * | 1 ... 59 mins | [1..59] minutes |\n * | 1 ... 23 hrs | [1..23] hours |\n * | 1 ... 29 days | [1..29] days |\n * | 1 ... 11 months | [1..11] months |\n * | 1 ... N years | [1..N] years |\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The function was renamed from `distanceInWordsStrict` to `formatDistanceStrict`\n * to make its name consistent with `format` and `formatRelative`.\n *\n * - The order of arguments is swapped to make the function\n * consistent with `differenceIn...` functions.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWordsStrict(\n * new Date(2015, 0, 2),\n * new Date(2014, 6, 2)\n * ) //=> '6 months'\n *\n * // v2.0.0 onward\n *\n * formatDistanceStrict(\n * new Date(2014, 6, 2),\n * new Date(2015, 0, 2)\n * ) //=> '6 months'\n * ```\n *\n * - `partialMethod` option is renamed to `roundingMethod`.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWordsStrict(\n * new Date(1986, 3, 4, 10, 32, 0),\n * new Date(1986, 3, 4, 10, 33, 1),\n * { partialMethod: 'ceil' }\n * ) //=> '2 minutes'\n *\n * // v2.0.0 onward\n *\n * formatDistanceStrict(\n * new Date(1986, 3, 4, 10, 33, 1),\n * new Date(1986, 3, 4, 10, 32, 0),\n * { roundingMethod: 'ceil' }\n * ) //=> '2 minutes'\n * ```\n *\n * - If `roundingMethod` is not specified, it now defaults to `round` instead of `floor`.\n *\n * - `unit` option now accepts one of the strings:\n * 'second', 'minute', 'hour', 'day', 'month' or 'year' instead of 's', 'm', 'h', 'd', 'M' or 'Y'\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWordsStrict(\n * new Date(1986, 3, 4, 10, 32, 0),\n * new Date(1986, 3, 4, 10, 33, 1),\n * { unit: 'm' }\n * )\n *\n * // v2.0.0 onward\n *\n * formatDistanceStrict(\n * new Date(1986, 3, 4, 10, 33, 1),\n * new Date(1986, 3, 4, 10, 32, 0),\n * { unit: 'minute' }\n * )\n * ```\n *\n * @param {Date|Number} date - the date\n * @param {Date|Number} baseDate - the date to compare with\n * @param {Object} [options] - an object with options.\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {'second'|'minute'|'hour'|'day'|'month'|'year'} [options.unit] - if specified, will force a unit\n * @param {'floor'|'ceil'|'round'} [options.roundingMethod='round'] - which way to round partial units\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `baseDate` must not be Invalid Date\n * @throws {RangeError} `options.roundingMethod` must be 'floor', 'ceil' or 'round'\n * @throws {RangeError} `options.unit` must be 'second', 'minute', 'hour', 'day', 'month' or 'year'\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistanceStrict(new Date(2014, 6, 2), new Date(2015, 0, 2))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00?\n * const result = formatDistanceStrict(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0)\n * )\n * //=> '15 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistanceStrict(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> '1 year ago'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, in minutes?\n * const result = formatDistanceStrict(new Date(2016, 0, 1), new Date(2015, 0, 1), {\n * unit: 'minute'\n * })\n * //=> '525600 minutes'\n *\n * @example\n * // What is the distance from 1 January 2015\n * // to 28 January 2015, in months, rounded up?\n * const result = formatDistanceStrict(new Date(2015, 0, 28), new Date(2015, 0, 1), {\n * unit: 'month',\n * roundingMethod: 'ceil'\n * })\n * //=> '1 month'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistanceStrict(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> '1 jaro'\n */\n\nexport default function formatDistanceStrict(dirtyDate, dirtyBaseDate) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n requiredArgs(2, arguments);\n var locale = options.locale || defaultLocale;\n\n if (!locale.formatDistance) {\n throw new RangeError('locale must contain localize.formatDistance property');\n }\n\n var comparison = compareAsc(dirtyDate, dirtyBaseDate);\n\n if (isNaN(comparison)) {\n throw new RangeError('Invalid time value');\n }\n\n var localizeOptions = cloneObject(options);\n localizeOptions.addSuffix = Boolean(options.addSuffix);\n localizeOptions.comparison = comparison;\n var dateLeft;\n var dateRight;\n\n if (comparison > 0) {\n dateLeft = toDate(dirtyBaseDate);\n dateRight = toDate(dirtyDate);\n } else {\n dateLeft = toDate(dirtyDate);\n dateRight = toDate(dirtyBaseDate);\n }\n\n var roundingMethod = options.roundingMethod == null ? 'round' : String(options.roundingMethod);\n var roundingMethodFn;\n\n if (roundingMethod === 'floor') {\n roundingMethodFn = Math.floor;\n } else if (roundingMethod === 'ceil') {\n roundingMethodFn = Math.ceil;\n } else if (roundingMethod === 'round') {\n roundingMethodFn = Math.round;\n } else {\n throw new RangeError(\"roundingMethod must be 'floor', 'ceil' or 'round'\");\n }\n\n var milliseconds = dateRight.getTime() - dateLeft.getTime();\n var minutes = milliseconds / MILLISECONDS_IN_MINUTE;\n var timezoneOffset = getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft); // Use DST-normalized difference in minutes for years, months and days;\n // use regular difference in minutes for hours, minutes and seconds.\n\n var dstNormalizedMinutes = (milliseconds - timezoneOffset) / MILLISECONDS_IN_MINUTE;\n var unit;\n\n if (options.unit == null) {\n if (minutes < 1) {\n unit = 'second';\n } else if (minutes < 60) {\n unit = 'minute';\n } else if (minutes < MINUTES_IN_DAY) {\n unit = 'hour';\n } else if (dstNormalizedMinutes < MINUTES_IN_MONTH) {\n unit = 'day';\n } else if (dstNormalizedMinutes < MINUTES_IN_YEAR) {\n unit = 'month';\n } else {\n unit = 'year';\n }\n } else {\n unit = String(options.unit);\n } // 0 up to 60 seconds\n\n\n if (unit === 'second') {\n var seconds = roundingMethodFn(milliseconds / 1000);\n return locale.formatDistance('xSeconds', seconds, localizeOptions); // 1 up to 60 mins\n } else if (unit === 'minute') {\n var roundedMinutes = roundingMethodFn(minutes);\n return locale.formatDistance('xMinutes', roundedMinutes, localizeOptions); // 1 up to 24 hours\n } else if (unit === 'hour') {\n var hours = roundingMethodFn(minutes / 60);\n return locale.formatDistance('xHours', hours, localizeOptions); // 1 up to 30 days\n } else if (unit === 'day') {\n var days = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_DAY);\n return locale.formatDistance('xDays', days, localizeOptions); // 1 up to 12 months\n } else if (unit === 'month') {\n var months = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_MONTH);\n return months === 12 && options.unit !== 'month' ? locale.formatDistance('xYears', 1, localizeOptions) : locale.formatDistance('xMonths', months, localizeOptions); // 1 year up to max Date\n } else if (unit === 'year') {\n var years = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_YEAR);\n return locale.formatDistance('xYears', years, localizeOptions);\n }\n\n throw new RangeError(\"unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'\");\n}","import formatDistanceStrict from \"../formatDistanceStrict/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name formatDistanceToNowStrict\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n * @pure false\n *\n * @description\n * Return the distance between the given dates in words, using strict units.\n * This is like `formatDistance`, but does not use helpers like 'almost', 'over',\n * 'less than' and the like.\n *\n * | Distance between dates | Result |\n * |------------------------|---------------------|\n * | 0 ... 59 secs | [0..59] seconds |\n * | 1 ... 59 mins | [1..59] minutes |\n * | 1 ... 23 hrs | [1..23] hours |\n * | 1 ... 29 days | [1..29] days |\n * | 1 ... 11 months | [1..11] months |\n * | 1 ... N years | [1..N] years |\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - an object with options.\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {'second'|'minute'|'hour'|'day'|'month'|'year'} [options.unit] - if specified, will force a unit\n * @param {'floor'|'ceil'|'round'} [options.roundingMethod='round'] - which way to round partial units\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * var result = formatDistanceToNowStrict(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * var result = formatDistanceToNowStrict(\n * new Date(2015, 0, 1, 0, 0, 15)\n * )\n * //=> '20 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * var result = formatDistanceToNowStrict(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in 1 year'\n *\n * @example\n * // If today is 28 January 2015,\n * // what is the distance to 1 January 2015, in months, rounded up??\n * var result = formatDistanceToNowStrict(new Date(2015, 0, 1), {\n * unit: 'month',\n * roundingMethod: 'ceil'\n * })\n * //=> '1 month'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 August 2016 in Esperanto?\n * var eoLocale = require('date-fns/locale/eo')\n * var result = formatDistanceToNowStrict(\n * new Date(2016, 7, 1),\n * {locale: eoLocale}\n * )\n * //=> '1 jaro'\n */\n\nexport default function formatDistanceToNowStrict(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n return formatDistanceStrict(dirtyDate, Date.now(), dirtyOptions);\n}","import { createContext } from \"@chakra-ui/react-utils\"\nimport { UsePopoverReturn } from \"./use-popover\"\n\nexport const [\n PopoverProvider,\n usePopoverContext,\n] = createContext<UsePopoverReturn>({\n name: \"PopoverContext\",\n errorMessage:\n \"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`\",\n})\n","import { chakra, HTMLChakraProps } from \"@chakra-ui/system\"\nimport { HTMLMotionProps, motion, Variant } from \"framer-motion\"\nimport { mergeWith } from \"@chakra-ui/utils\"\nimport React from \"react\"\nimport { usePopoverContext } from \"./popover-context\"\n\n// TODO: consider moving this to some util\ntype HTMLMotionChakraProps<T extends keyof React.ReactHTML> = Omit<\n HTMLChakraProps<T>,\n keyof HTMLMotionProps<T>\n> &\n Omit<\n HTMLMotionProps<T>,\n | \"style\"\n | \"onDrag\"\n | \"onDragEnd\"\n | \"onDragStart\"\n | \"onAnimationStart\"\n | \"variants\"\n > & {\n variants?: MotionVariants\n }\n\ntype MotionVariants = Partial<Record<\"enter\" | \"exit\", Variant>>\n\nconst mergeVariants = (variants?: MotionVariants) => {\n if (!variants) return\n return mergeWith(variants, {\n enter: {\n visibility: \"visible\",\n },\n exit: {\n transitionEnd: {\n visibility: \"hidden\",\n },\n },\n })\n}\n\nconst scaleFade: MotionVariants = {\n exit: {\n opacity: 0,\n scale: 0.95,\n transition: {\n duration: 0.1,\n ease: [0.4, 0, 1, 1],\n },\n },\n enter: {\n scale: 1,\n opacity: 1,\n transition: {\n duration: 0.15,\n ease: [0, 0, 0.2, 1],\n },\n },\n}\n\nconst Section = motion(chakra.section)\n\nexport interface PopoverTransitionProps\n extends HTMLMotionChakraProps<\"section\"> {}\n\nexport const PopoverTransition = React.forwardRef(\n (props: HTMLMotionChakraProps<\"section\">, ref: React.Ref<any>) => {\n const { isOpen } = usePopoverContext()\n return (\n <Section\n ref={ref}\n variants={mergeVariants(props.variants)}\n {...props}\n initial={false}\n animate={isOpen ? \"enter\" : \"exit\"}\n />\n )\n },\n)\n\nPopoverTransition.defaultProps = {\n variants: scaleFade,\n}\n","/**\n * Credit goes to `framer-motion` of this useful utilities.\n * License can be found here: https://github.com/framer/motion\n */\n\nimport { addDomEvent, getEventWindow, isBrowser } from \"./dom\"\n\nexport type AnyPointerEvent = MouseEvent | TouchEvent | PointerEvent\n\ntype PointType = \"page\" | \"client\"\n\nexport function isMouseEvent(event: AnyPointerEvent): event is MouseEvent {\n const win = getEventWindow(event)\n\n // PointerEvent inherits from MouseEvent so we can't use a straight instanceof check.\n if (\n typeof win.PointerEvent !== \"undefined\" &&\n event instanceof win.PointerEvent\n ) {\n return !!(event.pointerType === \"mouse\")\n }\n\n return event instanceof win.MouseEvent\n}\n\nexport function isTouchEvent(event: AnyPointerEvent): event is TouchEvent {\n const hasTouches = !!(event as TouchEvent).touches\n return hasTouches\n}\n\nexport interface Point {\n x: number\n y: number\n}\n\nexport interface PointerEventInfo {\n point: Point\n}\n\nexport type EventHandler = (\n event: AnyPointerEvent,\n info: PointerEventInfo,\n) => void\n\n/**\n * Filters out events not attached to the primary pointer (currently left mouse button)\n * @param eventHandler\n */\nfunction filterPrimaryPointer(eventHandler: EventListener): EventListener {\n return (event: Event) => {\n const win = getEventWindow(event)\n const isMouseEvent = event instanceof win.MouseEvent\n const isPrimaryPointer =\n !isMouseEvent || (isMouseEvent && (event as MouseEvent).button === 0)\n if (isPrimaryPointer) {\n eventHandler(event)\n }\n }\n}\n\nexport type EventListenerWithPointInfo = (\n e: AnyPointerEvent,\n info: PointerEventInfo,\n) => void\n\nconst defaultPagePoint = { pageX: 0, pageY: 0 }\n\nfunction pointFromTouch(e: TouchEvent, pointType: PointType = \"page\") {\n const primaryTouch = e.touches[0] || e.changedTouches[0]\n const point = primaryTouch || defaultPagePoint\n\n return {\n x: point[`${pointType}X`],\n y: point[`${pointType}Y`],\n }\n}\n\nfunction pointFromMouse(\n point: MouseEvent | PointerEvent,\n pointType: PointType = \"page\",\n) {\n return {\n x: point[`${pointType}X`],\n y: point[`${pointType}Y`],\n }\n}\n\nexport function extractEventInfo(\n event: AnyPointerEvent,\n pointType: PointType = \"page\",\n): PointerEventInfo {\n return {\n point: isTouchEvent(event)\n ? pointFromTouch(event, pointType)\n : pointFromMouse(event, pointType),\n }\n}\n\nexport function getViewportPointFromEvent(event: AnyPointerEvent) {\n return extractEventInfo(event, \"client\")\n}\n\nexport const wrapPointerEventHandler = (\n handler: EventListenerWithPointInfo,\n shouldFilterPrimaryPointer = false,\n): EventListener => {\n const listener: EventListener = (event: any) =>\n handler(event, extractEventInfo(event))\n\n return shouldFilterPrimaryPointer ? filterPrimaryPointer(listener) : listener\n}\n\n// We check for event support via functions in case they've been mocked by a testing suite.\nconst supportsPointerEvents = () => isBrowser && window.onpointerdown === null\nconst supportsTouchEvents = () => isBrowser && window.ontouchstart === null\nconst supportsMouseEvents = () => isBrowser && window.onmousedown === null\n\ninterface PointerNameMap {\n pointerdown: string\n pointermove: string\n pointerup: string\n pointercancel: string\n pointerover?: string\n pointerout?: string\n pointerenter?: string\n pointerleave?: string\n}\n\nconst mouseEventNames: PointerNameMap = {\n pointerdown: \"mousedown\",\n pointermove: \"mousemove\",\n pointerup: \"mouseup\",\n pointercancel: \"mousecancel\",\n pointerover: \"mouseover\",\n pointerout: \"mouseout\",\n pointerenter: \"mouseenter\",\n pointerleave: \"mouseleave\",\n}\n\nconst touchEventNames: PointerNameMap = {\n pointerdown: \"touchstart\",\n pointermove: \"touchmove\",\n pointerup: \"touchend\",\n pointercancel: \"touchcancel\",\n}\n\nexport function getPointerEventName(name: string): string {\n if (supportsPointerEvents()) {\n return name\n }\n if (supportsTouchEvents()) {\n return touchEventNames[name]\n }\n if (supportsMouseEvents()) {\n return mouseEventNames[name]\n }\n\n return name\n}\n\nexport function addPointerEvent(\n target: EventTarget,\n eventName: string,\n handler: EventListenerWithPointInfo,\n options?: AddEventListenerOptions,\n) {\n return addDomEvent(\n target,\n getPointerEventName(eventName),\n wrapPointerEventHandler(handler, eventName === \"pointerdown\"),\n options,\n )\n}\n\nexport function isMultiTouchEvent(event: AnyPointerEvent) {\n return isTouchEvent(event) && event.touches.length > 1\n}\n","import {\n contains,\n detectBrowser,\n focus,\n getOwnerDocument,\n isActiveElement,\n isRefObject,\n} from \"@chakra-ui/utils\"\nimport { RefObject } from \"react\"\nimport { usePointerEvent } from \"./use-pointer-event\"\n\nexport interface UseFocusOnMouseDownProps {\n enabled?: boolean\n ref: RefObject<HTMLElement>\n elements?: Array<RefObject<HTMLElement> | HTMLElement | null>\n}\n\n/**\n * Polyfill to get `relatedTarget` working correctly consistently\n * across all browsers.\n *\n * It ensures that elements receives focus on pointer down if\n * it's not the active active element.\n *\n * @internal\n */\nexport function useFocusOnPointerDown(props: UseFocusOnMouseDownProps) {\n const { ref, elements, enabled } = props\n\n const isSafari = detectBrowser(\"Safari\")\n const doc = () => getOwnerDocument(ref.current)\n\n usePointerEvent(doc, \"pointerdown\", (event) => {\n if (!isSafari || !enabled) return\n const target = event.target as HTMLElement\n\n const els = elements ?? [ref]\n const isValidTarget = els.some((elementOrRef) => {\n const el = isRefObject(elementOrRef) ? elementOrRef.current : elementOrRef\n return contains(el, target)\n })\n\n if (!isActiveElement(target) && isValidTarget) {\n event.preventDefault()\n focus(target)\n }\n })\n}\n","import { isBrowser } from \"./dom\"\n\nfunction getUserAgentBrowser(navigator: Navigator) {\n const { userAgent: ua, vendor } = navigator\n const android = /(android)/i.test(ua)\n\n switch (true) {\n case /CriOS/.test(ua):\n return \"Chrome for iOS\"\n case /Edg\\//.test(ua):\n return \"Edge\"\n case android && /Silk\\//.test(ua):\n return \"Silk\"\n case /Chrome/.test(ua) && /Google Inc/.test(vendor):\n return \"Chrome\"\n case /Firefox\\/\\d+\\.\\d+$/.test(ua):\n return \"Firefox\"\n case android:\n return \"AOSP\"\n case /MSIE|Trident/.test(ua):\n return \"IE\"\n case /Safari/.test(navigator.userAgent) && /Apple Computer/.test(ua):\n return \"Safari\"\n case /AppleWebKit/.test(ua):\n return \"WebKit\"\n default:\n return null\n }\n}\n\nexport type UserAgentBrowser = NonNullable<\n ReturnType<typeof getUserAgentBrowser>\n>\n\nfunction getUserAgentOS(navigator: Navigator) {\n const { userAgent: ua, platform } = navigator\n switch (true) {\n case /Android/.test(ua):\n return \"Android\"\n case /iPhone|iPad|iPod/.test(platform):\n return \"iOS\"\n case /Win/.test(platform):\n return \"Windows\"\n case /Mac/.test(platform):\n return \"Mac\"\n case /CrOS/.test(ua):\n return \"Chrome OS\"\n case /Firefox/.test(ua):\n return \"Firefox OS\"\n default:\n return null\n }\n}\n\nexport type UserAgentOS = NonNullable<ReturnType<typeof getUserAgentOS>>\n\nexport function detectDeviceType(navigator: Navigator) {\n const { userAgent: ua } = navigator\n if (/(tablet)|(iPad)|(Nexus 9)/i.test(ua)) return \"tablet\"\n if (/(mobi)/i.test(ua)) return \"phone\"\n return \"desktop\"\n}\n\nexport type UserAgentDeviceType = NonNullable<\n ReturnType<typeof detectDeviceType>\n>\n\nexport function detectOS(os: UserAgentOS) {\n if (!isBrowser) return false\n return getUserAgentOS(window.navigator) === os\n}\n\nexport function detectBrowser(browser: UserAgentBrowser) {\n if (!isBrowser) return false\n return getUserAgentBrowser(window.navigator) === browser\n}\n\nexport function detectTouch() {\n if (!isBrowser) return false\n return (\n window.ontouchstart === null &&\n window.ontouchmove === null &&\n window.ontouchend === null\n )\n}\n","/**\n * Credit goes to `framer-motion` of this useful utilities.\n * License can be found here: https://github.com/framer/motion\n */\n\nimport {\n EventListenerWithPointInfo,\n getPointerEventName,\n wrapPointerEventHandler,\n} from \"@chakra-ui/utils\"\nimport { EventListenerEnv, useEventListener } from \"./use-event-listener\"\n\n/**\n * @internal\n */\nexport function usePointerEvent(\n env: EventListenerEnv,\n eventName: string,\n handler: EventListenerWithPointInfo,\n options?: AddEventListenerOptions,\n) {\n return useEventListener(\n getPointerEventName(eventName),\n wrapPointerEventHandler(handler, eventName === \"pointerdown\"),\n env,\n options,\n )\n}\n","import {\n contains,\n focus,\n FocusableElement,\n getAllFocusable,\n isRefObject,\n} from \"@chakra-ui/utils\"\nimport React, { useCallback } from \"react\"\nimport { useEventListener } from \"./use-event-listener\"\nimport { useUpdateEffect } from \"./use-update-effect\"\n\nexport interface UseFocusOnShowOptions {\n visible?: boolean\n shouldFocus?: boolean\n preventScroll?: boolean\n focusRef?: React.RefObject<FocusableElement>\n}\n\nconst defaultOptions: UseFocusOnShowOptions = {\n preventScroll: true,\n shouldFocus: false,\n}\n\nexport function useFocusOnShow<T extends HTMLElement>(\n target: React.RefObject<T> | T,\n options = defaultOptions,\n) {\n const { focusRef, preventScroll, shouldFocus, visible } = options\n const element = isRefObject(target) ? target.current : target\n\n const autoFocus = shouldFocus && visible\n\n const onFocus = useCallback(() => {\n if (!element || !autoFocus) return\n\n if (contains(element, document.activeElement as HTMLElement)) return\n\n if (focusRef?.current) {\n focus(focusRef.current, { preventScroll, nextTick: true })\n } else {\n const tabbableEls = getAllFocusable(element)\n if (tabbableEls.length > 0) {\n focus(tabbableEls[0], { preventScroll, nextTick: true })\n }\n }\n }, [autoFocus, preventScroll, element, focusRef])\n\n useUpdateEffect(() => {\n onFocus()\n }, [onFocus])\n\n useEventListener(\"transitionend\", onFocus, element)\n}\n","import {\n useDisclosure,\n useFocusOnHide,\n useFocusOnPointerDown,\n useFocusOnShow,\n useIds,\n} from \"@chakra-ui/hooks\"\nimport { popperCSSVars, usePopper, UsePopperProps } from \"@chakra-ui/popper\"\nimport { HTMLProps, mergeRefs, PropGetter } from \"@chakra-ui/react-utils\"\nimport {\n callAllHandlers,\n contains,\n determineLazyBehavior,\n FocusableElement,\n getRelatedTarget,\n LazyBehavior,\n px,\n} from \"@chakra-ui/utils\"\nimport { RefObject, useCallback, useEffect, useRef, useState } from \"react\"\n\nconst TRIGGER = {\n click: \"click\",\n hover: \"hover\",\n} as const\n\nexport interface UsePopoverProps extends UsePopperProps {\n /**\n * The html `id` attribute of the popover.\n * If not provided, we generate a unique id.\n *\n * This `id` is also used to auto-generate the `aria-labelledby`\n * and `aria-decribedby` attributes that points to the `PopoverHeader` and `PopoverBody`\n */\n id?: string\n /**\n * If `true`, the popover will be opened in controlled mode.\n */\n isOpen?: boolean\n /**\n * If `true`, the popover will be initially opened.\n */\n defaultIsOpen?: boolean\n /**\n * The `ref` of the element that should receive focus when the popover opens.\n */\n initialFocusRef?: RefObject<FocusableElement>\n /**\n * If `true`, focus will be returned to the element that triggers the popover\n * when it closes\n */\n returnFocusOnClose?: boolean\n /**\n * If `true`, focus will be transferred to the first interactive element\n * when the popover opens\n */\n autoFocus?: boolean\n /**\n * If `true`, the popover will close when you blur out it by\n * clicking outside or tabbing out\n */\n closeOnBlur?: boolean\n /**\n * If `true`, the popover will close when you hit the `Esc` key\n */\n closeOnEsc?: boolean\n /**\n * Callback fired when the popover opens\n */\n onOpen?: () => void\n /**\n * Callback fired when the popover closes\n */\n onClose?: () => void\n /**\n * The size of the popover arrow\n */\n arrowSize?: number\n /**\n * The `box-shadow` of the popover arrow\n */\n arrowShadowColor?: string\n /**\n * The interaction that triggers the popover.\n *\n * `hover` - means the popover will open when you hover with mouse or\n * focus with keyboard on the popover trigger\n *\n * `click` - means the popover will open on click or\n * press `Enter` to `Space` on keyboard\n */\n trigger?: keyof typeof TRIGGER\n openDelay?: number\n closeDelay?: number\n /**\n * Performance 🚀:\n * If `true`, the PopoverContent rendering will be deferred\n * until the popover is open.\n */\n isLazy?: boolean\n /**\n * Performance 🚀:\n * The lazy behavior of popover's content when not visible.\n * Only works when `isLazy={true}`\n *\n * - \"unmount\": The popover's content is always unmounted when not open.\n * - \"keepMounted\": The popover's content initially unmounted,\n * but stays mounted when popover is open.\n *\n * @default \"unmount\"\n */\n lazyBehavior?: LazyBehavior\n /**\n * If `true`, the popover will be positioned when it mounts\n * (even if it's not open)\n *\n * Note 🚨: We don't recommend using this in a popover/menu intensive UI or page\n * as it might affect scrolling performance.\n */\n computePositionOnMount?: boolean\n}\n\n/**\n * @internal\n */\nexport function usePopover(props: UsePopoverProps = {}) {\n const {\n closeOnBlur = true,\n closeOnEsc = true,\n initialFocusRef,\n id,\n returnFocusOnClose = true,\n autoFocus = true,\n arrowSize,\n arrowShadowColor,\n trigger = TRIGGER.click,\n openDelay = 200,\n closeDelay = 200,\n isLazy,\n lazyBehavior = \"unmount\",\n computePositionOnMount,\n ...popperProps\n } = props\n\n const { isOpen, onClose, onOpen, onToggle } = useDisclosure(props)\n\n const triggerRef = useRef<HTMLElement>(null)\n const popoverRef = useRef<HTMLElement>(null)\n\n const isHoveringRef = useRef(false)\n\n const hasBeenOpened = useRef(false)\n if (isOpen) {\n hasBeenOpened.current = true\n }\n\n const [hasHeader, setHasHeader] = useState(false)\n const [hasBody, setHasBody] = useState(false)\n\n const [triggerId, popoverId, headerId, bodyId] = useIds(\n id,\n \"popover-trigger\",\n \"popover-content\",\n \"popover-header\",\n \"popover-body\",\n )\n\n const {\n referenceRef,\n getArrowProps,\n getPopperProps,\n getArrowInnerProps,\n forceUpdate,\n } = usePopper({\n ...popperProps,\n enabled: isOpen || !!computePositionOnMount,\n })\n\n useFocusOnPointerDown({\n enabled: isOpen,\n ref: triggerRef,\n })\n\n useFocusOnHide(popoverRef, {\n focusRef: triggerRef,\n visible: isOpen,\n shouldFocus: returnFocusOnClose && trigger === TRIGGER.click,\n })\n\n useFocusOnShow(popoverRef, {\n focusRef: initialFocusRef,\n visible: isOpen,\n shouldFocus: autoFocus && trigger === TRIGGER.click,\n })\n\n const shouldRenderChildren = determineLazyBehavior({\n hasBeenSelected: hasBeenOpened.current,\n isLazy,\n lazyBehavior,\n isSelected: isOpen,\n })\n\n const getPopoverProps: PropGetter = useCallback(\n (props = {}, _ref = null) => {\n const popoverProps: HTMLProps = {\n ...props,\n style: {\n ...props.style,\n transformOrigin: popperCSSVars.transformOrigin.varRef,\n [popperCSSVars.arrowSize.var]: arrowSize ? px(arrowSize) : undefined,\n [popperCSSVars.arrowShadowColor.var]: arrowShadowColor,\n },\n ref: mergeRefs(popoverRef, _ref),\n children: shouldRenderChildren ? props.children : null,\n id: popoverId,\n tabIndex: -1,\n role: \"dialog\",\n onKeyDown: callAllHandlers(props.onKeyDown, (event) => {\n if (closeOnEsc && event.key === \"Escape\") {\n onClose()\n }\n }),\n onBlur: callAllHandlers(props.onBlur, (event) => {\n const relatedTarget = getRelatedTarget(event)\n const targetIsPopover = contains(popoverRef.current, relatedTarget)\n const targetIsTrigger = contains(triggerRef.current, relatedTarget)\n const isValidBlur = !targetIsPopover && !targetIsTrigger\n\n if (isOpen && closeOnBlur && isValidBlur) {\n onClose()\n }\n }),\n \"aria-labelledby\": hasHeader ? headerId : undefined,\n \"aria-describedby\": hasBody ? bodyId : undefined,\n }\n\n if (trigger === TRIGGER.hover) {\n popoverProps.role = \"tooltip\"\n popoverProps.onMouseEnter = callAllHandlers(props.onMouseEnter, () => {\n isHoveringRef.current = true\n })\n popoverProps.onMouseLeave = callAllHandlers(props.onMouseLeave, () => {\n isHoveringRef.current = false\n setTimeout(onClose, closeDelay)\n })\n }\n\n return popoverProps\n },\n [\n shouldRenderChildren,\n popoverId,\n hasHeader,\n headerId,\n hasBody,\n bodyId,\n trigger,\n closeOnEsc,\n onClose,\n isOpen,\n closeOnBlur,\n closeDelay,\n arrowShadowColor,\n arrowSize,\n ],\n )\n\n const getPopoverPositionerProps: PropGetter = useCallback(\n (props = {}, forwardedRef = null) =>\n getPopperProps(\n {\n ...props,\n style: {\n visibility: isOpen ? \"visible\" : \"hidden\",\n ...props.style,\n },\n },\n forwardedRef,\n ),\n [isOpen, getPopperProps],\n )\n\n const openTimeout = useRef<number>()\n const closeTimeout = useRef<number>()\n\n const getTriggerProps: PropGetter = useCallback(\n (props = {}, _ref = null) => {\n const triggerProps: HTMLProps = {\n ...props,\n ref: mergeRefs(triggerRef, _ref, referenceRef),\n id: triggerId,\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": isOpen,\n \"aria-controls\": popoverId,\n }\n\n if (trigger === TRIGGER.click) {\n triggerProps.onClick = callAllHandlers(props.onClick, onToggle)\n }\n\n if (trigger === TRIGGER.hover) {\n /**\n * Any content that shows on pointer hover should also show on keyboard focus.\n * Consider focus and blur to be the `hover` for keyboard users.\n *\n * @see https://www.w3.org/WAI/WCAG21/Understanding/content-on-hover-or-focus.html\n */\n triggerProps.onFocus = callAllHandlers(props.onFocus, onOpen)\n triggerProps.onBlur = callAllHandlers(props.onBlur, onClose)\n\n /**\n * Any content that shows on hover or focus must be dismissible.\n * This case pressing `Escape` will dismiss the popover\n */\n triggerProps.onKeyDown = callAllHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Escape\") {\n onClose()\n }\n })\n\n triggerProps.onMouseEnter = callAllHandlers(props.onMouseEnter, () => {\n isHoveringRef.current = true\n openTimeout.current = window.setTimeout(onOpen, openDelay)\n })\n\n triggerProps.onMouseLeave = callAllHandlers(props.onMouseLeave, () => {\n isHoveringRef.current = false\n\n if (openTimeout.current) {\n clearTimeout(openTimeout.current)\n openTimeout.current = undefined\n }\n\n closeTimeout.current = window.setTimeout(() => {\n if (isHoveringRef.current === false) {\n onClose()\n }\n }, closeDelay)\n })\n }\n\n return triggerProps\n },\n [\n triggerId,\n isOpen,\n popoverId,\n trigger,\n referenceRef,\n onToggle,\n onOpen,\n onClose,\n openDelay,\n closeDelay,\n ],\n )\n\n useEffect(() => {\n return () => {\n if (openTimeout.current) {\n clearTimeout(openTimeout.current)\n }\n if (closeTimeout.current) {\n clearTimeout(closeTimeout.current)\n }\n }\n }, [])\n\n const getHeaderProps: PropGetter = useCallback(\n (props = {}, ref = null) => ({\n ...props,\n id: headerId,\n ref: mergeRefs(ref, (node: HTMLElement | null) => {\n setHasHeader(!!node)\n }),\n }),\n [headerId],\n )\n\n const getBodyProps: PropGetter = useCallback(\n (props = {}, ref = null) => ({\n ...props,\n id: bodyId,\n ref: mergeRefs(ref, (node) => {\n setHasBody(!!node)\n }),\n }),\n [bodyId],\n )\n\n return {\n forceUpdate,\n isOpen,\n onClose,\n getArrowProps,\n getArrowInnerProps,\n getPopoverPositionerProps,\n getPopoverProps,\n getTriggerProps,\n getHeaderProps,\n getBodyProps,\n }\n}\n\nexport type UsePopoverReturn = ReturnType<typeof usePopover>\n","import { CloseButton, CloseButtonProps } from \"@chakra-ui/close-button\"\nimport { MaybeRenderProp } from \"@chakra-ui/react-utils\"\nimport {\n chakra,\n forwardRef,\n HTMLChakraProps,\n omitThemingProps,\n StylesProvider,\n SystemStyleObject,\n ThemingProps,\n useMultiStyleConfig,\n useStyles,\n useTheme,\n} from \"@chakra-ui/system\"\nimport { cx, runIfFn, __DEV__ } from \"@chakra-ui/utils\"\nimport * as React from \"react\"\nimport { PopoverProvider, usePopoverContext } from \"./popover-context\"\nimport { PopoverTransition, PopoverTransitionProps } from \"./popover-transition\"\nimport { usePopover, UsePopoverProps } from \"./use-popover\"\n\nexport { usePopoverContext }\n\nexport interface PopoverProps extends UsePopoverProps, ThemingProps<\"Popover\"> {\n /**\n * The content of the popover. It is usually the `PopoverTrigger`,\n * and `PopoverContent`\n */\n children?: MaybeRenderProp<{\n isOpen: boolean\n onClose: () => void\n forceUpdate: (() => void) | undefined\n }>\n}\n\n/**\n * Popover is used to bring attention to specific user interface elements,\n * typically to suggest an action or to guide users through a new experience.\n */\nexport const Popover: React.FC<PopoverProps> = (props) => {\n const styles = useMultiStyleConfig(\"Popover\", props)\n\n const { children, ...rest } = omitThemingProps(props)\n const theme = useTheme()\n const context = usePopover({ ...rest, direction: theme.direction })\n\n return (\n <PopoverProvider value={context}>\n <StylesProvider value={styles}>\n {runIfFn(children, {\n isOpen: context.isOpen,\n onClose: context.onClose,\n forceUpdate: context.forceUpdate,\n })}\n </StylesProvider>\n </PopoverProvider>\n )\n}\n\nif (__DEV__) {\n Popover.displayName = \"Popover\"\n}\n\n/**\n * PopoverTrigger opens the popover's content. It must be an interactive element\n * such as `button` or `a`.\n */\nexport const PopoverTrigger: React.FC = (props) => {\n // enforce a single child\n const child: any = React.Children.only(props.children)\n const { getTriggerProps } = usePopoverContext()\n return React.cloneElement(child, getTriggerProps(child.props, child.ref))\n}\n\nif (__DEV__) {\n PopoverTrigger.displayName = \"PopoverTrigger\"\n}\n\nexport interface PopoverContentProps extends PopoverTransitionProps {\n rootProps?: HTMLChakraProps<\"div\">\n}\n\nexport const PopoverContent = forwardRef<PopoverContentProps, \"section\">(\n (props, ref) => {\n const { rootProps, ...contentProps } = props\n\n const { getPopoverProps, getPopoverPositionerProps } = usePopoverContext()\n\n const styles = useStyles()\n const contentStyles: SystemStyleObject = {\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n ...styles.content,\n }\n\n return (\n <chakra.div\n {...getPopoverPositionerProps(rootProps)}\n __css={styles.popper}\n className=\"chakra-popover__popper\"\n >\n <PopoverTransition\n {...getPopoverProps(contentProps, ref)}\n className={cx(\"chakra-popover__content\", props.className)}\n __css={contentStyles}\n />\n </chakra.div>\n )\n },\n)\n\nif (__DEV__) {\n PopoverContent.displayName = \"PopoverContent\"\n}\n\nexport interface PopoverHeaderProps extends HTMLChakraProps<\"header\"> {}\n\n/**\n * PopoverHeader is the accessible header or label\n * for the popover's content and it is first announced by screenreaders.\n */\nexport const PopoverHeader = forwardRef<PopoverHeaderProps, \"header\">(\n (props, ref) => {\n const { getHeaderProps } = usePopoverContext()\n\n const styles = useStyles()\n\n return (\n <chakra.header\n {...getHeaderProps(props, ref)}\n className={cx(\"chakra-popover__header\", props.className)}\n __css={styles.header}\n />\n )\n },\n)\n\nif (__DEV__) {\n PopoverHeader.displayName = \"PopoverHeader\"\n}\n\nexport interface PopoverBodyProps extends HTMLChakraProps<\"div\"> {}\n\n/**\n * PopoverBody is the main content area for the popover. Should contain\n * at least one interactive element.\n */\nexport const PopoverBody = forwardRef<PopoverBodyProps, \"div\">((props, ref) => {\n const { getBodyProps } = usePopoverContext()\n\n const styles = useStyles()\n\n return (\n <chakra.div\n {...getBodyProps(props, ref)}\n className={cx(\"chakra-popover__body\", props.className)}\n __css={styles.body}\n />\n )\n})\n\nif (__DEV__) {\n PopoverBody.displayName = \"PopoverBody\"\n}\nexport interface PopoverFooterProps extends HTMLChakraProps<\"footer\"> {}\n\nexport const PopoverFooter: React.FC<PopoverFooterProps> = (props) => {\n const styles = useStyles()\n return (\n <chakra.footer\n {...props}\n className={cx(\"chakra-popover__footer\", props.className)}\n __css={styles.footer}\n />\n )\n}\n\nif (__DEV__) {\n PopoverFooter.displayName = \"PopoverFooter\"\n}\n\nexport type PopoverCloseButtonProps = CloseButtonProps\n\nexport const PopoverCloseButton: React.FC<CloseButtonProps> = (props) => {\n const { onClose } = usePopoverContext()\n return (\n <CloseButton\n size=\"sm\"\n onClick={onClose}\n position=\"absolute\"\n borderRadius=\"md\"\n top=\"0.25rem\"\n insetEnd=\"0.5rem\"\n padding=\"0.5rem\"\n {...props}\n />\n )\n}\n\nif (__DEV__) {\n PopoverCloseButton.displayName = \"PopoverCloseButton\"\n}\n\nexport interface PopoverArrowProps extends HTMLChakraProps<\"div\"> {}\n\nexport const PopoverArrow: React.FC<PopoverArrowProps> = (props) => {\n const { bg, bgColor, backgroundColor } = props\n const { getArrowProps, getArrowInnerProps } = usePopoverContext()\n const styles = useStyles()\n const arrowBg = bg ?? bgColor ?? backgroundColor\n return (\n <chakra.div\n {...getArrowProps()}\n className=\"chakra-popover__arrow-positioner\"\n >\n <chakra.div\n className={cx(\"chakra-popover__arrow\", props.className)}\n {...getArrowInnerProps(props)}\n __css={{\n ...styles.arrow,\n \"--popper-arrow-bg\": arrowBg\n ? `colors.${arrowBg}, ${arrowBg}`\n : undefined,\n }}\n />\n </chakra.div>\n )\n}\n\nif (__DEV__) {\n PopoverArrow.displayName = \"PopoverArrow\"\n}\n","import { useFormControlContext } from \"@chakra-ui/form-control\"\nimport { useBoolean, useControllableProp, useId } from \"@chakra-ui/hooks\"\nimport { mergeRefs, PropGetter } from \"@chakra-ui/react-utils\"\nimport { ariaAttr, callAllHandlers, dataAttr, warn } from \"@chakra-ui/utils\"\nimport { visuallyHiddenStyle } from \"@chakra-ui/visually-hidden\"\nimport {\n ChangeEvent,\n SyntheticEvent,\n useCallback,\n useRef,\n useState,\n} from \"react\"\nimport { useRadioGroupContext } from \"./radio-group\"\n\n/**\n * @todo use the `useClickable` hook here\n * to manage the isFocusable & isDisabled props\n */\nexport interface UseRadioProps {\n /**\n * id assigned to input\n */\n id?: string\n /**\n * The name of the input field in a radio\n * (Useful for form submission).\n */\n name?: string\n /**\n * The value to be used in the radio button.\n * This is the value that will be returned on form submission.\n */\n value?: string | number\n /**\n * If `true`, the radio will be checked.\n * You'll need to pass `onChange` to update its value (since it is now controlled)\n */\n isChecked?: boolean\n /**\n * If `true`, the radio will be initially checked.\n *\n * @deprecated Please use `defaultChecked` which mirrors the default prop\n * name for radio elements.\n */\n defaultIsChecked?: boolean\n /**\n * If `true`, the radio will be initially checked.\n */\n defaultChecked?: boolean\n /**\n * If `true`, the radio will be disabled\n */\n isDisabled?: boolean\n /**\n * If `true` and `isDisabled` is true, the radio will remain\n * focusable but not interactive.\n */\n isFocusable?: boolean\n /**\n * If `true`, the radio will be read-only\n */\n isReadOnly?: boolean\n /**\n * If `true`, the radio button will be invalid. This also sets `aria-invalid` to `true`.\n */\n isInvalid?: boolean\n /**\n * If `true`, the radio button will be required. This also sets `aria-required` to `true`.\n */\n isRequired?: boolean\n /**\n * Function called when checked state of the `input` changes\n */\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void\n /**\n * @internal\n */\n \"data-radiogroup\"?: any\n}\n\nexport function useRadio(props: UseRadioProps = {}) {\n const {\n defaultIsChecked,\n defaultChecked = defaultIsChecked,\n isChecked: isCheckedProp,\n isFocusable,\n isDisabled: isDisabledProp,\n isReadOnly: isReadOnlyProp,\n isRequired: isRequiredProp,\n onChange,\n isInvalid: isInvalidProp,\n name,\n value,\n id: idProp,\n \"data-radiogroup\": dataRadioGroup,\n ...htmlProps\n } = props\n\n const uuid = useId(undefined, \"radio\")\n\n const formControl = useFormControlContext()\n const group = useRadioGroupContext()\n\n const isWithinRadioGroup = !!group || !!dataRadioGroup\n const isWithinFormControl = !!formControl\n\n let id = isWithinFormControl && !isWithinRadioGroup ? formControl.id : uuid\n id = idProp ?? id\n\n const isDisabled = isDisabledProp ?? formControl?.isDisabled\n const isReadOnly = isReadOnlyProp ?? formControl?.isReadOnly\n const isRequired = isRequiredProp ?? formControl?.isRequired\n const isInvalid = isInvalidProp ?? formControl?.isInvalid\n\n const [isFocused, setFocused] = useBoolean()\n const [isHovered, setHovering] = useBoolean()\n const [isActive, setActive] = useBoolean()\n\n const ref = useRef<HTMLInputElement>(null)\n\n const [isCheckedState, setChecked] = useState(Boolean(defaultChecked))\n\n const [isControlled, isChecked] = useControllableProp(\n isCheckedProp,\n isCheckedState,\n )\n\n warn({\n condition: !!defaultIsChecked,\n message:\n 'The \"defaultIsChecked\" prop has been deprecated and will be removed in a future version. ' +\n 'Please use the \"defaultChecked\" prop instead, which mirrors default React checkbox behavior.',\n })\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (isReadOnly || isDisabled) {\n event.preventDefault()\n return\n }\n\n if (!isControlled) {\n setChecked(event.target.checked)\n }\n\n onChange?.(event)\n },\n [isControlled, isDisabled, isReadOnly, onChange],\n )\n\n const onKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === \" \") {\n setActive.on()\n }\n },\n [setActive],\n )\n\n const onKeyUp = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === \" \") {\n setActive.off()\n }\n },\n [setActive],\n )\n\n const getCheckboxProps: PropGetter = useCallback(\n (props = {}, ref = null) => ({\n ...props,\n ref,\n \"data-active\": dataAttr(isActive),\n \"data-hover\": dataAttr(isHovered),\n \"data-disabled\": dataAttr(isDisabled),\n \"data-invalid\": dataAttr(isInvalid),\n \"data-checked\": dataAttr(isChecked),\n \"data-focus\": dataAttr(isFocused),\n \"data-readonly\": dataAttr(isReadOnly),\n \"aria-hidden\": true,\n onMouseDown: callAllHandlers(props.onMouseDown, setActive.on),\n onMouseUp: callAllHandlers(props.onMouseUp, setActive.off),\n onMouseEnter: callAllHandlers(props.onMouseEnter, setHovering.on),\n onMouseLeave: callAllHandlers(props.onMouseLeave, setHovering.off),\n }),\n [\n isActive,\n isHovered,\n isDisabled,\n isInvalid,\n isChecked,\n isFocused,\n isReadOnly,\n setActive.on,\n setActive.off,\n setHovering.on,\n setHovering.off,\n ],\n )\n\n const { onFocus, onBlur } = formControl ?? {}\n\n const getInputProps: PropGetter<HTMLInputElement> = useCallback(\n (props = {}, forwardedRef = null) => {\n const trulyDisabled = isDisabled && !isFocusable\n\n return {\n ...props,\n id,\n ref: mergeRefs(forwardedRef, ref),\n type: \"radio\",\n name,\n value,\n onChange: callAllHandlers(props.onChange, handleChange),\n onBlur: callAllHandlers(onBlur, props.onBlur, setFocused.off),\n onFocus: callAllHandlers(onFocus, props.onFocus, setFocused.on),\n onKeyDown: callAllHandlers(props.onKeyDown, onKeyDown),\n onKeyUp: callAllHandlers(props.onKeyUp, onKeyUp),\n checked: isChecked,\n disabled: trulyDisabled,\n readOnly: isReadOnly,\n required: isRequired,\n \"aria-invalid\": ariaAttr(isInvalid),\n \"aria-disabled\": ariaAttr(trulyDisabled),\n \"aria-readonly\": ariaAttr(isReadOnly),\n \"aria-required\": ariaAttr(isRequired),\n style: visuallyHiddenStyle,\n }\n },\n [\n isDisabled,\n isFocusable,\n id,\n name,\n value,\n handleChange,\n onBlur,\n setFocused,\n onFocus,\n onKeyDown,\n onKeyUp,\n isChecked,\n isReadOnly,\n isRequired,\n isInvalid,\n ],\n )\n\n const getLabelProps: PropGetter = (props = {}, ref = null) => ({\n ...props,\n ref,\n onMouseDown: callAllHandlers(props.onMouseDown, stop),\n onTouchStart: callAllHandlers(props.onTouchStart, stop),\n \"data-disabled\": dataAttr(isDisabled),\n \"data-checked\": dataAttr(isChecked),\n \"data-invalid\": dataAttr(isInvalid),\n })\n\n const getRootProps: PropGetter = (pros, ref = null) => ({\n ...props,\n ref,\n \"data-disabled\": dataAttr(isDisabled),\n \"data-checked\": dataAttr(isChecked),\n \"data-invalid\": dataAttr(isInvalid),\n })\n\n return {\n state: {\n isInvalid,\n isFocused,\n isChecked,\n isActive,\n isHovered,\n isDisabled,\n isReadOnly,\n isRequired,\n },\n getCheckboxProps,\n getInputProps,\n getLabelProps,\n getRootProps,\n htmlProps,\n }\n}\n\n/**\n * Prevent `onBlur` being fired when the checkbox label is touched\n */\nfunction stop(event: SyntheticEvent) {\n event.preventDefault()\n event.stopPropagation()\n}\n\nexport type UseRadioReturn = ReturnType<typeof useRadio>\n","import {\n chakra,\n forwardRef,\n layoutPropNames,\n omitThemingProps,\n SystemProps,\n SystemStyleObject,\n ThemingProps,\n useMultiStyleConfig,\n HTMLChakraProps,\n} from \"@chakra-ui/system\"\nimport { callAll, split, __DEV__ } from \"@chakra-ui/utils\"\nimport * as React from \"react\"\nimport { useRadioGroupContext } from \"./radio-group\"\nimport { useRadio, UseRadioProps } from \"./use-radio\"\n\ntype Omitted = \"onChange\" | \"defaultChecked\" | \"checked\"\ninterface BaseControlProps extends Omit<HTMLChakraProps<\"div\">, Omitted> {}\n\nexport interface RadioProps\n extends UseRadioProps,\n ThemingProps<\"Radio\">,\n BaseControlProps {\n /**\n * The spacing between the checkbox and its label text\n * @default 0.5rem\n * @type SystemProps[\"marginLeft\"]\n */\n spacing?: SystemProps[\"marginLeft\"]\n /**\n * If `true`, the radio will occupy the full width of its parent container\n *\n * @deprecated\n * This component defaults to 100% width,\n * please use the props `maxWidth` or `width` to configure\n */\n isFullWidth?: boolean\n}\n\n/**\n * Radio component is used in forms when a user needs to select a single value from\n * several options.\n *\n * @see Docs https://chakra-ui.com/radio\n */\nexport const Radio = forwardRef<RadioProps, \"input\">((props, ref) => {\n const group = useRadioGroupContext()\n const { onChange: onChangeProp, value: valueProp } = props\n\n const styles = useMultiStyleConfig(\"Radio\", { ...group, ...props })\n\n const ownProps = omitThemingProps(props)\n\n const {\n spacing = \"0.5rem\",\n children,\n isFullWidth,\n isDisabled = group?.isDisabled,\n isFocusable = group?.isFocusable,\n ...rest\n } = ownProps\n\n let isChecked = props.isChecked\n if (group?.value != null && valueProp != null) {\n isChecked = group.value === valueProp\n }\n\n let onChange = onChangeProp\n if (group?.onChange && valueProp != null) {\n onChange = callAll(group.onChange, onChangeProp)\n }\n\n const name = props?.name ?? group?.name\n\n const {\n getInputProps,\n getCheckboxProps,\n getLabelProps,\n getRootProps,\n htmlProps,\n } = useRadio({\n ...rest,\n isChecked,\n isFocusable,\n isDisabled,\n onChange,\n name,\n })\n\n const [layoutProps, otherProps] = split(htmlProps, layoutPropNames as any)\n\n const checkboxProps = getCheckboxProps(otherProps)\n const inputProps = getInputProps({}, ref)\n const labelProps = getLabelProps()\n const rootProps = Object.assign(layoutProps, getRootProps())\n\n const rootStyles = {\n width: isFullWidth ? \"full\" : undefined,\n display: \"inline-flex\",\n alignItems: \"center\",\n verticalAlign: \"top\",\n ...styles.container,\n }\n\n const checkboxStyles = {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flexShrink: 0,\n ...styles.control,\n }\n\n const labelStyles: SystemStyleObject = {\n userSelect: \"none\",\n marginStart: spacing,\n ...styles.label,\n }\n\n return (\n <chakra.label className=\"chakra-radio\" {...rootProps} __css={rootStyles}>\n <input className=\"chakra-radio__input\" {...inputProps} />\n <chakra.span\n className=\"chakra-radio__control\"\n {...checkboxProps}\n __css={checkboxStyles}\n />\n {children && (\n <chakra.span\n className=\"chakra-radio__label\"\n {...labelProps}\n __css={labelStyles}\n >\n {children}\n </chakra.span>\n )}\n </chakra.label>\n )\n})\n\nif (__DEV__) {\n Radio.displayName = \"Radio\"\n}\n"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ (this["webpackJsonpconstruct-hub-webapp"]=this["webpackJsonpconstruct-hub-webapp"]||[]).push([[11],{248:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var s=r(0),i=r(265),n={contribute:{event:{name:"Contribute Load"}},home:{event:{name:"Home Load"}},faq:{event:{name:"Frequently Asked Questions Load"}},packageProfile:{event:{name:"Package Profile Load"}},search:{event:{name:"Search Load"}},siteTerms:{event:{name:"Site Terms Load"}},notFound:{page:{pageType:"errorPage"},event:{name:"404 Page Load"}}},a=r(123),o=r(1),c=function(e){var t=e.children,r=e.meta,c=e.pageName,l=Object(a.b)(n[c]);Object(s.useEffect)((function(){l()}),[l]);var u=r.suffix,d=void 0===u||u,h=r.title,b=r.description,p=d?"".concat(h," - Construct Hub"):h;["default-src 'self' 'unsafe-inline' http://*.awsstatic.com;","connect-src 'self' https://*.shortbread.aws.dev http://*.shortbread.aws.dev http://a0.awsstatic.com/ http://amazonwebservices.d2.sc.omtrdc.net http://aws.demdex.net http://dpm.demdex.net http://cm.everesttech.net;","frame-src http://aws.demdex.net http://dpm.demdex.net;","img-src 'self' https://* http://a0.awsstatic.com/ http://amazonwebservices.d2.sc.omtrdc.net http://aws.demdex.net http://dpm.demdex.net http://cm.everesttech.net;","object-src 'none';","style-src 'self' 'unsafe-inline';"].join(" ");return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsxs)(i.a,{children:[!1,Object(o.jsx)("meta",{content:"width=device-width, initial-scale=1",name:"viewport"}),Object(o.jsx)("meta",{charSet:"utf-8"}),Object(o.jsx)("title",{children:p}),Object(o.jsx)("meta",{content:p,property:"og:title"}),Object(o.jsx)("meta",{content:p,name:"twitter:title"}),Object(o.jsx)("meta",{content:"summary",name:"twitter:card"}),Object(o.jsx)("meta",{content:b,name:"description"}),Object(o.jsx)("meta",{content:b,property:"og:description"}),Object(o.jsx)("meta",{content:b,name:"twitter:description"})]}),t]})}},337:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return u})),r.d(t,"d",(function(){return h})),r.d(t,"e",(function(){return b})),r.d(t,"f",(function(){return m}));var s=r(204),i=r(1),n=function(e){var t=e.children;return Object(i.jsxs)(s.a,{bg:"white",color:"blue.800",h:"100%",w:"100%",children:[t,Object(i.jsx)(s.a,{py:5,width:"100%"})]})},a=r(224),o=function(e){var t=e.children;return Object(i.jsx)(s.a,{bg:"gray.50",py:20,width:"100%",children:Object(i.jsx)(a.a,{as:"h1",mx:"auto",textAlign:"center",children:t})})},c=r(239),l=r(208),u=function(e){var t=e.question,r=e.children;return Object(i.jsxs)(c.d,{children:[Object(i.jsxs)(c.b,{children:[Object(i.jsx)(s.a,{flex:"1",py:2,textAlign:"left",children:Object(i.jsx)(a.a,{as:"h3",ml:8,size:"sm",children:t})}),Object(i.jsx)(c.c,{})]}),Object(i.jsx)(c.e,{px:12,py:4,children:Object(i.jsx)(l.a,{color:"blue.800",fontSize:"md",sx:{p:{marginTop:"0",marginBottom:"4"}},children:r})})]})},d=r(50),h=function(e){var t=e.href,r=e.children;return Object(i.jsx)(d.a,{color:"inherit",hasWarning:!1,href:t,textDecoration:"underline",children:r})},b=function(e){var t=e.heading,r=e.children;return Object(i.jsxs)(c.d,{children:[Object(i.jsxs)(c.b,{children:[Object(i.jsx)(s.a,{flex:"1",textAlign:"left",children:Object(i.jsx)(a.a,{as:"h2",ml:4,my:4,size:"lg",children:t})}),Object(i.jsx)(c.c,{})]}),Object(i.jsx)(c.e,{p:0,children:Object(i.jsx)(c.a,{allowMultiple:!0,w:"100%",children:r})})]})},p=r(6),j=r(24),y=["children"],m=function(e){var t=e.children,r=Object(j.a)(e,y);return Object(i.jsx)(c.a,Object(p.a)(Object(p.a)({allowMultiple:!0},r),{},{children:t}))}},654:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return u}));var s=r(239),i=r(208),n=r(223),a=r(337),o=r(248),c=r(58),l=r(1),u=function(){return Object(l.jsx)(o.a,{meta:{description:"Learn about contributing to Construct Hub.",title:"Contribute"},pageName:"contribute",children:Object(l.jsxs)(a.a,{children:[Object(l.jsx)(a.b,{children:"Contributing to Construct Hub"}),Object(l.jsxs)(s.a,{allowMultiple:!0,allowToggle:!0,defaultIndex:[0],children:[Object(l.jsxs)(a.c,{question:"How can I add my construct to Construct Hub?",children:[Object(l.jsxs)(i.a,{children:["Constructs intended for Construct Hub must be published to the"," ",Object(l.jsx)(a.d,{href:"https://www.npmjs.com/",children:"npm Registry"})," under Apache, BSD, EPL, MPL-2.0, ISC and CDDL or MIT open source licenses and annotated with a keyword recognized by Construct Hub (awscdk, cdk8s, or cdktf)."]}),Object(l.jsxs)(i.a,{children:["Additionally, since one of the main goals of Construct Hub is to enable an ecosystem of constructs that can be consumed by all CDK languages, your library ",Object(l.jsx)("strong",{children:"must"})," be compiled with"," ",Object(l.jsx)(a.d,{href:"https://aws.github.io/jsii/",children:"JSII"}),", a TypeScript-based tool for building multi-language libraries. Construct Hub leverages the type information produced by the JSII compiler to render a rich multi-language API reference for each construct."]}),Object(l.jsxs)(i.a,{children:["Construct Hub continuously monitors the npm Registry. Packages that meet the above requirements appear in Construct Hub in about 30 minutes. If your package does not appear in Construct Hub, but meets these requirements, please file an issue against our"," ",Object(l.jsx)(a.d,{href:"".concat(c.a,"/issues/new"),children:"GitHub repository."})]}),Object(l.jsxs)(i.a,{children:["The community has provided some great resources about publishing construct libraries that meet Construct Hub requirements. For example, see"," ",Object(l.jsxs)(a.d,{href:"https://dev.to/aws-builders/a-beginner-s-guide-to-create-aws-cdk-construct-library-with-projen-5eh4",children:["\u201cA Beginner's Guide to Create AWS CDK ConstructLibrary with"," ","projen\u201d"]})," ","by ",Object(l.jsx)(a.d,{href:"https://hayao-k.dev/",children:"hayao-k"}),"."]}),Object(l.jsxs)(i.a,{children:["If you already have a library written in TypeScript and want to migrate it to JSII so it can be included in Construct Hub, see the"," ",Object(l.jsx)(a.d,{href:"https://aws.github.io/jsii/user-guides/#library-author-guide",children:"JSII library author guide."})]})]}),Object(l.jsxs)(a.c,{question:"What are the best practices for improving discoverability of a construct library on Construct Hub?",children:[Object(l.jsx)(i.a,{children:"To improve your construct library\u2019s visibility on Construct Hub, follow these best practices:"}),Object(l.jsxs)(n.b,{sx:{li:{mt:4}},children:[Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"Helpful description."})," Publish your library with a description. Libraries without description have lower chances to be discovered by users. When you write your library\u2019s description, think: Why would someone use it? What makes it unique? Make the description as accurate and differentiated as possible."]}),Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"Helpful keywords."})," Publish your library with helpful keywords, ones that can help potential users to find your package. Helpful keywords can be technologies that are being used by the library, use cases the library is useful for, service names that are being used by the library etc. For example: \u2018Monitoring\u2019, \u2018Kubernetes\u2019, \u2018Cost Management\u2019, \u2018Websites\u2019, \u2018AI\u2019, \u2018Containers\u2019 and more."]}),Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"Helpful keywords."})," Publish your library with helpful keywords, ones that can help potential users to find your package. Helpful keywords can be technologies that are being used by the library, use cases the library is useful for, service names that are being used by the library etc. For example: \u2018Monitoring\u2019, \u2018Kubernetes\u2019, \u2018Cost Management\u2019, \u2018Websites\u2019, \u2018AI\u2019, \u2018Containers\u2019 and more."]}),Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"Helpful README."})," Review your library\u2019s README file. Is it developer-friendly? That is, can developers quickly understand the use case you\u2019re trying to solve? Does your README make it easy to get started with your library? Does it explain how your library is different from other libraries? Is it easy to understand at first glance the value developers gain from the library? For more information see *\u201cQ: What are the best practices for a developer-friendly README file?\u201d.*"]}),Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"API documentation."})," Document the library classes, methods, properties in the library\u2019s code. Construct Hub will display this information when it automatically generates the API documentation."]}),Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"Maintain your library."})," Developers prefer libraries that are updated on a regular basis. Our experience shows that successful libraries are those where publishers engage and collaborate with the user community, respond to issues and pull requests, fix bugs, and add capabilities. To gain more developers trust, maintain the releases section on your code repository and make sure to describe the changes between different releases. You may consider to link the libraries you\u2019ve published with your code repository."]}),Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"AWS Partner Network (APN) badge."})," If you\u2019re an AWS partner and you are publishing a library for your offering, please reach out to us and we will be happy to add a badge to your libraries with your company\u2019s name."]}),Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"Enable support for multiple programming languages."})," ","Make your library usable by a broader set of users and increase its value to the ecosystem. Starting with your library written in TypeScript, JSII will create packages in the other CDK programming languages. Construct Hub will then automatically generate API reference and transliterate code samples. All you need to do is to follow the instructions under *\u201cQ: How can I add my construct to Construct Hub?\u201d.*"]})]})]}),Object(l.jsxs)(a.c,{question:"What are the best practices for writing a developer-friendly README file?",children:[Object(l.jsx)(i.a,{children:"Developer-friendly READMEs help readers quickly understand your library\u2019s relevance to their needs and its unique value in comparison to similar libraries on the Construct Hub. Below is a suggestion for a README file structure:"}),Object(l.jsxs)(n.c,{sx:{li:{mt:4}},children:[Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"State and maturity of the library."})," Start your READMEs with helpful badges like"," ",Object(l.jsx)(a.d,{href:"https://www.npmjs.com/package/cdk-codepipeline-badge-notification",children:"CDK pipelines badges"}),". It will help users see the state of your package."]}),Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"Short description"}),". What does this library do? Which use case does it solve? Which technologies and services does it use or support?"]}),Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"What is unique about this library?"})," Help readers quickly find the right library for their needs by stating its special advantages right up front. How does it compare to other libraries addressing the same need or that use the same technologies and services? You don\u2019t need an explicit \u201cus vs. them\u201d feature checklist; just make sure you communicate your library\u2019s unique value."]}),Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"Code samples."})," Include as many complete and working code samples as you can to help developers quickly understand how they can use your library. Some developers start reading code samples before anything else. Write your code samples in TypeScript, and Construct Hub will transliterate them to the other programming languages your library supports. A good practice is to include a minimal code sample of how to use your library in the first page of your README."]}),Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"Author information."})," Share information about you, other packages you\u2019ve published, and additional helpful links that can improve your credibility with readers."]}),Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"License and support."})," Include a \u201cLicense\u201d and \u201cContributing\u201d sections that invite users to contribute via links to your source code repository and issue tracker. (Construct Hub provides \u201cLicense\u201d and \u201cProvide Feedback\u201d in your library\u2019s package page, but it\u2019s convenient to have them in the README too.)"]}),Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"Diagrams."})," Diagrams always help readers quickly understand what a library does. Consider adding diagrams for libraries that create multiple services that work together."]}),Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"Explanatory videos."})," Consider sharing links to videos that can help potential customers engage with your library."]}),Object(l.jsxs)(n.a,{children:[Object(l.jsx)("strong",{children:"Absolute links vs. relative."})," Use absolute links (those that start with http:// or https://) and not relative links. Relative links are prone to breaking when the content is shared elsewhere."]})]})]}),Object(l.jsx)(a.c,{question:"Why isn\u2019t my package displayed on Construct Hub?",children:Object(l.jsxs)(i.a,{children:["Construct Hub includes publicly-available constructs that are JSII-compatible and that were published to the npm Registry with a permissive open-source license and a CDK keyword: aws-cdk, cdk8s, or cdktf. If you believe your package qualifies, but it still does not appear in Construct Hub, please raise an issue"," ",Object(l.jsx)(a.d,{href:"".concat(c.a,"/issues/new"),children:"here"}),"."]})}),Object(l.jsx)(a.c,{question:"Can I update my package after it has been displayed?",children:Object(l.jsx)(i.a,{children:"Yes, you can and should! After you publish a new valid version to the public npm Registry, it should appear on Construct Hub in about 30 minutes."})}),Object(l.jsx)(a.c,{question:"How can I report a bug or contribute code to a construct?",children:Object(l.jsx)(i.a,{children:"Each package is owned by its publisher, so contributions, such as bug reports and pull requests, should be made via the repository link provided by the publisher. You may press the \u2018Provide feedback\u2019 link at the package page to open a new issue in at the package\u2019s repository."})}),Object(l.jsxs)(a.c,{question:"How can I participate in link the Construct Hub community?",children:["Construct Hub is itself an open-source construct! Join the"," ",Object(l.jsx)(a.d,{href:"https://github.com/cdklabs/construct-hub",children:"Construct Hub GitHub community"}),". You are also welcome to join the #construct-hub-dev channel in the"," ",Object(l.jsx)(a.d,{href:"https://cdk.dev/",children:"CDK community Slack workspace"})]}),Object(l.jsx)(a.c,{question:"Is there a Slack channel for the CDK community?",children:Object(l.jsxs)(i.a,{children:["Please join the"," ",Object(l.jsx)(a.d,{href:"https://cdk.dev/",children:"CDK Slack channel"}),". This Slack channel is managed by the CDK community, for the CDK community."]})})]})]})})}}}]);
2
+ //# sourceMappingURL=11.d6a2b77e.chunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["constants/pageInfo.ts","components/Page/Page.tsx","components/FAQ/FAQ.tsx","components/FAQ/FAQHeading.tsx","components/FAQ/FAQItem.tsx","components/FAQ/FAQLink.tsx","components/FAQ/FAQSection.tsx","components/FAQ/FAQSections.tsx","views/Contribute/Contribute.tsx"],"names":["pageInfo","contribute","event","name","home","faq","packageProfile","search","siteTerms","notFound","page","pageType","Page","children","meta","pageName","trackPageView","usePageView","useEffect","suffix","title","description","formattedTitle","join","Helmet","process","content","charSet","property","FAQ","bg","color","h","w","py","width","FAQHeading","as","mx","textAlign","FAQItem","question","flex","ml","size","px","fontSize","sx","p","marginTop","marginBottom","FAQLink","href","ExternalLink","hasWarning","textDecoration","FAQSection","heading","my","allowMultiple","FAQSections","accordionProps","Contribute","allowToggle","defaultIndex","CONSTRUCT_HUB_REPO_URL","li","mt"],"mappings":"2LAAaA,EAAW,CACt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AAI,IAA/B,UACE,eAAC,IAAD,WACE,wEADF,+CAEmC,IACjC,cAACtC,EAAA,EAAD,CAASuB,KAAK,oEAAd,kCAHF,yDASA,eAAC,IAAD,WACE,uDADF,wHAMA,eAAC,IAAD,WACE,wEADF,gXAUA,eAAC,IAAD,WACE,mDADF,qcAWA,eAAC,IAAD,WACE,yDADF,sJAMA,eAAC,IAAD,WACE,0DADF,kVAQA,eAAC,IAAD,WACE,+CADF,oKAMA,eAAC,IAAD,WACE,yDADF,mGAKA,eAAC,IAAD,WACE,kEADF,8KASJ,cAACvB,EAAA,EAAD,CAASY,SAAS,wDAAlB,SACE,eAAC,IAAD,sUAKiD,IAC/C,cAACZ,EAAA,EAAD,CAASuB,KAAI,UAAKa,IAAL,eAAb,kBANF,SAaF,cAACpC,EAAA,EAAD,CAASY,SAAS,uDAAlB,SACE,cAAC,IAAD,kKAOF,cAACZ,EAAA,EAAD,CAASY,SAAS,4DAAlB,SACE,cAAC,IAAD,oTASF,eAACZ,EAAA,EAAD,CAASY,SAAS,6DAAlB,uEAC6D,IAC3D,cAACZ,EAAA,EAAD,CAASuB,KAAK,2CAAd,4CAFF,uEAKuE,IACrE,cAACvB,EAAA,EAAD,CAASuB,KAAK,mBAAd,8CAKF,cAACvB,EAAA,EAAD,CAASY,SAAS,kDAAlB,SACE,eAAC,IAAD,6BACkB,IAChB,cAACZ,EAAA,EAAD,CAASuB,KAAK,mBAAd,+BAFF","file":"static/js/11.d6a2b77e.chunk.js","sourcesContent":["export const pageInfo = {\n contribute: {\n event: {\n name: \"Contribute Load\",\n },\n },\n home: {\n event: {\n name: \"Home Load\",\n },\n },\n faq: {\n event: {\n name: \"Frequently Asked Questions Load\",\n },\n },\n packageProfile: {\n event: {\n name: \"Package Profile Load\",\n },\n },\n search: {\n event: {\n name: \"Search Load\",\n },\n },\n siteTerms: {\n event: {\n name: \"Site Terms Load\",\n },\n },\n notFound: {\n page: {\n pageType: \"errorPage\",\n },\n event: {\n name: \"404 Page Load\",\n },\n },\n} as const;\n","import { FunctionComponent, useEffect } from \"react\";\nimport { Helmet } from \"react-helmet\";\nimport { pageInfo } from \"../../constants/pageInfo\";\nimport { usePageView } from \"../../contexts/Analytics\";\n\nexport interface PageProps {\n pageName: keyof typeof pageInfo;\n meta: {\n suffix?: boolean;\n title: string;\n description: string;\n };\n}\n\nexport const Page: FunctionComponent<PageProps> = ({\n children,\n meta,\n pageName,\n}) => {\n const trackPageView = usePageView(pageInfo[pageName]);\n\n useEffect(() => {\n trackPageView();\n }, [trackPageView]);\n\n const { suffix = true, title, description } = meta;\n const formattedTitle = suffix ? `${title} - Construct Hub` : title;\n\n // Should be the same as the \"real\" CSP, except most things come from HTTP\n // instead of HTTPS (because it is protocol-relative, and the dev site is\n // served over plain HTTP).\n const csp = [\n \"default-src 'self' 'unsafe-inline' http://*.awsstatic.com;\",\n \"connect-src 'self' https://*.shortbread.aws.dev http://*.shortbread.aws.dev http://a0.awsstatic.com/ http://amazonwebservices.d2.sc.omtrdc.net http://aws.demdex.net http://dpm.demdex.net http://cm.everesttech.net;\",\n \"frame-src http://aws.demdex.net http://dpm.demdex.net;\",\n \"img-src 'self' https://* http://a0.awsstatic.com/ http://amazonwebservices.d2.sc.omtrdc.net http://aws.demdex.net http://dpm.demdex.net http://cm.everesttech.net;\",\n \"object-src 'none';\",\n \"style-src 'self' 'unsafe-inline';\",\n ].join(\" \");\n\n return (\n <>\n <Helmet>\n {process.env.NODE_ENV === \"development\" && (\n <meta content={csp} httpEquiv=\"Content-Security-Policy\" />\n )}\n\n <meta content=\"width=device-width, initial-scale=1\" name=\"viewport\" />\n <meta charSet=\"utf-8\" />\n\n <title>{formattedTitle}</title>\n <meta content={formattedTitle} property=\"og:title\" />\n <meta content={formattedTitle} name=\"twitter:title\" />\n <meta content=\"summary\" name=\"twitter:card\" />\n\n <meta content={description} name=\"description\" />\n <meta content={description} property=\"og:description\" />\n <meta content={description} name=\"twitter:description\" />\n </Helmet>\n {children}\n </>\n );\n};\n","import { Box } from \"@chakra-ui/react\";\nimport type { FunctionComponent } from \"react\";\n\nexport const FAQ: FunctionComponent = ({ children }) => (\n <Box bg=\"white\" color=\"blue.800\" h=\"100%\" w=\"100%\">\n {children}\n <Box py={5} width=\"100%\" />\n </Box>\n);\n","import { Box, Heading } from \"@chakra-ui/react\";\nimport type { FunctionComponent } from \"react\";\n\nexport const FAQHeading: FunctionComponent = ({ children }) => (\n <Box bg=\"gray.50\" py={20} width=\"100%\">\n <Heading as=\"h1\" mx=\"auto\" textAlign=\"center\">\n {children}\n </Heading>\n </Box>\n);\n","import {\n Heading,\n Text,\n AccordionIcon,\n AccordionButton,\n AccordionItem,\n AccordionPanel,\n Box,\n} from \"@chakra-ui/react\";\nimport type { FunctionComponent, ReactChild } from \"react\";\n\nexport interface FAQItemProps {\n question: ReactChild;\n}\n\nexport const FAQItem: FunctionComponent<FAQItemProps> = ({\n question,\n children,\n}) => (\n <AccordionItem>\n <AccordionButton>\n <Box flex=\"1\" py={2} textAlign=\"left\">\n <Heading as=\"h3\" ml={8} size=\"sm\">\n {question}\n </Heading>\n </Box>\n <AccordionIcon />\n </AccordionButton>\n <AccordionPanel px={12} py={4}>\n <Text\n color=\"blue.800\"\n fontSize=\"md\"\n sx={{ p: { marginTop: \"0\", marginBottom: \"4\" } }}\n >\n {children}\n </Text>\n </AccordionPanel>\n </AccordionItem>\n);\n","import { FunctionComponent } from \"react\";\nimport { ExternalLink } from \"../../components/ExternalLink\";\n\nexport interface FAQLinkProps {\n href: string;\n}\n\nexport const FAQLink: FunctionComponent<FAQLinkProps> = ({\n href,\n children,\n}) => (\n <ExternalLink\n color=\"inherit\"\n hasWarning={false}\n href={href}\n textDecoration=\"underline\"\n >\n {children}\n </ExternalLink>\n);\n","import {\n AccordionIcon,\n AccordionButton,\n AccordionItem,\n AccordionPanel,\n Heading,\n Box,\n Accordion,\n} from \"@chakra-ui/react\";\n\nimport type { FunctionComponent } from \"react\";\n\nexport interface FAQSectionProps {\n heading: string;\n}\n\nexport const FAQSection: FunctionComponent<FAQSectionProps> = ({\n heading,\n children,\n}) => (\n <AccordionItem>\n <AccordionButton>\n <Box flex=\"1\" textAlign=\"left\">\n <Heading as=\"h2\" ml={4} my={4} size=\"lg\">\n {heading}\n </Heading>\n </Box>\n <AccordionIcon />\n </AccordionButton>\n <AccordionPanel p={0}>\n <Accordion allowMultiple w=\"100%\">\n {children}\n </Accordion>\n </AccordionPanel>\n </AccordionItem>\n);\n","import { Accordion, AccordionProps } from \"@chakra-ui/react\";\nimport type { FunctionComponent } from \"react\";\n\nexport const FAQSections: FunctionComponent<AccordionProps> = ({\n children,\n ...accordionProps\n}) => (\n <Accordion allowMultiple {...accordionProps}>\n {children}\n </Accordion>\n);\n","import {\n Accordion,\n OrderedList,\n ListItem,\n Text,\n UnorderedList,\n} from \"@chakra-ui/react\";\nimport type { FunctionComponent } from \"react\";\nimport { FAQ, FAQHeading, FAQItem, FAQLink } from \"../../components/FAQ\";\nimport { Page } from \"../../components/Page\";\nimport { CONSTRUCT_HUB_REPO_URL } from \"../../constants/links\";\n\nexport const Contribute: FunctionComponent = () => (\n <Page\n meta={{\n description: \"Learn about contributing to Construct Hub.\",\n title: \"Contribute\",\n }}\n pageName=\"contribute\"\n >\n <FAQ>\n <FAQHeading>Contributing to Construct Hub</FAQHeading>\n\n <Accordion allowMultiple allowToggle defaultIndex={[0]}>\n <FAQItem question=\"How can I add my construct to Construct Hub?\">\n <Text>\n Constructs intended for Construct Hub must be published to the{\" \"}\n <FAQLink href=\"https://www.npmjs.com/\">npm Registry</FAQLink> under\n Apache, BSD, EPL, MPL-2.0, ISC and CDDL or MIT open source licenses\n and annotated with a keyword recognized by Construct Hub (awscdk,\n cdk8s, or cdktf).\n </Text>\n\n <Text>\n Additionally, since one of the main goals of Construct Hub is to\n enable an ecosystem of constructs that can be consumed by all CDK\n languages, your library <strong>must</strong> be compiled with{\" \"}\n <FAQLink href=\"https://aws.github.io/jsii/\">JSII</FAQLink>, a\n TypeScript-based tool for building multi-language libraries.\n Construct Hub leverages the type information produced by the JSII\n compiler to render a rich multi-language API reference for each\n construct.\n </Text>\n\n <Text>\n Construct Hub continuously monitors the npm Registry. Packages that\n meet the above requirements appear in Construct Hub in about 30\n minutes. If your package does not appear in Construct Hub, but meets\n these requirements, please file an issue against our{\" \"}\n <FAQLink href={`${CONSTRUCT_HUB_REPO_URL}/issues/new`}>\n GitHub repository.\n </FAQLink>\n </Text>\n\n <Text>\n The community has provided some great resources about publishing\n construct libraries that meet Construct Hub requirements. For\n example, see{\" \"}\n <FAQLink href=\"https://dev.to/aws-builders/a-beginner-s-guide-to-create-aws-cdk-construct-library-with-projen-5eh4\">\n “A Beginner&apos;s Guide to Create AWS CDK ConstructLibrary with{\" \"}\n projen”\n </FAQLink>{\" \"}\n by <FAQLink href=\"https://hayao-k.dev/\">hayao-k</FAQLink>.\n </Text>\n\n <Text>\n If you already have a library written in TypeScript and want to\n migrate it to JSII so it can be included in Construct Hub, see the{\" \"}\n <FAQLink href=\"https://aws.github.io/jsii/user-guides/#library-author-guide\">\n JSII library author guide.\n </FAQLink>\n </Text>\n </FAQItem>\n\n <FAQItem question=\"What are the best practices for improving discoverability of a construct library on Construct Hub?\">\n <Text>\n To improve your construct library’s visibility on Construct Hub,\n follow these best practices:\n </Text>\n <OrderedList sx={{ li: { mt: 4 } }}>\n <ListItem>\n <strong>Helpful description.</strong> Publish your library with a\n description. Libraries without description have lower chances to\n be discovered by users. When you write your library’s description,\n think: Why would someone use it? What makes it unique? Make the\n description as accurate and differentiated as possible.\n </ListItem>\n\n <ListItem>\n <strong>Helpful keywords.</strong> Publish your library with\n helpful keywords, ones that can help potential users to find your\n package. Helpful keywords can be technologies that are being used\n by the library, use cases the library is useful for, service names\n that are being used by the library etc. For example: ‘Monitoring’,\n ‘Kubernetes’, ‘Cost Management’, ‘Websites’, ‘AI’, ‘Containers’\n and more.\n </ListItem>\n\n <ListItem>\n <strong>Helpful keywords.</strong> Publish your library with\n helpful keywords, ones that can help potential users to find your\n package. Helpful keywords can be technologies that are being used\n by the library, use cases the library is useful for, service names\n that are being used by the library etc. For example: ‘Monitoring’,\n ‘Kubernetes’, ‘Cost Management’, ‘Websites’, ‘AI’, ‘Containers’\n and more.\n </ListItem>\n\n <ListItem>\n <strong>Helpful README.</strong> Review your library’s README\n file. Is it developer-friendly? That is, can developers quickly\n understand the use case you’re trying to solve? Does your README\n make it easy to get started with your library? Does it explain how\n your library is different from other libraries? Is it easy to\n understand at first glance the value developers gain from the\n library? For more information see *“Q: What are the best practices\n for a developer-friendly README file?”.*\n </ListItem>\n\n <ListItem>\n <strong>API documentation.</strong> Document the library classes,\n methods, properties in the library’s code. Construct Hub will\n display this information when it automatically generates the API\n documentation.\n </ListItem>\n\n <ListItem>\n <strong>Maintain your library.</strong> Developers prefer\n libraries that are updated on a regular basis. Our experience\n shows that successful libraries are those where publishers engage\n and collaborate with the user community, respond to issues and\n pull requests, fix bugs, and add capabilities. To gain more\n developers trust, maintain the releases section on your code\n repository and make sure to describe the changes between different\n releases. You may consider to link the libraries you’ve published\n with your code repository.\n </ListItem>\n\n <ListItem>\n <strong>AWS Partner Network (APN) badge.</strong> If you’re an AWS\n partner and you are publishing a library for your offering, please\n reach out to us and we will be happy to add a badge to your\n libraries with your company’s name.\n </ListItem>\n\n <ListItem>\n <strong>\n Enable support for multiple programming languages.\n </strong>{\" \"}\n Make your library usable by a broader set of users and increase\n its value to the ecosystem. Starting with your library written in\n TypeScript, JSII will create packages in the other CDK programming\n languages. Construct Hub will then automatically generate API\n reference and transliterate code samples. All you need to do is to\n follow the instructions under *“Q: How can I add my construct to\n Construct Hub?”.*\n </ListItem>\n </OrderedList>\n </FAQItem>\n\n <FAQItem question=\"What are the best practices for writing a developer-friendly README file?\">\n <Text>\n Developer-friendly READMEs help readers quickly understand your\n library’s relevance to their needs and its unique value in\n comparison to similar libraries on the Construct Hub. Below is a\n suggestion for a README file structure:\n </Text>\n\n <UnorderedList sx={{ li: { mt: 4 } }}>\n <ListItem>\n <strong>State and maturity of the library.</strong> Start your\n READMEs with helpful badges like{\" \"}\n <FAQLink href=\"https://www.npmjs.com/package/cdk-codepipeline-badge-notification\">\n CDK pipelines badges\n </FAQLink>\n . It will help users see the state of your package.\n </ListItem>\n\n <ListItem>\n <strong>Short description</strong>. What does this library do?\n Which use case does it solve? Which technologies and services does\n it use or support?\n </ListItem>\n\n <ListItem>\n <strong>What is unique about this library?</strong> Help readers\n quickly find the right library for their needs by stating its\n special advantages right up front. How does it compare to other\n libraries addressing the same need or that use the same\n technologies and services? You don’t need an explicit “us vs.\n them” feature checklist; just make sure you communicate your\n library’s unique value.\n </ListItem>\n\n <ListItem>\n <strong>Code samples.</strong> Include as many complete and\n working code samples as you can to help developers quickly\n understand how they can use your library. Some developers start\n reading code samples before anything else. Write your code samples\n in TypeScript, and Construct Hub will transliterate them to the\n other programming languages your library supports. A good practice\n is to include a minimal code sample of how to use your library in\n the first page of your README.\n </ListItem>\n\n <ListItem>\n <strong>Author information.</strong> Share information about you,\n other packages you’ve published, and additional helpful links that\n can improve your credibility with readers.\n </ListItem>\n\n <ListItem>\n <strong>License and support.</strong> Include a “License” and\n “Contributing” sections that invite users to contribute via links\n to your source code repository and issue tracker. (Construct Hub\n provides “License” and “Provide Feedback” in your library’s\n package page, but it’s convenient to have them in the README too.)\n </ListItem>\n\n <ListItem>\n <strong>Diagrams.</strong> Diagrams always help readers quickly\n understand what a library does. Consider adding diagrams for\n libraries that create multiple services that work together.\n </ListItem>\n\n <ListItem>\n <strong>Explanatory videos.</strong> Consider sharing links to\n videos that can help potential customers engage with your library.\n </ListItem>\n\n <ListItem>\n <strong>Absolute links vs. relative.</strong> Use absolute links\n (those that start with http:// or https://) and not relative\n links. Relative links are prone to breaking when the content is\n shared elsewhere.\n </ListItem>\n </UnorderedList>\n </FAQItem>\n\n <FAQItem question=\"Why isn’t my package displayed on Construct Hub?\">\n <Text>\n Construct Hub includes publicly-available constructs that are\n JSII-compatible and that were published to the npm Registry with a\n permissive open-source license and a CDK keyword: aws-cdk, cdk8s, or\n cdktf. If you believe your package qualifies, but it still does not\n appear in Construct Hub, please raise an issue{\" \"}\n <FAQLink href={`${CONSTRUCT_HUB_REPO_URL}/issues/new`}>\n here\n </FAQLink>\n .\n </Text>\n </FAQItem>\n\n <FAQItem question=\"Can I update my package after it has been displayed?\">\n <Text>\n Yes, you can and should! After you publish a new valid version to\n the public npm Registry, it should appear on Construct Hub in about\n 30 minutes.\n </Text>\n </FAQItem>\n\n <FAQItem question=\"How can I report a bug or contribute code to a construct?\">\n <Text>\n Each package is owned by its publisher, so contributions, such as\n bug reports and pull requests, should be made via the repository\n link provided by the publisher. You may press the ‘Provide feedback’\n link at the package page to open a new issue in at the package’s\n repository.\n </Text>\n </FAQItem>\n\n <FAQItem question=\"How can I participate in link the Construct Hub community?\">\n Construct Hub is itself an open-source construct! Join the{\" \"}\n <FAQLink href=\"https://github.com/cdklabs/construct-hub\">\n Construct Hub GitHub community\n </FAQLink>\n . You are also welcome to join the #construct-hub-dev channel in the{\" \"}\n <FAQLink href=\"https://cdk.dev/\">\n CDK community Slack workspace\n </FAQLink>\n </FAQItem>\n\n <FAQItem question=\"Is there a Slack channel for the CDK community?\">\n <Text>\n Please join the{\" \"}\n <FAQLink href=\"https://cdk.dev/\">CDK Slack channel</FAQLink>. This\n Slack channel is managed by the CDK community, for the CDK\n community.\n </Text>\n </FAQItem>\n </Accordion>\n </FAQ>\n </Page>\n);\n"],"sourceRoot":""}