✨ 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
79 lines
2.7 KiB
JavaScript
79 lines
2.7 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const commander_1 = require("./commander");
|
|
const errors_1 = require("./errors");
|
|
class RedisMultiCommand {
|
|
constructor() {
|
|
Object.defineProperty(this, "queue", {
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true,
|
|
value: []
|
|
});
|
|
Object.defineProperty(this, "scriptsInUse", {
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true,
|
|
value: new Set()
|
|
});
|
|
}
|
|
static generateChainId() {
|
|
return Symbol('RedisMultiCommand Chain Id');
|
|
}
|
|
addCommand(args, transformReply) {
|
|
this.queue.push({
|
|
args,
|
|
transformReply
|
|
});
|
|
}
|
|
addFunction(name, fn, args) {
|
|
const transformedArguments = (0, commander_1.fCallArguments)(name, fn, fn.transformArguments(...args));
|
|
this.queue.push({
|
|
args: transformedArguments,
|
|
transformReply: fn.transformReply
|
|
});
|
|
return transformedArguments;
|
|
}
|
|
addScript(script, args) {
|
|
const transformedArguments = [];
|
|
if (this.scriptsInUse.has(script.SHA1)) {
|
|
transformedArguments.push('EVALSHA', script.SHA1);
|
|
}
|
|
else {
|
|
this.scriptsInUse.add(script.SHA1);
|
|
transformedArguments.push('EVAL', script.SCRIPT);
|
|
}
|
|
if (script.NUMBER_OF_KEYS !== undefined) {
|
|
transformedArguments.push(script.NUMBER_OF_KEYS.toString());
|
|
}
|
|
const scriptArguments = script.transformArguments(...args);
|
|
transformedArguments.push(...scriptArguments);
|
|
if (scriptArguments.preserve) {
|
|
transformedArguments.preserve = scriptArguments.preserve;
|
|
}
|
|
this.addCommand(transformedArguments, script.transformReply);
|
|
return transformedArguments;
|
|
}
|
|
handleExecReplies(rawReplies) {
|
|
const execReply = rawReplies[rawReplies.length - 1];
|
|
if (execReply === null) {
|
|
throw new errors_1.WatchError();
|
|
}
|
|
return this.transformReplies(execReply);
|
|
}
|
|
transformReplies(rawReplies) {
|
|
const errorIndexes = [], replies = rawReplies.map((reply, i) => {
|
|
if (reply instanceof errors_1.ErrorReply) {
|
|
errorIndexes.push(i);
|
|
return reply;
|
|
}
|
|
const { transformReply, args } = this.queue[i];
|
|
return transformReply ? transformReply(reply, args.preserve) : reply;
|
|
});
|
|
if (errorIndexes.length)
|
|
throw new errors_1.MultiErrorReply(replies, errorIndexes);
|
|
return replies;
|
|
}
|
|
}
|
|
exports.default = RedisMultiCommand;
|