adwhytahumans commited on
Commit
b08d3ae
·
verified ·
1 Parent(s): c5ab643

Upload 12060 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +4 -0
  2. app.py +399 -0
  3. frontend/.DS_Store +0 -0
  4. frontend/index.html +13 -0
  5. frontend/node_modules/.DS_Store +0 -0
  6. frontend/node_modules/.package-lock.json +0 -0
  7. frontend/node_modules/.vite/deps/@hookform_resolvers_zod.js +88 -0
  8. frontend/node_modules/.vite/deps/@hookform_resolvers_zod.js.map +7 -0
  9. frontend/node_modules/.vite/deps/@radix-ui_react-alert-dialog.js +200 -0
  10. frontend/node_modules/.vite/deps/@radix-ui_react-alert-dialog.js.map +7 -0
  11. frontend/node_modules/.vite/deps/@radix-ui_react-checkbox.js +304 -0
  12. frontend/node_modules/.vite/deps/@radix-ui_react-checkbox.js.map +7 -0
  13. frontend/node_modules/.vite/deps/@radix-ui_react-dialog.js +52 -0
  14. frontend/node_modules/.vite/deps/@radix-ui_react-dialog.js.map +7 -0
  15. frontend/node_modules/.vite/deps/@radix-ui_react-label.js +43 -0
  16. frontend/node_modules/.vite/deps/@radix-ui_react-label.js.map +7 -0
  17. frontend/node_modules/.vite/deps/@radix-ui_react-select.js +0 -0
  18. frontend/node_modules/.vite/deps/@radix-ui_react-select.js.map +0 -0
  19. frontend/node_modules/.vite/deps/@radix-ui_react-slot.js +17 -0
  20. frontend/node_modules/.vite/deps/@radix-ui_react-slot.js.map +7 -0
  21. frontend/node_modules/.vite/deps/@radix-ui_react-toast.js +680 -0
  22. frontend/node_modules/.vite/deps/@radix-ui_react-toast.js.map +7 -0
  23. frontend/node_modules/.vite/deps/_metadata.json +169 -0
  24. frontend/node_modules/.vite/deps/chunk-43NH6PDE.js +285 -0
  25. frontend/node_modules/.vite/deps/chunk-43NH6PDE.js.map +7 -0
  26. frontend/node_modules/.vite/deps/chunk-5XBW43HD.js +2026 -0
  27. frontend/node_modules/.vite/deps/chunk-5XBW43HD.js.map +0 -0
  28. frontend/node_modules/.vite/deps/chunk-6PXSGDAH.js +928 -0
  29. frontend/node_modules/.vite/deps/chunk-6PXSGDAH.js.map +7 -0
  30. frontend/node_modules/.vite/deps/chunk-DRWLMN53.js +1906 -0
  31. frontend/node_modules/.vite/deps/chunk-DRWLMN53.js.map +0 -0
  32. frontend/node_modules/.vite/deps/chunk-FF4LPVR2.js +125 -0
  33. frontend/node_modules/.vite/deps/chunk-FF4LPVR2.js.map +7 -0
  34. frontend/node_modules/.vite/deps/chunk-G3PMV62Z.js +36 -0
  35. frontend/node_modules/.vite/deps/chunk-G3PMV62Z.js.map +7 -0
  36. frontend/node_modules/.vite/deps/chunk-HMLLSKRK.js +61 -0
  37. frontend/node_modules/.vite/deps/chunk-HMLLSKRK.js.map +7 -0
  38. frontend/node_modules/.vite/deps/chunk-MBR23SFK.js +368 -0
  39. frontend/node_modules/.vite/deps/chunk-MBR23SFK.js.map +7 -0
  40. frontend/node_modules/.vite/deps/chunk-PJEEZAML.js +0 -0
  41. frontend/node_modules/.vite/deps/chunk-PJEEZAML.js.map +0 -0
  42. frontend/node_modules/.vite/deps/chunk-PVJESVH4.js +65 -0
  43. frontend/node_modules/.vite/deps/chunk-PVJESVH4.js.map +7 -0
  44. frontend/node_modules/.vite/deps/chunk-R4J6KICQ.js +190 -0
  45. frontend/node_modules/.vite/deps/chunk-R4J6KICQ.js.map +7 -0
  46. frontend/node_modules/.vite/deps/chunk-TLMPZXCM.js +152 -0
  47. frontend/node_modules/.vite/deps/chunk-TLMPZXCM.js.map +7 -0
  48. frontend/node_modules/.vite/deps/chunk-U7P2NEEE.js +21 -0
  49. frontend/node_modules/.vite/deps/chunk-U7P2NEEE.js.map +7 -0
  50. frontend/node_modules/.vite/deps/chunk-XET2JR3H.js +1116 -0
.gitattributes CHANGED
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ frontend/node_modules/@esbuild/darwin-arm64/bin/esbuild filter=lfs diff=lfs merge=lfs -text
37
+ frontend/node_modules/@rollup/rollup-darwin-arm64/rollup.darwin-arm64.node filter=lfs diff=lfs merge=lfs -text
38
+ frontend/node_modules/esbuild/bin/esbuild filter=lfs diff=lfs merge=lfs -text
39
+ frontend/node_modules/fsevents/fsevents.node filter=lfs diff=lfs merge=lfs -text
app.py ADDED
@@ -0,0 +1,399 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI, HTTPException
2
+ from fastapi.middleware.cors import CORSMiddleware
3
+ from pydantic import BaseModel, EmailStr, ConfigDict
4
+ from typing import Optional, List, Literal
5
+ from enum import Enum
6
+ import uvicorn
7
+ import groq
8
+ from datetime import datetime
9
+ import os
10
+ from dotenv import load_dotenv
11
+ import logging
12
+ import csv
13
+ import json
14
+
15
+ # Configure logging
16
+ logging.basicConfig(level=logging.DEBUG)
17
+ logger = logging.getLogger(__name__)
18
+
19
+ # Load environment variables from .env file
20
+ load_dotenv()
21
+
22
+ # Initialize FastAPI app
23
+ app = FastAPI(
24
+ title="100x Elite CRM",
25
+ description="CRM system for managing learner enrollments in 100x Elite courses",
26
+ version="1.0.0"
27
+ )
28
+
29
+ # Add CORS middleware
30
+ app.add_middleware(
31
+ CORSMiddleware,
32
+ allow_origins=["http://localhost:5173", "http://localhost:5174"], # Frontend URLs
33
+ allow_credentials=True,
34
+ allow_methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"],
35
+ allow_headers=["Content-Type", "Accept", "Authorization"],
36
+ expose_headers=["Content-Type", "Accept"],
37
+ max_age=3600,
38
+ )
39
+
40
+ # Initialize Groq client
41
+ groq_api_key = os.getenv("GROQ_API_KEY")
42
+ logger.debug(f"Debug: Groq API Key loaded: {'Yes' if groq_api_key else 'No'}")
43
+ if not groq_api_key:
44
+ raise ValueError("GROQ_API_KEY environment variable is not set")
45
+ client = groq.Groq(api_key=groq_api_key)
46
+ logger.debug("Debug: Groq client initialized successfully")
47
+
48
+ # Enum for course options
49
+ class Course(str, Enum):
50
+ AI_FILMMAKING = "AI Filmmaking"
51
+ AI_MUSIC = "AI Music Composition"
52
+ AI_MICROSAAS = "AI Micro SaaS App Building"
53
+
54
+ # Enum for budget type
55
+ class BudgetType(str, Enum):
56
+ COMPANY = "company"
57
+ SELF = "self"
58
+
59
+ # Pydantic v2+ model for a learner (input)
60
+ class LearnerIn(BaseModel):
61
+ model_config = ConfigDict(from_attributes=True)
62
+ name: str
63
+ email: EmailStr
64
+ phone: Optional[str] = None
65
+ course: Course
66
+ # Extended fields for qualification
67
+ country: str
68
+ goal: str
69
+ budget: BudgetType
70
+ webinar_join: datetime
71
+ webinar_leave: datetime
72
+ asked_q: bool
73
+ referred: bool
74
+ past_touchpoints: int
75
+
76
+ # Pydantic v2+ model for a learner (output, with id and qualification)
77
+ class LearnerOut(LearnerIn):
78
+ id: int
79
+ engaged_mins: Optional[int] = None # Make engaged_mins optional
80
+ score: int
81
+ reasoning: str
82
+ status: Literal["Qualified", "Nurture"]
83
+
84
+ # CSV file path
85
+ CSV_FILE = "learners.csv"
86
+
87
+ # Ensure CSV file exists with headers
88
+ def init_csv():
89
+ if not os.path.exists(CSV_FILE):
90
+ with open(CSV_FILE, 'w', newline='') as f:
91
+ writer = csv.DictWriter(f, fieldnames=[
92
+ 'id', 'name', 'email', 'phone', 'course', 'country', 'goal',
93
+ 'budget', 'webinar_join', 'webinar_leave', 'asked_q',
94
+ 'referred', 'past_touchpoints', 'engaged_mins', 'score',
95
+ 'reasoning', 'status'
96
+ ])
97
+ writer.writeheader()
98
+
99
+ # Initialize CSV file
100
+ init_csv()
101
+
102
+ # Helper functions for CSV operations
103
+ def read_learners():
104
+ learners = {}
105
+ with open(CSV_FILE, 'r', newline='') as f:
106
+ reader = csv.DictReader(f)
107
+ for row in reader:
108
+ # Convert string values to appropriate types
109
+ row['id'] = int(row['id'])
110
+ row['asked_q'] = row['asked_q'].lower() == 'true'
111
+ row['referred'] = row['referred'].lower() == 'true'
112
+ row['past_touchpoints'] = int(row['past_touchpoints'])
113
+ row['engaged_mins'] = int(row['engaged_mins'])
114
+ row['score'] = int(row['score'])
115
+ row['course'] = Course[row['course']]
116
+ row['budget'] = BudgetType[row['budget']]
117
+ learners[row['id']] = row
118
+ return learners
119
+
120
+ def write_learners(learners):
121
+ with open(CSV_FILE, 'w', newline='') as f:
122
+ writer = csv.DictWriter(f, fieldnames=[
123
+ 'id', 'name', 'email', 'phone', 'course', 'country', 'goal',
124
+ 'budget', 'webinar_join', 'webinar_leave', 'asked_q',
125
+ 'referred', 'past_touchpoints', 'engaged_mins', 'score',
126
+ 'reasoning', 'status'
127
+ ])
128
+ writer.writeheader()
129
+ for learner in learners.values():
130
+ # Convert enum values to strings
131
+ learner_copy = learner.copy()
132
+ learner_copy['course'] = learner_copy['course'].name
133
+ learner_copy['budget'] = learner_copy['budget'].name
134
+ writer.writerow(learner_copy)
135
+
136
+ def get_next_id():
137
+ learners = read_learners()
138
+ return max(learners.keys(), default=0) + 1
139
+
140
+ def calculate_engagement_minutes(join_time: datetime, leave_time: datetime) -> int:
141
+ """Calculate engagement minutes from join and leave times."""
142
+ delta = leave_time - join_time
143
+ return int(delta.total_seconds() / 60)
144
+
145
+ def qualify_learner(learner_data: dict) -> dict:
146
+ """Use Groq LLM to qualify the learner and generate score and reasoning."""
147
+ try:
148
+ # Prepare the prompt for the LLM
149
+ prompt = f"""You are a lead qualification system. Based on the following learner data, calculate a qualification score and provide reasoning.
150
+
151
+ FIT CALCULATION (40% of total score):
152
+ Evaluate these specific criteria:
153
+ 1. Goal-Course Alignment (20 points):
154
+ - Perfect alignment (e.g., "Become an AI PM" for AI course): 20 points
155
+ - Related goal (e.g., "Learn AI" for AI course): 15 points
156
+ - Somewhat related: 10 points
157
+ - Unrelated: 0 points
158
+
159
+ 2. Country Fit (10 points):
160
+ - Target market (US, UK, Canada, Australia): 10 points
161
+ - Secondary market (India, Singapore): 8 points
162
+ - Other markets: 5 points
163
+
164
+ 3. Background Relevance (10 points):
165
+ - Tech/Product background: 10 points
166
+ - Related field: 7 points
167
+ - Other background: 3 points
168
+
169
+ OTHER CRITERIA:
170
+ - Engagement (25%): Webinar interaction and questions
171
+ - Intent (20%): Stated goals alignment
172
+ - Budget (10%): Financial capability
173
+ - Past Touchpoints (5%): Previous interactions
174
+
175
+ Learner Data:
176
+ - Name: {learner_data['name']}
177
+ - Goal: {learner_data['goal']}
178
+ - Country: {learner_data['country']}
179
+ - Course: {learner_data['course']}
180
+ - Budget: {learner_data['budget']}
181
+ - Webinar Duration: {learner_data['engaged_mins']} minutes
182
+ - Asked Questions: {learner_data['asked_q']}
183
+ - Referred: {learner_data['referred']}
184
+ - Past Touchpoints: {learner_data['past_touchpoints']}
185
+
186
+ IMPORTANT: You must respond in EXACTLY this format, with no additional text:
187
+ Score: [number between 0-100]
188
+ Reasoning: [brief explanation including fit breakdown]
189
+ Status: [Qualified if score >= 70, Nurture if score < 70]
190
+
191
+ Example response:
192
+ Score: 85
193
+ Reasoning: Strong fit (35/40): Perfect goal-course alignment (20), target market (10), tech background (5). High engagement (20/25), clear intent (15/20), self-funded (10/10), multiple touchpoints (5/5).
194
+ Status: Qualified
195
+ """
196
+
197
+ logger.debug("Sending prompt to Groq LLM...")
198
+ # Call Groq LLM
199
+ response = client.chat.completions.create(
200
+ model="meta-llama/llama-4-scout-17b-16e-instruct",
201
+ messages=[{"role": "user", "content": prompt}]
202
+ )
203
+
204
+ # Parse the response
205
+ result = response.choices[0].message.content
206
+ logger.debug(f"Raw LLM response: {result}")
207
+
208
+ # Split into lines and clean up
209
+ lines = [line.strip() for line in result.strip().split('\n') if line.strip()]
210
+ logger.debug(f"Parsed lines: {lines}")
211
+
212
+ if len(lines) < 3:
213
+ raise ValueError(f"Unexpected response format. Got {len(lines)} lines, expected 3. Response: {result}")
214
+
215
+ # Extract score, reasoning, and status
216
+ score_line = next((line for line in lines if line.startswith('Score:')), None)
217
+ reasoning_line = next((line for line in lines if line.startswith('Reasoning:')), None)
218
+ status_line = next((line for line in lines if line.startswith('Status:')), None)
219
+
220
+ if not all([score_line, reasoning_line, status_line]):
221
+ raise ValueError(f"Missing required fields in response. Response: {result}")
222
+
223
+ score = int(score_line.split(':')[1].strip())
224
+ reasoning = reasoning_line.split(':')[1].strip()
225
+ status = status_line.split(':')[1].strip()
226
+
227
+ if status not in ["Qualified", "Nurture"]:
228
+ raise ValueError(f"Invalid status: {status}. Must be 'Qualified' or 'Nurture'")
229
+
230
+ logger.debug(f"Parsed qualification: score={score}, status={status}")
231
+
232
+ return {
233
+ "score": score,
234
+ "reasoning": reasoning,
235
+ "status": status
236
+ }
237
+ except Exception as e:
238
+ logger.error(f"Error in qualify_learner: {str(e)}", exc_info=True)
239
+ raise HTTPException(
240
+ status_code=500,
241
+ detail=f"Error qualifying learner: {str(e)}"
242
+ )
243
+
244
+ @app.get("/learners", response_model=List[LearnerOut])
245
+ def get_all_learners():
246
+ """Get all enrolled learners."""
247
+ try:
248
+ learners = []
249
+ for lid, learner in read_learners().items():
250
+ # Calculate engaged_mins if not present
251
+ if 'engaged_mins' not in learner:
252
+ try:
253
+ learner['engaged_mins'] = calculate_engagement_minutes(
254
+ learner['webinar_join'],
255
+ learner['webinar_leave']
256
+ )
257
+ except Exception as e:
258
+ logger.warning(f"Could not calculate engaged_mins for learner {lid}: {str(e)}")
259
+ learner['engaged_mins'] = 0 # Set a default value
260
+
261
+ # Ensure all required fields are present
262
+ if 'score' not in learner:
263
+ learner['score'] = 0
264
+ if 'reasoning' not in learner:
265
+ learner['reasoning'] = "No reasoning available"
266
+ if 'status' not in learner:
267
+ learner['status'] = "Nurture"
268
+
269
+ # Create a copy of the learner dict without the id field
270
+ learner_data = learner.copy()
271
+ learner_data.pop('id', None) # Remove id if it exists
272
+
273
+ # Create LearnerOut with the correct id
274
+ learners.append(LearnerOut(id=lid, **learner_data))
275
+
276
+ return learners
277
+ except Exception as e:
278
+ logger.error(f"Error in get_all_learners: {str(e)}", exc_info=True)
279
+ raise HTTPException(status_code=500, detail=str(e))
280
+
281
+ @app.post("/learners", response_model=LearnerOut, status_code=201)
282
+ def create_learner(learner: LearnerIn):
283
+ """Create a new learner enrollment with qualification."""
284
+ try:
285
+ logger.debug(f"Received learner data: {learner.model_dump()}")
286
+ learners = read_learners()
287
+
288
+ try:
289
+ # Calculate engagement minutes
290
+ join_time = learner.webinar_join
291
+ leave_time = learner.webinar_leave
292
+ engaged_mins = calculate_engagement_minutes(join_time, leave_time)
293
+ logger.debug(f"Calculated engagement minutes: {engaged_mins}")
294
+ except Exception as e:
295
+ logger.error(f"Error calculating engagement minutes: {str(e)}")
296
+ raise HTTPException(
297
+ status_code=400,
298
+ detail=f"Invalid datetime format: {str(e)}"
299
+ )
300
+
301
+ # Prepare data for qualification
302
+ learner_data = learner.model_dump()
303
+ learner_data['engaged_mins'] = engaged_mins
304
+ logger.debug(f"Prepared learner data for qualification: {learner_data}")
305
+
306
+ try:
307
+ # Get qualification from LLM
308
+ qualification = qualify_learner(learner_data)
309
+ logger.debug(f"Received qualification: {qualification}")
310
+ except Exception as e:
311
+ logger.error(f"Error in qualification: {str(e)}")
312
+ raise HTTPException(
313
+ status_code=500,
314
+ detail=f"Error qualifying learner: {str(e)}"
315
+ )
316
+
317
+ # Create new learner with qualification
318
+ new_learner = {
319
+ 'id': get_next_id(),
320
+ **learner.model_dump(),
321
+ 'engaged_mins': engaged_mins,
322
+ 'score': qualification['score'],
323
+ 'reasoning': qualification['reasoning'],
324
+ 'status': qualification['status']
325
+ }
326
+ logger.debug(f"Created new learner object: {new_learner}")
327
+
328
+ try:
329
+ # Save to CSV
330
+ learners[new_learner['id']] = new_learner
331
+ write_learners(learners)
332
+ logger.debug(f"Successfully saved learner to CSV with ID: {new_learner['id']}")
333
+ except Exception as e:
334
+ logger.error(f"Error saving to CSV: {str(e)}")
335
+ raise HTTPException(
336
+ status_code=500,
337
+ detail=f"Error saving learner data: {str(e)}"
338
+ )
339
+
340
+ return new_learner
341
+ except HTTPException:
342
+ raise
343
+ except Exception as e:
344
+ logger.error(f"Unexpected error in create_learner: {str(e)}", exc_info=True)
345
+ raise HTTPException(
346
+ status_code=500,
347
+ detail=f"Unexpected error: {str(e)}"
348
+ )
349
+
350
+ @app.put("/learners/{learner_id}", response_model=LearnerOut)
351
+ def update_learner(learner_id: int, learner: LearnerIn):
352
+ """Update learner information by ID."""
353
+ learners = read_learners()
354
+
355
+ if learner_id not in learners:
356
+ raise HTTPException(status_code=404, detail="Learner not found")
357
+
358
+ # Calculate engagement minutes
359
+ join_time = datetime.fromisoformat(learner.webinar_join)
360
+ leave_time = datetime.fromisoformat(learner.webinar_leave)
361
+ engaged_mins = int((leave_time - join_time).total_seconds() / 60)
362
+
363
+ # Prepare data for qualification
364
+ learner_data = learner.dict()
365
+ learner_data['engaged_mins'] = engaged_mins
366
+
367
+ # Get qualification from LLM
368
+ qualification = qualify_learner(learner_data)
369
+
370
+ # Update learner
371
+ learners[learner_id] = {
372
+ 'id': learner_id,
373
+ **learner.dict(),
374
+ 'engaged_mins': engaged_mins,
375
+ 'score': qualification['score'],
376
+ 'reasoning': qualification['reasoning'],
377
+ 'status': qualification['status']
378
+ }
379
+
380
+ # Save to CSV
381
+ write_learners(learners)
382
+
383
+ return learners[learner_id]
384
+
385
+ @app.delete("/learners/{learner_id}")
386
+ def delete_learner(learner_id: int):
387
+ """Delete a learner by ID."""
388
+ learners = read_learners()
389
+
390
+ if learner_id not in learners:
391
+ raise HTTPException(status_code=404, detail="Learner not found")
392
+
393
+ del learners[learner_id]
394
+ write_learners(learners)
395
+
396
+ return {"message": "Learner deleted successfully"}
397
+
398
+ if __name__ == "__main__":
399
+ uvicorn.run(app, host="0.0.0.0", port=8000)
frontend/.DS_Store ADDED
Binary file (6.15 kB). View file
 
frontend/index.html ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>100x Elite CRM</title>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ <script type="module" src="/src/main.tsx"></script>
12
+ </body>
13
+ </html>
frontend/node_modules/.DS_Store ADDED
Binary file (47.1 kB). View file
 
frontend/node_modules/.package-lock.json ADDED
The diff for this file is too large to render. See raw diff
 
frontend/node_modules/.vite/deps/@hookform_resolvers_zod.js ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ appendErrors,
3
+ get,
4
+ set
5
+ } from "./chunk-5XBW43HD.js";
6
+ import "./chunk-DRWLMN53.js";
7
+ import "./chunk-G3PMV62Z.js";
8
+
9
+ // node_modules/@hookform/resolvers/dist/resolvers.mjs
10
+ var r = (t, r2, o2) => {
11
+ if (t && "reportValidity" in t) {
12
+ const s3 = get(o2, r2);
13
+ t.setCustomValidity(s3 && s3.message || ""), t.reportValidity();
14
+ }
15
+ };
16
+ var o = (e, t) => {
17
+ for (const o2 in t.fields) {
18
+ const s3 = t.fields[o2];
19
+ s3 && s3.ref && "reportValidity" in s3.ref ? r(s3.ref, o2, e) : s3 && s3.refs && s3.refs.forEach((t2) => r(t2, o2, e));
20
+ }
21
+ };
22
+ var s = (r2, s3) => {
23
+ s3.shouldUseNativeValidation && o(r2, s3);
24
+ const n3 = {};
25
+ for (const o2 in r2) {
26
+ const f = get(s3.fields, o2), c = Object.assign(r2[o2] || {}, { ref: f && f.ref });
27
+ if (i(s3.names || Object.keys(r2), o2)) {
28
+ const r3 = Object.assign({}, get(n3, o2));
29
+ set(r3, "root", c), set(n3, o2, r3);
30
+ } else set(n3, o2, c);
31
+ }
32
+ return n3;
33
+ };
34
+ var i = (e, t) => {
35
+ const r2 = n(t);
36
+ return e.some((e2) => n(e2).match(`^${r2}\\.\\d+`));
37
+ };
38
+ function n(e) {
39
+ return e.replace(/\]|\[/g, "");
40
+ }
41
+
42
+ // node_modules/@hookform/resolvers/zod/dist/zod.mjs
43
+ function n2(r2, e) {
44
+ for (var n3 = {}; r2.length; ) {
45
+ var s3 = r2[0], t = s3.code, i2 = s3.message, a = s3.path.join(".");
46
+ if (!n3[a]) if ("unionErrors" in s3) {
47
+ var u = s3.unionErrors[0].errors[0];
48
+ n3[a] = { message: u.message, type: u.code };
49
+ } else n3[a] = { message: i2, type: t };
50
+ if ("unionErrors" in s3 && s3.unionErrors.forEach(function(e2) {
51
+ return e2.errors.forEach(function(e3) {
52
+ return r2.push(e3);
53
+ });
54
+ }), e) {
55
+ var c = n3[a].types, f = c && c[s3.code];
56
+ n3[a] = appendErrors(a, e, n3, t, f ? [].concat(f, s3.message) : s3.message);
57
+ }
58
+ r2.shift();
59
+ }
60
+ return n3;
61
+ }
62
+ function s2(o2, s3, t) {
63
+ return void 0 === t && (t = {}), function(i2, a, u) {
64
+ try {
65
+ return Promise.resolve(function(e, n3) {
66
+ try {
67
+ var a2 = Promise.resolve(o2["sync" === t.mode ? "parse" : "parseAsync"](i2, s3)).then(function(e2) {
68
+ return u.shouldUseNativeValidation && o({}, u), { errors: {}, values: t.raw ? Object.assign({}, i2) : e2 };
69
+ });
70
+ } catch (r2) {
71
+ return n3(r2);
72
+ }
73
+ return a2 && a2.then ? a2.then(void 0, n3) : a2;
74
+ }(0, function(r2) {
75
+ if (function(r3) {
76
+ return Array.isArray(null == r3 ? void 0 : r3.errors);
77
+ }(r2)) return { values: {}, errors: s(n2(r2.errors, !u.shouldUseNativeValidation && "all" === u.criteriaMode), u) };
78
+ throw r2;
79
+ }));
80
+ } catch (r2) {
81
+ return Promise.reject(r2);
82
+ }
83
+ };
84
+ }
85
+ export {
86
+ s2 as zodResolver
87
+ };
88
+ //# sourceMappingURL=@hookform_resolvers_zod.js.map
frontend/node_modules/.vite/deps/@hookform_resolvers_zod.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../@hookform/resolvers/src/validateFieldsNatively.ts", "../../@hookform/resolvers/src/toNestErrors.ts", "../../@hookform/resolvers/zod/src/zod.ts"],
4
+ "sourcesContent": ["import {\n FieldError,\n FieldErrors,\n FieldValues,\n Ref,\n ResolverOptions,\n get,\n} from 'react-hook-form';\n\nconst setCustomValidity = (\n ref: Ref,\n fieldPath: string,\n errors: FieldErrors,\n) => {\n if (ref && 'reportValidity' in ref) {\n const error = get(errors, fieldPath) as FieldError | undefined;\n ref.setCustomValidity((error && error.message) || '');\n\n ref.reportValidity();\n }\n};\n\n// Native validation (web only)\nexport const validateFieldsNatively = <TFieldValues extends FieldValues>(\n errors: FieldErrors,\n options: ResolverOptions<TFieldValues>,\n): void => {\n for (const fieldPath in options.fields) {\n const field = options.fields[fieldPath];\n if (field && field.ref && 'reportValidity' in field.ref) {\n setCustomValidity(field.ref, fieldPath, errors);\n } else if (field && field.refs) {\n field.refs.forEach((ref: HTMLInputElement) =>\n setCustomValidity(ref, fieldPath, errors),\n );\n }\n }\n};\n", "import {\n Field,\n FieldErrors,\n FieldValues,\n InternalFieldName,\n ResolverOptions,\n get,\n set,\n} from 'react-hook-form';\nimport { validateFieldsNatively } from './validateFieldsNatively';\n\nexport const toNestErrors = <TFieldValues extends FieldValues>(\n errors: FieldErrors,\n options: ResolverOptions<TFieldValues>,\n): FieldErrors<TFieldValues> => {\n options.shouldUseNativeValidation && validateFieldsNatively(errors, options);\n\n const fieldErrors = {} as FieldErrors<TFieldValues>;\n for (const path in errors) {\n const field = get(options.fields, path) as Field['_f'] | undefined;\n const error = Object.assign(errors[path] || {}, {\n ref: field && field.ref,\n });\n\n if (isNameInFieldArray(options.names || Object.keys(errors), path)) {\n const fieldArrayErrors = Object.assign({}, get(fieldErrors, path));\n\n set(fieldArrayErrors, 'root', error);\n set(fieldErrors, path, fieldArrayErrors);\n } else {\n set(fieldErrors, path, error);\n }\n }\n\n return fieldErrors;\n};\n\nconst isNameInFieldArray = (\n names: InternalFieldName[],\n name: InternalFieldName,\n) => {\n const path = escapeBrackets(name);\n return names.some((n) => escapeBrackets(n).match(`^${path}\\\\.\\\\d+`));\n};\n\n/**\n * Escapes special characters in a string to be used in a regex pattern.\n * it removes the brackets from the string to match the `set` method.\n *\n * @param input - The input string to escape.\n * @returns The escaped string.\n */\nfunction escapeBrackets(input: string): string {\n return input.replace(/\\]|\\[/g, '');\n}\n", "import { toNestErrors, validateFieldsNatively } from '@hookform/resolvers';\nimport {\n FieldError,\n FieldErrors,\n FieldValues,\n Resolver,\n ResolverError,\n ResolverSuccess,\n appendErrors,\n} from 'react-hook-form';\nimport { ZodError, z } from 'zod';\n\nconst isZodError = (error: any): error is ZodError =>\n Array.isArray(error?.errors);\n\nfunction parseErrorSchema(\n zodErrors: z.ZodIssue[],\n validateAllFieldCriteria: boolean,\n) {\n const errors: Record<string, FieldError> = {};\n for (; zodErrors.length; ) {\n const error = zodErrors[0];\n const { code, message, path } = error;\n const _path = path.join('.');\n\n if (!errors[_path]) {\n if ('unionErrors' in error) {\n const unionError = error.unionErrors[0].errors[0];\n\n errors[_path] = {\n message: unionError.message,\n type: unionError.code,\n };\n } else {\n errors[_path] = { message, type: code };\n }\n }\n\n if ('unionErrors' in error) {\n error.unionErrors.forEach((unionError) =>\n unionError.errors.forEach((e) => zodErrors.push(e)),\n );\n }\n\n if (validateAllFieldCriteria) {\n const types = errors[_path].types;\n const messages = types && types[error.code];\n\n errors[_path] = appendErrors(\n _path,\n validateAllFieldCriteria,\n errors,\n code,\n messages\n ? ([] as string[]).concat(messages as string[], error.message)\n : error.message,\n ) as FieldError;\n }\n\n zodErrors.shift();\n }\n\n return errors;\n}\n\nexport function zodResolver<Input extends FieldValues, Context, Output>(\n schema: z.ZodSchema<Output, any, Input>,\n schemaOptions?: Partial<z.ParseParams>,\n resolverOptions?: {\n mode?: 'async' | 'sync';\n raw?: false;\n },\n): Resolver<Input, Context, Output>;\n\nexport function zodResolver<Input extends FieldValues, Context, Output>(\n schema: z.ZodSchema<Output, any, Input>,\n schemaOptions: Partial<z.ParseParams> | undefined,\n resolverOptions: {\n mode?: 'async' | 'sync';\n raw: true;\n },\n): Resolver<Input, Context, Input>;\n\n/**\n * Creates a resolver function for react-hook-form that validates form data using a Zod schema\n * @param {z.ZodSchema<Input>} schema - The Zod schema used to validate the form data\n * @param {Partial<z.ParseParams>} [schemaOptions] - Optional configuration options for Zod parsing\n * @param {Object} [resolverOptions] - Optional resolver-specific configuration\n * @param {('async'|'sync')} [resolverOptions.mode='async'] - Validation mode. Use 'sync' for synchronous validation\n * @param {boolean} [resolverOptions.raw=false] - If true, returns the raw form values instead of the parsed data\n * @returns {Resolver<z.output<typeof schema>>} A resolver function compatible with react-hook-form\n * @throws {Error} Throws if validation fails with a non-Zod error\n * @example\n * const schema = z.object({\n * name: z.string().min(2),\n * age: z.number().min(18)\n * });\n *\n * useForm({\n * resolver: zodResolver(schema)\n * });\n */\nexport function zodResolver<Input extends FieldValues, Context, Output>(\n schema: z.ZodSchema<Output, any, Input>,\n schemaOptions?: Partial<z.ParseParams>,\n resolverOptions: {\n mode?: 'async' | 'sync';\n raw?: boolean;\n } = {},\n): Resolver<Input, Context, Output | Input> {\n return async (values: Input, _, options) => {\n try {\n const data = await schema[\n resolverOptions.mode === 'sync' ? 'parse' : 'parseAsync'\n ](values, schemaOptions);\n\n options.shouldUseNativeValidation && validateFieldsNatively({}, options);\n\n return {\n errors: {} as FieldErrors,\n values: resolverOptions.raw ? Object.assign({}, values) : data,\n } satisfies ResolverSuccess<Output | Input>;\n } catch (error) {\n if (isZodError(error)) {\n return {\n values: {},\n errors: toNestErrors(\n parseErrorSchema(\n error.errors,\n !options.shouldUseNativeValidation &&\n options.criteriaMode === 'all',\n ),\n options,\n ),\n } satisfies ResolverError<Input>;\n }\n\n throw error;\n }\n };\n}\n"],
5
+ "mappings": ";;;;;;;;;AASA,IAAMA,IAAoBA,CACxB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AC,QAAAC,QAAAA,SAAAA,GAAAA,IAAAA;AAAAA,YAAAA;AAAAA,cAAAA,KACrCD,QAAAC,QACiBP,GACQ,WAAzBE,EAAgBM,OAAkB,UAAU,YAAA,EAC5CL,IAAQF,EAAAA,CAAAA,EAAcQ,KAFlBC,SAAAA,IAAAA;AAMN,mBAFAL,EAAQM,6BAA6BC,EAAuB,CAAA,GAAIP,CAAAA,GAEzD,EACLzB,QAAQ,CAAA,GACRuB,QAAQD,EAAgBW,MAAMC,OAAOC,OAAO,CAAE,GAAEZ,EAAAA,IAAUO,GAAAA;UAChB,CAAA;QAAA,SAAAM,IAAA;AAAA,iBAAAC,GAAAD,EAAA;QAAA;AAAA,eAAAE,MAAAA,GAAA,OAAAA,GAAA,KAAA,QAAAD,EAAA,IAAAC;MAAA,EAXL,GAYhCpC,SAAAA,IAAAA;AACP,YA/Ga,SAACA,IAAAA;AAClB,iBAAAqC,MAAMC,QAAa,QAALtC,KAAAA,SAAAA,GAAOF,MAAAA;QAAO,EA8GTE,EAAAA,EACb,QAAO,EACLqB,QAAQ,CAAA,GACRvB,QAAQyC,EACN5C,GACEK,GAAMF,QAAAA,CACLyB,EAAQM,6BACkB,UAAzBN,EAAQiB,YAAAA,GAEZjB,CAAAA,EAAAA;AAKN,cAAMvB;MACR,CAAA,CAAA;IACF,SAACU,IAAAA;AAAAc,aAAAA,QAAAiB,OAAA/B,EAAAA;IACH;EAAA;AAAA;",
6
+ "names": ["setCustomValidity", "ref", "fieldPath", "errors", "error", "get", "message", "reportValidity", "validateFieldsNatively", "options", "fields", "field", "refs", "forEach", "toNestErrors", "shouldUseNativeValidation", "fieldErrors", "path", "Object", "assign", "isNameInFieldArray", "names", "keys", "fieldArrayErrors", "set", "name", "escapeBrackets", "some", "n", "match", "input", "replace", "parseErrorSchema", "zodErrors", "validateAllFieldCriteria", "errors", "length", "error", "code", "message", "_path", "path", "join", "unionError", "unionErrors", "type", "forEach", "e", "push", "types", "messages", "appendErrors", "concat", "shift", "zodResolver", "schema", "schemaOptions", "resolverOptions", "values", "_", "options", "Promise", "resolve", "mode", "then", "data", "shouldUseNativeValidation", "validateFieldsNatively", "raw", "Object", "assign", "r", "n", "a", "Array", "isArray", "toNestErrors", "criteriaMode", "reject"]
7
+ }
frontend/node_modules/.vite/deps/@radix-ui_react-alert-dialog.js ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use client";
2
+ import {
3
+ Close,
4
+ Content,
5
+ Description,
6
+ Overlay,
7
+ Portal,
8
+ Root,
9
+ Title,
10
+ Trigger,
11
+ WarningProvider,
12
+ createDialogScope
13
+ } from "./chunk-MBR23SFK.js";
14
+ import "./chunk-XET2JR3H.js";
15
+ import "./chunk-43NH6PDE.js";
16
+ import "./chunk-Y2CDDFKN.js";
17
+ import {
18
+ composeEventHandlers,
19
+ createContextScope
20
+ } from "./chunk-R4J6KICQ.js";
21
+ import "./chunk-HMLLSKRK.js";
22
+ import {
23
+ createSlottable,
24
+ useComposedRefs
25
+ } from "./chunk-TLMPZXCM.js";
26
+ import "./chunk-PJEEZAML.js";
27
+ import {
28
+ require_jsx_runtime
29
+ } from "./chunk-6PXSGDAH.js";
30
+ import {
31
+ require_react
32
+ } from "./chunk-DRWLMN53.js";
33
+ import {
34
+ __toESM
35
+ } from "./chunk-G3PMV62Z.js";
36
+
37
+ // node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
38
+ var React = __toESM(require_react(), 1);
39
+ var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
40
+ var ROOT_NAME = "AlertDialog";
41
+ var [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
42
+ createDialogScope
43
+ ]);
44
+ var useDialogScope = createDialogScope();
45
+ var AlertDialog = (props) => {
46
+ const { __scopeAlertDialog, ...alertDialogProps } = props;
47
+ const dialogScope = useDialogScope(__scopeAlertDialog);
48
+ return (0, import_jsx_runtime.jsx)(Root, { ...dialogScope, ...alertDialogProps, modal: true });
49
+ };
50
+ AlertDialog.displayName = ROOT_NAME;
51
+ var TRIGGER_NAME = "AlertDialogTrigger";
52
+ var AlertDialogTrigger = React.forwardRef(
53
+ (props, forwardedRef) => {
54
+ const { __scopeAlertDialog, ...triggerProps } = props;
55
+ const dialogScope = useDialogScope(__scopeAlertDialog);
56
+ return (0, import_jsx_runtime.jsx)(Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });
57
+ }
58
+ );
59
+ AlertDialogTrigger.displayName = TRIGGER_NAME;
60
+ var PORTAL_NAME = "AlertDialogPortal";
61
+ var AlertDialogPortal = (props) => {
62
+ const { __scopeAlertDialog, ...portalProps } = props;
63
+ const dialogScope = useDialogScope(__scopeAlertDialog);
64
+ return (0, import_jsx_runtime.jsx)(Portal, { ...dialogScope, ...portalProps });
65
+ };
66
+ AlertDialogPortal.displayName = PORTAL_NAME;
67
+ var OVERLAY_NAME = "AlertDialogOverlay";
68
+ var AlertDialogOverlay = React.forwardRef(
69
+ (props, forwardedRef) => {
70
+ const { __scopeAlertDialog, ...overlayProps } = props;
71
+ const dialogScope = useDialogScope(__scopeAlertDialog);
72
+ return (0, import_jsx_runtime.jsx)(Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });
73
+ }
74
+ );
75
+ AlertDialogOverlay.displayName = OVERLAY_NAME;
76
+ var CONTENT_NAME = "AlertDialogContent";
77
+ var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);
78
+ var Slottable = createSlottable("AlertDialogContent");
79
+ var AlertDialogContent = React.forwardRef(
80
+ (props, forwardedRef) => {
81
+ const { __scopeAlertDialog, children, ...contentProps } = props;
82
+ const dialogScope = useDialogScope(__scopeAlertDialog);
83
+ const contentRef = React.useRef(null);
84
+ const composedRefs = useComposedRefs(forwardedRef, contentRef);
85
+ const cancelRef = React.useRef(null);
86
+ return (0, import_jsx_runtime.jsx)(
87
+ WarningProvider,
88
+ {
89
+ contentName: CONTENT_NAME,
90
+ titleName: TITLE_NAME,
91
+ docsSlug: "alert-dialog",
92
+ children: (0, import_jsx_runtime.jsx)(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: (0, import_jsx_runtime.jsxs)(
93
+ Content,
94
+ {
95
+ role: "alertdialog",
96
+ ...dialogScope,
97
+ ...contentProps,
98
+ ref: composedRefs,
99
+ onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {
100
+ var _a;
101
+ event.preventDefault();
102
+ (_a = cancelRef.current) == null ? void 0 : _a.focus({ preventScroll: true });
103
+ }),
104
+ onPointerDownOutside: (event) => event.preventDefault(),
105
+ onInteractOutside: (event) => event.preventDefault(),
106
+ children: [
107
+ (0, import_jsx_runtime.jsx)(Slottable, { children }),
108
+ (0, import_jsx_runtime.jsx)(DescriptionWarning, { contentRef })
109
+ ]
110
+ }
111
+ ) })
112
+ }
113
+ );
114
+ }
115
+ );
116
+ AlertDialogContent.displayName = CONTENT_NAME;
117
+ var TITLE_NAME = "AlertDialogTitle";
118
+ var AlertDialogTitle = React.forwardRef(
119
+ (props, forwardedRef) => {
120
+ const { __scopeAlertDialog, ...titleProps } = props;
121
+ const dialogScope = useDialogScope(__scopeAlertDialog);
122
+ return (0, import_jsx_runtime.jsx)(Title, { ...dialogScope, ...titleProps, ref: forwardedRef });
123
+ }
124
+ );
125
+ AlertDialogTitle.displayName = TITLE_NAME;
126
+ var DESCRIPTION_NAME = "AlertDialogDescription";
127
+ var AlertDialogDescription = React.forwardRef((props, forwardedRef) => {
128
+ const { __scopeAlertDialog, ...descriptionProps } = props;
129
+ const dialogScope = useDialogScope(__scopeAlertDialog);
130
+ return (0, import_jsx_runtime.jsx)(Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
131
+ });
132
+ AlertDialogDescription.displayName = DESCRIPTION_NAME;
133
+ var ACTION_NAME = "AlertDialogAction";
134
+ var AlertDialogAction = React.forwardRef(
135
+ (props, forwardedRef) => {
136
+ const { __scopeAlertDialog, ...actionProps } = props;
137
+ const dialogScope = useDialogScope(__scopeAlertDialog);
138
+ return (0, import_jsx_runtime.jsx)(Close, { ...dialogScope, ...actionProps, ref: forwardedRef });
139
+ }
140
+ );
141
+ AlertDialogAction.displayName = ACTION_NAME;
142
+ var CANCEL_NAME = "AlertDialogCancel";
143
+ var AlertDialogCancel = React.forwardRef(
144
+ (props, forwardedRef) => {
145
+ const { __scopeAlertDialog, ...cancelProps } = props;
146
+ const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
147
+ const dialogScope = useDialogScope(__scopeAlertDialog);
148
+ const ref = useComposedRefs(forwardedRef, cancelRef);
149
+ return (0, import_jsx_runtime.jsx)(Close, { ...dialogScope, ...cancelProps, ref });
150
+ }
151
+ );
152
+ AlertDialogCancel.displayName = CANCEL_NAME;
153
+ var DescriptionWarning = ({ contentRef }) => {
154
+ const MESSAGE = `\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
155
+
156
+ You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
157
+
158
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
159
+
160
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
161
+ React.useEffect(() => {
162
+ var _a;
163
+ const hasDescription = document.getElementById(
164
+ (_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby")
165
+ );
166
+ if (!hasDescription) console.warn(MESSAGE);
167
+ }, [MESSAGE, contentRef]);
168
+ return null;
169
+ };
170
+ var Root2 = AlertDialog;
171
+ var Trigger2 = AlertDialogTrigger;
172
+ var Portal2 = AlertDialogPortal;
173
+ var Overlay2 = AlertDialogOverlay;
174
+ var Content2 = AlertDialogContent;
175
+ var Action = AlertDialogAction;
176
+ var Cancel = AlertDialogCancel;
177
+ var Title2 = AlertDialogTitle;
178
+ var Description2 = AlertDialogDescription;
179
+ export {
180
+ Action,
181
+ AlertDialog,
182
+ AlertDialogAction,
183
+ AlertDialogCancel,
184
+ AlertDialogContent,
185
+ AlertDialogDescription,
186
+ AlertDialogOverlay,
187
+ AlertDialogPortal,
188
+ AlertDialogTitle,
189
+ AlertDialogTrigger,
190
+ Cancel,
191
+ Content2 as Content,
192
+ Description2 as Description,
193
+ Overlay2 as Overlay,
194
+ Portal2 as Portal,
195
+ Root2 as Root,
196
+ Title2 as Title,
197
+ Trigger2 as Trigger,
198
+ createAlertDialogScope
199
+ };
200
+ //# sourceMappingURL=@radix-ui_react-alert-dialog.js.map
frontend/node_modules/.vite/deps/@radix-ui_react-alert-dialog.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../@radix-ui/react-alert-dialog/src/alert-dialog.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { createDialogScope } from '@radix-ui/react-dialog';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createSlottable } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst ROOT_NAME = 'AlertDialog';\n\ntype ScopedProps<P> = P & { __scopeAlertDialog?: Scope };\nconst [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope,\n]);\nconst useDialogScope = createDialogScope();\n\ntype DialogProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;\ninterface AlertDialogProps extends Omit<DialogProps, 'modal'> {}\n\nconst AlertDialog: React.FC<AlertDialogProps> = (props: ScopedProps<AlertDialogProps>) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Root {...dialogScope} {...alertDialogProps} modal={true} />;\n};\n\nAlertDialog.displayName = ROOT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogTrigger\n * -----------------------------------------------------------------------------------------------*/\nconst TRIGGER_NAME = 'AlertDialogTrigger';\n\ntype AlertDialogTriggerElement = React.ComponentRef<typeof DialogPrimitive.Trigger>;\ntype DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;\ninterface AlertDialogTriggerProps extends DialogTriggerProps {}\n\nconst AlertDialogTrigger = React.forwardRef<AlertDialogTriggerElement, AlertDialogTriggerProps>(\n (props: ScopedProps<AlertDialogTriggerProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Trigger {...dialogScope} {...triggerProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'AlertDialogPortal';\n\ntype DialogPortalProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>;\ninterface AlertDialogPortalProps extends DialogPortalProps {}\n\nconst AlertDialogPortal: React.FC<AlertDialogPortalProps> = (\n props: ScopedProps<AlertDialogPortalProps>\n) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Portal {...dialogScope} {...portalProps} />;\n};\n\nAlertDialogPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'AlertDialogOverlay';\n\ntype AlertDialogOverlayElement = React.ComponentRef<typeof DialogPrimitive.Overlay>;\ntype DialogOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;\ninterface AlertDialogOverlayProps extends DialogOverlayProps {}\n\nconst AlertDialogOverlay = React.forwardRef<AlertDialogOverlayElement, AlertDialogOverlayProps>(\n (props: ScopedProps<AlertDialogOverlayProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Overlay {...dialogScope} {...overlayProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogOverlay.displayName = OVERLAY_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'AlertDialogContent';\n\ntype AlertDialogContentContextValue = {\n cancelRef: React.MutableRefObject<AlertDialogCancelElement | null>;\n};\n\nconst [AlertDialogContentProvider, useAlertDialogContentContext] =\n createAlertDialogContext<AlertDialogContentContextValue>(CONTENT_NAME);\n\ntype AlertDialogContentElement = React.ComponentRef<typeof DialogPrimitive.Content>;\ntype DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;\ninterface AlertDialogContentProps\n extends Omit<DialogContentProps, 'onPointerDownOutside' | 'onInteractOutside'> {}\n\nconst Slottable = createSlottable('AlertDialogContent');\n\nconst AlertDialogContent = React.forwardRef<AlertDialogContentElement, AlertDialogContentProps>(\n (props: ScopedProps<AlertDialogContentProps>, forwardedRef) => {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef<AlertDialogContentElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef<AlertDialogCancelElement | null>(null);\n\n return (\n <DialogPrimitive.WarningProvider\n contentName={CONTENT_NAME}\n titleName={TITLE_NAME}\n docsSlug=\"alert-dialog\"\n >\n <AlertDialogContentProvider scope={__scopeAlertDialog} cancelRef={cancelRef}>\n <DialogPrimitive.Content\n role=\"alertdialog\"\n {...dialogScope}\n {...contentProps}\n ref={composedRefs}\n onOpenAutoFocus={composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n })}\n onPointerDownOutside={(event) => event.preventDefault()}\n onInteractOutside={(event) => event.preventDefault()}\n >\n {/**\n * We have to use `Slottable` here as we cannot wrap the `AlertDialogContentProvider`\n * around everything, otherwise the `DescriptionWarning` would be rendered straight away.\n * This is because we want the accessibility checks to run only once the content is actually\n * open and that behaviour is already encapsulated in `DialogContent`.\n */}\n <Slottable>{children}</Slottable>\n {process.env.NODE_ENV === 'development' && (\n <DescriptionWarning contentRef={contentRef} />\n )}\n </DialogPrimitive.Content>\n </AlertDialogContentProvider>\n </DialogPrimitive.WarningProvider>\n );\n }\n);\n\nAlertDialogContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'AlertDialogTitle';\n\ntype AlertDialogTitleElement = React.ComponentRef<typeof DialogPrimitive.Title>;\ntype DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;\ninterface AlertDialogTitleProps extends DialogTitleProps {}\n\nconst AlertDialogTitle = React.forwardRef<AlertDialogTitleElement, AlertDialogTitleProps>(\n (props: ScopedProps<AlertDialogTitleProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Title {...dialogScope} {...titleProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'AlertDialogDescription';\n\ntype AlertDialogDescriptionElement = React.ComponentRef<typeof DialogPrimitive.Description>;\ntype DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;\ninterface AlertDialogDescriptionProps extends DialogDescriptionProps {}\n\nconst AlertDialogDescription = React.forwardRef<\n AlertDialogDescriptionElement,\n AlertDialogDescriptionProps\n>((props: ScopedProps<AlertDialogDescriptionProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Description {...dialogScope} {...descriptionProps} ref={forwardedRef} />;\n});\n\nAlertDialogDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogAction\n * -----------------------------------------------------------------------------------------------*/\n\nconst ACTION_NAME = 'AlertDialogAction';\n\ntype AlertDialogActionElement = React.ComponentRef<typeof DialogPrimitive.Close>;\ntype DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;\ninterface AlertDialogActionProps extends DialogCloseProps {}\n\nconst AlertDialogAction = React.forwardRef<AlertDialogActionElement, AlertDialogActionProps>(\n (props: ScopedProps<AlertDialogActionProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Close {...dialogScope} {...actionProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogAction.displayName = ACTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogCancel\n * -----------------------------------------------------------------------------------------------*/\n\nconst CANCEL_NAME = 'AlertDialogCancel';\n\ntype AlertDialogCancelElement = React.ComponentRef<typeof DialogPrimitive.Close>;\ninterface AlertDialogCancelProps extends DialogCloseProps {}\n\nconst AlertDialogCancel = React.forwardRef<AlertDialogCancelElement, AlertDialogCancelProps>(\n (props: ScopedProps<AlertDialogCancelProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return <DialogPrimitive.Close {...dialogScope} {...cancelProps} ref={ref} />;\n }\n);\n\nAlertDialogCancel.displayName = CANCEL_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype DescriptionWarningProps = {\n contentRef: React.RefObject<AlertDialogContentElement | null>;\n};\n\nconst DescriptionWarning: React.FC<DescriptionWarningProps> = ({ contentRef }) => {\n const MESSAGE = `\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;\n\n React.useEffect(() => {\n const hasDescription = document.getElementById(\n contentRef.current?.getAttribute('aria-describedby')!\n );\n if (!hasDescription) console.warn(MESSAGE);\n }, [MESSAGE, contentRef]);\n\n return null;\n};\n\nconst Root = AlertDialog;\nconst Trigger = AlertDialogTrigger;\nconst Portal = AlertDialogPortal;\nconst Overlay = AlertDialogOverlay;\nconst Content = AlertDialogContent;\nconst Action = AlertDialogAction;\nconst Cancel = AlertDialogCancel;\nconst Title = AlertDialogTitle;\nconst Description = AlertDialogDescription;\n\nexport {\n createAlertDialogScope,\n //\n AlertDialog,\n AlertDialogTrigger,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogContent,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogTitle,\n AlertDialogDescription,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Action,\n Cancel,\n Title,\n Description,\n};\nexport type {\n AlertDialogProps,\n AlertDialogTriggerProps,\n AlertDialogPortalProps,\n AlertDialogOverlayProps,\n AlertDialogContentProps,\n AlertDialogActionProps,\n AlertDialogCancelProps,\n AlertDialogTitleProps,\n AlertDialogDescriptionProps,\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AA4Bd,yBAAA;AAdT,IAAM,YAAY;AAGlB,IAAM,CAAC,0BAA0B,sBAAsB,IAAI,mBAAmB,WAAW;EACvF;AACF,CAAC;AACD,IAAM,iBAAiB,kBAAkB;AAKzC,IAAM,cAA0C,CAAC,UAAyC;AACxF,QAAM,EAAE,oBAAoB,GAAG,iBAAiB,IAAI;AACpD,QAAM,cAAc,eAAe,kBAAkB;AACrD,aAAO,wBAAiB,MAAhB,EAAsB,GAAG,aAAc,GAAG,kBAAkB,OAAO,KAAA,CAAM;AACnF;AAEA,YAAY,cAAc;AAK1B,IAAM,eAAe;AAMrB,IAAM,qBAA2B;EAC/B,CAAC,OAA6C,iBAAiB;AAC7D,UAAM,EAAE,oBAAoB,GAAG,aAAa,IAAI;AAChD,UAAM,cAAc,eAAe,kBAAkB;AACrD,eAAO,wBAAiB,SAAhB,EAAyB,GAAG,aAAc,GAAG,cAAc,KAAK,aAAA,CAAc;EACxF;AACF;AAEA,mBAAmB,cAAc;AAMjC,IAAM,cAAc;AAKpB,IAAM,o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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use client";
2
+ import {
3
+ usePrevious,
4
+ useSize
5
+ } from "./chunk-PVJESVH4.js";
6
+ import {
7
+ Presence
8
+ } from "./chunk-Y2CDDFKN.js";
9
+ import {
10
+ composeEventHandlers,
11
+ createContextScope,
12
+ useControllableState
13
+ } from "./chunk-R4J6KICQ.js";
14
+ import {
15
+ Primitive
16
+ } from "./chunk-HMLLSKRK.js";
17
+ import {
18
+ useComposedRefs
19
+ } from "./chunk-TLMPZXCM.js";
20
+ import "./chunk-PJEEZAML.js";
21
+ import {
22
+ require_jsx_runtime
23
+ } from "./chunk-6PXSGDAH.js";
24
+ import {
25
+ require_react
26
+ } from "./chunk-DRWLMN53.js";
27
+ import {
28
+ __toESM
29
+ } from "./chunk-G3PMV62Z.js";
30
+
31
+ // node_modules/@radix-ui/react-checkbox/dist/index.mjs
32
+ var React = __toESM(require_react(), 1);
33
+ var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
34
+ var CHECKBOX_NAME = "Checkbox";
35
+ var [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME);
36
+ var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
37
+ function CheckboxProvider(props) {
38
+ const {
39
+ __scopeCheckbox,
40
+ checked: checkedProp,
41
+ children,
42
+ defaultChecked,
43
+ disabled,
44
+ form,
45
+ name,
46
+ onCheckedChange,
47
+ required,
48
+ value = "on",
49
+ // @ts-expect-error
50
+ internal_do_not_use_render
51
+ } = props;
52
+ const [checked, setChecked] = useControllableState({
53
+ prop: checkedProp,
54
+ defaultProp: defaultChecked ?? false,
55
+ onChange: onCheckedChange,
56
+ caller: CHECKBOX_NAME
57
+ });
58
+ const [control, setControl] = React.useState(null);
59
+ const [bubbleInput, setBubbleInput] = React.useState(null);
60
+ const hasConsumerStoppedPropagationRef = React.useRef(false);
61
+ const isFormControl = control ? !!form || !!control.closest("form") : (
62
+ // We set this to true by default so that events bubble to forms without JS (SSR)
63
+ true
64
+ );
65
+ const context = {
66
+ checked,
67
+ disabled,
68
+ setChecked,
69
+ control,
70
+ setControl,
71
+ name,
72
+ form,
73
+ value,
74
+ hasConsumerStoppedPropagationRef,
75
+ required,
76
+ defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked,
77
+ isFormControl,
78
+ bubbleInput,
79
+ setBubbleInput
80
+ };
81
+ return (0, import_jsx_runtime.jsx)(
82
+ CheckboxProviderImpl,
83
+ {
84
+ scope: __scopeCheckbox,
85
+ ...context,
86
+ children: isFunction(internal_do_not_use_render) ? internal_do_not_use_render(context) : children
87
+ }
88
+ );
89
+ }
90
+ var TRIGGER_NAME = "CheckboxTrigger";
91
+ var CheckboxTrigger = React.forwardRef(
92
+ ({ __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }, forwardedRef) => {
93
+ const {
94
+ control,
95
+ value,
96
+ disabled,
97
+ checked,
98
+ required,
99
+ setControl,
100
+ setChecked,
101
+ hasConsumerStoppedPropagationRef,
102
+ isFormControl,
103
+ bubbleInput
104
+ } = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);
105
+ const composedRefs = useComposedRefs(forwardedRef, setControl);
106
+ const initialCheckedStateRef = React.useRef(checked);
107
+ React.useEffect(() => {
108
+ const form = control == null ? void 0 : control.form;
109
+ if (form) {
110
+ const reset = () => setChecked(initialCheckedStateRef.current);
111
+ form.addEventListener("reset", reset);
112
+ return () => form.removeEventListener("reset", reset);
113
+ }
114
+ }, [control, setChecked]);
115
+ return (0, import_jsx_runtime.jsx)(
116
+ Primitive.button,
117
+ {
118
+ type: "button",
119
+ role: "checkbox",
120
+ "aria-checked": isIndeterminate(checked) ? "mixed" : checked,
121
+ "aria-required": required,
122
+ "data-state": getState(checked),
123
+ "data-disabled": disabled ? "" : void 0,
124
+ disabled,
125
+ value,
126
+ ...checkboxProps,
127
+ ref: composedRefs,
128
+ onKeyDown: composeEventHandlers(onKeyDown, (event) => {
129
+ if (event.key === "Enter") event.preventDefault();
130
+ }),
131
+ onClick: composeEventHandlers(onClick, (event) => {
132
+ setChecked((prevChecked) => isIndeterminate(prevChecked) ? true : !prevChecked);
133
+ if (bubbleInput && isFormControl) {
134
+ hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
135
+ if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
136
+ }
137
+ })
138
+ }
139
+ );
140
+ }
141
+ );
142
+ CheckboxTrigger.displayName = TRIGGER_NAME;
143
+ var Checkbox = React.forwardRef(
144
+ (props, forwardedRef) => {
145
+ const {
146
+ __scopeCheckbox,
147
+ name,
148
+ checked,
149
+ defaultChecked,
150
+ required,
151
+ disabled,
152
+ value,
153
+ onCheckedChange,
154
+ form,
155
+ ...checkboxProps
156
+ } = props;
157
+ return (0, import_jsx_runtime.jsx)(
158
+ CheckboxProvider,
159
+ {
160
+ __scopeCheckbox,
161
+ checked,
162
+ defaultChecked,
163
+ disabled,
164
+ required,
165
+ onCheckedChange,
166
+ name,
167
+ form,
168
+ value,
169
+ internal_do_not_use_render: ({ isFormControl }) => (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
170
+ (0, import_jsx_runtime.jsx)(
171
+ CheckboxTrigger,
172
+ {
173
+ ...checkboxProps,
174
+ ref: forwardedRef,
175
+ __scopeCheckbox
176
+ }
177
+ ),
178
+ isFormControl && (0, import_jsx_runtime.jsx)(
179
+ CheckboxBubbleInput,
180
+ {
181
+ __scopeCheckbox
182
+ }
183
+ )
184
+ ] })
185
+ }
186
+ );
187
+ }
188
+ );
189
+ Checkbox.displayName = CHECKBOX_NAME;
190
+ var INDICATOR_NAME = "CheckboxIndicator";
191
+ var CheckboxIndicator = React.forwardRef(
192
+ (props, forwardedRef) => {
193
+ const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
194
+ const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);
195
+ return (0, import_jsx_runtime.jsx)(
196
+ Presence,
197
+ {
198
+ present: forceMount || isIndeterminate(context.checked) || context.checked === true,
199
+ children: (0, import_jsx_runtime.jsx)(
200
+ Primitive.span,
201
+ {
202
+ "data-state": getState(context.checked),
203
+ "data-disabled": context.disabled ? "" : void 0,
204
+ ...indicatorProps,
205
+ ref: forwardedRef,
206
+ style: { pointerEvents: "none", ...props.style }
207
+ }
208
+ )
209
+ }
210
+ );
211
+ }
212
+ );
213
+ CheckboxIndicator.displayName = INDICATOR_NAME;
214
+ var BUBBLE_INPUT_NAME = "CheckboxBubbleInput";
215
+ var CheckboxBubbleInput = React.forwardRef(
216
+ ({ __scopeCheckbox, ...props }, forwardedRef) => {
217
+ const {
218
+ control,
219
+ hasConsumerStoppedPropagationRef,
220
+ checked,
221
+ defaultChecked,
222
+ required,
223
+ disabled,
224
+ name,
225
+ value,
226
+ form,
227
+ bubbleInput,
228
+ setBubbleInput
229
+ } = useCheckboxContext(BUBBLE_INPUT_NAME, __scopeCheckbox);
230
+ const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);
231
+ const prevChecked = usePrevious(checked);
232
+ const controlSize = useSize(control);
233
+ React.useEffect(() => {
234
+ const input = bubbleInput;
235
+ if (!input) return;
236
+ const inputProto = window.HTMLInputElement.prototype;
237
+ const descriptor = Object.getOwnPropertyDescriptor(
238
+ inputProto,
239
+ "checked"
240
+ );
241
+ const setChecked = descriptor.set;
242
+ const bubbles = !hasConsumerStoppedPropagationRef.current;
243
+ if (prevChecked !== checked && setChecked) {
244
+ const event = new Event("click", { bubbles });
245
+ input.indeterminate = isIndeterminate(checked);
246
+ setChecked.call(input, isIndeterminate(checked) ? false : checked);
247
+ input.dispatchEvent(event);
248
+ }
249
+ }, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
250
+ const defaultCheckedRef = React.useRef(isIndeterminate(checked) ? false : checked);
251
+ return (0, import_jsx_runtime.jsx)(
252
+ Primitive.input,
253
+ {
254
+ type: "checkbox",
255
+ "aria-hidden": true,
256
+ defaultChecked: defaultChecked ?? defaultCheckedRef.current,
257
+ required,
258
+ disabled,
259
+ name,
260
+ value,
261
+ form,
262
+ ...props,
263
+ tabIndex: -1,
264
+ ref: composedRefs,
265
+ style: {
266
+ ...props.style,
267
+ ...controlSize,
268
+ position: "absolute",
269
+ pointerEvents: "none",
270
+ opacity: 0,
271
+ margin: 0,
272
+ // We transform because the input is absolutely positioned but we have
273
+ // rendered it **after** the button. This pulls it back to sit on top
274
+ // of the button.
275
+ transform: "translateX(-100%)"
276
+ }
277
+ }
278
+ );
279
+ }
280
+ );
281
+ CheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME;
282
+ function isFunction(value) {
283
+ return typeof value === "function";
284
+ }
285
+ function isIndeterminate(checked) {
286
+ return checked === "indeterminate";
287
+ }
288
+ function getState(checked) {
289
+ return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
290
+ }
291
+ export {
292
+ Checkbox,
293
+ CheckboxIndicator,
294
+ CheckboxIndicator as Indicator,
295
+ Checkbox as Root,
296
+ createCheckboxScope,
297
+ CheckboxBubbleInput as unstable_BubbleInput,
298
+ CheckboxBubbleInput as unstable_CheckboxBubbleInput,
299
+ CheckboxProvider as unstable_CheckboxProvider,
300
+ CheckboxTrigger as unstable_CheckboxTrigger,
301
+ CheckboxProvider as unstable_Provider,
302
+ CheckboxTrigger as unstable_Trigger
303
+ };
304
+ //# sourceMappingURL=@radix-ui_react-checkbox.js.map
frontend/node_modules/.vite/deps/@radix-ui_react-checkbox.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../@radix-ui/react-checkbox/src/checkbox.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { useSize } from '@radix-ui/react-use-size';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type { Scope } from '@radix-ui/react-context';\n\nconst CHECKBOX_NAME = 'Checkbox';\n\ntype ScopedProps<P> = P & { __scopeCheckbox?: Scope };\nconst [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME);\n\ntype CheckedState = boolean | 'indeterminate';\n\ntype CheckboxContextValue<State extends CheckedState | boolean = CheckedState> = {\n checked: State | boolean;\n setChecked: React.Dispatch<React.SetStateAction<State | boolean>>;\n disabled: boolean | undefined;\n control: HTMLButtonElement | null;\n setControl: React.Dispatch<React.SetStateAction<HTMLButtonElement | null>>;\n name: string | undefined;\n form: string | undefined;\n value: string | number | readonly string[];\n hasConsumerStoppedPropagationRef: React.RefObject<boolean>;\n required: boolean | undefined;\n defaultChecked: boolean | undefined;\n isFormControl: boolean;\n bubbleInput: HTMLInputElement | null;\n setBubbleInput: React.Dispatch<React.SetStateAction<HTMLInputElement | null>>;\n};\n\nconst [CheckboxProviderImpl, useCheckboxContext] =\n createCheckboxContext<CheckboxContextValue>(CHECKBOX_NAME);\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxProvider\n * -----------------------------------------------------------------------------------------------*/\n\ninterface CheckboxProviderProps<State extends CheckedState = CheckedState> {\n checked?: State | boolean;\n defaultChecked?: State | boolean;\n required?: boolean;\n onCheckedChange?(checked: State | boolean): void;\n name?: string;\n form?: string;\n disabled?: boolean;\n value?: string | number | readonly string[];\n children?: React.ReactNode;\n}\n\nfunction CheckboxProvider<State extends CheckedState = CheckedState>(\n props: ScopedProps<CheckboxProviderProps<State>>\n) {\n const {\n __scopeCheckbox,\n checked: checkedProp,\n children,\n defaultChecked,\n disabled,\n form,\n name,\n onCheckedChange,\n required,\n value = 'on',\n // @ts-expect-error\n internal_do_not_use_render,\n } = props;\n\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked ?? false,\n onChange: onCheckedChange,\n caller: CHECKBOX_NAME,\n });\n const [control, setControl] = React.useState<HTMLButtonElement | null>(null);\n const [bubbleInput, setBubbleInput] = React.useState<HTMLInputElement | null>(null);\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const isFormControl = control\n ? !!form || !!control.closest('form')\n : // We set this to true by default so that events bubble to forms without JS (SSR)\n true;\n\n const context: CheckboxContextValue<State> = {\n checked: checked,\n disabled: disabled,\n setChecked: setChecked,\n control: control,\n setControl: setControl,\n name: name,\n form: form,\n value: value,\n hasConsumerStoppedPropagationRef: hasConsumerStoppedPropagationRef,\n required: required,\n defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked,\n isFormControl: isFormControl,\n bubbleInput,\n setBubbleInput,\n };\n\n return (\n <CheckboxProviderImpl\n scope={__scopeCheckbox}\n {...(context as unknown as CheckboxContextValue<CheckedState>)}\n >\n {isFunction(internal_do_not_use_render) ? internal_do_not_use_render(context) : children}\n </CheckboxProviderImpl>\n );\n}\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'CheckboxTrigger';\n\ninterface CheckboxTriggerProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof Primitive.button>,\n keyof CheckboxProviderProps\n > {\n children?: React.ReactNode;\n}\n\nconst CheckboxTrigger = React.forwardRef<HTMLButtonElement, CheckboxTriggerProps>(\n (\n { __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }: ScopedProps<CheckboxTriggerProps>,\n forwardedRef\n ) => {\n const {\n control,\n value,\n disabled,\n checked,\n required,\n setControl,\n setChecked,\n hasConsumerStoppedPropagationRef,\n isFormControl,\n bubbleInput,\n } = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);\n const composedRefs = useComposedRefs(forwardedRef, setControl);\n\n const initialCheckedStateRef = React.useRef(checked);\n React.useEffect(() => {\n const form = control?.form;\n if (form) {\n const reset = () => setChecked(initialCheckedStateRef.current);\n form.addEventListener('reset', reset);\n return () => form.removeEventListener('reset', reset);\n }\n }, [control, setChecked]);\n\n return (\n <Primitive.button\n type=\"button\"\n role=\"checkbox\"\n aria-checked={isIndeterminate(checked) ? 'mixed' : checked}\n aria-required={required}\n data-state={getState(checked)}\n data-disabled={disabled ? '' : undefined}\n disabled={disabled}\n value={value}\n {...checkboxProps}\n ref={composedRefs}\n onKeyDown={composeEventHandlers(onKeyDown, (event) => {\n // According to WAI ARIA, Checkboxes don't activate on enter keypress\n if (event.key === 'Enter') event.preventDefault();\n })}\n onClick={composeEventHandlers(onClick, (event) => {\n setChecked((prevChecked) => (isIndeterminate(prevChecked) ? true : !prevChecked));\n if (bubbleInput && isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n // if checkbox has a bubble input and is a form control, stop\n // propagation from the button so that we only propagate one click\n // event (from the input). We propagate changes from an input so\n // that native form validation works and form events reflect\n // checkbox updates.\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })}\n />\n );\n }\n);\n\nCheckboxTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * Checkbox\n * -----------------------------------------------------------------------------------------------*/\n\ntype CheckboxElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface CheckboxProps extends Omit<PrimitiveButtonProps, 'checked' | 'defaultChecked'> {\n checked?: CheckedState;\n defaultChecked?: CheckedState;\n required?: boolean;\n onCheckedChange?(checked: CheckedState): void;\n}\n\nconst Checkbox = React.forwardRef<CheckboxElement, CheckboxProps>(\n (props: ScopedProps<CheckboxProps>, forwardedRef) => {\n const {\n __scopeCheckbox,\n name,\n checked,\n defaultChecked,\n required,\n disabled,\n value,\n onCheckedChange,\n form,\n ...checkboxProps\n } = props;\n\n return (\n <CheckboxProvider\n __scopeCheckbox={__scopeCheckbox}\n checked={checked}\n defaultChecked={defaultChecked}\n disabled={disabled}\n required={required}\n onCheckedChange={onCheckedChange}\n name={name}\n form={form}\n value={value}\n // @ts-expect-error\n internal_do_not_use_render={({ isFormControl }: CheckboxContextValue) => (\n <>\n <CheckboxTrigger\n {...checkboxProps}\n ref={forwardedRef}\n // @ts-expect-error\n __scopeCheckbox={__scopeCheckbox}\n />\n {isFormControl && (\n <CheckboxBubbleInput\n // @ts-expect-error\n __scopeCheckbox={__scopeCheckbox}\n />\n )}\n </>\n )}\n />\n );\n }\n);\n\nCheckbox.displayName = CHECKBOX_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'CheckboxIndicator';\n\ntype CheckboxIndicatorElement = React.ComponentRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface CheckboxIndicatorProps extends PrimitiveSpanProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst CheckboxIndicator = React.forwardRef<CheckboxIndicatorElement, CheckboxIndicatorProps>(\n (props: ScopedProps<CheckboxIndicatorProps>, forwardedRef) => {\n const { __scopeCheckbox, forceMount, ...indicatorProps } = props;\n const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);\n return (\n <Presence\n present={forceMount || isIndeterminate(context.checked) || context.checked === true}\n >\n <Primitive.span\n data-state={getState(context.checked)}\n data-disabled={context.disabled ? '' : undefined}\n {...indicatorProps}\n ref={forwardedRef}\n style={{ pointerEvents: 'none', ...props.style }}\n />\n </Presence>\n );\n }\n);\n\nCheckboxIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxBubbleInput\n * -----------------------------------------------------------------------------------------------*/\n\nconst BUBBLE_INPUT_NAME = 'CheckboxBubbleInput';\n\ntype InputProps = React.ComponentPropsWithoutRef<typeof Primitive.input>;\ninterface CheckboxBubbleInputProps extends Omit<InputProps, 'checked'> {}\n\nconst CheckboxBubbleInput = React.forwardRef<HTMLInputElement, CheckboxBubbleInputProps>(\n ({ __scopeCheckbox, ...props }: ScopedProps<CheckboxBubbleInputProps>, forwardedRef) => {\n const {\n control,\n hasConsumerStoppedPropagationRef,\n checked,\n defaultChecked,\n required,\n disabled,\n name,\n value,\n form,\n bubbleInput,\n setBubbleInput,\n } = useCheckboxContext(BUBBLE_INPUT_NAME, __scopeCheckbox);\n\n const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n\n // Bubble checked change to parents (e.g form change event)\n React.useEffect(() => {\n const input = bubbleInput;\n if (!input) return;\n\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n 'checked'\n ) as PropertyDescriptor;\n const setChecked = descriptor.set;\n\n const bubbles = !hasConsumerStoppedPropagationRef.current;\n if (prevChecked !== checked && setChecked) {\n const event = new Event('click', { bubbles });\n input.indeterminate = isIndeterminate(checked);\n setChecked.call(input, isIndeterminate(checked) ? false : checked);\n input.dispatchEvent(event);\n }\n }, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);\n\n const defaultCheckedRef = React.useRef(isIndeterminate(checked) ? false : checked);\n return (\n <Primitive.input\n type=\"checkbox\"\n aria-hidden\n defaultChecked={defaultChecked ?? defaultCheckedRef.current}\n required={required}\n disabled={disabled}\n name={name}\n value={value}\n form={form}\n {...props}\n tabIndex={-1}\n ref={composedRefs}\n style={{\n ...props.style,\n ...controlSize,\n position: 'absolute',\n pointerEvents: 'none',\n opacity: 0,\n margin: 0,\n // We transform because the input is absolutely positioned but we have\n // rendered it **after** the button. This pulls it back to sit on top\n // of the button.\n transform: 'translateX(-100%)',\n }}\n />\n );\n }\n);\n\nCheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nfunction isFunction(value: unknown): value is (...args: any[]) => any {\n return typeof value === 'function';\n}\n\nfunction isIndeterminate(checked?: CheckedState): checked is 'indeterminate' {\n return checked === 'indeterminate';\n}\n\nfunction getState(checked: CheckedState) {\n return isIndeterminate(checked) ? 'indeterminate' : checked ? 'checked' : 'unchecked';\n}\n\nexport {\n createCheckboxScope,\n //\n Checkbox,\n CheckboxProvider,\n CheckboxTrigger,\n CheckboxIndicator,\n CheckboxBubbleInput,\n //\n Checkbox as Root,\n CheckboxProvider as Provider,\n CheckboxTrigger as Trigger,\n CheckboxIndicator as Indicator,\n CheckboxBubbleInput as BubbleInput,\n};\nexport type {\n CheckboxProps,\n CheckboxProviderProps,\n CheckboxTriggerProps,\n CheckboxIndicatorProps,\n CheckboxBubbleInputProps,\n CheckedState,\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AAyGnB,yBAAA;AA7FJ,IAAM,gBAAgB;AAGtB,IAAM,CAAC,uBAAuB,mBAAmB,IAAI,mBAAmB,aAAa;AAqBrF,IAAM,CAAC,sBAAsB,kBAAkB,IAC7C,sBAA4C,aAAa;AAkB3D,SAAS,iBACP,OACA;AACA,QAAM;IACJ;IACA,SAAS;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA,QAAQ;;IAER;EACF,IAAI;AAEJ,QAAM,CAAC,SAAS,UAAU,IAAI,qBAAqB;IACjD,MAAM;IACN,aAAa,kBAAkB;IAC/B,UAAU;IACV,QAAQ;EACV,CAAC;AACD,QAAM,CAAC,SAAS,UAAU,IAAU,eAAmC,IAAI;AAC3E,QAAM,CAAC,aAAa,cAAc,IAAU,eAAkC,IAAI;AAClF,QAAM,mCAAyC,aAAO,KAAK;AAC3D,QAAM,gBAAgB,UAClB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,QAAQ,MAAM;;IAElC;;AAEJ,QAAM,UAAuC;IAC3C;IACA;IACA;IAC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
+ Content,
5
+ Description,
6
+ Dialog,
7
+ DialogClose,
8
+ DialogContent,
9
+ DialogDescription,
10
+ DialogOverlay,
11
+ DialogPortal,
12
+ DialogTitle,
13
+ DialogTrigger,
14
+ Overlay,
15
+ Portal,
16
+ Root,
17
+ Title,
18
+ Trigger,
19
+ WarningProvider,
20
+ createDialogScope
21
+ } from "./chunk-MBR23SFK.js";
22
+ import "./chunk-XET2JR3H.js";
23
+ import "./chunk-43NH6PDE.js";
24
+ import "./chunk-Y2CDDFKN.js";
25
+ import "./chunk-R4J6KICQ.js";
26
+ import "./chunk-HMLLSKRK.js";
27
+ import "./chunk-TLMPZXCM.js";
28
+ import "./chunk-PJEEZAML.js";
29
+ import "./chunk-6PXSGDAH.js";
30
+ import "./chunk-DRWLMN53.js";
31
+ import "./chunk-G3PMV62Z.js";
32
+ export {
33
+ Close,
34
+ Content,
35
+ Description,
36
+ Dialog,
37
+ DialogClose,
38
+ DialogContent,
39
+ DialogDescription,
40
+ DialogOverlay,
41
+ DialogPortal,
42
+ DialogTitle,
43
+ DialogTrigger,
44
+ Overlay,
45
+ Portal,
46
+ Root,
47
+ Title,
48
+ Trigger,
49
+ WarningProvider,
50
+ createDialogScope
51
+ };
52
+ //# sourceMappingURL=@radix-ui_react-dialog.js.map
frontend/node_modules/.vite/deps/@radix-ui_react-dialog.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
frontend/node_modules/.vite/deps/@radix-ui_react-label.js ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use client";
2
+ import {
3
+ Primitive
4
+ } from "./chunk-HMLLSKRK.js";
5
+ import "./chunk-TLMPZXCM.js";
6
+ import "./chunk-PJEEZAML.js";
7
+ import {
8
+ require_jsx_runtime
9
+ } from "./chunk-6PXSGDAH.js";
10
+ import {
11
+ require_react
12
+ } from "./chunk-DRWLMN53.js";
13
+ import {
14
+ __toESM
15
+ } from "./chunk-G3PMV62Z.js";
16
+
17
+ // node_modules/@radix-ui/react-label/dist/index.mjs
18
+ var React = __toESM(require_react(), 1);
19
+ var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
20
+ var NAME = "Label";
21
+ var Label = React.forwardRef((props, forwardedRef) => {
22
+ return (0, import_jsx_runtime.jsx)(
23
+ Primitive.label,
24
+ {
25
+ ...props,
26
+ ref: forwardedRef,
27
+ onMouseDown: (event) => {
28
+ var _a;
29
+ const target = event.target;
30
+ if (target.closest("button, input, select, textarea")) return;
31
+ (_a = props.onMouseDown) == null ? void 0 : _a.call(props, event);
32
+ if (!event.defaultPrevented && event.detail > 1) event.preventDefault();
33
+ }
34
+ }
35
+ );
36
+ });
37
+ Label.displayName = NAME;
38
+ var Root = Label;
39
+ export {
40
+ Label,
41
+ Root
42
+ };
43
+ //# sourceMappingURL=@radix-ui_react-label.js.map
frontend/node_modules/.vite/deps/@radix-ui_react-label.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../@radix-ui/react-label/src/label.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Label\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Label';\n\ntype LabelElement = React.ComponentRef<typeof Primitive.label>;\ntype PrimitiveLabelProps = React.ComponentPropsWithoutRef<typeof Primitive.label>;\ninterface LabelProps extends PrimitiveLabelProps {}\n\nconst Label = React.forwardRef<LabelElement, LabelProps>((props, forwardedRef) => {\n return (\n <Primitive.label\n {...props}\n ref={forwardedRef}\n onMouseDown={(event) => {\n // only prevent text selection if clicking inside the label itself\n const target = event.target as HTMLElement;\n if (target.closest('button, input, select, textarea')) return;\n\n props.onMouseDown?.(event);\n // prevent text selection when double clicking label\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }}\n />\n );\n});\n\nLabel.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Label;\n\nexport {\n Label,\n //\n Root,\n};\nexport type { LabelProps };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA,YAAuB;AAenB,yBAAA;AARJ,IAAM,OAAO;AAMb,IAAM,QAAc,iBAAqC,CAAC,OAAO,iBAAiB;AAChF,aACE;IAAC,UAAU;IAAV;MACE,GAAG;MACJ,KAAK;MACL,aAAa,CAAC,UAAU;;AAEtB,cAAM,SAAS,MAAM;AACrB,YAAI,OAAO,QAAQ,iCAAiC,EAAG;AAEvD,oBAAM,gBAAN,+BAAoB;AAEpB,YAAI,CAAC,MAAM,oBAAoB,MAAM,SAAS,EAAG,OAAM,eAAe;MACxE;IAAA;EACF;AAEJ,CAAC;AAED,MAAM,cAAc;AAIpB,IAAM,OAAO;",
6
+ "names": []
7
+ }
frontend/node_modules/.vite/deps/@radix-ui_react-select.js ADDED
The diff for this file is too large to render. See raw diff
 
frontend/node_modules/.vite/deps/@radix-ui_react-select.js.map ADDED
The diff for this file is too large to render. See raw diff
 
frontend/node_modules/.vite/deps/@radix-ui_react-slot.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ Slot,
3
+ Slottable,
4
+ createSlot,
5
+ createSlottable
6
+ } from "./chunk-TLMPZXCM.js";
7
+ import "./chunk-6PXSGDAH.js";
8
+ import "./chunk-DRWLMN53.js";
9
+ import "./chunk-G3PMV62Z.js";
10
+ export {
11
+ Slot as Root,
12
+ Slot,
13
+ Slottable,
14
+ createSlot,
15
+ createSlottable
16
+ };
17
+ //# sourceMappingURL=@radix-ui_react-slot.js.map
frontend/node_modules/.vite/deps/@radix-ui_react-slot.js.map ADDED
@@ -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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use client";
2
+ import {
3
+ VisuallyHidden,
4
+ createCollection
5
+ } from "./chunk-FF4LPVR2.js";
6
+ import {
7
+ Branch,
8
+ Portal,
9
+ Root,
10
+ useCallbackRef
11
+ } from "./chunk-43NH6PDE.js";
12
+ import {
13
+ Presence
14
+ } from "./chunk-Y2CDDFKN.js";
15
+ import {
16
+ composeEventHandlers,
17
+ createContextScope,
18
+ useControllableState,
19
+ useLayoutEffect2
20
+ } from "./chunk-R4J6KICQ.js";
21
+ import {
22
+ Primitive,
23
+ dispatchDiscreteCustomEvent
24
+ } from "./chunk-HMLLSKRK.js";
25
+ import {
26
+ useComposedRefs
27
+ } from "./chunk-TLMPZXCM.js";
28
+ import {
29
+ require_react_dom
30
+ } from "./chunk-PJEEZAML.js";
31
+ import {
32
+ require_jsx_runtime
33
+ } from "./chunk-6PXSGDAH.js";
34
+ import {
35
+ require_react
36
+ } from "./chunk-DRWLMN53.js";
37
+ import {
38
+ __toESM
39
+ } from "./chunk-G3PMV62Z.js";
40
+
41
+ // node_modules/@radix-ui/react-toast/dist/index.mjs
42
+ var React = __toESM(require_react(), 1);
43
+ var ReactDOM = __toESM(require_react_dom(), 1);
44
+ var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
45
+ var PROVIDER_NAME = "ToastProvider";
46
+ var [Collection, useCollection, createCollectionScope] = createCollection("Toast");
47
+ var [createToastContext, createToastScope] = createContextScope("Toast", [createCollectionScope]);
48
+ var [ToastProviderProvider, useToastProviderContext] = createToastContext(PROVIDER_NAME);
49
+ var ToastProvider = (props) => {
50
+ const {
51
+ __scopeToast,
52
+ label = "Notification",
53
+ duration = 5e3,
54
+ swipeDirection = "right",
55
+ swipeThreshold = 50,
56
+ children
57
+ } = props;
58
+ const [viewport, setViewport] = React.useState(null);
59
+ const [toastCount, setToastCount] = React.useState(0);
60
+ const isFocusedToastEscapeKeyDownRef = React.useRef(false);
61
+ const isClosePausedRef = React.useRef(false);
62
+ if (!label.trim()) {
63
+ console.error(
64
+ `Invalid prop \`label\` supplied to \`${PROVIDER_NAME}\`. Expected non-empty \`string\`.`
65
+ );
66
+ }
67
+ return (0, import_jsx_runtime.jsx)(Collection.Provider, { scope: __scopeToast, children: (0, import_jsx_runtime.jsx)(
68
+ ToastProviderProvider,
69
+ {
70
+ scope: __scopeToast,
71
+ label,
72
+ duration,
73
+ swipeDirection,
74
+ swipeThreshold,
75
+ toastCount,
76
+ viewport,
77
+ onViewportChange: setViewport,
78
+ onToastAdd: React.useCallback(() => setToastCount((prevCount) => prevCount + 1), []),
79
+ onToastRemove: React.useCallback(() => setToastCount((prevCount) => prevCount - 1), []),
80
+ isFocusedToastEscapeKeyDownRef,
81
+ isClosePausedRef,
82
+ children
83
+ }
84
+ ) });
85
+ };
86
+ ToastProvider.displayName = PROVIDER_NAME;
87
+ var VIEWPORT_NAME = "ToastViewport";
88
+ var VIEWPORT_DEFAULT_HOTKEY = ["F8"];
89
+ var VIEWPORT_PAUSE = "toast.viewportPause";
90
+ var VIEWPORT_RESUME = "toast.viewportResume";
91
+ var ToastViewport = React.forwardRef(
92
+ (props, forwardedRef) => {
93
+ const {
94
+ __scopeToast,
95
+ hotkey = VIEWPORT_DEFAULT_HOTKEY,
96
+ label = "Notifications ({hotkey})",
97
+ ...viewportProps
98
+ } = props;
99
+ const context = useToastProviderContext(VIEWPORT_NAME, __scopeToast);
100
+ const getItems = useCollection(__scopeToast);
101
+ const wrapperRef = React.useRef(null);
102
+ const headFocusProxyRef = React.useRef(null);
103
+ const tailFocusProxyRef = React.useRef(null);
104
+ const ref = React.useRef(null);
105
+ const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);
106
+ const hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
107
+ const hasToasts = context.toastCount > 0;
108
+ React.useEffect(() => {
109
+ const handleKeyDown = (event) => {
110
+ var _a;
111
+ const isHotkeyPressed = hotkey.length !== 0 && hotkey.every((key) => event[key] || event.code === key);
112
+ if (isHotkeyPressed) (_a = ref.current) == null ? void 0 : _a.focus();
113
+ };
114
+ document.addEventListener("keydown", handleKeyDown);
115
+ return () => document.removeEventListener("keydown", handleKeyDown);
116
+ }, [hotkey]);
117
+ React.useEffect(() => {
118
+ const wrapper = wrapperRef.current;
119
+ const viewport = ref.current;
120
+ if (hasToasts && wrapper && viewport) {
121
+ const handlePause = () => {
122
+ if (!context.isClosePausedRef.current) {
123
+ const pauseEvent = new CustomEvent(VIEWPORT_PAUSE);
124
+ viewport.dispatchEvent(pauseEvent);
125
+ context.isClosePausedRef.current = true;
126
+ }
127
+ };
128
+ const handleResume = () => {
129
+ if (context.isClosePausedRef.current) {
130
+ const resumeEvent = new CustomEvent(VIEWPORT_RESUME);
131
+ viewport.dispatchEvent(resumeEvent);
132
+ context.isClosePausedRef.current = false;
133
+ }
134
+ };
135
+ const handleFocusOutResume = (event) => {
136
+ const isFocusMovingOutside = !wrapper.contains(event.relatedTarget);
137
+ if (isFocusMovingOutside) handleResume();
138
+ };
139
+ const handlePointerLeaveResume = () => {
140
+ const isFocusInside = wrapper.contains(document.activeElement);
141
+ if (!isFocusInside) handleResume();
142
+ };
143
+ wrapper.addEventListener("focusin", handlePause);
144
+ wrapper.addEventListener("focusout", handleFocusOutResume);
145
+ wrapper.addEventListener("pointermove", handlePause);
146
+ wrapper.addEventListener("pointerleave", handlePointerLeaveResume);
147
+ window.addEventListener("blur", handlePause);
148
+ window.addEventListener("focus", handleResume);
149
+ return () => {
150
+ wrapper.removeEventListener("focusin", handlePause);
151
+ wrapper.removeEventListener("focusout", handleFocusOutResume);
152
+ wrapper.removeEventListener("pointermove", handlePause);
153
+ wrapper.removeEventListener("pointerleave", handlePointerLeaveResume);
154
+ window.removeEventListener("blur", handlePause);
155
+ window.removeEventListener("focus", handleResume);
156
+ };
157
+ }
158
+ }, [hasToasts, context.isClosePausedRef]);
159
+ const getSortedTabbableCandidates = React.useCallback(
160
+ ({ tabbingDirection }) => {
161
+ const toastItems = getItems();
162
+ const tabbableCandidates = toastItems.map((toastItem) => {
163
+ const toastNode = toastItem.ref.current;
164
+ const toastTabbableCandidates = [toastNode, ...getTabbableCandidates(toastNode)];
165
+ return tabbingDirection === "forwards" ? toastTabbableCandidates : toastTabbableCandidates.reverse();
166
+ });
167
+ return (tabbingDirection === "forwards" ? tabbableCandidates.reverse() : tabbableCandidates).flat();
168
+ },
169
+ [getItems]
170
+ );
171
+ React.useEffect(() => {
172
+ const viewport = ref.current;
173
+ if (viewport) {
174
+ const handleKeyDown = (event) => {
175
+ var _a, _b, _c;
176
+ const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;
177
+ const isTabKey = event.key === "Tab" && !isMetaKey;
178
+ if (isTabKey) {
179
+ const focusedElement = document.activeElement;
180
+ const isTabbingBackwards = event.shiftKey;
181
+ const targetIsViewport = event.target === viewport;
182
+ if (targetIsViewport && isTabbingBackwards) {
183
+ (_a = headFocusProxyRef.current) == null ? void 0 : _a.focus();
184
+ return;
185
+ }
186
+ const tabbingDirection = isTabbingBackwards ? "backwards" : "forwards";
187
+ const sortedCandidates = getSortedTabbableCandidates({ tabbingDirection });
188
+ const index = sortedCandidates.findIndex((candidate) => candidate === focusedElement);
189
+ if (focusFirst(sortedCandidates.slice(index + 1))) {
190
+ event.preventDefault();
191
+ } else {
192
+ isTabbingBackwards ? (_b = headFocusProxyRef.current) == null ? void 0 : _b.focus() : (_c = tailFocusProxyRef.current) == null ? void 0 : _c.focus();
193
+ }
194
+ }
195
+ };
196
+ viewport.addEventListener("keydown", handleKeyDown);
197
+ return () => viewport.removeEventListener("keydown", handleKeyDown);
198
+ }
199
+ }, [getItems, getSortedTabbableCandidates]);
200
+ return (0, import_jsx_runtime.jsxs)(
201
+ Branch,
202
+ {
203
+ ref: wrapperRef,
204
+ role: "region",
205
+ "aria-label": label.replace("{hotkey}", hotkeyLabel),
206
+ tabIndex: -1,
207
+ style: { pointerEvents: hasToasts ? void 0 : "none" },
208
+ children: [
209
+ hasToasts && (0, import_jsx_runtime.jsx)(
210
+ FocusProxy,
211
+ {
212
+ ref: headFocusProxyRef,
213
+ onFocusFromOutsideViewport: () => {
214
+ const tabbableCandidates = getSortedTabbableCandidates({
215
+ tabbingDirection: "forwards"
216
+ });
217
+ focusFirst(tabbableCandidates);
218
+ }
219
+ }
220
+ ),
221
+ (0, import_jsx_runtime.jsx)(Collection.Slot, { scope: __scopeToast, children: (0, import_jsx_runtime.jsx)(Primitive.ol, { tabIndex: -1, ...viewportProps, ref: composedRefs }) }),
222
+ hasToasts && (0, import_jsx_runtime.jsx)(
223
+ FocusProxy,
224
+ {
225
+ ref: tailFocusProxyRef,
226
+ onFocusFromOutsideViewport: () => {
227
+ const tabbableCandidates = getSortedTabbableCandidates({
228
+ tabbingDirection: "backwards"
229
+ });
230
+ focusFirst(tabbableCandidates);
231
+ }
232
+ }
233
+ )
234
+ ]
235
+ }
236
+ );
237
+ }
238
+ );
239
+ ToastViewport.displayName = VIEWPORT_NAME;
240
+ var FOCUS_PROXY_NAME = "ToastFocusProxy";
241
+ var FocusProxy = React.forwardRef(
242
+ (props, forwardedRef) => {
243
+ const { __scopeToast, onFocusFromOutsideViewport, ...proxyProps } = props;
244
+ const context = useToastProviderContext(FOCUS_PROXY_NAME, __scopeToast);
245
+ return (0, import_jsx_runtime.jsx)(
246
+ VisuallyHidden,
247
+ {
248
+ "aria-hidden": true,
249
+ tabIndex: 0,
250
+ ...proxyProps,
251
+ ref: forwardedRef,
252
+ style: { position: "fixed" },
253
+ onFocus: (event) => {
254
+ var _a;
255
+ const prevFocusedElement = event.relatedTarget;
256
+ const isFocusFromOutsideViewport = !((_a = context.viewport) == null ? void 0 : _a.contains(prevFocusedElement));
257
+ if (isFocusFromOutsideViewport) onFocusFromOutsideViewport();
258
+ }
259
+ }
260
+ );
261
+ }
262
+ );
263
+ FocusProxy.displayName = FOCUS_PROXY_NAME;
264
+ var TOAST_NAME = "Toast";
265
+ var TOAST_SWIPE_START = "toast.swipeStart";
266
+ var TOAST_SWIPE_MOVE = "toast.swipeMove";
267
+ var TOAST_SWIPE_CANCEL = "toast.swipeCancel";
268
+ var TOAST_SWIPE_END = "toast.swipeEnd";
269
+ var Toast = React.forwardRef(
270
+ (props, forwardedRef) => {
271
+ const { forceMount, open: openProp, defaultOpen, onOpenChange, ...toastProps } = props;
272
+ const [open, setOpen] = useControllableState({
273
+ prop: openProp,
274
+ defaultProp: defaultOpen ?? true,
275
+ onChange: onOpenChange,
276
+ caller: TOAST_NAME
277
+ });
278
+ return (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || open, children: (0, import_jsx_runtime.jsx)(
279
+ ToastImpl,
280
+ {
281
+ open,
282
+ ...toastProps,
283
+ ref: forwardedRef,
284
+ onClose: () => setOpen(false),
285
+ onPause: useCallbackRef(props.onPause),
286
+ onResume: useCallbackRef(props.onResume),
287
+ onSwipeStart: composeEventHandlers(props.onSwipeStart, (event) => {
288
+ event.currentTarget.setAttribute("data-swipe", "start");
289
+ }),
290
+ onSwipeMove: composeEventHandlers(props.onSwipeMove, (event) => {
291
+ const { x, y } = event.detail.delta;
292
+ event.currentTarget.setAttribute("data-swipe", "move");
293
+ event.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${x}px`);
294
+ event.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${y}px`);
295
+ }),
296
+ onSwipeCancel: composeEventHandlers(props.onSwipeCancel, (event) => {
297
+ event.currentTarget.setAttribute("data-swipe", "cancel");
298
+ event.currentTarget.style.removeProperty("--radix-toast-swipe-move-x");
299
+ event.currentTarget.style.removeProperty("--radix-toast-swipe-move-y");
300
+ event.currentTarget.style.removeProperty("--radix-toast-swipe-end-x");
301
+ event.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
302
+ }),
303
+ onSwipeEnd: composeEventHandlers(props.onSwipeEnd, (event) => {
304
+ const { x, y } = event.detail.delta;
305
+ event.currentTarget.setAttribute("data-swipe", "end");
306
+ event.currentTarget.style.removeProperty("--radix-toast-swipe-move-x");
307
+ event.currentTarget.style.removeProperty("--radix-toast-swipe-move-y");
308
+ event.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${x}px`);
309
+ event.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${y}px`);
310
+ setOpen(false);
311
+ })
312
+ }
313
+ ) });
314
+ }
315
+ );
316
+ Toast.displayName = TOAST_NAME;
317
+ var [ToastInteractiveProvider, useToastInteractiveContext] = createToastContext(TOAST_NAME, {
318
+ onClose() {
319
+ }
320
+ });
321
+ var ToastImpl = React.forwardRef(
322
+ (props, forwardedRef) => {
323
+ const {
324
+ __scopeToast,
325
+ type = "foreground",
326
+ duration: durationProp,
327
+ open,
328
+ onClose,
329
+ onEscapeKeyDown,
330
+ onPause,
331
+ onResume,
332
+ onSwipeStart,
333
+ onSwipeMove,
334
+ onSwipeCancel,
335
+ onSwipeEnd,
336
+ ...toastProps
337
+ } = props;
338
+ const context = useToastProviderContext(TOAST_NAME, __scopeToast);
339
+ const [node, setNode] = React.useState(null);
340
+ const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
341
+ const pointerStartRef = React.useRef(null);
342
+ const swipeDeltaRef = React.useRef(null);
343
+ const duration = durationProp || context.duration;
344
+ const closeTimerStartTimeRef = React.useRef(0);
345
+ const closeTimerRemainingTimeRef = React.useRef(duration);
346
+ const closeTimerRef = React.useRef(0);
347
+ const { onToastAdd, onToastRemove } = context;
348
+ const handleClose = useCallbackRef(() => {
349
+ var _a;
350
+ const isFocusInToast = node == null ? void 0 : node.contains(document.activeElement);
351
+ if (isFocusInToast) (_a = context.viewport) == null ? void 0 : _a.focus();
352
+ onClose();
353
+ });
354
+ const startTimer = React.useCallback(
355
+ (duration2) => {
356
+ if (!duration2 || duration2 === Infinity) return;
357
+ window.clearTimeout(closeTimerRef.current);
358
+ closeTimerStartTimeRef.current = (/* @__PURE__ */ new Date()).getTime();
359
+ closeTimerRef.current = window.setTimeout(handleClose, duration2);
360
+ },
361
+ [handleClose]
362
+ );
363
+ React.useEffect(() => {
364
+ const viewport = context.viewport;
365
+ if (viewport) {
366
+ const handleResume = () => {
367
+ startTimer(closeTimerRemainingTimeRef.current);
368
+ onResume == null ? void 0 : onResume();
369
+ };
370
+ const handlePause = () => {
371
+ const elapsedTime = (/* @__PURE__ */ new Date()).getTime() - closeTimerStartTimeRef.current;
372
+ closeTimerRemainingTimeRef.current = closeTimerRemainingTimeRef.current - elapsedTime;
373
+ window.clearTimeout(closeTimerRef.current);
374
+ onPause == null ? void 0 : onPause();
375
+ };
376
+ viewport.addEventListener(VIEWPORT_PAUSE, handlePause);
377
+ viewport.addEventListener(VIEWPORT_RESUME, handleResume);
378
+ return () => {
379
+ viewport.removeEventListener(VIEWPORT_PAUSE, handlePause);
380
+ viewport.removeEventListener(VIEWPORT_RESUME, handleResume);
381
+ };
382
+ }
383
+ }, [context.viewport, duration, onPause, onResume, startTimer]);
384
+ React.useEffect(() => {
385
+ if (open && !context.isClosePausedRef.current) startTimer(duration);
386
+ }, [open, duration, context.isClosePausedRef, startTimer]);
387
+ React.useEffect(() => {
388
+ onToastAdd();
389
+ return () => onToastRemove();
390
+ }, [onToastAdd, onToastRemove]);
391
+ const announceTextContent = React.useMemo(() => {
392
+ return node ? getAnnounceTextContent(node) : null;
393
+ }, [node]);
394
+ if (!context.viewport) return null;
395
+ return (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
396
+ announceTextContent && (0, import_jsx_runtime.jsx)(
397
+ ToastAnnounce,
398
+ {
399
+ __scopeToast,
400
+ role: "status",
401
+ "aria-live": type === "foreground" ? "assertive" : "polite",
402
+ "aria-atomic": true,
403
+ children: announceTextContent
404
+ }
405
+ ),
406
+ (0, import_jsx_runtime.jsx)(ToastInteractiveProvider, { scope: __scopeToast, onClose: handleClose, children: ReactDOM.createPortal(
407
+ (0, import_jsx_runtime.jsx)(Collection.ItemSlot, { scope: __scopeToast, children: (0, import_jsx_runtime.jsx)(
408
+ Root,
409
+ {
410
+ asChild: true,
411
+ onEscapeKeyDown: composeEventHandlers(onEscapeKeyDown, () => {
412
+ if (!context.isFocusedToastEscapeKeyDownRef.current) handleClose();
413
+ context.isFocusedToastEscapeKeyDownRef.current = false;
414
+ }),
415
+ children: (0, import_jsx_runtime.jsx)(
416
+ Primitive.li,
417
+ {
418
+ role: "status",
419
+ "aria-live": "off",
420
+ "aria-atomic": true,
421
+ tabIndex: 0,
422
+ "data-state": open ? "open" : "closed",
423
+ "data-swipe-direction": context.swipeDirection,
424
+ ...toastProps,
425
+ ref: composedRefs,
426
+ style: { userSelect: "none", touchAction: "none", ...props.style },
427
+ onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
428
+ if (event.key !== "Escape") return;
429
+ onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(event.nativeEvent);
430
+ if (!event.nativeEvent.defaultPrevented) {
431
+ context.isFocusedToastEscapeKeyDownRef.current = true;
432
+ handleClose();
433
+ }
434
+ }),
435
+ onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
436
+ if (event.button !== 0) return;
437
+ pointerStartRef.current = { x: event.clientX, y: event.clientY };
438
+ }),
439
+ onPointerMove: composeEventHandlers(props.onPointerMove, (event) => {
440
+ if (!pointerStartRef.current) return;
441
+ const x = event.clientX - pointerStartRef.current.x;
442
+ const y = event.clientY - pointerStartRef.current.y;
443
+ const hasSwipeMoveStarted = Boolean(swipeDeltaRef.current);
444
+ const isHorizontalSwipe = ["left", "right"].includes(context.swipeDirection);
445
+ const clamp = ["left", "up"].includes(context.swipeDirection) ? Math.min : Math.max;
446
+ const clampedX = isHorizontalSwipe ? clamp(0, x) : 0;
447
+ const clampedY = !isHorizontalSwipe ? clamp(0, y) : 0;
448
+ const moveStartBuffer = event.pointerType === "touch" ? 10 : 2;
449
+ const delta = { x: clampedX, y: clampedY };
450
+ const eventDetail = { originalEvent: event, delta };
451
+ if (hasSwipeMoveStarted) {
452
+ swipeDeltaRef.current = delta;
453
+ handleAndDispatchCustomEvent(TOAST_SWIPE_MOVE, onSwipeMove, eventDetail, {
454
+ discrete: false
455
+ });
456
+ } else if (isDeltaInDirection(delta, context.swipeDirection, moveStartBuffer)) {
457
+ swipeDeltaRef.current = delta;
458
+ handleAndDispatchCustomEvent(TOAST_SWIPE_START, onSwipeStart, eventDetail, {
459
+ discrete: false
460
+ });
461
+ event.target.setPointerCapture(event.pointerId);
462
+ } else if (Math.abs(x) > moveStartBuffer || Math.abs(y) > moveStartBuffer) {
463
+ pointerStartRef.current = null;
464
+ }
465
+ }),
466
+ onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {
467
+ const delta = swipeDeltaRef.current;
468
+ const target = event.target;
469
+ if (target.hasPointerCapture(event.pointerId)) {
470
+ target.releasePointerCapture(event.pointerId);
471
+ }
472
+ swipeDeltaRef.current = null;
473
+ pointerStartRef.current = null;
474
+ if (delta) {
475
+ const toast = event.currentTarget;
476
+ const eventDetail = { originalEvent: event, delta };
477
+ if (isDeltaInDirection(delta, context.swipeDirection, context.swipeThreshold)) {
478
+ handleAndDispatchCustomEvent(TOAST_SWIPE_END, onSwipeEnd, eventDetail, {
479
+ discrete: true
480
+ });
481
+ } else {
482
+ handleAndDispatchCustomEvent(
483
+ TOAST_SWIPE_CANCEL,
484
+ onSwipeCancel,
485
+ eventDetail,
486
+ {
487
+ discrete: true
488
+ }
489
+ );
490
+ }
491
+ toast.addEventListener("click", (event2) => event2.preventDefault(), {
492
+ once: true
493
+ });
494
+ }
495
+ })
496
+ }
497
+ )
498
+ }
499
+ ) }),
500
+ context.viewport
501
+ ) })
502
+ ] });
503
+ }
504
+ );
505
+ var ToastAnnounce = (props) => {
506
+ const { __scopeToast, children, ...announceProps } = props;
507
+ const context = useToastProviderContext(TOAST_NAME, __scopeToast);
508
+ const [renderAnnounceText, setRenderAnnounceText] = React.useState(false);
509
+ const [isAnnounced, setIsAnnounced] = React.useState(false);
510
+ useNextFrame(() => setRenderAnnounceText(true));
511
+ React.useEffect(() => {
512
+ const timer = window.setTimeout(() => setIsAnnounced(true), 1e3);
513
+ return () => window.clearTimeout(timer);
514
+ }, []);
515
+ return isAnnounced ? null : (0, import_jsx_runtime.jsx)(Portal, { asChild: true, children: (0, import_jsx_runtime.jsx)(VisuallyHidden, { ...announceProps, children: renderAnnounceText && (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
516
+ context.label,
517
+ " ",
518
+ children
519
+ ] }) }) });
520
+ };
521
+ var TITLE_NAME = "ToastTitle";
522
+ var ToastTitle = React.forwardRef(
523
+ (props, forwardedRef) => {
524
+ const { __scopeToast, ...titleProps } = props;
525
+ return (0, import_jsx_runtime.jsx)(Primitive.div, { ...titleProps, ref: forwardedRef });
526
+ }
527
+ );
528
+ ToastTitle.displayName = TITLE_NAME;
529
+ var DESCRIPTION_NAME = "ToastDescription";
530
+ var ToastDescription = React.forwardRef(
531
+ (props, forwardedRef) => {
532
+ const { __scopeToast, ...descriptionProps } = props;
533
+ return (0, import_jsx_runtime.jsx)(Primitive.div, { ...descriptionProps, ref: forwardedRef });
534
+ }
535
+ );
536
+ ToastDescription.displayName = DESCRIPTION_NAME;
537
+ var ACTION_NAME = "ToastAction";
538
+ var ToastAction = React.forwardRef(
539
+ (props, forwardedRef) => {
540
+ const { altText, ...actionProps } = props;
541
+ if (!altText.trim()) {
542
+ console.error(
543
+ `Invalid prop \`altText\` supplied to \`${ACTION_NAME}\`. Expected non-empty \`string\`.`
544
+ );
545
+ return null;
546
+ }
547
+ return (0, import_jsx_runtime.jsx)(ToastAnnounceExclude, { altText, asChild: true, children: (0, import_jsx_runtime.jsx)(ToastClose, { ...actionProps, ref: forwardedRef }) });
548
+ }
549
+ );
550
+ ToastAction.displayName = ACTION_NAME;
551
+ var CLOSE_NAME = "ToastClose";
552
+ var ToastClose = React.forwardRef(
553
+ (props, forwardedRef) => {
554
+ const { __scopeToast, ...closeProps } = props;
555
+ const interactiveContext = useToastInteractiveContext(CLOSE_NAME, __scopeToast);
556
+ return (0, import_jsx_runtime.jsx)(ToastAnnounceExclude, { asChild: true, children: (0, import_jsx_runtime.jsx)(
557
+ Primitive.button,
558
+ {
559
+ type: "button",
560
+ ...closeProps,
561
+ ref: forwardedRef,
562
+ onClick: composeEventHandlers(props.onClick, interactiveContext.onClose)
563
+ }
564
+ ) });
565
+ }
566
+ );
567
+ ToastClose.displayName = CLOSE_NAME;
568
+ var ToastAnnounceExclude = React.forwardRef((props, forwardedRef) => {
569
+ const { __scopeToast, altText, ...announceExcludeProps } = props;
570
+ return (0, import_jsx_runtime.jsx)(
571
+ Primitive.div,
572
+ {
573
+ "data-radix-toast-announce-exclude": "",
574
+ "data-radix-toast-announce-alt": altText || void 0,
575
+ ...announceExcludeProps,
576
+ ref: forwardedRef
577
+ }
578
+ );
579
+ });
580
+ function getAnnounceTextContent(container) {
581
+ const textContent = [];
582
+ const childNodes = Array.from(container.childNodes);
583
+ childNodes.forEach((node) => {
584
+ if (node.nodeType === node.TEXT_NODE && node.textContent) textContent.push(node.textContent);
585
+ if (isHTMLElement(node)) {
586
+ const isHidden = node.ariaHidden || node.hidden || node.style.display === "none";
587
+ const isExcluded = node.dataset.radixToastAnnounceExclude === "";
588
+ if (!isHidden) {
589
+ if (isExcluded) {
590
+ const altText = node.dataset.radixToastAnnounceAlt;
591
+ if (altText) textContent.push(altText);
592
+ } else {
593
+ textContent.push(...getAnnounceTextContent(node));
594
+ }
595
+ }
596
+ }
597
+ });
598
+ return textContent;
599
+ }
600
+ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
601
+ const currentTarget = detail.originalEvent.currentTarget;
602
+ const event = new CustomEvent(name, { bubbles: true, cancelable: true, detail });
603
+ if (handler) currentTarget.addEventListener(name, handler, { once: true });
604
+ if (discrete) {
605
+ dispatchDiscreteCustomEvent(currentTarget, event);
606
+ } else {
607
+ currentTarget.dispatchEvent(event);
608
+ }
609
+ }
610
+ var isDeltaInDirection = (delta, direction, threshold = 0) => {
611
+ const deltaX = Math.abs(delta.x);
612
+ const deltaY = Math.abs(delta.y);
613
+ const isDeltaX = deltaX > deltaY;
614
+ if (direction === "left" || direction === "right") {
615
+ return isDeltaX && deltaX > threshold;
616
+ } else {
617
+ return !isDeltaX && deltaY > threshold;
618
+ }
619
+ };
620
+ function useNextFrame(callback = () => {
621
+ }) {
622
+ const fn = useCallbackRef(callback);
623
+ useLayoutEffect2(() => {
624
+ let raf1 = 0;
625
+ let raf2 = 0;
626
+ raf1 = window.requestAnimationFrame(() => raf2 = window.requestAnimationFrame(fn));
627
+ return () => {
628
+ window.cancelAnimationFrame(raf1);
629
+ window.cancelAnimationFrame(raf2);
630
+ };
631
+ }, [fn]);
632
+ }
633
+ function isHTMLElement(node) {
634
+ return node.nodeType === node.ELEMENT_NODE;
635
+ }
636
+ function getTabbableCandidates(container) {
637
+ const nodes = [];
638
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
639
+ acceptNode: (node) => {
640
+ const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
641
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
642
+ return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
643
+ }
644
+ });
645
+ while (walker.nextNode()) nodes.push(walker.currentNode);
646
+ return nodes;
647
+ }
648
+ function focusFirst(candidates) {
649
+ const previouslyFocusedElement = document.activeElement;
650
+ return candidates.some((candidate) => {
651
+ if (candidate === previouslyFocusedElement) return true;
652
+ candidate.focus();
653
+ return document.activeElement !== previouslyFocusedElement;
654
+ });
655
+ }
656
+ var Provider = ToastProvider;
657
+ var Viewport = ToastViewport;
658
+ var Root2 = Toast;
659
+ var Title = ToastTitle;
660
+ var Description = ToastDescription;
661
+ var Action = ToastAction;
662
+ var Close = ToastClose;
663
+ export {
664
+ Action,
665
+ Close,
666
+ Description,
667
+ Provider,
668
+ Root2 as Root,
669
+ Title,
670
+ Toast,
671
+ ToastAction,
672
+ ToastClose,
673
+ ToastDescription,
674
+ ToastProvider,
675
+ ToastTitle,
676
+ ToastViewport,
677
+ Viewport,
678
+ createToastScope
679
+ };
680
+ //# sourceMappingURL=@radix-ui_react-toast.js.map
frontend/node_modules/.vite/deps/@radix-ui_react-toast.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../@radix-ui/react-toast/src/toast.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { createContextScope } from '@radix-ui/react-context';\nimport * as DismissableLayer from '@radix-ui/react-dismissable-layer';\nimport { Portal } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive, dispatchDiscreteCustomEvent } from '@radix-ui/react-primitive';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * ToastProvider\n * -----------------------------------------------------------------------------------------------*/\n\nconst PROVIDER_NAME = 'ToastProvider';\n\nconst [Collection, useCollection, createCollectionScope] = createCollection<ToastElement>('Toast');\n\ntype SwipeDirection = 'up' | 'down' | 'left' | 'right';\ntype ToastProviderContextValue = {\n label: string;\n duration: number;\n swipeDirection: SwipeDirection;\n swipeThreshold: number;\n toastCount: number;\n viewport: ToastViewportElement | null;\n onViewportChange(viewport: ToastViewportElement): void;\n onToastAdd(): void;\n onToastRemove(): void;\n isFocusedToastEscapeKeyDownRef: React.MutableRefObject<boolean>;\n isClosePausedRef: React.MutableRefObject<boolean>;\n};\n\ntype ScopedProps<P> = P & { __scopeToast?: Scope };\nconst [createToastContext, createToastScope] = createContextScope('Toast', [createCollectionScope]);\nconst [ToastProviderProvider, useToastProviderContext] =\n createToastContext<ToastProviderContextValue>(PROVIDER_NAME);\n\ninterface ToastProviderProps {\n children?: React.ReactNode;\n /**\n * An author-localized label for each toast. Used to help screen reader users\n * associate the interruption with a toast.\n * @defaultValue 'Notification'\n */\n label?: string;\n /**\n * Time in milliseconds that each toast should remain visible for.\n * @defaultValue 5000\n */\n duration?: number;\n /**\n * Direction of pointer swipe that should close the toast.\n * @defaultValue 'right'\n */\n swipeDirection?: SwipeDirection;\n /**\n * Distance in pixels that the swipe must pass before a close is triggered.\n * @defaultValue 50\n */\n swipeThreshold?: number;\n}\n\nconst ToastProvider: React.FC<ToastProviderProps> = (props: ScopedProps<ToastProviderProps>) => {\n const {\n __scopeToast,\n label = 'Notification',\n duration = 5000,\n swipeDirection = 'right',\n swipeThreshold = 50,\n children,\n } = props;\n const [viewport, setViewport] = React.useState<ToastViewportElement | null>(null);\n const [toastCount, setToastCount] = React.useState(0);\n const isFocusedToastEscapeKeyDownRef = React.useRef(false);\n const isClosePausedRef = React.useRef(false);\n\n if (!label.trim()) {\n console.error(\n `Invalid prop \\`label\\` supplied to \\`${PROVIDER_NAME}\\`. Expected non-empty \\`string\\`.`\n );\n }\n\n return (\n <Collection.Provider scope={__scopeToast}>\n <ToastProviderProvider\n scope={__scopeToast}\n label={label}\n duration={duration}\n swipeDirection={swipeDirection}\n swipeThreshold={swipeThreshold}\n toastCount={toastCount}\n viewport={viewport}\n onViewportChange={setViewport}\n onToastAdd={React.useCallback(() => setToastCount((prevCount) => prevCount + 1), [])}\n onToastRemove={React.useCallback(() => setToastCount((prevCount) => prevCount - 1), [])}\n isFocusedToastEscapeKeyDownRef={isFocusedToastEscapeKeyDownRef}\n isClosePausedRef={isClosePausedRef}\n >\n {children}\n </ToastProviderProvider>\n </Collection.Provider>\n );\n};\n\nToastProvider.displayName = PROVIDER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToastViewport\n * -----------------------------------------------------------------------------------------------*/\n\nconst VIEWPORT_NAME = 'ToastViewport';\nconst VIEWPORT_DEFAULT_HOTKEY = ['F8'];\nconst VIEWPORT_PAUSE = 'toast.viewportPause';\nconst VIEWPORT_RESUME = 'toast.viewportResume';\n\ntype ToastViewportElement = React.ComponentRef<typeof Primitive.ol>;\ntype PrimitiveOrderedListProps = React.ComponentPropsWithoutRef<typeof Primitive.ol>;\ninterface ToastViewportProps extends PrimitiveOrderedListProps {\n /**\n * The keys to use as the keyboard shortcut that will move focus to the toast viewport.\n * @defaultValue ['F8']\n */\n hotkey?: string[];\n /**\n * An author-localized label for the toast viewport to provide context for screen reader users\n * when navigating page landmarks. The available `{hotkey}` placeholder will be replaced for you.\n * @defaultValue 'Notifications ({hotkey})'\n */\n label?: string;\n}\n\nconst ToastViewport = React.forwardRef<ToastViewportElement, ToastViewportProps>(\n (props: ScopedProps<ToastViewportProps>, forwardedRef) => {\n const {\n __scopeToast,\n hotkey = VIEWPORT_DEFAULT_HOTKEY,\n label = 'Notifications ({hotkey})',\n ...viewportProps\n } = props;\n const context = useToastProviderContext(VIEWPORT_NAME, __scopeToast);\n const getItems = useCollection(__scopeToast);\n const wrapperRef = React.useRef<HTMLDivElement>(null);\n const headFocusProxyRef = React.useRef<FocusProxyElement>(null);\n const tailFocusProxyRef = React.useRef<FocusProxyElement>(null);\n const ref = React.useRef<ToastViewportElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);\n const hotkeyLabel = hotkey.join('+').replace(/Key/g, '').replace(/Digit/g, '');\n const hasToasts = context.toastCount > 0;\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n // we use `event.code` as it is consistent regardless of meta keys that were pressed.\n // for example, `event.key` for `Control+Alt+t` is `\u2020` and `t !== \u2020`\n const isHotkeyPressed =\n hotkey.length !== 0 && hotkey.every((key) => (event as any)[key] || event.code === key);\n if (isHotkeyPressed) ref.current?.focus();\n };\n document.addEventListener('keydown', handleKeyDown);\n return () => document.removeEventListener('keydown', handleKeyDown);\n }, [hotkey]);\n\n React.useEffect(() => {\n const wrapper = wrapperRef.current;\n const viewport = ref.current;\n if (hasToasts && wrapper && viewport) {\n const handlePause = () => {\n if (!context.isClosePausedRef.current) {\n const pauseEvent = new CustomEvent(VIEWPORT_PAUSE);\n viewport.dispatchEvent(pauseEvent);\n context.isClosePausedRef.current = true;\n }\n };\n\n const handleResume = () => {\n if (context.isClosePausedRef.current) {\n const resumeEvent = new CustomEvent(VIEWPORT_RESUME);\n viewport.dispatchEvent(resumeEvent);\n context.isClosePausedRef.current = false;\n }\n };\n\n const handleFocusOutResume = (event: FocusEvent) => {\n const isFocusMovingOutside = !wrapper.contains(event.relatedTarget as HTMLElement);\n if (isFocusMovingOutside) handleResume();\n };\n\n const handlePointerLeaveResume = () => {\n const isFocusInside = wrapper.contains(document.activeElement);\n if (!isFocusInside) handleResume();\n };\n\n // Toasts are not in the viewport React tree so we need to bind DOM events\n wrapper.addEventListener('focusin', handlePause);\n wrapper.addEventListener('focusout', handleFocusOutResume);\n wrapper.addEventListener('pointermove', handlePause);\n wrapper.addEventListener('pointerleave', handlePointerLeaveResume);\n window.addEventListener('blur', handlePause);\n window.addEventListener('focus', handleResume);\n return () => {\n wrapper.removeEventListener('focusin', handlePause);\n wrapper.removeEventListener('focusout', handleFocusOutResume);\n wrapper.removeEventListener('pointermove', handlePause);\n wrapper.removeEventListener('pointerleave', handlePointerLeaveResume);\n window.removeEventListener('blur', handlePause);\n window.removeEventListener('focus', handleResume);\n };\n }\n }, [hasToasts, context.isClosePausedRef]);\n\n const getSortedTabbableCandidates = React.useCallback(\n ({ tabbingDirection }: { tabbingDirection: 'forwards' | 'backwards' }) => {\n const toastItems = getItems();\n const tabbableCandidates = toastItems.map((toastItem) => {\n const toastNode = toastItem.ref.current!;\n const toastTabbableCandidates = [toastNode, ...getTabbableCandidates(toastNode)];\n return tabbingDirection === 'forwards'\n ? toastTabbableCandidates\n : toastTabbableCandidates.reverse();\n });\n return (\n tabbingDirection === 'forwards' ? tabbableCandidates.reverse() : tabbableCandidates\n ).flat();\n },\n [getItems]\n );\n\n React.useEffect(() => {\n const viewport = ref.current;\n // We programmatically manage tabbing as we are unable to influence\n // the source order with portals, this allows us to reverse the\n // tab order so that it runs from most recent toast to least\n if (viewport) {\n const handleKeyDown = (event: KeyboardEvent) => {\n const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;\n const isTabKey = event.key === 'Tab' && !isMetaKey;\n\n if (isTabKey) {\n const focusedElement = document.activeElement;\n const isTabbingBackwards = event.shiftKey;\n const targetIsViewport = event.target === viewport;\n\n // If we're back tabbing after jumping to the viewport then we simply\n // proxy focus out to the preceding document\n if (targetIsViewport && isTabbingBackwards) {\n headFocusProxyRef.current?.focus();\n return;\n }\n\n const tabbingDirection = isTabbingBackwards ? 'backwards' : 'forwards';\n const sortedCandidates = getSortedTabbableCandidates({ tabbingDirection });\n const index = sortedCandidates.findIndex((candidate) => candidate === focusedElement);\n if (focusFirst(sortedCandidates.slice(index + 1))) {\n event.preventDefault();\n } else {\n // If we can't focus that means we're at the edges so we\n // proxy to the corresponding exit point and let the browser handle\n // tab/shift+tab keypress and implicitly pass focus to the next valid element in the document\n isTabbingBackwards\n ? headFocusProxyRef.current?.focus()\n : tailFocusProxyRef.current?.focus();\n }\n }\n };\n\n // Toasts are not in the viewport React tree so we need to bind DOM events\n viewport.addEventListener('keydown', handleKeyDown);\n return () => viewport.removeEventListener('keydown', handleKeyDown);\n }\n }, [getItems, getSortedTabbableCandidates]);\n\n return (\n <DismissableLayer.Branch\n ref={wrapperRef}\n role=\"region\"\n aria-label={label.replace('{hotkey}', hotkeyLabel)}\n // Ensure virtual cursor from landmarks menus triggers focus/blur for pause/resume\n tabIndex={-1}\n // incase list has size when empty (e.g. padding), we remove pointer events so\n // it doesn't prevent interactions with page elements that it overlays\n style={{ pointerEvents: hasToasts ? undefined : 'none' }}\n >\n {hasToasts && (\n <FocusProxy\n ref={headFocusProxyRef}\n onFocusFromOutsideViewport={() => {\n const tabbableCandidates = getSortedTabbableCandidates({\n tabbingDirection: 'forwards',\n });\n focusFirst(tabbableCandidates);\n }}\n />\n )}\n {/**\n * tabindex on the the list so that it can be focused when items are removed. we focus\n * the list instead of the viewport so it announces number of items remaining.\n */}\n <Collection.Slot scope={__scopeToast}>\n <Primitive.ol tabIndex={-1} {...viewportProps} ref={composedRefs} />\n </Collection.Slot>\n {hasToasts && (\n <FocusProxy\n ref={tailFocusProxyRef}\n onFocusFromOutsideViewport={() => {\n const tabbableCandidates = getSortedTabbableCandidates({\n tabbingDirection: 'backwards',\n });\n focusFirst(tabbableCandidates);\n }}\n />\n )}\n </DismissableLayer.Branch>\n );\n }\n);\n\nToastViewport.displayName = VIEWPORT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst FOCUS_PROXY_NAME = 'ToastFocusProxy';\n\ntype FocusProxyElement = React.ComponentRef<typeof VisuallyHidden>;\ntype VisuallyHiddenProps = React.ComponentPropsWithoutRef<typeof VisuallyHidden>;\ninterface FocusProxyProps extends VisuallyHiddenProps {\n onFocusFromOutsideViewport(): void;\n}\n\nconst FocusProxy = React.forwardRef<FocusProxyElement, ScopedProps<FocusProxyProps>>(\n (props, forwardedRef) => {\n const { __scopeToast, onFocusFromOutsideViewport, ...proxyProps } = props;\n const context = useToastProviderContext(FOCUS_PROXY_NAME, __scopeToast);\n\n return (\n <VisuallyHidden\n aria-hidden\n tabIndex={0}\n {...proxyProps}\n ref={forwardedRef}\n // Avoid page scrolling when focus is on the focus proxy\n style={{ position: 'fixed' }}\n onFocus={(event) => {\n const prevFocusedElement = event.relatedTarget as HTMLElement | null;\n const isFocusFromOutsideViewport = !context.viewport?.contains(prevFocusedElement);\n if (isFocusFromOutsideViewport) onFocusFromOutsideViewport();\n }}\n />\n );\n }\n);\n\nFocusProxy.displayName = FOCUS_PROXY_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * Toast\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOAST_NAME = 'Toast';\nconst TOAST_SWIPE_START = 'toast.swipeStart';\nconst TOAST_SWIPE_MOVE = 'toast.swipeMove';\nconst TOAST_SWIPE_CANCEL = 'toast.swipeCancel';\nconst TOAST_SWIPE_END = 'toast.swipeEnd';\n\ntype ToastElement = ToastImplElement;\ninterface ToastProps extends Omit<ToastImplProps, keyof ToastImplPrivateProps> {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst Toast = React.forwardRef<ToastElement, ToastProps>(\n (props: ScopedProps<ToastProps>, forwardedRef) => {\n const { forceMount, open: openProp, defaultOpen, onOpenChange, ...toastProps } = props;\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? true,\n onChange: onOpenChange,\n caller: TOAST_NAME,\n });\n return (\n <Presence present={forceMount || open}>\n <ToastImpl\n open={open}\n {...toastProps}\n ref={forwardedRef}\n onClose={() => setOpen(false)}\n onPause={useCallbackRef(props.onPause)}\n onResume={useCallbackRef(props.onResume)}\n onSwipeStart={composeEventHandlers(props.onSwipeStart, (event) => {\n event.currentTarget.setAttribute('data-swipe', 'start');\n })}\n onSwipeMove={composeEventHandlers(props.onSwipeMove, (event) => {\n const { x, y } = event.detail.delta;\n event.currentTarget.setAttribute('data-swipe', 'move');\n event.currentTarget.style.setProperty('--radix-toast-swipe-move-x', `${x}px`);\n event.currentTarget.style.setProperty('--radix-toast-swipe-move-y', `${y}px`);\n })}\n onSwipeCancel={composeEventHandlers(props.onSwipeCancel, (event) => {\n event.currentTarget.setAttribute('data-swipe', 'cancel');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-move-x');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-move-y');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-end-x');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-end-y');\n })}\n onSwipeEnd={composeEventHandlers(props.onSwipeEnd, (event) => {\n const { x, y } = event.detail.delta;\n event.currentTarget.setAttribute('data-swipe', 'end');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-move-x');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-move-y');\n event.currentTarget.style.setProperty('--radix-toast-swipe-end-x', `${x}px`);\n event.currentTarget.style.setProperty('--radix-toast-swipe-end-y', `${y}px`);\n setOpen(false);\n })}\n />\n </Presence>\n );\n }\n);\n\nToast.displayName = TOAST_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype SwipeEvent = { currentTarget: EventTarget & ToastElement } & Omit<\n CustomEvent<{ originalEvent: React.PointerEvent; delta: { x: number; y: number } }>,\n 'currentTarget'\n>;\n\nconst [ToastInteractiveProvider, useToastInteractiveContext] = createToastContext(TOAST_NAME, {\n onClose() {},\n});\n\ntype ToastImplElement = React.ComponentRef<typeof Primitive.li>;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer.Root>;\ntype ToastImplPrivateProps = { open: boolean; onClose(): void };\ntype PrimitiveListItemProps = React.ComponentPropsWithoutRef<typeof Primitive.li>;\ninterface ToastImplProps extends ToastImplPrivateProps, PrimitiveListItemProps {\n type?: 'foreground' | 'background';\n /**\n * Time in milliseconds that toast should remain visible for. Overrides value\n * given to `ToastProvider`.\n */\n duration?: number;\n onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];\n onPause?(): void;\n onResume?(): void;\n onSwipeStart?(event: SwipeEvent): void;\n onSwipeMove?(event: SwipeEvent): void;\n onSwipeCancel?(event: SwipeEvent): void;\n onSwipeEnd?(event: SwipeEvent): void;\n}\n\nconst ToastImpl = React.forwardRef<ToastImplElement, ToastImplProps>(\n (props: ScopedProps<ToastImplProps>, forwardedRef) => {\n const {\n __scopeToast,\n type = 'foreground',\n duration: durationProp,\n open,\n onClose,\n onEscapeKeyDown,\n onPause,\n onResume,\n onSwipeStart,\n onSwipeMove,\n onSwipeCancel,\n onSwipeEnd,\n ...toastProps\n } = props;\n const context = useToastProviderContext(TOAST_NAME, __scopeToast);\n const [node, setNode] = React.useState<ToastImplElement | null>(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setNode(node));\n const pointerStartRef = React.useRef<{ x: number; y: number } | null>(null);\n const swipeDeltaRef = React.useRef<{ x: number; y: number } | null>(null);\n const duration = durationProp || context.duration;\n const closeTimerStartTimeRef = React.useRef(0);\n const closeTimerRemainingTimeRef = React.useRef(duration);\n const closeTimerRef = React.useRef(0);\n const { onToastAdd, onToastRemove } = context;\n const handleClose = useCallbackRef(() => {\n // focus viewport if focus is within toast to read the remaining toast\n // count to SR users and ensure focus isn't lost\n const isFocusInToast = node?.contains(document.activeElement);\n if (isFocusInToast) context.viewport?.focus();\n onClose();\n });\n\n const startTimer = React.useCallback(\n (duration: number) => {\n if (!duration || duration === Infinity) return;\n window.clearTimeout(closeTimerRef.current);\n closeTimerStartTimeRef.current = new Date().getTime();\n closeTimerRef.current = window.setTimeout(handleClose, duration);\n },\n [handleClose]\n );\n\n React.useEffect(() => {\n const viewport = context.viewport;\n if (viewport) {\n const handleResume = () => {\n startTimer(closeTimerRemainingTimeRef.current);\n onResume?.();\n };\n const handlePause = () => {\n const elapsedTime = new Date().getTime() - closeTimerStartTimeRef.current;\n closeTimerRemainingTimeRef.current = closeTimerRemainingTimeRef.current - elapsedTime;\n window.clearTimeout(closeTimerRef.current);\n onPause?.();\n };\n viewport.addEventListener(VIEWPORT_PAUSE, handlePause);\n viewport.addEventListener(VIEWPORT_RESUME, handleResume);\n return () => {\n viewport.removeEventListener(VIEWPORT_PAUSE, handlePause);\n viewport.removeEventListener(VIEWPORT_RESUME, handleResume);\n };\n }\n }, [context.viewport, duration, onPause, onResume, startTimer]);\n\n // start timer when toast opens or duration changes.\n // we include `open` in deps because closed !== unmounted when animating\n // so it could reopen before being completely unmounted\n React.useEffect(() => {\n if (open && !context.isClosePausedRef.current) startTimer(duration);\n }, [open, duration, context.isClosePausedRef, startTimer]);\n\n React.useEffect(() => {\n onToastAdd();\n return () => onToastRemove();\n }, [onToastAdd, onToastRemove]);\n\n const announceTextContent = React.useMemo(() => {\n return node ? getAnnounceTextContent(node) : null;\n }, [node]);\n\n if (!context.viewport) return null;\n\n return (\n <>\n {announceTextContent && (\n <ToastAnnounce\n __scopeToast={__scopeToast}\n // Toasts are always role=status to avoid stuttering issues with role=alert in SRs.\n role=\"status\"\n aria-live={type === 'foreground' ? 'assertive' : 'polite'}\n aria-atomic\n >\n {announceTextContent}\n </ToastAnnounce>\n )}\n\n <ToastInteractiveProvider scope={__scopeToast} onClose={handleClose}>\n {ReactDOM.createPortal(\n <Collection.ItemSlot scope={__scopeToast}>\n <DismissableLayer.Root\n asChild\n onEscapeKeyDown={composeEventHandlers(onEscapeKeyDown, () => {\n if (!context.isFocusedToastEscapeKeyDownRef.current) handleClose();\n context.isFocusedToastEscapeKeyDownRef.current = false;\n })}\n >\n <Primitive.li\n // Ensure toasts are announced as status list or status when focused\n role=\"status\"\n aria-live=\"off\"\n aria-atomic\n tabIndex={0}\n data-state={open ? 'open' : 'closed'}\n data-swipe-direction={context.swipeDirection}\n {...toastProps}\n ref={composedRefs}\n style={{ userSelect: 'none', touchAction: 'none', ...props.style }}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key !== 'Escape') return;\n onEscapeKeyDown?.(event.nativeEvent);\n if (!event.nativeEvent.defaultPrevented) {\n context.isFocusedToastEscapeKeyDownRef.current = true;\n handleClose();\n }\n })}\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\n if (event.button !== 0) return;\n pointerStartRef.current = { x: event.clientX, y: event.clientY };\n })}\n onPointerMove={composeEventHandlers(props.onPointerMove, (event) => {\n if (!pointerStartRef.current) return;\n const x = event.clientX - pointerStartRef.current.x;\n const y = event.clientY - pointerStartRef.current.y;\n const hasSwipeMoveStarted = Boolean(swipeDeltaRef.current);\n const isHorizontalSwipe = ['left', 'right'].includes(context.swipeDirection);\n const clamp = ['left', 'up'].includes(context.swipeDirection)\n ? Math.min\n : Math.max;\n const clampedX = isHorizontalSwipe ? clamp(0, x) : 0;\n const clampedY = !isHorizontalSwipe ? clamp(0, y) : 0;\n const moveStartBuffer = event.pointerType === 'touch' ? 10 : 2;\n const delta = { x: clampedX, y: clampedY };\n const eventDetail = { originalEvent: event, delta };\n if (hasSwipeMoveStarted) {\n swipeDeltaRef.current = delta;\n handleAndDispatchCustomEvent(TOAST_SWIPE_MOVE, onSwipeMove, eventDetail, {\n discrete: false,\n });\n } else if (isDeltaInDirection(delta, context.swipeDirection, moveStartBuffer)) {\n swipeDeltaRef.current = delta;\n handleAndDispatchCustomEvent(TOAST_SWIPE_START, onSwipeStart, eventDetail, {\n discrete: false,\n });\n (event.target as HTMLElement).setPointerCapture(event.pointerId);\n } else if (Math.abs(x) > moveStartBuffer || Math.abs(y) > moveStartBuffer) {\n // User is swiping in wrong direction so we disable swipe gesture\n // for the current pointer down interaction\n pointerStartRef.current = null;\n }\n })}\n onPointerUp={composeEventHandlers(props.onPointerUp, (event) => {\n const delta = swipeDeltaRef.current;\n const target = event.target as HTMLElement;\n if (target.hasPointerCapture(event.pointerId)) {\n target.releasePointerCapture(event.pointerId);\n }\n swipeDeltaRef.current = null;\n pointerStartRef.current = null;\n if (delta) {\n const toast = event.currentTarget;\n const eventDetail = { originalEvent: event, delta };\n if (\n isDeltaInDirection(delta, context.swipeDirection, context.swipeThreshold)\n ) {\n handleAndDispatchCustomEvent(TOAST_SWIPE_END, onSwipeEnd, eventDetail, {\n discrete: true,\n });\n } else {\n handleAndDispatchCustomEvent(\n TOAST_SWIPE_CANCEL,\n onSwipeCancel,\n eventDetail,\n {\n discrete: true,\n }\n );\n }\n // Prevent click event from triggering on items within the toast when\n // pointer up is part of a swipe gesture\n toast.addEventListener('click', (event) => event.preventDefault(), {\n once: true,\n });\n }\n })}\n />\n </DismissableLayer.Root>\n </Collection.ItemSlot>,\n context.viewport\n )}\n </ToastInteractiveProvider>\n </>\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ninterface ToastAnnounceProps\n extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'>,\n ScopedProps<{ children: string[] }> {}\n\nconst ToastAnnounce: React.FC<ToastAnnounceProps> = (props: ScopedProps<ToastAnnounceProps>) => {\n const { __scopeToast, children, ...announceProps } = props;\n const context = useToastProviderContext(TOAST_NAME, __scopeToast);\n const [renderAnnounceText, setRenderAnnounceText] = React.useState(false);\n const [isAnnounced, setIsAnnounced] = React.useState(false);\n\n // render text content in the next frame to ensure toast is announced in NVDA\n useNextFrame(() => setRenderAnnounceText(true));\n\n // cleanup after announcing\n React.useEffect(() => {\n const timer = window.setTimeout(() => setIsAnnounced(true), 1000);\n return () => window.clearTimeout(timer);\n }, []);\n\n return isAnnounced ? null : (\n <Portal asChild>\n <VisuallyHidden {...announceProps}>\n {renderAnnounceText && (\n <>\n {context.label} {children}\n </>\n )}\n </VisuallyHidden>\n </Portal>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ToastTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'ToastTitle';\n\ntype ToastTitleElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface ToastTitleProps extends PrimitiveDivProps {}\n\nconst ToastTitle = React.forwardRef<ToastTitleElement, ToastTitleProps>(\n (props: ScopedProps<ToastTitleProps>, forwardedRef) => {\n const { __scopeToast, ...titleProps } = props;\n return <Primitive.div {...titleProps} ref={forwardedRef} />;\n }\n);\n\nToastTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToastDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'ToastDescription';\n\ntype ToastDescriptionElement = React.ComponentRef<typeof Primitive.div>;\ninterface ToastDescriptionProps extends PrimitiveDivProps {}\n\nconst ToastDescription = React.forwardRef<ToastDescriptionElement, ToastDescriptionProps>(\n (props: ScopedProps<ToastDescriptionProps>, forwardedRef) => {\n const { __scopeToast, ...descriptionProps } = props;\n return <Primitive.div {...descriptionProps} ref={forwardedRef} />;\n }\n);\n\nToastDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToastAction\n * -----------------------------------------------------------------------------------------------*/\n\nconst ACTION_NAME = 'ToastAction';\n\ntype ToastActionElement = ToastCloseElement;\ninterface ToastActionProps extends ToastCloseProps {\n /**\n * A short description for an alternate way to carry out the action. For screen reader users\n * who will not be able to navigate to the button easily/quickly.\n * @example <ToastAction altText=\"Goto account settings to upgrade\">Upgrade</ToastAction>\n * @example <ToastAction altText=\"Undo (Alt+U)\">Undo</ToastAction>\n */\n altText: string;\n}\n\nconst ToastAction = React.forwardRef<ToastActionElement, ToastActionProps>(\n (props: ScopedProps<ToastActionProps>, forwardedRef) => {\n const { altText, ...actionProps } = props;\n\n if (!altText.trim()) {\n console.error(\n `Invalid prop \\`altText\\` supplied to \\`${ACTION_NAME}\\`. Expected non-empty \\`string\\`.`\n );\n return null;\n }\n\n return (\n <ToastAnnounceExclude altText={altText} asChild>\n <ToastClose {...actionProps} ref={forwardedRef} />\n </ToastAnnounceExclude>\n );\n }\n);\n\nToastAction.displayName = ACTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToastClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'ToastClose';\n\ntype ToastCloseElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface ToastCloseProps extends PrimitiveButtonProps {}\n\nconst ToastClose = React.forwardRef<ToastCloseElement, ToastCloseProps>(\n (props: ScopedProps<ToastCloseProps>, forwardedRef) => {\n const { __scopeToast, ...closeProps } = props;\n const interactiveContext = useToastInteractiveContext(CLOSE_NAME, __scopeToast);\n\n return (\n <ToastAnnounceExclude asChild>\n <Primitive.button\n type=\"button\"\n {...closeProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, interactiveContext.onClose)}\n />\n </ToastAnnounceExclude>\n );\n }\n);\n\nToastClose.displayName = CLOSE_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype ToastAnnounceExcludeElement = React.ComponentRef<typeof Primitive.div>;\ninterface ToastAnnounceExcludeProps extends PrimitiveDivProps {\n altText?: string;\n}\n\nconst ToastAnnounceExclude = React.forwardRef<\n ToastAnnounceExcludeElement,\n ToastAnnounceExcludeProps\n>((props: ScopedProps<ToastAnnounceExcludeProps>, forwardedRef) => {\n const { __scopeToast, altText, ...announceExcludeProps } = props;\n\n return (\n <Primitive.div\n data-radix-toast-announce-exclude=\"\"\n data-radix-toast-announce-alt={altText || undefined}\n {...announceExcludeProps}\n ref={forwardedRef}\n />\n );\n});\n\nfunction getAnnounceTextContent(container: HTMLElement) {\n const textContent: string[] = [];\n const childNodes = Array.from(container.childNodes);\n\n childNodes.forEach((node) => {\n if (node.nodeType === node.TEXT_NODE && node.textContent) textContent.push(node.textContent);\n if (isHTMLElement(node)) {\n const isHidden = node.ariaHidden || node.hidden || node.style.display === 'none';\n const isExcluded = node.dataset.radixToastAnnounceExclude === '';\n\n if (!isHidden) {\n if (isExcluded) {\n const altText = node.dataset.radixToastAnnounceAlt;\n if (altText) textContent.push(altText);\n } else {\n textContent.push(...getAnnounceTextContent(node));\n }\n }\n }\n });\n\n // We return a collection of text rather than a single concatenated string.\n // This allows SR VO to naturally pause break between nodes while announcing.\n return textContent;\n}\n\n/* ---------------------------------------------------------------------------------------------- */\n\nfunction handleAndDispatchCustomEvent<\n E extends CustomEvent,\n ReactEvent extends React.SyntheticEvent,\n>(\n name: string,\n handler: ((event: E) => void) | undefined,\n detail: { originalEvent: ReactEvent } & (E extends CustomEvent<infer D> ? D : never),\n { discrete }: { discrete: boolean }\n) {\n const currentTarget = detail.originalEvent.currentTarget as HTMLElement;\n const event = new CustomEvent(name, { bubbles: true, cancelable: true, detail });\n if (handler) currentTarget.addEventListener(name, handler as EventListener, { once: true });\n\n if (discrete) {\n dispatchDiscreteCustomEvent(currentTarget, event);\n } else {\n currentTarget.dispatchEvent(event);\n }\n}\n\nconst isDeltaInDirection = (\n delta: { x: number; y: number },\n direction: SwipeDirection,\n threshold = 0\n) => {\n const deltaX = Math.abs(delta.x);\n const deltaY = Math.abs(delta.y);\n const isDeltaX = deltaX > deltaY;\n if (direction === 'left' || direction === 'right') {\n return isDeltaX && deltaX > threshold;\n } else {\n return !isDeltaX && deltaY > threshold;\n }\n};\n\nfunction useNextFrame(callback = () => {}) {\n const fn = useCallbackRef(callback);\n useLayoutEffect(() => {\n let raf1 = 0;\n let raf2 = 0;\n raf1 = window.requestAnimationFrame(() => (raf2 = window.requestAnimationFrame(fn)));\n return () => {\n window.cancelAnimationFrame(raf1);\n window.cancelAnimationFrame(raf2);\n };\n }, [fn]);\n}\n\nfunction isHTMLElement(node: any): node is HTMLElement {\n return node.nodeType === node.ELEMENT_NODE;\n}\n\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */\nfunction getTabbableCandidates(container: HTMLElement) {\n const nodes: HTMLElement[] = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node: any) => {\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n });\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement);\n // we do not take into account the order of nodes with positive `tabIndex` as it\n // hinders accessibility to have tab order different from visual order.\n return nodes;\n}\n\nfunction focusFirst(candidates: HTMLElement[]) {\n const previouslyFocusedElement = document.activeElement;\n return candidates.some((candidate) => {\n // if focus is already where we want to go, we don't want to keep going through the candidates\n if (candidate === previouslyFocusedElement) return true;\n candidate.focus();\n return document.activeElement !== previouslyFocusedElement;\n });\n}\n\nconst Provider = ToastProvider;\nconst Viewport = ToastViewport;\nconst Root = Toast;\nconst Title = ToastTitle;\nconst Description = ToastDescription;\nconst Action = ToastAction;\nconst Close = ToastClose;\n\nexport {\n createToastScope,\n //\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastAction,\n ToastClose,\n //\n Provider,\n Viewport,\n Root,\n Title,\n Description,\n Action,\n Close,\n};\nexport type {\n ToastProviderProps,\n ToastViewportProps,\n ToastProps,\n ToastTitleProps,\n ToastDescriptionProps,\n ToastActionProps,\n ToastCloseProps,\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "hash": "0436da1a",
3
+ "configHash": "26c593e6",
4
+ "lockfileHash": "720af8a3",
5
+ "browserHash": "f1ed7398",
6
+ "optimized": {
7
+ "react": {
8
+ "src": "../../react/index.js",
9
+ "file": "react.js",
10
+ "fileHash": "32895016",
11
+ "needsInterop": true
12
+ },
13
+ "react-dom": {
14
+ "src": "../../react-dom/index.js",
15
+ "file": "react-dom.js",
16
+ "fileHash": "8bd80abc",
17
+ "needsInterop": true
18
+ },
19
+ "react/jsx-dev-runtime": {
20
+ "src": "../../react/jsx-dev-runtime.js",
21
+ "file": "react_jsx-dev-runtime.js",
22
+ "fileHash": "7c0b5d45",
23
+ "needsInterop": true
24
+ },
25
+ "react/jsx-runtime": {
26
+ "src": "../../react/jsx-runtime.js",
27
+ "file": "react_jsx-runtime.js",
28
+ "fileHash": "0035a443",
29
+ "needsInterop": true
30
+ },
31
+ "@hookform/resolvers/zod": {
32
+ "src": "../../@hookform/resolvers/zod/dist/zod.mjs",
33
+ "file": "@hookform_resolvers_zod.js",
34
+ "fileHash": "c7b41307",
35
+ "needsInterop": false
36
+ },
37
+ "@radix-ui/react-alert-dialog": {
38
+ "src": "../../@radix-ui/react-alert-dialog/dist/index.mjs",
39
+ "file": "@radix-ui_react-alert-dialog.js",
40
+ "fileHash": "9fdf48f7",
41
+ "needsInterop": false
42
+ },
43
+ "@radix-ui/react-checkbox": {
44
+ "src": "../../@radix-ui/react-checkbox/dist/index.mjs",
45
+ "file": "@radix-ui_react-checkbox.js",
46
+ "fileHash": "1d7762b3",
47
+ "needsInterop": false
48
+ },
49
+ "@radix-ui/react-dialog": {
50
+ "src": "../../@radix-ui/react-dialog/dist/index.mjs",
51
+ "file": "@radix-ui_react-dialog.js",
52
+ "fileHash": "f10a3b27",
53
+ "needsInterop": false
54
+ },
55
+ "@radix-ui/react-label": {
56
+ "src": "../../@radix-ui/react-label/dist/index.mjs",
57
+ "file": "@radix-ui_react-label.js",
58
+ "fileHash": "24c9ee78",
59
+ "needsInterop": false
60
+ },
61
+ "@radix-ui/react-select": {
62
+ "src": "../../@radix-ui/react-select/dist/index.mjs",
63
+ "file": "@radix-ui_react-select.js",
64
+ "fileHash": "1159b8c1",
65
+ "needsInterop": false
66
+ },
67
+ "@radix-ui/react-slot": {
68
+ "src": "../../@radix-ui/react-slot/dist/index.mjs",
69
+ "file": "@radix-ui_react-slot.js",
70
+ "fileHash": "2b02d7fc",
71
+ "needsInterop": false
72
+ },
73
+ "@radix-ui/react-toast": {
74
+ "src": "../../@radix-ui/react-toast/dist/index.mjs",
75
+ "file": "@radix-ui_react-toast.js",
76
+ "fileHash": "28dc6a15",
77
+ "needsInterop": false
78
+ },
79
+ "class-variance-authority": {
80
+ "src": "../../class-variance-authority/dist/index.mjs",
81
+ "file": "class-variance-authority.js",
82
+ "fileHash": "79ee5f9b",
83
+ "needsInterop": false
84
+ },
85
+ "clsx": {
86
+ "src": "../../clsx/dist/clsx.mjs",
87
+ "file": "clsx.js",
88
+ "fileHash": "f5099a40",
89
+ "needsInterop": false
90
+ },
91
+ "lucide-react": {
92
+ "src": "../../lucide-react/dist/esm/lucide-react.js",
93
+ "file": "lucide-react.js",
94
+ "fileHash": "3d3c06ce",
95
+ "needsInterop": false
96
+ },
97
+ "react-dom/client": {
98
+ "src": "../../react-dom/client.js",
99
+ "file": "react-dom_client.js",
100
+ "fileHash": "98722ebb",
101
+ "needsInterop": true
102
+ },
103
+ "react-hook-form": {
104
+ "src": "../../react-hook-form/dist/index.esm.mjs",
105
+ "file": "react-hook-form.js",
106
+ "fileHash": "fa5837b6",
107
+ "needsInterop": false
108
+ },
109
+ "tailwind-merge": {
110
+ "src": "../../tailwind-merge/dist/bundle-mjs.mjs",
111
+ "file": "tailwind-merge.js",
112
+ "fileHash": "23e38e62",
113
+ "needsInterop": false
114
+ },
115
+ "zod": {
116
+ "src": "../../zod/dist/esm/index.js",
117
+ "file": "zod.js",
118
+ "fileHash": "5a958ce2",
119
+ "needsInterop": false
120
+ }
121
+ },
122
+ "chunks": {
123
+ "chunk-FF4LPVR2": {
124
+ "file": "chunk-FF4LPVR2.js"
125
+ },
126
+ "chunk-U7P2NEEE": {
127
+ "file": "chunk-U7P2NEEE.js"
128
+ },
129
+ "chunk-PVJESVH4": {
130
+ "file": "chunk-PVJESVH4.js"
131
+ },
132
+ "chunk-MBR23SFK": {
133
+ "file": "chunk-MBR23SFK.js"
134
+ },
135
+ "chunk-XET2JR3H": {
136
+ "file": "chunk-XET2JR3H.js"
137
+ },
138
+ "chunk-43NH6PDE": {
139
+ "file": "chunk-43NH6PDE.js"
140
+ },
141
+ "chunk-Y2CDDFKN": {
142
+ "file": "chunk-Y2CDDFKN.js"
143
+ },
144
+ "chunk-R4J6KICQ": {
145
+ "file": "chunk-R4J6KICQ.js"
146
+ },
147
+ "chunk-5XBW43HD": {
148
+ "file": "chunk-5XBW43HD.js"
149
+ },
150
+ "chunk-HMLLSKRK": {
151
+ "file": "chunk-HMLLSKRK.js"
152
+ },
153
+ "chunk-TLMPZXCM": {
154
+ "file": "chunk-TLMPZXCM.js"
155
+ },
156
+ "chunk-PJEEZAML": {
157
+ "file": "chunk-PJEEZAML.js"
158
+ },
159
+ "chunk-6PXSGDAH": {
160
+ "file": "chunk-6PXSGDAH.js"
161
+ },
162
+ "chunk-DRWLMN53": {
163
+ "file": "chunk-DRWLMN53.js"
164
+ },
165
+ "chunk-G3PMV62Z": {
166
+ "file": "chunk-G3PMV62Z.js"
167
+ }
168
+ }
169
+ }
frontend/node_modules/.vite/deps/chunk-43NH6PDE.js ADDED
@@ -0,0 +1,285 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ composeEventHandlers,
3
+ useLayoutEffect2
4
+ } from "./chunk-R4J6KICQ.js";
5
+ import {
6
+ Primitive,
7
+ dispatchDiscreteCustomEvent
8
+ } from "./chunk-HMLLSKRK.js";
9
+ import {
10
+ useComposedRefs
11
+ } from "./chunk-TLMPZXCM.js";
12
+ import {
13
+ require_react_dom
14
+ } from "./chunk-PJEEZAML.js";
15
+ import {
16
+ require_jsx_runtime
17
+ } from "./chunk-6PXSGDAH.js";
18
+ import {
19
+ require_react
20
+ } from "./chunk-DRWLMN53.js";
21
+ import {
22
+ __toESM
23
+ } from "./chunk-G3PMV62Z.js";
24
+
25
+ // node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
26
+ var React = __toESM(require_react(), 1);
27
+ function useCallbackRef(callback) {
28
+ const callbackRef = React.useRef(callback);
29
+ React.useEffect(() => {
30
+ callbackRef.current = callback;
31
+ });
32
+ return React.useMemo(() => (...args) => {
33
+ var _a;
34
+ return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
35
+ }, []);
36
+ }
37
+
38
+ // node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
39
+ var React3 = __toESM(require_react(), 1);
40
+
41
+ // node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
42
+ var React2 = __toESM(require_react(), 1);
43
+ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
44
+ const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
45
+ React2.useEffect(() => {
46
+ const handleKeyDown = (event) => {
47
+ if (event.key === "Escape") {
48
+ onEscapeKeyDown(event);
49
+ }
50
+ };
51
+ ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
52
+ return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
53
+ }, [onEscapeKeyDown, ownerDocument]);
54
+ }
55
+
56
+ // node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
57
+ var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
58
+ var DISMISSABLE_LAYER_NAME = "DismissableLayer";
59
+ var CONTEXT_UPDATE = "dismissableLayer.update";
60
+ var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
61
+ var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
62
+ var originalBodyPointerEvents;
63
+ var DismissableLayerContext = React3.createContext({
64
+ layers: /* @__PURE__ */ new Set(),
65
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
66
+ branches: /* @__PURE__ */ new Set()
67
+ });
68
+ var DismissableLayer = React3.forwardRef(
69
+ (props, forwardedRef) => {
70
+ const {
71
+ disableOutsidePointerEvents = false,
72
+ onEscapeKeyDown,
73
+ onPointerDownOutside,
74
+ onFocusOutside,
75
+ onInteractOutside,
76
+ onDismiss,
77
+ ...layerProps
78
+ } = props;
79
+ const context = React3.useContext(DismissableLayerContext);
80
+ const [node, setNode] = React3.useState(null);
81
+ const ownerDocument = (node == null ? void 0 : node.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document);
82
+ const [, force] = React3.useState({});
83
+ const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
84
+ const layers = Array.from(context.layers);
85
+ const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
86
+ const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
87
+ const index = node ? layers.indexOf(node) : -1;
88
+ const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
89
+ const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
90
+ const pointerDownOutside = usePointerDownOutside((event) => {
91
+ const target = event.target;
92
+ const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
93
+ if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
94
+ onPointerDownOutside == null ? void 0 : onPointerDownOutside(event);
95
+ onInteractOutside == null ? void 0 : onInteractOutside(event);
96
+ if (!event.defaultPrevented) onDismiss == null ? void 0 : onDismiss();
97
+ }, ownerDocument);
98
+ const focusOutside = useFocusOutside((event) => {
99
+ const target = event.target;
100
+ const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
101
+ if (isFocusInBranch) return;
102
+ onFocusOutside == null ? void 0 : onFocusOutside(event);
103
+ onInteractOutside == null ? void 0 : onInteractOutside(event);
104
+ if (!event.defaultPrevented) onDismiss == null ? void 0 : onDismiss();
105
+ }, ownerDocument);
106
+ useEscapeKeydown((event) => {
107
+ const isHighestLayer = index === context.layers.size - 1;
108
+ if (!isHighestLayer) return;
109
+ onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(event);
110
+ if (!event.defaultPrevented && onDismiss) {
111
+ event.preventDefault();
112
+ onDismiss();
113
+ }
114
+ }, ownerDocument);
115
+ React3.useEffect(() => {
116
+ if (!node) return;
117
+ if (disableOutsidePointerEvents) {
118
+ if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
119
+ originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
120
+ ownerDocument.body.style.pointerEvents = "none";
121
+ }
122
+ context.layersWithOutsidePointerEventsDisabled.add(node);
123
+ }
124
+ context.layers.add(node);
125
+ dispatchUpdate();
126
+ return () => {
127
+ if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
128
+ ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
129
+ }
130
+ };
131
+ }, [node, ownerDocument, disableOutsidePointerEvents, context]);
132
+ React3.useEffect(() => {
133
+ return () => {
134
+ if (!node) return;
135
+ context.layers.delete(node);
136
+ context.layersWithOutsidePointerEventsDisabled.delete(node);
137
+ dispatchUpdate();
138
+ };
139
+ }, [node, context]);
140
+ React3.useEffect(() => {
141
+ const handleUpdate = () => force({});
142
+ document.addEventListener(CONTEXT_UPDATE, handleUpdate);
143
+ return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
144
+ }, []);
145
+ return (0, import_jsx_runtime.jsx)(
146
+ Primitive.div,
147
+ {
148
+ ...layerProps,
149
+ ref: composedRefs,
150
+ style: {
151
+ pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
152
+ ...props.style
153
+ },
154
+ onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
155
+ onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
156
+ onPointerDownCapture: composeEventHandlers(
157
+ props.onPointerDownCapture,
158
+ pointerDownOutside.onPointerDownCapture
159
+ )
160
+ }
161
+ );
162
+ }
163
+ );
164
+ DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
165
+ var BRANCH_NAME = "DismissableLayerBranch";
166
+ var DismissableLayerBranch = React3.forwardRef((props, forwardedRef) => {
167
+ const context = React3.useContext(DismissableLayerContext);
168
+ const ref = React3.useRef(null);
169
+ const composedRefs = useComposedRefs(forwardedRef, ref);
170
+ React3.useEffect(() => {
171
+ const node = ref.current;
172
+ if (node) {
173
+ context.branches.add(node);
174
+ return () => {
175
+ context.branches.delete(node);
176
+ };
177
+ }
178
+ }, [context.branches]);
179
+ return (0, import_jsx_runtime.jsx)(Primitive.div, { ...props, ref: composedRefs });
180
+ });
181
+ DismissableLayerBranch.displayName = BRANCH_NAME;
182
+ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
183
+ const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
184
+ const isPointerInsideReactTreeRef = React3.useRef(false);
185
+ const handleClickRef = React3.useRef(() => {
186
+ });
187
+ React3.useEffect(() => {
188
+ const handlePointerDown = (event) => {
189
+ if (event.target && !isPointerInsideReactTreeRef.current) {
190
+ let handleAndDispatchPointerDownOutsideEvent2 = function() {
191
+ handleAndDispatchCustomEvent(
192
+ POINTER_DOWN_OUTSIDE,
193
+ handlePointerDownOutside,
194
+ eventDetail,
195
+ { discrete: true }
196
+ );
197
+ };
198
+ var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
199
+ const eventDetail = { originalEvent: event };
200
+ if (event.pointerType === "touch") {
201
+ ownerDocument.removeEventListener("click", handleClickRef.current);
202
+ handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
203
+ ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
204
+ } else {
205
+ handleAndDispatchPointerDownOutsideEvent2();
206
+ }
207
+ } else {
208
+ ownerDocument.removeEventListener("click", handleClickRef.current);
209
+ }
210
+ isPointerInsideReactTreeRef.current = false;
211
+ };
212
+ const timerId = window.setTimeout(() => {
213
+ ownerDocument.addEventListener("pointerdown", handlePointerDown);
214
+ }, 0);
215
+ return () => {
216
+ window.clearTimeout(timerId);
217
+ ownerDocument.removeEventListener("pointerdown", handlePointerDown);
218
+ ownerDocument.removeEventListener("click", handleClickRef.current);
219
+ };
220
+ }, [ownerDocument, handlePointerDownOutside]);
221
+ return {
222
+ // ensures we check React component tree (not just DOM tree)
223
+ onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
224
+ };
225
+ }
226
+ function useFocusOutside(onFocusOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
227
+ const handleFocusOutside = useCallbackRef(onFocusOutside);
228
+ const isFocusInsideReactTreeRef = React3.useRef(false);
229
+ React3.useEffect(() => {
230
+ const handleFocus = (event) => {
231
+ if (event.target && !isFocusInsideReactTreeRef.current) {
232
+ const eventDetail = { originalEvent: event };
233
+ handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
234
+ discrete: false
235
+ });
236
+ }
237
+ };
238
+ ownerDocument.addEventListener("focusin", handleFocus);
239
+ return () => ownerDocument.removeEventListener("focusin", handleFocus);
240
+ }, [ownerDocument, handleFocusOutside]);
241
+ return {
242
+ onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
243
+ onBlurCapture: () => isFocusInsideReactTreeRef.current = false
244
+ };
245
+ }
246
+ function dispatchUpdate() {
247
+ const event = new CustomEvent(CONTEXT_UPDATE);
248
+ document.dispatchEvent(event);
249
+ }
250
+ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
251
+ const target = detail.originalEvent.target;
252
+ const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
253
+ if (handler) target.addEventListener(name, handler, { once: true });
254
+ if (discrete) {
255
+ dispatchDiscreteCustomEvent(target, event);
256
+ } else {
257
+ target.dispatchEvent(event);
258
+ }
259
+ }
260
+ var Root = DismissableLayer;
261
+ var Branch = DismissableLayerBranch;
262
+
263
+ // node_modules/@radix-ui/react-portal/dist/index.mjs
264
+ var React4 = __toESM(require_react(), 1);
265
+ var import_react_dom = __toESM(require_react_dom(), 1);
266
+ var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
267
+ var PORTAL_NAME = "Portal";
268
+ var Portal = React4.forwardRef((props, forwardedRef) => {
269
+ var _a;
270
+ const { container: containerProp, ...portalProps } = props;
271
+ const [mounted, setMounted] = React4.useState(false);
272
+ useLayoutEffect2(() => setMounted(true), []);
273
+ const container = containerProp || mounted && ((_a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a.body);
274
+ return container ? import_react_dom.default.createPortal((0, import_jsx_runtime2.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
275
+ });
276
+ Portal.displayName = PORTAL_NAME;
277
+
278
+ export {
279
+ useCallbackRef,
280
+ DismissableLayer,
281
+ Root,
282
+ Branch,
283
+ Portal
284
+ };
285
+ //# sourceMappingURL=chunk-43NH6PDE.js.map
frontend/node_modules/.vite/deps/chunk-43NH6PDE.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../@radix-ui/react-use-callback-ref/src/use-callback-ref.tsx", "../../@radix-ui/react-dismissable-layer/src/dismissable-layer.tsx", "../../@radix-ui/react-use-escape-keydown/src/use-escape-keydown.tsx", "../../@radix-ui/react-portal/src/portal.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\n\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */\nfunction useCallbackRef<T extends (...args: any[]) => any>(callback: T | undefined): T {\n const callbackRef = React.useRef(callback);\n\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n\n // https://github.com/facebook/react/issues/19240\n return React.useMemo(() => ((...args) => callbackRef.current?.(...args)) as T, []);\n}\n\nexport { useCallbackRef };\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { Primitive, dispatchDiscreteCustomEvent } from '@radix-ui/react-primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useEscapeKeydown } from '@radix-ui/react-use-escape-keydown';\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayer\n * -----------------------------------------------------------------------------------------------*/\n\nconst DISMISSABLE_LAYER_NAME = 'DismissableLayer';\nconst CONTEXT_UPDATE = 'dismissableLayer.update';\nconst POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';\nconst FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';\n\nlet originalBodyPointerEvents: string;\n\nconst DismissableLayerContext = React.createContext({\n layers: new Set<DismissableLayerElement>(),\n layersWithOutsidePointerEventsDisabled: new Set<DismissableLayerElement>(),\n branches: new Set<DismissableLayerBranchElement>(),\n});\n\ntype DismissableLayerElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface DismissableLayerProps extends PrimitiveDivProps {\n /**\n * When `true`, hover/focus/click interactions will be disabled on elements outside\n * the `DismissableLayer`. Users will need to click twice on outside elements to\n * interact with them: once to close the `DismissableLayer`, and again to trigger the element.\n */\n disableOutsidePointerEvents?: boolean;\n /**\n * Event handler called when the escape key is down.\n * Can be prevented.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void;\n /**\n * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.\n * Can be prevented.\n */\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;\n /**\n * Event handler called when the focus moves outside of the `DismissableLayer`.\n * Can be prevented.\n */\n onFocusOutside?: (event: FocusOutsideEvent) => void;\n /**\n * Event handler called when an interaction happens outside the `DismissableLayer`.\n * Specifically, when a `pointerdown` event happens outside or focus moves outside of it.\n * Can be prevented.\n */\n onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;\n /**\n * Handler called when the `DismissableLayer` should be dismissed\n */\n onDismiss?: () => void;\n}\n\nconst DismissableLayer = React.forwardRef<DismissableLayerElement, DismissableLayerProps>(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState<DismissableLayerElement | null>(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node) => setNode(node));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1); // prettier-ignore\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled!); // prettier-ignore\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target as HTMLElement;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n\n const focusOutside = useFocusOutside((event) => {\n const target = event.target as HTMLElement;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = 'none';\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (\n disableOutsidePointerEvents &&\n context.layersWithOutsidePointerEventsDisabled.size === 1\n ) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n\n /**\n * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect\n * because a change to `disableOutsidePointerEvents` would remove this layer from the stack\n * and add it to the end again so the layering order wouldn't be _creation order_.\n * We only want them to be removed from context stacks when unmounted.\n */\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n\n return (\n <Primitive.div\n {...layerProps}\n ref={composedRefs}\n style={{\n pointerEvents: isBodyPointerEventsDisabled\n ? isPointerEventsEnabled\n ? 'auto'\n : 'none'\n : undefined,\n ...props.style,\n }}\n onFocusCapture={composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture)}\n onBlurCapture={composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture)}\n onPointerDownCapture={composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )}\n />\n );\n }\n);\n\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayerBranch\n * -----------------------------------------------------------------------------------------------*/\n\nconst BRANCH_NAME = 'DismissableLayerBranch';\n\ntype DismissableLayerBranchElement = React.ComponentRef<typeof Primitive.div>;\ninterface DismissableLayerBranchProps extends PrimitiveDivProps {}\n\nconst DismissableLayerBranch = React.forwardRef<\n DismissableLayerBranchElement,\n DismissableLayerBranchProps\n>((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef<DismissableLayerBranchElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n\n return <Primitive.div {...props} ref={composedRefs} />;\n});\n\nDismissableLayerBranch.displayName = BRANCH_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PointerDownOutsideEvent = CustomEvent<{ originalEvent: PointerEvent }>;\ntype FocusOutsideEvent = CustomEvent<{ originalEvent: FocusEvent }>;\n\n/**\n * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`\n * to mimic layer dismissing behaviour present in OS.\n * Returns props to pass to the node we want to check for outside events.\n */\nfunction usePointerDownOutside(\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void,\n ownerDocument: Document = globalThis?.document\n) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside) as EventListener;\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {});\n\n React.useEffect(() => {\n const handlePointerDown = (event: PointerEvent) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n\n function handleAndDispatchPointerDownOutsideEvent() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n }\n\n /**\n * On touch devices, we need to wait for a click event because browsers implement\n * a ~350ms delay between the time the user stops touching the display and when the\n * browser executres events. We need to ensure we don't reactivate pointer-events within\n * this timeframe otherwise the browser may execute events that should have been prevented.\n *\n * Additionally, this also lets us deal automatically with cancellations when a click event\n * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.\n *\n * This is why we also continuously remove the previous listener, because we cannot be\n * certain that it was raised, and therefore cleaned-up.\n */\n if (event.pointerType === 'touch') {\n ownerDocument.removeEventListener('click', handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;\n ownerDocument.addEventListener('click', handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent();\n }\n } else {\n // We need to remove the event listener in case the outside click has been canceled.\n // See: https://github.com/radix-ui/primitives/issues/2171\n ownerDocument.removeEventListener('click', handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n /**\n * if this hook executes in a component that mounts via a `pointerdown` event, the event\n * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid\n * this by delaying the event listener registration on the document.\n * This is not React specific, but rather how the DOM works, ie:\n * ```\n * button.addEventListener('pointerdown', () => {\n * console.log('I will log');\n * document.addEventListener('pointerdown', () => {\n * console.log('I will also log');\n * })\n * });\n */\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener('pointerdown', handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener('pointerdown', handlePointerDown);\n ownerDocument.removeEventListener('click', handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => (isPointerInsideReactTreeRef.current = true),\n };\n}\n\n/**\n * Listens for when focus happens outside a react subtree.\n * Returns props to pass to the root (node) of the subtree we want to check.\n */\nfunction useFocusOutside(\n onFocusOutside?: (event: FocusOutsideEvent) => void,\n ownerDocument: Document = globalThis?.document\n) {\n const handleFocusOutside = useCallbackRef(onFocusOutside) as EventListener;\n const isFocusInsideReactTreeRef = React.useRef(false);\n\n React.useEffect(() => {\n const handleFocus = (event: FocusEvent) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false,\n });\n }\n };\n ownerDocument.addEventListener('focusin', handleFocus);\n return () => ownerDocument.removeEventListener('focusin', handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n\n return {\n onFocusCapture: () => (isFocusInsideReactTreeRef.current = true),\n onBlurCapture: () => (isFocusInsideReactTreeRef.current = false),\n };\n}\n\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\n\nfunction handleAndDispatchCustomEvent<E extends CustomEvent, OriginalEvent extends Event>(\n name: string,\n handler: ((event: E) => void) | undefined,\n detail: { originalEvent: OriginalEvent } & (E extends CustomEvent<infer D> ? D : never),\n { discrete }: { discrete: boolean }\n) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler as EventListener, { once: true });\n\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\n\nconst Root = DismissableLayer;\nconst Branch = DismissableLayerBranch;\n\nexport {\n DismissableLayer,\n DismissableLayerBranch,\n //\n Root,\n Branch,\n};\nexport type { DismissableLayerProps };\n", "import * as React from 'react';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\n\n/**\n * Listens for when the escape key is down\n */\nfunction useEscapeKeydown(\n onEscapeKeyDownProp?: (event: KeyboardEvent) => void,\n ownerDocument: Document = globalThis?.document\n) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener('keydown', handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener('keydown', handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\n\nexport { useEscapeKeydown };\n", "import * as React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\n/* -------------------------------------------------------------------------------------------------\n * Portal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'Portal';\n\ntype PortalElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface PortalProps extends PrimitiveDivProps {\n /**\n * An optional container where the portaled content should be appended.\n */\n container?: Element | DocumentFragment | null;\n}\n\nconst Portal = React.forwardRef<PortalElement, PortalProps>((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || (mounted && globalThis?.document?.body);\n return container\n ? ReactDOM.createPortal(<Primitive.div {...portalProps} ref={forwardedRef} />, container)\n : null;\n});\n\nPortal.displayName = PORTAL_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Portal;\n\nexport {\n Portal,\n //\n Root,\n};\nexport type { PortalProps };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AAMvB,SAAS,eAAkD,UAA4B;AACrF,QAAM,cAAoB,aAAO,QAAQ;AAEnC,EAAA,gBAAU,MAAM;AACpB,gBAAY,UAAU;EACxB,CAAC;AAGD,SAAa,cAAQ,MAAO,IAAI,SAAA;;AAAS,6BAAY,YAAZ,qCAAsB,GAAG;KAAa,CAAC,CAAC;AACnF;;;ACfA,IAAAA,SAAuB;;;ACAvB,IAAAC,SAAuB;AAMvB,SAAS,iBACP,qBACA,gBAA0B,yCAAY,UACtC;AACA,QAAM,kBAAkB,eAAe,mBAAmB;AAEpD,EAAA,iBAAU,MAAM;AACpB,UAAM,gBAAgB,CAAC,UAAyB;AAC9C,UAAI,MAAM,QAAQ,UAAU;AAC1B,wBAAgB,KAAK;MACvB;IACF;AACA,kBAAc,iBAAiB,WAAW,eAAe,EAAE,SAAS,KAAK,CAAC;AAC1E,WAAO,MAAM,cAAc,oBAAoB,WAAW,eAAe,EAAE,SAAS,KAAK,CAAC;EAC5F,GAAG,CAAC,iBAAiB,aAAa,CAAC;AACrC;;;ADqIM,yBAAA;AA/IN,IAAM,yBAAyB;AAC/B,IAAM,iBAAiB;AACvB,IAAM,uBAAuB;AAC7B,IAAM,gBAAgB;AAEtB,IAAI;AAEJ,IAAM,0BAAgC,qBAAc;EAClD,QAAQ,oBAAI,IAA6B;EACzC,wCAAwC,oBAAI,IAA6B;EACzE,UAAU,oBAAI,IAAmC;AACnD,CAAC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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ require_react
3
+ } from "./chunk-DRWLMN53.js";
4
+ import {
5
+ __toESM
6
+ } from "./chunk-G3PMV62Z.js";
7
+
8
+ // node_modules/react-hook-form/dist/index.esm.mjs
9
+ var React = __toESM(require_react(), 1);
10
+ var import_react = __toESM(require_react(), 1);
11
+ var isCheckBoxInput = (element) => element.type === "checkbox";
12
+ var isDateObject = (value) => value instanceof Date;
13
+ var isNullOrUndefined = (value) => value == null;
14
+ var isObjectType = (value) => typeof value === "object";
15
+ var isObject = (value) => !isNullOrUndefined(value) && !Array.isArray(value) && isObjectType(value) && !isDateObject(value);
16
+ var getEventValue = (event) => isObject(event) && event.target ? isCheckBoxInput(event.target) ? event.target.checked : event.target.value : event;
17
+ var getNodeParentName = (name) => name.substring(0, name.search(/\.\d+(\.|$)/)) || name;
18
+ var isNameInFieldArray = (names, name) => names.has(getNodeParentName(name));
19
+ var isPlainObject = (tempObject) => {
20
+ const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype;
21
+ return isObject(prototypeCopy) && prototypeCopy.hasOwnProperty("isPrototypeOf");
22
+ };
23
+ var isWeb = typeof window !== "undefined" && typeof window.HTMLElement !== "undefined" && typeof document !== "undefined";
24
+ function cloneObject(data) {
25
+ let copy;
26
+ const isArray = Array.isArray(data);
27
+ const isFileListInstance = typeof FileList !== "undefined" ? data instanceof FileList : false;
28
+ if (data instanceof Date) {
29
+ copy = new Date(data);
30
+ } else if (data instanceof Set) {
31
+ copy = new Set(data);
32
+ } else if (!(isWeb && (data instanceof Blob || isFileListInstance)) && (isArray || isObject(data))) {
33
+ copy = isArray ? [] : {};
34
+ if (!isArray && !isPlainObject(data)) {
35
+ copy = data;
36
+ } else {
37
+ for (const key in data) {
38
+ if (data.hasOwnProperty(key)) {
39
+ copy[key] = cloneObject(data[key]);
40
+ }
41
+ }
42
+ }
43
+ } else {
44
+ return data;
45
+ }
46
+ return copy;
47
+ }
48
+ var compact = (value) => Array.isArray(value) ? value.filter(Boolean) : [];
49
+ var isUndefined = (val) => val === void 0;
50
+ var get = (object, path, defaultValue) => {
51
+ if (!path || !isObject(object)) {
52
+ return defaultValue;
53
+ }
54
+ const result = compact(path.split(/[,[\].]+?/)).reduce((result2, key) => isNullOrUndefined(result2) ? result2 : result2[key], object);
55
+ return isUndefined(result) || result === object ? isUndefined(object[path]) ? defaultValue : object[path] : result;
56
+ };
57
+ var isBoolean = (value) => typeof value === "boolean";
58
+ var isKey = (value) => /^\w*$/.test(value);
59
+ var stringToPath = (input) => compact(input.replace(/["|']|\]/g, "").split(/\.|\[/));
60
+ var set = (object, path, value) => {
61
+ let index = -1;
62
+ const tempPath = isKey(path) ? [path] : stringToPath(path);
63
+ const length = tempPath.length;
64
+ const lastIndex = length - 1;
65
+ while (++index < length) {
66
+ const key = tempPath[index];
67
+ let newValue = value;
68
+ if (index !== lastIndex) {
69
+ const objValue = object[key];
70
+ newValue = isObject(objValue) || Array.isArray(objValue) ? objValue : !isNaN(+tempPath[index + 1]) ? [] : {};
71
+ }
72
+ if (key === "__proto__" || key === "constructor" || key === "prototype") {
73
+ return;
74
+ }
75
+ object[key] = newValue;
76
+ object = object[key];
77
+ }
78
+ };
79
+ var EVENTS = {
80
+ BLUR: "blur",
81
+ FOCUS_OUT: "focusout",
82
+ CHANGE: "change"
83
+ };
84
+ var VALIDATION_MODE = {
85
+ onBlur: "onBlur",
86
+ onChange: "onChange",
87
+ onSubmit: "onSubmit",
88
+ onTouched: "onTouched",
89
+ all: "all"
90
+ };
91
+ var INPUT_VALIDATION_RULES = {
92
+ max: "max",
93
+ min: "min",
94
+ maxLength: "maxLength",
95
+ minLength: "minLength",
96
+ pattern: "pattern",
97
+ required: "required",
98
+ validate: "validate"
99
+ };
100
+ var HookFormContext = import_react.default.createContext(null);
101
+ var useFormContext = () => import_react.default.useContext(HookFormContext);
102
+ var FormProvider = (props) => {
103
+ const { children, ...data } = props;
104
+ return import_react.default.createElement(HookFormContext.Provider, { value: data }, children);
105
+ };
106
+ var getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {
107
+ const result = {
108
+ defaultValues: control._defaultValues
109
+ };
110
+ for (const key in formState) {
111
+ Object.defineProperty(result, key, {
112
+ get: () => {
113
+ const _key = key;
114
+ if (control._proxyFormState[_key] !== VALIDATION_MODE.all) {
115
+ control._proxyFormState[_key] = !isRoot || VALIDATION_MODE.all;
116
+ }
117
+ localProxyFormState && (localProxyFormState[_key] = true);
118
+ return formState[_key];
119
+ }
120
+ });
121
+ }
122
+ return result;
123
+ };
124
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
125
+ function useFormState(props) {
126
+ const methods = useFormContext();
127
+ const { control = methods.control, disabled, name, exact } = props || {};
128
+ const [formState, updateFormState] = import_react.default.useState(control._formState);
129
+ const _localProxyFormState = import_react.default.useRef({
130
+ isDirty: false,
131
+ isLoading: false,
132
+ dirtyFields: false,
133
+ touchedFields: false,
134
+ validatingFields: false,
135
+ isValidating: false,
136
+ isValid: false,
137
+ errors: false
138
+ });
139
+ useIsomorphicLayoutEffect(() => control._subscribe({
140
+ name,
141
+ formState: _localProxyFormState.current,
142
+ exact,
143
+ callback: (formState2) => {
144
+ !disabled && updateFormState({
145
+ ...control._formState,
146
+ ...formState2
147
+ });
148
+ }
149
+ }), [name, disabled, exact]);
150
+ import_react.default.useEffect(() => {
151
+ _localProxyFormState.current.isValid && control._setValid(true);
152
+ }, [control]);
153
+ return import_react.default.useMemo(() => getProxyFormState(formState, control, _localProxyFormState.current, false), [formState, control]);
154
+ }
155
+ var isString = (value) => typeof value === "string";
156
+ var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) => {
157
+ if (isString(names)) {
158
+ isGlobal && _names.watch.add(names);
159
+ return get(formValues, names, defaultValue);
160
+ }
161
+ if (Array.isArray(names)) {
162
+ return names.map((fieldName) => (isGlobal && _names.watch.add(fieldName), get(formValues, fieldName)));
163
+ }
164
+ isGlobal && (_names.watchAll = true);
165
+ return formValues;
166
+ };
167
+ function useWatch(props) {
168
+ const methods = useFormContext();
169
+ const { control = methods.control, name, defaultValue, disabled, exact } = props || {};
170
+ const _defaultValue = import_react.default.useRef(defaultValue);
171
+ const [value, updateValue] = import_react.default.useState(control._getWatch(name, _defaultValue.current));
172
+ useIsomorphicLayoutEffect(() => control._subscribe({
173
+ name,
174
+ formState: {
175
+ values: true
176
+ },
177
+ exact,
178
+ callback: (formState) => !disabled && updateValue(generateWatchOutput(name, control._names, formState.values || control._formValues, false, _defaultValue.current))
179
+ }), [name, control, disabled, exact]);
180
+ import_react.default.useEffect(() => control._removeUnmounted());
181
+ return value;
182
+ }
183
+ function useController(props) {
184
+ const methods = useFormContext();
185
+ const { name, disabled, control = methods.control, shouldUnregister } = props;
186
+ const isArrayField = isNameInFieldArray(control._names.array, name);
187
+ const value = useWatch({
188
+ control,
189
+ name,
190
+ defaultValue: get(control._formValues, name, get(control._defaultValues, name, props.defaultValue)),
191
+ exact: true
192
+ });
193
+ const formState = useFormState({
194
+ control,
195
+ name,
196
+ exact: true
197
+ });
198
+ const _props = import_react.default.useRef(props);
199
+ const _registerProps = import_react.default.useRef(control.register(name, {
200
+ ...props.rules,
201
+ value,
202
+ ...isBoolean(props.disabled) ? { disabled: props.disabled } : {}
203
+ }));
204
+ const fieldState = import_react.default.useMemo(() => Object.defineProperties({}, {
205
+ invalid: {
206
+ enumerable: true,
207
+ get: () => !!get(formState.errors, name)
208
+ },
209
+ isDirty: {
210
+ enumerable: true,
211
+ get: () => !!get(formState.dirtyFields, name)
212
+ },
213
+ isTouched: {
214
+ enumerable: true,
215
+ get: () => !!get(formState.touchedFields, name)
216
+ },
217
+ isValidating: {
218
+ enumerable: true,
219
+ get: () => !!get(formState.validatingFields, name)
220
+ },
221
+ error: {
222
+ enumerable: true,
223
+ get: () => get(formState.errors, name)
224
+ }
225
+ }), [formState, name]);
226
+ const onChange = import_react.default.useCallback((event) => _registerProps.current.onChange({
227
+ target: {
228
+ value: getEventValue(event),
229
+ name
230
+ },
231
+ type: EVENTS.CHANGE
232
+ }), [name]);
233
+ const onBlur = import_react.default.useCallback(() => _registerProps.current.onBlur({
234
+ target: {
235
+ value: get(control._formValues, name),
236
+ name
237
+ },
238
+ type: EVENTS.BLUR
239
+ }), [name, control._formValues]);
240
+ const ref = import_react.default.useCallback((elm) => {
241
+ const field2 = get(control._fields, name);
242
+ if (field2 && elm) {
243
+ field2._f.ref = {
244
+ focus: () => elm.focus(),
245
+ select: () => elm.select(),
246
+ setCustomValidity: (message) => elm.setCustomValidity(message),
247
+ reportValidity: () => elm.reportValidity()
248
+ };
249
+ }
250
+ }, [control._fields, name]);
251
+ const field = import_react.default.useMemo(() => ({
252
+ name,
253
+ value,
254
+ ...isBoolean(disabled) || formState.disabled ? { disabled: formState.disabled || disabled } : {},
255
+ onChange,
256
+ onBlur,
257
+ ref
258
+ }), [name, disabled, formState.disabled, onChange, onBlur, ref, value]);
259
+ import_react.default.useEffect(() => {
260
+ const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;
261
+ control.register(name, {
262
+ ..._props.current.rules,
263
+ ...isBoolean(_props.current.disabled) ? { disabled: _props.current.disabled } : {}
264
+ });
265
+ const updateMounted = (name2, value2) => {
266
+ const field2 = get(control._fields, name2);
267
+ if (field2 && field2._f) {
268
+ field2._f.mount = value2;
269
+ }
270
+ };
271
+ updateMounted(name, true);
272
+ if (_shouldUnregisterField) {
273
+ const value2 = cloneObject(get(control._options.defaultValues, name));
274
+ set(control._defaultValues, name, value2);
275
+ if (isUndefined(get(control._formValues, name))) {
276
+ set(control._formValues, name, value2);
277
+ }
278
+ }
279
+ !isArrayField && control.register(name);
280
+ return () => {
281
+ (isArrayField ? _shouldUnregisterField && !control._state.action : _shouldUnregisterField) ? control.unregister(name) : updateMounted(name, false);
282
+ };
283
+ }, [name, control, isArrayField, shouldUnregister]);
284
+ import_react.default.useEffect(() => {
285
+ control._setDisabledField({
286
+ disabled,
287
+ name
288
+ });
289
+ }, [disabled, name, control]);
290
+ return import_react.default.useMemo(() => ({
291
+ field,
292
+ formState,
293
+ fieldState
294
+ }), [field, formState, fieldState]);
295
+ }
296
+ var Controller = (props) => props.render(useController(props));
297
+ var flatten = (obj) => {
298
+ const output = {};
299
+ for (const key of Object.keys(obj)) {
300
+ if (isObjectType(obj[key]) && obj[key] !== null) {
301
+ const nested = flatten(obj[key]);
302
+ for (const nestedKey of Object.keys(nested)) {
303
+ output[`${key}.${nestedKey}`] = nested[nestedKey];
304
+ }
305
+ } else {
306
+ output[key] = obj[key];
307
+ }
308
+ }
309
+ return output;
310
+ };
311
+ var POST_REQUEST = "post";
312
+ function Form(props) {
313
+ const methods = useFormContext();
314
+ const [mounted, setMounted] = import_react.default.useState(false);
315
+ const { control = methods.control, onSubmit, children, action, method = POST_REQUEST, headers, encType, onError, render, onSuccess, validateStatus, ...rest } = props;
316
+ const submit = async (event) => {
317
+ let hasError = false;
318
+ let type = "";
319
+ await control.handleSubmit(async (data) => {
320
+ const formData = new FormData();
321
+ let formDataJson = "";
322
+ try {
323
+ formDataJson = JSON.stringify(data);
324
+ } catch (_a) {
325
+ }
326
+ const flattenFormValues = flatten(control._formValues);
327
+ for (const key in flattenFormValues) {
328
+ formData.append(key, flattenFormValues[key]);
329
+ }
330
+ if (onSubmit) {
331
+ await onSubmit({
332
+ data,
333
+ event,
334
+ method,
335
+ formData,
336
+ formDataJson
337
+ });
338
+ }
339
+ if (action) {
340
+ try {
341
+ const shouldStringifySubmissionData = [
342
+ headers && headers["Content-Type"],
343
+ encType
344
+ ].some((value) => value && value.includes("json"));
345
+ const response = await fetch(String(action), {
346
+ method,
347
+ headers: {
348
+ ...headers,
349
+ ...encType ? { "Content-Type": encType } : {}
350
+ },
351
+ body: shouldStringifySubmissionData ? formDataJson : formData
352
+ });
353
+ if (response && (validateStatus ? !validateStatus(response.status) : response.status < 200 || response.status >= 300)) {
354
+ hasError = true;
355
+ onError && onError({ response });
356
+ type = String(response.status);
357
+ } else {
358
+ onSuccess && onSuccess({ response });
359
+ }
360
+ } catch (error) {
361
+ hasError = true;
362
+ onError && onError({ error });
363
+ }
364
+ }
365
+ })(event);
366
+ if (hasError && props.control) {
367
+ props.control._subjects.state.next({
368
+ isSubmitSuccessful: false
369
+ });
370
+ props.control.setError("root.server", {
371
+ type
372
+ });
373
+ }
374
+ };
375
+ import_react.default.useEffect(() => {
376
+ setMounted(true);
377
+ }, []);
378
+ return render ? import_react.default.createElement(import_react.default.Fragment, null, render({
379
+ submit
380
+ })) : import_react.default.createElement("form", { noValidate: mounted, action, method, encType, onSubmit: submit, ...rest }, children);
381
+ }
382
+ var appendErrors = (name, validateAllFieldCriteria, errors, type, message) => validateAllFieldCriteria ? {
383
+ ...errors[name],
384
+ types: {
385
+ ...errors[name] && errors[name].types ? errors[name].types : {},
386
+ [type]: message || true
387
+ }
388
+ } : {};
389
+ var convertToArrayPayload = (value) => Array.isArray(value) ? value : [value];
390
+ var createSubject = () => {
391
+ let _observers = [];
392
+ const next = (value) => {
393
+ for (const observer of _observers) {
394
+ observer.next && observer.next(value);
395
+ }
396
+ };
397
+ const subscribe = (observer) => {
398
+ _observers.push(observer);
399
+ return {
400
+ unsubscribe: () => {
401
+ _observers = _observers.filter((o) => o !== observer);
402
+ }
403
+ };
404
+ };
405
+ const unsubscribe = () => {
406
+ _observers = [];
407
+ };
408
+ return {
409
+ get observers() {
410
+ return _observers;
411
+ },
412
+ next,
413
+ subscribe,
414
+ unsubscribe
415
+ };
416
+ };
417
+ var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
418
+ function deepEqual(object1, object2) {
419
+ if (isPrimitive(object1) || isPrimitive(object2)) {
420
+ return object1 === object2;
421
+ }
422
+ if (isDateObject(object1) && isDateObject(object2)) {
423
+ return object1.getTime() === object2.getTime();
424
+ }
425
+ const keys1 = Object.keys(object1);
426
+ const keys2 = Object.keys(object2);
427
+ if (keys1.length !== keys2.length) {
428
+ return false;
429
+ }
430
+ for (const key of keys1) {
431
+ const val1 = object1[key];
432
+ if (!keys2.includes(key)) {
433
+ return false;
434
+ }
435
+ if (key !== "ref") {
436
+ const val2 = object2[key];
437
+ if (isDateObject(val1) && isDateObject(val2) || isObject(val1) && isObject(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual(val1, val2) : val1 !== val2) {
438
+ return false;
439
+ }
440
+ }
441
+ }
442
+ return true;
443
+ }
444
+ var isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;
445
+ var isFileInput = (element) => element.type === "file";
446
+ var isFunction = (value) => typeof value === "function";
447
+ var isHTMLElement = (value) => {
448
+ if (!isWeb) {
449
+ return false;
450
+ }
451
+ const owner = value ? value.ownerDocument : 0;
452
+ return value instanceof (owner && owner.defaultView ? owner.defaultView.HTMLElement : HTMLElement);
453
+ };
454
+ var isMultipleSelect = (element) => element.type === `select-multiple`;
455
+ var isRadioInput = (element) => element.type === "radio";
456
+ var isRadioOrCheckbox = (ref) => isRadioInput(ref) || isCheckBoxInput(ref);
457
+ var live = (ref) => isHTMLElement(ref) && ref.isConnected;
458
+ function baseGet(object, updatePath) {
459
+ const length = updatePath.slice(0, -1).length;
460
+ let index = 0;
461
+ while (index < length) {
462
+ object = isUndefined(object) ? index++ : object[updatePath[index++]];
463
+ }
464
+ return object;
465
+ }
466
+ function isEmptyArray(obj) {
467
+ for (const key in obj) {
468
+ if (obj.hasOwnProperty(key) && !isUndefined(obj[key])) {
469
+ return false;
470
+ }
471
+ }
472
+ return true;
473
+ }
474
+ function unset(object, path) {
475
+ const paths = Array.isArray(path) ? path : isKey(path) ? [path] : stringToPath(path);
476
+ const childObject = paths.length === 1 ? object : baseGet(object, paths);
477
+ const index = paths.length - 1;
478
+ const key = paths[index];
479
+ if (childObject) {
480
+ delete childObject[key];
481
+ }
482
+ if (index !== 0 && (isObject(childObject) && isEmptyObject(childObject) || Array.isArray(childObject) && isEmptyArray(childObject))) {
483
+ unset(object, paths.slice(0, -1));
484
+ }
485
+ return object;
486
+ }
487
+ var objectHasFunction = (data) => {
488
+ for (const key in data) {
489
+ if (isFunction(data[key])) {
490
+ return true;
491
+ }
492
+ }
493
+ return false;
494
+ };
495
+ function markFieldsDirty(data, fields = {}) {
496
+ const isParentNodeArray = Array.isArray(data);
497
+ if (isObject(data) || isParentNodeArray) {
498
+ for (const key in data) {
499
+ if (Array.isArray(data[key]) || isObject(data[key]) && !objectHasFunction(data[key])) {
500
+ fields[key] = Array.isArray(data[key]) ? [] : {};
501
+ markFieldsDirty(data[key], fields[key]);
502
+ } else if (!isNullOrUndefined(data[key])) {
503
+ fields[key] = true;
504
+ }
505
+ }
506
+ }
507
+ return fields;
508
+ }
509
+ function getDirtyFieldsFromDefaultValues(data, formValues, dirtyFieldsFromValues) {
510
+ const isParentNodeArray = Array.isArray(data);
511
+ if (isObject(data) || isParentNodeArray) {
512
+ for (const key in data) {
513
+ if (Array.isArray(data[key]) || isObject(data[key]) && !objectHasFunction(data[key])) {
514
+ if (isUndefined(formValues) || isPrimitive(dirtyFieldsFromValues[key])) {
515
+ dirtyFieldsFromValues[key] = Array.isArray(data[key]) ? markFieldsDirty(data[key], []) : { ...markFieldsDirty(data[key]) };
516
+ } else {
517
+ getDirtyFieldsFromDefaultValues(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
518
+ }
519
+ } else {
520
+ dirtyFieldsFromValues[key] = !deepEqual(data[key], formValues[key]);
521
+ }
522
+ }
523
+ }
524
+ return dirtyFieldsFromValues;
525
+ }
526
+ var getDirtyFields = (defaultValues, formValues) => getDirtyFieldsFromDefaultValues(defaultValues, formValues, markFieldsDirty(formValues));
527
+ var defaultResult = {
528
+ value: false,
529
+ isValid: false
530
+ };
531
+ var validResult = { value: true, isValid: true };
532
+ var getCheckboxValue = (options) => {
533
+ if (Array.isArray(options)) {
534
+ if (options.length > 1) {
535
+ const values = options.filter((option) => option && option.checked && !option.disabled).map((option) => option.value);
536
+ return { value: values, isValid: !!values.length };
537
+ }
538
+ return options[0].checked && !options[0].disabled ? (
539
+ // @ts-expect-error expected to work in the browser
540
+ options[0].attributes && !isUndefined(options[0].attributes.value) ? isUndefined(options[0].value) || options[0].value === "" ? validResult : { value: options[0].value, isValid: true } : validResult
541
+ ) : defaultResult;
542
+ }
543
+ return defaultResult;
544
+ };
545
+ var getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isUndefined(value) ? value : valueAsNumber ? value === "" ? NaN : value ? +value : value : valueAsDate && isString(value) ? new Date(value) : setValueAs ? setValueAs(value) : value;
546
+ var defaultReturn = {
547
+ isValid: false,
548
+ value: null
549
+ };
550
+ var getRadioValue = (options) => Array.isArray(options) ? options.reduce((previous, option) => option && option.checked && !option.disabled ? {
551
+ isValid: true,
552
+ value: option.value
553
+ } : previous, defaultReturn) : defaultReturn;
554
+ function getFieldValue(_f) {
555
+ const ref = _f.ref;
556
+ if (isFileInput(ref)) {
557
+ return ref.files;
558
+ }
559
+ if (isRadioInput(ref)) {
560
+ return getRadioValue(_f.refs).value;
561
+ }
562
+ if (isMultipleSelect(ref)) {
563
+ return [...ref.selectedOptions].map(({ value }) => value);
564
+ }
565
+ if (isCheckBoxInput(ref)) {
566
+ return getCheckboxValue(_f.refs).value;
567
+ }
568
+ return getFieldValueAs(isUndefined(ref.value) ? _f.ref.value : ref.value, _f);
569
+ }
570
+ var getResolverOptions = (fieldsNames, _fields, criteriaMode, shouldUseNativeValidation) => {
571
+ const fields = {};
572
+ for (const name of fieldsNames) {
573
+ const field = get(_fields, name);
574
+ field && set(fields, name, field._f);
575
+ }
576
+ return {
577
+ criteriaMode,
578
+ names: [...fieldsNames],
579
+ fields,
580
+ shouldUseNativeValidation
581
+ };
582
+ };
583
+ var isRegex = (value) => value instanceof RegExp;
584
+ var getRuleValue = (rule) => isUndefined(rule) ? rule : isRegex(rule) ? rule.source : isObject(rule) ? isRegex(rule.value) ? rule.value.source : rule.value : rule;
585
+ var getValidationModes = (mode) => ({
586
+ isOnSubmit: !mode || mode === VALIDATION_MODE.onSubmit,
587
+ isOnBlur: mode === VALIDATION_MODE.onBlur,
588
+ isOnChange: mode === VALIDATION_MODE.onChange,
589
+ isOnAll: mode === VALIDATION_MODE.all,
590
+ isOnTouch: mode === VALIDATION_MODE.onTouched
591
+ });
592
+ var ASYNC_FUNCTION = "AsyncFunction";
593
+ var hasPromiseValidation = (fieldReference) => !!fieldReference && !!fieldReference.validate && !!(isFunction(fieldReference.validate) && fieldReference.validate.constructor.name === ASYNC_FUNCTION || isObject(fieldReference.validate) && Object.values(fieldReference.validate).find((validateFunction) => validateFunction.constructor.name === ASYNC_FUNCTION));
594
+ var hasValidation = (options) => options.mount && (options.required || options.min || options.max || options.maxLength || options.minLength || options.pattern || options.validate);
595
+ var isWatched = (name, _names, isBlurEvent) => !isBlurEvent && (_names.watchAll || _names.watch.has(name) || [..._names.watch].some((watchName) => name.startsWith(watchName) && /^\.\w+/.test(name.slice(watchName.length))));
596
+ var iterateFieldsByAction = (fields, action, fieldsNames, abortEarly) => {
597
+ for (const key of fieldsNames || Object.keys(fields)) {
598
+ const field = get(fields, key);
599
+ if (field) {
600
+ const { _f, ...currentField } = field;
601
+ if (_f) {
602
+ if (_f.refs && _f.refs[0] && action(_f.refs[0], key) && !abortEarly) {
603
+ return true;
604
+ } else if (_f.ref && action(_f.ref, _f.name) && !abortEarly) {
605
+ return true;
606
+ } else {
607
+ if (iterateFieldsByAction(currentField, action)) {
608
+ break;
609
+ }
610
+ }
611
+ } else if (isObject(currentField)) {
612
+ if (iterateFieldsByAction(currentField, action)) {
613
+ break;
614
+ }
615
+ }
616
+ }
617
+ }
618
+ return;
619
+ };
620
+ function schemaErrorLookup(errors, _fields, name) {
621
+ const error = get(errors, name);
622
+ if (error || isKey(name)) {
623
+ return {
624
+ error,
625
+ name
626
+ };
627
+ }
628
+ const names = name.split(".");
629
+ while (names.length) {
630
+ const fieldName = names.join(".");
631
+ const field = get(_fields, fieldName);
632
+ const foundError = get(errors, fieldName);
633
+ if (field && !Array.isArray(field) && name !== fieldName) {
634
+ return { name };
635
+ }
636
+ if (foundError && foundError.type) {
637
+ return {
638
+ name: fieldName,
639
+ error: foundError
640
+ };
641
+ }
642
+ names.pop();
643
+ }
644
+ return {
645
+ name
646
+ };
647
+ }
648
+ var shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot) => {
649
+ updateFormState(formStateData);
650
+ const { name, ...formState } = formStateData;
651
+ return isEmptyObject(formState) || Object.keys(formState).length >= Object.keys(_proxyFormState).length || Object.keys(formState).find((key) => _proxyFormState[key] === (!isRoot || VALIDATION_MODE.all));
652
+ };
653
+ var shouldSubscribeByName = (name, signalName, exact) => !name || !signalName || name === signalName || convertToArrayPayload(name).some((currentName) => currentName && (exact ? currentName === signalName : currentName.startsWith(signalName) || signalName.startsWith(currentName)));
654
+ var skipValidation = (isBlurEvent, isTouched, isSubmitted, reValidateMode, mode) => {
655
+ if (mode.isOnAll) {
656
+ return false;
657
+ } else if (!isSubmitted && mode.isOnTouch) {
658
+ return !(isTouched || isBlurEvent);
659
+ } else if (isSubmitted ? reValidateMode.isOnBlur : mode.isOnBlur) {
660
+ return !isBlurEvent;
661
+ } else if (isSubmitted ? reValidateMode.isOnChange : mode.isOnChange) {
662
+ return isBlurEvent;
663
+ }
664
+ return true;
665
+ };
666
+ var unsetEmptyArray = (ref, name) => !compact(get(ref, name)).length && unset(ref, name);
667
+ var updateFieldArrayRootError = (errors, error, name) => {
668
+ const fieldArrayErrors = convertToArrayPayload(get(errors, name));
669
+ set(fieldArrayErrors, "root", error[name]);
670
+ set(errors, name, fieldArrayErrors);
671
+ return errors;
672
+ };
673
+ var isMessage = (value) => isString(value);
674
+ function getValidateError(result, ref, type = "validate") {
675
+ if (isMessage(result) || Array.isArray(result) && result.every(isMessage) || isBoolean(result) && !result) {
676
+ return {
677
+ type,
678
+ message: isMessage(result) ? result : "",
679
+ ref
680
+ };
681
+ }
682
+ }
683
+ var getValueAndMessage = (validationData) => isObject(validationData) && !isRegex(validationData) ? validationData : {
684
+ value: validationData,
685
+ message: ""
686
+ };
687
+ var validateField = async (field, disabledFieldNames, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray) => {
688
+ const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount } = field._f;
689
+ const inputValue = get(formValues, name);
690
+ if (!mount || disabledFieldNames.has(name)) {
691
+ return {};
692
+ }
693
+ const inputRef = refs ? refs[0] : ref;
694
+ const setCustomValidity = (message) => {
695
+ if (shouldUseNativeValidation && inputRef.reportValidity) {
696
+ inputRef.setCustomValidity(isBoolean(message) ? "" : message || "");
697
+ inputRef.reportValidity();
698
+ }
699
+ };
700
+ const error = {};
701
+ const isRadio = isRadioInput(ref);
702
+ const isCheckBox = isCheckBoxInput(ref);
703
+ const isRadioOrCheckbox2 = isRadio || isCheckBox;
704
+ const isEmpty = (valueAsNumber || isFileInput(ref)) && isUndefined(ref.value) && isUndefined(inputValue) || isHTMLElement(ref) && ref.value === "" || inputValue === "" || Array.isArray(inputValue) && !inputValue.length;
705
+ const appendErrorsCurry = appendErrors.bind(null, name, validateAllFieldCriteria, error);
706
+ const getMinMaxMessage = (exceedMax, maxLengthMessage, minLengthMessage, maxType = INPUT_VALIDATION_RULES.maxLength, minType = INPUT_VALIDATION_RULES.minLength) => {
707
+ const message = exceedMax ? maxLengthMessage : minLengthMessage;
708
+ error[name] = {
709
+ type: exceedMax ? maxType : minType,
710
+ message,
711
+ ref,
712
+ ...appendErrorsCurry(exceedMax ? maxType : minType, message)
713
+ };
714
+ };
715
+ if (isFieldArray ? !Array.isArray(inputValue) || !inputValue.length : required && (!isRadioOrCheckbox2 && (isEmpty || isNullOrUndefined(inputValue)) || isBoolean(inputValue) && !inputValue || isCheckBox && !getCheckboxValue(refs).isValid || isRadio && !getRadioValue(refs).isValid)) {
716
+ const { value, message } = isMessage(required) ? { value: !!required, message: required } : getValueAndMessage(required);
717
+ if (value) {
718
+ error[name] = {
719
+ type: INPUT_VALIDATION_RULES.required,
720
+ message,
721
+ ref: inputRef,
722
+ ...appendErrorsCurry(INPUT_VALIDATION_RULES.required, message)
723
+ };
724
+ if (!validateAllFieldCriteria) {
725
+ setCustomValidity(message);
726
+ return error;
727
+ }
728
+ }
729
+ }
730
+ if (!isEmpty && (!isNullOrUndefined(min) || !isNullOrUndefined(max))) {
731
+ let exceedMax;
732
+ let exceedMin;
733
+ const maxOutput = getValueAndMessage(max);
734
+ const minOutput = getValueAndMessage(min);
735
+ if (!isNullOrUndefined(inputValue) && !isNaN(inputValue)) {
736
+ const valueNumber = ref.valueAsNumber || (inputValue ? +inputValue : inputValue);
737
+ if (!isNullOrUndefined(maxOutput.value)) {
738
+ exceedMax = valueNumber > maxOutput.value;
739
+ }
740
+ if (!isNullOrUndefined(minOutput.value)) {
741
+ exceedMin = valueNumber < minOutput.value;
742
+ }
743
+ } else {
744
+ const valueDate = ref.valueAsDate || new Date(inputValue);
745
+ const convertTimeToDate = (time) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + time);
746
+ const isTime = ref.type == "time";
747
+ const isWeek = ref.type == "week";
748
+ if (isString(maxOutput.value) && inputValue) {
749
+ exceedMax = isTime ? convertTimeToDate(inputValue) > convertTimeToDate(maxOutput.value) : isWeek ? inputValue > maxOutput.value : valueDate > new Date(maxOutput.value);
750
+ }
751
+ if (isString(minOutput.value) && inputValue) {
752
+ exceedMin = isTime ? convertTimeToDate(inputValue) < convertTimeToDate(minOutput.value) : isWeek ? inputValue < minOutput.value : valueDate < new Date(minOutput.value);
753
+ }
754
+ }
755
+ if (exceedMax || exceedMin) {
756
+ getMinMaxMessage(!!exceedMax, maxOutput.message, minOutput.message, INPUT_VALIDATION_RULES.max, INPUT_VALIDATION_RULES.min);
757
+ if (!validateAllFieldCriteria) {
758
+ setCustomValidity(error[name].message);
759
+ return error;
760
+ }
761
+ }
762
+ }
763
+ if ((maxLength || minLength) && !isEmpty && (isString(inputValue) || isFieldArray && Array.isArray(inputValue))) {
764
+ const maxLengthOutput = getValueAndMessage(maxLength);
765
+ const minLengthOutput = getValueAndMessage(minLength);
766
+ const exceedMax = !isNullOrUndefined(maxLengthOutput.value) && inputValue.length > +maxLengthOutput.value;
767
+ const exceedMin = !isNullOrUndefined(minLengthOutput.value) && inputValue.length < +minLengthOutput.value;
768
+ if (exceedMax || exceedMin) {
769
+ getMinMaxMessage(exceedMax, maxLengthOutput.message, minLengthOutput.message);
770
+ if (!validateAllFieldCriteria) {
771
+ setCustomValidity(error[name].message);
772
+ return error;
773
+ }
774
+ }
775
+ }
776
+ if (pattern && !isEmpty && isString(inputValue)) {
777
+ const { value: patternValue, message } = getValueAndMessage(pattern);
778
+ if (isRegex(patternValue) && !inputValue.match(patternValue)) {
779
+ error[name] = {
780
+ type: INPUT_VALIDATION_RULES.pattern,
781
+ message,
782
+ ref,
783
+ ...appendErrorsCurry(INPUT_VALIDATION_RULES.pattern, message)
784
+ };
785
+ if (!validateAllFieldCriteria) {
786
+ setCustomValidity(message);
787
+ return error;
788
+ }
789
+ }
790
+ }
791
+ if (validate) {
792
+ if (isFunction(validate)) {
793
+ const result = await validate(inputValue, formValues);
794
+ const validateError = getValidateError(result, inputRef);
795
+ if (validateError) {
796
+ error[name] = {
797
+ ...validateError,
798
+ ...appendErrorsCurry(INPUT_VALIDATION_RULES.validate, validateError.message)
799
+ };
800
+ if (!validateAllFieldCriteria) {
801
+ setCustomValidity(validateError.message);
802
+ return error;
803
+ }
804
+ }
805
+ } else if (isObject(validate)) {
806
+ let validationResult = {};
807
+ for (const key in validate) {
808
+ if (!isEmptyObject(validationResult) && !validateAllFieldCriteria) {
809
+ break;
810
+ }
811
+ const validateError = getValidateError(await validate[key](inputValue, formValues), inputRef, key);
812
+ if (validateError) {
813
+ validationResult = {
814
+ ...validateError,
815
+ ...appendErrorsCurry(key, validateError.message)
816
+ };
817
+ setCustomValidity(validateError.message);
818
+ if (validateAllFieldCriteria) {
819
+ error[name] = validationResult;
820
+ }
821
+ }
822
+ }
823
+ if (!isEmptyObject(validationResult)) {
824
+ error[name] = {
825
+ ref: inputRef,
826
+ ...validationResult
827
+ };
828
+ if (!validateAllFieldCriteria) {
829
+ return error;
830
+ }
831
+ }
832
+ }
833
+ }
834
+ setCustomValidity(true);
835
+ return error;
836
+ };
837
+ var defaultOptions = {
838
+ mode: VALIDATION_MODE.onSubmit,
839
+ reValidateMode: VALIDATION_MODE.onChange,
840
+ shouldFocusError: true
841
+ };
842
+ function createFormControl(props = {}) {
843
+ let _options = {
844
+ ...defaultOptions,
845
+ ...props
846
+ };
847
+ let _formState = {
848
+ submitCount: 0,
849
+ isDirty: false,
850
+ isReady: false,
851
+ isLoading: isFunction(_options.defaultValues),
852
+ isValidating: false,
853
+ isSubmitted: false,
854
+ isSubmitting: false,
855
+ isSubmitSuccessful: false,
856
+ isValid: false,
857
+ touchedFields: {},
858
+ dirtyFields: {},
859
+ validatingFields: {},
860
+ errors: _options.errors || {},
861
+ disabled: _options.disabled || false
862
+ };
863
+ const _fields = {};
864
+ let _defaultValues = isObject(_options.defaultValues) || isObject(_options.values) ? cloneObject(_options.defaultValues || _options.values) || {} : {};
865
+ let _formValues = _options.shouldUnregister ? {} : cloneObject(_defaultValues);
866
+ let _state = {
867
+ action: false,
868
+ mount: false,
869
+ watch: false
870
+ };
871
+ let _names = {
872
+ mount: /* @__PURE__ */ new Set(),
873
+ disabled: /* @__PURE__ */ new Set(),
874
+ unMount: /* @__PURE__ */ new Set(),
875
+ array: /* @__PURE__ */ new Set(),
876
+ watch: /* @__PURE__ */ new Set()
877
+ };
878
+ let delayErrorCallback;
879
+ let timer = 0;
880
+ const _proxyFormState = {
881
+ isDirty: false,
882
+ dirtyFields: false,
883
+ validatingFields: false,
884
+ touchedFields: false,
885
+ isValidating: false,
886
+ isValid: false,
887
+ errors: false
888
+ };
889
+ let _proxySubscribeFormState = {
890
+ ..._proxyFormState
891
+ };
892
+ const _subjects = {
893
+ array: createSubject(),
894
+ state: createSubject()
895
+ };
896
+ const shouldDisplayAllAssociatedErrors = _options.criteriaMode === VALIDATION_MODE.all;
897
+ const debounce = (callback) => (wait) => {
898
+ clearTimeout(timer);
899
+ timer = setTimeout(callback, wait);
900
+ };
901
+ const _setValid = async (shouldUpdateValid) => {
902
+ if (!_options.disabled && (_proxyFormState.isValid || _proxySubscribeFormState.isValid || shouldUpdateValid)) {
903
+ const isValid = _options.resolver ? isEmptyObject((await _runSchema()).errors) : await executeBuiltInValidation(_fields, true);
904
+ if (isValid !== _formState.isValid) {
905
+ _subjects.state.next({
906
+ isValid
907
+ });
908
+ }
909
+ }
910
+ };
911
+ const _updateIsValidating = (names, isValidating) => {
912
+ if (!_options.disabled && (_proxyFormState.isValidating || _proxyFormState.validatingFields || _proxySubscribeFormState.isValidating || _proxySubscribeFormState.validatingFields)) {
913
+ (names || Array.from(_names.mount)).forEach((name) => {
914
+ if (name) {
915
+ isValidating ? set(_formState.validatingFields, name, isValidating) : unset(_formState.validatingFields, name);
916
+ }
917
+ });
918
+ _subjects.state.next({
919
+ validatingFields: _formState.validatingFields,
920
+ isValidating: !isEmptyObject(_formState.validatingFields)
921
+ });
922
+ }
923
+ };
924
+ const _setFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true) => {
925
+ if (args && method && !_options.disabled) {
926
+ _state.action = true;
927
+ if (shouldUpdateFieldsAndState && Array.isArray(get(_fields, name))) {
928
+ const fieldValues = method(get(_fields, name), args.argA, args.argB);
929
+ shouldSetValues && set(_fields, name, fieldValues);
930
+ }
931
+ if (shouldUpdateFieldsAndState && Array.isArray(get(_formState.errors, name))) {
932
+ const errors = method(get(_formState.errors, name), args.argA, args.argB);
933
+ shouldSetValues && set(_formState.errors, name, errors);
934
+ unsetEmptyArray(_formState.errors, name);
935
+ }
936
+ if ((_proxyFormState.touchedFields || _proxySubscribeFormState.touchedFields) && shouldUpdateFieldsAndState && Array.isArray(get(_formState.touchedFields, name))) {
937
+ const touchedFields = method(get(_formState.touchedFields, name), args.argA, args.argB);
938
+ shouldSetValues && set(_formState.touchedFields, name, touchedFields);
939
+ }
940
+ if (_proxyFormState.dirtyFields || _proxySubscribeFormState.dirtyFields) {
941
+ _formState.dirtyFields = getDirtyFields(_defaultValues, _formValues);
942
+ }
943
+ _subjects.state.next({
944
+ name,
945
+ isDirty: _getDirty(name, values),
946
+ dirtyFields: _formState.dirtyFields,
947
+ errors: _formState.errors,
948
+ isValid: _formState.isValid
949
+ });
950
+ } else {
951
+ set(_formValues, name, values);
952
+ }
953
+ };
954
+ const updateErrors = (name, error) => {
955
+ set(_formState.errors, name, error);
956
+ _subjects.state.next({
957
+ errors: _formState.errors
958
+ });
959
+ };
960
+ const _setErrors = (errors) => {
961
+ _formState.errors = errors;
962
+ _subjects.state.next({
963
+ errors: _formState.errors,
964
+ isValid: false
965
+ });
966
+ };
967
+ const updateValidAndValue = (name, shouldSkipSetValueAs, value, ref) => {
968
+ const field = get(_fields, name);
969
+ if (field) {
970
+ const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);
971
+ isUndefined(defaultValue) || ref && ref.defaultChecked || shouldSkipSetValueAs ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f)) : setFieldValue(name, defaultValue);
972
+ _state.mount && _setValid();
973
+ }
974
+ };
975
+ const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {
976
+ let shouldUpdateField = false;
977
+ let isPreviousDirty = false;
978
+ const output = {
979
+ name
980
+ };
981
+ if (!_options.disabled) {
982
+ if (!isBlurEvent || shouldDirty) {
983
+ if (_proxyFormState.isDirty || _proxySubscribeFormState.isDirty) {
984
+ isPreviousDirty = _formState.isDirty;
985
+ _formState.isDirty = output.isDirty = _getDirty();
986
+ shouldUpdateField = isPreviousDirty !== output.isDirty;
987
+ }
988
+ const isCurrentFieldPristine = deepEqual(get(_defaultValues, name), fieldValue);
989
+ isPreviousDirty = !!get(_formState.dirtyFields, name);
990
+ isCurrentFieldPristine ? unset(_formState.dirtyFields, name) : set(_formState.dirtyFields, name, true);
991
+ output.dirtyFields = _formState.dirtyFields;
992
+ shouldUpdateField = shouldUpdateField || (_proxyFormState.dirtyFields || _proxySubscribeFormState.dirtyFields) && isPreviousDirty !== !isCurrentFieldPristine;
993
+ }
994
+ if (isBlurEvent) {
995
+ const isPreviousFieldTouched = get(_formState.touchedFields, name);
996
+ if (!isPreviousFieldTouched) {
997
+ set(_formState.touchedFields, name, isBlurEvent);
998
+ output.touchedFields = _formState.touchedFields;
999
+ shouldUpdateField = shouldUpdateField || (_proxyFormState.touchedFields || _proxySubscribeFormState.touchedFields) && isPreviousFieldTouched !== isBlurEvent;
1000
+ }
1001
+ }
1002
+ shouldUpdateField && shouldRender && _subjects.state.next(output);
1003
+ }
1004
+ return shouldUpdateField ? output : {};
1005
+ };
1006
+ const shouldRenderByError = (name, isValid, error, fieldState) => {
1007
+ const previousFieldError = get(_formState.errors, name);
1008
+ const shouldUpdateValid = (_proxyFormState.isValid || _proxySubscribeFormState.isValid) && isBoolean(isValid) && _formState.isValid !== isValid;
1009
+ if (_options.delayError && error) {
1010
+ delayErrorCallback = debounce(() => updateErrors(name, error));
1011
+ delayErrorCallback(_options.delayError);
1012
+ } else {
1013
+ clearTimeout(timer);
1014
+ delayErrorCallback = null;
1015
+ error ? set(_formState.errors, name, error) : unset(_formState.errors, name);
1016
+ }
1017
+ if ((error ? !deepEqual(previousFieldError, error) : previousFieldError) || !isEmptyObject(fieldState) || shouldUpdateValid) {
1018
+ const updatedFormState = {
1019
+ ...fieldState,
1020
+ ...shouldUpdateValid && isBoolean(isValid) ? { isValid } : {},
1021
+ errors: _formState.errors,
1022
+ name
1023
+ };
1024
+ _formState = {
1025
+ ..._formState,
1026
+ ...updatedFormState
1027
+ };
1028
+ _subjects.state.next(updatedFormState);
1029
+ }
1030
+ };
1031
+ const _runSchema = async (name) => {
1032
+ _updateIsValidating(name, true);
1033
+ const result = await _options.resolver(_formValues, _options.context, getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation));
1034
+ _updateIsValidating(name);
1035
+ return result;
1036
+ };
1037
+ const executeSchemaAndUpdateState = async (names) => {
1038
+ const { errors } = await _runSchema(names);
1039
+ if (names) {
1040
+ for (const name of names) {
1041
+ const error = get(errors, name);
1042
+ error ? set(_formState.errors, name, error) : unset(_formState.errors, name);
1043
+ }
1044
+ } else {
1045
+ _formState.errors = errors;
1046
+ }
1047
+ return errors;
1048
+ };
1049
+ const executeBuiltInValidation = async (fields, shouldOnlyCheckValid, context = {
1050
+ valid: true
1051
+ }) => {
1052
+ for (const name in fields) {
1053
+ const field = fields[name];
1054
+ if (field) {
1055
+ const { _f, ...fieldValue } = field;
1056
+ if (_f) {
1057
+ const isFieldArrayRoot = _names.array.has(_f.name);
1058
+ const isPromiseFunction = field._f && hasPromiseValidation(field._f);
1059
+ if (isPromiseFunction && _proxyFormState.validatingFields) {
1060
+ _updateIsValidating([name], true);
1061
+ }
1062
+ const fieldError = await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !shouldOnlyCheckValid, isFieldArrayRoot);
1063
+ if (isPromiseFunction && _proxyFormState.validatingFields) {
1064
+ _updateIsValidating([name]);
1065
+ }
1066
+ if (fieldError[_f.name]) {
1067
+ context.valid = false;
1068
+ if (shouldOnlyCheckValid) {
1069
+ break;
1070
+ }
1071
+ }
1072
+ !shouldOnlyCheckValid && (get(fieldError, _f.name) ? isFieldArrayRoot ? updateFieldArrayRootError(_formState.errors, fieldError, _f.name) : set(_formState.errors, _f.name, fieldError[_f.name]) : unset(_formState.errors, _f.name));
1073
+ }
1074
+ !isEmptyObject(fieldValue) && await executeBuiltInValidation(fieldValue, shouldOnlyCheckValid, context);
1075
+ }
1076
+ }
1077
+ return context.valid;
1078
+ };
1079
+ const _removeUnmounted = () => {
1080
+ for (const name of _names.unMount) {
1081
+ const field = get(_fields, name);
1082
+ field && (field._f.refs ? field._f.refs.every((ref) => !live(ref)) : !live(field._f.ref)) && unregister(name);
1083
+ }
1084
+ _names.unMount = /* @__PURE__ */ new Set();
1085
+ };
1086
+ const _getDirty = (name, data) => !_options.disabled && (name && data && set(_formValues, name, data), !deepEqual(getValues(), _defaultValues));
1087
+ const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {
1088
+ ..._state.mount ? _formValues : isUndefined(defaultValue) ? _defaultValues : isString(names) ? { [names]: defaultValue } : defaultValue
1089
+ }, isGlobal, defaultValue);
1090
+ const _getFieldArray = (name) => compact(get(_state.mount ? _formValues : _defaultValues, name, _options.shouldUnregister ? get(_defaultValues, name, []) : []));
1091
+ const setFieldValue = (name, value, options = {}) => {
1092
+ const field = get(_fields, name);
1093
+ let fieldValue = value;
1094
+ if (field) {
1095
+ const fieldReference = field._f;
1096
+ if (fieldReference) {
1097
+ !fieldReference.disabled && set(_formValues, name, getFieldValueAs(value, fieldReference));
1098
+ fieldValue = isHTMLElement(fieldReference.ref) && isNullOrUndefined(value) ? "" : value;
1099
+ if (isMultipleSelect(fieldReference.ref)) {
1100
+ [...fieldReference.ref.options].forEach((optionRef) => optionRef.selected = fieldValue.includes(optionRef.value));
1101
+ } else if (fieldReference.refs) {
1102
+ if (isCheckBoxInput(fieldReference.ref)) {
1103
+ fieldReference.refs.forEach((checkboxRef) => {
1104
+ if (!checkboxRef.defaultChecked || !checkboxRef.disabled) {
1105
+ if (Array.isArray(fieldValue)) {
1106
+ checkboxRef.checked = !!fieldValue.find((data) => data === checkboxRef.value);
1107
+ } else {
1108
+ checkboxRef.checked = fieldValue === checkboxRef.value || !!fieldValue;
1109
+ }
1110
+ }
1111
+ });
1112
+ } else {
1113
+ fieldReference.refs.forEach((radioRef) => radioRef.checked = radioRef.value === fieldValue);
1114
+ }
1115
+ } else if (isFileInput(fieldReference.ref)) {
1116
+ fieldReference.ref.value = "";
1117
+ } else {
1118
+ fieldReference.ref.value = fieldValue;
1119
+ if (!fieldReference.ref.type) {
1120
+ _subjects.state.next({
1121
+ name,
1122
+ values: cloneObject(_formValues)
1123
+ });
1124
+ }
1125
+ }
1126
+ }
1127
+ }
1128
+ (options.shouldDirty || options.shouldTouch) && updateTouchAndDirty(name, fieldValue, options.shouldTouch, options.shouldDirty, true);
1129
+ options.shouldValidate && trigger(name);
1130
+ };
1131
+ const setValues = (name, value, options) => {
1132
+ for (const fieldKey in value) {
1133
+ if (!value.hasOwnProperty(fieldKey)) {
1134
+ return;
1135
+ }
1136
+ const fieldValue = value[fieldKey];
1137
+ const fieldName = `${name}.${fieldKey}`;
1138
+ const field = get(_fields, fieldName);
1139
+ (_names.array.has(name) || isObject(fieldValue) || field && !field._f) && !isDateObject(fieldValue) ? setValues(fieldName, fieldValue, options) : setFieldValue(fieldName, fieldValue, options);
1140
+ }
1141
+ };
1142
+ const setValue = (name, value, options = {}) => {
1143
+ const field = get(_fields, name);
1144
+ const isFieldArray = _names.array.has(name);
1145
+ const cloneValue = cloneObject(value);
1146
+ set(_formValues, name, cloneValue);
1147
+ if (isFieldArray) {
1148
+ _subjects.array.next({
1149
+ name,
1150
+ values: cloneObject(_formValues)
1151
+ });
1152
+ if ((_proxyFormState.isDirty || _proxyFormState.dirtyFields || _proxySubscribeFormState.isDirty || _proxySubscribeFormState.dirtyFields) && options.shouldDirty) {
1153
+ _subjects.state.next({
1154
+ name,
1155
+ dirtyFields: getDirtyFields(_defaultValues, _formValues),
1156
+ isDirty: _getDirty(name, cloneValue)
1157
+ });
1158
+ }
1159
+ } else {
1160
+ field && !field._f && !isNullOrUndefined(cloneValue) ? setValues(name, cloneValue, options) : setFieldValue(name, cloneValue, options);
1161
+ }
1162
+ isWatched(name, _names) && _subjects.state.next({ ..._formState });
1163
+ _subjects.state.next({
1164
+ name: _state.mount ? name : void 0,
1165
+ values: cloneObject(_formValues)
1166
+ });
1167
+ };
1168
+ const onChange = async (event) => {
1169
+ _state.mount = true;
1170
+ const target = event.target;
1171
+ let name = target.name;
1172
+ let isFieldValueUpdated = true;
1173
+ const field = get(_fields, name);
1174
+ const _updateIsFieldValueUpdated = (fieldValue) => {
1175
+ isFieldValueUpdated = Number.isNaN(fieldValue) || isDateObject(fieldValue) && isNaN(fieldValue.getTime()) || deepEqual(fieldValue, get(_formValues, name, fieldValue));
1176
+ };
1177
+ const validationModeBeforeSubmit = getValidationModes(_options.mode);
1178
+ const validationModeAfterSubmit = getValidationModes(_options.reValidateMode);
1179
+ if (field) {
1180
+ let error;
1181
+ let isValid;
1182
+ const fieldValue = target.type ? getFieldValue(field._f) : getEventValue(event);
1183
+ const isBlurEvent = event.type === EVENTS.BLUR || event.type === EVENTS.FOCUS_OUT;
1184
+ const shouldSkipValidation = !hasValidation(field._f) && !_options.resolver && !get(_formState.errors, name) && !field._f.deps || skipValidation(isBlurEvent, get(_formState.touchedFields, name), _formState.isSubmitted, validationModeAfterSubmit, validationModeBeforeSubmit);
1185
+ const watched = isWatched(name, _names, isBlurEvent);
1186
+ set(_formValues, name, fieldValue);
1187
+ if (isBlurEvent) {
1188
+ field._f.onBlur && field._f.onBlur(event);
1189
+ delayErrorCallback && delayErrorCallback(0);
1190
+ } else if (field._f.onChange) {
1191
+ field._f.onChange(event);
1192
+ }
1193
+ const fieldState = updateTouchAndDirty(name, fieldValue, isBlurEvent);
1194
+ const shouldRender = !isEmptyObject(fieldState) || watched;
1195
+ !isBlurEvent && _subjects.state.next({
1196
+ name,
1197
+ type: event.type,
1198
+ values: cloneObject(_formValues)
1199
+ });
1200
+ if (shouldSkipValidation) {
1201
+ if (_proxyFormState.isValid || _proxySubscribeFormState.isValid) {
1202
+ if (_options.mode === "onBlur") {
1203
+ if (isBlurEvent) {
1204
+ _setValid();
1205
+ }
1206
+ } else if (!isBlurEvent) {
1207
+ _setValid();
1208
+ }
1209
+ }
1210
+ return shouldRender && _subjects.state.next({ name, ...watched ? {} : fieldState });
1211
+ }
1212
+ !isBlurEvent && watched && _subjects.state.next({ ..._formState });
1213
+ if (_options.resolver) {
1214
+ const { errors } = await _runSchema([name]);
1215
+ _updateIsFieldValueUpdated(fieldValue);
1216
+ if (isFieldValueUpdated) {
1217
+ const previousErrorLookupResult = schemaErrorLookup(_formState.errors, _fields, name);
1218
+ const errorLookupResult = schemaErrorLookup(errors, _fields, previousErrorLookupResult.name || name);
1219
+ error = errorLookupResult.error;
1220
+ name = errorLookupResult.name;
1221
+ isValid = isEmptyObject(errors);
1222
+ }
1223
+ } else {
1224
+ _updateIsValidating([name], true);
1225
+ error = (await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name];
1226
+ _updateIsValidating([name]);
1227
+ _updateIsFieldValueUpdated(fieldValue);
1228
+ if (isFieldValueUpdated) {
1229
+ if (error) {
1230
+ isValid = false;
1231
+ } else if (_proxyFormState.isValid || _proxySubscribeFormState.isValid) {
1232
+ isValid = await executeBuiltInValidation(_fields, true);
1233
+ }
1234
+ }
1235
+ }
1236
+ if (isFieldValueUpdated) {
1237
+ field._f.deps && trigger(field._f.deps);
1238
+ shouldRenderByError(name, isValid, error, fieldState);
1239
+ }
1240
+ }
1241
+ };
1242
+ const _focusInput = (ref, key) => {
1243
+ if (get(_formState.errors, key) && ref.focus) {
1244
+ ref.focus();
1245
+ return 1;
1246
+ }
1247
+ return;
1248
+ };
1249
+ const trigger = async (name, options = {}) => {
1250
+ let isValid;
1251
+ let validationResult;
1252
+ const fieldNames = convertToArrayPayload(name);
1253
+ if (_options.resolver) {
1254
+ const errors = await executeSchemaAndUpdateState(isUndefined(name) ? name : fieldNames);
1255
+ isValid = isEmptyObject(errors);
1256
+ validationResult = name ? !fieldNames.some((name2) => get(errors, name2)) : isValid;
1257
+ } else if (name) {
1258
+ validationResult = (await Promise.all(fieldNames.map(async (fieldName) => {
1259
+ const field = get(_fields, fieldName);
1260
+ return await executeBuiltInValidation(field && field._f ? { [fieldName]: field } : field);
1261
+ }))).every(Boolean);
1262
+ !(!validationResult && !_formState.isValid) && _setValid();
1263
+ } else {
1264
+ validationResult = isValid = await executeBuiltInValidation(_fields);
1265
+ }
1266
+ _subjects.state.next({
1267
+ ...!isString(name) || (_proxyFormState.isValid || _proxySubscribeFormState.isValid) && isValid !== _formState.isValid ? {} : { name },
1268
+ ..._options.resolver || !name ? { isValid } : {},
1269
+ errors: _formState.errors
1270
+ });
1271
+ options.shouldFocus && !validationResult && iterateFieldsByAction(_fields, _focusInput, name ? fieldNames : _names.mount);
1272
+ return validationResult;
1273
+ };
1274
+ const getValues = (fieldNames) => {
1275
+ const values = {
1276
+ ..._state.mount ? _formValues : _defaultValues
1277
+ };
1278
+ return isUndefined(fieldNames) ? values : isString(fieldNames) ? get(values, fieldNames) : fieldNames.map((name) => get(values, name));
1279
+ };
1280
+ const getFieldState = (name, formState) => ({
1281
+ invalid: !!get((formState || _formState).errors, name),
1282
+ isDirty: !!get((formState || _formState).dirtyFields, name),
1283
+ error: get((formState || _formState).errors, name),
1284
+ isValidating: !!get(_formState.validatingFields, name),
1285
+ isTouched: !!get((formState || _formState).touchedFields, name)
1286
+ });
1287
+ const clearErrors = (name) => {
1288
+ name && convertToArrayPayload(name).forEach((inputName) => unset(_formState.errors, inputName));
1289
+ _subjects.state.next({
1290
+ errors: name ? _formState.errors : {}
1291
+ });
1292
+ };
1293
+ const setError = (name, error, options) => {
1294
+ const ref = (get(_fields, name, { _f: {} })._f || {}).ref;
1295
+ const currentError = get(_formState.errors, name) || {};
1296
+ const { ref: currentRef, message, type, ...restOfErrorTree } = currentError;
1297
+ set(_formState.errors, name, {
1298
+ ...restOfErrorTree,
1299
+ ...error,
1300
+ ref
1301
+ });
1302
+ _subjects.state.next({
1303
+ name,
1304
+ errors: _formState.errors,
1305
+ isValid: false
1306
+ });
1307
+ options && options.shouldFocus && ref && ref.focus && ref.focus();
1308
+ };
1309
+ const watch = (name, defaultValue) => isFunction(name) ? _subjects.state.subscribe({
1310
+ next: (payload) => name(_getWatch(void 0, defaultValue), payload)
1311
+ }) : _getWatch(name, defaultValue, true);
1312
+ const _subscribe = (props2) => _subjects.state.subscribe({
1313
+ next: (formState) => {
1314
+ if (shouldSubscribeByName(props2.name, formState.name, props2.exact) && shouldRenderFormState(formState, props2.formState || _proxyFormState, _setFormState, props2.reRenderRoot)) {
1315
+ props2.callback({
1316
+ values: { ..._formValues },
1317
+ ..._formState,
1318
+ ...formState
1319
+ });
1320
+ }
1321
+ }
1322
+ }).unsubscribe;
1323
+ const subscribe = (props2) => {
1324
+ _state.mount = true;
1325
+ _proxySubscribeFormState = {
1326
+ ..._proxySubscribeFormState,
1327
+ ...props2.formState
1328
+ };
1329
+ return _subscribe({
1330
+ ...props2,
1331
+ formState: _proxySubscribeFormState
1332
+ });
1333
+ };
1334
+ const unregister = (name, options = {}) => {
1335
+ for (const fieldName of name ? convertToArrayPayload(name) : _names.mount) {
1336
+ _names.mount.delete(fieldName);
1337
+ _names.array.delete(fieldName);
1338
+ if (!options.keepValue) {
1339
+ unset(_fields, fieldName);
1340
+ unset(_formValues, fieldName);
1341
+ }
1342
+ !options.keepError && unset(_formState.errors, fieldName);
1343
+ !options.keepDirty && unset(_formState.dirtyFields, fieldName);
1344
+ !options.keepTouched && unset(_formState.touchedFields, fieldName);
1345
+ !options.keepIsValidating && unset(_formState.validatingFields, fieldName);
1346
+ !_options.shouldUnregister && !options.keepDefaultValue && unset(_defaultValues, fieldName);
1347
+ }
1348
+ _subjects.state.next({
1349
+ values: cloneObject(_formValues)
1350
+ });
1351
+ _subjects.state.next({
1352
+ ..._formState,
1353
+ ...!options.keepDirty ? {} : { isDirty: _getDirty() }
1354
+ });
1355
+ !options.keepIsValid && _setValid();
1356
+ };
1357
+ const _setDisabledField = ({ disabled, name }) => {
1358
+ if (isBoolean(disabled) && _state.mount || !!disabled || _names.disabled.has(name)) {
1359
+ disabled ? _names.disabled.add(name) : _names.disabled.delete(name);
1360
+ }
1361
+ };
1362
+ const register = (name, options = {}) => {
1363
+ let field = get(_fields, name);
1364
+ const disabledIsDefined = isBoolean(options.disabled) || isBoolean(_options.disabled);
1365
+ set(_fields, name, {
1366
+ ...field || {},
1367
+ _f: {
1368
+ ...field && field._f ? field._f : { ref: { name } },
1369
+ name,
1370
+ mount: true,
1371
+ ...options
1372
+ }
1373
+ });
1374
+ _names.mount.add(name);
1375
+ if (field) {
1376
+ _setDisabledField({
1377
+ disabled: isBoolean(options.disabled) ? options.disabled : _options.disabled,
1378
+ name
1379
+ });
1380
+ } else {
1381
+ updateValidAndValue(name, true, options.value);
1382
+ }
1383
+ return {
1384
+ ...disabledIsDefined ? { disabled: options.disabled || _options.disabled } : {},
1385
+ ..._options.progressive ? {
1386
+ required: !!options.required,
1387
+ min: getRuleValue(options.min),
1388
+ max: getRuleValue(options.max),
1389
+ minLength: getRuleValue(options.minLength),
1390
+ maxLength: getRuleValue(options.maxLength),
1391
+ pattern: getRuleValue(options.pattern)
1392
+ } : {},
1393
+ name,
1394
+ onChange,
1395
+ onBlur: onChange,
1396
+ ref: (ref) => {
1397
+ if (ref) {
1398
+ register(name, options);
1399
+ field = get(_fields, name);
1400
+ const fieldRef = isUndefined(ref.value) ? ref.querySelectorAll ? ref.querySelectorAll("input,select,textarea")[0] || ref : ref : ref;
1401
+ const radioOrCheckbox = isRadioOrCheckbox(fieldRef);
1402
+ const refs = field._f.refs || [];
1403
+ if (radioOrCheckbox ? refs.find((option) => option === fieldRef) : fieldRef === field._f.ref) {
1404
+ return;
1405
+ }
1406
+ set(_fields, name, {
1407
+ _f: {
1408
+ ...field._f,
1409
+ ...radioOrCheckbox ? {
1410
+ refs: [
1411
+ ...refs.filter(live),
1412
+ fieldRef,
1413
+ ...Array.isArray(get(_defaultValues, name)) ? [{}] : []
1414
+ ],
1415
+ ref: { type: fieldRef.type, name }
1416
+ } : { ref: fieldRef }
1417
+ }
1418
+ });
1419
+ updateValidAndValue(name, false, void 0, fieldRef);
1420
+ } else {
1421
+ field = get(_fields, name, {});
1422
+ if (field._f) {
1423
+ field._f.mount = false;
1424
+ }
1425
+ (_options.shouldUnregister || options.shouldUnregister) && !(isNameInFieldArray(_names.array, name) && _state.action) && _names.unMount.add(name);
1426
+ }
1427
+ }
1428
+ };
1429
+ };
1430
+ const _focusError = () => _options.shouldFocusError && iterateFieldsByAction(_fields, _focusInput, _names.mount);
1431
+ const _disableForm = (disabled) => {
1432
+ if (isBoolean(disabled)) {
1433
+ _subjects.state.next({ disabled });
1434
+ iterateFieldsByAction(_fields, (ref, name) => {
1435
+ const currentField = get(_fields, name);
1436
+ if (currentField) {
1437
+ ref.disabled = currentField._f.disabled || disabled;
1438
+ if (Array.isArray(currentField._f.refs)) {
1439
+ currentField._f.refs.forEach((inputRef) => {
1440
+ inputRef.disabled = currentField._f.disabled || disabled;
1441
+ });
1442
+ }
1443
+ }
1444
+ }, 0, false);
1445
+ }
1446
+ };
1447
+ const handleSubmit = (onValid, onInvalid) => async (e) => {
1448
+ let onValidError = void 0;
1449
+ if (e) {
1450
+ e.preventDefault && e.preventDefault();
1451
+ e.persist && e.persist();
1452
+ }
1453
+ let fieldValues = cloneObject(_formValues);
1454
+ _subjects.state.next({
1455
+ isSubmitting: true
1456
+ });
1457
+ if (_options.resolver) {
1458
+ const { errors, values } = await _runSchema();
1459
+ _formState.errors = errors;
1460
+ fieldValues = values;
1461
+ } else {
1462
+ await executeBuiltInValidation(_fields);
1463
+ }
1464
+ if (_names.disabled.size) {
1465
+ for (const name of _names.disabled) {
1466
+ set(fieldValues, name, void 0);
1467
+ }
1468
+ }
1469
+ unset(_formState.errors, "root");
1470
+ if (isEmptyObject(_formState.errors)) {
1471
+ _subjects.state.next({
1472
+ errors: {}
1473
+ });
1474
+ try {
1475
+ await onValid(fieldValues, e);
1476
+ } catch (error) {
1477
+ onValidError = error;
1478
+ }
1479
+ } else {
1480
+ if (onInvalid) {
1481
+ await onInvalid({ ..._formState.errors }, e);
1482
+ }
1483
+ _focusError();
1484
+ setTimeout(_focusError);
1485
+ }
1486
+ _subjects.state.next({
1487
+ isSubmitted: true,
1488
+ isSubmitting: false,
1489
+ isSubmitSuccessful: isEmptyObject(_formState.errors) && !onValidError,
1490
+ submitCount: _formState.submitCount + 1,
1491
+ errors: _formState.errors
1492
+ });
1493
+ if (onValidError) {
1494
+ throw onValidError;
1495
+ }
1496
+ };
1497
+ const resetField = (name, options = {}) => {
1498
+ if (get(_fields, name)) {
1499
+ if (isUndefined(options.defaultValue)) {
1500
+ setValue(name, cloneObject(get(_defaultValues, name)));
1501
+ } else {
1502
+ setValue(name, options.defaultValue);
1503
+ set(_defaultValues, name, cloneObject(options.defaultValue));
1504
+ }
1505
+ if (!options.keepTouched) {
1506
+ unset(_formState.touchedFields, name);
1507
+ }
1508
+ if (!options.keepDirty) {
1509
+ unset(_formState.dirtyFields, name);
1510
+ _formState.isDirty = options.defaultValue ? _getDirty(name, cloneObject(get(_defaultValues, name))) : _getDirty();
1511
+ }
1512
+ if (!options.keepError) {
1513
+ unset(_formState.errors, name);
1514
+ _proxyFormState.isValid && _setValid();
1515
+ }
1516
+ _subjects.state.next({ ..._formState });
1517
+ }
1518
+ };
1519
+ const _reset = (formValues, keepStateOptions = {}) => {
1520
+ const updatedValues = formValues ? cloneObject(formValues) : _defaultValues;
1521
+ const cloneUpdatedValues = cloneObject(updatedValues);
1522
+ const isEmptyResetValues = isEmptyObject(formValues);
1523
+ const values = isEmptyResetValues ? _defaultValues : cloneUpdatedValues;
1524
+ if (!keepStateOptions.keepDefaultValues) {
1525
+ _defaultValues = updatedValues;
1526
+ }
1527
+ if (!keepStateOptions.keepValues) {
1528
+ if (keepStateOptions.keepDirtyValues) {
1529
+ const fieldsToCheck = /* @__PURE__ */ new Set([
1530
+ ..._names.mount,
1531
+ ...Object.keys(getDirtyFields(_defaultValues, _formValues))
1532
+ ]);
1533
+ for (const fieldName of Array.from(fieldsToCheck)) {
1534
+ get(_formState.dirtyFields, fieldName) ? set(values, fieldName, get(_formValues, fieldName)) : setValue(fieldName, get(values, fieldName));
1535
+ }
1536
+ } else {
1537
+ if (isWeb && isUndefined(formValues)) {
1538
+ for (const name of _names.mount) {
1539
+ const field = get(_fields, name);
1540
+ if (field && field._f) {
1541
+ const fieldReference = Array.isArray(field._f.refs) ? field._f.refs[0] : field._f.ref;
1542
+ if (isHTMLElement(fieldReference)) {
1543
+ const form = fieldReference.closest("form");
1544
+ if (form) {
1545
+ form.reset();
1546
+ break;
1547
+ }
1548
+ }
1549
+ }
1550
+ }
1551
+ }
1552
+ for (const fieldName of _names.mount) {
1553
+ setValue(fieldName, get(values, fieldName));
1554
+ }
1555
+ }
1556
+ _formValues = cloneObject(values);
1557
+ _subjects.array.next({
1558
+ values: { ...values }
1559
+ });
1560
+ _subjects.state.next({
1561
+ values: { ...values }
1562
+ });
1563
+ }
1564
+ _names = {
1565
+ mount: keepStateOptions.keepDirtyValues ? _names.mount : /* @__PURE__ */ new Set(),
1566
+ unMount: /* @__PURE__ */ new Set(),
1567
+ array: /* @__PURE__ */ new Set(),
1568
+ disabled: /* @__PURE__ */ new Set(),
1569
+ watch: /* @__PURE__ */ new Set(),
1570
+ watchAll: false,
1571
+ focus: ""
1572
+ };
1573
+ _state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid || !!keepStateOptions.keepDirtyValues;
1574
+ _state.watch = !!_options.shouldUnregister;
1575
+ _subjects.state.next({
1576
+ submitCount: keepStateOptions.keepSubmitCount ? _formState.submitCount : 0,
1577
+ isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual(formValues, _defaultValues)),
1578
+ isSubmitted: keepStateOptions.keepIsSubmitted ? _formState.isSubmitted : false,
1579
+ dirtyFields: isEmptyResetValues ? {} : keepStateOptions.keepDirtyValues ? keepStateOptions.keepDefaultValues && _formValues ? getDirtyFields(_defaultValues, _formValues) : _formState.dirtyFields : keepStateOptions.keepDefaultValues && formValues ? getDirtyFields(_defaultValues, formValues) : keepStateOptions.keepDirty ? _formState.dirtyFields : {},
1580
+ touchedFields: keepStateOptions.keepTouched ? _formState.touchedFields : {},
1581
+ errors: keepStateOptions.keepErrors ? _formState.errors : {},
1582
+ isSubmitSuccessful: keepStateOptions.keepIsSubmitSuccessful ? _formState.isSubmitSuccessful : false,
1583
+ isSubmitting: false
1584
+ });
1585
+ };
1586
+ const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues) ? formValues(_formValues) : formValues, keepStateOptions);
1587
+ const setFocus = (name, options = {}) => {
1588
+ const field = get(_fields, name);
1589
+ const fieldReference = field && field._f;
1590
+ if (fieldReference) {
1591
+ const fieldRef = fieldReference.refs ? fieldReference.refs[0] : fieldReference.ref;
1592
+ if (fieldRef.focus) {
1593
+ fieldRef.focus();
1594
+ options.shouldSelect && isFunction(fieldRef.select) && fieldRef.select();
1595
+ }
1596
+ }
1597
+ };
1598
+ const _setFormState = (updatedFormState) => {
1599
+ _formState = {
1600
+ ..._formState,
1601
+ ...updatedFormState
1602
+ };
1603
+ };
1604
+ const _resetDefaultValues = () => isFunction(_options.defaultValues) && _options.defaultValues().then((values) => {
1605
+ reset(values, _options.resetOptions);
1606
+ _subjects.state.next({
1607
+ isLoading: false
1608
+ });
1609
+ });
1610
+ const methods = {
1611
+ control: {
1612
+ register,
1613
+ unregister,
1614
+ getFieldState,
1615
+ handleSubmit,
1616
+ setError,
1617
+ _subscribe,
1618
+ _runSchema,
1619
+ _getWatch,
1620
+ _getDirty,
1621
+ _setValid,
1622
+ _setFieldArray,
1623
+ _setDisabledField,
1624
+ _setErrors,
1625
+ _getFieldArray,
1626
+ _reset,
1627
+ _resetDefaultValues,
1628
+ _removeUnmounted,
1629
+ _disableForm,
1630
+ _subjects,
1631
+ _proxyFormState,
1632
+ get _fields() {
1633
+ return _fields;
1634
+ },
1635
+ get _formValues() {
1636
+ return _formValues;
1637
+ },
1638
+ get _state() {
1639
+ return _state;
1640
+ },
1641
+ set _state(value) {
1642
+ _state = value;
1643
+ },
1644
+ get _defaultValues() {
1645
+ return _defaultValues;
1646
+ },
1647
+ get _names() {
1648
+ return _names;
1649
+ },
1650
+ set _names(value) {
1651
+ _names = value;
1652
+ },
1653
+ get _formState() {
1654
+ return _formState;
1655
+ },
1656
+ get _options() {
1657
+ return _options;
1658
+ },
1659
+ set _options(value) {
1660
+ _options = {
1661
+ ..._options,
1662
+ ...value
1663
+ };
1664
+ }
1665
+ },
1666
+ subscribe,
1667
+ trigger,
1668
+ register,
1669
+ handleSubmit,
1670
+ watch,
1671
+ setValue,
1672
+ getValues,
1673
+ reset,
1674
+ resetField,
1675
+ clearErrors,
1676
+ unregister,
1677
+ setError,
1678
+ setFocus,
1679
+ getFieldState
1680
+ };
1681
+ return {
1682
+ ...methods,
1683
+ formControl: methods
1684
+ };
1685
+ }
1686
+ var generateId = () => {
1687
+ const d = typeof performance === "undefined" ? Date.now() : performance.now() * 1e3;
1688
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
1689
+ const r = (Math.random() * 16 + d) % 16 | 0;
1690
+ return (c == "x" ? r : r & 3 | 8).toString(16);
1691
+ });
1692
+ };
1693
+ var getFocusFieldName = (name, index, options = {}) => options.shouldFocus || isUndefined(options.shouldFocus) ? options.focusName || `${name}.${isUndefined(options.focusIndex) ? index : options.focusIndex}.` : "";
1694
+ var appendAt = (data, value) => [
1695
+ ...data,
1696
+ ...convertToArrayPayload(value)
1697
+ ];
1698
+ var fillEmptyArray = (value) => Array.isArray(value) ? value.map(() => void 0) : void 0;
1699
+ function insert(data, index, value) {
1700
+ return [
1701
+ ...data.slice(0, index),
1702
+ ...convertToArrayPayload(value),
1703
+ ...data.slice(index)
1704
+ ];
1705
+ }
1706
+ var moveArrayAt = (data, from, to) => {
1707
+ if (!Array.isArray(data)) {
1708
+ return [];
1709
+ }
1710
+ if (isUndefined(data[to])) {
1711
+ data[to] = void 0;
1712
+ }
1713
+ data.splice(to, 0, data.splice(from, 1)[0]);
1714
+ return data;
1715
+ };
1716
+ var prependAt = (data, value) => [
1717
+ ...convertToArrayPayload(value),
1718
+ ...convertToArrayPayload(data)
1719
+ ];
1720
+ function removeAtIndexes(data, indexes) {
1721
+ let i = 0;
1722
+ const temp = [...data];
1723
+ for (const index of indexes) {
1724
+ temp.splice(index - i, 1);
1725
+ i++;
1726
+ }
1727
+ return compact(temp).length ? temp : [];
1728
+ }
1729
+ var removeArrayAt = (data, index) => isUndefined(index) ? [] : removeAtIndexes(data, convertToArrayPayload(index).sort((a, b) => a - b));
1730
+ var swapArrayAt = (data, indexA, indexB) => {
1731
+ [data[indexA], data[indexB]] = [data[indexB], data[indexA]];
1732
+ };
1733
+ var updateAt = (fieldValues, index, value) => {
1734
+ fieldValues[index] = value;
1735
+ return fieldValues;
1736
+ };
1737
+ function useFieldArray(props) {
1738
+ const methods = useFormContext();
1739
+ const { control = methods.control, name, keyName = "id", shouldUnregister, rules } = props;
1740
+ const [fields, setFields] = import_react.default.useState(control._getFieldArray(name));
1741
+ const ids = import_react.default.useRef(control._getFieldArray(name).map(generateId));
1742
+ const _fieldIds = import_react.default.useRef(fields);
1743
+ const _name = import_react.default.useRef(name);
1744
+ const _actioned = import_react.default.useRef(false);
1745
+ _name.current = name;
1746
+ _fieldIds.current = fields;
1747
+ control._names.array.add(name);
1748
+ rules && control.register(name, rules);
1749
+ import_react.default.useEffect(() => control._subjects.array.subscribe({
1750
+ next: ({ values, name: fieldArrayName }) => {
1751
+ if (fieldArrayName === _name.current || !fieldArrayName) {
1752
+ const fieldValues = get(values, _name.current);
1753
+ if (Array.isArray(fieldValues)) {
1754
+ setFields(fieldValues);
1755
+ ids.current = fieldValues.map(generateId);
1756
+ }
1757
+ }
1758
+ }
1759
+ }).unsubscribe, [control]);
1760
+ const updateValues = import_react.default.useCallback((updatedFieldArrayValues) => {
1761
+ _actioned.current = true;
1762
+ control._setFieldArray(name, updatedFieldArrayValues);
1763
+ }, [control, name]);
1764
+ const append = (value, options) => {
1765
+ const appendValue = convertToArrayPayload(cloneObject(value));
1766
+ const updatedFieldArrayValues = appendAt(control._getFieldArray(name), appendValue);
1767
+ control._names.focus = getFocusFieldName(name, updatedFieldArrayValues.length - 1, options);
1768
+ ids.current = appendAt(ids.current, appendValue.map(generateId));
1769
+ updateValues(updatedFieldArrayValues);
1770
+ setFields(updatedFieldArrayValues);
1771
+ control._setFieldArray(name, updatedFieldArrayValues, appendAt, {
1772
+ argA: fillEmptyArray(value)
1773
+ });
1774
+ };
1775
+ const prepend = (value, options) => {
1776
+ const prependValue = convertToArrayPayload(cloneObject(value));
1777
+ const updatedFieldArrayValues = prependAt(control._getFieldArray(name), prependValue);
1778
+ control._names.focus = getFocusFieldName(name, 0, options);
1779
+ ids.current = prependAt(ids.current, prependValue.map(generateId));
1780
+ updateValues(updatedFieldArrayValues);
1781
+ setFields(updatedFieldArrayValues);
1782
+ control._setFieldArray(name, updatedFieldArrayValues, prependAt, {
1783
+ argA: fillEmptyArray(value)
1784
+ });
1785
+ };
1786
+ const remove = (index) => {
1787
+ const updatedFieldArrayValues = removeArrayAt(control._getFieldArray(name), index);
1788
+ ids.current = removeArrayAt(ids.current, index);
1789
+ updateValues(updatedFieldArrayValues);
1790
+ setFields(updatedFieldArrayValues);
1791
+ !Array.isArray(get(control._fields, name)) && set(control._fields, name, void 0);
1792
+ control._setFieldArray(name, updatedFieldArrayValues, removeArrayAt, {
1793
+ argA: index
1794
+ });
1795
+ };
1796
+ const insert$1 = (index, value, options) => {
1797
+ const insertValue = convertToArrayPayload(cloneObject(value));
1798
+ const updatedFieldArrayValues = insert(control._getFieldArray(name), index, insertValue);
1799
+ control._names.focus = getFocusFieldName(name, index, options);
1800
+ ids.current = insert(ids.current, index, insertValue.map(generateId));
1801
+ updateValues(updatedFieldArrayValues);
1802
+ setFields(updatedFieldArrayValues);
1803
+ control._setFieldArray(name, updatedFieldArrayValues, insert, {
1804
+ argA: index,
1805
+ argB: fillEmptyArray(value)
1806
+ });
1807
+ };
1808
+ const swap = (indexA, indexB) => {
1809
+ const updatedFieldArrayValues = control._getFieldArray(name);
1810
+ swapArrayAt(updatedFieldArrayValues, indexA, indexB);
1811
+ swapArrayAt(ids.current, indexA, indexB);
1812
+ updateValues(updatedFieldArrayValues);
1813
+ setFields(updatedFieldArrayValues);
1814
+ control._setFieldArray(name, updatedFieldArrayValues, swapArrayAt, {
1815
+ argA: indexA,
1816
+ argB: indexB
1817
+ }, false);
1818
+ };
1819
+ const move = (from, to) => {
1820
+ const updatedFieldArrayValues = control._getFieldArray(name);
1821
+ moveArrayAt(updatedFieldArrayValues, from, to);
1822
+ moveArrayAt(ids.current, from, to);
1823
+ updateValues(updatedFieldArrayValues);
1824
+ setFields(updatedFieldArrayValues);
1825
+ control._setFieldArray(name, updatedFieldArrayValues, moveArrayAt, {
1826
+ argA: from,
1827
+ argB: to
1828
+ }, false);
1829
+ };
1830
+ const update = (index, value) => {
1831
+ const updateValue = cloneObject(value);
1832
+ const updatedFieldArrayValues = updateAt(control._getFieldArray(name), index, updateValue);
1833
+ ids.current = [...updatedFieldArrayValues].map((item, i) => !item || i === index ? generateId() : ids.current[i]);
1834
+ updateValues(updatedFieldArrayValues);
1835
+ setFields([...updatedFieldArrayValues]);
1836
+ control._setFieldArray(name, updatedFieldArrayValues, updateAt, {
1837
+ argA: index,
1838
+ argB: updateValue
1839
+ }, true, false);
1840
+ };
1841
+ const replace = (value) => {
1842
+ const updatedFieldArrayValues = convertToArrayPayload(cloneObject(value));
1843
+ ids.current = updatedFieldArrayValues.map(generateId);
1844
+ updateValues([...updatedFieldArrayValues]);
1845
+ setFields([...updatedFieldArrayValues]);
1846
+ control._setFieldArray(name, [...updatedFieldArrayValues], (data) => data, {}, true, false);
1847
+ };
1848
+ import_react.default.useEffect(() => {
1849
+ control._state.action = false;
1850
+ isWatched(name, control._names) && control._subjects.state.next({
1851
+ ...control._formState
1852
+ });
1853
+ if (_actioned.current && (!getValidationModes(control._options.mode).isOnSubmit || control._formState.isSubmitted) && !getValidationModes(control._options.reValidateMode).isOnSubmit) {
1854
+ if (control._options.resolver) {
1855
+ control._runSchema([name]).then((result) => {
1856
+ const error = get(result.errors, name);
1857
+ const existingError = get(control._formState.errors, name);
1858
+ if (existingError ? !error && existingError.type || error && (existingError.type !== error.type || existingError.message !== error.message) : error && error.type) {
1859
+ error ? set(control._formState.errors, name, error) : unset(control._formState.errors, name);
1860
+ control._subjects.state.next({
1861
+ errors: control._formState.errors
1862
+ });
1863
+ }
1864
+ });
1865
+ } else {
1866
+ const field = get(control._fields, name);
1867
+ if (field && field._f && !(getValidationModes(control._options.reValidateMode).isOnSubmit && getValidationModes(control._options.mode).isOnSubmit)) {
1868
+ validateField(field, control._names.disabled, control._formValues, control._options.criteriaMode === VALIDATION_MODE.all, control._options.shouldUseNativeValidation, true).then((error) => !isEmptyObject(error) && control._subjects.state.next({
1869
+ errors: updateFieldArrayRootError(control._formState.errors, error, name)
1870
+ }));
1871
+ }
1872
+ }
1873
+ }
1874
+ control._subjects.state.next({
1875
+ name,
1876
+ values: cloneObject(control._formValues)
1877
+ });
1878
+ control._names.focus && iterateFieldsByAction(control._fields, (ref, key) => {
1879
+ if (control._names.focus && key.startsWith(control._names.focus) && ref.focus) {
1880
+ ref.focus();
1881
+ return 1;
1882
+ }
1883
+ return;
1884
+ });
1885
+ control._names.focus = "";
1886
+ control._setValid();
1887
+ _actioned.current = false;
1888
+ }, [fields, name, control]);
1889
+ import_react.default.useEffect(() => {
1890
+ !get(control._formValues, name) && control._setFieldArray(name);
1891
+ return () => {
1892
+ const updateMounted = (name2, value) => {
1893
+ const field = get(control._fields, name2);
1894
+ if (field && field._f) {
1895
+ field._f.mount = value;
1896
+ }
1897
+ };
1898
+ control._options.shouldUnregister || shouldUnregister ? control.unregister(name) : updateMounted(name, false);
1899
+ };
1900
+ }, [name, control, keyName, shouldUnregister]);
1901
+ return {
1902
+ swap: import_react.default.useCallback(swap, [updateValues, name, control]),
1903
+ move: import_react.default.useCallback(move, [updateValues, name, control]),
1904
+ prepend: import_react.default.useCallback(prepend, [updateValues, name, control]),
1905
+ append: import_react.default.useCallback(append, [updateValues, name, control]),
1906
+ remove: import_react.default.useCallback(remove, [updateValues, name, control]),
1907
+ insert: import_react.default.useCallback(insert$1, [updateValues, name, control]),
1908
+ update: import_react.default.useCallback(update, [updateValues, name, control]),
1909
+ replace: import_react.default.useCallback(replace, [updateValues, name, control]),
1910
+ fields: import_react.default.useMemo(() => fields.map((field, index) => ({
1911
+ ...field,
1912
+ [keyName]: ids.current[index] || generateId()
1913
+ })), [fields, keyName])
1914
+ };
1915
+ }
1916
+ function useForm(props = {}) {
1917
+ const _formControl = import_react.default.useRef(void 0);
1918
+ const _values = import_react.default.useRef(void 0);
1919
+ const [formState, updateFormState] = import_react.default.useState({
1920
+ isDirty: false,
1921
+ isValidating: false,
1922
+ isLoading: isFunction(props.defaultValues),
1923
+ isSubmitted: false,
1924
+ isSubmitting: false,
1925
+ isSubmitSuccessful: false,
1926
+ isValid: false,
1927
+ submitCount: 0,
1928
+ dirtyFields: {},
1929
+ touchedFields: {},
1930
+ validatingFields: {},
1931
+ errors: props.errors || {},
1932
+ disabled: props.disabled || false,
1933
+ isReady: false,
1934
+ defaultValues: isFunction(props.defaultValues) ? void 0 : props.defaultValues
1935
+ });
1936
+ if (!_formControl.current) {
1937
+ _formControl.current = {
1938
+ ...props.formControl ? props.formControl : createFormControl(props),
1939
+ formState
1940
+ };
1941
+ if (props.formControl && props.defaultValues && !isFunction(props.defaultValues)) {
1942
+ props.formControl.reset(props.defaultValues, props.resetOptions);
1943
+ }
1944
+ }
1945
+ const control = _formControl.current.control;
1946
+ control._options = props;
1947
+ useIsomorphicLayoutEffect(() => {
1948
+ const sub = control._subscribe({
1949
+ formState: control._proxyFormState,
1950
+ callback: () => updateFormState({ ...control._formState }),
1951
+ reRenderRoot: true
1952
+ });
1953
+ updateFormState((data) => ({
1954
+ ...data,
1955
+ isReady: true
1956
+ }));
1957
+ control._formState.isReady = true;
1958
+ return sub;
1959
+ }, [control]);
1960
+ import_react.default.useEffect(() => control._disableForm(props.disabled), [control, props.disabled]);
1961
+ import_react.default.useEffect(() => {
1962
+ if (props.mode) {
1963
+ control._options.mode = props.mode;
1964
+ }
1965
+ if (props.reValidateMode) {
1966
+ control._options.reValidateMode = props.reValidateMode;
1967
+ }
1968
+ if (props.errors && !isEmptyObject(props.errors)) {
1969
+ control._setErrors(props.errors);
1970
+ }
1971
+ }, [control, props.errors, props.mode, props.reValidateMode]);
1972
+ import_react.default.useEffect(() => {
1973
+ props.shouldUnregister && control._subjects.state.next({
1974
+ values: control._getWatch()
1975
+ });
1976
+ }, [control, props.shouldUnregister]);
1977
+ import_react.default.useEffect(() => {
1978
+ if (control._proxyFormState.isDirty) {
1979
+ const isDirty = control._getDirty();
1980
+ if (isDirty !== formState.isDirty) {
1981
+ control._subjects.state.next({
1982
+ isDirty
1983
+ });
1984
+ }
1985
+ }
1986
+ }, [control, formState.isDirty]);
1987
+ import_react.default.useEffect(() => {
1988
+ if (props.values && !deepEqual(props.values, _values.current)) {
1989
+ control._reset(props.values, control._options.resetOptions);
1990
+ _values.current = props.values;
1991
+ updateFormState((state) => ({ ...state }));
1992
+ } else {
1993
+ control._resetDefaultValues();
1994
+ }
1995
+ }, [control, props.values]);
1996
+ import_react.default.useEffect(() => {
1997
+ if (!control._state.mount) {
1998
+ control._setValid();
1999
+ control._state.mount = true;
2000
+ }
2001
+ if (control._state.watch) {
2002
+ control._state.watch = false;
2003
+ control._subjects.state.next({ ...control._formState });
2004
+ }
2005
+ control._removeUnmounted();
2006
+ });
2007
+ _formControl.current.formState = getProxyFormState(formState, control);
2008
+ return _formControl.current;
2009
+ }
2010
+
2011
+ export {
2012
+ get,
2013
+ set,
2014
+ useFormContext,
2015
+ FormProvider,
2016
+ useFormState,
2017
+ useWatch,
2018
+ useController,
2019
+ Controller,
2020
+ Form,
2021
+ appendErrors,
2022
+ createFormControl,
2023
+ useFieldArray,
2024
+ useForm
2025
+ };
2026
+ //# sourceMappingURL=chunk-5XBW43HD.js.map
frontend/node_modules/.vite/deps/chunk-5XBW43HD.js.map ADDED
The diff for this file is too large to render. See raw diff
 
frontend/node_modules/.vite/deps/chunk-6PXSGDAH.js ADDED
@@ -0,0 +1,928 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ require_react
3
+ } from "./chunk-DRWLMN53.js";
4
+ import {
5
+ __commonJS
6
+ } from "./chunk-G3PMV62Z.js";
7
+
8
+ // node_modules/react/cjs/react-jsx-runtime.development.js
9
+ var require_react_jsx_runtime_development = __commonJS({
10
+ "node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
11
+ "use strict";
12
+ if (true) {
13
+ (function() {
14
+ "use strict";
15
+ var React = require_react();
16
+ var REACT_ELEMENT_TYPE = Symbol.for("react.element");
17
+ var REACT_PORTAL_TYPE = Symbol.for("react.portal");
18
+ var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
19
+ var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
20
+ var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
21
+ var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
22
+ var REACT_CONTEXT_TYPE = Symbol.for("react.context");
23
+ var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
24
+ var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
25
+ var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
26
+ var REACT_MEMO_TYPE = Symbol.for("react.memo");
27
+ var REACT_LAZY_TYPE = Symbol.for("react.lazy");
28
+ var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
29
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
30
+ var FAUX_ITERATOR_SYMBOL = "@@iterator";
31
+ function getIteratorFn(maybeIterable) {
32
+ if (maybeIterable === null || typeof maybeIterable !== "object") {
33
+ return null;
34
+ }
35
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
36
+ if (typeof maybeIterator === "function") {
37
+ return maybeIterator;
38
+ }
39
+ return null;
40
+ }
41
+ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
42
+ function error(format) {
43
+ {
44
+ {
45
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
46
+ args[_key2 - 1] = arguments[_key2];
47
+ }
48
+ printWarning("error", format, args);
49
+ }
50
+ }
51
+ }
52
+ function printWarning(level, format, args) {
53
+ {
54
+ var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
55
+ var stack = ReactDebugCurrentFrame2.getStackAddendum();
56
+ if (stack !== "") {
57
+ format += "%s";
58
+ args = args.concat([stack]);
59
+ }
60
+ var argsWithFormat = args.map(function(item) {
61
+ return String(item);
62
+ });
63
+ argsWithFormat.unshift("Warning: " + format);
64
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
65
+ }
66
+ }
67
+ var enableScopeAPI = false;
68
+ var enableCacheElement = false;
69
+ var enableTransitionTracing = false;
70
+ var enableLegacyHidden = false;
71
+ var enableDebugTracing = false;
72
+ var REACT_MODULE_REFERENCE;
73
+ {
74
+ REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
75
+ }
76
+ function isValidElementType(type) {
77
+ if (typeof type === "string" || typeof type === "function") {
78
+ return true;
79
+ }
80
+ if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
81
+ return true;
82
+ }
83
+ if (typeof type === "object" && type !== null) {
84
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
85
+ // types supported by any Flight configuration anywhere since
86
+ // we don't know which Flight build this will end up being used
87
+ // with.
88
+ type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
89
+ return true;
90
+ }
91
+ }
92
+ return false;
93
+ }
94
+ function getWrappedName(outerType, innerType, wrapperName) {
95
+ var displayName = outerType.displayName;
96
+ if (displayName) {
97
+ return displayName;
98
+ }
99
+ var functionName = innerType.displayName || innerType.name || "";
100
+ return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
101
+ }
102
+ function getContextName(type) {
103
+ return type.displayName || "Context";
104
+ }
105
+ function getComponentNameFromType(type) {
106
+ if (type == null) {
107
+ return null;
108
+ }
109
+ {
110
+ if (typeof type.tag === "number") {
111
+ error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
112
+ }
113
+ }
114
+ if (typeof type === "function") {
115
+ return type.displayName || type.name || null;
116
+ }
117
+ if (typeof type === "string") {
118
+ return type;
119
+ }
120
+ switch (type) {
121
+ case REACT_FRAGMENT_TYPE:
122
+ return "Fragment";
123
+ case REACT_PORTAL_TYPE:
124
+ return "Portal";
125
+ case REACT_PROFILER_TYPE:
126
+ return "Profiler";
127
+ case REACT_STRICT_MODE_TYPE:
128
+ return "StrictMode";
129
+ case REACT_SUSPENSE_TYPE:
130
+ return "Suspense";
131
+ case REACT_SUSPENSE_LIST_TYPE:
132
+ return "SuspenseList";
133
+ }
134
+ if (typeof type === "object") {
135
+ switch (type.$$typeof) {
136
+ case REACT_CONTEXT_TYPE:
137
+ var context = type;
138
+ return getContextName(context) + ".Consumer";
139
+ case REACT_PROVIDER_TYPE:
140
+ var provider = type;
141
+ return getContextName(provider._context) + ".Provider";
142
+ case REACT_FORWARD_REF_TYPE:
143
+ return getWrappedName(type, type.render, "ForwardRef");
144
+ case REACT_MEMO_TYPE:
145
+ var outerName = type.displayName || null;
146
+ if (outerName !== null) {
147
+ return outerName;
148
+ }
149
+ return getComponentNameFromType(type.type) || "Memo";
150
+ case REACT_LAZY_TYPE: {
151
+ var lazyComponent = type;
152
+ var payload = lazyComponent._payload;
153
+ var init = lazyComponent._init;
154
+ try {
155
+ return getComponentNameFromType(init(payload));
156
+ } catch (x) {
157
+ return null;
158
+ }
159
+ }
160
+ }
161
+ }
162
+ return null;
163
+ }
164
+ var assign = Object.assign;
165
+ var disabledDepth = 0;
166
+ var prevLog;
167
+ var prevInfo;
168
+ var prevWarn;
169
+ var prevError;
170
+ var prevGroup;
171
+ var prevGroupCollapsed;
172
+ var prevGroupEnd;
173
+ function disabledLog() {
174
+ }
175
+ disabledLog.__reactDisabledLog = true;
176
+ function disableLogs() {
177
+ {
178
+ if (disabledDepth === 0) {
179
+ prevLog = console.log;
180
+ prevInfo = console.info;
181
+ prevWarn = console.warn;
182
+ prevError = console.error;
183
+ prevGroup = console.group;
184
+ prevGroupCollapsed = console.groupCollapsed;
185
+ prevGroupEnd = console.groupEnd;
186
+ var props = {
187
+ configurable: true,
188
+ enumerable: true,
189
+ value: disabledLog,
190
+ writable: true
191
+ };
192
+ Object.defineProperties(console, {
193
+ info: props,
194
+ log: props,
195
+ warn: props,
196
+ error: props,
197
+ group: props,
198
+ groupCollapsed: props,
199
+ groupEnd: props
200
+ });
201
+ }
202
+ disabledDepth++;
203
+ }
204
+ }
205
+ function reenableLogs() {
206
+ {
207
+ disabledDepth--;
208
+ if (disabledDepth === 0) {
209
+ var props = {
210
+ configurable: true,
211
+ enumerable: true,
212
+ writable: true
213
+ };
214
+ Object.defineProperties(console, {
215
+ log: assign({}, props, {
216
+ value: prevLog
217
+ }),
218
+ info: assign({}, props, {
219
+ value: prevInfo
220
+ }),
221
+ warn: assign({}, props, {
222
+ value: prevWarn
223
+ }),
224
+ error: assign({}, props, {
225
+ value: prevError
226
+ }),
227
+ group: assign({}, props, {
228
+ value: prevGroup
229
+ }),
230
+ groupCollapsed: assign({}, props, {
231
+ value: prevGroupCollapsed
232
+ }),
233
+ groupEnd: assign({}, props, {
234
+ value: prevGroupEnd
235
+ })
236
+ });
237
+ }
238
+ if (disabledDepth < 0) {
239
+ error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
240
+ }
241
+ }
242
+ }
243
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
244
+ var prefix;
245
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
246
+ {
247
+ if (prefix === void 0) {
248
+ try {
249
+ throw Error();
250
+ } catch (x) {
251
+ var match = x.stack.trim().match(/\n( *(at )?)/);
252
+ prefix = match && match[1] || "";
253
+ }
254
+ }
255
+ return "\n" + prefix + name;
256
+ }
257
+ }
258
+ var reentry = false;
259
+ var componentFrameCache;
260
+ {
261
+ var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
262
+ componentFrameCache = new PossiblyWeakMap();
263
+ }
264
+ function describeNativeComponentFrame(fn, construct) {
265
+ if (!fn || reentry) {
266
+ return "";
267
+ }
268
+ {
269
+ var frame = componentFrameCache.get(fn);
270
+ if (frame !== void 0) {
271
+ return frame;
272
+ }
273
+ }
274
+ var control;
275
+ reentry = true;
276
+ var previousPrepareStackTrace = Error.prepareStackTrace;
277
+ Error.prepareStackTrace = void 0;
278
+ var previousDispatcher;
279
+ {
280
+ previousDispatcher = ReactCurrentDispatcher.current;
281
+ ReactCurrentDispatcher.current = null;
282
+ disableLogs();
283
+ }
284
+ try {
285
+ if (construct) {
286
+ var Fake = function() {
287
+ throw Error();
288
+ };
289
+ Object.defineProperty(Fake.prototype, "props", {
290
+ set: function() {
291
+ throw Error();
292
+ }
293
+ });
294
+ if (typeof Reflect === "object" && Reflect.construct) {
295
+ try {
296
+ Reflect.construct(Fake, []);
297
+ } catch (x) {
298
+ control = x;
299
+ }
300
+ Reflect.construct(fn, [], Fake);
301
+ } else {
302
+ try {
303
+ Fake.call();
304
+ } catch (x) {
305
+ control = x;
306
+ }
307
+ fn.call(Fake.prototype);
308
+ }
309
+ } else {
310
+ try {
311
+ throw Error();
312
+ } catch (x) {
313
+ control = x;
314
+ }
315
+ fn();
316
+ }
317
+ } catch (sample) {
318
+ if (sample && control && typeof sample.stack === "string") {
319
+ var sampleLines = sample.stack.split("\n");
320
+ var controlLines = control.stack.split("\n");
321
+ var s = sampleLines.length - 1;
322
+ var c = controlLines.length - 1;
323
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
324
+ c--;
325
+ }
326
+ for (; s >= 1 && c >= 0; s--, c--) {
327
+ if (sampleLines[s] !== controlLines[c]) {
328
+ if (s !== 1 || c !== 1) {
329
+ do {
330
+ s--;
331
+ c--;
332
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
333
+ var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
334
+ if (fn.displayName && _frame.includes("<anonymous>")) {
335
+ _frame = _frame.replace("<anonymous>", fn.displayName);
336
+ }
337
+ {
338
+ if (typeof fn === "function") {
339
+ componentFrameCache.set(fn, _frame);
340
+ }
341
+ }
342
+ return _frame;
343
+ }
344
+ } while (s >= 1 && c >= 0);
345
+ }
346
+ break;
347
+ }
348
+ }
349
+ }
350
+ } finally {
351
+ reentry = false;
352
+ {
353
+ ReactCurrentDispatcher.current = previousDispatcher;
354
+ reenableLogs();
355
+ }
356
+ Error.prepareStackTrace = previousPrepareStackTrace;
357
+ }
358
+ var name = fn ? fn.displayName || fn.name : "";
359
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
360
+ {
361
+ if (typeof fn === "function") {
362
+ componentFrameCache.set(fn, syntheticFrame);
363
+ }
364
+ }
365
+ return syntheticFrame;
366
+ }
367
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
368
+ {
369
+ return describeNativeComponentFrame(fn, false);
370
+ }
371
+ }
372
+ function shouldConstruct(Component) {
373
+ var prototype = Component.prototype;
374
+ return !!(prototype && prototype.isReactComponent);
375
+ }
376
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
377
+ if (type == null) {
378
+ return "";
379
+ }
380
+ if (typeof type === "function") {
381
+ {
382
+ return describeNativeComponentFrame(type, shouldConstruct(type));
383
+ }
384
+ }
385
+ if (typeof type === "string") {
386
+ return describeBuiltInComponentFrame(type);
387
+ }
388
+ switch (type) {
389
+ case REACT_SUSPENSE_TYPE:
390
+ return describeBuiltInComponentFrame("Suspense");
391
+ case REACT_SUSPENSE_LIST_TYPE:
392
+ return describeBuiltInComponentFrame("SuspenseList");
393
+ }
394
+ if (typeof type === "object") {
395
+ switch (type.$$typeof) {
396
+ case REACT_FORWARD_REF_TYPE:
397
+ return describeFunctionComponentFrame(type.render);
398
+ case REACT_MEMO_TYPE:
399
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
400
+ case REACT_LAZY_TYPE: {
401
+ var lazyComponent = type;
402
+ var payload = lazyComponent._payload;
403
+ var init = lazyComponent._init;
404
+ try {
405
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
406
+ } catch (x) {
407
+ }
408
+ }
409
+ }
410
+ }
411
+ return "";
412
+ }
413
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
414
+ var loggedTypeFailures = {};
415
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
416
+ function setCurrentlyValidatingElement(element) {
417
+ {
418
+ if (element) {
419
+ var owner = element._owner;
420
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
421
+ ReactDebugCurrentFrame.setExtraStackFrame(stack);
422
+ } else {
423
+ ReactDebugCurrentFrame.setExtraStackFrame(null);
424
+ }
425
+ }
426
+ }
427
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
428
+ {
429
+ var has = Function.call.bind(hasOwnProperty);
430
+ for (var typeSpecName in typeSpecs) {
431
+ if (has(typeSpecs, typeSpecName)) {
432
+ var error$1 = void 0;
433
+ try {
434
+ if (typeof typeSpecs[typeSpecName] !== "function") {
435
+ var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
436
+ err.name = "Invariant Violation";
437
+ throw err;
438
+ }
439
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
440
+ } catch (ex) {
441
+ error$1 = ex;
442
+ }
443
+ if (error$1 && !(error$1 instanceof Error)) {
444
+ setCurrentlyValidatingElement(element);
445
+ error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
446
+ setCurrentlyValidatingElement(null);
447
+ }
448
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
449
+ loggedTypeFailures[error$1.message] = true;
450
+ setCurrentlyValidatingElement(element);
451
+ error("Failed %s type: %s", location, error$1.message);
452
+ setCurrentlyValidatingElement(null);
453
+ }
454
+ }
455
+ }
456
+ }
457
+ }
458
+ var isArrayImpl = Array.isArray;
459
+ function isArray(a) {
460
+ return isArrayImpl(a);
461
+ }
462
+ function typeName(value) {
463
+ {
464
+ var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
465
+ var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
466
+ return type;
467
+ }
468
+ }
469
+ function willCoercionThrow(value) {
470
+ {
471
+ try {
472
+ testStringCoercion(value);
473
+ return false;
474
+ } catch (e) {
475
+ return true;
476
+ }
477
+ }
478
+ }
479
+ function testStringCoercion(value) {
480
+ return "" + value;
481
+ }
482
+ function checkKeyStringCoercion(value) {
483
+ {
484
+ if (willCoercionThrow(value)) {
485
+ error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
486
+ return testStringCoercion(value);
487
+ }
488
+ }
489
+ }
490
+ var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
491
+ var RESERVED_PROPS = {
492
+ key: true,
493
+ ref: true,
494
+ __self: true,
495
+ __source: true
496
+ };
497
+ var specialPropKeyWarningShown;
498
+ var specialPropRefWarningShown;
499
+ var didWarnAboutStringRefs;
500
+ {
501
+ didWarnAboutStringRefs = {};
502
+ }
503
+ function hasValidRef(config) {
504
+ {
505
+ if (hasOwnProperty.call(config, "ref")) {
506
+ var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
507
+ if (getter && getter.isReactWarning) {
508
+ return false;
509
+ }
510
+ }
511
+ }
512
+ return config.ref !== void 0;
513
+ }
514
+ function hasValidKey(config) {
515
+ {
516
+ if (hasOwnProperty.call(config, "key")) {
517
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
518
+ if (getter && getter.isReactWarning) {
519
+ return false;
520
+ }
521
+ }
522
+ }
523
+ return config.key !== void 0;
524
+ }
525
+ function warnIfStringRefCannotBeAutoConverted(config, self) {
526
+ {
527
+ if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
528
+ var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
529
+ if (!didWarnAboutStringRefs[componentName]) {
530
+ error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
531
+ didWarnAboutStringRefs[componentName] = true;
532
+ }
533
+ }
534
+ }
535
+ }
536
+ function defineKeyPropWarningGetter(props, displayName) {
537
+ {
538
+ var warnAboutAccessingKey = function() {
539
+ if (!specialPropKeyWarningShown) {
540
+ specialPropKeyWarningShown = true;
541
+ error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
542
+ }
543
+ };
544
+ warnAboutAccessingKey.isReactWarning = true;
545
+ Object.defineProperty(props, "key", {
546
+ get: warnAboutAccessingKey,
547
+ configurable: true
548
+ });
549
+ }
550
+ }
551
+ function defineRefPropWarningGetter(props, displayName) {
552
+ {
553
+ var warnAboutAccessingRef = function() {
554
+ if (!specialPropRefWarningShown) {
555
+ specialPropRefWarningShown = true;
556
+ error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
557
+ }
558
+ };
559
+ warnAboutAccessingRef.isReactWarning = true;
560
+ Object.defineProperty(props, "ref", {
561
+ get: warnAboutAccessingRef,
562
+ configurable: true
563
+ });
564
+ }
565
+ }
566
+ var ReactElement = function(type, key, ref, self, source, owner, props) {
567
+ var element = {
568
+ // This tag allows us to uniquely identify this as a React Element
569
+ $$typeof: REACT_ELEMENT_TYPE,
570
+ // Built-in properties that belong on the element
571
+ type,
572
+ key,
573
+ ref,
574
+ props,
575
+ // Record the component responsible for creating this element.
576
+ _owner: owner
577
+ };
578
+ {
579
+ element._store = {};
580
+ Object.defineProperty(element._store, "validated", {
581
+ configurable: false,
582
+ enumerable: false,
583
+ writable: true,
584
+ value: false
585
+ });
586
+ Object.defineProperty(element, "_self", {
587
+ configurable: false,
588
+ enumerable: false,
589
+ writable: false,
590
+ value: self
591
+ });
592
+ Object.defineProperty(element, "_source", {
593
+ configurable: false,
594
+ enumerable: false,
595
+ writable: false,
596
+ value: source
597
+ });
598
+ if (Object.freeze) {
599
+ Object.freeze(element.props);
600
+ Object.freeze(element);
601
+ }
602
+ }
603
+ return element;
604
+ };
605
+ function jsxDEV(type, config, maybeKey, source, self) {
606
+ {
607
+ var propName;
608
+ var props = {};
609
+ var key = null;
610
+ var ref = null;
611
+ if (maybeKey !== void 0) {
612
+ {
613
+ checkKeyStringCoercion(maybeKey);
614
+ }
615
+ key = "" + maybeKey;
616
+ }
617
+ if (hasValidKey(config)) {
618
+ {
619
+ checkKeyStringCoercion(config.key);
620
+ }
621
+ key = "" + config.key;
622
+ }
623
+ if (hasValidRef(config)) {
624
+ ref = config.ref;
625
+ warnIfStringRefCannotBeAutoConverted(config, self);
626
+ }
627
+ for (propName in config) {
628
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
629
+ props[propName] = config[propName];
630
+ }
631
+ }
632
+ if (type && type.defaultProps) {
633
+ var defaultProps = type.defaultProps;
634
+ for (propName in defaultProps) {
635
+ if (props[propName] === void 0) {
636
+ props[propName] = defaultProps[propName];
637
+ }
638
+ }
639
+ }
640
+ if (key || ref) {
641
+ var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
642
+ if (key) {
643
+ defineKeyPropWarningGetter(props, displayName);
644
+ }
645
+ if (ref) {
646
+ defineRefPropWarningGetter(props, displayName);
647
+ }
648
+ }
649
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
650
+ }
651
+ }
652
+ var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
653
+ var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
654
+ function setCurrentlyValidatingElement$1(element) {
655
+ {
656
+ if (element) {
657
+ var owner = element._owner;
658
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
659
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
660
+ } else {
661
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
662
+ }
663
+ }
664
+ }
665
+ var propTypesMisspellWarningShown;
666
+ {
667
+ propTypesMisspellWarningShown = false;
668
+ }
669
+ function isValidElement(object) {
670
+ {
671
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
672
+ }
673
+ }
674
+ function getDeclarationErrorAddendum() {
675
+ {
676
+ if (ReactCurrentOwner$1.current) {
677
+ var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
678
+ if (name) {
679
+ return "\n\nCheck the render method of `" + name + "`.";
680
+ }
681
+ }
682
+ return "";
683
+ }
684
+ }
685
+ function getSourceInfoErrorAddendum(source) {
686
+ {
687
+ if (source !== void 0) {
688
+ var fileName = source.fileName.replace(/^.*[\\\/]/, "");
689
+ var lineNumber = source.lineNumber;
690
+ return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
691
+ }
692
+ return "";
693
+ }
694
+ }
695
+ var ownerHasKeyUseWarning = {};
696
+ function getCurrentComponentErrorInfo(parentType) {
697
+ {
698
+ var info = getDeclarationErrorAddendum();
699
+ if (!info) {
700
+ var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
701
+ if (parentName) {
702
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
703
+ }
704
+ }
705
+ return info;
706
+ }
707
+ }
708
+ function validateExplicitKey(element, parentType) {
709
+ {
710
+ if (!element._store || element._store.validated || element.key != null) {
711
+ return;
712
+ }
713
+ element._store.validated = true;
714
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
715
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
716
+ return;
717
+ }
718
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
719
+ var childOwner = "";
720
+ if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
721
+ childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
722
+ }
723
+ setCurrentlyValidatingElement$1(element);
724
+ error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
725
+ setCurrentlyValidatingElement$1(null);
726
+ }
727
+ }
728
+ function validateChildKeys(node, parentType) {
729
+ {
730
+ if (typeof node !== "object") {
731
+ return;
732
+ }
733
+ if (isArray(node)) {
734
+ for (var i = 0; i < node.length; i++) {
735
+ var child = node[i];
736
+ if (isValidElement(child)) {
737
+ validateExplicitKey(child, parentType);
738
+ }
739
+ }
740
+ } else if (isValidElement(node)) {
741
+ if (node._store) {
742
+ node._store.validated = true;
743
+ }
744
+ } else if (node) {
745
+ var iteratorFn = getIteratorFn(node);
746
+ if (typeof iteratorFn === "function") {
747
+ if (iteratorFn !== node.entries) {
748
+ var iterator = iteratorFn.call(node);
749
+ var step;
750
+ while (!(step = iterator.next()).done) {
751
+ if (isValidElement(step.value)) {
752
+ validateExplicitKey(step.value, parentType);
753
+ }
754
+ }
755
+ }
756
+ }
757
+ }
758
+ }
759
+ }
760
+ function validatePropTypes(element) {
761
+ {
762
+ var type = element.type;
763
+ if (type === null || type === void 0 || typeof type === "string") {
764
+ return;
765
+ }
766
+ var propTypes;
767
+ if (typeof type === "function") {
768
+ propTypes = type.propTypes;
769
+ } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
770
+ // Inner props are checked in the reconciler.
771
+ type.$$typeof === REACT_MEMO_TYPE)) {
772
+ propTypes = type.propTypes;
773
+ } else {
774
+ return;
775
+ }
776
+ if (propTypes) {
777
+ var name = getComponentNameFromType(type);
778
+ checkPropTypes(propTypes, element.props, "prop", name, element);
779
+ } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
780
+ propTypesMisspellWarningShown = true;
781
+ var _name = getComponentNameFromType(type);
782
+ error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
783
+ }
784
+ if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
785
+ error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
786
+ }
787
+ }
788
+ }
789
+ function validateFragmentProps(fragment) {
790
+ {
791
+ var keys = Object.keys(fragment.props);
792
+ for (var i = 0; i < keys.length; i++) {
793
+ var key = keys[i];
794
+ if (key !== "children" && key !== "key") {
795
+ setCurrentlyValidatingElement$1(fragment);
796
+ error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
797
+ setCurrentlyValidatingElement$1(null);
798
+ break;
799
+ }
800
+ }
801
+ if (fragment.ref !== null) {
802
+ setCurrentlyValidatingElement$1(fragment);
803
+ error("Invalid attribute `ref` supplied to `React.Fragment`.");
804
+ setCurrentlyValidatingElement$1(null);
805
+ }
806
+ }
807
+ }
808
+ var didWarnAboutKeySpread = {};
809
+ function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
810
+ {
811
+ var validType = isValidElementType(type);
812
+ if (!validType) {
813
+ var info = "";
814
+ if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
815
+ info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
816
+ }
817
+ var sourceInfo = getSourceInfoErrorAddendum(source);
818
+ if (sourceInfo) {
819
+ info += sourceInfo;
820
+ } else {
821
+ info += getDeclarationErrorAddendum();
822
+ }
823
+ var typeString;
824
+ if (type === null) {
825
+ typeString = "null";
826
+ } else if (isArray(type)) {
827
+ typeString = "array";
828
+ } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
829
+ typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
830
+ info = " Did you accidentally export a JSX literal instead of a component?";
831
+ } else {
832
+ typeString = typeof type;
833
+ }
834
+ error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
835
+ }
836
+ var element = jsxDEV(type, props, key, source, self);
837
+ if (element == null) {
838
+ return element;
839
+ }
840
+ if (validType) {
841
+ var children = props.children;
842
+ if (children !== void 0) {
843
+ if (isStaticChildren) {
844
+ if (isArray(children)) {
845
+ for (var i = 0; i < children.length; i++) {
846
+ validateChildKeys(children[i], type);
847
+ }
848
+ if (Object.freeze) {
849
+ Object.freeze(children);
850
+ }
851
+ } else {
852
+ error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
853
+ }
854
+ } else {
855
+ validateChildKeys(children, type);
856
+ }
857
+ }
858
+ }
859
+ {
860
+ if (hasOwnProperty.call(props, "key")) {
861
+ var componentName = getComponentNameFromType(type);
862
+ var keys = Object.keys(props).filter(function(k) {
863
+ return k !== "key";
864
+ });
865
+ var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
866
+ if (!didWarnAboutKeySpread[componentName + beforeExample]) {
867
+ var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
868
+ error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
869
+ didWarnAboutKeySpread[componentName + beforeExample] = true;
870
+ }
871
+ }
872
+ }
873
+ if (type === REACT_FRAGMENT_TYPE) {
874
+ validateFragmentProps(element);
875
+ } else {
876
+ validatePropTypes(element);
877
+ }
878
+ return element;
879
+ }
880
+ }
881
+ function jsxWithValidationStatic(type, props, key) {
882
+ {
883
+ return jsxWithValidation(type, props, key, true);
884
+ }
885
+ }
886
+ function jsxWithValidationDynamic(type, props, key) {
887
+ {
888
+ return jsxWithValidation(type, props, key, false);
889
+ }
890
+ }
891
+ var jsx = jsxWithValidationDynamic;
892
+ var jsxs = jsxWithValidationStatic;
893
+ exports.Fragment = REACT_FRAGMENT_TYPE;
894
+ exports.jsx = jsx;
895
+ exports.jsxs = jsxs;
896
+ })();
897
+ }
898
+ }
899
+ });
900
+
901
+ // node_modules/react/jsx-runtime.js
902
+ var require_jsx_runtime = __commonJS({
903
+ "node_modules/react/jsx-runtime.js"(exports, module) {
904
+ if (false) {
905
+ module.exports = null;
906
+ } else {
907
+ module.exports = require_react_jsx_runtime_development();
908
+ }
909
+ }
910
+ });
911
+
912
+ export {
913
+ require_jsx_runtime
914
+ };
915
+ /*! Bundled license information:
916
+
917
+ react/cjs/react-jsx-runtime.development.js:
918
+ (**
919
+ * @license React
920
+ * react-jsx-runtime.development.js
921
+ *
922
+ * Copyright (c) Facebook, Inc. and its affiliates.
923
+ *
924
+ * This source code is licensed under the MIT license found in the
925
+ * LICENSE file in the root directory of this source tree.
926
+ *)
927
+ */
928
+ //# sourceMappingURL=chunk-6PXSGDAH.js.map
frontend/node_modules/.vite/deps/chunk-6PXSGDAH.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../react/cjs/react-jsx-runtime.development.js", "../../react/jsx-runtime.js"],
4
+ "sourcesContent": ["/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nvar didWarnAboutKeySpread = {};\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n {\n if (hasOwnProperty.call(props, 'key')) {\n var componentName = getComponentNameFromType(type);\n var keys = Object.keys(props).filter(function (k) {\n return k !== 'key';\n });\n var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';\n\n if (!didWarnAboutKeySpread[componentName + beforeExample]) {\n var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';\n\n error('A props object containing a \"key\" prop is being spread into JSX:\\n' + ' let props = %s;\\n' + ' <%s {...props} />\\n' + 'React keys must be passed directly to JSX without using spread:\\n' + ' let props = %s;\\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);\n\n didWarnAboutKeySpread[componentName + beforeExample] = true;\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n"],
5
+ "mappings": ";;;;;;;;AAAA;AAAA;AAAA;AAYA,QAAI,MAAuC;AACzC,OAAC,WAAW;AACd;AAEA,YAAI,QAAQ;AAMZ,YAAI,qBAAqB,OAAO,IAAI,eAAe;AACnD,YAAI,oBAAoB,OAAO,IAAI,cAAc;AACjD,YAAI,sBAAsB,OAAO,IAAI,gBAAgB;AACrD,YAAI,yBAAyB,OAAO,IAAI,mBAAmB;AAC3D,YAAI,sBAAsB,OAAO,IAAI,gBAAgB;AACrD,YAAI,sBAAsB,OAAO,IAAI,gBAAgB;AACrD,YAAI,qBAAqB,OAAO,IAAI,eAAe;AACnD,YAAI,yBAAyB,OAAO,IAAI,mBAAmB;AAC3D,YAAI,sBAAsB,OAAO,IAAI,gBAAgB;AACrD,YAAI,2BAA2B,OAAO,IAAI,qBAAqB;AAC/D,YAAI,kBAAkB,OAAO,IAAI,YAAY;AAC7C,YAAI,kBAAkB,OAAO,IAAI,YAAY;AAC7C,YAAI,uBAAuB,OAAO,IAAI,iBAAiB;AACvD,YAAI,wBAAwB,OAAO;AACnC,YAAI,uBAAuB;AAC3B,iBAAS,cAAc,eAAe;AACpC,cAAI,kBAAkB,QAAQ,OAAO,k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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ __commonJS
3
+ } from "./chunk-G3PMV62Z.js";
4
+
5
+ // node_modules/react/cjs/react.development.js
6
+ var require_react_development = __commonJS({
7
+ "node_modules/react/cjs/react.development.js"(exports, module) {
8
+ "use strict";
9
+ if (true) {
10
+ (function() {
11
+ "use strict";
12
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
13
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
14
+ }
15
+ var ReactVersion = "18.3.1";
16
+ var REACT_ELEMENT_TYPE = Symbol.for("react.element");
17
+ var REACT_PORTAL_TYPE = Symbol.for("react.portal");
18
+ var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
19
+ var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
20
+ var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
21
+ var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
22
+ var REACT_CONTEXT_TYPE = Symbol.for("react.context");
23
+ var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
24
+ var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
25
+ var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
26
+ var REACT_MEMO_TYPE = Symbol.for("react.memo");
27
+ var REACT_LAZY_TYPE = Symbol.for("react.lazy");
28
+ var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
29
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
30
+ var FAUX_ITERATOR_SYMBOL = "@@iterator";
31
+ function getIteratorFn(maybeIterable) {
32
+ if (maybeIterable === null || typeof maybeIterable !== "object") {
33
+ return null;
34
+ }
35
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
36
+ if (typeof maybeIterator === "function") {
37
+ return maybeIterator;
38
+ }
39
+ return null;
40
+ }
41
+ var ReactCurrentDispatcher = {
42
+ /**
43
+ * @internal
44
+ * @type {ReactComponent}
45
+ */
46
+ current: null
47
+ };
48
+ var ReactCurrentBatchConfig = {
49
+ transition: null
50
+ };
51
+ var ReactCurrentActQueue = {
52
+ current: null,
53
+ // Used to reproduce behavior of `batchedUpdates` in legacy mode.
54
+ isBatchingLegacy: false,
55
+ didScheduleLegacyUpdate: false
56
+ };
57
+ var ReactCurrentOwner = {
58
+ /**
59
+ * @internal
60
+ * @type {ReactComponent}
61
+ */
62
+ current: null
63
+ };
64
+ var ReactDebugCurrentFrame = {};
65
+ var currentExtraStackFrame = null;
66
+ function setExtraStackFrame(stack) {
67
+ {
68
+ currentExtraStackFrame = stack;
69
+ }
70
+ }
71
+ {
72
+ ReactDebugCurrentFrame.setExtraStackFrame = function(stack) {
73
+ {
74
+ currentExtraStackFrame = stack;
75
+ }
76
+ };
77
+ ReactDebugCurrentFrame.getCurrentStack = null;
78
+ ReactDebugCurrentFrame.getStackAddendum = function() {
79
+ var stack = "";
80
+ if (currentExtraStackFrame) {
81
+ stack += currentExtraStackFrame;
82
+ }
83
+ var impl = ReactDebugCurrentFrame.getCurrentStack;
84
+ if (impl) {
85
+ stack += impl() || "";
86
+ }
87
+ return stack;
88
+ };
89
+ }
90
+ var enableScopeAPI = false;
91
+ var enableCacheElement = false;
92
+ var enableTransitionTracing = false;
93
+ var enableLegacyHidden = false;
94
+ var enableDebugTracing = false;
95
+ var ReactSharedInternals = {
96
+ ReactCurrentDispatcher,
97
+ ReactCurrentBatchConfig,
98
+ ReactCurrentOwner
99
+ };
100
+ {
101
+ ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
102
+ ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
103
+ }
104
+ function warn(format) {
105
+ {
106
+ {
107
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
108
+ args[_key - 1] = arguments[_key];
109
+ }
110
+ printWarning("warn", format, args);
111
+ }
112
+ }
113
+ }
114
+ function error(format) {
115
+ {
116
+ {
117
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
118
+ args[_key2 - 1] = arguments[_key2];
119
+ }
120
+ printWarning("error", format, args);
121
+ }
122
+ }
123
+ }
124
+ function printWarning(level, format, args) {
125
+ {
126
+ var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
127
+ var stack = ReactDebugCurrentFrame2.getStackAddendum();
128
+ if (stack !== "") {
129
+ format += "%s";
130
+ args = args.concat([stack]);
131
+ }
132
+ var argsWithFormat = args.map(function(item) {
133
+ return String(item);
134
+ });
135
+ argsWithFormat.unshift("Warning: " + format);
136
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
137
+ }
138
+ }
139
+ var didWarnStateUpdateForUnmountedComponent = {};
140
+ function warnNoop(publicInstance, callerName) {
141
+ {
142
+ var _constructor = publicInstance.constructor;
143
+ var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass";
144
+ var warningKey = componentName + "." + callerName;
145
+ if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
146
+ return;
147
+ }
148
+ error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName);
149
+ didWarnStateUpdateForUnmountedComponent[warningKey] = true;
150
+ }
151
+ }
152
+ var ReactNoopUpdateQueue = {
153
+ /**
154
+ * Checks whether or not this composite component is mounted.
155
+ * @param {ReactClass} publicInstance The instance we want to test.
156
+ * @return {boolean} True if mounted, false otherwise.
157
+ * @protected
158
+ * @final
159
+ */
160
+ isMounted: function(publicInstance) {
161
+ return false;
162
+ },
163
+ /**
164
+ * Forces an update. This should only be invoked when it is known with
165
+ * certainty that we are **not** in a DOM transaction.
166
+ *
167
+ * You may want to call this when you know that some deeper aspect of the
168
+ * component's state has changed but `setState` was not called.
169
+ *
170
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
171
+ * `componentWillUpdate` and `componentDidUpdate`.
172
+ *
173
+ * @param {ReactClass} publicInstance The instance that should rerender.
174
+ * @param {?function} callback Called after component is updated.
175
+ * @param {?string} callerName name of the calling function in the public API.
176
+ * @internal
177
+ */
178
+ enqueueForceUpdate: function(publicInstance, callback, callerName) {
179
+ warnNoop(publicInstance, "forceUpdate");
180
+ },
181
+ /**
182
+ * Replaces all of the state. Always use this or `setState` to mutate state.
183
+ * You should treat `this.state` as immutable.
184
+ *
185
+ * There is no guarantee that `this.state` will be immediately updated, so
186
+ * accessing `this.state` after calling this method may return the old value.
187
+ *
188
+ * @param {ReactClass} publicInstance The instance that should rerender.
189
+ * @param {object} completeState Next state.
190
+ * @param {?function} callback Called after component is updated.
191
+ * @param {?string} callerName name of the calling function in the public API.
192
+ * @internal
193
+ */
194
+ enqueueReplaceState: function(publicInstance, completeState, callback, callerName) {
195
+ warnNoop(publicInstance, "replaceState");
196
+ },
197
+ /**
198
+ * Sets a subset of the state. This only exists because _pendingState is
199
+ * internal. This provides a merging strategy that is not available to deep
200
+ * properties which is confusing. TODO: Expose pendingState or don't use it
201
+ * during the merge.
202
+ *
203
+ * @param {ReactClass} publicInstance The instance that should rerender.
204
+ * @param {object} partialState Next partial state to be merged with state.
205
+ * @param {?function} callback Called after component is updated.
206
+ * @param {?string} Name of the calling function in the public API.
207
+ * @internal
208
+ */
209
+ enqueueSetState: function(publicInstance, partialState, callback, callerName) {
210
+ warnNoop(publicInstance, "setState");
211
+ }
212
+ };
213
+ var assign = Object.assign;
214
+ var emptyObject = {};
215
+ {
216
+ Object.freeze(emptyObject);
217
+ }
218
+ function Component(props, context, updater) {
219
+ this.props = props;
220
+ this.context = context;
221
+ this.refs = emptyObject;
222
+ this.updater = updater || ReactNoopUpdateQueue;
223
+ }
224
+ Component.prototype.isReactComponent = {};
225
+ Component.prototype.setState = function(partialState, callback) {
226
+ if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) {
227
+ throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
228
+ }
229
+ this.updater.enqueueSetState(this, partialState, callback, "setState");
230
+ };
231
+ Component.prototype.forceUpdate = function(callback) {
232
+ this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
233
+ };
234
+ {
235
+ var deprecatedAPIs = {
236
+ isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
237
+ replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
238
+ };
239
+ var defineDeprecationWarning = function(methodName, info) {
240
+ Object.defineProperty(Component.prototype, methodName, {
241
+ get: function() {
242
+ warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
243
+ return void 0;
244
+ }
245
+ });
246
+ };
247
+ for (var fnName in deprecatedAPIs) {
248
+ if (deprecatedAPIs.hasOwnProperty(fnName)) {
249
+ defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
250
+ }
251
+ }
252
+ }
253
+ function ComponentDummy() {
254
+ }
255
+ ComponentDummy.prototype = Component.prototype;
256
+ function PureComponent(props, context, updater) {
257
+ this.props = props;
258
+ this.context = context;
259
+ this.refs = emptyObject;
260
+ this.updater = updater || ReactNoopUpdateQueue;
261
+ }
262
+ var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
263
+ pureComponentPrototype.constructor = PureComponent;
264
+ assign(pureComponentPrototype, Component.prototype);
265
+ pureComponentPrototype.isPureReactComponent = true;
266
+ function createRef() {
267
+ var refObject = {
268
+ current: null
269
+ };
270
+ {
271
+ Object.seal(refObject);
272
+ }
273
+ return refObject;
274
+ }
275
+ var isArrayImpl = Array.isArray;
276
+ function isArray(a) {
277
+ return isArrayImpl(a);
278
+ }
279
+ function typeName(value) {
280
+ {
281
+ var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
282
+ var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
283
+ return type;
284
+ }
285
+ }
286
+ function willCoercionThrow(value) {
287
+ {
288
+ try {
289
+ testStringCoercion(value);
290
+ return false;
291
+ } catch (e) {
292
+ return true;
293
+ }
294
+ }
295
+ }
296
+ function testStringCoercion(value) {
297
+ return "" + value;
298
+ }
299
+ function checkKeyStringCoercion(value) {
300
+ {
301
+ if (willCoercionThrow(value)) {
302
+ error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
303
+ return testStringCoercion(value);
304
+ }
305
+ }
306
+ }
307
+ function getWrappedName(outerType, innerType, wrapperName) {
308
+ var displayName = outerType.displayName;
309
+ if (displayName) {
310
+ return displayName;
311
+ }
312
+ var functionName = innerType.displayName || innerType.name || "";
313
+ return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
314
+ }
315
+ function getContextName(type) {
316
+ return type.displayName || "Context";
317
+ }
318
+ function getComponentNameFromType(type) {
319
+ if (type == null) {
320
+ return null;
321
+ }
322
+ {
323
+ if (typeof type.tag === "number") {
324
+ error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
325
+ }
326
+ }
327
+ if (typeof type === "function") {
328
+ return type.displayName || type.name || null;
329
+ }
330
+ if (typeof type === "string") {
331
+ return type;
332
+ }
333
+ switch (type) {
334
+ case REACT_FRAGMENT_TYPE:
335
+ return "Fragment";
336
+ case REACT_PORTAL_TYPE:
337
+ return "Portal";
338
+ case REACT_PROFILER_TYPE:
339
+ return "Profiler";
340
+ case REACT_STRICT_MODE_TYPE:
341
+ return "StrictMode";
342
+ case REACT_SUSPENSE_TYPE:
343
+ return "Suspense";
344
+ case REACT_SUSPENSE_LIST_TYPE:
345
+ return "SuspenseList";
346
+ }
347
+ if (typeof type === "object") {
348
+ switch (type.$$typeof) {
349
+ case REACT_CONTEXT_TYPE:
350
+ var context = type;
351
+ return getContextName(context) + ".Consumer";
352
+ case REACT_PROVIDER_TYPE:
353
+ var provider = type;
354
+ return getContextName(provider._context) + ".Provider";
355
+ case REACT_FORWARD_REF_TYPE:
356
+ return getWrappedName(type, type.render, "ForwardRef");
357
+ case REACT_MEMO_TYPE:
358
+ var outerName = type.displayName || null;
359
+ if (outerName !== null) {
360
+ return outerName;
361
+ }
362
+ return getComponentNameFromType(type.type) || "Memo";
363
+ case REACT_LAZY_TYPE: {
364
+ var lazyComponent = type;
365
+ var payload = lazyComponent._payload;
366
+ var init = lazyComponent._init;
367
+ try {
368
+ return getComponentNameFromType(init(payload));
369
+ } catch (x) {
370
+ return null;
371
+ }
372
+ }
373
+ }
374
+ }
375
+ return null;
376
+ }
377
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
378
+ var RESERVED_PROPS = {
379
+ key: true,
380
+ ref: true,
381
+ __self: true,
382
+ __source: true
383
+ };
384
+ var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
385
+ {
386
+ didWarnAboutStringRefs = {};
387
+ }
388
+ function hasValidRef(config) {
389
+ {
390
+ if (hasOwnProperty.call(config, "ref")) {
391
+ var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
392
+ if (getter && getter.isReactWarning) {
393
+ return false;
394
+ }
395
+ }
396
+ }
397
+ return config.ref !== void 0;
398
+ }
399
+ function hasValidKey(config) {
400
+ {
401
+ if (hasOwnProperty.call(config, "key")) {
402
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
403
+ if (getter && getter.isReactWarning) {
404
+ return false;
405
+ }
406
+ }
407
+ }
408
+ return config.key !== void 0;
409
+ }
410
+ function defineKeyPropWarningGetter(props, displayName) {
411
+ var warnAboutAccessingKey = function() {
412
+ {
413
+ if (!specialPropKeyWarningShown) {
414
+ specialPropKeyWarningShown = true;
415
+ error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
416
+ }
417
+ }
418
+ };
419
+ warnAboutAccessingKey.isReactWarning = true;
420
+ Object.defineProperty(props, "key", {
421
+ get: warnAboutAccessingKey,
422
+ configurable: true
423
+ });
424
+ }
425
+ function defineRefPropWarningGetter(props, displayName) {
426
+ var warnAboutAccessingRef = function() {
427
+ {
428
+ if (!specialPropRefWarningShown) {
429
+ specialPropRefWarningShown = true;
430
+ error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
431
+ }
432
+ }
433
+ };
434
+ warnAboutAccessingRef.isReactWarning = true;
435
+ Object.defineProperty(props, "ref", {
436
+ get: warnAboutAccessingRef,
437
+ configurable: true
438
+ });
439
+ }
440
+ function warnIfStringRefCannotBeAutoConverted(config) {
441
+ {
442
+ if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
443
+ var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
444
+ if (!didWarnAboutStringRefs[componentName]) {
445
+ error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
446
+ didWarnAboutStringRefs[componentName] = true;
447
+ }
448
+ }
449
+ }
450
+ }
451
+ var ReactElement = function(type, key, ref, self, source, owner, props) {
452
+ var element = {
453
+ // This tag allows us to uniquely identify this as a React Element
454
+ $$typeof: REACT_ELEMENT_TYPE,
455
+ // Built-in properties that belong on the element
456
+ type,
457
+ key,
458
+ ref,
459
+ props,
460
+ // Record the component responsible for creating this element.
461
+ _owner: owner
462
+ };
463
+ {
464
+ element._store = {};
465
+ Object.defineProperty(element._store, "validated", {
466
+ configurable: false,
467
+ enumerable: false,
468
+ writable: true,
469
+ value: false
470
+ });
471
+ Object.defineProperty(element, "_self", {
472
+ configurable: false,
473
+ enumerable: false,
474
+ writable: false,
475
+ value: self
476
+ });
477
+ Object.defineProperty(element, "_source", {
478
+ configurable: false,
479
+ enumerable: false,
480
+ writable: false,
481
+ value: source
482
+ });
483
+ if (Object.freeze) {
484
+ Object.freeze(element.props);
485
+ Object.freeze(element);
486
+ }
487
+ }
488
+ return element;
489
+ };
490
+ function createElement(type, config, children) {
491
+ var propName;
492
+ var props = {};
493
+ var key = null;
494
+ var ref = null;
495
+ var self = null;
496
+ var source = null;
497
+ if (config != null) {
498
+ if (hasValidRef(config)) {
499
+ ref = config.ref;
500
+ {
501
+ warnIfStringRefCannotBeAutoConverted(config);
502
+ }
503
+ }
504
+ if (hasValidKey(config)) {
505
+ {
506
+ checkKeyStringCoercion(config.key);
507
+ }
508
+ key = "" + config.key;
509
+ }
510
+ self = config.__self === void 0 ? null : config.__self;
511
+ source = config.__source === void 0 ? null : config.__source;
512
+ for (propName in config) {
513
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
514
+ props[propName] = config[propName];
515
+ }
516
+ }
517
+ }
518
+ var childrenLength = arguments.length - 2;
519
+ if (childrenLength === 1) {
520
+ props.children = children;
521
+ } else if (childrenLength > 1) {
522
+ var childArray = Array(childrenLength);
523
+ for (var i = 0; i < childrenLength; i++) {
524
+ childArray[i] = arguments[i + 2];
525
+ }
526
+ {
527
+ if (Object.freeze) {
528
+ Object.freeze(childArray);
529
+ }
530
+ }
531
+ props.children = childArray;
532
+ }
533
+ if (type && type.defaultProps) {
534
+ var defaultProps = type.defaultProps;
535
+ for (propName in defaultProps) {
536
+ if (props[propName] === void 0) {
537
+ props[propName] = defaultProps[propName];
538
+ }
539
+ }
540
+ }
541
+ {
542
+ if (key || ref) {
543
+ var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
544
+ if (key) {
545
+ defineKeyPropWarningGetter(props, displayName);
546
+ }
547
+ if (ref) {
548
+ defineRefPropWarningGetter(props, displayName);
549
+ }
550
+ }
551
+ }
552
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
553
+ }
554
+ function cloneAndReplaceKey(oldElement, newKey) {
555
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
556
+ return newElement;
557
+ }
558
+ function cloneElement(element, config, children) {
559
+ if (element === null || element === void 0) {
560
+ throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
561
+ }
562
+ var propName;
563
+ var props = assign({}, element.props);
564
+ var key = element.key;
565
+ var ref = element.ref;
566
+ var self = element._self;
567
+ var source = element._source;
568
+ var owner = element._owner;
569
+ if (config != null) {
570
+ if (hasValidRef(config)) {
571
+ ref = config.ref;
572
+ owner = ReactCurrentOwner.current;
573
+ }
574
+ if (hasValidKey(config)) {
575
+ {
576
+ checkKeyStringCoercion(config.key);
577
+ }
578
+ key = "" + config.key;
579
+ }
580
+ var defaultProps;
581
+ if (element.type && element.type.defaultProps) {
582
+ defaultProps = element.type.defaultProps;
583
+ }
584
+ for (propName in config) {
585
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
586
+ if (config[propName] === void 0 && defaultProps !== void 0) {
587
+ props[propName] = defaultProps[propName];
588
+ } else {
589
+ props[propName] = config[propName];
590
+ }
591
+ }
592
+ }
593
+ }
594
+ var childrenLength = arguments.length - 2;
595
+ if (childrenLength === 1) {
596
+ props.children = children;
597
+ } else if (childrenLength > 1) {
598
+ var childArray = Array(childrenLength);
599
+ for (var i = 0; i < childrenLength; i++) {
600
+ childArray[i] = arguments[i + 2];
601
+ }
602
+ props.children = childArray;
603
+ }
604
+ return ReactElement(element.type, key, ref, self, source, owner, props);
605
+ }
606
+ function isValidElement(object) {
607
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
608
+ }
609
+ var SEPARATOR = ".";
610
+ var SUBSEPARATOR = ":";
611
+ function escape(key) {
612
+ var escapeRegex = /[=:]/g;
613
+ var escaperLookup = {
614
+ "=": "=0",
615
+ ":": "=2"
616
+ };
617
+ var escapedString = key.replace(escapeRegex, function(match) {
618
+ return escaperLookup[match];
619
+ });
620
+ return "$" + escapedString;
621
+ }
622
+ var didWarnAboutMaps = false;
623
+ var userProvidedKeyEscapeRegex = /\/+/g;
624
+ function escapeUserProvidedKey(text) {
625
+ return text.replace(userProvidedKeyEscapeRegex, "$&/");
626
+ }
627
+ function getElementKey(element, index) {
628
+ if (typeof element === "object" && element !== null && element.key != null) {
629
+ {
630
+ checkKeyStringCoercion(element.key);
631
+ }
632
+ return escape("" + element.key);
633
+ }
634
+ return index.toString(36);
635
+ }
636
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
637
+ var type = typeof children;
638
+ if (type === "undefined" || type === "boolean") {
639
+ children = null;
640
+ }
641
+ var invokeCallback = false;
642
+ if (children === null) {
643
+ invokeCallback = true;
644
+ } else {
645
+ switch (type) {
646
+ case "string":
647
+ case "number":
648
+ invokeCallback = true;
649
+ break;
650
+ case "object":
651
+ switch (children.$$typeof) {
652
+ case REACT_ELEMENT_TYPE:
653
+ case REACT_PORTAL_TYPE:
654
+ invokeCallback = true;
655
+ }
656
+ }
657
+ }
658
+ if (invokeCallback) {
659
+ var _child = children;
660
+ var mappedChild = callback(_child);
661
+ var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
662
+ if (isArray(mappedChild)) {
663
+ var escapedChildKey = "";
664
+ if (childKey != null) {
665
+ escapedChildKey = escapeUserProvidedKey(childKey) + "/";
666
+ }
667
+ mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) {
668
+ return c;
669
+ });
670
+ } else if (mappedChild != null) {
671
+ if (isValidElement(mappedChild)) {
672
+ {
673
+ if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
674
+ checkKeyStringCoercion(mappedChild.key);
675
+ }
676
+ }
677
+ mappedChild = cloneAndReplaceKey(
678
+ mappedChild,
679
+ // Keep both the (mapped) and old keys if they differ, just as
680
+ // traverseAllChildren used to do for objects as children
681
+ escapedPrefix + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
682
+ (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? (
683
+ // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
684
+ // eslint-disable-next-line react-internal/safe-string-coercion
685
+ escapeUserProvidedKey("" + mappedChild.key) + "/"
686
+ ) : "") + childKey
687
+ );
688
+ }
689
+ array.push(mappedChild);
690
+ }
691
+ return 1;
692
+ }
693
+ var child;
694
+ var nextName;
695
+ var subtreeCount = 0;
696
+ var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR;
697
+ if (isArray(children)) {
698
+ for (var i = 0; i < children.length; i++) {
699
+ child = children[i];
700
+ nextName = nextNamePrefix + getElementKey(child, i);
701
+ subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
702
+ }
703
+ } else {
704
+ var iteratorFn = getIteratorFn(children);
705
+ if (typeof iteratorFn === "function") {
706
+ var iterableChildren = children;
707
+ {
708
+ if (iteratorFn === iterableChildren.entries) {
709
+ if (!didWarnAboutMaps) {
710
+ warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");
711
+ }
712
+ didWarnAboutMaps = true;
713
+ }
714
+ }
715
+ var iterator = iteratorFn.call(iterableChildren);
716
+ var step;
717
+ var ii = 0;
718
+ while (!(step = iterator.next()).done) {
719
+ child = step.value;
720
+ nextName = nextNamePrefix + getElementKey(child, ii++);
721
+ subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
722
+ }
723
+ } else if (type === "object") {
724
+ var childrenString = String(children);
725
+ throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead.");
726
+ }
727
+ }
728
+ return subtreeCount;
729
+ }
730
+ function mapChildren(children, func, context) {
731
+ if (children == null) {
732
+ return children;
733
+ }
734
+ var result = [];
735
+ var count = 0;
736
+ mapIntoArray(children, result, "", "", function(child) {
737
+ return func.call(context, child, count++);
738
+ });
739
+ return result;
740
+ }
741
+ function countChildren(children) {
742
+ var n = 0;
743
+ mapChildren(children, function() {
744
+ n++;
745
+ });
746
+ return n;
747
+ }
748
+ function forEachChildren(children, forEachFunc, forEachContext) {
749
+ mapChildren(children, function() {
750
+ forEachFunc.apply(this, arguments);
751
+ }, forEachContext);
752
+ }
753
+ function toArray(children) {
754
+ return mapChildren(children, function(child) {
755
+ return child;
756
+ }) || [];
757
+ }
758
+ function onlyChild(children) {
759
+ if (!isValidElement(children)) {
760
+ throw new Error("React.Children.only expected to receive a single React element child.");
761
+ }
762
+ return children;
763
+ }
764
+ function createContext(defaultValue) {
765
+ var context = {
766
+ $$typeof: REACT_CONTEXT_TYPE,
767
+ // As a workaround to support multiple concurrent renderers, we categorize
768
+ // some renderers as primary and others as secondary. We only expect
769
+ // there to be two concurrent renderers at most: React Native (primary) and
770
+ // Fabric (secondary); React DOM (primary) and React ART (secondary).
771
+ // Secondary renderers store their context values on separate fields.
772
+ _currentValue: defaultValue,
773
+ _currentValue2: defaultValue,
774
+ // Used to track how many concurrent renderers this context currently
775
+ // supports within in a single renderer. Such as parallel server rendering.
776
+ _threadCount: 0,
777
+ // These are circular
778
+ Provider: null,
779
+ Consumer: null,
780
+ // Add these to use same hidden class in VM as ServerContext
781
+ _defaultValue: null,
782
+ _globalName: null
783
+ };
784
+ context.Provider = {
785
+ $$typeof: REACT_PROVIDER_TYPE,
786
+ _context: context
787
+ };
788
+ var hasWarnedAboutUsingNestedContextConsumers = false;
789
+ var hasWarnedAboutUsingConsumerProvider = false;
790
+ var hasWarnedAboutDisplayNameOnConsumer = false;
791
+ {
792
+ var Consumer = {
793
+ $$typeof: REACT_CONTEXT_TYPE,
794
+ _context: context
795
+ };
796
+ Object.defineProperties(Consumer, {
797
+ Provider: {
798
+ get: function() {
799
+ if (!hasWarnedAboutUsingConsumerProvider) {
800
+ hasWarnedAboutUsingConsumerProvider = true;
801
+ error("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?");
802
+ }
803
+ return context.Provider;
804
+ },
805
+ set: function(_Provider) {
806
+ context.Provider = _Provider;
807
+ }
808
+ },
809
+ _currentValue: {
810
+ get: function() {
811
+ return context._currentValue;
812
+ },
813
+ set: function(_currentValue) {
814
+ context._currentValue = _currentValue;
815
+ }
816
+ },
817
+ _currentValue2: {
818
+ get: function() {
819
+ return context._currentValue2;
820
+ },
821
+ set: function(_currentValue2) {
822
+ context._currentValue2 = _currentValue2;
823
+ }
824
+ },
825
+ _threadCount: {
826
+ get: function() {
827
+ return context._threadCount;
828
+ },
829
+ set: function(_threadCount) {
830
+ context._threadCount = _threadCount;
831
+ }
832
+ },
833
+ Consumer: {
834
+ get: function() {
835
+ if (!hasWarnedAboutUsingNestedContextConsumers) {
836
+ hasWarnedAboutUsingNestedContextConsumers = true;
837
+ error("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?");
838
+ }
839
+ return context.Consumer;
840
+ }
841
+ },
842
+ displayName: {
843
+ get: function() {
844
+ return context.displayName;
845
+ },
846
+ set: function(displayName) {
847
+ if (!hasWarnedAboutDisplayNameOnConsumer) {
848
+ warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName);
849
+ hasWarnedAboutDisplayNameOnConsumer = true;
850
+ }
851
+ }
852
+ }
853
+ });
854
+ context.Consumer = Consumer;
855
+ }
856
+ {
857
+ context._currentRenderer = null;
858
+ context._currentRenderer2 = null;
859
+ }
860
+ return context;
861
+ }
862
+ var Uninitialized = -1;
863
+ var Pending = 0;
864
+ var Resolved = 1;
865
+ var Rejected = 2;
866
+ function lazyInitializer(payload) {
867
+ if (payload._status === Uninitialized) {
868
+ var ctor = payload._result;
869
+ var thenable = ctor();
870
+ thenable.then(function(moduleObject2) {
871
+ if (payload._status === Pending || payload._status === Uninitialized) {
872
+ var resolved = payload;
873
+ resolved._status = Resolved;
874
+ resolved._result = moduleObject2;
875
+ }
876
+ }, function(error2) {
877
+ if (payload._status === Pending || payload._status === Uninitialized) {
878
+ var rejected = payload;
879
+ rejected._status = Rejected;
880
+ rejected._result = error2;
881
+ }
882
+ });
883
+ if (payload._status === Uninitialized) {
884
+ var pending = payload;
885
+ pending._status = Pending;
886
+ pending._result = thenable;
887
+ }
888
+ }
889
+ if (payload._status === Resolved) {
890
+ var moduleObject = payload._result;
891
+ {
892
+ if (moduleObject === void 0) {
893
+ error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", moduleObject);
894
+ }
895
+ }
896
+ {
897
+ if (!("default" in moduleObject)) {
898
+ error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
899
+ }
900
+ }
901
+ return moduleObject.default;
902
+ } else {
903
+ throw payload._result;
904
+ }
905
+ }
906
+ function lazy(ctor) {
907
+ var payload = {
908
+ // We use these fields to store the result.
909
+ _status: Uninitialized,
910
+ _result: ctor
911
+ };
912
+ var lazyType = {
913
+ $$typeof: REACT_LAZY_TYPE,
914
+ _payload: payload,
915
+ _init: lazyInitializer
916
+ };
917
+ {
918
+ var defaultProps;
919
+ var propTypes;
920
+ Object.defineProperties(lazyType, {
921
+ defaultProps: {
922
+ configurable: true,
923
+ get: function() {
924
+ return defaultProps;
925
+ },
926
+ set: function(newDefaultProps) {
927
+ error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
928
+ defaultProps = newDefaultProps;
929
+ Object.defineProperty(lazyType, "defaultProps", {
930
+ enumerable: true
931
+ });
932
+ }
933
+ },
934
+ propTypes: {
935
+ configurable: true,
936
+ get: function() {
937
+ return propTypes;
938
+ },
939
+ set: function(newPropTypes) {
940
+ error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
941
+ propTypes = newPropTypes;
942
+ Object.defineProperty(lazyType, "propTypes", {
943
+ enumerable: true
944
+ });
945
+ }
946
+ }
947
+ });
948
+ }
949
+ return lazyType;
950
+ }
951
+ function forwardRef(render) {
952
+ {
953
+ if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
954
+ error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");
955
+ } else if (typeof render !== "function") {
956
+ error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render);
957
+ } else {
958
+ if (render.length !== 0 && render.length !== 2) {
959
+ error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.");
960
+ }
961
+ }
962
+ if (render != null) {
963
+ if (render.defaultProps != null || render.propTypes != null) {
964
+ error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
965
+ }
966
+ }
967
+ }
968
+ var elementType = {
969
+ $$typeof: REACT_FORWARD_REF_TYPE,
970
+ render
971
+ };
972
+ {
973
+ var ownName;
974
+ Object.defineProperty(elementType, "displayName", {
975
+ enumerable: false,
976
+ configurable: true,
977
+ get: function() {
978
+ return ownName;
979
+ },
980
+ set: function(name) {
981
+ ownName = name;
982
+ if (!render.name && !render.displayName) {
983
+ render.displayName = name;
984
+ }
985
+ }
986
+ });
987
+ }
988
+ return elementType;
989
+ }
990
+ var REACT_MODULE_REFERENCE;
991
+ {
992
+ REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
993
+ }
994
+ function isValidElementType(type) {
995
+ if (typeof type === "string" || typeof type === "function") {
996
+ return true;
997
+ }
998
+ if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
999
+ return true;
1000
+ }
1001
+ if (typeof type === "object" && type !== null) {
1002
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
1003
+ // types supported by any Flight configuration anywhere since
1004
+ // we don't know which Flight build this will end up being used
1005
+ // with.
1006
+ type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
1007
+ return true;
1008
+ }
1009
+ }
1010
+ return false;
1011
+ }
1012
+ function memo(type, compare) {
1013
+ {
1014
+ if (!isValidElementType(type)) {
1015
+ error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
1016
+ }
1017
+ }
1018
+ var elementType = {
1019
+ $$typeof: REACT_MEMO_TYPE,
1020
+ type,
1021
+ compare: compare === void 0 ? null : compare
1022
+ };
1023
+ {
1024
+ var ownName;
1025
+ Object.defineProperty(elementType, "displayName", {
1026
+ enumerable: false,
1027
+ configurable: true,
1028
+ get: function() {
1029
+ return ownName;
1030
+ },
1031
+ set: function(name) {
1032
+ ownName = name;
1033
+ if (!type.name && !type.displayName) {
1034
+ type.displayName = name;
1035
+ }
1036
+ }
1037
+ });
1038
+ }
1039
+ return elementType;
1040
+ }
1041
+ function resolveDispatcher() {
1042
+ var dispatcher = ReactCurrentDispatcher.current;
1043
+ {
1044
+ if (dispatcher === null) {
1045
+ error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");
1046
+ }
1047
+ }
1048
+ return dispatcher;
1049
+ }
1050
+ function useContext(Context) {
1051
+ var dispatcher = resolveDispatcher();
1052
+ {
1053
+ if (Context._context !== void 0) {
1054
+ var realContext = Context._context;
1055
+ if (realContext.Consumer === Context) {
1056
+ error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?");
1057
+ } else if (realContext.Provider === Context) {
1058
+ error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
1059
+ }
1060
+ }
1061
+ }
1062
+ return dispatcher.useContext(Context);
1063
+ }
1064
+ function useState(initialState) {
1065
+ var dispatcher = resolveDispatcher();
1066
+ return dispatcher.useState(initialState);
1067
+ }
1068
+ function useReducer(reducer, initialArg, init) {
1069
+ var dispatcher = resolveDispatcher();
1070
+ return dispatcher.useReducer(reducer, initialArg, init);
1071
+ }
1072
+ function useRef(initialValue) {
1073
+ var dispatcher = resolveDispatcher();
1074
+ return dispatcher.useRef(initialValue);
1075
+ }
1076
+ function useEffect(create, deps) {
1077
+ var dispatcher = resolveDispatcher();
1078
+ return dispatcher.useEffect(create, deps);
1079
+ }
1080
+ function useInsertionEffect(create, deps) {
1081
+ var dispatcher = resolveDispatcher();
1082
+ return dispatcher.useInsertionEffect(create, deps);
1083
+ }
1084
+ function useLayoutEffect(create, deps) {
1085
+ var dispatcher = resolveDispatcher();
1086
+ return dispatcher.useLayoutEffect(create, deps);
1087
+ }
1088
+ function useCallback(callback, deps) {
1089
+ var dispatcher = resolveDispatcher();
1090
+ return dispatcher.useCallback(callback, deps);
1091
+ }
1092
+ function useMemo(create, deps) {
1093
+ var dispatcher = resolveDispatcher();
1094
+ return dispatcher.useMemo(create, deps);
1095
+ }
1096
+ function useImperativeHandle(ref, create, deps) {
1097
+ var dispatcher = resolveDispatcher();
1098
+ return dispatcher.useImperativeHandle(ref, create, deps);
1099
+ }
1100
+ function useDebugValue(value, formatterFn) {
1101
+ {
1102
+ var dispatcher = resolveDispatcher();
1103
+ return dispatcher.useDebugValue(value, formatterFn);
1104
+ }
1105
+ }
1106
+ function useTransition() {
1107
+ var dispatcher = resolveDispatcher();
1108
+ return dispatcher.useTransition();
1109
+ }
1110
+ function useDeferredValue(value) {
1111
+ var dispatcher = resolveDispatcher();
1112
+ return dispatcher.useDeferredValue(value);
1113
+ }
1114
+ function useId() {
1115
+ var dispatcher = resolveDispatcher();
1116
+ return dispatcher.useId();
1117
+ }
1118
+ function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
1119
+ var dispatcher = resolveDispatcher();
1120
+ return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
1121
+ }
1122
+ var disabledDepth = 0;
1123
+ var prevLog;
1124
+ var prevInfo;
1125
+ var prevWarn;
1126
+ var prevError;
1127
+ var prevGroup;
1128
+ var prevGroupCollapsed;
1129
+ var prevGroupEnd;
1130
+ function disabledLog() {
1131
+ }
1132
+ disabledLog.__reactDisabledLog = true;
1133
+ function disableLogs() {
1134
+ {
1135
+ if (disabledDepth === 0) {
1136
+ prevLog = console.log;
1137
+ prevInfo = console.info;
1138
+ prevWarn = console.warn;
1139
+ prevError = console.error;
1140
+ prevGroup = console.group;
1141
+ prevGroupCollapsed = console.groupCollapsed;
1142
+ prevGroupEnd = console.groupEnd;
1143
+ var props = {
1144
+ configurable: true,
1145
+ enumerable: true,
1146
+ value: disabledLog,
1147
+ writable: true
1148
+ };
1149
+ Object.defineProperties(console, {
1150
+ info: props,
1151
+ log: props,
1152
+ warn: props,
1153
+ error: props,
1154
+ group: props,
1155
+ groupCollapsed: props,
1156
+ groupEnd: props
1157
+ });
1158
+ }
1159
+ disabledDepth++;
1160
+ }
1161
+ }
1162
+ function reenableLogs() {
1163
+ {
1164
+ disabledDepth--;
1165
+ if (disabledDepth === 0) {
1166
+ var props = {
1167
+ configurable: true,
1168
+ enumerable: true,
1169
+ writable: true
1170
+ };
1171
+ Object.defineProperties(console, {
1172
+ log: assign({}, props, {
1173
+ value: prevLog
1174
+ }),
1175
+ info: assign({}, props, {
1176
+ value: prevInfo
1177
+ }),
1178
+ warn: assign({}, props, {
1179
+ value: prevWarn
1180
+ }),
1181
+ error: assign({}, props, {
1182
+ value: prevError
1183
+ }),
1184
+ group: assign({}, props, {
1185
+ value: prevGroup
1186
+ }),
1187
+ groupCollapsed: assign({}, props, {
1188
+ value: prevGroupCollapsed
1189
+ }),
1190
+ groupEnd: assign({}, props, {
1191
+ value: prevGroupEnd
1192
+ })
1193
+ });
1194
+ }
1195
+ if (disabledDepth < 0) {
1196
+ error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1197
+ }
1198
+ }
1199
+ }
1200
+ var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
1201
+ var prefix;
1202
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
1203
+ {
1204
+ if (prefix === void 0) {
1205
+ try {
1206
+ throw Error();
1207
+ } catch (x) {
1208
+ var match = x.stack.trim().match(/\n( *(at )?)/);
1209
+ prefix = match && match[1] || "";
1210
+ }
1211
+ }
1212
+ return "\n" + prefix + name;
1213
+ }
1214
+ }
1215
+ var reentry = false;
1216
+ var componentFrameCache;
1217
+ {
1218
+ var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
1219
+ componentFrameCache = new PossiblyWeakMap();
1220
+ }
1221
+ function describeNativeComponentFrame(fn, construct) {
1222
+ if (!fn || reentry) {
1223
+ return "";
1224
+ }
1225
+ {
1226
+ var frame = componentFrameCache.get(fn);
1227
+ if (frame !== void 0) {
1228
+ return frame;
1229
+ }
1230
+ }
1231
+ var control;
1232
+ reentry = true;
1233
+ var previousPrepareStackTrace = Error.prepareStackTrace;
1234
+ Error.prepareStackTrace = void 0;
1235
+ var previousDispatcher;
1236
+ {
1237
+ previousDispatcher = ReactCurrentDispatcher$1.current;
1238
+ ReactCurrentDispatcher$1.current = null;
1239
+ disableLogs();
1240
+ }
1241
+ try {
1242
+ if (construct) {
1243
+ var Fake = function() {
1244
+ throw Error();
1245
+ };
1246
+ Object.defineProperty(Fake.prototype, "props", {
1247
+ set: function() {
1248
+ throw Error();
1249
+ }
1250
+ });
1251
+ if (typeof Reflect === "object" && Reflect.construct) {
1252
+ try {
1253
+ Reflect.construct(Fake, []);
1254
+ } catch (x) {
1255
+ control = x;
1256
+ }
1257
+ Reflect.construct(fn, [], Fake);
1258
+ } else {
1259
+ try {
1260
+ Fake.call();
1261
+ } catch (x) {
1262
+ control = x;
1263
+ }
1264
+ fn.call(Fake.prototype);
1265
+ }
1266
+ } else {
1267
+ try {
1268
+ throw Error();
1269
+ } catch (x) {
1270
+ control = x;
1271
+ }
1272
+ fn();
1273
+ }
1274
+ } catch (sample) {
1275
+ if (sample && control && typeof sample.stack === "string") {
1276
+ var sampleLines = sample.stack.split("\n");
1277
+ var controlLines = control.stack.split("\n");
1278
+ var s = sampleLines.length - 1;
1279
+ var c = controlLines.length - 1;
1280
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
1281
+ c--;
1282
+ }
1283
+ for (; s >= 1 && c >= 0; s--, c--) {
1284
+ if (sampleLines[s] !== controlLines[c]) {
1285
+ if (s !== 1 || c !== 1) {
1286
+ do {
1287
+ s--;
1288
+ c--;
1289
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
1290
+ var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
1291
+ if (fn.displayName && _frame.includes("<anonymous>")) {
1292
+ _frame = _frame.replace("<anonymous>", fn.displayName);
1293
+ }
1294
+ {
1295
+ if (typeof fn === "function") {
1296
+ componentFrameCache.set(fn, _frame);
1297
+ }
1298
+ }
1299
+ return _frame;
1300
+ }
1301
+ } while (s >= 1 && c >= 0);
1302
+ }
1303
+ break;
1304
+ }
1305
+ }
1306
+ }
1307
+ } finally {
1308
+ reentry = false;
1309
+ {
1310
+ ReactCurrentDispatcher$1.current = previousDispatcher;
1311
+ reenableLogs();
1312
+ }
1313
+ Error.prepareStackTrace = previousPrepareStackTrace;
1314
+ }
1315
+ var name = fn ? fn.displayName || fn.name : "";
1316
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
1317
+ {
1318
+ if (typeof fn === "function") {
1319
+ componentFrameCache.set(fn, syntheticFrame);
1320
+ }
1321
+ }
1322
+ return syntheticFrame;
1323
+ }
1324
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
1325
+ {
1326
+ return describeNativeComponentFrame(fn, false);
1327
+ }
1328
+ }
1329
+ function shouldConstruct(Component2) {
1330
+ var prototype = Component2.prototype;
1331
+ return !!(prototype && prototype.isReactComponent);
1332
+ }
1333
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
1334
+ if (type == null) {
1335
+ return "";
1336
+ }
1337
+ if (typeof type === "function") {
1338
+ {
1339
+ return describeNativeComponentFrame(type, shouldConstruct(type));
1340
+ }
1341
+ }
1342
+ if (typeof type === "string") {
1343
+ return describeBuiltInComponentFrame(type);
1344
+ }
1345
+ switch (type) {
1346
+ case REACT_SUSPENSE_TYPE:
1347
+ return describeBuiltInComponentFrame("Suspense");
1348
+ case REACT_SUSPENSE_LIST_TYPE:
1349
+ return describeBuiltInComponentFrame("SuspenseList");
1350
+ }
1351
+ if (typeof type === "object") {
1352
+ switch (type.$$typeof) {
1353
+ case REACT_FORWARD_REF_TYPE:
1354
+ return describeFunctionComponentFrame(type.render);
1355
+ case REACT_MEMO_TYPE:
1356
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
1357
+ case REACT_LAZY_TYPE: {
1358
+ var lazyComponent = type;
1359
+ var payload = lazyComponent._payload;
1360
+ var init = lazyComponent._init;
1361
+ try {
1362
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
1363
+ } catch (x) {
1364
+ }
1365
+ }
1366
+ }
1367
+ }
1368
+ return "";
1369
+ }
1370
+ var loggedTypeFailures = {};
1371
+ var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
1372
+ function setCurrentlyValidatingElement(element) {
1373
+ {
1374
+ if (element) {
1375
+ var owner = element._owner;
1376
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1377
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
1378
+ } else {
1379
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
1380
+ }
1381
+ }
1382
+ }
1383
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
1384
+ {
1385
+ var has = Function.call.bind(hasOwnProperty);
1386
+ for (var typeSpecName in typeSpecs) {
1387
+ if (has(typeSpecs, typeSpecName)) {
1388
+ var error$1 = void 0;
1389
+ try {
1390
+ if (typeof typeSpecs[typeSpecName] !== "function") {
1391
+ var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1392
+ err.name = "Invariant Violation";
1393
+ throw err;
1394
+ }
1395
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1396
+ } catch (ex) {
1397
+ error$1 = ex;
1398
+ }
1399
+ if (error$1 && !(error$1 instanceof Error)) {
1400
+ setCurrentlyValidatingElement(element);
1401
+ error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
1402
+ setCurrentlyValidatingElement(null);
1403
+ }
1404
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
1405
+ loggedTypeFailures[error$1.message] = true;
1406
+ setCurrentlyValidatingElement(element);
1407
+ error("Failed %s type: %s", location, error$1.message);
1408
+ setCurrentlyValidatingElement(null);
1409
+ }
1410
+ }
1411
+ }
1412
+ }
1413
+ }
1414
+ function setCurrentlyValidatingElement$1(element) {
1415
+ {
1416
+ if (element) {
1417
+ var owner = element._owner;
1418
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1419
+ setExtraStackFrame(stack);
1420
+ } else {
1421
+ setExtraStackFrame(null);
1422
+ }
1423
+ }
1424
+ }
1425
+ var propTypesMisspellWarningShown;
1426
+ {
1427
+ propTypesMisspellWarningShown = false;
1428
+ }
1429
+ function getDeclarationErrorAddendum() {
1430
+ if (ReactCurrentOwner.current) {
1431
+ var name = getComponentNameFromType(ReactCurrentOwner.current.type);
1432
+ if (name) {
1433
+ return "\n\nCheck the render method of `" + name + "`.";
1434
+ }
1435
+ }
1436
+ return "";
1437
+ }
1438
+ function getSourceInfoErrorAddendum(source) {
1439
+ if (source !== void 0) {
1440
+ var fileName = source.fileName.replace(/^.*[\\\/]/, "");
1441
+ var lineNumber = source.lineNumber;
1442
+ return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
1443
+ }
1444
+ return "";
1445
+ }
1446
+ function getSourceInfoErrorAddendumForProps(elementProps) {
1447
+ if (elementProps !== null && elementProps !== void 0) {
1448
+ return getSourceInfoErrorAddendum(elementProps.__source);
1449
+ }
1450
+ return "";
1451
+ }
1452
+ var ownerHasKeyUseWarning = {};
1453
+ function getCurrentComponentErrorInfo(parentType) {
1454
+ var info = getDeclarationErrorAddendum();
1455
+ if (!info) {
1456
+ var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
1457
+ if (parentName) {
1458
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
1459
+ }
1460
+ }
1461
+ return info;
1462
+ }
1463
+ function validateExplicitKey(element, parentType) {
1464
+ if (!element._store || element._store.validated || element.key != null) {
1465
+ return;
1466
+ }
1467
+ element._store.validated = true;
1468
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1469
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
1470
+ return;
1471
+ }
1472
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
1473
+ var childOwner = "";
1474
+ if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
1475
+ childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
1476
+ }
1477
+ {
1478
+ setCurrentlyValidatingElement$1(element);
1479
+ error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
1480
+ setCurrentlyValidatingElement$1(null);
1481
+ }
1482
+ }
1483
+ function validateChildKeys(node, parentType) {
1484
+ if (typeof node !== "object") {
1485
+ return;
1486
+ }
1487
+ if (isArray(node)) {
1488
+ for (var i = 0; i < node.length; i++) {
1489
+ var child = node[i];
1490
+ if (isValidElement(child)) {
1491
+ validateExplicitKey(child, parentType);
1492
+ }
1493
+ }
1494
+ } else if (isValidElement(node)) {
1495
+ if (node._store) {
1496
+ node._store.validated = true;
1497
+ }
1498
+ } else if (node) {
1499
+ var iteratorFn = getIteratorFn(node);
1500
+ if (typeof iteratorFn === "function") {
1501
+ if (iteratorFn !== node.entries) {
1502
+ var iterator = iteratorFn.call(node);
1503
+ var step;
1504
+ while (!(step = iterator.next()).done) {
1505
+ if (isValidElement(step.value)) {
1506
+ validateExplicitKey(step.value, parentType);
1507
+ }
1508
+ }
1509
+ }
1510
+ }
1511
+ }
1512
+ }
1513
+ function validatePropTypes(element) {
1514
+ {
1515
+ var type = element.type;
1516
+ if (type === null || type === void 0 || typeof type === "string") {
1517
+ return;
1518
+ }
1519
+ var propTypes;
1520
+ if (typeof type === "function") {
1521
+ propTypes = type.propTypes;
1522
+ } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
1523
+ // Inner props are checked in the reconciler.
1524
+ type.$$typeof === REACT_MEMO_TYPE)) {
1525
+ propTypes = type.propTypes;
1526
+ } else {
1527
+ return;
1528
+ }
1529
+ if (propTypes) {
1530
+ var name = getComponentNameFromType(type);
1531
+ checkPropTypes(propTypes, element.props, "prop", name, element);
1532
+ } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
1533
+ propTypesMisspellWarningShown = true;
1534
+ var _name = getComponentNameFromType(type);
1535
+ error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
1536
+ }
1537
+ if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
1538
+ error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1539
+ }
1540
+ }
1541
+ }
1542
+ function validateFragmentProps(fragment) {
1543
+ {
1544
+ var keys = Object.keys(fragment.props);
1545
+ for (var i = 0; i < keys.length; i++) {
1546
+ var key = keys[i];
1547
+ if (key !== "children" && key !== "key") {
1548
+ setCurrentlyValidatingElement$1(fragment);
1549
+ error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
1550
+ setCurrentlyValidatingElement$1(null);
1551
+ break;
1552
+ }
1553
+ }
1554
+ if (fragment.ref !== null) {
1555
+ setCurrentlyValidatingElement$1(fragment);
1556
+ error("Invalid attribute `ref` supplied to `React.Fragment`.");
1557
+ setCurrentlyValidatingElement$1(null);
1558
+ }
1559
+ }
1560
+ }
1561
+ function createElementWithValidation(type, props, children) {
1562
+ var validType = isValidElementType(type);
1563
+ if (!validType) {
1564
+ var info = "";
1565
+ if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
1566
+ info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
1567
+ }
1568
+ var sourceInfo = getSourceInfoErrorAddendumForProps(props);
1569
+ if (sourceInfo) {
1570
+ info += sourceInfo;
1571
+ } else {
1572
+ info += getDeclarationErrorAddendum();
1573
+ }
1574
+ var typeString;
1575
+ if (type === null) {
1576
+ typeString = "null";
1577
+ } else if (isArray(type)) {
1578
+ typeString = "array";
1579
+ } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
1580
+ typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
1581
+ info = " Did you accidentally export a JSX literal instead of a component?";
1582
+ } else {
1583
+ typeString = typeof type;
1584
+ }
1585
+ {
1586
+ error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
1587
+ }
1588
+ }
1589
+ var element = createElement.apply(this, arguments);
1590
+ if (element == null) {
1591
+ return element;
1592
+ }
1593
+ if (validType) {
1594
+ for (var i = 2; i < arguments.length; i++) {
1595
+ validateChildKeys(arguments[i], type);
1596
+ }
1597
+ }
1598
+ if (type === REACT_FRAGMENT_TYPE) {
1599
+ validateFragmentProps(element);
1600
+ } else {
1601
+ validatePropTypes(element);
1602
+ }
1603
+ return element;
1604
+ }
1605
+ var didWarnAboutDeprecatedCreateFactory = false;
1606
+ function createFactoryWithValidation(type) {
1607
+ var validatedFactory = createElementWithValidation.bind(null, type);
1608
+ validatedFactory.type = type;
1609
+ {
1610
+ if (!didWarnAboutDeprecatedCreateFactory) {
1611
+ didWarnAboutDeprecatedCreateFactory = true;
1612
+ warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");
1613
+ }
1614
+ Object.defineProperty(validatedFactory, "type", {
1615
+ enumerable: false,
1616
+ get: function() {
1617
+ warn("Factory.type is deprecated. Access the class directly before passing it to createFactory.");
1618
+ Object.defineProperty(this, "type", {
1619
+ value: type
1620
+ });
1621
+ return type;
1622
+ }
1623
+ });
1624
+ }
1625
+ return validatedFactory;
1626
+ }
1627
+ function cloneElementWithValidation(element, props, children) {
1628
+ var newElement = cloneElement.apply(this, arguments);
1629
+ for (var i = 2; i < arguments.length; i++) {
1630
+ validateChildKeys(arguments[i], newElement.type);
1631
+ }
1632
+ validatePropTypes(newElement);
1633
+ return newElement;
1634
+ }
1635
+ function startTransition(scope, options) {
1636
+ var prevTransition = ReactCurrentBatchConfig.transition;
1637
+ ReactCurrentBatchConfig.transition = {};
1638
+ var currentTransition = ReactCurrentBatchConfig.transition;
1639
+ {
1640
+ ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set();
1641
+ }
1642
+ try {
1643
+ scope();
1644
+ } finally {
1645
+ ReactCurrentBatchConfig.transition = prevTransition;
1646
+ {
1647
+ if (prevTransition === null && currentTransition._updatedFibers) {
1648
+ var updatedFibersCount = currentTransition._updatedFibers.size;
1649
+ if (updatedFibersCount > 10) {
1650
+ warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");
1651
+ }
1652
+ currentTransition._updatedFibers.clear();
1653
+ }
1654
+ }
1655
+ }
1656
+ }
1657
+ var didWarnAboutMessageChannel = false;
1658
+ var enqueueTaskImpl = null;
1659
+ function enqueueTask(task) {
1660
+ if (enqueueTaskImpl === null) {
1661
+ try {
1662
+ var requireString = ("require" + Math.random()).slice(0, 7);
1663
+ var nodeRequire = module && module[requireString];
1664
+ enqueueTaskImpl = nodeRequire.call(module, "timers").setImmediate;
1665
+ } catch (_err) {
1666
+ enqueueTaskImpl = function(callback) {
1667
+ {
1668
+ if (didWarnAboutMessageChannel === false) {
1669
+ didWarnAboutMessageChannel = true;
1670
+ if (typeof MessageChannel === "undefined") {
1671
+ error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.");
1672
+ }
1673
+ }
1674
+ }
1675
+ var channel = new MessageChannel();
1676
+ channel.port1.onmessage = callback;
1677
+ channel.port2.postMessage(void 0);
1678
+ };
1679
+ }
1680
+ }
1681
+ return enqueueTaskImpl(task);
1682
+ }
1683
+ var actScopeDepth = 0;
1684
+ var didWarnNoAwaitAct = false;
1685
+ function act(callback) {
1686
+ {
1687
+ var prevActScopeDepth = actScopeDepth;
1688
+ actScopeDepth++;
1689
+ if (ReactCurrentActQueue.current === null) {
1690
+ ReactCurrentActQueue.current = [];
1691
+ }
1692
+ var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
1693
+ var result;
1694
+ try {
1695
+ ReactCurrentActQueue.isBatchingLegacy = true;
1696
+ result = callback();
1697
+ if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
1698
+ var queue = ReactCurrentActQueue.current;
1699
+ if (queue !== null) {
1700
+ ReactCurrentActQueue.didScheduleLegacyUpdate = false;
1701
+ flushActQueue(queue);
1702
+ }
1703
+ }
1704
+ } catch (error2) {
1705
+ popActScope(prevActScopeDepth);
1706
+ throw error2;
1707
+ } finally {
1708
+ ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
1709
+ }
1710
+ if (result !== null && typeof result === "object" && typeof result.then === "function") {
1711
+ var thenableResult = result;
1712
+ var wasAwaited = false;
1713
+ var thenable = {
1714
+ then: function(resolve, reject) {
1715
+ wasAwaited = true;
1716
+ thenableResult.then(function(returnValue2) {
1717
+ popActScope(prevActScopeDepth);
1718
+ if (actScopeDepth === 0) {
1719
+ recursivelyFlushAsyncActWork(returnValue2, resolve, reject);
1720
+ } else {
1721
+ resolve(returnValue2);
1722
+ }
1723
+ }, function(error2) {
1724
+ popActScope(prevActScopeDepth);
1725
+ reject(error2);
1726
+ });
1727
+ }
1728
+ };
1729
+ {
1730
+ if (!didWarnNoAwaitAct && typeof Promise !== "undefined") {
1731
+ Promise.resolve().then(function() {
1732
+ }).then(function() {
1733
+ if (!wasAwaited) {
1734
+ didWarnNoAwaitAct = true;
1735
+ error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);");
1736
+ }
1737
+ });
1738
+ }
1739
+ }
1740
+ return thenable;
1741
+ } else {
1742
+ var returnValue = result;
1743
+ popActScope(prevActScopeDepth);
1744
+ if (actScopeDepth === 0) {
1745
+ var _queue = ReactCurrentActQueue.current;
1746
+ if (_queue !== null) {
1747
+ flushActQueue(_queue);
1748
+ ReactCurrentActQueue.current = null;
1749
+ }
1750
+ var _thenable = {
1751
+ then: function(resolve, reject) {
1752
+ if (ReactCurrentActQueue.current === null) {
1753
+ ReactCurrentActQueue.current = [];
1754
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1755
+ } else {
1756
+ resolve(returnValue);
1757
+ }
1758
+ }
1759
+ };
1760
+ return _thenable;
1761
+ } else {
1762
+ var _thenable2 = {
1763
+ then: function(resolve, reject) {
1764
+ resolve(returnValue);
1765
+ }
1766
+ };
1767
+ return _thenable2;
1768
+ }
1769
+ }
1770
+ }
1771
+ }
1772
+ function popActScope(prevActScopeDepth) {
1773
+ {
1774
+ if (prevActScopeDepth !== actScopeDepth - 1) {
1775
+ error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
1776
+ }
1777
+ actScopeDepth = prevActScopeDepth;
1778
+ }
1779
+ }
1780
+ function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
1781
+ {
1782
+ var queue = ReactCurrentActQueue.current;
1783
+ if (queue !== null) {
1784
+ try {
1785
+ flushActQueue(queue);
1786
+ enqueueTask(function() {
1787
+ if (queue.length === 0) {
1788
+ ReactCurrentActQueue.current = null;
1789
+ resolve(returnValue);
1790
+ } else {
1791
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1792
+ }
1793
+ });
1794
+ } catch (error2) {
1795
+ reject(error2);
1796
+ }
1797
+ } else {
1798
+ resolve(returnValue);
1799
+ }
1800
+ }
1801
+ }
1802
+ var isFlushing = false;
1803
+ function flushActQueue(queue) {
1804
+ {
1805
+ if (!isFlushing) {
1806
+ isFlushing = true;
1807
+ var i = 0;
1808
+ try {
1809
+ for (; i < queue.length; i++) {
1810
+ var callback = queue[i];
1811
+ do {
1812
+ callback = callback(true);
1813
+ } while (callback !== null);
1814
+ }
1815
+ queue.length = 0;
1816
+ } catch (error2) {
1817
+ queue = queue.slice(i + 1);
1818
+ throw error2;
1819
+ } finally {
1820
+ isFlushing = false;
1821
+ }
1822
+ }
1823
+ }
1824
+ }
1825
+ var createElement$1 = createElementWithValidation;
1826
+ var cloneElement$1 = cloneElementWithValidation;
1827
+ var createFactory = createFactoryWithValidation;
1828
+ var Children = {
1829
+ map: mapChildren,
1830
+ forEach: forEachChildren,
1831
+ count: countChildren,
1832
+ toArray,
1833
+ only: onlyChild
1834
+ };
1835
+ exports.Children = Children;
1836
+ exports.Component = Component;
1837
+ exports.Fragment = REACT_FRAGMENT_TYPE;
1838
+ exports.Profiler = REACT_PROFILER_TYPE;
1839
+ exports.PureComponent = PureComponent;
1840
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
1841
+ exports.Suspense = REACT_SUSPENSE_TYPE;
1842
+ exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
1843
+ exports.act = act;
1844
+ exports.cloneElement = cloneElement$1;
1845
+ exports.createContext = createContext;
1846
+ exports.createElement = createElement$1;
1847
+ exports.createFactory = createFactory;
1848
+ exports.createRef = createRef;
1849
+ exports.forwardRef = forwardRef;
1850
+ exports.isValidElement = isValidElement;
1851
+ exports.lazy = lazy;
1852
+ exports.memo = memo;
1853
+ exports.startTransition = startTransition;
1854
+ exports.unstable_act = act;
1855
+ exports.useCallback = useCallback;
1856
+ exports.useContext = useContext;
1857
+ exports.useDebugValue = useDebugValue;
1858
+ exports.useDeferredValue = useDeferredValue;
1859
+ exports.useEffect = useEffect;
1860
+ exports.useId = useId;
1861
+ exports.useImperativeHandle = useImperativeHandle;
1862
+ exports.useInsertionEffect = useInsertionEffect;
1863
+ exports.useLayoutEffect = useLayoutEffect;
1864
+ exports.useMemo = useMemo;
1865
+ exports.useReducer = useReducer;
1866
+ exports.useRef = useRef;
1867
+ exports.useState = useState;
1868
+ exports.useSyncExternalStore = useSyncExternalStore;
1869
+ exports.useTransition = useTransition;
1870
+ exports.version = ReactVersion;
1871
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
1872
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
1873
+ }
1874
+ })();
1875
+ }
1876
+ }
1877
+ });
1878
+
1879
+ // node_modules/react/index.js
1880
+ var require_react = __commonJS({
1881
+ "node_modules/react/index.js"(exports, module) {
1882
+ if (false) {
1883
+ module.exports = null;
1884
+ } else {
1885
+ module.exports = require_react_development();
1886
+ }
1887
+ }
1888
+ });
1889
+
1890
+ export {
1891
+ require_react
1892
+ };
1893
+ /*! Bundled license information:
1894
+
1895
+ react/cjs/react.development.js:
1896
+ (**
1897
+ * @license React
1898
+ * react.development.js
1899
+ *
1900
+ * Copyright (c) Facebook, Inc. and its affiliates.
1901
+ *
1902
+ * This source code is licensed under the MIT license found in the
1903
+ * LICENSE file in the root directory of this source tree.
1904
+ *)
1905
+ */
1906
+ //# sourceMappingURL=chunk-DRWLMN53.js.map
frontend/node_modules/.vite/deps/chunk-DRWLMN53.js.map ADDED
The diff for this file is too large to render. See raw diff
 
frontend/node_modules/.vite/deps/chunk-FF4LPVR2.js ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ createContextScope
3
+ } from "./chunk-R4J6KICQ.js";
4
+ import {
5
+ Primitive
6
+ } from "./chunk-HMLLSKRK.js";
7
+ import {
8
+ createSlot,
9
+ useComposedRefs
10
+ } from "./chunk-TLMPZXCM.js";
11
+ import {
12
+ require_jsx_runtime
13
+ } from "./chunk-6PXSGDAH.js";
14
+ import {
15
+ require_react
16
+ } from "./chunk-DRWLMN53.js";
17
+ import {
18
+ __toESM
19
+ } from "./chunk-G3PMV62Z.js";
20
+
21
+ // node_modules/@radix-ui/react-collection/dist/index.mjs
22
+ var import_react = __toESM(require_react(), 1);
23
+ var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
24
+ var import_react2 = __toESM(require_react(), 1);
25
+ var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
26
+ function createCollection(name) {
27
+ const PROVIDER_NAME = name + "CollectionProvider";
28
+ const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);
29
+ const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
30
+ PROVIDER_NAME,
31
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
32
+ );
33
+ const CollectionProvider = (props) => {
34
+ const { scope, children } = props;
35
+ const ref = import_react.default.useRef(null);
36
+ const itemMap = import_react.default.useRef(/* @__PURE__ */ new Map()).current;
37
+ return (0, import_jsx_runtime.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
38
+ };
39
+ CollectionProvider.displayName = PROVIDER_NAME;
40
+ const COLLECTION_SLOT_NAME = name + "CollectionSlot";
41
+ const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
42
+ const CollectionSlot = import_react.default.forwardRef(
43
+ (props, forwardedRef) => {
44
+ const { scope, children } = props;
45
+ const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
46
+ const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
47
+ return (0, import_jsx_runtime.jsx)(CollectionSlotImpl, { ref: composedRefs, children });
48
+ }
49
+ );
50
+ CollectionSlot.displayName = COLLECTION_SLOT_NAME;
51
+ const ITEM_SLOT_NAME = name + "CollectionItemSlot";
52
+ const ITEM_DATA_ATTR = "data-radix-collection-item";
53
+ const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
54
+ const CollectionItemSlot = import_react.default.forwardRef(
55
+ (props, forwardedRef) => {
56
+ const { scope, children, ...itemData } = props;
57
+ const ref = import_react.default.useRef(null);
58
+ const composedRefs = useComposedRefs(forwardedRef, ref);
59
+ const context = useCollectionContext(ITEM_SLOT_NAME, scope);
60
+ import_react.default.useEffect(() => {
61
+ context.itemMap.set(ref, { ref, ...itemData });
62
+ return () => void context.itemMap.delete(ref);
63
+ });
64
+ return (0, import_jsx_runtime.jsx)(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
65
+ }
66
+ );
67
+ CollectionItemSlot.displayName = ITEM_SLOT_NAME;
68
+ function useCollection(scope) {
69
+ const context = useCollectionContext(name + "CollectionConsumer", scope);
70
+ const getItems = import_react.default.useCallback(() => {
71
+ const collectionNode = context.collectionRef.current;
72
+ if (!collectionNode) return [];
73
+ const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
74
+ const items = Array.from(context.itemMap.values());
75
+ const orderedItems = items.sort(
76
+ (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
77
+ );
78
+ return orderedItems;
79
+ }, [context.collectionRef, context.itemMap]);
80
+ return getItems;
81
+ }
82
+ return [
83
+ { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
84
+ useCollection,
85
+ createCollectionScope
86
+ ];
87
+ }
88
+
89
+ // node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
90
+ var React3 = __toESM(require_react(), 1);
91
+ var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
92
+ var VISUALLY_HIDDEN_STYLES = Object.freeze({
93
+ // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
94
+ position: "absolute",
95
+ border: 0,
96
+ width: 1,
97
+ height: 1,
98
+ padding: 0,
99
+ margin: -1,
100
+ overflow: "hidden",
101
+ clip: "rect(0, 0, 0, 0)",
102
+ whiteSpace: "nowrap",
103
+ wordWrap: "normal"
104
+ });
105
+ var NAME = "VisuallyHidden";
106
+ var VisuallyHidden = React3.forwardRef(
107
+ (props, forwardedRef) => {
108
+ return (0, import_jsx_runtime3.jsx)(
109
+ Primitive.span,
110
+ {
111
+ ...props,
112
+ ref: forwardedRef,
113
+ style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }
114
+ }
115
+ );
116
+ }
117
+ );
118
+ VisuallyHidden.displayName = NAME;
119
+
120
+ export {
121
+ createCollection,
122
+ VISUALLY_HIDDEN_STYLES,
123
+ VisuallyHidden
124
+ };
125
+ //# sourceMappingURL=chunk-FF4LPVR2.js.map
frontend/node_modules/.vite/deps/chunk-FF4LPVR2.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../@radix-ui/react-collection/src/collection-legacy.tsx", "../../@radix-ui/react-collection/src/collection.tsx", "../../@radix-ui/react-collection/src/ordered-dictionary.ts", "../../@radix-ui/react-visually-hidden/src/visually-hidden.tsx"],
4
+ "sourcesContent": ["import React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createSlot, type Slot } from '@radix-ui/react-slot';\n\ntype SlotProps = React.ComponentPropsWithoutRef<typeof Slot>;\ntype CollectionElement = HTMLElement;\ninterface CollectionProps extends SlotProps {\n scope: any;\n}\n\n// We have resorted to returning slots directly rather than exposing primitives that can then\n// be slotted like `<CollectionItem as={Slot}>\u2026</CollectionItem>`.\n// This is because we encountered issues with generic types that cannot be statically analysed\n// due to creating them dynamically via createCollection.\n\nfunction createCollection<ItemElement extends HTMLElement, ItemData = {}>(name: string) {\n /* -----------------------------------------------------------------------------------------------\n * CollectionProvider\n * ---------------------------------------------------------------------------------------------*/\n\n const PROVIDER_NAME = name + 'CollectionProvider';\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n\n type ContextValue = {\n collectionRef: React.RefObject<CollectionElement | null>;\n itemMap: Map<\n React.RefObject<ItemElement | null>,\n { ref: React.RefObject<ItemElement | null> } & ItemData\n >;\n };\n\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext<ContextValue>(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: new Map() }\n );\n\n const CollectionProvider: React.FC<{ children?: React.ReactNode; scope: any }> = (props) => {\n const { scope, children } = props;\n const ref = React.useRef<CollectionElement>(null);\n const itemMap = React.useRef<ContextValue['itemMap']>(new Map()).current;\n return (\n <CollectionProviderImpl scope={scope} itemMap={itemMap} collectionRef={ref}>\n {children}\n </CollectionProviderImpl>\n );\n };\n\n CollectionProvider.displayName = PROVIDER_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * CollectionSlot\n * ---------------------------------------------------------------------------------------------*/\n\n const COLLECTION_SLOT_NAME = name + 'CollectionSlot';\n\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef<CollectionElement, CollectionProps>(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return <CollectionSlotImpl ref={composedRefs}>{children}</CollectionSlotImpl>;\n }\n );\n\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * CollectionItem\n * ---------------------------------------------------------------------------------------------*/\n\n const ITEM_SLOT_NAME = name + 'CollectionItemSlot';\n const ITEM_DATA_ATTR = 'data-radix-collection-item';\n\n type CollectionItemSlotProps = ItemData & {\n children: React.ReactNode;\n scope: any;\n };\n\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef<ItemElement, CollectionItemSlotProps>(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef<ItemElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...(itemData as unknown as ItemData) });\n return () => void context.itemMap.delete(ref);\n });\n\n return (\n <CollectionItemSlotImpl {...{ [ITEM_DATA_ATTR]: '' }} ref={composedRefs}>\n {children}\n </CollectionItemSlotImpl>\n );\n }\n );\n\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * useCollection\n * ---------------------------------------------------------------------------------------------*/\n\n function useCollection(scope: any) {\n const context = useCollectionContext(name + 'CollectionConsumer', scope);\n\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current!) - orderedNodes.indexOf(b.ref.current!)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n\n return getItems;\n }\n\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope,\n ] as const;\n}\n\nexport { createCollection };\nexport type { CollectionProps };\n", "import React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createSlot, type Slot } from '@radix-ui/react-slot';\nimport type { EntryOf } from './ordered-dictionary';\nimport { OrderedDict } from './ordered-dictionary';\n\ntype SlotProps = React.ComponentPropsWithoutRef<typeof Slot>;\ntype CollectionElement = HTMLElement;\ninterface CollectionProps extends SlotProps {\n scope: any;\n}\n\ninterface BaseItemData {\n id?: string;\n}\n\ntype ItemDataWithElement<\n ItemData extends BaseItemData,\n ItemElement extends HTMLElement,\n> = ItemData & {\n element: ItemElement;\n};\n\ntype ItemMap<ItemElement extends HTMLElement, ItemData extends BaseItemData> = OrderedDict<\n ItemElement,\n ItemDataWithElement<ItemData, ItemElement>\n>;\n\nfunction createCollection<\n ItemElement extends HTMLElement,\n ItemData extends BaseItemData = BaseItemData,\n>(name: string) {\n /* -----------------------------------------------------------------------------------------------\n * CollectionProvider\n * ---------------------------------------------------------------------------------------------*/\n\n const PROVIDER_NAME = name + 'CollectionProvider';\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n\n type ContextValue = {\n collectionElement: CollectionElement | null;\n collectionRef: React.Ref<CollectionElement | null>;\n collectionRefObject: React.RefObject<CollectionElement | null>;\n itemMap: ItemMap<ItemElement, ItemData>;\n setItemMap: React.Dispatch<React.SetStateAction<ItemMap<ItemElement, ItemData>>>;\n };\n\n const [CollectionContextProvider, useCollectionContext] = createCollectionContext<ContextValue>(\n PROVIDER_NAME,\n {\n collectionElement: null,\n collectionRef: { current: null },\n collectionRefObject: { current: null },\n itemMap: new OrderedDict(),\n setItemMap: () => void 0,\n }\n );\n\n type CollectionState = [\n ItemMap: ItemMap<ItemElement, ItemData>,\n SetItemMap: React.Dispatch<React.SetStateAction<ItemMap<ItemElement, ItemData>>>,\n ];\n\n const CollectionProvider: React.FC<{\n children?: React.ReactNode;\n scope: any;\n state?: CollectionState;\n }> = ({ state, ...props }) => {\n return state ? (\n <CollectionProviderImpl {...props} state={state} />\n ) : (\n <CollectionInit {...props} />\n );\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n\n const CollectionInit: React.FC<{\n children?: React.ReactNode;\n scope: any;\n }> = (props) => {\n const state = useInitCollection();\n return <CollectionProviderImpl {...props} state={state} />;\n };\n CollectionInit.displayName = PROVIDER_NAME + 'Init';\n\n const CollectionProviderImpl: React.FC<{\n children?: React.ReactNode;\n scope: any;\n state: CollectionState;\n }> = (props) => {\n const { scope, children, state } = props;\n const ref = React.useRef<CollectionElement>(null);\n const [collectionElement, setCollectionElement] = React.useState<CollectionElement | null>(\n null\n );\n const composeRefs = useComposedRefs(ref, setCollectionElement);\n const [itemMap, setItemMap] = state;\n\n React.useEffect(() => {\n if (!collectionElement) return;\n\n const observer = getChildListObserver(() => {\n // setItemMap((map) => {\n // const copy = new OrderedDict(map).toSorted(([, a], [, b]) =>\n // !a.element || !b.element ? 0 : isElementPreceding(a.element, b.element) ? -1 : 1\n // );\n // // check if the order has changed\n // let index = -1;\n // for (const entry of copy) {\n // index++;\n // const key = map.keyAt(index)!;\n // const [copyKey] = entry;\n // if (key !== copyKey) {\n // // order has changed!\n // return copy;\n // }\n // }\n // return map;\n // });\n });\n observer.observe(collectionElement, {\n childList: true,\n subtree: true,\n });\n return () => {\n observer.disconnect();\n };\n }, [collectionElement]);\n\n return (\n <CollectionContextProvider\n scope={scope}\n itemMap={itemMap}\n setItemMap={setItemMap}\n collectionRef={composeRefs}\n collectionRefObject={ref}\n collectionElement={collectionElement}\n >\n {children}\n </CollectionContextProvider>\n );\n };\n\n CollectionProviderImpl.displayName = PROVIDER_NAME + 'Impl';\n\n /* -----------------------------------------------------------------------------------------------\n * CollectionSlot\n * ---------------------------------------------------------------------------------------------*/\n\n const COLLECTION_SLOT_NAME = name + 'CollectionSlot';\n\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef<CollectionElement, CollectionProps>(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return <CollectionSlotImpl ref={composedRefs}>{children}</CollectionSlotImpl>;\n }\n );\n\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * CollectionItem\n * ---------------------------------------------------------------------------------------------*/\n\n const ITEM_SLOT_NAME = name + 'CollectionItemSlot';\n const ITEM_DATA_ATTR = 'data-radix-collection-item';\n\n type CollectionItemSlotProps = ItemData & {\n children: React.ReactNode;\n scope: any;\n };\n\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef<ItemElement, CollectionItemSlotProps>(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef<ItemElement>(null);\n const [element, setElement] = React.useState<ItemElement | null>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, setElement);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n\n const { setItemMap } = context;\n\n const itemDataRef = React.useRef(itemData);\n if (!shallowEqual(itemDataRef.current, itemData)) {\n itemDataRef.current = itemData;\n }\n const memoizedItemData = itemDataRef.current;\n\n React.useEffect(() => {\n const itemData = memoizedItemData;\n setItemMap((map) => {\n if (!element) {\n return map;\n }\n\n if (!map.has(element)) {\n map.set(element, { ...(itemData as unknown as ItemData), element });\n return map.toSorted(sortByDocumentPosition);\n }\n\n return map\n .set(element, { ...(itemData as unknown as ItemData), element })\n .toSorted(sortByDocumentPosition);\n });\n\n return () => {\n setItemMap((map) => {\n if (!element || !map.has(element)) {\n return map;\n }\n map.delete(element);\n return new OrderedDict(map);\n });\n };\n }, [element, memoizedItemData, setItemMap]);\n\n return (\n <CollectionItemSlotImpl {...{ [ITEM_DATA_ATTR]: '' }} ref={composedRefs as any}>\n {children}\n </CollectionItemSlotImpl>\n );\n }\n );\n\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * useInitCollection\n * ---------------------------------------------------------------------------------------------*/\n\n function useInitCollection() {\n return React.useState<ItemMap<ItemElement, ItemData>>(new OrderedDict());\n }\n\n /* -----------------------------------------------------------------------------------------------\n * useCollection\n * ---------------------------------------------------------------------------------------------*/\n\n function useCollection(scope: any) {\n const { itemMap } = useCollectionContext(name + 'CollectionConsumer', scope);\n\n return itemMap;\n }\n\n const functions = {\n createCollectionScope,\n useCollection,\n useInitCollection,\n };\n\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n functions,\n ] as const;\n}\n\nexport { createCollection };\nexport type { CollectionProps };\n\nfunction shallowEqual(a: any, b: any) {\n if (a === b) return true;\n if (typeof a !== 'object' || typeof b !== 'object') return false;\n if (a == null || b == null) return false;\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n for (const key of keysA) {\n if (!Object.prototype.hasOwnProperty.call(b, key)) return false;\n if (a[key] !== b[key]) return false;\n }\n return true;\n}\n\nfunction isElementPreceding(a: Element, b: Element) {\n return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING);\n}\n\nfunction sortByDocumentPosition<E extends HTMLElement, T extends BaseItemData>(\n a: EntryOf<ItemMap<E, T>>,\n b: EntryOf<ItemMap<E, T>>\n) {\n return !a[1].element || !b[1].element\n ? 0\n : isElementPreceding(a[1].element, b[1].element)\n ? -1\n : 1;\n}\n\nfunction getChildListObserver(callback: () => void) {\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === 'childList') {\n callback();\n return;\n }\n }\n });\n\n return observer;\n}\n", "// Not a real member because it shouldn't be accessible, but the super class\n// calls `set` which needs to read the instanciation state, so it can't be a\n// private member.\nconst __instanciated = new WeakMap<OrderedDict<any, any>, boolean>();\nexport class OrderedDict<K, V> extends Map<K, V> {\n #keys: K[];\n\n constructor(iterable?: Iterable<readonly [K, V]> | null | undefined);\n constructor(entries?: readonly (readonly [K, V])[] | null) {\n super(entries);\n this.#keys = [...super.keys()];\n __instanciated.set(this, true);\n }\n\n set(key: K, value: V) {\n if (__instanciated.get(this)) {\n if (this.has(key)) {\n this.#keys[this.#keys.indexOf(key)] = key;\n } else {\n this.#keys.push(key);\n }\n }\n super.set(key, value);\n return this;\n }\n\n insert(index: number, key: K, value: V) {\n const has = this.has(key);\n const length = this.#keys.length;\n const relativeIndex = toSafeInteger(index);\n let actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n const safeIndex = actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n\n if (safeIndex === this.size || (has && safeIndex === this.size - 1) || safeIndex === -1) {\n this.set(key, value);\n return this;\n }\n\n const size = this.size + (has ? 0 : 1);\n\n // If you insert at, say, -2, without this bit you'd replace the\n // second-to-last item and push the rest up one, which means the new item is\n // 3rd to last. This isn't very intuitive; inserting at -2 is more like\n // saying \"make this item the second to last\".\n if (relativeIndex < 0) {\n actualIndex++;\n }\n\n const keys = [...this.#keys];\n let nextValue: V | undefined;\n let shouldSkip = false;\n for (let i = actualIndex; i < size; i++) {\n if (actualIndex === i) {\n let nextKey = keys[i]!;\n if (keys[i] === key) {\n nextKey = keys[i + 1]!;\n }\n if (has) {\n // delete first to ensure that the item is moved to the end\n this.delete(key);\n }\n nextValue = this.get(nextKey);\n this.set(key, value);\n } else {\n if (!shouldSkip && keys[i - 1] === key) {\n shouldSkip = true;\n }\n const currentKey = keys[shouldSkip ? i : i - 1]!;\n const currentValue = nextValue!;\n nextValue = this.get(currentKey);\n this.delete(currentKey);\n this.set(currentKey, currentValue);\n }\n }\n return this;\n }\n\n with(index: number, key: K, value: V) {\n const copy = new OrderedDict(this);\n copy.insert(index, key, value);\n return copy;\n }\n\n before(key: K) {\n const index = this.#keys.indexOf(key) - 1;\n if (index < 0) {\n return undefined;\n }\n return this.entryAt(index);\n }\n\n /**\n * Sets a new key-value pair at the position before the given key.\n */\n setBefore(key: K, newKey: K, value: V) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index, newKey, value);\n }\n\n after(key: K) {\n let index = this.#keys.indexOf(key);\n index = index === -1 || index === this.size - 1 ? -1 : index + 1;\n if (index === -1) {\n return undefined;\n }\n return this.entryAt(index);\n }\n\n /**\n * Sets a new key-value pair at the position after the given key.\n */\n setAfter(key: K, newKey: K, value: V) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index + 1, newKey, value);\n }\n\n first() {\n return this.entryAt(0);\n }\n\n last() {\n return this.entryAt(-1);\n }\n\n clear() {\n this.#keys = [];\n return super.clear();\n }\n\n delete(key: K) {\n const deleted = super.delete(key);\n if (deleted) {\n this.#keys.splice(this.#keys.indexOf(key), 1);\n }\n return deleted;\n }\n\n deleteAt(index: number) {\n const key = this.keyAt(index);\n if (key !== undefined) {\n return this.delete(key);\n }\n return false;\n }\n\n at(index: number) {\n const key = at(this.#keys, index);\n if (key !== undefined) {\n return this.get(key);\n }\n }\n\n entryAt(index: number): [K, V] | undefined {\n const key = at(this.#keys, index);\n if (key !== undefined) {\n return [key, this.get(key)!];\n }\n }\n\n indexOf(key: K) {\n return this.#keys.indexOf(key);\n }\n\n keyAt(index: number) {\n return at(this.#keys, index);\n }\n\n from(key: K, offset: number) {\n const index = this.indexOf(key);\n if (index === -1) {\n return undefined;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.at(dest);\n }\n\n keyFrom(key: K, offset: number) {\n const index = this.indexOf(key);\n if (index === -1) {\n return undefined;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.keyAt(dest);\n }\n\n find(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => boolean,\n thisArg?: any\n ) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return entry;\n }\n index++;\n }\n return undefined;\n }\n\n findIndex(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => boolean,\n thisArg?: any\n ) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return index;\n }\n index++;\n }\n return -1;\n }\n\n filter<KK extends K, VV extends V>(\n predicate: (entry: [K, V], index: number, dict: OrderedDict<K, V>) => entry is [KK, VV],\n thisArg?: any\n ): OrderedDict<KK, VV>;\n\n filter(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => unknown,\n thisArg?: any\n ): OrderedDict<K, V>;\n\n filter(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => unknown,\n thisArg?: any\n ) {\n const entries: Array<[K, V]> = [];\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n entries.push(entry);\n }\n index++;\n }\n return new OrderedDict(entries);\n }\n\n map<U>(\n callbackfn: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => U,\n thisArg?: any\n ): OrderedDict<K, U> {\n const entries: [K, U][] = [];\n let index = 0;\n for (const entry of this) {\n entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index, this])]);\n index++;\n }\n return new OrderedDict(entries);\n }\n\n reduce(\n callbackfn: (\n previousValue: [K, V],\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => [K, V]\n ): [K, V];\n reduce(\n callbackfn: (\n previousValue: [K, V],\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => [K, V],\n initialValue: [K, V]\n ): [K, V];\n reduce<U>(\n callbackfn: (\n previousValue: U,\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => U,\n initialValue: U\n ): U;\n\n reduce<U>(\n ...args: [\n (\n previousValue: U,\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => U,\n U?,\n ]\n ) {\n const [callbackfn, initialValue] = args;\n let index = 0;\n let accumulator = initialValue ?? this.at(0)!;\n for (const entry of this) {\n if (index === 0 && args.length === 1) {\n accumulator = entry as any;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n index++;\n }\n return accumulator;\n }\n\n reduceRight(\n callbackfn: (\n previousValue: [K, V],\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => [K, V]\n ): [K, V];\n reduceRight(\n callbackfn: (\n previousValue: [K, V],\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => [K, V],\n initialValue: [K, V]\n ): [K, V];\n reduceRight<U>(\n callbackfn: (\n previousValue: [K, V],\n currentValue: U,\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => U,\n initialValue: U\n ): U;\n\n reduceRight<U>(\n ...args: [\n (\n previousValue: U,\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => U,\n U?,\n ]\n ) {\n const [callbackfn, initialValue] = args;\n let accumulator = initialValue ?? this.at(-1)!;\n for (let index = this.size - 1; index >= 0; index--) {\n const entry = this.at(index)!;\n if (index === this.size - 1 && args.length === 1) {\n accumulator = entry as any;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n }\n return accumulator;\n }\n\n toSorted(compareFn?: (a: [K, V], b: [K, V]) => number): OrderedDict<K, V> {\n const entries = [...this.entries()].sort(compareFn);\n return new OrderedDict(entries);\n }\n\n toReversed(): OrderedDict<K, V> {\n const reversed = new OrderedDict<K, V>();\n for (let index = this.size - 1; index >= 0; index--) {\n const key = this.keyAt(index)!;\n const element = this.get(key)!;\n reversed.set(key, element);\n }\n return reversed;\n }\n\n toSpliced(start: number, deleteCount?: number): OrderedDict<K, V>;\n toSpliced(start: number, deleteCount: number, ...items: [K, V][]): OrderedDict<K, V>;\n\n toSpliced(...args: [start: number, deleteCount: number, ...items: [K, V][]]) {\n const entries = [...this.entries()];\n entries.splice(...args);\n return new OrderedDict(entries);\n }\n\n slice(start?: number, end?: number) {\n const result = new OrderedDict<K, V>();\n let stop = this.size - 1;\n\n if (start === undefined) {\n return result;\n }\n\n if (start < 0) {\n start = start + this.size;\n }\n\n if (end !== undefined && end > 0) {\n stop = end - 1;\n }\n\n for (let index = start; index <= stop; index++) {\n const key = this.keyAt(index)!;\n const element = this.get(key)!;\n result.set(key, element);\n }\n return result;\n }\n\n every(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => unknown,\n thisArg?: any\n ) {\n let index = 0;\n for (const entry of this) {\n if (!Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return false;\n }\n index++;\n }\n return true;\n }\n\n some(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => unknown,\n thisArg?: any\n ) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return true;\n }\n index++;\n }\n return false;\n }\n}\n\nexport type KeyOf<D extends OrderedDict<any, any>> =\n D extends OrderedDict<infer K, any> ? K : never;\nexport type ValueOf<D extends OrderedDict<any, any>> =\n D extends OrderedDict<any, infer V> ? V : never;\nexport type EntryOf<D extends OrderedDict<any, any>> = [KeyOf<D>, ValueOf<D>];\nexport type KeyFrom<E extends EntryOf<any>> = E[0];\nexport type ValueFrom<E extends EntryOf<any>> = E[1];\n\nfunction at<T>(array: ArrayLike<T>, index: number): T | undefined {\n if ('at' in Array.prototype) {\n return Array.prototype.at.call(array, index);\n }\n const actualIndex = toSafeIndex(array, index);\n return actualIndex === -1 ? undefined : array[actualIndex];\n}\n\nfunction toSafeIndex(array: ArrayLike<any>, index: number) {\n const length = array.length;\n const relativeIndex = toSafeInteger(index);\n const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n}\n\nfunction toSafeInteger(number: number) {\n // eslint-disable-next-line no-self-compare\n return number !== number || number === 0 ? 0 : Math.trunc(number);\n}\n", "import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * VisuallyHidden\n * -----------------------------------------------------------------------------------------------*/\n\nconst VISUALLY_HIDDEN_STYLES = Object.freeze({\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: 'absolute',\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n wordWrap: 'normal',\n}) satisfies React.CSSProperties;\n\nconst NAME = 'VisuallyHidden';\n\ntype VisuallyHiddenElement = React.ComponentRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface VisuallyHiddenProps extends PrimitiveSpanProps {}\n\nconst VisuallyHidden = React.forwardRef<VisuallyHiddenElement, VisuallyHiddenProps>(\n (props, forwardedRef) => {\n return (\n <Primitive.span\n {...props}\n ref={forwardedRef}\n style={{ ...VISUALLY_HIDDEN_STYLES, ...props.style }}\n />\n );\n }\n);\n\nVisuallyHidden.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = VisuallyHidden;\n\nexport {\n VisuallyHidden,\n //\n Root,\n //\n VISUALLY_HIDDEN_STYLES,\n};\nexport type {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iBAAiB;AACvB,eACE;MAAC,UAAU;MAAV;QACE,GAAG;QACJ,KAAK;QACL,OAAO,EAAE,GAAG,wBAAwB,GAAG,MAAM,MAAM;MAAA;IACrD;EAEJ;AACF;AAEA,eAAe,cAAc;",
6
+ "names": ["import_react", "import_jsx_runtime", "React", "React", "import_jsx_runtime"]
7
+ }
frontend/node_modules/.vite/deps/chunk-G3PMV62Z.js ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __commonJS = (cb, mod) => function __require() {
8
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
+ };
10
+ var __export = (target, all) => {
11
+ for (var name in all)
12
+ __defProp(target, name, { get: all[name], enumerable: true });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
+ mod
29
+ ));
30
+
31
+ export {
32
+ __commonJS,
33
+ __export,
34
+ __toESM
35
+ };
36
+ //# sourceMappingURL=chunk-G3PMV62Z.js.map
frontend/node_modules/.vite/deps/chunk-G3PMV62Z.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
frontend/node_modules/.vite/deps/chunk-HMLLSKRK.js ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ createSlot
3
+ } from "./chunk-TLMPZXCM.js";
4
+ import {
5
+ require_react_dom
6
+ } from "./chunk-PJEEZAML.js";
7
+ import {
8
+ require_jsx_runtime
9
+ } from "./chunk-6PXSGDAH.js";
10
+ import {
11
+ require_react
12
+ } from "./chunk-DRWLMN53.js";
13
+ import {
14
+ __toESM
15
+ } from "./chunk-G3PMV62Z.js";
16
+
17
+ // node_modules/@radix-ui/react-primitive/dist/index.mjs
18
+ var React = __toESM(require_react(), 1);
19
+ var ReactDOM = __toESM(require_react_dom(), 1);
20
+ var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
21
+ var NODES = [
22
+ "a",
23
+ "button",
24
+ "div",
25
+ "form",
26
+ "h2",
27
+ "h3",
28
+ "img",
29
+ "input",
30
+ "label",
31
+ "li",
32
+ "nav",
33
+ "ol",
34
+ "p",
35
+ "select",
36
+ "span",
37
+ "svg",
38
+ "ul"
39
+ ];
40
+ var Primitive = NODES.reduce((primitive, node) => {
41
+ const Slot = createSlot(`Primitive.${node}`);
42
+ const Node = React.forwardRef((props, forwardedRef) => {
43
+ const { asChild, ...primitiveProps } = props;
44
+ const Comp = asChild ? Slot : node;
45
+ if (typeof window !== "undefined") {
46
+ window[Symbol.for("radix-ui")] = true;
47
+ }
48
+ return (0, import_jsx_runtime.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
49
+ });
50
+ Node.displayName = `Primitive.${node}`;
51
+ return { ...primitive, [node]: Node };
52
+ }, {});
53
+ function dispatchDiscreteCustomEvent(target, event) {
54
+ if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
55
+ }
56
+
57
+ export {
58
+ Primitive,
59
+ dispatchDiscreteCustomEvent
60
+ };
61
+ //# sourceMappingURL=chunk-HMLLSKRK.js.map
frontend/node_modules/.vite/deps/chunk-HMLLSKRK.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../@radix-ui/react-primitive/src/primitive.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { createSlot } from '@radix-ui/react-slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'form',\n 'h2',\n 'h3',\n 'img',\n 'input',\n 'label',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'select',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\ntype Primitives = { [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n if (typeof window !== 'undefined') {\n (window as any)[Symbol.for('radix-ui')] = true;\n }\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n });\n\n Node.displayName = `Primitive.${node}`;\n\n return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click \uD83D\uDC4E\n * target.dispatchEvent(new Event(\u2018click\u2019))\n *\n * dispatching a custom type within a non-discrete event \uD83D\uDC4E\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(\u2018customType\u2019))}\n *\n * dispatching a custom type within a `discrete` event \uD83D\uDC4D\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(\u2018customType\u2019))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */\n\nfunction dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ Combination_default,
3
+ FocusScope,
4
+ hideOthers,
5
+ useFocusGuards,
6
+ useId
7
+ } from "./chunk-XET2JR3H.js";
8
+ import {
9
+ DismissableLayer,
10
+ Portal
11
+ } from "./chunk-43NH6PDE.js";
12
+ import {
13
+ Presence
14
+ } from "./chunk-Y2CDDFKN.js";
15
+ import {
16
+ composeEventHandlers,
17
+ createContext2,
18
+ createContextScope,
19
+ useControllableState
20
+ } from "./chunk-R4J6KICQ.js";
21
+ import {
22
+ Primitive
23
+ } from "./chunk-HMLLSKRK.js";
24
+ import {
25
+ createSlot,
26
+ useComposedRefs
27
+ } from "./chunk-TLMPZXCM.js";
28
+ import {
29
+ require_jsx_runtime
30
+ } from "./chunk-6PXSGDAH.js";
31
+ import {
32
+ require_react
33
+ } from "./chunk-DRWLMN53.js";
34
+ import {
35
+ __toESM
36
+ } from "./chunk-G3PMV62Z.js";
37
+
38
+ // node_modules/@radix-ui/react-dialog/dist/index.mjs
39
+ var React = __toESM(require_react(), 1);
40
+ var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
41
+ var DIALOG_NAME = "Dialog";
42
+ var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
43
+ var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
44
+ var Dialog = (props) => {
45
+ const {
46
+ __scopeDialog,
47
+ children,
48
+ open: openProp,
49
+ defaultOpen,
50
+ onOpenChange,
51
+ modal = true
52
+ } = props;
53
+ const triggerRef = React.useRef(null);
54
+ const contentRef = React.useRef(null);
55
+ const [open, setOpen] = useControllableState({
56
+ prop: openProp,
57
+ defaultProp: defaultOpen ?? false,
58
+ onChange: onOpenChange,
59
+ caller: DIALOG_NAME
60
+ });
61
+ return (0, import_jsx_runtime.jsx)(
62
+ DialogProvider,
63
+ {
64
+ scope: __scopeDialog,
65
+ triggerRef,
66
+ contentRef,
67
+ contentId: useId(),
68
+ titleId: useId(),
69
+ descriptionId: useId(),
70
+ open,
71
+ onOpenChange: setOpen,
72
+ onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
73
+ modal,
74
+ children
75
+ }
76
+ );
77
+ };
78
+ Dialog.displayName = DIALOG_NAME;
79
+ var TRIGGER_NAME = "DialogTrigger";
80
+ var DialogTrigger = React.forwardRef(
81
+ (props, forwardedRef) => {
82
+ const { __scopeDialog, ...triggerProps } = props;
83
+ const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
84
+ const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
85
+ return (0, import_jsx_runtime.jsx)(
86
+ Primitive.button,
87
+ {
88
+ type: "button",
89
+ "aria-haspopup": "dialog",
90
+ "aria-expanded": context.open,
91
+ "aria-controls": context.contentId,
92
+ "data-state": getState(context.open),
93
+ ...triggerProps,
94
+ ref: composedTriggerRef,
95
+ onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
96
+ }
97
+ );
98
+ }
99
+ );
100
+ DialogTrigger.displayName = TRIGGER_NAME;
101
+ var PORTAL_NAME = "DialogPortal";
102
+ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
103
+ forceMount: void 0
104
+ });
105
+ var DialogPortal = (props) => {
106
+ const { __scopeDialog, forceMount, children, container } = props;
107
+ const context = useDialogContext(PORTAL_NAME, __scopeDialog);
108
+ return (0, import_jsx_runtime.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || context.open, children: (0, import_jsx_runtime.jsx)(Portal, { asChild: true, container, children: child }) })) });
109
+ };
110
+ DialogPortal.displayName = PORTAL_NAME;
111
+ var OVERLAY_NAME = "DialogOverlay";
112
+ var DialogOverlay = React.forwardRef(
113
+ (props, forwardedRef) => {
114
+ const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
115
+ const { forceMount = portalContext.forceMount, ...overlayProps } = props;
116
+ const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
117
+ return context.modal ? (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || context.open, children: (0, import_jsx_runtime.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
118
+ }
119
+ );
120
+ DialogOverlay.displayName = OVERLAY_NAME;
121
+ var Slot = createSlot("DialogOverlay.RemoveScroll");
122
+ var DialogOverlayImpl = React.forwardRef(
123
+ (props, forwardedRef) => {
124
+ const { __scopeDialog, ...overlayProps } = props;
125
+ const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
126
+ return (
127
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
128
+ // ie. when `Overlay` and `Content` are siblings
129
+ (0, import_jsx_runtime.jsx)(Combination_default, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: (0, import_jsx_runtime.jsx)(
130
+ Primitive.div,
131
+ {
132
+ "data-state": getState(context.open),
133
+ ...overlayProps,
134
+ ref: forwardedRef,
135
+ style: { pointerEvents: "auto", ...overlayProps.style }
136
+ }
137
+ ) })
138
+ );
139
+ }
140
+ );
141
+ var CONTENT_NAME = "DialogContent";
142
+ var DialogContent = React.forwardRef(
143
+ (props, forwardedRef) => {
144
+ const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
145
+ const { forceMount = portalContext.forceMount, ...contentProps } = props;
146
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
147
+ return (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? (0, import_jsx_runtime.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : (0, import_jsx_runtime.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
148
+ }
149
+ );
150
+ DialogContent.displayName = CONTENT_NAME;
151
+ var DialogContentModal = React.forwardRef(
152
+ (props, forwardedRef) => {
153
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
154
+ const contentRef = React.useRef(null);
155
+ const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
156
+ React.useEffect(() => {
157
+ const content = contentRef.current;
158
+ if (content) return hideOthers(content);
159
+ }, []);
160
+ return (0, import_jsx_runtime.jsx)(
161
+ DialogContentImpl,
162
+ {
163
+ ...props,
164
+ ref: composedRefs,
165
+ trapFocus: context.open,
166
+ disableOutsidePointerEvents: true,
167
+ onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
168
+ var _a;
169
+ event.preventDefault();
170
+ (_a = context.triggerRef.current) == null ? void 0 : _a.focus();
171
+ }),
172
+ onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
173
+ const originalEvent = event.detail.originalEvent;
174
+ const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
175
+ const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
176
+ if (isRightClick) event.preventDefault();
177
+ }),
178
+ onFocusOutside: composeEventHandlers(
179
+ props.onFocusOutside,
180
+ (event) => event.preventDefault()
181
+ )
182
+ }
183
+ );
184
+ }
185
+ );
186
+ var DialogContentNonModal = React.forwardRef(
187
+ (props, forwardedRef) => {
188
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
189
+ const hasInteractedOutsideRef = React.useRef(false);
190
+ const hasPointerDownOutsideRef = React.useRef(false);
191
+ return (0, import_jsx_runtime.jsx)(
192
+ DialogContentImpl,
193
+ {
194
+ ...props,
195
+ ref: forwardedRef,
196
+ trapFocus: false,
197
+ disableOutsidePointerEvents: false,
198
+ onCloseAutoFocus: (event) => {
199
+ var _a, _b;
200
+ (_a = props.onCloseAutoFocus) == null ? void 0 : _a.call(props, event);
201
+ if (!event.defaultPrevented) {
202
+ if (!hasInteractedOutsideRef.current) (_b = context.triggerRef.current) == null ? void 0 : _b.focus();
203
+ event.preventDefault();
204
+ }
205
+ hasInteractedOutsideRef.current = false;
206
+ hasPointerDownOutsideRef.current = false;
207
+ },
208
+ onInteractOutside: (event) => {
209
+ var _a, _b;
210
+ (_a = props.onInteractOutside) == null ? void 0 : _a.call(props, event);
211
+ if (!event.defaultPrevented) {
212
+ hasInteractedOutsideRef.current = true;
213
+ if (event.detail.originalEvent.type === "pointerdown") {
214
+ hasPointerDownOutsideRef.current = true;
215
+ }
216
+ }
217
+ const target = event.target;
218
+ const targetIsTrigger = (_b = context.triggerRef.current) == null ? void 0 : _b.contains(target);
219
+ if (targetIsTrigger) event.preventDefault();
220
+ if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
221
+ event.preventDefault();
222
+ }
223
+ }
224
+ }
225
+ );
226
+ }
227
+ );
228
+ var DialogContentImpl = React.forwardRef(
229
+ (props, forwardedRef) => {
230
+ const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
231
+ const context = useDialogContext(CONTENT_NAME, __scopeDialog);
232
+ const contentRef = React.useRef(null);
233
+ const composedRefs = useComposedRefs(forwardedRef, contentRef);
234
+ useFocusGuards();
235
+ return (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
236
+ (0, import_jsx_runtime.jsx)(
237
+ FocusScope,
238
+ {
239
+ asChild: true,
240
+ loop: true,
241
+ trapped: trapFocus,
242
+ onMountAutoFocus: onOpenAutoFocus,
243
+ onUnmountAutoFocus: onCloseAutoFocus,
244
+ children: (0, import_jsx_runtime.jsx)(
245
+ DismissableLayer,
246
+ {
247
+ role: "dialog",
248
+ id: context.contentId,
249
+ "aria-describedby": context.descriptionId,
250
+ "aria-labelledby": context.titleId,
251
+ "data-state": getState(context.open),
252
+ ...contentProps,
253
+ ref: composedRefs,
254
+ onDismiss: () => context.onOpenChange(false)
255
+ }
256
+ )
257
+ }
258
+ ),
259
+ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
260
+ (0, import_jsx_runtime.jsx)(TitleWarning, { titleId: context.titleId }),
261
+ (0, import_jsx_runtime.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
262
+ ] })
263
+ ] });
264
+ }
265
+ );
266
+ var TITLE_NAME = "DialogTitle";
267
+ var DialogTitle = React.forwardRef(
268
+ (props, forwardedRef) => {
269
+ const { __scopeDialog, ...titleProps } = props;
270
+ const context = useDialogContext(TITLE_NAME, __scopeDialog);
271
+ return (0, import_jsx_runtime.jsx)(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
272
+ }
273
+ );
274
+ DialogTitle.displayName = TITLE_NAME;
275
+ var DESCRIPTION_NAME = "DialogDescription";
276
+ var DialogDescription = React.forwardRef(
277
+ (props, forwardedRef) => {
278
+ const { __scopeDialog, ...descriptionProps } = props;
279
+ const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
280
+ return (0, import_jsx_runtime.jsx)(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
281
+ }
282
+ );
283
+ DialogDescription.displayName = DESCRIPTION_NAME;
284
+ var CLOSE_NAME = "DialogClose";
285
+ var DialogClose = React.forwardRef(
286
+ (props, forwardedRef) => {
287
+ const { __scopeDialog, ...closeProps } = props;
288
+ const context = useDialogContext(CLOSE_NAME, __scopeDialog);
289
+ return (0, import_jsx_runtime.jsx)(
290
+ Primitive.button,
291
+ {
292
+ type: "button",
293
+ ...closeProps,
294
+ ref: forwardedRef,
295
+ onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
296
+ }
297
+ );
298
+ }
299
+ );
300
+ DialogClose.displayName = CLOSE_NAME;
301
+ function getState(open) {
302
+ return open ? "open" : "closed";
303
+ }
304
+ var TITLE_WARNING_NAME = "DialogTitleWarning";
305
+ var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
306
+ contentName: CONTENT_NAME,
307
+ titleName: TITLE_NAME,
308
+ docsSlug: "dialog"
309
+ });
310
+ var TitleWarning = ({ titleId }) => {
311
+ const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
312
+ const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
313
+
314
+ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
315
+
316
+ For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
317
+ React.useEffect(() => {
318
+ if (titleId) {
319
+ const hasTitle = document.getElementById(titleId);
320
+ if (!hasTitle) console.error(MESSAGE);
321
+ }
322
+ }, [MESSAGE, titleId]);
323
+ return null;
324
+ };
325
+ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
326
+ var DescriptionWarning = ({ contentRef, descriptionId }) => {
327
+ const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
328
+ const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
329
+ React.useEffect(() => {
330
+ var _a;
331
+ const describedById = (_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby");
332
+ if (descriptionId && describedById) {
333
+ const hasDescription = document.getElementById(descriptionId);
334
+ if (!hasDescription) console.warn(MESSAGE);
335
+ }
336
+ }, [MESSAGE, contentRef, descriptionId]);
337
+ return null;
338
+ };
339
+ var Root = Dialog;
340
+ var Trigger = DialogTrigger;
341
+ var Portal2 = DialogPortal;
342
+ var Overlay = DialogOverlay;
343
+ var Content = DialogContent;
344
+ var Title = DialogTitle;
345
+ var Description = DialogDescription;
346
+ var Close = DialogClose;
347
+
348
+ export {
349
+ createDialogScope,
350
+ Dialog,
351
+ DialogTrigger,
352
+ DialogPortal,
353
+ DialogOverlay,
354
+ DialogContent,
355
+ DialogTitle,
356
+ DialogDescription,
357
+ DialogClose,
358
+ WarningProvider,
359
+ Root,
360
+ Trigger,
361
+ Portal2 as Portal,
362
+ Overlay,
363
+ Content,
364
+ Title,
365
+ Description,
366
+ Close
367
+ };
368
+ //# sourceMappingURL=chunk-MBR23SFK.js.map
frontend/node_modules/.vite/deps/chunk-MBR23SFK.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../@radix-ui/react-dialog/src/dialog.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContext, createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport { hideOthers } from 'aria-hidden';\nimport { createSlot } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Dialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst DIALOG_NAME = 'Dialog';\n\ntype ScopedProps<P> = P & { __scopeDialog?: Scope };\nconst [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\n\ntype DialogContextValue = {\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n contentRef: React.RefObject<DialogContentElement | null>;\n contentId: string;\n titleId: string;\n descriptionId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\nconst [DialogProvider, useDialogContext] = createDialogContext<DialogContextValue>(DIALOG_NAME);\n\ninterface DialogProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n}\n\nconst Dialog: React.FC<DialogProps> = (props: ScopedProps<DialogProps>) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true,\n } = props;\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const contentRef = React.useRef<DialogContentElement>(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME,\n });\n\n return (\n <DialogProvider\n scope={__scopeDialog}\n triggerRef={triggerRef}\n contentRef={contentRef}\n contentId={useId()}\n titleId={useId()}\n descriptionId={useId()}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n {children}\n </DialogProvider>\n );\n};\n\nDialog.displayName = DIALOG_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DialogTrigger';\n\ntype DialogTriggerElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface DialogTriggerProps extends PrimitiveButtonProps {}\n\nconst DialogTrigger = React.forwardRef<DialogTriggerElement, DialogTriggerProps>(\n (props: ScopedProps<DialogTriggerProps>, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return (\n <Primitive.button\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n }\n);\n\nDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'DialogPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createDialogContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface DialogPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogPortal: React.FC<DialogPortalProps> = (props: ScopedProps<DialogPortalProps>) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return (\n <PortalProvider scope={__scopeDialog} forceMount={forceMount}>\n {React.Children.map(children, (child) => (\n <Presence present={forceMount || context.open}>\n <PortalPrimitive asChild container={container}>\n {child}\n </PortalPrimitive>\n </Presence>\n ))}\n </PortalProvider>\n );\n};\n\nDialogPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'DialogOverlay';\n\ntype DialogOverlayElement = DialogOverlayImplElement;\ninterface DialogOverlayProps extends DialogOverlayImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogOverlay = React.forwardRef<DialogOverlayElement, DialogOverlayProps>(\n (props: ScopedProps<DialogOverlayProps>, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? (\n <Presence present={forceMount || context.open}>\n <DialogOverlayImpl {...overlayProps} ref={forwardedRef} />\n </Presence>\n ) : null;\n }\n);\n\nDialogOverlay.displayName = OVERLAY_NAME;\n\ntype DialogOverlayImplElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface DialogOverlayImplProps extends PrimitiveDivProps {}\n\nconst Slot = createSlot('DialogOverlay.RemoveScroll');\n\nconst DialogOverlayImpl = React.forwardRef<DialogOverlayImplElement, DialogOverlayImplProps>(\n (props: ScopedProps<DialogOverlayImplProps>, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n <RemoveScroll as={Slot} allowPinchZoom shards={[context.contentRef]}>\n <Primitive.div\n data-state={getState(context.open)}\n {...overlayProps}\n ref={forwardedRef}\n // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.\n style={{ pointerEvents: 'auto', ...overlayProps.style }}\n />\n </RemoveScroll>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'DialogContent';\n\ntype DialogContentElement = DialogContentTypeElement;\ninterface DialogContentProps extends DialogContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(\n (props: ScopedProps<DialogContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return (\n <Presence present={forceMount || context.open}>\n {context.modal ? (\n <DialogContentModal {...contentProps} ref={forwardedRef} />\n ) : (\n <DialogContentNonModal {...contentProps} ref={forwardedRef} />\n )}\n </Presence>\n );\n }\n);\n\nDialogContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentTypeElement = DialogContentImplElement;\ninterface DialogContentTypeProps\n extends Omit<DialogContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {}\n\nconst DialogContentModal = React.forwardRef<DialogContentTypeElement, DialogContentTypeProps>(\n (props: ScopedProps<DialogContentTypeProps>, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n <DialogContentImpl\n {...props}\n ref={composedRefs}\n // we make sure focus isn't trapped once `DialogContent` has been closed\n // (closed !== unmounted when animating out)\n trapFocus={context.open}\n disableOutsidePointerEvents\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n })}\n onPointerDownOutside={composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n // If the event is a right-click, we shouldn't close because\n // it is effectively as if we right-clicked the `Overlay`.\n if (isRightClick) event.preventDefault();\n })}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) =>\n event.preventDefault()\n )}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst DialogContentNonModal = React.forwardRef<DialogContentTypeElement, DialogContentTypeProps>(\n (props: ScopedProps<DialogContentTypeProps>, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n\n return (\n <DialogContentImpl\n {...props}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') {\n hasPointerDownOutsideRef.current = true;\n }\n }\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n\n // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentImplElement = React.ComponentRef<typeof DismissableLayer>;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;\ninterface DialogContentImplProps extends Omit<DismissableLayerProps, 'onDismiss'> {\n /**\n * When `true`, focus cannot escape the `Content` via keyboard,\n * pointer, or a programmatic focus.\n * @defaultValue false\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst DialogContentImpl = React.forwardRef<DialogContentImplElement, DialogContentImplProps>(\n (props: ScopedProps<DialogContentImplProps>, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n\n // Make sure the whole tree has focus guards as our `Dialog` will be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n return (\n <>\n <FocusScope\n asChild\n loop\n trapped={trapFocus}\n onMountAutoFocus={onOpenAutoFocus}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n <DismissableLayer\n role=\"dialog\"\n id={context.contentId}\n aria-describedby={context.descriptionId}\n aria-labelledby={context.titleId}\n data-state={getState(context.open)}\n {...contentProps}\n ref={composedRefs}\n onDismiss={() => context.onOpenChange(false)}\n />\n </FocusScope>\n {process.env.NODE_ENV !== 'production' && (\n <>\n <TitleWarning titleId={context.titleId} />\n <DescriptionWarning contentRef={contentRef} descriptionId={context.descriptionId} />\n </>\n )}\n </>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'DialogTitle';\n\ntype DialogTitleElement = React.ComponentRef<typeof Primitive.h2>;\ntype PrimitiveHeading2Props = React.ComponentPropsWithoutRef<typeof Primitive.h2>;\ninterface DialogTitleProps extends PrimitiveHeading2Props {}\n\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>(\n (props: ScopedProps<DialogTitleProps>, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return <Primitive.h2 id={context.titleId} {...titleProps} ref={forwardedRef} />;\n }\n);\n\nDialogTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'DialogDescription';\n\ntype DialogDescriptionElement = React.ComponentRef<typeof Primitive.p>;\ntype PrimitiveParagraphProps = React.ComponentPropsWithoutRef<typeof Primitive.p>;\ninterface DialogDescriptionProps extends PrimitiveParagraphProps {}\n\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>(\n (props: ScopedProps<DialogDescriptionProps>, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return <Primitive.p id={context.descriptionId} {...descriptionProps} ref={forwardedRef} />;\n }\n);\n\nDialogDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'DialogClose';\n\ntype DialogCloseElement = React.ComponentRef<typeof Primitive.button>;\ninterface DialogCloseProps extends PrimitiveButtonProps {}\n\nconst DialogClose = React.forwardRef<DialogCloseElement, DialogCloseProps>(\n (props: ScopedProps<DialogCloseProps>, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return (\n <Primitive.button\n type=\"button\"\n {...closeProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, () => context.onOpenChange(false))}\n />\n );\n }\n);\n\nDialogClose.displayName = CLOSE_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst TITLE_WARNING_NAME = 'DialogTitleWarning';\n\nconst [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: 'dialog',\n});\n\ntype TitleWarningProps = { titleId?: string };\n\nconst TitleWarning: React.FC<TitleWarningProps> = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n\n return null;\n};\n\nconst DESCRIPTION_WARNING_NAME = 'DialogDescriptionWarning';\n\ntype DescriptionWarningProps = {\n contentRef: React.RefObject<DialogContentElement | null>;\n descriptionId?: string;\n};\n\nconst DescriptionWarning: React.FC<DescriptionWarningProps> = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute('aria-describedby');\n // if we have an id and the user hasn't set aria-describedby={undefined}\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n\n return null;\n};\n\nconst Root = Dialog;\nconst Trigger = DialogTrigger;\nconst Portal = DialogPortal;\nconst Overlay = DialogOverlay;\nconst Content = DialogContent;\nconst Title = DialogTitle;\nconst Description = DialogDescription;\nconst Close = DialogClose;\n\nexport {\n createDialogScope,\n //\n Dialog,\n DialogTrigger,\n DialogPortal,\n DialogOverlay,\n DialogContent,\n DialogTitle,\n DialogDescription,\n DialogClose,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Title,\n Description,\n Close,\n //\n WarningProvider,\n};\nexport type {\n DialogProps,\n DialogTriggerProps,\n DialogPortalProps,\n DialogOverlayProps,\n DialogContentProps,\n DialogTitleProps,\n DialogDescriptionProps,\n DialogCloseProps,\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AAoEnB,yBAAA;AA9CJ,IAAM,cAAc;AAGpB,IAAM,CAAC,qBAAqB,iBAAiB,IAAI,mBAAmB,WAAW;AAc/E,IAAM,CAAC,gBAAgB,gBAAgB,IAAI,oBAAwC,WAAW;AAU9F,IAAM,SAAgC,CAAC,UAAoC;AACzE,QAAM;IACJ;IACA;IACA,MAAM;IACN;IACA;IACA,QAAQ;EACV,IAAI;AACJ,QAAM,aAAmB,aAA0B,IAAI;AACvD,QAAM,aAAmB,aAA6B,IAAI;AAC1D,QAAM,CAAC,MAAM,OAAO,IAAI,qBAAqB;IAC3C,MAAM;IACN,aAAa,eAAe;IAC5B,UAAU;IACV,QAAQ;EACV,CAAC;AAED,aACE;IAAC;IAAA;MACC,OAAO;MACP;MACA;MACA,WAAW,MAAM;MACjB,SAAS,MAAM;MACf,eAAe,MAAM;MACrB;MACA,cAAc;MACd,cAAoB,kBAAY,MAAM,QAAQ,CAAC,aAAa,CAAC,QAAQ,GAAG,CAAC,OAAO,CAAC;MACjF;MAEC;IAAA;EACH;AAEJ;AAEA,OAAO,cAAc;AAMrB,IAAM,eAAe;AAMrB,IAAM,gBAAsB;EAC1B,CAAC,OAAwC,iBAAiB;AACxD,UAAM,EAAE,eAAe,GAAG,aAAa,IAAI;AAC3C,UAAM,UAAU,iBAAiB,cAAc,aAAa;AAC5D,UAAM,qBAA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AQ,KAAK,OAAO;IAC3C;EACF,GAAG,CAAC,SAAS,YAAY,aAAa,CAAC;AAEvC,SAAO;AACT;AAEA,IAAM,OAAO;AACb,IAAM,UAAU;AAChB,IAAMA,UAAS;AACf,IAAM,UAAU;AAChB,IAAM,UAAU;AAChB,IAAM,QAAQ;AACd,IAAM,cAAc;AACpB,IAAM,QAAQ;",
6
+ "names": ["Portal"]
7
+ }
frontend/node_modules/.vite/deps/chunk-PJEEZAML.js ADDED
The diff for this file is too large to render. See raw diff
 
frontend/node_modules/.vite/deps/chunk-PJEEZAML.js.map ADDED
The diff for this file is too large to render. See raw diff
 
frontend/node_modules/.vite/deps/chunk-PVJESVH4.js ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ useLayoutEffect2
3
+ } from "./chunk-R4J6KICQ.js";
4
+ import {
5
+ require_react
6
+ } from "./chunk-DRWLMN53.js";
7
+ import {
8
+ __toESM
9
+ } from "./chunk-G3PMV62Z.js";
10
+
11
+ // node_modules/@radix-ui/react-use-size/dist/index.mjs
12
+ var React = __toESM(require_react(), 1);
13
+ function useSize(element) {
14
+ const [size, setSize] = React.useState(void 0);
15
+ useLayoutEffect2(() => {
16
+ if (element) {
17
+ setSize({ width: element.offsetWidth, height: element.offsetHeight });
18
+ const resizeObserver = new ResizeObserver((entries) => {
19
+ if (!Array.isArray(entries)) {
20
+ return;
21
+ }
22
+ if (!entries.length) {
23
+ return;
24
+ }
25
+ const entry = entries[0];
26
+ let width;
27
+ let height;
28
+ if ("borderBoxSize" in entry) {
29
+ const borderSizeEntry = entry["borderBoxSize"];
30
+ const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
31
+ width = borderSize["inlineSize"];
32
+ height = borderSize["blockSize"];
33
+ } else {
34
+ width = element.offsetWidth;
35
+ height = element.offsetHeight;
36
+ }
37
+ setSize({ width, height });
38
+ });
39
+ resizeObserver.observe(element, { box: "border-box" });
40
+ return () => resizeObserver.unobserve(element);
41
+ } else {
42
+ setSize(void 0);
43
+ }
44
+ }, [element]);
45
+ return size;
46
+ }
47
+
48
+ // node_modules/@radix-ui/react-use-previous/dist/index.mjs
49
+ var React2 = __toESM(require_react(), 1);
50
+ function usePrevious(value) {
51
+ const ref = React2.useRef({ value, previous: value });
52
+ return React2.useMemo(() => {
53
+ if (ref.current.value !== value) {
54
+ ref.current.previous = ref.current.value;
55
+ ref.current.value = value;
56
+ }
57
+ return ref.current.previous;
58
+ }, [value]);
59
+ }
60
+
61
+ export {
62
+ useSize,
63
+ usePrevious
64
+ };
65
+ //# sourceMappingURL=chunk-PVJESVH4.js.map
frontend/node_modules/.vite/deps/chunk-PVJESVH4.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../@radix-ui/react-use-size/src/use-size.tsx", "../../@radix-ui/react-use-previous/src/use-previous.tsx"],
4
+ "sourcesContent": ["/// <reference types=\"resize-observer-browser\" />\n\nimport * as React from 'react';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\nfunction useSize(element: HTMLElement | null) {\n const [size, setSize] = React.useState<{ width: number; height: number } | undefined>(undefined);\n\n useLayoutEffect(() => {\n if (element) {\n // provide size as early as possible\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n\n // Since we only observe the one element, we don't need to loop over the\n // array\n if (!entries.length) {\n return;\n }\n\n const entry = entries[0];\n let width: number;\n let height: number;\n\n if ('borderBoxSize' in entry) {\n const borderSizeEntry = entry['borderBoxSize'];\n // iron out differences between browsers\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize['inlineSize'];\n height = borderSize['blockSize'];\n } else {\n // for browsers that don't support `borderBoxSize`\n // we calculate it ourselves to get the correct border box.\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n\n setSize({ width, height });\n });\n\n resizeObserver.observe(element, { box: 'border-box' });\n\n return () => resizeObserver.unobserve(element);\n } else {\n // We only want to reset to `undefined` when the element becomes `null`,\n // not if it changes to another element.\n setSize(undefined);\n }\n }, [element]);\n\n return size;\n}\n\nexport { useSize };\n", "import * as React from 'react';\n\nfunction usePrevious<T>(value: T) {\n const ref = React.useRef({ value, previous: value });\n\n // We compare values before making an update to ensure that\n // a change has been made. This ensures the previous value is\n // persisted correctly between renders.\n return React.useMemo(() => {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [value]);\n}\n\nexport { usePrevious };\n"],
5
+ "mappings": ";;;;;;;;;;;AAEA,YAAuB;AAGvB,SAAS,QAAQ,SAA6B;AAC5C,QAAM,CAAC,MAAM,OAAO,IAAU,eAAwD,MAAS;AAE/F,mBAAgB,MAAM;AACpB,QAAI,SAAS;AAEX,cAAQ,EAAE,OAAO,QAAQ,aAAa,QAAQ,QAAQ,aAAa,CAAC;AAEpE,YAAM,iBAAiB,IAAI,eAAe,CAAC,YAAY;AACrD,YAAI,CAAC,MAAM,QAAQ,OAAO,GAAG;AAC3B;QACF;AAIA,YAAI,CAAC,QAAQ,QAAQ;AACnB;QACF;AAEA,cAAM,QAAQ,QAAQ,CAAC;AACvB,YAAI;AACJ,YAAI;AAEJ,YAAI,mBAAmB,OAAO;AAC5B,gBAAM,kBAAkB,MAAM,eAAe;AAE7C,gBAAM,aAAa,MAAM,QAAQ,eAAe,IAAI,gBAAgB,CAAC,IAAI;AACzE,kBAAQ,WAAW,YAAY;AAC/B,mBAAS,WAAW,WAAW;QACjC,OAAO;AAGL,kBAAQ,QAAQ;AAChB,mBAAS,QAAQ;QACnB;AAEA,gBAAQ,EAAE,OAAO,OAAO,CAAC;MAC3B,CAAC;AAED,qBAAe,QAAQ,SAAS,EAAE,KAAK,aAAa,CAAC;AAErD,aAAO,MAAM,eAAe,UAAU,OAAO;IAC/C,OAAO;AAGL,cAAQ,MAAS;IACnB;EACF,GAAG,CAAC,OAAO,CAAC;AAEZ,SAAO;AACT;;;ACvDA,IAAAA,SAAuB;AAEvB,SAAS,YAAe,OAAU;AAChC,QAAM,MAAY,cAAO,EAAE,OAAO,UAAU,MAAM,CAAC;AAKnD,SAAa,eAAQ,MAAM;AACzB,QAAI,IAAI,QAAQ,UAAU,OAAO;AAC/B,UAAI,QAAQ,WAAW,IAAI,QAAQ;AACnC,UAAI,QAAQ,QAAQ;IACtB;AACA,WAAO,IAAI,QAAQ;EACrB,GAAG,CAAC,KAAK,CAAC;AACZ;",
6
+ "names": ["React"]
7
+ }
frontend/node_modules/.vite/deps/chunk-R4J6KICQ.js ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ require_jsx_runtime
3
+ } from "./chunk-6PXSGDAH.js";
4
+ import {
5
+ require_react
6
+ } from "./chunk-DRWLMN53.js";
7
+ import {
8
+ __toESM
9
+ } from "./chunk-G3PMV62Z.js";
10
+
11
+ // node_modules/@radix-ui/primitive/dist/index.mjs
12
+ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
13
+ return function handleEvent(event) {
14
+ originalEventHandler == null ? void 0 : originalEventHandler(event);
15
+ if (checkForDefaultPrevented === false || !event.defaultPrevented) {
16
+ return ourEventHandler == null ? void 0 : ourEventHandler(event);
17
+ }
18
+ };
19
+ }
20
+
21
+ // node_modules/@radix-ui/react-context/dist/index.mjs
22
+ var React = __toESM(require_react(), 1);
23
+ var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
24
+ function createContext2(rootComponentName, defaultContext) {
25
+ const Context = React.createContext(defaultContext);
26
+ const Provider = (props) => {
27
+ const { children, ...context } = props;
28
+ const value = React.useMemo(() => context, Object.values(context));
29
+ return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
30
+ };
31
+ Provider.displayName = rootComponentName + "Provider";
32
+ function useContext2(consumerName) {
33
+ const context = React.useContext(Context);
34
+ if (context) return context;
35
+ if (defaultContext !== void 0) return defaultContext;
36
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
37
+ }
38
+ return [Provider, useContext2];
39
+ }
40
+ function createContextScope(scopeName, createContextScopeDeps = []) {
41
+ let defaultContexts = [];
42
+ function createContext3(rootComponentName, defaultContext) {
43
+ const BaseContext = React.createContext(defaultContext);
44
+ const index = defaultContexts.length;
45
+ defaultContexts = [...defaultContexts, defaultContext];
46
+ const Provider = (props) => {
47
+ var _a;
48
+ const { scope, children, ...context } = props;
49
+ const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
50
+ const value = React.useMemo(() => context, Object.values(context));
51
+ return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
52
+ };
53
+ Provider.displayName = rootComponentName + "Provider";
54
+ function useContext2(consumerName, scope) {
55
+ var _a;
56
+ const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
57
+ const context = React.useContext(Context);
58
+ if (context) return context;
59
+ if (defaultContext !== void 0) return defaultContext;
60
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
61
+ }
62
+ return [Provider, useContext2];
63
+ }
64
+ const createScope = () => {
65
+ const scopeContexts = defaultContexts.map((defaultContext) => {
66
+ return React.createContext(defaultContext);
67
+ });
68
+ return function useScope(scope) {
69
+ const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
70
+ return React.useMemo(
71
+ () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
72
+ [scope, contexts]
73
+ );
74
+ };
75
+ };
76
+ createScope.scopeName = scopeName;
77
+ return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
78
+ }
79
+ function composeContextScopes(...scopes) {
80
+ const baseScope = scopes[0];
81
+ if (scopes.length === 1) return baseScope;
82
+ const createScope = () => {
83
+ const scopeHooks = scopes.map((createScope2) => ({
84
+ useScope: createScope2(),
85
+ scopeName: createScope2.scopeName
86
+ }));
87
+ return function useComposedScopes(overrideScopes) {
88
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
89
+ const scopeProps = useScope(overrideScopes);
90
+ const currentScope = scopeProps[`__scope${scopeName}`];
91
+ return { ...nextScopes2, ...currentScope };
92
+ }, {});
93
+ return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
94
+ };
95
+ };
96
+ createScope.scopeName = baseScope.scopeName;
97
+ return createScope;
98
+ }
99
+
100
+ // node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
101
+ var React2 = __toESM(require_react(), 1);
102
+ var useLayoutEffect2 = (globalThis == null ? void 0 : globalThis.document) ? React2.useLayoutEffect : () => {
103
+ };
104
+
105
+ // node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
106
+ var React4 = __toESM(require_react(), 1);
107
+ var React22 = __toESM(require_react(), 1);
108
+
109
+ // node_modules/@radix-ui/react-use-effect-event/dist/index.mjs
110
+ var React3 = __toESM(require_react(), 1);
111
+ var useReactEffectEvent = React3[" useEffectEvent ".trim().toString()];
112
+ var useReactInsertionEffect = React3[" useInsertionEffect ".trim().toString()];
113
+
114
+ // node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
115
+ var useInsertionEffect = React4[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
116
+ function useControllableState({
117
+ prop,
118
+ defaultProp,
119
+ onChange = () => {
120
+ },
121
+ caller
122
+ }) {
123
+ const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
124
+ defaultProp,
125
+ onChange
126
+ });
127
+ const isControlled = prop !== void 0;
128
+ const value = isControlled ? prop : uncontrolledProp;
129
+ if (true) {
130
+ const isControlledRef = React4.useRef(prop !== void 0);
131
+ React4.useEffect(() => {
132
+ const wasControlled = isControlledRef.current;
133
+ if (wasControlled !== isControlled) {
134
+ const from = wasControlled ? "controlled" : "uncontrolled";
135
+ const to = isControlled ? "controlled" : "uncontrolled";
136
+ console.warn(
137
+ `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
138
+ );
139
+ }
140
+ isControlledRef.current = isControlled;
141
+ }, [isControlled, caller]);
142
+ }
143
+ const setValue = React4.useCallback(
144
+ (nextValue) => {
145
+ var _a;
146
+ if (isControlled) {
147
+ const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
148
+ if (value2 !== prop) {
149
+ (_a = onChangeRef.current) == null ? void 0 : _a.call(onChangeRef, value2);
150
+ }
151
+ } else {
152
+ setUncontrolledProp(nextValue);
153
+ }
154
+ },
155
+ [isControlled, prop, setUncontrolledProp, onChangeRef]
156
+ );
157
+ return [value, setValue];
158
+ }
159
+ function useUncontrolledState({
160
+ defaultProp,
161
+ onChange
162
+ }) {
163
+ const [value, setValue] = React4.useState(defaultProp);
164
+ const prevValueRef = React4.useRef(value);
165
+ const onChangeRef = React4.useRef(onChange);
166
+ useInsertionEffect(() => {
167
+ onChangeRef.current = onChange;
168
+ }, [onChange]);
169
+ React4.useEffect(() => {
170
+ var _a;
171
+ if (prevValueRef.current !== value) {
172
+ (_a = onChangeRef.current) == null ? void 0 : _a.call(onChangeRef, value);
173
+ prevValueRef.current = value;
174
+ }
175
+ }, [value, prevValueRef]);
176
+ return [value, setValue, onChangeRef];
177
+ }
178
+ function isFunction(value) {
179
+ return typeof value === "function";
180
+ }
181
+ var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
182
+
183
+ export {
184
+ composeEventHandlers,
185
+ createContext2,
186
+ createContextScope,
187
+ useLayoutEffect2,
188
+ useControllableState
189
+ };
190
+ //# sourceMappingURL=chunk-R4J6KICQ.js.map
frontend/node_modules/.vite/deps/chunk-R4J6KICQ.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../@radix-ui/primitive/src/primitive.tsx", "../../@radix-ui/react-context/src/create-context.tsx", "../../@radix-ui/react-use-layout-effect/src/use-layout-effect.tsx", "../../@radix-ui/react-use-controllable-state/src/use-controllable-state.tsx", "../../@radix-ui/react-use-controllable-state/src/use-controllable-state-reducer.tsx", "../../@radix-ui/react-use-effect-event/src/use-effect-event.tsx"],
4
+ "sourcesContent": ["function composeEventHandlers<E extends { defaultPrevented: boolean }>(\n originalEventHandler?: (event: E) => void,\n ourEventHandler?: (event: E) => void,\n { checkForDefaultPrevented = true } = {}\n) {\n return function handleEvent(event: E) {\n originalEventHandler?.(event);\n\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\n\nexport { composeEventHandlers };\n", "import * as React from 'react';\n\nfunction createContext<ContextValueType extends object | null>(\n rootComponentName: string,\n defaultContext?: ContextValueType\n) {\n const Context = React.createContext<ContextValueType | undefined>(defaultContext);\n\n const Provider: React.FC<ContextValueType & { children: React.ReactNode }> = (props) => {\n const { children, ...context } = props;\n // Only re-memoize when prop values change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = React.useMemo(() => context, Object.values(context)) as ContextValueType;\n return <Context.Provider value={value}>{children}</Context.Provider>;\n };\n\n Provider.displayName = rootComponentName + 'Provider';\n\n function useContext(consumerName: string) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== undefined) return defaultContext;\n // if a defaultContext wasn't specified, it's a required context.\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n\n return [Provider, useContext] as const;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * createContextScope\n * -----------------------------------------------------------------------------------------------*/\n\ntype Scope<C = any> = { [scopeName: string]: React.Context<C>[] } | undefined;\ntype ScopeHook = (scope: Scope) => { [__scopeProp: string]: Scope };\ninterface CreateScope {\n scopeName: string;\n (): ScopeHook;\n}\n\nfunction createContextScope(scopeName: string, createContextScopeDeps: CreateScope[] = []) {\n let defaultContexts: any[] = [];\n\n /* -----------------------------------------------------------------------------------------------\n * createContext\n * ---------------------------------------------------------------------------------------------*/\n\n function createContext<ContextValueType extends object | null>(\n rootComponentName: string,\n defaultContext?: ContextValueType\n ) {\n const BaseContext = React.createContext<ContextValueType | undefined>(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n\n const Provider: React.FC<\n ContextValueType & { scope: Scope<ContextValueType>; children: React.ReactNode }\n > = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n // Only re-memoize when prop values change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = React.useMemo(() => context, Object.values(context)) as ContextValueType;\n return <Context.Provider value={value}>{children}</Context.Provider>;\n };\n\n Provider.displayName = rootComponentName + 'Provider';\n\n function useContext(consumerName: string, scope: Scope<ContextValueType | undefined>) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== undefined) return defaultContext;\n // if a defaultContext wasn't specified, it's a required context.\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n\n return [Provider, useContext] as const;\n }\n\n /* -----------------------------------------------------------------------------------------------\n * createScope\n * ---------------------------------------------------------------------------------------------*/\n\n const createScope: CreateScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope: Scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n\n createScope.scopeName = scopeName;\n return [createContext, composeContextScopes(createScope, ...createContextScopeDeps)] as const;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * composeContextScopes\n * -----------------------------------------------------------------------------------------------*/\n\nfunction composeContextScopes(...scopes: CreateScope[]) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n\n const createScope: CreateScope = () => {\n const scopeHooks = scopes.map((createScope) => ({\n useScope: createScope(),\n scopeName: createScope.scopeName,\n }));\n\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes, { useScope, scopeName }) => {\n // We are calling a hook inside a callback which React warns against to avoid inconsistent\n // renders, however, scoping doesn't have render side effects so we ignore the rule.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes, ...currentScope };\n }, {});\n\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nexport { createContext, createContextScope };\nexport type { CreateScope, Scope };\n", "import * as React from 'react';\n\n/**\n * On the server, React emits a warning when calling `useLayoutEffect`.\n * This is because neither `useLayoutEffect` nor `useEffect` run on the server.\n * We use this safe version which suppresses the warning by replacing it with a noop on the server.\n *\n * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n */\nconst useLayoutEffect = globalThis?.document ? React.useLayoutEffect : () => {};\n\nexport { useLayoutEffect };\n", "import * as React from 'react';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\n// Prevent bundlers from trying to optimize the import\nconst useInsertionEffect: typeof useLayoutEffect =\n (React as any)[' useInsertionEffect '.trim().toString()] || useLayoutEffect;\n\ntype ChangeHandler<T> = (state: T) => void;\ntype SetStateFn<T> = React.Dispatch<React.SetStateAction<T>>;\n\ninterface UseControllableStateParams<T> {\n prop?: T | undefined;\n defaultProp: T;\n onChange?: ChangeHandler<T>;\n caller?: string;\n}\n\nexport function useControllableState<T>({\n prop,\n defaultProp,\n onChange = () => {},\n caller,\n}: UseControllableStateParams<T>): [T, SetStateFn<T>] {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange,\n });\n const isControlled = prop !== undefined;\n const value = isControlled ? prop : uncontrolledProp;\n\n // OK to disable conditionally calling hooks here because they will always run\n // consistently in the same environment. Bundlers should be able to remove the\n // code block entirely in production.\n /* eslint-disable react-hooks/rules-of-hooks */\n if (process.env.NODE_ENV !== 'production') {\n const isControlledRef = React.useRef(prop !== undefined);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? 'controlled' : 'uncontrolled';\n const to = isControlled ? 'controlled' : 'uncontrolled';\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n /* eslint-enable react-hooks/rules-of-hooks */\n\n const setValue = React.useCallback<SetStateFn<T>>(\n (nextValue) => {\n if (isControlled) {\n const value = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value !== prop) {\n onChangeRef.current?.(value);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n\n return [value, setValue];\n}\n\nfunction useUncontrolledState<T>({\n defaultProp,\n onChange,\n}: Omit<UseControllableStateParams<T>, 'prop'>): [\n Value: T,\n setValue: React.Dispatch<React.SetStateAction<T>>,\n OnChangeRef: React.RefObject<ChangeHandler<T> | undefined>,\n] {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n\n return [value, setValue, onChangeRef];\n}\n\nfunction isFunction(value: unknown): value is (...args: any[]) => any {\n return typeof value === 'function';\n}\n", "import * as React from 'react';\nimport { useEffectEvent } from '@radix-ui/react-use-effect-event';\n\ntype ChangeHandler<T> = (state: T) => void;\n\ninterface UseControllableStateParams<T> {\n prop: T | undefined;\n defaultProp: T;\n onChange: ChangeHandler<T> | undefined;\n caller: string;\n}\n\ninterface AnyAction {\n type: string;\n}\n\nconst SYNC_STATE = Symbol('RADIX:SYNC_STATE');\n\ninterface SyncStateAction<T> {\n type: typeof SYNC_STATE;\n state: T;\n}\n\nexport function useControllableStateReducer<T, S extends {}, A extends AnyAction>(\n reducer: (prevState: S & { state: T }, action: A) => S & { state: T },\n userArgs: UseControllableStateParams<T>,\n initialState: S\n): [S & { state: T }, React.Dispatch<A>];\n\nexport function useControllableStateReducer<T, S extends {}, I, A extends AnyAction>(\n reducer: (prevState: S & { state: T }, action: A) => S & { state: T },\n userArgs: UseControllableStateParams<T>,\n initialArg: I,\n init: (i: I & { state: T }) => S\n): [S & { state: T }, React.Dispatch<A>];\n\nexport function useControllableStateReducer<T, S extends {}, A extends AnyAction>(\n reducer: (prevState: S & { state: T }, action: A) => S & { state: T },\n userArgs: UseControllableStateParams<T>,\n initialArg: any,\n init?: (i: any) => Omit<S, 'state'>\n): [S & { state: T }, React.Dispatch<A>] {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== undefined;\n\n const onChange = useEffectEvent(onChangeProp);\n\n // OK to disable conditionally calling hooks here because they will always run\n // consistently in the same environment. Bundlers should be able to remove the\n // code block entirely in production.\n /* eslint-disable react-hooks/rules-of-hooks */\n if (process.env.NODE_ENV !== 'production') {\n const isControlledRef = React.useRef(controlledState !== undefined);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? 'controlled' : 'uncontrolled';\n const to = isControlled ? 'controlled' : 'uncontrolled';\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n /* eslint-enable react-hooks/rules-of-hooks */\n\n type InternalState = S & { state: T };\n const args: [InternalState] = [{ ...initialArg, state: defaultProp }];\n if (init) {\n // @ts-expect-error\n args.push(init);\n }\n\n const [internalState, dispatch] = React.useReducer(\n (state: InternalState, action: A | SyncStateAction<T>): InternalState => {\n if (action.type === SYNC_STATE) {\n return { ...state, state: action.state };\n }\n\n const next = reducer(state, action);\n if (isControlled && !Object.is(next.state, state.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n\n const uncontrolledState = internalState.state;\n const prevValueRef = React.useRef(uncontrolledState);\n React.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n\n const state = React.useMemo(() => {\n const isControlled = controlledState !== undefined;\n if (isControlled) {\n return { ...internalState, state: controlledState };\n }\n\n return internalState;\n }, [internalState, controlledState]);\n\n React.useEffect(() => {\n // Sync internal state for controlled components so that reducer is called\n // with the correct state values\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n\n return [state, dispatch as React.Dispatch<A>];\n}\n", "/* eslint-disable react-hooks/rules-of-hooks */\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport * as React from 'react';\n\ntype AnyFunction = (...args: any[]) => any;\n\n// See https://github.com/webpack/webpack/issues/14814\nconst useReactEffectEvent = (React as any)[' useEffectEvent '.trim().toString()];\nconst useReactInsertionEffect = (React as any)[' useInsertionEffect '.trim().toString()];\n\n/**\n * Designed to approximate the behavior on `experimental_useEffectEvent` as best\n * as possible until its stable release, and back-fill it as a shim as needed.\n */\nexport function useEffectEvent<T extends AnyFunction>(callback?: T): T {\n if (typeof useReactEffectEvent === 'function') {\n return useReactEffectEvent(callback);\n }\n\n const ref = React.useRef<AnyFunction | undefined>(() => {\n throw new Error('Cannot call an event handler while rendering.');\n });\n // See https://github.com/webpack/webpack/issues/14814\n if (typeof useReactInsertionEffect === 'function') {\n useReactInsertionEffect(() => {\n ref.current = callback;\n });\n } else {\n useLayoutEffect(() => {\n ref.current = callback;\n });\n }\n\n // https://github.com/facebook/react/issues/19240\n return React.useMemo(() => ((...args) => ref.current?.(...args)) as T, []);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAAA,SAAS,qBACP,sBACA,iBACA,EAAE,2BAA2B,KAAK,IAAI,CAAC,GACvC;AACA,SAAO,SAAS,YAAY,OAAU;AACpC,iEAAuB;AAEvB,QAAI,6BAA6B,SAAS,CAAC,MAAM,kBAAkB;AACjE,aAAO,mDAAkB;IAC3B;EACF;AACF;;;ACZA,YAAuB;AAaZ,yBAAA;AAXX,SAASA,eACP,mBACA,gBACA;AACA,QAAM,UAAgB,oBAA4C,cAAc;AAEhF,QAAM,WAAuE,CAAC,UAAU;AACtF,UAAM,EAAE,UAAU,GAAG,QAAQ,IAAI;AAGjC,UAAM,QAAc,cAAQ,MAAM,SAAS,OAAO,OAAO,OAAO,CAAC;AACjE,eAAO,wBA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kD;AACpE,SAAO,OAAO,UAAU;AAC1B;AC/EA,IAAM,aAAa,OAAO,kBAAkB;",
6
+ "names": ["createContext", "useContext", "createScope", "nextScopes", "React", "useLayoutEffect", "React", "React2", "React", "React", "value"]
7
+ }
frontend/node_modules/.vite/deps/chunk-TLMPZXCM.js ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ require_jsx_runtime
3
+ } from "./chunk-6PXSGDAH.js";
4
+ import {
5
+ require_react
6
+ } from "./chunk-DRWLMN53.js";
7
+ import {
8
+ __toESM
9
+ } from "./chunk-G3PMV62Z.js";
10
+
11
+ // node_modules/@radix-ui/react-slot/dist/index.mjs
12
+ var React2 = __toESM(require_react(), 1);
13
+
14
+ // node_modules/@radix-ui/react-compose-refs/dist/index.mjs
15
+ var React = __toESM(require_react(), 1);
16
+ function setRef(ref, value) {
17
+ if (typeof ref === "function") {
18
+ return ref(value);
19
+ } else if (ref !== null && ref !== void 0) {
20
+ ref.current = value;
21
+ }
22
+ }
23
+ function composeRefs(...refs) {
24
+ return (node) => {
25
+ let hasCleanup = false;
26
+ const cleanups = refs.map((ref) => {
27
+ const cleanup = setRef(ref, node);
28
+ if (!hasCleanup && typeof cleanup == "function") {
29
+ hasCleanup = true;
30
+ }
31
+ return cleanup;
32
+ });
33
+ if (hasCleanup) {
34
+ return () => {
35
+ for (let i = 0; i < cleanups.length; i++) {
36
+ const cleanup = cleanups[i];
37
+ if (typeof cleanup == "function") {
38
+ cleanup();
39
+ } else {
40
+ setRef(refs[i], null);
41
+ }
42
+ }
43
+ };
44
+ }
45
+ };
46
+ }
47
+ function useComposedRefs(...refs) {
48
+ return React.useCallback(composeRefs(...refs), refs);
49
+ }
50
+
51
+ // node_modules/@radix-ui/react-slot/dist/index.mjs
52
+ var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
53
+ function createSlot(ownerName) {
54
+ const SlotClone = createSlotClone(ownerName);
55
+ const Slot2 = React2.forwardRef((props, forwardedRef) => {
56
+ const { children, ...slotProps } = props;
57
+ const childrenArray = React2.Children.toArray(children);
58
+ const slottable = childrenArray.find(isSlottable);
59
+ if (slottable) {
60
+ const newElement = slottable.props.children;
61
+ const newChildren = childrenArray.map((child) => {
62
+ if (child === slottable) {
63
+ if (React2.Children.count(newElement) > 1) return React2.Children.only(null);
64
+ return React2.isValidElement(newElement) ? newElement.props.children : null;
65
+ } else {
66
+ return child;
67
+ }
68
+ });
69
+ return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React2.isValidElement(newElement) ? React2.cloneElement(newElement, void 0, newChildren) : null });
70
+ }
71
+ return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
72
+ });
73
+ Slot2.displayName = `${ownerName}.Slot`;
74
+ return Slot2;
75
+ }
76
+ var Slot = createSlot("Slot");
77
+ function createSlotClone(ownerName) {
78
+ const SlotClone = React2.forwardRef((props, forwardedRef) => {
79
+ const { children, ...slotProps } = props;
80
+ if (React2.isValidElement(children)) {
81
+ const childrenRef = getElementRef(children);
82
+ const props2 = mergeProps(slotProps, children.props);
83
+ if (children.type !== React2.Fragment) {
84
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
85
+ }
86
+ return React2.cloneElement(children, props2);
87
+ }
88
+ return React2.Children.count(children) > 1 ? React2.Children.only(null) : null;
89
+ });
90
+ SlotClone.displayName = `${ownerName}.SlotClone`;
91
+ return SlotClone;
92
+ }
93
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
94
+ function createSlottable(ownerName) {
95
+ const Slottable2 = ({ children }) => {
96
+ return (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
97
+ };
98
+ Slottable2.displayName = `${ownerName}.Slottable`;
99
+ Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
100
+ return Slottable2;
101
+ }
102
+ var Slottable = createSlottable("Slottable");
103
+ function isSlottable(child) {
104
+ return React2.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
105
+ }
106
+ function mergeProps(slotProps, childProps) {
107
+ const overrideProps = { ...childProps };
108
+ for (const propName in childProps) {
109
+ const slotPropValue = slotProps[propName];
110
+ const childPropValue = childProps[propName];
111
+ const isHandler = /^on[A-Z]/.test(propName);
112
+ if (isHandler) {
113
+ if (slotPropValue && childPropValue) {
114
+ overrideProps[propName] = (...args) => {
115
+ const result = childPropValue(...args);
116
+ slotPropValue(...args);
117
+ return result;
118
+ };
119
+ } else if (slotPropValue) {
120
+ overrideProps[propName] = slotPropValue;
121
+ }
122
+ } else if (propName === "style") {
123
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
124
+ } else if (propName === "className") {
125
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
126
+ }
127
+ }
128
+ return { ...slotProps, ...overrideProps };
129
+ }
130
+ function getElementRef(element) {
131
+ var _a, _b;
132
+ let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
133
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
134
+ if (mayWarn) {
135
+ return element.ref;
136
+ }
137
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
138
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
139
+ if (mayWarn) {
140
+ return element.props.ref;
141
+ }
142
+ return element.props.ref || element.ref;
143
+ }
144
+
145
+ export {
146
+ useComposedRefs,
147
+ createSlot,
148
+ Slot,
149
+ createSlottable,
150
+ Slottable
151
+ };
152
+ //# sourceMappingURL=chunk-TLMPZXCM.js.map
frontend/node_modules/.vite/deps/chunk-TLMPZXCM.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../@radix-ui/react-slot/src/slot.tsx", "../../@radix-ui/react-compose-refs/src/compose-refs.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotProps extends React.HTMLAttributes<HTMLElement> {\n children?: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlot(ownerName: string) {\n const SlotClone = createSlotClone(ownerName);\n const Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement)\n ? (newElement.props as { children: React.ReactNode }).children\n : null;\n } else {\n return child;\n }\n });\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {React.isValidElement(newElement)\n ? React.cloneElement(newElement, undefined, newChildren)\n : null}\n </SlotClone>\n );\n }\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {children}\n </SlotClone>\n );\n });\n\n Slot.displayName = `${ownerName}.Slot`;\n return Slot;\n}\n\nconst Slot = createSlot('Slot');\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ function createSlotClone(ownerName: string) {\n const SlotClone = React.forwardRef<any, SlotCloneProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props = mergeProps(slotProps, children.props as AnyProps);\n // do not pass ref to React.Fragment for React 19 compatibility\n if (children.type !== React.Fragment) {\n props.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props);\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nconst SLOTTABLE_IDENTIFIER = Symbol('radix.slottable');\n\ninterface SlottableProps {\n children: React.ReactNode;\n}\n\ninterface SlottableComponent extends React.FC<SlottableProps> {\n __radixId: symbol;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlottable(ownerName: string) {\n const Slottable: SlottableComponent = ({ children }) => {\n return <>{children}</>;\n };\n Slottable.displayName = `${ownerName}.Slottable`;\n Slottable.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable;\n}\n\nconst Slottable = createSlottable('Slottable');\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record<string, any>;\n\nfunction isSlottable(\n child: React.ReactNode\n): child is React.ReactElement<SlottableProps, typeof Slottable> {\n return (\n React.isValidElement(child) &&\n typeof child.type === 'function' &&\n '__radixId' in child.type &&\n child.type.__radixId === SLOTTABLE_IDENTIFIER\n );\n}\n\nfunction mergeProps(slotProps: AnyProps, childProps: AnyProps) {\n // all child props should override\n const overrideProps = { ...childProps };\n\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n // if the handler exists on both, we compose them\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args: unknown[]) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n }\n // but if it exists only on the slot, we use only this one\n else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n }\n // if it's `style`, we merge them\n else if (propName === 'style') {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ');\n }\n }\n\n return { ...slotProps, ...overrideProps };\n}\n\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nfunction getElementRef(element: React.ReactElement) {\n // React <=18 in DEV\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element as any).ref;\n }\n\n // React 19 in DEV\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element.props as { ref?: React.Ref<unknown> }).ref;\n }\n\n // Not DEV\n return (element.props as { ref?: React.Ref<unknown> }).ref || (element as any).ref;\n}\n\nexport {\n Slot,\n Slottable,\n //\n Slot as Root,\n};\nexport type { SlotProps };\n", "import * as React from 'react';\n\ntype PossibleRef<T> = React.Ref<T> | undefined;\n\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */\nfunction setRef<T>(ref: PossibleRef<T>, value: T) {\n if (typeof ref === 'function') {\n return ref(value);\n } else if (ref !== null && ref !== undefined) {\n ref.current = value;\n }\n}\n\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */\nfunction composeRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T> {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == 'function') {\n hasCleanup = true;\n }\n return cleanup;\n });\n\n // React <19 will log an error to the console if a callback ref returns a\n // value. We don't use ref cleanups internally so this will only happen if a\n // user's ref callback returns a value, which we only expect if they are\n // using the cleanup functionality added in React 19.\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == 'function') {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\n\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */\nfunction useComposedRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T> {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback(composeRefs(...refs), refs);\n}\n\nexport { composeRefs, useComposedRefs };\n"],
5
+ "mappings": ";;;;;;;;;;;AAAA,IAAAA,SAAuB;;;ACAvB,YAAuB;AAQvB,SAAS,OAAU,KAAqB,OAAU;AAChD,MAAI,OAAO,QAAQ,YAAY;AAC7B,WAAO,IAAI,KAAK;EAClB,WAAW,QAAQ,QAAQ,QAAQ,QAAW;AAC5C,QAAI,UAAU;EAChB;AACF;AAMA,SAAS,eAAkB,MAA8C;AACvE,SAAO,CAAC,SAAS;AACf,QAAI,aAAa;AACjB,UAAM,WAAW,KAAK,IAAI,CAAC,QAAQ;AACjC,YAAM,UAAU,OAAO,KAAK,IAAI;AAChC,UAAI,CAAC,cAAc,OAAO,WAAW,YAAY;AAC/C,qBAAa;MACf;AACA,aAAO;IACT,CAAC;AAMD,QAAI,YAAY;AACd,aAAO,MAAM;AACX,iBAAS,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;AACxC,gBAAM,UAAU,SAAS,CAAC;AAC1B,cAAI,OAAO,WAAW,YAAY;AAChC,oBAAQ;UACV,OAAO;AACL,mBAAO,KAAK,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GAAG,WAAW,GAAG,cAAc;AAC1C;AAOA,SAAS,cAAc,SAA6B;;AAElD,MAAI,UAAS,YAAO,yBAAyB,QAAQ,OAAO,KAAK,MAApD,mBAAuD;AACpE,MAAI,UAAU,UAAU,oBAAoB,UAAU,OAAO;AAC7D,MAAI,SAAS;AACX,WAAQ,QAAgB;EAC1B;AAGA,YAAS,YAAO,yBAAyB,SAAS,KAAK,MAA9C,mBAAiD;AAC1D,YAAU,UAAU,oBAAoB,UAAU,OAAO;AACzD,MAAI,SAAS;AACX,WAAQ,QAAQ,MAAuC;EACzD;AAGA,SAAQ,QAAQ,MAAuC,OAAQ,QAAgB;AACjF;",
6
+ "names": ["React", "Slot", "props", "Slottable", "Fragment"]
7
+ }
frontend/node_modules/.vite/deps/chunk-U7P2NEEE.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // node_modules/clsx/dist/clsx.mjs
2
+ function r(e) {
3
+ var t, f, n = "";
4
+ if ("string" == typeof e || "number" == typeof e) n += e;
5
+ else if ("object" == typeof e) if (Array.isArray(e)) {
6
+ var o = e.length;
7
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
8
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
9
+ return n;
10
+ }
11
+ function clsx() {
12
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
13
+ return n;
14
+ }
15
+ var clsx_default = clsx;
16
+
17
+ export {
18
+ clsx,
19
+ clsx_default
20
+ };
21
+ //# sourceMappingURL=chunk-U7P2NEEE.js.map
frontend/node_modules/.vite/deps/chunk-U7P2NEEE.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../clsx/dist/clsx.mjs"],
4
+ "sourcesContent": ["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;"],
5
+ "mappings": ";AAAA,SAAS,EAAE,GAAE;AAAC,MAAI,GAAE,GAAE,IAAE;AAAG,MAAG,YAAU,OAAO,KAAG,YAAU,OAAO,EAAE,MAAG;AAAA,WAAU,YAAU,OAAO,EAAE,KAAG,MAAM,QAAQ,CAAC,GAAE;AAAC,QAAI,IAAE,EAAE;AAAO,SAAI,IAAE,GAAE,IAAE,GAAE,IAAI,GAAE,CAAC,MAAI,IAAE,EAAE,EAAE,CAAC,CAAC,OAAK,MAAI,KAAG,MAAK,KAAG;AAAA,EAAE,MAAM,MAAI,KAAK,EAAE,GAAE,CAAC,MAAI,MAAI,KAAG,MAAK,KAAG;AAAG,SAAO;AAAC;AAAQ,SAAS,OAAM;AAAC,WAAQ,GAAE,GAAE,IAAE,GAAE,IAAE,IAAG,IAAE,UAAU,QAAO,IAAE,GAAE,IAAI,EAAC,IAAE,UAAU,CAAC,OAAK,IAAE,EAAE,CAAC,OAAK,MAAI,KAAG,MAAK,KAAG;AAAG,SAAO;AAAC;AAAC,IAAO,eAAQ;",
6
+ "names": []
7
+ }
frontend/node_modules/.vite/deps/chunk-XET2JR3H.js ADDED
@@ -0,0 +1,1116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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allbackRef
3
+ } from "./chunk-43NH6PDE.js";
4
+ import {
5
+ useLayoutEffect2
6
+ } from "./chunk-R4J6KICQ.js";
7
+ import {
8
+ Primitive
9
+ } from "./chunk-HMLLSKRK.js";
10
+ import {
11
+ useComposedRefs
12
+ } from "./chunk-TLMPZXCM.js";
13
+ import {
14
+ require_jsx_runtime
15
+ } from "./chunk-6PXSGDAH.js";
16
+ import {
17
+ require_react
18
+ } from "./chunk-DRWLMN53.js";
19
+ import {
20
+ __toESM
21
+ } from "./chunk-G3PMV62Z.js";
22
+
23
+ // node_modules/@radix-ui/react-id/dist/index.mjs
24
+ var React = __toESM(require_react(), 1);
25
+ var useReactId = React[" useId ".trim().toString()] || (() => void 0);
26
+ var count = 0;
27
+ function useId(deterministicId) {
28
+ const [id, setId] = React.useState(useReactId());
29
+ useLayoutEffect2(() => {
30
+ if (!deterministicId) setId((reactId) => reactId ?? String(count++));
31
+ }, [deterministicId]);
32
+ return deterministicId || (id ? `radix-${id}` : "");
33
+ }
34
+
35
+ // node_modules/@radix-ui/react-focus-scope/dist/index.mjs
36
+ var React2 = __toESM(require_react(), 1);
37
+ var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
38
+ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
39
+ var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
40
+ var EVENT_OPTIONS = { bubbles: false, cancelable: true };
41
+ var FOCUS_SCOPE_NAME = "FocusScope";
42
+ var FocusScope = React2.forwardRef((props, forwardedRef) => {
43
+ const {
44
+ loop = false,
45
+ trapped = false,
46
+ onMountAutoFocus: onMountAutoFocusProp,
47
+ onUnmountAutoFocus: onUnmountAutoFocusProp,
48
+ ...scopeProps
49
+ } = props;
50
+ const [container, setContainer] = React2.useState(null);
51
+ const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
52
+ const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
53
+ const lastFocusedElementRef = React2.useRef(null);
54
+ const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
55
+ const focusScope = React2.useRef({
56
+ paused: false,
57
+ pause() {
58
+ this.paused = true;
59
+ },
60
+ resume() {
61
+ this.paused = false;
62
+ }
63
+ }).current;
64
+ React2.useEffect(() => {
65
+ if (trapped) {
66
+ let handleFocusIn2 = function(event) {
67
+ if (focusScope.paused || !container) return;
68
+ const target = event.target;
69
+ if (container.contains(target)) {
70
+ lastFocusedElementRef.current = target;
71
+ } else {
72
+ focus(lastFocusedElementRef.current, { select: true });
73
+ }
74
+ }, handleFocusOut2 = function(event) {
75
+ if (focusScope.paused || !container) return;
76
+ const relatedTarget = event.relatedTarget;
77
+ if (relatedTarget === null) return;
78
+ if (!container.contains(relatedTarget)) {
79
+ focus(lastFocusedElementRef.current, { select: true });
80
+ }
81
+ }, handleMutations2 = function(mutations) {
82
+ const focusedElement = document.activeElement;
83
+ if (focusedElement !== document.body) return;
84
+ for (const mutation of mutations) {
85
+ if (mutation.removedNodes.length > 0) focus(container);
86
+ }
87
+ };
88
+ var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
89
+ document.addEventListener("focusin", handleFocusIn2);
90
+ document.addEventListener("focusout", handleFocusOut2);
91
+ const mutationObserver = new MutationObserver(handleMutations2);
92
+ if (container) mutationObserver.observe(container, { childList: true, subtree: true });
93
+ return () => {
94
+ document.removeEventListener("focusin", handleFocusIn2);
95
+ document.removeEventListener("focusout", handleFocusOut2);
96
+ mutationObserver.disconnect();
97
+ };
98
+ }
99
+ }, [trapped, container, focusScope.paused]);
100
+ React2.useEffect(() => {
101
+ if (container) {
102
+ focusScopesStack.add(focusScope);
103
+ const previouslyFocusedElement = document.activeElement;
104
+ const hasFocusedCandidate = container.contains(previouslyFocusedElement);
105
+ if (!hasFocusedCandidate) {
106
+ const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
107
+ container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
108
+ container.dispatchEvent(mountEvent);
109
+ if (!mountEvent.defaultPrevented) {
110
+ focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
111
+ if (document.activeElement === previouslyFocusedElement) {
112
+ focus(container);
113
+ }
114
+ }
115
+ }
116
+ return () => {
117
+ container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
118
+ setTimeout(() => {
119
+ const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
120
+ container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
121
+ container.dispatchEvent(unmountEvent);
122
+ if (!unmountEvent.defaultPrevented) {
123
+ focus(previouslyFocusedElement ?? document.body, { select: true });
124
+ }
125
+ container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
126
+ focusScopesStack.remove(focusScope);
127
+ }, 0);
128
+ };
129
+ }
130
+ }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
131
+ const handleKeyDown = React2.useCallback(
132
+ (event) => {
133
+ if (!loop && !trapped) return;
134
+ if (focusScope.paused) return;
135
+ const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
136
+ const focusedElement = document.activeElement;
137
+ if (isTabKey && focusedElement) {
138
+ const container2 = event.currentTarget;
139
+ const [first, last] = getTabbableEdges(container2);
140
+ const hasTabbableElementsInside = first && last;
141
+ if (!hasTabbableElementsInside) {
142
+ if (focusedElement === container2) event.preventDefault();
143
+ } else {
144
+ if (!event.shiftKey && focusedElement === last) {
145
+ event.preventDefault();
146
+ if (loop) focus(first, { select: true });
147
+ } else if (event.shiftKey && focusedElement === first) {
148
+ event.preventDefault();
149
+ if (loop) focus(last, { select: true });
150
+ }
151
+ }
152
+ }
153
+ },
154
+ [loop, trapped, focusScope.paused]
155
+ );
156
+ return (0, import_jsx_runtime.jsx)(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
157
+ });
158
+ FocusScope.displayName = FOCUS_SCOPE_NAME;
159
+ function focusFirst(candidates, { select = false } = {}) {
160
+ const previouslyFocusedElement = document.activeElement;
161
+ for (const candidate of candidates) {
162
+ focus(candidate, { select });
163
+ if (document.activeElement !== previouslyFocusedElement) return;
164
+ }
165
+ }
166
+ function getTabbableEdges(container) {
167
+ const candidates = getTabbableCandidates(container);
168
+ const first = findVisible(candidates, container);
169
+ const last = findVisible(candidates.reverse(), container);
170
+ return [first, last];
171
+ }
172
+ function getTabbableCandidates(container) {
173
+ const nodes = [];
174
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
175
+ acceptNode: (node) => {
176
+ const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
177
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
178
+ return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
179
+ }
180
+ });
181
+ while (walker.nextNode()) nodes.push(walker.currentNode);
182
+ return nodes;
183
+ }
184
+ function findVisible(elements, container) {
185
+ for (const element of elements) {
186
+ if (!isHidden(element, { upTo: container })) return element;
187
+ }
188
+ }
189
+ function isHidden(node, { upTo }) {
190
+ if (getComputedStyle(node).visibility === "hidden") return true;
191
+ while (node) {
192
+ if (upTo !== void 0 && node === upTo) return false;
193
+ if (getComputedStyle(node).display === "none") return true;
194
+ node = node.parentElement;
195
+ }
196
+ return false;
197
+ }
198
+ function isSelectableInput(element) {
199
+ return element instanceof HTMLInputElement && "select" in element;
200
+ }
201
+ function focus(element, { select = false } = {}) {
202
+ if (element && element.focus) {
203
+ const previouslyFocusedElement = document.activeElement;
204
+ element.focus({ preventScroll: true });
205
+ if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
206
+ element.select();
207
+ }
208
+ }
209
+ var focusScopesStack = createFocusScopesStack();
210
+ function createFocusScopesStack() {
211
+ let stack = [];
212
+ return {
213
+ add(focusScope) {
214
+ const activeFocusScope = stack[0];
215
+ if (focusScope !== activeFocusScope) {
216
+ activeFocusScope == null ? void 0 : activeFocusScope.pause();
217
+ }
218
+ stack = arrayRemove(stack, focusScope);
219
+ stack.unshift(focusScope);
220
+ },
221
+ remove(focusScope) {
222
+ var _a;
223
+ stack = arrayRemove(stack, focusScope);
224
+ (_a = stack[0]) == null ? void 0 : _a.resume();
225
+ }
226
+ };
227
+ }
228
+ function arrayRemove(array, item) {
229
+ const updatedArray = [...array];
230
+ const index = updatedArray.indexOf(item);
231
+ if (index !== -1) {
232
+ updatedArray.splice(index, 1);
233
+ }
234
+ return updatedArray;
235
+ }
236
+ function removeLinks(items) {
237
+ return items.filter((item) => item.tagName !== "A");
238
+ }
239
+
240
+ // node_modules/@radix-ui/react-focus-guards/dist/index.mjs
241
+ var React3 = __toESM(require_react(), 1);
242
+ var count2 = 0;
243
+ function useFocusGuards() {
244
+ React3.useEffect(() => {
245
+ const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
246
+ document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
247
+ document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
248
+ count2++;
249
+ return () => {
250
+ if (count2 === 1) {
251
+ document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
252
+ }
253
+ count2--;
254
+ };
255
+ }, []);
256
+ }
257
+ function createFocusGuard() {
258
+ const element = document.createElement("span");
259
+ element.setAttribute("data-radix-focus-guard", "");
260
+ element.tabIndex = 0;
261
+ element.style.outline = "none";
262
+ element.style.opacity = "0";
263
+ element.style.position = "fixed";
264
+ element.style.pointerEvents = "none";
265
+ return element;
266
+ }
267
+
268
+ // node_modules/tslib/tslib.es6.mjs
269
+ var __assign = function() {
270
+ __assign = Object.assign || function __assign2(t) {
271
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
272
+ s = arguments[i];
273
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
274
+ }
275
+ return t;
276
+ };
277
+ return __assign.apply(this, arguments);
278
+ };
279
+ function __rest(s, e) {
280
+ var t = {};
281
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
282
+ t[p] = s[p];
283
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
284
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
285
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
286
+ t[p[i]] = s[p[i]];
287
+ }
288
+ return t;
289
+ }
290
+ function __spreadArray(to, from, pack) {
291
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
292
+ if (ar || !(i in from)) {
293
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
294
+ ar[i] = from[i];
295
+ }
296
+ }
297
+ return to.concat(ar || Array.prototype.slice.call(from));
298
+ }
299
+
300
+ // node_modules/react-remove-scroll/dist/es2015/Combination.js
301
+ var React12 = __toESM(require_react());
302
+
303
+ // node_modules/react-remove-scroll/dist/es2015/UI.js
304
+ var React8 = __toESM(require_react());
305
+
306
+ // node_modules/react-remove-scroll-bar/dist/es2015/constants.js
307
+ var zeroRightClassName = "right-scroll-bar-position";
308
+ var fullWidthClassName = "width-before-scroll-bar";
309
+ var noScrollbarsClassName = "with-scroll-bars-hidden";
310
+ var removedBarSizeVariable = "--removed-body-scroll-bar-size";
311
+
312
+ // node_modules/use-callback-ref/dist/es2015/assignRef.js
313
+ function assignRef(ref, value) {
314
+ if (typeof ref === "function") {
315
+ ref(value);
316
+ } else if (ref) {
317
+ ref.current = value;
318
+ }
319
+ return ref;
320
+ }
321
+
322
+ // node_modules/use-callback-ref/dist/es2015/useRef.js
323
+ var import_react = __toESM(require_react());
324
+ function useCallbackRef2(initialValue, callback) {
325
+ var ref = (0, import_react.useState)(function() {
326
+ return {
327
+ // value
328
+ value: initialValue,
329
+ // last callback
330
+ callback,
331
+ // "memoized" public interface
332
+ facade: {
333
+ get current() {
334
+ return ref.value;
335
+ },
336
+ set current(value) {
337
+ var last = ref.value;
338
+ if (last !== value) {
339
+ ref.value = value;
340
+ ref.callback(value, last);
341
+ }
342
+ }
343
+ }
344
+ };
345
+ })[0];
346
+ ref.callback = callback;
347
+ return ref.facade;
348
+ }
349
+
350
+ // node_modules/use-callback-ref/dist/es2015/useMergeRef.js
351
+ var React4 = __toESM(require_react());
352
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React4.useLayoutEffect : React4.useEffect;
353
+ var currentValues = /* @__PURE__ */ new WeakMap();
354
+ function useMergeRefs(refs, defaultValue) {
355
+ var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
356
+ return refs.forEach(function(ref) {
357
+ return assignRef(ref, newValue);
358
+ });
359
+ });
360
+ useIsomorphicLayoutEffect(function() {
361
+ var oldValue = currentValues.get(callbackRef);
362
+ if (oldValue) {
363
+ var prevRefs_1 = new Set(oldValue);
364
+ var nextRefs_1 = new Set(refs);
365
+ var current_1 = callbackRef.current;
366
+ prevRefs_1.forEach(function(ref) {
367
+ if (!nextRefs_1.has(ref)) {
368
+ assignRef(ref, null);
369
+ }
370
+ });
371
+ nextRefs_1.forEach(function(ref) {
372
+ if (!prevRefs_1.has(ref)) {
373
+ assignRef(ref, current_1);
374
+ }
375
+ });
376
+ }
377
+ currentValues.set(callbackRef, refs);
378
+ }, [refs]);
379
+ return callbackRef;
380
+ }
381
+
382
+ // node_modules/use-sidecar/dist/es2015/hoc.js
383
+ var React5 = __toESM(require_react());
384
+
385
+ // node_modules/use-sidecar/dist/es2015/hook.js
386
+ var import_react2 = __toESM(require_react());
387
+
388
+ // node_modules/use-sidecar/dist/es2015/medium.js
389
+ function ItoI(a) {
390
+ return a;
391
+ }
392
+ function innerCreateMedium(defaults, middleware) {
393
+ if (middleware === void 0) {
394
+ middleware = ItoI;
395
+ }
396
+ var buffer = [];
397
+ var assigned = false;
398
+ var medium = {
399
+ read: function() {
400
+ if (assigned) {
401
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
402
+ }
403
+ if (buffer.length) {
404
+ return buffer[buffer.length - 1];
405
+ }
406
+ return defaults;
407
+ },
408
+ useMedium: function(data) {
409
+ var item = middleware(data, assigned);
410
+ buffer.push(item);
411
+ return function() {
412
+ buffer = buffer.filter(function(x) {
413
+ return x !== item;
414
+ });
415
+ };
416
+ },
417
+ assignSyncMedium: function(cb) {
418
+ assigned = true;
419
+ while (buffer.length) {
420
+ var cbs = buffer;
421
+ buffer = [];
422
+ cbs.forEach(cb);
423
+ }
424
+ buffer = {
425
+ push: function(x) {
426
+ return cb(x);
427
+ },
428
+ filter: function() {
429
+ return buffer;
430
+ }
431
+ };
432
+ },
433
+ assignMedium: function(cb) {
434
+ assigned = true;
435
+ var pendingQueue = [];
436
+ if (buffer.length) {
437
+ var cbs = buffer;
438
+ buffer = [];
439
+ cbs.forEach(cb);
440
+ pendingQueue = buffer;
441
+ }
442
+ var executeQueue = function() {
443
+ var cbs2 = pendingQueue;
444
+ pendingQueue = [];
445
+ cbs2.forEach(cb);
446
+ };
447
+ var cycle = function() {
448
+ return Promise.resolve().then(executeQueue);
449
+ };
450
+ cycle();
451
+ buffer = {
452
+ push: function(x) {
453
+ pendingQueue.push(x);
454
+ cycle();
455
+ },
456
+ filter: function(filter) {
457
+ pendingQueue = pendingQueue.filter(filter);
458
+ return buffer;
459
+ }
460
+ };
461
+ }
462
+ };
463
+ return medium;
464
+ }
465
+ function createSidecarMedium(options) {
466
+ if (options === void 0) {
467
+ options = {};
468
+ }
469
+ var medium = innerCreateMedium(null);
470
+ medium.options = __assign({ async: true, ssr: false }, options);
471
+ return medium;
472
+ }
473
+
474
+ // node_modules/use-sidecar/dist/es2015/renderProp.js
475
+ var React6 = __toESM(require_react());
476
+ var import_react3 = __toESM(require_react());
477
+
478
+ // node_modules/use-sidecar/dist/es2015/exports.js
479
+ var React7 = __toESM(require_react());
480
+ var SideCar = function(_a) {
481
+ var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
482
+ if (!sideCar) {
483
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
484
+ }
485
+ var Target = sideCar.read();
486
+ if (!Target) {
487
+ throw new Error("Sidecar medium not found");
488
+ }
489
+ return React7.createElement(Target, __assign({}, rest));
490
+ };
491
+ SideCar.isSideCarExport = true;
492
+ function exportSidecar(medium, exported) {
493
+ medium.useMedium(exported);
494
+ return SideCar;
495
+ }
496
+
497
+ // node_modules/react-remove-scroll/dist/es2015/medium.js
498
+ var effectCar = createSidecarMedium();
499
+
500
+ // node_modules/react-remove-scroll/dist/es2015/UI.js
501
+ var nothing = function() {
502
+ return;
503
+ };
504
+ var RemoveScroll = React8.forwardRef(function(props, parentRef) {
505
+ var ref = React8.useRef(null);
506
+ var _a = React8.useState({
507
+ onScrollCapture: nothing,
508
+ onWheelCapture: nothing,
509
+ onTouchMoveCapture: nothing
510
+ }), callbacks = _a[0], setCallbacks = _a[1];
511
+ var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
512
+ var SideCar2 = sideCar;
513
+ var containerRef = useMergeRefs([ref, parentRef]);
514
+ var containerProps = __assign(__assign({}, rest), callbacks);
515
+ return React8.createElement(
516
+ React8.Fragment,
517
+ null,
518
+ enabled && React8.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
519
+ forwardProps ? React8.cloneElement(React8.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React8.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
520
+ );
521
+ });
522
+ RemoveScroll.defaultProps = {
523
+ enabled: true,
524
+ removeScrollBar: true,
525
+ inert: false
526
+ };
527
+ RemoveScroll.classNames = {
528
+ fullWidth: fullWidthClassName,
529
+ zeroRight: zeroRightClassName
530
+ };
531
+
532
+ // node_modules/react-remove-scroll/dist/es2015/SideEffect.js
533
+ var React11 = __toESM(require_react());
534
+
535
+ // node_modules/react-remove-scroll-bar/dist/es2015/component.js
536
+ var React10 = __toESM(require_react());
537
+
538
+ // node_modules/react-style-singleton/dist/es2015/hook.js
539
+ var React9 = __toESM(require_react());
540
+
541
+ // node_modules/get-nonce/dist/es2015/index.js
542
+ var currentNonce;
543
+ var getNonce = function() {
544
+ if (currentNonce) {
545
+ return currentNonce;
546
+ }
547
+ if (typeof __webpack_nonce__ !== "undefined") {
548
+ return __webpack_nonce__;
549
+ }
550
+ return void 0;
551
+ };
552
+
553
+ // node_modules/react-style-singleton/dist/es2015/singleton.js
554
+ function makeStyleTag() {
555
+ if (!document)
556
+ return null;
557
+ var tag = document.createElement("style");
558
+ tag.type = "text/css";
559
+ var nonce = getNonce();
560
+ if (nonce) {
561
+ tag.setAttribute("nonce", nonce);
562
+ }
563
+ return tag;
564
+ }
565
+ function injectStyles(tag, css) {
566
+ if (tag.styleSheet) {
567
+ tag.styleSheet.cssText = css;
568
+ } else {
569
+ tag.appendChild(document.createTextNode(css));
570
+ }
571
+ }
572
+ function insertStyleTag(tag) {
573
+ var head = document.head || document.getElementsByTagName("head")[0];
574
+ head.appendChild(tag);
575
+ }
576
+ var stylesheetSingleton = function() {
577
+ var counter = 0;
578
+ var stylesheet = null;
579
+ return {
580
+ add: function(style) {
581
+ if (counter == 0) {
582
+ if (stylesheet = makeStyleTag()) {
583
+ injectStyles(stylesheet, style);
584
+ insertStyleTag(stylesheet);
585
+ }
586
+ }
587
+ counter++;
588
+ },
589
+ remove: function() {
590
+ counter--;
591
+ if (!counter && stylesheet) {
592
+ stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
593
+ stylesheet = null;
594
+ }
595
+ }
596
+ };
597
+ };
598
+
599
+ // node_modules/react-style-singleton/dist/es2015/hook.js
600
+ var styleHookSingleton = function() {
601
+ var sheet = stylesheetSingleton();
602
+ return function(styles, isDynamic) {
603
+ React9.useEffect(function() {
604
+ sheet.add(styles);
605
+ return function() {
606
+ sheet.remove();
607
+ };
608
+ }, [styles && isDynamic]);
609
+ };
610
+ };
611
+
612
+ // node_modules/react-style-singleton/dist/es2015/component.js
613
+ var styleSingleton = function() {
614
+ var useStyle = styleHookSingleton();
615
+ var Sheet = function(_a) {
616
+ var styles = _a.styles, dynamic = _a.dynamic;
617
+ useStyle(styles, dynamic);
618
+ return null;
619
+ };
620
+ return Sheet;
621
+ };
622
+
623
+ // node_modules/react-remove-scroll-bar/dist/es2015/utils.js
624
+ var zeroGap = {
625
+ left: 0,
626
+ top: 0,
627
+ right: 0,
628
+ gap: 0
629
+ };
630
+ var parse = function(x) {
631
+ return parseInt(x || "", 10) || 0;
632
+ };
633
+ var getOffset = function(gapMode) {
634
+ var cs = window.getComputedStyle(document.body);
635
+ var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
636
+ var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
637
+ var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
638
+ return [parse(left), parse(top), parse(right)];
639
+ };
640
+ var getGapWidth = function(gapMode) {
641
+ if (gapMode === void 0) {
642
+ gapMode = "margin";
643
+ }
644
+ if (typeof window === "undefined") {
645
+ return zeroGap;
646
+ }
647
+ var offsets = getOffset(gapMode);
648
+ var documentWidth = document.documentElement.clientWidth;
649
+ var windowWidth = window.innerWidth;
650
+ return {
651
+ left: offsets[0],
652
+ top: offsets[1],
653
+ right: offsets[2],
654
+ gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
655
+ };
656
+ };
657
+
658
+ // node_modules/react-remove-scroll-bar/dist/es2015/component.js
659
+ var Style = styleSingleton();
660
+ var lockAttribute = "data-scroll-locked";
661
+ var getStyles = function(_a, allowRelative, gapMode, important) {
662
+ var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
663
+ if (gapMode === void 0) {
664
+ gapMode = "margin";
665
+ }
666
+ return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
667
+ allowRelative && "position: relative ".concat(important, ";"),
668
+ gapMode === "margin" && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
669
+ gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
670
+ ].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
671
+ };
672
+ var getCurrentUseCounter = function() {
673
+ var counter = parseInt(document.body.getAttribute(lockAttribute) || "0", 10);
674
+ return isFinite(counter) ? counter : 0;
675
+ };
676
+ var useLockAttribute = function() {
677
+ React10.useEffect(function() {
678
+ document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
679
+ return function() {
680
+ var newCounter = getCurrentUseCounter() - 1;
681
+ if (newCounter <= 0) {
682
+ document.body.removeAttribute(lockAttribute);
683
+ } else {
684
+ document.body.setAttribute(lockAttribute, newCounter.toString());
685
+ }
686
+ };
687
+ }, []);
688
+ };
689
+ var RemoveScrollBar = function(_a) {
690
+ var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
691
+ useLockAttribute();
692
+ var gap = React10.useMemo(function() {
693
+ return getGapWidth(gapMode);
694
+ }, [gapMode]);
695
+ return React10.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
696
+ };
697
+
698
+ // node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
699
+ var passiveSupported = false;
700
+ if (typeof window !== "undefined") {
701
+ try {
702
+ options = Object.defineProperty({}, "passive", {
703
+ get: function() {
704
+ passiveSupported = true;
705
+ return true;
706
+ }
707
+ });
708
+ window.addEventListener("test", options, options);
709
+ window.removeEventListener("test", options, options);
710
+ } catch (err) {
711
+ passiveSupported = false;
712
+ }
713
+ }
714
+ var options;
715
+ var nonPassive = passiveSupported ? { passive: false } : false;
716
+
717
+ // node_modules/react-remove-scroll/dist/es2015/handleScroll.js
718
+ var alwaysContainsScroll = function(node) {
719
+ return node.tagName === "TEXTAREA";
720
+ };
721
+ var elementCanBeScrolled = function(node, overflow) {
722
+ if (!(node instanceof Element)) {
723
+ return false;
724
+ }
725
+ var styles = window.getComputedStyle(node);
726
+ return (
727
+ // not-not-scrollable
728
+ styles[overflow] !== "hidden" && // contains scroll inside self
729
+ !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible")
730
+ );
731
+ };
732
+ var elementCouldBeVScrolled = function(node) {
733
+ return elementCanBeScrolled(node, "overflowY");
734
+ };
735
+ var elementCouldBeHScrolled = function(node) {
736
+ return elementCanBeScrolled(node, "overflowX");
737
+ };
738
+ var locationCouldBeScrolled = function(axis, node) {
739
+ var ownerDocument = node.ownerDocument;
740
+ var current = node;
741
+ do {
742
+ if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) {
743
+ current = current.host;
744
+ }
745
+ var isScrollable = elementCouldBeScrolled(axis, current);
746
+ if (isScrollable) {
747
+ var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
748
+ if (scrollHeight > clientHeight) {
749
+ return true;
750
+ }
751
+ }
752
+ current = current.parentNode;
753
+ } while (current && current !== ownerDocument.body);
754
+ return false;
755
+ };
756
+ var getVScrollVariables = function(_a) {
757
+ var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
758
+ return [
759
+ scrollTop,
760
+ scrollHeight,
761
+ clientHeight
762
+ ];
763
+ };
764
+ var getHScrollVariables = function(_a) {
765
+ var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
766
+ return [
767
+ scrollLeft,
768
+ scrollWidth,
769
+ clientWidth
770
+ ];
771
+ };
772
+ var elementCouldBeScrolled = function(axis, node) {
773
+ return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
774
+ };
775
+ var getScrollVariables = function(axis, node) {
776
+ return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node);
777
+ };
778
+ var getDirectionFactor = function(axis, direction) {
779
+ return axis === "h" && direction === "rtl" ? -1 : 1;
780
+ };
781
+ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
782
+ var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
783
+ var delta = directionFactor * sourceDelta;
784
+ var target = event.target;
785
+ var targetInLock = endTarget.contains(target);
786
+ var shouldCancelScroll = false;
787
+ var isDeltaPositive = delta > 0;
788
+ var availableScroll = 0;
789
+ var availableScrollTop = 0;
790
+ do {
791
+ var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
792
+ var elementScroll = scroll_1 - capacity - directionFactor * position;
793
+ if (position || elementScroll) {
794
+ if (elementCouldBeScrolled(axis, target)) {
795
+ availableScroll += elementScroll;
796
+ availableScrollTop += position;
797
+ }
798
+ }
799
+ target = target.parentNode.host || target.parentNode;
800
+ } while (
801
+ // portaled content
802
+ !targetInLock && target !== document.body || // self content
803
+ targetInLock && (endTarget.contains(target) || endTarget === target)
804
+ );
805
+ if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {
806
+ shouldCancelScroll = true;
807
+ } else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {
808
+ shouldCancelScroll = true;
809
+ }
810
+ return shouldCancelScroll;
811
+ };
812
+
813
+ // node_modules/react-remove-scroll/dist/es2015/SideEffect.js
814
+ var getTouchXY = function(event) {
815
+ return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
816
+ };
817
+ var getDeltaXY = function(event) {
818
+ return [event.deltaX, event.deltaY];
819
+ };
820
+ var extractRef = function(ref) {
821
+ return ref && "current" in ref ? ref.current : ref;
822
+ };
823
+ var deltaCompare = function(x, y) {
824
+ return x[0] === y[0] && x[1] === y[1];
825
+ };
826
+ var generateStyle = function(id) {
827
+ return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
828
+ };
829
+ var idCounter = 0;
830
+ var lockStack = [];
831
+ function RemoveScrollSideCar(props) {
832
+ var shouldPreventQueue = React11.useRef([]);
833
+ var touchStartRef = React11.useRef([0, 0]);
834
+ var activeAxis = React11.useRef();
835
+ var id = React11.useState(idCounter++)[0];
836
+ var Style2 = React11.useState(styleSingleton)[0];
837
+ var lastProps = React11.useRef(props);
838
+ React11.useEffect(function() {
839
+ lastProps.current = props;
840
+ }, [props]);
841
+ React11.useEffect(function() {
842
+ if (props.inert) {
843
+ document.body.classList.add("block-interactivity-".concat(id));
844
+ var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
845
+ allow_1.forEach(function(el) {
846
+ return el.classList.add("allow-interactivity-".concat(id));
847
+ });
848
+ return function() {
849
+ document.body.classList.remove("block-interactivity-".concat(id));
850
+ allow_1.forEach(function(el) {
851
+ return el.classList.remove("allow-interactivity-".concat(id));
852
+ });
853
+ };
854
+ }
855
+ return;
856
+ }, [props.inert, props.lockRef.current, props.shards]);
857
+ var shouldCancelEvent = React11.useCallback(function(event, parent) {
858
+ if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
859
+ return !lastProps.current.allowPinchZoom;
860
+ }
861
+ var touch = getTouchXY(event);
862
+ var touchStart = touchStartRef.current;
863
+ var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
864
+ var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
865
+ var currentAxis;
866
+ var target = event.target;
867
+ var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
868
+ if ("touches" in event && moveDirection === "h" && target.type === "range") {
869
+ return false;
870
+ }
871
+ var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
872
+ if (!canBeScrolledInMainDirection) {
873
+ return true;
874
+ }
875
+ if (canBeScrolledInMainDirection) {
876
+ currentAxis = moveDirection;
877
+ } else {
878
+ currentAxis = moveDirection === "v" ? "h" : "v";
879
+ canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
880
+ }
881
+ if (!canBeScrolledInMainDirection) {
882
+ return false;
883
+ }
884
+ if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) {
885
+ activeAxis.current = currentAxis;
886
+ }
887
+ if (!currentAxis) {
888
+ return true;
889
+ }
890
+ var cancelingAxis = activeAxis.current || currentAxis;
891
+ return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
892
+ }, []);
893
+ var shouldPrevent = React11.useCallback(function(_event) {
894
+ var event = _event;
895
+ if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
896
+ return;
897
+ }
898
+ var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
899
+ var sourceEvent = shouldPreventQueue.current.filter(function(e) {
900
+ return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
901
+ })[0];
902
+ if (sourceEvent && sourceEvent.should) {
903
+ if (event.cancelable) {
904
+ event.preventDefault();
905
+ }
906
+ return;
907
+ }
908
+ if (!sourceEvent) {
909
+ var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
910
+ return node.contains(event.target);
911
+ });
912
+ var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
913
+ if (shouldStop) {
914
+ if (event.cancelable) {
915
+ event.preventDefault();
916
+ }
917
+ }
918
+ }
919
+ }, []);
920
+ var shouldCancel = React11.useCallback(function(name, delta, target, should) {
921
+ var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
922
+ shouldPreventQueue.current.push(event);
923
+ setTimeout(function() {
924
+ shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
925
+ return e !== event;
926
+ });
927
+ }, 1);
928
+ }, []);
929
+ var scrollTouchStart = React11.useCallback(function(event) {
930
+ touchStartRef.current = getTouchXY(event);
931
+ activeAxis.current = void 0;
932
+ }, []);
933
+ var scrollWheel = React11.useCallback(function(event) {
934
+ shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
935
+ }, []);
936
+ var scrollTouchMove = React11.useCallback(function(event) {
937
+ shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
938
+ }, []);
939
+ React11.useEffect(function() {
940
+ lockStack.push(Style2);
941
+ props.setCallbacks({
942
+ onScrollCapture: scrollWheel,
943
+ onWheelCapture: scrollWheel,
944
+ onTouchMoveCapture: scrollTouchMove
945
+ });
946
+ document.addEventListener("wheel", shouldPrevent, nonPassive);
947
+ document.addEventListener("touchmove", shouldPrevent, nonPassive);
948
+ document.addEventListener("touchstart", scrollTouchStart, nonPassive);
949
+ return function() {
950
+ lockStack = lockStack.filter(function(inst) {
951
+ return inst !== Style2;
952
+ });
953
+ document.removeEventListener("wheel", shouldPrevent, nonPassive);
954
+ document.removeEventListener("touchmove", shouldPrevent, nonPassive);
955
+ document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
956
+ };
957
+ }, []);
958
+ var removeScrollBar = props.removeScrollBar, inert = props.inert;
959
+ return React11.createElement(
960
+ React11.Fragment,
961
+ null,
962
+ inert ? React11.createElement(Style2, { styles: generateStyle(id) }) : null,
963
+ removeScrollBar ? React11.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
964
+ );
965
+ }
966
+ function getOutermostShadowParent(node) {
967
+ var shadowParent = null;
968
+ while (node !== null) {
969
+ if (node instanceof ShadowRoot) {
970
+ shadowParent = node.host;
971
+ node = node.host;
972
+ }
973
+ node = node.parentNode;
974
+ }
975
+ return shadowParent;
976
+ }
977
+
978
+ // node_modules/react-remove-scroll/dist/es2015/sidecar.js
979
+ var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
980
+
981
+ // node_modules/react-remove-scroll/dist/es2015/Combination.js
982
+ var ReactRemoveScroll = React12.forwardRef(function(props, ref) {
983
+ return React12.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
984
+ });
985
+ ReactRemoveScroll.classNames = RemoveScroll.classNames;
986
+ var Combination_default = ReactRemoveScroll;
987
+
988
+ // node_modules/aria-hidden/dist/es2015/index.js
989
+ var getDefaultParent = function(originalTarget) {
990
+ if (typeof document === "undefined") {
991
+ return null;
992
+ }
993
+ var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
994
+ return sampleTarget.ownerDocument.body;
995
+ };
996
+ var counterMap = /* @__PURE__ */ new WeakMap();
997
+ var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
998
+ var markerMap = {};
999
+ var lockCount = 0;
1000
+ var unwrapHost = function(node) {
1001
+ return node && (node.host || unwrapHost(node.parentNode));
1002
+ };
1003
+ var correctTargets = function(parent, targets) {
1004
+ return targets.map(function(target) {
1005
+ if (parent.contains(target)) {
1006
+ return target;
1007
+ }
1008
+ var correctedTarget = unwrapHost(target);
1009
+ if (correctedTarget && parent.contains(correctedTarget)) {
1010
+ return correctedTarget;
1011
+ }
1012
+ console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
1013
+ return null;
1014
+ }).filter(function(x) {
1015
+ return Boolean(x);
1016
+ });
1017
+ };
1018
+ var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
1019
+ var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1020
+ if (!markerMap[markerName]) {
1021
+ markerMap[markerName] = /* @__PURE__ */ new WeakMap();
1022
+ }
1023
+ var markerCounter = markerMap[markerName];
1024
+ var hiddenNodes = [];
1025
+ var elementsToKeep = /* @__PURE__ */ new Set();
1026
+ var elementsToStop = new Set(targets);
1027
+ var keep = function(el) {
1028
+ if (!el || elementsToKeep.has(el)) {
1029
+ return;
1030
+ }
1031
+ elementsToKeep.add(el);
1032
+ keep(el.parentNode);
1033
+ };
1034
+ targets.forEach(keep);
1035
+ var deep = function(parent) {
1036
+ if (!parent || elementsToStop.has(parent)) {
1037
+ return;
1038
+ }
1039
+ Array.prototype.forEach.call(parent.children, function(node) {
1040
+ if (elementsToKeep.has(node)) {
1041
+ deep(node);
1042
+ } else {
1043
+ try {
1044
+ var attr = node.getAttribute(controlAttribute);
1045
+ var alreadyHidden = attr !== null && attr !== "false";
1046
+ var counterValue = (counterMap.get(node) || 0) + 1;
1047
+ var markerValue = (markerCounter.get(node) || 0) + 1;
1048
+ counterMap.set(node, counterValue);
1049
+ markerCounter.set(node, markerValue);
1050
+ hiddenNodes.push(node);
1051
+ if (counterValue === 1 && alreadyHidden) {
1052
+ uncontrolledNodes.set(node, true);
1053
+ }
1054
+ if (markerValue === 1) {
1055
+ node.setAttribute(markerName, "true");
1056
+ }
1057
+ if (!alreadyHidden) {
1058
+ node.setAttribute(controlAttribute, "true");
1059
+ }
1060
+ } catch (e) {
1061
+ console.error("aria-hidden: cannot operate on ", node, e);
1062
+ }
1063
+ }
1064
+ });
1065
+ };
1066
+ deep(parentNode);
1067
+ elementsToKeep.clear();
1068
+ lockCount++;
1069
+ return function() {
1070
+ hiddenNodes.forEach(function(node) {
1071
+ var counterValue = counterMap.get(node) - 1;
1072
+ var markerValue = markerCounter.get(node) - 1;
1073
+ counterMap.set(node, counterValue);
1074
+ markerCounter.set(node, markerValue);
1075
+ if (!counterValue) {
1076
+ if (!uncontrolledNodes.has(node)) {
1077
+ node.removeAttribute(controlAttribute);
1078
+ }
1079
+ uncontrolledNodes.delete(node);
1080
+ }
1081
+ if (!markerValue) {
1082
+ node.removeAttribute(markerName);
1083
+ }
1084
+ });
1085
+ lockCount--;
1086
+ if (!lockCount) {
1087
+ counterMap = /* @__PURE__ */ new WeakMap();
1088
+ counterMap = /* @__PURE__ */ new WeakMap();
1089
+ uncontrolledNodes = /* @__PURE__ */ new WeakMap();
1090
+ markerMap = {};
1091
+ }
1092
+ };
1093
+ };
1094
+ var hideOthers = function(originalTarget, parentNode, markerName) {
1095
+ if (markerName === void 0) {
1096
+ markerName = "data-aria-hidden";
1097
+ }
1098
+ var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1099
+ var activeParentNode = parentNode || getDefaultParent(originalTarget);
1100
+ if (!activeParentNode) {
1101
+ return function() {
1102
+ return null;
1103
+ };
1104
+ }
1105
+ targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
1106
+ return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
1107
+ };
1108
+
1109
+ export {
1110
+ useId,
1111
+ FocusScope,
1112
+ useFocusGuards,
1113
+ Combination_default,
1114
+ hideOthers
1115
+ };
1116
+ //# sourceMappingURL=chunk-XET2JR3H.js.map