hatch-surf/node_modules/next/dist/build/file-classifier.js
Riley Zhang df378d33ef
Some checks failed
CI / go (push) Waiting to run
CI / docker (push) Waiting to run
CI / lint-go (push) Waiting to run
CI / lint-docs (push) Waiting to run
CI / check-paperclip (push) Waiting to run
Deploy static site / Deploy to GitHub Pages (push) Has been cancelled
Deploy static site / Deploy via Docker to hatch.surf (push) Has been cancelled
Merge GitHub main into Gitea repo (allow unrelated histories)
Resolved conflicts by taking GitHub versions for:
- .dockerignore, .gitignore, Dockerfile, README.md, docker-compose.yml

Kept deploy.sh updated to:
- Pull from GitHub (primary source)
- Push to Gitea (push-mirror)
- Build from site/ directory (GitHub structure)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-25 05:20:46 +02:00

76 lines
2.1 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
addSlotIfNew: null,
combineSlots: null,
extractSlotFromPath: null,
extractSlotsFromRoutes: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
addSlotIfNew: function() {
return addSlotIfNew;
},
combineSlots: function() {
return combineSlots;
},
extractSlotFromPath: function() {
return extractSlotFromPath;
},
extractSlotsFromRoutes: function() {
return extractSlotsFromRoutes;
}
});
const _apppaths = require("../shared/lib/router/utils/app-paths");
const _segment = require("../shared/lib/segment");
function extractSlotFromPath(pagePath) {
const segments = pagePath.split('/');
for(let i = segments.length - 1; i >= 0; i--){
const segment = segments[i];
if ((0, _segment.isParallelRouteSegment)(segment)) {
return {
name: segment.slice(1),
parent: (0, _apppaths.normalizeAppPath)(segments.slice(0, i).join('/'))
};
}
}
return undefined;
}
function addSlotIfNew(slots, pagePath) {
const slot = extractSlotFromPath(pagePath);
if (!slot) return false;
if (slots.some((s)=>s.name === slot.name && s.parent === slot.parent)) return false;
slots.push(slot);
return true;
}
function extractSlotsFromRoutes(routes, skipRoutes) {
const slots = [];
for (const [route] of Object.entries(routes)){
if (skipRoutes == null ? void 0 : skipRoutes.has(route)) continue;
addSlotIfNew(slots, route);
}
return slots;
}
function combineSlots(...slotArrays) {
const slotSet = new Set();
const result = [];
for (const slots of slotArrays){
for (const slot of slots){
const key = `${slot.name}:${slot.parent}`;
if (!slotSet.has(key)) {
slotSet.add(key);
result.push(slot);
}
}
}
return result;
}
//# sourceMappingURL=file-classifier.js.map