first commit

This commit is contained in:
rafaeldpsilva
2025-12-10 12:32:12 +00:00
commit adbbf6bf50
3442 changed files with 2725681 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/DEMO_Dataset.xlsx

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM node:lts-alpine AS node
# install simple http server for serving static content
RUN npm install -g http-server
# make the 'app' folder the current working directory
WORKDIR /app
# copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .
EXPOSE 8080
CMD ["http-server", ".", "-p", "8080"]

7
docker.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
docker build -t rdpds/caravels-simulation .
docker tag rdpds/caravels-simulation rdpds/caravels-simulation:latest
docker tag rdpds/caravels-simulation rdpds/caravels-simulation:v0.0.19
docker push --all-tags rdpds/caravels-simulation

205
js/buildings.js Normal file
View File

@@ -0,0 +1,205 @@
let buildings = [];
// --- Building Data---
const buildingTypes = {
house: {
geometry: new THREE.BoxGeometry(4, 6, 4),
material: new THREE.MeshLambertMaterial({ color: 0x87CEEB}),
description: "Residential House", consumption: "Low Energy, Water", generation: "None", iot: "Smart Thermostat, Smart Lights"
},
factory: {
geometry: (() => {
const shape = new THREE.Shape().moveTo(0, 0).lineTo(0, 6).lineTo(8, 6).lineTo(8, 8).lineTo(10, 8).lineTo(10, 0).lineTo(0, 0);
return new THREE.ExtrudeGeometry(shape, { depth: 12, bevelEnabled: false });
})(),
material: new THREE.MeshLambertMaterial({ color: 0xB22222}),
description: "Manufacturing Plant", consumption: "High Energy, Industrial Resources", generation: "Goods, Waste Heat", iot: "Process Sensors, Automated Controls"
},
office: {
geometry: new THREE.BoxGeometry(6, 10, 6),
material: new THREE.MeshLambertMaterial({ color: 0xFFFFFF }),
description: "Office Building", consumption: "Medium Energy, Data", generation: "Services, Data", iot: "BMS, Occupancy Sensors"
},
shop: {
geometry: new THREE.BoxGeometry(8, 4, 6),
material: new THREE.MeshLambertMaterial({ color: 0xd8d400 }),
description: "Retail Shop", consumption: "Medium Energy, Goods", generation: "Retail Sales", iot: "POS System, Smart Shelves"
}
};
function initBuildings() {
createBuilding('house', new THREE.Vector3(-9, 0, 24), 'H01', 'data/H01.csv', 'assets/models/building1.glb');
createBuilding('factory', new THREE.Vector3(48, 0, -49), 'H02', 'data/H02.csv', 'assets/models/factory.glb'); // ExtrudeGeometry origin is at bottom
createBuilding('office', new THREE.Vector3(-38, 0, -12), 'H03', 'data/H03.csv', 'assets/models/predio1.glb');
createBuilding('shop', new THREE.Vector3(-5, 0, -5), 'H04', 'data/H04.csv', 'assets/models/store1.glb', Math.PI / 2);
createBuilding('house', new THREE.Vector3(-5, 0, 40), 'H05', 'data/H05.csv', 'assets/models/building2.glb');
createBuilding('house', new THREE.Vector3(6, 0, 24), 'H06', 'data/H06.csv', 'assets/models/building1.glb');
createBuilding('house', new THREE.Vector3(-37, 0, 30), 'H07', 'data/H07.csv', 'assets/models/house1.glb');
createBuilding('house', new THREE.Vector3(-34, 0, 9), 'H08', 'data/H08.csv', 'assets/models/store4.glb', -Math.PI / 2);
createBuilding('house', new THREE.Vector3(19, 0, -20), 'H09', 'data/H09.csv', 'assets/models/store2.glb', Math.PI / 2);
createBuilding('house', new THREE.Vector3(36, 0, 6), 'H10', 'data/H10.csv', 'assets/models/store5.glb');
createBuilding('house', new THREE.Vector3(34, 0, -19), 'H11', 'data/H11.csv', 'assets/models/store3.glb', Math.PI);
createBuilding('house', new THREE.Vector3(-21, 0, -18), 'H12', 'data/H12.csv', 'assets/models/predio2.glb');
createBuilding('house', new THREE.Vector3(-5, 0, -20), 'H13', 'data/H13.csv', 'assets/models/predio3.glb');
createBuilding('house', new THREE.Vector3(-7, 0, -48), 'H14', 'data/H14.csv', 'assets/models/predio4.glb');
renderer.domElement.addEventListener('pointerdown', function(event) {
// Calculate mouse position in normalized device coordinates
const rect = renderer.domElement.getBoundingClientRect();
const mouse = new THREE.Vector2(
((event.clientX - rect.left) / rect.width) * 2 - 1,
-((event.clientY - rect.top) / rect.height) * 2 + 1
);
raycaster.setFromCamera(mouse, camera);
const intersects = raycaster.intersectObjects(interactableObjects);
if (intersects.length > 0) {
const mesh = intersects[0].object;
if (mesh.material && mesh.material.name && mesh.material.name.toLowerCase().includes("vetro")) {
enableWindowLight(mesh);
}
}
});
}
function enableWindowLight(windowMesh) {
// If light is already on, turn it off
if (windowMesh.userData.lightOn) {
if (windowMesh.userData.lightOn.parent) {
windowMesh.userData.lightOn.parent.remove(windowMesh.userData.lightOn);
}
windowMesh.userData.lightOn = null;
// Optionally, reset window glow
if (windowMesh.material) {
windowMesh.material.emissive = new THREE.Color(0x000000);
windowMesh.material.emissiveIntensity = 0;
}
return;
}
// Create a warm point light just inside the window
const light = new THREE.PointLight(0xdbb108, 2, 20);
// Place the light slightly inside the window (adjust as needed)
const bbox = new THREE.Box3().setFromObject(windowMesh);
const center = bbox.getCenter(new THREE.Vector3());
light.position.copy(center);
// Optionally, offset the light a bit inward
light.position.y += 1;
// Attach the light to the window's parent group (the building)
if (windowMesh.parent) {
scene.add(light);
}
windowMesh.userData.lightOn = light;
if (windowMesh.material) {
windowMesh.material.color.set(0x66aaff)
windowMesh.material.emissive = new THREE.Color(0xebb104);
windowMesh.material.emissiveIntensity = 1;
}
}
// --- Building Creation Function ---
function createBuilding(type, position, id, csvPath, modelPath, rotation) {
const buildingData = buildingTypes[type];
if (!buildingData) { console.warn(`Building type "${type}" not found.`); return null; }
if (modelPath) {
const loader = new THREE.GLTFLoader();
loader.load(modelPath, function (gltf) {
const group = gltf.scene;
group.position.copy(position);
if (rotation){
group.rotation.y = rotation;
}
group.userData = { id, type, ...buildingData, csvPath };
group.traverse(function (child) {
if (child.isMesh) {
child.castShadow = true;
child.receiveShadow = true;
child.userData.parentGroup = group;
interactableObjects.push(child);
// Make windows less transparent
if (child.material && child.material.name && child.material.name.toLowerCase().includes("vetro")) {
child.material.thickness = 1;
child.material.opacity = 1; // or 1 for fully opaque
child.material.transparent = true; // or false if you want no transparency
child.material.transmission = 0.01;
}
}
});
buildings.push(group);
scene.add(group);
if (csvPath) loadBuildingCSV(group, csvPath);
}, undefined, function (error) {
console.error('Error loading model:', error);
});
} else {
const mesh = new THREE.Mesh(buildingData.geometry, buildingData.material);
mesh.position.copy(position);
mesh.castShadow = true;
mesh.receiveShadow = true;
mesh.userData = { id, type, ...buildingData, csvPath }; // Store csvPath
scene.add(mesh);
buildings.push(mesh);
interactableObjects.push(mesh);
if (csvPath) loadBuildingCSV(mesh, csvPath);
return mesh;
}
}
function loadBuildingCSV(building, csvPath) {
Papa.parse(csvPath, {
download: true,
header: true,
dynamicTyping: true,
complete: function (results) {
building.userData.energyData = results.data; // Array of rows
// Optionally, set initial values
if (results.data.length > 0) {
updateBuildingEnergy(building, 0); // Set to first row
}
}
});
}
// Helper to update building's current energy values by row index (e.g., time step)
function updateBuildingEnergy(building, rowIndex) {
const data = building.userData.energyData;
if (!data || !data[rowIndex]) return;
const row = data[rowIndex];
building.userData.generation = row.Generation;
building.userData.consumption = row.Consumption;
building.userData.devices = {
Time: row.Time,
AC1: row.AC1,
AC2: row.AC2,
AC3: row.AC3,
AC4: row.AC4,
WaterHeater: row['Water heater'],
TV: row.TV,
Microwave: row.Microwave,
Kettle: row.Kettle,
Lighting: row.Lighting,
Refrigerator: row.Refrigerator,
FlexibleLoad: row['Flexible Load'],
RigidLoad: row['Rigid Load']
};
}
function updateAllBuildingsForTimeStep(rowIndex) {
buildings.forEach(obj => {
if (obj.userData.energyData) {
updateBuildingEnergy(obj, rowIndex);
}
});
}
function updateBuildings() {
const rowIndex = getCurrentRowIndex();
if (rowIndex !== lastUpdateRowIndex) {
//updateAllBuildingsForTimeStep(rowIndex);
lastUpdateRowIndex = rowIndex;
}
}

88
js/cameras.js Normal file
View File

@@ -0,0 +1,88 @@
let moveAnimating = false;
let moveStart = null;
let moveEnd = null;
let contStart = null;
let contEnd = null;
let moveProgress = 0;
const moveDuration = 0.2; // seconds
let moveStartTime = 0;
let fixedY = 45;
function initCameras(renderer) {
// Camera (Fixed Diagonal View)
const aspect = window.innerWidth / window.innerHeight;
perspCamera = new THREE.PerspectiveCamera(40, aspect, 1, 1000);
camera = perspCamera;
camera.position.set(25, 45, 25);
camera.lookAt(0, 0, 0);
}
function initMotions(){
window.addEventListener('keydown', function(event) {
});
// Restrict panning to X and Z only
controls.addEventListener('change', function() {
if (moveAnimating) return; // Don't update target while animating
controls.target.y = 10;
camera.position.y = fixedY;
camera.position.y = Math.max(camera.position.y, 20);
camera.position.y = Math.min(camera.position.y, 45);
});
// --- Scroll wheel pans the camera forward/backward (along view direction) ---
renderer.domElement.addEventListener('wheel', function(event) {
event.preventDefault(); // Prevent default scrolling behavior
if (!moveAnimating){
if (event.deltaY < 0 && camera.position.y <= 35) {
// Scrolling up
moveStart = camera.position.clone();
moveEnd = camera.position.clone().add(new THREE.Vector3(2, 10, 2));
contStart = controls.target.clone();
contEnd = controls.target.clone().add(new THREE.Vector3(2, 0, 2));
moveProgress = 0;
moveStartTime = performance.now() / 1000;
moveAnimating = true;
} else if (event.deltaY > 0 && camera.position.y >= 30) {
// Scrolling down
moveStart = camera.position.clone();
moveEnd = camera.position.clone().add(new THREE.Vector3(-2, -10, -2));
contStart = controls.target.clone();
contEnd = controls.target.clone().add(new THREE.Vector3(-2, 0, -2));
moveProgress = 0;
moveStartTime = performance.now() / 1000;
moveAnimating = true;
}
}
}, { passive: false });
}
// --- Event Handlers ---
function onWindowResize() {
const aspect = window.innerWidth / window.innerHeight;
perspCamera.aspect = aspect;
perspCamera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
}
function animateCamera() {
if (moveAnimating) {
const now = performance.now() / 1000;
moveProgress = Math.min((now - moveStartTime) / moveDuration, 1);
camera.position.lerpVectors(moveStart, moveEnd, moveProgress);
controls.target.lerpVectors(contStart, contEnd, moveProgress); // Optional: move target too
if (moveProgress >= 1) {
moveAnimating = false;
fixedY = camera.position.y;
}
controls.update();
}
}

59
js/controls.js vendored Normal file
View File

@@ -0,0 +1,59 @@
let mouse;
let raycaster;
function initControls(scene, camera, renderer){
// --- Add OrbitControls ---
controls = new THREE.OrbitControls(camera, renderer.domElement);
controls.enableDamping = true; // Smooth movement
controls.dampingFactor = 0.05;
controls.enableRotate = false;
controls.enablePan = true;
controls.enableZoom = false;
controls.mouseButtons = {
LEFT: THREE.MOUSE.PAN
}
controls.target.set(0, 0, 0); // Focus on scene center
controls.update();
const transformControls = new THREE.TransformControls(camera, renderer.domElement);
transformControls.setMode('translate'); // Move mode
transformControls.showX = true;
transformControls.showY = false;
transformControls.showZ = true;
transformControls.enabled = false;
transformControls.addEventListener('dragging-changed', function (event) {
controls.enabled = !event.value; // Disable OrbitControls while dragging
});
scene.add(transformControls);
window.addEventListener('keydown', function(event) {
if (event.key === 'm') {
transformControls.enabled = !transformControls.enabled;
}
});
// Add event listener for selecting Building To Move
renderer.domElement.addEventListener('pointerdown', function(event) {
// Calculate mouse position in normalized device coordinates
const rect = renderer.domElement.getBoundingClientRect();
mouse.x = ((event.clientX - rect.left) / rect.width) * 2 - 1;
mouse.y = -((event.clientY - rect.top) / rect.height) * 2 + 1;
raycaster.setFromCamera(mouse, camera);
const intersects = raycaster.intersectObjects(interactableObjects);
if (transformControls.enabled) {
raycaster.setFromCamera(mouse, camera);
const intersects = raycaster.intersectObjects(interactableObjects);
if (intersects.length > 0) {
const selected = intersects[0].object.userData.parentGroup || intersects[0].object;
transformControls.attach(selected);
} else {
transformControls.detach();
}
}
});
mouse = new THREE.Vector2();
raycaster = new THREE.Raycaster();
}

71
js/main.js Normal file
View File

@@ -0,0 +1,71 @@
// --- Global Variables ---
let scene, camera, renderer, controls;
// --- Initialization ---
function init() {
// Scene
scene = new THREE.Scene();
scene.background = new THREE.Color(0x9ee3f9);
// Renderer
renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.outputColorSpace = THREE.SRGBColorSpace;
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.outputEncoding = THREE.sRGBEncoding;
renderer.shadowMap.enabled = true;
//renderer.shadowMap.type = THREE.PCFSoftShadowMap;
document.body.appendChild(renderer.domElement);
initCameras(renderer);
initSun(scene);
initControls(scene, camera, renderer);
initMotions();
initPanels();
// Event Listeners
window.addEventListener('resize', onWindowResize, false);
// Load the city model
// Ground Plane (Unchanged)
const groundGeometry = new THREE.PlaneGeometry(100, 100);
const groundMaterial = new THREE.MeshLambertMaterial({ color: 0x91ca49, side: THREE.DoubleSide });
const ground = new THREE.Mesh(groundGeometry, groundMaterial);
const loader = new THREE.GLTFLoader();
loader.load('assets/models/ground.glb', function (gltf) {
const group = gltf.scene;
group.traverse(function (child) {
if (child.isMesh) {
child.castShadow = true;
child.receiveShadow = true;
child.userData.parentGroup = group;
}
});
buildings.push(group);
scene.add(group);
}, undefined, function (error) {s
console.error('Error loading model:', error);
});
initBuildings();
initTime();
}
// --- Animation Loop ---
function animate(timestamp) {
requestAnimationFrame(animate);
totalGameSecondsElapsed = animateUpdateTime(timestamp);
updateBuildings();
updatePanels();
updateSun(scene);
updateFps();
animateCamera()
controls.update();
renderer.render(scene, camera);
}
// --- Start ---
window.onload = function () {
init();
animate(0); // Start animation loop, pass initial timestamp 0
}

317
js/modules/suncalc.js Normal file
View File

@@ -0,0 +1,317 @@
/*
(c) 2011-2015, Vladimir Agafonkin
SunCalc is a JavaScript library for calculating sun/moon position and light phases.
https://github.com/mourner/suncalc
*/
(function () { 'use strict';
// shortcuts for easier to read formulas
var PI = Math.PI,
sin = Math.sin,
cos = Math.cos,
tan = Math.tan,
asin = Math.asin,
atan = Math.atan2,
acos = Math.acos,
rad = PI / 180;
// sun calculations are based on http://aa.quae.nl/en/reken/zonpositie.html formulas
// date/time constants and conversions
var dayMs = 1000 * 60 * 60 * 24,
J1970 = 2440588,
J2000 = 2451545;
function toJulian(date) { return date.valueOf() / dayMs - 0.5 + J1970; }
function fromJulian(j) { return new Date((j + 0.5 - J1970) * dayMs); }
function toDays(date) { return toJulian(date) - J2000; }
// general calculations for position
var e = rad * 23.4397; // obliquity of the Earth
function rightAscension(l, b) { return atan(sin(l) * cos(e) - tan(b) * sin(e), cos(l)); }
function declination(l, b) { return asin(sin(b) * cos(e) + cos(b) * sin(e) * sin(l)); }
function azimuth(H, phi, dec) { return atan(sin(H), cos(H) * sin(phi) - tan(dec) * cos(phi)); }
function altitude(H, phi, dec) { return asin(sin(phi) * sin(dec) + cos(phi) * cos(dec) * cos(H)); }
function siderealTime(d, lw) { return rad * (280.16 + 360.9856235 * d) - lw; }
function astroRefraction(h) {
if (h < 0) // the following formula works for positive altitudes only.
h = 0; // if h = -0.08901179 a div/0 would occur.
// formula 16.4 of "Astronomical Algorithms" 2nd edition by Jean Meeus (Willmann-Bell, Richmond) 1998.
// 1.02 / tan(h + 10.26 / (h + 5.10)) h in degrees, result in arc minutes -> converted to rad:
return 0.0002967 / Math.tan(h + 0.00312536 / (h + 0.08901179));
}
// general sun calculations
function solarMeanAnomaly(d) { return rad * (357.5291 + 0.98560028 * d); }
function eclipticLongitude(M) {
var C = rad * (1.9148 * sin(M) + 0.02 * sin(2 * M) + 0.0003 * sin(3 * M)), // equation of center
P = rad * 102.9372; // perihelion of the Earth
return M + C + P + PI;
}
function sunCoords(d) {
var M = solarMeanAnomaly(d),
L = eclipticLongitude(M);
return {
dec: declination(L, 0),
ra: rightAscension(L, 0)
};
}
var SunCalc = {};
// calculates sun position for a given date and latitude/longitude
SunCalc.getPosition = function (date, lat, lng) {
var lw = rad * -lng,
phi = rad * lat,
d = toDays(date),
c = sunCoords(d),
H = siderealTime(d, lw) - c.ra;
return {
azimuth: azimuth(H, phi, c.dec),
altitude: altitude(H, phi, c.dec)
};
};
// sun times configuration (angle, morning name, evening name)
var times = SunCalc.times = [
[-0.833, 'sunrise', 'sunset' ],
[ -0.3, 'sunriseEnd', 'sunsetStart' ],
[ -6, 'dawn', 'dusk' ],
[ -12, 'nauticalDawn', 'nauticalDusk'],
[ -18, 'nightEnd', 'night' ],
[ 6, 'goldenHourEnd', 'goldenHour' ]
];
// adds a custom time to the times config
SunCalc.addTime = function (angle, riseName, setName) {
times.push([angle, riseName, setName]);
};
// calculations for sun times
var J0 = 0.0009;
function julianCycle(d, lw) { return Math.round(d - J0 - lw / (2 * PI)); }
function approxTransit(Ht, lw, n) { return J0 + (Ht + lw) / (2 * PI) + n; }
function solarTransitJ(ds, M, L) { return J2000 + ds + 0.0053 * sin(M) - 0.0069 * sin(2 * L); }
function hourAngle(h, phi, d) { return acos((sin(h) - sin(phi) * sin(d)) / (cos(phi) * cos(d))); }
function observerAngle(height) { return -2.076 * Math.sqrt(height) / 60; }
// returns set time for the given sun altitude
function getSetJ(h, lw, phi, dec, n, M, L) {
var w = hourAngle(h, phi, dec),
a = approxTransit(w, lw, n);
return solarTransitJ(a, M, L);
}
// calculates sun times for a given date, latitude/longitude, and, optionally,
// the observer height (in meters) relative to the horizon
SunCalc.getTimes = function (date, lat, lng, height) {
height = height || 0;
var lw = rad * -lng,
phi = rad * lat,
dh = observerAngle(height),
d = toDays(date),
n = julianCycle(d, lw),
ds = approxTransit(0, lw, n),
M = solarMeanAnomaly(ds),
L = eclipticLongitude(M),
dec = declination(L, 0),
Jnoon = solarTransitJ(ds, M, L),
i, len, time, h0, Jset, Jrise;
var result = {
solarNoon: fromJulian(Jnoon),
nadir: fromJulian(Jnoon - 0.5)
};
for (i = 0, len = times.length; i < len; i += 1) {
time = times[i];
h0 = (time[0] + dh) * rad;
Jset = getSetJ(h0, lw, phi, dec, n, M, L);
Jrise = Jnoon - (Jset - Jnoon);
result[time[1]] = fromJulian(Jrise);
result[time[2]] = fromJulian(Jset);
}
return result;
};
// moon calculations, based on http://aa.quae.nl/en/reken/hemelpositie.html formulas
function moonCoords(d) { // geocentric ecliptic coordinates of the moon
var L = rad * (218.316 + 13.176396 * d), // ecliptic longitude
M = rad * (134.963 + 13.064993 * d), // mean anomaly
F = rad * (93.272 + 13.229350 * d), // mean distance
l = L + rad * 6.289 * sin(M), // longitude
b = rad * 5.128 * sin(F), // latitude
dt = 385001 - 20905 * cos(M); // distance to the moon in km
return {
ra: rightAscension(l, b),
dec: declination(l, b),
dist: dt
};
}
SunCalc.getMoonPosition = function (date, lat, lng) {
var lw = rad * -lng,
phi = rad * lat,
d = toDays(date),
c = moonCoords(d),
H = siderealTime(d, lw) - c.ra,
h = altitude(H, phi, c.dec),
// formula 14.1 of "Astronomical Algorithms" 2nd edition by Jean Meeus (Willmann-Bell, Richmond) 1998.
pa = atan(sin(H), tan(phi) * cos(c.dec) - sin(c.dec) * cos(H));
h = h + astroRefraction(h); // altitude correction for refraction
return {
azimuth: azimuth(H, phi, c.dec),
altitude: h,
distance: c.dist,
parallacticAngle: pa
};
};
// calculations for illumination parameters of the moon,
// based on http://idlastro.gsfc.nasa.gov/ftp/pro/astro/mphase.pro formulas and
// Chapter 48 of "Astronomical Algorithms" 2nd edition by Jean Meeus (Willmann-Bell, Richmond) 1998.
SunCalc.getMoonIllumination = function (date) {
var d = toDays(date || new Date()),
s = sunCoords(d),
m = moonCoords(d),
sdist = 149598000, // distance from Earth to Sun in km
phi = acos(sin(s.dec) * sin(m.dec) + cos(s.dec) * cos(m.dec) * cos(s.ra - m.ra)),
inc = atan(sdist * sin(phi), m.dist - sdist * cos(phi)),
angle = atan(cos(s.dec) * sin(s.ra - m.ra), sin(s.dec) * cos(m.dec) -
cos(s.dec) * sin(m.dec) * cos(s.ra - m.ra));
return {
fraction: (1 + cos(inc)) / 2,
phase: 0.5 + 0.5 * inc * (angle < 0 ? -1 : 1) / Math.PI,
angle: angle
};
};
function hoursLater(date, h) {
return new Date(date.valueOf() + h * dayMs / 24);
}
// calculations for moon rise/set times are based on http://www.stargazing.net/kepler/moonrise.html article
SunCalc.getMoonTimes = function (date, lat, lng, inUTC) {
var t = new Date(date);
if (inUTC) t.setUTCHours(0, 0, 0, 0);
else t.setHours(0, 0, 0, 0);
var hc = 0.133 * rad,
h0 = SunCalc.getMoonPosition(t, lat, lng).altitude - hc,
h1, h2, rise, set, a, b, xe, ye, d, roots, x1, x2, dx;
// go in 2-hour chunks, each time seeing if a 3-point quadratic curve crosses zero (which means rise or set)
for (var i = 1; i <= 24; i += 2) {
h1 = SunCalc.getMoonPosition(hoursLater(t, i), lat, lng).altitude - hc;
h2 = SunCalc.getMoonPosition(hoursLater(t, i + 1), lat, lng).altitude - hc;
a = (h0 + h2) / 2 - h1;
b = (h2 - h0) / 2;
xe = -b / (2 * a);
ye = (a * xe + b) * xe + h1;
d = b * b - 4 * a * h1;
roots = 0;
if (d >= 0) {
dx = Math.sqrt(d) / (Math.abs(a) * 2);
x1 = xe - dx;
x2 = xe + dx;
if (Math.abs(x1) <= 1) roots++;
if (Math.abs(x2) <= 1) roots++;
if (x1 < -1) x1 = x2;
}
if (roots === 1) {
if (h0 < 0) rise = i + x1;
else set = i + x1;
} else if (roots === 2) {
rise = i + (ye < 0 ? x2 : x1);
set = i + (ye < 0 ? x1 : x2);
}
if (rise && set) break;
h0 = h2;
}
var result = {};
if (rise) result.rise = hoursLater(t, rise);
if (set) result.set = hoursLater(t, set);
if (!rise && !set) result[ye > 0 ? 'alwaysUp' : 'alwaysDown'] = true;
return result;
};
// export as Node module / AMD module / browser variable
if (typeof exports === 'object' && typeof module !== 'undefined') module.exports = SunCalc;
else if (typeof define === 'function' && define.amd) define(SunCalc);
else window.SunCalc = SunCalc;
}());

263
js/panels.js Normal file
View File

@@ -0,0 +1,263 @@
const debugPanel = document.getElementById('debug-panel');
const infoPanel = document.getElementById('info-panel');
const infoButton = document.getElementById('info-button');
const moveButton = document.getElementById('move-button');
const toolPalette = document.getElementById('tool-palette');
let infoPanelPinned = false;
let pinnedBuildingData = null;
let debugOn = true;
let interactableObjects = [];
let INTERSECTED;
// Add these variables at the top of your file (outside any function)
let lastFpsUpdate = performance.now();
let frameCount = 0;
let currentFps = 0;
// Call this in your animation loop (e.g., in animate() in main.js)
function updateFps() {
frameCount++;
const now = performance.now();
if (now - lastFpsUpdate > 500) { // Update every 0.5s
currentFps = (frameCount * 1000) / (now - lastFpsUpdate);
lastFpsUpdate = now;
frameCount = 0;
}
}
function initPanels(){
window.addEventListener('keydown', function(event) {
if (event.key === 'h') {
console.log('H');
hideDebugPanel()
debugOn = !debugOn;
}
});
/* renderer.domElement.addEventListener('pointerdown', function(event) {
// Calculate mouse position in normalized device coordinates
const rect = renderer.domElement.getBoundingClientRect();
mouse.x = ((event.clientX - rect.left) / rect.width) * 2 - 1;
mouse.y = -((event.clientY - rect.top) / rect.height) * 2 + 1;
raycaster.setFromCamera(mouse, camera);
const intersects = raycaster.intersectObjects(interactableObjects);
if (intersects.length > 0) {
console.log(intersects[0].object);
// Pin the info panel to this building
infoPanelPinned = true;
const selected = intersects[0].object.userData.parentGroup || intersects[0].object;
pinnedBuildingData = selected.userData;
displayInfo(pinnedBuildingData);
} else {
// Unpin if clicking empty space
infoPanelPinned = false;
pinnedBuildingData = null;
hideInfo();
}
}); */
document.addEventListener('mousemove', onMouseMove, false);
toolPalette.addEventListener('mouseup', (event) => event.stopPropagation(), false);
// Tool Palette Button Listeners
infoButton.addEventListener('click', showInfoPanelForSelected);
moveButton.addEventListener('click', () => {
if (selectedObject) {
console.log("Move tool clicked for:", selectedObject.userData.description);
// Add move logic here later
hideToolPalette(); // Hide palette after action (optional)
}
});
}
function onMouseMove(event) {
if (infoPanelPinned) return;
// Calculate mouse position (Unchanged)
mouse.x = (event.clientX / window.innerWidth) * 2 - 1;
mouse.y = -(event.clientY / window.innerHeight) * 2 + 1;
// --- Info Panel Positioning (Adjusted for bottom-left) ---
const panelRect = infoPanel.getBoundingClientRect();
let panelX = event.clientX + 15;
let panelY = event.clientY - panelRect.height - 15; // Position above cursor
// Basic boundary checks (adjust as needed)
if (panelX + panelRect.width > window.innerWidth - 10) {
panelX = event.clientX - panelRect.width - 15;
}
if (panelY < 10) { // Check top boundary
panelY = event.clientY + 15; // Move below cursor if too high
}
if (panelX < 10) panelX = 10; // Prevent going off left
infoPanel.style.left = `${panelX}px`;
infoPanel.style.top = `${panelY}px`;
}
// --- Debug Panel ---
function displaySunDebug() {
const pos = directionalLight.position;
debugPanel.innerHTML = `<h3>Debug Info</h3>
<p><strong>Position:</strong> (${pos.x.toFixed(2)}, ${pos.y.toFixed(2)}, ${pos.z.toFixed(2)})</p>`;
debugPanel.style.display = 'block';
}
function displayDebugPanel(object) {
if (!object || !object.position) {
debugPanel.style.display = 'none';
return;
}
const pos = object.position;
debugPanel.innerHTML = `<h3>Debug Info</h3>
<p><strong>ID:</strong> ${object.userData?.id ?? 'N/A'}</p>
<p><strong>Position:</strong> (${pos.x.toFixed(2)}, ${pos.y.toFixed(2)}, ${pos.z.toFixed(2)})</p>`;
debugPanel.style.display = 'block';
}
function hideDebugPanel() {
debugPanel.style.display = 'none';
}
function showToolPalette(targetObject) {
if (!targetObject) return;
// Calculate screen position of the object
const screenPos = toScreenPosition(targetObject, camera);
// Position palette slightly above and to the right of the object's center
toolPalette.style.left = `${screenPos.x + 10}px`;
toolPalette.style.top = `${screenPos.y - toolPalette.offsetHeight - 10}px`; // Offset by palette height
// Basic boundary check (prevent going off screen) - needs improvement
const paletteRect = toolPalette.getBoundingClientRect(); // Get actual size after potential content change
if (parseInt(toolPalette.style.left) + paletteRect.width > window.innerWidth - 10) {
toolPalette.style.left = `${window.innerWidth - paletteRect.width - 10}px`;
}
if (parseInt(toolPalette.style.top) < 10) {
toolPalette.style.top = '10px';
}
if (parseInt(toolPalette.style.left) < 10) {
toolPalette.style.left = '10px';
}
toolPalette.style.display = 'flex'; // Use flex to show it
}
function hideToolPalette() {
toolPalette.style.display = 'none';
}
function showInfoPanelForSelected() {
if (selectedObject && selectedObject.userData) {
displayInfo(selectedObject.userData);
} else {
hideInfoPanel();
}
// Optionally hide palette after clicking info
// hideToolPalette();
}
function displayInfo(buildingData) {
document.getElementById('info-title').textContent = buildingData.description;
document.getElementById('info-consumption').textContent = buildingData.consumption;
document.getElementById('info-generation').textContent = buildingData.generation;
document.getElementById('info-iot').textContent = buildingData.iot;
infoPanel.style.display = 'block'; // Show the panel
}
function hideInfoPanel() {
infoPanel.style.display = 'none'; // Hide the panel
}
// --- Info Panel ---
function displayInfo(buildingData) {
if (infoPanelPinned && pinnedBuildingData && pinnedBuildingData !== buildingData) return;
if (infoPanelPinned && !pinnedBuildingData) pinnedBuildingData = buildingData;
document.getElementById('info-title').textContent = buildingData.id;
document.getElementById('info-consumption').textContent = buildingData.consumption + ' kWh';
document.getElementById('info-generation').textContent = buildingData.generation + ' kWh';
// Dynamically show IoT/device consumption
let iotHtml = '';
if (buildingData.devices) {
for (const [key, value] of Object.entries(buildingData.devices)) {
iotHtml += `<strong>${key}:</strong> ${value ?? 'N/A'}<br>`;
}
} else {
iotHtml = 'N/A';
}
document.getElementById('info-iot').innerHTML = iotHtml;
infoPanel.style.display = 'block';
}
function hideInfo() {
if (!infoPanelPinned) {
infoPanel.style.display = 'none';
pinnedBuildingData = null;
}
}
function displayDebugPanelWithCamera(object) {
let html = `<h3>Debug Info</h3>`;
if (object && object.position) {
html += `<p><strong>ID:</strong> ${object.userData?.id ?? 'N/A'}</p>
<p><strong>Object Position:</strong> (${object.position.x.toFixed(2)}, ${object.position.y.toFixed(2)}, ${object.position.z.toFixed(2)})</p>`;
}
html += `<p><strong>FPS:</strong> ${currentFps.toFixed(1)}</p>`;
html += `<p><strong>Camera Position:</strong> (${camera.position.x.toFixed(2)}, ${camera.position.y.toFixed(2)}, ${camera.position.z.toFixed(2)})</p>`;
html += `<p><strong>Controls Target:</strong> (${controls.target.x.toFixed(2)}, ${controls.target.y.toFixed(2)}, ${controls.target.z.toFixed(2)})</p>`;
html += `<p><strong>Sun Position:</strong> (${directionalLight.position.x.toFixed(2)}, ${directionalLight.position.y.toFixed(2)}, ${directionalLight.position.z.toFixed(2)})</p>`;
debugPanel.innerHTML = html;
debugPanel.style.display = 'block';
}
function updatePanels(){
if (infoPanelPinned && pinnedBuildingData) {
displayInfo(pinnedBuildingData);
}
// --- Raycasting Logic ---
raycaster.setFromCamera(mouse, camera);
const intersects = raycaster.intersectObjects(interactableObjects);
let debugTarget = null;
if (infoPanelPinned && pinnedBuildingData) {
debugTarget = interactableObjects.find(obj => obj.userData === pinnedBuildingData);
} else if (intersects.length > 0) {
debugTarget = intersects[0].object.userData.parentGroup || intersects[0].object;
}
if (debugOn){
displayDebugPanelWithCamera(debugTarget);
//displaySunDebug();
}
if (intersects.length > 0) {
if (INTERSECTED != intersects[0].object) {
if (INTERSECTED) { /* Optional: Revert highlight */ }
//INTERSECTED = intersects[0].object.userData.parentGroup || intersects[0].object;
INTERSECTED = intersects[0].object;
if (INTERSECTED.userData) {
//console.log('Pinned building data:', INTERSECTED.userData);
if (INTERSECTED.userData.id){
displayInfo(INTERSECTED.userData);
} else{
displayInfo(INTERSECTED.userData.parentGroup.userData);
}
} else {
hideInfo();
}
}
} else {
if (INTERSECTED) {
hideInfo();
}
INTERSECTED = null;
}
}

106
js/sun.js Normal file
View File

@@ -0,0 +1,106 @@
let directionalLight;
let ambientLight;
function initSun(scene) {
// Lighting
ambientLight = new THREE.AmbientLight(0x90bbbd, 0.9);
scene.add(ambientLight);
directionalLight = new THREE.DirectionalLight(0xffffff);
directionalLight.position.set(20, 30, 10);
directionalLight.castShadow = true;
directionalLight.shadow.mapSize.width = 4096;
directionalLight.shadow.mapSize.height = 4096;
directionalLight.shadow.camera.near = 25;
directionalLight.shadow.camera.far = 250;
directionalLight.shadow.bias = -0.005
directionalLight.shadow.camera.left = -100;
directionalLight.shadow.camera.right = 100;
directionalLight.shadow.camera.top = 100;
directionalLight.shadow.camera.bottom = -100;
scene.add(directionalLight);
}
function sunPosition(){
// --- Use SunCalc to get sun position ---
// Set your latitude and longitude
const latitude = 41.17873;
const longitude = -8.60835; // Example: adjust as needed
// Calculate the current date and time based on your simulation hour
const now = new Date();
now.setHours(Math.floor(currentHour));
now.setMinutes(Math.floor((currentHour % 1) * 60));
now.setSeconds(0);
// Get sun position from SunCalc
const sunPos = SunCalc.getPosition(now, latitude, longitude);
// Convert to your scene's coordinates
const sunRadius = 100;
const azimuth = sunPos.azimuth; // Convert from south-based to x/z-plane (east = 0)
const elevation = sunPos.altitude;
console.log(azimuth, elevation)
const sunX = sunRadius * Math.cos(elevation) * Math.cos(azimuth);
const sunY = sunRadius * Math.sin(elevation);
const sunZ = sunRadius * Math.cos(elevation) * Math.sin(azimuth);
directionalLight.position.set(sunX, sunY, sunZ);
directionalLight.target.position.set(0, 0, 0);
directionalLight.target.updateMatrixWorld();
}
function updateSun(scene) {
sunPosition();
// --- Dynamic Sky Color ---
const dayColor = new THREE.Color(0xa9d3fd); // Light blue
const nightColor = new THREE.Color(0x0a0a23); // Dark blue/black
const sunriseSunColor = new THREE.Color(0xa3d1ff); // Bright white/yellow
const daySunColor = new THREE.Color(0xffffa9); // Bright white/yellow
const sunsetSunColor = new THREE.Color(0xffcc25); // Warm orange
const nightSunColor = new THREE.Color(0x222244); // Dim blue
const dayAmbientColor = new THREE.Color(0xa9d3fd); // Light blue
const nightAmbientColor = new THREE.Color(0x222244); // Dim blue
let sunColor;
if (currentHour < 5 || currentHour >= 21){
sunColor = nightSunColor;
ambientLight.color.copy(nightAmbientColor);
directionalLight.castShadow = false;
directionalLight.intensity = 0
scene.background = nightColor;
} else if (5 < currentHour && currentHour <= 8) {
// Night to sunrise
const t = (currentHour - 5) / 3;
sunColor = nightSunColor.clone().lerp(sunriseSunColor, t);
ambientLight.color.copy(nightAmbientColor.clone().lerp(dayAmbientColor, t));
directionalLight.castShadow = true;
directionalLight.intensity = t *0.5;
scene.background = nightColor.clone().lerp(dayColor, t);
} else if (currentHour < 11) {
// Sunrise to day
const t = (currentHour - 8) / 3;
sunColor = sunriseSunColor.clone().lerp(daySunColor, t);
directionalLight.castShadow = true;
scene.background = dayColor;
} else if (currentHour < 16) {
// Day
sunColor = daySunColor;
scene.background = dayColor;
} else if (currentHour < 20) {
// Day to sunset
const t = (currentHour - 16) / 2;
directionalLight.intensity = (1-t) * 0.5
sunColor = daySunColor.clone().lerp(sunsetSunColor, t);
scene.background = dayColor;
} else if (currentHour < 21) {
// Sunset to night
const t = (currentHour - 20);
sunColor = sunsetSunColor.clone().lerp(nightSunColor, t);
ambientLight.color.copy(dayAmbientColor.clone().lerp(nightAmbientColor, t));
scene.background = dayColor.clone().lerp(nightColor, t);
}
directionalLight.color.copy(sunColor);
}

93
js/time.js Normal file
View File

@@ -0,0 +1,93 @@
const pauseButton = document.getElementById('pause-button');
const playButton = document.getElementById('play-button');
const fastButton = document.getElementById('fast-button');
const timeDisplay = document.getElementById('time-display');
// --- Time System Variables ---
const NORMAL_SPEED = 60; // 1 real sec = 1 game min
const FAST_SPEED = 1000; // 1 real sec = 10 game min
let timeScaleMultiplier = NORMAL_SPEED; // Start at normal speed
let totalGameSecondsElapsed = 0;
let currentDay = 80;
let currentHour = 7.0; // Start at 8:00 AM
let lastTimestamp = 0; // For delta time calculation
let lastUpdateRowIndex = 0;
function initTime(){
// Time Control Button Listeners
pauseButton.addEventListener('click', () => setTimeScale(0));
playButton.addEventListener('click', () => setTimeScale(NORMAL_SPEED));
fastButton.addEventListener('click', () => setTimeScale(FAST_SPEED));
// Initialize time
totalGameSecondsElapsed = (currentDay - 1) * 86400 + currentHour * 3600;
updateTimeDisplay(); // Initial display update
updateButtonStates(); // Set initial button active state
}
// --- Time System Functions ---
function updateTime(deltaTime) {
if (timeScaleMultiplier <= 0) return; // Don't update if paused
totalGameSecondsElapsed += deltaTime * timeScaleMultiplier;
const SECONDS_IN_DAY = 86400;
const SECONDS_IN_HOUR = 3600;
let previousDay = currentDay;
currentDay = Math.floor(totalGameSecondsElapsed / SECONDS_IN_DAY) + 1;
currentHour = (totalGameSecondsElapsed % SECONDS_IN_DAY) / SECONDS_IN_HOUR;
if (currentDay !== previousDay) {
console.log(`Day ${currentDay} has begun!`);
// Add any daily logic here
}
updateTimeDisplay();
}
function formatTime(hour) {
const hours = Math.floor(hour);
const minutes = Math.floor((hour - hours) * 60);
return `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}`;
}
function updateTimeDisplay() {
timeDisplay.textContent = `Day ${currentDay}, ${formatTime(currentHour)}`;
}
function setTimeScale(newScale) {
timeScaleMultiplier = newScale;
console.log(`Time scale set to: ${timeScaleMultiplier}`);
updateButtonStates();
}
function updateButtonStates() {
pauseButton.classList.toggle('active', timeScaleMultiplier === 0);
playButton.classList.toggle('active', timeScaleMultiplier === NORMAL_SPEED);
fastButton.classList.toggle('active', timeScaleMultiplier === FAST_SPEED);
}
function animateUpdateTime(timestamp){
// Calculate Delta Time
if (lastTimestamp === 0) {
lastTimestamp = timestamp; // Initialize on first frame
}
const deltaTime = (timestamp - lastTimestamp) / 1000; // Delta time in seconds
lastTimestamp = timestamp;
// --- Update Time ---
updateTime(deltaTime);
return totalGameSecondsElapsed;
}
function getCurrentRowIndex(){
// --- Update buildings every 15 game minutes ---
const SECONDS_IN_DAY = 86400;
const SECONDS_IN_HOUR = 3600;
const MINUTES_PER_ROW = 15;
const SECONDS_PER_ROW = MINUTES_PER_ROW * 60;
// Calculate which row should be active based on totalGameSecondsElapsed
const rowIndex = Math.floor((totalGameSecondsElapsed % SECONDS_IN_DAY) / SECONDS_PER_ROW);
return rowIndex;
}

5
web-app/build.log Normal file
View File

@@ -0,0 +1,5 @@
> web-app@0.0.0 build
> vue-tsc -b && vite build
src/components/DigitalTwin.vue(35,5): error TS6133: 'fixedY' is declared but its value is never read.

3858
web-app/dist/assets/index-BDdF_E2G.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}.canvas-container[data-v-3dc03414]{width:100%;height:100vh;display:block}.building-panel[data-v-2da88f20]{position:absolute;transform:translate(-50%,-110%);width:300px;background:#fffffff2;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:12px;box-shadow:0 4px 20px #00000026;padding:0;overflow:hidden;font-family:Inter,sans-serif;animation:popIn-2da88f20 .2s cubic-bezier(.175,.885,.32,1.275);z-index:1000;pointer-events:auto}@keyframes popIn-2da88f20{0%{opacity:0;transform:translate(-50%,-100%) scale(.9)}to{opacity:1;transform:translate(-50%,-110%) scale(1)}}.header[data-v-2da88f20]{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;padding:16px;display:flex;justify-content:space-between;align-items:center}.header h3[data-v-2da88f20]{margin:0;font-size:1.1rem;font-weight:600}.close-btn[data-v-2da88f20]{background:none;border:none;color:#fff;font-size:1.5rem;cursor:pointer;line-height:1;padding:0 5px}.content[data-v-2da88f20]{padding:20px}.info-row[data-v-2da88f20]{display:flex;justify-content:space-between;margin-bottom:12px;border-bottom:1px solid #eee;padding-bottom:8px}.label[data-v-2da88f20]{color:#666;font-weight:500}.value[data-v-2da88f20]{font-weight:600;color:#333}.section-title[data-v-2da88f20]{margin-top:20px;margin-bottom:10px;font-size:.9rem;text-transform:uppercase;letter-spacing:1px;color:#888;font-weight:700}.iot-text[data-v-2da88f20]{font-size:.9rem;color:#555;background:#f5f5f7;padding:10px;border-radius:6px;margin:0}.actions[data-v-2da88f20]{margin-top:20px;display:flex;gap:10px}.action-btn[data-v-2da88f20]{flex:1;padding:10px;border:none;border-radius:6px;background:#f0f0f0;color:#333;font-weight:600;cursor:pointer;transition:all .2s}.action-btn[data-v-2da88f20]:hover{background:#e0e0e0;transform:translateY(-1px)}.time-controls[data-v-fa1ceac6]{position:absolute;bottom:20px;left:50%;transform:translate(-50%);background:#141419d9;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);padding:12px 24px;border-radius:30px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#fff;box-shadow:0 4px 15px #0000004d}.time-display[data-v-fa1ceac6]{font-family:Monaco,Consolas,monospace;font-size:1.1rem;font-weight:600;color:#4facfe}.controls[data-v-fa1ceac6]{display:flex;gap:15px;align-items:center}button[data-v-fa1ceac6]{background:transparent;border:1px solid rgba(255,255,255,.2);color:#fff;padding:6px 12px;border-radius:15px;cursor:pointer;font-size:.9rem;transition:all .2s}button[data-v-fa1ceac6]:hover{background:#ffffff1a}button.active[data-v-fa1ceac6]{background:#4facfe;color:#fff;border-color:#4facfe}.speed-controls[data-v-fa1ceac6]{display:flex;gap:5px}.speed-controls button[data-v-fa1ceac6]{padding:4px 8px;font-size:.8rem}html,body,#app{margin:0;padding:0;width:100%;height:100%;overflow:hidden}

BIN
web-app/dist/assets/models/building1.glb vendored Normal file

Binary file not shown.

BIN
web-app/dist/assets/models/building2.glb vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
web-app/dist/assets/models/factory.glb vendored Normal file

Binary file not shown.

BIN
web-app/dist/assets/models/ground.glb vendored Normal file

Binary file not shown.

BIN
web-app/dist/assets/models/house1.glb vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
web-app/dist/assets/models/pole.glb vendored Normal file

Binary file not shown.

BIN
web-app/dist/assets/models/predio1.glb vendored Normal file

Binary file not shown.

BIN
web-app/dist/assets/models/predio2.glb vendored Normal file

Binary file not shown.

BIN
web-app/dist/assets/models/predio3.glb vendored Normal file

Binary file not shown.

BIN
web-app/dist/assets/models/predio4.glb vendored Normal file

Binary file not shown.

BIN
web-app/dist/assets/models/store1.glb vendored Normal file

Binary file not shown.

BIN
web-app/dist/assets/models/store2.glb vendored Normal file

Binary file not shown.

BIN
web-app/dist/assets/models/store3.glb vendored Normal file

Binary file not shown.

BIN
web-app/dist/assets/models/store4.glb vendored Normal file

Binary file not shown.

BIN
web-app/dist/assets/models/store5.glb vendored Normal file

Binary file not shown.

35150
web-app/dist/data/H01.csv vendored Normal file

File diff suppressed because it is too large Load Diff

35150
web-app/dist/data/H02.csv vendored Normal file

File diff suppressed because it is too large Load Diff

35150
web-app/dist/data/H03.csv vendored Normal file

File diff suppressed because it is too large Load Diff

35150
web-app/dist/data/H04.csv vendored Normal file

File diff suppressed because it is too large Load Diff

35150
web-app/dist/data/H05.csv vendored Normal file

File diff suppressed because it is too large Load Diff

35150
web-app/dist/data/H06.csv vendored Normal file

File diff suppressed because it is too large Load Diff

35150
web-app/dist/data/H07.csv vendored Normal file

File diff suppressed because it is too large Load Diff

35150
web-app/dist/data/H08.csv vendored Normal file

File diff suppressed because it is too large Load Diff

35150
web-app/dist/data/H09.csv vendored Normal file

File diff suppressed because it is too large Load Diff

35150
web-app/dist/data/H10.csv vendored Normal file

File diff suppressed because it is too large Load Diff

35150
web-app/dist/data/H11.csv vendored Normal file

File diff suppressed because it is too large Load Diff

35150
web-app/dist/data/H12.csv vendored Normal file

File diff suppressed because it is too large Load Diff

35150
web-app/dist/data/H13.csv vendored Normal file

File diff suppressed because it is too large Load Diff

35150
web-app/dist/data/H14.csv vendored Normal file

File diff suppressed because it is too large Load Diff

14
web-app/dist/index.html vendored Normal file
View File

@@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Community Digital Twin</title>
<script type="module" crossorigin src="/assets/index-BDdF_E2G.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CSR7bLu2.css">
</head>
<body>
<div id="app"></div>
</body>
</html>

13
web-app/index.html Normal file
View File

@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Community Digital Twin</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

1
web-app/node_modules/.bin/esbuild generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../esbuild/bin/esbuild

1
web-app/node_modules/.bin/he generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../he/bin/he

1
web-app/node_modules/.bin/nanoid generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../nanoid/bin/nanoid.cjs

1
web-app/node_modules/.bin/parser generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../@babel/parser/bin/babel-parser.js

1
web-app/node_modules/.bin/rollup generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../rollup/dist/bin/rollup

1
web-app/node_modules/.bin/tsc generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../typescript/bin/tsc

1
web-app/node_modules/.bin/tsserver generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../typescript/bin/tsserver

1
web-app/node_modules/.bin/vite generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../vite/bin/vite.js

1
web-app/node_modules/.bin/vue-tsc generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../vue-tsc/bin/vue-tsc.js

1596
web-app/node_modules/.package-lock.json generated vendored Normal file

File diff suppressed because it is too large Load Diff

58
web-app/node_modules/.vite/deps/_metadata.json generated vendored Normal file
View File

@@ -0,0 +1,58 @@
{
"hash": "21356d71",
"configHash": "e8ce1a0a",
"lockfileHash": "99cc31ad",
"browserHash": "22139d26",
"optimized": {
"vue": {
"src": "../../vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "0d94b1c2",
"needsInterop": false
},
"three": {
"src": "../../three/build/three.module.js",
"file": "three.js",
"fileHash": "62ac119f",
"needsInterop": false
},
"three/examples/jsm/controls/OrbitControls.js": {
"src": "../../three/examples/jsm/controls/OrbitControls.js",
"file": "three_examples_jsm_controls_OrbitControls__js.js",
"fileHash": "3477ecfc",
"needsInterop": false
},
"three/examples/jsm/loaders/GLTFLoader.js": {
"src": "../../three/examples/jsm/loaders/GLTFLoader.js",
"file": "three_examples_jsm_loaders_GLTFLoader__js.js",
"fileHash": "bbcf1a24",
"needsInterop": false
},
"papaparse": {
"src": "../../papaparse/papaparse.min.js",
"file": "papaparse.js",
"fileHash": "d6382eb5",
"needsInterop": true
},
"suncalc": {
"src": "../../suncalc/suncalc.js",
"file": "suncalc.js",
"fileHash": "07e425ee",
"needsInterop": true
},
"three/examples/jsm/controls/TransformControls.js": {
"src": "../../three/examples/jsm/controls/TransformControls.js",
"file": "three_examples_jsm_controls_TransformControls__js.js",
"fileHash": "2bbc7916",
"needsInterop": false
}
},
"chunks": {
"chunk-BQJMB3HC": {
"file": "chunk-BQJMB3HC.js"
},
"chunk-BUSYA2B4": {
"file": "chunk-BUSYA2B4.js"
}
}
}

31599
web-app/node_modules/.vite/deps/chunk-BQJMB3HC.js generated vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

8
web-app/node_modules/.vite/deps/chunk-BUSYA2B4.js generated vendored Normal file
View File

@@ -0,0 +1,8 @@
var __getOwnPropNames = Object.getOwnPropertyNames;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
export {
__commonJS
};

View File

@@ -0,0 +1,7 @@
{
"version": 3,
"sources": [],
"sourcesContent": [],
"mappings": "",
"names": []
}

3
web-app/node_modules/.vite/deps/package.json generated vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"type": "module"
}

431
web-app/node_modules/.vite/deps/papaparse.js generated vendored Normal file
View File

@@ -0,0 +1,431 @@
import {
__commonJS
} from "./chunk-BUSYA2B4.js";
// node_modules/papaparse/papaparse.min.js
var require_papaparse_min = __commonJS({
"node_modules/papaparse/papaparse.min.js"(exports, module) {
((e, t) => {
"function" == typeof define && define.amd ? define([], t) : "object" == typeof module && "undefined" != typeof exports ? module.exports = t() : e.Papa = t();
})(exports, function r() {
var n = "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== n ? n : {};
var d, s = !n.document && !!n.postMessage, a = n.IS_PAPA_WORKER || false, o = {}, h = 0, v = {};
function u(e) {
this._handle = null, this._finished = false, this._completed = false, this._halted = false, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = true, this._completeResults = { data: [], errors: [], meta: {} }, (function(e2) {
var t = b(e2);
t.chunkSize = parseInt(t.chunkSize), e2.step || e2.chunk || (t.chunkSize = null);
this._handle = new i(t), (this._handle.streamer = this)._config = t;
}).call(this, e), this.parseChunk = function(t, e2) {
var i2 = parseInt(this._config.skipFirstNLines) || 0;
if (this.isFirstChunk && 0 < i2) {
let e3 = this._config.newline;
e3 || (r2 = this._config.quoteChar || '"', e3 = this._handle.guessLineEndings(t, r2)), t = [...t.split(e3).slice(i2)].join(e3);
}
this.isFirstChunk && U(this._config.beforeFirstChunk) && void 0 !== (r2 = this._config.beforeFirstChunk(t)) && (t = r2), this.isFirstChunk = false, this._halted = false;
var i2 = this._partialLine + t, r2 = (this._partialLine = "", this._handle.parse(i2, this._baseIndex, !this._finished));
if (!this._handle.paused() && !this._handle.aborted()) {
t = r2.meta.cursor, i2 = (this._finished || (this._partialLine = i2.substring(t - this._baseIndex), this._baseIndex = t), r2 && r2.data && (this._rowCount += r2.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview);
if (a) n.postMessage({ results: r2, workerId: v.WORKER_ID, finished: i2 });
else if (U(this._config.chunk) && !e2) {
if (this._config.chunk(r2, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = true);
this._completeResults = r2 = void 0;
}
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(r2.data), this._completeResults.errors = this._completeResults.errors.concat(r2.errors), this._completeResults.meta = r2.meta), this._completed || !i2 || !U(this._config.complete) || r2 && r2.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = true), i2 || r2 && r2.meta.paused || this._nextChunk(), r2;
}
this._halted = true;
}, this._sendError = function(e2) {
U(this._config.error) ? this._config.error(e2) : a && this._config.error && n.postMessage({ workerId: v.WORKER_ID, error: e2, finished: false });
};
}
function f(e) {
var r2;
(e = e || {}).chunkSize || (e.chunkSize = v.RemoteChunkSize), u.call(this, e), this._nextChunk = s ? function() {
this._readChunk(), this._chunkLoaded();
} : function() {
this._readChunk();
}, this.stream = function(e2) {
this._input = e2, this._nextChunk();
}, this._readChunk = function() {
if (this._finished) this._chunkLoaded();
else {
if (r2 = new XMLHttpRequest(), this._config.withCredentials && (r2.withCredentials = this._config.withCredentials), s || (r2.onload = y(this._chunkLoaded, this), r2.onerror = y(this._chunkError, this)), r2.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !s), this._config.downloadRequestHeaders) {
var e2, t = this._config.downloadRequestHeaders;
for (e2 in t) r2.setRequestHeader(e2, t[e2]);
}
var i2;
this._config.chunkSize && (i2 = this._start + this._config.chunkSize - 1, r2.setRequestHeader("Range", "bytes=" + this._start + "-" + i2));
try {
r2.send(this._config.downloadRequestBody);
} catch (e3) {
this._chunkError(e3.message);
}
s && 0 === r2.status && this._chunkError();
}
}, this._chunkLoaded = function() {
4 === r2.readyState && (r2.status < 200 || 400 <= r2.status ? this._chunkError() : (this._start += this._config.chunkSize || r2.responseText.length, this._finished = !this._config.chunkSize || this._start >= ((e2) => null !== (e2 = e2.getResponseHeader("Content-Range")) ? parseInt(e2.substring(e2.lastIndexOf("/") + 1)) : -1)(r2), this.parseChunk(r2.responseText)));
}, this._chunkError = function(e2) {
e2 = r2.statusText || e2;
this._sendError(new Error(e2));
};
}
function l(e) {
(e = e || {}).chunkSize || (e.chunkSize = v.LocalChunkSize), u.call(this, e);
var i2, r2, n2 = "undefined" != typeof FileReader;
this.stream = function(e2) {
this._input = e2, r2 = e2.slice || e2.webkitSlice || e2.mozSlice, n2 ? ((i2 = new FileReader()).onload = y(this._chunkLoaded, this), i2.onerror = y(this._chunkError, this)) : i2 = new FileReaderSync(), this._nextChunk();
}, this._nextChunk = function() {
this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
}, this._readChunk = function() {
var e2 = this._input, t = (this._config.chunkSize && (t = Math.min(this._start + this._config.chunkSize, this._input.size), e2 = r2.call(e2, this._start, t)), i2.readAsText(e2, this._config.encoding));
n2 || this._chunkLoaded({ target: { result: t } });
}, this._chunkLoaded = function(e2) {
this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(e2.target.result);
}, this._chunkError = function() {
this._sendError(i2.error);
};
}
function c(e) {
var i2;
u.call(this, e = e || {}), this.stream = function(e2) {
return i2 = e2, this._nextChunk();
}, this._nextChunk = function() {
var e2, t;
if (!this._finished) return e2 = this._config.chunkSize, i2 = e2 ? (t = i2.substring(0, e2), i2.substring(e2)) : (t = i2, ""), this._finished = !i2, this.parseChunk(t);
};
}
function p(e) {
u.call(this, e = e || {});
var t = [], i2 = true, r2 = false;
this.pause = function() {
u.prototype.pause.apply(this, arguments), this._input.pause();
}, this.resume = function() {
u.prototype.resume.apply(this, arguments), this._input.resume();
}, this.stream = function(e2) {
this._input = e2, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
}, this._checkIsFinished = function() {
r2 && 1 === t.length && (this._finished = true);
}, this._nextChunk = function() {
this._checkIsFinished(), t.length ? this.parseChunk(t.shift()) : i2 = true;
}, this._streamData = y(function(e2) {
try {
t.push("string" == typeof e2 ? e2 : e2.toString(this._config.encoding)), i2 && (i2 = false, this._checkIsFinished(), this.parseChunk(t.shift()));
} catch (e3) {
this._streamError(e3);
}
}, this), this._streamError = y(function(e2) {
this._streamCleanUp(), this._sendError(e2);
}, this), this._streamEnd = y(function() {
this._streamCleanUp(), r2 = true, this._streamData("");
}, this), this._streamCleanUp = y(function() {
this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
}, this);
}
function i(m2) {
var n2, s2, a2, t, o2 = Math.pow(2, 53), h2 = -o2, u2 = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, d2 = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, i2 = this, r2 = 0, f2 = 0, l2 = false, e = false, c2 = [], p2 = { data: [], errors: [], meta: {} };
function y2(e2) {
return "greedy" === m2.skipEmptyLines ? "" === e2.join("").trim() : 1 === e2.length && 0 === e2[0].length;
}
function g2() {
if (p2 && a2 && (k("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + v.DefaultDelimiter + "'"), a2 = false), m2.skipEmptyLines && (p2.data = p2.data.filter(function(e3) {
return !y2(e3);
})), _2()) {
let t3 = function(e3, t4) {
U(m2.transformHeader) && (e3 = m2.transformHeader(e3, t4)), c2.push(e3);
};
var t2 = t3;
if (p2) if (Array.isArray(p2.data[0])) {
for (var e2 = 0; _2() && e2 < p2.data.length; e2++) p2.data[e2].forEach(t3);
p2.data.splice(0, 1);
} else p2.data.forEach(t3);
}
function i3(e3, t3) {
for (var i4 = m2.header ? {} : [], r4 = 0; r4 < e3.length; r4++) {
var n3 = r4, s3 = e3[r4], s3 = ((e4, t4) => ((e5) => (m2.dynamicTypingFunction && void 0 === m2.dynamicTyping[e5] && (m2.dynamicTyping[e5] = m2.dynamicTypingFunction(e5)), true === (m2.dynamicTyping[e5] || m2.dynamicTyping)))(e4) ? "true" === t4 || "TRUE" === t4 || "false" !== t4 && "FALSE" !== t4 && (((e5) => {
if (u2.test(e5)) {
e5 = parseFloat(e5);
if (h2 < e5 && e5 < o2) return 1;
}
})(t4) ? parseFloat(t4) : d2.test(t4) ? new Date(t4) : "" === t4 ? null : t4) : t4)(n3 = m2.header ? r4 >= c2.length ? "__parsed_extra" : c2[r4] : n3, s3 = m2.transform ? m2.transform(s3, n3) : s3);
"__parsed_extra" === n3 ? (i4[n3] = i4[n3] || [], i4[n3].push(s3)) : i4[n3] = s3;
}
return m2.header && (r4 > c2.length ? k("FieldMismatch", "TooManyFields", "Too many fields: expected " + c2.length + " fields but parsed " + r4, f2 + t3) : r4 < c2.length && k("FieldMismatch", "TooFewFields", "Too few fields: expected " + c2.length + " fields but parsed " + r4, f2 + t3)), i4;
}
var r3;
p2 && (m2.header || m2.dynamicTyping || m2.transform) && (r3 = 1, !p2.data.length || Array.isArray(p2.data[0]) ? (p2.data = p2.data.map(i3), r3 = p2.data.length) : p2.data = i3(p2.data, 0), m2.header && p2.meta && (p2.meta.fields = c2), f2 += r3);
}
function _2() {
return m2.header && 0 === c2.length;
}
function k(e2, t2, i3, r3) {
e2 = { type: e2, code: t2, message: i3 };
void 0 !== r3 && (e2.row = r3), p2.errors.push(e2);
}
U(m2.step) && (t = m2.step, m2.step = function(e2) {
p2 = e2, _2() ? g2() : (g2(), 0 !== p2.data.length && (r2 += e2.data.length, m2.preview && r2 > m2.preview ? s2.abort() : (p2.data = p2.data[0], t(p2, i2))));
}), this.parse = function(e2, t2, i3) {
var r3 = m2.quoteChar || '"', r3 = (m2.newline || (m2.newline = this.guessLineEndings(e2, r3)), a2 = false, m2.delimiter ? U(m2.delimiter) && (m2.delimiter = m2.delimiter(e2), p2.meta.delimiter = m2.delimiter) : ((r3 = ((e3, t3, i4, r4, n3) => {
var s3, a3, o3, h3;
n3 = n3 || [",", " ", "|", ";", v.RECORD_SEP, v.UNIT_SEP];
for (var u3 = 0; u3 < n3.length; u3++) {
for (var d3, f3 = n3[u3], l3 = 0, c3 = 0, p3 = 0, g3 = (o3 = void 0, new E({ comments: r4, delimiter: f3, newline: t3, preview: 10 }).parse(e3)), _3 = 0; _3 < g3.data.length; _3++) i4 && y2(g3.data[_3]) ? p3++ : (d3 = g3.data[_3].length, c3 += d3, void 0 === o3 ? o3 = d3 : 0 < d3 && (l3 += Math.abs(d3 - o3), o3 = d3));
0 < g3.data.length && (c3 /= g3.data.length - p3), (void 0 === a3 || l3 <= a3) && (void 0 === h3 || h3 < c3) && 1.99 < c3 && (a3 = l3, s3 = f3, h3 = c3);
}
return { successful: !!(m2.delimiter = s3), bestDelimiter: s3 };
})(e2, m2.newline, m2.skipEmptyLines, m2.comments, m2.delimitersToGuess)).successful ? m2.delimiter = r3.bestDelimiter : (a2 = true, m2.delimiter = v.DefaultDelimiter), p2.meta.delimiter = m2.delimiter), b(m2));
return m2.preview && m2.header && r3.preview++, n2 = e2, s2 = new E(r3), p2 = s2.parse(n2, t2, i3), g2(), l2 ? { meta: { paused: true } } : p2 || { meta: { paused: false } };
}, this.paused = function() {
return l2;
}, this.pause = function() {
l2 = true, s2.abort(), n2 = U(m2.chunk) ? "" : n2.substring(s2.getCharIndex());
}, this.resume = function() {
i2.streamer._halted ? (l2 = false, i2.streamer.parseChunk(n2, true)) : setTimeout(i2.resume, 3);
}, this.aborted = function() {
return e;
}, this.abort = function() {
e = true, s2.abort(), p2.meta.aborted = true, U(m2.complete) && m2.complete(p2), n2 = "";
}, this.guessLineEndings = function(e2, t2) {
e2 = e2.substring(0, 1048576);
var t2 = new RegExp(P(t2) + "([^]*?)" + P(t2), "gm"), i3 = (e2 = e2.replace(t2, "")).split("\r"), t2 = e2.split("\n"), e2 = 1 < t2.length && t2[0].length < i3[0].length;
if (1 === i3.length || e2) return "\n";
for (var r3 = 0, n3 = 0; n3 < i3.length; n3++) "\n" === i3[n3][0] && r3++;
return r3 >= i3.length / 2 ? "\r\n" : "\r";
};
}
function P(e) {
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
function E(C) {
var S = (C = C || {}).delimiter, O = C.newline, x = C.comments, I = C.step, A = C.preview, T = C.fastMode, D = null, L = false, F = null == C.quoteChar ? '"' : C.quoteChar, j = F;
if (void 0 !== C.escapeChar && (j = C.escapeChar), ("string" != typeof S || -1 < v.BAD_DELIMITERS.indexOf(S)) && (S = ","), x === S) throw new Error("Comment character same as delimiter");
true === x ? x = "#" : ("string" != typeof x || -1 < v.BAD_DELIMITERS.indexOf(x)) && (x = false), "\n" !== O && "\r" !== O && "\r\n" !== O && (O = "\n");
var z = 0, M = false;
this.parse = function(i2, t, r2) {
if ("string" != typeof i2) throw new Error("Input must be a string");
var n2 = i2.length, e = S.length, s2 = O.length, a2 = x.length, o2 = U(I), h2 = [], u2 = [], d2 = [], f2 = z = 0;
if (!i2) return w();
if (T || false !== T && -1 === i2.indexOf(F)) {
for (var l2 = i2.split(O), c2 = 0; c2 < l2.length; c2++) {
if (d2 = l2[c2], z += d2.length, c2 !== l2.length - 1) z += O.length;
else if (r2) return w();
if (!x || d2.substring(0, a2) !== x) {
if (o2) {
if (h2 = [], k(d2.split(S)), R(), M) return w();
} else k(d2.split(S));
if (A && A <= c2) return h2 = h2.slice(0, A), w(true);
}
}
return w();
}
for (var p2 = i2.indexOf(S, z), g2 = i2.indexOf(O, z), _2 = new RegExp(P(j) + P(F), "g"), m2 = i2.indexOf(F, z); ; ) if (i2[z] === F) for (m2 = z, z++; ; ) {
if (-1 === (m2 = i2.indexOf(F, m2 + 1))) return r2 || u2.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: h2.length, index: z }), E2();
if (m2 === n2 - 1) return E2(i2.substring(z, m2).replace(_2, F));
if (F === j && i2[m2 + 1] === j) m2++;
else if (F === j || 0 === m2 || i2[m2 - 1] !== j) {
-1 !== p2 && p2 < m2 + 1 && (p2 = i2.indexOf(S, m2 + 1));
var y2 = v2(-1 === (g2 = -1 !== g2 && g2 < m2 + 1 ? i2.indexOf(O, m2 + 1) : g2) ? p2 : Math.min(p2, g2));
if (i2.substr(m2 + 1 + y2, e) === S) {
d2.push(i2.substring(z, m2).replace(_2, F)), i2[z = m2 + 1 + y2 + e] !== F && (m2 = i2.indexOf(F, z)), p2 = i2.indexOf(S, z), g2 = i2.indexOf(O, z);
break;
}
y2 = v2(g2);
if (i2.substring(m2 + 1 + y2, m2 + 1 + y2 + s2) === O) {
if (d2.push(i2.substring(z, m2).replace(_2, F)), b2(m2 + 1 + y2 + s2), p2 = i2.indexOf(S, z), m2 = i2.indexOf(F, z), o2 && (R(), M)) return w();
if (A && h2.length >= A) return w(true);
break;
}
u2.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: h2.length, index: z }), m2++;
}
}
else if (x && 0 === d2.length && i2.substring(z, z + a2) === x) {
if (-1 === g2) return w();
z = g2 + s2, g2 = i2.indexOf(O, z), p2 = i2.indexOf(S, z);
} else if (-1 !== p2 && (p2 < g2 || -1 === g2)) d2.push(i2.substring(z, p2)), z = p2 + e, p2 = i2.indexOf(S, z);
else {
if (-1 === g2) break;
if (d2.push(i2.substring(z, g2)), b2(g2 + s2), o2 && (R(), M)) return w();
if (A && h2.length >= A) return w(true);
}
return E2();
function k(e2) {
h2.push(e2), f2 = z;
}
function v2(e2) {
var t2 = 0;
return t2 = -1 !== e2 && (e2 = i2.substring(m2 + 1, e2)) && "" === e2.trim() ? e2.length : t2;
}
function E2(e2) {
return r2 || (void 0 === e2 && (e2 = i2.substring(z)), d2.push(e2), z = n2, k(d2), o2 && R()), w();
}
function b2(e2) {
z = e2, k(d2), d2 = [], g2 = i2.indexOf(O, z);
}
function w(e2) {
if (C.header && !t && h2.length && !L) {
var s3 = h2[0], a3 = /* @__PURE__ */ Object.create(null), o3 = new Set(s3);
let n3 = false;
for (let r3 = 0; r3 < s3.length; r3++) {
let i3 = s3[r3];
if (a3[i3 = U(C.transformHeader) ? C.transformHeader(i3, r3) : i3]) {
let e3, t2 = a3[i3];
for (; e3 = i3 + "_" + t2, t2++, o3.has(e3); ) ;
o3.add(e3), s3[r3] = e3, a3[i3]++, n3 = true, (D = null === D ? {} : D)[e3] = i3;
} else a3[i3] = 1, s3[r3] = i3;
o3.add(i3);
}
n3 && console.warn("Duplicate headers found and renamed."), L = true;
}
return { data: h2, errors: u2, meta: { delimiter: S, linebreak: O, aborted: M, truncated: !!e2, cursor: f2 + (t || 0), renamedHeaders: D } };
}
function R() {
I(w()), h2 = [], u2 = [];
}
}, this.abort = function() {
M = true;
}, this.getCharIndex = function() {
return z;
};
}
function g(e) {
var t = e.data, i2 = o[t.workerId], r2 = false;
if (t.error) i2.userError(t.error, t.file);
else if (t.results && t.results.data) {
var n2 = { abort: function() {
r2 = true, _(t.workerId, { data: [], errors: [], meta: { aborted: true } });
}, pause: m, resume: m };
if (U(i2.userStep)) {
for (var s2 = 0; s2 < t.results.data.length && (i2.userStep({ data: t.results.data[s2], errors: t.results.errors, meta: t.results.meta }, n2), !r2); s2++) ;
delete t.results;
} else U(i2.userChunk) && (i2.userChunk(t.results, n2, t.file), delete t.results);
}
t.finished && !r2 && _(t.workerId, t.results);
}
function _(e, t) {
var i2 = o[e];
U(i2.userComplete) && i2.userComplete(t), i2.terminate(), delete o[e];
}
function m() {
throw new Error("Not implemented.");
}
function b(e) {
if ("object" != typeof e || null === e) return e;
var t, i2 = Array.isArray(e) ? [] : {};
for (t in e) i2[t] = b(e[t]);
return i2;
}
function y(e, t) {
return function() {
e.apply(t, arguments);
};
}
function U(e) {
return "function" == typeof e;
}
return v.parse = function(e, t) {
var i2 = (t = t || {}).dynamicTyping || false;
U(i2) && (t.dynamicTypingFunction = i2, i2 = {});
if (t.dynamicTyping = i2, t.transform = !!U(t.transform) && t.transform, !t.worker || !v.WORKERS_SUPPORTED) return i2 = null, v.NODE_STREAM_INPUT, "string" == typeof e ? (e = ((e2) => 65279 !== e2.charCodeAt(0) ? e2 : e2.slice(1))(e), i2 = new (t.download ? f : c)(t)) : true === e.readable && U(e.read) && U(e.on) ? i2 = new p(t) : (n.File && e instanceof File || e instanceof Object) && (i2 = new l(t)), i2.stream(e);
(i2 = (() => {
var e2;
return !!v.WORKERS_SUPPORTED && (e2 = (() => {
var e3 = n.URL || n.webkitURL || null, t2 = r.toString();
return v.BLOB_URL || (v.BLOB_URL = e3.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", t2, ")();"], { type: "text/javascript" })));
})(), (e2 = new n.Worker(e2)).onmessage = g, e2.id = h++, o[e2.id] = e2);
})()).userStep = t.step, i2.userChunk = t.chunk, i2.userComplete = t.complete, i2.userError = t.error, t.step = U(t.step), t.chunk = U(t.chunk), t.complete = U(t.complete), t.error = U(t.error), delete t.worker, i2.postMessage({ input: e, config: t, workerId: i2.id });
}, v.unparse = function(e, t) {
var n2 = false, _2 = true, m2 = ",", y2 = "\r\n", s2 = '"', a2 = s2 + s2, i2 = false, r2 = null, o2 = false, h2 = ((() => {
if ("object" == typeof t) {
if ("string" != typeof t.delimiter || v.BAD_DELIMITERS.filter(function(e2) {
return -1 !== t.delimiter.indexOf(e2);
}).length || (m2 = t.delimiter), "boolean" != typeof t.quotes && "function" != typeof t.quotes && !Array.isArray(t.quotes) || (n2 = t.quotes), "boolean" != typeof t.skipEmptyLines && "string" != typeof t.skipEmptyLines || (i2 = t.skipEmptyLines), "string" == typeof t.newline && (y2 = t.newline), "string" == typeof t.quoteChar && (s2 = t.quoteChar), "boolean" == typeof t.header && (_2 = t.header), Array.isArray(t.columns)) {
if (0 === t.columns.length) throw new Error("Option columns is empty");
r2 = t.columns;
}
void 0 !== t.escapeChar && (a2 = t.escapeChar + s2), t.escapeFormulae instanceof RegExp ? o2 = t.escapeFormulae : "boolean" == typeof t.escapeFormulae && t.escapeFormulae && (o2 = /^[=+\-@\t\r].*$/);
}
})(), new RegExp(P(s2), "g"));
"string" == typeof e && (e = JSON.parse(e));
if (Array.isArray(e)) {
if (!e.length || Array.isArray(e[0])) return u2(null, e, i2);
if ("object" == typeof e[0]) return u2(r2 || Object.keys(e[0]), e, i2);
} else if ("object" == typeof e) return "string" == typeof e.data && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields || (e.fields = e.meta && e.meta.fields || r2), e.fields || (e.fields = Array.isArray(e.data[0]) ? e.fields : "object" == typeof e.data[0] ? Object.keys(e.data[0]) : []), Array.isArray(e.data[0]) || "object" == typeof e.data[0] || (e.data = [e.data])), u2(e.fields || [], e.data || [], i2);
throw new Error("Unable to serialize unrecognized input");
function u2(e2, t2, i3) {
var r3 = "", n3 = ("string" == typeof e2 && (e2 = JSON.parse(e2)), "string" == typeof t2 && (t2 = JSON.parse(t2)), Array.isArray(e2) && 0 < e2.length), s3 = !Array.isArray(t2[0]);
if (n3 && _2) {
for (var a3 = 0; a3 < e2.length; a3++) 0 < a3 && (r3 += m2), r3 += k(e2[a3], a3);
0 < t2.length && (r3 += y2);
}
for (var o3 = 0; o3 < t2.length; o3++) {
var h3 = (n3 ? e2 : t2[o3]).length, u3 = false, d2 = n3 ? 0 === Object.keys(t2[o3]).length : 0 === t2[o3].length;
if (i3 && !n3 && (u3 = "greedy" === i3 ? "" === t2[o3].join("").trim() : 1 === t2[o3].length && 0 === t2[o3][0].length), "greedy" === i3 && n3) {
for (var f2 = [], l2 = 0; l2 < h3; l2++) {
var c2 = s3 ? e2[l2] : l2;
f2.push(t2[o3][c2]);
}
u3 = "" === f2.join("").trim();
}
if (!u3) {
for (var p2 = 0; p2 < h3; p2++) {
0 < p2 && !d2 && (r3 += m2);
var g2 = n3 && s3 ? e2[p2] : p2;
r3 += k(t2[o3][g2], p2);
}
o3 < t2.length - 1 && (!i3 || 0 < h3 && !d2) && (r3 += y2);
}
}
return r3;
}
function k(e2, t2) {
var i3, r3;
return null == e2 ? "" : e2.constructor === Date ? JSON.stringify(e2).slice(1, 25) : (r3 = false, o2 && "string" == typeof e2 && o2.test(e2) && (e2 = "'" + e2, r3 = true), i3 = e2.toString().replace(h2, a2), (r3 = r3 || true === n2 || "function" == typeof n2 && n2(e2, t2) || Array.isArray(n2) && n2[t2] || ((e3, t3) => {
for (var i4 = 0; i4 < t3.length; i4++) if (-1 < e3.indexOf(t3[i4])) return true;
return false;
})(i3, v.BAD_DELIMITERS) || -1 < i3.indexOf(m2) || " " === i3.charAt(0) || " " === i3.charAt(i3.length - 1)) ? s2 + i3 + s2 : i3);
}
}, v.RECORD_SEP = String.fromCharCode(30), v.UNIT_SEP = String.fromCharCode(31), v.BYTE_ORDER_MARK = "\uFEFF", v.BAD_DELIMITERS = ["\r", "\n", '"', v.BYTE_ORDER_MARK], v.WORKERS_SUPPORTED = !s && !!n.Worker, v.NODE_STREAM_INPUT = 1, v.LocalChunkSize = 10485760, v.RemoteChunkSize = 5242880, v.DefaultDelimiter = ",", v.Parser = E, v.ParserHandle = i, v.NetworkStreamer = f, v.FileStreamer = l, v.StringStreamer = c, v.ReadableStreamStreamer = p, n.jQuery && ((d = n.jQuery).fn.parse = function(o2) {
var i2 = o2.config || {}, h2 = [];
return this.each(function(e2) {
if (!("INPUT" === d(this).prop("tagName").toUpperCase() && "file" === d(this).attr("type").toLowerCase() && n.FileReader) || !this.files || 0 === this.files.length) return true;
for (var t = 0; t < this.files.length; t++) h2.push({ file: this.files[t], inputElem: this, instanceConfig: d.extend({}, i2) });
}), e(), this;
function e() {
if (0 === h2.length) U(o2.complete) && o2.complete();
else {
var e2, t, i3, r2, n2 = h2[0];
if (U(o2.before)) {
var s2 = o2.before(n2.file, n2.inputElem);
if ("object" == typeof s2) {
if ("abort" === s2.action) return e2 = "AbortError", t = n2.file, i3 = n2.inputElem, r2 = s2.reason, void (U(o2.error) && o2.error({ name: e2 }, t, i3, r2));
if ("skip" === s2.action) return void u2();
"object" == typeof s2.config && (n2.instanceConfig = d.extend(n2.instanceConfig, s2.config));
} else if ("skip" === s2) return void u2();
}
var a2 = n2.instanceConfig.complete;
n2.instanceConfig.complete = function(e3) {
U(a2) && a2(e3, n2.file, n2.inputElem), u2();
}, v.parse(n2.file, n2.instanceConfig);
}
}
function u2() {
h2.splice(0, 1), e();
}
}), a && (n.onmessage = function(e) {
e = e.data;
void 0 === v.WORKER_ID && e && (v.WORKER_ID = e.workerId);
"string" == typeof e.input ? n.postMessage({ workerId: v.WORKER_ID, results: v.parse(e.input, e.config), finished: true }) : (n.File && e.input instanceof File || e.input instanceof Object) && (e = v.parse(e.input, e.config)) && n.postMessage({ workerId: v.WORKER_ID, results: e, finished: true });
}), (f.prototype = Object.create(u.prototype)).constructor = f, (l.prototype = Object.create(u.prototype)).constructor = l, (c.prototype = Object.create(c.prototype)).constructor = c, (p.prototype = Object.create(u.prototype)).constructor = p, v;
});
}
});
export default require_papaparse_min();
/*! Bundled license information:
papaparse/papaparse.min.js:
(* @license
Papa Parse
v5.5.3
https://github.com/mholt/PapaParse
License: MIT
*)
*/
//# sourceMappingURL=papaparse.js.map

7
web-app/node_modules/.vite/deps/papaparse.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

186
web-app/node_modules/.vite/deps/suncalc.js generated vendored Normal file
View File

@@ -0,0 +1,186 @@
import {
__commonJS
} from "./chunk-BUSYA2B4.js";
// node_modules/suncalc/suncalc.js
var require_suncalc = __commonJS({
"node_modules/suncalc/suncalc.js"(exports, module) {
(function() {
"use strict";
var PI = Math.PI, sin = Math.sin, cos = Math.cos, tan = Math.tan, asin = Math.asin, atan = Math.atan2, acos = Math.acos, rad = PI / 180;
var dayMs = 1e3 * 60 * 60 * 24, J1970 = 2440588, J2000 = 2451545;
function toJulian(date) {
return date.valueOf() / dayMs - 0.5 + J1970;
}
function fromJulian(j) {
return new Date((j + 0.5 - J1970) * dayMs);
}
function toDays(date) {
return toJulian(date) - J2000;
}
var e = rad * 23.4397;
function rightAscension(l, b) {
return atan(sin(l) * cos(e) - tan(b) * sin(e), cos(l));
}
function declination(l, b) {
return asin(sin(b) * cos(e) + cos(b) * sin(e) * sin(l));
}
function azimuth(H, phi, dec) {
return atan(sin(H), cos(H) * sin(phi) - tan(dec) * cos(phi));
}
function altitude(H, phi, dec) {
return asin(sin(phi) * sin(dec) + cos(phi) * cos(dec) * cos(H));
}
function siderealTime(d, lw) {
return rad * (280.16 + 360.9856235 * d) - lw;
}
function astroRefraction(h) {
if (h < 0)
h = 0;
return 2967e-7 / Math.tan(h + 312536e-8 / (h + 0.08901179));
}
function solarMeanAnomaly(d) {
return rad * (357.5291 + 0.98560028 * d);
}
function eclipticLongitude(M) {
var C = rad * (1.9148 * sin(M) + 0.02 * sin(2 * M) + 3e-4 * sin(3 * M)), P = rad * 102.9372;
return M + C + P + PI;
}
function sunCoords(d) {
var M = solarMeanAnomaly(d), L = eclipticLongitude(M);
return {
dec: declination(L, 0),
ra: rightAscension(L, 0)
};
}
var SunCalc = {};
SunCalc.getPosition = function(date, lat, lng) {
var lw = rad * -lng, phi = rad * lat, d = toDays(date), c = sunCoords(d), H = siderealTime(d, lw) - c.ra;
return {
azimuth: azimuth(H, phi, c.dec),
altitude: altitude(H, phi, c.dec)
};
};
var times = SunCalc.times = [
[-0.833, "sunrise", "sunset"],
[-0.3, "sunriseEnd", "sunsetStart"],
[-6, "dawn", "dusk"],
[-12, "nauticalDawn", "nauticalDusk"],
[-18, "nightEnd", "night"],
[6, "goldenHourEnd", "goldenHour"]
];
SunCalc.addTime = function(angle, riseName, setName) {
times.push([angle, riseName, setName]);
};
var J0 = 9e-4;
function julianCycle(d, lw) {
return Math.round(d - J0 - lw / (2 * PI));
}
function approxTransit(Ht, lw, n) {
return J0 + (Ht + lw) / (2 * PI) + n;
}
function solarTransitJ(ds, M, L) {
return J2000 + ds + 53e-4 * sin(M) - 69e-4 * sin(2 * L);
}
function hourAngle(h, phi, d) {
return acos((sin(h) - sin(phi) * sin(d)) / (cos(phi) * cos(d)));
}
function observerAngle(height) {
return -2.076 * Math.sqrt(height) / 60;
}
function getSetJ(h, lw, phi, dec, n, M, L) {
var w = hourAngle(h, phi, dec), a = approxTransit(w, lw, n);
return solarTransitJ(a, M, L);
}
SunCalc.getTimes = function(date, lat, lng, height) {
height = height || 0;
var lw = rad * -lng, phi = rad * lat, dh = observerAngle(height), d = toDays(date), n = julianCycle(d, lw), ds = approxTransit(0, lw, n), M = solarMeanAnomaly(ds), L = eclipticLongitude(M), dec = declination(L, 0), Jnoon = solarTransitJ(ds, M, L), i, len, time, h0, Jset, Jrise;
var result = {
solarNoon: fromJulian(Jnoon),
nadir: fromJulian(Jnoon - 0.5)
};
for (i = 0, len = times.length; i < len; i += 1) {
time = times[i];
h0 = (time[0] + dh) * rad;
Jset = getSetJ(h0, lw, phi, dec, n, M, L);
Jrise = Jnoon - (Jset - Jnoon);
result[time[1]] = fromJulian(Jrise);
result[time[2]] = fromJulian(Jset);
}
return result;
};
function moonCoords(d) {
var L = rad * (218.316 + 13.176396 * d), M = rad * (134.963 + 13.064993 * d), F = rad * (93.272 + 13.22935 * d), l = L + rad * 6.289 * sin(M), b = rad * 5.128 * sin(F), dt = 385001 - 20905 * cos(M);
return {
ra: rightAscension(l, b),
dec: declination(l, b),
dist: dt
};
}
SunCalc.getMoonPosition = function(date, lat, lng) {
var lw = rad * -lng, phi = rad * lat, d = toDays(date), c = moonCoords(d), H = siderealTime(d, lw) - c.ra, h = altitude(H, phi, c.dec), pa = atan(sin(H), tan(phi) * cos(c.dec) - sin(c.dec) * cos(H));
h = h + astroRefraction(h);
return {
azimuth: azimuth(H, phi, c.dec),
altitude: h,
distance: c.dist,
parallacticAngle: pa
};
};
SunCalc.getMoonIllumination = function(date) {
var d = toDays(date || /* @__PURE__ */ new Date()), s = sunCoords(d), m = moonCoords(d), sdist = 149598e3, phi = acos(sin(s.dec) * sin(m.dec) + cos(s.dec) * cos(m.dec) * cos(s.ra - m.ra)), inc = atan(sdist * sin(phi), m.dist - sdist * cos(phi)), angle = atan(cos(s.dec) * sin(s.ra - m.ra), sin(s.dec) * cos(m.dec) - cos(s.dec) * sin(m.dec) * cos(s.ra - m.ra));
return {
fraction: (1 + cos(inc)) / 2,
phase: 0.5 + 0.5 * inc * (angle < 0 ? -1 : 1) / Math.PI,
angle
};
};
function hoursLater(date, h) {
return new Date(date.valueOf() + h * dayMs / 24);
}
SunCalc.getMoonTimes = function(date, lat, lng, inUTC) {
var t = new Date(date);
if (inUTC) t.setUTCHours(0, 0, 0, 0);
else t.setHours(0, 0, 0, 0);
var hc = 0.133 * rad, h0 = SunCalc.getMoonPosition(t, lat, lng).altitude - hc, h1, h2, rise, set, a, b, xe, ye, d, roots, x1, x2, dx;
for (var i = 1; i <= 24; i += 2) {
h1 = SunCalc.getMoonPosition(hoursLater(t, i), lat, lng).altitude - hc;
h2 = SunCalc.getMoonPosition(hoursLater(t, i + 1), lat, lng).altitude - hc;
a = (h0 + h2) / 2 - h1;
b = (h2 - h0) / 2;
xe = -b / (2 * a);
ye = (a * xe + b) * xe + h1;
d = b * b - 4 * a * h1;
roots = 0;
if (d >= 0) {
dx = Math.sqrt(d) / (Math.abs(a) * 2);
x1 = xe - dx;
x2 = xe + dx;
if (Math.abs(x1) <= 1) roots++;
if (Math.abs(x2) <= 1) roots++;
if (x1 < -1) x1 = x2;
}
if (roots === 1) {
if (h0 < 0) rise = i + x1;
else set = i + x1;
} else if (roots === 2) {
rise = i + (ye < 0 ? x2 : x1);
set = i + (ye < 0 ? x1 : x2);
}
if (rise && set) break;
h0 = h2;
}
var result = {};
if (rise) result.rise = hoursLater(t, rise);
if (set) result.set = hoursLater(t, set);
if (!rise && !set) result[ye > 0 ? "alwaysUp" : "alwaysDown"] = true;
return result;
};
if (typeof exports === "object" && typeof module !== "undefined") module.exports = SunCalc;
else if (typeof define === "function" && define.amd) define(SunCalc);
else window.SunCalc = SunCalc;
})();
}
});
export default require_suncalc();
//# sourceMappingURL=suncalc.js.map

7
web-app/node_modules/.vite/deps/suncalc.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

835
web-app/node_modules/.vite/deps/three.js generated vendored Normal file
View File

@@ -0,0 +1,835 @@
import {
ACESFilmicToneMapping,
AddEquation,
AddOperation,
AdditiveAnimationBlendMode,
AdditiveBlending,
AgXToneMapping,
AlphaFormat,
AlwaysCompare,
AlwaysDepth,
AlwaysStencilFunc,
AmbientLight,
AnimationAction,
AnimationClip,
AnimationLoader,
AnimationMixer,
AnimationObjectGroup,
AnimationUtils,
ArcCurve,
ArrayCamera,
ArrowHelper,
AttachedBindMode,
Audio,
AudioAnalyser,
AudioContext,
AudioListener,
AudioLoader,
AxesHelper,
BackSide,
BasicDepthPacking,
BasicShadowMap,
BatchedMesh,
Bone,
BooleanKeyframeTrack,
Box2,
Box3,
Box3Helper,
BoxGeometry,
BoxHelper,
BufferAttribute,
BufferGeometry,
BufferGeometryLoader,
ByteType,
Cache,
Camera,
CameraHelper,
CanvasTexture,
CapsuleGeometry,
CatmullRomCurve3,
CineonToneMapping,
CircleGeometry,
ClampToEdgeWrapping,
Clock,
Color,
ColorKeyframeTrack,
ColorManagement,
CompressedArrayTexture,
CompressedCubeTexture,
CompressedTexture,
CompressedTextureLoader,
ConeGeometry,
ConstantAlphaFactor,
ConstantColorFactor,
Controls,
CubeCamera,
CubeReflectionMapping,
CubeRefractionMapping,
CubeTexture,
CubeTextureLoader,
CubeUVReflectionMapping,
CubicBezierCurve,
CubicBezierCurve3,
CubicInterpolant,
CullFaceBack,
CullFaceFront,
CullFaceFrontBack,
CullFaceNone,
Curve,
CurvePath,
CustomBlending,
CustomToneMapping,
CylinderGeometry,
Cylindrical,
Data3DTexture,
DataArrayTexture,
DataTexture,
DataTextureLoader,
DataUtils,
DecrementStencilOp,
DecrementWrapStencilOp,
DefaultLoadingManager,
DepthFormat,
DepthStencilFormat,
DepthTexture,
DetachedBindMode,
DirectionalLight,
DirectionalLightHelper,
DiscreteInterpolant,
DodecahedronGeometry,
DoubleSide,
DstAlphaFactor,
DstColorFactor,
DynamicCopyUsage,
DynamicDrawUsage,
DynamicReadUsage,
EdgesGeometry,
EllipseCurve,
EqualCompare,
EqualDepth,
EqualStencilFunc,
EquirectangularReflectionMapping,
EquirectangularRefractionMapping,
Euler,
EventDispatcher,
ExtrudeGeometry,
FileLoader,
Float16BufferAttribute,
Float32BufferAttribute,
FloatType,
Fog,
FogExp2,
FramebufferTexture,
FrontSide,
Frustum,
GLBufferAttribute,
GLSL1,
GLSL3,
GreaterCompare,
GreaterDepth,
GreaterEqualCompare,
GreaterEqualDepth,
GreaterEqualStencilFunc,
GreaterStencilFunc,
GridHelper,
Group,
HalfFloatType,
HemisphereLight,
HemisphereLightHelper,
IcosahedronGeometry,
ImageBitmapLoader,
ImageLoader,
ImageUtils,
IncrementStencilOp,
IncrementWrapStencilOp,
InstancedBufferAttribute,
InstancedBufferGeometry,
InstancedInterleavedBuffer,
InstancedMesh,
Int16BufferAttribute,
Int32BufferAttribute,
Int8BufferAttribute,
IntType,
InterleavedBuffer,
InterleavedBufferAttribute,
Interpolant,
InterpolateDiscrete,
InterpolateLinear,
InterpolateSmooth,
InvertStencilOp,
KeepStencilOp,
KeyframeTrack,
LOD,
LatheGeometry,
Layers,
LessCompare,
LessDepth,
LessEqualCompare,
LessEqualDepth,
LessEqualStencilFunc,
LessStencilFunc,
Light,
LightProbe,
Line,
Line3,
LineBasicMaterial,
LineCurve,
LineCurve3,
LineDashedMaterial,
LineLoop,
LineSegments,
LinearFilter,
LinearInterpolant,
LinearMipMapLinearFilter,
LinearMipMapNearestFilter,
LinearMipmapLinearFilter,
LinearMipmapNearestFilter,
LinearSRGBColorSpace,
LinearToneMapping,
LinearTransfer,
Loader,
LoaderUtils,
LoadingManager,
LoopOnce,
LoopPingPong,
LoopRepeat,
LuminanceAlphaFormat,
LuminanceFormat,
MOUSE,
Material,
MaterialLoader,
MathUtils,
Matrix2,
Matrix3,
Matrix4,
MaxEquation,
Mesh,
MeshBasicMaterial,
MeshDepthMaterial,
MeshDistanceMaterial,
MeshLambertMaterial,
MeshMatcapMaterial,
MeshNormalMaterial,
MeshPhongMaterial,
MeshPhysicalMaterial,
MeshStandardMaterial,
MeshToonMaterial,
MinEquation,
MirroredRepeatWrapping,
MixOperation,
MultiplyBlending,
MultiplyOperation,
NearestFilter,
NearestMipMapLinearFilter,
NearestMipMapNearestFilter,
NearestMipmapLinearFilter,
NearestMipmapNearestFilter,
NeutralToneMapping,
NeverCompare,
NeverDepth,
NeverStencilFunc,
NoBlending,
NoColorSpace,
NoToneMapping,
NormalAnimationBlendMode,
NormalBlending,
NotEqualCompare,
NotEqualDepth,
NotEqualStencilFunc,
NumberKeyframeTrack,
Object3D,
ObjectLoader,
ObjectSpaceNormalMap,
OctahedronGeometry,
OneFactor,
OneMinusConstantAlphaFactor,
OneMinusConstantColorFactor,
OneMinusDstAlphaFactor,
OneMinusDstColorFactor,
OneMinusSrcAlphaFactor,
OneMinusSrcColorFactor,
OrthographicCamera,
PCFShadowMap,
PCFSoftShadowMap,
PMREMGenerator,
Path,
PerspectiveCamera,
Plane,
PlaneGeometry,
PlaneHelper,
PointLight,
PointLightHelper,
Points,
PointsMaterial,
PolarGridHelper,
PolyhedronGeometry,
PositionalAudio,
PropertyBinding,
PropertyMixer,
QuadraticBezierCurve,
QuadraticBezierCurve3,
Quaternion,
QuaternionKeyframeTrack,
QuaternionLinearInterpolant,
RED_GREEN_RGTC2_Format,
RED_RGTC1_Format,
REVISION,
RGBADepthPacking,
RGBAFormat,
RGBAIntegerFormat,
RGBA_ASTC_10x10_Format,
RGBA_ASTC_10x5_Format,
RGBA_ASTC_10x6_Format,
RGBA_ASTC_10x8_Format,
RGBA_ASTC_12x10_Format,
RGBA_ASTC_12x12_Format,
RGBA_ASTC_4x4_Format,
RGBA_ASTC_5x4_Format,
RGBA_ASTC_5x5_Format,
RGBA_ASTC_6x5_Format,
RGBA_ASTC_6x6_Format,
RGBA_ASTC_8x5_Format,
RGBA_ASTC_8x6_Format,
RGBA_ASTC_8x8_Format,
RGBA_BPTC_Format,
RGBA_ETC2_EAC_Format,
RGBA_PVRTC_2BPPV1_Format,
RGBA_PVRTC_4BPPV1_Format,
RGBA_S3TC_DXT1_Format,
RGBA_S3TC_DXT3_Format,
RGBA_S3TC_DXT5_Format,
RGBDepthPacking,
RGBFormat,
RGBIntegerFormat,
RGB_BPTC_SIGNED_Format,
RGB_BPTC_UNSIGNED_Format,
RGB_ETC1_Format,
RGB_ETC2_Format,
RGB_PVRTC_2BPPV1_Format,
RGB_PVRTC_4BPPV1_Format,
RGB_S3TC_DXT1_Format,
RGDepthPacking,
RGFormat,
RGIntegerFormat,
RawShaderMaterial,
Ray,
Raycaster,
RectAreaLight,
RedFormat,
RedIntegerFormat,
ReinhardToneMapping,
RenderTarget,
RepeatWrapping,
ReplaceStencilOp,
ReverseSubtractEquation,
RingGeometry,
SIGNED_RED_GREEN_RGTC2_Format,
SIGNED_RED_RGTC1_Format,
SRGBColorSpace,
SRGBTransfer,
Scene,
ShaderChunk,
ShaderLib,
ShaderMaterial,
ShadowMaterial,
Shape,
ShapeGeometry,
ShapePath,
ShapeUtils,
ShortType,
Skeleton,
SkeletonHelper,
SkinnedMesh,
Source,
Sphere,
SphereGeometry,
Spherical,
SphericalHarmonics3,
SplineCurve,
SpotLight,
SpotLightHelper,
Sprite,
SpriteMaterial,
SrcAlphaFactor,
SrcAlphaSaturateFactor,
SrcColorFactor,
StaticCopyUsage,
StaticDrawUsage,
StaticReadUsage,
StereoCamera,
StreamCopyUsage,
StreamDrawUsage,
StreamReadUsage,
StringKeyframeTrack,
SubtractEquation,
SubtractiveBlending,
TOUCH,
TangentSpaceNormalMap,
TetrahedronGeometry,
Texture,
TextureLoader,
TextureUtils,
TorusGeometry,
TorusKnotGeometry,
Triangle,
TriangleFanDrawMode,
TriangleStripDrawMode,
TrianglesDrawMode,
TubeGeometry,
UVMapping,
Uint16BufferAttribute,
Uint32BufferAttribute,
Uint8BufferAttribute,
Uint8ClampedBufferAttribute,
Uniform,
UniformsGroup,
UniformsLib,
UniformsUtils,
UnsignedByteType,
UnsignedInt248Type,
UnsignedInt5999Type,
UnsignedIntType,
UnsignedShort4444Type,
UnsignedShort5551Type,
UnsignedShortType,
VSMShadowMap,
Vector2,
Vector3,
Vector4,
VectorKeyframeTrack,
VideoTexture,
WebGL3DRenderTarget,
WebGLArrayRenderTarget,
WebGLCoordinateSystem,
WebGLCubeRenderTarget,
WebGLMultipleRenderTargets,
WebGLRenderTarget,
WebGLRenderer,
WebGLUtils,
WebGPUCoordinateSystem,
WireframeGeometry,
WrapAroundEnding,
ZeroCurvatureEnding,
ZeroFactor,
ZeroSlopeEnding,
ZeroStencilOp,
createCanvasElement
} from "./chunk-BQJMB3HC.js";
import "./chunk-BUSYA2B4.js";
export {
ACESFilmicToneMapping,
AddEquation,
AddOperation,
AdditiveAnimationBlendMode,
AdditiveBlending,
AgXToneMapping,
AlphaFormat,
AlwaysCompare,
AlwaysDepth,
AlwaysStencilFunc,
AmbientLight,
AnimationAction,
AnimationClip,
AnimationLoader,
AnimationMixer,
AnimationObjectGroup,
AnimationUtils,
ArcCurve,
ArrayCamera,
ArrowHelper,
AttachedBindMode,
Audio,
AudioAnalyser,
AudioContext,
AudioListener,
AudioLoader,
AxesHelper,
BackSide,
BasicDepthPacking,
BasicShadowMap,
BatchedMesh,
Bone,
BooleanKeyframeTrack,
Box2,
Box3,
Box3Helper,
BoxGeometry,
BoxHelper,
BufferAttribute,
BufferGeometry,
BufferGeometryLoader,
ByteType,
Cache,
Camera,
CameraHelper,
CanvasTexture,
CapsuleGeometry,
CatmullRomCurve3,
CineonToneMapping,
CircleGeometry,
ClampToEdgeWrapping,
Clock,
Color,
ColorKeyframeTrack,
ColorManagement,
CompressedArrayTexture,
CompressedCubeTexture,
CompressedTexture,
CompressedTextureLoader,
ConeGeometry,
ConstantAlphaFactor,
ConstantColorFactor,
Controls,
CubeCamera,
CubeReflectionMapping,
CubeRefractionMapping,
CubeTexture,
CubeTextureLoader,
CubeUVReflectionMapping,
CubicBezierCurve,
CubicBezierCurve3,
CubicInterpolant,
CullFaceBack,
CullFaceFront,
CullFaceFrontBack,
CullFaceNone,
Curve,
CurvePath,
CustomBlending,
CustomToneMapping,
CylinderGeometry,
Cylindrical,
Data3DTexture,
DataArrayTexture,
DataTexture,
DataTextureLoader,
DataUtils,
DecrementStencilOp,
DecrementWrapStencilOp,
DefaultLoadingManager,
DepthFormat,
DepthStencilFormat,
DepthTexture,
DetachedBindMode,
DirectionalLight,
DirectionalLightHelper,
DiscreteInterpolant,
DodecahedronGeometry,
DoubleSide,
DstAlphaFactor,
DstColorFactor,
DynamicCopyUsage,
DynamicDrawUsage,
DynamicReadUsage,
EdgesGeometry,
EllipseCurve,
EqualCompare,
EqualDepth,
EqualStencilFunc,
EquirectangularReflectionMapping,
EquirectangularRefractionMapping,
Euler,
EventDispatcher,
ExtrudeGeometry,
FileLoader,
Float16BufferAttribute,
Float32BufferAttribute,
FloatType,
Fog,
FogExp2,
FramebufferTexture,
FrontSide,
Frustum,
GLBufferAttribute,
GLSL1,
GLSL3,
GreaterCompare,
GreaterDepth,
GreaterEqualCompare,
GreaterEqualDepth,
GreaterEqualStencilFunc,
GreaterStencilFunc,
GridHelper,
Group,
HalfFloatType,
HemisphereLight,
HemisphereLightHelper,
IcosahedronGeometry,
ImageBitmapLoader,
ImageLoader,
ImageUtils,
IncrementStencilOp,
IncrementWrapStencilOp,
InstancedBufferAttribute,
InstancedBufferGeometry,
InstancedInterleavedBuffer,
InstancedMesh,
Int16BufferAttribute,
Int32BufferAttribute,
Int8BufferAttribute,
IntType,
InterleavedBuffer,
InterleavedBufferAttribute,
Interpolant,
InterpolateDiscrete,
InterpolateLinear,
InterpolateSmooth,
InvertStencilOp,
KeepStencilOp,
KeyframeTrack,
LOD,
LatheGeometry,
Layers,
LessCompare,
LessDepth,
LessEqualCompare,
LessEqualDepth,
LessEqualStencilFunc,
LessStencilFunc,
Light,
LightProbe,
Line,
Line3,
LineBasicMaterial,
LineCurve,
LineCurve3,
LineDashedMaterial,
LineLoop,
LineSegments,
LinearFilter,
LinearInterpolant,
LinearMipMapLinearFilter,
LinearMipMapNearestFilter,
LinearMipmapLinearFilter,
LinearMipmapNearestFilter,
LinearSRGBColorSpace,
LinearToneMapping,
LinearTransfer,
Loader,
LoaderUtils,
LoadingManager,
LoopOnce,
LoopPingPong,
LoopRepeat,
LuminanceAlphaFormat,
LuminanceFormat,
MOUSE,
Material,
MaterialLoader,
MathUtils,
Matrix2,
Matrix3,
Matrix4,
MaxEquation,
Mesh,
MeshBasicMaterial,
MeshDepthMaterial,
MeshDistanceMaterial,
MeshLambertMaterial,
MeshMatcapMaterial,
MeshNormalMaterial,
MeshPhongMaterial,
MeshPhysicalMaterial,
MeshStandardMaterial,
MeshToonMaterial,
MinEquation,
MirroredRepeatWrapping,
MixOperation,
MultiplyBlending,
MultiplyOperation,
NearestFilter,
NearestMipMapLinearFilter,
NearestMipMapNearestFilter,
NearestMipmapLinearFilter,
NearestMipmapNearestFilter,
NeutralToneMapping,
NeverCompare,
NeverDepth,
NeverStencilFunc,
NoBlending,
NoColorSpace,
NoToneMapping,
NormalAnimationBlendMode,
NormalBlending,
NotEqualCompare,
NotEqualDepth,
NotEqualStencilFunc,
NumberKeyframeTrack,
Object3D,
ObjectLoader,
ObjectSpaceNormalMap,
OctahedronGeometry,
OneFactor,
OneMinusConstantAlphaFactor,
OneMinusConstantColorFactor,
OneMinusDstAlphaFactor,
OneMinusDstColorFactor,
OneMinusSrcAlphaFactor,
OneMinusSrcColorFactor,
OrthographicCamera,
PCFShadowMap,
PCFSoftShadowMap,
PMREMGenerator,
Path,
PerspectiveCamera,
Plane,
PlaneGeometry,
PlaneHelper,
PointLight,
PointLightHelper,
Points,
PointsMaterial,
PolarGridHelper,
PolyhedronGeometry,
PositionalAudio,
PropertyBinding,
PropertyMixer,
QuadraticBezierCurve,
QuadraticBezierCurve3,
Quaternion,
QuaternionKeyframeTrack,
QuaternionLinearInterpolant,
RED_GREEN_RGTC2_Format,
RED_RGTC1_Format,
REVISION,
RGBADepthPacking,
RGBAFormat,
RGBAIntegerFormat,
RGBA_ASTC_10x10_Format,
RGBA_ASTC_10x5_Format,
RGBA_ASTC_10x6_Format,
RGBA_ASTC_10x8_Format,
RGBA_ASTC_12x10_Format,
RGBA_ASTC_12x12_Format,
RGBA_ASTC_4x4_Format,
RGBA_ASTC_5x4_Format,
RGBA_ASTC_5x5_Format,
RGBA_ASTC_6x5_Format,
RGBA_ASTC_6x6_Format,
RGBA_ASTC_8x5_Format,
RGBA_ASTC_8x6_Format,
RGBA_ASTC_8x8_Format,
RGBA_BPTC_Format,
RGBA_ETC2_EAC_Format,
RGBA_PVRTC_2BPPV1_Format,
RGBA_PVRTC_4BPPV1_Format,
RGBA_S3TC_DXT1_Format,
RGBA_S3TC_DXT3_Format,
RGBA_S3TC_DXT5_Format,
RGBDepthPacking,
RGBFormat,
RGBIntegerFormat,
RGB_BPTC_SIGNED_Format,
RGB_BPTC_UNSIGNED_Format,
RGB_ETC1_Format,
RGB_ETC2_Format,
RGB_PVRTC_2BPPV1_Format,
RGB_PVRTC_4BPPV1_Format,
RGB_S3TC_DXT1_Format,
RGDepthPacking,
RGFormat,
RGIntegerFormat,
RawShaderMaterial,
Ray,
Raycaster,
RectAreaLight,
RedFormat,
RedIntegerFormat,
ReinhardToneMapping,
RenderTarget,
RepeatWrapping,
ReplaceStencilOp,
ReverseSubtractEquation,
RingGeometry,
SIGNED_RED_GREEN_RGTC2_Format,
SIGNED_RED_RGTC1_Format,
SRGBColorSpace,
SRGBTransfer,
Scene,
ShaderChunk,
ShaderLib,
ShaderMaterial,
ShadowMaterial,
Shape,
ShapeGeometry,
ShapePath,
ShapeUtils,
ShortType,
Skeleton,
SkeletonHelper,
SkinnedMesh,
Source,
Sphere,
SphereGeometry,
Spherical,
SphericalHarmonics3,
SplineCurve,
SpotLight,
SpotLightHelper,
Sprite,
SpriteMaterial,
SrcAlphaFactor,
SrcAlphaSaturateFactor,
SrcColorFactor,
StaticCopyUsage,
StaticDrawUsage,
StaticReadUsage,
StereoCamera,
StreamCopyUsage,
StreamDrawUsage,
StreamReadUsage,
StringKeyframeTrack,
SubtractEquation,
SubtractiveBlending,
TOUCH,
TangentSpaceNormalMap,
TetrahedronGeometry,
Texture,
TextureLoader,
TextureUtils,
TorusGeometry,
TorusKnotGeometry,
Triangle,
TriangleFanDrawMode,
TriangleStripDrawMode,
TrianglesDrawMode,
TubeGeometry,
UVMapping,
Uint16BufferAttribute,
Uint32BufferAttribute,
Uint8BufferAttribute,
Uint8ClampedBufferAttribute,
Uniform,
UniformsGroup,
UniformsLib,
UniformsUtils,
UnsignedByteType,
UnsignedInt248Type,
UnsignedInt5999Type,
UnsignedIntType,
UnsignedShort4444Type,
UnsignedShort5551Type,
UnsignedShortType,
VSMShadowMap,
Vector2,
Vector3,
Vector4,
VectorKeyframeTrack,
VideoTexture,
WebGL3DRenderTarget,
WebGLArrayRenderTarget,
WebGLCoordinateSystem,
WebGLCubeRenderTarget,
WebGLMultipleRenderTargets,
WebGLRenderTarget,
WebGLRenderer,
WebGLUtils,
WebGPUCoordinateSystem,
WireframeGeometry,
WrapAroundEnding,
ZeroCurvatureEnding,
ZeroFactor,
ZeroSlopeEnding,
ZeroStencilOp,
createCanvasElement
};

7
web-app/node_modules/.vite/deps/three.js.map generated vendored Normal file
View File

@@ -0,0 +1,7 @@
{
"version": 3,
"sources": [],
"sourcesContent": [],
"mappings": "",
"names": []
}

View File

@@ -0,0 +1,803 @@
import {
Controls,
MOUSE,
MathUtils,
Plane,
Quaternion,
Ray,
Spherical,
TOUCH,
Vector2,
Vector3
} from "./chunk-BQJMB3HC.js";
import "./chunk-BUSYA2B4.js";
// node_modules/three/examples/jsm/controls/OrbitControls.js
var _changeEvent = { type: "change" };
var _startEvent = { type: "start" };
var _endEvent = { type: "end" };
var _ray = new Ray();
var _plane = new Plane();
var _TILT_LIMIT = Math.cos(70 * MathUtils.DEG2RAD);
var _v = new Vector3();
var _twoPI = 2 * Math.PI;
var _STATE = {
NONE: -1,
ROTATE: 0,
DOLLY: 1,
PAN: 2,
TOUCH_ROTATE: 3,
TOUCH_PAN: 4,
TOUCH_DOLLY_PAN: 5,
TOUCH_DOLLY_ROTATE: 6
};
var _EPS = 1e-6;
var OrbitControls = class extends Controls {
constructor(object, domElement = null) {
super(object, domElement);
this.state = _STATE.NONE;
this.enabled = true;
this.target = new Vector3();
this.cursor = new Vector3();
this.minDistance = 0;
this.maxDistance = Infinity;
this.minZoom = 0;
this.maxZoom = Infinity;
this.minTargetRadius = 0;
this.maxTargetRadius = Infinity;
this.minPolarAngle = 0;
this.maxPolarAngle = Math.PI;
this.minAzimuthAngle = -Infinity;
this.maxAzimuthAngle = Infinity;
this.enableDamping = false;
this.dampingFactor = 0.05;
this.enableZoom = true;
this.zoomSpeed = 1;
this.enableRotate = true;
this.rotateSpeed = 1;
this.enablePan = true;
this.panSpeed = 1;
this.screenSpacePanning = true;
this.keyPanSpeed = 7;
this.zoomToCursor = false;
this.autoRotate = false;
this.autoRotateSpeed = 2;
this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" };
this.mouseButtons = { LEFT: MOUSE.ROTATE, MIDDLE: MOUSE.DOLLY, RIGHT: MOUSE.PAN };
this.touches = { ONE: TOUCH.ROTATE, TWO: TOUCH.DOLLY_PAN };
this.target0 = this.target.clone();
this.position0 = this.object.position.clone();
this.zoom0 = this.object.zoom;
this._domElementKeyEvents = null;
this._lastPosition = new Vector3();
this._lastQuaternion = new Quaternion();
this._lastTargetPosition = new Vector3();
this._quat = new Quaternion().setFromUnitVectors(object.up, new Vector3(0, 1, 0));
this._quatInverse = this._quat.clone().invert();
this._spherical = new Spherical();
this._sphericalDelta = new Spherical();
this._scale = 1;
this._panOffset = new Vector3();
this._rotateStart = new Vector2();
this._rotateEnd = new Vector2();
this._rotateDelta = new Vector2();
this._panStart = new Vector2();
this._panEnd = new Vector2();
this._panDelta = new Vector2();
this._dollyStart = new Vector2();
this._dollyEnd = new Vector2();
this._dollyDelta = new Vector2();
this._dollyDirection = new Vector3();
this._mouse = new Vector2();
this._performCursorZoom = false;
this._pointers = [];
this._pointerPositions = {};
this._controlActive = false;
this._onPointerMove = onPointerMove.bind(this);
this._onPointerDown = onPointerDown.bind(this);
this._onPointerUp = onPointerUp.bind(this);
this._onContextMenu = onContextMenu.bind(this);
this._onMouseWheel = onMouseWheel.bind(this);
this._onKeyDown = onKeyDown.bind(this);
this._onTouchStart = onTouchStart.bind(this);
this._onTouchMove = onTouchMove.bind(this);
this._onMouseDown = onMouseDown.bind(this);
this._onMouseMove = onMouseMove.bind(this);
this._interceptControlDown = interceptControlDown.bind(this);
this._interceptControlUp = interceptControlUp.bind(this);
if (this.domElement !== null) {
this.connect();
}
this.update();
}
connect() {
this.domElement.addEventListener("pointerdown", this._onPointerDown);
this.domElement.addEventListener("pointercancel", this._onPointerUp);
this.domElement.addEventListener("contextmenu", this._onContextMenu);
this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: false });
const document = this.domElement.getRootNode();
document.addEventListener("keydown", this._interceptControlDown, { passive: true, capture: true });
this.domElement.style.touchAction = "none";
}
disconnect() {
this.domElement.removeEventListener("pointerdown", this._onPointerDown);
this.domElement.removeEventListener("pointermove", this._onPointerMove);
this.domElement.removeEventListener("pointerup", this._onPointerUp);
this.domElement.removeEventListener("pointercancel", this._onPointerUp);
this.domElement.removeEventListener("wheel", this._onMouseWheel);
this.domElement.removeEventListener("contextmenu", this._onContextMenu);
this.stopListenToKeyEvents();
const document = this.domElement.getRootNode();
document.removeEventListener("keydown", this._interceptControlDown, { capture: true });
this.domElement.style.touchAction = "auto";
}
dispose() {
this.disconnect();
}
getPolarAngle() {
return this._spherical.phi;
}
getAzimuthalAngle() {
return this._spherical.theta;
}
getDistance() {
return this.object.position.distanceTo(this.target);
}
listenToKeyEvents(domElement) {
domElement.addEventListener("keydown", this._onKeyDown);
this._domElementKeyEvents = domElement;
}
stopListenToKeyEvents() {
if (this._domElementKeyEvents !== null) {
this._domElementKeyEvents.removeEventListener("keydown", this._onKeyDown);
this._domElementKeyEvents = null;
}
}
saveState() {
this.target0.copy(this.target);
this.position0.copy(this.object.position);
this.zoom0 = this.object.zoom;
}
reset() {
this.target.copy(this.target0);
this.object.position.copy(this.position0);
this.object.zoom = this.zoom0;
this.object.updateProjectionMatrix();
this.dispatchEvent(_changeEvent);
this.update();
this.state = _STATE.NONE;
}
update(deltaTime = null) {
const position = this.object.position;
_v.copy(position).sub(this.target);
_v.applyQuaternion(this._quat);
this._spherical.setFromVector3(_v);
if (this.autoRotate && this.state === _STATE.NONE) {
this._rotateLeft(this._getAutoRotationAngle(deltaTime));
}
if (this.enableDamping) {
this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor;
this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor;
} else {
this._spherical.theta += this._sphericalDelta.theta;
this._spherical.phi += this._sphericalDelta.phi;
}
let min = this.minAzimuthAngle;
let max = this.maxAzimuthAngle;
if (isFinite(min) && isFinite(max)) {
if (min < -Math.PI) min += _twoPI;
else if (min > Math.PI) min -= _twoPI;
if (max < -Math.PI) max += _twoPI;
else if (max > Math.PI) max -= _twoPI;
if (min <= max) {
this._spherical.theta = Math.max(min, Math.min(max, this._spherical.theta));
} else {
this._spherical.theta = this._spherical.theta > (min + max) / 2 ? Math.max(min, this._spherical.theta) : Math.min(max, this._spherical.theta);
}
}
this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi));
this._spherical.makeSafe();
if (this.enableDamping === true) {
this.target.addScaledVector(this._panOffset, this.dampingFactor);
} else {
this.target.add(this._panOffset);
}
this.target.sub(this.cursor);
this.target.clampLength(this.minTargetRadius, this.maxTargetRadius);
this.target.add(this.cursor);
let zoomChanged = false;
if (this.zoomToCursor && this._performCursorZoom || this.object.isOrthographicCamera) {
this._spherical.radius = this._clampDistance(this._spherical.radius);
} else {
const prevRadius = this._spherical.radius;
this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale);
zoomChanged = prevRadius != this._spherical.radius;
}
_v.setFromSpherical(this._spherical);
_v.applyQuaternion(this._quatInverse);
position.copy(this.target).add(_v);
this.object.lookAt(this.target);
if (this.enableDamping === true) {
this._sphericalDelta.theta *= 1 - this.dampingFactor;
this._sphericalDelta.phi *= 1 - this.dampingFactor;
this._panOffset.multiplyScalar(1 - this.dampingFactor);
} else {
this._sphericalDelta.set(0, 0, 0);
this._panOffset.set(0, 0, 0);
}
if (this.zoomToCursor && this._performCursorZoom) {
let newRadius = null;
if (this.object.isPerspectiveCamera) {
const prevRadius = _v.length();
newRadius = this._clampDistance(prevRadius * this._scale);
const radiusDelta = prevRadius - newRadius;
this.object.position.addScaledVector(this._dollyDirection, radiusDelta);
this.object.updateMatrixWorld();
zoomChanged = !!radiusDelta;
} else if (this.object.isOrthographicCamera) {
const mouseBefore = new Vector3(this._mouse.x, this._mouse.y, 0);
mouseBefore.unproject(this.object);
const prevZoom = this.object.zoom;
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale));
this.object.updateProjectionMatrix();
zoomChanged = prevZoom !== this.object.zoom;
const mouseAfter = new Vector3(this._mouse.x, this._mouse.y, 0);
mouseAfter.unproject(this.object);
this.object.position.sub(mouseAfter).add(mouseBefore);
this.object.updateMatrixWorld();
newRadius = _v.length();
} else {
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled.");
this.zoomToCursor = false;
}
if (newRadius !== null) {
if (this.screenSpacePanning) {
this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(newRadius).add(this.object.position);
} else {
_ray.origin.copy(this.object.position);
_ray.direction.set(0, 0, -1).transformDirection(this.object.matrix);
if (Math.abs(this.object.up.dot(_ray.direction)) < _TILT_LIMIT) {
this.object.lookAt(this.target);
} else {
_plane.setFromNormalAndCoplanarPoint(this.object.up, this.target);
_ray.intersectPlane(_plane, this.target);
}
}
}
} else if (this.object.isOrthographicCamera) {
const prevZoom = this.object.zoom;
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale));
if (prevZoom !== this.object.zoom) {
this.object.updateProjectionMatrix();
zoomChanged = true;
}
}
this._scale = 1;
this._performCursorZoom = false;
if (zoomChanged || this._lastPosition.distanceToSquared(this.object.position) > _EPS || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > _EPS || this._lastTargetPosition.distanceToSquared(this.target) > _EPS) {
this.dispatchEvent(_changeEvent);
this._lastPosition.copy(this.object.position);
this._lastQuaternion.copy(this.object.quaternion);
this._lastTargetPosition.copy(this.target);
return true;
}
return false;
}
_getAutoRotationAngle(deltaTime) {
if (deltaTime !== null) {
return _twoPI / 60 * this.autoRotateSpeed * deltaTime;
} else {
return _twoPI / 60 / 60 * this.autoRotateSpeed;
}
}
_getZoomScale(delta) {
const normalizedDelta = Math.abs(delta * 0.01);
return Math.pow(0.95, this.zoomSpeed * normalizedDelta);
}
_rotateLeft(angle) {
this._sphericalDelta.theta -= angle;
}
_rotateUp(angle) {
this._sphericalDelta.phi -= angle;
}
_panLeft(distance, objectMatrix) {
_v.setFromMatrixColumn(objectMatrix, 0);
_v.multiplyScalar(-distance);
this._panOffset.add(_v);
}
_panUp(distance, objectMatrix) {
if (this.screenSpacePanning === true) {
_v.setFromMatrixColumn(objectMatrix, 1);
} else {
_v.setFromMatrixColumn(objectMatrix, 0);
_v.crossVectors(this.object.up, _v);
}
_v.multiplyScalar(distance);
this._panOffset.add(_v);
}
// deltaX and deltaY are in pixels; right and down are positive
_pan(deltaX, deltaY) {
const element = this.domElement;
if (this.object.isPerspectiveCamera) {
const position = this.object.position;
_v.copy(position).sub(this.target);
let targetDistance = _v.length();
targetDistance *= Math.tan(this.object.fov / 2 * Math.PI / 180);
this._panLeft(2 * deltaX * targetDistance / element.clientHeight, this.object.matrix);
this._panUp(2 * deltaY * targetDistance / element.clientHeight, this.object.matrix);
} else if (this.object.isOrthographicCamera) {
this._panLeft(deltaX * (this.object.right - this.object.left) / this.object.zoom / element.clientWidth, this.object.matrix);
this._panUp(deltaY * (this.object.top - this.object.bottom) / this.object.zoom / element.clientHeight, this.object.matrix);
} else {
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.");
this.enablePan = false;
}
}
_dollyOut(dollyScale) {
if (this.object.isPerspectiveCamera || this.object.isOrthographicCamera) {
this._scale /= dollyScale;
} else {
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.");
this.enableZoom = false;
}
}
_dollyIn(dollyScale) {
if (this.object.isPerspectiveCamera || this.object.isOrthographicCamera) {
this._scale *= dollyScale;
} else {
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.");
this.enableZoom = false;
}
}
_updateZoomParameters(x, y) {
if (!this.zoomToCursor) {
return;
}
this._performCursorZoom = true;
const rect = this.domElement.getBoundingClientRect();
const dx = x - rect.left;
const dy = y - rect.top;
const w = rect.width;
const h = rect.height;
this._mouse.x = dx / w * 2 - 1;
this._mouse.y = -(dy / h) * 2 + 1;
this._dollyDirection.set(this._mouse.x, this._mouse.y, 1).unproject(this.object).sub(this.object.position).normalize();
}
_clampDistance(dist) {
return Math.max(this.minDistance, Math.min(this.maxDistance, dist));
}
//
// event callbacks - update the object state
//
_handleMouseDownRotate(event) {
this._rotateStart.set(event.clientX, event.clientY);
}
_handleMouseDownDolly(event) {
this._updateZoomParameters(event.clientX, event.clientX);
this._dollyStart.set(event.clientX, event.clientY);
}
_handleMouseDownPan(event) {
this._panStart.set(event.clientX, event.clientY);
}
_handleMouseMoveRotate(event) {
this._rotateEnd.set(event.clientX, event.clientY);
this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
const element = this.domElement;
this._rotateLeft(_twoPI * this._rotateDelta.x / element.clientHeight);
this._rotateUp(_twoPI * this._rotateDelta.y / element.clientHeight);
this._rotateStart.copy(this._rotateEnd);
this.update();
}
_handleMouseMoveDolly(event) {
this._dollyEnd.set(event.clientX, event.clientY);
this._dollyDelta.subVectors(this._dollyEnd, this._dollyStart);
if (this._dollyDelta.y > 0) {
this._dollyOut(this._getZoomScale(this._dollyDelta.y));
} else if (this._dollyDelta.y < 0) {
this._dollyIn(this._getZoomScale(this._dollyDelta.y));
}
this._dollyStart.copy(this._dollyEnd);
this.update();
}
_handleMouseMovePan(event) {
this._panEnd.set(event.clientX, event.clientY);
this._panDelta.subVectors(this._panEnd, this._panStart).multiplyScalar(this.panSpeed);
this._pan(this._panDelta.x, this._panDelta.y);
this._panStart.copy(this._panEnd);
this.update();
}
_handleMouseWheel(event) {
this._updateZoomParameters(event.clientX, event.clientY);
if (event.deltaY < 0) {
this._dollyIn(this._getZoomScale(event.deltaY));
} else if (event.deltaY > 0) {
this._dollyOut(this._getZoomScale(event.deltaY));
}
this.update();
}
_handleKeyDown(event) {
let needsUpdate = false;
switch (event.code) {
case this.keys.UP:
if (event.ctrlKey || event.metaKey || event.shiftKey) {
this._rotateUp(_twoPI * this.rotateSpeed / this.domElement.clientHeight);
} else {
this._pan(0, this.keyPanSpeed);
}
needsUpdate = true;
break;
case this.keys.BOTTOM:
if (event.ctrlKey || event.metaKey || event.shiftKey) {
this._rotateUp(-_twoPI * this.rotateSpeed / this.domElement.clientHeight);
} else {
this._pan(0, -this.keyPanSpeed);
}
needsUpdate = true;
break;
case this.keys.LEFT:
if (event.ctrlKey || event.metaKey || event.shiftKey) {
this._rotateLeft(_twoPI * this.rotateSpeed / this.domElement.clientHeight);
} else {
this._pan(this.keyPanSpeed, 0);
}
needsUpdate = true;
break;
case this.keys.RIGHT:
if (event.ctrlKey || event.metaKey || event.shiftKey) {
this._rotateLeft(-_twoPI * this.rotateSpeed / this.domElement.clientHeight);
} else {
this._pan(-this.keyPanSpeed, 0);
}
needsUpdate = true;
break;
}
if (needsUpdate) {
event.preventDefault();
this.update();
}
}
_handleTouchStartRotate(event) {
if (this._pointers.length === 1) {
this._rotateStart.set(event.pageX, event.pageY);
} else {
const position = this._getSecondPointerPosition(event);
const x = 0.5 * (event.pageX + position.x);
const y = 0.5 * (event.pageY + position.y);
this._rotateStart.set(x, y);
}
}
_handleTouchStartPan(event) {
if (this._pointers.length === 1) {
this._panStart.set(event.pageX, event.pageY);
} else {
const position = this._getSecondPointerPosition(event);
const x = 0.5 * (event.pageX + position.x);
const y = 0.5 * (event.pageY + position.y);
this._panStart.set(x, y);
}
}
_handleTouchStartDolly(event) {
const position = this._getSecondPointerPosition(event);
const dx = event.pageX - position.x;
const dy = event.pageY - position.y;
const distance = Math.sqrt(dx * dx + dy * dy);
this._dollyStart.set(0, distance);
}
_handleTouchStartDollyPan(event) {
if (this.enableZoom) this._handleTouchStartDolly(event);
if (this.enablePan) this._handleTouchStartPan(event);
}
_handleTouchStartDollyRotate(event) {
if (this.enableZoom) this._handleTouchStartDolly(event);
if (this.enableRotate) this._handleTouchStartRotate(event);
}
_handleTouchMoveRotate(event) {
if (this._pointers.length == 1) {
this._rotateEnd.set(event.pageX, event.pageY);
} else {
const position = this._getSecondPointerPosition(event);
const x = 0.5 * (event.pageX + position.x);
const y = 0.5 * (event.pageY + position.y);
this._rotateEnd.set(x, y);
}
this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
const element = this.domElement;
this._rotateLeft(_twoPI * this._rotateDelta.x / element.clientHeight);
this._rotateUp(_twoPI * this._rotateDelta.y / element.clientHeight);
this._rotateStart.copy(this._rotateEnd);
}
_handleTouchMovePan(event) {
if (this._pointers.length === 1) {
this._panEnd.set(event.pageX, event.pageY);
} else {
const position = this._getSecondPointerPosition(event);
const x = 0.5 * (event.pageX + position.x);
const y = 0.5 * (event.pageY + position.y);
this._panEnd.set(x, y);
}
this._panDelta.subVectors(this._panEnd, this._panStart).multiplyScalar(this.panSpeed);
this._pan(this._panDelta.x, this._panDelta.y);
this._panStart.copy(this._panEnd);
}
_handleTouchMoveDolly(event) {
const position = this._getSecondPointerPosition(event);
const dx = event.pageX - position.x;
const dy = event.pageY - position.y;
const distance = Math.sqrt(dx * dx + dy * dy);
this._dollyEnd.set(0, distance);
this._dollyDelta.set(0, Math.pow(this._dollyEnd.y / this._dollyStart.y, this.zoomSpeed));
this._dollyOut(this._dollyDelta.y);
this._dollyStart.copy(this._dollyEnd);
const centerX = (event.pageX + position.x) * 0.5;
const centerY = (event.pageY + position.y) * 0.5;
this._updateZoomParameters(centerX, centerY);
}
_handleTouchMoveDollyPan(event) {
if (this.enableZoom) this._handleTouchMoveDolly(event);
if (this.enablePan) this._handleTouchMovePan(event);
}
_handleTouchMoveDollyRotate(event) {
if (this.enableZoom) this._handleTouchMoveDolly(event);
if (this.enableRotate) this._handleTouchMoveRotate(event);
}
// pointers
_addPointer(event) {
this._pointers.push(event.pointerId);
}
_removePointer(event) {
delete this._pointerPositions[event.pointerId];
for (let i = 0; i < this._pointers.length; i++) {
if (this._pointers[i] == event.pointerId) {
this._pointers.splice(i, 1);
return;
}
}
}
_isTrackingPointer(event) {
for (let i = 0; i < this._pointers.length; i++) {
if (this._pointers[i] == event.pointerId) return true;
}
return false;
}
_trackPointer(event) {
let position = this._pointerPositions[event.pointerId];
if (position === void 0) {
position = new Vector2();
this._pointerPositions[event.pointerId] = position;
}
position.set(event.pageX, event.pageY);
}
_getSecondPointerPosition(event) {
const pointerId = event.pointerId === this._pointers[0] ? this._pointers[1] : this._pointers[0];
return this._pointerPositions[pointerId];
}
//
_customWheelEvent(event) {
const mode = event.deltaMode;
const newEvent = {
clientX: event.clientX,
clientY: event.clientY,
deltaY: event.deltaY
};
switch (mode) {
case 1:
newEvent.deltaY *= 16;
break;
case 2:
newEvent.deltaY *= 100;
break;
}
if (event.ctrlKey && !this._controlActive) {
newEvent.deltaY *= 10;
}
return newEvent;
}
};
function onPointerDown(event) {
if (this.enabled === false) return;
if (this._pointers.length === 0) {
this.domElement.setPointerCapture(event.pointerId);
this.domElement.addEventListener("pointermove", this._onPointerMove);
this.domElement.addEventListener("pointerup", this._onPointerUp);
}
if (this._isTrackingPointer(event)) return;
this._addPointer(event);
if (event.pointerType === "touch") {
this._onTouchStart(event);
} else {
this._onMouseDown(event);
}
}
function onPointerMove(event) {
if (this.enabled === false) return;
if (event.pointerType === "touch") {
this._onTouchMove(event);
} else {
this._onMouseMove(event);
}
}
function onPointerUp(event) {
this._removePointer(event);
switch (this._pointers.length) {
case 0:
this.domElement.releasePointerCapture(event.pointerId);
this.domElement.removeEventListener("pointermove", this._onPointerMove);
this.domElement.removeEventListener("pointerup", this._onPointerUp);
this.dispatchEvent(_endEvent);
this.state = _STATE.NONE;
break;
case 1:
const pointerId = this._pointers[0];
const position = this._pointerPositions[pointerId];
this._onTouchStart({ pointerId, pageX: position.x, pageY: position.y });
break;
}
}
function onMouseDown(event) {
let mouseAction;
switch (event.button) {
case 0:
mouseAction = this.mouseButtons.LEFT;
break;
case 1:
mouseAction = this.mouseButtons.MIDDLE;
break;
case 2:
mouseAction = this.mouseButtons.RIGHT;
break;
default:
mouseAction = -1;
}
switch (mouseAction) {
case MOUSE.DOLLY:
if (this.enableZoom === false) return;
this._handleMouseDownDolly(event);
this.state = _STATE.DOLLY;
break;
case MOUSE.ROTATE:
if (event.ctrlKey || event.metaKey || event.shiftKey) {
if (this.enablePan === false) return;
this._handleMouseDownPan(event);
this.state = _STATE.PAN;
} else {
if (this.enableRotate === false) return;
this._handleMouseDownRotate(event);
this.state = _STATE.ROTATE;
}
break;
case MOUSE.PAN:
if (event.ctrlKey || event.metaKey || event.shiftKey) {
if (this.enableRotate === false) return;
this._handleMouseDownRotate(event);
this.state = _STATE.ROTATE;
} else {
if (this.enablePan === false) return;
this._handleMouseDownPan(event);
this.state = _STATE.PAN;
}
break;
default:
this.state = _STATE.NONE;
}
if (this.state !== _STATE.NONE) {
this.dispatchEvent(_startEvent);
}
}
function onMouseMove(event) {
switch (this.state) {
case _STATE.ROTATE:
if (this.enableRotate === false) return;
this._handleMouseMoveRotate(event);
break;
case _STATE.DOLLY:
if (this.enableZoom === false) return;
this._handleMouseMoveDolly(event);
break;
case _STATE.PAN:
if (this.enablePan === false) return;
this._handleMouseMovePan(event);
break;
}
}
function onMouseWheel(event) {
if (this.enabled === false || this.enableZoom === false || this.state !== _STATE.NONE) return;
event.preventDefault();
this.dispatchEvent(_startEvent);
this._handleMouseWheel(this._customWheelEvent(event));
this.dispatchEvent(_endEvent);
}
function onKeyDown(event) {
if (this.enabled === false || this.enablePan === false) return;
this._handleKeyDown(event);
}
function onTouchStart(event) {
this._trackPointer(event);
switch (this._pointers.length) {
case 1:
switch (this.touches.ONE) {
case TOUCH.ROTATE:
if (this.enableRotate === false) return;
this._handleTouchStartRotate(event);
this.state = _STATE.TOUCH_ROTATE;
break;
case TOUCH.PAN:
if (this.enablePan === false) return;
this._handleTouchStartPan(event);
this.state = _STATE.TOUCH_PAN;
break;
default:
this.state = _STATE.NONE;
}
break;
case 2:
switch (this.touches.TWO) {
case TOUCH.DOLLY_PAN:
if (this.enableZoom === false && this.enablePan === false) return;
this._handleTouchStartDollyPan(event);
this.state = _STATE.TOUCH_DOLLY_PAN;
break;
case TOUCH.DOLLY_ROTATE:
if (this.enableZoom === false && this.enableRotate === false) return;
this._handleTouchStartDollyRotate(event);
this.state = _STATE.TOUCH_DOLLY_ROTATE;
break;
default:
this.state = _STATE.NONE;
}
break;
default:
this.state = _STATE.NONE;
}
if (this.state !== _STATE.NONE) {
this.dispatchEvent(_startEvent);
}
}
function onTouchMove(event) {
this._trackPointer(event);
switch (this.state) {
case _STATE.TOUCH_ROTATE:
if (this.enableRotate === false) return;
this._handleTouchMoveRotate(event);
this.update();
break;
case _STATE.TOUCH_PAN:
if (this.enablePan === false) return;
this._handleTouchMovePan(event);
this.update();
break;
case _STATE.TOUCH_DOLLY_PAN:
if (this.enableZoom === false && this.enablePan === false) return;
this._handleTouchMoveDollyPan(event);
this.update();
break;
case _STATE.TOUCH_DOLLY_ROTATE:
if (this.enableZoom === false && this.enableRotate === false) return;
this._handleTouchMoveDollyRotate(event);
this.update();
break;
default:
this.state = _STATE.NONE;
}
}
function onContextMenu(event) {
if (this.enabled === false) return;
event.preventDefault();
}
function interceptControlDown(event) {
if (event.key === "Control") {
this._controlActive = true;
const document = this.domElement.getRootNode();
document.addEventListener("keyup", this._interceptControlUp, { passive: true, capture: true });
}
}
function interceptControlUp(event) {
if (event.key === "Control") {
this._controlActive = false;
const document = this.domElement.getRootNode();
document.removeEventListener("keyup", this._interceptControlUp, { passive: true, capture: true });
}
}
export {
OrbitControls
};
//# sourceMappingURL=three_examples_jsm_controls_OrbitControls__js.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

12799
web-app/node_modules/.vite/deps/vue.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

7
web-app/node_modules/.vite/deps/vue.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

131
web-app/node_modules/.vue-global-types/vue_3.5_0.d.ts generated vendored Normal file
View File

@@ -0,0 +1,131 @@
// @ts-nocheck
export {};
declare global {
var __VLS_PROPS_FALLBACK: Record<string, unknown>;
const __VLS_directiveBindingRestFields: { instance: null, oldValue: null, modifiers: any, dir: any };
const __VLS_placeholder: any;
const __VLS_intrinsics: import('vue/jsx-runtime').JSX.IntrinsicElements;
type __VLS_Elements = __VLS_SpreadMerge<SVGElementTagNameMap, HTMLElementTagNameMap>;
type __VLS_GlobalComponents = import('vue').GlobalComponents;
type __VLS_GlobalDirectives = import('vue').GlobalDirectives;
type __VLS_IsAny<T> = 0 extends 1 & T ? true : false;
type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
type __VLS_SpreadMerge<A, B> = Omit<A, keyof B> & B;
type __VLS_WithComponent<N0 extends string, LocalComponents, Self, N1 extends string, N2 extends string = N1, N3 extends string = N1> =
N1 extends keyof LocalComponents ? { [K in N0]: LocalComponents[N1] } :
N2 extends keyof LocalComponents ? { [K in N0]: LocalComponents[N2] } :
N3 extends keyof LocalComponents ? { [K in N0]: LocalComponents[N3] } :
Self extends object ? { [K in N0]: Self } :
N1 extends keyof __VLS_GlobalComponents ? { [K in N0]: __VLS_GlobalComponents[N1] } :
N2 extends keyof __VLS_GlobalComponents ? { [K in N0]: __VLS_GlobalComponents[N2] } :
N3 extends keyof __VLS_GlobalComponents ? { [K in N0]: __VLS_GlobalComponents[N3] } :
{};
type __VLS_FunctionalComponentCtx<T, K> = __VLS_PickNotAny<'__ctx' extends keyof __VLS_PickNotAny<K, {}>
? K extends { __ctx?: infer Ctx } ? NonNullable<Ctx> : never : any
, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any
>;
type __VLS_FunctionalComponentProps<T, K> = '__ctx' extends keyof __VLS_PickNotAny<K, {}>
? K extends { __ctx?: { props?: infer P } } ? NonNullable<P> : never
: T extends (props: infer P, ...args: any) => any ? P
: {};
type __VLS_FunctionalComponent<T> = (props: (T extends { $props: infer Props } ? Props : {}) & Record<string, unknown>, ctx?: any) => import('vue/jsx-runtime').JSX.Element & {
__ctx?: {
attrs?: any;
slots?: T extends { $slots: infer Slots } ? Slots : Record<string, any>;
emit?: T extends { $emit: infer Emit } ? Emit : {};
props?: typeof props;
expose?: (exposed: T) => void;
};
};
type __VLS_IsFunction<T, K> = K extends keyof T
? __VLS_IsAny<T[K]> extends false
? unknown extends T[K]
? false
: true
: false
: false;
type __VLS_NormalizeComponentEvent<
Props,
Emits,
onEvent extends keyof Props,
Event extends keyof Emits,
CamelizedEvent extends keyof Emits,
> = __VLS_IsFunction<Props, onEvent> extends true
? Props
: __VLS_IsFunction<Emits, Event> extends true
? { [K in onEvent]?: Emits[Event] }
: __VLS_IsFunction<Emits, CamelizedEvent> extends true
? { [K in onEvent]?: Emits[CamelizedEvent] }
: Props;
// fix https://github.com/vuejs/language-tools/issues/926
type __VLS_UnionToIntersection<U> = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never;
type __VLS_OverloadUnionInner<T, U = unknown> = U & T extends (...args: infer A) => infer R
? U extends T
? never
: __VLS_OverloadUnionInner<T, Pick<T, keyof T> & U & ((...args: A) => R)> | ((...args: A) => R)
: never;
type __VLS_OverloadUnion<T> = Exclude<
__VLS_OverloadUnionInner<(() => never) & T>,
T extends () => never ? never : () => never
>;
type __VLS_ConstructorOverloads<T> = __VLS_OverloadUnion<T> extends infer F
? F extends (event: infer E, ...args: infer A) => any
? { [K in E & string]: (...args: A) => void; }
: never
: never;
type __VLS_NormalizeEmits<T> = __VLS_PrettifyGlobal<
__VLS_UnionToIntersection<
__VLS_ConstructorOverloads<T> & {
[K in keyof T]: T[K] extends any[] ? { (...args: T[K]): void } : never
}
>
>;
type __VLS_EmitsToProps<T> = __VLS_PrettifyGlobal<{
[K in string & keyof T as `on${Capitalize<K>}`]?:
(...args: T[K] extends (...args: infer P) => any ? P : T[K] extends null ? any[] : never) => any;
}>;
type __VLS_ResolveEmits<
Comp,
Emits,
TypeEmits = {},
NormalizedEmits = __VLS_NormalizeEmits<Emits> extends infer E ? string extends keyof E ? {} : E : never,
> = __VLS_SpreadMerge<NormalizedEmits, TypeEmits>;
type __VLS_ResolveDirectives<T> = {
[K in keyof T & string as `v${Capitalize<K>}`]: T[K];
};
type __VLS_PrettifyGlobal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
type __VLS_UseTemplateRef<T> = Readonly<import('vue').ShallowRef<T | null>>;
type __VLS_ProxyRefs<T> = import('vue').ShallowUnwrapRef<T>;
function __VLS_getVForSourceType<T extends number | string | any[] | Iterable<any>>(source: T): [
item: T extends number ? number
: T extends string ? string
: T extends any[] ? T[number]
: T extends Iterable<infer T1> ? T1
: any,
index: number,
][];
function __VLS_getVForSourceType<T>(source: T): [
item: T[keyof T],
key: keyof T,
index: number,
][];
function __VLS_getSlotParameters<S, D extends S>(slot: S, decl?: D):
D extends (...args: infer P) => any ? P : any[];
function __VLS_asFunctionalDirective<T>(dir: T): T extends import('vue').ObjectDirective
? NonNullable<T['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>
: T extends (...args: any) => any
? T
: (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K):
T extends new (...args: any) => any ? __VLS_FunctionalComponent<K>
: T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
: T extends (...args: any) => any ? T
: __VLS_FunctionalComponent<{}>;
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : [];
function __VLS_asFunctionalElement<T>(tag: T, endTag?: T): (attrs: T & Record<string, unknown>) => void;
function __VLS_asFunctionalSlot<S>(slot: S): S extends () => infer R ? (props: {}) => R : NonNullable<S>;
function __VLS_tryAsConstant<const T>(t: T): T;
}

View File

@@ -0,0 +1,118 @@
// @ts-nocheck
export {};
; declare global {
const __VLS_intrinsicElements: __VLS_IntrinsicElements;
const __VLS_directiveBindingRestFields: { instance: null, oldValue: null, modifiers: any, dir: any };
const __VLS_unref: typeof import('vue').unref;
const __VLS_placeholder: any;
type __VLS_NativeElements = __VLS_SpreadMerge<SVGElementTagNameMap, HTMLElementTagNameMap>;
type __VLS_IntrinsicElements = import('vue/jsx-runtime').JSX.IntrinsicElements;
type __VLS_Element = import('vue/jsx-runtime').JSX.Element;
type __VLS_GlobalComponents = import('vue').GlobalComponents;
type __VLS_GlobalDirectives = import('vue').GlobalDirectives;
type __VLS_IsAny<T> = 0 extends 1 & T ? true : false;
type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
type __VLS_SpreadMerge<A, B> = Omit<A, keyof B> & B;
type __VLS_WithComponent<N0 extends string, LocalComponents, Self, N1 extends string, N2 extends string, N3 extends string> =
N1 extends keyof LocalComponents ? N1 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N1] } :
N2 extends keyof LocalComponents ? N2 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N2] } :
N3 extends keyof LocalComponents ? N3 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N3] } :
Self extends object ? { [K in N0]: Self } :
N1 extends keyof __VLS_GlobalComponents ? N1 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N1] } :
N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N2] } :
N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N3] } :
{ [K in N0]: unknown };
type __VLS_FunctionalComponentProps<T, K> =
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: { props?: infer P } } ? NonNullable<P> : never
: T extends (props: infer P, ...args: any) => any ? P :
{};
type __VLS_IsFunction<T, K> = K extends keyof T
? __VLS_IsAny<T[K]> extends false
? unknown extends T[K]
? false
: true
: false
: false;
type __VLS_NormalizeComponentEvent<Props, Events, onEvent extends keyof Props, Event extends keyof Events, CamelizedEvent extends keyof Events> = (
__VLS_IsFunction<Props, onEvent> extends true
? Props
: __VLS_IsFunction<Events, Event> extends true
? { [K in onEvent]?: Events[Event] }
: __VLS_IsFunction<Events, CamelizedEvent> extends true
? { [K in onEvent]?: Events[CamelizedEvent] }
: Props
) & Record<string, unknown>;
// fix https://github.com/vuejs/language-tools/issues/926
type __VLS_UnionToIntersection<U> = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never;
type __VLS_OverloadUnionInner<T, U = unknown> = U & T extends (...args: infer A) => infer R
? U extends T
? never
: __VLS_OverloadUnionInner<T, Pick<T, keyof T> & U & ((...args: A) => R)> | ((...args: A) => R)
: never;
type __VLS_OverloadUnion<T> = Exclude<
__VLS_OverloadUnionInner<(() => never) & T>,
T extends () => never ? never : () => never
>;
type __VLS_ConstructorOverloads<T> = __VLS_OverloadUnion<T> extends infer F
? F extends (event: infer E, ...args: infer A) => any
? { [K in E & string]: (...args: A) => void; }
: never
: never;
type __VLS_NormalizeEmits<T> = __VLS_PrettifyGlobal<
__VLS_UnionToIntersection<
__VLS_ConstructorOverloads<T> & {
[K in keyof T]: T[K] extends any[] ? { (...args: T[K]): void } : never
}
>
>;
type __VLS_PrettifyGlobal<T> = { [K in keyof T]: T[K]; } & {};
type __VLS_PickFunctionalComponentCtx<T, K> = NonNullable<__VLS_PickNotAny<
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: infer Ctx } ? Ctx : never : any
, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any
>>;
type __VLS_UseTemplateRef<T> = Readonly<import('vue').ShallowRef<T | null>>;
function __VLS_getVForSourceType<T extends number | string | any[] | Iterable<any>>(source: T): [
item: T extends number ? number
: T extends string ? string
: T extends any[] ? T[number]
: T extends Iterable<infer T1> ? T1
: any,
index: number,
][];
function __VLS_getVForSourceType<T>(source: T): [
item: T[keyof T],
key: keyof T,
index: number,
][];
// @ts-ignore
function __VLS_getSlotParams<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>;
// @ts-ignore
function __VLS_getSlotParam<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0];
function __VLS_asFunctionalDirective<T>(dir: T): T extends import('vue').ObjectDirective
? NonNullable<T['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>
: T extends (...args: any) => any
? T
: (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
function __VLS_makeOptional<T>(t: T): { [K in keyof T]?: T[K] };
function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K):
T extends new (...args: any) => any
? (props: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>, ctx?: any) => __VLS_Element & {
__ctx?: {
attrs?: any;
slots?: K extends { $slots: infer Slots } ? Slots : any;
emit?: K extends { $emit: infer Emit } ? Emit : any;
expose?(exposed: K): void;
props?: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>;
}
}
: T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
: T extends (...args: any) => any ? T
: (_: {} & Record<string, unknown>, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record<string, unknown> } };
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : [];
function __VLS_asFunctionalElement<T>(tag: T, endTag?: T): (attrs: T & Record<string, unknown>) => void;
function __VLS_asFunctionalSlot<S>(slot: S): S extends () => infer R ? (props: {}) => R : NonNullable<S>;
function __VLS_tryAsConstant<const T>(t: T): T;
}

131
web-app/node_modules/.vue-global-types/vue_99_0.d.ts generated vendored Normal file
View File

@@ -0,0 +1,131 @@
// @ts-nocheck
export {};
declare global {
var __VLS_PROPS_FALLBACK: Record<string, unknown>;
const __VLS_directiveBindingRestFields: { instance: null, oldValue: null, modifiers: any, dir: any };
const __VLS_placeholder: any;
const __VLS_intrinsics: import('vue/jsx-runtime').JSX.IntrinsicElements;
type __VLS_Elements = __VLS_SpreadMerge<SVGElementTagNameMap, HTMLElementTagNameMap>;
type __VLS_GlobalComponents = import('vue').GlobalComponents;
type __VLS_GlobalDirectives = import('vue').GlobalDirectives;
type __VLS_IsAny<T> = 0 extends 1 & T ? true : false;
type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
type __VLS_SpreadMerge<A, B> = Omit<A, keyof B> & B;
type __VLS_WithComponent<N0 extends string, LocalComponents, Self, N1 extends string, N2 extends string = N1, N3 extends string = N1> =
N1 extends keyof LocalComponents ? { [K in N0]: LocalComponents[N1] } :
N2 extends keyof LocalComponents ? { [K in N0]: LocalComponents[N2] } :
N3 extends keyof LocalComponents ? { [K in N0]: LocalComponents[N3] } :
Self extends object ? { [K in N0]: Self } :
N1 extends keyof __VLS_GlobalComponents ? { [K in N0]: __VLS_GlobalComponents[N1] } :
N2 extends keyof __VLS_GlobalComponents ? { [K in N0]: __VLS_GlobalComponents[N2] } :
N3 extends keyof __VLS_GlobalComponents ? { [K in N0]: __VLS_GlobalComponents[N3] } :
{};
type __VLS_FunctionalComponentCtx<T, K> = __VLS_PickNotAny<'__ctx' extends keyof __VLS_PickNotAny<K, {}>
? K extends { __ctx?: infer Ctx } ? NonNullable<Ctx> : never : any
, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any
>;
type __VLS_FunctionalComponentProps<T, K> = '__ctx' extends keyof __VLS_PickNotAny<K, {}>
? K extends { __ctx?: { props?: infer P } } ? NonNullable<P> : never
: T extends (props: infer P, ...args: any) => any ? P
: {};
type __VLS_FunctionalComponent<T> = (props: (T extends { $props: infer Props } ? Props : {}) & Record<string, unknown>, ctx?: any) => import('vue/jsx-runtime').JSX.Element & {
__ctx?: {
attrs?: any;
slots?: T extends { $slots: infer Slots } ? Slots : Record<string, any>;
emit?: T extends { $emit: infer Emit } ? Emit : {};
props?: typeof props;
expose?: (exposed: T) => void;
};
};
type __VLS_IsFunction<T, K> = K extends keyof T
? __VLS_IsAny<T[K]> extends false
? unknown extends T[K]
? false
: true
: false
: false;
type __VLS_NormalizeComponentEvent<
Props,
Emits,
onEvent extends keyof Props,
Event extends keyof Emits,
CamelizedEvent extends keyof Emits,
> = __VLS_IsFunction<Props, onEvent> extends true
? Props
: __VLS_IsFunction<Emits, Event> extends true
? { [K in onEvent]?: Emits[Event] }
: __VLS_IsFunction<Emits, CamelizedEvent> extends true
? { [K in onEvent]?: Emits[CamelizedEvent] }
: Props;
// fix https://github.com/vuejs/language-tools/issues/926
type __VLS_UnionToIntersection<U> = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never;
type __VLS_OverloadUnionInner<T, U = unknown> = U & T extends (...args: infer A) => infer R
? U extends T
? never
: __VLS_OverloadUnionInner<T, Pick<T, keyof T> & U & ((...args: A) => R)> | ((...args: A) => R)
: never;
type __VLS_OverloadUnion<T> = Exclude<
__VLS_OverloadUnionInner<(() => never) & T>,
T extends () => never ? never : () => never
>;
type __VLS_ConstructorOverloads<T> = __VLS_OverloadUnion<T> extends infer F
? F extends (event: infer E, ...args: infer A) => any
? { [K in E & string]: (...args: A) => void; }
: never
: never;
type __VLS_NormalizeEmits<T> = __VLS_PrettifyGlobal<
__VLS_UnionToIntersection<
__VLS_ConstructorOverloads<T> & {
[K in keyof T]: T[K] extends any[] ? { (...args: T[K]): void } : never
}
>
>;
type __VLS_EmitsToProps<T> = __VLS_PrettifyGlobal<{
[K in string & keyof T as `on${Capitalize<K>}`]?:
(...args: T[K] extends (...args: infer P) => any ? P : T[K] extends null ? any[] : never) => any;
}>;
type __VLS_ResolveEmits<
Comp,
Emits,
TypeEmits = Comp extends { __typeEmits?: infer T } ? unknown extends T ? {} : import('vue').ShortEmitsToObject<T> : {},
NormalizedEmits = __VLS_NormalizeEmits<Emits> extends infer E ? string extends keyof E ? {} : E : never,
> = __VLS_SpreadMerge<NormalizedEmits, TypeEmits>;
type __VLS_ResolveDirectives<T> = {
[K in keyof T & string as `v${Capitalize<K>}`]: T[K];
};
type __VLS_PrettifyGlobal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
type __VLS_UseTemplateRef<T> = Readonly<import('vue').ShallowRef<T | null>>;
type __VLS_ProxyRefs<T> = import('vue').ShallowUnwrapRef<T>;
function __VLS_getVForSourceType<T extends number | string | any[] | Iterable<any>>(source: T): [
item: T extends number ? number
: T extends string ? string
: T extends any[] ? T[number]
: T extends Iterable<infer T1> ? T1
: any,
index: number,
][];
function __VLS_getVForSourceType<T>(source: T): [
item: T[keyof T],
key: keyof T,
index: number,
][];
function __VLS_getSlotParameters<S, D extends S>(slot: S, decl?: D):
D extends (...args: infer P) => any ? P : any[];
function __VLS_asFunctionalDirective<T>(dir: T): T extends import('vue').ObjectDirective
? NonNullable<T['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>
: T extends (...args: any) => any
? T
: (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K):
T extends new (...args: any) => any ? __VLS_FunctionalComponent<K>
: T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
: T extends (...args: any) => any ? T
: __VLS_FunctionalComponent<{}>;
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : [];
function __VLS_asFunctionalElement<T>(tag: T, endTag?: T): (attrs: T & Record<string, unknown>) => void;
function __VLS_asFunctionalSlot<S>(slot: S): S extends () => infer R ? (props: {}) => R : NonNullable<S>;
function __VLS_tryAsConstant<const T>(t: T): T;
}

View File

@@ -0,0 +1,22 @@
MIT License
Copyright (c) 2014-present Sebastian McKenzie and other contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,19 @@
# @babel/helper-string-parser
> A utility package to parse strings
See our website [@babel/helper-string-parser](https://babeljs.io/docs/babel-helper-string-parser) for more information.
## Install
Using npm:
```sh
npm install --save @babel/helper-string-parser
```
or using yarn:
```sh
yarn add @babel/helper-string-parser
```

View File

@@ -0,0 +1,295 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.readCodePoint = readCodePoint;
exports.readInt = readInt;
exports.readStringContents = readStringContents;
var _isDigit = function isDigit(code) {
return code >= 48 && code <= 57;
};
const forbiddenNumericSeparatorSiblings = {
decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]),
hex: new Set([46, 88, 95, 120])
};
const isAllowedNumericSeparatorSibling = {
bin: ch => ch === 48 || ch === 49,
oct: ch => ch >= 48 && ch <= 55,
dec: ch => ch >= 48 && ch <= 57,
hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
};
function readStringContents(type, input, pos, lineStart, curLine, errors) {
const initialPos = pos;
const initialLineStart = lineStart;
const initialCurLine = curLine;
let out = "";
let firstInvalidLoc = null;
let chunkStart = pos;
const {
length
} = input;
for (;;) {
if (pos >= length) {
errors.unterminated(initialPos, initialLineStart, initialCurLine);
out += input.slice(chunkStart, pos);
break;
}
const ch = input.charCodeAt(pos);
if (isStringEnd(type, ch, input, pos)) {
out += input.slice(chunkStart, pos);
break;
}
if (ch === 92) {
out += input.slice(chunkStart, pos);
const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors);
if (res.ch === null && !firstInvalidLoc) {
firstInvalidLoc = {
pos,
lineStart,
curLine
};
} else {
out += res.ch;
}
({
pos,
lineStart,
curLine
} = res);
chunkStart = pos;
} else if (ch === 8232 || ch === 8233) {
++pos;
++curLine;
lineStart = pos;
} else if (ch === 10 || ch === 13) {
if (type === "template") {
out += input.slice(chunkStart, pos) + "\n";
++pos;
if (ch === 13 && input.charCodeAt(pos) === 10) {
++pos;
}
++curLine;
chunkStart = lineStart = pos;
} else {
errors.unterminated(initialPos, initialLineStart, initialCurLine);
}
} else {
++pos;
}
}
return {
pos,
str: out,
firstInvalidLoc,
lineStart,
curLine,
containsInvalid: !!firstInvalidLoc
};
}
function isStringEnd(type, ch, input, pos) {
if (type === "template") {
return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123;
}
return ch === (type === "double" ? 34 : 39);
}
function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) {
const throwOnInvalid = !inTemplate;
pos++;
const res = ch => ({
pos,
ch,
lineStart,
curLine
});
const ch = input.charCodeAt(pos++);
switch (ch) {
case 110:
return res("\n");
case 114:
return res("\r");
case 120:
{
let code;
({
code,
pos
} = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
return res(code === null ? null : String.fromCharCode(code));
}
case 117:
{
let code;
({
code,
pos
} = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors));
return res(code === null ? null : String.fromCodePoint(code));
}
case 116:
return res("\t");
case 98:
return res("\b");
case 118:
return res("\u000b");
case 102:
return res("\f");
case 13:
if (input.charCodeAt(pos) === 10) {
++pos;
}
case 10:
lineStart = pos;
++curLine;
case 8232:
case 8233:
return res("");
case 56:
case 57:
if (inTemplate) {
return res(null);
} else {
errors.strictNumericEscape(pos - 1, lineStart, curLine);
}
default:
if (ch >= 48 && ch <= 55) {
const startPos = pos - 1;
const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2));
let octalStr = match[0];
let octal = parseInt(octalStr, 8);
if (octal > 255) {
octalStr = octalStr.slice(0, -1);
octal = parseInt(octalStr, 8);
}
pos += octalStr.length - 1;
const next = input.charCodeAt(pos);
if (octalStr !== "0" || next === 56 || next === 57) {
if (inTemplate) {
return res(null);
} else {
errors.strictNumericEscape(startPos, lineStart, curLine);
}
}
return res(String.fromCharCode(octal));
}
return res(String.fromCharCode(ch));
}
}
function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
const initialPos = pos;
let n;
({
n,
pos
} = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
if (n === null) {
if (throwOnInvalid) {
errors.invalidEscapeSequence(initialPos, lineStart, curLine);
} else {
pos = initialPos - 1;
}
}
return {
code: n,
pos
};
}
function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
const start = pos;
const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin;
let invalid = false;
let total = 0;
for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
const code = input.charCodeAt(pos);
let val;
if (code === 95 && allowNumSeparator !== "bail") {
const prev = input.charCodeAt(pos - 1);
const next = input.charCodeAt(pos + 1);
if (!allowNumSeparator) {
if (bailOnError) return {
n: null,
pos
};
errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);
} else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) {
if (bailOnError) return {
n: null,
pos
};
errors.unexpectedNumericSeparator(pos, lineStart, curLine);
}
++pos;
continue;
}
if (code >= 97) {
val = code - 97 + 10;
} else if (code >= 65) {
val = code - 65 + 10;
} else if (_isDigit(code)) {
val = code - 48;
} else {
val = Infinity;
}
if (val >= radix) {
if (val <= 9 && bailOnError) {
return {
n: null,
pos
};
} else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) {
val = 0;
} else if (forceLen) {
val = 0;
invalid = true;
} else {
break;
}
}
++pos;
total = total * radix + val;
}
if (pos === start || len != null && pos - start !== len || invalid) {
return {
n: null,
pos
};
}
return {
n: total,
pos
};
}
function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
const ch = input.charCodeAt(pos);
let code;
if (ch === 123) {
++pos;
({
code,
pos
} = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
++pos;
if (code !== null && code > 0x10ffff) {
if (throwOnInvalid) {
errors.invalidCodePoint(pos, lineStart, curLine);
} else {
return {
code: null,
pos
};
}
}
} else {
({
code,
pos
} = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
}
return {
code,
pos
};
}
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,31 @@
{
"name": "@babel/helper-string-parser",
"version": "7.27.1",
"description": "A utility package to parse strings",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-helper-string-parser"
},
"homepage": "https://babel.dev/docs/en/next/babel-helper-string-parser",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"main": "./lib/index.js",
"devDependencies": {
"charcodes": "^0.2.0"
},
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)",
"exports": {
".": {
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
},
"./package.json": "./package.json"
},
"type": "commonjs"
}

View File

@@ -0,0 +1,22 @@
MIT License
Copyright (c) 2014-present Sebastian McKenzie and other contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,19 @@
# @babel/helper-validator-identifier
> Validate identifier/keywords name
See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/babel-helper-validator-identifier) for more information.
## Install
Using npm:
```sh
npm install --save @babel/helper-validator-identifier
```
or using yarn:
```sh
yarn add @babel/helper-validator-identifier
```

View File

@@ -0,0 +1,70 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isIdentifierChar = isIdentifierChar;
exports.isIdentifierName = isIdentifierName;
exports.isIdentifierStart = isIdentifierStart;
let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088f\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5c\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdc-\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c8a\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7dc\ua7f1-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
let nonASCIIidentifierChars = "\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0897-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1add\u1ae0-\u1aeb\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65";
const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489];
const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
function isInAstralSet(code, set) {
let pos = 0x10000;
for (let i = 0, length = set.length; i < length; i += 2) {
pos += set[i];
if (pos > code) return false;
pos += set[i + 1];
if (pos >= code) return true;
}
return false;
}
function isIdentifierStart(code) {
if (code < 65) return code === 36;
if (code <= 90) return true;
if (code < 97) return code === 95;
if (code <= 122) return true;
if (code <= 0xffff) {
return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
}
return isInAstralSet(code, astralIdentifierStartCodes);
}
function isIdentifierChar(code) {
if (code < 48) return code === 36;
if (code < 58) return true;
if (code < 65) return false;
if (code <= 90) return true;
if (code < 97) return code === 95;
if (code <= 122) return true;
if (code <= 0xffff) {
return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
}
return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
}
function isIdentifierName(name) {
let isFirst = true;
for (let i = 0; i < name.length; i++) {
let cp = name.charCodeAt(i);
if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {
const trail = name.charCodeAt(++i);
if ((trail & 0xfc00) === 0xdc00) {
cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);
}
}
if (isFirst) {
isFirst = false;
if (!isIdentifierStart(cp)) {
return false;
}
} else if (!isIdentifierChar(cp)) {
return false;
}
}
return !isFirst;
}
//# sourceMappingURL=identifier.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,57 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "isIdentifierChar", {
enumerable: true,
get: function () {
return _identifier.isIdentifierChar;
}
});
Object.defineProperty(exports, "isIdentifierName", {
enumerable: true,
get: function () {
return _identifier.isIdentifierName;
}
});
Object.defineProperty(exports, "isIdentifierStart", {
enumerable: true,
get: function () {
return _identifier.isIdentifierStart;
}
});
Object.defineProperty(exports, "isKeyword", {
enumerable: true,
get: function () {
return _keyword.isKeyword;
}
});
Object.defineProperty(exports, "isReservedWord", {
enumerable: true,
get: function () {
return _keyword.isReservedWord;
}
});
Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
enumerable: true,
get: function () {
return _keyword.isStrictBindOnlyReservedWord;
}
});
Object.defineProperty(exports, "isStrictBindReservedWord", {
enumerable: true,
get: function () {
return _keyword.isStrictBindReservedWord;
}
});
Object.defineProperty(exports, "isStrictReservedWord", {
enumerable: true,
get: function () {
return _keyword.isStrictReservedWord;
}
});
var _identifier = require("./identifier.js");
var _keyword = require("./keyword.js");
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["_identifier","require","_keyword"],"sources":["../src/index.ts"],"sourcesContent":["export {\n isIdentifierName,\n isIdentifierChar,\n isIdentifierStart,\n} from \"./identifier.ts\";\nexport {\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"./keyword.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA","ignoreList":[]}

View File

@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isKeyword = isKeyword;
exports.isReservedWord = isReservedWord;
exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
exports.isStrictBindReservedWord = isStrictBindReservedWord;
exports.isStrictReservedWord = isStrictReservedWord;
const reservedWords = {
keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
strictBind: ["eval", "arguments"]
};
const keywords = new Set(reservedWords.keyword);
const reservedWordsStrictSet = new Set(reservedWords.strict);
const reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
function isReservedWord(word, inModule) {
return inModule && word === "await" || word === "enum";
}
function isStrictReservedWord(word, inModule) {
return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
}
function isStrictBindOnlyReservedWord(word) {
return reservedWordsStrictBindSet.has(word);
}
function isStrictBindReservedWord(word, inModule) {
return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
}
function isKeyword(word) {
return keywords.has(word);
}
//# sourceMappingURL=keyword.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["reservedWords","keyword","strict","strictBind","keywords","Set","reservedWordsStrictSet","reservedWordsStrictBindSet","isReservedWord","word","inModule","isStrictReservedWord","has","isStrictBindOnlyReservedWord","isStrictBindReservedWord","isKeyword"],"sources":["../src/keyword.ts"],"sourcesContent":["const reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n"],"mappings":";;;;;;;;;;AAAA,MAAMA,aAAa,GAAG;EACpBC,OAAO,EAAE,CACP,OAAO,EACP,MAAM,EACN,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,IAAI,EACJ,MAAM,EACN,SAAS,EACT,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,QAAQ,CACT;EACDC,MAAM,EAAE,CACN,YAAY,EACZ,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,CACR;EACDC,UAAU,EAAE,CAAC,MAAM,EAAE,WAAW;AAClC,CAAC;AACD,MAAMC,QAAQ,GAAG,IAAIC,GAAG,CAACL,aAAa,CAACC,OAAO,CAAC;AAC/C,MAAMK,sBAAsB,GAAG,IAAID,GAAG,CAACL,aAAa,CAACE,MAAM,CAAC;AAC5D,MAAMK,0BAA0B,GAAG,IAAIF,GAAG,CAACL,aAAa,CAACG,UAAU,CAAC;AAK7D,SAASK,cAAcA,CAACC,IAAY,EAAEC,QAAiB,EAAW;EACvE,OAAQA,QAAQ,IAAID,IAAI,KAAK,OAAO,IAAKA,IAAI,KAAK,MAAM;AAC1D;AAOO,SAASE,oBAAoBA,CAACF,IAAY,EAAEC,QAAiB,EAAW;EAC7E,OAAOF,cAAc,CAACC,IAAI,EAAEC,QAAQ,CAAC,IAAIJ,sBAAsB,CAACM,GAAG,CAACH,IAAI,CAAC;AAC3E;AAMO,SAASI,4BAA4BA,CAACJ,IAAY,EAAW;EAClE,OAAOF,0BAA0B,CAACK,GAAG,CAACH,IAAI,CAAC;AAC7C;AAOO,SAASK,wBAAwBA,CACtCL,IAAY,EACZC,QAAiB,EACR;EACT,OACEC,oBAAoB,CAACF,IAAI,EAAEC,QAAQ,CAAC,IAAIG,4BAA4B,CAACJ,IAAI,CAAC;AAE9E;AAEO,SAASM,SAASA,CAACN,IAAY,EAAW;EAC/C,OAAOL,QAAQ,CAACQ,GAAG,CAACH,IAAI,CAAC;AAC3B","ignoreList":[]}

View File

@@ -0,0 +1,31 @@
{
"name": "@babel/helper-validator-identifier",
"version": "7.28.5",
"description": "Validate identifier/keywords name",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-helper-validator-identifier"
},
"license": "MIT",
"publishConfig": {
"access": "public"
},
"main": "./lib/index.js",
"exports": {
".": {
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
},
"./package.json": "./package.json"
},
"devDependencies": {
"@unicode/unicode-17.0.0": "^1.6.10",
"charcodes": "^0.2.0"
},
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)",
"type": "commonjs"
}

1073
web-app/node_modules/@babel/parser/CHANGELOG.md generated vendored Normal file

File diff suppressed because it is too large Load Diff

19
web-app/node_modules/@babel/parser/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,19 @@
Copyright (C) 2012-2014 by various contributors (see AUTHORS)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

19
web-app/node_modules/@babel/parser/README.md generated vendored Normal file
View File

@@ -0,0 +1,19 @@
# @babel/parser
> A JavaScript parser
See our website [@babel/parser](https://babeljs.io/docs/babel-parser) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20parser%22+is%3Aopen) associated with this package.
## Install
Using npm:
```sh
npm install --save-dev @babel/parser
```
or using yarn:
```sh
yarn add @babel/parser --dev
```

15
web-app/node_modules/@babel/parser/bin/babel-parser.js generated vendored Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env node
/* eslint-disable no-var, unicorn/prefer-node-protocol */
var parser = require("..");
var fs = require("fs");
var filename = process.argv[2];
if (!filename) {
console.error("no filename specified");
} else {
var file = fs.readFileSync(filename, "utf8");
var ast = parser.parse(file);
console.log(JSON.stringify(ast, null, " "));
}

14662
web-app/node_modules/@babel/parser/lib/index.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More