(our hidden element)\n // react-dom in dev mode will warn about this. There doesn't seem to be a way to render arbitrary\n // user Head without hitting this issue (our hidden element could be just \"new Document()\", but\n // this can only have 1 child, and we don't control what is being rendered so that's not an option)\n // instead we continue to render to
, and just silence warnings for and elements\n // https://github.com/facebook/react/blob/e2424f33b3ad727321fc12e75c5e94838e84c2b5/packages/react-dom-bindings/src/client/validateDOMNesting.js#L498-L520\n const originalConsoleError = console.error.bind(console)\n console.error = (...args) => {\n if (\n Array.isArray(args) &&\n args.length >= 2 &&\n args[0]?.includes?.(`validateDOMNesting(...): %s cannot appear as`) &&\n (args[1] === `` || args[1] === ``)\n ) {\n return undefined\n }\n return originalConsoleError(...args)\n }\n\n /* We set up observer to be able to regenerate after react-refresh\n updates our hidden element.\n */\n const observer = new MutationObserver(onHeadRendered)\n observer.observe(hiddenRoot, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true,\n })\n}\n\nexport function headHandlerForBrowser({\n pageComponent,\n staticQueryResults,\n pageComponentProps,\n}) {\n useEffect(() => {\n if (pageComponent?.Head) {\n headExportValidator(pageComponent.Head)\n\n const { render } = reactDOMUtils()\n\n const HeadElement = (\n
\n )\n\n const WrapHeadElement = apiRunner(\n `wrapRootElement`,\n { element: HeadElement },\n HeadElement,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n render(\n // just a hack to call the callback after react has done first render\n // Note: In dev, we call onHeadRendered twice( in FireCallbackInEffect and after mutualution observer dectects initail render into hiddenRoot) this is for hot reloading\n // In Prod we only call onHeadRendered in FireCallbackInEffect to render to head\n
\n \n {WrapHeadElement}\n \n ,\n hiddenRoot\n )\n }\n\n return () => {\n removePrevHeadElements()\n removeHtmlAndBodyAttributes(keysOfHtmlAndBodyAttributes)\n }\n })\n}\n","import React, { Suspense, createElement } from \"react\"\nimport PropTypes from \"prop-types\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport { grabMatchParams } from \"./find-path\"\nimport { headHandlerForBrowser } from \"./head/head-export-handler-for-browser\"\n\n// Renders page\nfunction PageRenderer(props) {\n const pageComponentProps = {\n ...props,\n params: {\n ...grabMatchParams(props.location.pathname),\n ...props.pageResources.json.pageContext.__params,\n },\n }\n\n const preferDefault = m => (m && m.default) || m\n\n let pageElement\n if (props.pageResources.partialHydration) {\n pageElement = props.pageResources.partialHydration\n } else {\n pageElement = createElement(preferDefault(props.pageResources.component), {\n ...pageComponentProps,\n key: props.path || props.pageResources.page.path,\n })\n }\n\n const pageComponent = props.pageResources.head\n\n headHandlerForBrowser({\n pageComponent,\n staticQueryResults: props.pageResources.staticQueryResults,\n pageComponentProps,\n })\n\n const wrappedPage = apiRunner(\n `wrapPageElement`,\n {\n element: pageElement,\n props: pageComponentProps,\n },\n pageElement,\n ({ result }) => {\n return { element: result, props: pageComponentProps }\n }\n ).pop()\n\n return wrappedPage\n}\n\nPageRenderer.propTypes = {\n location: PropTypes.object.isRequired,\n pageResources: PropTypes.object.isRequired,\n data: PropTypes.object,\n pageContext: PropTypes.object.isRequired,\n}\n\nexport default PageRenderer\n","// This is extracted to separate module because it's shared\n// between browser and SSR code\nexport const RouteAnnouncerProps = {\n id: `gatsby-announcer`,\n style: {\n position: `absolute`,\n top: 0,\n width: 1,\n height: 1,\n padding: 0,\n overflow: `hidden`,\n clip: `rect(0, 0, 0, 0)`,\n whiteSpace: `nowrap`,\n border: 0,\n },\n \"aria-live\": `assertive`,\n \"aria-atomic\": `true`,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport { maybeGetBrowserRedirect } from \"./redirect-utils.js\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport emitter from \"./emitter\"\nimport { RouteAnnouncerProps } from \"./route-announcer-props\"\nimport {\n navigate as reachNavigate,\n globalHistory,\n} from \"@gatsbyjs/reach-router\"\nimport { parsePath } from \"gatsby-link\"\n\nfunction maybeRedirect(pathname) {\n const redirect = maybeGetBrowserRedirect(pathname)\n const { hash, search } = window.location\n\n if (redirect != null) {\n window.___replace(redirect.toPath + search + hash)\n return true\n } else {\n return false\n }\n}\n\n// Catch unhandled chunk loading errors and force a restart of the app.\nlet nextRoute = ``\n\nwindow.addEventListener(`unhandledrejection`, event => {\n if (/loading chunk \\d* failed./i.test(event.reason)) {\n if (nextRoute) {\n window.location.pathname = nextRoute\n }\n }\n})\n\nconst onPreRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n nextRoute = location.pathname\n apiRunner(`onPreRouteUpdate`, { location, prevLocation })\n }\n}\n\nconst onRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onRouteUpdate`, { location, prevLocation })\n if (\n process.env.GATSBY_QUERY_ON_DEMAND &&\n process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR === `true`\n ) {\n emitter.emit(`onRouteUpdate`, { location, prevLocation })\n }\n }\n}\n\nconst navigate = (to, options = {}) => {\n // Support forward/backward navigation with numbers\n // navigate(-2) (jumps back 2 history steps)\n // navigate(2) (jumps forward 2 history steps)\n if (typeof to === `number`) {\n globalHistory.navigate(to)\n return\n }\n\n const { pathname, search, hash } = parsePath(to)\n const redirect = maybeGetBrowserRedirect(pathname)\n\n // If we're redirecting, just replace the passed in pathname\n // to the one we want to redirect to.\n if (redirect) {\n to = redirect.toPath + search + hash\n }\n\n // If we had a service worker update, no matter the path, reload window and\n // reset the pathname whitelist\n if (window.___swUpdated) {\n window.location = pathname + search + hash\n return\n }\n\n // Start a timer to wait for a second before transitioning and showing a\n // loader in case resources aren't around yet.\n const timeoutId = setTimeout(() => {\n emitter.emit(`onDelayedLoadPageResources`, { pathname })\n apiRunner(`onRouteUpdateDelayed`, {\n location: window.location,\n })\n }, 1000)\n\n loader.loadPage(pathname + search).then(pageResources => {\n // If no page resources, then refresh the page\n // Do this, rather than simply `window.location.reload()`, so that\n // pressing the back/forward buttons work - otherwise when pressing\n // back, the browser will just change the URL and expect JS to handle\n // the change, which won't always work since it might not be a Gatsby\n // page.\n if (!pageResources || pageResources.status === PageResourceStatus.Error) {\n window.history.replaceState({}, ``, location.href)\n window.location = pathname\n clearTimeout(timeoutId)\n return\n }\n\n // If the loaded page has a different compilation hash to the\n // window, then a rebuild has occurred on the server. Reload.\n if (process.env.NODE_ENV === `production` && pageResources) {\n if (\n pageResources.page.webpackCompilationHash !==\n window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n window.location = pathname + search + hash\n }\n }\n reachNavigate(to, options)\n clearTimeout(timeoutId)\n })\n}\n\nfunction shouldUpdateScroll(prevRouterProps, { location }) {\n const { pathname, hash } = location\n const results = apiRunner(`shouldUpdateScroll`, {\n prevRouterProps,\n // `pathname` for backwards compatibility\n pathname,\n routerProps: { location },\n getSavedScrollPosition: args => [\n 0,\n // FIXME this is actually a big code smell, we should fix this\n // eslint-disable-next-line @babel/no-invalid-this\n this._stateStorage.read(args, args.key),\n ],\n })\n if (results.length > 0) {\n // Use the latest registered shouldUpdateScroll result, this allows users to override plugin's configuration\n // @see https://github.com/gatsbyjs/gatsby/issues/12038\n return results[results.length - 1]\n }\n\n if (prevRouterProps) {\n const {\n location: { pathname: oldPathname },\n } = prevRouterProps\n if (oldPathname === pathname) {\n // Scroll to element if it exists, if it doesn't, or no hash is provided,\n // scroll to top.\n return hash ? decodeURI(hash.slice(1)) : [0, 0]\n }\n }\n return true\n}\n\nfunction init() {\n // The \"scroll-behavior\" package expects the \"action\" to be on the location\n // object so let's copy it over.\n globalHistory.listen(args => {\n args.location.action = args.action\n })\n\n window.___push = to => navigate(to, { replace: false })\n window.___replace = to => navigate(to, { replace: true })\n window.___navigate = (to, options) => navigate(to, options)\n}\n\nclass RouteAnnouncer extends React.Component {\n constructor(props) {\n super(props)\n this.announcementRef = React.createRef()\n }\n\n componentDidUpdate(prevProps, nextProps) {\n requestAnimationFrame(() => {\n let pageName = `new page at ${this.props.location.pathname}`\n if (document.title) {\n pageName = document.title\n }\n const pageHeadings = document.querySelectorAll(`#gatsby-focus-wrapper h1`)\n if (pageHeadings && pageHeadings.length) {\n pageName = pageHeadings[0].textContent\n }\n const newAnnouncement = `Navigated to ${pageName}`\n if (this.announcementRef.current) {\n const oldAnnouncement = this.announcementRef.current.innerText\n if (oldAnnouncement !== newAnnouncement) {\n this.announcementRef.current.innerText = newAnnouncement\n }\n }\n })\n }\n\n render() {\n return
\n }\n}\n\nconst compareLocationProps = (prevLocation, nextLocation) => {\n if (prevLocation.href !== nextLocation.href) {\n return true\n }\n\n if (prevLocation?.state?.key !== nextLocation?.state?.key) {\n return true\n }\n\n return false\n}\n\n// Fire on(Pre)RouteUpdate APIs\nclass RouteUpdates extends React.Component {\n constructor(props) {\n super(props)\n onPreRouteUpdate(props.location, null)\n }\n\n componentDidMount() {\n onRouteUpdate(this.props.location, null)\n }\n\n shouldComponentUpdate(nextProps) {\n if (compareLocationProps(this.props.location, nextProps.location)) {\n onPreRouteUpdate(nextProps.location, this.props.location)\n return true\n }\n return false\n }\n\n componentDidUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onRouteUpdate(this.props.location, prevProps.location)\n }\n }\n\n render() {\n return (\n
\n {this.props.children}\n \n \n )\n }\n}\n\nRouteUpdates.propTypes = {\n location: PropTypes.object.isRequired,\n}\n\nexport { init, shouldUpdateScroll, RouteUpdates, maybeGetBrowserRedirect }\n","// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(a, b) {\n for (var i in a) {\n if (!(i in b)) return true;\n }for (var _i in b) {\n if (a[_i] !== b[_i]) return true;\n }return false;\n}\n\nexport default (function (instance, nextProps, nextState) {\n return shallowDiffers(instance.props, nextProps) || shallowDiffers(instance.state, nextState);\n});","import React from \"react\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport shallowCompare from \"shallow-compare\"\n\nclass EnsureResources extends React.Component {\n constructor(props) {\n super()\n const { location, pageResources } = props\n this.state = {\n location: { ...location },\n pageResources:\n pageResources ||\n loader.loadPageSync(location.pathname + location.search, {\n withErrorDetails: true,\n }),\n }\n }\n\n static getDerivedStateFromProps({ location }, prevState) {\n if (prevState.location.href !== location.href) {\n const pageResources = loader.loadPageSync(\n location.pathname + location.search,\n {\n withErrorDetails: true,\n }\n )\n\n return {\n pageResources,\n location: { ...location },\n }\n }\n\n return {\n location: { ...location },\n }\n }\n\n loadResources(rawPath) {\n loader.loadPage(rawPath).then(pageResources => {\n if (pageResources && pageResources.status !== PageResourceStatus.Error) {\n this.setState({\n location: { ...window.location },\n pageResources,\n })\n } else {\n window.history.replaceState({}, ``, location.href)\n window.location = rawPath\n }\n })\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n // Always return false if we're missing resources.\n if (!nextState.pageResources) {\n this.loadResources(\n nextProps.location.pathname + nextProps.location.search\n )\n return false\n }\n\n if (\n process.env.BUILD_STAGE === `develop` &&\n nextState.pageResources.stale\n ) {\n this.loadResources(\n nextProps.location.pathname + nextProps.location.search\n )\n return false\n }\n\n // Check if the component or json have changed.\n if (this.state.pageResources !== nextState.pageResources) {\n return true\n }\n if (\n this.state.pageResources.component !== nextState.pageResources.component\n ) {\n return true\n }\n\n if (this.state.pageResources.json !== nextState.pageResources.json) {\n return true\n }\n // Check if location has changed on a page using internal routing\n // via matchPath configuration.\n if (\n this.state.location.key !== nextState.location.key &&\n nextState.pageResources.page &&\n (nextState.pageResources.page.matchPath ||\n nextState.pageResources.page.path)\n ) {\n return true\n }\n return shallowCompare(this, nextProps, nextState)\n }\n\n render() {\n if (\n process.env.NODE_ENV !== `production` &&\n (!this.state.pageResources ||\n this.state.pageResources.status === PageResourceStatus.Error)\n ) {\n const message = `EnsureResources was not able to find resources for path: \"${this.props.location.pathname}\"\nThis typically means that an issue occurred building components for that path.\nRun \\`gatsby clean\\` to remove any cached elements.`\n if (this.state.pageResources?.error) {\n console.error(message)\n throw this.state.pageResources.error\n }\n\n throw new Error(message)\n }\n\n return this.props.children(this.state)\n }\n}\n\nexport default EnsureResources\n","import { apiRunner, apiRunnerAsync } from \"./api-runner-browser\"\nimport React from \"react\"\nimport { Router, navigate, Location, BaseContext } from \"@gatsbyjs/reach-router\"\nimport { ScrollContext } from \"gatsby-react-router-scroll\"\nimport { StaticQueryContext } from \"./static-query\"\nimport {\n SlicesMapContext,\n SlicesContext,\n SlicesResultsContext,\n} from \"./slice/context\"\nimport {\n shouldUpdateScroll,\n init as navigationInit,\n RouteUpdates,\n} from \"./navigation\"\nimport emitter from \"./emitter\"\nimport PageRenderer from \"./page-renderer\"\nimport asyncRequires from \"$virtual/async-requires\"\nimport {\n setLoader,\n ProdLoader,\n publicLoader,\n PageResourceStatus,\n getStaticQueryResults,\n getSliceResults,\n} from \"./loader\"\nimport EnsureResources from \"./ensure-resources\"\nimport stripPrefix from \"./strip-prefix\"\n\n// Generated during bootstrap\nimport matchPaths from \"$virtual/match-paths.json\"\nimport { reactDOMUtils } from \"./react-dom-utils\"\n\nconst loader = new ProdLoader(asyncRequires, matchPaths, window.pageData)\nsetLoader(loader)\nloader.setApiRunner(apiRunner)\n\nconst { render, hydrate } = reactDOMUtils()\n\nwindow.asyncRequires = asyncRequires\nwindow.___emitter = emitter\nwindow.___loader = publicLoader\n\nnavigationInit()\n\nconst reloadStorageKey = `gatsby-reload-compilation-hash-match`\n\napiRunnerAsync(`onClientEntry`).then(() => {\n // Let plugins register a service worker. The plugin just needs\n // to return true.\n if (apiRunner(`registerServiceWorker`).filter(Boolean).length > 0) {\n require(`./register-service-worker`)\n }\n\n // In gatsby v2 if Router is used in page using matchPaths\n // paths need to contain full path.\n // For example:\n // - page have `/app/*` matchPath\n // - inside template user needs to use `/app/xyz` as path\n // Resetting `basepath`/`baseuri` keeps current behaviour\n // to not introduce breaking change.\n // Remove this in v3\n const RouteHandler = props => (\n
\n \n \n )\n\n const DataContext = React.createContext({})\n\n const slicesContext = {\n renderEnvironment: `browser`,\n }\n\n class GatsbyRoot extends React.Component {\n render() {\n const { children } = this.props\n return (\n
\n {({ location }) => (\n \n {({ pageResources, location }) => {\n const staticQueryResults = getStaticQueryResults()\n const sliceResults = getSliceResults()\n\n return (\n \n \n \n \n \n {children}\n \n \n \n \n \n )\n }}\n \n )}\n \n )\n }\n }\n\n class LocationHandler extends React.Component {\n render() {\n return (\n
\n {({ pageResources, location }) => (\n \n \n \n \n \n \n \n )}\n \n )\n }\n }\n\n const { pagePath, location: browserLoc } = window\n\n // Explicitly call navigate if the canonical path (window.pagePath)\n // is different to the browser path (window.location.pathname). SSR\n // page paths might include search params, while SSG and DSG won't.\n // If page path include search params we also compare query params.\n // But only if NONE of the following conditions hold:\n //\n // - The url matches a client side route (page.matchPath)\n // - it's a 404 page\n // - it's the offline plugin shell (/offline-plugin-app-shell-fallback/)\n if (\n pagePath &&\n __BASE_PATH__ + pagePath !==\n browserLoc.pathname + (pagePath.includes(`?`) ? browserLoc.search : ``) &&\n !(\n loader.findMatchPath(stripPrefix(browserLoc.pathname, __BASE_PATH__)) ||\n pagePath.match(/^\\/(404|500)(\\/?|.html)$/) ||\n pagePath.match(/^\\/offline-plugin-app-shell-fallback\\/?$/)\n )\n ) {\n navigate(\n __BASE_PATH__ +\n pagePath +\n (!pagePath.includes(`?`) ? browserLoc.search : ``) +\n browserLoc.hash,\n {\n replace: true,\n }\n )\n }\n\n // It's possible that sessionStorage can throw an exception if access is not granted, see https://github.com/gatsbyjs/gatsby/issues/34512\n const getSessionStorage = () => {\n try {\n return sessionStorage\n } catch {\n return null\n }\n }\n\n publicLoader.loadPage(browserLoc.pathname + browserLoc.search).then(page => {\n const sessionStorage = getSessionStorage()\n\n if (\n page?.page?.webpackCompilationHash &&\n page.page.webpackCompilationHash !== window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n // We have not matching html + js (inlined `window.___webpackCompilationHash`)\n // with our data (coming from `app-data.json` file). This can cause issues such as\n // errors trying to load static queries (as list of static queries is inside `page-data`\n // which might not match to currently loaded `.js` scripts).\n // We are making attempt to reload if hashes don't match, but we also have to handle case\n // when reload doesn't fix it (possibly broken deploy) so we don't end up in infinite reload loop\n if (sessionStorage) {\n const isReloaded = sessionStorage.getItem(reloadStorageKey) === `1`\n\n if (!isReloaded) {\n sessionStorage.setItem(reloadStorageKey, `1`)\n window.location.reload(true)\n return\n }\n }\n }\n\n if (sessionStorage) {\n sessionStorage.removeItem(reloadStorageKey)\n }\n\n if (!page || page.status === PageResourceStatus.Error) {\n const message = `page resources for ${browserLoc.pathname} not found. Not rendering React`\n\n // if the chunk throws an error we want to capture the real error\n // This should help with https://github.com/gatsbyjs/gatsby/issues/19618\n if (page && page.error) {\n console.error(message)\n throw page.error\n }\n\n throw new Error(message)\n }\n\n const SiteRoot = apiRunner(\n `wrapRootElement`,\n { element:
},\n
,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n const App = function App() {\n const onClientEntryRanRef = React.useRef(false)\n\n React.useEffect(() => {\n if (!onClientEntryRanRef.current) {\n onClientEntryRanRef.current = true\n if (performance.mark) {\n performance.mark(`onInitialClientRender`)\n }\n\n apiRunner(`onInitialClientRender`)\n }\n }, [])\n\n return
{SiteRoot}\n }\n\n const focusEl = document.getElementById(`gatsby-focus-wrapper`)\n\n // Client only pages have any empty body so we just do a normal\n // render to avoid React complaining about hydration mis-matches.\n let defaultRenderer = render\n if (focusEl && focusEl.children.length) {\n defaultRenderer = hydrate\n }\n\n const renderer = apiRunner(\n `replaceHydrateFunction`,\n undefined,\n defaultRenderer\n )[0]\n\n function runRender() {\n const rootElement =\n typeof window !== `undefined`\n ? document.getElementById(`___gatsby`)\n : null\n\n renderer(
, rootElement)\n }\n\n // https://github.com/madrobby/zepto/blob/b5ed8d607f67724788ec9ff492be297f64d47dfc/src/zepto.js#L439-L450\n // TODO remove IE 10 support\n const doc = document\n if (\n doc.readyState === `complete` ||\n (doc.readyState !== `loading` && !doc.documentElement.doScroll)\n ) {\n setTimeout(function () {\n runRender()\n }, 0)\n } else {\n const handler = function () {\n doc.removeEventListener(`DOMContentLoaded`, handler, false)\n window.removeEventListener(`load`, handler, false)\n\n runRender()\n }\n\n doc.addEventListener(`DOMContentLoaded`, handler, false)\n window.addEventListener(`load`, handler, false)\n }\n\n return\n })\n})\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nimport loader from \"./loader\"\nimport InternalPageRenderer from \"./page-renderer\"\n\nconst ProdPageRenderer = ({ location }) => {\n const pageResources = loader.loadPageSync(location.pathname)\n if (!pageResources) {\n return null\n }\n return React.createElement(InternalPageRenderer, {\n location,\n pageResources,\n ...pageResources.json,\n })\n}\n\nProdPageRenderer.propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n}\n\nexport default ProdPageRenderer\n","const preferDefault = m => (m && m.default) || m\n\nif (process.env.BUILD_STAGE === `develop`) {\n module.exports = preferDefault(require(`./public-page-renderer-dev`))\n} else if (process.env.BUILD_STAGE === `build-javascript`) {\n module.exports = preferDefault(require(`./public-page-renderer-prod`))\n} else {\n module.exports = () => null\n}\n","const map = new WeakMap()\n\nexport function reactDOMUtils() {\n const reactDomClient = require(`react-dom/client`)\n\n const render = (Component, el) => {\n let root = map.get(el)\n if (!root) {\n map.set(el, (root = reactDomClient.createRoot(el)))\n }\n root.render(Component)\n }\n\n const hydrate = (Component, el) => reactDomClient.hydrateRoot(el, Component)\n\n return { render, hydrate }\n}\n","import redirects from \"./redirects.json\"\n\n// Convert to a map for faster lookup in maybeRedirect()\n\nconst redirectMap = new Map()\nconst redirectIgnoreCaseMap = new Map()\n\nredirects.forEach(redirect => {\n if (redirect.ignoreCase) {\n redirectIgnoreCaseMap.set(redirect.fromPath, redirect)\n } else {\n redirectMap.set(redirect.fromPath, redirect)\n }\n})\n\nexport function maybeGetBrowserRedirect(pathname) {\n let redirect = redirectMap.get(pathname)\n if (!redirect) {\n redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase())\n }\n return redirect\n}\n","import { apiRunner } from \"./api-runner-browser\"\n\nif (\n window.location.protocol !== `https:` &&\n window.location.hostname !== `localhost`\n) {\n console.error(\n `Service workers can only be used over HTTPS, or on localhost for development`\n )\n} else if (`serviceWorker` in navigator) {\n navigator.serviceWorker\n .register(`${__BASE_PATH__}/sw.js`)\n .then(function (reg) {\n reg.addEventListener(`updatefound`, () => {\n apiRunner(`onServiceWorkerUpdateFound`, { serviceWorker: reg })\n // The updatefound event implies that reg.installing is set; see\n // https://w3c.github.io/ServiceWorker/#service-worker-registration-updatefound-event\n const installingWorker = reg.installing\n console.log(`installingWorker`, installingWorker)\n installingWorker.addEventListener(`statechange`, () => {\n switch (installingWorker.state) {\n case `installed`:\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and the fresh content will\n // have been added to the cache.\n\n // We set a flag so Gatsby Link knows to refresh the page on next navigation attempt\n window.___swUpdated = true\n // We call the onServiceWorkerUpdateReady API so users can show update prompts.\n apiRunner(`onServiceWorkerUpdateReady`, { serviceWorker: reg })\n\n // If resources failed for the current page, reload.\n if (window.___failedResources) {\n console.log(`resources failed, SW updated - reloading`)\n window.location.reload()\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a \"Content is cached for offline use.\" message.\n console.log(`Content is now available offline!`)\n\n // Post to service worker that install is complete.\n // Delay to allow time for the event listener to be added --\n // otherwise fetch is called too soon and resources aren't cached.\n apiRunner(`onServiceWorkerInstalled`, { serviceWorker: reg })\n }\n break\n\n case `redundant`:\n console.error(`The installing service worker became redundant.`)\n apiRunner(`onServiceWorkerRedundant`, { serviceWorker: reg })\n break\n\n case `activated`:\n apiRunner(`onServiceWorkerActive`, { serviceWorker: reg })\n break\n }\n })\n })\n })\n .catch(function (e) {\n console.error(`Error during service worker registration:`, e)\n })\n}\n","import React from \"react\"\n\nconst SlicesResultsContext = React.createContext({})\nconst SlicesContext = React.createContext({})\nconst SlicesMapContext = React.createContext({})\nconst SlicesPropsContext = React.createContext({})\n\nexport {\n SlicesResultsContext,\n SlicesContext,\n SlicesMapContext,\n SlicesPropsContext,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { createServerOrClientContext } from \"./context-utils\"\n\nconst StaticQueryContext = createServerOrClientContext(`StaticQuery`, {})\n\nfunction StaticQueryDataRenderer({ staticQueryData, data, query, render }) {\n const finalData = data\n ? data.data\n : staticQueryData[query] && staticQueryData[query].data\n\n return (\n
\n {finalData && render(finalData)}\n {!finalData && Loading (StaticQuery)
}\n \n )\n}\n\nlet warnedAboutStaticQuery = false\n\n// TODO(v6): Remove completely\nconst StaticQuery = props => {\n const { data, query, render, children } = props\n\n if (process.env.NODE_ENV === `development` && !warnedAboutStaticQuery) {\n console.warn(\n `The
component is deprecated and will be removed in Gatsby v6. Use useStaticQuery instead. Refer to the migration guide for more information: https://gatsby.dev/migrating-4-to-5/#staticquery--is-deprecated`\n )\n warnedAboutStaticQuery = true\n }\n\n return (\n
\n {staticQueryData => (\n \n )}\n \n )\n}\n\nStaticQuery.propTypes = {\n data: PropTypes.object,\n query: PropTypes.string.isRequired,\n render: PropTypes.func,\n children: PropTypes.func,\n}\n\nconst useStaticQuery = query => {\n if (\n typeof React.useContext !== `function` &&\n process.env.NODE_ENV === `development`\n ) {\n // TODO(v5): Remove since we require React >= 18\n throw new Error(\n `You're likely using a version of React that doesn't support Hooks\\n` +\n `Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.`\n )\n }\n\n const context = React.useContext(StaticQueryContext)\n\n // query is a stringified number like `3303882` when wrapped with graphql, If a user forgets\n // to wrap the query in a grqphql, then casting it to a Number results in `NaN` allowing us to\n // catch the misuse of the API and give proper direction\n if (isNaN(Number(query))) {\n throw new Error(`useStaticQuery was called with a string but expects to be called using \\`graphql\\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\\`${query}\\`);\n`)\n }\n\n if (context[query]?.data) {\n return context[query].data\n } else {\n throw new Error(\n `The result of this StaticQuery could not be fetched.\\n\\n` +\n `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +\n `please open an issue in https://github.com/gatsbyjs/gatsby/issues`\n )\n }\n}\n\nexport { StaticQuery, StaticQueryContext, useStaticQuery }\n","import React from \"react\"\n\n// Ensure serverContext is not created more than once as React will throw when creating it more than once\n// https://github.com/facebook/react/blob/dd2d6522754f52c70d02c51db25eb7cbd5d1c8eb/packages/react/src/ReactServerContext.js#L101\nconst createServerContext = (name, defaultValue = null) => {\n /* eslint-disable no-undef */\n if (!globalThis.__SERVER_CONTEXT) {\n globalThis.__SERVER_CONTEXT = {}\n }\n\n if (!globalThis.__SERVER_CONTEXT[name]) {\n globalThis.__SERVER_CONTEXT[name] = React.createServerContext(\n name,\n defaultValue\n )\n }\n\n return globalThis.__SERVER_CONTEXT[name]\n}\n\nfunction createServerOrClientContext(name, defaultValue) {\n if (React.createServerContext) {\n return createServerContext(name, defaultValue)\n }\n\n return React.createContext(defaultValue)\n}\n\nexport { createServerOrClientContext }\n","/**\n * Remove a prefix from a string. Return the input string if the given prefix\n * isn't found.\n */\n\nexport default function stripPrefix(str, prefix = ``) {\n if (!prefix) {\n return str\n }\n\n if (str === prefix) {\n return `/`\n }\n\n if (str.startsWith(`${prefix}/`)) {\n return str.slice(prefix.length)\n }\n\n return str\n}\n","import escapeStringRegexp from \"escape-string-regexp\";\nimport { withPrefix } from \"gatsby\";\nexport const userIsForcingNavigation = event => event.button !== 0 || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;\n\n// IE does not include leading slash in anchor.pathname\nexport const slashedPathname = pathname => pathname[0] === `/` ? pathname : `/${pathname}`;\nexport const navigationWasHandledElsewhere = event => event.defaultPrevented;\nexport const findClosestAnchor = node => {\n for (; node.parentNode; node = node.parentNode) {\n if (node.nodeName.toLowerCase() === `a`) {\n return node;\n }\n }\n return null;\n};\nexport const anchorsTargetIsEquivalentToSelf = anchor => /* If target attribute is not present it's treated as _self */\nanchor.hasAttribute(`target`) === false ||\n/**\n * The browser defaults to _self, but, not all browsers set\n * a.target to the string value `_self` by default\n */\n\n/**\n * Assumption: some browsers use null/undefined for default\n * attribute values\n */\nanchor.target == null ||\n/**\n * Some browsers use the empty string to mean _self, check\n * for actual `_self`\n */\n[`_self`, ``].includes(anchor.target) ||\n/**\n * As per https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n */\nanchor.target === `_parent` && (!anchor.ownerDocument.defaultView.parent ||\n// Assumption: This can be falsey\nanchor.ownerDocument.defaultView.parent === anchor.ownerDocument.defaultView) || anchor.target === `_top` && (!anchor.ownerDocument.defaultView.top ||\n// Assumption: This can be falsey\nanchor.ownerDocument.defaultView.top === anchor.ownerDocument.defaultView);\nexport const authorIsForcingNavigation = anchor =>\n/**\n * HTML5 attribute that informs the browser to handle the\n * href as a downloadable file; let the browser handle it\n */\nanchor.hasAttribute(`download`) === true ||\n/**\n * Let the browser handle anything that doesn't look like a\n * target=\"_self\" anchor\n */\nanchorsTargetIsEquivalentToSelf(anchor) === false;\n\n// https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy\nexport const urlsAreOnSameOrigin = (origin, destination) => origin.protocol === destination.protocol && /* a.host includes both hostname and port in the expected format host:port */\norigin.host === destination.host;\nexport const pathIsNotHandledByApp = (destination, pathStartRegEx) => {\n const pathFileExtensionRegEx = /^.*\\.((?!htm)[a-z0-9]{1,5})$/i;\n return (\n /**\n * For when pathPrefix is used in an app and there happens to be a link\n * pointing to the same domain but outside of the app's pathPrefix. For\n * example, a Gatsby app lives at https://example.com/myapp/, with the\n * pathPrefix set to `/myapp`. When adding an absolute link to the same\n * domain but outside of the /myapp path, for example, `
` the plugin won't catch it and\n * will navigate to an external link instead of doing a pushState resulting\n * in `https://example.com/myapp/https://example.com/not-my-app`\n */\n pathStartRegEx.test(slashedPathname(destination.pathname)) === false ||\n /**\n * Don't catch links pointed at what look like file extensions (other than\n * .htm/html extensions).\n */\n destination.pathname.search(pathFileExtensionRegEx) !== -1\n );\n};\nexport const hashShouldBeFollowed = (origin, destination) => destination.hash !== `` && (\n/**\n * Dynamically created anchor links (href=\"#my-anchor\") do not always\n * have pathname on IE\n */\ndestination.pathname === `` || /* Don't catch links pointed to the same page but with a hash. */\ndestination.pathname === origin.pathname);\nexport const routeThroughBrowserOrApp = (hrefHandler, pluginOptions) => event => {\n if (window.___failedResources) return true;\n if (userIsForcingNavigation(event)) return true;\n if (navigationWasHandledElsewhere(event)) return true;\n const clickedAnchor = findClosestAnchor(event.target);\n if (clickedAnchor == null) return true;\n if (authorIsForcingNavigation(clickedAnchor)) return true;\n\n // IE clears the host value if the anchor href changed after creation, e.g.\n // in React. Creating a new anchor element to ensure host value is present\n const destination = document.createElement(`a`);\n\n // https://html.spec.whatwg.org/multipage/links.html#concept-hyperlink-url-set\n // If clickedAnchor has no href attribute like `example`, the href getter returns empty string.\n if (clickedAnchor.href !== ``) {\n destination.href = clickedAnchor.href;\n }\n if (`SVGAnimatedString` in window && clickedAnchor.href instanceof SVGAnimatedString) {\n destination.href = clickedAnchor.href.animVal;\n }\n\n // In IE, the default port is included in the anchor host but excluded from\n // the location host. This affects the ability to directly compare\n // location host to anchor host. For example: http://example.com would\n // have a location.host of 'example.com' and an destination.host of\n // 'example.com:80' Creating anchor from the location.href to normalize the\n // host value.\n const origin = document.createElement(`a`);\n origin.href = window.location.href;\n if (urlsAreOnSameOrigin(origin, destination) === false) return true;\n\n // Regex to test pathname against pathPrefix\n const pathStartRegEx = new RegExp(`^${escapeStringRegexp(withPrefix(`/`))}`);\n if (pathIsNotHandledByApp(destination, pathStartRegEx)) return true;\n if (hashShouldBeFollowed(origin, destination)) return true;\n if (pluginOptions.excludePattern) {\n const excludeRegex = new RegExp(pluginOptions.excludePattern);\n if (excludeRegex.test(destination.pathname)) {\n return true;\n }\n }\n event.preventDefault();\n\n // See issue #8907: destination.pathname already includes pathPrefix added\n // by gatsby-transformer-remark but gatsby-link.navigate needs href without\n const destinationPathname = slashedPathname(destination.pathname).replace(pathStartRegEx, `/`);\n hrefHandler(`${destinationPathname}${destination.search}${destination.hash}`);\n return false;\n};\nexport default function (root, pluginOptions, cb) {\n const clickHandler = routeThroughBrowserOrApp(cb, pluginOptions);\n root.addEventListener(`click`, clickHandler);\n return () => root.removeEventListener(`click`, clickHandler);\n}","import { navigate } from \"gatsby\";\nimport catchLinks from \"./catch-links\";\nexport const onClientEntry = (_, pluginOptions = {}) => {\n catchLinks(window, pluginOptions, href => {\n navigate(href);\n });\n};","'use strict';\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\n\nmodule.exports = function (str) {\n\tif (typeof str !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\treturn str.replace(matchOperatorsRe, '\\\\$&');\n};\n","\"use strict\";\n\nexports.onRouteUpdate = function (_ref, pluginOptions) {\n var location = _ref.location;\n if (pluginOptions === void 0) {\n pluginOptions = {};\n }\n if (process.env.NODE_ENV !== \"production\" || typeof gtag !== \"function\") {\n return null;\n }\n var pluginConfig = pluginOptions.pluginConfig || {};\n var pathIsExcluded = location && typeof window.excludeGtagPaths !== \"undefined\" && window.excludeGtagPaths.some(function (rx) {\n return rx.test(location.pathname);\n });\n if (pathIsExcluded) return null;\n\n // wrap inside a timeout to make sure react-helmet is done with its changes (https://github.com/gatsbyjs/gatsby/issues/11592)\n var sendPageView = function sendPageView() {\n var pagePath = location ? location.pathname + location.search + location.hash : undefined;\n window.gtag(\"event\", \"page_view\", {\n page_path: pagePath\n });\n };\n var _pluginConfig$delayOn = pluginConfig.delayOnRouteUpdate,\n delayOnRouteUpdate = _pluginConfig$delayOn === void 0 ? 0 : _pluginConfig$delayOn;\n if (\"requestAnimationFrame\" in window) {\n requestAnimationFrame(function () {\n requestAnimationFrame(function () {\n return setTimeout(sendPageView, delayOnRouteUpdate);\n });\n });\n } else {\n // Delay by 32ms to simulate 2 requestOnAnimationFrame calls\n setTimeout(sendPageView, 32 + delayOnRouteUpdate);\n }\n return null;\n};","/* global __MANIFEST_PLUGIN_HAS_LOCALISATION__ */\nimport { withPrefix } from \"gatsby\";\nimport getManifestForPathname from \"./get-manifest-pathname\";\n\n// when we don't have localisation in our manifest, we tree shake everything away\nexport const onRouteUpdate = function onRouteUpdate({\n location\n}, pluginOptions) {\n if (__MANIFEST_PLUGIN_HAS_LOCALISATION__) {\n const {\n localize\n } = pluginOptions;\n const manifestFilename = getManifestForPathname(location.pathname, localize, true);\n const manifestEl = document.head.querySelector(`link[rel=\"manifest\"]`);\n if (manifestEl) {\n manifestEl.setAttribute(`href`, withPrefix(manifestFilename));\n }\n }\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _gatsby = require(\"gatsby\");\n/**\n * Get a manifest filename depending on localized pathname\n *\n * @param {string} pathname\n * @param {Array<{start_url: string, lang: string}>} localizedManifests\n * @param {boolean} shouldPrependPathPrefix\n * @return string\n */\nvar _default = (pathname, localizedManifests, shouldPrependPathPrefix = false) => {\n const defaultFilename = `manifest.webmanifest`;\n if (!Array.isArray(localizedManifests)) {\n return defaultFilename;\n }\n const localizedManifest = localizedManifests.find(app => {\n let startUrl = app.start_url;\n if (shouldPrependPathPrefix) {\n startUrl = (0, _gatsby.withPrefix)(startUrl);\n }\n return pathname.startsWith(startUrl);\n });\n if (!localizedManifest) {\n return defaultFilename;\n }\n return `manifest_${localizedManifest.lang}.webmanifest`;\n};\nexports.default = _default;","import React from 'react';\nimport { useThemeUI, ThemeProvider as ThemeProvider$1, jsx, __themeUiDefaultContextValue } from '@theme-ui/core';\nimport { css } from '@theme-ui/css';\nimport { ColorModeProvider } from '@theme-ui/color-modes';\nimport { Global } from '@emotion/react';\n\nvar RootStyles = function RootStyles() {\n return jsx(Global, {\n styles: function styles(emotionTheme) {\n var _theme$config;\n\n var theme = emotionTheme;\n\n var _ref = theme.config || theme,\n useRootStyles = _ref.useRootStyles;\n\n if (useRootStyles === false || theme.styles && !theme.styles.root) {\n return null;\n }\n\n var boxSizing = ((_theme$config = theme.config) == null ? void 0 : _theme$config.useBorderBox) === false ? undefined : 'border-box';\n return css({\n '*': {\n boxSizing: boxSizing\n },\n html: {\n variant: 'styles.root'\n },\n body: {\n margin: 0\n }\n })(theme);\n }\n });\n};\n\nvar ThemeProvider = function ThemeProvider(_ref2) {\n var theme = _ref2.theme,\n children = _ref2.children;\n var outer = useThemeUI();\n var isTopLevel = outer === __themeUiDefaultContextValue;\n return /*#__PURE__*/React.createElement(ThemeProvider$1, {\n theme: theme\n }, /*#__PURE__*/React.createElement(ColorModeProvider, null, isTopLevel && /*#__PURE__*/React.createElement(RootStyles, null), children));\n};\n\nexport { ThemeProvider };\n","import { jsx } from '@theme-ui/core';\nimport { css, get } from '@theme-ui/css';\nimport { useMemo } from 'react';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n// mdx components\nvar tags = ['p', 'b', 'i', 'a', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'img', 'pre', 'code', 'ol', 'ul', 'li', 'blockquote', 'hr', 'em', 'table', 'tr', 'th', 'td', 'em', 'strong', 'del', // mdx\n'inlineCode', 'thematicBreak', // other\n'div', // theme-ui\n'root'];\nvar aliases = {\n inlineCode: 'code',\n thematicBreak: 'hr',\n root: 'div'\n};\n\nvar isAlias = function isAlias(x) {\n return x in aliases;\n};\n\nvar alias = function alias(n) {\n return isAlias(n) ? aliases[n] : n;\n};\n/**\n * Extracts styles from `theme.styles` object\n */\n\n\nvar themed = function themed(key) {\n return function (theme) {\n return css(get(theme, \"styles.\" + key))(theme);\n };\n};\n\nvar createThemedComponent = function createThemedComponent(name, variant) {\n var variantStyles = themed(variant);\n\n var component = function component(props) {\n var extraStyles = {};\n\n if (name === 'th' || name === 'td') {\n var _ref = props,\n align = _ref.align;\n if (align !== 'char') extraStyles.textAlign = align;\n }\n\n return jsx(name, _extends({}, props, {\n css: [props.css, variantStyles, extraStyles].filter(Boolean)\n }));\n };\n\n component.displayName = \"Themed(\" + name + \")\";\n return component;\n};\n\nvar defaultMdxComponents = {};\nvar Themed = {};\ntags.forEach(function (tag) {\n var component = createThemedComponent(alias(tag), tag);\n defaultMdxComponents[tag] = component;\n Themed[tag] = component;\n});\n\nfunction wrapComponent(value, key) {\n var component = function component(props) {\n return jsx(value, _extends({}, props, {\n css: themed(key)\n }));\n };\n\n component.displayName = \"MdxComponents('\" + key + \"')\";\n return component;\n}\n/** @internal */\n\n\nvar wrapComponentsWithThemeStyles = function wrapComponentsWithThemeStyles(comps) {\n var next = _extends({}, defaultMdxComponents); // We enrich user's components with the styles from theme.styles.\n // Example: `components.p` will get the styles from `theme.styles.p` as className.\n\n\n for (var _i = 0, _Object$keys = Object.keys(comps); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n var value = comps[key];\n next[key] = typeof value === 'object' ? wrapComponentsWithThemeStyles(value) : wrapComponent(value, key);\n }\n\n return next;\n};\n\n/**\n * @example\n * import { MDXProvider, useMDXComponents } from '@mdx-js/react'\n *\n * function MyMdxProvider({ children }) {\n * const components = useThemedStylesWithMdx(useMDXComponents())\n *\n * return
{children}\n * }\n */\n\nfunction useThemedStylesWithMdx(outerComponents) {\n return useMemo(function () {\n return wrapComponentsWithThemeStyles(_extends({}, defaultMdxComponents, outerComponents));\n }, [outerComponents]);\n}\n\nexport { Themed, defaultMdxComponents, themed, useThemedStylesWithMdx };\n","import { makeColorsScale, makeTheme } from '@theme-ui/css/utils';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nvar borderWidths = {\n px: '1px',\n '0': '0',\n '2': '2px',\n '4': '4px',\n '8': '8px'\n};\nvar breakpoints = ['640px', '768px', '1024px', '1280px'];\nvar baseColors = makeColorsScale({\n transparent: 'transparent',\n black: '#000',\n white: '#fff',\n gray: ['', '#f7fafc', '#edf2f7', '#e2e8f0', '#cbd5e0', '#a0aec0', '#718096', '#4a5568', '#2d3748', '#1a202c'],\n red: ['', '#fff5f5', '#fed7d7', '#feb2b2', '#fc8181', '#f56565', '#e53e3e', '#c53030', '#9b2c2c', '#742a2a'],\n orange: ['', '#fffaf0', '#feebc8', '#fbd38d', '#f6ad55', '#ed8936', '#dd6b20', '#c05621', '#9c4221', '#7b341e'],\n yellow: ['', '#fffff0', '#fefcbf', '#faf089', '#f6e05e', '#ecc94b', '#d69e2e', '#b7791f', '#975a16', '#744210'],\n green: ['', '#f0fff4', '#c6f6d5', '#9ae6b4', '#68d391', '#48bb78', '#38a169', '#2f855a', '#276749', '#22543d'],\n teal: ['', '#e6fffa', '#b2f5ea', '#81e6d9', '#4fd1c5', '#38b2ac', '#319795', '#2c7a7b', '#285e61', '#234e52'],\n blue: ['', '#ebf8ff', '#bee3f8', '#90cdf4', '#63b3ed', '#4299e1', '#3182ce', '#2b6cb0', '#2c5282', '#2a4365'],\n indigo: ['', '#ebf4ff', '#c3dafe', '#a3bffa', '#7f9cf5', '#667eea', '#5a67d8', '#4c51bf', '#434190', '#3c366b'],\n purple: ['', '#faf5ff', '#e9d8fd', '#d6bcfa', '#b794f4', '#9f7aea', '#805ad5', '#6b46c1', '#553c9a', '#44337a'],\n pink: ['', '#fff5f7', '#fed7e2', '#fbb6ce', '#f687b3', '#ed64a6', '#d53f8c', '#b83280', '#97266d', '#702459']\n});\nvar commonButtonStyles = {\n py: 2,\n px: 3,\n cursor: \"pointer\",\n fontSize: \"100%\",\n lineHeight: \"inherit\"\n};\nvar buttons = {\n simple: _extends({}, commonButtonStyles, {\n backgroundColor: \"primary\",\n border: \"none\",\n color: \"white\",\n fontWeight: \"bold\",\n borderRadius: \"default\",\n '&:hover': {\n backgroundColor: \"primaryHover\"\n }\n }),\n pill: _extends({}, commonButtonStyles, {\n backgroundColor: \"primary\",\n border: \"none\",\n color: \"white\",\n fontWeight: \"bold\",\n borderRadius: \"full\",\n '&:hover': {\n backgroundColor: \"primaryHover\"\n }\n }),\n outline: _extends({}, commonButtonStyles, {\n backgroundColor: \"transparent\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"primary\",\n color: \"primary\",\n fontWeight: \"semibold\",\n borderRadius: \"default\",\n '&:hover': {\n backgroundColor: \"primary\",\n color: \"white\",\n borderColor: \"transparent\"\n }\n }),\n bordered: _extends({}, commonButtonStyles, {\n backgroundColor: \"primary\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"primaryHover\",\n color: \"white\",\n fontWeight: \"bold\",\n borderRadius: \"default\",\n '&:hover': {\n backgroundColor: \"primaryHover\"\n }\n }),\n disabled: _extends({}, commonButtonStyles, {\n backgroundColor: \"primary\",\n border: \"none\",\n opacity: 0.5,\n cursor: \"not-allowed\",\n color: \"white\",\n fontWeight: \"bold\",\n borderRadius: \"default\"\n }),\n '3D': _extends({}, commonButtonStyles, {\n backgroundColor: \"primary\",\n border: \"none\",\n borderBottomWidth: \"4px\",\n borderBottomStyle: \"solid\",\n borderBottomColor: \"primaryHover\",\n color: \"white\",\n fontWeight: \"bold\",\n borderRadius: \"default\",\n transition: \"transform 0.3s ease-in-out\",\n '&:hover': {\n transform: \"translateY(-1px)\"\n }\n }),\n elevated: _extends({}, commonButtonStyles, {\n backgroundColor: \"white\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"gray.4\",\n color: \"text\",\n fontWeight: \"bold\",\n borderRadius: \"default\",\n boxShadow: \"default\",\n '&:hover': {\n backgroundColor: \"gray.1\"\n }\n })\n};\nvar colors = makeColorsScale(_extends({}, baseColors, {\n grayDark: baseColors.gray[8],\n text: baseColors.gray[8],\n background: baseColors.white,\n primary: baseColors.blue[7],\n primaryHover: baseColors.blue[8],\n secondary: baseColors.gray[6],\n muted: baseColors.gray[3],\n success: baseColors.green[3],\n info: baseColors.blue[4],\n warning: baseColors.yellow[3],\n danger: baseColors.red[3],\n light: baseColors.gray[1],\n dark: baseColors.gray[8],\n textMuted: baseColors.gray[6]\n}));\nvar baseFonts = {\n sans: 'system-ui,-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,\"Noto Sans\",sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\"',\n serif: 'Georgia,Cambria,\"Times New Roman\",Times,serif',\n mono: 'Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace'\n};\nvar fonts = _extends({}, baseFonts, {\n body: baseFonts.sans,\n heading: 'inherit',\n monospace: baseFonts.mono\n});\nvar fontSizes = ['0.875rem', '1rem', '1.25rem', '1.5rem', '1.875rem', '2.25rem', '3rem', '4rem', '4.5rem'];\nvar baseFontWeights = {\n hairline: 100,\n thin: 200,\n light: 300,\n normal: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n extrabold: 800,\n black: 900\n};\nvar fontWeights = _extends({}, baseFontWeights, {\n body: baseFontWeights.normal,\n heading: baseFontWeights.bold\n});\nvar commonInputStyles = {\n py: 2,\n px: 3,\n fontSize: \"100%\",\n borderRadius: \"default\",\n appearance: \"none\",\n lineHeight: \"tight\"\n};\nvar inputs = {\n shadow: _extends({}, commonInputStyles, {\n border: \"none\",\n color: \"gray.7\",\n boxShadow: \"default\",\n '&:focus': {\n outline: \"none\",\n boxShadow: \"outline\"\n }\n }),\n inline: _extends({}, commonInputStyles, {\n backgroundColor: \"gray.2\",\n borderWidth: \"2px\",\n borderStyle: \"solid\",\n borderColor: \"gray.2\",\n color: \"gray.7\",\n '&:focus': {\n outline: \"none\",\n borderColor: \"primary\",\n backgroundColor: \"white\"\n }\n }),\n underline: _extends({}, commonInputStyles, {\n backgroundColor: \"transparent\",\n border: \"none\",\n borderBottomWidth: \"2px\",\n borderBottomStyle: \"solid\",\n borderBottomColor: \"primary\",\n borderRadius: \"0px\",\n color: \"gray.7\",\n '&:focus': {\n outline: \"none\",\n borderColor: \"primary\",\n backgroundColor: \"white\"\n }\n })\n};\nvar letterSpacings = {\n tighter: '-0.05em',\n tight: '-0.025em',\n normal: '0',\n wide: '0.025em',\n wider: '0.05em',\n widest: '0.1em'\n};\nvar baseLineHeights = {\n none: '1',\n tight: '1.25',\n snug: '1.375',\n normal: '1.5',\n relaxed: '1.625',\n loose: '2'\n};\nvar lineHeights = _extends({}, baseLineHeights, {\n body: baseLineHeights.relaxed,\n heading: baseLineHeights.tight\n});\nvar radii = {\n none: '0',\n sm: '0.125rem',\n default: '0.25rem',\n md: '0.375rem',\n lg: '0.5rem',\n full: '9999px'\n};\nvar tailwindSpacing = {\n px: '1px',\n '0': '0',\n '1': '0.25rem',\n '2': '0.5rem',\n '3': '0.75rem',\n '4': '1rem',\n '5': '1.25rem',\n '6': '1.5rem',\n '8': '2rem',\n '10': '2.5rem',\n '12': '3rem',\n '16': '4rem',\n '20': '5rem',\n '24': '6rem',\n '32': '8rem',\n '40': '10rem',\n '48': '12rem',\n '56': '14rem',\n '64': '16rem'\n};\nvar tailwindMaxWidth = {\n xs: '20rem',\n sm: '24rem',\n md: '28rem',\n lg: '32rem',\n xl: '36rem',\n '2xl': '42rem',\n '3xl': '48rem',\n '4xl': '56rem',\n '5xl': '64rem',\n '6xl': '72rem'\n};\nvar tailwindWidth = {\n '1/2': '50%',\n '1/3': '33.333333%',\n '2/3': '66.666667%',\n '1/4': '25%',\n '2/4': '50%',\n '3/4': '75%',\n '1/5': '20%',\n '2/5': '40%',\n '3/5': '60%',\n '4/5': '80%',\n '1/6': '16.666667%',\n '2/6': '33.333333%',\n '3/6': '50%',\n '4/6': '66.666667%',\n '5/6': '83.333333%',\n '1/12': '8.333333%',\n '2/12': '16.666667%',\n '3/12': '25%',\n '4/12': '33.333333%',\n '5/12': '41.666667%',\n '6/12': '50%',\n '7/12': '58.333333%',\n '8/12': '66.666667%',\n '9/12': '75%',\n '10/12': '83.333333%',\n '11/12': '91.666667%'\n};\nvar sizes = _extends({}, tailwindSpacing, tailwindMaxWidth, tailwindWidth, {\n full: '100%',\n screenHeight: '100vh',\n screenWidth: '100vw'\n});\nvar shadows = {\n xs: '0 0 0 1px rgba(0, 0, 0, 0.05)',\n sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n default: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)',\n md: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',\n lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',\n xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',\n '2xl': '0 25px 50px -12px rgba(0, 0, 0, 0.25)',\n inner: 'inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)',\n outline: '0 0 0 3px rgba(66, 153, 225, 0.5)',\n none: 'none'\n};\nvar space = ['0', '0.25rem', '0.5rem', '1rem', '2rem', '4rem', '8rem', '16rem', '32rem'];\nvar zIndices = {\n auto: 'auto',\n '0': 0,\n '10': 10,\n '20': 20,\n '30': 30,\n '40': 40,\n '50': 50\n};\nvar heading = {\n fontFamily: 'heading',\n fontWeight: 'heading',\n lineHeight: 'heading',\n m: 0,\n mb: 1\n};\nvar styles = {\n root: {\n fontFamily: 'body',\n lineHeight: 'body',\n fontWeight: 'body'\n },\n a: {\n color: 'primary',\n textDecoration: 'none',\n ':hover': {\n textDecoration: 'underline'\n }\n },\n h1: _extends({}, heading, {\n fontSize: 6,\n mt: 2\n }),\n h2: _extends({}, heading, {\n fontSize: 5,\n mt: 2\n }),\n h3: _extends({}, heading, {\n fontSize: 4,\n mt: 3\n }),\n h4: _extends({}, heading, {\n fontSize: 3\n }),\n h5: _extends({}, heading, {\n fontSize: 2\n }),\n h6: _extends({}, heading, {\n fontSize: 1,\n mb: 2\n }),\n code: {},\n pre: {},\n hr: {\n bg: 'muted',\n border: 0,\n height: '1px',\n m: 3\n }\n};\nvar transforms = {\n transformOrigin: {\n center: 'center',\n top: 'top',\n 'top-right': 'top right',\n right: 'right',\n 'bottom-right': 'bottom right',\n bottom: 'bottom',\n 'bottom-left': 'bottom left',\n left: 'left',\n 'top-left': 'top left'\n },\n translate: _extends({}, tailwindSpacing, {\n '-full': '-100%',\n '-1/2': '-50%',\n '1/2': '50%',\n full: '100%'\n }),\n scale: {\n '0': '0',\n '50': '.5',\n '75': '.75',\n '90': '.9',\n '95': '.95',\n '100': '1',\n '105': '1.05',\n '110': '1.1',\n '125': '1.25',\n '150': '1.5'\n },\n rotate: {\n '-180': '-180deg',\n '-90': '-90deg',\n '-45': '-45deg',\n '0': '0',\n '45': '45deg',\n '90': '90deg',\n '180': '180deg'\n },\n skew: {\n '-12': '-12deg',\n '-6': '-6deg',\n '-3': '-3deg',\n '0': '0',\n '3': '3deg',\n '6': '6deg',\n '12': '12deg'\n }\n};\nvar transitions = {\n property: {\n none: 'none',\n all: 'all',\n default: 'background-color, border-color, color, fill, stroke, opacity, box-shadow, transform',\n colors: 'background-color, border-color, color, fill, stroke',\n opacity: 'opacity',\n shadow: 'box-shadow',\n transform: 'transform'\n },\n timingFunction: {\n linear: 'linear',\n in: 'cubic-bezier(0.4, 0, 1, 1)',\n out: 'cubic-bezier(0, 0, 0.2, 1)',\n 'in-out': 'cubic-bezier(0.4, 0, 0.2, 1)'\n },\n duration: {\n '75': '75ms',\n '100': '100ms',\n '150': '150ms',\n '200': '200ms',\n '300': '300ms',\n '500': '500ms',\n '700': '700ms',\n '1000': '1000ms'\n }\n};\nvar tailwind = makeTheme({\n borderWidths: borderWidths,\n breakpoints: breakpoints,\n colors: colors,\n fonts: fonts,\n fontSizes: fontSizes,\n fontWeights: fontWeights,\n letterSpacings: letterSpacings,\n lineHeights: lineHeights,\n sizes: sizes,\n shadows: shadows,\n space: space,\n radii: radii,\n zIndices: zIndices,\n styles: styles,\n buttons: buttons,\n inputs: inputs,\n transforms: transforms,\n transitions: transitions\n});\n\nexport { baseColors, baseFontWeights, baseFonts, baseLineHeights, borderWidths, breakpoints, buttons, colors, tailwind as default, fontSizes, fontWeights, fonts, inputs, letterSpacings, lineHeights, radii, shadows, sizes, space, styles, tailwind, transforms, transitions, zIndices };\n","import { merge, ThemeUIStyleObject } from \"theme-ui\"\r\nimport tailwind from \"@theme-ui/preset-tailwind\"\r\nimport { lightThemeVars, darkThemeVars } from \"../utils/prism-themes\"\r\n\r\ndeclare module \"theme-ui\" {\r\n interface Theme {\r\n copyButton?: ThemeUIStyleObject\r\n dividers?: ThemeUIStyleObject\r\n }\r\n}\r\n\r\nconst theme = merge(tailwind, {\r\n config: {\r\n initialColorModeName: `light`,\r\n },\r\n colors: {\r\n primary: tailwind.colors.purple[7],\r\n secondary: `#5f6c80`,\r\n toggleIcon: tailwind.colors.gray[8],\r\n heading: tailwind.colors.black,\r\n divide: tailwind.colors.gray[4],\r\n muted: tailwind.colors.gray[2],\r\n highlightLineBg: `rgba(0, 0, 0, 0.035)`,\r\n ...lightThemeVars,\r\n modes: {\r\n dark: {\r\n text: tailwind.colors.gray[4],\r\n primary: tailwind.colors.purple[4],\r\n secondary: `#8a9ab0`,\r\n toggleIcon: tailwind.colors.gray[4],\r\n background: `#1A202C`,\r\n heading: tailwind.colors.white,\r\n divide: tailwind.colors.gray[8],\r\n muted: tailwind.colors.gray[8],\r\n highlightLineBg: `rgba(255, 255, 255, 0.1)`,\r\n ...darkThemeVars,\r\n },\r\n },\r\n },\r\n fonts: {\r\n body: `-apple-system, BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,\"Noto Sans\",sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\"`,\r\n },\r\n styles: {\r\n root: {\r\n color: `text`,\r\n backgroundColor: `background`,\r\n margin: 0,\r\n padding: 0,\r\n boxSizing: `border-box`,\r\n textRendering: `optimizeLegibility`,\r\n WebkitFontSmoothing: `antialiased`,\r\n MozOsxFontSmoothing: `grayscale`,\r\n WebkitTextSizeAdjust: `100%`,\r\n img: {\r\n borderStyle: `none`,\r\n },\r\n pre: {\r\n fontFamily: `monospace`,\r\n fontSize: `1em`,\r\n },\r\n a: {\r\n transition: `all 0.3s ease-in-out`,\r\n color: `text`,\r\n },\r\n },\r\n p: {\r\n fontSize: [1, 1, 2],\r\n letterSpacing: `-0.003em`,\r\n lineHeight: `body`,\r\n \"--baseline-multiplier\": 0.179,\r\n \"--x-height-multiplier\": 0.35,\r\n wordBreak: `break-word`,\r\n },\r\n ul: {\r\n li: {\r\n fontSize: [1, 1, 2],\r\n letterSpacing: `-0.003em`,\r\n lineHeight: `body`,\r\n \"--baseline-multiplier\": 0.179,\r\n \"--x-height-multiplier\": 0.35,\r\n },\r\n },\r\n ol: {\r\n li: {\r\n fontSize: [1, 1, 2],\r\n letterSpacing: `-0.003em`,\r\n lineHeight: `body`,\r\n \"--baseline-multiplier\": 0.179,\r\n \"--x-height-multiplier\": 0.35,\r\n },\r\n },\r\n h1: {\r\n variant: `text.heading`,\r\n fontSize: [4, 5, 5, 6],\r\n mt: 4,\r\n },\r\n h2: {\r\n variant: `text.heading`,\r\n fontSize: [3, 4, 4, 5],\r\n mt: 4,\r\n },\r\n h3: {\r\n variant: `text.heading`,\r\n fontSize: [2, 3, 3, 4],\r\n mt: 4,\r\n },\r\n h4: {\r\n variant: `text.heading`,\r\n fontSize: [1, 2, 2, 3],\r\n mt: 3,\r\n },\r\n h5: {\r\n variant: `text.heading`,\r\n fontSize: [1, 2],\r\n mt: 3,\r\n },\r\n h6: {\r\n variant: `text.heading`,\r\n fontSize: 1,\r\n mb: 2,\r\n },\r\n blockquote: {\r\n borderLeftColor: `primary`,\r\n borderLeftStyle: `solid`,\r\n borderLeftWidth: `4px`,\r\n mx: 0,\r\n pl: 4,\r\n p: {\r\n fontStyle: `italic`,\r\n },\r\n },\r\n table: {\r\n width: `100%`,\r\n my: 4,\r\n borderCollapse: `separate`,\r\n borderSpacing: 0,\r\n th: {\r\n textAlign: `left`,\r\n py: `4px`,\r\n pr: `4px`,\r\n pl: 0,\r\n borderColor: `muted`,\r\n borderBottomStyle: `solid`,\r\n },\r\n td: {\r\n textAlign: `left`,\r\n py: `4px`,\r\n pr: `4px`,\r\n pl: 0,\r\n borderColor: `muted`,\r\n borderBottomStyle: `solid`,\r\n },\r\n },\r\n th: {\r\n verticalAlign: `bottom`,\r\n borderBottomWidth: `2px`,\r\n color: `heading`,\r\n },\r\n td: {\r\n verticalAlign: `top`,\r\n borderBottomWidth: `1px`,\r\n },\r\n hr: {\r\n mx: 0,\r\n },\r\n img: {\r\n borderRadius: `4px`,\r\n boxShadow: `lg`,\r\n maxWidth: `100%`,\r\n },\r\n },\r\n layout: {\r\n container: {\r\n padding: [3, 4],\r\n maxWidth: `1024px`,\r\n },\r\n content: {\r\n figure: {\r\n margin: 0,\r\n img: {\r\n borderRadius: `4px`,\r\n boxShadow: `lg`,\r\n maxWidth: `100%`,\r\n },\r\n },\r\n },\r\n },\r\n text: {\r\n heading: {\r\n fontFamily: `heading`,\r\n fontWeight: `heading`,\r\n lineHeight: `heading`,\r\n color: `heading`,\r\n },\r\n },\r\n copyButton: {\r\n backgroundColor: `background`,\r\n border: `none`,\r\n color: `text`,\r\n cursor: `pointer`,\r\n fontSize: [`14px`, `14px`, `16px`],\r\n fontFamily: `body`,\r\n letterSpacing: `0.025rem`,\r\n transition: `all 0.3s ease-in-out`,\r\n \"&[disabled]\": {\r\n cursor: `not-allowed`,\r\n },\r\n \":not([disabled]):hover\": {\r\n bg: `primary`,\r\n color: `white`,\r\n },\r\n position: `absolute`,\r\n right: 0,\r\n zIndex: 1,\r\n borderRadius: `0 0 0 0.25rem`,\r\n padding: `0.25rem 0.6rem`,\r\n },\r\n dividers: {\r\n bottom: {\r\n borderBottomStyle: `solid`,\r\n borderBottomWidth: `1px`,\r\n borderBottomColor: `divide`,\r\n pb: 3,\r\n },\r\n top: {\r\n borderTopStyle: `solid`,\r\n borderTopWidth: `1px`,\r\n borderTopColor: `divide`,\r\n pt: 3,\r\n },\r\n },\r\n links: {\r\n secondary: {\r\n color: `secondary`,\r\n textDecoration: `none`,\r\n \":hover\": {\r\n color: `heading`,\r\n textDecoration: `underline`,\r\n },\r\n \":focus\": {\r\n color: `heading`,\r\n },\r\n },\r\n listItem: {\r\n fontSize: [1, 2, 3],\r\n color: `text`,\r\n },\r\n },\r\n})\r\n\r\nexport default theme\r\n","// add custom MDX components here\nconst components = {}\n\nexport default components\n","import { useStaticQuery, graphql } from 'gatsby'\n\nconst useThemeUiConfig = () => {\n const data = useStaticQuery(graphql`\n query {\n themeUiConfig(id: { eq: \"gatsby-plugin-theme-ui-config\" }) {\n preset\n prismPreset\n }\n }\n `)\n\n return data.themeUiConfig\n}\n\nexport default useThemeUiConfig\n","import { ThemeProvider, merge } from 'theme-ui'\nimport { useThemedStylesWithMdx } from '@theme-ui/mdx'\nimport React from 'react'\n\nimport localTheme from './index'\nimport components from './components'\nimport useThemeUiConfig from './hooks/configOptions'\n\nimport { MDXProvider, useMDXComponents } from '@mdx-js/react'\n\nconst Root = ({ children }) => {\n const themeUiConfig = useThemeUiConfig()\n const { preset, prismPreset } = themeUiConfig\n\n const theme = preset.default || preset\n\n const themeWithPrism = merge(theme, {\n styles: {\n pre: prismPreset,\n },\n })\n\n const fullTheme = merge(themeWithPrism, localTheme)\n\n return (\n
\n \n {children}\n \n \n )\n}\n\nexport const WrapRootElement = ({ element }) => {\n return
{element}\n}\n","import * as React from 'react'\nimport { WrapRootElement } from './src/provider'\n\nexport const wrapRootElement = ({ element }) =>\n React.createElement(WrapRootElement, { element })\n","\"use strict\";\n\nexports.DEFAULT_OPTIONS = {\n maxWidth: 650,\n wrapperStyle: \"\",\n backgroundColor: \"white\",\n linkImagesToOriginal: true,\n showCaptions: false,\n markdownCaptions: false,\n withWebp: false,\n withAvif: false,\n tracedSVG: false,\n loading: \"lazy\",\n decoding: \"async\",\n disableBgImageOnAlpha: false,\n disableBgImage: false\n};\nexports.EMPTY_ALT = \"GATSBY_EMPTY_ALT\";\nexports.imageClass = \"gatsby-resp-image-image\";\nexports.imageWrapperClass = \"gatsby-resp-image-wrapper\";\nexports.imageBackgroundClass = \"gatsby-resp-image-background-image\";","\"use strict\";\n\nvar _require = require(\"./constants\"),\n DEFAULT_OPTIONS = _require.DEFAULT_OPTIONS,\n imageClass = _require.imageClass,\n imageBackgroundClass = _require.imageBackgroundClass,\n imageWrapperClass = _require.imageWrapperClass;\nexports.onRouteUpdate = function (apiCallbackContext, pluginOptions) {\n var options = Object.assign({}, DEFAULT_OPTIONS, pluginOptions);\n var imageWrappers = document.querySelectorAll(\".\" + imageWrapperClass);\n\n // https://css-tricks.com/snippets/javascript/loop-queryselectorall-matches/\n // for cross-browser looping through NodeList without polyfills\n var _loop = function _loop() {\n var imageWrapper = imageWrappers[i];\n var backgroundElement = imageWrapper.querySelector(\".\" + imageBackgroundClass);\n var imageElement = imageWrapper.querySelector(\".\" + imageClass);\n var onImageLoad = function onImageLoad() {\n backgroundElement.style.transition = \"opacity 0.5s 0.5s\";\n imageElement.style.transition = \"opacity 0.5s\";\n onImageComplete();\n };\n var onImageComplete = function onImageComplete() {\n backgroundElement.style.opacity = 0;\n imageElement.style.opacity = 1;\n imageElement.style.color = \"inherit\";\n imageElement.style.boxShadow = \"inset 0px 0px 0px 400px \" + options.backgroundColor;\n imageElement.removeEventListener(\"load\", onImageLoad);\n imageElement.removeEventListener(\"error\", onImageComplete);\n };\n imageElement.style.opacity = 0;\n imageElement.addEventListener(\"load\", onImageLoad);\n imageElement.addEventListener(\"error\", onImageComplete);\n if (imageElement.complete) {\n onImageComplete();\n }\n };\n for (var i = 0; i < imageWrappers.length; i++) {\n _loop();\n }\n};","// Modified from https://github.com/FormidableLabs/prism-react-renderer/pull/160/\r\n\r\nimport type { PrismTheme } from \"prism-react-renderer\"\r\n\r\ntype StyleObj = { [key: string]: string }\r\n\r\nconst flattenThemeTypes = (theme: PrismTheme): PrismTheme => {\r\n const { plain, styles } = theme\r\n\r\n return {\r\n plain: { ...plain },\r\n styles: styles.reduce((acc: PrismTheme[\"styles\"], x) => {\r\n const { types, style, ...rest } = x\r\n const flatStyle = types.map((type) => ({\r\n types: [type],\r\n style: { ...style },\r\n ...rest,\r\n }))\r\n acc.push(...flatStyle)\r\n return acc\r\n }, []),\r\n }\r\n}\r\n\r\n/**\r\n * Modified for Theme UI usage!\r\n *\r\n * Returns a PrismTheme that is visually equivalent to `theme`\r\n * but with CSS Variables instead of fixed values (e.g.\r\n * `var(--theme-ui-colors-plain-color)` instead of `\"#F8F8F2\"`).\r\n *\r\n * Also returns a mapping from CSS Variable to value (i.e. an\r\n * object with key `--theme-ui-colors-plain-color` and value `\"#F8F8F2\"`)\r\n */\r\nexport const themeWithCssVariables = (theme: PrismTheme): { theme: PrismTheme; variables: StyleObj } => {\r\n const flatTheme = flattenThemeTypes(theme)\r\n const variables: StyleObj = {}\r\n\r\n const { plain, styles } = flatTheme\r\n\r\n Object.entries(plain).forEach(([key, value]) => {\r\n const varName = `plain-${key}`\r\n variables[varName] = value as string\r\n // Will not modify `theme` because `flattenThemeTypes`\r\n // deep clones the original `theme` object\r\n plain[key] = `var(--theme-ui-colors-${varName})`\r\n })\r\n\r\n // `types` should have length 1\r\n styles.forEach(({ style, types }) => {\r\n Object.entries(style).forEach(([key, value]) => {\r\n const varName = `${types[0]}-${key}`\r\n variables[varName] = value as string\r\n // Will not modify `theme` because `flattenThemeTypes`\r\n // deep clones the original `theme` object\r\n style[key] = `var(--theme-ui-colors-${varName})`\r\n })\r\n })\r\n\r\n return { theme: flatTheme, variables }\r\n}\r\n","import { themes } from \"prism-react-renderer\"\r\nimport { themeWithCssVariables } from \"./prism-utils\"\r\n\r\nconst { github, vsDark } = themes\r\nconst { theme: lightTheme, variables: lightThemeVars } = themeWithCssVariables(github)\r\nconst { theme: darkTheme, variables: darkThemeVars } = themeWithCssVariables(vsDark)\r\n\r\nexport { lightTheme, darkTheme, lightThemeVars, darkThemeVars }\r\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/**\n * @license React\n * react-server-dom-webpack.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var k=require(\"react\"),l={stream:!0},n=new Map,p=Symbol.for(\"react.element\"),q=Symbol.for(\"react.lazy\"),r=Symbol.for(\"react.default_value\"),t=k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function u(a){t[a]||(t[a]=k.createServerContext(a,r));return t[a]}function v(a,b,c){this._status=a;this._value=b;this._response=c}v.prototype.then=function(a){0===this._status?(null===this._value&&(this._value=[]),this._value.push(a)):a()};\nfunction w(a){switch(a._status){case 3:return a._value;case 1:var b=JSON.parse(a._value,a._response._fromJSON);a._status=3;return a._value=b;case 2:b=a._value;for(var c=b.chunks,d=0;d
{\n const { forward = [], ...filteredConfig } = config || {};\n const configStr = JSON.stringify(filteredConfig, (k, v) => {\n if (typeof v === 'function') {\n v = String(v);\n if (v.startsWith(k + '(')) {\n v = 'function ' + v;\n }\n }\n return v;\n });\n return [\n `!(function(w,p,f,c){`,\n Object.keys(filteredConfig).length > 0\n ? `c=w[p]=Object.assign(w[p]||{},${configStr});`\n : `c=w[p]=w[p]||{};`,\n `c[f]=(c[f]||[])`,\n forward.length > 0 ? `.concat(${JSON.stringify(forward)})` : ``,\n `})(window,'partytown','forward');`,\n snippetCode,\n ].join('');\n};\n\n/**\n * The `type` attribute for Partytown scripts, which does two things:\n *\n * 1. Prevents the `