Files
Laca-City/frontend/node_modules/next/dist/shared/lib/image-loader.js
PhongPham c65cc97a33 🎯 MapView v2.0 - Global Deployment Ready
 MAJOR FEATURES:
• Auto-zoom intelligence với smart bounds fitting
• Enhanced 3D GPS markers với pulsing effects
• Professional route display với 6-layer rendering
• Status-based parking icons với availability indicators
• Production-ready build optimizations

🗺️ AUTO-ZOOM FEATURES:
• Smart bounds fitting cho GPS + selected parking
• Adaptive padding (50px) cho visual balance
• Max zoom control (level 16) để tránh quá gần
• Dynamic centering khi không có selection

🎨 ENHANCED VISUALS:
• 3D GPS marker với multi-layer pulse effects
• Advanced parking icons với status colors
• Selection highlighting với animation
• Dimming system cho non-selected items

🛣️ ROUTE SYSTEM:
• OpenRouteService API integration
• Multi-layer route rendering (glow, shadow, main, animated)
• Real-time distance & duration calculation
• Visual route info trong popup

📱 PRODUCTION READY:
• SSR safe với dynamic imports
• Build errors resolved
• Global deployment via Vercel
• Optimized performance

🌍 DEPLOYMENT:
• Vercel: https://whatever-ctk2auuxr-phong12hexdockworks-projects.vercel.app
• Bundle size: 22.8 kB optimized
• Global CDN distribution
• HTTPS enabled

💾 VERSION CONTROL:
• MapView-v2.0.tsx backup created
• MAPVIEW_VERSIONS.md documentation
• Full version history tracking
2025-07-20 19:52:16 +07:00

69 lines
3.9 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return _default;
}
});
const DEFAULT_Q = 75;
function defaultLoader(param) {
let { config, src, width, quality } = param;
var _config_qualities;
if (process.env.NODE_ENV !== "production") {
const missingValues = [];
// these should always be provided but make sure they are
if (!src) missingValues.push("src");
if (!width) missingValues.push("width");
if (missingValues.length > 0) {
throw new Error("Next Image Optimization requires " + missingValues.join(", ") + " to be provided. Make sure you pass them as props to the `next/image` component. Received: " + JSON.stringify({
src,
width,
quality
}));
}
if (src.startsWith("//")) {
throw new Error('Failed to parse src "' + src + '" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)');
}
if (src.startsWith("/") && config.localPatterns) {
if (process.env.NODE_ENV !== "test" && // micromatch isn't compatible with edge runtime
process.env.NEXT_RUNTIME !== "edge") {
// We use dynamic require because this should only error in development
const { hasLocalMatch } = require("./match-local-pattern");
if (!hasLocalMatch(config.localPatterns, src)) {
throw new Error("Invalid src prop (" + src + ") on `next/image` does not match `images.localPatterns` configured in your `next.config.js`\n" + "See more info: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns");
}
}
}
if (!src.startsWith("/") && (config.domains || config.remotePatterns)) {
let parsedSrc;
try {
parsedSrc = new URL(src);
} catch (err) {
console.error(err);
throw new Error('Failed to parse src "' + src + '" on `next/image`, if using relative image it must start with a leading slash "/" or be an absolute URL (http:// or https://)');
}
if (process.env.NODE_ENV !== "test" && // micromatch isn't compatible with edge runtime
process.env.NEXT_RUNTIME !== "edge") {
// We use dynamic require because this should only error in development
const { hasRemoteMatch } = require("./match-remote-pattern");
if (!hasRemoteMatch(config.domains, config.remotePatterns, parsedSrc)) {
throw new Error("Invalid src prop (" + src + ') on `next/image`, hostname "' + parsedSrc.hostname + '" is not configured under images in your `next.config.js`\n' + "See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host");
}
}
}
if (quality && config.qualities && !config.qualities.includes(quality)) {
throw new Error("Invalid quality prop (" + quality + ") on `next/image` does not match `images.qualities` configured in your `next.config.js`\n" + "See more info: https://nextjs.org/docs/messages/next-image-unconfigured-qualities");
}
}
const q = quality || ((_config_qualities = config.qualities) == null ? void 0 : _config_qualities.reduce((prev, cur)=>Math.abs(cur - DEFAULT_Q) < Math.abs(prev - DEFAULT_Q) ? cur : prev)) || DEFAULT_Q;
return config.path + "?url=" + encodeURIComponent(src) + "&w=" + width + "&q=" + q + (process.env.NEXT_DEPLOYMENT_ID ? "&dpl=" + process.env.NEXT_DEPLOYMENT_ID : "");
}
// We use this to determine if the import is the default loader
// or a custom loader defined by the user in next.config.js
defaultLoader.__next_img_default = true;
const _default = defaultLoader;
//# sourceMappingURL=image-loader.js.map