import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
if (typeof window !== "undefined") {
    require("requestidlecallback-polyfill");
}
require("core-js/proposals/iterator-helpers");
import React from "react";
import jsx from "react/jsx-runtime";
import jsxDev from "react/jsx-dev-runtime";
import * as emotionJsx from "@emotion/react/jsx-runtime";
import * as emotionJsxDev from "@emotion/react/jsx-dev-runtime";
import styled from "@emotion/styled";
import * as Emotion from "@emotion/react";
import ReactDOM from "react-dom";
import { ChakraProvider, extendTheme } from "@chakra-ui/react";
import Head from "next/head";
import Script from "next/script";
import * as Sentry from "@sentry/react";
import { Integrations } from "@sentry/tracing";
import { Global, css, CacheProvider } from "@emotion/react";
import createCache from "@emotion/cache";
import memoize from "@emotion/memoize";
import stylisPluginExtraScope from "stylis-plugin-extra-scope";
import "@fontsource/inter/400.css";
import "@fontsource/inter/600.css";
import "@fontsource/inter";
import "focus-visible/dist/focus-visible";
import Loading from "../app/components/Loading";
import ErrorBoundary from "../app/ErrorBoundary";
if (typeof window !== "undefined") {
    window.React = React;
    window.ReactDOM = ReactDOM;
    // @ts-ignore
    window.ReactJSXDev = jsxDev;
    // @ts-ignore
    window.ReactJSX = jsx;
    // @ts-ignore
    window.EmotionJSX = emotionJsx;
    // @ts-ignore
    window.EmotionJSXDev = emotionJsxDev;
    // @ts-ignore
    window.styled = styled;
    // @ts-ignore
    window.Emotion = Emotion;
    Sentry.init({
        dsn: "https://fb21c998ebf543f686baea551803f6e3@o264435.ingest.sentry.io/6508644",
        integrations: [new Integrations.BrowserTracing()],
        // Set tracesSampleRate to 1.0 to capture 100%
        // of transactions for performance monitoring.
        // We recommend adjusting this value in production
        tracesSampleRate: 1.0,
        enabled: process.env.NODE_ENV === "production",
    });
}
const memoizedCreateCacheWithScope = memoize((scope) => {
    return createCache({
        key: "editor",
        stylisPlugins: [stylisPluginExtraScope(scope)],
    });
});
export const ScopeProvider = (props) => {
    return (_jsx(CacheProvider, Object.assign({ value: memoizedCreateCacheWithScope(props.scope) }, { children: props.children })));
};
const theme = extendTheme({
    styles: {
        global: {
            body: {
                color: "#171717",
                fontSize: "sm",
            },
        },
    },
    fonts: {
        heading: `'Inter', sans-serif`,
        body: `'Inter', sans-serif`,
    },
    fontSizes: {
        xs: "11px",
        sm: "12px",
        reg: "14px",
        md: "16px",
        lg: "20px",
        xl: "24px",
    },
    colors: {
        brand: {
            "50": "#E5F0FF",
            "100": "#B8D4FF",
            "200": "#8AB8FF",
            "300": "#5C9CFF",
            "400": "#2E81FF",
            "500": "#0065FF",
            "600": "#0051CC",
            "700": "#003D99",
            "800": "#002866",
            "900": "#001433",
        },
        blue: {
            "50": "#E5F0FF",
            "100": "#B8D4FF",
            "200": "#8AB8FF",
            "300": "#5C9CFF",
            "400": "#2E81FF",
            "500": "#0065FF",
            "600": "#0051CC",
            "700": "#003D99",
            "800": "#002866",
            "900": "#001433",
        },
        red: {
            "50": "#FCE9EA",
            "100": "#F6C1C3",
            "200": "#F0999D",
            "300": "#EA7176",
            "400": "#E4494F",
            "500": "#DE2129",
            "600": "#B11B21",
            "700": "#851419",
            "800": "#590D10",
            "900": "#2C0708",
        },
        orange: {
            "50": "#FEF1E6",
            "100": "#FED9B9",
            "200": "#FDC08C",
            "300": "#FCA85F",
            "400": "#FB8F32",
            "500": "#FA7705",
            "600": "#C85F04",
            "700": "#964703",
            "800": "#642F02",
            "900": "#321801",
        },
        yellow: {
            "50": "#FEFAE7",
            "100": "#FCF1BB",
            "200": "#F9E88F",
            "300": "#F7DF64",
            "400": "#F5D638",
            "500": "#F3CD0C",
            "600": "#C2A40A",
            "700": "#927B07",
            "800": "#615205",
            "900": "#312902",
        },
        green: {
            "50": "#ECFAEA",
            "100": "#CBF2C5",
            "200": "#A9EA9F",
            "300": "#87E179",
            "400": "#66D954",
            "500": "#44D12E",
            "600": "#37A725",
            "700": "#297D1C",
            "800": "#1B5313",
            "900": "#0E2A09",
        },
        purple: {
            "50": "#F1E5FF",
            "100": "#D7B8FF",
            "200": "#BD8AFF",
            "300": "#A35CFF",
            "400": "#892EFF",
            "500": "#6F00FF",
            "600": "#5900CC",
            "700": "#430099",
            "800": "#2C0066",
            "900": "#160033",
        },
    },
    components: {
        FormLabel: {
            baseStyle: {
                fontSize: "sm",
            },
        },
    },
});
export default function App({ Component, pageProps }) {
    return (_jsx(ScopeProvider, Object.assign({ scope: "#__next" }, { children: _jsxs(ChakraProvider, Object.assign({ theme: theme, cssVarsRoot: "body" }, { children: [_jsx(Script, { async: true, src: "https://ga.jspm.io/npm:es-module-shims@1.6.1/dist/es-module-shims.js" }), _jsx(Head, { children: _jsx("title", { children: "Qore Apps" }) }), _jsx(Global, { styles: css `
            body {
              overflow-y: hidden;
            }
            .js-focus-visible :focus:not([data-focus-visible-added]) {
              outline: none;
              box-shadow: none;
            }
          ` }), _jsx(Loading, {}), _jsx(ErrorBoundary, { children: _jsx(Component, Object.assign({}, pageProps)) })] })) })));
}
//# sourceMappingURL=_app.js.map