Unverified Commit e3df5909 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Handle error overlay for new router (#41325)

parent 2060d0e3
...@@ -15,7 +15,7 @@ import { ...@@ -15,7 +15,7 @@ import {
onBuildOk, onBuildOk,
onRefresh, onRefresh,
ReactDevOverlay, ReactDevOverlay,
} from 'next/dist/compiled/@next/react-dev-overlay/dist/client' } from './react-dev-overlay/src/client'
import stripAnsi from 'next/dist/compiled/strip-ansi' import stripAnsi from 'next/dist/compiled/strip-ansi'
import formatWebpackMessages from '../dev/error-overlay/format-webpack-messages' import formatWebpackMessages from '../dev/error-overlay/format-webpack-messages'
import { useRouter } from './hooks-client' import { useRouter } from './hooks-client'
......
import * as Bus from './internal/bus'
import { parseStack } from './internal/helpers/parseStack'
let isRegistered = false
let stackTraceLimit: number | undefined = undefined
function onUnhandledError(ev: ErrorEvent) {
const error = ev?.error
if (!error || !(error instanceof Error) || typeof error.stack !== 'string') {
// A non-error was thrown, we don't have anything to show. :-(
return
}
if (
error.message.match(/(hydration|content does not match|did not match)/i)
) {
error.message += `\n\nSee more info here: https://nextjs.org/docs/messages/react-hydration-error`
}
const e = error
Bus.emit({
type: Bus.TYPE_UNHANDLED_ERROR,
reason: error,
frames: parseStack(e.stack!),
})
}
function onUnhandledRejection(ev: PromiseRejectionEvent) {
const reason = ev?.reason
if (
!reason ||
!(reason instanceof Error) ||
typeof reason.stack !== 'string'
) {
// A non-error was thrown, we don't have anything to show. :-(
return
}
const e = reason
Bus.emit({
type: Bus.TYPE_UNHANDLED_REJECTION,
reason: reason,
frames: parseStack(e.stack!),
})
}
function register() {
if (isRegistered) {
return
}
isRegistered = true
try {
const limit = Error.stackTraceLimit
Error.stackTraceLimit = 50
stackTraceLimit = limit
} catch {}
window.addEventListener('error', onUnhandledError)
window.addEventListener('unhandledrejection', onUnhandledRejection)
}
function unregister() {
if (!isRegistered) {
return
}
isRegistered = false
if (stackTraceLimit !== undefined) {
try {
Error.stackTraceLimit = stackTraceLimit
} catch {}
stackTraceLimit = undefined
}
window.removeEventListener('error', onUnhandledError)
window.removeEventListener('unhandledrejection', onUnhandledRejection)
}
function onBuildOk() {
Bus.emit({ type: Bus.TYPE_BUILD_OK })
}
function onBuildError(message: string) {
Bus.emit({ type: Bus.TYPE_BUILD_ERROR, message })
}
function onRefresh() {
Bus.emit({ type: Bus.TYPE_REFRESH })
}
export { getErrorByType } from './internal/helpers/getErrorByType'
export { getServerError } from './internal/helpers/nodeStackFrames'
export { default as ReactDevOverlay } from './internal/ReactDevOverlay'
export { onBuildOk, onBuildError, register, unregister, onRefresh }
import React from 'react'
type ErrorBoundaryProps = {
onError: (error: Error, componentStack: string | null) => void
globalOverlay?: boolean
isMounted?: boolean
}
type ErrorBoundaryState = { error: Error | null }
class ErrorBoundary extends React.PureComponent<
ErrorBoundaryProps,
ErrorBoundaryState
> {
state = { error: null }
static getDerivedStateFromError(error: Error) {
return { error }
}
componentDidCatch(
error: Error,
// Loosely typed because it depends on the React version and was
// accidentally excluded in some versions.
errorInfo?: { componentStack?: string | null }
) {
this.props.onError(error, errorInfo?.componentStack || null)
if (!this.props.globalOverlay) {
this.setState({ error })
}
}
render() {
// The component has to be unmounted or else it would continue to error
return this.state.error ||
(this.props.globalOverlay && this.props.isMounted) ? (
// When the overlay is global for the application and it wraps a component rendering `<html>`
// we have to render the html shell otherwise the shadow root will not be able to attach
this.props.globalOverlay ? (
<html>
<head></head>
<body></body>
</html>
) : null
) : (
this.props.children
)
}
}
export { ErrorBoundary }
import * as React from 'react'
import * as Bus from './bus'
import { ShadowPortal } from './components/ShadowPortal'
import { BuildError } from './container/BuildError'
import { Errors, SupportedErrorEvent } from './container/Errors'
import { ErrorBoundary } from './ErrorBoundary'
import { Base } from './styles/Base'
import { ComponentStyles } from './styles/ComponentStyles'
import { CssReset } from './styles/CssReset'
type OverlayState = {
nextId: number
buildError: string | null
errors: SupportedErrorEvent[]
}
function reducer(state: OverlayState, ev: Bus.BusEvent): OverlayState {
switch (ev.type) {
case Bus.TYPE_BUILD_OK: {
return { ...state, buildError: null }
}
case Bus.TYPE_BUILD_ERROR: {
return { ...state, buildError: ev.message }
}
case Bus.TYPE_REFRESH: {
return { ...state, buildError: null, errors: [] }
}
case Bus.TYPE_UNHANDLED_ERROR:
case Bus.TYPE_UNHANDLED_REJECTION: {
return {
...state,
nextId: state.nextId + 1,
errors: [
...state.errors.filter((err) => {
// Filter out duplicate errors
return err.event.reason !== ev.reason
}),
{ id: state.nextId, event: ev },
],
}
}
default: {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _: never = ev
return state
}
}
}
type ErrorType = 'runtime' | 'build'
const shouldPreventDisplay = (
errorType?: ErrorType | null,
preventType?: ErrorType[] | null
) => {
if (!preventType || !errorType) {
return false
}
return preventType.includes(errorType)
}
type ReactDevOverlayProps = {
children?: React.ReactNode
preventDisplay?: ErrorType[]
globalOverlay?: boolean
}
const ReactDevOverlay: React.FunctionComponent<ReactDevOverlayProps> =
function ReactDevOverlay({ children, preventDisplay, globalOverlay }) {
const [state, dispatch] = React.useReducer<
React.Reducer<OverlayState, Bus.BusEvent>
>(reducer, {
nextId: 1,
buildError: null,
errors: [],
})
React.useEffect(() => {
Bus.on(dispatch)
return function () {
Bus.off(dispatch)
}
}, [dispatch])
const onComponentError = React.useCallback(
(_error: Error, _componentStack: string | null) => {
// TODO: special handling
},
[]
)
const hasBuildError = state.buildError != null
const hasRuntimeErrors = Boolean(state.errors.length)
const isMounted = hasBuildError || hasRuntimeErrors
return (
<React.Fragment>
<ErrorBoundary
globalOverlay={globalOverlay}
isMounted={isMounted}
onError={onComponentError}
>
{children ?? null}
</ErrorBoundary>
{isMounted ? (
<ShadowPortal globalOverlay={globalOverlay}>
<CssReset />
<Base />
<ComponentStyles />
{shouldPreventDisplay(
hasBuildError ? 'build' : hasRuntimeErrors ? 'runtime' : null,
preventDisplay
) ? null : hasBuildError ? (
<BuildError message={state.buildError!} />
) : hasRuntimeErrors ? (
<Errors errors={state.errors} />
) : undefined}
</ShadowPortal>
) : undefined}
</React.Fragment>
)
}
export default ReactDevOverlay
import type { StackFrame } from 'next/dist/compiled/stacktrace-parser'
export const TYPE_BUILD_OK = 'build-ok'
export const TYPE_BUILD_ERROR = 'build-error'
export const TYPE_REFRESH = 'fast-refresh'
export const TYPE_UNHANDLED_ERROR = 'unhandled-error'
export const TYPE_UNHANDLED_REJECTION = 'unhandled-rejection'
export type BuildOk = { type: typeof TYPE_BUILD_OK }
export type BuildError = {
type: typeof TYPE_BUILD_ERROR
message: string
}
export type FastRefresh = { type: typeof TYPE_REFRESH }
export type UnhandledError = {
type: typeof TYPE_UNHANDLED_ERROR
reason: Error
frames: StackFrame[]
}
export type UnhandledRejection = {
type: typeof TYPE_UNHANDLED_REJECTION
reason: Error
frames: StackFrame[]
}
export type BusEvent =
| BuildOk
| BuildError
| FastRefresh
| UnhandledError
| UnhandledRejection
export type BusEventHandler = (ev: BusEvent) => void
let handlers: Set<BusEventHandler> = new Set()
let queue: BusEvent[] = []
function drain() {
// Draining should never happen synchronously in case multiple handlers are
// registered.
setTimeout(function () {
while (
// Until we are out of events:
Boolean(queue.length) &&
// Or, if all handlers removed themselves as a result of handling the
// event(s)
Boolean(handlers.size)
) {
const ev = queue.shift()!
handlers.forEach((handler) => handler(ev))
}
}, 1)
}
export function emit(ev: BusEvent): void {
queue.push(Object.freeze({ ...ev }))
drain()
}
export function on(fn: BusEventHandler): boolean {
if (handlers.has(fn)) {
return false
}
handlers.add(fn)
drain()
return true
}
export function off(fn: BusEventHandler): boolean {
if (handlers.has(fn)) {
handlers.delete(fn)
return true
}
return false
}
import Anser from 'next/dist/compiled/anser'
import * as React from 'react'
import { StackFrame } from 'next/dist/compiled/stacktrace-parser'
import stripAnsi from 'next/dist/compiled/strip-ansi'
import { getFrameSource } from '../../helpers/stack-frame'
export type CodeFrameProps = { stackFrame: StackFrame; codeFrame: string }
export const CodeFrame: React.FC<CodeFrameProps> = function CodeFrame({
stackFrame,
codeFrame,
}) {
// Strip leading spaces out of the code frame:
const formattedFrame = React.useMemo<string>(() => {
const lines = codeFrame.split(/\r?\n/g)
const prefixLength = lines
.map((line) =>
/^>? +\d+ +\| [ ]+/.exec(stripAnsi(line)) === null
? null
: /^>? +\d+ +\| ( *)/.exec(stripAnsi(line))
)
.filter(Boolean)
.map((v) => v!.pop()!)
.reduce((c, n) => (isNaN(c) ? n.length : Math.min(c, n.length)), NaN)
if (prefixLength > 1) {
const p = ' '.repeat(prefixLength)
return lines
.map((line, a) =>
~(a = line.indexOf('|'))
? line.substring(0, a) + line.substring(a).replace(p, '')
: line
)
.join('\n')
}
return lines.join('\n')
}, [codeFrame])
const decoded = React.useMemo(() => {
return Anser.ansiToJson(formattedFrame, {
json: true,
use_classes: true,
remove_empty: true,
})
}, [formattedFrame])
const open = React.useCallback(() => {
const params = new URLSearchParams()
for (const key in stackFrame) {
params.append(key, ((stackFrame as any)[key] ?? '').toString())
}
self
.fetch(
`${
process.env.__NEXT_ROUTER_BASEPATH || ''
}/__nextjs_launch-editor?${params.toString()}`
)
.then(
() => {},
() => {
console.error('There was an issue opening this code in your editor.')
}
)
}, [stackFrame])
// TODO: make the caret absolute
return (
<div data-nextjs-codeframe>
<div>
<p
role="link"
onClick={open}
tabIndex={1}
title="Click to open in your editor"
>
<span>
{getFrameSource(stackFrame)} @ {stackFrame.methodName}
</span>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
>
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
<polyline points="15 3 21 3 21 9"></polyline>
<line x1="10" y1="14" x2="21" y2="3"></line>
</svg>
</p>
</div>
<pre>
{decoded.map((entry, index) => (
<span
key={`frame-${index}`}
style={{
color: entry.fg ? `var(--color-${entry.fg})` : undefined,
...(entry.decoration === 'bold'
? { fontWeight: 800 }
: entry.decoration === 'italic'
? { fontStyle: 'italic' }
: undefined),
}}
>
{entry.content}
</span>
))}
</pre>
</div>
)
}
import { noop as css } from '../../helpers/noop-template'
const styles = css`
[data-nextjs-codeframe] {
overflow: auto;
border-radius: var(--size-gap-half);
background-color: var(--color-ansi-bg);
color: var(--color-ansi-fg);
}
[data-nextjs-codeframe]::selection,
[data-nextjs-codeframe] *::selection {
background-color: var(--color-ansi-selection);
}
[data-nextjs-codeframe] * {
color: inherit;
background-color: transparent;
font-family: var(--font-stack-monospace);
}
[data-nextjs-codeframe] > * {
margin: 0;
padding: calc(var(--size-gap) + var(--size-gap-half))
calc(var(--size-gap-double) + var(--size-gap-half));
}
[data-nextjs-codeframe] > div {
display: inline-block;
width: auto;
min-width: 100%;
border-bottom: 1px solid var(--color-ansi-bright-black);
}
[data-nextjs-codeframe] > div > p {
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
margin: 0;
}
[data-nextjs-codeframe] > div > p:hover {
text-decoration: underline dotted;
}
[data-nextjs-codeframe] div > p > svg {
width: auto;
height: 1em;
margin-left: 8px;
}
[data-nextjs-codeframe] div > pre {
overflow: hidden;
display: inline-block;
}
`
export { styles }
import * as React from 'react'
import { useOnClickOutside } from '../../hooks/use-on-click-outside'
export type DialogProps = {
type: 'error' | 'warning'
'aria-labelledby': string
'aria-describedby': string
onClose?: (e: MouseEvent | TouchEvent) => void
}
const Dialog: React.FC<DialogProps> = function Dialog({
children,
type,
onClose,
...props
}) {
const [dialog, setDialog] = React.useState<HTMLDivElement | null>(null)
const onDialog = React.useCallback((node) => {
setDialog(node)
}, [])
useOnClickOutside(dialog, onClose)
// Make HTMLElements with `role=link` accessible to be triggered by the
// keyboard, i.e. [Enter].
React.useEffect(() => {
if (dialog == null) {
return
}
const root = dialog.getRootNode()
// Always true, but we do this for TypeScript:
if (!(root instanceof ShadowRoot)) {
return
}
const shadowRoot = root
function handler(e: KeyboardEvent) {
const el = shadowRoot.activeElement
if (
e.key === 'Enter' &&
el instanceof HTMLElement &&
el.getAttribute('role') === 'link'
) {
e.preventDefault()
e.stopPropagation()
el.click()
}
}
shadowRoot.addEventListener('keydown', handler as EventListener)
return () =>
shadowRoot.removeEventListener('keydown', handler as EventListener)
}, [dialog])
return (
<div
ref={onDialog}
data-nextjs-dialog
tabIndex={-1}
role="dialog"
aria-labelledby={props['aria-labelledby']}
aria-describedby={props['aria-describedby']}
aria-modal="true"
>
<div data-nextjs-dialog-banner className={`banner-${type}`} />
{children}
</div>
)
}
export { Dialog }
import * as React from 'react'
export type DialogBodyProps = {
className?: string
}
const DialogBody: React.FC<DialogBodyProps> = function DialogBody({
children,
className,
}) {
return (
<div data-nextjs-dialog-body className={className}>
{children}
</div>
)
}
export { DialogBody }
import * as React from 'react'
export type DialogContentProps = {
className?: string
}
const DialogContent: React.FC<DialogContentProps> = function DialogContent({
children,
className,
}) {
return (
<div data-nextjs-dialog-content className={className}>
{children}
</div>
)
}
export { DialogContent }
import * as React from 'react'
export type DialogHeaderProps = {
className?: string
}
const DialogHeader: React.FC<DialogHeaderProps> = function DialogHeader({
children,
className,
}) {
return (
<div data-nextjs-dialog-header className={className}>
{children}
</div>
)
}
export { DialogHeader }
export { Dialog } from './Dialog'
export { DialogBody } from './DialogBody'
export { DialogContent } from './DialogContent'
export { DialogHeader } from './DialogHeader'
export { styles } from './styles'
import { noop as css } from '../../helpers/noop-template'
const styles = css`
[data-nextjs-dialog] {
display: flex;
flex-direction: column;
width: 100%;
margin-right: auto;
margin-left: auto;
outline: none;
background: white;
border-radius: var(--size-gap);
box-shadow: 0 var(--size-gap-half) var(--size-gap-double)
rgba(0, 0, 0, 0.25);
max-height: calc(100% - 56px);
overflow-y: hidden;
}
@media (max-height: 812px) {
[data-nextjs-dialog-overlay] {
max-height: calc(100% - 15px);
}
}
@media (min-width: 576px) {
[data-nextjs-dialog] {
max-width: 540px;
box-shadow: 0 var(--size-gap) var(--size-gap-quad) rgba(0, 0, 0, 0.25);
}
}
@media (min-width: 768px) {
[data-nextjs-dialog] {
max-width: 720px;
}
}
@media (min-width: 992px) {
[data-nextjs-dialog] {
max-width: 960px;
}
}
[data-nextjs-dialog-banner] {
position: relative;
}
[data-nextjs-dialog-banner].banner-warning {
border-color: var(--color-ansi-yellow);
}
[data-nextjs-dialog-banner].banner-error {
border-color: var(--color-ansi-red);
}
[data-nextjs-dialog-banner]::after {
z-index: 2;
content: '';
position: absolute;
top: 0;
right: 0;
width: 100%;
/* banner width: */
border-top-width: var(--size-gap-half);
border-bottom-width: 0;
border-top-style: solid;
border-bottom-style: solid;
border-top-color: inherit;
border-bottom-color: transparent;
}
[data-nextjs-dialog-content] {
overflow-y: auto;
border: none;
margin: 0;
/* calc(padding + banner width offset) */
padding: calc(var(--size-gap-double) + var(--size-gap-half))
var(--size-gap-double);
height: 100%;
display: flex;
flex-direction: column;
}
[data-nextjs-dialog-content] > [data-nextjs-dialog-header] {
flex-shrink: 0;
margin-bottom: var(--size-gap-double);
}
[data-nextjs-dialog-content] > [data-nextjs-dialog-body] {
position: relative;
flex: 1 1 auto;
}
`
export { styles }
import * as React from 'react'
import { CloseIcon } from '../../icons/CloseIcon'
export type LeftRightDialogHeaderProps = {
className?: string
previous: (() => void) | null
next: (() => void) | null
close?: () => void
}
const LeftRightDialogHeader: React.FC<LeftRightDialogHeaderProps> =
function LeftRightDialogHeader({
children,
className,
previous,
next,
close,
}) {
const buttonLeft = React.useRef<HTMLButtonElement | null>(null)
const buttonRight = React.useRef<HTMLButtonElement | null>(null)
const buttonClose = React.useRef<HTMLButtonElement | null>(null)
const [nav, setNav] = React.useState<HTMLElement | null>(null)
const onNav = React.useCallback((el: HTMLElement) => {
setNav(el)
}, [])
React.useEffect(() => {
if (nav == null) {
return
}
const root = nav.getRootNode()
const d = self.document
function handler(e: KeyboardEvent) {
if (e.key === 'ArrowLeft') {
e.stopPropagation()
if (buttonLeft.current) {
buttonLeft.current.focus()
}
previous && previous()
} else if (e.key === 'ArrowRight') {
e.stopPropagation()
if (buttonRight.current) {
buttonRight.current.focus()
}
next && next()
} else if (e.key === 'Escape') {
e.stopPropagation()
if (root instanceof ShadowRoot) {
const a = root.activeElement
if (a && a !== buttonClose.current && a instanceof HTMLElement) {
a.blur()
return
}
}
if (close) {
close()
}
}
}
root.addEventListener('keydown', handler as EventListener)
if (root !== d) {
d.addEventListener('keydown', handler)
}
return function () {
root.removeEventListener('keydown', handler as EventListener)
if (root !== d) {
d.removeEventListener('keydown', handler)
}
}
}, [close, nav, next, previous])
// Unlock focus for browsers like Firefox, that break all user focus if the
// currently focused item becomes disabled.
React.useEffect(() => {
if (nav == null) {
return
}
const root = nav.getRootNode()
// Always true, but we do this for TypeScript:
if (root instanceof ShadowRoot) {
const a = root.activeElement
if (previous == null) {
if (buttonLeft.current && a === buttonLeft.current) {
buttonLeft.current.blur()
}
} else if (next == null) {
if (buttonRight.current && a === buttonRight.current) {
buttonRight.current.blur()
}
}
}
}, [nav, next, previous])
return (
<div data-nextjs-dialog-left-right className={className}>
<nav ref={onNav}>
<button
ref={buttonLeft}
type="button"
disabled={previous == null ? true : undefined}
aria-disabled={previous == null ? true : undefined}
onClick={previous ?? undefined}
>
<svg
viewBox="0 0 14 14"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M6.99996 1.16666L1.16663 6.99999L6.99996 12.8333M12.8333 6.99999H1.99996H12.8333Z"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
</button>
<button
ref={buttonRight}
type="button"
disabled={next == null ? true : undefined}
aria-disabled={next == null ? true : undefined}
onClick={next ?? undefined}
>
<svg
viewBox="0 0 14 14"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M6.99996 1.16666L12.8333 6.99999L6.99996 12.8333M1.16663 6.99999H12H1.16663Z"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
</button>
&nbsp;
{children}
</nav>
{close ? (
<button
data-nextjs-errors-dialog-left-right-close-button
ref={buttonClose}
type="button"
onClick={close}
aria-label="Close"
>
<span aria-hidden="true">
<CloseIcon />
</span>
</button>
) : null}
</div>
)
}
export { LeftRightDialogHeader }
export { LeftRightDialogHeader } from './LeftRightDialogHeader'
export { styles } from './styles'
import { noop as css } from '../../helpers/noop-template'
const styles = css`
[data-nextjs-dialog-left-right] {
display: flex;
flex-direction: row;
align-content: center;
align-items: center;
justify-content: space-between;
}
[data-nextjs-dialog-left-right] > nav > button {
display: inline-flex;
align-items: center;
justify-content: center;
width: calc(var(--size-gap-double) + var(--size-gap));
height: calc(var(--size-gap-double) + var(--size-gap));
font-size: 0;
border: none;
background-color: rgba(255, 85, 85, 0.1);
color: var(--color-ansi-red);
cursor: pointer;
transition: background-color 0.25s ease;
}
[data-nextjs-dialog-left-right] > nav > button > svg {
width: auto;
height: calc(var(--size-gap) + var(--size-gap-half));
}
[data-nextjs-dialog-left-right] > nav > button:hover {
background-color: rgba(255, 85, 85, 0.2);
}
[data-nextjs-dialog-left-right] > nav > button:disabled {
background-color: rgba(255, 85, 85, 0.1);
color: rgba(255, 85, 85, 0.4);
cursor: not-allowed;
}
[data-nextjs-dialog-left-right] > nav > button:first-of-type {
border-radius: var(--size-gap-half) 0 0 var(--size-gap-half);
margin-right: 1px;
}
[data-nextjs-dialog-left-right] > nav > button:last-of-type {
border-radius: 0 var(--size-gap-half) var(--size-gap-half) 0;
}
[data-nextjs-dialog-left-right] > button:last-of-type {
border: 0;
padding: 0;
background-color: transparent;
appearance: none;
opacity: 0.4;
transition: opacity 0.25s ease;
}
[data-nextjs-dialog-left-right] > button:last-of-type:hover {
opacity: 0.7;
}
`
export { styles }
// @ts-ignore
import allyTrap from './maintain--tab-focus'
import * as React from 'react'
import { lock, unlock } from './body-locker'
export type OverlayProps = { className?: string; fixed?: boolean }
const Overlay: React.FC<OverlayProps> = function Overlay({
className,
children,
fixed,
}) {
React.useEffect(() => {
lock()
return () => {
unlock()
}
}, [])
const [overlay, setOverlay] = React.useState<HTMLDivElement | null>(null)
const onOverlay = React.useCallback((el: HTMLDivElement) => {
setOverlay(el)
}, [])
React.useEffect(() => {
if (overlay == null) {
return
}
const handle2 = allyTrap({ context: overlay })
return () => {
handle2.disengage()
}
}, [overlay])
return (
<div data-nextjs-dialog-overlay className={className} ref={onOverlay}>
<div
data-nextjs-dialog-backdrop
data-nextjs-dialog-backdrop-fixed={fixed ? true : undefined}
/>
{children}
</div>
)
}
export { Overlay }
let previousBodyPaddingRight: string | undefined
let previousBodyOverflowSetting: string | undefined
let activeLocks = 0
export function lock() {
setTimeout(() => {
if (activeLocks++ > 0) {
return
}
const scrollBarGap =
window.innerWidth - document.documentElement.clientWidth
if (scrollBarGap > 0) {
previousBodyPaddingRight = document.body.style.paddingRight
document.body.style.paddingRight = `${scrollBarGap}px`
}
previousBodyOverflowSetting = document.body.style.overflow
document.body.style.overflow = 'hidden'
})
}
export function unlock() {
setTimeout(() => {
if (activeLocks === 0 || --activeLocks !== 0) {
return
}
if (previousBodyPaddingRight !== undefined) {
document.body.style.paddingRight = previousBodyPaddingRight
previousBodyPaddingRight = undefined
}
if (previousBodyOverflowSetting !== undefined) {
document.body.style.overflow = previousBodyOverflowSetting
previousBodyOverflowSetting = undefined
}
})
}
This source diff could not be displayed because it is too large. You can view the blob instead.
import { noop as css } from '../../helpers/noop-template'
const styles = css`
[data-nextjs-dialog-overlay] {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: auto;
z-index: 9000;
display: flex;
align-content: center;
align-items: center;
flex-direction: column;
padding: 10vh 15px 0;
}
@media (max-height: 812px) {
[data-nextjs-dialog-overlay] {
padding: 15px 15px 0;
}
}
[data-nextjs-dialog-backdrop] {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(17, 17, 17, 0.2);
pointer-events: all;
z-index: -1;
}
[data-nextjs-dialog-backdrop-fixed] {
cursor: not-allowed;
-webkit-backdrop-filter: blur(8px);
backdrop-filter: blur(8px);
}
`
export { styles }
import * as React from 'react'
import { createPortal } from 'react-dom'
export type ShadowPortalProps = {
children: React.ReactNode
globalOverlay?: boolean
}
export const ShadowPortal: React.FC<ShadowPortalProps> = function Portal({
children,
globalOverlay,
}) {
let mountNode = React.useRef<HTMLDivElement | null>(null)
let portalNode = React.useRef<HTMLElement | null>(null)
let shadowNode = React.useRef<ShadowRoot | null>(null)
let [, forceUpdate] = React.useState<{} | undefined>()
React.useLayoutEffect(() => {
const ownerDocument = globalOverlay
? document
: mountNode.current!.ownerDocument!
portalNode.current = ownerDocument.createElement('nextjs-portal')
shadowNode.current = portalNode.current.attachShadow({ mode: 'open' })
ownerDocument.body.appendChild(portalNode.current)
forceUpdate({})
return () => {
if (portalNode.current && portalNode.current.ownerDocument) {
portalNode.current.ownerDocument.body.removeChild(portalNode.current)
}
}
}, [globalOverlay])
return shadowNode.current ? (
createPortal(children, shadowNode.current as any)
) : globalOverlay ? null : (
<span ref={mountNode} />
)
}
import Anser from 'next/dist/compiled/anser'
import * as React from 'react'
export type TerminalProps = { content: string }
export const Terminal: React.FC<TerminalProps> = function Terminal({
content,
}) {
const decoded = React.useMemo(() => {
return Anser.ansiToJson(content, {
json: true,
use_classes: true,
remove_empty: true,
})
}, [content])
return (
<div data-nextjs-terminal>
<pre>
{decoded.map((entry, index) => (
<span
key={`terminal-entry-${index}`}
style={{
color: entry.fg ? `var(--color-${entry.fg})` : undefined,
...(entry.decoration === 'bold'
? { fontWeight: 800 }
: entry.decoration === 'italic'
? { fontStyle: 'italic' }
: undefined),
}}
>
{entry.content}
</span>
))}
</pre>
</div>
)
}
import { noop as css } from '../../helpers/noop-template'
const styles = css`
[data-nextjs-terminal] {
border-radius: var(--size-gap-half);
background-color: var(--color-ansi-bg);
color: var(--color-ansi-fg);
}
[data-nextjs-terminal]::selection,
[data-nextjs-terminal] *::selection {
background-color: var(--color-ansi-selection);
}
[data-nextjs-terminal] * {
color: inherit;
background-color: transparent;
font-family: var(--font-stack-monospace);
}
[data-nextjs-terminal] > * {
margin: 0;
padding: calc(var(--size-gap) + var(--size-gap-half))
calc(var(--size-gap-double) + var(--size-gap-half));
}
[data-nextjs-terminal] pre {
white-space: pre-wrap;
word-break: break-word;
}
`
export { styles }
import * as React from 'react'
export type ToastProps = {
onClick?: (ev: React.MouseEvent<HTMLDivElement, MouseEvent>) => void
className?: string
}
export const Toast: React.FC<ToastProps> = function Toast({
onClick,
children,
className,
}) {
return (
<div data-nextjs-toast onClick={onClick} className={className}>
<div data-nextjs-toast-wrapper>{children}</div>
</div>
)
}
export { styles } from './styles'
export { Toast } from './Toast'
import { noop as css } from '../../helpers/noop-template'
const styles = css`
[data-nextjs-toast] {
position: fixed;
bottom: var(--size-gap-double);
left: var(--size-gap-double);
max-width: 420px;
z-index: 9000;
}
@media (max-width: 440px) {
[data-nextjs-toast] {
max-width: 90vw;
left: 5vw;
}
}
[data-nextjs-toast-wrapper] {
padding: 16px;
border-radius: var(--size-gap-half);
font-weight: 500;
color: var(--color-ansi-bright-white);
background-color: var(--color-ansi-red);
box-shadow: 0px var(--size-gap-double) var(--size-gap-quad)
rgba(0, 0, 0, 0.25);
}
`
export { styles }
import * as React from 'react'
import {
Dialog,
DialogBody,
DialogContent,
DialogHeader,
} from '../components/Dialog'
import { Overlay } from '../components/Overlay'
import { Terminal } from '../components/Terminal'
import { noop as css } from '../helpers/noop-template'
export type BuildErrorProps = { message: string }
export const BuildError: React.FC<BuildErrorProps> = function BuildError({
message,
}) {
const noop = React.useCallback(() => {}, [])
return (
<Overlay fixed>
<Dialog
type="error"
aria-labelledby="nextjs__container_build_error_label"
aria-describedby="nextjs__container_build_error_desc"
onClose={noop}
>
<DialogContent>
<DialogHeader className="nextjs-container-build-error-header">
<h4 id="nextjs__container_build_error_label">Failed to compile</h4>
</DialogHeader>
<DialogBody className="nextjs-container-build-error-body">
<Terminal content={message} />
<footer>
<p id="nextjs__container_build_error_desc">
<small>
This error occurred during the build process and can only be
dismissed by fixing the error.
</small>
</p>
</footer>
</DialogBody>
</DialogContent>
</Dialog>
</Overlay>
)
}
export const styles = css`
.nextjs-container-build-error-header > h4 {
line-height: 1.5;
margin: 0;
padding: 0;
}
.nextjs-container-build-error-body footer {
margin-top: var(--size-gap);
}
.nextjs-container-build-error-body footer p {
margin: 0;
}
.nextjs-container-build-error-body small {
color: #757575;
}
`
import * as React from 'react'
import { StackFrame } from 'next/dist/compiled/stacktrace-parser'
import { CodeFrame } from '../components/CodeFrame'
import { ReadyRuntimeError } from '../helpers/getErrorByType'
import { noop as css } from '../helpers/noop-template'
import { getFrameSource, OriginalStackFrame } from '../helpers/stack-frame'
export type RuntimeErrorProps = { error: ReadyRuntimeError }
const CallStackFrame: React.FC<{
frame: OriginalStackFrame
}> = function CallStackFrame({ frame }) {
// TODO: ability to expand resolved frames
// TODO: render error or external indicator
const f: StackFrame = frame.originalStackFrame ?? frame.sourceStackFrame
const hasSource = Boolean(frame.originalCodeFrame)
const open = React.useCallback(() => {
if (!hasSource) return
const params = new URLSearchParams()
for (const key in f) {
params.append(key, ((f as any)[key] ?? '').toString())
}
self
.fetch(
`${
process.env.__NEXT_ROUTER_BASEPATH || ''
}/__nextjs_launch-editor?${params.toString()}`
)
.then(
() => {},
() => {
console.error('There was an issue opening this code in your editor.')
}
)
}, [hasSource, f])
return (
<div data-nextjs-call-stack-frame>
<h6 data-nextjs-frame-expanded={Boolean(frame.expanded)}>
{f.methodName}
</h6>
<div
data-has-source={hasSource ? 'true' : undefined}
tabIndex={hasSource ? 10 : undefined}
role={hasSource ? 'link' : undefined}
onClick={open}
title={hasSource ? 'Click to open in your editor' : undefined}
>
<span>{getFrameSource(f)}</span>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
>
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
<polyline points="15 3 21 3 21 9"></polyline>
<line x1="10" y1="14" x2="21" y2="3"></line>
</svg>
</div>
</div>
)
}
const RuntimeError: React.FC<RuntimeErrorProps> = function RuntimeError({
error,
}) {
const firstFirstPartyFrameIndex = React.useMemo<number>(() => {
return error.frames.findIndex(
(entry) =>
entry.expanded &&
Boolean(entry.originalCodeFrame) &&
Boolean(entry.originalStackFrame)
)
}, [error.frames])
const firstFrame = React.useMemo<OriginalStackFrame | null>(() => {
return error.frames[firstFirstPartyFrameIndex] ?? null
}, [error.frames, firstFirstPartyFrameIndex])
const allLeadingFrames = React.useMemo<OriginalStackFrame[]>(
() =>
firstFirstPartyFrameIndex < 0
? []
: error.frames.slice(0, firstFirstPartyFrameIndex),
[error.frames, firstFirstPartyFrameIndex]
)
const [all, setAll] = React.useState(firstFrame == null)
const toggleAll = React.useCallback(() => {
setAll((v) => !v)
}, [])
const leadingFrames = React.useMemo(
() => allLeadingFrames.filter((f) => f.expanded || all),
[all, allLeadingFrames]
)
const allCallStackFrames = React.useMemo<OriginalStackFrame[]>(
() => error.frames.slice(firstFirstPartyFrameIndex + 1),
[error.frames, firstFirstPartyFrameIndex]
)
const visibleCallStackFrames = React.useMemo<OriginalStackFrame[]>(
() => allCallStackFrames.filter((f) => f.expanded || all),
[all, allCallStackFrames]
)
const canShowMore = React.useMemo<boolean>(() => {
return (
allCallStackFrames.length !== visibleCallStackFrames.length ||
(all && firstFrame != null)
)
}, [
all,
allCallStackFrames.length,
firstFrame,
visibleCallStackFrames.length,
])
return (
<React.Fragment>
{firstFrame ? (
<React.Fragment>
<h5>Source</h5>
{leadingFrames.map((frame, index) => (
<CallStackFrame
key={`leading-frame-${index}-${all}`}
frame={frame}
/>
))}
<CodeFrame
stackFrame={firstFrame.originalStackFrame!}
codeFrame={firstFrame.originalCodeFrame!}
/>
</React.Fragment>
) : undefined}
{visibleCallStackFrames.length ? (
<React.Fragment>
<h5>Call Stack</h5>
{visibleCallStackFrames.map((frame, index) => (
<CallStackFrame key={`call-stack-${index}-${all}`} frame={frame} />
))}
</React.Fragment>
) : undefined}
{canShowMore ? (
<React.Fragment>
<button
tabIndex={10}
data-nextjs-data-runtime-error-collapsed-action
type="button"
onClick={toggleAll}
>
{all ? 'Hide' : 'Show'} collapsed frames
</button>
</React.Fragment>
) : undefined}
</React.Fragment>
)
}
export const styles = css`
button[data-nextjs-data-runtime-error-collapsed-action] {
background: none;
border: none;
padding: 0;
font-size: var(--size-font-small);
line-height: var(--size-font-bigger);
color: var(--color-accents-3);
}
[data-nextjs-call-stack-frame]:not(:last-child) {
margin-bottom: var(--size-gap-double);
}
[data-nextjs-call-stack-frame] > h6 {
margin-top: 0;
margin-bottom: var(--size-gap);
font-family: var(--font-stack-monospace);
color: #222;
}
[data-nextjs-call-stack-frame] > h6[data-nextjs-frame-expanded='false'] {
color: #666;
}
[data-nextjs-call-stack-frame] > div {
display: flex;
align-items: center;
padding-left: calc(var(--size-gap) + var(--size-gap-half));
font-size: var(--size-font-small);
color: #999;
}
[data-nextjs-call-stack-frame] > div > svg {
width: auto;
height: var(--size-font-small);
margin-left: var(--size-gap);
display: none;
}
[data-nextjs-call-stack-frame] > div[data-has-source] {
cursor: pointer;
}
[data-nextjs-call-stack-frame] > div[data-has-source]:hover {
text-decoration: underline dotted;
}
[data-nextjs-call-stack-frame] > div[data-has-source] > svg {
display: unset;
}
`
export { RuntimeError }
import { TYPE_UNHANDLED_ERROR, TYPE_UNHANDLED_REJECTION } from '../bus'
import { SupportedErrorEvent } from '../container/Errors'
import { getErrorSource } from './nodeStackFrames'
import { getOriginalStackFrames, OriginalStackFrame } from './stack-frame'
export type ReadyRuntimeError = {
id: number
runtime: true
error: Error
frames: OriginalStackFrame[]
}
export async function getErrorByType(
ev: SupportedErrorEvent
): Promise<ReadyRuntimeError> {
const { id, event } = ev
switch (event.type) {
case TYPE_UNHANDLED_ERROR:
case TYPE_UNHANDLED_REJECTION: {
return {
id,
runtime: true,
error: event.reason,
frames: await getOriginalStackFrames(
event.frames,
getErrorSource(event.reason),
event.reason.toString()
),
}
}
default: {
break
}
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _: never = event
throw new Error('type system invariant violation')
}
import dataUriToBuffer, {
MimeBuffer,
} from 'next/dist/compiled/data-uri-to-buffer'
import type { RawSourceMap } from 'source-map'
import { getSourceMapUrl } from './getSourceMapUrl'
export function getRawSourceMap(fileContents: string): RawSourceMap | null {
const sourceUrl = getSourceMapUrl(fileContents)
if (!sourceUrl?.startsWith('data:')) {
return null
}
let buffer: MimeBuffer
try {
// @ts-expect-error TODO-APP: fix type.
buffer = dataUriToBuffer(sourceUrl)
} catch (err) {
console.error('Failed to parse source map URL:', err)
return null
}
if (buffer.type !== 'application/json') {
console.error(`Unknown source map type: ${buffer.typeFull}.`)
return null
}
try {
return JSON.parse(buffer.toString())
} catch {
console.error('Failed to parse source map.')
return null
}
}
export function getSourceMapUrl(fileContents: string): string | null {
const regex = /\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/gm
let match = null
for (;;) {
let next = regex.exec(fileContents)
if (next == null) {
break
}
match = next
}
if (!(match && match[1])) {
return null
}
return match[1].toString()
}
import { parse, StackFrame } from 'next/dist/compiled/stacktrace-parser'
export function getFilesystemFrame(frame: StackFrame): StackFrame {
const f: StackFrame = { ...frame }
if (typeof f.file === 'string') {
if (
// Posix:
f.file.startsWith('/') ||
// Win32:
/^[a-z]:\\/i.test(f.file) ||
// Win32 UNC:
f.file.startsWith('\\\\')
) {
f.file = `file://${f.file}`
}
}
return f
}
const symbolError = Symbol('NextjsError')
export function getErrorSource(error: Error): 'server' | 'edge-server' | null {
return (error as any)[symbolError] || null
}
type ErrorType = 'edge-server' | 'server'
export function decorateServerError(error: Error, type: ErrorType) {
Object.defineProperty(error, symbolError, {
writable: false,
enumerable: false,
configurable: false,
value: type,
})
}
export function getServerError(error: Error, type: ErrorType): Error {
let n: Error
try {
throw new Error(error.message)
} catch (e) {
n = e as Error
}
n.name = error.name
try {
n.stack = `${n.toString()}\n${parse(error.stack!)
.map(getFilesystemFrame)
.map((f) => {
let str = ` at ${f.methodName}`
if (f.file) {
let loc = f.file
if (f.lineNumber) {
loc += `:${f.lineNumber}`
if (f.column) {
loc += `:${f.column}`
}
}
str += ` (${loc})`
}
return str
})
.join('\n')}`
} catch {
n.stack = error.stack
}
decorateServerError(n, type)
return n
}
export function noop(
strings: TemplateStringsArray,
...keys: readonly string[]
) {
const lastIndex = strings.length - 1
return (
strings.slice(0, lastIndex).reduce((p, s, i) => p + s + keys[i], '') +
strings[lastIndex]
)
}
import { parse, StackFrame } from 'next/dist/compiled/stacktrace-parser'
const regexNextStatic = /\/_next(\/static\/.+)/g
export function parseStack(stack: string): StackFrame[] {
const frames = parse(stack)
return frames.map((frame) => {
try {
const url = new URL(frame.file!)
const res = regexNextStatic.exec(url.pathname)
if (res) {
const distDir = process.env.__NEXT_DIST_DIR
?.replace(/\\/g, '/')
?.replace(/\/$/, '')
if (distDir) {
frame.file = 'file://' + distDir.concat(res.pop()!)
}
}
} catch {}
return frame
})
}
import { StackFrame } from 'next/dist/compiled/stacktrace-parser'
// import type { OriginalStackFrameResponse } from '../../middleware'
export type OriginalStackFrame =
| {
error: true
reason: string
external: false
expanded: false
sourceStackFrame: StackFrame
originalStackFrame: null
originalCodeFrame: null
}
| {
error: false
reason: null
external: false
expanded: boolean
sourceStackFrame: StackFrame
originalStackFrame: StackFrame
originalCodeFrame: string | null
}
| {
error: false
reason: null
external: true
expanded: false
sourceStackFrame: StackFrame
originalStackFrame: null
originalCodeFrame: null
}
export function getOriginalStackFrame(
source: StackFrame,
type: 'server' | 'edge-server' | null,
errorMessage: string
): Promise<OriginalStackFrame> {
async function _getOriginalStackFrame(): Promise<OriginalStackFrame> {
const params = new URLSearchParams()
params.append('isServer', String(type === 'server'))
params.append('isEdgeServer', String(type === 'edge-server'))
params.append('errorMessage', errorMessage)
for (const key in source) {
params.append(key, ((source as any)[key] ?? '').toString())
}
const controller = new AbortController()
const tm = setTimeout(() => controller.abort(), 3000)
const res = await self
.fetch(
`${
process.env.__NEXT_ROUTER_BASEPATH || ''
}/__nextjs_original-stack-frame?${params.toString()}`,
{
signal: controller.signal,
}
)
.finally(() => {
clearTimeout(tm)
})
if (!res.ok || res.status === 204) {
return Promise.reject(new Error(await res.text()))
}
const body: /* OriginalStackFrameResponse */ any = await res.json()
return {
error: false,
reason: null,
external: false,
expanded: !Boolean(
/* collapsed */
(source.file?.includes('node_modules') ||
body.originalStackFrame?.file?.includes('node_modules')) ??
true
),
sourceStackFrame: source,
originalStackFrame: body.originalStackFrame,
originalCodeFrame: body.originalCodeFrame || null,
}
}
if (
!(
source.file?.startsWith('webpack-internal:') ||
source.file?.startsWith('file:')
)
) {
return Promise.resolve({
error: false,
reason: null,
external: true,
expanded: false,
sourceStackFrame: source,
originalStackFrame: null,
originalCodeFrame: null,
})
}
return _getOriginalStackFrame().catch((err: Error) => ({
error: true,
reason: err?.message ?? err?.toString() ?? 'Unknown Error',
external: false,
expanded: false,
sourceStackFrame: source,
originalStackFrame: null,
originalCodeFrame: null,
}))
}
export function getOriginalStackFrames(
frames: StackFrame[],
type: 'server' | 'edge-server' | null,
errorMessage: string
) {
return Promise.all(
frames.map((frame) => getOriginalStackFrame(frame, type, errorMessage))
)
}
export function getFrameSource(frame: StackFrame): string {
let str = ''
try {
const u = new URL(frame.file!)
// Strip the origin for same-origin scripts.
if (
typeof globalThis !== 'undefined' &&
globalThis.location?.origin !== u.origin
) {
// URLs can be valid without an `origin`, so long as they have a
// `protocol`. However, `origin` is preferred.
if (u.origin === 'null') {
str += u.protocol
} else {
str += u.origin
}
}
// Strip query string information as it's typically too verbose to be
// meaningful.
str += u.pathname
str += ' '
} catch {
str += (frame.file || '(unknown)') + ' '
}
if (frame.lineNumber != null) {
if (frame.column != null) {
str += `(${frame.lineNumber}:${frame.column}) `
} else {
str += `(${frame.lineNumber}) `
}
}
return str.slice(0, -1)
}
import * as React from 'react'
export function useOnClickOutside(
el: Node | null,
handler: ((e: MouseEvent | TouchEvent) => void) | undefined
) {
React.useEffect(() => {
if (el == null || handler == null) {
return
}
const listener = (e: MouseEvent | TouchEvent) => {
// Do nothing if clicking ref's element or descendent elements
if (!el || el.contains(e.target as Element)) {
return
}
handler(e)
}
const root = el.getRootNode()
root.addEventListener('mousedown', listener as EventListener)
root.addEventListener('touchstart', listener as EventListener)
return function () {
root.removeEventListener('mousedown', listener as EventListener)
root.removeEventListener('touchstart', listener as EventListener)
}
}, [handler, el])
}
import * as React from 'react'
const CloseIcon = () => {
return (
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M18 6L6 18"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M6 6L18 18"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
)
}
export { CloseIcon }
import * as React from 'react'
import { noop as css } from '../helpers/noop-template'
export function Base() {
return (
<style>
{css`
:host {
--size-gap-half: 4px;
--size-gap: 8px;
--size-gap-double: 16px;
--size-gap-triple: 24px;
--size-gap-quad: 32px;
--size-font-small: 14px;
--size-font: 16px;
--size-font-big: 20px;
--size-font-bigger: 24px;
--color-accents-1: #808080;
--color-accents-2: #222222;
--color-accents-3: #404040;
--font-stack-monospace: 'SFMono-Regular', Consolas, 'Liberation Mono',
Menlo, Courier, monospace;
--color-ansi-selection: rgba(95, 126, 151, 0.48);
--color-ansi-bg: #111111;
--color-ansi-fg: #cccccc;
--color-ansi-white: #777777;
--color-ansi-black: #141414;
--color-ansi-blue: #00aaff;
--color-ansi-cyan: #88ddff;
--color-ansi-green: #98ec65;
--color-ansi-magenta: #aa88ff;
--color-ansi-red: #ff5555;
--color-ansi-yellow: #ffcc33;
--color-ansi-bright-white: #ffffff;
--color-ansi-bright-black: #777777;
--color-ansi-bright-blue: #33bbff;
--color-ansi-bright-cyan: #bbecff;
--color-ansi-bright-green: #b6f292;
--color-ansi-bright-magenta: #cebbff;
--color-ansi-bright-red: #ff8888;
--color-ansi-bright-yellow: #ffd966;
}
.mono {
font-family: var(--font-stack-monospace);
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-bottom: var(--size-gap);
font-weight: 500;
line-height: 1.5;
}
h1 {
font-size: 40px;
}
h2 {
font-size: 32px;
}
h3 {
font-size: 28px;
}
h4 {
font-size: 24px;
}
h5 {
font-size: 20px;
}
h6 {
font-size: 16px;
}
`}
</style>
)
}
import * as React from 'react'
import { styles as codeFrame } from '../components/CodeFrame/styles'
import { styles as dialog } from '../components/Dialog'
import { styles as leftRightDialogHeader } from '../components/LeftRightDialogHeader/styles'
import { styles as overlay } from '../components/Overlay/styles'
import { styles as terminal } from '../components/Terminal/styles'
import { styles as toast } from '../components/Toast'
import { styles as buildErrorStyles } from '../container/BuildError'
import { styles as containerErrorStyles } from '../container/Errors'
import { styles as containerRuntimeErrorStyles } from '../container/RuntimeError'
import { noop as css } from '../helpers/noop-template'
export function ComponentStyles() {
return (
<style>
{css`
${overlay}
${toast}
${dialog}
${leftRightDialogHeader}
${codeFrame}
${terminal}
${buildErrorStyles}
${containerErrorStyles}
${containerRuntimeErrorStyles}
`}
</style>
)
}
import * as React from 'react'
import { noop as css } from '../helpers/noop-template'
export function CssReset() {
return (
<style>
{css`
:host {
all: initial;
/* the direction property is not reset by 'all' */
direction: ltr;
}
/*!
* Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
:host {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
article,
aside,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section {
display: block;
}
:host {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
'Helvetica Neue', Arial, 'Noto Sans', sans-serif,
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji';
font-size: 16px;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
background-color: #fff;
}
[tabindex='-1']:focus:not(:focus-visible) {
outline: 0 !important;
}
hr {
box-sizing: content-box;
height: 0;
overflow: visible;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 0;
margin-bottom: 8px;
}
p {
margin-top: 0;
margin-bottom: 16px;
}
abbr[title],
abbr[data-original-title] {
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
border-bottom: 0;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 16px;
font-style: normal;
line-height: inherit;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 16px;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: 8px;
margin-left: 0;
}
blockquote {
margin: 0 0 16px;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 80%;
}
sub,
sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
a {
color: #007bff;
text-decoration: none;
background-color: transparent;
}
a:hover {
color: #0056b3;
text-decoration: underline;
}
a:not([href]) {
color: inherit;
text-decoration: none;
}
a:not([href]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas,
'Liberation Mono', 'Courier New', monospace;
font-size: 1em;
}
pre {
margin-top: 0;
margin-bottom: 16px;
overflow: auto;
}
figure {
margin: 0 0 16px;
}
img {
vertical-align: middle;
border-style: none;
}
svg {
overflow: hidden;
vertical-align: middle;
}
table {
border-collapse: collapse;
}
caption {
padding-top: 12px;
padding-bottom: 12px;
color: #6c757d;
text-align: left;
caption-side: bottom;
}
th {
text-align: inherit;
}
label {
display: inline-block;
margin-bottom: 8px;
}
button {
border-radius: 0;
}
button:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
select {
word-wrap: normal;
}
button,
[type='button'],
[type='reset'],
[type='submit'] {
-webkit-appearance: button;
}
button:not(:disabled),
[type='button']:not(:disabled),
[type='reset']:not(:disabled),
[type='submit']:not(:disabled) {
cursor: pointer;
}
button::-moz-focus-inner,
[type='button']::-moz-focus-inner,
[type='reset']::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
padding: 0;
border-style: none;
}
input[type='radio'],
input[type='checkbox'] {
box-sizing: border-box;
padding: 0;
}
input[type='date'],
input[type='time'],
input[type='datetime-local'],
input[type='month'] {
-webkit-appearance: listbox;
}
textarea {
overflow: auto;
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
display: block;
width: 100%;
max-width: 100%;
padding: 0;
margin-bottom: 8px;
font-size: 24px;
line-height: inherit;
color: inherit;
white-space: normal;
}
progress {
vertical-align: baseline;
}
[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
height: auto;
}
[type='search'] {
outline-offset: -2px;
-webkit-appearance: none;
}
[type='search']::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
summary {
display: list-item;
cursor: pointer;
}
template {
display: none;
}
[hidden] {
display: none !important;
}
`}
</style>
)
}
The MIT License (MIT)
Copyright (c) 2012-19 Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net)
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.
(()=>{"use strict";var e={211:e=>{var r=function(){function defineProperties(e,r){for(var n=0;n<r.length;n++){var s=r[n];s.enumerable=s.enumerable||false;s.configurable=true;if("value"in s)s.writable=true;Object.defineProperty(e,s.key,s)}}return function(e,r,n){if(r)defineProperties(e.prototype,r);if(n)defineProperties(e,n);return e}}();function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}var n=[[{color:"0, 0, 0",class:"ansi-black"},{color:"187, 0, 0",class:"ansi-red"},{color:"0, 187, 0",class:"ansi-green"},{color:"187, 187, 0",class:"ansi-yellow"},{color:"0, 0, 187",class:"ansi-blue"},{color:"187, 0, 187",class:"ansi-magenta"},{color:"0, 187, 187",class:"ansi-cyan"},{color:"255,255,255",class:"ansi-white"}],[{color:"85, 85, 85",class:"ansi-bright-black"},{color:"255, 85, 85",class:"ansi-bright-red"},{color:"0, 255, 0",class:"ansi-bright-green"},{color:"255, 255, 85",class:"ansi-bright-yellow"},{color:"85, 85, 255",class:"ansi-bright-blue"},{color:"255, 85, 255",class:"ansi-bright-magenta"},{color:"85, 255, 255",class:"ansi-bright-cyan"},{color:"255, 255, 255",class:"ansi-bright-white"}]];var s=function(){r(Anser,null,[{key:"escapeForHtml",value:function escapeForHtml(e){return(new Anser).escapeForHtml(e)}},{key:"linkify",value:function linkify(e){return(new Anser).linkify(e)}},{key:"ansiToHtml",value:function ansiToHtml(e,r){return(new Anser).ansiToHtml(e,r)}},{key:"ansiToJson",value:function ansiToJson(e,r){return(new Anser).ansiToJson(e,r)}},{key:"ansiToText",value:function ansiToText(e){return(new Anser).ansiToText(e)}}]);function Anser(){_classCallCheck(this,Anser);this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null;this.bright=0}r(Anser,[{key:"setupPalette",value:function setupPalette(){this.PALETTE_COLORS=[];for(var e=0;e<2;++e){for(var r=0;r<8;++r){this.PALETTE_COLORS.push(n[e][r].color)}}var s=[0,95,135,175,215,255];var i=function format(e,r,n){return s[e]+", "+s[r]+", "+s[n]};var t=void 0,o=void 0,a=void 0;for(var l=0;l<6;++l){for(var c=0;c<6;++c){for(var u=0;u<6;++u){this.PALETTE_COLORS.push(i(l,c,u))}}}var f=8;for(var h=0;h<24;++h,f+=10){this.PALETTE_COLORS.push(i(f,f,f))}}},{key:"escapeForHtml",value:function escapeForHtml(e){return e.replace(/[&<>]/gm,(function(e){return e=="&"?"&amp;":e=="<"?"&lt;":e==">"?"&gt;":""}))}},{key:"linkify",value:function linkify(e){return e.replace(/(https?:\/\/[^\s]+)/gm,(function(e){return'<a href="'+e+'">'+e+"</a>"}))}},{key:"ansiToHtml",value:function ansiToHtml(e,r){return this.process(e,r,true)}},{key:"ansiToJson",value:function ansiToJson(e,r){r=r||{};r.json=true;r.clearLine=false;return this.process(e,r,true)}},{key:"ansiToText",value:function ansiToText(e){return this.process(e,{},false)}},{key:"process",value:function process(e,r,n){var s=this;var i=this;var t=e.split(/\033\[/);var o=t.shift();if(r===undefined||r===null){r={}}r.clearLine=/\r/.test(e);var a=t.map((function(e){return s.processChunk(e,r,n)}));if(r&&r.json){var l=i.processChunkJson("");l.content=o;l.clearLine=r.clearLine;a.unshift(l);if(r.remove_empty){a=a.filter((function(e){return!e.isEmpty()}))}return a}else{a.unshift(o)}return a.join("")}},{key:"processChunkJson",value:function processChunkJson(e,r,s){r=typeof r=="undefined"?{}:r;var i=r.use_classes=typeof r.use_classes!="undefined"&&r.use_classes;var t=r.key=i?"class":"color";var o={content:e,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,clearLine:r.clearLine,decoration:null,was_processed:false,isEmpty:function isEmpty(){return!o.content}};var a=e.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);if(!a)return o;var l=o.content=a[4];var c=a[2].split(";");if(a[1]!==""||a[3]!=="m"){return o}if(!s){return o}var u=this;u.decoration=null;while(c.length>0){var f=c.shift();var h=parseInt(f);if(isNaN(h)||h===0){u.fg=u.bg=u.decoration=null}else if(h===1){u.decoration="bold"}else if(h===2){u.decoration="dim"}else if(h==3){u.decoration="italic"}else if(h==4){u.decoration="underline"}else if(h==5){u.decoration="blink"}else if(h===7){u.decoration="reverse"}else if(h===8){u.decoration="hidden"}else if(h===9){u.decoration="strikethrough"}else if(h==39){u.fg=null}else if(h==49){u.bg=null}else if(h>=30&&h<38){u.fg=n[0][h%10][t]}else if(h>=90&&h<98){u.fg=n[1][h%10][t]}else if(h>=40&&h<48){u.bg=n[0][h%10][t]}else if(h>=100&&h<108){u.bg=n[1][h%10][t]}else if(h===38||h===48){var p=h===38;if(c.length>=1){var g=c.shift();if(g==="5"&&c.length>=1){var v=parseInt(c.shift());if(v>=0&&v<=255){if(!i){if(!this.PALETTE_COLORS){u.setupPalette()}if(p){u.fg=this.PALETTE_COLORS[v]}else{u.bg=this.PALETTE_COLORS[v]}}else{var d=v>=16?"ansi-palette-"+v:n[v>7?1:0][v%8]["class"];if(p){u.fg=d}else{u.bg=d}}}}else if(g==="2"&&c.length>=3){var _=parseInt(c.shift());var b=parseInt(c.shift());var y=parseInt(c.shift());if(_>=0&&_<=255&&b>=0&&b<=255&&y>=0&&y<=255){var k=_+", "+b+", "+y;if(!i){if(p){u.fg=k}else{u.bg=k}}else{if(p){u.fg="ansi-truecolor";u.fg_truecolor=k}else{u.bg="ansi-truecolor";u.bg_truecolor=k}}}}}}}if(u.fg===null&&u.bg===null&&u.decoration===null){return o}else{var T=[];var m=[];var w={};o.fg=u.fg;o.bg=u.bg;o.fg_truecolor=u.fg_truecolor;o.bg_truecolor=u.bg_truecolor;o.decoration=u.decoration;o.was_processed=true;return o}}},{key:"processChunk",value:function processChunk(e,r,n){var s=this;var i=this;r=r||{};var t=this.processChunkJson(e,r,n);if(r.json){return t}if(t.isEmpty()){return""}if(!t.was_processed){return t.content}var o=r.use_classes;var a=[];var l=[];var c={};var u=function render_data(e){var r=[];var n=void 0;for(n in e){if(e.hasOwnProperty(n)){r.push("data-"+n+'="'+s.escapeForHtml(e[n])+'"')}}return r.length>0?" "+r.join(" "):""};if(t.fg){if(o){l.push(t.fg+"-fg");if(t.fg_truecolor!==null){c["ansi-truecolor-fg"]=t.fg_truecolor;t.fg_truecolor=null}}else{a.push("color:rgb("+t.fg+")")}}if(t.bg){if(o){l.push(t.bg+"-bg");if(t.bg_truecolor!==null){c["ansi-truecolor-bg"]=t.bg_truecolor;t.bg_truecolor=null}}else{a.push("background-color:rgb("+t.bg+")")}}if(t.decoration){if(o){l.push("ansi-"+t.decoration)}else if(t.decoration==="bold"){a.push("font-weight:bold")}else if(t.decoration==="dim"){a.push("opacity:0.5")}else if(t.decoration==="italic"){a.push("font-style:italic")}else if(t.decoration==="reverse"){a.push("filter:invert(100%)")}else if(t.decoration==="hidden"){a.push("visibility:hidden")}else if(t.decoration==="strikethrough"){a.push("text-decoration:line-through")}else{a.push("text-decoration:"+t.decoration)}}if(o){return'<span class="'+l.join(" ")+'"'+u(c)+">"+t.content+"</span>"}else{return'<span style="'+a.join(";")+'"'+u(c)+">"+t.content+"</span>"}}}]);return Anser}();e.exports=s}};var r={};function __nccwpck_require__(n){var s=r[n];if(s!==undefined){return s.exports}var i=r[n]={exports:{}};var t=true;try{e[n](i,i.exports,__nccwpck_require__);t=false}finally{if(t)delete r[n]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n=__nccwpck_require__(211);module.exports=n})();
\ No newline at end of file
{"name":"anser","main":"index.js","author":"Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net)","license":"MIT"}
(()=>{var e={553:function(e){(function(r,t){if(true){e.exports=t(r)}else{}})(typeof global!="undefined"?global:this,(function(e){if(e.CSS&&e.CSS.escape){return e.CSS.escape}var cssEscape=function(e){if(arguments.length==0){throw new TypeError("`CSS.escape` requires an argument.")}var r=String(e);var t=r.length;var n=-1;var a;var i="";var u=r.charCodeAt(0);while(++n<t){a=r.charCodeAt(n);if(a==0){i+="�";continue}if(a>=1&&a<=31||a==127||n==0&&a>=48&&a<=57||n==1&&a>=48&&a<=57&&u==45){i+="\\"+a.toString(16)+" ";continue}if(n==0&&t==1&&a==45){i+="\\"+r.charAt(n);continue}if(a>=128||a==45||a==95||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122){i+=r.charAt(n);continue}i+="\\"+r.charAt(n)}return i};if(!e.CSS){e.CSS={}}e.CSS.escape=cssEscape;return cssEscape}))}};var r={};function __nccwpck_require__(t){var n=r[t];if(n!==undefined){return n.exports}var a=r[t]={exports:{}};var i=true;try{e[t].call(a.exports,a,a.exports,__nccwpck_require__);i=false}finally{if(i)delete r[t]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(553);module.exports=t})();
\ No newline at end of file
{"name":"css.escape","main":"css.escape.js","author":{"name":"Mathias Bynens","url":"https://mathiasbynens.be/"},"license":"MIT"}
(()=>{"use strict";var e={151:e=>{function dataUriToBuffer(e){if(!/^data:/i.test(e)){throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")')}e=e.replace(/\r?\n/g,"");const r=e.indexOf(",");if(r===-1||r<=4){throw new TypeError("malformed data: URI")}const t=e.substring(5,r).split(";");let a="";let i=false;const s=t[0]||"text/plain";let n=s;for(let e=1;e<t.length;e++){if(t[e]==="base64"){i=true}else{n+=`;${t[e]}`;if(t[e].indexOf("charset=")===0){a=t[e].substring(8)}}}if(!t[0]&&!a.length){n+=";charset=US-ASCII";a="US-ASCII"}const o=i?"base64":"ascii";const f=unescape(e.substring(r+1));const _=Buffer.from(f,o);_.type=s;_.typeFull=n;_.charset=a;return _}e.exports=dataUriToBuffer}};var r={};function __nccwpck_require__(t){var a=r[t];if(a!==undefined){return a.exports}var i=r[t]={exports:{}};var s=true;try{e[t](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete r[t]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(151);module.exports=t})();
\ No newline at end of file
{"name":"data-uri-to-buffer","main":"index.js","author":"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)","license":"MIT"}
Copyright 2014-2020 Benjamin Tan
Copyright 2011-2013 John-David Dalton
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.
{"name":"platform","main":"platform.js","author":"Benjamin Tan <demoneaux@gmail.com>","license":"MIT"}
This diff is collapsed.
The MIT License
Copyright (c) 2013 James Halliday (mail@substack.net)
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.
\ No newline at end of file
(()=>{if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var e={};(()=>{var r=e;r.quote=function(e){return e.map((function(e){if(e&&typeof e==="object"){return e.op.replace(/(.)/g,"\\$1")}else if(/["\s]/.test(e)&&!/'/.test(e)){return"'"+e.replace(/(['\\])/g,"\\$1")+"'"}else if(/["'\s]/.test(e)){return'"'+e.replace(/(["\\$`!])/g,"\\$1")+'"'}else{return String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@\[\\\]^`{|}])/g,"$1\\$2")}})).join(" ")};var t="(?:"+["\\|\\|","\\&\\&",";;","\\|\\&","\\<\\(",">>",">\\&","[&;()|<>]"].join("|")+")";var n="|&;()<> \\t";var i="(\\\\['\""+n+"]|[^\\s'\""+n+"])+";var a='"((\\\\"|[^"])*?)"';var f="'((\\\\'|[^'])*?)'";var s="";for(var u=0;u<4;u++){s+=(Math.pow(16,8)*Math.random()).toString(16)}r.parse=function(e,r,t){var n=parse(e,r,t);if(typeof r!=="function")return n;return n.reduce((function(e,r){if(typeof r==="object")return e.concat(r);var t=r.split(RegExp("("+s+".*?"+s+")","g"));if(t.length===1)return e.concat(t[0]);return e.concat(t.filter(Boolean).map((function(e){if(RegExp("^"+s).test(e)){return JSON.parse(e.split(s)[1])}else return e})))}),[])};function parse(e,r,n){var u=new RegExp(["("+t+")","("+i+"|"+a+"|"+f+")*"].join("|"),"g");var o=e.match(u).filter(Boolean);var l=false;if(!o)return[];if(!r)r={};if(!n)n={};return o.map((function(e,r){if(l){return}if(RegExp("^"+t+"$").test(e)){return{op:e}}var i="'";var a='"';var f="$";var s=n.escape||"\\";var u=false;var c=false;var p="";var v=false;for(var g=0,d=e.length;g<d;g++){var h=e.charAt(g);v=v||!u&&(h==="*"||h==="?");if(c){p+=h;c=false}else if(u){if(h===u){u=false}else if(u==i){p+=h}else{if(h===s){g+=1;h=e.charAt(g);if(h===a||h===s||h===f){p+=h}else{p+=s+h}}else if(h===f){p+=parseEnvVar()}else{p+=h}}}else if(h===a||h===i){u=h}else if(RegExp("^"+t+"$").test(h)){return{op:e}}else if(RegExp("^#$").test(h)){l=true;if(p.length){return[p,{comment:e.slice(g+1)+o.slice(r+1).join(" ")}]}return[{comment:e.slice(g+1)+o.slice(r+1).join(" ")}]}else if(h===s){c=true}else if(h===f){p+=parseEnvVar()}else p+=h}if(v)return{op:"glob",pattern:p};return p;function parseEnvVar(){g+=1;var r,t;if(e.charAt(g)==="{"){g+=1;if(e.charAt(g)==="}"){throw new Error("Bad substitution: "+e.substr(g-2,3))}r=e.indexOf("}",g);if(r<0){throw new Error("Bad substitution: "+e.substr(g))}t=e.substr(g,r-g);g=r}else if(/[*@#?$!_\-]/.test(e.charAt(g))){t=e.charAt(g);g+=1}else{r=e.substr(g).match(/[^\w\d_]/);if(!r){t=e.substr(g);g=e.length}else{t=e.substr(g,r.index);g+=r.index-1}}return getVar(null,"",t)}})).reduce((function(e,r){if(r===undefined){return e}return e.concat(r)}),[]);function getVar(e,t,n){var i=typeof r==="function"?r(n):r[n];if(i===undefined&&n!="")i="";else if(i===undefined)i="$";if(typeof i==="object"){return t+s+JSON.stringify(i)+s}else return t+i}}})();module.exports=e})();
\ No newline at end of file
{"name":"shell-quote","main":"index.js","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT"}
MIT License
Copyright (c) 2014-2019 Georg Tavonius
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.
{"name":"stacktrace-parser","main":"stack-trace-parser.cjs.js","author":"Georg Tavonius <g.tavonius@gmail.com> (http://jaz-lounge.com)","license":"MIT"}
(()=>{"use strict";if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var e={};(()=>{var r=e;Object.defineProperty(r,"__esModule",{value:true});var n="<unknown>";function parse(e){var r=e.split("\n");return r.reduce((function(e,r){var n=parseChrome(r)||parseWinjs(r)||parseGecko(r)||parseNode(r)||parseJSC(r);if(n){e.push(n)}return e}),[])}var a=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;var l=/\((\S*)(?::(\d+))(?::(\d+))\)/;function parseChrome(e){var r=a.exec(e);if(!r){return null}var u=r[2]&&r[2].indexOf("native")===0;var t=r[2]&&r[2].indexOf("eval")===0;var i=l.exec(r[2]);if(t&&i!=null){r[2]=i[1];r[3]=i[2];r[4]=i[3]}return{file:!u?r[2]:null,methodName:r[1]||n,arguments:u?[r[2]]:[],lineNumber:r[3]?+r[3]:null,column:r[4]?+r[4]:null}}var u=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function parseWinjs(e){var r=u.exec(e);if(!r){return null}return{file:r[2],methodName:r[1]||n,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}}var t=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i;var i=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function parseGecko(e){var r=t.exec(e);if(!r){return null}var a=r[3]&&r[3].indexOf(" > eval")>-1;var l=i.exec(r[3]);if(a&&l!=null){r[3]=l[1];r[4]=l[2];r[5]=null}return{file:r[3],methodName:r[1]||n,arguments:r[2]?r[2].split(","):[],lineNumber:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}var s=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function parseJSC(e){var r=s.exec(e);if(!r){return null}return{file:r[3],methodName:r[1]||n,arguments:[],lineNumber:+r[4],column:r[5]?+r[5]:null}}var o=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function parseNode(e){var r=o.exec(e);if(!r){return null}return{file:r[2],methodName:r[1]||n,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}}r.parse=parse})();module.exports=e})();
\ No newline at end of file
...@@ -152,11 +152,13 @@ ...@@ -152,11 +152,13 @@
"@types/micromatch": "4.0.2", "@types/micromatch": "4.0.2",
"@types/node-fetch": "2.6.1", "@types/node-fetch": "2.6.1",
"@types/path-to-regexp": "1.7.0", "@types/path-to-regexp": "1.7.0",
"@types/platform": "1.3.4",
"@types/react": "16.9.17", "@types/react": "16.9.17",
"@types/react-dom": "16.9.4", "@types/react-dom": "16.9.4",
"@types/react-is": "16.7.1", "@types/react-is": "16.7.1",
"@types/semver": "7.3.1", "@types/semver": "7.3.1",
"@types/send": "0.14.4", "@types/send": "0.14.4",
"@types/shell-quote": "1.7.1",
"@types/tar": "4.0.3", "@types/tar": "4.0.3",
"@types/text-table": "0.2.1", "@types/text-table": "0.2.1",
"@types/ua-parser-js": "0.7.36", "@types/ua-parser-js": "0.7.36",
...@@ -168,6 +170,7 @@ ...@@ -168,6 +170,7 @@
"acorn": "8.5.0", "acorn": "8.5.0",
"ajv": "8.11.0", "ajv": "8.11.0",
"amphtml-validator": "1.0.35", "amphtml-validator": "1.0.35",
"anser": "1.4.9",
"arg": "4.1.0", "arg": "4.1.0",
"assert": "2.0.0", "assert": "2.0.0",
"async-retry": "1.2.3", "async-retry": "1.2.3",
...@@ -190,7 +193,9 @@ ...@@ -190,7 +193,9 @@
"cookie": "0.4.1", "cookie": "0.4.1",
"cross-spawn": "6.0.5", "cross-spawn": "6.0.5",
"crypto-browserify": "3.12.0", "crypto-browserify": "3.12.0",
"css.escape": "1.5.1",
"cssnano-simple": "3.0.1", "cssnano-simple": "3.0.1",
"data-uri-to-buffer": "3.0.1",
"debug": "4.1.1", "debug": "4.1.1",
"devalue": "2.0.1", "devalue": "2.0.1",
"domain-browser": "4.19.0", "domain-browser": "4.19.0",
...@@ -228,6 +233,7 @@ ...@@ -228,6 +233,7 @@
"p-limit": "3.1.0", "p-limit": "3.1.0",
"path-browserify": "1.0.1", "path-browserify": "1.0.1",
"path-to-regexp": "6.1.0", "path-to-regexp": "6.1.0",
"platform": "1.3.6",
"postcss-flexbugs-fixes": "5.0.2", "postcss-flexbugs-fixes": "5.0.2",
"postcss-modules-extract-imports": "3.0.0", "postcss-modules-extract-imports": "3.0.0",
"postcss-modules-local-by-default": "4.0.0", "postcss-modules-local-by-default": "4.0.0",
...@@ -251,7 +257,9 @@ ...@@ -251,7 +257,9 @@
"semver": "7.3.2", "semver": "7.3.2",
"send": "0.17.1", "send": "0.17.1",
"setimmediate": "1.0.5", "setimmediate": "1.0.5",
"shell-quote": "1.7.3",
"source-map": "0.6.1", "source-map": "0.6.1",
"stacktrace-parser": "0.1.10",
"stream-browserify": "3.0.0", "stream-browserify": "3.0.0",
"stream-http": "3.1.1", "stream-http": "3.1.1",
"string-hash": "1.1.3", "string-hash": "1.1.3",
......
...@@ -169,6 +169,76 @@ export async function ncc_node_fetch(task, opts) { ...@@ -169,6 +169,76 @@ export async function ncc_node_fetch(task, opts) {
.target('compiled/node-fetch') .target('compiled/node-fetch')
} }
externals['anser'] = 'next/dist/compiled/anser'
export async function ncc_node_anser(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('anser')))
.ncc({ packageName: 'anser', externals })
.target('compiled/anser')
}
externals['stacktrace-parser'] = 'next/dist/compiled/stacktrace-parser'
export async function ncc_node_stacktrace_parser(task, opts) {
await task
.source(
opts.src || relative(__dirname, require.resolve('stacktrace-parser'))
)
.ncc({ packageName: 'stacktrace-parser', externals })
.target('compiled/stacktrace-parser')
}
externals['data-uri-to-buffer'] = 'next/dist/compiled/data-uri-to-buffer'
export async function ncc_node_data_uri_to_buffer(task, opts) {
await task
.source(
opts.src || relative(__dirname, require.resolve('data-uri-to-buffer'))
)
.ncc({ packageName: 'data-uri-to-buffer', externals })
.target('compiled/data-uri-to-buffer')
}
externals['css.escape'] = 'next/dist/compiled/css.escape'
export async function ncc_node_cssescape(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('css.escape')))
.ncc({ packageName: 'css.escape', externals })
.target('compiled/css.escape')
}
externals['shell-quote'] = 'next/dist/compiled/shell-quote'
export async function ncc_node_shell_quote(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('shell-quote')))
.ncc({ packageName: 'shell-quote', externals })
.target('compiled/shell-quote')
}
externals['platform'] = 'next/dist/compiled/platform'
export async function ncc_node_platform(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('platform')))
.ncc({ packageName: 'platform', externals })
.target('compiled/platform')
const clientFile = join(__dirname, 'compiled/platform/platform.js')
const content = fs.readFileSync(clientFile, 'utf8')
// remove AMD define branch as this forces the module to not
// be treated as commonjs in serverless/client mode
fs.writeFileSync(
clientFile,
content.replace(
new RegExp(
'if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){r.platform=d;define((function(){return d}))}else '.replace(
/[|\\{}()[\]^$+*?.-]/g,
'\\$&'
),
'g'
),
''
)
)
}
externals['undici'] = 'next/dist/compiled/undici' externals['undici'] = 'next/dist/compiled/undici'
export async function ncc_undici(task, opts) { export async function ncc_undici(task, opts) {
await task await task
...@@ -1850,6 +1920,12 @@ export async function ncc(task, opts) { ...@@ -1850,6 +1920,12 @@ export async function ncc(task, opts) {
'ncc_get_orientation', 'ncc_get_orientation',
'ncc_hapi_accept', 'ncc_hapi_accept',
'ncc_node_fetch', 'ncc_node_fetch',
'ncc_node_anser',
'ncc_node_stacktrace_parser',
'ncc_node_data_uri_to_buffer',
'ncc_node_cssescape',
'ncc_node_platform',
'ncc_node_shell_quote',
'ncc_undici', 'ncc_undici',
'ncc_acorn', 'ncc_acorn',
'ncc_amphtml_validator', 'ncc_amphtml_validator',
......
...@@ -339,6 +339,35 @@ declare module 'next/dist/compiled/@segment/ajv-human-errors' { ...@@ -339,6 +339,35 @@ declare module 'next/dist/compiled/@segment/ajv-human-errors' {
export = m export = m
} }
declare module 'next/dist/compiled/stacktrace-parser' {
import * as m from 'stacktrace-parser'
export = m
}
declare module 'next/dist/compiled/anser' {
import * as m from 'anser'
export = m
}
declare module 'next/dist/compiled/platform' {
import * as m from 'platform'
export = m
}
declare module 'next/dist/compiled/css.escape' {
export = CSS.escape
}
declare module 'next/dist/compiled/data-uri-to-buffer' {
import * as m from 'data-uri-to-buffer'
export = m
}
declare module 'next/dist/compiled/shell-quote' {
import * as m from 'shell-quote'
export = m
}
declare namespace NodeJS { declare namespace NodeJS {
interface ProcessVersions { interface ProcessVersions {
pnp?: string pnp?: string
......
...@@ -499,11 +499,13 @@ importers: ...@@ -499,11 +499,13 @@ importers:
'@types/micromatch': 4.0.2 '@types/micromatch': 4.0.2
'@types/node-fetch': 2.6.1 '@types/node-fetch': 2.6.1
'@types/path-to-regexp': 1.7.0 '@types/path-to-regexp': 1.7.0
'@types/platform': 1.3.4
'@types/react': 16.9.17 '@types/react': 16.9.17
'@types/react-dom': 16.9.4 '@types/react-dom': 16.9.4
'@types/react-is': 16.7.1 '@types/react-is': 16.7.1
'@types/semver': 7.3.1 '@types/semver': 7.3.1
'@types/send': 0.14.4 '@types/send': 0.14.4
'@types/shell-quote': 1.7.1
'@types/tar': 4.0.3 '@types/tar': 4.0.3
'@types/text-table': 0.2.1 '@types/text-table': 0.2.1
'@types/ua-parser-js': 0.7.36 '@types/ua-parser-js': 0.7.36
...@@ -515,6 +517,7 @@ importers: ...@@ -515,6 +517,7 @@ importers:
acorn: 8.5.0 acorn: 8.5.0
ajv: 8.11.0 ajv: 8.11.0
amphtml-validator: 1.0.35 amphtml-validator: 1.0.35
anser: 1.4.9
arg: 4.1.0 arg: 4.1.0
assert: 2.0.0 assert: 2.0.0
async-retry: 1.2.3 async-retry: 1.2.3
...@@ -538,7 +541,9 @@ importers: ...@@ -538,7 +541,9 @@ importers:
cookie: 0.4.1 cookie: 0.4.1
cross-spawn: 6.0.5 cross-spawn: 6.0.5
crypto-browserify: 3.12.0 crypto-browserify: 3.12.0
css.escape: 1.5.1
cssnano-simple: 3.0.1 cssnano-simple: 3.0.1
data-uri-to-buffer: 3.0.1
debug: 4.1.1 debug: 4.1.1
devalue: 2.0.1 devalue: 2.0.1
domain-browser: 4.19.0 domain-browser: 4.19.0
...@@ -576,6 +581,7 @@ importers: ...@@ -576,6 +581,7 @@ importers:
p-limit: 3.1.0 p-limit: 3.1.0
path-browserify: 1.0.1 path-browserify: 1.0.1
path-to-regexp: 6.1.0 path-to-regexp: 6.1.0
platform: 1.3.6
postcss: 8.4.14 postcss: 8.4.14
postcss-flexbugs-fixes: 5.0.2 postcss-flexbugs-fixes: 5.0.2
postcss-modules-extract-imports: 3.0.0 postcss-modules-extract-imports: 3.0.0
...@@ -600,7 +606,9 @@ importers: ...@@ -600,7 +606,9 @@ importers:
semver: 7.3.2 semver: 7.3.2
send: 0.17.1 send: 0.17.1
setimmediate: 1.0.5 setimmediate: 1.0.5
shell-quote: 1.7.3
source-map: 0.6.1 source-map: 0.6.1
stacktrace-parser: 0.1.10
stream-browserify: 3.0.0 stream-browserify: 3.0.0
stream-http: 3.1.1 stream-http: 3.1.1
string_decoder: 1.3.0 string_decoder: 1.3.0
...@@ -691,11 +699,13 @@ importers: ...@@ -691,11 +699,13 @@ importers:
'@types/micromatch': 4.0.2 '@types/micromatch': 4.0.2
'@types/node-fetch': 2.6.1 '@types/node-fetch': 2.6.1
'@types/path-to-regexp': 1.7.0 '@types/path-to-regexp': 1.7.0
'@types/platform': 1.3.4
'@types/react': 16.9.17 '@types/react': 16.9.17
'@types/react-dom': 16.9.4 '@types/react-dom': 16.9.4
'@types/react-is': 16.7.1 '@types/react-is': 16.7.1
'@types/semver': 7.3.1 '@types/semver': 7.3.1
'@types/send': 0.14.4 '@types/send': 0.14.4
'@types/shell-quote': 1.7.1
'@types/tar': 4.0.3 '@types/tar': 4.0.3
'@types/text-table': 0.2.1 '@types/text-table': 0.2.1
'@types/ua-parser-js': 0.7.36 '@types/ua-parser-js': 0.7.36
...@@ -707,6 +717,7 @@ importers: ...@@ -707,6 +717,7 @@ importers:
acorn: 8.5.0 acorn: 8.5.0
ajv: 8.11.0 ajv: 8.11.0
amphtml-validator: 1.0.35 amphtml-validator: 1.0.35
anser: 1.4.9
arg: 4.1.0 arg: 4.1.0
assert: 2.0.0 assert: 2.0.0
async-retry: 1.2.3 async-retry: 1.2.3
...@@ -729,7 +740,9 @@ importers: ...@@ -729,7 +740,9 @@ importers:
cookie: 0.4.1 cookie: 0.4.1
cross-spawn: 6.0.5 cross-spawn: 6.0.5
crypto-browserify: 3.12.0 crypto-browserify: 3.12.0
css.escape: 1.5.1
cssnano-simple: 3.0.1_postcss@8.4.14 cssnano-simple: 3.0.1_postcss@8.4.14
data-uri-to-buffer: 3.0.1
debug: 4.1.1 debug: 4.1.1
devalue: 2.0.1 devalue: 2.0.1
domain-browser: 4.19.0 domain-browser: 4.19.0
...@@ -767,6 +780,7 @@ importers: ...@@ -767,6 +780,7 @@ importers:
p-limit: 3.1.0 p-limit: 3.1.0
path-browserify: 1.0.1 path-browserify: 1.0.1
path-to-regexp: 6.1.0 path-to-regexp: 6.1.0
platform: 1.3.6
postcss-flexbugs-fixes: 5.0.2_postcss@8.4.14 postcss-flexbugs-fixes: 5.0.2_postcss@8.4.14
postcss-modules-extract-imports: 3.0.0_postcss@8.4.14 postcss-modules-extract-imports: 3.0.0_postcss@8.4.14
postcss-modules-local-by-default: 4.0.0_postcss@8.4.14 postcss-modules-local-by-default: 4.0.0_postcss@8.4.14
...@@ -790,7 +804,9 @@ importers: ...@@ -790,7 +804,9 @@ importers:
semver: 7.3.2 semver: 7.3.2
send: 0.17.1 send: 0.17.1
setimmediate: 1.0.5 setimmediate: 1.0.5
shell-quote: 1.7.3
source-map: 0.6.1 source-map: 0.6.1
stacktrace-parser: 0.1.10
stream-browserify: 3.0.0 stream-browserify: 3.0.0
stream-http: 3.1.1 stream-http: 3.1.1
string_decoder: 1.3.0 string_decoder: 1.3.0
...@@ -7686,6 +7702,13 @@ packages: ...@@ -7686,6 +7702,13 @@ packages:
path-to-regexp: 6.1.0 path-to-regexp: 6.1.0
dev: true dev: true
/@types/platform/1.3.4:
resolution:
{
integrity: sha512-U0o4K+GNiK0PNxoDwd8xRnvLVe4kzei6opn3/FCjAriqaP+rfrDdSl1kP/hLL6Y3/Y3hhGnBwD4dCkkAqs1W/Q==,
}
dev: true
/@types/prettier/2.2.3: /@types/prettier/2.2.3:
resolution: resolution:
{ {
...@@ -7845,6 +7868,13 @@ packages: ...@@ -7845,6 +7868,13 @@ packages:
'@types/node': 17.0.21 '@types/node': 17.0.21
dev: true dev: true
/@types/shell-quote/1.7.1:
resolution:
{
integrity: sha512-SWZ2Nom1pkyXCDohRSrkSKvDh8QOG9RfAsrt5/NsPQC4UQJ55eG0qClA40I+Gkez4KTQ0uDUT8ELRXThf3J5jw==,
}
dev: true
/@types/source-list-map/0.1.2: /@types/source-list-map/0.1.2:
resolution: resolution:
{ {
...@@ -8786,7 +8816,6 @@ packages: ...@@ -8786,7 +8816,6 @@ packages:
{ {
integrity: sha512-AI+BjTeGt2+WFk4eWcqbQ7snZpDBt8SaLlj0RT2h5xfdWaiy51OjYvqwMrNzJLGy8iOAL6nKDITWO+rd4MkYEA==, integrity: sha512-AI+BjTeGt2+WFk4eWcqbQ7snZpDBt8SaLlj0RT2h5xfdWaiy51OjYvqwMrNzJLGy8iOAL6nKDITWO+rd4MkYEA==,
} }
dev: false
/ansi-align/3.0.0: /ansi-align/3.0.0:
resolution: resolution:
...@@ -12246,7 +12275,6 @@ packages: ...@@ -12246,7 +12275,6 @@ packages:
{ {
integrity: sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==, integrity: sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==,
} }
dev: false
/css/3.0.0: /css/3.0.0:
resolution: resolution:
...@@ -12537,7 +12565,6 @@ packages: ...@@ -12537,7 +12565,6 @@ packages:
integrity: sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==, integrity: sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==,
} }
engines: { node: '>= 6' } engines: { node: '>= 6' }
dev: false
/data-urls/2.0.0: /data-urls/2.0.0:
resolution: resolution:
...@@ -23465,7 +23492,6 @@ packages: ...@@ -23465,7 +23492,6 @@ packages:
{ {
integrity: sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==, integrity: sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==,
} }
dev: false
/playwright-chromium/1.22.2: /playwright-chromium/1.22.2:
resolution: resolution:
...@@ -27636,7 +27662,6 @@ packages: ...@@ -27636,7 +27662,6 @@ packages:
engines: { node: '>=6' } engines: { node: '>=6' }
dependencies: dependencies:
type-fest: 0.7.1 type-fest: 0.7.1
dev: false
/state-toggle/1.0.2: /state-toggle/1.0.2:
resolution: resolution:
...@@ -29164,7 +29189,6 @@ packages: ...@@ -29164,7 +29189,6 @@ packages:
integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==, integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==,
} }
engines: { node: '>=8' } engines: { node: '>=8' }
dev: false
/type-fest/0.8.1: /type-fest/0.8.1:
resolution: resolution:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment