✨ 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
102 lines
2.6 KiB
JavaScript
102 lines
2.6 KiB
JavaScript
// src/source-map.ts
|
|
import {
|
|
AnyMap,
|
|
originalPositionFor,
|
|
generatedPositionFor,
|
|
allGeneratedPositionsFor,
|
|
eachMapping,
|
|
encodedMappings,
|
|
sourceContentFor
|
|
} from "@jridgewell/trace-mapping";
|
|
import {
|
|
GenMapping,
|
|
maybeAddMapping,
|
|
toDecodedMap,
|
|
toEncodedMap,
|
|
setSourceContent,
|
|
fromMap
|
|
} from "@jridgewell/gen-mapping";
|
|
var SourceMapConsumer = class _SourceMapConsumer {
|
|
constructor(map, mapUrl) {
|
|
const trace = this._map = new AnyMap(map, mapUrl);
|
|
this.file = trace.file;
|
|
this.names = trace.names;
|
|
this.sourceRoot = trace.sourceRoot;
|
|
this.sources = trace.resolvedSources;
|
|
this.sourcesContent = trace.sourcesContent;
|
|
this.version = trace.version;
|
|
}
|
|
static fromSourceMap(map, mapUrl) {
|
|
if (map.toDecodedMap) {
|
|
return new _SourceMapConsumer(map.toDecodedMap(), mapUrl);
|
|
}
|
|
return new _SourceMapConsumer(map.toJSON(), mapUrl);
|
|
}
|
|
get mappings() {
|
|
return encodedMappings(this._map);
|
|
}
|
|
originalPositionFor(needle) {
|
|
return originalPositionFor(this._map, needle);
|
|
}
|
|
generatedPositionFor(originalPosition) {
|
|
return generatedPositionFor(this._map, originalPosition);
|
|
}
|
|
allGeneratedPositionsFor(originalPosition) {
|
|
return allGeneratedPositionsFor(this._map, originalPosition);
|
|
}
|
|
hasContentsOfAllSources() {
|
|
if (!this.sourcesContent || this.sourcesContent.length !== this.sources.length) {
|
|
return false;
|
|
}
|
|
for (const content of this.sourcesContent) {
|
|
if (content == null) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
sourceContentFor(source, nullOnMissing) {
|
|
const sourceContent = sourceContentFor(this._map, source);
|
|
if (sourceContent != null) {
|
|
return sourceContent;
|
|
}
|
|
if (nullOnMissing) {
|
|
return null;
|
|
}
|
|
throw new Error(`"${source}" is not in the SourceMap.`);
|
|
}
|
|
eachMapping(callback, context) {
|
|
eachMapping(this._map, context ? callback.bind(context) : callback);
|
|
}
|
|
destroy() {
|
|
}
|
|
};
|
|
var SourceMapGenerator = class _SourceMapGenerator {
|
|
constructor(opts) {
|
|
this._map = opts instanceof GenMapping ? opts : new GenMapping(opts);
|
|
}
|
|
static fromSourceMap(consumer) {
|
|
return new _SourceMapGenerator(fromMap(consumer));
|
|
}
|
|
addMapping(mapping) {
|
|
maybeAddMapping(this._map, mapping);
|
|
}
|
|
setSourceContent(source, content) {
|
|
setSourceContent(this._map, source, content);
|
|
}
|
|
toJSON() {
|
|
return toEncodedMap(this._map);
|
|
}
|
|
toString() {
|
|
return JSON.stringify(this.toJSON());
|
|
}
|
|
toDecodedMap() {
|
|
return toDecodedMap(this._map);
|
|
}
|
|
};
|
|
export {
|
|
SourceMapConsumer,
|
|
SourceMapGenerator
|
|
};
|
|
//# sourceMappingURL=source-map.mjs.map
|