PHP 7.4.33
Preview: amp-dev.js.map Size: 6.35 KB
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/next/dist/client/dev/amp-dev.js.map
{"version":3,"sources":["../../../src/client/dev/amp-dev.ts"],"sourcesContent":["/* globals __webpack_hash__ */\nimport { displayContent } from './fouc'\nimport initOnDemandEntries from './on-demand-entries-client'\nimport {\n  addMessageListener,\n  connectHMR,\n} from '../components/react-dev-overlay/pages/websocket'\nimport { HMR_ACTIONS_SENT_TO_BROWSER } from '../../server/dev/hot-reloader-types'\n\ndeclare global {\n  const __webpack_runtime_id__: string\n}\n\nconst data = JSON.parse(\n  (document.getElementById('__NEXT_DATA__') as any).textContent\n)\nwindow.__NEXT_DATA__ = data\n\nlet { assetPrefix, page } = data\nassetPrefix = assetPrefix || ''\nlet mostRecentHash: null | string = null\n/* eslint-disable-next-line */\nlet curHash = __webpack_hash__\nconst hotUpdatePath =\n  assetPrefix + (assetPrefix.endsWith('/') ? '' : '/') + '_next/static/webpack/'\n\n// Is there a newer version of this code available?\nfunction isUpdateAvailable() {\n  // __webpack_hash__ is the hash of the current compilation.\n  // It's a global variable injected by Webpack.\n  /* eslint-disable-next-line */\n  return mostRecentHash !== __webpack_hash__\n}\n\n// Webpack disallows updates in other states.\nfunction canApplyUpdates() {\n  // @ts-expect-error TODO: module.hot exists but type needs to be added. Can't use `as any` here as webpack parses for `module.hot` calls.\n  return module.hot.status() === 'idle'\n}\n\n// This function reads code updates on the fly and hard\n// reloads the page when it has changed.\nasync function tryApplyUpdates() {\n  if (!isUpdateAvailable() || !canApplyUpdates()) {\n    return\n  }\n  try {\n    const res = await fetch(\n      typeof __webpack_runtime_id__ !== 'undefined'\n        ? // eslint-disable-next-line no-undef\n          `${hotUpdatePath}${curHash}.${__webpack_runtime_id__}.hot-update.json`\n        : `${hotUpdatePath}${curHash}.hot-update.json`\n    )\n    const jsonData = await res.json()\n    const curPage = page === '/' ? 'index' : page\n    // webpack 5 uses an array instead\n    const pageUpdated = (\n      Array.isArray(jsonData.c) ? jsonData.c : Object.keys(jsonData.c)\n    ).some((mod: string) => {\n      return (\n        mod.indexOf(\n          `pages${curPage.startsWith('/') ? curPage : `/${curPage}`}`\n        ) !== -1 ||\n        mod.indexOf(\n          `pages${curPage.startsWith('/') ? curPage : `/${curPage}`}`.replace(\n            /\\//g,\n            '\\\\'\n          )\n        ) !== -1\n      )\n    })\n\n    if (pageUpdated) {\n      window.location.reload()\n    } else {\n      curHash = mostRecentHash as string\n    }\n  } catch (err) {\n    console.error('Error occurred checking for update', err)\n    window.location.reload()\n  }\n}\n\naddMessageListener((message) => {\n  if (!('action' in message)) {\n    return\n  }\n\n  try {\n    // actions which are not related to amp-dev\n    if (\n      message.action === HMR_ACTIONS_SENT_TO_BROWSER.SERVER_ERROR ||\n      message.action === HMR_ACTIONS_SENT_TO_BROWSER.DEV_PAGES_MANIFEST_UPDATE\n    ) {\n      return\n    }\n    if (\n      message.action === HMR_ACTIONS_SENT_TO_BROWSER.SYNC ||\n      message.action === HMR_ACTIONS_SENT_TO_BROWSER.BUILT\n    ) {\n      if (!message.hash) {\n        return\n      }\n      mostRecentHash = message.hash\n      tryApplyUpdates()\n    } else if (message.action === HMR_ACTIONS_SENT_TO_BROWSER.RELOAD_PAGE) {\n      window.location.reload()\n    }\n  } catch (err: any) {\n    console.warn(\n      '[HMR] Invalid message: ' +\n        JSON.stringify(message) +\n        '\\n' +\n        (err?.stack ?? '')\n    )\n  }\n})\n\nconnectHMR({\n  assetPrefix,\n  path: '/_next/webpack-hmr',\n})\ndisplayContent()\n\ninitOnDemandEntries(data.page)\n"],"names":["data","JSON","parse","document","getElementById","textContent","window","__NEXT_DATA__","assetPrefix","page","mostRecentHash","curHash","__webpack_hash__","hotUpdatePath","endsWith","isUpdateAvailable","canApplyUpdates","module","hot","status","tryApplyUpdates","res","fetch","__webpack_runtime_id__","jsonData","json","curPage","pageUpdated","Array","isArray","c","Object","keys","some","mod","indexOf","startsWith","replace","location","reload","err","console","error","addMessageListener","message","action","HMR_ACTIONS_SENT_TO_BROWSER","SERVER_ERROR","DEV_PAGES_MANIFEST_UPDATE","SYNC","BUILT","hash","RELOAD_PAGE","warn","stringify","stack","connectHMR","path","displayContent","initOnDemandEntries"],"mappings":"AAAA,4BAA4B;;;;;sBACG;gFACC;2BAIzB;kCACqC;AAM5C,MAAMA,OAAOC,KAAKC,KAAK,CACrB,AAACC,SAASC,cAAc,CAAC,iBAAyBC,WAAW;AAE/DC,OAAOC,aAAa,GAAGP;AAEvB,IAAI,EAAEQ,WAAW,EAAEC,IAAI,EAAE,GAAGT;AAC5BQ,cAAcA,eAAe;AAC7B,IAAIE,iBAAgC;AACpC,4BAA4B,GAC5B,IAAIC,UAAUC;AACd,MAAMC,gBACJL,cAAeA,CAAAA,YAAYM,QAAQ,CAAC,OAAO,KAAK,GAAE,IAAK;AAEzD,mDAAmD;AACnD,SAASC;IACP,2DAA2D;IAC3D,8CAA8C;IAC9C,4BAA4B,GAC5B,OAAOL,mBAAmBE;AAC5B;AAEA,6CAA6C;AAC7C,SAASI;IACP,yIAAyI;IACzI,OAAOC,OAAOC,GAAG,CAACC,MAAM,OAAO;AACjC;AAEA,uDAAuD;AACvD,wCAAwC;AACxC,eAAeC;IACb,IAAI,CAACL,uBAAuB,CAACC,mBAAmB;QAC9C;IACF;IACA,IAAI;QACF,MAAMK,MAAM,MAAMC,MAChB,OAAOC,2BAA2B,cAE9B,AAAC,KAAEV,gBAAgBF,UAAQ,MAAGY,yBAAuB,qBACrD,AAAC,KAAEV,gBAAgBF,UAAQ;QAEjC,MAAMa,WAAW,MAAMH,IAAII,IAAI;QAC/B,MAAMC,UAAUjB,SAAS,MAAM,UAAUA;QACzC,kCAAkC;QAClC,MAAMkB,cAAc,AAClBC,CAAAA,MAAMC,OAAO,CAACL,SAASM,CAAC,IAAIN,SAASM,CAAC,GAAGC,OAAOC,IAAI,CAACR,SAASM,CAAC,CAAA,EAC/DG,IAAI,CAAC,CAACC;YACN,OACEA,IAAIC,OAAO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IAAAA,8BAAmB,EAAC3D,KAAKS,IAAI"}

Directory Contents

Dirs: 2 × Files: 15
Name Size Perms Modified Actions
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
72 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
4.04 KB lrw-r--r-- 2025-03-28 11:04:38
Edit Download
6.35 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
57 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
1.50 KB lrw-r--r-- 2025-03-28 11:04:40
Edit Download
1.99 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
383 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
4.33 KB lrw-r--r-- 2025-03-28 11:04:40
Edit Download
4.80 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
41 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
742 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
369 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
83 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
2.11 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
2.09 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).