Spaces:
Paused
Paused
Upload folder using huggingface_hub (part 8)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +2 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/server-reference-info.js +52 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/side-effect.js +66 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/turbopack/compilation-events.js +47 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/turbopack/entry-key.js +39 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/turbopack/manifest-loader.js +477 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/turbopack/utils.js +305 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/utils.js +211 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/utils/warn-once.js +22 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/zod.js +101 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/anonymous-meta.js +89 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/detached-flush.js +53 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/build.js +144 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/error-feedback.js +31 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/index.js +23 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/plugins.js +51 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/swc-load-failure.js +55 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/version.js +90 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/flush-and-exit.js +20 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/post-telemetry-payload.js +48 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/project-id.js +48 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/storage.js +288 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/index.js +54 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/report/index.js +35 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/report/to-json.js +157 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/report/to-telemetry.js +36 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/shared.js +39 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/trace.js +197 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css +1 -0
- .next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/package.json +378 -0
- .next/standalone/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/package.json +25 -0
- .next/standalone/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js +75 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/at-rule.js +25 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/comment.js +13 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/container.js +439 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/css-syntax-error.js +100 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/declaration.js +24 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/document.js +33 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/fromJSON.js +54 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/input.js +248 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/lazy-result.js +550 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/list.js +58 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/map-generator.js +359 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/no-work-result.js +135 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/node.js +381 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/parse.js +42 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/parser.js +610 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/postcss.js +101 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/previous-map.js +142 -0
- .next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/processor.js +67 -0
.gitattributes
CHANGED
|
@@ -41,3 +41,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 41 |
.next/standalone/node_modules/.pnpm/@img+sharp-libvips-linuxmusl-x64@1.2.0/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.1 filter=lfs diff=lfs merge=lfs -text
|
| 42 |
.next/standalone/node_modules/.pnpm/@img+sharp-linux-x64@0.34.3/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node filter=lfs diff=lfs merge=lfs -text
|
| 43 |
.next/standalone/node_modules/.pnpm/@img+sharp-linuxmusl-x64@0.34.3/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 41 |
.next/standalone/node_modules/.pnpm/@img+sharp-libvips-linuxmusl-x64@1.2.0/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.1 filter=lfs diff=lfs merge=lfs -text
|
| 42 |
.next/standalone/node_modules/.pnpm/@img+sharp-linux-x64@0.34.3/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node filter=lfs diff=lfs merge=lfs -text
|
| 43 |
.next/standalone/node_modules/.pnpm/@img+sharp-linuxmusl-x64@0.34.3/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
assets/papercoder_overview.png filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
examples/Transformer.pdf filter=lfs diff=lfs merge=lfs -text
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/server-reference-info.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
0 && (module.exports = {
|
| 6 |
+
extractInfoFromServerReferenceId: null,
|
| 7 |
+
omitUnusedArgs: null
|
| 8 |
+
});
|
| 9 |
+
function _export(target, all) {
|
| 10 |
+
for(var name in all)Object.defineProperty(target, name, {
|
| 11 |
+
enumerable: true,
|
| 12 |
+
get: all[name]
|
| 13 |
+
});
|
| 14 |
+
}
|
| 15 |
+
_export(exports, {
|
| 16 |
+
extractInfoFromServerReferenceId: function() {
|
| 17 |
+
return extractInfoFromServerReferenceId;
|
| 18 |
+
},
|
| 19 |
+
omitUnusedArgs: function() {
|
| 20 |
+
return omitUnusedArgs;
|
| 21 |
+
}
|
| 22 |
+
});
|
| 23 |
+
function extractInfoFromServerReferenceId(id) {
|
| 24 |
+
const infoByte = parseInt(id.slice(0, 2), 16);
|
| 25 |
+
const typeBit = infoByte >> 7 & 0x1;
|
| 26 |
+
const argMask = infoByte >> 1 & 0x3f;
|
| 27 |
+
const restArgs = infoByte & 0x1;
|
| 28 |
+
const usedArgs = Array(6);
|
| 29 |
+
for(let index = 0; index < 6; index++){
|
| 30 |
+
const bitPosition = 5 - index;
|
| 31 |
+
const bit = argMask >> bitPosition & 0x1;
|
| 32 |
+
usedArgs[index] = bit === 1;
|
| 33 |
+
}
|
| 34 |
+
return {
|
| 35 |
+
type: typeBit === 1 ? 'use-cache' : 'server-action',
|
| 36 |
+
usedArgs: usedArgs,
|
| 37 |
+
hasRestArgs: restArgs === 1
|
| 38 |
+
};
|
| 39 |
+
}
|
| 40 |
+
function omitUnusedArgs(args, info) {
|
| 41 |
+
const filteredArgs = new Array(args.length);
|
| 42 |
+
for(let index = 0; index < args.length; index++){
|
| 43 |
+
if (index < 6 && info.usedArgs[index] || // This assumes that the server reference info byte has the restArgs bit
|
| 44 |
+
// set to 1 if there are more than 6 args.
|
| 45 |
+
index >= 6 && info.hasRestArgs) {
|
| 46 |
+
filteredArgs[index] = args[index];
|
| 47 |
+
}
|
| 48 |
+
}
|
| 49 |
+
return filteredArgs;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
//# sourceMappingURL=server-reference-info.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/side-effect.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
Object.defineProperty(exports, "default", {
|
| 6 |
+
enumerable: true,
|
| 7 |
+
get: function() {
|
| 8 |
+
return SideEffect;
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
const _react = require("react");
|
| 12 |
+
const isServer = typeof window === 'undefined';
|
| 13 |
+
const useClientOnlyLayoutEffect = isServer ? ()=>{} : _react.useLayoutEffect;
|
| 14 |
+
const useClientOnlyEffect = isServer ? ()=>{} : _react.useEffect;
|
| 15 |
+
function SideEffect(props) {
|
| 16 |
+
const { headManager, reduceComponentsToState } = props;
|
| 17 |
+
function emitChange() {
|
| 18 |
+
if (headManager && headManager.mountedInstances) {
|
| 19 |
+
const headElements = _react.Children.toArray(Array.from(headManager.mountedInstances).filter(Boolean));
|
| 20 |
+
headManager.updateHead(reduceComponentsToState(headElements, props));
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
if (isServer) {
|
| 24 |
+
var _headManager_mountedInstances;
|
| 25 |
+
headManager == null ? void 0 : (_headManager_mountedInstances = headManager.mountedInstances) == null ? void 0 : _headManager_mountedInstances.add(props.children);
|
| 26 |
+
emitChange();
|
| 27 |
+
}
|
| 28 |
+
useClientOnlyLayoutEffect(()=>{
|
| 29 |
+
var _headManager_mountedInstances;
|
| 30 |
+
headManager == null ? void 0 : (_headManager_mountedInstances = headManager.mountedInstances) == null ? void 0 : _headManager_mountedInstances.add(props.children);
|
| 31 |
+
return ()=>{
|
| 32 |
+
var _headManager_mountedInstances;
|
| 33 |
+
headManager == null ? void 0 : (_headManager_mountedInstances = headManager.mountedInstances) == null ? void 0 : _headManager_mountedInstances.delete(props.children);
|
| 34 |
+
};
|
| 35 |
+
});
|
| 36 |
+
// We need to call `updateHead` method whenever the `SideEffect` is trigger in all
|
| 37 |
+
// life-cycles: mount, update, unmount. However, if there are multiple `SideEffect`s
|
| 38 |
+
// being rendered, we only trigger the method from the last one.
|
| 39 |
+
// This is ensured by keeping the last unflushed `updateHead` in the `_pendingUpdate`
|
| 40 |
+
// singleton in the layout effect pass, and actually trigger it in the effect pass.
|
| 41 |
+
useClientOnlyLayoutEffect(()=>{
|
| 42 |
+
if (headManager) {
|
| 43 |
+
headManager._pendingUpdate = emitChange;
|
| 44 |
+
}
|
| 45 |
+
return ()=>{
|
| 46 |
+
if (headManager) {
|
| 47 |
+
headManager._pendingUpdate = emitChange;
|
| 48 |
+
}
|
| 49 |
+
};
|
| 50 |
+
});
|
| 51 |
+
useClientOnlyEffect(()=>{
|
| 52 |
+
if (headManager && headManager._pendingUpdate) {
|
| 53 |
+
headManager._pendingUpdate();
|
| 54 |
+
headManager._pendingUpdate = null;
|
| 55 |
+
}
|
| 56 |
+
return ()=>{
|
| 57 |
+
if (headManager && headManager._pendingUpdate) {
|
| 58 |
+
headManager._pendingUpdate();
|
| 59 |
+
headManager._pendingUpdate = null;
|
| 60 |
+
}
|
| 61 |
+
};
|
| 62 |
+
});
|
| 63 |
+
return null;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
//# sourceMappingURL=side-effect.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/turbopack/compilation-events.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
Object.defineProperty(exports, "backgroundLogCompilationEvents", {
|
| 6 |
+
enumerable: true,
|
| 7 |
+
get: function() {
|
| 8 |
+
return backgroundLogCompilationEvents;
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
| 12 |
+
const _log = /*#__PURE__*/ _interop_require_wildcard._(require("../../../build/output/log"));
|
| 13 |
+
function backgroundLogCompilationEvents(project, param) {
|
| 14 |
+
let { eventTypes, signal } = param === void 0 ? {} : param;
|
| 15 |
+
;
|
| 16 |
+
(async function() {
|
| 17 |
+
for await (const event of project.compilationEventsSubscribe(eventTypes)){
|
| 18 |
+
if (signal == null ? void 0 : signal.aborted) {
|
| 19 |
+
return;
|
| 20 |
+
}
|
| 21 |
+
switch(event.severity){
|
| 22 |
+
case 'EVENT':
|
| 23 |
+
_log.event(event.message);
|
| 24 |
+
break;
|
| 25 |
+
case 'TRACE':
|
| 26 |
+
_log.trace(event.message);
|
| 27 |
+
break;
|
| 28 |
+
case 'INFO':
|
| 29 |
+
_log.info(event.message);
|
| 30 |
+
break;
|
| 31 |
+
case 'WARNING':
|
| 32 |
+
_log.warn(event.message);
|
| 33 |
+
break;
|
| 34 |
+
case 'ERROR':
|
| 35 |
+
_log.error(event.message);
|
| 36 |
+
break;
|
| 37 |
+
case 'FATAL':
|
| 38 |
+
_log.error(event.message);
|
| 39 |
+
break;
|
| 40 |
+
default:
|
| 41 |
+
break;
|
| 42 |
+
}
|
| 43 |
+
}
|
| 44 |
+
})();
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
//# sourceMappingURL=compilation-events.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/turbopack/entry-key.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* `app` -> app dir
|
| 3 |
+
* `pages` -> pages dir
|
| 4 |
+
* `root` -> middleware / instrumentation
|
| 5 |
+
* `assets` -> assets
|
| 6 |
+
*/ "use strict";
|
| 7 |
+
Object.defineProperty(exports, "__esModule", {
|
| 8 |
+
value: true
|
| 9 |
+
});
|
| 10 |
+
0 && (module.exports = {
|
| 11 |
+
getEntryKey: null,
|
| 12 |
+
splitEntryKey: null
|
| 13 |
+
});
|
| 14 |
+
function _export(target, all) {
|
| 15 |
+
for(var name in all)Object.defineProperty(target, name, {
|
| 16 |
+
enumerable: true,
|
| 17 |
+
get: all[name]
|
| 18 |
+
});
|
| 19 |
+
}
|
| 20 |
+
_export(exports, {
|
| 21 |
+
getEntryKey: function() {
|
| 22 |
+
return getEntryKey;
|
| 23 |
+
},
|
| 24 |
+
splitEntryKey: function() {
|
| 25 |
+
return splitEntryKey;
|
| 26 |
+
}
|
| 27 |
+
});
|
| 28 |
+
function getEntryKey(type, side, page) {
|
| 29 |
+
return JSON.stringify({
|
| 30 |
+
type,
|
| 31 |
+
side,
|
| 32 |
+
page
|
| 33 |
+
});
|
| 34 |
+
}
|
| 35 |
+
function splitEntryKey(key) {
|
| 36 |
+
return JSON.parse(key);
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
//# sourceMappingURL=entry-key.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/turbopack/manifest-loader.js
ADDED
|
@@ -0,0 +1,477 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
Object.defineProperty(exports, "TurbopackManifestLoader", {
|
| 6 |
+
enumerable: true,
|
| 7 |
+
get: function() {
|
| 8 |
+
return TurbopackManifestLoader;
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
| 12 |
+
const _pathtoregexp = require("next/dist/compiled/path-to-regexp");
|
| 13 |
+
const _constants = require("../constants");
|
| 14 |
+
const _path = require("path");
|
| 15 |
+
const _promises = require("fs/promises");
|
| 16 |
+
const _requirecache = require("../../../server/dev/require-cache");
|
| 17 |
+
const _writeatomic = require("../../../lib/fs/write-atomic");
|
| 18 |
+
const _generateinterceptionroutesrewrites = require("../../../lib/generate-interception-routes-rewrites");
|
| 19 |
+
const _buildmanifestplugin = require("../../../build/webpack/plugins/build-manifest-plugin");
|
| 20 |
+
const _getassetpathfromroute = /*#__PURE__*/ _interop_require_default._(require("../router/utils/get-asset-path-from-route"));
|
| 21 |
+
const _entrykey = require("./entry-key");
|
| 22 |
+
const _utils = require("../router/utils");
|
| 23 |
+
const _fs = require("fs");
|
| 24 |
+
const _turbopackutils = require("../../../server/dev/turbopack-utils");
|
| 25 |
+
const _trytoparsepath = require("../../../lib/try-to-parse-path");
|
| 26 |
+
const getManifestPath = (page, distDir, name, type, firstCall)=>{
|
| 27 |
+
let manifestPath = _path.posix.join(distDir, "server", type, type === 'middleware' || type === 'instrumentation' ? '' : type === 'app' ? page : (0, _getassetpathfromroute.default)(page), name);
|
| 28 |
+
if (firstCall) {
|
| 29 |
+
const isSitemapRoute = /[\\/]sitemap(.xml)?\/route$/.test(page);
|
| 30 |
+
// Check the ambiguity of /sitemap and /sitemap.xml
|
| 31 |
+
if (isSitemapRoute && !(0, _fs.existsSync)(manifestPath)) {
|
| 32 |
+
manifestPath = getManifestPath(page.replace(/\/sitemap\/route$/, '/sitemap.xml/route'), distDir, name, type, false);
|
| 33 |
+
}
|
| 34 |
+
// existsSync is faster than using the async version
|
| 35 |
+
if (!(0, _fs.existsSync)(manifestPath) && page.endsWith('/route')) {
|
| 36 |
+
// TODO: Improve implementation of metadata routes, currently it requires this extra check for the variants of the files that can be written.
|
| 37 |
+
let metadataPage = (0, _turbopackutils.addRouteSuffix)((0, _turbopackutils.addMetadataIdToRoute)((0, _turbopackutils.removeRouteSuffix)(page)));
|
| 38 |
+
manifestPath = getManifestPath(metadataPage, distDir, name, type, false);
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
return manifestPath;
|
| 42 |
+
};
|
| 43 |
+
async function readPartialManifest(distDir, name, pageName, type) {
|
| 44 |
+
if (type === void 0) type = 'pages';
|
| 45 |
+
const page = pageName;
|
| 46 |
+
const manifestPath = getManifestPath(page, distDir, name, type, true);
|
| 47 |
+
return JSON.parse(await (0, _promises.readFile)(_path.posix.join(manifestPath), 'utf-8'));
|
| 48 |
+
}
|
| 49 |
+
class TurbopackManifestLoader {
|
| 50 |
+
delete(key) {
|
| 51 |
+
this.actionManifests.delete(key);
|
| 52 |
+
this.appBuildManifests.delete(key);
|
| 53 |
+
this.appPathsManifests.delete(key);
|
| 54 |
+
this.buildManifests.delete(key);
|
| 55 |
+
this.fontManifests.delete(key);
|
| 56 |
+
this.middlewareManifests.delete(key);
|
| 57 |
+
this.pagesManifests.delete(key);
|
| 58 |
+
this.webpackStats.delete(key);
|
| 59 |
+
}
|
| 60 |
+
async loadActionManifest(pageName) {
|
| 61 |
+
this.actionManifests.set((0, _entrykey.getEntryKey)('app', 'server', pageName), await readPartialManifest(this.distDir, "" + _constants.SERVER_REFERENCE_MANIFEST + ".json", pageName, 'app'));
|
| 62 |
+
}
|
| 63 |
+
async mergeActionManifests(manifests) {
|
| 64 |
+
const manifest = {
|
| 65 |
+
node: {},
|
| 66 |
+
edge: {},
|
| 67 |
+
encryptionKey: this.encryptionKey
|
| 68 |
+
};
|
| 69 |
+
function mergeActionIds(actionEntries, other) {
|
| 70 |
+
for(const key in other){
|
| 71 |
+
var _actionEntries, _key;
|
| 72 |
+
var _;
|
| 73 |
+
const action = (_ = (_actionEntries = actionEntries)[_key = key]) != null ? _ : _actionEntries[_key] = {
|
| 74 |
+
workers: {},
|
| 75 |
+
layer: {}
|
| 76 |
+
};
|
| 77 |
+
Object.assign(action.workers, other[key].workers);
|
| 78 |
+
Object.assign(action.layer, other[key].layer);
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
for (const m of manifests){
|
| 82 |
+
mergeActionIds(manifest.node, m.node);
|
| 83 |
+
mergeActionIds(manifest.edge, m.edge);
|
| 84 |
+
}
|
| 85 |
+
for(const key in manifest.node){
|
| 86 |
+
const entry = manifest.node[key];
|
| 87 |
+
entry.workers = sortObjectByKey(entry.workers);
|
| 88 |
+
entry.layer = sortObjectByKey(entry.layer);
|
| 89 |
+
}
|
| 90 |
+
for(const key in manifest.edge){
|
| 91 |
+
const entry = manifest.edge[key];
|
| 92 |
+
entry.workers = sortObjectByKey(entry.workers);
|
| 93 |
+
entry.layer = sortObjectByKey(entry.layer);
|
| 94 |
+
}
|
| 95 |
+
return manifest;
|
| 96 |
+
}
|
| 97 |
+
async writeActionManifest() {
|
| 98 |
+
const actionManifest = await this.mergeActionManifests(this.actionManifests.values());
|
| 99 |
+
const actionManifestJsonPath = (0, _path.join)(this.distDir, 'server', "" + _constants.SERVER_REFERENCE_MANIFEST + ".json");
|
| 100 |
+
const actionManifestJsPath = (0, _path.join)(this.distDir, 'server', "" + _constants.SERVER_REFERENCE_MANIFEST + ".js");
|
| 101 |
+
const json = JSON.stringify(actionManifest, null, 2);
|
| 102 |
+
(0, _requirecache.deleteCache)(actionManifestJsonPath);
|
| 103 |
+
(0, _requirecache.deleteCache)(actionManifestJsPath);
|
| 104 |
+
await (0, _writeatomic.writeFileAtomic)(actionManifestJsonPath, json);
|
| 105 |
+
await (0, _writeatomic.writeFileAtomic)(actionManifestJsPath, "self.__RSC_SERVER_MANIFEST=" + JSON.stringify(json));
|
| 106 |
+
}
|
| 107 |
+
async loadAppBuildManifest(pageName) {
|
| 108 |
+
this.appBuildManifests.set((0, _entrykey.getEntryKey)('app', 'server', pageName), await readPartialManifest(this.distDir, _constants.APP_BUILD_MANIFEST, pageName, 'app'));
|
| 109 |
+
}
|
| 110 |
+
mergeAppBuildManifests(manifests) {
|
| 111 |
+
const manifest = {
|
| 112 |
+
pages: {}
|
| 113 |
+
};
|
| 114 |
+
for (const m of manifests){
|
| 115 |
+
Object.assign(manifest.pages, m.pages);
|
| 116 |
+
}
|
| 117 |
+
manifest.pages = sortObjectByKey(manifest.pages);
|
| 118 |
+
return manifest;
|
| 119 |
+
}
|
| 120 |
+
async writeAppBuildManifest() {
|
| 121 |
+
const appBuildManifest = this.mergeAppBuildManifests(this.appBuildManifests.values());
|
| 122 |
+
const appBuildManifestPath = (0, _path.join)(this.distDir, _constants.APP_BUILD_MANIFEST);
|
| 123 |
+
(0, _requirecache.deleteCache)(appBuildManifestPath);
|
| 124 |
+
await (0, _writeatomic.writeFileAtomic)(appBuildManifestPath, JSON.stringify(appBuildManifest, null, 2));
|
| 125 |
+
}
|
| 126 |
+
async loadAppPathsManifest(pageName) {
|
| 127 |
+
this.appPathsManifests.set((0, _entrykey.getEntryKey)('app', 'server', pageName), await readPartialManifest(this.distDir, _constants.APP_PATHS_MANIFEST, pageName, 'app'));
|
| 128 |
+
}
|
| 129 |
+
async writeAppPathsManifest() {
|
| 130 |
+
const appPathsManifest = this.mergePagesManifests(this.appPathsManifests.values());
|
| 131 |
+
const appPathsManifestPath = (0, _path.join)(this.distDir, 'server', _constants.APP_PATHS_MANIFEST);
|
| 132 |
+
(0, _requirecache.deleteCache)(appPathsManifestPath);
|
| 133 |
+
await (0, _writeatomic.writeFileAtomic)(appPathsManifestPath, JSON.stringify(appPathsManifest, null, 2));
|
| 134 |
+
}
|
| 135 |
+
async writeWebpackStats() {
|
| 136 |
+
const webpackStats = this.mergeWebpackStats(this.webpackStats.values());
|
| 137 |
+
const path = (0, _path.join)(this.distDir, 'server', _constants.WEBPACK_STATS);
|
| 138 |
+
(0, _requirecache.deleteCache)(path);
|
| 139 |
+
await (0, _writeatomic.writeFileAtomic)(path, JSON.stringify(webpackStats, null, 2));
|
| 140 |
+
}
|
| 141 |
+
async loadBuildManifest(pageName, type) {
|
| 142 |
+
if (type === void 0) type = 'pages';
|
| 143 |
+
this.buildManifests.set((0, _entrykey.getEntryKey)(type, 'server', pageName), await readPartialManifest(this.distDir, _constants.BUILD_MANIFEST, pageName, type));
|
| 144 |
+
}
|
| 145 |
+
async loadWebpackStats(pageName, type) {
|
| 146 |
+
if (type === void 0) type = 'pages';
|
| 147 |
+
this.webpackStats.set((0, _entrykey.getEntryKey)(type, 'client', pageName), await readPartialManifest(this.distDir, _constants.WEBPACK_STATS, pageName, type));
|
| 148 |
+
}
|
| 149 |
+
mergeWebpackStats(statsFiles) {
|
| 150 |
+
const entrypoints = {};
|
| 151 |
+
const assets = new Map();
|
| 152 |
+
const chunks = new Map();
|
| 153 |
+
const modules = new Map();
|
| 154 |
+
for (const statsFile of statsFiles){
|
| 155 |
+
if (statsFile.entrypoints) {
|
| 156 |
+
for (const [k, v] of Object.entries(statsFile.entrypoints)){
|
| 157 |
+
if (!entrypoints[k]) {
|
| 158 |
+
entrypoints[k] = v;
|
| 159 |
+
}
|
| 160 |
+
}
|
| 161 |
+
}
|
| 162 |
+
if (statsFile.assets) {
|
| 163 |
+
for (const asset of statsFile.assets){
|
| 164 |
+
if (!assets.has(asset.name)) {
|
| 165 |
+
assets.set(asset.name, asset);
|
| 166 |
+
}
|
| 167 |
+
}
|
| 168 |
+
}
|
| 169 |
+
if (statsFile.chunks) {
|
| 170 |
+
for (const chunk of statsFile.chunks){
|
| 171 |
+
if (!chunks.has(chunk.id)) {
|
| 172 |
+
chunks.set(chunk.id, chunk);
|
| 173 |
+
}
|
| 174 |
+
}
|
| 175 |
+
}
|
| 176 |
+
if (statsFile.modules) {
|
| 177 |
+
for (const module of statsFile.modules){
|
| 178 |
+
const id = module.id;
|
| 179 |
+
if (id != null) {
|
| 180 |
+
// Merge the chunk list for the module. This can vary across endpoints.
|
| 181 |
+
const existing = modules.get(id);
|
| 182 |
+
if (existing == null) {
|
| 183 |
+
modules.set(id, module);
|
| 184 |
+
} else if (module.chunks != null && existing.chunks != null) {
|
| 185 |
+
for (const chunk of module.chunks){
|
| 186 |
+
if (!existing.chunks.includes(chunk)) {
|
| 187 |
+
existing.chunks.push(chunk);
|
| 188 |
+
}
|
| 189 |
+
}
|
| 190 |
+
}
|
| 191 |
+
}
|
| 192 |
+
}
|
| 193 |
+
}
|
| 194 |
+
}
|
| 195 |
+
return {
|
| 196 |
+
version: 'Turbopack',
|
| 197 |
+
entrypoints,
|
| 198 |
+
assets: [
|
| 199 |
+
...assets.values()
|
| 200 |
+
],
|
| 201 |
+
chunks: [
|
| 202 |
+
...chunks.values()
|
| 203 |
+
],
|
| 204 |
+
modules: [
|
| 205 |
+
...modules.values()
|
| 206 |
+
]
|
| 207 |
+
};
|
| 208 |
+
}
|
| 209 |
+
mergeBuildManifests(manifests) {
|
| 210 |
+
const manifest = {
|
| 211 |
+
pages: {
|
| 212 |
+
'/_app': []
|
| 213 |
+
},
|
| 214 |
+
// Something in next.js depends on these to exist even for app dir rendering
|
| 215 |
+
devFiles: [],
|
| 216 |
+
ampDevFiles: [],
|
| 217 |
+
polyfillFiles: [],
|
| 218 |
+
lowPriorityFiles: [
|
| 219 |
+
"static/" + this.buildId + "/_ssgManifest.js",
|
| 220 |
+
"static/" + this.buildId + "/_buildManifest.js"
|
| 221 |
+
],
|
| 222 |
+
rootMainFiles: [],
|
| 223 |
+
ampFirstPages: []
|
| 224 |
+
};
|
| 225 |
+
for (const m of manifests){
|
| 226 |
+
Object.assign(manifest.pages, m.pages);
|
| 227 |
+
if (m.rootMainFiles.length) manifest.rootMainFiles = m.rootMainFiles;
|
| 228 |
+
// polyfillFiles should always be the same, so we can overwrite instead of actually merging
|
| 229 |
+
if (m.polyfillFiles.length) manifest.polyfillFiles = m.polyfillFiles;
|
| 230 |
+
}
|
| 231 |
+
manifest.pages = sortObjectByKey(manifest.pages);
|
| 232 |
+
return manifest;
|
| 233 |
+
}
|
| 234 |
+
async writeBuildManifest(entrypoints, devRewrites, productionRewrites) {
|
| 235 |
+
var _devRewrites_beforeFiles, _devRewrites_afterFiles, _devRewrites_fallback;
|
| 236 |
+
const rewrites = productionRewrites != null ? productionRewrites : {
|
| 237 |
+
...devRewrites,
|
| 238 |
+
beforeFiles: ((_devRewrites_beforeFiles = devRewrites == null ? void 0 : devRewrites.beforeFiles) != null ? _devRewrites_beforeFiles : []).map(_buildmanifestplugin.processRoute),
|
| 239 |
+
afterFiles: ((_devRewrites_afterFiles = devRewrites == null ? void 0 : devRewrites.afterFiles) != null ? _devRewrites_afterFiles : []).map(_buildmanifestplugin.processRoute),
|
| 240 |
+
fallback: ((_devRewrites_fallback = devRewrites == null ? void 0 : devRewrites.fallback) != null ? _devRewrites_fallback : []).map(_buildmanifestplugin.processRoute)
|
| 241 |
+
};
|
| 242 |
+
const buildManifest = this.mergeBuildManifests(this.buildManifests.values());
|
| 243 |
+
const buildManifestPath = (0, _path.join)(this.distDir, _constants.BUILD_MANIFEST);
|
| 244 |
+
const middlewareBuildManifestPath = (0, _path.join)(this.distDir, 'server', "" + _constants.MIDDLEWARE_BUILD_MANIFEST + ".js");
|
| 245 |
+
const interceptionRewriteManifestPath = (0, _path.join)(this.distDir, 'server', "" + _constants.INTERCEPTION_ROUTE_REWRITE_MANIFEST + ".js");
|
| 246 |
+
(0, _requirecache.deleteCache)(buildManifestPath);
|
| 247 |
+
(0, _requirecache.deleteCache)(middlewareBuildManifestPath);
|
| 248 |
+
(0, _requirecache.deleteCache)(interceptionRewriteManifestPath);
|
| 249 |
+
await (0, _writeatomic.writeFileAtomic)(buildManifestPath, JSON.stringify(buildManifest, null, 2));
|
| 250 |
+
await (0, _writeatomic.writeFileAtomic)(middlewareBuildManifestPath, // we use globalThis here because middleware can be node
|
| 251 |
+
// which doesn't have "self"
|
| 252 |
+
(0, _buildmanifestplugin.createEdgeRuntimeManifest)(buildManifest));
|
| 253 |
+
const interceptionRewrites = JSON.stringify(rewrites.beforeFiles.filter(_generateinterceptionroutesrewrites.isInterceptionRouteRewrite));
|
| 254 |
+
await (0, _writeatomic.writeFileAtomic)(interceptionRewriteManifestPath, "self.__INTERCEPTION_ROUTE_REWRITE_MANIFEST=" + JSON.stringify(interceptionRewrites) + ";");
|
| 255 |
+
const pagesKeys = [
|
| 256 |
+
...entrypoints.page.keys()
|
| 257 |
+
];
|
| 258 |
+
if (entrypoints.global.app) {
|
| 259 |
+
pagesKeys.push('/_app');
|
| 260 |
+
}
|
| 261 |
+
if (entrypoints.global.error) {
|
| 262 |
+
pagesKeys.push('/_error');
|
| 263 |
+
}
|
| 264 |
+
const sortedPageKeys = (0, _utils.getSortedRoutes)(pagesKeys);
|
| 265 |
+
const clientBuildManifest = {
|
| 266 |
+
__rewrites: (0, _buildmanifestplugin.normalizeRewritesForBuildManifest)(rewrites),
|
| 267 |
+
...Object.fromEntries(sortedPageKeys.map((pathname)=>{
|
| 268 |
+
let filePath;
|
| 269 |
+
if (pathname === '/') {
|
| 270 |
+
filePath = '/index.js';
|
| 271 |
+
} else if (pathname.endsWith('/index')) {
|
| 272 |
+
filePath = "" + pathname + "/index.js";
|
| 273 |
+
} else {
|
| 274 |
+
filePath = "" + pathname + ".js";
|
| 275 |
+
}
|
| 276 |
+
return [
|
| 277 |
+
pathname,
|
| 278 |
+
[
|
| 279 |
+
"static/chunks/pages" + filePath
|
| 280 |
+
]
|
| 281 |
+
];
|
| 282 |
+
})),
|
| 283 |
+
sortedPages: sortedPageKeys
|
| 284 |
+
};
|
| 285 |
+
const clientBuildManifestJs = "self.__BUILD_MANIFEST = " + JSON.stringify(clientBuildManifest) + ";self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB()";
|
| 286 |
+
await (0, _writeatomic.writeFileAtomic)((0, _path.join)(this.distDir, 'static', this.buildId, '_buildManifest.js'), clientBuildManifestJs);
|
| 287 |
+
await (0, _writeatomic.writeFileAtomic)((0, _path.join)(this.distDir, 'static', this.buildId, '_ssgManifest.js'), _buildmanifestplugin.srcEmptySsgManifest);
|
| 288 |
+
}
|
| 289 |
+
async writeClientMiddlewareManifest() {
|
| 290 |
+
var _middlewareManifest_middleware_;
|
| 291 |
+
const middlewareManifest = this.mergeMiddlewareManifests(this.middlewareManifests.values());
|
| 292 |
+
const matchers = (middlewareManifest == null ? void 0 : (_middlewareManifest_middleware_ = middlewareManifest.middleware['/']) == null ? void 0 : _middlewareManifest_middleware_.matchers) || [];
|
| 293 |
+
const clientMiddlewareManifestPath = (0, _path.join)(this.distDir, 'static', this.buildId, "" + _constants.TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST);
|
| 294 |
+
(0, _requirecache.deleteCache)(clientMiddlewareManifestPath);
|
| 295 |
+
await (0, _writeatomic.writeFileAtomic)(clientMiddlewareManifestPath, JSON.stringify(matchers, null, 2));
|
| 296 |
+
}
|
| 297 |
+
async writeFallbackBuildManifest() {
|
| 298 |
+
const fallbackBuildManifest = this.mergeBuildManifests([
|
| 299 |
+
this.buildManifests.get((0, _entrykey.getEntryKey)('pages', 'server', '_app')),
|
| 300 |
+
this.buildManifests.get((0, _entrykey.getEntryKey)('pages', 'server', '_error'))
|
| 301 |
+
].filter(Boolean));
|
| 302 |
+
const fallbackBuildManifestPath = (0, _path.join)(this.distDir, "fallback-" + _constants.BUILD_MANIFEST);
|
| 303 |
+
(0, _requirecache.deleteCache)(fallbackBuildManifestPath);
|
| 304 |
+
await (0, _writeatomic.writeFileAtomic)(fallbackBuildManifestPath, JSON.stringify(fallbackBuildManifest, null, 2));
|
| 305 |
+
}
|
| 306 |
+
async loadFontManifest(pageName, type) {
|
| 307 |
+
if (type === void 0) type = 'pages';
|
| 308 |
+
this.fontManifests.set((0, _entrykey.getEntryKey)(type, 'server', pageName), await readPartialManifest(this.distDir, "" + _constants.NEXT_FONT_MANIFEST + ".json", pageName, type));
|
| 309 |
+
}
|
| 310 |
+
mergeFontManifests(manifests) {
|
| 311 |
+
const manifest = {
|
| 312 |
+
app: {},
|
| 313 |
+
appUsingSizeAdjust: false,
|
| 314 |
+
pages: {},
|
| 315 |
+
pagesUsingSizeAdjust: false
|
| 316 |
+
};
|
| 317 |
+
for (const m of manifests){
|
| 318 |
+
Object.assign(manifest.app, m.app);
|
| 319 |
+
Object.assign(manifest.pages, m.pages);
|
| 320 |
+
manifest.appUsingSizeAdjust = manifest.appUsingSizeAdjust || m.appUsingSizeAdjust;
|
| 321 |
+
manifest.pagesUsingSizeAdjust = manifest.pagesUsingSizeAdjust || m.pagesUsingSizeAdjust;
|
| 322 |
+
}
|
| 323 |
+
manifest.app = sortObjectByKey(manifest.app);
|
| 324 |
+
manifest.pages = sortObjectByKey(manifest.pages);
|
| 325 |
+
return manifest;
|
| 326 |
+
}
|
| 327 |
+
async writeNextFontManifest() {
|
| 328 |
+
const fontManifest = this.mergeFontManifests(this.fontManifests.values());
|
| 329 |
+
const json = JSON.stringify(fontManifest, null, 2);
|
| 330 |
+
const fontManifestJsonPath = (0, _path.join)(this.distDir, 'server', "" + _constants.NEXT_FONT_MANIFEST + ".json");
|
| 331 |
+
const fontManifestJsPath = (0, _path.join)(this.distDir, 'server', "" + _constants.NEXT_FONT_MANIFEST + ".js");
|
| 332 |
+
(0, _requirecache.deleteCache)(fontManifestJsonPath);
|
| 333 |
+
(0, _requirecache.deleteCache)(fontManifestJsPath);
|
| 334 |
+
await (0, _writeatomic.writeFileAtomic)(fontManifestJsonPath, json);
|
| 335 |
+
await (0, _writeatomic.writeFileAtomic)(fontManifestJsPath, "self.__NEXT_FONT_MANIFEST=" + JSON.stringify(json));
|
| 336 |
+
}
|
| 337 |
+
/**
|
| 338 |
+
* @returns If the manifest was written or not
|
| 339 |
+
*/ async loadMiddlewareManifest(pageName, type) {
|
| 340 |
+
const middlewareManifestPath = getManifestPath(pageName, this.distDir, _constants.MIDDLEWARE_MANIFEST, type, true);
|
| 341 |
+
// middlewareManifest is actually "edge manifest" and not all routes are edge runtime. If it is not written we skip it.
|
| 342 |
+
if (!(0, _fs.existsSync)(middlewareManifestPath)) {
|
| 343 |
+
return false;
|
| 344 |
+
}
|
| 345 |
+
this.middlewareManifests.set((0, _entrykey.getEntryKey)(type === 'middleware' || type === 'instrumentation' ? 'root' : type, 'server', pageName), await readPartialManifest(this.distDir, _constants.MIDDLEWARE_MANIFEST, pageName, type));
|
| 346 |
+
return true;
|
| 347 |
+
}
|
| 348 |
+
getMiddlewareManifest(key) {
|
| 349 |
+
return this.middlewareManifests.get(key);
|
| 350 |
+
}
|
| 351 |
+
deleteMiddlewareManifest(key) {
|
| 352 |
+
return this.middlewareManifests.delete(key);
|
| 353 |
+
}
|
| 354 |
+
mergeMiddlewareManifests(manifests) {
|
| 355 |
+
const manifest = {
|
| 356 |
+
version: 3,
|
| 357 |
+
middleware: {},
|
| 358 |
+
sortedMiddleware: [],
|
| 359 |
+
functions: {}
|
| 360 |
+
};
|
| 361 |
+
let instrumentation = undefined;
|
| 362 |
+
for (const m of manifests){
|
| 363 |
+
Object.assign(manifest.functions, m.functions);
|
| 364 |
+
Object.assign(manifest.middleware, m.middleware);
|
| 365 |
+
if (m.instrumentation) {
|
| 366 |
+
instrumentation = m.instrumentation;
|
| 367 |
+
}
|
| 368 |
+
}
|
| 369 |
+
manifest.functions = sortObjectByKey(manifest.functions);
|
| 370 |
+
manifest.middleware = sortObjectByKey(manifest.middleware);
|
| 371 |
+
const updateFunctionDefinition = (fun)=>{
|
| 372 |
+
var _instrumentation_files;
|
| 373 |
+
return {
|
| 374 |
+
...fun,
|
| 375 |
+
files: [
|
| 376 |
+
...(_instrumentation_files = instrumentation == null ? void 0 : instrumentation.files) != null ? _instrumentation_files : [],
|
| 377 |
+
...fun.files
|
| 378 |
+
]
|
| 379 |
+
};
|
| 380 |
+
};
|
| 381 |
+
for (const key of Object.keys(manifest.middleware)){
|
| 382 |
+
const value = manifest.middleware[key];
|
| 383 |
+
manifest.middleware[key] = updateFunctionDefinition(value);
|
| 384 |
+
}
|
| 385 |
+
for (const key of Object.keys(manifest.functions)){
|
| 386 |
+
const value = manifest.functions[key];
|
| 387 |
+
manifest.functions[key] = updateFunctionDefinition(value);
|
| 388 |
+
}
|
| 389 |
+
for (const fun of Object.values(manifest.functions).concat(Object.values(manifest.middleware))){
|
| 390 |
+
for (const matcher of fun.matchers){
|
| 391 |
+
if (!matcher.regexp) {
|
| 392 |
+
matcher.regexp = (0, _pathtoregexp.pathToRegexp)(matcher.originalSource, [], {
|
| 393 |
+
delimiter: '/',
|
| 394 |
+
sensitive: false,
|
| 395 |
+
strict: true
|
| 396 |
+
}).source.replaceAll('\\/', '/');
|
| 397 |
+
}
|
| 398 |
+
}
|
| 399 |
+
}
|
| 400 |
+
manifest.sortedMiddleware = Object.keys(manifest.middleware);
|
| 401 |
+
return manifest;
|
| 402 |
+
}
|
| 403 |
+
async writeMiddlewareManifest() {
|
| 404 |
+
const middlewareManifest = this.mergeMiddlewareManifests(this.middlewareManifests.values());
|
| 405 |
+
// Normalize regexes as it uses path-to-regexp
|
| 406 |
+
for(const key in middlewareManifest.middleware){
|
| 407 |
+
middlewareManifest.middleware[key].matchers.forEach((matcher)=>{
|
| 408 |
+
if (!matcher.regexp.startsWith('^')) {
|
| 409 |
+
const parsedPage = (0, _trytoparsepath.tryToParsePath)(matcher.regexp);
|
| 410 |
+
if (parsedPage.error || !parsedPage.regexStr) {
|
| 411 |
+
throw Object.defineProperty(new Error("Invalid source: " + matcher.regexp), "__NEXT_ERROR_CODE", {
|
| 412 |
+
value: "E442",
|
| 413 |
+
enumerable: false,
|
| 414 |
+
configurable: true
|
| 415 |
+
});
|
| 416 |
+
}
|
| 417 |
+
matcher.regexp = parsedPage.regexStr;
|
| 418 |
+
}
|
| 419 |
+
});
|
| 420 |
+
}
|
| 421 |
+
const middlewareManifestPath = (0, _path.join)(this.distDir, 'server', _constants.MIDDLEWARE_MANIFEST);
|
| 422 |
+
(0, _requirecache.deleteCache)(middlewareManifestPath);
|
| 423 |
+
await (0, _writeatomic.writeFileAtomic)(middlewareManifestPath, JSON.stringify(middlewareManifest, null, 2));
|
| 424 |
+
}
|
| 425 |
+
async loadPagesManifest(pageName) {
|
| 426 |
+
this.pagesManifests.set((0, _entrykey.getEntryKey)('pages', 'server', pageName), await readPartialManifest(this.distDir, _constants.PAGES_MANIFEST, pageName));
|
| 427 |
+
}
|
| 428 |
+
mergePagesManifests(manifests) {
|
| 429 |
+
const manifest = {};
|
| 430 |
+
for (const m of manifests){
|
| 431 |
+
Object.assign(manifest, m);
|
| 432 |
+
}
|
| 433 |
+
return sortObjectByKey(manifest);
|
| 434 |
+
}
|
| 435 |
+
async writePagesManifest() {
|
| 436 |
+
const pagesManifest = this.mergePagesManifests(this.pagesManifests.values());
|
| 437 |
+
const pagesManifestPath = (0, _path.join)(this.distDir, 'server', _constants.PAGES_MANIFEST);
|
| 438 |
+
(0, _requirecache.deleteCache)(pagesManifestPath);
|
| 439 |
+
await (0, _writeatomic.writeFileAtomic)(pagesManifestPath, JSON.stringify(pagesManifest, null, 2));
|
| 440 |
+
}
|
| 441 |
+
async writeManifests(param) {
|
| 442 |
+
let { devRewrites, productionRewrites, entrypoints } = param;
|
| 443 |
+
await this.writeActionManifest();
|
| 444 |
+
await this.writeAppBuildManifest();
|
| 445 |
+
await this.writeAppPathsManifest();
|
| 446 |
+
await this.writeBuildManifest(entrypoints, devRewrites, productionRewrites);
|
| 447 |
+
await this.writeFallbackBuildManifest();
|
| 448 |
+
await this.writeMiddlewareManifest();
|
| 449 |
+
await this.writeClientMiddlewareManifest();
|
| 450 |
+
await this.writeNextFontManifest();
|
| 451 |
+
await this.writePagesManifest();
|
| 452 |
+
if (process.env.TURBOPACK_STATS != null) {
|
| 453 |
+
await this.writeWebpackStats();
|
| 454 |
+
}
|
| 455 |
+
}
|
| 456 |
+
constructor({ distDir, buildId, encryptionKey }){
|
| 457 |
+
this.actionManifests = new Map();
|
| 458 |
+
this.appBuildManifests = new Map();
|
| 459 |
+
this.appPathsManifests = new Map();
|
| 460 |
+
this.buildManifests = new Map();
|
| 461 |
+
this.fontManifests = new Map();
|
| 462 |
+
this.middlewareManifests = new Map();
|
| 463 |
+
this.pagesManifests = new Map();
|
| 464 |
+
this.webpackStats = new Map();
|
| 465 |
+
this.distDir = distDir;
|
| 466 |
+
this.buildId = buildId;
|
| 467 |
+
this.encryptionKey = encryptionKey;
|
| 468 |
+
}
|
| 469 |
+
}
|
| 470 |
+
function sortObjectByKey(obj) {
|
| 471 |
+
return Object.keys(obj).sort().reduce((acc, key)=>{
|
| 472 |
+
acc[key] = obj[key];
|
| 473 |
+
return acc;
|
| 474 |
+
}, {});
|
| 475 |
+
}
|
| 476 |
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true
|
| 4 |
+
});
|
| 5 |
+
0 && (module.exports = {
|
| 6 |
+
ModuleBuildError: null,
|
| 7 |
+
TurbopackInternalError: null,
|
| 8 |
+
formatIssue: null,
|
| 9 |
+
getIssueKey: null,
|
| 10 |
+
getTurbopackJsConfig: null,
|
| 11 |
+
isPersistentCachingEnabled: null,
|
| 12 |
+
isRelevantWarning: null,
|
| 13 |
+
isWellKnownError: null,
|
| 14 |
+
processIssues: null,
|
| 15 |
+
renderStyledStringToErrorAnsi: null
|
| 16 |
+
});
|
| 17 |
+
function _export(target, all) {
|
| 18 |
+
for(var name in all)Object.defineProperty(target, name, {
|
| 19 |
+
enumerable: true,
|
| 20 |
+
get: all[name]
|
| 21 |
+
});
|
| 22 |
+
}
|
| 23 |
+
_export(exports, {
|
| 24 |
+
ModuleBuildError: function() {
|
| 25 |
+
return ModuleBuildError;
|
| 26 |
+
},
|
| 27 |
+
TurbopackInternalError: function() {
|
| 28 |
+
return TurbopackInternalError;
|
| 29 |
+
},
|
| 30 |
+
formatIssue: function() {
|
| 31 |
+
return formatIssue;
|
| 32 |
+
},
|
| 33 |
+
getIssueKey: function() {
|
| 34 |
+
return getIssueKey;
|
| 35 |
+
},
|
| 36 |
+
getTurbopackJsConfig: function() {
|
| 37 |
+
return getTurbopackJsConfig;
|
| 38 |
+
},
|
| 39 |
+
isPersistentCachingEnabled: function() {
|
| 40 |
+
return isPersistentCachingEnabled;
|
| 41 |
+
},
|
| 42 |
+
isRelevantWarning: function() {
|
| 43 |
+
return isRelevantWarning;
|
| 44 |
+
},
|
| 45 |
+
isWellKnownError: function() {
|
| 46 |
+
return isWellKnownError;
|
| 47 |
+
},
|
| 48 |
+
processIssues: function() {
|
| 49 |
+
return processIssues;
|
| 50 |
+
},
|
| 51 |
+
renderStyledStringToErrorAnsi: function() {
|
| 52 |
+
return renderStyledStringToErrorAnsi;
|
| 53 |
+
}
|
| 54 |
+
});
|
| 55 |
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
| 56 |
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
| 57 |
+
const _picocolors = require("../../../lib/picocolors");
|
| 58 |
+
const _isinternal = /*#__PURE__*/ _interop_require_default._(require("../is-internal"));
|
| 59 |
+
const _magicidentifier = require("../magic-identifier");
|
| 60 |
+
const _log = /*#__PURE__*/ _interop_require_wildcard._(require("../../../build/output/log"));
|
| 61 |
+
const _loadjsconfig = /*#__PURE__*/ _interop_require_default._(require("../../../build/load-jsconfig"));
|
| 62 |
+
const _events = require("../../../telemetry/events");
|
| 63 |
+
const _shared = require("../../../trace/shared");
|
| 64 |
+
class ModuleBuildError extends Error {
|
| 65 |
+
constructor(...args){
|
| 66 |
+
super(...args), this.name = 'ModuleBuildError';
|
| 67 |
+
}
|
| 68 |
+
}
|
| 69 |
+
class TurbopackInternalError extends Error {
|
| 70 |
+
static createAndRecordTelemetry(cause) {
|
| 71 |
+
const error = new TurbopackInternalError(cause);
|
| 72 |
+
const telemetry = _shared.traceGlobals.get('telemetry');
|
| 73 |
+
if (telemetry) {
|
| 74 |
+
telemetry.record((0, _events.eventErrorThrown)(error));
|
| 75 |
+
} else {
|
| 76 |
+
console.error('Expected `telemetry` to be set in globals');
|
| 77 |
+
}
|
| 78 |
+
return error;
|
| 79 |
+
}
|
| 80 |
+
constructor(cause){
|
| 81 |
+
super(cause.message), this.name = 'TurbopackInternalError', // Manually set this as this isn't statically determinable
|
| 82 |
+
this.__NEXT_ERROR_CODE = 'TurbopackInternalError';
|
| 83 |
+
this.stack = cause.stack;
|
| 84 |
+
}
|
| 85 |
+
}
|
| 86 |
+
function isWellKnownError(issue) {
|
| 87 |
+
const { title } = issue;
|
| 88 |
+
const formattedTitle = renderStyledStringToErrorAnsi(title);
|
| 89 |
+
// TODO: add more well known errors
|
| 90 |
+
if (formattedTitle.includes('Module not found') || formattedTitle.includes('Unknown module type')) {
|
| 91 |
+
return true;
|
| 92 |
+
}
|
| 93 |
+
return false;
|
| 94 |
+
}
|
| 95 |
+
function getIssueKey(issue) {
|
| 96 |
+
return issue.severity + "-" + issue.filePath + "-" + JSON.stringify(issue.title) + "-" + JSON.stringify(issue.description);
|
| 97 |
+
}
|
| 98 |
+
async function getTurbopackJsConfig(dir, nextConfig) {
|
| 99 |
+
const { jsConfig } = await (0, _loadjsconfig.default)(dir, nextConfig);
|
| 100 |
+
return jsConfig != null ? jsConfig : {
|
| 101 |
+
compilerOptions: {}
|
| 102 |
+
};
|
| 103 |
+
}
|
| 104 |
+
function processIssues(currentEntryIssues, key, result, throwIssue, logErrors) {
|
| 105 |
+
const newIssues = new Map();
|
| 106 |
+
currentEntryIssues.set(key, newIssues);
|
| 107 |
+
const relevantIssues = new Set();
|
| 108 |
+
for (const issue of result.issues){
|
| 109 |
+
if (issue.severity !== 'error' && issue.severity !== 'fatal' && issue.severity !== 'warning') continue;
|
| 110 |
+
const issueKey = getIssueKey(issue);
|
| 111 |
+
newIssues.set(issueKey, issue);
|
| 112 |
+
if (issue.severity !== 'warning') {
|
| 113 |
+
if (throwIssue) {
|
| 114 |
+
const formatted = formatIssue(issue);
|
| 115 |
+
relevantIssues.add(formatted);
|
| 116 |
+
} else if (logErrors && isWellKnownError(issue)) {
|
| 117 |
+
const formatted = formatIssue(issue);
|
| 118 |
+
_log.error(formatted);
|
| 119 |
+
}
|
| 120 |
+
}
|
| 121 |
+
}
|
| 122 |
+
if (relevantIssues.size && throwIssue) {
|
| 123 |
+
throw Object.defineProperty(new ModuleBuildError([
|
| 124 |
+
...relevantIssues
|
| 125 |
+
].join('\n\n')), "__NEXT_ERROR_CODE", {
|
| 126 |
+
value: "E394",
|
| 127 |
+
enumerable: false,
|
| 128 |
+
configurable: true
|
| 129 |
+
});
|
| 130 |
+
}
|
| 131 |
+
}
|
| 132 |
+
function formatIssue(issue) {
|
| 133 |
+
const { filePath, title, description, source, importTraces } = issue;
|
| 134 |
+
let { documentationLink } = issue;
|
| 135 |
+
const formattedTitle = renderStyledStringToErrorAnsi(title).replace(/\n/g, '\n ');
|
| 136 |
+
// TODO: Use error codes to identify these
|
| 137 |
+
// TODO: Generalize adapting Turbopack errors to Next.js errors
|
| 138 |
+
if (formattedTitle.includes('Module not found')) {
|
| 139 |
+
// For compatiblity with webpack
|
| 140 |
+
// TODO: include columns in webpack errors.
|
| 141 |
+
documentationLink = 'https://nextjs.org/docs/messages/module-not-found';
|
| 142 |
+
}
|
| 143 |
+
const formattedFilePath = filePath.replace('[project]/', './').replaceAll('/./', '/').replace('\\\\?\\', '');
|
| 144 |
+
let message = '';
|
| 145 |
+
if (source == null ? void 0 : source.range) {
|
| 146 |
+
const { start } = source.range;
|
| 147 |
+
message = formattedFilePath + ":" + (start.line + 1) + ":" + (start.column + 1) + "\n" + formattedTitle;
|
| 148 |
+
} else if (formattedFilePath) {
|
| 149 |
+
message = formattedFilePath + "\n" + formattedTitle;
|
| 150 |
+
} else {
|
| 151 |
+
message = formattedTitle;
|
| 152 |
+
}
|
| 153 |
+
message += '\n';
|
| 154 |
+
if ((source == null ? void 0 : source.range) && source.source.content && // ignore Next.js/React internals, as these can often be huge bundled files.
|
| 155 |
+
!(0, _isinternal.default)(filePath)) {
|
| 156 |
+
const { start, end } = source.range;
|
| 157 |
+
const { codeFrameColumns } = require('next/dist/compiled/babel/code-frame');
|
| 158 |
+
message += codeFrameColumns(source.source.content, {
|
| 159 |
+
start: {
|
| 160 |
+
line: start.line + 1,
|
| 161 |
+
column: start.column + 1
|
| 162 |
+
},
|
| 163 |
+
end: {
|
| 164 |
+
line: end.line + 1,
|
| 165 |
+
column: end.column + 1
|
| 166 |
+
}
|
| 167 |
+
}, {
|
| 168 |
+
forceColor: true
|
| 169 |
+
}).trim() + '\n\n';
|
| 170 |
+
}
|
| 171 |
+
if (description) {
|
| 172 |
+
if (description.type === 'text' && description.value.includes("Cannot find module 'sass'")) {
|
| 173 |
+
message += "To use Next.js' built-in Sass support, you first need to install `sass`.\n";
|
| 174 |
+
message += 'Run `npm i sass` or `yarn add sass` inside your workspace.\n';
|
| 175 |
+
message += '\nLearn more: https://nextjs.org/docs/messages/install-sass';
|
| 176 |
+
} else {
|
| 177 |
+
message += renderStyledStringToErrorAnsi(description) + '\n\n';
|
| 178 |
+
}
|
| 179 |
+
}
|
| 180 |
+
// TODO: make it possible to enable this for debugging, but not in tests.
|
| 181 |
+
// if (detail) {
|
| 182 |
+
// message += renderStyledStringToErrorAnsi(detail) + '\n\n'
|
| 183 |
+
// }
|
| 184 |
+
if (importTraces == null ? void 0 : importTraces.length) {
|
| 185 |
+
// This is the same logic as in turbopack/crates/turbopack-cli-utils/src/issue.rs
|
| 186 |
+
if (importTraces.length === 1) {
|
| 187 |
+
const trace = importTraces[0];
|
| 188 |
+
// We only display the layer if there is more than one for the trace
|
| 189 |
+
message += "Import trace:\n" + formatIssueTrace(trace, ' ', !identicalLayers(trace));
|
| 190 |
+
} else {
|
| 191 |
+
// We end up with multiple traces when the file with the error is reachable from multiple
|
| 192 |
+
// different entry points (e.g. ssr, client)
|
| 193 |
+
message += 'Import traces:\n';
|
| 194 |
+
const everyTraceHasADistinctRootLayer = new Set(importTraces.map(leafLayerName).filter((l)=>l != null)).size === importTraces.length;
|
| 195 |
+
for(let i = 0; i < importTraces.length; i++){
|
| 196 |
+
const trace = importTraces[i];
|
| 197 |
+
const layer = leafLayerName(trace);
|
| 198 |
+
if (everyTraceHasADistinctRootLayer) {
|
| 199 |
+
message += " " + layer + ":\n";
|
| 200 |
+
} else {
|
| 201 |
+
message += " #" + (i + 1);
|
| 202 |
+
if (layer) {
|
| 203 |
+
message += " [" + layer + "]";
|
| 204 |
+
}
|
| 205 |
+
message += ':\n';
|
| 206 |
+
}
|
| 207 |
+
message += formatIssueTrace(trace, ' ', !identicalLayers(trace));
|
| 208 |
+
}
|
| 209 |
+
}
|
| 210 |
+
}
|
| 211 |
+
if (documentationLink) {
|
| 212 |
+
message += documentationLink + '\n\n';
|
| 213 |
+
}
|
| 214 |
+
return message;
|
| 215 |
+
}
|
| 216 |
+
/** Returns the first present layer name in the trace */ function leafLayerName(items) {
|
| 217 |
+
for (const item of items){
|
| 218 |
+
const layer = item.layer;
|
| 219 |
+
if (layer != null) return layer;
|
| 220 |
+
}
|
| 221 |
+
return undefined;
|
| 222 |
+
}
|
| 223 |
+
/**
|
| 224 |
+
* Returns whether or not all items share the same layer.
|
| 225 |
+
* If a layer is absent we ignore it in this analysis
|
| 226 |
+
*/ function identicalLayers(items) {
|
| 227 |
+
const firstPresentLayer = items.findIndex((t)=>t.layer != null);
|
| 228 |
+
if (firstPresentLayer === -1) return true // all layers are absent
|
| 229 |
+
;
|
| 230 |
+
const layer = items[firstPresentLayer].layer;
|
| 231 |
+
for(let i = firstPresentLayer + 1; i < items.length; i++){
|
| 232 |
+
const itemLayer = items[i].layer;
|
| 233 |
+
if (itemLayer == null || itemLayer !== layer) {
|
| 234 |
+
return false;
|
| 235 |
+
}
|
| 236 |
+
}
|
| 237 |
+
return true;
|
| 238 |
+
}
|
| 239 |
+
function formatIssueTrace(items, indent, printLayers) {
|
| 240 |
+
return items.map((item)=>{
|
| 241 |
+
let r = indent;
|
| 242 |
+
if (item.fsName !== 'project') {
|
| 243 |
+
r += "[" + item.fsName + "]/";
|
| 244 |
+
} else {
|
| 245 |
+
// This is consistent with webpack's output
|
| 246 |
+
r += './';
|
| 247 |
+
}
|
| 248 |
+
r += item.path;
|
| 249 |
+
if (printLayers && item.layer) {
|
| 250 |
+
r += " [" + item.layer + "]";
|
| 251 |
+
}
|
| 252 |
+
return r;
|
| 253 |
+
}).join('\n') + '\n\n';
|
| 254 |
+
}
|
| 255 |
+
function isRelevantWarning(issue) {
|
| 256 |
+
return issue.severity === 'warning' && !isNodeModulesIssue(issue);
|
| 257 |
+
}
|
| 258 |
+
function isNodeModulesIssue(issue) {
|
| 259 |
+
if (issue.severity === 'warning' && issue.stage === 'config') {
|
| 260 |
+
// Override for the externalize issue
|
| 261 |
+
// `Package foo (serverExternalPackages or default list) can't be external`
|
| 262 |
+
if (renderStyledStringToErrorAnsi(issue.title).includes("can't be external")) {
|
| 263 |
+
return false;
|
| 264 |
+
}
|
| 265 |
+
}
|
| 266 |
+
return issue.severity === 'warning' && (issue.filePath.match(/^(?:.*[\\/])?node_modules(?:[\\/].*)?$/) !== null || // Ignore Next.js itself when running next directly in the monorepo where it is not inside
|
| 267 |
+
// node_modules anyway.
|
| 268 |
+
// TODO(mischnic) prevent matches when this is published to npm
|
| 269 |
+
issue.filePath.startsWith('[project]/packages/next/'));
|
| 270 |
+
}
|
| 271 |
+
function renderStyledStringToErrorAnsi(string) {
|
| 272 |
+
function decodeMagicIdentifiers(str) {
|
| 273 |
+
return str.replaceAll(_magicidentifier.MAGIC_IDENTIFIER_REGEX, (ident)=>{
|
| 274 |
+
try {
|
| 275 |
+
return (0, _picocolors.magenta)("{" + (0, _magicidentifier.decodeMagicIdentifier)(ident) + "}");
|
| 276 |
+
} catch (e) {
|
| 277 |
+
return (0, _picocolors.magenta)("{" + ident + " (decoding failed: " + e + ")}");
|
| 278 |
+
}
|
| 279 |
+
});
|
| 280 |
+
}
|
| 281 |
+
switch(string.type){
|
| 282 |
+
case 'text':
|
| 283 |
+
return decodeMagicIdentifiers(string.value);
|
| 284 |
+
case 'strong':
|
| 285 |
+
return (0, _picocolors.bold)((0, _picocolors.red)(decodeMagicIdentifiers(string.value)));
|
| 286 |
+
case 'code':
|
| 287 |
+
return (0, _picocolors.green)(decodeMagicIdentifiers(string.value));
|
| 288 |
+
case 'line':
|
| 289 |
+
return string.value.map(renderStyledStringToErrorAnsi).join('');
|
| 290 |
+
case 'stack':
|
| 291 |
+
return string.value.map(renderStyledStringToErrorAnsi).join('\n');
|
| 292 |
+
default:
|
| 293 |
+
throw Object.defineProperty(new Error('Unknown StyledString type', string), "__NEXT_ERROR_CODE", {
|
| 294 |
+
value: "E138",
|
| 295 |
+
enumerable: false,
|
| 296 |
+
configurable: true
|
| 297 |
+
});
|
| 298 |
+
}
|
| 299 |
+
}
|
| 300 |
+
function isPersistentCachingEnabled(config) {
|
| 301 |
+
var _config_experimental;
|
| 302 |
+
return ((_config_experimental = config.experimental) == null ? void 0 : _config_experimental.turbopackPersistentCaching) || false;
|
| 303 |
+
}
|
| 304 |
+
|
| 305 |
+
//# sourceMappingURL=utils.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/utils.js
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
0 && (module.exports = {
|
| 6 |
+
DecodeError: null,
|
| 7 |
+
MiddlewareNotFoundError: null,
|
| 8 |
+
MissingStaticPage: null,
|
| 9 |
+
NormalizeError: null,
|
| 10 |
+
PageNotFoundError: null,
|
| 11 |
+
SP: null,
|
| 12 |
+
ST: null,
|
| 13 |
+
WEB_VITALS: null,
|
| 14 |
+
execOnce: null,
|
| 15 |
+
getDisplayName: null,
|
| 16 |
+
getLocationOrigin: null,
|
| 17 |
+
getURL: null,
|
| 18 |
+
isAbsoluteUrl: null,
|
| 19 |
+
isResSent: null,
|
| 20 |
+
loadGetInitialProps: null,
|
| 21 |
+
normalizeRepeatedSlashes: null,
|
| 22 |
+
stringifyError: null
|
| 23 |
+
});
|
| 24 |
+
function _export(target, all) {
|
| 25 |
+
for(var name in all)Object.defineProperty(target, name, {
|
| 26 |
+
enumerable: true,
|
| 27 |
+
get: all[name]
|
| 28 |
+
});
|
| 29 |
+
}
|
| 30 |
+
_export(exports, {
|
| 31 |
+
DecodeError: function() {
|
| 32 |
+
return DecodeError;
|
| 33 |
+
},
|
| 34 |
+
MiddlewareNotFoundError: function() {
|
| 35 |
+
return MiddlewareNotFoundError;
|
| 36 |
+
},
|
| 37 |
+
MissingStaticPage: function() {
|
| 38 |
+
return MissingStaticPage;
|
| 39 |
+
},
|
| 40 |
+
NormalizeError: function() {
|
| 41 |
+
return NormalizeError;
|
| 42 |
+
},
|
| 43 |
+
PageNotFoundError: function() {
|
| 44 |
+
return PageNotFoundError;
|
| 45 |
+
},
|
| 46 |
+
SP: function() {
|
| 47 |
+
return SP;
|
| 48 |
+
},
|
| 49 |
+
ST: function() {
|
| 50 |
+
return ST;
|
| 51 |
+
},
|
| 52 |
+
WEB_VITALS: function() {
|
| 53 |
+
return WEB_VITALS;
|
| 54 |
+
},
|
| 55 |
+
execOnce: function() {
|
| 56 |
+
return execOnce;
|
| 57 |
+
},
|
| 58 |
+
getDisplayName: function() {
|
| 59 |
+
return getDisplayName;
|
| 60 |
+
},
|
| 61 |
+
getLocationOrigin: function() {
|
| 62 |
+
return getLocationOrigin;
|
| 63 |
+
},
|
| 64 |
+
getURL: function() {
|
| 65 |
+
return getURL;
|
| 66 |
+
},
|
| 67 |
+
isAbsoluteUrl: function() {
|
| 68 |
+
return isAbsoluteUrl;
|
| 69 |
+
},
|
| 70 |
+
isResSent: function() {
|
| 71 |
+
return isResSent;
|
| 72 |
+
},
|
| 73 |
+
loadGetInitialProps: function() {
|
| 74 |
+
return loadGetInitialProps;
|
| 75 |
+
},
|
| 76 |
+
normalizeRepeatedSlashes: function() {
|
| 77 |
+
return normalizeRepeatedSlashes;
|
| 78 |
+
},
|
| 79 |
+
stringifyError: function() {
|
| 80 |
+
return stringifyError;
|
| 81 |
+
}
|
| 82 |
+
});
|
| 83 |
+
const WEB_VITALS = [
|
| 84 |
+
'CLS',
|
| 85 |
+
'FCP',
|
| 86 |
+
'FID',
|
| 87 |
+
'INP',
|
| 88 |
+
'LCP',
|
| 89 |
+
'TTFB'
|
| 90 |
+
];
|
| 91 |
+
function execOnce(fn) {
|
| 92 |
+
let used = false;
|
| 93 |
+
let result;
|
| 94 |
+
return function() {
|
| 95 |
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
| 96 |
+
args[_key] = arguments[_key];
|
| 97 |
+
}
|
| 98 |
+
if (!used) {
|
| 99 |
+
used = true;
|
| 100 |
+
result = fn(...args);
|
| 101 |
+
}
|
| 102 |
+
return result;
|
| 103 |
+
};
|
| 104 |
+
}
|
| 105 |
+
// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
|
| 106 |
+
// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
|
| 107 |
+
const ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
|
| 108 |
+
const isAbsoluteUrl = (url)=>ABSOLUTE_URL_REGEX.test(url);
|
| 109 |
+
function getLocationOrigin() {
|
| 110 |
+
const { protocol, hostname, port } = window.location;
|
| 111 |
+
return protocol + "//" + hostname + (port ? ':' + port : '');
|
| 112 |
+
}
|
| 113 |
+
function getURL() {
|
| 114 |
+
const { href } = window.location;
|
| 115 |
+
const origin = getLocationOrigin();
|
| 116 |
+
return href.substring(origin.length);
|
| 117 |
+
}
|
| 118 |
+
function getDisplayName(Component) {
|
| 119 |
+
return typeof Component === 'string' ? Component : Component.displayName || Component.name || 'Unknown';
|
| 120 |
+
}
|
| 121 |
+
function isResSent(res) {
|
| 122 |
+
return res.finished || res.headersSent;
|
| 123 |
+
}
|
| 124 |
+
function normalizeRepeatedSlashes(url) {
|
| 125 |
+
const urlParts = url.split('?');
|
| 126 |
+
const urlNoQuery = urlParts[0];
|
| 127 |
+
return urlNoQuery// first we replace any non-encoded backslashes with forward
|
| 128 |
+
// then normalize repeated forward slashes
|
| 129 |
+
.replace(/\\/g, '/').replace(/\/\/+/g, '/') + (urlParts[1] ? "?" + urlParts.slice(1).join('?') : '');
|
| 130 |
+
}
|
| 131 |
+
async function loadGetInitialProps(App, ctx) {
|
| 132 |
+
if (process.env.NODE_ENV !== 'production') {
|
| 133 |
+
var _App_prototype;
|
| 134 |
+
if ((_App_prototype = App.prototype) == null ? void 0 : _App_prototype.getInitialProps) {
|
| 135 |
+
const message = '"' + getDisplayName(App) + '.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.';
|
| 136 |
+
throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
| 137 |
+
value: "E394",
|
| 138 |
+
enumerable: false,
|
| 139 |
+
configurable: true
|
| 140 |
+
});
|
| 141 |
+
}
|
| 142 |
+
}
|
| 143 |
+
// when called from _app `ctx` is nested in `ctx`
|
| 144 |
+
const res = ctx.res || ctx.ctx && ctx.ctx.res;
|
| 145 |
+
if (!App.getInitialProps) {
|
| 146 |
+
if (ctx.ctx && ctx.Component) {
|
| 147 |
+
// @ts-ignore pageProps default
|
| 148 |
+
return {
|
| 149 |
+
pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx)
|
| 150 |
+
};
|
| 151 |
+
}
|
| 152 |
+
return {};
|
| 153 |
+
}
|
| 154 |
+
const props = await App.getInitialProps(ctx);
|
| 155 |
+
if (res && isResSent(res)) {
|
| 156 |
+
return props;
|
| 157 |
+
}
|
| 158 |
+
if (!props) {
|
| 159 |
+
const message = '"' + getDisplayName(App) + '.getInitialProps()" should resolve to an object. But found "' + props + '" instead.';
|
| 160 |
+
throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
| 161 |
+
value: "E394",
|
| 162 |
+
enumerable: false,
|
| 163 |
+
configurable: true
|
| 164 |
+
});
|
| 165 |
+
}
|
| 166 |
+
if (process.env.NODE_ENV !== 'production') {
|
| 167 |
+
if (Object.keys(props).length === 0 && !ctx.ctx) {
|
| 168 |
+
console.warn("" + getDisplayName(App) + " returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps");
|
| 169 |
+
}
|
| 170 |
+
}
|
| 171 |
+
return props;
|
| 172 |
+
}
|
| 173 |
+
const SP = typeof performance !== 'undefined';
|
| 174 |
+
const ST = SP && [
|
| 175 |
+
'mark',
|
| 176 |
+
'measure',
|
| 177 |
+
'getEntriesByName'
|
| 178 |
+
].every((method)=>typeof performance[method] === 'function');
|
| 179 |
+
class DecodeError extends Error {
|
| 180 |
+
}
|
| 181 |
+
class NormalizeError extends Error {
|
| 182 |
+
}
|
| 183 |
+
class PageNotFoundError extends Error {
|
| 184 |
+
constructor(page){
|
| 185 |
+
super();
|
| 186 |
+
this.code = 'ENOENT';
|
| 187 |
+
this.name = 'PageNotFoundError';
|
| 188 |
+
this.message = "Cannot find module for page: " + page;
|
| 189 |
+
}
|
| 190 |
+
}
|
| 191 |
+
class MissingStaticPage extends Error {
|
| 192 |
+
constructor(page, message){
|
| 193 |
+
super();
|
| 194 |
+
this.message = "Failed to load static file for page: " + page + " " + message;
|
| 195 |
+
}
|
| 196 |
+
}
|
| 197 |
+
class MiddlewareNotFoundError extends Error {
|
| 198 |
+
constructor(){
|
| 199 |
+
super();
|
| 200 |
+
this.code = 'ENOENT';
|
| 201 |
+
this.message = "Cannot find the middleware module";
|
| 202 |
+
}
|
| 203 |
+
}
|
| 204 |
+
function stringifyError(error) {
|
| 205 |
+
return JSON.stringify({
|
| 206 |
+
message: error.message,
|
| 207 |
+
stack: error.stack
|
| 208 |
+
});
|
| 209 |
+
}
|
| 210 |
+
|
| 211 |
+
//# sourceMappingURL=utils.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/utils/warn-once.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
Object.defineProperty(exports, "warnOnce", {
|
| 6 |
+
enumerable: true,
|
| 7 |
+
get: function() {
|
| 8 |
+
return warnOnce;
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
let warnOnce = (_)=>{};
|
| 12 |
+
if (process.env.NODE_ENV !== 'production') {
|
| 13 |
+
const warnings = new Set();
|
| 14 |
+
warnOnce = (msg)=>{
|
| 15 |
+
if (!warnings.has(msg)) {
|
| 16 |
+
console.warn(msg);
|
| 17 |
+
}
|
| 18 |
+
warnings.add(msg);
|
| 19 |
+
};
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
//# sourceMappingURL=warn-once.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/shared/lib/zod.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
0 && (module.exports = {
|
| 6 |
+
formatZodError: null,
|
| 7 |
+
normalizeZodErrors: null,
|
| 8 |
+
reportZodError: null
|
| 9 |
+
});
|
| 10 |
+
function _export(target, all) {
|
| 11 |
+
for(var name in all)Object.defineProperty(target, name, {
|
| 12 |
+
enumerable: true,
|
| 13 |
+
get: all[name]
|
| 14 |
+
});
|
| 15 |
+
}
|
| 16 |
+
_export(exports, {
|
| 17 |
+
formatZodError: function() {
|
| 18 |
+
return formatZodError;
|
| 19 |
+
},
|
| 20 |
+
normalizeZodErrors: function() {
|
| 21 |
+
return normalizeZodErrors;
|
| 22 |
+
},
|
| 23 |
+
reportZodError: function() {
|
| 24 |
+
return reportZodError;
|
| 25 |
+
}
|
| 26 |
+
});
|
| 27 |
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
| 28 |
+
const _zod = require("next/dist/compiled/zod");
|
| 29 |
+
const _zodvalidationerror = require("next/dist/compiled/zod-validation-error");
|
| 30 |
+
const _log = /*#__PURE__*/ _interop_require_wildcard._(require("../../build/output/log"));
|
| 31 |
+
function processZodErrorMessage(issue) {
|
| 32 |
+
let message = issue.message;
|
| 33 |
+
let path;
|
| 34 |
+
if (issue.path.length > 0) {
|
| 35 |
+
if (issue.path.length === 1) {
|
| 36 |
+
const identifier = issue.path[0];
|
| 37 |
+
if (typeof identifier === 'number') {
|
| 38 |
+
// The first identifier inside path is a number
|
| 39 |
+
path = "index " + identifier;
|
| 40 |
+
} else {
|
| 41 |
+
path = '"' + identifier + '"';
|
| 42 |
+
}
|
| 43 |
+
} else {
|
| 44 |
+
// joined path to be shown in the error message
|
| 45 |
+
path = '"' + issue.path.reduce((acc, cur)=>{
|
| 46 |
+
if (typeof cur === 'number') {
|
| 47 |
+
// array index
|
| 48 |
+
return acc + "[" + cur + "]";
|
| 49 |
+
}
|
| 50 |
+
if (cur.includes('"')) {
|
| 51 |
+
// escape quotes
|
| 52 |
+
return acc + '["' + cur.replaceAll('"', '\\"') + '"]';
|
| 53 |
+
}
|
| 54 |
+
// dot notation
|
| 55 |
+
const separator = acc.length === 0 ? '' : '.';
|
| 56 |
+
return acc + separator + cur;
|
| 57 |
+
}, '') + '"';
|
| 58 |
+
}
|
| 59 |
+
} else {
|
| 60 |
+
path = '';
|
| 61 |
+
}
|
| 62 |
+
if (issue.code === 'invalid_type' && issue.received === _zod.ZodParsedType.undefined) {
|
| 63 |
+
// Missing key in object.
|
| 64 |
+
return path + " is missing, expected " + issue.expected;
|
| 65 |
+
}
|
| 66 |
+
if (issue.code === 'invalid_enum_value') {
|
| 67 |
+
// Remove "Invalid enum value" prefix from zod default error message
|
| 68 |
+
return "Expected " + _zod.util.joinValues(issue.options) + ", received '" + issue.received + "' at " + path;
|
| 69 |
+
}
|
| 70 |
+
return message + (path ? " at " + path : '');
|
| 71 |
+
}
|
| 72 |
+
function normalizeZodErrors(error) {
|
| 73 |
+
return error.issues.flatMap((issue)=>{
|
| 74 |
+
const issues = [
|
| 75 |
+
{
|
| 76 |
+
issue,
|
| 77 |
+
message: processZodErrorMessage(issue)
|
| 78 |
+
}
|
| 79 |
+
];
|
| 80 |
+
if ('unionErrors' in issue) {
|
| 81 |
+
for (const unionError of issue.unionErrors){
|
| 82 |
+
issues.push(...normalizeZodErrors(unionError));
|
| 83 |
+
}
|
| 84 |
+
}
|
| 85 |
+
return issues;
|
| 86 |
+
});
|
| 87 |
+
}
|
| 88 |
+
function formatZodError(prefix, error) {
|
| 89 |
+
return Object.defineProperty(new Error((0, _zodvalidationerror.fromZodError)(error, {
|
| 90 |
+
prefix: prefix
|
| 91 |
+
}).toString()), "__NEXT_ERROR_CODE", {
|
| 92 |
+
value: "E394",
|
| 93 |
+
enumerable: false,
|
| 94 |
+
configurable: true
|
| 95 |
+
});
|
| 96 |
+
}
|
| 97 |
+
function reportZodError(prefix, error) {
|
| 98 |
+
_log.error(formatZodError(prefix, error).message);
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
//# sourceMappingURL=zod.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/anonymous-meta.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
Object.defineProperty(exports, "getAnonymousMeta", {
|
| 6 |
+
enumerable: true,
|
| 7 |
+
get: function() {
|
| 8 |
+
return getAnonymousMeta;
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
const _isdocker = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/is-docker"));
|
| 12 |
+
const _iswsl = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/is-wsl"));
|
| 13 |
+
const _os = /*#__PURE__*/ _interop_require_default(require("os"));
|
| 14 |
+
const _ciinfo = /*#__PURE__*/ _interop_require_wildcard(require("../server/ci-info"));
|
| 15 |
+
function _interop_require_default(obj) {
|
| 16 |
+
return obj && obj.__esModule ? obj : {
|
| 17 |
+
default: obj
|
| 18 |
+
};
|
| 19 |
+
}
|
| 20 |
+
function _getRequireWildcardCache(nodeInterop) {
|
| 21 |
+
if (typeof WeakMap !== "function") return null;
|
| 22 |
+
var cacheBabelInterop = new WeakMap();
|
| 23 |
+
var cacheNodeInterop = new WeakMap();
|
| 24 |
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
| 25 |
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
| 26 |
+
})(nodeInterop);
|
| 27 |
+
}
|
| 28 |
+
function _interop_require_wildcard(obj, nodeInterop) {
|
| 29 |
+
if (!nodeInterop && obj && obj.__esModule) {
|
| 30 |
+
return obj;
|
| 31 |
+
}
|
| 32 |
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
| 33 |
+
return {
|
| 34 |
+
default: obj
|
| 35 |
+
};
|
| 36 |
+
}
|
| 37 |
+
var cache = _getRequireWildcardCache(nodeInterop);
|
| 38 |
+
if (cache && cache.has(obj)) {
|
| 39 |
+
return cache.get(obj);
|
| 40 |
+
}
|
| 41 |
+
var newObj = {
|
| 42 |
+
__proto__: null
|
| 43 |
+
};
|
| 44 |
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
| 45 |
+
for(var key in obj){
|
| 46 |
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
| 47 |
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
| 48 |
+
if (desc && (desc.get || desc.set)) {
|
| 49 |
+
Object.defineProperty(newObj, key, desc);
|
| 50 |
+
} else {
|
| 51 |
+
newObj[key] = obj[key];
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
}
|
| 55 |
+
newObj.default = obj;
|
| 56 |
+
if (cache) {
|
| 57 |
+
cache.set(obj, newObj);
|
| 58 |
+
}
|
| 59 |
+
return newObj;
|
| 60 |
+
}
|
| 61 |
+
let traits;
|
| 62 |
+
function getAnonymousMeta() {
|
| 63 |
+
if (traits) {
|
| 64 |
+
return traits;
|
| 65 |
+
}
|
| 66 |
+
const cpus = _os.default.cpus() || [];
|
| 67 |
+
const { NOW_REGION } = process.env;
|
| 68 |
+
traits = {
|
| 69 |
+
// Software information
|
| 70 |
+
systemPlatform: _os.default.platform(),
|
| 71 |
+
systemRelease: _os.default.release(),
|
| 72 |
+
systemArchitecture: _os.default.arch(),
|
| 73 |
+
// Machine information
|
| 74 |
+
cpuCount: cpus.length,
|
| 75 |
+
cpuModel: cpus.length ? cpus[0].model : null,
|
| 76 |
+
cpuSpeed: cpus.length ? cpus[0].speed : null,
|
| 77 |
+
memoryInMb: Math.trunc(_os.default.totalmem() / Math.pow(1024, 2)),
|
| 78 |
+
// Environment information
|
| 79 |
+
isDocker: (0, _isdocker.default)(),
|
| 80 |
+
isNowDev: NOW_REGION === 'dev1',
|
| 81 |
+
isWsl: _iswsl.default,
|
| 82 |
+
isCI: _ciinfo.isCI,
|
| 83 |
+
ciName: _ciinfo.isCI && _ciinfo.name || null,
|
| 84 |
+
nextVersion: "15.4.3"
|
| 85 |
+
};
|
| 86 |
+
return traits;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
//# sourceMappingURL=anonymous-meta.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/detached-flush.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
| 6 |
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
| 7 |
+
const _storage = require("./storage");
|
| 8 |
+
const _config = /*#__PURE__*/ _interop_require_default(require("../server/config"));
|
| 9 |
+
const _getprojectdir = require("../lib/get-project-dir");
|
| 10 |
+
const _constants = require("../shared/lib/constants");
|
| 11 |
+
function _interop_require_default(obj) {
|
| 12 |
+
return obj && obj.__esModule ? obj : {
|
| 13 |
+
default: obj
|
| 14 |
+
};
|
| 15 |
+
}
|
| 16 |
+
(async ()=>{
|
| 17 |
+
const args = [
|
| 18 |
+
...process.argv
|
| 19 |
+
];
|
| 20 |
+
let dir = args.pop();
|
| 21 |
+
const mode = args.pop();
|
| 22 |
+
if (!dir || mode !== 'dev') {
|
| 23 |
+
throw Object.defineProperty(new Error(`Invalid flags should be run as node detached-flush dev ./path-to/project`), "__NEXT_ERROR_CODE", {
|
| 24 |
+
value: "E24",
|
| 25 |
+
enumerable: false,
|
| 26 |
+
configurable: true
|
| 27 |
+
});
|
| 28 |
+
}
|
| 29 |
+
dir = (0, _getprojectdir.getProjectDir)(dir);
|
| 30 |
+
const config = await (0, _config.default)(_constants.PHASE_DEVELOPMENT_SERVER, dir);
|
| 31 |
+
const distDir = _path.default.join(dir, config.distDir || '.next');
|
| 32 |
+
const eventsPath = _path.default.join(distDir, '_events.json');
|
| 33 |
+
let events;
|
| 34 |
+
try {
|
| 35 |
+
events = JSON.parse(_fs.default.readFileSync(eventsPath, 'utf8'));
|
| 36 |
+
} catch (err) {
|
| 37 |
+
if (err.code === 'ENOENT') {
|
| 38 |
+
// no events to process we can exit now
|
| 39 |
+
process.exit(0);
|
| 40 |
+
}
|
| 41 |
+
throw err;
|
| 42 |
+
}
|
| 43 |
+
const telemetry = new _storage.Telemetry({
|
| 44 |
+
distDir
|
| 45 |
+
});
|
| 46 |
+
await telemetry.record(events);
|
| 47 |
+
await telemetry.flush();
|
| 48 |
+
// finished flushing events clean-up/exit
|
| 49 |
+
_fs.default.unlinkSync(eventsPath);
|
| 50 |
+
process.exit(0);
|
| 51 |
+
})();
|
| 52 |
+
|
| 53 |
+
//# sourceMappingURL=detached-flush.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/build.js
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
0 && (module.exports = {
|
| 6 |
+
ERROR_THROWN_EVENT: null,
|
| 7 |
+
EVENT_BUILD_FEATURE_USAGE: null,
|
| 8 |
+
EVENT_NAME_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS: null,
|
| 9 |
+
eventBuildCompleted: null,
|
| 10 |
+
eventBuildFailed: null,
|
| 11 |
+
eventBuildFeatureUsage: null,
|
| 12 |
+
eventBuildOptimize: null,
|
| 13 |
+
eventErrorThrown: null,
|
| 14 |
+
eventLintCheckCompleted: null,
|
| 15 |
+
eventPackageUsedInGetServerSideProps: null,
|
| 16 |
+
eventTypeCheckCompleted: null
|
| 17 |
+
});
|
| 18 |
+
function _export(target, all) {
|
| 19 |
+
for(var name in all)Object.defineProperty(target, name, {
|
| 20 |
+
enumerable: true,
|
| 21 |
+
get: all[name]
|
| 22 |
+
});
|
| 23 |
+
}
|
| 24 |
+
_export(exports, {
|
| 25 |
+
ERROR_THROWN_EVENT: function() {
|
| 26 |
+
return ERROR_THROWN_EVENT;
|
| 27 |
+
},
|
| 28 |
+
EVENT_BUILD_FEATURE_USAGE: function() {
|
| 29 |
+
return EVENT_BUILD_FEATURE_USAGE;
|
| 30 |
+
},
|
| 31 |
+
EVENT_NAME_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS: function() {
|
| 32 |
+
return EVENT_NAME_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS;
|
| 33 |
+
},
|
| 34 |
+
eventBuildCompleted: function() {
|
| 35 |
+
return eventBuildCompleted;
|
| 36 |
+
},
|
| 37 |
+
eventBuildFailed: function() {
|
| 38 |
+
return eventBuildFailed;
|
| 39 |
+
},
|
| 40 |
+
eventBuildFeatureUsage: function() {
|
| 41 |
+
return eventBuildFeatureUsage;
|
| 42 |
+
},
|
| 43 |
+
eventBuildOptimize: function() {
|
| 44 |
+
return eventBuildOptimize;
|
| 45 |
+
},
|
| 46 |
+
eventErrorThrown: function() {
|
| 47 |
+
return eventErrorThrown;
|
| 48 |
+
},
|
| 49 |
+
eventLintCheckCompleted: function() {
|
| 50 |
+
return eventLintCheckCompleted;
|
| 51 |
+
},
|
| 52 |
+
eventPackageUsedInGetServerSideProps: function() {
|
| 53 |
+
return eventPackageUsedInGetServerSideProps;
|
| 54 |
+
},
|
| 55 |
+
eventTypeCheckCompleted: function() {
|
| 56 |
+
return eventTypeCheckCompleted;
|
| 57 |
+
}
|
| 58 |
+
});
|
| 59 |
+
const _errortelemetryutils = require("../../lib/error-telemetry-utils");
|
| 60 |
+
const REGEXP_DIRECTORY_DUNDER = /[\\/]__[^\\/]+(?<![\\/]__(?:tests|mocks))__[\\/]/i;
|
| 61 |
+
const REGEXP_DIRECTORY_TESTS = /[\\/]__(tests|mocks)__[\\/]/i;
|
| 62 |
+
const REGEXP_FILE_TEST = /\.(?:spec|test)\.[^.]+$/i;
|
| 63 |
+
const EVENT_TYPE_CHECK_COMPLETED = 'NEXT_TYPE_CHECK_COMPLETED';
|
| 64 |
+
function eventTypeCheckCompleted(event) {
|
| 65 |
+
return {
|
| 66 |
+
eventName: EVENT_TYPE_CHECK_COMPLETED,
|
| 67 |
+
payload: event
|
| 68 |
+
};
|
| 69 |
+
}
|
| 70 |
+
const EVENT_LINT_CHECK_COMPLETED = 'NEXT_LINT_CHECK_COMPLETED';
|
| 71 |
+
function eventLintCheckCompleted(event) {
|
| 72 |
+
return {
|
| 73 |
+
eventName: EVENT_LINT_CHECK_COMPLETED,
|
| 74 |
+
payload: event
|
| 75 |
+
};
|
| 76 |
+
}
|
| 77 |
+
const EVENT_BUILD_COMPLETED = 'NEXT_BUILD_COMPLETED';
|
| 78 |
+
function eventBuildCompleted(pagePaths, event) {
|
| 79 |
+
return {
|
| 80 |
+
eventName: EVENT_BUILD_COMPLETED,
|
| 81 |
+
payload: {
|
| 82 |
+
...event,
|
| 83 |
+
totalPageCount: pagePaths.length,
|
| 84 |
+
hasDunderPages: pagePaths.some((path)=>REGEXP_DIRECTORY_DUNDER.test(path)),
|
| 85 |
+
hasTestPages: pagePaths.some((path)=>REGEXP_DIRECTORY_TESTS.test(path) || REGEXP_FILE_TEST.test(path)),
|
| 86 |
+
totalAppPagesCount: event.totalAppPagesCount
|
| 87 |
+
}
|
| 88 |
+
};
|
| 89 |
+
}
|
| 90 |
+
const EVENT_BUILD_FAILED = 'NEXT_BUILD_FAILED';
|
| 91 |
+
function eventBuildFailed(event) {
|
| 92 |
+
return {
|
| 93 |
+
eventName: EVENT_BUILD_FAILED,
|
| 94 |
+
payload: event
|
| 95 |
+
};
|
| 96 |
+
}
|
| 97 |
+
const EVENT_BUILD_OPTIMIZED = 'NEXT_BUILD_OPTIMIZED';
|
| 98 |
+
function eventBuildOptimize(pagePaths, event) {
|
| 99 |
+
return {
|
| 100 |
+
eventName: EVENT_BUILD_OPTIMIZED,
|
| 101 |
+
payload: {
|
| 102 |
+
...event,
|
| 103 |
+
totalPageCount: pagePaths.length,
|
| 104 |
+
hasDunderPages: pagePaths.some((path)=>REGEXP_DIRECTORY_DUNDER.test(path)),
|
| 105 |
+
hasTestPages: pagePaths.some((path)=>REGEXP_DIRECTORY_TESTS.test(path) || REGEXP_FILE_TEST.test(path)),
|
| 106 |
+
totalAppPagesCount: event.totalAppPagesCount,
|
| 107 |
+
staticAppPagesCount: event.staticAppPagesCount,
|
| 108 |
+
serverAppPagesCount: event.serverAppPagesCount,
|
| 109 |
+
edgeRuntimeAppCount: event.edgeRuntimeAppCount,
|
| 110 |
+
edgeRuntimePagesCount: event.edgeRuntimePagesCount,
|
| 111 |
+
isRspack: process.env.NEXT_RSPACK !== undefined
|
| 112 |
+
}
|
| 113 |
+
};
|
| 114 |
+
}
|
| 115 |
+
const EVENT_BUILD_FEATURE_USAGE = 'NEXT_BUILD_FEATURE_USAGE';
|
| 116 |
+
function eventBuildFeatureUsage(usages) {
|
| 117 |
+
return usages.map(({ featureName, invocationCount })=>({
|
| 118 |
+
eventName: EVENT_BUILD_FEATURE_USAGE,
|
| 119 |
+
payload: {
|
| 120 |
+
featureName,
|
| 121 |
+
invocationCount
|
| 122 |
+
}
|
| 123 |
+
}));
|
| 124 |
+
}
|
| 125 |
+
const EVENT_NAME_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS = 'NEXT_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS';
|
| 126 |
+
function eventPackageUsedInGetServerSideProps(packagesUsedInServerSideProps) {
|
| 127 |
+
return packagesUsedInServerSideProps.map((packageName)=>({
|
| 128 |
+
eventName: EVENT_NAME_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS,
|
| 129 |
+
payload: {
|
| 130 |
+
package: packageName
|
| 131 |
+
}
|
| 132 |
+
}));
|
| 133 |
+
}
|
| 134 |
+
const ERROR_THROWN_EVENT = 'NEXT_ERROR_THROWN';
|
| 135 |
+
function eventErrorThrown(error) {
|
| 136 |
+
return {
|
| 137 |
+
eventName: ERROR_THROWN_EVENT,
|
| 138 |
+
payload: {
|
| 139 |
+
errorCode: (0, _errortelemetryutils.extractNextErrorCode)(error) || 'Unknown'
|
| 140 |
+
}
|
| 141 |
+
};
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
//# sourceMappingURL=build.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/error-feedback.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
0 && (module.exports = {
|
| 6 |
+
eventErrorFeedback: null,
|
| 7 |
+
eventNameErrorFeedback: null
|
| 8 |
+
});
|
| 9 |
+
function _export(target, all) {
|
| 10 |
+
for(var name in all)Object.defineProperty(target, name, {
|
| 11 |
+
enumerable: true,
|
| 12 |
+
get: all[name]
|
| 13 |
+
});
|
| 14 |
+
}
|
| 15 |
+
_export(exports, {
|
| 16 |
+
eventErrorFeedback: function() {
|
| 17 |
+
return eventErrorFeedback;
|
| 18 |
+
},
|
| 19 |
+
eventNameErrorFeedback: function() {
|
| 20 |
+
return eventNameErrorFeedback;
|
| 21 |
+
}
|
| 22 |
+
});
|
| 23 |
+
const eventNameErrorFeedback = 'NEXT_ERROR_FEEDBACK';
|
| 24 |
+
function eventErrorFeedback(event) {
|
| 25 |
+
return {
|
| 26 |
+
eventName: eventNameErrorFeedback,
|
| 27 |
+
payload: event
|
| 28 |
+
};
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
//# sourceMappingURL=error-feedback.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
0 && __export(require("./version")) && __export(require("./build")) && __export(require("./plugins"));
|
| 6 |
+
_export_star(require("./version"), exports);
|
| 7 |
+
_export_star(require("./build"), exports);
|
| 8 |
+
_export_star(require("./plugins"), exports);
|
| 9 |
+
function _export_star(from, to) {
|
| 10 |
+
Object.keys(from).forEach(function(k) {
|
| 11 |
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
| 12 |
+
Object.defineProperty(to, k, {
|
| 13 |
+
enumerable: true,
|
| 14 |
+
get: function() {
|
| 15 |
+
return from[k];
|
| 16 |
+
}
|
| 17 |
+
});
|
| 18 |
+
}
|
| 19 |
+
});
|
| 20 |
+
return from;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
//# sourceMappingURL=index.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/plugins.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
Object.defineProperty(exports, "eventNextPlugins", {
|
| 6 |
+
enumerable: true,
|
| 7 |
+
get: function() {
|
| 8 |
+
return eventNextPlugins;
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
const _findup = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/find-up"));
|
| 12 |
+
function _interop_require_default(obj) {
|
| 13 |
+
return obj && obj.__esModule ? obj : {
|
| 14 |
+
default: obj
|
| 15 |
+
};
|
| 16 |
+
}
|
| 17 |
+
const EVENT_PLUGIN_PRESENT = 'NEXT_PACKAGE_DETECTED';
|
| 18 |
+
async function eventNextPlugins(dir) {
|
| 19 |
+
try {
|
| 20 |
+
const packageJsonPath = await (0, _findup.default)('package.json', {
|
| 21 |
+
cwd: dir
|
| 22 |
+
});
|
| 23 |
+
if (!packageJsonPath) {
|
| 24 |
+
return [];
|
| 25 |
+
}
|
| 26 |
+
const { dependencies = {}, devDependencies = {} } = require(packageJsonPath);
|
| 27 |
+
const deps = {
|
| 28 |
+
...devDependencies,
|
| 29 |
+
...dependencies
|
| 30 |
+
};
|
| 31 |
+
return Object.keys(deps).reduce((events, plugin)=>{
|
| 32 |
+
const version = deps[plugin];
|
| 33 |
+
// Don't add deps without a version set
|
| 34 |
+
if (!version) {
|
| 35 |
+
return events;
|
| 36 |
+
}
|
| 37 |
+
events.push({
|
| 38 |
+
eventName: EVENT_PLUGIN_PRESENT,
|
| 39 |
+
payload: {
|
| 40 |
+
packageName: plugin,
|
| 41 |
+
packageVersion: version
|
| 42 |
+
}
|
| 43 |
+
});
|
| 44 |
+
return events;
|
| 45 |
+
}, []);
|
| 46 |
+
} catch (_) {
|
| 47 |
+
return [];
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
//# sourceMappingURL=plugins.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/swc-load-failure.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
Object.defineProperty(exports, "eventSwcLoadFailure", {
|
| 6 |
+
enumerable: true,
|
| 7 |
+
get: function() {
|
| 8 |
+
return eventSwcLoadFailure;
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
const _shared = require("../../trace/shared");
|
| 12 |
+
const _packagejson = require("next/package.json");
|
| 13 |
+
const EVENT_PLUGIN_PRESENT = 'NEXT_SWC_LOAD_FAILURE';
|
| 14 |
+
async function eventSwcLoadFailure(event) {
|
| 15 |
+
const telemetry = _shared.traceGlobals.get('telemetry');
|
| 16 |
+
// can't continue if telemetry isn't set
|
| 17 |
+
if (!telemetry) return;
|
| 18 |
+
let glibcVersion;
|
| 19 |
+
let installedSwcPackages;
|
| 20 |
+
try {
|
| 21 |
+
var _process_report;
|
| 22 |
+
// @ts-ignore
|
| 23 |
+
glibcVersion = (_process_report = process.report) == null ? void 0 : _process_report.getReport().header.glibcVersionRuntime;
|
| 24 |
+
} catch {}
|
| 25 |
+
try {
|
| 26 |
+
const pkgNames = Object.keys(_packagejson.optionalDependencies || {}).filter((pkg)=>pkg.startsWith('@next/swc'));
|
| 27 |
+
const installedPkgs = [];
|
| 28 |
+
for (const pkg of pkgNames){
|
| 29 |
+
try {
|
| 30 |
+
const { version } = require(`${pkg}/package.json`);
|
| 31 |
+
installedPkgs.push(`${pkg}@${version}`);
|
| 32 |
+
} catch {}
|
| 33 |
+
}
|
| 34 |
+
if (installedPkgs.length > 0) {
|
| 35 |
+
installedSwcPackages = installedPkgs.sort().join(',');
|
| 36 |
+
}
|
| 37 |
+
} catch {}
|
| 38 |
+
telemetry.record({
|
| 39 |
+
eventName: EVENT_PLUGIN_PRESENT,
|
| 40 |
+
payload: {
|
| 41 |
+
nextVersion: _packagejson.version,
|
| 42 |
+
glibcVersion,
|
| 43 |
+
installedSwcPackages,
|
| 44 |
+
arch: process.arch,
|
| 45 |
+
platform: process.platform,
|
| 46 |
+
nodeVersion: process.versions.node,
|
| 47 |
+
wasm: event == null ? void 0 : event.wasm,
|
| 48 |
+
nativeBindingsErrorCode: event == null ? void 0 : event.nativeBindingsErrorCode
|
| 49 |
+
}
|
| 50 |
+
});
|
| 51 |
+
// ensure this event is flushed before process exits
|
| 52 |
+
await telemetry.flush();
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
//# sourceMappingURL=swc-load-failure.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/events/version.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
Object.defineProperty(exports, "eventCliSession", {
|
| 6 |
+
enumerable: true,
|
| 7 |
+
get: function() {
|
| 8 |
+
return eventCliSession;
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
| 12 |
+
function _interop_require_default(obj) {
|
| 13 |
+
return obj && obj.__esModule ? obj : {
|
| 14 |
+
default: obj
|
| 15 |
+
};
|
| 16 |
+
}
|
| 17 |
+
const EVENT_VERSION = 'NEXT_CLI_SESSION_STARTED';
|
| 18 |
+
function hasBabelConfig(dir) {
|
| 19 |
+
try {
|
| 20 |
+
var _res_options_presets, _res_options, _res_options_plugins, _res_options1;
|
| 21 |
+
const noopFile = _path.default.join(dir, 'noop.js');
|
| 22 |
+
const res = require('next/dist/compiled/babel/core').loadPartialConfig({
|
| 23 |
+
cwd: dir,
|
| 24 |
+
filename: noopFile,
|
| 25 |
+
sourceFileName: noopFile
|
| 26 |
+
});
|
| 27 |
+
const isForTooling = ((_res_options = res.options) == null ? void 0 : (_res_options_presets = _res_options.presets) == null ? void 0 : _res_options_presets.every((e)=>{
|
| 28 |
+
var _e_file;
|
| 29 |
+
return (e == null ? void 0 : (_e_file = e.file) == null ? void 0 : _e_file.request) === 'next/babel';
|
| 30 |
+
})) && ((_res_options1 = res.options) == null ? void 0 : (_res_options_plugins = _res_options1.plugins) == null ? void 0 : _res_options_plugins.length) === 0;
|
| 31 |
+
return res.hasFilesystemConfig() && !isForTooling;
|
| 32 |
+
} catch {
|
| 33 |
+
return false;
|
| 34 |
+
}
|
| 35 |
+
}
|
| 36 |
+
function eventCliSession(dir, nextConfig, event) {
|
| 37 |
+
var _nextConfig_experimental_staleTimes, _nextConfig_experimental_staleTimes1, _nextConfig_experimental_reactCompiler, _nextConfig_experimental_reactCompiler1;
|
| 38 |
+
// This should be an invariant, if it fails our build tooling is broken.
|
| 39 |
+
if (typeof "15.4.3" !== 'string') {
|
| 40 |
+
return [];
|
| 41 |
+
}
|
| 42 |
+
const { images, i18n } = nextConfig || {};
|
| 43 |
+
const payload = {
|
| 44 |
+
nextVersion: "15.4.3",
|
| 45 |
+
nodeVersion: process.version,
|
| 46 |
+
cliCommand: event.cliCommand,
|
| 47 |
+
isSrcDir: event.isSrcDir,
|
| 48 |
+
hasNowJson: event.hasNowJson,
|
| 49 |
+
isCustomServer: event.isCustomServer,
|
| 50 |
+
hasNextConfig: nextConfig.configOrigin !== 'default',
|
| 51 |
+
buildTarget: 'default',
|
| 52 |
+
hasWebpackConfig: typeof (nextConfig == null ? void 0 : nextConfig.webpack) === 'function',
|
| 53 |
+
hasBabelConfig: hasBabelConfig(dir),
|
| 54 |
+
imageEnabled: !!images,
|
| 55 |
+
imageFutureEnabled: !!images,
|
| 56 |
+
basePathEnabled: !!(nextConfig == null ? void 0 : nextConfig.basePath),
|
| 57 |
+
i18nEnabled: !!i18n,
|
| 58 |
+
locales: (i18n == null ? void 0 : i18n.locales) ? i18n.locales.join(',') : null,
|
| 59 |
+
localeDomainsCount: (i18n == null ? void 0 : i18n.domains) ? i18n.domains.length : null,
|
| 60 |
+
localeDetectionEnabled: !i18n ? null : i18n.localeDetection !== false,
|
| 61 |
+
imageDomainsCount: (images == null ? void 0 : images.domains) ? images.domains.length : null,
|
| 62 |
+
imageRemotePatternsCount: (images == null ? void 0 : images.remotePatterns) ? images.remotePatterns.length : null,
|
| 63 |
+
imageLocalPatternsCount: (images == null ? void 0 : images.localPatterns) ? images.localPatterns.length : null,
|
| 64 |
+
imageSizes: (images == null ? void 0 : images.imageSizes) ? images.imageSizes.join(',') : null,
|
| 65 |
+
imageQualities: (images == null ? void 0 : images.qualities) ? images.qualities.join(',') : null,
|
| 66 |
+
imageLoader: images == null ? void 0 : images.loader,
|
| 67 |
+
imageFormats: (images == null ? void 0 : images.formats) ? images.formats.join(',') : null,
|
| 68 |
+
nextConfigOutput: (nextConfig == null ? void 0 : nextConfig.output) || null,
|
| 69 |
+
trailingSlashEnabled: !!(nextConfig == null ? void 0 : nextConfig.trailingSlash),
|
| 70 |
+
reactStrictMode: !!(nextConfig == null ? void 0 : nextConfig.reactStrictMode),
|
| 71 |
+
webpackVersion: event.webpackVersion || null,
|
| 72 |
+
turboFlag: event.turboFlag || false,
|
| 73 |
+
isRspack: process.env.NEXT_RSPACK !== undefined,
|
| 74 |
+
appDir: event.appDir,
|
| 75 |
+
pagesDir: event.pagesDir,
|
| 76 |
+
staticStaleTime: ((_nextConfig_experimental_staleTimes = nextConfig.experimental.staleTimes) == null ? void 0 : _nextConfig_experimental_staleTimes.static) ?? null,
|
| 77 |
+
dynamicStaleTime: ((_nextConfig_experimental_staleTimes1 = nextConfig.experimental.staleTimes) == null ? void 0 : _nextConfig_experimental_staleTimes1.dynamic) ?? null,
|
| 78 |
+
reactCompiler: Boolean(nextConfig.experimental.reactCompiler),
|
| 79 |
+
reactCompilerCompilationMode: typeof nextConfig.experimental.reactCompiler !== 'boolean' ? ((_nextConfig_experimental_reactCompiler = nextConfig.experimental.reactCompiler) == null ? void 0 : _nextConfig_experimental_reactCompiler.compilationMode) ?? null : null,
|
| 80 |
+
reactCompilerPanicThreshold: typeof nextConfig.experimental.reactCompiler !== 'boolean' ? ((_nextConfig_experimental_reactCompiler1 = nextConfig.experimental.reactCompiler) == null ? void 0 : _nextConfig_experimental_reactCompiler1.panicThreshold) ?? null : null
|
| 81 |
+
};
|
| 82 |
+
return [
|
| 83 |
+
{
|
| 84 |
+
eventName: EVENT_VERSION,
|
| 85 |
+
payload
|
| 86 |
+
}
|
| 87 |
+
];
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
//# sourceMappingURL=version.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/flush-and-exit.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
Object.defineProperty(exports, "flushAndExit", {
|
| 6 |
+
enumerable: true,
|
| 7 |
+
get: function() {
|
| 8 |
+
return flushAndExit;
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
const _shared = require("../trace/shared");
|
| 12 |
+
async function flushAndExit(code) {
|
| 13 |
+
let telemetry = _shared.traceGlobals.get('telemetry');
|
| 14 |
+
if (telemetry) {
|
| 15 |
+
await telemetry.flush();
|
| 16 |
+
}
|
| 17 |
+
process.exit(code);
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
//# sourceMappingURL=flush-and-exit.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/post-telemetry-payload.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
Object.defineProperty(exports, "postNextTelemetryPayload", {
|
| 6 |
+
enumerable: true,
|
| 7 |
+
get: function() {
|
| 8 |
+
return postNextTelemetryPayload;
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
const _asyncretry = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/async-retry"));
|
| 12 |
+
function _interop_require_default(obj) {
|
| 13 |
+
return obj && obj.__esModule ? obj : {
|
| 14 |
+
default: obj
|
| 15 |
+
};
|
| 16 |
+
}
|
| 17 |
+
function postNextTelemetryPayload(payload, signal) {
|
| 18 |
+
if (!signal && 'timeout' in AbortSignal) {
|
| 19 |
+
signal = AbortSignal.timeout(5000);
|
| 20 |
+
}
|
| 21 |
+
return (0, _asyncretry.default)(()=>fetch('https://telemetry.nextjs.org/api/v1/record', {
|
| 22 |
+
method: 'POST',
|
| 23 |
+
body: JSON.stringify(payload),
|
| 24 |
+
headers: {
|
| 25 |
+
'content-type': 'application/json'
|
| 26 |
+
},
|
| 27 |
+
signal
|
| 28 |
+
}).then((res)=>{
|
| 29 |
+
if (!res.ok) {
|
| 30 |
+
const err = Object.defineProperty(new Error(res.statusText), "__NEXT_ERROR_CODE", {
|
| 31 |
+
value: "E394",
|
| 32 |
+
enumerable: false,
|
| 33 |
+
configurable: true
|
| 34 |
+
});
|
| 35 |
+
err.response = res;
|
| 36 |
+
throw err;
|
| 37 |
+
}
|
| 38 |
+
}), {
|
| 39 |
+
minTimeout: 500,
|
| 40 |
+
retries: 1,
|
| 41 |
+
factor: 1
|
| 42 |
+
}).catch(()=>{
|
| 43 |
+
// We swallow errors when telemetry cannot be sent
|
| 44 |
+
})// Ensure promise is voided
|
| 45 |
+
.then(()=>{}, ()=>{});
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
//# sourceMappingURL=post-telemetry-payload.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/project-id.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
Object.defineProperty(exports, "getRawProjectId", {
|
| 6 |
+
enumerable: true,
|
| 7 |
+
get: function() {
|
| 8 |
+
return getRawProjectId;
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
const _child_process = require("child_process");
|
| 12 |
+
// Q: Why does Next.js need a project ID? Why is it looking at my git remote?
|
| 13 |
+
// A:
|
| 14 |
+
// Next.js' telemetry is and always will be completely anonymous. Because of
|
| 15 |
+
// this, we need a way to differentiate different projects to track feature
|
| 16 |
+
// usage accurately. For example, to prevent a feature from appearing to be
|
| 17 |
+
// constantly `used` and then `unused` when switching between local projects.
|
| 18 |
+
// To reiterate,
|
| 19 |
+
// we **never** can read your actual git remote. The value is hashed one-way
|
| 20 |
+
// with random salt data, making it impossible for us to reverse or try to
|
| 21 |
+
// guess the remote by re-computing hashes.
|
| 22 |
+
async function _getProjectIdByGit() {
|
| 23 |
+
try {
|
| 24 |
+
let resolve, reject;
|
| 25 |
+
const promise = new Promise((res, rej)=>{
|
| 26 |
+
resolve = res;
|
| 27 |
+
reject = rej;
|
| 28 |
+
});
|
| 29 |
+
(0, _child_process.exec)(`git config --local --get remote.origin.url`, {
|
| 30 |
+
timeout: 1000,
|
| 31 |
+
windowsHide: true
|
| 32 |
+
}, (error, stdout)=>{
|
| 33 |
+
if (error) {
|
| 34 |
+
reject(error);
|
| 35 |
+
return;
|
| 36 |
+
}
|
| 37 |
+
resolve(stdout);
|
| 38 |
+
});
|
| 39 |
+
return String(await promise).trim();
|
| 40 |
+
} catch (_) {
|
| 41 |
+
return null;
|
| 42 |
+
}
|
| 43 |
+
}
|
| 44 |
+
async function getRawProjectId() {
|
| 45 |
+
return await _getProjectIdByGit() || process.env.REPOSITORY_URL || process.cwd();
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
//# sourceMappingURL=project-id.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/telemetry/storage.js
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
Object.defineProperty(exports, "Telemetry", {
|
| 6 |
+
enumerable: true,
|
| 7 |
+
get: function() {
|
| 8 |
+
return Telemetry;
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
const _picocolors = require("../lib/picocolors");
|
| 12 |
+
const _conf = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/conf"));
|
| 13 |
+
const _crypto = require("crypto");
|
| 14 |
+
const _isdocker = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/is-docker"));
|
| 15 |
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
| 16 |
+
const _anonymousmeta = require("./anonymous-meta");
|
| 17 |
+
const _ciinfo = /*#__PURE__*/ _interop_require_wildcard(require("../server/ci-info"));
|
| 18 |
+
const _posttelemetrypayload = require("./post-telemetry-payload");
|
| 19 |
+
const _projectid = require("./project-id");
|
| 20 |
+
const _ponyfill = require("next/dist/compiled/@edge-runtime/ponyfill");
|
| 21 |
+
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
| 22 |
+
function _interop_require_default(obj) {
|
| 23 |
+
return obj && obj.__esModule ? obj : {
|
| 24 |
+
default: obj
|
| 25 |
+
};
|
| 26 |
+
}
|
| 27 |
+
function _getRequireWildcardCache(nodeInterop) {
|
| 28 |
+
if (typeof WeakMap !== "function") return null;
|
| 29 |
+
var cacheBabelInterop = new WeakMap();
|
| 30 |
+
var cacheNodeInterop = new WeakMap();
|
| 31 |
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
| 32 |
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
| 33 |
+
})(nodeInterop);
|
| 34 |
+
}
|
| 35 |
+
function _interop_require_wildcard(obj, nodeInterop) {
|
| 36 |
+
if (!nodeInterop && obj && obj.__esModule) {
|
| 37 |
+
return obj;
|
| 38 |
+
}
|
| 39 |
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
| 40 |
+
return {
|
| 41 |
+
default: obj
|
| 42 |
+
};
|
| 43 |
+
}
|
| 44 |
+
var cache = _getRequireWildcardCache(nodeInterop);
|
| 45 |
+
if (cache && cache.has(obj)) {
|
| 46 |
+
return cache.get(obj);
|
| 47 |
+
}
|
| 48 |
+
var newObj = {
|
| 49 |
+
__proto__: null
|
| 50 |
+
};
|
| 51 |
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
| 52 |
+
for(var key in obj){
|
| 53 |
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
| 54 |
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
| 55 |
+
if (desc && (desc.get || desc.set)) {
|
| 56 |
+
Object.defineProperty(newObj, key, desc);
|
| 57 |
+
} else {
|
| 58 |
+
newObj[key] = obj[key];
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
}
|
| 62 |
+
newObj.default = obj;
|
| 63 |
+
if (cache) {
|
| 64 |
+
cache.set(obj, newObj);
|
| 65 |
+
}
|
| 66 |
+
return newObj;
|
| 67 |
+
}
|
| 68 |
+
// This is the key that stores whether or not telemetry is enabled or disabled.
|
| 69 |
+
const TELEMETRY_KEY_ENABLED = 'telemetry.enabled';
|
| 70 |
+
// This is the key that specifies when the user was informed about anonymous
|
| 71 |
+
// telemetry collection.
|
| 72 |
+
const TELEMETRY_KEY_NOTIFY_DATE = 'telemetry.notifiedAt';
|
| 73 |
+
// This is a quasi-persistent identifier used to dedupe recurring events. It's
|
| 74 |
+
// generated from random data and completely anonymous.
|
| 75 |
+
const TELEMETRY_KEY_ID = `telemetry.anonymousId`;
|
| 76 |
+
// This is the cryptographic salt that is included within every hashed value.
|
| 77 |
+
// This salt value is never sent to us, ensuring privacy and the one-way nature
|
| 78 |
+
// of the hash (prevents dictionary lookups of pre-computed hashes).
|
| 79 |
+
// See the `oneWayHash` function.
|
| 80 |
+
const TELEMETRY_KEY_SALT = `telemetry.salt`;
|
| 81 |
+
function getStorageDirectory(distDir) {
|
| 82 |
+
const isLikelyEphemeral = _ciinfo.isCI || (0, _isdocker.default)();
|
| 83 |
+
if (isLikelyEphemeral) {
|
| 84 |
+
return _path.default.join(distDir, 'cache');
|
| 85 |
+
}
|
| 86 |
+
return undefined;
|
| 87 |
+
}
|
| 88 |
+
class Telemetry {
|
| 89 |
+
constructor({ distDir }){
|
| 90 |
+
this.notify = ()=>{
|
| 91 |
+
if (this.isDisabled || !this.conf) {
|
| 92 |
+
return;
|
| 93 |
+
}
|
| 94 |
+
// The end-user has already been notified about our telemetry integration. We
|
| 95 |
+
// don't need to constantly annoy them about it.
|
| 96 |
+
// We will re-inform users about the telemetry if significant changes are
|
| 97 |
+
// ever made.
|
| 98 |
+
if (this.conf.get(TELEMETRY_KEY_NOTIFY_DATE, '')) {
|
| 99 |
+
return;
|
| 100 |
+
}
|
| 101 |
+
this.conf.set(TELEMETRY_KEY_NOTIFY_DATE, Date.now().toString());
|
| 102 |
+
console.log(`${(0, _picocolors.magenta)((0, _picocolors.bold)('Attention'))}: Next.js now collects completely anonymous telemetry regarding usage.`);
|
| 103 |
+
console.log(`This information is used to shape Next.js' roadmap and prioritize features.`);
|
| 104 |
+
console.log(`You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:`);
|
| 105 |
+
console.log((0, _picocolors.cyan)('https://nextjs.org/telemetry'));
|
| 106 |
+
console.log();
|
| 107 |
+
};
|
| 108 |
+
this.setEnabled = (_enabled)=>{
|
| 109 |
+
const enabled = !!_enabled;
|
| 110 |
+
this.conf && this.conf.set(TELEMETRY_KEY_ENABLED, enabled);
|
| 111 |
+
return this.conf && this.conf.path;
|
| 112 |
+
};
|
| 113 |
+
this.oneWayHash = (payload)=>{
|
| 114 |
+
const hash = (0, _crypto.createHash)('sha256');
|
| 115 |
+
// Always prepend the payload value with salt. This ensures the hash is truly
|
| 116 |
+
// one-way.
|
| 117 |
+
hash.update(this.salt);
|
| 118 |
+
// Update is an append operation, not a replacement. The salt from the prior
|
| 119 |
+
// update is still present!
|
| 120 |
+
hash.update(payload);
|
| 121 |
+
return hash.digest('hex');
|
| 122 |
+
};
|
| 123 |
+
this.record = (_events, deferred)=>{
|
| 124 |
+
const prom = (deferred ? // flushDetached we can skip starting the initial
|
| 125 |
+
// submitRecord which will then be cancelled
|
| 126 |
+
new Promise((resolve)=>resolve({
|
| 127 |
+
isFulfilled: true,
|
| 128 |
+
isRejected: false,
|
| 129 |
+
value: _events
|
| 130 |
+
})) : this.submitRecord(_events)).then((value)=>({
|
| 131 |
+
isFulfilled: true,
|
| 132 |
+
isRejected: false,
|
| 133 |
+
value
|
| 134 |
+
})).catch((reason)=>({
|
| 135 |
+
isFulfilled: false,
|
| 136 |
+
isRejected: true,
|
| 137 |
+
reason
|
| 138 |
+
}))// Acts as `Promise#finally` because `catch` transforms the error
|
| 139 |
+
.then((res)=>{
|
| 140 |
+
// Clean up the event to prevent unbounded `Set` growth
|
| 141 |
+
if (!deferred) {
|
| 142 |
+
this.queue.delete(prom);
|
| 143 |
+
}
|
| 144 |
+
return res;
|
| 145 |
+
});
|
| 146 |
+
prom._events = Array.isArray(_events) ? _events : [
|
| 147 |
+
_events
|
| 148 |
+
];
|
| 149 |
+
prom._controller = prom._controller;
|
| 150 |
+
// Track this `Promise` so we can flush pending events
|
| 151 |
+
this.queue.add(prom);
|
| 152 |
+
return prom;
|
| 153 |
+
};
|
| 154 |
+
this.flush = async ()=>Promise.all(this.queue).catch(()=>null);
|
| 155 |
+
// writes current events to disk and spawns separate
|
| 156 |
+
// detached process to submit the records without blocking
|
| 157 |
+
// the main process from exiting
|
| 158 |
+
this.flushDetached = (mode, dir)=>{
|
| 159 |
+
const allEvents = [];
|
| 160 |
+
this.queue.forEach((item)=>{
|
| 161 |
+
try {
|
| 162 |
+
var _item__controller;
|
| 163 |
+
(_item__controller = item._controller) == null ? void 0 : _item__controller.abort();
|
| 164 |
+
allEvents.push(...item._events);
|
| 165 |
+
} catch (_) {
|
| 166 |
+
// if we fail to abort ignore this event
|
| 167 |
+
}
|
| 168 |
+
});
|
| 169 |
+
_fs.default.mkdirSync(this.distDir, {
|
| 170 |
+
recursive: true
|
| 171 |
+
});
|
| 172 |
+
_fs.default.writeFileSync(_path.default.join(this.distDir, '_events.json'), JSON.stringify(allEvents));
|
| 173 |
+
// Note: cross-spawn is not used here as it causes
|
| 174 |
+
// a new command window to appear when we don't want it to
|
| 175 |
+
const child_process = require('child_process');
|
| 176 |
+
// we use spawnSync when debugging to ensure logs are piped
|
| 177 |
+
// correctly to stdout/stderr
|
| 178 |
+
const spawn = this.NEXT_TELEMETRY_DEBUG ? child_process.spawnSync : child_process.spawn;
|
| 179 |
+
spawn(process.execPath, [
|
| 180 |
+
require.resolve('./detached-flush'),
|
| 181 |
+
mode,
|
| 182 |
+
dir
|
| 183 |
+
], {
|
| 184 |
+
detached: !this.NEXT_TELEMETRY_DEBUG,
|
| 185 |
+
windowsHide: true,
|
| 186 |
+
shell: false,
|
| 187 |
+
...this.NEXT_TELEMETRY_DEBUG ? {
|
| 188 |
+
stdio: 'inherit'
|
| 189 |
+
} : {}
|
| 190 |
+
});
|
| 191 |
+
};
|
| 192 |
+
this.submitRecord = async (_events)=>{
|
| 193 |
+
let events;
|
| 194 |
+
if (Array.isArray(_events)) {
|
| 195 |
+
events = _events;
|
| 196 |
+
} else {
|
| 197 |
+
events = [
|
| 198 |
+
_events
|
| 199 |
+
];
|
| 200 |
+
}
|
| 201 |
+
if (events.length < 1) {
|
| 202 |
+
return Promise.resolve();
|
| 203 |
+
}
|
| 204 |
+
if (this.NEXT_TELEMETRY_DEBUG) {
|
| 205 |
+
// Print to standard error to simplify selecting the output
|
| 206 |
+
events.forEach(({ eventName, payload })=>console.error(`[telemetry] ` + JSON.stringify({
|
| 207 |
+
eventName,
|
| 208 |
+
payload
|
| 209 |
+
}, null, 2)));
|
| 210 |
+
// Do not send the telemetry data if debugging. Users may use this feature
|
| 211 |
+
// to preview what data would be sent.
|
| 212 |
+
return Promise.resolve();
|
| 213 |
+
}
|
| 214 |
+
// Skip recording telemetry if the feature is disabled
|
| 215 |
+
if (this.isDisabled) {
|
| 216 |
+
return Promise.resolve();
|
| 217 |
+
}
|
| 218 |
+
const postController = new _ponyfill.AbortController();
|
| 219 |
+
const res = (0, _posttelemetrypayload.postNextTelemetryPayload)({
|
| 220 |
+
context: {
|
| 221 |
+
anonymousId: this.anonymousId,
|
| 222 |
+
projectId: await this.getProjectId(),
|
| 223 |
+
sessionId: this.sessionId
|
| 224 |
+
},
|
| 225 |
+
meta: (0, _anonymousmeta.getAnonymousMeta)(),
|
| 226 |
+
events: events.map(({ eventName, payload })=>({
|
| 227 |
+
eventName,
|
| 228 |
+
fields: payload
|
| 229 |
+
}))
|
| 230 |
+
}, postController.signal);
|
| 231 |
+
res._controller = postController;
|
| 232 |
+
return res;
|
| 233 |
+
};
|
| 234 |
+
// Read in the constructor so that .env can be loaded before reading
|
| 235 |
+
const { NEXT_TELEMETRY_DISABLED, NEXT_TELEMETRY_DEBUG } = process.env;
|
| 236 |
+
this.NEXT_TELEMETRY_DISABLED = NEXT_TELEMETRY_DISABLED;
|
| 237 |
+
this.NEXT_TELEMETRY_DEBUG = NEXT_TELEMETRY_DEBUG;
|
| 238 |
+
this.distDir = distDir;
|
| 239 |
+
const storageDirectory = getStorageDirectory(distDir);
|
| 240 |
+
try {
|
| 241 |
+
// `conf` incorrectly throws a permission error during initialization
|
| 242 |
+
// instead of waiting for first use. We need to handle it, otherwise the
|
| 243 |
+
// process may crash.
|
| 244 |
+
this.conf = new _conf.default({
|
| 245 |
+
projectName: 'nextjs',
|
| 246 |
+
cwd: storageDirectory
|
| 247 |
+
});
|
| 248 |
+
} catch (_) {
|
| 249 |
+
this.conf = null;
|
| 250 |
+
}
|
| 251 |
+
this.sessionId = (0, _crypto.randomBytes)(32).toString('hex');
|
| 252 |
+
this.queue = new Set();
|
| 253 |
+
this.notify();
|
| 254 |
+
}
|
| 255 |
+
get anonymousId() {
|
| 256 |
+
const val = this.conf && this.conf.get(TELEMETRY_KEY_ID);
|
| 257 |
+
if (val) {
|
| 258 |
+
return val;
|
| 259 |
+
}
|
| 260 |
+
const generated = (0, _crypto.randomBytes)(32).toString('hex');
|
| 261 |
+
this.conf && this.conf.set(TELEMETRY_KEY_ID, generated);
|
| 262 |
+
return generated;
|
| 263 |
+
}
|
| 264 |
+
get salt() {
|
| 265 |
+
const val = this.conf && this.conf.get(TELEMETRY_KEY_SALT);
|
| 266 |
+
if (val) {
|
| 267 |
+
return val;
|
| 268 |
+
}
|
| 269 |
+
const generated = (0, _crypto.randomBytes)(16).toString('hex');
|
| 270 |
+
this.conf && this.conf.set(TELEMETRY_KEY_SALT, generated);
|
| 271 |
+
return generated;
|
| 272 |
+
}
|
| 273 |
+
get isDisabled() {
|
| 274 |
+
if (!!this.NEXT_TELEMETRY_DISABLED || !this.conf) {
|
| 275 |
+
return true;
|
| 276 |
+
}
|
| 277 |
+
return this.conf.get(TELEMETRY_KEY_ENABLED, true) === false;
|
| 278 |
+
}
|
| 279 |
+
get isEnabled() {
|
| 280 |
+
return !this.NEXT_TELEMETRY_DISABLED && !!this.conf && this.conf.get(TELEMETRY_KEY_ENABLED, true) !== false;
|
| 281 |
+
}
|
| 282 |
+
async getProjectId() {
|
| 283 |
+
this.loadProjectId = this.loadProjectId || (0, _projectid.getRawProjectId)();
|
| 284 |
+
return this.oneWayHash(await this.loadProjectId);
|
| 285 |
+
}
|
| 286 |
+
}
|
| 287 |
+
|
| 288 |
+
//# sourceMappingURL=storage.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/index.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
0 && (module.exports = {
|
| 6 |
+
Span: null,
|
| 7 |
+
SpanStatus: null,
|
| 8 |
+
exportTraceState: null,
|
| 9 |
+
flushAllTraces: null,
|
| 10 |
+
getTraceEvents: null,
|
| 11 |
+
initializeTraceState: null,
|
| 12 |
+
recordTraceEvents: null,
|
| 13 |
+
setGlobal: null,
|
| 14 |
+
trace: null
|
| 15 |
+
});
|
| 16 |
+
function _export(target, all) {
|
| 17 |
+
for(var name in all)Object.defineProperty(target, name, {
|
| 18 |
+
enumerable: true,
|
| 19 |
+
get: all[name]
|
| 20 |
+
});
|
| 21 |
+
}
|
| 22 |
+
_export(exports, {
|
| 23 |
+
Span: function() {
|
| 24 |
+
return _trace.Span;
|
| 25 |
+
},
|
| 26 |
+
SpanStatus: function() {
|
| 27 |
+
return _trace.SpanStatus;
|
| 28 |
+
},
|
| 29 |
+
exportTraceState: function() {
|
| 30 |
+
return _trace.exportTraceState;
|
| 31 |
+
},
|
| 32 |
+
flushAllTraces: function() {
|
| 33 |
+
return _trace.flushAllTraces;
|
| 34 |
+
},
|
| 35 |
+
getTraceEvents: function() {
|
| 36 |
+
return _trace.getTraceEvents;
|
| 37 |
+
},
|
| 38 |
+
initializeTraceState: function() {
|
| 39 |
+
return _trace.initializeTraceState;
|
| 40 |
+
},
|
| 41 |
+
recordTraceEvents: function() {
|
| 42 |
+
return _trace.recordTraceEvents;
|
| 43 |
+
},
|
| 44 |
+
setGlobal: function() {
|
| 45 |
+
return _shared.setGlobal;
|
| 46 |
+
},
|
| 47 |
+
trace: function() {
|
| 48 |
+
return _trace.trace;
|
| 49 |
+
}
|
| 50 |
+
});
|
| 51 |
+
const _trace = require("./trace");
|
| 52 |
+
const _shared = require("./shared");
|
| 53 |
+
|
| 54 |
+
//# sourceMappingURL=index.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/report/index.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
Object.defineProperty(exports, "reporter", {
|
| 6 |
+
enumerable: true,
|
| 7 |
+
get: function() {
|
| 8 |
+
return reporter;
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
const _totelemetry = /*#__PURE__*/ _interop_require_default(require("./to-telemetry"));
|
| 12 |
+
const _tojson = /*#__PURE__*/ _interop_require_default(require("./to-json"));
|
| 13 |
+
function _interop_require_default(obj) {
|
| 14 |
+
return obj && obj.__esModule ? obj : {
|
| 15 |
+
default: obj
|
| 16 |
+
};
|
| 17 |
+
}
|
| 18 |
+
class MultiReporter {
|
| 19 |
+
constructor(reporters){
|
| 20 |
+
this.reporters = [];
|
| 21 |
+
this.reporters = reporters;
|
| 22 |
+
}
|
| 23 |
+
async flushAll(opts) {
|
| 24 |
+
await Promise.all(this.reporters.map((reporter)=>reporter.flushAll(opts)));
|
| 25 |
+
}
|
| 26 |
+
report(event) {
|
| 27 |
+
this.reporters.forEach((reporter)=>reporter.report(event));
|
| 28 |
+
}
|
| 29 |
+
}
|
| 30 |
+
const reporter = new MultiReporter([
|
| 31 |
+
_tojson.default,
|
| 32 |
+
_totelemetry.default
|
| 33 |
+
]);
|
| 34 |
+
|
| 35 |
+
//# sourceMappingURL=index.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/report/to-json.js
ADDED
|
@@ -0,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|
+
});
|
| 5 |
+
0 && (module.exports = {
|
| 6 |
+
batcher: null,
|
| 7 |
+
default: null
|
| 8 |
+
});
|
| 9 |
+
function _export(target, all) {
|
| 10 |
+
for(var name in all)Object.defineProperty(target, name, {
|
| 11 |
+
enumerable: true,
|
| 12 |
+
get: all[name]
|
| 13 |
+
});
|
| 14 |
+
}
|
| 15 |
+
_export(exports, {
|
| 16 |
+
batcher: function() {
|
| 17 |
+
return batcher;
|
| 18 |
+
},
|
| 19 |
+
default: function() {
|
| 20 |
+
return _default;
|
| 21 |
+
}
|
| 22 |
+
});
|
| 23 |
+
const _shared = require("../shared");
|
| 24 |
+
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
| 25 |
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
| 26 |
+
const _constants = require("../../shared/lib/constants");
|
| 27 |
+
function _interop_require_default(obj) {
|
| 28 |
+
return obj && obj.__esModule ? obj : {
|
| 29 |
+
default: obj
|
| 30 |
+
};
|
| 31 |
+
}
|
| 32 |
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
| 33 |
+
const localEndpoint = {
|
| 34 |
+
serviceName: 'nextjs',
|
| 35 |
+
ipv4: '127.0.0.1',
|
| 36 |
+
port: 9411
|
| 37 |
+
};
|
| 38 |
+
function batcher(reportEvents) {
|
| 39 |
+
const events = [];
|
| 40 |
+
// Promise queue to ensure events are always sent on flushAll
|
| 41 |
+
const queue = new Set();
|
| 42 |
+
return {
|
| 43 |
+
flushAll: async ()=>{
|
| 44 |
+
await Promise.all(queue);
|
| 45 |
+
if (events.length > 0) {
|
| 46 |
+
await reportEvents(events);
|
| 47 |
+
events.length = 0;
|
| 48 |
+
}
|
| 49 |
+
},
|
| 50 |
+
report: (event)=>{
|
| 51 |
+
events.push(event);
|
| 52 |
+
if (events.length > 100) {
|
| 53 |
+
const evts = events.slice();
|
| 54 |
+
events.length = 0;
|
| 55 |
+
const report = reportEvents(evts);
|
| 56 |
+
queue.add(report);
|
| 57 |
+
report.then(()=>queue.delete(report));
|
| 58 |
+
}
|
| 59 |
+
}
|
| 60 |
+
};
|
| 61 |
+
}
|
| 62 |
+
let writeStream;
|
| 63 |
+
let batch;
|
| 64 |
+
const writeStreamOptions = {
|
| 65 |
+
flags: 'a',
|
| 66 |
+
encoding: 'utf8'
|
| 67 |
+
};
|
| 68 |
+
class RotatingWriteStream {
|
| 69 |
+
constructor(file, sizeLimit){
|
| 70 |
+
this.file = file;
|
| 71 |
+
this.size = 0;
|
| 72 |
+
this.sizeLimit = sizeLimit;
|
| 73 |
+
this.createWriteStream();
|
| 74 |
+
}
|
| 75 |
+
createWriteStream() {
|
| 76 |
+
this.writeStream = _fs.default.createWriteStream(this.file, writeStreamOptions);
|
| 77 |
+
}
|
| 78 |
+
// Recreate the file
|
| 79 |
+
async rotate() {
|
| 80 |
+
await this.end();
|
| 81 |
+
try {
|
| 82 |
+
_fs.default.unlinkSync(this.file);
|
| 83 |
+
} catch (err) {
|
| 84 |
+
// It's fine if the file does not exist yet
|
| 85 |
+
if (err.code !== 'ENOENT') {
|
| 86 |
+
throw err;
|
| 87 |
+
}
|
| 88 |
+
}
|
| 89 |
+
this.size = 0;
|
| 90 |
+
this.createWriteStream();
|
| 91 |
+
this.rotatePromise = undefined;
|
| 92 |
+
}
|
| 93 |
+
async write(data) {
|
| 94 |
+
if (this.rotatePromise) await this.rotatePromise;
|
| 95 |
+
this.size += data.length;
|
| 96 |
+
if (this.size > this.sizeLimit) {
|
| 97 |
+
await (this.rotatePromise = this.rotate());
|
| 98 |
+
}
|
| 99 |
+
if (!this.writeStream.write(data, 'utf8')) {
|
| 100 |
+
if (this.drainPromise === undefined) {
|
| 101 |
+
this.drainPromise = new Promise((resolve, _reject)=>{
|
| 102 |
+
this.writeStream.once('drain', ()=>{
|
| 103 |
+
this.drainPromise = undefined;
|
| 104 |
+
resolve();
|
| 105 |
+
});
|
| 106 |
+
});
|
| 107 |
+
}
|
| 108 |
+
await this.drainPromise;
|
| 109 |
+
}
|
| 110 |
+
}
|
| 111 |
+
end() {
|
| 112 |
+
return new Promise((resolve)=>{
|
| 113 |
+
this.writeStream.end(resolve);
|
| 114 |
+
});
|
| 115 |
+
}
|
| 116 |
+
}
|
| 117 |
+
const reportToLocalHost = (event)=>{
|
| 118 |
+
const distDir = _shared.traceGlobals.get('distDir');
|
| 119 |
+
const phase = _shared.traceGlobals.get('phase');
|
| 120 |
+
if (!distDir || !phase) {
|
| 121 |
+
return;
|
| 122 |
+
}
|
| 123 |
+
if (!batch) {
|
| 124 |
+
batch = batcher(async (events)=>{
|
| 125 |
+
if (!writeStream) {
|
| 126 |
+
await _fs.default.promises.mkdir(distDir, {
|
| 127 |
+
recursive: true
|
| 128 |
+
});
|
| 129 |
+
const file = _path.default.join(distDir, 'trace');
|
| 130 |
+
writeStream = new RotatingWriteStream(file, // Development is limited to 50MB, production is unlimited
|
| 131 |
+
phase === _constants.PHASE_DEVELOPMENT_SERVER ? 52428800 : Infinity);
|
| 132 |
+
}
|
| 133 |
+
const eventsJson = JSON.stringify(events);
|
| 134 |
+
try {
|
| 135 |
+
await writeStream.write(eventsJson + '\n');
|
| 136 |
+
} catch (err) {
|
| 137 |
+
console.log(err);
|
| 138 |
+
}
|
| 139 |
+
});
|
| 140 |
+
}
|
| 141 |
+
batch.report({
|
| 142 |
+
...event,
|
| 143 |
+
traceId: _shared.traceId
|
| 144 |
+
});
|
| 145 |
+
};
|
| 146 |
+
const _default = {
|
| 147 |
+
flushAll: (opts)=>batch ? batch.flushAll().then(()=>{
|
| 148 |
+
const phase = _shared.traceGlobals.get('phase');
|
| 149 |
+
// Only end writeStream when manually flushing in production
|
| 150 |
+
if ((opts == null ? void 0 : opts.end) || phase !== _constants.PHASE_DEVELOPMENT_SERVER) {
|
| 151 |
+
return writeStream.end();
|
| 152 |
+
}
|
| 153 |
+
}) : undefined,
|
| 154 |
+
report: reportToLocalHost
|
| 155 |
+
};
|
| 156 |
+
|
| 157 |
+
//# sourceMappingURL=to-json.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/report/to-telemetry.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
Object.defineProperty(exports, "default", {
|
| 6 |
+
enumerable: true,
|
| 7 |
+
get: function() {
|
| 8 |
+
return _default;
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
const _shared = require("../shared");
|
| 12 |
+
const TRACE_EVENT_ACCESSLIST = new Map(Object.entries({
|
| 13 |
+
'webpack-invalidated': 'WEBPACK_INVALIDATED'
|
| 14 |
+
}));
|
| 15 |
+
const reportToTelemetry = ({ name, duration })=>{
|
| 16 |
+
const eventName = TRACE_EVENT_ACCESSLIST.get(name);
|
| 17 |
+
if (!eventName) {
|
| 18 |
+
return;
|
| 19 |
+
}
|
| 20 |
+
const telemetry = _shared.traceGlobals.get('telemetry');
|
| 21 |
+
if (!telemetry) {
|
| 22 |
+
return;
|
| 23 |
+
}
|
| 24 |
+
telemetry.record({
|
| 25 |
+
eventName,
|
| 26 |
+
payload: {
|
| 27 |
+
durationInMicroseconds: duration
|
| 28 |
+
}
|
| 29 |
+
});
|
| 30 |
+
};
|
| 31 |
+
const _default = {
|
| 32 |
+
flushAll: ()=>{},
|
| 33 |
+
report: reportToTelemetry
|
| 34 |
+
};
|
| 35 |
+
|
| 36 |
+
//# sourceMappingURL=to-telemetry.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/shared.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
0 && (module.exports = {
|
| 6 |
+
setGlobal: null,
|
| 7 |
+
traceGlobals: null,
|
| 8 |
+
traceId: null
|
| 9 |
+
});
|
| 10 |
+
function _export(target, all) {
|
| 11 |
+
for(var name in all)Object.defineProperty(target, name, {
|
| 12 |
+
enumerable: true,
|
| 13 |
+
get: all[name]
|
| 14 |
+
});
|
| 15 |
+
}
|
| 16 |
+
_export(exports, {
|
| 17 |
+
setGlobal: function() {
|
| 18 |
+
return setGlobal;
|
| 19 |
+
},
|
| 20 |
+
traceGlobals: function() {
|
| 21 |
+
return traceGlobals;
|
| 22 |
+
},
|
| 23 |
+
traceId: function() {
|
| 24 |
+
return traceId;
|
| 25 |
+
}
|
| 26 |
+
});
|
| 27 |
+
const _nodecrypto = require("node:crypto");
|
| 28 |
+
let _traceGlobals = global._traceGlobals;
|
| 29 |
+
if (!_traceGlobals) {
|
| 30 |
+
_traceGlobals = new Map();
|
| 31 |
+
}
|
| 32 |
+
global._traceGlobals = _traceGlobals;
|
| 33 |
+
const traceGlobals = _traceGlobals;
|
| 34 |
+
const setGlobal = (key, val)=>{
|
| 35 |
+
traceGlobals.set(key, val);
|
| 36 |
+
};
|
| 37 |
+
const traceId = process.env.TRACE_ID || process.env.NEXT_PRIVATE_TRACE_ID || (0, _nodecrypto.randomBytes)(8).toString('hex');
|
| 38 |
+
|
| 39 |
+
//# sourceMappingURL=shared.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/trace/trace.js
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
0 && (module.exports = {
|
| 6 |
+
Span: null,
|
| 7 |
+
SpanStatus: null,
|
| 8 |
+
clearTraceEvents: null,
|
| 9 |
+
exportTraceState: null,
|
| 10 |
+
flushAllTraces: null,
|
| 11 |
+
getTraceEvents: null,
|
| 12 |
+
initializeTraceState: null,
|
| 13 |
+
recordTraceEvents: null,
|
| 14 |
+
trace: null
|
| 15 |
+
});
|
| 16 |
+
function _export(target, all) {
|
| 17 |
+
for(var name in all)Object.defineProperty(target, name, {
|
| 18 |
+
enumerable: true,
|
| 19 |
+
get: all[name]
|
| 20 |
+
});
|
| 21 |
+
}
|
| 22 |
+
_export(exports, {
|
| 23 |
+
Span: function() {
|
| 24 |
+
return Span;
|
| 25 |
+
},
|
| 26 |
+
SpanStatus: function() {
|
| 27 |
+
return SpanStatus;
|
| 28 |
+
},
|
| 29 |
+
clearTraceEvents: function() {
|
| 30 |
+
return clearTraceEvents;
|
| 31 |
+
},
|
| 32 |
+
exportTraceState: function() {
|
| 33 |
+
return exportTraceState;
|
| 34 |
+
},
|
| 35 |
+
flushAllTraces: function() {
|
| 36 |
+
return flushAllTraces;
|
| 37 |
+
},
|
| 38 |
+
getTraceEvents: function() {
|
| 39 |
+
return getTraceEvents;
|
| 40 |
+
},
|
| 41 |
+
initializeTraceState: function() {
|
| 42 |
+
return initializeTraceState;
|
| 43 |
+
},
|
| 44 |
+
recordTraceEvents: function() {
|
| 45 |
+
return recordTraceEvents;
|
| 46 |
+
},
|
| 47 |
+
trace: function() {
|
| 48 |
+
return trace;
|
| 49 |
+
}
|
| 50 |
+
});
|
| 51 |
+
const _report = require("./report");
|
| 52 |
+
const NUM_OF_MICROSEC_IN_NANOSEC = BigInt('1000');
|
| 53 |
+
const NUM_OF_MILLISEC_IN_NANOSEC = BigInt('1000000');
|
| 54 |
+
let count = 0;
|
| 55 |
+
const getId = ()=>{
|
| 56 |
+
count++;
|
| 57 |
+
return count;
|
| 58 |
+
};
|
| 59 |
+
let defaultParentSpanId;
|
| 60 |
+
let shouldSaveTraceEvents;
|
| 61 |
+
let savedTraceEvents = [];
|
| 62 |
+
const RECORD_SPAN_THRESHOLD_MS = parseInt(process.env.NEXT_TRACE_SPAN_THRESHOLD_MS ?? '-1');
|
| 63 |
+
var SpanStatus = /*#__PURE__*/ function(SpanStatus) {
|
| 64 |
+
SpanStatus["Started"] = "started";
|
| 65 |
+
SpanStatus["Stopped"] = "stopped";
|
| 66 |
+
return SpanStatus;
|
| 67 |
+
}({});
|
| 68 |
+
class Span {
|
| 69 |
+
constructor({ name, parentId, attrs, startTime }){
|
| 70 |
+
this.name = name;
|
| 71 |
+
this.parentId = parentId ?? defaultParentSpanId;
|
| 72 |
+
this.attrs = attrs ? {
|
| 73 |
+
...attrs
|
| 74 |
+
} : {};
|
| 75 |
+
this.status = "started";
|
| 76 |
+
this.id = getId();
|
| 77 |
+
this._start = startTime || process.hrtime.bigint();
|
| 78 |
+
// hrtime cannot be used to reconstruct tracing span's actual start time
|
| 79 |
+
// since it does not have relation to clock time:
|
| 80 |
+
// `These times are relative to an arbitrary time in the past, and not related to the time of day and therefore not subject to clock drift`
|
| 81 |
+
// https://nodejs.org/api/process.html#processhrtimetime
|
| 82 |
+
// Capturing current datetime as additional metadata for external reconstruction.
|
| 83 |
+
this.now = Date.now();
|
| 84 |
+
}
|
| 85 |
+
// Durations are reported as microseconds. This gives 1000x the precision
|
| 86 |
+
// of something like Date.now(), which reports in milliseconds.
|
| 87 |
+
// Additionally, ~285 years can be safely represented as microseconds as
|
| 88 |
+
// a float64 in both JSON and JavaScript.
|
| 89 |
+
stop(stopTime) {
|
| 90 |
+
if (this.status === "stopped") {
|
| 91 |
+
// Don't report the same span twice.
|
| 92 |
+
// TODO: In the future this should throw as `.stop()` shouldn't be called multiple times.
|
| 93 |
+
return;
|
| 94 |
+
}
|
| 95 |
+
const end = stopTime || process.hrtime.bigint();
|
| 96 |
+
const duration = (end - this._start) / NUM_OF_MICROSEC_IN_NANOSEC;
|
| 97 |
+
this.status = "stopped";
|
| 98 |
+
if (duration > Number.MAX_SAFE_INTEGER) {
|
| 99 |
+
throw Object.defineProperty(new Error(`Duration is too long to express as float64: ${duration}`), "__NEXT_ERROR_CODE", {
|
| 100 |
+
value: "E513",
|
| 101 |
+
enumerable: false,
|
| 102 |
+
configurable: true
|
| 103 |
+
});
|
| 104 |
+
}
|
| 105 |
+
const timestamp = this._start / NUM_OF_MICROSEC_IN_NANOSEC;
|
| 106 |
+
const traceEvent = {
|
| 107 |
+
name: this.name,
|
| 108 |
+
duration: Number(duration),
|
| 109 |
+
timestamp: Number(timestamp),
|
| 110 |
+
id: this.id,
|
| 111 |
+
parentId: this.parentId,
|
| 112 |
+
tags: this.attrs,
|
| 113 |
+
startTime: this.now
|
| 114 |
+
};
|
| 115 |
+
if (duration > RECORD_SPAN_THRESHOLD_MS * 1000) {
|
| 116 |
+
_report.reporter.report(traceEvent);
|
| 117 |
+
if (shouldSaveTraceEvents) {
|
| 118 |
+
savedTraceEvents.push(traceEvent);
|
| 119 |
+
}
|
| 120 |
+
}
|
| 121 |
+
}
|
| 122 |
+
traceChild(name, attrs) {
|
| 123 |
+
return new Span({
|
| 124 |
+
name,
|
| 125 |
+
parentId: this.id,
|
| 126 |
+
attrs
|
| 127 |
+
});
|
| 128 |
+
}
|
| 129 |
+
manualTraceChild(name, // Start time in nanoseconds since epoch.
|
| 130 |
+
startTime, // Stop time in nanoseconds since epoch.
|
| 131 |
+
stopTime, attrs) {
|
| 132 |
+
// We need to convert the time info to the same base as hrtime since that is used usually.
|
| 133 |
+
const correction = process.hrtime.bigint() - BigInt(Date.now()) * NUM_OF_MILLISEC_IN_NANOSEC;
|
| 134 |
+
const span = new Span({
|
| 135 |
+
name,
|
| 136 |
+
parentId: this.id,
|
| 137 |
+
attrs,
|
| 138 |
+
startTime: startTime ? startTime + correction : process.hrtime.bigint()
|
| 139 |
+
});
|
| 140 |
+
span.stop(stopTime ? stopTime + correction : process.hrtime.bigint());
|
| 141 |
+
}
|
| 142 |
+
getId() {
|
| 143 |
+
return this.id;
|
| 144 |
+
}
|
| 145 |
+
setAttribute(key, value) {
|
| 146 |
+
this.attrs[key] = value;
|
| 147 |
+
}
|
| 148 |
+
traceFn(fn) {
|
| 149 |
+
try {
|
| 150 |
+
return fn(this);
|
| 151 |
+
} finally{
|
| 152 |
+
this.stop();
|
| 153 |
+
}
|
| 154 |
+
}
|
| 155 |
+
async traceAsyncFn(fn) {
|
| 156 |
+
try {
|
| 157 |
+
return await fn(this);
|
| 158 |
+
} finally{
|
| 159 |
+
this.stop();
|
| 160 |
+
}
|
| 161 |
+
}
|
| 162 |
+
}
|
| 163 |
+
const trace = (name, parentId, attrs)=>{
|
| 164 |
+
return new Span({
|
| 165 |
+
name,
|
| 166 |
+
parentId,
|
| 167 |
+
attrs
|
| 168 |
+
});
|
| 169 |
+
};
|
| 170 |
+
const flushAllTraces = (opts)=>_report.reporter.flushAll(opts);
|
| 171 |
+
const exportTraceState = ()=>({
|
| 172 |
+
defaultParentSpanId,
|
| 173 |
+
lastId: count,
|
| 174 |
+
shouldSaveTraceEvents
|
| 175 |
+
});
|
| 176 |
+
const initializeTraceState = (state)=>{
|
| 177 |
+
count = state.lastId;
|
| 178 |
+
defaultParentSpanId = state.defaultParentSpanId;
|
| 179 |
+
shouldSaveTraceEvents = state.shouldSaveTraceEvents;
|
| 180 |
+
};
|
| 181 |
+
function getTraceEvents() {
|
| 182 |
+
return savedTraceEvents;
|
| 183 |
+
}
|
| 184 |
+
function recordTraceEvents(events) {
|
| 185 |
+
for (const traceEvent of events){
|
| 186 |
+
_report.reporter.report(traceEvent);
|
| 187 |
+
if (traceEvent.id > count) {
|
| 188 |
+
count = traceEvent.id + 1;
|
| 189 |
+
}
|
| 190 |
+
}
|
| 191 |
+
if (shouldSaveTraceEvents) {
|
| 192 |
+
savedTraceEvents.push(...events);
|
| 193 |
+
}
|
| 194 |
+
}
|
| 195 |
+
const clearTraceEvents = ()=>savedTraceEvents = [];
|
| 196 |
+
|
| 197 |
+
//# sourceMappingURL=trace.js.map
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/font/google/target.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
/* target file for webpack loader */
|
.next/standalone/node_modules/.pnpm/next@15.4.3_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/package.json
ADDED
|
@@ -0,0 +1,378 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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3 |
+
"version": "15.4.3",
|
| 4 |
+
"description": "The React Framework",
|
| 5 |
+
"main": "./dist/server/next.js",
|
| 6 |
+
"license": "MIT",
|
| 7 |
+
"repository": "vercel/next.js",
|
| 8 |
+
"bugs": "https://github.com/vercel/next.js/issues",
|
| 9 |
+
"homepage": "https://nextjs.org",
|
| 10 |
+
"types": "index.d.ts",
|
| 11 |
+
"files": [
|
| 12 |
+
"dist",
|
| 13 |
+
"app.js",
|
| 14 |
+
"app.d.ts",
|
| 15 |
+
"babel.js",
|
| 16 |
+
"babel.d.ts",
|
| 17 |
+
"client.js",
|
| 18 |
+
"client.d.ts",
|
| 19 |
+
"compat",
|
| 20 |
+
"cache.js",
|
| 21 |
+
"cache.d.ts",
|
| 22 |
+
"config.js",
|
| 23 |
+
"config.d.ts",
|
| 24 |
+
"constants.js",
|
| 25 |
+
"constants.d.ts",
|
| 26 |
+
"document.js",
|
| 27 |
+
"document.d.ts",
|
| 28 |
+
"dynamic.js",
|
| 29 |
+
"dynamic.d.ts",
|
| 30 |
+
"error.js",
|
| 31 |
+
"error.d.ts",
|
| 32 |
+
"future",
|
| 33 |
+
"legacy",
|
| 34 |
+
"script.js",
|
| 35 |
+
"script.d.ts",
|
| 36 |
+
"server.js",
|
| 37 |
+
"server.d.ts",
|
| 38 |
+
"head.js",
|
| 39 |
+
"head.d.ts",
|
| 40 |
+
"image.js",
|
| 41 |
+
"image.d.ts",
|
| 42 |
+
"link.js",
|
| 43 |
+
"link.d.ts",
|
| 44 |
+
"form.js",
|
| 45 |
+
"form.d.ts",
|
| 46 |
+
"router.js",
|
| 47 |
+
"router.d.ts",
|
| 48 |
+
"jest.js",
|
| 49 |
+
"jest.d.ts",
|
| 50 |
+
"amp.js",
|
| 51 |
+
"amp.d.ts",
|
| 52 |
+
"og.js",
|
| 53 |
+
"og.d.ts",
|
| 54 |
+
"types.d.ts",
|
| 55 |
+
"types.js",
|
| 56 |
+
"index.d.ts",
|
| 57 |
+
"types/global.d.ts",
|
| 58 |
+
"types/compiled.d.ts",
|
| 59 |
+
"image-types/global.d.ts",
|
| 60 |
+
"navigation-types/navigation.d.ts",
|
| 61 |
+
"navigation-types/compat/navigation.d.ts",
|
| 62 |
+
"font",
|
| 63 |
+
"navigation.js",
|
| 64 |
+
"navigation.d.ts",
|
| 65 |
+
"headers.js",
|
| 66 |
+
"headers.d.ts",
|
| 67 |
+
"navigation-types",
|
| 68 |
+
"web-vitals.js",
|
| 69 |
+
"web-vitals.d.ts",
|
| 70 |
+
"experimental/testing/server.js",
|
| 71 |
+
"experimental/testing/server.d.ts",
|
| 72 |
+
"experimental/testmode/playwright.js",
|
| 73 |
+
"experimental/testmode/playwright.d.ts",
|
| 74 |
+
"experimental/testmode/playwright/msw.js",
|
| 75 |
+
"experimental/testmode/playwright/msw.d.ts",
|
| 76 |
+
"experimental/testmode/proxy.js",
|
| 77 |
+
"experimental/testmode/proxy.d.ts"
|
| 78 |
+
],
|
| 79 |
+
"bin": {
|
| 80 |
+
"next": "./dist/bin/next"
|
| 81 |
+
},
|
| 82 |
+
"scripts": {
|
| 83 |
+
"dev": "cross-env NEXT_SERVER_NO_MANGLE=1 taskr",
|
| 84 |
+
"release": "taskr release",
|
| 85 |
+
"build": "pnpm release",
|
| 86 |
+
"prepublishOnly": "cd ../../ && turbo run build",
|
| 87 |
+
"types": "tsc --project tsconfig.build.json --declaration --emitDeclarationOnly --stripInternal --declarationDir dist",
|
| 88 |
+
"typescript": "tsec --noEmit",
|
| 89 |
+
"ncc-compiled": "taskr ncc",
|
| 90 |
+
"storybook": "BROWSER=none storybook dev -p 6006",
|
| 91 |
+
"build-storybook": "storybook build",
|
| 92 |
+
"test-storybook": "test-storybook"
|
| 93 |
+
},
|
| 94 |
+
"taskr": {
|
| 95 |
+
"requires": [
|
| 96 |
+
"./taskfile-webpack.js",
|
| 97 |
+
"./taskfile-ncc.js",
|
| 98 |
+
"./taskfile-swc.js",
|
| 99 |
+
"./taskfile-watch.js"
|
| 100 |
+
]
|
| 101 |
+
},
|
| 102 |
+
"dependencies": {
|
| 103 |
+
"@next/env": "15.4.3",
|
| 104 |
+
"@swc/helpers": "0.5.15",
|
| 105 |
+
"caniuse-lite": "^1.0.30001579",
|
| 106 |
+
"postcss": "8.4.31",
|
| 107 |
+
"styled-jsx": "5.1.6"
|
| 108 |
+
},
|
| 109 |
+
"peerDependencies": {
|
| 110 |
+
"@opentelemetry/api": "^1.1.0",
|
| 111 |
+
"@playwright/test": "^1.51.1",
|
| 112 |
+
"babel-plugin-react-compiler": "*",
|
| 113 |
+
"react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0",
|
| 114 |
+
"react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0",
|
| 115 |
+
"sass": "^1.3.0"
|
| 116 |
+
},
|
| 117 |
+
"peerDependenciesMeta": {
|
| 118 |
+
"babel-plugin-react-compiler": {
|
| 119 |
+
"optional": true
|
| 120 |
+
},
|
| 121 |
+
"sass": {
|
| 122 |
+
"optional": true
|
| 123 |
+
},
|
| 124 |
+
"@opentelemetry/api": {
|
| 125 |
+
"optional": true
|
| 126 |
+
},
|
| 127 |
+
"@playwright/test": {
|
| 128 |
+
"optional": true
|
| 129 |
+
}
|
| 130 |
+
},
|
| 131 |
+
"optionalDependencies": {
|
| 132 |
+
"sharp": "^0.34.3",
|
| 133 |
+
"@next/swc-darwin-arm64": "15.4.3",
|
| 134 |
+
"@next/swc-darwin-x64": "15.4.3",
|
| 135 |
+
"@next/swc-linux-arm64-gnu": "15.4.3",
|
| 136 |
+
"@next/swc-linux-arm64-musl": "15.4.3",
|
| 137 |
+
"@next/swc-linux-x64-gnu": "15.4.3",
|
| 138 |
+
"@next/swc-linux-x64-musl": "15.4.3",
|
| 139 |
+
"@next/swc-win32-arm64-msvc": "15.4.3",
|
| 140 |
+
"@next/swc-win32-x64-msvc": "15.4.3"
|
| 141 |
+
},
|
| 142 |
+
"devDependencies": {
|
| 143 |
+
"@ampproject/toolbox-optimizer": "2.8.3",
|
| 144 |
+
"@babel/code-frame": "7.26.2",
|
| 145 |
+
"@babel/core": "7.26.10",
|
| 146 |
+
"@babel/eslint-parser": "7.24.6",
|
| 147 |
+
"@babel/generator": "7.27.0",
|
| 148 |
+
"@babel/plugin-syntax-bigint": "7.8.3",
|
| 149 |
+
"@babel/plugin-syntax-dynamic-import": "7.8.3",
|
| 150 |
+
"@babel/plugin-syntax-import-attributes": "7.26.0",
|
| 151 |
+
"@babel/plugin-syntax-jsx": "7.25.9",
|
| 152 |
+
"@babel/plugin-transform-class-properties": "7.25.9",
|
| 153 |
+
"@babel/plugin-transform-export-namespace-from": "7.25.9",
|
| 154 |
+
"@babel/plugin-transform-modules-commonjs": "7.26.3",
|
| 155 |
+
"@babel/plugin-transform-numeric-separator": "7.25.9",
|
| 156 |
+
"@babel/plugin-transform-object-rest-spread": "7.25.9",
|
| 157 |
+
"@babel/plugin-transform-runtime": "7.26.10",
|
| 158 |
+
"@babel/preset-env": "7.26.9",
|
| 159 |
+
"@babel/preset-react": "7.26.3",
|
| 160 |
+
"@babel/preset-typescript": "7.27.0",
|
| 161 |
+
"@babel/runtime": "7.27.0",
|
| 162 |
+
"@babel/traverse": "7.27.0",
|
| 163 |
+
"@babel/types": "7.27.0",
|
| 164 |
+
"@base-ui-components/react": "1.0.0-beta.1",
|
| 165 |
+
"@capsizecss/metrics": "3.4.0",
|
| 166 |
+
"@edge-runtime/cookies": "6.0.0",
|
| 167 |
+
"@edge-runtime/ponyfill": "4.0.0",
|
| 168 |
+
"@edge-runtime/primitives": "6.0.0",
|
| 169 |
+
"@hapi/accept": "5.0.2",
|
| 170 |
+
"@jest/transform": "29.5.0",
|
| 171 |
+
"@jest/types": "29.5.0",
|
| 172 |
+
"@mswjs/interceptors": "0.23.0",
|
| 173 |
+
"@napi-rs/triples": "1.2.0",
|
| 174 |
+
"@next/font": "15.4.3",
|
| 175 |
+
"@next/polyfill-module": "15.4.3",
|
| 176 |
+
"@next/polyfill-nomodule": "15.4.3",
|
| 177 |
+
"@next/react-refresh-utils": "15.4.3",
|
| 178 |
+
"@next/swc": "15.4.3",
|
| 179 |
+
"@opentelemetry/api": "1.6.0",
|
| 180 |
+
"@playwright/test": "1.51.1",
|
| 181 |
+
"@rspack/core": "1.4.5",
|
| 182 |
+
"@storybook/addon-a11y": "8.6.0",
|
| 183 |
+
"@storybook/addon-essentials": "8.6.0",
|
| 184 |
+
"@storybook/addon-interactions": "8.6.0",
|
| 185 |
+
"@storybook/addon-webpack5-compiler-swc": "3.0.0",
|
| 186 |
+
"@storybook/blocks": "8.6.0",
|
| 187 |
+
"@storybook/react": "8.6.0",
|
| 188 |
+
"@storybook/react-webpack5": "8.6.0",
|
| 189 |
+
"@storybook/test": "8.6.0",
|
| 190 |
+
"@storybook/test-runner": "0.21.0",
|
| 191 |
+
"@swc/core": "1.11.24",
|
| 192 |
+
"@swc/types": "0.1.7",
|
| 193 |
+
"@taskr/clear": "1.1.0",
|
| 194 |
+
"@taskr/esnext": "1.1.0",
|
| 195 |
+
"@types/amphtml-validator": "1.0.0",
|
| 196 |
+
"@types/babel__code-frame": "7.0.2",
|
| 197 |
+
"@types/babel__core": "7.1.12",
|
| 198 |
+
"@types/babel__generator": "7.6.2",
|
| 199 |
+
"@types/babel__template": "7.4.0",
|
| 200 |
+
"@types/babel__traverse": "7.11.0",
|
| 201 |
+
"@types/bytes": "3.1.1",
|
| 202 |
+
"@types/ci-info": "2.0.0",
|
| 203 |
+
"@types/compression": "0.0.36",
|
| 204 |
+
"@types/content-disposition": "0.5.4",
|
| 205 |
+
"@types/content-type": "1.1.3",
|
| 206 |
+
"@types/cookie": "0.3.3",
|
| 207 |
+
"@types/cross-spawn": "6.0.0",
|
| 208 |
+
"@types/debug": "4.1.5",
|
| 209 |
+
"@types/express-serve-static-core": "4.17.33",
|
| 210 |
+
"@types/fresh": "0.5.0",
|
| 211 |
+
"@types/glob": "7.1.1",
|
| 212 |
+
"@types/jsonwebtoken": "9.0.0",
|
| 213 |
+
"@types/lodash": "4.14.198",
|
| 214 |
+
"@types/lodash.curry": "4.1.6",
|
| 215 |
+
"@types/path-to-regexp": "1.7.0",
|
| 216 |
+
"@types/picomatch": "2.3.3",
|
| 217 |
+
"@types/platform": "1.3.4",
|
| 218 |
+
"@types/react": "19.0.8",
|
| 219 |
+
"@types/react-dom": "19.0.3",
|
| 220 |
+
"@types/react-is": "18.2.4",
|
| 221 |
+
"@types/semver": "7.3.1",
|
| 222 |
+
"@types/send": "0.14.4",
|
| 223 |
+
"@types/shell-quote": "1.7.1",
|
| 224 |
+
"@types/tar": "6.1.5",
|
| 225 |
+
"@types/text-table": "0.2.1",
|
| 226 |
+
"@types/ua-parser-js": "0.7.36",
|
| 227 |
+
"@types/webpack-sources1": "npm:@types/webpack-sources@0.1.5",
|
| 228 |
+
"@types/ws": "8.2.0",
|
| 229 |
+
"@vercel/ncc": "0.34.0",
|
| 230 |
+
"@vercel/nft": "0.27.1",
|
| 231 |
+
"@vercel/turbopack-ecmascript-runtime": "*",
|
| 232 |
+
"acorn": "8.14.0",
|
| 233 |
+
"amphtml-validator": "1.0.38",
|
| 234 |
+
"anser": "1.4.9",
|
| 235 |
+
"arg": "4.1.0",
|
| 236 |
+
"assert": "2.0.0",
|
| 237 |
+
"async-retry": "1.2.3",
|
| 238 |
+
"async-sema": "3.0.0",
|
| 239 |
+
"axe-playwright": "2.0.3",
|
| 240 |
+
"babel-plugin-react-compiler": "19.0.0-beta-e552027-20250112",
|
| 241 |
+
"babel-plugin-transform-define": "2.0.0",
|
| 242 |
+
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
|
| 243 |
+
"browserify-zlib": "0.2.0",
|
| 244 |
+
"browserslist": "4.24.4",
|
| 245 |
+
"buffer": "5.6.0",
|
| 246 |
+
"busboy": "1.6.0",
|
| 247 |
+
"bytes": "3.1.1",
|
| 248 |
+
"ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540",
|
| 249 |
+
"cli-select": "1.1.2",
|
| 250 |
+
"client-only": "0.0.1",
|
| 251 |
+
"commander": "12.1.0",
|
| 252 |
+
"comment-json": "3.0.3",
|
| 253 |
+
"compression": "1.7.4",
|
| 254 |
+
"conf": "5.0.0",
|
| 255 |
+
"constants-browserify": "1.0.0",
|
| 256 |
+
"content-disposition": "0.5.3",
|
| 257 |
+
"content-type": "1.0.4",
|
| 258 |
+
"cookie": "0.4.1",
|
| 259 |
+
"cross-env": "6.0.3",
|
| 260 |
+
"cross-spawn": "7.0.3",
|
| 261 |
+
"crypto-browserify": "3.12.0",
|
| 262 |
+
"css-loader": "7.1.2",
|
| 263 |
+
"css.escape": "1.5.1",
|
| 264 |
+
"cssnano-preset-default": "7.0.6",
|
| 265 |
+
"data-uri-to-buffer": "3.0.1",
|
| 266 |
+
"debug": "4.1.1",
|
| 267 |
+
"devalue": "2.0.1",
|
| 268 |
+
"domain-browser": "4.19.0",
|
| 269 |
+
"edge-runtime": "4.0.1",
|
| 270 |
+
"events": "3.3.0",
|
| 271 |
+
"find-up": "4.1.0",
|
| 272 |
+
"fresh": "0.5.2",
|
| 273 |
+
"glob": "7.1.7",
|
| 274 |
+
"gzip-size": "5.1.1",
|
| 275 |
+
"http-proxy": "1.18.1",
|
| 276 |
+
"http-proxy-agent": "5.0.0",
|
| 277 |
+
"https-browserify": "1.0.0",
|
| 278 |
+
"https-proxy-agent": "5.0.1",
|
| 279 |
+
"icss-utils": "5.1.0",
|
| 280 |
+
"ignore-loader": "0.1.2",
|
| 281 |
+
"image-size": "1.2.1",
|
| 282 |
+
"is-docker": "2.0.0",
|
| 283 |
+
"is-wsl": "2.2.0",
|
| 284 |
+
"jest-worker": "27.5.1",
|
| 285 |
+
"json5": "2.2.3",
|
| 286 |
+
"jsonwebtoken": "9.0.0",
|
| 287 |
+
"loader-runner": "4.3.0",
|
| 288 |
+
"loader-utils2": "npm:loader-utils@2.0.4",
|
| 289 |
+
"loader-utils3": "npm:loader-utils@3.1.3",
|
| 290 |
+
"lodash.curry": "4.1.1",
|
| 291 |
+
"mini-css-extract-plugin": "2.4.4",
|
| 292 |
+
"msw": "2.3.0",
|
| 293 |
+
"nanoid": "3.1.32",
|
| 294 |
+
"native-url": "0.3.4",
|
| 295 |
+
"neo-async": "2.6.1",
|
| 296 |
+
"node-html-parser": "5.3.3",
|
| 297 |
+
"ora": "4.0.4",
|
| 298 |
+
"os-browserify": "0.3.0",
|
| 299 |
+
"p-limit": "3.1.0",
|
| 300 |
+
"p-queue": "6.6.2",
|
| 301 |
+
"path-browserify": "1.0.1",
|
| 302 |
+
"path-to-regexp": "6.1.0",
|
| 303 |
+
"picomatch": "4.0.1",
|
| 304 |
+
"postcss-flexbugs-fixes": "5.0.2",
|
| 305 |
+
"postcss-modules-extract-imports": "3.0.0",
|
| 306 |
+
"postcss-modules-local-by-default": "4.2.0",
|
| 307 |
+
"postcss-modules-scope": "3.0.0",
|
| 308 |
+
"postcss-modules-values": "4.0.0",
|
| 309 |
+
"postcss-preset-env": "7.4.3",
|
| 310 |
+
"postcss-safe-parser": "6.0.0",
|
| 311 |
+
"postcss-scss": "4.0.3",
|
| 312 |
+
"postcss-value-parser": "4.2.0",
|
| 313 |
+
"process": "0.11.10",
|
| 314 |
+
"punycode": "2.1.1",
|
| 315 |
+
"querystring-es3": "0.2.1",
|
| 316 |
+
"raw-body": "2.4.1",
|
| 317 |
+
"react-refresh": "0.12.0",
|
| 318 |
+
"recast": "0.23.11",
|
| 319 |
+
"regenerator-runtime": "0.13.4",
|
| 320 |
+
"safe-stable-stringify": "2.5.0",
|
| 321 |
+
"sass-loader": "15.0.0",
|
| 322 |
+
"schema-utils2": "npm:schema-utils@2.7.1",
|
| 323 |
+
"schema-utils3": "npm:schema-utils@3.0.0",
|
| 324 |
+
"semver": "7.3.2",
|
| 325 |
+
"send": "0.18.0",
|
| 326 |
+
"server-only": "0.0.1",
|
| 327 |
+
"setimmediate": "1.0.5",
|
| 328 |
+
"shell-quote": "1.7.3",
|
| 329 |
+
"source-map": "0.6.1",
|
| 330 |
+
"source-map-loader": "5.0.0",
|
| 331 |
+
"source-map08": "npm:source-map@0.8.0-beta.0",
|
| 332 |
+
"stacktrace-parser": "0.1.10",
|
| 333 |
+
"storybook": "8.6.0",
|
| 334 |
+
"stream-browserify": "3.0.0",
|
| 335 |
+
"stream-http": "3.1.1",
|
| 336 |
+
"strict-event-emitter": "0.5.0",
|
| 337 |
+
"string-hash": "1.1.3",
|
| 338 |
+
"string_decoder": "1.3.0",
|
| 339 |
+
"strip-ansi": "6.0.0",
|
| 340 |
+
"style-loader": "4.0.0",
|
| 341 |
+
"superstruct": "1.0.3",
|
| 342 |
+
"tar": "6.1.15",
|
| 343 |
+
"taskr": "1.1.0",
|
| 344 |
+
"terser": "5.27.0",
|
| 345 |
+
"terser-webpack-plugin": "5.3.9",
|
| 346 |
+
"text-table": "0.2.0",
|
| 347 |
+
"timers-browserify": "2.0.12",
|
| 348 |
+
"tty-browserify": "0.0.1",
|
| 349 |
+
"typescript": "5.8.2",
|
| 350 |
+
"ua-parser-js": "1.0.35",
|
| 351 |
+
"unistore": "3.4.1",
|
| 352 |
+
"util": "0.12.4",
|
| 353 |
+
"vm-browserify": "1.1.2",
|
| 354 |
+
"watchpack": "2.4.0",
|
| 355 |
+
"web-vitals": "4.2.1",
|
| 356 |
+
"webpack": "5.98.0",
|
| 357 |
+
"webpack-sources1": "npm:webpack-sources@1.4.3",
|
| 358 |
+
"webpack-sources3": "npm:webpack-sources@3.2.3",
|
| 359 |
+
"ws": "8.2.3",
|
| 360 |
+
"zod": "3.22.3",
|
| 361 |
+
"zod-validation-error": "3.4.0"
|
| 362 |
+
},
|
| 363 |
+
"keywords": [
|
| 364 |
+
"react",
|
| 365 |
+
"framework",
|
| 366 |
+
"nextjs",
|
| 367 |
+
"web",
|
| 368 |
+
"server",
|
| 369 |
+
"node",
|
| 370 |
+
"front-end",
|
| 371 |
+
"backend",
|
| 372 |
+
"cli",
|
| 373 |
+
"vercel"
|
| 374 |
+
],
|
| 375 |
+
"engines": {
|
| 376 |
+
"node": "^18.18.0 || ^19.8.0 || >= 20.0.0"
|
| 377 |
+
}
|
| 378 |
+
}
|
.next/standalone/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "picocolors",
|
| 3 |
+
"version": "1.1.1",
|
| 4 |
+
"main": "./picocolors.js",
|
| 5 |
+
"types": "./picocolors.d.ts",
|
| 6 |
+
"browser": {
|
| 7 |
+
"./picocolors.js": "./picocolors.browser.js"
|
| 8 |
+
},
|
| 9 |
+
"sideEffects": false,
|
| 10 |
+
"description": "The tiniest and the fastest library for terminal output formatting with ANSI colors",
|
| 11 |
+
"files": [
|
| 12 |
+
"picocolors.*",
|
| 13 |
+
"types.d.ts"
|
| 14 |
+
],
|
| 15 |
+
"keywords": [
|
| 16 |
+
"terminal",
|
| 17 |
+
"colors",
|
| 18 |
+
"formatting",
|
| 19 |
+
"cli",
|
| 20 |
+
"console"
|
| 21 |
+
],
|
| 22 |
+
"author": "Alexey Raspopov",
|
| 23 |
+
"repository": "alexeyraspopov/picocolors",
|
| 24 |
+
"license": "ISC"
|
| 25 |
+
}
|
.next/standalone/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
let p = process || {}, argv = p.argv || [], env = p.env || {}
|
| 2 |
+
let isColorSupported =
|
| 3 |
+
!(!!env.NO_COLOR || argv.includes("--no-color")) &&
|
| 4 |
+
(!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI)
|
| 5 |
+
|
| 6 |
+
let formatter = (open, close, replace = open) =>
|
| 7 |
+
input => {
|
| 8 |
+
let string = "" + input, index = string.indexOf(close, open.length)
|
| 9 |
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
let replaceClose = (string, close, replace, index) => {
|
| 13 |
+
let result = "", cursor = 0
|
| 14 |
+
do {
|
| 15 |
+
result += string.substring(cursor, index) + replace
|
| 16 |
+
cursor = index + close.length
|
| 17 |
+
index = string.indexOf(close, cursor)
|
| 18 |
+
} while (~index)
|
| 19 |
+
return result + string.substring(cursor)
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
let createColors = (enabled = isColorSupported) => {
|
| 23 |
+
let f = enabled ? formatter : () => String
|
| 24 |
+
return {
|
| 25 |
+
isColorSupported: enabled,
|
| 26 |
+
reset: f("\x1b[0m", "\x1b[0m"),
|
| 27 |
+
bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"),
|
| 28 |
+
dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"),
|
| 29 |
+
italic: f("\x1b[3m", "\x1b[23m"),
|
| 30 |
+
underline: f("\x1b[4m", "\x1b[24m"),
|
| 31 |
+
inverse: f("\x1b[7m", "\x1b[27m"),
|
| 32 |
+
hidden: f("\x1b[8m", "\x1b[28m"),
|
| 33 |
+
strikethrough: f("\x1b[9m", "\x1b[29m"),
|
| 34 |
+
|
| 35 |
+
black: f("\x1b[30m", "\x1b[39m"),
|
| 36 |
+
red: f("\x1b[31m", "\x1b[39m"),
|
| 37 |
+
green: f("\x1b[32m", "\x1b[39m"),
|
| 38 |
+
yellow: f("\x1b[33m", "\x1b[39m"),
|
| 39 |
+
blue: f("\x1b[34m", "\x1b[39m"),
|
| 40 |
+
magenta: f("\x1b[35m", "\x1b[39m"),
|
| 41 |
+
cyan: f("\x1b[36m", "\x1b[39m"),
|
| 42 |
+
white: f("\x1b[37m", "\x1b[39m"),
|
| 43 |
+
gray: f("\x1b[90m", "\x1b[39m"),
|
| 44 |
+
|
| 45 |
+
bgBlack: f("\x1b[40m", "\x1b[49m"),
|
| 46 |
+
bgRed: f("\x1b[41m", "\x1b[49m"),
|
| 47 |
+
bgGreen: f("\x1b[42m", "\x1b[49m"),
|
| 48 |
+
bgYellow: f("\x1b[43m", "\x1b[49m"),
|
| 49 |
+
bgBlue: f("\x1b[44m", "\x1b[49m"),
|
| 50 |
+
bgMagenta: f("\x1b[45m", "\x1b[49m"),
|
| 51 |
+
bgCyan: f("\x1b[46m", "\x1b[49m"),
|
| 52 |
+
bgWhite: f("\x1b[47m", "\x1b[49m"),
|
| 53 |
+
|
| 54 |
+
blackBright: f("\x1b[90m", "\x1b[39m"),
|
| 55 |
+
redBright: f("\x1b[91m", "\x1b[39m"),
|
| 56 |
+
greenBright: f("\x1b[92m", "\x1b[39m"),
|
| 57 |
+
yellowBright: f("\x1b[93m", "\x1b[39m"),
|
| 58 |
+
blueBright: f("\x1b[94m", "\x1b[39m"),
|
| 59 |
+
magentaBright: f("\x1b[95m", "\x1b[39m"),
|
| 60 |
+
cyanBright: f("\x1b[96m", "\x1b[39m"),
|
| 61 |
+
whiteBright: f("\x1b[97m", "\x1b[39m"),
|
| 62 |
+
|
| 63 |
+
bgBlackBright: f("\x1b[100m", "\x1b[49m"),
|
| 64 |
+
bgRedBright: f("\x1b[101m", "\x1b[49m"),
|
| 65 |
+
bgGreenBright: f("\x1b[102m", "\x1b[49m"),
|
| 66 |
+
bgYellowBright: f("\x1b[103m", "\x1b[49m"),
|
| 67 |
+
bgBlueBright: f("\x1b[104m", "\x1b[49m"),
|
| 68 |
+
bgMagentaBright: f("\x1b[105m", "\x1b[49m"),
|
| 69 |
+
bgCyanBright: f("\x1b[106m", "\x1b[49m"),
|
| 70 |
+
bgWhiteBright: f("\x1b[107m", "\x1b[49m"),
|
| 71 |
+
}
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
module.exports = createColors()
|
| 75 |
+
module.exports.createColors = createColors
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/at-rule.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let Container = require('./container')
|
| 4 |
+
|
| 5 |
+
class AtRule extends Container {
|
| 6 |
+
constructor(defaults) {
|
| 7 |
+
super(defaults)
|
| 8 |
+
this.type = 'atrule'
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
append(...children) {
|
| 12 |
+
if (!this.proxyOf.nodes) this.nodes = []
|
| 13 |
+
return super.append(...children)
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
prepend(...children) {
|
| 17 |
+
if (!this.proxyOf.nodes) this.nodes = []
|
| 18 |
+
return super.prepend(...children)
|
| 19 |
+
}
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
module.exports = AtRule
|
| 23 |
+
AtRule.default = AtRule
|
| 24 |
+
|
| 25 |
+
Container.registerAtRule(AtRule)
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/comment.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let Node = require('./node')
|
| 4 |
+
|
| 5 |
+
class Comment extends Node {
|
| 6 |
+
constructor(defaults) {
|
| 7 |
+
super(defaults)
|
| 8 |
+
this.type = 'comment'
|
| 9 |
+
}
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
module.exports = Comment
|
| 13 |
+
Comment.default = Comment
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/container.js
ADDED
|
@@ -0,0 +1,439 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let { isClean, my } = require('./symbols')
|
| 4 |
+
let Declaration = require('./declaration')
|
| 5 |
+
let Comment = require('./comment')
|
| 6 |
+
let Node = require('./node')
|
| 7 |
+
|
| 8 |
+
let parse, Rule, AtRule, Root
|
| 9 |
+
|
| 10 |
+
function cleanSource(nodes) {
|
| 11 |
+
return nodes.map(i => {
|
| 12 |
+
if (i.nodes) i.nodes = cleanSource(i.nodes)
|
| 13 |
+
delete i.source
|
| 14 |
+
return i
|
| 15 |
+
})
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
function markDirtyUp(node) {
|
| 19 |
+
node[isClean] = false
|
| 20 |
+
if (node.proxyOf.nodes) {
|
| 21 |
+
for (let i of node.proxyOf.nodes) {
|
| 22 |
+
markDirtyUp(i)
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
class Container extends Node {
|
| 28 |
+
append(...children) {
|
| 29 |
+
for (let child of children) {
|
| 30 |
+
let nodes = this.normalize(child, this.last)
|
| 31 |
+
for (let node of nodes) this.proxyOf.nodes.push(node)
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
this.markDirty()
|
| 35 |
+
|
| 36 |
+
return this
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
cleanRaws(keepBetween) {
|
| 40 |
+
super.cleanRaws(keepBetween)
|
| 41 |
+
if (this.nodes) {
|
| 42 |
+
for (let node of this.nodes) node.cleanRaws(keepBetween)
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
each(callback) {
|
| 47 |
+
if (!this.proxyOf.nodes) return undefined
|
| 48 |
+
let iterator = this.getIterator()
|
| 49 |
+
|
| 50 |
+
let index, result
|
| 51 |
+
while (this.indexes[iterator] < this.proxyOf.nodes.length) {
|
| 52 |
+
index = this.indexes[iterator]
|
| 53 |
+
result = callback(this.proxyOf.nodes[index], index)
|
| 54 |
+
if (result === false) break
|
| 55 |
+
|
| 56 |
+
this.indexes[iterator] += 1
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
delete this.indexes[iterator]
|
| 60 |
+
return result
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
every(condition) {
|
| 64 |
+
return this.nodes.every(condition)
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
getIterator() {
|
| 68 |
+
if (!this.lastEach) this.lastEach = 0
|
| 69 |
+
if (!this.indexes) this.indexes = {}
|
| 70 |
+
|
| 71 |
+
this.lastEach += 1
|
| 72 |
+
let iterator = this.lastEach
|
| 73 |
+
this.indexes[iterator] = 0
|
| 74 |
+
|
| 75 |
+
return iterator
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
getProxyProcessor() {
|
| 79 |
+
return {
|
| 80 |
+
get(node, prop) {
|
| 81 |
+
if (prop === 'proxyOf') {
|
| 82 |
+
return node
|
| 83 |
+
} else if (!node[prop]) {
|
| 84 |
+
return node[prop]
|
| 85 |
+
} else if (
|
| 86 |
+
prop === 'each' ||
|
| 87 |
+
(typeof prop === 'string' && prop.startsWith('walk'))
|
| 88 |
+
) {
|
| 89 |
+
return (...args) => {
|
| 90 |
+
return node[prop](
|
| 91 |
+
...args.map(i => {
|
| 92 |
+
if (typeof i === 'function') {
|
| 93 |
+
return (child, index) => i(child.toProxy(), index)
|
| 94 |
+
} else {
|
| 95 |
+
return i
|
| 96 |
+
}
|
| 97 |
+
})
|
| 98 |
+
)
|
| 99 |
+
}
|
| 100 |
+
} else if (prop === 'every' || prop === 'some') {
|
| 101 |
+
return cb => {
|
| 102 |
+
return node[prop]((child, ...other) =>
|
| 103 |
+
cb(child.toProxy(), ...other)
|
| 104 |
+
)
|
| 105 |
+
}
|
| 106 |
+
} else if (prop === 'root') {
|
| 107 |
+
return () => node.root().toProxy()
|
| 108 |
+
} else if (prop === 'nodes') {
|
| 109 |
+
return node.nodes.map(i => i.toProxy())
|
| 110 |
+
} else if (prop === 'first' || prop === 'last') {
|
| 111 |
+
return node[prop].toProxy()
|
| 112 |
+
} else {
|
| 113 |
+
return node[prop]
|
| 114 |
+
}
|
| 115 |
+
},
|
| 116 |
+
|
| 117 |
+
set(node, prop, value) {
|
| 118 |
+
if (node[prop] === value) return true
|
| 119 |
+
node[prop] = value
|
| 120 |
+
if (prop === 'name' || prop === 'params' || prop === 'selector') {
|
| 121 |
+
node.markDirty()
|
| 122 |
+
}
|
| 123 |
+
return true
|
| 124 |
+
}
|
| 125 |
+
}
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
index(child) {
|
| 129 |
+
if (typeof child === 'number') return child
|
| 130 |
+
if (child.proxyOf) child = child.proxyOf
|
| 131 |
+
return this.proxyOf.nodes.indexOf(child)
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
insertAfter(exist, add) {
|
| 135 |
+
let existIndex = this.index(exist)
|
| 136 |
+
let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()
|
| 137 |
+
existIndex = this.index(exist)
|
| 138 |
+
for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)
|
| 139 |
+
|
| 140 |
+
let index
|
| 141 |
+
for (let id in this.indexes) {
|
| 142 |
+
index = this.indexes[id]
|
| 143 |
+
if (existIndex < index) {
|
| 144 |
+
this.indexes[id] = index + nodes.length
|
| 145 |
+
}
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
this.markDirty()
|
| 149 |
+
|
| 150 |
+
return this
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
insertBefore(exist, add) {
|
| 154 |
+
let existIndex = this.index(exist)
|
| 155 |
+
let type = existIndex === 0 ? 'prepend' : false
|
| 156 |
+
let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse()
|
| 157 |
+
existIndex = this.index(exist)
|
| 158 |
+
for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)
|
| 159 |
+
|
| 160 |
+
let index
|
| 161 |
+
for (let id in this.indexes) {
|
| 162 |
+
index = this.indexes[id]
|
| 163 |
+
if (existIndex <= index) {
|
| 164 |
+
this.indexes[id] = index + nodes.length
|
| 165 |
+
}
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
this.markDirty()
|
| 169 |
+
|
| 170 |
+
return this
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
normalize(nodes, sample) {
|
| 174 |
+
if (typeof nodes === 'string') {
|
| 175 |
+
nodes = cleanSource(parse(nodes).nodes)
|
| 176 |
+
} else if (Array.isArray(nodes)) {
|
| 177 |
+
nodes = nodes.slice(0)
|
| 178 |
+
for (let i of nodes) {
|
| 179 |
+
if (i.parent) i.parent.removeChild(i, 'ignore')
|
| 180 |
+
}
|
| 181 |
+
} else if (nodes.type === 'root' && this.type !== 'document') {
|
| 182 |
+
nodes = nodes.nodes.slice(0)
|
| 183 |
+
for (let i of nodes) {
|
| 184 |
+
if (i.parent) i.parent.removeChild(i, 'ignore')
|
| 185 |
+
}
|
| 186 |
+
} else if (nodes.type) {
|
| 187 |
+
nodes = [nodes]
|
| 188 |
+
} else if (nodes.prop) {
|
| 189 |
+
if (typeof nodes.value === 'undefined') {
|
| 190 |
+
throw new Error('Value field is missed in node creation')
|
| 191 |
+
} else if (typeof nodes.value !== 'string') {
|
| 192 |
+
nodes.value = String(nodes.value)
|
| 193 |
+
}
|
| 194 |
+
nodes = [new Declaration(nodes)]
|
| 195 |
+
} else if (nodes.selector) {
|
| 196 |
+
nodes = [new Rule(nodes)]
|
| 197 |
+
} else if (nodes.name) {
|
| 198 |
+
nodes = [new AtRule(nodes)]
|
| 199 |
+
} else if (nodes.text) {
|
| 200 |
+
nodes = [new Comment(nodes)]
|
| 201 |
+
} else {
|
| 202 |
+
throw new Error('Unknown node type in node creation')
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
let processed = nodes.map(i => {
|
| 206 |
+
/* c8 ignore next */
|
| 207 |
+
if (!i[my]) Container.rebuild(i)
|
| 208 |
+
i = i.proxyOf
|
| 209 |
+
if (i.parent) i.parent.removeChild(i)
|
| 210 |
+
if (i[isClean]) markDirtyUp(i)
|
| 211 |
+
if (typeof i.raws.before === 'undefined') {
|
| 212 |
+
if (sample && typeof sample.raws.before !== 'undefined') {
|
| 213 |
+
i.raws.before = sample.raws.before.replace(/\S/g, '')
|
| 214 |
+
}
|
| 215 |
+
}
|
| 216 |
+
i.parent = this.proxyOf
|
| 217 |
+
return i
|
| 218 |
+
})
|
| 219 |
+
|
| 220 |
+
return processed
|
| 221 |
+
}
|
| 222 |
+
|
| 223 |
+
prepend(...children) {
|
| 224 |
+
children = children.reverse()
|
| 225 |
+
for (let child of children) {
|
| 226 |
+
let nodes = this.normalize(child, this.first, 'prepend').reverse()
|
| 227 |
+
for (let node of nodes) this.proxyOf.nodes.unshift(node)
|
| 228 |
+
for (let id in this.indexes) {
|
| 229 |
+
this.indexes[id] = this.indexes[id] + nodes.length
|
| 230 |
+
}
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
this.markDirty()
|
| 234 |
+
|
| 235 |
+
return this
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
push(child) {
|
| 239 |
+
child.parent = this
|
| 240 |
+
this.proxyOf.nodes.push(child)
|
| 241 |
+
return this
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
removeAll() {
|
| 245 |
+
for (let node of this.proxyOf.nodes) node.parent = undefined
|
| 246 |
+
this.proxyOf.nodes = []
|
| 247 |
+
|
| 248 |
+
this.markDirty()
|
| 249 |
+
|
| 250 |
+
return this
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
removeChild(child) {
|
| 254 |
+
child = this.index(child)
|
| 255 |
+
this.proxyOf.nodes[child].parent = undefined
|
| 256 |
+
this.proxyOf.nodes.splice(child, 1)
|
| 257 |
+
|
| 258 |
+
let index
|
| 259 |
+
for (let id in this.indexes) {
|
| 260 |
+
index = this.indexes[id]
|
| 261 |
+
if (index >= child) {
|
| 262 |
+
this.indexes[id] = index - 1
|
| 263 |
+
}
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
this.markDirty()
|
| 267 |
+
|
| 268 |
+
return this
|
| 269 |
+
}
|
| 270 |
+
|
| 271 |
+
replaceValues(pattern, opts, callback) {
|
| 272 |
+
if (!callback) {
|
| 273 |
+
callback = opts
|
| 274 |
+
opts = {}
|
| 275 |
+
}
|
| 276 |
+
|
| 277 |
+
this.walkDecls(decl => {
|
| 278 |
+
if (opts.props && !opts.props.includes(decl.prop)) return
|
| 279 |
+
if (opts.fast && !decl.value.includes(opts.fast)) return
|
| 280 |
+
|
| 281 |
+
decl.value = decl.value.replace(pattern, callback)
|
| 282 |
+
})
|
| 283 |
+
|
| 284 |
+
this.markDirty()
|
| 285 |
+
|
| 286 |
+
return this
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
some(condition) {
|
| 290 |
+
return this.nodes.some(condition)
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
walk(callback) {
|
| 294 |
+
return this.each((child, i) => {
|
| 295 |
+
let result
|
| 296 |
+
try {
|
| 297 |
+
result = callback(child, i)
|
| 298 |
+
} catch (e) {
|
| 299 |
+
throw child.addToError(e)
|
| 300 |
+
}
|
| 301 |
+
if (result !== false && child.walk) {
|
| 302 |
+
result = child.walk(callback)
|
| 303 |
+
}
|
| 304 |
+
|
| 305 |
+
return result
|
| 306 |
+
})
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
walkAtRules(name, callback) {
|
| 310 |
+
if (!callback) {
|
| 311 |
+
callback = name
|
| 312 |
+
return this.walk((child, i) => {
|
| 313 |
+
if (child.type === 'atrule') {
|
| 314 |
+
return callback(child, i)
|
| 315 |
+
}
|
| 316 |
+
})
|
| 317 |
+
}
|
| 318 |
+
if (name instanceof RegExp) {
|
| 319 |
+
return this.walk((child, i) => {
|
| 320 |
+
if (child.type === 'atrule' && name.test(child.name)) {
|
| 321 |
+
return callback(child, i)
|
| 322 |
+
}
|
| 323 |
+
})
|
| 324 |
+
}
|
| 325 |
+
return this.walk((child, i) => {
|
| 326 |
+
if (child.type === 'atrule' && child.name === name) {
|
| 327 |
+
return callback(child, i)
|
| 328 |
+
}
|
| 329 |
+
})
|
| 330 |
+
}
|
| 331 |
+
|
| 332 |
+
walkComments(callback) {
|
| 333 |
+
return this.walk((child, i) => {
|
| 334 |
+
if (child.type === 'comment') {
|
| 335 |
+
return callback(child, i)
|
| 336 |
+
}
|
| 337 |
+
})
|
| 338 |
+
}
|
| 339 |
+
|
| 340 |
+
walkDecls(prop, callback) {
|
| 341 |
+
if (!callback) {
|
| 342 |
+
callback = prop
|
| 343 |
+
return this.walk((child, i) => {
|
| 344 |
+
if (child.type === 'decl') {
|
| 345 |
+
return callback(child, i)
|
| 346 |
+
}
|
| 347 |
+
})
|
| 348 |
+
}
|
| 349 |
+
if (prop instanceof RegExp) {
|
| 350 |
+
return this.walk((child, i) => {
|
| 351 |
+
if (child.type === 'decl' && prop.test(child.prop)) {
|
| 352 |
+
return callback(child, i)
|
| 353 |
+
}
|
| 354 |
+
})
|
| 355 |
+
}
|
| 356 |
+
return this.walk((child, i) => {
|
| 357 |
+
if (child.type === 'decl' && child.prop === prop) {
|
| 358 |
+
return callback(child, i)
|
| 359 |
+
}
|
| 360 |
+
})
|
| 361 |
+
}
|
| 362 |
+
|
| 363 |
+
walkRules(selector, callback) {
|
| 364 |
+
if (!callback) {
|
| 365 |
+
callback = selector
|
| 366 |
+
|
| 367 |
+
return this.walk((child, i) => {
|
| 368 |
+
if (child.type === 'rule') {
|
| 369 |
+
return callback(child, i)
|
| 370 |
+
}
|
| 371 |
+
})
|
| 372 |
+
}
|
| 373 |
+
if (selector instanceof RegExp) {
|
| 374 |
+
return this.walk((child, i) => {
|
| 375 |
+
if (child.type === 'rule' && selector.test(child.selector)) {
|
| 376 |
+
return callback(child, i)
|
| 377 |
+
}
|
| 378 |
+
})
|
| 379 |
+
}
|
| 380 |
+
return this.walk((child, i) => {
|
| 381 |
+
if (child.type === 'rule' && child.selector === selector) {
|
| 382 |
+
return callback(child, i)
|
| 383 |
+
}
|
| 384 |
+
})
|
| 385 |
+
}
|
| 386 |
+
|
| 387 |
+
get first() {
|
| 388 |
+
if (!this.proxyOf.nodes) return undefined
|
| 389 |
+
return this.proxyOf.nodes[0]
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
+
get last() {
|
| 393 |
+
if (!this.proxyOf.nodes) return undefined
|
| 394 |
+
return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]
|
| 395 |
+
}
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
Container.registerParse = dependant => {
|
| 399 |
+
parse = dependant
|
| 400 |
+
}
|
| 401 |
+
|
| 402 |
+
Container.registerRule = dependant => {
|
| 403 |
+
Rule = dependant
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
+
Container.registerAtRule = dependant => {
|
| 407 |
+
AtRule = dependant
|
| 408 |
+
}
|
| 409 |
+
|
| 410 |
+
Container.registerRoot = dependant => {
|
| 411 |
+
Root = dependant
|
| 412 |
+
}
|
| 413 |
+
|
| 414 |
+
module.exports = Container
|
| 415 |
+
Container.default = Container
|
| 416 |
+
|
| 417 |
+
/* c8 ignore start */
|
| 418 |
+
Container.rebuild = node => {
|
| 419 |
+
if (node.type === 'atrule') {
|
| 420 |
+
Object.setPrototypeOf(node, AtRule.prototype)
|
| 421 |
+
} else if (node.type === 'rule') {
|
| 422 |
+
Object.setPrototypeOf(node, Rule.prototype)
|
| 423 |
+
} else if (node.type === 'decl') {
|
| 424 |
+
Object.setPrototypeOf(node, Declaration.prototype)
|
| 425 |
+
} else if (node.type === 'comment') {
|
| 426 |
+
Object.setPrototypeOf(node, Comment.prototype)
|
| 427 |
+
} else if (node.type === 'root') {
|
| 428 |
+
Object.setPrototypeOf(node, Root.prototype)
|
| 429 |
+
}
|
| 430 |
+
|
| 431 |
+
node[my] = true
|
| 432 |
+
|
| 433 |
+
if (node.nodes) {
|
| 434 |
+
node.nodes.forEach(child => {
|
| 435 |
+
Container.rebuild(child)
|
| 436 |
+
})
|
| 437 |
+
}
|
| 438 |
+
}
|
| 439 |
+
/* c8 ignore stop */
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/css-syntax-error.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let pico = require('picocolors')
|
| 4 |
+
|
| 5 |
+
let terminalHighlight = require('./terminal-highlight')
|
| 6 |
+
|
| 7 |
+
class CssSyntaxError extends Error {
|
| 8 |
+
constructor(message, line, column, source, file, plugin) {
|
| 9 |
+
super(message)
|
| 10 |
+
this.name = 'CssSyntaxError'
|
| 11 |
+
this.reason = message
|
| 12 |
+
|
| 13 |
+
if (file) {
|
| 14 |
+
this.file = file
|
| 15 |
+
}
|
| 16 |
+
if (source) {
|
| 17 |
+
this.source = source
|
| 18 |
+
}
|
| 19 |
+
if (plugin) {
|
| 20 |
+
this.plugin = plugin
|
| 21 |
+
}
|
| 22 |
+
if (typeof line !== 'undefined' && typeof column !== 'undefined') {
|
| 23 |
+
if (typeof line === 'number') {
|
| 24 |
+
this.line = line
|
| 25 |
+
this.column = column
|
| 26 |
+
} else {
|
| 27 |
+
this.line = line.line
|
| 28 |
+
this.column = line.column
|
| 29 |
+
this.endLine = column.line
|
| 30 |
+
this.endColumn = column.column
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
this.setMessage()
|
| 35 |
+
|
| 36 |
+
if (Error.captureStackTrace) {
|
| 37 |
+
Error.captureStackTrace(this, CssSyntaxError)
|
| 38 |
+
}
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
setMessage() {
|
| 42 |
+
this.message = this.plugin ? this.plugin + ': ' : ''
|
| 43 |
+
this.message += this.file ? this.file : '<css input>'
|
| 44 |
+
if (typeof this.line !== 'undefined') {
|
| 45 |
+
this.message += ':' + this.line + ':' + this.column
|
| 46 |
+
}
|
| 47 |
+
this.message += ': ' + this.reason
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
showSourceCode(color) {
|
| 51 |
+
if (!this.source) return ''
|
| 52 |
+
|
| 53 |
+
let css = this.source
|
| 54 |
+
if (color == null) color = pico.isColorSupported
|
| 55 |
+
if (terminalHighlight) {
|
| 56 |
+
if (color) css = terminalHighlight(css)
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
let lines = css.split(/\r?\n/)
|
| 60 |
+
let start = Math.max(this.line - 3, 0)
|
| 61 |
+
let end = Math.min(this.line + 2, lines.length)
|
| 62 |
+
|
| 63 |
+
let maxWidth = String(end).length
|
| 64 |
+
|
| 65 |
+
let mark, aside
|
| 66 |
+
if (color) {
|
| 67 |
+
let { bold, gray, red } = pico.createColors(true)
|
| 68 |
+
mark = text => bold(red(text))
|
| 69 |
+
aside = text => gray(text)
|
| 70 |
+
} else {
|
| 71 |
+
mark = aside = str => str
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
return lines
|
| 75 |
+
.slice(start, end)
|
| 76 |
+
.map((line, index) => {
|
| 77 |
+
let number = start + 1 + index
|
| 78 |
+
let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '
|
| 79 |
+
if (number === this.line) {
|
| 80 |
+
let spacing =
|
| 81 |
+
aside(gutter.replace(/\d/g, ' ')) +
|
| 82 |
+
line.slice(0, this.column - 1).replace(/[^\t]/g, ' ')
|
| 83 |
+
return mark('>') + aside(gutter) + line + '\n ' + spacing + mark('^')
|
| 84 |
+
}
|
| 85 |
+
return ' ' + aside(gutter) + line
|
| 86 |
+
})
|
| 87 |
+
.join('\n')
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
toString() {
|
| 91 |
+
let code = this.showSourceCode()
|
| 92 |
+
if (code) {
|
| 93 |
+
code = '\n\n' + code + '\n'
|
| 94 |
+
}
|
| 95 |
+
return this.name + ': ' + this.message + code
|
| 96 |
+
}
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
module.exports = CssSyntaxError
|
| 100 |
+
CssSyntaxError.default = CssSyntaxError
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/declaration.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let Node = require('./node')
|
| 4 |
+
|
| 5 |
+
class Declaration extends Node {
|
| 6 |
+
constructor(defaults) {
|
| 7 |
+
if (
|
| 8 |
+
defaults &&
|
| 9 |
+
typeof defaults.value !== 'undefined' &&
|
| 10 |
+
typeof defaults.value !== 'string'
|
| 11 |
+
) {
|
| 12 |
+
defaults = { ...defaults, value: String(defaults.value) }
|
| 13 |
+
}
|
| 14 |
+
super(defaults)
|
| 15 |
+
this.type = 'decl'
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
get variable() {
|
| 19 |
+
return this.prop.startsWith('--') || this.prop[0] === '$'
|
| 20 |
+
}
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
module.exports = Declaration
|
| 24 |
+
Declaration.default = Declaration
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/document.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let Container = require('./container')
|
| 4 |
+
|
| 5 |
+
let LazyResult, Processor
|
| 6 |
+
|
| 7 |
+
class Document extends Container {
|
| 8 |
+
constructor(defaults) {
|
| 9 |
+
// type needs to be passed to super, otherwise child roots won't be normalized correctly
|
| 10 |
+
super({ type: 'document', ...defaults })
|
| 11 |
+
|
| 12 |
+
if (!this.nodes) {
|
| 13 |
+
this.nodes = []
|
| 14 |
+
}
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
toResult(opts = {}) {
|
| 18 |
+
let lazy = new LazyResult(new Processor(), this, opts)
|
| 19 |
+
|
| 20 |
+
return lazy.stringify()
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
Document.registerLazyResult = dependant => {
|
| 25 |
+
LazyResult = dependant
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
Document.registerProcessor = dependant => {
|
| 29 |
+
Processor = dependant
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
module.exports = Document
|
| 33 |
+
Document.default = Document
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/fromJSON.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let Declaration = require('./declaration')
|
| 4 |
+
let PreviousMap = require('./previous-map')
|
| 5 |
+
let Comment = require('./comment')
|
| 6 |
+
let AtRule = require('./at-rule')
|
| 7 |
+
let Input = require('./input')
|
| 8 |
+
let Root = require('./root')
|
| 9 |
+
let Rule = require('./rule')
|
| 10 |
+
|
| 11 |
+
function fromJSON(json, inputs) {
|
| 12 |
+
if (Array.isArray(json)) return json.map(n => fromJSON(n))
|
| 13 |
+
|
| 14 |
+
let { inputs: ownInputs, ...defaults } = json
|
| 15 |
+
if (ownInputs) {
|
| 16 |
+
inputs = []
|
| 17 |
+
for (let input of ownInputs) {
|
| 18 |
+
let inputHydrated = { ...input, __proto__: Input.prototype }
|
| 19 |
+
if (inputHydrated.map) {
|
| 20 |
+
inputHydrated.map = {
|
| 21 |
+
...inputHydrated.map,
|
| 22 |
+
__proto__: PreviousMap.prototype
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
inputs.push(inputHydrated)
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
if (defaults.nodes) {
|
| 29 |
+
defaults.nodes = json.nodes.map(n => fromJSON(n, inputs))
|
| 30 |
+
}
|
| 31 |
+
if (defaults.source) {
|
| 32 |
+
let { inputId, ...source } = defaults.source
|
| 33 |
+
defaults.source = source
|
| 34 |
+
if (inputId != null) {
|
| 35 |
+
defaults.source.input = inputs[inputId]
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
if (defaults.type === 'root') {
|
| 39 |
+
return new Root(defaults)
|
| 40 |
+
} else if (defaults.type === 'decl') {
|
| 41 |
+
return new Declaration(defaults)
|
| 42 |
+
} else if (defaults.type === 'rule') {
|
| 43 |
+
return new Rule(defaults)
|
| 44 |
+
} else if (defaults.type === 'comment') {
|
| 45 |
+
return new Comment(defaults)
|
| 46 |
+
} else if (defaults.type === 'atrule') {
|
| 47 |
+
return new AtRule(defaults)
|
| 48 |
+
} else {
|
| 49 |
+
throw new Error('Unknown node type: ' + json.type)
|
| 50 |
+
}
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
module.exports = fromJSON
|
| 54 |
+
fromJSON.default = fromJSON
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/input.js
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
|
| 4 |
+
let { fileURLToPath, pathToFileURL } = require('url')
|
| 5 |
+
let { isAbsolute, resolve } = require('path')
|
| 6 |
+
let { nanoid } = require('nanoid/non-secure')
|
| 7 |
+
|
| 8 |
+
let terminalHighlight = require('./terminal-highlight')
|
| 9 |
+
let CssSyntaxError = require('./css-syntax-error')
|
| 10 |
+
let PreviousMap = require('./previous-map')
|
| 11 |
+
|
| 12 |
+
let fromOffsetCache = Symbol('fromOffsetCache')
|
| 13 |
+
|
| 14 |
+
let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)
|
| 15 |
+
let pathAvailable = Boolean(resolve && isAbsolute)
|
| 16 |
+
|
| 17 |
+
class Input {
|
| 18 |
+
constructor(css, opts = {}) {
|
| 19 |
+
if (
|
| 20 |
+
css === null ||
|
| 21 |
+
typeof css === 'undefined' ||
|
| 22 |
+
(typeof css === 'object' && !css.toString)
|
| 23 |
+
) {
|
| 24 |
+
throw new Error(`PostCSS received ${css} instead of CSS string`)
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
this.css = css.toString()
|
| 28 |
+
|
| 29 |
+
if (this.css[0] === '\uFEFF' || this.css[0] === '\uFFFE') {
|
| 30 |
+
this.hasBOM = true
|
| 31 |
+
this.css = this.css.slice(1)
|
| 32 |
+
} else {
|
| 33 |
+
this.hasBOM = false
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
if (opts.from) {
|
| 37 |
+
if (
|
| 38 |
+
!pathAvailable ||
|
| 39 |
+
/^\w+:\/\//.test(opts.from) ||
|
| 40 |
+
isAbsolute(opts.from)
|
| 41 |
+
) {
|
| 42 |
+
this.file = opts.from
|
| 43 |
+
} else {
|
| 44 |
+
this.file = resolve(opts.from)
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
if (pathAvailable && sourceMapAvailable) {
|
| 49 |
+
let map = new PreviousMap(this.css, opts)
|
| 50 |
+
if (map.text) {
|
| 51 |
+
this.map = map
|
| 52 |
+
let file = map.consumer().file
|
| 53 |
+
if (!this.file && file) this.file = this.mapResolve(file)
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
if (!this.file) {
|
| 58 |
+
this.id = '<input css ' + nanoid(6) + '>'
|
| 59 |
+
}
|
| 60 |
+
if (this.map) this.map.file = this.from
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
error(message, line, column, opts = {}) {
|
| 64 |
+
let result, endLine, endColumn
|
| 65 |
+
|
| 66 |
+
if (line && typeof line === 'object') {
|
| 67 |
+
let start = line
|
| 68 |
+
let end = column
|
| 69 |
+
if (typeof start.offset === 'number') {
|
| 70 |
+
let pos = this.fromOffset(start.offset)
|
| 71 |
+
line = pos.line
|
| 72 |
+
column = pos.col
|
| 73 |
+
} else {
|
| 74 |
+
line = start.line
|
| 75 |
+
column = start.column
|
| 76 |
+
}
|
| 77 |
+
if (typeof end.offset === 'number') {
|
| 78 |
+
let pos = this.fromOffset(end.offset)
|
| 79 |
+
endLine = pos.line
|
| 80 |
+
endColumn = pos.col
|
| 81 |
+
} else {
|
| 82 |
+
endLine = end.line
|
| 83 |
+
endColumn = end.column
|
| 84 |
+
}
|
| 85 |
+
} else if (!column) {
|
| 86 |
+
let pos = this.fromOffset(line)
|
| 87 |
+
line = pos.line
|
| 88 |
+
column = pos.col
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
let origin = this.origin(line, column, endLine, endColumn)
|
| 92 |
+
if (origin) {
|
| 93 |
+
result = new CssSyntaxError(
|
| 94 |
+
message,
|
| 95 |
+
origin.endLine === undefined
|
| 96 |
+
? origin.line
|
| 97 |
+
: { column: origin.column, line: origin.line },
|
| 98 |
+
origin.endLine === undefined
|
| 99 |
+
? origin.column
|
| 100 |
+
: { column: origin.endColumn, line: origin.endLine },
|
| 101 |
+
origin.source,
|
| 102 |
+
origin.file,
|
| 103 |
+
opts.plugin
|
| 104 |
+
)
|
| 105 |
+
} else {
|
| 106 |
+
result = new CssSyntaxError(
|
| 107 |
+
message,
|
| 108 |
+
endLine === undefined ? line : { column, line },
|
| 109 |
+
endLine === undefined ? column : { column: endColumn, line: endLine },
|
| 110 |
+
this.css,
|
| 111 |
+
this.file,
|
| 112 |
+
opts.plugin
|
| 113 |
+
)
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
result.input = { column, endColumn, endLine, line, source: this.css }
|
| 117 |
+
if (this.file) {
|
| 118 |
+
if (pathToFileURL) {
|
| 119 |
+
result.input.url = pathToFileURL(this.file).toString()
|
| 120 |
+
}
|
| 121 |
+
result.input.file = this.file
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
return result
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
fromOffset(offset) {
|
| 128 |
+
let lastLine, lineToIndex
|
| 129 |
+
if (!this[fromOffsetCache]) {
|
| 130 |
+
let lines = this.css.split('\n')
|
| 131 |
+
lineToIndex = new Array(lines.length)
|
| 132 |
+
let prevIndex = 0
|
| 133 |
+
|
| 134 |
+
for (let i = 0, l = lines.length; i < l; i++) {
|
| 135 |
+
lineToIndex[i] = prevIndex
|
| 136 |
+
prevIndex += lines[i].length + 1
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
this[fromOffsetCache] = lineToIndex
|
| 140 |
+
} else {
|
| 141 |
+
lineToIndex = this[fromOffsetCache]
|
| 142 |
+
}
|
| 143 |
+
lastLine = lineToIndex[lineToIndex.length - 1]
|
| 144 |
+
|
| 145 |
+
let min = 0
|
| 146 |
+
if (offset >= lastLine) {
|
| 147 |
+
min = lineToIndex.length - 1
|
| 148 |
+
} else {
|
| 149 |
+
let max = lineToIndex.length - 2
|
| 150 |
+
let mid
|
| 151 |
+
while (min < max) {
|
| 152 |
+
mid = min + ((max - min) >> 1)
|
| 153 |
+
if (offset < lineToIndex[mid]) {
|
| 154 |
+
max = mid - 1
|
| 155 |
+
} else if (offset >= lineToIndex[mid + 1]) {
|
| 156 |
+
min = mid + 1
|
| 157 |
+
} else {
|
| 158 |
+
min = mid
|
| 159 |
+
break
|
| 160 |
+
}
|
| 161 |
+
}
|
| 162 |
+
}
|
| 163 |
+
return {
|
| 164 |
+
col: offset - lineToIndex[min] + 1,
|
| 165 |
+
line: min + 1
|
| 166 |
+
}
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
mapResolve(file) {
|
| 170 |
+
if (/^\w+:\/\//.test(file)) {
|
| 171 |
+
return file
|
| 172 |
+
}
|
| 173 |
+
return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file)
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
origin(line, column, endLine, endColumn) {
|
| 177 |
+
if (!this.map) return false
|
| 178 |
+
let consumer = this.map.consumer()
|
| 179 |
+
|
| 180 |
+
let from = consumer.originalPositionFor({ column, line })
|
| 181 |
+
if (!from.source) return false
|
| 182 |
+
|
| 183 |
+
let to
|
| 184 |
+
if (typeof endLine === 'number') {
|
| 185 |
+
to = consumer.originalPositionFor({ column: endColumn, line: endLine })
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
let fromUrl
|
| 189 |
+
|
| 190 |
+
if (isAbsolute(from.source)) {
|
| 191 |
+
fromUrl = pathToFileURL(from.source)
|
| 192 |
+
} else {
|
| 193 |
+
fromUrl = new URL(
|
| 194 |
+
from.source,
|
| 195 |
+
this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)
|
| 196 |
+
)
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
let result = {
|
| 200 |
+
column: from.column,
|
| 201 |
+
endColumn: to && to.column,
|
| 202 |
+
endLine: to && to.line,
|
| 203 |
+
line: from.line,
|
| 204 |
+
url: fromUrl.toString()
|
| 205 |
+
}
|
| 206 |
+
|
| 207 |
+
if (fromUrl.protocol === 'file:') {
|
| 208 |
+
if (fileURLToPath) {
|
| 209 |
+
result.file = fileURLToPath(fromUrl)
|
| 210 |
+
} else {
|
| 211 |
+
/* c8 ignore next 2 */
|
| 212 |
+
throw new Error(`file: protocol is not available in this PostCSS build`)
|
| 213 |
+
}
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
let source = consumer.sourceContentFor(from.source)
|
| 217 |
+
if (source) result.source = source
|
| 218 |
+
|
| 219 |
+
return result
|
| 220 |
+
}
|
| 221 |
+
|
| 222 |
+
toJSON() {
|
| 223 |
+
let json = {}
|
| 224 |
+
for (let name of ['hasBOM', 'css', 'file', 'id']) {
|
| 225 |
+
if (this[name] != null) {
|
| 226 |
+
json[name] = this[name]
|
| 227 |
+
}
|
| 228 |
+
}
|
| 229 |
+
if (this.map) {
|
| 230 |
+
json.map = { ...this.map }
|
| 231 |
+
if (json.map.consumerCache) {
|
| 232 |
+
json.map.consumerCache = undefined
|
| 233 |
+
}
|
| 234 |
+
}
|
| 235 |
+
return json
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
get from() {
|
| 239 |
+
return this.file || this.id
|
| 240 |
+
}
|
| 241 |
+
}
|
| 242 |
+
|
| 243 |
+
module.exports = Input
|
| 244 |
+
Input.default = Input
|
| 245 |
+
|
| 246 |
+
if (terminalHighlight && terminalHighlight.registerInput) {
|
| 247 |
+
terminalHighlight.registerInput(Input)
|
| 248 |
+
}
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/lazy-result.js
ADDED
|
@@ -0,0 +1,550 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let { isClean, my } = require('./symbols')
|
| 4 |
+
let MapGenerator = require('./map-generator')
|
| 5 |
+
let stringify = require('./stringify')
|
| 6 |
+
let Container = require('./container')
|
| 7 |
+
let Document = require('./document')
|
| 8 |
+
let warnOnce = require('./warn-once')
|
| 9 |
+
let Result = require('./result')
|
| 10 |
+
let parse = require('./parse')
|
| 11 |
+
let Root = require('./root')
|
| 12 |
+
|
| 13 |
+
const TYPE_TO_CLASS_NAME = {
|
| 14 |
+
atrule: 'AtRule',
|
| 15 |
+
comment: 'Comment',
|
| 16 |
+
decl: 'Declaration',
|
| 17 |
+
document: 'Document',
|
| 18 |
+
root: 'Root',
|
| 19 |
+
rule: 'Rule'
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
const PLUGIN_PROPS = {
|
| 23 |
+
AtRule: true,
|
| 24 |
+
AtRuleExit: true,
|
| 25 |
+
Comment: true,
|
| 26 |
+
CommentExit: true,
|
| 27 |
+
Declaration: true,
|
| 28 |
+
DeclarationExit: true,
|
| 29 |
+
Document: true,
|
| 30 |
+
DocumentExit: true,
|
| 31 |
+
Once: true,
|
| 32 |
+
OnceExit: true,
|
| 33 |
+
postcssPlugin: true,
|
| 34 |
+
prepare: true,
|
| 35 |
+
Root: true,
|
| 36 |
+
RootExit: true,
|
| 37 |
+
Rule: true,
|
| 38 |
+
RuleExit: true
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
const NOT_VISITORS = {
|
| 42 |
+
Once: true,
|
| 43 |
+
postcssPlugin: true,
|
| 44 |
+
prepare: true
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
const CHILDREN = 0
|
| 48 |
+
|
| 49 |
+
function isPromise(obj) {
|
| 50 |
+
return typeof obj === 'object' && typeof obj.then === 'function'
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
function getEvents(node) {
|
| 54 |
+
let key = false
|
| 55 |
+
let type = TYPE_TO_CLASS_NAME[node.type]
|
| 56 |
+
if (node.type === 'decl') {
|
| 57 |
+
key = node.prop.toLowerCase()
|
| 58 |
+
} else if (node.type === 'atrule') {
|
| 59 |
+
key = node.name.toLowerCase()
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
if (key && node.append) {
|
| 63 |
+
return [
|
| 64 |
+
type,
|
| 65 |
+
type + '-' + key,
|
| 66 |
+
CHILDREN,
|
| 67 |
+
type + 'Exit',
|
| 68 |
+
type + 'Exit-' + key
|
| 69 |
+
]
|
| 70 |
+
} else if (key) {
|
| 71 |
+
return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key]
|
| 72 |
+
} else if (node.append) {
|
| 73 |
+
return [type, CHILDREN, type + 'Exit']
|
| 74 |
+
} else {
|
| 75 |
+
return [type, type + 'Exit']
|
| 76 |
+
}
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
function toStack(node) {
|
| 80 |
+
let events
|
| 81 |
+
if (node.type === 'document') {
|
| 82 |
+
events = ['Document', CHILDREN, 'DocumentExit']
|
| 83 |
+
} else if (node.type === 'root') {
|
| 84 |
+
events = ['Root', CHILDREN, 'RootExit']
|
| 85 |
+
} else {
|
| 86 |
+
events = getEvents(node)
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
return {
|
| 90 |
+
eventIndex: 0,
|
| 91 |
+
events,
|
| 92 |
+
iterator: 0,
|
| 93 |
+
node,
|
| 94 |
+
visitorIndex: 0,
|
| 95 |
+
visitors: []
|
| 96 |
+
}
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
function cleanMarks(node) {
|
| 100 |
+
node[isClean] = false
|
| 101 |
+
if (node.nodes) node.nodes.forEach(i => cleanMarks(i))
|
| 102 |
+
return node
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
let postcss = {}
|
| 106 |
+
|
| 107 |
+
class LazyResult {
|
| 108 |
+
constructor(processor, css, opts) {
|
| 109 |
+
this.stringified = false
|
| 110 |
+
this.processed = false
|
| 111 |
+
|
| 112 |
+
let root
|
| 113 |
+
if (
|
| 114 |
+
typeof css === 'object' &&
|
| 115 |
+
css !== null &&
|
| 116 |
+
(css.type === 'root' || css.type === 'document')
|
| 117 |
+
) {
|
| 118 |
+
root = cleanMarks(css)
|
| 119 |
+
} else if (css instanceof LazyResult || css instanceof Result) {
|
| 120 |
+
root = cleanMarks(css.root)
|
| 121 |
+
if (css.map) {
|
| 122 |
+
if (typeof opts.map === 'undefined') opts.map = {}
|
| 123 |
+
if (!opts.map.inline) opts.map.inline = false
|
| 124 |
+
opts.map.prev = css.map
|
| 125 |
+
}
|
| 126 |
+
} else {
|
| 127 |
+
let parser = parse
|
| 128 |
+
if (opts.syntax) parser = opts.syntax.parse
|
| 129 |
+
if (opts.parser) parser = opts.parser
|
| 130 |
+
if (parser.parse) parser = parser.parse
|
| 131 |
+
|
| 132 |
+
try {
|
| 133 |
+
root = parser(css, opts)
|
| 134 |
+
} catch (error) {
|
| 135 |
+
this.processed = true
|
| 136 |
+
this.error = error
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
if (root && !root[my]) {
|
| 140 |
+
/* c8 ignore next 2 */
|
| 141 |
+
Container.rebuild(root)
|
| 142 |
+
}
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
this.result = new Result(processor, root, opts)
|
| 146 |
+
this.helpers = { ...postcss, postcss, result: this.result }
|
| 147 |
+
this.plugins = this.processor.plugins.map(plugin => {
|
| 148 |
+
if (typeof plugin === 'object' && plugin.prepare) {
|
| 149 |
+
return { ...plugin, ...plugin.prepare(this.result) }
|
| 150 |
+
} else {
|
| 151 |
+
return plugin
|
| 152 |
+
}
|
| 153 |
+
})
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
async() {
|
| 157 |
+
if (this.error) return Promise.reject(this.error)
|
| 158 |
+
if (this.processed) return Promise.resolve(this.result)
|
| 159 |
+
if (!this.processing) {
|
| 160 |
+
this.processing = this.runAsync()
|
| 161 |
+
}
|
| 162 |
+
return this.processing
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
catch(onRejected) {
|
| 166 |
+
return this.async().catch(onRejected)
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
finally(onFinally) {
|
| 170 |
+
return this.async().then(onFinally, onFinally)
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
getAsyncError() {
|
| 174 |
+
throw new Error('Use process(css).then(cb) to work with async plugins')
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
handleError(error, node) {
|
| 178 |
+
let plugin = this.result.lastPlugin
|
| 179 |
+
try {
|
| 180 |
+
if (node) node.addToError(error)
|
| 181 |
+
this.error = error
|
| 182 |
+
if (error.name === 'CssSyntaxError' && !error.plugin) {
|
| 183 |
+
error.plugin = plugin.postcssPlugin
|
| 184 |
+
error.setMessage()
|
| 185 |
+
} else if (plugin.postcssVersion) {
|
| 186 |
+
if (process.env.NODE_ENV !== 'production') {
|
| 187 |
+
let pluginName = plugin.postcssPlugin
|
| 188 |
+
let pluginVer = plugin.postcssVersion
|
| 189 |
+
let runtimeVer = this.result.processor.version
|
| 190 |
+
let a = pluginVer.split('.')
|
| 191 |
+
let b = runtimeVer.split('.')
|
| 192 |
+
|
| 193 |
+
if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) {
|
| 194 |
+
// eslint-disable-next-line no-console
|
| 195 |
+
console.error(
|
| 196 |
+
'Unknown error from PostCSS plugin. Your current PostCSS ' +
|
| 197 |
+
'version is ' +
|
| 198 |
+
runtimeVer +
|
| 199 |
+
', but ' +
|
| 200 |
+
pluginName +
|
| 201 |
+
' uses ' +
|
| 202 |
+
pluginVer +
|
| 203 |
+
'. Perhaps this is the source of the error below.'
|
| 204 |
+
)
|
| 205 |
+
}
|
| 206 |
+
}
|
| 207 |
+
}
|
| 208 |
+
} catch (err) {
|
| 209 |
+
/* c8 ignore next 3 */
|
| 210 |
+
// eslint-disable-next-line no-console
|
| 211 |
+
if (console && console.error) console.error(err)
|
| 212 |
+
}
|
| 213 |
+
return error
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
prepareVisitors() {
|
| 217 |
+
this.listeners = {}
|
| 218 |
+
let add = (plugin, type, cb) => {
|
| 219 |
+
if (!this.listeners[type]) this.listeners[type] = []
|
| 220 |
+
this.listeners[type].push([plugin, cb])
|
| 221 |
+
}
|
| 222 |
+
for (let plugin of this.plugins) {
|
| 223 |
+
if (typeof plugin === 'object') {
|
| 224 |
+
for (let event in plugin) {
|
| 225 |
+
if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) {
|
| 226 |
+
throw new Error(
|
| 227 |
+
`Unknown event ${event} in ${plugin.postcssPlugin}. ` +
|
| 228 |
+
`Try to update PostCSS (${this.processor.version} now).`
|
| 229 |
+
)
|
| 230 |
+
}
|
| 231 |
+
if (!NOT_VISITORS[event]) {
|
| 232 |
+
if (typeof plugin[event] === 'object') {
|
| 233 |
+
for (let filter in plugin[event]) {
|
| 234 |
+
if (filter === '*') {
|
| 235 |
+
add(plugin, event, plugin[event][filter])
|
| 236 |
+
} else {
|
| 237 |
+
add(
|
| 238 |
+
plugin,
|
| 239 |
+
event + '-' + filter.toLowerCase(),
|
| 240 |
+
plugin[event][filter]
|
| 241 |
+
)
|
| 242 |
+
}
|
| 243 |
+
}
|
| 244 |
+
} else if (typeof plugin[event] === 'function') {
|
| 245 |
+
add(plugin, event, plugin[event])
|
| 246 |
+
}
|
| 247 |
+
}
|
| 248 |
+
}
|
| 249 |
+
}
|
| 250 |
+
}
|
| 251 |
+
this.hasListener = Object.keys(this.listeners).length > 0
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
async runAsync() {
|
| 255 |
+
this.plugin = 0
|
| 256 |
+
for (let i = 0; i < this.plugins.length; i++) {
|
| 257 |
+
let plugin = this.plugins[i]
|
| 258 |
+
let promise = this.runOnRoot(plugin)
|
| 259 |
+
if (isPromise(promise)) {
|
| 260 |
+
try {
|
| 261 |
+
await promise
|
| 262 |
+
} catch (error) {
|
| 263 |
+
throw this.handleError(error)
|
| 264 |
+
}
|
| 265 |
+
}
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
this.prepareVisitors()
|
| 269 |
+
if (this.hasListener) {
|
| 270 |
+
let root = this.result.root
|
| 271 |
+
while (!root[isClean]) {
|
| 272 |
+
root[isClean] = true
|
| 273 |
+
let stack = [toStack(root)]
|
| 274 |
+
while (stack.length > 0) {
|
| 275 |
+
let promise = this.visitTick(stack)
|
| 276 |
+
if (isPromise(promise)) {
|
| 277 |
+
try {
|
| 278 |
+
await promise
|
| 279 |
+
} catch (e) {
|
| 280 |
+
let node = stack[stack.length - 1].node
|
| 281 |
+
throw this.handleError(e, node)
|
| 282 |
+
}
|
| 283 |
+
}
|
| 284 |
+
}
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
if (this.listeners.OnceExit) {
|
| 288 |
+
for (let [plugin, visitor] of this.listeners.OnceExit) {
|
| 289 |
+
this.result.lastPlugin = plugin
|
| 290 |
+
try {
|
| 291 |
+
if (root.type === 'document') {
|
| 292 |
+
let roots = root.nodes.map(subRoot =>
|
| 293 |
+
visitor(subRoot, this.helpers)
|
| 294 |
+
)
|
| 295 |
+
|
| 296 |
+
await Promise.all(roots)
|
| 297 |
+
} else {
|
| 298 |
+
await visitor(root, this.helpers)
|
| 299 |
+
}
|
| 300 |
+
} catch (e) {
|
| 301 |
+
throw this.handleError(e)
|
| 302 |
+
}
|
| 303 |
+
}
|
| 304 |
+
}
|
| 305 |
+
}
|
| 306 |
+
|
| 307 |
+
this.processed = true
|
| 308 |
+
return this.stringify()
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
runOnRoot(plugin) {
|
| 312 |
+
this.result.lastPlugin = plugin
|
| 313 |
+
try {
|
| 314 |
+
if (typeof plugin === 'object' && plugin.Once) {
|
| 315 |
+
if (this.result.root.type === 'document') {
|
| 316 |
+
let roots = this.result.root.nodes.map(root =>
|
| 317 |
+
plugin.Once(root, this.helpers)
|
| 318 |
+
)
|
| 319 |
+
|
| 320 |
+
if (isPromise(roots[0])) {
|
| 321 |
+
return Promise.all(roots)
|
| 322 |
+
}
|
| 323 |
+
|
| 324 |
+
return roots
|
| 325 |
+
}
|
| 326 |
+
|
| 327 |
+
return plugin.Once(this.result.root, this.helpers)
|
| 328 |
+
} else if (typeof plugin === 'function') {
|
| 329 |
+
return plugin(this.result.root, this.result)
|
| 330 |
+
}
|
| 331 |
+
} catch (error) {
|
| 332 |
+
throw this.handleError(error)
|
| 333 |
+
}
|
| 334 |
+
}
|
| 335 |
+
|
| 336 |
+
stringify() {
|
| 337 |
+
if (this.error) throw this.error
|
| 338 |
+
if (this.stringified) return this.result
|
| 339 |
+
this.stringified = true
|
| 340 |
+
|
| 341 |
+
this.sync()
|
| 342 |
+
|
| 343 |
+
let opts = this.result.opts
|
| 344 |
+
let str = stringify
|
| 345 |
+
if (opts.syntax) str = opts.syntax.stringify
|
| 346 |
+
if (opts.stringifier) str = opts.stringifier
|
| 347 |
+
if (str.stringify) str = str.stringify
|
| 348 |
+
|
| 349 |
+
let map = new MapGenerator(str, this.result.root, this.result.opts)
|
| 350 |
+
let data = map.generate()
|
| 351 |
+
this.result.css = data[0]
|
| 352 |
+
this.result.map = data[1]
|
| 353 |
+
|
| 354 |
+
return this.result
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
+
sync() {
|
| 358 |
+
if (this.error) throw this.error
|
| 359 |
+
if (this.processed) return this.result
|
| 360 |
+
this.processed = true
|
| 361 |
+
|
| 362 |
+
if (this.processing) {
|
| 363 |
+
throw this.getAsyncError()
|
| 364 |
+
}
|
| 365 |
+
|
| 366 |
+
for (let plugin of this.plugins) {
|
| 367 |
+
let promise = this.runOnRoot(plugin)
|
| 368 |
+
if (isPromise(promise)) {
|
| 369 |
+
throw this.getAsyncError()
|
| 370 |
+
}
|
| 371 |
+
}
|
| 372 |
+
|
| 373 |
+
this.prepareVisitors()
|
| 374 |
+
if (this.hasListener) {
|
| 375 |
+
let root = this.result.root
|
| 376 |
+
while (!root[isClean]) {
|
| 377 |
+
root[isClean] = true
|
| 378 |
+
this.walkSync(root)
|
| 379 |
+
}
|
| 380 |
+
if (this.listeners.OnceExit) {
|
| 381 |
+
if (root.type === 'document') {
|
| 382 |
+
for (let subRoot of root.nodes) {
|
| 383 |
+
this.visitSync(this.listeners.OnceExit, subRoot)
|
| 384 |
+
}
|
| 385 |
+
} else {
|
| 386 |
+
this.visitSync(this.listeners.OnceExit, root)
|
| 387 |
+
}
|
| 388 |
+
}
|
| 389 |
+
}
|
| 390 |
+
|
| 391 |
+
return this.result
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
then(onFulfilled, onRejected) {
|
| 395 |
+
if (process.env.NODE_ENV !== 'production') {
|
| 396 |
+
if (!('from' in this.opts)) {
|
| 397 |
+
warnOnce(
|
| 398 |
+
'Without `from` option PostCSS could generate wrong source map ' +
|
| 399 |
+
'and will not find Browserslist config. Set it to CSS file path ' +
|
| 400 |
+
'or to `undefined` to prevent this warning.'
|
| 401 |
+
)
|
| 402 |
+
}
|
| 403 |
+
}
|
| 404 |
+
return this.async().then(onFulfilled, onRejected)
|
| 405 |
+
}
|
| 406 |
+
|
| 407 |
+
toString() {
|
| 408 |
+
return this.css
|
| 409 |
+
}
|
| 410 |
+
|
| 411 |
+
visitSync(visitors, node) {
|
| 412 |
+
for (let [plugin, visitor] of visitors) {
|
| 413 |
+
this.result.lastPlugin = plugin
|
| 414 |
+
let promise
|
| 415 |
+
try {
|
| 416 |
+
promise = visitor(node, this.helpers)
|
| 417 |
+
} catch (e) {
|
| 418 |
+
throw this.handleError(e, node.proxyOf)
|
| 419 |
+
}
|
| 420 |
+
if (node.type !== 'root' && node.type !== 'document' && !node.parent) {
|
| 421 |
+
return true
|
| 422 |
+
}
|
| 423 |
+
if (isPromise(promise)) {
|
| 424 |
+
throw this.getAsyncError()
|
| 425 |
+
}
|
| 426 |
+
}
|
| 427 |
+
}
|
| 428 |
+
|
| 429 |
+
visitTick(stack) {
|
| 430 |
+
let visit = stack[stack.length - 1]
|
| 431 |
+
let { node, visitors } = visit
|
| 432 |
+
|
| 433 |
+
if (node.type !== 'root' && node.type !== 'document' && !node.parent) {
|
| 434 |
+
stack.pop()
|
| 435 |
+
return
|
| 436 |
+
}
|
| 437 |
+
|
| 438 |
+
if (visitors.length > 0 && visit.visitorIndex < visitors.length) {
|
| 439 |
+
let [plugin, visitor] = visitors[visit.visitorIndex]
|
| 440 |
+
visit.visitorIndex += 1
|
| 441 |
+
if (visit.visitorIndex === visitors.length) {
|
| 442 |
+
visit.visitors = []
|
| 443 |
+
visit.visitorIndex = 0
|
| 444 |
+
}
|
| 445 |
+
this.result.lastPlugin = plugin
|
| 446 |
+
try {
|
| 447 |
+
return visitor(node.toProxy(), this.helpers)
|
| 448 |
+
} catch (e) {
|
| 449 |
+
throw this.handleError(e, node)
|
| 450 |
+
}
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
if (visit.iterator !== 0) {
|
| 454 |
+
let iterator = visit.iterator
|
| 455 |
+
let child
|
| 456 |
+
while ((child = node.nodes[node.indexes[iterator]])) {
|
| 457 |
+
node.indexes[iterator] += 1
|
| 458 |
+
if (!child[isClean]) {
|
| 459 |
+
child[isClean] = true
|
| 460 |
+
stack.push(toStack(child))
|
| 461 |
+
return
|
| 462 |
+
}
|
| 463 |
+
}
|
| 464 |
+
visit.iterator = 0
|
| 465 |
+
delete node.indexes[iterator]
|
| 466 |
+
}
|
| 467 |
+
|
| 468 |
+
let events = visit.events
|
| 469 |
+
while (visit.eventIndex < events.length) {
|
| 470 |
+
let event = events[visit.eventIndex]
|
| 471 |
+
visit.eventIndex += 1
|
| 472 |
+
if (event === CHILDREN) {
|
| 473 |
+
if (node.nodes && node.nodes.length) {
|
| 474 |
+
node[isClean] = true
|
| 475 |
+
visit.iterator = node.getIterator()
|
| 476 |
+
}
|
| 477 |
+
return
|
| 478 |
+
} else if (this.listeners[event]) {
|
| 479 |
+
visit.visitors = this.listeners[event]
|
| 480 |
+
return
|
| 481 |
+
}
|
| 482 |
+
}
|
| 483 |
+
stack.pop()
|
| 484 |
+
}
|
| 485 |
+
|
| 486 |
+
walkSync(node) {
|
| 487 |
+
node[isClean] = true
|
| 488 |
+
let events = getEvents(node)
|
| 489 |
+
for (let event of events) {
|
| 490 |
+
if (event === CHILDREN) {
|
| 491 |
+
if (node.nodes) {
|
| 492 |
+
node.each(child => {
|
| 493 |
+
if (!child[isClean]) this.walkSync(child)
|
| 494 |
+
})
|
| 495 |
+
}
|
| 496 |
+
} else {
|
| 497 |
+
let visitors = this.listeners[event]
|
| 498 |
+
if (visitors) {
|
| 499 |
+
if (this.visitSync(visitors, node.toProxy())) return
|
| 500 |
+
}
|
| 501 |
+
}
|
| 502 |
+
}
|
| 503 |
+
}
|
| 504 |
+
|
| 505 |
+
warnings() {
|
| 506 |
+
return this.sync().warnings()
|
| 507 |
+
}
|
| 508 |
+
|
| 509 |
+
get content() {
|
| 510 |
+
return this.stringify().content
|
| 511 |
+
}
|
| 512 |
+
|
| 513 |
+
get css() {
|
| 514 |
+
return this.stringify().css
|
| 515 |
+
}
|
| 516 |
+
|
| 517 |
+
get map() {
|
| 518 |
+
return this.stringify().map
|
| 519 |
+
}
|
| 520 |
+
|
| 521 |
+
get messages() {
|
| 522 |
+
return this.sync().messages
|
| 523 |
+
}
|
| 524 |
+
|
| 525 |
+
get opts() {
|
| 526 |
+
return this.result.opts
|
| 527 |
+
}
|
| 528 |
+
|
| 529 |
+
get processor() {
|
| 530 |
+
return this.result.processor
|
| 531 |
+
}
|
| 532 |
+
|
| 533 |
+
get root() {
|
| 534 |
+
return this.sync().root
|
| 535 |
+
}
|
| 536 |
+
|
| 537 |
+
get [Symbol.toStringTag]() {
|
| 538 |
+
return 'LazyResult'
|
| 539 |
+
}
|
| 540 |
+
}
|
| 541 |
+
|
| 542 |
+
LazyResult.registerPostcss = dependant => {
|
| 543 |
+
postcss = dependant
|
| 544 |
+
}
|
| 545 |
+
|
| 546 |
+
module.exports = LazyResult
|
| 547 |
+
LazyResult.default = LazyResult
|
| 548 |
+
|
| 549 |
+
Root.registerLazyResult(LazyResult)
|
| 550 |
+
Document.registerLazyResult(LazyResult)
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/list.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let list = {
|
| 4 |
+
comma(string) {
|
| 5 |
+
return list.split(string, [','], true)
|
| 6 |
+
},
|
| 7 |
+
|
| 8 |
+
space(string) {
|
| 9 |
+
let spaces = [' ', '\n', '\t']
|
| 10 |
+
return list.split(string, spaces)
|
| 11 |
+
},
|
| 12 |
+
|
| 13 |
+
split(string, separators, last) {
|
| 14 |
+
let array = []
|
| 15 |
+
let current = ''
|
| 16 |
+
let split = false
|
| 17 |
+
|
| 18 |
+
let func = 0
|
| 19 |
+
let inQuote = false
|
| 20 |
+
let prevQuote = ''
|
| 21 |
+
let escape = false
|
| 22 |
+
|
| 23 |
+
for (let letter of string) {
|
| 24 |
+
if (escape) {
|
| 25 |
+
escape = false
|
| 26 |
+
} else if (letter === '\\') {
|
| 27 |
+
escape = true
|
| 28 |
+
} else if (inQuote) {
|
| 29 |
+
if (letter === prevQuote) {
|
| 30 |
+
inQuote = false
|
| 31 |
+
}
|
| 32 |
+
} else if (letter === '"' || letter === "'") {
|
| 33 |
+
inQuote = true
|
| 34 |
+
prevQuote = letter
|
| 35 |
+
} else if (letter === '(') {
|
| 36 |
+
func += 1
|
| 37 |
+
} else if (letter === ')') {
|
| 38 |
+
if (func > 0) func -= 1
|
| 39 |
+
} else if (func === 0) {
|
| 40 |
+
if (separators.includes(letter)) split = true
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
if (split) {
|
| 44 |
+
if (current !== '') array.push(current.trim())
|
| 45 |
+
current = ''
|
| 46 |
+
split = false
|
| 47 |
+
} else {
|
| 48 |
+
current += letter
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
if (last || current !== '') array.push(current.trim())
|
| 53 |
+
return array
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
module.exports = list
|
| 58 |
+
list.default = list
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/map-generator.js
ADDED
|
@@ -0,0 +1,359 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
|
| 4 |
+
let { dirname, relative, resolve, sep } = require('path')
|
| 5 |
+
let { pathToFileURL } = require('url')
|
| 6 |
+
|
| 7 |
+
let Input = require('./input')
|
| 8 |
+
|
| 9 |
+
let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)
|
| 10 |
+
let pathAvailable = Boolean(dirname && resolve && relative && sep)
|
| 11 |
+
|
| 12 |
+
class MapGenerator {
|
| 13 |
+
constructor(stringify, root, opts, cssString) {
|
| 14 |
+
this.stringify = stringify
|
| 15 |
+
this.mapOpts = opts.map || {}
|
| 16 |
+
this.root = root
|
| 17 |
+
this.opts = opts
|
| 18 |
+
this.css = cssString
|
| 19 |
+
this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute
|
| 20 |
+
|
| 21 |
+
this.memoizedFileURLs = new Map()
|
| 22 |
+
this.memoizedPaths = new Map()
|
| 23 |
+
this.memoizedURLs = new Map()
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
addAnnotation() {
|
| 27 |
+
let content
|
| 28 |
+
|
| 29 |
+
if (this.isInline()) {
|
| 30 |
+
content =
|
| 31 |
+
'data:application/json;base64,' + this.toBase64(this.map.toString())
|
| 32 |
+
} else if (typeof this.mapOpts.annotation === 'string') {
|
| 33 |
+
content = this.mapOpts.annotation
|
| 34 |
+
} else if (typeof this.mapOpts.annotation === 'function') {
|
| 35 |
+
content = this.mapOpts.annotation(this.opts.to, this.root)
|
| 36 |
+
} else {
|
| 37 |
+
content = this.outputFile() + '.map'
|
| 38 |
+
}
|
| 39 |
+
let eol = '\n'
|
| 40 |
+
if (this.css.includes('\r\n')) eol = '\r\n'
|
| 41 |
+
|
| 42 |
+
this.css += eol + '/*# sourceMappingURL=' + content + ' */'
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
applyPrevMaps() {
|
| 46 |
+
for (let prev of this.previous()) {
|
| 47 |
+
let from = this.toUrl(this.path(prev.file))
|
| 48 |
+
let root = prev.root || dirname(prev.file)
|
| 49 |
+
let map
|
| 50 |
+
|
| 51 |
+
if (this.mapOpts.sourcesContent === false) {
|
| 52 |
+
map = new SourceMapConsumer(prev.text)
|
| 53 |
+
if (map.sourcesContent) {
|
| 54 |
+
map.sourcesContent = map.sourcesContent.map(() => null)
|
| 55 |
+
}
|
| 56 |
+
} else {
|
| 57 |
+
map = prev.consumer()
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
this.map.applySourceMap(map, from, this.toUrl(this.path(root)))
|
| 61 |
+
}
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
clearAnnotation() {
|
| 65 |
+
if (this.mapOpts.annotation === false) return
|
| 66 |
+
|
| 67 |
+
if (this.root) {
|
| 68 |
+
let node
|
| 69 |
+
for (let i = this.root.nodes.length - 1; i >= 0; i--) {
|
| 70 |
+
node = this.root.nodes[i]
|
| 71 |
+
if (node.type !== 'comment') continue
|
| 72 |
+
if (node.text.indexOf('# sourceMappingURL=') === 0) {
|
| 73 |
+
this.root.removeChild(i)
|
| 74 |
+
}
|
| 75 |
+
}
|
| 76 |
+
} else if (this.css) {
|
| 77 |
+
this.css = this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm, '')
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
generate() {
|
| 82 |
+
this.clearAnnotation()
|
| 83 |
+
if (pathAvailable && sourceMapAvailable && this.isMap()) {
|
| 84 |
+
return this.generateMap()
|
| 85 |
+
} else {
|
| 86 |
+
let result = ''
|
| 87 |
+
this.stringify(this.root, i => {
|
| 88 |
+
result += i
|
| 89 |
+
})
|
| 90 |
+
return [result]
|
| 91 |
+
}
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
generateMap() {
|
| 95 |
+
if (this.root) {
|
| 96 |
+
this.generateString()
|
| 97 |
+
} else if (this.previous().length === 1) {
|
| 98 |
+
let prev = this.previous()[0].consumer()
|
| 99 |
+
prev.file = this.outputFile()
|
| 100 |
+
this.map = SourceMapGenerator.fromSourceMap(prev)
|
| 101 |
+
} else {
|
| 102 |
+
this.map = new SourceMapGenerator({ file: this.outputFile() })
|
| 103 |
+
this.map.addMapping({
|
| 104 |
+
generated: { column: 0, line: 1 },
|
| 105 |
+
original: { column: 0, line: 1 },
|
| 106 |
+
source: this.opts.from
|
| 107 |
+
? this.toUrl(this.path(this.opts.from))
|
| 108 |
+
: '<no source>'
|
| 109 |
+
})
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
if (this.isSourcesContent()) this.setSourcesContent()
|
| 113 |
+
if (this.root && this.previous().length > 0) this.applyPrevMaps()
|
| 114 |
+
if (this.isAnnotation()) this.addAnnotation()
|
| 115 |
+
|
| 116 |
+
if (this.isInline()) {
|
| 117 |
+
return [this.css]
|
| 118 |
+
} else {
|
| 119 |
+
return [this.css, this.map]
|
| 120 |
+
}
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
generateString() {
|
| 124 |
+
this.css = ''
|
| 125 |
+
this.map = new SourceMapGenerator({ file: this.outputFile() })
|
| 126 |
+
|
| 127 |
+
let line = 1
|
| 128 |
+
let column = 1
|
| 129 |
+
|
| 130 |
+
let noSource = '<no source>'
|
| 131 |
+
let mapping = {
|
| 132 |
+
generated: { column: 0, line: 0 },
|
| 133 |
+
original: { column: 0, line: 0 },
|
| 134 |
+
source: ''
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
let lines, last
|
| 138 |
+
this.stringify(this.root, (str, node, type) => {
|
| 139 |
+
this.css += str
|
| 140 |
+
|
| 141 |
+
if (node && type !== 'end') {
|
| 142 |
+
mapping.generated.line = line
|
| 143 |
+
mapping.generated.column = column - 1
|
| 144 |
+
if (node.source && node.source.start) {
|
| 145 |
+
mapping.source = this.sourcePath(node)
|
| 146 |
+
mapping.original.line = node.source.start.line
|
| 147 |
+
mapping.original.column = node.source.start.column - 1
|
| 148 |
+
this.map.addMapping(mapping)
|
| 149 |
+
} else {
|
| 150 |
+
mapping.source = noSource
|
| 151 |
+
mapping.original.line = 1
|
| 152 |
+
mapping.original.column = 0
|
| 153 |
+
this.map.addMapping(mapping)
|
| 154 |
+
}
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
lines = str.match(/\n/g)
|
| 158 |
+
if (lines) {
|
| 159 |
+
line += lines.length
|
| 160 |
+
last = str.lastIndexOf('\n')
|
| 161 |
+
column = str.length - last
|
| 162 |
+
} else {
|
| 163 |
+
column += str.length
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
if (node && type !== 'start') {
|
| 167 |
+
let p = node.parent || { raws: {} }
|
| 168 |
+
let childless =
|
| 169 |
+
node.type === 'decl' || (node.type === 'atrule' && !node.nodes)
|
| 170 |
+
if (!childless || node !== p.last || p.raws.semicolon) {
|
| 171 |
+
if (node.source && node.source.end) {
|
| 172 |
+
mapping.source = this.sourcePath(node)
|
| 173 |
+
mapping.original.line = node.source.end.line
|
| 174 |
+
mapping.original.column = node.source.end.column - 1
|
| 175 |
+
mapping.generated.line = line
|
| 176 |
+
mapping.generated.column = column - 2
|
| 177 |
+
this.map.addMapping(mapping)
|
| 178 |
+
} else {
|
| 179 |
+
mapping.source = noSource
|
| 180 |
+
mapping.original.line = 1
|
| 181 |
+
mapping.original.column = 0
|
| 182 |
+
mapping.generated.line = line
|
| 183 |
+
mapping.generated.column = column - 1
|
| 184 |
+
this.map.addMapping(mapping)
|
| 185 |
+
}
|
| 186 |
+
}
|
| 187 |
+
}
|
| 188 |
+
})
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
isAnnotation() {
|
| 192 |
+
if (this.isInline()) {
|
| 193 |
+
return true
|
| 194 |
+
}
|
| 195 |
+
if (typeof this.mapOpts.annotation !== 'undefined') {
|
| 196 |
+
return this.mapOpts.annotation
|
| 197 |
+
}
|
| 198 |
+
if (this.previous().length) {
|
| 199 |
+
return this.previous().some(i => i.annotation)
|
| 200 |
+
}
|
| 201 |
+
return true
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
isInline() {
|
| 205 |
+
if (typeof this.mapOpts.inline !== 'undefined') {
|
| 206 |
+
return this.mapOpts.inline
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
+
let annotation = this.mapOpts.annotation
|
| 210 |
+
if (typeof annotation !== 'undefined' && annotation !== true) {
|
| 211 |
+
return false
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
+
if (this.previous().length) {
|
| 215 |
+
return this.previous().some(i => i.inline)
|
| 216 |
+
}
|
| 217 |
+
return true
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
isMap() {
|
| 221 |
+
if (typeof this.opts.map !== 'undefined') {
|
| 222 |
+
return !!this.opts.map
|
| 223 |
+
}
|
| 224 |
+
return this.previous().length > 0
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
isSourcesContent() {
|
| 228 |
+
if (typeof this.mapOpts.sourcesContent !== 'undefined') {
|
| 229 |
+
return this.mapOpts.sourcesContent
|
| 230 |
+
}
|
| 231 |
+
if (this.previous().length) {
|
| 232 |
+
return this.previous().some(i => i.withContent())
|
| 233 |
+
}
|
| 234 |
+
return true
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
outputFile() {
|
| 238 |
+
if (this.opts.to) {
|
| 239 |
+
return this.path(this.opts.to)
|
| 240 |
+
} else if (this.opts.from) {
|
| 241 |
+
return this.path(this.opts.from)
|
| 242 |
+
} else {
|
| 243 |
+
return 'to.css'
|
| 244 |
+
}
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
path(file) {
|
| 248 |
+
if (this.mapOpts.absolute) return file
|
| 249 |
+
if (file.charCodeAt(0) === 60 /* `<` */) return file
|
| 250 |
+
if (/^\w+:\/\//.test(file)) return file
|
| 251 |
+
let cached = this.memoizedPaths.get(file)
|
| 252 |
+
if (cached) return cached
|
| 253 |
+
|
| 254 |
+
let from = this.opts.to ? dirname(this.opts.to) : '.'
|
| 255 |
+
|
| 256 |
+
if (typeof this.mapOpts.annotation === 'string') {
|
| 257 |
+
from = dirname(resolve(from, this.mapOpts.annotation))
|
| 258 |
+
}
|
| 259 |
+
|
| 260 |
+
let path = relative(from, file)
|
| 261 |
+
this.memoizedPaths.set(file, path)
|
| 262 |
+
|
| 263 |
+
return path
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
previous() {
|
| 267 |
+
if (!this.previousMaps) {
|
| 268 |
+
this.previousMaps = []
|
| 269 |
+
if (this.root) {
|
| 270 |
+
this.root.walk(node => {
|
| 271 |
+
if (node.source && node.source.input.map) {
|
| 272 |
+
let map = node.source.input.map
|
| 273 |
+
if (!this.previousMaps.includes(map)) {
|
| 274 |
+
this.previousMaps.push(map)
|
| 275 |
+
}
|
| 276 |
+
}
|
| 277 |
+
})
|
| 278 |
+
} else {
|
| 279 |
+
let input = new Input(this.css, this.opts)
|
| 280 |
+
if (input.map) this.previousMaps.push(input.map)
|
| 281 |
+
}
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
return this.previousMaps
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
setSourcesContent() {
|
| 288 |
+
let already = {}
|
| 289 |
+
if (this.root) {
|
| 290 |
+
this.root.walk(node => {
|
| 291 |
+
if (node.source) {
|
| 292 |
+
let from = node.source.input.from
|
| 293 |
+
if (from && !already[from]) {
|
| 294 |
+
already[from] = true
|
| 295 |
+
let fromUrl = this.usesFileUrls
|
| 296 |
+
? this.toFileUrl(from)
|
| 297 |
+
: this.toUrl(this.path(from))
|
| 298 |
+
this.map.setSourceContent(fromUrl, node.source.input.css)
|
| 299 |
+
}
|
| 300 |
+
}
|
| 301 |
+
})
|
| 302 |
+
} else if (this.css) {
|
| 303 |
+
let from = this.opts.from
|
| 304 |
+
? this.toUrl(this.path(this.opts.from))
|
| 305 |
+
: '<no source>'
|
| 306 |
+
this.map.setSourceContent(from, this.css)
|
| 307 |
+
}
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
sourcePath(node) {
|
| 311 |
+
if (this.mapOpts.from) {
|
| 312 |
+
return this.toUrl(this.mapOpts.from)
|
| 313 |
+
} else if (this.usesFileUrls) {
|
| 314 |
+
return this.toFileUrl(node.source.input.from)
|
| 315 |
+
} else {
|
| 316 |
+
return this.toUrl(this.path(node.source.input.from))
|
| 317 |
+
}
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
toBase64(str) {
|
| 321 |
+
if (Buffer) {
|
| 322 |
+
return Buffer.from(str).toString('base64')
|
| 323 |
+
} else {
|
| 324 |
+
return window.btoa(unescape(encodeURIComponent(str)))
|
| 325 |
+
}
|
| 326 |
+
}
|
| 327 |
+
|
| 328 |
+
toFileUrl(path) {
|
| 329 |
+
let cached = this.memoizedFileURLs.get(path)
|
| 330 |
+
if (cached) return cached
|
| 331 |
+
|
| 332 |
+
if (pathToFileURL) {
|
| 333 |
+
let fileURL = pathToFileURL(path).toString()
|
| 334 |
+
this.memoizedFileURLs.set(path, fileURL)
|
| 335 |
+
|
| 336 |
+
return fileURL
|
| 337 |
+
} else {
|
| 338 |
+
throw new Error(
|
| 339 |
+
'`map.absolute` option is not available in this PostCSS build'
|
| 340 |
+
)
|
| 341 |
+
}
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
toUrl(path) {
|
| 345 |
+
let cached = this.memoizedURLs.get(path)
|
| 346 |
+
if (cached) return cached
|
| 347 |
+
|
| 348 |
+
if (sep === '\\') {
|
| 349 |
+
path = path.replace(/\\/g, '/')
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent)
|
| 353 |
+
this.memoizedURLs.set(path, url)
|
| 354 |
+
|
| 355 |
+
return url
|
| 356 |
+
}
|
| 357 |
+
}
|
| 358 |
+
|
| 359 |
+
module.exports = MapGenerator
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/no-work-result.js
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let MapGenerator = require('./map-generator')
|
| 4 |
+
let stringify = require('./stringify')
|
| 5 |
+
let warnOnce = require('./warn-once')
|
| 6 |
+
let parse = require('./parse')
|
| 7 |
+
const Result = require('./result')
|
| 8 |
+
|
| 9 |
+
class NoWorkResult {
|
| 10 |
+
constructor(processor, css, opts) {
|
| 11 |
+
css = css.toString()
|
| 12 |
+
this.stringified = false
|
| 13 |
+
|
| 14 |
+
this._processor = processor
|
| 15 |
+
this._css = css
|
| 16 |
+
this._opts = opts
|
| 17 |
+
this._map = undefined
|
| 18 |
+
let root
|
| 19 |
+
|
| 20 |
+
let str = stringify
|
| 21 |
+
this.result = new Result(this._processor, root, this._opts)
|
| 22 |
+
this.result.css = css
|
| 23 |
+
|
| 24 |
+
let self = this
|
| 25 |
+
Object.defineProperty(this.result, 'root', {
|
| 26 |
+
get() {
|
| 27 |
+
return self.root
|
| 28 |
+
}
|
| 29 |
+
})
|
| 30 |
+
|
| 31 |
+
let map = new MapGenerator(str, root, this._opts, css)
|
| 32 |
+
if (map.isMap()) {
|
| 33 |
+
let [generatedCSS, generatedMap] = map.generate()
|
| 34 |
+
if (generatedCSS) {
|
| 35 |
+
this.result.css = generatedCSS
|
| 36 |
+
}
|
| 37 |
+
if (generatedMap) {
|
| 38 |
+
this.result.map = generatedMap
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
async() {
|
| 44 |
+
if (this.error) return Promise.reject(this.error)
|
| 45 |
+
return Promise.resolve(this.result)
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
catch(onRejected) {
|
| 49 |
+
return this.async().catch(onRejected)
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
finally(onFinally) {
|
| 53 |
+
return this.async().then(onFinally, onFinally)
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
sync() {
|
| 57 |
+
if (this.error) throw this.error
|
| 58 |
+
return this.result
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
then(onFulfilled, onRejected) {
|
| 62 |
+
if (process.env.NODE_ENV !== 'production') {
|
| 63 |
+
if (!('from' in this._opts)) {
|
| 64 |
+
warnOnce(
|
| 65 |
+
'Without `from` option PostCSS could generate wrong source map ' +
|
| 66 |
+
'and will not find Browserslist config. Set it to CSS file path ' +
|
| 67 |
+
'or to `undefined` to prevent this warning.'
|
| 68 |
+
)
|
| 69 |
+
}
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
return this.async().then(onFulfilled, onRejected)
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
toString() {
|
| 76 |
+
return this._css
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
warnings() {
|
| 80 |
+
return []
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
get content() {
|
| 84 |
+
return this.result.css
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
get css() {
|
| 88 |
+
return this.result.css
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
get map() {
|
| 92 |
+
return this.result.map
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
get messages() {
|
| 96 |
+
return []
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
get opts() {
|
| 100 |
+
return this.result.opts
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
get processor() {
|
| 104 |
+
return this.result.processor
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
get root() {
|
| 108 |
+
if (this._root) {
|
| 109 |
+
return this._root
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
let root
|
| 113 |
+
let parser = parse
|
| 114 |
+
|
| 115 |
+
try {
|
| 116 |
+
root = parser(this._css, this._opts)
|
| 117 |
+
} catch (error) {
|
| 118 |
+
this.error = error
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
if (this.error) {
|
| 122 |
+
throw this.error
|
| 123 |
+
} else {
|
| 124 |
+
this._root = root
|
| 125 |
+
return root
|
| 126 |
+
}
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
get [Symbol.toStringTag]() {
|
| 130 |
+
return 'NoWorkResult'
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
module.exports = NoWorkResult
|
| 135 |
+
NoWorkResult.default = NoWorkResult
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/node.js
ADDED
|
@@ -0,0 +1,381 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let { isClean, my } = require('./symbols')
|
| 4 |
+
let CssSyntaxError = require('./css-syntax-error')
|
| 5 |
+
let Stringifier = require('./stringifier')
|
| 6 |
+
let stringify = require('./stringify')
|
| 7 |
+
|
| 8 |
+
function cloneNode(obj, parent) {
|
| 9 |
+
let cloned = new obj.constructor()
|
| 10 |
+
|
| 11 |
+
for (let i in obj) {
|
| 12 |
+
if (!Object.prototype.hasOwnProperty.call(obj, i)) {
|
| 13 |
+
/* c8 ignore next 2 */
|
| 14 |
+
continue
|
| 15 |
+
}
|
| 16 |
+
if (i === 'proxyCache') continue
|
| 17 |
+
let value = obj[i]
|
| 18 |
+
let type = typeof value
|
| 19 |
+
|
| 20 |
+
if (i === 'parent' && type === 'object') {
|
| 21 |
+
if (parent) cloned[i] = parent
|
| 22 |
+
} else if (i === 'source') {
|
| 23 |
+
cloned[i] = value
|
| 24 |
+
} else if (Array.isArray(value)) {
|
| 25 |
+
cloned[i] = value.map(j => cloneNode(j, cloned))
|
| 26 |
+
} else {
|
| 27 |
+
if (type === 'object' && value !== null) value = cloneNode(value)
|
| 28 |
+
cloned[i] = value
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
return cloned
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
class Node {
|
| 36 |
+
constructor(defaults = {}) {
|
| 37 |
+
this.raws = {}
|
| 38 |
+
this[isClean] = false
|
| 39 |
+
this[my] = true
|
| 40 |
+
|
| 41 |
+
for (let name in defaults) {
|
| 42 |
+
if (name === 'nodes') {
|
| 43 |
+
this.nodes = []
|
| 44 |
+
for (let node of defaults[name]) {
|
| 45 |
+
if (typeof node.clone === 'function') {
|
| 46 |
+
this.append(node.clone())
|
| 47 |
+
} else {
|
| 48 |
+
this.append(node)
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
+
} else {
|
| 52 |
+
this[name] = defaults[name]
|
| 53 |
+
}
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
addToError(error) {
|
| 58 |
+
error.postcssNode = this
|
| 59 |
+
if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) {
|
| 60 |
+
let s = this.source
|
| 61 |
+
error.stack = error.stack.replace(
|
| 62 |
+
/\n\s{4}at /,
|
| 63 |
+
`$&${s.input.from}:${s.start.line}:${s.start.column}$&`
|
| 64 |
+
)
|
| 65 |
+
}
|
| 66 |
+
return error
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
after(add) {
|
| 70 |
+
this.parent.insertAfter(this, add)
|
| 71 |
+
return this
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
assign(overrides = {}) {
|
| 75 |
+
for (let name in overrides) {
|
| 76 |
+
this[name] = overrides[name]
|
| 77 |
+
}
|
| 78 |
+
return this
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
before(add) {
|
| 82 |
+
this.parent.insertBefore(this, add)
|
| 83 |
+
return this
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
cleanRaws(keepBetween) {
|
| 87 |
+
delete this.raws.before
|
| 88 |
+
delete this.raws.after
|
| 89 |
+
if (!keepBetween) delete this.raws.between
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
clone(overrides = {}) {
|
| 93 |
+
let cloned = cloneNode(this)
|
| 94 |
+
for (let name in overrides) {
|
| 95 |
+
cloned[name] = overrides[name]
|
| 96 |
+
}
|
| 97 |
+
return cloned
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
cloneAfter(overrides = {}) {
|
| 101 |
+
let cloned = this.clone(overrides)
|
| 102 |
+
this.parent.insertAfter(this, cloned)
|
| 103 |
+
return cloned
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
cloneBefore(overrides = {}) {
|
| 107 |
+
let cloned = this.clone(overrides)
|
| 108 |
+
this.parent.insertBefore(this, cloned)
|
| 109 |
+
return cloned
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
error(message, opts = {}) {
|
| 113 |
+
if (this.source) {
|
| 114 |
+
let { end, start } = this.rangeBy(opts)
|
| 115 |
+
return this.source.input.error(
|
| 116 |
+
message,
|
| 117 |
+
{ column: start.column, line: start.line },
|
| 118 |
+
{ column: end.column, line: end.line },
|
| 119 |
+
opts
|
| 120 |
+
)
|
| 121 |
+
}
|
| 122 |
+
return new CssSyntaxError(message)
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
getProxyProcessor() {
|
| 126 |
+
return {
|
| 127 |
+
get(node, prop) {
|
| 128 |
+
if (prop === 'proxyOf') {
|
| 129 |
+
return node
|
| 130 |
+
} else if (prop === 'root') {
|
| 131 |
+
return () => node.root().toProxy()
|
| 132 |
+
} else {
|
| 133 |
+
return node[prop]
|
| 134 |
+
}
|
| 135 |
+
},
|
| 136 |
+
|
| 137 |
+
set(node, prop, value) {
|
| 138 |
+
if (node[prop] === value) return true
|
| 139 |
+
node[prop] = value
|
| 140 |
+
if (
|
| 141 |
+
prop === 'prop' ||
|
| 142 |
+
prop === 'value' ||
|
| 143 |
+
prop === 'name' ||
|
| 144 |
+
prop === 'params' ||
|
| 145 |
+
prop === 'important' ||
|
| 146 |
+
/* c8 ignore next */
|
| 147 |
+
prop === 'text'
|
| 148 |
+
) {
|
| 149 |
+
node.markDirty()
|
| 150 |
+
}
|
| 151 |
+
return true
|
| 152 |
+
}
|
| 153 |
+
}
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
markDirty() {
|
| 157 |
+
if (this[isClean]) {
|
| 158 |
+
this[isClean] = false
|
| 159 |
+
let next = this
|
| 160 |
+
while ((next = next.parent)) {
|
| 161 |
+
next[isClean] = false
|
| 162 |
+
}
|
| 163 |
+
}
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
next() {
|
| 167 |
+
if (!this.parent) return undefined
|
| 168 |
+
let index = this.parent.index(this)
|
| 169 |
+
return this.parent.nodes[index + 1]
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
positionBy(opts, stringRepresentation) {
|
| 173 |
+
let pos = this.source.start
|
| 174 |
+
if (opts.index) {
|
| 175 |
+
pos = this.positionInside(opts.index, stringRepresentation)
|
| 176 |
+
} else if (opts.word) {
|
| 177 |
+
stringRepresentation = this.toString()
|
| 178 |
+
let index = stringRepresentation.indexOf(opts.word)
|
| 179 |
+
if (index !== -1) pos = this.positionInside(index, stringRepresentation)
|
| 180 |
+
}
|
| 181 |
+
return pos
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
positionInside(index, stringRepresentation) {
|
| 185 |
+
let string = stringRepresentation || this.toString()
|
| 186 |
+
let column = this.source.start.column
|
| 187 |
+
let line = this.source.start.line
|
| 188 |
+
|
| 189 |
+
for (let i = 0; i < index; i++) {
|
| 190 |
+
if (string[i] === '\n') {
|
| 191 |
+
column = 1
|
| 192 |
+
line += 1
|
| 193 |
+
} else {
|
| 194 |
+
column += 1
|
| 195 |
+
}
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
return { column, line }
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
prev() {
|
| 202 |
+
if (!this.parent) return undefined
|
| 203 |
+
let index = this.parent.index(this)
|
| 204 |
+
return this.parent.nodes[index - 1]
|
| 205 |
+
}
|
| 206 |
+
|
| 207 |
+
rangeBy(opts) {
|
| 208 |
+
let start = {
|
| 209 |
+
column: this.source.start.column,
|
| 210 |
+
line: this.source.start.line
|
| 211 |
+
}
|
| 212 |
+
let end = this.source.end
|
| 213 |
+
? {
|
| 214 |
+
column: this.source.end.column + 1,
|
| 215 |
+
line: this.source.end.line
|
| 216 |
+
}
|
| 217 |
+
: {
|
| 218 |
+
column: start.column + 1,
|
| 219 |
+
line: start.line
|
| 220 |
+
}
|
| 221 |
+
|
| 222 |
+
if (opts.word) {
|
| 223 |
+
let stringRepresentation = this.toString()
|
| 224 |
+
let index = stringRepresentation.indexOf(opts.word)
|
| 225 |
+
if (index !== -1) {
|
| 226 |
+
start = this.positionInside(index, stringRepresentation)
|
| 227 |
+
end = this.positionInside(index + opts.word.length, stringRepresentation)
|
| 228 |
+
}
|
| 229 |
+
} else {
|
| 230 |
+
if (opts.start) {
|
| 231 |
+
start = {
|
| 232 |
+
column: opts.start.column,
|
| 233 |
+
line: opts.start.line
|
| 234 |
+
}
|
| 235 |
+
} else if (opts.index) {
|
| 236 |
+
start = this.positionInside(opts.index)
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
if (opts.end) {
|
| 240 |
+
end = {
|
| 241 |
+
column: opts.end.column,
|
| 242 |
+
line: opts.end.line
|
| 243 |
+
}
|
| 244 |
+
} else if (opts.endIndex) {
|
| 245 |
+
end = this.positionInside(opts.endIndex)
|
| 246 |
+
} else if (opts.index) {
|
| 247 |
+
end = this.positionInside(opts.index + 1)
|
| 248 |
+
}
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
+
if (
|
| 252 |
+
end.line < start.line ||
|
| 253 |
+
(end.line === start.line && end.column <= start.column)
|
| 254 |
+
) {
|
| 255 |
+
end = { column: start.column + 1, line: start.line }
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
return { end, start }
|
| 259 |
+
}
|
| 260 |
+
|
| 261 |
+
raw(prop, defaultType) {
|
| 262 |
+
let str = new Stringifier()
|
| 263 |
+
return str.raw(this, prop, defaultType)
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
remove() {
|
| 267 |
+
if (this.parent) {
|
| 268 |
+
this.parent.removeChild(this)
|
| 269 |
+
}
|
| 270 |
+
this.parent = undefined
|
| 271 |
+
return this
|
| 272 |
+
}
|
| 273 |
+
|
| 274 |
+
replaceWith(...nodes) {
|
| 275 |
+
if (this.parent) {
|
| 276 |
+
let bookmark = this
|
| 277 |
+
let foundSelf = false
|
| 278 |
+
for (let node of nodes) {
|
| 279 |
+
if (node === this) {
|
| 280 |
+
foundSelf = true
|
| 281 |
+
} else if (foundSelf) {
|
| 282 |
+
this.parent.insertAfter(bookmark, node)
|
| 283 |
+
bookmark = node
|
| 284 |
+
} else {
|
| 285 |
+
this.parent.insertBefore(bookmark, node)
|
| 286 |
+
}
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
if (!foundSelf) {
|
| 290 |
+
this.remove()
|
| 291 |
+
}
|
| 292 |
+
}
|
| 293 |
+
|
| 294 |
+
return this
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
root() {
|
| 298 |
+
let result = this
|
| 299 |
+
while (result.parent && result.parent.type !== 'document') {
|
| 300 |
+
result = result.parent
|
| 301 |
+
}
|
| 302 |
+
return result
|
| 303 |
+
}
|
| 304 |
+
|
| 305 |
+
toJSON(_, inputs) {
|
| 306 |
+
let fixed = {}
|
| 307 |
+
let emitInputs = inputs == null
|
| 308 |
+
inputs = inputs || new Map()
|
| 309 |
+
let inputsNextIndex = 0
|
| 310 |
+
|
| 311 |
+
for (let name in this) {
|
| 312 |
+
if (!Object.prototype.hasOwnProperty.call(this, name)) {
|
| 313 |
+
/* c8 ignore next 2 */
|
| 314 |
+
continue
|
| 315 |
+
}
|
| 316 |
+
if (name === 'parent' || name === 'proxyCache') continue
|
| 317 |
+
let value = this[name]
|
| 318 |
+
|
| 319 |
+
if (Array.isArray(value)) {
|
| 320 |
+
fixed[name] = value.map(i => {
|
| 321 |
+
if (typeof i === 'object' && i.toJSON) {
|
| 322 |
+
return i.toJSON(null, inputs)
|
| 323 |
+
} else {
|
| 324 |
+
return i
|
| 325 |
+
}
|
| 326 |
+
})
|
| 327 |
+
} else if (typeof value === 'object' && value.toJSON) {
|
| 328 |
+
fixed[name] = value.toJSON(null, inputs)
|
| 329 |
+
} else if (name === 'source') {
|
| 330 |
+
let inputId = inputs.get(value.input)
|
| 331 |
+
if (inputId == null) {
|
| 332 |
+
inputId = inputsNextIndex
|
| 333 |
+
inputs.set(value.input, inputsNextIndex)
|
| 334 |
+
inputsNextIndex++
|
| 335 |
+
}
|
| 336 |
+
fixed[name] = {
|
| 337 |
+
end: value.end,
|
| 338 |
+
inputId,
|
| 339 |
+
start: value.start
|
| 340 |
+
}
|
| 341 |
+
} else {
|
| 342 |
+
fixed[name] = value
|
| 343 |
+
}
|
| 344 |
+
}
|
| 345 |
+
|
| 346 |
+
if (emitInputs) {
|
| 347 |
+
fixed.inputs = [...inputs.keys()].map(input => input.toJSON())
|
| 348 |
+
}
|
| 349 |
+
|
| 350 |
+
return fixed
|
| 351 |
+
}
|
| 352 |
+
|
| 353 |
+
toProxy() {
|
| 354 |
+
if (!this.proxyCache) {
|
| 355 |
+
this.proxyCache = new Proxy(this, this.getProxyProcessor())
|
| 356 |
+
}
|
| 357 |
+
return this.proxyCache
|
| 358 |
+
}
|
| 359 |
+
|
| 360 |
+
toString(stringifier = stringify) {
|
| 361 |
+
if (stringifier.stringify) stringifier = stringifier.stringify
|
| 362 |
+
let result = ''
|
| 363 |
+
stringifier(this, i => {
|
| 364 |
+
result += i
|
| 365 |
+
})
|
| 366 |
+
return result
|
| 367 |
+
}
|
| 368 |
+
|
| 369 |
+
warn(result, text, opts) {
|
| 370 |
+
let data = { node: this }
|
| 371 |
+
for (let i in opts) data[i] = opts[i]
|
| 372 |
+
return result.warn(text, data)
|
| 373 |
+
}
|
| 374 |
+
|
| 375 |
+
get proxyOf() {
|
| 376 |
+
return this
|
| 377 |
+
}
|
| 378 |
+
}
|
| 379 |
+
|
| 380 |
+
module.exports = Node
|
| 381 |
+
Node.default = Node
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/parse.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let Container = require('./container')
|
| 4 |
+
let Parser = require('./parser')
|
| 5 |
+
let Input = require('./input')
|
| 6 |
+
|
| 7 |
+
function parse(css, opts) {
|
| 8 |
+
let input = new Input(css, opts)
|
| 9 |
+
let parser = new Parser(input)
|
| 10 |
+
try {
|
| 11 |
+
parser.parse()
|
| 12 |
+
} catch (e) {
|
| 13 |
+
if (process.env.NODE_ENV !== 'production') {
|
| 14 |
+
if (e.name === 'CssSyntaxError' && opts && opts.from) {
|
| 15 |
+
if (/\.scss$/i.test(opts.from)) {
|
| 16 |
+
e.message +=
|
| 17 |
+
'\nYou tried to parse SCSS with ' +
|
| 18 |
+
'the standard CSS parser; ' +
|
| 19 |
+
'try again with the postcss-scss parser'
|
| 20 |
+
} else if (/\.sass/i.test(opts.from)) {
|
| 21 |
+
e.message +=
|
| 22 |
+
'\nYou tried to parse Sass with ' +
|
| 23 |
+
'the standard CSS parser; ' +
|
| 24 |
+
'try again with the postcss-sass parser'
|
| 25 |
+
} else if (/\.less$/i.test(opts.from)) {
|
| 26 |
+
e.message +=
|
| 27 |
+
'\nYou tried to parse Less with ' +
|
| 28 |
+
'the standard CSS parser; ' +
|
| 29 |
+
'try again with the postcss-less parser'
|
| 30 |
+
}
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
+
throw e
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
return parser.root
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
module.exports = parse
|
| 40 |
+
parse.default = parse
|
| 41 |
+
|
| 42 |
+
Container.registerParse(parse)
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/parser.js
ADDED
|
@@ -0,0 +1,610 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let Declaration = require('./declaration')
|
| 4 |
+
let tokenizer = require('./tokenize')
|
| 5 |
+
let Comment = require('./comment')
|
| 6 |
+
let AtRule = require('./at-rule')
|
| 7 |
+
let Root = require('./root')
|
| 8 |
+
let Rule = require('./rule')
|
| 9 |
+
|
| 10 |
+
const SAFE_COMMENT_NEIGHBOR = {
|
| 11 |
+
empty: true,
|
| 12 |
+
space: true
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
function findLastWithPosition(tokens) {
|
| 16 |
+
for (let i = tokens.length - 1; i >= 0; i--) {
|
| 17 |
+
let token = tokens[i]
|
| 18 |
+
let pos = token[3] || token[2]
|
| 19 |
+
if (pos) return pos
|
| 20 |
+
}
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
class Parser {
|
| 24 |
+
constructor(input) {
|
| 25 |
+
this.input = input
|
| 26 |
+
|
| 27 |
+
this.root = new Root()
|
| 28 |
+
this.current = this.root
|
| 29 |
+
this.spaces = ''
|
| 30 |
+
this.semicolon = false
|
| 31 |
+
this.customProperty = false
|
| 32 |
+
|
| 33 |
+
this.createTokenizer()
|
| 34 |
+
this.root.source = { input, start: { column: 1, line: 1, offset: 0 } }
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
atrule(token) {
|
| 38 |
+
let node = new AtRule()
|
| 39 |
+
node.name = token[1].slice(1)
|
| 40 |
+
if (node.name === '') {
|
| 41 |
+
this.unnamedAtrule(node, token)
|
| 42 |
+
}
|
| 43 |
+
this.init(node, token[2])
|
| 44 |
+
|
| 45 |
+
let type
|
| 46 |
+
let prev
|
| 47 |
+
let shift
|
| 48 |
+
let last = false
|
| 49 |
+
let open = false
|
| 50 |
+
let params = []
|
| 51 |
+
let brackets = []
|
| 52 |
+
|
| 53 |
+
while (!this.tokenizer.endOfFile()) {
|
| 54 |
+
token = this.tokenizer.nextToken()
|
| 55 |
+
type = token[0]
|
| 56 |
+
|
| 57 |
+
if (type === '(' || type === '[') {
|
| 58 |
+
brackets.push(type === '(' ? ')' : ']')
|
| 59 |
+
} else if (type === '{' && brackets.length > 0) {
|
| 60 |
+
brackets.push('}')
|
| 61 |
+
} else if (type === brackets[brackets.length - 1]) {
|
| 62 |
+
brackets.pop()
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
if (brackets.length === 0) {
|
| 66 |
+
if (type === ';') {
|
| 67 |
+
node.source.end = this.getPosition(token[2])
|
| 68 |
+
node.source.end.offset++
|
| 69 |
+
this.semicolon = true
|
| 70 |
+
break
|
| 71 |
+
} else if (type === '{') {
|
| 72 |
+
open = true
|
| 73 |
+
break
|
| 74 |
+
} else if (type === '}') {
|
| 75 |
+
if (params.length > 0) {
|
| 76 |
+
shift = params.length - 1
|
| 77 |
+
prev = params[shift]
|
| 78 |
+
while (prev && prev[0] === 'space') {
|
| 79 |
+
prev = params[--shift]
|
| 80 |
+
}
|
| 81 |
+
if (prev) {
|
| 82 |
+
node.source.end = this.getPosition(prev[3] || prev[2])
|
| 83 |
+
node.source.end.offset++
|
| 84 |
+
}
|
| 85 |
+
}
|
| 86 |
+
this.end(token)
|
| 87 |
+
break
|
| 88 |
+
} else {
|
| 89 |
+
params.push(token)
|
| 90 |
+
}
|
| 91 |
+
} else {
|
| 92 |
+
params.push(token)
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
if (this.tokenizer.endOfFile()) {
|
| 96 |
+
last = true
|
| 97 |
+
break
|
| 98 |
+
}
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
node.raws.between = this.spacesAndCommentsFromEnd(params)
|
| 102 |
+
if (params.length) {
|
| 103 |
+
node.raws.afterName = this.spacesAndCommentsFromStart(params)
|
| 104 |
+
this.raw(node, 'params', params)
|
| 105 |
+
if (last) {
|
| 106 |
+
token = params[params.length - 1]
|
| 107 |
+
node.source.end = this.getPosition(token[3] || token[2])
|
| 108 |
+
node.source.end.offset++
|
| 109 |
+
this.spaces = node.raws.between
|
| 110 |
+
node.raws.between = ''
|
| 111 |
+
}
|
| 112 |
+
} else {
|
| 113 |
+
node.raws.afterName = ''
|
| 114 |
+
node.params = ''
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
if (open) {
|
| 118 |
+
node.nodes = []
|
| 119 |
+
this.current = node
|
| 120 |
+
}
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
checkMissedSemicolon(tokens) {
|
| 124 |
+
let colon = this.colon(tokens)
|
| 125 |
+
if (colon === false) return
|
| 126 |
+
|
| 127 |
+
let founded = 0
|
| 128 |
+
let token
|
| 129 |
+
for (let j = colon - 1; j >= 0; j--) {
|
| 130 |
+
token = tokens[j]
|
| 131 |
+
if (token[0] !== 'space') {
|
| 132 |
+
founded += 1
|
| 133 |
+
if (founded === 2) break
|
| 134 |
+
}
|
| 135 |
+
}
|
| 136 |
+
// If the token is a word, e.g. `!important`, `red` or any other valid property's value.
|
| 137 |
+
// Then we need to return the colon after that word token. [3] is the "end" colon of that word.
|
| 138 |
+
// And because we need it after that one we do +1 to get the next one.
|
| 139 |
+
throw this.input.error(
|
| 140 |
+
'Missed semicolon',
|
| 141 |
+
token[0] === 'word' ? token[3] + 1 : token[2]
|
| 142 |
+
)
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
colon(tokens) {
|
| 146 |
+
let brackets = 0
|
| 147 |
+
let token, type, prev
|
| 148 |
+
for (let [i, element] of tokens.entries()) {
|
| 149 |
+
token = element
|
| 150 |
+
type = token[0]
|
| 151 |
+
|
| 152 |
+
if (type === '(') {
|
| 153 |
+
brackets += 1
|
| 154 |
+
}
|
| 155 |
+
if (type === ')') {
|
| 156 |
+
brackets -= 1
|
| 157 |
+
}
|
| 158 |
+
if (brackets === 0 && type === ':') {
|
| 159 |
+
if (!prev) {
|
| 160 |
+
this.doubleColon(token)
|
| 161 |
+
} else if (prev[0] === 'word' && prev[1] === 'progid') {
|
| 162 |
+
continue
|
| 163 |
+
} else {
|
| 164 |
+
return i
|
| 165 |
+
}
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
prev = token
|
| 169 |
+
}
|
| 170 |
+
return false
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
comment(token) {
|
| 174 |
+
let node = new Comment()
|
| 175 |
+
this.init(node, token[2])
|
| 176 |
+
node.source.end = this.getPosition(token[3] || token[2])
|
| 177 |
+
node.source.end.offset++
|
| 178 |
+
|
| 179 |
+
let text = token[1].slice(2, -2)
|
| 180 |
+
if (/^\s*$/.test(text)) {
|
| 181 |
+
node.text = ''
|
| 182 |
+
node.raws.left = text
|
| 183 |
+
node.raws.right = ''
|
| 184 |
+
} else {
|
| 185 |
+
let match = text.match(/^(\s*)([^]*\S)(\s*)$/)
|
| 186 |
+
node.text = match[2]
|
| 187 |
+
node.raws.left = match[1]
|
| 188 |
+
node.raws.right = match[3]
|
| 189 |
+
}
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
createTokenizer() {
|
| 193 |
+
this.tokenizer = tokenizer(this.input)
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
decl(tokens, customProperty) {
|
| 197 |
+
let node = new Declaration()
|
| 198 |
+
this.init(node, tokens[0][2])
|
| 199 |
+
|
| 200 |
+
let last = tokens[tokens.length - 1]
|
| 201 |
+
if (last[0] === ';') {
|
| 202 |
+
this.semicolon = true
|
| 203 |
+
tokens.pop()
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
node.source.end = this.getPosition(
|
| 207 |
+
last[3] || last[2] || findLastWithPosition(tokens)
|
| 208 |
+
)
|
| 209 |
+
node.source.end.offset++
|
| 210 |
+
|
| 211 |
+
while (tokens[0][0] !== 'word') {
|
| 212 |
+
if (tokens.length === 1) this.unknownWord(tokens)
|
| 213 |
+
node.raws.before += tokens.shift()[1]
|
| 214 |
+
}
|
| 215 |
+
node.source.start = this.getPosition(tokens[0][2])
|
| 216 |
+
|
| 217 |
+
node.prop = ''
|
| 218 |
+
while (tokens.length) {
|
| 219 |
+
let type = tokens[0][0]
|
| 220 |
+
if (type === ':' || type === 'space' || type === 'comment') {
|
| 221 |
+
break
|
| 222 |
+
}
|
| 223 |
+
node.prop += tokens.shift()[1]
|
| 224 |
+
}
|
| 225 |
+
|
| 226 |
+
node.raws.between = ''
|
| 227 |
+
|
| 228 |
+
let token
|
| 229 |
+
while (tokens.length) {
|
| 230 |
+
token = tokens.shift()
|
| 231 |
+
|
| 232 |
+
if (token[0] === ':') {
|
| 233 |
+
node.raws.between += token[1]
|
| 234 |
+
break
|
| 235 |
+
} else {
|
| 236 |
+
if (token[0] === 'word' && /\w/.test(token[1])) {
|
| 237 |
+
this.unknownWord([token])
|
| 238 |
+
}
|
| 239 |
+
node.raws.between += token[1]
|
| 240 |
+
}
|
| 241 |
+
}
|
| 242 |
+
|
| 243 |
+
if (node.prop[0] === '_' || node.prop[0] === '*') {
|
| 244 |
+
node.raws.before += node.prop[0]
|
| 245 |
+
node.prop = node.prop.slice(1)
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
let firstSpaces = []
|
| 249 |
+
let next
|
| 250 |
+
while (tokens.length) {
|
| 251 |
+
next = tokens[0][0]
|
| 252 |
+
if (next !== 'space' && next !== 'comment') break
|
| 253 |
+
firstSpaces.push(tokens.shift())
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
this.precheckMissedSemicolon(tokens)
|
| 257 |
+
|
| 258 |
+
for (let i = tokens.length - 1; i >= 0; i--) {
|
| 259 |
+
token = tokens[i]
|
| 260 |
+
if (token[1].toLowerCase() === '!important') {
|
| 261 |
+
node.important = true
|
| 262 |
+
let string = this.stringFrom(tokens, i)
|
| 263 |
+
string = this.spacesFromEnd(tokens) + string
|
| 264 |
+
if (string !== ' !important') node.raws.important = string
|
| 265 |
+
break
|
| 266 |
+
} else if (token[1].toLowerCase() === 'important') {
|
| 267 |
+
let cache = tokens.slice(0)
|
| 268 |
+
let str = ''
|
| 269 |
+
for (let j = i; j > 0; j--) {
|
| 270 |
+
let type = cache[j][0]
|
| 271 |
+
if (str.trim().indexOf('!') === 0 && type !== 'space') {
|
| 272 |
+
break
|
| 273 |
+
}
|
| 274 |
+
str = cache.pop()[1] + str
|
| 275 |
+
}
|
| 276 |
+
if (str.trim().indexOf('!') === 0) {
|
| 277 |
+
node.important = true
|
| 278 |
+
node.raws.important = str
|
| 279 |
+
tokens = cache
|
| 280 |
+
}
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
if (token[0] !== 'space' && token[0] !== 'comment') {
|
| 284 |
+
break
|
| 285 |
+
}
|
| 286 |
+
}
|
| 287 |
+
|
| 288 |
+
let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment')
|
| 289 |
+
|
| 290 |
+
if (hasWord) {
|
| 291 |
+
node.raws.between += firstSpaces.map(i => i[1]).join('')
|
| 292 |
+
firstSpaces = []
|
| 293 |
+
}
|
| 294 |
+
this.raw(node, 'value', firstSpaces.concat(tokens), customProperty)
|
| 295 |
+
|
| 296 |
+
if (node.value.includes(':') && !customProperty) {
|
| 297 |
+
this.checkMissedSemicolon(tokens)
|
| 298 |
+
}
|
| 299 |
+
}
|
| 300 |
+
|
| 301 |
+
doubleColon(token) {
|
| 302 |
+
throw this.input.error(
|
| 303 |
+
'Double colon',
|
| 304 |
+
{ offset: token[2] },
|
| 305 |
+
{ offset: token[2] + token[1].length }
|
| 306 |
+
)
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
emptyRule(token) {
|
| 310 |
+
let node = new Rule()
|
| 311 |
+
this.init(node, token[2])
|
| 312 |
+
node.selector = ''
|
| 313 |
+
node.raws.between = ''
|
| 314 |
+
this.current = node
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
end(token) {
|
| 318 |
+
if (this.current.nodes && this.current.nodes.length) {
|
| 319 |
+
this.current.raws.semicolon = this.semicolon
|
| 320 |
+
}
|
| 321 |
+
this.semicolon = false
|
| 322 |
+
|
| 323 |
+
this.current.raws.after = (this.current.raws.after || '') + this.spaces
|
| 324 |
+
this.spaces = ''
|
| 325 |
+
|
| 326 |
+
if (this.current.parent) {
|
| 327 |
+
this.current.source.end = this.getPosition(token[2])
|
| 328 |
+
this.current.source.end.offset++
|
| 329 |
+
this.current = this.current.parent
|
| 330 |
+
} else {
|
| 331 |
+
this.unexpectedClose(token)
|
| 332 |
+
}
|
| 333 |
+
}
|
| 334 |
+
|
| 335 |
+
endFile() {
|
| 336 |
+
if (this.current.parent) this.unclosedBlock()
|
| 337 |
+
if (this.current.nodes && this.current.nodes.length) {
|
| 338 |
+
this.current.raws.semicolon = this.semicolon
|
| 339 |
+
}
|
| 340 |
+
this.current.raws.after = (this.current.raws.after || '') + this.spaces
|
| 341 |
+
this.root.source.end = this.getPosition(this.tokenizer.position())
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
freeSemicolon(token) {
|
| 345 |
+
this.spaces += token[1]
|
| 346 |
+
if (this.current.nodes) {
|
| 347 |
+
let prev = this.current.nodes[this.current.nodes.length - 1]
|
| 348 |
+
if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) {
|
| 349 |
+
prev.raws.ownSemicolon = this.spaces
|
| 350 |
+
this.spaces = ''
|
| 351 |
+
}
|
| 352 |
+
}
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
// Helpers
|
| 356 |
+
|
| 357 |
+
getPosition(offset) {
|
| 358 |
+
let pos = this.input.fromOffset(offset)
|
| 359 |
+
return {
|
| 360 |
+
column: pos.col,
|
| 361 |
+
line: pos.line,
|
| 362 |
+
offset
|
| 363 |
+
}
|
| 364 |
+
}
|
| 365 |
+
|
| 366 |
+
init(node, offset) {
|
| 367 |
+
this.current.push(node)
|
| 368 |
+
node.source = {
|
| 369 |
+
input: this.input,
|
| 370 |
+
start: this.getPosition(offset)
|
| 371 |
+
}
|
| 372 |
+
node.raws.before = this.spaces
|
| 373 |
+
this.spaces = ''
|
| 374 |
+
if (node.type !== 'comment') this.semicolon = false
|
| 375 |
+
}
|
| 376 |
+
|
| 377 |
+
other(start) {
|
| 378 |
+
let end = false
|
| 379 |
+
let type = null
|
| 380 |
+
let colon = false
|
| 381 |
+
let bracket = null
|
| 382 |
+
let brackets = []
|
| 383 |
+
let customProperty = start[1].startsWith('--')
|
| 384 |
+
|
| 385 |
+
let tokens = []
|
| 386 |
+
let token = start
|
| 387 |
+
while (token) {
|
| 388 |
+
type = token[0]
|
| 389 |
+
tokens.push(token)
|
| 390 |
+
|
| 391 |
+
if (type === '(' || type === '[') {
|
| 392 |
+
if (!bracket) bracket = token
|
| 393 |
+
brackets.push(type === '(' ? ')' : ']')
|
| 394 |
+
} else if (customProperty && colon && type === '{') {
|
| 395 |
+
if (!bracket) bracket = token
|
| 396 |
+
brackets.push('}')
|
| 397 |
+
} else if (brackets.length === 0) {
|
| 398 |
+
if (type === ';') {
|
| 399 |
+
if (colon) {
|
| 400 |
+
this.decl(tokens, customProperty)
|
| 401 |
+
return
|
| 402 |
+
} else {
|
| 403 |
+
break
|
| 404 |
+
}
|
| 405 |
+
} else if (type === '{') {
|
| 406 |
+
this.rule(tokens)
|
| 407 |
+
return
|
| 408 |
+
} else if (type === '}') {
|
| 409 |
+
this.tokenizer.back(tokens.pop())
|
| 410 |
+
end = true
|
| 411 |
+
break
|
| 412 |
+
} else if (type === ':') {
|
| 413 |
+
colon = true
|
| 414 |
+
}
|
| 415 |
+
} else if (type === brackets[brackets.length - 1]) {
|
| 416 |
+
brackets.pop()
|
| 417 |
+
if (brackets.length === 0) bracket = null
|
| 418 |
+
}
|
| 419 |
+
|
| 420 |
+
token = this.tokenizer.nextToken()
|
| 421 |
+
}
|
| 422 |
+
|
| 423 |
+
if (this.tokenizer.endOfFile()) end = true
|
| 424 |
+
if (brackets.length > 0) this.unclosedBracket(bracket)
|
| 425 |
+
|
| 426 |
+
if (end && colon) {
|
| 427 |
+
if (!customProperty) {
|
| 428 |
+
while (tokens.length) {
|
| 429 |
+
token = tokens[tokens.length - 1][0]
|
| 430 |
+
if (token !== 'space' && token !== 'comment') break
|
| 431 |
+
this.tokenizer.back(tokens.pop())
|
| 432 |
+
}
|
| 433 |
+
}
|
| 434 |
+
this.decl(tokens, customProperty)
|
| 435 |
+
} else {
|
| 436 |
+
this.unknownWord(tokens)
|
| 437 |
+
}
|
| 438 |
+
}
|
| 439 |
+
|
| 440 |
+
parse() {
|
| 441 |
+
let token
|
| 442 |
+
while (!this.tokenizer.endOfFile()) {
|
| 443 |
+
token = this.tokenizer.nextToken()
|
| 444 |
+
|
| 445 |
+
switch (token[0]) {
|
| 446 |
+
case 'space':
|
| 447 |
+
this.spaces += token[1]
|
| 448 |
+
break
|
| 449 |
+
|
| 450 |
+
case ';':
|
| 451 |
+
this.freeSemicolon(token)
|
| 452 |
+
break
|
| 453 |
+
|
| 454 |
+
case '}':
|
| 455 |
+
this.end(token)
|
| 456 |
+
break
|
| 457 |
+
|
| 458 |
+
case 'comment':
|
| 459 |
+
this.comment(token)
|
| 460 |
+
break
|
| 461 |
+
|
| 462 |
+
case 'at-word':
|
| 463 |
+
this.atrule(token)
|
| 464 |
+
break
|
| 465 |
+
|
| 466 |
+
case '{':
|
| 467 |
+
this.emptyRule(token)
|
| 468 |
+
break
|
| 469 |
+
|
| 470 |
+
default:
|
| 471 |
+
this.other(token)
|
| 472 |
+
break
|
| 473 |
+
}
|
| 474 |
+
}
|
| 475 |
+
this.endFile()
|
| 476 |
+
}
|
| 477 |
+
|
| 478 |
+
precheckMissedSemicolon(/* tokens */) {
|
| 479 |
+
// Hook for Safe Parser
|
| 480 |
+
}
|
| 481 |
+
|
| 482 |
+
raw(node, prop, tokens, customProperty) {
|
| 483 |
+
let token, type
|
| 484 |
+
let length = tokens.length
|
| 485 |
+
let value = ''
|
| 486 |
+
let clean = true
|
| 487 |
+
let next, prev
|
| 488 |
+
|
| 489 |
+
for (let i = 0; i < length; i += 1) {
|
| 490 |
+
token = tokens[i]
|
| 491 |
+
type = token[0]
|
| 492 |
+
if (type === 'space' && i === length - 1 && !customProperty) {
|
| 493 |
+
clean = false
|
| 494 |
+
} else if (type === 'comment') {
|
| 495 |
+
prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty'
|
| 496 |
+
next = tokens[i + 1] ? tokens[i + 1][0] : 'empty'
|
| 497 |
+
if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) {
|
| 498 |
+
if (value.slice(-1) === ',') {
|
| 499 |
+
clean = false
|
| 500 |
+
} else {
|
| 501 |
+
value += token[1]
|
| 502 |
+
}
|
| 503 |
+
} else {
|
| 504 |
+
clean = false
|
| 505 |
+
}
|
| 506 |
+
} else {
|
| 507 |
+
value += token[1]
|
| 508 |
+
}
|
| 509 |
+
}
|
| 510 |
+
if (!clean) {
|
| 511 |
+
let raw = tokens.reduce((all, i) => all + i[1], '')
|
| 512 |
+
node.raws[prop] = { raw, value }
|
| 513 |
+
}
|
| 514 |
+
node[prop] = value
|
| 515 |
+
}
|
| 516 |
+
|
| 517 |
+
rule(tokens) {
|
| 518 |
+
tokens.pop()
|
| 519 |
+
|
| 520 |
+
let node = new Rule()
|
| 521 |
+
this.init(node, tokens[0][2])
|
| 522 |
+
|
| 523 |
+
node.raws.between = this.spacesAndCommentsFromEnd(tokens)
|
| 524 |
+
this.raw(node, 'selector', tokens)
|
| 525 |
+
this.current = node
|
| 526 |
+
}
|
| 527 |
+
|
| 528 |
+
spacesAndCommentsFromEnd(tokens) {
|
| 529 |
+
let lastTokenType
|
| 530 |
+
let spaces = ''
|
| 531 |
+
while (tokens.length) {
|
| 532 |
+
lastTokenType = tokens[tokens.length - 1][0]
|
| 533 |
+
if (lastTokenType !== 'space' && lastTokenType !== 'comment') break
|
| 534 |
+
spaces = tokens.pop()[1] + spaces
|
| 535 |
+
}
|
| 536 |
+
return spaces
|
| 537 |
+
}
|
| 538 |
+
|
| 539 |
+
// Errors
|
| 540 |
+
|
| 541 |
+
spacesAndCommentsFromStart(tokens) {
|
| 542 |
+
let next
|
| 543 |
+
let spaces = ''
|
| 544 |
+
while (tokens.length) {
|
| 545 |
+
next = tokens[0][0]
|
| 546 |
+
if (next !== 'space' && next !== 'comment') break
|
| 547 |
+
spaces += tokens.shift()[1]
|
| 548 |
+
}
|
| 549 |
+
return spaces
|
| 550 |
+
}
|
| 551 |
+
|
| 552 |
+
spacesFromEnd(tokens) {
|
| 553 |
+
let lastTokenType
|
| 554 |
+
let spaces = ''
|
| 555 |
+
while (tokens.length) {
|
| 556 |
+
lastTokenType = tokens[tokens.length - 1][0]
|
| 557 |
+
if (lastTokenType !== 'space') break
|
| 558 |
+
spaces = tokens.pop()[1] + spaces
|
| 559 |
+
}
|
| 560 |
+
return spaces
|
| 561 |
+
}
|
| 562 |
+
|
| 563 |
+
stringFrom(tokens, from) {
|
| 564 |
+
let result = ''
|
| 565 |
+
for (let i = from; i < tokens.length; i++) {
|
| 566 |
+
result += tokens[i][1]
|
| 567 |
+
}
|
| 568 |
+
tokens.splice(from, tokens.length - from)
|
| 569 |
+
return result
|
| 570 |
+
}
|
| 571 |
+
|
| 572 |
+
unclosedBlock() {
|
| 573 |
+
let pos = this.current.source.start
|
| 574 |
+
throw this.input.error('Unclosed block', pos.line, pos.column)
|
| 575 |
+
}
|
| 576 |
+
|
| 577 |
+
unclosedBracket(bracket) {
|
| 578 |
+
throw this.input.error(
|
| 579 |
+
'Unclosed bracket',
|
| 580 |
+
{ offset: bracket[2] },
|
| 581 |
+
{ offset: bracket[2] + 1 }
|
| 582 |
+
)
|
| 583 |
+
}
|
| 584 |
+
|
| 585 |
+
unexpectedClose(token) {
|
| 586 |
+
throw this.input.error(
|
| 587 |
+
'Unexpected }',
|
| 588 |
+
{ offset: token[2] },
|
| 589 |
+
{ offset: token[2] + 1 }
|
| 590 |
+
)
|
| 591 |
+
}
|
| 592 |
+
|
| 593 |
+
unknownWord(tokens) {
|
| 594 |
+
throw this.input.error(
|
| 595 |
+
'Unknown word',
|
| 596 |
+
{ offset: tokens[0][2] },
|
| 597 |
+
{ offset: tokens[0][2] + tokens[0][1].length }
|
| 598 |
+
)
|
| 599 |
+
}
|
| 600 |
+
|
| 601 |
+
unnamedAtrule(node, token) {
|
| 602 |
+
throw this.input.error(
|
| 603 |
+
'At-rule without name',
|
| 604 |
+
{ offset: token[2] },
|
| 605 |
+
{ offset: token[2] + token[1].length }
|
| 606 |
+
)
|
| 607 |
+
}
|
| 608 |
+
}
|
| 609 |
+
|
| 610 |
+
module.exports = Parser
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/postcss.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let CssSyntaxError = require('./css-syntax-error')
|
| 4 |
+
let Declaration = require('./declaration')
|
| 5 |
+
let LazyResult = require('./lazy-result')
|
| 6 |
+
let Container = require('./container')
|
| 7 |
+
let Processor = require('./processor')
|
| 8 |
+
let stringify = require('./stringify')
|
| 9 |
+
let fromJSON = require('./fromJSON')
|
| 10 |
+
let Document = require('./document')
|
| 11 |
+
let Warning = require('./warning')
|
| 12 |
+
let Comment = require('./comment')
|
| 13 |
+
let AtRule = require('./at-rule')
|
| 14 |
+
let Result = require('./result.js')
|
| 15 |
+
let Input = require('./input')
|
| 16 |
+
let parse = require('./parse')
|
| 17 |
+
let list = require('./list')
|
| 18 |
+
let Rule = require('./rule')
|
| 19 |
+
let Root = require('./root')
|
| 20 |
+
let Node = require('./node')
|
| 21 |
+
|
| 22 |
+
function postcss(...plugins) {
|
| 23 |
+
if (plugins.length === 1 && Array.isArray(plugins[0])) {
|
| 24 |
+
plugins = plugins[0]
|
| 25 |
+
}
|
| 26 |
+
return new Processor(plugins)
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
postcss.plugin = function plugin(name, initializer) {
|
| 30 |
+
let warningPrinted = false
|
| 31 |
+
function creator(...args) {
|
| 32 |
+
// eslint-disable-next-line no-console
|
| 33 |
+
if (console && console.warn && !warningPrinted) {
|
| 34 |
+
warningPrinted = true
|
| 35 |
+
// eslint-disable-next-line no-console
|
| 36 |
+
console.warn(
|
| 37 |
+
name +
|
| 38 |
+
': postcss.plugin was deprecated. Migration guide:\n' +
|
| 39 |
+
'https://evilmartians.com/chronicles/postcss-8-plugin-migration'
|
| 40 |
+
)
|
| 41 |
+
if (process.env.LANG && process.env.LANG.startsWith('cn')) {
|
| 42 |
+
/* c8 ignore next 7 */
|
| 43 |
+
// eslint-disable-next-line no-console
|
| 44 |
+
console.warn(
|
| 45 |
+
name +
|
| 46 |
+
': 里面 postcss.plugin 被弃用. 迁移指南:\n' +
|
| 47 |
+
'https://www.w3ctech.com/topic/2226'
|
| 48 |
+
)
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
+
let transformer = initializer(...args)
|
| 52 |
+
transformer.postcssPlugin = name
|
| 53 |
+
transformer.postcssVersion = new Processor().version
|
| 54 |
+
return transformer
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
let cache
|
| 58 |
+
Object.defineProperty(creator, 'postcss', {
|
| 59 |
+
get() {
|
| 60 |
+
if (!cache) cache = creator()
|
| 61 |
+
return cache
|
| 62 |
+
}
|
| 63 |
+
})
|
| 64 |
+
|
| 65 |
+
creator.process = function (css, processOpts, pluginOpts) {
|
| 66 |
+
return postcss([creator(pluginOpts)]).process(css, processOpts)
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
return creator
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
postcss.stringify = stringify
|
| 73 |
+
postcss.parse = parse
|
| 74 |
+
postcss.fromJSON = fromJSON
|
| 75 |
+
postcss.list = list
|
| 76 |
+
|
| 77 |
+
postcss.comment = defaults => new Comment(defaults)
|
| 78 |
+
postcss.atRule = defaults => new AtRule(defaults)
|
| 79 |
+
postcss.decl = defaults => new Declaration(defaults)
|
| 80 |
+
postcss.rule = defaults => new Rule(defaults)
|
| 81 |
+
postcss.root = defaults => new Root(defaults)
|
| 82 |
+
postcss.document = defaults => new Document(defaults)
|
| 83 |
+
|
| 84 |
+
postcss.CssSyntaxError = CssSyntaxError
|
| 85 |
+
postcss.Declaration = Declaration
|
| 86 |
+
postcss.Container = Container
|
| 87 |
+
postcss.Processor = Processor
|
| 88 |
+
postcss.Document = Document
|
| 89 |
+
postcss.Comment = Comment
|
| 90 |
+
postcss.Warning = Warning
|
| 91 |
+
postcss.AtRule = AtRule
|
| 92 |
+
postcss.Result = Result
|
| 93 |
+
postcss.Input = Input
|
| 94 |
+
postcss.Rule = Rule
|
| 95 |
+
postcss.Root = Root
|
| 96 |
+
postcss.Node = Node
|
| 97 |
+
|
| 98 |
+
LazyResult.registerPostcss(postcss)
|
| 99 |
+
|
| 100 |
+
module.exports = postcss
|
| 101 |
+
postcss.default = postcss
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/previous-map.js
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
|
| 4 |
+
let { existsSync, readFileSync } = require('fs')
|
| 5 |
+
let { dirname, join } = require('path')
|
| 6 |
+
|
| 7 |
+
function fromBase64(str) {
|
| 8 |
+
if (Buffer) {
|
| 9 |
+
return Buffer.from(str, 'base64').toString()
|
| 10 |
+
} else {
|
| 11 |
+
/* c8 ignore next 2 */
|
| 12 |
+
return window.atob(str)
|
| 13 |
+
}
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
class PreviousMap {
|
| 17 |
+
constructor(css, opts) {
|
| 18 |
+
if (opts.map === false) return
|
| 19 |
+
this.loadAnnotation(css)
|
| 20 |
+
this.inline = this.startWith(this.annotation, 'data:')
|
| 21 |
+
|
| 22 |
+
let prev = opts.map ? opts.map.prev : undefined
|
| 23 |
+
let text = this.loadMap(opts.from, prev)
|
| 24 |
+
if (!this.mapFile && opts.from) {
|
| 25 |
+
this.mapFile = opts.from
|
| 26 |
+
}
|
| 27 |
+
if (this.mapFile) this.root = dirname(this.mapFile)
|
| 28 |
+
if (text) this.text = text
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
consumer() {
|
| 32 |
+
if (!this.consumerCache) {
|
| 33 |
+
this.consumerCache = new SourceMapConsumer(this.text)
|
| 34 |
+
}
|
| 35 |
+
return this.consumerCache
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
decodeInline(text) {
|
| 39 |
+
let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/
|
| 40 |
+
let baseUri = /^data:application\/json;base64,/
|
| 41 |
+
let charsetUri = /^data:application\/json;charset=utf-?8,/
|
| 42 |
+
let uri = /^data:application\/json,/
|
| 43 |
+
|
| 44 |
+
if (charsetUri.test(text) || uri.test(text)) {
|
| 45 |
+
return decodeURIComponent(text.substr(RegExp.lastMatch.length))
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
if (baseCharsetUri.test(text) || baseUri.test(text)) {
|
| 49 |
+
return fromBase64(text.substr(RegExp.lastMatch.length))
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
let encoding = text.match(/data:application\/json;([^,]+),/)[1]
|
| 53 |
+
throw new Error('Unsupported source map encoding ' + encoding)
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
getAnnotationURL(sourceMapString) {
|
| 57 |
+
return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, '').trim()
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
isMap(map) {
|
| 61 |
+
if (typeof map !== 'object') return false
|
| 62 |
+
return (
|
| 63 |
+
typeof map.mappings === 'string' ||
|
| 64 |
+
typeof map._mappings === 'string' ||
|
| 65 |
+
Array.isArray(map.sections)
|
| 66 |
+
)
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
loadAnnotation(css) {
|
| 70 |
+
let comments = css.match(/\/\*\s*# sourceMappingURL=/gm)
|
| 71 |
+
if (!comments) return
|
| 72 |
+
|
| 73 |
+
// sourceMappingURLs from comments, strings, etc.
|
| 74 |
+
let start = css.lastIndexOf(comments.pop())
|
| 75 |
+
let end = css.indexOf('*/', start)
|
| 76 |
+
|
| 77 |
+
if (start > -1 && end > -1) {
|
| 78 |
+
// Locate the last sourceMappingURL to avoid pickin
|
| 79 |
+
this.annotation = this.getAnnotationURL(css.substring(start, end))
|
| 80 |
+
}
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
loadFile(path) {
|
| 84 |
+
this.root = dirname(path)
|
| 85 |
+
if (existsSync(path)) {
|
| 86 |
+
this.mapFile = path
|
| 87 |
+
return readFileSync(path, 'utf-8').toString().trim()
|
| 88 |
+
}
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
loadMap(file, prev) {
|
| 92 |
+
if (prev === false) return false
|
| 93 |
+
|
| 94 |
+
if (prev) {
|
| 95 |
+
if (typeof prev === 'string') {
|
| 96 |
+
return prev
|
| 97 |
+
} else if (typeof prev === 'function') {
|
| 98 |
+
let prevPath = prev(file)
|
| 99 |
+
if (prevPath) {
|
| 100 |
+
let map = this.loadFile(prevPath)
|
| 101 |
+
if (!map) {
|
| 102 |
+
throw new Error(
|
| 103 |
+
'Unable to load previous source map: ' + prevPath.toString()
|
| 104 |
+
)
|
| 105 |
+
}
|
| 106 |
+
return map
|
| 107 |
+
}
|
| 108 |
+
} else if (prev instanceof SourceMapConsumer) {
|
| 109 |
+
return SourceMapGenerator.fromSourceMap(prev).toString()
|
| 110 |
+
} else if (prev instanceof SourceMapGenerator) {
|
| 111 |
+
return prev.toString()
|
| 112 |
+
} else if (this.isMap(prev)) {
|
| 113 |
+
return JSON.stringify(prev)
|
| 114 |
+
} else {
|
| 115 |
+
throw new Error(
|
| 116 |
+
'Unsupported previous source map format: ' + prev.toString()
|
| 117 |
+
)
|
| 118 |
+
}
|
| 119 |
+
} else if (this.inline) {
|
| 120 |
+
return this.decodeInline(this.annotation)
|
| 121 |
+
} else if (this.annotation) {
|
| 122 |
+
let map = this.annotation
|
| 123 |
+
if (file) map = join(dirname(file), map)
|
| 124 |
+
return this.loadFile(map)
|
| 125 |
+
}
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
startWith(string, start) {
|
| 129 |
+
if (!string) return false
|
| 130 |
+
return string.substr(0, start.length) === start
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
withContent() {
|
| 134 |
+
return !!(
|
| 135 |
+
this.consumer().sourcesContent &&
|
| 136 |
+
this.consumer().sourcesContent.length > 0
|
| 137 |
+
)
|
| 138 |
+
}
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
module.exports = PreviousMap
|
| 142 |
+
PreviousMap.default = PreviousMap
|
.next/standalone/node_modules/.pnpm/postcss@8.4.31/node_modules/postcss/lib/processor.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
let NoWorkResult = require('./no-work-result')
|
| 4 |
+
let LazyResult = require('./lazy-result')
|
| 5 |
+
let Document = require('./document')
|
| 6 |
+
let Root = require('./root')
|
| 7 |
+
|
| 8 |
+
class Processor {
|
| 9 |
+
constructor(plugins = []) {
|
| 10 |
+
this.version = '8.4.31'
|
| 11 |
+
this.plugins = this.normalize(plugins)
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
normalize(plugins) {
|
| 15 |
+
let normalized = []
|
| 16 |
+
for (let i of plugins) {
|
| 17 |
+
if (i.postcss === true) {
|
| 18 |
+
i = i()
|
| 19 |
+
} else if (i.postcss) {
|
| 20 |
+
i = i.postcss
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
if (typeof i === 'object' && Array.isArray(i.plugins)) {
|
| 24 |
+
normalized = normalized.concat(i.plugins)
|
| 25 |
+
} else if (typeof i === 'object' && i.postcssPlugin) {
|
| 26 |
+
normalized.push(i)
|
| 27 |
+
} else if (typeof i === 'function') {
|
| 28 |
+
normalized.push(i)
|
| 29 |
+
} else if (typeof i === 'object' && (i.parse || i.stringify)) {
|
| 30 |
+
if (process.env.NODE_ENV !== 'production') {
|
| 31 |
+
throw new Error(
|
| 32 |
+
'PostCSS syntaxes cannot be used as plugins. Instead, please use ' +
|
| 33 |
+
'one of the syntax/parser/stringifier options as outlined ' +
|
| 34 |
+
'in your PostCSS runner documentation.'
|
| 35 |
+
)
|
| 36 |
+
}
|
| 37 |
+
} else {
|
| 38 |
+
throw new Error(i + ' is not a PostCSS plugin')
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
return normalized
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
process(css, opts = {}) {
|
| 45 |
+
if (
|
| 46 |
+
this.plugins.length === 0 &&
|
| 47 |
+
typeof opts.parser === 'undefined' &&
|
| 48 |
+
typeof opts.stringifier === 'undefined' &&
|
| 49 |
+
typeof opts.syntax === 'undefined'
|
| 50 |
+
) {
|
| 51 |
+
return new NoWorkResult(this, css, opts)
|
| 52 |
+
} else {
|
| 53 |
+
return new LazyResult(this, css, opts)
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
use(plugin) {
|
| 58 |
+
this.plugins = this.plugins.concat(this.normalize([plugin]))
|
| 59 |
+
return this
|
| 60 |
+
}
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
module.exports = Processor
|
| 64 |
+
Processor.default = Processor
|
| 65 |
+
|
| 66 |
+
Root.registerProcessor(Processor)
|
| 67 |
+
Document.registerProcessor(Processor)
|