diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..927a86aaa99821cc9d49b8d568c7168c0352902c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,14 @@ +__pycache__ +*.pyc +*.pyo +.git +.gitignore +node_modules +.venv +*.egg-info +.ruff_cache +.pytest_cache +backend/tests +*.db +.env +README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..cbfb406f08686dde149b2d0cfd2af34e9710e584 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,53 @@ +# Multi-stage build: Node.js for frontend, Python for backend +# ── Stage 1: Build frontend ──────────────────────────────────────────────────── +FROM node:20-slim AS frontend-build + +WORKDIR /build +COPY frontend/package.json frontend/package-lock.json* ./ +RUN npm install +COPY frontend/ . +RUN npm run build + +# ── Stage 2: Python backend + built frontend ─────────────────────────────────── +FROM python:3.11-slim + +# Create non-root user (HuggingFace Spaces requirement) +RUN useradd -m -u 1000 appuser + +WORKDIR /app + +# Install system deps for weasyprint (optional PDF export) +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 \ + libffi-dev libcairo2 && \ + rm -rf /var/lib/apt/lists/* + +# Install Python dependencies +COPY backend/pyproject.toml backend/ +RUN pip install --no-cache-dir -e backend/ + +# Copy backend source +COPY backend/ backend/ + +# Copy built frontend into the location the backend expects +COPY --from=frontend-build /build/dist backend/frontend/dist + +# Adjust frontend dist path for Docker layout +# The main.py looks for ../../frontend/dist relative to app/main.py +# In Docker this becomes /app/backend/frontend/dist +# We symlink to make it discoverable +RUN ln -sf /app/backend/frontend /app/frontend + +# Create writable directories +RUN mkdir -p /app/data && chown -R appuser:appuser /app + +USER appuser + +# HuggingFace Spaces uses port 7860 +EXPOSE 7860 + +ENV PYTHONUNBUFFERED=1 +ENV HP_DATABASE_URL="sqlite+aiosqlite:///./data/holidaypilot.db" + +CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--app-dir", "/app/backend"] diff --git a/README.md b/README.md index 68e4897a41f8e894ef2793ff99a8d0cd1ee3eee2..62a4c9bc5fc04b419689953c999f576303590ca6 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,43 @@ --- -title: Agentic -emoji: 🏢 -colorFrom: red -colorTo: red +title: HolidayPilot +emoji: 🌍 +colorFrom: blue +colorTo: green sdk: docker +app_port: 7860 pinned: false --- -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference +# HolidayPilot - AI Multi-Agent Holiday Planner + +An intelligent holiday planner powered by 10 specialized AI agents that work together to create personalized travel itineraries using **real live data**. + +## Real APIs (No API Keys Required) + +- **Geocoding**: Nominatim (OpenStreetMap) +- **Weather**: Open-Meteo API (real forecasts + climate estimates) +- **Activities**: Overpass API (real POIs from OpenStreetMap) +- **Restaurants**: Overpass API (real restaurants, cafes, bars) +- **Hotels**: Overpass API + price estimation +- **Routing**: OSRM (real driving distances and durations) +- **Flights**: 75+ real airports with distance-based pricing + Google Flights booking links + +## Architecture + +10 agents coordinate through an orchestrator: +1. **Planner** - Conversational intake +2. **Flights** - Flight search +3. **Hotels** - Accommodation search +4. **Activities** - POI discovery +5. **Food** - Restaurant recommendations +6. **Weather** - Forecasts and clothing advice +7. **Route** - Geographic clustering +8. **Budget** - Cost optimization +9. **Calendar** - Itinerary assembly +10. **Monitoring** - Alerts and updates + +## Tech Stack + +- **Frontend**: React + Vite + TypeScript + Tailwind CSS +- **Backend**: FastAPI + Pydantic v2 + SQLAlchemy +- **Deployment**: Docker (HuggingFace Spaces) diff --git a/backend/.env b/backend/.env new file mode 100644 index 0000000000000000000000000000000000000000..53cc145e129cfa0eefabe168ca94525a82a595ae --- /dev/null +++ b/backend/.env @@ -0,0 +1,3 @@ +HP_DEBUG=false +HP_OPENAI_API_KEY= +HP_DATABASE_URL=sqlite+aiosqlite:///./holidaypilot.db diff --git a/backend/app/__init__.py b/backend/app/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/backend/app/agents/__init__.py b/backend/app/agents/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/backend/app/agents/activities.py b/backend/app/agents/activities.py new file mode 100644 index 0000000000000000000000000000000000000000..6bac1699da57bc811a1dcd012451ddf729327092 --- /dev/null +++ b/backend/app/agents/activities.py @@ -0,0 +1,29 @@ +"""Activities Agent — finds local attractions, tours, and events.""" +from __future__ import annotations + +from typing import Any + +from app.agents.base import BaseAgent +from app.models.schemas import AgentRole + + +class ActivitiesAgent(BaseAgent): + role = AgentRole.activities + goal = "Find activities, attractions, and events matching traveler interests" + tools = ["search_activities", "search_events"] + guardrails = ["Prefer activities matching stated interests", "Include weather-sensitive flags"] + + async def run(self, context: dict[str, Any]) -> dict[str, Any]: + from app.services.activities import ActivityService + + trip = context["trip"] + service = ActivityService() + activities = await service.search( + destination=trip.get("destination", ""), + interests=trip.get("interests", []), + mood=trip.get("mood", "relaxing"), + ) + return { + "activities": [a.model_dump() for a in activities], + "summary": f"Found {len(activities)} activities", + } diff --git a/backend/app/agents/base.py b/backend/app/agents/base.py new file mode 100644 index 0000000000000000000000000000000000000000..80b6ee07f220632d37b177ac4f18a6d680b00831 --- /dev/null +++ b/backend/app/agents/base.py @@ -0,0 +1,51 @@ +"""Base agent class — every specialized agent inherits from this.""" +from __future__ import annotations + +import time +from abc import ABC, abstractmethod +from typing import Any + +from app.core.logging import get_logger +from app.models.schemas import AgentRole, ReasoningStep + +logger = get_logger(__name__) + + +class BaseAgent(ABC): + """All agents share: role, goal, tool list, guardrails, and a run() method.""" + + role: AgentRole + goal: str + tools: list[str] + guardrails: list[str] + + @abstractmethod + async def run(self, context: dict[str, Any]) -> dict[str, Any]: + """Execute the agent's task and return results.""" + ... + + async def execute(self, context: dict[str, Any], trace_id: str = "") -> tuple[dict[str, Any], ReasoningStep]: + """Wrapper that adds logging, timing, and produces a ReasoningStep.""" + logger.info("agent.start", agent=self.role.value, trace_id=trace_id) + t0 = time.monotonic() + try: + result = await self.run(context) + elapsed = int((time.monotonic() - t0) * 1000) + step = ReasoningStep( + agent=self.role, + action=self.goal, + result_summary=result.get("summary", "done"), + duration_ms=elapsed, + ) + logger.info("agent.done", agent=self.role.value, elapsed_ms=elapsed, trace_id=trace_id) + return result, step + except Exception as exc: + elapsed = int((time.monotonic() - t0) * 1000) + logger.error("agent.error", agent=self.role.value, error=str(exc), trace_id=trace_id) + step = ReasoningStep( + agent=self.role, + action=self.goal, + result_summary=f"Error: {exc}", + duration_ms=elapsed, + ) + return {"error": str(exc), "summary": f"Error: {exc}"}, step diff --git a/backend/app/agents/budget.py b/backend/app/agents/budget.py new file mode 100644 index 0000000000000000000000000000000000000000..a224d1803b1b3bb26c7cbfcd369143c6e573ee36 --- /dev/null +++ b/backend/app/agents/budget.py @@ -0,0 +1,75 @@ +"""Budget Agent — scores options against budget, suggests trade-offs.""" +from __future__ import annotations + +from typing import Any + +from app.agents.base import BaseAgent +from app.models.schemas import AgentRole, BudgetBreakdown, BudgetCategory + + +class BudgetAgent(BaseAgent): + role = AgentRole.budget + goal = "Optimize plan for budget constraints and suggest trade-offs" + tools = ["calculate_budget", "suggest_savings"] + guardrails = ["Never exceed budget without warning", "Show category breakdown"] + + async def run(self, context: dict[str, Any]) -> dict[str, Any]: + trip = context["trip"] + gathered = context.get("gathered", {}) + total_budget = trip.get("budget_total", 0) or 5000 + + # Calculate costs per category + flights = gathered.get("flights", {}).get("flights", []) + hotels = gathered.get("hotels", {}).get("hotels", []) + activities = gathered.get("activities", {}).get("activities", []) + restaurants = gathered.get("food", {}).get("restaurants", []) + + cheapest_flight = min((f["price"] for f in flights), default=0) + cheapest_hotel = min((h["price_per_night"] for h in hotels), default=0) + + # Estimate number of nights + num_nights = 1 + if trip.get("start_date") and trip.get("end_date"): + from datetime import date as dt_date + try: + sd = dt_date.fromisoformat(str(trip["start_date"])) + ed = dt_date.fromisoformat(str(trip["end_date"])) + num_nights = max((ed - sd).days, 1) + except (ValueError, TypeError): + pass + + hotel_total = cheapest_hotel * num_nights + activity_total = sum(a.get("price", 0) for a in activities[:num_nights * 2]) + food_daily = 60 # estimate per person per day + food_total = food_daily * num_nights * max(len(trip.get("travelers", [])), 1) + transport_est = 30 * num_nights + + total_estimated = cheapest_flight + hotel_total + activity_total + food_total + transport_est + + categories = [ + BudgetCategory(category="Flights", allocated=cheapest_flight, spent=0, items=["Round trip"]), + BudgetCategory(category="Accommodation", allocated=hotel_total, spent=0, items=[f"{num_nights} nights"]), + BudgetCategory(category="Activities", allocated=activity_total, spent=0), + BudgetCategory(category="Food", allocated=food_total, spent=0), + BudgetCategory(category="Transport", allocated=transport_est, spent=0), + ] + + savings = [] + if total_estimated > total_budget: + savings.append("Consider budget hotels or hostels") + savings.append("Look for free walking tours and parks") + savings.append("Cook some meals instead of eating out") + + breakdown = BudgetBreakdown( + total_budget=total_budget, + total_estimated=total_estimated, + currency=trip.get("budget_currency", "USD"), + categories=categories, + within_budget=total_estimated <= total_budget, + savings_tips=savings, + ) + + return { + "breakdown": breakdown.model_dump(), + "summary": f"Estimated ${total_estimated:,.0f} of ${total_budget:,.0f} budget", + } diff --git a/backend/app/agents/calendar.py b/backend/app/agents/calendar.py new file mode 100644 index 0000000000000000000000000000000000000000..013d13990f704761752ba8b50b3293604758662e --- /dev/null +++ b/backend/app/agents/calendar.py @@ -0,0 +1,264 @@ +"""Calendar Agent — builds day-by-day itinerary from gathered data.""" +from __future__ import annotations + +import uuid +from datetime import date as dt_date, time as dt_time +from typing import Any + +from app.agents.base import BaseAgent +from app.models.schemas import AgentRole, DayPlan, Itinerary, ItineraryItem, WeatherForecast + + +class CalendarAgent(BaseAgent): + role = AgentRole.calendar + goal = "Build a day-by-day itinerary schedule from gathered options" + tools = ["build_schedule", "export_ical"] + guardrails = ["Respect weather warnings", "Include buffer time between activities"] + + async def run(self, context: dict[str, Any]) -> dict[str, Any]: + trip = context["trip"] + gathered = context.get("gathered", {}) + budget_data = context.get("budget", {}) + route_data = context.get("route", {}) + + flights = gathered.get("flights", {}).get("flights", []) + hotels = gathered.get("hotels", {}).get("hotels", []) + activities = gathered.get("activities", {}).get("activities", []) + restaurants = gathered.get("food", {}).get("restaurants", []) + forecasts = gathered.get("weather", {}).get("forecasts", []) + + # Determine date range + start = trip.get("start_date", "") + end = trip.get("end_date", "") + try: + start_date = dt_date.fromisoformat(str(start)) + end_date = dt_date.fromisoformat(str(end)) + except (ValueError, TypeError): + start_date = dt_date.today() + end_date = start_date + + num_days = max((end_date - start_date).days, 1) + + # Select best hotel + best_hotel = min(hotels, key=lambda h: h.get("price_per_night", 9999)) if hotels else None + + # Build forecast lookup + forecast_map: dict[str, dict] = {} + for f in forecasts: + forecast_map[str(f.get("date", ""))] = f + + days: list[DayPlan] = [] + activity_idx = 0 + restaurant_idx = 0 + total_cost = 0.0 + + for day_num in range(num_days): + from datetime import timedelta + current_date = start_date + timedelta(days=day_num) + weather = forecast_map.get(str(current_date)) + weather_obj = WeatherForecast(**weather) if weather else None + + items: list[ItineraryItem] = [] + day_cost = 0.0 + is_rainy = weather and weather.get("condition") in ("rainy", "stormy") + + # Day 1: add arrival flight + if day_num == 0 and flights: + best_flight = min(flights, key=lambda f: f["price"]) + items.append(ItineraryItem( + id=uuid.uuid4().hex[:8], + day=day_num + 1, + start_time=dt_time(8, 0), + end_time=dt_time(12, 0), + title=f"Flight: {best_flight.get('airline', 'Airline')}", + category="flight", + description=f"{best_flight.get('departure_airport', '')} → {best_flight.get('arrival_airport', '')}", + cost=best_flight.get("price", 0), + reasoning="Cheapest direct option for your dates", + )) + day_cost += best_flight.get("price", 0) + + # Hotel check-in on day 1 + if day_num == 0 and best_hotel: + items.append(ItineraryItem( + id=uuid.uuid4().hex[:8], + day=day_num + 1, + start_time=dt_time(14, 0), + end_time=dt_time(15, 0), + title=f"Check in: {best_hotel.get('name', 'Hotel')}", + category="hotel", + description=best_hotel.get("address", ""), + cost=best_hotel.get("price_per_night", 0) * num_days, + reasoning="Best value hotel with good reviews in your budget", + location=best_hotel.get("address", ""), + )) + day_cost += best_hotel.get("price_per_night", 0) + + # Morning activity + if activity_idx < len(activities): + act = activities[activity_idx] + # Skip weather-sensitive outdoor activities on rainy days + if is_rainy and act.get("weather_sensitive"): + # Find indoor alternative + backup_act = next( + (a for a in activities[activity_idx + 1:] if not a.get("weather_sensitive")), + act, + ) + weather_note = "Moved indoors due to expected rain" + else: + backup_act = None + weather_note = "" + + chosen = backup_act or act + backup_item = None + if backup_act and backup_act != act: + backup_item = ItineraryItem( + id=uuid.uuid4().hex[:8], + day=day_num + 1, + title=act.get("name", "Activity"), + category="activity", + description=act.get("description", ""), + cost=act.get("price", 0), + reasoning="Original plan if weather improves", + ) + + items.append(ItineraryItem( + id=uuid.uuid4().hex[:8], + day=day_num + 1, + start_time=dt_time(10, 0) if day_num > 0 else dt_time(15, 0), + end_time=dt_time(12, 0) if day_num > 0 else dt_time(17, 0), + title=chosen.get("name", "Activity"), + category="activity", + description=chosen.get("description", ""), + cost=chosen.get("price", 0), + location=chosen.get("address", ""), + reasoning=f"Matches your {trip.get('mood', 'relaxing')} mood and interests", + weather_note=weather_note, + backup=backup_item, + )) + day_cost += chosen.get("price", 0) + activity_idx += 1 + + # Lunch + if restaurant_idx < len(restaurants): + rest = restaurants[restaurant_idx] + items.append(ItineraryItem( + id=uuid.uuid4().hex[:8], + day=day_num + 1, + start_time=dt_time(12, 30) if day_num > 0 else dt_time(18, 0), + end_time=dt_time(13, 30) if day_num > 0 else dt_time(19, 0), + title=f"Lunch: {rest.get('name', 'Restaurant')}", + category="food", + description=f"{rest.get('cuisine', '')} cuisine", + cost=25.0, + location=rest.get("address", ""), + reasoning=f"Highly rated {rest.get('cuisine', 'local')} restaurant nearby", + )) + day_cost += 25.0 + restaurant_idx += 1 + + # Afternoon activity (from day 2) + if day_num > 0 and activity_idx < len(activities): + act = activities[activity_idx] + items.append(ItineraryItem( + id=uuid.uuid4().hex[:8], + day=day_num + 1, + start_time=dt_time(14, 30), + end_time=dt_time(16, 30), + title=act.get("name", "Activity"), + category="activity", + description=act.get("description", ""), + cost=act.get("price", 0), + location=act.get("address", ""), + reasoning="Complements your morning activity with a change of pace", + )) + day_cost += act.get("price", 0) + activity_idx += 1 + + # Dinner + if restaurant_idx < len(restaurants): + rest = restaurants[restaurant_idx] + items.append(ItineraryItem( + id=uuid.uuid4().hex[:8], + day=day_num + 1, + start_time=dt_time(19, 0), + end_time=dt_time(20, 30), + title=f"Dinner: {rest.get('name', 'Restaurant')}", + category="food", + description=f"{rest.get('cuisine', '')} cuisine", + cost=40.0, + location=rest.get("address", ""), + reasoning="Great dinner spot with atmosphere matching your trip mood", + )) + day_cost += 40.0 + restaurant_idx += 1 + + # Last day: departure flight + if day_num == num_days - 1 and flights: + items.append(ItineraryItem( + id=uuid.uuid4().hex[:8], + day=day_num + 1, + start_time=dt_time(18, 0), + end_time=dt_time(22, 0), + title="Return flight", + category="flight", + description="Head to airport for departure", + cost=0, + reasoning="Return flight included in outbound booking", + )) + + total_cost += day_cost + days.append(DayPlan( + day=day_num + 1, + date=current_date, + title=f"Day {day_num + 1}" + (" — Arrival" if day_num == 0 else ""), + items=items, + weather=weather_obj, + daily_spend=day_cost, + )) + + # Packing list and checklist + packing = self._generate_packing_list(trip, forecasts) + checklist = self._generate_checklist(trip) + + itinerary = Itinerary( + trip_id=trip.get("trip_id", ""), + days=days, + total_cost=total_cost, + currency=trip.get("budget_currency", "USD"), + flexibility_score=0.7, + travel_time_hours=2.0 * num_days, + packing_list=packing, + checklist=checklist, + ) + + return { + "itinerary": itinerary.model_dump(), + "summary": f"Built {num_days}-day itinerary, ${total_cost:,.0f} total", + } + + def _generate_packing_list(self, trip: dict, forecasts: list) -> list[str]: + items = ["Passport/ID", "Phone charger", "Travel adapter", "Comfortable walking shoes"] + has_rain = any(f.get("condition") in ("rainy", "stormy") for f in forecasts) + if has_rain: + items.extend(["Umbrella", "Rain jacket"]) + avg_temp = sum(f.get("high_temp_c", 20) for f in forecasts) / max(len(forecasts), 1) + if avg_temp < 15: + items.extend(["Warm jacket", "Layers"]) + elif avg_temp > 28: + items.extend(["Sunscreen", "Hat", "Light clothing"]) + if trip.get("mood") == "adventure": + items.extend(["Hiking boots", "Daypack"]) + return items + + def _generate_checklist(self, trip: dict) -> list[str]: + return [ + "Check passport validity", + "Verify travel insurance", + "Download offline maps", + "Notify bank of travel dates", + "Check visa requirements", + "Arrange airport transport", + "Confirm hotel booking", + "Pack essentials bag", + ] diff --git a/backend/app/agents/flights.py b/backend/app/agents/flights.py new file mode 100644 index 0000000000000000000000000000000000000000..27fe702e69021c922e4a5685fbe53a9d57187721 --- /dev/null +++ b/backend/app/agents/flights.py @@ -0,0 +1,30 @@ +"""Flights Agent — searches for flight options.""" +from __future__ import annotations + +from typing import Any + +from app.agents.base import BaseAgent +from app.models.schemas import AgentRole + + +class FlightsAgent(BaseAgent): + role = AgentRole.flights + goal = "Search and compare flight options for the trip" + tools = ["search_flights"] + guardrails = ["Never book without user approval", "Always show multiple options"] + + async def run(self, context: dict[str, Any]) -> dict[str, Any]: + from app.services.flights import FlightService + + trip = context["trip"] + service = FlightService() + flights = await service.search( + origin=trip.get("origin", ""), + destination=trip.get("destination", ""), + departure_date=trip.get("start_date", ""), + return_date=trip.get("end_date", ""), + ) + return { + "flights": [f.model_dump() for f in flights], + "summary": f"Found {len(flights)} flight options", + } diff --git a/backend/app/agents/food.py b/backend/app/agents/food.py new file mode 100644 index 0000000000000000000000000000000000000000..d8c8a813db65a6fa690aa3486fdd108a4e7c3d34 --- /dev/null +++ b/backend/app/agents/food.py @@ -0,0 +1,34 @@ +"""Food Agent — finds restaurants and dining options.""" +from __future__ import annotations + +from typing import Any + +from app.agents.base import BaseAgent +from app.models.schemas import AgentRole + + +class FoodAgent(BaseAgent): + role = AgentRole.food + goal = "Recommend restaurants and dining experiences" + tools = ["search_restaurants"] + guardrails = ["Respect dietary restrictions", "Vary cuisine types across days"] + + async def run(self, context: dict[str, Any]) -> dict[str, Any]: + from app.services.food import FoodService + + trip = context["trip"] + travelers = trip.get("travelers", []) + dietary = [] + for t in travelers: + dietary.extend(t.get("dietary_restrictions", [])) + + service = FoodService() + restaurants = await service.search( + destination=trip.get("destination", ""), + dietary_restrictions=dietary, + budget=trip.get("budget_total"), + ) + return { + "restaurants": [r.model_dump() for r in restaurants], + "summary": f"Found {len(restaurants)} restaurant options", + } diff --git a/backend/app/agents/hotels.py b/backend/app/agents/hotels.py new file mode 100644 index 0000000000000000000000000000000000000000..1888ae102fc09260f2aa1e0b55af3cc0fcb8da04 --- /dev/null +++ b/backend/app/agents/hotels.py @@ -0,0 +1,30 @@ +"""Hotels Agent — searches for accommodation options.""" +from __future__ import annotations + +from typing import Any + +from app.agents.base import BaseAgent +from app.models.schemas import AgentRole + + +class HotelsAgent(BaseAgent): + role = AgentRole.hotels + goal = "Search and compare hotel/accommodation options" + tools = ["search_hotels"] + guardrails = ["Never book without user approval", "Verify availability"] + + async def run(self, context: dict[str, Any]) -> dict[str, Any]: + from app.services.hotels import HotelService + + trip = context["trip"] + service = HotelService() + hotels = await service.search( + destination=trip.get("destination", ""), + check_in=trip.get("start_date", ""), + check_out=trip.get("end_date", ""), + budget=trip.get("budget_total"), + ) + return { + "hotels": [h.model_dump() for h in hotels], + "summary": f"Found {len(hotels)} hotel options", + } diff --git a/backend/app/agents/monitoring.py b/backend/app/agents/monitoring.py new file mode 100644 index 0000000000000000000000000000000000000000..d9f396a9279b783b20badd908651674ba1921fda --- /dev/null +++ b/backend/app/agents/monitoring.py @@ -0,0 +1,64 @@ +"""Monitoring/Replanning Agent — watches for disruptions and re-plans.""" +from __future__ import annotations + +import uuid +from datetime import datetime +from typing import Any + +from app.agents.base import BaseAgent +from app.models.schemas import AgentRole, AlertEvent, AlertSeverity + + +class MonitoringAgent(BaseAgent): + role = AgentRole.monitoring + goal = "Monitor for trip disruptions and suggest re-plans" + tools = ["check_flight_status", "check_weather_alerts", "check_price_changes"] + guardrails = ["Only alert on actionable changes", "Suggest alternatives, don't force changes"] + + async def run(self, context: dict[str, Any]) -> dict[str, Any]: + trip = context.get("trip", {}) + itinerary = context.get("itinerary", {}) + + alerts: list[dict] = [] + + # Check weather changes + weather_alerts = await self._check_weather(trip) + alerts.extend(weather_alerts) + + # Check flight status changes + flight_alerts = await self._check_flights(trip, itinerary) + alerts.extend(flight_alerts) + + return { + "alerts": alerts, + "summary": f"Generated {len(alerts)} alerts", + } + + async def _check_weather(self, trip: dict) -> list[dict]: + """Check for severe weather alerts at destination.""" + # In production, this would call a weather alert API + # For MVP, return empty or sample alerts + return [] + + async def _check_flights(self, trip: dict, itinerary: dict) -> list[dict]: + """Check for flight delays or cancellations.""" + # In production, this would check flight status APIs + return [] + + def create_alert( + self, + trip_id: str, + severity: AlertSeverity, + title: str, + description: str, + action: str = "", + ) -> AlertEvent: + return AlertEvent( + id=uuid.uuid4().hex[:8], + trip_id=trip_id, + severity=severity, + title=title, + description=description, + agent=self.role, + suggested_action=action, + ) diff --git a/backend/app/agents/orchestrator.py b/backend/app/agents/orchestrator.py new file mode 100644 index 0000000000000000000000000000000000000000..3b81af4b77a612fff6cc4ce7521c563b2d889aa7 --- /dev/null +++ b/backend/app/agents/orchestrator.py @@ -0,0 +1,159 @@ +"""Orchestrator — coordinates all agents and manages the planning workflow.""" +from __future__ import annotations + +import asyncio +from typing import Any + +from app.agents.base import BaseAgent +from app.core.logging import get_logger, new_trace_id +from app.models.schemas import ( + AgentRole, + ChatMessage, + Itinerary, + ReasoningStep, + TripRequest, +) + +logger = get_logger(__name__) + + +class Orchestrator: + """Central coordinator that delegates to specialized agents.""" + + def __init__(self) -> None: + self._agents: dict[AgentRole, BaseAgent] = {} + + def register(self, agent: BaseAgent) -> None: + self._agents[agent.role] = agent + + def get_agent(self, role: AgentRole) -> BaseAgent: + return self._agents[role] + + # ── Main planning flow ───────────────────────────────────────────────── + + async def handle_chat( + self, trip: TripRequest, user_message: str, history: list[ChatMessage] + ) -> tuple[str, TripRequest, list[ReasoningStep], dict | None, dict | None]: + """Process a user chat message: extract intent, maybe run planning. + + Returns (reply, updated_trip, steps, itinerary_data, budget_data). + """ + trace_id = new_trace_id() + logger.info("orchestrator.chat", trip_id=trip.trip_id, trace_id=trace_id) + + planner = self.get_agent(AgentRole.planner) + context = { + "trip": trip.model_dump(), + "user_message": user_message, + "history": [m.model_dump() for m in history[-20:]], + } + result, step = await planner.execute(context, trace_id) + steps = [step] + + reply = result.get("reply", "") + updated_trip_data = result.get("updated_trip", {}) + if updated_trip_data: + trip = TripRequest(**{**trip.model_dump(), **updated_trip_data}) + + itinerary_data = None + budget_data = None + + needs_planning = result.get("ready_to_plan", False) + if needs_planning: + plan_reply, plan_steps, itinerary_data, budget_data = await self.run_full_plan(trip, trace_id) + reply += "\n\n" + plan_reply + steps.extend(plan_steps) + + return reply, trip, steps, itinerary_data, budget_data + + async def run_full_plan( + self, trip: TripRequest, trace_id: str = "" + ) -> tuple[str, list[ReasoningStep], dict | None, dict | None]: + """Run the full multi-agent planning pipeline. + + Returns (summary_text, steps, itinerary_data, budget_data). + """ + trace_id = trace_id or new_trace_id() + logger.info("orchestrator.plan", trip_id=trip.trip_id, trace_id=trace_id) + + ctx = {"trip": trip.model_dump()} + steps: list[ReasoningStep] = [] + + # Phase 1: parallel data gathering + gather_roles = [ + AgentRole.flights, + AgentRole.hotels, + AgentRole.activities, + AgentRole.food, + AgentRole.weather, + ] + gather_tasks = [] + for role in gather_roles: + agent = self._agents.get(role) + if agent: + gather_tasks.append(agent.execute(ctx, trace_id)) + + results = await asyncio.gather(*gather_tasks, return_exceptions=True) + gathered: dict[str, Any] = {} + for role, res in zip(gather_roles, results): + if isinstance(res, Exception): + logger.error("gather.error", agent=role.value, error=str(res), trace_id=trace_id) + continue + data, step = res + gathered[role.value] = data + steps.append(step) + + ctx["gathered"] = gathered + + # Phase 2: sequential optimization + for role in [AgentRole.budget, AgentRole.route, AgentRole.calendar]: + agent = self._agents.get(role) + if agent: + result, step = await agent.execute(ctx, trace_id) + ctx[role.value] = result + steps.append(step) + + # Phase 3: extract structured data + itinerary_data = ctx.get("calendar", {}).get("itinerary") + budget_data = ctx.get("budget", {}).get("breakdown") + + # Phase 4: build itinerary summary + summary_parts = ["Here's your trip plan!\n"] + if itinerary_data: + for day in itinerary_data.get("days", []): + summary_parts.append(f"**Day {day['day']} — {day.get('title', day['date'])}**") + for item in day.get("items", []): + cost_str = f" (${item['cost']:.0f})" if item.get("cost") else "" + summary_parts.append(f" • {item.get('start_time', '')} {item['title']}{cost_str}") + if item.get("reasoning"): + summary_parts.append(f" _Why: {item['reasoning']}_") + summary_parts.append("") + + if budget_data: + summary_parts.append(f"**Estimated total: ${budget_data.get('total_estimated', 0):,.0f} {budget_data.get('currency', 'USD')}**") + if not budget_data.get("within_budget", True): + summary_parts.append("⚠️ This exceeds your budget. See savings tips below.") + + return "\n".join(summary_parts), steps, itinerary_data, budget_data + + async def regenerate_day( + self, trip: TripRequest, itinerary: Itinerary, day_num: int + ) -> tuple[Itinerary, list[ReasoningStep]]: + """Re-plan a specific day only.""" + trace_id = new_trace_id() + ctx = { + "trip": trip.model_dump(), + "itinerary": itinerary.model_dump(), + "regenerate_day": day_num, + } + steps: list[ReasoningStep] = [] + + for role in [AgentRole.activities, AgentRole.food, AgentRole.route, AgentRole.calendar]: + agent = self._agents.get(role) + if agent: + result, step = await agent.execute(ctx, trace_id) + ctx[role.value] = result + steps.append(step) + + new_itinerary_data = ctx.get("calendar", {}).get("itinerary", itinerary.model_dump()) + return Itinerary(**new_itinerary_data), steps diff --git a/backend/app/agents/planner.py b/backend/app/agents/planner.py new file mode 100644 index 0000000000000000000000000000000000000000..f9049a238539615e33acee362e1048d0c0e8d122 --- /dev/null +++ b/backend/app/agents/planner.py @@ -0,0 +1,114 @@ +"""Planner Agent — conversational intake, clarification, trip extraction.""" +from __future__ import annotations + +import json +from typing import Any + +from app.agents.base import BaseAgent +from app.models.schemas import AgentRole + + +class PlannerAgent(BaseAgent): + role = AgentRole.planner + goal = "Collect trip requirements conversationally and determine readiness to plan" + tools = ["extract_trip_info", "ask_clarification"] + guardrails = ["Never fabricate destinations", "Ask if key info is missing"] + + async def run(self, context: dict[str, Any]) -> dict[str, Any]: + trip = context.get("trip", {}) + user_message = context.get("user_message", "") + history = context.get("history", []) + + # Extract trip fields from the user message + updated_trip = self._extract_fields(user_message, trip) + + # Check completeness + missing = self._check_missing(updated_trip) + ready = len(missing) == 0 + + if ready: + reply = ( + f"Great! I have everything I need to plan your trip to **{updated_trip.get('destination', '')}** " + f"from {updated_trip.get('start_date', '?')} to {updated_trip.get('end_date', '?')}. " + f"Budget: ${updated_trip.get('budget_total', 0):,.0f}. " + f"Let me search for the best options now..." + ) + else: + prompts = { + "destination": "Where would you like to go?", + "start_date": "What are your travel dates? (start date)", + "end_date": "And your return date?", + "budget_total": "What's your approximate budget for the trip?", + "origin": "Where will you be traveling from?", + } + questions = [prompts.get(f, f"Could you tell me about {f}?") for f in missing[:2]] + reply = " ".join(questions) + + return { + "reply": reply, + "updated_trip": updated_trip, + "ready_to_plan": ready, + "missing_fields": missing, + "summary": f"{'Ready to plan' if ready else f'Missing: {missing}'}", + } + + def _extract_fields(self, message: str, trip: dict) -> dict: + """Simple keyword-based extraction (replaced by LLM in production).""" + updated = dict(trip) + msg = message.lower() + + # Detect mood + for mood in ["relaxing", "romantic", "adventure", "family", "workation", "cultural"]: + if mood in msg: + updated["mood"] = mood + + # Detect budget + import re + budget_match = re.search(r'\$\s*([\d,]+)', message) + if budget_match: + updated["budget_total"] = float(budget_match.group(1).replace(",", "")) + + # Detect dates (YYYY-MM-DD) + date_matches = re.findall(r'\d{4}-\d{2}-\d{2}', message) + if len(date_matches) >= 2: + updated["start_date"] = date_matches[0] + updated["end_date"] = date_matches[1] + elif len(date_matches) == 1: + if not updated.get("start_date"): + updated["start_date"] = date_matches[0] + else: + updated["end_date"] = date_matches[0] + + # Detect "from " first so we can exclude origin from destinations + from_match = re.search(r'from\s+([a-zA-Z\s]+?)(?:\s+to\s+|\s*$|,|\s+\d)', message, re.IGNORECASE) + if from_match: + origin_candidate = from_match.group(1).strip() + if len(origin_candidate) > 1: + updated["origin"] = origin_candidate.title() + + origin_lower = updated.get("origin", "").lower() + + # Detect common destinations (simple heuristic) + destinations = [ + "paris", "tokyo", "london", "rome", "barcelona", "new york", + "bali", "sydney", "dubai", "amsterdam", "lisbon", "bangkok", + "singapore", "hawaii", "maldives", "iceland", "morocco", + ] + # Try "to " pattern first + to_match = re.search(r'(?:to|visit|go to|trip to)\s+([a-zA-Z\s]+?)(?:\s+from\s+|\s*$|,|\s+\d)', message, re.IGNORECASE) + if to_match: + to_candidate = to_match.group(1).strip().lower() + for dest in destinations: + if dest in to_candidate and dest != origin_lower: + updated["destination"] = dest.title() + break + else: + for dest in destinations: + if dest in msg and dest != origin_lower: + updated["destination"] = dest.title() + + return updated + + def _check_missing(self, trip: dict) -> list[str]: + required = ["destination", "start_date", "end_date", "budget_total"] + return [f for f in required if not trip.get(f)] diff --git a/backend/app/agents/registry.py b/backend/app/agents/registry.py new file mode 100644 index 0000000000000000000000000000000000000000..66cc0e1ceec03fcb86ebc4fc5e7948b97c5c62d5 --- /dev/null +++ b/backend/app/agents/registry.py @@ -0,0 +1,29 @@ +"""Agent registry — creates and wires up all agents with the orchestrator.""" +from __future__ import annotations + +from app.agents.activities import ActivitiesAgent +from app.agents.budget import BudgetAgent +from app.agents.calendar import CalendarAgent +from app.agents.flights import FlightsAgent +from app.agents.food import FoodAgent +from app.agents.hotels import HotelsAgent +from app.agents.monitoring import MonitoringAgent +from app.agents.orchestrator import Orchestrator +from app.agents.planner import PlannerAgent +from app.agents.route import RouteAgent +from app.agents.weather import WeatherAgent + + +def create_orchestrator() -> Orchestrator: + orch = Orchestrator() + orch.register(PlannerAgent()) + orch.register(FlightsAgent()) + orch.register(HotelsAgent()) + orch.register(ActivitiesAgent()) + orch.register(FoodAgent()) + orch.register(RouteAgent()) + orch.register(WeatherAgent()) + orch.register(BudgetAgent()) + orch.register(CalendarAgent()) + orch.register(MonitoringAgent()) + return orch diff --git a/backend/app/agents/route.py b/backend/app/agents/route.py new file mode 100644 index 0000000000000000000000000000000000000000..aaf77d7c4507aaa33d67ae82aa79547c2f2bd6b8 --- /dev/null +++ b/backend/app/agents/route.py @@ -0,0 +1,43 @@ +"""Route/Maps Agent — optimizes routes between locations.""" +from __future__ import annotations + +from typing import Any + +from app.agents.base import BaseAgent +from app.models.schemas import AgentRole + + +class RouteAgent(BaseAgent): + role = AgentRole.route + goal = "Optimize routes and group activities by geography" + tools = ["get_route", "get_distance_matrix"] + guardrails = ["Minimize unnecessary travel", "Consider transit options"] + + async def run(self, context: dict[str, Any]) -> dict[str, Any]: + from app.services.maps import MapsService + + gathered = context.get("gathered", {}) + activities = gathered.get("activities", {}).get("activities", []) + restaurants = gathered.get("food", {}).get("restaurants", []) + + service = MapsService() + + # Get all locations with coordinates + locations = [] + for item in activities + restaurants: + if item.get("latitude") and item.get("longitude"): + locations.append({ + "name": item.get("name", ""), + "lat": item["latitude"], + "lng": item["longitude"], + "type": "activity" if item in activities else "food", + }) + + # Cluster by proximity for day grouping + clusters = service.cluster_locations(locations) + + return { + "clusters": clusters, + "total_locations": len(locations), + "summary": f"Grouped {len(locations)} locations into {len(clusters)} clusters", + } diff --git a/backend/app/agents/weather.py b/backend/app/agents/weather.py new file mode 100644 index 0000000000000000000000000000000000000000..77cad930148bf2c77d135aca54f76086191c5792 --- /dev/null +++ b/backend/app/agents/weather.py @@ -0,0 +1,29 @@ +"""Weather Agent — forecasts and weather-aware recommendations.""" +from __future__ import annotations + +from typing import Any + +from app.agents.base import BaseAgent +from app.models.schemas import AgentRole + + +class WeatherAgent(BaseAgent): + role = AgentRole.weather + goal = "Provide weather forecasts and suggest weather-safe timing" + tools = ["get_forecast"] + guardrails = ["Flag outdoor activities on rainy days", "Suggest indoor backups"] + + async def run(self, context: dict[str, Any]) -> dict[str, Any]: + from app.services.weather import WeatherService + + trip = context["trip"] + service = WeatherService() + forecasts = await service.get_forecast( + destination=trip.get("destination", ""), + start_date=trip.get("start_date", ""), + end_date=trip.get("end_date", ""), + ) + return { + "forecasts": [f.model_dump() for f in forecasts], + "summary": f"Got {len(forecasts)}-day forecast", + } diff --git a/backend/app/api/__init__.py b/backend/app/api/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/backend/app/api/routes.py b/backend/app/api/routes.py new file mode 100644 index 0000000000000000000000000000000000000000..15d2290dda92ac37e99fd64ee6225f8c80b81024 --- /dev/null +++ b/backend/app/api/routes.py @@ -0,0 +1,262 @@ +"""API routes for HolidayPilot.""" +from __future__ import annotations + +import uuid +from typing import Any + +from fastapi import APIRouter, HTTPException +from fastapi.responses import HTMLResponse, Response + +from app.agents.orchestrator import Orchestrator +from app.agents.registry import create_orchestrator +from app.models.schemas import ( + BudgetBreakdown, + ChatMessage, + ChatRequest, + ChatResponse, + Itinerary, + ReasoningStep, + TripRequest, + TripSummary, +) +from app.services.flights import FlightService +from app.services.hotels import HotelService +from app.services.activities import ActivityService +from app.services.food import FoodService +from app.services.weather import WeatherService +from app.services.pdf_export import generate_pdf, render_itinerary_html + +router = APIRouter() + +# In-memory store for MVP (replace with DB in production) +_trips: dict[str, dict[str, Any]] = {} +_chat_history: dict[str, list[ChatMessage]] = {} +_itineraries: dict[str, dict] = {} +_orchestrator: Orchestrator | None = None + + +def get_orchestrator() -> Orchestrator: + global _orchestrator + if _orchestrator is None: + _orchestrator = create_orchestrator() + return _orchestrator + + +# ── Chat ─────────────────────────────────────────────────────────────────────── + + +@router.post("/chat", response_model=ChatResponse) +async def chat(req: ChatRequest) -> ChatResponse: + """Main conversational endpoint. Handles intake and triggers planning.""" + orch = get_orchestrator() + + # Get or create trip + if req.trip_id not in _trips: + trip_id = req.trip_id or uuid.uuid4().hex[:12] + _trips[trip_id] = TripRequest(trip_id=trip_id).model_dump() + _chat_history[trip_id] = [] + req.trip_id = trip_id + + trip = TripRequest(**_trips[req.trip_id]) + history = _chat_history.get(req.trip_id, []) + + # Record user message + user_msg = ChatMessage(role="user", content=req.message) + history.append(user_msg) + + # Run orchestrator + reply, updated_trip, steps, itin_data, budget_data = await orch.handle_chat(trip, req.message, history) + + # Record assistant reply + assistant_msg = ChatMessage(role="assistant", content=reply) + history.append(assistant_msg) + + # Persist + _trips[req.trip_id] = updated_trip.model_dump() + _chat_history[req.trip_id] = history + + # Store itinerary if planning occurred + itinerary_obj = None + budget_obj = None + if itin_data: + _itineraries[req.trip_id] = itin_data + itinerary_obj = Itinerary(**itin_data) + if budget_data: + budget_obj = BudgetBreakdown(**budget_data) + + return ChatResponse( + trip_id=req.trip_id, + messages=[user_msg, assistant_msg], + trip_data=updated_trip, + reasoning_steps=steps, + itinerary=itinerary_obj, + budget=budget_obj, + ) + + +# ── Plan ─────────────────────────────────────────────────────────────────────── + + +@router.post("/plan") +async def plan(trip_req: TripRequest) -> dict: + """Directly trigger full planning pipeline.""" + orch = get_orchestrator() + trip_id = trip_req.trip_id or uuid.uuid4().hex[:12] + trip_req.trip_id = trip_id + _trips[trip_id] = trip_req.model_dump() + + reply, steps, itinerary_data, budget_data = await orch.run_full_plan(trip_req) + + if itinerary_data: + _itineraries[trip_id] = itinerary_data + + return { + "trip_id": trip_id, + "plan_summary": reply, + "itinerary": itinerary_data, + "budget": budget_data, + "reasoning_steps": [s.model_dump() for s in steps], + } + + +# ── Search endpoints ────────────────────────────────────────────────────────── + + +@router.get("/search/flights") +async def search_flights(origin: str, destination: str, departure: str, return_date: str = ""): + service = FlightService() + flights = await service.search(origin, destination, departure, return_date) + return {"flights": [f.model_dump() for f in flights]} + + +@router.get("/search/hotels") +async def search_hotels(destination: str, check_in: str, check_out: str, budget: float = 0): + service = HotelService() + hotels = await service.search(destination, check_in, check_out, budget or None) + return {"hotels": [h.model_dump() for h in hotels]} + + +@router.get("/search/activities") +async def search_activities(destination: str, mood: str = "relaxing"): + service = ActivityService() + activities = await service.search(destination, mood=mood) + return {"activities": [a.model_dump() for a in activities]} + + +@router.get("/search/weather") +async def search_weather(destination: str, start_date: str, end_date: str): + service = WeatherService() + forecasts = await service.get_forecast(destination, start_date, end_date) + return {"forecasts": [f.model_dump() for f in forecasts]} + + +# ── Optimize ─────────────────────────────────────────────────────────────────── + + +@router.post("/optimize") +async def optimize(trip_id: str, day: int | None = None) -> dict: + """Re-optimize the plan. If day is specified, regenerate only that day.""" + if trip_id not in _trips: + raise HTTPException(404, "Trip not found") + + trip = TripRequest(**_trips[trip_id]) + orch = get_orchestrator() + + if day and trip_id in _itineraries: + itinerary = Itinerary(**_itineraries[trip_id]) + new_itin, steps = await orch.regenerate_day(trip, itinerary, day) + _itineraries[trip_id] = new_itin.model_dump() + return {"itinerary": new_itin.model_dump(), "steps": [s.model_dump() for s in steps]} + + # Full re-plan + reply, steps, itin_data, budget_data = await orch.run_full_plan(trip) + if itin_data: + _itineraries[trip_id] = itin_data + return {"plan_summary": reply, "itinerary": itin_data, "budget": budget_data, "steps": [s.model_dump() for s in steps]} + + +# ── Calendar sync ────────────────────────────────────────────────────────────── + + +@router.post("/calendar/sync") +async def calendar_sync(trip_id: str) -> dict: + """Generate iCal data for the trip.""" + if trip_id not in _itineraries: + raise HTTPException(404, "Itinerary not found") + + itinerary = _itineraries[trip_id] + # Generate simple iCal representation + events = [] + for day in itinerary.get("days", []): + for item in day.get("items", []): + events.append({ + "summary": item["title"], + "date": day["date"], + "start_time": item.get("start_time"), + "end_time": item.get("end_time"), + "location": item.get("location", ""), + "description": item.get("description", ""), + }) + return {"trip_id": trip_id, "events": events, "event_count": len(events)} + + +# ── Export ───────────────────────────────────────────────────────────────────── + + +@router.get("/itinerary/export") +async def export_itinerary(trip_id: str, format: str = "html") -> Response: + """Export itinerary as PDF or HTML.""" + if trip_id not in _itineraries: + raise HTTPException(404, "Itinerary not found") + + itinerary = _itineraries[trip_id] + trip = _trips.get(trip_id, {}) + + if format == "pdf": + pdf_bytes = await generate_pdf(itinerary, trip) + return Response( + content=pdf_bytes, + media_type="application/pdf", + headers={"Content-Disposition": f"attachment; filename=itinerary_{trip_id}.pdf"}, + ) + + html = render_itinerary_html(itinerary, trip) + return HTMLResponse(content=html) + + +# ── Alerts ───────────────────────────────────────────────────────────────────── + + +@router.post("/alerts/subscribe") +async def subscribe_alerts(trip_id: str, email: str = "") -> dict: + """Subscribe to trip alerts.""" + return { + "trip_id": trip_id, + "subscribed": True, + "email": email, + "message": "You will receive alerts for flight changes, weather updates, and price drops.", + } + + +# ── Trip data ────────────────────────────────────────────────────────────────── + + +@router.get("/trip/{trip_id}") +async def get_trip(trip_id: str) -> dict: + if trip_id not in _trips: + raise HTTPException(404, "Trip not found") + return { + "trip": _trips[trip_id], + "itinerary": _itineraries.get(trip_id), + "chat_history": [m.model_dump() for m in _chat_history.get(trip_id, [])], + } + + +@router.get("/trips") +async def list_trips() -> dict: + return { + "trips": [ + {"trip_id": tid, "destination": t.get("destination", ""), "start_date": t.get("start_date", "")} + for tid, t in _trips.items() + ] + } diff --git a/backend/app/core/__init__.py b/backend/app/core/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/backend/app/core/config.py b/backend/app/core/config.py new file mode 100644 index 0000000000000000000000000000000000000000..1ad953daa13f63074bedbd4e2a1bd0cb55fb087d --- /dev/null +++ b/backend/app/core/config.py @@ -0,0 +1,26 @@ +from __future__ import annotations + +from pydantic_settings import BaseSettings + + +class Settings(BaseSettings): + app_name: str = "HolidayPilot" + debug: bool = False + database_url: str = "sqlite+aiosqlite:///./holidaypilot.db" + + openai_api_key: str = "" + openai_model: str = "gpt-4o" + + # External API keys (empty = use mock) + flights_api_key: str = "" + hotels_api_key: str = "" + maps_api_key: str = "" + weather_api_key: str = "" + events_api_key: str = "" + + cors_origins: list[str] = ["http://localhost:5173", "http://localhost:7860", "https://*.hf.space"] + + model_config = {"env_prefix": "HP_", "env_file": ".env"} + + +settings = Settings() diff --git a/backend/app/core/database.py b/backend/app/core/database.py new file mode 100644 index 0000000000000000000000000000000000000000..cfc7bcbef51a22bf7e2ae45bbefdadd6c07d00c5 --- /dev/null +++ b/backend/app/core/database.py @@ -0,0 +1,13 @@ +from __future__ import annotations + +from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine + +from app.core.config import settings + +engine = create_async_engine(settings.database_url, echo=settings.debug) +async_session = async_sessionmaker(engine, class_=AsyncSession, expire_on_commit=False) + + +async def get_db() -> AsyncSession: # type: ignore[misc] + async with async_session() as session: + yield session diff --git a/backend/app/core/logging.py b/backend/app/core/logging.py new file mode 100644 index 0000000000000000000000000000000000000000..a56009452a4f0e05a9740db75e02e2710411bc26 --- /dev/null +++ b/backend/app/core/logging.py @@ -0,0 +1,26 @@ +"""Structured logging with trace IDs for agent actions.""" +from __future__ import annotations + +import uuid + +import structlog + +structlog.configure( + processors=[ + structlog.contextvars.merge_contextvars, + structlog.processors.add_log_level, + structlog.processors.TimeStamper(fmt="iso"), + structlog.dev.ConsoleRenderer(), + ], + wrapper_class=structlog.make_filtering_bound_logger(0), + context_class=dict, + logger_factory=structlog.PrintLoggerFactory(), +) + + +def get_logger(name: str) -> structlog.stdlib.BoundLogger: + return structlog.get_logger(name) + + +def new_trace_id() -> str: + return uuid.uuid4().hex[:16] diff --git a/backend/app/main.py b/backend/app/main.py new file mode 100644 index 0000000000000000000000000000000000000000..591c64531a3c36b09210e340c39d6267cffd65bc --- /dev/null +++ b/backend/app/main.py @@ -0,0 +1,55 @@ +"""FastAPI application entry point.""" +from __future__ import annotations + +import os +from contextlib import asynccontextmanager +from pathlib import Path + +from fastapi import FastAPI +from fastapi.middleware.cors import CORSMiddleware +from fastapi.staticfiles import StaticFiles + +from app.api.routes import router +from app.core.config import settings +from app.core.database import engine +from app.models.orm import Base + + +@asynccontextmanager +async def lifespan(app: FastAPI): + async with engine.begin() as conn: + await conn.run_sync(Base.metadata.create_all) + yield + await engine.dispose() + + +app = FastAPI( + title=settings.app_name, + version="0.1.0", + description="AI-powered multi-agent holiday planner", + lifespan=lifespan, +) + +app.add_middleware( + CORSMiddleware, + allow_origins=settings.cors_origins, + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], +) + +app.include_router(router, prefix="/api") + + +@app.get("/health") +async def health(): + return {"status": "ok", "app": settings.app_name} + + +# Serve built frontend static files (for production / Docker deployment) +_backend_root = Path(__file__).resolve().parent.parent +_frontend_dist = _backend_root.parent / "frontend" / "dist" +if not _frontend_dist.is_dir(): + _frontend_dist = _backend_root / "frontend" / "dist" # Docker layout +if _frontend_dist.is_dir(): + app.mount("/", StaticFiles(directory=str(_frontend_dist), html=True), name="frontend") diff --git a/backend/app/models/__init__.py b/backend/app/models/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/backend/app/models/orm.py b/backend/app/models/orm.py new file mode 100644 index 0000000000000000000000000000000000000000..28803ee23c100281ebc3401097fe3308d2dad658 --- /dev/null +++ b/backend/app/models/orm.py @@ -0,0 +1,57 @@ +"""SQLAlchemy ORM models for persistence.""" +from __future__ import annotations + +import uuid +from datetime import datetime + +from sqlalchemy import JSON, Column, DateTime, Float, String, Text +from sqlalchemy.orm import DeclarativeBase + + +class Base(DeclarativeBase): + pass + + +def _uuid() -> str: + return uuid.uuid4().hex[:12] + + +class TripRow(Base): + __tablename__ = "trips" + + id = Column(String, primary_key=True, default=_uuid) + destination = Column(String, nullable=False, default="") + origin = Column(String, default="") + start_date = Column(String, default="") + end_date = Column(String, default="") + budget_total = Column(Float, default=0.0) + budget_currency = Column(String, default="USD") + mood = Column(String, default="relaxing") + travelers_json = Column(JSON, default=list) + interests_json = Column(JSON, default=list) + constraints_json = Column(JSON, default=list) + notes = Column(Text, default="") + itinerary_json = Column(JSON, default=dict) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow) + + +class ChatRow(Base): + __tablename__ = "chat_messages" + + id = Column(String, primary_key=True, default=_uuid) + trip_id = Column(String, nullable=False) + role = Column(String, nullable=False) + content = Column(Text, nullable=False) + agent = Column(String, nullable=True) + metadata_json = Column(JSON, default=dict) + created_at = Column(DateTime, default=datetime.utcnow) + + +class UserPreferenceRow(Base): + __tablename__ = "user_preferences" + + id = Column(String, primary_key=True, default=_uuid) + user_id = Column(String, nullable=False) + preferences_json = Column(JSON, default=dict) + updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow) diff --git a/backend/app/models/schemas.py b/backend/app/models/schemas.py new file mode 100644 index 0000000000000000000000000000000000000000..ead5768d93414f134f258466ea0fcf4bd055ac28 --- /dev/null +++ b/backend/app/models/schemas.py @@ -0,0 +1,282 @@ +"""Domain schemas for HolidayPilot.""" +from __future__ import annotations + +from datetime import date, datetime, time +from enum import Enum +from typing import Any + +from pydantic import BaseModel, Field + + +# ── Enums ────────────────────────────────────────────────────────────────────── + + +class TripMood(str, Enum): + relaxing = "relaxing" + romantic = "romantic" + adventure = "adventure" + family = "family" + workation = "workation" + cultural = "cultural" + + +class AgentRole(str, Enum): + planner = "planner" + flights = "flights" + hotels = "hotels" + activities = "activities" + food = "food" + route = "route" + weather = "weather" + budget = "budget" + calendar = "calendar" + monitoring = "monitoring" + + +class AlertSeverity(str, Enum): + info = "info" + warning = "warning" + critical = "critical" + + +# ── Traveler / Trip ─────────────────────────────────────────────────────────── + + +class TravelerProfile(BaseModel): + name: str + age: int | None = None + dietary_restrictions: list[str] = [] + accessibility_needs: list[str] = [] + interests: list[str] = [] + + +class TripRequest(BaseModel): + trip_id: str = "" + destination: str = "" + origin: str = "" + start_date: date | None = None + end_date: date | None = None + budget_total: float | None = None + budget_currency: str = "USD" + travelers: list[TravelerProfile] = [] + mood: TripMood = TripMood.relaxing + interests: list[str] = [] + constraints: list[str] = [] + notes: str = "" + + +# ── Search results ───────────────────────────────────────────────────────────── + + +class FlightOption(BaseModel): + id: str + airline: str + departure_airport: str + arrival_airport: str + departure_time: datetime + arrival_time: datetime + price: float + currency: str = "USD" + stops: int = 0 + duration_minutes: int = 0 + booking_url: str = "" + + +class HotelOption(BaseModel): + id: str + name: str + address: str + rating: float = 0.0 + price_per_night: float = 0.0 + currency: str = "USD" + amenities: list[str] = [] + booking_url: str = "" + latitude: float = 0.0 + longitude: float = 0.0 + + +class ActivityOption(BaseModel): + id: str + name: str + category: str = "" + description: str = "" + price: float = 0.0 + currency: str = "USD" + duration_minutes: int = 60 + rating: float = 0.0 + address: str = "" + latitude: float = 0.0 + longitude: float = 0.0 + booking_url: str = "" + weather_sensitive: bool = False + + +class RestaurantOption(BaseModel): + id: str + name: str + cuisine: str = "" + price_level: int = 2 # 1-4 + rating: float = 0.0 + address: str = "" + latitude: float = 0.0 + longitude: float = 0.0 + booking_url: str = "" + + +class WeatherForecast(BaseModel): + date: date + high_temp_c: float + low_temp_c: float + condition: str # sunny, cloudy, rainy, stormy + precipitation_pct: int = 0 + uv_index: int = 0 + wind_kph: float = 0.0 + recommendation: str = "" + + +class RouteSegment(BaseModel): + origin: str + destination: str + mode: str = "driving" # driving, walking, transit + distance_km: float = 0.0 + duration_minutes: int = 0 + + +# ── Itinerary ────────────────────────────────────────────────────────────────── + + +class ItineraryItem(BaseModel): + id: str + day: int + start_time: time | None = None + end_time: time | None = None + title: str + category: str # flight, hotel, activity, food, transport + description: str = "" + location: str = "" + latitude: float = 0.0 + longitude: float = 0.0 + cost: float = 0.0 + currency: str = "USD" + booking_url: str = "" + backup: ItineraryItem | None = None + reasoning: str = "" # "Why this plan" explanation + weather_note: str = "" + confirmed: bool = False + + +class DayPlan(BaseModel): + day: int + date: date + title: str = "" + items: list[ItineraryItem] = [] + weather: WeatherForecast | None = None + daily_spend: float = 0.0 + + +class Itinerary(BaseModel): + trip_id: str + days: list[DayPlan] = [] + total_cost: float = 0.0 + currency: str = "USD" + flexibility_score: float = 0.0 # 0-1 how flexible this plan is + travel_time_hours: float = 0.0 + packing_list: list[str] = [] + checklist: list[str] = [] + + +# ── Budget ───────────────────────────────────────────────────────────────────── + + +class BudgetCategory(BaseModel): + category: str + allocated: float + spent: float = 0.0 + items: list[str] = [] + + +class BudgetBreakdown(BaseModel): + total_budget: float + total_estimated: float + currency: str = "USD" + categories: list[BudgetCategory] = [] + within_budget: bool = True + savings_tips: list[str] = [] + + +# ── Recommendations ─────────────────────────────────────────────────────────── + + +class Recommendation(BaseModel): + id: str + category: str + title: str + description: str + reasoning: str # "Why this" explanation + score: float = 0.0 # 0-1 fit score + cost: float = 0.0 + currency: str = "USD" + alternatives: list[str] = [] + + +# ── Chat ─────────────────────────────────────────────────────────────────────── + + +class ChatMessage(BaseModel): + role: str # user, assistant, agent + content: str + agent: AgentRole | None = None + metadata: dict[str, Any] = {} + timestamp: datetime = Field(default_factory=datetime.utcnow) + + +class ChatRequest(BaseModel): + trip_id: str + message: str + context: dict[str, Any] = {} + + +class ChatResponse(BaseModel): + trip_id: str + messages: list[ChatMessage] + trip_data: TripRequest | None = None + reasoning_steps: list[ReasoningStep] = [] + itinerary: Itinerary | None = None + budget: BudgetBreakdown | None = None + + +class ReasoningStep(BaseModel): + agent: AgentRole + action: str + result_summary: str + duration_ms: int = 0 + + +# ── Alerts ───────────────────────────────────────────────────────────────────── + + +class AlertEvent(BaseModel): + id: str + trip_id: str + severity: AlertSeverity + title: str + description: str + agent: AgentRole + suggested_action: str = "" + created_at: datetime = Field(default_factory=datetime.utcnow) + + +# ── Trip Summary Card ───────────────────────────────────────────────────────── + + +class TripSummary(BaseModel): + trip_id: str + destination: str + dates: str + total_estimated_spend: float + currency: str = "USD" + total_travel_time_hours: float + flexibility_score: float + mood: TripMood + traveler_count: int + highlights: list[str] = [] diff --git a/backend/app/services/__init__.py b/backend/app/services/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/backend/app/services/activities.py b/backend/app/services/activities.py new file mode 100644 index 0000000000000000000000000000000000000000..59006b6967288a0e00f25f78d21cee7abf2e3445 --- /dev/null +++ b/backend/app/services/activities.py @@ -0,0 +1,132 @@ +"""Activities search using Overpass API (OpenStreetMap). Free, no API key.""" +from __future__ import annotations + +import hashlib + +import httpx + +from app.core.logging import get_logger +from app.models.schemas import ActivityOption +from app.services.geocoding import geocode + +logger = get_logger(__name__) + +OVERPASS_URL = "https://overpass-api.de/api/interpreter" +_HEADERS = {"User-Agent": "HolidayPilot/0.1.0 (ai-holiday-planner)"} + +_CATEGORY_MAP = { + "museum": "museum", "gallery": "museum", "artwork": "museum", + "attraction": "sightseeing", "viewpoint": "sightseeing", + "theme_park": "entertainment", "zoo": "entertainment", "aquarium": "entertainment", + "park": "nature", "garden": "nature", "nature_reserve": "nature", + "castle": "historic", "monument": "historic", "memorial": "historic", + "archaeological_site": "historic", "ruins": "historic", + "place_of_worship": "cultural", + "stadium": "sports", "sports_centre": "sports", + "beach": "nature", "marina": "nature", +} + +_WEATHER_SENSITIVE = {"nature", "sightseeing", "sports", "entertainment"} + + +class ActivityService: + async def search( + self, + destination: str, + interests: list[str] | None = None, + mood: str = "relaxing", + radius: int = 5000, + limit: int = 15, + ) -> list[ActivityOption]: + geo = await geocode(destination) + if not geo: + logger.warning("activities.no_geocode", destination=destination) + return [] + + query = f""" +[out:json][timeout:20]; +( + node["tourism"~"museum|gallery|attraction|viewpoint|artwork|zoo|theme_park|aquarium"](around:{radius},{geo.lat},{geo.lng}); + way["tourism"~"museum|gallery|attraction|viewpoint|artwork|zoo|theme_park|aquarium"](around:{radius},{geo.lat},{geo.lng}); + node["leisure"~"park|garden|nature_reserve|marina|beach|stadium|sports_centre"](around:{radius},{geo.lat},{geo.lng}); + way["leisure"~"park|garden|nature_reserve|marina|beach|stadium|sports_centre"](around:{radius},{geo.lat},{geo.lng}); + node["historic"](around:{radius},{geo.lat},{geo.lng}); + way["historic"](around:{radius},{geo.lat},{geo.lng}); +); +out center {limit * 3}; +""" + try: + async with httpx.AsyncClient(timeout=25, headers=_HEADERS) as client: + resp = await client.post(OVERPASS_URL, data={"data": query}) + resp.raise_for_status() + data = resp.json() + except Exception as exc: + logger.error("activities.api_error", error=str(exc)) + return [] + + elements = data.get("elements", []) + activities: list[ActivityOption] = [] + seen_names: set[str] = set() + + for el in elements: + tags = el.get("tags", {}) + name = tags.get("name") or tags.get("name:en") + if not name or name.lower() in seen_names: + continue + seen_names.add(name.lower()) + + lat = el.get("lat") or el.get("center", {}).get("lat", geo.lat) + lon = el.get("lon") or el.get("center", {}).get("lon", geo.lng) + + # Determine category + category = "sightseeing" + for tag_key in ("tourism", "leisure", "historic"): + tag_val = tags.get(tag_key, "") + if tag_val in _CATEGORY_MAP: + category = _CATEGORY_MAP[tag_val] + break + + # Estimate price (most attractions are free or cheap) + fee = tags.get("fee", "no") + if fee == "yes": + price = 15.0 # default admission estimate + charge = tags.get("charge") + if charge: + import re + m = re.search(r'[\d.]+', charge) + if m: + price = float(m.group()) + else: + price = 0.0 + + # Estimate duration from type + duration = {"museum": 120, "nature": 90, "historic": 60, "sightseeing": 60, + "entertainment": 150, "cultural": 45, "sports": 120}.get(category, 60) + + # Rating (OSM doesn't have ratings; use a reasonable default) + rating = 4.3 + + description = tags.get("description") or tags.get("description:en") or f"{category.capitalize()} in {destination}" + address = ", ".join(filter(None, [tags.get("addr:street"), tags.get("addr:city", destination)])) + + aid = hashlib.md5(name.encode()).hexdigest()[:8] + activities.append(ActivityOption( + id=f"AC-{aid}", + name=name, + category=category, + description=description[:200], + price=price, + duration_minutes=duration, + rating=rating, + address=address or destination, + latitude=float(lat), + longitude=float(lon), + booking_url=f"https://www.google.com/maps/search/{name.replace(' ', '+')}+{destination.replace(' ', '+')}", + weather_sensitive=category in _WEATHER_SENSITIVE, + )) + + if len(activities) >= limit: + break + + logger.info("activities.found", destination=destination, count=len(activities)) + return activities diff --git a/backend/app/services/flights.py b/backend/app/services/flights.py new file mode 100644 index 0000000000000000000000000000000000000000..7847bb7f8131df2178576b393e2a9ebcfa0494c8 --- /dev/null +++ b/backend/app/services/flights.py @@ -0,0 +1,245 @@ +"""Flight search with real airport data, distance-based pricing, and booking links.""" +from __future__ import annotations + +import math +import random +from datetime import datetime, timedelta + +from app.core.logging import get_logger +from app.models.schemas import FlightOption +from app.services.geocoding import geocode + +logger = get_logger(__name__) + +# Major airports worldwide: (IATA, city, country, lat, lng) +_AIRPORTS: list[tuple[str, str, str, float, float]] = [ + # North America + ("JFK", "New York", "US", 40.6413, -73.7781), + ("EWR", "Newark", "US", 40.6895, -74.1745), + ("LAX", "Los Angeles", "US", 33.9425, -118.4081), + ("SFO", "San Francisco", "US", 37.6213, -122.3790), + ("ORD", "Chicago", "US", 41.9742, -87.9073), + ("ATL", "Atlanta", "US", 33.6407, -84.4277), + ("MIA", "Miami", "US", 25.7959, -80.2870), + ("BOS", "Boston", "US", 42.3656, -71.0096), + ("DFW", "Dallas", "US", 32.8998, -97.0403), + ("SEA", "Seattle", "US", 47.4502, -122.3088), + ("DEN", "Denver", "US", 39.8561, -104.6737), + ("IAD", "Washington", "US", 38.9531, -77.4565), + ("YYZ", "Toronto", "CA", 43.6777, -79.6248), + ("YVR", "Vancouver", "CA", 49.1967, -123.1815), + ("MEX", "Mexico City", "MX", 19.4363, -99.0721), + ("GRU", "São Paulo", "BR", -23.4356, -46.4731), + ("EZE", "Buenos Aires", "AR", -34.8222, -58.5358), + ("BOG", "Bogotá", "CO", 4.7016, -74.1469), + ("SCL", "Santiago", "CL", -33.3930, -70.7858), + ("LIM", "Lima", "PE", -12.0219, -77.1143), + # Europe + ("LHR", "London", "GB", 51.4700, -0.4543), + ("CDG", "Paris", "FR", 49.0097, 2.5479), + ("AMS", "Amsterdam", "NL", 52.3105, 4.7683), + ("FRA", "Frankfurt", "DE", 50.0379, 8.5622), + ("MAD", "Madrid", "ES", 40.4983, -3.5676), + ("BCN", "Barcelona", "ES", 41.2971, 2.0785), + ("FCO", "Rome", "IT", 41.8003, 12.2389), + ("MXP", "Milan", "IT", 45.6306, 8.7281), + ("MUC", "Munich", "DE", 48.3537, 11.7750), + ("ZRH", "Zurich", "CH", 47.4647, 8.5492), + ("LIS", "Lisbon", "PT", 38.7742, -9.1342), + ("CPH", "Copenhagen", "DK", 55.6180, 12.6508), + ("DUB", "Dublin", "IE", 53.4264, -6.2499), + ("IST", "Istanbul", "TR", 41.2753, 28.7519), + ("ATH", "Athens", "GR", 37.9364, 23.9445), + ("VIE", "Vienna", "AT", 48.1103, 16.5697), + ("PRG", "Prague", "CZ", 50.1008, 14.2600), + ("WAW", "Warsaw", "PL", 52.1657, 20.9671), + ("OSL", "Oslo", "NO", 60.1939, 11.1004), + ("ARN", "Stockholm", "SE", 59.6519, 17.9186), + ("HEL", "Helsinki", "FI", 60.3172, 24.9633), + # Asia + ("NRT", "Tokyo", "JP", 35.7647, 140.3864), + ("HND", "Tokyo Haneda", "JP", 35.5494, 139.7798), + ("ICN", "Seoul", "KR", 37.4602, 126.4407), + ("PEK", "Beijing", "CN", 40.0799, 116.6031), + ("PVG", "Shanghai", "CN", 31.1443, 121.8083), + ("HKG", "Hong Kong", "HK", 22.3080, 113.9185), + ("SIN", "Singapore", "SG", 1.3644, 103.9915), + ("BKK", "Bangkok", "TH", 13.6900, 100.7501), + ("KUL", "Kuala Lumpur", "MY", 2.7456, 101.7099), + ("DEL", "New Delhi", "IN", 28.5562, 77.1000), + ("BOM", "Mumbai", "IN", 19.0896, 72.8656), + ("TPE", "Taipei", "TW", 25.0797, 121.2342), + ("MNL", "Manila", "PH", 14.5086, 121.0198), + ("SGN", "Ho Chi Minh City", "VN", 10.8188, 106.6520), + ("CGK", "Jakarta", "ID", -6.1256, 106.6559), + # Middle East + ("DXB", "Dubai", "AE", 25.2532, 55.3657), + ("DOH", "Doha", "QA", 25.2731, 51.6081), + ("AUH", "Abu Dhabi", "AE", 24.4330, 54.6511), + ("TLV", "Tel Aviv", "IL", 32.0055, 34.8854), + # Oceania + ("SYD", "Sydney", "AU", -33.9461, 151.1772), + ("MEL", "Melbourne", "AU", -37.6690, 144.8410), + ("AKL", "Auckland", "NZ", -37.0082, 174.7850), + ("DPS", "Bali", "ID", -8.7482, 115.1672), + # Africa + ("JNB", "Johannesburg", "ZA", -26.1392, 28.2460), + ("CAI", "Cairo", "EG", 30.1219, 31.4056), + ("NBO", "Nairobi", "KE", -1.3192, 36.9278), + ("CMN", "Casablanca", "MA", 33.3675, -7.5898), + ("CPT", "Cape Town", "ZA", -33.9648, 18.6017), + # Islands + ("MLE", "Maldives", "MV", 4.1918, 73.5290), + ("HNL", "Honolulu", "US", 21.3187, -157.9224), + ("KEF", "Reykjavik", "IS", 63.9850, -22.6056), + ("MRU", "Mauritius", "MU", -20.4302, 57.6836), +] + +_AIRLINES = [ + "American Airlines", "United Airlines", "Delta Air Lines", "Southwest", + "British Airways", "Lufthansa", "Air France", "KLM", "Ryanair", "easyJet", + "Emirates", "Qatar Airways", "Etihad Airways", "Turkish Airlines", + "Singapore Airlines", "Cathay Pacific", "ANA", "Japan Airlines", + "Korean Air", "Thai Airways", "Air Canada", "LATAM Airlines", + "Qantas", "Virgin Atlantic", "Iberia", "SAS", "Swiss", "Austrian", + "TAP Portugal", "Aer Lingus", "Norwegian", "Air New Zealand", +] + + +def _haversine(lat1: float, lng1: float, lat2: float, lng2: float) -> float: + R = 6371 + dlat = math.radians(lat2 - lat1) + dlng = math.radians(lng2 - lng1) + a = math.sin(dlat / 2) ** 2 + math.cos(math.radians(lat1)) * math.cos(math.radians(lat2)) * math.sin(dlng / 2) ** 2 + return R * 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a)) + + +def _find_nearest_airport(lat: float, lng: float) -> tuple[str, str, float, float]: + """Find nearest airport to given coordinates. Returns (code, city, lat, lng).""" + best = _AIRPORTS[0] + best_dist = float("inf") + for code, city, country, alat, alng in _AIRPORTS: + d = _haversine(lat, lng, alat, alng) + if d < best_dist: + best_dist = d + best = (code, city, country, alat, alng) + return best[0], best[1], best[3], best[4] + + +def _find_airport_by_city(city_name: str) -> tuple[str, str, float, float] | None: + """Find airport by city name (case-insensitive partial match).""" + city_lower = city_name.lower().strip() + for code, city, country, lat, lng in _AIRPORTS: + if city_lower in city.lower() or city.lower() in city_lower or city_lower == code.lower(): + return code, city, lat, lng + return None + + +def _estimate_price(distance_km: float, is_direct: bool = True) -> float: + """Realistic economy price estimation based on route distance.""" + if distance_km < 500: + rate = 0.28 + elif distance_km < 1500: + rate = 0.18 + elif distance_km < 5000: + rate = 0.11 + elif distance_km < 10000: + rate = 0.075 + else: + rate = 0.055 + + base = distance_km * rate + base = max(base, 45) + + if not is_direct: + base *= 0.72 + + variation = random.uniform(0.85, 1.20) + return round(base * variation, 2) + + +def _pick_airlines(origin_code: str, dest_code: str, n: int = 3) -> list[str]: + """Pick plausible airlines for a route.""" + random.seed(hash(f"{origin_code}-{dest_code}")) + picked = random.sample(_AIRLINES, min(n, len(_AIRLINES))) + random.seed() # re-seed + return picked + + +class FlightService: + async def search( + self, + origin: str, + destination: str, + departure_date: str, + return_date: str = "", + ) -> list[FlightOption]: + # Resolve origin airport + orig_airport = _find_airport_by_city(origin) + if not orig_airport: + geo = await geocode(origin) + if geo: + code, city, lat, lng = _find_nearest_airport(geo.lat, geo.lng) + orig_airport = (code, city, lat, lng) + else: + orig_airport = ("JFK", "New York", 40.6413, -73.7781) + + # Resolve destination airport + dest_airport = _find_airport_by_city(destination) + if not dest_airport: + geo = await geocode(destination) + if geo: + code, city, lat, lng = _find_nearest_airport(geo.lat, geo.lng) + dest_airport = (code, city, lat, lng) + else: + dest_airport = ("LHR", "London", 51.4700, -0.4543) + + orig_code, orig_city, orig_lat, orig_lng = orig_airport + dest_code, dest_city, dest_lat, dest_lng = dest_airport + + distance = _haversine(orig_lat, orig_lng, dest_lat, dest_lng) + flight_hours = distance / 800 # ~800 km/h average speed + airlines = _pick_airlines(orig_code, dest_code, 3) + + dep = departure_date or "2026-07-01" + try: + dep_date = datetime.fromisoformat(str(dep)) + except ValueError: + dep_date = datetime(2026, 7, 1) + + flights: list[FlightOption] = [] + + # Generate 3 realistic options + for i, airline in enumerate(airlines): + is_direct = i < 2 # first 2 are direct, last has a stop + price = _estimate_price(distance, is_direct) + stops = 0 if is_direct else 1 + + hours = flight_hours * (1.0 if is_direct else 1.5) + dep_hour = [8, 12, 18][i % 3] + dep_time = dep_date.replace(hour=dep_hour, minute=0) + arr_time = dep_time + timedelta(hours=hours) + duration = int(hours * 60) + + # Build Google Flights booking URL + booking_url = ( + f"https://www.google.com/travel/flights?q=Flights+from+{orig_city.replace(' ', '+')}+" + f"to+{dest_city.replace(' ', '+')}+on+{dep}" + ) + + flights.append(FlightOption( + id=f"FL-{orig_code}{dest_code}-{i+1}", + airline=airline, + departure_airport=orig_code, + arrival_airport=dest_code, + departure_time=dep_time, + arrival_time=arr_time, + price=price, + stops=stops, + duration_minutes=duration, + booking_url=booking_url, + )) + + flights.sort(key=lambda f: f.price) + logger.info("flights.generated", origin=orig_code, dest=dest_code, distance_km=round(distance), count=len(flights)) + return flights diff --git a/backend/app/services/food.py b/backend/app/services/food.py new file mode 100644 index 0000000000000000000000000000000000000000..13e5941c7375d784c02153b59b556e7a4f46f1bf --- /dev/null +++ b/backend/app/services/food.py @@ -0,0 +1,119 @@ +"""Restaurant search using Overpass API (OpenStreetMap). Free, no API key.""" +from __future__ import annotations + +import hashlib + +import httpx + +from app.core.logging import get_logger +from app.models.schemas import RestaurantOption +from app.services.geocoding import geocode + +logger = get_logger(__name__) + +OVERPASS_URL = "https://overpass-api.de/api/interpreter" +_HEADERS = {"User-Agent": "HolidayPilot/0.1.0 (ai-holiday-planner)"} + +_PRICE_LEVEL = { + "": 2, + "cheap": 1, + "moderate": 2, + "expensive": 3, + "luxury": 4, +} + + +class FoodService: + async def search( + self, + destination: str, + dietary_restrictions: list[str] | None = None, + budget: float | None = None, + radius: int = 3000, + limit: int = 12, + ) -> list[RestaurantOption]: + geo = await geocode(destination) + if not geo: + logger.warning("food.no_geocode", destination=destination) + return [] + + query = f""" +[out:json][timeout:20]; +( + node["amenity"="restaurant"](around:{radius},{geo.lat},{geo.lng}); + node["amenity"="cafe"](around:{radius},{geo.lat},{geo.lng}); + node["amenity"="fast_food"](around:{radius},{geo.lat},{geo.lng}); + node["amenity"="bar"]["food"="yes"](around:{radius},{geo.lat},{geo.lng}); +); +out body {limit * 3}; +""" + try: + async with httpx.AsyncClient(timeout=25, headers=_HEADERS) as client: + resp = await client.post(OVERPASS_URL, data={"data": query}) + resp.raise_for_status() + data = resp.json() + except Exception as exc: + logger.error("food.api_error", error=str(exc)) + return [] + + elements = data.get("elements", []) + restaurants: list[RestaurantOption] = [] + seen: set[str] = set() + + dietary = set(d.lower() for d in (dietary_restrictions or [])) + + for el in elements: + tags = el.get("tags", {}) + name = tags.get("name") or tags.get("name:en") + if not name or name.lower() in seen: + continue + seen.add(name.lower()) + + # Filter by dietary needs if specified + if dietary: + diet_tags = { + tags.get("diet:vegetarian", ""), + tags.get("diet:vegan", ""), + tags.get("diet:gluten_free", ""), + tags.get("diet:halal", ""), + tags.get("diet:kosher", ""), + } + # Skip items that explicitly say "no" for requested diets + skip = False + for d in dietary: + tag_key = f"diet:{d}" + if tags.get(tag_key) == "no": + skip = True + break + if skip: + continue + + cuisine = tags.get("cuisine", "").replace(";", ", ").replace("_", " ") + if not cuisine: + amenity = tags.get("amenity", "") + cuisine = {"cafe": "Café", "fast_food": "Fast food", "bar": "Bar"}.get(amenity, "Local") + + price_tag = tags.get("price", "") + price_level = _PRICE_LEVEL.get(price_tag, 2) + + address_parts = [tags.get("addr:housenumber", ""), tags.get("addr:street", "")] + address = " ".join(filter(None, address_parts)).strip() or destination + + rid = hashlib.md5(name.encode()).hexdigest()[:8] + restaurants.append(RestaurantOption( + id=f"RS-{rid}", + name=name, + cuisine=cuisine.title() if len(cuisine) < 50 else cuisine[:50].title(), + price_level=price_level, + rating=4.2, # OSM doesn't have ratings + address=address, + latitude=float(el.get("lat", geo.lat)), + longitude=float(el.get("lon", geo.lng)), + booking_url=f"https://www.google.com/maps/search/{name.replace(' ', '+')}+{destination.replace(' ', '+')}", + )) + + if len(restaurants) >= limit: + break + + logger.info("food.found", destination=destination, count=len(restaurants)) + return restaurants diff --git a/backend/app/services/geocoding.py b/backend/app/services/geocoding.py new file mode 100644 index 0000000000000000000000000000000000000000..2c20e6e4c58287a8cdef09cae4a0b28da05b097e --- /dev/null +++ b/backend/app/services/geocoding.py @@ -0,0 +1,56 @@ +"""Geocoding service using Nominatim (OpenStreetMap). Free, no API key needed.""" +from __future__ import annotations + +import httpx +from dataclasses import dataclass + +from app.core.logging import get_logger + +logger = get_logger(__name__) + +NOMINATIM_URL = "https://nominatim.openstreetmap.org/search" +HEADERS = {"User-Agent": "HolidayPilot/0.1.0 (ai-holiday-planner)"} + +_cache: dict[str, "GeoResult | None"] = {} + + +@dataclass +class GeoResult: + lat: float + lng: float + display_name: str + + +async def geocode(place: str) -> GeoResult | None: + """Convert a place name to coordinates. Results are cached.""" + key = place.strip().lower() + if key in _cache: + return _cache[key] + + try: + async with httpx.AsyncClient(timeout=10, headers=HEADERS) as client: + resp = await client.get( + NOMINATIM_URL, + params={"q": place, "format": "json", "limit": 1, "addressdetails": 0}, + ) + resp.raise_for_status() + data = resp.json() + + if not data: + logger.warning("geocode.not_found", place=place) + _cache[key] = None + return None + + result = GeoResult( + lat=float(data[0]["lat"]), + lng=float(data[0]["lon"]), + display_name=data[0].get("display_name", place), + ) + _cache[key] = result + logger.info("geocode.ok", place=place, lat=result.lat, lng=result.lng) + return result + + except Exception as exc: + logger.error("geocode.error", place=place, error=str(exc)) + _cache[key] = None + return None diff --git a/backend/app/services/hotels.py b/backend/app/services/hotels.py new file mode 100644 index 0000000000000000000000000000000000000000..0942261046f1b26c62002b1ee6cf05ff7b96f758 --- /dev/null +++ b/backend/app/services/hotels.py @@ -0,0 +1,133 @@ +"""Hotel search using Overpass API (OpenStreetMap) + price estimation. Free, no API key.""" +from __future__ import annotations + +import hashlib +import random + +import httpx + +from app.core.logging import get_logger +from app.models.schemas import HotelOption +from app.services.geocoding import geocode + +logger = get_logger(__name__) + +OVERPASS_URL = "https://overpass-api.de/api/interpreter" +_HEADERS = {"User-Agent": "HolidayPilot/0.1.0 (ai-holiday-planner)"} + +# Price estimation per night by type +_BASE_PRICES = { + "hostel": (25, 60), + "guest_house": (40, 90), + "motel": (50, 100), + "hotel": (80, 220), + "apartment": (60, 150), +} + + +class HotelService: + async def search( + self, + destination: str, + check_in: str = "", + check_out: str = "", + budget: float | None = None, + radius: int = 5000, + limit: int = 10, + ) -> list[HotelOption]: + geo = await geocode(destination) + if not geo: + logger.warning("hotels.no_geocode", destination=destination) + return [] + + query = f""" +[out:json][timeout:20]; +( + node["tourism"~"hotel|hostel|guest_house|motel|apartment"](around:{radius},{geo.lat},{geo.lng}); + way["tourism"~"hotel|hostel|guest_house|motel|apartment"](around:{radius},{geo.lat},{geo.lng}); +); +out center {limit * 3}; +""" + try: + async with httpx.AsyncClient(timeout=25, headers=_HEADERS) as client: + resp = await client.post(OVERPASS_URL, data={"data": query}) + resp.raise_for_status() + data = resp.json() + except Exception as exc: + logger.error("hotels.api_error", error=str(exc)) + return [] + + elements = data.get("elements", []) + hotels: list[HotelOption] = [] + seen: set[str] = set() + + for el in elements: + tags = el.get("tags", {}) + name = tags.get("name") or tags.get("name:en") + if not name or name.lower() in seen: + continue + seen.add(name.lower()) + + lat = el.get("lat") or el.get("center", {}).get("lat", geo.lat) + lon = el.get("lon") or el.get("center", {}).get("lon", geo.lng) + + tourism_type = tags.get("tourism", "hotel") + stars_str = tags.get("stars", "") + + # Estimate price + low, high = _BASE_PRICES.get(tourism_type, (80, 200)) + if stars_str: + try: + stars = int(stars_str) + low = max(low, stars * 30) + high = max(high, stars * 70) + except ValueError: + pass + price = round(random.uniform(low, high), 0) + + # Rating from stars, or estimate + if stars_str: + try: + rating = min(float(stars_str) + 0.3, 5.0) + except ValueError: + rating = 4.0 + else: + rating = {"hostel": 3.8, "guest_house": 4.0, "motel": 3.5, "hotel": 4.2}.get(tourism_type, 4.0) + + # Amenities from tags + amenities = ["Wi-Fi"] if tags.get("internet_access") != "no" else [] + if tags.get("swimming_pool") == "yes": + amenities.append("Pool") + if tags.get("breakfast") == "yes": + amenities.append("Breakfast") + if tags.get("air_conditioning") == "yes": + amenities.append("A/C") + if tags.get("parking") and tags.get("parking") != "no": + amenities.append("Parking") + if tourism_type == "hostel": + amenities.append("Shared kitchen") + + address_parts = [tags.get("addr:housenumber", ""), tags.get("addr:street", "")] + address = " ".join(filter(None, address_parts)).strip() or destination + + hid = hashlib.md5(name.encode()).hexdigest()[:8] + hotels.append(HotelOption( + id=f"HT-{hid}", + name=name, + address=address, + rating=rating, + price_per_night=price, + amenities=amenities if amenities else ["Wi-Fi"], + booking_url=f"https://www.google.com/travel/hotels/{destination.replace(' ', '+')}", + latitude=float(lat), + longitude=float(lon), + )) + + if len(hotels) >= limit: + break + + # Sort by price + hotels.sort(key=lambda h: h.price_per_night) + + logger.info("hotels.found", destination=destination, count=len(hotels)) + return hotels diff --git a/backend/app/services/maps.py b/backend/app/services/maps.py new file mode 100644 index 0000000000000000000000000000000000000000..475be337a57ed287b28cd2fe3d8cf3d4a9c91734 --- /dev/null +++ b/backend/app/services/maps.py @@ -0,0 +1,76 @@ +"""Maps/routing service using OSRM (Open Source Routing Machine). Free, no API key.""" +from __future__ import annotations + +import math + +import httpx + +from app.core.logging import get_logger + +logger = get_logger(__name__) + +OSRM_URL = "https://router.project-osrm.org" + + +class MapsService: + def cluster_locations(self, locations: list[dict], max_clusters: int = 4) -> list[list[dict]]: + """Simple geographic clustering by grid partitioning.""" + if not locations: + return [] + + if len(locations) <= max_clusters: + return [[loc] for loc in locations] + + lats = [loc["lat"] for loc in locations] + lngs = [loc["lng"] for loc in locations] + mid_lat = sum(lats) / len(lats) + mid_lng = sum(lngs) / len(lngs) + + quadrants: dict[str, list[dict]] = {"NE": [], "NW": [], "SE": [], "SW": []} + for loc in locations: + ns = "N" if loc["lat"] >= mid_lat else "S" + ew = "E" if loc["lng"] >= mid_lng else "W" + quadrants[ns + ew].append(loc) + + return [v for v in quadrants.values() if v] + + async def get_route( + self, origin_lat: float, origin_lng: float, dest_lat: float, dest_lng: float + ) -> dict: + """Get real driving route from OSRM.""" + url = ( + f"{OSRM_URL}/route/v1/driving/" + f"{origin_lng},{origin_lat};{dest_lng},{dest_lat}" + f"?overview=false" + ) + try: + async with httpx.AsyncClient(timeout=10) as client: + resp = await client.get(url) + resp.raise_for_status() + data = resp.json() + + if data.get("code") == "Ok" and data.get("routes"): + route = data["routes"][0] + return { + "distance_km": round(route["distance"] / 1000, 1), + "duration_minutes": int(route["duration"] / 60), + "mode": "driving", + } + except Exception as exc: + logger.warning("osrm.error", error=str(exc)) + + # Fallback to haversine estimate + dist = self._haversine(origin_lat, origin_lng, dest_lat, dest_lng) + return { + "distance_km": round(dist * 1.3, 1), # ~1.3x road factor + "duration_minutes": int(dist * 1.3 / 0.5), + "mode": "driving", + } + + @staticmethod + def _haversine(lat1: float, lng1: float, lat2: float, lng2: float) -> float: + R = 6371 + dlat = math.radians(lat2 - lat1) + dlng = math.radians(lng2 - lng1) + a = math.sin(dlat / 2) ** 2 + math.cos(math.radians(lat1)) * math.cos(math.radians(lat2)) * math.sin(dlng / 2) ** 2 + return R * 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a)) diff --git a/backend/app/services/pdf_export.py b/backend/app/services/pdf_export.py new file mode 100644 index 0000000000000000000000000000000000000000..b56694569b27c664a873aa959df41e2809eff240 --- /dev/null +++ b/backend/app/services/pdf_export.py @@ -0,0 +1,116 @@ +"""PDF export service for itinerary download.""" +from __future__ import annotations + +from datetime import datetime +from typing import Any + +from jinja2 import Template + +ITINERARY_HTML_TEMPLATE = """ + + + + + + + +

🌍 {{ destination }} Trip Itinerary

+

Dates: {{ start_date }} — {{ end_date }} | + Budget: {{ currency }} {{ "%.0f"|format(total_cost) }} | + Travelers: {{ traveler_count }}

+ +{% for day in days %} +
+
+

Day {{ day.day }} — {{ day.date }}{% if day.title %}: {{ day.title }}{% endif %}

+ {% if day.weather %} +
{{ day.weather.condition | capitalize }} · {{ day.weather.high_temp_c }}°C / {{ day.weather.low_temp_c }}°C · {{ day.weather.recommendation }}
+ {% endif %} +
+ {% for item in day.items %} +
+ {% if item.start_time %}{{ item.start_time }}{% endif %} + {{ item.title }} + {% if item.cost %}{{ currency }} {{ "%.0f"|format(item.cost) }}{% endif %} + {% if item.description %}
{{ item.description }}{% endif %} + {% if item.reasoning %}
Why: {{ item.reasoning }}{% endif %} +
+ {% endfor %} +

Daily spend: {{ currency }} {{ "%.0f"|format(day.daily_spend) }}

+
+{% endfor %} + +
+

Trip Summary

+

Total Estimated: {{ currency }} {{ "%.0f"|format(total_cost) }}

+

Flexibility Score: {{ "%.0f"|format(flexibility_score * 100) }}%

+
+ +{% if packing_list %} +

🎒 Packing List

+ +{% endif %} + +{% if checklist %} +

✅ Pre-Trip Checklist

+ +{% endif %} + +
Generated by HolidayPilot · {{ generated_at }}
+ + +""" + + +def render_itinerary_html(itinerary: dict, trip: dict) -> str: + template = Template(ITINERARY_HTML_TEMPLATE) + return template.render( + destination=trip.get("destination", "Your Trip"), + start_date=trip.get("start_date", ""), + end_date=trip.get("end_date", ""), + currency=itinerary.get("currency", "USD"), + total_cost=itinerary.get("total_cost", 0), + flexibility_score=itinerary.get("flexibility_score", 0), + traveler_count=len(trip.get("travelers", [])) or 1, + days=itinerary.get("days", []), + packing_list=itinerary.get("packing_list", []), + checklist=itinerary.get("checklist", []), + generated_at=datetime.utcnow().strftime("%Y-%m-%d %H:%M UTC"), + ) + + +async def generate_pdf(itinerary: dict, trip: dict) -> bytes: + """Generate PDF from itinerary. Falls back to HTML if WeasyPrint unavailable.""" + html = render_itinerary_html(itinerary, trip) + try: + from weasyprint import HTML + return HTML(string=html).write_pdf() + except ImportError: + return html.encode("utf-8") diff --git a/backend/app/services/weather.py b/backend/app/services/weather.py new file mode 100644 index 0000000000000000000000000000000000000000..77ab6e251a0baab7a03d9f02de410657ef25ac01 --- /dev/null +++ b/backend/app/services/weather.py @@ -0,0 +1,160 @@ +"""Weather forecast service using Open-Meteo API. Free, no API key needed.""" +from __future__ import annotations + +from datetime import date as dt_date, timedelta + +import httpx + +from app.core.logging import get_logger +from app.models.schemas import WeatherForecast +from app.services.geocoding import geocode + +logger = get_logger(__name__) + +OPEN_METEO_URL = "https://api.open-meteo.com/v1/forecast" + +# WMO weather code → human-readable condition +_WMO_CONDITIONS: dict[int, str] = { + 0: "sunny", 1: "partly_cloudy", 2: "partly_cloudy", 3: "cloudy", + 45: "foggy", 48: "foggy", + 51: "drizzle", 53: "drizzle", 55: "drizzle", + 56: "freezing_drizzle", 57: "freezing_drizzle", + 61: "rainy", 63: "rainy", 65: "rainy", + 66: "freezing_rain", 67: "freezing_rain", + 71: "snowy", 73: "snowy", 75: "snowy", 77: "snowy", + 80: "rainy", 81: "rainy", 82: "rainy", + 85: "snowy", 86: "snowy", + 95: "stormy", 96: "stormy", 99: "stormy", +} + + +def _recommend(condition: str, high_c: float, precip_pct: int) -> str: + if condition in ("stormy",): + return "Stay indoors. Severe weather expected." + if condition in ("rainy", "freezing_rain"): + return "Bring an umbrella. Consider indoor activities." + if condition in ("snowy", "freezing_drizzle"): + return "Cold and snowy — dress warmly, enjoy winter activities." + if condition == "foggy": + return "Reduced visibility. Stick to indoor plans or short walks." + if condition == "drizzle": + return "Light drizzle possible. A light raincoat should suffice." + if high_c > 33: + return "Very hot — stay hydrated, seek shade during midday." + if high_c > 28: + return "Warm day. Sunscreen and a hat recommended." + if high_c < 5: + return "Very cold — layer up and keep warm." + if precip_pct > 50: + return "Rain possible later. Have a backup indoor plan." + return "Great day for outdoor activities!" + + +class WeatherService: + async def get_forecast( + self, + destination: str, + start_date: str, + end_date: str, + ) -> list[WeatherForecast]: + geo = await geocode(destination) + if not geo: + logger.warning("weather.no_geocode", destination=destination) + return [] + + try: + start = dt_date.fromisoformat(str(start_date)) + end = dt_date.fromisoformat(str(end_date)) + except (ValueError, TypeError): + start = dt_date.today() + end = start + timedelta(days=3) + + # Open-Meteo only forecasts up to 16 days ahead; clamp if needed + today = dt_date.today() + max_end = today + timedelta(days=15) + api_start = max(start, today) + api_end = min(end, max_end) + + if api_start > api_end: + # Dates are too far in the future for forecast — use climate averages + return self._climate_estimate(start, end, geo.lat, geo.lng) + + try: + async with httpx.AsyncClient(timeout=15) as client: + resp = await client.get(OPEN_METEO_URL, params={ + "latitude": geo.lat, + "longitude": geo.lng, + "daily": "temperature_2m_max,temperature_2m_min,precipitation_probability_max,weather_code,uv_index_max,wind_speed_10m_max", + "timezone": "auto", + "start_date": str(api_start), + "end_date": str(api_end), + }) + resp.raise_for_status() + data = resp.json() + except Exception as exc: + logger.error("weather.api_error", error=str(exc)) + return self._climate_estimate(start, end, geo.lat, geo.lng) + + daily = data.get("daily", {}) + dates = daily.get("time", []) + highs = daily.get("temperature_2m_max", []) + lows = daily.get("temperature_2m_min", []) + precip = daily.get("precipitation_probability_max", []) + codes = daily.get("weather_code", []) + uv = daily.get("uv_index_max", []) + wind = daily.get("wind_speed_10m_max", []) + + forecasts: list[WeatherForecast] = [] + for i, d in enumerate(dates): + high_c = highs[i] if i < len(highs) else 20.0 + low_c = lows[i] if i < len(lows) else 12.0 + prec = int(precip[i]) if i < len(precip) and precip[i] is not None else 0 + code = codes[i] if i < len(codes) else 0 + condition = _WMO_CONDITIONS.get(code, "partly_cloudy") + + forecasts.append(WeatherForecast( + date=dt_date.fromisoformat(d), + high_temp_c=round(high_c, 1), + low_temp_c=round(low_c, 1), + condition=condition, + precipitation_pct=prec, + uv_index=int(uv[i]) if i < len(uv) and uv[i] is not None else 5, + wind_kph=round(wind[i], 1) if i < len(wind) and wind[i] is not None else 10.0, + recommendation=_recommend(condition, high_c, prec), + )) + + return forecasts + + def _climate_estimate( + self, start: dt_date, end: dt_date, lat: float, lng: float + ) -> list[WeatherForecast]: + """Rough climate-based estimate for dates too far in the future.""" + import math, random + num_days = max((end - start).days, 1) + month = start.month + + # Rough temperature based on latitude and month + # Northern hemisphere summer (Jun-Aug) is warmer, southern is opposite + base_temp = 25 - abs(lat) * 0.4 + seasonal = 8 * math.cos(math.radians((month - 7) * 30)) * (1 if lat >= 0 else -1) + avg_high = base_temp + seasonal + + forecasts = [] + for i in range(num_days): + current = start + timedelta(days=i) + high = round(avg_high + random.uniform(-3, 3), 1) + low = round(high - random.uniform(5, 10), 1) + precip = random.randint(10, 40) + condition = "partly_cloudy" if precip < 30 else "cloudy" + + forecasts.append(WeatherForecast( + date=current, + high_temp_c=high, + low_temp_c=low, + condition=condition, + precipitation_pct=precip, + uv_index=random.randint(3, 8), + wind_kph=round(random.uniform(5, 20), 1), + recommendation=_recommend(condition, high, precip) + " (Climate estimate — check closer to trip.)", + )) + return forecasts diff --git a/backend/holidaypilot.db b/backend/holidaypilot.db new file mode 100644 index 0000000000000000000000000000000000000000..b7d8d268e58c62550cf7e7d184c5ea1f91e30786 Binary files /dev/null and b/backend/holidaypilot.db differ diff --git a/backend/holidaypilot.egg-info/PKG-INFO b/backend/holidaypilot.egg-info/PKG-INFO new file mode 100644 index 0000000000000000000000000000000000000000..e9539fe6c3379f659eb07b6e0b85da9df950721a --- /dev/null +++ b/backend/holidaypilot.egg-info/PKG-INFO @@ -0,0 +1,24 @@ +Metadata-Version: 2.4 +Name: holidaypilot +Version: 0.1.0 +Summary: AI-powered multi-agent holiday planner +Requires-Python: >=3.11 +Requires-Dist: fastapi>=0.115.0 +Requires-Dist: uvicorn[standard]>=0.30.0 +Requires-Dist: pydantic>=2.0 +Requires-Dist: pydantic-settings>=2.0 +Requires-Dist: sqlalchemy>=2.0 +Requires-Dist: aiosqlite>=0.20.0 +Requires-Dist: httpx>=0.27.0 +Requires-Dist: openai>=1.30.0 +Requires-Dist: python-multipart>=0.0.9 +Requires-Dist: jinja2>=3.1.0 +Requires-Dist: weasyprint>=62.0 +Requires-Dist: icalendar>=5.0 +Requires-Dist: structlog>=24.0 +Requires-Dist: tenacity>=8.0 +Provides-Extra: dev +Requires-Dist: pytest>=8.0; extra == "dev" +Requires-Dist: pytest-asyncio>=0.23; extra == "dev" +Requires-Dist: pytest-httpx>=0.30; extra == "dev" +Requires-Dist: ruff>=0.5.0; extra == "dev" diff --git a/backend/holidaypilot.egg-info/SOURCES.txt b/backend/holidaypilot.egg-info/SOURCES.txt new file mode 100644 index 0000000000000000000000000000000000000000..28289308a4d0bca525959f73003c2629f9c540fe --- /dev/null +++ b/backend/holidaypilot.egg-info/SOURCES.txt @@ -0,0 +1,42 @@ +pyproject.toml +app/__init__.py +app/main.py +app/agents/__init__.py +app/agents/activities.py +app/agents/base.py +app/agents/budget.py +app/agents/calendar.py +app/agents/flights.py +app/agents/food.py +app/agents/hotels.py +app/agents/monitoring.py +app/agents/orchestrator.py +app/agents/planner.py +app/agents/registry.py +app/agents/route.py +app/agents/weather.py +app/api/__init__.py +app/api/routes.py +app/core/__init__.py +app/core/config.py +app/core/database.py +app/core/logging.py +app/models/__init__.py +app/models/orm.py +app/models/schemas.py +app/services/__init__.py +app/services/activities.py +app/services/flights.py +app/services/food.py +app/services/geocoding.py +app/services/hotels.py +app/services/maps.py +app/services/pdf_export.py +app/services/weather.py +holidaypilot.egg-info/PKG-INFO +holidaypilot.egg-info/SOURCES.txt +holidaypilot.egg-info/dependency_links.txt +holidaypilot.egg-info/requires.txt +holidaypilot.egg-info/top_level.txt +tests/test_agents.py +tests/test_api.py \ No newline at end of file diff --git a/backend/holidaypilot.egg-info/dependency_links.txt b/backend/holidaypilot.egg-info/dependency_links.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/backend/holidaypilot.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/backend/holidaypilot.egg-info/requires.txt b/backend/holidaypilot.egg-info/requires.txt new file mode 100644 index 0000000000000000000000000000000000000000..e65417bfdd47de038077d0b88a4efacb216ffa23 --- /dev/null +++ b/backend/holidaypilot.egg-info/requires.txt @@ -0,0 +1,20 @@ +fastapi>=0.115.0 +uvicorn[standard]>=0.30.0 +pydantic>=2.0 +pydantic-settings>=2.0 +sqlalchemy>=2.0 +aiosqlite>=0.20.0 +httpx>=0.27.0 +openai>=1.30.0 +python-multipart>=0.0.9 +jinja2>=3.1.0 +weasyprint>=62.0 +icalendar>=5.0 +structlog>=24.0 +tenacity>=8.0 + +[dev] +pytest>=8.0 +pytest-asyncio>=0.23 +pytest-httpx>=0.30 +ruff>=0.5.0 diff --git a/backend/holidaypilot.egg-info/top_level.txt b/backend/holidaypilot.egg-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..b80f0bd60822d4fa4893de455958ef32f6c521bf --- /dev/null +++ b/backend/holidaypilot.egg-info/top_level.txt @@ -0,0 +1 @@ +app diff --git a/backend/pyproject.toml b/backend/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..b62e3019d8e16c908dc23b44c4450ba2cd5f8bd0 --- /dev/null +++ b/backend/pyproject.toml @@ -0,0 +1,37 @@ +[project] +name = "holidaypilot" +version = "0.1.0" +description = "AI-powered multi-agent holiday planner" +requires-python = ">=3.11" +dependencies = [ + "fastapi>=0.115.0", + "uvicorn[standard]>=0.30.0", + "pydantic>=2.0", + "pydantic-settings>=2.0", + "sqlalchemy>=2.0", + "aiosqlite>=0.20.0", + "httpx>=0.27.0", + "openai>=1.30.0", + "python-multipart>=0.0.9", + "jinja2>=3.1.0", + "weasyprint>=62.0", + "icalendar>=5.0", + "structlog>=24.0", + "tenacity>=8.0", +] + +[project.optional-dependencies] +dev = [ + "pytest>=8.0", + "pytest-asyncio>=0.23", + "pytest-httpx>=0.30", + "ruff>=0.5.0", +] + +[tool.pytest.ini_options] +asyncio_mode = "auto" +testpaths = ["tests"] + +[tool.ruff] +target-version = "py311" +line-length = 100 diff --git a/backend/tests/__init__.py b/backend/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/backend/tests/test_agents.py b/backend/tests/test_agents.py new file mode 100644 index 0000000000000000000000000000000000000000..b0c565d5973f5078dd268b378bc49aab56f533b4 --- /dev/null +++ b/backend/tests/test_agents.py @@ -0,0 +1,144 @@ +"""Tests for the orchestrator and agent pipeline.""" +from __future__ import annotations + +import pytest + +from app.agents.planner import PlannerAgent +from app.agents.budget import BudgetAgent +from app.agents.calendar import CalendarAgent +from app.agents.flights import FlightsAgent +from app.agents.hotels import HotelsAgent +from app.agents.activities import ActivitiesAgent +from app.agents.food import FoodAgent +from app.agents.weather import WeatherAgent +from app.agents.route import RouteAgent +from app.agents.orchestrator import Orchestrator +from app.agents.registry import create_orchestrator +from app.models.schemas import AgentRole, TripRequest, ChatMessage + + +@pytest.mark.asyncio +async def test_planner_extracts_destination(): + agent = PlannerAgent() + ctx = { + "trip": {"trip_id": "t1", "destination": "", "budget_total": None}, + "user_message": "I want to visit Paris from New York, budget $3000", + "history": [], + } + result = await agent.run(ctx) + assert result["updated_trip"]["destination"] == "Paris" + assert result["updated_trip"]["budget_total"] == 3000.0 + assert "origin" in result["updated_trip"] + + +@pytest.mark.asyncio +async def test_planner_identifies_missing_fields(): + agent = PlannerAgent() + ctx = { + "trip": {"trip_id": "t1"}, + "user_message": "hello", + "history": [], + } + result = await agent.run(ctx) + assert result["ready_to_plan"] is False + assert len(result["missing_fields"]) > 0 + + +@pytest.mark.asyncio +async def test_planner_ready_when_complete(): + agent = PlannerAgent() + ctx = { + "trip": { + "trip_id": "t1", + "destination": "Paris", + "start_date": "2026-07-01", + "end_date": "2026-07-05", + "budget_total": 3000, + }, + "user_message": "looks good", + "history": [], + } + result = await agent.run(ctx) + assert result["ready_to_plan"] is True + + +@pytest.mark.asyncio +async def test_flights_agent_returns_results(): + agent = FlightsAgent() + ctx = {"trip": {"origin": "New York", "destination": "Paris", "start_date": "2026-07-01", "end_date": "2026-07-05"}} + result = await agent.run(ctx) + assert len(result["flights"]) >= 1 + + +@pytest.mark.asyncio +async def test_hotels_agent_returns_results(): + agent = HotelsAgent() + ctx = {"trip": {"destination": "Paris", "start_date": "2026-07-01", "end_date": "2026-07-05"}} + result = await agent.run(ctx) + assert len(result["hotels"]) >= 0 # depends on Overpass API availability + + +@pytest.mark.asyncio +async def test_budget_agent_calculates(): + agent = BudgetAgent() + ctx = { + "trip": {"budget_total": 3000, "budget_currency": "USD", "start_date": "2026-07-01", "end_date": "2026-07-05", "travelers": []}, + "gathered": { + "flights": {"flights": [{"price": 450}]}, + "hotels": {"hotels": [{"price_per_night": 100}]}, + "activities": {"activities": [{"price": 25}, {"price": 18}]}, + "food": {"restaurants": []}, + }, + } + result = await agent.run(ctx) + assert "breakdown" in result + assert result["breakdown"]["total_estimated"] > 0 + + +@pytest.mark.asyncio +async def test_calendar_builds_itinerary(): + agent = CalendarAgent() + ctx = { + "trip": {"trip_id": "t1", "destination": "Paris", "start_date": "2026-07-01", "end_date": "2026-07-04", "mood": "relaxing", "budget_currency": "USD", "travelers": []}, + "gathered": { + "flights": {"flights": [{"id": "f1", "airline": "Air", "departure_airport": "JFK", "arrival_airport": "CDG", "price": 400, "departure_time": "2026-07-01T08:00:00", "arrival_time": "2026-07-01T14:00:00"}]}, + "hotels": {"hotels": [{"id": "h1", "name": "Hotel Paris", "address": "1 Rue", "price_per_night": 120}]}, + "activities": {"activities": [ + {"id": "a1", "name": "Louvre", "description": "Museum", "price": 18, "weather_sensitive": False}, + {"id": "a2", "name": "Walk", "description": "Walk", "price": 0, "weather_sensitive": True}, + ]}, + "food": {"restaurants": [ + {"id": "r1", "name": "Cafe", "cuisine": "French"}, + {"id": "r2", "name": "Bistro", "cuisine": "French"}, + ]}, + "weather": {"forecasts": [ + {"date": "2026-07-01", "high_temp_c": 25, "low_temp_c": 18, "condition": "sunny", "precipitation_pct": 5, "recommendation": "Great day!"}, + {"date": "2026-07-02", "high_temp_c": 22, "low_temp_c": 16, "condition": "cloudy", "precipitation_pct": 30, "recommendation": "Pack a layer"}, + {"date": "2026-07-03", "high_temp_c": 20, "low_temp_c": 15, "condition": "rainy", "precipitation_pct": 80, "recommendation": "Bring umbrella"}, + ]}, + }, + "budget": {}, + "route": {}, + } + result = await agent.run(ctx) + assert "itinerary" in result + itin = result["itinerary"] + assert len(itin["days"]) == 3 + assert itin["total_cost"] > 0 + assert len(itin["packing_list"]) > 0 + + +@pytest.mark.asyncio +async def test_full_orchestration_chat(): + orch = create_orchestrator() + trip = TripRequest(trip_id="test1") + + # First message: provide all details + reply, updated_trip, steps, _itin, _budget = await orch.handle_chat( + trip, + "I want to go to Paris from New York, 2026-07-01 to 2026-07-05, budget $3000, relaxing mood", + [], + ) + assert updated_trip.destination == "Paris" + assert len(steps) >= 1 + assert len(reply) > 0 diff --git a/backend/tests/test_api.py b/backend/tests/test_api.py new file mode 100644 index 0000000000000000000000000000000000000000..985a52a5137730886ae69f30ab6333c478ea56c9 --- /dev/null +++ b/backend/tests/test_api.py @@ -0,0 +1,97 @@ +"""Tests for API endpoints.""" +from __future__ import annotations + +import pytest +from fastapi.testclient import TestClient + +from app.main import app + +client = TestClient(app) + + +def test_health(): + r = client.get("/health") + assert r.status_code == 200 + assert r.json()["status"] == "ok" + + +def test_chat_creates_trip(): + r = client.post("/api/chat", json={"trip_id": "", "message": "I want to visit Paris"}) + assert r.status_code == 200 + data = r.json() + assert data["trip_id"] + assert len(data["messages"]) >= 1 + assert data["trip_data"]["destination"] == "Paris" + + +def test_chat_full_flow(): + # Step 1: provide all details + r = client.post("/api/chat", json={ + "trip_id": "", + "message": "Trip to Tokyo from London, 2026-08-01 to 2026-08-05, budget $5000", + }) + assert r.status_code == 200 + data = r.json() + trip_id = data["trip_id"] + assert data["trip_data"]["destination"] == "Tokyo" + + # The planner should detect it's ready to plan (all fields present) + assert any("plan" in s.get("result_summary", "").lower() or "ready" in s.get("result_summary", "").lower() + for s in data.get("reasoning_steps", [])) + + +def test_search_flights(): + r = client.get("/api/search/flights?origin=NYC&destination=Paris&departure=2026-07-01") + assert r.status_code == 200 + assert len(r.json()["flights"]) >= 1 + + +def test_search_hotels(): + r = client.get("/api/search/hotels?destination=Paris&check_in=2026-07-01&check_out=2026-07-05") + assert r.status_code == 200 + assert len(r.json()["hotels"]) >= 0 # depends on Overpass API + + +def test_search_activities(): + r = client.get("/api/search/activities?destination=Paris") + assert r.status_code == 200 + assert len(r.json()["activities"]) >= 0 # depends on Overpass API + + +def test_search_weather(): + r = client.get("/api/search/weather?destination=Paris&start_date=2026-07-01&end_date=2026-07-05") + assert r.status_code == 200 + assert len(r.json()["forecasts"]) >= 1 + + +def test_plan_endpoint(): + r = client.post("/api/plan", json={ + "trip_id": "seed1", + "destination": "Paris", + "origin": "New York", + "start_date": "2026-07-01", + "end_date": "2026-07-04", + "budget_total": 3000, + "budget_currency": "USD", + "travelers": [{"name": "Alice", "interests": ["art", "food"]}], + "mood": "relaxing", + "interests": ["art", "food"], + "constraints": [], + "notes": "", + }) + assert r.status_code == 200 + data = r.json() + assert data["itinerary"] + assert data["budget"] + assert len(data["itinerary"]["days"]) >= 1 + + +def test_trips_list(): + r = client.get("/api/trips") + assert r.status_code == 200 + + +def test_alerts_subscribe(): + r = client.post("/api/alerts/subscribe?trip_id=t1&email=test@example.com") + assert r.status_code == 200 + assert r.json()["subscribed"] is True diff --git a/frontend/dist/assets/index-DDHK9Igv.css b/frontend/dist/assets/index-DDHK9Igv.css new file mode 100644 index 0000000000000000000000000000000000000000..8ee7c1a4c241931eff9d654eb69c2d2c81c5ee09 --- /dev/null +++ b/frontend/dist/assets/index-DDHK9Igv.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-6{margin-top:1.5rem}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-full{height:100%}.h-screen{height:100vh}.w-2{width:.5rem}.w-3{width:.75rem}.w-72{width:18rem}.w-full{width:100%}.min-w-0{min-width:0px}.flex-1{flex:1 1 0%}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(243 244 246 / var(--tw-divide-opacity, 1))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-primary-100{--tw-border-opacity: 1;border-color:rgb(219 234 254 / var(--tw-border-opacity, 1))}.border-primary-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-primary-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-primary-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-primary-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-primary-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.bg-purple-400{--tw-bg-opacity: 1;background-color:rgb(192 132 252 / var(--tw-bg-opacity, 1))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/20{background-color:#fff3}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity, 1))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-primary-50{--tw-gradient-from: #eff6ff var(--tw-gradient-from-position);--tw-gradient-to: rgb(239 246 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-accent-50{--tw-gradient-to: #f0fdf4 var(--tw-gradient-to-position)}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.tracking-wider{letter-spacing:.05em}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-primary-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-primary-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-primary-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-60{opacity:.6}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}body{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.chat-bubble-user{margin-left:auto;max-width:80%;border-radius:1rem 1rem .125rem;--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1));padding:.5rem 1rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.chat-bubble-assistant{max-width:80%;border-radius:1rem 1rem 1rem .125rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:.5rem 1rem;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-primary-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/30:hover{background-color:#ffffff4d}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.focus\:border-transparent:focus{border-color:transparent}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-primary-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width: 1024px){.lg\:block{display:block}.lg\:flex{display:flex}.lg\:w-\[420px\]{width:420px}} diff --git a/frontend/dist/assets/index-DuZYjYO3.js b/frontend/dist/assets/index-DuZYjYO3.js new file mode 100644 index 0000000000000000000000000000000000000000..28b038d90bc74a9681b0a56e237af9789f896bb1 --- /dev/null +++ b/frontend/dist/assets/index-DuZYjYO3.js @@ -0,0 +1,40 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const u of i.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();function uc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yo={exports:{}},nl={},Xo={exports:{}},T={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Gn=Symbol.for("react.element"),oc=Symbol.for("react.portal"),sc=Symbol.for("react.fragment"),ac=Symbol.for("react.strict_mode"),cc=Symbol.for("react.profiler"),fc=Symbol.for("react.provider"),dc=Symbol.for("react.context"),pc=Symbol.for("react.forward_ref"),mc=Symbol.for("react.suspense"),hc=Symbol.for("react.memo"),vc=Symbol.for("react.lazy"),Iu=Symbol.iterator;function yc(e){return e===null||typeof e!="object"?null:(e=Iu&&e[Iu]||e["@@iterator"],typeof e=="function"?e:null)}var Go={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Zo=Object.assign,Jo={};function un(e,t,n){this.props=e,this.context=t,this.refs=Jo,this.updater=n||Go}un.prototype.isReactComponent={};un.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};un.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function qo(){}qo.prototype=un.prototype;function Ai(e,t,n){this.props=e,this.context=t,this.refs=Jo,this.updater=n||Go}var Bi=Ai.prototype=new qo;Bi.constructor=Ai;Zo(Bi,un.prototype);Bi.isPureReactComponent=!0;var Fu=Array.isArray,bo=Object.prototype.hasOwnProperty,Vi={current:null},es={key:!0,ref:!0,__self:!0,__source:!0};function ts(e,t,n){var r,l={},i=null,u=null;if(t!=null)for(r in t.ref!==void 0&&(u=t.ref),t.key!==void 0&&(i=""+t.key),t)bo.call(t,r)&&!es.hasOwnProperty(r)&&(l[r]=t[r]);var o=arguments.length-2;if(o===1)l.children=n;else if(1>>1,G=_[W];if(0>>1;Wl(xl,z))ytl(tr,xl)?(_[W]=tr,_[yt]=z,W=yt):(_[W]=xl,_[vt]=z,W=vt);else if(ytl(tr,z))_[W]=tr,_[yt]=z,W=yt;else break e}}return P}function l(_,P){var z=_.sortIndex-P.sortIndex;return z!==0?z:_.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var u=Date,o=u.now();e.unstable_now=function(){return u.now()-o}}var s=[],c=[],y=1,h=null,m=3,w=!1,x=!1,S=!1,D=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(_){for(var P=n(c);P!==null;){if(P.callback===null)r(c);else if(P.startTime<=_)r(c),P.sortIndex=P.expirationTime,t(s,P);else break;P=n(c)}}function v(_){if(S=!1,d(_),!x)if(n(s)!==null)x=!0,gl(k);else{var P=n(c);P!==null&&wl(v,P.startTime-_)}}function k(_,P){x=!1,S&&(S=!1,f(j),j=-1),w=!0;var z=m;try{for(d(P),h=n(s);h!==null&&(!(h.expirationTime>P)||_&&!je());){var W=h.callback;if(typeof W=="function"){h.callback=null,m=h.priorityLevel;var G=W(h.expirationTime<=P);P=e.unstable_now(),typeof G=="function"?h.callback=G:h===n(s)&&r(s),d(P)}else r(s);h=n(s)}if(h!==null)var er=!0;else{var vt=n(c);vt!==null&&wl(v,vt.startTime-P),er=!1}return er}finally{h=null,m=z,w=!1}}var N=!1,C=null,j=-1,H=5,L=-1;function je(){return!(e.unstable_now()-L_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(_){switch(m){case 1:case 2:case 3:var P=3;break;default:P=m}var z=m;m=P;try{return _()}finally{m=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,P){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var z=m;m=_;try{return P()}finally{m=z}},e.unstable_scheduleCallback=function(_,P,z){var W=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0W?(_.sortIndex=z,t(c,_),n(s)===null&&_===n(c)&&(S?(f(j),j=-1):S=!0,wl(v,z-W))):(_.sortIndex=G,t(s,_),x||w||(x=!0,gl(k))),_},e.unstable_shouldYield=je,e.unstable_wrapCallback=function(_){var P=m;return function(){var z=m;m=P;try{return _.apply(this,arguments)}finally{m=z}}}})(us);is.exports=us;var zc=is.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Tc=ae,ge=zc;function g(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xl=Object.prototype.hasOwnProperty,Lc=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,$u={},Au={};function Rc(e){return Xl.call(Au,e)?!0:Xl.call($u,e)?!1:Lc.test(e)?Au[e]=!0:($u[e]=!0,!1)}function Oc(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Dc(e,t,n,r){if(t===null||typeof t>"u"||Oc(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function se(e,t,n,r,l,i,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=u}var ee={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ee[e]=new se(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ee[t]=new se(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ee[e]=new se(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ee[e]=new se(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ee[e]=new se(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ee[e]=new se(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ee[e]=new se(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ee[e]=new se(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ee[e]=new se(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wi=/[\-:]([a-z])/g;function Qi(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Wi,Qi);ee[t]=new se(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Wi,Qi);ee[t]=new se(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Wi,Qi);ee[t]=new se(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ee[e]=new se(e,1,!1,e.toLowerCase(),null,!1,!1)});ee.xlinkHref=new se("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ee[e]=new se(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ki(e,t,n,r){var l=ee.hasOwnProperty(t)?ee[t]:null;(l!==null?l.type!==0:r||!(2o||l[u]!==i[o]){var s=` +`+l[u].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=u&&0<=o);break}}}finally{El=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?wn(e):""}function Mc(e){switch(e.tag){case 5:return wn(e.type);case 16:return wn("Lazy");case 13:return wn("Suspense");case 19:return wn("SuspenseList");case 0:case 2:case 15:return e=_l(e.type,!1),e;case 11:return e=_l(e.type.render,!1),e;case 1:return e=_l(e.type,!0),e;default:return""}}function ql(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Mt:return"Fragment";case Dt:return"Portal";case Gl:return"Profiler";case Yi:return"StrictMode";case Zl:return"Suspense";case Jl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case as:return(e.displayName||"Context")+".Consumer";case ss:return(e._context.displayName||"Context")+".Provider";case Xi:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gi:return t=e.displayName||null,t!==null?t:ql(e.type)||"Memo";case Je:t=e._payload,e=e._init;try{return ql(e(t))}catch{}}return null}function Ic(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ql(t);case 8:return t===Yi?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ft(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fs(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fc(e){var t=fs(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(u){r=""+u,i.call(this,u)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(u){r=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function lr(e){e._valueTracker||(e._valueTracker=Fc(e))}function ds(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=fs(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Rr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function bl(e,t){var n=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Vu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ft(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ps(e,t){t=t.checked,t!=null&&Ki(e,"checked",t,!1)}function ei(e,t){ps(e,t);var n=ft(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ti(e,t.type,n):t.hasOwnProperty("defaultValue")&&ti(e,t.type,ft(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ti(e,t,n){(t!=="number"||Rr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var xn=Array.isArray;function Kt(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=ir.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function On(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var En={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Uc=["Webkit","ms","Moz","O"];Object.keys(En).forEach(function(e){Uc.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),En[t]=En[e]})});function ys(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||En.hasOwnProperty(e)&&En[e]?(""+t).trim():t+"px"}function gs(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=ys(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var $c=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function li(e,t){if(t){if($c[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(g(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(g(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(g(61))}if(t.style!=null&&typeof t.style!="object")throw Error(g(62))}}function ii(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ui=null;function Zi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var oi=null,Yt=null,Xt=null;function Ku(e){if(e=qn(e)){if(typeof oi!="function")throw Error(g(280));var t=e.stateNode;t&&(t=ol(t),oi(e.stateNode,e.type,t))}}function ws(e){Yt?Xt?Xt.push(e):Xt=[e]:Yt=e}function xs(){if(Yt){var e=Yt,t=Xt;if(Xt=Yt=null,Ku(e),t)for(e=0;e>>=0,e===0?32:31-(Zc(e)/Jc|0)|0}var ur=64,or=4194304;function Sn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ir(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,u=n&268435455;if(u!==0){var o=u&~l;o!==0?r=Sn(o):(i&=u,i!==0&&(r=Sn(i)))}else u=n&~l,u!==0?r=Sn(u):i!==0&&(r=Sn(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Zn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Re(t),e[t]=n}function tf(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Nn),to=" ",no=!1;function As(e,t){switch(e){case"keyup":return Tf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bs(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var It=!1;function Rf(e,t){switch(e){case"compositionend":return Bs(t);case"keypress":return t.which!==32?null:(no=!0,to);case"textInput":return e=t.data,e===to&&no?null:e;default:return null}}function Of(e,t){if(It)return e==="compositionend"||!lu&&As(e,t)?(e=Us(),Er=tu=tt=null,It=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=uo(n)}}function Qs(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qs(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ks(){for(var e=window,t=Rr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Rr(e.document)}return t}function iu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Vf(e){var t=Ks(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Qs(n.ownerDocument.documentElement,n)){if(r!==null&&iu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=oo(n,i);var u=oo(n,r);l&&u&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(u.node,u.offset)):(t.setEnd(u.node,u.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ft=null,pi=null,jn=null,mi=!1;function so(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;mi||Ft==null||Ft!==Rr(r)||(r=Ft,"selectionStart"in r&&iu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),jn&&$n(jn,r)||(jn=r,r=$r(pi,"onSelect"),0At||(e.current=xi[At],xi[At]=null,At--)}function M(e,t){At++,xi[At]=e.current,e.current=t}var dt={},le=mt(dt),de=mt(!1),Nt=dt;function bt(e,t){var n=e.type.contextTypes;if(!n)return dt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function pe(e){return e=e.childContextTypes,e!=null}function Br(){F(de),F(le)}function vo(e,t,n){if(le.current!==dt)throw Error(g(168));M(le,t),M(de,n)}function ta(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(g(108,Ic(e)||"Unknown",l));return B({},n,r)}function Vr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||dt,Nt=le.current,M(le,e),M(de,de.current),!0}function yo(e,t,n){var r=e.stateNode;if(!r)throw Error(g(169));n?(e=ta(e,t,Nt),r.__reactInternalMemoizedMergedChildContext=e,F(de),F(le),M(le,e)):F(de),M(de,n)}var Be=null,sl=!1,Ul=!1;function na(e){Be===null?Be=[e]:Be.push(e)}function ed(e){sl=!0,na(e)}function ht(){if(!Ul&&Be!==null){Ul=!0;var e=0,t=O;try{var n=Be;for(O=1;e>=u,l-=u,Ve=1<<32-Re(t)+l|n<j?(H=C,C=null):H=C.sibling;var L=m(f,C,d[j],v);if(L===null){C===null&&(C=H);break}e&&C&&L.alternate===null&&t(f,C),a=i(L,a,j),N===null?k=L:N.sibling=L,N=L,C=H}if(j===d.length)return n(f,C),U&>(f,j),k;if(C===null){for(;jj?(H=C,C=null):H=C.sibling;var je=m(f,C,L.value,v);if(je===null){C===null&&(C=H);break}e&&C&&je.alternate===null&&t(f,C),a=i(je,a,j),N===null?k=je:N.sibling=je,N=je,C=H}if(L.done)return n(f,C),U&>(f,j),k;if(C===null){for(;!L.done;j++,L=d.next())L=h(f,L.value,v),L!==null&&(a=i(L,a,j),N===null?k=L:N.sibling=L,N=L);return U&>(f,j),k}for(C=r(f,C);!L.done;j++,L=d.next())L=w(C,f,j,L.value,v),L!==null&&(e&&L.alternate!==null&&C.delete(L.key===null?j:L.key),a=i(L,a,j),N===null?k=L:N.sibling=L,N=L);return e&&C.forEach(function(an){return t(f,an)}),U&>(f,j),k}function D(f,a,d,v){if(typeof d=="object"&&d!==null&&d.type===Mt&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case rr:e:{for(var k=d.key,N=a;N!==null;){if(N.key===k){if(k=d.type,k===Mt){if(N.tag===7){n(f,N.sibling),a=l(N,d.props.children),a.return=f,f=a;break e}}else if(N.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Je&&xo(k)===N.type){n(f,N.sibling),a=l(N,d.props),a.ref=vn(f,N,d),a.return=f,f=a;break e}n(f,N);break}else t(f,N);N=N.sibling}d.type===Mt?(a=_t(d.props.children,f.mode,v,d.key),a.return=f,f=a):(v=Lr(d.type,d.key,d.props,null,f.mode,v),v.ref=vn(f,a,d),v.return=f,f=v)}return u(f);case Dt:e:{for(N=d.key;a!==null;){if(a.key===N)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){n(f,a.sibling),a=l(a,d.children||[]),a.return=f,f=a;break e}else{n(f,a);break}else t(f,a);a=a.sibling}a=Kl(d,f.mode,v),a.return=f,f=a}return u(f);case Je:return N=d._init,D(f,a,N(d._payload),v)}if(xn(d))return x(f,a,d,v);if(fn(d))return S(f,a,d,v);mr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(n(f,a.sibling),a=l(a,d),a.return=f,f=a):(n(f,a),a=Ql(d,f.mode,v),a.return=f,f=a),u(f)):n(f,a)}return D}var tn=ua(!0),oa=ua(!1),Qr=mt(null),Kr=null,Ht=null,au=null;function cu(){au=Ht=Kr=null}function fu(e){var t=Qr.current;F(Qr),e._currentValue=t}function Ei(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Zt(e,t){Kr=e,au=Ht=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(fe=!0),e.firstContext=null)}function Ne(e){var t=e._currentValue;if(au!==e)if(e={context:e,memoizedValue:t,next:null},Ht===null){if(Kr===null)throw Error(g(308));Ht=e,Kr.dependencies={lanes:0,firstContext:e}}else Ht=Ht.next=e;return t}var St=null;function du(e){St===null?St=[e]:St.push(e)}function sa(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,du(t)):(n.next=l.next,l.next=n),t.interleaved=n,Ye(e,r)}function Ye(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var qe=!1;function pu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function aa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function We(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ot(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,R&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Ye(e,n)}return l=r.interleaved,l===null?(t.next=t,du(r)):(t.next=l.next,l.next=t),r.interleaved=t,Ye(e,n)}function Nr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qi(e,n)}}function So(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var u={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=u:i=i.next=u,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Yr(e,t,n,r){var l=e.updateQueue;qe=!1;var i=l.firstBaseUpdate,u=l.lastBaseUpdate,o=l.shared.pending;if(o!==null){l.shared.pending=null;var s=o,c=s.next;s.next=null,u===null?i=c:u.next=c,u=s;var y=e.alternate;y!==null&&(y=y.updateQueue,o=y.lastBaseUpdate,o!==u&&(o===null?y.firstBaseUpdate=c:o.next=c,y.lastBaseUpdate=s))}if(i!==null){var h=l.baseState;u=0,y=c=s=null,o=i;do{var m=o.lane,w=o.eventTime;if((r&m)===m){y!==null&&(y=y.next={eventTime:w,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var x=e,S=o;switch(m=t,w=n,S.tag){case 1:if(x=S.payload,typeof x=="function"){h=x.call(w,h,m);break e}h=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=S.payload,m=typeof x=="function"?x.call(w,h,m):x,m==null)break e;h=B({},h,m);break e;case 2:qe=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,m=l.effects,m===null?l.effects=[o]:m.push(o))}else w={eventTime:w,lane:m,tag:o.tag,payload:o.payload,callback:o.callback,next:null},y===null?(c=y=w,s=h):y=y.next=w,u|=m;if(o=o.next,o===null){if(o=l.shared.pending,o===null)break;m=o,o=m.next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}while(!0);if(y===null&&(s=h),l.baseState=s,l.firstBaseUpdate=c,l.lastBaseUpdate=y,t=l.shared.interleaved,t!==null){l=t;do u|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);Pt|=u,e.lanes=u,e.memoizedState=h}}function ko(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Al.transition;Al.transition={};try{e(!1),t()}finally{O=n,Al.transition=r}}function Ca(){return Ce().memoizedState}function ld(e,t,n){var r=at(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ja(e))Pa(t,n);else if(n=sa(e,t,n,r),n!==null){var l=ue();Oe(n,e,r,l),za(n,t,r)}}function id(e,t,n){var r=at(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ja(e))Pa(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var u=t.lastRenderedState,o=i(u,n);if(l.hasEagerState=!0,l.eagerState=o,De(o,u)){var s=t.interleaved;s===null?(l.next=l,du(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=sa(e,t,l,r),n!==null&&(l=ue(),Oe(n,e,r,l),za(n,t,r))}}function ja(e){var t=e.alternate;return e===A||t!==null&&t===A}function Pa(e,t){Pn=Gr=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function za(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qi(e,n)}}var Zr={readContext:Ne,useCallback:te,useContext:te,useEffect:te,useImperativeHandle:te,useInsertionEffect:te,useLayoutEffect:te,useMemo:te,useReducer:te,useRef:te,useState:te,useDebugValue:te,useDeferredValue:te,useTransition:te,useMutableSource:te,useSyncExternalStore:te,useId:te,unstable_isNewReconciler:!1},ud={readContext:Ne,useCallback:function(e,t){return Ie().memoizedState=[e,t===void 0?null:t],e},useContext:Ne,useEffect:_o,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,jr(4194308,4,Sa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return jr(4194308,4,e,t)},useInsertionEffect:function(e,t){return jr(4,2,e,t)},useMemo:function(e,t){var n=Ie();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ie();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ld.bind(null,A,e),[r.memoizedState,e]},useRef:function(e){var t=Ie();return e={current:e},t.memoizedState=e},useState:Eo,useDebugValue:Su,useDeferredValue:function(e){return Ie().memoizedState=e},useTransition:function(){var e=Eo(!1),t=e[0];return e=rd.bind(null,e[1]),Ie().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=A,l=Ie();if(U){if(n===void 0)throw Error(g(407));n=n()}else{if(n=t(),J===null)throw Error(g(349));jt&30||pa(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,_o(ha.bind(null,r,i,e),[e]),r.flags|=2048,Yn(9,ma.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ie(),t=J.identifierPrefix;if(U){var n=He,r=Ve;n=(r&~(1<<32-Re(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Qn++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),n==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[Fe]=t,e[Vn]=r,$a(e,t,!1,!1),t.stateNode=e;e:{switch(u=ii(n,r),n){case"dialog":I("cancel",e),I("close",e),l=r;break;case"iframe":case"object":case"embed":I("load",e),l=r;break;case"video":case"audio":for(l=0;lln&&(t.flags|=128,r=!0,yn(i,!1),t.lanes=4194304)}else{if(!r)if(e=Xr(u),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),yn(i,!0),i.tail===null&&i.tailMode==="hidden"&&!u.alternate&&!U)return ne(t),null}else 2*Q()-i.renderingStartTime>ln&&n!==1073741824&&(t.flags|=128,r=!0,yn(i,!1),t.lanes=4194304);i.isBackwards?(u.sibling=t.child,t.child=u):(n=i.last,n!==null?n.sibling=u:t.child=u,i.last=u)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Q(),t.sibling=null,n=$.current,M($,r?n&1|2:n&1),t):(ne(t),null);case 22:case 23:return ju(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?he&1073741824&&(ne(t),t.subtreeFlags&6&&(t.flags|=8192)):ne(t),null;case 24:return null;case 25:return null}throw Error(g(156,t.tag))}function md(e,t){switch(ou(t),t.tag){case 1:return pe(t.type)&&Br(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nn(),F(de),F(le),vu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return hu(t),null;case 13:if(F($),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(g(340));en()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F($),null;case 4:return nn(),null;case 10:return fu(t.type._context),null;case 22:case 23:return ju(),null;case 24:return null;default:return null}}var vr=!1,re=!1,hd=typeof WeakSet=="function"?WeakSet:Set,E=null;function Wt(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){V(e,t,r)}else n.current=null}function Ri(e,t,n){try{n()}catch(r){V(e,t,r)}}var Mo=!1;function vd(e,t){if(hi=Fr,e=Ks(),iu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var u=0,o=-1,s=-1,c=0,y=0,h=e,m=null;t:for(;;){for(var w;h!==n||l!==0&&h.nodeType!==3||(o=u+l),h!==i||r!==0&&h.nodeType!==3||(s=u+r),h.nodeType===3&&(u+=h.nodeValue.length),(w=h.firstChild)!==null;)m=h,h=w;for(;;){if(h===e)break t;if(m===n&&++c===l&&(o=u),m===i&&++y===r&&(s=u),(w=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=w}n=o===-1||s===-1?null:{start:o,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(vi={focusedElem:e,selectionRange:n},Fr=!1,E=t;E!==null;)if(t=E,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,E=e;else for(;E!==null;){t=E;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var S=x.memoizedProps,D=x.memoizedState,f=t.stateNode,a=f.getSnapshotBeforeUpdate(t.elementType===t.type?S:ze(t.type,S),D);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(g(163))}}catch(v){V(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,E=e;break}E=t.return}return x=Mo,Mo=!1,x}function zn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&Ri(t,n,i)}l=l.next}while(l!==r)}}function fl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Oi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Va(e){var t=e.alternate;t!==null&&(e.alternate=null,Va(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Fe],delete t[Vn],delete t[wi],delete t[qf],delete t[bf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ha(e){return e.tag===5||e.tag===3||e.tag===4}function Io(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ha(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Di(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ar));else if(r!==4&&(e=e.child,e!==null))for(Di(e,t,n),e=e.sibling;e!==null;)Di(e,t,n),e=e.sibling}function Mi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Mi(e,t,n),e=e.sibling;e!==null;)Mi(e,t,n),e=e.sibling}var q=null,Te=!1;function Ze(e,t,n){for(n=n.child;n!==null;)Wa(e,t,n),n=n.sibling}function Wa(e,t,n){if(Ue&&typeof Ue.onCommitFiberUnmount=="function")try{Ue.onCommitFiberUnmount(rl,n)}catch{}switch(n.tag){case 5:re||Wt(n,t);case 6:var r=q,l=Te;q=null,Ze(e,t,n),q=r,Te=l,q!==null&&(Te?(e=q,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):q.removeChild(n.stateNode));break;case 18:q!==null&&(Te?(e=q,n=n.stateNode,e.nodeType===8?Fl(e.parentNode,n):e.nodeType===1&&Fl(e,n),Fn(e)):Fl(q,n.stateNode));break;case 4:r=q,l=Te,q=n.stateNode.containerInfo,Te=!0,Ze(e,t,n),q=r,Te=l;break;case 0:case 11:case 14:case 15:if(!re&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,u=i.destroy;i=i.tag,u!==void 0&&(i&2||i&4)&&Ri(n,t,u),l=l.next}while(l!==r)}Ze(e,t,n);break;case 1:if(!re&&(Wt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){V(n,t,o)}Ze(e,t,n);break;case 21:Ze(e,t,n);break;case 22:n.mode&1?(re=(r=re)||n.memoizedState!==null,Ze(e,t,n),re=r):Ze(e,t,n);break;default:Ze(e,t,n)}}function Fo(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new hd),t.forEach(function(r){var l=Nd.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Pe(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=u),r&=~i}if(r=l,r=Q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*gd(r/1960))-r,10e?16:e,nt===null)var r=!1;else{if(e=nt,nt=null,br=0,R&6)throw Error(g(331));var l=R;for(R|=4,E=e.current;E!==null;){var i=E,u=i.child;if(E.flags&16){var o=i.deletions;if(o!==null){for(var s=0;sQ()-Nu?Et(e,0):_u|=n),me(e,t)}function qa(e,t){t===0&&(e.mode&1?(t=or,or<<=1,!(or&130023424)&&(or=4194304)):t=1);var n=ue();e=Ye(e,t),e!==null&&(Zn(e,t,n),me(e,n))}function _d(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qa(e,n)}function Nd(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(g(314))}r!==null&&r.delete(t),qa(e,n)}var ba;ba=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||de.current)fe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return fe=!1,dd(e,t,n);fe=!!(e.flags&131072)}else fe=!1,U&&t.flags&1048576&&ra(t,Wr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Pr(e,t),e=t.pendingProps;var l=bt(t,le.current);Zt(t,n),l=gu(null,t,r,e,l,n);var i=wu();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pe(r)?(i=!0,Vr(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,pu(t),l.updater=cl,t.stateNode=l,l._reactInternals=t,Ni(t,r,e,n),t=Pi(null,t,r,!0,i,n)):(t.tag=0,U&&i&&uu(t),ie(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Pr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=jd(r),e=ze(r,e),l){case 0:t=ji(null,t,r,e,n);break e;case 1:t=Ro(null,t,r,e,n);break e;case 11:t=To(null,t,r,e,n);break e;case 14:t=Lo(null,t,r,ze(r.type,e),n);break e}throw Error(g(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),ji(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),Ro(e,t,r,l,n);case 3:e:{if(Ia(t),e===null)throw Error(g(387));r=t.pendingProps,i=t.memoizedState,l=i.element,aa(e,t),Yr(t,r,null,n);var u=t.memoizedState;if(r=u.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=rn(Error(g(423)),t),t=Oo(e,t,r,n,l);break e}else if(r!==l){l=rn(Error(g(424)),t),t=Oo(e,t,r,n,l);break e}else for(ve=ut(t.stateNode.containerInfo.firstChild),ye=t,U=!0,Le=null,n=oa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(en(),r===l){t=Xe(e,t,n);break e}ie(e,t,r,n)}t=t.child}return t;case 5:return ca(t),e===null&&ki(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,u=l.children,yi(r,l)?u=null:i!==null&&yi(r,i)&&(t.flags|=32),Ma(e,t),ie(e,t,u,n),t.child;case 6:return e===null&&ki(t),null;case 13:return Fa(e,t,n);case 4:return mu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=tn(t,null,r,n):ie(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),To(e,t,r,l,n);case 7:return ie(e,t,t.pendingProps,n),t.child;case 8:return ie(e,t,t.pendingProps.children,n),t.child;case 12:return ie(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,u=l.value,M(Qr,r._currentValue),r._currentValue=u,i!==null)if(De(i.value,u)){if(i.children===l.children&&!de.current){t=Xe(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){u=i.child;for(var s=o.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=We(-1,n&-n),s.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var y=c.pending;y===null?s.next=s:(s.next=y.next,y.next=s),c.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Ei(i.return,n,t),o.lanes|=n;break}s=s.next}}else if(i.tag===10)u=i.type===t.type?null:i.child;else if(i.tag===18){if(u=i.return,u===null)throw Error(g(341));u.lanes|=n,o=u.alternate,o!==null&&(o.lanes|=n),Ei(u,n,t),u=i.sibling}else u=i.child;if(u!==null)u.return=i;else for(u=i;u!==null;){if(u===t){u=null;break}if(i=u.sibling,i!==null){i.return=u.return,u=i;break}u=u.return}i=u}ie(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Zt(t,n),l=Ne(l),r=r(l),t.flags|=1,ie(e,t,r,n),t.child;case 14:return r=t.type,l=ze(r,t.pendingProps),l=ze(r.type,l),Lo(e,t,r,l,n);case 15:return Oa(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),Pr(e,t),t.tag=1,pe(r)?(e=!0,Vr(t)):e=!1,Zt(t,n),Ta(t,r,l),Ni(t,r,l,n),Pi(null,t,r,!0,e,n);case 19:return Ua(e,t,n);case 22:return Da(e,t,n)}throw Error(g(156,t.tag))};function ec(e,t){return js(e,t)}function Cd(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ee(e,t,n,r){return new Cd(e,t,n,r)}function zu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jd(e){if(typeof e=="function")return zu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Xi)return 11;if(e===Gi)return 14}return 2}function ct(e,t){var n=e.alternate;return n===null?(n=Ee(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Lr(e,t,n,r,l,i){var u=2;if(r=e,typeof e=="function")zu(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case Mt:return _t(n.children,l,i,t);case Yi:u=8,l|=8;break;case Gl:return e=Ee(12,n,t,l|2),e.elementType=Gl,e.lanes=i,e;case Zl:return e=Ee(13,n,t,l),e.elementType=Zl,e.lanes=i,e;case Jl:return e=Ee(19,n,t,l),e.elementType=Jl,e.lanes=i,e;case cs:return pl(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ss:u=10;break e;case as:u=9;break e;case Xi:u=11;break e;case Gi:u=14;break e;case Je:u=16,r=null;break e}throw Error(g(130,e==null?e:typeof e,""))}return t=Ee(u,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function _t(e,t,n,r){return e=Ee(7,e,r,t),e.lanes=n,e}function pl(e,t,n,r){return e=Ee(22,e,r,t),e.elementType=cs,e.lanes=n,e.stateNode={isHidden:!1},e}function Ql(e,t,n){return e=Ee(6,e,null,t),e.lanes=n,e}function Kl(e,t,n){return t=Ee(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Pd(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Cl(0),this.expirationTimes=Cl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Tu(e,t,n,r,l,i,u,o,s){return e=new Pd(e,t,n,o,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ee(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},pu(i),e}function zd(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(lc)}catch(e){console.error(e)}}lc(),ls.exports=we;var Dd=ls.exports,Qo=Dd;Yl.createRoot=Qo.createRoot,Yl.hydrateRoot=Qo.hydrateRoot;const Du="/api";async function Md(e,t){const n=await fetch(`${Du}/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({trip_id:e,message:t})});if(!n.ok)throw new Error(`Chat failed: ${n.status}`);return n.json()}async function Id(e,t){const n=await fetch(`${Du}/optimize?trip_id=${e}&day=${t}`,{method:"POST"});if(!n.ok)throw new Error("Optimize failed");return n.json()}function Fd(e,t="html"){return`${Du}/itinerary/export?trip_id=${e}&format=${t}`}function Ud({messages:e,onSend:t,loading:n}){const[r,l]=ae.useState(""),i=ae.useRef(null);ae.useEffect(()=>{var o;(o=i.current)==null||o.scrollIntoView({behavior:"smooth"})},[e]);const u=o=>{o.preventDefault();const s=r.trim();!s||n||(l(""),t(s))};return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3",children:[e.map((o,s)=>p.jsx("div",{className:`flex ${o.role==="user"?"justify-end":"justify-start"}`,children:p.jsxs("div",{className:o.role==="user"?"chat-bubble-user":"chat-bubble-assistant",children:[p.jsx("div",{className:"whitespace-pre-wrap text-sm",children:o.content}),o.agent&&p.jsxs("div",{className:"text-xs mt-1 opacity-60",children:["via ",o.agent," agent"]})]})},s)),n&&p.jsx("div",{className:"flex justify-start",children:p.jsx("div",{className:"chat-bubble-assistant",children:p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("span",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),p.jsx("span",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),p.jsx("span",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})})}),p.jsx("div",{ref:i})]}),p.jsx("form",{onSubmit:u,className:"p-3 border-t border-gray-200 bg-white",children:p.jsxs("div",{className:"flex gap-2",children:[p.jsx("input",{type:"text",value:r,onChange:o=>l(o.target.value),placeholder:"Tell me about your dream trip...",className:"flex-1 border border-gray-300 rounded-lg px-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",disabled:n}),p.jsx("button",{type:"submit",disabled:n||!r.trim(),className:"bg-primary-600 text-white px-4 py-2.5 rounded-lg text-sm font-medium hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed transition",children:"Send"})]})})]})}function $d({trip:e}){var t;return p.jsxs("div",{className:"p-4 space-y-4",children:[p.jsx("h2",{className:"font-semibold text-sm text-gray-500 uppercase tracking-wider",children:"Trip Details"}),p.jsxs("div",{className:"space-y-3 text-sm",children:[p.jsx(Ot,{label:"Destination",value:e==null?void 0:e.destination}),p.jsx(Ot,{label:"Origin",value:e==null?void 0:e.origin}),p.jsx(Ot,{label:"Dates",value:e!=null&&e.start_date&&(e!=null&&e.end_date)?`${e.start_date} → ${e.end_date}`:void 0}),p.jsx(Ot,{label:"Budget",value:e!=null&&e.budget_total?`$${e.budget_total.toLocaleString()} ${e.budget_currency}`:void 0}),p.jsx(Ot,{label:"Mood",value:e==null?void 0:e.mood}),p.jsx(Ot,{label:"Travelers",value:(t=e==null?void 0:e.travelers)!=null&&t.length?`${e.travelers.length} traveler(s)`:void 0}),(e==null?void 0:e.interests)&&e.interests.length>0&&p.jsxs("div",{children:[p.jsx("span",{className:"text-gray-500 text-xs",children:"Interests"}),p.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:e.interests.map((n,r)=>p.jsx("span",{className:"bg-primary-50 text-primary-700 px-2 py-0.5 rounded text-xs",children:n},r))})]})]})]})}function Ot({label:e,value:t}){return p.jsxs("div",{children:[p.jsx("span",{className:"text-gray-500 text-xs",children:e}),p.jsx("div",{className:t?"text-gray-900 font-medium":"text-gray-300 italic",children:t||"Not set"})]})}const Ad={flight:"✈️",hotel:"🏨",activity:"🎯",food:"🍽️",transport:"🚗"};function Bd({itinerary:e,tripId:t}){const n=async r=>{try{await Id(t,r)}catch{}};return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"bg-gradient-to-r from-primary-50 to-accent-50 rounded-xl p-5 border border-primary-100",children:[p.jsx("h2",{className:"font-bold text-lg text-primary-900 mb-2",children:"Trip Summary"}),p.jsxs("div",{className:"grid grid-cols-3 gap-4 text-sm",children:[p.jsxs("div",{children:[p.jsx("div",{className:"text-gray-500",children:"Total Cost"}),p.jsxs("div",{className:"font-bold text-lg",children:["$",e.total_cost.toLocaleString()]})]}),p.jsxs("div",{children:[p.jsx("div",{className:"text-gray-500",children:"Travel Time"}),p.jsxs("div",{className:"font-bold text-lg",children:[e.travel_time_hours,"h"]})]}),p.jsxs("div",{children:[p.jsx("div",{className:"text-gray-500",children:"Flexibility"}),p.jsxs("div",{className:"font-bold text-lg",children:[Math.round(e.flexibility_score*100),"%"]})]})]})]}),e.days.map(r=>p.jsx(Vd,{day:r,onRegenerate:()=>n(r.day)},r.day))]})}function Vd({day:e,onRegenerate:t}){return p.jsxs("div",{className:"border border-gray-200 rounded-xl overflow-hidden",children:[p.jsxs("div",{className:"bg-gray-50 px-5 py-3 flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsxs("h3",{className:"font-semibold",children:["Day ",e.day," — ",e.title||e.date]}),e.weather&&p.jsxs("span",{className:"text-xs text-gray-500",children:[e.weather.condition," · ",e.weather.high_temp_c,"°/",e.weather.low_temp_c,"°C"]})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("span",{className:"text-sm text-gray-500",children:["$",e.daily_spend.toFixed(0)]}),p.jsx("button",{onClick:t,className:"text-xs bg-primary-100 text-primary-700 px-2 py-1 rounded hover:bg-primary-200 transition",children:"🔄 Regenerate"})]})]}),p.jsx("div",{className:"divide-y divide-gray-100",children:e.items.map(n=>p.jsx(Hd,{item:n},n.id))})]})}function Hd({item:e}){return p.jsx("div",{className:"px-5 py-3 hover:bg-gray-50 transition",children:p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsx("span",{className:"text-lg mt-0.5",children:Ad[e.category]||"📌"}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"font-medium text-sm",children:e.title}),e.cost>0&&p.jsxs("span",{className:"text-sm text-gray-500",children:["$",e.cost.toFixed(0)]})]}),e.start_time&&p.jsxs("div",{className:"text-xs text-gray-400",children:[e.start_time," — ",e.end_time]}),e.description&&p.jsx("div",{className:"text-xs text-gray-500 mt-0.5",children:e.description}),e.reasoning&&p.jsxs("div",{className:"text-xs text-primary-600 mt-1 italic",children:["Why: ",e.reasoning]}),e.weather_note&&p.jsxs("div",{className:"text-xs text-amber-600 mt-0.5",children:["⚠️ ",e.weather_note]}),e.backup&&p.jsxs("div",{className:"text-xs text-gray-400 mt-0.5",children:["Backup: ",e.backup.title]})]})]})})}const Ko={Flights:"bg-red-400",Accommodation:"bg-blue-400",Activities:"bg-green-400",Food:"bg-yellow-400",Transport:"bg-purple-400"};function Wd({budget:e}){const t=e.total_budget>0?e.total_estimated/e.total_budget*100:0;return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl p-5",children:[p.jsxs("div",{className:"flex justify-between items-center mb-3",children:[p.jsx("h3",{className:"font-semibold",children:"Budget Overview"}),p.jsx("span",{className:`text-sm font-medium ${e.within_budget?"text-green-600":"text-red-600"}`,children:e.within_budget?"✅ Within Budget":"⚠️ Over Budget"})]}),p.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[p.jsxs("span",{children:["Estimated: $",e.total_estimated.toLocaleString()]}),p.jsxs("span",{children:["Budget: $",e.total_budget.toLocaleString()]})]}),p.jsx("div",{className:"w-full bg-gray-200 rounded-full h-3",children:p.jsx("div",{className:`h-3 rounded-full transition-all ${t>100?"bg-red-500":"bg-green-500"}`,style:{width:`${Math.min(t,100)}%`}})})]}),p.jsx("div",{className:"space-y-3",children:e.categories.map(n=>p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:`w-3 h-3 rounded-full ${Ko[n.category]||"bg-gray-400"}`}),p.jsxs("div",{className:"flex-1",children:[p.jsxs("div",{className:"flex justify-between text-sm",children:[p.jsx("span",{className:"font-medium",children:n.category}),p.jsxs("span",{children:["$",n.allocated.toLocaleString()]})]}),p.jsx("div",{className:"w-full bg-gray-100 rounded-full h-1.5 mt-1",children:p.jsx("div",{className:`h-1.5 rounded-full ${Ko[n.category]||"bg-gray-400"}`,style:{width:`${e.total_estimated>0?n.allocated/e.total_estimated*100:0}%`}})})]})]},n.category))}),e.savings_tips.length>0&&p.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-4",children:[p.jsx("h4",{className:"font-medium text-amber-800 mb-2",children:"💡 Savings Tips"}),p.jsx("ul",{className:"text-sm text-amber-700 space-y-1",children:e.savings_tips.map((n,r)=>p.jsxs("li",{children:["• ",n]},r))})]})]})}const Qd={planner:"🧠",flights:"✈️",hotels:"🏨",activities:"🎯",food:"🍽️",route:"🗺️",weather:"🌤️",budget:"💰",calendar:"📅",monitoring:"🔔"};function Kd({steps:e}){return p.jsxs("div",{className:"p-4 border-t border-gray-200",children:[p.jsx("h3",{className:"font-semibold text-sm text-gray-500 uppercase tracking-wider mb-3",children:"Agent Activity"}),p.jsx("div",{className:"space-y-2",children:e.map((t,n)=>p.jsxs("div",{className:"flex items-start gap-2 text-xs",children:[p.jsx("span",{children:Qd[t.agent]||"⚙️"}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("div",{className:"font-medium capitalize",children:t.agent}),p.jsx("div",{className:"text-gray-500 truncate",children:t.result_summary})]}),p.jsxs("span",{className:"text-gray-400 whitespace-nowrap",children:[t.duration_ms,"ms"]})]},n))})]})}function Yd(){const[e,t]=ae.useState(""),[n,r]=ae.useState([{role:"assistant",content:"Hi! I'm HolidayPilot 🌍 Where would you like to go? Tell me your destination, dates, budget, and travel style!"}]),[l,i]=ae.useState(null),[u,o]=ae.useState(null),[s,c]=ae.useState(null),[y,h]=ae.useState([]),[m,w]=ae.useState(!1),[x,S]=ae.useState("itinerary"),D=async a=>{const d={role:"user",content:a};r(v=>[...v,d]),w(!0);try{const v=await Md(e,a);t(v.trip_id);const k=v.messages.filter(N=>N.role==="assistant");r(N=>[...N,...k]),v.trip_data&&i(v.trip_data),v.reasoning_steps.length&&h(v.reasoning_steps),v.itinerary&&o(v.itinerary),v.budget&&c(v.budget)}catch{r(v=>[...v,{role:"assistant",content:"Sorry, something went wrong. Please try again."}])}finally{w(!1)}},f=[{key:"itinerary",label:"📅 Itinerary"},{key:"budget",label:"💰 Budget"},{key:"weather",label:"🌤️ Weather"},{key:"checklist",label:"✅ Checklist"}];return p.jsxs("div",{className:"h-screen flex flex-col",children:[p.jsxs("header",{className:"bg-primary-700 text-white px-6 py-3 flex items-center justify-between shadow-md",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("span",{className:"text-2xl",children:"🌍"}),p.jsx("h1",{className:"text-xl font-bold",children:"HolidayPilot"})]}),p.jsx("div",{className:"flex items-center gap-3",children:e&&p.jsx("a",{href:Fd(e,"html"),target:"_blank",rel:"noopener noreferrer",className:"bg-white/20 hover:bg-white/30 px-3 py-1.5 rounded text-sm transition",children:"📥 Download Itinerary"})})]}),p.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[p.jsx("div",{className:"w-full lg:w-[420px] flex flex-col border-r border-gray-200 bg-gray-50",children:p.jsx(Ud,{messages:n,onSend:D,loading:m})}),p.jsxs("div",{className:"hidden lg:block w-72 border-r border-gray-200 bg-white overflow-y-auto",children:[p.jsx($d,{trip:l}),y.length>0&&p.jsx(Kd,{steps:y})]}),p.jsxs("div",{className:"hidden lg:flex flex-1 flex-col bg-white",children:[p.jsx("div",{className:"flex border-b border-gray-200",children:f.map(a=>p.jsx("button",{onClick:()=>S(a.key),className:`px-4 py-3 text-sm font-medium transition ${x===a.key?"border-b-2 border-primary-600 text-primary-700":"text-gray-500 hover:text-gray-700"}`,children:a.label},a.key))}),p.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[x==="itinerary"&&(u?p.jsx(Bd,{itinerary:u,tripId:e}):p.jsx(wr,{icon:"📅",text:"Your itinerary will appear here after planning"})),x==="budget"&&(s?p.jsx(Wd,{budget:s}):p.jsx(wr,{icon:"💰",text:"Budget breakdown will appear after planning"})),x==="weather"&&p.jsx(wr,{icon:"🌤️",text:"Weather forecasts will appear after planning"}),x==="checklist"&&(u?p.jsxs("div",{className:"space-y-4",children:[p.jsx("h3",{className:"font-semibold text-lg",children:"🎒 Packing List"}),p.jsx("ul",{className:"space-y-1",children:u.packing_list.map((a,d)=>p.jsxs("li",{className:"flex items-center gap-2",children:[p.jsx("input",{type:"checkbox",className:"rounded"}),p.jsx("span",{children:a})]},d))}),p.jsx("h3",{className:"font-semibold text-lg mt-6",children:"✅ Pre-Trip Checklist"}),p.jsx("ul",{className:"space-y-1",children:u.checklist.map((a,d)=>p.jsxs("li",{className:"flex items-center gap-2",children:[p.jsx("input",{type:"checkbox",className:"rounded"}),p.jsx("span",{children:a})]},d))})]}):p.jsx(wr,{icon:"✅",text:"Checklists will appear after planning"}))]})]})]})]})}function wr({icon:e,text:t}){return p.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-gray-400",children:[p.jsx("span",{className:"text-5xl mb-4",children:e}),p.jsx("p",{children:t})]})}Yl.createRoot(document.getElementById("root")).render(p.jsx(kc.StrictMode,{children:p.jsx(Yd,{})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html new file mode 100644 index 0000000000000000000000000000000000000000..f8f1ccbf6f1f9feed3045ab5fbe80b8553d39295 --- /dev/null +++ b/frontend/dist/index.html @@ -0,0 +1,14 @@ + + + + + + HolidayPilot — AI Trip Planner + + + + + +
+ + diff --git a/frontend/index.html b/frontend/index.html new file mode 100644 index 0000000000000000000000000000000000000000..2ab869676615565c59c732ae2bf2c2bbaf28bf8d --- /dev/null +++ b/frontend/index.html @@ -0,0 +1,13 @@ + + + + + + HolidayPilot — AI Trip Planner + + + +
+ + + diff --git a/frontend/package-lock.json b/frontend/package-lock.json new file mode 100644 index 0000000000000000000000000000000000000000..fe039a2c773391419628631239d12d9e96537398 --- /dev/null +++ b/frontend/package-lock.json @@ -0,0 +1,2677 @@ +{ + "name": "holidaypilot-frontend", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "holidaypilot-frontend", + "version": "0.1.0", + "dependencies": { + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@types/react": "^18.3.11", + "@types/react-dom": "^18.3.1", + "@vitejs/plugin-react": "^4.3.3", + "autoprefixer": "^10.4.20", + "postcss": "^8.4.47", + "tailwindcss": "^3.4.13", + "typescript": "^5.6.3", + "vite": "^5.4.10" + } + }, + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", + "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", + "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", + "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.28.6", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", + "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", + "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", + "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz", + "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz", + "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.27", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", + "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.2.tgz", + "integrity": "sha512-dnlp69efPPg6Uaw2dVqzWRfAWRnYVb1XJ8CyyhIbZeaq4CA5/mLeZ1IEt9QqQxmbdvagjLIm2ZL8BxXv5lH4Yw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.2.tgz", + "integrity": "sha512-OqZTwDRDchGRHHm/hwLOL7uVPB9aUvI0am/eQuWMNyFHf5PSEQmyEeYYheA0EPPKUO/l0uigCp+iaTjoLjVoHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.2.tgz", + "integrity": "sha512-UwRE7CGpvSVEQS8gUMBe1uADWjNnVgP3Iusyda1nSRwNDCsRjnGc7w6El6WLQsXmZTbLZx9cecegumcitNfpmA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.2.tgz", + "integrity": "sha512-gjEtURKLCC5VXm1I+2i1u9OhxFsKAQJKTVB8WvDAHF+oZlq0GTVFOlTlO1q3AlCTE/DF32c16ESvfgqR7343/g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.2.tgz", + "integrity": "sha512-Bcl6CYDeAgE70cqZaMojOi/eK63h5Me97ZqAQoh77VPjMysA/4ORQBRGo3rRy45x4MzVlU9uZxs8Uwy7ZaKnBw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.2.tgz", + "integrity": "sha512-LU+TPda3mAE2QB0/Hp5VyeKJivpC6+tlOXd1VMoXV/YFMvk/MNk5iXeBfB4MQGRWyOYVJ01625vjkr0Az98OJQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.2.tgz", + "integrity": "sha512-2QxQrM+KQ7DAW4o22j+XZ6RKdxjLD7BOWTP0Bv0tmjdyhXSsr2Ul1oJDQqh9Zf5qOwTuTc7Ek83mOFaKnodPjg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.2.tgz", + "integrity": "sha512-TbziEu2DVsTEOPif2mKWkMeDMLoYjx95oESa9fkQQK7r/Orta0gnkcDpzwufEcAO2BLBsD7mZkXGFqEdMRRwfw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.2.tgz", + "integrity": "sha512-bO/rVDiDUuM2YfuCUwZ1t1cP+/yqjqz+Xf2VtkdppefuOFS2OSeAfgafaHNkFn0t02hEyXngZkxtGqXcXwO8Rg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.2.tgz", + "integrity": "sha512-hr26p7e93Rl0Za+JwW7EAnwAvKkehh12BU1Llm9Ykiibg4uIr2rbpxG9WCf56GuvidlTG9KiiQT/TXT1yAWxTA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.2.tgz", + "integrity": "sha512-pOjB/uSIyDt+ow3k/RcLvUAOGpysT2phDn7TTUB3n75SlIgZzM6NKAqlErPhoFU+npgY3/n+2HYIQVbF70P9/A==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.2.tgz", + "integrity": "sha512-2/w+q8jszv9Ww1c+6uJT3OwqhdmGP2/4T17cu8WuwyUuuaCDDJ2ojdyYwZzCxx0GcsZBhzi3HmH+J5pZNXnd+Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.2.tgz", + "integrity": "sha512-11+aL5vKheYgczxtPVVRhdptAM2H7fcDR5Gw4/bTcteuZBlH4oP9f5s9zYO9aGZvoGeBpqXI/9TZZihZ609wKw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.2.tgz", + "integrity": "sha512-i16fokAGK46IVZuV8LIIwMdtqhin9hfYkCh8pf8iC3QU3LpwL+1FSFGej+O7l3E/AoknL6Dclh2oTdnRMpTzFQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.2.tgz", + "integrity": "sha512-49FkKS6RGQoriDSK/6E2GkAsAuU5kETFCh7pG4yD/ylj9rKhTmO3elsnmBvRD4PgJPds5W2PkhC82aVwmUcJ7A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.2.tgz", + "integrity": "sha512-mjYNkHPfGpUR00DuM1ZZIgs64Hpf4bWcz9Z41+4Q+pgDx73UwWdAYyf6EG/lRFldmdHHzgrYyge5akFUW0D3mQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.2.tgz", + "integrity": "sha512-ALyvJz965BQk8E9Al/JDKKDLH2kfKFLTGMlgkAbbYtZuJt9LU8DW3ZoDMCtQpXAltZxwBHevXz5u+gf0yA0YoA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.2.tgz", + "integrity": "sha512-UQjrkIdWrKI626Du8lCQ6MJp/6V1LAo2bOK9OTu4mSn8GGXIkPXk/Vsp4bLHCd9Z9Iz2OTEaokUE90VweJgIYQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.2.tgz", + "integrity": "sha512-bTsRGj6VlSdn/XD4CGyzMnzaBs9bsRxy79eTqTCBsA8TMIEky7qg48aPkvJvFe1HyzQ5oMZdg7AnVlWQSKLTnw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.2.tgz", + "integrity": "sha512-6d4Z3534xitaA1FcMWP7mQPq5zGwBmGbhphh2DwaA1aNIXUu3KTOfwrWpbwI4/Gr0uANo7NTtaykFyO2hPuFLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.2.tgz", + "integrity": "sha512-NetAg5iO2uN7eB8zE5qrZ3CSil+7IJt4WDFLcC75Ymywq1VZVD6qJ6EvNLjZ3rEm6gB7XW5JdT60c6MN35Z85Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.2.tgz", + "integrity": "sha512-NCYhOotpgWZ5kdxCZsv6Iudx0wX8980Q/oW4pNFNihpBKsDbEA1zpkfxJGC0yugsUuyDZ7gL37dbzwhR0VI7pQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.2.tgz", + "integrity": "sha512-RXsaOqXxfoUBQoOgvmmijVxJnW2IGB0eoMO7F8FAjaj0UTywUO/luSqimWBJn04WNgUkeNhh7fs7pESXajWmkg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.2.tgz", + "integrity": "sha512-qdAzEULD+/hzObedtmV6iBpdL5TIbKVztGiK7O3/KYSf+HIzU257+MX1EXJcyIiDbMAqmbwaufcYPvyRryeZtA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.2.tgz", + "integrity": "sha512-Nd/SgG27WoA9e+/TdK74KnHz852TLa94ovOYySo/yMPuTmpckK/jIF2jSwS3g7ELSKXK13/cVdmg1Z/DaCWKxA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/prop-types": { + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.3.28", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.28.tgz", + "integrity": "sha512-z9VXpC7MWrhfWipitjNdgCauoMLRdIILQsAEV+ZesIzBq/oUlxk0m3ApZuMFCXdnS4U7KrI+l3WRUEGQ8K1QKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.3.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", + "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^18.0.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", + "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.28.0", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-beta.27", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.17.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true, + "license": "MIT" + }, + "node_modules/autoprefixer": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.5.0.tgz", + "integrity": "sha512-FMhOoZV4+qR6aTUALKX2rEqGG+oyATvwBt9IIzVR5rMa2HRWPkxf+P+PAJLD1I/H5/II+HuZcBJYEFBpq39ong==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "browserslist": "^4.28.2", + "caniuse-lite": "^1.0.30001787", + "fraction.js": "^5.3.4", + "picocolors": "^1.1.1", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.10.20", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.20.tgz", + "integrity": "sha512-1AaXxEPfXT+GvTBJFuy4yXVHWJBXa4OdbIebGN/wX5DlsIkU0+wzGnd2lOzokSk51d5LUmqjgBLRLlypLUqInQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", + "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.10.12", + "caniuse-lite": "^1.0.30001782", + "electron-to-chromium": "^1.5.328", + "node-releases": "^2.0.36", + "update-browserslist-db": "^1.2.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001788", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001788.tgz", + "integrity": "sha512-6q8HFp+lOQtcf7wBK+uEenxymVWkGKkjFpCvw5W25cmMwEDU45p1xQFBQv8JDlMMry7eNxyBaR+qxgmTUZkIRQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true, + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.340", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.340.tgz", + "integrity": "sha512-908qahOGocRMinT2nM3ajCEM99H4iPdv84eagPP3FfZy/1ZGeOy2CZYzjhms81ckOPCXPlW7LkY4XpxD8r1DrA==", + "dev": true, + "license": "ISC" + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fraction.js": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz", + "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/hasown": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", + "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jiti": { + "version": "1.21.7", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz", + "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.37", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.37.tgz", + "integrity": "sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/postcss": { + "version": "8.5.10", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.10.tgz", + "integrity": "sha512-pMMHxBOZKFU6HgAZ4eyGnwXF/EvPGGqUr0MnZ5+99485wwW41kW91A4LOGxSHhgugZmSChL5AlElNdwlNgcnLQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-import": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", + "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-js": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.1.0.tgz", + "integrity": "sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "peerDependencies": { + "postcss": "^8.4.21" + } + }, + "node_modules/postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.1.1" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/postcss-nested": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", + "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "postcss-selector-parser": "^6.1.1" + }, + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/react-refresh": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", + "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.12", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.2.tgz", + "integrity": "sha512-J9qZyW++QK/09NyN/zeO0dG/1GdGfyp9lV8ajHnRVLfo/uFsbji5mHnDgn/qYdUHyCkM2N+8VyspgZclfAh0eQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.60.2", + "@rollup/rollup-android-arm64": "4.60.2", + "@rollup/rollup-darwin-arm64": "4.60.2", + "@rollup/rollup-darwin-x64": "4.60.2", + "@rollup/rollup-freebsd-arm64": "4.60.2", + "@rollup/rollup-freebsd-x64": "4.60.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.60.2", + "@rollup/rollup-linux-arm-musleabihf": "4.60.2", + "@rollup/rollup-linux-arm64-gnu": "4.60.2", + "@rollup/rollup-linux-arm64-musl": "4.60.2", + "@rollup/rollup-linux-loong64-gnu": "4.60.2", + "@rollup/rollup-linux-loong64-musl": "4.60.2", + "@rollup/rollup-linux-ppc64-gnu": "4.60.2", + "@rollup/rollup-linux-ppc64-musl": "4.60.2", + "@rollup/rollup-linux-riscv64-gnu": "4.60.2", + "@rollup/rollup-linux-riscv64-musl": "4.60.2", + "@rollup/rollup-linux-s390x-gnu": "4.60.2", + "@rollup/rollup-linux-x64-gnu": "4.60.2", + "@rollup/rollup-linux-x64-musl": "4.60.2", + "@rollup/rollup-openbsd-x64": "4.60.2", + "@rollup/rollup-openharmony-arm64": "4.60.2", + "@rollup/rollup-win32-arm64-msvc": "4.60.2", + "@rollup/rollup-win32-ia32-msvc": "4.60.2", + "@rollup/rollup-win32-x64-gnu": "4.60.2", + "@rollup/rollup-win32-x64-msvc": "4.60.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sucrase": { + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", + "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "tinyglobby": "^0.2.11", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tailwindcss": { + "version": "3.4.19", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.19.tgz", + "integrity": "sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "arg": "^5.0.2", + "chokidar": "^3.6.0", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.3.2", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "jiti": "^1.21.7", + "lilconfig": "^3.1.3", + "micromatch": "^4.0.8", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.1.1", + "postcss": "^8.4.47", + "postcss-import": "^15.1.0", + "postcss-js": "^4.0.1", + "postcss-load-config": "^4.0.2 || ^5.0 || ^6.0", + "postcss-nested": "^6.2.0", + "postcss-selector-parser": "^6.1.2", + "resolve": "^1.22.8", + "sucrase": "^3.35.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/vite": { + "version": "5.4.21", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz", + "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + } + } +} diff --git a/frontend/package.json b/frontend/package.json new file mode 100644 index 0000000000000000000000000000000000000000..36ae06103a49925ecdf6e5e4e3bf34829a724db8 --- /dev/null +++ b/frontend/package.json @@ -0,0 +1,25 @@ +{ + "name": "holidaypilot-frontend", + "private": true, + "version": "0.1.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "preview": "vite preview" + }, + "dependencies": { + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@types/react": "^18.3.11", + "@types/react-dom": "^18.3.1", + "@vitejs/plugin-react": "^4.3.3", + "autoprefixer": "^10.4.20", + "postcss": "^8.4.47", + "tailwindcss": "^3.4.13", + "typescript": "^5.6.3", + "vite": "^5.4.10" + } +} diff --git a/frontend/postcss.config.js b/frontend/postcss.config.js new file mode 100644 index 0000000000000000000000000000000000000000..2e7af2b7f1a6f391da1631d93968a9d487ba977d --- /dev/null +++ b/frontend/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx new file mode 100644 index 0000000000000000000000000000000000000000..2bc5114945f93281031a6217d13dbc4442eb31cd --- /dev/null +++ b/frontend/src/App.tsx @@ -0,0 +1,165 @@ +import { useState } from 'react'; +import type { ChatMessage, ReasoningStep, TripRequest, Itinerary, BudgetBreakdown } from './types'; +import { sendChat, getExportUrl } from './api'; +import ChatPanel from './components/ChatPanel'; +import TripSidebar from './components/TripSidebar'; +import ItineraryView from './components/ItineraryView'; +import BudgetView from './components/BudgetView'; +import ReasoningSteps from './components/ReasoningSteps'; + +type Tab = 'itinerary' | 'budget' | 'weather' | 'checklist'; + +export default function App() { + const [tripId, setTripId] = useState(''); + const [messages, setMessages] = useState([ + { role: 'assistant', content: "Hi! I'm HolidayPilot 🌍 Where would you like to go? Tell me your destination, dates, budget, and travel style!" }, + ]); + const [tripData, setTripData] = useState(null); + const [itinerary, setItinerary] = useState(null); + const [budget, setBudget] = useState(null); + const [steps, setSteps] = useState([]); + const [loading, setLoading] = useState(false); + const [activeTab, setActiveTab] = useState('itinerary'); + + const handleSend = async (text: string) => { + const userMsg: ChatMessage = { role: 'user', content: text }; + setMessages(prev => [...prev, userMsg]); + setLoading(true); + + try { + const res = await sendChat(tripId, text); + setTripId(res.trip_id); + const assistantMsgs = res.messages.filter(m => m.role === 'assistant'); + setMessages(prev => [...prev, ...assistantMsgs]); + if (res.trip_data) setTripData(res.trip_data); + if (res.reasoning_steps.length) setSteps(res.reasoning_steps); + if (res.itinerary) setItinerary(res.itinerary); + if (res.budget) setBudget(res.budget); + } catch { + setMessages(prev => [...prev, { role: 'assistant', content: 'Sorry, something went wrong. Please try again.' }]); + } finally { + setLoading(false); + } + }; + + const tabs: { key: Tab; label: string }[] = [ + { key: 'itinerary', label: '📅 Itinerary' }, + { key: 'budget', label: '💰 Budget' }, + { key: 'weather', label: '🌤️ Weather' }, + { key: 'checklist', label: '✅ Checklist' }, + ]; + + return ( +
+ {/* Header */} +
+
+ 🌍 +

HolidayPilot

+
+
+ {tripId && ( + + 📥 Download Itinerary + + )} +
+
+ + {/* Main content */} +
+ {/* Left: Chat */} +
+ +
+ + {/* Middle: Trip sidebar (auto-filled from chat) */} +
+ + {steps.length > 0 && } +
+ + {/* Right: Results */} +
+ {/* Tabs */} +
+ {tabs.map(t => ( + + ))} +
+ + {/* Tab content */} +
+ {activeTab === 'itinerary' && ( + itinerary ? ( + + ) : ( + + ) + )} + {activeTab === 'budget' && ( + budget ? ( + + ) : ( + + ) + )} + {activeTab === 'weather' && ( + + )} + {activeTab === 'checklist' && ( + itinerary ? ( +
+

🎒 Packing List

+
    + {itinerary.packing_list.map((item, i) => ( +
  • + + {item} +
  • + ))} +
+

✅ Pre-Trip Checklist

+
    + {itinerary.checklist.map((item, i) => ( +
  • + + {item} +
  • + ))} +
+
+ ) : ( + + ) + )} +
+
+
+
+ ); +} + +function EmptyState({ icon, text }: { icon: string; text: string }) { + return ( +
+ {icon} +

{text}

+
+ ); +} diff --git a/frontend/src/api.ts b/frontend/src/api.ts new file mode 100644 index 0000000000000000000000000000000000000000..99dbea93409e21873d2e74eef63b82916ddb2fa0 --- /dev/null +++ b/frontend/src/api.ts @@ -0,0 +1,29 @@ +import type { ChatResponse } from './types'; + +const BASE = '/api'; + +export async function sendChat(tripId: string, message: string): Promise { + const res = await fetch(`${BASE}/chat`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ trip_id: tripId, message }), + }); + if (!res.ok) throw new Error(`Chat failed: ${res.status}`); + return res.json(); +} + +export async function getTrip(tripId: string) { + const res = await fetch(`${BASE}/trip/${tripId}`); + if (!res.ok) throw new Error(`Trip not found`); + return res.json(); +} + +export async function optimizeDay(tripId: string, day: number) { + const res = await fetch(`${BASE}/optimize?trip_id=${tripId}&day=${day}`, { method: 'POST' }); + if (!res.ok) throw new Error(`Optimize failed`); + return res.json(); +} + +export function getExportUrl(tripId: string, format: 'html' | 'pdf' = 'html') { + return `${BASE}/itinerary/export?trip_id=${tripId}&format=${format}`; +} diff --git a/frontend/src/components/BudgetView.tsx b/frontend/src/components/BudgetView.tsx new file mode 100644 index 0000000000000000000000000000000000000000..3d58be65fe88f936185487b3b635b370dfc1176a --- /dev/null +++ b/frontend/src/components/BudgetView.tsx @@ -0,0 +1,74 @@ +import type { BudgetBreakdown } from '../types'; + +interface Props { + budget: BudgetBreakdown; +} + +const categoryColors: Record = { + Flights: 'bg-red-400', + Accommodation: 'bg-blue-400', + Activities: 'bg-green-400', + Food: 'bg-yellow-400', + Transport: 'bg-purple-400', +}; + +export default function BudgetView({ budget }: Props) { + const pct = budget.total_budget > 0 ? (budget.total_estimated / budget.total_budget) * 100 : 0; + + return ( +
+ {/* Budget meter */} +
+
+

Budget Overview

+ + {budget.within_budget ? '✅ Within Budget' : '⚠️ Over Budget'} + +
+
+ Estimated: ${budget.total_estimated.toLocaleString()} + Budget: ${budget.total_budget.toLocaleString()} +
+
+
100 ? 'bg-red-500' : 'bg-green-500'}`} + style={{ width: `${Math.min(pct, 100)}%` }} + /> +
+
+ + {/* Category breakdown */} +
+ {budget.categories.map(cat => ( +
+
+
+
+ {cat.category} + ${cat.allocated.toLocaleString()} +
+
+
0 ? (cat.allocated / budget.total_estimated) * 100 : 0}%` }} + /> +
+
+
+ ))} +
+ + {/* Savings tips */} + {budget.savings_tips.length > 0 && ( +
+

💡 Savings Tips

+
    + {budget.savings_tips.map((tip, i) => ( +
  • • {tip}
  • + ))} +
+
+ )} +
+ ); +} diff --git a/frontend/src/components/ChatPanel.tsx b/frontend/src/components/ChatPanel.tsx new file mode 100644 index 0000000000000000000000000000000000000000..7dca9e339fe6612f9fdff2050cee3b161315a3b4 --- /dev/null +++ b/frontend/src/components/ChatPanel.tsx @@ -0,0 +1,74 @@ +import { useState, useRef, useEffect } from 'react'; +import type { ChatMessage } from '../types'; + +interface Props { + messages: ChatMessage[]; + onSend: (text: string) => void; + loading: boolean; +} + +export default function ChatPanel({ messages, onSend, loading }: Props) { + const [input, setInput] = useState(''); + const bottomRef = useRef(null); + + useEffect(() => { + bottomRef.current?.scrollIntoView({ behavior: 'smooth' }); + }, [messages]); + + const handleSubmit = (e: React.FormEvent) => { + e.preventDefault(); + const text = input.trim(); + if (!text || loading) return; + setInput(''); + onSend(text); + }; + + return ( + <> +
+ {messages.map((msg, i) => ( +
+
+
{msg.content}
+ {msg.agent && ( +
via {msg.agent} agent
+ )} +
+
+ ))} + {loading && ( +
+
+
+ + + +
+
+
+ )} +
+
+ +
+
+ setInput(e.target.value)} + placeholder="Tell me about your dream trip..." + className="flex-1 border border-gray-300 rounded-lg px-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent" + disabled={loading} + /> + +
+
+ + ); +} diff --git a/frontend/src/components/ItineraryView.tsx b/frontend/src/components/ItineraryView.tsx new file mode 100644 index 0000000000000000000000000000000000000000..a502bfda687edd5ff93fd31fa85baafa703eaa29 --- /dev/null +++ b/frontend/src/components/ItineraryView.tsx @@ -0,0 +1,119 @@ +import type { Itinerary, DayPlan, ItineraryItem } from '../types'; +import { optimizeDay } from '../api'; + +interface Props { + itinerary: Itinerary; + tripId: string; +} + +const categoryIcons: Record = { + flight: '✈️', + hotel: '🏨', + activity: '🎯', + food: '🍽️', + transport: '🚗', +}; + +export default function ItineraryView({ itinerary, tripId }: Props) { + const handleRegenerate = async (day: number) => { + try { + await optimizeDay(tripId, day); + } catch { + // handle error + } + }; + + return ( +
+ {/* Summary card */} +
+

Trip Summary

+
+
+
Total Cost
+
${itinerary.total_cost.toLocaleString()}
+
+
+
Travel Time
+
{itinerary.travel_time_hours}h
+
+
+
Flexibility
+
{Math.round(itinerary.flexibility_score * 100)}%
+
+
+
+ + {/* Day plans */} + {itinerary.days.map(day => ( + handleRegenerate(day.day)} /> + ))} +
+ ); +} + +function DayCard({ day, onRegenerate }: { day: DayPlan; onRegenerate: () => void }) { + return ( +
+
+
+

Day {day.day} — {day.title || day.date}

+ {day.weather && ( + + {day.weather.condition} · {day.weather.high_temp_c}°/{day.weather.low_temp_c}°C + + )} +
+
+ ${day.daily_spend.toFixed(0)} + +
+
+
+ {day.items.map(item => ( + + ))} +
+
+ ); +} + +function ItemRow({ item }: { item: ItineraryItem }) { + return ( +
+
+ {categoryIcons[item.category] || '📌'} +
+
+ {item.title} + {item.cost > 0 && ( + ${item.cost.toFixed(0)} + )} +
+ {item.start_time && ( +
{item.start_time} — {item.end_time}
+ )} + {item.description && ( +
{item.description}
+ )} + {item.reasoning && ( +
Why: {item.reasoning}
+ )} + {item.weather_note && ( +
⚠️ {item.weather_note}
+ )} + {item.backup && ( +
+ Backup: {item.backup.title} +
+ )} +
+
+
+ ); +} diff --git a/frontend/src/components/ReasoningSteps.tsx b/frontend/src/components/ReasoningSteps.tsx new file mode 100644 index 0000000000000000000000000000000000000000..117874da6e338bd058749cd2f93b0dc67ba001b6 --- /dev/null +++ b/frontend/src/components/ReasoningSteps.tsx @@ -0,0 +1,38 @@ +import type { ReasoningStep } from '../types'; + +interface Props { + steps: ReasoningStep[]; +} + +const agentIcons: Record = { + planner: '🧠', + flights: '✈️', + hotels: '🏨', + activities: '🎯', + food: '🍽️', + route: '🗺️', + weather: '🌤️', + budget: '💰', + calendar: '📅', + monitoring: '🔔', +}; + +export default function ReasoningSteps({ steps }: Props) { + return ( +
+

Agent Activity

+
+ {steps.map((step, i) => ( +
+ {agentIcons[step.agent] || '⚙️'} +
+
{step.agent}
+
{step.result_summary}
+
+ {step.duration_ms}ms +
+ ))} +
+
+ ); +} diff --git a/frontend/src/components/TripSidebar.tsx b/frontend/src/components/TripSidebar.tsx new file mode 100644 index 0000000000000000000000000000000000000000..09970d1a0dc9526d059b9b479d2b4b3b8127abde --- /dev/null +++ b/frontend/src/components/TripSidebar.tsx @@ -0,0 +1,42 @@ +import type { TripRequest } from '../types'; + +interface Props { + trip: TripRequest | null; +} + +export default function TripSidebar({ trip }: Props) { + return ( +
+

Trip Details

+
+ + + + + + + {trip?.interests && trip.interests.length > 0 && ( +
+ Interests +
+ {trip.interests.map((i, idx) => ( + {i} + ))} +
+
+ )} +
+
+ ); +} + +function Field({ label, value }: { label: string; value?: string }) { + return ( +
+ {label} +
+ {value || 'Not set'} +
+
+ ); +} diff --git a/frontend/src/index.css b/frontend/src/index.css new file mode 100644 index 0000000000000000000000000000000000000000..7fa395845f8bf7ab1e86d4bc0c7079eeeadb69e9 --- /dev/null +++ b/frontend/src/index.css @@ -0,0 +1,15 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +body { + @apply antialiased text-gray-900; +} + +.chat-bubble-user { + @apply bg-primary-600 text-white rounded-2xl rounded-br-sm px-4 py-2 max-w-[80%] ml-auto; +} + +.chat-bubble-assistant { + @apply bg-white border border-gray-200 rounded-2xl rounded-bl-sm px-4 py-2 max-w-[80%] shadow-sm; +} diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx new file mode 100644 index 0000000000000000000000000000000000000000..964aeb4c7e319369c436eee8b594c40cceab10fc --- /dev/null +++ b/frontend/src/main.tsx @@ -0,0 +1,10 @@ +import React from 'react' +import ReactDOM from 'react-dom/client' +import App from './App' +import './index.css' + +ReactDOM.createRoot(document.getElementById('root')!).render( + + + , +) diff --git a/frontend/src/types.ts b/frontend/src/types.ts new file mode 100644 index 0000000000000000000000000000000000000000..ba925fb9242147731b802f2823306bd04cda5a94 --- /dev/null +++ b/frontend/src/types.ts @@ -0,0 +1,116 @@ +export interface TravelerProfile { + name: string; + age?: number; + dietary_restrictions: string[]; + accessibility_needs: string[]; + interests: string[]; +} + +export interface TripRequest { + trip_id: string; + destination: string; + origin: string; + start_date: string | null; + end_date: string | null; + budget_total: number | null; + budget_currency: string; + travelers: TravelerProfile[]; + mood: string; + interests: string[]; + constraints: string[]; + notes: string; +} + +export interface ChatMessage { + role: string; + content: string; + agent?: string; + metadata?: Record; + timestamp?: string; +} + +export interface ReasoningStep { + agent: string; + action: string; + result_summary: string; + duration_ms: number; +} + +export interface ChatResponse { + trip_id: string; + messages: ChatMessage[]; + trip_data: TripRequest | null; + reasoning_steps: ReasoningStep[]; + itinerary: Itinerary | null; + budget: BudgetBreakdown | null; +} + +export interface ItineraryItem { + id: string; + day: number; + start_time: string | null; + end_time: string | null; + title: string; + category: string; + description: string; + location: string; + cost: number; + currency: string; + reasoning: string; + weather_note: string; + confirmed: boolean; + backup: ItineraryItem | null; +} + +export interface WeatherForecast { + date: string; + high_temp_c: number; + low_temp_c: number; + condition: string; + precipitation_pct: number; + recommendation: string; +} + +export interface DayPlan { + day: number; + date: string; + title: string; + items: ItineraryItem[]; + weather: WeatherForecast | null; + daily_spend: number; +} + +export interface Itinerary { + trip_id: string; + days: DayPlan[]; + total_cost: number; + currency: string; + flexibility_score: number; + travel_time_hours: number; + packing_list: string[]; + checklist: string[]; +} + +export interface BudgetCategory { + category: string; + allocated: number; + spent: number; + items: string[]; +} + +export interface BudgetBreakdown { + total_budget: number; + total_estimated: number; + currency: string; + categories: BudgetCategory[]; + within_budget: boolean; + savings_tips: string[]; +} + +export interface PlanResult { + trip_id: string; + plan_summary: string; + itinerary: Itinerary; + budget: BudgetBreakdown; + reasoning_steps: ReasoningStep[]; +} diff --git a/frontend/src/vite-env.d.ts b/frontend/src/vite-env.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..11f02fe2a0061d6e6e1f271b21da95423b448b32 --- /dev/null +++ b/frontend/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js new file mode 100644 index 0000000000000000000000000000000000000000..8d1a606f05462547c0bd3c12dfee9982b5cd384f --- /dev/null +++ b/frontend/tailwind.config.js @@ -0,0 +1,13 @@ +/** @type {import('tailwindcss').Config} */ +export default { + content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"], + theme: { + extend: { + colors: { + primary: { 50: '#eff6ff', 100: '#dbeafe', 500: '#3b82f6', 600: '#2563eb', 700: '#1d4ed8', 900: '#1e3a8a' }, + accent: { 50: '#f0fdf4', 100: '#dcfce7', 500: '#22c55e', 600: '#16a34a' }, + }, + }, + }, + plugins: [], +} diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..20fb0a0cc826c93d33e33f10a48ab835e9343fe6 --- /dev/null +++ b/frontend/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "forceConsistentCasingInFileNames": true + }, + "include": ["src"] +} diff --git a/frontend/tsconfig.tsbuildinfo b/frontend/tsconfig.tsbuildinfo new file mode 100644 index 0000000000000000000000000000000000000000..6ce2d230777c3f5868cde7032004bfe500fc79c6 --- /dev/null +++ b/frontend/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"root":["./src/App.tsx","./src/api.ts","./src/main.tsx","./src/types.ts","./src/vite-env.d.ts","./src/components/BudgetView.tsx","./src/components/ChatPanel.tsx","./src/components/ItineraryView.tsx","./src/components/ReasoningSteps.tsx","./src/components/TripSidebar.tsx"],"version":"5.9.3"} \ No newline at end of file diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts new file mode 100644 index 0000000000000000000000000000000000000000..69163ad8a5ab18edfa0718174917eb6162575575 --- /dev/null +++ b/frontend/vite.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +export default defineConfig({ + plugins: [react()], + server: { + proxy: { + '/api': 'http://localhost:8000', + }, + }, +})