PHP 7.4.33
Preview: _error.js.map Size: 6.66 KB
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/next/dist/pages/_error.js.map
{"version":3,"sources":["../../src/pages/_error.tsx"],"sourcesContent":["import React from 'react'\nimport Head from '../shared/lib/head'\nimport type { NextPageContext } from '../shared/lib/utils'\n\nconst statusCodes: { [code: number]: string } = {\n  400: 'Bad Request',\n  404: 'This page could not be found',\n  405: 'Method Not Allowed',\n  500: 'Internal Server Error',\n}\n\nexport type ErrorProps = {\n  statusCode: number\n  hostname?: string\n  title?: string\n  withDarkMode?: boolean\n}\n\nfunction _getInitialProps({\n  req,\n  res,\n  err,\n}: NextPageContext): Promise<ErrorProps> | ErrorProps {\n  const statusCode =\n    res && res.statusCode ? res.statusCode : err ? err.statusCode! : 404\n\n  let hostname\n\n  if (typeof window !== 'undefined') {\n    hostname = window.location.hostname\n  } else if (req) {\n    const { getRequestMeta } =\n      require('../server/request-meta') as typeof import('../server/request-meta')\n\n    const initUrl = getRequestMeta(req, 'initURL')\n    if (initUrl) {\n      const url = new URL(initUrl)\n      hostname = url.hostname\n    }\n  }\n\n  return { statusCode, hostname }\n}\n\nconst styles: Record<string, React.CSSProperties> = {\n  error: {\n    // https://github.com/sindresorhus/modern-normalize/blob/main/modern-normalize.css#L38-L52\n    fontFamily:\n      'system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"',\n    height: '100vh',\n    textAlign: 'center',\n    display: 'flex',\n    flexDirection: 'column',\n    alignItems: 'center',\n    justifyContent: 'center',\n  },\n  desc: {\n    lineHeight: '48px',\n  },\n  h1: {\n    display: 'inline-block',\n    margin: '0 20px 0 0',\n    paddingRight: 23,\n    fontSize: 24,\n    fontWeight: 500,\n    verticalAlign: 'top',\n  },\n  h2: {\n    fontSize: 14,\n    fontWeight: 400,\n    lineHeight: '28px',\n  },\n  wrap: {\n    display: 'inline-block',\n  },\n}\n\n/**\n * `Error` component used for handling errors.\n */\nexport default class Error<P = {}> extends React.Component<P & ErrorProps> {\n  static displayName = 'ErrorPage'\n\n  static getInitialProps = _getInitialProps\n  static origGetInitialProps = _getInitialProps\n\n  render() {\n    const { statusCode, withDarkMode = true } = this.props\n    const title =\n      this.props.title ||\n      statusCodes[statusCode] ||\n      'An unexpected error has occurred'\n\n    return (\n      <div style={styles.error}>\n        <Head>\n          <title>\n            {statusCode\n              ? `${statusCode}: ${title}`\n              : 'Application error: a client-side exception has occurred'}\n          </title>\n        </Head>\n        <div style={styles.desc}>\n          <style\n            dangerouslySetInnerHTML={{\n              /* CSS minified from\n                body { margin: 0; color: #000; background: #fff; }\n                .next-error-h1 {\n                  border-right: 1px solid rgba(0, 0, 0, .3);\n                }\n\n                ${\n                  withDarkMode\n                    ? `@media (prefers-color-scheme: dark) {\n                  body { color: #fff; background: #000; }\n                  .next-error-h1 {\n                    border-right: 1px solid rgba(255, 255, 255, .3);\n                  }\n                }`\n                    : ''\n                }\n               */\n              __html: `body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}${\n                withDarkMode\n                  ? '@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}'\n                  : ''\n              }`,\n            }}\n          />\n\n          {statusCode ? (\n            <h1 className=\"next-error-h1\" style={styles.h1}>\n              {statusCode}\n            </h1>\n          ) : null}\n          <div style={styles.wrap}>\n            <h2 style={styles.h2}>\n              {this.props.title || statusCode ? (\n                title\n              ) : (\n                <>\n                  Application error: a client-side exception has occurred{' '}\n                  {Boolean(this.props.hostname) && (\n                    <>while loading {this.props.hostname}</>\n                  )}{' '}\n                  (see the browser console for more information)\n                </>\n              )}\n              .\n            </h2>\n          </div>\n        </div>\n      </div>\n    )\n  }\n}\n"],"names":["Error","statusCodes","_getInitialProps","req","res","err","statusCode","hostname","window","location","getRequestMeta","require","initUrl","url","URL","styles","error","fontFamily","height","textAlign","display","flexDirection","alignItems","justifyContent","desc","lineHeight","h1","margin","paddingRight","fontSize","fontWeight","verticalAlign","h2","wrap","React","Component","render","withDarkMode","props","title","div","style","Head","dangerouslySetInnerHTML","__html","className","Boolean","displayName","getInitialProps","origGetInitialProps"],"mappings":";;;;;;;eAgFqBA;;;;;gEAhFH;+DACD;AAGjB,MAAMC,cAA0C;IAC9C,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;AACP;AASA,SAASC,iBAAiB,KAIR;IAJQ,IAAA,EACxBC,GAAG,EACHC,GAAG,EACHC,GAAG,EACa,GAJQ;IAKxB,MAAMC,aACJF,OAAOA,IAAIE,UAAU,GAAGF,IAAIE,UAAU,GAAGD,MAAMA,IAAIC,UAAU,GAAI;IAEnE,IAAIC;IAEJ,IAAI,OAAOC,WAAW,aAAa;QACjCD,WAAWC,OAAOC,QAAQ,CAACF,QAAQ;IACrC,OAAO,IAAIJ,KAAK;QACd,MAAM,EAAEO,cAAc,EAAE,GACtBC,QAAQ;QAEV,MAAMC,UAAUF,eAAeP,KAAK;QACpC,IAAIS,SAAS;YACX,MAAMC,MAAM,IAAIC,IAAIF;YACpBL,WAAWM,IAAIN,QAAQ;QACzB;IACF;IAEA,OAAO;QAAED;QAAYC;IAAS;AAChC;AAEA,MAAMQ,SAA8C;IAClDC,OAAO;QACL,0FAA0F;QAC1FC,YACE;QACFC,QAAQ;QACRC,WAAW;QACXC,SAAS;QACTC,eAAe;QACfC,YAAY;QACZC,gBAAgB;IAClB;IACAC,MAAM;QACJC,YAAY;IACd;IACAC,IAAI;QACFN,SAAS;QACTO,QAAQ;QACRC,cAAc;QACdC,UAAU;QACVC,YAAY;QACZC,eAAe;IACjB;IACAC,IAAI;QACFH,UAAU;QACVC,YAAY;QACZL,YAAY;IACd;IACAQ,MAAM;QACJb,SAAS;IACX;AACF;AAKe,MAAMpB,cAAsBkC,cAAK,CAACC,SAAS;IAMxDC,SAAS;QACP,MAAM,EAAE9B,UAAU,EAAE+B,eAAe,IAAI,EAAE,GAAG,IAAI,CAACC,KAAK;QACtD,MAAMC,QACJ,IAAI,CAACD,KAAK,CAACC,KAAK,IAChBtC,WAAW,CAACK,WAAW,IACvB;QAEF,qBACE,sBAACkC;YAAIC,OAAO1B,OAAOC,KAAK;;8BACtB,qBAAC0B,aAAI;8BACH,cAAA,qBAACH;kCACEjC,aACG,AAAGA,aAAW,OAAIiC,QAClB;;;8BAGR,sBAACC;oBAAIC,OAAO1B,OAAOS,IAAI;;sCACrB,qBAACiB;4BACCE,yBAAyB;gCACvB;;;;;;;;;;;;;;;;eAgBC,GACDC,QAAQ,AAAC,mGACPP,CAAAA,eACI,oIACA,EAAC;4BAET;;wBAGD/B,2BACC,qBAACoB;4BAAGmB,WAAU;4BAAgBJ,OAAO1B,OAAOW,EAAE;sCAC3CpB;6BAED;sCACJ,qBAACkC;4BAAIC,OAAO1B,OAAOkB,IAAI;sCACrB,cAAA,sBAACD;gCAAGS,OAAO1B,OAAOiB,EAAE;;oCACjB,IAAI,CAACM,KAAK,CAACC,KAAK,IAAIjC,aACnBiC,sBAEA;;4CAAE;4CACwD;4CACvDO,QAAQ,IAAI,CAACR,KAAK,CAAC/B,QAAQ,mBAC1B;;oDAAE;oDAAe,IAAI,CAAC+B,KAAK,CAAC/B,QAAQ;;;4CACnC;4CAAI;;;oCAGT;;;;;;;;IAOd;AACF;AA3EqBP,MACZ+C,cAAc;AADF/C,MAGZgD,kBAAkB9C;AAHNF,MAIZiD,sBAAsB/C"}

Directory Contents

Dirs: 0 × Files: 9
Name Size Perms Modified Actions
981 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
1.52 KB lrw-r--r-- 2025-03-28 11:04:38
Edit Download
1.82 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
2.93 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
41.59 KB lrw-r--r-- 2025-03-28 11:04:38
Edit Download
60.84 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
660 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
5.99 KB lrw-r--r-- 2025-03-28 11:04:38
Edit Download
6.66 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).