Initial boiler plate project
This commit is contained in:
4
node_modules/next/dist/client/dev/amp-dev.d.ts
generated
vendored
Normal file
4
node_modules/next/dist/client/dev/amp-dev.d.ts
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
declare global {
|
||||
const __webpack_runtime_id__: string;
|
||||
}
|
||||
export {};
|
||||
88
node_modules/next/dist/client/dev/amp-dev.js
generated
vendored
Normal file
88
node_modules/next/dist/client/dev/amp-dev.js
generated
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
/* globals __webpack_hash__ */ "use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
||||
const _fouc = require("./fouc");
|
||||
const _ondemandentriesclient = /*#__PURE__*/ _interop_require_default._(require("./on-demand-entries-client"));
|
||||
const _websocket = require("../components/react-dev-overlay/pages/websocket");
|
||||
const _hotreloadertypes = require("../../server/dev/hot-reloader-types");
|
||||
const data = JSON.parse(document.getElementById("__NEXT_DATA__").textContent);
|
||||
window.__NEXT_DATA__ = data;
|
||||
let { assetPrefix, page } = data;
|
||||
assetPrefix = assetPrefix || "";
|
||||
let mostRecentHash = null;
|
||||
/* eslint-disable-next-line */ let curHash = __webpack_hash__;
|
||||
const hotUpdatePath = assetPrefix + (assetPrefix.endsWith("/") ? "" : "/") + "_next/static/webpack/";
|
||||
// Is there a newer version of this code available?
|
||||
function isUpdateAvailable() {
|
||||
// __webpack_hash__ is the hash of the current compilation.
|
||||
// It's a global variable injected by Webpack.
|
||||
/* eslint-disable-next-line */ return mostRecentHash !== __webpack_hash__;
|
||||
}
|
||||
// Webpack disallows updates in other states.
|
||||
function canApplyUpdates() {
|
||||
// @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.
|
||||
return module.hot.status() === "idle";
|
||||
}
|
||||
// This function reads code updates on the fly and hard
|
||||
// reloads the page when it has changed.
|
||||
async function tryApplyUpdates() {
|
||||
if (!isUpdateAvailable() || !canApplyUpdates()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const res = await fetch(typeof __webpack_runtime_id__ !== "undefined" ? "" + hotUpdatePath + curHash + "." + __webpack_runtime_id__ + ".hot-update.json" : "" + hotUpdatePath + curHash + ".hot-update.json");
|
||||
const jsonData = await res.json();
|
||||
const curPage = page === "/" ? "index" : page;
|
||||
// webpack 5 uses an array instead
|
||||
const pageUpdated = (Array.isArray(jsonData.c) ? jsonData.c : Object.keys(jsonData.c)).some((mod)=>{
|
||||
return mod.indexOf("pages" + (curPage.startsWith("/") ? curPage : "/" + curPage)) !== -1 || mod.indexOf(("pages" + (curPage.startsWith("/") ? curPage : "/" + curPage)).replace(/\//g, "\\")) !== -1;
|
||||
});
|
||||
if (pageUpdated) {
|
||||
window.location.reload();
|
||||
} else {
|
||||
curHash = mostRecentHash;
|
||||
}
|
||||
} catch (err) {
|
||||
console.error("Error occurred checking for update", err);
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
(0, _websocket.addMessageListener)((message)=>{
|
||||
if (!("action" in message)) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// actions which are not related to amp-dev
|
||||
if (message.action === _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.SERVER_ERROR || message.action === _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.DEV_PAGES_MANIFEST_UPDATE) {
|
||||
return;
|
||||
}
|
||||
if (message.action === _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.SYNC || message.action === _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.BUILT) {
|
||||
if (!message.hash) {
|
||||
return;
|
||||
}
|
||||
mostRecentHash = message.hash;
|
||||
tryApplyUpdates();
|
||||
} else if (message.action === _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.RELOAD_PAGE) {
|
||||
window.location.reload();
|
||||
}
|
||||
} catch (err) {
|
||||
var _err_stack;
|
||||
console.warn("[HMR] Invalid message: " + message + "\n" + ((_err_stack = err == null ? void 0 : err.stack) != null ? _err_stack : ""));
|
||||
}
|
||||
});
|
||||
(0, _websocket.connectHMR)({
|
||||
assetPrefix,
|
||||
path: "/_next/webpack-hmr"
|
||||
});
|
||||
(0, _fouc.displayContent)();
|
||||
(0, _ondemandentriesclient.default)(data.page);
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=amp-dev.js.map
|
||||
1
node_modules/next/dist/client/dev/amp-dev.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/dev/amp-dev.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/client/dev/amp-dev.ts"],"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","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,GA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AAM;IACxB;AACF;AAEAI,IAAAA,6BAAkB,EAAC,CAACC;IAClB,IAAI,CAAE,CAAA,YAAYA,OAAM,GAAI;QAC1B;IACF;IAEA,IAAI;QACF,2CAA2C;QAC3C,IACEA,QAAQC,MAAM,KAAKC,6CAA2B,CAACC,YAAY,IAC3DH,QAAQC,MAAM,KAAKC,6CAA2B,CAACE,yBAAyB,EACxE;YACA;QACF;QACA,IACEJ,QAAQC,MAAM,KAAKC,6CAA2B,CAACG,IAAI,IACnDL,QAAQC,MAAM,KAAKC,6CAA2B,CAACI,KAAK,EACpD;YACA,IAAI,CAACN,QAAQO,IAAI,EAAE;gBACjB;YACF;YACAzC,iBAAiBkC,QAAQO,IAAI;YAC7B/B;QACF,OAAO,IAAIwB,QAAQC,MAAM,KAAKC,6CAA2B,CAACM,WAAW,EAAE;YACrE9C,OAAOgC,QAAQ,CAACC,MAAM;QACxB;IACF,EAAE,OAAOC,KAAU;YAE+BA;QADhDC,QAAQY,IAAI,CACV,4BAA4BT,UAAU,OAAQJ,CAAAA,CAAAA,aAAAA,uBAAAA,IAAKc,KAAK,YAAVd,aAAc,EAAC;IAEjE;AACF;AAEAe,IAAAA,qBAAU,EAAC;IACT/C;IACAgD,MAAM;AACR;AACAC,IAAAA,oBAAc;AAEdC,IAAAA,8BAAmB,EAAC1D,KAAKS,IAAI"}
|
||||
5
node_modules/next/dist/client/dev/dev-build-watcher.d.ts
generated
vendored
Normal file
5
node_modules/next/dist/client/dev/dev-build-watcher.d.ts
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
export interface ShowHideHandler {
|
||||
show: () => void;
|
||||
hide: () => void;
|
||||
}
|
||||
export default function initializeBuildWatcher(toggleCallback: (handlers: ShowHideHandler) => void, position?: string): void;
|
||||
126
node_modules/next/dist/client/dev/dev-build-watcher.js
generated
vendored
Normal file
126
node_modules/next/dist/client/dev/dev-build-watcher.js
generated
vendored
Normal file
@ -0,0 +1,126 @@
|
||||
/* eslint-disable @typescript-eslint/no-use-before-define */ "use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return initializeBuildWatcher;
|
||||
}
|
||||
});
|
||||
const _hotreloadertypes = require("../../server/dev/hot-reloader-types");
|
||||
const _websocket = require("../components/react-dev-overlay/pages/websocket");
|
||||
function initializeBuildWatcher(toggleCallback, position) {
|
||||
if (position === void 0) position = "bottom-right";
|
||||
const shadowHost = document.createElement("div");
|
||||
const [verticalProperty, horizontalProperty] = position.split("-", 2);
|
||||
shadowHost.id = "__next-build-watcher";
|
||||
// Make sure container is fixed and on a high zIndex so it shows
|
||||
shadowHost.style.position = "fixed";
|
||||
// Ensure container's position to be top or bottom (default)
|
||||
shadowHost.style[verticalProperty] = "10px";
|
||||
// Ensure container's position to be left or right (default)
|
||||
shadowHost.style[horizontalProperty] = "20px";
|
||||
shadowHost.style.width = "0";
|
||||
shadowHost.style.height = "0";
|
||||
shadowHost.style.zIndex = "99999";
|
||||
document.body.appendChild(shadowHost);
|
||||
let shadowRoot;
|
||||
let prefix = "";
|
||||
if (shadowHost.attachShadow) {
|
||||
shadowRoot = shadowHost.attachShadow({
|
||||
mode: "open"
|
||||
});
|
||||
} else {
|
||||
// If attachShadow is undefined then the browser does not support
|
||||
// the Shadow DOM, we need to prefix all the names so there
|
||||
// will be no conflicts
|
||||
shadowRoot = shadowHost;
|
||||
prefix = "__next-build-watcher-";
|
||||
}
|
||||
// Container
|
||||
const container = createContainer(prefix);
|
||||
shadowRoot.appendChild(container);
|
||||
// CSS
|
||||
const css = createCss(prefix, {
|
||||
horizontalProperty,
|
||||
verticalProperty
|
||||
});
|
||||
shadowRoot.appendChild(css);
|
||||
// State
|
||||
let isVisible = false;
|
||||
let isBuilding = false;
|
||||
let timeoutId = null;
|
||||
// Handle events
|
||||
(0, _websocket.addMessageListener)((obj)=>{
|
||||
try {
|
||||
handleMessage(obj);
|
||||
} catch (e) {}
|
||||
});
|
||||
function show() {
|
||||
timeoutId && clearTimeout(timeoutId);
|
||||
isVisible = true;
|
||||
isBuilding = true;
|
||||
updateContainer();
|
||||
}
|
||||
function hide() {
|
||||
isBuilding = false;
|
||||
// Wait for the fade out transition to complete
|
||||
timeoutId = setTimeout(()=>{
|
||||
isVisible = false;
|
||||
updateContainer();
|
||||
}, 100);
|
||||
updateContainer();
|
||||
}
|
||||
function handleMessage(obj) {
|
||||
if (!("action" in obj)) {
|
||||
return;
|
||||
}
|
||||
// eslint-disable-next-line default-case
|
||||
switch(obj.action){
|
||||
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.BUILDING:
|
||||
show();
|
||||
break;
|
||||
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.BUILT:
|
||||
case _hotreloadertypes.HMR_ACTIONS_SENT_TO_BROWSER.SYNC:
|
||||
hide();
|
||||
break;
|
||||
}
|
||||
}
|
||||
toggleCallback({
|
||||
show,
|
||||
hide
|
||||
});
|
||||
function updateContainer() {
|
||||
if (isBuilding) {
|
||||
container.classList.add("" + prefix + "building");
|
||||
} else {
|
||||
container.classList.remove("" + prefix + "building");
|
||||
}
|
||||
if (isVisible) {
|
||||
container.classList.add("" + prefix + "visible");
|
||||
} else {
|
||||
container.classList.remove("" + prefix + "visible");
|
||||
}
|
||||
}
|
||||
}
|
||||
function createContainer(prefix) {
|
||||
const container = document.createElement("div");
|
||||
container.id = "" + prefix + "container";
|
||||
container.innerHTML = '\n <div id="' + prefix + 'icon-wrapper">\n <svg viewBox="0 0 226 200">\n <defs>\n <linearGradient\n x1="114.720775%"\n y1="181.283245%"\n x2="39.5399306%"\n y2="100%"\n id="' + prefix + 'linear-gradient"\n >\n <stop stop-color="#000000" offset="0%" />\n <stop stop-color="#FFFFFF" offset="100%" />\n </linearGradient>\n </defs>\n <g id="' + prefix + 'icon-group" fill="none" stroke="url(#' + prefix + 'linear-gradient)" stroke-width="18">\n <path d="M113,5.08219117 L4.28393801,197.5 L221.716062,197.5 L113,5.08219117 Z" />\n </g>\n </svg>\n </div>\n ';
|
||||
return container;
|
||||
}
|
||||
function createCss(prefix, param) {
|
||||
let { horizontalProperty, verticalProperty } = param;
|
||||
const css = document.createElement("style");
|
||||
css.textContent = "\n #" + prefix + "container {\n position: absolute;\n " + verticalProperty + ": 10px;\n " + horizontalProperty + ": 30px;\n\n border-radius: 3px;\n background: #000;\n color: #fff;\n font: initial;\n cursor: initial;\n letter-spacing: initial;\n text-shadow: initial;\n text-transform: initial;\n visibility: initial;\n\n padding: 7px 10px 8px 10px;\n align-items: center;\n box-shadow: 0 11px 40px 0 rgba(0, 0, 0, 0.25), 0 2px 10px 0 rgba(0, 0, 0, 0.12);\n\n display: none;\n opacity: 0;\n transition: opacity 0.1s ease, " + verticalProperty + " 0.1s ease;\n animation: " + prefix + "fade-in 0.1s ease-in-out;\n }\n\n #" + prefix + "container." + prefix + "visible {\n display: flex;\n }\n\n #" + prefix + "container." + prefix + "building {\n " + verticalProperty + ": 20px;\n opacity: 1;\n }\n\n #" + prefix + "icon-wrapper {\n width: 16px;\n height: 16px;\n }\n\n #" + prefix + "icon-wrapper > svg {\n width: 100%;\n height: 100%;\n }\n\n #" + prefix + "icon-group {\n animation: " + prefix + "strokedash 1s ease-in-out both infinite;\n }\n\n @keyframes " + prefix + "fade-in {\n from {\n " + verticalProperty + ": 10px;\n opacity: 0;\n }\n to {\n " + verticalProperty + ": 20px;\n opacity: 1;\n }\n }\n\n @keyframes " + prefix + "strokedash {\n 0% {\n stroke-dasharray: 0 226;\n }\n 80%,\n 100% {\n stroke-dasharray: 659 226;\n }\n }\n ";
|
||||
return css;
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=dev-build-watcher.js.map
|
||||
1
node_modules/next/dist/client/dev/dev-build-watcher.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/dev/dev-build-watcher.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/client/dev/dev-build-watcher.ts"],"names":["initializeBuildWatcher","toggleCallback","position","shadowHost","document","createElement","verticalProperty","horizontalProperty","split","id","style","width","height","zIndex","body","appendChild","shadowRoot","prefix","attachShadow","mode","container","createContainer","css","createCss","isVisible","isBuilding","timeoutId","addMessageListener","obj","handleMessage","show","clearTimeout","updateContainer","hide","setTimeout","action","HMR_ACTIONS_SENT_TO_BROWSER","BUILDING","BUILT","SYNC","classList","add","remove","innerHTML","textContent"],"mappings":"AAAA,0DAA0D;;;;+BAa1D;;;eAAwBA;;;kCAZoB;2BAET;AAUpB,SAASA,uBACtBC,cAAmD,EACnDC,QAAyB;IAAzBA,IAAAA,qBAAAA,WAAW;IAEX,MAAMC,aAAaC,SAASC,aAAa,CAAC;IAC1C,MAAM,CAACC,kBAAkBC,mBAAmB,GAAGL,SAASM,KAAK,CAAC,KAAK;IAInEL,WAAWM,EAAE,GAAG;IAChB,gEAAgE;IAChEN,WAAWO,KAAK,CAACR,QAAQ,GAAG;IAC5B,4DAA4D;IAC5DC,WAAWO,KAAK,CAACJ,iBAAiB,GAAG;IACrC,4DAA4D;IAC5DH,WAAWO,KAAK,CAACH,mBAAmB,GAAG;IACvCJ,WAAWO,KAAK,CAACC,KAAK,GAAG;IACzBR,WAAWO,KAAK,CAACE,MAAM,GAAG;IAC1BT,WAAWO,KAAK,CAACG,MAAM,GAAG;IAC1BT,SAASU,IAAI,CAACC,WAAW,CAACZ;IAE1B,IAAIa;IACJ,IAAIC,SAAS;IAEb,IAAId,WAAWe,YAAY,EAAE;QAC3BF,aAAab,WAAWe,YAAY,CAAC;YAAEC,MAAM;QAAO;IACtD,OAAO;QACL,iEAAiE;QACjE,2DAA2D;QAC3D,uBAAuB;QACvBH,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;IACzCe,UAAUX,EAAE,GAAG,AAAC,KAAEQ,SAAO;IACzBG,UAAUuB,SAAS,GAAG,AAAC,oBACV1B,SAAO,oOAQJA,SAAO,iNAMRA,SAAO,0CAAuCA,SAAO;IAOpE,OAAOG;AACT;AAEA,SAASG,UACPN,MAAc,EACd,KAG2D;IAH3D,IAAA,EACEV,kBAAkB,EAClBD,gBAAgB,EACyC,GAH3D;IAKA,MAAMgB,MAAMlB,SAASC,aAAa,CAAC;IACnCiB,IAAIsB,WAAW,GAAG,AAAC,YACd3B,SAAO,mDAENX,mBAAiB,oBACjBC,qBAAmB,weAkBYD,mBAAiB,mCACrCW,SAAO,8CAGnBA,SAAO,eAAYA,SAAO,oDAI1BA,SAAO,eAAYA,SAAO,uBACzBX,mBAAiB,+CAIlBW,SAAO,4EAKPA,SAAO,kFAKPA,SAAO,oCACKA,SAAO,uEAGTA,SAAO,sCAEdX,mBAAiB,gEAIjBA,mBAAiB,oEAKVW,SAAO;IAWtB,OAAOK;AACT"}
|
||||
1
node_modules/next/dist/client/dev/error-overlay/websocket.d.ts
generated
vendored
Normal file
1
node_modules/next/dist/client/dev/error-overlay/websocket.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export { addMessageListener } from '../../components/react-dev-overlay/pages/websocket';
|
||||
22
node_modules/next/dist/client/dev/error-overlay/websocket.js
generated
vendored
Normal file
22
node_modules/next/dist/client/dev/error-overlay/websocket.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
// next-contentlayer is relying on this internal path
|
||||
// https://github.com/contentlayerdev/contentlayer/blob/2f491c540e1d3667577f57fa368b150bff427aaf/packages/next-contentlayer/src/hooks/useLiveReload.ts#L1
|
||||
// Drop this file if https://github.com/contentlayerdev/contentlayer/pull/649 is merged/released
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "addMessageListener", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return _websocket.addMessageListener;
|
||||
}
|
||||
});
|
||||
const _websocket = require("../../components/react-dev-overlay/pages/websocket");
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=websocket.js.map
|
||||
1
node_modules/next/dist/client/dev/error-overlay/websocket.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/dev/error-overlay/websocket.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/client/dev/error-overlay/websocket.ts"],"names":["addMessageListener"],"mappings":"AAAA,qDAAqD;AACrD,yJAAyJ;AACzJ,gGAAgG;;;;;+BACvFA;;;eAAAA,6BAAkB;;;2BAAQ"}
|
||||
1
node_modules/next/dist/client/dev/fouc.d.ts
generated
vendored
Normal file
1
node_modules/next/dist/client/dev/fouc.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare function displayContent(): Promise<void>;
|
||||
42
node_modules/next/dist/client/dev/fouc.js
generated
vendored
Normal file
42
node_modules/next/dist/client/dev/fouc.js
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
// This wrapper function is used to safely select the best available function
|
||||
// to schedule removal of the no-FOUC styles workaround. requestAnimationFrame
|
||||
// is the ideal choice, but when used in iframes, there are no guarantees that
|
||||
// the callback will actually be called, which could stall the promise returned
|
||||
// from displayContent.
|
||||
//
|
||||
// See: https://www.vector-logic.com/blog/posts/on-request-animation-frame-and-embedded-iframes
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "displayContent", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return displayContent;
|
||||
}
|
||||
});
|
||||
const safeCallbackQueue = (callback)=>{
|
||||
if (window.requestAnimationFrame && window.self === window.top) {
|
||||
window.requestAnimationFrame(callback);
|
||||
} else {
|
||||
window.setTimeout(callback);
|
||||
}
|
||||
};
|
||||
function displayContent() {
|
||||
return new Promise((resolve)=>{
|
||||
safeCallbackQueue(function() {
|
||||
for(var x = document.querySelectorAll("[data-next-hide-fouc]"), i = x.length; i--;){
|
||||
x[i].parentNode.removeChild(x[i]);
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=fouc.js.map
|
||||
1
node_modules/next/dist/client/dev/fouc.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/dev/fouc.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/client/dev/fouc.ts"],"names":["displayContent","safeCallbackQueue","callback","window","requestAnimationFrame","self","top","setTimeout","Promise","resolve","x","document","querySelectorAll","i","length","parentNode","removeChild"],"mappings":"AAAA,6EAA6E;AAC7E,8EAA8E;AAC9E,8EAA8E;AAC9E,+EAA+E;AAC/E,uBAAuB;AACvB,EAAE;AACF,+FAA+F;;;;;+BAY/EA;;;eAAAA;;;AAXhB,MAAMC,oBAAoB,CAACC;IACzB,IAAIC,OAAOC,qBAAqB,IAAID,OAAOE,IAAI,KAAKF,OAAOG,GAAG,EAAE;QAC9DH,OAAOC,qBAAqB,CAACF;IAC/B,OAAO;QACLC,OAAOI,UAAU,CAACL;IACpB;AACF;AAKO,SAASF;IACd,OAAO,IAAIQ,QAAQ,CAACC;QAClBR,kBAAkB;YAChB,IACE,IAAIS,IAAIC,SAASC,gBAAgB,CAAC,0BAChCC,IAAIH,EAAEI,MAAM,EACdD,KAEA;gBACAH,CAAC,CAACG,EAAE,CAACE,UAAU,CAAEC,WAAW,CAACN,CAAC,CAACG,EAAE;YACnC;YACAJ;QACF;IACF;AACF"}
|
||||
8
node_modules/next/dist/client/dev/hot-middleware-client.d.ts
generated
vendored
Normal file
8
node_modules/next/dist/client/dev/hot-middleware-client.d.ts
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
declare const _default: (mode: 'webpack' | 'turbopack') => {
|
||||
subscribeToHmrEvent(handler: any): void;
|
||||
onUnrecoverableError(): void;
|
||||
addTurbopackMessageListener(cb: (msg: import("../../server/dev/hot-reloader-types").TurbopackMsgToBrowser) => void): void;
|
||||
sendTurbopackMessage(msg: string): void;
|
||||
handleUpdateError(err: unknown): void;
|
||||
};
|
||||
export default _default;
|
||||
80
node_modules/next/dist/client/dev/hot-middleware-client.js
generated
vendored
Normal file
80
node_modules/next/dist/client/dev/hot-middleware-client.js
generated
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return _default;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
||||
const _hotreloaderclient = /*#__PURE__*/ _interop_require_default._(require("../components/react-dev-overlay/pages/hot-reloader-client"));
|
||||
const _websocket = require("../components/react-dev-overlay/pages/websocket");
|
||||
let reloading = false;
|
||||
const _default = (mode)=>{
|
||||
const devClient = (0, _hotreloaderclient.default)(mode);
|
||||
devClient.subscribeToHmrEvent((obj)=>{
|
||||
if (reloading) return;
|
||||
// if we're on an error/404 page, we can't reliably tell if the newly added/removed page
|
||||
// matches the current path. In that case, assume any added/removed entries should trigger a reload of the current page
|
||||
const isOnErrorPage = window.next.router.pathname === "/404" || window.next.router.pathname === "/_error";
|
||||
switch(obj.action){
|
||||
case "reloadPage":
|
||||
{
|
||||
(0, _websocket.sendMessage)(JSON.stringify({
|
||||
event: "client-reload-page",
|
||||
clientId: window.__nextDevClientId
|
||||
}));
|
||||
reloading = true;
|
||||
return window.location.reload();
|
||||
}
|
||||
case "removedPage":
|
||||
{
|
||||
const [page] = obj.data;
|
||||
if (page === window.next.router.pathname || isOnErrorPage) {
|
||||
(0, _websocket.sendMessage)(JSON.stringify({
|
||||
event: "client-removed-page",
|
||||
clientId: window.__nextDevClientId,
|
||||
page
|
||||
}));
|
||||
return window.location.reload();
|
||||
}
|
||||
return;
|
||||
}
|
||||
case "addedPage":
|
||||
{
|
||||
const [page] = obj.data;
|
||||
if (page === window.next.router.pathname && typeof window.next.router.components[page] === "undefined" || isOnErrorPage) {
|
||||
(0, _websocket.sendMessage)(JSON.stringify({
|
||||
event: "client-added-page",
|
||||
clientId: window.__nextDevClientId,
|
||||
page
|
||||
}));
|
||||
return window.location.reload();
|
||||
}
|
||||
return;
|
||||
}
|
||||
case "serverError":
|
||||
case "devPagesManifestUpdate":
|
||||
case "building":
|
||||
case "finishBuilding":
|
||||
{
|
||||
return;
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw new Error("Unexpected action " + obj.action);
|
||||
}
|
||||
}
|
||||
});
|
||||
return devClient;
|
||||
};
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=hot-middleware-client.js.map
|
||||
1
node_modules/next/dist/client/dev/hot-middleware-client.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/dev/hot-middleware-client.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/client/dev/hot-middleware-client.ts"],"names":["reloading","mode","devClient","connect","subscribeToHmrEvent","obj","isOnErrorPage","window","next","router","pathname","action","sendMessage","JSON","stringify","event","clientId","__nextDevClientId","location","reload","page","data","components","Error"],"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;YACL,KAAK;YACL,KAAK;gBAAkB;oBACrB;gBACF;YACA;gBAAS;oBACP,MAAM,IAAII,MAAM,uBAAuBlB,IAAIM,MAAM;gBACnD;QACF;IACF;IAEA,OAAOT;AACT"}
|
||||
1
node_modules/next/dist/client/dev/noop-turbopack-hmr.d.ts
generated
vendored
Normal file
1
node_modules/next/dist/client/dev/noop-turbopack-hmr.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare function connect(): void;
|
||||
21
node_modules/next/dist/client/dev/noop-turbopack-hmr.js
generated
vendored
Normal file
21
node_modules/next/dist/client/dev/noop-turbopack-hmr.js
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
// The Turbopack HMR client can't be properly omitted at the moment (WEB-1589),
|
||||
// so instead we remap its import to this file in webpack builds.
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "connect", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return connect;
|
||||
}
|
||||
});
|
||||
function connect() {}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=noop-turbopack-hmr.js.map
|
||||
1
node_modules/next/dist/client/dev/noop-turbopack-hmr.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/dev/noop-turbopack-hmr.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/client/dev/noop-turbopack-hmr.ts"],"names":["connect"],"mappings":"AAAA,+EAA+E;AAC/E,iEAAiE;;;;;+BACjDA;;;eAAAA;;;AAAT,SAASA,WAAW"}
|
||||
2
node_modules/next/dist/client/dev/on-demand-entries-client.d.ts
generated
vendored
Normal file
2
node_modules/next/dist/client/dev/on-demand-entries-client.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
declare const _default: (page?: string) => Promise<void>;
|
||||
export default _default;
|
||||
47
node_modules/next/dist/client/dev/on-demand-entries-client.js
generated
vendored
Normal file
47
node_modules/next/dist/client/dev/on-demand-entries-client.js
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return _default;
|
||||
}
|
||||
});
|
||||
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
||||
const _router = /*#__PURE__*/ _interop_require_default._(require("../router"));
|
||||
const _websocket = require("../components/react-dev-overlay/pages/websocket");
|
||||
const _default = async (page)=>{
|
||||
if (page) {
|
||||
// in AMP the router isn't initialized on the client and
|
||||
// client-transitions don't occur so ping initial page
|
||||
setInterval(()=>{
|
||||
(0, _websocket.sendMessage)(JSON.stringify({
|
||||
event: "ping",
|
||||
page
|
||||
}));
|
||||
}, 2500);
|
||||
} else {
|
||||
_router.default.ready(()=>{
|
||||
setInterval(()=>{
|
||||
// when notFound: true is returned we should use the notFoundPage
|
||||
// as the Router.pathname will point to the 404 page but we want
|
||||
// to ping the source page that returned notFound: true instead
|
||||
const notFoundSrcPage = self.__NEXT_DATA__.notFoundSrcPage;
|
||||
const pathname = (_router.default.pathname === "/404" || _router.default.pathname === "/_error") && notFoundSrcPage ? notFoundSrcPage : _router.default.pathname;
|
||||
(0, _websocket.sendMessage)(JSON.stringify({
|
||||
event: "ping",
|
||||
page: pathname
|
||||
}));
|
||||
}, 2500);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=on-demand-entries-client.js.map
|
||||
1
node_modules/next/dist/client/dev/on-demand-entries-client.js.map
generated
vendored
Normal file
1
node_modules/next/dist/client/dev/on-demand-entries-client.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/client/dev/on-demand-entries-client.ts"],"names":["page","setInterval","sendMessage","JSON","stringify","event","Router","ready","notFoundSrcPage","self","__NEXT_DATA__","pathname"],"mappings":";;;;+BAGA;;;eAAA;;;;iEAHmB;2BACS;MAE5B,WAAe,OAAOA;IACpB,IAAIA,MAAM;QACR,wDAAwD;QACxD,sDAAsD;QACtDC,YAAY;YACVC,IAAAA,sBAAW,EAACC,KAAKC,SAAS,CAAC;gBAAEC,OAAO;gBAAQL;YAAK;QACnD,GAAG;IACL,OAAO;QACLM,eAAM,CAACC,KAAK,CAAC;YACXN,YAAY;gBACV,iEAAiE;gBACjE,gEAAgE;gBAChE,+DAA+D;gBAC/D,MAAMO,kBAAkBC,KAAKC,aAAa,CAACF,eAAe;gBAC1D,MAAMG,WACJ,AAACL,CAAAA,eAAM,CAACK,QAAQ,KAAK,UAAUL,eAAM,CAACK,QAAQ,KAAK,SAAQ,KAC3DH,kBACIA,kBACAF,eAAM,CAACK,QAAQ;gBAErBT,IAAAA,sBAAW,EAACC,KAAKC,SAAS,CAAC;oBAAEC,OAAO;oBAAQL,MAAMW;gBAAS;YAC7D,GAAG;QACL;IACF;AACF"}
|
||||
Reference in New Issue
Block a user