lifx-emulator 3.1.0__py3-none-any.whl → 4.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. {lifx_emulator-3.1.0.dist-info → lifx_emulator-4.2.0.dist-info}/METADATA +2 -1
  2. lifx_emulator-4.2.0.dist-info/RECORD +43 -0
  3. lifx_emulator_app/__main__.py +693 -137
  4. lifx_emulator_app/api/__init__.py +0 -4
  5. lifx_emulator_app/api/app.py +122 -16
  6. lifx_emulator_app/api/models.py +32 -1
  7. lifx_emulator_app/api/routers/__init__.py +5 -1
  8. lifx_emulator_app/api/routers/devices.py +64 -10
  9. lifx_emulator_app/api/routers/products.py +42 -0
  10. lifx_emulator_app/api/routers/scenarios.py +55 -52
  11. lifx_emulator_app/api/routers/websocket.py +70 -0
  12. lifx_emulator_app/api/services/__init__.py +21 -4
  13. lifx_emulator_app/api/services/device_service.py +188 -1
  14. lifx_emulator_app/api/services/event_bridge.py +234 -0
  15. lifx_emulator_app/api/services/scenario_service.py +153 -0
  16. lifx_emulator_app/api/services/websocket_manager.py +326 -0
  17. lifx_emulator_app/api/static/_app/env.js +1 -0
  18. lifx_emulator_app/api/static/_app/immutable/assets/0.DOQLX7EM.css +1 -0
  19. lifx_emulator_app/api/static/_app/immutable/assets/2.CU0O2Xrb.css +1 -0
  20. lifx_emulator_app/api/static/_app/immutable/chunks/BORyfda6.js +1 -0
  21. lifx_emulator_app/api/static/_app/immutable/chunks/BTLkiQR5.js +1 -0
  22. lifx_emulator_app/api/static/_app/immutable/chunks/BaoxLdOF.js +2 -0
  23. lifx_emulator_app/api/static/_app/immutable/chunks/Binc8JbE.js +1 -0
  24. lifx_emulator_app/api/static/_app/immutable/chunks/CDSQEL5N.js +1 -0
  25. lifx_emulator_app/api/static/_app/immutable/chunks/DfIkQq0Y.js +1 -0
  26. lifx_emulator_app/api/static/_app/immutable/chunks/MAGDeS2Z.js +1 -0
  27. lifx_emulator_app/api/static/_app/immutable/chunks/N3z8axFy.js +1 -0
  28. lifx_emulator_app/api/static/_app/immutable/chunks/yhjkpkcN.js +1 -0
  29. lifx_emulator_app/api/static/_app/immutable/entry/app.Dhwm664s.js +2 -0
  30. lifx_emulator_app/api/static/_app/immutable/entry/start.Nqz6UJJT.js +1 -0
  31. lifx_emulator_app/api/static/_app/immutable/nodes/0.CPncm6RP.js +1 -0
  32. lifx_emulator_app/api/static/_app/immutable/nodes/1.x-f3libw.js +1 -0
  33. lifx_emulator_app/api/static/_app/immutable/nodes/2.BP5Yvqf4.js +6 -0
  34. lifx_emulator_app/api/static/_app/version.json +1 -0
  35. lifx_emulator_app/api/static/index.html +38 -0
  36. lifx_emulator_app/api/static/robots.txt +3 -0
  37. lifx_emulator_app/config.py +316 -0
  38. lifx_emulator-3.1.0.dist-info/RECORD +0 -19
  39. lifx_emulator_app/api/static/dashboard.js +0 -588
  40. lifx_emulator_app/api/templates/dashboard.html +0 -357
  41. {lifx_emulator-3.1.0.dist-info → lifx_emulator-4.2.0.dist-info}/WHEEL +0 -0
  42. {lifx_emulator-3.1.0.dist-info → lifx_emulator-4.2.0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,326 @@
1
+ """WebSocket connection manager for real-time updates.
2
+
3
+ Manages WebSocket client connections, topic subscriptions, and message broadcasting.
4
+ """
5
+
6
+ from __future__ import annotations
7
+
8
+ import asyncio
9
+ import logging
10
+ from dataclasses import dataclass, field
11
+ from enum import Enum
12
+ from typing import TYPE_CHECKING, Any
13
+
14
+ from fastapi import WebSocket
15
+
16
+ if TYPE_CHECKING:
17
+ from lifx_emulator.server import EmulatedLifxServer
18
+
19
+ logger = logging.getLogger(__name__)
20
+
21
+
22
+ class Topic(str, Enum):
23
+ """Topics that clients can subscribe to."""
24
+
25
+ STATS = "stats"
26
+ DEVICES = "devices"
27
+ ACTIVITY = "activity"
28
+ SCENARIOS = "scenarios"
29
+
30
+
31
+ class MessageType(str, Enum):
32
+ """WebSocket message types."""
33
+
34
+ # Server → Client
35
+ STATS = "stats"
36
+ DEVICE_ADDED = "device_added"
37
+ DEVICE_REMOVED = "device_removed"
38
+ DEVICE_UPDATED = "device_updated"
39
+ ACTIVITY = "activity"
40
+ SCENARIO_CHANGED = "scenario_changed"
41
+ SYNC = "sync"
42
+ ERROR = "error"
43
+
44
+ # Client → Server
45
+ SUBSCRIBE = "subscribe"
46
+
47
+
48
+ @dataclass
49
+ class ClientConnection:
50
+ """Represents a connected WebSocket client."""
51
+
52
+ websocket: WebSocket
53
+ subscriptions: set[Topic] = field(default_factory=set)
54
+
55
+
56
+ class WebSocketManager:
57
+ """Manages WebSocket connections and message broadcasting.
58
+
59
+ Handles:
60
+ - Client connection lifecycle (connect/disconnect)
61
+ - Topic subscriptions
62
+ - Broadcasting messages to subscribed clients
63
+ - Full state sync on request
64
+ """
65
+
66
+ def __init__(self, server: EmulatedLifxServer) -> None:
67
+ """Initialize the WebSocket manager.
68
+
69
+ Args:
70
+ server: The LIFX emulator server instance for state access
71
+ """
72
+ self._server = server
73
+ self._clients: dict[WebSocket, ClientConnection] = {}
74
+ self._lock = asyncio.Lock()
75
+
76
+ @property
77
+ def client_count(self) -> int:
78
+ """Return the number of connected clients."""
79
+ return len(self._clients)
80
+
81
+ async def connect(self, websocket: WebSocket) -> None:
82
+ """Accept a new WebSocket connection.
83
+
84
+ Args:
85
+ websocket: The WebSocket to accept
86
+ """
87
+ await websocket.accept()
88
+ async with self._lock:
89
+ self._clients[websocket] = ClientConnection(websocket=websocket)
90
+ logger.info("WebSocket client connected (%d total)", self.client_count)
91
+
92
+ async def disconnect(self, websocket: WebSocket) -> None:
93
+ """Remove a disconnected WebSocket client.
94
+
95
+ Args:
96
+ websocket: The WebSocket to remove
97
+ """
98
+ async with self._lock:
99
+ self._clients.pop(websocket, None)
100
+ logger.info("WebSocket client disconnected (%d remaining)", self.client_count)
101
+
102
+ async def subscribe(self, websocket: WebSocket, topics: list[str]) -> None:
103
+ """Subscribe a client to topics.
104
+
105
+ Args:
106
+ websocket: The client's WebSocket
107
+ topics: List of topic names to subscribe to
108
+ """
109
+ async with self._lock:
110
+ client = self._clients.get(websocket)
111
+ if client:
112
+ for topic_name in topics:
113
+ try:
114
+ topic = Topic(topic_name)
115
+ client.subscriptions.add(topic)
116
+ except ValueError:
117
+ logger.warning("Unknown topic: %s", topic_name)
118
+ logger.debug(
119
+ "Client subscribed to: %s",
120
+ [t.value for t in client.subscriptions],
121
+ )
122
+
123
+ async def handle_message(self, websocket: WebSocket, data: dict[str, Any]) -> None:
124
+ """Handle an incoming message from a client.
125
+
126
+ Args:
127
+ websocket: The client's WebSocket
128
+ data: The parsed JSON message
129
+ """
130
+ msg_type = data.get("type")
131
+
132
+ if msg_type == MessageType.SUBSCRIBE.value:
133
+ topics = data.get("topics", [])
134
+ await self.subscribe(websocket, topics)
135
+
136
+ elif msg_type == "sync":
137
+ await self._send_full_sync(websocket)
138
+
139
+ else:
140
+ logger.warning("Unknown message type: %s", msg_type)
141
+ await self._send_error(websocket, f"Unknown message type: {msg_type}")
142
+
143
+ async def _send_full_sync(self, websocket: WebSocket) -> None:
144
+ """Send full state sync to a client.
145
+
146
+ Args:
147
+ websocket: The client's WebSocket
148
+ """
149
+ from lifx_emulator_app.api.mappers.device_mapper import DeviceMapper
150
+
151
+ client = self._clients.get(websocket)
152
+ if not client:
153
+ return
154
+
155
+ sync_data: dict[str, Any] = {}
156
+
157
+ if Topic.STATS in client.subscriptions:
158
+ sync_data["stats"] = self._server.get_stats()
159
+
160
+ if Topic.DEVICES in client.subscriptions:
161
+ devices = self._server.get_all_devices()
162
+ sync_data["devices"] = [
163
+ DeviceMapper.to_device_info(d).model_dump() for d in devices
164
+ ]
165
+
166
+ if Topic.ACTIVITY in client.subscriptions:
167
+ sync_data["activity"] = self._server.get_recent_activity()
168
+
169
+ if Topic.SCENARIOS in client.subscriptions:
170
+ sync_data["scenarios"] = self._get_all_scenarios()
171
+
172
+ await self._send_to_client(
173
+ websocket, {"type": MessageType.SYNC.value, "data": sync_data}
174
+ )
175
+
176
+ def _get_all_scenarios(self) -> dict[str, Any]:
177
+ """Get all scenario configurations."""
178
+ manager = self._server.scenario_manager
179
+ return {
180
+ "global": (
181
+ manager.global_scenario.model_dump()
182
+ if manager.global_scenario
183
+ else None
184
+ ),
185
+ "devices": {
186
+ serial: config.model_dump()
187
+ for serial, config in manager.device_scenarios.items()
188
+ },
189
+ "types": {
190
+ dtype: config.model_dump()
191
+ for dtype, config in manager.type_scenarios.items()
192
+ },
193
+ "locations": {
194
+ loc: config.model_dump()
195
+ for loc, config in manager.location_scenarios.items()
196
+ },
197
+ "groups": {
198
+ grp: config.model_dump()
199
+ for grp, config in manager.group_scenarios.items()
200
+ },
201
+ }
202
+
203
+ async def _send_error(self, websocket: WebSocket, message: str) -> None:
204
+ """Send an error message to a client.
205
+
206
+ Args:
207
+ websocket: The client's WebSocket
208
+ message: The error message
209
+ """
210
+ await self._send_to_client(
211
+ websocket, {"type": MessageType.ERROR.value, "message": message}
212
+ )
213
+
214
+ async def _send_to_client(
215
+ self, websocket: WebSocket, message: dict[str, Any]
216
+ ) -> None:
217
+ """Send a message to a specific client.
218
+
219
+ Args:
220
+ websocket: The client's WebSocket
221
+ message: The message to send
222
+ """
223
+ try:
224
+ await websocket.send_json(message)
225
+ except Exception:
226
+ logger.exception("Failed to send message to client")
227
+ await self.disconnect(websocket)
228
+
229
+ async def broadcast(
230
+ self, topic: Topic, message_type: MessageType, data: dict[str, Any]
231
+ ) -> None:
232
+ """Broadcast a message to all clients subscribed to a topic.
233
+
234
+ Args:
235
+ topic: The topic to broadcast to
236
+ message_type: The type of message
237
+ data: The message data
238
+ """
239
+ message = {"type": message_type.value, "data": data}
240
+
241
+ async with self._lock:
242
+ clients_to_notify = [
243
+ client.websocket
244
+ for client in self._clients.values()
245
+ if topic in client.subscriptions
246
+ ]
247
+
248
+ if not clients_to_notify:
249
+ return
250
+
251
+ # Send to all subscribed clients concurrently
252
+ results = await asyncio.gather(
253
+ *[ws.send_json(message) for ws in clients_to_notify],
254
+ return_exceptions=True,
255
+ )
256
+
257
+ # Handle any failed sends
258
+ for ws, result in zip(clients_to_notify, results):
259
+ if isinstance(result, Exception):
260
+ logger.warning("Failed to send to client: %s", result)
261
+ await self.disconnect(ws)
262
+
263
+ async def broadcast_stats(self, stats: dict[str, Any]) -> None:
264
+ """Broadcast stats update to subscribed clients.
265
+
266
+ Args:
267
+ stats: The server statistics
268
+ """
269
+ await self.broadcast(Topic.STATS, MessageType.STATS, stats)
270
+
271
+ async def broadcast_device_added(self, device_info: dict[str, Any]) -> None:
272
+ """Broadcast device added event.
273
+
274
+ Args:
275
+ device_info: The new device information
276
+ """
277
+ await self.broadcast(Topic.DEVICES, MessageType.DEVICE_ADDED, device_info)
278
+
279
+ async def broadcast_device_removed(self, serial: str) -> None:
280
+ """Broadcast device removed event.
281
+
282
+ Args:
283
+ serial: The serial of the removed device
284
+ """
285
+ await self.broadcast(
286
+ Topic.DEVICES, MessageType.DEVICE_REMOVED, {"serial": serial}
287
+ )
288
+
289
+ async def broadcast_device_updated(
290
+ self, serial: str, changes: dict[str, Any]
291
+ ) -> None:
292
+ """Broadcast device updated event.
293
+
294
+ Args:
295
+ serial: The serial of the updated device
296
+ changes: The changed fields
297
+ """
298
+ await self.broadcast(
299
+ Topic.DEVICES,
300
+ MessageType.DEVICE_UPDATED,
301
+ {"serial": serial, "changes": changes},
302
+ )
303
+
304
+ async def broadcast_activity(self, event: dict[str, Any]) -> None:
305
+ """Broadcast activity event.
306
+
307
+ Args:
308
+ event: The activity event data
309
+ """
310
+ await self.broadcast(Topic.ACTIVITY, MessageType.ACTIVITY, event)
311
+
312
+ async def broadcast_scenario_changed(
313
+ self, scope: str, identifier: str | None, config: dict[str, Any] | None
314
+ ) -> None:
315
+ """Broadcast scenario changed event.
316
+
317
+ Args:
318
+ scope: The scenario scope (global, device, type, location, group)
319
+ identifier: The scope identifier (serial, type name, etc.)
320
+ config: The new scenario configuration (None if deleted)
321
+ """
322
+ await self.broadcast(
323
+ Topic.SCENARIOS,
324
+ MessageType.SCENARIO_CHANGED,
325
+ {"scope": scope, "identifier": identifier, "config": config},
326
+ )
@@ -0,0 +1 @@
1
+ export const env={}
@@ -0,0 +1 @@
1
+ :root{--bg-primary: #0a0a0a;--bg-secondary: #1a1a1a;--bg-tertiary: #252525;--bg-input: #0d0d0d;--border-primary: #333;--border-secondary: #2a2a2a;--text-primary: #fff;--text-secondary: #e0e0e0;--text-muted: #888;--text-dimmed: #666;--accent-primary: #4a9eff;--accent-hover: #6bb0ff;--accent-success: #2d5;--accent-danger: #d32f2f;--accent-danger-hover: #e57373;--font-mono: "Monaco", "Courier New", monospace;--font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif}[data-theme=light]{--bg-primary: #f5f5f5;--bg-secondary: #fff;--bg-tertiary: #e8e8e8;--bg-input: #fff;--border-primary: #ddd;--border-secondary: #e5e5e5;--text-primary: #111;--text-secondary: #333;--text-muted: #666;--text-dimmed: #999;--accent-primary: #0066cc;--accent-hover: #0055aa}*{margin:0;padding:0;box-sizing:border-box}html,body{height:100%}body{font-family:var(--font-system);background:var(--bg-primary);color:var(--text-secondary);line-height:1.6}.container{max-width:1400px;margin:0 auto;padding:20px}h1{color:var(--text-primary);font-size:2em;margin-bottom:10px}h2{color:var(--text-primary);font-size:1.2em;margin-bottom:15px}.subtitle{color:var(--text-muted);margin-bottom:30px}.card{background:var(--bg-secondary);border:1px solid var(--border-primary);border-radius:8px;padding:20px}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:15px;margin-bottom:25px}.devices-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px}.btn{background:var(--accent-primary);color:#000;border:none;padding:4px 8px;border-radius:3px;cursor:pointer;font-weight:600;font-size:.75em;transition:background .15s}.btn:hover{background:var(--accent-hover)}.btn-delete{background:var(--accent-danger);color:#fff}.btn-delete:hover{background:var(--accent-danger-hover)}.btn-sm{padding:2px 6px;font-size:.7em}.form-group{margin-bottom:15px}.form-group label{display:block;color:var(--text-muted);margin-bottom:5px;font-size:.9em}.form-group input,.form-group select{width:100%;background:var(--bg-input);border:1px solid var(--border-primary);color:var(--text-primary);padding:8px;border-radius:4px}.form-group input:focus,.form-group select:focus{outline:none;border-color:var(--accent-primary)}.toolbar-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.form-row{display:flex;gap:10px;align-items:flex-end}.form-row .form-group{flex:1;margin-bottom:0}.form-row .btn{padding:8px 16px;height:fit-content;white-space:nowrap}.stat{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--border-secondary)}.stat:last-child{border-bottom:none}.stat-label{color:var(--text-muted)}.stat-value{color:var(--text-primary);font-weight:600}.status-indicator{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--accent-success)}.status-indicator.connecting{background:#f9a825;animation:pulse 1s infinite}.status-indicator.disconnected,.status-indicator.error{background:var(--accent-danger)}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.badge{display:inline-block;padding:2px 6px;border-radius:3px;font-size:.7em;font-weight:600;margin-right:4px;margin-bottom:2px}.badge-power-on{background:var(--accent-success);color:#000}.badge-power-off{background:#555;color:#aaa}.badge-capability{background:var(--border-primary);color:var(--accent-primary)}.badge-extended-mz{background:#2d4a2d;color:#5dff5d}.device{background:var(--bg-tertiary);border:1px solid var(--border-primary);border-radius:6px;padding:8px;font-size:.85em}.device-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.device-serial{font-family:var(--font-mono);color:var(--accent-primary);font-weight:700;font-size:.9em}.device-label{color:var(--text-muted);font-size:.85em}.toggle-link{cursor:pointer;color:var(--accent-primary);font-size:.8em;margin-top:4px;-webkit-user-select:none;user-select:none;background:none;border:none;padding:0;font-family:inherit;text-align:left;display:block;width:100%}.toggle-link:hover{color:var(--accent-hover)}.toggle-link:focus{outline:1px dashed var(--accent-primary);outline-offset:2px}.zone-strip{display:flex;height:20px;border-radius:3px;overflow:hidden;margin-top:4px}.zone-segment{flex:1;min-width:4px}.tile-grid{display:grid;gap:2px;margin-top:4px}.tile-zone{width:8px;height:8px;border-radius:1px}.tiles-container{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}.tile-item{display:inline-block}.tile-label{font-size:.7em;color:var(--text-dimmed);margin-bottom:2px;text-align:center}.color-swatch{display:inline-block;width:16px;height:16px;border-radius:3px;border:1px solid var(--border-primary);vertical-align:middle;margin-right:4px}.metadata-display{font-size:.75em;color:var(--text-muted);padding:6px;background:var(--bg-secondary);border-radius:3px;border:1px solid var(--border-primary);margin-top:6px}.metadata-row{display:flex;justify-content:space-between;padding:2px 0}.metadata-label{color:var(--text-dimmed)}.metadata-value{color:var(--text-muted);font-family:var(--font-mono)}.activity-filters{display:flex;gap:10px;margin-bottom:15px;flex-wrap:wrap;align-items:flex-end}.filter-group{display:flex;flex-direction:column;gap:4px}.filter-group label{color:var(--text-muted);font-size:.85em}.filter-group select,.filter-group input{background:var(--bg-input);border:1px solid var(--border-primary);color:var(--text-primary);padding:6px 8px;border-radius:4px;font-size:.85em;min-width:150px}.filter-group select:focus,.filter-group input:focus{outline:none;border-color:var(--accent-primary)}.activity-log{background:var(--bg-input);border:1px solid var(--border-primary);border-radius:6px;padding:15px;max-height:400px;overflow-y:auto;font-family:var(--font-mono);font-size:.85em}.activity-item{padding:6px 0;border-bottom:1px solid var(--bg-secondary);display:flex;gap:10px}.activity-item:last-child{border-bottom:none}.activity-time{color:var(--text-dimmed);min-width:80px}.activity-rx{color:var(--accent-primary)}.activity-tx{color:#f9a825}.activity-packet{color:var(--text-muted)}.no-devices{text-align:center;color:var(--text-dimmed);padding:40px}.header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.header-title,.header-controls{display:flex;align-items:center;gap:10px}.theme-toggle{background:var(--bg-tertiary);border:1px solid var(--border-primary);color:var(--text-secondary);padding:4px 8px;border-radius:4px;cursor:pointer;font-size:.85em}.theme-toggle:hover{border-color:var(--accent-primary)}
@@ -0,0 +1 @@
1
+ .header-controls.svelte-1elxaub{display:flex;align-items:center;gap:8px}.control-btn.svelte-1elxaub{display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:6px;cursor:pointer;font-size:1.1em;color:var(--text-muted);transition:all .15s ease}.control-btn.svelte-1elxaub:hover{background:var(--bg-hover);color:var(--text-primary)}.control-btn.active.svelte-1elxaub{background:var(--accent-primary);border-color:var(--accent-primary);color:#fff}.toolbar-header.svelte-zw83d1{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;flex-wrap:wrap;gap:12px}.toolbar-actions.svelte-zw83d1{display:flex;align-items:center;gap:12px}.view-toggle.svelte-zw83d1{display:flex;border:1px solid var(--border-color);border-radius:4px;overflow:hidden}.view-btn.svelte-zw83d1{display:flex;align-items:center;justify-content:center;width:32px;height:28px;background:var(--bg-secondary);border:none;cursor:pointer;color:var(--text-muted);transition:all .15s ease}.view-btn.svelte-zw83d1:hover{background:var(--bg-hover)}.view-btn.active.svelte-zw83d1{background:var(--accent-primary);color:#fff}.view-btn.svelte-zw83d1:first-child{border-right:1px solid var(--border-color)}.page-size.svelte-zw83d1{display:flex;align-items:center;gap:6px;font-size:.85em}.page-size.svelte-zw83d1 label:where(.svelte-zw83d1){color:var(--text-muted)}.page-size.svelte-zw83d1 select:where(.svelte-zw83d1){padding:4px 8px;border:1px solid var(--border-color);border-radius:4px;background:var(--bg-input);color:var(--text-primary);font-size:.9em}.pagination.svelte-qz4xni{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:16px;padding-top:12px;border-top:1px solid var(--border-color)}.page-info.svelte-qz4xni{font-size:.9em;color:var(--text-muted)}.table-container.svelte-14519bm{overflow-x:auto}.device-table.svelte-14519bm{width:100%;border-collapse:collapse;font-size:.85em}.device-table.svelte-14519bm th:where(.svelte-14519bm),.device-table.svelte-14519bm td:where(.svelte-14519bm){padding:8px 12px;text-align:left;border-bottom:1px solid var(--border-color)}.device-table.svelte-14519bm th:where(.svelte-14519bm){font-weight:600;color:var(--text-muted);font-size:.9em;text-transform:uppercase;letter-spacing:.5px}.device-table.svelte-14519bm tbody:where(.svelte-14519bm) tr:where(.svelte-14519bm):hover{background:var(--bg-hover)}.cell-serial.svelte-14519bm{font-family:monospace;color:var(--text-primary)}.cell-label.svelte-14519bm{font-weight:500}.cell-product.svelte-14519bm{color:var(--text-muted);font-size:.9em}.power-badge.svelte-14519bm{display:inline-block;padding:2px 8px;border-radius:3px;font-size:.8em;font-weight:500}.power-on.svelte-14519bm{background:#4caf5033;color:#4caf50}.power-off.svelte-14519bm{background:#9e9e9e33;color:var(--text-dimmed)}.color-swatch.svelte-14519bm{display:inline-block;width:24px;height:24px;border-radius:4px;border:1px solid var(--border-color);vertical-align:middle}.zone-mini-strip.svelte-14519bm{display:flex;align-items:center;gap:1px}.zone-mini.svelte-14519bm{width:6px;height:16px;border-radius:1px}.more-zones.svelte-14519bm{font-size:.75em;color:var(--text-dimmed);margin-left:4px}.no-color.svelte-14519bm{color:var(--text-dimmed)}.no-devices.svelte-14519bm{padding:20px;text-align:center;color:var(--text-dimmed)}.pagination.svelte-14519bm{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:16px;padding-top:12px;border-top:1px solid var(--border-color)}.page-info.svelte-14519bm{font-size:.9em;color:var(--text-muted)}.activity-disabled.svelte-i8zsux{padding:20px;text-align:center;color:var(--text-muted)}.activity-disabled.svelte-i8zsux p:where(.svelte-i8zsux){margin:8px 0}.activity-disabled.svelte-i8zsux .hint:where(.svelte-i8zsux){font-size:.85em;color:var(--text-dimmed)}.activity-disabled.svelte-i8zsux code:where(.svelte-i8zsux){background:var(--bg-secondary);padding:2px 6px;border-radius:3px;font-family:monospace}.scope-tabs.svelte-15drtwo{display:flex;gap:4px;border-bottom:1px solid var(--border-color);padding-bottom:8px;margin-bottom:12px}.scope-tab.svelte-15drtwo{padding:6px 12px;background:transparent;border:1px solid var(--border-color);border-radius:4px;cursor:pointer;font-size:.85em;color:var(--text-muted);transition:all .15s ease}.scope-tab.svelte-15drtwo:hover{background:var(--bg-hover)}.scope-tab.active.svelte-15drtwo{background:var(--accent-primary);color:#fff;border-color:var(--accent-primary)}.scenario-form.svelte-15drtwo{margin-top:16px}.form-section.svelte-15drtwo{margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid var(--border-color)}.form-section.svelte-15drtwo:last-child{border-bottom:none}.section-header.svelte-15drtwo{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.section-title.svelte-15drtwo{font-weight:500;font-size:.9em}.section-desc.svelte-15drtwo{font-size:.8em;color:var(--text-dimmed);margin:4px 0 8px}.inline-row.svelte-15drtwo{display:flex;align-items:center;gap:8px;margin-bottom:6px}.form-section.svelte-15drtwo input[type=text]:where(.svelte-15drtwo),.form-section.svelte-15drtwo input[type=number]:where(.svelte-15drtwo){padding:6px 10px;border:1px solid var(--border-color);border-radius:4px;background:var(--bg-input);color:var(--text-primary);font-size:.85em}.form-section.svelte-15drtwo input[type=text]:where(.svelte-15drtwo){width:100%}.checkbox-label.svelte-15drtwo{display:flex;align-items:center;gap:8px;cursor:pointer;font-weight:500;font-size:.9em}.checkbox-label.svelte-15drtwo input[type=checkbox]:where(.svelte-15drtwo){width:16px;height:16px}.message.svelte-15drtwo{margin:12px 0;padding:8px 12px;border-radius:4px;font-size:.85em}.message.error.svelte-15drtwo{background:#ff64641a;color:var(--accent-danger)}.message.success.svelte-15drtwo{background:#64ff641a;color:var(--accent-success, #4caf50)}.actions.svelte-15drtwo{display:flex;gap:8px;margin-top:16px}.tabs.svelte-1uha8ag{display:flex;gap:4px;margin-bottom:16px;border-bottom:2px solid var(--border-color);padding-bottom:0}.tab.svelte-1uha8ag{display:flex;align-items:center;gap:8px;padding:10px 20px;background:transparent;border:none;border-bottom:2px solid transparent;margin-bottom:-2px;cursor:pointer;font-size:.95em;font-weight:500;color:var(--text-muted);transition:all .15s ease}.tab.svelte-1uha8ag:hover{color:var(--text-primary);background:var(--bg-hover)}.tab.active.svelte-1uha8ag{color:var(--accent-primary);border-bottom-color:var(--accent-primary)}.tab-count.svelte-1uha8ag{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;background:var(--bg-secondary);border-radius:10px;font-size:.8em;font-weight:600;color:var(--text-muted)}.tab.active.svelte-1uha8ag .tab-count:where(.svelte-1uha8ag){background:var(--accent-primary);color:#fff}.tab-content.svelte-1uha8ag{display:flex;flex-direction:column;gap:16px}
@@ -0,0 +1 @@
1
+ import{n as d,u as g,o as c,q as m,t as i,v as b,w as p,x as v,y,z as h}from"./DfIkQq0Y.js";function x(n=!1){const s=d,e=s.l.u;if(!e)return;let f=()=>v(s.s);if(n){let o=0,t={};const _=y(()=>{let l=!1;const r=s.s;for(const a in r)r[a]!==t[a]&&(t[a]=r[a],l=!0);return l&&o++,o});f=()=>p(_)}e.b.length&&g(()=>{u(s,f),i(e.b)}),c(()=>{const o=m(()=>e.m.map(b));return()=>{for(const t of o)typeof t=="function"&&t()}}),e.a.length&&c(()=>{u(s,f),i(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}h();export{x as i};
@@ -0,0 +1 @@
1
+ import{b as c,h as _,a as o,E as d,r as b,H as E,s as T,c as p,d as f}from"./DfIkQq0Y.js";import{B as y}from"./N3z8axFy.js";function v(t,i,h=!1){_&&o();var e=new y(t),u=h?d:0;function n(a,r){if(_){const l=b(t)===E;if(a===l){var s=T();p(s),e.anchor=s,f(!1),e.ensure(a,r),f(!0);return}}e.ensure(a,r)}c(()=>{var a=!1;i((r,s=!0)=>{a=!0,n(s,r)}),a||n(!1,null)},u)}export{v as i};
@@ -0,0 +1,2 @@
1
+ import{W as Z,w as V,X as z,Y as W,q as G,Z as B,_ as E,k as d,h as _,K as w,b as J,a as Q,S as x,H as tt,j as c,a0 as D,p as A,i as j,a1 as et,a2 as R,a3 as S,a4 as I,a5 as st,a6 as U,n as $,m as it,a7 as C,a8 as rt,a9 as H,aa as nt,ab as at,g as L,c as N,ac as ht,s as ot,ad as q,ae as ft,E as lt,af as ut,ag as ct,ah as dt,ai as _t,aj as pt,ak as gt,al as O,L as vt,am as yt,U as bt,an as F,d as T,ao as Et,ap as wt,aq as mt,ar as Tt,B as Rt,as as St,at as Nt,F as kt}from"./DfIkQq0Y.js";import{b as Dt}from"./Binc8JbE.js";function At(e){let t=0,i=W(0),r;return()=>{Z()&&(V(i),z(()=>(t===0&&(r=G(()=>e(()=>B(i)))),t+=1,()=>{E(()=>{t-=1,t===0&&(r?.(),r=void 0,B(i))})})))}}var Lt=lt|ut|ct;function Ot(e,t,i){new Ft(e,t,i)}class Ft{parent;is_pending=!1;#e;#y=_?d:null;#i;#l;#r;#s=null;#t=null;#n=null;#a=null;#f=null;#u=0;#h=0;#d=!1;#c=!1;#_=new Set;#p=new Set;#o=null;#w=At(()=>(this.#o=W(this.#u),()=>{this.#o=null}));constructor(t,i,r){this.#e=t,this.#i=i,this.#l=r,this.parent=w.b,this.is_pending=!!this.#i.pending,this.#r=J(()=>{if(w.b=this,_){const s=this.#y;Q(),s.nodeType===x&&s.data===tt?this.#T():(this.#m(),this.#h===0&&(this.is_pending=!1))}else{var n=this.#b();try{this.#s=c(()=>r(n))}catch(s){this.error(s)}this.#h>0?this.#v():this.is_pending=!1}return()=>{this.#f?.remove()}},Lt),_&&(this.#e=d)}#m(){try{this.#s=c(()=>this.#l(this.#e))}catch(t){this.error(t)}}#T(){const t=this.#i.pending;t&&(this.#t=c(()=>t(this.#e)),E(()=>{var i=this.#b();this.#s=this.#g(()=>(D.ensure(),c(()=>this.#l(i)))),this.#h>0?this.#v():(A(this.#t,()=>{this.#t=null}),this.is_pending=!1)}))}#b(){var t=this.#e;return this.is_pending&&(this.#f=j(),this.#e.before(this.#f),t=this.#f),t}defer_effect(t){et(t,this.#_,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#i.pending}#g(t){var i=w,r=U,n=$;R(this.#r),S(this.#r),I(this.#r.ctx);try{return t()}catch(s){return st(s),null}finally{R(i),S(r),I(n)}}#v(){const t=this.#i.pending;this.#s!==null&&(this.#a=document.createDocumentFragment(),this.#a.append(this.#f),it(this.#s,this.#a)),this.#t===null&&(this.#t=c(()=>t(this.#e)))}#E(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#E(t);return}if(this.#h+=t,this.#h===0){this.is_pending=!1;for(const i of this.#_)C(i,rt),H(i);for(const i of this.#p)C(i,nt),H(i);this.#_.clear(),this.#p.clear(),this.#t&&A(this.#t,()=>{this.#t=null}),this.#a&&(this.#e.before(this.#a),this.#a=null)}}update_pending_count(t){this.#E(t),this.#u+=t,!(!this.#o||this.#d)&&(this.#d=!0,E(()=>{this.#d=!1,this.#o&&at(this.#o,this.#u)}))}get_effect_pending(){return this.#w(),V(this.#o)}error(t){var i=this.#i.onerror;let r=this.#i.failed;if(this.#c||!i&&!r)throw t;this.#s&&(L(this.#s),this.#s=null),this.#t&&(L(this.#t),this.#t=null),this.#n&&(L(this.#n),this.#n=null),_&&(N(this.#y),ht(),N(ot()));var n=!1,s=!1;const a=()=>{if(n){dt();return}n=!0,s&&ft(),D.ensure(),this.#u=0,this.#n!==null&&A(this.#n,()=>{this.#n=null}),this.is_pending=this.has_pending_snippet(),this.#s=this.#g(()=>(this.#c=!1,c(()=>this.#l(this.#e)))),this.#h>0?this.#v():this.is_pending=!1};E(()=>{try{s=!0,i?.(t,a),s=!1}catch(f){q(f,this.#r&&this.#r.parent)}r&&(this.#n=this.#g(()=>{D.ensure(),this.#c=!0;try{return c(()=>{r(this.#e,()=>t,()=>a)})}catch(f){return q(f,this.#r.parent),null}finally{this.#c=!1}}))})}}const Yt=["touchstart","touchmove"];function Mt(e){return Yt.includes(e)}const K=new Set,Y=new Set;function xt(e,t,i,r={}){function n(s){if(r.capture||b.call(t,s),!s.cancelBubble)return gt(()=>i?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?E(()=>{t.addEventListener(e,n,r)}):t.addEventListener(e,n,r),n}function Ht(e,t,i,r,n){var s={capture:r,passive:n},a=xt(e,t,i,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&pt(()=>{t.removeEventListener(e,a,s)})}function qt(e){for(var t=0;t<e.length;t++)K.add(e[t]);for(var i of Y)i(e)}let P=null;function b(e){var t=this,i=t.ownerDocument,r=e.type,n=e.composedPath?.()||[],s=n[0]||e.target;P=e;var a=0,f=P===e&&e.__root;if(f){var u=n.indexOf(f);if(u!==-1&&(t===document||t===window)){e.__root=t;return}var p=n.indexOf(t);if(p===-1)return;u<=p&&(a=u)}if(s=n[a]||e.target,s!==t){_t(e,"currentTarget",{configurable:!0,get(){return s||i}});var k=U,l=w;S(null),R(null);try{for(var h,o=[];s!==null;){var g=s.assignedSlot||s.parentNode||s.host||null;try{var y=s["__"+r];y!=null&&(!s.disabled||e.target===s)&&y.call(s,e)}catch(m){h?o.push(m):h=m}if(e.cancelBubble||g===t||g===null)break;s=g}if(h){for(let m of o)queueMicrotask(()=>{throw m});throw h}}finally{e.__root=t,delete e.currentTarget,S(k),R(l)}}}function Pt(e,t){var i=t==null?"":typeof t=="object"?t+"":t;i!==(e.__t??=e.nodeValue)&&(e.__t=i,e.nodeValue=i+"")}function Bt(e,t){return X(e,t)}function Vt(e,t){O(),t.intro=t.intro??!1;const i=t.target,r=_,n=d;try{for(var s=vt(i);s&&(s.nodeType!==x||s.data!==yt);)s=bt(s);if(!s)throw F;T(!0),N(s);const a=X(e,{...t,anchor:s});return T(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
2
+ `).some(f=>f.startsWith("https://svelte.dev/e/")))throw a;return a!==F&&console.warn("Failed to hydrate: ",a),t.recover===!1&&Et(),O(),wt(i),T(!1),Bt(e,t)}finally{T(r),N(n)}}const v=new Map;function X(e,{target:t,anchor:i,props:r={},events:n,context:s,intro:a=!0}){O();var f=new Set,u=l=>{for(var h=0;h<l.length;h++){var o=l[h];if(!f.has(o)){f.add(o);var g=Mt(o);t.addEventListener(o,b,{passive:g});var y=v.get(o);y===void 0?(document.addEventListener(o,b,{passive:g}),v.set(o,1)):v.set(o,y+1)}}};u(mt(K)),Y.add(u);var p=void 0,k=Tt(()=>{var l=i??t.appendChild(j());return Ot(l,{pending:()=>{}},h=>{if(s){Rt({});var o=$;o.c=s}if(n&&(r.$$events=n),_&&Dt(h,null),p=e(h,r)||{},_&&(w.nodes.end=d,d===null||d.nodeType!==x||d.data!==St))throw Nt(),F;s&&kt()}),()=>{for(var h of f){t.removeEventListener(h,b);var o=v.get(h);--o===0?(document.removeEventListener(h,b),v.delete(h)):v.set(h,o)}Y.delete(u),l!==i&&l.parentNode?.removeChild(l)}});return M.set(p,k),p}let M=new WeakMap;function Wt(e,t){const i=M.get(e);return i?(M.delete(e),i(t)):Promise.resolve()}export{qt as d,Ht as e,Vt as h,Bt as m,Pt as s,Wt as u};
@@ -0,0 +1 @@
1
+ import{i as d,K as u,L as f,M as v,T as E,N as p,h as i,k as o,O as T,a as h,P as N,c as g,Q as x}from"./DfIkQq0Y.js";function y(r){var n=document.createElement("template");return n.innerHTML=r.replaceAll("<!>","<!---->"),n.content}function t(r,n){var e=u;e.nodes===null&&(e.nodes={start:r,end:n,a:null,t:null})}function A(r,n){var e=(n&E)!==0,l=(n&p)!==0,a,_=!r.startsWith("<!>");return()=>{if(i)return t(o,null),o;a===void 0&&(a=y(_?r:"<!>"+r),e||(a=f(a)));var s=l||v?document.importNode(a,!0):a.cloneNode(!0);if(e){var c=f(s),m=s.lastChild;t(c,m)}else t(s,s);return s}}function L(r=""){if(!i){var n=d(r+"");return t(n,n),n}var e=o;return e.nodeType!==N?(e.before(e=d()),g(e)):x(e),t(e,e),e}function O(){if(i)return t(o,null),o;var r=document.createDocumentFragment(),n=document.createComment(""),e=d();return r.append(n,e),t(n,e),r}function P(r,n){if(i){var e=u;((e.f&T)===0||e.nodes.end===null)&&(e.nodes.end=o),h();return}r!==null&&r.before(n)}const M="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(M);export{P as a,t as b,O as c,A as f,L as t};
@@ -0,0 +1 @@
1
+ import{au as c,av as l,aw as i,w as t,ax as _}from"./DfIkQq0Y.js";const f={uptime_seconds:0,start_time:0,device_count:0,packets_received:0,packets_sent:0,packets_received_by_type:{},packets_sent_by_type:{},error_count:0,activity_enabled:!1};function w(){let e=c(l({...f}));return{get value(){return t(e)},set(r){i(e,r,!0)},reset(){i(e,{...f},!0)}}}const P=w();function h(){let e=c(l(new Map));return{get map(){return t(e)},get list(){return[...t(e).values()]},get count(){return t(e).size},get(r){return t(e).get(r)},set(r){const s=new Map;for(const n of r)s.set(n.serial,n);i(e,s,!0)},add(r){i(e,new Map(t(e)),!0),t(e).set(r.serial,r)},remove(r){i(e,new Map(t(e)),!0),t(e).delete(r)},update(r,s){const n=t(e).get(r);n&&(i(e,new Map(t(e)),!0),t(e).set(r,{...n,...s}))},clear(){i(e,new Map,!0)}}}const D=h();function E(){let e=c(l([]));return{get list(){return t(e)},get count(){return t(e).length},set(r){i(e,r.slice(-100),!0)},add(r){i(e,[...t(e),r].slice(-100),!0)},clear(){i(e,[],!0)},get reversed(){return[...t(e)].reverse()}}}const K=E();function b(){let e=c(l({global:null,devices:{},types:{},locations:{},groups:{}}));return{get global(){return t(e).global},get devices(){return t(e).devices},get types(){return t(e).types},get locations(){return t(e).locations},get groups(){return t(e).groups},setGlobal(r){t(e).global=r},setDevice(r,s){if(s===null){const{[r]:n,...a}=t(e).devices;t(e).devices=a}else t(e).devices={...t(e).devices,[r]:s}},setType(r,s){if(s===null){const{[r]:n,...a}=t(e).types;t(e).types=a}else t(e).types={...t(e).types,[r]:s}},setLocation(r,s){if(s===null){const{[r]:n,...a}=t(e).locations;t(e).locations=a}else t(e).locations={...t(e).locations,[r]:s}},setGroup(r,s){if(s===null){const{[r]:n,...a}=t(e).groups;t(e).groups=a}else t(e).groups={...t(e).groups,[r]:s}},setAll(r){i(e,{global:r.global??null,devices:r.devices??{},types:r.types??{},locations:r.locations??{},groups:r.groups??{}},!0)},handleChange(r){switch(r.scope){case"global":t(e).global=r.config;break;case"device":if(r.identifier)if(r.config===null){const{[r.identifier]:s,...n}=t(e).devices;t(e).devices=n}else t(e).devices={...t(e).devices,[r.identifier]:r.config};break;case"type":if(r.identifier)if(r.config===null){const{[r.identifier]:s,...n}=t(e).types;t(e).types=n}else t(e).types={...t(e).types,[r.identifier]:r.config};break;case"location":if(r.identifier)if(r.config===null){const{[r.identifier]:s,...n}=t(e).locations;t(e).locations=n}else t(e).locations={...t(e).locations,[r.identifier]:r.config};break;case"group":if(r.identifier)if(r.config===null){const{[r.identifier]:s,...n}=t(e).groups;t(e).groups=n}else t(e).groups={...t(e).groups,[r.identifier]:r.config};break}}}}const R=b(),g="lifx-emulator-view",p="lifx-emulator-page-size",S="lifx-emulator-expanded",m="lifx-emulator-tab",y="lifx-emulator-show-stats";function x(){return typeof localStorage>"u"?"card":localStorage.getItem(g)==="table"?"table":"card"}function T(){if(typeof localStorage>"u")return 20;const e=localStorage.getItem(p),r=e?parseInt(e,10):20;return[10,20,50,100].includes(r)?r:20}function k(){if(typeof localStorage>"u")return{zones:new Set,metadata:new Set};try{const e=localStorage.getItem(S);if(!e)return{zones:new Set,metadata:new Set};const r=JSON.parse(e);return{zones:new Set(r.zones||[]),metadata:new Set(r.metadata||[])}}catch{return{zones:new Set,metadata:new Set}}}function z(){if(typeof localStorage>"u")return"devices";const e=localStorage.getItem(m);return e==="activity"||e==="scenarios"?e:"devices"}function A(){return typeof localStorage>"u"?!1:localStorage.getItem(y)==="true"}function I(){let e=c(l(x())),r=c(l(T())),s=c(1),n=c(l(k())),a=c(l(z())),u=c(l(A()));function d(){typeof localStorage<"u"&&localStorage.setItem(S,JSON.stringify({zones:[...t(n).zones],metadata:[...t(n).metadata]}))}return{get viewMode(){return t(e)},get pageSize(){return t(r)},get currentPage(){return t(s)},get expanded(){return t(n)},get activeTab(){return t(a)},get showStats(){return t(u)},setViewMode(o){i(e,o,!0),typeof localStorage<"u"&&localStorage.setItem(g,o)},setPageSize(o){i(r,o,!0),i(s,1),typeof localStorage<"u"&&localStorage.setItem(p,String(o))},setCurrentPage(o){i(s,o,!0)},setActiveTab(o){i(a,o,!0),typeof localStorage<"u"&&localStorage.setItem(m,o)},toggleShowStats(){i(u,!t(u)),typeof localStorage<"u"&&localStorage.setItem(y,String(t(u)))},toggleZonesExpanded(o){t(n).zones.has(o)?t(n).zones.delete(o):t(n).zones.add(o),i(n,{...t(n)},!0),d()},toggleMetadataExpanded(o){t(n).metadata.has(o)?t(n).metadata.delete(o):t(n).metadata.add(o),i(n,{...t(n)},!0),d()},isZonesExpanded(o){return t(n).zones.has(o)},isMetadataExpanded(o){return t(n).metadata.has(o)}}}const Y=I(),v="lifx-emulator-theme";function M(){if(typeof localStorage>"u")return"system";const e=localStorage.getItem(v);return e==="light"||e==="dark"||e==="system"?e:"system"}function G(){let e=c(l(M())),r=c(l(typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:!0));const s=_(()=>t(e)==="system"?t(r)?"dark":"light":t(e));function n(){typeof document<"u"&&document.documentElement.setAttribute("data-theme",t(s))}return typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",a=>{i(r,a.matches,!0)}),{get mode(){return t(e)},get effective(){return t(s)},applyTheme:n,set(a){i(e,a,!0),typeof localStorage<"u"&&localStorage.setItem(v,a),n()},toggle(){const a=t(e)==="light"?"dark":t(e)==="dark"?"system":"light";this.set(a)}}}const L=G();export{K as a,P as b,D as d,R as s,L as t,Y as u};
@@ -0,0 +1 @@
1
+ var Ht=Array.isArray,Vt=Array.prototype.indexOf,se=Array.prototype.includes,kn=Array.from,Dn=Object.defineProperty,oe=Object.getOwnPropertyDescriptor,Ut=Object.getOwnPropertyDescriptors,Bt=Object.prototype,Gt=Array.prototype,ft=Object.getPrototypeOf,Xe=Object.isExtensible;const Nn=()=>{};function Pn(e){return e()}function Kt(e){for(var t=0;t<e.length;t++)e[t]()}function it(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}const g=2,ge=4,ve=8,at=1<<24,L=16,F=32,ne=64,lt=128,D=512,y=1024,x=2048,B=4096,C=8192,q=16384,Le=32768,me=65536,Ze=1<<17,ut=1<<18,de=1<<19,ot=1<<20,In=1<<25,W=32768,Ne=1<<21,Ye=1<<22,H=1<<23,X=Symbol("$state"),Cn=Symbol("legacy props"),Fn=Symbol(""),re=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Re=3,ct=8;function $t(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function zt(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Xt(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Zt(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Wt(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function jn(){throw new Error("https://svelte.dev/e/hydration_failed")}function Ln(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Jt(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Qt(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function en(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Yn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const qn=1,Hn=2,Vn=4,Un=8,Bn=16,Gn=1,Kn=2,$n=4,zn=8,Xn=16,Zn=1,Wn=2,tn="[",nn="[!",rn="]",qe={},E=Symbol(),Jn="http://www.w3.org/1999/xhtml";function He(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Qn(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function er(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let J=!1;function tr(e){J=e}let A;function fe(e){if(e===null)throw He(),qe;return A=e}function nr(){return fe(G(A))}function rr(e){if(J){if(G(A)!==null)throw He(),qe;A=e}}function sr(e=1){if(J){for(var t=e,n=A;t--;)n=G(n);A=n}}function fr(e=!0){for(var t=0,n=A;;){if(n.nodeType===ct){var r=n.data;if(r===rn){if(t===0)return n;t-=1}else(r===tn||r===nn)&&(t+=1)}var s=G(n);e&&n.remove(),n=s}}function ir(e){if(!e||e.nodeType!==ct)throw He(),qe;return e.data}function _t(e){return e===this.v}function sn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function vt(e){return!sn(e,this.v)}let xe=!1;function ar(){xe=!0}let b=null;function be(e){b=e}function lr(e,t=!1,n){b={p:b,i:!1,c:null,e:null,s:e,x:null,l:xe&&!t?{s:null,u:null,$:[]}:null}}function ur(e){var t=b,n=t.e;if(n!==null){t.e=null;for(var r of n)Ot(r)}return t.i=!0,b=t.p,{}}function he(){return!xe||b!==null&&b.l===null}let $=[];function dt(){var e=$;$=[],Kt(e)}function We(e){if($.length===0&&!ce){var t=$;queueMicrotask(()=>{t===$&&dt()})}$.push(e)}function fn(){for(;$.length>0;)dt()}function an(e){var t=h;if(t===null)return v.f|=H,e;if((t.f&Le)===0){if((t.f&lt)===0)throw e;t.b.error(e)}else Te(e,t)}function Te(e,t){for(;t!==null;){if((t.f&lt)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const ln=-7169;function m(e,t){e.f=e.f&ln|t}function Ve(e){(e.f&D)!==0||e.deps===null?m(e,y):m(e,B)}function ht(e){if(e!==null)for(const t of e)(t.f&g)===0||(t.f&W)===0||(t.f^=W,ht(t.deps))}function un(e,t,n){(e.f&x)!==0?t.add(e):(e.f&B)!==0&&n.add(e),ht(e.deps),m(e,y)}const ye=new Set;let p=null,Je=null,P=null,R=[],Oe=null,Pe=!1,ce=!1;class ae{committed=!1;current=new Map;previous=new Map;#n=new Set;#r=new Set;#e=0;#s=0;#i=null;#a=new Set;#t=new Set;skipped_effects=new Set;is_fork=!1;#f=!1;is_deferred(){return this.is_fork||this.#s>0}process(t){R=[],this.apply();var n=[],r=[];for(const s of t)this.#l(s,n,r);if(this.is_deferred()){this.#u(r),this.#u(n);for(const s of this.skipped_effects)Et(s)}else{for(const s of this.#n)s();this.#n.clear(),this.#e===0&&this.#o(),Je=this,p=null,Qe(r),Qe(n),Je=null,this.#i?.resolve()}P=null}#l(t,n,r){t.f^=y;for(var s=t.first,f=null;s!==null;){var a=s.f,l=(a&(F|ne))!==0,i=l&&(a&y)!==0,u=i||(a&C)!==0||this.skipped_effects.has(s);if(!u&&s.fn!==null){l?s.f^=y:f!==null&&(a&(ge|ve|at))!==0?f.b.defer_effect(s):(a&ge)!==0?n.push(s):pe(s)&&((a&L)!==0&&this.#t.add(s),_e(s));var o=s.first;if(o!==null){s=o;continue}}var _=s.parent;for(s=s.next;s===null&&_!==null;)_===f&&(f=null),s=_.next,_=_.parent}}#u(t){for(var n=0;n<t.length;n+=1)un(t[n],this.#a,this.#t)}capture(t,n){n!==E&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&H)===0&&(this.current.set(t,t.v),P?.set(t,t.v))}activate(){p=this,this.apply()}deactivate(){p===this&&(p=null,P=null)}flush(){if(this.activate(),R.length>0){if(pt(),p!==null&&p!==this)return}else this.#e===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#r)t(this);this.#r.clear()}#o(){if(ye.size>1){this.previous.clear();var t=P,n=!0;for(const s of ye){if(s===this){n=!1;continue}const f=[];for(const[l,i]of this.current){if(s.current.has(l))if(n&&i!==s.current.get(l))s.current.set(l,i);else continue;f.push(l)}if(f.length===0)continue;const a=[...s.current.keys()].filter(l=>!this.current.has(l));if(a.length>0){var r=R;R=[];const l=new Set,i=new Map;for(const u of f)wt(u,a,l,i);if(R.length>0){p=s,s.apply();for(const u of R)s.#l(u,[],[]);s.deactivate()}R=r}}p=null,P=t}this.committed=!0,ye.delete(this)}increment(t){this.#e+=1,t&&(this.#s+=1)}decrement(t){this.#e-=1,t&&(this.#s-=1),!this.#f&&(this.#f=!0,We(()=>{this.#f=!1,this.is_deferred()?R.length>0&&this.flush():this.revive()}))}revive(){for(const t of this.#a)this.#t.delete(t),m(t,x),Q(t);for(const t of this.#t)m(t,B),Q(t);this.flush()}oncommit(t){this.#n.add(t)}ondiscard(t){this.#r.add(t)}settled(){return(this.#i??=it()).promise}static ensure(){if(p===null){const t=p=new ae;ye.add(p),ce||We(()=>{p===t&&t.flush()})}return p}apply(){}}function on(e){var t=ce;ce=!0;try{for(var n;;){if(fn(),R.length===0&&(p?.flush(),R.length===0))return Oe=null,n;pt()}}finally{ce=t}}function pt(){Pe=!0;var e=null;try{for(var t=0;R.length>0;){var n=ae.ensure();if(t++>1e3){var r,s;cn()}n.process(R),V.clear()}}finally{Pe=!1,Oe=null}}function cn(){try{Wt()}catch(e){Te(e,Oe)}}let j=null;function Qe(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(q|C))===0&&pe(r)&&(j=new Set,_e(r),r.deps===null&&r.first===null&&r.nodes===null&&(r.teardown===null&&r.ac===null?Nt(r):r.fn=null),j?.size>0)){V.clear();for(const s of j){if((s.f&(q|C))!==0)continue;const f=[s];let a=s.parent;for(;a!==null;)j.has(a)&&(j.delete(a),f.push(a)),a=a.parent;for(let l=f.length-1;l>=0;l--){const i=f[l];(i.f&(q|C))===0&&_e(i)}}j.clear()}}j=null}}function wt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const f=s.f;(f&g)!==0?wt(s,t,n,r):(f&(Ye|L))!==0&&(f&x)===0&&yt(s,t,r)&&(m(s,x),Q(s))}}function yt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(se.call(t,s))return!0;if((s.f&g)!==0&&yt(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function Q(e){for(var t=Oe=e;t.parent!==null;){t=t.parent;var n=t.f;if(Pe&&t===h&&(n&L)!==0&&(n&ut)===0)return;if((n&(ne|F))!==0){if((n&y)===0)return;t.f^=y}}R.push(t)}function Et(e){if(!((e.f&F)!==0&&(e.f&y)!==0)){m(e,y);for(var t=e.first;t!==null;)Et(t),t=t.next}}function _n(e,t,n,r){const s=he()?Ue:hn;var f=e.filter(c=>!c.settled);if(n.length===0&&f.length===0){r(t.map(s));return}var a=p,l=h,i=vn(),u=f.length===1?f[0].promise:f.length>1?Promise.all(f.map(c=>c.promise)):null;function o(c){i();try{r(c)}catch(w){(l.f&q)===0&&Te(w,l)}a?.deactivate(),Ie()}if(n.length===0){u.then(()=>o(t.map(s)));return}function _(){i(),Promise.all(n.map(c=>dn(c))).then(c=>o([...t.map(s),...c])).catch(c=>Te(c,l))}u?u.then(_):_()}function vn(){var e=h,t=v,n=b,r=p;return function(f=!0){ie(e),U(t),be(n),f&&r?.activate()}}function Ie(){ie(null),U(null),be(null)}function Ue(e){var t=g|x,n=v!==null&&(v.f&g)!==0?v:null;return h!==null&&(h.f|=de),{ctx:b,deps:null,effects:null,equals:_t,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:n??h,ac:null}}function dn(e,t,n){let r=h;r===null&&$t();var s=r.b,f=void 0,a=Ge(E),l=!v,i=new Map;return Tn(()=>{var u=it();f=u.promise;try{Promise.resolve(e()).then(u.resolve,u.reject).then(()=>{o===p&&o.committed&&o.deactivate(),Ie()})}catch(w){u.reject(w),Ie()}var o=p;if(l){var _=s.is_rendered();s.update_pending_count(1),o.increment(_),i.get(o)?.reject(re),i.delete(o),i.set(o,u)}const c=(w,d=void 0)=>{if(o.activate(),d)d!==re&&(a.f|=H,Fe(a,d));else{(a.f&H)!==0&&(a.f^=H),Fe(a,w);for(const[O,we]of i){if(i.delete(O),O===o)break;we.reject(re)}}l&&(s.update_pending_count(-1),o.decrement(_))};u.promise.then(c,w=>c(null,w||"unknown"))}),bn(()=>{for(const u of i.values())u.reject(re)}),new Promise(u=>{function o(_){function c(){_===f?u(a):o(f)}_.then(c,c)}o(f)})}function or(e){const t=Ue(e);return Ct(t),t}function hn(e){const t=Ue(e);return t.equals=vt,t}function gt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)ee(t[n])}}function pn(e){for(var t=e.parent;t!==null;){if((t.f&g)===0)return(t.f&q)===0?t:null;t=t.parent}return null}function Be(e){var t,n=h;ie(pn(e));try{e.f&=~W,gt(e),t=Lt(e)}finally{ie(n)}return t}function mt(e){var t=Be(e);if(!e.equals(t)&&(e.wv=Mt(),(!p?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){m(e,y);return}te||(P!==null?(xt()||p?.is_fork)&&P.set(e,t):Ve(e))}let Ce=new Set;const V=new Map;let bt=!1;function Ge(e,t){var n={f:0,v:e,reactions:null,equals:_t,rv:0,wv:0};return n}function Y(e,t){const n=Ge(e);return Ct(n),n}function cr(e,t=!1,n=!0){const r=Ge(e);return t||(r.equals=vt),xe&&n&&b!==null&&b.l!==null&&(b.l.s??=[]).push(r),r}function K(e,t,n=!1){v!==null&&(!I||(v.f&Ze)!==0)&&he()&&(v.f&(g|L|Ye|Ze))!==0&&(N===null||!se.call(N,e))&&en();let r=n?le(t):t;return Fe(e,r)}function Fe(e,t){if(!e.equals(t)){var n=e.v;te?V.set(e,t):V.set(e,n),e.v=t;var r=ae.ensure();if(r.capture(e,n),(e.f&g)!==0){const s=e;(e.f&x)!==0&&Be(s),Ve(s)}e.wv=Mt(),Tt(e,x),he()&&h!==null&&(h.f&y)!==0&&(h.f&(F|ne))===0&&(k===null?xn([e]):k.push(e)),!r.is_fork&&Ce.size>0&&!bt&&wn()}return t}function wn(){bt=!1;for(const e of Ce)(e.f&y)!==0&&m(e,B),pe(e)&&_e(e);Ce.clear()}function De(e){K(e,e.v+1)}function Tt(e,t){var n=e.reactions;if(n!==null)for(var r=he(),s=n.length,f=0;f<s;f++){var a=n[f],l=a.f;if(!(!r&&a===h)){var i=(l&x)===0;if(i&&m(a,t),(l&g)!==0){var u=a;P?.delete(u),(l&W)===0&&(l&D&&(a.f|=W),Tt(u,B))}else i&&((l&L)!==0&&j!==null&&j.add(a),Q(a))}}}function le(e){if(typeof e!="object"||e===null||X in e)return e;const t=ft(e);if(t!==Bt&&t!==Gt)return e;var n=new Map,r=Ht(e),s=Y(0),f=Z,a=l=>{if(Z===f)return l();var i=v,u=Z;U(null),st(f);var o=l();return U(i),st(u),o};return r&&n.set("length",Y(e.length)),new Proxy(e,{defineProperty(l,i,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Jt();var o=n.get(i);return o===void 0?o=a(()=>{var _=Y(u.value);return n.set(i,_),_}):K(o,u.value,!0),!0},deleteProperty(l,i){var u=n.get(i);if(u===void 0){if(i in l){const o=a(()=>Y(E));n.set(i,o),De(s)}}else K(u,E),De(s);return!0},get(l,i,u){if(i===X)return e;var o=n.get(i),_=i in l;if(o===void 0&&(!_||oe(l,i)?.writable)&&(o=a(()=>{var w=le(_?l[i]:E),d=Y(w);return d}),n.set(i,o)),o!==void 0){var c=ue(o);return c===E?void 0:c}return Reflect.get(l,i,u)},getOwnPropertyDescriptor(l,i){var u=Reflect.getOwnPropertyDescriptor(l,i);if(u&&"value"in u){var o=n.get(i);o&&(u.value=ue(o))}else if(u===void 0){var _=n.get(i),c=_?.v;if(_!==void 0&&c!==E)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return u},has(l,i){if(i===X)return!0;var u=n.get(i),o=u!==void 0&&u.v!==E||Reflect.has(l,i);if(u!==void 0||h!==null&&(!o||oe(l,i)?.writable)){u===void 0&&(u=a(()=>{var c=o?le(l[i]):E,w=Y(c);return w}),n.set(i,u));var _=ue(u);if(_===E)return!1}return o},set(l,i,u,o){var _=n.get(i),c=i in l;if(r&&i==="length")for(var w=u;w<_.v;w+=1){var d=n.get(w+"");d!==void 0?K(d,E):w in l&&(d=a(()=>Y(E)),n.set(w+"",d))}if(_===void 0)(!c||oe(l,i)?.writable)&&(_=a(()=>Y(void 0)),K(_,le(u)),n.set(i,_));else{c=_.v!==E;var O=a(()=>le(u));K(_,O)}var we=Reflect.getOwnPropertyDescriptor(l,i);if(we?.set&&we.set.call(o,u),!c){if(r&&typeof i=="string"){var ze=n.get("length"),ke=Number(i);Number.isInteger(ke)&&ke>=ze.v&&K(ze,ke+1)}De(s)}return!0},ownKeys(l){ue(s);var i=Reflect.ownKeys(l).filter(_=>{var c=n.get(_);return c===void 0||c.v!==E});for(var[u,o]of n)o.v!==E&&!(u in l)&&i.push(u);return i},setPrototypeOf(){Qt()}})}function et(e){try{if(e!==null&&typeof e=="object"&&X in e)return e[X]}catch{}return e}function _r(e,t){return Object.is(et(e),et(t))}var tt,yn,En,At,St;function vr(){if(tt===void 0){tt=window,yn=document,En=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;At=oe(t,"firstChild").get,St=oe(t,"nextSibling").get,Xe(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Xe(n)&&(n.__t=void 0)}}function Ae(e=""){return document.createTextNode(e)}function Me(e){return At.call(e)}function G(e){return St.call(e)}function dr(e,t){if(!J)return Me(e);var n=Me(A);if(n===null)n=A.appendChild(Ae());else if(t&&n.nodeType!==Re){var r=Ae();return n?.before(r),fe(r),r}return t&&Ke(n),fe(n),n}function hr(e,t=!1){if(!J){var n=Me(e);return n instanceof Comment&&n.data===""?G(n):n}if(t){if(A?.nodeType!==Re){var r=Ae();return A?.before(r),fe(r),r}Ke(A)}return A}function pr(e,t=1,n=!1){let r=J?A:e;for(var s;t--;)s=r,r=G(r);if(!J)return r;if(n){if(r?.nodeType!==Re){var f=Ae();return r===null?s?.after(f):r.before(f),fe(f),f}Ke(r)}return fe(r),r}function wr(e){e.textContent=""}function yr(){return!1}function Ke(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Re;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}let nt=!1;function gn(){nt||(nt=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function $e(e){var t=v,n=h;U(null),ie(null);try{return e()}finally{U(t),ie(n)}}function Er(e,t,n,r=n){e.addEventListener(t,()=>$e(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),gn()}function Rt(e){h===null&&(v===null&&Zt(),Xt()),te&&zt()}function mn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function M(e,t,n){var r=h;r!==null&&(r.f&C)!==0&&(e|=C);var s={ctx:b,deps:null,nodes:null,f:e|x|D,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{_e(s),s.f|=Le}catch(l){throw ee(s),l}else t!==null&&Q(s);var f=s;if(n&&f.deps===null&&f.teardown===null&&f.nodes===null&&f.first===f.last&&(f.f&de)===0&&(f=f.first,(e&L)!==0&&(e&me)!==0&&f!==null&&(f.f|=me)),f!==null&&(f.parent=r,r!==null&&mn(f,r),v!==null&&(v.f&g)!==0&&(e&ne)===0)){var a=v;(a.effects??=[]).push(f)}return s}function xt(){return v!==null&&!I}function bn(e){const t=M(ve,null,!1);return m(t,y),t.teardown=e,t}function gr(e){Rt();var t=h.f,n=!v&&(t&F)!==0&&(t&Le)===0;if(n){var r=b;(r.e??=[]).push(e)}else return Ot(e)}function Ot(e){return M(ge|ot,e,!1)}function mr(e){return Rt(),M(ve|ot,e,!0)}function br(e){ae.ensure();const t=M(ne|de,e,!0);return(n={})=>new Promise(r=>{n.outro?Rn(t,()=>{ee(t),r(void 0)}):(ee(t),r(void 0))})}function Tr(e){return M(ge,e,!1)}function Tn(e){return M(Ye|de,e,!0)}function Ar(e,t=0){return M(ve|t,e,!0)}function Sr(e,t=[],n=[],r=[]){_n(r,t,n,s=>{M(ve,()=>e(...s.map(ue)),!0)})}function Rr(e,t=0){var n=M(L|t,e,!0);return n}function xr(e){return M(F|de,e,!0)}function kt(e){var t=e.teardown;if(t!==null){const n=te,r=v;rt(!0),U(null);try{t.call(null)}finally{rt(n),U(r)}}}function Dt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&$e(()=>{s.abort(re)});var r=n.next;(n.f&ne)!==0?n.parent=null:ee(n,t),n=r}}function An(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&F)===0&&ee(t),t=n}}function ee(e,t=!0){var n=!1;(t||(e.f&ut)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Sn(e.nodes.start,e.nodes.end),n=!0),Dt(e,t&&!n),Se(e,0),m(e,q);var r=e.nodes&&e.nodes.t;if(r!==null)for(const f of r)f.stop();kt(e);var s=e.parent;s!==null&&s.first!==null&&Nt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Sn(e,t){for(;e!==null;){var n=e===t?null:G(e);e.remove(),e=n}}function Nt(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Rn(e,t,n=!0){var r=[];Pt(e,r,!0);var s=()=>{n&&ee(e),t&&t()},f=r.length;if(f>0){var a=()=>--f||s();for(var l of r)l.out(a)}else s()}function Pt(e,t,n){if((e.f&C)===0){e.f^=C;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var s=e.first;s!==null;){var f=s.next,a=(s.f&me)!==0||(s.f&F)!==0&&(e.f&L)!==0;Pt(s,t,a?n:!1),s=f}}}function Or(e){It(e,!0)}function It(e,t){if((e.f&C)!==0){e.f^=C,(e.f&y)===0&&(m(e,x),Q(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&me)!==0||(n.f&F)!==0;It(n,s?t:!1),n=r}var f=e.nodes&&e.nodes.t;if(f!==null)for(const a of f)(a.is_global||t)&&a.in()}}function kr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:G(n);t.append(n),n=s}}let Ee=!1,te=!1;function rt(e){te=e}let v=null,I=!1;function U(e){v=e}let h=null;function ie(e){h=e}let N=null;function Ct(e){v!==null&&(N===null?N=[e]:N.push(e))}let T=null,S=0,k=null;function xn(e){k=e}let Ft=1,z=0,Z=z;function st(e){Z=e}function Mt(){return++Ft}function pe(e){var t=e.f;if((t&x)!==0)return!0;if(t&g&&(e.f&=~W),(t&B)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var f=n[s];if(pe(f)&&mt(f),f.wv>e.wv)return!0}(t&D)!==0&&P===null&&m(e,y)}return!1}function jt(e,t,n=!0){var r=e.reactions;if(r!==null&&!(N!==null&&se.call(N,e)))for(var s=0;s<r.length;s++){var f=r[s];(f.f&g)!==0?jt(f,t,!1):t===f&&(n?m(f,x):(f.f&y)!==0&&m(f,B),Q(f))}}function Lt(e){var t=T,n=S,r=k,s=v,f=N,a=b,l=I,i=Z,u=e.f;T=null,S=0,k=null,v=(u&(F|ne))===0?e:null,N=null,be(e.ctx),I=!1,Z=++z,e.ac!==null&&($e(()=>{e.ac.abort(re)}),e.ac=null);try{e.f|=Ne;var o=e.fn,_=o(),c=e.deps,w=p?.is_fork;if(T!==null){var d;if(w||Se(e,S),c!==null&&S>0)for(c.length=S+T.length,d=0;d<T.length;d++)c[S+d]=T[d];else e.deps=c=T;if(xt()&&(e.f&D)!==0)for(d=S;d<c.length;d++)(c[d].reactions??=[]).push(e)}else!w&&c!==null&&S<c.length&&(Se(e,S),c.length=S);if(he()&&k!==null&&!I&&c!==null&&(e.f&(g|B|x))===0)for(d=0;d<k.length;d++)jt(k[d],e);if(s!==null&&s!==e){if(z++,s.deps!==null)for(let O=0;O<n;O+=1)s.deps[O].rv=z;if(t!==null)for(const O of t)O.rv=z;k!==null&&(r===null?r=k:r.push(...k))}return(e.f&H)!==0&&(e.f^=H),_}catch(O){return an(O)}finally{e.f^=Ne,T=t,S=n,k=r,v=s,N=f,be(a),I=l,Z=i}}function On(e,t){let n=t.reactions;if(n!==null){var r=Vt.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}if(n===null&&(t.f&g)!==0&&(T===null||!se.call(T,t))){var f=t;(f.f&D)!==0&&(f.f^=D,f.f&=~W),Ve(f),gt(f),Se(f,0)}}function Se(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)On(e,n[r])}function _e(e){var t=e.f;if((t&q)===0){m(e,y);var n=h,r=Ee;h=e,Ee=!0;try{(t&(L|at))!==0?An(e):Dt(e),kt(e);var s=Lt(e);e.teardown=typeof s=="function"?s:null,e.wv=Ft;var f}finally{Ee=r,h=n}}}async function Dr(){await Promise.resolve(),on()}function Nr(){return ae.ensure().settled()}function ue(e){var t=e.f,n=(t&g)!==0;if(v!==null&&!I){var r=h!==null&&(h.f&q)!==0;if(!r&&(N===null||!se.call(N,e))){var s=v.deps;if((v.f&Ne)!==0)e.rv<z&&(e.rv=z,T===null&&s!==null&&s[S]===e?S++:T===null?T=[e]:T.push(e));else{(v.deps??=[]).push(e);var f=e.reactions;f===null?e.reactions=[v]:se.call(f,v)||f.push(v)}}}if(te&&V.has(e))return V.get(e);if(n){var a=e;if(te){var l=a.v;return((a.f&y)===0&&a.reactions!==null||qt(a))&&(l=Be(a)),V.set(a,l),l}var i=(a.f&D)===0&&!I&&v!==null&&(Ee||(v.f&D)!==0),u=a.deps===null;pe(a)&&(i&&(a.f|=D),mt(a)),i&&!u&&Yt(a)}if(P?.has(e))return P.get(e);if((e.f&H)!==0)throw e.v;return e.v}function Yt(e){if(e.deps!==null){e.f|=D;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&g)!==0&&(t.f&D)===0&&Yt(t)}}function qt(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(V.has(t)||(t.f&g)!==0&&qt(t))return!0;return!1}function Pr(e){var t=I;try{return I=!0,e()}finally{I=t}}function Ir(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(X in e)je(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&X in n&&je(n)}}}function je(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{je(e[r],t)}catch{}const n=ft(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=Ut(n);for(let s in r){const f=r[s].get;if(f)try{f.call(e)}catch{}}}}}export{yn as $,xe as A,lr as B,hr as C,Sr as D,me as E,ur as F,dr as G,nn as H,rr as I,pr as J,h as K,Me as L,En as M,Wn as N,Le as O,Re as P,Ke as Q,ut as R,ct as S,Zn as T,G as U,Tr as V,xt as W,Ar as X,Ge as Y,De as Z,We as _,nr as a,ft as a$,ae as a0,un as a1,ie as a2,U as a3,be as a4,an as a5,v as a6,m as a7,x as a8,Q as a9,Ln as aA,$n as aB,te as aC,q as aD,zn as aE,Kn as aF,Gn as aG,hn as aH,Xn as aI,Cn as aJ,on as aK,cr as aL,Dr as aM,In as aN,Ht as aO,qn as aP,Bn as aQ,Hn as aR,C as aS,F as aT,Vn as aU,Un as aV,Qn as aW,_r as aX,Er as aY,Je as aZ,Jn as a_,B as aa,Fe as ab,sr as ac,Te as ad,Yn as ae,de as af,lt as ag,er as ah,Dn as ai,bn as aj,$e as ak,vr as al,tn as am,qe as an,jn as ao,wr as ap,kn as aq,br as ar,rn as as,He as at,Y as au,le as av,K as aw,or as ax,X as ay,oe as az,Rr as b,Ut as b0,gn as b1,Fn as b2,Nn as b3,sn as b4,Nr as b5,fe as c,tr as d,p as e,Or as f,ee as g,J as h,Ae as i,xr as j,A as k,yr as l,kr as m,b as n,gr as o,Rn as p,Pr as q,ir as r,fr as s,Kt as t,mr as u,Pn as v,ue as w,Ir as x,Ue as y,ar as z};
@@ -0,0 +1 @@
1
+ import{b3 as he,b4 as pt,au as U,w as T,aw as I,aM as ee,b5 as gt}from"./DfIkQq0Y.js";import{o as qe}from"./yhjkpkcN.js";const V=[];function Se(e,t=he){let n=null;const a=new Set;function r(s){if(pt(e,s)&&(e=s,n)){const c=!V.length;for(const l of a)l[1](),V.push(l,e);if(c){for(let l=0;l<V.length;l+=2)V[l][0](V[l+1]);V.length=0}}}function i(s){r(s(e))}function o(s,c=he){const l=[s,c];return a.add(l),a.size===1&&(n=t(r,i)||he),s(e),()=>{a.delete(l),a.size===0&&n&&(n(),n=null)}}return{set:r,update:i,subscribe:o}}class Ee{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Re{constructor(t,n){this.status=t,this.location=n}}class xe extends Error{constructor(t,n,a){super(a),this.status=t,this.text=n}}new URL("sveltekit-internal://");function _t(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function mt(e){return e.split("%25").map(decodeURI).join("%25")}function wt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function pe({href:e}){return e.split("#")[0]}function vt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let a=n.length;for(;a;)t=t*33^n.charCodeAt(--a)}else if(ArrayBuffer.isView(n)){const a=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let r=a.length;for(;r;)t=t*33^a[--r]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function yt(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n}const bt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&F.delete(Ae(e)),bt(e,t));const F=new Map;function kt(e,t){const n=Ae(e,t),a=document.querySelector(n);if(a?.textContent){a.remove();let{body:r,...i}=JSON.parse(a.textContent);const o=a.getAttribute("data-ttl");return o&&F.set(n,{body:r,init:i,ttl:1e3*Number(o)}),a.getAttribute("data-b64")!==null&&(r=yt(r)),Promise.resolve(new Response(r,i))}return window.fetch(e,t)}function St(e,t,n){if(F.size>0){const a=Ae(e,n),r=F.get(a);if(r){if(performance.now()<r.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(r.body,r.init);F.delete(a)}}return window.fetch(t,n)}function Ae(e,t){let a=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const r=[];t.headers&&r.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&r.push(t.body),a+=`[data-hash="${vt(...r)}"]`}return a}const Et=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Rt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${At(e).map(a=>{const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(r)return t.push({name:r[1],matcher:r[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const o=a.split(/\[(.+?)\](?!\])/);return"/"+o.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return ge(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return ge(String.fromCharCode(...c.slice(2).split("-").map(m=>parseInt(m,16))));const f=Et.exec(c),[,h,w,u,g]=f;return t.push({name:u,matcher:g,optional:!!h,rest:!!w,chained:w?l===1&&o[0]==="":!1}),w?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return ge(c)}).join("")}).join("")}/?$`),params:t}}function xt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function At(e){return e.slice(1).split("/").filter(xt)}function Lt(e,t,n){const a={},r=e.slice(1),i=r.filter(s=>s!==void 0);let o=0;for(let s=0;s<t.length;s+=1){const c=t[s];let l=r[s-o];if(c.chained&&c.rest&&o&&(l=r.slice(s-o,s+1).filter(f=>f).join("/"),o=0),l===void 0)if(c.rest)l="";else continue;if(!c.matcher||n[c.matcher](l)){a[c.name]=l;const f=t[s+1],h=r[s+1];f&&!f.rest&&f.optional&&h&&c.chained&&(o=0),!f&&!h&&Object.keys(a).length===i.length&&(o=0);continue}if(c.optional&&c.chained){o++;continue}return}if(!o)return a}function ge(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ut({nodes:e,server_loads:t,dictionary:n,matchers:a}){const r=new Set(t);return Object.entries(n).map(([s,[c,l,f]])=>{const{pattern:h,params:w}=Rt(s),u={id:s,exec:g=>{const m=h.exec(g);if(m)return Lt(m,w,a)},errors:[1,...f||[]].map(g=>e[g]),layouts:[0,...l||[]].map(o),leaf:i(c)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function i(s){const c=s<0;return c&&(s=~s),[c,e[s]]}function o(s){return s===void 0?s:[r.has(s),e[s]]}}function Ge(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function De(e,t,n=JSON.stringify){const a=n(t);try{sessionStorage[e]=a}catch{}}const x=globalThis.__sveltekit_p60p87?.base??"",Tt=globalThis.__sveltekit_p60p87?.assets??x??"",It="1770117930907",We="sveltekit:snapshot",Ye="sveltekit:scroll",He="sveltekit:states",Ot="sveltekit:pageurl",K="sveltekit:history",W="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Le=location.origin;function Je(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function le(){return{x:pageXOffset,y:pageYOffset}}function B(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ve={...j,"":j.hover};function Xe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Qe(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Xe(e)}}function we(e,t,n){let a;try{if(a=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&a.hash.match(/^#[^/]/)){const s=location.hash.split("#")[1]||"/";a.hash=`#${s}${a.hash}`}}catch{}const r=e instanceof SVGAElement?e.target.baseVal:e.target,i=!a||!!r||ue(a,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=a?.origin===Le&&e.hasAttribute("download");return{url:a,external:i,target:r,download:o}}function te(e){let t=null,n=null,a=null,r=null,i=null,o=null,s=e;for(;s&&s!==document.documentElement;)a===null&&(a=B(s,"preload-code")),r===null&&(r=B(s,"preload-data")),t===null&&(t=B(s,"keepfocus")),n===null&&(n=B(s,"noscroll")),i===null&&(i=B(s,"reload")),o===null&&(o=B(s,"replacestate")),s=Xe(s);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ve[a??"off"],preload_data:Ve[r??"off"],keepfocus:c(t),noscroll:c(n),reload:c(i),replace_state:c(o)}}function Be(e){const t=Se(e);let n=!0;function a(){n=!0,t.update(o=>o)}function r(o){n=!1,t.set(o)}function i(o){let s;return t.subscribe(c=>{(s===void 0||n&&c!==s)&&o(s=c)})}return{notify:a,set:r,subscribe:i}}const Ze={v:()=>{}};function Pt(){const{set:e,subscribe:t}=Se(!1);let n;async function a(){clearTimeout(n);try{const r=await fetch(`${Tt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const o=(await r.json()).version!==It;return o&&(e(!0),Ze.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:t,check:a}}function ue(e,t,n){return e.origin!==Le||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function cn(e){}const et=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...et];const $t=new Set([...et]);[...$t];function Ct(e){return e.filter(t=>t!=null)}function Ue(e){return e instanceof Ee||e instanceof xe?e.status:500}function jt(e){return e instanceof xe?e.text:"Internal Error"}let k,Y,_e;const Nt=qe.toString().includes("$$")||/function \w+\(\) \{\}/.test(qe.toString());Nt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},Y={current:null},_e={current:!1}):(k=new class{#e=U({});get data(){return T(this.#e)}set data(t){I(this.#e,t)}#t=U(null);get form(){return T(this.#t)}set form(t){I(this.#t,t)}#n=U(null);get error(){return T(this.#n)}set error(t){I(this.#n,t)}#a=U({});get params(){return T(this.#a)}set params(t){I(this.#a,t)}#r=U({id:null});get route(){return T(this.#r)}set route(t){I(this.#r,t)}#o=U({});get state(){return T(this.#o)}set state(t){I(this.#o,t)}#s=U(-1);get status(){return T(this.#s)}set status(t){I(this.#s,t)}#i=U(new URL("https://example.com"));get url(){return T(this.#i)}set url(t){I(this.#i,t)}},Y=new class{#e=U(null);get current(){return T(this.#e)}set current(t){I(this.#e,t)}},_e=new class{#e=U(!1);get current(){return T(this.#e)}set current(t){I(this.#e,t)}},Ze.v=()=>_e.current=!0);function qt(e){Object.assign(k,e)}const Dt=new Set(["icon","shortcut icon","apple-touch-icon"]),q=Ge(Ye)??{},H=Ge(We)??{},C={url:Be({}),page:Be({}),navigating:Se(null),updated:Pt()};function Te(e){q[e]=le()}function Vt(e,t){let n=e+1;for(;q[n];)delete q[n],n+=1;for(n=t+1;H[n];)delete H[n],n+=1}function J(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function tt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function Ke(){}let Ie,ve,ne,O,ye,v;const ae=[],re=[];let A=null;function be(){A?.fork?.then(e=>e?.discard()),A=null}const Z=new Map,nt=new Set,Bt=new Set,G=new Set;let _={branch:[],error:null,url:null},at=!1,oe=!1,Me=!0,X=!1,z=!1,rt=!1,Oe=!1,ot,y,R,N;const se=new Set,ze=new Map;async function dn(e,t,n){globalThis.__sveltekit_p60p87?.data&&globalThis.__sveltekit_p60p87.data,document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Ie=Ut(e),O=document.documentElement,ye=t,ve=e.nodes[0],ne=e.nodes[1],ve(),ne(),y=history.state?.[K],R=history.state?.[W],y||(y=R=Date.now(),history.replaceState({...history.state,[K]:y,[W]:R},""));const a=q[y];function r(){a&&(history.scrollRestoration="manual",scrollTo(a.x,a.y))}n?(r(),await tn(ye,n)):(await M({type:"enter",url:Je(v.hash?rn(new URL(location.href)):location.href),replace_state:!0}),r()),en()}function Kt(){ae.length=0,Oe=!1}function st(e){re.some(t=>t?.snapshot)&&(H[e]=re.map(t=>t?.snapshot?.capture()))}function it(e){H[e]?.forEach((t,n)=>{re[n]?.snapshot?.restore(t)})}function Fe(){Te(y),De(Ye,q),st(R),De(We,H)}async function Mt(e,t,n,a){let r;t.invalidateAll&&be(),await M({type:"goto",url:Je(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:a,accept:()=>{t.invalidateAll&&(Oe=!0,r=[...ze.keys()]),t.invalidate&&t.invalidate.forEach(Zt)}}),t.invalidateAll&&ee().then(ee).then(()=>{ze.forEach(({resource:i},o)=>{r?.includes(o)&&i.refresh?.()})})}async function zt(e){if(e.id!==A?.id){be();const t={};se.add(t),A={id:e.id,token:t,promise:lt({...e,preload:t}).then(n=>(se.delete(t),n.type==="loaded"&&n.state.error&&be(),n)),fork:null}}return A.promise}async function me(e){const t=(await fe(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}async function ct(e,t,n){_=e.state;const a=document.querySelector("style[data-sveltekit]");if(a&&a.remove(),Object.assign(k,e.props.page),ot=new v.root({target:t,props:{...e.props,stores:C,components:re},hydrate:n,sync:!1}),await Promise.resolve(),it(R),n){const r={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};G.forEach(i=>i(r))}oe=!0}function ie({url:e,params:t,branch:n,status:a,error:r,route:i,form:o}){let s="never";if(x&&(e.pathname===x||e.pathname===x+"/"))s="always";else for(const u of n)u?.slash!==void 0&&(s=u.slash);e.pathname=_t(e.pathname,s),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:r,route:i},props:{constructors:Ct(n).map(u=>u.node.component),page:Ne(k)}};o!==void 0&&(c.props.form=o);let l={},f=!k,h=0;for(let u=0;u<Math.max(n.length,_.branch.length);u+=1){const g=n[u],m=_.branch[u];g?.data!==m?.data&&(f=!0),g&&(l={...l,...g.data},f&&(c.props[`data_${h}`]=l),h+=1)}return(!_.url||e.href!==_.url.href||_.error!==r||o!==void 0&&o!==k.form||f)&&(c.props.page={error:r,params:t,route:{id:i?.id??null},state:{},status:a,url:new URL(e),form:o??null,data:f?l:k.data}),c}async function Pe({loader:e,parent:t,url:n,params:a,route:r,server_data_node:i}){let o=null;const s={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();return{node:c,loader:e,server:i,universal:c.universal?.load?{type:"data",data:o,uses:s}:null,data:o??i?.data??null,slash:c.universal?.trailingSlash??i?.slash}}function Ft(e,t,n){let a=e instanceof Request?e.url:e;const r=new URL(a,n);r.origin===n.origin&&(a=r.href.slice(n.origin.length));const i=oe?St(a,r.href,t):kt(a,t);return{resolved:r,promise:i}}function Gt(e,t,n,a,r,i){if(Oe)return!0;if(!r)return!1;if(r.parent&&e||r.route&&t||r.url&&n)return!0;for(const o of r.search_params)if(a.has(o))return!0;for(const o of r.params)if(i[o]!==_.params[o])return!0;for(const o of r.dependencies)if(ae.some(s=>s(new URL(o))))return!0;return!1}function $e(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Wt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const a of n){const r=e.searchParams.getAll(a),i=t.searchParams.getAll(a);r.every(o=>i.includes(o))&&i.every(o=>r.includes(o))&&n.delete(a)}return n}function Yt({error:e,url:t,route:n,params:a}){return{type:"loaded",state:{error:e,url:t,route:n,params:a,branch:[]},props:{page:Ne(k),constructors:[]}}}async function lt({id:e,invalidating:t,url:n,params:a,route:r,preload:i}){if(A?.id===e)return se.delete(A.token),A.promise;const{errors:o,layouts:s,leaf:c}=r,l=[...s,c];o.forEach(p=>p?.().catch(()=>{})),l.forEach(p=>p?.[1]().catch(()=>{}));const f=_.url?e!==ce(_.url):!1,h=_.route?r.id!==_.route.id:!1,w=Wt(_.url,n);let u=!1;const g=l.map(async(p,d)=>{if(!p)return;const S=_.branch[d];return p[1]===S?.loader&&!Gt(u,h,f,w,S.universal?.uses,a)?S:(u=!0,Pe({loader:p[1],url:n,params:a,route:r,parent:async()=>{const P={};for(let L=0;L<d;L+=1)Object.assign(P,(await g[L])?.data);return P},server_data_node:$e(p[0]?{type:"skip"}:null,p[0]?S?.server:void 0)}))});for(const p of g)p.catch(()=>{});const m=[];for(let p=0;p<l.length;p+=1)if(l[p])try{m.push(await g[p])}catch(d){if(d instanceof Re)return{type:"redirect",location:d.location};if(se.has(i))return Yt({error:await Q(d,{params:a,url:n,route:{id:r.id}}),url:n,params:a,route:r});let S=Ue(d),E;if(d instanceof Ee)E=d.body;else{if(await C.updated.check())return await tt(),await J(n);E=await Q(d,{params:a,url:n,route:{id:r.id}})}const P=await Ht(p,m,o);return P?ie({url:n,params:a,branch:m.slice(0,P.idx).concat(P.node),status:S,error:E,route:r}):await ft(n,{id:r.id},E,S)}else m.push(void 0);return ie({url:n,params:a,branch:m,status:200,error:null,route:r,form:t?void 0:null})}async function Ht(e,t,n){for(;e--;)if(n[e]){let a=e;for(;!t[a];)a-=1;try{return{idx:a+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Ce({status:e,error:t,url:n,route:a}){const r={};let i=null;try{const o=await Pe({loader:ve,url:n,params:r,route:a,parent:()=>Promise.resolve({}),server_data_node:$e(i)}),s={node:await ne(),loader:ne,universal:null,server:null,data:null};return ie({url:n,params:r,branch:[o,s],status:e,error:t,route:null})}catch(o){if(o instanceof Re)return Mt(new URL(o.location,location.href),{},0);throw o}}async function Jt(e){const t=e.href;if(Z.has(t))return Z.get(t);let n;try{const a=(async()=>{let r=await v.hooks.reroute({url:new URL(e),fetch:async(i,o)=>Ft(i,o,e).promise})??e;if(typeof r=="string"){const i=new URL(e);v.hash?i.hash=r:i.pathname=r,r=i}return r})();Z.set(t,a),n=await a}catch{Z.delete(t);return}return n}async function fe(e,t){if(e&&!ue(e,x,v.hash)){const n=await Jt(e);if(!n)return;const a=Xt(n);for(const r of Ie){const i=r.exec(a);if(i)return{id:ce(e),invalidating:t,route:r,params:wt(i),url:e}}}}function Xt(e){return mt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function ce(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ut({url:e,type:t,intent:n,delta:a,event:r}){let i=!1;const o=je(_,n,e,t);a!==void 0&&(o.navigation.delta=a),r!==void 0&&(o.navigation.event=r);const s={...o.navigation,cancel:()=>{i=!0,o.reject(new Error("navigation cancelled"))}};return X||nt.forEach(c=>c(s)),i?null:o}async function M({type:e,url:t,popped:n,keepfocus:a,noscroll:r,replace_state:i,state:o={},redirect_count:s=0,nav_token:c={},accept:l=Ke,block:f=Ke,event:h}){const w=N;N=c;const u=await fe(t,!1),g=e==="enter"?je(_,u,t,e):ut({url:t,type:e,delta:n?.delta,intent:u,event:h});if(!g){f(),N===c&&(N=w);return}const m=y,p=R;l(),X=!0,oe&&g.navigation.type!=="enter"&&C.navigating.set(Y.current=g.navigation);let d=u&&await lt(u);if(!d){if(ue(t,x,v.hash))return await J(t,i);d=await ft(t,{id:null},await Q(new xe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=u?.url||t,N!==c)return g.reject(new Error("navigation aborted")),!1;if(d.type==="redirect"){if(s<20){await M({type:e,url:new URL(d.location,t),popped:n,keepfocus:a,noscroll:r,replace_state:i,state:o,redirect_count:s+1,nav_token:c}),g.fulfil(void 0);return}d=await Ce({status:500,error:await Q(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else d.props.page.status>=400&&await C.updated.check()&&(await tt(),await J(t,i));if(Kt(),Te(m),st(p),d.props.page.url.pathname!==t.pathname&&(t.pathname=d.props.page.url.pathname),o=n?n.state:o,!n){const b=i?0:1,D={[K]:y+=b,[W]:R+=b,[He]:o};(i?history.replaceState:history.pushState).call(history,D,"",t),i||Vt(y,R)}const S=u&&A?.id===u.id?A.fork:null;A=null,d.props.page.state=o;let E;if(oe){const b=(await Promise.all(Array.from(Bt,$=>$(g.navigation)))).filter($=>typeof $=="function");if(b.length>0){let $=function(){b.forEach(de=>{G.delete(de)})};b.push($),b.forEach(de=>{G.add(de)})}_=d.state,d.props.page&&(d.props.page.url=t);const D=S&&await S;D?E=D.commit():(ot.$set(d.props),qt(d.props.page),E=gt?.()),rt=!0}else await ct(d,ye,!1);const{activeElement:P}=document;await E,await ee(),await ee();let L=n?n.scroll:r?le():null;if(Me){const b=t.hash&&document.getElementById(dt(t));if(L)scrollTo(L.x,L.y);else if(b){b.scrollIntoView();const{top:D,left:$}=b.getBoundingClientRect();L={x:pageXOffset+$,y:pageYOffset+D}}else scrollTo(0,0)}const ht=document.activeElement!==P&&document.activeElement!==document.body;!a&&!ht&&an(t,L),Me=!0,d.props.page&&Object.assign(k,d.props.page),X=!1,e==="popstate"&&it(R),g.fulfil(void 0),G.forEach(b=>b(g.navigation)),C.navigating.set(Y.current=null)}async function ft(e,t,n,a,r){return e.origin===Le&&e.pathname===location.pathname&&!at?await Ce({status:a,error:n,url:e,route:t}):await J(e,r)}function Qt(){let e,t={element:void 0,href:void 0},n;O.addEventListener("mousemove",s=>{const c=s.target;clearTimeout(e),e=setTimeout(()=>{i(c,j.hover)},20)});function a(s){s.defaultPrevented||i(s.composedPath()[0],j.tap)}O.addEventListener("mousedown",a),O.addEventListener("touchstart",a,{passive:!0});const r=new IntersectionObserver(s=>{for(const c of s)c.isIntersecting&&(me(new URL(c.target.href)),r.unobserve(c.target))},{threshold:0});async function i(s,c){const l=Qe(s,O),f=l===t.element&&l?.href===t.href&&c>=n;if(!l||f)return;const{url:h,external:w,download:u}=we(l,x,v.hash);if(w||u)return;const g=te(l),m=h&&ce(_.url)===ce(h);if(!(g.reload||m))if(c<=g.preload_data){t={element:l,href:l.href},n=j.tap;const p=await fe(h,!1);if(!p)return;zt(p)}else c<=g.preload_code&&(t={element:l,href:l.href},n=c,me(h))}function o(){r.disconnect();for(const s of O.querySelectorAll("a")){const{url:c,external:l,download:f}=we(s,x,v.hash);if(l||f)continue;const h=te(s);h.reload||(h.preload_code===j.viewport&&r.observe(s),h.preload_code===j.eager&&me(c))}}G.add(o),o()}function Q(e,t){if(e instanceof Ee)return e.body;const n=Ue(e),a=jt(e);return v.hooks.handleError({error:e,event:t,status:n,message:a})??{message:a}}function Zt(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function en(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Fe(),!X){const a=je(_,void 0,null,"leave"),r={...a.navigation,cancel:()=>{n=!0,a.reject(new Error("navigation cancelled"))}};nt.forEach(i=>i(r))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Fe()}),navigator.connection?.saveData||Qt(),O.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Qe(t.composedPath()[0],O);if(!n)return;const{url:a,external:r,target:i,download:o}=we(n,x,v.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const s=te(n);if(!(n instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[l,f]=(v.hash?a.hash.replace(/^#/,""):a.href).split("#"),h=l===pe(location);if(r||s.reload&&(!h||!f)){ut({url:a,type:"link",event:t})?X=!0:t.preventDefault();return}if(f!==void 0&&h){const[,w]=_.url.href.split("#");if(w===f){if(t.preventDefault(),f===""||f==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=n.ownerDocument.getElementById(decodeURIComponent(f));u&&(u.scrollIntoView(),u.focus())}return}if(z=!0,Te(y),e(a),!s.replace_state)return;z=!1}t.preventDefault(),await new Promise(w=>{requestAnimationFrame(()=>{setTimeout(w,0)}),setTimeout(w,100)}),await M({type:"link",url:a,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??a.href===location.href,event:t})}),O.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),a=t.submitter;if((a?.formTarget||n.target)==="_blank"||(a?.formMethod||n.method)!=="get")return;const o=new URL(a?.hasAttribute("formaction")&&a?.formAction||n.action);if(ue(o,x,!1))return;const s=t.target,c=te(s);if(c.reload)return;t.preventDefault(),t.stopPropagation();const l=new FormData(s,a);o.search=new URLSearchParams(l).toString(),M({type:"form",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!ke){if(t.state?.[K]){const n=t.state[K];if(N={},n===y)return;const a=q[n],r=t.state[He]??{},i=new URL(t.state[Ot]??location.href),o=t.state[W],s=_.url?pe(location)===pe(_.url):!1;if(o===R&&(rt||s)){r!==k.state&&(k.state=r),e(i),q[y]=le(),a&&scrollTo(a.x,a.y),y=n;return}const l=n-y;await M({type:"popstate",url:i,popped:{state:r,scroll:a,delta:l},accept:()=>{y=n,R=o},block:()=>{history.go(-l)},nav_token:N,event:t})}else if(!z){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{z&&(z=!1,history.replaceState({...history.state,[K]:++y,[W]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Dt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&C.navigating.set(Y.current=null)});function e(t){_.url=k.url=t,C.page.set(Ne(k)),C.page.notify()}}async function tn(e,{status:t=200,error:n,node_ids:a,params:r,route:i,server_route:o,data:s,form:c}){at=!0;const l=new URL(location.href);let f;({params:r={},route:i={id:null}}=await fe(l,!1)||{}),f=Ie.find(({id:u})=>u===i.id);let h,w=!0;try{const u=a.map(async(m,p)=>{const d=s[p];return d?.uses&&(d.uses=nn(d.uses)),Pe({loader:v.nodes[m],url:l,params:r,route:i,parent:async()=>{const S={};for(let E=0;E<p;E+=1)Object.assign(S,(await u[E]).data);return S},server_data_node:$e(d)})}),g=await Promise.all(u);if(f){const m=f.layouts;for(let p=0;p<m.length;p++)m[p]||g.splice(p,0,void 0)}h=ie({url:l,params:r,branch:g,status:t,error:n,form:c,route:f??null})}catch(u){if(u instanceof Re){await J(new URL(u.location,location.href));return}h=await Ce({status:Ue(u),error:await Q(u,{url:l,params:r,route:i}),url:l,route:i}),e.textContent="",w=!1}h.props.page&&(h.props.page.state={}),await ct(h,e,w)}function nn(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let ke=!1;function an(e,t=null){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const a=dt(e);if(a&&document.getElementById(a)){const{x:i,y:o}=t??le();setTimeout(()=>{const s=history.state;ke=!0,location.replace(`#${a}`),v.hash&&location.replace(e.hash),history.replaceState(s,"",e.hash),scrollTo(i,o),ke=!1})}else{const i=document.body,o=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),o!==null?i.setAttribute("tabindex",o):i.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const i=[];for(let o=0;o<r.rangeCount;o+=1)i.push(r.getRangeAt(o));setTimeout(()=>{if(r.rangeCount===i.length){for(let o=0;o<r.rangeCount;o+=1){const s=i[o],c=r.getRangeAt(o);if(s.commonAncestorContainer!==c.commonAncestorContainer||s.startContainer!==c.startContainer||s.endContainer!==c.endContainer||s.startOffset!==c.startOffset||s.endOffset!==c.endOffset)return}r.removeAllRanges()}})}}}function je(e,t,n,a){let r,i;const o=new Promise((c,l)=>{r=c,i=l});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n},willUnload:!t,type:a,complete:o},fulfil:r,reject:i}}function Ne(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function rn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function dt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{dn as a,cn as l,k as p,C as s};
@@ -0,0 +1 @@
1
+ import{e as n,f as p,g as o,p as u,i as d,j as l,h as m,k as _,m as v,l as b}from"./DfIkQq0Y.js";class w{anchor;#t=new Map;#s=new Map;#e=new Map;#i=new Set;#a=!0;constructor(e,s=!0){this.anchor=e,this.#a=s}#f=()=>{var e=n;if(this.#t.has(e)){var s=this.#t.get(e),t=this.#s.get(s);if(t)p(t),this.#i.delete(s);else{var a=this.#e.get(s);a&&(this.#s.set(s,a.effect),this.#e.delete(s),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),t=a.effect)}for(const[i,f]of this.#t){if(this.#t.delete(i),i===e)break;const h=this.#e.get(f);h&&(o(h.effect),this.#e.delete(f))}for(const[i,f]of this.#s){if(i===s||this.#i.has(i))continue;const h=()=>{if(Array.from(this.#t.values()).includes(i)){var c=document.createDocumentFragment();v(f,c),c.append(d()),this.#e.set(i,{effect:f,fragment:c})}else o(f);this.#i.delete(i),this.#s.delete(i)};this.#a||!t?(this.#i.add(i),u(f,h,!1)):h()}}};#h=e=>{this.#t.delete(e);const s=Array.from(this.#t.values());for(const[t,a]of this.#e)s.includes(t)||(o(a.effect),this.#e.delete(t))};ensure(e,s){var t=n,a=b();if(s&&!this.#s.has(e)&&!this.#e.has(e))if(a){var i=document.createDocumentFragment(),f=d();i.append(f),this.#e.set(e,{effect:l(()=>s(f)),fragment:i})}else this.#s.set(e,l(()=>s(this.anchor)));if(this.#t.set(t,e),a){for(const[h,r]of this.#s)h===e?t.skipped_effects.delete(r):t.skipped_effects.add(r);for(const[h,r]of this.#e)h===e?t.skipped_effects.delete(r.effect):t.skipped_effects.add(r.effect);t.oncommit(this.#f),t.ondiscard(this.#h)}else m&&(this.anchor=_),this.#f()}}export{w as B};
@@ -0,0 +1 @@
1
+ import{o as l,n as o,A as u,q as t}from"./DfIkQq0Y.js";function c(n){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function a(n){o===null&&c(),u&&o.l!==null?i(o).m.push(n):l(()=>{const e=t(n);if(typeof e=="function")return e})}function f(n){o===null&&c(),a(()=>()=>t(n))}function i(n){var e=n.l;return e.u??={a:[],b:[],m:[]}}export{f as a,a as o};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.CPncm6RP.js","../chunks/Binc8JbE.js","../chunks/DfIkQq0Y.js","../chunks/N3z8axFy.js","../chunks/CDSQEL5N.js","../assets/0.DOQLX7EM.css","../nodes/1.x-f3libw.js","../chunks/BORyfda6.js","../chunks/BaoxLdOF.js","../chunks/MAGDeS2Z.js","../chunks/yhjkpkcN.js","../nodes/2.BP5Yvqf4.js","../chunks/BTLkiQR5.js","../assets/2.CU0O2Xrb.css"])))=>i.map(i=>d[i]);
2
+ import{h as H,a as W,b as X,E as Z,V as Q,X as p,q,_ as $,ay as U,az as ee,aA as te,aB as re,w as v,av as ae,aw as O,aC as ne,K as se,aD as ie,aE as oe,A as ce,aF as ue,aG as fe,y as le,aH as de,aI as _e,aJ as F,aK as me,ai as ve,aL as he,B as ge,u as ye,o as Ee,aM as be,C as w,J as Pe,F as Se,au as I,G as Re,I as Oe,D as we,ax as L}from"../chunks/DfIkQq0Y.js";import{h as Ae,m as Ie,u as Le,s as xe}from"../chunks/BaoxLdOF.js";import{a as R,c as x,f as V,t as Te}from"../chunks/Binc8JbE.js";import{o as Ce}from"../chunks/yhjkpkcN.js";import{i as T}from"../chunks/BTLkiQR5.js";import{B as De}from"../chunks/N3z8axFy.js";function C(t,e,a){H&&W();var c=new De(t);X(()=>{var s=e()??null;c.ensure(s,s&&(r=>a(r,s)))},Z)}function M(t,e){return t===e||t?.[U]===e}function D(t={},e,a,c){return Q(()=>{var s,r;return p(()=>{s=r,r=[],q(()=>{t!==a(...r)&&(e(t,...r),s&&M(a(...s),t)&&e(null,...s))})}),()=>{$(()=>{r&&M(a(...r),t)&&e(null,...r)})}}),t}let A=!1;function Be(t){var e=A;try{return A=!1,[t(),A]}finally{A=e}}function B(t,e,a,c){var s=!ce||(a&ue)!==0,r=(a&oe)!==0,n=(a&_e)!==0,i=c,E=!0,P=()=>(E&&(E=!1,i=n?q(c):c),i),u;if(r){var h=U in t||F in t;u=ee(t,e)?.set??(h&&e in t?o=>t[e]=o:void 0)}var d,_=!1;r?[d,_]=Be(()=>t[e]):d=t[e],d===void 0&&c!==void 0&&(d=P(),u&&(s&&te(),u(d)));var l;if(s?l=()=>{var o=t[e];return o===void 0?P():(E=!0,o)}:l=()=>{var o=t[e];return o!==void 0&&(i=void 0),o===void 0?i:o},s&&(a&re)===0)return l;if(u){var f=t.$$legacy;return(function(o,y){return arguments.length>0?((!s||!y||f||_)&&u(y?l():o),o):l()})}var g=!1,m=((a&fe)!==0?le:de)(()=>(g=!1,l()));r&&v(m);var S=se;return(function(o,y){if(arguments.length>0){const b=y?v(m):s&&r?ae(o):o;return O(m,b),g=!0,i!==void 0&&(i=b),o}return ne&&g||(S.f&ie)!==0?m.v:v(m)})}function je(t){return class extends ke{constructor(e){super({component:t,...e})}}}class ke{#t;#e;constructor(e){var a=new Map,c=(r,n)=>{var i=he(n,!1,!1);return a.set(r,i),i};const s=new Proxy({...e.props||{},$$events:{}},{get(r,n){return v(a.get(n)??c(n,Reflect.get(r,n)))},has(r,n){return n===F?!0:(v(a.get(n)??c(n,Reflect.get(r,n))),Reflect.has(r,n))},set(r,n,i){return O(a.get(n)??c(n,i),i),Reflect.set(r,n,i)}});this.#e=(e.hydrate?Ae:Ie)(e.component,{target:e.target,anchor:e.anchor,props:s,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&me(),this.#t=s.$$events;for(const r of Object.keys(this.#e))r==="$set"||r==="$destroy"||r==="$on"||ve(this,r,{get(){return this.#e[r]},set(n){this.#e[r]=n},enumerable:!0});this.#e.$set=r=>{Object.assign(s,r)},this.#e.$destroy=()=>{Le(this.#e)}}$set(e){this.#e.$set(e)}$on(e,a){this.#t[e]=this.#t[e]||[];const c=(...s)=>a.call(this,...s);return this.#t[e].push(c),()=>{this.#t[e]=this.#t[e].filter(s=>s!==c)}}$destroy(){this.#e.$destroy()}}const Me="modulepreload",Ne=function(t,e){return new URL(t,e).href},N={},j=function(e,a,c){let s=Promise.resolve();if(a&&a.length>0){let P=function(u){return Promise.all(u.map(h=>Promise.resolve(h).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};const n=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),E=i?.nonce||i?.getAttribute("nonce");s=P(a.map(u=>{if(u=Ne(u,c),u in N)return;N[u]=!0;const h=u.endsWith(".css"),d=h?'[rel="stylesheet"]':"";if(c)for(let l=n.length-1;l>=0;l--){const f=n[l];if(f.href===u&&(!h||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${d}`))return;const _=document.createElement("link");if(_.rel=h?"stylesheet":Me,h||(_.as="script"),_.crossOrigin="",_.href=u,E&&_.setAttribute("nonce",E),document.head.appendChild(_),h)return new Promise((l,f)=>{_.addEventListener("load",l),_.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${u}`)))})}))}function r(n){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=n,window.dispatchEvent(i),!i.defaultPrevented)throw n}return s.then(n=>{for(const i of n||[])i.status==="rejected"&&r(i.reason);return e().catch(r)})},Xe={};var qe=V('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Ue=V("<!> <!>",1);function Fe(t,e){ge(e,!0);let a=B(e,"components",23,()=>[]),c=B(e,"data_0",3,null),s=B(e,"data_1",3,null);ye(()=>e.stores.page.set(e.page)),Ee(()=>{e.stores,e.page,e.constructors,a(),e.form,c(),s(),e.stores.page.notify()});let r=I(!1),n=I(!1),i=I(null);Ce(()=>{const f=e.stores.page.subscribe(()=>{v(r)&&(O(n,!0),be().then(()=>{O(i,document.title||"untitled page",!0)}))});return O(r,!0),f});const E=L(()=>e.constructors[1]);var P=Ue(),u=w(P);{var h=f=>{const g=L(()=>e.constructors[0]);var m=x(),S=w(m);C(S,()=>v(g),(o,y)=>{D(y(o,{get data(){return c()},get form(){return e.form},get params(){return e.page.params},children:(b,Ye)=>{var k=x(),G=w(k);C(G,()=>v(E),(z,J)=>{D(J(z,{get data(){return s()},get form(){return e.form},get params(){return e.page.params}}),K=>a()[1]=K,()=>a()?.[1])}),R(b,k)},$$slots:{default:!0}}),b=>a()[0]=b,()=>a()?.[0])}),R(f,m)},d=f=>{const g=L(()=>e.constructors[0]);var m=x(),S=w(m);C(S,()=>v(g),(o,y)=>{D(y(o,{get data(){return c()},get form(){return e.form},get params(){return e.page.params}}),b=>a()[0]=b,()=>a()?.[0])}),R(f,m)};T(u,f=>{e.constructors[1]?f(h):f(d,!1)})}var _=Pe(u,2);{var l=f=>{var g=qe(),m=Re(g);{var S=o=>{var y=Te();we(()=>xe(y,v(i))),R(o,y)};T(m,o=>{v(n)&&o(S)})}Oe(g),R(f,g)};T(_,f=>{v(r)&&f(l)})}R(t,P),Se()}const Ze=je(Fe),Qe=[()=>j(()=>import("../nodes/0.CPncm6RP.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),()=>j(()=>import("../nodes/1.x-f3libw.js"),__vite__mapDeps([6,1,2,7,8,9,10]),import.meta.url),()=>j(()=>import("../nodes/2.BP5Yvqf4.js"),__vite__mapDeps([11,1,2,7,10,8,12,3,4,13]),import.meta.url)],pe=[],$e={"/":[2]},Y={handleError:(({error:t})=>{console.error(t)}),reroute:(()=>{}),transport:{}},Ve=Object.fromEntries(Object.entries(Y.transport).map(([t,e])=>[t,e.decode])),et=Object.fromEntries(Object.entries(Y.transport).map(([t,e])=>[t,e.encode])),tt=!1,rt=(t,e)=>Ve[t](e);export{rt as decode,Ve as decoders,$e as dictionary,et as encoders,tt as hash,Y as hooks,Xe as matchers,Qe as nodes,Ze as root,pe as server_loads};
@@ -0,0 +1 @@
1
+ import{l as o,a as r}from"../chunks/MAGDeS2Z.js";export{o as load_css,r as start};
@@ -0,0 +1 @@
1
+ import{c as p,a as i,f as c}from"../chunks/Binc8JbE.js";import{b as u,E as _,i as y,R as v,h as o,S as g,U as l,d as m,c as f,k as E,L as h,B as T,o as b,C as F,F as C,V as M,$ as N}from"../chunks/DfIkQq0Y.js";import{B as O}from"../chunks/N3z8axFy.js";import{t as R}from"../chunks/CDSQEL5N.js";function S(r,n,...a){var s=new O(r);u(()=>{const t=n()??null;s.ensure(t,t&&(e=>t(e,...a)))},_)}function w(r,n){let a=null,s=o;var t;if(o){a=E;for(var e=h(document.head);e!==null&&(e.nodeType!==g||e.data!==r);)e=l(e);if(e===null)m(!1);else{var d=l(e);e.remove(),f(d)}}o||(t=document.head.appendChild(y()));try{u(()=>n(t),v)}finally{s&&(m(!0),f(a))}}const x=!1,A=!0,I=Object.freeze(Object.defineProperty({__proto__:null,prerender:A,ssr:x},Symbol.toStringTag,{value:"Module"}));var B=c('<meta name="description" content="Real-time monitoring and device management for LIFX Emulator"/>');function P(r,n){T(n,!0),b(()=>{R.applyTheme()});var a=p();w("12qhfyh",t=>{var e=B();M(()=>{N.title="LIFX Emulator Monitor"}),i(t,e)});var s=F(a);S(s,()=>n.children),i(r,a),C()}export{P as component,I as universal};
@@ -0,0 +1 @@
1
+ import{a as u,f as h}from"../chunks/Binc8JbE.js";import{i as g}from"../chunks/BORyfda6.js";import{B as l,C as v,D as d,F as _,G as a,I as e,J as x}from"../chunks/DfIkQq0Y.js";import{s as o}from"../chunks/BaoxLdOF.js";import{s as $,p}from"../chunks/MAGDeS2Z.js";const k={get error(){return p.error},get status(){return p.status}};$.updated.check;const m=k;var b=h("<h1> </h1> <p> </p>",1);function G(i,f){l(f,!1),g();var t=b(),r=v(t),n=a(r,!0);e(r);var s=x(r,2),c=a(s,!0);e(s),d(()=>{o(n,m.status),o(c,m.error?.message)}),u(i,t),_()}export{G as component};