{
  "version": 3,
  "sources": ["../../src/modules/base-page/components/BasePage/BasePage.tsx", "../../src/modules/scroll-to-top/ScrollToTop.tsx", "../../src/modules/scroll-to-top/ScrollToTopButton.tsx", "../../src/modules/base-page/contexts/LoadStatus/Context.ts", "../../src/modules/base-page/contexts/LoadStatus/Provider.tsx", "../../src/modules/base-page/components/BasePage/DynamicSharePage.tsx", "../../src/modules/base-page/components/BasePage/LiveSharePage.tsx", "../../src/modules/base-page/components/BasePage/PermaSharePage.tsx"],
  "sourcesContent": ["import { isString } from '@ariestools/sdk'\nimport { FlexCol, FlexRow } from '@ariestools/sdk-react-foundation/flexbox'\nimport { CookieConsent } from '@ariestools/sdk-react-ui/cookie-consent'\nimport { KeyboardArrowUp as KeyboardArrowUpIcon } from '@mui/icons-material'\nimport {\n  Container, Fab, Typography,\n} from '@mui/material'\nimport React, { use } from 'react'\n\nimport { ScrollToTop, ScrollToTopButton } from '#scroll-to-top'\n\nimport { LoadStatusContext } from '../../contexts/index.ts'\nimport type { BasePageProps } from './BasePageProps.ts'\n\nconst xyoOgMetaName = 'xyo:og:image'\n\n/** Provides the shared loading, error, and layout shell used by base pages. */\nconst BasePage: React.FC<BasePageProps> = ({\n  disableGutters,\n  children,\n  beta,\n  container,\n  hideFooter,\n  appFooter,\n  appBar,\n  cookieConsent,\n  description: _description,\n  hideAppBar,\n  metaServer,\n  noindex: _noindex = false,\n  scrollToTopButton = false,\n  title: _titleProp,\n  ...props\n}) => {\n  const { status, setStatus } = use(LoadStatusContext)\n  const scrollToTopAnchorId = 'scroll-to-top-anchor'\n  const {\n    pageCompleteMetaName = xyoOgMetaName, shareImage, shareMode = 'static',\n  } = metaServer ?? {}\n\n  if (shareMode === 'static' && status !== 'done') {\n    setStatus('done')\n  } else if ((xyoOgMetaName === pageCompleteMetaName) && isString(shareImage) && status !== 'done') {\n    setStatus('done')\n  }\n\n  return (\n    <FlexCol\n      {...props}\n      sx={{\n        justifyContent: 'flex-start',\n        alignItems: 'stretch',\n        width: '100%',\n        maxWidth: '100vw',\n        minHeight: '100vh',\n      }}\n    >\n      <ScrollToTop />\n      {scrollToTopButton\n        ? <div id={scrollToTopAnchorId} />\n        : null}\n      {hideAppBar === true ? null : appBar}\n      {beta === true\n        ? (\n            <FlexRow\n              sx={{\n                margin: 1,\n                width: '100%',\n                opacity: 0.5,\n              }}\n            >\n              <Typography\n                variant=\"body2\"\n                sx={{\n                  bgcolor: '#cccccc88',\n                  padding: 0.5,\n                }}\n              >\n                Important: This page is a Beta page. It is possible that some information may not be correct.\n              </Typography>\n            </FlexRow>\n          )\n        : null}\n      {isString(container)\n        ? (\n            <Container\n              style={{\n                alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1,\n              }}\n              maxWidth={container}\n              disableGutters={disableGutters}\n            >\n              {children}\n            </Container>\n          )\n        : children}\n      {hideFooter === true ? null : <footer>{appFooter}</footer>}\n      {cookieConsent ?? (\n        <CookieConsent />\n      )}\n      {scrollToTopButton\n        ? (\n            <ScrollToTopButton anchorId={scrollToTopAnchorId}>\n              <Fab aria-label=\"scroll to top\" color=\"secondary\" size=\"small\">\n                <KeyboardArrowUpIcon />\n              </Fab>\n            </ScrollToTopButton>\n          )\n        : null}\n    </FlexCol>\n  )\n}\n\nexport { BasePage }\n", "import { useEffect } from 'react'\nimport { useLocation } from 'react-router'\n\n// The point of this component it to return to the top of the page on any router navigate\n\n/** Scrolls the browser viewport to the top when the current route changes. */\nexport const ScrollToTop = () => {\n  const { pathname } = useLocation()\n  useEffect(() => {\n    window.scrollTo(0, 0)\n  }, [pathname])\n\n  return null\n}\n", "import type { ZoomProps } from '@mui/material'\nimport {\n  Box, useScrollTrigger, useTheme, Zoom,\n} from '@mui/material'\nimport React from 'react'\n\n/** Properties accepted by the scroll to top button component. */\nexport interface ScrollToTopButtonProps extends ZoomProps {\n  /** Anchor id used by the scroll to top button props. */\n  anchorId: string\n}\n\n/** Button that scrolls the browser viewport to the top. */\nexport const ScrollToTopButton: React.FC<ScrollToTopButtonProps> = ({\n  children, anchorId, ...props\n}) => {\n  const trigger = useScrollTrigger({\n    disableHysteresis: true,\n    threshold: 100,\n  })\n\n  const handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n    const divElement = event.target as HTMLElement\n    const anchor = (divElement.ownerDocument ?? document).querySelector(`#${anchorId}`)\n\n    if (anchor) {\n      anchor.scrollIntoView({ behavior: 'smooth', block: 'center' })\n    }\n  }\n\n  const theme = useTheme()\n\n  return (\n    <Zoom in={trigger} {...props}>\n      <Box\n        onClick={handleClick}\n        role=\"presentation\"\n        sx={{\n          zIndex: 10,\n          position: 'fixed',\n          right: theme.spacing(2),\n          bottom: theme.spacing(2),\n        }}\n      >\n        {children}\n      </Box>\n    </Zoom>\n  )\n}\n", "import { createContext } from 'react'\n\nimport type { LoadStatusContextState } from './State.ts'\n\n/** React context containing load status state. */\nexport const LoadStatusContext = createContext<LoadStatusContextState>({\n  status: 'done', setStatus: () => void 0, setError: () => void 0,\n})\n", "import type { PropsWithChildren } from 'react'\nimport React, {\n  useEffect, useMemo, useState,\n} from 'react'\n\nimport { LoadStatusContext } from './Context.ts'\n\n/** Properties accepted by the load status provider component. */\nexport type LoadStatusProviderProps = PropsWithChildren<{\n  timeout?: number\n}>\n\n/** Provides load status state to descendant components. */\nexport const LoadStatusProvider: React.FC<LoadStatusProviderProps> = ({ timeout = 5000, children }) => {\n  const [error, setError] = useState<Error | undefined>()\n  const [status, setStatus] = useState<'done' | 'error' | 'loading'>('loading')\n\n  useEffect(() => {\n    if (timeout === 0 || timeout === Infinity) {\n      return\n    }\n    const id = setTimeout(() => {\n      setStatus('error')\n      setError(new Error('Timeout after ' + timeout + 'ms'))\n    }, timeout)\n    return () => {\n      clearTimeout(id)\n    }\n  }, [timeout])\n  const value = useMemo(() => {\n    return {\n      status,\n      setStatus,\n      setError,\n      error,\n    }\n  }, [status, setStatus, error, setError])\n  return <LoadStatusContext value={value}>{children}</LoadStatusContext>\n}\n", "import type { FC } from 'react'\nimport React from 'react'\n\nimport { BasePage } from './BasePage.tsx'\nimport type { BasePageProps } from './BasePageProps.ts'\n\n/** Renders a share page whose content can change after publication. */\nexport const DynamicSharePage: FC<BasePageProps> = ({ metaServer, ...props }) => {\n  return <BasePage {...props} metaServer={{ ...metaServer, shareMode: 'dynamic' }} />\n}\n", "import type { FC } from 'react'\nimport React from 'react'\n\nimport { BasePage } from './BasePage.tsx'\nimport type { BasePageProps } from './BasePageProps.ts'\n\n/** Renders a share page backed by live content. */\nexport const LiveSharePage: FC<BasePageProps> = ({ metaServer, ...props }) => {\n  return <BasePage {...props} metaServer={{ ...metaServer, shareMode: 'live' }} />\n}\n", "import type { FC } from 'react'\nimport React from 'react'\n\nimport { BasePage } from './BasePage.tsx'\nimport type { BasePageProps } from './BasePageProps.ts'\n\n/** Renders a share page backed by permanent content. */\nexport const PermaSharePage: FC<BasePageProps> = ({ metaServer, ...props }) => {\n  return <BasePage {...props} metaServer={{ ...metaServer, shareMode: 'permanent' }} />\n}\n"],
  "mappings": ";AAAA,SAAS,gBAAgB;AACzB,SAAS,SAAS,eAAe;AACjC,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB,2BAA2B;AACvD;AAAA,EACE;AAAA,EAAW;AAAA,EAAK;AAAA,OACX;AACP,SAAgB,WAAW;;;ACP3B,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AAKrB,IAAM,cAAc,MAAM;AAC/B,QAAM,EAAE,SAAS,IAAI,YAAY;AACjC,YAAU,MAAM;AACd,WAAO,SAAS,GAAG,CAAC;AAAA,EACtB,GAAG,CAAC,QAAQ,CAAC;AAEb,SAAO;AACT;;;ACZA;AAAA,EACE;AAAA,EAAK;AAAA,EAAkB;AAAA,EAAU;AAAA,OAC5B;AA+BD;AArBC,IAAM,oBAAsD,CAAC;AAAA,EAClE;AAAA,EAAU;AAAA,EAAU,GAAG;AACzB,MAAM;AACJ,QAAM,UAAU,iBAAiB;AAAA,IAC/B,mBAAmB;AAAA,IACnB,WAAW;AAAA,EACb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