diff --git a/.gitignore b/.gitignore index 20609ec..e32ec8c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ lerna-debug.log* # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +tmp + # Runtime data pids *.pid diff --git a/scripts/cache-package.ts b/scripts/cache-package.ts index afb4b5c..5946b25 100644 --- a/scripts/cache-package.ts +++ b/scripts/cache-package.ts @@ -10,7 +10,7 @@ export default function useCachePackage(cli: CAC) { .command('cache', 'cache current workspace packages to cache directory') .option('-p,--preserve', 'preserve when package cache directory exists') .option('--no-preserve', 'override exist package cache') - .action(async (options: { preserve: boolean }) => { + .action(async ({ preserve = true }: { preserve: boolean }) => { fs.ensureDirSync(CLIUtils.resolvedPackageRootDir); const existPackages = CLIUtils.existPackages; @@ -18,23 +18,26 @@ export default function useCachePackage(cli: CAC) { const projectSrcPath = CLIUtils.resolvePackageDir(p); const projectDestPath = CLIUtils.resolveCachePackageDir(p); - if (fs.existsSync(projectDestPath) && options.preserve) { + if (fs.existsSync(projectDestPath) && preserve) { consola.info( - `[Skip]Cached package ${chalk.green(p)} will be preserved.` + `[Skip] Cached package ${chalk.green(p)} will be preserved.` ); continue; } - fs.copySync(projectSrcPath, projectDestPath, { - recursive: true, - filter: (src, dest) => { - const filtered = ['node_modules', 'dist', 'tmp'].every( - (pattern) => !src.includes(pattern) - ); + CLIUtils.copySyncWithFilter(projectSrcPath, projectDestPath); - return filtered; - }, - }); + const projectFixtureCachePath = + CLIUtils.resolveFixtureCachePackageDir(p); + + CLIUtils.copySyncWithFilter( + projectSrcPath, + projectFixtureCachePath, + undefined, + { + overwrite: true, + } + ); consola.success(`Package ${chalk.green(p)} cached.`); } diff --git a/scripts/utils.ts b/scripts/utils.ts index 7ba8596..2234395 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -1,5 +1,5 @@ import consola from 'consola'; -import fs, { Mode } from 'fs-extra'; +import fs, { CopyOptionsSync, Mode } from 'fs-extra'; import { EOL } from 'os'; import path from 'path'; import execa from 'execa'; @@ -34,6 +34,10 @@ export class Constants { return path.resolve(Constants.cacheDir, 'packages'); } + public static get fixedPackagesCacheDir() { + return path.resolve(Constants.cacheDir, 'fixture-packages'); + } + public static get internalRegistry() { return 'https://registry.npmmirror.com'; } @@ -80,10 +84,6 @@ export class Constants { } } -type Tmp = { - Name: string[]; -}; - export class CLIUtils { public static get existPackages() { return fs.readdirSync( @@ -113,6 +113,10 @@ export class CLIUtils { return path.resolve(__dirname, '../', Constants.packagesCacheDir, p); } + public static resolveFixtureCachePackageDir(p: string) { + return path.resolve(__dirname, '../', Constants.fixedPackagesCacheDir, p); + } + public static existWorkspacePackageFilter(projects: string[], blur = false) { const existPackages = CLIUtils.existPackages; @@ -127,6 +131,20 @@ export class CLIUtils { : matched; } + public static copySyncWithFilter( + src: string, + dest: string, + pathFragmentsFilter: string[] = ['node_modules', 'dist', 'tmp'], + copyOptions: CopyOptionsSync = {} + ) { + fs.copySync(src, dest, { + filter: (src, dest) => + pathFragmentsFilter.every((pattern) => !src.includes(pattern)), + recursive: true, + ...copyOptions, + }); + } + public static findInfoFromKeywords(input: string) { const inputFragment = input.split('-'); for (const info of Object.values(Constants.starterInfoMap)) { diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/.gitignore b/tmp/.LinbuduLab/packages/astro-docs-starter/.gitignore deleted file mode 100644 index c824674..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# build output -dist - -# dependencies -node_modules/ - -# logs -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# environment variables -.env -.env.production - -# macOS-specific files -.DS_Store diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/.npmrc b/tmp/.LinbuduLab/packages/astro-docs-starter/.npmrc deleted file mode 100644 index ef83021..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -# Expose Astro dependencies for `pnpm` users -shamefully-hoist=true diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/.stackblitzrc b/tmp/.LinbuduLab/packages/astro-docs-starter/.stackblitzrc deleted file mode 100644 index 43798ec..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/.stackblitzrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "startCommand": "npm start", - "env": { - "ENABLE_CJS_IMPORTS": true - } -} \ No newline at end of file diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/README.md b/tmp/.LinbuduLab/packages/astro-docs-starter/README.md deleted file mode 100644 index 847db8d..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/README.md +++ /dev/null @@ -1,169 +0,0 @@ -# Astro Starter Kit: Docs Site - -``` -npm init astro -- --template docs -``` - -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/docs) - -## Features - -- ✅ **Full Markdown support** -- ✅ **Responsive mobile-friendly design** -- ✅ **Sidebar navigation** -- ✅ **Search (powered by Algolia)** -- ✅ **Multi-language i18n** -- ✅ **Automatic table of contents** -- ✅ **Automatic list of contributors** -- ✅ (and, best of all) **dark mode** - -## Commands Cheatsheet - -All commands are run from the root of the project, from a terminal: - -| Command | Action | -|:---------------- |:-------------------------------------------- | -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | -| `npm run build` | Build your production site to `./dist/` | -| `npm run preview` | Preview your build locally, before deploying | - -To deploy your site to production, check out our [Deploy an Astro Website](https://docs.astro.build/guides/deploy) guide. - -## New to Astro? - -Welcome! Check out [our documentation](https://github.com/withastro/astro) or jump into our [Discord server](https://astro.build/chat). - - -## Customize This Theme - -### Site metadata - -`src/config.ts` contains several data objects that describe metadata about your site like title, description, default language, and Open Graph details. You can customize these to match your project. -### CSS styling - -The theme's look and feel is controlled by a few key variables that you can customize yourself. You'll find them in the `public/theme.css` CSS file. - -If you've never worked with CSS variables before, give [MDN's guide on CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) a quick read. - -This theme uses a "cool blue" accent color by default. To customize this for your project, change the `--theme-accent` variable to whatever color you'd like: - -```diff -/* public/theme.css */ -:root { - color-scheme: light; -- --theme-accent: hsla(var(--color-blue), 1); -+ --theme-accent: hsla(var(--color-red), 1); /* or: hsla(#FF0000, 1); */ -``` - -## Page metadata - -Astro uses frontmatter in Markdown pages to choose layouts and pass properties to those layouts. If you are using the default layout, you can customize the page in many different ways to optimize SEO and other things. For example, you can use the `title` and `description` properties to set the document title, meta title, meta description, and Open Graph description. - -```markdown ---- -title: Example title -description: Really cool docs example that uses Astro -layout: ../../layouts/MainLayout.astro ---- - -# Page content... -``` - -For more SEO related properties, look at `src/components/HeadSEO.astro` - - -### Sidebar navigation - -The sidebar navigation is controlled by the `SIDEBAR` variable in your `src/config.ts` file. You can customize the sidebar by modifying this object. A default, starter navigation has already been created for you. - -```ts -export const SIDEBAR = { - en: [ - { text: 'Section Header', header: true, }, - { text: 'Introduction', link: 'en/introduction' }, - { text: 'Page 2', link: 'en/page-2' }, - { text: 'Page 3', link: 'en/page-3' }, - - { text: 'Another Section', header: true }, - { text: 'Page 4', link: 'en/page-4' }, - ], -}; -``` - -Note the top-level `en` key: This is needed for multi-language support. You can change it to whatever language you'd like, or add new languages as you go. More details on this below. - -### Multiple Languages support - -The Astro docs template supports multiple langauges out of the box. The default theme only shows `en` documentation, but you can enable multi-language support features by adding a second language to your project. - -To add a new language to your project, you'll want to extend the current `src/pages/[lang]/...` layout: - -```diff - 📂 src/pages - ┣ 📂 en - ┃ ┣ 📜 page-1.md - ┃ ┣ 📜 page-2.md - ┃ ┣ 📜 page-3.astro -+ ┣ 📂 es -+ ┃ ┣ 📜 page-1.md -+ ┃ ┣ 📜 page-2.md -+ ┃ ┣ 📜 page-3.astro -``` - -You'll also need to add the new language name to the `KNOWN_LANGUAGES` map in your `src/config.ts` file. This will enable your new language switcher in the site header. - -```diff -// src/config.ts -export const KNOWN_LANGUAGES = { - English: 'en', -+ Spanish: 'es', -}; -``` - -Last step: you'll need to add a new entry to your sidebar, to create the table of contents for that language. While duplicating every page might not sound ideal to everyone, this extra control allows you to create entirely custom content for every language. - -> Make sure the sidebar `link` value points to the correct language! - -```diff -// src/config.ts -export const SIDEBAR = { - en: [ - { text: 'Section Header', header: true, }, - { text: 'Introduction', link: 'en/introduction' }, - // ... - ], -+ es: [ -+ { text: 'Encabezado de sección', header: true, }, -+ { text: 'Introducción', link: 'es/introduction' }, -+ // ... -+ ], -}; - -// ... -``` - -If you plan to use Spanish as the the default language, you just need to modify the redirect path in `src/pages/index.astro`: - -```diff - -``` - -You can also remove the above script and write a landing page in Spanish instead. - -### What if I don't plan to support multiple languages? - -That's totally fine! Not all projects need (or can support) multiple languages. You can continue to use this theme without ever adding a second language. - -If that single language is not English, you can just replace `en` in directory layouts and configurations with the preferred language. - -### Search (Powered by Algolia) - -[Algolia](https://www.algolia.com/) offers a free service to qualified open source projects called [DocSearch](https://docsearch.algolia.com/). If you are accepted to the DocSearch program, provide your API Key & index name in `src/config.ts` and a search box will automatically appear in your site header. - -Note that Aglolia and Astro are not affiliated. We have no say over acceptance to the DocSearch program. - -If you'd prefer to remove Algolia's search and replace it with your own, check out the `src/components/Header.astro` component to see where the component is added. \ No newline at end of file diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/astro.config.mjs b/tmp/.LinbuduLab/packages/astro-docs-starter/astro.config.mjs deleted file mode 100644 index 075ab81..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/astro.config.mjs +++ /dev/null @@ -1,17 +0,0 @@ -// Full Astro Configuration API Documentation: -// https://docs.astro.build/reference/configuration-reference - -// @type-check enabled! -// VSCode and other TypeScript-enabled text editors will provide auto-completion, -// helpful tooltips, and warnings if your exported object is invalid. -// You can disable this by removing "@ts-check" and `@type` comments below. - -// @ts-check -export default /** @type {import('astro').AstroUserConfig} */ ({ - renderers: [ - // Enable the Preact renderer to support Preact JSX components. - '@astrojs/renderer-preact', - // Enable the React renderer, for the Algolia search component - '@astrojs/renderer-react', - ], -}); diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/package.json b/tmp/.LinbuduLab/packages/astro-docs-starter/package.json deleted file mode 100644 index 3994e9c..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@example/docs", - "version": "0.0.1", - "private": true, - "scripts": { - "dev": "astro dev", - "start": "astro dev", - "build": "astro build", - "preview": "astro preview" - }, - "dependencies": { - "@algolia/client-search": "^4.13.0", - "@docsearch/css": "^3.0.0", - "@docsearch/react": "^3.0.0", - "@types/react": "^17.0.40", - "react": "^17.0.2", - "react-dom": "^17.0.2" - }, - "devDependencies": { - "@astrojs/renderer-preact": "^0.5.0", - "@astrojs/renderer-react": "^0.5.0", - "astro": "^0.24.2" - } -} diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/public/default-og-image.png b/tmp/.LinbuduLab/packages/astro-docs-starter/public/default-og-image.png deleted file mode 100644 index 9790320..0000000 Binary files a/tmp/.LinbuduLab/packages/astro-docs-starter/public/default-og-image.png and /dev/null differ diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/public/favicon.ico b/tmp/.LinbuduLab/packages/astro-docs-starter/public/favicon.ico deleted file mode 100644 index 578ad45..0000000 Binary files a/tmp/.LinbuduLab/packages/astro-docs-starter/public/favicon.ico and /dev/null differ diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/public/make-scrollable-code-focusable.js b/tmp/.LinbuduLab/packages/astro-docs-starter/public/make-scrollable-code-focusable.js deleted file mode 100644 index f2b7030..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/public/make-scrollable-code-focusable.js +++ /dev/null @@ -1,3 +0,0 @@ -Array.from(document.getElementsByTagName('pre')).forEach((element) => { - element.setAttribute('tabindex', '0'); -}); diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/sandbox.config.json b/tmp/.LinbuduLab/packages/astro-docs-starter/sandbox.config.json deleted file mode 100644 index 9178af7..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 3000, - "startScript": "start", - "node": "14" - } -} diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Footer/AvatarList.astro b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Footer/AvatarList.astro deleted file mode 100644 index c57ee2e..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Footer/AvatarList.astro +++ /dev/null @@ -1,149 +0,0 @@ ---- -// fetch all commits for just this page's path -const path = 'docs/' + Astro.props.path; -const url = `https://api.github.com/repos/withastro/astro/commits?path=${path}`; -const commitsURL = `https://github.com/withastro/astro/commits/main/${path}`; - -async function getCommits(url) { - try { - const token = import.meta.env.SNOWPACK_PUBLIC_GITHUB_TOKEN; - if (!token) { - throw new Error('Cannot find "SNOWPACK_PUBLIC_GITHUB_TOKEN" used for escaping rate-limiting.'); - } - - const auth = `Basic ${Buffer.from(token, 'binary').toString('base64')}`; - - const res = await fetch(url, { - method: 'GET', - headers: { - Authorization: auth, - 'User-Agent': 'astro-docs/1.0', - }, - }); - - const data = await res.json(); - - if (!res.ok) { - throw new Error( - `Request to fetch commits failed. Reason: ${res.statusText} - Message: ${data.message}` - ); - } - - return data; - } catch (e) { - console.warn(`[error] /src/components/AvatarList.astro - ${e?.message ?? e}`); - return new Array(); - } -} - -function removeDups(arr) { - if (!arr) { - return new Array(); - } - let map = new Map(); - - for (let item of arr) { - let author = item.author; - // Deduplicate based on author.id - map.set(author.id, { login: author.login, id: author.id }); - } - - return Array.from(map.values()); -} - -const data = await getCommits(url); -const unique = removeDups(data); -const recentContributors = unique.slice(0, 3); // only show avatars for the 3 most recent contributors -const additionalContributors = unique.length - recentContributors.length; // list the rest of them as # of extra contributors ---- - - -
- - {additionalContributors > 0 && ( - - {`and ${additionalContributors} additional contributor${additionalContributors > 1 ? 's' : ''}.`} - - )} - {unique.length === 0 && Contributors} -
- - diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Footer/Footer.astro b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Footer/Footer.astro deleted file mode 100644 index d13f832..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Footer/Footer.astro +++ /dev/null @@ -1,16 +0,0 @@ ---- -import AvatarList from './AvatarList.astro'; -const { path } = Astro.props; ---- - - - - diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/HeadCommon.astro b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/HeadCommon.astro deleted file mode 100644 index 4906aaf..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/HeadCommon.astro +++ /dev/null @@ -1,42 +0,0 @@ ---- -import '../styles/theme.css'; -import '../styles/code.css'; -import '../styles/index.css'; ---- - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/HeadSEO.astro b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/HeadSEO.astro deleted file mode 100644 index 003872b..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/HeadSEO.astro +++ /dev/null @@ -1,41 +0,0 @@ ---- -import { SITE, OPEN_GRAPH } from '../config.ts'; -export interface Props { - content: any; - site: any; - canonicalURL: URL | string; -} -const { content = {}, canonicalURL } = Astro.props; -const formattedContentTitle = content.title ? `${content.title} 🚀 ${SITE.title}` : SITE.title; -const imageSrc = content?.image?.src ?? OPEN_GRAPH.image.src; -const canonicalImageSrc = new URL(imageSrc, Astro.site); -const imageAlt = content?.image?.alt ?? OPEN_GRAPH.image.alt; ---- - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/AstroLogo.astro b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/AstroLogo.astro deleted file mode 100644 index 7d6891d..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/AstroLogo.astro +++ /dev/null @@ -1,27 +0,0 @@ ---- -const { size } = Astro.props; ---- - - diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/Header.astro b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/Header.astro deleted file mode 100644 index 7dcbb98..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/Header.astro +++ /dev/null @@ -1,137 +0,0 @@ ---- -import { getLanguageFromURL, KNOWN_LANGUAGE_CODES } from '../../languages.ts'; -import * as CONFIG from '../../config.ts'; -import AstroLogo from './AstroLogo.astro'; -import SkipToContent from './SkipToContent.astro'; -import SidebarToggle from './SidebarToggle.tsx'; -import LanguageSelect from './LanguageSelect.tsx'; -import Search from './Search.tsx'; - -const { currentPage } = Astro.props; -const lang = currentPage && getLanguageFromURL(currentPage); ---- - -
- - -
- - diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/LanguageSelect.css b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/LanguageSelect.css deleted file mode 100644 index 9e0ae7c..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/LanguageSelect.css +++ /dev/null @@ -1,47 +0,0 @@ -.language-select { - flex-grow: 1; - width: 48px; - box-sizing: border-box; - margin: 0; - padding: 0.33em 0.5em; - overflow: visible; - font-weight: 500; - font-size: 1rem; - font-family: inherit; - line-height: inherit; - background-color: var(--theme-bg); - border-color: var(--theme-text-lighter); - color: var(--theme-text-light); - border-style: solid; - border-width: 1px; - border-radius: 0.25rem; - outline: 0; - cursor: pointer; - transition-timing-function: ease-out; - transition-duration: 0.2s; - transition-property: border-color, color; - -webkit-font-smoothing: antialiased; - padding-left: 30px; - padding-right: 1rem; -} -.language-select-wrapper .language-select:hover, -.language-select-wrapper .language-select:focus { - color: var(--theme-text); - border-color: var(--theme-text-light); -} -.language-select-wrapper { - color: var(--theme-text-light); - position: relative; -} -.language-select-wrapper > svg { - position: absolute; - top: 7px; - left: 10px; - pointer-events: none; -} - -@media (min-width: 50em) { - .language-select { - width: 100%; - } -} diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/LanguageSelect.tsx b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/LanguageSelect.tsx deleted file mode 100644 index 7fd3af2..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/LanguageSelect.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import type { FunctionalComponent } from 'preact'; -import { h } from 'preact'; -import './LanguageSelect.css'; -import { KNOWN_LANGUAGES, langPathRegex } from '../../languages'; - -const LanguageSelect: FunctionalComponent<{ lang: string }> = ({ lang }) => { - return ( -
- - -
- ); -}; - -export default LanguageSelect; diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/Search.css b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/Search.css deleted file mode 100644 index 9a0c7f3..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/Search.css +++ /dev/null @@ -1,76 +0,0 @@ -/** Style Algolia */ -:root { - --docsearch-primary-color: var(--theme-accent); - --docsearch-logo-color: var(--theme-text); -} -.search-input { - flex-grow: 1; - box-sizing: border-box; - width: 100%; - margin: 0; - padding: 0.33em 0.5em; - overflow: visible; - font-weight: 500; - font-size: 1rem; - font-family: inherit; - line-height: inherit; - background-color: var(--theme-divider); - border-color: var(--theme-divider); - color: var(--theme-text-light); - border-style: solid; - border-width: 1px; - border-radius: 0.25rem; - outline: 0; - cursor: pointer; - transition-timing-function: ease-out; - transition-duration: 0.2s; - transition-property: border-color, color; - -webkit-font-smoothing: antialiased; -} -.search-input:hover, -.search-input:focus { - color: var(--theme-text); - border-color: var(--theme-text-light); -} -.search-input:hover::placeholder, -.search-input:focus::placeholder { - color: var(--theme-text-light); -} -.search-input::placeholder { - color: var(--theme-text-light); -} -.search-hint { - position: absolute; - top: 7px; - right: 19px; - padding: 3px 5px; - display: none; - display: none; - align-items: center; - justify-content: center; - letter-spacing: 0.125em; - font-size: 13px; - font-family: var(--font-mono); - pointer-events: none; - border-color: var(--theme-text-lighter); - color: var(--theme-text-light); - border-style: solid; - border-width: 1px; - border-radius: 0.25rem; - line-height: 14px; -} - -@media (min-width: 50em) { - .search-hint { - display: flex; - } -} - -/* ------------------------------------------------------------ *\ - DocSearch (Algolia) -\* ------------------------------------------------------------ */ - -.DocSearch-Modal .DocSearch-Hit a { - box-shadow: none; - border: 1px solid var(--theme-accent); -} diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/Search.tsx b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/Search.tsx deleted file mode 100644 index ebc563c..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/Search.tsx +++ /dev/null @@ -1,80 +0,0 @@ -/* jsxImportSource: react */ -import { useState, useCallback, useRef } from 'react'; -import { createPortal } from 'react-dom'; -import * as docSearchReact from '@docsearch/react'; -import * as CONFIG from '../../config'; -import '@docsearch/css/dist/style.css'; -import './Search.css'; - -const { DocSearchModal, useDocSearchKeyboardEvents } = docSearchReact.default; - -export default function Search() { - const [isOpen, setIsOpen] = useState(false); - const searchButtonRef = useRef(); - const [initialQuery, setInitialQuery] = useState(null); - - const onOpen = useCallback(() => { - setIsOpen(true); - }, [setIsOpen]); - - const onClose = useCallback(() => { - setIsOpen(false); - }, [setIsOpen]); - - const onInput = useCallback( - (e) => { - setIsOpen(true); - setInitialQuery(e.key); - }, - [setIsOpen, setInitialQuery] - ); - - useDocSearchKeyboardEvents({ - isOpen, - onOpen, - onClose, - onInput, - searchButtonRef, - }); - - return ( - <> - - {isOpen && - createPortal( - { - return items.map((item) => { - // We transform the absolute URL into a relative URL to - // work better on localhost, preview URLS. - const a = document.createElement('a'); - a.href = item.url; - const hash = a.hash === '#overview' ? '' : a.hash; - return { - ...item, - url: `${a.pathname}${hash}`, - }; - }); - }} - />, - document.body - )} - - ); -} diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/SidebarToggle.tsx b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/SidebarToggle.tsx deleted file mode 100644 index 90b1804..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/SidebarToggle.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import type { FunctionalComponent } from 'preact'; -import { h, Fragment } from 'preact'; -import { useState, useEffect } from 'preact/hooks'; - -const MenuToggle: FunctionalComponent = () => { - const [sidebarShown, setSidebarShown] = useState(false); - - useEffect(() => { - const body = document.getElementsByTagName('body')[0]; - if (sidebarShown) { - body.classList.add('mobile-sidebar-toggle'); - } else { - body.classList.remove('mobile-sidebar-toggle'); - } - }, [sidebarShown]); - - return ( - - ); -}; - -export default MenuToggle; diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/SkipToContent.astro b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/SkipToContent.astro deleted file mode 100644 index 9e3844e..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/Header/SkipToContent.astro +++ /dev/null @@ -1,22 +0,0 @@ - - - diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/LeftSidebar/LeftSidebar.astro b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/LeftSidebar/LeftSidebar.astro deleted file mode 100644 index 99a0321..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/LeftSidebar/LeftSidebar.astro +++ /dev/null @@ -1,118 +0,0 @@ ---- -import { getLanguageFromURL } from '../../languages.ts'; -import { SIDEBAR } from '../../config.ts'; -const { currentPage } = Astro.props; -const currentPageMatch = currentPage.slice(1); -const langCode = getLanguageFromURL(currentPage); -// SIDEBAR is a flat array. Group it by sections to properly render. -const sidebarSections = SIDEBAR[langCode].reduce((col, item, i) => { - // If the first item is not a section header, create a new container section. - if (i === 0) { - if (!item.header) { - const pesudoSection = { text: "" }; - col.push({ ...pesudoSection, children: [] }); - } - } - if (item.header) { - col.push({ ...item, children: [] }); - } else { - col[col.length - 1].children.push(item); - } - return col; -}, []); ---- - - - - - - diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/PageContent/PageContent.astro b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/PageContent/PageContent.astro deleted file mode 100644 index 32db5cd..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/PageContent/PageContent.astro +++ /dev/null @@ -1,44 +0,0 @@ ---- -import MoreMenu from '../RightSidebar/MoreMenu.astro'; -import TableOfContents from '../RightSidebar/TableOfContents.tsx'; - -const { content, githubEditUrl } = Astro.props; -const title = content.title; -const headers = content.astro.headers; ---- - -
-
-

{title}

- - -
- -
- - diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/RightSidebar/MoreMenu.astro b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/RightSidebar/MoreMenu.astro deleted file mode 100644 index 649e02c..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/RightSidebar/MoreMenu.astro +++ /dev/null @@ -1,70 +0,0 @@ ---- -import ThemeToggleButton from './ThemeToggleButton.tsx'; -import * as CONFIG from '../../config'; -const { editHref } = Astro.props; -const showMoreSection = CONFIG.COMMUNITY_INVITE_URL || editHref; ---- - -{showMoreSection &&

More

} - -
- -
- - diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/RightSidebar/RightSidebar.astro b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/RightSidebar/RightSidebar.astro deleted file mode 100644 index a0b5779..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/RightSidebar/RightSidebar.astro +++ /dev/null @@ -1,27 +0,0 @@ ---- -import TableOfContents from './TableOfContents.tsx'; -import MoreMenu from './MoreMenu.astro'; -const { content, githubEditUrl } = Astro.props; -const headers = content.astro.headers; ---- - - - - diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/RightSidebar/TableOfContents.tsx b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/RightSidebar/TableOfContents.tsx deleted file mode 100644 index 578d2aa..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/RightSidebar/TableOfContents.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import type { FunctionalComponent } from 'preact'; -import { h, Fragment } from 'preact'; -import { useState, useEffect, useRef } from 'preact/hooks'; - -const TableOfContents: FunctionalComponent<{ headers: any[] }> = ({ headers = [] }) => { - const itemOffsets = useRef([]); - const [activeId, setActiveId] = useState(undefined); - - useEffect(() => { - const getItemOffsets = () => { - const titles = document.querySelectorAll('article :is(h1, h2, h3, h4)'); - itemOffsets.current = Array.from(titles).map((title) => ({ - id: title.id, - topOffset: title.getBoundingClientRect().top + window.scrollY, - })); - }; - - getItemOffsets(); - window.addEventListener('resize', getItemOffsets); - - return () => { - window.removeEventListener('resize', getItemOffsets); - }; - }, []); - - return ( - <> -

On this page

-
    - - {headers - .filter(({ depth }) => depth > 1 && depth < 4) - .map((header) => ( - - ))} -
- - ); -}; - -export default TableOfContents; diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/RightSidebar/ThemeToggleButton.css b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/RightSidebar/ThemeToggleButton.css deleted file mode 100644 index dc5ba46..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/RightSidebar/ThemeToggleButton.css +++ /dev/null @@ -1,37 +0,0 @@ -.theme-toggle { - display: inline-flex; - align-items: center; - gap: 0.25em; - padding: 0.33em 0.67em; - border-radius: 99em; - background-color: var(--theme-code-inline-bg); -} - -.theme-toggle > label:focus-within { - outline: 2px solid transparent; - box-shadow: 0 0 0 0.08em var(--theme-accent), 0 0 0 0.12em white; -} - -.theme-toggle > label { - color: var(--theme-code-inline-text); - position: relative; - display: flex; - align-items: center; - justify-content: center; - opacity: 0.5; -} - -.theme-toggle .checked { - color: var(--theme-accent); - opacity: 1; -} - -input[name='theme-toggle'] { - position: absolute; - opacity: 0; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: -1; -} diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/RightSidebar/ThemeToggleButton.tsx b/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/RightSidebar/ThemeToggleButton.tsx deleted file mode 100644 index 6bdf45f..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/components/RightSidebar/ThemeToggleButton.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import type { FunctionalComponent } from 'preact'; -import { h, Fragment } from 'preact'; -import { useState, useEffect } from 'preact/hooks'; -import './ThemeToggleButton.css'; - -const themes = ['light', 'dark']; - -const icons = [ - - - , - - - , -]; - -const ThemeToggle: FunctionalComponent = () => { - const [theme, setTheme] = useState(() => { - if (import.meta.env.SSR) { - return undefined; - } - if (typeof localStorage !== 'undefined' && localStorage.getItem('theme')) { - return localStorage.getItem('theme'); - } - if (window.matchMedia('(prefers-color-scheme: dark)').matches) { - return 'dark'; - } - return 'light'; - }); - - useEffect(() => { - const root = document.documentElement; - if (theme === 'light') { - root.classList.remove('theme-dark'); - } else { - root.classList.add('theme-dark'); - } - }, [theme]); - - return ( -
- {themes.map((t, i) => { - const icon = icons[i]; - const checked = t === theme; - return ( - - ); - })} -
- ); -}; - -export default ThemeToggle; diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/config.ts b/tmp/.LinbuduLab/packages/astro-docs-starter/src/config.ts deleted file mode 100644 index 174765d..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/config.ts +++ /dev/null @@ -1,44 +0,0 @@ -export const SITE = { - title: 'Your Documentation Website', - description: 'Your website description.', - defaultLanguage: 'en_US', -}; - -export const OPEN_GRAPH = { - image: { - src: 'https://github.com/withastro/astro/blob/main/assets/social/banner.jpg?raw=true', - alt: 'astro logo on a starry expanse of space,' + ' with a purple saturn-like planet floating in the right foreground', - }, - twitter: 'astrodotbuild', -}; - -export const KNOWN_LANGUAGES = { - English: 'en', -}; - -// Uncomment this to add an "Edit this page" button to every page of documentation. -// export const GITHUB_EDIT_URL = `https://github.com/withastro/astro/blob/main/docs/`; - -// Uncomment this to add an "Join our Community" button to every page of documentation. -// export const COMMUNITY_INVITE_URL = `https://astro.build/chat`; - -// Uncomment this to enable site search. -// See "Algolia" section of the README for more information. -// export const ALGOLIA = { -// indexName: 'XXXXXXXXXX', -// appId: 'XXXXXXXXXX', -// apiKey: 'XXXXXXXXXX', -// } - -export const SIDEBAR = { - en: [ - { text: '', header: true }, - { text: 'Section Header', header: true }, - { text: 'Introduction', link: 'en/introduction' }, - { text: 'Page 2', link: 'en/page-2' }, - { text: 'Page 3', link: 'en/page-3' }, - - { text: 'Another Section', header: true }, - { text: 'Page 4', link: 'en/page-4' }, - ], -}; diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/index.ts b/tmp/.LinbuduLab/packages/astro-docs-starter/src/index.ts deleted file mode 100644 index 8b0aa0a..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ - -console.log("astro-docs-starter is ready!"); diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/languages.ts b/tmp/.LinbuduLab/packages/astro-docs-starter/src/languages.ts deleted file mode 100644 index ffc6809..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/languages.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { KNOWN_LANGUAGES } from './config'; - -export { KNOWN_LANGUAGES }; -export const KNOWN_LANGUAGE_CODES = Object.values(KNOWN_LANGUAGES); -export const langPathRegex = /\/([a-z]{2}-?[A-Z]{0,2})\//; - -export function getLanguageFromURL(pathname: string) { - const langCodeMatch = pathname.match(langPathRegex); - return langCodeMatch ? langCodeMatch[1] : 'en'; -} diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/layouts/MainLayout.astro b/tmp/.LinbuduLab/packages/astro-docs-starter/src/layouts/MainLayout.astro deleted file mode 100644 index 92e0bcf..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/layouts/MainLayout.astro +++ /dev/null @@ -1,122 +0,0 @@ ---- -import HeadCommon from '../components/HeadCommon.astro'; -import HeadSEO from '../components/HeadSEO.astro'; -import Header from '../components/Header/Header.astro'; -import Footer from '../components/Footer/Footer.astro'; -import PageContent from '../components/PageContent/PageContent.astro'; -import LeftSidebar from '../components/LeftSidebar/LeftSidebar.astro'; -import RightSidebar from '../components/RightSidebar/RightSidebar.astro'; -import * as CONFIG from '../config'; - -const { content = {} } = Astro.props; -const currentPage = Astro.request.url.pathname; -const currentFile = `src/pages${currentPage.replace(/\/$/, '')}.md`; -const githubEditUrl = CONFIG.GITHUB_EDIT_URL && CONFIG.GITHUB_EDIT_URL + currentFile; ---- - - - - - - {content.title ? `${content.title} 🚀 ${CONFIG.SITE.title}` : CONFIG.SITE.title} - - - - -
-
- -
- - - -
- -
- - diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/pages/en/introduction.md b/tmp/.LinbuduLab/packages/astro-docs-starter/src/pages/en/introduction.md deleted file mode 100644 index af9249a..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/pages/en/introduction.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Introduction -description: Docs intro -layout: ../../layouts/MainLayout.astro ---- - -**Welcome to Astro!** - -This is the `docs` starter template. It contains all of the features that you need to build a Markdown-powered documentation site, including: - -- ✅ **Full Markdown support** -- ✅ **Responsive mobile-friendly design** -- ✅ **Sidebar navigation** -- ✅ **Search (powered by Algolia)** -- ✅ **Multi-language i18n** -- ✅ **Automatic table of contents** -- ✅ **Automatic list of contributors** -- ✅ (and, best of all) **dark mode** - -## Getting Started - -To get started with this theme, check out the `README.md` in your new project directory. It provides documentation on how to use and customize this template for your own project. Keep the README around so that you can always refer back to it as you build. - -Found a missing feature that you can't live without? Please suggest it on Discord [(#ideas-and-suggestions channel)](https://astro.build/chat) and even consider adding it yourself on GitHub! Astro is an open source project and contributions from developers like you are how we grow! - -Good luck out there, Astronaut. 🧑‍🚀 diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/pages/en/page-2.md b/tmp/.LinbuduLab/packages/astro-docs-starter/src/pages/en/page-2.md deleted file mode 100644 index 84ffea9..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/pages/en/page-2.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Page 2 -description: Lorem ipsum dolor sit amet - 2 -layout: ../../layouts/MainLayout.astro ---- - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -Sed flavum. Stridore nato, Alcandrumque desint ostendit derat, longoque, eadem -iunxit miserum pedum pectora. Liberat sine pignus cupit, ferit mihi venias -amores, et quod, maduere haec _gravi_ contentusque heros. Qui suae attonitas. - -_Acta caelo_ ego, hoc illi ferroque, qui fluitque Achillis deiecerat erat -inhospita arasque ad sume et aquis summo. Fugerat ipse iam. Funeris Iuno Danaos -est inroravere aurum foret nati aeque tetigisset! Esse ad tibi queritur [Sol sub -est](http://iusserat.net/) pugno solitoque movet coercuit solent caput te? - -Crescit sint petit gemellos gemino, et _gemma deus sub_ Surrentino frena -principiis statione. Soporiferam secunda nulli Tereus is _Aeolidae cepit_, tua -peregrinosque illam parvis, deerit sub et times sedant. - -## Apium haec candida mea movebo obsuntque descendat - -Furti lucos cum iussa quid temptanti gravitate animus: vocat -[ira](http://rediere.com/): illa. Primis aeternus, illi cinguntur ad mugitus -aevo repentinos nec. - -Transcurrere tenens in _litore_ tuti plebe circumspicit viventi quoque mox -troades medio mea locuta gradus perque sic unguibus -[gramen](http://quantoque.io/). Effetus celerique nomina quoque. Ire gemino est. -Eurus quaerenti: et lacus, tibi ignorant tertia omnes subscribi ducentem sedit -experientia sine ludunt multae. Ponderis memor purasque, ut armenta corpora -efferre: praeterea infantem in virgam verso. - -- Revellit quoniam vulnerat dique respicit -- Modo illis -- Nec victoria quodque -- Spectans si vitis iussorum corpora quas - -Tibi igni, iamque, sum arsuro patet et Talibus cecidere: levati Atlas villosa -dubium conparentis litem volentem nec? Iuga tenent, passi cumque generosior -luminis, quique mea aequora ingens bracchia furor, respiramen eram: in. Caelebs -et passu Phaethonta alumna orbem rapuit inplet [adfusaeque -oculis](http://www.virum.net/ille-miserae.html) paene. Casus mea cingebant idque -suis nymphe ut arae potuit et non, inmota erat foret, facta manu arvum. - -Fugam nec stridentemque undis te solet mentemque Phrygibus fulvae adhuc quam -cernimus est! Aper iube dederat adsere iamque mortale ita cornua si fundamina -quem caperet, iubeas stolidae pedesque intrarunt navigat triformis. Undas terque -digitos satis in nautae sternuntur curam, iaculum ignoscere _pianda dominique -nostra_ vivacemque teneraque! diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/pages/en/page-3.md b/tmp/.LinbuduLab/packages/astro-docs-starter/src/pages/en/page-3.md deleted file mode 100644 index 6d590f1..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/pages/en/page-3.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: Page 3 -description: Lorem ipsum dolor sit amet - 3 -layout: ../../layouts/MainLayout.astro ---- - -This is a fully-featured page, written in Markdown! - -## Section A - -Lorem ipsum dolor sit amet, **consectetur adipiscing elit**. Sed ut tortor _suscipit_, posuere ante id, vulputate urna. Pellentesque molestie aliquam dui sagittis aliquet. Sed sed felis convallis, lacinia lorem sit amet, fermentum ex. Etiam hendrerit mauris at elementum egestas. Vivamus id gravida ante. Praesent consectetur fermentum turpis, quis blandit tortor feugiat in. Aliquam erat volutpat. In elementum purus et tristique ornare. Suspendisse sollicitudin dignissim est a ultrices. Pellentesque sed ipsum finibus, condimentum metus eget, sagittis elit. Sed id lorem justo. Vivamus in sem ac mi molestie ornare. - -## Section B - -Nam quam dolor, pellentesque sed odio euismod, feugiat tempus tellus. Quisque arcu velit, ultricies in faucibus sed, ultrices ac enim. Nunc eget dictum est. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ex nisi, egestas mollis ultricies ut, laoreet suscipit libero. Nam condimentum molestie turpis. Sed vestibulum sagittis congue. Maecenas tristique enim et tincidunt tempor. Curabitur ac scelerisque nulla, in malesuada libero. Praesent eu tempus odio. Pellentesque aliquam ullamcorper quam at gravida. Sed non fringilla mauris. Aenean sit amet ultrices erat. Vestibulum congue venenatis tortor, nec suscipit tortor. Aenean pellentesque mauris eget tortor tincidunt pharetra. - -## Section C - -```markdown ---- -title: Markdown Page! -lang: en -layout: ~/layouts/MainLayout.astro ---- - -# Markdown example - -This is a fully-featured page, written in Markdown! - -## Section A - -Lorem ipsum dolor sit amet, **consectetur adipiscing elit**. Sed ut tortor _suscipit_, posuere ante id, vulputate urna. Pellentesque molestie aliquam dui sagittis aliquet. Sed sed felis convallis, lacinia lorem sit amet, fermentum ex. Etiam hendrerit mauris at elementum egestas. Vivamus id gravida ante. Praesent consectetur fermentum turpis, quis blandit tortor feugiat in. Aliquam erat volutpat. In elementum purus et tristique ornare. Suspendisse sollicitudin dignissim est a ultrices. Pellentesque sed ipsum finibus, condimentum metus eget, sagittis elit. Sed id lorem justo. Vivamus in sem ac mi molestie ornare. - -## Section B - -Nam quam dolor, pellentesque sed odio euismod, feugiat tempus tellus. Quisque arcu velit, ultricies in faucibus sed, ultrices ac enim. Nunc eget dictum est. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ex nisi, egestas mollis ultricies ut, laoreet suscipit libero. Nam condimentum molestie turpis. Sed vestibulum sagittis congue. Maecenas tristique enim et tincidunt tempor. Curabitur ac scelerisque nulla, in malesuada libero. Praesent eu tempus odio. Pellentesque aliquam ullamcorper quam at gravida. Sed non fringilla mauris. Aenean sit amet ultrices erat. Vestibulum congue venenatis tortor, nec suscipit tortor. Aenean pellentesque mauris eget tortor tincidunt pharetra. -``` diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/pages/en/page-4.md b/tmp/.LinbuduLab/packages/astro-docs-starter/src/pages/en/page-4.md deleted file mode 100644 index 85416ff..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/pages/en/page-4.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: Page 4 -description: Lorem ipsum dolor sit amet - 4 -layout: ../../layouts/MainLayout.astro ---- - -This is a fully-featured page, written in Markdown! - -## Section A - -Lorem ipsum dolor sit amet, **consectetur adipiscing elit**. Sed ut tortor _suscipit_, posuere ante id, vulputate urna. Pellentesque molestie aliquam dui sagittis aliquet. Sed sed felis convallis, lacinia lorem sit amet, fermentum ex. Etiam hendrerit mauris at elementum egestas. Vivamus id gravida ante. Praesent consectetur fermentum turpis, quis blandit tortor feugiat in. Aliquam erat volutpat. In elementum purus et tristique ornare. Suspendisse sollicitudin dignissim est a ultrices. Pellentesque sed ipsum finibus, condimentum metus eget, sagittis elit. Sed id lorem justo. Vivamus in sem ac mi molestie ornare. - -## Section B - -Nam quam dolor, pellentesque sed odio euismod, feugiat tempus tellus. Quisque arcu velit, ultricies in faucibus sed, ultrices ac enim. Nunc eget dictum est. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ex nisi, egestas mollis ultricies ut, laoreet suscipit libero. Nam condimentum molestie turpis. Sed vestibulum sagittis congue. Maecenas tristique enim et tincidunt tempor. Curabitur ac scelerisque nulla, in malesuada libero. Praesent eu tempus odio. Pellentesque aliquam ullamcorper quam at gravida. Sed non fringilla mauris. Aenean sit amet ultrices erat. Vestibulum congue venenatis tortor, nec suscipit tortor. Aenean pellentesque mauris eget tortor tincidunt pharetra. - -## Section C - -```markdown ---- -title: Markdown Page! -lang: en -layout: ~/layouts/MainLayout.astro ---- - -# Markdown example - -This is a fully-featured page, written in Markdown! - -## Section A - -Lorem ipsum dolor sit amet, **consectetur adipiscing elit**. Sed ut tortor _suscipit_, posuere ante id, vulputate urna. Pellentesque molestie aliquam dui sagittis aliquet. Sed sed felis convallis, lacinia lorem sit amet, fermentum ex. Etiam hendrerit mauris at elementum egestas. Vivamus id gravida ante. Praesent consectetur fermentum turpis, quis blandit tortor feugiat in. Aliquam erat volutpat. In elementum purus et tristique ornare. Suspendisse sollicitudin dignissim est a ultrices. Pellentesque sed ipsum finibus, condimentum metus eget, sagittis elit. Sed id lorem justo. Vivamus in sem ac mi molestie ornare. - -## Section B - -Nam quam dolor, pellentesque sed odio euismod, feugiat tempus tellus. Quisque arcu velit, ultricies in faucibus sed, ultrices ac enim. Nunc eget dictum est. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ex nisi, egestas mollis ultricies ut, laoreet suscipit libero. Nam condimentum molestie turpis. Sed vestibulum sagittis congue. Maecenas tristique enim et tincidunt tempor. Curabitur ac scelerisque nulla, in malesuada libero. Praesent eu tempus odio. Pellentesque aliquam ullamcorper quam at gravida. Sed non fringilla mauris. Aenean sit amet ultrices erat. Vestibulum congue venenatis tortor, nec suscipit tortor. Aenean pellentesque mauris eget tortor tincidunt pharetra. -``` diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/pages/index.astro b/tmp/.LinbuduLab/packages/astro-docs-starter/src/pages/index.astro deleted file mode 100644 index 4ce8931..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/pages/index.astro +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/styles/code.css b/tmp/.LinbuduLab/packages/astro-docs-starter/src/styles/code.css deleted file mode 100644 index b4275ad..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/styles/code.css +++ /dev/null @@ -1,96 +0,0 @@ -.language-css > code, -.language-sass > code, -.language-scss > code { - color: #fd9170; -} - -[class*='language-'] .namespace { - opacity: 0.7; -} - -.token.plain-text, -[class*='language-bash'] span.token, -[class*='language-shell'] span.token { - color: hsla(var(--color-gray-90), 1); -} - -[class*='language-bash'] span.token, -[class*='language-shell'] span.token { - font-style: bold; -} - -.token.prolog, -.token.comment, -[class*='language-bash'] span.token.comment, -[class*='language-shell'] span.token.comment { - color: hsla(var(--color-gray-70), 1); -} - -.token.selector, -.token.tag, -.token.unit, -.token.url, -.token.variable, -.token.entity, -.token.deleted { - color: #fa5e5b; -} - -.token.boolean, -.token.constant, -.token.doctype, -.token.number, -.token.regex, -.token.builtin, -.token.class, -.token.hexcode, -.token.class-name, -.token.attr-name { - color: hsla(var(--color-yellow), 1); -} - -.token.atrule, -.token.attribute, -.token.attr-value .token.punctuation, -.token.attr-value, -.token.pseudo-class, -.token.pseudo-element, -.token.string { - color: hsla(var(--color-green), 1); -} - -.token.symbol, -.token.function, -.token.id, -.token.important { - color: hsla(var(--color-blue), 1); -} - -.token.important, -.token.id { - font-weight: bold; -} - -.token.cdata, -.token.char, -.token.property { - color: #23b1af; -} - -.token.inserted { - color: hsla(var(--color-green), 1); -} - -.token.keyword { - color: #ff657c; - font-style: italic; -} - -.token.operator { - color: hsla(var(--color-gray-70), 1); -} - -.token.attr-value .token.attr-equals, -.token.punctuation { - color: hsla(var(--color-gray-80), 1); -} diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/styles/index.css b/tmp/.LinbuduLab/packages/astro-docs-starter/src/styles/index.css deleted file mode 100644 index ad0a5ad..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/styles/index.css +++ /dev/null @@ -1,388 +0,0 @@ -* { - box-sizing: border-box; - margin: 0; -} - -/* Global focus outline reset */ -*:focus:not(:focus-visible) { - outline: none; -} - -:root { - --user-font-scale: 1rem - 16px; - --max-width: calc(100% - 1rem); -} - -@media (min-width: 50em) { - :root { - --max-width: 46em; - } -} - -body { - display: flex; - flex-direction: column; - min-height: 100vh; - font-family: var(--font-body); - font-size: 1rem; - font-size: clamp(0.9rem, 0.75rem + 0.375vw + var(--user-font-scale), 1rem); - line-height: 1.5; - max-width: 100vw; -} - -nav ul { - list-style: none; - padding: 0; -} - -.content > section > * + * { - margin-top: 1.25rem; -} - -.content > section > :first-child { - margin-top: 0; -} - -/* Typography */ -h1, -h2, -h3, -h4, -h5, -h6 { - margin-bottom: 1rem; - font-weight: bold; - line-height: 1; -} - -h1, -h2 { - max-width: 40ch; -} - -:is(h2, h3):not(:first-child) { - margin-top: 3rem; -} - -:is(h4, h5, h6):not(:first-child) { - margin-top: 2rem; -} - -h1 { - font-size: 3.25rem; - font-weight: 800; -} - -h2 { - font-size: 2.5rem; -} - -h3 { - font-size: 1.75rem; -} - -h4 { - font-size: 1.3rem; -} - -h5 { - font-size: 1rem; -} - -p { - line-height: 1.65em; -} - -.content ul { - line-height: 1.1em; -} - -p, -.content ul { - color: var(--theme-text-light); -} - -small, -.text_small { - font-size: 0.833rem; -} - -a { - color: var(--theme-text-accent); - font-weight: 400; - text-underline-offset: 0.08em; - align-items: center; - gap: 0.5rem; -} - -article > section :is(ul, ol) > * + * { - margin-top: 0.75rem; -} - -article > section nav :is(ul, ol) > * + * { - margin-top: inherit; -} - -article > section li > :is(p, pre, blockquote):not(:first-child) { - margin-top: 1rem; -} - -article > section :is(ul, ol) { - padding-left: 1em; -} - -article > section nav :is(ul, ol) { - padding-left: inherit; -} - -article > section nav { - margin-top: 1rem; - margin-bottom: 2rem; -} - -article > section ::marker { - font-weight: bold; - color: var(--theme-text-light); -} - -article > section iframe { - width: 100%; - height: auto; - aspect-ratio: 16 / 9; -} - -a > code:not([class*='language']) { - position: relative; - color: var(--theme-text-accent); - background: transparent; - text-underline-offset: var(--padding-block); -} - -a > code:not([class*='language'])::before { - content: ''; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - display: block; - background: var(--theme-accent); - opacity: var(--theme-accent-opacity); - border-radius: var(--border-radius); -} - -a:hover, -a:focus { - text-decoration: underline; -} - -a:focus { - outline: 2px solid currentColor; - outline-offset: 0.25em; -} - -strong { - font-weight: 600; - color: inherit; -} - -/* Supporting Content */ -code { - font-family: var(--font-mono); - font-size: 0.85em; -} - -code:not([class*='language']) { - --border-radius: 3px; - --padding-block: 0.2rem; - --padding-inline: 0.4rem; - color: var(--theme-code-inline-text); - background-color: var(--theme-code-inline-bg); - padding: var(--padding-block) var(--padding-inline); - margin: calc(var(--padding-block) * -1) -0.125em; - border-radius: var(--border-radius); - box-shadow: 0 2px 1px 0 rgba(0, 0, 0, 0.08); - word-break: break-word; -} - -pre > code:not([class*='language']) { - background-color: transparent; - padding: 0; - margin: 0; - border-radius: 0; - color: inherit; -} - -pre > code { - font-size: 1em; -} - -table, -pre { - position: relative; - --padding-block: 1rem; - --padding-inline: 2rem; - padding: var(--padding-block) var(--padding-inline); - padding-right: calc(var(--padding-inline) * 2); - margin-left: calc(var(--padding-inline) * -1); - margin-right: calc(var(--padding-inline) * -1); - font-family: var(--font-mono); - - line-height: 1.5; - font-size: 0.85em; - overflow-y: hidden; - overflow-x: auto; -} - -table { - width: 100%; - padding: var(--padding-block) 0; - margin: 0; - border-collapse: collapse; -} - -/* Zebra striping */ -tr:nth-of-type(odd) { - background: var(--theme-bg-hover); -} -th { - background: var(--color-black); - color: var(--theme-color); - font-weight: bold; -} -td, -th { - padding: 6px; - text-align: left; -} - -pre { - background-color: var(--theme-code-bg); - color: var(--theme-code-text); -} - -blockquote code:not([class*='language']) { - background-color: var(--theme-bg); -} - -@media (min-width: 37.75em) { - pre { - --padding-inline: 1.25rem; - border-radius: 8px; - margin-left: 0; - margin-right: 0; - } -} - -blockquote { - margin: 2rem 0; - padding: 1.25em 1.5rem; - border-left: 3px solid var(--theme-text-light); - background-color: var(--theme-bg-offset); - border-radius: 0 0.25rem 0.25rem 0; - line-height: 1.7; -} - -img { - max-width: 100%; -} - -.flex { - display: flex; - align-items: center; -} - -button { - display: flex; - align-items: center; - justify-items: center; - gap: 0.25em; - padding: 0.33em 0.67em; - border: 0; - background: var(--theme-bg); - display: flex; - font-size: 1rem; - align-items: center; - gap: 0.25em; - border-radius: 99em; - color: var(--theme-text); - background-color: var(--theme-bg); -} - -h2.heading { - font-size: 1rem; - font-weight: 700; - padding: 0.1rem 1rem; - text-transform: uppercase; - margin-bottom: 0.5rem; -} - -.header-link { - font-size: 1rem; - padding: 0.1rem 0 0.1rem 1rem; - border-left: 4px solid var(--theme-divider); -} - -.header-link:hover, -.header-link:focus { - border-left-color: var(--theme-accent); - color: var(--theme-accent); -} -.header-link:focus-within { - color: var(--theme-text-light); - border-left-color: hsla(var(--color-gray-40), 1); -} -.header-link svg { - opacity: 0.6; -} -.header-link:hover svg { - opacity: 0.8; -} -.header-link a { - display: inline-flex; - gap: 0.5em; - width: 100%; - padding: 0.15em 0 0.15em 0; -} - -.header-link.depth-3 { - padding-left: 2rem; -} -.header-link.depth-4 { - padding-left: 3rem; -} - -.header-link a { - font: inherit; - color: inherit; - text-decoration: none; -} - -/* Screenreader Only Text */ -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border-width: 0; -} - -.focus\:not-sr-only:focus, -.focus\:not-sr-only:focus-visible { - position: static; - width: auto; - height: auto; - padding: 0; - margin: 0; - overflow: visible; - clip: auto; - white-space: normal; -} - -:target { - scroll-margin: calc(var(--theme-sidebar-offset, 5rem) + 2rem) 0 2rem; -} diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/src/styles/theme.css b/tmp/.LinbuduLab/packages/astro-docs-starter/src/styles/theme.css deleted file mode 100644 index 830bed8..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/src/styles/theme.css +++ /dev/null @@ -1,123 +0,0 @@ -:root { - --font-fallback: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji; - --font-body: system-ui, var(--font-fallback); - --font-mono: 'IBM Plex Mono', Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', 'Lucida Sans Typewriter', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', - 'Liberation Mono', 'Nimbus Mono L', Monaco, 'Courier New', Courier, monospace; - - /* - * Variables with --color-base prefix define - * the hue, and saturation values to be used for - * hsla colors. - * - * ex: - * - * --color-base-{color}: {hue}, {saturation}; - * - */ - - --color-base-white: 0, 0%; - --color-base-black: 240, 100%; - --color-base-gray: 215, 14%; - --color-base-blue: 212, 100%; - --color-base-blue-dark: 212, 72%; - --color-base-green: 158, 79%; - --color-base-orange: 22, 100%; - --color-base-purple: 269, 79%; - --color-base-red: 351, 100%; - --color-base-yellow: 41, 100%; - - /* - * Color palettes are made using --color-base - * variables, along with a lightness value to - * define different variants. - * - */ - - --color-gray-5: var(--color-base-gray), 5%; - --color-gray-10: var(--color-base-gray), 10%; - --color-gray-20: var(--color-base-gray), 20%; - --color-gray-30: var(--color-base-gray), 30%; - --color-gray-40: var(--color-base-gray), 40%; - --color-gray-50: var(--color-base-gray), 50%; - --color-gray-60: var(--color-base-gray), 60%; - --color-gray-70: var(--color-base-gray), 70%; - --color-gray-80: var(--color-base-gray), 80%; - --color-gray-90: var(--color-base-gray), 90%; - --color-gray-95: var(--color-base-gray), 95%; - - --color-blue: var(--color-base-blue), 61%; - --color-blue-dark: var(--color-base-blue-dark), 39%; - --color-green: var(--color-base-green), 42%; - --color-orange: var(--color-base-orange), 50%; - --color-purple: var(--color-base-purple), 54%; - --color-red: var(--color-base-red), 54%; - --color-yellow: var(--color-base-yellow), 59%; -} - -:root { - color-scheme: light; - --theme-accent: hsla(var(--color-blue), 1); - --theme-text-accent: hsla(var(--color-blue), 1); - --theme-accent-opacity: 0.15; - --theme-divider: hsla(var(--color-gray-95), 1); - --theme-text: hsla(var(--color-gray-10), 1); - --theme-text-light: hsla(var(--color-gray-40), 1); - /* @@@: not used anywhere */ - --theme-text-lighter: hsla(var(--color-gray-80), 1); - --theme-bg: hsla(var(--color-base-white), 100%, 1); - --theme-bg-hover: hsla(var(--color-gray-95), 1); - --theme-bg-offset: hsla(var(--color-gray-90), 1); - --theme-bg-accent: hsla(var(--color-blue), var(--theme-accent-opacity)); - --theme-code-inline-bg: hsla(var(--color-gray-95), 1); - --theme-code-inline-text: var(--theme-text); - --theme-code-bg: hsla(217, 19%, 27%, 1); - --theme-code-text: hsla(var(--color-gray-95), 1); - --theme-navbar-bg: hsla(var(--color-base-white), 100%, 1); - --theme-navbar-height: 6rem; - --theme-selection-color: hsla(var(--color-blue), 1); - --theme-selection-bg: hsla(var(--color-blue), var(--theme-accent-opacity)); -} - -body { - background: var(--theme-bg); - color: var(--theme-text); -} - -:root.theme-dark { - color-scheme: dark; - --theme-accent-opacity: 0.15; - --theme-accent: hsla(var(--color-blue), 1); - --theme-text-accent: hsla(var(--color-blue), 1); - --theme-divider: hsla(var(--color-gray-10), 1); - --theme-text: hsla(var(--color-gray-90), 1); - --theme-text-light: hsla(var(--color-gray-80), 1); - - /* @@@: not used anywhere */ - --theme-text-lighter: hsla(var(--color-gray-40), 1); - --theme-bg: hsla(215, 28%, 17%, 1); - --theme-bg-hover: hsla(var(--color-gray-40), 1); - --theme-bg-offset: hsla(var(--color-gray-5), 1); - --theme-code-inline-bg: hsla(var(--color-gray-10), 1); - --theme-code-inline-text: hsla(var(--color-base-white), 100%, 1); - --theme-code-bg: hsla(var(--color-gray-5), 1); - --theme-code-text: hsla(var(--color-base-white), 100%, 1); - --theme-navbar-bg: hsla(215, 28%, 17%, 1); - --theme-selection-color: hsla(var(--color-base-white), 100%, 1); - --theme-selection-bg: hsla(var(--color-purple), var(--theme-accent-opacity)); - - /* DocSearch [Algolia] */ - --docsearch-modal-background: var(--theme-bg); - --docsearch-searchbox-focus-background: var(--theme-divider); - --docsearch-footer-background: var(--theme-divider); - --docsearch-text-color: var(--theme-text); - --docsearch-hit-background: var(--theme-divider); - --docsearch-hit-shadow: none; - --docsearch-hit-color: var(--theme-text); - --docsearch-footer-shadow: inset 0 2px 10px #000; - --docsearch-modal-shadow: inset 0 0 8px #000; -} - -::selection { - color: var(--theme-selection-color); - background-color: var(--theme-selection-bg); -} diff --git a/tmp/.LinbuduLab/packages/astro-docs-starter/tsconfig.json b/tmp/.LinbuduLab/packages/astro-docs-starter/tsconfig.json deleted file mode 100644 index cb92ff9..0000000 --- a/tmp/.LinbuduLab/packages/astro-docs-starter/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "compilerOptions": { - "target": "es2020", - "module": "esnext", - "jsx": "preserve" - }, - "moduleResolution": "node" -} diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/.gitignore b/tmp/.LinbuduLab/packages/astro-generic-starter/.gitignore deleted file mode 100644 index c824674..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# build output -dist - -# dependencies -node_modules/ - -# logs -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# environment variables -.env -.env.production - -# macOS-specific files -.DS_Store diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/.npmrc b/tmp/.LinbuduLab/packages/astro-generic-starter/.npmrc deleted file mode 100644 index ef83021..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -# Expose Astro dependencies for `pnpm` users -shamefully-hoist=true diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/.stackblitzrc b/tmp/.LinbuduLab/packages/astro-generic-starter/.stackblitzrc deleted file mode 100644 index 43798ec..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/.stackblitzrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "startCommand": "npm start", - "env": { - "ENABLE_CJS_IMPORTS": true - } -} \ No newline at end of file diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/README.md b/tmp/.LinbuduLab/packages/astro-generic-starter/README.md deleted file mode 100644 index 1e8bac3..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Welcome to [Astro](https://astro.build) - -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/starter) - -> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! - -## 🚀 Project Structure - -Inside of your Astro project, you'll see the following folders and files: - -``` -/ -├── public/ -│ ├── robots.txt -│ └── favicon.ico -├── src/ -│ ├── components/ -│ │ └── Tour.astro -│ └── pages/ -│ └── index.astro -└── package.json -``` - -Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. - -There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. - -Any static assets, like images, can be placed in the `public/` directory. - -## 🧞 Commands - -All commands are run from the root of the project, from a terminal: - -| Command | Action | -|:---------------- |:-------------------------------------------- | -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | -| `npm run build` | Build your production site to `./dist/` | -| `npm run preview` | Preview your build locally, before deploying | - -## 👀 Want to learn more? - -Feel free to check [our documentation](https://github.com/withastro/astro) or jump into our [Discord server](https://astro.build/chat). diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/astro.config.mjs b/tmp/.LinbuduLab/packages/astro-generic-starter/astro.config.mjs deleted file mode 100644 index bc1dfd2..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/astro.config.mjs +++ /dev/null @@ -1,19 +0,0 @@ -export default { - // projectRoot: '.', // Where to resolve all URLs relative to. Useful if you have a monorepo project. - // pages: './src/pages', // Path to Astro components, pages, and data - // dist: './dist', // When running `astro build`, path to final static output - // public: './public', // A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that don’t need processing. - buildOptions: { - // site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. - sitemap: true, // Generate sitemap (set to "false" to disable) - }, - devOptions: { - // hostname: 'localhost', // The hostname to run the dev server on. - // port: 3000, // The port to run the dev server on. - }, - renderers: [ - "@astrojs/renderer-react", - "@astrojs/renderer-solid", - "@astrojs/renderer-svelte" - ], -}; diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/package.json b/tmp/.LinbuduLab/packages/astro-generic-starter/package.json deleted file mode 100644 index a2380dc..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "@example/starter", - "version": "0.0.1", - "private": true, - "scripts": { - "dev": "astro dev", - "start": "astro dev", - "build": "astro build", - "preview": "astro preview" - }, - "devDependencies": { - "astro": "^0.24.2", - "@astrojs/renderer-react": "^0.5.0", - "@astrojs/renderer-solid": "^0.4.0", - "@astrojs/renderer-svelte": "^0.5.1" - } -} \ No newline at end of file diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/public/assets/logo.svg b/tmp/.LinbuduLab/packages/astro-generic-starter/public/assets/logo.svg deleted file mode 100644 index d751556..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/public/assets/logo.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/public/favicon.ico b/tmp/.LinbuduLab/packages/astro-generic-starter/public/favicon.ico deleted file mode 100644 index 7b74f34..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/public/favicon.ico +++ /dev/null @@ -1 +0,0 @@ -https://rawcdn.githack.com/withastro/astro/main/examples/starter/public/favicon.ico \ No newline at end of file diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/sandbox.config.json b/tmp/.LinbuduLab/packages/astro-generic-starter/sandbox.config.json deleted file mode 100644 index 9178af7..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/sandbox.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "infiniteLoopProtection": true, - "hardReloadOnChange": false, - "view": "browser", - "template": "node", - "container": { - "port": 3000, - "startScript": "start", - "node": "14" - } -} diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/src/components/ReactCounter.jsx b/tmp/.LinbuduLab/packages/astro-generic-starter/src/components/ReactCounter.jsx deleted file mode 100644 index ca34627..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/src/components/ReactCounter.jsx +++ /dev/null @@ -1,15 +0,0 @@ -import { useState } from 'react'; - -export default function ReactCounter() { - const [count, setCount] = useState(0); - const add = () => setCount((i) => i + 1); - const subtract = () => setCount((i) => i - 1); - - return ( -
- -
{count}
- -
- ); -} diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/src/components/SolidCounter.jsx b/tmp/.LinbuduLab/packages/astro-generic-starter/src/components/SolidCounter.jsx deleted file mode 100644 index 0480ba3..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/src/components/SolidCounter.jsx +++ /dev/null @@ -1,15 +0,0 @@ -import { createSignal } from "solid-js"; - -export default function SolidCounter() { - const [count, setCount] = createSignal(0); - const add = () => setCount(count() + 1); - const subtract = () => setCount(count() - 1); - - return ( -
- -
{count()}
- -
- ); -} diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/src/components/SvelteCounter.svelte b/tmp/.LinbuduLab/packages/astro-generic-starter/src/components/SvelteCounter.svelte deleted file mode 100644 index f493c25..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/src/components/SvelteCounter.svelte +++ /dev/null @@ -1,17 +0,0 @@ - - -
- -
{ count }
- -
diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/src/components/Tour.astro b/tmp/.LinbuduLab/packages/astro-generic-starter/src/components/Tour.astro deleted file mode 100644 index 9a9ebe1..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/src/components/Tour.astro +++ /dev/null @@ -1,84 +0,0 @@ ---- -import { Markdown } from 'astro/components'; ---- - -
- - -
- - ## 🚀 Project Structure - - Inside of your Astro project, you'll see the following folders and files: - - ``` - / - ├── public/ - │ └── favicon.ico - ├── src/ - │ ├── components/ - │ │ └── Tour.astro - │ └── pages/ - │ └── index.astro - └── package.json - ``` - - Astro looks for `.astro` or `.md` files in the `src/pages/` directory. - Each page is exposed as a route based on its file name. - - There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. - - Any static assets, like images, can be placed in the `public/` directory. - -
- -
-

👀 Want to learn more?

-

Feel free to check our documentation or jump into our Discord server.

-
-
- - diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/src/index.ts b/tmp/.LinbuduLab/packages/astro-generic-starter/src/index.ts deleted file mode 100644 index e972864..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ - -console.log("astro-generic-starter is ready!"); diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/src/pages/index.astro b/tmp/.LinbuduLab/packages/astro-generic-starter/src/pages/index.astro deleted file mode 100644 index d18ddf9..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/src/pages/index.astro +++ /dev/null @@ -1,67 +0,0 @@ ---- -// Style Imports -import '../styles/global.css'; -import '../styles/home.css'; -// Component Imports -import Tour from '../components/Tour.astro'; -// You can import components from any supported Framework here! -import ReactCounter from '../components/ReactCounter.jsx'; -import SolidCounter from '../components/SolidCounter.jsx'; -import SvelteCounter from '../components/SvelteCounter.svelte'; - -// Component Script: -// You can write any JavaScript/TypeScript that you'd like here. -// It will run during the build, but never in the browser. -// All variables are available to use in the HTML template below. -let title = 'My Astro Site'; - -// Full Astro Component Syntax: -// https://docs.astro.build/core-concepts/astro-components/ ---- - - - - - {title} - - - - - - -
-
-
- Astro logo -

Welcome to Astro

-
-
- - - - - - - - - - -
- - diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/src/styles/global.css b/tmp/.LinbuduLab/packages/astro-generic-starter/src/styles/global.css deleted file mode 100644 index a9f830e..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/src/styles/global.css +++ /dev/null @@ -1,28 +0,0 @@ -* { - box-sizing: border-box; - margin: 0; -} - -:root { - font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji; - font-size: 1rem; - --user-font-scale: 1rem - 16px; - font-size: clamp(0.875rem, 0.4626rem + 1.0309vw + var(--user-font-scale), 1.125rem); -} - -body { - padding: 4rem 2rem; - width: 100%; - min-height: 100vh; - display: grid; - justify-content: center; - background: #f9fafb; - color: #111827; -} - -@media (prefers-color-scheme: dark) { - body { - background: #111827; - color: #fff; - } -} diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/src/styles/home.css b/tmp/.LinbuduLab/packages/astro-generic-starter/src/styles/home.css deleted file mode 100644 index b3cbd02..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/src/styles/home.css +++ /dev/null @@ -1,53 +0,0 @@ -:root { - --font-mono: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', 'Lucida Sans Typewriter', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Liberation Mono', - 'Nimbus Mono L', Monaco, 'Courier New', Courier, monospace; - --color-light: #f3f4f6; -} - -@media (prefers-color-scheme: dark) { - :root { - --color-light: #1f2937; - } -} - -a { - color: inherit; -} - -header > div { - font-size: clamp(2rem, -0.4742rem + 6.1856vw, 2.75rem); -} - -header > div { - display: flex; - flex-direction: column; - align-items: center; -} - -header h1 { - font-size: 1em; - font-weight: 500; -} -header img { - width: 2em; - height: 2.667em; -} - -h2 { - font-weight: 500; - font-size: clamp(1.5rem, 1rem + 1.25vw, 2rem); -} - -.counter { - display: grid; - grid-auto-flow: column; - gap: 1em; - font-size: 2rem; - justify-content: center; - padding: 2rem 1rem; -} - -.counter > pre { - text-align: center; - min-width: 3ch; -} diff --git a/tmp/.LinbuduLab/packages/astro-generic-starter/tsconfig.json b/tmp/.LinbuduLab/packages/astro-generic-starter/tsconfig.json deleted file mode 100644 index 8e881cf..0000000 --- a/tmp/.LinbuduLab/packages/astro-generic-starter/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "compilerOptions": { - "moduleResolution": "node" - } -} diff --git a/tmp/.LinbuduLab/packages/cac-cli-starter/package.json b/tmp/.LinbuduLab/packages/cac-cli-starter/package.json deleted file mode 100644 index 9eaf160..0000000 --- a/tmp/.LinbuduLab/packages/cac-cli-starter/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "cac-cli-starter", - "version": "0.0.1", - "description": "", - "main": "./dist/index.js", - "license": "MIT", - "scripts": { - "build": "tsc", - "dev": "tsnd --respawn --transpile-only src/index.ts", - "watch": "tsc --watch", - "check": "tsc --noEmit" - }, - "dependencies": { - "cac": "^6.7.12", - "chalk": "^4.0.0", - "consola": "^2.15.3", - "enquirer": "^2.3.6", - "execa": "^5.0.0", - "fs-extra": "^10.0.1", - "globby": "^13.1.1", - "js-yaml": "^4.1.0", - "jsonfile": "^6.1.0", - "lodash": "^4.17.21", - "ora": "^6.0.1", - "ow": "^0.28.1", - "pacote": "^13.0.3", - "semver": "^7.3.5", - "sort-package-json": "^1.54.0", - "ts-morph": "^14.0.0" - }, - "devDependencies": { - "@types/fs-extra": "^9.0.13", - "@types/js-yaml": "^4.0.5", - "@types/jsonfile": "^6.1.0", - "@types/lodash": "^4.14.179", - "@types/pacote": "^11.1.3", - "@types/semver": "^7.3.9" - } -} diff --git a/tmp/.LinbuduLab/packages/cac-cli-starter/src/index.ts b/tmp/.LinbuduLab/packages/cac-cli-starter/src/index.ts deleted file mode 100644 index 9f86e9f..0000000 --- a/tmp/.LinbuduLab/packages/cac-cli-starter/src/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -import cac from 'cac'; -import consola from 'consola'; -import useSubCommand from './sub-command'; - -const cli = cac('LinbuduLab-CAC-CLI-Starter'); - -useSubCommand(cli); - -consola.info('Preparing Your CLI App...'); - -cli.help(); -cli.parse(); diff --git a/tmp/.LinbuduLab/packages/cac-cli-starter/src/sub-command.ts b/tmp/.LinbuduLab/packages/cac-cli-starter/src/sub-command.ts deleted file mode 100644 index 2b4fbe7..0000000 --- a/tmp/.LinbuduLab/packages/cac-cli-starter/src/sub-command.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { CAC } from 'cac'; -import chalk from 'chalk'; -import consola from 'consola'; - -export default function useSubCommand(cli: CAC) { - cli.command('sub', 'sub-command description', {}).action(async () => { - consola.success(chalk.green('Sub command successfully executed!')); - }); -} diff --git a/tmp/.LinbuduLab/packages/cac-cli-starter/tsconfig.json b/tmp/.LinbuduLab/packages/cac-cli-starter/tsconfig.json deleted file mode 100644 index cd82584..0000000 --- a/tmp/.LinbuduLab/packages/cac-cli-starter/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "target": "ES2018", - "module": "commonjs", - "lib": [ - "esnext" - ], - "rootDir": "src", - "outDir": "dist", - "esModuleInterop": true, - "skipLibCheck": true, - "declaration": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true - }, - "include": [ - "src" - ] -} diff --git a/tmp/.LinbuduLab/packages/cra-ts/.gitignore b/tmp/.LinbuduLab/packages/cra-ts/.gitignore deleted file mode 100644 index 4d29575..0000000 --- a/tmp/.LinbuduLab/packages/cra-ts/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/tmp/.LinbuduLab/packages/cra-ts/README.md b/tmp/.LinbuduLab/packages/cra-ts/README.md deleted file mode 100644 index b87cb00..0000000 --- a/tmp/.LinbuduLab/packages/cra-ts/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Getting Started with Create React App - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `npm start` - -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -The page will reload if you make edits.\ -You will also see any lint errors in the console. - -### `npm test` - -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `npm run build` - -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `npm run eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). diff --git a/tmp/.LinbuduLab/packages/cra-ts/package.json b/tmp/.LinbuduLab/packages/cra-ts/package.json deleted file mode 100644 index ed33365..0000000 --- a/tmp/.LinbuduLab/packages/cra-ts/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "cra-ts", - "version": "0.1.0", - "private": true, - "dependencies": { - "@testing-library/jest-dom": "^5.16.2", - "@testing-library/react": "^12.1.4", - "@testing-library/user-event": "^13.5.0", - "@types/jest": "^27.4.1", - "@types/node": "^16.11.26", - "@types/react": "^17.0.40", - "@types/react-dom": "^17.0.13", - "react": "^17.0.2", - "react-dom": "^17.0.2", - "react-scripts": "5.0.0", - "typescript": "^4.6.2", - "web-vitals": "^2.1.4" - }, - "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", - "eject": "react-scripts eject" - }, - "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ] - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - } -} diff --git a/tmp/.LinbuduLab/packages/cra-ts/public/favicon.ico b/tmp/.LinbuduLab/packages/cra-ts/public/favicon.ico deleted file mode 100644 index a11777c..0000000 Binary files a/tmp/.LinbuduLab/packages/cra-ts/public/favicon.ico and /dev/null differ diff --git a/tmp/.LinbuduLab/packages/cra-ts/public/index.html b/tmp/.LinbuduLab/packages/cra-ts/public/index.html deleted file mode 100644 index aa069f2..0000000 --- a/tmp/.LinbuduLab/packages/cra-ts/public/index.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - React App - - - -
- - - diff --git a/tmp/.LinbuduLab/packages/cra-ts/public/logo192.png b/tmp/.LinbuduLab/packages/cra-ts/public/logo192.png deleted file mode 100644 index fc44b0a..0000000 Binary files a/tmp/.LinbuduLab/packages/cra-ts/public/logo192.png and /dev/null differ diff --git a/tmp/.LinbuduLab/packages/cra-ts/public/logo512.png b/tmp/.LinbuduLab/packages/cra-ts/public/logo512.png deleted file mode 100644 index a4e47a6..0000000 Binary files a/tmp/.LinbuduLab/packages/cra-ts/public/logo512.png and /dev/null differ diff --git a/tmp/.LinbuduLab/packages/cra-ts/public/manifest.json b/tmp/.LinbuduLab/packages/cra-ts/public/manifest.json deleted file mode 100644 index 080d6c7..0000000 --- a/tmp/.LinbuduLab/packages/cra-ts/public/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/tmp/.LinbuduLab/packages/cra-ts/public/robots.txt b/tmp/.LinbuduLab/packages/cra-ts/public/robots.txt deleted file mode 100644 index e9e57dc..0000000 --- a/tmp/.LinbuduLab/packages/cra-ts/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/tmp/.LinbuduLab/packages/cra-ts/src/App.css b/tmp/.LinbuduLab/packages/cra-ts/src/App.css deleted file mode 100644 index 74b5e05..0000000 --- a/tmp/.LinbuduLab/packages/cra-ts/src/App.css +++ /dev/null @@ -1,38 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/tmp/.LinbuduLab/packages/cra-ts/src/App.test.tsx b/tmp/.LinbuduLab/packages/cra-ts/src/App.test.tsx deleted file mode 100644 index 2a68616..0000000 --- a/tmp/.LinbuduLab/packages/cra-ts/src/App.test.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import { render, screen } from '@testing-library/react'; -import App from './App'; - -test('renders learn react link', () => { - render(); - const linkElement = screen.getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); diff --git a/tmp/.LinbuduLab/packages/cra-ts/src/App.tsx b/tmp/.LinbuduLab/packages/cra-ts/src/App.tsx deleted file mode 100644 index 53fccb7..0000000 --- a/tmp/.LinbuduLab/packages/cra-ts/src/App.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react'; -import logo from './logo.svg'; -import './App.css'; - -function App() { - return ( -
-
- logo -

- Edit src/App.tsx and save to reload. -

-

Develop with LinbuduLab!

- - Learn React - -
-
- ); -} - -export default App; diff --git a/tmp/.LinbuduLab/packages/cra-ts/src/index.css b/tmp/.LinbuduLab/packages/cra-ts/src/index.css deleted file mode 100644 index ec2585e..0000000 --- a/tmp/.LinbuduLab/packages/cra-ts/src/index.css +++ /dev/null @@ -1,13 +0,0 @@ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -} diff --git a/tmp/.LinbuduLab/packages/cra-ts/src/index.tsx b/tmp/.LinbuduLab/packages/cra-ts/src/index.tsx deleted file mode 100644 index ef2edf8..0000000 --- a/tmp/.LinbuduLab/packages/cra-ts/src/index.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import './index.css'; -import App from './App'; -import reportWebVitals from './reportWebVitals'; - -ReactDOM.render( - - - , - document.getElementById('root') -); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/tmp/.LinbuduLab/packages/cra-ts/src/logo.svg b/tmp/.LinbuduLab/packages/cra-ts/src/logo.svg deleted file mode 100644 index 9dfc1c0..0000000 --- a/tmp/.LinbuduLab/packages/cra-ts/src/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tmp/.LinbuduLab/packages/cra-ts/src/react-app-env.d.ts b/tmp/.LinbuduLab/packages/cra-ts/src/react-app-env.d.ts deleted file mode 100644 index 6431bc5..0000000 --- a/tmp/.LinbuduLab/packages/cra-ts/src/react-app-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/tmp/.LinbuduLab/packages/cra-ts/src/reportWebVitals.ts b/tmp/.LinbuduLab/packages/cra-ts/src/reportWebVitals.ts deleted file mode 100644 index 49a2a16..0000000 --- a/tmp/.LinbuduLab/packages/cra-ts/src/reportWebVitals.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ReportHandler } from 'web-vitals'; - -const reportWebVitals = (onPerfEntry?: ReportHandler) => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals; diff --git a/tmp/.LinbuduLab/packages/cra-ts/src/setupTests.ts b/tmp/.LinbuduLab/packages/cra-ts/src/setupTests.ts deleted file mode 100644 index 8f2609b..0000000 --- a/tmp/.LinbuduLab/packages/cra-ts/src/setupTests.ts +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom'; diff --git a/tmp/.LinbuduLab/packages/cra-ts/tsconfig.json b/tmp/.LinbuduLab/packages/cra-ts/tsconfig.json deleted file mode 100644 index a273b0c..0000000 --- a/tmp/.LinbuduLab/packages/cra-ts/tsconfig.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], - "allowJs": true, - "skipLibCheck": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "react-jsx" - }, - "include": [ - "src" - ] -} diff --git a/tmp/.LinbuduLab/packages/esbuild-plugin-starter/fixtures/build.ts b/tmp/.LinbuduLab/packages/esbuild-plugin-starter/fixtures/build.ts deleted file mode 100644 index 3a4e032..0000000 --- a/tmp/.LinbuduLab/packages/esbuild-plugin-starter/fixtures/build.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { build } from 'esbuild'; -import { plugin } from '../src/plugin'; -import path from 'path'; - -(async () => { - await build({ - entryPoints: [path.resolve(__dirname, './entry.ts')], - plugins: [plugin()], - outdir: './dist', - }); -})(); diff --git a/tmp/.LinbuduLab/packages/esbuild-plugin-starter/fixtures/entry.ts b/tmp/.LinbuduLab/packages/esbuild-plugin-starter/fixtures/entry.ts deleted file mode 100644 index b802416..0000000 --- a/tmp/.LinbuduLab/packages/esbuild-plugin-starter/fixtures/entry.ts +++ /dev/null @@ -1 +0,0 @@ -console.log('ESBuild is really cool!'); diff --git a/tmp/.LinbuduLab/packages/esbuild-plugin-starter/package.json b/tmp/.LinbuduLab/packages/esbuild-plugin-starter/package.json deleted file mode 100644 index 2714122..0000000 --- a/tmp/.LinbuduLab/packages/esbuild-plugin-starter/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "esbuild-plugin-starter", - "version": "0.0.1", - "description": "", - "main": "./dist/index.js", - "license": "MIT", - "scripts": { - "build": "tsc", - "dev": "tsnd --respawn --transpile-only fixtures/build.ts", - "watch": "tsc --watch", - "check": "tsc --noEmit" - }, - "dependencies": { - "esbuild": "^0.13.14" - }, - "peerDependencies": { - "esbuild": "^0.13.14" - } -} diff --git a/tmp/.LinbuduLab/packages/esbuild-plugin-starter/src/index.ts b/tmp/.LinbuduLab/packages/esbuild-plugin-starter/src/index.ts deleted file mode 100644 index 6ab2f0a..0000000 --- a/tmp/.LinbuduLab/packages/esbuild-plugin-starter/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ - -console.log("esbuild-plugin-starter is ready!"); diff --git a/tmp/.LinbuduLab/packages/esbuild-plugin-starter/src/plugin.ts b/tmp/.LinbuduLab/packages/esbuild-plugin-starter/src/plugin.ts deleted file mode 100644 index b845be2..0000000 --- a/tmp/.LinbuduLab/packages/esbuild-plugin-starter/src/plugin.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { Plugin } from 'esbuild'; - -export const plugin = (): Plugin => { - return { - name: 'plugin:demo', - setup(build) { - build.onLoad( - { filter: new RegExp('') }, - ({ path, namespace, pluginData }) => { - return null; - } - ); - - build.onResolve( - { filter: new RegExp('') }, - ({ path, namespace, resolveDir, importer, kind, pluginData }) => { - return null; - } - ); - - build.onStart(() => { - console.log('Plugin Start!'); - }); - - build.onEnd(() => { - console.log('Plugin End!'); - }); - }, - }; -}; diff --git a/tmp/.LinbuduLab/packages/esbuild-plugin-starter/tsconfig.json b/tmp/.LinbuduLab/packages/esbuild-plugin-starter/tsconfig.json deleted file mode 100644 index 973fb0b..0000000 --- a/tmp/.LinbuduLab/packages/esbuild-plugin-starter/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "target": "ES2018", - "module": "commonjs", - "lib": ["esnext"], - "rootDir": ".", - "outDir": "dist", - "esModuleInterop": true, - "skipLibCheck": true, - "declaration": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true - }, - "include": ["src", "fixtures"] -} diff --git a/tmp/.LinbuduLab/packages/esbuild-react-app/.gitignore b/tmp/.LinbuduLab/packages/esbuild-react-app/.gitignore deleted file mode 100644 index 4d29575..0000000 --- a/tmp/.LinbuduLab/packages/esbuild-react-app/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/tmp/.LinbuduLab/packages/esbuild-react-app/LICENSE b/tmp/.LinbuduLab/packages/esbuild-react-app/LICENSE deleted file mode 100644 index 9ad29fd..0000000 --- a/tmp/.LinbuduLab/packages/esbuild-react-app/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2021 Linbudu - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/tmp/.LinbuduLab/packages/esbuild-react-app/README.md b/tmp/.LinbuduLab/packages/esbuild-react-app/README.md deleted file mode 100644 index 88319b4..0000000 --- a/tmp/.LinbuduLab/packages/esbuild-react-app/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# ESBuild + React App - -This project is a sample project showing how to use [ESBuild](https://esbuild.github.io/) as a compiler in React project, including **the configuration of React, ReactDOM mounts under window via plugins with precompiled files**, and **the required [ESBuild build options](https://esbuild.github.io/api/#simple-options)**, etc. -You can refer to the [build.ts](build.ts) and [plugin.ts](preserve-external-dep.plugin.ts) files to learn how to use ESBuild for simple replacements of Webpack. - -**Note: This project has not been validated in a production environment, and it is not recommended that you do so.** - -## Get Started - -```bash -yarn - -# execute build script, and use serve to start up a server. -yarn start - -# execute ESBuild build API -yarn build -``` - -## Further - -As ESBuild does not implement a module system like Webpack, the [`external`](https://esbuild.github.io/api/#external) property in ESBuild will in some cases not behave the same way as it does under a Webpack project. -In Webpack project, we've gotten used to the idea that webpack can handle mount under `window` with the related configuration, which will automatically inject code like `module.exports = React` into the compiled code, and the application code will refer to `window` when it executes `require("react")`. -So to archive this in ESBuild, we use an extra file in this project, packaged as `inject.js`, which contains the source code for `React`, `ReactDOM`, and mounts it under `window` at the end of the file. Then, we convert the application's import of react to go under `window`. -To ensure that the variables are mounted before the application is loaded, we need to ensure that `inject.js` is executed before `index.js`. In fact, a more common way to do this would be to use a CDN to do the `inject.js` work. diff --git a/tmp/.LinbuduLab/packages/esbuild-react-app/build.ts b/tmp/.LinbuduLab/packages/esbuild-react-app/build.ts deleted file mode 100644 index 881a145..0000000 --- a/tmp/.LinbuduLab/packages/esbuild-react-app/build.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { build, BuildOptions } from 'esbuild'; -import { capitalCase } from 'capital-case'; -import { PreserveExternalPlugin } from './preserve-external-dep.plugin'; -import { start } from 'live-server'; -import path from 'path'; - -const isProd = process.env.NODE_ENV === 'production'; - -async function main() { - const sharedBuildOptions: BuildOptions = { - define: { - 'process.env.NODE_ENV': JSON.stringify( - process.env.NODE_ENV ?? 'development' - ), - }, - bundle: true, - minify: isProd, - sourcemap: false, - platform: 'browser', - target: ['es2020', 'chrome58'], - }; - - const preMountContent = ` -window.React = require('react'); -window.ReactDOM = require('react-dom')`; - - await build({ - stdin: { - contents: preMountContent, - resolveDir: __dirname, - }, - outfile: './public/inject.js', - ...sharedBuildOptions, - }); - - const depContentFunc = (dep: string) => - `module.exports = ${capitalCase(dep)}`; - - const builder = await build({ - entryPoints: ['./src/index.tsx'], - outdir: 'public', - watch: true, - plugins: [ - PreserveExternalPlugin({ - depsToExtract: [ - { - dep: 'react', - // in simple case, we can use content processor to handle result generation - contentFunc: depContentFunc, - }, - { - dep: 'react-dom', - content: 'module.exports = ReactDOM', - }, - ], - }), - ], - external: ['react', 'react-dom'], - loader: { - '.html': 'text', - '.svg': 'dataurl', - }, - tsconfig: 'tsconfig.json', - ...sharedBuildOptions, - }); - - start({ - port: 8080, - root: path.resolve(__dirname, './public'), - open: true, - }); -} - -(async () => { - await main(); -})(); diff --git a/tmp/.LinbuduLab/packages/esbuild-react-app/package.json b/tmp/.LinbuduLab/packages/esbuild-react-app/package.json deleted file mode 100644 index c81f58b..0000000 --- a/tmp/.LinbuduLab/packages/esbuild-react-app/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "esbuild-react-app", - "version": "0.1.0", - "private": true, - "dependencies": { - "@testing-library/jest-dom": "^5.11.4", - "@testing-library/react": "^11.1.0", - "@testing-library/user-event": "^12.1.10", - "@types/jest": "^26.0.15", - "@types/node": "^12.0.0", - "@types/react": "^17.0.0", - "@types/react-dom": "^17.0.0", - "chokidar": "^3.5.3", - "live-server": "^1.2.1", - "react": "^17.0.2", - "react-dom": "^17.0.2", - "react-scripts": "4.0.3", - "typescript": "^4.1.2", - "web-vitals": "^1.0.1" - }, - "scripts": { - "start": "ts-node --project tsconfig.node.json build.ts" - }, - "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ] - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "devDependencies": { - "@types/live-server": "^1.2.1", - "capital-case": "^1.0.4", - "chalk": "^4.1.2", - "consola": "^2.15.3", - "esbuild": "^0.13.14", - "serve": "^13.0.2", - "ts-node": "^10.4.0" - } -} diff --git a/tmp/.LinbuduLab/packages/esbuild-react-app/preserve-external-dep.plugin.ts b/tmp/.LinbuduLab/packages/esbuild-react-app/preserve-external-dep.plugin.ts deleted file mode 100644 index 45d90ec..0000000 --- a/tmp/.LinbuduLab/packages/esbuild-react-app/preserve-external-dep.plugin.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Plugin } from "esbuild"; - -interface IOptions { - depsToExtract: Array<{ - dep: string; - content?: string; - contentFunc?: (dep: string) => string; - }>; -} - -export const PreserveExternalPlugin = (options: IOptions): Plugin => { - const NAMESPACE = "preserved-external-deps"; - const depList = options.depsToExtract.map((pair) => - pair.contentFunc - ? { dep: pair.dep, content: pair.contentFunc(pair.dep) } - : pair - ); - - const filterRE = new RegExp( - `^(${depList - .map((config) => config.dep.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")) - .join("|")})$` - ); - - return { - name: "PreserveExternalPlugin", - setup(build) { - build.onResolve({ filter: filterRE }, ({ path }) => { - return { - path, - namespace: NAMESPACE, - }; - }); - - for (const { dep, content } of depList) { - build.onLoad( - { filter: new RegExp(`^${dep}$`), namespace: NAMESPACE }, - () => { - return { - contents: content, - }; - } - ); - } - }, - }; -}; diff --git a/tmp/.LinbuduLab/packages/esbuild-react-app/public/favicon.ico b/tmp/.LinbuduLab/packages/esbuild-react-app/public/favicon.ico deleted file mode 100644 index a11777c..0000000 Binary files a/tmp/.LinbuduLab/packages/esbuild-react-app/public/favicon.ico and /dev/null differ diff --git a/tmp/.LinbuduLab/packages/esbuild-react-app/public/index.css b/tmp/.LinbuduLab/packages/esbuild-react-app/public/index.css deleted file mode 100644 index ec8a3aa..0000000 --- a/tmp/.LinbuduLab/packages/esbuild-react-app/public/index.css +++ /dev/null @@ -1,62 +0,0 @@ -/* src/index.css */ -body { - margin: 0; - font-family: - -apple-system, - BlinkMacSystemFont, - "Segoe UI", - "Roboto", - "Oxygen", - "Ubuntu", - "Cantarell", - "Fira Sans", - "Droid Sans", - "Helvetica Neue", - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -code { - font-family: - source-code-pro, - Menlo, - Monaco, - Consolas, - "Courier New", - monospace; -} - -/* src/App.css */ -.App { - text-align: center; -} -.App-logo { - height: 40vmin; - pointer-events: none; -} -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} -.App-link { - color: #61dafb; -} -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/tmp/.LinbuduLab/packages/esbuild-react-app/public/index.html b/tmp/.LinbuduLab/packages/esbuild-react-app/public/index.html deleted file mode 100644 index 6cf5d5d..0000000 --- a/tmp/.LinbuduLab/packages/esbuild-react-app/public/index.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - React + ESBuild App - - - - -
- - - - - diff --git a/tmp/.LinbuduLab/packages/esbuild-react-app/public/index.js b/tmp/.LinbuduLab/packages/esbuild-react-app/public/index.js deleted file mode 100644 index 2ca77b7..0000000 --- a/tmp/.LinbuduLab/packages/esbuild-react-app/public/index.js +++ /dev/null @@ -1,264 +0,0 @@ -(() => { - var __create = Object.create; - var __defProp = Object.defineProperty; - var __getOwnPropDesc = Object.getOwnPropertyDescriptor; - var __getOwnPropNames = Object.getOwnPropertyNames; - var __getProtoOf = Object.getPrototypeOf; - var __hasOwnProp = Object.prototype.hasOwnProperty; - var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); - var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[Object.keys(fn)[0]])(fn = 0)), res; - }; - var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; - }; - var __export = (target, all) => { - __markAsModule(target); - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); - }; - var __reExport = (target, module, desc) => { - if (module && typeof module === "object" || typeof module === "function") { - for (let key of __getOwnPropNames(module)) - if (!__hasOwnProp.call(target, key) && key !== "default") - __defProp(target, key, { get: () => module[key], enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable }); - } - return target; - }; - var __toModule = (module) => { - return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? { get: () => module.default, enumerable: true } : { value: module, enumerable: true })), module); - }; - - // preserved-external-deps:react - var require_react = __commonJS({ - "preserved-external-deps:react"(exports, module) { - module.exports = React; - } - }); - - // preserved-external-deps:react-dom - var require_react_dom = __commonJS({ - "preserved-external-deps:react-dom"(exports, module) { - module.exports = ReactDOM; - } - }); - - // ../../node_modules/.pnpm/web-vitals@1.1.2/node_modules/web-vitals/dist/web-vitals.js - var web_vitals_exports = {}; - __export(web_vitals_exports, { - getCLS: () => s, - getFCP: () => l, - getFID: () => L, - getLCP: () => T, - getTTFB: () => b - }); - var e, t, n, i, a, r, o, c, u, f, s, m, p, v, d, l, h, S, y, g, E, w, L, T, b; - var init_web_vitals = __esm({ - "../../node_modules/.pnpm/web-vitals@1.1.2/node_modules/web-vitals/dist/web-vitals.js"() { - a = function(e2, t2) { - return { name: e2, value: t2 === void 0 ? -1 : t2, delta: 0, entries: [], id: "v1-".concat(Date.now(), "-").concat(Math.floor(8999999999999 * Math.random()) + 1e12) }; - }; - r = function(e2, t2) { - try { - if (PerformanceObserver.supportedEntryTypes.includes(e2)) { - if (e2 === "first-input" && !("PerformanceEventTiming" in self)) - return; - var n2 = new PerformanceObserver(function(e3) { - return e3.getEntries().map(t2); - }); - return n2.observe({ type: e2, buffered: true }), n2; - } - } catch (e3) { - } - }; - o = function(e2, t2) { - var n2 = function n3(i2) { - i2.type !== "pagehide" && document.visibilityState !== "hidden" || (e2(i2), t2 && (removeEventListener("visibilitychange", n3, true), removeEventListener("pagehide", n3, true))); - }; - addEventListener("visibilitychange", n2, true), addEventListener("pagehide", n2, true); - }; - c = function(e2) { - addEventListener("pageshow", function(t2) { - t2.persisted && e2(t2); - }, true); - }; - u = typeof WeakSet == "function" ? new WeakSet() : new Set(); - f = function(e2, t2, n2) { - var i2; - return function() { - t2.value >= 0 && (n2 || u.has(t2) || document.visibilityState === "hidden") && (t2.delta = t2.value - (i2 || 0), (t2.delta || i2 === void 0) && (i2 = t2.value, e2(t2))); - }; - }; - s = function(e2, t2) { - var n2, i2 = a("CLS", 0), u2 = function(e3) { - e3.hadRecentInput || (i2.value += e3.value, i2.entries.push(e3), n2()); - }, s2 = r("layout-shift", u2); - s2 && (n2 = f(e2, i2, t2), o(function() { - s2.takeRecords().map(u2), n2(); - }), c(function() { - i2 = a("CLS", 0), n2 = f(e2, i2, t2); - })); - }; - m = -1; - p = function() { - return document.visibilityState === "hidden" ? 0 : 1 / 0; - }; - v = function() { - o(function(e2) { - var t2 = e2.timeStamp; - m = t2; - }, true); - }; - d = function() { - return m < 0 && (m = p(), v(), c(function() { - setTimeout(function() { - m = p(), v(); - }, 0); - })), { get timeStamp() { - return m; - } }; - }; - l = function(e2, t2) { - var n2, i2 = d(), o2 = a("FCP"), s2 = function(e3) { - e3.name === "first-contentful-paint" && (p2 && p2.disconnect(), e3.startTime < i2.timeStamp && (o2.value = e3.startTime, o2.entries.push(e3), u.add(o2), n2())); - }, m2 = performance.getEntriesByName("first-contentful-paint")[0], p2 = m2 ? null : r("paint", s2); - (m2 || p2) && (n2 = f(e2, o2, t2), m2 && s2(m2), c(function(i3) { - o2 = a("FCP"), n2 = f(e2, o2, t2), requestAnimationFrame(function() { - requestAnimationFrame(function() { - o2.value = performance.now() - i3.timeStamp, u.add(o2), n2(); - }); - }); - })); - }; - h = { passive: true, capture: true }; - S = new Date(); - y = function(i2, a2) { - e || (e = a2, t = i2, n = new Date(), w(removeEventListener), g()); - }; - g = function() { - if (t >= 0 && t < n - S) { - var a2 = { entryType: "first-input", name: e.type, target: e.target, cancelable: e.cancelable, startTime: e.timeStamp, processingStart: e.timeStamp + t }; - i.forEach(function(e2) { - e2(a2); - }), i = []; - } - }; - E = function(e2) { - if (e2.cancelable) { - var t2 = (e2.timeStamp > 1e12 ? new Date() : performance.now()) - e2.timeStamp; - e2.type == "pointerdown" ? function(e3, t3) { - var n2 = function() { - y(e3, t3), a2(); - }, i2 = function() { - a2(); - }, a2 = function() { - removeEventListener("pointerup", n2, h), removeEventListener("pointercancel", i2, h); - }; - addEventListener("pointerup", n2, h), addEventListener("pointercancel", i2, h); - }(t2, e2) : y(t2, e2); - } - }; - w = function(e2) { - ["mousedown", "keydown", "touchstart", "pointerdown"].forEach(function(t2) { - return e2(t2, E, h); - }); - }; - L = function(n2, s2) { - var m2, p2 = d(), v2 = a("FID"), l2 = function(e2) { - e2.startTime < p2.timeStamp && (v2.value = e2.processingStart - e2.startTime, v2.entries.push(e2), u.add(v2), m2()); - }, h2 = r("first-input", l2); - m2 = f(n2, v2, s2), h2 && o(function() { - h2.takeRecords().map(l2), h2.disconnect(); - }, true), h2 && c(function() { - var r2; - v2 = a("FID"), m2 = f(n2, v2, s2), i = [], t = -1, e = null, w(addEventListener), r2 = l2, i.push(r2), g(); - }); - }; - T = function(e2, t2) { - var n2, i2 = d(), s2 = a("LCP"), m2 = function(e3) { - var t3 = e3.startTime; - t3 < i2.timeStamp && (s2.value = t3, s2.entries.push(e3)), n2(); - }, p2 = r("largest-contentful-paint", m2); - if (p2) { - n2 = f(e2, s2, t2); - var v2 = function() { - u.has(s2) || (p2.takeRecords().map(m2), p2.disconnect(), u.add(s2), n2()); - }; - ["keydown", "click"].forEach(function(e3) { - addEventListener(e3, v2, { once: true, capture: true }); - }), o(v2, true), c(function(i3) { - s2 = a("LCP"), n2 = f(e2, s2, t2), requestAnimationFrame(function() { - requestAnimationFrame(function() { - s2.value = performance.now() - i3.timeStamp, u.add(s2), n2(); - }); - }); - }); - } - }; - b = function(e2) { - var t2, n2 = a("TTFB"); - t2 = function() { - try { - var t3 = performance.getEntriesByType("navigation")[0] || function() { - var e3 = performance.timing, t4 = { entryType: "navigation", startTime: 0 }; - for (var n3 in e3) - n3 !== "navigationStart" && n3 !== "toJSON" && (t4[n3] = Math.max(e3[n3] - e3.navigationStart, 0)); - return t4; - }(); - if (n2.value = n2.delta = t3.responseStart, n2.value < 0) - return; - n2.entries = [t3], e2(n2); - } catch (e3) { - } - }, document.readyState === "complete" ? setTimeout(t2, 0) : addEventListener("pageshow", t2); - }; - } - }); - - // src/index.tsx - var import_react2 = __toModule(require_react()); - var import_react_dom = __toModule(require_react_dom()); - - // src/App.tsx - var import_react = __toModule(require_react()); - - // src/logo.svg - var logo_default = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA4NDEuOSA1OTUuMyI+PGcgZmlsbD0iIzYxREFGQiI+PHBhdGggZD0iTTY2Ni4zIDI5Ni41YzAtMzIuNS00MC43LTYzLjMtMTAzLjEtODIuNCAxNC40LTYzLjYgOC0xMTQuMi0yMC4yLTEzMC40LTYuNS0zLjgtMTQuMS01LjYtMjIuNC01LjZ2MjIuM2M0LjYgMCA4LjMuOSAxMS40IDIuNiAxMy42IDcuOCAxOS41IDM3LjUgMTQuOSA3NS43LTEuMSA5LjQtMi45IDE5LjMtNS4xIDI5LjQtMTkuNi00LjgtNDEtOC41LTYzLjUtMTAuOS0xMy41LTE4LjUtMjcuNS0zNS4zLTQxLjYtNTAgMzIuNi0zMC4zIDYzLjItNDYuOSA4NC00Ni45Vjc4Yy0yNy41IDAtNjMuNSAxOS42LTk5LjkgNTMuNi0zNi40LTMzLjgtNzIuNC01My4yLTk5LjktNTMuMnYyMi4zYzIwLjcgMCA1MS40IDE2LjUgODQgNDYuNi0xNCAxNC43LTI4IDMxLjQtNDEuMyA0OS45LTIyLjYgMi40LTQ0IDYuMS02My42IDExLTIuMy0xMC00LTE5LjctNS4yLTI5LTQuNy0zOC4yIDEuMS02Ny45IDE0LjYtNzUuOCAzLTEuOCA2LjktMi42IDExLjUtMi42Vjc4LjVjLTguNCAwLTE2IDEuOC0yMi42IDUuNi0yOC4xIDE2LjItMzQuNCA2Ni43LTE5LjkgMTMwLjEtNjIuMiAxOS4yLTEwMi43IDQ5LjktMTAyLjcgODIuMyAwIDMyLjUgNDAuNyA2My4zIDEwMy4xIDgyLjQtMTQuNCA2My42LTggMTE0LjIgMjAuMiAxMzAuNCA2LjUgMy44IDE0LjEgNS42IDIyLjUgNS42IDI3LjUgMCA2My41LTE5LjYgOTkuOS01My42IDM2LjQgMzMuOCA3Mi40IDUzLjIgOTkuOSA1My4yIDguNCAwIDE2LTEuOCAyMi42LTUuNiAyOC4xLTE2LjIgMzQuNC02Ni43IDE5LjktMTMwLjEgNjItMTkuMSAxMDIuNS00OS45IDEwMi41LTgyLjN6bS0xMzAuMi02Ni43Yy0zLjcgMTIuOS04LjMgMjYuMi0xMy41IDM5LjUtNC4xLTgtOC40LTE2LTEzLjEtMjQtNC42LTgtOS41LTE1LjgtMTQuNC0yMy40IDE0LjIgMi4xIDI3LjkgNC43IDQxIDcuOXptLTQ1LjggMTA2LjVjLTcuOCAxMy41LTE1LjggMjYuMy0yNC4xIDM4LjItMTQuOSAxLjMtMzAgMi00NS4yIDItMTUuMSAwLTMwLjItLjctNDUtMS45LTguMy0xMS45LTE2LjQtMjQuNi0yNC4yLTM4LTcuNi0xMy4xLTE0LjUtMjYuNC0yMC44LTM5LjggNi4yLTEzLjQgMTMuMi0yNi44IDIwLjctMzkuOSA3LjgtMTMuNSAxNS44LTI2LjMgMjQuMS0zOC4yIDE0LjktMS4zIDMwLTIgNDUuMi0yIDE1LjEgMCAzMC4yLjcgNDUgMS45IDguMyAxMS45IDE2LjQgMjQuNiAyNC4yIDM4IDcuNiAxMy4xIDE0LjUgMjYuNCAyMC44IDM5LjgtNi4zIDEzLjQtMTMuMiAyNi44LTIwLjcgMzkuOXptMzIuMy0xM2M1LjQgMTMuNCAxMCAyNi44IDEzLjggMzkuOC0xMy4xIDMuMi0yNi45IDUuOS00MS4yIDggNC45LTcuNyA5LjgtMTUuNiAxNC40LTIzLjcgNC42LTggOC45LTE2LjEgMTMtMjQuMXpNNDIxLjIgNDMwYy05LjMtOS42LTE4LjYtMjAuMy0yNy44LTMyIDkgLjQgMTguMi43IDI3LjUuNyA5LjQgMCAxOC43LS4yIDI3LjgtLjctOSAxMS43LTE4LjMgMjIuNC0yNy41IDMyem0tNzQuNC01OC45Yy0xNC4yLTIuMS0yNy45LTQuNy00MS03LjkgMy43LTEyLjkgOC4zLTI2LjIgMTMuNS0zOS41IDQuMSA4IDguNCAxNiAxMy4xIDI0IDQuNyA4IDkuNSAxNS44IDE0LjQgMjMuNHpNNDIwLjcgMTYzYzkuMyA5LjYgMTguNiAyMC4zIDI3LjggMzItOS0uNC0xOC4yLS43LTI3LjUtLjctOS40IDAtMTguNy4yLTI3LjguNyA5LTExLjcgMTguMy0yMi40IDI3LjUtMzJ6bS03NCA1OC45Yy00LjkgNy43LTkuOCAxNS42LTE0LjQgMjMuNy00LjYgOC04LjkgMTYtMTMgMjQtNS40LTEzLjQtMTAtMjYuOC0xMy44LTM5LjggMTMuMS0zLjEgMjYuOS01LjggNDEuMi03Ljl6bS05MC41IDEyNS4yYy0zNS40LTE1LjEtNTguMy0zNC45LTU4LjMtNTAuNiAwLTE1LjcgMjIuOS0zNS42IDU4LjMtNTAuNiA4LjYtMy43IDE4LTcgMjcuNy0xMC4xIDUuNyAxOS42IDEzLjIgNDAgMjIuNSA2MC45LTkuMiAyMC44LTE2LjYgNDEuMS0yMi4yIDYwLjYtOS45LTMuMS0xOS4zLTYuNS0yOC0xMC4yek0zMTAgNDkwYy0xMy42LTcuOC0xOS41LTM3LjUtMTQuOS03NS43IDEuMS05LjQgMi45LTE5LjMgNS4xLTI5LjQgMTkuNiA0LjggNDEgOC41IDYzLjUgMTAuOSAxMy41IDE4LjUgMjcuNSAzNS4zIDQxLjYgNTAtMzIuNiAzMC4zLTYzLjIgNDYuOS04NCA0Ni45LTQuNS0uMS04LjMtMS0xMS4zLTIuN3ptMjM3LjItNzYuMmM0LjcgMzguMi0xLjEgNjcuOS0xNC42IDc1LjgtMyAxLjgtNi45IDIuNi0xMS41IDIuNi0yMC43IDAtNTEuNC0xNi41LTg0LTQ2LjYgMTQtMTQuNyAyOC0zMS40IDQxLjMtNDkuOSAyMi42LTIuNCA0NC02LjEgNjMuNi0xMSAyLjMgMTAuMSA0LjEgMTkuOCA1LjIgMjkuMXptMzguNS02Ni43Yy04LjYgMy43LTE4IDctMjcuNyAxMC4xLTUuNy0xOS42LTEzLjItNDAtMjIuNS02MC45IDkuMi0yMC44IDE2LjYtNDEuMSAyMi4yLTYwLjYgOS45IDMuMSAxOS4zIDYuNSAyOC4xIDEwLjIgMzUuNCAxNS4xIDU4LjMgMzQuOSA1OC4zIDUwLjYtLjEgMTUuNy0yMyAzNS42LTU4LjQgNTAuNnpNMzIwLjggNzguNHoiLz48Y2lyY2xlIGN4PSI0MjAuOSIgY3k9IjI5Ni41IiByPSI0NS43Ii8+PHBhdGggZD0iTTUyMC41IDc4LjF6Ii8+PC9nPjwvc3ZnPg=="; - - // src/App.tsx - function App() { - return /* @__PURE__ */ import_react.default.createElement("div", { - className: "App" - }, /* @__PURE__ */ import_react.default.createElement("header", { - className: "App-header" - }, /* @__PURE__ */ import_react.default.createElement("img", { - src: logo_default, - className: "App-logo", - alt: "logo" - }), /* @__PURE__ */ import_react.default.createElement("p", null, "Edit ", /* @__PURE__ */ import_react.default.createElement("code", null, "src/App.tsx"), " and save to reload."), /* @__PURE__ */ import_react.default.createElement("p", null, "Develop with LinbuduLab"), /* @__PURE__ */ import_react.default.createElement("a", { - className: "App-link", - href: "https://reactjs.org", - target: "_blank", - rel: "noopener noreferrer" - }, "Learn React"))); - } - var App_default = App; - - // src/reportWebVitals.ts - var reportWebVitals = (onPerfEntry) => { - if (onPerfEntry && onPerfEntry instanceof Function) { - Promise.resolve().then(() => (init_web_vitals(), web_vitals_exports)).then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); - } - }; - var reportWebVitals_default = reportWebVitals; - - // src/index.tsx - import_react_dom.default.render(/* @__PURE__ */ import_react2.default.createElement(import_react2.default.StrictMode, null, /* @__PURE__ */ import_react2.default.createElement(App_default, null)), document.getElementById("root")); - reportWebVitals_default(); -})(); diff --git a/tmp/.LinbuduLab/packages/esbuild-react-app/public/inject.js b/tmp/.LinbuduLab/packages/esbuild-react-app/public/inject.js deleted file mode 100644 index 964bafd..0000000 --- a/tmp/.LinbuduLab/packages/esbuild-react-app/public/inject.js +++ /dev/null @@ -1,20457 +0,0 @@ -(() => { - var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; - }; - - // ../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js - var require_object_assign = __commonJS({ - "../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js"(exports, module) { - "use strict"; - var getOwnPropertySymbols = Object.getOwnPropertySymbols; - var hasOwnProperty = Object.prototype.hasOwnProperty; - var propIsEnumerable = Object.prototype.propertyIsEnumerable; - function toObject(val) { - if (val === null || val === void 0) { - throw new TypeError("Object.assign cannot be called with null or undefined"); - } - return Object(val); - } - function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } - var test1 = new String("abc"); - test1[5] = "de"; - if (Object.getOwnPropertyNames(test1)[0] === "5") { - return false; - } - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2["_" + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function(n) { - return test2[n]; - }); - if (order2.join("") !== "0123456789") { - return false; - } - var test3 = {}; - "abcdefghijklmnopqrst".split("").forEach(function(letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") { - return false; - } - return true; - } catch (err) { - return false; - } - } - module.exports = shouldUseNative() ? Object.assign : function(target, source) { - var from; - var to = toObject(target); - var symbols; - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } - return to; - }; - } - }); - - // ../../node_modules/.pnpm/react@17.0.2/node_modules/react/cjs/react.development.js - var require_react_development = __commonJS({ - "../../node_modules/.pnpm/react@17.0.2/node_modules/react/cjs/react.development.js"(exports) { - "use strict"; - if (true) { - (function() { - "use strict"; - var _assign = require_object_assign(); - var ReactVersion = "17.0.2"; - var REACT_ELEMENT_TYPE = 60103; - var REACT_PORTAL_TYPE = 60106; - exports.Fragment = 60107; - exports.StrictMode = 60108; - exports.Profiler = 60114; - var REACT_PROVIDER_TYPE = 60109; - var REACT_CONTEXT_TYPE = 60110; - var REACT_FORWARD_REF_TYPE = 60112; - exports.Suspense = 60113; - var REACT_SUSPENSE_LIST_TYPE = 60120; - var REACT_MEMO_TYPE = 60115; - var REACT_LAZY_TYPE = 60116; - var REACT_BLOCK_TYPE = 60121; - var REACT_SERVER_BLOCK_TYPE = 60122; - var REACT_FUNDAMENTAL_TYPE = 60117; - var REACT_SCOPE_TYPE = 60119; - var REACT_OPAQUE_ID_TYPE = 60128; - var REACT_DEBUG_TRACING_MODE_TYPE = 60129; - var REACT_OFFSCREEN_TYPE = 60130; - var REACT_LEGACY_HIDDEN_TYPE = 60131; - if (typeof Symbol === "function" && Symbol.for) { - var symbolFor = Symbol.for; - REACT_ELEMENT_TYPE = symbolFor("react.element"); - REACT_PORTAL_TYPE = symbolFor("react.portal"); - exports.Fragment = symbolFor("react.fragment"); - exports.StrictMode = symbolFor("react.strict_mode"); - exports.Profiler = symbolFor("react.profiler"); - REACT_PROVIDER_TYPE = symbolFor("react.provider"); - REACT_CONTEXT_TYPE = symbolFor("react.context"); - REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref"); - exports.Suspense = symbolFor("react.suspense"); - REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list"); - REACT_MEMO_TYPE = symbolFor("react.memo"); - REACT_LAZY_TYPE = symbolFor("react.lazy"); - REACT_BLOCK_TYPE = symbolFor("react.block"); - REACT_SERVER_BLOCK_TYPE = symbolFor("react.server.block"); - REACT_FUNDAMENTAL_TYPE = symbolFor("react.fundamental"); - REACT_SCOPE_TYPE = symbolFor("react.scope"); - REACT_OPAQUE_ID_TYPE = symbolFor("react.opaque.id"); - REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode"); - REACT_OFFSCREEN_TYPE = symbolFor("react.offscreen"); - REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden"); - } - var MAYBE_ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = "@@iterator"; - function getIteratorFn(maybeIterable) { - if (maybeIterable === null || typeof maybeIterable !== "object") { - return null; - } - var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; - if (typeof maybeIterator === "function") { - return maybeIterator; - } - return null; - } - var ReactCurrentDispatcher = { - current: null - }; - var ReactCurrentBatchConfig = { - transition: 0 - }; - var ReactCurrentOwner = { - current: null - }; - var ReactDebugCurrentFrame = {}; - var currentExtraStackFrame = null; - function setExtraStackFrame(stack) { - { - currentExtraStackFrame = stack; - } - } - { - ReactDebugCurrentFrame.setExtraStackFrame = function(stack) { - { - currentExtraStackFrame = stack; - } - }; - ReactDebugCurrentFrame.getCurrentStack = null; - ReactDebugCurrentFrame.getStackAddendum = function() { - var stack = ""; - if (currentExtraStackFrame) { - stack += currentExtraStackFrame; - } - var impl = ReactDebugCurrentFrame.getCurrentStack; - if (impl) { - stack += impl() || ""; - } - return stack; - }; - } - var IsSomeRendererActing = { - current: false - }; - var ReactSharedInternals = { - ReactCurrentDispatcher, - ReactCurrentBatchConfig, - ReactCurrentOwner, - IsSomeRendererActing, - assign: _assign - }; - { - ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame; - } - function warn(format) { - { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - printWarning("warn", format, args); - } - } - function error(format) { - { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - printWarning("error", format, args); - } - } - function printWarning(level, format, args) { - { - var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame2.getStackAddendum(); - if (stack !== "") { - format += "%s"; - args = args.concat([stack]); - } - var argsWithFormat = args.map(function(item) { - return "" + item; - }); - argsWithFormat.unshift("Warning: " + format); - Function.prototype.apply.call(console[level], console, argsWithFormat); - } - } - var didWarnStateUpdateForUnmountedComponent = {}; - function warnNoop(publicInstance, callerName) { - { - var _constructor = publicInstance.constructor; - var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass"; - var warningKey = componentName + "." + callerName; - if (didWarnStateUpdateForUnmountedComponent[warningKey]) { - return; - } - error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName); - didWarnStateUpdateForUnmountedComponent[warningKey] = true; - } - } - var ReactNoopUpdateQueue = { - isMounted: function(publicInstance) { - return false; - }, - enqueueForceUpdate: function(publicInstance, callback, callerName) { - warnNoop(publicInstance, "forceUpdate"); - }, - enqueueReplaceState: function(publicInstance, completeState, callback, callerName) { - warnNoop(publicInstance, "replaceState"); - }, - enqueueSetState: function(publicInstance, partialState, callback, callerName) { - warnNoop(publicInstance, "setState"); - } - }; - var emptyObject = {}; - { - Object.freeze(emptyObject); - } - function Component(props, context, updater) { - this.props = props; - this.context = context; - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; - } - Component.prototype.isReactComponent = {}; - Component.prototype.setState = function(partialState, callback) { - if (!(typeof partialState === "object" || typeof partialState === "function" || partialState == null)) { - { - throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); - } - } - this.updater.enqueueSetState(this, partialState, callback, "setState"); - }; - Component.prototype.forceUpdate = function(callback) { - this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); - }; - { - var deprecatedAPIs = { - isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."], - replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."] - }; - var defineDeprecationWarning = function(methodName, info) { - Object.defineProperty(Component.prototype, methodName, { - get: function() { - warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]); - return void 0; - } - }); - }; - for (var fnName in deprecatedAPIs) { - if (deprecatedAPIs.hasOwnProperty(fnName)) { - defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); - } - } - } - function ComponentDummy() { - } - ComponentDummy.prototype = Component.prototype; - function PureComponent(props, context, updater) { - this.props = props; - this.context = context; - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; - } - var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); - pureComponentPrototype.constructor = PureComponent; - _assign(pureComponentPrototype, Component.prototype); - pureComponentPrototype.isPureReactComponent = true; - function createRef() { - var refObject = { - current: null - }; - { - Object.seal(refObject); - } - return refObject; - } - function getWrappedName(outerType, innerType, wrapperName) { - var functionName = innerType.displayName || innerType.name || ""; - return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName); - } - function getContextName(type) { - return type.displayName || "Context"; - } - function getComponentName(type) { - if (type == null) { - return null; - } - { - if (typeof type.tag === "number") { - error("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."); - } - } - if (typeof type === "function") { - return type.displayName || type.name || null; - } - if (typeof type === "string") { - return type; - } - switch (type) { - case exports.Fragment: - return "Fragment"; - case REACT_PORTAL_TYPE: - return "Portal"; - case exports.Profiler: - return "Profiler"; - case exports.StrictMode: - return "StrictMode"; - case exports.Suspense: - return "Suspense"; - case REACT_SUSPENSE_LIST_TYPE: - return "SuspenseList"; - } - if (typeof type === "object") { - switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - var context = type; - return getContextName(context) + ".Consumer"; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + ".Provider"; - case REACT_FORWARD_REF_TYPE: - return getWrappedName(type, type.render, "ForwardRef"); - case REACT_MEMO_TYPE: - return getComponentName(type.type); - case REACT_BLOCK_TYPE: - return getComponentName(type._render); - case REACT_LAZY_TYPE: { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - try { - return getComponentName(init(payload)); - } catch (x) { - return null; - } - } - } - } - return null; - } - var hasOwnProperty = Object.prototype.hasOwnProperty; - var RESERVED_PROPS = { - key: true, - ref: true, - __self: true, - __source: true - }; - var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs; - { - didWarnAboutStringRefs = {}; - } - function hasValidRef(config) { - { - if (hasOwnProperty.call(config, "ref")) { - var getter = Object.getOwnPropertyDescriptor(config, "ref").get; - if (getter && getter.isReactWarning) { - return false; - } - } - } - return config.ref !== void 0; - } - function hasValidKey(config) { - { - if (hasOwnProperty.call(config, "key")) { - var getter = Object.getOwnPropertyDescriptor(config, "key").get; - if (getter && getter.isReactWarning) { - return false; - } - } - } - return config.key !== void 0; - } - function defineKeyPropWarningGetter(props, displayName) { - var warnAboutAccessingKey = function() { - { - if (!specialPropKeyWarningShown) { - specialPropKeyWarningShown = true; - error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); - } - } - }; - warnAboutAccessingKey.isReactWarning = true; - Object.defineProperty(props, "key", { - get: warnAboutAccessingKey, - configurable: true - }); - } - function defineRefPropWarningGetter(props, displayName) { - var warnAboutAccessingRef = function() { - { - if (!specialPropRefWarningShown) { - specialPropRefWarningShown = true; - error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); - } - } - }; - warnAboutAccessingRef.isReactWarning = true; - Object.defineProperty(props, "ref", { - get: warnAboutAccessingRef, - configurable: true - }); - } - function warnIfStringRefCannotBeAutoConverted(config) { - { - if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) { - var componentName = getComponentName(ReactCurrentOwner.current.type); - if (!didWarnAboutStringRefs[componentName]) { - error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref); - didWarnAboutStringRefs[componentName] = true; - } - } - } - } - var ReactElement = function(type, key, ref, self, source, owner, props) { - var element = { - $$typeof: REACT_ELEMENT_TYPE, - type, - key, - ref, - props, - _owner: owner - }; - { - element._store = {}; - Object.defineProperty(element._store, "validated", { - configurable: false, - enumerable: false, - writable: true, - value: false - }); - Object.defineProperty(element, "_self", { - configurable: false, - enumerable: false, - writable: false, - value: self - }); - Object.defineProperty(element, "_source", { - configurable: false, - enumerable: false, - writable: false, - value: source - }); - if (Object.freeze) { - Object.freeze(element.props); - Object.freeze(element); - } - } - return element; - }; - function createElement(type, config, children) { - var propName; - var props = {}; - var key = null; - var ref = null; - var self = null; - var source = null; - if (config != null) { - if (hasValidRef(config)) { - ref = config.ref; - { - warnIfStringRefCannotBeAutoConverted(config); - } - } - if (hasValidKey(config)) { - key = "" + config.key; - } - self = config.__self === void 0 ? null : config.__self; - source = config.__source === void 0 ? null : config.__source; - for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - props[propName] = config[propName]; - } - } - } - var childrenLength = arguments.length - 2; - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - { - if (Object.freeze) { - Object.freeze(childArray); - } - } - props.children = childArray; - } - if (type && type.defaultProps) { - var defaultProps = type.defaultProps; - for (propName in defaultProps) { - if (props[propName] === void 0) { - props[propName] = defaultProps[propName]; - } - } - } - { - if (key || ref) { - var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; - if (key) { - defineKeyPropWarningGetter(props, displayName); - } - if (ref) { - defineRefPropWarningGetter(props, displayName); - } - } - } - return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); - } - function cloneAndReplaceKey(oldElement, newKey) { - var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); - return newElement; - } - function cloneElement(element, config, children) { - if (!!(element === null || element === void 0)) { - { - throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + "."); - } - } - var propName; - var props = _assign({}, element.props); - var key = element.key; - var ref = element.ref; - var self = element._self; - var source = element._source; - var owner = element._owner; - if (config != null) { - if (hasValidRef(config)) { - ref = config.ref; - owner = ReactCurrentOwner.current; - } - if (hasValidKey(config)) { - key = "" + config.key; - } - var defaultProps; - if (element.type && element.type.defaultProps) { - defaultProps = element.type.defaultProps; - } - for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - if (config[propName] === void 0 && defaultProps !== void 0) { - props[propName] = defaultProps[propName]; - } else { - props[propName] = config[propName]; - } - } - } - } - var childrenLength = arguments.length - 2; - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - props.children = childArray; - } - return ReactElement(element.type, key, ref, self, source, owner, props); - } - function isValidElement(object) { - return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; - } - var SEPARATOR = "."; - var SUBSEPARATOR = ":"; - function escape(key) { - var escapeRegex = /[=:]/g; - var escaperLookup = { - "=": "=0", - ":": "=2" - }; - var escapedString = key.replace(escapeRegex, function(match) { - return escaperLookup[match]; - }); - return "$" + escapedString; - } - var didWarnAboutMaps = false; - var userProvidedKeyEscapeRegex = /\/+/g; - function escapeUserProvidedKey(text) { - return text.replace(userProvidedKeyEscapeRegex, "$&/"); - } - function getElementKey(element, index) { - if (typeof element === "object" && element !== null && element.key != null) { - return escape("" + element.key); - } - return index.toString(36); - } - function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { - var type = typeof children; - if (type === "undefined" || type === "boolean") { - children = null; - } - var invokeCallback = false; - if (children === null) { - invokeCallback = true; - } else { - switch (type) { - case "string": - case "number": - invokeCallback = true; - break; - case "object": - switch (children.$$typeof) { - case REACT_ELEMENT_TYPE: - case REACT_PORTAL_TYPE: - invokeCallback = true; - } - } - } - if (invokeCallback) { - var _child = children; - var mappedChild = callback(_child); - var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar; - if (Array.isArray(mappedChild)) { - var escapedChildKey = ""; - if (childKey != null) { - escapedChildKey = escapeUserProvidedKey(childKey) + "/"; - } - mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) { - return c; - }); - } else if (mappedChild != null) { - if (isValidElement(mappedChild)) { - mappedChild = cloneAndReplaceKey(mappedChild, escapedPrefix + (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? escapeUserProvidedKey("" + mappedChild.key) + "/" : "") + childKey); - } - array.push(mappedChild); - } - return 1; - } - var child; - var nextName; - var subtreeCount = 0; - var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR; - if (Array.isArray(children)) { - for (var i = 0; i < children.length; i++) { - child = children[i]; - nextName = nextNamePrefix + getElementKey(child, i); - subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); - } - } else { - var iteratorFn = getIteratorFn(children); - if (typeof iteratorFn === "function") { - var iterableChildren = children; - { - if (iteratorFn === iterableChildren.entries) { - if (!didWarnAboutMaps) { - warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."); - } - didWarnAboutMaps = true; - } - } - var iterator = iteratorFn.call(iterableChildren); - var step; - var ii = 0; - while (!(step = iterator.next()).done) { - child = step.value; - nextName = nextNamePrefix + getElementKey(child, ii++); - subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); - } - } else if (type === "object") { - var childrenString = "" + children; - { - { - throw Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead."); - } - } - } - } - return subtreeCount; - } - function mapChildren(children, func, context) { - if (children == null) { - return children; - } - var result = []; - var count = 0; - mapIntoArray(children, result, "", "", function(child) { - return func.call(context, child, count++); - }); - return result; - } - function countChildren(children) { - var n = 0; - mapChildren(children, function() { - n++; - }); - return n; - } - function forEachChildren(children, forEachFunc, forEachContext) { - mapChildren(children, function() { - forEachFunc.apply(this, arguments); - }, forEachContext); - } - function toArray(children) { - return mapChildren(children, function(child) { - return child; - }) || []; - } - function onlyChild(children) { - if (!isValidElement(children)) { - { - throw Error("React.Children.only expected to receive a single React element child."); - } - } - return children; - } - function createContext(defaultValue, calculateChangedBits) { - if (calculateChangedBits === void 0) { - calculateChangedBits = null; - } else { - { - if (calculateChangedBits !== null && typeof calculateChangedBits !== "function") { - error("createContext: Expected the optional second argument to be a function. Instead received: %s", calculateChangedBits); - } - } - } - var context = { - $$typeof: REACT_CONTEXT_TYPE, - _calculateChangedBits: calculateChangedBits, - _currentValue: defaultValue, - _currentValue2: defaultValue, - _threadCount: 0, - Provider: null, - Consumer: null - }; - context.Provider = { - $$typeof: REACT_PROVIDER_TYPE, - _context: context - }; - var hasWarnedAboutUsingNestedContextConsumers = false; - var hasWarnedAboutUsingConsumerProvider = false; - var hasWarnedAboutDisplayNameOnConsumer = false; - { - var Consumer = { - $$typeof: REACT_CONTEXT_TYPE, - _context: context, - _calculateChangedBits: context._calculateChangedBits - }; - Object.defineProperties(Consumer, { - Provider: { - get: function() { - if (!hasWarnedAboutUsingConsumerProvider) { - hasWarnedAboutUsingConsumerProvider = true; - error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?"); - } - return context.Provider; - }, - set: function(_Provider) { - context.Provider = _Provider; - } - }, - _currentValue: { - get: function() { - return context._currentValue; - }, - set: function(_currentValue) { - context._currentValue = _currentValue; - } - }, - _currentValue2: { - get: function() { - return context._currentValue2; - }, - set: function(_currentValue2) { - context._currentValue2 = _currentValue2; - } - }, - _threadCount: { - get: function() { - return context._threadCount; - }, - set: function(_threadCount) { - context._threadCount = _threadCount; - } - }, - Consumer: { - get: function() { - if (!hasWarnedAboutUsingNestedContextConsumers) { - hasWarnedAboutUsingNestedContextConsumers = true; - error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?"); - } - return context.Consumer; - } - }, - displayName: { - get: function() { - return context.displayName; - }, - set: function(displayName) { - if (!hasWarnedAboutDisplayNameOnConsumer) { - warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName); - hasWarnedAboutDisplayNameOnConsumer = true; - } - } - } - }); - context.Consumer = Consumer; - } - { - context._currentRenderer = null; - context._currentRenderer2 = null; - } - return context; - } - var Uninitialized = -1; - var Pending = 0; - var Resolved = 1; - var Rejected = 2; - function lazyInitializer(payload) { - if (payload._status === Uninitialized) { - var ctor = payload._result; - var thenable = ctor(); - var pending = payload; - pending._status = Pending; - pending._result = thenable; - thenable.then(function(moduleObject) { - if (payload._status === Pending) { - var defaultExport = moduleObject.default; - { - if (defaultExport === void 0) { - error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject); - } - } - var resolved = payload; - resolved._status = Resolved; - resolved._result = defaultExport; - } - }, function(error2) { - if (payload._status === Pending) { - var rejected = payload; - rejected._status = Rejected; - rejected._result = error2; - } - }); - } - if (payload._status === Resolved) { - return payload._result; - } else { - throw payload._result; - } - } - function lazy(ctor) { - var payload = { - _status: -1, - _result: ctor - }; - var lazyType = { - $$typeof: REACT_LAZY_TYPE, - _payload: payload, - _init: lazyInitializer - }; - { - var defaultProps; - var propTypes; - Object.defineProperties(lazyType, { - defaultProps: { - configurable: true, - get: function() { - return defaultProps; - }, - set: function(newDefaultProps) { - error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); - defaultProps = newDefaultProps; - Object.defineProperty(lazyType, "defaultProps", { - enumerable: true - }); - } - }, - propTypes: { - configurable: true, - get: function() { - return propTypes; - }, - set: function(newPropTypes) { - error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); - propTypes = newPropTypes; - Object.defineProperty(lazyType, "propTypes", { - enumerable: true - }); - } - } - }); - } - return lazyType; - } - function forwardRef(render) { - { - if (render != null && render.$$typeof === REACT_MEMO_TYPE) { - error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."); - } else if (typeof render !== "function") { - error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render); - } else { - if (render.length !== 0 && render.length !== 2) { - error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."); - } - } - if (render != null) { - if (render.defaultProps != null || render.propTypes != null) { - error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"); - } - } - } - var elementType = { - $$typeof: REACT_FORWARD_REF_TYPE, - render - }; - { - var ownName; - Object.defineProperty(elementType, "displayName", { - enumerable: false, - configurable: true, - get: function() { - return ownName; - }, - set: function(name) { - ownName = name; - if (render.displayName == null) { - render.displayName = name; - } - } - }); - } - return elementType; - } - var enableScopeAPI = false; - function isValidElementType(type) { - if (typeof type === "string" || typeof type === "function") { - return true; - } - if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI) { - return true; - } - if (typeof type === "object" && type !== null) { - if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) { - return true; - } - } - return false; - } - function memo(type, compare) { - { - if (!isValidElementType(type)) { - error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type); - } - } - var elementType = { - $$typeof: REACT_MEMO_TYPE, - type, - compare: compare === void 0 ? null : compare - }; - { - var ownName; - Object.defineProperty(elementType, "displayName", { - enumerable: false, - configurable: true, - get: function() { - return ownName; - }, - set: function(name) { - ownName = name; - if (type.displayName == null) { - type.displayName = name; - } - } - }); - } - return elementType; - } - function resolveDispatcher() { - var dispatcher = ReactCurrentDispatcher.current; - if (!(dispatcher !== null)) { - { - throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."); - } - } - return dispatcher; - } - function useContext(Context, unstable_observedBits) { - var dispatcher = resolveDispatcher(); - { - if (unstable_observedBits !== void 0) { - error("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s", unstable_observedBits, typeof unstable_observedBits === "number" && Array.isArray(arguments[2]) ? "\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://reactjs.org/link/rules-of-hooks" : ""); - } - if (Context._context !== void 0) { - var realContext = Context._context; - if (realContext.Consumer === Context) { - error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"); - } else if (realContext.Provider === Context) { - error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?"); - } - } - } - return dispatcher.useContext(Context, unstable_observedBits); - } - function useState(initialState) { - var dispatcher = resolveDispatcher(); - return dispatcher.useState(initialState); - } - function useReducer(reducer, initialArg, init) { - var dispatcher = resolveDispatcher(); - return dispatcher.useReducer(reducer, initialArg, init); - } - function useRef(initialValue) { - var dispatcher = resolveDispatcher(); - return dispatcher.useRef(initialValue); - } - function useEffect(create, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useEffect(create, deps); - } - function useLayoutEffect(create, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useLayoutEffect(create, deps); - } - function useCallback(callback, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useCallback(callback, deps); - } - function useMemo(create, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useMemo(create, deps); - } - function useImperativeHandle(ref, create, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useImperativeHandle(ref, create, deps); - } - function useDebugValue(value, formatterFn) { - { - var dispatcher = resolveDispatcher(); - return dispatcher.useDebugValue(value, formatterFn); - } - } - var disabledDepth = 0; - var prevLog; - var prevInfo; - var prevWarn; - var prevError; - var prevGroup; - var prevGroupCollapsed; - var prevGroupEnd; - function disabledLog() { - } - disabledLog.__reactDisabledLog = true; - function disableLogs() { - { - if (disabledDepth === 0) { - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; - var props = { - configurable: true, - enumerable: true, - value: disabledLog, - writable: true - }; - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); - } - disabledDepth++; - } - } - function reenableLogs() { - { - disabledDepth--; - if (disabledDepth === 0) { - var props = { - configurable: true, - enumerable: true, - writable: true - }; - Object.defineProperties(console, { - log: _assign({}, props, { - value: prevLog - }), - info: _assign({}, props, { - value: prevInfo - }), - warn: _assign({}, props, { - value: prevWarn - }), - error: _assign({}, props, { - value: prevError - }), - group: _assign({}, props, { - value: prevGroup - }), - groupCollapsed: _assign({}, props, { - value: prevGroupCollapsed - }), - groupEnd: _assign({}, props, { - value: prevGroupEnd - }) - }); - } - if (disabledDepth < 0) { - error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); - } - } - } - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; - var prefix; - function describeBuiltInComponentFrame(name, source, ownerFn) { - { - if (prefix === void 0) { - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = match && match[1] || ""; - } - } - return "\n" + prefix + name; - } - } - var reentry = false; - var componentFrameCache; - { - var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; - componentFrameCache = new PossiblyWeakMap(); - } - function describeNativeComponentFrame(fn, construct) { - if (!fn || reentry) { - return ""; - } - { - var frame = componentFrameCache.get(fn); - if (frame !== void 0) { - return frame; - } - } - var control; - reentry = true; - var previousPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - var previousDispatcher; - { - previousDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = null; - disableLogs(); - } - try { - if (construct) { - var Fake = function() { - throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function() { - throw Error(); - } - }); - if (typeof Reflect === "object" && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - control = x; - } - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x) { - control = x; - } - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x) { - control = x; - } - fn(); - } - } catch (sample) { - if (sample && control && typeof sample.stack === "string") { - var sampleLines = sample.stack.split("\n"); - var controlLines = control.stack.split("\n"); - var s = sampleLines.length - 1; - var c = controlLines.length - 1; - while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { - c--; - } - for (; s >= 1 && c >= 0; s--, c--) { - if (sampleLines[s] !== controlLines[c]) { - if (s !== 1 || c !== 1) { - do { - s--; - c--; - if (c < 0 || sampleLines[s] !== controlLines[c]) { - var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); - { - if (typeof fn === "function") { - componentFrameCache.set(fn, _frame); - } - } - return _frame; - } - } while (s >= 1 && c >= 0); - } - break; - } - } - } - } finally { - reentry = false; - { - ReactCurrentDispatcher$1.current = previousDispatcher; - reenableLogs(); - } - Error.prepareStackTrace = previousPrepareStackTrace; - } - var name = fn ? fn.displayName || fn.name : ""; - var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; - { - if (typeof fn === "function") { - componentFrameCache.set(fn, syntheticFrame); - } - } - return syntheticFrame; - } - function describeFunctionComponentFrame(fn, source, ownerFn) { - { - return describeNativeComponentFrame(fn, false); - } - } - function shouldConstruct(Component2) { - var prototype = Component2.prototype; - return !!(prototype && prototype.isReactComponent); - } - function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { - if (type == null) { - return ""; - } - if (typeof type === "function") { - { - return describeNativeComponentFrame(type, shouldConstruct(type)); - } - } - if (typeof type === "string") { - return describeBuiltInComponentFrame(type); - } - switch (type) { - case exports.Suspense: - return describeBuiltInComponentFrame("Suspense"); - case REACT_SUSPENSE_LIST_TYPE: - return describeBuiltInComponentFrame("SuspenseList"); - } - if (typeof type === "object") { - switch (type.$$typeof) { - case REACT_FORWARD_REF_TYPE: - return describeFunctionComponentFrame(type.render); - case REACT_MEMO_TYPE: - return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); - case REACT_BLOCK_TYPE: - return describeFunctionComponentFrame(type._render); - case REACT_LAZY_TYPE: { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - try { - return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); - } catch (x) { - } - } - } - } - return ""; - } - var loggedTypeFailures = {}; - var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; - function setCurrentlyValidatingElement(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame$1.setExtraStackFrame(stack); - } else { - ReactDebugCurrentFrame$1.setExtraStackFrame(null); - } - } - } - function checkPropTypes(typeSpecs, values, location, componentName, element) { - { - var has = Function.call.bind(Object.prototype.hasOwnProperty); - for (var typeSpecName in typeSpecs) { - if (has(typeSpecs, typeSpecName)) { - var error$1 = void 0; - try { - if (typeof typeSpecs[typeSpecName] !== "function") { - var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); - err.name = "Invariant Violation"; - throw err; - } - error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); - } catch (ex) { - error$1 = ex; - } - if (error$1 && !(error$1 instanceof Error)) { - setCurrentlyValidatingElement(element); - error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); - setCurrentlyValidatingElement(null); - } - if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { - loggedTypeFailures[error$1.message] = true; - setCurrentlyValidatingElement(element); - error("Failed %s type: %s", location, error$1.message); - setCurrentlyValidatingElement(null); - } - } - } - } - } - function setCurrentlyValidatingElement$1(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - setExtraStackFrame(stack); - } else { - setExtraStackFrame(null); - } - } - } - var propTypesMisspellWarningShown; - { - propTypesMisspellWarningShown = false; - } - function getDeclarationErrorAddendum() { - if (ReactCurrentOwner.current) { - var name = getComponentName(ReactCurrentOwner.current.type); - if (name) { - return "\n\nCheck the render method of `" + name + "`."; - } - } - return ""; - } - function getSourceInfoErrorAddendum(source) { - if (source !== void 0) { - var fileName = source.fileName.replace(/^.*[\\\/]/, ""); - var lineNumber = source.lineNumber; - return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; - } - return ""; - } - function getSourceInfoErrorAddendumForProps(elementProps) { - if (elementProps !== null && elementProps !== void 0) { - return getSourceInfoErrorAddendum(elementProps.__source); - } - return ""; - } - var ownerHasKeyUseWarning = {}; - function getCurrentComponentErrorInfo(parentType) { - var info = getDeclarationErrorAddendum(); - if (!info) { - var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; - if (parentName) { - info = "\n\nCheck the top-level render call using <" + parentName + ">."; - } - } - return info; - } - function validateExplicitKey(element, parentType) { - if (!element._store || element._store.validated || element.key != null) { - return; - } - element._store.validated = true; - var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); - if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { - return; - } - ownerHasKeyUseWarning[currentComponentErrorInfo] = true; - var childOwner = ""; - if (element && element._owner && element._owner !== ReactCurrentOwner.current) { - childOwner = " It was passed a child from " + getComponentName(element._owner.type) + "."; - } - { - setCurrentlyValidatingElement$1(element); - error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); - setCurrentlyValidatingElement$1(null); - } - } - function validateChildKeys(node, parentType) { - if (typeof node !== "object") { - return; - } - if (Array.isArray(node)) { - for (var i = 0; i < node.length; i++) { - var child = node[i]; - if (isValidElement(child)) { - validateExplicitKey(child, parentType); - } - } - } else if (isValidElement(node)) { - if (node._store) { - node._store.validated = true; - } - } else if (node) { - var iteratorFn = getIteratorFn(node); - if (typeof iteratorFn === "function") { - if (iteratorFn !== node.entries) { - var iterator = iteratorFn.call(node); - var step; - while (!(step = iterator.next()).done) { - if (isValidElement(step.value)) { - validateExplicitKey(step.value, parentType); - } - } - } - } - } - } - function validatePropTypes(element) { - { - var type = element.type; - if (type === null || type === void 0 || typeof type === "string") { - return; - } - var propTypes; - if (typeof type === "function") { - propTypes = type.propTypes; - } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MEMO_TYPE)) { - propTypes = type.propTypes; - } else { - return; - } - if (propTypes) { - var name = getComponentName(type); - checkPropTypes(propTypes, element.props, "prop", name, element); - } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { - propTypesMisspellWarningShown = true; - var _name = getComponentName(type); - error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); - } - if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { - error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); - } - } - } - function validateFragmentProps(fragment) { - { - var keys = Object.keys(fragment.props); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (key !== "children" && key !== "key") { - setCurrentlyValidatingElement$1(fragment); - error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); - setCurrentlyValidatingElement$1(null); - break; - } - } - if (fragment.ref !== null) { - setCurrentlyValidatingElement$1(fragment); - error("Invalid attribute `ref` supplied to `React.Fragment`."); - setCurrentlyValidatingElement$1(null); - } - } - } - function createElementWithValidation(type, props, children) { - var validType = isValidElementType(type); - if (!validType) { - var info = ""; - if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { - info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; - } - var sourceInfo = getSourceInfoErrorAddendumForProps(props); - if (sourceInfo) { - info += sourceInfo; - } else { - info += getDeclarationErrorAddendum(); - } - var typeString; - if (type === null) { - typeString = "null"; - } else if (Array.isArray(type)) { - typeString = "array"; - } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { - typeString = "<" + (getComponentName(type.type) || "Unknown") + " />"; - info = " Did you accidentally export a JSX literal instead of a component?"; - } else { - typeString = typeof type; - } - { - error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); - } - } - var element = createElement.apply(this, arguments); - if (element == null) { - return element; - } - if (validType) { - for (var i = 2; i < arguments.length; i++) { - validateChildKeys(arguments[i], type); - } - } - if (type === exports.Fragment) { - validateFragmentProps(element); - } else { - validatePropTypes(element); - } - return element; - } - var didWarnAboutDeprecatedCreateFactory = false; - function createFactoryWithValidation(type) { - var validatedFactory = createElementWithValidation.bind(null, type); - validatedFactory.type = type; - { - if (!didWarnAboutDeprecatedCreateFactory) { - didWarnAboutDeprecatedCreateFactory = true; - warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead."); - } - Object.defineProperty(validatedFactory, "type", { - enumerable: false, - get: function() { - warn("Factory.type is deprecated. Access the class directly before passing it to createFactory."); - Object.defineProperty(this, "type", { - value: type - }); - return type; - } - }); - } - return validatedFactory; - } - function cloneElementWithValidation(element, props, children) { - var newElement = cloneElement.apply(this, arguments); - for (var i = 2; i < arguments.length; i++) { - validateChildKeys(arguments[i], newElement.type); - } - validatePropTypes(newElement); - return newElement; - } - { - try { - var frozenObject = Object.freeze({}); - new Map([[frozenObject, null]]); - new Set([frozenObject]); - } catch (e) { - } - } - var createElement$1 = createElementWithValidation; - var cloneElement$1 = cloneElementWithValidation; - var createFactory = createFactoryWithValidation; - var Children = { - map: mapChildren, - forEach: forEachChildren, - count: countChildren, - toArray, - only: onlyChild - }; - exports.Children = Children; - exports.Component = Component; - exports.PureComponent = PureComponent; - exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; - exports.cloneElement = cloneElement$1; - exports.createContext = createContext; - exports.createElement = createElement$1; - exports.createFactory = createFactory; - exports.createRef = createRef; - exports.forwardRef = forwardRef; - exports.isValidElement = isValidElement; - exports.lazy = lazy; - exports.memo = memo; - exports.useCallback = useCallback; - exports.useContext = useContext; - exports.useDebugValue = useDebugValue; - exports.useEffect = useEffect; - exports.useImperativeHandle = useImperativeHandle; - exports.useLayoutEffect = useLayoutEffect; - exports.useMemo = useMemo; - exports.useReducer = useReducer; - exports.useRef = useRef; - exports.useState = useState; - exports.version = ReactVersion; - })(); - } - } - }); - - // ../../node_modules/.pnpm/react@17.0.2/node_modules/react/index.js - var require_react = __commonJS({ - "../../node_modules/.pnpm/react@17.0.2/node_modules/react/index.js"(exports, module) { - "use strict"; - if (false) { - module.exports = null; - } else { - module.exports = require_react_development(); - } - } - }); - - // ../../node_modules/.pnpm/scheduler@0.20.2/node_modules/scheduler/cjs/scheduler.development.js - var require_scheduler_development = __commonJS({ - "../../node_modules/.pnpm/scheduler@0.20.2/node_modules/scheduler/cjs/scheduler.development.js"(exports) { - "use strict"; - if (true) { - (function() { - "use strict"; - var enableSchedulerDebugging = false; - var enableProfiling = false; - var requestHostCallback; - var requestHostTimeout; - var cancelHostTimeout; - var requestPaint; - var hasPerformanceNow = typeof performance === "object" && typeof performance.now === "function"; - if (hasPerformanceNow) { - var localPerformance = performance; - exports.unstable_now = function() { - return localPerformance.now(); - }; - } else { - var localDate = Date; - var initialTime = localDate.now(); - exports.unstable_now = function() { - return localDate.now() - initialTime; - }; - } - if (typeof window === "undefined" || typeof MessageChannel !== "function") { - var _callback = null; - var _timeoutID = null; - var _flushCallback = function() { - if (_callback !== null) { - try { - var currentTime = exports.unstable_now(); - var hasRemainingTime = true; - _callback(hasRemainingTime, currentTime); - _callback = null; - } catch (e) { - setTimeout(_flushCallback, 0); - throw e; - } - } - }; - requestHostCallback = function(cb) { - if (_callback !== null) { - setTimeout(requestHostCallback, 0, cb); - } else { - _callback = cb; - setTimeout(_flushCallback, 0); - } - }; - requestHostTimeout = function(cb, ms) { - _timeoutID = setTimeout(cb, ms); - }; - cancelHostTimeout = function() { - clearTimeout(_timeoutID); - }; - exports.unstable_shouldYield = function() { - return false; - }; - requestPaint = exports.unstable_forceFrameRate = function() { - }; - } else { - var _setTimeout = window.setTimeout; - var _clearTimeout = window.clearTimeout; - if (typeof console !== "undefined") { - var requestAnimationFrame = window.requestAnimationFrame; - var cancelAnimationFrame = window.cancelAnimationFrame; - if (typeof requestAnimationFrame !== "function") { - console["error"]("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"); - } - if (typeof cancelAnimationFrame !== "function") { - console["error"]("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"); - } - } - var isMessageLoopRunning = false; - var scheduledHostCallback = null; - var taskTimeoutID = -1; - var yieldInterval = 5; - var deadline = 0; - { - exports.unstable_shouldYield = function() { - return exports.unstable_now() >= deadline; - }; - requestPaint = function() { - }; - } - exports.unstable_forceFrameRate = function(fps) { - if (fps < 0 || fps > 125) { - console["error"]("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"); - return; - } - if (fps > 0) { - yieldInterval = Math.floor(1e3 / fps); - } else { - yieldInterval = 5; - } - }; - var performWorkUntilDeadline = function() { - if (scheduledHostCallback !== null) { - var currentTime = exports.unstable_now(); - deadline = currentTime + yieldInterval; - var hasTimeRemaining = true; - try { - var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); - if (!hasMoreWork) { - isMessageLoopRunning = false; - scheduledHostCallback = null; - } else { - port.postMessage(null); - } - } catch (error) { - port.postMessage(null); - throw error; - } - } else { - isMessageLoopRunning = false; - } - }; - var channel = new MessageChannel(); - var port = channel.port2; - channel.port1.onmessage = performWorkUntilDeadline; - requestHostCallback = function(callback) { - scheduledHostCallback = callback; - if (!isMessageLoopRunning) { - isMessageLoopRunning = true; - port.postMessage(null); - } - }; - requestHostTimeout = function(callback, ms) { - taskTimeoutID = _setTimeout(function() { - callback(exports.unstable_now()); - }, ms); - }; - cancelHostTimeout = function() { - _clearTimeout(taskTimeoutID); - taskTimeoutID = -1; - }; - } - function push(heap, node) { - var index = heap.length; - heap.push(node); - siftUp(heap, node, index); - } - function peek(heap) { - var first = heap[0]; - return first === void 0 ? null : first; - } - function pop(heap) { - var first = heap[0]; - if (first !== void 0) { - var last = heap.pop(); - if (last !== first) { - heap[0] = last; - siftDown(heap, last, 0); - } - return first; - } else { - return null; - } - } - function siftUp(heap, node, i) { - var index = i; - while (true) { - var parentIndex = index - 1 >>> 1; - var parent = heap[parentIndex]; - if (parent !== void 0 && compare(parent, node) > 0) { - heap[parentIndex] = node; - heap[index] = parent; - index = parentIndex; - } else { - return; - } - } - } - function siftDown(heap, node, i) { - var index = i; - var length = heap.length; - while (index < length) { - var leftIndex = (index + 1) * 2 - 1; - var left = heap[leftIndex]; - var rightIndex = leftIndex + 1; - var right = heap[rightIndex]; - if (left !== void 0 && compare(left, node) < 0) { - if (right !== void 0 && compare(right, left) < 0) { - heap[index] = right; - heap[rightIndex] = node; - index = rightIndex; - } else { - heap[index] = left; - heap[leftIndex] = node; - index = leftIndex; - } - } else if (right !== void 0 && compare(right, node) < 0) { - heap[index] = right; - heap[rightIndex] = node; - index = rightIndex; - } else { - return; - } - } - } - function compare(a, b) { - var diff = a.sortIndex - b.sortIndex; - return diff !== 0 ? diff : a.id - b.id; - } - var ImmediatePriority = 1; - var UserBlockingPriority = 2; - var NormalPriority = 3; - var LowPriority = 4; - var IdlePriority = 5; - function markTaskErrored(task, ms) { - } - var maxSigned31BitInt = 1073741823; - var IMMEDIATE_PRIORITY_TIMEOUT = -1; - var USER_BLOCKING_PRIORITY_TIMEOUT = 250; - var NORMAL_PRIORITY_TIMEOUT = 5e3; - var LOW_PRIORITY_TIMEOUT = 1e4; - var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; - var taskQueue = []; - var timerQueue = []; - var taskIdCounter = 1; - var currentTask = null; - var currentPriorityLevel = NormalPriority; - var isPerformingWork = false; - var isHostCallbackScheduled = false; - var isHostTimeoutScheduled = false; - function advanceTimers(currentTime) { - var timer = peek(timerQueue); - while (timer !== null) { - if (timer.callback === null) { - pop(timerQueue); - } else if (timer.startTime <= currentTime) { - pop(timerQueue); - timer.sortIndex = timer.expirationTime; - push(taskQueue, timer); - } else { - return; - } - timer = peek(timerQueue); - } - } - function handleTimeout(currentTime) { - isHostTimeoutScheduled = false; - advanceTimers(currentTime); - if (!isHostCallbackScheduled) { - if (peek(taskQueue) !== null) { - isHostCallbackScheduled = true; - requestHostCallback(flushWork); - } else { - var firstTimer = peek(timerQueue); - if (firstTimer !== null) { - requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); - } - } - } - } - function flushWork(hasTimeRemaining, initialTime2) { - isHostCallbackScheduled = false; - if (isHostTimeoutScheduled) { - isHostTimeoutScheduled = false; - cancelHostTimeout(); - } - isPerformingWork = true; - var previousPriorityLevel = currentPriorityLevel; - try { - if (enableProfiling) { - try { - return workLoop(hasTimeRemaining, initialTime2); - } catch (error) { - if (currentTask !== null) { - var currentTime = exports.unstable_now(); - markTaskErrored(currentTask, currentTime); - currentTask.isQueued = false; - } - throw error; - } - } else { - return workLoop(hasTimeRemaining, initialTime2); - } - } finally { - currentTask = null; - currentPriorityLevel = previousPriorityLevel; - isPerformingWork = false; - } - } - function workLoop(hasTimeRemaining, initialTime2) { - var currentTime = initialTime2; - advanceTimers(currentTime); - currentTask = peek(taskQueue); - while (currentTask !== null && !enableSchedulerDebugging) { - if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || exports.unstable_shouldYield())) { - break; - } - var callback = currentTask.callback; - if (typeof callback === "function") { - currentTask.callback = null; - currentPriorityLevel = currentTask.priorityLevel; - var didUserCallbackTimeout = currentTask.expirationTime <= currentTime; - var continuationCallback = callback(didUserCallbackTimeout); - currentTime = exports.unstable_now(); - if (typeof continuationCallback === "function") { - currentTask.callback = continuationCallback; - } else { - if (currentTask === peek(taskQueue)) { - pop(taskQueue); - } - } - advanceTimers(currentTime); - } else { - pop(taskQueue); - } - currentTask = peek(taskQueue); - } - if (currentTask !== null) { - return true; - } else { - var firstTimer = peek(timerQueue); - if (firstTimer !== null) { - requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); - } - return false; - } - } - function unstable_runWithPriority(priorityLevel, eventHandler) { - switch (priorityLevel) { - case ImmediatePriority: - case UserBlockingPriority: - case NormalPriority: - case LowPriority: - case IdlePriority: - break; - default: - priorityLevel = NormalPriority; - } - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = priorityLevel; - try { - return eventHandler(); - } finally { - currentPriorityLevel = previousPriorityLevel; - } - } - function unstable_next(eventHandler) { - var priorityLevel; - switch (currentPriorityLevel) { - case ImmediatePriority: - case UserBlockingPriority: - case NormalPriority: - priorityLevel = NormalPriority; - break; - default: - priorityLevel = currentPriorityLevel; - break; - } - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = priorityLevel; - try { - return eventHandler(); - } finally { - currentPriorityLevel = previousPriorityLevel; - } - } - function unstable_wrapCallback(callback) { - var parentPriorityLevel = currentPriorityLevel; - return function() { - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = parentPriorityLevel; - try { - return callback.apply(this, arguments); - } finally { - currentPriorityLevel = previousPriorityLevel; - } - }; - } - function unstable_scheduleCallback(priorityLevel, callback, options) { - var currentTime = exports.unstable_now(); - var startTime; - if (typeof options === "object" && options !== null) { - var delay = options.delay; - if (typeof delay === "number" && delay > 0) { - startTime = currentTime + delay; - } else { - startTime = currentTime; - } - } else { - startTime = currentTime; - } - var timeout; - switch (priorityLevel) { - case ImmediatePriority: - timeout = IMMEDIATE_PRIORITY_TIMEOUT; - break; - case UserBlockingPriority: - timeout = USER_BLOCKING_PRIORITY_TIMEOUT; - break; - case IdlePriority: - timeout = IDLE_PRIORITY_TIMEOUT; - break; - case LowPriority: - timeout = LOW_PRIORITY_TIMEOUT; - break; - case NormalPriority: - default: - timeout = NORMAL_PRIORITY_TIMEOUT; - break; - } - var expirationTime = startTime + timeout; - var newTask = { - id: taskIdCounter++, - callback, - priorityLevel, - startTime, - expirationTime, - sortIndex: -1 - }; - if (startTime > currentTime) { - newTask.sortIndex = startTime; - push(timerQueue, newTask); - if (peek(taskQueue) === null && newTask === peek(timerQueue)) { - if (isHostTimeoutScheduled) { - cancelHostTimeout(); - } else { - isHostTimeoutScheduled = true; - } - requestHostTimeout(handleTimeout, startTime - currentTime); - } - } else { - newTask.sortIndex = expirationTime; - push(taskQueue, newTask); - if (!isHostCallbackScheduled && !isPerformingWork) { - isHostCallbackScheduled = true; - requestHostCallback(flushWork); - } - } - return newTask; - } - function unstable_pauseExecution() { - } - function unstable_continueExecution() { - if (!isHostCallbackScheduled && !isPerformingWork) { - isHostCallbackScheduled = true; - requestHostCallback(flushWork); - } - } - function unstable_getFirstCallbackNode() { - return peek(taskQueue); - } - function unstable_cancelCallback(task) { - task.callback = null; - } - function unstable_getCurrentPriorityLevel() { - return currentPriorityLevel; - } - var unstable_requestPaint = requestPaint; - var unstable_Profiling = null; - exports.unstable_IdlePriority = IdlePriority; - exports.unstable_ImmediatePriority = ImmediatePriority; - exports.unstable_LowPriority = LowPriority; - exports.unstable_NormalPriority = NormalPriority; - exports.unstable_Profiling = unstable_Profiling; - exports.unstable_UserBlockingPriority = UserBlockingPriority; - exports.unstable_cancelCallback = unstable_cancelCallback; - exports.unstable_continueExecution = unstable_continueExecution; - exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; - exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode; - exports.unstable_next = unstable_next; - exports.unstable_pauseExecution = unstable_pauseExecution; - exports.unstable_requestPaint = unstable_requestPaint; - exports.unstable_runWithPriority = unstable_runWithPriority; - exports.unstable_scheduleCallback = unstable_scheduleCallback; - exports.unstable_wrapCallback = unstable_wrapCallback; - })(); - } - } - }); - - // ../../node_modules/.pnpm/scheduler@0.20.2/node_modules/scheduler/index.js - var require_scheduler = __commonJS({ - "../../node_modules/.pnpm/scheduler@0.20.2/node_modules/scheduler/index.js"(exports, module) { - "use strict"; - if (false) { - module.exports = null; - } else { - module.exports = require_scheduler_development(); - } - } - }); - - // ../../node_modules/.pnpm/scheduler@0.20.2/node_modules/scheduler/cjs/scheduler-tracing.development.js - var require_scheduler_tracing_development = __commonJS({ - "../../node_modules/.pnpm/scheduler@0.20.2/node_modules/scheduler/cjs/scheduler-tracing.development.js"(exports) { - "use strict"; - if (true) { - (function() { - "use strict"; - var DEFAULT_THREAD_ID = 0; - var interactionIDCounter = 0; - var threadIDCounter = 0; - exports.__interactionsRef = null; - exports.__subscriberRef = null; - { - exports.__interactionsRef = { - current: new Set() - }; - exports.__subscriberRef = { - current: null - }; - } - function unstable_clear(callback) { - var prevInteractions = exports.__interactionsRef.current; - exports.__interactionsRef.current = new Set(); - try { - return callback(); - } finally { - exports.__interactionsRef.current = prevInteractions; - } - } - function unstable_getCurrent() { - { - return exports.__interactionsRef.current; - } - } - function unstable_getThreadID() { - return ++threadIDCounter; - } - function unstable_trace(name, timestamp, callback) { - var threadID = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : DEFAULT_THREAD_ID; - var interaction = { - __count: 1, - id: interactionIDCounter++, - name, - timestamp - }; - var prevInteractions = exports.__interactionsRef.current; - var interactions = new Set(prevInteractions); - interactions.add(interaction); - exports.__interactionsRef.current = interactions; - var subscriber = exports.__subscriberRef.current; - var returnValue; - try { - if (subscriber !== null) { - subscriber.onInteractionTraced(interaction); - } - } finally { - try { - if (subscriber !== null) { - subscriber.onWorkStarted(interactions, threadID); - } - } finally { - try { - returnValue = callback(); - } finally { - exports.__interactionsRef.current = prevInteractions; - try { - if (subscriber !== null) { - subscriber.onWorkStopped(interactions, threadID); - } - } finally { - interaction.__count--; - if (subscriber !== null && interaction.__count === 0) { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } - } - } - } - } - return returnValue; - } - function unstable_wrap(callback) { - var threadID = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : DEFAULT_THREAD_ID; - var wrappedInteractions = exports.__interactionsRef.current; - var subscriber = exports.__subscriberRef.current; - if (subscriber !== null) { - subscriber.onWorkScheduled(wrappedInteractions, threadID); - } - wrappedInteractions.forEach(function(interaction) { - interaction.__count++; - }); - var hasRun = false; - function wrapped() { - var prevInteractions = exports.__interactionsRef.current; - exports.__interactionsRef.current = wrappedInteractions; - subscriber = exports.__subscriberRef.current; - try { - var returnValue; - try { - if (subscriber !== null) { - subscriber.onWorkStarted(wrappedInteractions, threadID); - } - } finally { - try { - returnValue = callback.apply(void 0, arguments); - } finally { - exports.__interactionsRef.current = prevInteractions; - if (subscriber !== null) { - subscriber.onWorkStopped(wrappedInteractions, threadID); - } - } - } - return returnValue; - } finally { - if (!hasRun) { - hasRun = true; - wrappedInteractions.forEach(function(interaction) { - interaction.__count--; - if (subscriber !== null && interaction.__count === 0) { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } - }); - } - } - } - wrapped.cancel = function cancel() { - subscriber = exports.__subscriberRef.current; - try { - if (subscriber !== null) { - subscriber.onWorkCanceled(wrappedInteractions, threadID); - } - } finally { - wrappedInteractions.forEach(function(interaction) { - interaction.__count--; - if (subscriber && interaction.__count === 0) { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } - }); - } - }; - return wrapped; - } - var subscribers = null; - { - subscribers = new Set(); - } - function unstable_subscribe(subscriber) { - { - subscribers.add(subscriber); - if (subscribers.size === 1) { - exports.__subscriberRef.current = { - onInteractionScheduledWorkCompleted, - onInteractionTraced, - onWorkCanceled, - onWorkScheduled, - onWorkStarted, - onWorkStopped - }; - } - } - } - function unstable_unsubscribe(subscriber) { - { - subscribers.delete(subscriber); - if (subscribers.size === 0) { - exports.__subscriberRef.current = null; - } - } - } - function onInteractionTraced(interaction) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function(subscriber) { - try { - subscriber.onInteractionTraced(interaction); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - if (didCatchError) { - throw caughtError; - } - } - function onInteractionScheduledWorkCompleted(interaction) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function(subscriber) { - try { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - if (didCatchError) { - throw caughtError; - } - } - function onWorkScheduled(interactions, threadID) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function(subscriber) { - try { - subscriber.onWorkScheduled(interactions, threadID); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - if (didCatchError) { - throw caughtError; - } - } - function onWorkStarted(interactions, threadID) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function(subscriber) { - try { - subscriber.onWorkStarted(interactions, threadID); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - if (didCatchError) { - throw caughtError; - } - } - function onWorkStopped(interactions, threadID) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function(subscriber) { - try { - subscriber.onWorkStopped(interactions, threadID); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - if (didCatchError) { - throw caughtError; - } - } - function onWorkCanceled(interactions, threadID) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function(subscriber) { - try { - subscriber.onWorkCanceled(interactions, threadID); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - if (didCatchError) { - throw caughtError; - } - } - exports.unstable_clear = unstable_clear; - exports.unstable_getCurrent = unstable_getCurrent; - exports.unstable_getThreadID = unstable_getThreadID; - exports.unstable_subscribe = unstable_subscribe; - exports.unstable_trace = unstable_trace; - exports.unstable_unsubscribe = unstable_unsubscribe; - exports.unstable_wrap = unstable_wrap; - })(); - } - } - }); - - // ../../node_modules/.pnpm/scheduler@0.20.2/node_modules/scheduler/tracing.js - var require_tracing = __commonJS({ - "../../node_modules/.pnpm/scheduler@0.20.2/node_modules/scheduler/tracing.js"(exports, module) { - "use strict"; - if (false) { - module.exports = null; - } else { - module.exports = require_scheduler_tracing_development(); - } - } - }); - - // ../../node_modules/.pnpm/react-dom@17.0.2_react@17.0.2/node_modules/react-dom/cjs/react-dom.development.js - var require_react_dom_development = __commonJS({ - "../../node_modules/.pnpm/react-dom@17.0.2_react@17.0.2/node_modules/react-dom/cjs/react-dom.development.js"(exports) { - "use strict"; - if (true) { - (function() { - "use strict"; - var React = require_react(); - var _assign = require_object_assign(); - var Scheduler = require_scheduler(); - var tracing = require_tracing(); - var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - function warn(format) { - { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - printWarning("warn", format, args); - } - } - function error(format) { - { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - printWarning("error", format, args); - } - } - function printWarning(level, format, args) { - { - var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame2.getStackAddendum(); - if (stack !== "") { - format += "%s"; - args = args.concat([stack]); - } - var argsWithFormat = args.map(function(item) { - return "" + item; - }); - argsWithFormat.unshift("Warning: " + format); - Function.prototype.apply.call(console[level], console, argsWithFormat); - } - } - if (!React) { - { - throw Error("ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM."); - } - } - var FunctionComponent = 0; - var ClassComponent = 1; - var IndeterminateComponent = 2; - var HostRoot = 3; - var HostPortal = 4; - var HostComponent = 5; - var HostText = 6; - var Fragment = 7; - var Mode = 8; - var ContextConsumer = 9; - var ContextProvider = 10; - var ForwardRef = 11; - var Profiler = 12; - var SuspenseComponent = 13; - var MemoComponent = 14; - var SimpleMemoComponent = 15; - var LazyComponent = 16; - var IncompleteClassComponent = 17; - var DehydratedFragment = 18; - var SuspenseListComponent = 19; - var FundamentalComponent = 20; - var ScopeComponent = 21; - var Block = 22; - var OffscreenComponent = 23; - var LegacyHiddenComponent = 24; - var enableProfilerTimer = true; - var enableFundamentalAPI = false; - var enableNewReconciler = false; - var warnAboutStringRefs = false; - var allNativeEvents = new Set(); - var registrationNameDependencies = {}; - var possibleRegistrationNames = {}; - function registerTwoPhaseEvent(registrationName, dependencies) { - registerDirectEvent(registrationName, dependencies); - registerDirectEvent(registrationName + "Capture", dependencies); - } - function registerDirectEvent(registrationName, dependencies) { - { - if (registrationNameDependencies[registrationName]) { - error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", registrationName); - } - } - registrationNameDependencies[registrationName] = dependencies; - { - var lowerCasedName = registrationName.toLowerCase(); - possibleRegistrationNames[lowerCasedName] = registrationName; - if (registrationName === "onDoubleClick") { - possibleRegistrationNames.ondblclick = registrationName; - } - } - for (var i = 0; i < dependencies.length; i++) { - allNativeEvents.add(dependencies[i]); - } - } - var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined"); - var RESERVED = 0; - var STRING = 1; - var BOOLEANISH_STRING = 2; - var BOOLEAN = 3; - var OVERLOADED_BOOLEAN = 4; - var NUMERIC = 5; - var POSITIVE_NUMERIC = 6; - var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var ROOT_ATTRIBUTE_NAME = "data-reactroot"; - var VALID_ATTRIBUTE_NAME_REGEX = new RegExp("^[" + ATTRIBUTE_NAME_START_CHAR + "][" + ATTRIBUTE_NAME_CHAR + "]*$"); - var hasOwnProperty = Object.prototype.hasOwnProperty; - var illegalAttributeNameCache = {}; - var validatedAttributeNameCache = {}; - function isAttributeNameSafe(attributeName) { - if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { - return true; - } - if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { - return false; - } - if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { - validatedAttributeNameCache[attributeName] = true; - return true; - } - illegalAttributeNameCache[attributeName] = true; - { - error("Invalid attribute name: `%s`", attributeName); - } - return false; - } - function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { - if (propertyInfo !== null) { - return propertyInfo.type === RESERVED; - } - if (isCustomComponentTag) { - return false; - } - if (name.length > 2 && (name[0] === "o" || name[0] === "O") && (name[1] === "n" || name[1] === "N")) { - return true; - } - return false; - } - function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { - if (propertyInfo !== null && propertyInfo.type === RESERVED) { - return false; - } - switch (typeof value) { - case "function": - case "symbol": - return true; - case "boolean": { - if (isCustomComponentTag) { - return false; - } - if (propertyInfo !== null) { - return !propertyInfo.acceptsBooleans; - } else { - var prefix2 = name.toLowerCase().slice(0, 5); - return prefix2 !== "data-" && prefix2 !== "aria-"; - } - } - default: - return false; - } - } - function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { - if (value === null || typeof value === "undefined") { - return true; - } - if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { - return true; - } - if (isCustomComponentTag) { - return false; - } - if (propertyInfo !== null) { - switch (propertyInfo.type) { - case BOOLEAN: - return !value; - case OVERLOADED_BOOLEAN: - return value === false; - case NUMERIC: - return isNaN(value); - case POSITIVE_NUMERIC: - return isNaN(value) || value < 1; - } - } - return false; - } - function getPropertyInfo(name) { - return properties.hasOwnProperty(name) ? properties[name] : null; - } - function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL2, removeEmptyString) { - this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; - this.attributeName = attributeName; - this.attributeNamespace = attributeNamespace; - this.mustUseProperty = mustUseProperty; - this.propertyName = name; - this.type = type; - this.sanitizeURL = sanitizeURL2; - this.removeEmptyString = removeEmptyString; - } - var properties = {}; - var reservedProps = [ - "children", - "dangerouslySetInnerHTML", - "defaultValue", - "defaultChecked", - "innerHTML", - "suppressContentEditableWarning", - "suppressHydrationWarning", - "style" - ]; - reservedProps.forEach(function(name) { - properties[name] = new PropertyInfoRecord(name, RESERVED, false, name, null, false, false); - }); - [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(_ref) { - var name = _ref[0], attributeName = _ref[1]; - properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, null, false, false); - }); - ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(name) { - properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, name.toLowerCase(), null, false, false); - }); - ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(name) { - properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, name, null, false, false); - }); - [ - "allowFullScreen", - "async", - "autoFocus", - "autoPlay", - "controls", - "default", - "defer", - "disabled", - "disablePictureInPicture", - "disableRemotePlayback", - "formNoValidate", - "hidden", - "loop", - "noModule", - "noValidate", - "open", - "playsInline", - "readOnly", - "required", - "reversed", - "scoped", - "seamless", - "itemScope" - ].forEach(function(name) { - properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, name.toLowerCase(), null, false, false); - }); - [ - "checked", - "multiple", - "muted", - "selected" - ].forEach(function(name) { - properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, name, null, false, false); - }); - [ - "capture", - "download" - ].forEach(function(name) { - properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, name, null, false, false); - }); - [ - "cols", - "rows", - "size", - "span" - ].forEach(function(name) { - properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, name, null, false, false); - }); - ["rowSpan", "start"].forEach(function(name) { - properties[name] = new PropertyInfoRecord(name, NUMERIC, false, name.toLowerCase(), null, false, false); - }); - var CAMELIZE = /[\-\:]([a-z])/g; - var capitalize = function(token) { - return token[1].toUpperCase(); - }; - [ - "accent-height", - "alignment-baseline", - "arabic-form", - "baseline-shift", - "cap-height", - "clip-path", - "clip-rule", - "color-interpolation", - "color-interpolation-filters", - "color-profile", - "color-rendering", - "dominant-baseline", - "enable-background", - "fill-opacity", - "fill-rule", - "flood-color", - "flood-opacity", - "font-family", - "font-size", - "font-size-adjust", - "font-stretch", - "font-style", - "font-variant", - "font-weight", - "glyph-name", - "glyph-orientation-horizontal", - "glyph-orientation-vertical", - "horiz-adv-x", - "horiz-origin-x", - "image-rendering", - "letter-spacing", - "lighting-color", - "marker-end", - "marker-mid", - "marker-start", - "overline-position", - "overline-thickness", - "paint-order", - "panose-1", - "pointer-events", - "rendering-intent", - "shape-rendering", - "stop-color", - "stop-opacity", - "strikethrough-position", - "strikethrough-thickness", - "stroke-dasharray", - "stroke-dashoffset", - "stroke-linecap", - "stroke-linejoin", - "stroke-miterlimit", - "stroke-opacity", - "stroke-width", - "text-anchor", - "text-decoration", - "text-rendering", - "underline-position", - "underline-thickness", - "unicode-bidi", - "unicode-range", - "units-per-em", - "v-alphabetic", - "v-hanging", - "v-ideographic", - "v-mathematical", - "vector-effect", - "vert-adv-y", - "vert-origin-x", - "vert-origin-y", - "word-spacing", - "writing-mode", - "xmlns:xlink", - "x-height" - ].forEach(function(attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, null, false, false); - }); - [ - "xlink:actuate", - "xlink:arcrole", - "xlink:role", - "xlink:show", - "xlink:title", - "xlink:type" - ].forEach(function(attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, "http://www.w3.org/1999/xlink", false, false); - }); - [ - "xml:base", - "xml:lang", - "xml:space" - ].forEach(function(attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, "http://www.w3.org/XML/1998/namespace", false, false); - }); - ["tabIndex", "crossOrigin"].forEach(function(attributeName) { - properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, attributeName.toLowerCase(), null, false, false); - }); - var xlinkHref = "xlinkHref"; - properties[xlinkHref] = new PropertyInfoRecord("xlinkHref", STRING, false, "xlink:href", "http://www.w3.org/1999/xlink", true, false); - ["src", "href", "action", "formAction"].forEach(function(attributeName) { - properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, attributeName.toLowerCase(), null, true, true); - }); - var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; - var didWarn = false; - function sanitizeURL(url) { - { - if (!didWarn && isJavaScriptProtocol.test(url)) { - didWarn = true; - error("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.", JSON.stringify(url)); - } - } - } - function getValueForProperty(node, name, expected, propertyInfo) { - { - if (propertyInfo.mustUseProperty) { - var propertyName = propertyInfo.propertyName; - return node[propertyName]; - } else { - if (propertyInfo.sanitizeURL) { - sanitizeURL("" + expected); - } - var attributeName = propertyInfo.attributeName; - var stringValue = null; - if (propertyInfo.type === OVERLOADED_BOOLEAN) { - if (node.hasAttribute(attributeName)) { - var value = node.getAttribute(attributeName); - if (value === "") { - return true; - } - if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { - return value; - } - if (value === "" + expected) { - return expected; - } - return value; - } - } else if (node.hasAttribute(attributeName)) { - if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { - return node.getAttribute(attributeName); - } - if (propertyInfo.type === BOOLEAN) { - return expected; - } - stringValue = node.getAttribute(attributeName); - } - if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { - return stringValue === null ? expected : stringValue; - } else if (stringValue === "" + expected) { - return expected; - } else { - return stringValue; - } - } - } - } - function getValueForAttribute(node, name, expected) { - { - if (!isAttributeNameSafe(name)) { - return; - } - if (isOpaqueHydratingObject(expected)) { - return expected; - } - if (!node.hasAttribute(name)) { - return expected === void 0 ? void 0 : null; - } - var value = node.getAttribute(name); - if (value === "" + expected) { - return expected; - } - return value; - } - } - function setValueForProperty(node, name, value, isCustomComponentTag) { - var propertyInfo = getPropertyInfo(name); - if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) { - return; - } - if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) { - value = null; - } - if (isCustomComponentTag || propertyInfo === null) { - if (isAttributeNameSafe(name)) { - var _attributeName = name; - if (value === null) { - node.removeAttribute(_attributeName); - } else { - node.setAttribute(_attributeName, "" + value); - } - } - return; - } - var mustUseProperty = propertyInfo.mustUseProperty; - if (mustUseProperty) { - var propertyName = propertyInfo.propertyName; - if (value === null) { - var type = propertyInfo.type; - node[propertyName] = type === BOOLEAN ? false : ""; - } else { - node[propertyName] = value; - } - return; - } - var attributeName = propertyInfo.attributeName, attributeNamespace = propertyInfo.attributeNamespace; - if (value === null) { - node.removeAttribute(attributeName); - } else { - var _type = propertyInfo.type; - var attributeValue; - if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) { - attributeValue = ""; - } else { - { - attributeValue = "" + value; - } - if (propertyInfo.sanitizeURL) { - sanitizeURL(attributeValue.toString()); - } - } - if (attributeNamespace) { - node.setAttributeNS(attributeNamespace, attributeName, attributeValue); - } else { - node.setAttribute(attributeName, attributeValue); - } - } - } - var REACT_ELEMENT_TYPE = 60103; - var REACT_PORTAL_TYPE = 60106; - var REACT_FRAGMENT_TYPE = 60107; - var REACT_STRICT_MODE_TYPE = 60108; - var REACT_PROFILER_TYPE = 60114; - var REACT_PROVIDER_TYPE = 60109; - var REACT_CONTEXT_TYPE = 60110; - var REACT_FORWARD_REF_TYPE = 60112; - var REACT_SUSPENSE_TYPE = 60113; - var REACT_SUSPENSE_LIST_TYPE = 60120; - var REACT_MEMO_TYPE = 60115; - var REACT_LAZY_TYPE = 60116; - var REACT_BLOCK_TYPE = 60121; - var REACT_SERVER_BLOCK_TYPE = 60122; - var REACT_FUNDAMENTAL_TYPE = 60117; - var REACT_SCOPE_TYPE = 60119; - var REACT_OPAQUE_ID_TYPE = 60128; - var REACT_DEBUG_TRACING_MODE_TYPE = 60129; - var REACT_OFFSCREEN_TYPE = 60130; - var REACT_LEGACY_HIDDEN_TYPE = 60131; - if (typeof Symbol === "function" && Symbol.for) { - var symbolFor = Symbol.for; - REACT_ELEMENT_TYPE = symbolFor("react.element"); - REACT_PORTAL_TYPE = symbolFor("react.portal"); - REACT_FRAGMENT_TYPE = symbolFor("react.fragment"); - REACT_STRICT_MODE_TYPE = symbolFor("react.strict_mode"); - REACT_PROFILER_TYPE = symbolFor("react.profiler"); - REACT_PROVIDER_TYPE = symbolFor("react.provider"); - REACT_CONTEXT_TYPE = symbolFor("react.context"); - REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref"); - REACT_SUSPENSE_TYPE = symbolFor("react.suspense"); - REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list"); - REACT_MEMO_TYPE = symbolFor("react.memo"); - REACT_LAZY_TYPE = symbolFor("react.lazy"); - REACT_BLOCK_TYPE = symbolFor("react.block"); - REACT_SERVER_BLOCK_TYPE = symbolFor("react.server.block"); - REACT_FUNDAMENTAL_TYPE = symbolFor("react.fundamental"); - REACT_SCOPE_TYPE = symbolFor("react.scope"); - REACT_OPAQUE_ID_TYPE = symbolFor("react.opaque.id"); - REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode"); - REACT_OFFSCREEN_TYPE = symbolFor("react.offscreen"); - REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden"); - } - var MAYBE_ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = "@@iterator"; - function getIteratorFn(maybeIterable) { - if (maybeIterable === null || typeof maybeIterable !== "object") { - return null; - } - var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; - if (typeof maybeIterator === "function") { - return maybeIterator; - } - return null; - } - var disabledDepth = 0; - var prevLog; - var prevInfo; - var prevWarn; - var prevError; - var prevGroup; - var prevGroupCollapsed; - var prevGroupEnd; - function disabledLog() { - } - disabledLog.__reactDisabledLog = true; - function disableLogs() { - { - if (disabledDepth === 0) { - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; - var props = { - configurable: true, - enumerable: true, - value: disabledLog, - writable: true - }; - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); - } - disabledDepth++; - } - } - function reenableLogs() { - { - disabledDepth--; - if (disabledDepth === 0) { - var props = { - configurable: true, - enumerable: true, - writable: true - }; - Object.defineProperties(console, { - log: _assign({}, props, { - value: prevLog - }), - info: _assign({}, props, { - value: prevInfo - }), - warn: _assign({}, props, { - value: prevWarn - }), - error: _assign({}, props, { - value: prevError - }), - group: _assign({}, props, { - value: prevGroup - }), - groupCollapsed: _assign({}, props, { - value: prevGroupCollapsed - }), - groupEnd: _assign({}, props, { - value: prevGroupEnd - }) - }); - } - if (disabledDepth < 0) { - error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); - } - } - } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var prefix; - function describeBuiltInComponentFrame(name, source, ownerFn) { - { - if (prefix === void 0) { - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = match && match[1] || ""; - } - } - return "\n" + prefix + name; - } - } - var reentry = false; - var componentFrameCache; - { - var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; - componentFrameCache = new PossiblyWeakMap(); - } - function describeNativeComponentFrame(fn, construct) { - if (!fn || reentry) { - return ""; - } - { - var frame = componentFrameCache.get(fn); - if (frame !== void 0) { - return frame; - } - } - var control; - reentry = true; - var previousPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - var previousDispatcher; - { - previousDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = null; - disableLogs(); - } - try { - if (construct) { - var Fake = function() { - throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { - set: function() { - throw Error(); - } - }); - if (typeof Reflect === "object" && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - control = x; - } - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x) { - control = x; - } - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x) { - control = x; - } - fn(); - } - } catch (sample) { - if (sample && control && typeof sample.stack === "string") { - var sampleLines = sample.stack.split("\n"); - var controlLines = control.stack.split("\n"); - var s = sampleLines.length - 1; - var c = controlLines.length - 1; - while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { - c--; - } - for (; s >= 1 && c >= 0; s--, c--) { - if (sampleLines[s] !== controlLines[c]) { - if (s !== 1 || c !== 1) { - do { - s--; - c--; - if (c < 0 || sampleLines[s] !== controlLines[c]) { - var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); - { - if (typeof fn === "function") { - componentFrameCache.set(fn, _frame); - } - } - return _frame; - } - } while (s >= 1 && c >= 0); - } - break; - } - } - } - } finally { - reentry = false; - { - ReactCurrentDispatcher.current = previousDispatcher; - reenableLogs(); - } - Error.prepareStackTrace = previousPrepareStackTrace; - } - var name = fn ? fn.displayName || fn.name : ""; - var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; - { - if (typeof fn === "function") { - componentFrameCache.set(fn, syntheticFrame); - } - } - return syntheticFrame; - } - function describeClassComponentFrame(ctor, source, ownerFn) { - { - return describeNativeComponentFrame(ctor, true); - } - } - function describeFunctionComponentFrame(fn, source, ownerFn) { - { - return describeNativeComponentFrame(fn, false); - } - } - function shouldConstruct(Component) { - var prototype = Component.prototype; - return !!(prototype && prototype.isReactComponent); - } - function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { - if (type == null) { - return ""; - } - if (typeof type === "function") { - { - return describeNativeComponentFrame(type, shouldConstruct(type)); - } - } - if (typeof type === "string") { - return describeBuiltInComponentFrame(type); - } - switch (type) { - case REACT_SUSPENSE_TYPE: - return describeBuiltInComponentFrame("Suspense"); - case REACT_SUSPENSE_LIST_TYPE: - return describeBuiltInComponentFrame("SuspenseList"); - } - if (typeof type === "object") { - switch (type.$$typeof) { - case REACT_FORWARD_REF_TYPE: - return describeFunctionComponentFrame(type.render); - case REACT_MEMO_TYPE: - return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); - case REACT_BLOCK_TYPE: - return describeFunctionComponentFrame(type._render); - case REACT_LAZY_TYPE: { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - try { - return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); - } catch (x) { - } - } - } - } - return ""; - } - function describeFiber(fiber) { - var owner = fiber._debugOwner ? fiber._debugOwner.type : null; - var source = fiber._debugSource; - switch (fiber.tag) { - case HostComponent: - return describeBuiltInComponentFrame(fiber.type); - case LazyComponent: - return describeBuiltInComponentFrame("Lazy"); - case SuspenseComponent: - return describeBuiltInComponentFrame("Suspense"); - case SuspenseListComponent: - return describeBuiltInComponentFrame("SuspenseList"); - case FunctionComponent: - case IndeterminateComponent: - case SimpleMemoComponent: - return describeFunctionComponentFrame(fiber.type); - case ForwardRef: - return describeFunctionComponentFrame(fiber.type.render); - case Block: - return describeFunctionComponentFrame(fiber.type._render); - case ClassComponent: - return describeClassComponentFrame(fiber.type); - default: - return ""; - } - } - function getStackByFiberInDevAndProd(workInProgress2) { - try { - var info = ""; - var node = workInProgress2; - do { - info += describeFiber(node); - node = node.return; - } while (node); - return info; - } catch (x) { - return "\nError generating stack: " + x.message + "\n" + x.stack; - } - } - function getWrappedName(outerType, innerType, wrapperName) { - var functionName = innerType.displayName || innerType.name || ""; - return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName); - } - function getContextName(type) { - return type.displayName || "Context"; - } - function getComponentName(type) { - if (type == null) { - return null; - } - { - if (typeof type.tag === "number") { - error("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."); - } - } - if (typeof type === "function") { - return type.displayName || type.name || null; - } - if (typeof type === "string") { - return type; - } - switch (type) { - case REACT_FRAGMENT_TYPE: - return "Fragment"; - case REACT_PORTAL_TYPE: - return "Portal"; - case REACT_PROFILER_TYPE: - return "Profiler"; - case REACT_STRICT_MODE_TYPE: - return "StrictMode"; - case REACT_SUSPENSE_TYPE: - return "Suspense"; - case REACT_SUSPENSE_LIST_TYPE: - return "SuspenseList"; - } - if (typeof type === "object") { - switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - var context = type; - return getContextName(context) + ".Consumer"; - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + ".Provider"; - case REACT_FORWARD_REF_TYPE: - return getWrappedName(type, type.render, "ForwardRef"); - case REACT_MEMO_TYPE: - return getComponentName(type.type); - case REACT_BLOCK_TYPE: - return getComponentName(type._render); - case REACT_LAZY_TYPE: { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - try { - return getComponentName(init(payload)); - } catch (x) { - return null; - } - } - } - } - return null; - } - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - var current = null; - var isRendering = false; - function getCurrentFiberOwnerNameInDevOrNull() { - { - if (current === null) { - return null; - } - var owner = current._debugOwner; - if (owner !== null && typeof owner !== "undefined") { - return getComponentName(owner.type); - } - } - return null; - } - function getCurrentFiberStackInDev() { - { - if (current === null) { - return ""; - } - return getStackByFiberInDevAndProd(current); - } - } - function resetCurrentFiber() { - { - ReactDebugCurrentFrame.getCurrentStack = null; - current = null; - isRendering = false; - } - } - function setCurrentFiber(fiber) { - { - ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev; - current = fiber; - isRendering = false; - } - } - function setIsRendering(rendering) { - { - isRendering = rendering; - } - } - function getIsRendering() { - { - return isRendering; - } - } - function toString(value) { - return "" + value; - } - function getToStringValue(value) { - switch (typeof value) { - case "boolean": - case "number": - case "object": - case "string": - case "undefined": - return value; - default: - return ""; - } - } - var hasReadOnlyValue = { - button: true, - checkbox: true, - image: true, - hidden: true, - radio: true, - reset: true, - submit: true - }; - function checkControlledValueProps(tagName, props) { - { - if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) { - error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."); - } - if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) { - error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."); - } - } - } - function isCheckable(elem) { - var type = elem.type; - var nodeName = elem.nodeName; - return nodeName && nodeName.toLowerCase() === "input" && (type === "checkbox" || type === "radio"); - } - function getTracker(node) { - return node._valueTracker; - } - function detachTracker(node) { - node._valueTracker = null; - } - function getValueFromNode(node) { - var value = ""; - if (!node) { - return value; - } - if (isCheckable(node)) { - value = node.checked ? "true" : "false"; - } else { - value = node.value; - } - return value; - } - function trackValueOnNode(node) { - var valueField = isCheckable(node) ? "checked" : "value"; - var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); - var currentValue = "" + node[valueField]; - if (node.hasOwnProperty(valueField) || typeof descriptor === "undefined" || typeof descriptor.get !== "function" || typeof descriptor.set !== "function") { - return; - } - var get2 = descriptor.get, set2 = descriptor.set; - Object.defineProperty(node, valueField, { - configurable: true, - get: function() { - return get2.call(this); - }, - set: function(value) { - currentValue = "" + value; - set2.call(this, value); - } - }); - Object.defineProperty(node, valueField, { - enumerable: descriptor.enumerable - }); - var tracker = { - getValue: function() { - return currentValue; - }, - setValue: function(value) { - currentValue = "" + value; - }, - stopTracking: function() { - detachTracker(node); - delete node[valueField]; - } - }; - return tracker; - } - function track(node) { - if (getTracker(node)) { - return; - } - node._valueTracker = trackValueOnNode(node); - } - function updateValueIfChanged(node) { - if (!node) { - return false; - } - var tracker = getTracker(node); - if (!tracker) { - return true; - } - var lastValue = tracker.getValue(); - var nextValue = getValueFromNode(node); - if (nextValue !== lastValue) { - tracker.setValue(nextValue); - return true; - } - return false; - } - function getActiveElement(doc) { - doc = doc || (typeof document !== "undefined" ? document : void 0); - if (typeof doc === "undefined") { - return null; - } - try { - return doc.activeElement || doc.body; - } catch (e) { - return doc.body; - } - } - var didWarnValueDefaultValue = false; - var didWarnCheckedDefaultChecked = false; - var didWarnControlledToUncontrolled = false; - var didWarnUncontrolledToControlled = false; - function isControlled(props) { - var usesChecked = props.type === "checkbox" || props.type === "radio"; - return usesChecked ? props.checked != null : props.value != null; - } - function getHostProps(element, props) { - var node = element; - var checked = props.checked; - var hostProps = _assign({}, props, { - defaultChecked: void 0, - defaultValue: void 0, - value: void 0, - checked: checked != null ? checked : node._wrapperState.initialChecked - }); - return hostProps; - } - function initWrapperState(element, props) { - { - checkControlledValueProps("input", props); - if (props.checked !== void 0 && props.defaultChecked !== void 0 && !didWarnCheckedDefaultChecked) { - error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type); - didWarnCheckedDefaultChecked = true; - } - if (props.value !== void 0 && props.defaultValue !== void 0 && !didWarnValueDefaultValue) { - error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type); - didWarnValueDefaultValue = true; - } - } - var node = element; - var defaultValue = props.defaultValue == null ? "" : props.defaultValue; - node._wrapperState = { - initialChecked: props.checked != null ? props.checked : props.defaultChecked, - initialValue: getToStringValue(props.value != null ? props.value : defaultValue), - controlled: isControlled(props) - }; - } - function updateChecked(element, props) { - var node = element; - var checked = props.checked; - if (checked != null) { - setValueForProperty(node, "checked", checked, false); - } - } - function updateWrapper(element, props) { - var node = element; - { - var controlled = isControlled(props); - if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { - error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"); - didWarnUncontrolledToControlled = true; - } - if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { - error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"); - didWarnControlledToUncontrolled = true; - } - } - updateChecked(element, props); - var value = getToStringValue(props.value); - var type = props.type; - if (value != null) { - if (type === "number") { - if (value === 0 && node.value === "" || node.value != value) { - node.value = toString(value); - } - } else if (node.value !== toString(value)) { - node.value = toString(value); - } - } else if (type === "submit" || type === "reset") { - node.removeAttribute("value"); - return; - } - { - if (props.hasOwnProperty("value")) { - setDefaultValue(node, props.type, value); - } else if (props.hasOwnProperty("defaultValue")) { - setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); - } - } - { - if (props.checked == null && props.defaultChecked != null) { - node.defaultChecked = !!props.defaultChecked; - } - } - } - function postMountWrapper(element, props, isHydrating2) { - var node = element; - if (props.hasOwnProperty("value") || props.hasOwnProperty("defaultValue")) { - var type = props.type; - var isButton = type === "submit" || type === "reset"; - if (isButton && (props.value === void 0 || props.value === null)) { - return; - } - var initialValue = toString(node._wrapperState.initialValue); - if (!isHydrating2) { - { - if (initialValue !== node.value) { - node.value = initialValue; - } - } - } - { - node.defaultValue = initialValue; - } - } - var name = node.name; - if (name !== "") { - node.name = ""; - } - { - node.defaultChecked = !node.defaultChecked; - node.defaultChecked = !!node._wrapperState.initialChecked; - } - if (name !== "") { - node.name = name; - } - } - function restoreControlledState(element, props) { - var node = element; - updateWrapper(node, props); - updateNamedCousins(node, props); - } - function updateNamedCousins(rootNode, props) { - var name = props.name; - if (props.type === "radio" && name != null) { - var queryRoot = rootNode; - while (queryRoot.parentNode) { - queryRoot = queryRoot.parentNode; - } - var group = queryRoot.querySelectorAll("input[name=" + JSON.stringify("" + name) + '][type="radio"]'); - for (var i = 0; i < group.length; i++) { - var otherNode = group[i]; - if (otherNode === rootNode || otherNode.form !== rootNode.form) { - continue; - } - var otherProps = getFiberCurrentPropsFromNode(otherNode); - if (!otherProps) { - { - throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."); - } - } - updateValueIfChanged(otherNode); - updateWrapper(otherNode, otherProps); - } - } - } - function setDefaultValue(node, type, value) { - if (type !== "number" || getActiveElement(node.ownerDocument) !== node) { - if (value == null) { - node.defaultValue = toString(node._wrapperState.initialValue); - } else if (node.defaultValue !== toString(value)) { - node.defaultValue = toString(value); - } - } - } - var didWarnSelectedSetOnOption = false; - var didWarnInvalidChild = false; - function flattenChildren(children) { - var content = ""; - React.Children.forEach(children, function(child) { - if (child == null) { - return; - } - content += child; - }); - return content; - } - function validateProps(element, props) { - { - if (typeof props.children === "object" && props.children !== null) { - React.Children.forEach(props.children, function(child) { - if (child == null) { - return; - } - if (typeof child === "string" || typeof child === "number") { - return; - } - if (typeof child.type !== "string") { - return; - } - if (!didWarnInvalidChild) { - didWarnInvalidChild = true; - error("Only strings and numbers are supported as