{"version":3,"sources":["jsdelivr-header.js","/npm/instant-noodles@0.0.15/src/index.ts","/npm/instant-noodles@0.0.15/src/utils/convert.ts","/npm/instant-noodles@0.0.15/src/utils/misc.ts","/npm/instant-noodles@0.0.15/src/utils/parse-utils.ts","/npm/instant-noodles@0.0.15/src/utils/styles.ts","/npm/instant-noodles@0.0.15/src/components/Button/ButtonTypes.tsx","/npm/instant-noodles@0.0.15/src/components/Button/Button.tsx","/npm/instant-noodles@0.0.15/src/components/Button/ButtonContent.tsx","/npm/instant-noodles@0.0.15/src/components/Button/Spinner.tsx","/npm/instant-noodles@0.0.15/src/components/Expandable/Expandable.tsx","/npm/instant-noodles@0.0.15/src/components/Icons/index.tsx","/npm/instant-noodles@0.0.15/src/components/InstantNoodles/InstantNoodles.tsx","/npm/instant-noodles@0.0.15/src/components/ReportDisplay/ReportContent.tsx","/npm/instant-noodles@0.0.15/src/components/Suite/Suite.tsx","/npm/instant-noodles@0.0.15/src/components/Suite/helpers.tsx","/npm/instant-noodles@0.0.15/src/components/Suite/SuiteResults.tsx","/npm/instant-noodles@0.0.15/src/components/Loader/Loader.tsx","/npm/instant-noodles@0.0.15/src/components/ReportDisplay/ReportHeader.tsx","/npm/instant-noodles@0.0.15/src/components/ReportDisplay/ToggleReportButton.tsx","/npm/instant-noodles@0.0.15/src/hooks/use-event-listener.tsx","/npm/instant-noodles@0.0.15/src/hooks/use-isomorphic-layout-effect.tsx","/npm/instant-noodles@0.0.15/src/hooks/use-on-click-outside.tsx","/npm/instant-noodles@0.0.15/src/components/ReportDisplay/ReportDisplay.tsx","/npm/instant-noodles@0.0.15/src/components/ReportFrame/ReportFrame.tsx","/npm/instant-noodles@0.0.15/src/components/ReportFrame/Content.tsx","/npm/instant-noodles@0.0.15/src/components/ReportFrame/createHead.tsx","/npm/instant-noodles@0.0.15/src/components/ReportFrame/Context.tsx","/npm/instant-noodles@0.0.15/src/hooks/use-local-storage.tsx","/npm/instant-noodles@0.0.15/src/hooks/use-execute-test-suites.tsx","/npm/instant-noodles@0.0.15/src/hooks/use-debounced-callback.tsx","/npm/instant-noodles@0.0.15/src/constants.tsx","/npm/instant-noodles@0.0.15/src/helpers/mock-app.tsx","/npm/instant-noodles@0.0.15/src/helpers/spec-setup.tsx","/npm/instant-noodles@0.0.15/src/helpers/spec-utils.tsx"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,yuBCNA,YAAA,GAAA,SAAA,YAAA,CAAA,eAAA,IAAA,eAAA,UAAA,IAAA,UAAA,iBAAA,IAAA,iBAAA,kBAAA,IAAA,kBAAA,gBAAA,IAAA,gBAAA,mBAAA,IAAA,mBAAA,UAAA,IAAA,wBAAA,UAAA,eAAA,IAAA,mBAAA,aAAA,IAAA,wBAAA,eAAA,OAAA,QAAA,aAAA,aAAA,IAAA,wBAAwC,QAAA,mBCAjC,SAAA,WAAoB,GACzB,IAAK,SAAS,GAAK,MAAO,IAE1B,GAAW,IAAP,EAAU,MAAO,IAErB,GAAI,EAAK,IAAM,OAAO,EAAG,QAAQ,GAAK,KAEtC,MAAM,EAAU,EAAK,IACrB,GAAI,EAAU,GAAI,OAAO,EAAQ,QAAQ,GAAK,IAE9C,MAAM,EAAU,EAAU,GAC1B,GAAI,EAAU,GAAI,OAAO,EAAQ,QAAQ,GAAK,IAE9C,MAAM,EAAQ,EAAU,GACxB,GAAI,EAAQ,GAAI,OAAO,EAAM,QAAQ,GAAK,IAG1C,OADa,EAAQ,IACT,QAAQ,GAAK,GAC3B,CClBO,IAAM,KAAO,OCApB,oBAAA,GAAO,SAAA,SAAkB,GACvB,MAAwB,iBAAV,CAChB,CAEO,SAAA,YAAqB,GAC1B,YAAwB,IAAV,CAChB,CAEO,SAAA,OAAgB,GACrB,OAAiB,OAAV,CACT,CAEO,SAAA,MAAe,GACpB,OAAO,OAAO,IAAU,YAAY,EACtC,CAEO,SAAA,QAAoB,GACzB,OAAQ,MAAM,EAChB,CAGO,SAAA,UAAsB,GAC3B,OAAO,QAAQ,EACjB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AgB,EACpC,OAAS,GAEP,OADI,GAAQ,OAAO,QAAQ,IAAI,CAAE,IAAG,kBAC7B,CACT,IACC,CAAC,GAEE,EAA4B,OAAO,YACvC,OAAO,QAAQ,GAAuB,KAAI,EAAE,EAAe,KAClD,CAAC,EAAe,IAAI,2BAA2B,EAAuB,EAAe,OAI1F,GAAwB,GAAuB,IAAI,QAAO,CAAC,EAAK,KACpE,IACE,MAAM,EAAwB,EAAa,SAAS,GAAS,yBAAyB,EAAM,KAC5F,MAAO,IAAK,EAAA,CAAM,GAAqB,EACzC,OAAS,GAEP,OADI,GAAQ,OAAO,QAAQ,IAAI,CAAE,IAAG,uBAC7B,CACT,IACC,CAAC,GAEE,EAA2B,OAAO,YACtC,OAAO,QAAQ,GAAsB,KAAI,EAAE,EAAe,KACjD,CACL,EACA,EAA2B,KACxB,GAA0B,IAAI,2BAA2B,EAAuB,EAAe,SAMxG,MAAO,IACF,KACA,KACA,EACH,eAAgB,IACX,KACA,GAEP,EAGK,SAAA,WAAoB,EAA0B,GACnD,MAAM,EAAK,GAAQ,KAiBnB,OAfc,IAAI,MAAM,EAAK,CAC3B,IAAA,CAAI,EAAQ,IAC4B,mBAA3B,EAAO,GACT,IAAI,MAAM,EAAO,GAAiB,CACvC,MAAO,CAAC,EAAQ,EAAS,KACvB,EAAG,EAAM,GACF,QAAQ,MAAM,EAAQ,EAAS,MAInC,QAAQ,IAAI,EAAQ,IAMnC","file":"/npm/instant-noodles@0.0.15/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/instant-noodles@0.0.15/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import { updateConfig, getConfig } from \"react-microwave\"\nimport { InstantNoodles } from \"./components\"\n\nimport { MockState, MockStateValues, MockStateHandlers, MockStateContext } from \"./helpers/mock-app\"\nimport { configureSpecSuite } from \"./helpers/spec-setup\"\nimport * as specSuiteUtils from \"./helpers/spec-utils\"\n\nexport * from \"./types\"\nexport {\n  InstantNoodles,\n  updateConfig,\n  getConfig,\n  configureSpecSuite,\n  specSuiteUtils,\n  MockState,\n  MockStateValues,\n  MockStateHandlers,\n  MockStateContext,\n}\n","export function msToString(ms: number): string {\n  if (!isFinite(ms)) return \"-\"\n\n  if (ms === 0) return \"0\"\n\n  if (ms < 1000) return ms.toFixed(0) + \"ms\"\n\n  const seconds = ms / 1000\n  if (seconds < 60) return seconds.toFixed(1) + \"s\"\n\n  const minutes = seconds / 60\n  if (minutes < 60) return minutes.toFixed(1) + \"m\"\n\n  const hours = minutes / 60\n  if (hours < 24) return hours.toFixed(1) + \"h\"\n\n  const days = hours / 24\n  return days.toFixed(1) + \"d\"\n}\n","export const noop = () => {}\n","export function isString(value: any): value is string {\n  return typeof value === \"string\"\n}\n\nexport function isUndefined(value: any): value is undefined {\n  return typeof value === \"undefined\"\n}\n\nexport function isNull(value: any): value is null {\n  return value === null\n}\n\nexport function isNil(value: any): value is null | undefined {\n  return isNull(value) || isUndefined(value)\n}\n\nexport function isValid<T>(value: T | undefined | null): value is T {\n  return !isNil(value)\n}\n\n// aliasing this for legacy purposes\nexport function isDefined<T>(value: T | undefined | null): value is T {\n  return isValid(value)\n}\n\nexport function isObject(value: any): value is object {\n  return Object.prototype.toString.call(value) === \"[object Object]\"\n}\n\nexport function keysOf<T extends object, K extends keyof T>(obj: T): K[] {\n  return Object.keys(obj) as K[]\n}\n\nexport function valuesOf<T extends object, K extends keyof T>(obj: T): T[K][] {\n  return Object.values(obj) as T[K][]\n}\n\nexport function parseJSON<T>(value: string | null): T | undefined {\n  try {\n    return isUndefined(value) ? undefined : JSON.parse(value ?? \"\")\n  } catch {\n    console.log(\"parsing error on\", { value })\n    return undefined\n  }\n}\n","export function classNames(...classes: (string[] | string | undefined | null)[]) {\n  if (Array.isArray(classes[0])) {\n    classes = classes[0]\n  }\n  return classes.filter(Boolean).join(\" \")\n}\n","import type { ReactNode, ButtonHTMLAttributes, Ref, HTMLAttributes } from \"react\"\nimport type { CommonProps } from \"../../types\"\nimport { keysOf } from \"../../utils\"\n\nexport const buttonVariantToClassNamesMapping = {\n  standard: {\n    button: \"bg-white border-black\",\n    externalBorder: \"bg-black\",\n    content: \"text-black\",\n  },\n  blue: {\n    button: \"bg-blue-300 border-black\",\n    externalBorder: \"bg-black\",\n    content: \"text-white\",\n  },\n  yellow: {\n    button: \"bg-yellow-300 border-black\",\n    externalBorder: \"bg-black\",\n    content: \"text-black\",\n  },\n  pink: {\n    button: \"bg-pink-200 border-black\",\n    externalBorder: \"bg-black\",\n    content: \"text-black\",\n  },\n  green: {\n    button: \"bg-green-300 border-black\",\n    externalBorder: \"bg-black\",\n    content: \"text-black\",\n  },\n  red: {\n    button: \"bg-red-300 border-black\",\n    externalBorder: \"bg-black\",\n    content: \"text-danger\",\n  },\n  info: {\n    button: \"bg-blue-200 border-black\",\n    externalBorder: \"bg-black\",\n    content: \"text-neutral-600\",\n  },\n  success: {\n    button: \"bg-green-200 border-black\",\n    externalBorder: \"bg-black\",\n    content: \"text-success\",\n  },\n  warning: {\n    button: \"bg-yellow-200 border-black\",\n    externalBorder: \"bg-black\",\n    content: \"text-warning\",\n  },\n  danger: {\n    button: \"bg-red-200 border-black\",\n    externalBorder: \"bg-black\",\n    content: \"text-danger\",\n  },\n  dark: {\n    button: \"bg-black border-neutral-500\",\n    externalBorder: \"bg-black\",\n    content: \"text-white\",\n  },\n  ghost: {\n    button: \"bg-white border-none\",\n    externalBorder: \"transparent\",\n    content: \"text-black\",\n  },\n} as const\n\nexport const BUTTON_VARIANT = keysOf(buttonVariantToClassNamesMapping)\nexport type ButtonVariant = typeof BUTTON_VARIANT[number]\n\nexport const buttonSizeToClassNamesMapping = {\n  sm: {\n    button: \"px-3 py-2\",\n    content: \"text-sm\",\n  },\n  md: {\n    button: \"px-4 py-2\",\n    content: \"text-md\",\n  },\n  lg: {\n    button: \"px-6 py-3\",\n    content: \"text-lg\",\n  },\n  xl: {\n    button: \"px-12 py-4\",\n    content: \"text-3xl\",\n  },\n}\n\nexport const BUTTON_SIZE = keysOf(buttonSizeToClassNamesMapping)\nexport type ButtonSize = typeof BUTTON_SIZE[number]\n\nexport interface ButtonBaseProps extends CommonProps {\n  // disabled or not\n  disabled?: boolean\n  // button size\n  size?: ButtonSize\n  // button variant\n  variant?: ButtonVariant\n  // full width button or not\n  block?: boolean\n  // circle shaped?\n  circle?: boolean\n  // no border radius\n  square?: boolean\n  // whether to just show an outline or not\n  // outline?: boolean;\n  /* Whether to show a spinner */\n  isLoading?: boolean\n  /* What HTML element to render */\n  asComponent?: \"button\" | \"a\"\n  /* Icon node to show on left side, if any */\n  iconLeft?: ReactNode\n  /* Icon node to show on right side, if any */\n  iconRight?: ReactNode\n  /* Classname to pass to root button element */\n  className?: string\n  /* The content to render inside of the button */\n  children?: ReactNode\n}\n\nexport interface ButtonProps extends ButtonBaseProps, ButtonHTMLAttributes<HTMLButtonElement> {}\n\nexport interface ButtonContentProps extends CommonProps {\n  /* variant of the button */\n  buttonVariant?: ButtonVariant\n  /* size of the button */\n  buttonSize?: ButtonSize\n  /* Whether to show a spinner */\n  isLoading?: boolean\n  /* Icon node to show on left side, if any */\n  iconLeft?: ReactNode\n  /* Icon node to show on right side, if any */\n  iconRight?: ReactNode\n  /**\n   * Object of props passed to the <span/> wrapping the content's text/children only (not icon)\n   */\n  textProps?: HTMLAttributes<HTMLSpanElement> &\n    CommonProps & {\n      ref?: Ref<HTMLSpanElement>\n      \"data-text\"?: string\n    }\n  /* The content to render inside of the button */\n  children?: ReactNode\n}\n","import * as React from \"react\"\nimport { buttonSizeToClassNamesMapping, buttonVariantToClassNamesMapping, ButtonProps } from \"./ButtonTypes\"\nimport ButtonContent from \"./ButtonContent\"\nimport { classNames, noop } from \"../../utils\"\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n  (\n    {\n      disabled = false,\n      variant = \"standard\",\n      size = \"md\",\n      circle = false,\n      square = false,\n      block = false,\n      isLoading = false,\n      asComponent = \"button\",\n      onClick = noop,\n      iconLeft = null,\n      iconRight = null,\n      className = \"\",\n      children,\n      ...props\n    },\n    ref\n  ) => {\n    const variantClasses = buttonVariantToClassNamesMapping[variant]\n    const sizeClasses = buttonSizeToClassNamesMapping[size]\n\n    const handleOnClick = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n      if (disabled) return\n      if (isLoading) return\n      onClick(e)\n    }\n\n    const borderRadiusClassname = circle ? \"rounded-full\" : square ? \"\" : \"rounded-xl\"\n\n    const buttonClassNames = classNames([\n      \"instant-noodles-ui-element instant-noodles-ui-button\",\n      \"relative\",\n      variant === \"ghost\" ? \"\" : \"border-2\",\n      block ? \"w-full\" : \"\",\n      asComponent === \"button\" ? \"\" : \"inline-block\",\n      borderRadiusClassname,\n      // interaction classes\n      variant === \"ghost\" ? \"\" : \"shadow-full\",\n      \"challenge-ui-animated-button\",\n      \"duration-200\",\n      // 'active:translate-y-px',\n      variant === \"ghost\" || disabled || isLoading ? \"\" : \"active:translate-y-px active:shadow-fourth\",\n      disabled ? \"cursor-not-allowed\" : isLoading ? \"cursor-wait\" : \"cursor-pointer\",\n      // size classes\n      sizeClasses.button,\n      // variants classes\n      variantClasses.button,\n      // customs\n      className,\n    ])\n    const buttonContentClassNames = classNames([\n      // position content\n      \"flex flex-row items-center\",\n      // wrap or not\n      \"whitespace-nowrap\",\n      // text styling\n      \"font-extrabold\",\n      // size classes\n      sizeClasses.content,\n      // variant classes\n      variantClasses.content,\n    ])\n\n    return React.createElement(\n      asComponent,\n      {\n        className: buttonClassNames,\n        onClick: handleOnClick,\n        disabled,\n        ref,\n        ...props,\n      },\n      <ButtonContent\n        buttonVariant={variant}\n        buttonSize={size}\n        isLoading={isLoading}\n        iconLeft={iconLeft}\n        iconRight={iconRight}\n        className={buttonContentClassNames}\n      >\n        <React.Fragment>{children}</React.Fragment>\n      </ButtonContent>\n    )\n  }\n)\n\nButton.displayName = \"Button\"\n\nexport default Button\n","import * as React from \"react\"\nimport { type CommonProps } from \"../../types\"\nimport { classNames } from \"../../utils\"\nimport { Spinner } from \"./Spinner\"\nimport { ButtonContentProps } from \"./ButtonTypes\"\n\nexport interface ButtonIconProps\n  extends CommonProps,\n    Pick<ButtonContentProps, \"buttonVariant\" | \"buttonSize\" | \"isLoading\"> {\n  icon: ButtonContentProps[\"iconLeft\"]\n}\nconst ButtonIcon = ({ buttonVariant, buttonSize, isLoading = false, icon, className = \"\" }: ButtonIconProps) => {\n  if (!icon && !isLoading) return null\n\n  return (\n    <span>\n      {isLoading ? (\n        <React.Fragment>\n          <Spinner\n            variant={[\"standard\", \"ghost\"].includes(buttonVariant as string) ? \"blue\" : \"plain\"}\n            size={buttonSize === \"xl\" ? \"md\" : \"sm\"}\n            className={classNames([buttonSize !== \"xl\" ? \"translate-y-0.5\" : \"translate-y-1\", className])}\n          />\n        </React.Fragment>\n      ) : (\n        icon\n      )}\n    </span>\n  )\n}\n\nconst ButtonContent = React.forwardRef<HTMLSpanElement, ButtonContentProps>(\n  (\n    {\n      children,\n      textProps,\n      buttonVariant,\n      buttonSize = \"md\",\n      isLoading = false,\n      iconLeft = null,\n      iconRight = null,\n      className = \"\",\n      ...props\n    },\n    ref\n  ) => {\n    return (\n      <span\n        className={classNames([\n          \"instant-noodles-ui-element instant-noodles-ui-button-content\", // custom class name for any global customization\n          \"flex flex-row items-center space-x-2 justify-center\",\n          className,\n        ])}\n        ref={ref}\n        {...props}\n      >\n        {/* only show loading icon on left side */}\n        <ButtonIcon\n          buttonVariant={buttonVariant}\n          buttonSize={buttonSize}\n          isLoading={isLoading}\n          icon={iconLeft}\n          className=\"mr-2\"\n        />\n        <span {...textProps}>{children}</span>\n        <ButtonIcon buttonVariant={buttonVariant} buttonSize={buttonSize} icon={iconRight} className=\"ml-2\" />\n      </span>\n    )\n  }\n)\n\nButtonContent.displayName = \"ButtonContent\"\n\nexport default ButtonContent\n","import * as React from \"react\"\nimport type { CommonProps } from \"../../types\"\nimport { classNames, keysOf, isDefined } from \"../../utils\"\n\nconst spinnerSizeToClassNamesMapping = {\n  sm: {\n    container: \"w-5 h-5 min-w-5 max-w-5 min-h-5 max-h-5\",\n    indicator: \"before:border-2 after:border-2\",\n  },\n  md: {\n    container: \"w-10 h-10 min-w-10 max-w-10 min-h-10 max-h-10\",\n    indicator: \"before:border-4 after:border-4\",\n  },\n  lg: {\n    container: \"w-16 h-16 min-w-16 max-w-16 min-h-16 max-h-16\",\n    indicator: \"before:border-8 after:border-8\",\n  },\n  xl: {\n    container: \"w-28 h-28 min-w-28 max-w-28 min-h-28 max-h-28\",\n    indicator: \"before:border-14 after:border-14\",\n  },\n}\nexport const SPINNER_SIZE = keysOf(spinnerSizeToClassNamesMapping)\nexport type SpinnerSize = typeof SPINNER_SIZE[number]\n\nconst spinnerVariantToClassNameMapping = {\n  red: \"before:border-t-red-300 after:border-t-red-300\",\n  blue: \"before:border-t-blue-300 after:border-t-blue-300\",\n  green: \"before:border-t-green-300 after:border-t-green-300\",\n  pink: \"before:border-t-pink-300 after:border-t-pink-300\",\n  yellow: \"before:border-t-yellow-300 after:border-t-yellow-300\",\n  plain: \"before:border-t-white after:border-t-white\",\n  dark: \"before:border-t-black after:border-t-black\",\n}\nexport const SPINNER_VARIANT = keysOf(spinnerVariantToClassNameMapping)\nexport type SpinnerVariant = typeof SPINNER_VARIANT[number]\n\ninterface SpinnerBaseProps extends CommonProps {\n  size?: SpinnerSize\n  variant?: SpinnerVariant\n  rotateColors?: boolean\n  className?: string\n  style?: React.CSSProperties\n}\n\nexport interface SpinnerProps extends SpinnerBaseProps, React.HTMLAttributes<HTMLDivElement> {}\n\nexport function Spinner({\n  size = \"sm\",\n  variant = \"plain\",\n  rotateColors = false,\n  className = \"\",\n  ...props\n}: SpinnerProps) {\n  const rotateColorRef = React.useRef<any | null>(null)\n  const [spinnerVariant, setSpinnerVariant] = React.useState<SpinnerVariant>(variant)\n\n  const sizeStyles = spinnerSizeToClassNamesMapping[size]\n  const variantStyles = spinnerVariantToClassNameMapping[spinnerVariant]\n\n  React.useEffect(() => {\n    if (rotateColors) {\n      rotateColorRef.current = setInterval(() => {\n        setSpinnerVariant((currentSpinnerVariant) => {\n          const idx = SPINNER_VARIANT.indexOf(currentSpinnerVariant)\n          const newIdx = idx === SPINNER_VARIANT.length - 1 ? 0 : idx + 1\n          return SPINNER_VARIANT[newIdx]\n        })\n      }, 1000)\n    }\n\n    return () => {\n      if (rotateColors && isDefined(rotateColorRef?.current)) {\n        clearInterval(rotateColorRef.current)\n      }\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [])\n\n  const wrapperClassNames = classNames([\n    \"instant-noodles-ui-element instant-noodles-ui-spinner\", // custom class name for any global customization\n    \"inline-flex\",\n    \"rounded-full shrink-0\",\n    \"relative ml-0\",\n    sizeStyles.container,\n    className,\n  ])\n\n  return (\n    <div className={wrapperClassNames} {...props}>\n      <div\n        className={classNames([\n          \"before:z-30\",\n          \"before:animate-spin\",\n          \"before:w-full after:w-full\",\n          \"before:h-full after:h-full\",\n          \"before:rounded-full after:rounded-full\",\n          \"before:absolute after:absolute\",\n          \"before:border-transparent after:border-neutral-300\",\n          sizeStyles.indicator,\n          variantStyles,\n          \"challenges-ui-spin-funky\",\n          \"after:border-t-neutral-300\",\n        ])}\n      />\n    </div>\n  )\n}\n","import * as React from \"react\"\nimport { DownCaret, RightCaret } from \"../Icons\"\nimport type { CommonProps } from \"../../types\"\n\nexport interface IExpandableCommon extends CommonProps {\n  header: JSX.Element | string\n  noInsets?: boolean\n}\n\nexport interface IExpandable extends IExpandableCommon {\n  expanded?: boolean\n  setExpanded?: (expanded: boolean) => void\n}\n\nexport const Expandable: React.FC<IExpandable> = ({ header, expanded, setExpanded, children, noInsets }) => {\n  return (\n    <div className=\"expandable\">\n      <div\n        className={`expandable-header ${setExpanded ? `expanded-${expanded}` : \"\"}`}\n        onClick={() => setExpanded?.(!expanded)}\n        title={typeof header === \"string\" ? header : undefined}\n      >\n        {setExpanded && !!expanded ? <DownCaret /> : null}\n        {setExpanded && !expanded ? <RightCaret /> : null}\n        {header}\n      </div>\n      {(!setExpanded || expanded) && (\n        <div className={\"expandable-body\" + (noInsets ? \" expandable-body-no-insets\" : \"\")}>{children}</div>\n      )}\n    </div>\n  )\n}\n\nexport interface IAutoExpandable extends IExpandableCommon {\n  initialExpanded?: boolean\n}\nexport const AutoExpandable: React.FC<IAutoExpandable> = ({ header, initialExpanded, noInsets, children }) => {\n  const [expanded, setExpanded] = React.useState(initialExpanded || initialExpanded === undefined)\n  return (\n    <Expandable header={header} expanded={expanded} setExpanded={setExpanded} noInsets={noInsets}>\n      <React.Fragment>{children}</React.Fragment>\n    </Expandable>\n  )\n}\n","import * as React from \"react\"\nimport type { CommonProps, TestCaseResultsStatus } from \"../../types\"\n\nexport const IconWrapper: React.FC<CommonProps & { size?: number }> = ({\n  children,\n  size = 16,\n  className = \"\",\n  ...props\n}) => (\n  <svg\n    aria-hidden=\"true\"\n    height={size}\n    width={size}\n    viewBox={`0 0 ${size} ${size}`}\n    className={`icon ${className}`}\n    {...props}\n  >\n    {children}\n  </svg>\n)\n\nexport const BlankIcon = () => <IconWrapper />\n\nexport const CheckIcon = () => (\n  <IconWrapper className=\"color-text-success\">\n    <path\n      fillRule=\"evenodd\"\n      d=\"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z\"\n    ></path>\n  </IconWrapper>\n)\n\nexport const CrossIcon = () => (\n  <IconWrapper className=\"color-text-danger\">\n    <path\n      fillRule=\"evenodd\"\n      d=\"M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z\"\n    ></path>\n  </IconWrapper>\n)\n\nexport const WarningIcon = () => (\n  <IconWrapper className=\"color-text-warning\">\n    <path\n      fillRule=\"evenodd\"\n      d=\"M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z\"\n    ></path>\n  </IconWrapper>\n)\n\nexport const DownCaret = () => (\n  <IconWrapper className=\"color-fg-muted\">\n    <path\n      fillRule=\"evenodd\"\n      d=\"M12.78 6.22a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06 0L3.22 7.28a.75.75 0 011.06-1.06L8 9.94l3.72-3.72a.75.75 0 011.06 0z\"\n    ></path>\n  </IconWrapper>\n)\n\nexport const RightCaret = () => (\n  <IconWrapper className=\"color-fg-muted\">\n    <path\n      fillRule=\"evenodd\"\n      d=\"M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z\"\n    ></path>\n  </IconWrapper>\n)\n\nconst iconMapping: Record<TestCaseResultsStatus, React.FC> = {\n  passed: () => <CheckIcon />,\n  skipped: () => <BlankIcon />,\n  failed: () => <CrossIcon />,\n  timedOut: () => <WarningIcon />,\n  pending: () => <BlankIcon />,\n}\n\nexport function StatusIcon({ status }: { status: TestCaseResultsStatus }) {\n  const Icon = iconMapping[status] ?? iconMapping[\"skipped\"]\n  return <Icon />\n}\n","import type { TestSuiteMapping, ReportResults } from \"../../types\"\nimport { MicrowaveConfig, updateConfig } from \"react-microwave\"\n\nimport * as React from \"react\"\nimport * as ReactDOM from \"react-dom\"\nimport { ReportDisplay } from \"../ReportDisplay\"\nimport { useExecuteTestSuites, UseExecuteTestSuitesContext } from \"../../hooks/use-execute-test-suites\"\nimport { isDefined } from \"../../utils\"\nimport * as constants from \"../../constants\"\n\nexport interface GlobalInstantNoodlesNamespace {\n  hideReport: () => void\n  showReport: () => void\n}\n\ndeclare global {\n  interface Window {\n    __INSTANT_NOODLES__: GlobalInstantNoodlesNamespace\n  }\n}\n\nexport interface InstantNoodlesProps {\n  RootComponent?: React.ComponentType<any>\n  tests?: TestSuiteMapping\n  config?: Partial<MicrowaveConfig>\n}\n\nexport interface UseInstantNoodlesContext extends UseExecuteTestSuitesContext {\n  container: React.RefObject<HTMLElement>\n  initialized: boolean\n  reportExists: boolean\n  shouldShow: boolean\n}\n\nexport function useInstantNoodles({ tests, RootComponent, config }: InstantNoodlesProps): UseInstantNoodlesContext {\n  const container = React.useRef<HTMLElement | null>(null)\n  const [initialized, setInitialized] = React.useState(false)\n  const [shouldShow, setShouldShow] = React.useState(true)\n  const { report, testsAreRunning } = useExecuteTestSuites({\n    testSuites: tests,\n    RootComponent,\n    config,\n  })\n\n  // At some point, this might be useful\n  const reportExists = isDefined(report?.stats)\n\n  // create iframe container\n  React.useEffect(() => {\n    if (!container.current && !initialized) {\n      // const existingEl = window.document.getElementById(\"microwave-report-div-root\")\n      const existingEl = window.document.getElementById(constants.MICROWAVE_LIVE_REPORT_ROOT_DIV_ID)\n      if (existingEl) {\n        container.current = existingEl\n      } else {\n        const el = window.document.createElement(\"div\")\n        // el.setAttribute(\"id\", \"microwave-report-div-root\")\n        el.setAttribute(\"id\", constants.MICROWAVE_LIVE_REPORT_ROOT_DIV_ID)\n        container.current = el\n        window.document.body.appendChild(el)\n      }\n\n      setInitialized(true)\n    }\n  }, [initialized])\n\n  // pollute global namespace with function to hide/show report\n  React.useEffect(() => {\n    const globalInstantNoodlesNamespace: GlobalInstantNoodlesNamespace = {\n      hideReport: () => setShouldShow(false),\n      showReport: () => setShouldShow(true),\n    }\n    window.__INSTANT_NOODLES__ = globalInstantNoodlesNamespace\n  }, [])\n\n  React.useEffect(() => {\n    // update config on mount if supplied with one\n    // no need to do this at any point later on,\n    // as the config should be immutable\n    const defaultConfig = {}\n    updateConfig(config ?? defaultConfig)\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [])\n\n  return { report, testsAreRunning, container, initialized, reportExists, shouldShow }\n}\n\nexport function InstantNoodles(props: InstantNoodlesProps) {\n  const {\n    report,\n    testsAreRunning,\n    container,\n    initialized,\n    // reportExists\n    shouldShow,\n  } = useInstantNoodles({\n    tests: props.tests,\n    RootComponent: props.RootComponent,\n    config: props.config,\n  })\n\n  return (\n    <React.Fragment>\n      {container.current && shouldShow\n        ? ReactDOM.createPortal(\n            <ReportDisplay\n              report={report as ReportResults}\n              testsAreRunning={testsAreRunning}\n              initialized={initialized}\n            />,\n            container.current!\n          )\n        : null}\n    </React.Fragment>\n  )\n}\n","import * as React from \"react\"\nimport type { HTMLReport, ReportFilter, ReportStats, ExpandedTests } from \"../../types\"\nimport { CrossIcon } from \"../Icons\"\nimport { SuiteResults } from \"../Suite\"\nimport { ReportHeader } from \"./ReportHeader\"\nimport { ToggleReportButton } from \"./ToggleReportButton\"\nimport { useOnClickOutside } from \"../../hooks/use-on-click-outside\"\n\nexport interface IReportContent {\n  stats?: ReportStats\n  report?: HTMLReport\n  isShowing?: boolean\n  setIsShowing: (b: boolean) => void\n  displayFilter: ReportFilter\n  setDisplayFilter: (filter: ReportFilter) => void\n  expandedTests: ExpandedTests\n  setExpandedTests: (expandedTests: ExpandedTests) => void\n  testsAreRunning?: boolean\n}\nexport function ReportContent(props: IReportContent) {\n  const reportWrapperRef = React.useRef<HTMLDivElement>(null)\n\n  const handleOnClickOutside = () => {\n    // TODO: only close report on outside click if configuration option is set to true\n    props.setIsShowing(false)\n  }\n\n  useOnClickOutside(reportWrapperRef, handleOnClickOutside)\n\n  if (!props.isShowing) {\n    return (\n      <ToggleReportButton\n        numPassed={props.report?.stats?.passed ?? 0}\n        numTotal={props.report?.stats?.total ?? 0}\n        setIsShowing={props.setIsShowing}\n      />\n    )\n  }\n\n  return (\n    <div className=\"htmlreport\" ref={reportWrapperRef}>\n      <div className=\"report-close-icon\" role=\"button\" onClick={() => props.setIsShowing(!props.isShowing)}>\n        <CrossIcon />\n      </div>\n      <main>\n        <ReportHeader\n          stats={props.stats}\n          displayFilter={props.displayFilter}\n          setDisplayFilter={props.setDisplayFilter}\n        />\n        <br />\n        <br />\n        <SuiteResults\n          displayFilter={props.displayFilter}\n          report={props.report}\n          expandedTests={props.expandedTests}\n          setExpandedTests={props.setExpandedTests}\n          testsAreRunning={props.testsAreRunning}\n        />\n      </main>\n    </div>\n  )\n}\n","import type { HTMLReport, ITestSuiteSummary, ITestCaseSummary, ReportFilter, ExpandedTests } from \"../../types\"\nimport * as React from \"react\"\nimport { Expandable } from \"../Expandable/Expandable\"\nimport { StatusIcon } from \"../Icons\"\nimport { msToString } from \"../../utils\"\nimport * as helpers from \"./helpers\"\n\nexport interface ITestSuite {\n  report: HTMLReport\n  suite: ITestSuiteSummary\n  isTestExpanded: (testId: string) => boolean\n  setExpandedTests: (fileId: string, expanded: boolean) => void\n  displayFilter?: ReportFilter\n}\nexport const TestSuite = ({ suite, isTestExpanded, setExpandedTests, displayFilter }: ITestSuite) => {\n  const [expandedSuiteTests, setExpandedSuiteTests] = React.useState<ExpandedTests>(new Map())\n\n  const filteredSuiteTests = React.useMemo(() => {\n    if (!displayFilter || displayFilter === \"all\") return suite.tests\n    return suite.tests.filter((test) => test.status === displayFilter)\n    // TODO: Figure out if we want to update the deps for this section\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [displayFilter])\n\n  return (\n    <Expandable\n      expanded={isTestExpanded(suite.suiteName)}\n      noInsets={true}\n      setExpanded={(expanded) => setExpandedTests(suite.suiteName, expanded)}\n      header={\n        <span>\n          <span style={{ float: \"right\", marginLeft: 5 }}>{msToString(suite.stats.duration)}</span>\n          {suite.suiteName}\n        </span>\n      }\n    >\n      {filteredSuiteTests.length === 0 ? (\n        <div className={\"test-case\"}>\n          <span className=\"test-case-desc\">No tests match that filter for this suite</span>\n        </div>\n      ) : null}\n      {filteredSuiteTests.map((test: ITestCaseSummary) => (\n        <React.Fragment key={`test-${test.order}`}>\n          <div\n            className={\"test-case test-case-outcome-\" + test.status}\n            role=\"button\"\n            onClick={() => {\n              const isExpanded = expandedSuiteTests.get(test.order)\n              const newExpanded = new Map(expandedSuiteTests)\n              newExpanded.set(test.order, !isExpanded)\n              setExpandedSuiteTests(newExpanded)\n            }}\n          >\n            <span style={{ float: \"right\" }}>{msToString(test.duration)}</span>\n            <StatusIcon status={test.status} />\n            <span className=\"test-case-desc\">— {test.description}</span>\n          </div>\n          {expandedSuiteTests.get(test.order) ? (\n            <>\n              {test.errors?.length ? (\n                <div className=\"error-message-box-wrapper\">\n                  {test.errors.map((e, i) => {\n                    const htmlToRender = helpers.createHtmlFromError(e)\n                    return (\n                      <div\n                        key={`error-${i}`}\n                        className=\"error-message-box\"\n                        dangerouslySetInnerHTML={{ __html: htmlToRender }}\n                        // onClick={() => console.log({ e })}\n                      />\n                    )\n                  })}\n                </div>\n              ) : (\n                <div className=\"success-message-box-wrapper\">\n                  <div>{test.description}</div>\n                  <div>Status: {helpers.htmlFormatStatus(test.status)}</div>\n                </div>\n              )}\n            </>\n          ) : null}\n        </React.Fragment>\n      ))}\n    </Expandable>\n  )\n}\n","import * as React from \"react\"\nimport type { TestCaseResultsStatus } from \"../../types\"\n\nexport function getValidHtmlStringForErrorMessage(e: string) {\n  let lastIndex = -1\n\n  lastIndex = e.indexOf(\"(Actual)\")\n  if (lastIndex > -1) {\n    return e.slice(0, lastIndex + 8)\n  }\n\n  lastIndex = e.indexOf(\"(ok)\")\n  if (lastIndex > -1) {\n    return e.slice(0, lastIndex + 4)\n  }\n\n  lastIndex = e.indexOf(\"at assert\")\n  if (lastIndex > -1) {\n    return e.slice(0, lastIndex + 9)\n  }\n\n  return e\n}\n\nexport const htmlFormatStatus = (status: TestCaseResultsStatus) => {\n  if (status === \"passed\")\n    return <span style={{ fontWeight: \"bold\", color: \"var(--color-scale-green-4)\" }}>{status}</span>\n  if (status === \"failed\")\n    return <span style={{ fontWeight: \"bold\", color: \"var(--color-scale-red-5)\" }}>{status}</span>\n  if (status === \"skipped\")\n    return <span style={{ fontWeight: \"bold\", color: \"var(--color-scale-gray-4)\" }}>{status}</span>\n  return status\n}\n\nexport const stripExtraneousValuesFromErrorString = (e: string) => e.replace(\"[90m\", \"\").replace(\"[39m\", \"\")\n\nexport const createHtmlFromError = (e: string) => {\n  const eLines = stripExtraneousValuesFromErrorString(e).split(\"\\n\")\n  const formattedELines = eLines\n    .filter((l) => Boolean(l?.trim()) && Boolean(l.trim()))\n    // .map((l) => `<p style=\"display: flex; flex-wrap: wrap; align-items: center;\">${l}</p>`)\n    .map((l) => `<p style=\"display: flex\">${l}</p>`)\n    .join(\"\")\n\n  const htmlToRender = getValidHtmlStringForErrorMessage(formattedELines)\n  return htmlToRender\n}\n","import * as React from \"react\"\nimport type { HTMLReport, ITestSuiteSummary, ReportFilter, ExpandedTests } from \"../../types\"\nimport { Loader } from \"../Loader/Loader\"\nimport { TestSuite } from \"./Suite\"\n\ninterface ISuiteResults {\n  report?: HTMLReport\n  expandedTests: ExpandedTests\n  setExpandedTests: (value: ExpandedTests) => void\n  defaultExpanded?: boolean\n  displayFilter?: ReportFilter\n  testsAreRunning?: boolean\n}\nexport const SuiteResults = ({\n  report,\n  expandedTests,\n  setExpandedTests,\n  displayFilter,\n  defaultExpanded = true,\n  testsAreRunning,\n}: ISuiteResults) => {\n  const filteredSuites = React.useMemo(() => {\n    const result: { suite: ITestSuiteSummary; defaultExpanded: boolean }[] = []\n    let visibleTests = 0\n    for (const suite of report?.suites || []) {\n      const tests = suite.tests\n      visibleTests += tests.length\n      if (tests.length) result.push({ suite, defaultExpanded: visibleTests < 200 })\n    }\n    return result\n  }, [report])\n\n  if (testsAreRunning) {\n    return (\n      <div className=\"suites\">\n        <Loader />\n      </div>\n    )\n  }\n\n  return (\n    <div className=\"suites\">\n      {report?.suites\n        ? filteredSuites.map(({ suite }) => {\n            return (\n              <TestSuite\n                key={`suite-${suite.suiteName}`}\n                displayFilter={displayFilter}\n                report={report}\n                suite={suite}\n                isTestExpanded={(fileId) => {\n                  const value = expandedTests.get(fileId)\n                  if (value === undefined) return defaultExpanded\n                  return !!value\n                }}\n                setExpandedTests={(fileId, expanded) => {\n                  const newExpanded = new Map(expandedTests)\n                  newExpanded.set(fileId, expanded)\n                  setExpandedTests(newExpanded)\n                }}\n              />\n            )\n          })\n        : null}\n    </div>\n  )\n}\n","import * as React from \"react\"\n\nexport function Loader(props: any) {\n  return (\n    <React.Fragment>\n      <div id=\"loading-overlay\" className=\"regular-loading\" {...props}>\n        <div className=\"loader\">\n          <span className=\"bar\"></span>\n          <span className=\"bar\"></span>\n          <span className=\"bar\"></span>\n        </div>\n      </div>\n    </React.Fragment>\n  )\n}\n","import * as React from \"react\"\nimport type { ReportFilter, ReportStats } from \"../../types\"\nimport { Button } from \"../Button\"\nimport { StatusIcon } from \"../Icons\"\n\nconst navbarFilterItems: { label: string; value: ReportFilter; stateAttr: string; icon?: any }[] = [\n  { label: \"All\", value: \"all\", stateAttr: \"total\" },\n  { label: \"Passed\", value: \"passed\", stateAttr: \"passed\", icon: <StatusIcon status=\"passed\" /> },\n  { label: \"Failed\", value: \"failed\", stateAttr: \"failed\", icon: <StatusIcon status=\"failed\" /> },\n  { label: \"Skipped\", value: \"skipped\", stateAttr: \"skipped\" },\n]\n\nexport interface IReportHeader {\n  stats?: ReportStats\n  displayFilter: ReportFilter\n  setDisplayFilter: (filter: ReportFilter) => void\n}\nexport function ReportHeader({ stats, setDisplayFilter, displayFilter }: IReportHeader) {\n  return (\n    <nav className=\"report-navbar\">\n      {navbarFilterItems.map((item) => (\n        <React.Fragment key={item.value}>\n          <Button\n            className={`nav-item ${item.value === displayFilter ? \"active\" : \"\"}`}\n            onClick={() => setDisplayFilter(item.value)}\n          >\n            {item.icon ?? null} {item.label}{\" \"}\n            <span className=\"counter\">{stats?.[item.stateAttr as keyof typeof stats] ?? 0}</span>\n          </Button>\n        </React.Fragment>\n      ))}\n    </nav>\n  )\n}\n","import * as React from \"react\"\n\nexport interface IToggleReportButtonProps {\n  numPassed?: number\n  numTotal?: number\n  setIsShowing?: (isShowing: boolean) => void\n  style?: React.CSSProperties\n}\n\nexport function ToggleReportButton({ setIsShowing, numPassed, numTotal, ...props }: IToggleReportButtonProps) {\n  const borderColor = numPassed === numTotal ? \"green\" : \"red\"\n\n  return (\n    <button\n      className=\"react-live-test-report-toggle\"\n      style={{\n        display: \"flex\",\n        flexDirection: \"column\",\n        height: 45,\n        width: 45,\n        alignItems: \"center\",\n        justifyContent: \"center\",\n        background: \"white\",\n        border: `solid 1px ${borderColor}`,\n        borderRadius: \"50%\",\n        position: \"absolute\",\n        right: 5,\n        top: 5,\n        cursor: \"pointer\",\n        fontSize: 12,\n        // letterSpacing: \"4px\",\n        fontWeight: \"bold\",\n      }}\n      onClick={() => setIsShowing?.(true)}\n      {...props}\n    >\n      <span style={{ display: \"flex\", justifyContent: \"center\", fontWeight: \"bold\" }}>\n        {numPassed ?? 0}/{numTotal ?? 0}\n      </span>\n    </button>\n  )\n}\n","import { type RefObject, useEffect, useRef } from \"react\"\nimport { useIsomorphicLayoutEffect } from \"./use-isomorphic-layout-effect\"\n\nexport function useEventListener<K extends keyof WindowEventMap>(\n  eventName: K,\n  handler: (event: WindowEventMap[K]) => void\n): void\nexport function useEventListener<K extends keyof HTMLElementEventMap, T extends HTMLElement = HTMLDivElement>(\n  eventName: K,\n  handler: (event: HTMLElementEventMap[K]) => void,\n  element: RefObject<T>\n): void\n\nexport function useEventListener<\n  KW extends keyof WindowEventMap,\n  KH extends keyof HTMLElementEventMap,\n  T extends HTMLElement | void = void\n>(\n  eventName: KW | KH,\n  handler: (event: WindowEventMap[KW] | HTMLElementEventMap[KH] | Event) => void,\n  element?: RefObject<T>\n) {\n  const savedHandler = useRef(handler)\n\n  useIsomorphicLayoutEffect(() => {\n    savedHandler.current = handler\n  }, [handler])\n\n  useEffect(() => {\n    const targetElement: T | Window = element?.current || window\n    if (!(targetElement && targetElement.addEventListener)) return\n\n    const eventListener: typeof handler = (event) => savedHandler.current(event)\n    targetElement.addEventListener(eventName, eventListener)\n\n    return () => {\n      targetElement.removeEventListener(eventName, eventListener)\n    }\n  }, [eventName, element])\n}\n","import { useEffect, useLayoutEffect } from \"react\"\n\nexport const useIsomorphicLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect\n","import { type RefObject } from \"react\"\nimport { useEventListener } from \"./use-event-listener\"\n\ntype Handler = (event: MouseEvent) => void\n\nexport function useOnClickOutside<T extends HTMLElement = HTMLElement>(\n  ref: RefObject<T>,\n  handler: Handler,\n  mouseEvent: \"mousedown\" | \"mouseup\" = \"mousedown\"\n): void {\n  useEventListener(mouseEvent, (event) => {\n    const el = ref?.current\n\n    // Do nothing if clicking ref's element or descendent elements\n    if (!el || el.contains(event.target as Node)) {\n      return\n    }\n\n    handler(event)\n  })\n}\n","import * as React from \"react\"\nimport type { HTMLReport, ReportFilter, ReportStats, ExpandedTests } from \"../../types\"\nimport { ReportFrame } from \"../ReportFrame\"\nimport { useLocalStorage } from \"../../hooks/use-local-storage\"\nimport { ReportContent } from \"./ReportContent\"\n\nexport interface IReportDisplay {\n  stats?: ReportStats\n  report?: HTMLReport\n  isShowing?: boolean\n  testsAreRunning?: boolean\n  initialized?: boolean\n}\n\nexport function useReportDisplay() {\n  const frameRef = React.useRef<HTMLIFrameElement | null>(null)\n  const [isShowing, setIsShowing] = useLocalStorage(\"microwave-report-is-showing\", false)\n  const [displayFilter, setDisplayFilter] = React.useState<ReportFilter>(\"all\")\n  const [expandedTests, setExpandedTests] = React.useState<ExpandedTests>(new Map())\n  // const [hasMounted, setHasMounted] = React.useState(false)\n\n  return {\n    frameRef,\n    isShowing,\n    setIsShowing,\n    displayFilter,\n    setDisplayFilter,\n    expandedTests,\n    setExpandedTests,\n    // hasMounted,\n    // setHasMounted,\n  }\n}\n\nexport function ReportDisplay(props: IReportDisplay) {\n  const {\n    frameRef,\n    isShowing,\n    setIsShowing,\n    displayFilter,\n    setDisplayFilter,\n    expandedTests,\n    setExpandedTests,\n    // handleOnMount,\n  } = useReportDisplay()\n\n  return (\n    <ReportFrame\n      frameRef={frameRef}\n      initialized={props.initialized ? 1 : 0}\n      passing={props.report?.stats?.passed ?? 0}\n      total={props.report?.stats?.total ?? 0}\n      isShowing={isShowing}\n      setIsShowing={setIsShowing}\n      // onUpdate={() => handleOnMount()}\n      // onMount={() => handleOnMount()}\n    >\n      <ReportContent\n        report={props.report}\n        stats={props.report?.stats}\n        displayFilter={displayFilter}\n        setDisplayFilter={setDisplayFilter}\n        expandedTests={expandedTests}\n        setExpandedTests={setExpandedTests}\n        setIsShowing={setIsShowing}\n        isShowing={isShowing}\n        testsAreRunning={props.testsAreRunning}\n      />\n    </ReportFrame>\n  )\n}\n","import * as React from \"react\"\nimport * as ReactDOM from \"react-dom\"\nimport { renderToStaticMarkup } from \"react-dom/server\"\nimport { isDefined } from \"../../utils\"\nimport { Content } from \"./Content\"\nimport { createHead } from \"./createHead\"\n\nimport { FrameContextProvider } from \"./Context\"\n\nexport type ReportFrameProps = {\n  children: React.ReactChild\n  className?: string\n  mountTarget?: string\n  onMount?: () => void\n  onUpdate?: () => void\n  isShowing?: boolean\n  initialized?: number\n  setIsShowing?: (isShowing: boolean) => void\n  passing?: number\n  total?: number\n  frameRef: React.MutableRefObject<HTMLIFrameElement | null>\n}\nexport function ReportFrame(props: ReportFrameProps) {\n  const { frameRef } = props\n\n  const setNodeRef = (node: HTMLIFrameElement) => {\n    if (isDefined(node) && !isDefined(frameRef.current)) {\n      frameRef.current = node\n\n      props.onMount?.()\n    }\n  }\n\n  const getDoc = () => {\n    if (isDefined(frameRef.current)) {\n      return frameRef.current.contentDocument\n    }\n    return null\n  }\n\n  const createFrameContents = () => {\n    if (!isDefined(frameRef.current)) return null\n\n    const doc = getDoc()\n\n    if (!isDefined(doc)) return null\n\n    const win = doc.defaultView\n\n    const contents = (\n      <Content onUpdate={props.onUpdate} onMount={props.onMount}>\n        <FrameContextProvider value={{ document: doc, window: win ?? undefined, initialized: props.initialized ?? 0 }}>\n          {props?.children ?? null}\n        </FrameContextProvider>\n      </Content>\n    )\n\n    return contents\n  }\n\n  const getMountTarget = () => {\n    const doc = getDoc()\n    let target: HTMLElement | null | undefined\n\n    if (isDefined(props?.mountTarget)) {\n      target = doc?.querySelector(props?.mountTarget)\n    }\n\n    if (isDefined(doc) && !isDefined(target)) {\n      target = doc?.body?.children?.[0] as HTMLElement\n    }\n\n    if (isDefined(frameRef?.current) && !isDefined(target)) {\n      const frameDoc = frameRef?.current?.contentDocument\n      const body = frameRef?.current?.contentDocument?.body\n      if (!body?.children?.length) {\n        target = frameDoc?.createElement(\"main\")\n        if (target) {\n          target?.setAttribute(\"id\", \"instant-noodles-react-live-test-frame-root\")\n          body?.appendChild(target)\n        }\n      }\n      target = frameRef?.current?.contentDocument?.body?.children?.[0] as HTMLElement\n    }\n\n    return target\n  }\n\n  const createIFrameProps = (contents: JSX.Element | null, target?: HTMLElement | null) => {\n    const iframeprops = {\n      srcDoc: createDefaultSrcWithBody(createHead()),\n      className: \"sandbox-iframe-element\" + isDefined(contents) ? \"\" : \"\" + isDefined(target) ? \"\" : \"\",\n    }\n\n    return iframeprops\n  }\n\n  const d = getDoc()\n  const contents = createFrameContents()\n  const contentsMountTarget = getMountTarget()\n  const frameProps = createIFrameProps(contents, contentsMountTarget)\n  const iframeStyle = getIframeStyle(props.isShowing)\n\n  return (\n    <React.Fragment>\n      <iframe {...frameProps} ref={setNodeRef} style={iframeStyle}>\n        {isDefined(d) && isDefined(contentsMountTarget) ? ReactDOM.createPortal(contents, contentsMountTarget) : null}\n      </iframe>\n    </React.Fragment>\n  )\n}\n\ntype IFrameStyles = React.DetailedHTMLProps<React.IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>\n\nconst getIframeStyle = (isShowing = false): IFrameStyles => {\n  const defaultStyles = {\n    right: 0,\n    top: 0,\n    bottom: 0,\n    height: \"100%\",\n    width: \"100%\",\n    position: \"fixed\",\n    display: \"flex\",\n    flexDirection: \"column\",\n    zIndex: 1000000000000,\n    border: \"none\",\n  }\n\n  const styles = isShowing\n    ? {\n        ...defaultStyles,\n        height: \"100vh\",\n        width: \"800px\",\n        maxWidth: \"100vw\",\n        transform: \"translateX(0)\",\n        overflowY: \"scroll\",\n      }\n    : {\n        ...defaultStyles,\n        height: 50,\n        width: 50,\n        alignItems: \"center\",\n        justifyContent: \"center\",\n      }\n\n  return styles as IFrameStyles\n}\n\nfunction StaticButton() {\n  return (\n    <button\n      className=\"react-live-test-report-toggle\"\n      style={{\n        display: \"flex\",\n        flexDirection: \"column\",\n        height: 45,\n        width: 45,\n        alignItems: \"center\",\n        justifyContent: \"center\",\n        background: \"white\",\n        border: `solid 1px ${\"green\"}`,\n        borderRadius: \"50%\",\n        position: \"absolute\",\n        right: 5,\n        top: 5,\n        cursor: \"pointer\",\n        fontSize: 10,\n        letterSpacing: \"0.1px\",\n        fontWeight: \"bold\",\n      }}\n    >\n      <span id=\"react-live-test-small-font\" style={{ display: \"flex\", justifyContent: \"center\", fontWeight: \"bold\" }}>\n        save to run\n      </span>\n    </button>\n  )\n}\n\nconst createDefaultSrcWithBody = (\n  head: string = \"<head></head>\",\n  body = `<main id=\"instant-noodles-react-live-test-frame-root\" style=\"overflow-y: scroll\">${renderToStaticMarkup(\n    StaticButton()\n  )}</main>`\n) => `<!DOCTYPE html><html>${head}<body>${body}</body></html>`\n","import * as React from \"react\"\nimport type { AnyFunction } from \"../../types\"\nimport { noop } from \"../../utils\"\n\nexport interface ContentProps {\n  children: React.ReactChild\n  onMount?: AnyFunction\n  onUpdate?: AnyFunction\n}\nexport function Content({ children, onMount = noop, onUpdate = noop }: ContentProps) {\n  React.useEffect(() => {\n    onMount()\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [])\n\n  React.useEffect(() => {\n    onUpdate()\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [children])\n\n  return <React.Fragment>{React.Children.only(children)}</React.Fragment>\n}\n","function rootStyles() {\n  return `\n<style>\n\n:root {\n  --color-canvas-subtle: #161b22;\n  --color-border-default: #30363d;\n\n  --color-fg-default: #c9d1d9;\n  --color-fg-muted: #8b949e;\n  --color-fg-subtle: #484f58;  \n\n  --color-checks-step-header-open-bg: #161b22;\n  --color-checks-step-error-text: #f85149;\n  --color-checks-step-warning-text: #d29922;  \n\n  --color-neutral-emphasis-plus: #6e7681;\n  --color-neutral-emphasis: #6e7681;\n  --color-neutral-muted: rgba(110,118,129,0.4);\n  --color-neutral-subtle: rgba(110,118,129,0.1);\n\n  --color-accent-fg: #58a6ff;\n  --color-accent-emphasis: #1f6feb;\n  --color-accent-muted: rgba(56,139,253,0.4);\n  --color-accent-subtle: rgba(56,139,253,0.15);\n\n  --color-success-fg: #3fb950;\n  --color-success-emphasis: #238636;\n  --color-success-muted: rgba(46,160,67,0.4);\n  --color-success-subtle: rgba(46,160,67,0.15);\n\n  --color-attention-fg: #d29922;\n  --color-attention-emphasis: #9e6a03;\n  --color-attention-muted: rgba(187,128,9,0.4);\n  --color-attention-subtle: rgba(187,128,9,0.15);\n\n  --color-severe-fg: #db6d28;\n  --color-severe-emphasis: #bd561d;\n  --color-severe-muted: rgba(219,109,40,0.4);\n  --color-severe-subtle: rgba(219,109,40,0.15);\n\n  --color-danger-fg: #f85149;\n  --color-danger-emphasis: #da3633;\n  --color-danger-muted: rgba(248,81,73,0.4);\n  --color-danger-subtle: rgba(248,81,73,0.15);\n\n  --color-done-fg: #a371f7;\n  --color-done-emphasis: #8957e5;\n  --color-done-muted: rgba(163,113,247,0.4);\n  --color-done-subtle: rgba(163,113,247,0.15);  \n\n  --color-scale-black: #010409;\n  --color-scale-white: #f0f6fc;\n\n  --color-scale-gray-0: #f0f6fc;\n  --color-scale-gray-1: #c9d1d9;\n  --color-scale-gray-2: #b1bac4;\n  --color-scale-gray-3: #8b949e;\n  --color-scale-gray-4: #6e7681;\n  --color-scale-gray-5: #484f58;\n  --color-scale-gray-6: #30363d;\n  --color-scale-gray-7: #21262d;\n  --color-scale-gray-8: #161b22;\n  --color-scale-gray-9: #0d1117;  \n}\n</style>  \n  `\n}\n\nfunction reportGlobalStyles() {\n  return `\n<style>\n* {\n  box-sizing: border-box;\n  min-width: 0;\n  min-height: 0;\n  font-family: \"SF Mono\", Monaco, Consolas, \"Droid Sans Mono\", Inconsolata, \"Courier New\", monospace;\n  font-size: 13px;\n}\n\nhtml, body {\n  width: 100%;\n  height: 100%;\n  padding: 0;\n  margin: 0;\n  overscroll-behavior-x: none;\n}\n\nbody {\n  overflow: auto;\n  max-width: 1024px;\n  margin: 0 auto;\n  width: 100%;\n}\n\n#react-live-test-small-font {\n  font-size: 10px;\n}\n\nsvg {\n  fill: currentColor;\n}\n\n.mr-1 { margin-right: 4px; }\n.mr-2 { margin-right: 8px; }\n.mr-3 { margin-right: 16px; }\n.mr-4 { margin-right: 24px; }\n.mr-5 { margin-right: 32px; }\n\n.ml-1 { margin-left: 4px; }\n.ml-2 { margin-left: 8px; }\n.ml-3 { margin-left: 16px; }\n.ml-4 { margin-left: 24px; }\n.ml-5 { margin-left: 32px; }\n\n.p-1 { padding: 4px; }\n.p-2 { padding: 8px; }\n.p-3 { padding: 16px; }\n.p-4 { padding: 24px; }\n.p-5 { padding: 32px; }\n\n.px-1 { padding: 0 4px; }\n.px-2 { padding: 0 8px; }\n.px-3 { padding: 0 16px; }\n.px-4 { padding: 0 24px; }\n.px-5 { padding: 0 32px; }\n\n.py-1 { padding: 4px 0; }\n.py-2 { padding: 8px 0; }\n.py-3 { padding: 16px 0; }\n.py-4 { padding: 24px 0; }\n.py-5 { padding: 32px 0; }\n\n.float-left {\n  float: left !important;\n}\n\narticle, aside, details, figcaption, figure, footer, header, main, menu, nav, section {\n  display: block;\n}\n\nhtml,\nbody,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nspan,\np,\ndiv {\n  margin: 0;\n  padding: 0;\n}  \n\n</style>\n  `\n}\n\nfunction iconStyles() {\n  return `\n<style>\n.color-icon-success {\n  color: var(--color-success-fg) !important;\n}\n\n.color-text-danger {\n  color: var(--color-danger-fg) !important;\n}\n\n.color-text-warning {\n  color: var(--color-checks-step-warning-text) !important;\n}\n\n.color-fg-muted {\n  color: var(--color-fg-muted) !important;\n}\n\n.icon {\n  display: inline-block; \n  flex: none;   \n  margin-right: 0.5rem;\n  overflow: visible !important;\n  vertical-align: text-bottom;\n}\n\n</style>  \n  `\n}\n\nfunction reportNavbarStyles() {\n  return `\n<style>\n\n.report-navbar {\n  display: flex;\n  whitespace: nowrap;\n}\n\n.nav-item {\n  flex: none;\n  position: relative;\n  float: left;\n  padding: 5px 10px;\n  font-weight: 500;\n  line-height: 20px;\n  color: var(--color-fg-default);\n  color: var(--color-fg-subtle);\n  color: var(--color-fg-muted);\n  border: 1px solid var(--color-border-default);\n  cursor: pointer;\n  background-color: rgb(249, 249, 249);\n}\n\n.nav-item:hover, \n.nav-item.active {\n  background-color: var(--color-canvas-subtle);\n  color: white;\n}\n\n.nav-item:first-child {\n  border-top-left-radius: 6px;\n  border-bottom-left-radius: 6px;\n}\n\n.nav-item:last-child {\n  border-top-right-radius: 6px;\n  border-bottom-right-radius: 6px;\n}\n\n.nav-item + .subnav-item {\n  margin-left: -1px;\n}\n\n.counter {\n  display: inline-block;\n  min-width: 20px;\n  padding: 0 6px;\n  font-size: 12px;\n  font-weight: 500;\n  line-height: 18px;\n  color: var(--color-fg-default);\n  color: white;\n  text-align: center;\n  background-color: var(--color-neutral-muted);\n  border: 1px solid transparent;\n  border-radius: 2em;\n}\n\n.nav-item:hover .counter, \n.nav-item.active .counter {\n  color: var(--color-fg-default);\n  background-color: var(--color-neutral-muted);  \n}\n\n\n@media only screen and (max-width: 600px) {\n  .nav-item {\n    border-radius: 0 !important;\n  }\n\n  .nav-item {\n    padding: 5px 3px;\n    border: none;\n  }\n}  \n\n</style>\n  `\n}\n\nfunction expandableStyles() {\n  return `\n\n<style>\n.expandable { \n  background: white;\n}\n\n.expandable-header {\n  border: 1px solid var(--color-border-default);\n  border-top-left-radius: 6px;\n  border-top-right-radius: 6px;\n  background-color: var(--color-canvas-subtle);\n  padding: 0 8px;\n  border-bottom: none;\n  margin-top: 24px;\n  font-weight: 600;\n  line-height: 38px;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  color: white;\n}\n\n.expandable-header.expanded-false {\n  border: 1px solid var(--color-border-default);\n  border-radius: 6px;\n}\n\n.expandable-header.expanded-false,\n.expandable-header.expanded-true {\n  cursor: pointer;\n}\n\n.expandable-body {\n  border: 1px solid var(--color-border-default);\n  border-bottom-left-radius: 6px;\n  border-bottom-right-radius: 6px;\n  padding: 16px;\n}\n\n.expandable-body-no-insets {\n  padding: 0;\n}\n\n@media only screen and (max-width: 600px) {\n  .expandable-header {\n    border-radius: 0;\n    border-right: none;\n    border-left: none;\n  }\n\n  .expandable-body {\n    border-radius: 0;\n    border-right: none;\n    border-left: none;\n    padding: 8px;\n  }\n\n  .expandable-body-no-insets {\n    padding: 0; \n  }\n}\n\n</style>    \n  `\n}\n\n// function chipStyles() {\n//   return `\n\n// <style>\n// .chip {\n//   background: white;\n// }\n\n// .chip-header {\n//   border: 1px solid var(--color-border-default);\n//   border-top-left-radius: 6px;\n//   border-top-right-radius: 6px;\n//   background-color: var(--color-canvas-subtle);\n//   padding: 0 8px;\n//   border-bottom: none;\n//   margin-top: 24px;\n//   font-weight: 600;\n//   line-height: 38px;\n//   white-space: nowrap;\n//   overflow: hidden;\n//   text-overflow: ellipsis;\n//   color: white;\n// }\n\n// .chip-header.expanded-false {\n//   border: 1px solid var(--color-border-default);\n//   border-radius: 6px;\n// }\n\n// .chip-header.expanded-false,\n// .chip-header.expanded-true {\n//   cursor: pointer;\n// }\n\n// .chip-body {\n//   border: 1px solid var(--color-border-default);\n//   border-bottom-left-radius: 6px;\n//   border-bottom-right-radius: 6px;\n//   padding: 16px;\n// }\n\n// .chip-body-no-insets {\n//   padding: 0;\n// }\n\n// @media only screen and (max-width: 600px) {\n//   .chip-header {\n//     border-radius: 0;\n//     border-right: none;\n//     border-left: none;\n//   }\n\n//   .chip-body {\n//     border-radius: 0;\n//     border-right: none;\n//     border-left: none;\n//     padding: 8px;\n//   }\n\n//   .chip-body-no-insets {\n//     padding: 0;\n//   }\n// }\n\n// </style>\n//   `\n// }\n\nfunction testResultStyles() {\n  return `\n\n<style>\n\n.test-case {\n  height: 38px;\n  line-height: 38px;\n  align-items: center;\n  padding: 0 10px;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  cursor: pointer;\n}\n\n.test-case:hover {\n  background-color: var(--color-canvas-subtle);\n  color: white;\n}\n\n.test-case-desc {\n  padding: 0 0 0 8px;\n  color: var(--color-fg-muted);\n}\n\n.test-case-outcome-skipped {\n  color: var(--color-fg-muted);\n}\n\n.test-case:not(:first-child) {\n  border-top: 1px solid var(--color-border-default);\n}\n\n</style>  \n  `\n}\n\nfunction errorMessageBoxStyles() {\n  return `\n<style>\n.success-message-box-wrapper {\n  border-top: solid 1px rgba(222, 222, 222, 0.9);\n  padding: 8px;  \n}\n\n.error-message-box-wrapper {\n  border-top: solid 1px rgba(222, 222, 222, 0.9);\n  padding: 4px 0;\n}\n.error-message-box {\n  padding: 4px 8px;\n  display: flex; \n  flex-direction: column;\n  gap: 0.75rem;\n  max-width: 100%;\n}\n.error-message-box .title {\n  font-weight: bold;\n  text-transform: uppercase;\n}  \n.error-message-box .italic {\n  font-style: italic;\n}    \n.error-message-box .underline {\n  text-decoration: underline;\n}      \n.error-message-box .dim {\n  color: var(--color-scale-gray-2);\n}\n.error-message-box .error-text.test-name {\n  text-decoration: red wavy underline;\n}\n.error-message-box .error-text.suite-name {\n  font-weight: bold;\n}\n</style>  \n  `\n}\n\nfunction reportStyles() {\n  return `\n\n<style>\n.htmlreport {\n  position: relative;\n  background: white;\n  background: rgb(248, 249, 253);\n  height: 100%;\n  height: 100vh;\n  overflow-y: scroll;\n  border-left: solid 1px #cecece;\n  padding-bottom: 1rem;\n  padding: 1.5rem;\n  display: flex;\n  flex-direction: column;\n  flex: auto;\n}\n.htmlreport .report-close-icon {\n  position: absolute;\n  top: 5px;\n  right: 5px;\n  cursor: pointer;\n}\nspan.html-colored-formatter {\n  /* word-wrap: break-word; */\n  overflow-wrap: break-word;\n}\nspan.pretty {\n  word-break: break-word;\n}\n.suites {\n  padding-bottom: 1rem;\n}\n@media only screen and (max-width: 600px) {\n  .report {\n    padding: 0 !important;\n  }\n}  \n</style>\n  `\n}\n\nfunction loaderStyles() {\n  return `\n\n<style>\n.regular-loading .loader {\n  margin: auto;\n  width: 60px;\n  height: 50px;\n  font-size: 10px;\n  top: calc(50% - 25px);\n  position: relative;\n}\n\n.regular-loading .loader>span {\n  height: 100%;\n  width: 5px;\n  display: block;\n  float: left;\n  margin: 0 7.5px;\n  margin-bottom: 0.6em;\n  animation: loader-animation-red 1.2s infinite ease-in-out;\n}\n\n.regular-loading .loader span:nth-child(2) {\n  animation-delay: -1s;\n}\n\n.regular-loading .loader span:nth-child(3) {\n  animation-delay: -0.8s;\n}\n\n@keyframes loader-animation-red {\n\n  0%,\n  20% {\n      background-color: #999999;\n      transform: scaleY(0.6);\n      -webkit-transform: scaleY(0.6);\n  }\n\n  50% {\n      background-color: #cc0000;\n      transform: scaleY(1.5);\n      -webkit-transform: scaleY(1.5);\n  }\n\n  100% {\n      background-color: #999999;\n      transform: scaleY(0.6);\n      -webkit-transform: scaleY(0.6);\n  }\n}\n</style>    \n  `\n}\n\nexport function createHead() {\n  return `\n<head>\n\n${rootStyles()}\n\n${reportGlobalStyles()}\n\n${iconStyles()}\n\n${reportNavbarStyles()}\n\n${expandableStyles()}\n\n${testResultStyles()}\n\n${errorMessageBoxStyles()}\n\n${reportStyles()}\n\n${loaderStyles()}\n\n</head>\n  `\n}\n","import * as React from \"react\"\n\nlet doc: Document | undefined\nlet win: Window | undefined\nif (typeof document !== \"undefined\") {\n  doc = document\n}\nif (typeof window !== \"undefined\") {\n  win = window\n}\n\nexport const FrameContext = React.createContext({ document: doc, window: win, initialized: 0 })\n\nexport const useFrame = () => React.useContext(FrameContext)\n\nexport const { Provider: FrameContextProvider, Consumer: FrameContextConsumer } = FrameContext\n","import { type Dispatch, type SetStateAction, useCallback, useEffect, useRef, useState } from \"react\"\nimport { useEventListener } from \"./use-event-listener\"\nimport { parseJSON } from \"../utils\"\n\ntype SetValue<T> = Dispatch<SetStateAction<T>>\n\nexport function useLocalStorage<T>(key: string, initialValue: T): [T, SetValue<T>] {\n  const readValue = useCallback((): T => {\n    if (typeof window === \"undefined\") {\n      return initialValue\n    }\n\n    try {\n      const item = window.localStorage.getItem(key)\n      return item ? (parseJSON(item) as T) : initialValue\n    } catch (error) {\n      console.warn(`Error reading localStorage key “${key}”:`, error)\n      return initialValue\n    }\n  }, [initialValue, key])\n\n  const [storedValue, setStoredValue] = useState<T>(readValue())\n\n  const setValueRef = useRef<SetValue<T>>()\n\n  setValueRef.current = (value) => {\n    if (typeof window == \"undefined\") {\n      console.warn(`Tried setting localStorage key “${key}” even though environment is not a client`)\n    }\n\n    try {\n      const newValue = value instanceof Function ? value(storedValue) : value\n      window.localStorage.setItem(key, JSON.stringify(newValue))\n      setStoredValue(newValue)\n    } catch (error) {\n      console.warn(`Error setting localStorage key “${key}”:`, error)\n    }\n  }\n\n  const setValue: SetValue<T> = useCallback((value) => setValueRef.current?.(value), [])\n\n  useEffect(() => {\n    setStoredValue(readValue())\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [])\n\n  const handleStorageChange = useCallback(() => {\n    setStoredValue(readValue())\n  }, [readValue])\n\n  useEventListener(\"storage\", handleStorageChange)\n\n  return [storedValue, setValue]\n}\n","import * as React from \"react\"\nimport type { TestSuiteMapping, ReportResults, AnyFunction } from \"../types\"\nimport * as microwave from \"react-microwave\"\nimport { useDebouncedCallback } from \"./use-debounced-callback\"\n\nexport interface UseExecuteTestSuitesContext {\n  report: Partial<ReportResults>\n  testsAreRunning: boolean\n}\n\nexport interface UseExecuteTestSuitesParams {\n  testSuites?: TestSuiteMapping\n  RootComponent?: React.ElementType\n  config?: microwave.MicrowaveConfig\n}\n\nlet testsRun = 0\n\nfunction registerCallbackOnViteHMREvent(cb: AnyFunction = () => {}, config: microwave.MicrowaveConfig = {}) {\n  if (import.meta.hot) {\n    if (config?.debug) console.log(\"[REACT-INSTANT-NOODLES]: hot\", { data: import.meta.hot?.data })\n    import.meta.hot.on(\"vite:beforeUpdate\", (data: any) => {\n      if (config?.debug) console.log(\"[REACT-INSTANT-NOODLES]:VITE HMR Data\", { data })\n      cb(data)\n    })\n  }\n}\n\n// TODO: Implement this correctly for webpack\nfunction registerCallbackOnWebackHMREvent(cb: AnyFunction = () => {}, config: microwave.MicrowaveConfig = {}) {\n  if (import.meta.hot) {\n    if (config?.debug) console.log(\"[REACT-INSTANT-NOODLES]: hot\", { data: import.meta.hot?.data })\n    import.meta.hot.on(\"webpack:beforeUpdate\", (data: any) => {\n      if (config?.debug) console.log(\"[REACT-INSTANT-NOODLES]: WEBPACK HMR Data\", { data })\n      cb(data)\n    })\n  }\n}\n\nexport function useExecuteCallbackOnHMR(cb: AnyFunction = () => {}, config: microwave.MicrowaveConfig = {}) {\n  const [init, setInit] = React.useState(false)\n  const listener = React.useRef<AnyFunction | null>(null)\n\n  // eslint-disable-next-line\n  React.useEffect(() => {\n    if (!init) {\n      if (config?.debug) console.log(\"[REACT-INSTANT-NOODLES]: HMR callback handler initialized\")\n      registerCallbackOnViteHMREvent(cb, config)\n      registerCallbackOnWebackHMREvent(cb, config)\n      listener.current = cb\n      setInit(true)\n    }\n  })\n}\n\nexport async function executedTestsResults({ testSuites, RootComponent }: Omit<UseExecuteTestSuitesParams, \"runs\">) {\n  if (!RootComponent) {\n    // console.log(`[REACT-INSTANT-NOODLES]: No RootComponent provided. Skipping test execution.`)\n    // console.log(`[REACT-INSTANT-NOODLES]: No RootComponent provided.`)\n    // return null\n  }\n\n  for (const testSuiteName in testSuites) {\n    const testSuite = testSuites[testSuiteName]\n    const register = testSuite(RootComponent!)\n    if (!register) {\n      console.log(\n        `[REACT-INSTANT-NOODLES]: No suite object returned for ${testSuiteName}. Skipping tests for ${testSuiteName}.`\n      )\n      continue\n    }\n    // auto register test suites in case the user forgot to do it\n    register.run()\n  }\n\n  const results = await microwave.exec()\n\n  return results.toJson()\n}\n\nexport function useExecuteTestSuites({\n  testSuites,\n  RootComponent,\n  config,\n}: UseExecuteTestSuitesParams): UseExecuteTestSuitesContext {\n  const [testsAreRunning, setTestsAreRunning] = React.useState(false)\n  const [reportResults, setReportResults] = React.useState<Partial<ReportResults>>({})\n  const timeout = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n\n  const debouncedExecuteTests = useDebouncedCallback(() => {\n    const runTests = async () => {\n      setTestsAreRunning(true)\n      const results = await executedTestsResults({ testSuites, RootComponent })\n      setReportResults((s) => ({ ...s, ...results }))\n      testsRun++\n      if (config?.debug) console.log(`[REACT-INSTANT-NOODLES]: TEST RUNS ${testsRun}`)\n      setTestsAreRunning(false)\n    }\n\n    runTests()\n  }, 50)\n\n  React.useEffect(() => {\n    // TODO: Improve this debounced double test execution to force a report render\n    setTimeout(() => {\n      debouncedExecuteTests()\n    }, 150)\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [])\n\n  // // TODO: Find a better way to do this\n  useExecuteCallbackOnHMR((data) => {\n    if (config?.debug)\n      console.log({ message: \"[REACT-INSTANT-NOODLES]: Creating timeout to execute tests after HMR\", data })\n    // give the hot module reload time to update the module\n    // before running the tests\n    if (timeout.current) {\n      clearTimeout(timeout.current)\n    }\n    timeout.current = setTimeout(() => {\n      if (config?.debug) console.log(\"[REACT-INSTANT-NOODLES]: Running tests after HMR\")\n      debouncedExecuteTests()\n    }, 100)\n  }, config)\n\n  return { report: reportResults, testsAreRunning }\n}\n","import { useRef, useEffect, useMemo } from \"react\"\n\nexport interface CallOptions {\n  leading?: boolean\n  trailing?: boolean\n}\n\nexport interface Options extends CallOptions {\n  maxWait?: number\n}\n\nexport interface ControlFunctions {\n  cancel: () => void\n  flush: () => void\n  isPending: () => boolean\n}\n\n/**\n * Subsequent calls to the debounced function `debounced.callback` return the result of the last func invocation.\n * Note, that if there are no previous invocations it's mean you will get undefined. You should check it in your code properly.\n */\nexport interface DebouncedState<T extends (...args: any[]) => ReturnType<T>> extends ControlFunctions {\n  (...args: Parameters<T>): ReturnType<T> | undefined\n}\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked, or until the next browser frame is drawn. The debounced function\n * comes with a `cancel` method to cancel delayed `func` invocations and a\n * `flush` method to immediately invoke them. Provide `options` to indicate\n * whether `func` should be invoked on the leading and/or trailing edge of the\n * `wait` timeout. The `func` is invoked with the last arguments provided to the\n * debounced function. Subsequent calls to the debounced function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * If `wait` is omitted in an environment with `requestAnimationFrame`, `func`\n * invocation will be deferred until the next frame is drawn (typically about\n * 16ms).\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `debounce` and `throttle`.\n *\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0]\n *  The number of milliseconds to delay; if omitted, `requestAnimationFrame` is\n *  used (if available, otherwise it will be setTimeout(...,0)).\n * @param {Object} [options={}] The options object.\n *  Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.leading=false]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {number} [options.maxWait]\n *  Specify invoking on the trailing edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * const resizeHandler = useDebouncedCallback(calculateLayout, 150);\n * window.addEventListener('resize', resizeHandler)\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * const clickHandler = useDebouncedCallback(sendMail, 300, {\n *   leading: true,\n *   trailing: false,\n * })\n * <button onClick={clickHandler}>click me</button>\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * const debounced = useDebouncedCallback(batchLog, 250, { 'maxWait': 1000 })\n * const source = new EventSource('/stream')\n * source.addEventListener('message', debounced)\n *\n * // Cancel the trailing debounced invocation.\n * window.addEventListener('popstate', debounced.cancel)\n *\n * // Check for pending invocations.\n * const status = debounced.pending() ? \"Pending...\" : \"Ready\"\n */\nexport function useDebouncedCallback<T extends (...args: any[]) => ReturnType<T>>(\n  func: T,\n  wait?: number,\n  options?: Options\n): DebouncedState<T> {\n  const lastCallTime = useRef(null)\n  const lastInvokeTime = useRef(0)\n  const timerId = useRef(null)\n  const lastArgs = useRef<unknown[]>([])\n  const lastThis = useRef<unknown>()\n  const result = useRef<ReturnType<T>>()\n  const funcRef = useRef(func)\n  const mounted = useRef(true)\n\n  funcRef.current = func\n\n  // Bypass `requestAnimationFrame` by explicitly setting `wait=0`.\n  const useRAF = !wait && wait !== 0 && typeof window !== \"undefined\"\n\n  if (typeof func !== \"function\") {\n    throw new TypeError(\"Expected a function\")\n  }\n\n  // @ts-ignore\n  wait = +wait || 0\n  options = options || {}\n\n  const leading = !!options.leading\n  const trailing = \"trailing\" in options ? !!options.trailing : true // `true` by default\n  const maxing = \"maxWait\" in options\n  // @ts-ignore\n  const maxWait = maxing ? Math.max(+options.maxWait || 0, wait) : null\n\n  useEffect(() => {\n    mounted.current = true\n    return () => {\n      mounted.current = false\n    }\n  }, [])\n\n  // You may have a question, why we have so many code under the useMemo definition.\n  //\n  // This was made as we want to escape from useCallback hell and\n  // not to initialize a number of functions each time useDebouncedCallback is called.\n  //\n  // It means that we have less garbage for our GC calls which improves performance.\n  // Also, it makes this library smaller.\n  //\n  // And the last reason, that the code without lots of useCallback with deps is easier to read.\n  // You have only one place for that.\n  const debounced = useMemo(() => {\n    const invokeFunc = (time: number) => {\n      const args = lastArgs.current\n      const thisArg = lastThis.current\n      // @ts-ignore\n      lastArgs.current = lastThis.current = null\n      lastInvokeTime.current = time\n      return (result.current = funcRef.current.apply(thisArg, args))\n    }\n\n    const startTimer = (pendingFunc: () => void, wait: number) => {\n      // @ts-ignore\n      if (useRAF) cancelAnimationFrame(timerId.current)\n      // @ts-ignore\n      timerId.current = useRAF ? requestAnimationFrame(pendingFunc) : setTimeout(pendingFunc, wait)\n    }\n\n    const shouldInvoke = (time: number) => {\n      if (!mounted.current) return false\n      // @ts-ignore\n      const timeSinceLastCall = time - lastCallTime.current\n      const timeSinceLastInvoke = time - lastInvokeTime.current\n\n      // Either this is the first call, activity has stopped and we're at the\n      // trailing edge, the system time has gone backwards and we're treating\n      // it as the trailing edge, or we've hit the `maxWait` limit.\n      return (\n        !lastCallTime.current ||\n        // @ts-ignore\n        timeSinceLastCall >= wait ||\n        timeSinceLastCall < 0 ||\n        // @ts-ignore\n        (maxing && timeSinceLastInvoke >= maxWait)\n      )\n    }\n\n    const trailingEdge = (time: number) => {\n      timerId.current = null\n\n      // Only invoke if we have `lastArgs` which means `func` has been\n      // debounced at least once.\n      if (trailing && lastArgs.current) {\n        return invokeFunc(time)\n      }\n      // @ts-ignore\n      lastArgs.current = lastThis.current = null\n      return result.current\n    }\n\n    const timerExpired = () => {\n      const time = Date.now()\n      if (shouldInvoke(time)) {\n        return trailingEdge(time)\n      }\n      // https://github.com/xnimorz/use-debounce/issues/97\n      if (!mounted.current) {\n        return\n      }\n      // Remaining wait calculation\n      // @ts-ignore\n      const timeSinceLastCall = time - lastCallTime.current\n      const timeSinceLastInvoke = time - lastInvokeTime.current\n      // @ts-ignore\n      const timeWaiting = wait - timeSinceLastCall\n      // @ts-ignore\n      const remainingWait = maxing ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting\n\n      // Restart the timer\n      startTimer(timerExpired, remainingWait)\n    }\n\n    const func: DebouncedState<T> = (...args: Parameters<T>): ReturnType<T> => {\n      const time = Date.now()\n      const isInvoking = shouldInvoke(time)\n\n      lastArgs.current = args\n      // @ts-ignore\n      lastThis.current = this\n      // @ts-ignore\n      lastCallTime.current = time\n\n      if (isInvoking) {\n        if (!timerId.current && mounted.current) {\n          // Reset any `maxWait` timer.\n          // @ts-ignore\n          lastInvokeTime.current = lastCallTime.current\n          // Start the timer for the trailing edge.\n          // @ts-ignore\n          startTimer(timerExpired, wait)\n          // Invoke the leading edge.\n          // @ts-ignore\n          return leading ? invokeFunc(lastCallTime.current) : result.current\n        }\n        if (maxing) {\n          // Handle invocations in a tight loop.\n          // @ts-ignore\n          startTimer(timerExpired, wait)\n          // @ts-ignore\n          return invokeFunc(lastCallTime.current)\n        }\n      }\n      if (!timerId.current) {\n        // @ts-ignore\n        startTimer(timerExpired, wait)\n      }\n      // @ts-ignore\n      return result.current\n    }\n\n    func.cancel = () => {\n      if (timerId.current) {\n        useRAF ? cancelAnimationFrame(timerId.current) : clearTimeout(timerId.current)\n      }\n      lastInvokeTime.current = 0\n      // @ts-ignore\n      lastArgs.current = lastCallTime.current = lastThis.current = timerId.current = null\n    }\n\n    func.isPending = () => {\n      return !!timerId.current\n    }\n\n    func.flush = () => {\n      return !timerId.current ? result.current : trailingEdge(Date.now())\n    }\n\n    return func\n  }, [leading, maxing, wait, maxWait, trailing, useRAF])\n\n  return debounced\n}\n","export const MICROWAVE_LIVE_REPORT_ROOT_DIV_ID = `microwave-report-div-root`\nexport const MICROWAVE_IFRAME_ID = `microwave-iframe`\n","import * as React from \"react\"\n\nimport type {\n  AnyFunction,\n  SerializedMockState,\n  SerializedMockStateHandlers,\n  IMockState,\n  IMockStateValues,\n  IMockStateHandlers,\n  MockStateContextProps,\n} from \"../types\"\n\ntype PartialSerializedMockState<StateValues, StateHandlers> = Partial<\n  SerializedMockState<StateValues, StateHandlers>\n> & {\n  __updater: AnyFunction\n}\n\nexport class MockStateValues<StateValues> implements IMockStateValues<StateValues> {\n  public __defaultState: StateValues\n\n  constructor(defaultValues: StateValues) {\n    this.__defaultState = {\n      ...defaultValues,\n    }\n  }\n\n  serialize() {\n    return {\n      ...this.__defaultState,\n    }\n  }\n}\n\nexport class MockStateHandlers<StateHandlers extends Record<string, AnyFunction>>\n  implements IMockStateHandlers<StateHandlers>\n{\n  public __handlers: StateHandlers\n  private __forceUpdateHasBeenSet: boolean = false\n\n  constructor(handlers: StateHandlers) {\n    this.__handlers = {\n      ...handlers,\n    }\n  }\n\n  __updater(forceUpdater: AnyFunction) {\n    forceUpdater()\n  }\n\n  __forceUpdateFn() {\n    // force a re-render due to state updates\n  }\n\n  __setForceUpdater(fn: AnyFunction) {\n    this.__forceUpdateFn = () => fn()\n    this.__forceUpdateHasBeenSet = true\n  }\n\n  serialize() {\n    const handlers = {\n      ...this.__handlers,\n      __forceUpdateHasBeenSet: this.__forceUpdateHasBeenSet,\n      __setForceUpdater(...args: any) {\n        const fn = args[0]\n        this.__forceUpdateFn = () => fn()\n        this.__forceUpdateHasBeenSet = true\n      },\n    } as SerializedMockStateHandlers<StateHandlers>\n\n    handlers.__forceUpdateFn = this.__forceUpdateFn\n    handlers.__updater = this.__updater as AnyFunction\n\n    return handlers\n  }\n}\n\nexport class MockState<StateValues, StateHandlers extends Record<string, AnyFunction>>\n  implements IMockState<StateValues, StateHandlers>\n{\n  public state: MockStateValues<StateValues>\n  public handlers: MockStateHandlers<StateHandlers>\n\n  constructor(state: StateValues, handlers: StateHandlers) {\n    this.state = new MockStateValues(state)\n    this.handlers = new MockStateHandlers(handlers)\n  }\n\n  serialize() {\n    const state = this.state.serialize()\n    const handlers = this.handlers.serialize()\n\n    const serializedMockState = {\n      ...state,\n      ...handlers,\n      __mockSetState<K extends keyof StateValues, V>(\n        fnOrValue: V extends AnyFunction ? (state: StateValues[K]) => any : any,\n        attr: K\n      ) {\n        if (!this.hasOwnProperty(attr)) {\n          console.log(`MockState does not have a property named ${String(attr)}`)\n          return\n        }\n\n        this[attr] = typeof fnOrValue === \"function\" ? fnOrValue((this as any)[attr] as StateValues[K]) : fnOrValue\n        this.__updater(this.__forceUpdateFn)\n      },\n    } as PartialSerializedMockState<StateValues, StateHandlers>\n\n    for (const key in handlers) {\n      ;(serializedMockState as any)[key] =\n        typeof handlers[key] === \"function\" ? handlers[key].bind(serializedMockState) : handlers[key]\n    }\n\n    return serializedMockState as SerializedMockState<StateValues, StateHandlers>\n  }\n}\n\nexport function MockStateContext<StateValues, StateHandlers>({\n  defaultMockState,\n  unmountCallback,\n  ...props\n}: MockStateContextProps<StateValues, StateHandlers>) {\n  const [, forceUpdate] = React.useState(0)\n  const mockState = React.useRef(defaultMockState)\n  const onUnmount = React.useRef(unmountCallback)\n\n  React.useEffect(() => {\n    const dismountCallback = onUnmount.current\n    mockState.current?.__setForceUpdater?.(() => forceUpdate((r) => r + 1))\n\n    return () => {\n      dismountCallback?.()\n    }\n  }, [])\n\n  return (\n    <React.Fragment>\n      <>{props.children({ mockState: mockState.current })}</>\n    </React.Fragment>\n  )\n}\n","import type { RenderUi } from \"../types\"\nimport * as React from \"react\"\nimport * as parseUtils from \"../utils/parse-utils\"\nimport * as ReactTestRenderer from \"react-test-renderer\"\nimport * as constants from \"../constants\"\n\nimport {\n  render as rtlRender,\n  fireEvent,\n  waitFor,\n  screen,\n  queries,\n  within,\n  waitForElementToBeRemoved,\n  cleanup,\n  configure,\n  queryHelpers,\n  createEvent,\n  prettyFormat,\n  prettyDOM,\n  buildQueries,\n  getSuggestedQuery,\n  getConfig,\n  isInaccessible,\n  logDOM,\n  logRoles,\n  getElementError,\n} from \"@testing-library/react\"\nimport { assert, exec, type IMicrowaveSuite, suite, updateConfig } from \"react-microwave\"\n\nconst htmlDocumentString = `<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\" />\n    <title>React Challenges</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n  </head>\n  <body>\n    <main></main>\n  </body>\n</html>`\n\nconst documentCache: { doc: Document | null } = {\n  doc: null,\n}\n\nconst createHtmlDocumentShim = (html = htmlDocumentString) => {\n  if (!documentCache.doc) {\n    documentCache.doc = new window.DOMParser().parseFromString(html, \"text/html\")\n    if (!documentCache.doc?.defaultView) {\n      let newWindow\n      let existingIframeEl = window.document.getElementById(constants.MICROWAVE_IFRAME_ID)\n      if (!existingIframeEl) {\n        const iframeEl = window.document.createElement(\"iframe\")\n        iframeEl.setAttribute(\"id\", constants.MICROWAVE_IFRAME_ID)\n        iframeEl.setAttribute(\"style\", \"display: none\")\n        window.document.body.appendChild(iframeEl)\n        newWindow = iframeEl.contentWindow ?? iframeEl.contentDocument?.defaultView\n      }\n\n      const defaultView = newWindow ?? window\n\n      Object.defineProperty(documentCache.doc, \"defaultView\", {\n        value: defaultView,\n      })\n    }\n  }\n\n  return documentCache.doc\n}\n\nconst createResetFunction = (dummyDocument: Document) => {\n  function reset() {\n    dummyDocument.title = \"\"\n    dummyDocument.head.innerHTML = `<meta charset=\"utf-8\" />\n  <title>React Challenges</title>\n  <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />`\n    dummyDocument.body.innerHTML = \"<main></main>\"\n  }\n\n  return reset\n}\n\nconst createRenderFunction = (dummyDocument: Document) => {\n  function render(ui: React.ReactElement, options = {}): ReturnType<typeof rtlRender> {\n    const Wrapper = ({ children }: { children: RenderUi }) => <React.Fragment>{children}</React.Fragment>\n    return rtlRender(ui, {\n      container: dummyDocument.querySelector(\"main\") as HTMLElement,\n      wrapper: Wrapper,\n      ...options,\n    })\n  }\n\n  return render\n}\n\nfunction configureMicrowave(dummyDocument: Document) {\n  const reset = createResetFunction(dummyDocument)\n\n  const wrappedSuite = (name: string): IMicrowaveSuite => {\n    const testSuite = suite(name) as IMicrowaveSuite\n    // ensure the document is reset after each test\n    testSuite.after.each?.(() => {\n      reset()\n      cleanup()\n    })\n\n    // return the original test suite\n    return testSuite\n  }\n\n  return {\n    assert,\n    exec,\n    suite: wrappedSuite,\n    updateConfig,\n  }\n}\n\nexport function configureSpecSuite() {\n  const dummyDocument = createHtmlDocumentShim()\n  const render = createRenderFunction(dummyDocument)\n  const microwave = configureMicrowave(dummyDocument)\n\n  return {\n    render,\n    fireEvent,\n    waitFor,\n    screen,\n    queries,\n    within,\n    waitForElementToBeRemoved,\n    cleanup,\n    configure,\n    queryHelpers,\n    createEvent,\n    prettyFormat,\n    prettyDOM,\n    buildQueries,\n    getSuggestedQuery,\n    getConfig,\n    isInaccessible,\n    logDOM,\n    logRoles,\n    getElementError,\n    reactTestRenderer: {\n      create: ReactTestRenderer.create,\n      act: ReactTestRenderer.act,\n    },\n    parseUtils,\n    dummyDocument,\n    ...microwave,\n  }\n}\n","import * as React from \"react\"\nimport * as ReactTestRenderer from \"react-test-renderer\"\nimport { configureSpecSuite } from \"./spec-setup\"\nimport * as microwave from \"react-microwave\"\nimport type { GetTestInstancesForRootParams, AnyFunction } from \"../types\"\nimport { noop } from \"../utils\"\n\nexport type Types = \"string\" | \"number\" | \"boolean\" | \"object\" | \"undefined\" | \"function\"\n\nexport type SpecSuite = ReturnType<typeof configureSpecSuite>\n\nexport class TestInstancePropAssertions {\n  public componentName: string\n  public component: ReactTestRenderer.ReactTestInstance\n  private assert: any\n\n  constructor(component: ReactTestRenderer.ReactTestInstance, componentName: string, specSuite: SpecSuite) {\n    this.component = component\n    this.componentName = componentName\n    this.assert = specSuite.assert as typeof microwave.assert\n  }\n\n  getComponentProps = () => this.component?.props ?? {}\n\n  getProp = (propName: string) => this.getComponentProps()?.[propName]\n\n  assertComponentExistsAndHasProps = () => {\n    this.assert.ok(\n      this.component?.props,\n      `The \\`${this.componentName}\\` component should exist and have a valid \\`props\\` object.`\n    )\n  }\n\n  assertComponentExistsAndHasValueInProps = (propName: string) => {\n    this.assert.ok(\n      propName in this.getComponentProps(),\n      `The \\`${this.componentName}\\` component should have a valid \\`${propName}\\` prop.`\n    )\n  }\n\n  assertComponentExistsAndHasPropOfType = (propName: string, propType: Types) => {\n    const prop = this.getProp(propName)\n    this.assert.type(\n      prop,\n      propType,\n      `The \\`${this.componentName}\\` component should have a \\`${propName}\\` prop that is a \\`${propType}\\`.` +\n        ` [ACTUAL TYPE: ${typeof prop}]`\n    )\n  }\n\n  assertComponentExistsAndHasPropWithValue = (propName: string, propValue: any) => {\n    const prop = this.getProp(propName)\n    this.assert.equal(\n      prop,\n      propValue,\n      `The \\`${this.componentName}\\` component should have a \\`${propName}\\` prop with a value of \\`${propValue}\\`.` +\n        ` [ACTUAL: ${prop}]`\n    )\n  }\n\n  assertComponentExistsAndHasPropWithAttributeOfType = ({\n    propName,\n    attributeName,\n    attributeType,\n  }: {\n    propName: string\n    attributeName: string\n    attributeType: Types\n  }) => {\n    const prop = this.getProp(propName)\n    this.assert.ok(\n      attributeName in prop,\n      `The \\`${this.componentName}\\` component should have a \\`${propName}\\` prop with a \\`${attributeName}\\` attribute.` +\n        ` [ACTUAL: ${this.getComponentProps()}]`\n    )\n\n    const attr = prop[attributeName]\n    this.assert.type(\n      attr,\n      attributeType,\n      `The \\`${this.componentName}\\` component should have a \\`${propName}\\` prop` +\n        ` containing the \\`${attributeName}\\` attribute of type \\`${attributeType}\\`.` +\n        ` [ACTUAL TYPE: ${typeof attr}]`\n    )\n  }\n}\n\nexport const createTestInstanceRoot = (\n  RootComponent: React.ComponentType<any>,\n  reactTestRenderer: typeof ReactTestRenderer\n) => {\n  let testRenderer: ReactTestRenderer.ReactTestRenderer\n\n  try {\n    // reactTestRenderer.act(() => {\n    testRenderer = reactTestRenderer.create(<RootComponent />)\n    // })\n    const root = testRenderer?.root\n    return root\n  } catch (e) {\n    console.log({ e })\n    return null\n  }\n}\n\nconst nodeMatchesComponentName = (node: ReactTestRenderer.ReactTestInstance, componentName: string) =>\n  (node?.type as any)?.name === componentName || (node?.type as any).displayName === componentName\n\nexport const getTestInstancesForRoot = (\n  { RootComponent, singleComponentNames = [], multiComponentNames = [] }: GetTestInstancesForRootParams,\n  specSuite: SpecSuite,\n  config?: Partial<microwave.MicrowaveConfig>\n) => {\n  const rootInstance = createTestInstanceRoot(RootComponent, specSuite.reactTestRenderer)\n  if (!rootInstance) return {}\n\n  const result = { root: rootInstance }\n\n  const singleComponentFibers = (singleComponentNames ?? []).reduce((acc, componentName) => {\n    try {\n      const componentTestInstance = rootInstance.find((node) => nodeMatchesComponentName(node, componentName))\n      return { ...acc, [componentName]: componentTestInstance }\n    } catch (e) {\n      if (config?.debug) console.log({ e, componentName })\n      return acc\n    }\n  }, {} as Record<string, ReactTestRenderer.ReactTestInstance>)\n\n  const singleComponentAssertions = Object.fromEntries(\n    Object.entries(singleComponentFibers).map(([componentName, componentTestInstance]) => {\n      return [componentName, new TestInstancePropAssertions(componentTestInstance, componentName, specSuite)]\n    })\n  )\n\n  const multiComponentFibers = (multiComponentNames ?? []).reduce((acc, multiComponentName) => {\n    try {\n      const componentTestInstance = rootInstance.findAll((node) => nodeMatchesComponentName(node, multiComponentName))\n      return { ...acc, [multiComponentName]: componentTestInstance }\n    } catch (e) {\n      if (config?.debug) console.log({ e, multiComponentName })\n      return acc\n    }\n  }, {} as Record<string, ReactTestRenderer.ReactTestInstance[]>)\n\n  const multiComponentAssertions = Object.fromEntries(\n    Object.entries(multiComponentFibers).map(([componentName, componentTestInstanceArray]) => {\n      return [\n        componentName,\n        componentTestInstanceArray.map(\n          (componentTestInstance) => new TestInstancePropAssertions(componentTestInstance, componentName, specSuite)\n        ),\n      ]\n    })\n  )\n\n  return {\n    ...result,\n    ...singleComponentFibers,\n    ...multiComponentFibers,\n    propAssertions: {\n      ...singleComponentAssertions,\n      ...multiComponentAssertions,\n    },\n  }\n}\n\nexport function buildProxy(obj: Record<string, any>, func?: AnyFunction) {\n  const fn = func ?? noop\n\n  const proxy = new Proxy(obj, {\n    get(target, prop) {\n      if (typeof target[prop as string] === \"function\") {\n        return new Proxy(target[prop as string], {\n          apply: (target, thisArg, argumentsList) => {\n            fn(prop, argumentsList)\n            return Reflect.apply(target, thisArg, argumentsList)\n          },\n        })\n      } else {\n        return Reflect.get(target, prop)\n      }\n    },\n  })\n\n  return proxy\n}\n"]}