(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","'use client'\n\n// src/css-reset.tsx\nimport { Global } from \"@emotion/react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar css = String.raw;\nvar vhPolyfill = css`\n :root,\n :host {\n --chakra-vh: 100vh;\n }\n\n @supports (height: -webkit-fill-available) {\n :root,\n :host {\n --chakra-vh: -webkit-fill-available;\n }\n }\n\n @supports (height: -moz-fill-available) {\n :root,\n :host {\n --chakra-vh: -moz-fill-available;\n }\n }\n\n @supports (height: 100dvh) {\n :root,\n :host {\n --chakra-vh: 100dvh;\n }\n }\n`;\nvar CSSPolyfill = () => /* @__PURE__ */ jsx(Global, { styles: vhPolyfill });\nvar CSSReset = ({ scope = \"\" }) => /* @__PURE__ */ jsx(\n Global,\n {\n styles: css`\n html {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n font-family: system-ui, sans-serif;\n -webkit-font-smoothing: antialiased;\n text-rendering: optimizeLegibility;\n -moz-osx-font-smoothing: grayscale;\n touch-action: manipulation;\n }\n\n body {\n position: relative;\n min-height: 100%;\n margin: 0;\n font-feature-settings: \"kern\";\n }\n\n ${scope} :where(*, *::before, *::after) {\n border-width: 0;\n border-style: solid;\n box-sizing: border-box;\n word-wrap: break-word;\n }\n\n main {\n display: block;\n }\n\n ${scope} hr {\n border-top-width: 1px;\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n\n ${scope} :where(pre, code, kbd,samp) {\n font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n font-size: 1em;\n }\n\n ${scope} a {\n background-color: transparent;\n color: inherit;\n text-decoration: inherit;\n }\n\n ${scope} abbr[title] {\n border-bottom: none;\n text-decoration: underline;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n\n ${scope} :where(b, strong) {\n font-weight: bold;\n }\n\n ${scope} small {\n font-size: 80%;\n }\n\n ${scope} :where(sub,sup) {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n\n ${scope} sub {\n bottom: -0.25em;\n }\n\n ${scope} sup {\n top: -0.5em;\n }\n\n ${scope} img {\n border-style: none;\n }\n\n ${scope} :where(button, input, optgroup, select, textarea) {\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n }\n\n ${scope} :where(button, input) {\n overflow: visible;\n }\n\n ${scope} :where(button, select) {\n text-transform: none;\n }\n\n ${scope} :where(\n button::-moz-focus-inner,\n [type=\"button\"]::-moz-focus-inner,\n [type=\"reset\"]::-moz-focus-inner,\n [type=\"submit\"]::-moz-focus-inner\n ) {\n border-style: none;\n padding: 0;\n }\n\n ${scope} fieldset {\n padding: 0.35em 0.75em 0.625em;\n }\n\n ${scope} legend {\n box-sizing: border-box;\n color: inherit;\n display: table;\n max-width: 100%;\n padding: 0;\n white-space: normal;\n }\n\n ${scope} progress {\n vertical-align: baseline;\n }\n\n ${scope} textarea {\n overflow: auto;\n }\n\n ${scope} :where([type=\"checkbox\"], [type=\"radio\"]) {\n box-sizing: border-box;\n padding: 0;\n }\n\n ${scope} input[type=\"number\"]::-webkit-inner-spin-button,\n ${scope} input[type=\"number\"]::-webkit-outer-spin-button {\n -webkit-appearance: none !important;\n }\n\n ${scope} input[type=\"number\"] {\n -moz-appearance: textfield;\n }\n\n ${scope} input[type=\"search\"] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n }\n\n ${scope} input[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none !important;\n }\n\n ${scope} ::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n }\n\n ${scope} details {\n display: block;\n }\n\n ${scope} summary {\n display: list-item;\n }\n\n template {\n display: none;\n }\n\n [hidden] {\n display: none !important;\n }\n\n ${scope} :where(\n blockquote,\n dl,\n dd,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n hr,\n figure,\n p,\n pre\n ) {\n margin: 0;\n }\n\n ${scope} button {\n background: transparent;\n padding: 0;\n }\n\n ${scope} fieldset {\n margin: 0;\n padding: 0;\n }\n\n ${scope} :where(ol, ul) {\n margin: 0;\n padding: 0;\n }\n\n ${scope} textarea {\n resize: vertical;\n }\n\n ${scope} :where(button, [role=\"button\"]) {\n cursor: pointer;\n }\n\n ${scope} button::-moz-focus-inner {\n border: 0 !important;\n }\n\n ${scope} table {\n border-collapse: collapse;\n }\n\n ${scope} :where(h1, h2, h3, h4, h5, h6) {\n font-size: inherit;\n font-weight: inherit;\n }\n\n ${scope} :where(button, input, optgroup, select, textarea) {\n padding: 0;\n line-height: inherit;\n color: inherit;\n }\n\n ${scope} :where(img, svg, video, canvas, audio, iframe, embed, object) {\n display: block;\n }\n\n ${scope} :where(img, video) {\n max-width: 100%;\n height: auto;\n }\n\n [data-js-focus-visible]\n :focus:not([data-focus-visible-added]):not(\n [data-focus-visible-disabled]\n ) {\n outline: none;\n box-shadow: none;\n }\n\n ${scope} select::-ms-expand {\n display: none;\n }\n\n ${vhPolyfill}\n `\n }\n);\nvar css_reset_default = CSSReset;\n\nexport {\n CSSPolyfill,\n CSSReset,\n css_reset_default\n};\n//# sourceMappingURL=chunk-B4LBJQ3X.mjs.map","'use client'\n\n// src/providers.tsx\nimport { useColorMode } from \"@chakra-ui/color-mode\";\nimport { createContext } from \"@chakra-ui/react-utils\";\nimport { css, toCSSVar } from \"@chakra-ui/styled-system\";\nimport { memoizedGet as get, runIfFn } from \"@chakra-ui/utils\";\nimport {\n Global,\n ThemeProvider as EmotionThemeProvider\n} from \"@emotion/react\";\nimport { useMemo } from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nfunction ThemeProvider(props) {\n const { cssVarsRoot, theme, children } = props;\n const computedTheme = useMemo(() => toCSSVar(theme), [theme]);\n return /* @__PURE__ */ jsxs(EmotionThemeProvider, { theme: computedTheme, children: [\n /* @__PURE__ */ jsx(CSSVars, { root: cssVarsRoot }),\n children\n ] });\n}\nfunction CSSVars({ root = \":host, :root\" }) {\n const selector = [root, `[data-theme]`].join(\",\");\n return /* @__PURE__ */ jsx(Global, { styles: (theme) => ({ [selector]: theme.__cssVars }) });\n}\nvar [StylesProvider, useStyles] = createContext({\n name: \"StylesContext\",\n errorMessage: \"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `
` \"\n});\nfunction createStylesContext(componentName) {\n return createContext({\n name: `${componentName}StylesContext`,\n errorMessage: `useStyles: \"styles\" is undefined. Seems you forgot to wrap the components in \"<${componentName} />\" `\n });\n}\nfunction GlobalStyle() {\n const { colorMode } = useColorMode();\n return /* @__PURE__ */ jsx(\n Global,\n {\n styles: (theme) => {\n const styleObjectOrFn = get(theme, \"styles.global\");\n const globalStyles = runIfFn(styleObjectOrFn, { theme, colorMode });\n if (!globalStyles)\n return void 0;\n const styles = css(globalStyles)(theme);\n return styles;\n }\n }\n );\n}\n\nexport {\n ThemeProvider,\n CSSVars,\n StylesProvider,\n useStyles,\n createStylesContext,\n GlobalStyle\n};\n//# sourceMappingURL=chunk-MFVQSVQB.mjs.map","// src/context.ts\nimport {\n createContext as createReactContext,\n useContext as useReactContext\n} from \"react\";\nfunction createContext(options = {}) {\n const {\n strict = true,\n errorMessage = \"useContext: `context` is undefined. Seems you forgot to wrap component within the Provider\",\n name\n } = options;\n const Context = createReactContext(void 0);\n Context.displayName = name;\n function useContext() {\n var _a;\n const context = useReactContext(Context);\n if (!context && strict) {\n const error = new Error(errorMessage);\n error.name = \"ContextError\";\n (_a = Error.captureStackTrace) == null ? void 0 : _a.call(Error, error, useContext);\n throw error;\n }\n return context;\n }\n return [\n Context.Provider,\n useContext,\n Context\n ];\n}\n\nexport {\n createContext\n};\n","'use client'\n\n// src/color-mode.utils.ts\nvar classNames = {\n light: \"chakra-ui-light\",\n dark: \"chakra-ui-dark\"\n};\nfunction getColorModeUtils(options = {}) {\n const { preventTransition = true } = options;\n const utils = {\n setDataset: (value) => {\n const cleanup = preventTransition ? utils.preventTransition() : void 0;\n document.documentElement.dataset.theme = value;\n document.documentElement.style.colorScheme = value;\n cleanup == null ? void 0 : cleanup();\n },\n setClassName(dark) {\n document.body.classList.add(dark ? classNames.dark : classNames.light);\n document.body.classList.remove(dark ? classNames.light : classNames.dark);\n },\n query() {\n return window.matchMedia(\"(prefers-color-scheme: dark)\");\n },\n getSystemTheme(fallback) {\n var _a;\n const dark = (_a = utils.query().matches) != null ? _a : fallback === \"dark\";\n return dark ? \"dark\" : \"light\";\n },\n addListener(fn) {\n const mql = utils.query();\n const listener = (e) => {\n fn(e.matches ? \"dark\" : \"light\");\n };\n if (typeof mql.addListener === \"function\")\n mql.addListener(listener);\n else\n mql.addEventListener(\"change\", listener);\n return () => {\n if (typeof mql.removeListener === \"function\")\n mql.removeListener(listener);\n else\n mql.removeEventListener(\"change\", listener);\n };\n },\n preventTransition() {\n const css = document.createElement(\"style\");\n css.appendChild(\n document.createTextNode(\n `*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`\n )\n );\n document.head.appendChild(css);\n return () => {\n ;\n (() => window.getComputedStyle(document.body))();\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n document.head.removeChild(css);\n });\n });\n };\n }\n };\n return utils;\n}\n\nexport {\n getColorModeUtils\n};\n//# sourceMappingURL=chunk-X7ZBZ4KW.mjs.map","'use client'\n\n// src/storage-manager.ts\nvar STORAGE_KEY = \"chakra-ui-color-mode\";\nfunction createLocalStorageManager(key) {\n return {\n ssr: false,\n type: \"localStorage\",\n get(init) {\n if (!(globalThis == null ? void 0 : globalThis.document))\n return init;\n let value;\n try {\n value = localStorage.getItem(key) || init;\n } catch (e) {\n }\n return value || init;\n },\n set(value) {\n try {\n localStorage.setItem(key, value);\n } catch (e) {\n }\n }\n };\n}\nvar localStorageManager = createLocalStorageManager(STORAGE_KEY);\nfunction parseCookie(cookie, key) {\n const match = cookie.match(new RegExp(`(^| )${key}=([^;]+)`));\n return match == null ? void 0 : match[2];\n}\nfunction createCookieStorageManager(key, cookie) {\n return {\n ssr: !!cookie,\n type: \"cookie\",\n get(init) {\n if (cookie)\n return parseCookie(cookie, key);\n if (!(globalThis == null ? void 0 : globalThis.document))\n return init;\n return parseCookie(document.cookie, key) || init;\n },\n set(value) {\n document.cookie = `${key}=${value}; max-age=31536000; path=/`;\n }\n };\n}\nvar cookieStorageManager = createCookieStorageManager(STORAGE_KEY);\nvar cookieStorageManagerSSR = (cookie) => createCookieStorageManager(STORAGE_KEY, cookie);\n\nexport {\n STORAGE_KEY,\n createLocalStorageManager,\n localStorageManager,\n createCookieStorageManager,\n cookieStorageManager,\n cookieStorageManagerSSR\n};\n//# sourceMappingURL=chunk-44OWBZ77.mjs.map","'use client'\nimport {\n ColorModeContext\n} from \"./chunk-UQDW7KKV.mjs\";\nimport {\n getColorModeUtils\n} from \"./chunk-X7ZBZ4KW.mjs\";\nimport {\n localStorageManager\n} from \"./chunk-44OWBZ77.mjs\";\n\n// src/color-mode-provider.tsx\nimport { useSafeLayoutEffect } from \"@chakra-ui/react-use-safe-layout-effect\";\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar noop = () => {\n};\nfunction getTheme(manager, fallback) {\n return manager.type === \"cookie\" && manager.ssr ? manager.get(fallback) : fallback;\n}\nfunction ColorModeProvider(props) {\n const {\n value,\n children,\n options: {\n useSystemColorMode,\n initialColorMode,\n disableTransitionOnChange\n } = {},\n colorModeManager = localStorageManager\n } = props;\n const defaultColorMode = initialColorMode === \"dark\" ? \"dark\" : \"light\";\n const [colorMode, rawSetColorMode] = useState(\n () => getTheme(colorModeManager, defaultColorMode)\n );\n const [resolvedColorMode, setResolvedColorMode] = useState(\n () => getTheme(colorModeManager)\n );\n const { getSystemTheme, setClassName, setDataset, addListener } = useMemo(\n () => getColorModeUtils({ preventTransition: disableTransitionOnChange }),\n [disableTransitionOnChange]\n );\n const resolvedValue = initialColorMode === \"system\" && !colorMode ? resolvedColorMode : colorMode;\n const setColorMode = useCallback(\n (value2) => {\n const resolved = value2 === \"system\" ? getSystemTheme() : value2;\n rawSetColorMode(resolved);\n setClassName(resolved === \"dark\");\n setDataset(resolved);\n colorModeManager.set(resolved);\n },\n [colorModeManager, getSystemTheme, setClassName, setDataset]\n );\n useSafeLayoutEffect(() => {\n if (initialColorMode === \"system\") {\n setResolvedColorMode(getSystemTheme());\n }\n }, []);\n useEffect(() => {\n const managerValue = colorModeManager.get();\n if (managerValue) {\n setColorMode(managerValue);\n return;\n }\n if (initialColorMode === \"system\") {\n setColorMode(\"system\");\n return;\n }\n setColorMode(defaultColorMode);\n }, [colorModeManager, defaultColorMode, initialColorMode, setColorMode]);\n const toggleColorMode = useCallback(() => {\n setColorMode(resolvedValue === \"dark\" ? \"light\" : \"dark\");\n }, [resolvedValue, setColorMode]);\n useEffect(() => {\n if (!useSystemColorMode)\n return;\n return addListener(setColorMode);\n }, [useSystemColorMode, addListener, setColorMode]);\n const context = useMemo(\n () => ({\n colorMode: value != null ? value : resolvedValue,\n toggleColorMode: value ? noop : toggleColorMode,\n setColorMode: value ? noop : setColorMode,\n forced: value !== void 0\n }),\n [resolvedValue, toggleColorMode, setColorMode, value]\n );\n return /* @__PURE__ */ jsx(ColorModeContext.Provider, { value: context, children });\n}\nColorModeProvider.displayName = \"ColorModeProvider\";\nfunction DarkMode(props) {\n const context = useMemo(\n () => ({\n colorMode: \"dark\",\n toggleColorMode: noop,\n setColorMode: noop,\n forced: true\n }),\n []\n );\n return /* @__PURE__ */ jsx(ColorModeContext.Provider, { value: context, ...props });\n}\nDarkMode.displayName = \"DarkMode\";\nfunction LightMode(props) {\n const context = useMemo(\n () => ({\n colorMode: \"light\",\n toggleColorMode: noop,\n setColorMode: noop,\n forced: true\n }),\n []\n );\n return /* @__PURE__ */ jsx(ColorModeContext.Provider, { value: context, ...props });\n}\nLightMode.displayName = \"LightMode\";\n\nexport {\n ColorModeProvider,\n DarkMode,\n LightMode\n};\n//# sourceMappingURL=chunk-AMBGAKG2.mjs.map","'use client'\n\n// src/chakra-provider.tsx\nimport { CSSReset, CSSPolyfill } from \"@chakra-ui/css-reset\";\nimport { PortalManager } from \"@chakra-ui/portal\";\nimport {\n ColorModeProvider,\n GlobalStyle,\n ThemeProvider\n} from \"@chakra-ui/system\";\nimport {\n EnvironmentProvider\n} from \"@chakra-ui/react-env\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar ChakraProvider = (props) => {\n const {\n children,\n colorModeManager,\n portalZIndex,\n resetScope,\n resetCSS = true,\n theme = {},\n environment,\n cssVarsRoot,\n disableEnvironment,\n disableGlobalStyle\n } = props;\n const _children = /* @__PURE__ */ jsx(\n EnvironmentProvider,\n {\n environment,\n disabled: disableEnvironment,\n children\n }\n );\n return /* @__PURE__ */ jsx(ThemeProvider, { theme, cssVarsRoot, children: /* @__PURE__ */ jsxs(\n ColorModeProvider,\n {\n colorModeManager,\n options: theme.config,\n children: [\n resetCSS ? /* @__PURE__ */ jsx(CSSReset, { scope: resetScope }) : /* @__PURE__ */ jsx(CSSPolyfill, {}),\n !disableGlobalStyle && /* @__PURE__ */ jsx(GlobalStyle, {}),\n portalZIndex ? /* @__PURE__ */ jsx(PortalManager, { zIndex: portalZIndex, children: _children }) : _children\n ]\n }\n ) });\n};\n\nexport {\n ChakraProvider\n};\n//# sourceMappingURL=chunk-3DDHO3UN.mjs.map","'use client'\n\n// src/toast.utils.ts\nvar findById = (arr, id) => arr.find((toast) => toast.id === id);\nfunction findToast(toasts, id) {\n const position = getToastPosition(toasts, id);\n const index = position ? toasts[position].findIndex((toast) => toast.id === id) : -1;\n return {\n position,\n index\n };\n}\nfunction getToastPosition(toasts, id) {\n for (const [position, values] of Object.entries(toasts)) {\n if (findById(values, id)) {\n return position;\n }\n }\n}\nvar isVisible = (toasts, id) => !!getToastPosition(toasts, id);\nfunction getToastStyle(position) {\n const isRighty = position.includes(\"right\");\n const isLefty = position.includes(\"left\");\n let alignItems = \"center\";\n if (isRighty)\n alignItems = \"flex-end\";\n if (isLefty)\n alignItems = \"flex-start\";\n return {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems\n };\n}\nfunction getToastListStyle(position) {\n const isTopOrBottom = position === \"top\" || position === \"bottom\";\n const margin = isTopOrBottom ? \"0 auto\" : void 0;\n const top = position.includes(\"top\") ? \"env(safe-area-inset-top, 0px)\" : void 0;\n const bottom = position.includes(\"bottom\") ? \"env(safe-area-inset-bottom, 0px)\" : void 0;\n const right = !position.includes(\"left\") ? \"env(safe-area-inset-right, 0px)\" : void 0;\n const left = !position.includes(\"right\") ? \"env(safe-area-inset-left, 0px)\" : void 0;\n return {\n position: \"fixed\",\n zIndex: \"var(--toast-z-index, 5500)\",\n pointerEvents: \"none\",\n display: \"flex\",\n flexDirection: \"column\",\n margin,\n top,\n bottom,\n right,\n left\n };\n}\n\nexport {\n findById,\n findToast,\n getToastPosition,\n isVisible,\n getToastStyle,\n getToastListStyle\n};\n//# sourceMappingURL=chunk-LDADOVIM.mjs.map","'use client'\n\n// src/index.ts\nimport { useEffect, useRef } from \"react\";\nfunction useUpdateEffect(callback, deps) {\n const renderCycleRef = useRef(false);\n const effectCycleRef = useRef(false);\n useEffect(() => {\n const mounted = renderCycleRef.current;\n const run = mounted && effectCycleRef.current;\n if (run) {\n return callback();\n }\n effectCycleRef.current = true;\n }, deps);\n useEffect(() => {\n renderCycleRef.current = true;\n return () => {\n renderCycleRef.current = false;\n };\n }, []);\n}\nexport {\n useUpdateEffect\n};\n//# sourceMappingURL=index.mjs.map","'use client'\nimport {\n getToastStyle\n} from \"./chunk-LDADOVIM.mjs\";\n\n// src/toast.component.tsx\nimport { useTimeout } from \"@chakra-ui/react-use-timeout\";\nimport { useUpdateEffect } from \"@chakra-ui/react-use-update-effect\";\nimport { runIfFn } from \"@chakra-ui/shared-utils\";\nimport { motion, useIsPresent } from \"framer-motion\";\nimport { chakra } from \"@chakra-ui/system\";\nimport { memo, useEffect, useMemo, useState } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar toastMotionVariants = {\n initial: (props) => {\n const { position } = props;\n const dir = [\"top\", \"bottom\"].includes(position) ? \"y\" : \"x\";\n let factor = [\"top-right\", \"bottom-right\"].includes(position) ? 1 : -1;\n if (position === \"bottom\")\n factor = 1;\n return {\n opacity: 0,\n [dir]: factor * 24\n };\n },\n animate: {\n opacity: 1,\n y: 0,\n x: 0,\n scale: 1,\n transition: {\n duration: 0.4,\n ease: [0.4, 0, 0.2, 1]\n }\n },\n exit: {\n opacity: 0,\n scale: 0.85,\n transition: {\n duration: 0.2,\n ease: [0.4, 0, 1, 1]\n }\n }\n};\nvar ToastComponent = memo((props) => {\n const {\n id,\n message,\n onCloseComplete,\n onRequestRemove,\n requestClose = false,\n position = \"bottom\",\n duration = 5e3,\n containerStyle,\n motionVariants = toastMotionVariants,\n toastSpacing = \"0.5rem\"\n } = props;\n const [delay, setDelay] = useState(duration);\n const isPresent = useIsPresent();\n useUpdateEffect(() => {\n if (!isPresent) {\n onCloseComplete == null ? void 0 : onCloseComplete();\n }\n }, [isPresent]);\n useUpdateEffect(() => {\n setDelay(duration);\n }, [duration]);\n const onMouseEnter = () => setDelay(null);\n const onMouseLeave = () => setDelay(duration);\n const close = () => {\n if (isPresent)\n onRequestRemove();\n };\n useEffect(() => {\n if (isPresent && requestClose) {\n onRequestRemove();\n }\n }, [isPresent, requestClose, onRequestRemove]);\n useTimeout(close, delay);\n const containerStyles = useMemo(\n () => ({\n pointerEvents: \"auto\",\n maxWidth: 560,\n minWidth: 300,\n margin: toastSpacing,\n ...containerStyle\n }),\n [containerStyle, toastSpacing]\n );\n const toastStyle = useMemo(() => getToastStyle(position), [position]);\n return /* @__PURE__ */ jsx(\n motion.div,\n {\n layout: true,\n className: \"chakra-toast\",\n variants: motionVariants,\n initial: \"initial\",\n animate: \"animate\",\n exit: \"exit\",\n onHoverStart: onMouseEnter,\n onHoverEnd: onMouseLeave,\n custom: { position },\n style: toastStyle,\n children: /* @__PURE__ */ jsx(\n chakra.div,\n {\n role: \"status\",\n \"aria-atomic\": \"true\",\n className: \"chakra-toast__inner\",\n __css: containerStyles,\n children: runIfFn(message, { id, onClose: close })\n }\n )\n }\n );\n});\nToastComponent.displayName = \"ToastComponent\";\n\nexport {\n ToastComponent\n};\n//# sourceMappingURL=chunk-VXESY33O.mjs.map","'use client'\n\n// src/index.ts\nimport { useEffect } from \"react\";\nimport { useCallbackRef } from \"@chakra-ui/react-use-callback-ref\";\nfunction useTimeout(callback, delay) {\n const fn = useCallbackRef(callback);\n useEffect(() => {\n if (delay == null)\n return void 0;\n let timeoutId = null;\n timeoutId = window.setTimeout(() => {\n fn();\n }, delay);\n return () => {\n if (timeoutId) {\n window.clearTimeout(timeoutId);\n }\n };\n }, [delay, fn]);\n}\nexport {\n useTimeout\n};\n//# sourceMappingURL=index.mjs.map","'use client'\n\n// src/icons.tsx\nimport { Icon } from \"@chakra-ui/icon\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction CheckIcon(props) {\n return /* @__PURE__ */ jsx(Icon, { viewBox: \"0 0 24 24\", ...props, children: /* @__PURE__ */ jsx(\n \"path\",\n {\n fill: \"currentColor\",\n d: \"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z\"\n }\n ) });\n}\nfunction InfoIcon(props) {\n return /* @__PURE__ */ jsx(Icon, { viewBox: \"0 0 24 24\", ...props, children: /* @__PURE__ */ jsx(\n \"path\",\n {\n fill: \"currentColor\",\n d: \"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z\"\n }\n ) });\n}\nfunction WarningIcon(props) {\n return /* @__PURE__ */ jsx(Icon, { viewBox: \"0 0 24 24\", ...props, children: /* @__PURE__ */ jsx(\n \"path\",\n {\n fill: \"currentColor\",\n d: \"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z\"\n }\n ) });\n}\n\nexport {\n CheckIcon,\n InfoIcon,\n WarningIcon\n};\n//# sourceMappingURL=chunk-NEDBTDT2.mjs.map","'use client'\nimport {\n CheckIcon,\n InfoIcon,\n WarningIcon\n} from \"./chunk-NEDBTDT2.mjs\";\n\n// src/alert-context.ts\nimport { createContext } from \"@chakra-ui/react-context\";\nimport { Spinner } from \"@chakra-ui/spinner\";\nvar [AlertProvider, useAlertContext] = createContext({\n name: \"AlertContext\",\n hookName: \"useAlertContext\",\n providerName: \"
\"\n});\nvar [AlertStylesProvider, useAlertStyles] = createContext({\n name: `AlertStylesContext`,\n hookName: `useAlertStyles`,\n providerName: \"
\"\n});\nvar STATUSES = {\n info: { icon: InfoIcon, colorScheme: \"blue\" },\n warning: { icon: WarningIcon, colorScheme: \"orange\" },\n success: { icon: CheckIcon, colorScheme: \"green\" },\n error: { icon: WarningIcon, colorScheme: \"red\" },\n loading: { icon: Spinner, colorScheme: \"blue\" }\n};\nfunction getStatusColorScheme(status) {\n return STATUSES[status].colorScheme;\n}\nfunction getStatusIcon(status) {\n return STATUSES[status].icon;\n}\n\nexport {\n AlertProvider,\n useAlertContext,\n AlertStylesProvider,\n useAlertStyles,\n getStatusColorScheme,\n getStatusIcon\n};\n//# sourceMappingURL=chunk-XCES3W5V.mjs.map","'use client'\nimport {\n AlertProvider,\n AlertStylesProvider,\n getStatusColorScheme\n} from \"./chunk-XCES3W5V.mjs\";\n\n// src/alert.tsx\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useMultiStyleConfig\n} from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Alert = forwardRef(function Alert2(props, ref) {\n var _a;\n const { status = \"info\", addRole = true, ...rest } = omitThemingProps(props);\n const colorScheme = (_a = props.colorScheme) != null ? _a : getStatusColorScheme(status);\n const styles = useMultiStyleConfig(\"Alert\", { ...props, colorScheme });\n const alertStyles = {\n width: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n position: \"relative\",\n overflow: \"hidden\",\n ...styles.container\n };\n return /* @__PURE__ */ jsx(AlertProvider, { value: { status }, children: /* @__PURE__ */ jsx(AlertStylesProvider, { value: styles, children: /* @__PURE__ */ jsx(\n chakra.div,\n {\n \"data-status\": status,\n role: addRole ? \"alert\" : void 0,\n ref,\n ...rest,\n className: cx(\"chakra-alert\", props.className),\n __css: alertStyles\n }\n ) }) });\n});\nAlert.displayName = \"Alert\";\n\nexport {\n Alert\n};\n//# sourceMappingURL=chunk-3KCBMPN5.mjs.map","'use client'\nimport {\n getStatusIcon,\n useAlertContext,\n useAlertStyles\n} from \"./chunk-XCES3W5V.mjs\";\n\n// src/alert-icon.tsx\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { chakra } from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction AlertIcon(props) {\n const { status } = useAlertContext();\n const BaseIcon = getStatusIcon(status);\n const styles = useAlertStyles();\n const css = status === \"loading\" ? styles.spinner : styles.icon;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n display: \"inherit\",\n \"data-status\": status,\n ...props,\n className: cx(\"chakra-alert__icon\", props.className),\n __css: css,\n children: props.children || /* @__PURE__ */ jsx(BaseIcon, { h: \"100%\", w: \"100%\" })\n }\n );\n}\nAlertIcon.displayName = \"AlertIcon\";\n\nexport {\n AlertIcon\n};\n//# sourceMappingURL=chunk-ALC6QPCI.mjs.map","'use client'\nimport {\n useAlertContext,\n useAlertStyles\n} from \"./chunk-XCES3W5V.mjs\";\n\n// src/alert-title.tsx\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { chakra, forwardRef } from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AlertTitle = forwardRef(\n function AlertTitle2(props, ref) {\n const styles = useAlertStyles();\n const { status } = useAlertContext();\n return /* @__PURE__ */ jsx(\n chakra.div,\n {\n ref,\n \"data-status\": status,\n ...props,\n className: cx(\"chakra-alert__title\", props.className),\n __css: styles.title\n }\n );\n }\n);\nAlertTitle.displayName = \"AlertTitle\";\n\nexport {\n AlertTitle\n};\n//# sourceMappingURL=chunk-QURMB2UJ.mjs.map","'use client'\nimport {\n useAlertContext,\n useAlertStyles\n} from \"./chunk-XCES3W5V.mjs\";\n\n// src/alert-description.tsx\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport {\n chakra,\n forwardRef\n} from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AlertDescription = forwardRef(\n function AlertDescription2(props, ref) {\n const styles = useAlertStyles();\n const { status } = useAlertContext();\n const descriptionStyles = {\n display: \"inline\",\n ...styles.description\n };\n return /* @__PURE__ */ jsx(\n chakra.div,\n {\n ref,\n \"data-status\": status,\n ...props,\n className: cx(\"chakra-alert__desc\", props.className),\n __css: descriptionStyles\n }\n );\n }\n);\nAlertDescription.displayName = \"AlertDescription\";\n\nexport {\n AlertDescription\n};\n//# sourceMappingURL=chunk-CUKBNH6U.mjs.map","'use client'\nimport {\n findToast,\n getToastPosition\n} from \"./chunk-LDADOVIM.mjs\";\nimport {\n getToastPlacement\n} from \"./chunk-LHPMGMGT.mjs\";\n\n// src/toast.tsx\nimport {\n Alert,\n AlertDescription,\n AlertIcon,\n AlertTitle\n} from \"@chakra-ui/alert\";\nimport { chakra } from \"@chakra-ui/system\";\nimport { CloseButton } from \"@chakra-ui/close-button\";\nimport { runIfFn } from \"@chakra-ui/shared-utils\";\n\n// src/toast.store.ts\nvar initialState = {\n top: [],\n \"top-left\": [],\n \"top-right\": [],\n \"bottom-left\": [],\n bottom: [],\n \"bottom-right\": []\n};\nvar toastStore = createStore(initialState);\nfunction createStore(initialState2) {\n let state = initialState2;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (setStateFn) => {\n state = setStateFn(state);\n listeners.forEach((l) => l());\n };\n return {\n getState: () => state,\n subscribe: (listener) => {\n listeners.add(listener);\n return () => {\n setState(() => initialState2);\n listeners.delete(listener);\n };\n },\n /**\n * Delete a toast record at its position\n */\n removeToast: (id, position) => {\n setState((prevState) => ({\n ...prevState,\n // id may be string or number\n // eslint-disable-next-line eqeqeq\n [position]: prevState[position].filter((toast) => toast.id != id)\n }));\n },\n notify: (message, options) => {\n const toast = createToast(message, options);\n const { position, id } = toast;\n setState((prevToasts) => {\n var _a, _b;\n const isTop = position.includes(\"top\");\n const toasts = isTop ? [toast, ...(_a = prevToasts[position]) != null ? _a : []] : [...(_b = prevToasts[position]) != null ? _b : [], toast];\n return {\n ...prevToasts,\n [position]: toasts\n };\n });\n return id;\n },\n update: (id, options) => {\n if (!id)\n return;\n setState((prevState) => {\n const nextState = { ...prevState };\n const { position, index } = findToast(nextState, id);\n if (position && index !== -1) {\n nextState[position][index] = {\n ...nextState[position][index],\n ...options,\n message: createRenderToast(options)\n };\n }\n return nextState;\n });\n },\n closeAll: ({ positions } = {}) => {\n setState((prev) => {\n const allPositions = [\n \"bottom\",\n \"bottom-right\",\n \"bottom-left\",\n \"top\",\n \"top-left\",\n \"top-right\"\n ];\n const positionsToClose = positions != null ? positions : allPositions;\n return positionsToClose.reduce(\n (acc, position) => {\n acc[position] = prev[position].map((toast) => ({\n ...toast,\n requestClose: true\n }));\n return acc;\n },\n { ...prev }\n );\n });\n },\n close: (id) => {\n setState((prevState) => {\n const position = getToastPosition(prevState, id);\n if (!position)\n return prevState;\n return {\n ...prevState,\n [position]: prevState[position].map((toast) => {\n if (toast.id == id) {\n return {\n ...toast,\n requestClose: true\n };\n }\n return toast;\n })\n };\n });\n },\n isActive: (id) => Boolean(findToast(toastStore.getState(), id).position)\n };\n}\nvar counter = 0;\nfunction createToast(message, options = {}) {\n var _a, _b;\n counter += 1;\n const id = (_a = options.id) != null ? _a : counter;\n const position = (_b = options.position) != null ? _b : \"bottom\";\n return {\n id,\n message,\n position,\n duration: options.duration,\n onCloseComplete: options.onCloseComplete,\n onRequestRemove: () => toastStore.removeToast(String(id), position),\n status: options.status,\n requestClose: false,\n containerStyle: options.containerStyle\n };\n}\n\n// src/toast.tsx\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar Toast = (props) => {\n const {\n status,\n variant = \"solid\",\n id,\n title,\n isClosable,\n onClose,\n description,\n colorScheme,\n icon\n } = props;\n const ids = id ? {\n root: `toast-${id}`,\n title: `toast-${id}-title`,\n description: `toast-${id}-description`\n } : void 0;\n return /* @__PURE__ */ jsxs(\n Alert,\n {\n addRole: false,\n status,\n variant,\n id: ids == null ? void 0 : ids.root,\n alignItems: \"start\",\n borderRadius: \"md\",\n boxShadow: \"lg\",\n paddingEnd: 8,\n textAlign: \"start\",\n width: \"auto\",\n colorScheme,\n children: [\n /* @__PURE__ */ jsx(AlertIcon, { children: icon }),\n /* @__PURE__ */ jsxs(chakra.div, { flex: \"1\", maxWidth: \"100%\", children: [\n title && /* @__PURE__ */ jsx(AlertTitle, { id: ids == null ? void 0 : ids.title, children: title }),\n description && /* @__PURE__ */ jsx(AlertDescription, { id: ids == null ? void 0 : ids.description, display: \"block\", children: description })\n ] }),\n isClosable && /* @__PURE__ */ jsx(\n CloseButton,\n {\n size: \"sm\",\n onClick: onClose,\n position: \"absolute\",\n insetEnd: 1,\n top: 1\n }\n )\n ]\n }\n );\n};\nfunction createRenderToast(options = {}) {\n const { render, toastComponent: ToastComponent = Toast } = options;\n const renderToast = (props) => {\n if (typeof render === \"function\") {\n return render({ ...props, ...options });\n }\n return /* @__PURE__ */ jsx(ToastComponent, { ...props, ...options });\n };\n return renderToast;\n}\nfunction createToastFn(dir, defaultOptions) {\n const normalizeToastOptions = (options) => {\n var _a;\n return {\n ...defaultOptions,\n ...options,\n position: getToastPlacement(\n (_a = options == null ? void 0 : options.position) != null ? _a : defaultOptions == null ? void 0 : defaultOptions.position,\n dir\n )\n };\n };\n const toast = (options) => {\n const normalizedToastOptions = normalizeToastOptions(options);\n const Message = createRenderToast(normalizedToastOptions);\n return toastStore.notify(Message, normalizedToastOptions);\n };\n toast.update = (id, options) => {\n toastStore.update(id, normalizeToastOptions(options));\n };\n toast.promise = (promise, options) => {\n const id = toast({\n ...options.loading,\n status: \"loading\",\n duration: null\n });\n promise.then(\n (data) => toast.update(id, {\n status: \"success\",\n duration: 5e3,\n ...runIfFn(options.success, data)\n })\n ).catch(\n (error) => toast.update(id, {\n status: \"error\",\n duration: 5e3,\n ...runIfFn(options.error, error)\n })\n );\n };\n toast.closeAll = toastStore.closeAll;\n toast.close = toastStore.close;\n toast.isActive = toastStore.isActive;\n return toast;\n}\n\nexport {\n Toast,\n createRenderToast,\n createToastFn,\n toastStore\n};\n//# sourceMappingURL=chunk-HYCJNCPE.mjs.map","'use client'\nimport {\n ToastComponent\n} from \"./chunk-VXESY33O.mjs\";\nimport {\n toastStore\n} from \"./chunk-HYCJNCPE.mjs\";\nimport {\n getToastListStyle\n} from \"./chunk-LDADOVIM.mjs\";\n\n// src/toast.provider.tsx\nimport { AnimatePresence } from \"framer-motion\";\nimport { Portal } from \"@chakra-ui/portal\";\nimport { useSyncExternalStore } from \"react\";\nimport { createContext } from \"@chakra-ui/react-context\";\nimport { jsx } from \"react/jsx-runtime\";\nvar [ToastOptionProvider, useToastOptionContext] = createContext({\n name: `ToastOptionsContext`,\n strict: false\n});\nvar ToastProvider = (props) => {\n const state = useSyncExternalStore(\n toastStore.subscribe,\n toastStore.getState,\n toastStore.getState\n );\n const {\n motionVariants,\n component: Component = ToastComponent,\n portalProps\n } = props;\n const stateKeys = Object.keys(state);\n const toastList = stateKeys.map((position) => {\n const toasts = state[position];\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n role: \"region\",\n \"aria-live\": \"polite\",\n \"aria-label\": `Notifications-${position}`,\n id: `chakra-toast-manager-${position}`,\n style: getToastListStyle(position),\n children: /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: toasts.map((toast) => /* @__PURE__ */ jsx(\n Component,\n {\n motionVariants,\n ...toast\n },\n toast.id\n )) })\n },\n position\n );\n });\n return /* @__PURE__ */ jsx(Portal, { ...portalProps, children: toastList });\n};\n\nexport {\n ToastOptionProvider,\n useToastOptionContext,\n ToastProvider\n};\n//# sourceMappingURL=chunk-3Y4YXCR2.mjs.map","'use client'\n\n// src/chakra-provider.tsx\nimport {\n ChakraProvider as BaseChakraProvider\n} from \"@chakra-ui/provider\";\nimport { theme as defaultTheme, baseTheme } from \"@chakra-ui/theme\";\nimport {\n ToastProvider,\n ToastOptionProvider\n} from \"@chakra-ui/toast\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar createChakraProvider = (providerTheme) => {\n return function ChakraProvider2({\n children,\n theme = providerTheme,\n toastOptions,\n ...restProps\n }) {\n return /* @__PURE__ */ jsxs(BaseChakraProvider, { theme, ...restProps, children: [\n /* @__PURE__ */ jsx(ToastOptionProvider, { value: toastOptions == null ? void 0 : toastOptions.defaultOptions, children }),\n /* @__PURE__ */ jsx(ToastProvider, { ...toastOptions })\n ] });\n };\n};\nvar ChakraProvider = createChakraProvider(defaultTheme);\nvar ChakraBaseProvider = createChakraProvider(baseTheme);\n\nexport {\n ChakraProvider,\n ChakraBaseProvider\n};\n//# sourceMappingURL=chunk-QAITB7GG.mjs.map","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct.bind();\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n return _construct.apply(null, arguments);\n}","export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}","export default function _isNativeFunction(fn) {\n try {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n } catch (e) {\n return typeof fn === \"function\";\n }\n}","import _extends from '@babel/runtime/helpers/esm/extends';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _wrapNativeSuper from '@babel/runtime/helpers/esm/wrapNativeSuper';\nimport _taggedTemplateLiteralLoose from '@babel/runtime/helpers/esm/taggedTemplateLiteralLoose';\n\nfunction last() {\n var _ref;\n\n return _ref = arguments.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref];\n}\n\nfunction negation(a) {\n return -a;\n}\n\nfunction addition(a, b) {\n return a + b;\n}\n\nfunction subtraction(a, b) {\n return a - b;\n}\n\nfunction multiplication(a, b) {\n return a * b;\n}\n\nfunction division(a, b) {\n return a / b;\n}\n\nfunction max() {\n return Math.max.apply(Math, arguments);\n}\n\nfunction min() {\n return Math.min.apply(Math, arguments);\n}\n\nfunction comma() {\n return Array.of.apply(Array, arguments);\n}\n\nvar defaultSymbols = {\n symbols: {\n '*': {\n infix: {\n symbol: '*',\n f: multiplication,\n notation: 'infix',\n precedence: 4,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: '*',\n regSymbol: '\\\\*'\n },\n '/': {\n infix: {\n symbol: '/',\n f: division,\n notation: 'infix',\n precedence: 4,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: '/',\n regSymbol: '/'\n },\n '+': {\n infix: {\n symbol: '+',\n f: addition,\n notation: 'infix',\n precedence: 2,\n rightToLeft: 0,\n argCount: 2\n },\n prefix: {\n symbol: '+',\n f: last,\n notation: 'prefix',\n precedence: 3,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '+',\n regSymbol: '\\\\+'\n },\n '-': {\n infix: {\n symbol: '-',\n f: subtraction,\n notation: 'infix',\n precedence: 2,\n rightToLeft: 0,\n argCount: 2\n },\n prefix: {\n symbol: '-',\n f: negation,\n notation: 'prefix',\n precedence: 3,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '-',\n regSymbol: '-'\n },\n ',': {\n infix: {\n symbol: ',',\n f: comma,\n notation: 'infix',\n precedence: 1,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: ',',\n regSymbol: ','\n },\n '(': {\n prefix: {\n symbol: '(',\n f: last,\n notation: 'prefix',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '(',\n regSymbol: '\\\\('\n },\n ')': {\n postfix: {\n symbol: ')',\n f: undefined,\n notation: 'postfix',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: ')',\n regSymbol: '\\\\)'\n },\n min: {\n func: {\n symbol: 'min',\n f: min,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'min',\n regSymbol: 'min\\\\b'\n },\n max: {\n func: {\n symbol: 'max',\n f: max,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'max',\n regSymbol: 'max\\\\b'\n }\n }\n};\nvar defaultSymbolMap = defaultSymbols;\n\n// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js\n\n/**\n * Parse errors.md and turn it into a simple hash of code: message\n * @private\n */\nvar ERRORS = {\n \"1\": \"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\\n\\n\",\n \"2\": \"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\\n\\n\",\n \"3\": \"Passed an incorrect argument to a color function, please pass a string representation of a color.\\n\\n\",\n \"4\": \"Couldn't generate valid rgb string from %s, it returned %s.\\n\\n\",\n \"5\": \"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\\n\\n\",\n \"6\": \"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\\n\\n\",\n \"7\": \"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\\n\\n\",\n \"8\": \"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\\n\\n\",\n \"9\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"10\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"11\": \"Invalid value passed as base to modularScale, expected number or em string but got \\\"%s\\\"\\n\\n\",\n \"12\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"13\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"14\": \"Passed invalid pixel value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"15\": \"Passed invalid base value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"16\": \"You must provide a template to this method.\\n\\n\",\n \"17\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"18\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"19\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"20\": \"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"21\": \"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"22\": \"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"23\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"24\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"25\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"26\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"27\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"28\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"29\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"30\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"31\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"32\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\\n\\n\",\n \"33\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"34\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"35\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"36\": \"Property must be a string value.\\n\\n\",\n \"37\": \"Syntax Error at %s.\\n\\n\",\n \"38\": \"Formula contains a function that needs parentheses at %s.\\n\\n\",\n \"39\": \"Formula is missing closing parenthesis at %s.\\n\\n\",\n \"40\": \"Formula has too many closing parentheses at %s.\\n\\n\",\n \"41\": \"All values in a formula must have the same unit or be unitless.\\n\\n\",\n \"42\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"43\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"44\": \"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\\n\\n\",\n \"45\": \"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\\n\\n\",\n \"46\": \"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\\n\\n\",\n \"47\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"48\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"49\": \"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"50\": \"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"51\": \"Expects the first argument object to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"52\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"53\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"54\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"55\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"56\": \"linearGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"57\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"58\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"59\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"60\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"61\": \"Property must be a string value.\\n\\n\",\n \"62\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"63\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"64\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"65\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\\n\\n\",\n \"66\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"67\": \"You must provide a template to this method.\\n\\n\",\n \"68\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"69\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got %s instead.\\n\\n\",\n \"70\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got %s instead.\\n\\n\",\n \"71\": \"Passed invalid pixel value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"72\": \"Passed invalid base value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"73\": \"Please provide a valid CSS variable.\\n\\n\",\n \"74\": \"CSS variable not found and no default was provided.\\n\\n\",\n \"75\": \"important requires a valid style object, got a %s instead.\\n\\n\",\n \"76\": \"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\\n\\n\",\n \"77\": \"remToPx expects a value in \\\"rem\\\" but you provided it in \\\"%s\\\".\\n\\n\",\n \"78\": \"base must be set in \\\"px\\\" or \\\"%\\\" but you set it in \\\"%s\\\".\\n\"\n};\n/**\n * super basic version of sprintf\n * @private\n */\n\nfunction format() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var a = args[0];\n var b = [];\n var c;\n\n for (c = 1; c < args.length; c += 1) {\n b.push(args[c]);\n }\n\n b.forEach(function (d) {\n a = a.replace(/%[a-z]/, d);\n });\n return a;\n}\n/**\n * Create an error file out of errors.md for development and a simple web link to the full errors\n * in production mode.\n * @private\n */\n\n\nvar PolishedError = /*#__PURE__*/function (_Error) {\n _inheritsLoose(PolishedError, _Error);\n\n function PolishedError(code) {\n var _this;\n\n if (process.env.NODE_ENV === 'production') {\n _this = _Error.call(this, \"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#\" + code + \" for more information.\") || this;\n } else {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n _this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;\n }\n\n return _assertThisInitialized(_this);\n }\n\n return PolishedError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nvar unitRegExp = /((?!\\w)a|na|hc|mc|dg|me[r]?|xe|ni(?![a-zA-Z])|mm|cp|tp|xp|q(?!s)|hv|xamv|nimv|wv|sm|s(?!\\D|$)|ged|darg?|nrut)/g; // Merges additional math functionality into the defaults.\n\nfunction mergeSymbolMaps(additionalSymbols) {\n var symbolMap = {};\n symbolMap.symbols = additionalSymbols ? _extends({}, defaultSymbolMap.symbols, additionalSymbols.symbols) : _extends({}, defaultSymbolMap.symbols);\n return symbolMap;\n}\n\nfunction exec(operators, values) {\n var _ref;\n\n var op = operators.pop();\n values.push(op.f.apply(op, (_ref = []).concat.apply(_ref, values.splice(-op.argCount))));\n return op.precedence;\n}\n\nfunction calculate(expression, additionalSymbols) {\n var symbolMap = mergeSymbolMaps(additionalSymbols);\n var match;\n var operators = [symbolMap.symbols['('].prefix];\n var values = [];\n var pattern = new RegExp( // Pattern for numbers\n \"\\\\d+(?:\\\\.\\\\d+)?|\" + // ...and patterns for individual operators/function names\n Object.keys(symbolMap.symbols).map(function (key) {\n return symbolMap.symbols[key];\n }) // longer symbols should be listed first\n // $FlowFixMe\n .sort(function (a, b) {\n return b.symbol.length - a.symbol.length;\n }) // $FlowFixMe\n .map(function (val) {\n return val.regSymbol;\n }).join('|') + \"|(\\\\S)\", 'g');\n pattern.lastIndex = 0; // Reset regular expression object\n\n var afterValue = false;\n\n do {\n match = pattern.exec(expression);\n\n var _ref2 = match || [')', undefined],\n token = _ref2[0],\n bad = _ref2[1];\n\n var notNumber = symbolMap.symbols[token];\n var notNewValue = notNumber && !notNumber.prefix && !notNumber.func;\n var notAfterValue = !notNumber || !notNumber.postfix && !notNumber.infix; // Check for syntax errors:\n\n if (bad || (afterValue ? notAfterValue : notNewValue)) {\n throw new PolishedError(37, match ? match.index : expression.length, expression);\n }\n\n if (afterValue) {\n // We either have an infix or postfix operator (they should be mutually exclusive)\n var curr = notNumber.postfix || notNumber.infix;\n\n do {\n var prev = operators[operators.length - 1];\n if ((curr.precedence - prev.precedence || prev.rightToLeft) > 0) break; // Apply previous operator, since it has precedence over current one\n } while (exec(operators, values)); // Exit loop after executing an opening parenthesis or function\n\n\n afterValue = curr.notation === 'postfix';\n\n if (curr.symbol !== ')') {\n operators.push(curr); // Postfix always has precedence over any operator that follows after it\n\n if (afterValue) exec(operators, values);\n }\n } else if (notNumber) {\n // prefix operator or function\n operators.push(notNumber.prefix || notNumber.func);\n\n if (notNumber.func) {\n // Require an opening parenthesis\n match = pattern.exec(expression);\n\n if (!match || match[0] !== '(') {\n throw new PolishedError(38, match ? match.index : expression.length, expression);\n }\n }\n } else {\n // number\n values.push(+token);\n afterValue = true;\n }\n } while (match && operators.length);\n\n if (operators.length) {\n throw new PolishedError(39, match ? match.index : expression.length, expression);\n } else if (match) {\n throw new PolishedError(40, match ? match.index : expression.length, expression);\n } else {\n return values.pop();\n }\n}\n\nfunction reverseString(str) {\n return str.split('').reverse().join('');\n}\n/**\n * Helper for doing math with CSS Units. Accepts a formula as a string. All values in the formula must have the same unit (or be unitless). Supports complex formulas utliziing addition, subtraction, multiplication, division, square root, powers, factorial, min, max, as well as parentheses for order of operation.\n *\n *In cases where you need to do calculations with mixed units where one unit is a [relative length unit](https://developer.mozilla.org/en-US/docs/Web/CSS/length#Relative_length_units), you will want to use [CSS Calc](https://developer.mozilla.org/en-US/docs/Web/CSS/calc).\n *\n * *warning* While we've done everything possible to ensure math safely evalutes formulas expressed as strings, you should always use extreme caution when passing `math` user provided values.\n * @example\n * // Styles as object usage\n * const styles = {\n * fontSize: math('12rem + 8rem'),\n * fontSize: math('(12px + 2px) * 3'),\n * fontSize: math('3px^2 + sqrt(4)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * fontSize: ${math('12rem + 8rem')};\n * fontSize: ${math('(12px + 2px) * 3')};\n * fontSize: ${math('3px^2 + sqrt(4)')};\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * fontSize: '20rem',\n * fontSize: '42px',\n * fontSize: '11px',\n * }\n */\n\n\nfunction math(formula, additionalSymbols) {\n var reversedFormula = reverseString(formula);\n var formulaMatch = reversedFormula.match(unitRegExp); // Check that all units are the same\n\n if (formulaMatch && !formulaMatch.every(function (unit) {\n return unit === formulaMatch[0];\n })) {\n throw new PolishedError(41);\n }\n\n var cleanFormula = reverseString(reversedFormula.replace(unitRegExp, ''));\n return \"\" + calculate(cleanFormula, additionalSymbols) + (formulaMatch ? reverseString(formulaMatch[0]) : '');\n}\n\nvar cssVariableRegex = /--[\\S]*/g;\n/**\n * Fetches the value of a passed CSS Variable in the :root scope, or otherwise returns a defaultValue if provided.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'background': cssVar('--background-color'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${cssVar('--background-color')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'background': 'red'\n * }\n */\n\nfunction cssVar(cssVariable, defaultValue) {\n if (!cssVariable || !cssVariable.match(cssVariableRegex)) {\n throw new PolishedError(73);\n }\n\n var variableValue;\n /* eslint-disable */\n\n /* istanbul ignore next */\n\n if (typeof document !== 'undefined' && document.documentElement !== null) {\n variableValue = getComputedStyle(document.documentElement).getPropertyValue(cssVariable);\n }\n /* eslint-enable */\n\n\n if (variableValue) {\n return variableValue.trim();\n } else if (defaultValue) {\n return defaultValue;\n }\n\n throw new PolishedError(74);\n}\n\n// @private\nfunction capitalizeString(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nvar positionMap$1 = ['Top', 'Right', 'Bottom', 'Left'];\n\nfunction generateProperty(property, position) {\n if (!property) return position.toLowerCase();\n var splitProperty = property.split('-');\n\n if (splitProperty.length > 1) {\n splitProperty.splice(1, 0, position);\n return splitProperty.reduce(function (acc, val) {\n return \"\" + acc + capitalizeString(val);\n });\n }\n\n var joinedProperty = property.replace(/([a-z])([A-Z])/g, \"$1\" + position + \"$2\");\n return property === joinedProperty ? \"\" + property + position : joinedProperty;\n}\n\nfunction generateStyles(property, valuesWithDefaults) {\n var styles = {};\n\n for (var i = 0; i < valuesWithDefaults.length; i += 1) {\n if (valuesWithDefaults[i] || valuesWithDefaults[i] === 0) {\n styles[generateProperty(property, positionMap$1[i])] = valuesWithDefaults[i];\n }\n }\n\n return styles;\n}\n/**\n * Enables shorthand for direction-based properties. It accepts a property (hyphenated or camelCased) and up to four values that map to top, right, bottom, and left, respectively. You can optionally pass an empty string to get only the directional values as properties. You can also optionally pass a null argument for a directional value to ignore it.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...directionalProperty('padding', '12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${directionalProperty('padding', '12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'paddingTop': '12px',\n * 'paddingRight': '24px',\n * 'paddingBottom': '36px',\n * 'paddingLeft': '48px'\n * }\n */\n\n\nfunction directionalProperty(property) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n // prettier-ignore\n var firstValue = values[0],\n _values$ = values[1],\n secondValue = _values$ === void 0 ? firstValue : _values$,\n _values$2 = values[2],\n thirdValue = _values$2 === void 0 ? firstValue : _values$2,\n _values$3 = values[3],\n fourthValue = _values$3 === void 0 ? secondValue : _values$3;\n var valuesWithDefaults = [firstValue, secondValue, thirdValue, fourthValue];\n return generateStyles(property, valuesWithDefaults);\n}\n\n/**\n * Check if a string ends with something\n * @private\n */\nfunction endsWith(string, suffix) {\n return string.substr(-suffix.length) === suffix;\n}\n\nvar cssRegex$1 = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n/**\n * Returns a given CSS value minus its unit of measure.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': stripUnit('100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${stripUnit('100px')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100\n * }\n */\n\nfunction stripUnit(value) {\n if (typeof value !== 'string') return value;\n var matchedValue = value.match(cssRegex$1);\n return matchedValue ? parseFloat(value) : value;\n}\n\n/**\n * Factory function that creates pixel-to-x converters\n * @private\n */\n\nvar pxtoFactory = function pxtoFactory(to) {\n return function (pxval, base) {\n if (base === void 0) {\n base = '16px';\n }\n\n var newPxval = pxval;\n var newBase = base;\n\n if (typeof pxval === 'string') {\n if (!endsWith(pxval, 'px')) {\n throw new PolishedError(69, to, pxval);\n }\n\n newPxval = stripUnit(pxval);\n }\n\n if (typeof base === 'string') {\n if (!endsWith(base, 'px')) {\n throw new PolishedError(70, to, base);\n }\n\n newBase = stripUnit(base);\n }\n\n if (typeof newPxval === 'string') {\n throw new PolishedError(71, pxval, to);\n }\n\n if (typeof newBase === 'string') {\n throw new PolishedError(72, base, to);\n }\n\n return \"\" + newPxval / newBase + to;\n };\n};\n\nvar pixelsto = pxtoFactory;\n\n/**\n * Convert pixel value to ems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': em('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${em('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1em'\n * }\n */\n\nvar em = /*#__PURE__*/pixelsto('em');\nvar em$1 = em;\n\nvar cssRegex = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n/**\n * Returns a given CSS value and its unit as elements of an array.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': getValueAndUnit('100px')[0],\n * '--unit': getValueAndUnit('100px')[1],\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${getValueAndUnit('100px')[0]};\n * --unit: ${getValueAndUnit('100px')[1]};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100,\n * '--unit': 'px',\n * }\n */\n\nfunction getValueAndUnit(value) {\n if (typeof value !== 'string') return [value, ''];\n var matchedValue = value.match(cssRegex);\n if (matchedValue) return [parseFloat(value), matchedValue[2]];\n return [value, undefined];\n}\n\n/**\n * Helper for targeting rules in a style block generated by polished modules that need !important-level specificity. Can optionally specify a rule (or rules) to target specific rules.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...important(cover())\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${important(cover())}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'position': 'absolute !important',\n * 'top': '0 !important',\n * 'right: '0 !important',\n * 'bottom': '0 !important',\n * 'left: '0 !important'\n * }\n */\n\nfunction important(styleBlock, rules) {\n if (typeof styleBlock !== 'object' || styleBlock === null) {\n throw new PolishedError(75, typeof styleBlock);\n }\n\n var newStyleBlock = {};\n Object.keys(styleBlock).forEach(function (key) {\n if (typeof styleBlock[key] === 'object' && styleBlock[key] !== null) {\n newStyleBlock[key] = important(styleBlock[key], rules);\n } else if (!rules || rules && (rules === key || rules.indexOf(key) >= 0)) {\n newStyleBlock[key] = styleBlock[key] + \" !important\";\n } else {\n newStyleBlock[key] = styleBlock[key];\n }\n });\n return newStyleBlock;\n}\n\nvar ratioNames = {\n minorSecond: 1.067,\n majorSecond: 1.125,\n minorThird: 1.2,\n majorThird: 1.25,\n perfectFourth: 1.333,\n augFourth: 1.414,\n perfectFifth: 1.5,\n minorSixth: 1.6,\n goldenSection: 1.618,\n majorSixth: 1.667,\n minorSeventh: 1.778,\n majorSeventh: 1.875,\n octave: 2,\n majorTenth: 2.5,\n majorEleventh: 2.667,\n majorTwelfth: 3,\n doubleOctave: 4\n};\n\nfunction getRatio(ratioName) {\n return ratioNames[ratioName];\n}\n/**\n * Establish consistent measurements and spacial relationships throughout your projects by incrementing an em or rem value up or down a defined scale. We provide a list of commonly used scales as pre-defined variables.\n * @example\n * // Styles as object usage\n * const styles = {\n * // Increment two steps up the default scale\n * 'fontSize': modularScale(2)\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * // Increment two steps up the default scale\n * fontSize: ${modularScale(2)}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'fontSize': '1.77689em'\n * }\n */\n\n\nfunction modularScale(steps, base, ratio) {\n if (base === void 0) {\n base = '1em';\n }\n\n if (ratio === void 0) {\n ratio = 1.333;\n }\n\n if (typeof steps !== 'number') {\n throw new PolishedError(42);\n }\n\n if (typeof ratio === 'string' && !ratioNames[ratio]) {\n throw new PolishedError(43);\n }\n\n var _ref = typeof base === 'string' ? getValueAndUnit(base) : [base, ''],\n realBase = _ref[0],\n unit = _ref[1];\n\n var realRatio = typeof ratio === 'string' ? getRatio(ratio) : ratio;\n\n if (typeof realBase === 'string') {\n throw new PolishedError(44, base);\n }\n\n return \"\" + realBase * Math.pow(realRatio, steps) + (unit || '');\n}\n\n/**\n * Convert pixel value to rems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': rem('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${rem('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1rem'\n * }\n */\n\nvar rem = /*#__PURE__*/pixelsto('rem');\nvar rem$1 = rem;\n\nvar defaultFontSize = 16;\n\nfunction convertBase(base) {\n var deconstructedValue = getValueAndUnit(base);\n\n if (deconstructedValue[1] === 'px') {\n return parseFloat(base);\n }\n\n if (deconstructedValue[1] === '%') {\n return parseFloat(base) / 100 * defaultFontSize;\n }\n\n throw new PolishedError(78, deconstructedValue[1]);\n}\n\nfunction getBaseFromDoc() {\n /* eslint-disable */\n\n /* istanbul ignore next */\n if (typeof document !== 'undefined' && document.documentElement !== null) {\n var rootFontSize = getComputedStyle(document.documentElement).fontSize;\n return rootFontSize ? convertBase(rootFontSize) : defaultFontSize;\n }\n /* eslint-enable */\n\n /* istanbul ignore next */\n\n\n return defaultFontSize;\n}\n/**\n * Convert rem values to px. By default, the base value is pulled from the font-size property on the root element (if it is set in % or px). It defaults to 16px if not found on the root. You can also override the base value by providing your own base in % or px.\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': remToPx('1.6rem')\n * 'height': remToPx('1.6rem', '10px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${remToPx('1.6rem')}\n * height: ${remToPx('1.6rem', '10px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '25.6px',\n * 'height': '16px',\n * }\n */\n\n\nfunction remToPx(value, base) {\n var deconstructedValue = getValueAndUnit(value);\n\n if (deconstructedValue[1] !== 'rem' && deconstructedValue[1] !== '') {\n throw new PolishedError(77, deconstructedValue[1]);\n }\n\n var newBase = base ? convertBase(base) : getBaseFromDoc();\n return deconstructedValue[0] * newBase + \"px\";\n}\n\nvar functionsMap$3 = {\n back: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\n circ: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\n cubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\n expo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\n quad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n quart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\n quint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\n sine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)'\n};\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeIn('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeIn('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n * }\n */\n\nfunction easeIn(functionName) {\n return functionsMap$3[functionName.toLowerCase().trim()];\n}\n\nvar functionsMap$2 = {\n back: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n circ: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n cubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n expo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n quad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n quart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n quint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n sine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'\n};\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeInOut('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeInOut('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n * }\n */\n\nfunction easeInOut(functionName) {\n return functionsMap$2[functionName.toLowerCase().trim()];\n}\n\nvar functionsMap$1 = {\n back: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n cubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n circ: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n expo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n quad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n quart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n quint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n sine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)'\n};\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeOut('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeOut('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n * }\n */\n\nfunction easeOut(functionName) {\n return functionsMap$1[functionName.toLowerCase().trim()];\n}\n\n/**\n * Returns a CSS calc formula for linear interpolation of a property between two values. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px').\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * fontSize: between('20px', '100px', '400px', '1000px'),\n * fontSize: between('20px', '100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * fontSize: ${between('20px', '100px', '400px', '1000px')};\n * fontSize: ${between('20px', '100px')}\n * `\n *\n * // CSS as JS Output\n *\n * h1: {\n * 'fontSize': 'calc(-33.33333333333334px + 13.333333333333334vw)',\n * 'fontSize': 'calc(-9.090909090909093px + 9.090909090909092vw)'\n * }\n */\n\nfunction between(fromSize, toSize, minScreen, maxScreen) {\n if (minScreen === void 0) {\n minScreen = '320px';\n }\n\n if (maxScreen === void 0) {\n maxScreen = '1200px';\n }\n\n var _getValueAndUnit = getValueAndUnit(fromSize),\n unitlessFromSize = _getValueAndUnit[0],\n fromSizeUnit = _getValueAndUnit[1];\n\n var _getValueAndUnit2 = getValueAndUnit(toSize),\n unitlessToSize = _getValueAndUnit2[0],\n toSizeUnit = _getValueAndUnit2[1];\n\n var _getValueAndUnit3 = getValueAndUnit(minScreen),\n unitlessMinScreen = _getValueAndUnit3[0],\n minScreenUnit = _getValueAndUnit3[1];\n\n var _getValueAndUnit4 = getValueAndUnit(maxScreen),\n unitlessMaxScreen = _getValueAndUnit4[0],\n maxScreenUnit = _getValueAndUnit4[1];\n\n if (typeof unitlessMinScreen !== 'number' || typeof unitlessMaxScreen !== 'number' || !minScreenUnit || !maxScreenUnit || minScreenUnit !== maxScreenUnit) {\n throw new PolishedError(47);\n }\n\n if (typeof unitlessFromSize !== 'number' || typeof unitlessToSize !== 'number' || fromSizeUnit !== toSizeUnit) {\n throw new PolishedError(48);\n }\n\n if (fromSizeUnit !== minScreenUnit || toSizeUnit !== maxScreenUnit) {\n throw new PolishedError(76);\n }\n\n var slope = (unitlessFromSize - unitlessToSize) / (unitlessMinScreen - unitlessMaxScreen);\n var base = unitlessToSize - slope * unitlessMaxScreen;\n return \"calc(\" + base.toFixed(2) + (fromSizeUnit || '') + \" + \" + (100 * slope).toFixed(2) + \"vw)\";\n}\n\n/**\n * CSS to contain a float (credit to CSSMojo).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...clearFix(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${clearFix()}\n * `\n *\n * // CSS as JS Output\n *\n * '&::after': {\n * 'clear': 'both',\n * 'content': '\"\"',\n * 'display': 'table'\n * }\n */\nfunction clearFix(parent) {\n var _ref;\n\n if (parent === void 0) {\n parent = '&';\n }\n\n var pseudoSelector = parent + \"::after\";\n return _ref = {}, _ref[pseudoSelector] = {\n clear: 'both',\n content: '\"\"',\n display: 'table'\n }, _ref;\n}\n\n/**\n * CSS to fully cover an area. Can optionally be passed an offset to act as a \"padding\".\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...cover()\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${cover()}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'position': 'absolute',\n * 'top': '0',\n * 'right: '0',\n * 'bottom': '0',\n * 'left: '0'\n * }\n */\nfunction cover(offset) {\n if (offset === void 0) {\n offset = 0;\n }\n\n return {\n position: 'absolute',\n top: offset,\n right: offset,\n bottom: offset,\n left: offset\n };\n}\n\n/**\n * CSS to represent truncated text with an ellipsis. You can optionally pass a max-width and number of lines before truncating.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...ellipsis('250px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${ellipsis('250px')}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'display': 'inline-block',\n * 'maxWidth': '250px',\n * 'overflow': 'hidden',\n * 'textOverflow': 'ellipsis',\n * 'whiteSpace': 'nowrap',\n * 'wordWrap': 'normal'\n * }\n */\nfunction ellipsis(width, lines) {\n if (lines === void 0) {\n lines = 1;\n }\n\n var styles = {\n display: 'inline-block',\n maxWidth: width || '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n wordWrap: 'normal'\n };\n return lines > 1 ? _extends({}, styles, {\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: lines,\n display: '-webkit-box',\n whiteSpace: 'normal'\n }) : styles;\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n/**\n * Returns a set of media queries that resizes a property (or set of properties) between a provided fromSize and toSize. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px') to constrain the interpolation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...fluidRange(\n * {\n * prop: 'padding',\n * fromSize: '20px',\n * toSize: '100px',\n * },\n * '400px',\n * '1000px',\n * )\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${fluidRange(\n * {\n * prop: 'padding',\n * fromSize: '20px',\n * toSize: '100px',\n * },\n * '400px',\n * '1000px',\n * )}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * \"@media (min-width: 1000px)\": Object {\n * \"padding\": \"100px\",\n * },\n * \"@media (min-width: 400px)\": Object {\n * \"padding\": \"calc(-33.33333333333334px + 13.333333333333334vw)\",\n * },\n * \"padding\": \"20px\",\n * }\n */\nfunction fluidRange(cssProp, minScreen, maxScreen) {\n if (minScreen === void 0) {\n minScreen = '320px';\n }\n\n if (maxScreen === void 0) {\n maxScreen = '1200px';\n }\n\n if (!Array.isArray(cssProp) && typeof cssProp !== 'object' || cssProp === null) {\n throw new PolishedError(49);\n }\n\n if (Array.isArray(cssProp)) {\n var mediaQueries = {};\n var fallbacks = {};\n\n for (var _iterator = _createForOfIteratorHelperLoose(cssProp), _step; !(_step = _iterator()).done;) {\n var _extends2, _extends3;\n\n var obj = _step.value;\n\n if (!obj.prop || !obj.fromSize || !obj.toSize) {\n throw new PolishedError(50);\n }\n\n fallbacks[obj.prop] = obj.fromSize;\n mediaQueries[\"@media (min-width: \" + minScreen + \")\"] = _extends({}, mediaQueries[\"@media (min-width: \" + minScreen + \")\"], (_extends2 = {}, _extends2[obj.prop] = between(obj.fromSize, obj.toSize, minScreen, maxScreen), _extends2));\n mediaQueries[\"@media (min-width: \" + maxScreen + \")\"] = _extends({}, mediaQueries[\"@media (min-width: \" + maxScreen + \")\"], (_extends3 = {}, _extends3[obj.prop] = obj.toSize, _extends3));\n }\n\n return _extends({}, fallbacks, mediaQueries);\n } else {\n var _ref, _ref2, _ref3;\n\n if (!cssProp.prop || !cssProp.fromSize || !cssProp.toSize) {\n throw new PolishedError(51);\n }\n\n return _ref3 = {}, _ref3[cssProp.prop] = cssProp.fromSize, _ref3[\"@media (min-width: \" + minScreen + \")\"] = (_ref = {}, _ref[cssProp.prop] = between(cssProp.fromSize, cssProp.toSize, minScreen, maxScreen), _ref), _ref3[\"@media (min-width: \" + maxScreen + \")\"] = (_ref2 = {}, _ref2[cssProp.prop] = cssProp.toSize, _ref2), _ref3;\n }\n}\n\nvar dataURIRegex = /^\\s*data:([a-z]+\\/[a-z-]+(;[a-z-]+=[a-z-]+)?)?(;charset=[a-z0-9-]+)?(;base64)?,[a-z0-9!$&',()*+,;=\\-._~:@/?%\\s]*\\s*$/i;\nvar formatHintMap = {\n woff: 'woff',\n woff2: 'woff2',\n ttf: 'truetype',\n otf: 'opentype',\n eot: 'embedded-opentype',\n svg: 'svg',\n svgz: 'svg'\n};\n\nfunction generateFormatHint(format, formatHint) {\n if (!formatHint) return '';\n return \" format(\\\"\" + formatHintMap[format] + \"\\\")\";\n}\n\nfunction isDataURI(fontFilePath) {\n return !!fontFilePath.replace(/\\s+/g, ' ').match(dataURIRegex);\n}\n\nfunction generateFileReferences(fontFilePath, fileFormats, formatHint) {\n if (isDataURI(fontFilePath)) {\n return \"url(\\\"\" + fontFilePath + \"\\\")\" + generateFormatHint(fileFormats[0], formatHint);\n }\n\n var fileFontReferences = fileFormats.map(function (format) {\n return \"url(\\\"\" + fontFilePath + \".\" + format + \"\\\")\" + generateFormatHint(format, formatHint);\n });\n return fileFontReferences.join(', ');\n}\n\nfunction generateLocalReferences(localFonts) {\n var localFontReferences = localFonts.map(function (font) {\n return \"local(\\\"\" + font + \"\\\")\";\n });\n return localFontReferences.join(', ');\n}\n\nfunction generateSources(fontFilePath, localFonts, fileFormats, formatHint) {\n var fontReferences = [];\n if (localFonts) fontReferences.push(generateLocalReferences(localFonts));\n\n if (fontFilePath) {\n fontReferences.push(generateFileReferences(fontFilePath, fileFormats, formatHint));\n }\n\n return fontReferences.join(', ');\n}\n/**\n * CSS for a @font-face declaration. Defaults to check for local copies of the font on the user's machine. You can disable this by passing `null` to localFonts.\n *\n * @example\n * // Styles as object basic usage\n * const styles = {\n * ...fontFace({\n * 'fontFamily': 'Sans-Pro',\n * 'fontFilePath': 'path/to/file'\n * })\n * }\n *\n * // styled-components basic usage\n * const GlobalStyle = createGlobalStyle`${\n * fontFace({\n * 'fontFamily': 'Sans-Pro',\n * 'fontFilePath': 'path/to/file'\n * }\n * )}`\n *\n * // CSS as JS Output\n *\n * '@font-face': {\n * 'fontFamily': 'Sans-Pro',\n * 'src': 'url(\"path/to/file.eot\"), url(\"path/to/file.woff2\"), url(\"path/to/file.woff\"), url(\"path/to/file.ttf\"), url(\"path/to/file.svg\")',\n * }\n */\n\n\nfunction fontFace(_ref) {\n var fontFamily = _ref.fontFamily,\n fontFilePath = _ref.fontFilePath,\n fontStretch = _ref.fontStretch,\n fontStyle = _ref.fontStyle,\n fontVariant = _ref.fontVariant,\n fontWeight = _ref.fontWeight,\n _ref$fileFormats = _ref.fileFormats,\n fileFormats = _ref$fileFormats === void 0 ? ['eot', 'woff2', 'woff', 'ttf', 'svg'] : _ref$fileFormats,\n _ref$formatHint = _ref.formatHint,\n formatHint = _ref$formatHint === void 0 ? false : _ref$formatHint,\n _ref$localFonts = _ref.localFonts,\n localFonts = _ref$localFonts === void 0 ? [fontFamily] : _ref$localFonts,\n unicodeRange = _ref.unicodeRange,\n fontDisplay = _ref.fontDisplay,\n fontVariationSettings = _ref.fontVariationSettings,\n fontFeatureSettings = _ref.fontFeatureSettings;\n // Error Handling\n if (!fontFamily) throw new PolishedError(55);\n\n if (!fontFilePath && !localFonts) {\n throw new PolishedError(52);\n }\n\n if (localFonts && !Array.isArray(localFonts)) {\n throw new PolishedError(53);\n }\n\n if (!Array.isArray(fileFormats)) {\n throw new PolishedError(54);\n }\n\n var fontFaceDeclaration = {\n '@font-face': {\n fontFamily: fontFamily,\n src: generateSources(fontFilePath, localFonts, fileFormats, formatHint),\n unicodeRange: unicodeRange,\n fontStretch: fontStretch,\n fontStyle: fontStyle,\n fontVariant: fontVariant,\n fontWeight: fontWeight,\n fontDisplay: fontDisplay,\n fontVariationSettings: fontVariationSettings,\n fontFeatureSettings: fontFeatureSettings\n }\n }; // Removes undefined fields for cleaner css object.\n\n return JSON.parse(JSON.stringify(fontFaceDeclaration));\n}\n\n/**\n * CSS to hide text to show a background image in a SEO-friendly way.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'backgroundImage': 'url(logo.png)',\n * ...hideText(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * backgroundImage: url(logo.png);\n * ${hideText()};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'backgroundImage': 'url(logo.png)',\n * 'textIndent': '101%',\n * 'overflow': 'hidden',\n * 'whiteSpace': 'nowrap',\n * }\n */\nfunction hideText() {\n return {\n textIndent: '101%',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n };\n}\n\n/**\n * CSS to hide content visually but remain accessible to screen readers.\n * from [HTML5 Boilerplate](https://github.com/h5bp/html5-boilerplate/blob/9a176f57af1cfe8ec70300da4621fb9b07e5fa31/src/css/main.css#L121)\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...hideVisually(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${hideVisually()};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'border': '0',\n * 'clip': 'rect(0 0 0 0)',\n * 'height': '1px',\n * 'margin': '-1px',\n * 'overflow': 'hidden',\n * 'padding': '0',\n * 'position': 'absolute',\n * 'whiteSpace': 'nowrap',\n * 'width': '1px',\n * }\n */\nfunction hideVisually() {\n return {\n border: '0',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0',\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px'\n };\n}\n\n/**\n * Generates a media query to target HiDPI devices.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * [hiDPI(1.5)]: {\n * width: 200px;\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${hiDPI(1.5)} {\n * width: 200px;\n * }\n * `\n *\n * // CSS as JS Output\n *\n * '@media only screen and (-webkit-min-device-pixel-ratio: 1.5),\n * only screen and (min--moz-device-pixel-ratio: 1.5),\n * only screen and (-o-min-device-pixel-ratio: 1.5/1),\n * only screen and (min-resolution: 144dpi),\n * only screen and (min-resolution: 1.5dppx)': {\n * 'width': '200px',\n * }\n */\nfunction hiDPI(ratio) {\n if (ratio === void 0) {\n ratio = 1.3;\n }\n\n return \"\\n @media only screen and (-webkit-min-device-pixel-ratio: \" + ratio + \"),\\n only screen and (min--moz-device-pixel-ratio: \" + ratio + \"),\\n only screen and (-o-min-device-pixel-ratio: \" + ratio + \"/1),\\n only screen and (min-resolution: \" + Math.round(ratio * 96) + \"dpi),\\n only screen and (min-resolution: \" + ratio + \"dppx)\\n \";\n}\n\nfunction constructGradientValue(literals) {\n var template = '';\n\n for (var _len = arguments.length, substitutions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n substitutions[_key - 1] = arguments[_key];\n }\n\n for (var i = 0; i < literals.length; i += 1) {\n template += literals[i];\n\n if (i === substitutions.length - 1 && substitutions[i]) {\n var definedValues = substitutions.filter(function (substitute) {\n return !!substitute;\n }); // Adds leading coma if properties preceed color-stops\n\n if (definedValues.length > 1) {\n template = template.slice(0, -1);\n template += \", \" + substitutions[i]; // No trailing space if color-stops is the only param provided\n } else if (definedValues.length === 1) {\n template += \"\" + substitutions[i];\n }\n } else if (substitutions[i]) {\n template += substitutions[i] + \" \";\n }\n }\n\n return template.trim();\n}\n\nvar _templateObject$1;\n\n/**\n * CSS for declaring a linear gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...linearGradient({\n colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n toDirection: 'to top right',\n fallback: '#FFF',\n })\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${linearGradient({\n colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n toDirection: 'to top right',\n fallback: '#FFF',\n })}\n *`\n *\n * // CSS as JS Output\n *\n * div: {\n * 'backgroundColor': '#FFF',\n * 'backgroundImage': 'linear-gradient(to top right, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',\n * }\n */\nfunction linearGradient(_ref) {\n var colorStops = _ref.colorStops,\n fallback = _ref.fallback,\n _ref$toDirection = _ref.toDirection,\n toDirection = _ref$toDirection === void 0 ? '' : _ref$toDirection;\n\n if (!colorStops || colorStops.length < 2) {\n throw new PolishedError(56);\n }\n\n return {\n backgroundColor: fallback || colorStops[0].replace(/,\\s+/g, ',').split(' ')[0].replace(/,(?=\\S)/g, ', '),\n backgroundImage: constructGradientValue(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose([\"linear-gradient(\", \"\", \")\"])), toDirection, colorStops.join(', ').replace(/,(?=\\S)/g, ', '))\n };\n}\n\n/**\n * CSS to normalize abnormalities across browsers (normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css)\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...normalize(),\n * }\n *\n * // styled-components usage\n * const GlobalStyle = createGlobalStyle`${normalize()}`\n *\n * // CSS as JS Output\n *\n * html {\n * lineHeight: 1.15,\n * textSizeAdjust: 100%,\n * } ...\n */\nfunction normalize() {\n var _ref;\n\n return [(_ref = {\n html: {\n lineHeight: '1.15',\n textSizeAdjust: '100%'\n },\n body: {\n margin: '0'\n },\n main: {\n display: 'block'\n },\n h1: {\n fontSize: '2em',\n margin: '0.67em 0'\n },\n hr: {\n boxSizing: 'content-box',\n height: '0',\n overflow: 'visible'\n },\n pre: {\n fontFamily: 'monospace, monospace',\n fontSize: '1em'\n },\n a: {\n backgroundColor: 'transparent'\n },\n 'abbr[title]': {\n borderBottom: 'none',\n textDecoration: 'underline'\n }\n }, _ref[\"b,\\n strong\"] = {\n fontWeight: 'bolder'\n }, _ref[\"code,\\n kbd,\\n samp\"] = {\n fontFamily: 'monospace, monospace',\n fontSize: '1em'\n }, _ref.small = {\n fontSize: '80%'\n }, _ref[\"sub,\\n sup\"] = {\n fontSize: '75%',\n lineHeight: '0',\n position: 'relative',\n verticalAlign: 'baseline'\n }, _ref.sub = {\n bottom: '-0.25em'\n }, _ref.sup = {\n top: '-0.5em'\n }, _ref.img = {\n borderStyle: 'none'\n }, _ref[\"button,\\n input,\\n optgroup,\\n select,\\n textarea\"] = {\n fontFamily: 'inherit',\n fontSize: '100%',\n lineHeight: '1.15',\n margin: '0'\n }, _ref[\"button,\\n input\"] = {\n overflow: 'visible'\n }, _ref[\"button,\\n select\"] = {\n textTransform: 'none'\n }, _ref[\"button,\\n html [type=\\\"button\\\"],\\n [type=\\\"reset\\\"],\\n [type=\\\"submit\\\"]\"] = {\n WebkitAppearance: 'button'\n }, _ref[\"button::-moz-focus-inner,\\n [type=\\\"button\\\"]::-moz-focus-inner,\\n [type=\\\"reset\\\"]::-moz-focus-inner,\\n [type=\\\"submit\\\"]::-moz-focus-inner\"] = {\n borderStyle: 'none',\n padding: '0'\n }, _ref[\"button:-moz-focusring,\\n [type=\\\"button\\\"]:-moz-focusring,\\n [type=\\\"reset\\\"]:-moz-focusring,\\n [type=\\\"submit\\\"]:-moz-focusring\"] = {\n outline: '1px dotted ButtonText'\n }, _ref.fieldset = {\n padding: '0.35em 0.625em 0.75em'\n }, _ref.legend = {\n boxSizing: 'border-box',\n color: 'inherit',\n display: 'table',\n maxWidth: '100%',\n padding: '0',\n whiteSpace: 'normal'\n }, _ref.progress = {\n verticalAlign: 'baseline'\n }, _ref.textarea = {\n overflow: 'auto'\n }, _ref[\"[type=\\\"checkbox\\\"],\\n [type=\\\"radio\\\"]\"] = {\n boxSizing: 'border-box',\n padding: '0'\n }, _ref[\"[type=\\\"number\\\"]::-webkit-inner-spin-button,\\n [type=\\\"number\\\"]::-webkit-outer-spin-button\"] = {\n height: 'auto'\n }, _ref['[type=\"search\"]'] = {\n WebkitAppearance: 'textfield',\n outlineOffset: '-2px'\n }, _ref['[type=\"search\"]::-webkit-search-decoration'] = {\n WebkitAppearance: 'none'\n }, _ref['::-webkit-file-upload-button'] = {\n WebkitAppearance: 'button',\n font: 'inherit'\n }, _ref.details = {\n display: 'block'\n }, _ref.summary = {\n display: 'list-item'\n }, _ref.template = {\n display: 'none'\n }, _ref['[hidden]'] = {\n display: 'none'\n }, _ref), {\n 'abbr[title]': {\n textDecoration: 'underline dotted'\n }\n }];\n}\n\nvar _templateObject;\n\n/**\n * CSS for declaring a radial gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...radialGradient({\n * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n * extent: 'farthest-corner at 45px 45px',\n * position: 'center',\n * shape: 'ellipse',\n * })\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${radialGradient({\n * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n * extent: 'farthest-corner at 45px 45px',\n * position: 'center',\n * shape: 'ellipse',\n * })}\n *`\n *\n * // CSS as JS Output\n *\n * div: {\n * 'backgroundColor': '#00FFFF',\n * 'backgroundImage': 'radial-gradient(center ellipse farthest-corner at 45px 45px, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',\n * }\n */\nfunction radialGradient(_ref) {\n var colorStops = _ref.colorStops,\n _ref$extent = _ref.extent,\n extent = _ref$extent === void 0 ? '' : _ref$extent,\n fallback = _ref.fallback,\n _ref$position = _ref.position,\n position = _ref$position === void 0 ? '' : _ref$position,\n _ref$shape = _ref.shape,\n shape = _ref$shape === void 0 ? '' : _ref$shape;\n\n if (!colorStops || colorStops.length < 2) {\n throw new PolishedError(57);\n }\n\n return {\n backgroundColor: fallback || colorStops[0].split(' ')[0],\n backgroundImage: constructGradientValue(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([\"radial-gradient(\", \"\", \"\", \"\", \")\"])), position, shape, extent, colorStops.join(', '))\n };\n}\n\n/**\n * A helper to generate a retina background image and non-retina\n * background image. The retina background image will output to a HiDPI media query. The mixin uses\n * a _2x.png filename suffix by default.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...retinaImage('my-img')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${retinaImage('my-img')}\n * `\n *\n * // CSS as JS Output\n * div {\n * backgroundImage: 'url(my-img.png)',\n * '@media only screen and (-webkit-min-device-pixel-ratio: 1.3),\n * only screen and (min--moz-device-pixel-ratio: 1.3),\n * only screen and (-o-min-device-pixel-ratio: 1.3/1),\n * only screen and (min-resolution: 144dpi),\n * only screen and (min-resolution: 1.5dppx)': {\n * backgroundImage: 'url(my-img_2x.png)',\n * }\n * }\n */\nfunction retinaImage(filename, backgroundSize, extension, retinaFilename, retinaSuffix) {\n var _ref;\n\n if (extension === void 0) {\n extension = 'png';\n }\n\n if (retinaSuffix === void 0) {\n retinaSuffix = '_2x';\n }\n\n if (!filename) {\n throw new PolishedError(58);\n } // Replace the dot at the beginning of the passed extension if one exists\n\n\n var ext = extension.replace(/^\\./, '');\n var rFilename = retinaFilename ? retinaFilename + \".\" + ext : \"\" + filename + retinaSuffix + \".\" + ext;\n return _ref = {\n backgroundImage: \"url(\" + filename + \".\" + ext + \")\"\n }, _ref[hiDPI()] = _extends({\n backgroundImage: \"url(\" + rFilename + \")\"\n }, backgroundSize ? {\n backgroundSize: backgroundSize\n } : {}), _ref;\n}\n\n/* eslint-disable key-spacing */\nvar functionsMap = {\n easeInBack: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\n easeInCirc: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\n easeInCubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\n easeInExpo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\n easeInQuad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n easeInQuart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\n easeInQuint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\n easeInSine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)',\n easeOutBack: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n easeOutCubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n easeOutCirc: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n easeOutExpo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n easeOutQuad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n easeOutQuart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n easeOutQuint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n easeOutSine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',\n easeInOutBack: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n easeInOutCirc: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n easeInOutCubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n easeInOutExpo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n easeInOutQuad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n easeInOutQuart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n easeInOutQuint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n easeInOutSine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'\n};\n/* eslint-enable key-spacing */\n\nfunction getTimingFunction(functionName) {\n return functionsMap[functionName];\n}\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @deprecated - This will be deprecated in v5 in favor of `easeIn`, `easeOut`, `easeInOut`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': timingFunctions('easeInQuad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${timingFunctions('easeInQuad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n * }\n */\n\n\nfunction timingFunctions(timingFunction) {\n return getTimingFunction(timingFunction);\n}\n\nvar getBorderWidth = function getBorderWidth(pointingDirection, height, width) {\n var fullWidth = \"\" + width[0] + (width[1] || '');\n var halfWidth = \"\" + width[0] / 2 + (width[1] || '');\n var fullHeight = \"\" + height[0] + (height[1] || '');\n var halfHeight = \"\" + height[0] / 2 + (height[1] || '');\n\n switch (pointingDirection) {\n case 'top':\n return \"0 \" + halfWidth + \" \" + fullHeight + \" \" + halfWidth;\n\n case 'topLeft':\n return fullWidth + \" \" + fullHeight + \" 0 0\";\n\n case 'left':\n return halfHeight + \" \" + fullWidth + \" \" + halfHeight + \" 0\";\n\n case 'bottomLeft':\n return fullWidth + \" 0 0 \" + fullHeight;\n\n case 'bottom':\n return fullHeight + \" \" + halfWidth + \" 0 \" + halfWidth;\n\n case 'bottomRight':\n return \"0 0 \" + fullWidth + \" \" + fullHeight;\n\n case 'right':\n return halfHeight + \" 0 \" + halfHeight + \" \" + fullWidth;\n\n case 'topRight':\n default:\n return \"0 \" + fullWidth + \" \" + fullHeight + \" 0\";\n }\n};\n\nvar getBorderColor = function getBorderColor(pointingDirection, foregroundColor) {\n switch (pointingDirection) {\n case 'top':\n case 'bottomRight':\n return {\n borderBottomColor: foregroundColor\n };\n\n case 'right':\n case 'bottomLeft':\n return {\n borderLeftColor: foregroundColor\n };\n\n case 'bottom':\n case 'topLeft':\n return {\n borderTopColor: foregroundColor\n };\n\n case 'left':\n case 'topRight':\n return {\n borderRightColor: foregroundColor\n };\n\n default:\n throw new PolishedError(59);\n }\n};\n/**\n * CSS to represent triangle with any pointing direction with an optional background color.\n *\n * @example\n * // Styles as object usage\n *\n * const styles = {\n * ...triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })\n * }\n *\n *\n * // styled-components usage\n * const div = styled.div`\n * ${triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })}\n *\n *\n * // CSS as JS Output\n *\n * div: {\n * 'borderColor': 'transparent transparent transparent red',\n * 'borderStyle': 'solid',\n * 'borderWidth': '50px 0 50px 100px',\n * 'height': '0',\n * 'width': '0',\n * }\n */\n\n\nfunction triangle(_ref) {\n var pointingDirection = _ref.pointingDirection,\n height = _ref.height,\n width = _ref.width,\n foregroundColor = _ref.foregroundColor,\n _ref$backgroundColor = _ref.backgroundColor,\n backgroundColor = _ref$backgroundColor === void 0 ? 'transparent' : _ref$backgroundColor;\n var widthAndUnit = getValueAndUnit(width);\n var heightAndUnit = getValueAndUnit(height);\n\n if (isNaN(heightAndUnit[0]) || isNaN(widthAndUnit[0])) {\n throw new PolishedError(60);\n }\n\n return _extends({\n width: '0',\n height: '0',\n borderColor: backgroundColor\n }, getBorderColor(pointingDirection, foregroundColor), {\n borderStyle: 'solid',\n borderWidth: getBorderWidth(pointingDirection, heightAndUnit, widthAndUnit)\n });\n}\n\n/**\n * Provides an easy way to change the `wordWrap` property.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...wordWrap('break-word')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${wordWrap('break-word')}\n * `\n *\n * // CSS as JS Output\n *\n * const styles = {\n * overflowWrap: 'break-word',\n * wordWrap: 'break-word',\n * wordBreak: 'break-all',\n * }\n */\nfunction wordWrap(wrap) {\n if (wrap === void 0) {\n wrap = 'break-word';\n }\n\n var wordBreak = wrap === 'break-word' ? 'break-all' : wrap;\n return {\n overflowWrap: wrap,\n wordWrap: wrap,\n wordBreak: wordBreak\n };\n}\n\nfunction colorToInt(color) {\n return Math.round(color * 255);\n}\n\nfunction convertToInt(red, green, blue) {\n return colorToInt(red) + \",\" + colorToInt(green) + \",\" + colorToInt(blue);\n}\n\nfunction hslToRgb(hue, saturation, lightness, convert) {\n if (convert === void 0) {\n convert = convertToInt;\n }\n\n if (saturation === 0) {\n // achromatic\n return convert(lightness, lightness, lightness);\n } // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n\n\n var huePrime = (hue % 360 + 360) % 360 / 60;\n var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;\n var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n var red = 0;\n var green = 0;\n var blue = 0;\n\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n\n var lightnessModification = lightness - chroma / 2;\n var finalRed = red + lightnessModification;\n var finalGreen = green + lightnessModification;\n var finalBlue = blue + lightnessModification;\n return convert(finalRed, finalGreen, finalBlue);\n}\n\nvar namedColorMap = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '00ffff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000',\n blanchedalmond: 'ffebcd',\n blue: '0000ff',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '00ffff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkgrey: 'a9a9a9',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkslategrey: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dimgrey: '696969',\n dodgerblue: '1e90ff',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'ff00ff',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n grey: '808080',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred: 'cd5c5c',\n indigo: '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgray: 'd3d3d3',\n lightgreen: '90ee90',\n lightgrey: 'd3d3d3',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslategray: '789',\n lightslategrey: '789',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '0f0',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'f0f',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370db',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'db7093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '639',\n red: 'f00',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n slategrey: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n wheat: 'f5deb3',\n white: 'fff',\n whitesmoke: 'f5f5f5',\n yellow: 'ff0',\n yellowgreen: '9acd32'\n};\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n * @private\n */\n\nfunction nameToHex(color) {\n if (typeof color !== 'string') return color;\n var normalizedColorName = color.toLowerCase();\n return namedColorMap[normalizedColorName] ? \"#\" + namedColorMap[normalizedColorName] : color;\n}\n\nvar hexRegex = /^#[a-fA-F0-9]{6}$/;\nvar hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;\nvar reducedHexRegex = /^#[a-fA-F0-9]{3}$/;\nvar reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;\nvar rgbRegex = /^rgb\\(\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*\\)$/i;\nvar rgbaRegex = /^rgb(?:a)?\\(\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,|\\/)\\s*([-+]?\\d*[.]?\\d+[%]?)\\s*\\)$/i;\nvar hslRegex = /^hsl\\(\\s*(\\d{0,3}[.]?[0-9]+(?:deg)?)\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*\\)$/i;\nvar hslaRegex = /^hsl(?:a)?\\(\\s*(\\d{0,3}[.]?[0-9]+(?:deg)?)\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*(?:,|\\/)\\s*([-+]?\\d*[.]?\\d+[%]?)\\s*\\)$/i;\n/**\n * Returns an RgbColor or RgbaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a RgbColor or RgbaColor object back to a string.\n *\n * @example\n * // Assigns `{ red: 255, green: 0, blue: 0 }` to color1\n * const color1 = parseToRgb('rgb(255, 0, 0)');\n * // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2\n * const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');\n */\n\nfunction parseToRgb(color) {\n if (typeof color !== 'string') {\n throw new PolishedError(3);\n }\n\n var normalizedColor = nameToHex(color);\n\n if (normalizedColor.match(hexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16)\n };\n }\n\n if (normalizedColor.match(hexRgbaRegex)) {\n var alpha = parseFloat((parseInt(\"\" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16),\n alpha: alpha\n };\n }\n\n if (normalizedColor.match(reducedHexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16)\n };\n }\n\n if (normalizedColor.match(reducedRgbaHexRegex)) {\n var _alpha = parseFloat((parseInt(\"\" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));\n\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16),\n alpha: _alpha\n };\n }\n\n var rgbMatched = rgbRegex.exec(normalizedColor);\n\n if (rgbMatched) {\n return {\n red: parseInt(\"\" + rgbMatched[1], 10),\n green: parseInt(\"\" + rgbMatched[2], 10),\n blue: parseInt(\"\" + rgbMatched[3], 10)\n };\n }\n\n var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));\n\n if (rgbaMatched) {\n return {\n red: parseInt(\"\" + rgbaMatched[1], 10),\n green: parseInt(\"\" + rgbaMatched[2], 10),\n blue: parseInt(\"\" + rgbaMatched[3], 10),\n alpha: parseFloat(\"\" + rgbaMatched[4]) > 1 ? parseFloat(\"\" + rgbaMatched[4]) / 100 : parseFloat(\"\" + rgbaMatched[4])\n };\n }\n\n var hslMatched = hslRegex.exec(normalizedColor);\n\n if (hslMatched) {\n var hue = parseInt(\"\" + hslMatched[1], 10);\n var saturation = parseInt(\"\" + hslMatched[2], 10) / 100;\n var lightness = parseInt(\"\" + hslMatched[3], 10) / 100;\n var rgbColorString = \"rgb(\" + hslToRgb(hue, saturation, lightness) + \")\";\n var hslRgbMatched = rgbRegex.exec(rgbColorString);\n\n if (!hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, rgbColorString);\n }\n\n return {\n red: parseInt(\"\" + hslRgbMatched[1], 10),\n green: parseInt(\"\" + hslRgbMatched[2], 10),\n blue: parseInt(\"\" + hslRgbMatched[3], 10)\n };\n }\n\n var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));\n\n if (hslaMatched) {\n var _hue = parseInt(\"\" + hslaMatched[1], 10);\n\n var _saturation = parseInt(\"\" + hslaMatched[2], 10) / 100;\n\n var _lightness = parseInt(\"\" + hslaMatched[3], 10) / 100;\n\n var _rgbColorString = \"rgb(\" + hslToRgb(_hue, _saturation, _lightness) + \")\";\n\n var _hslRgbMatched = rgbRegex.exec(_rgbColorString);\n\n if (!_hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, _rgbColorString);\n }\n\n return {\n red: parseInt(\"\" + _hslRgbMatched[1], 10),\n green: parseInt(\"\" + _hslRgbMatched[2], 10),\n blue: parseInt(\"\" + _hslRgbMatched[3], 10),\n alpha: parseFloat(\"\" + hslaMatched[4]) > 1 ? parseFloat(\"\" + hslaMatched[4]) / 100 : parseFloat(\"\" + hslaMatched[4])\n };\n }\n\n throw new PolishedError(5);\n}\n\nfunction rgbToHsl(color) {\n // make sure rgb are contained in a set of [0, 255]\n var red = color.red / 255;\n var green = color.green / 255;\n var blue = color.blue / 255;\n var max = Math.max(red, green, blue);\n var min = Math.min(red, green, blue);\n var lightness = (max + min) / 2;\n\n if (max === min) {\n // achromatic\n if (color.alpha !== undefined) {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness,\n alpha: color.alpha\n };\n } else {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness\n };\n }\n }\n\n var hue;\n var delta = max - min;\n var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);\n\n switch (max) {\n case red:\n hue = (green - blue) / delta + (green < blue ? 6 : 0);\n break;\n\n case green:\n hue = (blue - red) / delta + 2;\n break;\n\n default:\n // blue case\n hue = (red - green) / delta + 4;\n break;\n }\n\n hue *= 60;\n\n if (color.alpha !== undefined) {\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness,\n alpha: color.alpha\n };\n }\n\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness\n };\n}\n\n/**\n * Returns an HslColor or HslaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a HslColor or HslaColor object back to a string.\n *\n * @example\n * // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1\n * const color1 = parseToHsl('rgb(255, 0, 0)');\n * // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2\n * const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');\n */\nfunction parseToHsl(color) {\n // Note: At a later stage we can optimize this function as right now a hsl\n // color would be parsed converted to rgb values and converted back to hsl.\n return rgbToHsl(parseToRgb(color));\n}\n\n/**\n * Reduces hex values if possible e.g. #ff8866 to #f86\n * @private\n */\nvar reduceHexValue = function reduceHexValue(value) {\n if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {\n return \"#\" + value[1] + value[3] + value[5];\n }\n\n return value;\n};\n\nvar reduceHexValue$1 = reduceHexValue;\n\nfunction numberToHex(value) {\n var hex = value.toString(16);\n return hex.length === 1 ? \"0\" + hex : hex;\n}\n\nfunction colorToHex(color) {\n return numberToHex(Math.round(color * 255));\n}\n\nfunction convertToHex(red, green, blue) {\n return reduceHexValue$1(\"#\" + colorToHex(red) + colorToHex(green) + colorToHex(blue));\n}\n\nfunction hslToHex(hue, saturation, lightness) {\n return hslToRgb(hue, saturation, lightness, convertToHex);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsl(359, 0.75, 0.4),\n * background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsl(359, 0.75, 0.4)};\n * background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#b3191c\";\n * background: \"#b3191c\";\n * }\n */\nfunction hsl(value, saturation, lightness) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {\n return hslToHex(value, saturation, lightness);\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {\n return hslToHex(value.hue, value.saturation, value.lightness);\n }\n\n throw new PolishedError(1);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsla(359, 0.75, 0.4, 0.7),\n * background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),\n * background: hsla(359, 0.75, 0.4, 1),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsla(359, 0.75, 0.4, 0.7)};\n * background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};\n * background: ${hsla(359, 0.75, 0.4, 1)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"#b3191c\";\n * }\n */\nfunction hsla(value, saturation, lightness, alpha) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {\n return alpha >= 1 ? hslToHex(value, saturation, lightness) : \"rgba(\" + hslToRgb(value, saturation, lightness) + \",\" + alpha + \")\";\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {\n return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : \"rgba(\" + hslToRgb(value.hue, value.saturation, value.lightness) + \",\" + value.alpha + \")\";\n }\n\n throw new PolishedError(2);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgb(255, 205, 100),\n * background: rgb({ red: 255, green: 205, blue: 100 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgb(255, 205, 100)};\n * background: ${rgb({ red: 255, green: 205, blue: 100 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffcd64\";\n * background: \"#ffcd64\";\n * }\n */\nfunction rgb(value, green, blue) {\n if (typeof value === 'number' && typeof green === 'number' && typeof blue === 'number') {\n return reduceHexValue$1(\"#\" + numberToHex(value) + numberToHex(green) + numberToHex(blue));\n } else if (typeof value === 'object' && green === undefined && blue === undefined) {\n return reduceHexValue$1(\"#\" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));\n }\n\n throw new PolishedError(6);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * Can also be used to fade a color by passing a hex value or named CSS color along with an alpha value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgba(255, 205, 100, 0.7),\n * background: rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 }),\n * background: rgba(255, 205, 100, 1),\n * background: rgba('#ffffff', 0.4),\n * background: rgba('black', 0.7),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgba(255, 205, 100, 0.7)};\n * background: ${rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 })};\n * background: ${rgba(255, 205, 100, 1)};\n * background: ${rgba('#ffffff', 0.4)};\n * background: ${rgba('black', 0.7)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"#ffcd64\";\n * background: \"rgba(255,255,255,0.4)\";\n * background: \"rgba(0,0,0,0.7)\";\n * }\n */\nfunction rgba(firstValue, secondValue, thirdValue, fourthValue) {\n if (typeof firstValue === 'string' && typeof secondValue === 'number') {\n var rgbValue = parseToRgb(firstValue);\n return \"rgba(\" + rgbValue.red + \",\" + rgbValue.green + \",\" + rgbValue.blue + \",\" + secondValue + \")\";\n } else if (typeof firstValue === 'number' && typeof secondValue === 'number' && typeof thirdValue === 'number' && typeof fourthValue === 'number') {\n return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : \"rgba(\" + firstValue + \",\" + secondValue + \",\" + thirdValue + \",\" + fourthValue + \")\";\n } else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {\n return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : \"rgba(\" + firstValue.red + \",\" + firstValue.green + \",\" + firstValue.blue + \",\" + firstValue.alpha + \")\";\n }\n\n throw new PolishedError(7);\n}\n\nvar isRgb = function isRgb(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\n\nvar isRgba = function isRgba(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';\n};\n\nvar isHsl = function isHsl(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\n\nvar isHsla = function isHsla(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';\n};\n/**\n * Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: toColorString({ red: 255, green: 205, blue: 100 }),\n * background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${toColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\n\n\nfunction toColorString(color) {\n if (typeof color !== 'object') throw new PolishedError(8);\n if (isRgba(color)) return rgba(color);\n if (isRgb(color)) return rgb(color);\n if (isHsla(color)) return hsla(color);\n if (isHsl(color)) return hsl(color);\n throw new PolishedError(8);\n}\n\n// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-redeclare\nfunction curried(f, length, acc) {\n return function fn() {\n // eslint-disable-next-line prefer-rest-params\n var combined = acc.concat(Array.prototype.slice.call(arguments));\n return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);\n };\n} // eslint-disable-next-line no-redeclare\n\n\nfunction curry(f) {\n // eslint-disable-line no-redeclare\n return curried(f, f.length, []);\n}\n\n/**\n * Changes the hue of the color. Hue is a number between 0 to 360. The first\n * argument for adjustHue is the amount of degrees the color is rotated around\n * the color wheel, always producing a positive hue value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: adjustHue(180, '#448'),\n * background: adjustHue('180', 'rgba(101,100,205,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${adjustHue(180, '#448')};\n * background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#888844\";\n * background: \"rgba(136,136,68,0.7)\";\n * }\n */\n\nfunction adjustHue(degree, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n hue: hslColor.hue + parseFloat(degree)\n }));\n} // prettier-ignore\n\n\nvar curriedAdjustHue = /*#__PURE__*/curry\n/* ::
*/\n(adjustHue);\nvar curriedAdjustHue$1 = curriedAdjustHue;\n\n/**\n * Returns the complement of the provided color. This is identical to adjustHue(180, ).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: complement('#448'),\n * background: complement('rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${complement('#448')};\n * background: ${complement('rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#884\";\n * background: \"rgba(153,153,153,0.7)\";\n * }\n */\n\nfunction complement(color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n hue: (hslColor.hue + 180) % 360\n }));\n}\n\nfunction guard(lowerBoundary, upperBoundary, value) {\n return Math.max(lowerBoundary, Math.min(upperBoundary, value));\n}\n\n/**\n * Returns a string value for the darkened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: darken(0.2, '#FFCD64'),\n * background: darken('0.2', 'rgba(255,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${darken(0.2, '#FFCD64')};\n * background: ${darken('0.2', 'rgba(255,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffbd31\";\n * background: \"rgba(255,189,49,0.7)\";\n * }\n */\n\nfunction darken(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedDarken = /*#__PURE__*/curry\n/* :: */\n(darken);\nvar curriedDarken$1 = curriedDarken;\n\n/**\n * Decreases the intensity of a color. Its range is between 0 to 1. The first\n * argument of the desaturate function is the amount by how much the color\n * intensity should be decreased.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: desaturate(0.2, '#CCCD64'),\n * background: desaturate('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${desaturate(0.2, '#CCCD64')};\n * background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#b8b979\";\n * background: \"rgba(184,185,121,0.7)\";\n * }\n */\n\nfunction desaturate(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedDesaturate = /*#__PURE__*/curry\n/* :: */\n(desaturate);\nvar curriedDesaturate$1 = curriedDesaturate;\n\n/**\n * Returns a number (float) representing the luminance of a color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff',\n * background: getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?\n * 'rgba(58, 133, 255, 1)' :\n * 'rgba(255, 57, 149, 1)',\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff'};\n * background: ${getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?\n * 'rgba(58, 133, 255, 1)' :\n * 'rgba(255, 57, 149, 1)'};\n *\n * // CSS in JS Output\n *\n * div {\n * background: \"#CCCD64\";\n * background: \"rgba(58, 133, 255, 1)\";\n * }\n */\n\nfunction getLuminance(color) {\n if (color === 'transparent') return 0;\n var rgbColor = parseToRgb(color);\n\n var _Object$keys$map = Object.keys(rgbColor).map(function (key) {\n var channel = rgbColor[key] / 255;\n return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);\n }),\n r = _Object$keys$map[0],\n g = _Object$keys$map[1],\n b = _Object$keys$map[2];\n\n return parseFloat((0.2126 * r + 0.7152 * g + 0.0722 * b).toFixed(3));\n}\n\n/**\n * Returns the contrast ratio between two colors based on\n * [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).\n *\n * @example\n * const contrastRatio = getContrast('#444', '#fff');\n */\n\nfunction getContrast(color1, color2) {\n var luminance1 = getLuminance(color1);\n var luminance2 = getLuminance(color2);\n return parseFloat((luminance1 > luminance2 ? (luminance1 + 0.05) / (luminance2 + 0.05) : (luminance2 + 0.05) / (luminance1 + 0.05)).toFixed(2));\n}\n\n/**\n * Converts the color to a grayscale, by reducing its saturation to 0.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: grayscale('#CCCD64'),\n * background: grayscale('rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${grayscale('#CCCD64')};\n * background: ${grayscale('rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#999\";\n * background: \"rgba(153,153,153,0.7)\";\n * }\n */\n\nfunction grayscale(color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n saturation: 0\n }));\n}\n\n/**\n * Converts a HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\nfunction hslToColorString(color) {\n if (typeof color === 'object' && typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number') {\n if (color.alpha && typeof color.alpha === 'number') {\n return hsla({\n hue: color.hue,\n saturation: color.saturation,\n lightness: color.lightness,\n alpha: color.alpha\n });\n }\n\n return hsl({\n hue: color.hue,\n saturation: color.saturation,\n lightness: color.lightness\n });\n }\n\n throw new PolishedError(45);\n}\n\n/**\n * Inverts the red, green and blue values of a color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: invert('#CCCD64'),\n * background: invert('rgba(101,100,205,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${invert('#CCCD64')};\n * background: ${invert('rgba(101,100,205,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#33329b\";\n * background: \"rgba(154,155,50,0.7)\";\n * }\n */\n\nfunction invert(color) {\n if (color === 'transparent') return color; // parse color string to rgb\n\n var value = parseToRgb(color);\n return toColorString(_extends({}, value, {\n red: 255 - value.red,\n green: 255 - value.green,\n blue: 255 - value.blue\n }));\n}\n\n/**\n * Returns a string value for the lightened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: lighten(0.2, '#CCCD64'),\n * background: lighten('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${lighten(0.2, '#FFCD64')};\n * background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e5e6b1\";\n * background: \"rgba(229,230,177,0.7)\";\n * }\n */\n\nfunction lighten(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedLighten = /*#__PURE__*/curry\n/* :: */\n(lighten);\nvar curriedLighten$1 = curriedLighten;\n\n/**\n * Determines which contrast guidelines have been met for two colors.\n * Based on the [contrast calculations recommended by W3](https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html).\n *\n * @example\n * const scores = meetsContrastGuidelines('#444', '#fff');\n */\nfunction meetsContrastGuidelines(color1, color2) {\n var contrastRatio = getContrast(color1, color2);\n return {\n AA: contrastRatio >= 4.5,\n AALarge: contrastRatio >= 3,\n AAA: contrastRatio >= 7,\n AAALarge: contrastRatio >= 4.5\n };\n}\n\n/**\n * Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: mix(0.5, '#f00', '#00f')\n * background: mix(0.25, '#f00', '#00f')\n * background: mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${mix(0.5, '#f00', '#00f')};\n * background: ${mix(0.25, '#f00', '#00f')};\n * background: ${mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#7f007f\";\n * background: \"#3f00bf\";\n * background: \"rgba(63, 0, 191, 0.75)\";\n * }\n */\n\nfunction mix(weight, color, otherColor) {\n if (color === 'transparent') return otherColor;\n if (otherColor === 'transparent') return color;\n if (weight === 0) return otherColor;\n var parsedColor1 = parseToRgb(color);\n\n var color1 = _extends({}, parsedColor1, {\n alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1\n });\n\n var parsedColor2 = parseToRgb(otherColor);\n\n var color2 = _extends({}, parsedColor2, {\n alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1\n }); // The formula is copied from the original Sass implementation:\n // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method\n\n\n var alphaDelta = color1.alpha - color2.alpha;\n var x = parseFloat(weight) * 2 - 1;\n var y = x * alphaDelta === -1 ? x : x + alphaDelta;\n var z = 1 + x * alphaDelta;\n var weight1 = (y / z + 1) / 2.0;\n var weight2 = 1 - weight1;\n var mixedColor = {\n red: Math.floor(color1.red * weight1 + color2.red * weight2),\n green: Math.floor(color1.green * weight1 + color2.green * weight2),\n blue: Math.floor(color1.blue * weight1 + color2.blue * weight2),\n alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))\n };\n return rgba(mixedColor);\n} // prettier-ignore\n\n\nvar curriedMix = /*#__PURE__*/curry\n/* :: */\n(mix);\nvar mix$1 = curriedMix;\n\n/**\n * Increases the opacity of a color. Its range for the amount is between 0 to 1.\n *\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');\n * background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),\n * background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};\n * background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},\n * background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#fff\";\n * background: \"rgba(255,255,255,0.7)\";\n * background: \"rgba(255,0,0,0.7)\";\n * }\n */\n\nfunction opacify(amount, color) {\n if (color === 'transparent') return color;\n var parsedColor = parseToRgb(color);\n var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;\n\n var colorWithAlpha = _extends({}, parsedColor, {\n alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)\n });\n\n return rgba(colorWithAlpha);\n} // prettier-ignore\n\n\nvar curriedOpacify = /*#__PURE__*/curry\n/* :: */\n(opacify);\nvar curriedOpacify$1 = curriedOpacify;\n\nvar defaultReturnIfLightColor = '#000';\nvar defaultReturnIfDarkColor = '#fff';\n/**\n * Returns black or white (or optional passed colors) for best\n * contrast depending on the luminosity of the given color.\n * When passing custom return colors, strict mode ensures that the\n * return color always meets or exceeds WCAG level AA or greater. If this test\n * fails, the default return color (black or white) is returned in place of the\n * custom return color. You can optionally turn off strict mode.\n *\n * Follows [W3C specs for readability](https://www.w3.org/TR/WCAG20-TECHS/G18.html).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * color: readableColor('#000'),\n * color: readableColor('black', '#001', '#ff8'),\n * color: readableColor('white', '#001', '#ff8'),\n * color: readableColor('red', '#333', '#ddd', true)\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * color: ${readableColor('#000')};\n * color: ${readableColor('black', '#001', '#ff8')};\n * color: ${readableColor('white', '#001', '#ff8')};\n * color: ${readableColor('red', '#333', '#ddd', true)};\n * `\n *\n * // CSS in JS Output\n * element {\n * color: \"#fff\";\n * color: \"#ff8\";\n * color: \"#001\";\n * color: \"#000\";\n * }\n */\n\nfunction readableColor(color, returnIfLightColor, returnIfDarkColor, strict) {\n if (returnIfLightColor === void 0) {\n returnIfLightColor = defaultReturnIfLightColor;\n }\n\n if (returnIfDarkColor === void 0) {\n returnIfDarkColor = defaultReturnIfDarkColor;\n }\n\n if (strict === void 0) {\n strict = true;\n }\n\n var isColorLight = getLuminance(color) > 0.179;\n var preferredReturnColor = isColorLight ? returnIfLightColor : returnIfDarkColor;\n\n if (!strict || getContrast(color, preferredReturnColor) >= 4.5) {\n return preferredReturnColor;\n }\n\n return isColorLight ? defaultReturnIfLightColor : defaultReturnIfDarkColor;\n}\n\n/**\n * Converts a RgbColor or RgbaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb` or `rgba`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgbToColorString({ red: 255, green: 205, blue: 100 }),\n * background: rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgbToColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * }\n */\nfunction rgbToColorString(color) {\n if (typeof color === 'object' && typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number') {\n if (typeof color.alpha === 'number') {\n return rgba({\n red: color.red,\n green: color.green,\n blue: color.blue,\n alpha: color.alpha\n });\n }\n\n return rgb({\n red: color.red,\n green: color.green,\n blue: color.blue\n });\n }\n\n throw new PolishedError(46);\n}\n\n/**\n * Increases the intensity of a color. Its range is between 0 to 1. The first\n * argument of the saturate function is the amount by how much the color\n * intensity should be increased.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: saturate(0.2, '#CCCD64'),\n * background: saturate('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${saturate(0.2, '#FFCD64')};\n * background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e0e250\";\n * background: \"rgba(224,226,80,0.7)\";\n * }\n */\n\nfunction saturate(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedSaturate = /*#__PURE__*/curry\n/* :: */\n(saturate);\nvar curriedSaturate$1 = curriedSaturate;\n\n/**\n * Sets the hue of a color to the provided value. The hue range can be\n * from 0 and 359.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setHue(42, '#CCCD64'),\n * background: setHue('244', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setHue(42, '#CCCD64')};\n * background: ${setHue('244', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#cdae64\";\n * background: \"rgba(107,100,205,0.7)\";\n * }\n */\n\nfunction setHue(hue, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n hue: parseFloat(hue)\n }));\n} // prettier-ignore\n\n\nvar curriedSetHue = /*#__PURE__*/curry\n/* :: */\n(setHue);\nvar curriedSetHue$1 = curriedSetHue;\n\n/**\n * Sets the lightness of a color to the provided value. The lightness range can be\n * from 0 and 1.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setLightness(0.2, '#CCCD64'),\n * background: setLightness('0.75', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setLightness(0.2, '#CCCD64')};\n * background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#4d4d19\";\n * background: \"rgba(223,224,159,0.7)\";\n * }\n */\n\nfunction setLightness(lightness, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n lightness: parseFloat(lightness)\n }));\n} // prettier-ignore\n\n\nvar curriedSetLightness = /*#__PURE__*/curry\n/* :: */\n(setLightness);\nvar curriedSetLightness$1 = curriedSetLightness;\n\n/**\n * Sets the saturation of a color to the provided value. The saturation range can be\n * from 0 and 1.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setSaturation(0.2, '#CCCD64'),\n * background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setSaturation(0.2, '#CCCD64')};\n * background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#adad84\";\n * background: \"rgba(228,229,76,0.7)\";\n * }\n */\n\nfunction setSaturation(saturation, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n saturation: parseFloat(saturation)\n }));\n} // prettier-ignore\n\n\nvar curriedSetSaturation = /*#__PURE__*/curry\n/* :: */\n(setSaturation);\nvar curriedSetSaturation$1 = curriedSetSaturation;\n\n/**\n * Shades a color by mixing it with black. `shade` can produce\n * hue shifts, where as `darken` manipulates the luminance channel and therefore\n * doesn't produce hue shifts.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: shade(0.25, '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${shade(0.25, '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#00003f\";\n * }\n */\n\nfunction shade(percentage, color) {\n if (color === 'transparent') return color;\n return mix$1(parseFloat(percentage), 'rgb(0, 0, 0)', color);\n} // prettier-ignore\n\n\nvar curriedShade = /*#__PURE__*/curry\n/* :: */\n(shade);\nvar curriedShade$1 = curriedShade;\n\n/**\n * Tints a color by mixing it with white. `tint` can produce\n * hue shifts, where as `lighten` manipulates the luminance channel and therefore\n * doesn't produce hue shifts.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: tint(0.25, '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${tint(0.25, '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#bfbfff\";\n * }\n */\n\nfunction tint(percentage, color) {\n if (color === 'transparent') return color;\n return mix$1(parseFloat(percentage), 'rgb(255, 255, 255)', color);\n} // prettier-ignore\n\n\nvar curriedTint = /*#__PURE__*/curry\n/* :: */\n(tint);\nvar curriedTint$1 = curriedTint;\n\n/**\n * Decreases the opacity of a color. Its range for the amount is between 0 to 1.\n *\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: transparentize(0.1, '#fff'),\n * background: transparentize(0.2, 'hsl(0, 0%, 100%)'),\n * background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${transparentize(0.1, '#fff')};\n * background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};\n * background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,255,255,0.9)\";\n * background: \"rgba(255,255,255,0.8)\";\n * background: \"rgba(255,0,0,0.3)\";\n * }\n */\n\nfunction transparentize(amount, color) {\n if (color === 'transparent') return color;\n var parsedColor = parseToRgb(color);\n var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;\n\n var colorWithAlpha = _extends({}, parsedColor, {\n alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)\n });\n\n return rgba(colorWithAlpha);\n} // prettier-ignore\n\n\nvar curriedTransparentize = /*#__PURE__*/curry\n/* :: */\n(transparentize);\nvar curriedTransparentize$1 = curriedTransparentize;\n\n/**\n * Shorthand for easily setting the animation property. Allows either multiple arrays with animations\n * or a single animation spread over the arguments.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'animation': 'rotate 1s ease-in-out, colorchange 2s'\n * }\n * @example\n * // Styles as object usage\n * const styles = {\n * ...animation('rotate', '1s', 'ease-in-out')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${animation('rotate', '1s', 'ease-in-out')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'animation': 'rotate 1s ease-in-out'\n * }\n */\nfunction animation() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // Allow single or multiple animations passed\n var multiMode = Array.isArray(args[0]);\n\n if (!multiMode && args.length > 8) {\n throw new PolishedError(64);\n }\n\n var code = args.map(function (arg) {\n if (multiMode && !Array.isArray(arg) || !multiMode && Array.isArray(arg)) {\n throw new PolishedError(65);\n }\n\n if (Array.isArray(arg) && arg.length > 8) {\n throw new PolishedError(66);\n }\n\n return Array.isArray(arg) ? arg.join(' ') : arg;\n }).join(', ');\n return {\n animation: code\n };\n}\n\n/**\n * Shorthand that accepts any number of backgroundImage values as parameters for creating a single background statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...backgroundImages('url(\"/image/background.jpg\")', 'linear-gradient(red, green)')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${backgroundImages('url(\"/image/background.jpg\")', 'linear-gradient(red, green)')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'backgroundImage': 'url(\"/image/background.jpg\"), linear-gradient(red, green)'\n * }\n */\nfunction backgroundImages() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n return {\n backgroundImage: properties.join(', ')\n };\n}\n\n/**\n * Shorthand that accepts any number of background values as parameters for creating a single background statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...backgrounds('url(\"/image/background.jpg\")', 'linear-gradient(red, green)', 'center no-repeat')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${backgrounds('url(\"/image/background.jpg\")', 'linear-gradient(red, green)', 'center no-repeat')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'background': 'url(\"/image/background.jpg\"), linear-gradient(red, green), center no-repeat'\n * }\n */\nfunction backgrounds() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n return {\n background: properties.join(', ')\n };\n}\n\nvar sideMap = ['top', 'right', 'bottom', 'left'];\n/**\n * Shorthand for the border property that splits out individual properties for use with tools like Fela and Styletron. A side keyword can optionally be passed to target only one side's border properties.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...border('1px', 'solid', 'red')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${border('1px', 'solid', 'red')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderColor': 'red',\n * 'borderStyle': 'solid',\n * 'borderWidth': `1px`,\n * }\n *\n * // Styles as object usage\n * const styles = {\n * ...border('top', '1px', 'solid', 'red')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${border('top', '1px', 'solid', 'red')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopColor': 'red',\n * 'borderTopStyle': 'solid',\n * 'borderTopWidth': `1px`,\n * }\n */\n\nfunction border(sideKeyword) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n if (typeof sideKeyword === 'string' && sideMap.indexOf(sideKeyword) >= 0) {\n var _ref;\n\n return _ref = {}, _ref[\"border\" + capitalizeString(sideKeyword) + \"Width\"] = values[0], _ref[\"border\" + capitalizeString(sideKeyword) + \"Style\"] = values[1], _ref[\"border\" + capitalizeString(sideKeyword) + \"Color\"] = values[2], _ref;\n } else {\n values.unshift(sideKeyword);\n return {\n borderWidth: values[0],\n borderStyle: values[1],\n borderColor: values[2]\n };\n }\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderColor('red', 'green', 'blue', 'yellow')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderColor('red', 'green', 'blue', 'yellow')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopColor': 'red',\n * 'borderRightColor': 'green',\n * 'borderBottomColor': 'blue',\n * 'borderLeftColor': 'yellow'\n * }\n */\nfunction borderColor() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderColor'].concat(values));\n}\n\n/**\n * Shorthand that accepts a value for side and a value for radius and applies the radius value to both corners of the side.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderRadius('top', '5px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderRadius('top', '5px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopRightRadius': '5px',\n * 'borderTopLeftRadius': '5px',\n * }\n */\nfunction borderRadius(side, radius) {\n var uppercaseSide = capitalizeString(side);\n\n if (!radius && radius !== 0) {\n throw new PolishedError(62);\n }\n\n if (uppercaseSide === 'Top' || uppercaseSide === 'Bottom') {\n var _ref;\n\n return _ref = {}, _ref[\"border\" + uppercaseSide + \"RightRadius\"] = radius, _ref[\"border\" + uppercaseSide + \"LeftRadius\"] = radius, _ref;\n }\n\n if (uppercaseSide === 'Left' || uppercaseSide === 'Right') {\n var _ref2;\n\n return _ref2 = {}, _ref2[\"borderTop\" + uppercaseSide + \"Radius\"] = radius, _ref2[\"borderBottom\" + uppercaseSide + \"Radius\"] = radius, _ref2;\n }\n\n throw new PolishedError(63);\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderStyle('solid', 'dashed', 'dotted', 'double')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderStyle('solid', 'dashed', 'dotted', 'double')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopStyle': 'solid',\n * 'borderRightStyle': 'dashed',\n * 'borderBottomStyle': 'dotted',\n * 'borderLeftStyle': 'double'\n * }\n */\nfunction borderStyle() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderStyle'].concat(values));\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderWidth('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderWidth('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopWidth': '12px',\n * 'borderRightWidth': '24px',\n * 'borderBottomWidth': '36px',\n * 'borderLeftWidth': '48px'\n * }\n */\nfunction borderWidth() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderWidth'].concat(values));\n}\n\nfunction generateSelectors(template, state) {\n var stateSuffix = state ? \":\" + state : '';\n return template(stateSuffix);\n}\n/**\n * Function helper that adds an array of states to a template of selectors. Used in textInputs and buttons.\n * @private\n */\n\n\nfunction statefulSelectors(states, template, stateMap) {\n if (!template) throw new PolishedError(67);\n if (states.length === 0) return generateSelectors(template, null);\n var selectors = [];\n\n for (var i = 0; i < states.length; i += 1) {\n if (stateMap && stateMap.indexOf(states[i]) < 0) {\n throw new PolishedError(68);\n }\n\n selectors.push(generateSelectors(template, states[i]));\n }\n\n selectors = selectors.join(',');\n return selectors;\n}\n\nvar stateMap$1 = [undefined, null, 'active', 'focus', 'hover'];\n\nfunction template$1(state) {\n return \"button\" + state + \",\\n input[type=\\\"button\\\"]\" + state + \",\\n input[type=\\\"reset\\\"]\" + state + \",\\n input[type=\\\"submit\\\"]\" + state;\n}\n/**\n * Populates selectors that target all buttons. You can pass optional states to append to the selectors.\n * @example\n * // Styles as object usage\n * const styles = {\n * [buttons('active')]: {\n * 'border': 'none'\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * > ${buttons('active')} {\n * border: none;\n * }\n * `\n *\n * // CSS in JS Output\n *\n * 'button:active,\n * 'input[type=\"button\"]:active,\n * 'input[type=\\\"reset\\\"]:active,\n * 'input[type=\\\"submit\\\"]:active: {\n * 'border': 'none'\n * }\n */\n\n\nfunction buttons() {\n for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {\n states[_key] = arguments[_key];\n }\n\n return statefulSelectors(states, template$1, stateMap$1);\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...margin('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${margin('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'marginTop': '12px',\n * 'marginRight': '24px',\n * 'marginBottom': '36px',\n * 'marginLeft': '48px'\n * }\n */\nfunction margin() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['margin'].concat(values));\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...padding('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${padding('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'paddingTop': '12px',\n * 'paddingRight': '24px',\n * 'paddingBottom': '36px',\n * 'paddingLeft': '48px'\n * }\n */\nfunction padding() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['padding'].concat(values));\n}\n\nvar positionMap = ['absolute', 'fixed', 'relative', 'static', 'sticky'];\n/**\n * Shorthand accepts up to five values, including null to skip a value, and maps them to their respective directions. The first value can optionally be a position keyword.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...position('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${position('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'top': '12px',\n * 'right': '24px',\n * 'bottom': '36px',\n * 'left': '48px'\n * }\n *\n * // Styles as object usage\n * const styles = {\n * ...position('absolute', '12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${position('absolute', '12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'position': 'absolute',\n * 'top': '12px',\n * 'right': '24px',\n * 'bottom': '36px',\n * 'left': '48px'\n * }\n */\n\nfunction position(firstValue) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n if (positionMap.indexOf(firstValue) >= 0 && firstValue) {\n return _extends({}, directionalProperty.apply(void 0, [''].concat(values)), {\n position: firstValue\n });\n } else {\n return directionalProperty.apply(void 0, ['', firstValue].concat(values));\n }\n}\n\n/**\n * Shorthand to set the height and width properties in a single statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...size('300px', '250px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${size('300px', '250px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'height': '300px',\n * 'width': '250px',\n * }\n */\nfunction size(height, width) {\n if (width === void 0) {\n width = height;\n }\n\n return {\n height: height,\n width: width\n };\n}\n\nvar stateMap = [undefined, null, 'active', 'focus', 'hover'];\n\nfunction template(state) {\n return \"input[type=\\\"color\\\"]\" + state + \",\\n input[type=\\\"date\\\"]\" + state + \",\\n input[type=\\\"datetime\\\"]\" + state + \",\\n input[type=\\\"datetime-local\\\"]\" + state + \",\\n input[type=\\\"email\\\"]\" + state + \",\\n input[type=\\\"month\\\"]\" + state + \",\\n input[type=\\\"number\\\"]\" + state + \",\\n input[type=\\\"password\\\"]\" + state + \",\\n input[type=\\\"search\\\"]\" + state + \",\\n input[type=\\\"tel\\\"]\" + state + \",\\n input[type=\\\"text\\\"]\" + state + \",\\n input[type=\\\"time\\\"]\" + state + \",\\n input[type=\\\"url\\\"]\" + state + \",\\n input[type=\\\"week\\\"]\" + state + \",\\n input:not([type])\" + state + \",\\n textarea\" + state;\n}\n/**\n * Populates selectors that target all text inputs. You can pass optional states to append to the selectors.\n * @example\n * // Styles as object usage\n * const styles = {\n * [textInputs('active')]: {\n * 'border': 'none'\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * > ${textInputs('active')} {\n * border: none;\n * }\n * `\n *\n * // CSS in JS Output\n *\n * 'input[type=\"color\"]:active,\n * input[type=\"date\"]:active,\n * input[type=\"datetime\"]:active,\n * input[type=\"datetime-local\"]:active,\n * input[type=\"email\"]:active,\n * input[type=\"month\"]:active,\n * input[type=\"number\"]:active,\n * input[type=\"password\"]:active,\n * input[type=\"search\"]:active,\n * input[type=\"tel\"]:active,\n * input[type=\"text\"]:active,\n * input[type=\"time\"]:active,\n * input[type=\"url\"]:active,\n * input[type=\"week\"]:active,\n * input:not([type]):active,\n * textarea:active': {\n * 'border': 'none'\n * }\n */\n\n\nfunction textInputs() {\n for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {\n states[_key] = arguments[_key];\n }\n\n return statefulSelectors(states, template, stateMap);\n}\n\n/**\n * Accepts any number of transition values as parameters for creating a single transition statement. You may also pass an array of properties as the first parameter that you would like to apply the same transition values to (second parameter).\n * @example\n * // Styles as object usage\n * const styles = {\n * ...transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s'),\n * ...transitions(['color', 'background-color'], '2.0s ease-in 2s')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s')};\n * ${transitions(['color', 'background-color'], '2.0s ease-in 2s'),};\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'transition': 'opacity 1.0s ease-in 0s, width 2.0s ease-in 2s'\n * 'transition': 'color 2.0s ease-in 2s, background-color 2.0s ease-in 2s',\n * }\n */\n\nfunction transitions() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n if (Array.isArray(properties[0]) && properties.length === 2) {\n var value = properties[1];\n\n if (typeof value !== 'string') {\n throw new PolishedError(61);\n }\n\n var transitionsString = properties[0].map(function (property) {\n return property + \" \" + value;\n }).join(', ');\n return {\n transition: transitionsString\n };\n } else {\n return {\n transition: properties.join(', ')\n };\n }\n}\n\nexport { curriedAdjustHue$1 as adjustHue, animation, backgroundImages, backgrounds, between, border, borderColor, borderRadius, borderStyle, borderWidth, buttons, clearFix, complement, cover, cssVar, curriedDarken$1 as darken, curriedDesaturate$1 as desaturate, directionalProperty, easeIn, easeInOut, easeOut, ellipsis, em$1 as em, fluidRange, fontFace, getContrast, getLuminance, getValueAndUnit, grayscale, hiDPI, hideText, hideVisually, hsl, hslToColorString, hsla, important, invert, curriedLighten$1 as lighten, linearGradient, margin, math, meetsContrastGuidelines, mix$1 as mix, modularScale, normalize, curriedOpacify$1 as opacify, padding, parseToHsl, parseToRgb, position, radialGradient, readableColor, rem$1 as rem, remToPx, retinaImage, rgb, rgbToColorString, rgba, curriedSaturate$1 as saturate, curriedSetHue$1 as setHue, curriedSetLightness$1 as setLightness, curriedSetSaturation$1 as setSaturation, curriedShade$1 as shade, size, stripUnit, textInputs, timingFunctions, curriedTint$1 as tint, toColorString, transitions, curriedTransparentize$1 as transparentize, triangle, wordWrap };\n","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","import { rgba, tint, shade } from 'polished';\n\n/**\n * Curry the polished rgba function to allow switching the parameters.\n */\nconst _rgba = (alpha: number) => (color: string) => rgba(color, alpha);\n\nconst colorPaletteSettings = [\n {\n code: '50',\n colorFn: tint(0.96)\n },\n {\n code: '50a',\n colorFn: _rgba(0.04)\n },\n {\n code: '100',\n colorFn: tint(0.92)\n },\n {\n code: '100a',\n colorFn: _rgba(0.08)\n },\n {\n code: '200',\n colorFn: tint(0.84)\n },\n {\n code: '200a',\n colorFn: _rgba(0.16)\n },\n {\n code: '300',\n colorFn: tint(0.68)\n },\n {\n code: '300a',\n colorFn: _rgba(0.32)\n },\n {\n code: '400',\n colorFn: tint(0.36)\n },\n {\n code: '400a',\n colorFn: _rgba(0.64)\n },\n {\n code: '500',\n colorFn: (v: string) => v\n },\n {\n code: '600',\n colorFn: shade(0.16)\n },\n {\n code: '700',\n colorFn: shade(0.32)\n },\n {\n code: '800',\n colorFn: shade(0.48)\n },\n {\n code: '900',\n colorFn: shade(0.64)\n }\n];\n\n/**\n * Creates a color palette base off of the provided base color including\n * lightened/darkened/transparent versions of that color.\n *\n * Uses a scale from 50 - 900 to indicate the color value. Values lower than 500\n * are lightened, above 500 are darkened and values ending with `a` have a alpha\n * channel.\n *\n * List of returned colors:\n * name.50 Lightened 96%\n * name.50a Opacity 4%\n * name.100 Lightened 92%\n * name.100a Opacity 8%\n * name.200 Lightened 84%\n * name.200a Opacity 16%\n * name.300 Lightened 68%\n * name.300a Opacity 32%\n * name.400 Lightened 36%\n * name.400a Opacity 64%\n * name.500 Same as base color\n * name.600 Darkened 16%\n * name.700 Darkened 32%\n * name.800 Darkened 48%\n * name.900 Darkened 64%\n *\n * @param {string} name Name of the color variable\n * @param {string} baseColor Base color for the palette. Used as middle color\n * with value 500.\n *\n * @returns object\n */\nexport function createColorPalette(baseColor: string) {\n return colorPaletteSettings.reduce(\n (acc, c) => ({\n ...acc,\n [c.code]: c.colorFn(baseColor)\n }),\n {}\n );\n}\n","import { extendTheme, mergeThemeOverride } from '@chakra-ui/react';\nimport { extendHugConfig } from '@devseed-ui/hug-chakra';\nimport { withProse } from '@nikolovlazar/chakra-ui-prose';\n\nimport { createColorPalette } from './color-palette';\n\nconst headingStyles = {\n baseStyle: {\n fontWeight: '600',\n textTransform: 'uppercase'\n },\n sizes: {\n xs: {\n fontSize: ['xs', null, null, 'sm'],\n lineHeight: 'calc(0.5rem + 1em)'\n },\n sm: {\n fontSize: ['sm', null, null, 'md'],\n lineHeight: 'calc(0.5rem + 1em)'\n },\n md: {\n fontSize: ['md', null, null, 'lg'],\n lineHeight: 'calc(0.5rem + 1em)'\n },\n lg: {\n fontSize: ['lg', null, null, 'xl'],\n lineHeight: 'calc(0.5rem + 1em)'\n },\n xl: {\n fontSize: ['xl', null, null, '2xl'],\n lineHeight: 'calc(0.5rem + 1em)'\n },\n '2xl': {\n fontSize: ['2xl', null, null, '3xl'],\n lineHeight: 'calc(0.5rem + 1em)'\n },\n '3xl': {\n fontSize: ['3xl', null, null, '4xl'],\n lineHeight: 'calc(0.5rem + 1em)'\n },\n '4xl': {\n fontSize: ['4xl', null, null, '5xl'],\n lineHeight: 'calc(0.5rem + 1em)'\n }\n }\n};\n\nconst theme = {\n colors: {\n primary: createColorPalette('#1a5bdb'),\n secondary: createColorPalette('#46d6cd'),\n base: createColorPalette('#0d1658'),\n danger: createColorPalette('#ff5353'),\n warning: createColorPalette('#ffc849'),\n success: createColorPalette('#46d6cd'),\n info: createColorPalette('#1a5bdb'),\n surface: createColorPalette('#fff')\n },\n fonts: {\n body: 'Barlow, sans-serif',\n heading: 'Barlow Condensed, serif'\n },\n fontSizes: {\n xs: '0.75rem',\n sm: '1rem',\n md: '1.25rem',\n lg: '1.5rem',\n xl: '1.75rem',\n '2xl': '2rem',\n '3xl': '2.25rem',\n '4xl': '2.5rem',\n '5xl': '2.75rem',\n '6xl': '3rem',\n '7xl': '3.25rem',\n '8xl': '3.5rem',\n '9xl': '3.75rem',\n '10xl': '4rem'\n },\n styles: {\n global: {\n html: {\n '&': {\n scrollBehavior: 'smooth'\n }\n },\n body: {\n fontSize: ['sm', null, null, 'md'],\n color: 'base.500'\n },\n '*': {\n lineHeight: 'calc(0.5rem + 1em)'\n }\n }\n },\n textStyles: {\n lead: {\n sm: {\n fontSize: 'sm'\n },\n md: {\n fontSize: 'md'\n },\n lg: {\n fontSize: 'lg'\n }\n }\n },\n components: {\n Divider: {\n baseStyle: {\n opacity: 1,\n borderRadius: '2px'\n },\n sizes: {\n xs: {\n borderWidth: '2px'\n },\n sm: {\n borderWidth: '4px'\n },\n md: {\n borderWidth: '8px'\n }\n }\n },\n Heading: headingStyles,\n Link: {\n baseStyle: {\n color: 'primary.500'\n }\n },\n Button: {\n baseStyle: {\n textTransform: 'uppercase',\n borderRadius: 'sm',\n fontFamily: 'Barlow Condensed, serif'\n },\n sizes: {\n xs: {\n fontSize: 'xs'\n },\n sm: {\n fontSize: 'xs'\n },\n md: {\n fontSize: 'sm'\n },\n lg: {\n fontSize: 'sm'\n }\n },\n variants: {\n outline: {\n border: '2px solid',\n '.chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)':\n { marginEnd: '-2px' },\n '.chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)':\n { marginBottom: '-2px' }\n },\n // @ts-expect-error no type for props\n 'soft-outline': (props) => {\n const { colorScheme: c } = props;\n return {\n border: '2px solid',\n borderColor: `${c}.200a`,\n '.chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)':\n { marginEnd: '-2px' },\n '.chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)':\n { marginBottom: '-2px' },\n _hover: {\n bg: `${c}.50a`\n },\n _active: {\n bg: `${c}.100a`\n }\n };\n }\n }\n }\n },\n config: {\n ...extendHugConfig({\n layoutMax: 'container.xl'\n })\n }\n};\n\nconst proseThemeOverrides: (\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any */\n theme: Record\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any */\n) => Record = (chakraTheme) => {\n // Override Prose theme.\n const proseTheme = withProse({\n baseStyle: {\n ':first-child': {\n mt: 0\n },\n a: {\n color: 'primary.500',\n fontWeight: 'inherit'\n },\n 'h1, h2, h3, h4, h5, h6': {\n ...headingStyles.baseStyle,\n fontFamily: 'heading'\n },\n h1: {\n ...headingStyles.sizes['3xl']\n },\n h2: {\n ...headingStyles.sizes['2xl']\n },\n h3: {\n ...headingStyles.sizes.xl\n },\n h4: {\n ...headingStyles.sizes.lg\n },\n h5: {\n ...headingStyles.sizes.md,\n mt: { base: 6, md: 8 },\n mb: 2\n },\n h6: {\n ...headingStyles.sizes.sm,\n mt: { base: 6, md: 8 },\n mb: 2\n },\n 'h5 + *, h6 + *': {\n mt: 0\n },\n p: {\n fontSize: 'inherit',\n lineHeight: 'inherit'\n }\n }\n })(chakraTheme);\n\n // Get the style of the Prose component after the override. We need this because\n // the chakra-ui-prose package does not export the base theme.\n // https://github.com/nikolovlazar/chakra-ui-prose/blob/main/packages/chakra-ui-prose/src/theme.ts\n // @ts-expect-error This is possible to do but it is hackish.\n const proseStyles = proseTheme.components.Prose.baseStyle();\n\n // We want to apply the style to all elements in the mdx file, except if\n // they're inside a custom component.\n const proseFinalTheme = {\n baseStyle: {\n ':not(.not-mdx, .not-mdx *)': {\n ...Object.entries(proseStyles).reduce(\n (acc, [k, v]) => ({\n ...acc,\n [`> :is(${k})`]: v\n }),\n {}\n )\n }\n }\n };\n\n return mergeThemeOverride(chakraTheme, {\n components: {\n Prose: proseFinalTheme\n }\n });\n};\n\nexport default extendTheme(theme, proseThemeOverrides);\n","import * as React from \"react\"\nimport { ChakraProvider } from \"@chakra-ui/react\"\nimport theme from \"./theme\"\n\nexport const WrapRootElement = ({ element, resetCSS = true, portalZIndex }) => {\n return (\n \n {element}\n \n )\n}\n","import * as React from \"react\"\nimport { WrapRootElement } from \"./src/provider\"\n\nexport const wrapRootElement = ({ element }, pluginOptions) => {\n return \n}\n","const listOfMetricsSend = new Set();\nfunction debounce(fn, timeout) {\n let timer = null;\n return function (...args) {\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(fn, timeout, ...args);\n };\n}\nfunction sendWebVitals(dataLayerName = `dataLayer`) {\n const win = window;\n function sendData(data) {\n if (listOfMetricsSend.has(data.name)) {\n return;\n }\n listOfMetricsSend.add(data.name);\n sendToGTM(data, win[dataLayerName]);\n }\n return import(`web-vitals/base`).then(({\n getLCP,\n getFID,\n getCLS\n }) => {\n const debouncedCLS = debounce(sendData, 3000);\n // we don't need to debounce FID - we send it when it happens\n const debouncedFID = sendData;\n // LCP can occur multiple times so we debounce it\n const debouncedLCP = debounce(sendData, 3000);\n\n // With the true flag, we measure all previous occurences too, in case we start listening to late.\n getCLS(debouncedCLS, true);\n getFID(debouncedFID, true);\n getLCP(debouncedLCP, true);\n });\n}\nfunction sendToGTM({\n name,\n value,\n id\n}, dataLayer) {\n dataLayer.push({\n event: `core-web-vitals`,\n webVitalsMeasurement: {\n name: name,\n // The `id` value will be unique to the current page load. When sending\n // multiple values from the same page (e.g. for CLS), Google Analytics can\n // compute a total by grouping on this ID (note: requires `eventLabel` to\n // be a dimension in your report).\n id,\n // Google Analytics metrics must be integers, so the value is rounded.\n // For CLS the value is first multiplied by 1000 for greater precision\n // (note: increase the multiplier for greater precision if needed).\n value: Math.round(name === `CLS` ? value * 1000 : value)\n }\n });\n}\nexport function onRouteUpdate(_, pluginOptions) {\n if (process.env.NODE_ENV === `production` || pluginOptions.includeInDevelopment) {\n // wrap inside a timeout to ensure the title has properly been changed\n setTimeout(() => {\n const data = pluginOptions.dataLayerName ? window[pluginOptions.dataLayerName] : window.dataLayer;\n const eventName = pluginOptions.routeChangeEventName ? pluginOptions.routeChangeEventName : `gatsby-route-change`;\n data.push({\n event: eventName\n });\n }, 50);\n }\n}\nexport function onInitialClientRender(_, pluginOptions) {\n // we only load the polyfill in production so we can't enable it in development\n if (process.env.NODE_ENV === `production` && pluginOptions.enableWebVitalsTracking) {\n sendWebVitals(pluginOptions.dataLayerName);\n }\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};","export const shouldUpdateScroll = ({\n routerProps: { location },\n getSavedScrollPosition\n}) => {\n if (location.hash) {\n return location.hash;\n }\n const currentPosition = getSavedScrollPosition(location);\n setTimeout(() => window.scrollTo(...(currentPosition || [0, 0])), 1);\n return false;\n};\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","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeMax = Math.max,\n nativeNow = Date.now;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\nvar mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n});\n\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = mergeWith;\n","/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */\n\nvar hasElementType = typeof Element !== 'undefined';\nvar hasMap = typeof Map === 'function';\nvar hasSet = typeof Set === 'function';\nvar hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;\n\n// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js\n\nfunction equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.3\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n // START: Modifications:\n // Apply guards for `Object.create(null)` handling. See:\n // - https://github.com/FormidableLabs/react-fast-compare/issues/64\n // - https://github.com/epoberezkin/fast-deep-equal/issues/49\n if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === 'function' && typeof b.valueOf === 'function') return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString && typeof a.toString === 'function' && typeof b.toString === 'function') return a.toString() === b.toString();\n // END: Modifications\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function isEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if (((error.message || '').match(/stack|recursion/i))) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('react-fast-compare cannot handle circular refs');\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};\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 `Fringe Events — SatSummit 2024 Fringe Events Happenings for the SatSummit Community.
There are no fringe events scheduled.
+
+
\ No newline at end of file
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..a29cd8c
--- /dev/null
+++ b/index.html
@@ -0,0 +1,49 @@
+Welcome — SatSummit 2024
+
+
\ No newline at end of file
diff --git a/meta/apple-touch-icon.png b/meta/apple-touch-icon.png
new file mode 100644
index 0000000..5747004
Binary files /dev/null and b/meta/apple-touch-icon.png differ
diff --git a/meta/favicon.ico b/meta/favicon.ico
new file mode 100644
index 0000000..80c52ac
Binary files /dev/null and b/meta/favicon.ico differ
diff --git a/meta/favicon.png b/meta/favicon.png
new file mode 100644
index 0000000..1729e2c
Binary files /dev/null and b/meta/favicon.png differ
diff --git a/meta/icon-192.png b/meta/icon-192.png
new file mode 100644
index 0000000..2cd0d7e
Binary files /dev/null and b/meta/icon-192.png differ
diff --git a/meta/icon-512.png b/meta/icon-512.png
new file mode 100644
index 0000000..9f52c7e
Binary files /dev/null and b/meta/icon-512.png differ
diff --git a/meta/icon.png b/meta/icon.png
new file mode 100644
index 0000000..96ae9c3
Binary files /dev/null and b/meta/icon.png differ
diff --git a/meta/icon.svg b/meta/icon.svg
new file mode 100644
index 0000000..819eaee
--- /dev/null
+++ b/meta/icon.svg
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/meta/meta-image.png b/meta/meta-image.png
new file mode 100644
index 0000000..15b0ba9
Binary files /dev/null and b/meta/meta-image.png differ
diff --git a/meta/site.webmanifest b/meta/site.webmanifest
new file mode 100644
index 0000000..a893e5b
--- /dev/null
+++ b/meta/site.webmanifest
@@ -0,0 +1,6 @@
+{
+ "icons": [
+ { "src": "/icon-192.png", "type": "image/png", "sizes": "192x192" },
+ { "src": "/icon-512.png", "type": "image/png", "sizes": "512x512" }
+ ]
+}
diff --git a/page-data/404.html/page-data.json b/page-data/404.html/page-data.json
new file mode 100644
index 0000000..c4601c6
--- /dev/null
+++ b/page-data/404.html/page-data.json
@@ -0,0 +1 @@
+{"componentChunkName":"component---src-pages-404-tsx","path":"/404.html","result":{"pageContext":{}},"staticQueryHashes":["2576411084","3159207895","446613330"],"slicesMap":{}}
\ No newline at end of file
diff --git a/page-data/404/page-data.json b/page-data/404/page-data.json
new file mode 100644
index 0000000..42937c6
--- /dev/null
+++ b/page-data/404/page-data.json
@@ -0,0 +1 @@
+{"componentChunkName":"component---src-pages-404-tsx","path":"/404/","result":{"pageContext":{}},"staticQueryHashes":["2576411084","3159207895","446613330"],"slicesMap":{}}
\ No newline at end of file
diff --git a/page-data/agenda/2/page-data.json b/page-data/agenda/2/page-data.json
new file mode 100644
index 0000000..69393a0
--- /dev/null
+++ b/page-data/agenda/2/page-data.json
@@ -0,0 +1 @@
+{"componentChunkName":"component---src-templates-agenda-hub-tsx","path":"/agenda/2/","result":{"data":{"allEvent":{"nodes":[]},"site":{"siteMetadata":{"eventDates":["2024-05-16","2024-05-17"]}}},"pageContext":{"start":"2024-05-17","end":"2024-05-18"}},"staticQueryHashes":["2576411084","2614777500","3159207895","3919410025","446613330"],"slicesMap":{}}
\ No newline at end of file
diff --git a/page-data/agenda/page-data.json b/page-data/agenda/page-data.json
new file mode 100644
index 0000000..6733f01
--- /dev/null
+++ b/page-data/agenda/page-data.json
@@ -0,0 +1 @@
+{"componentChunkName":"component---src-templates-agenda-hub-tsx","path":"/agenda/","result":{"data":{"allEvent":{"nodes":[]},"site":{"siteMetadata":{"eventDates":["2024-05-16","2024-05-17"]}}},"pageContext":{"start":"2024-05-16","end":"2024-05-17"}},"staticQueryHashes":["2576411084","2614777500","3159207895","3919410025","446613330"],"slicesMap":{}}
\ No newline at end of file
diff --git a/page-data/app-data.json b/page-data/app-data.json
new file mode 100644
index 0000000..6bc3cb1
--- /dev/null
+++ b/page-data/app-data.json
@@ -0,0 +1 @@
+{"webpackCompilationHash":"5411bc2f5e216a966933"}
diff --git a/page-data/fringe/page-data.json b/page-data/fringe/page-data.json
new file mode 100644
index 0000000..1ef2962
--- /dev/null
+++ b/page-data/fringe/page-data.json
@@ -0,0 +1 @@
+{"componentChunkName":"component---src-pages-fringe-tsx","path":"/fringe/","result":{"data":{"allEvent":{"nodes":[]},"site":{"siteMetadata":{"eventDates":["2024-05-16","2024-05-17"]}}},"pageContext":{}},"staticQueryHashes":["2576411084","2614777500","3159207895","3919410025","446613330"],"slicesMap":{}}
\ No newline at end of file
diff --git a/page-data/index/page-data.json b/page-data/index/page-data.json
new file mode 100644
index 0000000..e183e65
--- /dev/null
+++ b/page-data/index/page-data.json
@@ -0,0 +1 @@
+{"componentChunkName":"component---src-pages-index-tsx","path":"/","result":{"pageContext":{}},"staticQueryHashes":["2576411084","3159207895","446613330"],"slicesMap":{}}
\ No newline at end of file
diff --git a/page-data/speakers/page-data.json b/page-data/speakers/page-data.json
new file mode 100644
index 0000000..9bd7e52
--- /dev/null
+++ b/page-data/speakers/page-data.json
@@ -0,0 +1 @@
+{"componentChunkName":"component---src-pages-speakers-tsx","path":"/speakers/","result":{"data":{"allPeople":{"nodes":[]}},"pageContext":{}},"staticQueryHashes":["2576411084","3159207895","446613330"],"slicesMap":{}}
\ No newline at end of file
diff --git a/page-data/sq/d/2576411084.json b/page-data/sq/d/2576411084.json
new file mode 100644
index 0000000..ee91cab
--- /dev/null
+++ b/page-data/sq/d/2576411084.json
@@ -0,0 +1 @@
+{"data":{"site":{"siteMetadata":{"title":"SatSummit","edition":"2024"}}}}
\ No newline at end of file
diff --git a/page-data/sq/d/2614777500.json b/page-data/sq/d/2614777500.json
new file mode 100644
index 0000000..306f840
--- /dev/null
+++ b/page-data/sq/d/2614777500.json
@@ -0,0 +1 @@
+{"data":{"allPeople":{"nodes":[]}}}
\ No newline at end of file
diff --git a/page-data/sq/d/3159207895.json b/page-data/sq/d/3159207895.json
new file mode 100644
index 0000000..a74b8c2
--- /dev/null
+++ b/page-data/sq/d/3159207895.json
@@ -0,0 +1 @@
+{"data":{"sponsors":{"nodes":[{"id":"a80b52f4-46b9-5787-9de7-34f7d86b5827","title":"Development Seed","slug":"development-seed","url":"https://developmentseed.org/","group":"Hosts","image":{"childImageSharp":{"gatsbyImageData":{"layout":"constrained","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA6ElEQVR42mP4DwTnHRj+3Mow+X81SPT/RWMGIwa/Tl5/e30BDw8PdldLSzEfY2MuENvCwoLTQ0WF3dXVldvNwkLonA2D6HknBunLbgyyl2wYBEFmMYCIy+7s/1+t7vt/N9/m/2lFBjNzV98YDwfbZCcbmwhne/tcZ0fHJBd7+1gXBwdvF1vbFGc7uzR7e3uXaw4M9kADA844MLifA7LhBgJd+Otehef/q8Hi/8/qMhgzuJTzeztZSPvY24uAXOhibS3namurGAp0oZe9vYSHjY0o0ECe/T48IlfsGSSuuTNI3vJg4AMZCAA+SFruU58bDAAAAABJRU5ErkJggg=="},"backgroundColor":"#FFFFFF","images":{"fallback":{"src":"/static/cb27ba8fa06ccef82a4e51e8008b6a5d/13b73/devseed-logo--hor.png","srcSet":"/static/cb27ba8fa06ccef82a4e51e8008b6a5d/8e833/devseed-logo--hor.png 82w,\n/static/cb27ba8fa06ccef82a4e51e8008b6a5d/108d3/devseed-logo--hor.png 165w,\n/static/cb27ba8fa06ccef82a4e51e8008b6a5d/13b73/devseed-logo--hor.png 329w,\n/static/cb27ba8fa06ccef82a4e51e8008b6a5d/e44c3/devseed-logo--hor.png 658w","sizes":"(min-width: 329px) 329px, 100vw"},"sources":[]},"width":329,"height":56}}}},{"id":"404d9d78-9196-589c-ab72-4fb935d739ed","title":"DevGlobal","slug":"devglobal","url":"https://dev.global/","group":"Hosts","image":{"childImageSharp":{"gatsbyImageData":{"layout":"constrained","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAFCAYAAABFA8wzAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABLElEQVR42mNgQAWMDLgBI8P//2B5j2232O0PP5xpe/BVMk/fyQyBSef0IUpA8o6ZVgy2aZIM9vUsDB657AzGaawMztlqDI5pygw2iaJgMad0aaA4F5gNErOfwuN04t4R13Pn/wt1bP3FVHPgI3vnhQ3c3acdGBjciqIZ7DNDGRyy2hjsMqIYHLKDgfwYBpccbwaXokwGR6CYW3Ea0JJ4BoeMbAannHSG3EOiTscvH4zaH/5fosv/p8Dk2f9lpx88ztJxzooBqNAB7CLnDEMGx1xloAHqDE65WgzOmaYMTpl6DHa5hgz2WQZAywyB6ixZHVOMGbSusMWd2eA4/aLr+/Rd1v9Ldlsc3XZVzxB3WOEB//9D5GeesReZdNxu+vKLLs7//9czgcPv/38mABFNZfB5L+hcAAAAAElFTkSuQmCC"},"backgroundColor":"#FFFFFF","images":{"fallback":{"src":"/static/03631f5dec2d732e692a6e4134f06f03/beb45/devglobal-logo--hor.png","srcSet":"/static/03631f5dec2d732e692a6e4134f06f03/64ecb/devglobal-logo--hor.png 59w,\n/static/03631f5dec2d732e692a6e4134f06f03/99e3e/devglobal-logo--hor.png 118w,\n/static/03631f5dec2d732e692a6e4134f06f03/beb45/devglobal-logo--hor.png 235w,\n/static/03631f5dec2d732e692a6e4134f06f03/39324/devglobal-logo--hor.png 470w","sizes":"(min-width: 235px) 235px, 100vw"},"sources":[]},"width":235,"height":56}}}}]}}}
\ No newline at end of file
diff --git a/page-data/sq/d/3919410025.json b/page-data/sq/d/3919410025.json
new file mode 100644
index 0000000..5b48ab3
--- /dev/null
+++ b/page-data/sq/d/3919410025.json
@@ -0,0 +1 @@
+{"data":{"site":{"siteMetadata":{"eventDates":["2024-05-16","2024-05-17"]}}}}
\ No newline at end of file
diff --git a/page-data/sq/d/446613330.json b/page-data/sq/d/446613330.json
new file mode 100644
index 0000000..4aad8ce
--- /dev/null
+++ b/page-data/sq/d/446613330.json
@@ -0,0 +1 @@
+{"data":{"site":{"siteMetadata":{"title":"SatSummit","description":"SatSummit convenes leaders in the satellite industry and experts in global development for 2 days of presentations and in-depth conversations on solving the world's most critical development challenges with satellite data.","edition":"2024","siteUrl":"https://2024.satsummit.io","social":{"twitter":"@sat_summit"}}}}}
\ No newline at end of file
diff --git a/speakers/index.html b/speakers/index.html
new file mode 100644
index 0000000..f467217
--- /dev/null
+++ b/speakers/index.html
@@ -0,0 +1,49 @@
+Speakers — SatSummit 2024 Speakers All the wonderful people presenting at SatSummit.
+
+
\ No newline at end of file
diff --git a/static/03631f5dec2d732e692a6e4134f06f03/39324/devglobal-logo--hor.png b/static/03631f5dec2d732e692a6e4134f06f03/39324/devglobal-logo--hor.png
new file mode 100644
index 0000000..b2141d0
Binary files /dev/null and b/static/03631f5dec2d732e692a6e4134f06f03/39324/devglobal-logo--hor.png differ
diff --git a/static/03631f5dec2d732e692a6e4134f06f03/64ecb/devglobal-logo--hor.png b/static/03631f5dec2d732e692a6e4134f06f03/64ecb/devglobal-logo--hor.png
new file mode 100644
index 0000000..aa43471
Binary files /dev/null and b/static/03631f5dec2d732e692a6e4134f06f03/64ecb/devglobal-logo--hor.png differ
diff --git a/static/03631f5dec2d732e692a6e4134f06f03/99e3e/devglobal-logo--hor.png b/static/03631f5dec2d732e692a6e4134f06f03/99e3e/devglobal-logo--hor.png
new file mode 100644
index 0000000..30e6cb2
Binary files /dev/null and b/static/03631f5dec2d732e692a6e4134f06f03/99e3e/devglobal-logo--hor.png differ
diff --git a/static/03631f5dec2d732e692a6e4134f06f03/beb45/devglobal-logo--hor.png b/static/03631f5dec2d732e692a6e4134f06f03/beb45/devglobal-logo--hor.png
new file mode 100644
index 0000000..2912900
Binary files /dev/null and b/static/03631f5dec2d732e692a6e4134f06f03/beb45/devglobal-logo--hor.png differ
diff --git a/static/banner--cloud-big@2x-91583d35491acff92073b3e6414942a0.png b/static/banner--cloud-big@2x-91583d35491acff92073b3e6414942a0.png
new file mode 100644
index 0000000..b43207b
Binary files /dev/null and b/static/banner--cloud-big@2x-91583d35491acff92073b3e6414942a0.png differ
diff --git a/static/banner--cloud-small@2x-ea06514c32dc4f008b91bcafdd6cdd64.png b/static/banner--cloud-small@2x-ea06514c32dc4f008b91bcafdd6cdd64.png
new file mode 100644
index 0000000..6ce9f53
Binary files /dev/null and b/static/banner--cloud-small@2x-ea06514c32dc4f008b91bcafdd6cdd64.png differ
diff --git a/static/banner--mountain-big@2x-9a71db931aa50ae896be7fdece64759c.png b/static/banner--mountain-big@2x-9a71db931aa50ae896be7fdece64759c.png
new file mode 100644
index 0000000..1e08c0d
Binary files /dev/null and b/static/banner--mountain-big@2x-9a71db931aa50ae896be7fdece64759c.png differ
diff --git a/static/banner--mountain-medium@2x-cbf85d0ee89fdb3e404b7d942ee94b2f.png b/static/banner--mountain-medium@2x-cbf85d0ee89fdb3e404b7d942ee94b2f.png
new file mode 100644
index 0000000..f35f886
Binary files /dev/null and b/static/banner--mountain-medium@2x-cbf85d0ee89fdb3e404b7d942ee94b2f.png differ
diff --git a/static/banner--satellite@2x-a8eb2bc07baf14cdb5f799e0815258d4.png b/static/banner--satellite@2x-a8eb2bc07baf14cdb5f799e0815258d4.png
new file mode 100644
index 0000000..027cb08
Binary files /dev/null and b/static/banner--satellite@2x-a8eb2bc07baf14cdb5f799e0815258d4.png differ
diff --git a/static/cb27ba8fa06ccef82a4e51e8008b6a5d/108d3/devseed-logo--hor.png b/static/cb27ba8fa06ccef82a4e51e8008b6a5d/108d3/devseed-logo--hor.png
new file mode 100644
index 0000000..ed174a6
Binary files /dev/null and b/static/cb27ba8fa06ccef82a4e51e8008b6a5d/108d3/devseed-logo--hor.png differ
diff --git a/static/cb27ba8fa06ccef82a4e51e8008b6a5d/13b73/devseed-logo--hor.png b/static/cb27ba8fa06ccef82a4e51e8008b6a5d/13b73/devseed-logo--hor.png
new file mode 100644
index 0000000..615edd2
Binary files /dev/null and b/static/cb27ba8fa06ccef82a4e51e8008b6a5d/13b73/devseed-logo--hor.png differ
diff --git a/static/cb27ba8fa06ccef82a4e51e8008b6a5d/8e833/devseed-logo--hor.png b/static/cb27ba8fa06ccef82a4e51e8008b6a5d/8e833/devseed-logo--hor.png
new file mode 100644
index 0000000..f566723
Binary files /dev/null and b/static/cb27ba8fa06ccef82a4e51e8008b6a5d/8e833/devseed-logo--hor.png differ
diff --git a/static/cb27ba8fa06ccef82a4e51e8008b6a5d/e44c3/devseed-logo--hor.png b/static/cb27ba8fa06ccef82a4e51e8008b6a5d/e44c3/devseed-logo--hor.png
new file mode 100644
index 0000000..a7860d5
Binary files /dev/null and b/static/cb27ba8fa06ccef82a4e51e8008b6a5d/e44c3/devseed-logo--hor.png differ
diff --git a/static/webfonts/s/barlow/v12/7cHpv4kjgoGqM7EPCA.woff b/static/webfonts/s/barlow/v12/7cHpv4kjgoGqM7EPCA.woff
new file mode 100644
index 0000000..abf4057
Binary files /dev/null and b/static/webfonts/s/barlow/v12/7cHpv4kjgoGqM7EPCA.woff differ
diff --git a/static/webfonts/s/barlow/v12/7cHpv4kjgoGqM7EPDg.woff2 b/static/webfonts/s/barlow/v12/7cHpv4kjgoGqM7EPDg.woff2
new file mode 100644
index 0000000..ed71da0
Binary files /dev/null and b/static/webfonts/s/barlow/v12/7cHpv4kjgoGqM7EPDg.woff2 differ
diff --git a/static/webfonts/s/barlow/v12/7cHqv4kjgoGqM7E3t-4c4w.woff b/static/webfonts/s/barlow/v12/7cHqv4kjgoGqM7E3t-4c4w.woff
new file mode 100644
index 0000000..d95a559
Binary files /dev/null and b/static/webfonts/s/barlow/v12/7cHqv4kjgoGqM7E3t-4c4w.woff differ
diff --git a/static/webfonts/s/barlow/v12/7cHqv4kjgoGqM7E3t-4c5Q.woff2 b/static/webfonts/s/barlow/v12/7cHqv4kjgoGqM7E3t-4c5Q.woff2
new file mode 100644
index 0000000..5fd0a4a
Binary files /dev/null and b/static/webfonts/s/barlow/v12/7cHqv4kjgoGqM7E3t-4c5Q.woff2 differ
diff --git a/static/webfonts/s/barlow/v12/7cHrv4kjgoGqM7E_Ccs5.woff2 b/static/webfonts/s/barlow/v12/7cHrv4kjgoGqM7E_Ccs5.woff2
new file mode 100644
index 0000000..f0f4712
Binary files /dev/null and b/static/webfonts/s/barlow/v12/7cHrv4kjgoGqM7E_Ccs5.woff2 differ
diff --git a/static/webfonts/s/barlow/v12/7cHrv4kjgoGqM7E_Ccs_.woff b/static/webfonts/s/barlow/v12/7cHrv4kjgoGqM7E_Ccs_.woff
new file mode 100644
index 0000000..fc8b25f
Binary files /dev/null and b/static/webfonts/s/barlow/v12/7cHrv4kjgoGqM7E_Ccs_.woff differ
diff --git a/static/webfonts/s/barlow/v12/7cHsv4kjgoGqM7E_CfOA5Voq.woff b/static/webfonts/s/barlow/v12/7cHsv4kjgoGqM7E_CfOA5Voq.woff
new file mode 100644
index 0000000..c9041eb
Binary files /dev/null and b/static/webfonts/s/barlow/v12/7cHsv4kjgoGqM7E_CfOA5Voq.woff differ
diff --git a/static/webfonts/s/barlow/v12/7cHsv4kjgoGqM7E_CfOA5Vos.woff2 b/static/webfonts/s/barlow/v12/7cHsv4kjgoGqM7E_CfOA5Vos.woff2
new file mode 100644
index 0000000..1c60205
Binary files /dev/null and b/static/webfonts/s/barlow/v12/7cHsv4kjgoGqM7E_CfOA5Vos.woff2 differ
diff --git a/static/webfonts/s/barlowcondensed/v12/HTxwL3I-JCGChYJ8VI-L6OO_au7B4-Lw_3I.woff b/static/webfonts/s/barlowcondensed/v12/HTxwL3I-JCGChYJ8VI-L6OO_au7B4-Lw_3I.woff
new file mode 100644
index 0000000..6f9932a
Binary files /dev/null and b/static/webfonts/s/barlowcondensed/v12/HTxwL3I-JCGChYJ8VI-L6OO_au7B4-Lw_3I.woff differ
diff --git a/static/webfonts/s/barlowcondensed/v12/HTxwL3I-JCGChYJ8VI-L6OO_au7B4-Lw_3Q.woff2 b/static/webfonts/s/barlowcondensed/v12/HTxwL3I-JCGChYJ8VI-L6OO_au7B4-Lw_3Q.woff2
new file mode 100644
index 0000000..d8637e3
Binary files /dev/null and b/static/webfonts/s/barlowcondensed/v12/HTxwL3I-JCGChYJ8VI-L6OO_au7B4-Lw_3Q.woff2 differ
diff --git a/static/webfonts/s/barlowcondensed/v12/HTxwL3I-JCGChYJ8VI-L6OO_au7B4873_3I.woff b/static/webfonts/s/barlowcondensed/v12/HTxwL3I-JCGChYJ8VI-L6OO_au7B4873_3I.woff
new file mode 100644
index 0000000..640f637
Binary files /dev/null and b/static/webfonts/s/barlowcondensed/v12/HTxwL3I-JCGChYJ8VI-L6OO_au7B4873_3I.woff differ
diff --git a/static/webfonts/s/barlowcondensed/v12/HTxwL3I-JCGChYJ8VI-L6OO_au7B4873_3Q.woff2 b/static/webfonts/s/barlowcondensed/v12/HTxwL3I-JCGChYJ8VI-L6OO_au7B4873_3Q.woff2
new file mode 100644
index 0000000..dc50cde
Binary files /dev/null and b/static/webfonts/s/barlowcondensed/v12/HTxwL3I-JCGChYJ8VI-L6OO_au7B4873_3Q.woff2 differ
diff --git a/static/webfonts/s/barlowcondensed/v12/HTxyL3I-JCGChYJ8VI-L6OO_au7B6xTrB3XWuQ.woff2 b/static/webfonts/s/barlowcondensed/v12/HTxyL3I-JCGChYJ8VI-L6OO_au7B6xTrB3XWuQ.woff2
new file mode 100644
index 0000000..6ea1bf3
Binary files /dev/null and b/static/webfonts/s/barlowcondensed/v12/HTxyL3I-JCGChYJ8VI-L6OO_au7B6xTrB3XWuQ.woff2 differ
diff --git a/static/webfonts/s/barlowcondensed/v12/HTxyL3I-JCGChYJ8VI-L6OO_au7B6xTrB3XWvw.woff b/static/webfonts/s/barlowcondensed/v12/HTxyL3I-JCGChYJ8VI-L6OO_au7B6xTrB3XWvw.woff
new file mode 100644
index 0000000..c89f912
Binary files /dev/null and b/static/webfonts/s/barlowcondensed/v12/HTxyL3I-JCGChYJ8VI-L6OO_au7B6xTrB3XWvw.woff differ
diff --git a/static/webfonts/s/barlowcondensed/v12/HTxyL3I-JCGChYJ8VI-L6OO_au7B6xTrY3TWuQ.woff2 b/static/webfonts/s/barlowcondensed/v12/HTxyL3I-JCGChYJ8VI-L6OO_au7B6xTrY3TWuQ.woff2
new file mode 100644
index 0000000..6a00688
Binary files /dev/null and b/static/webfonts/s/barlowcondensed/v12/HTxyL3I-JCGChYJ8VI-L6OO_au7B6xTrY3TWuQ.woff2 differ
diff --git a/static/webfonts/s/barlowcondensed/v12/HTxyL3I-JCGChYJ8VI-L6OO_au7B6xTrY3TWvw.woff b/static/webfonts/s/barlowcondensed/v12/HTxyL3I-JCGChYJ8VI-L6OO_au7B6xTrY3TWvw.woff
new file mode 100644
index 0000000..0565332
Binary files /dev/null and b/static/webfonts/s/barlowcondensed/v12/HTxyL3I-JCGChYJ8VI-L6OO_au7B6xTrY3TWvw.woff differ
diff --git a/webpack-runtime-e6edaf145be1e80ca998.js b/webpack-runtime-e6edaf145be1e80ca998.js
new file mode 100644
index 0000000..376720f
--- /dev/null
+++ b/webpack-runtime-e6edaf145be1e80ca998.js
@@ -0,0 +1,2 @@
+!function(){"use strict";var e,t,n,r,o,i={},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={id:e,loaded:!1,exports:{}};return i[e](n,n.exports,u),n.loaded=!0,n.exports}u.m=i,e=[],u.O=function(t,n,r,o){if(!n){var i=1/0;for(d=0;d=o)&&Object.keys(u.O).every((function(e){return u.O[e](n[a])}))?n.splice(a--,1):(c=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},u.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);u.r(o);var i={};t=t||[null,n({}),n([]),n(n)];for(var c=2&r&&e;"object"==typeof c&&!~t.indexOf(c);c=n(c))Object.getOwnPropertyNames(c).forEach((function(t){i[t]=function(){return e[t]}}));return i.default=function(){return e},u.d(o,i),o},u.d=function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.f={},u.e=function(e){return Promise.all(Object.keys(u.f).reduce((function(t,n){return u.f[n](e,t),t}),[]))},u.u=function(e){return({132:"component---src-pages-fringe-tsx",164:"component---src-templates-agenda-hub-tsx",182:"558cd74612ca73bb57ad80b565b1ec150549463b",218:"component---src-pages-404-tsx",351:"commons",691:"component---src-pages-index-tsx",758:"component---src-pages-speakers-tsx"}[e]||e)+"-"+{132:"8fa3b8dfd0f496ed896b",164:"75554449d796171bf640",182:"d1649b53a6d0116aad67",218:"700ef11adc60fe607b44",351:"43ddc2ba80ab84ba21a4",691:"1b592cc40c6771eb1e09",731:"28672bc3a2f8d03dddcd",758:"5543d886e658139abe0b",843:"c6ddc6d6f01d76d14cfc",954:"2a8149fb9056ce3cfedd"}[e]+".js"},u.miniCssF=function(e){},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="lisbon.satsummit.io:",u.l=function(e,t,n,i){if(r[e])r[e].push(t);else{var c,a;if(void 0!==n)for(var f=document.getElementsByTagName("script"),d=0;d 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });\n\t}\n\tdef['default'] = function() { return value; };\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"lisbon.satsummit.io:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + ({\"132\":\"component---src-pages-fringe-tsx\",\"164\":\"component---src-templates-agenda-hub-tsx\",\"182\":\"558cd74612ca73bb57ad80b565b1ec150549463b\",\"218\":\"component---src-pages-404-tsx\",\"351\":\"commons\",\"691\":\"component---src-pages-index-tsx\",\"758\":\"component---src-pages-speakers-tsx\"}[chunkId] || chunkId) + \"-\" + {\"132\":\"8fa3b8dfd0f496ed896b\",\"164\":\"75554449d796171bf640\",\"182\":\"d1649b53a6d0116aad67\",\"218\":\"700ef11adc60fe607b44\",\"351\":\"43ddc2ba80ab84ba21a4\",\"691\":\"1b592cc40c6771eb1e09\",\"731\":\"28672bc3a2f8d03dddcd\",\"758\":\"5543d886e658139abe0b\",\"843\":\"c6ddc6d6f01d76d14cfc\",\"954\":\"2a8149fb9056ce3cfedd\"}[chunkId] + \".js\";\n};","// This function allow to reference all chunks\n__webpack_require__.miniCssF = function(chunkId) {\n\t// return url for filenames based on template\n\treturn undefined;\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"/\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t658: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(658 != chunkId) {\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunklisbon_satsummit_io\"] = self[\"webpackChunklisbon_satsummit_io\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;"],"names":["deferred","leafPrototypes","getProto","inProgress","dataWebpackPrefix","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","id","loaded","__webpack_modules__","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","a","getPrototypeOf","obj","__proto__","t","value","mode","this","then","ns","create","def","current","indexOf","getOwnPropertyNames","forEach","definition","o","defineProperty","enumerable","get","f","e","chunkId","Promise","all","reduce","promises","u","miniCssF","g","globalThis","Function","window","prop","prototype","hasOwnProperty","call","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","setTimeout","bind","type","target","head","appendChild","Symbol","toStringTag","nmd","paths","children","p","installedChunks","installedChunkData","promise","resolve","reject","error","Error","errorType","realSrc","message","name","request","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","self"],"sourceRoot":""}
\ No newline at end of file
diff --git a/webpack.stats.json b/webpack.stats.json
new file mode 100644
index 0000000..79e0820
--- /dev/null
+++ b/webpack.stats.json
@@ -0,0 +1 @@
+{"name":"build-javascript","namedChunkGroups":{"app":{"name":"app","assets":[{"name":"webpack-runtime-e6edaf145be1e80ca998.js","size":4241},{"name":"framework-a4c4a9a30fd16e05a514.js","size":141433},{"name":"app-85d275aab068ecaf05a6.js","size":351839}],"filteredAssets":0,"assetsSize":497513,"filteredAuxiliaryAssets":3,"auxiliaryAssetsSize":2037957},"component---src-pages-404-tsx":{"name":"component---src-pages-404-tsx","assets":[{"name":"commons-43ddc2ba80ab84ba21a4.js","size":231949},{"name":"component---src-pages-404-tsx-700ef11adc60fe607b44.js","size":1762}],"filteredAssets":0,"assetsSize":233711,"filteredAuxiliaryAssets":3,"auxiliaryAssetsSize":1193170},"component---src-pages-fringe-tsx":{"name":"component---src-pages-fringe-tsx","assets":[{"name":"commons-43ddc2ba80ab84ba21a4.js","size":231949},{"name":"558cd74612ca73bb57ad80b565b1ec150549463b-d1649b53a6d0116aad67.js","size":27174},{"name":"component---src-pages-fringe-tsx-8fa3b8dfd0f496ed896b.js","size":6640}],"filteredAssets":0,"assetsSize":265763,"filteredAuxiliaryAssets":3,"auxiliaryAssetsSize":1000249},"component---src-pages-index-tsx":{"name":"component---src-pages-index-tsx","assets":[{"name":"commons-43ddc2ba80ab84ba21a4.js","size":231949},{"name":"component---src-pages-index-tsx-1b592cc40c6771eb1e09.js","size":19858}],"filteredAssets":0,"assetsSize":251807,"filteredAuxiliaryAssets":7,"auxiliaryAssetsSize":2221152},"component---src-pages-speakers-tsx":{"name":"component---src-pages-speakers-tsx","assets":[{"name":"commons-43ddc2ba80ab84ba21a4.js","size":231949},{"name":"558cd74612ca73bb57ad80b565b1ec150549463b-d1649b53a6d0116aad67.js","size":27174},{"name":"component---src-pages-speakers-tsx-5543d886e658139abe0b.js","size":3121}],"filteredAssets":0,"assetsSize":262244,"filteredAuxiliaryAssets":3,"auxiliaryAssetsSize":980297},"component---src-templates-agenda-hub-tsx":{"name":"component---src-templates-agenda-hub-tsx","assets":[{"name":"commons-43ddc2ba80ab84ba21a4.js","size":231949},{"name":"558cd74612ca73bb57ad80b565b1ec150549463b-d1649b53a6d0116aad67.js","size":27174},{"name":"component---src-templates-agenda-hub-tsx-75554449d796171bf640.js","size":9483}],"filteredAssets":0,"assetsSize":268606,"filteredAuxiliaryAssets":3,"auxiliaryAssetsSize":1008606}},"assetsByChunkName":{"app":["webpack-runtime-e6edaf145be1e80ca998.js","framework-a4c4a9a30fd16e05a514.js","app-85d275aab068ecaf05a6.js"],"component---src-pages-404-tsx":["commons-43ddc2ba80ab84ba21a4.js","component---src-pages-404-tsx-700ef11adc60fe607b44.js"],"component---src-pages-fringe-tsx":["commons-43ddc2ba80ab84ba21a4.js","558cd74612ca73bb57ad80b565b1ec150549463b-d1649b53a6d0116aad67.js","component---src-pages-fringe-tsx-8fa3b8dfd0f496ed896b.js"],"component---src-pages-index-tsx":["commons-43ddc2ba80ab84ba21a4.js","component---src-pages-index-tsx-1b592cc40c6771eb1e09.js"],"component---src-pages-speakers-tsx":["commons-43ddc2ba80ab84ba21a4.js","558cd74612ca73bb57ad80b565b1ec150549463b-d1649b53a6d0116aad67.js","component---src-pages-speakers-tsx-5543d886e658139abe0b.js"],"component---src-templates-agenda-hub-tsx":["commons-43ddc2ba80ab84ba21a4.js","558cd74612ca73bb57ad80b565b1ec150549463b-d1649b53a6d0116aad67.js","component---src-templates-agenda-hub-tsx-75554449d796171bf640.js"]},"childAssetsByChunkName":{}}
\ No newline at end of file
diff --git a/~partytown/debug/partytown-atomics.js b/~partytown/debug/partytown-atomics.js
new file mode 100644
index 0000000..94e3d3d
--- /dev/null
+++ b/~partytown/debug/partytown-atomics.js
@@ -0,0 +1,572 @@
+/* Partytown 0.7.6 - MIT builder.io */
+(window => {
+ const isPromise = v => "object" == typeof v && v && v.then;
+ const noop = () => {};
+ const len = obj => obj.length;
+ const getConstructorName = obj => {
+ var _a, _b, _c;
+ try {
+ const constructorName = null === (_a = null == obj ? void 0 : obj.constructor) || void 0 === _a ? void 0 : _a.name;
+ if (constructorName) {
+ return constructorName;
+ }
+ } catch (e) {}
+ try {
+ const zoneJsConstructorName = null === (_c = null === (_b = null == obj ? void 0 : obj.__zone_symbol__originalInstance) || void 0 === _b ? void 0 : _b.constructor) || void 0 === _c ? void 0 : _c.name;
+ if (zoneJsConstructorName) {
+ return zoneJsConstructorName;
+ }
+ } catch (e) {}
+ return "";
+ };
+ const startsWith = (str, val) => str.startsWith(val);
+ const isValidMemberName = memberName => !(startsWith(memberName, "webkit") || startsWith(memberName, "toJSON") || startsWith(memberName, "constructor") || startsWith(memberName, "toString") || startsWith(memberName, "_"));
+ const getNodeName = node => 11 === node.nodeType && node.host ? "#s" : node.nodeName;
+ const randomId = () => Math.round(Math.random() * Number.MAX_SAFE_INTEGER).toString(36);
+ const defineConstructorName = (Cstr, value) => ((obj, memberName, descriptor) => Object.defineProperty(obj, memberName, {
+ ...descriptor,
+ configurable: true
+ }))(Cstr, "name", {
+ value: value
+ });
+ const htmlConstructorTags = {
+ Anchor: "a",
+ DList: "dl",
+ Image: "img",
+ OList: "ol",
+ Paragraph: "p",
+ Quote: "q",
+ TableCaption: "caption",
+ TableCell: "td",
+ TableCol: "colgroup",
+ TableRow: "tr",
+ TableSection: "tbody",
+ UList: "ul"
+ };
+ const svgConstructorTags = {
+ Graphics: "g",
+ SVG: "svg"
+ };
+ const InstanceIdKey = Symbol();
+ const CreatedKey = Symbol();
+ const instances = new Map;
+ const mainRefs = new Map;
+ const winCtxs = {};
+ const windowIds = new WeakMap;
+ const getAndSetInstanceId = (instance, instanceId) => {
+ if (instance) {
+ if (instanceId = windowIds.get(instance)) {
+ return instanceId;
+ }
+ (instanceId = instance[InstanceIdKey]) || setInstanceId(instance, instanceId = randomId());
+ return instanceId;
+ }
+ };
+ const getInstance = (winId, instanceId, win, doc, docId) => {
+ if ((win = winCtxs[winId]) && win.$window$) {
+ if (winId === instanceId) {
+ return win.$window$;
+ }
+ doc = win.$window$.document;
+ docId = instanceId.split(".").pop();
+ if ("d" === docId) {
+ return doc;
+ }
+ if ("e" === docId) {
+ return doc.documentElement;
+ }
+ if ("h" === docId) {
+ return doc.head;
+ }
+ if ("b" === docId) {
+ return doc.body;
+ }
+ }
+ return instances.get(instanceId);
+ };
+ const setInstanceId = (instance, instanceId, now) => {
+ if (instance) {
+ instances.set(instanceId, instance);
+ instance[InstanceIdKey] = instanceId;
+ instance[CreatedKey] = now = Date.now();
+ if (now > lastCleanup + 5e3) {
+ instances.forEach(((storedInstance, instanceId) => {
+ storedInstance[CreatedKey] < lastCleanup && storedInstance.nodeType && !storedInstance.isConnected && instances.delete(instanceId);
+ }));
+ lastCleanup = now;
+ }
+ }
+ };
+ let lastCleanup = 0;
+ const mainWindow = window.parent;
+ const docImpl = document.implementation.createHTMLDocument();
+ const config = mainWindow.partytown || {};
+ const libPath = (config.lib || "/~partytown/") + "debug/";
+ const logMain = msg => {
+ console.debug.apply(console, [ "%cMain 🌎", "background: #717171; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;", msg ]);
+ };
+ const winIds = [];
+ const normalizedWinId = winId => {
+ winIds.includes(winId) || winIds.push(winId);
+ return winIds.indexOf(winId) + 1;
+ };
+ const defineCustomElement = (winId, worker, ceData) => {
+ const Cstr = defineConstructorName(class extends winCtxs[winId].$window$.HTMLElement {}, ceData[0]);
+ const ceCallbackMethods = "connectedCallback,disconnectedCallback,attributeChangedCallback,adoptedCallback".split(",");
+ ceCallbackMethods.map((callbackMethodName => Cstr.prototype[callbackMethodName] = function(...args) {
+ worker.postMessage([ 15, winId, getAndSetInstanceId(this), callbackMethodName, args ]);
+ }));
+ Cstr.observedAttributes = ceData[1];
+ return Cstr;
+ };
+ const serializeForWorker = ($winId$, value, added, type, cstrName) => void 0 !== value && (type = typeof value) ? "string" === type || "number" === type || "boolean" === type || null == value ? [ 0, value ] : "function" === type ? [ 6 ] : (added = added || new Set) && Array.isArray(value) ? added.has(value) ? [ 1, [] ] : added.add(value) && [ 1, value.map((v => serializeForWorker($winId$, v, added))) ] : "object" === type ? serializedValueIsError(value) ? [ 14, {
+ name: value.name,
+ message: value.message,
+ stack: value.stack
+ } ] : "" === (cstrName = getConstructorName(value)) ? [ 2, {} ] : "Window" === cstrName ? [ 3, [ $winId$, $winId$ ] ] : "HTMLCollection" === cstrName || "NodeList" === cstrName ? [ 7, Array.from(value).map((v => serializeForWorker($winId$, v, added)[1])) ] : cstrName.endsWith("Event") ? [ 5, serializeObjectForWorker($winId$, value, added) ] : "CSSRuleList" === cstrName ? [ 12, Array.from(value).map(serializeCssRuleForWorker) ] : startsWith(cstrName, "CSS") && cstrName.endsWith("Rule") ? [ 11, serializeCssRuleForWorker(value) ] : "CSSStyleDeclaration" === cstrName ? [ 13, serializeObjectForWorker($winId$, value, added) ] : "Attr" === cstrName ? [ 10, [ value.name, value.value ] ] : value.nodeType ? [ 3, [ $winId$, getAndSetInstanceId(value), getNodeName(value) ] ] : [ 2, serializeObjectForWorker($winId$, value, added, true, true) ] : void 0 : value;
+ const serializeObjectForWorker = (winId, obj, added, includeFunctions, includeEmptyStrings, serializedObj, propName, propValue) => {
+ serializedObj = {};
+ if (!added.has(obj)) {
+ added.add(obj);
+ for (propName in obj) {
+ if (isValidMemberName(propName)) {
+ propValue = "path" === propName && getConstructorName(obj).endsWith("Event") ? obj.composedPath() : obj[propName];
+ (includeFunctions || "function" != typeof propValue) && (includeEmptyStrings || "" !== propValue) && (serializedObj[propName] = serializeForWorker(winId, propValue, added));
+ }
+ }
+ }
+ return serializedObj;
+ };
+ const serializeCssRuleForWorker = cssRule => {
+ let obj = {};
+ let key;
+ for (key in cssRule) {
+ validCssRuleProps.includes(key) && (obj[key] = String(cssRule[key]));
+ }
+ return obj;
+ };
+ const serializedValueIsError = value => value instanceof window.top.Error;
+ const deserializeFromWorker = (worker, serializedTransfer, serializedType, serializedValue) => {
+ if (serializedTransfer) {
+ serializedType = serializedTransfer[0];
+ serializedValue = serializedTransfer[1];
+ return 0 === serializedType ? serializedValue : 4 === serializedType ? deserializeRefFromWorker(worker, serializedValue) : 1 === serializedType ? serializedValue.map((v => deserializeFromWorker(worker, v))) : 3 === serializedType ? getInstance(serializedValue[0], serializedValue[1]) : 5 === serializedType ? constructEvent(deserializeObjectFromWorker(worker, serializedValue)) : 2 === serializedType ? deserializeObjectFromWorker(worker, serializedValue) : 8 === serializedType ? serializedValue : 9 === serializedType ? new window[serializedTransfer[2]](serializedValue) : void 0;
+ }
+ };
+ const deserializeRefFromWorker = (worker, {$winId$: $winId$, $instanceId$: $instanceId$, $refId$: $refId$}, ref) => {
+ ref = mainRefs.get($refId$);
+ if (!ref) {
+ ref = function(...args) {
+ worker.postMessage([ 9, {
+ $winId$: $winId$,
+ $instanceId$: $instanceId$,
+ $refId$: $refId$,
+ $thisArg$: serializeForWorker($winId$, this),
+ $args$: serializeForWorker($winId$, args)
+ } ]);
+ };
+ mainRefs.set($refId$, ref);
+ }
+ return ref;
+ };
+ const constructEvent = eventProps => new ("detail" in eventProps ? CustomEvent : Event)(eventProps.type, eventProps);
+ const deserializeObjectFromWorker = (worker, serializedValue, obj, key) => {
+ obj = {};
+ for (key in serializedValue) {
+ obj[key] = deserializeFromWorker(worker, serializedValue[key]);
+ }
+ return obj;
+ };
+ const validCssRuleProps = "cssText,selectorText,href,media,namespaceURI,prefix,name,conditionText".split(",");
+ const mainAccessHandler = async (worker, accessReq) => {
+ let accessRsp = {
+ $msgId$: accessReq.$msgId$
+ };
+ let totalTasks = len(accessReq.$tasks$);
+ let i = 0;
+ let task;
+ let winId;
+ let applyPath;
+ let instance;
+ let rtnValue;
+ let isLast;
+ for (;i < totalTasks; i++) {
+ try {
+ isLast = i === totalTasks - 1;
+ task = accessReq.$tasks$[i];
+ winId = task.$winId$;
+ applyPath = task.$applyPath$;
+ !winCtxs[winId] && winId.startsWith("f_") && await new Promise((resolve => {
+ let check = 0;
+ let callback = () => {
+ winCtxs[winId] || check++ > 1e3 ? resolve() : requestAnimationFrame(callback);
+ };
+ callback();
+ }));
+ if (1 === applyPath[0] && applyPath[1] in winCtxs[winId].$window$) {
+ setInstanceId(new winCtxs[winId].$window$[applyPath[1]](...deserializeFromWorker(worker, applyPath[2])), task.$instanceId$);
+ } else {
+ instance = getInstance(winId, task.$instanceId$);
+ if (instance) {
+ rtnValue = applyToInstance(worker, winId, instance, applyPath, isLast, task.$groupedGetters$);
+ task.$assignInstanceId$ && ("string" == typeof task.$assignInstanceId$ ? setInstanceId(rtnValue, task.$assignInstanceId$) : winCtxs[task.$assignInstanceId$.$winId$] = {
+ $winId$: task.$assignInstanceId$.$winId$,
+ $window$: {
+ document: rtnValue
+ }
+ });
+ if (isPromise(rtnValue)) {
+ rtnValue = await rtnValue;
+ isLast && (accessRsp.$isPromise$ = true);
+ }
+ isLast && (accessRsp.$rtnValue$ = serializeForWorker(winId, rtnValue));
+ } else {
+ accessRsp.$error$ = `Error finding instance "${task.$instanceId$}" on window ${normalizedWinId(winId)}`;
+ console.error(accessRsp.$error$, task);
+ }
+ }
+ } catch (e) {
+ isLast ? accessRsp.$error$ = String(e.stack || e) : console.error(e);
+ }
+ }
+ return accessRsp;
+ };
+ const applyToInstance = (worker, winId, instance, applyPath, isLast, groupedGetters) => {
+ let i = 0;
+ let l = len(applyPath);
+ let next;
+ let current;
+ let previous;
+ let args;
+ let groupedRtnValues;
+ for (;i < l; i++) {
+ current = applyPath[i];
+ next = applyPath[i + 1];
+ previous = applyPath[i - 1];
+ try {
+ if (!Array.isArray(next)) {
+ if ("string" == typeof current || "number" == typeof current) {
+ if (i + 1 === l && groupedGetters) {
+ groupedRtnValues = {};
+ groupedGetters.map((propName => groupedRtnValues[propName] = instance[propName]));
+ return groupedRtnValues;
+ }
+ instance = instance[current];
+ } else {
+ if (0 === next) {
+ instance[previous] = deserializeFromWorker(worker, current);
+ return;
+ }
+ if ("function" == typeof instance[previous]) {
+ args = deserializeFromWorker(worker, current);
+ "define" === previous && "CustomElementRegistry" === getConstructorName(instance) && (args[1] = defineCustomElement(winId, worker, args[1]));
+ "insertRule" === previous && args[1] > len(instance.cssRules) && (args[1] = len(instance.cssRules));
+ instance = instance[previous].apply(instance, args);
+ if ("play" === previous) {
+ return Promise.resolve();
+ }
+ }
+ }
+ }
+ } catch (err) {
+ if (isLast) {
+ throw err;
+ }
+ console.debug("Non-blocking setter error:", err);
+ }
+ }
+ return instance;
+ };
+ const readNextScript = (worker, winCtx) => {
+ let $winId$ = winCtx.$winId$;
+ let win = winCtx.$window$;
+ let doc = win.document;
+ let scriptSelector = 'script[type="text/partytown"]:not([data-ptid]):not([data-pterror])';
+ let scriptElm;
+ let $instanceId$;
+ let scriptData;
+ if (doc && doc.body) {
+ scriptElm = doc.querySelector('script[type="text/partytown"]:not([data-ptid]):not([data-pterror]):not([async]):not([defer])');
+ scriptElm || (scriptElm = doc.querySelector(scriptSelector));
+ if (scriptElm) {
+ scriptElm.dataset.ptid = $instanceId$ = getAndSetInstanceId(scriptElm, $winId$);
+ scriptData = {
+ $winId$: $winId$,
+ $instanceId$: $instanceId$
+ };
+ if (scriptElm.src) {
+ scriptData.$url$ = scriptElm.src;
+ scriptData.$orgUrl$ = scriptElm.dataset.ptsrc || scriptElm.src;
+ } else {
+ scriptData.$content$ = scriptElm.innerHTML;
+ }
+ worker.postMessage([ 7, scriptData ]);
+ } else {
+ if (!winCtx.$isInitialized$) {
+ winCtx.$isInitialized$ = 1;
+ ((worker, $winId$, win) => {
+ let queuedForwardCalls = win._ptf;
+ let forwards = (win.partytown || {}).forward || [];
+ let i;
+ let mainForwardFn;
+ let forwardCall = ($forward$, args) => worker.postMessage([ 10, {
+ $winId$: $winId$,
+ $forward$: $forward$,
+ $args$: serializeForWorker($winId$, Array.from(args))
+ } ]);
+ win._ptf = void 0;
+ forwards.map((forwardProps => {
+ mainForwardFn = win;
+ forwardProps.split(".").map(((_, i, arr) => {
+ mainForwardFn = mainForwardFn[arr[i]] = i + 1 < len(arr) ? mainForwardFn[arr[i]] || ("push" === arr[i + 1] ? [] : {}) : (...args) => forwardCall(arr, args);
+ }));
+ }));
+ if (queuedForwardCalls) {
+ for (i = 0; i < len(queuedForwardCalls); i += 2) {
+ forwardCall(queuedForwardCalls[i], queuedForwardCalls[i + 1]);
+ }
+ }
+ })(worker, $winId$, win);
+ doc.dispatchEvent(new CustomEvent("pt0"));
+ {
+ const winType = win === win.top ? "top" : "iframe";
+ logMain(`Executed ${winType} window ${normalizedWinId($winId$)} environment scripts in ${(performance.now() - winCtx.$startTime$).toFixed(1)}ms`);
+ }
+ }
+ worker.postMessage([ 8, $winId$ ]);
+ }
+ } else {
+ requestAnimationFrame((() => readNextScript(worker, winCtx)));
+ }
+ };
+ const registerWindow = (worker, $winId$, $window$) => {
+ if (!windowIds.has($window$)) {
+ windowIds.set($window$, $winId$);
+ const doc = $window$.document;
+ const history = $window$.history;
+ const $parentWinId$ = windowIds.get($window$.parent);
+ let initialised = false;
+ const onInitialisedQueue = [];
+ const onInitialised = callback => {
+ initialised ? callback() : onInitialisedQueue.push(callback);
+ };
+ const sendInitEnvData = () => {
+ worker.postMessage([ 5, {
+ $winId$: $winId$,
+ $parentWinId$: $parentWinId$,
+ $url$: doc.baseURI,
+ $visibilityState$: doc.visibilityState
+ } ]);
+ setTimeout((() => {
+ initialised = true;
+ onInitialisedQueue.forEach((callback => {
+ callback();
+ }));
+ }));
+ };
+ const pushState = history.pushState.bind(history);
+ const replaceState = history.replaceState.bind(history);
+ const onLocationChange = (type, state, newUrl, oldUrl) => () => {
+ setTimeout((() => {
+ worker.postMessage([ 13, {
+ $winId$: $winId$,
+ type: type,
+ state: state,
+ url: doc.baseURI,
+ newUrl: newUrl,
+ oldUrl: oldUrl
+ } ]);
+ }));
+ };
+ history.pushState = (state, _, newUrl) => {
+ pushState(state, _, newUrl);
+ onInitialised(onLocationChange(0, state, null == newUrl ? void 0 : newUrl.toString()));
+ };
+ history.replaceState = (state, _, newUrl) => {
+ replaceState(state, _, newUrl);
+ onInitialised(onLocationChange(1, state, null == newUrl ? void 0 : newUrl.toString()));
+ };
+ $window$.addEventListener("popstate", (event => {
+ onInitialised(onLocationChange(2, event.state));
+ }));
+ $window$.addEventListener("hashchange", (event => {
+ onInitialised(onLocationChange(3, {}, event.newURL, event.oldURL));
+ }));
+ $window$.addEventListener("ptupdate", (() => {
+ readNextScript(worker, winCtxs[$winId$]);
+ }));
+ doc.addEventListener("visibilitychange", (() => worker.postMessage([ 14, $winId$, doc.visibilityState ])));
+ winCtxs[$winId$] = {
+ $winId$: $winId$,
+ $window$: $window$
+ };
+ winCtxs[$winId$].$startTime$ = performance.now();
+ {
+ const winType = $winId$ === $parentWinId$ ? "top" : "iframe";
+ logMain(`Registered ${winType} window ${normalizedWinId($winId$)}`);
+ }
+ "complete" === doc.readyState ? sendInitEnvData() : $window$.addEventListener("load", sendInitEnvData);
+ }
+ };
+ const onMessageFromWebWorker = (worker, msg, winCtx) => {
+ if (4 === msg[0]) {
+ registerWindow(worker, randomId(), mainWindow);
+ } else {
+ winCtx = winCtxs[msg[1]];
+ winCtx && (7 === msg[0] ? requestAnimationFrame((() => readNextScript(worker, winCtx))) : 6 === msg[0] && ((worker, winCtx, instanceId, errorMsg, scriptElm) => {
+ scriptElm = winCtx.$window$.document.querySelector(`[data-ptid="${instanceId}"]`);
+ if (scriptElm) {
+ errorMsg ? scriptElm.dataset.pterror = errorMsg : scriptElm.type += "-x";
+ delete scriptElm.dataset.ptid;
+ }
+ readNextScript(worker, winCtx);
+ })(worker, winCtx, msg[2], msg[3]));
+ }
+ };
+ const readMainInterfaces = () => {
+ const elms = Object.getOwnPropertyNames(mainWindow).map((interfaceName => ((doc, interfaceName, r, tag) => {
+ r = interfaceName.match(/^(HTML|SVG)(.+)Element$/);
+ if (r) {
+ tag = r[2];
+ return "S" == interfaceName[0] ? doc.createElementNS("http://www.w3.org/2000/svg", svgConstructorTags[tag] || tag.slice(0, 2).toLowerCase() + tag.slice(2)) : doc.createElement(htmlConstructorTags[tag] || tag);
+ }
+ })(docImpl, interfaceName))).filter((elm => elm)).map((elm => [ elm ]));
+ return readImplementations(elms, []);
+ };
+ const cstrs = new Set([ "Object" ]);
+ const readImplementations = (impls, interfaces) => {
+ const cstrImpls = impls.filter((implData => implData[0])).map((implData => {
+ const impl = implData[0];
+ const interfaceType = implData[1];
+ const cstrName = getConstructorName(impl);
+ const CstrPrototype = mainWindow[cstrName].prototype;
+ return [ cstrName, CstrPrototype, impl, interfaceType ];
+ }));
+ cstrImpls.map((([cstrName, CstrPrototype, impl, intefaceType]) => readOwnImplementation(cstrs, interfaces, cstrName, CstrPrototype, impl, intefaceType)));
+ return interfaces;
+ };
+ const readImplementation = (cstrName, impl, memberName) => {
+ let interfaceMembers = [];
+ let interfaceInfo = [ cstrName, "Object", interfaceMembers ];
+ for (memberName in impl) {
+ readImplementationMember(interfaceMembers, impl, memberName);
+ }
+ return interfaceInfo;
+ };
+ const readOwnImplementation = (cstrs, interfaces, cstrName, CstrPrototype, impl, interfaceType) => {
+ if (!cstrs.has(cstrName)) {
+ cstrs.add(cstrName);
+ const SuperCstr = Object.getPrototypeOf(CstrPrototype);
+ const superCstrName = getConstructorName(SuperCstr);
+ const interfaceMembers = [];
+ const propDescriptors = Object.getOwnPropertyDescriptors(CstrPrototype);
+ readOwnImplementation(cstrs, interfaces, superCstrName, SuperCstr, impl, interfaceType);
+ for (const memberName in propDescriptors) {
+ readImplementationMember(interfaceMembers, impl, memberName);
+ }
+ interfaces.push([ cstrName, superCstrName, interfaceMembers, interfaceType, getNodeName(impl) ]);
+ }
+ };
+ const readImplementationMember = (interfaceMembers, implementation, memberName, value, memberType, cstrName) => {
+ try {
+ if (isValidMemberName(memberName) && isNaN(memberName[0]) && "all" !== memberName) {
+ value = implementation[memberName];
+ memberType = typeof value;
+ if ("function" === memberType) {
+ (String(value).includes("[native") || Object.getPrototypeOf(implementation)[memberName]) && interfaceMembers.push([ memberName, 5 ]);
+ } else if ("object" === memberType && null != value) {
+ cstrName = getConstructorName(value);
+ "Object" !== cstrName && self[cstrName] && interfaceMembers.push([ memberName, value.nodeType || cstrName ]);
+ } else {
+ "symbol" !== memberType && (memberName.toUpperCase() === memberName ? interfaceMembers.push([ memberName, 6, value ]) : interfaceMembers.push([ memberName, 6 ]));
+ }
+ }
+ } catch (e) {
+ console.warn(e);
+ }
+ };
+ const readStorage = storageName => {
+ let items = [];
+ let i = 0;
+ let l = len(mainWindow[storageName]);
+ let key;
+ for (;i < l; i++) {
+ key = mainWindow[storageName].key(i);
+ items.push([ key, mainWindow[storageName].getItem(key) ]);
+ }
+ return items;
+ };
+ const getGlobalConstructor = (mainWindow, cstrName) => void 0 !== mainWindow[cstrName] ? new mainWindow[cstrName](noop) : 0;
+ const addGlobalConstructorUsingPrototype = ($interfaces$, mainWindow, cstrName) => {
+ void 0 !== mainWindow[cstrName] && $interfaces$.push([ cstrName, "Object", Object.keys(mainWindow[cstrName].prototype).map((propName => [ propName, 6 ])), 12 ]);
+ };
+ let worker;
+ (async receiveMessage => {
+ const sharedDataBuffer = new SharedArrayBuffer(1073741824);
+ const sharedData = new Int32Array(sharedDataBuffer);
+ return (worker, msg) => {
+ const msgType = msg[0];
+ const accessReq = msg[1];
+ if (0 === msgType) {
+ const initData = (() => {
+ const elm = docImpl.createElement("i");
+ const textNode = docImpl.createTextNode("");
+ const comment = docImpl.createComment("");
+ const frag = docImpl.createDocumentFragment();
+ const shadowRoot = docImpl.createElement("p").attachShadow({
+ mode: "open"
+ });
+ const intersectionObserver = getGlobalConstructor(mainWindow, "IntersectionObserver");
+ const mutationObserver = getGlobalConstructor(mainWindow, "MutationObserver");
+ const resizeObserver = getGlobalConstructor(mainWindow, "ResizeObserver");
+ const perf = mainWindow.performance;
+ const screen = mainWindow.screen;
+ const impls = [ [ mainWindow.history ], [ perf ], [ perf.navigation ], [ perf.timing ], [ screen ], [ screen.orientation ], [ mainWindow.visualViewport ], [ intersectionObserver, 12 ], [ mutationObserver, 12 ], [ resizeObserver, 12 ], [ textNode ], [ comment ], [ frag ], [ shadowRoot ], [ elm ], [ elm.attributes ], [ elm.classList ], [ elm.dataset ], [ elm.style ], [ docImpl ], [ docImpl.doctype ] ];
+ const initialInterfaces = [ readImplementation("Window", mainWindow), readImplementation("Node", textNode) ];
+ const $config$ = JSON.stringify(config, ((k, v) => {
+ if ("function" == typeof v) {
+ v = String(v);
+ v.startsWith(k + "(") && (v = "function " + v);
+ }
+ return v;
+ }));
+ const initWebWorkerData = {
+ $config$: $config$,
+ $interfaces$: readImplementations(impls, initialInterfaces),
+ $libPath$: new URL(libPath, mainWindow.location) + "",
+ $origin$: origin,
+ $localStorage$: readStorage("localStorage"),
+ $sessionStorage$: readStorage("sessionStorage")
+ };
+ addGlobalConstructorUsingPrototype(initWebWorkerData.$interfaces$, mainWindow, "IntersectionObserverEntry");
+ return initWebWorkerData;
+ })();
+ initData.$sharedDataBuffer$ = sharedDataBuffer;
+ worker.postMessage([ 1, initData ]);
+ } else {
+ 2 === msg[0] ? worker.postMessage([ 3, readMainInterfaces() ]) : 11 === msgType ? receiveMessage(accessReq, (accessRsp => {
+ const stringifiedData = JSON.stringify(accessRsp);
+ const stringifiedDataLength = stringifiedData.length;
+ for (let i = 0; i < stringifiedDataLength; i++) {
+ sharedData[i + 1] = stringifiedData.charCodeAt(i);
+ }
+ sharedData[0] = stringifiedDataLength;
+ Atomics.notify(sharedData, 0);
+ })) : onMessageFromWebWorker(worker, msg);
+ }
+ };
+ })(((accessReq, responseCallback) => mainAccessHandler(worker, accessReq).then(responseCallback))).then((onMessageHandler => {
+ if (onMessageHandler) {
+ worker = new Worker(libPath + "partytown-ww-atomics.js?v=0.7.6", {
+ name: "Partytown 🎉"
+ });
+ worker.onmessage = ev => {
+ const msg = ev.data;
+ 12 === msg[0] ? mainAccessHandler(worker, msg[1]) : onMessageHandler(worker, msg);
+ };
+ logMain("Created Partytown web worker (0.7.6)");
+ worker.onerror = ev => console.error("Web Worker Error", ev);
+ mainWindow.addEventListener("pt1", (ev => registerWindow(worker, getAndSetInstanceId(ev.detail.frameElement), ev.detail)));
+ }
+ }));
+})(window);
diff --git a/~partytown/debug/partytown-media.js b/~partytown/debug/partytown-media.js
new file mode 100644
index 0000000..10c202d
--- /dev/null
+++ b/~partytown/debug/partytown-media.js
@@ -0,0 +1,374 @@
+/* Partytown 0.7.6 - MIT builder.io */
+(self => {
+ const [getter, setter, callMethod, constructGlobal, definePrototypePropertyDescriptor, randomId, WinIdKey, InstanceIdKey, ApplyPathKey] = self.$bridgeToMedia$;
+ delete self.$bridgeToMedia$;
+ const ContextKey = Symbol();
+ const MediaSourceKey = Symbol();
+ const ReadyStateKey = Symbol();
+ const SourceBuffersKey = Symbol();
+ const SourceBufferTasksKey = Symbol();
+ const TimeRangesKey = Symbol();
+ const EMPTY_ARRAY = [];
+ const defineCstr = (win, cstrName, Cstr) => win[cstrName] = defineCstrName(cstrName, Cstr);
+ const defineCstrName = (cstrName, Cstr) => Object.defineProperty(Cstr, "name", {
+ value: cstrName
+ });
+ const initCanvas = (WorkerBase, win) => {
+ const HTMLCanvasDescriptorMap = {
+ getContext: {
+ value(contextType, contextAttributes) {
+ this[ContextKey] || (this[ContextKey] = (contextType.includes("webgl") ? createContextWebGL : createContext2D)(this, contextType, contextAttributes));
+ return this[ContextKey];
+ }
+ }
+ };
+ const WorkerCanvasGradient = defineCstr(win, "CanvasGradient", class extends WorkerBase {
+ addColorStop(...args) {
+ callMethod(this, [ "addColorStop" ], args, 2);
+ }
+ });
+ const WorkerCanvasPattern = defineCstr(win, "CanvasPattern", class extends WorkerBase {
+ setTransform(...args) {
+ callMethod(this, [ "setTransform" ], args, 2);
+ }
+ });
+ const createContext2D = (canvasInstance, contextType, contextAttributes) => {
+ const winId = canvasInstance[WinIdKey];
+ const ctxInstanceId = randomId();
+ const ctxInstance = {
+ [WinIdKey]: winId,
+ [InstanceIdKey]: ctxInstanceId,
+ [ApplyPathKey]: []
+ };
+ const ctx = callMethod(canvasInstance, [ "getContext" ], [ contextType, contextAttributes ], 1, ctxInstanceId);
+ const ctx2dGetterMethods = "getContextAttributes,getImageData,getLineDash,getTransform,isPointInPath,isPointInStroke,measureText".split(",");
+ const CanvasRenderingContext2D = {
+ get: (target, propName) => "string" == typeof propName && propName in ctx ? "function" == typeof ctx[propName] ? (...args) => {
+ if (propName.startsWith("create")) {
+ const instanceId = randomId();
+ callMethod(ctxInstance, [ propName ], args, 2, instanceId);
+ if ("createImageData" === propName || "createPattern" === propName) {
+ (api => {
+ console.warn(`${api} not implemented`);
+ })(`${propName}()`);
+ return {
+ setTransform: () => {}
+ };
+ }
+ return new WorkerCanvasGradient(winId, instanceId);
+ }
+ const methodCallType = ctx2dGetterMethods.includes(propName) ? 1 : 2;
+ return callMethod(ctxInstance, [ propName ], args, methodCallType);
+ } : ctx[propName] : target[propName],
+ set(target, propName, value) {
+ if ("string" == typeof propName && propName in ctx) {
+ ctx[propName] !== value && "function" != typeof value && setter(ctxInstance, [ propName ], value);
+ ctx[propName] = value;
+ } else {
+ target[propName] = value;
+ }
+ return true;
+ }
+ };
+ return new Proxy(ctx, CanvasRenderingContext2D);
+ };
+ const createContextWebGL = (canvasInstance, contextType, contextAttributes) => {
+ const winId = canvasInstance[WinIdKey];
+ const ctxInstanceId = randomId();
+ const ctxInstance = {
+ [WinIdKey]: winId,
+ [InstanceIdKey]: ctxInstanceId,
+ [ApplyPathKey]: []
+ };
+ const ctx = callMethod(canvasInstance, [ "getContext" ], [ contextType, contextAttributes ], 1, ctxInstanceId);
+ const WebGLRenderingContextHandler = {
+ get: (target, propName) => "string" == typeof propName ? "function" != typeof ctx[propName] ? ctx[propName] : (...args) => callMethod(ctxInstance, [ propName ], args, getWebGlMethodCallType(propName)) : target[propName],
+ set(target, propName, value) {
+ if ("string" == typeof propName && propName in ctx) {
+ ctx[propName] !== value && "function" != typeof value && setter(ctxInstance, [ propName ], value);
+ ctx[propName] = value;
+ } else {
+ target[propName] = value;
+ }
+ return true;
+ }
+ };
+ return new Proxy(ctx, WebGLRenderingContextHandler);
+ };
+ const ctxWebGLGetterMethods = "checkFramebufferStatus,makeXRCompatible".split(",");
+ const getWebGlMethodCallType = methodName => methodName.startsWith("create") || methodName.startsWith("get") || methodName.startsWith("is") || ctxWebGLGetterMethods.includes(methodName) ? 1 : 2;
+ defineCstr(win, "CanvasGradient", WorkerCanvasGradient);
+ defineCstr(win, "CanvasPattern", WorkerCanvasPattern);
+ definePrototypePropertyDescriptor(win.HTMLCanvasElement, HTMLCanvasDescriptorMap);
+ };
+ const initMedia = (WorkerBase, WorkerEventTargetProxy, env, win) => {
+ var _a, _b;
+ win.Audio = defineCstrName("HTMLAudioElement", class {
+ constructor(src) {
+ const audio = env.$createNode$("audio", randomId());
+ audio.src = src;
+ return audio;
+ }
+ });
+ const WorkerAudioTrack = class extends WorkerBase {
+ get enabled() {
+ return getter(this, [ "enabled" ]);
+ }
+ set enabled(value) {
+ setter(this, [ "enabled" ], value);
+ }
+ get id() {
+ return getter(this, [ "id" ]);
+ }
+ get kind() {
+ return getter(this, [ "kind" ]);
+ }
+ get label() {
+ return getter(this, [ "label" ]);
+ }
+ get language() {
+ return getter(this, [ "language" ]);
+ }
+ get sourceBuffer() {
+ return new WorkerSourceBuffer(this);
+ }
+ };
+ const WorkerAudioTrackList = class {
+ constructor(mediaElm) {
+ const winId = mediaElm[WinIdKey];
+ const instanceId = mediaElm[InstanceIdKey];
+ const instance = {
+ addEventListener(...args) {
+ callMethod(mediaElm, [ "audioTracks", "addEventListener" ], args, 3);
+ },
+ getTrackById: (...args) => callMethod(mediaElm, [ "audioTracks", "getTrackById" ], args),
+ get length() {
+ return getter(mediaElm, [ "audioTracks", "length" ]);
+ },
+ removeEventListener(...args) {
+ callMethod(mediaElm, [ "audioTracks", "removeEventListener" ], args, 3);
+ }
+ };
+ return new Proxy(instance, {
+ get: (target, propName) => "number" == typeof propName ? new WorkerAudioTrack(winId, instanceId, [ "audioTracks", propName ]) : target[propName]
+ });
+ }
+ };
+ const WorkerSourceBufferList = defineCstr(win, "SourceBufferList", class extends Array {
+ constructor(mediaSource) {
+ super();
+ this[MediaSourceKey] = mediaSource;
+ }
+ addEventListener(...args) {
+ callMethod(this[MediaSourceKey], [ "sourceBuffers", "addEventListener" ], args, 3);
+ }
+ removeEventListener(...args) {
+ callMethod(this[MediaSourceKey], [ "sourceBuffers", "removeEventListener" ], args, 3);
+ }
+ });
+ const WorkerSourceBuffer = defineCstr(win, "SourceBuffer", (_b = class extends WorkerEventTargetProxy {
+ constructor(mediaSource) {
+ super(mediaSource[WinIdKey], mediaSource[InstanceIdKey], [ "sourceBuffers" ]);
+ this[_a] = [];
+ this[MediaSourceKey] = mediaSource;
+ }
+ abort() {
+ const sbIndex = getSourceBufferIndex(this);
+ callMethod(this, [ sbIndex, "appendWindowStart" ], EMPTY_ARRAY, 1);
+ }
+ addEventListener(...args) {
+ const sbIndex = getSourceBufferIndex(this);
+ callMethod(this, [ sbIndex, "addEventListener" ], args, 3);
+ }
+ appendBuffer(buf) {
+ this[SourceBufferTasksKey].push([ "appendBuffer", [ buf ], buf ]);
+ drainSourceBufferQueue(this);
+ }
+ get appendWindowStart() {
+ const sbIndex = getSourceBufferIndex(this);
+ return getter(this, [ sbIndex, "appendWindowStart" ]);
+ }
+ set appendWindowStart(value) {
+ const sbIndex = getSourceBufferIndex(this);
+ setter(this, [ sbIndex, "appendWindowStart" ], value);
+ }
+ get appendWindowEnd() {
+ const sbIndex = getSourceBufferIndex(this);
+ return getter(this, [ sbIndex, "appendWindowEnd" ]);
+ }
+ set appendWindowEnd(value) {
+ const sbIndex = getSourceBufferIndex(this);
+ setter(this, [ sbIndex, "appendWindowEnd" ], value);
+ }
+ get buffered() {
+ const mediaSource = this[MediaSourceKey];
+ const sbIndex = getSourceBufferIndex(this);
+ const timeRanges = new WorkerTimeRanges(mediaSource[WinIdKey], mediaSource[InstanceIdKey], [ "sourceBuffers", sbIndex, "buffered" ]);
+ return timeRanges;
+ }
+ changeType(mimeType) {
+ const sbIndex = getSourceBufferIndex(this);
+ callMethod(this, [ sbIndex, "changeType" ], [ mimeType ], 2);
+ }
+ get mode() {
+ const sbIndex = getSourceBufferIndex(this);
+ return getter(this, [ sbIndex, "mode" ]);
+ }
+ set mode(value) {
+ const sbIndex = getSourceBufferIndex(this);
+ setter(this, [ sbIndex, "mode" ], value);
+ }
+ remove(start, end) {
+ this[SourceBufferTasksKey].push([ "remove", [ start, end ] ]);
+ drainSourceBufferQueue(this);
+ }
+ removeEventListener(...args) {
+ const sbIndex = getSourceBufferIndex(this);
+ callMethod(this, [ sbIndex, "removeEventListener" ], args, 3);
+ }
+ get timestampOffset() {
+ const sbIndex = getSourceBufferIndex(this);
+ return getter(this, [ sbIndex, "timestampOffset" ]);
+ }
+ set timestampOffset(value) {
+ const sbIndex = getSourceBufferIndex(this);
+ setter(this, [ sbIndex, "timestampOffset" ], value);
+ }
+ get updating() {
+ const sbIndex = getSourceBufferIndex(this);
+ return getter(this, [ sbIndex, "updating" ]);
+ }
+ }, _a = SourceBufferTasksKey, _b));
+ const WorkerTimeRanges = defineCstr(win, "TimeRanges", class extends WorkerBase {
+ start(...args) {
+ return callMethod(this, [ "start" ], args);
+ }
+ end(...args) {
+ return callMethod(this, [ "end" ], args);
+ }
+ get length() {
+ return getter(this, [ "length" ]);
+ }
+ });
+ const getSourceBufferIndex = sourceBuffer => {
+ if (sourceBuffer) {
+ const mediaSource = sourceBuffer[MediaSourceKey];
+ const sourceBufferList = mediaSource[SourceBuffersKey];
+ return sourceBufferList.indexOf(sourceBuffer);
+ }
+ return -1;
+ };
+ const drainSourceBufferQueue = sourceBuffer => {
+ if (sourceBuffer[SourceBufferTasksKey].length) {
+ if (!sourceBuffer.updating) {
+ const task = sourceBuffer[SourceBufferTasksKey].shift();
+ if (task) {
+ const sbIndex = getSourceBufferIndex(sourceBuffer);
+ callMethod(sourceBuffer, [ sbIndex, task[0] ], task[1], 3, void 0, task[2]);
+ }
+ }
+ setTimeout((() => drainSourceBufferQueue(sourceBuffer)), 50);
+ }
+ };
+ const HTMLMediaDescriptorMap = {
+ buffered: {
+ get() {
+ if (!this[TimeRangesKey]) {
+ this[TimeRangesKey] = new WorkerTimeRanges(this[WinIdKey], this[InstanceIdKey], [ "buffered" ]);
+ setTimeout((() => {
+ this[TimeRangesKey] = void 0;
+ }), 5e3);
+ }
+ return this[TimeRangesKey];
+ }
+ },
+ readyState: {
+ get() {
+ if (4 === this[ReadyStateKey]) {
+ return 4;
+ }
+ if ("number" != typeof this[ReadyStateKey]) {
+ this[ReadyStateKey] = getter(this, [ "readyState" ]);
+ setTimeout((() => {
+ this[ReadyStateKey] = void 0;
+ }), 1e3);
+ }
+ return this[ReadyStateKey];
+ }
+ }
+ };
+ defineCstr(win, "MediaSource", class extends WorkerEventTargetProxy {
+ constructor() {
+ super(env.$winId$);
+ this[SourceBuffersKey] = new WorkerSourceBufferList(this);
+ constructGlobal(this, "MediaSource", EMPTY_ARRAY);
+ }
+ get activeSourceBuffers() {
+ return [];
+ }
+ addSourceBuffer(mimeType) {
+ const sourceBuffer = new WorkerSourceBuffer(this);
+ this[SourceBuffersKey].push(sourceBuffer);
+ callMethod(this, [ "addSourceBuffer" ], [ mimeType ]);
+ return sourceBuffer;
+ }
+ clearLiveSeekableRange() {
+ callMethod(this, [ "clearLiveSeekableRange" ], EMPTY_ARRAY, 2);
+ }
+ get duration() {
+ return getter(this, [ "duration" ]);
+ }
+ set duration(value) {
+ setter(this, [ "duration" ], value);
+ }
+ endOfStream(endOfStreamError) {
+ callMethod(this, [ "endOfStream" ], [ endOfStreamError ], 3);
+ }
+ get readyState() {
+ return getter(this, [ "readyState" ]);
+ }
+ removeSourceBuffer(sourceBuffer) {
+ const index = getSourceBufferIndex(sourceBuffer);
+ if (index > -1) {
+ this[SourceBuffersKey].splice(index, 1);
+ callMethod(this, [ "removeSourceBuffer" ], [ index ], 1);
+ }
+ }
+ setLiveSeekableRange(start, end) {
+ callMethod(this, [ "setLiveSeekableRange" ], [ start, end ], 2);
+ }
+ get sourceBuffers() {
+ return this[SourceBuffersKey];
+ }
+ static isTypeSupported(mimeType) {
+ if (!isStaticTypeSupported.has(mimeType)) {
+ const isSupported = callMethod(win, [ "MediaSource", "isTypeSupported" ], [ mimeType ]);
+ isStaticTypeSupported.set(mimeType, isSupported);
+ }
+ return isStaticTypeSupported.get(mimeType);
+ }
+ });
+ const winURL = win.URL = defineCstrName("URL", class extends URL {});
+ const hasAudioTracks = "audioTracks" in win.HTMLMediaElement.prototype;
+ if (hasAudioTracks) {
+ defineCstr(win, "AudioTrackList", WorkerAudioTrackList);
+ defineCstr(win, "AudioTrack", WorkerAudioTrack);
+ HTMLMediaDescriptorMap.audioTracks = {
+ get() {
+ return new WorkerAudioTrackList(this);
+ }
+ };
+ }
+ definePrototypePropertyDescriptor(win.HTMLMediaElement, HTMLMediaDescriptorMap);
+ winURL.createObjectURL = obj => callMethod(win, [ "URL", "createObjectURL" ], [ obj ]);
+ winURL.revokeObjectURL = obj => callMethod(win, [ "URL", "revokeObjectURL" ], [ obj ]);
+ };
+ const isStaticTypeSupported = new Map;
+ self.$bridgeFromMedia$ = (WorkerBase, WorkerEventTargetProxy, env, win, windowMediaConstructors) => {
+ windowMediaConstructors.map((mediaCstrName => {
+ delete win[mediaCstrName];
+ }));
+ initCanvas(WorkerBase, win);
+ initMedia(WorkerBase, WorkerEventTargetProxy, env, win);
+ };
+})(self);
diff --git a/~partytown/debug/partytown-sandbox-sw.js b/~partytown/debug/partytown-sandbox-sw.js
new file mode 100644
index 0000000..7ad6276
--- /dev/null
+++ b/~partytown/debug/partytown-sandbox-sw.js
@@ -0,0 +1,559 @@
+/* Partytown 0.7.6 - MIT builder.io */
+(window => {
+ const isPromise = v => "object" == typeof v && v && v.then;
+ const noop = () => {};
+ const len = obj => obj.length;
+ const getConstructorName = obj => {
+ var _a, _b, _c;
+ try {
+ const constructorName = null === (_a = null == obj ? void 0 : obj.constructor) || void 0 === _a ? void 0 : _a.name;
+ if (constructorName) {
+ return constructorName;
+ }
+ } catch (e) {}
+ try {
+ const zoneJsConstructorName = null === (_c = null === (_b = null == obj ? void 0 : obj.__zone_symbol__originalInstance) || void 0 === _b ? void 0 : _b.constructor) || void 0 === _c ? void 0 : _c.name;
+ if (zoneJsConstructorName) {
+ return zoneJsConstructorName;
+ }
+ } catch (e) {}
+ return "";
+ };
+ const startsWith = (str, val) => str.startsWith(val);
+ const isValidMemberName = memberName => !(startsWith(memberName, "webkit") || startsWith(memberName, "toJSON") || startsWith(memberName, "constructor") || startsWith(memberName, "toString") || startsWith(memberName, "_"));
+ const getNodeName = node => 11 === node.nodeType && node.host ? "#s" : node.nodeName;
+ const randomId = () => Math.round(Math.random() * Number.MAX_SAFE_INTEGER).toString(36);
+ const defineConstructorName = (Cstr, value) => ((obj, memberName, descriptor) => Object.defineProperty(obj, memberName, {
+ ...descriptor,
+ configurable: true
+ }))(Cstr, "name", {
+ value: value
+ });
+ const htmlConstructorTags = {
+ Anchor: "a",
+ DList: "dl",
+ Image: "img",
+ OList: "ol",
+ Paragraph: "p",
+ Quote: "q",
+ TableCaption: "caption",
+ TableCell: "td",
+ TableCol: "colgroup",
+ TableRow: "tr",
+ TableSection: "tbody",
+ UList: "ul"
+ };
+ const svgConstructorTags = {
+ Graphics: "g",
+ SVG: "svg"
+ };
+ const InstanceIdKey = Symbol();
+ const CreatedKey = Symbol();
+ const instances = new Map;
+ const mainRefs = new Map;
+ const winCtxs = {};
+ const windowIds = new WeakMap;
+ const getAndSetInstanceId = (instance, instanceId) => {
+ if (instance) {
+ if (instanceId = windowIds.get(instance)) {
+ return instanceId;
+ }
+ (instanceId = instance[InstanceIdKey]) || setInstanceId(instance, instanceId = randomId());
+ return instanceId;
+ }
+ };
+ const getInstance = (winId, instanceId, win, doc, docId) => {
+ if ((win = winCtxs[winId]) && win.$window$) {
+ if (winId === instanceId) {
+ return win.$window$;
+ }
+ doc = win.$window$.document;
+ docId = instanceId.split(".").pop();
+ if ("d" === docId) {
+ return doc;
+ }
+ if ("e" === docId) {
+ return doc.documentElement;
+ }
+ if ("h" === docId) {
+ return doc.head;
+ }
+ if ("b" === docId) {
+ return doc.body;
+ }
+ }
+ return instances.get(instanceId);
+ };
+ const setInstanceId = (instance, instanceId, now) => {
+ if (instance) {
+ instances.set(instanceId, instance);
+ instance[InstanceIdKey] = instanceId;
+ instance[CreatedKey] = now = Date.now();
+ if (now > lastCleanup + 5e3) {
+ instances.forEach(((storedInstance, instanceId) => {
+ storedInstance[CreatedKey] < lastCleanup && storedInstance.nodeType && !storedInstance.isConnected && instances.delete(instanceId);
+ }));
+ lastCleanup = now;
+ }
+ }
+ };
+ let lastCleanup = 0;
+ const mainWindow = window.parent;
+ const docImpl = document.implementation.createHTMLDocument();
+ const config = mainWindow.partytown || {};
+ const libPath = (config.lib || "/~partytown/") + "debug/";
+ const logMain = msg => {
+ console.debug.apply(console, [ "%cMain 🌎", "background: #717171; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;", msg ]);
+ };
+ const winIds = [];
+ const normalizedWinId = winId => {
+ winIds.includes(winId) || winIds.push(winId);
+ return winIds.indexOf(winId) + 1;
+ };
+ const defineCustomElement = (winId, worker, ceData) => {
+ const Cstr = defineConstructorName(class extends winCtxs[winId].$window$.HTMLElement {}, ceData[0]);
+ const ceCallbackMethods = "connectedCallback,disconnectedCallback,attributeChangedCallback,adoptedCallback".split(",");
+ ceCallbackMethods.map((callbackMethodName => Cstr.prototype[callbackMethodName] = function(...args) {
+ worker.postMessage([ 15, winId, getAndSetInstanceId(this), callbackMethodName, args ]);
+ }));
+ Cstr.observedAttributes = ceData[1];
+ return Cstr;
+ };
+ const serializeForWorker = ($winId$, value, added, type, cstrName) => void 0 !== value && (type = typeof value) ? "string" === type || "number" === type || "boolean" === type || null == value ? [ 0, value ] : "function" === type ? [ 6 ] : (added = added || new Set) && Array.isArray(value) ? added.has(value) ? [ 1, [] ] : added.add(value) && [ 1, value.map((v => serializeForWorker($winId$, v, added))) ] : "object" === type ? serializedValueIsError(value) ? [ 14, {
+ name: value.name,
+ message: value.message,
+ stack: value.stack
+ } ] : "" === (cstrName = getConstructorName(value)) ? [ 2, {} ] : "Window" === cstrName ? [ 3, [ $winId$, $winId$ ] ] : "HTMLCollection" === cstrName || "NodeList" === cstrName ? [ 7, Array.from(value).map((v => serializeForWorker($winId$, v, added)[1])) ] : cstrName.endsWith("Event") ? [ 5, serializeObjectForWorker($winId$, value, added) ] : "CSSRuleList" === cstrName ? [ 12, Array.from(value).map(serializeCssRuleForWorker) ] : startsWith(cstrName, "CSS") && cstrName.endsWith("Rule") ? [ 11, serializeCssRuleForWorker(value) ] : "CSSStyleDeclaration" === cstrName ? [ 13, serializeObjectForWorker($winId$, value, added) ] : "Attr" === cstrName ? [ 10, [ value.name, value.value ] ] : value.nodeType ? [ 3, [ $winId$, getAndSetInstanceId(value), getNodeName(value) ] ] : [ 2, serializeObjectForWorker($winId$, value, added, true, true) ] : void 0 : value;
+ const serializeObjectForWorker = (winId, obj, added, includeFunctions, includeEmptyStrings, serializedObj, propName, propValue) => {
+ serializedObj = {};
+ if (!added.has(obj)) {
+ added.add(obj);
+ for (propName in obj) {
+ if (isValidMemberName(propName)) {
+ propValue = "path" === propName && getConstructorName(obj).endsWith("Event") ? obj.composedPath() : obj[propName];
+ (includeFunctions || "function" != typeof propValue) && (includeEmptyStrings || "" !== propValue) && (serializedObj[propName] = serializeForWorker(winId, propValue, added));
+ }
+ }
+ }
+ return serializedObj;
+ };
+ const serializeCssRuleForWorker = cssRule => {
+ let obj = {};
+ let key;
+ for (key in cssRule) {
+ validCssRuleProps.includes(key) && (obj[key] = String(cssRule[key]));
+ }
+ return obj;
+ };
+ const serializedValueIsError = value => value instanceof window.top.Error;
+ const deserializeFromWorker = (worker, serializedTransfer, serializedType, serializedValue) => {
+ if (serializedTransfer) {
+ serializedType = serializedTransfer[0];
+ serializedValue = serializedTransfer[1];
+ return 0 === serializedType ? serializedValue : 4 === serializedType ? deserializeRefFromWorker(worker, serializedValue) : 1 === serializedType ? serializedValue.map((v => deserializeFromWorker(worker, v))) : 3 === serializedType ? getInstance(serializedValue[0], serializedValue[1]) : 5 === serializedType ? constructEvent(deserializeObjectFromWorker(worker, serializedValue)) : 2 === serializedType ? deserializeObjectFromWorker(worker, serializedValue) : 8 === serializedType ? serializedValue : 9 === serializedType ? new window[serializedTransfer[2]](serializedValue) : void 0;
+ }
+ };
+ const deserializeRefFromWorker = (worker, {$winId$: $winId$, $instanceId$: $instanceId$, $refId$: $refId$}, ref) => {
+ ref = mainRefs.get($refId$);
+ if (!ref) {
+ ref = function(...args) {
+ worker.postMessage([ 9, {
+ $winId$: $winId$,
+ $instanceId$: $instanceId$,
+ $refId$: $refId$,
+ $thisArg$: serializeForWorker($winId$, this),
+ $args$: serializeForWorker($winId$, args)
+ } ]);
+ };
+ mainRefs.set($refId$, ref);
+ }
+ return ref;
+ };
+ const constructEvent = eventProps => new ("detail" in eventProps ? CustomEvent : Event)(eventProps.type, eventProps);
+ const deserializeObjectFromWorker = (worker, serializedValue, obj, key) => {
+ obj = {};
+ for (key in serializedValue) {
+ obj[key] = deserializeFromWorker(worker, serializedValue[key]);
+ }
+ return obj;
+ };
+ const validCssRuleProps = "cssText,selectorText,href,media,namespaceURI,prefix,name,conditionText".split(",");
+ const mainAccessHandler = async (worker, accessReq) => {
+ let accessRsp = {
+ $msgId$: accessReq.$msgId$
+ };
+ let totalTasks = len(accessReq.$tasks$);
+ let i = 0;
+ let task;
+ let winId;
+ let applyPath;
+ let instance;
+ let rtnValue;
+ let isLast;
+ for (;i < totalTasks; i++) {
+ try {
+ isLast = i === totalTasks - 1;
+ task = accessReq.$tasks$[i];
+ winId = task.$winId$;
+ applyPath = task.$applyPath$;
+ !winCtxs[winId] && winId.startsWith("f_") && await new Promise((resolve => {
+ let check = 0;
+ let callback = () => {
+ winCtxs[winId] || check++ > 1e3 ? resolve() : requestAnimationFrame(callback);
+ };
+ callback();
+ }));
+ if (1 === applyPath[0] && applyPath[1] in winCtxs[winId].$window$) {
+ setInstanceId(new winCtxs[winId].$window$[applyPath[1]](...deserializeFromWorker(worker, applyPath[2])), task.$instanceId$);
+ } else {
+ instance = getInstance(winId, task.$instanceId$);
+ if (instance) {
+ rtnValue = applyToInstance(worker, winId, instance, applyPath, isLast, task.$groupedGetters$);
+ task.$assignInstanceId$ && ("string" == typeof task.$assignInstanceId$ ? setInstanceId(rtnValue, task.$assignInstanceId$) : winCtxs[task.$assignInstanceId$.$winId$] = {
+ $winId$: task.$assignInstanceId$.$winId$,
+ $window$: {
+ document: rtnValue
+ }
+ });
+ if (isPromise(rtnValue)) {
+ rtnValue = await rtnValue;
+ isLast && (accessRsp.$isPromise$ = true);
+ }
+ isLast && (accessRsp.$rtnValue$ = serializeForWorker(winId, rtnValue));
+ } else {
+ accessRsp.$error$ = `Error finding instance "${task.$instanceId$}" on window ${normalizedWinId(winId)}`;
+ console.error(accessRsp.$error$, task);
+ }
+ }
+ } catch (e) {
+ isLast ? accessRsp.$error$ = String(e.stack || e) : console.error(e);
+ }
+ }
+ return accessRsp;
+ };
+ const applyToInstance = (worker, winId, instance, applyPath, isLast, groupedGetters) => {
+ let i = 0;
+ let l = len(applyPath);
+ let next;
+ let current;
+ let previous;
+ let args;
+ let groupedRtnValues;
+ for (;i < l; i++) {
+ current = applyPath[i];
+ next = applyPath[i + 1];
+ previous = applyPath[i - 1];
+ try {
+ if (!Array.isArray(next)) {
+ if ("string" == typeof current || "number" == typeof current) {
+ if (i + 1 === l && groupedGetters) {
+ groupedRtnValues = {};
+ groupedGetters.map((propName => groupedRtnValues[propName] = instance[propName]));
+ return groupedRtnValues;
+ }
+ instance = instance[current];
+ } else {
+ if (0 === next) {
+ instance[previous] = deserializeFromWorker(worker, current);
+ return;
+ }
+ if ("function" == typeof instance[previous]) {
+ args = deserializeFromWorker(worker, current);
+ "define" === previous && "CustomElementRegistry" === getConstructorName(instance) && (args[1] = defineCustomElement(winId, worker, args[1]));
+ "insertRule" === previous && args[1] > len(instance.cssRules) && (args[1] = len(instance.cssRules));
+ instance = instance[previous].apply(instance, args);
+ if ("play" === previous) {
+ return Promise.resolve();
+ }
+ }
+ }
+ }
+ } catch (err) {
+ if (isLast) {
+ throw err;
+ }
+ console.debug("Non-blocking setter error:", err);
+ }
+ }
+ return instance;
+ };
+ const readNextScript = (worker, winCtx) => {
+ let $winId$ = winCtx.$winId$;
+ let win = winCtx.$window$;
+ let doc = win.document;
+ let scriptSelector = 'script[type="text/partytown"]:not([data-ptid]):not([data-pterror])';
+ let scriptElm;
+ let $instanceId$;
+ let scriptData;
+ if (doc && doc.body) {
+ scriptElm = doc.querySelector('script[type="text/partytown"]:not([data-ptid]):not([data-pterror]):not([async]):not([defer])');
+ scriptElm || (scriptElm = doc.querySelector(scriptSelector));
+ if (scriptElm) {
+ scriptElm.dataset.ptid = $instanceId$ = getAndSetInstanceId(scriptElm, $winId$);
+ scriptData = {
+ $winId$: $winId$,
+ $instanceId$: $instanceId$
+ };
+ if (scriptElm.src) {
+ scriptData.$url$ = scriptElm.src;
+ scriptData.$orgUrl$ = scriptElm.dataset.ptsrc || scriptElm.src;
+ } else {
+ scriptData.$content$ = scriptElm.innerHTML;
+ }
+ worker.postMessage([ 7, scriptData ]);
+ } else {
+ if (!winCtx.$isInitialized$) {
+ winCtx.$isInitialized$ = 1;
+ ((worker, $winId$, win) => {
+ let queuedForwardCalls = win._ptf;
+ let forwards = (win.partytown || {}).forward || [];
+ let i;
+ let mainForwardFn;
+ let forwardCall = ($forward$, args) => worker.postMessage([ 10, {
+ $winId$: $winId$,
+ $forward$: $forward$,
+ $args$: serializeForWorker($winId$, Array.from(args))
+ } ]);
+ win._ptf = void 0;
+ forwards.map((forwardProps => {
+ mainForwardFn = win;
+ forwardProps.split(".").map(((_, i, arr) => {
+ mainForwardFn = mainForwardFn[arr[i]] = i + 1 < len(arr) ? mainForwardFn[arr[i]] || ("push" === arr[i + 1] ? [] : {}) : (...args) => forwardCall(arr, args);
+ }));
+ }));
+ if (queuedForwardCalls) {
+ for (i = 0; i < len(queuedForwardCalls); i += 2) {
+ forwardCall(queuedForwardCalls[i], queuedForwardCalls[i + 1]);
+ }
+ }
+ })(worker, $winId$, win);
+ doc.dispatchEvent(new CustomEvent("pt0"));
+ {
+ const winType = win === win.top ? "top" : "iframe";
+ logMain(`Executed ${winType} window ${normalizedWinId($winId$)} environment scripts in ${(performance.now() - winCtx.$startTime$).toFixed(1)}ms`);
+ }
+ }
+ worker.postMessage([ 8, $winId$ ]);
+ }
+ } else {
+ requestAnimationFrame((() => readNextScript(worker, winCtx)));
+ }
+ };
+ const registerWindow = (worker, $winId$, $window$) => {
+ if (!windowIds.has($window$)) {
+ windowIds.set($window$, $winId$);
+ const doc = $window$.document;
+ const history = $window$.history;
+ const $parentWinId$ = windowIds.get($window$.parent);
+ let initialised = false;
+ const onInitialisedQueue = [];
+ const onInitialised = callback => {
+ initialised ? callback() : onInitialisedQueue.push(callback);
+ };
+ const sendInitEnvData = () => {
+ worker.postMessage([ 5, {
+ $winId$: $winId$,
+ $parentWinId$: $parentWinId$,
+ $url$: doc.baseURI,
+ $visibilityState$: doc.visibilityState
+ } ]);
+ setTimeout((() => {
+ initialised = true;
+ onInitialisedQueue.forEach((callback => {
+ callback();
+ }));
+ }));
+ };
+ const pushState = history.pushState.bind(history);
+ const replaceState = history.replaceState.bind(history);
+ const onLocationChange = (type, state, newUrl, oldUrl) => () => {
+ setTimeout((() => {
+ worker.postMessage([ 13, {
+ $winId$: $winId$,
+ type: type,
+ state: state,
+ url: doc.baseURI,
+ newUrl: newUrl,
+ oldUrl: oldUrl
+ } ]);
+ }));
+ };
+ history.pushState = (state, _, newUrl) => {
+ pushState(state, _, newUrl);
+ onInitialised(onLocationChange(0, state, null == newUrl ? void 0 : newUrl.toString()));
+ };
+ history.replaceState = (state, _, newUrl) => {
+ replaceState(state, _, newUrl);
+ onInitialised(onLocationChange(1, state, null == newUrl ? void 0 : newUrl.toString()));
+ };
+ $window$.addEventListener("popstate", (event => {
+ onInitialised(onLocationChange(2, event.state));
+ }));
+ $window$.addEventListener("hashchange", (event => {
+ onInitialised(onLocationChange(3, {}, event.newURL, event.oldURL));
+ }));
+ $window$.addEventListener("ptupdate", (() => {
+ readNextScript(worker, winCtxs[$winId$]);
+ }));
+ doc.addEventListener("visibilitychange", (() => worker.postMessage([ 14, $winId$, doc.visibilityState ])));
+ winCtxs[$winId$] = {
+ $winId$: $winId$,
+ $window$: $window$
+ };
+ winCtxs[$winId$].$startTime$ = performance.now();
+ {
+ const winType = $winId$ === $parentWinId$ ? "top" : "iframe";
+ logMain(`Registered ${winType} window ${normalizedWinId($winId$)}`);
+ }
+ "complete" === doc.readyState ? sendInitEnvData() : $window$.addEventListener("load", sendInitEnvData);
+ }
+ };
+ const onMessageFromWebWorker = (worker, msg, winCtx) => {
+ if (4 === msg[0]) {
+ registerWindow(worker, randomId(), mainWindow);
+ } else {
+ winCtx = winCtxs[msg[1]];
+ winCtx && (7 === msg[0] ? requestAnimationFrame((() => readNextScript(worker, winCtx))) : 6 === msg[0] && ((worker, winCtx, instanceId, errorMsg, scriptElm) => {
+ scriptElm = winCtx.$window$.document.querySelector(`[data-ptid="${instanceId}"]`);
+ if (scriptElm) {
+ errorMsg ? scriptElm.dataset.pterror = errorMsg : scriptElm.type += "-x";
+ delete scriptElm.dataset.ptid;
+ }
+ readNextScript(worker, winCtx);
+ })(worker, winCtx, msg[2], msg[3]));
+ }
+ };
+ const readMainPlatform = () => {
+ const elm = docImpl.createElement("i");
+ const textNode = docImpl.createTextNode("");
+ const comment = docImpl.createComment("");
+ const frag = docImpl.createDocumentFragment();
+ const shadowRoot = docImpl.createElement("p").attachShadow({
+ mode: "open"
+ });
+ const intersectionObserver = getGlobalConstructor(mainWindow, "IntersectionObserver");
+ const mutationObserver = getGlobalConstructor(mainWindow, "MutationObserver");
+ const resizeObserver = getGlobalConstructor(mainWindow, "ResizeObserver");
+ const perf = mainWindow.performance;
+ const screen = mainWindow.screen;
+ const impls = [ [ mainWindow.history ], [ perf ], [ perf.navigation ], [ perf.timing ], [ screen ], [ screen.orientation ], [ mainWindow.visualViewport ], [ intersectionObserver, 12 ], [ mutationObserver, 12 ], [ resizeObserver, 12 ], [ textNode ], [ comment ], [ frag ], [ shadowRoot ], [ elm ], [ elm.attributes ], [ elm.classList ], [ elm.dataset ], [ elm.style ], [ docImpl ], [ docImpl.doctype ] ];
+ const initialInterfaces = [ readImplementation("Window", mainWindow), readImplementation("Node", textNode) ];
+ const $config$ = JSON.stringify(config, ((k, v) => {
+ if ("function" == typeof v) {
+ v = String(v);
+ v.startsWith(k + "(") && (v = "function " + v);
+ }
+ return v;
+ }));
+ const initWebWorkerData = {
+ $config$: $config$,
+ $interfaces$: readImplementations(impls, initialInterfaces),
+ $libPath$: new URL(libPath, mainWindow.location) + "",
+ $origin$: origin,
+ $localStorage$: readStorage("localStorage"),
+ $sessionStorage$: readStorage("sessionStorage")
+ };
+ addGlobalConstructorUsingPrototype(initWebWorkerData.$interfaces$, mainWindow, "IntersectionObserverEntry");
+ return initWebWorkerData;
+ };
+ const readMainInterfaces = () => {
+ const elms = Object.getOwnPropertyNames(mainWindow).map((interfaceName => ((doc, interfaceName, r, tag) => {
+ r = interfaceName.match(/^(HTML|SVG)(.+)Element$/);
+ if (r) {
+ tag = r[2];
+ return "S" == interfaceName[0] ? doc.createElementNS("http://www.w3.org/2000/svg", svgConstructorTags[tag] || tag.slice(0, 2).toLowerCase() + tag.slice(2)) : doc.createElement(htmlConstructorTags[tag] || tag);
+ }
+ })(docImpl, interfaceName))).filter((elm => elm)).map((elm => [ elm ]));
+ return readImplementations(elms, []);
+ };
+ const cstrs = new Set([ "Object" ]);
+ const readImplementations = (impls, interfaces) => {
+ const cstrImpls = impls.filter((implData => implData[0])).map((implData => {
+ const impl = implData[0];
+ const interfaceType = implData[1];
+ const cstrName = getConstructorName(impl);
+ const CstrPrototype = mainWindow[cstrName].prototype;
+ return [ cstrName, CstrPrototype, impl, interfaceType ];
+ }));
+ cstrImpls.map((([cstrName, CstrPrototype, impl, intefaceType]) => readOwnImplementation(cstrs, interfaces, cstrName, CstrPrototype, impl, intefaceType)));
+ return interfaces;
+ };
+ const readImplementation = (cstrName, impl, memberName) => {
+ let interfaceMembers = [];
+ let interfaceInfo = [ cstrName, "Object", interfaceMembers ];
+ for (memberName in impl) {
+ readImplementationMember(interfaceMembers, impl, memberName);
+ }
+ return interfaceInfo;
+ };
+ const readOwnImplementation = (cstrs, interfaces, cstrName, CstrPrototype, impl, interfaceType) => {
+ if (!cstrs.has(cstrName)) {
+ cstrs.add(cstrName);
+ const SuperCstr = Object.getPrototypeOf(CstrPrototype);
+ const superCstrName = getConstructorName(SuperCstr);
+ const interfaceMembers = [];
+ const propDescriptors = Object.getOwnPropertyDescriptors(CstrPrototype);
+ readOwnImplementation(cstrs, interfaces, superCstrName, SuperCstr, impl, interfaceType);
+ for (const memberName in propDescriptors) {
+ readImplementationMember(interfaceMembers, impl, memberName);
+ }
+ interfaces.push([ cstrName, superCstrName, interfaceMembers, interfaceType, getNodeName(impl) ]);
+ }
+ };
+ const readImplementationMember = (interfaceMembers, implementation, memberName, value, memberType, cstrName) => {
+ try {
+ if (isValidMemberName(memberName) && isNaN(memberName[0]) && "all" !== memberName) {
+ value = implementation[memberName];
+ memberType = typeof value;
+ if ("function" === memberType) {
+ (String(value).includes("[native") || Object.getPrototypeOf(implementation)[memberName]) && interfaceMembers.push([ memberName, 5 ]);
+ } else if ("object" === memberType && null != value) {
+ cstrName = getConstructorName(value);
+ "Object" !== cstrName && self[cstrName] && interfaceMembers.push([ memberName, value.nodeType || cstrName ]);
+ } else {
+ "symbol" !== memberType && (memberName.toUpperCase() === memberName ? interfaceMembers.push([ memberName, 6, value ]) : interfaceMembers.push([ memberName, 6 ]));
+ }
+ }
+ } catch (e) {
+ console.warn(e);
+ }
+ };
+ const readStorage = storageName => {
+ let items = [];
+ let i = 0;
+ let l = len(mainWindow[storageName]);
+ let key;
+ for (;i < l; i++) {
+ key = mainWindow[storageName].key(i);
+ items.push([ key, mainWindow[storageName].getItem(key) ]);
+ }
+ return items;
+ };
+ const getGlobalConstructor = (mainWindow, cstrName) => void 0 !== mainWindow[cstrName] ? new mainWindow[cstrName](noop) : 0;
+ const addGlobalConstructorUsingPrototype = ($interfaces$, mainWindow, cstrName) => {
+ void 0 !== mainWindow[cstrName] && $interfaces$.push([ cstrName, "Object", Object.keys(mainWindow[cstrName].prototype).map((propName => [ propName, 6 ])), 12 ]);
+ };
+ let worker;
+ (receiveMessage => {
+ const swContainer = window.navigator.serviceWorker;
+ return swContainer.getRegistration().then((swRegistration => {
+ swContainer.addEventListener("message", (ev => receiveMessage(ev.data, (accessRsp => swRegistration.active && swRegistration.active.postMessage(accessRsp)))));
+ return (worker, msg) => {
+ 0 === msg[0] ? worker.postMessage([ 1, readMainPlatform() ]) : 2 === msg[0] ? worker.postMessage([ 3, readMainInterfaces() ]) : onMessageFromWebWorker(worker, msg);
+ };
+ }));
+ })(((accessReq, responseCallback) => mainAccessHandler(worker, accessReq).then(responseCallback))).then((onMessageHandler => {
+ if (onMessageHandler) {
+ worker = new Worker(libPath + "partytown-ww-sw.js?v=0.7.6", {
+ name: "Partytown 🎉"
+ });
+ worker.onmessage = ev => {
+ const msg = ev.data;
+ 12 === msg[0] ? mainAccessHandler(worker, msg[1]) : onMessageHandler(worker, msg);
+ };
+ logMain("Created Partytown web worker (0.7.6)");
+ worker.onerror = ev => console.error("Web Worker Error", ev);
+ mainWindow.addEventListener("pt1", (ev => registerWindow(worker, getAndSetInstanceId(ev.detail.frameElement), ev.detail)));
+ }
+ }));
+})(window);
diff --git a/~partytown/debug/partytown-sw.js b/~partytown/debug/partytown-sw.js
new file mode 100644
index 0000000..d989f8a
--- /dev/null
+++ b/~partytown/debug/partytown-sw.js
@@ -0,0 +1,59 @@
+/* Partytown 0.7.6 - MIT builder.io */
+const resolves = new Map;
+
+const swMessageError = (accessReq, $error$) => ({
+ $msgId$: accessReq.$msgId$,
+ $error$: $error$
+});
+
+const httpRequestFromWebWorker = req => new Promise((async resolve => {
+ const accessReq = await req.clone().json();
+ const responseData = await (accessReq => new Promise((async resolve => {
+ const clients = await self.clients.matchAll();
+ const client = [ ...clients ].sort(((a, b) => a.url > b.url ? -1 : a.url < b.url ? 1 : 0))[0];
+ if (client) {
+ const timeout = 12e4;
+ const msgResolve = [ resolve, setTimeout((() => {
+ resolves.delete(accessReq.$msgId$);
+ resolve(swMessageError(accessReq, "Timeout"));
+ }), timeout) ];
+ resolves.set(accessReq.$msgId$, msgResolve);
+ client.postMessage(accessReq);
+ } else {
+ resolve(swMessageError(accessReq, "NoParty"));
+ }
+ })))(accessReq);
+ resolve(response(JSON.stringify(responseData), "application/json"));
+}));
+
+const response = (body, contentType) => new Response(body, {
+ headers: {
+ "content-type": contentType || "text/html",
+ "Cache-Control": "no-store"
+ }
+});
+
+self.oninstall = () => self.skipWaiting();
+
+self.onactivate = () => self.clients.claim();
+
+self.onmessage = ev => {
+ const accessRsp = ev.data;
+ const r = resolves.get(accessRsp.$msgId$);
+ if (r) {
+ resolves.delete(accessRsp.$msgId$);
+ clearTimeout(r[1]);
+ r[0](accessRsp);
+ }
+};
+
+self.onfetch = ev => {
+ const req = ev.request;
+ const url = new URL(req.url);
+ const pathname = url.pathname;
+ if (pathname.endsWith("sw.html")) {
+ ev.respondWith(response('