@sudobility/components 3.0.0 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/forms/inputs/index.d.ts +0 -11
- package/dist/forms/inputs/index.d.ts.map +1 -1
- package/dist/index.esm.js +4304 -5264
- package/dist/index.umd.js +9 -14
- package/dist/ui/design-system-components.d.ts +1 -1
- package/dist/ui/index.d.ts +106 -944
- package/dist/ui/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/ui/ab-test-email.d.ts +0 -19
- package/dist/ui/ab-test-email.d.ts.map +0 -1
- package/dist/ui/accordion.d.ts +0 -50
- package/dist/ui/accordion.d.ts.map +0 -1
- package/dist/ui/account-overview.d.ts +0 -19
- package/dist/ui/account-overview.d.ts.map +0 -1
- package/dist/ui/achievement-badge.d.ts +0 -34
- package/dist/ui/achievement-badge.d.ts.map +0 -1
- package/dist/ui/achievement-unlock.d.ts +0 -34
- package/dist/ui/achievement-unlock.d.ts.map +0 -1
- package/dist/ui/activity-feed.d.ts +0 -41
- package/dist/ui/activity-feed.d.ts.map +0 -1
- package/dist/ui/address-label.d.ts +0 -26
- package/dist/ui/address-label.d.ts.map +0 -1
- package/dist/ui/agent-card.d.ts +0 -34
- package/dist/ui/agent-card.d.ts.map +0 -1
- package/dist/ui/airport-map.d.ts +0 -19
- package/dist/ui/airport-map.d.ts.map +0 -1
- package/dist/ui/alert-banner.d.ts +0 -11
- package/dist/ui/alert-banner.d.ts.map +0 -1
- package/dist/ui/alert-dialog.d.ts +0 -61
- package/dist/ui/alert-dialog.d.ts.map +0 -1
- package/dist/ui/allergen-filter.d.ts +0 -34
- package/dist/ui/allergen-filter.d.ts.map +0 -1
- package/dist/ui/api-playground.d.ts +0 -34
- package/dist/ui/api-playground.d.ts.map +0 -1
- package/dist/ui/api-reference.d.ts +0 -34
- package/dist/ui/api-reference.d.ts.map +0 -1
- package/dist/ui/appointment-booking.d.ts +0 -19
- package/dist/ui/appointment-booking.d.ts.map +0 -1
- package/dist/ui/appointment-slot.d.ts +0 -34
- package/dist/ui/appointment-slot.d.ts.map +0 -1
- package/dist/ui/area-chart.d.ts +0 -55
- package/dist/ui/area-chart.d.ts.map +0 -1
- package/dist/ui/assignment-submission.d.ts +0 -19
- package/dist/ui/assignment-submission.d.ts.map +0 -1
- package/dist/ui/athlete-stats.d.ts +0 -19
- package/dist/ui/athlete-stats.d.ts.map +0 -1
- package/dist/ui/attendance-calendar.d.ts +0 -34
- package/dist/ui/attendance-calendar.d.ts.map +0 -1
- package/dist/ui/attendee-badge.d.ts +0 -34
- package/dist/ui/attendee-badge.d.ts.map +0 -1
- package/dist/ui/audio-player.d.ts +0 -36
- package/dist/ui/audio-player.d.ts.map +0 -1
- package/dist/ui/audio-waveform.d.ts +0 -34
- package/dist/ui/audio-waveform.d.ts.map +0 -1
- package/dist/ui/audit-log.d.ts +0 -34
- package/dist/ui/audit-log.d.ts.map +0 -1
- package/dist/ui/audit-trail.d.ts +0 -19
- package/dist/ui/audit-trail.d.ts.map +0 -1
- package/dist/ui/aurora-background.d.ts +0 -34
- package/dist/ui/aurora-background.d.ts.map +0 -1
- package/dist/ui/availability-grid.d.ts +0 -34
- package/dist/ui/availability-grid.d.ts.map +0 -1
- package/dist/ui/avatar-group.d.ts +0 -34
- package/dist/ui/avatar-group.d.ts.map +0 -1
- package/dist/ui/avatar.d.ts +0 -40
- package/dist/ui/avatar.d.ts.map +0 -1
- package/dist/ui/badge-designer.d.ts +0 -34
- package/dist/ui/badge-designer.d.ts.map +0 -1
- package/dist/ui/balance-sheet.d.ts +0 -34
- package/dist/ui/balance-sheet.d.ts.map +0 -1
- package/dist/ui/bar-chart.d.ts +0 -44
- package/dist/ui/bar-chart.d.ts.map +0 -1
- package/dist/ui/batch-processor.d.ts +0 -34
- package/dist/ui/batch-processor.d.ts.map +0 -1
- package/dist/ui/billing-cycle.d.ts +0 -19
- package/dist/ui/billing-cycle.d.ts.map +0 -1
- package/dist/ui/billing-history.d.ts +0 -34
- package/dist/ui/billing-history.d.ts.map +0 -1
- package/dist/ui/blockquote.d.ts +0 -36
- package/dist/ui/blockquote.d.ts.map +0 -1
- package/dist/ui/blueprint-viewer.d.ts +0 -19
- package/dist/ui/blueprint-viewer.d.ts.map +0 -1
- package/dist/ui/boarding-pass.d.ts +0 -19
- package/dist/ui/boarding-pass.d.ts.map +0 -1
- package/dist/ui/body-metrics.d.ts +0 -34
- package/dist/ui/body-metrics.d.ts.map +0 -1
- package/dist/ui/booking-confirmation.d.ts +0 -34
- package/dist/ui/booking-confirmation.d.ts.map +0 -1
- package/dist/ui/booking-widget.d.ts +0 -34
- package/dist/ui/booking-widget.d.ts.map +0 -1
- package/dist/ui/border-accent.d.ts +0 -42
- package/dist/ui/border-accent.d.ts.map +0 -1
- package/dist/ui/break-timer.d.ts +0 -34
- package/dist/ui/break-timer.d.ts.map +0 -1
- package/dist/ui/bubble-chart.d.ts +0 -34
- package/dist/ui/bubble-chart.d.ts.map +0 -1
- package/dist/ui/budget-tracker.d.ts +0 -34
- package/dist/ui/budget-tracker.d.ts.map +0 -1
- package/dist/ui/bug-report.d.ts +0 -34
- package/dist/ui/bug-report.d.ts.map +0 -1
- package/dist/ui/bug-tracker.d.ts +0 -19
- package/dist/ui/bug-tracker.d.ts.map +0 -1
- package/dist/ui/build-log.d.ts +0 -34
- package/dist/ui/build-log.d.ts.map +0 -1
- package/dist/ui/bulk-editor.d.ts +0 -34
- package/dist/ui/bulk-editor.d.ts.map +0 -1
- package/dist/ui/burndown-chart.d.ts +0 -19
- package/dist/ui/burndown-chart.d.ts.map +0 -1
- package/dist/ui/button-group.d.ts +0 -41
- package/dist/ui/button-group.d.ts.map +0 -1
- package/dist/ui/call-center.d.ts +0 -19
- package/dist/ui/call-center.d.ts.map +0 -1
- package/dist/ui/call-controls.d.ts +0 -34
- package/dist/ui/call-controls.d.ts.map +0 -1
- package/dist/ui/callout.d.ts +0 -23
- package/dist/ui/callout.d.ts.map +0 -1
- package/dist/ui/calorie-tracker.d.ts +0 -34
- package/dist/ui/calorie-tracker.d.ts.map +0 -1
- package/dist/ui/candidate-card.d.ts +0 -19
- package/dist/ui/candidate-card.d.ts.map +0 -1
- package/dist/ui/carbon-footprint.d.ts +0 -19
- package/dist/ui/carbon-footprint.d.ts.map +0 -1
- package/dist/ui/cargo-manifest.d.ts +0 -19
- package/dist/ui/cargo-manifest.d.ts.map +0 -1
- package/dist/ui/carousel.d.ts +0 -42
- package/dist/ui/carousel.d.ts.map +0 -1
- package/dist/ui/cart-summary.d.ts +0 -47
- package/dist/ui/cart-summary.d.ts.map +0 -1
- package/dist/ui/cash-flow.d.ts +0 -34
- package/dist/ui/cash-flow.d.ts.map +0 -1
- package/dist/ui/cell-editor.d.ts +0 -34
- package/dist/ui/cell-editor.d.ts.map +0 -1
- package/dist/ui/census-form.d.ts +0 -19
- package/dist/ui/census-form.d.ts.map +0 -1
- package/dist/ui/certificate-builder.d.ts +0 -34
- package/dist/ui/certificate-builder.d.ts.map +0 -1
- package/dist/ui/certificate.d.ts +0 -34
- package/dist/ui/certificate.d.ts.map +0 -1
- package/dist/ui/changelog-display.d.ts +0 -34
- package/dist/ui/changelog-display.d.ts.map +0 -1
- package/dist/ui/chat-bubble.d.ts +0 -34
- package/dist/ui/chat-bubble.d.ts.map +0 -1
- package/dist/ui/checklist-progress.d.ts +0 -34
- package/dist/ui/checklist-progress.d.ts.map +0 -1
- package/dist/ui/claim-submission.d.ts +0 -19
- package/dist/ui/claim-submission.d.ts.map +0 -1
- package/dist/ui/code-highlighter.d.ts +0 -34
- package/dist/ui/code-highlighter.d.ts.map +0 -1
- package/dist/ui/code-playground.d.ts +0 -34
- package/dist/ui/code-playground.d.ts.map +0 -1
- package/dist/ui/collapsible.d.ts +0 -53
- package/dist/ui/collapsible.d.ts.map +0 -1
- package/dist/ui/color-picker-advanced.d.ts +0 -9
- package/dist/ui/color-picker-advanced.d.ts.map +0 -1
- package/dist/ui/color-picker.d.ts +0 -43
- package/dist/ui/color-picker.d.ts.map +0 -1
- package/dist/ui/color-swatch.d.ts +0 -42
- package/dist/ui/color-swatch.d.ts.map +0 -1
- package/dist/ui/column-resize.d.ts +0 -34
- package/dist/ui/column-resize.d.ts.map +0 -1
- package/dist/ui/comment-thread.d.ts +0 -47
- package/dist/ui/comment-thread.d.ts.map +0 -1
- package/dist/ui/comparison-section.d.ts +0 -58
- package/dist/ui/comparison-section.d.ts.map +0 -1
- package/dist/ui/compliance-checker.d.ts +0 -19
- package/dist/ui/compliance-checker.d.ts.map +0 -1
- package/dist/ui/confidence-meter.d.ts +0 -34
- package/dist/ui/confidence-meter.d.ts.map +0 -1
- package/dist/ui/confirmation-dialog.d.ts +0 -16
- package/dist/ui/confirmation-dialog.d.ts.map +0 -1
- package/dist/ui/conflict-resolver.d.ts +0 -34
- package/dist/ui/conflict-resolver.d.ts.map +0 -1
- package/dist/ui/connection-status.d.ts +0 -34
- package/dist/ui/connection-status.d.ts.map +0 -1
- package/dist/ui/contact-card.d.ts +0 -19
- package/dist/ui/contact-card.d.ts.map +0 -1
- package/dist/ui/container-stats.d.ts +0 -34
- package/dist/ui/container-stats.d.ts.map +0 -1
- package/dist/ui/content-container.d.ts +0 -15
- package/dist/ui/content-container.d.ts.map +0 -1
- package/dist/ui/contract-viewer.d.ts +0 -19
- package/dist/ui/contract-viewer.d.ts.map +0 -1
- package/dist/ui/cooking-timer.d.ts +0 -34
- package/dist/ui/cooking-timer.d.ts.map +0 -1
- package/dist/ui/copy-button.d.ts +0 -53
- package/dist/ui/copy-button.d.ts.map +0 -1
- package/dist/ui/countdown-event.d.ts +0 -34
- package/dist/ui/countdown-event.d.ts.map +0 -1
- package/dist/ui/countdown-timer.d.ts +0 -48
- package/dist/ui/countdown-timer.d.ts.map +0 -1
- package/dist/ui/course-catalog.d.ts +0 -19
- package/dist/ui/course-catalog.d.ts.map +0 -1
- package/dist/ui/coverage-chart.d.ts +0 -34
- package/dist/ui/coverage-chart.d.ts.map +0 -1
- package/dist/ui/cpu-meter.d.ts +0 -34
- package/dist/ui/cpu-meter.d.ts.map +0 -1
- package/dist/ui/credit-card-input.d.ts +0 -58
- package/dist/ui/credit-card-input.d.ts.map +0 -1
- package/dist/ui/crm-dashboard.d.ts +0 -19
- package/dist/ui/crm-dashboard.d.ts.map +0 -1
- package/dist/ui/crop-monitor.d.ts +0 -19
- package/dist/ui/crop-monitor.d.ts.map +0 -1
- package/dist/ui/crypto-portfolio.d.ts +0 -34
- package/dist/ui/crypto-portfolio.d.ts.map +0 -1
- package/dist/ui/csv-importer.d.ts +0 -34
- package/dist/ui/csv-importer.d.ts.map +0 -1
- package/dist/ui/cta-banner.d.ts +0 -34
- package/dist/ui/cta-banner.d.ts.map +0 -1
- package/dist/ui/currency-converter.d.ts +0 -34
- package/dist/ui/currency-converter.d.ts.map +0 -1
- package/dist/ui/currency-input.d.ts +0 -66
- package/dist/ui/currency-input.d.ts.map +0 -1
- package/dist/ui/currency-rates.d.ts +0 -34
- package/dist/ui/currency-rates.d.ts.map +0 -1
- package/dist/ui/cursor-tracker.d.ts +0 -34
- package/dist/ui/cursor-tracker.d.ts.map +0 -1
- package/dist/ui/customer-loyalty.d.ts +0 -19
- package/dist/ui/customer-loyalty.d.ts.map +0 -1
- package/dist/ui/dashboard-builder.d.ts +0 -34
- package/dist/ui/dashboard-builder.d.ts.map +0 -1
- package/dist/ui/dashboard-stat-card.d.ts +0 -37
- package/dist/ui/dashboard-stat-card.d.ts.map +0 -1
- package/dist/ui/data-grid.d.ts +0 -34
- package/dist/ui/data-grid.d.ts.map +0 -1
- package/dist/ui/data-mapper.d.ts +0 -34
- package/dist/ui/data-mapper.d.ts.map +0 -1
- package/dist/ui/data-table.d.ts +0 -47
- package/dist/ui/data-table.d.ts.map +0 -1
- package/dist/ui/date-range-picker.d.ts +0 -51
- package/dist/ui/date-range-picker.d.ts.map +0 -1
- package/dist/ui/deal-pipeline.d.ts +0 -19
- package/dist/ui/deal-pipeline.d.ts.map +0 -1
- package/dist/ui/defect-tracker.d.ts +0 -19
- package/dist/ui/defect-tracker.d.ts.map +0 -1
- package/dist/ui/delivery-tracker.d.ts +0 -34
- package/dist/ui/delivery-tracker.d.ts.map +0 -1
- package/dist/ui/deployment-status.d.ts +0 -34
- package/dist/ui/deployment-status.d.ts.map +0 -1
- package/dist/ui/destination-card.d.ts +0 -34
- package/dist/ui/destination-card.d.ts.map +0 -1
- package/dist/ui/device-control.d.ts +0 -34
- package/dist/ui/device-control.d.ts.map +0 -1
- package/dist/ui/diff-viewer.d.ts +0 -34
- package/dist/ui/diff-viewer.d.ts.map +0 -1
- package/dist/ui/donation-form.d.ts +0 -19
- package/dist/ui/donation-form.d.ts.map +0 -1
- package/dist/ui/double-tap.d.ts +0 -34
- package/dist/ui/double-tap.d.ts.map +0 -1
- package/dist/ui/drag-drop-list.d.ts +0 -34
- package/dist/ui/drag-drop-list.d.ts.map +0 -1
- package/dist/ui/drag-drop.d.ts +0 -49
- package/dist/ui/drag-drop.d.ts.map +0 -1
- package/dist/ui/driver-log.d.ts +0 -19
- package/dist/ui/driver-log.d.ts.map +0 -1
- package/dist/ui/email-accounts-list.d.ts +0 -27
- package/dist/ui/email-accounts-list.d.ts.map +0 -1
- package/dist/ui/email-analytics.d.ts +0 -19
- package/dist/ui/email-analytics.d.ts.map +0 -1
- package/dist/ui/email-campaign.d.ts +0 -19
- package/dist/ui/email-campaign.d.ts.map +0 -1
- package/dist/ui/email-input-group.d.ts +0 -53
- package/dist/ui/email-input-group.d.ts.map +0 -1
- package/dist/ui/email-template.d.ts +0 -34
- package/dist/ui/email-template.d.ts.map +0 -1
- package/dist/ui/embed-widget.d.ts +0 -34
- package/dist/ui/embed-widget.d.ts.map +0 -1
- package/dist/ui/empty-state.d.ts +0 -11
- package/dist/ui/empty-state.d.ts.map +0 -1
- package/dist/ui/energy-monitor.d.ts +0 -19
- package/dist/ui/energy-monitor.d.ts.map +0 -1
- package/dist/ui/event-calendar-adv.d.ts +0 -34
- package/dist/ui/event-calendar-adv.d.ts.map +0 -1
- package/dist/ui/event-calendar.d.ts +0 -34
- package/dist/ui/event-calendar.d.ts.map +0 -1
- package/dist/ui/event-card.d.ts +0 -34
- package/dist/ui/event-card.d.ts.map +0 -1
- package/dist/ui/event-gallery.d.ts +0 -34
- package/dist/ui/event-gallery.d.ts.map +0 -1
- package/dist/ui/excel-uploader.d.ts +0 -34
- package/dist/ui/excel-uploader.d.ts.map +0 -1
- package/dist/ui/exercise-timer.d.ts +0 -34
- package/dist/ui/exercise-timer.d.ts.map +0 -1
- package/dist/ui/expense-form.d.ts +0 -34
- package/dist/ui/expense-form.d.ts.map +0 -1
- package/dist/ui/export-wizard.d.ts +0 -34
- package/dist/ui/export-wizard.d.ts.map +0 -1
- package/dist/ui/facebook-share.d.ts +0 -19
- package/dist/ui/facebook-share.d.ts.map +0 -1
- package/dist/ui/faceted-search.d.ts +0 -34
- package/dist/ui/faceted-search.d.ts.map +0 -1
- package/dist/ui/fade-carousel.d.ts +0 -34
- package/dist/ui/fade-carousel.d.ts.map +0 -1
- package/dist/ui/farm-equipment.d.ts +0 -19
- package/dist/ui/farm-equipment.d.ts.map +0 -1
- package/dist/ui/feature-card.d.ts +0 -60
- package/dist/ui/feature-card.d.ts.map +0 -1
- package/dist/ui/feature-comparison.d.ts +0 -34
- package/dist/ui/feature-comparison.d.ts.map +0 -1
- package/dist/ui/feature-grid.d.ts +0 -52
- package/dist/ui/feature-grid.d.ts.map +0 -1
- package/dist/ui/feature-importance.d.ts +0 -34
- package/dist/ui/feature-importance.d.ts.map +0 -1
- package/dist/ui/feature-list-item.d.ts +0 -35
- package/dist/ui/feature-list-item.d.ts.map +0 -1
- package/dist/ui/feature-spotlight.d.ts +0 -34
- package/dist/ui/feature-spotlight.d.ts.map +0 -1
- package/dist/ui/feedback-form.d.ts +0 -34
- package/dist/ui/feedback-form.d.ts.map +0 -1
- package/dist/ui/field-mapper.d.ts +0 -34
- package/dist/ui/field-mapper.d.ts.map +0 -1
- package/dist/ui/file-browser.d.ts +0 -34
- package/dist/ui/file-browser.d.ts.map +0 -1
- package/dist/ui/file-icon.d.ts +0 -33
- package/dist/ui/file-icon.d.ts.map +0 -1
- package/dist/ui/file-preview.d.ts +0 -34
- package/dist/ui/file-preview.d.ts.map +0 -1
- package/dist/ui/file-tree.d.ts +0 -34
- package/dist/ui/file-tree.d.ts.map +0 -1
- package/dist/ui/filter-panel.d.ts +0 -34
- package/dist/ui/filter-panel.d.ts.map +0 -1
- package/dist/ui/financial-report.d.ts +0 -34
- package/dist/ui/financial-report.d.ts.map +0 -1
- package/dist/ui/fitness-goal.d.ts +0 -34
- package/dist/ui/fitness-goal.d.ts.map +0 -1
- package/dist/ui/flashcard.d.ts +0 -34
- package/dist/ui/flashcard.d.ts.map +0 -1
- package/dist/ui/fleet-management.d.ts +0 -19
- package/dist/ui/fleet-management.d.ts.map +0 -1
- package/dist/ui/flight-search.d.ts +0 -34
- package/dist/ui/flight-search.d.ts.map +0 -1
- package/dist/ui/flight-status.d.ts +0 -19
- package/dist/ui/flight-status.d.ts.map +0 -1
- package/dist/ui/flight-tracker.d.ts +0 -19
- package/dist/ui/flight-tracker.d.ts.map +0 -1
- package/dist/ui/flip-card.d.ts +0 -34
- package/dist/ui/flip-card.d.ts.map +0 -1
- package/dist/ui/form-builder.d.ts +0 -34
- package/dist/ui/form-builder.d.ts.map +0 -1
- package/dist/ui/form-field-group.d.ts +0 -58
- package/dist/ui/form-field-group.d.ts.map +0 -1
- package/dist/ui/form-field.d.ts +0 -53
- package/dist/ui/form-field.d.ts.map +0 -1
- package/dist/ui/form-template.d.ts +0 -34
- package/dist/ui/form-template.d.ts.map +0 -1
- package/dist/ui/form-validator.d.ts +0 -34
- package/dist/ui/form-validator.d.ts.map +0 -1
- package/dist/ui/free-email-banner.d.ts +0 -20
- package/dist/ui/free-email-banner.d.ts.map +0 -1
- package/dist/ui/fuel-gauge.d.ts +0 -19
- package/dist/ui/fuel-gauge.d.ts.map +0 -1
- package/dist/ui/fundraiser-progress.d.ts +0 -19
- package/dist/ui/fundraiser-progress.d.ts.map +0 -1
- package/dist/ui/funnel-chart.d.ts +0 -34
- package/dist/ui/funnel-chart.d.ts.map +0 -1
- package/dist/ui/game-controls.d.ts +0 -34
- package/dist/ui/game-controls.d.ts.map +0 -1
- package/dist/ui/gas-tracker.d.ts +0 -34
- package/dist/ui/gas-tracker.d.ts.map +0 -1
- package/dist/ui/gauge.d.ts +0 -35
- package/dist/ui/gauge.d.ts.map +0 -1
- package/dist/ui/geofence-editor.d.ts +0 -34
- package/dist/ui/geofence-editor.d.ts.map +0 -1
- package/dist/ui/gesture-detector.d.ts +0 -34
- package/dist/ui/gesture-detector.d.ts.map +0 -1
- package/dist/ui/glassmorphism-card.d.ts +0 -34
- package/dist/ui/glassmorphism-card.d.ts.map +0 -1
- package/dist/ui/grade-book.d.ts +0 -19
- package/dist/ui/grade-book.d.ts.map +0 -1
- package/dist/ui/gradient-banner.d.ts +0 -48
- package/dist/ui/gradient-banner.d.ts.map +0 -1
- package/dist/ui/grant-application.d.ts +0 -19
- package/dist/ui/grant-application.d.ts.map +0 -1
- package/dist/ui/guest-list.d.ts +0 -34
- package/dist/ui/guest-list.d.ts.map +0 -1
- package/dist/ui/guided-tour.d.ts +0 -34
- package/dist/ui/guided-tour.d.ts.map +0 -1
- package/dist/ui/harvest-tracker.d.ts +0 -19
- package/dist/ui/harvest-tracker.d.ts.map +0 -1
- package/dist/ui/heart-rate.d.ts +0 -34
- package/dist/ui/heart-rate.d.ts.map +0 -1
- package/dist/ui/heatmap.d.ts +0 -34
- package/dist/ui/heatmap.d.ts.map +0 -1
- package/dist/ui/hero-banner-with-badge.d.ts +0 -20
- package/dist/ui/hero-banner-with-badge.d.ts.map +0 -1
- package/dist/ui/hotel-booking.d.ts +0 -34
- package/dist/ui/hotel-booking.d.ts.map +0 -1
- package/dist/ui/hover-card.d.ts +0 -47
- package/dist/ui/hover-card.d.ts.map +0 -1
- package/dist/ui/icon-button.d.ts +0 -58
- package/dist/ui/icon-button.d.ts.map +0 -1
- package/dist/ui/image-comparison.d.ts +0 -34
- package/dist/ui/image-comparison.d.ts.map +0 -1
- package/dist/ui/image-cropper.d.ts +0 -42
- package/dist/ui/image-cropper.d.ts.map +0 -1
- package/dist/ui/image-gallery.d.ts +0 -41
- package/dist/ui/image-gallery.d.ts.map +0 -1
- package/dist/ui/image.d.ts +0 -60
- package/dist/ui/image.d.ts.map +0 -1
- package/dist/ui/import-preview.d.ts +0 -34
- package/dist/ui/import-preview.d.ts.map +0 -1
- package/dist/ui/income-chart.d.ts +0 -34
- package/dist/ui/income-chart.d.ts.map +0 -1
- package/dist/ui/ingredient-list.d.ts +0 -34
- package/dist/ui/ingredient-list.d.ts.map +0 -1
- package/dist/ui/inline-edit.d.ts +0 -34
- package/dist/ui/inline-edit.d.ts.map +0 -1
- package/dist/ui/instagram-widget.d.ts +0 -19
- package/dist/ui/instagram-widget.d.ts.map +0 -1
- package/dist/ui/internal-link-clusters.d.ts +0 -65
- package/dist/ui/internal-link-clusters.d.ts.map +0 -1
- package/dist/ui/interview-scheduler.d.ts +0 -19
- package/dist/ui/interview-scheduler.d.ts.map +0 -1
- package/dist/ui/inventory-alert.d.ts +0 -19
- package/dist/ui/inventory-alert.d.ts.map +0 -1
- package/dist/ui/inventory-scanner.d.ts +0 -19
- package/dist/ui/inventory-scanner.d.ts.map +0 -1
- package/dist/ui/investment-portfolio.d.ts +0 -19
- package/dist/ui/investment-portfolio.d.ts.map +0 -1
- package/dist/ui/investment-tracker.d.ts +0 -34
- package/dist/ui/investment-tracker.d.ts.map +0 -1
- package/dist/ui/invoice-display.d.ts +0 -34
- package/dist/ui/invoice-display.d.ts.map +0 -1
- package/dist/ui/invoice-template.d.ts +0 -34
- package/dist/ui/invoice-template.d.ts.map +0 -1
- package/dist/ui/itinerary-builder.d.ts +0 -34
- package/dist/ui/itinerary-builder.d.ts.map +0 -1
- package/dist/ui/job-posting.d.ts +0 -19
- package/dist/ui/job-posting.d.ts.map +0 -1
- package/dist/ui/json-importer.d.ts +0 -34
- package/dist/ui/json-importer.d.ts.map +0 -1
- package/dist/ui/json-viewer.d.ts +0 -34
- package/dist/ui/json-viewer.d.ts.map +0 -1
- package/dist/ui/kanban.d.ts +0 -43
- package/dist/ui/kanban.d.ts.map +0 -1
- package/dist/ui/key-value-pair.d.ts +0 -57
- package/dist/ui/key-value-pair.d.ts.map +0 -1
- package/dist/ui/knowledge-base.d.ts +0 -19
- package/dist/ui/knowledge-base.d.ts.map +0 -1
- package/dist/ui/label.d.ts +0 -5
- package/dist/ui/label.d.ts.map +0 -1
- package/dist/ui/landing-builder.d.ts +0 -34
- package/dist/ui/landing-builder.d.ts.map +0 -1
- package/dist/ui/lead-scorer.d.ts +0 -19
- package/dist/ui/lead-scorer.d.ts.map +0 -1
- package/dist/ui/leaderboard-podium.d.ts +0 -34
- package/dist/ui/leaderboard-podium.d.ts.map +0 -1
- package/dist/ui/lightbox.d.ts +0 -64
- package/dist/ui/lightbox.d.ts.map +0 -1
- package/dist/ui/line-chart.d.ts +0 -55
- package/dist/ui/line-chart.d.ts.map +0 -1
- package/dist/ui/listing-form.d.ts +0 -34
- package/dist/ui/listing-form.d.ts.map +0 -1
- package/dist/ui/live-chat.d.ts +0 -19
- package/dist/ui/live-chat.d.ts.map +0 -1
- package/dist/ui/live-stream.d.ts +0 -19
- package/dist/ui/live-stream.d.ts.map +0 -1
- package/dist/ui/load-planner.d.ts +0 -19
- package/dist/ui/load-planner.d.ts.map +0 -1
- package/dist/ui/loading-state.d.ts +0 -11
- package/dist/ui/loading-state.d.ts.map +0 -1
- package/dist/ui/loan-calculator.d.ts +0 -19
- package/dist/ui/loan-calculator.d.ts.map +0 -1
- package/dist/ui/location-picker.d.ts +0 -34
- package/dist/ui/location-picker.d.ts.map +0 -1
- package/dist/ui/logistics-map.d.ts +0 -19
- package/dist/ui/logistics-map.d.ts.map +0 -1
- package/dist/ui/long-press.d.ts +0 -34
- package/dist/ui/long-press.d.ts.map +0 -1
- package/dist/ui/machine-monitor.d.ts +0 -19
- package/dist/ui/machine-monitor.d.ts.map +0 -1
- package/dist/ui/maintenance-log.d.ts +0 -19
- package/dist/ui/maintenance-log.d.ts.map +0 -1
- package/dist/ui/map-marker.d.ts +0 -34
- package/dist/ui/map-marker.d.ts.map +0 -1
- package/dist/ui/markdown-renderer.d.ts +0 -34
- package/dist/ui/markdown-renderer.d.ts.map +0 -1
- package/dist/ui/material-order.d.ts +0 -19
- package/dist/ui/material-order.d.ts.map +0 -1
- package/dist/ui/meal-planner.d.ts +0 -34
- package/dist/ui/meal-planner.d.ts.map +0 -1
- package/dist/ui/media-playlist.d.ts +0 -34
- package/dist/ui/media-playlist.d.ts.map +0 -1
- package/dist/ui/media-uploader.d.ts +0 -45
- package/dist/ui/media-uploader.d.ts.map +0 -1
- package/dist/ui/meeting-scheduler.d.ts +0 -34
- package/dist/ui/meeting-scheduler.d.ts.map +0 -1
- package/dist/ui/memory-usage.d.ts +0 -34
- package/dist/ui/memory-usage.d.ts.map +0 -1
- package/dist/ui/mention-input.d.ts +0 -56
- package/dist/ui/mention-input.d.ts.map +0 -1
- package/dist/ui/menu-display.d.ts +0 -34
- package/dist/ui/menu-display.d.ts.map +0 -1
- package/dist/ui/menu-item.d.ts +0 -56
- package/dist/ui/menu-item.d.ts.map +0 -1
- package/dist/ui/message-input.d.ts +0 -34
- package/dist/ui/message-input.d.ts.map +0 -1
- package/dist/ui/message-list.d.ts +0 -34
- package/dist/ui/message-list.d.ts.map +0 -1
- package/dist/ui/metric-comparison.d.ts +0 -34
- package/dist/ui/metric-comparison.d.ts.map +0 -1
- package/dist/ui/metrics-grid.d.ts +0 -20
- package/dist/ui/metrics-grid.d.ts.map +0 -1
- package/dist/ui/model-prediction.d.ts +0 -34
- package/dist/ui/model-prediction.d.ts.map +0 -1
- package/dist/ui/mortgage-calc.d.ts +0 -34
- package/dist/ui/mortgage-calc.d.ts.map +0 -1
- package/dist/ui/navigation-menu.d.ts +0 -49
- package/dist/ui/navigation-menu.d.ts.map +0 -1
- package/dist/ui/neighborhood-info.d.ts +0 -34
- package/dist/ui/neighborhood-info.d.ts.map +0 -1
- package/dist/ui/nested-drag.d.ts +0 -34
- package/dist/ui/nested-drag.d.ts.map +0 -1
- package/dist/ui/network-status.d.ts +0 -34
- package/dist/ui/network-status.d.ts.map +0 -1
- package/dist/ui/neumorphic-button.d.ts +0 -34
- package/dist/ui/neumorphic-button.d.ts.map +0 -1
- package/dist/ui/nft-gallery.d.ts +0 -34
- package/dist/ui/nft-gallery.d.ts.map +0 -1
- package/dist/ui/no-content.d.ts +0 -9
- package/dist/ui/no-content.d.ts.map +0 -1
- package/dist/ui/notification-badge.d.ts +0 -10
- package/dist/ui/notification-badge.d.ts.map +0 -1
- package/dist/ui/notification-panel.d.ts +0 -16
- package/dist/ui/notification-panel.d.ts.map +0 -1
- package/dist/ui/nps-survey.d.ts +0 -34
- package/dist/ui/nps-survey.d.ts.map +0 -1
- package/dist/ui/nutrition-facts.d.ts +0 -34
- package/dist/ui/nutrition-facts.d.ts.map +0 -1
- package/dist/ui/nutrition-label.d.ts +0 -34
- package/dist/ui/nutrition-label.d.ts.map +0 -1
- package/dist/ui/oauth-button.d.ts +0 -34
- package/dist/ui/oauth-button.d.ts.map +0 -1
- package/dist/ui/onboarding-checklist.d.ts +0 -19
- package/dist/ui/onboarding-checklist.d.ts.map +0 -1
- package/dist/ui/open-house.d.ts +0 -34
- package/dist/ui/open-house.d.ts.map +0 -1
- package/dist/ui/order-cart.d.ts +0 -34
- package/dist/ui/order-cart.d.ts.map +0 -1
- package/dist/ui/otp-input.d.ts +0 -51
- package/dist/ui/otp-input.d.ts.map +0 -1
- package/dist/ui/overtime-tracker.d.ts +0 -34
- package/dist/ui/overtime-tracker.d.ts.map +0 -1
- package/dist/ui/page-builder.d.ts +0 -34
- package/dist/ui/page-builder.d.ts.map +0 -1
- package/dist/ui/particle-effect.d.ts +0 -34
- package/dist/ui/particle-effect.d.ts.map +0 -1
- package/dist/ui/password-input.d.ts +0 -68
- package/dist/ui/password-input.d.ts.map +0 -1
- package/dist/ui/password-strength.d.ts +0 -34
- package/dist/ui/password-strength.d.ts.map +0 -1
- package/dist/ui/patient-record.d.ts +0 -19
- package/dist/ui/patient-record.d.ts.map +0 -1
- package/dist/ui/payment-form.d.ts +0 -34
- package/dist/ui/payment-form.d.ts.map +0 -1
- package/dist/ui/performance-chart.d.ts +0 -34
- package/dist/ui/performance-chart.d.ts.map +0 -1
- package/dist/ui/permit-application.d.ts +0 -19
- package/dist/ui/permit-application.d.ts.map +0 -1
- package/dist/ui/phone-directory.d.ts +0 -19
- package/dist/ui/phone-directory.d.ts.map +0 -1
- package/dist/ui/pie-chart.d.ts +0 -45
- package/dist/ui/pie-chart.d.ts.map +0 -1
- package/dist/ui/pinch-zoom.d.ts +0 -34
- package/dist/ui/pinch-zoom.d.ts.map +0 -1
- package/dist/ui/pipeline-view.d.ts +0 -34
- package/dist/ui/pipeline-view.d.ts.map +0 -1
- package/dist/ui/pivot-table.d.ts +0 -34
- package/dist/ui/pivot-table.d.ts.map +0 -1
- package/dist/ui/player-stats.d.ts +0 -19
- package/dist/ui/player-stats.d.ts.map +0 -1
- package/dist/ui/playlist-manager.d.ts +0 -19
- package/dist/ui/playlist-manager.d.ts.map +0 -1
- package/dist/ui/podcast-player.d.ts +0 -19
- package/dist/ui/podcast-player.d.ts.map +0 -1
- package/dist/ui/policy-manager.d.ts +0 -19
- package/dist/ui/policy-manager.d.ts.map +0 -1
- package/dist/ui/port-schedule.d.ts +0 -19
- package/dist/ui/port-schedule.d.ts.map +0 -1
- package/dist/ui/portion-calculator.d.ts +0 -34
- package/dist/ui/portion-calculator.d.ts.map +0 -1
- package/dist/ui/pos-terminal.d.ts +0 -19
- package/dist/ui/pos-terminal.d.ts.map +0 -1
- package/dist/ui/power-grid.d.ts +0 -19
- package/dist/ui/power-grid.d.ts.map +0 -1
- package/dist/ui/preference-card.d.ts +0 -34
- package/dist/ui/preference-card.d.ts.map +0 -1
- package/dist/ui/prescription-manager.d.ts +0 -19
- package/dist/ui/prescription-manager.d.ts.map +0 -1
- package/dist/ui/presence-indicator.d.ts +0 -34
- package/dist/ui/presence-indicator.d.ts.map +0 -1
- package/dist/ui/price-display.d.ts +0 -36
- package/dist/ui/price-display.d.ts.map +0 -1
- package/dist/ui/pricing-calculator.d.ts +0 -34
- package/dist/ui/pricing-calculator.d.ts.map +0 -1
- package/dist/ui/privacy-toggle.d.ts +0 -34
- package/dist/ui/privacy-toggle.d.ts.map +0 -1
- package/dist/ui/process-diagram.d.ts +0 -34
- package/dist/ui/process-diagram.d.ts.map +0 -1
- package/dist/ui/process-steps.d.ts +0 -18
- package/dist/ui/process-steps.d.ts.map +0 -1
- package/dist/ui/procurement-form.d.ts +0 -19
- package/dist/ui/procurement-form.d.ts.map +0 -1
- package/dist/ui/product-card.d.ts +0 -49
- package/dist/ui/product-card.d.ts.map +0 -1
- package/dist/ui/production-line.d.ts +0 -19
- package/dist/ui/production-line.d.ts.map +0 -1
- package/dist/ui/profile-header.d.ts +0 -34
- package/dist/ui/profile-header.d.ts.map +0 -1
- package/dist/ui/profit-loss.d.ts +0 -34
- package/dist/ui/profit-loss.d.ts.map +0 -1
- package/dist/ui/progress-tracker.d.ts +0 -34
- package/dist/ui/progress-tracker.d.ts.map +0 -1
- package/dist/ui/project-board.d.ts +0 -19
- package/dist/ui/project-board.d.ts.map +0 -1
- package/dist/ui/project-timeline.d.ts +0 -19
- package/dist/ui/project-timeline.d.ts.map +0 -1
- package/dist/ui/property-card.d.ts +0 -34
- package/dist/ui/property-card.d.ts.map +0 -1
- package/dist/ui/property-compare.d.ts +0 -34
- package/dist/ui/property-compare.d.ts.map +0 -1
- package/dist/ui/property-gallery.d.ts +0 -34
- package/dist/ui/property-gallery.d.ts.map +0 -1
- package/dist/ui/property-map.d.ts +0 -34
- package/dist/ui/property-map.d.ts.map +0 -1
- package/dist/ui/property-search.d.ts +0 -34
- package/dist/ui/property-search.d.ts.map +0 -1
- package/dist/ui/public-notice.d.ts +0 -19
- package/dist/ui/public-notice.d.ts.map +0 -1
- package/dist/ui/pull-to-refresh.d.ts +0 -14
- package/dist/ui/pull-to-refresh.d.ts.map +0 -1
- package/dist/ui/qa-report.d.ts +0 -19
- package/dist/ui/qa-report.d.ts.map +0 -1
- package/dist/ui/qr-code-display.d.ts +0 -47
- package/dist/ui/qr-code-display.d.ts.map +0 -1
- package/dist/ui/quality-control.d.ts +0 -19
- package/dist/ui/quality-control.d.ts.map +0 -1
- package/dist/ui/quiz-builder.d.ts +0 -19
- package/dist/ui/quiz-builder.d.ts.map +0 -1
- package/dist/ui/quiz-card.d.ts +0 -34
- package/dist/ui/quiz-card.d.ts.map +0 -1
- package/dist/ui/quote-generator.d.ts +0 -19
- package/dist/ui/quote-generator.d.ts.map +0 -1
- package/dist/ui/radar-chart.d.ts +0 -34
- package/dist/ui/radar-chart.d.ts.map +0 -1
- package/dist/ui/radial-menu.d.ts +0 -34
- package/dist/ui/radial-menu.d.ts.map +0 -1
- package/dist/ui/radio-group.d.ts +0 -76
- package/dist/ui/radio-group.d.ts.map +0 -1
- package/dist/ui/rating-stars.d.ts +0 -48
- package/dist/ui/rating-stars.d.ts.map +0 -1
- package/dist/ui/rating.d.ts +0 -45
- package/dist/ui/rating.d.ts.map +0 -1
- package/dist/ui/reaction.d.ts +0 -42
- package/dist/ui/reaction.d.ts.map +0 -1
- package/dist/ui/receipt-template.d.ts +0 -34
- package/dist/ui/receipt-template.d.ts.map +0 -1
- package/dist/ui/recipe-card.d.ts +0 -34
- package/dist/ui/recipe-card.d.ts.map +0 -1
- package/dist/ui/recipe-rating.d.ts +0 -34
- package/dist/ui/recipe-rating.d.ts.map +0 -1
- package/dist/ui/recycling-tracker.d.ts +0 -19
- package/dist/ui/recycling-tracker.d.ts.map +0 -1
- package/dist/ui/regression-test.d.ts +0 -19
- package/dist/ui/regression-test.d.ts.map +0 -1
- package/dist/ui/relative-time.d.ts +0 -35
- package/dist/ui/relative-time.d.ts.map +0 -1
- package/dist/ui/rental-application.d.ts +0 -34
- package/dist/ui/rental-application.d.ts.map +0 -1
- package/dist/ui/reorder-point.d.ts +0 -19
- package/dist/ui/reorder-point.d.ts.map +0 -1
- package/dist/ui/report-builder.d.ts +0 -34
- package/dist/ui/report-builder.d.ts.map +0 -1
- package/dist/ui/resizable-panels.d.ts +0 -34
- package/dist/ui/resizable-panels.d.ts.map +0 -1
- package/dist/ui/resizable.d.ts +0 -63
- package/dist/ui/resizable.d.ts.map +0 -1
- package/dist/ui/resource-booking.d.ts +0 -34
- package/dist/ui/resource-booking.d.ts.map +0 -1
- package/dist/ui/restaurant-review.d.ts +0 -34
- package/dist/ui/restaurant-review.d.ts.map +0 -1
- package/dist/ui/review-card.d.ts +0 -34
- package/dist/ui/review-card.d.ts.map +0 -1
- package/dist/ui/risk-assessment.d.ts +0 -19
- package/dist/ui/risk-assessment.d.ts.map +0 -1
- package/dist/ui/role-manager.d.ts +0 -34
- package/dist/ui/role-manager.d.ts.map +0 -1
- package/dist/ui/route-display.d.ts +0 -34
- package/dist/ui/route-display.d.ts.map +0 -1
- package/dist/ui/route-optimizer.d.ts +0 -19
- package/dist/ui/route-optimizer.d.ts.map +0 -1
- package/dist/ui/rsvp-form.d.ts +0 -34
- package/dist/ui/rsvp-form.d.ts.map +0 -1
- package/dist/ui/safety-checklist.d.ts +0 -19
- package/dist/ui/safety-checklist.d.ts.map +0 -1
- package/dist/ui/sales-report.d.ts +0 -19
- package/dist/ui/sales-report.d.ts.map +0 -1
- package/dist/ui/sankey-diagram.d.ts +0 -34
- package/dist/ui/sankey-diagram.d.ts.map +0 -1
- package/dist/ui/scatter-plot.d.ts +0 -34
- package/dist/ui/scatter-plot.d.ts.map +0 -1
- package/dist/ui/schedule-timeline.d.ts +0 -34
- package/dist/ui/schedule-timeline.d.ts.map +0 -1
- package/dist/ui/schema-validator.d.ts +0 -34
- package/dist/ui/schema-validator.d.ts.map +0 -1
- package/dist/ui/score-board.d.ts +0 -19
- package/dist/ui/score-board.d.ts.map +0 -1
- package/dist/ui/score-display.d.ts +0 -34
- package/dist/ui/score-display.d.ts.map +0 -1
- package/dist/ui/scratch-card.d.ts +0 -34
- package/dist/ui/scratch-card.d.ts.map +0 -1
- package/dist/ui/screen-share.d.ts +0 -34
- package/dist/ui/screen-share.d.ts.map +0 -1
- package/dist/ui/search-bar.d.ts +0 -34
- package/dist/ui/search-bar.d.ts.map +0 -1
- package/dist/ui/seating-chart.d.ts +0 -34
- package/dist/ui/seating-chart.d.ts.map +0 -1
- package/dist/ui/security-badge.d.ts +0 -34
- package/dist/ui/security-badge.d.ts.map +0 -1
- package/dist/ui/sensor-reading.d.ts +0 -34
- package/dist/ui/sensor-reading.d.ts.map +0 -1
- package/dist/ui/sentiment-indicator.d.ts +0 -34
- package/dist/ui/sentiment-indicator.d.ts.map +0 -1
- package/dist/ui/settings-group.d.ts +0 -34
- package/dist/ui/settings-group.d.ts.map +0 -1
- package/dist/ui/share-buttons.d.ts +0 -37
- package/dist/ui/share-buttons.d.ts.map +0 -1
- package/dist/ui/shift-planner.d.ts +0 -34
- package/dist/ui/shift-planner.d.ts.map +0 -1
- package/dist/ui/shipment-tracker.d.ts +0 -19
- package/dist/ui/shipment-tracker.d.ts.map +0 -1
- package/dist/ui/show.d.ts +0 -32
- package/dist/ui/show.d.ts.map +0 -1
- package/dist/ui/signature-pad.d.ts +0 -9
- package/dist/ui/signature-pad.d.ts.map +0 -1
- package/dist/ui/signature-request.d.ts +0 -19
- package/dist/ui/signature-request.d.ts.map +0 -1
- package/dist/ui/skill-progress.d.ts +0 -34
- package/dist/ui/skill-progress.d.ts.map +0 -1
- package/dist/ui/sleep-tracker.d.ts +0 -34
- package/dist/ui/sleep-tracker.d.ts.map +0 -1
- package/dist/ui/slider-input.d.ts +0 -12
- package/dist/ui/slider-input.d.ts.map +0 -1
- package/dist/ui/slider.d.ts +0 -67
- package/dist/ui/slider.d.ts.map +0 -1
- package/dist/ui/sms-composer.d.ts +0 -19
- package/dist/ui/sms-composer.d.ts.map +0 -1
- package/dist/ui/social-feed.d.ts +0 -19
- package/dist/ui/social-feed.d.ts.map +0 -1
- package/dist/ui/sortable-grid.d.ts +0 -34
- package/dist/ui/sortable-grid.d.ts.map +0 -1
- package/dist/ui/sparkline.d.ts +0 -29
- package/dist/ui/sparkline.d.ts.map +0 -1
- package/dist/ui/speaker-card.d.ts +0 -34
- package/dist/ui/speaker-card.d.ts.map +0 -1
- package/dist/ui/spin-wheel.d.ts +0 -34
- package/dist/ui/spin-wheel.d.ts.map +0 -1
- package/dist/ui/sponsor-grid.d.ts +0 -34
- package/dist/ui/sponsor-grid.d.ts.map +0 -1
- package/dist/ui/spreadsheet-grid.d.ts +0 -34
- package/dist/ui/spreadsheet-grid.d.ts.map +0 -1
- package/dist/ui/sprint-planner.d.ts +0 -19
- package/dist/ui/sprint-planner.d.ts.map +0 -1
- package/dist/ui/stat-display.d.ts +0 -53
- package/dist/ui/stat-display.d.ts.map +0 -1
- package/dist/ui/status-badge.d.ts +0 -17
- package/dist/ui/status-badge.d.ts.map +0 -1
- package/dist/ui/status-indicator.d.ts +0 -10
- package/dist/ui/status-indicator.d.ts.map +0 -1
- package/dist/ui/status-pipeline.d.ts +0 -34
- package/dist/ui/status-pipeline.d.ts.map +0 -1
- package/dist/ui/step-counter.d.ts +0 -34
- package/dist/ui/step-counter.d.ts.map +0 -1
- package/dist/ui/step-indicator.d.ts +0 -58
- package/dist/ui/step-indicator.d.ts.map +0 -1
- package/dist/ui/stepper-nav.d.ts +0 -16
- package/dist/ui/stepper-nav.d.ts.map +0 -1
- package/dist/ui/stepper.d.ts +0 -57
- package/dist/ui/stepper.d.ts.map +0 -1
- package/dist/ui/sticky-note.d.ts +0 -34
- package/dist/ui/sticky-note.d.ts.map +0 -1
- package/dist/ui/stock-level.d.ts +0 -19
- package/dist/ui/stock-level.d.ts.map +0 -1
- package/dist/ui/stock-ticker.d.ts +0 -34
- package/dist/ui/stock-ticker.d.ts.map +0 -1
- package/dist/ui/streaming-stats.d.ts +0 -19
- package/dist/ui/streaming-stats.d.ts.map +0 -1
- package/dist/ui/subscriber-list.d.ts +0 -19
- package/dist/ui/subscriber-list.d.ts.map +0 -1
- package/dist/ui/subscription-plan.d.ts +0 -34
- package/dist/ui/subscription-plan.d.ts.map +0 -1
- package/dist/ui/supplier-card.d.ts +0 -19
- package/dist/ui/supplier-card.d.ts.map +0 -1
- package/dist/ui/support-dashboard.d.ts +0 -19
- package/dist/ui/support-dashboard.d.ts.map +0 -1
- package/dist/ui/survey-builder.d.ts +0 -34
- package/dist/ui/survey-builder.d.ts.map +0 -1
- package/dist/ui/sustainability-score.d.ts +0 -19
- package/dist/ui/sustainability-score.d.ts.map +0 -1
- package/dist/ui/swipe-actions.d.ts +0 -34
- package/dist/ui/swipe-actions.d.ts.map +0 -1
- package/dist/ui/system-status-indicator.d.ts +0 -22
- package/dist/ui/system-status-indicator.d.ts.map +0 -1
- package/dist/ui/system-status.d.ts +0 -34
- package/dist/ui/system-status.d.ts.map +0 -1
- package/dist/ui/table-of-contents.d.ts +0 -19
- package/dist/ui/table-of-contents.d.ts.map +0 -1
- package/dist/ui/table-reservation.d.ts +0 -34
- package/dist/ui/table-reservation.d.ts.map +0 -1
- package/dist/ui/tag-input.d.ts +0 -50
- package/dist/ui/tag-input.d.ts.map +0 -1
- package/dist/ui/tag.d.ts +0 -41
- package/dist/ui/tag.d.ts.map +0 -1
- package/dist/ui/task-board.d.ts +0 -19
- package/dist/ui/task-board.d.ts.map +0 -1
- package/dist/ui/task-dependency.d.ts +0 -34
- package/dist/ui/task-dependency.d.ts.map +0 -1
- package/dist/ui/tax-calculator.d.ts +0 -34
- package/dist/ui/tax-calculator.d.ts.map +0 -1
- package/dist/ui/team-management.d.ts +0 -19
- package/dist/ui/team-management.d.ts.map +0 -1
- package/dist/ui/team-roster.d.ts +0 -19
- package/dist/ui/team-roster.d.ts.map +0 -1
- package/dist/ui/telemetry-chart.d.ts +0 -34
- package/dist/ui/telemetry-chart.d.ts.map +0 -1
- package/dist/ui/test-case.d.ts +0 -19
- package/dist/ui/test-case.d.ts.map +0 -1
- package/dist/ui/test-result.d.ts +0 -34
- package/dist/ui/test-result.d.ts.map +0 -1
- package/dist/ui/test-runner.d.ts +0 -34
- package/dist/ui/test-runner.d.ts.map +0 -1
- package/dist/ui/testimonial-slider.d.ts +0 -34
- package/dist/ui/testimonial-slider.d.ts.map +0 -1
- package/dist/ui/theme-switcher.d.ts +0 -34
- package/dist/ui/theme-switcher.d.ts.map +0 -1
- package/dist/ui/ticket-selector.d.ts +0 -34
- package/dist/ui/ticket-selector.d.ts.map +0 -1
- package/dist/ui/ticket-system.d.ts +0 -19
- package/dist/ui/ticket-system.d.ts.map +0 -1
- package/dist/ui/tide-chart.d.ts +0 -19
- package/dist/ui/tide-chart.d.ts.map +0 -1
- package/dist/ui/time-slot-picker.d.ts +0 -34
- package/dist/ui/time-slot-picker.d.ts.map +0 -1
- package/dist/ui/time-tracker.d.ts +0 -34
- package/dist/ui/time-tracker.d.ts.map +0 -1
- package/dist/ui/timeline-gantt.d.ts +0 -34
- package/dist/ui/timeline-gantt.d.ts.map +0 -1
- package/dist/ui/timeline-vertical.d.ts +0 -40
- package/dist/ui/timeline-vertical.d.ts.map +0 -1
- package/dist/ui/timeline.d.ts +0 -51
- package/dist/ui/timeline.d.ts.map +0 -1
- package/dist/ui/timesheet-entry.d.ts +0 -34
- package/dist/ui/timesheet-entry.d.ts.map +0 -1
- package/dist/ui/toast-notification.d.ts +0 -10
- package/dist/ui/toast-notification.d.ts.map +0 -1
- package/dist/ui/toggle-group.d.ts +0 -63
- package/dist/ui/toggle-group.d.ts.map +0 -1
- package/dist/ui/token-swap.d.ts +0 -34
- package/dist/ui/token-swap.d.ts.map +0 -1
- package/dist/ui/tour-package.d.ts +0 -34
- package/dist/ui/tour-package.d.ts.map +0 -1
- package/dist/ui/tournament-bracket.d.ts +0 -19
- package/dist/ui/tournament-bracket.d.ts.map +0 -1
- package/dist/ui/training-progress.d.ts +0 -34
- package/dist/ui/training-progress.d.ts.map +0 -1
- package/dist/ui/transaction-history.d.ts +0 -19
- package/dist/ui/transaction-history.d.ts.map +0 -1
- package/dist/ui/travel-checklist.d.ts +0 -34
- package/dist/ui/travel-checklist.d.ts.map +0 -1
- package/dist/ui/travel-map.d.ts +0 -34
- package/dist/ui/travel-map.d.ts.map +0 -1
- package/dist/ui/travel-tips.d.ts +0 -34
- package/dist/ui/travel-tips.d.ts.map +0 -1
- package/dist/ui/tree-map.d.ts +0 -34
- package/dist/ui/tree-map.d.ts.map +0 -1
- package/dist/ui/trend-indicator.d.ts +0 -47
- package/dist/ui/trend-indicator.d.ts.map +0 -1
- package/dist/ui/trip-meter.d.ts +0 -19
- package/dist/ui/trip-meter.d.ts.map +0 -1
- package/dist/ui/trip-planner.d.ts +0 -34
- package/dist/ui/trip-planner.d.ts.map +0 -1
- package/dist/ui/twitter-embed.d.ts +0 -19
- package/dist/ui/twitter-embed.d.ts.map +0 -1
- package/dist/ui/two-factor-input.d.ts +0 -34
- package/dist/ui/two-factor-input.d.ts.map +0 -1
- package/dist/ui/typing-indicator-msg.d.ts +0 -34
- package/dist/ui/typing-indicator-msg.d.ts.map +0 -1
- package/dist/ui/typing-indicator.d.ts +0 -23
- package/dist/ui/typing-indicator.d.ts.map +0 -1
- package/dist/ui/typography.d.ts +0 -50
- package/dist/ui/typography.d.ts.map +0 -1
- package/dist/ui/upload-progress.d.ts +0 -34
- package/dist/ui/upload-progress.d.ts.map +0 -1
- package/dist/ui/usage-forecast.d.ts +0 -19
- package/dist/ui/usage-forecast.d.ts.map +0 -1
- package/dist/ui/use-case-grid.d.ts +0 -17
- package/dist/ui/use-case-grid.d.ts.map +0 -1
- package/dist/ui/user-mention.d.ts +0 -43
- package/dist/ui/user-mention.d.ts.map +0 -1
- package/dist/ui/user-table.d.ts +0 -34
- package/dist/ui/user-table.d.ts.map +0 -1
- package/dist/ui/vacation-planner.d.ts +0 -34
- package/dist/ui/vacation-planner.d.ts.map +0 -1
- package/dist/ui/vehicle-status.d.ts +0 -19
- package/dist/ui/vehicle-status.d.ts.map +0 -1
- package/dist/ui/vessel-tracker.d.ts +0 -19
- package/dist/ui/vessel-tracker.d.ts.map +0 -1
- package/dist/ui/video-call.d.ts +0 -34
- package/dist/ui/video-call.d.ts.map +0 -1
- package/dist/ui/video-editor.d.ts +0 -19
- package/dist/ui/video-editor.d.ts.map +0 -1
- package/dist/ui/video-player.d.ts +0 -35
- package/dist/ui/video-player.d.ts.map +0 -1
- package/dist/ui/video-thumbnail.d.ts +0 -34
- package/dist/ui/video-thumbnail.d.ts.map +0 -1
- package/dist/ui/virtual-tour.d.ts +0 -34
- package/dist/ui/virtual-tour.d.ts.map +0 -1
- package/dist/ui/vital-signs.d.ts +0 -19
- package/dist/ui/vital-signs.d.ts.map +0 -1
- package/dist/ui/voice-recorder.d.ts +0 -34
- package/dist/ui/voice-recorder.d.ts.map +0 -1
- package/dist/ui/voip-phone.d.ts +0 -19
- package/dist/ui/voip-phone.d.ts.map +0 -1
- package/dist/ui/volunteer-schedule.d.ts +0 -19
- package/dist/ui/volunteer-schedule.d.ts.map +0 -1
- package/dist/ui/voter-registration.d.ts +0 -19
- package/dist/ui/voter-registration.d.ts.map +0 -1
- package/dist/ui/wallet-connect.d.ts +0 -34
- package/dist/ui/wallet-connect.d.ts.map +0 -1
- package/dist/ui/wallet-icon.d.ts +0 -13
- package/dist/ui/wallet-icon.d.ts.map +0 -1
- package/dist/ui/wallet-selection.d.ts +0 -49
- package/dist/ui/wallet-selection.d.ts.map +0 -1
- package/dist/ui/warehouse-map.d.ts +0 -19
- package/dist/ui/warehouse-map.d.ts.map +0 -1
- package/dist/ui/water-intake.d.ts +0 -34
- package/dist/ui/water-intake.d.ts.map +0 -1
- package/dist/ui/water-meter.d.ts +0 -19
- package/dist/ui/water-meter.d.ts.map +0 -1
- package/dist/ui/wave-form.d.ts +0 -34
- package/dist/ui/wave-form.d.ts.map +0 -1
- package/dist/ui/weather-forecast.d.ts +0 -34
- package/dist/ui/weather-forecast.d.ts.map +0 -1
- package/dist/ui/weather-station.d.ts +0 -19
- package/dist/ui/weather-station.d.ts.map +0 -1
- package/dist/ui/webhook-logger.d.ts +0 -34
- package/dist/ui/webhook-logger.d.ts.map +0 -1
- package/dist/ui/weight-chart.d.ts +0 -34
- package/dist/ui/weight-chart.d.ts.map +0 -1
- package/dist/ui/welcome-screen.d.ts +0 -34
- package/dist/ui/welcome-screen.d.ts.map +0 -1
- package/dist/ui/whiteboard.d.ts +0 -34
- package/dist/ui/whiteboard.d.ts.map +0 -1
- package/dist/ui/work-calendar.d.ts +0 -34
- package/dist/ui/work-calendar.d.ts.map +0 -1
- package/dist/ui/workflow-builder.d.ts +0 -34
- package/dist/ui/workflow-builder.d.ts.map +0 -1
- package/dist/ui/workflow-template.d.ts +0 -34
- package/dist/ui/workflow-template.d.ts.map +0 -1
- package/dist/ui/workout-log.d.ts +0 -34
- package/dist/ui/workout-log.d.ts.map +0 -1
- package/dist/ui/workout-planner.d.ts +0 -19
- package/dist/ui/workout-planner.d.ts.map +0 -1
- package/dist/ui/wysiwyg-editor.d.ts +0 -9
- package/dist/ui/wysiwyg-editor.d.ts.map +0 -1
- package/dist/ui/xml-parser.d.ts +0 -34
- package/dist/ui/xml-parser.d.ts.map +0 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(d,ce){typeof exports=="object"&&typeof module<"u"?ce(exports,require("clsx"),require("tailwind-merge"),require("react/jsx-runtime"),require("react"),require("class-variance-authority"),require("react-dom"),require("@heroicons/react/24/outline"),require("@heroicons/react/24/solid"),require("@radix-ui/react-label"),require("@radix-ui/react-switch"),require("@radix-ui/react-select"),require("lucide-react"),require("@radix-ui/react-slot"),require("react-router-dom"),require("@radix-ui/react-tabs"),require("react-i18next"),require("react-helmet-async"),require("web-vitals")):typeof define=="function"&&define.amd?define(["exports","clsx","tailwind-merge","react/jsx-runtime","react","class-variance-authority","react-dom","@heroicons/react/24/outline","@heroicons/react/24/solid","@radix-ui/react-label","@radix-ui/react-switch","@radix-ui/react-select","lucide-react","@radix-ui/react-slot","react-router-dom","@radix-ui/react-tabs","react-i18next","react-helmet-async","web-vitals"],ce):(d=typeof globalThis<"u"?globalThis:d||self,ce(d.MailBoxComponents={},d.clsx,d.tailwindMerge,d.ReactJSXRuntime,d.React,d.cva,d.ReactDOM,d.HeroiconsOutline,d.HeroiconsSolid,d.RadixLabel,d.RadixSwitch,d.RadixSelect,d.LucideReact,d.RadixSlot,d.ReactRouterDOM,d.RadixTabs,d.ReactI18next,d.ReactHelmetAsync,d.WebVitals))})(this,(function(d,ce,ft,r,y,V,gr,U,R,xe,oe,pt,X,yt,Ue,H,ur,mt,ge){"use strict";function hr(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const O=hr(y),B=hr(pt);function u(...t){return ft.twMerge(ce.clsx(t))}const br=({children:t,as:e="div",p:a,px:o,py:n,m:s,mx:l,my:g,bg:c,border:i=!1,rounded:h,shadow:b,w:x,h:m,className:f})=>{const p={none:"0",xs:"1",sm:"2",md:"4",lg:"6",xl:"8","2xl":"12",auto:"auto"},C=c?{transparent:"bg-transparent",white:"bg-white dark:bg-gray-900",gray:"bg-gray-100 dark:bg-gray-800",primary:"bg-blue-50 dark:bg-blue-900/20",success:"bg-green-50 dark:bg-green-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",danger:"bg-red-50 dark:bg-red-900/20"}[c]:"",S=h?{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}[h]:"",k=b?{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl"}[b]:"",N=x?{auto:"w-auto",full:"w-full",screen:"w-screen",min:"w-min",max:"w-max"}[x]:"",v=m?{auto:"h-auto",full:"h-full",screen:"h-screen",min:"h-min",max:"h-max"}[m]:"",w=[];a&&w.push("p-"+p[a]),o&&w.push("px-"+p[o]),n&&w.push("py-"+p[n]);const L=[];return s&&L.push("m-"+p[s]),l&&L.push("mx-"+p[l]),g&&L.push("my-"+p[g]),r.jsx(e,{className:u(...w,...L,C,i&&"border border-gray-200 dark:border-gray-700",S,k,N,v,f),children:t})},vt=({direction:t="row",align:e,justify:a,wrap:o="nowrap",gap:n,inline:s=!1,className:l,...g})=>{const c={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},i=e?{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"}[e]:"",h=a?{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}[a]:"",b={nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},x=n?{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"}[n]:"";return r.jsx(br,{...g,className:u(s?"inline-flex":"flex",c[t],i,h,b[o],x,l)})},xt={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},kt={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},wt={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},Ct={wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},Nt={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},St=({children:t,direction:e="row",align:a="start",justify:o="start",wrap:n="nowrap",gap:s="0",className:l})=>r.jsx("div",{className:u("flex",xt[e],kt[a],wt[o],Ct[n],Nt[s],l),children:t}),Et=({children:t,size:e="xl",center:a=!0,padding:o="md",className:n})=>{const s={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},l={none:"",sm:"px-4 py-2",md:"px-6 py-4",lg:"px-8 py-6"};return r.jsx("div",{className:u("w-full",s[e],a&&"mx-auto",l[o],n),children:t})},Lt=({children:t,cols:e=1,gap:a="md",autoFit:o,autoFill:n,alignItems:s="stretch",justifyItems:l="stretch",className:g})=>{const c={none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},i={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},h={start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"},b=()=>{if(o||n)return"";if(typeof e=="number")return{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"}[e]||"grid-cols-1";const m=[];return e.sm&&m.push("grid-cols-"+e.sm),e.md&&m.push("md:grid-cols-"+e.md),e.lg&&m.push("lg:grid-cols-"+e.lg),e.xl&&m.push("xl:grid-cols-"+e.xl),m.join(" ")};let x;return o?x="repeat(auto-fit, minmax("+o+", 1fr))":n&&(x="repeat(auto-fill, minmax("+n+", 1fr))"),r.jsx("div",{className:u("grid",b(),c[a],i[s],h[l],g),style:x?{gridTemplateColumns:x}:void 0,children:t})},Te=({children:t,direction:e="vertical",spacing:a="md",align:o="stretch",justify:n="start",wrap:s=!1,full:l=!1,divider:g=!1,className:c})=>{const i=e==="vertical",h={vertical:{none:"",xs:"space-y-1",sm:"space-y-2",md:"space-y-4",lg:"space-y-6",xl:"space-y-8","2xl":"space-y-12"},horizontal:{none:"",xs:"space-x-1",sm:"space-x-2",md:"space-x-4",lg:"space-x-6",xl:"space-x-8","2xl":"space-x-12"}},b={vertical:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},horizontal:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"}},x={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},m={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return r.jsx("div",{className:u("flex",i?"flex-col":"flex-row",g?b[e][a]:h[e][a],x[o],m[n],s&&"flex-wrap",l&&(i?"h-full":"w-full"),c),children:g?y.Children.map(t,(f,p)=>r.jsxs(y.Fragment,{children:[f,p<y.Children.count(t)-1&&r.jsx("div",{className:u("bg-gray-200 dark:bg-gray-700",i?"h-px w-full":"w-px h-full")})]},p)):t})},It=t=>r.jsx(Te,{direction:"vertical",...t}),Mt=t=>r.jsx(Te,{direction:"horizontal",...t}),$t=({children:t,axis:e="both",inline:a=!1,className:o})=>{const n=()=>{switch(e){case"horizontal":return"justify-center";case"vertical":return"items-center";case"both":default:return"justify-center items-center"}};return r.jsx("div",{className:u(a?"inline-flex":"flex",n(),o),children:t})},Ut=({size:t="md",axis:e="vertical",flex:a=!1,className:o})=>{const n={vertical:{xs:"h-1",sm:"h-2",md:"h-4",lg:"h-6",xl:"h-8","2xl":"h-12"},horizontal:{xs:"w-1",sm:"w-2",md:"w-4",lg:"w-6",xl:"w-8","2xl":"w-12"}},s=typeof t=="number"?e==="vertical"?{height:`${t}px`}:{width:`${t}px`}:void 0,l=typeof t=="string"?n[e][t]:"";return r.jsx("div",{className:u(a&&"flex-1",!a&&l,o),style:s,"aria-hidden":"true"})},Tt=V.cva("",{variants:{variant:{default:"",hero:"relative overflow-hidden",feature:"bg-white dark:bg-gray-800",cta:"relative overflow-hidden",testimonial:"bg-gray-50 dark:bg-gray-900",footer:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border-t"},spacing:{none:"",xs:"py-2",sm:"py-3",md:"py-4",lg:"py-6",xl:"py-8","2xl":"py-12","3xl":"py-16","4xl":"py-20","5xl":"py-24"},background:{none:"bg-transparent",default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/50 dark:to-purple-900/50","gradient-primary":"bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-blue-900/50 dark:to-indigo-900/50","gradient-secondary":"bg-gradient-to-br from-green-50 to-blue-100 dark:from-green-900/50 dark:to-blue-900/50","gradient-tertiary":"bg-gradient-to-r from-emerald-50 to-teal-50 dark:from-gray-800 dark:to-gray-900","gradient-vibrant":"bg-gradient-to-br from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"}},defaultVariants:{variant:"default",spacing:"3xl",background:"none"}}),At=({children:t,variant:e="default",spacing:a="3xl",background:o="none",className:n,as:s="section",id:l})=>y.createElement(s,{id:l,className:u(Tt({variant:e,spacing:a,background:o}),n)},t),Pt=V.cva("min-h-screen flex flex-col",{variants:{background:{default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",transparent:"bg-transparent",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/20 dark:to-purple-900/20"},overflow:{visible:"overflow-visible",hidden:"overflow-hidden",scroll:"overflow-auto"}},defaultVariants:{background:"default",overflow:"visible"}}),zt=({children:t,background:e="default",overflow:a="visible",className:o})=>r.jsx("div",{className:u(Pt({background:e,overflow:a}),o),children:t}),Dt=({children:t,ratio:e="16/9",className:a})=>{const s=`${1/(typeof e=="string"?{"16/9":1.7777777777777777,"4/3":1.3333333333333333,"1/1":1,"21/9":2.3333333333333335,"3/2":1.5}[e]:e)*100}%`;return r.jsx("div",{className:u("relative w-full",a),style:{paddingBottom:s},children:r.jsx("div",{className:"absolute inset-0",children:t})})},E={typography:{family:{sans:"font-sans",display:"font-sans",body:"font-sans"},semantic:{caption:"text-xs",small:"text-sm",body:"text-base",bodyLarge:"text-lg",h6:"text-base",h5:"text-lg",h4:"text-xl",h3:"text-2xl",h2:"text-3xl",h1:"text-4xl",hero:"text-8xl"},weight:{semibold:"font-semibold",bold:"font-bold",body:"font-normal",emphasis:"font-medium",strong:"font-semibold",heading:"font-bold",display:"font-extrabold"},decoration:{none:"no-underline",underline:"underline"},underlineOffset:{medium:"underline-offset-2"},leading:{tight:"leading-tight",heading:"leading-tight",body:"leading-relaxed",caption:"leading-normal",display:"leading-none"},tracking:{heading:"tracking-tight",body:"tracking-normal",caption:"tracking-normal",uppercase:"tracking-wider"},transform:{uppercase:"uppercase"}}},T={heading:{display:{hero:()=>`${E.typography.family.display} ${E.typography.semantic.hero} ${E.typography.weight.display} ${E.typography.leading.display} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,xl:()=>`${E.typography.family.display} text-7xl ${E.typography.weight.display} ${E.typography.leading.display} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,lg:()=>`${E.typography.family.display} text-6xl ${E.typography.weight.bold} ${E.typography.leading.display} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,md:()=>`${E.typography.family.display} text-5xl ${E.typography.weight.bold} ${E.typography.leading.tight} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,sm:()=>`${E.typography.family.display} text-4xl ${E.typography.weight.bold} ${E.typography.leading.tight} ${E.typography.tracking.heading} text-gray-900 dark:text-white`},h1:()=>`${E.typography.family.sans} ${E.typography.semantic.h1} ${E.typography.weight.heading} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${E.typography.family.sans} ${E.typography.semantic.h2} ${E.typography.weight.heading} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${E.typography.family.sans} ${E.typography.semantic.h3} ${E.typography.weight.heading} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h4:()=>`${E.typography.family.sans} ${E.typography.semantic.h4} ${E.typography.weight.semibold} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h5:()=>`${E.typography.family.sans} ${E.typography.semantic.h5} ${E.typography.weight.semibold} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h6:()=>`${E.typography.family.sans} ${E.typography.semantic.h6} ${E.typography.weight.semibold} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,responsive:{h1:()=>`${E.typography.family.sans} text-2xl sm:text-3xl md:text-4xl lg:text-5xl ${E.typography.weight.heading} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${E.typography.family.sans} text-xl sm:text-2xl md:text-3xl lg:text-4xl ${E.typography.weight.heading} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${E.typography.family.sans} text-lg sm:text-xl md:text-2xl lg:text-3xl ${E.typography.weight.semibold} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,display:()=>`${E.typography.family.display} text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl ${E.typography.weight.display} ${E.typography.leading.display} ${E.typography.tracking.heading} text-gray-900 dark:text-white`}},body:{xl:()=>`${E.typography.family.body} ${E.typography.semantic.bodyLarge} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-700 dark:text-gray-300`,lg:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-700 dark:text-gray-300`,md:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-700 dark:text-gray-300`,sm:()=>`${E.typography.family.body} ${E.typography.semantic.small} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`,xs:()=>`${E.typography.family.body} ${E.typography.semantic.caption} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`,strong:{xl:()=>`${E.typography.family.body} ${E.typography.semantic.bodyLarge} ${E.typography.weight.strong} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.strong} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.strong} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${E.typography.family.body} ${E.typography.semantic.small} ${E.typography.weight.strong} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`},emphasis:{xl:()=>`${E.typography.family.body} ${E.typography.semantic.bodyLarge} ${E.typography.weight.emphasis} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.emphasis} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.emphasis} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${E.typography.family.body} ${E.typography.semantic.small} ${E.typography.weight.emphasis} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`},muted:{xl:()=>`${E.typography.family.body} ${E.typography.semantic.bodyLarge} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`,lg:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`,md:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`,sm:()=>`${E.typography.family.body} ${E.typography.semantic.small} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`}},caption:{default:()=>`${E.typography.family.body} ${E.typography.semantic.caption} ${E.typography.weight.body} ${E.typography.leading.caption} ${E.typography.tracking.caption} text-gray-500 dark:text-gray-500`,emphasis:()=>`${E.typography.family.body} ${E.typography.semantic.caption} ${E.typography.weight.emphasis} ${E.typography.leading.caption} ${E.typography.tracking.caption} text-gray-600 dark:text-gray-400`,uppercase:()=>`${E.typography.family.body} ${E.typography.semantic.caption} ${E.typography.weight.emphasis} ${E.typography.leading.caption} ${E.typography.tracking.uppercase} ${E.typography.transform.uppercase} text-gray-500 dark:text-gray-500`},link:{default:()=>`${E.typography.decoration.underline} ${E.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150`,subtle:()=>`${E.typography.decoration.none} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:${E.typography.decoration.underline} hover:${E.typography.underlineOffset.medium} transition-all duration-150`,muted:()=>`${E.typography.decoration.underline} ${E.typography.underlineOffset.medium} text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors duration-150`,external:()=>`${E.typography.decoration.underline} ${E.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150 inline-flex items-center gap-1`},label:{default:()=>`${E.typography.family.body} text-sm ${E.typography.weight.emphasis} text-gray-900 dark:text-white`,required:()=>`${E.typography.family.body} text-sm ${E.typography.weight.emphasis} text-gray-900 dark:text-white after:content-['*'] after:ml-0.5 after:text-red-500`,optional:()=>`${E.typography.family.body} text-sm ${E.typography.weight.body} text-gray-600 dark:text-gray-400`,helper:()=>`${E.typography.family.body} text-sm ${E.typography.weight.body} text-gray-500 dark:text-gray-500`,error:()=>`${E.typography.family.body} text-sm ${E.typography.weight.body} text-red-600 dark:text-red-400`,success:()=>`${E.typography.family.body} text-sm ${E.typography.weight.body} text-green-600 dark:text-green-400`}},D={button:{primary:{default:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",fullWidth:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 flex items-center justify-center w-full rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},secondary:{default:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},outline:{default:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},destructive:{default:()=>"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 border-transparent focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-red-600 dark:hover:bg-red-700 dark:active:bg-red-800 dark:text-white inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",outline:()=>"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border border-red-300 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:hover:bg-red-900/20 dark:text-red-400 dark:border-red-800 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 border-transparent focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-red-600 dark:hover:bg-red-700 dark:active:bg-red-800 dark:text-white inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8"},ghost:{default:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md px-2 py-1 text-xs font-medium transition-colors duration-200 h-8",icon:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md p-2 transition-colors duration-200 h-10 w-10"},link:{default:()=>"bg-transparent hover:bg-transparent active:bg-transparent text-blue-600 border-transparent underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:no-underline dark:text-blue-400 inline-flex items-center justify-center rounded-md px-0 py-0 text-sm font-medium transition-colors duration-200",muted:()=>"bg-transparent hover:bg-transparent active:bg-transparent text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 border-transparent underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:no-underline inline-flex items-center justify-center rounded-md px-0 py-0 text-sm font-medium transition-colors duration-200"},gradient:{primary:()=>"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",secondary:()=>"bg-gradient-to-r from-gray-100 to-gray-200 hover:from-gray-200 hover:to-gray-300 text-gray-900 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",success:()=>"bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-green-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200"},web3:{wallet:()=>"bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-900 dark:text-gray-100 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",connect:()=>"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",disconnect:()=>"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border border-red-300 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:hover:bg-red-900/20 dark:text-red-400 dark:border-red-800 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"}},badge:{default:()=>"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",primary:()=>"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",success:()=>"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",warning:()=>"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",error:()=>"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",ethereum:()=>"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",solana:()=>"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",small:(t="default")=>{const e={default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",error:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};return`${e[t]||e.default} inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium`},large:(t="default")=>{const e={default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",error:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};return`${e[t]||e.default} inline-flex items-center px-3 py-1 rounded-full text-sm font-medium`}},input:{default:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",search:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",error:()=>"bg-gray-50 dark:bg-gray-800 border-red-300 dark:border-red-700 text-gray-900 dark:text-gray-100 focus:border-red-500 focus:ring-red-500 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",small:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-2 py-1.5 text-xs placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",large:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-4 py-3 text-base placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",withIcon:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md pl-10 pr-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2"},alert:{info:()=>"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded-md border p-4 flex items-start gap-3",success:()=>"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded-md border p-4 flex items-start gap-3",warning:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3",attention:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3",error:()=>"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded-md border p-4 flex items-start gap-3",compact:{info:()=>"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded border px-3 py-2 text-sm",success:()=>"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded border px-3 py-2 text-sm",warning:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm",attention:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm",error:()=>"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded border px-3 py-2 text-sm"}},navigation:{tabs:{root:()=>"",list:()=>"inline-flex h-10 items-center justify-center rounded-md bg-gray-100 dark:bg-gray-800 p-1 text-gray-500 dark:text-gray-400",listUnderlined:()=>"flex border-b border-gray-200 dark:border-gray-700",listPills:()=>"flex space-x-1 bg-gray-100 dark:bg-gray-800 rounded-lg p-1",trigger:()=>"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-gray-950 data-[state=active]:shadow-sm dark:ring-offset-gray-950 dark:focus-visible:ring-blue-400 dark:data-[state=active]:bg-gray-950 dark:data-[state=active]:text-gray-50",triggerUnderlined:()=>"inline-flex items-center justify-center whitespace-nowrap px-4 py-2 text-sm font-medium text-gray-500 dark:text-gray-400 border-b-2 border-transparent hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-600 focus:outline-none focus:text-blue-600 focus:border-blue-600 dark:focus:text-blue-400 dark:focus:border-blue-400 data-[state=active]:text-blue-600 data-[state=active]:border-blue-600 dark:data-[state=active]:text-blue-400 dark:data-[state=active]:border-blue-400 transition-colors",triggerPills:()=>"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-white dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 data-[state=active]:bg-white data-[state=active]:text-gray-900 data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-700 dark:data-[state=active]:text-gray-100 transition-all",content:()=>"mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 dark:ring-offset-gray-950 dark:focus-visible:ring-blue-400"}},icon:{variant:{default:{xs:()=>"h-3 w-3 text-gray-500 dark:text-gray-400",sm:()=>"h-4 w-4 text-gray-500 dark:text-gray-400",md:()=>"h-5 w-5 text-gray-500 dark:text-gray-400",lg:()=>"h-6 w-6 text-gray-500 dark:text-gray-400",xl:()=>"h-8 w-8 text-gray-500 dark:text-gray-400"},success:{xs:()=>"h-3 w-3 text-green-600 dark:text-green-400",sm:()=>"h-4 w-4 text-green-600 dark:text-green-400",md:()=>"h-5 w-5 text-green-600 dark:text-green-400",lg:()=>"h-6 w-6 text-green-600 dark:text-green-400",xl:()=>"h-8 w-8 text-green-600 dark:text-green-400"},warning:{xs:()=>"h-3 w-3 text-amber-600 dark:text-amber-400",sm:()=>"h-4 w-4 text-amber-600 dark:text-amber-400",md:()=>"h-5 w-5 text-amber-600 dark:text-amber-400",lg:()=>"h-6 w-6 text-amber-600 dark:text-amber-400",xl:()=>"h-8 w-8 text-amber-600 dark:text-amber-400"},error:{xs:()=>"h-3 w-3 text-red-600 dark:text-red-400",sm:()=>"h-4 w-4 text-red-600 dark:text-red-400",md:()=>"h-5 w-5 text-red-600 dark:text-red-400",lg:()=>"h-6 w-6 text-red-600 dark:text-red-400",xl:()=>"h-8 w-8 text-red-600 dark:text-red-400"},muted:{xs:()=>"h-3 w-3 text-gray-400 dark:text-gray-500",sm:()=>"h-4 w-4 text-gray-400 dark:text-gray-500",md:()=>"h-5 w-5 text-gray-400 dark:text-gray-500",lg:()=>"h-6 w-6 text-gray-400 dark:text-gray-500",xl:()=>"h-8 w-8 text-gray-400 dark:text-gray-500"}}},overlays:{modal:{backdrop:()=>"fixed inset-0 z-40 bg-black/50 dark:bg-black/70 backdrop-blur-sm transition-all duration-300 ease-out",backdropEntering:()=>"opacity-0",backdropEntered:()=>"opacity-100",backdropExiting:()=>"opacity-0",container:()=>"fixed inset-0 z-50 flex items-center justify-center p-4 transition-all duration-300 ease-out",containerEntering:()=>"opacity-0 scale-95",containerEntered:()=>"opacity-100 scale-100",containerExiting:()=>"opacity-0 scale-95",content:()=>"relative w-full max-w-lg bg-white dark:bg-gray-900 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 max-h-[80vh] overflow-hidden",small:()=>"max-w-sm",medium:()=>"max-w-lg",large:()=>"max-w-2xl",extraLarge:()=>"max-w-4xl",fullWidth:()=>"max-w-[95vw]",header:()=>"flex items-center justify-between p-4 sm:p-6 border-b border-gray-200 dark:border-gray-700",title:()=>"text-lg font-semibold text-gray-900 dark:text-gray-100",closeButton:()=>"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors",body:()=>"p-4 sm:p-6 overflow-y-auto",footer:()=>"flex items-center justify-end space-x-3 p-4 sm:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50"},dropdown:{container:()=>"relative inline-block",trigger:()=>"inline-flex justify-center items-center bg-transparent border-0 text-gray-900 dark:text-gray-100 focus:outline-none transition-colors",triggerBordered:()=>"inline-flex justify-center items-center bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors",menu:()=>"absolute z-50 w-56 bg-white dark:bg-gray-800 rounded-md shadow-lg focus:outline-none transition-all duration-200",menuSmall:()=>"w-40",menuLarge:()=>"w-72",menuAuto:()=>"w-auto min-w-40",menuTop:()=>"bottom-full mb-1",menuBottom:()=>"top-full mt-1",menuLeft:()=>"right-0",menuRight:()=>"left-0",menuEntering:()=>"opacity-0 scale-95 transform origin-top",menuEntered:()=>"opacity-100 scale-100 transform origin-top",menuExiting:()=>"opacity-0 scale-95 transform origin-top",itemContainer:()=>"py-1 px-1",item:()=>"flex items-center w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-blue-50 dark:hover:bg-blue-900/20 hover:text-blue-700 dark:hover:text-blue-300 transition-all duration-200 cursor-pointer hover:shadow-sm rounded-sm",itemActive:()=>"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 shadow-sm",itemDisabled:()=>"text-gray-400 dark:text-gray-600 cursor-not-allowed hover:bg-transparent hover:text-gray-400 dark:hover:text-gray-600",divider:()=>"my-1 border-t border-gray-200 dark:border-gray-700",header:()=>"px-4 py-2 text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide",itemIcon:()=>"mr-3 h-4 w-4 flex-shrink-0",itemIconRight:()=>"ml-auto h-4 w-4 flex-shrink-0"}}},jt={success:"bg-green-500",error:"bg-red-500",warning:"bg-orange-500",attention:"bg-amber-500",info:"bg-blue-500",neutral:"bg-gray-500"};function ne(t){return jt[t]}const Bt={default:"bg-white dark:bg-gray-800",bordered:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700",elevated:"bg-white dark:bg-gray-800 shadow-md",info:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 text-blue-900 dark:text-blue-300",success:"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 text-green-900 dark:text-green-300",warning:"bg-orange-50 dark:bg-orange-900/20 border border-orange-200 dark:border-orange-800 text-orange-900 dark:text-orange-300",attention:"bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 text-amber-900 dark:text-amber-300",error:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-900 dark:text-red-300"};function Wt(t){return Bt[t]}const Ot=({label:t,labelPosition:e="center",orientation:a="horizontal",spacing:o="md",thickness:n="thin",variant:s="light",className:l,lineClassName:g})=>{const c={horizontal:{none:"my-0",sm:"my-2",md:"my-4",lg:"my-6",xl:"my-8"},vertical:{none:"mx-0",sm:"mx-2",md:"mx-4",lg:"mx-6",xl:"mx-8"}},i={horizontal:{thin:"border-t",medium:"border-t-2",thick:"border-t-4"},vertical:{thin:"border-l",medium:"border-l-2",thick:"border-l-4"}},h={light:"border-gray-200 dark:border-gray-700",medium:"border-gray-300 dark:border-gray-600",dark:"border-gray-400 dark:border-gray-500"};if(a==="vertical")return r.jsx("div",{className:u("self-stretch",i.vertical[n],h[s],c.vertical[o],l),role:"separator","aria-orientation":"vertical"});if(!t)return r.jsx("hr",{className:u(i.horizontal[n],h[s],c.horizontal[o],g,l),role:"separator","aria-orientation":"horizontal"});const b={left:"justify-start",center:"justify-center",right:"justify-end"};return r.jsxs("div",{className:u("flex items-center",c.horizontal[o],b[e],l),role:"separator","aria-orientation":"horizontal",children:[e!=="left"&&r.jsx("div",{className:u("flex-1",i.horizontal[n],h[s],g)}),r.jsx("span",{className:u(T.body.sm(),"px-3 text-gray-500 dark:text-gray-400 whitespace-nowrap"),children:t}),e!=="right"&&r.jsx("div",{className:u("flex-1",i.horizontal[n],h[s],g)})]})},Ft=({orientation:t="horizontal",spacing:e="md",thickness:a="thin",className:o})=>{const n={horizontal:{none:"",sm:"my-1",md:"my-2",lg:"my-4"},vertical:{none:"",sm:"mx-1",md:"mx-2",lg:"mx-4"}},s={horizontal:{thin:"h-px",medium:"h-0.5",thick:"h-1"},vertical:{thin:"w-px",medium:"w-0.5",thick:"w-1"}},l=t==="horizontal";return r.jsx("div",{role:"separator","aria-orientation":t,className:u("bg-gray-200 dark:bg-gray-700",l?"w-full":"h-full",s[t][a],n[t][e],o)})},Vt=({children:t,variant:e="blue",position:a="left",width:o="thick",padding:n="md",className:s})=>{const l={blue:"border-blue-500 dark:border-blue-400",green:"border-green-500 dark:border-green-400",purple:"border-purple-500 dark:border-purple-400",indigo:"border-indigo-500 dark:border-indigo-400",emerald:"border-emerald-500 dark:border-emerald-400",orange:"border-orange-500 dark:border-orange-400",red:"border-red-500 dark:border-red-400",gray:"border-gray-400 dark:border-gray-500"},g={left:"border-l",right:"border-r",top:"border-t",bottom:"border-b"},c={thin:"2",medium:"3",thick:"4"},i={left:{sm:"pl-3",md:"pl-4",lg:"pl-6"},right:{sm:"pr-3",md:"pr-4",lg:"pr-6"},top:{sm:"pt-3",md:"pt-4",lg:"pt-6"},bottom:{sm:"pb-3",md:"pb-4",lg:"pb-6"}},h=`${g[a]}-${c[o]}`;return r.jsx("div",{className:u(h,l[e],i[a][n],s),children:t})},Ht=({children:t,title:e,position:a="bottom-right",collapsible:o=!0,defaultCollapsed:n=!1,closeable:s=!1,onClose:l,className:g})=>{const[c,i]=y.useState(n),h={"bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-right":"top-4 right-4","top-left":"top-4 left-4"};return r.jsxs("div",{className:u("fixed z-50 w-80","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-lg shadow-2xl",h[a],g),children:[(e||o||s)&&r.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700",children:[e&&r.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white",children:e}),r.jsxs("div",{className:"flex items-center gap-2",children:[o&&r.jsx("button",{onClick:()=>i(!c),className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors","aria-label":c?"Expand":"Collapse",children:r.jsx("svg",{className:u("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",c&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}),s&&r.jsx("button",{onClick:l,className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors","aria-label":"Close",children:r.jsx("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),!c&&r.jsx("div",{className:"p-4",children:t})]})},qt=({left:t,right:e,direction:a="horizontal",initialSplit:o=.5,split:n,onSplitChange:s,minLeftSize:l=100,minRightSize:g=100,dividerSize:c=8,resizable:i=!0,className:h})=>{const[b,x]=y.useState(o),[m,f]=y.useState(!1),p=y.useRef(null),C=n!==void 0?n:b,S=N=>{i&&(N.preventDefault(),f(!0))};y.useEffect(()=>{if(!m)return;const N=w=>{const L=p.current;if(!L)return;const M=L.getBoundingClientRect();let I;a==="horizontal"?I=(w.clientX-M.left)/M.width:I=(w.clientY-M.top)/M.height,I=Math.max(0,Math.min(1,I));const $=a==="horizontal"?M.width:M.height,A=typeof l=="string"?parseFloat(l)/100*$:l,z=typeof g=="string"?parseFloat(g)/100*$:g,P=A/$,W=1-z/$;I=Math.max(P,Math.min(W,I)),n!==void 0&&s?s(I):x(I)},v=()=>{f(!1)};return document.addEventListener("mousemove",N),document.addEventListener("mouseup",v),()=>{document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",v)}},[m,a,l,g,n,s]),y.useEffect(()=>(m?(document.body.style.userSelect="none",document.body.style.cursor=a==="horizontal"?"col-resize":"row-resize"):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[m,a]);const k=a==="horizontal";return r.jsxs("div",{ref:p,className:u("w-full h-full flex",k?"flex-row":"flex-col",h),children:[r.jsx("div",{className:"overflow-auto",style:{[k?"width":"height"]:`${C*100}%`},children:t}),r.jsx("div",{onMouseDown:S,className:u("flex-shrink-0 group","bg-gray-300 dark:bg-gray-700",i&&"hover:bg-blue-500 dark:hover:bg-blue-400","transition-colors",m&&"bg-blue-500 dark:bg-blue-400",k?"cursor-col-resize":"cursor-row-resize",!i&&"cursor-default"),style:{[k?"width":"height"]:`${c}px`},children:i&&r.jsx("div",{className:u("flex items-center justify-center w-full h-full","text-gray-600 dark:text-gray-400","group-hover:text-white",m&&"text-white"),children:k?r.jsxs("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:[r.jsx("circle",{cx:"10",cy:"6",r:"1.5"}),r.jsx("circle",{cx:"10",cy:"12",r:"1.5"}),r.jsx("circle",{cx:"10",cy:"18",r:"1.5"}),r.jsx("circle",{cx:"14",cy:"6",r:"1.5"}),r.jsx("circle",{cx:"14",cy:"12",r:"1.5"}),r.jsx("circle",{cx:"14",cy:"18",r:"1.5"})]}):r.jsxs("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:[r.jsx("circle",{cx:"6",cy:"10",r:"1.5"}),r.jsx("circle",{cx:"12",cy:"10",r:"1.5"}),r.jsx("circle",{cx:"18",cy:"10",r:"1.5"}),r.jsx("circle",{cx:"6",cy:"14",r:"1.5"}),r.jsx("circle",{cx:"12",cy:"14",r:"1.5"}),r.jsx("circle",{cx:"18",cy:"14",r:"1.5"})]})})}),r.jsx("div",{className:"overflow-auto flex-1",style:{[k?"width":"height"]:`${(1-C)*100}%`},children:e})]})},_t=({children:t,defaultWidth:e=300,defaultHeight:a=200,minWidth:o=100,minHeight:n=100,maxWidth:s,maxHeight:l,directions:g=["right","bottom","bottom-right"],onResize:c,onResizeEnd:i,showHandles:h=!0,className:b})=>{const[x,m]=y.useState(e),[f,p]=y.useState(a),[C,S]=y.useState(!1),[k,N]=y.useState(null),v=y.useRef(null),w=y.useRef({x:0,y:0,width:0,height:0}),L=$=>A=>{A.preventDefault(),A.stopPropagation(),S(!0),N($),w.current={x:A.clientX,y:A.clientY,width:x,height:f}};y.useEffect(()=>{if(!C||!k)return;const $=z=>{const P=z.clientX-w.current.x,W=z.clientY-w.current.y;let j=w.current.width,F=w.current.height;k.includes("right")?j=w.current.width+P:k.includes("left")&&(j=w.current.width-P),k.includes("bottom")?F=w.current.height+W:k.includes("top")&&(F=w.current.height-W),j=Math.max(o,j),F=Math.max(n,F),s&&(j=Math.min(s,j)),l&&(F=Math.min(l,F)),m(j),p(F),c&&c(j,F)},A=()=>{S(!1),N(null),i&&i(x,f)};return document.addEventListener("mousemove",$),document.addEventListener("mouseup",A),()=>{document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",A)}},[C,k,x,f,o,n,s,l,c,i]);const M=y.useCallback($=>({top:"ns-resize",right:"ew-resize",bottom:"ns-resize",left:"ew-resize","top-left":"nwse-resize","top-right":"nesw-resize","bottom-left":"nesw-resize","bottom-right":"nwse-resize"})[$],[]);y.useEffect(()=>(C?(document.body.style.userSelect="none",document.body.style.cursor=M(k)):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[C,k,M]);const I=$=>{if(!g.includes($))return null;const A={top:"top-0 left-0 right-0 h-1 cursor-ns-resize",right:"top-0 right-0 bottom-0 w-1 cursor-ew-resize",bottom:"bottom-0 left-0 right-0 h-1 cursor-ns-resize",left:"top-0 left-0 bottom-0 w-1 cursor-ew-resize","top-left":"top-0 left-0 w-3 h-3 cursor-nwse-resize","top-right":"top-0 right-0 w-3 h-3 cursor-nesw-resize","bottom-left":"bottom-0 left-0 w-3 h-3 cursor-nesw-resize","bottom-right":"bottom-0 right-0 w-3 h-3 cursor-nwse-resize"};return r.jsx("div",{className:u("absolute z-10",h&&"bg-blue-500 dark:bg-blue-400 opacity-0 hover:opacity-50",A[$]),onMouseDown:L($)},$)};return r.jsxs("div",{ref:v,className:u("relative",b),style:{width:`${x}px`,height:`${f}px`},children:[t,["top","right","bottom","left","top-left","top-right","bottom-left","bottom-right"].map(I)]})},Gt=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UresizableUpanels",children:e||"UresizableUpanels Component"}),Kt=({children:t,maxHeight:e,hideScrollbar:a=!1,direction:o="vertical",className:n})=>{const s={vertical:"overflow-y-auto overflow-x-hidden",horizontal:"overflow-x-auto overflow-y-hidden",both:"overflow-auto"},l=a?"scrollbar-hide":u("scrollbar-thin","scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600","scrollbar-track-gray-100 dark:scrollbar-track-gray-800","hover:scrollbar-thumb-gray-400 dark:hover:scrollbar-thumb-gray-500"),g=typeof e=="number"?`${e}px`:e;return r.jsx("div",{className:u("relative",s[o],l,n),style:g?{maxHeight:g}:void 0,children:t})},Yt=({children:t,columns:e=3,gap:a=16,breakpoints:o,className:n})=>{const[s,l]=y.useState(e),g=y.useRef(null);y.useEffect(()=>{if(!o)return;const h=()=>{const b=window.innerWidth,x=Object.keys(o).map(Number).sort((m,f)=>f-m);for(const m of x)if(b>=m){l(o[m]);return}l(e)};return h(),window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[o,e]);const c=y.Children.toArray(t),i=Array.from({length:s},()=>[]);return c.forEach((h,b)=>{i[b%s].push(h)}),r.jsx("div",{ref:g,className:u("flex",n),style:{gap:`${a}px`},children:i.map((h,b)=>r.jsx("div",{className:"flex-1 flex flex-col",style:{gap:`${a}px`},children:h},b))})},ee=({children:t,container:e})=>{const[a,o]=y.useState(!1);if(y.useEffect(()=>(o(!0),()=>o(!1)),[]),!a)return null;const n=e||document.body;return gr.createPortal(t,n)},ke=({isOpen:t,onClose:e,children:a,blur:o=!1,opacity:n="medium",zIndex:s=40,lockScroll:l=!0,className:g})=>{if(y.useEffect(()=>{if(l){if(t){const i=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight=`${i}px`}else document.body.style.overflow="",document.body.style.paddingRight="";return()=>{document.body.style.overflow="",document.body.style.paddingRight=""}}},[t,l]),!t)return null;const c={light:"bg-black/20 dark:bg-black/30",medium:"bg-black/50 dark:bg-black/60",dark:"bg-black/75 dark:bg-black/85"};return r.jsx(ee,{children:r.jsx("div",{className:u("fixed inset-0","transition-opacity duration-300",o&&"backdrop-blur-sm",c[n],g),style:{zIndex:s},onClick:e,"aria-hidden":"true",children:a&&r.jsx("div",{className:"relative h-full w-full",onClick:i=>i.stopPropagation(),children:a})})})},Qt=({children:t,as:e="p",size:a="base",weight:o="normal",color:n="default",align:s,transform:l="none",truncate:g=!1,lineClamp:c,className:i})=>{const h={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl"},b={light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},x={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",primary:"text-blue-600 dark:text-blue-400",success:"text-green-600 dark:text-green-400",warning:"text-yellow-600 dark:text-yellow-400",danger:"text-red-600 dark:text-red-400"},m=s?{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}[s]:"",f={none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},p=c?{display:"-webkit-box",WebkitLineClamp:c,WebkitBoxOrient:"vertical",overflow:"hidden"}:void 0;return r.jsx(e,{className:u(h[a],b[o],x[n],m,f[l],g&&"truncate",c&&"overflow-hidden",i),style:p,children:t})},Zt=({children:t,level:e=2,size:a,weight:o="bold",color:n="default",align:s,className:l})=>{const c=a||{1:"4xl",2:"3xl",3:"2xl",4:"xl",5:"lg",6:"base"}[e],i={"4xl":"text-4xl","3xl":"text-3xl","2xl":"text-2xl",xl:"text-xl",lg:"text-lg",base:"text-base"},h={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold"},b={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-700 dark:text-gray-300",primary:"text-blue-600 dark:text-blue-400"},x=s?{left:"text-left",center:"text-center",right:"text-right"}[s]:"",m=`h${e}`;return y.createElement(m,{className:u(i[c],h[o],b[n],x,l)},t)},Xt=V.cva("",{variants:{variant:{hero:T.heading.display.hero(),display:T.heading.display.lg(),h1:T.heading.h1(),h2:T.heading.h2(),h3:T.heading.h3()},responsive:{true:"",false:""},align:{left:"text-left",center:"text-center",right:"text-right"},color:{default:"text-gray-900 dark:text-white",muted:"text-gray-600 dark:text-gray-400",vibrant:"text-white",brand:"bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent"}},defaultVariants:{variant:"h1",responsive:!0,align:"left",color:"default"}}),Jt=({children:t,variant:e="h1",responsive:a=!0,align:o="left",color:n="default",className:s,as:l})=>{const g=l||(e==="hero"||e==="display"||e==="h1"?"h1":e==="h2"?"h2":"h3");return r.jsx(g,{className:u(Xt({variant:e,responsive:a,align:o,color:n}),s),children:t})},Rt=V.cva("",{variants:{variant:{h2:T.heading.h2(),h3:T.heading.h3(),h4:T.heading.h4(),h5:T.heading.h5(),h6:T.heading.h6()},spacing:{none:"",sm:"mb-2",md:"mb-4",lg:"mb-6",xl:"mb-8"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{variant:"h2",spacing:"md",align:"left"}}),ea=({children:t,variant:e="h2",spacing:a="md",align:o="left",className:n,as:s})=>{const l=s||e;return y.createElement(l,{className:u(Rt({variant:e,spacing:a,align:o}),n)},t)},ra=V.cva("",{variants:{variant:{body:T.body.md(),lead:T.body.lg(),large:T.body.lg(),small:T.body.sm(),caption:T.body.xs()},color:{default:"text-gray-700 dark:text-gray-300",muted:"text-gray-500 dark:text-gray-500",primary:"text-gray-900 dark:text-white"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"body",color:"default",align:"left"}}),ta=({children:t,variant:e="body",color:a="default",align:o="left",className:n,as:s="p"})=>y.createElement(s,{className:u(ra({variant:e,color:a,align:o}),n)},t),aa=V.cva(T.link.default(),{variants:{variant:{default:T.link.default(),subtle:T.link.subtle(),muted:T.link.muted(),button:"inline-flex items-center justify-center px-4 py-2 rounded-md bg-blue-600 text-white hover:bg-blue-700 transition-colors"},external:{true:"inline-flex items-center gap-1",false:""}},defaultVariants:{variant:"default",external:!1}}),oa=({children:t,href:e,variant:a="default",external:o=!1,className:n,target:s,rel:l})=>r.jsxs("a",{href:e,target:s||(o?"_blank":void 0),rel:l||(o?"noopener noreferrer":void 0),className:u(aa({variant:a,external:o}),n),children:[t,o&&r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}),na=({children:t,size:e="md",variant:a="default",className:o})=>{const n={sm:"text-xs px-1 py-0.5",md:"text-sm px-1.5 py-0.5",lg:"text-base px-2 py-1"},s={default:"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100",primary:"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",success:"bg-green-50 dark:bg-green-900/30 text-green-700 dark:text-green-300",warning:"bg-yellow-50 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300",danger:"bg-red-50 dark:bg-red-900/30 text-red-700 dark:text-red-300"};return r.jsx("code",{className:u("inline-block font-mono font-medium rounded",n[e],s[a],o),children:t})},sa=({children:t,variant:e="primary",size:a="md",inline:o=!1,align:n="left",className:s,wrap:l=!1})=>{const g={primary:"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30",secondary:"text-purple-600 dark:text-purple-400 bg-purple-50 dark:bg-purple-900/30",success:"text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-900/30",warning:"text-yellow-700 dark:text-yellow-400 bg-yellow-50 dark:bg-yellow-900/30",neutral:"text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-800"},c={xs:{text:"text-xs",padding:o?"px-1.5 py-0.5":"px-2 py-1"},sm:{text:"text-sm",padding:o?"px-2 py-0.5":"px-3 py-1.5"},md:{text:"text-base",padding:o?"px-2.5 py-1":"px-4 py-2"},lg:{text:"text-lg",padding:o?"px-3 py-1":"px-4 py-2"}},i={left:"text-left",center:"text-center",right:"text-right"},h=c[a],b=o?"code":"div";return r.jsx(b,{className:u("font-mono rounded-lg",g[e],h.text,h.padding,!o&&i[n],o?"inline-block":"block",!l&&"overflow-x-auto whitespace-nowrap",l&&"break-all",s),children:t})},la=({children:t,size:e="md",className:a})=>{const o={sm:"text-xs px-1.5 py-0.5",md:"text-sm px-2 py-1",lg:"text-base px-2.5 py-1.5"};return r.jsx("kbd",{className:u("inline-flex items-center justify-center","font-mono font-semibold","bg-gray-100 dark:bg-gray-800","text-gray-900 dark:text-gray-100","border border-gray-300 dark:border-gray-600","rounded shadow-sm",o[e],a),children:t})},ia=({children:t,cite:e,variant:a="default",size:o="md",className:n})=>{const s={sm:"text-sm p-3",md:"text-base p-4",lg:"text-lg p-6"},l={sm:"text-xs",md:"text-sm",lg:"text-base"},g={default:"border-l-4 border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800/50",bordered:"border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800",accent:"border-l-4 border-blue-500 dark:border-blue-400 bg-blue-50 dark:bg-blue-900/20"};return r.jsxs("blockquote",{className:u("rounded-r-lg",s[o],g[a],n),children:[r.jsx("p",{className:"text-gray-800 dark:text-gray-200 italic",children:t}),e&&r.jsxs("footer",{className:u("mt-2 text-gray-600 dark:text-gray-400",l[o]),children:["— ",r.jsx("cite",{className:"not-italic font-medium",children:e})]})]})},da=({children:t,variant:e="default",showIcon:a=!1,size:o="sm",className:n})=>{const s={sm:"text-sm",base:"text-base"},l={sm:"h-4 w-4",base:"h-5 w-5"},c={default:{text:"text-gray-600 dark:text-gray-400",icon:U.InformationCircleIcon},error:{text:"text-red-600 dark:text-red-400",icon:U.ExclamationCircleIcon},success:{text:"text-green-600 dark:text-green-400",icon:U.CheckCircleIcon},warning:{text:"text-yellow-600 dark:text-yellow-400",icon:U.ExclamationCircleIcon}}[e],i=c.icon;return r.jsxs("div",{className:u("flex items-start gap-1.5",n),children:[a&&r.jsx(i,{className:u(l[o],c.text,"flex-shrink-0 mt-0.5")}),r.jsx("p",{className:u(s[o],c.text),children:t})]})},ca=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UscreenUreaderUtext",children:e||"UscreenUreaderUtext Component"}),ga=({children:t,maxLength:e=50,position:a="end",ellipsis:o="...",showTooltip:n=!0,className:s})=>{const l=t||"";if(l.length<=e)return r.jsx("span",{className:s,children:l});const c=(()=>{const i=o.length,h=e-i;switch(a){case"start":return o+l.slice(l.length-h);case"middle":{const b=Math.floor(h/2),x=l.slice(0,b),m=l.slice(l.length-(h-b));return x+o+m}case"end":default:return l.slice(0,h)+o}})();return r.jsx("span",{className:u("inline-block",s),title:n?l:void 0,children:c})},ua=({value:t,style:e="decimal",currency:a="USD",unit:o,minimumFractionDigits:n,maximumFractionDigits:s,locale:l="en-US",notation:g="standard",className:c})=>{const i=()=>{try{const h={style:e,notation:g,minimumFractionDigits:n,maximumFractionDigits:s};return e==="currency"&&(h.currency=a),e==="unit"&&o&&(h.unit=o),new Intl.NumberFormat(l,h).format(t)}catch(h){return console.error("Number formatting error:",h),t.toLocaleString(l)}};return r.jsx("span",{className:u(c),children:i()})},ha=({date:t,showTooltip:e=!0,updateInterval:a=0,className:o})=>{const[,n]=y.useState(0),s=y.useMemo(()=>t instanceof Date?t:new Date(t),[t]);y.useEffect(()=>{if(a===0)return;const i=setInterval(()=>{n(h=>h+1)},a*1e3);return()=>clearInterval(i)},[a]);const g=(()=>{const h=new Date().getTime()-s.getTime(),b=Math.floor(h/1e3),x=Math.floor(b/60),m=Math.floor(x/60),f=Math.floor(m/24),p=Math.floor(f/7),C=Math.floor(f/30),S=Math.floor(f/365);return b<60?"just now":x<60?`${x} ${x===1?"minute":"minutes"} ago`:m<24?`${m} ${m===1?"hour":"hours"} ago`:f<7?`${f} ${f===1?"day":"days"} ago`:p<4?`${p} ${p===1?"week":"weeks"} ago`:C<12?`${C} ${C===1?"month":"months"} ago`:`${S} ${S===1?"year":"years"} ago`})(),c=s.toLocaleString();return r.jsx("time",{dateTime:s.toISOString(),title:e?c:void 0,className:u(o),children:g})},we=({size:t="default",variant:e="default",className:a,ariaLabel:o="Loading",loadingText:n="Loading..."})=>{const s=()=>{const l={small:"w-4 h-4",default:"w-6 h-6",large:"w-8 h-8",extraLarge:"w-16 h-16 border-4"},g={default:"border-gray-300 border-t-blue-600",white:"border-white/30 border-t-white",success:"border-gray-300 border-t-green-600",warning:"border-gray-300 border-t-orange-600",error:"border-gray-300 border-t-red-600"};return`animate-spin rounded-full border-2 ${l[t]} ${g[e]}`};return r.jsx("div",{className:u(s(),a),role:"status","aria-label":o,children:r.jsx("span",{className:"sr-only",children:n})})},ba=({isLoading:t,message:e,mode:a="fullscreen",blur:o=!1,spinnerSize:n="large",className:s})=>t?r.jsxs("div",{className:u(a==="fullscreen"?"fixed":"absolute","inset-0 z-50","flex flex-col items-center justify-center","bg-white/80 dark:bg-gray-900/80",o&&"backdrop-blur-sm",s),role:"alert","aria-live":"polite","aria-busy":"true",children:[r.jsx(we,{size:n}),e&&r.jsx("p",{className:u(T.body.md(),"text-gray-700 dark:text-gray-300 mt-4"),children:e})]}):null,fa=({size:t="md",variant:e="primary",color:a,className:o})=>{const n={sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-3 h-3"},s={primary:"bg-blue-600 dark:bg-blue-500",secondary:"bg-gray-600 dark:bg-gray-400",white:"bg-white"},l=u("rounded-full",n[t],a?"":s[e]);return r.jsxs("div",{className:u("flex items-center gap-1",o),children:[r.jsx("div",{className:l,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both",animationDelay:"-0.32s"}}),r.jsx("div",{className:l,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both",animationDelay:"-0.16s"}}),r.jsx("div",{className:l,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both"}}),r.jsx("style",{children:`
|
|
1
|
+
(function(d,ce){typeof exports=="object"&&typeof module<"u"?ce(exports,require("clsx"),require("tailwind-merge"),require("react/jsx-runtime"),require("react"),require("class-variance-authority"),require("react-dom"),require("@heroicons/react/24/outline"),require("@heroicons/react/24/solid"),require("@radix-ui/react-switch"),require("@radix-ui/react-select"),require("lucide-react"),require("@radix-ui/react-label"),require("@radix-ui/react-slot"),require("react-router-dom"),require("@radix-ui/react-tabs"),require("react-i18next"),require("react-helmet-async"),require("web-vitals")):typeof define=="function"&&define.amd?define(["exports","clsx","tailwind-merge","react/jsx-runtime","react","class-variance-authority","react-dom","@heroicons/react/24/outline","@heroicons/react/24/solid","@radix-ui/react-switch","@radix-ui/react-select","lucide-react","@radix-ui/react-label","@radix-ui/react-slot","react-router-dom","@radix-ui/react-tabs","react-i18next","react-helmet-async","web-vitals"],ce):(d=typeof globalThis<"u"?globalThis:d||self,ce(d.MailBoxComponents={},d.clsx,d.tailwindMerge,d.ReactJSXRuntime,d.React,d.cva,d.ReactDOM,d.HeroiconsOutline,d.HeroiconsSolid,d.RadixSwitch,d.RadixSelect,d.LucideReact,d.RadixLabel,d.RadixSlot,d.ReactRouterDOM,d.RadixTabs,d.ReactI18next,d.ReactHelmetAsync,d.WebVitals))})(this,(function(d,ce,ut,r,p,V,ir,T,R,oe,ht,X,dr,bt,$e,H,cr,ft,ge){"use strict";function gr(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const F=gr(p),B=gr(ht);function u(...t){return ut.twMerge(ce.clsx(t))}const ur=({children:t,as:e="div",p:a,px:o,py:n,m:s,mx:l,my:g,bg:i,border:c=!1,rounded:h,shadow:b,w:k,h:m,className:f})=>{const y={none:"0",xs:"1",sm:"2",md:"4",lg:"6",xl:"8","2xl":"12",auto:"auto"},C=i?{transparent:"bg-transparent",white:"bg-white dark:bg-gray-900",gray:"bg-gray-100 dark:bg-gray-800",primary:"bg-blue-50 dark:bg-blue-900/20",success:"bg-green-50 dark:bg-green-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",danger:"bg-red-50 dark:bg-red-900/20"}[i]:"",S=h?{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}[h]:"",w=b?{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl"}[b]:"",N=k?{auto:"w-auto",full:"w-full",screen:"w-screen",min:"w-min",max:"w-max"}[k]:"",v=m?{auto:"h-auto",full:"h-full",screen:"h-screen",min:"h-min",max:"h-max"}[m]:"",x=[];a&&x.push("p-"+y[a]),o&&x.push("px-"+y[o]),n&&x.push("py-"+y[n]);const L=[];return s&&L.push("m-"+y[s]),l&&L.push("mx-"+y[l]),g&&L.push("my-"+y[g]),r.jsx(e,{className:u(...x,...L,C,c&&"border border-gray-200 dark:border-gray-700",S,w,N,v,f),children:t})},yt=({direction:t="row",align:e,justify:a,wrap:o="nowrap",gap:n,inline:s=!1,className:l,...g})=>{const i={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},c=e?{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"}[e]:"",h=a?{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}[a]:"",b={nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},k=n?{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"}[n]:"";return r.jsx(ur,{...g,className:u(s?"inline-flex":"flex",i[t],c,h,b[o],k,l)})},pt={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},mt={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},vt={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},xt={wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},kt={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},wt=({children:t,direction:e="row",align:a="start",justify:o="start",wrap:n="nowrap",gap:s="0",className:l})=>r.jsx("div",{className:u("flex",pt[e],mt[a],vt[o],xt[n],kt[s],l),children:t}),Ct=({children:t,size:e="xl",center:a=!0,padding:o="md",className:n})=>{const s={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},l={none:"",sm:"px-4 py-2",md:"px-6 py-4",lg:"px-8 py-6"};return r.jsx("div",{className:u("w-full",s[e],a&&"mx-auto",l[o],n),children:t})},Nt=({children:t,cols:e=1,gap:a="md",autoFit:o,autoFill:n,alignItems:s="stretch",justifyItems:l="stretch",className:g})=>{const i={none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},c={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},h={start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"},b=()=>{if(o||n)return"";if(typeof e=="number")return{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"}[e]||"grid-cols-1";const m=[];return e.sm&&m.push("grid-cols-"+e.sm),e.md&&m.push("md:grid-cols-"+e.md),e.lg&&m.push("lg:grid-cols-"+e.lg),e.xl&&m.push("xl:grid-cols-"+e.xl),m.join(" ")};let k;return o?k="repeat(auto-fit, minmax("+o+", 1fr))":n&&(k="repeat(auto-fill, minmax("+n+", 1fr))"),r.jsx("div",{className:u("grid",b(),i[a],c[s],h[l],g),style:k?{gridTemplateColumns:k}:void 0,children:t})},Te=({children:t,direction:e="vertical",spacing:a="md",align:o="stretch",justify:n="start",wrap:s=!1,full:l=!1,divider:g=!1,className:i})=>{const c=e==="vertical",h={vertical:{none:"",xs:"space-y-1",sm:"space-y-2",md:"space-y-4",lg:"space-y-6",xl:"space-y-8","2xl":"space-y-12"},horizontal:{none:"",xs:"space-x-1",sm:"space-x-2",md:"space-x-4",lg:"space-x-6",xl:"space-x-8","2xl":"space-x-12"}},b={vertical:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},horizontal:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"}},k={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},m={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return r.jsx("div",{className:u("flex",c?"flex-col":"flex-row",g?b[e][a]:h[e][a],k[o],m[n],s&&"flex-wrap",l&&(c?"h-full":"w-full"),i),children:g?p.Children.map(t,(f,y)=>r.jsxs(p.Fragment,{children:[f,y<p.Children.count(t)-1&&r.jsx("div",{className:u("bg-gray-200 dark:bg-gray-700",c?"h-px w-full":"w-px h-full")})]},y)):t})},St=t=>r.jsx(Te,{direction:"vertical",...t}),Et=t=>r.jsx(Te,{direction:"horizontal",...t}),Lt=({children:t,axis:e="both",inline:a=!1,className:o})=>{const n=()=>{switch(e){case"horizontal":return"justify-center";case"vertical":return"items-center";case"both":default:return"justify-center items-center"}};return r.jsx("div",{className:u(a?"inline-flex":"flex",n(),o),children:t})},It=({size:t="md",axis:e="vertical",flex:a=!1,className:o})=>{const n={vertical:{xs:"h-1",sm:"h-2",md:"h-4",lg:"h-6",xl:"h-8","2xl":"h-12"},horizontal:{xs:"w-1",sm:"w-2",md:"w-4",lg:"w-6",xl:"w-8","2xl":"w-12"}},s=typeof t=="number"?e==="vertical"?{height:`${t}px`}:{width:`${t}px`}:void 0,l=typeof t=="string"?n[e][t]:"";return r.jsx("div",{className:u(a&&"flex-1",!a&&l,o),style:s,"aria-hidden":"true"})},Mt=V.cva("",{variants:{variant:{default:"",hero:"relative overflow-hidden",feature:"bg-white dark:bg-gray-800",cta:"relative overflow-hidden",testimonial:"bg-gray-50 dark:bg-gray-900",footer:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border-t"},spacing:{none:"",xs:"py-2",sm:"py-3",md:"py-4",lg:"py-6",xl:"py-8","2xl":"py-12","3xl":"py-16","4xl":"py-20","5xl":"py-24"},background:{none:"bg-transparent",default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/50 dark:to-purple-900/50","gradient-primary":"bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-blue-900/50 dark:to-indigo-900/50","gradient-secondary":"bg-gradient-to-br from-green-50 to-blue-100 dark:from-green-900/50 dark:to-blue-900/50","gradient-tertiary":"bg-gradient-to-r from-emerald-50 to-teal-50 dark:from-gray-800 dark:to-gray-900","gradient-vibrant":"bg-gradient-to-br from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"}},defaultVariants:{variant:"default",spacing:"3xl",background:"none"}}),$t=({children:t,variant:e="default",spacing:a="3xl",background:o="none",className:n,as:s="section",id:l})=>p.createElement(s,{id:l,className:u(Mt({variant:e,spacing:a,background:o}),n)},t),Tt=V.cva("min-h-screen flex flex-col",{variants:{background:{default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",transparent:"bg-transparent",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/20 dark:to-purple-900/20"},overflow:{visible:"overflow-visible",hidden:"overflow-hidden",scroll:"overflow-auto"}},defaultVariants:{background:"default",overflow:"visible"}}),At=({children:t,background:e="default",overflow:a="visible",className:o})=>r.jsx("div",{className:u(Tt({background:e,overflow:a}),o),children:t}),Ut=({children:t,ratio:e="16/9",className:a})=>{const s=`${1/(typeof e=="string"?{"16/9":1.7777777777777777,"4/3":1.3333333333333333,"1/1":1,"21/9":2.3333333333333335,"3/2":1.5}[e]:e)*100}%`;return r.jsx("div",{className:u("relative w-full",a),style:{paddingBottom:s},children:r.jsx("div",{className:"absolute inset-0",children:t})})},E={typography:{family:{sans:"font-sans",display:"font-sans",body:"font-sans"},semantic:{caption:"text-xs",small:"text-sm",body:"text-base",bodyLarge:"text-lg",h6:"text-base",h5:"text-lg",h4:"text-xl",h3:"text-2xl",h2:"text-3xl",h1:"text-4xl",hero:"text-8xl"},weight:{semibold:"font-semibold",bold:"font-bold",body:"font-normal",emphasis:"font-medium",strong:"font-semibold",heading:"font-bold",display:"font-extrabold"},decoration:{none:"no-underline",underline:"underline"},underlineOffset:{medium:"underline-offset-2"},leading:{tight:"leading-tight",heading:"leading-tight",body:"leading-relaxed",caption:"leading-normal",display:"leading-none"},tracking:{heading:"tracking-tight",body:"tracking-normal",caption:"tracking-normal",uppercase:"tracking-wider"},transform:{uppercase:"uppercase"}}},U={heading:{display:{hero:()=>`${E.typography.family.display} ${E.typography.semantic.hero} ${E.typography.weight.display} ${E.typography.leading.display} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,xl:()=>`${E.typography.family.display} text-7xl ${E.typography.weight.display} ${E.typography.leading.display} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,lg:()=>`${E.typography.family.display} text-6xl ${E.typography.weight.bold} ${E.typography.leading.display} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,md:()=>`${E.typography.family.display} text-5xl ${E.typography.weight.bold} ${E.typography.leading.tight} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,sm:()=>`${E.typography.family.display} text-4xl ${E.typography.weight.bold} ${E.typography.leading.tight} ${E.typography.tracking.heading} text-gray-900 dark:text-white`},h1:()=>`${E.typography.family.sans} ${E.typography.semantic.h1} ${E.typography.weight.heading} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${E.typography.family.sans} ${E.typography.semantic.h2} ${E.typography.weight.heading} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${E.typography.family.sans} ${E.typography.semantic.h3} ${E.typography.weight.heading} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h4:()=>`${E.typography.family.sans} ${E.typography.semantic.h4} ${E.typography.weight.semibold} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h5:()=>`${E.typography.family.sans} ${E.typography.semantic.h5} ${E.typography.weight.semibold} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h6:()=>`${E.typography.family.sans} ${E.typography.semantic.h6} ${E.typography.weight.semibold} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,responsive:{h1:()=>`${E.typography.family.sans} text-2xl sm:text-3xl md:text-4xl lg:text-5xl ${E.typography.weight.heading} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${E.typography.family.sans} text-xl sm:text-2xl md:text-3xl lg:text-4xl ${E.typography.weight.heading} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${E.typography.family.sans} text-lg sm:text-xl md:text-2xl lg:text-3xl ${E.typography.weight.semibold} ${E.typography.leading.heading} ${E.typography.tracking.heading} text-gray-900 dark:text-white`,display:()=>`${E.typography.family.display} text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl ${E.typography.weight.display} ${E.typography.leading.display} ${E.typography.tracking.heading} text-gray-900 dark:text-white`}},body:{xl:()=>`${E.typography.family.body} ${E.typography.semantic.bodyLarge} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-700 dark:text-gray-300`,lg:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-700 dark:text-gray-300`,md:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-700 dark:text-gray-300`,sm:()=>`${E.typography.family.body} ${E.typography.semantic.small} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`,xs:()=>`${E.typography.family.body} ${E.typography.semantic.caption} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`,strong:{xl:()=>`${E.typography.family.body} ${E.typography.semantic.bodyLarge} ${E.typography.weight.strong} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.strong} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.strong} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${E.typography.family.body} ${E.typography.semantic.small} ${E.typography.weight.strong} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`},emphasis:{xl:()=>`${E.typography.family.body} ${E.typography.semantic.bodyLarge} ${E.typography.weight.emphasis} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.emphasis} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.emphasis} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${E.typography.family.body} ${E.typography.semantic.small} ${E.typography.weight.emphasis} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-900 dark:text-white`},muted:{xl:()=>`${E.typography.family.body} ${E.typography.semantic.bodyLarge} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`,lg:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`,md:()=>`${E.typography.family.body} ${E.typography.semantic.body} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`,sm:()=>`${E.typography.family.body} ${E.typography.semantic.small} ${E.typography.weight.body} ${E.typography.leading.body} ${E.typography.tracking.body} text-gray-600 dark:text-gray-400`}},caption:{default:()=>`${E.typography.family.body} ${E.typography.semantic.caption} ${E.typography.weight.body} ${E.typography.leading.caption} ${E.typography.tracking.caption} text-gray-500 dark:text-gray-500`,emphasis:()=>`${E.typography.family.body} ${E.typography.semantic.caption} ${E.typography.weight.emphasis} ${E.typography.leading.caption} ${E.typography.tracking.caption} text-gray-600 dark:text-gray-400`,uppercase:()=>`${E.typography.family.body} ${E.typography.semantic.caption} ${E.typography.weight.emphasis} ${E.typography.leading.caption} ${E.typography.tracking.uppercase} ${E.typography.transform.uppercase} text-gray-500 dark:text-gray-500`},link:{default:()=>`${E.typography.decoration.underline} ${E.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150`,subtle:()=>`${E.typography.decoration.none} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:${E.typography.decoration.underline} hover:${E.typography.underlineOffset.medium} transition-all duration-150`,muted:()=>`${E.typography.decoration.underline} ${E.typography.underlineOffset.medium} text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors duration-150`,external:()=>`${E.typography.decoration.underline} ${E.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150 inline-flex items-center gap-1`},label:{default:()=>`${E.typography.family.body} text-sm ${E.typography.weight.emphasis} text-gray-900 dark:text-white`,required:()=>`${E.typography.family.body} text-sm ${E.typography.weight.emphasis} text-gray-900 dark:text-white after:content-['*'] after:ml-0.5 after:text-red-500`,optional:()=>`${E.typography.family.body} text-sm ${E.typography.weight.body} text-gray-600 dark:text-gray-400`,helper:()=>`${E.typography.family.body} text-sm ${E.typography.weight.body} text-gray-500 dark:text-gray-500`,error:()=>`${E.typography.family.body} text-sm ${E.typography.weight.body} text-red-600 dark:text-red-400`,success:()=>`${E.typography.family.body} text-sm ${E.typography.weight.body} text-green-600 dark:text-green-400`}},D={button:{primary:{default:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",fullWidth:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 flex items-center justify-center w-full rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},secondary:{default:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},outline:{default:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},destructive:{default:()=>"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 border-transparent focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-red-600 dark:hover:bg-red-700 dark:active:bg-red-800 dark:text-white inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",outline:()=>"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border border-red-300 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:hover:bg-red-900/20 dark:text-red-400 dark:border-red-800 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 border-transparent focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-red-600 dark:hover:bg-red-700 dark:active:bg-red-800 dark:text-white inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8"},ghost:{default:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md px-2 py-1 text-xs font-medium transition-colors duration-200 h-8",icon:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md p-2 transition-colors duration-200 h-10 w-10"},link:{default:()=>"bg-transparent hover:bg-transparent active:bg-transparent text-blue-600 border-transparent underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:no-underline dark:text-blue-400 inline-flex items-center justify-center rounded-md px-0 py-0 text-sm font-medium transition-colors duration-200",muted:()=>"bg-transparent hover:bg-transparent active:bg-transparent text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 border-transparent underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:no-underline inline-flex items-center justify-center rounded-md px-0 py-0 text-sm font-medium transition-colors duration-200"},gradient:{primary:()=>"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",secondary:()=>"bg-gradient-to-r from-gray-100 to-gray-200 hover:from-gray-200 hover:to-gray-300 text-gray-900 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",success:()=>"bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-green-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200"},web3:{wallet:()=>"bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-900 dark:text-gray-100 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",connect:()=>"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",disconnect:()=>"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border border-red-300 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:hover:bg-red-900/20 dark:text-red-400 dark:border-red-800 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"}},badge:{default:()=>"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",primary:()=>"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",success:()=>"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",warning:()=>"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",error:()=>"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",ethereum:()=>"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",solana:()=>"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",small:(t="default")=>{const e={default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",error:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};return`${e[t]||e.default} inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium`},large:(t="default")=>{const e={default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",error:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};return`${e[t]||e.default} inline-flex items-center px-3 py-1 rounded-full text-sm font-medium`}},input:{default:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",search:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",error:()=>"bg-gray-50 dark:bg-gray-800 border-red-300 dark:border-red-700 text-gray-900 dark:text-gray-100 focus:border-red-500 focus:ring-red-500 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",small:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-2 py-1.5 text-xs placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",large:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-4 py-3 text-base placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",withIcon:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md pl-10 pr-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2"},alert:{info:()=>"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded-md border p-4 flex items-start gap-3",success:()=>"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded-md border p-4 flex items-start gap-3",warning:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3",attention:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3",error:()=>"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded-md border p-4 flex items-start gap-3",compact:{info:()=>"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded border px-3 py-2 text-sm",success:()=>"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded border px-3 py-2 text-sm",warning:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm",attention:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm",error:()=>"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded border px-3 py-2 text-sm"}},navigation:{tabs:{root:()=>"",list:()=>"inline-flex h-10 items-center justify-center rounded-md bg-gray-100 dark:bg-gray-800 p-1 text-gray-500 dark:text-gray-400",listUnderlined:()=>"flex border-b border-gray-200 dark:border-gray-700",listPills:()=>"flex space-x-1 bg-gray-100 dark:bg-gray-800 rounded-lg p-1",trigger:()=>"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-gray-950 data-[state=active]:shadow-sm dark:ring-offset-gray-950 dark:focus-visible:ring-blue-400 dark:data-[state=active]:bg-gray-950 dark:data-[state=active]:text-gray-50",triggerUnderlined:()=>"inline-flex items-center justify-center whitespace-nowrap px-4 py-2 text-sm font-medium text-gray-500 dark:text-gray-400 border-b-2 border-transparent hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-600 focus:outline-none focus:text-blue-600 focus:border-blue-600 dark:focus:text-blue-400 dark:focus:border-blue-400 data-[state=active]:text-blue-600 data-[state=active]:border-blue-600 dark:data-[state=active]:text-blue-400 dark:data-[state=active]:border-blue-400 transition-colors",triggerPills:()=>"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-white dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 data-[state=active]:bg-white data-[state=active]:text-gray-900 data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-700 dark:data-[state=active]:text-gray-100 transition-all",content:()=>"mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 dark:ring-offset-gray-950 dark:focus-visible:ring-blue-400"}},icon:{variant:{default:{xs:()=>"h-3 w-3 text-gray-500 dark:text-gray-400",sm:()=>"h-4 w-4 text-gray-500 dark:text-gray-400",md:()=>"h-5 w-5 text-gray-500 dark:text-gray-400",lg:()=>"h-6 w-6 text-gray-500 dark:text-gray-400",xl:()=>"h-8 w-8 text-gray-500 dark:text-gray-400"},success:{xs:()=>"h-3 w-3 text-green-600 dark:text-green-400",sm:()=>"h-4 w-4 text-green-600 dark:text-green-400",md:()=>"h-5 w-5 text-green-600 dark:text-green-400",lg:()=>"h-6 w-6 text-green-600 dark:text-green-400",xl:()=>"h-8 w-8 text-green-600 dark:text-green-400"},warning:{xs:()=>"h-3 w-3 text-amber-600 dark:text-amber-400",sm:()=>"h-4 w-4 text-amber-600 dark:text-amber-400",md:()=>"h-5 w-5 text-amber-600 dark:text-amber-400",lg:()=>"h-6 w-6 text-amber-600 dark:text-amber-400",xl:()=>"h-8 w-8 text-amber-600 dark:text-amber-400"},error:{xs:()=>"h-3 w-3 text-red-600 dark:text-red-400",sm:()=>"h-4 w-4 text-red-600 dark:text-red-400",md:()=>"h-5 w-5 text-red-600 dark:text-red-400",lg:()=>"h-6 w-6 text-red-600 dark:text-red-400",xl:()=>"h-8 w-8 text-red-600 dark:text-red-400"},muted:{xs:()=>"h-3 w-3 text-gray-400 dark:text-gray-500",sm:()=>"h-4 w-4 text-gray-400 dark:text-gray-500",md:()=>"h-5 w-5 text-gray-400 dark:text-gray-500",lg:()=>"h-6 w-6 text-gray-400 dark:text-gray-500",xl:()=>"h-8 w-8 text-gray-400 dark:text-gray-500"}}},overlays:{modal:{backdrop:()=>"fixed inset-0 z-40 bg-black/50 dark:bg-black/70 backdrop-blur-sm transition-all duration-300 ease-out",backdropEntering:()=>"opacity-0",backdropEntered:()=>"opacity-100",backdropExiting:()=>"opacity-0",container:()=>"fixed inset-0 z-50 flex items-center justify-center p-4 transition-all duration-300 ease-out",containerEntering:()=>"opacity-0 scale-95",containerEntered:()=>"opacity-100 scale-100",containerExiting:()=>"opacity-0 scale-95",content:()=>"relative w-full max-w-lg bg-white dark:bg-gray-900 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 max-h-[80vh] overflow-hidden",small:()=>"max-w-sm",medium:()=>"max-w-lg",large:()=>"max-w-2xl",extraLarge:()=>"max-w-4xl",fullWidth:()=>"max-w-[95vw]",header:()=>"flex items-center justify-between p-4 sm:p-6 border-b border-gray-200 dark:border-gray-700",title:()=>"text-lg font-semibold text-gray-900 dark:text-gray-100",closeButton:()=>"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors",body:()=>"p-4 sm:p-6 overflow-y-auto",footer:()=>"flex items-center justify-end space-x-3 p-4 sm:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50"},dropdown:{container:()=>"relative inline-block",trigger:()=>"inline-flex justify-center items-center bg-transparent border-0 text-gray-900 dark:text-gray-100 focus:outline-none transition-colors",triggerBordered:()=>"inline-flex justify-center items-center bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors",menu:()=>"absolute z-50 w-56 bg-white dark:bg-gray-800 rounded-md shadow-lg focus:outline-none transition-all duration-200",menuSmall:()=>"w-40",menuLarge:()=>"w-72",menuAuto:()=>"w-auto min-w-40",menuTop:()=>"bottom-full mb-1",menuBottom:()=>"top-full mt-1",menuLeft:()=>"right-0",menuRight:()=>"left-0",menuEntering:()=>"opacity-0 scale-95 transform origin-top",menuEntered:()=>"opacity-100 scale-100 transform origin-top",menuExiting:()=>"opacity-0 scale-95 transform origin-top",itemContainer:()=>"py-1 px-1",item:()=>"flex items-center w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-blue-50 dark:hover:bg-blue-900/20 hover:text-blue-700 dark:hover:text-blue-300 transition-all duration-200 cursor-pointer hover:shadow-sm rounded-sm",itemActive:()=>"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 shadow-sm",itemDisabled:()=>"text-gray-400 dark:text-gray-600 cursor-not-allowed hover:bg-transparent hover:text-gray-400 dark:hover:text-gray-600",divider:()=>"my-1 border-t border-gray-200 dark:border-gray-700",header:()=>"px-4 py-2 text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide",itemIcon:()=>"mr-3 h-4 w-4 flex-shrink-0",itemIconRight:()=>"ml-auto h-4 w-4 flex-shrink-0"}}},Pt={success:"bg-green-500",error:"bg-red-500",warning:"bg-orange-500",attention:"bg-amber-500",info:"bg-blue-500",neutral:"bg-gray-500"};function ne(t){return Pt[t]}const zt={default:"bg-white dark:bg-gray-800",bordered:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700",elevated:"bg-white dark:bg-gray-800 shadow-md",info:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 text-blue-900 dark:text-blue-300",success:"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 text-green-900 dark:text-green-300",warning:"bg-orange-50 dark:bg-orange-900/20 border border-orange-200 dark:border-orange-800 text-orange-900 dark:text-orange-300",attention:"bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 text-amber-900 dark:text-amber-300",error:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-900 dark:text-red-300"};function Dt(t){return zt[t]}const jt=({label:t,labelPosition:e="center",orientation:a="horizontal",spacing:o="md",thickness:n="thin",variant:s="light",className:l,lineClassName:g})=>{const i={horizontal:{none:"my-0",sm:"my-2",md:"my-4",lg:"my-6",xl:"my-8"},vertical:{none:"mx-0",sm:"mx-2",md:"mx-4",lg:"mx-6",xl:"mx-8"}},c={horizontal:{thin:"border-t",medium:"border-t-2",thick:"border-t-4"},vertical:{thin:"border-l",medium:"border-l-2",thick:"border-l-4"}},h={light:"border-gray-200 dark:border-gray-700",medium:"border-gray-300 dark:border-gray-600",dark:"border-gray-400 dark:border-gray-500"};if(a==="vertical")return r.jsx("div",{className:u("self-stretch",c.vertical[n],h[s],i.vertical[o],l),role:"separator","aria-orientation":"vertical"});if(!t)return r.jsx("hr",{className:u(c.horizontal[n],h[s],i.horizontal[o],g,l),role:"separator","aria-orientation":"horizontal"});const b={left:"justify-start",center:"justify-center",right:"justify-end"};return r.jsxs("div",{className:u("flex items-center",i.horizontal[o],b[e],l),role:"separator","aria-orientation":"horizontal",children:[e!=="left"&&r.jsx("div",{className:u("flex-1",c.horizontal[n],h[s],g)}),r.jsx("span",{className:u(U.body.sm(),"px-3 text-gray-500 dark:text-gray-400 whitespace-nowrap"),children:t}),e!=="right"&&r.jsx("div",{className:u("flex-1",c.horizontal[n],h[s],g)})]})},Bt=({orientation:t="horizontal",spacing:e="md",thickness:a="thin",className:o})=>{const n={horizontal:{none:"",sm:"my-1",md:"my-2",lg:"my-4"},vertical:{none:"",sm:"mx-1",md:"mx-2",lg:"mx-4"}},s={horizontal:{thin:"h-px",medium:"h-0.5",thick:"h-1"},vertical:{thin:"w-px",medium:"w-0.5",thick:"w-1"}},l=t==="horizontal";return r.jsx("div",{role:"separator","aria-orientation":t,className:u("bg-gray-200 dark:bg-gray-700",l?"w-full":"h-full",s[t][a],n[t][e],o)})},Ot=({children:t,variant:e="blue",position:a="left",width:o="thick",padding:n="md",className:s})=>{const l={blue:"border-blue-500 dark:border-blue-400",green:"border-green-500 dark:border-green-400",purple:"border-purple-500 dark:border-purple-400",indigo:"border-indigo-500 dark:border-indigo-400",emerald:"border-emerald-500 dark:border-emerald-400",orange:"border-orange-500 dark:border-orange-400",red:"border-red-500 dark:border-red-400",gray:"border-gray-400 dark:border-gray-500"},g={left:"border-l",right:"border-r",top:"border-t",bottom:"border-b"},i={thin:"2",medium:"3",thick:"4"},c={left:{sm:"pl-3",md:"pl-4",lg:"pl-6"},right:{sm:"pr-3",md:"pr-4",lg:"pr-6"},top:{sm:"pt-3",md:"pt-4",lg:"pt-6"},bottom:{sm:"pb-3",md:"pb-4",lg:"pb-6"}},h=`${g[a]}-${i[o]}`;return r.jsx("div",{className:u(h,l[e],c[a][n],s),children:t})},Wt=({children:t,title:e,position:a="bottom-right",collapsible:o=!0,defaultCollapsed:n=!1,closeable:s=!1,onClose:l,className:g})=>{const[i,c]=p.useState(n),h={"bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-right":"top-4 right-4","top-left":"top-4 left-4"};return r.jsxs("div",{className:u("fixed z-50 w-80","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-lg shadow-2xl",h[a],g),children:[(e||o||s)&&r.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700",children:[e&&r.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white",children:e}),r.jsxs("div",{className:"flex items-center gap-2",children:[o&&r.jsx("button",{onClick:()=>c(!i),className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors","aria-label":i?"Expand":"Collapse",children:r.jsx("svg",{className:u("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",i&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}),s&&r.jsx("button",{onClick:l,className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors","aria-label":"Close",children:r.jsx("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),!i&&r.jsx("div",{className:"p-4",children:t})]})},Ft=({left:t,right:e,direction:a="horizontal",initialSplit:o=.5,split:n,onSplitChange:s,minLeftSize:l=100,minRightSize:g=100,dividerSize:i=8,resizable:c=!0,className:h})=>{const[b,k]=p.useState(o),[m,f]=p.useState(!1),y=p.useRef(null),C=n!==void 0?n:b,S=N=>{c&&(N.preventDefault(),f(!0))};p.useEffect(()=>{if(!m)return;const N=x=>{const L=y.current;if(!L)return;const M=L.getBoundingClientRect();let I;a==="horizontal"?I=(x.clientX-M.left)/M.width:I=(x.clientY-M.top)/M.height,I=Math.max(0,Math.min(1,I));const $=a==="horizontal"?M.width:M.height,A=typeof l=="string"?parseFloat(l)/100*$:l,z=typeof g=="string"?parseFloat(g)/100*$:g,P=A/$,O=1-z/$;I=Math.max(P,Math.min(O,I)),n!==void 0&&s?s(I):k(I)},v=()=>{f(!1)};return document.addEventListener("mousemove",N),document.addEventListener("mouseup",v),()=>{document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",v)}},[m,a,l,g,n,s]),p.useEffect(()=>(m?(document.body.style.userSelect="none",document.body.style.cursor=a==="horizontal"?"col-resize":"row-resize"):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[m,a]);const w=a==="horizontal";return r.jsxs("div",{ref:y,className:u("w-full h-full flex",w?"flex-row":"flex-col",h),children:[r.jsx("div",{className:"overflow-auto",style:{[w?"width":"height"]:`${C*100}%`},children:t}),r.jsx("div",{onMouseDown:S,className:u("flex-shrink-0 group","bg-gray-300 dark:bg-gray-700",c&&"hover:bg-blue-500 dark:hover:bg-blue-400","transition-colors",m&&"bg-blue-500 dark:bg-blue-400",w?"cursor-col-resize":"cursor-row-resize",!c&&"cursor-default"),style:{[w?"width":"height"]:`${i}px`},children:c&&r.jsx("div",{className:u("flex items-center justify-center w-full h-full","text-gray-600 dark:text-gray-400","group-hover:text-white",m&&"text-white"),children:w?r.jsxs("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:[r.jsx("circle",{cx:"10",cy:"6",r:"1.5"}),r.jsx("circle",{cx:"10",cy:"12",r:"1.5"}),r.jsx("circle",{cx:"10",cy:"18",r:"1.5"}),r.jsx("circle",{cx:"14",cy:"6",r:"1.5"}),r.jsx("circle",{cx:"14",cy:"12",r:"1.5"}),r.jsx("circle",{cx:"14",cy:"18",r:"1.5"})]}):r.jsxs("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:[r.jsx("circle",{cx:"6",cy:"10",r:"1.5"}),r.jsx("circle",{cx:"12",cy:"10",r:"1.5"}),r.jsx("circle",{cx:"18",cy:"10",r:"1.5"}),r.jsx("circle",{cx:"6",cy:"14",r:"1.5"}),r.jsx("circle",{cx:"12",cy:"14",r:"1.5"}),r.jsx("circle",{cx:"18",cy:"14",r:"1.5"})]})})}),r.jsx("div",{className:"overflow-auto flex-1",style:{[w?"width":"height"]:`${(1-C)*100}%`},children:e})]})},Vt=({children:t,defaultWidth:e=300,defaultHeight:a=200,minWidth:o=100,minHeight:n=100,maxWidth:s,maxHeight:l,directions:g=["right","bottom","bottom-right"],onResize:i,onResizeEnd:c,showHandles:h=!0,className:b})=>{const[k,m]=p.useState(e),[f,y]=p.useState(a),[C,S]=p.useState(!1),[w,N]=p.useState(null),v=p.useRef(null),x=p.useRef({x:0,y:0,width:0,height:0}),L=$=>A=>{A.preventDefault(),A.stopPropagation(),S(!0),N($),x.current={x:A.clientX,y:A.clientY,width:k,height:f}};p.useEffect(()=>{if(!C||!w)return;const $=z=>{const P=z.clientX-x.current.x,O=z.clientY-x.current.y;let j=x.current.width,W=x.current.height;w.includes("right")?j=x.current.width+P:w.includes("left")&&(j=x.current.width-P),w.includes("bottom")?W=x.current.height+O:w.includes("top")&&(W=x.current.height-O),j=Math.max(o,j),W=Math.max(n,W),s&&(j=Math.min(s,j)),l&&(W=Math.min(l,W)),m(j),y(W),i&&i(j,W)},A=()=>{S(!1),N(null),c&&c(k,f)};return document.addEventListener("mousemove",$),document.addEventListener("mouseup",A),()=>{document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",A)}},[C,w,k,f,o,n,s,l,i,c]);const M=p.useCallback($=>({top:"ns-resize",right:"ew-resize",bottom:"ns-resize",left:"ew-resize","top-left":"nwse-resize","top-right":"nesw-resize","bottom-left":"nesw-resize","bottom-right":"nwse-resize"})[$],[]);p.useEffect(()=>(C?(document.body.style.userSelect="none",document.body.style.cursor=M(w)):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[C,w,M]);const I=$=>{if(!g.includes($))return null;const A={top:"top-0 left-0 right-0 h-1 cursor-ns-resize",right:"top-0 right-0 bottom-0 w-1 cursor-ew-resize",bottom:"bottom-0 left-0 right-0 h-1 cursor-ns-resize",left:"top-0 left-0 bottom-0 w-1 cursor-ew-resize","top-left":"top-0 left-0 w-3 h-3 cursor-nwse-resize","top-right":"top-0 right-0 w-3 h-3 cursor-nesw-resize","bottom-left":"bottom-0 left-0 w-3 h-3 cursor-nesw-resize","bottom-right":"bottom-0 right-0 w-3 h-3 cursor-nwse-resize"};return r.jsx("div",{className:u("absolute z-10",h&&"bg-blue-500 dark:bg-blue-400 opacity-0 hover:opacity-50",A[$]),onMouseDown:L($)},$)};return r.jsxs("div",{ref:v,className:u("relative",b),style:{width:`${k}px`,height:`${f}px`},children:[t,["top","right","bottom","left","top-left","top-right","bottom-left","bottom-right"].map(I)]})},Ht=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UresizableUpanels",children:e||"UresizableUpanels Component"}),qt=({children:t,maxHeight:e,hideScrollbar:a=!1,direction:o="vertical",className:n})=>{const s={vertical:"overflow-y-auto overflow-x-hidden",horizontal:"overflow-x-auto overflow-y-hidden",both:"overflow-auto"},l=a?"scrollbar-hide":u("scrollbar-thin","scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600","scrollbar-track-gray-100 dark:scrollbar-track-gray-800","hover:scrollbar-thumb-gray-400 dark:hover:scrollbar-thumb-gray-500"),g=typeof e=="number"?`${e}px`:e;return r.jsx("div",{className:u("relative",s[o],l,n),style:g?{maxHeight:g}:void 0,children:t})},_t=({children:t,columns:e=3,gap:a=16,breakpoints:o,className:n})=>{const[s,l]=p.useState(e),g=p.useRef(null);p.useEffect(()=>{if(!o)return;const h=()=>{const b=window.innerWidth,k=Object.keys(o).map(Number).sort((m,f)=>f-m);for(const m of k)if(b>=m){l(o[m]);return}l(e)};return h(),window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[o,e]);const i=p.Children.toArray(t),c=Array.from({length:s},()=>[]);return i.forEach((h,b)=>{c[b%s].push(h)}),r.jsx("div",{ref:g,className:u("flex",n),style:{gap:`${a}px`},children:c.map((h,b)=>r.jsx("div",{className:"flex-1 flex flex-col",style:{gap:`${a}px`},children:h},b))})},ee=({children:t,container:e})=>{const[a,o]=p.useState(!1);if(p.useEffect(()=>(o(!0),()=>o(!1)),[]),!a)return null;const n=e||document.body;return ir.createPortal(t,n)},xe=({isOpen:t,onClose:e,children:a,blur:o=!1,opacity:n="medium",zIndex:s=40,lockScroll:l=!0,className:g})=>{if(p.useEffect(()=>{if(l){if(t){const c=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight=`${c}px`}else document.body.style.overflow="",document.body.style.paddingRight="";return()=>{document.body.style.overflow="",document.body.style.paddingRight=""}}},[t,l]),!t)return null;const i={light:"bg-black/20 dark:bg-black/30",medium:"bg-black/50 dark:bg-black/60",dark:"bg-black/75 dark:bg-black/85"};return r.jsx(ee,{children:r.jsx("div",{className:u("fixed inset-0","transition-opacity duration-300",o&&"backdrop-blur-sm",i[n],g),style:{zIndex:s},onClick:e,"aria-hidden":"true",children:a&&r.jsx("div",{className:"relative h-full w-full",onClick:c=>c.stopPropagation(),children:a})})})},Gt=({children:t,as:e="p",size:a="base",weight:o="normal",color:n="default",align:s,transform:l="none",truncate:g=!1,lineClamp:i,className:c})=>{const h={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl"},b={light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},k={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",primary:"text-blue-600 dark:text-blue-400",success:"text-green-600 dark:text-green-400",warning:"text-yellow-600 dark:text-yellow-400",danger:"text-red-600 dark:text-red-400"},m=s?{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}[s]:"",f={none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},y=i?{display:"-webkit-box",WebkitLineClamp:i,WebkitBoxOrient:"vertical",overflow:"hidden"}:void 0;return r.jsx(e,{className:u(h[a],b[o],k[n],m,f[l],g&&"truncate",i&&"overflow-hidden",c),style:y,children:t})},Kt=({children:t,level:e=2,size:a,weight:o="bold",color:n="default",align:s,className:l})=>{const i=a||{1:"4xl",2:"3xl",3:"2xl",4:"xl",5:"lg",6:"base"}[e],c={"4xl":"text-4xl","3xl":"text-3xl","2xl":"text-2xl",xl:"text-xl",lg:"text-lg",base:"text-base"},h={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold"},b={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-700 dark:text-gray-300",primary:"text-blue-600 dark:text-blue-400"},k=s?{left:"text-left",center:"text-center",right:"text-right"}[s]:"",m=`h${e}`;return p.createElement(m,{className:u(c[i],h[o],b[n],k,l)},t)},Yt=V.cva("",{variants:{variant:{hero:U.heading.display.hero(),display:U.heading.display.lg(),h1:U.heading.h1(),h2:U.heading.h2(),h3:U.heading.h3()},responsive:{true:"",false:""},align:{left:"text-left",center:"text-center",right:"text-right"},color:{default:"text-gray-900 dark:text-white",muted:"text-gray-600 dark:text-gray-400",vibrant:"text-white",brand:"bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent"}},defaultVariants:{variant:"h1",responsive:!0,align:"left",color:"default"}}),Qt=({children:t,variant:e="h1",responsive:a=!0,align:o="left",color:n="default",className:s,as:l})=>{const g=l||(e==="hero"||e==="display"||e==="h1"?"h1":e==="h2"?"h2":"h3");return r.jsx(g,{className:u(Yt({variant:e,responsive:a,align:o,color:n}),s),children:t})},Zt=V.cva("",{variants:{variant:{h2:U.heading.h2(),h3:U.heading.h3(),h4:U.heading.h4(),h5:U.heading.h5(),h6:U.heading.h6()},spacing:{none:"",sm:"mb-2",md:"mb-4",lg:"mb-6",xl:"mb-8"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{variant:"h2",spacing:"md",align:"left"}}),Xt=({children:t,variant:e="h2",spacing:a="md",align:o="left",className:n,as:s})=>{const l=s||e;return p.createElement(l,{className:u(Zt({variant:e,spacing:a,align:o}),n)},t)},Jt=V.cva("",{variants:{variant:{body:U.body.md(),lead:U.body.lg(),large:U.body.lg(),small:U.body.sm(),caption:U.body.xs()},color:{default:"text-gray-700 dark:text-gray-300",muted:"text-gray-500 dark:text-gray-500",primary:"text-gray-900 dark:text-white"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"body",color:"default",align:"left"}}),Rt=({children:t,variant:e="body",color:a="default",align:o="left",className:n,as:s="p"})=>p.createElement(s,{className:u(Jt({variant:e,color:a,align:o}),n)},t),ea=V.cva(U.link.default(),{variants:{variant:{default:U.link.default(),subtle:U.link.subtle(),muted:U.link.muted(),button:"inline-flex items-center justify-center px-4 py-2 rounded-md bg-blue-600 text-white hover:bg-blue-700 transition-colors"},external:{true:"inline-flex items-center gap-1",false:""}},defaultVariants:{variant:"default",external:!1}}),ra=({children:t,href:e,variant:a="default",external:o=!1,className:n,target:s,rel:l})=>r.jsxs("a",{href:e,target:s||(o?"_blank":void 0),rel:l||(o?"noopener noreferrer":void 0),className:u(ea({variant:a,external:o}),n),children:[t,o&&r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}),ta=({children:t,size:e="md",variant:a="default",className:o})=>{const n={sm:"text-xs px-1 py-0.5",md:"text-sm px-1.5 py-0.5",lg:"text-base px-2 py-1"},s={default:"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100",primary:"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",success:"bg-green-50 dark:bg-green-900/30 text-green-700 dark:text-green-300",warning:"bg-yellow-50 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300",danger:"bg-red-50 dark:bg-red-900/30 text-red-700 dark:text-red-300"};return r.jsx("code",{className:u("inline-block font-mono font-medium rounded",n[e],s[a],o),children:t})},aa=({children:t,variant:e="primary",size:a="md",inline:o=!1,align:n="left",className:s,wrap:l=!1})=>{const g={primary:"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30",secondary:"text-purple-600 dark:text-purple-400 bg-purple-50 dark:bg-purple-900/30",success:"text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-900/30",warning:"text-yellow-700 dark:text-yellow-400 bg-yellow-50 dark:bg-yellow-900/30",neutral:"text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-800"},i={xs:{text:"text-xs",padding:o?"px-1.5 py-0.5":"px-2 py-1"},sm:{text:"text-sm",padding:o?"px-2 py-0.5":"px-3 py-1.5"},md:{text:"text-base",padding:o?"px-2.5 py-1":"px-4 py-2"},lg:{text:"text-lg",padding:o?"px-3 py-1":"px-4 py-2"}},c={left:"text-left",center:"text-center",right:"text-right"},h=i[a],b=o?"code":"div";return r.jsx(b,{className:u("font-mono rounded-lg",g[e],h.text,h.padding,!o&&c[n],o?"inline-block":"block",!l&&"overflow-x-auto whitespace-nowrap",l&&"break-all",s),children:t})},oa=({children:t,size:e="md",className:a})=>{const o={sm:"text-xs px-1.5 py-0.5",md:"text-sm px-2 py-1",lg:"text-base px-2.5 py-1.5"};return r.jsx("kbd",{className:u("inline-flex items-center justify-center","font-mono font-semibold","bg-gray-100 dark:bg-gray-800","text-gray-900 dark:text-gray-100","border border-gray-300 dark:border-gray-600","rounded shadow-sm",o[e],a),children:t})},na=({children:t,cite:e,variant:a="default",size:o="md",className:n})=>{const s={sm:"text-sm p-3",md:"text-base p-4",lg:"text-lg p-6"},l={sm:"text-xs",md:"text-sm",lg:"text-base"},g={default:"border-l-4 border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800/50",bordered:"border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800",accent:"border-l-4 border-blue-500 dark:border-blue-400 bg-blue-50 dark:bg-blue-900/20"};return r.jsxs("blockquote",{className:u("rounded-r-lg",s[o],g[a],n),children:[r.jsx("p",{className:"text-gray-800 dark:text-gray-200 italic",children:t}),e&&r.jsxs("footer",{className:u("mt-2 text-gray-600 dark:text-gray-400",l[o]),children:["— ",r.jsx("cite",{className:"not-italic font-medium",children:e})]})]})},sa=({children:t,variant:e="default",showIcon:a=!1,size:o="sm",className:n})=>{const s={sm:"text-sm",base:"text-base"},l={sm:"h-4 w-4",base:"h-5 w-5"},i={default:{text:"text-gray-600 dark:text-gray-400",icon:T.InformationCircleIcon},error:{text:"text-red-600 dark:text-red-400",icon:T.ExclamationCircleIcon},success:{text:"text-green-600 dark:text-green-400",icon:T.CheckCircleIcon},warning:{text:"text-yellow-600 dark:text-yellow-400",icon:T.ExclamationCircleIcon}}[e],c=i.icon;return r.jsxs("div",{className:u("flex items-start gap-1.5",n),children:[a&&r.jsx(c,{className:u(l[o],i.text,"flex-shrink-0 mt-0.5")}),r.jsx("p",{className:u(s[o],i.text),children:t})]})},la=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UscreenUreaderUtext",children:e||"UscreenUreaderUtext Component"}),ia=({children:t,maxLength:e=50,position:a="end",ellipsis:o="...",showTooltip:n=!0,className:s})=>{const l=t||"";if(l.length<=e)return r.jsx("span",{className:s,children:l});const i=(()=>{const c=o.length,h=e-c;switch(a){case"start":return o+l.slice(l.length-h);case"middle":{const b=Math.floor(h/2),k=l.slice(0,b),m=l.slice(l.length-(h-b));return k+o+m}case"end":default:return l.slice(0,h)+o}})();return r.jsx("span",{className:u("inline-block",s),title:n?l:void 0,children:i})},da=({value:t,style:e="decimal",currency:a="USD",unit:o,minimumFractionDigits:n,maximumFractionDigits:s,locale:l="en-US",notation:g="standard",className:i})=>{const c=()=>{try{const h={style:e,notation:g,minimumFractionDigits:n,maximumFractionDigits:s};return e==="currency"&&(h.currency=a),e==="unit"&&o&&(h.unit=o),new Intl.NumberFormat(l,h).format(t)}catch(h){return console.error("Number formatting error:",h),t.toLocaleString(l)}};return r.jsx("span",{className:u(i),children:c()})},ca=({date:t,showTooltip:e=!0,updateInterval:a=0,className:o})=>{const[,n]=p.useState(0),s=p.useMemo(()=>t instanceof Date?t:new Date(t),[t]);p.useEffect(()=>{if(a===0)return;const c=setInterval(()=>{n(h=>h+1)},a*1e3);return()=>clearInterval(c)},[a]);const g=(()=>{const h=new Date().getTime()-s.getTime(),b=Math.floor(h/1e3),k=Math.floor(b/60),m=Math.floor(k/60),f=Math.floor(m/24),y=Math.floor(f/7),C=Math.floor(f/30),S=Math.floor(f/365);return b<60?"just now":k<60?`${k} ${k===1?"minute":"minutes"} ago`:m<24?`${m} ${m===1?"hour":"hours"} ago`:f<7?`${f} ${f===1?"day":"days"} ago`:y<4?`${y} ${y===1?"week":"weeks"} ago`:C<12?`${C} ${C===1?"month":"months"} ago`:`${S} ${S===1?"year":"years"} ago`})(),i=s.toLocaleString();return r.jsx("time",{dateTime:s.toISOString(),title:e?i:void 0,className:u(o),children:g})},ke=({size:t="default",variant:e="default",className:a,ariaLabel:o="Loading",loadingText:n="Loading..."})=>{const s=()=>{const l={small:"w-4 h-4",default:"w-6 h-6",large:"w-8 h-8",extraLarge:"w-16 h-16 border-4"},g={default:"border-gray-300 border-t-blue-600",white:"border-white/30 border-t-white",success:"border-gray-300 border-t-green-600",warning:"border-gray-300 border-t-orange-600",error:"border-gray-300 border-t-red-600"};return`animate-spin rounded-full border-2 ${l[t]} ${g[e]}`};return r.jsx("div",{className:u(s(),a),role:"status","aria-label":o,children:r.jsx("span",{className:"sr-only",children:n})})},ga=({isLoading:t,message:e,mode:a="fullscreen",blur:o=!1,spinnerSize:n="large",className:s})=>t?r.jsxs("div",{className:u(a==="fullscreen"?"fixed":"absolute","inset-0 z-50","flex flex-col items-center justify-center","bg-white/80 dark:bg-gray-900/80",o&&"backdrop-blur-sm",s),role:"alert","aria-live":"polite","aria-busy":"true",children:[r.jsx(ke,{size:n}),e&&r.jsx("p",{className:u(U.body.md(),"text-gray-700 dark:text-gray-300 mt-4"),children:e})]}):null,ua=({size:t="md",variant:e="primary",color:a,className:o})=>{const n={sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-3 h-3"},s={primary:"bg-blue-600 dark:bg-blue-500",secondary:"bg-gray-600 dark:bg-gray-400",white:"bg-white"},l=u("rounded-full",n[t],a?"":s[e]);return r.jsxs("div",{className:u("flex items-center gap-1",o),children:[r.jsx("div",{className:l,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both",animationDelay:"-0.32s"}}),r.jsx("div",{className:l,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both",animationDelay:"-0.16s"}}),r.jsx("div",{className:l,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both"}}),r.jsx("style",{children:`
|
|
2
2
|
@keyframes loading-dot-bounce {
|
|
3
3
|
0%, 80%, 100% {
|
|
4
4
|
transform: scale(0);
|
|
@@ -9,42 +9,37 @@
|
|
|
9
9
|
opacity: 1;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
`})]})},pa=({message:t="Loading...",size:e="default",fullScreen:a=!1,variant:o="default",className:n})=>{const l={small:{spinner:"small",text:"text-sm"},default:{spinner:"default",text:"text-base"},large:{spinner:"large",text:"text-lg"}}[e],g=a?"fixed inset-0 z-50 flex items-center justify-center bg-white/80 dark:bg-gray-900/80":"flex flex-col items-center justify-center p-8",c=r.jsxs("div",{className:u(g,n),children:[r.jsx(we,{size:l.spinner,variant:o,className:"mb-4"}),t&&r.jsx("p",{className:u(l.text,"text-gray-600 dark:text-gray-400 text-center max-w-sm"),children:t})]});return a?r.jsx("div",{className:"fixed inset-0 z-50 bg-white/80 dark:bg-gray-900/80 backdrop-blur-sm",children:r.jsxs("div",{className:"flex items-center justify-center min-h-full p-4",children:[r.jsx(we,{size:l.spinner,variant:o,className:"mb-4"}),t&&r.jsx("p",{className:"text-center text-gray-600 dark:text-gray-400 max-w-sm",children:t})]})}):c},ya=({variant:t="text",width:e,height:a,className:o,count:n,lines:s=1,animate:l=!0,borderRadius:g,theme:c,spacing:i,gap:h="md"})=>{const b={text:"h-4 rounded",circle:"rounded-full",rectangle:"rounded-lg",avatar:"w-10 h-10 rounded-full",button:"h-10 rounded-lg"},x={light:"bg-gray-200",dark:"bg-gray-700"},m={sm:"space-y-1",md:"space-y-2",lg:"space-y-3"},f=n??s,p=C=>{const S={};return e&&(S.width=typeof e=="number"?`${e}px`:e),a&&(S.height=typeof a=="number"?`${a}px`:a),g&&(S.borderRadius=g),r.jsx("div",{className:u(l&&"animate-pulse",c?x[c]:"bg-gray-200 dark:bg-gray-700",b[t],o),style:S},C)};if(f>1){const C=i!==void 0?`space-y-${i}`:m[h];return r.jsx("div",{className:u(C),children:Array.from({length:f}).map((S,k)=>p(k))})}return p()},ma={info:U.InformationCircleIcon,success:U.CheckCircleIcon,warning:U.ExclamationTriangleIcon,attention:U.BellAlertIcon,error:U.XCircleIcon},va=({children:t,className:e})=>r.jsx("div",{className:u("font-medium mb-1",e),children:t}),xa=({children:t,className:e})=>r.jsx("div",{className:u("text-sm break-words",e),children:t}),Ae=({variant:t="info",title:e,description:a,icon:o,children:n,className:s})=>{const l=ma[t],g=o||r.jsx(l,{className:"h-5 w-5"}),c=typeof D.alert[t]=="function"?D.alert[t]():"";return r.jsxs("div",{role:"alert",className:u(c,s),children:[g&&r.jsx("div",{className:"flex-shrink-0",children:g}),r.jsxs("div",{className:"flex-1 min-w-0",children:[e&&r.jsx("div",{className:"font-medium mb-1 break-words",children:e}),a&&r.jsx("div",{className:"text-sm break-words",children:a}),n]})]})},ka=({message:t,variant:e="info",dismissible:a=!1,onDismiss:o,className:n})=>{const s={info:"bg-blue-100 dark:bg-blue-900/20 text-blue-800 dark:text-blue-300 border-blue-300 dark:border-blue-700",success:"bg-green-100 dark:bg-green-900/20 text-green-800 dark:text-green-300 border-green-300 dark:border-green-700",warning:"bg-yellow-100 dark:bg-yellow-900/20 text-yellow-800 dark:text-yellow-300 border-yellow-300 dark:border-yellow-700",error:"bg-red-100 dark:bg-red-900/20 text-red-800 dark:text-red-300 border-red-300 dark:border-red-700"};return r.jsxs("div",{className:u("p-4 border rounded-lg flex items-center justify-between",s[e],n),children:[r.jsx("span",{children:t}),a&&r.jsx("button",{onClick:o,className:"ml-4 font-bold",children:"×"})]})},fr=y.createContext(void 0),wa=()=>{const t=y.useContext(fr);if(!t)throw new Error("useToast must be used within ToastProvider");return t},pr=({toast:t,onRemove:e})=>{const{id:a,title:o,description:n,variant:s="default",action:l}=t,g={default:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",success:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800",error:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800",warning:"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800",info:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800"},c={default:"text-gray-600 dark:text-gray-400",success:"text-green-600 dark:text-green-400",error:"text-red-600 dark:text-red-400",warning:"text-yellow-600 dark:text-yellow-400",info:"text-blue-600 dark:text-blue-400"},i={default:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})}),success:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),error:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),warning:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),info:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})};return r.jsxs("div",{className:u("flex items-start gap-3 p-4 rounded-lg border shadow-lg","animate-in slide-in-from-top-2 fade-in duration-300","max-w-md w-full",g[s]),children:[r.jsx("div",{className:u("flex-shrink-0",c[s]),children:i[s]}),r.jsxs("div",{className:"flex-1 min-w-0",children:[o&&r.jsx("p",{className:"font-semibold text-gray-900 dark:text-white",children:o}),n&&r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mt-1",children:n}),l&&r.jsx("button",{onClick:l.onClick,className:"text-sm font-medium text-blue-600 dark:text-blue-400 hover:underline mt-2",children:l.label})]}),r.jsx("button",{onClick:()=>e(a),className:"flex-shrink-0 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close notification",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},Ca=({toast:t,onRemove:e})=>(y.useEffect(()=>{const a=t.duration??5e3;if(a>0){const o=setTimeout(()=>{e(t.id)},a);return()=>clearTimeout(o)}},[t.id,t.duration,e]),r.jsx(pr,{toast:t,onRemove:e})),Na=({children:t})=>{const[e,a]=y.useState([]),o=y.useCallback(s=>{a(l=>l.filter(g=>g.id!==s))},[]),n=y.useCallback(s=>{const l=Math.random().toString(36).substr(2,9);a(g=>[...g,{...s,id:l}])},[]);return r.jsxs(fr.Provider,{value:{toasts:e,addToast:n,removeToast:o},children:[t,r.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col gap-2 pointer-events-none",children:r.jsx("div",{className:"pointer-events-auto",children:e.map(s=>r.jsx("div",{className:"mb-2",children:r.jsx(Ca,{toast:s,onRemove:o})},s.id))})})]})},Sa=({message:t,variant:e="info",onClose:a,className:o})=>{const n={info:"bg-blue-500",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500"};return r.jsxs("div",{className:u("fixed bottom-4 right-4 p-4 rounded-lg text-white shadow-lg flex items-center gap-3",n[e],o),children:[r.jsx("span",{children:t}),a&&r.jsx("button",{onClick:a,className:"ml-4",children:"×"})]})},Ea=({count:t,maxCount:e=99,variant:a="danger",className:o})=>{const n=t>e?`${e}+`:t,s={default:"bg-gray-500",primary:"bg-blue-500",danger:"bg-red-500"};return r.jsx("span",{className:u("inline-flex items-center justify-center px-2 py-1 text-xs font-bold text-white rounded-full",s[a],o),children:n})},La=({notifications:t,onMarkAsRead:e,className:a})=>r.jsx("div",{className:u("bg-white dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-700 p-4 max-h-96 overflow-y-auto",a),children:t.map(o=>r.jsxs("div",{className:u("p-3 rounded mb-2",o.read?"bg-transparent":"bg-blue-50 dark:bg-blue-900/20"),onClick:()=>e?.(o.id),children:[r.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white",children:o.title}),r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:o.message}),r.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:o.timestamp})]},o.id))}),Ia=({children:t,variant:e="default",size:a="sm",icon:o,dot:n=!1,pill:s=!1,outline:l=!1,onClick:g,dismissible:c=!1,onDismiss:i,count:h,maxCount:b,className:x})=>{const m={default:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",warning:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",danger:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400",info:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400"},f={default:"border border-gray-300 text-gray-700 dark:border-gray-600 dark:text-gray-300",primary:"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400",success:"border border-green-600 text-green-600 dark:border-green-400 dark:text-green-400",warning:"border border-yellow-600 text-yellow-600 dark:border-yellow-400 dark:text-yellow-400",danger:"border border-red-600 text-red-600 dark:border-red-400 dark:text-red-400",info:"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400",purple:"border border-purple-600 text-purple-600 dark:border-purple-400 dark:text-purple-400"},p={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},C={sm:"h-3 w-3",md:"h-3.5 w-3.5",lg:"h-4 w-4"},S={default:"bg-gray-600 dark:bg-gray-400",primary:"bg-blue-600 dark:bg-blue-400",success:"bg-green-600 dark:bg-green-400",warning:"bg-yellow-600 dark:bg-yellow-400",danger:"bg-red-600 dark:bg-red-400",info:"bg-blue-600 dark:bg-blue-400",purple:"bg-purple-600 dark:bg-purple-400"},k=h!==void 0?b!==void 0&&h>b?`${b}+`:h.toString():null,N=r.jsxs(r.Fragment,{children:[n&&r.jsx("span",{className:u("h-2 w-2 rounded-full mr-1.5",S[e])}),o&&r.jsx("span",{className:u(C[a],"mr-1"),children:o}),t,k&&r.jsx("span",{className:"ml-1",children:k}),c&&i&&r.jsx("button",{onClick:w=>{w.stopPropagation(),i()},className:"ml-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full p-0.5","aria-label":"Dismiss",children:r.jsx(R.XMarkIcon,{className:u(C[a])})})]}),v=g?"button":"span";return r.jsx(v,{onClick:g,className:u("inline-flex items-center font-medium",l?f[e]:m[e],p[a],s?"rounded-full":"rounded",g&&"cursor-pointer hover:opacity-80",x),children:N})},Ma=t=>{switch(t){case"verified":case"success":return ne("success");case"connected":case"warning":return ne("warning");case"disconnected":case"error":return ne("error");case"pending":return ne("info");default:return ne("neutral")}},$a=t=>{switch(t){case"sm":return"w-1.5 h-1.5";case"lg":return"w-3 h-3";default:return"w-2 h-2"}},Ua=({status:t,label:e,showDot:a=!0,size:o="md"})=>{const s=e||{verified:"Verified",connected:"Connected",disconnected:"Disconnected",pending:"Pending",error:"Error",success:"Success",warning:"Warning"}[t],g=((h,b)=>{const x={sm:"small",md:"default",lg:"large"},f={verified:"success",success:"success",connected:"warning",warning:"warning",disconnected:"error",error:"error",pending:"primary"}[h]||"default",p=x[b];return p==="default"?D.badge[f]():D.badge[p](f)})(t,o),c=Ma(t),i=$a(o);return r.jsxs("span",{className:g,children:[a&&r.jsx("span",{className:`inline-block ${i} rounded-full ${c} mr-1`}),s]})},Ta=({chainType:t,size:e="md"})=>{if(t==="unknown")return null;const a=t==="solana"?"SOL":"ETH",n={sm:"small",md:"default",lg:"large"}[e],s=()=>{const l=t==="solana"?"solana":"ethereum";return n==="default"?D.badge[l]():D.badge[n](l)};return r.jsx("span",{className:s(),children:a})},Aa={xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-3 h-3",lg:"w-4 h-4"},Pa=({status:t,size:e="sm",pulse:a=!1,className:o})=>r.jsx("div",{className:u("rounded-full flex-shrink-0",ne(t),Aa[e],a&&"animate-pulse",o)}),Ce=O.forwardRef(({className:t,type:e,...a},o)=>r.jsx("input",{type:e,className:u(D.input.default(),t),ref:o,...a}));Ce.displayName="Input";const za=({value:t,onChange:e,placeholder:a,rows:o=4,disabled:n=!1,readOnly:s=!1,showCount:l=!1,maxLength:g,resize:c="vertical",size:i="md",className:h,textareaProps:b})=>{const x={sm:"p-2 text-sm",md:"p-3 text-base",lg:"p-4 text-lg"},m={none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"},f=S=>{const k=S.target.value;g&&k.length>g||e(k)},p=t.length,C=l||g!==void 0;return r.jsxs("div",{className:u("w-full",h),children:[r.jsx("textarea",{value:t,onChange:f,placeholder:a,rows:o,disabled:n,readOnly:s,maxLength:g,className:u("w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",x[i],m[c],n&&"opacity-50 cursor-not-allowed",s&&"bg-gray-50 dark:bg-gray-900 cursor-default"),...b}),C&&r.jsx("div",{className:"flex justify-end mt-1",children:r.jsxs("span",{className:u("text-xs",g&&p>g*.9?"text-yellow-600 dark:text-yellow-400":"text-gray-500 dark:text-gray-400",g&&p>=g&&"text-red-600 dark:text-red-400"),children:[p,g&&` / ${g}`]})})]})},Da=({value:t,onChange:e,min:a,max:o,step:n=1,disabled:s=!1,showSteppers:l=!1,stepperPosition:g="right",placeholder:c,size:i="md",className:h,inputProps:b})=>{const m={sm:{input:"py-1.5 px-3 text-sm",button:"w-6 h-6",icon:"h-3 w-3"},md:{input:"py-2 px-3 text-base",button:"w-8 h-8",icon:"h-4 w-4"},lg:{input:"py-3 px-4 text-lg",button:"w-10 h-10",icon:"h-5 w-5"}}[i],f=w=>{const L=parseFloat(w.target.value);if(isNaN(L))w.target.value===""&&e(a??0);else{const M=p(L);e(M)}},p=w=>{let L=w;return a!==void 0&&L<a&&(L=a),o!==void 0&&L>o&&(L=o),L},C=()=>{const w=p(t+n);e(w)},S=()=>{const w=p(t-n);e(w)},k=o===void 0||t<o,N=a===void 0||t>a,v=({onClick:w,icon:L,disabled:M,ariaLabel:I})=>r.jsx("button",{type:"button",onClick:w,disabled:s||M,"aria-label":I,className:u("inline-flex items-center justify-center","border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors",m.button,(s||M)&&"opacity-50 cursor-not-allowed"),children:L});return l&&g==="sides"?r.jsxs("div",{className:u("inline-flex items-stretch",h),children:[r.jsx(v,{onClick:S,disabled:!N,icon:r.jsx(U.MinusIcon,{className:m.icon}),ariaLabel:"Decrement"}),r.jsx("input",{type:"number",value:t,onChange:f,min:a,max:o,step:n,disabled:s,placeholder:c,className:u("border-x-0 text-center","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:z-10","transition-colors",m.input,s&&"opacity-50 cursor-not-allowed","[appearance:textfield]","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none"),...b}),r.jsx(v,{onClick:C,disabled:!k,icon:r.jsx(U.PlusIcon,{className:m.icon}),ariaLabel:"Increment"})]}):l&&g==="right"?r.jsxs("div",{className:u("inline-flex items-stretch gap-2",h),children:[r.jsx("input",{type:"number",value:t,onChange:f,min:a,max:o,step:n,disabled:s,placeholder:c,className:u("rounded-lg border","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors",m.input,s&&"opacity-50 cursor-not-allowed","[appearance:textfield]","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none"),...b}),r.jsxs("div",{className:"inline-flex flex-col gap-0.5",children:[r.jsx("button",{type:"button",onClick:C,disabled:s||!k,"aria-label":"Increment",className:u("inline-flex items-center justify-center","rounded border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors","flex-1",m.button.replace(/h-\d+/,"h-auto"),(s||!k)&&"opacity-50 cursor-not-allowed"),children:r.jsx(U.PlusIcon,{className:u(m.icon,"w-3 h-3")})}),r.jsx("button",{type:"button",onClick:S,disabled:s||!N,"aria-label":"Decrement",className:u("inline-flex items-center justify-center","rounded border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors","flex-1",m.button.replace(/h-\d+/,"h-auto"),(s||!N)&&"opacity-50 cursor-not-allowed"),children:r.jsx(U.MinusIcon,{className:u(m.icon,"w-3 h-3")})})]})]}):r.jsx("input",{type:"number",value:t,onChange:f,min:a,max:o,step:n,disabled:s,placeholder:c,className:u("rounded-lg border","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors",m.input,s&&"opacity-50 cursor-not-allowed",h),...b})},ja=({value:t,onChange:e,placeholder:a="Search...",autoFocus:o=!1,disabled:n=!1,size:s="md",showIcon:l=!0,showClear:g=!0,loading:c=!1,className:i,inputProps:h})=>{const[b,x]=y.useState(""),m=t!==void 0?t:b,f=t!==void 0,C={sm:{input:"py-1.5 text-sm",icon:"h-4 w-4",padding:l?"pl-8 pr-8":"px-3",iconLeft:"left-0 pl-2.5",iconRight:"right-0 pr-2.5"},md:{input:"py-2 text-base",icon:"h-5 w-5",padding:l?"pl-10 pr-10":"px-3",iconLeft:"left-0 pl-3",iconRight:"right-0 pr-3"},lg:{input:"py-3 text-lg",icon:"h-6 w-6",padding:l?"pl-12 pr-12":"px-4",iconLeft:"left-0 pl-3.5",iconRight:"right-0 pr-3.5"}}[s],S=y.useCallback(N=>{const v=N.target.value;f||x(v),e?.(v)},[e,f]),k=y.useCallback(()=>{f||x(""),e?.("")},[e,f]);return r.jsxs("div",{className:u("relative w-full",i),children:[l&&r.jsx("div",{className:u("absolute inset-y-0 flex items-center pointer-events-none",C.iconLeft),children:r.jsx(U.MagnifyingGlassIcon,{className:u(C.icon,"text-gray-400 dark:text-gray-500")})}),r.jsx("input",{type:"text",value:m,onChange:S,placeholder:a,autoFocus:o,disabled:n||c,className:u("block w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",C.input,C.padding,n&&"opacity-50 cursor-not-allowed",c&&"opacity-60"),...h}),g&&m&&!c&&r.jsx("button",{type:"button",onClick:k,disabled:n,className:u("absolute inset-y-0 flex items-center","text-gray-400 hover:text-gray-600 dark:hover:text-gray-300","transition-colors",n?"cursor-not-allowed":"cursor-pointer",C.iconRight),"aria-label":"Clear search",children:r.jsx(U.XMarkIcon,{className:C.icon})}),c&&r.jsx("div",{className:u("absolute inset-y-0 flex items-center",C.iconRight),children:r.jsxs("svg",{className:u(C.icon,"animate-spin text-gray-400"),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[r.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})]})},Ba=({value:t,onChange:e,type:a="date",min:o,max:n,disabled:s=!1,showIcon:l=!1,placeholder:g,size:c="md",className:i,inputProps:h})=>{const x={sm:{input:"py-1.5 text-sm",icon:"h-4 w-4",padding:l?"pl-8 pr-3":"px-3",iconLeft:"left-0 pl-2.5"},md:{input:"py-2 text-base",icon:"h-5 w-5",padding:l?"pl-10 pr-4":"px-4",iconLeft:"left-0 pl-3"},lg:{input:"py-3 text-lg",icon:"h-6 w-6",padding:l?"pl-12 pr-4":"px-4",iconLeft:"left-0 pl-3.5"}}[c],m=t instanceof Date?Wa(t,a):t,f=p=>{e(p.target.value)};return r.jsxs("div",{className:u("relative",i),children:[l&&r.jsx("div",{className:u("absolute inset-y-0 flex items-center pointer-events-none",x.iconLeft),children:r.jsx(U.CalendarIcon,{className:u(x.icon,"text-gray-400 dark:text-gray-500")})}),r.jsx("input",{type:a,value:m,onChange:f,min:o,max:n,disabled:s,placeholder:g,className:u("block w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",x.input,x.padding,s&&"opacity-50 cursor-not-allowed","appearance-none","[&::-webkit-calendar-picker-indicator]:opacity-100","[&::-webkit-calendar-picker-indicator]:cursor-pointer"),...h})]})};function Wa(t,e){const a=c=>String(c).padStart(2,"0"),o=t.getFullYear(),n=a(t.getMonth()+1),s=a(t.getDate()),l=a(t.getHours()),g=a(t.getMinutes());switch(e){case"date":return`${o}-${n}-${s}`;case"time":return`${l}:${g}`;case"datetime-local":return`${o}-${n}-${s}T${l}:${g}`;case"month":return`${o}-${n}`;case"week":{const c=new Date(o,0,1),i=Math.floor((t.getTime()-c.getTime())/(1440*60*1e3)),h=Math.ceil((i+c.getDay()+1)/7);return`${o}-W${a(h)}`}default:return`${o}-${n}-${s}`}}const yr=({value:t,onChange:e,use12Hour:a=!1,minuteStep:o=1,disabled:n=!1,className:s})=>{const[l,g]=y.useState(!1),[c,i]=y.useState("12"),[h,b]=y.useState("00"),[x,m]=y.useState("AM"),f=y.useRef(null);y.useEffect(()=>{if(t){const[N,v]=t.split(":"),w=parseInt(N,10);if(a){const L=w>=12,M=w===0?12:w>12?w-12:w;i(M.toString().padStart(2,"0")),m(L?"PM":"AM")}else i(N);b(v)}},[t,a]),y.useEffect(()=>{const N=v=>{f.current&&!f.current.contains(v.target)&&g(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);const p=()=>{if(!t)return"";const[N,v]=t.split(":"),w=parseInt(N,10);if(a){const L=w===0?12:w>12?w-12:w,M=w>=12?"PM":"AM";return`${L}:${v} ${M}`}return`${N}:${v}`},C=(N,v,w)=>{let L=parseInt(N,10);const M=parseInt(v,10);a&&w&&(w==="PM"&&L!==12?L+=12:w==="AM"&&L===12&&(L=0));const I=`${L.toString().padStart(2,"0")}:${M.toString().padStart(2,"0")}`;e(I)},S=a?Array.from({length:12},(N,v)=>(v+1).toString().padStart(2,"0")):Array.from({length:24},(N,v)=>v.toString().padStart(2,"0")),k=Array.from({length:Math.ceil(60/o)},(N,v)=>(v*o).toString().padStart(2,"0"));return r.jsxs("div",{ref:f,className:u("relative w-full",s),children:[r.jsxs("button",{type:"button",onClick:()=>!n&&g(!l),disabled:n,className:u("w-full px-3 py-2 text-sm text-left flex items-center justify-between","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",l&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[r.jsx("span",{className:u(t?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:t?p():"Select time"}),r.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})]}),l&&r.jsx("div",{className:"absolute top-full left-0 mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:r.jsxs("div",{className:"flex gap-1 p-2",children:[r.jsxs("div",{className:"flex flex-col",children:[r.jsx("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:"Hour"}),r.jsx("div",{className:"h-48 overflow-y-auto w-16 border border-gray-200 dark:border-gray-700 rounded",children:S.map(N=>r.jsx("button",{onClick:()=>{i(N),C(N,h,a?x:void 0)},className:u("w-full px-3 py-1.5 text-sm text-center","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",N===c&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:N},N))})]}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:"Min"}),r.jsx("div",{className:"h-48 overflow-y-auto w-16 border border-gray-200 dark:border-gray-700 rounded",children:k.map(N=>r.jsx("button",{onClick:()=>{b(N),C(c,N,a?x:void 0)},className:u("w-full px-3 py-1.5 text-sm text-center","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",N===h&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:N},N))})]}),a&&r.jsxs("div",{className:"flex flex-col",children:[r.jsx("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:" "}),r.jsxs("div",{className:"h-48 flex flex-col justify-center gap-2 w-16",children:[r.jsx("button",{onClick:()=>{m("AM"),C(c,h,"AM")},className:u("px-3 py-2 text-sm text-center rounded","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",x==="AM"&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:"AM"}),r.jsx("button",{onClick:()=>{m("PM"),C(c,h,"PM")},className:u("px-3 py-2 text-sm text-center rounded","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",x==="PM"&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:"PM"})]})]})]})})]})},Oa=({value:t,onChange:e,placeholder:a="Enter password",showStrength:o=!1,showRequirements:n=!1,minLength:s=8,requireUppercase:l=!0,requireLowercase:g=!0,requireNumbers:c=!0,requireSpecial:i=!0,disabled:h=!1,className:b})=>{const[x,m]=y.useState(!1),f=()=>{if(!t)return{score:0,label:"Very Weak",color:"bg-gray-300"};let S=0;t.length>=s&&S++,t.length>=12&&S++,l&&/[A-Z]/.test(t)&&S++,g&&/[a-z]/.test(t)&&S++,c&&/[0-9]/.test(t)&&S++,i&&/[^A-Za-z0-9]/.test(t)&&S++;const k=Math.min(4,Math.floor(S/6*4));return{0:{score:0,label:"Very Weak",color:"bg-red-500"},1:{score:1,label:"Weak",color:"bg-orange-500"},2:{score:2,label:"Fair",color:"bg-yellow-500"},3:{score:3,label:"Good",color:"bg-blue-500"},4:{score:4,label:"Strong",color:"bg-green-500"}}[k]},p=[{label:`At least ${s} characters`,met:t.length>=s},{label:"Uppercase letter",met:/[A-Z]/.test(t),enabled:l},{label:"Lowercase letter",met:/[a-z]/.test(t),enabled:g},{label:"Number",met:/[0-9]/.test(t),enabled:c},{label:"Special character",met:/[^A-Za-z0-9]/.test(t),enabled:i}].filter(S=>S.enabled!==!1),C=f();return r.jsxs("div",{className:u("w-full",b),children:[r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:x?"text":"password",value:t,onChange:S=>e(S.target.value),placeholder:a,disabled:h,className:u("w-full px-3 py-2 pr-10 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")}),r.jsx("button",{type:"button",onClick:()=>m(!x),disabled:h,className:u("absolute right-2 top-1/2 -translate-y-1/2","p-1.5 text-gray-600 dark:text-gray-400","hover:text-gray-900 dark:hover:text-white","transition-colors","disabled:cursor-not-allowed"),"aria-label":x?"Hide password":"Show password",children:x?r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})}):r.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})]}),o&&t&&r.jsxs("div",{className:"mt-2",children:[r.jsxs("div",{className:"flex items-center justify-between mb-1",children:[r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Password strength:"}),r.jsx("span",{className:"text-xs font-medium text-gray-900 dark:text-white",children:C.label})]}),r.jsx("div",{className:"flex gap-1",children:[0,1,2,3,4].map(S=>r.jsx("div",{className:u("h-1.5 flex-1 rounded-full transition-colors",S<=C.score?C.color:"bg-gray-200 dark:bg-gray-700")},S))})]}),n&&t&&r.jsx("div",{className:"mt-3 space-y-1.5",children:p.map((S,k)=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:u("w-4 h-4 rounded-full flex items-center justify-center flex-shrink-0",S.met?"bg-green-500 dark:bg-green-600":"bg-gray-300 dark:bg-gray-700"),children:S.met&&r.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),r.jsx("span",{className:u("text-xs",S.met?"text-green-600 dark:text-green-400":"text-gray-600 dark:text-gray-400"),children:S.label})]},k))})]})},Fa=[{code:"US",name:"United States",dialCode:"+1",flag:"🇺🇸"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"🇬🇧"},{code:"CA",name:"Canada",dialCode:"+1",flag:"🇨🇦"},{code:"AU",name:"Australia",dialCode:"+61",flag:"🇦🇺"},{code:"DE",name:"Germany",dialCode:"+49",flag:"🇩🇪"},{code:"FR",name:"France",dialCode:"+33",flag:"🇫🇷"},{code:"IT",name:"Italy",dialCode:"+39",flag:"🇮🇹"},{code:"ES",name:"Spain",dialCode:"+34",flag:"🇪🇸"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"🇲🇽"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"🇧🇷"},{code:"IN",name:"India",dialCode:"+91",flag:"🇮🇳"},{code:"CN",name:"China",dialCode:"+86",flag:"🇨🇳"},{code:"JP",name:"Japan",dialCode:"+81",flag:"🇯🇵"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"🇰🇷"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"🇸🇬"}],Va=({value:t,onChange:e,country:a,onCountryChange:o,countries:n=Fa,placeholder:s="Phone number",disabled:l=!1,className:g})=>{const[c,i]=y.useState(n[0]?.code||"US"),[h,b]=y.useState(!1),[x,m]=y.useState(""),f=a!==void 0?a:c,p=n.find(v=>v.code===f),C=v=>{a!==void 0&&o?o(v):i(v),b(!1),m("")},S=v=>{const w=v.replace(/\D/g,"");return p?.dialCode==="+1"?w.length<=3?w:w.length<=6?`(${w.slice(0,3)}) ${w.slice(3)}`:`(${w.slice(0,3)}) ${w.slice(3,6)}-${w.slice(6,10)}`:w},k=v=>{const w=S(v.target.value);e(w)},N=n.filter(v=>v.name.toLowerCase().includes(x.toLowerCase())||v.dialCode.includes(x)||v.code.toLowerCase().includes(x.toLowerCase()));return r.jsxs("div",{className:u("relative w-full",g),children:[r.jsxs("div",{className:"flex gap-2",children:[r.jsxs("div",{className:"relative",children:[r.jsxs("button",{type:"button",onClick:()=>!l&&b(!h),disabled:l,className:u("flex items-center gap-2 px-3 py-2 min-w-[120px]","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",h&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[r.jsx("span",{className:"text-xl",children:p?.flag}),r.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:p?.dialCode}),r.jsx("svg",{className:u("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",h&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),h&&r.jsxs("div",{className:"absolute top-full left-0 mt-1 w-72 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:[r.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:r.jsx("input",{type:"text",value:x,onChange:v=>m(v.target.value),placeholder:"Search countries...",className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400",onClick:v=>v.stopPropagation()})}),r.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:N.length===0?r.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:"No countries found"}):N.map(v=>r.jsxs("button",{onClick:()=>C(v.code),className:u("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",v.code===f&&"bg-blue-50 dark:bg-blue-900/30"),children:[r.jsx("span",{className:"text-xl",children:v.flag}),r.jsx("span",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:v.name}),r.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:v.dialCode})]},v.code))})]})]}),r.jsx("input",{type:"tel",value:t,onChange:k,placeholder:s,disabled:l,className:u("flex-1 px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]}),t&&p&&r.jsxs("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:["Full number: ",p.dialCode," ",t]}),h&&r.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>b(!1)})]})},Ha=({length:t=6,value:e,onChange:a,onComplete:o,type:n="text",disabled:s=!1,autoFocus:l=!1,placeholder:g="•",className:c})=>{const i=y.useRef([]),[h,b]=y.useState(null);y.useEffect(()=>{i.current=i.current.slice(0,t)},[t]),y.useEffect(()=>{l&&i.current[0]&&i.current[0].focus()},[l]),y.useEffect(()=>{e.length===t&&o&&o(e)},[e,t,o]);const x=k=>e[k]||"",m=(k,N)=>{const v=N.slice(-1),w=e.substring(0,k)+v+e.substring(k+1);a(w.slice(0,t)),v&&k<t-1&&i.current[k+1]?.focus()},f=(k,N)=>{if(N.key==="Backspace"){if(N.preventDefault(),x(k)){const v=e.substring(0,k)+e.substring(k+1);a(v)}else if(k>0){const v=e.substring(0,k-1)+e.substring(k);a(v),i.current[k-1]?.focus()}}N.key==="ArrowLeft"&&k>0&&(N.preventDefault(),i.current[k-1]?.focus()),N.key==="ArrowRight"&&k<t-1&&(N.preventDefault(),i.current[k+1]?.focus()),N.key==="Home"&&(N.preventDefault(),i.current[0]?.focus()),N.key==="End"&&(N.preventDefault(),i.current[t-1]?.focus())},p=k=>{k.preventDefault();const v=k.clipboardData.getData("text/plain").replace(/\s/g,"").slice(0,t);a(v);const w=Math.min(v.length,t-1);i.current[w]?.focus()},C=k=>{b(k),i.current[k]?.select()},S=()=>{b(null)};return r.jsx("div",{className:u("flex gap-2",c),children:Array.from({length:t},(k,N)=>{const v=x(N),w=h===N;return r.jsx("input",{ref:L=>{i.current[N]=L},type:n,inputMode:"numeric",maxLength:1,value:v,onChange:L=>m(N,L.target.value),onKeyDown:L=>f(N,L),onPaste:p,onFocus:()=>C(N),onBlur:S,disabled:s,placeholder:g,className:u("w-12 h-12 text-center text-lg font-semibold","bg-white dark:bg-gray-900","border-2 border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:border-blue-500 dark:focus:border-blue-400","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",w&&"ring-2 ring-blue-500 dark:ring-blue-400",v&&"border-gray-400 dark:border-gray-600")},N)})})},qa=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UtwoUfactorUinput",children:e||"UtwoUfactorUinput Component"}),_a=V.cva(`${T.label.default()} peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),mr=O.forwardRef(({className:t,...e},a)=>r.jsx(xe.Root,{ref:a,className:u(_a(),t),...e}));mr.displayName=xe.Root.displayName;const Pe=({label:t,value:e,onChange:a,placeholder:o,required:n=!1,error:s,className:l=""})=>r.jsxs("div",{className:l,children:[r.jsxs(mr,{htmlFor:t.toLowerCase(),className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:[t," ",n&&r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("input",{id:t.toLowerCase(),type:"email",value:e,onChange:g=>a(g.target.value),placeholder:o,className:`
|
|
13
|
-
mt-1 block w-full px-3 py-2 border rounded-md shadow-sm
|
|
14
|
-
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
|
|
15
|
-
dark:bg-gray-800 dark:border-gray-600 dark:text-white
|
|
16
|
-
${s?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
|
|
17
|
-
`}),s&&r.jsx("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:s})]}),ze=({isVisible:t,onToggle:e,showLabel:a,hideLabel:o,...n})=>{const s=t?o:a;return r.jsxs("div",{children:[r.jsxs("button",{type:"button",onClick:e,className:"flex items-center text-sm text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 mb-2",children:[t?r.jsx(U.ChevronUpIcon,{className:"h-4 w-4 mr-1"}):r.jsx(U.ChevronDownIcon,{className:"h-4 w-4 mr-1"}),s]}),t&&r.jsx(Pe,{...n})]})},Ga=({to:t,onToChange:e,cc:a="",onCcChange:o,bcc:n="",onBccChange:s,showCc:l=!1,showBcc:g=!1,onToggleCc:c,onToggleBcc:i,errors:h={},className:b="",labels:x={},placeholders:m={}})=>{const f={to:"To",cc:"CC",bcc:"BCC",addCc:"Add CC",removeCc:"Remove CC",addBcc:"Add BCC",removeBcc:"Remove BCC"},p={to:"recipient@example.com",cc:"cc@example.com",bcc:"bcc@example.com"},C={...f,...x},S={...p,...m};return r.jsxs("div",{className:`space-y-4 ${b}`,children:[r.jsx(Pe,{label:C.to,value:t,onChange:e,placeholder:S.to,required:!0,error:h.to}),c&&o&&r.jsx(ze,{label:C.cc,value:a,onChange:o,placeholder:S.cc,error:h.cc,isVisible:l,onToggle:c,showLabel:C.addCc,hideLabel:C.removeCc}),i&&s&&r.jsx(ze,{label:C.bcc,value:n,onChange:s,placeholder:S.bcc,error:h.bcc,isVisible:g,onToggle:i,showLabel:C.addBcc,hideLabel:C.removeBcc})]})},Ka=({checked:t,defaultChecked:e=!1,onChange:a,label:o,description:n,disabled:s=!1,size:l="md",variant:g="primary",color:c,className:i,id:h,name:b,value:x,required:m=!1,indeterminate:f=!1,error:p=!1,errorMessage:C,icon:S})=>{const[k,N]=y.useState(e),v=t!==void 0,w=v?t:k,L={sm:{box:"w-4 h-4",check:"w-3 h-3",text:"text-sm",desc:"text-xs"},md:{box:"w-5 h-5",check:"w-4 h-4",text:"text-base",desc:"text-sm"},lg:{box:"w-6 h-6",check:"w-5 h-5",text:"text-lg",desc:"text-base"}},I=c?{blue:"primary",green:"success",yellow:"warning",red:"error"}[c]:g,$=()=>p?w?"bg-red-600 border-red-600":"border-red-600 dark:border-red-500":{primary:w?"bg-blue-600 border-blue-600":"border-gray-300 dark:border-gray-600",success:w?"bg-green-600 border-green-600":"border-gray-300 dark:border-gray-600",warning:w?"bg-yellow-600 border-yellow-600":"border-gray-300 dark:border-gray-600",error:w?"bg-red-600 border-red-600":"border-gray-300 dark:border-gray-600"}[I],A=W=>{if(s)return;const j=W.target.checked;v||N(j),a?.(j)},z=W=>{if(!s&&(W.key===" "||W.key==="Spacebar")){W.preventDefault();const j=!w;v||N(j),a?.(j)}},P=L[l];return r.jsxs("div",{className:u("inline-flex flex-col",i),children:[r.jsxs("label",{className:u("inline-flex items-start gap-2 cursor-pointer",s&&"opacity-50 cursor-not-allowed"),children:[r.jsxs("div",{className:"relative flex items-center",children:[r.jsx("input",{type:"checkbox",checked:w,defaultChecked:v?void 0:e,onChange:A,onKeyDown:z,disabled:s,id:h,name:b,value:x,required:m,className:"sr-only peer"}),r.jsx("div",{"data-indeterminate":f?"true":void 0,className:u("rounded border-2 flex items-center justify-center transition-colors bg-white dark:bg-gray-900",P.box,$(),!s&&"hover:border-opacity-75"),children:f?r.jsx(R.MinusIcon,{className:u("text-white",P.check)}):w?S||r.jsx(R.CheckIcon,{className:u("text-white",P.check)}):null})]}),(o||n)&&r.jsxs("div",{className:"flex flex-col",children:[o&&r.jsx("span",{className:u("text-gray-900 dark:text-white",P.text),children:o}),n&&r.jsx("span",{className:u("text-gray-600 dark:text-gray-400",P.desc),children:n})]})]}),C&&r.jsx("span",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:C})]})},vr=O.forwardRef(({className:t,...e},a)=>r.jsx(oe.Root,{className:u("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-gray-200 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950 dark:data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-gray-700",t),...e,ref:a,children:r.jsx(oe.Thumb,{className:u("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));vr.displayName=oe.Root.displayName;const Ya=({name:t="radio-group",value:e,onChange:a,options:o,label:n,orientation:s="vertical",disabled:l=!1,error:g=!1,errorMessage:c,required:i=!1,size:h="md",renderOption:b,className:x})=>{const m=y.useRef(null),p={sm:{radio:"w-4 h-4",label:"text-sm",description:"text-xs"},md:{radio:"w-5 h-5",label:"text-base",description:"text-sm"},lg:{radio:"w-6 h-6",label:"text-lg",description:"text-base"}}[h],C=(k,N)=>{!l&&!N&&a(k)},S=(k,N)=>{const v=o.filter(L=>!L.disabled&&!l),w=v.findIndex(L=>L.value===o[N].value);if(k.key==="ArrowDown"||k.key==="ArrowRight"){k.preventDefault();const L=(w+1)%v.length;a(v[L].value)}else if(k.key==="ArrowUp"||k.key==="ArrowLeft"){k.preventDefault();const L=(w-1+v.length)%v.length;a(v[L].value)}};return r.jsxs("div",{className:u("w-full",x),children:[n&&r.jsx("div",{className:"mb-2",children:r.jsxs("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:[n,i&&r.jsx("span",{className:"text-red-600 ml-1",children:"*"})]})}),r.jsx("div",{ref:m,className:u(s==="horizontal"?"flex flex-row gap-4":"flex flex-col space-y-2"),role:"radiogroup",children:o.map((k,N)=>{const v=l||k.disabled,w=e===k.value;return r.jsxs("label",{className:u("flex items-start cursor-pointer",v&&"opacity-50 cursor-not-allowed",g&&"border-red-600 dark:border-red-500"),children:[r.jsx("input",{type:"radio",name:t,value:k.value,checked:w,onChange:()=>C(k.value,!!k.disabled),onKeyDown:L=>S(L,N),disabled:v,className:u("mt-0.5 mr-2",p.radio,"text-blue-600 bg-white dark:bg-gray-900","border-gray-300 dark:border-gray-600","focus:ring-blue-500 focus:ring-2","transition-colors",g&&"border-red-600 dark:border-red-500",v&&"cursor-not-allowed")}),r.jsx("div",{className:"flex-1 min-w-0",children:b?b(k):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:u("font-medium text-gray-700 dark:text-gray-300",p.label),children:k.label}),k.description&&r.jsx("p",{className:u("text-gray-500 dark:text-gray-400 mt-0.5",p.description),children:k.description})]})})]},k.value)})}),c&&r.jsx("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:c})]})},Qa=B.Root,Za=B.Group,Xa=B.Value,xr=O.forwardRef(({className:t,children:e,...a},o)=>r.jsxs(B.Trigger,{ref:o,className:u("flex h-9 w-full items-center justify-between rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...a,children:[e,r.jsx(B.Icon,{asChild:!0,children:r.jsx(X.ChevronDown,{className:"h-4 w-4 opacity-50 ml-2 flex-shrink-0"})})]}));xr.displayName=B.Trigger.displayName;const De=O.forwardRef(({className:t,...e},a)=>r.jsx(B.ScrollUpButton,{ref:a,className:u("flex cursor-default items-center justify-center py-1",t),...e,children:r.jsx(X.ChevronUp,{className:"h-4 w-4"})}));De.displayName=B.ScrollUpButton.displayName;const je=O.forwardRef(({className:t,...e},a)=>r.jsx(B.ScrollDownButton,{ref:a,className:u("flex cursor-default items-center justify-center py-1",t),...e,children:r.jsx(X.ChevronDown,{className:"h-4 w-4"})}));je.displayName=B.ScrollDownButton.displayName;const kr=O.forwardRef(({className:t,children:e,position:a="popper",...o},n)=>r.jsx(B.Portal,{children:r.jsxs(B.Content,{ref:n,className:u(D.overlays.dropdown.menu(),"z-[1000000] max-h-96 min-w-[8rem] overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...o,children:[r.jsx(De,{}),r.jsx(B.Viewport,{className:u(D.overlays.dropdown.itemContainer(),a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),r.jsx(je,{})]})}));kr.displayName=B.Content.displayName;const wr=O.forwardRef(({className:t,...e},a)=>r.jsx(B.Label,{ref:a,className:u(D.overlays.dropdown.header(),"py-1.5",t),...e}));wr.displayName=B.Label.displayName;const Cr=O.forwardRef(({className:t,children:e,...a},o)=>r.jsxs(B.Item,{ref:o,className:u(D.overlays.dropdown.item(),"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[r.jsx(B.ItemText,{children:e}),r.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(B.ItemIndicator,{children:r.jsx(X.Check,{className:"h-4 w-4"})})})]}));Cr.displayName=B.Item.displayName;const Nr=O.forwardRef(({className:t,...e},a)=>r.jsx(B.Separator,{ref:a,className:u("my-1 h-px bg-gray-200 dark:bg-gray-700",t),...e}));Nr.displayName=B.Separator.displayName;const Ja=({options:t,value:e,onChange:a,placeholder:o="Select items...",searchPlaceholder:n="Search...",searchable:s=!0,maxDisplay:l=3,disabled:g=!1,className:c})=>{const[i,h]=y.useState(!1),[b,x]=y.useState(""),m=y.useRef(null),f=s?t.filter(v=>v.label.toLowerCase().includes(b.toLowerCase())):t,p=t.filter(v=>e.includes(v.value)),C=v=>{e.includes(v)?a(e.filter(w=>w!==v)):a([...e,v])},S=v=>{a(e.filter(w=>w!==v))};y.useEffect(()=>{const v=w=>{m.current&&!m.current.contains(w.target)&&(h(!1),x(""))};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]);const k=p.length,N=k>l?k-l:0;return r.jsxs("div",{ref:m,className:u("relative w-full",c),children:[r.jsx("button",{type:"button",onClick:()=>!g&&h(!i),disabled:g,className:u("w-full min-h-[42px] px-3 py-2 text-sm text-left","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",i&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:r.jsx("div",{className:"flex flex-wrap gap-1.5",children:p.length===0?r.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:o}):r.jsxs(r.Fragment,{children:[p.slice(0,l).map(v=>r.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded text-xs font-medium",children:[v.label,r.jsx("button",{onClick:w=>{w.stopPropagation(),S(v.value)},className:"hover:text-blue-900 dark:hover:text-blue-100",children:r.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},v.value)),N>0&&r.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded text-xs font-medium",children:["+",N," more"]})]})})}),i&&r.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg",children:[s&&r.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:r.jsx("input",{type:"text",value:b,onChange:v=>x(v.target.value),placeholder:n,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400",onClick:v=>v.stopPropagation()})}),r.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:f.length===0?r.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:"No options found"}):f.map(v=>{const w=e.includes(v.value);return r.jsxs("button",{onClick:()=>!v.disabled&&C(v.value),disabled:v.disabled,className:u("w-full px-3 py-2 text-sm text-left flex items-center gap-2","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),children:[r.jsx("div",{className:u("w-4 h-4 border-2 rounded flex items-center justify-center",w?"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500":"border-gray-300 dark:border-gray-600"),children:w&&r.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),r.jsx("span",{className:"flex-1 text-gray-900 dark:text-white",children:v.label})]},v.value)})}),e.length>0&&r.jsxs("div",{className:"p-2 border-t border-gray-200 dark:border-gray-700 flex justify-between items-center",children:[r.jsxs("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:[e.length," selected"]}),r.jsx("button",{onClick:v=>{v.stopPropagation(),a([])},className:"text-xs text-blue-600 dark:text-blue-400 hover:underline",children:"Clear all"})]})]})]})},Ra=({options:t,value:e,onChange:a,placeholder:o="Select option...",searchPlaceholder:n="Search...",emptyMessage:s="No results found.",disabled:l=!1,className:g})=>{const[c,i]=y.useState(!1),[h,b]=y.useState(""),[x,m]=y.useState(0),f=y.useRef(null),p=y.useRef(null),C=t.filter(v=>v.label.toLowerCase().includes(h.toLowerCase())),S=t.find(v=>v.value===e);y.useEffect(()=>{if(!c)return;const v=w=>{f.current&&!f.current.contains(w.target)&&(i(!1),b(""))};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[c]),y.useEffect(()=>{c&&p.current&&p.current.focus()},[c]),y.useEffect(()=>{m(0)},[h]);const k=v=>{if(!c){(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),i(!0));return}switch(v.key){case"ArrowDown":v.preventDefault(),m(w=>w<C.length-1?w+1:w);break;case"ArrowUp":v.preventDefault(),m(w=>w>0?w-1:w);break;case"Enter":v.preventDefault(),C[x]&&!C[x].disabled&&(a(C[x].value),i(!1),b(""));break;case"Escape":v.preventDefault(),i(!1),b("");break}},N=(v,w)=>{w||(a(v),i(!1),b(""))};return r.jsxs("div",{ref:f,className:u("relative w-full",g),children:[r.jsxs("button",{type:"button",onClick:()=>!l&&i(!c),onKeyDown:k,disabled:l,className:u("w-full flex items-center justify-between","px-3 py-2 text-sm text-left","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",c&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[r.jsx("span",{className:u("truncate",!S&&"text-gray-500 dark:text-gray-400"),children:S?S.label:o}),r.jsx("svg",{className:u("w-4 h-4 ml-2 transition-transform",c&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),c&&r.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg",children:[r.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:r.jsx("input",{ref:p,type:"text",value:h,onChange:v=>b(v.target.value),onKeyDown:k,placeholder:n,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"})}),r.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:C.length===0?r.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:s}):C.map((v,w)=>r.jsx("button",{onClick:()=>N(v.value,v.disabled),disabled:v.disabled,className:u("w-full px-3 py-2 text-sm text-left","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",v.value===e?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":w===x?"bg-gray-100 dark:bg-gray-800":"hover:bg-gray-50 dark:hover:bg-gray-800"),children:v.label},v.value))})]})]})};function Sr(t,e){y.useEffect(()=>{const a=o=>{const n=t?.current;!n||n.contains(o?.target||null)||e(o)};return document.addEventListener("mousedown",a),document.addEventListener("touchstart",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}},[t,e])}const eo=({trigger:t,items:e,align:a="right",className:o="",variant:n="default"})=>{const[s,l]=y.useState(!1),g=y.useRef(null);Sr(g,()=>l(!1));const c=b=>{b.disabled||(b.onClick(),l(!1))},i=a==="left"?D.overlays.dropdown.menuRight():D.overlays.dropdown.menuLeft(),h=n==="bordered"?D.overlays.dropdown.triggerBordered():D.overlays.dropdown.trigger();return r.jsxs("div",{className:`${D.overlays.dropdown.container()} ${o}`,ref:g,children:[r.jsx("div",{className:h,onClick:()=>l(!s),children:t}),s&&r.jsx("div",{className:`${D.overlays.dropdown.menu()} ${i} ${D.overlays.dropdown.menuBottom()}`,children:r.jsx("div",{className:D.overlays.dropdown.itemContainer(),children:e.map(b=>b.separator?r.jsx("div",{className:"my-1 h-px bg-gray-200 dark:bg-gray-700",role:"separator"},b.id):r.jsxs("button",{onClick:()=>c(b),disabled:b.disabled,className:`${b.disabled?D.overlays.dropdown.itemDisabled():D.overlays.dropdown.item()} flex items-center gap-2`,children:[b.icon&&r.jsx(b.icon,{className:D.overlays.dropdown.itemIcon()}),r.jsx("span",{children:b.label})]},b.id))})})]})},ro=({options:t,value:e,values:a=[],onChange:o,onValuesChange:n,multiple:s=!1,size:l="md",variant:g="default",className:c})=>{const i=(m,f)=>{if(!f)if(s){const p=a.includes(m)?a.filter(C=>C!==m):[...a,m];n?.(p)}else o?.(m)},h=m=>s?a.includes(m):e===m,b={sm:"text-xs px-2 py-1",md:"text-sm px-3 py-2",lg:"text-base px-4 py-2"},x={default:{base:"bg-gray-100 dark:bg-gray-800",button:"hover:bg-gray-200 dark:hover:bg-gray-700",selected:"bg-white dark:bg-gray-900 shadow-sm"},outline:{base:"border border-gray-200 dark:border-gray-700",button:"hover:bg-gray-50 dark:hover:bg-gray-800",selected:"bg-gray-100 dark:bg-gray-800 border-gray-300 dark:border-gray-600"}};return r.jsx("div",{className:u("inline-flex rounded-lg p-1 gap-1",x[g].base,c),role:"group",children:t.map(m=>{const f=h(m.value);return r.jsxs("button",{onClick:()=>i(m.value,m.disabled),disabled:m.disabled,className:u("inline-flex items-center justify-center gap-2","rounded-md font-medium","transition-all duration-150","disabled:opacity-50 disabled:cursor-not-allowed",b[l],f?x[g].selected:x[g].button,f?"text-gray-900 dark:text-white":"text-gray-600 dark:text-gray-400"),"aria-pressed":f,children:[m.icon&&r.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:m.icon}),m.label]},m.value)})})},to=({value:t,onChange:e,min:a=0,max:o=100,step:n=1,disabled:s=!1,showValue:l=!1,formatValue:g=f=>String(f),showMinMax:c=!1,minLabel:i,maxLabel:h,variant:b="primary",size:x="md",className:m})=>{const f={sm:"h-1",md:"h-2",lg:"h-3"},p={primary:"accent-blue-600 dark:accent-blue-500",success:"accent-green-600 dark:accent-green-500",warning:"accent-yellow-600 dark:accent-yellow-500",danger:"accent-red-600 dark:accent-red-500"},C=k=>{e(Number(k.target.value))},S=(t-a)/(o-a)*100;return r.jsxs("div",{className:u("w-full",m),children:[l&&r.jsxs("div",{className:"flex justify-between items-center mb-2",children:[r.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:g(t)}),c&&r.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[i||a," - ",h||o]})]}),r.jsxs("div",{className:"relative",children:[r.jsx("div",{className:u("absolute inset-0 rounded-full","bg-gray-200 dark:bg-gray-700",f[x])}),r.jsx("div",{className:u("absolute left-0 rounded-full transition-all","bg-current",p[b],f[x]),style:{width:`${S}%`}}),r.jsx("input",{type:"range",min:a,max:o,step:n,value:t,onChange:C,disabled:s,className:u("relative w-full appearance-none bg-transparent cursor-pointer","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","rounded-lg",f[x],p[b],s&&"opacity-50 cursor-not-allowed","[&::-webkit-slider-thumb]:appearance-none","[&::-webkit-slider-thumb]:w-4","[&::-webkit-slider-thumb]:h-4","[&::-webkit-slider-thumb]:rounded-full","[&::-webkit-slider-thumb]:bg-white","[&::-webkit-slider-thumb]:border-2","[&::-webkit-slider-thumb]:border-current","[&::-webkit-slider-thumb]:shadow-md","[&::-webkit-slider-thumb]:transition-transform","[&::-webkit-slider-thumb]:hover:scale-110","[&::-moz-range-thumb]:w-4","[&::-moz-range-thumb]:h-4","[&::-moz-range-thumb]:rounded-full","[&::-moz-range-thumb]:bg-white","[&::-moz-range-thumb]:border-2","[&::-moz-range-thumb]:border-current","[&::-moz-range-thumb]:shadow-md","[&::-moz-range-thumb]:transition-transform","[&::-moz-range-thumb]:hover:scale-110")})]}),c&&!l&&r.jsxs("div",{className:"flex justify-between mt-1",children:[r.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:i||a}),r.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:h||o})]})]})},ao=({value:t,onChange:e,min:a=0,max:o=100,step:n=1,showValue:s=!0,className:l})=>r.jsxs("div",{className:u("flex items-center gap-4",l),children:[r.jsx("input",{type:"range",min:a,max:o,step:n,value:t,onChange:g=>e(Number(g.target.value)),className:"flex-1 accent-blue-500"}),s&&r.jsx("span",{className:"w-12 text-center font-semibold text-gray-900 dark:text-white",children:t})]}),oo=({onChange:t,accept:e,multiple:a=!1,maxSize:o,maxFiles:n,disabled:s=!1,showDropZone:l=!1,showFileList:g=!0,files:c=[],onRemove:i,className:h,buttonText:b="Choose Files",dropZoneText:x="Drop files here or click to browse"})=>{const m=y.useRef(null),[f,p]=y.useState(!1),[C,S]=y.useState(null),k=A=>(S(null),n&&c.length+A.length>n?(S(`Maximum ${n} files allowed`),[]):A.filter(P=>o&&P.size>o?(S(`File "${P.name}" exceeds maximum size of ${Be(o)}`),!1):!0)),N=A=>{const z=Array.from(A.target.files||[]),P=k(z);P.length>0&&t(P),m.current&&(m.current.value="")},v=()=>{m.current?.click()},w=A=>{A.preventDefault(),A.stopPropagation(),s||p(!0)},L=A=>{A.preventDefault(),A.stopPropagation(),p(!1)},M=A=>{A.preventDefault(),A.stopPropagation()},I=A=>{if(A.preventDefault(),A.stopPropagation(),p(!1),s)return;const z=Array.from(A.dataTransfer.files),P=k(z);P.length>0&&t(P)},$=A=>{i&&i(A)};return l?r.jsxs("div",{className:u("w-full",h),children:[r.jsx("input",{ref:m,type:"file",onChange:N,accept:e,multiple:a,disabled:s,className:"hidden"}),r.jsx("div",{onClick:v,onDragEnter:w,onDragLeave:L,onDragOver:M,onDrop:I,className:u("relative border-2 border-dashed rounded-lg p-8","transition-colors duration-200","cursor-pointer",f?"border-blue-500 bg-blue-50 dark:bg-blue-900/10":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500",s&&"opacity-50 cursor-not-allowed"),children:r.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3",children:[r.jsx(U.CloudArrowUpIcon,{className:"h-12 w-12 text-gray-400 dark:text-gray-500"}),r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 text-center",children:x}),o&&r.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-500",children:["Max file size: ",Be(o)]})]})}),C&&r.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:C}),g&&c.length>0&&r.jsx(Er,{files:c,onRemove:$})]}):r.jsxs("div",{className:u("w-full",h),children:[r.jsx("input",{ref:m,type:"file",onChange:N,accept:e,multiple:a,disabled:s,className:"hidden"}),r.jsxs("button",{type:"button",onClick:v,disabled:s,className:u("inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600","rounded-lg shadow-sm text-sm font-medium","text-gray-700 dark:text-gray-300","bg-white dark:bg-gray-800","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors",s&&"opacity-50 cursor-not-allowed"),children:[r.jsx(U.DocumentIcon,{className:"h-5 w-5 mr-2"}),b]}),C&&r.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:C}),g&&c.length>0&&r.jsx(Er,{files:c,onRemove:$})]})},Er=({files:t,onRemove:e})=>r.jsx("div",{className:"mt-3 space-y-2",children:t.map((a,o)=>r.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700",children:[r.jsxs("div",{className:"flex items-center space-x-2 flex-1 min-w-0",children:[r.jsx(U.DocumentIcon,{className:"h-5 w-5 text-gray-400 flex-shrink-0"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate",children:a.name}),r.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:Be(a.size)})]})]}),r.jsx("button",{type:"button",onClick:()=>e(o),className:"flex-shrink-0 p-1 text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors","aria-label":"Remove file",children:r.jsx(U.XMarkIcon,{className:"h-5 w-5"})})]},`${a.name}-${o}`))});function Be(t){if(t===0)return"0 Bytes";const e=1024,a=["Bytes","KB","MB","GB"],o=Math.floor(Math.log(t)/Math.log(e));return Math.round(t/Math.pow(e,o)*100)/100+" "+a[o]}const no=({type:t,size:e="md",colored:a=!0,className:o})=>{const n={xs:"h-3 w-3",sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-8 w-8"},s=c=>{const i=c.toLowerCase();return i.startsWith("image/")||[".jpg",".jpeg",".png",".gif",".svg",".webp",".ico"].some(h=>i.endsWith(h))?{Icon:U.PhotoIcon,color:"text-blue-600 dark:text-blue-400"}:i.startsWith("video/")||[".mp4",".avi",".mov",".wmv",".flv",".webm"].some(h=>i.endsWith(h))?{Icon:U.FilmIcon,color:"text-purple-600 dark:text-purple-400"}:i.startsWith("audio/")||[".mp3",".wav",".ogg",".m4a",".flac"].some(h=>i.endsWith(h))?{Icon:U.MusicalNoteIcon,color:"text-pink-600 dark:text-pink-400"}:i.includes("pdf")||i.endsWith(".pdf")?{Icon:U.DocumentArrowDownIcon,color:"text-red-600 dark:text-red-400"}:i.includes("word")||i.includes("document")||[".doc",".docx",".odt"].some(h=>i.endsWith(h))?{Icon:U.DocumentTextIcon,color:"text-blue-700 dark:text-blue-300"}:i.includes("excel")||i.includes("spreadsheet")||[".xls",".xlsx",".ods",".csv"].some(h=>i.endsWith(h))?{Icon:U.TableCellsIcon,color:"text-green-600 dark:text-green-400"}:[".js",".ts",".jsx",".tsx",".py",".java",".cpp",".c",".h",".css",".scss",".html",".json",".xml",".yaml",".yml",".sh",".sql"].some(h=>i.endsWith(h))?{Icon:U.CodeBracketIcon,color:"text-gray-700 dark:text-gray-300"}:i.includes("zip")||i.includes("compressed")||i.includes("archive")||[".zip",".rar",".7z",".tar",".gz",".bz2"].some(h=>i.endsWith(h))?{Icon:U.ArchiveBoxIcon,color:"text-yellow-600 dark:text-yellow-400"}:{Icon:U.DocumentIcon,color:"text-gray-600 dark:text-gray-400"}},{Icon:l,color:g}=s(t);return r.jsx(l,{className:u(n[e],a?g:"text-gray-600 dark:text-gray-400",o)})},so=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UfileUbrowser",children:e||"UfileUbrowser Component"}),lo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UfileUpreview",children:e||"UfileUpreview Component"}),io=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UfileUtree",children:e||"UfileUtree Component"}),co=({value:t,onChange:e,placeholder:a="Type and press Enter...",maxTags:o,validate:n,validator:s,separators:l=[],allowDuplicates:g=!1,disabled:c=!1,error:i=!1,errorMessage:h,variant:b="primary",renderTag:x,className:m})=>{const f=n||s,[p,C]=y.useState(""),S=y.useRef(null),k={primary:"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",secondary:"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300",success:"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300",warning:"bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300",error:"bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300"},N=I=>{const $=I.trim();$&&(o&&t.length>=o||!g&&t.includes($)||f&&!f($)||(e([...t,$]),C("")))},v=I=>{e(t.filter(($,A)=>A!==I))},w=I=>{C(I.target.value)},L=I=>{I.key==="Enter"&&(I.preventDefault(),p.trim()&&N(p)),I.key===","&&(I.preventDefault(),p.trim()&&N(p)),l.length>0&&l.includes(I.key)&&I.key!==","&&(I.preventDefault(),p.trim()&&N(p)),I.key==="Backspace"&&!p&&t.length>0&&v(t.length-1),I.key==="Escape"&&C("")},M=o!==void 0&&t.length>=o;return r.jsxs("div",{className:u("w-full",m),children:[r.jsxs("div",{className:u("min-h-[42px] px-3 py-2 flex flex-wrap gap-2 items-center","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus-within:ring-2 focus-within:ring-blue-500 dark:focus-within:ring-blue-400","transition-all",c&&"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800",i&&"border-red-500 dark:border-red-400"),onClick:()=>!c&&S.current?.focus(),children:[t.map((I,$)=>x?r.jsx(y.Fragment,{children:x(I,$,()=>v($))},$):r.jsxs("span",{className:u("inline-flex items-center gap-1.5 px-2.5 py-1",k[b],"text-sm font-medium","rounded-md","transition-colors"),children:[r.jsx("span",{className:"truncate max-w-[200px]",children:I}),r.jsx("button",{type:"button",onClick:A=>{A.stopPropagation(),v($)},disabled:c,className:u("flex-shrink-0 hover:text-blue-900 dark:hover:text-blue-100","transition-colors","disabled:cursor-not-allowed"),"aria-label":`Remove ${I}`,children:r.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},$)),r.jsx("input",{ref:S,type:"text",value:p,onChange:w,onKeyDown:L,placeholder:t.length===0?a:M?`Max ${o} tags`:"",disabled:c,className:u("flex-1 min-w-[120px] outline-none bg-transparent","text-sm text-gray-900 dark:text-white","placeholder:text-gray-500 dark:placeholder:text-gray-400","disabled:cursor-not-allowed")})]}),h&&r.jsx("p",{className:"mt-1.5 text-xs text-red-600 dark:text-red-400",children:h}),o&&r.jsxs("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:[t.length," / ",o," tags"]})]})},go=({value:t,onChange:e,mentions:a,trigger:o="@",placeholder:n="Type a message...",disabled:s=!1,className:l})=>{const[g,c]=y.useState(!1),[i,h]=y.useState([]),[b,x]=y.useState(0),[m,f]=y.useState(0),p=y.useRef(null),C=y.useRef(null),S=v=>{const w=v.target.value,L=v.target.selectionStart||0;e(w),f(L);const I=w.substring(0,L).split(/\s/),$=I[I.length-1];if($.startsWith(o)){const A=$.substring(o.length),z=a.filter(P=>P.label.toLowerCase().includes(A.toLowerCase()));h(z),c(z.length>0),x(0)}else c(!1)},k=v=>{const w=t.substring(0,m),L=t.substring(m),M=w.split(/\s/),I=M[M.length-1],$=w.length-I.length,A=t.substring(0,$)+o+v.label+" "+L;if(e(A),c(!1),p.current){const z=$+o.length+v.label.length+1;setTimeout(()=>{p.current?.focus(),p.current?.setSelectionRange(z,z)},0)}},N=v=>{if(g)switch(v.key){case"ArrowDown":v.preventDefault(),x(w=>w<i.length-1?w+1:w);break;case"ArrowUp":v.preventDefault(),x(w=>w>0?w-1:w);break;case"Enter":v.preventDefault(),i[b]&&k(i[b]);break;case"Escape":v.preventDefault(),c(!1);break}};return y.useEffect(()=>{const v=w=>{C.current&&!C.current.contains(w.target)&&p.current&&!p.current.contains(w.target)&&c(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]),r.jsxs("div",{className:u("relative w-full",l),children:[r.jsx("textarea",{ref:p,value:t,onChange:S,onKeyDown:N,placeholder:n,disabled:s,className:u("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed","resize-none","min-h-[100px]")}),g&&r.jsx("div",{ref:C,className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg max-h-60 overflow-y-auto",children:i.map((v,w)=>r.jsxs("button",{onClick:()=>k(v),className:u("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",w===b&&"bg-blue-50 dark:bg-blue-900/30"),children:[v.avatar&&r.jsx("img",{src:v.avatar,alt:v.label,className:"w-8 h-8 rounded-full"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:v.label}),v.metadata&&r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:v.metadata})]})]},v.id))})]})},uo=V.cva(`${T.label.default()} peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),We=O.forwardRef(({className:t,...e},a)=>r.jsx(xe.Root,{ref:a,className:u(uo(),t),...e}));We.displayName=xe.Root.displayName;const ho=({id:t,label:e,type:a="text",value:o,onChange:n,placeholder:s,helperText:l,error:g,required:c=!1,disabled:i=!1,maxLength:h,autoFocus:b=!1,className:x,inputClassName:m})=>{const f=!!g,p=l||g?`${t}-helper`:void 0;return r.jsxs("div",{className:u("space-y-2",x),children:[r.jsxs(We,{htmlFor:t,children:[e,c&&r.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),r.jsx(Ce,{type:a,id:t,value:o,onChange:n,placeholder:s,disabled:i,maxLength:h,autoFocus:b,required:c,"aria-invalid":f,"aria-describedby":p,className:m}),(l||g)&&r.jsx("p",{id:p,className:u(T.body.sm(),f?"text-red-600 dark:text-red-400":"text-gray-500 dark:text-gray-400"),role:f?"alert":void 0,children:g||l})]})},Ne=({label:t,required:e=!1,error:a,helpText:o,children:n,layout:s="vertical",className:l="",labelClassName:g="",contentClassName:c=""})=>{const i=s==="horizontal";return r.jsxs("div",{className:`${i?"grid grid-cols-1 md:grid-cols-3 gap-4 items-start":"space-y-2"} ${l}`,children:[r.jsxs("div",{className:i?"md:col-span-1":"",children:[r.jsxs("label",{className:`block text-sm font-medium text-gray-700 dark:text-gray-300 ${g}`,children:[t,e&&r.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),o&&!a&&r.jsxs("div",{className:"mt-1 flex items-start",children:[r.jsx(U.InformationCircleIcon,{className:"h-4 w-4 text-gray-400 mr-1 mt-0.5 flex-shrink-0"}),r.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:o})]})]}),r.jsxs("div",{className:`${i?"md:col-span-2":""} ${c}`,children:[r.jsx("div",{className:a?"relative":"",children:n}),a&&r.jsxs("div",{className:"mt-1 flex items-start",children:[r.jsx(U.ExclamationCircleIcon,{className:"h-4 w-4 text-red-500 mr-1 mt-0.5 flex-shrink-0"}),r.jsx("p",{className:"text-xs text-red-600 dark:text-red-400",children:a})]})]})]})},bo=({label:t,value:e,onChange:a,placeholder:o,required:n=!1,error:s,helpText:l,type:g="text",layout:c="vertical",className:i=""})=>r.jsx(Ne,{label:t,required:n,error:s,helpText:l,layout:c,className:i,children:r.jsx("input",{type:g,value:e,onChange:h=>a(h.target.value),placeholder:o,className:`
|
|
12
|
+
`})]})},ha=({message:t="Loading...",size:e="default",fullScreen:a=!1,variant:o="default",className:n})=>{const l={small:{spinner:"small",text:"text-sm"},default:{spinner:"default",text:"text-base"},large:{spinner:"large",text:"text-lg"}}[e],g=a?"fixed inset-0 z-50 flex items-center justify-center bg-white/80 dark:bg-gray-900/80":"flex flex-col items-center justify-center p-8",i=r.jsxs("div",{className:u(g,n),children:[r.jsx(ke,{size:l.spinner,variant:o,className:"mb-4"}),t&&r.jsx("p",{className:u(l.text,"text-gray-600 dark:text-gray-400 text-center max-w-sm"),children:t})]});return a?r.jsx("div",{className:"fixed inset-0 z-50 bg-white/80 dark:bg-gray-900/80 backdrop-blur-sm",children:r.jsxs("div",{className:"flex items-center justify-center min-h-full p-4",children:[r.jsx(ke,{size:l.spinner,variant:o,className:"mb-4"}),t&&r.jsx("p",{className:"text-center text-gray-600 dark:text-gray-400 max-w-sm",children:t})]})}):i},ba=({variant:t="text",width:e,height:a,className:o,count:n,lines:s=1,animate:l=!0,borderRadius:g,theme:i,spacing:c,gap:h="md"})=>{const b={text:"h-4 rounded",circle:"rounded-full",rectangle:"rounded-lg",avatar:"w-10 h-10 rounded-full",button:"h-10 rounded-lg"},k={light:"bg-gray-200",dark:"bg-gray-700"},m={sm:"space-y-1",md:"space-y-2",lg:"space-y-3"},f=n??s,y=C=>{const S={};return e&&(S.width=typeof e=="number"?`${e}px`:e),a&&(S.height=typeof a=="number"?`${a}px`:a),g&&(S.borderRadius=g),r.jsx("div",{className:u(l&&"animate-pulse",i?k[i]:"bg-gray-200 dark:bg-gray-700",b[t],o),style:S},C)};if(f>1){const C=c!==void 0?`space-y-${c}`:m[h];return r.jsx("div",{className:u(C),children:Array.from({length:f}).map((S,w)=>y(w))})}return y()},fa={info:T.InformationCircleIcon,success:T.CheckCircleIcon,warning:T.ExclamationTriangleIcon,attention:T.BellAlertIcon,error:T.XCircleIcon},ya=({children:t,className:e})=>r.jsx("div",{className:u("font-medium mb-1",e),children:t}),pa=({children:t,className:e})=>r.jsx("div",{className:u("text-sm break-words",e),children:t}),Ae=({variant:t="info",title:e,description:a,icon:o,children:n,className:s})=>{const l=fa[t],g=o||r.jsx(l,{className:"h-5 w-5"}),i=typeof D.alert[t]=="function"?D.alert[t]():"";return r.jsxs("div",{role:"alert",className:u(i,s),children:[g&&r.jsx("div",{className:"flex-shrink-0",children:g}),r.jsxs("div",{className:"flex-1 min-w-0",children:[e&&r.jsx("div",{className:"font-medium mb-1 break-words",children:e}),a&&r.jsx("div",{className:"text-sm break-words",children:a}),n]})]})},ma=({message:t,variant:e="info",dismissible:a=!1,onDismiss:o,className:n})=>{const s={info:"bg-blue-100 dark:bg-blue-900/20 text-blue-800 dark:text-blue-300 border-blue-300 dark:border-blue-700",success:"bg-green-100 dark:bg-green-900/20 text-green-800 dark:text-green-300 border-green-300 dark:border-green-700",warning:"bg-yellow-100 dark:bg-yellow-900/20 text-yellow-800 dark:text-yellow-300 border-yellow-300 dark:border-yellow-700",error:"bg-red-100 dark:bg-red-900/20 text-red-800 dark:text-red-300 border-red-300 dark:border-red-700"};return r.jsxs("div",{className:u("p-4 border rounded-lg flex items-center justify-between",s[e],n),children:[r.jsx("span",{children:t}),a&&r.jsx("button",{onClick:o,className:"ml-4 font-bold",children:"×"})]})},hr=p.createContext(void 0),va=()=>{const t=p.useContext(hr);if(!t)throw new Error("useToast must be used within ToastProvider");return t},br=({toast:t,onRemove:e})=>{const{id:a,title:o,description:n,variant:s="default",action:l}=t,g={default:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",success:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800",error:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800",warning:"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800",info:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800"},i={default:"text-gray-600 dark:text-gray-400",success:"text-green-600 dark:text-green-400",error:"text-red-600 dark:text-red-400",warning:"text-yellow-600 dark:text-yellow-400",info:"text-blue-600 dark:text-blue-400"},c={default:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})}),success:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),error:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),warning:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),info:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})};return r.jsxs("div",{className:u("flex items-start gap-3 p-4 rounded-lg border shadow-lg","animate-in slide-in-from-top-2 fade-in duration-300","max-w-md w-full",g[s]),children:[r.jsx("div",{className:u("flex-shrink-0",i[s]),children:c[s]}),r.jsxs("div",{className:"flex-1 min-w-0",children:[o&&r.jsx("p",{className:"font-semibold text-gray-900 dark:text-white",children:o}),n&&r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mt-1",children:n}),l&&r.jsx("button",{onClick:l.onClick,className:"text-sm font-medium text-blue-600 dark:text-blue-400 hover:underline mt-2",children:l.label})]}),r.jsx("button",{onClick:()=>e(a),className:"flex-shrink-0 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close notification",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},xa=({toast:t,onRemove:e})=>(p.useEffect(()=>{const a=t.duration??5e3;if(a>0){const o=setTimeout(()=>{e(t.id)},a);return()=>clearTimeout(o)}},[t.id,t.duration,e]),r.jsx(br,{toast:t,onRemove:e})),ka=({children:t})=>{const[e,a]=p.useState([]),o=p.useCallback(s=>{a(l=>l.filter(g=>g.id!==s))},[]),n=p.useCallback(s=>{const l=Math.random().toString(36).substr(2,9);a(g=>[...g,{...s,id:l}])},[]);return r.jsxs(hr.Provider,{value:{toasts:e,addToast:n,removeToast:o},children:[t,r.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col gap-2 pointer-events-none",children:r.jsx("div",{className:"pointer-events-auto",children:e.map(s=>r.jsx("div",{className:"mb-2",children:r.jsx(xa,{toast:s,onRemove:o})},s.id))})})]})},wa=({message:t,variant:e="info",onClose:a,className:o})=>{const n={info:"bg-blue-500",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500"};return r.jsxs("div",{className:u("fixed bottom-4 right-4 p-4 rounded-lg text-white shadow-lg flex items-center gap-3",n[e],o),children:[r.jsx("span",{children:t}),a&&r.jsx("button",{onClick:a,className:"ml-4",children:"×"})]})},Ca=({count:t,maxCount:e=99,variant:a="danger",className:o})=>{const n=t>e?`${e}+`:t,s={default:"bg-gray-500",primary:"bg-blue-500",danger:"bg-red-500"};return r.jsx("span",{className:u("inline-flex items-center justify-center px-2 py-1 text-xs font-bold text-white rounded-full",s[a],o),children:n})},Na=({notifications:t,onMarkAsRead:e,className:a})=>r.jsx("div",{className:u("bg-white dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-700 p-4 max-h-96 overflow-y-auto",a),children:t.map(o=>r.jsxs("div",{className:u("p-3 rounded mb-2",o.read?"bg-transparent":"bg-blue-50 dark:bg-blue-900/20"),onClick:()=>e?.(o.id),children:[r.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white",children:o.title}),r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:o.message}),r.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:o.timestamp})]},o.id))}),Sa=({children:t,variant:e="default",size:a="sm",icon:o,dot:n=!1,pill:s=!1,outline:l=!1,onClick:g,dismissible:i=!1,onDismiss:c,count:h,maxCount:b,className:k})=>{const m={default:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",warning:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",danger:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400",info:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400"},f={default:"border border-gray-300 text-gray-700 dark:border-gray-600 dark:text-gray-300",primary:"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400",success:"border border-green-600 text-green-600 dark:border-green-400 dark:text-green-400",warning:"border border-yellow-600 text-yellow-600 dark:border-yellow-400 dark:text-yellow-400",danger:"border border-red-600 text-red-600 dark:border-red-400 dark:text-red-400",info:"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400",purple:"border border-purple-600 text-purple-600 dark:border-purple-400 dark:text-purple-400"},y={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},C={sm:"h-3 w-3",md:"h-3.5 w-3.5",lg:"h-4 w-4"},S={default:"bg-gray-600 dark:bg-gray-400",primary:"bg-blue-600 dark:bg-blue-400",success:"bg-green-600 dark:bg-green-400",warning:"bg-yellow-600 dark:bg-yellow-400",danger:"bg-red-600 dark:bg-red-400",info:"bg-blue-600 dark:bg-blue-400",purple:"bg-purple-600 dark:bg-purple-400"},w=h!==void 0?b!==void 0&&h>b?`${b}+`:h.toString():null,N=r.jsxs(r.Fragment,{children:[n&&r.jsx("span",{className:u("h-2 w-2 rounded-full mr-1.5",S[e])}),o&&r.jsx("span",{className:u(C[a],"mr-1"),children:o}),t,w&&r.jsx("span",{className:"ml-1",children:w}),i&&c&&r.jsx("button",{onClick:x=>{x.stopPropagation(),c()},className:"ml-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full p-0.5","aria-label":"Dismiss",children:r.jsx(R.XMarkIcon,{className:u(C[a])})})]}),v=g?"button":"span";return r.jsx(v,{onClick:g,className:u("inline-flex items-center font-medium",l?f[e]:m[e],y[a],s?"rounded-full":"rounded",g&&"cursor-pointer hover:opacity-80",k),children:N})},Ea=t=>{switch(t){case"verified":case"success":return ne("success");case"connected":case"warning":return ne("warning");case"disconnected":case"error":return ne("error");case"pending":return ne("info");default:return ne("neutral")}},La=t=>{switch(t){case"sm":return"w-1.5 h-1.5";case"lg":return"w-3 h-3";default:return"w-2 h-2"}},Ia=({status:t,label:e,showDot:a=!0,size:o="md"})=>{const s=e||{verified:"Verified",connected:"Connected",disconnected:"Disconnected",pending:"Pending",error:"Error",success:"Success",warning:"Warning"}[t],g=((h,b)=>{const k={sm:"small",md:"default",lg:"large"},f={verified:"success",success:"success",connected:"warning",warning:"warning",disconnected:"error",error:"error",pending:"primary"}[h]||"default",y=k[b];return y==="default"?D.badge[f]():D.badge[y](f)})(t,o),i=Ea(t),c=La(o);return r.jsxs("span",{className:g,children:[a&&r.jsx("span",{className:`inline-block ${c} rounded-full ${i} mr-1`}),s]})},Ma=({chainType:t,size:e="md"})=>{if(t==="unknown")return null;const a=t==="solana"?"SOL":"ETH",n={sm:"small",md:"default",lg:"large"}[e],s=()=>{const l=t==="solana"?"solana":"ethereum";return n==="default"?D.badge[l]():D.badge[n](l)};return r.jsx("span",{className:s(),children:a})},$a={xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-3 h-3",lg:"w-4 h-4"},Ta=({status:t,size:e="sm",pulse:a=!1,className:o})=>r.jsx("div",{className:u("rounded-full flex-shrink-0",ne(t),$a[e],a&&"animate-pulse",o)}),we=F.forwardRef(({className:t,type:e,...a},o)=>r.jsx("input",{type:e,className:u(D.input.default(),t),ref:o,...a}));we.displayName="Input";const Aa=({value:t,onChange:e,placeholder:a,rows:o=4,disabled:n=!1,readOnly:s=!1,showCount:l=!1,maxLength:g,resize:i="vertical",size:c="md",className:h,textareaProps:b})=>{const k={sm:"p-2 text-sm",md:"p-3 text-base",lg:"p-4 text-lg"},m={none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"},f=S=>{const w=S.target.value;g&&w.length>g||e(w)},y=t.length,C=l||g!==void 0;return r.jsxs("div",{className:u("w-full",h),children:[r.jsx("textarea",{value:t,onChange:f,placeholder:a,rows:o,disabled:n,readOnly:s,maxLength:g,className:u("w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",k[c],m[i],n&&"opacity-50 cursor-not-allowed",s&&"bg-gray-50 dark:bg-gray-900 cursor-default"),...b}),C&&r.jsx("div",{className:"flex justify-end mt-1",children:r.jsxs("span",{className:u("text-xs",g&&y>g*.9?"text-yellow-600 dark:text-yellow-400":"text-gray-500 dark:text-gray-400",g&&y>=g&&"text-red-600 dark:text-red-400"),children:[y,g&&` / ${g}`]})})]})},Ua=({value:t,onChange:e,min:a,max:o,step:n=1,disabled:s=!1,showSteppers:l=!1,stepperPosition:g="right",placeholder:i,size:c="md",className:h,inputProps:b})=>{const m={sm:{input:"py-1.5 px-3 text-sm",button:"w-6 h-6",icon:"h-3 w-3"},md:{input:"py-2 px-3 text-base",button:"w-8 h-8",icon:"h-4 w-4"},lg:{input:"py-3 px-4 text-lg",button:"w-10 h-10",icon:"h-5 w-5"}}[c],f=x=>{const L=parseFloat(x.target.value);if(isNaN(L))x.target.value===""&&e(a??0);else{const M=y(L);e(M)}},y=x=>{let L=x;return a!==void 0&&L<a&&(L=a),o!==void 0&&L>o&&(L=o),L},C=()=>{const x=y(t+n);e(x)},S=()=>{const x=y(t-n);e(x)},w=o===void 0||t<o,N=a===void 0||t>a,v=({onClick:x,icon:L,disabled:M,ariaLabel:I})=>r.jsx("button",{type:"button",onClick:x,disabled:s||M,"aria-label":I,className:u("inline-flex items-center justify-center","border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors",m.button,(s||M)&&"opacity-50 cursor-not-allowed"),children:L});return l&&g==="sides"?r.jsxs("div",{className:u("inline-flex items-stretch",h),children:[r.jsx(v,{onClick:S,disabled:!N,icon:r.jsx(T.MinusIcon,{className:m.icon}),ariaLabel:"Decrement"}),r.jsx("input",{type:"number",value:t,onChange:f,min:a,max:o,step:n,disabled:s,placeholder:i,className:u("border-x-0 text-center","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:z-10","transition-colors",m.input,s&&"opacity-50 cursor-not-allowed","[appearance:textfield]","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none"),...b}),r.jsx(v,{onClick:C,disabled:!w,icon:r.jsx(T.PlusIcon,{className:m.icon}),ariaLabel:"Increment"})]}):l&&g==="right"?r.jsxs("div",{className:u("inline-flex items-stretch gap-2",h),children:[r.jsx("input",{type:"number",value:t,onChange:f,min:a,max:o,step:n,disabled:s,placeholder:i,className:u("rounded-lg border","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors",m.input,s&&"opacity-50 cursor-not-allowed","[appearance:textfield]","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none"),...b}),r.jsxs("div",{className:"inline-flex flex-col gap-0.5",children:[r.jsx("button",{type:"button",onClick:C,disabled:s||!w,"aria-label":"Increment",className:u("inline-flex items-center justify-center","rounded border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors","flex-1",m.button.replace(/h-\d+/,"h-auto"),(s||!w)&&"opacity-50 cursor-not-allowed"),children:r.jsx(T.PlusIcon,{className:u(m.icon,"w-3 h-3")})}),r.jsx("button",{type:"button",onClick:S,disabled:s||!N,"aria-label":"Decrement",className:u("inline-flex items-center justify-center","rounded border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors","flex-1",m.button.replace(/h-\d+/,"h-auto"),(s||!N)&&"opacity-50 cursor-not-allowed"),children:r.jsx(T.MinusIcon,{className:u(m.icon,"w-3 h-3")})})]})]}):r.jsx("input",{type:"number",value:t,onChange:f,min:a,max:o,step:n,disabled:s,placeholder:i,className:u("rounded-lg border","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors",m.input,s&&"opacity-50 cursor-not-allowed",h),...b})},Pa=({value:t,onChange:e,placeholder:a="Search...",autoFocus:o=!1,disabled:n=!1,size:s="md",showIcon:l=!0,showClear:g=!0,loading:i=!1,className:c,inputProps:h})=>{const[b,k]=p.useState(""),m=t!==void 0?t:b,f=t!==void 0,C={sm:{input:"py-1.5 text-sm",icon:"h-4 w-4",padding:l?"pl-8 pr-8":"px-3",iconLeft:"left-0 pl-2.5",iconRight:"right-0 pr-2.5"},md:{input:"py-2 text-base",icon:"h-5 w-5",padding:l?"pl-10 pr-10":"px-3",iconLeft:"left-0 pl-3",iconRight:"right-0 pr-3"},lg:{input:"py-3 text-lg",icon:"h-6 w-6",padding:l?"pl-12 pr-12":"px-4",iconLeft:"left-0 pl-3.5",iconRight:"right-0 pr-3.5"}}[s],S=p.useCallback(N=>{const v=N.target.value;f||k(v),e?.(v)},[e,f]),w=p.useCallback(()=>{f||k(""),e?.("")},[e,f]);return r.jsxs("div",{className:u("relative w-full",c),children:[l&&r.jsx("div",{className:u("absolute inset-y-0 flex items-center pointer-events-none",C.iconLeft),children:r.jsx(T.MagnifyingGlassIcon,{className:u(C.icon,"text-gray-400 dark:text-gray-500")})}),r.jsx("input",{type:"text",value:m,onChange:S,placeholder:a,autoFocus:o,disabled:n||i,className:u("block w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",C.input,C.padding,n&&"opacity-50 cursor-not-allowed",i&&"opacity-60"),...h}),g&&m&&!i&&r.jsx("button",{type:"button",onClick:w,disabled:n,className:u("absolute inset-y-0 flex items-center","text-gray-400 hover:text-gray-600 dark:hover:text-gray-300","transition-colors",n?"cursor-not-allowed":"cursor-pointer",C.iconRight),"aria-label":"Clear search",children:r.jsx(T.XMarkIcon,{className:C.icon})}),i&&r.jsx("div",{className:u("absolute inset-y-0 flex items-center",C.iconRight),children:r.jsxs("svg",{className:u(C.icon,"animate-spin text-gray-400"),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[r.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})]})},za=({value:t,onChange:e,type:a="date",min:o,max:n,disabled:s=!1,showIcon:l=!1,placeholder:g,size:i="md",className:c,inputProps:h})=>{const k={sm:{input:"py-1.5 text-sm",icon:"h-4 w-4",padding:l?"pl-8 pr-3":"px-3",iconLeft:"left-0 pl-2.5"},md:{input:"py-2 text-base",icon:"h-5 w-5",padding:l?"pl-10 pr-4":"px-4",iconLeft:"left-0 pl-3"},lg:{input:"py-3 text-lg",icon:"h-6 w-6",padding:l?"pl-12 pr-4":"px-4",iconLeft:"left-0 pl-3.5"}}[i],m=t instanceof Date?Da(t,a):t,f=y=>{e(y.target.value)};return r.jsxs("div",{className:u("relative",c),children:[l&&r.jsx("div",{className:u("absolute inset-y-0 flex items-center pointer-events-none",k.iconLeft),children:r.jsx(T.CalendarIcon,{className:u(k.icon,"text-gray-400 dark:text-gray-500")})}),r.jsx("input",{type:a,value:m,onChange:f,min:o,max:n,disabled:s,placeholder:g,className:u("block w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",k.input,k.padding,s&&"opacity-50 cursor-not-allowed","appearance-none","[&::-webkit-calendar-picker-indicator]:opacity-100","[&::-webkit-calendar-picker-indicator]:cursor-pointer"),...h})]})};function Da(t,e){const a=i=>String(i).padStart(2,"0"),o=t.getFullYear(),n=a(t.getMonth()+1),s=a(t.getDate()),l=a(t.getHours()),g=a(t.getMinutes());switch(e){case"date":return`${o}-${n}-${s}`;case"time":return`${l}:${g}`;case"datetime-local":return`${o}-${n}-${s}T${l}:${g}`;case"month":return`${o}-${n}`;case"week":{const i=new Date(o,0,1),c=Math.floor((t.getTime()-i.getTime())/(1440*60*1e3)),h=Math.ceil((c+i.getDay()+1)/7);return`${o}-W${a(h)}`}default:return`${o}-${n}-${s}`}}const fr=({value:t,onChange:e,use12Hour:a=!1,minuteStep:o=1,disabled:n=!1,className:s})=>{const[l,g]=p.useState(!1),[i,c]=p.useState("12"),[h,b]=p.useState("00"),[k,m]=p.useState("AM"),f=p.useRef(null);p.useEffect(()=>{if(t){const[N,v]=t.split(":"),x=parseInt(N,10);if(a){const L=x>=12,M=x===0?12:x>12?x-12:x;c(M.toString().padStart(2,"0")),m(L?"PM":"AM")}else c(N);b(v)}},[t,a]),p.useEffect(()=>{const N=v=>{f.current&&!f.current.contains(v.target)&&g(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);const y=()=>{if(!t)return"";const[N,v]=t.split(":"),x=parseInt(N,10);if(a){const L=x===0?12:x>12?x-12:x,M=x>=12?"PM":"AM";return`${L}:${v} ${M}`}return`${N}:${v}`},C=(N,v,x)=>{let L=parseInt(N,10);const M=parseInt(v,10);a&&x&&(x==="PM"&&L!==12?L+=12:x==="AM"&&L===12&&(L=0));const I=`${L.toString().padStart(2,"0")}:${M.toString().padStart(2,"0")}`;e(I)},S=a?Array.from({length:12},(N,v)=>(v+1).toString().padStart(2,"0")):Array.from({length:24},(N,v)=>v.toString().padStart(2,"0")),w=Array.from({length:Math.ceil(60/o)},(N,v)=>(v*o).toString().padStart(2,"0"));return r.jsxs("div",{ref:f,className:u("relative w-full",s),children:[r.jsxs("button",{type:"button",onClick:()=>!n&&g(!l),disabled:n,className:u("w-full px-3 py-2 text-sm text-left flex items-center justify-between","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",l&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[r.jsx("span",{className:u(t?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:t?y():"Select time"}),r.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})]}),l&&r.jsx("div",{className:"absolute top-full left-0 mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:r.jsxs("div",{className:"flex gap-1 p-2",children:[r.jsxs("div",{className:"flex flex-col",children:[r.jsx("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:"Hour"}),r.jsx("div",{className:"h-48 overflow-y-auto w-16 border border-gray-200 dark:border-gray-700 rounded",children:S.map(N=>r.jsx("button",{onClick:()=>{c(N),C(N,h,a?k:void 0)},className:u("w-full px-3 py-1.5 text-sm text-center","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",N===i&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:N},N))})]}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:"Min"}),r.jsx("div",{className:"h-48 overflow-y-auto w-16 border border-gray-200 dark:border-gray-700 rounded",children:w.map(N=>r.jsx("button",{onClick:()=>{b(N),C(i,N,a?k:void 0)},className:u("w-full px-3 py-1.5 text-sm text-center","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",N===h&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:N},N))})]}),a&&r.jsxs("div",{className:"flex flex-col",children:[r.jsx("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:" "}),r.jsxs("div",{className:"h-48 flex flex-col justify-center gap-2 w-16",children:[r.jsx("button",{onClick:()=>{m("AM"),C(i,h,"AM")},className:u("px-3 py-2 text-sm text-center rounded","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",k==="AM"&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:"AM"}),r.jsx("button",{onClick:()=>{m("PM"),C(i,h,"PM")},className:u("px-3 py-2 text-sm text-center rounded","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",k==="PM"&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:"PM"})]})]})]})})]})},ja=[{code:"US",name:"United States",dialCode:"+1",flag:"🇺🇸"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"🇬🇧"},{code:"CA",name:"Canada",dialCode:"+1",flag:"🇨🇦"},{code:"AU",name:"Australia",dialCode:"+61",flag:"🇦🇺"},{code:"DE",name:"Germany",dialCode:"+49",flag:"🇩🇪"},{code:"FR",name:"France",dialCode:"+33",flag:"🇫🇷"},{code:"IT",name:"Italy",dialCode:"+39",flag:"🇮🇹"},{code:"ES",name:"Spain",dialCode:"+34",flag:"🇪🇸"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"🇲🇽"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"🇧🇷"},{code:"IN",name:"India",dialCode:"+91",flag:"🇮🇳"},{code:"CN",name:"China",dialCode:"+86",flag:"🇨🇳"},{code:"JP",name:"Japan",dialCode:"+81",flag:"🇯🇵"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"🇰🇷"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"🇸🇬"}],Ba=({value:t,onChange:e,country:a,onCountryChange:o,countries:n=ja,placeholder:s="Phone number",disabled:l=!1,className:g})=>{const[i,c]=p.useState(n[0]?.code||"US"),[h,b]=p.useState(!1),[k,m]=p.useState(""),f=a!==void 0?a:i,y=n.find(v=>v.code===f),C=v=>{a!==void 0&&o?o(v):c(v),b(!1),m("")},S=v=>{const x=v.replace(/\D/g,"");return y?.dialCode==="+1"?x.length<=3?x:x.length<=6?`(${x.slice(0,3)}) ${x.slice(3)}`:`(${x.slice(0,3)}) ${x.slice(3,6)}-${x.slice(6,10)}`:x},w=v=>{const x=S(v.target.value);e(x)},N=n.filter(v=>v.name.toLowerCase().includes(k.toLowerCase())||v.dialCode.includes(k)||v.code.toLowerCase().includes(k.toLowerCase()));return r.jsxs("div",{className:u("relative w-full",g),children:[r.jsxs("div",{className:"flex gap-2",children:[r.jsxs("div",{className:"relative",children:[r.jsxs("button",{type:"button",onClick:()=>!l&&b(!h),disabled:l,className:u("flex items-center gap-2 px-3 py-2 min-w-[120px]","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",h&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[r.jsx("span",{className:"text-xl",children:y?.flag}),r.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:y?.dialCode}),r.jsx("svg",{className:u("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",h&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),h&&r.jsxs("div",{className:"absolute top-full left-0 mt-1 w-72 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:[r.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:r.jsx("input",{type:"text",value:k,onChange:v=>m(v.target.value),placeholder:"Search countries...",className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400",onClick:v=>v.stopPropagation()})}),r.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:N.length===0?r.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:"No countries found"}):N.map(v=>r.jsxs("button",{onClick:()=>C(v.code),className:u("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",v.code===f&&"bg-blue-50 dark:bg-blue-900/30"),children:[r.jsx("span",{className:"text-xl",children:v.flag}),r.jsx("span",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:v.name}),r.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:v.dialCode})]},v.code))})]})]}),r.jsx("input",{type:"tel",value:t,onChange:w,placeholder:s,disabled:l,className:u("flex-1 px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]}),t&&y&&r.jsxs("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:["Full number: ",y.dialCode," ",t]}),h&&r.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>b(!1)})]})},Oa=({checked:t,defaultChecked:e=!1,onChange:a,label:o,description:n,disabled:s=!1,size:l="md",variant:g="primary",color:i,className:c,id:h,name:b,value:k,required:m=!1,indeterminate:f=!1,error:y=!1,errorMessage:C,icon:S})=>{const[w,N]=p.useState(e),v=t!==void 0,x=v?t:w,L={sm:{box:"w-4 h-4",check:"w-3 h-3",text:"text-sm",desc:"text-xs"},md:{box:"w-5 h-5",check:"w-4 h-4",text:"text-base",desc:"text-sm"},lg:{box:"w-6 h-6",check:"w-5 h-5",text:"text-lg",desc:"text-base"}},I=i?{blue:"primary",green:"success",yellow:"warning",red:"error"}[i]:g,$=()=>y?x?"bg-red-600 border-red-600":"border-red-600 dark:border-red-500":{primary:x?"bg-blue-600 border-blue-600":"border-gray-300 dark:border-gray-600",success:x?"bg-green-600 border-green-600":"border-gray-300 dark:border-gray-600",warning:x?"bg-yellow-600 border-yellow-600":"border-gray-300 dark:border-gray-600",error:x?"bg-red-600 border-red-600":"border-gray-300 dark:border-gray-600"}[I],A=O=>{if(s)return;const j=O.target.checked;v||N(j),a?.(j)},z=O=>{if(!s&&(O.key===" "||O.key==="Spacebar")){O.preventDefault();const j=!x;v||N(j),a?.(j)}},P=L[l];return r.jsxs("div",{className:u("inline-flex flex-col",c),children:[r.jsxs("label",{className:u("inline-flex items-start gap-2 cursor-pointer",s&&"opacity-50 cursor-not-allowed"),children:[r.jsxs("div",{className:"relative flex items-center",children:[r.jsx("input",{type:"checkbox",checked:x,defaultChecked:v?void 0:e,onChange:A,onKeyDown:z,disabled:s,id:h,name:b,value:k,required:m,className:"sr-only peer"}),r.jsx("div",{"data-indeterminate":f?"true":void 0,className:u("rounded border-2 flex items-center justify-center transition-colors bg-white dark:bg-gray-900",P.box,$(),!s&&"hover:border-opacity-75"),children:f?r.jsx(R.MinusIcon,{className:u("text-white",P.check)}):x?S||r.jsx(R.CheckIcon,{className:u("text-white",P.check)}):null})]}),(o||n)&&r.jsxs("div",{className:"flex flex-col",children:[o&&r.jsx("span",{className:u("text-gray-900 dark:text-white",P.text),children:o}),n&&r.jsx("span",{className:u("text-gray-600 dark:text-gray-400",P.desc),children:n})]})]}),C&&r.jsx("span",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:C})]})},yr=F.forwardRef(({className:t,...e},a)=>r.jsx(oe.Root,{className:u("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-gray-200 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950 dark:data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-gray-700",t),...e,ref:a,children:r.jsx(oe.Thumb,{className:u("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));yr.displayName=oe.Root.displayName;const Wa=({name:t="radio-group",value:e,onChange:a,options:o,label:n,orientation:s="vertical",disabled:l=!1,error:g=!1,errorMessage:i,required:c=!1,size:h="md",renderOption:b,className:k})=>{const m=p.useRef(null),y={sm:{radio:"w-4 h-4",label:"text-sm",description:"text-xs"},md:{radio:"w-5 h-5",label:"text-base",description:"text-sm"},lg:{radio:"w-6 h-6",label:"text-lg",description:"text-base"}}[h],C=(w,N)=>{!l&&!N&&a(w)},S=(w,N)=>{const v=o.filter(L=>!L.disabled&&!l),x=v.findIndex(L=>L.value===o[N].value);if(w.key==="ArrowDown"||w.key==="ArrowRight"){w.preventDefault();const L=(x+1)%v.length;a(v[L].value)}else if(w.key==="ArrowUp"||w.key==="ArrowLeft"){w.preventDefault();const L=(x-1+v.length)%v.length;a(v[L].value)}};return r.jsxs("div",{className:u("w-full",k),children:[n&&r.jsx("div",{className:"mb-2",children:r.jsxs("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:[n,c&&r.jsx("span",{className:"text-red-600 ml-1",children:"*"})]})}),r.jsx("div",{ref:m,className:u(s==="horizontal"?"flex flex-row gap-4":"flex flex-col space-y-2"),role:"radiogroup",children:o.map((w,N)=>{const v=l||w.disabled,x=e===w.value;return r.jsxs("label",{className:u("flex items-start cursor-pointer",v&&"opacity-50 cursor-not-allowed",g&&"border-red-600 dark:border-red-500"),children:[r.jsx("input",{type:"radio",name:t,value:w.value,checked:x,onChange:()=>C(w.value,!!w.disabled),onKeyDown:L=>S(L,N),disabled:v,className:u("mt-0.5 mr-2",y.radio,"text-blue-600 bg-white dark:bg-gray-900","border-gray-300 dark:border-gray-600","focus:ring-blue-500 focus:ring-2","transition-colors",g&&"border-red-600 dark:border-red-500",v&&"cursor-not-allowed")}),r.jsx("div",{className:"flex-1 min-w-0",children:b?b(w):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:u("font-medium text-gray-700 dark:text-gray-300",y.label),children:w.label}),w.description&&r.jsx("p",{className:u("text-gray-500 dark:text-gray-400 mt-0.5",y.description),children:w.description})]})})]},w.value)})}),i&&r.jsx("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:i})]})},Fa=B.Root,Va=B.Group,Ha=B.Value,pr=F.forwardRef(({className:t,children:e,...a},o)=>r.jsxs(B.Trigger,{ref:o,className:u("flex h-9 w-full items-center justify-between rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...a,children:[e,r.jsx(B.Icon,{asChild:!0,children:r.jsx(X.ChevronDown,{className:"h-4 w-4 opacity-50 ml-2 flex-shrink-0"})})]}));pr.displayName=B.Trigger.displayName;const Ue=F.forwardRef(({className:t,...e},a)=>r.jsx(B.ScrollUpButton,{ref:a,className:u("flex cursor-default items-center justify-center py-1",t),...e,children:r.jsx(X.ChevronUp,{className:"h-4 w-4"})}));Ue.displayName=B.ScrollUpButton.displayName;const Pe=F.forwardRef(({className:t,...e},a)=>r.jsx(B.ScrollDownButton,{ref:a,className:u("flex cursor-default items-center justify-center py-1",t),...e,children:r.jsx(X.ChevronDown,{className:"h-4 w-4"})}));Pe.displayName=B.ScrollDownButton.displayName;const mr=F.forwardRef(({className:t,children:e,position:a="popper",...o},n)=>r.jsx(B.Portal,{children:r.jsxs(B.Content,{ref:n,className:u(D.overlays.dropdown.menu(),"z-[1000000] max-h-96 min-w-[8rem] overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...o,children:[r.jsx(Ue,{}),r.jsx(B.Viewport,{className:u(D.overlays.dropdown.itemContainer(),a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),r.jsx(Pe,{})]})}));mr.displayName=B.Content.displayName;const vr=F.forwardRef(({className:t,...e},a)=>r.jsx(B.Label,{ref:a,className:u(D.overlays.dropdown.header(),"py-1.5",t),...e}));vr.displayName=B.Label.displayName;const xr=F.forwardRef(({className:t,children:e,...a},o)=>r.jsxs(B.Item,{ref:o,className:u(D.overlays.dropdown.item(),"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[r.jsx(B.ItemText,{children:e}),r.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(B.ItemIndicator,{children:r.jsx(X.Check,{className:"h-4 w-4"})})})]}));xr.displayName=B.Item.displayName;const kr=F.forwardRef(({className:t,...e},a)=>r.jsx(B.Separator,{ref:a,className:u("my-1 h-px bg-gray-200 dark:bg-gray-700",t),...e}));kr.displayName=B.Separator.displayName;const qa=({options:t,value:e,onChange:a,placeholder:o="Select items...",searchPlaceholder:n="Search...",searchable:s=!0,maxDisplay:l=3,disabled:g=!1,className:i})=>{const[c,h]=p.useState(!1),[b,k]=p.useState(""),m=p.useRef(null),f=s?t.filter(v=>v.label.toLowerCase().includes(b.toLowerCase())):t,y=t.filter(v=>e.includes(v.value)),C=v=>{e.includes(v)?a(e.filter(x=>x!==v)):a([...e,v])},S=v=>{a(e.filter(x=>x!==v))};p.useEffect(()=>{const v=x=>{m.current&&!m.current.contains(x.target)&&(h(!1),k(""))};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]);const w=y.length,N=w>l?w-l:0;return r.jsxs("div",{ref:m,className:u("relative w-full",i),children:[r.jsx("button",{type:"button",onClick:()=>!g&&h(!c),disabled:g,className:u("w-full min-h-[42px] px-3 py-2 text-sm text-left","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",c&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:r.jsx("div",{className:"flex flex-wrap gap-1.5",children:y.length===0?r.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:o}):r.jsxs(r.Fragment,{children:[y.slice(0,l).map(v=>r.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded text-xs font-medium",children:[v.label,r.jsx("button",{onClick:x=>{x.stopPropagation(),S(v.value)},className:"hover:text-blue-900 dark:hover:text-blue-100",children:r.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},v.value)),N>0&&r.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded text-xs font-medium",children:["+",N," more"]})]})})}),c&&r.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg",children:[s&&r.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:r.jsx("input",{type:"text",value:b,onChange:v=>k(v.target.value),placeholder:n,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400",onClick:v=>v.stopPropagation()})}),r.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:f.length===0?r.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:"No options found"}):f.map(v=>{const x=e.includes(v.value);return r.jsxs("button",{onClick:()=>!v.disabled&&C(v.value),disabled:v.disabled,className:u("w-full px-3 py-2 text-sm text-left flex items-center gap-2","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),children:[r.jsx("div",{className:u("w-4 h-4 border-2 rounded flex items-center justify-center",x?"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500":"border-gray-300 dark:border-gray-600"),children:x&&r.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),r.jsx("span",{className:"flex-1 text-gray-900 dark:text-white",children:v.label})]},v.value)})}),e.length>0&&r.jsxs("div",{className:"p-2 border-t border-gray-200 dark:border-gray-700 flex justify-between items-center",children:[r.jsxs("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:[e.length," selected"]}),r.jsx("button",{onClick:v=>{v.stopPropagation(),a([])},className:"text-xs text-blue-600 dark:text-blue-400 hover:underline",children:"Clear all"})]})]})]})},_a=({options:t,value:e,onChange:a,placeholder:o="Select option...",searchPlaceholder:n="Search...",emptyMessage:s="No results found.",disabled:l=!1,className:g})=>{const[i,c]=p.useState(!1),[h,b]=p.useState(""),[k,m]=p.useState(0),f=p.useRef(null),y=p.useRef(null),C=t.filter(v=>v.label.toLowerCase().includes(h.toLowerCase())),S=t.find(v=>v.value===e);p.useEffect(()=>{if(!i)return;const v=x=>{f.current&&!f.current.contains(x.target)&&(c(!1),b(""))};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[i]),p.useEffect(()=>{i&&y.current&&y.current.focus()},[i]),p.useEffect(()=>{m(0)},[h]);const w=v=>{if(!i){(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),c(!0));return}switch(v.key){case"ArrowDown":v.preventDefault(),m(x=>x<C.length-1?x+1:x);break;case"ArrowUp":v.preventDefault(),m(x=>x>0?x-1:x);break;case"Enter":v.preventDefault(),C[k]&&!C[k].disabled&&(a(C[k].value),c(!1),b(""));break;case"Escape":v.preventDefault(),c(!1),b("");break}},N=(v,x)=>{x||(a(v),c(!1),b(""))};return r.jsxs("div",{ref:f,className:u("relative w-full",g),children:[r.jsxs("button",{type:"button",onClick:()=>!l&&c(!i),onKeyDown:w,disabled:l,className:u("w-full flex items-center justify-between","px-3 py-2 text-sm text-left","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",i&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[r.jsx("span",{className:u("truncate",!S&&"text-gray-500 dark:text-gray-400"),children:S?S.label:o}),r.jsx("svg",{className:u("w-4 h-4 ml-2 transition-transform",i&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),i&&r.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg",children:[r.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:r.jsx("input",{ref:y,type:"text",value:h,onChange:v=>b(v.target.value),onKeyDown:w,placeholder:n,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"})}),r.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:C.length===0?r.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:s}):C.map((v,x)=>r.jsx("button",{onClick:()=>N(v.value,v.disabled),disabled:v.disabled,className:u("w-full px-3 py-2 text-sm text-left","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",v.value===e?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":x===k?"bg-gray-100 dark:bg-gray-800":"hover:bg-gray-50 dark:hover:bg-gray-800"),children:v.label},v.value))})]})]})};function wr(t,e){p.useEffect(()=>{const a=o=>{const n=t?.current;!n||n.contains(o?.target||null)||e(o)};return document.addEventListener("mousedown",a),document.addEventListener("touchstart",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}},[t,e])}const Ga=({trigger:t,items:e,align:a="right",className:o="",variant:n="default"})=>{const[s,l]=p.useState(!1),g=p.useRef(null);wr(g,()=>l(!1));const i=b=>{b.disabled||(b.onClick(),l(!1))},c=a==="left"?D.overlays.dropdown.menuRight():D.overlays.dropdown.menuLeft(),h=n==="bordered"?D.overlays.dropdown.triggerBordered():D.overlays.dropdown.trigger();return r.jsxs("div",{className:`${D.overlays.dropdown.container()} ${o}`,ref:g,children:[r.jsx("div",{className:h,onClick:()=>l(!s),children:t}),s&&r.jsx("div",{className:`${D.overlays.dropdown.menu()} ${c} ${D.overlays.dropdown.menuBottom()}`,children:r.jsx("div",{className:D.overlays.dropdown.itemContainer(),children:e.map(b=>b.separator?r.jsx("div",{className:"my-1 h-px bg-gray-200 dark:bg-gray-700",role:"separator"},b.id):r.jsxs("button",{onClick:()=>i(b),disabled:b.disabled,className:`${b.disabled?D.overlays.dropdown.itemDisabled():D.overlays.dropdown.item()} flex items-center gap-2`,children:[b.icon&&r.jsx(b.icon,{className:D.overlays.dropdown.itemIcon()}),r.jsx("span",{children:b.label})]},b.id))})})]})},Ka=({options:t,value:e,values:a=[],onChange:o,onValuesChange:n,multiple:s=!1,size:l="md",variant:g="default",className:i})=>{const c=(m,f)=>{if(!f)if(s){const y=a.includes(m)?a.filter(C=>C!==m):[...a,m];n?.(y)}else o?.(m)},h=m=>s?a.includes(m):e===m,b={sm:"text-xs px-2 py-1",md:"text-sm px-3 py-2",lg:"text-base px-4 py-2"},k={default:{base:"bg-gray-100 dark:bg-gray-800",button:"hover:bg-gray-200 dark:hover:bg-gray-700",selected:"bg-white dark:bg-gray-900 shadow-sm"},outline:{base:"border border-gray-200 dark:border-gray-700",button:"hover:bg-gray-50 dark:hover:bg-gray-800",selected:"bg-gray-100 dark:bg-gray-800 border-gray-300 dark:border-gray-600"}};return r.jsx("div",{className:u("inline-flex rounded-lg p-1 gap-1",k[g].base,i),role:"group",children:t.map(m=>{const f=h(m.value);return r.jsxs("button",{onClick:()=>c(m.value,m.disabled),disabled:m.disabled,className:u("inline-flex items-center justify-center gap-2","rounded-md font-medium","transition-all duration-150","disabled:opacity-50 disabled:cursor-not-allowed",b[l],f?k[g].selected:k[g].button,f?"text-gray-900 dark:text-white":"text-gray-600 dark:text-gray-400"),"aria-pressed":f,children:[m.icon&&r.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:m.icon}),m.label]},m.value)})})},Ya=({value:t,onChange:e,min:a=0,max:o=100,step:n=1,disabled:s=!1,showValue:l=!1,formatValue:g=f=>String(f),showMinMax:i=!1,minLabel:c,maxLabel:h,variant:b="primary",size:k="md",className:m})=>{const f={sm:"h-1",md:"h-2",lg:"h-3"},y={primary:"accent-blue-600 dark:accent-blue-500",success:"accent-green-600 dark:accent-green-500",warning:"accent-yellow-600 dark:accent-yellow-500",danger:"accent-red-600 dark:accent-red-500"},C=w=>{e(Number(w.target.value))},S=(t-a)/(o-a)*100;return r.jsxs("div",{className:u("w-full",m),children:[l&&r.jsxs("div",{className:"flex justify-between items-center mb-2",children:[r.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:g(t)}),i&&r.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[c||a," - ",h||o]})]}),r.jsxs("div",{className:"relative",children:[r.jsx("div",{className:u("absolute inset-0 rounded-full","bg-gray-200 dark:bg-gray-700",f[k])}),r.jsx("div",{className:u("absolute left-0 rounded-full transition-all","bg-current",y[b],f[k]),style:{width:`${S}%`}}),r.jsx("input",{type:"range",min:a,max:o,step:n,value:t,onChange:C,disabled:s,className:u("relative w-full appearance-none bg-transparent cursor-pointer","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","rounded-lg",f[k],y[b],s&&"opacity-50 cursor-not-allowed","[&::-webkit-slider-thumb]:appearance-none","[&::-webkit-slider-thumb]:w-4","[&::-webkit-slider-thumb]:h-4","[&::-webkit-slider-thumb]:rounded-full","[&::-webkit-slider-thumb]:bg-white","[&::-webkit-slider-thumb]:border-2","[&::-webkit-slider-thumb]:border-current","[&::-webkit-slider-thumb]:shadow-md","[&::-webkit-slider-thumb]:transition-transform","[&::-webkit-slider-thumb]:hover:scale-110","[&::-moz-range-thumb]:w-4","[&::-moz-range-thumb]:h-4","[&::-moz-range-thumb]:rounded-full","[&::-moz-range-thumb]:bg-white","[&::-moz-range-thumb]:border-2","[&::-moz-range-thumb]:border-current","[&::-moz-range-thumb]:shadow-md","[&::-moz-range-thumb]:transition-transform","[&::-moz-range-thumb]:hover:scale-110")})]}),i&&!l&&r.jsxs("div",{className:"flex justify-between mt-1",children:[r.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:c||a}),r.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:h||o})]})]})},Qa=({value:t,onChange:e,min:a=0,max:o=100,step:n=1,showValue:s=!0,className:l})=>r.jsxs("div",{className:u("flex items-center gap-4",l),children:[r.jsx("input",{type:"range",min:a,max:o,step:n,value:t,onChange:g=>e(Number(g.target.value)),className:"flex-1 accent-blue-500"}),s&&r.jsx("span",{className:"w-12 text-center font-semibold text-gray-900 dark:text-white",children:t})]}),Za=({onChange:t,accept:e,multiple:a=!1,maxSize:o,maxFiles:n,disabled:s=!1,showDropZone:l=!1,showFileList:g=!0,files:i=[],onRemove:c,className:h,buttonText:b="Choose Files",dropZoneText:k="Drop files here or click to browse"})=>{const m=p.useRef(null),[f,y]=p.useState(!1),[C,S]=p.useState(null),w=A=>(S(null),n&&i.length+A.length>n?(S(`Maximum ${n} files allowed`),[]):A.filter(P=>o&&P.size>o?(S(`File "${P.name}" exceeds maximum size of ${ze(o)}`),!1):!0)),N=A=>{const z=Array.from(A.target.files||[]),P=w(z);P.length>0&&t(P),m.current&&(m.current.value="")},v=()=>{m.current?.click()},x=A=>{A.preventDefault(),A.stopPropagation(),s||y(!0)},L=A=>{A.preventDefault(),A.stopPropagation(),y(!1)},M=A=>{A.preventDefault(),A.stopPropagation()},I=A=>{if(A.preventDefault(),A.stopPropagation(),y(!1),s)return;const z=Array.from(A.dataTransfer.files),P=w(z);P.length>0&&t(P)},$=A=>{c&&c(A)};return l?r.jsxs("div",{className:u("w-full",h),children:[r.jsx("input",{ref:m,type:"file",onChange:N,accept:e,multiple:a,disabled:s,className:"hidden"}),r.jsx("div",{onClick:v,onDragEnter:x,onDragLeave:L,onDragOver:M,onDrop:I,className:u("relative border-2 border-dashed rounded-lg p-8","transition-colors duration-200","cursor-pointer",f?"border-blue-500 bg-blue-50 dark:bg-blue-900/10":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500",s&&"opacity-50 cursor-not-allowed"),children:r.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3",children:[r.jsx(T.CloudArrowUpIcon,{className:"h-12 w-12 text-gray-400 dark:text-gray-500"}),r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 text-center",children:k}),o&&r.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-500",children:["Max file size: ",ze(o)]})]})}),C&&r.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:C}),g&&i.length>0&&r.jsx(Cr,{files:i,onRemove:$})]}):r.jsxs("div",{className:u("w-full",h),children:[r.jsx("input",{ref:m,type:"file",onChange:N,accept:e,multiple:a,disabled:s,className:"hidden"}),r.jsxs("button",{type:"button",onClick:v,disabled:s,className:u("inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600","rounded-lg shadow-sm text-sm font-medium","text-gray-700 dark:text-gray-300","bg-white dark:bg-gray-800","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors",s&&"opacity-50 cursor-not-allowed"),children:[r.jsx(T.DocumentIcon,{className:"h-5 w-5 mr-2"}),b]}),C&&r.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:C}),g&&i.length>0&&r.jsx(Cr,{files:i,onRemove:$})]})},Cr=({files:t,onRemove:e})=>r.jsx("div",{className:"mt-3 space-y-2",children:t.map((a,o)=>r.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700",children:[r.jsxs("div",{className:"flex items-center space-x-2 flex-1 min-w-0",children:[r.jsx(T.DocumentIcon,{className:"h-5 w-5 text-gray-400 flex-shrink-0"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate",children:a.name}),r.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:ze(a.size)})]})]}),r.jsx("button",{type:"button",onClick:()=>e(o),className:"flex-shrink-0 p-1 text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors","aria-label":"Remove file",children:r.jsx(T.XMarkIcon,{className:"h-5 w-5"})})]},`${a.name}-${o}`))});function ze(t){if(t===0)return"0 Bytes";const e=1024,a=["Bytes","KB","MB","GB"],o=Math.floor(Math.log(t)/Math.log(e));return Math.round(t/Math.pow(e,o)*100)/100+" "+a[o]}const Xa=({value:t,onChange:e,placeholder:a="Type and press Enter...",maxTags:o,validate:n,validator:s,separators:l=[],allowDuplicates:g=!1,disabled:i=!1,error:c=!1,errorMessage:h,variant:b="primary",renderTag:k,className:m})=>{const f=n||s,[y,C]=p.useState(""),S=p.useRef(null),w={primary:"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",secondary:"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300",success:"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300",warning:"bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300",error:"bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300"},N=I=>{const $=I.trim();$&&(o&&t.length>=o||!g&&t.includes($)||f&&!f($)||(e([...t,$]),C("")))},v=I=>{e(t.filter(($,A)=>A!==I))},x=I=>{C(I.target.value)},L=I=>{I.key==="Enter"&&(I.preventDefault(),y.trim()&&N(y)),I.key===","&&(I.preventDefault(),y.trim()&&N(y)),l.length>0&&l.includes(I.key)&&I.key!==","&&(I.preventDefault(),y.trim()&&N(y)),I.key==="Backspace"&&!y&&t.length>0&&v(t.length-1),I.key==="Escape"&&C("")},M=o!==void 0&&t.length>=o;return r.jsxs("div",{className:u("w-full",m),children:[r.jsxs("div",{className:u("min-h-[42px] px-3 py-2 flex flex-wrap gap-2 items-center","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus-within:ring-2 focus-within:ring-blue-500 dark:focus-within:ring-blue-400","transition-all",i&&"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800",c&&"border-red-500 dark:border-red-400"),onClick:()=>!i&&S.current?.focus(),children:[t.map((I,$)=>k?r.jsx(p.Fragment,{children:k(I,$,()=>v($))},$):r.jsxs("span",{className:u("inline-flex items-center gap-1.5 px-2.5 py-1",w[b],"text-sm font-medium","rounded-md","transition-colors"),children:[r.jsx("span",{className:"truncate max-w-[200px]",children:I}),r.jsx("button",{type:"button",onClick:A=>{A.stopPropagation(),v($)},disabled:i,className:u("flex-shrink-0 hover:text-blue-900 dark:hover:text-blue-100","transition-colors","disabled:cursor-not-allowed"),"aria-label":`Remove ${I}`,children:r.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},$)),r.jsx("input",{ref:S,type:"text",value:y,onChange:x,onKeyDown:L,placeholder:t.length===0?a:M?`Max ${o} tags`:"",disabled:i,className:u("flex-1 min-w-[120px] outline-none bg-transparent","text-sm text-gray-900 dark:text-white","placeholder:text-gray-500 dark:placeholder:text-gray-400","disabled:cursor-not-allowed")})]}),h&&r.jsx("p",{className:"mt-1.5 text-xs text-red-600 dark:text-red-400",children:h}),o&&r.jsxs("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:[t.length," / ",o," tags"]})]})},Ja=({value:t,onChange:e,mentions:a,trigger:o="@",placeholder:n="Type a message...",disabled:s=!1,className:l})=>{const[g,i]=p.useState(!1),[c,h]=p.useState([]),[b,k]=p.useState(0),[m,f]=p.useState(0),y=p.useRef(null),C=p.useRef(null),S=v=>{const x=v.target.value,L=v.target.selectionStart||0;e(x),f(L);const I=x.substring(0,L).split(/\s/),$=I[I.length-1];if($.startsWith(o)){const A=$.substring(o.length),z=a.filter(P=>P.label.toLowerCase().includes(A.toLowerCase()));h(z),i(z.length>0),k(0)}else i(!1)},w=v=>{const x=t.substring(0,m),L=t.substring(m),M=x.split(/\s/),I=M[M.length-1],$=x.length-I.length,A=t.substring(0,$)+o+v.label+" "+L;if(e(A),i(!1),y.current){const z=$+o.length+v.label.length+1;setTimeout(()=>{y.current?.focus(),y.current?.setSelectionRange(z,z)},0)}},N=v=>{if(g)switch(v.key){case"ArrowDown":v.preventDefault(),k(x=>x<c.length-1?x+1:x);break;case"ArrowUp":v.preventDefault(),k(x=>x>0?x-1:x);break;case"Enter":v.preventDefault(),c[b]&&w(c[b]);break;case"Escape":v.preventDefault(),i(!1);break}};return p.useEffect(()=>{const v=x=>{C.current&&!C.current.contains(x.target)&&y.current&&!y.current.contains(x.target)&&i(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]),r.jsxs("div",{className:u("relative w-full",l),children:[r.jsx("textarea",{ref:y,value:t,onChange:S,onKeyDown:N,placeholder:n,disabled:s,className:u("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed","resize-none","min-h-[100px]")}),g&&r.jsx("div",{ref:C,className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg max-h-60 overflow-y-auto",children:c.map((v,x)=>r.jsxs("button",{onClick:()=>w(v),className:u("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",x===b&&"bg-blue-50 dark:bg-blue-900/30"),children:[v.avatar&&r.jsx("img",{src:v.avatar,alt:v.label,className:"w-8 h-8 rounded-full"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:v.label}),v.metadata&&r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:v.metadata})]})]},v.id))})]})},Ra=V.cva(`${U.label.default()} peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),De=F.forwardRef(({className:t,...e},a)=>r.jsx(dr.Root,{ref:a,className:u(Ra(),t),...e}));De.displayName=dr.Root.displayName;const eo=({id:t,label:e,type:a="text",value:o,onChange:n,placeholder:s,helperText:l,error:g,required:i=!1,disabled:c=!1,maxLength:h,autoFocus:b=!1,className:k,inputClassName:m})=>{const f=!!g,y=l||g?`${t}-helper`:void 0;return r.jsxs("div",{className:u("space-y-2",k),children:[r.jsxs(De,{htmlFor:t,children:[e,i&&r.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),r.jsx(we,{type:a,id:t,value:o,onChange:n,placeholder:s,disabled:c,maxLength:h,autoFocus:b,required:i,"aria-invalid":f,"aria-describedby":y,className:m}),(l||g)&&r.jsx("p",{id:y,className:u(U.body.sm(),f?"text-red-600 dark:text-red-400":"text-gray-500 dark:text-gray-400"),role:f?"alert":void 0,children:g||l})]})},Ce=({label:t,required:e=!1,error:a,helpText:o,children:n,layout:s="vertical",className:l="",labelClassName:g="",contentClassName:i=""})=>{const c=s==="horizontal";return r.jsxs("div",{className:`${c?"grid grid-cols-1 md:grid-cols-3 gap-4 items-start":"space-y-2"} ${l}`,children:[r.jsxs("div",{className:c?"md:col-span-1":"",children:[r.jsxs("label",{className:`block text-sm font-medium text-gray-700 dark:text-gray-300 ${g}`,children:[t,e&&r.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),o&&!a&&r.jsxs("div",{className:"mt-1 flex items-start",children:[r.jsx(T.InformationCircleIcon,{className:"h-4 w-4 text-gray-400 mr-1 mt-0.5 flex-shrink-0"}),r.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:o})]})]}),r.jsxs("div",{className:`${c?"md:col-span-2":""} ${i}`,children:[r.jsx("div",{className:a?"relative":"",children:n}),a&&r.jsxs("div",{className:"mt-1 flex items-start",children:[r.jsx(T.ExclamationCircleIcon,{className:"h-4 w-4 text-red-500 mr-1 mt-0.5 flex-shrink-0"}),r.jsx("p",{className:"text-xs text-red-600 dark:text-red-400",children:a})]})]})]})},ro=({label:t,value:e,onChange:a,placeholder:o,required:n=!1,error:s,helpText:l,type:g="text",layout:i="vertical",className:c=""})=>r.jsx(Ce,{label:t,required:n,error:s,helpText:l,layout:i,className:c,children:r.jsx("input",{type:g,value:e,onChange:h=>a(h.target.value),placeholder:o,className:`
|
|
18
13
|
block w-full px-3 py-2 border rounded-md shadow-sm
|
|
19
14
|
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
|
|
20
15
|
dark:bg-gray-800 dark:border-gray-600 dark:text-white
|
|
21
16
|
transition-colors duration-200
|
|
22
17
|
${s?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
|
|
23
|
-
`})}),
|
|
18
|
+
`})}),to=({label:t,value:e,onChange:a,placeholder:o,required:n=!1,error:s,helpText:l,rows:g=4,layout:i="vertical",className:c=""})=>r.jsx(Ce,{label:t,required:n,error:s,helpText:l,layout:i,className:c,children:r.jsx("textarea",{value:e,onChange:h=>a(h.target.value),placeholder:o,rows:g,className:`
|
|
24
19
|
block w-full px-3 py-2 border rounded-md shadow-sm
|
|
25
20
|
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
|
|
26
21
|
dark:bg-gray-800 dark:border-gray-600 dark:text-white
|
|
27
22
|
transition-colors duration-200 resize-vertical
|
|
28
23
|
${s?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
|
|
29
|
-
`})}),
|
|
24
|
+
`})}),ao=({label:t,value:e,onChange:a,options:o,required:n=!1,error:s,helpText:l,placeholder:g="Select an option",layout:i="vertical",className:c=""})=>r.jsx(Ce,{label:t,required:n,error:s,helpText:l,layout:i,className:c,children:r.jsxs("select",{value:e,onChange:h=>a(h.target.value),className:`
|
|
30
25
|
block w-full px-3 py-2 border rounded-md shadow-sm
|
|
31
26
|
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
|
|
32
27
|
dark:bg-gray-800 dark:border-gray-600 dark:text-white
|
|
33
28
|
transition-colors duration-200
|
|
34
29
|
${s?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
|
|
35
|
-
`,children:[g&&r.jsx("option",{value:"",disabled:!0,children:g}),o.map(h=>r.jsx("option",{value:h.value,disabled:h.disabled,children:h.label},h.value))]})}),yo=({successMessage:t,errorMessage:e,successTitle:a="Success",errorTitle:o="Error",autoDismissDelay:n=0,onSuccessDismiss:s,className:l=""})=>(y.useEffect(()=>{if(t&&n>0&&s){const g=setTimeout(()=>{s()},n);return()=>clearTimeout(g)}},[t,n,s]),!t&&!e?null:r.jsxs("div",{className:`space-y-3 ${l}`,children:[e&&r.jsx(Ae,{variant:"error",title:o,description:e}),t&&r.jsx(Ae,{variant:"success",title:a,description:t})]})),mo=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"PhoneDirectory",children:e||"PhoneDirectory Component"}),vo=V.cva("min-h-[44px] touch-manipulation",{variants:{variant:{default:"",primary:"",secondary:"",outline:"",ghost:"",destructive:"","destructive-outline":"",success:"",link:"",gradient:"","gradient-secondary":"","gradient-success":"",wallet:"",connect:"",disconnect:""},size:{default:"",sm:"h-8",lg:"h-12",icon:"h-10 w-10 p-0"},animation:{none:"transition-colors duration-200",hover:"transition-all duration-200 hover:scale-105",lift:"transition-all duration-200 hover:scale-105",scale:"transition-transform duration-200 hover:scale-95",glow:"transition-all duration-200 hover:shadow-lg",shimmer:"transition-all duration-200",tap:"transition-transform duration-100 active:scale-95",connect:"transition-all duration-200 hover:scale-105",transaction:"transition-all duration-200 animate-pulse",disconnect:"transition-all duration-200 hover:opacity-80"}},defaultVariants:{variant:"default",size:"default",animation:"hover"}}),J=O.forwardRef(({className:t,variant:e,size:a,animation:o,asChild:n=!1,...s},l)=>{const g=n?yt.Slot:"button",c=e||"default",i=a&&a!=="default"&&a!=="icon"?a:void 0,h=m=>m?{sm:"small",lg:"large",default:"default"}[m]||m:"default",x=(()=>{if(c.startsWith("gradient")){const m=c.replace("gradient-","").replace("gradient","primary");return D.button.gradient[m]?.()||D.button.primary.default()}else{if(["wallet","connect","disconnect"].includes(c))return D.button.web3[c]?.()||D.button.primary.default();{const m=h(i);return D.button[c]?.[m]?.()||D.button.primary.default()}}})();return r.jsx(g,{className:u(vo({size:a,animation:o}),x,t),ref:l,...s})});J.displayName="Button";const xo=({size:t="default",variant:e="default",className:a,ariaLabel:o="Loading",loadingText:n="Loading..."})=>{const s=()=>{const l={small:"w-4 h-4",default:"w-6 h-6",large:"w-8 h-8",extraLarge:"w-16 h-16 border-4"},g={default:"border-gray-300 border-t-blue-600",white:"border-white/30 border-t-white",success:"border-gray-300 border-t-green-600",warning:"border-gray-300 border-t-orange-600",error:"border-gray-300 border-t-red-600"};return`animate-spin rounded-full border-2 ${l[t]} ${g[e]}`};return r.jsx("div",{className:u(s(),a),role:"status","aria-label":o,children:r.jsx("span",{className:"sr-only",children:n})})},ko=({children:t,isLoading:e=!1,loadingText:a="Loading...",showSpinner:o=!0,disabled:n,...s})=>r.jsx(J,{...s,disabled:n||e,className:s.className,children:e?r.jsxs("span",{className:"flex items-center gap-2",children:[o&&r.jsx(xo,{size:"small"}),r.jsx("span",{children:a})]}):t}),wo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UinlineUedit",children:e||"UinlineUedit Component"}),Co=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UprivacyUtoggle",children:e||"UprivacyUtoggle Component"}),No=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UpasswordUstrength",children:e||"UpasswordUstrength Component"}),Lr=({value:t,onChange:e,minDate:a,maxDate:o,disabledDates:n=[],showOutsideDays:s=!0,className:l})=>{const[g,c]=y.useState(t||new Date),i=v=>{const w=v.getFullYear(),L=v.getMonth();return new Date(w,L+1,0).getDate()},h=v=>{const w=v.getFullYear(),L=v.getMonth();return new Date(w,L,1).getDay()},b=(v,w)=>v.getFullYear()===w.getFullYear()&&v.getMonth()===w.getMonth()&&v.getDate()===w.getDate(),x=v=>a&&v<a||o&&v>o?!0:n.some(w=>b(v,w)),m=()=>{c(new Date(g.getFullYear(),g.getMonth()-1))},f=()=>{c(new Date(g.getFullYear(),g.getMonth()+1))},C=(()=>{const v=g.getFullYear(),w=g.getMonth(),L=i(g),M=h(g),I=[];if(s){const $=i(new Date(v,w-1));for(let A=M-1;A>=0;A--)I.push(new Date(v,w-1,$-A))}else for(let $=0;$<M;$++)I.push(null);for(let $=1;$<=L;$++)I.push(new Date(v,w,$));if(s){const $=42-I.length;for(let A=1;A<=$;A++)I.push(new Date(v,w+1,A))}return I})(),S=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],k=v=>{!v||x(v)||e(v)},N=g.toLocaleDateString("en-US",{month:"long",year:"numeric"});return r.jsxs("div",{className:u("bg-white dark:bg-gray-900 rounded-lg p-4",l),children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("button",{onClick:m,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Previous month",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),r.jsx("h2",{className:"text-base font-semibold text-gray-900 dark:text-white",children:N}),r.jsx("button",{onClick:f,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Next month",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),r.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:S.map(v=>r.jsx("div",{className:"text-center text-xs font-medium text-gray-600 dark:text-gray-400 py-2",children:v},v))}),r.jsx("div",{className:"grid grid-cols-7 gap-1",children:C.map((v,w)=>{if(!v)return r.jsx("div",{className:"aspect-square"},w);const L=v.getMonth()===g.getMonth(),M=t&&b(v,t),I=b(v,new Date),$=x(v);return r.jsx("button",{onClick:()=>k(v),disabled:$,className:u("aspect-square flex items-center justify-center rounded-md text-sm transition-colors","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",L?"text-gray-900 dark:text-white":"text-gray-400 dark:text-gray-600",M&&"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",I&&!M&&"border-2 border-blue-600 dark:border-blue-400"),children:v.getDate()},w)})})]})},So=({value:t,onChange:e,use12Hour:a=!1,minuteStep:o=1,minDate:n,maxDate:s,disabled:l=!1,className:g})=>{const[c,i]=y.useState(!1),[h,b]=y.useState(t),x=C=>{const S=C.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),k=C.getHours(),N=C.getMinutes();if(a){const v=k===0?12:k>12?k-12:k,w=k>=12?"PM":"AM";return`${S}, ${v}:${N.toString().padStart(2,"0")} ${w}`}return`${S}, ${k.toString().padStart(2,"0")}:${N.toString().padStart(2,"0")}`},m=C=>{const S=new Date(C);S.setHours(h.getHours()),S.setMinutes(h.getMinutes()),b(S),e(S)},f=C=>{const[S,k]=C.split(":").map(Number),N=new Date(h);N.setHours(S),N.setMinutes(k),b(N),e(N)},p=C=>{const S=C.getHours(),k=C.getMinutes();return`${S.toString().padStart(2,"0")}:${k.toString().padStart(2,"0")}`};return r.jsxs("div",{className:u("relative w-full",g),children:[r.jsxs("button",{type:"button",onClick:()=>!l&&i(!c),disabled:l,className:u("w-full px-3 py-2 text-sm text-left flex items-center justify-between","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",c&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[r.jsx("span",{className:"text-gray-900 dark:text-white",children:x(t)}),r.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})]}),c&&r.jsx("div",{className:"absolute top-full left-0 mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50 p-3",children:r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Date"}),r.jsx(Lr,{value:h,onChange:m,minDate:n,maxDate:s})]}),r.jsx("div",{className:"h-px bg-gray-200 dark:bg-gray-700"}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Time"}),r.jsx(yr,{value:p(h),onChange:f,use12Hour:a,minuteStep:o})]}),r.jsxs("div",{className:"flex gap-2 pt-2",children:[r.jsx("button",{onClick:()=>i(!1),className:u("flex-1 px-3 py-1.5 text-sm","bg-gray-100 dark:bg-gray-800","text-gray-700 dark:text-gray-300","rounded-md","hover:bg-gray-200 dark:hover:bg-gray-700","transition-colors"),children:"Cancel"}),r.jsx("button",{onClick:()=>{e(h),i(!1)},className:u("flex-1 px-3 py-1.5 text-sm","bg-blue-600 dark:bg-blue-500","text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"OK"})]})]})}),c&&r.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)})]})},Eo=({value:t,onChange:e,minDate:a,maxDate:o,disabledDates:n=[],months:s=2,className:l})=>{const[g,c]=y.useState(new Date),[i,h]=y.useState(null),b=(M,I)=>M.getFullYear()===I.getFullYear()&&M.getMonth()===I.getMonth()&&M.getDate()===I.getDate(),x=M=>a&&M<a||o&&M>o?!0:n.some(I=>b(M,I)),m=M=>{if(!t.start||!t.end&&!i)return!1;const I=t.end||i;return I?M>t.start&&M<I:!1},f=M=>t.start?b(M,t.start):!1,p=M=>t.end?b(M,t.end):!1,C=M=>{x(M)||(!t.start||t.start&&t.end?e({start:M,end:null}):M<t.start?e({start:M,end:t.start}):e({start:t.start,end:M}))},S=M=>{const I=M.getFullYear(),$=M.getMonth();return new Date(I,$+1,0).getDate()},k=M=>{const I=M.getFullYear(),$=M.getMonth();return new Date(I,$,1).getDay()},N=M=>{const I=new Date(g.getFullYear(),g.getMonth()+M),$=I.getFullYear(),A=I.getMonth(),z=S(I),P=k(I),W=[];for(let j=0;j<P;j++)W.push(null);for(let j=1;j<=z;j++)W.push(new Date($,A,j));return{days:W,monthName:I.toLocaleDateString("en-US",{month:"long",year:"numeric"})}},v=()=>{c(new Date(g.getFullYear(),g.getMonth()-1))},w=()=>{c(new Date(g.getFullYear(),g.getMonth()+1))},L=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];return r.jsxs("div",{className:u("bg-white dark:bg-gray-900 rounded-lg p-4",l),children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("button",{onClick:v,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Previous month",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),r.jsx("button",{onClick:w,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Next month",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),r.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${s}, 1fr)`},children:Array.from({length:s},(M,I)=>{const{days:$,monthName:A}=N(I);return r.jsxs("div",{children:[r.jsx("h3",{className:"text-base font-semibold text-gray-900 dark:text-white mb-4 text-center",children:A}),r.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:L.map(z=>r.jsx("div",{className:"text-center text-xs font-medium text-gray-600 dark:text-gray-400 py-2",children:z},z))}),r.jsx("div",{className:"grid grid-cols-7 gap-1",children:$.map((z,P)=>{if(!z)return r.jsx("div",{className:"aspect-square"},P);const W=x(z),j=f(z),F=p(z),q=m(z),dr=b(z,new Date);return r.jsx("button",{onClick:()=>C(z),onMouseEnter:()=>h(z),onMouseLeave:()=>h(null),disabled:W,className:u("aspect-square flex items-center justify-center rounded-md text-sm transition-colors relative","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",q&&"bg-blue-100 dark:bg-blue-900/30",(j||F)&&"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",!j&&!F&&!q&&"hover:bg-gray-100 dark:hover:bg-gray-800",dr&&!j&&!F&&"border-2 border-blue-600 dark:border-blue-400"),children:z.getDate()},P)})})]},I)})}),(t.start||t.end)&&r.jsx("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:r.jsxs("div",{className:"flex items-center justify-between text-sm",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Start: "}),r.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:t.start?.toLocaleDateString()||"Not selected"})]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"End: "}),r.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:t.end?.toLocaleDateString()||"Not selected"})]})]})})]})},Lo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UtimeUslotUpicker",children:e||"UtimeUslotUpicker Component"}),Io=({value:t,onChange:e,presets:a=["#000000","#FFFFFF","#FF6B6B","#4ECDC4","#45B7D1","#FFA07A","#F7DC6F","#BB8FCE","#85C1E2","#F8B500","#52B788","#E63946","#1D3557","#457B9D","#A8DADC","#F4A261","#264653","#2A9D8F"],showInput:o=!0,showOpacity:n=!1,className:s})=>{const[l,g]=y.useState(t),[c,i]=y.useState(100),h=p=>{e(p),g(p)},b=p=>{const C=p.target.value;g(C),/^#[0-9A-F]{6}$/i.test(C)&&e(C)},x=p=>{i(Number(p.target.value))},f=n?((p,C)=>{const S=parseInt(p.slice(1,3),16),k=parseInt(p.slice(3,5),16),N=parseInt(p.slice(5,7),16);return`rgba(${S}, ${k}, ${N}, ${C/100})`})(t,c):t;return r.jsxs("div",{className:u("bg-white dark:bg-gray-900 rounded-lg p-4",s),children:[r.jsx("div",{className:"mb-4",children:r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-16 h-16 rounded-lg border-2 border-gray-200 dark:border-gray-700 shadow-sm",style:{backgroundColor:f}}),r.jsxs("div",{className:"flex-1",children:[r.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:"Selected Color"}),r.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400 mt-1 font-mono",children:[t,n&&` (${c}%)`]})]})]})}),r.jsxs("div",{className:"mb-4",children:[r.jsx("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Preset Colors"}),r.jsx("div",{className:"grid grid-cols-6 gap-2",children:a.map(p=>r.jsx("button",{onClick:()=>h(p),className:u("w-full aspect-square rounded-md border-2 transition-all hover:scale-110",p===t?"border-blue-500 dark:border-blue-400 ring-2 ring-blue-200 dark:ring-blue-800":"border-gray-200 dark:border-gray-700"),style:{backgroundColor:p},"aria-label":`Select color ${p}`},p))})]}),o&&r.jsxs("div",{className:"mb-4",children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Custom Color (Hex)"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("input",{type:"text",value:l,onChange:b,placeholder:"#000000",className:"flex-1 px-3 py-2 text-sm font-mono bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"}),r.jsx("input",{type:"color",value:t,onChange:p=>h(p.target.value),className:"w-12 h-10 rounded-md cursor-pointer"})]})]}),n&&r.jsxs("div",{children:[r.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:["Opacity: ",c,"%"]}),r.jsx("input",{type:"range",min:"0",max:"100",value:c,onChange:x,className:"w-full h-2 bg-gray-200 dark:bg-gray-700 rounded-lg appearance-none cursor-pointer"})]})]})},Mo=({value:t,onChange:e,presets:a,className:o})=>{const s=a||["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff"];return r.jsxs("div",{className:u("space-y-3",o),children:[r.jsx("input",{type:"color",value:t,onChange:l=>e(l.target.value),className:"w-full h-12 rounded cursor-pointer"}),r.jsx("div",{className:"grid grid-cols-8 gap-2",children:s.map(l=>r.jsx("button",{onClick:()=>e(l),className:u("w-8 h-8 rounded border-2",t===l?"border-blue-500":"border-transparent"),style:{backgroundColor:l}},l))})]})},$o=({colors:t,selectedColor:e,onColorSelect:a,size:o="md",showNames:n=!1,showCopy:s=!1,className:l})=>{const[g,c]=y.useState(null),i={sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16"},h=()=>t.map(m=>typeof m=="string"?{hex:m}:m),b=async(m,f)=>{f.stopPropagation(),await navigator.clipboard.writeText(m),c(m),setTimeout(()=>c(null),2e3)},x=h();return r.jsx("div",{className:u("flex flex-wrap gap-3",l),children:x.map((m,f)=>{const p=e===m.hex,C=g===m.hex;return r.jsxs("div",{className:"flex flex-col items-center gap-2",children:[r.jsx("button",{onClick:()=>a?.(m.hex),className:u("rounded-lg transition-all relative group",i[o],p&&"ring-2 ring-blue-500 ring-offset-2 dark:ring-offset-gray-900",!p&&"hover:scale-110"),style:{backgroundColor:m.hex},"aria-label":m.name||m.hex,children:s&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/50 rounded-lg",onClick:S=>b(m.hex,S),children:C?r.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):r.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})})}),n&&r.jsxs("div",{className:"text-center",children:[m.name&&r.jsx("p",{className:"text-xs font-medium text-gray-900 dark:text-white",children:m.name}),r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 font-mono",children:m.hex})]})]},f)})})},Uo=({onSave:t,width:e=400,height:a=200,className:o})=>r.jsxs("div",{className:u("border border-gray-300 dark:border-gray-700 rounded-lg",o),children:[r.jsx("canvas",{width:e,height:a,className:"bg-white dark:bg-gray-900"}),r.jsxs("div",{className:"flex gap-2 p-2",children:[r.jsx("button",{className:"px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Clear"}),r.jsx("button",{onClick:()=>t?.(""),className:"px-3 py-1 bg-green-500 text-white rounded hover:bg-green-600",children:"Save"})]})]}),To=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"SignatureRequest",children:e||"SignatureRequest Component"}),Ao=({value:t,onChange:e,placeholder:a,className:o})=>r.jsxs("div",{className:u("border border-gray-300 dark:border-gray-700 rounded-lg",o),children:[r.jsx("div",{className:"flex gap-1 p-2 border-b border-gray-300 dark:border-gray-700",children:["B","I","U","H1","H2","List","Link"].map(n=>r.jsx("button",{className:"px-3 py-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded text-sm font-semibold",children:n},n))}),r.jsx("textarea",{value:t,onChange:n=>e(n.target.value),placeholder:a,className:"w-full p-4 bg-white dark:bg-gray-900 text-gray-900 dark:text-white resize-none focus:outline-none",rows:10})]}),Po=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UmarkdownUrenderer",children:e||"UmarkdownUrenderer Component"}),zo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcodeUhighlighter",children:e||"UcodeUhighlighter Component"}),Do=({cardNumber:t,onCardNumberChange:e,expiryDate:a="",onExpiryDateChange:o,cvv:n="",onCVVChange:s,cardholderName:l="",onCardholderNameChange:g,showAllFields:c=!1,disabled:i=!1,className:h})=>{const b=v=>{const w=v.replace(/\s/g,"");return/^4/.test(w)?"visa":/^5[1-5]/.test(w)?"mastercard":/^3[47]/.test(w)?"amex":/^6(?:011|5)/.test(w)?"discover":"unknown"},x=b(t),m=v=>{const w=v.replace(/\D/g,"");if(b(w)==="amex"){const z=w.slice(0,15);return[z.slice(0,4),z.slice(4,10),z.slice(10,15)].filter(Boolean).join(" ")}return(w.slice(0,16).match(/.{1,4}/g)||[]).join(" ")},f=v=>{const M=v.replace(/\D/g,"").slice(0,4);return M.length>=2?`${M.slice(0,2)}/${M.slice(2)}`:M},p=v=>{const w=v.replace(/\D/g,""),L=x==="amex"?4:3;return w.slice(0,L)},C=v=>{const w=m(v.target.value);e(w)},S=v=>{if(!o)return;const w=f(v.target.value);o(w)},k=v=>{if(!s)return;const w=p(v.target.value);s(w)},N=()=>{switch(x){case"visa":return r.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[r.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#1434CB"}),r.jsx("path",{d:"M20 11l-2 10h2l2-10h-2zm8 0l-3.5 7-1.5-7h-2l2.5 10h2l5.5-10h-3zm-12 0c-1.5 0-2.5.5-2.5 1.5 0 1.5 3 1.5 3 3.5s-2.5 2-4 2l-.5-2c1 0 2-.5 2-1.5s-3-1.5-3-3.5 2.5-2 4-2l.5 2z",fill:"white"})]});case"mastercard":return r.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[r.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#EB001B"}),r.jsx("circle",{cx:"18",cy:"16",r:"8",fill:"#F79E1B"}),r.jsx("circle",{cx:"30",cy:"16",r:"8",fill:"#FF5F00"})]});case"amex":return r.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[r.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#006FCF"}),r.jsx("path",{d:"M10 12h8l2 8-2 8h-8l-2-8 2-8z",fill:"white"})]});case"discover":return r.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[r.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#FF6000"}),r.jsx("circle",{cx:"38",cy:"16",r:"6",fill:"#FFA500"})]});default:return r.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"})})}};return r.jsxs("div",{className:u("w-full space-y-3",h),children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Card number"}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:"text",value:t,onChange:C,placeholder:"1234 5678 9012 3456",disabled:i,className:u("w-full px-3 py-2 pr-12 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")}),r.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:N()})]})]}),c&&r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Expiry date"}),r.jsx("input",{type:"text",value:a,onChange:S,placeholder:"MM/YY",disabled:i,className:u("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"CVV"}),r.jsx("input",{type:"text",value:n,onChange:k,placeholder:x==="amex"?"1234":"123",disabled:i,className:u("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]})]}),c&&r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Cardholder name"}),r.jsx("input",{type:"text",value:l,onChange:v=>g?.(v.target.value),placeholder:"John Doe",disabled:i,className:u("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]})]})},Ir=[{code:"USD",symbol:"$",name:"US Dollar",decimals:2},{code:"EUR",symbol:"€",name:"Euro",decimals:2},{code:"GBP",symbol:"£",name:"British Pound",decimals:2},{code:"JPY",symbol:"¥",name:"Japanese Yen",decimals:0},{code:"CNY",symbol:"¥",name:"Chinese Yuan",decimals:2},{code:"AUD",symbol:"A$",name:"Australian Dollar",decimals:2},{code:"CAD",symbol:"C$",name:"Canadian Dollar",decimals:2},{code:"CHF",symbol:"Fr",name:"Swiss Franc",decimals:2},{code:"INR",symbol:"₹",name:"Indian Rupee",decimals:2},{code:"BRL",symbol:"R$",name:"Brazilian Real",decimals:2}],jo=({value:t,onChange:e,currency:a="USD",onCurrencyChange:o,currencies:n=Ir,showCurrencySelector:s=!1,placeholder:l="0.00",min:g,max:c,disabled:i=!1,className:h})=>{const[b,x]=y.useState(""),[m,f]=y.useState(!1),[p,C]=y.useState(!1),k=typeof a=="string"?n.find(I=>I.code===a)||Ir[0]:a,N=y.useCallback(I=>{const $=k.decimals??2;return I.toLocaleString("en-US",{minimumFractionDigits:$,maximumFractionDigits:$})},[k]);y.useEffect(()=>{m||x(N(t||0))},[t,N,m]);const v=I=>{const A=I.target.value.replace(/[^\d.]/g,""),z=A.split("."),P=z.length>2?`${z[0]}.${z.slice(1).join("")}`:A;x(P);let j=parseFloat(P)||0;g!==void 0&&j<g&&(j=g),c!==void 0&&j>c&&(j=c),e(j)},w=()=>{f(!0),x(t?t.toString():"")},L=()=>{f(!1),x(N(t||0))},M=I=>{o?.(I),C(!1)};return r.jsxs("div",{className:u("relative w-full",h),children:[r.jsxs("div",{className:"flex gap-2",children:[s&&r.jsxs("div",{className:"relative",children:[r.jsxs("button",{type:"button",onClick:()=>!i&&C(!p),disabled:i,className:u("flex items-center gap-2 px-3 py-2 min-w-[100px]","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",p&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[r.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:k.code}),r.jsx("svg",{className:u("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",p&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),p&&r.jsx("div",{className:"absolute top-full left-0 mt-1 w-64 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:r.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:n.map(I=>r.jsxs("button",{onClick:()=>M(I.code),className:u("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",I.code===k.code&&"bg-blue-50 dark:bg-blue-900/30"),children:[r.jsx("span",{className:"text-lg font-semibold w-8",children:I.symbol}),r.jsxs("div",{className:"flex-1",children:[r.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:I.code}),r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:I.name})]})]},I.code))})})]}),r.jsxs("div",{className:"relative flex-1",children:[r.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-600 dark:text-gray-400 text-sm font-medium",children:k.symbol}),r.jsx("input",{type:"text",value:b,onChange:v,onFocus:w,onBlur:L,placeholder:l,disabled:i,className:u("w-full pl-8 pr-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]})]}),(g!==void 0||c!==void 0)&&r.jsx("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:g!==void 0&&c!==void 0?`Range: ${k.symbol}${N(g)} - ${k.symbol}${N(c)}`:g!==void 0?`Minimum: ${k.symbol}${N(g)}`:`Maximum: ${k.symbol}${N(c)}`}),p&&r.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>C(!1)})]})},Bo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcurrencyUconverter",children:e||"UcurrencyUconverter Component"}),Wo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcurrencyUrates",children:e||"UcurrencyUrates Component"}),Oo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UformUbuilder",children:e||"UformUbuilder Component"}),Fo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UformUvalidator",children:e||"UformUvalidator Component"}),Vo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UformUtemplate",children:e||"UformUtemplate Component"}),Ho=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UschemaUvalidator",children:e||"UschemaUvalidator Component"}),qo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UfieldUmapper",children:e||"UfieldUmapper Component"}),_o=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UsurveyUbuilder",children:e||"UsurveyUbuilder Component"}),Go=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"QuizBuilder",children:e||"QuizBuilder Component"}),Se=V.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:T.link.subtle(),default:T.link.default(),muted:T.link.muted(),external:T.link.external(),inherit:"text-inherit hover:text-blue-600 dark:hover:text-blue-400 underline-offset-2 hover:underline transition-colors duration-200"},size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{variant:"subtle",size:"default"}}),Oe=O.forwardRef(({className:t,variant:e,size:a,to:o,href:n,external:s,children:l,...g},c)=>{const i=o||n;return i?s||i.startsWith("http")||i.startsWith("mailto:")?r.jsx("a",{className:u(Se({variant:e==="subtle"?"external":e,size:a,className:t})),href:i,target:"_blank",rel:"noopener noreferrer",ref:c,...g,children:l}):r.jsx(Ue.Link,{className:u(Se({variant:e,size:a,className:t})),to:i,ref:c,...g,children:l}):r.jsx("span",{className:u(Se({variant:e,size:a,className:t})),...g,children:l})});Oe.displayName="SmartLink";const Ko=(t,e)=>O.useMemo(()=>{let a=t;return Object.entries(e).forEach(([o,n])=>{const s=new RegExp(`\\b${o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");a=a.replace(s,l=>`<SmartLink to="${n}" variant="subtle">${l}</SmartLink>`)}),a},[t,e]),Yo={documentation:"/document",settings:"/settings",about:"/about",contact:"/contact","privacy policy":"/privacy",privacy:"/privacy","terms of service":"/terms",terms:"/terms","cookie policy":"/cookies",cookies:"/cookies",points:"/points","earn points":"/how-to-earn-points","how to earn points":"/how-to-earn-points","connect wallet":"/connect","connect your wallet":"/connect","wallet connection":"/connect",wallet:"/connect",compose:"/compose","compose email":"/compose","send email":"/compose",mail:"/mail",email:"/mail",inbox:"/mail",dashboard:"/mail",delegate:"/delegate",delegation:"/delegate",manage:"/manage","manage preferences":"/preferences",profile:"/settings",account:"/settings",preferences:"/preferences",token:"/token","web3 users":"/web3-users","web3 projects":"/web3-projects","get started":"/connect","start here":"/connect","learn more":"/document","read more":"/document","our features":"/document",support:"/contact",help:"/document","contact us":"/contact"},Qo=({children:t,mappings:e=Yo,className:a,variant:o="subtle"})=>{const n=O.useMemo(()=>{if(!t||typeof t!="string")return t||"";let l=t;return Object.entries(e).sort(([c],[i])=>i.length-c.length).forEach(([c,i])=>{if(c&&i){const h=new RegExp(`\\b${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");l=l.replace(h,b=>`__LINK_START__${i}__LINK_MID__${b}__LINK_END__`)}}),l},[t,e]);if(!n||typeof n!="string")return r.jsx("span",{className:a,children:t});const s=n.split(/(__LINK_START__.*?__LINK_END__)/);return r.jsx("span",{className:a,children:s.map((l,g)=>{const c=l.match(/__LINK_START__(.*?)__LINK_MID__(.*?)__LINK_END__/);if(c){const[,i,h]=c;return r.jsx(Oe,{to:i,variant:o,children:h},g)}return l})})},Zo=({href:t,children:e,variant:a="default",external:o=!1,showExternalIcon:n=!1,disabled:s=!1,className:l,...g})=>{const c=o||t.startsWith("http://")||t.startsWith("https://"),i={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium",secondary:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100",muted:"text-gray-500 dark:text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",underline:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 underline"},h=c?{target:"_blank",rel:"noopener noreferrer"}:{};return s?r.jsxs("span",{className:u("cursor-not-allowed opacity-50",i[a],l),children:[e,n&&c&&r.jsx(U.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1"})]}):r.jsxs("a",{href:t,className:u("inline-flex items-center transition-colors",i[a],l),...h,...g,children:[e,n&&c&&r.jsx(U.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1 flex-shrink-0"})]})},Xo=({href:t,children:e,showIcon:a=!0,iconPosition:o="right",size:n="md",variant:s="default",className:l,onClick:g})=>{const c={sm:{text:T.body.sm(),icon:"h-3 w-3",gap:"gap-1"},md:{text:T.body.md(),icon:"h-4 w-4",gap:"gap-1.5"},lg:{text:T.body.lg(),icon:"h-5 w-5",gap:"gap-2"}},i={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-700 dark:text-blue-300 hover:text-blue-800 dark:hover:text-blue-200 font-semibold",muted:"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"},h=c[n];return r.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",onClick:g,className:u("inline-flex items-center",h.gap,h.text,i[s],"underline decoration-1 underline-offset-2","hover:decoration-2","transition-all duration-200",l),children:[a&&o==="left"&&r.jsx(U.ArrowTopRightOnSquareIcon,{className:u(h.icon,"flex-shrink-0")}),r.jsx("span",{children:e}),a&&o==="right"&&r.jsx(U.ArrowTopRightOnSquareIcon,{className:u(h.icon,"flex-shrink-0")})]})},Jo=({items:t,separator:e="/",className:a})=>r.jsx("nav",{className:u("flex items-center gap-2 text-sm",a),children:t.map((o,n)=>r.jsxs(y.Fragment,{children:[n>0&&r.jsx("span",{className:"text-gray-400 dark:text-gray-600",children:e}),n===t.length-1?r.jsx("span",{className:"text-gray-900 dark:text-white font-medium",children:o.label}):r.jsx("button",{onClick:o.onClick,className:"text-blue-600 dark:text-blue-400 hover:underline",children:o.label})]},n))}),Ro=H.Root,Mr=O.forwardRef(({className:t,...e},a)=>r.jsx(H.List,{ref:a,className:u(D.navigation.tabs.list(),t),...e}));Mr.displayName=H.List.displayName;const $r=O.forwardRef(({className:t,...e},a)=>r.jsx(H.Trigger,{ref:a,className:u(D.navigation.tabs.trigger(),t),...e}));$r.displayName=H.Trigger.displayName;const Ur=O.forwardRef(({className:t,...e},a)=>r.jsx(H.Content,{ref:a,className:u(D.navigation.tabs.content(),t),...e}));Ur.displayName=H.Content.displayName;const en=({items:t,orientation:e="horizontal",className:a})=>{const[o,n]=y.useState(new Set),s=g=>{n(c=>{const i=new Set(c);return i.has(g)?i.delete(g):i.add(g),i})},l=(g,c)=>{const i=g.children&&g.children.length>0,h=o.has(c),b=r.jsxs(r.Fragment,{children:[g.icon&&r.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:g.icon}),r.jsx("span",{className:"flex-1",children:g.label}),i&&r.jsx("svg",{className:u("w-4 h-4 transition-transform",e==="horizontal"&&!h&&"-rotate-90",h&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),x=u("flex items-center gap-2 px-4 py-2 text-sm font-medium","transition-colors",g.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800");return r.jsxs("div",{children:[i?r.jsx("button",{onClick:()=>s(c),className:u(x,"w-full"),children:b}):g.href?r.jsx("a",{href:g.href,className:x,onClick:g.onClick,children:b}):r.jsx("button",{onClick:g.onClick,className:u(x,"w-full"),children:b}),i&&h&&r.jsx("div",{className:u("bg-gray-50 dark:bg-gray-800/50",e==="horizontal"?"pl-4":"border-l-2 border-gray-200 dark:border-gray-700 ml-4"),children:g.children.map((m,f)=>r.jsx("div",{children:m.href?r.jsxs("a",{href:m.href,onClick:m.onClick,className:u("flex items-center gap-2 px-4 py-2 text-sm","transition-colors",m.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[m.icon&&r.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:m.icon}),m.label]}):r.jsxs("button",{onClick:m.onClick,className:u("w-full flex items-center gap-2 px-4 py-2 text-sm","transition-colors",m.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[m.icon&&r.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:m.icon}),m.label]})},f))})]},c)};return r.jsx("nav",{className:u("bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg",e==="horizontal"?"flex flex-wrap":"flex flex-col",a),children:t.map((g,c)=>l(g,c))})},rn=({items:t,selectedPath:e,onSelect:a,variant:o="default",className:n})=>{const s=o==="compact"?"space-y-1":"space-y-0";return r.jsx("div",{className:u(s,n),children:t.map(l=>{const g=l.icon,c=e===l.path,i=l.disabled,h=u("flex items-start cursor-pointer transition-colors",o==="compact"?"p-3 rounded-lg":"p-4 border-b border-gray-200 dark:border-gray-700 last:border-b-0",i&&"opacity-50 cursor-not-allowed"),b=c?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300";return r.jsxs("div",{onClick:()=>!i&&a(l.path),className:u(h,!i&&b),role:"button",tabIndex:i?-1:0,"aria-current":c?"page":void 0,"aria-disabled":i,onKeyDown:x=>{!i&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),a(l.path))},children:[r.jsx(g,{className:"h-5 w-5 mt-0.5 mr-3 flex-shrink-0"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:u("font-medium",T.body.md()),children:[l.label,l.badge!==void 0&&l.badge>0&&r.jsx("span",{className:"ml-2 inline-flex items-center justify-center px-2 py-0.5 text-xs font-medium bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full",children:l.badge})]}),l.description&&r.jsx("div",{className:u("text-xs text-gray-500 dark:text-gray-400 mt-0.5"),children:l.description})]})]},l.id)})})},tn=({items:t,className:e})=>r.jsx("nav",{className:u("flex flex-col gap-1",e),children:t.map(a=>r.jsxs("button",{onClick:a.onClick,className:u("flex items-center gap-3 px-4 py-3 rounded-lg transition-colors",a.active?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"),children:[a.icon&&r.jsx("span",{className:"w-5 h-5",children:a.icon}),r.jsx("span",{className:"flex-1 text-left font-medium",children:a.label}),a.badge&&r.jsx("span",{className:"px-2 py-0.5 bg-gray-200 dark:bg-gray-700 rounded text-xs",children:a.badge})]},a.id))}),an=({currentPage:t,totalPages:e,onPageChange:a,siblingCount:o=1,showFirstLast:n=!1,size:s="md",className:l})=>{const c={sm:{button:"h-8 w-8 text-xs",icon:"h-3 w-3",text:T.body.sm()},md:{button:"h-10 w-10 text-sm",icon:"h-4 w-4",text:T.body.md()},lg:{button:"h-12 w-12 text-base",icon:"h-5 w-5",text:T.body.lg()}}[s],h=(()=>{const k=[];k.push(1);const N=Math.max(t-o,2),v=Math.min(t+o,e-1);N>2&&k.push("ellipsis");for(let w=N;w<=v;w++)k.push(w);return v<e-1&&k.push("ellipsis"),e>1&&k.push(e),k})(),b=()=>{t>1&&a(t-1)},x=()=>{t<e&&a(t+1)},m=()=>{a(1)},f=()=>{a(e)},p=u("inline-flex items-center justify-center","rounded-md border border-gray-300 dark:border-gray-600","transition-all duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500","disabled:opacity-50 disabled:cursor-not-allowed"),C=k=>u(p,c.button,c.text,k?"bg-blue-600 text-white border-blue-600 dark:bg-blue-500 dark:border-blue-500":"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"),S=u(p,c.button,"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700");return r.jsxs("nav",{className:u("flex items-center gap-1",l),"aria-label":"Pagination",children:[n&&r.jsx("button",{onClick:m,disabled:t===1,className:S,"aria-label":"Go to first page",children:r.jsx("span",{className:c.text,children:"First"})}),r.jsx("button",{onClick:b,disabled:t===1,className:S,"aria-label":"Go to previous page",children:r.jsx(U.ChevronLeftIcon,{className:c.icon})}),h.map((k,N)=>k==="ellipsis"?r.jsx("span",{className:u("inline-flex items-center justify-center",c.button,"text-gray-400 dark:text-gray-500"),children:"..."},`ellipsis-${N}`):r.jsx("button",{onClick:()=>a(k),className:C(k===t),"aria-label":`Go to page ${k}`,"aria-current":k===t?"page":void 0,children:k},k)),r.jsx("button",{onClick:x,disabled:t===e,className:S,"aria-label":"Go to next page",children:r.jsx(U.ChevronRightIcon,{className:c.icon})}),n&&r.jsx("button",{onClick:f,disabled:t===e,className:S,"aria-label":"Go to last page",children:r.jsx("span",{className:c.text,children:"Last"})})]})},on=({currentPage:t,totalPages:e,onPageChange:a,maxVisible:o=7,className:n})=>{const s=[];if(e<=o)for(let l=1;l<=e;l++)s.push(l);else{s.push(1),t>3&&s.push("...");const l=Math.max(2,t-1),g=Math.min(e-1,t+1);for(let c=l;c<=g;c++)s.push(c);t<e-2&&s.push("..."),s.push(e)}return r.jsxs("nav",{className:u("flex items-center gap-1",n),children:[r.jsx("button",{onClick:()=>a(t-1),disabled:t===1,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),s.map((l,g)=>l==="..."?r.jsx("span",{className:"px-3 py-2",children:"..."},`ellipsis-${g}`):r.jsx("button",{onClick:()=>a(l),className:u("px-3 py-2 rounded",l===t?"bg-blue-500 text-white":"hover:bg-gray-100 dark:hover:bg-gray-800"),children:l},l)),r.jsx("button",{onClick:()=>a(t+1),disabled:t===e,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})},nn=({steps:t,currentStep:e,orientation:a="horizontal",clickable:o=!1,onStepClick:n,className:s})=>{const l=c=>{o&&n&&n(c)},g=c=>c<e?"completed":c===e?"active":"upcoming";return a==="horizontal"?r.jsx("div",{className:u("w-full",s),children:r.jsx("div",{className:"flex items-center justify-between",children:t.map((c,i)=>{const h=g(i),b=i===t.length-1;return r.jsxs(y.Fragment,{children:[r.jsxs("div",{className:"flex flex-col items-center",children:[r.jsx("button",{onClick:()=>l(i),disabled:!o,className:u("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default",o&&"hover:scale-110",h==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",h==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",h==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:h==="completed"?r.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):c.icon?r.jsx("span",{className:u("w-5 h-5",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:c.icon}):r.jsx("span",{className:u("text-sm font-semibold",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:i+1})}),r.jsxs("div",{className:"mt-2 text-center",children:[r.jsx("p",{className:u("text-sm font-medium",h==="active"?"text-blue-600 dark:text-blue-500":h==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:c.label}),c.description&&r.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:c.description})]})]}),!b&&r.jsx("div",{className:"flex-1 h-0.5 mx-2 bg-gray-300 dark:bg-gray-700 relative",children:r.jsx("div",{className:u("absolute left-0 top-0 h-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",i<e?"w-full":"w-0")})})]},c.id)})})}):r.jsx("div",{className:u("w-full",s),children:r.jsx("div",{className:"space-y-4",children:t.map((c,i)=>{const h=g(i),b=i===t.length-1;return r.jsxs("div",{className:"flex gap-4",children:[r.jsxs("div",{className:"flex flex-col items-center",children:[r.jsx("button",{onClick:()=>l(i),disabled:!o,className:u("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default flex-shrink-0",o&&"hover:scale-110",h==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",h==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",h==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:h==="completed"?r.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):c.icon?r.jsx("span",{className:u("w-5 h-5",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:c.icon}):r.jsx("span",{className:u("text-sm font-semibold",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:i+1})}),!b&&r.jsx("div",{className:"w-0.5 flex-1 min-h-[32px] bg-gray-300 dark:bg-gray-700 relative mt-2",children:r.jsx("div",{className:u("absolute top-0 left-0 w-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",i<e?"h-full":"h-0")})})]}),r.jsxs("div",{className:"flex-1 pb-4",children:[r.jsx("p",{className:u("text-sm font-medium",h==="active"?"text-blue-600 dark:text-blue-500":h==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:c.label}),c.description&&r.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:c.description})]})]},c.id)})})})},sn=({steps:t,currentStep:e,onStepClick:a,orientation:o="horizontal",className:n})=>r.jsx("nav",{className:u(o==="horizontal"?"flex items-center":"flex flex-col",n),children:t.map((s,l)=>r.jsxs("div",{className:u("flex items-center",o==="vertical"&&"flex-col items-start"),children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("button",{onClick:()=>a?.(l),disabled:l>e,className:u("w-10 h-10 rounded-full flex items-center justify-center font-semibold transition-colors",l<e&&"bg-green-500 text-white",l===e&&"bg-blue-500 text-white",l>e&&"bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400"),children:l<e?"✓":l+1}),r.jsxs("div",{children:[r.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:s.label}),s.description&&r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:s.description})]})]}),l<t.length-1&&r.jsx("div",{className:u(o==="horizontal"?"w-full h-0.5 mx-4":"h-8 w-0.5 ml-5 my-2","bg-gray-300 dark:bg-gray-700")})]},s.id))}),ln=({subsections:t,isExpanded:e,selectedSubsection:a,parentSectionId:o,onSubsectionSelect:n})=>{const s=y.useRef(null),[l,g]=y.useState(void 0);return y.useEffect(()=>{if(s.current){const c=s.current.scrollHeight;g(e?c+8:0)}},[e,t]),r.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:l!==void 0?`${l}px`:"auto"},children:r.jsx("div",{ref:s,className:"ml-6 mt-2 space-y-1",children:t.map(c=>r.jsx("button",{onClick:()=>n?.(c.id,o),className:`block w-full text-left px-3 py-2 rounded-md text-sm transition-all duration-200 hover:scale-[1.02] ${a===c.id?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-800 dark:hover:text-gray-200"}`,children:c.title},c.id))})})},dn=({sections:t,selectedSection:e,selectedSubsection:a,expandedSections:o,onSectionSelect:n,onSubsectionSelect:s,onToggleSection:l,className:g=""})=>r.jsx("nav",{className:`space-y-2 ${g}`,children:t.map(c=>r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center",children:[r.jsx("button",{onClick:()=>n(c.id),className:`flex-1 text-left px-3 py-2 rounded-md text-sm font-medium transition-all duration-200 hover:scale-[1.02] ${e===c.id&&!a?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-gray-100"}`,children:c.title}),c.subsections&&c.subsections.length>0&&r.jsx("button",{onClick:()=>l(c.id),className:"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200",children:r.jsx(U.ChevronRightIcon,{className:`h-4 w-4 text-gray-500 transition-transform duration-300 ease-in-out ${o.includes(c.id)?"rotate-90":"rotate-0"}`})})]}),c.subsections&&r.jsx(ln,{subsections:c.subsections,isExpanded:o.includes(c.id),selectedSubsection:a,parentSectionId:c.id,onSubsectionSelect:s})]},c.id))});function cn({columns:t,data:e,keyExtractor:a,sort:o,onSort:n,onRowClick:s,striped:l=!1,hoverable:g=!1,compact:c=!1,bordered:i=!1,emptyMessage:h="No data available",className:b}){const x=f=>{f.sortable&&n&&n(f.key)},m={left:"text-left",center:"text-center",right:"text-right"};return r.jsx("div",{className:u("w-full overflow-x-auto",b),children:r.jsxs("table",{className:"w-full",children:[r.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:r.jsx("tr",{children:t.map(f=>r.jsx("th",{className:u(c?"px-3 py-2":"px-6 py-3","text-xs font-medium text-gray-700 dark:text-gray-300 uppercase tracking-wider",m[f.align||"left"],f.sortable&&"cursor-pointer select-none hover:bg-gray-100 dark:hover:bg-gray-700",i&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),style:{width:f.width},onClick:()=>f.sortable&&x(f),children:r.jsxs("div",{className:"flex items-center gap-2",children:[f.label,f.sortable&&r.jsx("span",{className:"flex flex-col",children:o?.column===f.key?o.direction==="asc"?r.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{d:"M5 10l5-5 5 5H5z"})}):r.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{d:"M15 10l-5 5-5-5h10z"})}):r.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{d:"M5 10l5-5 5 5H5z"})})})]})},f.key))})}),r.jsx("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:e.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:t.length,className:"px-6 py-8 text-center text-sm text-gray-500 dark:text-gray-400",children:h})}):e.map((f,p)=>r.jsx("tr",{className:u(l&&p%2===1&&"bg-gray-50 dark:bg-gray-800/50",g&&"hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",s&&"cursor-pointer"),onClick:()=>s?.(f,p),children:t.map(C=>r.jsx("td",{className:u(c?"px-3 py-2":"px-6 py-4","text-sm text-gray-900 dark:text-white",m[C.align||"left"],i&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),children:C.render?C.render(f,p):f[C.key]},C.key))},a(f,p)))})]})})}const gn=({data:t,columns:e,hasActions:a=!1,renderCell:o,renderAction:n,emptyMessage:s="No data available",getRowKey:l=(c,i)=>String(i),className:g=""})=>!t||t.length===0?r.jsx("div",{className:`text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg ${g}`,children:r.jsx("p",{className:`${T.body.sm()} text-gray-500 dark:text-gray-400`,children:s})}):r.jsx("div",{className:`relative ${g}`,children:r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full border-collapse",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[e.map((c,i)=>r.jsx("th",{className:`${T.label.default()} text-left py-3 px-4 whitespace-nowrap`,children:c},i)),a&&r.jsx("th",{className:`${T.label.default()} text-right py-3 px-4 sticky right-0 bg-white dark:bg-gray-900 whitespace-nowrap`})]})}),r.jsx("tbody",{children:t.map((c,i)=>r.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[e.map((h,b)=>{const x=o(c,b);return r.jsx("td",{className:"py-3 px-4",children:typeof x=="string"?r.jsx("span",{className:T.body.sm(),children:x}):x},b)}),a&&r.jsx("td",{className:"py-3 px-4 text-right sticky right-0 bg-white dark:bg-gray-900",children:n?.(c)})]},l(c,i)))})]})})}),un=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UdataUgrid",children:e||"UdataUgrid Component"}),hn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UpivotUtable",children:e||"UpivotUtable Component"}),bn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UspreadsheetUgrid",children:e||"UspreadsheetUgrid Component"}),fn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcolumnUresize",children:e||"UcolumnUresize Component"}),pn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcellUeditor",children:e||"UcellUeditor Component"}),yn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UtableUreservation",children:e||"UtableUreservation Component"}),mn=({children:t,type:e="unordered",spacing:a="sm",marker:o,size:n="md",className:s})=>{const l=e==="ordered"?"ol":"ul",g={none:"space-y-0",sm:"space-y-1",md:"space-y-2",lg:"space-y-4"},c={sm:"text-sm",md:"text-base",lg:"text-lg"},i=()=>o==="none"?"list-none":e==="unordered"?{disc:"list-disc",circle:"list-circle",square:"list-square",decimal:"list-disc",alpha:"list-disc",roman:"list-disc",none:"list-none"}[o||"disc"]:{decimal:"list-decimal",alpha:"list-alpha",roman:"list-roman",disc:"list-decimal",circle:"list-decimal",square:"list-decimal",none:"list-none"}[o||"decimal"];return r.jsx(l,{className:u("ml-6",i(),g[a],c[n],"text-gray-900 dark:text-gray-100",s),children:t})},vn=({children:t,className:e})=>r.jsx("li",{className:u("leading-relaxed",e),children:t});V.cva("grid gap-8",{variants:{layout:{grid:"grid-cols-1 md:grid-cols-2",stacked:"grid-cols-1 space-y-8",cards:"grid-cols-1 md:grid-cols-2 gap-6"},spacing:{sm:"gap-4",md:"gap-8",lg:"gap-12"}},defaultVariants:{layout:"grid",spacing:"md"}}),V.cva("rounded-xl p-6 transition-all duration-300",{variants:{variant:{traditional:"bg-red-50 dark:bg-red-900/20 border-2 border-red-100 dark:border-red-800/30 hover:border-red-200 dark:hover:border-red-700/50",web3:"bg-green-50 dark:bg-green-900/20 border-2 border-green-100 dark:border-green-800/30 hover:border-green-200 dark:hover:border-green-700/50",neutral:"bg-gray-50 dark:bg-gray-800/50 border-2 border-gray-100 dark:border-gray-700/30 hover:border-gray-200 dark:hover:border-gray-600/50",elevated:"bg-white dark:bg-gray-800 shadow-lg hover:shadow-xl border border-gray-200 dark:border-gray-700"},animation:{none:"",hover:"hover:transform hover:scale-[1.02]",float:"hover:-translate-y-1"}},defaultVariants:{variant:"traditional",animation:"hover"}}),V.cva("text-lg font-bold mb-4 flex items-center gap-3",{variants:{variant:{traditional:"text-red-600 dark:text-red-400",web3:"text-green-600 dark:text-green-400",neutral:"text-gray-900 dark:text-white",elevated:"text-gray-900 dark:text-white"}},defaultVariants:{variant:"traditional"}}),V.cva("mx-auto px-4 sm:px-6",{variants:{size:{sm:"max-w-2xl",md:"max-w-4xl",lg:"max-w-6xl",xl:"max-w-7xl lg:px-8",full:"max-w-full",prose:"max-w-prose"},spacing:{none:"",xs:"py-2",sm:"py-3",md:"py-4",lg:"py-6",xl:"py-8","2xl":"py-12","3xl":"py-16"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:"xl",spacing:"md",align:"left"}}),V.cva("grid gap-8",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"},spacing:{sm:"gap-4",md:"gap-8",lg:"gap-12"}},defaultVariants:{columns:3,spacing:"md"}}),V.cva("group transition-all duration-300",{variants:{variant:{default:"text-center",left:"text-left",hoverable:"text-center hover:transform hover:scale-105 cursor-pointer",card:"bg-white dark:bg-gray-800 rounded-2xl p-8 shadow-lg hover:shadow-xl text-center",minimal:"text-center space-y-4"},animation:{none:"",hover:"hover:transform hover:scale-105",float:"hover:-translate-y-2"}},defaultVariants:{variant:"default",animation:"hover"}}),V.cva("flex items-center justify-center rounded-2xl mb-6 transition-all duration-300",{variants:{size:{sm:"w-16 h-16",md:"w-20 h-20",lg:"w-24 h-24"},style:{gradient:"bg-gradient-to-br from-blue-100 to-blue-200 dark:from-blue-900/30 dark:to-blue-800/30 group-hover:from-blue-200 group-hover:to-blue-300 dark:group-hover:from-blue-800/40 dark:group-hover:to-blue-700/40",solid:"bg-blue-100 dark:bg-blue-900/30 group-hover:bg-blue-200 dark:group-hover:bg-blue-800/40",outline:"border-2 border-blue-200 dark:border-blue-800 group-hover:border-blue-300 dark:group-hover:border-blue-700",colorful:"group-hover:scale-110"},position:{center:"mx-auto",left:"",right:"ml-auto"}},defaultVariants:{size:"md",style:"gradient",position:"center"}});const xn=O.forwardRef(({className:t,type:e,...a},o)=>r.jsx("input",{type:e,className:u(D.input.default(),t),ref:o,...a}));xn.displayName="Input";const Tr=B.Root,kn=B.Value,Fe=O.forwardRef(({className:t,children:e,...a},o)=>r.jsxs(B.Trigger,{ref:o,className:u("flex h-9 w-full items-center justify-between rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...a,children:[e,r.jsx(B.Icon,{asChild:!0,children:r.jsx(X.ChevronDown,{className:"h-4 w-4 opacity-50 ml-2 flex-shrink-0"})})]}));Fe.displayName=B.Trigger.displayName;const Ar=O.forwardRef(({className:t,...e},a)=>r.jsx(B.ScrollUpButton,{ref:a,className:u("flex cursor-default items-center justify-center py-1",t),...e,children:r.jsx(X.ChevronUp,{className:"h-4 w-4"})}));Ar.displayName=B.ScrollUpButton.displayName;const Pr=O.forwardRef(({className:t,...e},a)=>r.jsx(B.ScrollDownButton,{ref:a,className:u("flex cursor-default items-center justify-center py-1",t),...e,children:r.jsx(X.ChevronDown,{className:"h-4 w-4"})}));Pr.displayName=B.ScrollDownButton.displayName;const Ve=O.forwardRef(({className:t,children:e,position:a="popper",...o},n)=>r.jsx(B.Portal,{children:r.jsxs(B.Content,{ref:n,className:u(D.overlays.dropdown.menu(),"z-[1000000] max-h-96 min-w-[8rem] overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...o,children:[r.jsx(Ar,{}),r.jsx(B.Viewport,{className:u(D.overlays.dropdown.itemContainer(),a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),r.jsx(Pr,{})]})}));Ve.displayName=B.Content.displayName;const wn=O.forwardRef(({className:t,...e},a)=>r.jsx(B.Label,{ref:a,className:u(D.overlays.dropdown.header(),"py-1.5",t),...e}));wn.displayName=B.Label.displayName;const He=O.forwardRef(({className:t,children:e,...a},o)=>r.jsxs(B.Item,{ref:o,className:u(D.overlays.dropdown.item(),"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[r.jsx(B.ItemText,{children:e}),r.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(B.ItemIndicator,{children:r.jsx(X.Check,{className:"h-4 w-4"})})})]}));He.displayName=B.Item.displayName;const Cn=O.forwardRef(({className:t,...e},a)=>r.jsx(B.Separator,{ref:a,className:u("my-1 h-px bg-gray-200 dark:bg-gray-700",t),...e}));Cn.displayName=B.Separator.displayName;const Nn=O.forwardRef(({className:t,...e},a)=>r.jsx(oe.Root,{className:u("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-gray-200 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950 dark:data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-gray-700",t),...e,ref:a,children:r.jsx(oe.Thumb,{className:u("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Nn.displayName=oe.Root.displayName;const Sn=O.forwardRef(({className:t,...e},a)=>r.jsx(H.List,{ref:a,className:u(D.navigation.tabs.list(),t),...e}));Sn.displayName=H.List.displayName;const En=O.forwardRef(({className:t,...e},a)=>r.jsx(H.Trigger,{ref:a,className:u(D.navigation.tabs.trigger(),t),...e}));En.displayName=H.Trigger.displayName;const Ln=O.forwardRef(({className:t,...e},a)=>r.jsx(H.Content,{ref:a,className:u(D.navigation.tabs.content(),t),...e}));Ln.displayName=H.Content.displayName,V.cva("min-h-screen flex flex-col",{variants:{background:{default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",transparent:"bg-transparent",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/20 dark:to-purple-900/20"},overflow:{visible:"overflow-visible",hidden:"overflow-hidden",scroll:"overflow-auto"}},defaultVariants:{background:"default",overflow:"visible"}}),V.cva("",{variants:{variant:{default:"",hero:"relative overflow-hidden",feature:"bg-white dark:bg-gray-800",cta:"relative overflow-hidden",testimonial:"bg-gray-50 dark:bg-gray-900",footer:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border-t"},spacing:{none:"",xs:"py-2",sm:"py-3",md:"py-4",lg:"py-6",xl:"py-8","2xl":"py-12","3xl":"py-16","4xl":"py-20","5xl":"py-24"},background:{none:"bg-transparent",default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/50 dark:to-purple-900/50","gradient-primary":"bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-blue-900/50 dark:to-indigo-900/50","gradient-secondary":"bg-gradient-to-br from-green-50 to-blue-100 dark:from-green-900/50 dark:to-blue-900/50","gradient-tertiary":"bg-gradient-to-r from-emerald-50 to-teal-50 dark:from-gray-800 dark:to-gray-900","gradient-vibrant":"bg-gradient-to-br from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"}},defaultVariants:{variant:"default",spacing:"3xl",background:"none"}}),V.cva("",{variants:{variant:{hero:T.heading.display.hero(),display:T.heading.display.lg(),h1:T.heading.h1(),h2:T.heading.h2(),h3:T.heading.h3()},responsive:{true:"",false:""},align:{left:"text-left",center:"text-center",right:"text-right"},color:{default:"text-gray-900 dark:text-white",muted:"text-gray-600 dark:text-gray-400",vibrant:"text-white",brand:"bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent"}},defaultVariants:{variant:"h1",responsive:!0,align:"left",color:"default"}}),V.cva("",{variants:{variant:{h2:T.heading.h2(),h3:T.heading.h3(),h4:T.heading.h4(),h5:T.heading.h5(),h6:T.heading.h6()},spacing:{none:"",sm:"mb-2",md:"mb-4",lg:"mb-6",xl:"mb-8"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{variant:"h2",spacing:"md",align:"left"}}),V.cva("",{variants:{variant:{body:T.body.md(),lead:T.body.lg(),large:T.body.lg(),small:T.body.sm(),caption:T.body.xs()},color:{default:"text-gray-700 dark:text-gray-300",muted:"text-gray-500 dark:text-gray-500",primary:"text-gray-900 dark:text-white"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"body",color:"default",align:"left"}}),V.cva(T.link.default(),{variants:{variant:{default:T.link.default(),subtle:T.link.subtle(),muted:T.link.muted(),button:"inline-flex items-center justify-center px-4 py-2 rounded-md bg-blue-600 text-white hover:bg-blue-700 transition-colors"},external:{true:"inline-flex items-center gap-1",false:""}},defaultVariants:{variant:"default",external:!1}});const qe=V.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:T.link.subtle(),default:T.link.default(),muted:T.link.muted(),external:T.link.external(),inherit:"text-inherit hover:text-blue-600 dark:hover:text-blue-400 underline-offset-2 hover:underline transition-colors duration-200"},size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{variant:"subtle",size:"default"}}),In=O.forwardRef(({className:t,variant:e,size:a,to:o,href:n,external:s,children:l,...g},c)=>{const i=o||n;return i?s||i.startsWith("http")||i.startsWith("mailto:")?r.jsx("a",{className:u(qe({variant:e==="subtle"?"external":e,size:a,className:t})),href:i,target:"_blank",rel:"noopener noreferrer",ref:c,...g,children:l}):r.jsx(Ue.Link,{className:u(qe({variant:e,size:a,className:t})),to:i,ref:c,...g,children:l}):r.jsx("span",{className:u(qe({variant:e,size:a,className:t})),...g,children:l})});In.displayName="SmartLink",V.cva("border-b transition-all duration-200",{variants:{variant:{default:"bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 border-green-200 dark:border-green-700",compact:"bg-green-50 dark:bg-green-900/10 border-green-200 dark:border-green-800",minimal:"bg-gray-50 dark:bg-gray-900/50 border-gray-200 dark:border-gray-700",vibrant:"bg-gradient-to-r from-blue-600 to-purple-600 border-blue-700"},size:{default:"py-4",compact:"py-3",large:"py-6"}},defaultVariants:{variant:"default",size:"default"}}),V.cva("font-semibold",{variants:{variant:{default:"text-green-800 dark:text-green-200",compact:"text-green-700 dark:text-green-300",minimal:"text-gray-700 dark:text-gray-300",vibrant:"text-white"}},defaultVariants:{variant:"default"}}),V.cva("inline-flex items-center justify-center px-6 py-2 rounded-lg font-medium transition-all duration-200 hover:transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-offset-2",{variants:{variant:{default:"bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 text-white focus:ring-green-500",compact:"bg-green-600 hover:bg-green-700 text-white focus:ring-green-500",minimal:"bg-blue-600 hover:bg-blue-700 text-white focus:ring-blue-500",vibrant:"bg-white hover:bg-gray-100 text-blue-600 hover:text-blue-700 focus:ring-white"}},defaultVariants:{variant:"default"}}),V.cva("bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 transition-all duration-200",{variants:{variant:{default:"border-gray-200 dark:border-gray-700 border hover:shadow-lg",elevated:"shadow-lg hover:shadow-xl",minimal:"bg-transparent shadow-none border-none p-4"},trend:{none:"",up:"border-l-4 border-green-500",down:"border-l-4 border-red-500",neutral:"border-l-4 border-gray-400"}},defaultVariants:{variant:"default",trend:"none"}}),V.cva("space-y-6",{variants:{variant:{default:"",card:"bg-white dark:bg-gray-800 rounded-lg border-gray-200 dark:border-gray-700 border p-6",minimal:"space-y-4"},spacing:{tight:"space-y-3",normal:"space-y-4",relaxed:"space-y-6",loose:"space-y-8"}},defaultVariants:{variant:"default",spacing:"normal"}}),V.cva("flex flex-col items-center text-center space-y-4",{variants:{layout:{vertical:"flex-col items-center text-center",horizontal:"flex-row items-start text-left space-y-0 space-x-4",minimal:"flex-col space-y-2"},spacing:{tight:"space-y-2",normal:"space-y-4",relaxed:"space-y-6"},interactive:{true:"transition-all duration-200 hover:transform hover:scale-105 cursor-pointer",false:""}},defaultVariants:{layout:"vertical",spacing:"normal",interactive:!1}});const Mn=(t={})=>{const{successDuration:e=2e3,onSuccess:a,onError:o}=t,[n,s]=y.useState(null),l=y.useCallback(async i=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(i);else{const h=document.createElement("textarea");h.value=i,h.style.position="fixed",h.style.left="-999999px",h.style.top="-999999px",document.body.appendChild(h),h.focus(),h.select();const b=document.execCommand("copy");if(document.body.removeChild(h),!b)throw new Error("Copy command was unsuccessful")}return s(i),a?.(i),setTimeout(()=>{s(null)},e),!0}catch(h){const b=h instanceof Error?h:new Error("Copy failed");return o?.(b),!1}},[e,a,o]),g=y.useCallback(i=>n===i,[n]),c=y.useCallback(()=>{s(null)},[]);return{copiedValue:n,copyToClipboard:l,isCopied:g,resetCopiedState:c}},$n=(t={})=>{const{successDuration:e=2e3,onSuccess:a,onError:o}=t,[n,s]=y.useState({}),l=y.useCallback(async(i,h)=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(i);else{const b=document.createElement("textarea");b.value=i,b.style.position="fixed",b.style.left="-999999px",b.style.top="-999999px",document.body.appendChild(b),b.focus(),b.select();const x=document.execCommand("copy");if(document.body.removeChild(b),!x)throw new Error("Copy command was unsuccessful")}return s(b=>({...b,[h]:!0})),a?.(i),setTimeout(()=>{s(b=>({...b,[h]:!1}))},e),!0}catch(b){const x=b instanceof Error?b:new Error("Copy failed");return o?.(x),!1}},[e,a,o]),g=y.useCallback(i=>n[i]||!1,[n]),c=y.useCallback(i=>{s(i?h=>({...h,[i]:!1}):{})},[]);return{copiedStates:n,copyToClipboard:l,isCopied:g,resetCopiedState:c}};y.createContext(void 0);const Un=({children:t,onAction:e,actionText:a="Remove",actionIcon:o=U.TrashIcon,destructive:n=!0,isProcessing:s=!1,variant:l="default",className:g})=>{const c="flex items-center justify-between p-4 rounded-lg transition-colors",i={default:"bg-gray-50 dark:bg-gray-700",compact:"bg-gray-50 dark:bg-gray-700 py-2 px-3",elevated:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 shadow-sm hover:shadow-md"};return r.jsxs("div",{className:u(c,i[l],g),children:[r.jsx("div",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:t}),r.jsxs(J,{variant:n?"ghost":"outline",size:"sm",onClick:e,disabled:s,className:u("ml-4",n&&"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 hover:bg-red-50 dark:hover:bg-red-900/20"),children:[r.jsx(o,{className:"h-4 w-4 mr-1"}),a]})]})},Tn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UuserUtable",children:e||"UuserUtable Component"}),An=({source:t,target:e,onChange:a,sourceTitle:o="Available",targetTitle:n="Selected",searchable:s=!0,sourceSearchPlaceholder:l="Search available...",targetSearchPlaceholder:g="Search selected...",height:c=300,disabled:i=!1,className:h})=>{const[b,x]=y.useState(""),[m,f]=y.useState(""),[p,C]=y.useState(new Set),[S,k]=y.useState(new Set),N=s?t.filter(P=>P.label.toLowerCase().includes(b.toLowerCase())):t,v=s?e.filter(P=>P.label.toLowerCase().includes(m.toLowerCase())):e,w=P=>{const W=new Set(p);W.has(P)?W.delete(P):W.add(P),C(W)},L=P=>{const W=new Set(S);W.has(P)?W.delete(P):W.add(P),k(W)},M=()=>{const P=t.filter(F=>p.has(F.id)),W=t.filter(F=>!p.has(F.id)),j=[...e,...P];a(W,j),C(new Set)},I=()=>{const P=e.filter(F=>S.has(F.id)),W=e.filter(F=>!S.has(F.id)),j=[...t,...P];a(j,W),k(new Set)},$=()=>{const P=[...e,...t];a([],P),C(new Set)},A=()=>{const P=[...t,...e];a(P,[]),k(new Set)},z=(P,W,j,F,q,dr,yc)=>r.jsxs("div",{className:"flex flex-col flex-1 border border-gray-300 dark:border-gray-700 rounded-md bg-white dark:bg-gray-900",children:[r.jsxs("div",{className:"px-3 py-2 border-b border-gray-300 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",children:[r.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:W}),r.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:[P.length," item",P.length!==1?"s":""]})]}),s&&r.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:r.jsx("input",{type:"text",value:q,onChange:K=>dr(K.target.value),placeholder:yc,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"})}),r.jsx("div",{className:"overflow-y-auto p-2 space-y-1",style:{height:s?c-120:c-60},children:P.length===0?r.jsx("div",{className:"flex items-center justify-center h-full text-sm text-gray-500 dark:text-gray-400",children:"No items"}):P.map(K=>{const cr=j.has(K.id);return r.jsx("button",{onClick:()=>!K.disabled&&F(K.id),disabled:K.disabled||i,className:u("w-full px-3 py-2 text-left rounded-md transition-colors","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-50 disabled:cursor-not-allowed",cr&&"bg-blue-50 dark:bg-blue-900/30 border border-blue-200 dark:border-blue-700"),children:r.jsxs("div",{className:"flex items-start gap-2",children:[r.jsx("div",{className:u("w-4 h-4 border-2 rounded flex items-center justify-center flex-shrink-0 mt-0.5",cr?"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500":"border-gray-300 dark:border-gray-600"),children:cr&&r.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:K.label}),K.description&&r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:K.description})]})]})},K.id)})})]});return r.jsxs("div",{className:u("flex gap-4",h),children:[z(N,o,p,w,b,x,l),r.jsxs("div",{className:"flex flex-col justify-center gap-2",children:[r.jsx("button",{onClick:$,disabled:i||t.length===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to selected",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 5l7 7-7 7M5 5l7 7-7 7"})})}),r.jsx("button",{onClick:M,disabled:i||p.size===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to target",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),r.jsx("button",{onClick:I,disabled:i||S.size===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to source",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),r.jsx("button",{onClick:A,disabled:i||e.length===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to available",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 19l-7-7 7-7M19 19l-7-7 7-7"})})})]}),z(v,n,S,L,m,f,g)]})};function Pn({items:t,itemHeight:e,height:a,renderItem:o,keyExtractor:n,overscan:s=3,className:l}){const[g,c]=y.useState(0),i=y.useRef(null),h=p=>{c(p.currentTarget.scrollTop)},b=t.length*e,x=Math.max(0,Math.floor(g/e)-s),m=Math.min(t.length-1,Math.ceil((g+a)/e)+s),f=t.slice(x,m+1);return r.jsx("div",{ref:i,className:u("overflow-auto",l),style:{height:a},onScroll:h,children:r.jsx("div",{style:{height:b,position:"relative"},children:f.map((p,C)=>{const S=x+C;return r.jsx("div",{style:{position:"absolute",top:S*e,height:e,width:"100%"},children:o(p,S)},n(p,S))})})})}const zn=({data:t,selectedId:e,onSelect:a,expandedIds:o,onExpand:n,defaultExpanded:s=!1,showLines:l=!1,className:g})=>{const[c,i]=y.useState(new Set(s?t.map(f=>f.id):[])),h=o!==void 0?new Set(o):c,b=f=>{o!==void 0&&n?n(f):i(p=>{const C=new Set(p);return C.has(f)?C.delete(f):C.add(f),C})},x=f=>{!f.disabled&&a&&a(f)},m=(f,p=0)=>{const C=f.children&&f.children.length>0,S=h.has(f.id),k=e===f.id;return r.jsxs("div",{children:[r.jsxs("div",{className:u("flex items-center gap-2 px-2 py-1.5 rounded-md transition-colors",!f.disabled&&"hover:bg-gray-100 dark:hover:bg-gray-800",k&&"bg-blue-50 dark:bg-blue-900/30",f.disabled&&"opacity-50 cursor-not-allowed",!f.disabled&&"cursor-pointer"),style:{paddingLeft:`${p*1.5+.5}rem`},onClick:()=>x(f),children:[C?r.jsx("button",{onClick:N=>{N.stopPropagation(),b(f.id)},className:"flex-shrink-0 w-4 h-4 flex items-center justify-center hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",children:r.jsx("svg",{className:u("w-3 h-3 transition-transform",S&&"rotate-90"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}):r.jsx("div",{className:"w-4 h-4 flex-shrink-0"}),f.icon&&r.jsx("span",{className:"flex-shrink-0 w-4 h-4 text-gray-600 dark:text-gray-400",children:f.icon}),r.jsx("span",{className:u("flex-1 text-sm",k?"text-blue-700 dark:text-blue-300 font-medium":"text-gray-900 dark:text-white"),children:f.label})]}),C&&S&&r.jsx("div",{className:u(l&&"border-l-2 border-gray-200 dark:border-gray-700 ml-2"),children:f.children.map(N=>m(N,p+1))})]},f.id)};return r.jsx("div",{className:u("w-full",g),children:t.map(f=>m(f,0))})},Dn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UlistingUform",children:e||"UlistingUform Component"}),jn="bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border border-blue-200 dark:border-blue-800",Bn={none:"",sm:"p-3",md:"p-6",lg:"p-8"},_e=({variant:t="elevated",padding:e="md",icon:a,onClose:o,className:n,children:s,...l})=>{const c=["info","success","warning","error"].includes(t)&&(a||o),i=t==="callout"?jn:Wt(t);return r.jsx("div",{className:u("rounded-lg",i,Bn[e],n),...l,children:c?r.jsxs("div",{className:"flex items-start gap-3",children:[a&&r.jsx("div",{className:"flex-shrink-0 text-lg",children:a}),r.jsx("div",{className:"flex-1 min-w-0",children:s}),o&&r.jsx("button",{onClick:o,className:"flex-shrink-0 text-current hover:opacity-70 transition-opacity","aria-label":"Close",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):s})},Wn=({title:t,description:e,className:a,children:o,...n})=>r.jsxs("div",{className:u("space-y-1.5",a),...n,children:[t&&r.jsx("h3",{className:T.heading.h4(),children:t}),e&&r.jsx("p",{className:T.body.sm(),children:e}),o]}),On=({className:t,children:e,...a})=>r.jsx("div",{className:u("",t),...a,children:e}),Fn=({className:t,children:e,...a})=>r.jsx("div",{className:u("flex items-center pt-4",t),...a,children:e}),Vn=({title:t,children:e,variant:a="info",size:o="default",className:n})=>{const s={sm:"sm",default:"md",lg:"lg"},l=a==="neutral"?"bordered":a;return r.jsxs(_e,{variant:l,padding:s[o],className:n,children:[t&&r.jsx("h3",{className:u("font-semibold mb-2",o==="sm"?"text-base":o==="lg"?"text-xl":"text-lg"),children:t}),e]})},Hn=({title:t,icon:e,children:a,variant:o="gradient",size:n="default",centered:s=!1,className:l})=>{const g={sm:"sm",default:"md",lg:"lg"},c=o==="gradient"||o==="neutral"?"callout":o;return r.jsx(_e,{variant:c,padding:g[n],className:l,children:r.jsxs("div",{className:u("space-y-4",s&&"text-center"),children:[e&&r.jsx("div",{className:u("font-bold",n==="sm"?"text-2xl":n==="lg"?"text-5xl":"text-4xl",s?"text-center":"text-left"),children:e}),t&&r.jsx("h3",{className:u("font-bold mb-4",n==="sm"?"text-lg":n==="lg"?"text-3xl":"text-2xl"),children:t}),r.jsx("div",{className:u("text-gray-600 dark:text-gray-400",n==="sm"?"text-sm":n==="lg"?"text-lg":"text-base"),children:a})]})})},qn=({title:t,value:e,change:a,changePeriod:o="vs last period",icon:n,variant:s="default",className:l})=>{const g={default:"bg-white dark:bg-gray-900",primary:"bg-blue-50 dark:bg-blue-900/20",success:"bg-green-50 dark:bg-green-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",danger:"bg-red-50 dark:bg-red-900/20"};return r.jsxs("div",{className:u("rounded-lg border border-gray-200 dark:border-gray-700 p-6",g[s],l),children:[r.jsxs("div",{className:"flex items-start justify-between mb-2",children:[r.jsx("h3",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:t}),n&&r.jsx("div",{className:"text-gray-400 dark:text-gray-600",children:n})]}),r.jsx("div",{className:"flex items-end justify-between",children:r.jsxs("div",{children:[r.jsx("p",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:e}),a!==void 0&&r.jsxs("div",{className:"flex items-center gap-1 mt-2",children:[r.jsxs("span",{className:u("text-sm font-medium",a>=0?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:[a>=0?"↑":"↓"," ",Math.abs(a),"%"]}),r.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:o})]})]})})]})},_n=({src:t,alt:e="Avatar",fallback:a,name:o,size:n="md",status:s,className:l,onClick:g})=>{const[c,i]=y.useState(!1),h={sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base"},b={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},x={online:"bg-green-500",offline:"bg-gray-400",away:"bg-yellow-500",busy:"bg-red-500"},f=a||(o?(S=>{const k=S.trim().split(/\s+/);return k.length===1?k[0].charAt(0).toUpperCase():k[0].charAt(0).toUpperCase()+k[k.length-1].charAt(0).toUpperCase()})(o):""),p=t&&!c,C=()=>{i(!0)};return r.jsxs("div",{className:"relative inline-block flex-shrink-0",children:[r.jsx("div",{className:u("flex items-center justify-center overflow-hidden rounded-full",h[n],!p&&"bg-gray-300 dark:bg-gray-600 text-gray-700 dark:text-gray-200",g&&"cursor-pointer hover:opacity-80 transition-opacity",l),onClick:g,role:g?"button":void 0,tabIndex:g?0:void 0,children:p?r.jsx("img",{src:t,alt:e,className:"w-full h-full object-cover",onError:C}):r.jsx("span",{className:"font-semibold",children:f})}),s&&r.jsx("span",{className:u("absolute bottom-0 right-0 rounded-full border-2 border-white dark:border-gray-800",x[s],b[n]),"aria-label":s})]})},Gn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UavatarUgroup",children:e||"UavatarUgroup Component"}),Kn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UprofileUheader",children:e||"UprofileUheader Component"}),Yn=({label:t,value:e,orientation:a="vertical",align:o="start",labelWidth:n="auto",size:s="md",separator:l=!1,labelVariant:g="muted",valueVariant:c="default",className:i,labelClassName:h,valueClassName:b})=>{const x={sm:{label:T.body.sm(),value:T.body.sm(),gap:"gap-1"},md:{label:T.body.md(),value:T.body.md(),gap:"gap-2"},lg:{label:T.body.lg(),value:T.body.lg(),gap:"gap-3"}},m={auto:"",sm:"w-24",md:"w-32",lg:"w-40"},f={start:"justify-start",center:"justify-center",between:"justify-between"},p={default:"text-gray-700 dark:text-gray-300",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold"},C={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold",primary:"text-blue-600 dark:text-blue-400"},S=x[s];return r.jsxs("div",{className:u(a==="horizontal"?"flex items-center":"flex flex-col",a==="horizontal"&&f[o],S.gap,l&&"pb-3 mb-3 border-b border-gray-200 dark:border-gray-700",i),children:[r.jsx("dt",{className:u(S.label,p[g],a==="horizontal"&&m[n],a==="horizontal"&&"flex-shrink-0",h),children:t}),r.jsx("dd",{className:u(S.value,C[c],a==="horizontal"&&"flex-1",b),children:e})]})},Qn=({value:t,label:e,variant:a="neutral",size:o="md",align:n="center",icon:s,iconPosition:l="top",className:g,valueClassName:c,labelClassName:i})=>{const h={primary:{value:"text-blue-600 dark:text-blue-400",label:"text-blue-600/70 dark:text-blue-400/70",icon:"text-blue-600 dark:text-blue-400"},success:{value:"text-green-600 dark:text-green-400",label:"text-green-600/70 dark:text-green-400/70",icon:"text-green-600 dark:text-green-400"},warning:{value:"text-yellow-600 dark:text-yellow-400",label:"text-yellow-600/70 dark:text-yellow-400/70",icon:"text-yellow-600 dark:text-yellow-400"},danger:{value:"text-red-600 dark:text-red-400",label:"text-red-600/70 dark:text-red-400/70",icon:"text-red-600 dark:text-red-400"},neutral:{value:"text-gray-900 dark:text-gray-100",label:"text-gray-600 dark:text-gray-400",icon:"text-gray-600 dark:text-gray-400"},white:{value:"text-white",label:"text-white/70",icon:"text-white"}},b={sm:{value:T.heading.h5(),label:T.caption.default(),icon:"h-4 w-4"},md:{value:T.heading.h4(),label:T.body.sm(),icon:"h-5 w-5"},lg:{value:T.heading.h3(),label:T.body.md(),icon:"h-6 w-6"},xl:{value:T.heading.h2(),label:T.body.lg(),icon:"h-8 w-8"}},x={left:"text-left",center:"text-center",right:"text-right"},m=h[a],f=b[o];return r.jsxs("div",{className:u(x[n],g),children:[s&&l==="top"&&r.jsx(s,{className:u(f.icon,m.icon,"mb-2",n==="center"&&"mx-auto")}),r.jsxs("div",{className:u(l==="left"&&s&&"flex items-center gap-3",n==="center"&&l==="left"&&"justify-center"),children:[s&&l==="left"&&r.jsx(s,{className:u(f.icon,m.icon)}),r.jsxs("div",{children:[r.jsx("div",{className:u("font-bold",f.value,m.value,c),children:t}),r.jsx("div",{className:u(f.label,m.label,i),children:e})]})]})]})},zr=({icon:t,title:e="No data",description:a,action:o,className:n})=>r.jsxs("div",{className:u("flex flex-col items-center justify-center py-12 px-4 text-center",n),children:[t&&r.jsx("div",{className:"mb-4 text-gray-400 dark:text-gray-600",children:t}),r.jsx("h3",{className:u(T.heading.h3(),"mb-2"),children:e}),a&&r.jsx("p",{className:u(T.body.sm(),"text-gray-600 dark:text-gray-400 max-w-sm mb-6"),children:a}),o&&r.jsx("div",{className:"mt-4",children:o})]}),Zn=({title:t,subtext:e,className:a})=>r.jsx(zr,{title:t,description:e,className:a}),Xn=({data:t,orientation:e="vertical",showValues:a=!1,showGrid:o=!0,barWidth:n=40,height:s=300,className:l})=>{const g=Math.max(...t.map(i=>i.value)),c="#3b82f6";return r.jsx("div",{className:u("w-full",l),children:r.jsxs("div",{className:"relative bg-white dark:bg-gray-900 rounded-lg p-6",style:{height:`${s}px`},children:[o&&r.jsx("div",{className:"absolute inset-6 flex flex-col justify-between",children:[...Array(5)].map((i,h)=>r.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700"},h))}),e==="vertical"?r.jsx("div",{className:"relative h-full flex items-end justify-around gap-2",children:t.map((i,h)=>{const b=i.value/g*100;return r.jsxs("div",{className:"flex flex-col items-center gap-2",style:{width:`${n}px`},children:[a&&r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:i.value}),r.jsx("div",{className:"w-full rounded-t transition-all hover:opacity-80",style:{height:`${b}%`,backgroundColor:i.color||c}}),r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:i.label})]},h)})}):r.jsx("div",{className:"relative h-full flex flex-col justify-around gap-2",children:t.map((i,h)=>{const b=i.value/g*100;return r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 w-16 text-right",children:i.label}),r.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[r.jsx("div",{className:"h-8 rounded transition-all hover:opacity-80",style:{width:`${b}%`,backgroundColor:i.color||c}}),a&&r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:i.value})]})]},h)})})]})})},Jn=({series:t,showLegend:e=!0,showGrid:a=!0,showPoints:o=!0,height:n=300,xLabels:s,className:l})=>{const g=t.flatMap(m=>m.data),c=Math.max(...g.map(m=>m.y)),i=Math.min(...g.map(m=>m.y)),h=Math.max(...g.map(m=>m.x)),b=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],x=m=>m.length===0?"":`M ${m.map(p=>{const C=p.x/h*100,S=100-(p.y-i)/(c-i)*100;return`${C},${S}`}).join(" L ")}`;return r.jsxs("div",{className:u("w-full",l),children:[e&&r.jsx("div",{className:"flex flex-wrap gap-4 mb-4",children:t.map((m,f)=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:m.color||b[f%b.length]}}),r.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:m.name})]},f))}),r.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[r.jsxs("div",{className:"relative",style:{height:`${n}px`},children:[a&&r.jsx("div",{className:"absolute inset-0",children:[...Array(5)].map((m,f)=>r.jsx("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${f*25}%`}},f))}),r.jsx("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:t.map((m,f)=>{const p=m.color||b[f%b.length];return r.jsxs("g",{children:[r.jsx("path",{d:x(m.data),fill:"none",stroke:p,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),o&&m.data.map((C,S)=>{const k=C.x/h*100,N=100-(C.y-i)/(c-i)*100;return r.jsx("circle",{cx:k,cy:N,r:"1",fill:p,vectorEffect:"non-scaling-stroke"},S)})]},f)})})]}),s&&r.jsx("div",{className:"flex justify-between mt-2",children:s.map((m,f)=>r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:m},f))})]})]})},Rn=({data:t,variant:e="pie",showLegend:a=!0,showPercentages:o=!1,size:n=200,donutHoleSize:s=40,className:l})=>{const g=t.reduce((f,p)=>f+p.value,0),c=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899"],i=t.reduce((f,p,C)=>{const S=p.value/g*100,k=S/100*360,N=f.length>0?f[f.length-1].endAngle:-90,v=N+k;return f.push({...p,percentage:S,startAngle:N,endAngle:v,color:p.color||c[C%c.length]}),f},[]),h=(f,p,C,S)=>{const k=(S-90)*Math.PI/180;return{x:f+C*Math.cos(k),y:p+C*Math.sin(k)}},b=(f,p,C,S,k)=>{const N=h(f,p,C,k),v=h(f,p,C,S),w=k-S<=180?"0":"1";if(e==="donut"){const L=C*s/100,M=h(f,p,L,k),I=h(f,p,L,S);return["M",N.x,N.y,"A",C,C,0,w,0,v.x,v.y,"L",I.x,I.y,"A",L,L,0,w,1,M.x,M.y,"Z"].join(" ")}return["M",f,p,"L",N.x,N.y,"A",C,C,0,w,0,v.x,v.y,"Z"].join(" ")},x=n/2,m=n/2-10;return r.jsxs("div",{className:u("flex flex-col items-center gap-4",l),children:[r.jsx("svg",{width:n,height:n,className:"transform rotate-0",children:i.map((f,p)=>r.jsx("path",{d:b(x,x,m,f.startAngle,f.endAngle),fill:f.color,className:"transition-opacity hover:opacity-80"},p))}),a&&r.jsx("div",{className:"flex flex-col gap-2",children:i.map((f,p)=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:f.color}}),r.jsxs("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:[f.label,o&&r.jsxs("span",{className:"text-gray-500 dark:text-gray-400 ml-1",children:["(",Math.round(f.percentage),"%)"]})]})]},p))})]})},es=({series:t,showLegend:e=!0,showGrid:a=!0,fillOpacity:o=.2,height:n=300,xLabels:s,className:l})=>{const g=t.flatMap(f=>f.data),c=Math.max(...g.map(f=>f.y)),i=Math.min(...g.map(f=>f.y)),h=Math.max(...g.map(f=>f.x)),b=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],x=f=>{if(f.length===0)return"";const p=f.map(k=>{const N=k.x/h*100,v=100-(k.y-i)/(c-i)*100;return`${N},${v}`}),C=f[0].x/h*100,S=f[f.length-1].x/h*100;return`M ${C},100 L ${p.join(" L ")} L ${S},100 Z`},m=f=>f.length===0?"":`M ${f.map(C=>{const S=C.x/h*100,k=100-(C.y-i)/(c-i)*100;return`${S},${k}`}).join(" L ")}`;return r.jsxs("div",{className:u("w-full",l),children:[e&&r.jsx("div",{className:"flex flex-wrap gap-4 mb-4",children:t.map((f,p)=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:f.color||b[p%b.length]}}),r.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:f.name})]},p))}),r.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[r.jsxs("div",{className:"relative",style:{height:`${n}px`},children:[a&&r.jsx("div",{className:"absolute inset-0",children:[...Array(5)].map((f,p)=>r.jsx("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${p*25}%`}},p))}),r.jsx("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:t.map((f,p)=>{const C=f.color||b[p%b.length];return r.jsxs("g",{children:[r.jsx("path",{d:x(f.data),fill:C,fillOpacity:o}),r.jsx("path",{d:m(f.data),fill:"none",stroke:C,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"})]},p)})})]}),s&&r.jsx("div",{className:"flex justify-between mt-2",children:s.map((f,p)=>r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:f},p))})]})]})},rs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UradarUchart",children:e||"UradarUchart Component"}),ts=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UbubbleUchart",children:e||"UbubbleUchart Component"}),as=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UscatterUplot",children:e||"UscatterUplot Component"}),os=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UtreeUmap",children:e||"UtreeUmap Component"}),ns=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UsankeyUdiagram",children:e||"UsankeyUdiagram Component"}),ss=({data:t,width:e=100,height:a=30,color:o="#3b82f6",fill:n=!1,className:s})=>{if(t.length===0)return null;const l=Math.max(...t),g=Math.min(...t),c=l-g||1,i=t.map((h,b)=>{const x=b/(t.length-1)*e,m=a-(h-g)/c*a;return`${x},${m}`}).join(" ");return r.jsxs("svg",{width:e,height:a,className:u("inline-block",s),children:[n&&r.jsx("polygon",{points:`0,${a} ${i} ${e},${a}`,fill:o,opacity:"0.2"}),r.jsx("polyline",{points:i,fill:"none",stroke:o,strokeWidth:"2",strokeLinejoin:"round",strokeLinecap:"round"})]})},ls=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"Uheatmap",children:e||"Uheatmap Component"}),is=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UfunnelUchart",children:e||"UfunnelUchart Component"}),ds=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"BurndownChart",children:e||"BurndownChart Component"}),cs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UperformanceUchart",children:e||"UperformanceUchart Component"}),gs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UmetricUcomparison",children:e||"UmetricUcomparison Component"}),us=({value:t,min:e=0,max:a=100,size:o=120,strokeWidth:n=10,showValue:s=!0,label:l,variant:g="primary",className:c})=>{const i=Math.min(a,Math.max(e,t)),h=(i-e)/(a-e)*100,b=o/2,x=(o-n)/2,m=Math.PI*x,f=m-h/100*m,p={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"};return r.jsxs("div",{className:u("inline-flex flex-col items-center gap-2",c),children:[r.jsxs("svg",{width:o,height:o*.65,className:"transform rotate-180",children:[r.jsx("path",{d:`M ${n/2} ${b} A ${x} ${x} 0 0 1 ${o-n/2} ${b}`,fill:"none",className:"stroke-gray-200 dark:stroke-gray-700",strokeWidth:n,strokeLinecap:"round"}),r.jsx("path",{d:`M ${n/2} ${b} A ${x} ${x} 0 0 1 ${o-n/2} ${b}`,fill:"none",className:u(p[g],"transition-all duration-500"),strokeWidth:n,strokeDasharray:m,strokeDashoffset:f,strokeLinecap:"round"})]}),s&&r.jsxs("div",{className:"text-center -mt-8",children:[r.jsx("div",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:Math.round(i)}),l&&r.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:l})]})]})},hs=({value:t,max:e=100,variant:a="primary",size:o="md",showLabel:n=!1,labelPosition:s="outside",label:l,className:g,barClassName:c,animated:i=!0,striped:h=!1})=>{const b=Math.min(Math.max(t/e*100,0),100),x=l||`${Math.round(b)}%`,m={primary:"bg-blue-600 dark:bg-blue-500",success:"bg-green-600 dark:bg-green-500",warning:"bg-yellow-600 dark:bg-yellow-500",danger:"bg-red-600 dark:bg-red-500",purple:"bg-purple-600 dark:bg-purple-500",gray:"bg-gray-600 dark:bg-gray-500"},f={sm:"h-1",md:"h-2",lg:"h-3"};return r.jsx("div",{className:u("w-full",g),children:r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:u("flex-1 bg-gray-200 dark:bg-gray-600 rounded-full overflow-hidden",f[o]),children:r.jsx("div",{className:u("rounded-full",f[o],m[a],i&&"transition-all duration-300 ease-in-out",h&&"bg-gradient-to-r from-transparent via-white/20 to-transparent bg-[length:20px_100%]",c),style:{width:`${b}%`},role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":e,children:n&&s==="inside"&&o==="lg"&&r.jsx("span",{className:"flex items-center justify-center h-full text-xs font-medium text-white px-2",children:x})})}),n&&s==="outside"&&r.jsx("span",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 whitespace-nowrap",children:x})]})})},bs=({value:t=0,max:e=100,variant:a="default",size:o="md",showLabel:n=!1,label:s,indeterminate:l=!1,striped:g=!1,animated:c=!1,className:i})=>{const h=Math.min(Math.max(t/e*100,0),100),b={default:"bg-blue-600 dark:bg-blue-500",success:"bg-green-600 dark:bg-green-500",warning:"bg-yellow-600 dark:bg-yellow-500",danger:"bg-red-600 dark:bg-red-500"},x={sm:"h-1",md:"h-2",lg:"h-4"};return r.jsxs("div",{className:u("w-full",i),children:[r.jsx("div",{className:u("w-full bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden",x[o]),role:"progressbar","aria-valuenow":l?void 0:h,"aria-valuemin":0,"aria-valuemax":100,children:l?r.jsx("div",{className:u("h-full rounded-full animate-pulse",b[a]),style:{width:"100%"}}):r.jsx("div",{className:u("h-full rounded-full transition-all duration-300",b[a],g&&"bg-stripe",g&&c&&"animate-stripe"),style:{width:`${h}%`}})}),(n||s)&&r.jsx("div",{className:"mt-1 text-xs text-gray-600 dark:text-gray-400 text-right",children:s||`${Math.round(h)}%`})]})},fs=({value:t,size:e=100,strokeWidth:a=8,showValue:o=!0,label:n,variant:s="primary",color:l,trackColor:g,className:c})=>{const i=Math.min(100,Math.max(0,t)),h=e/2,b=(e-a)/2,x=2*Math.PI*b,m=x-i/100*x,f={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"},p=g||"stroke-gray-200 dark:stroke-gray-700";return r.jsx("div",{className:u("inline-flex items-center justify-center",c),children:r.jsxs("div",{className:"relative",style:{width:e,height:e},children:[r.jsxs("svg",{width:e,height:e,className:"transform -rotate-90",children:[r.jsx("circle",{cx:h,cy:h,r:b,className:p,strokeWidth:a,fill:"none"}),r.jsx("circle",{cx:h,cy:h,r:b,className:u(l?"":f[s],"transition-all duration-300 ease-in-out"),stroke:l,strokeWidth:a,strokeDasharray:x,strokeDashoffset:m,strokeLinecap:"round",fill:"none"})]}),(o||n)&&r.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[o&&!n&&r.jsxs("span",{className:"text-gray-900 dark:text-white font-bold",style:{fontSize:e*.2},children:[Math.round(i),"%"]}),n&&r.jsx("span",{className:"text-gray-900 dark:text-white font-medium text-center px-2",style:{fontSize:e*.15},children:n})]})]})})},ps=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UprogressUtracker",children:e||"UprogressUtracker Component"}),ys=({src:t,alt:e,fallback:a,width:o,height:n,objectFit:s="cover",loading:l="lazy",showLoader:g=!0,rounded:c="none",border:i=!1,className:h,onLoad:b,onError:x})=>{const[m,f]=y.useState(!0),[p,C]=y.useState(!1),[S,k]=y.useState(t);y.useEffect(()=>{f(!0),C(!1),k(t)},[t]);const N=()=>{f(!1),b?.()},v=()=>{f(!1),C(!0),a&&S!==a&&(k(a),C(!1),f(!0)),x?.()},w={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},L={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"},M={width:typeof o=="number"?`${o}px`:o,height:typeof n=="number"?`${n}px`:n};return r.jsxs("div",{className:u("relative inline-block overflow-hidden bg-gray-100 dark:bg-gray-800",w[c],i&&"border border-gray-200 dark:border-gray-700",h),style:M,children:[g&&m&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:r.jsx("div",{className:"animate-pulse",children:r.jsx(U.PhotoIcon,{className:"h-8 w-8 text-gray-400"})})}),p&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:r.jsx(U.PhotoIcon,{className:"h-8 w-8 text-gray-400"})}),!p&&r.jsx("img",{src:S,alt:e,loading:l,onLoad:N,onError:v,className:u("w-full h-full",L[s],m&&g&&"opacity-0")})]})},ms=({images:t,columns:e=3,gap:a=16,lightbox:o=!0,className:n})=>{const[s,l]=y.useState(null),g=b=>{o&&l(b)},c=()=>{l(null)},i=()=>{if(!s)return;const b=t.findIndex(m=>m.id===s.id),x=b>0?b-1:t.length-1;l(t[x])},h=()=>{if(!s)return;const b=t.findIndex(m=>m.id===s.id),x=b<t.length-1?b+1:0;l(t[x])};return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:u("grid",n),style:{gridTemplateColumns:`repeat(${e}, 1fr)`,gap:`${a}px`},children:t.map(b=>r.jsxs("div",{className:u("relative aspect-square overflow-hidden rounded-lg bg-gray-200 dark:bg-gray-700",o&&"cursor-pointer hover:opacity-90 transition-opacity"),onClick:()=>g(b),children:[r.jsx("img",{src:b.thumbnail||b.src,alt:b.alt||"",className:"w-full h-full object-cover"}),b.caption&&r.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 text-white text-sm p-2",children:b.caption})]},b.id))}),o&&s&&r.jsxs("div",{className:"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-4",onClick:c,children:[r.jsx("button",{onClick:c,className:"absolute top-4 right-4 text-white hover:text-gray-300 transition-colors",children:r.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),r.jsx("button",{onClick:b=>{b.stopPropagation(),i()},className:"absolute left-4 text-white hover:text-gray-300 transition-colors",children:r.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),r.jsx("button",{onClick:b=>{b.stopPropagation(),h()},className:"absolute right-4 text-white hover:text-gray-300 transition-colors",children:r.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),r.jsxs("div",{className:"max-w-4xl max-h-full",onClick:b=>b.stopPropagation(),children:[r.jsx("img",{src:s.src,alt:s.alt||"",className:"max-w-full max-h-[80vh] object-contain"}),s.caption&&r.jsx("p",{className:"text-white text-center mt-4",children:s.caption})]})]})]})},vs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UimageUcomparison",children:e||"UimageUcomparison Component"}),xs=({src:t,onCropComplete:e,initialCrop:a,className:o})=>{const[n,s]=y.useState(a||{x:50,y:50,width:200,height:200}),l=y.useRef(null),g=async()=>{if(!l.current||!e)return;const c=document.createElement("canvas"),i=c.getContext("2d");if(!i)return;const h=l.current,b=h.naturalWidth/h.width,x=h.naturalHeight/h.height;c.width=n.width*b,c.height=n.height*x,i.drawImage(h,n.x*b,n.y*x,n.width*b,n.height*x,0,0,c.width,c.height);const m=c.toDataURL("image/png");e(m,n)};return r.jsxs("div",{className:u("inline-flex flex-col gap-4",o),children:[r.jsxs("div",{className:"relative inline-block",children:[r.jsx("img",{ref:l,src:t,alt:"Crop preview",className:"max-w-full h-auto",crossOrigin:"anonymous"}),r.jsxs("div",{className:"absolute border-2 border-blue-500 bg-blue-500/20",style:{left:`${n.x}px`,top:`${n.y}px`,width:`${n.width}px`,height:`${n.height}px`,cursor:"move"},children:[r.jsx("div",{className:"absolute -top-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-nw-resize"}),r.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-ne-resize"}),r.jsx("div",{className:"absolute -bottom-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-sw-resize"}),r.jsx("div",{className:"absolute -bottom-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-se-resize"})]})]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("button",{onClick:g,className:u("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Crop Image"}),r.jsx("button",{onClick:()=>s(a||{x:50,y:50,width:200,height:200}),className:u("px-4 py-2 text-sm font-medium","bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-white","rounded-md","hover:bg-gray-300 dark:hover:bg-gray-600","transition-colors"),children:"Reset"})]}),r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:'Drag to adjust crop area. Click "Crop Image" to export.'})]})},ks=({images:t,index:e,isOpen:a,onClose:o,onIndexChange:n,showThumbnails:s=!1,showDownload:l=!1,showZoom:g=!0,className:c})=>{const[i,h]=y.useState(1),b=t[e],x=e>0,m=e<t.length-1,f=y.useCallback(()=>{if(x){const v=e-1;n?.(v),h(1)}},[x,e,n]),p=y.useCallback(()=>{if(m){const v=e+1;n?.(v),h(1)}},[m,e,n]),C=()=>{h(v=>Math.min(v+.5,3))},S=()=>{h(v=>Math.max(v-.5,.5))},k=()=>{h(1)},N=()=>{const v=document.createElement("a");v.href=b.src,v.download=b.alt||"image",v.click()};return y.useEffect(()=>{if(!a)return;const v=w=>{switch(w.key){case"Escape":o();break;case"ArrowLeft":f();break;case"ArrowRight":p();break;case"+":case"=":C();break;case"-":case"_":S();break;case"0":k();break}};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[a,e,t.length,o,f,p]),y.useEffect(()=>(a?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[a]),y.useEffect(()=>{h(1)},[e]),!a||!b?null:r.jsx(ee,{children:r.jsxs("div",{className:u("fixed inset-0 z-50 flex items-center justify-center","bg-black/95",c),children:[r.jsx("div",{className:"absolute inset-0",onClick:o,"aria-label":"Close lightbox"}),r.jsx("button",{onClick:o,className:"absolute top-4 right-4 z-10 p-2 text-white hover:text-gray-300 transition-colors","aria-label":"Close",children:r.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),x&&r.jsx("button",{onClick:f,className:"absolute left-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Previous image",children:r.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),m&&r.jsx("button",{onClick:p,className:"absolute right-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Next image",children:r.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),r.jsxs("div",{className:"absolute top-4 left-4 z-10 flex gap-2",children:[r.jsxs("div",{className:"px-3 py-1.5 bg-black/50 text-white text-sm rounded-md",children:[e+1," / ",t.length]}),g&&r.jsxs("div",{className:"flex gap-1 bg-black/50 rounded-md p-1",children:[r.jsx("button",{onClick:S,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom out",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7"})})}),r.jsxs("button",{onClick:k,className:"px-2 text-white text-sm hover:text-gray-300 transition-colors","aria-label":"Reset zoom",children:[Math.round(i*100),"%"]}),r.jsx("button",{onClick:C,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom in",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v3m0 0v3m0-3h3m-3 0H7"})})})]}),l&&r.jsx("button",{onClick:N,className:"p-1.5 bg-black/50 text-white hover:text-gray-300 rounded-md transition-colors","aria-label":"Download image",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})})]}),r.jsx("div",{className:"relative z-0 flex items-center justify-center max-w-7xl max-h-screen p-20",children:r.jsx("img",{src:b.src,alt:b.alt||"",className:"max-w-full max-h-full object-contain transition-transform",style:{transform:`scale(${i})`}})}),b.caption&&r.jsx("div",{className:"absolute bottom-20 left-0 right-0 z-10 text-center",children:r.jsx("p",{className:"px-4 py-2 bg-black/50 text-white text-sm inline-block rounded-md max-w-2xl",children:b.caption})}),s&&t.length>1&&r.jsx("div",{className:"absolute bottom-4 left-0 right-0 z-10 flex justify-center gap-2 px-4 overflow-x-auto",children:t.map((v,w)=>r.jsx("button",{onClick:()=>{n?.(w),h(1)},className:u("flex-shrink-0 w-16 h-16 rounded-md overflow-hidden","border-2 transition-all",w===e?"border-white scale-110":"border-transparent opacity-60 hover:opacity-100 hover:border-gray-400"),children:r.jsx("img",{src:v.thumbnail||v.src,alt:v.alt||"",className:"w-full h-full object-cover"})},w))})]})})},ws=({src:t,poster:e,autoPlay:a=!1,loop:o=!1,muted:n=!1,controls:s=!0,className:l})=>{const g=y.useRef(null),[c,i]=y.useState(a),[h,b]=y.useState(1),[x,m]=y.useState(0),[f,p]=y.useState(0);y.useEffect(()=>{const w=g.current;if(!w)return;const L=()=>m(w.currentTime),M=()=>p(w.duration),I=()=>i(!0),$=()=>i(!1);return w.addEventListener("timeupdate",L),w.addEventListener("loadedmetadata",M),w.addEventListener("play",I),w.addEventListener("pause",$),()=>{w.removeEventListener("timeupdate",L),w.removeEventListener("loadedmetadata",M),w.removeEventListener("play",I),w.removeEventListener("pause",$)}},[]);const C=()=>{g.current&&(c?g.current.pause():g.current.play())},S=w=>{const L=parseFloat(w.target.value);b(L),g.current&&(g.current.volume=L)},k=w=>{const L=parseFloat(w.target.value);m(L),g.current&&(g.current.currentTime=L)},N=()=>{g.current&&(document.fullscreenElement?document.exitFullscreen():g.current.requestFullscreen())},v=w=>{const L=Math.floor(w/60),M=Math.floor(w%60);return`${L}:${M.toString().padStart(2,"0")}`};return r.jsxs("div",{className:u("relative group",l),children:[r.jsx("video",{ref:g,src:t,poster:e,autoPlay:a,loop:o,muted:n,className:"w-full rounded-lg",onClick:C}),s&&r.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4 opacity-0 group-hover:opacity-100 transition-opacity",children:[r.jsx("input",{type:"range",min:"0",max:f||0,value:x,onChange:k,className:"w-full mb-2 accent-white"}),r.jsxs("div",{className:"flex items-center justify-between gap-4",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("button",{onClick:C,className:"text-white hover:text-gray-300 transition-colors",children:c?r.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}):r.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M8 5v14l11-7z"})})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"})}),r.jsx("input",{type:"range",min:"0",max:"1",step:"0.1",value:h,onChange:S,className:"w-20 accent-white"})]}),r.jsxs("span",{className:"text-white text-sm",children:[v(x)," / ",v(f)]})]}),r.jsx("button",{onClick:N,className:"text-white hover:text-gray-300 transition-colors",children:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})})})]})]})]})},Cs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UvideoUthumbnail",children:e||"UvideoUthumbnail Component"}),Ns=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"VideoEditor",children:e||"VideoEditor Component"}),Ss=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UvideoUcall",children:e||"UvideoUcall Component"}),Es=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"LiveStream",children:e||"LiveStream Component"}),Ls=({src:t,title:e,artist:a,artwork:o,autoPlay:n=!1,loop:s=!1,className:l})=>{const g=y.useRef(null),[c,i]=y.useState(n),[h,b]=y.useState(0),[x,m]=y.useState(0),[f,p]=y.useState(1);y.useEffect(()=>{const w=g.current;if(!w)return;const L=()=>b(w.currentTime),M=()=>m(w.duration),I=()=>i(!0),$=()=>i(!1),A=()=>i(!1);return w.addEventListener("timeupdate",L),w.addEventListener("loadedmetadata",M),w.addEventListener("play",I),w.addEventListener("pause",$),w.addEventListener("ended",A),()=>{w.removeEventListener("timeupdate",L),w.removeEventListener("loadedmetadata",M),w.removeEventListener("play",I),w.removeEventListener("pause",$),w.removeEventListener("ended",A)}},[]);const C=()=>{g.current&&(c?g.current.pause():g.current.play())},S=w=>{const L=parseFloat(w.target.value);b(L),g.current&&(g.current.currentTime=L)},k=w=>{const L=parseFloat(w.target.value);p(L),g.current&&(g.current.volume=L)},N=w=>{const L=Math.floor(w/60),M=Math.floor(w%60);return`${L}:${M.toString().padStart(2,"0")}`},v=x>0?h/x*100:0;return r.jsxs("div",{className:u("bg-white dark:bg-gray-900 rounded-lg p-6 shadow-lg",l),children:[r.jsx("audio",{ref:g,src:t,autoPlay:n,loop:s}),r.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[o&&r.jsx("div",{className:"w-16 h-16 rounded-lg overflow-hidden flex-shrink-0 bg-gray-200 dark:bg-gray-700",children:r.jsx("img",{src:o,alt:e||"Album artwork",className:"w-full h-full object-cover"})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[e&&r.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white truncate",children:e}),a&&r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 truncate",children:a})]})]}),r.jsxs("div",{className:"mb-4",children:[r.jsx("input",{type:"range",min:"0",max:x||0,value:h,onChange:S,className:"w-full accent-blue-500"}),r.jsxs("div",{className:"flex justify-between text-xs text-gray-600 dark:text-gray-400 mt-1",children:[r.jsx("span",{children:N(h)}),r.jsx("span",{children:N(x)})]})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("button",{onClick:C,className:"w-10 h-10 rounded-full bg-blue-500 text-white flex items-center justify-center hover:bg-blue-600 transition-colors",children:c?r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}):r.jsx("svg",{className:"w-5 h-5 ml-0.5",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M8 5v14l11-7z"})})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"})}),r.jsx("input",{type:"range",min:"0",max:"1",step:"0.1",value:f,onChange:k,className:"w-24 accent-blue-500"})]})]}),r.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:[v.toFixed(0),"%"]})]})]})},Is=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UaudioUwaveform",children:e||"UaudioUwaveform Component"}),Ms=({data:t,width:e=200,height:a=40,color:o="#3b82f6",gap:n=2,className:s})=>{if(t.length===0)return null;const l=(e-(t.length-1)*n)/t.length;return r.jsx("svg",{width:e,height:a,className:u("inline-block",s),children:t.map((g,c)=>{const i=Math.max(2,g*a),h=c*(l+n),b=(a-i)/2;return r.jsx("rect",{x:h,y:b,width:l,height:i,fill:o,rx:l/2},c)})})},$s=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UvoiceUrecorder",children:e||"UvoiceUrecorder Component"}),Us=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"PodcastPlayer",children:e||"PodcastPlayer Component"}),Ts=({accept:t=["image/*","video/*","audio/*"],maxSize:e=50*1024*1024,maxFiles:a=10,multiple:o=!0,onUpload:n,onRemove:s,className:l})=>{const[g,c]=y.useState([]),[i,h]=y.useState(!1),b=y.useRef(null),x=N=>{N.preventDefault(),h(!0)},m=N=>{N.preventDefault(),h(!1)},f=N=>{N.preventDefault(),h(!1);const v=Array.from(N.dataTransfer.files);C(v)},p=N=>{if(N.target.files){const v=Array.from(N.target.files);C(v)}},C=N=>{const v=N.filter(I=>{const $=t.some(z=>{if(z.endsWith("/*")){const P=z.split("/")[0];return I.type.startsWith(P)}return I.type===z}),A=I.size<=e;return $&&A}),w=a-g.length,L=v.slice(0,w),M=L.map(I=>({id:`${Date.now()}-${Math.random()}`,file:I,preview:I.type.startsWith("image/")?URL.createObjectURL(I):void 0,status:"pending"}));c(I=>[...I,...M]),n&&n(L)},S=N=>{c(v=>v.filter(w=>w.id!==N)),s&&s(N)},k=N=>N<1024?`${N} B`:N<1024*1024?`${(N/1024).toFixed(1)} KB`:`${(N/(1024*1024)).toFixed(1)} MB`;return r.jsxs("div",{className:u("space-y-4",l),children:[r.jsxs("div",{onDragEnter:x,onDragOver:N=>N.preventDefault(),onDragLeave:m,onDrop:f,onClick:()=>b.current?.click(),className:u("border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors",i?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-700 hover:border-gray-400 dark:hover:border-gray-600"),children:[r.jsx("svg",{className:"w-12 h-12 mx-auto mb-4 text-gray-400 dark:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),r.jsx("p",{className:"text-gray-700 dark:text-gray-300 mb-2",children:"Drag and drop files here, or click to browse"}),r.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Max ",a," files, ",k(e)," each"]}),r.jsx("input",{ref:b,type:"file",multiple:o,accept:t.join(","),onChange:p,className:"hidden"})]}),g.length>0&&r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:g.map(N=>r.jsxs("div",{className:"relative aspect-square rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-800",children:[N.preview?r.jsx("img",{src:N.preview,alt:N.file.name,className:"w-full h-full object-cover"}):r.jsx("div",{className:"w-full h-full flex items-center justify-center",children:r.jsx("svg",{className:"w-12 h-12 text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm4 18H6V4h7v5h5v11z"})})}),r.jsx("button",{onClick:()=>S(N.id),className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-red-500 text-white flex items-center justify-center hover:bg-red-600 transition-colors",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),r.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-black/70 text-white text-xs p-2",children:[r.jsx("p",{className:"truncate",children:N.file.name}),r.jsx("p",{className:"text-gray-300",children:k(N.file.size)})]})]},N.id))})]})},As=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UmediaUplaylist",children:e||"UmediaUplaylist Component"}),Ps=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"PlaylistManager",children:e||"PlaylistManager Component"}),zs=({value:t,size:e=200,fgColor:a="#000000",bgColor:o="#ffffff",showDownload:n=!1,className:s})=>{const l=y.useRef(null);y.useEffect(()=>{const c=l.current;if(!c)return;const i=c.getContext("2d");if(!i)return;i.fillStyle=o,i.fillRect(0,0,e,e),i.fillStyle=a;const h=8,b=e/h,x=t.split("").reduce((f,p)=>f+p.charCodeAt(0),0);for(let f=0;f<h;f++)for(let p=0;p<h;p++)(x+f*h+p)%3!==0&&i.fillRect(p*b,f*b,b,b);const m=b*3;[[0,0],[e-m,0],[0,e-m]].forEach(([f,p])=>{i.strokeStyle=a,i.lineWidth=b,i.strokeRect(f+b/2,p+b/2,m-b,m-b)})},[t,e,a,o]);const g=()=>{const c=l.current;if(!c)return;const i=c.toDataURL("image/png"),h=document.createElement("a");h.download="qrcode.png",h.href=i,h.click()};return r.jsxs("div",{className:u("inline-flex flex-col items-center gap-3",s),children:[r.jsx("canvas",{ref:l,width:e,height:e,className:"border-2 border-gray-200 dark:border-gray-700 rounded-lg"}),n&&r.jsx("button",{onClick:g,className:u("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Download QR Code"}),r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 max-w-[200px] text-center break-all",children:t})]})},Ge=({isOpen:t,onClose:e,title:a,size:o="medium",variant:n="default",overlay:s="default",showCloseButton:l=!0,closeOnOverlayClick:g=!0,closeOnEscape:c=!0,children:i,className:h,"aria-labelledby":b,"aria-describedby":x,closeAriaLabel:m="Close modal"})=>{const f=y.useRef(null),p=y.useRef(null);if(y.useEffect(()=>{if(!t||!c)return;const N=v=>{v.key==="Escape"&&e()};return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[t,c,e]),y.useEffect(()=>{if(t)return p.current=document.activeElement,f.current&&f.current.focus(),document.body.style.overflow="hidden",()=>{document.body.style.overflow="unset",p.current&&p.current.focus()}},[t]),!t)return null;const C=()=>{const N=D.overlays.modal.content(),v=D.overlays.modal[o]();return u(N,v)},S=N=>{g&&N.target===N.currentTarget&&e()},k=r.jsxs(r.Fragment,{children:[r.jsx("div",{className:D.overlays.modal.backdrop(),onClick:S}),r.jsx("div",{className:D.overlays.modal.container(),role:"dialog","aria-modal":"true","aria-labelledby":b,"aria-describedby":x,children:r.jsxs("div",{ref:f,"data-testid":"modal-content",className:u(C(),h),tabIndex:-1,onClick:N=>N.stopPropagation(),children:[a&&r.jsxs("div",{className:D.overlays.modal.header(),children:[r.jsx("h2",{id:b,className:D.overlays.modal.title(),children:a}),l&&r.jsx("button",{onClick:e,className:D.overlays.modal.closeButton(),"aria-label":m,children:r.jsx(U.XMarkIcon,{className:D.icon.variant.muted.md()})})]}),i]})})]});return gr.createPortal(k,document.body)},Ds=({children:t,variant:e="default",className:a})=>r.jsx("div",{"data-testid":"modal-header",className:u(D.overlays.modal.header(),a),children:t}),Ke=({children:t,variant:e="default",className:a})=>r.jsx("div",{"data-testid":"modal-body",className:u(D.overlays.modal.body(),a),children:t}),Ye=({children:t,variant:e="default",className:a})=>r.jsx("div",{"data-testid":"modal-footer",className:u(D.overlays.modal.footer(),a),children:t}),js=({isOpen:t,onClose:e,children:a,size:o="md",showCloseButton:n=!0,closeOnOutsideClick:s=!0,closeOnEscape:l=!0,className:g})=>{if(y.useEffect(()=>{if(!l||!t||!e)return;const h=b=>{b.key==="Escape"&&e()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,e,l]),!t)return null;const c={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-full mx-4"},i=()=>{s&&e&&e()};return r.jsxs(ee,{children:[r.jsx(ke,{isOpen:t,onClose:i,opacity:"dark",blur:!0}),r.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:r.jsxs("div",{className:u("relative w-full",c[o],"bg-white dark:bg-gray-900","rounded-lg shadow-xl","animate-in fade-in zoom-in-95 duration-200",g),onClick:h=>h.stopPropagation(),children:[n&&e&&r.jsx("button",{onClick:e,className:"absolute top-4 right-4 z-10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close dialog",children:r.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),a]})})]})},Bs={default:U.InformationCircleIcon,warning:U.ExclamationTriangleIcon,danger:U.XCircleIcon,success:U.CheckCircleIcon,info:U.InformationCircleIcon},Ws={default:()=>D.icon.variant.default.lg(),warning:()=>D.icon.variant.warning.lg(),danger:()=>D.icon.variant.error.lg(),success:()=>D.icon.variant.success.lg(),info:()=>D.icon.variant.default.lg()},Os={default:"default",warning:"default",danger:"destructive",success:"default",info:"default"},Fs=({isOpen:t,onClose:e,onConfirm:a,title:o,message:n,confirmText:s="Confirm",cancelText:l="Cancel",loadingText:g="Processing...",variant:c="default",isLoading:i=!1})=>{const h=Bs[c],b=Ws[c],x=Os[c];return r.jsxs(Ge,{isOpen:t,onClose:e,size:"small",variant:"web3confirmation","aria-labelledby":"confirmation-dialog-title","aria-describedby":"confirmation-dialog-description",children:[r.jsxs(Ke,{variant:"padded",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[r.jsx(h,{className:b()}),r.jsx("h3",{id:"confirmation-dialog-title",className:T.heading.h4(),children:o})]}),r.jsx("p",{id:"confirmation-dialog-description",className:T.body.md(),children:n})]}),r.jsxs(Ye,{children:[r.jsx(J,{variant:"outline",onClick:e,disabled:i,children:l}),r.jsx(J,{variant:x,onClick:a,disabled:i,children:i?g:s})]})]})},Vs=({isOpen:t,onClose:e,onSubmit:a,title:o,description:n,placeholder:s="",initialValue:l="",cancelText:g="Cancel",confirmText:c="Confirm",isLoading:i=!1,loadingText:h="Processing...",maxLength:b,required:x=!0,validate:m})=>{const[f,p]=y.useState(l),[C,S]=y.useState(null);y.useEffect(()=>{t&&(p(l),S(null))},[t,l]);const k=async w=>{if(w.preventDefault(),S(null),x&&!f.trim()){S("This field is required");return}if(m){const L=m(f);if(L){S(L);return}}try{await a(f.trim())}catch(L){S(L instanceof Error?L.message:"An error occurred")}},N=()=>{p(l),S(null),e()},v=x?f.trim().length>0:!0;return r.jsx(Ge,{isOpen:t,onClose:N,size:"small","aria-labelledby":"text-input-modal-title","aria-describedby":"text-input-modal-description",closeOnEscape:!i,closeOnOverlayClick:!i,children:r.jsxs("form",{onSubmit:k,children:[r.jsxs(Ke,{variant:"padded",children:[r.jsx("h3",{id:"text-input-modal-title",className:T.heading.h4(),children:o}),r.jsx("p",{id:"text-input-modal-description",className:`${T.body.md()} mt-2 mb-4`,children:n}),r.jsx(Ce,{type:"text",value:f,onChange:w=>p(w.target.value),placeholder:s,maxLength:b,disabled:i,autoFocus:!0,"aria-invalid":!!C,"aria-describedby":C?"text-input-error":void 0}),C&&r.jsx("p",{id:"text-input-error",className:`${T.body.sm()} text-red-600 dark:text-red-400 mt-2`,role:"alert",children:C})]}),r.jsxs(Ye,{children:[r.jsx(J,{type:"button",variant:"outline",onClick:N,disabled:i,children:g}),r.jsx(J,{type:"submit",variant:"default",disabled:!v||i,children:i?h:c})]})]})})},Hs=({isOpen:t,onClose:e,children:a,side:o="right",size:n="md",showCloseButton:s=!0,title:l,footer:g,className:c})=>{if(y.useEffect(()=>{const x=m=>{m.key==="Escape"&&t&&e()};if(t)return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[t,e]),!t)return null;const i={left:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},right:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},top:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"},bottom:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"}},h={left:"left-0 top-0 h-full",right:"right-0 top-0 h-full",top:"top-0 left-0 w-full",bottom:"bottom-0 left-0 w-full"},b={left:t?"translate-x-0":"-translate-x-full",right:t?"translate-x-0":"translate-x-full",top:t?"translate-y-0":"-translate-y-full",bottom:t?"translate-y-0":"translate-y-full"};return r.jsxs(ee,{children:[r.jsx(ke,{isOpen:t,onClose:e,opacity:"medium"}),r.jsxs("div",{className:u("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","transition-transform duration-300 ease-in-out",h[o],i[o][n],b[o],c),children:[(l||s)&&r.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:[l&&r.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:l}),s&&r.jsx("button",{onClick:e,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors","aria-label":"Close drawer",children:r.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),r.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:a}),g&&r.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:g})]})]})},qs=({isOpen:t,onClose:e,children:a,title:o,description:n,footer:s,side:l="bottom",size:g="md",showHandle:c=!0,showCloseButton:i=!0,className:h})=>{if(y.useEffect(()=>{if(!t)return;const f=p=>{p.key==="Escape"&&e()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[t,e]),!t)return null;const b={bottom:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},top:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},left:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"},right:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"}},x={bottom:"bottom-0 left-0 right-0 rounded-t-2xl",top:"top-0 left-0 right-0 rounded-b-2xl",left:"left-0 top-0 bottom-0 rounded-r-2xl",right:"right-0 top-0 bottom-0 rounded-l-2xl"},m={bottom:"animate-in slide-in-from-bottom duration-300",top:"animate-in slide-in-from-top duration-300",left:"animate-in slide-in-from-left duration-300",right:"animate-in slide-in-from-right duration-300"};return r.jsxs(ee,{children:[r.jsx(ke,{isOpen:t,onClose:e,opacity:"dark"}),r.jsxs("div",{className:u("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","flex flex-col",x[l],b[l][g],m[l],h),children:[c&&(l==="bottom"||l==="top")&&r.jsx("div",{className:u("flex items-center justify-center",l==="bottom"?"pt-3 pb-2":"pb-3 pt-2"),children:r.jsx("div",{className:"w-12 h-1.5 bg-gray-300 dark:bg-gray-700 rounded-full"})}),(o||n||i)&&r.jsx("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsxs("div",{className:"flex-1",children:[o&&r.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o}),n&&r.jsx("p",{className:"mt-1 text-sm text-gray-600 dark:text-gray-400",children:n})]}),i&&r.jsx("button",{onClick:e,className:"ml-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close sheet",children:r.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),r.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:a}),s&&r.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:s})]})]})},_s=({trigger:t,children:e,placement:a="bottom",isOpen:o,onOpenChange:n,trigger_action:s="click",showArrow:l=!0,className:g})=>{const[c,i]=y.useState(!1),h=o!==void 0?o:c,b=y.useCallback(w=>{o===void 0&&i(w),n?.(w)},[o,n]),x=y.useRef(null),m=y.useRef(null),[f,p]=y.useState({top:0,left:0});y.useEffect(()=>{if(!h||!x.current)return;const w=()=>{const L=x.current.getBoundingClientRect(),M=8;let I=0,$=0;switch(a){case"top":I=L.top-M,$=L.left+L.width/2;break;case"top-start":I=L.top-M,$=L.left;break;case"top-end":I=L.top-M,$=L.right;break;case"bottom":I=L.bottom+M,$=L.left+L.width/2;break;case"bottom-start":I=L.bottom+M,$=L.left;break;case"bottom-end":I=L.bottom+M,$=L.right;break;case"left":I=L.top+L.height/2,$=L.left-M;break;case"right":I=L.top+L.height/2,$=L.right+M;break}p({top:I,left:$})};return w(),window.addEventListener("scroll",w),window.addEventListener("resize",w),()=>{window.removeEventListener("scroll",w),window.removeEventListener("resize",w)}},[h,a]),y.useEffect(()=>{if(!h)return;const w=L=>{x.current&&!x.current.contains(L.target)&&m.current&&!m.current.contains(L.target)&&b(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[h,b]),y.useEffect(()=>{if(!h)return;const w=L=>{L.key==="Escape"&&b(!1)};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[h,b]);const C=()=>{s==="click"&&b(!h)},S=()=>{s==="hover"&&b(!0)},k=()=>{s==="hover"&&b(!1)},N={top:"origin-bottom","top-start":"origin-bottom-left","top-end":"origin-bottom-right",bottom:"origin-top","bottom-start":"origin-top-left","bottom-end":"origin-top-right",left:"origin-right",right:"origin-left"},v={top:"-translate-x-1/2 -translate-y-full","top-start":"-translate-y-full","top-end":"-translate-x-full -translate-y-full",bottom:"-translate-x-1/2","bottom-start":"","bottom-end":"-translate-x-full",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return r.jsxs("div",{className:u("relative inline-block",g),children:[r.jsx("div",{ref:x,onClick:C,onMouseEnter:S,onMouseLeave:k,className:"inline-block",children:t}),h&&r.jsxs("div",{ref:m,className:u("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",N[a],v[a]),style:{position:"fixed",top:f.top+"px",left:f.left+"px"},onMouseEnter:s==="hover"?()=>b(!0):void 0,onMouseLeave:s==="hover"?()=>b(!1):void 0,children:[e,l&&r.jsx("div",{className:u("arrow absolute w-2 h-2 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 transform rotate-45",a.startsWith("top")&&"bottom-[-5px] border-t-0 border-l-0",a.startsWith("bottom")&&"top-[-5px] border-b-0 border-r-0",a==="left"&&"right-[-5px] border-l-0 border-b-0",a==="right"&&"left-[-5px] border-r-0 border-t-0",(a==="top"||a==="bottom")&&"left-1/2 -translate-x-1/2",(a==="left"||a==="right")&&"top-1/2 -translate-y-1/2")})]})]})},Gs=({trigger:t,children:e,placement:a="bottom",openDelay:o=200,closeDelay:n=300,className:s})=>{const[l,g]=y.useState(!1),[c,i]=y.useState({top:0,left:0}),h=y.useRef(null),b=y.useRef(null),x=y.useRef(void 0),m=y.useRef(void 0);y.useEffect(()=>{if(!l||!h.current)return;const k=()=>{const N=h.current.getBoundingClientRect(),v=8;let w=0,L=0;switch(a){case"top":w=N.top-v,L=N.left+N.width/2;break;case"bottom":w=N.bottom+v,L=N.left+N.width/2;break;case"left":w=N.top+N.height/2,L=N.left-v;break;case"right":w=N.top+N.height/2,L=N.right+v;break}i({top:w,left:L})};return k(),window.addEventListener("scroll",k),window.addEventListener("resize",k),()=>{window.removeEventListener("scroll",k),window.removeEventListener("resize",k)}},[l,a]);const f=()=>{m.current&&clearTimeout(m.current),x.current=setTimeout(()=>{g(!0)},o)},p=()=>{x.current&&clearTimeout(x.current),m.current=setTimeout(()=>{g(!1)},n)},C={top:"origin-bottom",bottom:"origin-top",left:"origin-right",right:"origin-left"},S={top:"-translate-x-1/2 -translate-y-full",bottom:"-translate-x-1/2",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:h,onMouseEnter:f,onMouseLeave:p,className:"inline-block",children:t}),l&&r.jsx(ee,{children:r.jsx("div",{ref:b,className:u("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",C[a],S[a],s),style:{top:c.top+"px",left:c.left+"px"},onMouseEnter:()=>{m.current&&clearTimeout(m.current)},onMouseLeave:p,children:e})})]})},Ks=({content:t,children:e,placement:a="top",delayShow:o=0,delayHide:n=0,className:s,disabled:l=!1,showArrow:g=!0,variant:c="default",trigger:i="hover",isOpen:h,onVisibilityChange:b})=>{const[x,m]=y.useState(!1),f=y.useRef(void 0),p=y.useRef(void 0),C=y.useRef(null),S=y.useRef(null),k=h!==void 0,N=k?h:x,v=y.useCallback(()=>{l||k||(p.current&&(clearTimeout(p.current),p.current=void 0),o>0?f.current=setTimeout(()=>{m(!0),b?.(!0)},o):(m(!0),b?.(!0)))},[l,k,o,b]),w=y.useCallback(()=>{k||(f.current&&(clearTimeout(f.current),f.current=void 0),n>0?p.current=setTimeout(()=>{m(!1),b?.(!1)},n):(m(!1),b?.(!1)))},[k,n,b]);y.useEffect(()=>()=>{f.current&&clearTimeout(f.current),p.current&&clearTimeout(p.current)},[]),y.useEffect(()=>{if(i!=="click"||!N)return;const F=q=>{C.current&&!C.current.contains(q.target)&&S.current&&!S.current.contains(q.target)&&w()};return document.addEventListener("mousedown",F),()=>{document.removeEventListener("mousedown",F)}},[i,N,w]);const L=()=>{i==="hover"&&v()},M=()=>{i==="hover"&&w()},I=()=>{i==="hover"&&v()},$=()=>{i==="hover"&&w()},A=()=>{i==="click"&&!k&&(N?(m(!1),b?.(!1)):(m(!0),b?.(!0)))},z={top:"bottom-full left-1/2 -translate-x-1/2 -translate-y-2",bottom:"top-full left-1/2 -translate-x-1/2 translate-y-2",left:"right-full top-1/2 -translate-x-2 -translate-y-1/2",right:"left-full top-1/2 translate-x-2 -translate-y-1/2"},P={top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent"},W={default:"bg-gray-900 dark:bg-gray-700 text-white",info:"bg-blue-600 dark:bg-blue-500 text-white",success:"bg-green-600 dark:bg-green-500 text-white",warning:"bg-yellow-600 dark:bg-yellow-500 text-white",error:"bg-red-600 dark:bg-red-500 text-white"},j={default:{top:"border-t-gray-900 dark:border-t-gray-700",bottom:"border-b-gray-900 dark:border-b-gray-700",left:"border-l-gray-900 dark:border-l-gray-700",right:"border-r-gray-900 dark:border-r-gray-700"},info:{top:"border-t-blue-600 dark:border-t-blue-500",bottom:"border-b-blue-600 dark:border-b-blue-500",left:"border-l-blue-600 dark:border-l-blue-500",right:"border-r-blue-600 dark:border-r-blue-500"},success:{top:"border-t-green-600 dark:border-t-green-500",bottom:"border-b-green-600 dark:border-b-green-500",left:"border-l-green-600 dark:border-l-green-500",right:"border-r-green-600 dark:border-r-green-500"},warning:{top:"border-t-yellow-600 dark:border-t-yellow-500",bottom:"border-b-yellow-600 dark:border-b-yellow-500",left:"border-l-yellow-600 dark:border-l-yellow-500",right:"border-r-yellow-600 dark:border-r-yellow-500"},error:{top:"border-t-red-600 dark:border-t-red-500",bottom:"border-b-red-600 dark:border-b-red-500",left:"border-l-red-600 dark:border-l-red-500",right:"border-r-red-600 dark:border-r-red-500"}};return r.jsxs("div",{ref:S,className:"relative inline-block",onMouseEnter:L,onMouseLeave:M,onFocus:I,onBlur:$,onClick:A,children:[e,N&&!l&&r.jsxs("div",{ref:C,className:u("absolute z-50 px-2 py-1 text-xs font-medium rounded shadow-lg whitespace-nowrap pointer-events-none",z[a],W[c],s),role:"tooltip",children:[t,g&&r.jsx("div",{className:u("absolute w-0 h-0 border-4 arrow",P[a],j[c][a])})]})]})},Ys=({children:t,onDrop:e,onDragOver:a,accept:o,showIndicator:n=!0,indicator:s,disabled:l=!1,className:g})=>{const[c,i]=y.useState(!1),[h,b]=y.useState(0),x=S=>{S.preventDefault(),S.stopPropagation(),!l&&(b(k=>k+1),S.dataTransfer.items&&S.dataTransfer.items.length>0&&i(!0))},m=S=>{S.preventDefault(),S.stopPropagation(),!l&&b(k=>{const N=k-1;return N===0&&i(!1),N})},f=S=>{S.preventDefault(),S.stopPropagation(),!l&&a&&a(S)},p=S=>{if(S.preventDefault(),S.stopPropagation(),l)return;if(i(!1),b(0),S.dataTransfer.files&&S.dataTransfer.files.length>0){const N=Array.from(S.dataTransfer.files);let v=N;o&&o.length>0&&(v=N.filter(w=>o.some(L=>{if(L.endsWith("/*")){const M=L.split("/")[0];return w.type.startsWith(M)}return w.type===L}))),e(v);return}const k=S.dataTransfer.getData("text/plain");if(k)try{const N=JSON.parse(k);e(N)}catch{e(k)}},C=r.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-blue-50 dark:bg-blue-900/30 border-2 border-dashed border-blue-500 dark:border-blue-400 rounded-lg z-10",children:[r.jsx("svg",{className:"w-12 h-12 text-blue-600 dark:text-blue-400 mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),r.jsx("p",{className:"text-blue-700 dark:text-blue-300 font-medium",children:"Drop here"})]});return r.jsxs("div",{onDragEnter:x,onDragLeave:m,onDragOver:f,onDrop:p,className:u("relative",l&&"opacity-50 cursor-not-allowed",g),children:[t,n&&c&&!l&&(s||C)]})},Qs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UdragUdropUlist",children:e||"UdragUdropUlist Component"}),Zs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UsortableUgrid",children:e||"UsortableUgrid Component"}),Xs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UnestedUdrag",children:e||"UnestedUdrag Component"}),Js=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UgestureUdetector",children:e||"UgestureUdetector Component"}),Rs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UswipeUactions",children:e||"UswipeUactions Component"}),el=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UpinchUzoom",children:e||"UpinchUzoom Component"}),rl=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UdoubleUtap",children:e||"UdoubleUtap Component"}),tl=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UlongUpress",children:e||"UlongUpress Component"}),al=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UhoverUtooltip",children:e||"UhoverUtooltip Component"}),ol=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UradialUmenu",children:e||"UradialUmenu Component"}),nl=({children:t,active:e=!0,initialFocus:a,returnFocus:o=!0,className:n})=>{const s=y.useRef(null),l=y.useRef(null);return y.useEffect(()=>{if(!e)return;o&&(l.current=document.activeElement);const g=()=>{if(!s.current)return[];const b=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(s.current.querySelectorAll(b))},c=()=>{if(a){const x=s.current?.querySelector(a);if(x){x.focus();return}}const b=g();b.length>0&&b[0].focus()},i=b=>{if(b.key!=="Tab")return;const x=g();if(x.length===0){b.preventDefault();return}const m=x[0],f=x[x.length-1];b.shiftKey?document.activeElement===m&&(b.preventDefault(),f.focus()):document.activeElement===f&&(b.preventDefault(),m.focus())},h=setTimeout(c,0);return document.addEventListener("keydown",i),()=>{clearTimeout(h),document.removeEventListener("keydown",i),o&&l.current&&l.current.focus()}},[e,a,o]),e?r.jsx("div",{ref:s,className:u(n),children:t}):r.jsx(r.Fragment,{children:t})},sl=({sections:t,activeId:e,onActiveChange:a,offset:o=80,container:n,smoothScroll:s=!0,showSubsections:l=!0,className:g})=>{const[c,i]=y.useState(""),h=y.useRef(null),b=e!==void 0?e:c;y.useEffect(()=>{const f=n?document.querySelector(n):window;if(!f)return;const p=k=>k.flatMap(N=>[N.id,...N.subsections?p(N.subsections):[]]),S=p(t).map(k=>document.getElementById(k)).filter(Boolean);if(S.length!==0)return h.current=new IntersectionObserver(k=>{k.forEach(N=>{if(N.isIntersecting){const v=N.target.id;e!==void 0&&a?a(v):i(v)}})},{root:n?f:null,rootMargin:`-${o}px 0px -50% 0px`,threshold:0}),S.forEach(k=>{h.current?.observe(k)}),()=>{h.current?.disconnect()}},[t,n,o,e,a]);const x=f=>{const p=document.getElementById(f);if(!p)return;const C=n?document.querySelector(n):window;if(!C)return;const k=p.offsetTop-o;s?C===window?window.scrollTo({top:k,behavior:"smooth"}):C.scrollTo({top:k,behavior:"smooth"}):C===window?window.scrollTo(0,k):C.scrollTop=k},m=(f,p=0)=>{const C=b===f.id,S=f.subsections?.some(k=>b===k.id)||!1;return r.jsxs("div",{children:[r.jsx("button",{onClick:()=>x(f.id),className:u("w-full text-left px-3 py-1.5 text-sm rounded-md transition-colors",p===0?"font-medium":"pl-6 text-sm",C?"text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/30":S?"text-gray-700 dark:text-gray-300":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800"),style:{paddingLeft:`${p*.75+.75}rem`},children:f.label}),l&&f.subsections&&f.subsections.length>0&&r.jsx("div",{className:"ml-2 border-l-2 border-gray-200 dark:border-gray-700",children:f.subsections.map(k=>m(k,p+1))})]},f.id)};return r.jsx("nav",{className:u("space-y-1",g),children:t.map(f=>m(f,0))})},ll=({children:t,onRefresh:e,disabled:a=!1,refreshingText:o="Refreshing...",pullDownText:n="Pull down to refresh",releaseText:s="Release to refresh",threshold:l=80,maxPullDistance:g=120,className:c=""})=>{const[i,h]=y.useState(0),[b,x]=y.useState(!1),[m,f]=y.useState(!1),p=y.useRef(0),C=y.useRef(null);y.useEffect(()=>{const w=C.current;if(!w)return;const L=$=>{if(a||b)return;w.scrollTop<=0&&(p.current=$.touches[0].clientY,f(!0))},M=$=>{if(!m)return;const z=$.touches[0].clientY-p.current;if(z>0&&w.scrollTop<=0){const P=Math.min(z/g,1),W=Math.min(z*(1-P*.5),g);h(W),z>10&&$.preventDefault()}},I=async()=>{if(m)if(f(!1),i>=l&&!b){x(!0);try{await e()}catch{}finally{x(!1),h(0)}}else h(0)};return w.addEventListener("touchstart",L,{passive:!0}),w.addEventListener("touchmove",M,{passive:!1}),w.addEventListener("touchend",I),()=>{w.removeEventListener("touchstart",L),w.removeEventListener("touchmove",M),w.removeEventListener("touchend",I)}},[a,b,m,i,l,g,e]);const S=Math.min(i/l,1),k=m||b,N=m?i:b?l:0,v=()=>b?o:i>=l?s:n;return r.jsxs("div",{ref:C,className:`relative ${c}`,style:{height:"100%",overflowY:"auto",WebkitOverflowScrolling:"touch"},children:[r.jsx("div",{className:"sticky top-0 left-0 right-0 flex items-center justify-center bg-gradient-to-b from-blue-50/90 to-transparent dark:from-blue-900/20 dark:to-transparent backdrop-blur-sm z-10 transition-all duration-300 ease-out",style:{height:`${N}px`,marginTop:m?0:`-${N}px`,opacity:k?1:0,pointerEvents:"none"},children:r.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[r.jsx(U.ArrowPathIcon,{className:`w-6 h-6 text-blue-600 dark:text-blue-400 transition-transform duration-200 ${b?"animate-spin":""}`,style:{transform:`rotate(${S*360}deg)`}}),i>20&&r.jsx("span",{className:"text-xs font-medium text-blue-600 dark:text-blue-400",children:v()})]})}),r.jsx("div",{style:{paddingTop:m?`${i}px`:0,transition:m?"none":"padding-top 200ms ease-out"},children:t})]})},il=({children:t,onLoadMore:e,loading:a=!1,hasMore:o=!0,threshold:n=100,loader:s,endMessage:l,height:g,scrollDirection:c="vertical",reverse:i=!1,className:h})=>{const b=y.useRef(null),[x,m]=y.useState(!1);y.useEffect(()=>{const S=b.current;if(!S||a||!o)return;const k=()=>{const{scrollTop:N,scrollHeight:v,clientHeight:w,scrollLeft:L,scrollWidth:M,clientWidth:I}=S;c==="vertical"&&m(N>300);let $;c==="vertical"?i?$=N:$=v-N-w:i?$=L:$=M-L-I,$<n&&e()};return S.addEventListener("scroll",k),()=>S.removeEventListener("scroll",k)},[a,o,n,e,c,i]);const f=()=>{b.current?.scrollTo({top:0,behavior:"smooth"})},p=r.jsxs("div",{className:"flex justify-center items-center py-4",children:[r.jsx("div",{className:"w-6 h-6 border-2 border-blue-600 dark:border-blue-400 border-t-transparent rounded-full animate-spin"}),r.jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"Loading..."})]}),C=r.jsx("div",{className:"flex justify-center items-center py-4",children:r.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"No more items to load"})});return r.jsxs("div",{className:u("relative",h),children:[r.jsxs("div",{ref:b,className:u(c==="vertical"?"overflow-y-auto":"overflow-x-auto","overflow-auto"),style:{height:c==="vertical"?g:void 0,width:c==="horizontal"?"100%":void 0,display:c==="horizontal"?"flex":void 0,flexDirection:i&&c==="vertical"?"column-reverse":void 0},children:[i&&a&&(s||p),i&&!a&&!o&&l,r.jsx("div",{className:u(c==="horizontal"&&"flex",c==="horizontal"&&i&&"flex-row-reverse"),children:t}),!i&&a&&(s||p),!i&&!a&&!o&&(l||C)]}),c==="vertical"&&!i&&x&&r.jsx("button",{onClick:f,className:u("absolute bottom-4 right-4","p-3 rounded-full","bg-blue-600 dark:bg-blue-500","text-white","shadow-lg","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"),"aria-label":"Scroll to top",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 10l7-7m0 0l7 7m-7-7v18"})})})]})},Y={twitter:(t,e,a)=>{const o=a.length>0?`&hashtags=${a.join(",")}`:"";return`https://twitter.com/intent/tweet?url=${encodeURIComponent(t)}&text=${encodeURIComponent(e)}${o}`},facebook:t=>`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(t)}`,linkedin:(t,e,a)=>`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(t)}`,reddit:(t,e)=>`https://reddit.com/submit?url=${encodeURIComponent(t)}&title=${encodeURIComponent(e)}`,telegram:(t,e)=>`https://t.me/share/url?url=${encodeURIComponent(t)}&text=${encodeURIComponent(e)}`,whatsapp:(t,e)=>`https://wa.me/?text=${encodeURIComponent(e+" "+t)}`,email:(t,e,a)=>`mailto:?subject=${encodeURIComponent(e)}&body=${encodeURIComponent(a+`
|
|
30
|
+
`,children:[g&&r.jsx("option",{value:"",disabled:!0,children:g}),o.map(h=>r.jsx("option",{value:h.value,disabled:h.disabled,children:h.label},h.value))]})}),oo=({successMessage:t,errorMessage:e,successTitle:a="Success",errorTitle:o="Error",autoDismissDelay:n=0,onSuccessDismiss:s,className:l=""})=>(p.useEffect(()=>{if(t&&n>0&&s){const g=setTimeout(()=>{s()},n);return()=>clearTimeout(g)}},[t,n,s]),!t&&!e?null:r.jsxs("div",{className:`space-y-3 ${l}`,children:[e&&r.jsx(Ae,{variant:"error",title:o,description:e}),t&&r.jsx(Ae,{variant:"success",title:a,description:t})]})),no=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"PhoneDirectory",children:e||"PhoneDirectory Component"}),so=V.cva("min-h-[44px] touch-manipulation",{variants:{variant:{default:"",primary:"",secondary:"",outline:"",ghost:"",destructive:"","destructive-outline":"",success:"",link:"",gradient:"","gradient-secondary":"","gradient-success":"",wallet:"",connect:"",disconnect:""},size:{default:"",sm:"h-8",lg:"h-12",icon:"h-10 w-10 p-0"},animation:{none:"transition-colors duration-200",hover:"transition-all duration-200 hover:scale-105",lift:"transition-all duration-200 hover:scale-105",scale:"transition-transform duration-200 hover:scale-95",glow:"transition-all duration-200 hover:shadow-lg",shimmer:"transition-all duration-200",tap:"transition-transform duration-100 active:scale-95",connect:"transition-all duration-200 hover:scale-105",transaction:"transition-all duration-200 animate-pulse",disconnect:"transition-all duration-200 hover:opacity-80"}},defaultVariants:{variant:"default",size:"default",animation:"hover"}}),J=F.forwardRef(({className:t,variant:e,size:a,animation:o,asChild:n=!1,...s},l)=>{const g=n?bt.Slot:"button",i=e||"default",c=a&&a!=="default"&&a!=="icon"?a:void 0,h=m=>m?{sm:"small",lg:"large",default:"default"}[m]||m:"default",k=(()=>{if(i.startsWith("gradient")){const m=i.replace("gradient-","").replace("gradient","primary");return D.button.gradient[m]?.()||D.button.primary.default()}else{if(["wallet","connect","disconnect"].includes(i))return D.button.web3[i]?.()||D.button.primary.default();{const m=h(c);return D.button[i]?.[m]?.()||D.button.primary.default()}}})();return r.jsx(g,{className:u(so({size:a,animation:o}),k,t),ref:l,...s})});J.displayName="Button";const lo=({size:t="default",variant:e="default",className:a,ariaLabel:o="Loading",loadingText:n="Loading..."})=>{const s=()=>{const l={small:"w-4 h-4",default:"w-6 h-6",large:"w-8 h-8",extraLarge:"w-16 h-16 border-4"},g={default:"border-gray-300 border-t-blue-600",white:"border-white/30 border-t-white",success:"border-gray-300 border-t-green-600",warning:"border-gray-300 border-t-orange-600",error:"border-gray-300 border-t-red-600"};return`animate-spin rounded-full border-2 ${l[t]} ${g[e]}`};return r.jsx("div",{className:u(s(),a),role:"status","aria-label":o,children:r.jsx("span",{className:"sr-only",children:n})})},io=({children:t,isLoading:e=!1,loadingText:a="Loading...",showSpinner:o=!0,disabled:n,...s})=>r.jsx(J,{...s,disabled:n||e,className:s.className,children:e?r.jsxs("span",{className:"flex items-center gap-2",children:[o&&r.jsx(lo,{size:"small"}),r.jsx("span",{children:a})]}):t}),Nr=({value:t,onChange:e,minDate:a,maxDate:o,disabledDates:n=[],showOutsideDays:s=!0,className:l})=>{const[g,i]=p.useState(t||new Date),c=v=>{const x=v.getFullYear(),L=v.getMonth();return new Date(x,L+1,0).getDate()},h=v=>{const x=v.getFullYear(),L=v.getMonth();return new Date(x,L,1).getDay()},b=(v,x)=>v.getFullYear()===x.getFullYear()&&v.getMonth()===x.getMonth()&&v.getDate()===x.getDate(),k=v=>a&&v<a||o&&v>o?!0:n.some(x=>b(v,x)),m=()=>{i(new Date(g.getFullYear(),g.getMonth()-1))},f=()=>{i(new Date(g.getFullYear(),g.getMonth()+1))},C=(()=>{const v=g.getFullYear(),x=g.getMonth(),L=c(g),M=h(g),I=[];if(s){const $=c(new Date(v,x-1));for(let A=M-1;A>=0;A--)I.push(new Date(v,x-1,$-A))}else for(let $=0;$<M;$++)I.push(null);for(let $=1;$<=L;$++)I.push(new Date(v,x,$));if(s){const $=42-I.length;for(let A=1;A<=$;A++)I.push(new Date(v,x+1,A))}return I})(),S=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],w=v=>{!v||k(v)||e(v)},N=g.toLocaleDateString("en-US",{month:"long",year:"numeric"});return r.jsxs("div",{className:u("bg-white dark:bg-gray-900 rounded-lg p-4",l),children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("button",{onClick:m,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Previous month",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),r.jsx("h2",{className:"text-base font-semibold text-gray-900 dark:text-white",children:N}),r.jsx("button",{onClick:f,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Next month",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),r.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:S.map(v=>r.jsx("div",{className:"text-center text-xs font-medium text-gray-600 dark:text-gray-400 py-2",children:v},v))}),r.jsx("div",{className:"grid grid-cols-7 gap-1",children:C.map((v,x)=>{if(!v)return r.jsx("div",{className:"aspect-square"},x);const L=v.getMonth()===g.getMonth(),M=t&&b(v,t),I=b(v,new Date),$=k(v);return r.jsx("button",{onClick:()=>w(v),disabled:$,className:u("aspect-square flex items-center justify-center rounded-md text-sm transition-colors","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",L?"text-gray-900 dark:text-white":"text-gray-400 dark:text-gray-600",M&&"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",I&&!M&&"border-2 border-blue-600 dark:border-blue-400"),children:v.getDate()},x)})})]})},co=({value:t,onChange:e,use12Hour:a=!1,minuteStep:o=1,minDate:n,maxDate:s,disabled:l=!1,className:g})=>{const[i,c]=p.useState(!1),[h,b]=p.useState(t),k=C=>{const S=C.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),w=C.getHours(),N=C.getMinutes();if(a){const v=w===0?12:w>12?w-12:w,x=w>=12?"PM":"AM";return`${S}, ${v}:${N.toString().padStart(2,"0")} ${x}`}return`${S}, ${w.toString().padStart(2,"0")}:${N.toString().padStart(2,"0")}`},m=C=>{const S=new Date(C);S.setHours(h.getHours()),S.setMinutes(h.getMinutes()),b(S),e(S)},f=C=>{const[S,w]=C.split(":").map(Number),N=new Date(h);N.setHours(S),N.setMinutes(w),b(N),e(N)},y=C=>{const S=C.getHours(),w=C.getMinutes();return`${S.toString().padStart(2,"0")}:${w.toString().padStart(2,"0")}`};return r.jsxs("div",{className:u("relative w-full",g),children:[r.jsxs("button",{type:"button",onClick:()=>!l&&c(!i),disabled:l,className:u("w-full px-3 py-2 text-sm text-left flex items-center justify-between","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",i&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[r.jsx("span",{className:"text-gray-900 dark:text-white",children:k(t)}),r.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})]}),i&&r.jsx("div",{className:"absolute top-full left-0 mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50 p-3",children:r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Date"}),r.jsx(Nr,{value:h,onChange:m,minDate:n,maxDate:s})]}),r.jsx("div",{className:"h-px bg-gray-200 dark:bg-gray-700"}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Time"}),r.jsx(fr,{value:y(h),onChange:f,use12Hour:a,minuteStep:o})]}),r.jsxs("div",{className:"flex gap-2 pt-2",children:[r.jsx("button",{onClick:()=>c(!1),className:u("flex-1 px-3 py-1.5 text-sm","bg-gray-100 dark:bg-gray-800","text-gray-700 dark:text-gray-300","rounded-md","hover:bg-gray-200 dark:hover:bg-gray-700","transition-colors"),children:"Cancel"}),r.jsx("button",{onClick:()=>{e(h),c(!1)},className:u("flex-1 px-3 py-1.5 text-sm","bg-blue-600 dark:bg-blue-500","text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"OK"})]})]})}),i&&r.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>c(!1)})]})},go=({value:t,onChange:e,minDate:a,maxDate:o,disabledDates:n=[],months:s=2,className:l})=>{const[g,i]=p.useState(new Date),[c,h]=p.useState(null),b=(M,I)=>M.getFullYear()===I.getFullYear()&&M.getMonth()===I.getMonth()&&M.getDate()===I.getDate(),k=M=>a&&M<a||o&&M>o?!0:n.some(I=>b(M,I)),m=M=>{if(!t.start||!t.end&&!c)return!1;const I=t.end||c;return I?M>t.start&&M<I:!1},f=M=>t.start?b(M,t.start):!1,y=M=>t.end?b(M,t.end):!1,C=M=>{k(M)||(!t.start||t.start&&t.end?e({start:M,end:null}):M<t.start?e({start:M,end:t.start}):e({start:t.start,end:M}))},S=M=>{const I=M.getFullYear(),$=M.getMonth();return new Date(I,$+1,0).getDate()},w=M=>{const I=M.getFullYear(),$=M.getMonth();return new Date(I,$,1).getDay()},N=M=>{const I=new Date(g.getFullYear(),g.getMonth()+M),$=I.getFullYear(),A=I.getMonth(),z=S(I),P=w(I),O=[];for(let j=0;j<P;j++)O.push(null);for(let j=1;j<=z;j++)O.push(new Date($,A,j));return{days:O,monthName:I.toLocaleDateString("en-US",{month:"long",year:"numeric"})}},v=()=>{i(new Date(g.getFullYear(),g.getMonth()-1))},x=()=>{i(new Date(g.getFullYear(),g.getMonth()+1))},L=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];return r.jsxs("div",{className:u("bg-white dark:bg-gray-900 rounded-lg p-4",l),children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("button",{onClick:v,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Previous month",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),r.jsx("button",{onClick:x,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Next month",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),r.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${s}, 1fr)`},children:Array.from({length:s},(M,I)=>{const{days:$,monthName:A}=N(I);return r.jsxs("div",{children:[r.jsx("h3",{className:"text-base font-semibold text-gray-900 dark:text-white mb-4 text-center",children:A}),r.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:L.map(z=>r.jsx("div",{className:"text-center text-xs font-medium text-gray-600 dark:text-gray-400 py-2",children:z},z))}),r.jsx("div",{className:"grid grid-cols-7 gap-1",children:$.map((z,P)=>{if(!z)return r.jsx("div",{className:"aspect-square"},P);const O=k(z),j=f(z),W=y(z),q=m(z),sr=b(z,new Date);return r.jsx("button",{onClick:()=>C(z),onMouseEnter:()=>h(z),onMouseLeave:()=>h(null),disabled:O,className:u("aspect-square flex items-center justify-center rounded-md text-sm transition-colors relative","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",q&&"bg-blue-100 dark:bg-blue-900/30",(j||W)&&"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",!j&&!W&&!q&&"hover:bg-gray-100 dark:hover:bg-gray-800",sr&&!j&&!W&&"border-2 border-blue-600 dark:border-blue-400"),children:z.getDate()},P)})})]},I)})}),(t.start||t.end)&&r.jsx("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:r.jsxs("div",{className:"flex items-center justify-between text-sm",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Start: "}),r.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:t.start?.toLocaleDateString()||"Not selected"})]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"End: "}),r.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:t.end?.toLocaleDateString()||"Not selected"})]})]})})]})},uo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UtimeUslotUpicker",children:e||"UtimeUslotUpicker Component"}),ho=({value:t,onChange:e,presets:a=["#000000","#FFFFFF","#FF6B6B","#4ECDC4","#45B7D1","#FFA07A","#F7DC6F","#BB8FCE","#85C1E2","#F8B500","#52B788","#E63946","#1D3557","#457B9D","#A8DADC","#F4A261","#264653","#2A9D8F"],showInput:o=!0,showOpacity:n=!1,className:s})=>{const[l,g]=p.useState(t),[i,c]=p.useState(100),h=y=>{e(y),g(y)},b=y=>{const C=y.target.value;g(C),/^#[0-9A-F]{6}$/i.test(C)&&e(C)},k=y=>{c(Number(y.target.value))},f=n?((y,C)=>{const S=parseInt(y.slice(1,3),16),w=parseInt(y.slice(3,5),16),N=parseInt(y.slice(5,7),16);return`rgba(${S}, ${w}, ${N}, ${C/100})`})(t,i):t;return r.jsxs("div",{className:u("bg-white dark:bg-gray-900 rounded-lg p-4",s),children:[r.jsx("div",{className:"mb-4",children:r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-16 h-16 rounded-lg border-2 border-gray-200 dark:border-gray-700 shadow-sm",style:{backgroundColor:f}}),r.jsxs("div",{className:"flex-1",children:[r.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:"Selected Color"}),r.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400 mt-1 font-mono",children:[t,n&&` (${i}%)`]})]})]})}),r.jsxs("div",{className:"mb-4",children:[r.jsx("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Preset Colors"}),r.jsx("div",{className:"grid grid-cols-6 gap-2",children:a.map(y=>r.jsx("button",{onClick:()=>h(y),className:u("w-full aspect-square rounded-md border-2 transition-all hover:scale-110",y===t?"border-blue-500 dark:border-blue-400 ring-2 ring-blue-200 dark:ring-blue-800":"border-gray-200 dark:border-gray-700"),style:{backgroundColor:y},"aria-label":`Select color ${y}`},y))})]}),o&&r.jsxs("div",{className:"mb-4",children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Custom Color (Hex)"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("input",{type:"text",value:l,onChange:b,placeholder:"#000000",className:"flex-1 px-3 py-2 text-sm font-mono bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"}),r.jsx("input",{type:"color",value:t,onChange:y=>h(y.target.value),className:"w-12 h-10 rounded-md cursor-pointer"})]})]}),n&&r.jsxs("div",{children:[r.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:["Opacity: ",i,"%"]}),r.jsx("input",{type:"range",min:"0",max:"100",value:i,onChange:k,className:"w-full h-2 bg-gray-200 dark:bg-gray-700 rounded-lg appearance-none cursor-pointer"})]})]})},bo=({value:t,onChange:e,presets:a,className:o})=>{const s=a||["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff"];return r.jsxs("div",{className:u("space-y-3",o),children:[r.jsx("input",{type:"color",value:t,onChange:l=>e(l.target.value),className:"w-full h-12 rounded cursor-pointer"}),r.jsx("div",{className:"grid grid-cols-8 gap-2",children:s.map(l=>r.jsx("button",{onClick:()=>e(l),className:u("w-8 h-8 rounded border-2",t===l?"border-blue-500":"border-transparent"),style:{backgroundColor:l}},l))})]})},fo=({colors:t,selectedColor:e,onColorSelect:a,size:o="md",showNames:n=!1,showCopy:s=!1,className:l})=>{const[g,i]=p.useState(null),c={sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16"},h=()=>t.map(m=>typeof m=="string"?{hex:m}:m),b=async(m,f)=>{f.stopPropagation(),await navigator.clipboard.writeText(m),i(m),setTimeout(()=>i(null),2e3)},k=h();return r.jsx("div",{className:u("flex flex-wrap gap-3",l),children:k.map((m,f)=>{const y=e===m.hex,C=g===m.hex;return r.jsxs("div",{className:"flex flex-col items-center gap-2",children:[r.jsx("button",{onClick:()=>a?.(m.hex),className:u("rounded-lg transition-all relative group",c[o],y&&"ring-2 ring-blue-500 ring-offset-2 dark:ring-offset-gray-900",!y&&"hover:scale-110"),style:{backgroundColor:m.hex},"aria-label":m.name||m.hex,children:s&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/50 rounded-lg",onClick:S=>b(m.hex,S),children:C?r.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):r.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})})}),n&&r.jsxs("div",{className:"text-center",children:[m.name&&r.jsx("p",{className:"text-xs font-medium text-gray-900 dark:text-white",children:m.name}),r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 font-mono",children:m.hex})]})]},f)})})},yo=({onSave:t,width:e=400,height:a=200,className:o})=>r.jsxs("div",{className:u("border border-gray-300 dark:border-gray-700 rounded-lg",o),children:[r.jsx("canvas",{width:e,height:a,className:"bg-white dark:bg-gray-900"}),r.jsxs("div",{className:"flex gap-2 p-2",children:[r.jsx("button",{className:"px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Clear"}),r.jsx("button",{onClick:()=>t?.(""),className:"px-3 py-1 bg-green-500 text-white rounded hover:bg-green-600",children:"Save"})]})]}),po=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"SignatureRequest",children:e||"SignatureRequest Component"}),mo=({value:t,onChange:e,placeholder:a,className:o})=>r.jsxs("div",{className:u("border border-gray-300 dark:border-gray-700 rounded-lg",o),children:[r.jsx("div",{className:"flex gap-1 p-2 border-b border-gray-300 dark:border-gray-700",children:["B","I","U","H1","H2","List","Link"].map(n=>r.jsx("button",{className:"px-3 py-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded text-sm font-semibold",children:n},n))}),r.jsx("textarea",{value:t,onChange:n=>e(n.target.value),placeholder:a,className:"w-full p-4 bg-white dark:bg-gray-900 text-gray-900 dark:text-white resize-none focus:outline-none",rows:10})]}),vo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UmarkdownUrenderer",children:e||"UmarkdownUrenderer Component"}),xo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcodeUhighlighter",children:e||"UcodeUhighlighter Component"}),ko=({cardNumber:t,onCardNumberChange:e,expiryDate:a="",onExpiryDateChange:o,cvv:n="",onCVVChange:s,cardholderName:l="",onCardholderNameChange:g,showAllFields:i=!1,disabled:c=!1,className:h})=>{const b=v=>{const x=v.replace(/\s/g,"");return/^4/.test(x)?"visa":/^5[1-5]/.test(x)?"mastercard":/^3[47]/.test(x)?"amex":/^6(?:011|5)/.test(x)?"discover":"unknown"},k=b(t),m=v=>{const x=v.replace(/\D/g,"");if(b(x)==="amex"){const z=x.slice(0,15);return[z.slice(0,4),z.slice(4,10),z.slice(10,15)].filter(Boolean).join(" ")}return(x.slice(0,16).match(/.{1,4}/g)||[]).join(" ")},f=v=>{const M=v.replace(/\D/g,"").slice(0,4);return M.length>=2?`${M.slice(0,2)}/${M.slice(2)}`:M},y=v=>{const x=v.replace(/\D/g,""),L=k==="amex"?4:3;return x.slice(0,L)},C=v=>{const x=m(v.target.value);e(x)},S=v=>{if(!o)return;const x=f(v.target.value);o(x)},w=v=>{if(!s)return;const x=y(v.target.value);s(x)},N=()=>{switch(k){case"visa":return r.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[r.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#1434CB"}),r.jsx("path",{d:"M20 11l-2 10h2l2-10h-2zm8 0l-3.5 7-1.5-7h-2l2.5 10h2l5.5-10h-3zm-12 0c-1.5 0-2.5.5-2.5 1.5 0 1.5 3 1.5 3 3.5s-2.5 2-4 2l-.5-2c1 0 2-.5 2-1.5s-3-1.5-3-3.5 2.5-2 4-2l.5 2z",fill:"white"})]});case"mastercard":return r.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[r.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#EB001B"}),r.jsx("circle",{cx:"18",cy:"16",r:"8",fill:"#F79E1B"}),r.jsx("circle",{cx:"30",cy:"16",r:"8",fill:"#FF5F00"})]});case"amex":return r.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[r.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#006FCF"}),r.jsx("path",{d:"M10 12h8l2 8-2 8h-8l-2-8 2-8z",fill:"white"})]});case"discover":return r.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[r.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#FF6000"}),r.jsx("circle",{cx:"38",cy:"16",r:"6",fill:"#FFA500"})]});default:return r.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"})})}};return r.jsxs("div",{className:u("w-full space-y-3",h),children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Card number"}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:"text",value:t,onChange:C,placeholder:"1234 5678 9012 3456",disabled:c,className:u("w-full px-3 py-2 pr-12 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")}),r.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:N()})]})]}),i&&r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Expiry date"}),r.jsx("input",{type:"text",value:a,onChange:S,placeholder:"MM/YY",disabled:c,className:u("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"CVV"}),r.jsx("input",{type:"text",value:n,onChange:w,placeholder:k==="amex"?"1234":"123",disabled:c,className:u("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]})]}),i&&r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Cardholder name"}),r.jsx("input",{type:"text",value:l,onChange:v=>g?.(v.target.value),placeholder:"John Doe",disabled:c,className:u("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]})]})},Sr=[{code:"USD",symbol:"$",name:"US Dollar",decimals:2},{code:"EUR",symbol:"€",name:"Euro",decimals:2},{code:"GBP",symbol:"£",name:"British Pound",decimals:2},{code:"JPY",symbol:"¥",name:"Japanese Yen",decimals:0},{code:"CNY",symbol:"¥",name:"Chinese Yuan",decimals:2},{code:"AUD",symbol:"A$",name:"Australian Dollar",decimals:2},{code:"CAD",symbol:"C$",name:"Canadian Dollar",decimals:2},{code:"CHF",symbol:"Fr",name:"Swiss Franc",decimals:2},{code:"INR",symbol:"₹",name:"Indian Rupee",decimals:2},{code:"BRL",symbol:"R$",name:"Brazilian Real",decimals:2}],wo=({value:t,onChange:e,currency:a="USD",onCurrencyChange:o,currencies:n=Sr,showCurrencySelector:s=!1,placeholder:l="0.00",min:g,max:i,disabled:c=!1,className:h})=>{const[b,k]=p.useState(""),[m,f]=p.useState(!1),[y,C]=p.useState(!1),w=typeof a=="string"?n.find(I=>I.code===a)||Sr[0]:a,N=p.useCallback(I=>{const $=w.decimals??2;return I.toLocaleString("en-US",{minimumFractionDigits:$,maximumFractionDigits:$})},[w]);p.useEffect(()=>{m||k(N(t||0))},[t,N,m]);const v=I=>{const A=I.target.value.replace(/[^\d.]/g,""),z=A.split("."),P=z.length>2?`${z[0]}.${z.slice(1).join("")}`:A;k(P);let j=parseFloat(P)||0;g!==void 0&&j<g&&(j=g),i!==void 0&&j>i&&(j=i),e(j)},x=()=>{f(!0),k(t?t.toString():"")},L=()=>{f(!1),k(N(t||0))},M=I=>{o?.(I),C(!1)};return r.jsxs("div",{className:u("relative w-full",h),children:[r.jsxs("div",{className:"flex gap-2",children:[s&&r.jsxs("div",{className:"relative",children:[r.jsxs("button",{type:"button",onClick:()=>!c&&C(!y),disabled:c,className:u("flex items-center gap-2 px-3 py-2 min-w-[100px]","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",y&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[r.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:w.code}),r.jsx("svg",{className:u("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",y&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),y&&r.jsx("div",{className:"absolute top-full left-0 mt-1 w-64 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:r.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:n.map(I=>r.jsxs("button",{onClick:()=>M(I.code),className:u("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",I.code===w.code&&"bg-blue-50 dark:bg-blue-900/30"),children:[r.jsx("span",{className:"text-lg font-semibold w-8",children:I.symbol}),r.jsxs("div",{className:"flex-1",children:[r.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:I.code}),r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:I.name})]})]},I.code))})})]}),r.jsxs("div",{className:"relative flex-1",children:[r.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-600 dark:text-gray-400 text-sm font-medium",children:w.symbol}),r.jsx("input",{type:"text",value:b,onChange:v,onFocus:x,onBlur:L,placeholder:l,disabled:c,className:u("w-full pl-8 pr-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]})]}),(g!==void 0||i!==void 0)&&r.jsx("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:g!==void 0&&i!==void 0?`Range: ${w.symbol}${N(g)} - ${w.symbol}${N(i)}`:g!==void 0?`Minimum: ${w.symbol}${N(g)}`:`Maximum: ${w.symbol}${N(i)}`}),y&&r.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>C(!1)})]})},Co=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcurrencyUconverter",children:e||"UcurrencyUconverter Component"}),No=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcurrencyUrates",children:e||"UcurrencyUrates Component"}),So=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UformUbuilder",children:e||"UformUbuilder Component"}),Eo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UformUvalidator",children:e||"UformUvalidator Component"}),Lo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UformUtemplate",children:e||"UformUtemplate Component"}),Io=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UschemaUvalidator",children:e||"UschemaUvalidator Component"}),Mo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UfieldUmapper",children:e||"UfieldUmapper Component"}),$o=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UsurveyUbuilder",children:e||"UsurveyUbuilder Component"}),To=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"QuizBuilder",children:e||"QuizBuilder Component"}),Ne=V.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:U.link.subtle(),default:U.link.default(),muted:U.link.muted(),external:U.link.external(),inherit:"text-inherit hover:text-blue-600 dark:hover:text-blue-400 underline-offset-2 hover:underline transition-colors duration-200"},size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{variant:"subtle",size:"default"}}),je=F.forwardRef(({className:t,variant:e,size:a,to:o,href:n,external:s,children:l,...g},i)=>{const c=o||n;return c?s||c.startsWith("http")||c.startsWith("mailto:")?r.jsx("a",{className:u(Ne({variant:e==="subtle"?"external":e,size:a,className:t})),href:c,target:"_blank",rel:"noopener noreferrer",ref:i,...g,children:l}):r.jsx($e.Link,{className:u(Ne({variant:e,size:a,className:t})),to:c,ref:i,...g,children:l}):r.jsx("span",{className:u(Ne({variant:e,size:a,className:t})),...g,children:l})});je.displayName="SmartLink";const Ao=(t,e)=>F.useMemo(()=>{let a=t;return Object.entries(e).forEach(([o,n])=>{const s=new RegExp(`\\b${o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");a=a.replace(s,l=>`<SmartLink to="${n}" variant="subtle">${l}</SmartLink>`)}),a},[t,e]),Uo={documentation:"/document",settings:"/settings",about:"/about",contact:"/contact","privacy policy":"/privacy",privacy:"/privacy","terms of service":"/terms",terms:"/terms","cookie policy":"/cookies",cookies:"/cookies",points:"/points","earn points":"/how-to-earn-points","how to earn points":"/how-to-earn-points","connect wallet":"/connect","connect your wallet":"/connect","wallet connection":"/connect",wallet:"/connect",compose:"/compose","compose email":"/compose","send email":"/compose",mail:"/mail",email:"/mail",inbox:"/mail",dashboard:"/mail",delegate:"/delegate",delegation:"/delegate",manage:"/manage","manage preferences":"/preferences",profile:"/settings",account:"/settings",preferences:"/preferences",token:"/token","web3 users":"/web3-users","web3 projects":"/web3-projects","get started":"/connect","start here":"/connect","learn more":"/document","read more":"/document","our features":"/document",support:"/contact",help:"/document","contact us":"/contact"},Po=({children:t,mappings:e=Uo,className:a,variant:o="subtle"})=>{const n=F.useMemo(()=>{if(!t||typeof t!="string")return t||"";let l=t;return Object.entries(e).sort(([i],[c])=>c.length-i.length).forEach(([i,c])=>{if(i&&c){const h=new RegExp(`\\b${i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");l=l.replace(h,b=>`__LINK_START__${c}__LINK_MID__${b}__LINK_END__`)}}),l},[t,e]);if(!n||typeof n!="string")return r.jsx("span",{className:a,children:t});const s=n.split(/(__LINK_START__.*?__LINK_END__)/);return r.jsx("span",{className:a,children:s.map((l,g)=>{const i=l.match(/__LINK_START__(.*?)__LINK_MID__(.*?)__LINK_END__/);if(i){const[,c,h]=i;return r.jsx(je,{to:c,variant:o,children:h},g)}return l})})},zo=({href:t,children:e,variant:a="default",external:o=!1,showExternalIcon:n=!1,disabled:s=!1,className:l,...g})=>{const i=o||t.startsWith("http://")||t.startsWith("https://"),c={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium",secondary:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100",muted:"text-gray-500 dark:text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",underline:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 underline"},h=i?{target:"_blank",rel:"noopener noreferrer"}:{};return s?r.jsxs("span",{className:u("cursor-not-allowed opacity-50",c[a],l),children:[e,n&&i&&r.jsx(T.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1"})]}):r.jsxs("a",{href:t,className:u("inline-flex items-center transition-colors",c[a],l),...h,...g,children:[e,n&&i&&r.jsx(T.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1 flex-shrink-0"})]})},Do=({href:t,children:e,showIcon:a=!0,iconPosition:o="right",size:n="md",variant:s="default",className:l,onClick:g})=>{const i={sm:{text:U.body.sm(),icon:"h-3 w-3",gap:"gap-1"},md:{text:U.body.md(),icon:"h-4 w-4",gap:"gap-1.5"},lg:{text:U.body.lg(),icon:"h-5 w-5",gap:"gap-2"}},c={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-700 dark:text-blue-300 hover:text-blue-800 dark:hover:text-blue-200 font-semibold",muted:"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"},h=i[n];return r.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",onClick:g,className:u("inline-flex items-center",h.gap,h.text,c[s],"underline decoration-1 underline-offset-2","hover:decoration-2","transition-all duration-200",l),children:[a&&o==="left"&&r.jsx(T.ArrowTopRightOnSquareIcon,{className:u(h.icon,"flex-shrink-0")}),r.jsx("span",{children:e}),a&&o==="right"&&r.jsx(T.ArrowTopRightOnSquareIcon,{className:u(h.icon,"flex-shrink-0")})]})},jo=({items:t,separator:e="/",className:a})=>r.jsx("nav",{className:u("flex items-center gap-2 text-sm",a),children:t.map((o,n)=>r.jsxs(p.Fragment,{children:[n>0&&r.jsx("span",{className:"text-gray-400 dark:text-gray-600",children:e}),n===t.length-1?r.jsx("span",{className:"text-gray-900 dark:text-white font-medium",children:o.label}):r.jsx("button",{onClick:o.onClick,className:"text-blue-600 dark:text-blue-400 hover:underline",children:o.label})]},n))}),Bo=H.Root,Er=F.forwardRef(({className:t,...e},a)=>r.jsx(H.List,{ref:a,className:u(D.navigation.tabs.list(),t),...e}));Er.displayName=H.List.displayName;const Lr=F.forwardRef(({className:t,...e},a)=>r.jsx(H.Trigger,{ref:a,className:u(D.navigation.tabs.trigger(),t),...e}));Lr.displayName=H.Trigger.displayName;const Ir=F.forwardRef(({className:t,...e},a)=>r.jsx(H.Content,{ref:a,className:u(D.navigation.tabs.content(),t),...e}));Ir.displayName=H.Content.displayName;const Oo=({items:t,orientation:e="horizontal",className:a})=>{const[o,n]=p.useState(new Set),s=g=>{n(i=>{const c=new Set(i);return c.has(g)?c.delete(g):c.add(g),c})},l=(g,i)=>{const c=g.children&&g.children.length>0,h=o.has(i),b=r.jsxs(r.Fragment,{children:[g.icon&&r.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:g.icon}),r.jsx("span",{className:"flex-1",children:g.label}),c&&r.jsx("svg",{className:u("w-4 h-4 transition-transform",e==="horizontal"&&!h&&"-rotate-90",h&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),k=u("flex items-center gap-2 px-4 py-2 text-sm font-medium","transition-colors",g.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800");return r.jsxs("div",{children:[c?r.jsx("button",{onClick:()=>s(i),className:u(k,"w-full"),children:b}):g.href?r.jsx("a",{href:g.href,className:k,onClick:g.onClick,children:b}):r.jsx("button",{onClick:g.onClick,className:u(k,"w-full"),children:b}),c&&h&&r.jsx("div",{className:u("bg-gray-50 dark:bg-gray-800/50",e==="horizontal"?"pl-4":"border-l-2 border-gray-200 dark:border-gray-700 ml-4"),children:g.children.map((m,f)=>r.jsx("div",{children:m.href?r.jsxs("a",{href:m.href,onClick:m.onClick,className:u("flex items-center gap-2 px-4 py-2 text-sm","transition-colors",m.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[m.icon&&r.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:m.icon}),m.label]}):r.jsxs("button",{onClick:m.onClick,className:u("w-full flex items-center gap-2 px-4 py-2 text-sm","transition-colors",m.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[m.icon&&r.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:m.icon}),m.label]})},f))})]},i)};return r.jsx("nav",{className:u("bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg",e==="horizontal"?"flex flex-wrap":"flex flex-col",a),children:t.map((g,i)=>l(g,i))})},Wo=({items:t,selectedPath:e,onSelect:a,variant:o="default",className:n})=>{const s=o==="compact"?"space-y-1":"space-y-0";return r.jsx("div",{className:u(s,n),children:t.map(l=>{const g=l.icon,i=e===l.path,c=l.disabled,h=u("flex items-start cursor-pointer transition-colors",o==="compact"?"p-3 rounded-lg":"p-4 border-b border-gray-200 dark:border-gray-700 last:border-b-0",c&&"opacity-50 cursor-not-allowed"),b=i?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300";return r.jsxs("div",{onClick:()=>!c&&a(l.path),className:u(h,!c&&b),role:"button",tabIndex:c?-1:0,"aria-current":i?"page":void 0,"aria-disabled":c,onKeyDown:k=>{!c&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),a(l.path))},children:[r.jsx(g,{className:"h-5 w-5 mt-0.5 mr-3 flex-shrink-0"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:u("font-medium",U.body.md()),children:[l.label,l.badge!==void 0&&l.badge>0&&r.jsx("span",{className:"ml-2 inline-flex items-center justify-center px-2 py-0.5 text-xs font-medium bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full",children:l.badge})]}),l.description&&r.jsx("div",{className:u("text-xs text-gray-500 dark:text-gray-400 mt-0.5"),children:l.description})]})]},l.id)})})},Fo=({items:t,className:e})=>r.jsx("nav",{className:u("flex flex-col gap-1",e),children:t.map(a=>r.jsxs("button",{onClick:a.onClick,className:u("flex items-center gap-3 px-4 py-3 rounded-lg transition-colors",a.active?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"),children:[a.icon&&r.jsx("span",{className:"w-5 h-5",children:a.icon}),r.jsx("span",{className:"flex-1 text-left font-medium",children:a.label}),a.badge&&r.jsx("span",{className:"px-2 py-0.5 bg-gray-200 dark:bg-gray-700 rounded text-xs",children:a.badge})]},a.id))}),Vo=({currentPage:t,totalPages:e,onPageChange:a,siblingCount:o=1,showFirstLast:n=!1,size:s="md",className:l})=>{const i={sm:{button:"h-8 w-8 text-xs",icon:"h-3 w-3",text:U.body.sm()},md:{button:"h-10 w-10 text-sm",icon:"h-4 w-4",text:U.body.md()},lg:{button:"h-12 w-12 text-base",icon:"h-5 w-5",text:U.body.lg()}}[s],h=(()=>{const w=[];w.push(1);const N=Math.max(t-o,2),v=Math.min(t+o,e-1);N>2&&w.push("ellipsis");for(let x=N;x<=v;x++)w.push(x);return v<e-1&&w.push("ellipsis"),e>1&&w.push(e),w})(),b=()=>{t>1&&a(t-1)},k=()=>{t<e&&a(t+1)},m=()=>{a(1)},f=()=>{a(e)},y=u("inline-flex items-center justify-center","rounded-md border border-gray-300 dark:border-gray-600","transition-all duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500","disabled:opacity-50 disabled:cursor-not-allowed"),C=w=>u(y,i.button,i.text,w?"bg-blue-600 text-white border-blue-600 dark:bg-blue-500 dark:border-blue-500":"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"),S=u(y,i.button,"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700");return r.jsxs("nav",{className:u("flex items-center gap-1",l),"aria-label":"Pagination",children:[n&&r.jsx("button",{onClick:m,disabled:t===1,className:S,"aria-label":"Go to first page",children:r.jsx("span",{className:i.text,children:"First"})}),r.jsx("button",{onClick:b,disabled:t===1,className:S,"aria-label":"Go to previous page",children:r.jsx(T.ChevronLeftIcon,{className:i.icon})}),h.map((w,N)=>w==="ellipsis"?r.jsx("span",{className:u("inline-flex items-center justify-center",i.button,"text-gray-400 dark:text-gray-500"),children:"..."},`ellipsis-${N}`):r.jsx("button",{onClick:()=>a(w),className:C(w===t),"aria-label":`Go to page ${w}`,"aria-current":w===t?"page":void 0,children:w},w)),r.jsx("button",{onClick:k,disabled:t===e,className:S,"aria-label":"Go to next page",children:r.jsx(T.ChevronRightIcon,{className:i.icon})}),n&&r.jsx("button",{onClick:f,disabled:t===e,className:S,"aria-label":"Go to last page",children:r.jsx("span",{className:i.text,children:"Last"})})]})},Ho=({currentPage:t,totalPages:e,onPageChange:a,maxVisible:o=7,className:n})=>{const s=[];if(e<=o)for(let l=1;l<=e;l++)s.push(l);else{s.push(1),t>3&&s.push("...");const l=Math.max(2,t-1),g=Math.min(e-1,t+1);for(let i=l;i<=g;i++)s.push(i);t<e-2&&s.push("..."),s.push(e)}return r.jsxs("nav",{className:u("flex items-center gap-1",n),children:[r.jsx("button",{onClick:()=>a(t-1),disabled:t===1,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),s.map((l,g)=>l==="..."?r.jsx("span",{className:"px-3 py-2",children:"..."},`ellipsis-${g}`):r.jsx("button",{onClick:()=>a(l),className:u("px-3 py-2 rounded",l===t?"bg-blue-500 text-white":"hover:bg-gray-100 dark:hover:bg-gray-800"),children:l},l)),r.jsx("button",{onClick:()=>a(t+1),disabled:t===e,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})},qo=({steps:t,currentStep:e,orientation:a="horizontal",clickable:o=!1,onStepClick:n,className:s})=>{const l=i=>{o&&n&&n(i)},g=i=>i<e?"completed":i===e?"active":"upcoming";return a==="horizontal"?r.jsx("div",{className:u("w-full",s),children:r.jsx("div",{className:"flex items-center justify-between",children:t.map((i,c)=>{const h=g(c),b=c===t.length-1;return r.jsxs(p.Fragment,{children:[r.jsxs("div",{className:"flex flex-col items-center",children:[r.jsx("button",{onClick:()=>l(c),disabled:!o,className:u("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default",o&&"hover:scale-110",h==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",h==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",h==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:h==="completed"?r.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):i.icon?r.jsx("span",{className:u("w-5 h-5",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:i.icon}):r.jsx("span",{className:u("text-sm font-semibold",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:c+1})}),r.jsxs("div",{className:"mt-2 text-center",children:[r.jsx("p",{className:u("text-sm font-medium",h==="active"?"text-blue-600 dark:text-blue-500":h==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:i.label}),i.description&&r.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:i.description})]})]}),!b&&r.jsx("div",{className:"flex-1 h-0.5 mx-2 bg-gray-300 dark:bg-gray-700 relative",children:r.jsx("div",{className:u("absolute left-0 top-0 h-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",c<e?"w-full":"w-0")})})]},i.id)})})}):r.jsx("div",{className:u("w-full",s),children:r.jsx("div",{className:"space-y-4",children:t.map((i,c)=>{const h=g(c),b=c===t.length-1;return r.jsxs("div",{className:"flex gap-4",children:[r.jsxs("div",{className:"flex flex-col items-center",children:[r.jsx("button",{onClick:()=>l(c),disabled:!o,className:u("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default flex-shrink-0",o&&"hover:scale-110",h==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",h==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",h==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:h==="completed"?r.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):i.icon?r.jsx("span",{className:u("w-5 h-5",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:i.icon}):r.jsx("span",{className:u("text-sm font-semibold",h==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:c+1})}),!b&&r.jsx("div",{className:"w-0.5 flex-1 min-h-[32px] bg-gray-300 dark:bg-gray-700 relative mt-2",children:r.jsx("div",{className:u("absolute top-0 left-0 w-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",c<e?"h-full":"h-0")})})]}),r.jsxs("div",{className:"flex-1 pb-4",children:[r.jsx("p",{className:u("text-sm font-medium",h==="active"?"text-blue-600 dark:text-blue-500":h==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:i.label}),i.description&&r.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:i.description})]})]},i.id)})})})},_o=({steps:t,currentStep:e,onStepClick:a,orientation:o="horizontal",className:n})=>r.jsx("nav",{className:u(o==="horizontal"?"flex items-center":"flex flex-col",n),children:t.map((s,l)=>r.jsxs("div",{className:u("flex items-center",o==="vertical"&&"flex-col items-start"),children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("button",{onClick:()=>a?.(l),disabled:l>e,className:u("w-10 h-10 rounded-full flex items-center justify-center font-semibold transition-colors",l<e&&"bg-green-500 text-white",l===e&&"bg-blue-500 text-white",l>e&&"bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400"),children:l<e?"✓":l+1}),r.jsxs("div",{children:[r.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:s.label}),s.description&&r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:s.description})]})]}),l<t.length-1&&r.jsx("div",{className:u(o==="horizontal"?"w-full h-0.5 mx-4":"h-8 w-0.5 ml-5 my-2","bg-gray-300 dark:bg-gray-700")})]},s.id))}),Go=({subsections:t,isExpanded:e,selectedSubsection:a,parentSectionId:o,onSubsectionSelect:n})=>{const s=p.useRef(null),[l,g]=p.useState(void 0);return p.useEffect(()=>{if(s.current){const i=s.current.scrollHeight;g(e?i+8:0)}},[e,t]),r.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:l!==void 0?`${l}px`:"auto"},children:r.jsx("div",{ref:s,className:"ml-6 mt-2 space-y-1",children:t.map(i=>r.jsx("button",{onClick:()=>n?.(i.id,o),className:`block w-full text-left px-3 py-2 rounded-md text-sm transition-all duration-200 hover:scale-[1.02] ${a===i.id?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-800 dark:hover:text-gray-200"}`,children:i.title},i.id))})})},Ko=({sections:t,selectedSection:e,selectedSubsection:a,expandedSections:o,onSectionSelect:n,onSubsectionSelect:s,onToggleSection:l,className:g=""})=>r.jsx("nav",{className:`space-y-2 ${g}`,children:t.map(i=>r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center",children:[r.jsx("button",{onClick:()=>n(i.id),className:`flex-1 text-left px-3 py-2 rounded-md text-sm font-medium transition-all duration-200 hover:scale-[1.02] ${e===i.id&&!a?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-gray-100"}`,children:i.title}),i.subsections&&i.subsections.length>0&&r.jsx("button",{onClick:()=>l(i.id),className:"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200",children:r.jsx(T.ChevronRightIcon,{className:`h-4 w-4 text-gray-500 transition-transform duration-300 ease-in-out ${o.includes(i.id)?"rotate-90":"rotate-0"}`})})]}),i.subsections&&r.jsx(Go,{subsections:i.subsections,isExpanded:o.includes(i.id),selectedSubsection:a,parentSectionId:i.id,onSubsectionSelect:s})]},i.id))});function Yo({columns:t,data:e,keyExtractor:a,sort:o,onSort:n,onRowClick:s,striped:l=!1,hoverable:g=!1,compact:i=!1,bordered:c=!1,emptyMessage:h="No data available",className:b}){const k=f=>{f.sortable&&n&&n(f.key)},m={left:"text-left",center:"text-center",right:"text-right"};return r.jsx("div",{className:u("w-full overflow-x-auto",b),children:r.jsxs("table",{className:"w-full",children:[r.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:r.jsx("tr",{children:t.map(f=>r.jsx("th",{className:u(i?"px-3 py-2":"px-6 py-3","text-xs font-medium text-gray-700 dark:text-gray-300 uppercase tracking-wider",m[f.align||"left"],f.sortable&&"cursor-pointer select-none hover:bg-gray-100 dark:hover:bg-gray-700",c&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),style:{width:f.width},onClick:()=>f.sortable&&k(f),children:r.jsxs("div",{className:"flex items-center gap-2",children:[f.label,f.sortable&&r.jsx("span",{className:"flex flex-col",children:o?.column===f.key?o.direction==="asc"?r.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{d:"M5 10l5-5 5 5H5z"})}):r.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{d:"M15 10l-5 5-5-5h10z"})}):r.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:r.jsx("path",{d:"M5 10l5-5 5 5H5z"})})})]})},f.key))})}),r.jsx("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:e.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:t.length,className:"px-6 py-8 text-center text-sm text-gray-500 dark:text-gray-400",children:h})}):e.map((f,y)=>r.jsx("tr",{className:u(l&&y%2===1&&"bg-gray-50 dark:bg-gray-800/50",g&&"hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",s&&"cursor-pointer"),onClick:()=>s?.(f,y),children:t.map(C=>r.jsx("td",{className:u(i?"px-3 py-2":"px-6 py-4","text-sm text-gray-900 dark:text-white",m[C.align||"left"],c&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),children:C.render?C.render(f,y):f[C.key]},C.key))},a(f,y)))})]})})}const Qo=({data:t,columns:e,hasActions:a=!1,renderCell:o,renderAction:n,emptyMessage:s="No data available",getRowKey:l=(i,c)=>String(c),className:g=""})=>!t||t.length===0?r.jsx("div",{className:`text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg ${g}`,children:r.jsx("p",{className:`${U.body.sm()} text-gray-500 dark:text-gray-400`,children:s})}):r.jsx("div",{className:`relative ${g}`,children:r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full border-collapse",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[e.map((i,c)=>r.jsx("th",{className:`${U.label.default()} text-left py-3 px-4 whitespace-nowrap`,children:i},c)),a&&r.jsx("th",{className:`${U.label.default()} text-right py-3 px-4 sticky right-0 bg-white dark:bg-gray-900 whitespace-nowrap`})]})}),r.jsx("tbody",{children:t.map((i,c)=>r.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[e.map((h,b)=>{const k=o(i,b);return r.jsx("td",{className:"py-3 px-4",children:typeof k=="string"?r.jsx("span",{className:U.body.sm(),children:k}):k},b)}),a&&r.jsx("td",{className:"py-3 px-4 text-right sticky right-0 bg-white dark:bg-gray-900",children:n?.(i)})]},l(i,c)))})]})})}),Zo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UdataUgrid",children:e||"UdataUgrid Component"}),Xo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UpivotUtable",children:e||"UpivotUtable Component"}),Jo=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UspreadsheetUgrid",children:e||"UspreadsheetUgrid Component"}),Ro=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcolumnUresize",children:e||"UcolumnUresize Component"}),en=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UcellUeditor",children:e||"UcellUeditor Component"}),rn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UtableUreservation",children:e||"UtableUreservation Component"}),tn=({children:t,type:e="unordered",spacing:a="sm",marker:o,size:n="md",className:s})=>{const l=e==="ordered"?"ol":"ul",g={none:"space-y-0",sm:"space-y-1",md:"space-y-2",lg:"space-y-4"},i={sm:"text-sm",md:"text-base",lg:"text-lg"},c=()=>o==="none"?"list-none":e==="unordered"?{disc:"list-disc",circle:"list-circle",square:"list-square",decimal:"list-disc",alpha:"list-disc",roman:"list-disc",none:"list-none"}[o||"disc"]:{decimal:"list-decimal",alpha:"list-alpha",roman:"list-roman",disc:"list-decimal",circle:"list-decimal",square:"list-decimal",none:"list-none"}[o||"decimal"];return r.jsx(l,{className:u("ml-6",c(),g[a],i[n],"text-gray-900 dark:text-gray-100",s),children:t})},an=({children:t,className:e})=>r.jsx("li",{className:u("leading-relaxed",e),children:t});V.cva("bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 transition-all duration-200",{variants:{variant:{default:"border-gray-200 dark:border-gray-700 border hover:shadow-lg",elevated:"shadow-lg hover:shadow-xl",minimal:"bg-transparent shadow-none border-none p-4"},trend:{none:"",up:"border-l-4 border-green-500",down:"border-l-4 border-red-500",neutral:"border-l-4 border-gray-400"}},defaultVariants:{variant:"default",trend:"none"}}),V.cva("space-y-6",{variants:{variant:{default:"",card:"bg-white dark:bg-gray-800 rounded-lg border-gray-200 dark:border-gray-700 border p-6",minimal:"space-y-4"},spacing:{tight:"space-y-3",normal:"space-y-4",relaxed:"space-y-6",loose:"space-y-8"}},defaultVariants:{variant:"default",spacing:"normal"}}),V.cva("flex flex-col items-center text-center space-y-4",{variants:{layout:{vertical:"flex-col items-center text-center",horizontal:"flex-row items-start text-left space-y-0 space-x-4",minimal:"flex-col space-y-2"},spacing:{tight:"space-y-2",normal:"space-y-4",relaxed:"space-y-6"},interactive:{true:"transition-all duration-200 hover:transform hover:scale-105 cursor-pointer",false:""}},defaultVariants:{layout:"vertical",spacing:"normal",interactive:!1}});const on=F.forwardRef(({className:t,type:e,...a},o)=>r.jsx("input",{type:e,className:u(D.input.default(),t),ref:o,...a}));on.displayName="Input",V.cva("min-h-screen flex flex-col",{variants:{background:{default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",transparent:"bg-transparent",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/20 dark:to-purple-900/20"},overflow:{visible:"overflow-visible",hidden:"overflow-hidden",scroll:"overflow-auto"}},defaultVariants:{background:"default",overflow:"visible"}}),V.cva("",{variants:{variant:{default:"",hero:"relative overflow-hidden",feature:"bg-white dark:bg-gray-800",cta:"relative overflow-hidden",testimonial:"bg-gray-50 dark:bg-gray-900",footer:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border-t"},spacing:{none:"",xs:"py-2",sm:"py-3",md:"py-4",lg:"py-6",xl:"py-8","2xl":"py-12","3xl":"py-16","4xl":"py-20","5xl":"py-24"},background:{none:"bg-transparent",default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/50 dark:to-purple-900/50","gradient-primary":"bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-blue-900/50 dark:to-indigo-900/50","gradient-secondary":"bg-gradient-to-br from-green-50 to-blue-100 dark:from-green-900/50 dark:to-blue-900/50","gradient-tertiary":"bg-gradient-to-r from-emerald-50 to-teal-50 dark:from-gray-800 dark:to-gray-900","gradient-vibrant":"bg-gradient-to-br from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"}},defaultVariants:{variant:"default",spacing:"3xl",background:"none"}});const Mr=B.Root,nn=B.Value,Be=F.forwardRef(({className:t,children:e,...a},o)=>r.jsxs(B.Trigger,{ref:o,className:u("flex h-9 w-full items-center justify-between rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...a,children:[e,r.jsx(B.Icon,{asChild:!0,children:r.jsx(X.ChevronDown,{className:"h-4 w-4 opacity-50 ml-2 flex-shrink-0"})})]}));Be.displayName=B.Trigger.displayName;const $r=F.forwardRef(({className:t,...e},a)=>r.jsx(B.ScrollUpButton,{ref:a,className:u("flex cursor-default items-center justify-center py-1",t),...e,children:r.jsx(X.ChevronUp,{className:"h-4 w-4"})}));$r.displayName=B.ScrollUpButton.displayName;const Tr=F.forwardRef(({className:t,...e},a)=>r.jsx(B.ScrollDownButton,{ref:a,className:u("flex cursor-default items-center justify-center py-1",t),...e,children:r.jsx(X.ChevronDown,{className:"h-4 w-4"})}));Tr.displayName=B.ScrollDownButton.displayName;const Oe=F.forwardRef(({className:t,children:e,position:a="popper",...o},n)=>r.jsx(B.Portal,{children:r.jsxs(B.Content,{ref:n,className:u(D.overlays.dropdown.menu(),"z-[1000000] max-h-96 min-w-[8rem] overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...o,children:[r.jsx($r,{}),r.jsx(B.Viewport,{className:u(D.overlays.dropdown.itemContainer(),a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),r.jsx(Tr,{})]})}));Oe.displayName=B.Content.displayName;const sn=F.forwardRef(({className:t,...e},a)=>r.jsx(B.Label,{ref:a,className:u(D.overlays.dropdown.header(),"py-1.5",t),...e}));sn.displayName=B.Label.displayName;const We=F.forwardRef(({className:t,children:e,...a},o)=>r.jsxs(B.Item,{ref:o,className:u(D.overlays.dropdown.item(),"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[r.jsx(B.ItemText,{children:e}),r.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(B.ItemIndicator,{children:r.jsx(X.Check,{className:"h-4 w-4"})})})]}));We.displayName=B.Item.displayName;const ln=F.forwardRef(({className:t,...e},a)=>r.jsx(B.Separator,{ref:a,className:u("my-1 h-px bg-gray-200 dark:bg-gray-700",t),...e}));ln.displayName=B.Separator.displayName;const Fe=V.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:U.link.subtle(),default:U.link.default(),muted:U.link.muted(),external:U.link.external(),inherit:"text-inherit hover:text-blue-600 dark:hover:text-blue-400 underline-offset-2 hover:underline transition-colors duration-200"},size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{variant:"subtle",size:"default"}}),dn=F.forwardRef(({className:t,variant:e,size:a,to:o,href:n,external:s,children:l,...g},i)=>{const c=o||n;return c?s||c.startsWith("http")||c.startsWith("mailto:")?r.jsx("a",{className:u(Fe({variant:e==="subtle"?"external":e,size:a,className:t})),href:c,target:"_blank",rel:"noopener noreferrer",ref:i,...g,children:l}):r.jsx($e.Link,{className:u(Fe({variant:e,size:a,className:t})),to:c,ref:i,...g,children:l}):r.jsx("span",{className:u(Fe({variant:e,size:a,className:t})),...g,children:l})});dn.displayName="SmartLink";const cn=F.forwardRef(({className:t,...e},a)=>r.jsx(oe.Root,{className:u("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-gray-200 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950 dark:data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-gray-700",t),...e,ref:a,children:r.jsx(oe.Thumb,{className:u("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));cn.displayName=oe.Root.displayName;const gn=F.forwardRef(({className:t,...e},a)=>r.jsx(H.List,{ref:a,className:u(D.navigation.tabs.list(),t),...e}));gn.displayName=H.List.displayName;const un=F.forwardRef(({className:t,...e},a)=>r.jsx(H.Trigger,{ref:a,className:u(D.navigation.tabs.trigger(),t),...e}));un.displayName=H.Trigger.displayName;const hn=F.forwardRef(({className:t,...e},a)=>r.jsx(H.Content,{ref:a,className:u(D.navigation.tabs.content(),t),...e}));hn.displayName=H.Content.displayName,p.createContext(void 0);const bn=({children:t,onAction:e,actionText:a="Remove",actionIcon:o=T.TrashIcon,destructive:n=!0,isProcessing:s=!1,variant:l="default",className:g})=>{const i="flex items-center justify-between p-4 rounded-lg transition-colors",c={default:"bg-gray-50 dark:bg-gray-700",compact:"bg-gray-50 dark:bg-gray-700 py-2 px-3",elevated:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 shadow-sm hover:shadow-md"};return r.jsxs("div",{className:u(i,c[l],g),children:[r.jsx("div",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:t}),r.jsxs(J,{variant:n?"ghost":"outline",size:"sm",onClick:e,disabled:s,className:u("ml-4",n&&"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 hover:bg-red-50 dark:hover:bg-red-900/20"),children:[r.jsx(o,{className:"h-4 w-4 mr-1"}),a]})]})},fn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UuserUtable",children:e||"UuserUtable Component"}),yn=({source:t,target:e,onChange:a,sourceTitle:o="Available",targetTitle:n="Selected",searchable:s=!0,sourceSearchPlaceholder:l="Search available...",targetSearchPlaceholder:g="Search selected...",height:i=300,disabled:c=!1,className:h})=>{const[b,k]=p.useState(""),[m,f]=p.useState(""),[y,C]=p.useState(new Set),[S,w]=p.useState(new Set),N=s?t.filter(P=>P.label.toLowerCase().includes(b.toLowerCase())):t,v=s?e.filter(P=>P.label.toLowerCase().includes(m.toLowerCase())):e,x=P=>{const O=new Set(y);O.has(P)?O.delete(P):O.add(P),C(O)},L=P=>{const O=new Set(S);O.has(P)?O.delete(P):O.add(P),w(O)},M=()=>{const P=t.filter(W=>y.has(W.id)),O=t.filter(W=>!y.has(W.id)),j=[...e,...P];a(O,j),C(new Set)},I=()=>{const P=e.filter(W=>S.has(W.id)),O=e.filter(W=>!S.has(W.id)),j=[...t,...P];a(j,O),w(new Set)},$=()=>{const P=[...e,...t];a([],P),C(new Set)},A=()=>{const P=[...t,...e];a(P,[]),w(new Set)},z=(P,O,j,W,q,sr,tc)=>r.jsxs("div",{className:"flex flex-col flex-1 border border-gray-300 dark:border-gray-700 rounded-md bg-white dark:bg-gray-900",children:[r.jsxs("div",{className:"px-3 py-2 border-b border-gray-300 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",children:[r.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:O}),r.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:[P.length," item",P.length!==1?"s":""]})]}),s&&r.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:r.jsx("input",{type:"text",value:q,onChange:K=>sr(K.target.value),placeholder:tc,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"})}),r.jsx("div",{className:"overflow-y-auto p-2 space-y-1",style:{height:s?i-120:i-60},children:P.length===0?r.jsx("div",{className:"flex items-center justify-center h-full text-sm text-gray-500 dark:text-gray-400",children:"No items"}):P.map(K=>{const lr=j.has(K.id);return r.jsx("button",{onClick:()=>!K.disabled&&W(K.id),disabled:K.disabled||c,className:u("w-full px-3 py-2 text-left rounded-md transition-colors","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-50 disabled:cursor-not-allowed",lr&&"bg-blue-50 dark:bg-blue-900/30 border border-blue-200 dark:border-blue-700"),children:r.jsxs("div",{className:"flex items-start gap-2",children:[r.jsx("div",{className:u("w-4 h-4 border-2 rounded flex items-center justify-center flex-shrink-0 mt-0.5",lr?"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500":"border-gray-300 dark:border-gray-600"),children:lr&&r.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:K.label}),K.description&&r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:K.description})]})]})},K.id)})})]});return r.jsxs("div",{className:u("flex gap-4",h),children:[z(N,o,y,x,b,k,l),r.jsxs("div",{className:"flex flex-col justify-center gap-2",children:[r.jsx("button",{onClick:$,disabled:c||t.length===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to selected",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 5l7 7-7 7M5 5l7 7-7 7"})})}),r.jsx("button",{onClick:M,disabled:c||y.size===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to target",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),r.jsx("button",{onClick:I,disabled:c||S.size===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to source",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),r.jsx("button",{onClick:A,disabled:c||e.length===0,className:u("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to available",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 19l-7-7 7-7M19 19l-7-7 7-7"})})})]}),z(v,n,S,L,m,f,g)]})};function pn({items:t,itemHeight:e,height:a,renderItem:o,keyExtractor:n,overscan:s=3,className:l}){const[g,i]=p.useState(0),c=p.useRef(null),h=y=>{i(y.currentTarget.scrollTop)},b=t.length*e,k=Math.max(0,Math.floor(g/e)-s),m=Math.min(t.length-1,Math.ceil((g+a)/e)+s),f=t.slice(k,m+1);return r.jsx("div",{ref:c,className:u("overflow-auto",l),style:{height:a},onScroll:h,children:r.jsx("div",{style:{height:b,position:"relative"},children:f.map((y,C)=>{const S=k+C;return r.jsx("div",{style:{position:"absolute",top:S*e,height:e,width:"100%"},children:o(y,S)},n(y,S))})})})}const mn=({data:t,selectedId:e,onSelect:a,expandedIds:o,onExpand:n,defaultExpanded:s=!1,showLines:l=!1,className:g})=>{const[i,c]=p.useState(new Set(s?t.map(f=>f.id):[])),h=o!==void 0?new Set(o):i,b=f=>{o!==void 0&&n?n(f):c(y=>{const C=new Set(y);return C.has(f)?C.delete(f):C.add(f),C})},k=f=>{!f.disabled&&a&&a(f)},m=(f,y=0)=>{const C=f.children&&f.children.length>0,S=h.has(f.id),w=e===f.id;return r.jsxs("div",{children:[r.jsxs("div",{className:u("flex items-center gap-2 px-2 py-1.5 rounded-md transition-colors",!f.disabled&&"hover:bg-gray-100 dark:hover:bg-gray-800",w&&"bg-blue-50 dark:bg-blue-900/30",f.disabled&&"opacity-50 cursor-not-allowed",!f.disabled&&"cursor-pointer"),style:{paddingLeft:`${y*1.5+.5}rem`},onClick:()=>k(f),children:[C?r.jsx("button",{onClick:N=>{N.stopPropagation(),b(f.id)},className:"flex-shrink-0 w-4 h-4 flex items-center justify-center hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",children:r.jsx("svg",{className:u("w-3 h-3 transition-transform",S&&"rotate-90"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}):r.jsx("div",{className:"w-4 h-4 flex-shrink-0"}),f.icon&&r.jsx("span",{className:"flex-shrink-0 w-4 h-4 text-gray-600 dark:text-gray-400",children:f.icon}),r.jsx("span",{className:u("flex-1 text-sm",w?"text-blue-700 dark:text-blue-300 font-medium":"text-gray-900 dark:text-white"),children:f.label})]}),C&&S&&r.jsx("div",{className:u(l&&"border-l-2 border-gray-200 dark:border-gray-700 ml-2"),children:f.children.map(N=>m(N,y+1))})]},f.id)};return r.jsx("div",{className:u("w-full",g),children:t.map(f=>m(f,0))})},vn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UlistingUform",children:e||"UlistingUform Component"}),xn="bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border border-blue-200 dark:border-blue-800",kn={none:"",sm:"p-3",md:"p-6",lg:"p-8"},Ve=({variant:t="elevated",padding:e="md",icon:a,onClose:o,className:n,children:s,...l})=>{const i=["info","success","warning","error"].includes(t)&&(a||o),c=t==="callout"?xn:Dt(t);return r.jsx("div",{className:u("rounded-lg",c,kn[e],n),...l,children:i?r.jsxs("div",{className:"flex items-start gap-3",children:[a&&r.jsx("div",{className:"flex-shrink-0 text-lg",children:a}),r.jsx("div",{className:"flex-1 min-w-0",children:s}),o&&r.jsx("button",{onClick:o,className:"flex-shrink-0 text-current hover:opacity-70 transition-opacity","aria-label":"Close",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):s})},wn=({title:t,description:e,className:a,children:o,...n})=>r.jsxs("div",{className:u("space-y-1.5",a),...n,children:[t&&r.jsx("h3",{className:U.heading.h4(),children:t}),e&&r.jsx("p",{className:U.body.sm(),children:e}),o]}),Cn=({className:t,children:e,...a})=>r.jsx("div",{className:u("",t),...a,children:e}),Nn=({className:t,children:e,...a})=>r.jsx("div",{className:u("flex items-center pt-4",t),...a,children:e}),Sn=({title:t,children:e,variant:a="info",size:o="default",className:n})=>{const s={sm:"sm",default:"md",lg:"lg"},l=a==="neutral"?"bordered":a;return r.jsxs(Ve,{variant:l,padding:s[o],className:n,children:[t&&r.jsx("h3",{className:u("font-semibold mb-2",o==="sm"?"text-base":o==="lg"?"text-xl":"text-lg"),children:t}),e]})},En=({title:t,icon:e,children:a,variant:o="gradient",size:n="default",centered:s=!1,className:l})=>{const g={sm:"sm",default:"md",lg:"lg"},i=o==="gradient"||o==="neutral"?"callout":o;return r.jsx(Ve,{variant:i,padding:g[n],className:l,children:r.jsxs("div",{className:u("space-y-4",s&&"text-center"),children:[e&&r.jsx("div",{className:u("font-bold",n==="sm"?"text-2xl":n==="lg"?"text-5xl":"text-4xl",s?"text-center":"text-left"),children:e}),t&&r.jsx("h3",{className:u("font-bold mb-4",n==="sm"?"text-lg":n==="lg"?"text-3xl":"text-2xl"),children:t}),r.jsx("div",{className:u("text-gray-600 dark:text-gray-400",n==="sm"?"text-sm":n==="lg"?"text-lg":"text-base"),children:a})]})})},Ln=({title:t,value:e,change:a,changePeriod:o="vs last period",icon:n,variant:s="default",className:l})=>{const g={default:"bg-white dark:bg-gray-900",primary:"bg-blue-50 dark:bg-blue-900/20",success:"bg-green-50 dark:bg-green-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",danger:"bg-red-50 dark:bg-red-900/20"};return r.jsxs("div",{className:u("rounded-lg border border-gray-200 dark:border-gray-700 p-6",g[s],l),children:[r.jsxs("div",{className:"flex items-start justify-between mb-2",children:[r.jsx("h3",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:t}),n&&r.jsx("div",{className:"text-gray-400 dark:text-gray-600",children:n})]}),r.jsx("div",{className:"flex items-end justify-between",children:r.jsxs("div",{children:[r.jsx("p",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:e}),a!==void 0&&r.jsxs("div",{className:"flex items-center gap-1 mt-2",children:[r.jsxs("span",{className:u("text-sm font-medium",a>=0?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:[a>=0?"↑":"↓"," ",Math.abs(a),"%"]}),r.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:o})]})]})})]})},In=({src:t,alt:e="Avatar",fallback:a,name:o,size:n="md",status:s,className:l,onClick:g})=>{const[i,c]=p.useState(!1),h={sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base"},b={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},k={online:"bg-green-500",offline:"bg-gray-400",away:"bg-yellow-500",busy:"bg-red-500"},f=a||(o?(S=>{const w=S.trim().split(/\s+/);return w.length===1?w[0].charAt(0).toUpperCase():w[0].charAt(0).toUpperCase()+w[w.length-1].charAt(0).toUpperCase()})(o):""),y=t&&!i,C=()=>{c(!0)};return r.jsxs("div",{className:"relative inline-block flex-shrink-0",children:[r.jsx("div",{className:u("flex items-center justify-center overflow-hidden rounded-full",h[n],!y&&"bg-gray-300 dark:bg-gray-600 text-gray-700 dark:text-gray-200",g&&"cursor-pointer hover:opacity-80 transition-opacity",l),onClick:g,role:g?"button":void 0,tabIndex:g?0:void 0,children:y?r.jsx("img",{src:t,alt:e,className:"w-full h-full object-cover",onError:C}):r.jsx("span",{className:"font-semibold",children:f})}),s&&r.jsx("span",{className:u("absolute bottom-0 right-0 rounded-full border-2 border-white dark:border-gray-800",k[s],b[n]),"aria-label":s})]})},Mn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UavatarUgroup",children:e||"UavatarUgroup Component"}),$n=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UprofileUheader",children:e||"UprofileUheader Component"}),Tn=({label:t,value:e,orientation:a="vertical",align:o="start",labelWidth:n="auto",size:s="md",separator:l=!1,labelVariant:g="muted",valueVariant:i="default",className:c,labelClassName:h,valueClassName:b})=>{const k={sm:{label:U.body.sm(),value:U.body.sm(),gap:"gap-1"},md:{label:U.body.md(),value:U.body.md(),gap:"gap-2"},lg:{label:U.body.lg(),value:U.body.lg(),gap:"gap-3"}},m={auto:"",sm:"w-24",md:"w-32",lg:"w-40"},f={start:"justify-start",center:"justify-center",between:"justify-between"},y={default:"text-gray-700 dark:text-gray-300",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold"},C={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold",primary:"text-blue-600 dark:text-blue-400"},S=k[s];return r.jsxs("div",{className:u(a==="horizontal"?"flex items-center":"flex flex-col",a==="horizontal"&&f[o],S.gap,l&&"pb-3 mb-3 border-b border-gray-200 dark:border-gray-700",c),children:[r.jsx("dt",{className:u(S.label,y[g],a==="horizontal"&&m[n],a==="horizontal"&&"flex-shrink-0",h),children:t}),r.jsx("dd",{className:u(S.value,C[i],a==="horizontal"&&"flex-1",b),children:e})]})},An=({value:t,label:e,variant:a="neutral",size:o="md",align:n="center",icon:s,iconPosition:l="top",className:g,valueClassName:i,labelClassName:c})=>{const h={primary:{value:"text-blue-600 dark:text-blue-400",label:"text-blue-600/70 dark:text-blue-400/70",icon:"text-blue-600 dark:text-blue-400"},success:{value:"text-green-600 dark:text-green-400",label:"text-green-600/70 dark:text-green-400/70",icon:"text-green-600 dark:text-green-400"},warning:{value:"text-yellow-600 dark:text-yellow-400",label:"text-yellow-600/70 dark:text-yellow-400/70",icon:"text-yellow-600 dark:text-yellow-400"},danger:{value:"text-red-600 dark:text-red-400",label:"text-red-600/70 dark:text-red-400/70",icon:"text-red-600 dark:text-red-400"},neutral:{value:"text-gray-900 dark:text-gray-100",label:"text-gray-600 dark:text-gray-400",icon:"text-gray-600 dark:text-gray-400"},white:{value:"text-white",label:"text-white/70",icon:"text-white"}},b={sm:{value:U.heading.h5(),label:U.caption.default(),icon:"h-4 w-4"},md:{value:U.heading.h4(),label:U.body.sm(),icon:"h-5 w-5"},lg:{value:U.heading.h3(),label:U.body.md(),icon:"h-6 w-6"},xl:{value:U.heading.h2(),label:U.body.lg(),icon:"h-8 w-8"}},k={left:"text-left",center:"text-center",right:"text-right"},m=h[a],f=b[o];return r.jsxs("div",{className:u(k[n],g),children:[s&&l==="top"&&r.jsx(s,{className:u(f.icon,m.icon,"mb-2",n==="center"&&"mx-auto")}),r.jsxs("div",{className:u(l==="left"&&s&&"flex items-center gap-3",n==="center"&&l==="left"&&"justify-center"),children:[s&&l==="left"&&r.jsx(s,{className:u(f.icon,m.icon)}),r.jsxs("div",{children:[r.jsx("div",{className:u("font-bold",f.value,m.value,i),children:t}),r.jsx("div",{className:u(f.label,m.label,c),children:e})]})]})]})},Ar=({icon:t,title:e="No data",description:a,action:o,className:n})=>r.jsxs("div",{className:u("flex flex-col items-center justify-center py-12 px-4 text-center",n),children:[t&&r.jsx("div",{className:"mb-4 text-gray-400 dark:text-gray-600",children:t}),r.jsx("h3",{className:u(U.heading.h3(),"mb-2"),children:e}),a&&r.jsx("p",{className:u(U.body.sm(),"text-gray-600 dark:text-gray-400 max-w-sm mb-6"),children:a}),o&&r.jsx("div",{className:"mt-4",children:o})]}),Un=({title:t,subtext:e,className:a})=>r.jsx(Ar,{title:t,description:e,className:a}),Pn=({data:t,orientation:e="vertical",showValues:a=!1,showGrid:o=!0,barWidth:n=40,height:s=300,className:l})=>{const g=Math.max(...t.map(c=>c.value)),i="#3b82f6";return r.jsx("div",{className:u("w-full",l),children:r.jsxs("div",{className:"relative bg-white dark:bg-gray-900 rounded-lg p-6",style:{height:`${s}px`},children:[o&&r.jsx("div",{className:"absolute inset-6 flex flex-col justify-between",children:[...Array(5)].map((c,h)=>r.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700"},h))}),e==="vertical"?r.jsx("div",{className:"relative h-full flex items-end justify-around gap-2",children:t.map((c,h)=>{const b=c.value/g*100;return r.jsxs("div",{className:"flex flex-col items-center gap-2",style:{width:`${n}px`},children:[a&&r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:c.value}),r.jsx("div",{className:"w-full rounded-t transition-all hover:opacity-80",style:{height:`${b}%`,backgroundColor:c.color||i}}),r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:c.label})]},h)})}):r.jsx("div",{className:"relative h-full flex flex-col justify-around gap-2",children:t.map((c,h)=>{const b=c.value/g*100;return r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 w-16 text-right",children:c.label}),r.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[r.jsx("div",{className:"h-8 rounded transition-all hover:opacity-80",style:{width:`${b}%`,backgroundColor:c.color||i}}),a&&r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:c.value})]})]},h)})})]})})},zn=({series:t,showLegend:e=!0,showGrid:a=!0,showPoints:o=!0,height:n=300,xLabels:s,className:l})=>{const g=t.flatMap(m=>m.data),i=Math.max(...g.map(m=>m.y)),c=Math.min(...g.map(m=>m.y)),h=Math.max(...g.map(m=>m.x)),b=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],k=m=>m.length===0?"":`M ${m.map(y=>{const C=y.x/h*100,S=100-(y.y-c)/(i-c)*100;return`${C},${S}`}).join(" L ")}`;return r.jsxs("div",{className:u("w-full",l),children:[e&&r.jsx("div",{className:"flex flex-wrap gap-4 mb-4",children:t.map((m,f)=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:m.color||b[f%b.length]}}),r.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:m.name})]},f))}),r.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[r.jsxs("div",{className:"relative",style:{height:`${n}px`},children:[a&&r.jsx("div",{className:"absolute inset-0",children:[...Array(5)].map((m,f)=>r.jsx("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${f*25}%`}},f))}),r.jsx("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:t.map((m,f)=>{const y=m.color||b[f%b.length];return r.jsxs("g",{children:[r.jsx("path",{d:k(m.data),fill:"none",stroke:y,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),o&&m.data.map((C,S)=>{const w=C.x/h*100,N=100-(C.y-c)/(i-c)*100;return r.jsx("circle",{cx:w,cy:N,r:"1",fill:y,vectorEffect:"non-scaling-stroke"},S)})]},f)})})]}),s&&r.jsx("div",{className:"flex justify-between mt-2",children:s.map((m,f)=>r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:m},f))})]})]})},Dn=({data:t,variant:e="pie",showLegend:a=!0,showPercentages:o=!1,size:n=200,donutHoleSize:s=40,className:l})=>{const g=t.reduce((f,y)=>f+y.value,0),i=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899"],c=t.reduce((f,y,C)=>{const S=y.value/g*100,w=S/100*360,N=f.length>0?f[f.length-1].endAngle:-90,v=N+w;return f.push({...y,percentage:S,startAngle:N,endAngle:v,color:y.color||i[C%i.length]}),f},[]),h=(f,y,C,S)=>{const w=(S-90)*Math.PI/180;return{x:f+C*Math.cos(w),y:y+C*Math.sin(w)}},b=(f,y,C,S,w)=>{const N=h(f,y,C,w),v=h(f,y,C,S),x=w-S<=180?"0":"1";if(e==="donut"){const L=C*s/100,M=h(f,y,L,w),I=h(f,y,L,S);return["M",N.x,N.y,"A",C,C,0,x,0,v.x,v.y,"L",I.x,I.y,"A",L,L,0,x,1,M.x,M.y,"Z"].join(" ")}return["M",f,y,"L",N.x,N.y,"A",C,C,0,x,0,v.x,v.y,"Z"].join(" ")},k=n/2,m=n/2-10;return r.jsxs("div",{className:u("flex flex-col items-center gap-4",l),children:[r.jsx("svg",{width:n,height:n,className:"transform rotate-0",children:c.map((f,y)=>r.jsx("path",{d:b(k,k,m,f.startAngle,f.endAngle),fill:f.color,className:"transition-opacity hover:opacity-80"},y))}),a&&r.jsx("div",{className:"flex flex-col gap-2",children:c.map((f,y)=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:f.color}}),r.jsxs("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:[f.label,o&&r.jsxs("span",{className:"text-gray-500 dark:text-gray-400 ml-1",children:["(",Math.round(f.percentage),"%)"]})]})]},y))})]})},jn=({series:t,showLegend:e=!0,showGrid:a=!0,fillOpacity:o=.2,height:n=300,xLabels:s,className:l})=>{const g=t.flatMap(f=>f.data),i=Math.max(...g.map(f=>f.y)),c=Math.min(...g.map(f=>f.y)),h=Math.max(...g.map(f=>f.x)),b=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],k=f=>{if(f.length===0)return"";const y=f.map(w=>{const N=w.x/h*100,v=100-(w.y-c)/(i-c)*100;return`${N},${v}`}),C=f[0].x/h*100,S=f[f.length-1].x/h*100;return`M ${C},100 L ${y.join(" L ")} L ${S},100 Z`},m=f=>f.length===0?"":`M ${f.map(C=>{const S=C.x/h*100,w=100-(C.y-c)/(i-c)*100;return`${S},${w}`}).join(" L ")}`;return r.jsxs("div",{className:u("w-full",l),children:[e&&r.jsx("div",{className:"flex flex-wrap gap-4 mb-4",children:t.map((f,y)=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:f.color||b[y%b.length]}}),r.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:f.name})]},y))}),r.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[r.jsxs("div",{className:"relative",style:{height:`${n}px`},children:[a&&r.jsx("div",{className:"absolute inset-0",children:[...Array(5)].map((f,y)=>r.jsx("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${y*25}%`}},y))}),r.jsx("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:t.map((f,y)=>{const C=f.color||b[y%b.length];return r.jsxs("g",{children:[r.jsx("path",{d:k(f.data),fill:C,fillOpacity:o}),r.jsx("path",{d:m(f.data),fill:"none",stroke:C,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"})]},y)})})]}),s&&r.jsx("div",{className:"flex justify-between mt-2",children:s.map((f,y)=>r.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:f},y))})]})]})},Bn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UradarUchart",children:e||"UradarUchart Component"}),On=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UbubbleUchart",children:e||"UbubbleUchart Component"}),Wn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UscatterUplot",children:e||"UscatterUplot Component"}),Fn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UtreeUmap",children:e||"UtreeUmap Component"}),Vn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UsankeyUdiagram",children:e||"UsankeyUdiagram Component"}),Hn=({data:t,width:e=100,height:a=30,color:o="#3b82f6",fill:n=!1,className:s})=>{if(t.length===0)return null;const l=Math.max(...t),g=Math.min(...t),i=l-g||1,c=t.map((h,b)=>{const k=b/(t.length-1)*e,m=a-(h-g)/i*a;return`${k},${m}`}).join(" ");return r.jsxs("svg",{width:e,height:a,className:u("inline-block",s),children:[n&&r.jsx("polygon",{points:`0,${a} ${c} ${e},${a}`,fill:o,opacity:"0.2"}),r.jsx("polyline",{points:c,fill:"none",stroke:o,strokeWidth:"2",strokeLinejoin:"round",strokeLinecap:"round"})]})},qn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"Uheatmap",children:e||"Uheatmap Component"}),_n=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UfunnelUchart",children:e||"UfunnelUchart Component"}),Gn=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"BurndownChart",children:e||"BurndownChart Component"}),Kn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UperformanceUchart",children:e||"UperformanceUchart Component"}),Yn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UmetricUcomparison",children:e||"UmetricUcomparison Component"}),Qn=({value:t,min:e=0,max:a=100,size:o=120,strokeWidth:n=10,showValue:s=!0,label:l,variant:g="primary",className:i})=>{const c=Math.min(a,Math.max(e,t)),h=(c-e)/(a-e)*100,b=o/2,k=(o-n)/2,m=Math.PI*k,f=m-h/100*m,y={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"};return r.jsxs("div",{className:u("inline-flex flex-col items-center gap-2",i),children:[r.jsxs("svg",{width:o,height:o*.65,className:"transform rotate-180",children:[r.jsx("path",{d:`M ${n/2} ${b} A ${k} ${k} 0 0 1 ${o-n/2} ${b}`,fill:"none",className:"stroke-gray-200 dark:stroke-gray-700",strokeWidth:n,strokeLinecap:"round"}),r.jsx("path",{d:`M ${n/2} ${b} A ${k} ${k} 0 0 1 ${o-n/2} ${b}`,fill:"none",className:u(y[g],"transition-all duration-500"),strokeWidth:n,strokeDasharray:m,strokeDashoffset:f,strokeLinecap:"round"})]}),s&&r.jsxs("div",{className:"text-center -mt-8",children:[r.jsx("div",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:Math.round(c)}),l&&r.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:l})]})]})},Zn=({value:t,max:e=100,variant:a="primary",size:o="md",showLabel:n=!1,labelPosition:s="outside",label:l,className:g,barClassName:i,animated:c=!0,striped:h=!1})=>{const b=Math.min(Math.max(t/e*100,0),100),k=l||`${Math.round(b)}%`,m={primary:"bg-blue-600 dark:bg-blue-500",success:"bg-green-600 dark:bg-green-500",warning:"bg-yellow-600 dark:bg-yellow-500",danger:"bg-red-600 dark:bg-red-500",purple:"bg-purple-600 dark:bg-purple-500",gray:"bg-gray-600 dark:bg-gray-500"},f={sm:"h-1",md:"h-2",lg:"h-3"};return r.jsx("div",{className:u("w-full",g),children:r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:u("flex-1 bg-gray-200 dark:bg-gray-600 rounded-full overflow-hidden",f[o]),children:r.jsx("div",{className:u("rounded-full",f[o],m[a],c&&"transition-all duration-300 ease-in-out",h&&"bg-gradient-to-r from-transparent via-white/20 to-transparent bg-[length:20px_100%]",i),style:{width:`${b}%`},role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":e,children:n&&s==="inside"&&o==="lg"&&r.jsx("span",{className:"flex items-center justify-center h-full text-xs font-medium text-white px-2",children:k})})}),n&&s==="outside"&&r.jsx("span",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 whitespace-nowrap",children:k})]})})},Xn=({value:t=0,max:e=100,variant:a="default",size:o="md",showLabel:n=!1,label:s,indeterminate:l=!1,striped:g=!1,animated:i=!1,className:c})=>{const h=Math.min(Math.max(t/e*100,0),100),b={default:"bg-blue-600 dark:bg-blue-500",success:"bg-green-600 dark:bg-green-500",warning:"bg-yellow-600 dark:bg-yellow-500",danger:"bg-red-600 dark:bg-red-500"},k={sm:"h-1",md:"h-2",lg:"h-4"};return r.jsxs("div",{className:u("w-full",c),children:[r.jsx("div",{className:u("w-full bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden",k[o]),role:"progressbar","aria-valuenow":l?void 0:h,"aria-valuemin":0,"aria-valuemax":100,children:l?r.jsx("div",{className:u("h-full rounded-full animate-pulse",b[a]),style:{width:"100%"}}):r.jsx("div",{className:u("h-full rounded-full transition-all duration-300",b[a],g&&"bg-stripe",g&&i&&"animate-stripe"),style:{width:`${h}%`}})}),(n||s)&&r.jsx("div",{className:"mt-1 text-xs text-gray-600 dark:text-gray-400 text-right",children:s||`${Math.round(h)}%`})]})},Jn=({value:t,size:e=100,strokeWidth:a=8,showValue:o=!0,label:n,variant:s="primary",color:l,trackColor:g,className:i})=>{const c=Math.min(100,Math.max(0,t)),h=e/2,b=(e-a)/2,k=2*Math.PI*b,m=k-c/100*k,f={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"},y=g||"stroke-gray-200 dark:stroke-gray-700";return r.jsx("div",{className:u("inline-flex items-center justify-center",i),children:r.jsxs("div",{className:"relative",style:{width:e,height:e},children:[r.jsxs("svg",{width:e,height:e,className:"transform -rotate-90",children:[r.jsx("circle",{cx:h,cy:h,r:b,className:y,strokeWidth:a,fill:"none"}),r.jsx("circle",{cx:h,cy:h,r:b,className:u(l?"":f[s],"transition-all duration-300 ease-in-out"),stroke:l,strokeWidth:a,strokeDasharray:k,strokeDashoffset:m,strokeLinecap:"round",fill:"none"})]}),(o||n)&&r.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[o&&!n&&r.jsxs("span",{className:"text-gray-900 dark:text-white font-bold",style:{fontSize:e*.2},children:[Math.round(c),"%"]}),n&&r.jsx("span",{className:"text-gray-900 dark:text-white font-medium text-center px-2",style:{fontSize:e*.15},children:n})]})]})})},Rn=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UprogressUtracker",children:e||"UprogressUtracker Component"}),es=({src:t,alt:e,fallback:a,width:o,height:n,objectFit:s="cover",loading:l="lazy",showLoader:g=!0,rounded:i="none",border:c=!1,className:h,onLoad:b,onError:k})=>{const[m,f]=p.useState(!0),[y,C]=p.useState(!1),[S,w]=p.useState(t);p.useEffect(()=>{f(!0),C(!1),w(t)},[t]);const N=()=>{f(!1),b?.()},v=()=>{f(!1),C(!0),a&&S!==a&&(w(a),C(!1),f(!0)),k?.()},x={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},L={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"},M={width:typeof o=="number"?`${o}px`:o,height:typeof n=="number"?`${n}px`:n};return r.jsxs("div",{className:u("relative inline-block overflow-hidden bg-gray-100 dark:bg-gray-800",x[i],c&&"border border-gray-200 dark:border-gray-700",h),style:M,children:[g&&m&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:r.jsx("div",{className:"animate-pulse",children:r.jsx(T.PhotoIcon,{className:"h-8 w-8 text-gray-400"})})}),y&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:r.jsx(T.PhotoIcon,{className:"h-8 w-8 text-gray-400"})}),!y&&r.jsx("img",{src:S,alt:e,loading:l,onLoad:N,onError:v,className:u("w-full h-full",L[s],m&&g&&"opacity-0")})]})},rs=({images:t,columns:e=3,gap:a=16,lightbox:o=!0,className:n})=>{const[s,l]=p.useState(null),g=b=>{o&&l(b)},i=()=>{l(null)},c=()=>{if(!s)return;const b=t.findIndex(m=>m.id===s.id),k=b>0?b-1:t.length-1;l(t[k])},h=()=>{if(!s)return;const b=t.findIndex(m=>m.id===s.id),k=b<t.length-1?b+1:0;l(t[k])};return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:u("grid",n),style:{gridTemplateColumns:`repeat(${e}, 1fr)`,gap:`${a}px`},children:t.map(b=>r.jsxs("div",{className:u("relative aspect-square overflow-hidden rounded-lg bg-gray-200 dark:bg-gray-700",o&&"cursor-pointer hover:opacity-90 transition-opacity"),onClick:()=>g(b),children:[r.jsx("img",{src:b.thumbnail||b.src,alt:b.alt||"",className:"w-full h-full object-cover"}),b.caption&&r.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 text-white text-sm p-2",children:b.caption})]},b.id))}),o&&s&&r.jsxs("div",{className:"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-4",onClick:i,children:[r.jsx("button",{onClick:i,className:"absolute top-4 right-4 text-white hover:text-gray-300 transition-colors",children:r.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),r.jsx("button",{onClick:b=>{b.stopPropagation(),c()},className:"absolute left-4 text-white hover:text-gray-300 transition-colors",children:r.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),r.jsx("button",{onClick:b=>{b.stopPropagation(),h()},className:"absolute right-4 text-white hover:text-gray-300 transition-colors",children:r.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),r.jsxs("div",{className:"max-w-4xl max-h-full",onClick:b=>b.stopPropagation(),children:[r.jsx("img",{src:s.src,alt:s.alt||"",className:"max-w-full max-h-[80vh] object-contain"}),s.caption&&r.jsx("p",{className:"text-white text-center mt-4",children:s.caption})]})]})]})},ts=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UimageUcomparison",children:e||"UimageUcomparison Component"}),as=({src:t,onCropComplete:e,initialCrop:a,className:o})=>{const[n,s]=p.useState(a||{x:50,y:50,width:200,height:200}),l=p.useRef(null),g=async()=>{if(!l.current||!e)return;const i=document.createElement("canvas"),c=i.getContext("2d");if(!c)return;const h=l.current,b=h.naturalWidth/h.width,k=h.naturalHeight/h.height;i.width=n.width*b,i.height=n.height*k,c.drawImage(h,n.x*b,n.y*k,n.width*b,n.height*k,0,0,i.width,i.height);const m=i.toDataURL("image/png");e(m,n)};return r.jsxs("div",{className:u("inline-flex flex-col gap-4",o),children:[r.jsxs("div",{className:"relative inline-block",children:[r.jsx("img",{ref:l,src:t,alt:"Crop preview",className:"max-w-full h-auto",crossOrigin:"anonymous"}),r.jsxs("div",{className:"absolute border-2 border-blue-500 bg-blue-500/20",style:{left:`${n.x}px`,top:`${n.y}px`,width:`${n.width}px`,height:`${n.height}px`,cursor:"move"},children:[r.jsx("div",{className:"absolute -top-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-nw-resize"}),r.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-ne-resize"}),r.jsx("div",{className:"absolute -bottom-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-sw-resize"}),r.jsx("div",{className:"absolute -bottom-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-se-resize"})]})]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("button",{onClick:g,className:u("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Crop Image"}),r.jsx("button",{onClick:()=>s(a||{x:50,y:50,width:200,height:200}),className:u("px-4 py-2 text-sm font-medium","bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-white","rounded-md","hover:bg-gray-300 dark:hover:bg-gray-600","transition-colors"),children:"Reset"})]}),r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:'Drag to adjust crop area. Click "Crop Image" to export.'})]})},os=({images:t,index:e,isOpen:a,onClose:o,onIndexChange:n,showThumbnails:s=!1,showDownload:l=!1,showZoom:g=!0,className:i})=>{const[c,h]=p.useState(1),b=t[e],k=e>0,m=e<t.length-1,f=p.useCallback(()=>{if(k){const v=e-1;n?.(v),h(1)}},[k,e,n]),y=p.useCallback(()=>{if(m){const v=e+1;n?.(v),h(1)}},[m,e,n]),C=()=>{h(v=>Math.min(v+.5,3))},S=()=>{h(v=>Math.max(v-.5,.5))},w=()=>{h(1)},N=()=>{const v=document.createElement("a");v.href=b.src,v.download=b.alt||"image",v.click()};return p.useEffect(()=>{if(!a)return;const v=x=>{switch(x.key){case"Escape":o();break;case"ArrowLeft":f();break;case"ArrowRight":y();break;case"+":case"=":C();break;case"-":case"_":S();break;case"0":w();break}};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[a,e,t.length,o,f,y]),p.useEffect(()=>(a?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[a]),p.useEffect(()=>{h(1)},[e]),!a||!b?null:r.jsx(ee,{children:r.jsxs("div",{className:u("fixed inset-0 z-50 flex items-center justify-center","bg-black/95",i),children:[r.jsx("div",{className:"absolute inset-0",onClick:o,"aria-label":"Close lightbox"}),r.jsx("button",{onClick:o,className:"absolute top-4 right-4 z-10 p-2 text-white hover:text-gray-300 transition-colors","aria-label":"Close",children:r.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),k&&r.jsx("button",{onClick:f,className:"absolute left-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Previous image",children:r.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),m&&r.jsx("button",{onClick:y,className:"absolute right-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Next image",children:r.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),r.jsxs("div",{className:"absolute top-4 left-4 z-10 flex gap-2",children:[r.jsxs("div",{className:"px-3 py-1.5 bg-black/50 text-white text-sm rounded-md",children:[e+1," / ",t.length]}),g&&r.jsxs("div",{className:"flex gap-1 bg-black/50 rounded-md p-1",children:[r.jsx("button",{onClick:S,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom out",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7"})})}),r.jsxs("button",{onClick:w,className:"px-2 text-white text-sm hover:text-gray-300 transition-colors","aria-label":"Reset zoom",children:[Math.round(c*100),"%"]}),r.jsx("button",{onClick:C,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom in",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v3m0 0v3m0-3h3m-3 0H7"})})})]}),l&&r.jsx("button",{onClick:N,className:"p-1.5 bg-black/50 text-white hover:text-gray-300 rounded-md transition-colors","aria-label":"Download image",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})})]}),r.jsx("div",{className:"relative z-0 flex items-center justify-center max-w-7xl max-h-screen p-20",children:r.jsx("img",{src:b.src,alt:b.alt||"",className:"max-w-full max-h-full object-contain transition-transform",style:{transform:`scale(${c})`}})}),b.caption&&r.jsx("div",{className:"absolute bottom-20 left-0 right-0 z-10 text-center",children:r.jsx("p",{className:"px-4 py-2 bg-black/50 text-white text-sm inline-block rounded-md max-w-2xl",children:b.caption})}),s&&t.length>1&&r.jsx("div",{className:"absolute bottom-4 left-0 right-0 z-10 flex justify-center gap-2 px-4 overflow-x-auto",children:t.map((v,x)=>r.jsx("button",{onClick:()=>{n?.(x),h(1)},className:u("flex-shrink-0 w-16 h-16 rounded-md overflow-hidden","border-2 transition-all",x===e?"border-white scale-110":"border-transparent opacity-60 hover:opacity-100 hover:border-gray-400"),children:r.jsx("img",{src:v.thumbnail||v.src,alt:v.alt||"",className:"w-full h-full object-cover"})},x))})]})})},ns=({src:t,poster:e,autoPlay:a=!1,loop:o=!1,muted:n=!1,controls:s=!0,className:l})=>{const g=p.useRef(null),[i,c]=p.useState(a),[h,b]=p.useState(1),[k,m]=p.useState(0),[f,y]=p.useState(0);p.useEffect(()=>{const x=g.current;if(!x)return;const L=()=>m(x.currentTime),M=()=>y(x.duration),I=()=>c(!0),$=()=>c(!1);return x.addEventListener("timeupdate",L),x.addEventListener("loadedmetadata",M),x.addEventListener("play",I),x.addEventListener("pause",$),()=>{x.removeEventListener("timeupdate",L),x.removeEventListener("loadedmetadata",M),x.removeEventListener("play",I),x.removeEventListener("pause",$)}},[]);const C=()=>{g.current&&(i?g.current.pause():g.current.play())},S=x=>{const L=parseFloat(x.target.value);b(L),g.current&&(g.current.volume=L)},w=x=>{const L=parseFloat(x.target.value);m(L),g.current&&(g.current.currentTime=L)},N=()=>{g.current&&(document.fullscreenElement?document.exitFullscreen():g.current.requestFullscreen())},v=x=>{const L=Math.floor(x/60),M=Math.floor(x%60);return`${L}:${M.toString().padStart(2,"0")}`};return r.jsxs("div",{className:u("relative group",l),children:[r.jsx("video",{ref:g,src:t,poster:e,autoPlay:a,loop:o,muted:n,className:"w-full rounded-lg",onClick:C}),s&&r.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4 opacity-0 group-hover:opacity-100 transition-opacity",children:[r.jsx("input",{type:"range",min:"0",max:f||0,value:k,onChange:w,className:"w-full mb-2 accent-white"}),r.jsxs("div",{className:"flex items-center justify-between gap-4",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("button",{onClick:C,className:"text-white hover:text-gray-300 transition-colors",children:i?r.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}):r.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M8 5v14l11-7z"})})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"})}),r.jsx("input",{type:"range",min:"0",max:"1",step:"0.1",value:h,onChange:S,className:"w-20 accent-white"})]}),r.jsxs("span",{className:"text-white text-sm",children:[v(k)," / ",v(f)]})]}),r.jsx("button",{onClick:N,className:"text-white hover:text-gray-300 transition-colors",children:r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})})})]})]})]})},ss=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UvideoUthumbnail",children:e||"UvideoUthumbnail Component"}),ls=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"VideoEditor",children:e||"VideoEditor Component"}),is=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UvideoUcall",children:e||"UvideoUcall Component"}),ds=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"LiveStream",children:e||"LiveStream Component"}),cs=({src:t,title:e,artist:a,artwork:o,autoPlay:n=!1,loop:s=!1,className:l})=>{const g=p.useRef(null),[i,c]=p.useState(n),[h,b]=p.useState(0),[k,m]=p.useState(0),[f,y]=p.useState(1);p.useEffect(()=>{const x=g.current;if(!x)return;const L=()=>b(x.currentTime),M=()=>m(x.duration),I=()=>c(!0),$=()=>c(!1),A=()=>c(!1);return x.addEventListener("timeupdate",L),x.addEventListener("loadedmetadata",M),x.addEventListener("play",I),x.addEventListener("pause",$),x.addEventListener("ended",A),()=>{x.removeEventListener("timeupdate",L),x.removeEventListener("loadedmetadata",M),x.removeEventListener("play",I),x.removeEventListener("pause",$),x.removeEventListener("ended",A)}},[]);const C=()=>{g.current&&(i?g.current.pause():g.current.play())},S=x=>{const L=parseFloat(x.target.value);b(L),g.current&&(g.current.currentTime=L)},w=x=>{const L=parseFloat(x.target.value);y(L),g.current&&(g.current.volume=L)},N=x=>{const L=Math.floor(x/60),M=Math.floor(x%60);return`${L}:${M.toString().padStart(2,"0")}`},v=k>0?h/k*100:0;return r.jsxs("div",{className:u("bg-white dark:bg-gray-900 rounded-lg p-6 shadow-lg",l),children:[r.jsx("audio",{ref:g,src:t,autoPlay:n,loop:s}),r.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[o&&r.jsx("div",{className:"w-16 h-16 rounded-lg overflow-hidden flex-shrink-0 bg-gray-200 dark:bg-gray-700",children:r.jsx("img",{src:o,alt:e||"Album artwork",className:"w-full h-full object-cover"})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[e&&r.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white truncate",children:e}),a&&r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 truncate",children:a})]})]}),r.jsxs("div",{className:"mb-4",children:[r.jsx("input",{type:"range",min:"0",max:k||0,value:h,onChange:S,className:"w-full accent-blue-500"}),r.jsxs("div",{className:"flex justify-between text-xs text-gray-600 dark:text-gray-400 mt-1",children:[r.jsx("span",{children:N(h)}),r.jsx("span",{children:N(k)})]})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("button",{onClick:C,className:"w-10 h-10 rounded-full bg-blue-500 text-white flex items-center justify-center hover:bg-blue-600 transition-colors",children:i?r.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}):r.jsx("svg",{className:"w-5 h-5 ml-0.5",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M8 5v14l11-7z"})})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"})}),r.jsx("input",{type:"range",min:"0",max:"1",step:"0.1",value:f,onChange:w,className:"w-24 accent-blue-500"})]})]}),r.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:[v.toFixed(0),"%"]})]})]})},gs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UaudioUwaveform",children:e||"UaudioUwaveform Component"}),us=({data:t,width:e=200,height:a=40,color:o="#3b82f6",gap:n=2,className:s})=>{if(t.length===0)return null;const l=(e-(t.length-1)*n)/t.length;return r.jsx("svg",{width:e,height:a,className:u("inline-block",s),children:t.map((g,i)=>{const c=Math.max(2,g*a),h=i*(l+n),b=(a-c)/2;return r.jsx("rect",{x:h,y:b,width:l,height:c,fill:o,rx:l/2},i)})})},hs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UvoiceUrecorder",children:e||"UvoiceUrecorder Component"}),bs=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"PodcastPlayer",children:e||"PodcastPlayer Component"}),fs=({accept:t=["image/*","video/*","audio/*"],maxSize:e=50*1024*1024,maxFiles:a=10,multiple:o=!0,onUpload:n,onRemove:s,className:l})=>{const[g,i]=p.useState([]),[c,h]=p.useState(!1),b=p.useRef(null),k=N=>{N.preventDefault(),h(!0)},m=N=>{N.preventDefault(),h(!1)},f=N=>{N.preventDefault(),h(!1);const v=Array.from(N.dataTransfer.files);C(v)},y=N=>{if(N.target.files){const v=Array.from(N.target.files);C(v)}},C=N=>{const v=N.filter(I=>{const $=t.some(z=>{if(z.endsWith("/*")){const P=z.split("/")[0];return I.type.startsWith(P)}return I.type===z}),A=I.size<=e;return $&&A}),x=a-g.length,L=v.slice(0,x),M=L.map(I=>({id:`${Date.now()}-${Math.random()}`,file:I,preview:I.type.startsWith("image/")?URL.createObjectURL(I):void 0,status:"pending"}));i(I=>[...I,...M]),n&&n(L)},S=N=>{i(v=>v.filter(x=>x.id!==N)),s&&s(N)},w=N=>N<1024?`${N} B`:N<1024*1024?`${(N/1024).toFixed(1)} KB`:`${(N/(1024*1024)).toFixed(1)} MB`;return r.jsxs("div",{className:u("space-y-4",l),children:[r.jsxs("div",{onDragEnter:k,onDragOver:N=>N.preventDefault(),onDragLeave:m,onDrop:f,onClick:()=>b.current?.click(),className:u("border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors",c?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-700 hover:border-gray-400 dark:hover:border-gray-600"),children:[r.jsx("svg",{className:"w-12 h-12 mx-auto mb-4 text-gray-400 dark:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),r.jsx("p",{className:"text-gray-700 dark:text-gray-300 mb-2",children:"Drag and drop files here, or click to browse"}),r.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Max ",a," files, ",w(e)," each"]}),r.jsx("input",{ref:b,type:"file",multiple:o,accept:t.join(","),onChange:y,className:"hidden"})]}),g.length>0&&r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:g.map(N=>r.jsxs("div",{className:"relative aspect-square rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-800",children:[N.preview?r.jsx("img",{src:N.preview,alt:N.file.name,className:"w-full h-full object-cover"}):r.jsx("div",{className:"w-full h-full flex items-center justify-center",children:r.jsx("svg",{className:"w-12 h-12 text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm4 18H6V4h7v5h5v11z"})})}),r.jsx("button",{onClick:()=>S(N.id),className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-red-500 text-white flex items-center justify-center hover:bg-red-600 transition-colors",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),r.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-black/70 text-white text-xs p-2",children:[r.jsx("p",{className:"truncate",children:N.file.name}),r.jsx("p",{className:"text-gray-300",children:w(N.file.size)})]})]},N.id))})]})},ys=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UmediaUplaylist",children:e||"UmediaUplaylist Component"}),ps=({className:t,children:e,disabled:a})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",t),role:"region","aria-label":"PlaylistManager",children:e||"PlaylistManager Component"}),ms=({value:t,size:e=200,fgColor:a="#000000",bgColor:o="#ffffff",showDownload:n=!1,className:s})=>{const l=p.useRef(null);p.useEffect(()=>{const i=l.current;if(!i)return;const c=i.getContext("2d");if(!c)return;c.fillStyle=o,c.fillRect(0,0,e,e),c.fillStyle=a;const h=8,b=e/h,k=t.split("").reduce((f,y)=>f+y.charCodeAt(0),0);for(let f=0;f<h;f++)for(let y=0;y<h;y++)(k+f*h+y)%3!==0&&c.fillRect(y*b,f*b,b,b);const m=b*3;[[0,0],[e-m,0],[0,e-m]].forEach(([f,y])=>{c.strokeStyle=a,c.lineWidth=b,c.strokeRect(f+b/2,y+b/2,m-b,m-b)})},[t,e,a,o]);const g=()=>{const i=l.current;if(!i)return;const c=i.toDataURL("image/png"),h=document.createElement("a");h.download="qrcode.png",h.href=c,h.click()};return r.jsxs("div",{className:u("inline-flex flex-col items-center gap-3",s),children:[r.jsx("canvas",{ref:l,width:e,height:e,className:"border-2 border-gray-200 dark:border-gray-700 rounded-lg"}),n&&r.jsx("button",{onClick:g,className:u("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Download QR Code"}),r.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 max-w-[200px] text-center break-all",children:t})]})},He=({isOpen:t,onClose:e,title:a,size:o="medium",variant:n="default",overlay:s="default",showCloseButton:l=!0,closeOnOverlayClick:g=!0,closeOnEscape:i=!0,children:c,className:h,"aria-labelledby":b,"aria-describedby":k,closeAriaLabel:m="Close modal"})=>{const f=p.useRef(null),y=p.useRef(null);if(p.useEffect(()=>{if(!t||!i)return;const N=v=>{v.key==="Escape"&&e()};return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[t,i,e]),p.useEffect(()=>{if(t)return y.current=document.activeElement,f.current&&f.current.focus(),document.body.style.overflow="hidden",()=>{document.body.style.overflow="unset",y.current&&y.current.focus()}},[t]),!t)return null;const C=()=>{const N=D.overlays.modal.content(),v=D.overlays.modal[o]();return u(N,v)},S=N=>{g&&N.target===N.currentTarget&&e()},w=r.jsxs(r.Fragment,{children:[r.jsx("div",{className:D.overlays.modal.backdrop(),onClick:S}),r.jsx("div",{className:D.overlays.modal.container(),role:"dialog","aria-modal":"true","aria-labelledby":b,"aria-describedby":k,children:r.jsxs("div",{ref:f,"data-testid":"modal-content",className:u(C(),h),tabIndex:-1,onClick:N=>N.stopPropagation(),children:[a&&r.jsxs("div",{className:D.overlays.modal.header(),children:[r.jsx("h2",{id:b,className:D.overlays.modal.title(),children:a}),l&&r.jsx("button",{onClick:e,className:D.overlays.modal.closeButton(),"aria-label":m,children:r.jsx(T.XMarkIcon,{className:D.icon.variant.muted.md()})})]}),c]})})]});return ir.createPortal(w,document.body)},vs=({children:t,variant:e="default",className:a})=>r.jsx("div",{"data-testid":"modal-header",className:u(D.overlays.modal.header(),a),children:t}),qe=({children:t,variant:e="default",className:a})=>r.jsx("div",{"data-testid":"modal-body",className:u(D.overlays.modal.body(),a),children:t}),_e=({children:t,variant:e="default",className:a})=>r.jsx("div",{"data-testid":"modal-footer",className:u(D.overlays.modal.footer(),a),children:t}),xs=({isOpen:t,onClose:e,children:a,size:o="md",showCloseButton:n=!0,closeOnOutsideClick:s=!0,closeOnEscape:l=!0,className:g})=>{if(p.useEffect(()=>{if(!l||!t||!e)return;const h=b=>{b.key==="Escape"&&e()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,e,l]),!t)return null;const i={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-full mx-4"},c=()=>{s&&e&&e()};return r.jsxs(ee,{children:[r.jsx(xe,{isOpen:t,onClose:c,opacity:"dark",blur:!0}),r.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:r.jsxs("div",{className:u("relative w-full",i[o],"bg-white dark:bg-gray-900","rounded-lg shadow-xl","animate-in fade-in zoom-in-95 duration-200",g),onClick:h=>h.stopPropagation(),children:[n&&e&&r.jsx("button",{onClick:e,className:"absolute top-4 right-4 z-10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close dialog",children:r.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),a]})})]})},ks={default:T.InformationCircleIcon,warning:T.ExclamationTriangleIcon,danger:T.XCircleIcon,success:T.CheckCircleIcon,info:T.InformationCircleIcon},ws={default:()=>D.icon.variant.default.lg(),warning:()=>D.icon.variant.warning.lg(),danger:()=>D.icon.variant.error.lg(),success:()=>D.icon.variant.success.lg(),info:()=>D.icon.variant.default.lg()},Cs={default:"default",warning:"default",danger:"destructive",success:"default",info:"default"},Ns=({isOpen:t,onClose:e,onConfirm:a,title:o,message:n,confirmText:s="Confirm",cancelText:l="Cancel",loadingText:g="Processing...",variant:i="default",isLoading:c=!1})=>{const h=ks[i],b=ws[i],k=Cs[i];return r.jsxs(He,{isOpen:t,onClose:e,size:"small",variant:"web3confirmation","aria-labelledby":"confirmation-dialog-title","aria-describedby":"confirmation-dialog-description",children:[r.jsxs(qe,{variant:"padded",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[r.jsx(h,{className:b()}),r.jsx("h3",{id:"confirmation-dialog-title",className:U.heading.h4(),children:o})]}),r.jsx("p",{id:"confirmation-dialog-description",className:U.body.md(),children:n})]}),r.jsxs(_e,{children:[r.jsx(J,{variant:"outline",onClick:e,disabled:c,children:l}),r.jsx(J,{variant:k,onClick:a,disabled:c,children:c?g:s})]})]})},Ss=({isOpen:t,onClose:e,onSubmit:a,title:o,description:n,placeholder:s="",initialValue:l="",cancelText:g="Cancel",confirmText:i="Confirm",isLoading:c=!1,loadingText:h="Processing...",maxLength:b,required:k=!0,validate:m})=>{const[f,y]=p.useState(l),[C,S]=p.useState(null);p.useEffect(()=>{t&&(y(l),S(null))},[t,l]);const w=async x=>{if(x.preventDefault(),S(null),k&&!f.trim()){S("This field is required");return}if(m){const L=m(f);if(L){S(L);return}}try{await a(f.trim())}catch(L){S(L instanceof Error?L.message:"An error occurred")}},N=()=>{y(l),S(null),e()},v=k?f.trim().length>0:!0;return r.jsx(He,{isOpen:t,onClose:N,size:"small","aria-labelledby":"text-input-modal-title","aria-describedby":"text-input-modal-description",closeOnEscape:!c,closeOnOverlayClick:!c,children:r.jsxs("form",{onSubmit:w,children:[r.jsxs(qe,{variant:"padded",children:[r.jsx("h3",{id:"text-input-modal-title",className:U.heading.h4(),children:o}),r.jsx("p",{id:"text-input-modal-description",className:`${U.body.md()} mt-2 mb-4`,children:n}),r.jsx(we,{type:"text",value:f,onChange:x=>y(x.target.value),placeholder:s,maxLength:b,disabled:c,autoFocus:!0,"aria-invalid":!!C,"aria-describedby":C?"text-input-error":void 0}),C&&r.jsx("p",{id:"text-input-error",className:`${U.body.sm()} text-red-600 dark:text-red-400 mt-2`,role:"alert",children:C})]}),r.jsxs(_e,{children:[r.jsx(J,{type:"button",variant:"outline",onClick:N,disabled:c,children:g}),r.jsx(J,{type:"submit",variant:"default",disabled:!v||c,children:c?h:i})]})]})})},Es=({isOpen:t,onClose:e,children:a,side:o="right",size:n="md",showCloseButton:s=!0,title:l,footer:g,className:i})=>{if(p.useEffect(()=>{const k=m=>{m.key==="Escape"&&t&&e()};if(t)return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[t,e]),!t)return null;const c={left:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},right:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},top:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"},bottom:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"}},h={left:"left-0 top-0 h-full",right:"right-0 top-0 h-full",top:"top-0 left-0 w-full",bottom:"bottom-0 left-0 w-full"},b={left:t?"translate-x-0":"-translate-x-full",right:t?"translate-x-0":"translate-x-full",top:t?"translate-y-0":"-translate-y-full",bottom:t?"translate-y-0":"translate-y-full"};return r.jsxs(ee,{children:[r.jsx(xe,{isOpen:t,onClose:e,opacity:"medium"}),r.jsxs("div",{className:u("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","transition-transform duration-300 ease-in-out",h[o],c[o][n],b[o],i),children:[(l||s)&&r.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:[l&&r.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:l}),s&&r.jsx("button",{onClick:e,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors","aria-label":"Close drawer",children:r.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),r.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:a}),g&&r.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:g})]})]})},Ls=({isOpen:t,onClose:e,children:a,title:o,description:n,footer:s,side:l="bottom",size:g="md",showHandle:i=!0,showCloseButton:c=!0,className:h})=>{if(p.useEffect(()=>{if(!t)return;const f=y=>{y.key==="Escape"&&e()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[t,e]),!t)return null;const b={bottom:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},top:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},left:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"},right:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"}},k={bottom:"bottom-0 left-0 right-0 rounded-t-2xl",top:"top-0 left-0 right-0 rounded-b-2xl",left:"left-0 top-0 bottom-0 rounded-r-2xl",right:"right-0 top-0 bottom-0 rounded-l-2xl"},m={bottom:"animate-in slide-in-from-bottom duration-300",top:"animate-in slide-in-from-top duration-300",left:"animate-in slide-in-from-left duration-300",right:"animate-in slide-in-from-right duration-300"};return r.jsxs(ee,{children:[r.jsx(xe,{isOpen:t,onClose:e,opacity:"dark"}),r.jsxs("div",{className:u("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","flex flex-col",k[l],b[l][g],m[l],h),children:[i&&(l==="bottom"||l==="top")&&r.jsx("div",{className:u("flex items-center justify-center",l==="bottom"?"pt-3 pb-2":"pb-3 pt-2"),children:r.jsx("div",{className:"w-12 h-1.5 bg-gray-300 dark:bg-gray-700 rounded-full"})}),(o||n||c)&&r.jsx("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsxs("div",{className:"flex-1",children:[o&&r.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o}),n&&r.jsx("p",{className:"mt-1 text-sm text-gray-600 dark:text-gray-400",children:n})]}),c&&r.jsx("button",{onClick:e,className:"ml-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close sheet",children:r.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),r.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:a}),s&&r.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:s})]})]})},Is=({trigger:t,children:e,placement:a="bottom",isOpen:o,onOpenChange:n,trigger_action:s="click",showArrow:l=!0,className:g})=>{const[i,c]=p.useState(!1),h=o!==void 0?o:i,b=p.useCallback(x=>{o===void 0&&c(x),n?.(x)},[o,n]),k=p.useRef(null),m=p.useRef(null),[f,y]=p.useState({top:0,left:0});p.useEffect(()=>{if(!h||!k.current)return;const x=()=>{const L=k.current.getBoundingClientRect(),M=8;let I=0,$=0;switch(a){case"top":I=L.top-M,$=L.left+L.width/2;break;case"top-start":I=L.top-M,$=L.left;break;case"top-end":I=L.top-M,$=L.right;break;case"bottom":I=L.bottom+M,$=L.left+L.width/2;break;case"bottom-start":I=L.bottom+M,$=L.left;break;case"bottom-end":I=L.bottom+M,$=L.right;break;case"left":I=L.top+L.height/2,$=L.left-M;break;case"right":I=L.top+L.height/2,$=L.right+M;break}y({top:I,left:$})};return x(),window.addEventListener("scroll",x),window.addEventListener("resize",x),()=>{window.removeEventListener("scroll",x),window.removeEventListener("resize",x)}},[h,a]),p.useEffect(()=>{if(!h)return;const x=L=>{k.current&&!k.current.contains(L.target)&&m.current&&!m.current.contains(L.target)&&b(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[h,b]),p.useEffect(()=>{if(!h)return;const x=L=>{L.key==="Escape"&&b(!1)};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[h,b]);const C=()=>{s==="click"&&b(!h)},S=()=>{s==="hover"&&b(!0)},w=()=>{s==="hover"&&b(!1)},N={top:"origin-bottom","top-start":"origin-bottom-left","top-end":"origin-bottom-right",bottom:"origin-top","bottom-start":"origin-top-left","bottom-end":"origin-top-right",left:"origin-right",right:"origin-left"},v={top:"-translate-x-1/2 -translate-y-full","top-start":"-translate-y-full","top-end":"-translate-x-full -translate-y-full",bottom:"-translate-x-1/2","bottom-start":"","bottom-end":"-translate-x-full",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return r.jsxs("div",{className:u("relative inline-block",g),children:[r.jsx("div",{ref:k,onClick:C,onMouseEnter:S,onMouseLeave:w,className:"inline-block",children:t}),h&&r.jsxs("div",{ref:m,className:u("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",N[a],v[a]),style:{position:"fixed",top:f.top+"px",left:f.left+"px"},onMouseEnter:s==="hover"?()=>b(!0):void 0,onMouseLeave:s==="hover"?()=>b(!1):void 0,children:[e,l&&r.jsx("div",{className:u("arrow absolute w-2 h-2 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 transform rotate-45",a.startsWith("top")&&"bottom-[-5px] border-t-0 border-l-0",a.startsWith("bottom")&&"top-[-5px] border-b-0 border-r-0",a==="left"&&"right-[-5px] border-l-0 border-b-0",a==="right"&&"left-[-5px] border-r-0 border-t-0",(a==="top"||a==="bottom")&&"left-1/2 -translate-x-1/2",(a==="left"||a==="right")&&"top-1/2 -translate-y-1/2")})]})]})},Ms=({trigger:t,children:e,placement:a="bottom",openDelay:o=200,closeDelay:n=300,className:s})=>{const[l,g]=p.useState(!1),[i,c]=p.useState({top:0,left:0}),h=p.useRef(null),b=p.useRef(null),k=p.useRef(void 0),m=p.useRef(void 0);p.useEffect(()=>{if(!l||!h.current)return;const w=()=>{const N=h.current.getBoundingClientRect(),v=8;let x=0,L=0;switch(a){case"top":x=N.top-v,L=N.left+N.width/2;break;case"bottom":x=N.bottom+v,L=N.left+N.width/2;break;case"left":x=N.top+N.height/2,L=N.left-v;break;case"right":x=N.top+N.height/2,L=N.right+v;break}c({top:x,left:L})};return w(),window.addEventListener("scroll",w),window.addEventListener("resize",w),()=>{window.removeEventListener("scroll",w),window.removeEventListener("resize",w)}},[l,a]);const f=()=>{m.current&&clearTimeout(m.current),k.current=setTimeout(()=>{g(!0)},o)},y=()=>{k.current&&clearTimeout(k.current),m.current=setTimeout(()=>{g(!1)},n)},C={top:"origin-bottom",bottom:"origin-top",left:"origin-right",right:"origin-left"},S={top:"-translate-x-1/2 -translate-y-full",bottom:"-translate-x-1/2",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:h,onMouseEnter:f,onMouseLeave:y,className:"inline-block",children:t}),l&&r.jsx(ee,{children:r.jsx("div",{ref:b,className:u("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",C[a],S[a],s),style:{top:i.top+"px",left:i.left+"px"},onMouseEnter:()=>{m.current&&clearTimeout(m.current)},onMouseLeave:y,children:e})})]})},$s=({content:t,children:e,placement:a="top",delayShow:o=0,delayHide:n=0,className:s,disabled:l=!1,showArrow:g=!0,variant:i="default",trigger:c="hover",isOpen:h,onVisibilityChange:b})=>{const[k,m]=p.useState(!1),f=p.useRef(void 0),y=p.useRef(void 0),C=p.useRef(null),S=p.useRef(null),w=h!==void 0,N=w?h:k,v=p.useCallback(()=>{l||w||(y.current&&(clearTimeout(y.current),y.current=void 0),o>0?f.current=setTimeout(()=>{m(!0),b?.(!0)},o):(m(!0),b?.(!0)))},[l,w,o,b]),x=p.useCallback(()=>{w||(f.current&&(clearTimeout(f.current),f.current=void 0),n>0?y.current=setTimeout(()=>{m(!1),b?.(!1)},n):(m(!1),b?.(!1)))},[w,n,b]);p.useEffect(()=>()=>{f.current&&clearTimeout(f.current),y.current&&clearTimeout(y.current)},[]),p.useEffect(()=>{if(c!=="click"||!N)return;const W=q=>{C.current&&!C.current.contains(q.target)&&S.current&&!S.current.contains(q.target)&&x()};return document.addEventListener("mousedown",W),()=>{document.removeEventListener("mousedown",W)}},[c,N,x]);const L=()=>{c==="hover"&&v()},M=()=>{c==="hover"&&x()},I=()=>{c==="hover"&&v()},$=()=>{c==="hover"&&x()},A=()=>{c==="click"&&!w&&(N?(m(!1),b?.(!1)):(m(!0),b?.(!0)))},z={top:"bottom-full left-1/2 -translate-x-1/2 -translate-y-2",bottom:"top-full left-1/2 -translate-x-1/2 translate-y-2",left:"right-full top-1/2 -translate-x-2 -translate-y-1/2",right:"left-full top-1/2 translate-x-2 -translate-y-1/2"},P={top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent"},O={default:"bg-gray-900 dark:bg-gray-700 text-white",info:"bg-blue-600 dark:bg-blue-500 text-white",success:"bg-green-600 dark:bg-green-500 text-white",warning:"bg-yellow-600 dark:bg-yellow-500 text-white",error:"bg-red-600 dark:bg-red-500 text-white"},j={default:{top:"border-t-gray-900 dark:border-t-gray-700",bottom:"border-b-gray-900 dark:border-b-gray-700",left:"border-l-gray-900 dark:border-l-gray-700",right:"border-r-gray-900 dark:border-r-gray-700"},info:{top:"border-t-blue-600 dark:border-t-blue-500",bottom:"border-b-blue-600 dark:border-b-blue-500",left:"border-l-blue-600 dark:border-l-blue-500",right:"border-r-blue-600 dark:border-r-blue-500"},success:{top:"border-t-green-600 dark:border-t-green-500",bottom:"border-b-green-600 dark:border-b-green-500",left:"border-l-green-600 dark:border-l-green-500",right:"border-r-green-600 dark:border-r-green-500"},warning:{top:"border-t-yellow-600 dark:border-t-yellow-500",bottom:"border-b-yellow-600 dark:border-b-yellow-500",left:"border-l-yellow-600 dark:border-l-yellow-500",right:"border-r-yellow-600 dark:border-r-yellow-500"},error:{top:"border-t-red-600 dark:border-t-red-500",bottom:"border-b-red-600 dark:border-b-red-500",left:"border-l-red-600 dark:border-l-red-500",right:"border-r-red-600 dark:border-r-red-500"}};return r.jsxs("div",{ref:S,className:"relative inline-block",onMouseEnter:L,onMouseLeave:M,onFocus:I,onBlur:$,onClick:A,children:[e,N&&!l&&r.jsxs("div",{ref:C,className:u("absolute z-50 px-2 py-1 text-xs font-medium rounded shadow-lg whitespace-nowrap pointer-events-none",z[a],O[i],s),role:"tooltip",children:[t,g&&r.jsx("div",{className:u("absolute w-0 h-0 border-4 arrow",P[a],j[i][a])})]})]})},Ts=({children:t,onDrop:e,onDragOver:a,accept:o,showIndicator:n=!0,indicator:s,disabled:l=!1,className:g})=>{const[i,c]=p.useState(!1),[h,b]=p.useState(0),k=S=>{S.preventDefault(),S.stopPropagation(),!l&&(b(w=>w+1),S.dataTransfer.items&&S.dataTransfer.items.length>0&&c(!0))},m=S=>{S.preventDefault(),S.stopPropagation(),!l&&b(w=>{const N=w-1;return N===0&&c(!1),N})},f=S=>{S.preventDefault(),S.stopPropagation(),!l&&a&&a(S)},y=S=>{if(S.preventDefault(),S.stopPropagation(),l)return;if(c(!1),b(0),S.dataTransfer.files&&S.dataTransfer.files.length>0){const N=Array.from(S.dataTransfer.files);let v=N;o&&o.length>0&&(v=N.filter(x=>o.some(L=>{if(L.endsWith("/*")){const M=L.split("/")[0];return x.type.startsWith(M)}return x.type===L}))),e(v);return}const w=S.dataTransfer.getData("text/plain");if(w)try{const N=JSON.parse(w);e(N)}catch{e(w)}},C=r.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-blue-50 dark:bg-blue-900/30 border-2 border-dashed border-blue-500 dark:border-blue-400 rounded-lg z-10",children:[r.jsx("svg",{className:"w-12 h-12 text-blue-600 dark:text-blue-400 mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),r.jsx("p",{className:"text-blue-700 dark:text-blue-300 font-medium",children:"Drop here"})]});return r.jsxs("div",{onDragEnter:k,onDragLeave:m,onDragOver:f,onDrop:y,className:u("relative",l&&"opacity-50 cursor-not-allowed",g),children:[t,n&&i&&!l&&(s||C)]})},As=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UdragUdropUlist",children:e||"UdragUdropUlist Component"}),Us=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UsortableUgrid",children:e||"UsortableUgrid Component"}),Ps=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UnestedUdrag",children:e||"UnestedUdrag Component"}),zs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UgestureUdetector",children:e||"UgestureUdetector Component"}),Ds=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UswipeUactions",children:e||"UswipeUactions Component"}),js=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UpinchUzoom",children:e||"UpinchUzoom Component"}),Bs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UdoubleUtap",children:e||"UdoubleUtap Component"}),Os=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UlongUpress",children:e||"UlongUpress Component"}),Ws=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UhoverUtooltip",children:e||"UhoverUtooltip Component"}),Fs=({className:t,children:e,disabled:a=!1,onClick:o})=>r.jsx("div",{className:u("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",t),onClick:a?void 0:o,role:"region","aria-label":"UradialUmenu",children:e||"UradialUmenu Component"}),Vs=({children:t,active:e=!0,initialFocus:a,returnFocus:o=!0,className:n})=>{const s=p.useRef(null),l=p.useRef(null);return p.useEffect(()=>{if(!e)return;o&&(l.current=document.activeElement);const g=()=>{if(!s.current)return[];const b=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(s.current.querySelectorAll(b))},i=()=>{if(a){const k=s.current?.querySelector(a);if(k){k.focus();return}}const b=g();b.length>0&&b[0].focus()},c=b=>{if(b.key!=="Tab")return;const k=g();if(k.length===0){b.preventDefault();return}const m=k[0],f=k[k.length-1];b.shiftKey?document.activeElement===m&&(b.preventDefault(),f.focus()):document.activeElement===f&&(b.preventDefault(),m.focus())},h=setTimeout(i,0);return document.addEventListener("keydown",c),()=>{clearTimeout(h),document.removeEventListener("keydown",c),o&&l.current&&l.current.focus()}},[e,a,o]),e?r.jsx("div",{ref:s,className:u(n),children:t}):r.jsx(r.Fragment,{children:t})},Hs=({sections:t,activeId:e,onActiveChange:a,offset:o=80,container:n,smoothScroll:s=!0,showSubsections:l=!0,className:g})=>{const[i,c]=p.useState(""),h=p.useRef(null),b=e!==void 0?e:i;p.useEffect(()=>{const f=n?document.querySelector(n):window;if(!f)return;const y=w=>w.flatMap(N=>[N.id,...N.subsections?y(N.subsections):[]]),S=y(t).map(w=>document.getElementById(w)).filter(Boolean);if(S.length!==0)return h.current=new IntersectionObserver(w=>{w.forEach(N=>{if(N.isIntersecting){const v=N.target.id;e!==void 0&&a?a(v):c(v)}})},{root:n?f:null,rootMargin:`-${o}px 0px -50% 0px`,threshold:0}),S.forEach(w=>{h.current?.observe(w)}),()=>{h.current?.disconnect()}},[t,n,o,e,a]);const k=f=>{const y=document.getElementById(f);if(!y)return;const C=n?document.querySelector(n):window;if(!C)return;const w=y.offsetTop-o;s?C===window?window.scrollTo({top:w,behavior:"smooth"}):C.scrollTo({top:w,behavior:"smooth"}):C===window?window.scrollTo(0,w):C.scrollTop=w},m=(f,y=0)=>{const C=b===f.id,S=f.subsections?.some(w=>b===w.id)||!1;return r.jsxs("div",{children:[r.jsx("button",{onClick:()=>k(f.id),className:u("w-full text-left px-3 py-1.5 text-sm rounded-md transition-colors",y===0?"font-medium":"pl-6 text-sm",C?"text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/30":S?"text-gray-700 dark:text-gray-300":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800"),style:{paddingLeft:`${y*.75+.75}rem`},children:f.label}),l&&f.subsections&&f.subsections.length>0&&r.jsx("div",{className:"ml-2 border-l-2 border-gray-200 dark:border-gray-700",children:f.subsections.map(w=>m(w,y+1))})]},f.id)};return r.jsx("nav",{className:u("space-y-1",g),children:t.map(f=>m(f,0))})},qs=({children:t,onRefresh:e,disabled:a=!1,refreshingText:o="Refreshing...",pullDownText:n="Pull down to refresh",releaseText:s="Release to refresh",threshold:l=80,maxPullDistance:g=120,className:i=""})=>{const[c,h]=p.useState(0),[b,k]=p.useState(!1),[m,f]=p.useState(!1),y=p.useRef(0),C=p.useRef(null);p.useEffect(()=>{const x=C.current;if(!x)return;const L=$=>{if(a||b)return;x.scrollTop<=0&&(y.current=$.touches[0].clientY,f(!0))},M=$=>{if(!m)return;const z=$.touches[0].clientY-y.current;if(z>0&&x.scrollTop<=0){const P=Math.min(z/g,1),O=Math.min(z*(1-P*.5),g);h(O),z>10&&$.preventDefault()}},I=async()=>{if(m)if(f(!1),c>=l&&!b){k(!0);try{await e()}catch{}finally{k(!1),h(0)}}else h(0)};return x.addEventListener("touchstart",L,{passive:!0}),x.addEventListener("touchmove",M,{passive:!1}),x.addEventListener("touchend",I),()=>{x.removeEventListener("touchstart",L),x.removeEventListener("touchmove",M),x.removeEventListener("touchend",I)}},[a,b,m,c,l,g,e]);const S=Math.min(c/l,1),w=m||b,N=m?c:b?l:0,v=()=>b?o:c>=l?s:n;return r.jsxs("div",{ref:C,className:`relative ${i}`,style:{height:"100%",overflowY:"auto",WebkitOverflowScrolling:"touch"},children:[r.jsx("div",{className:"sticky top-0 left-0 right-0 flex items-center justify-center bg-gradient-to-b from-blue-50/90 to-transparent dark:from-blue-900/20 dark:to-transparent backdrop-blur-sm z-10 transition-all duration-300 ease-out",style:{height:`${N}px`,marginTop:m?0:`-${N}px`,opacity:w?1:0,pointerEvents:"none"},children:r.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[r.jsx(T.ArrowPathIcon,{className:`w-6 h-6 text-blue-600 dark:text-blue-400 transition-transform duration-200 ${b?"animate-spin":""}`,style:{transform:`rotate(${S*360}deg)`}}),c>20&&r.jsx("span",{className:"text-xs font-medium text-blue-600 dark:text-blue-400",children:v()})]})}),r.jsx("div",{style:{paddingTop:m?`${c}px`:0,transition:m?"none":"padding-top 200ms ease-out"},children:t})]})},_s=({children:t,onLoadMore:e,loading:a=!1,hasMore:o=!0,threshold:n=100,loader:s,endMessage:l,height:g,scrollDirection:i="vertical",reverse:c=!1,className:h})=>{const b=p.useRef(null),[k,m]=p.useState(!1);p.useEffect(()=>{const S=b.current;if(!S||a||!o)return;const w=()=>{const{scrollTop:N,scrollHeight:v,clientHeight:x,scrollLeft:L,scrollWidth:M,clientWidth:I}=S;i==="vertical"&&m(N>300);let $;i==="vertical"?c?$=N:$=v-N-x:c?$=L:$=M-L-I,$<n&&e()};return S.addEventListener("scroll",w),()=>S.removeEventListener("scroll",w)},[a,o,n,e,i,c]);const f=()=>{b.current?.scrollTo({top:0,behavior:"smooth"})},y=r.jsxs("div",{className:"flex justify-center items-center py-4",children:[r.jsx("div",{className:"w-6 h-6 border-2 border-blue-600 dark:border-blue-400 border-t-transparent rounded-full animate-spin"}),r.jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"Loading..."})]}),C=r.jsx("div",{className:"flex justify-center items-center py-4",children:r.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"No more items to load"})});return r.jsxs("div",{className:u("relative",h),children:[r.jsxs("div",{ref:b,className:u(i==="vertical"?"overflow-y-auto":"overflow-x-auto","overflow-auto"),style:{height:i==="vertical"?g:void 0,width:i==="horizontal"?"100%":void 0,display:i==="horizontal"?"flex":void 0,flexDirection:c&&i==="vertical"?"column-reverse":void 0},children:[c&&a&&(s||y),c&&!a&&!o&&l,r.jsx("div",{className:u(i==="horizontal"&&"flex",i==="horizontal"&&c&&"flex-row-reverse"),children:t}),!c&&a&&(s||y),!c&&!a&&!o&&(l||C)]}),i==="vertical"&&!c&&k&&r.jsx("button",{onClick:f,className:u("absolute bottom-4 right-4","p-3 rounded-full","bg-blue-600 dark:bg-blue-500","text-white","shadow-lg","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"),"aria-label":"Scroll to top",children:r.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 10l7-7m0 0l7 7m-7-7v18"})})})]})},Y={twitter:(t,e,a)=>{const o=a.length>0?`&hashtags=${a.join(",")}`:"";return`https://twitter.com/intent/tweet?url=${encodeURIComponent(t)}&text=${encodeURIComponent(e)}${o}`},facebook:t=>`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(t)}`,linkedin:(t,e,a)=>`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(t)}`,reddit:(t,e)=>`https://reddit.com/submit?url=${encodeURIComponent(t)}&title=${encodeURIComponent(e)}`,telegram:(t,e)=>`https://t.me/share/url?url=${encodeURIComponent(t)}&text=${encodeURIComponent(e)}`,whatsapp:(t,e)=>`https://wa.me/?text=${encodeURIComponent(e+" "+t)}`,email:(t,e,a)=>`mailto:?subject=${encodeURIComponent(e)}&body=${encodeURIComponent(a+`
|
|
36
31
|
|
|
37
32
|
`+t)}`,discord:(t,e)=>`https://discord.com/channels/@me?message=${encodeURIComponent(e+`
|
|
38
|
-
`+t)}`,messages:(t,e)=>`sms:?&body=${encodeURIComponent(e+" "+t)}`},dl=({shareConfig:t})=>{const[e,a]=y.useState(!1),[o,n]=y.useState(""),[s,l]=y.useState(!1),[g,c]=y.useState(!1),[i,h]=y.useState(!1);y.useEffect(()=>{const k=t.onBeforeShare;k&&!o&&(async()=>{l(!0);try{const v=typeof window<"u"?window.location.href:"",w=await k(v);n(w)}catch{const v=typeof window<"u"?window.location.href:"";n(v)}finally{l(!1)}})()},[t,o]);const b=o||(typeof window<"u"?window.location.href:""),x=typeof navigator<"u"&&navigator.share!==void 0,m=async()=>{if(!(!x||i)){h(!0);try{await navigator.share({title:t.title,text:t.description,url:b}),a(!1)}catch(k){k instanceof Error&&k.name!=="AbortError"&&(console.error("Share failed:",k),k.name!=="InvalidStateError"&&a(!0))}finally{h(!1)}}},f=async()=>{try{await navigator.clipboard.writeText(b),c(!0),setTimeout(()=>{c(!1),a(!1)},1500)}catch{}},p=()=>{a(!e)},C=k=>{window.open(k,"_blank","noopener,noreferrer,width=600,height=400"),a(!1)},S=[{name:"Twitter",url:Y.twitter(b,t.title,t.hashtags),color:"text-blue-400",svg:r.jsx("path",{d:"M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84"})},{name:"Facebook",url:Y.facebook(b),color:"text-blue-600",svg:r.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})},{name:"LinkedIn",url:Y.linkedin(b,t.title,t.description),color:"text-blue-700",svg:r.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})},{name:"Reddit",url:Y.reddit(b,t.title),color:"text-orange-600",svg:r.jsx("path",{d:"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"})},{name:"Telegram",url:Y.telegram(b,t.title),color:"text-blue-500",svg:r.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})},{name:"WhatsApp",url:Y.whatsapp(b,t.title),color:"text-green-600",svg:r.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"})},{name:"Discord",url:Y.discord(b,t.title),color:"text-indigo-500",svg:r.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})},{name:"Messages",url:Y.messages(b,t.title),color:"text-green-500",svg:r.jsx("path",{d:"M.05 3.555A3 3 0 013 0h18a3 3 0 012.95 3.555L22 11v8a3 3 0 01-3 3H5a3 3 0 01-3-3v-8l-1.95-7.445zM2 10.938V19a1 1 0 001 1h18a1 1 0 001-1v-8.062L20 19H4l-2-8.062zM3.38 2L5 8h14l1.62-6H3.38z"})},{name:"Email",url:Y.email(b,t.title,t.description),color:"text-gray-600",svg:r.jsx("path",{d:"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"})}];return r.jsxs("div",{className:"relative",children:[r.jsx("button",{onClick:p,disabled:s||i,className:"flex items-center justify-center w-8 h-8 bg-blue-50 hover:bg-blue-100 dark:bg-blue-900/30 dark:hover:bg-blue-900/50 text-blue-600 dark:text-blue-400 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Share this page",children:s||i?r.jsx("div",{className:"w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"}):r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"})})}),e&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-[999998]",onClick:()=>a(!1)}),r.jsxs("div",{className:"absolute right-0 top-10 z-[999999] w-40 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 py-1",children:[S.map(k=>r.jsxs("button",{onClick:()=>C(k.url),className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[r.jsx("svg",{className:`w-4 h-4 mr-2 ${k.color}`,fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:k.svg}),r.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:k.name})]},k.name)),r.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),x&&r.jsxs("button",{onClick:()=>{a(!1),m()},disabled:i,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors disabled:opacity-50",children:[r.jsx("svg",{className:"w-4 h-4 mr-2 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"})}),r.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"More..."})]}),r.jsxs("button",{onClick:f,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[r.jsx("svg",{className:"w-4 h-4 mr-2 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})}),r.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:g?"Copied!":"Copy Link"})]})]})]})]})},Dr=({items:t,shareConfig:e,className:a,showHome:o})=>r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("nav",{"aria-label":"Breadcrumb",children:r.jsx("ol",{className:"flex items-center text-sm space-x-2",children:t.map((n,s)=>r.jsxs(y.Fragment,{children:[r.jsx("li",{children:n.current?r.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:n.label}):r.jsx(Ue.Link,{to:n.href||"#",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors",children:n.label})}),s<t.length-1&&r.jsx("li",{children:r.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"/"})})]},s))})}),e&&r.jsx(dl,{shareConfig:e})]}),cl=({items:t,shareConfig:e})=>r.jsx("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 relative z-50",children:r.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3 relative",children:r.jsx(Dr,{items:t,shareConfig:e})})}),jr=t=>{const[e,a]=y.useState(""),[o,n]=y.useState(!0),[s,l]=y.useState(null);return y.useEffect(()=>{t&&(async()=>{try{n(!0),l(null);const c=await fetch(`/code/${t}`);if(!c.ok)throw new Error(`Failed to load code file: ${t}`);const i=await c.text();a(i)}catch(c){l(c instanceof Error?c.message:"Unknown error"),a("// Error loading code file")}finally{n(!1)}})()},[t]),{code:e,loading:o,error:s}},gl=({filename:t,code:e,language:a,title:o,className:n="",showCopy:s=!0,showHeader:l=!0})=>{const{t:g}=ur.useTranslation("codeBlock"),{code:c,loading:i,error:h}=jr(t||""),[b,x]=y.useState(!1),m=e||c,p=a||(t?(S=>{switch(S.split(".").pop()?.toLowerCase()){case"sol":return"solidity";case"js":case"mjs":return"javascript";case"ts":return"typescript";case"sh":return"bash";case"graphql":return"graphql";case"json":return"json";case"css":return"css";case"html":return"html";case"jsx":return"jsx";case"tsx":return"tsx";case"py":return"python";case"java":return"java";case"cpp":case"c":return"cpp";case"go":return"go";case"rs":return"rust";case"php":return"php";case"rb":return"ruby";default:return"text"}})(t):"text"),C=async()=>{if(m)try{await navigator.clipboard.writeText(m),x(!0),setTimeout(()=>x(!1),2e3)}catch{}};return t&&i?r.jsx("div",{className:`bg-gray-900 text-green-400 rounded-lg p-4 font-mono text-sm ${n}`,children:r.jsx("div",{className:"animate-pulse text-gray-500",children:g("loadingCode","Loading code...")})}):t&&h?r.jsxs("div",{className:`bg-gray-900 text-red-400 rounded-lg p-4 font-mono text-sm ${n}`,children:[g("error","Error"),": ",h]}):m?r.jsxs("div",{className:`bg-gray-900 rounded-lg border border-green-500/20 shadow-lg shadow-green-500/10 ${n}`,children:[l&&r.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-green-500/20 bg-gray-800/50",children:[r.jsx("span",{className:"text-sm text-green-400 font-mono",children:o||t||`${p} code`}),s&&r.jsx("button",{onClick:C,className:"p-2 text-gray-400 hover:text-green-400 hover:bg-gray-800 rounded-lg transition-all duration-200 group",title:g("copyCode","Copy code"),children:b?r.jsx(U.CheckIcon,{className:"h-4 w-4 text-green-400"}):r.jsx(U.ClipboardDocumentIcon,{className:"h-4 w-4 group-hover:scale-110 transition-transform"})})]}),r.jsx("div",{className:"p-4 overflow-x-auto text-left",children:r.jsx("pre",{className:`text-sm language-${p}`,children:r.jsx("code",{className:"text-gray-100",children:m})})})]}):r.jsx("div",{className:`bg-gray-900 text-gray-400 rounded-lg p-4 font-mono text-sm ${n}`,children:g("noCode","No code to display")})},ul=({subsections:t,isExpanded:e,selectedSubsection:a,parentSectionId:o,onSubsectionSelect:n})=>{const s=y.useRef(null),[l,g]=y.useState(void 0);return y.useLayoutEffect(()=>{if(s.current){const c=s.current.scrollHeight;g(e?c+16:0)}},[e,t]),r.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:l!==void 0?`${l}px`:"auto"},children:r.jsx("div",{ref:s,className:"ml-6 mt-1 mb-1 space-y-1",children:t.map(c=>r.jsxs("div",{className:"relative group",children:[a===c.id&&r.jsx("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"}),a!==c.id&&r.jsx("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"}),r.jsx("button",{onClick:()=>n?.(c.id,o),className:`relative z-10 block w-full text-left pl-4 pr-3 py-2 rounded-md text-sm transition-all duration-200 ${a===c.id?"text-blue-700 dark:text-blue-300":"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"}`,children:c.title})]},c.id))})})},hl=({id:t,title:e,content:a,subsections:o,isSelected:n=!1,selectedSubsection:s=null,onSectionSelect:l,onSubsectionSelect:g,className:c=""})=>{const[i,h]=y.useState(!1),b=()=>{h(!i)},x=()=>{l?.(t)},m=o&&o.length>0;return r.jsxs("div",{className:c,children:[r.jsxs("div",{className:"relative flex items-center group",children:[n&&!s&&r.jsx("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"}),!(n&&!s)&&r.jsx("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"}),r.jsx("button",{onClick:x,className:`relative z-10 flex-1 text-left pl-5 pr-3 py-4 text-base font-medium transition-all duration-200 ${n&&!s?"text-blue-700 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100"}`,children:e}),m&&r.jsx("button",{onClick:b,className:"p-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200","aria-label":i?"Collapse section":"Expand section",children:r.jsx(U.ChevronRightIcon,{className:`h-5 w-5 text-gray-500 transition-transform duration-300 ease-in-out ${i?"rotate-90":"rotate-0"}`})})]}),m&&r.jsx(ul,{subsections:o,isExpanded:i,selectedSubsection:s,parentSectionId:t,onSubsectionSelect:g})]})},bl=({title:t,subtitle:e,buttonText:a,buttonIcon:o="envelope",variant:n="default",badgeText:s="FREE",prominentBadgeText:l="100% Free",onButtonClick:g,className:c=""})=>{const i=()=>o==="envelope"||o==="both"?r.jsx(U.EnvelopeIcon,{className:n==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1"}):o==="none"?null:r.jsx("svg",{className:n==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"})}),h=()=>o==="arrow"||o==="both"?r.jsx(U.ArrowRightIcon,{className:"h-4 w-4 ml-2"}):null,b=()=>n==="prominent"?"border-b-2 border-green-200 dark:border-green-700":"border-b border-green-200 dark:border-green-700",x=()=>{const p="bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 text-white rounded-lg font-bold transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-green-500/25 inline-flex items-center whitespace-nowrap cursor-pointer";return n==="prominent"?`${p} px-8 py-3 text-base`:`${p} px-6 py-2 text-sm`},m=()=>n==="prominent"?"text-green-800 dark:text-green-200 font-semibold text-lg":"text-green-800 dark:text-green-200 font-semibold",f=n==="prominent"?l:s;return r.jsx("div",{className:`bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 ${b()} ${c}`,children:r.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:r.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4",children:[r.jsxs("div",{className:`flex items-center ${n==="prominent"?"text-center sm:text-left":""}`,children:[r.jsx("div",{className:"bg-green-500 text-white text-xs font-bold px-3 py-1 rounded-full mr-3 animate-pulse",children:f}),r.jsxs("div",{children:[r.jsx("span",{className:m(),children:t}),e&&r.jsx("span",{className:"text-green-700 dark:text-green-300 text-sm block",children:e})]})]}),r.jsxs("button",{onClick:g,className:x(),children:[i(),a,h()]})]})})})},fl=({children:t,onClick:e,variant:a,size:o,disabled:n,className:s,type:l,trackingLabel:g,actionType:c,componentName:i,onTrack:h,trackingParams:b={},...x})=>{const m=f=>{if(h){const p=g||(typeof t=="string"?t:"")||"Unknown Button",S=a&&["default","primary","secondary","outline","ghost","destructive","link"].includes(a)?a:"default";h({button_text:p,button_type:S,component_name:i,action_type:c,...b})}e&&e(f)};return r.jsx(J,{...x,variant:a,size:o,disabled:n,className:s,type:l,onClick:m,children:t})},Br={en:{name:"English",flag:"🇺🇸"},ar:{name:"العربية",flag:"🇸🇦"},de:{name:"Deutsch",flag:"🇩🇪"},es:{name:"Español",flag:"🇪🇸"},fr:{name:"Français",flag:"🇫🇷"},it:{name:"Italiano",flag:"🇮🇹"},ja:{name:"日本語",flag:"🇯🇵"},ko:{name:"한국어",flag:"🇰🇷"},pt:{name:"Português",flag:"🇵🇹"},ru:{name:"Русский",flag:"🇷🇺"},sv:{name:"Svenska",flag:"🇸🇪"},th:{name:"ไทย",flag:"🇹🇭"},uk:{name:"Українська",flag:"🇺🇦"},vi:{name:"Tiếng Việt",flag:"🇻🇳"},zh:{name:"简体中文",flag:"🇨🇳"}},pl=({variant:t="compact",className:e=""})=>{const{i18n:a,t:o}=ur.useTranslation("languageSelector"),[n,s]=y.useState(a.language),l=y.useMemo(()=>a.options.supportedLngs?a.options.supportedLngs.filter(i=>i!=="cimode").map(i=>({code:i,name:Br[i]?.name||i.toUpperCase(),flag:Br[i]?.flag||"🌐"})).sort((i,h)=>i.name.localeCompare(h.name)):[],[a.options.supportedLngs]),g=l.find(i=>i.code===n||i.code.toLowerCase()===n.toLowerCase());y.useEffect(()=>{s(a.language)},[a.language]);const c=i=>{localStorage.setItem("language",i),a.changeLanguage(i).then(()=>{s(a.language),setTimeout(()=>{window.dispatchEvent(new Event("languagechange"))},100)}).catch(()=>{})};return t==="compact"?r.jsx("div",{className:`relative ${e}`,children:r.jsxs(Tr,{value:n,onValueChange:c,children:[r.jsx(Fe,{className:"h-10 w-auto px-3 border-0 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-0 focus:ring-offset-0",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:"text-lg leading-none",children:g?.flag}),r.jsx("span",{className:"hidden sm:block text-sm font-medium text-gray-700 dark:text-gray-300",children:g?.name})]})}),r.jsx(Ve,{children:l.map(i=>r.jsx(He,{value:i.code,className:"cursor-pointer",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:"text-lg leading-none",children:i.flag}),r.jsx("span",{className:"text-sm",children:i.name})]})},i.code))})]})}):r.jsxs("div",{className:`space-y-2 ${e}`,children:[r.jsxs("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 flex items-center space-x-2",children:[r.jsx(U.LanguageIcon,{className:"h-4 w-4 text-gray-500 dark:text-gray-400"}),r.jsx("span",{children:o("language","Language")})]}),r.jsxs(Tr,{value:n,onValueChange:c,children:[r.jsx(Fe,{children:r.jsx(kn,{placeholder:o("selectLanguage","Select language")})}),r.jsx(Ve,{children:l.map(i=>r.jsx(He,{value:i.code,className:"cursor-pointer",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:"text-lg leading-none",children:i.flag}),r.jsx("span",{children:i.name})]})},i.code))})]}),r.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:o("selectPreferredLanguage","Select your preferred language")})]})},yl=({items:t,type:e="ordered",variant:a="default",className:o,itemClassName:n})=>{const s=()=>{const i="space-y-2",h={ordered:e==="ordered"?"list-decimal":"",unordered:e==="unordered"?"list-disc":""},b={default:"list-inside",enhanced:"list-inside space-y-3",minimal:"list-none space-y-1"};return u(i,h[e],b[a])},l=i=>{const h="text-gray-600 dark:text-gray-400";return a==="enhanced"?u(h,"relative pl-8 pb-2 border-l-2 border-gray-200 dark:border-gray-700",i===t.length-1&&"border-l-transparent"):a==="minimal"?u(h,"flex items-start"):h},g=i=>a==="enhanced"&&e==="ordered"?r.jsx("div",{className:"absolute -left-4 -top-1 w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-medium",children:i+1}):null,c=(i,h)=>{const b=typeof i=="object",x=b?i.content:i,m=b?i.subItems:void 0;return r.jsxs("li",{className:u(l(h),n),children:[g(h),a==="minimal"&&e==="ordered"&&r.jsx("span",{className:"inline-block w-6 h-6 bg-blue-100 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 rounded-full text-sm font-medium text-center leading-6 mr-3 flex-shrink-0",children:h+1}),a==="minimal"&&e==="unordered"&&r.jsx("span",{className:"inline-block w-2 h-2 bg-blue-600 rounded-full mt-2 mr-3 flex-shrink-0"}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{children:x}),m&&m.length>0&&r.jsx("ul",{className:"mt-2 ml-4 space-y-1 list-disc list-inside text-sm text-gray-500 dark:text-gray-500",children:m.map((f,p)=>r.jsx("li",{children:f},p))})]})]},h)};return r.jsx("ul",{className:u(s(),o),children:t.map(c)})};class ml extends y.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,a){console.error("ErrorBoundary caught an error:",e,a),this.props.onError?.(e,a)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:r.jsxs("div",{style:{padding:"20px",border:"1px solid red",margin:"10px"},children:[r.jsx("h2",{children:"Something went wrong"}),r.jsxs("p",{children:["Error: ",this.state.error?.message||"Unknown error"]}),r.jsx("button",{onClick:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}}class vl extends y.Component{constructor(e){super(e),this.retryTimer=null,this.sendErrorToMonitoring=(a,o)=>{try{typeof window<"u"&&window.Sentry&&window.Sentry?.captureException(a,{contexts:{react:{componentStack:o.componentStack}},tags:{errorBoundary:!0,componentName:this.props.componentName||"unknown",lazyLoading:!0}}),typeof window<"u"&&window.gtag&&window.gtag?.("event","exception",{description:a.message,fatal:!1,custom_map:{component:this.props.componentName||"unknown"}})}catch{}},this.handleRetry=()=>{const{maxRetries:a=3,retryDelay:o=1e3}=this.props,{retryCount:n}=this.state;if(n>=a)return;this.setState({isRetrying:!0}),this.retryTimer&&clearTimeout(this.retryTimer);const s=o*Math.pow(2,n);this.retryTimer=setTimeout(()=>{this.setState({hasError:!1,error:null,errorInfo:null,retryCount:n+1,isRetrying:!1})},s)},this.handleReload=()=>{window.location.reload()},this.state={hasError:!1,error:null,errorInfo:null,retryCount:0,isRetrying:!1,lastErrorTime:0}}static getDerivedStateFromError(e){return{hasError:!0,error:e,lastErrorTime:Date.now()}}componentDidCatch(e,a){const{onError:o,componentName:n}=this.props;this.setState({error:e,errorInfo:a}),console.error(`LazyErrorBoundary caught an error in ${n||"Unknown Component"}:`,e,a),o?.(e,a),this.sendErrorToMonitoring(e,a)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){const{children:e,fallback:a,componentName:o,showRetryButton:n=!0,maxRetries:s=3}=this.props,{hasError:l,error:g,isRetrying:c,retryCount:i}=this.state;return l&&g?a||r.jsx("div",{className:"lazy-error-boundary error-boundary-container",children:r.jsxs("div",{className:"error-content",children:[r.jsx("div",{className:"error-icon",children:"⚠️"}),r.jsxs("h3",{className:"error-title",children:["Something went wrong loading ",o||"this component"]}),r.jsxs("div",{className:"error-details",children:[r.jsx("p",{className:"error-message",children:g.message}),process.env.NODE_ENV==="development"&&r.jsxs("details",{className:"error-stack",children:[r.jsx("summary",{children:"Error Details (Development)"}),r.jsx("pre",{children:g.stack})]})]}),r.jsxs("div",{className:"error-actions",children:[n&&i<s&&r.jsx("button",{onClick:this.handleRetry,disabled:c,className:"retry-button",children:c?"Retrying...":`Retry (${i}/${s})`}),i>=s&&r.jsx("button",{onClick:this.handleReload,className:"reload-button",children:"Reload Page"})]}),r.jsxs("div",{className:"error-help",children:[r.jsx("p",{children:"This might be a temporary issue. Try refreshing the page."}),navigator.onLine===!1&&r.jsx("p",{className:"offline-notice",children:"You appear to be offline. Check your connection and try again."})]})]})}):e}}const xl=({children:t})=>r.jsx(r.Fragment,{children:t}),kl=({children:t})=>r.jsx(r.Fragment,{children:t}),wl=(t,e,a)=>{const o=y.memo(t,e);return a&&(o.displayName=`Memo(${a})`),process.env.NODE_ENV==="development"?n=>(y.useMemo(()=>{let l=0;return()=>++l},[])(),r.jsx(o,{...n})):o},Cl=(t,e)=>y.memo(t,(a,o)=>e.every(n=>a[n]===o[n])),Nl=y.memo(({children:t,compute:e,deps:a})=>{const o=y.useRef(a),n=y.useRef(e),s=y.useRef(void 0),l=y.useMemo(()=>{const g=a.length!==o.current.length||a.some((i,h)=>i!==o.current[h]),c=e!==n.current;if(g||c||s.current===void 0){let i;return process.env.NODE_ENV==="development"?(performance.now(),i=e(),performance.now()):i=e(),o.current=a,n.current=e,s.current=i,i}return s.current},[e,a]);return r.jsx(r.Fragment,{children:t(l)})}),Sl=y.memo(({item:t,index:e,style:a,renderItem:o})=>r.jsx("div",{style:a,children:o(t,e)}),(t,e)=>t.index===e.index&&t.item===e.item&&t.style.height===e.style.height&&t.style.top===e.style.top),El=y.memo(({condition:t,children:e,fallback:a=null})=>t?r.jsx(r.Fragment,{children:e}):r.jsx(r.Fragment,{children:a})),Ll=({children:t,threshold:e=.1,rootMargin:a="50px",fallback:o=null})=>{const[n,s]=y.useState(!1),l=y.useRef(null);return y.useEffect(()=>{const g=new IntersectionObserver(([c])=>{c.isIntersecting&&(s(!0),g.disconnect())},{threshold:e,rootMargin:a});return l.current&&g.observe(l.current),()=>g.disconnect()},[e,a]),r.jsx("div",{ref:l,children:n?t:o})},Il=({children:t,maxRenderTime:e=16,onSlowRender:a})=>{const o=y.useRef(0);return y.useLayoutEffect(()=>{o.current=performance.now()}),y.useEffect(()=>{const n=performance.now()-o.current;n>e&&a?.(n)}),r.jsx(r.Fragment,{children:t})},Ml=({children:t,batchSize:e=5,delay:a=0})=>{const[o,n]=y.useState(e);return y.useEffect(()=>{if(o<t.length){const s=setTimeout(()=>{n(l=>Math.min(l+e,t.length))},a);return()=>clearTimeout(s)}},[o,t.length,e,a]),r.jsx(r.Fragment,{children:t.slice(0,o)})},$l=({src:t,alt:e,placeholder:a,lowQualitySrc:o,aspectRatio:n="16/9",eager:s=!1,className:l="",...g})=>{const[c,i]=y.useState(!1),[h,b]=y.useState(s),[x,m]=y.useState(!1),f=y.useRef(null),p=y.useRef(null);y.useEffect(()=>{if(s){b(!0);return}return p.current=new IntersectionObserver(k=>{k.forEach(N=>{N.isIntersecting&&(b(!0),p.current&&f.current&&p.current.unobserve(f.current))})},{rootMargin:"50px",threshold:.01}),f.current&&p.current.observe(f.current),()=>{p.current&&p.current.disconnect()}},[s]);const C=()=>{i(!0)},S=()=>{m(!0)};return r.jsxs("div",{className:`relative overflow-hidden ${l}`,style:{aspectRatio:n},children:[o&&!c&&r.jsx("img",{src:o,alt:"",className:"absolute inset-0 w-full h-full object-cover blur-sm","aria-hidden":"true"}),!o&&!c&&r.jsx("div",{className:"absolute inset-0 bg-gray-200 dark:bg-gray-700 animate-pulse","aria-hidden":"true"}),h&&!x&&r.jsx("img",{ref:f,src:t,alt:e,onLoad:C,onError:S,className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-500 ${c?"opacity-100":"opacity-0"}`,loading:s?"eager":"lazy",...g}),x&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-800",children:r.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[r.jsx("svg",{className:"mx-auto h-12 w-12 mb-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),r.jsx("p",{className:"text-sm",children:"Failed to load image"})]})})]})},Ul=({children:t,backgroundClassName:e="",contentClassName:a=""})=>r.jsx("div",{className:e,children:r.jsx("div",{className:a,children:t})}),Tl=({title:t,description:e})=>r.jsxs("div",{className:"mb-8",children:[r.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:t}),e&&r.jsx("p",{className:"mt-2 text-gray-600 dark:text-gray-400",children:e})]}),Al=({isSelected:t,onClick:e,icon:a,label:o,description:n,className:s=""})=>r.jsxs("div",{onClick:e,className:`relative flex items-start p-4 cursor-pointer transition-all border-b border-gray-200 dark:border-gray-700 last:border-b-0 group ${s}`,children:[t&&r.jsx("div",{className:"absolute inset-1 bg-blue-500/10 dark:bg-blue-400/10 rounded-lg pointer-events-none"}),r.jsxs("div",{className:"relative z-10 flex items-start w-full",children:[a&&r.jsx(a,{className:`h-5 w-5 mt-0.5 mr-3 flex-shrink-0 transition-colors ${t?"text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 group-hover:text-gray-700 dark:group-hover:text-gray-300"}`}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:`font-medium transition-colors ${t?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-gray-100 group-hover:text-gray-700 dark:group-hover:text-gray-300"}`,children:o}),n&&r.jsx("div",{className:`text-xs mt-0.5 transition-colors ${t?"text-blue-500 dark:text-blue-300":"text-gray-500 dark:text-gray-400"}`,children:n})]})]})]}),Pl=({masterTitle:t,masterSubtitle:e,backButtonText:a,masterContent:o,detailContent:n,detailTitle:s,mobileView:l="navigation",onBackToNavigation:g,masterClassName:c="",detailClassName:i="",detailTitleClassName:h="",masterWidth:b=320,stickyMaster:x=!0,stickyTopOffset:m=96,desktopGap:f=32,showMasterBackground:p=!0,enableAnimations:C=!0,animationDuration:S=300,animationRef:k})=>{const N=`gap-${Math.round(f/4)}`||"gap-8",v=F=>F?F.split("-")[0].trim():"Back",w=a?v(a):t?v(t):"Back",[L,M]=y.useState(!1),[I,$]=y.useState("auto"),A=y.useRef(null),z=y.useRef(null);y.useEffect(()=>(k&&(k.current={triggerTransition:F=>{if(!C){F();return}if(A.current){const q=A.current.scrollHeight;$(q)}M(!0),z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{F(),setTimeout(()=>{if(A.current){const q=A.current.scrollHeight;$(q),setTimeout(()=>{$("auto"),M(!1)},S)}},50)},S/2)}}),()=>{z.current&&clearTimeout(z.current)}),[C,S,k]);const P=C?{height:I==="auto"?"auto":`${I}px`,transition:`height ${S}ms cubic-bezier(0.4, 0, 0.2, 1)`,width:"100%",maxWidth:"100%"}:{width:"100%",maxWidth:"100%"},W=C?`${L?"opacity-0 transform translate-y-2":"opacity-100 transform translate-y-0"}`:"",j=C?{transition:`opacity ${S}ms ease-in-out, transform ${S}ms ease-in-out`}:{};return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:`md:hidden ${l==="navigation"?"block":"hidden"} flex-1`,children:r.jsxs("div",{className:p?"bg-white dark:bg-gray-800 p-6":"p-6",children:[t&&r.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[r.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:t}),e&&r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:e})]}),r.jsx("div",{className:c,children:o})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[r.jsxs("div",{className:`md:hidden ${l==="content"?"block":"hidden"}`,children:[l==="content"&&g&&r.jsxs("button",{onClick:g,className:"mb-4 px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:["← ",w]}),r.jsx("div",{ref:A,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${i}`,style:P,children:r.jsxs("div",{className:W,style:j,children:[s&&r.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${h}`,children:s}),n]})})]}),r.jsxs("div",{className:`hidden md:flex min-h-full ${N}`,style:{width:"100%"},children:[r.jsx("aside",{className:"flex-shrink-0",style:{width:`${b}px`,minWidth:`${b}px`},children:r.jsxs("div",{className:x?"sticky":"",style:x?{top:`${m}px`}:void 0,children:[t&&r.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:t}),e&&r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:e}),r.jsx("div",{className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 ${x?"max-h-[calc(100vh-200px)] overflow-y-auto":""} ${c}`,children:o})]})}),r.jsx("div",{className:"flex-1 min-w-0",style:{width:`calc(100% - ${b+f}px)`},children:r.jsx("div",{ref:A,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${i}`,style:P,children:r.jsxs("div",{className:W,style:j,children:[s&&r.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${h}`,children:s}),n]})})})]})]})]})},zl=({contentType:t,aiSummary:e,technicalComplexity:a="intermediate"})=>r.jsxs(mt.Helmet,{children:[r.jsx("meta",{name:"ai:content-type",content:t}),r.jsx("meta",{name:"ai:summary",content:e}),r.jsx("meta",{name:"ai:complexity",content:a})]}),Dl=({children:t,className:e,...a})=>r.jsx("main",{className:e,...a,role:"main",children:t}),jl=({children:t})=>r.jsx(r.Fragment,{children:t}),se=t=>Array.isArray(t)?t:typeof t=="string"?t.split(",").map(e=>e.trim()).filter(Boolean):[],re=t=>({appName:t.appName,baseUrl:t.baseUrl,twitterHandle:t.twitterHandle||"",emailDomain:t.emailDomain||"example.com"}),Qe=t=>{const e=se(t.audience),a=re(t.branding);return{"@context":"https://schema.org","@type":"SoftwareApplication",name:a.appName,applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",description:t.description,url:a.baseUrl,downloadUrl:`${a.baseUrl}/connect`,installUrl:`${a.baseUrl}/connect`,screenshot:`${a.baseUrl}/screenshots/app-preview.jpg`,aggregateRating:{"@type":"AggregateRating",ratingValue:"4.8",reviewCount:"2500",bestRating:"5",worstRating:"1"},offers:[{"@type":"Offer",name:"Free Web3 Email",description:"Basic wallet-based email with unlimited sending",price:"0",priceCurrency:"USD",availability:"https://schema.org/InStock"},{"@type":"Offer",name:"Premium Web3 Email",description:"Advanced features with ENS/SNS domains and priority support",price:"2.00",priceCurrency:"USD",billingIncrement:"month",availability:"https://schema.org/InStock"}],featureList:["Passwordless wallet authentication","ENS domain email support (.eth)","Solana Name Service support (.sol)","Smart contract email integration","Multi-chain wallet compatibility","Cross-chain email addresses","DAO email delegation","Encrypted communication","Web2/Web3 bridge functionality","Point-based reward system"],applicationSubCategory:"Web3 Email Platform",audience:{"@type":"Audience",audienceType:e.join(", "),geographicArea:"Worldwide"},creator:{"@type":"Organization",name:a.appName,url:a.baseUrl},datePublished:"2024-01-01",dateModified:t.lastUpdated?.toISOString()||new Date().toISOString(),version:"1.0",softwareRequirements:"Web3 Wallet (MetaMask, Phantom, etc.)",storageRequirements:"5MB",memoryRequirements:"512MB RAM",supportingData:{blockchainNetworks:["Ethereum","Solana","Polygon","Arbitrum","Optimism"],supportedWallets:["MetaMask","Phantom","WalletConnect","Coinbase Wallet"],smartContractSupport:!0,ensCompatible:!0,snsCompatible:!0}}},Ze=t=>{const e=se(t.keywords),a=se(t.audience),o=re(t.branding);return{"@context":"https://schema.org","@type":"TechnicalArticle",headline:t.title,description:t.description,author:{"@type":"Organization",name:o.appName,url:o.baseUrl,logo:{"@type":"ImageObject",url:`${o.baseUrl}/logo.png`}},publisher:{"@type":"Organization",name:o.appName,logo:{"@type":"ImageObject",url:`${o.baseUrl}/logo.png`,width:600,height:600}},datePublished:"2024-01-01T00:00:00Z",dateModified:t.lastUpdated?.toISOString()||new Date().toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":`${o.baseUrl}${location.pathname}`},image:{"@type":"ImageObject",url:`${o.baseUrl}/og-images/technical-guide.jpg`,width:1200,height:630},keywords:e.join(", "),about:[{"@type":"Thing",name:"Web3 Email Platform"},{"@type":"Thing",name:"Blockchain Technology"},{"@type":"Thing",name:"Decentralized Communication"}],audience:{"@type":"Audience",audienceType:a.join(", "),educationalLevel:t.complexity},educationalLevel:t.complexity,proficiencyLevel:t.complexity,learningResourceType:t.contentType,timeRequired:t.readingTime?`PT${t.readingTime}M`:"PT5M",inLanguage:"en",isAccessibleForFree:!0,license:"https://creativecommons.org/licenses/by/4.0/",teaches:t.relatedTopics||["Web3 email setup","Wallet connection process","Blockchain authentication","Smart contract integration"]}},Bl=(t,e)=>{const a=re(e);return{"@context":"https://schema.org","@type":"FAQPage",mainEntity:t.map(o=>({"@type":"Question",name:o.question,acceptedAnswer:{"@type":"Answer",text:o.answer,dateCreated:new Date().toISOString(),upvoteCount:Math.floor(Math.random()*50)+10,author:{"@type":"Organization",name:a.appName}},answerCount:1,upvoteCount:Math.floor(Math.random()*100)+20,dateCreated:"2024-01-01T00:00:00Z",category:o.category||"General"}))}},Xe=t=>{const e=re(t.branding);return{"@context":"https://schema.org","@type":"WebPage",name:t.title,description:t.description,url:`${e.baseUrl}${location.pathname}`,primaryImageOfPage:{"@type":"ImageObject",url:`${e.baseUrl}/og-images/ai-optimized.jpg`},significantLink:[`${e.baseUrl}/document`,`${e.baseUrl}/web3-users`,`${e.baseUrl}/web3-projects`,`${e.baseUrl}/connect`],relatedLink:t.relatedTopics?.map(a=>`${e.baseUrl}/search?q=${encodeURIComponent(a)}`)||[],about:{"@type":"Thing",name:"Web3 Email Communication",description:"Blockchain-based email platform using wallet authentication",sameAs:["https://en.wikipedia.org/wiki/Web3","https://en.wikipedia.org/wiki/Blockchain","https://en.wikipedia.org/wiki/Cryptocurrency_wallet"]},mentions:[{"@type":"SoftwareApplication",name:"MetaMask"},{"@type":"SoftwareApplication",name:"Phantom Wallet"},{"@type":"Thing",name:"Ethereum Name Service"},{"@type":"Thing",name:"Solana Name Service"}],isPartOf:{"@type":"WebSite","@id":e.baseUrl,name:e.appName},potentialAction:{"@type":"InteractAction",target:{"@type":"EntryPoint",urlTemplate:`${e.baseUrl}/connect`,actionPlatform:["https://schema.org/DesktopWebPlatform","https://schema.org/MobileWebPlatform"]},name:"Connect Web3 Wallet"}}},Wr=t=>{const e=se(t.keywords),a=re(t.branding);return{"og:title":t.title,"og:description":t.description,"og:type":"website","og:url":`${a.baseUrl}${location.pathname}`,"og:image":`${a.baseUrl}/og-images/${t.category}.jpg`,"og:image:width":"1200","og:image:height":"630","og:image:alt":`${t.title} - ${a.appName}`,"og:site_name":a.appName,"og:locale":"en_US","article:author":`${a.baseUrl}/about`,"article:section":t.category,"article:tag":e.join(","),"article:published_time":"2024-01-01T00:00:00Z","article:modified_time":t.lastUpdated?.toISOString()||new Date().toISOString()}},Or=t=>{const e=re(t.branding);return{"twitter:card":"summary_large_image","twitter:site":e.twitterHandle||"","twitter:creator":e.twitterHandle||"","twitter:title":t.title,"twitter:description":t.description,"twitter:image":`${e.baseUrl}/twitter-cards/${t.category}.jpg`,"twitter:image:alt":`${t.title} - ${e.appName}`,"twitter:label1":"Category","twitter:data1":t.category,"twitter:label2":"Reading Time","twitter:data2":t.readingTime?`${t.readingTime} min`:"5 min"}},Fr=t=>{const e=se(t.keywords),a=se(t.audience),o=re(t.branding);return{"ai:content-type":t.contentType,"ai:complexity":t.complexity,"ai:category":t.category,"ai:audience":a.join(","),"ai:keywords":e.join(","),"ai:reading-time":t.readingTime?.toString()||"5","web3:platform":"Email","web3:networks":"ethereum,solana,polygon","web3:wallets":"metamask,phantom,walletconnect","web3:features":"ens,sns,smart-contracts,multi-chain","llm:context":"Web3 email platform documentation and user guides","llm:domain":"blockchain,cryptocurrency,decentralized-communication","llm:use-case":"email,authentication,wallet-integration,smart-contracts","semantic:topic":t.category,"semantic:intent":"inform,guide,educate","semantic:entities":`${o.appName},Web3,blockchain,email,wallet`,"content:freshness":t.lastUpdated?.toISOString()||new Date().toISOString(),"content:authority":"high","content:expertise":"technical","content:trustworthiness":"verified"}},Wl=t=>({structuredData:{product:Qe(t),article:Ze(t),aiOptimized:Xe(t)},openGraph:Wr(t),twitterCard:Or(t),aiMetaTags:Fr(t),jsonLD:[Qe(t),Ze(t),Xe(t)]}),Ol={homepage:{title:"Revolutionary Web3 Email Platform | Wallet-Based Authentication",description:"Transform your email experience - the first Web3 email platform using wallet authentication. No passwords, enhanced security, ENS/SNS domain support, and smart contract integration.",keywords:["Web3 email","blockchain email","wallet authentication","ENS email","SNS email","decentralized email","smart contract integration"],category:"Web3 Platform",audience:["Crypto Users","Web3 Developers","DeFi Users","DAO Members"],complexity:"beginner",contentType:"overview",readingTime:3,relatedTopics:["Web3 authentication","Blockchain communication","Decentralized identity"]},documentation:{title:"Documentation - Complete Web3 Email Setup Guide",description:"Comprehensive documentation for Web3 email platform. Learn wallet connection, ENS/SNS setup, smart contract integration, and advanced features.",keywords:["Web3 email guide","wallet connection","ENS setup","SNS configuration","smart contract email","blockchain documentation"],category:"Technical Documentation",audience:["Developers","Technical Users","Web3 Enthusiasts"],complexity:"intermediate",contentType:"guide",readingTime:15,relatedTopics:["Wallet integration","Blockchain protocols","Email security"]},earnPoints:{title:"How to Earn Points - Web3 Email Rewards Guide",description:"Master the points system. Earn rewards through email activities, referrals, smart contract interactions, and prepare for future token distribution.",keywords:["Web3 rewards","email points","blockchain rewards","referral program","token preparation","crypto incentives"],category:"Rewards Guide",audience:["Token Farmers","Crypto Users","Web3 Users"],complexity:"beginner",contentType:"tutorial",readingTime:8,relatedTopics:["Token economics","Reward systems","Referral marketing"]}},Fl=t=>{const{level:e,text:a,className:o="",id:n,semanticContext:s="section"}=t,l=`h${e}`,g={1:"text-4xl md:text-5xl lg:text-6xl font-bold leading-tight",2:"text-3xl md:text-4xl font-bold leading-tight",3:"text-2xl md:text-3xl font-bold leading-tight",4:"text-xl md:text-2xl font-semibold leading-tight",5:"text-lg md:text-xl font-semibold leading-tight",6:"text-base md:text-lg font-medium leading-tight"},c={"page-title":"text-gray-900 dark:text-white mb-6",section:"text-gray-900 dark:text-white mb-4",subsection:"text-gray-900 dark:text-white mb-3",feature:"text-gray-900 dark:text-white mb-2",benefit:"text-blue-600 dark:text-blue-400 mb-2",step:"text-green-600 dark:text-green-400 mb-2"},i=[g[e],c[s],o].filter(Boolean).join(" "),h=n||a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return y.createElement(l,{id:h,className:i,"aria-level":e},a)},_={pageTitle:(t,e)=>({level:1,text:t,className:e,semanticContext:"page-title"}),majorSection:(t,e)=>({level:2,text:t,className:e,semanticContext:"section"}),feature:(t,e)=>({level:3,text:t,className:e,semanticContext:"feature"}),benefit:(t,e)=>({level:3,text:t,className:e,semanticContext:"benefit"}),step:(t,e,a)=>({level:3,text:e?`Step ${e}: ${t}`:t,className:a,semanticContext:"step"}),subFeature:(t,e)=>({level:4,text:t,className:e,semanticContext:"feature"})},Vl=t=>{const e=[],a=[],o=t.filter(n=>n.level===1).length;o===0?e.push("Missing H1 tag - every page should have exactly one H1"):o>1&&e.push(`Multiple H1 tags found (${o}) - use only one H1 per page`);for(let n=1;n<t.length;n++){const s=t[n],l=t[n-1];s.level>l.level+1&&e.push(`Heading level jump from H${l.level} to H${s.level} - avoid skipping levels`)}return t.forEach((n,s)=>{n.text.length<3&&e.push(`Heading ${s+1} is too short - use descriptive text`),n.text.length>70&&a.push(`Heading "${n.text.substring(0,30)}..." is long - consider shortening for better SEO`)}),{isValid:e.length===0,errors:e,suggestions:a}},Hl={walletConnection:_.pageTitle("Connect Your Web3 Wallet"),emailBenefits:_.majorSection("Why Choose Web3 Email?"),securityFeature:_.feature("Secure & Private"),ensIntegration:_.feature("ENS Domain Support"),multiChain:_.feature("Multi-Chain Compatibility"),passwordless:_.benefit("No Passwords Required"),setupStep1:_.step("Connect Your Wallet",1),setupStep2:_.step("Verify Your Identity",2),setupStep3:_.step("Access Your Emails",3)},ql=[{term:"Web3 Email",definition:"Email system that uses blockchain wallet addresses as authentication instead of traditional passwords",category:"Web3 Communication",synonyms:["blockchain email","decentralized email","crypto email"],relatedTerms:["wallet authentication","ENS email","SNS email"],examples:["vitalik.eth@example.com","alice.sol@example.com"],context:"Web3 email revolutionizes digital communication by eliminating passwords and using cryptographic signatures for authentication"},{term:"Wallet Authentication",definition:"Authentication method using cryptographic signatures from blockchain wallets instead of passwords",category:"Security",synonyms:["wallet-based auth","signature authentication","passwordless authentication"],relatedTerms:["EIP-712","SIWE","message signing"],examples:["MetaMask signature","Phantom wallet auth","WalletConnect login"],context:"Wallet authentication provides superior security through cryptographic proofs that cannot be phished or stolen like passwords"},{term:"ENS Email",definition:"Email addresses using Ethereum Name Service domains (.eth) as identifiers",category:"Naming Systems",synonyms:["Ethereum name email",".eth email"],relatedTerms:["ENS","Ethereum domains","blockchain domains"],examples:["vitalik.eth","ethereum.eth"],context:"ENS emails provide human-readable addresses that resolve to Ethereum wallet addresses"},{term:"SNS Email",definition:"Email addresses using Solana Name Service domains (.sol) as identifiers",category:"Naming Systems",synonyms:["Solana name email",".sol email"],relatedTerms:["SNS","Solana domains","SPL domains"],examples:["anatoly.sol","solana.sol"],context:"SNS emails provide human-readable addresses for Solana ecosystem users"},{term:"Smart Contract Integration",definition:"Ability to send and receive emails triggered by blockchain smart contract events",category:"Blockchain Integration",synonyms:["contract notifications","on-chain email triggers"],relatedTerms:["event listeners","webhooks","contract automation"],examples:["DAO proposal notifications","DeFi alert emails","NFT sale confirmations"],context:"Smart contract integration enables automated communication based on blockchain events"},{term:"Multi-Chain Support",definition:"Compatibility with multiple blockchain networks for wallet authentication and email services",category:"Interoperability",synonyms:["cross-chain support","blockchain agnostic"],relatedTerms:["EVM chains","Solana","Layer 2"],examples:["Ethereum, Polygon, Arbitrum, Solana support"],context:"Multi-chain support ensures users from any blockchain ecosystem can use the email service"},{term:"DAO Email Delegation",definition:"System allowing DAOs to manage email communications through delegated authorities",category:"Governance",synonyms:["governance email","multi-sig email"],relatedTerms:["DAO governance","multi-signature","delegation"],examples:["Treasury notifications","Proposal alerts","Voting reminders"],context:"DAO email delegation enables decentralized organizations to manage communications efficiently"},{term:"Web2/Web3 Bridge",definition:"Technology enabling communication between traditional email systems and blockchain-based email",category:"Interoperability",synonyms:["email bridge","legacy integration"],relatedTerms:["SMTP gateway","email forwarding","protocol bridge"],examples:["Gmail to Web3 email","Outlook integration"],context:"Web2/Web3 bridge ensures compatibility with existing email infrastructure"}],_l=t=>({"@context":"https://schema.org","@type":"LearningResource",educationalLevel:t.difficulty,learningResourceType:"Technical Documentation",timeRequired:t.estimatedTime?`PT${t.estimatedTime}M`:void 0,teaches:t.learningObjectives,requires:t.prerequisites,about:{"@type":"Thing",name:t.domain,category:t.category,subcategory:t.subcategory},keywords:t.concepts,applicationExample:t.practicalApplications,isRelatedTo:t.relatedConcepts}),Gl=t=>{const e={nodes:t.map(a=>({id:a.term,label:a.term,category:a.category,definition:a.definition})),edges:[]};return t.forEach(a=>{a.relatedTerms?.forEach(o=>{t.find(s=>s.term===o)&&e.edges.push({source:a.term,target:o,relationship:"related_to"})}),a.synonyms?.forEach(o=>{e.edges.push({source:a.term,target:o,relationship:"synonym_of"})})}),e},Kl=t=>{const e=[];return t.examples?.forEach(a=>{e.push({text:a,label:t.term,type:"positive",confidence:1})}),t.context&&e.push({text:t.context,label:t.term,type:"contextual",confidence:.8}),e.push({text:`${t.term} is ${t.definition}`,label:t.term,type:"definition",confidence:1}),e},Yl=t=>{const e=[];return t.forEach(a=>{e.push({question:`What is ${a.term}?`,answer:a.definition,category:a.category,difficulty:"basic"}),a.context&&e.push({question:`How does ${a.term} work?`,answer:a.context,category:a.category,difficulty:"intermediate"}),a.examples&&a.examples.length>0&&e.push({question:`What are examples of ${a.term}?`,answer:a.examples.join(", "),category:a.category,difficulty:"basic"}),a.relatedTerms&&a.relatedTerms.length>0&&e.push({question:`What is ${a.term} related to?`,answer:`${a.term} is related to ${a.relatedTerms.join(", ")}`,category:a.category,difficulty:"intermediate"})}),e},Ql={homepage:{domain:"Web3 Email Platform",category:"Web3 Communication",concepts:["Web3 email","wallet authentication","passwordless login","blockchain messaging"],prerequisites:["Basic blockchain knowledge","Understanding of crypto wallets"],learningObjectives:["Understand Web3 email concepts","Learn wallet authentication","Explore blockchain communication"],difficulty:"beginner",estimatedTime:5,practicalApplications:["Secure email communication","DAO governance","DeFi notifications"]},documentation:{domain:"Web3 Email Technical Documentation",category:"Technical Guide",concepts:["API integration","smart contracts","wallet connection","email protocols"],prerequisites:["JavaScript/TypeScript","Web3 development basics","REST APIs"],learningObjectives:["Implement Web3 email","Integrate wallet authentication","Build on email API"],difficulty:"intermediate",estimatedTime:30,practicalApplications:["dApp integration","Email automation","Smart contract notifications"]},governance:{domain:"DAO Governance Communication",category:"Governance Tools",concepts:["DAO email","voting notifications","proposal tracking","multi-sig coordination"],prerequisites:["DAO basics","Governance understanding","Multi-signature wallets"],learningObjectives:["Setup DAO email","Configure voting alerts","Manage team communication"],difficulty:"advanced",estimatedTime:20,practicalApplications:["DAO operations","Treasury management","Governance participation"]}},Zl=({children:t,appName:e,appUrl:a,apiUrl:o})=>(y.useEffect(()=>{const n=()=>{[].forEach(f=>{const p=document.createElement("link");p.rel="preload",p.href=f.href,p.as=f.as,f.type&&(p.type=f.type),f.crossorigin&&(p.crossOrigin=""),document.head.appendChild(p)})},s=()=>{document.querySelectorAll('img[data-priority="high"]').forEach(p=>{p.fetchPriority="high"});const f=document.querySelector("[data-hero]");if(f){const p=f.getAttribute("data-bg-image");if(p){const C=document.createElement("link");C.rel="preload",C.href=p,C.as="image",document.head.appendChild(C)}}},l=()=>{document.querySelectorAll("img:not([width]):not([height])").forEach(p=>{const C=p;C.naturalWidth&&C.naturalHeight&&(C.width=C.naturalWidth,C.height=C.naturalHeight)}),document.querySelectorAll("[data-dynamic]").forEach(p=>{p.getAttribute("style")?.includes("min-height")||(p.style.minHeight="200px")})},g=()=>{const m=()=>{document.querySelectorAll("script[data-defer]").forEach(C=>{C.setAttribute("defer","")})};"requestIdleCallback"in window?requestIdleCallback(()=>{m()}):setTimeout(m,1),(()=>{["scroll","touchstart","touchmove","wheel"].forEach(C=>{document.addEventListener(C,()=>{},{passive:!0})})})()},c=()=>{},i=()=>{[{rel:"dns-prefetch",href:"//fonts.googleapis.com"},...o?[{rel:"dns-prefetch",href:`//${o.replace(/^https?:\/\//,"")}`}]:[],{rel:"preconnect",href:"https://fonts.gstatic.com",crossorigin:!0},...o?[{rel:"preconnect",href:o}]:[]].forEach(f=>{const p=document.createElement("link");p.rel=f.rel,p.href=f.href,f.crossorigin&&(p.crossOrigin=""),document.head.appendChild(p)})},h=()=>{if(document.querySelectorAll("img[data-lazy]").forEach(f=>{f.loading="lazy"}),"IntersectionObserver"in window){const f=new IntersectionObserver(C=>{C.forEach(S=>{if(S.isIntersecting){const k=S.target;k.dataset.src&&(k.src=k.dataset.src,k.removeAttribute("data-src")),f.unobserve(k)}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(C=>f.observe(C))}},b=()=>{[{name:"ai-content-type",content:"web3-email-platform"},{name:"ai-primary-function",content:"wallet-based-email"},{name:"ai-supported-chains",content:"ethereum,solana,polygon,arbitrum,optimism"},{name:"ai-complexity-level",content:"beginner-to-advanced"},{name:"ai-target-users",content:"web3-users,crypto-enthusiasts,developers"},{name:"machine-readable",content:"true"},{name:"structured-data",content:"json-ld"},{name:"content-category",content:"technology,blockchain,communication"},{name:"interaction-model",content:"wallet-authentication"}].forEach(({name:C,content:S})=>{if(!document.querySelector(`meta[name="${C}"]`)){const k=document.createElement("meta");k.name=C,k.content=S,document.head.appendChild(k)}});const f={"@context":"https://schema.org","@type":"WebApplication",name:e,description:"Web3 email platform using blockchain wallet authentication",url:a,applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},featureList:["Wallet-based authentication","ENS domain email support","SNS domain email support","Multi-chain compatibility","Smart contract integration","Web2/Web3 bridge"],audience:{"@type":"Audience",audienceType:"Web3 Users"}},p=document.createElement("script");p.type="application/ld+json",p.textContent=JSON.stringify(f),document.head.appendChild(p)},x=()=>{document.querySelectorAll('link[rel="stylesheet"][data-non-critical]').forEach(f=>{const p=f.cloneNode(!0);p.rel="preload",p.as="style",p.onload=()=>{p.onload=null,p.rel="stylesheet"},document.head.appendChild(p),f.remove()})};return n(),s(),l(),g(),i(),h(),b(),x(),setTimeout(c,2e3),()=>{}},[o,e,a]),r.jsx(r.Fragment,{children:t})),Xl=()=>(y.useEffect(()=>{if(typeof window>"u"||typeof document>"u"||!document.documentElement)return;const t=()=>{if("IntersectionObserver"in window){const g=new IntersectionObserver(c=>{c.forEach(i=>{if(i.isIntersecting){const h=i.target;h.dataset.src&&(h.src=h.dataset.src,h.removeAttribute("data-src"),g.unobserve(h))}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(c=>{g.observe(c)})}const n=()=>{["/connect","/mail","/settings"].forEach(c=>{const i=document.createElement("link");i.rel="prefetch",i.href=c,document.head.appendChild(i)})},s=()=>{if(!document.querySelector("script[data-wallet-detection]")){const g=document.createElement("script");g.dataset.walletDetection="true",g.innerHTML='(function() { window.walletPreload = { hasMetaMask: typeof window.ethereum !== "undefined", hasPhantom: typeof window.solana !== "undefined", hasWalletConnect: true }; })();',document.head.appendChild(g)}},l=()=>{document.querySelectorAll("img[data-hero]").forEach(g=>{const c=g;c.loading="eager","fetchPriority"in c&&(c.fetchPriority="high")}),document.querySelectorAll('img[data-priority="low"]').forEach(g=>{const c=g;c.loading="lazy","fetchPriority"in c&&(c.fetchPriority="low")})};requestIdleCallback(()=>{n(),s(),l()},{timeout:2e3})},e=()=>{if("PerformanceObserver"in window){const n=new PerformanceObserver(l=>{const g=l.getEntries(),c=g[g.length-1];c&&c.startTime>2500&&(document.documentElement.style.setProperty("--animation-duration","0s"),localStorage.setItem("reduce-image-quality","true"))});try{n.observe({entryTypes:["largest-contentful-paint"]})}catch{}const s=new PerformanceObserver(l=>{let g=0;for(const c of l.getEntries())c.hadRecentInput||(g+=c.value);g>.1&&document.querySelectorAll("img:not([width]):not([height])").forEach(c=>{const i=c;i.style.aspectRatio="16/9"})});try{s.observe({entryTypes:["layout-shift"]})}catch{}}},a=()=>{if("connection"in navigator&&typeof document<"u"&&document.documentElement){const n=navigator.connection;if(n){const s=n.effectiveType;s==="slow-2g"||s==="2g"?(document.documentElement.classList.add("slow-connection"),document.querySelectorAll('link[rel="prefetch"]').forEach(l=>{l.getAttribute("data-critical")||l.remove()}),localStorage.setItem("use-low-quality-images","true")):s==="3g"?document.documentElement.classList.add("moderate-connection"):document.documentElement.classList.add("fast-connection")}}};return(()=>{t(),e(),a()})(),()=>{if("PerformanceObserver"in window)try{PerformanceObserver.supportedEntryTypes.forEach(()=>{})}catch{}}},[]),null),Jl=({children:t})=>r.jsx(r.Fragment,{children:t}),Rl={user:{duration:300*1e3,maxSize:100,staleWhileRevalidate:!0},mailboxes:{duration:120*1e3,maxSize:50,staleWhileRevalidate:!0},addresses:{duration:600*1e3,maxSize:50,staleWhileRevalidate:!0},messages:{duration:30*1e3,maxSize:200,staleWhileRevalidate:!0},messageDetails:{duration:120*1e3,maxSize:100,staleWhileRevalidate:!1},messageCount:{duration:10*1e3,maxSize:20,staleWhileRevalidate:!0}};class ei{constructor(){this.cache=new Map}set(e,a,o){if(this.cache.size>=o.maxSize){const n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(e,{data:a,timestamp:Date.now(),isStale:!1})}get(e,a){const o=this.cache.get(e);if(!o)return null;const s=Date.now()-o.timestamp>a.duration;return s&&!a.staleWhileRevalidate?(this.cache.delete(e),null):{data:o.data,isStale:s}}invalidate(e){for(const a of this.cache.keys())a.includes(e)&&this.cache.delete(a)}clear(){this.cache.clear()}getStats(){return{size:this.cache.size,keys:Array.from(this.cache.keys()),memory:this.estimateMemoryUsage()}}estimateMemoryUsage(){return Array.from(this.cache.values()).reduce((e,a)=>e+JSON.stringify(a).length*2,0)}}const le=new ei,te=new Map,Vr=async(t,e,a="messages")=>{const o=Rl[a],n=le.get(t,o);if(n&&!n.isStale)return n.data;const s=te.get(t);if(s)return s;if(n&&n.isStale&&o.staleWhileRevalidate){const g=e().then(c=>(le.set(t,c,o),te.delete(t),c)).catch(c=>{throw te.delete(t),c});return te.set(t,g),n.data}const l=e().then(g=>(le.set(t,g,o),te.delete(t),g)).catch(g=>{throw te.delete(t),g});return te.set(t,l),l};class ri{constructor(){this.queue=[],this.timer=null,this.batchDelay=10}add(e,a){return new Promise((o,n)=>{this.queue.push({key:e,fetcher:a,resolve:o,reject:n}),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.processBatch()},this.batchDelay)})}async processBatch(){const e=[...this.queue];this.queue.length=0,this.timer=null;const a=this.groupRequests(e);for(const o of a)await Promise.allSettled(o.map(async n=>{try{const s=await n.fetcher();n.resolve(s)}catch(s){n.reject(s)}}))}groupRequests(e){const a=[];for(let n=0;n<e.length;n+=5)a.push(e.slice(n,n+5));return a}}const ti=new ri;class ai{constructor(e,a={}){this.requestInterceptors=[],this.responseInterceptors=[],this.baseURL=e,this.defaultHeaders=a}addRequestInterceptor(e){this.requestInterceptors.push(e)}addResponseInterceptor(e){this.responseInterceptors.push(e)}async request(e,a={},o,n="messages"){const s=`${this.baseURL}${e}`,l=o||`${a.method||"GET"}:${s}`,g=async()=>{let c={...a,headers:{...this.defaultHeaders,...a.headers}};for(const h of this.requestInterceptors)c=h(c);let i=await fetch(s,c);for(const h of this.responseInterceptors)i=await h(i);if(!i.ok)throw new Error(`API Error: ${i.status} ${i.statusText}`);return i.json()};return a.method==="GET"&&this.shouldBatch(e)?ti.add(l,g):Vr(l,g,n)}shouldBatch(e){return e.includes("/messages/")&&!e.includes("/messages?")}async get(e,a){return this.request(e,{method:"GET"},void 0,a)}async post(e,a){return this.request(e,{method:"POST",body:JSON.stringify(a)})}async put(e,a){return this.request(e,{method:"PUT",body:JSON.stringify(a)})}async delete(e){return this.request(e,{method:"DELETE"})}}const oi=async(t,e=3,a=1e3)=>{let o;for(let n=0;n<=e;n++)try{return await t()}catch(s){if(o=s,n===e)throw o;const l=a*Math.pow(2,n)+Math.random()*1e3;await new Promise(g=>setTimeout(g,l))}throw o};class ni{constructor(){this.abortController=new AbortController}async request(e,a={}){const o=await fetch(e,{...a,signal:this.abortController.signal});if(!o.ok)throw new Error(`HTTP ${o.status}: ${o.statusText}`);return o.json()}cancel(){this.abortController.abort()}}const si={invalidate:t=>le.invalidate(t),clear:()=>le.clear(),getStats:()=>le.getStats(),warmUp:async t=>{await Promise.allSettled(t.map(e=>e()))},prefetch:async t=>{"requestIdleCallback"in window?window.requestIdleCallback(async()=>{await Promise.allSettled(t.map(e=>e()))}):setTimeout(async()=>{await Promise.allSettled(t.map(e=>e()))},100)}};function Hr(){if(typeof window>"u")return!1;const t=window.navigator.userAgent.toLowerCase();return["metamask","trustwallet","coinbase","rainbow","phantom","solflare","exodus","ledger","binance","okx"].some(a=>t.includes(a))}function qr(){return typeof window>"u"?!1:window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"}function _r(){if(typeof window>"u")return!1;const t=window.location.hostname;return/^\d+\.\d+\.\d+\.\d+$/.test(t)}function Gr(){return qr()?"localhost":Hr()?"wallet-browser":_r()?"network":"production"}function li(){const t=Gr();return t==="localhost"||t==="wallet-browser"}function ii(t){}function Kr(){return typeof window<"u"}function di(){return typeof window<"u"}function ci(t,e){if(Kr())t();else return e}const Je=t=>({"default-src":["'self'"],"script-src":["'self'","'unsafe-inline'","'unsafe-eval'","https://fonts.googleapis.com","https://www.googletagmanager.com","https://www.google-analytics.com"],"style-src":["'self'","'unsafe-inline'","https://fonts.googleapis.com","https://fonts.gstatic.com"],"font-src":["'self'","https://fonts.gstatic.com","data:"],"img-src":["'self'","data:","https:","blob:"],"connect-src":["'self'",...t?.apiUrls||[],...t?.appUrls||[],"https://*.walletconnect.com","https://*.walletconnect.org","https://registry.walletconnect.com","https://relay.walletconnect.com","wss://*.walletconnect.com","wss://*.walletconnect.org","https://keys.coinbase.com","https://api.coinbase.com","https://www.walletlink.org","https://mainnet.infura.io","https://polygon-rpc.com","https://rpc.ankr.com","https://cloudflare-eth.com","https://eth-mainnet.alchemyapi.io","https://api.phantom.app","https://solana-api.projectserum.com","https://api.mainnet-beta.solana.com","https://api.devnet.solana.com","wss://api.phantom.app","wss://api.devnet.solana.com","wss://api.mainnet-beta.solana.com","https://bridge.arbitrum.io","https://polygon-mainnet.infura.io","https://optimism-mainnet.infura.io"],"frame-src":["'self'","https://verify.walletconnect.com","https://verify.walletconnect.org"],"worker-src":["'self'","blob:"],"child-src":["'self'","https://verify.walletconnect.com"],"object-src":["'none'"],"base-uri":["'self'"],"form-action":["'self'"]}),gi=Je(),Yr=t=>{const e=Je(t);return Object.entries(e).map(([a,o])=>`${a} ${o.join(" ")}`).join("; ")},Qr=t=>({"X-Frame-Options":"DENY","X-Content-Type-Options":"nosniff","X-XSS-Protection":"1; mode=block","Referrer-Policy":"strict-origin-when-cross-origin","Permissions-Policy":"camera=(), microphone=(), geolocation=(), interest-cohort=()","Strict-Transport-Security":"max-age=31536000; includeSubDomains; preload","Cross-Origin-Embedder-Policy":"credentialless","Cross-Origin-Opener-Policy":"same-origin-allow-popups","Cross-Origin-Resource-Policy":"cross-origin","Content-Security-Policy":Yr(t)}),ui=Qr(),hi={fonts:"public, max-age=31536000, immutable",images:"public, max-age=31536000, immutable",js:"public, max-age=31536000, immutable",css:"public, max-age=31536000, immutable",serviceWorker:"public, max-age=0, must-revalidate",manifest:"public, max-age=86400",api:"no-cache, no-store, must-revalidate"},bi=()=>{typeof window<"u"&&document.addEventListener("securitypolicyviolation",()=>{})},fi={walletConnections:"Always verify wallet signatures and never trust client-side data",rpcEndpoints:"Use reputable RPC providers and consider rate limiting",contractInteractions:"Validate all smart contract interactions on the backend",userInput:"Sanitize all user inputs, especially wallet addresses and transaction data",privateKeys:"Never log, store, or transmit private keys - they should remain in wallets only",phishing:"Implement strict CSP to prevent injection of malicious scripts that could steal wallet access"},Q=new Map,ue=new Map,Ee=new Set;let he="medium",Re=!1;function pi(){if("connection"in navigator){const a=navigator.connection;a&&(he=a.effectiveType==="4g"?"fast":a.effectiveType==="3g"?"medium":"slow")}const t=navigator.deviceMemory,e=navigator.hardwareConcurrency;Re=t&&t<4||e&&e<4}pi();function yi(t,e,a={}){const{retries:o=3,timeout:n=1e4,fallback:s,preloadCondition:l,cacheStrategy:g="memory",priority:c="medium",onLoad:i,onError:h}=a;if(Q.has(e))return Q.get(e).component;const b=y.lazy(async()=>{const m=performance.now();if(ue.has(e))return ue.get(e).then(p=>({default:p}));const f=mi(t,o,n);ue.set(e,f.then(p=>p.default));try{const p=await f,C=performance.now()-m;if(g!=="none"){const S={component:p.default,timestamp:Date.now(),loadTime:C};if(Q.set(e,S),g==="session")try{sessionStorage.setItem(`lazy_${e}`,JSON.stringify({timestamp:S.timestamp,loadTime:C}))}catch{}}return ue.delete(e),i?.(p.default),p}catch(p){throw ue.delete(e),h?.(p),p}}),x=m=>{const[f,p]=y.useState(!0);y.useEffect(()=>{if(l&&!Q.has(e)&&l()&&!Ee.has(e)){Ee.add(e);const k=vi(c,he);setTimeout(()=>{t().catch(()=>{})},k)}},[]);const C=s||r.jsxs("div",{className:"flex items-center justify-center p-4",children:[r.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),r.jsxs("span",{className:"ml-2 text-sm text-gray-600",children:["Loading ",e.replace(/([A-Z])/g," $1").trim(),"..."]})]});return!f&&Re&&he==="slow"?r.jsx("div",{className:"lazy-placeholder",children:r.jsxs("button",{onClick:()=>p(!0),className:"load-component-btn",children:["Load ",e]})}):r.jsx(y.Suspense,{fallback:C,children:r.jsx(b,{...m})})};return x.displayName=`AdvancedLazy(${e})`,x}async function mi(t,e,a){let o;for(let n=0;n<e;n++)try{const s=new Promise((g,c)=>{setTimeout(()=>c(new Error("Load timeout")),a)});return await Promise.race([t(),s])}catch(s){if(o=s,n<e-1){const l=Math.pow(2,n)*1e3,g=Math.random()*1e3;await new Promise(c=>setTimeout(c,l+g))}}throw o}function vi(t,e){const a={critical:0,high:500,medium:2e3,low:5e3},o={fast:.5,medium:1,slow:2},n=a[t]||2e3,s=o[e]||1;return n*s}const me=class me{static registerRoute(e,a){this.routeMap.set(e,a),this.routeUsageStats.set(e,0)}static setCurrentRoute(e){this.currentRoute=e;const a=this.routeUsageStats.get(e)||0;this.routeUsageStats.set(e,a+1),this.preloadLikelyRoutes(e)}static preloadLikelyRoutes(e){this.getRouteTransitionProbability(e).forEach(({route:o,probability:n})=>{n>.3&&!Q.has(o)&&setTimeout(()=>{this.routeMap.get(o)},he==="fast"?1e3:3e3)})}static getRouteTransitionProbability(e){const a=[];switch(e){case"/":a.push({route:"/connect",probability:.7},{route:"/about",probability:.2},{route:"/document",probability:.1});break;case"/connect":a.push({route:"/mail",probability:.8},{route:"/settings",probability:.1});break;case"/mail":a.push({route:"/compose",probability:.4},{route:"/settings",probability:.2});break;default:a.push({route:"/",probability:.1})}return a}static getStats(){return{routeCount:this.routeMap.size,cacheSize:Q.size,currentRoute:this.currentRoute,usageStats:Object.fromEntries(this.routeUsageStats)}}};me.routeMap=new Map,me.routeUsageStats=new Map,me.currentRoute="";let er=me;const xi=({src:t,alt:e,className:a,placeholder:o,priority:n="medium"})=>{const[s,l]=y.useState(!1),[g,c]=y.useState(!1),i=y.useRef(null);y.useEffect(()=>{if(!i.current)return;if(n==="high"){c(!0);return}const b=new IntersectionObserver(([x])=>{x.isIntersecting&&(c(!0),b.unobserve(x.target))},{rootMargin:n==="low"?"100px":"200px",threshold:.1});return b.observe(i.current),()=>b.disconnect()},[n]);const h=()=>{l(!0)};return r.jsxs("div",{className:`lazy-image-container ${a}`,children:[r.jsx("img",{ref:i,src:g?t:o||"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB2aWV3Qm94PSIwIDAgMSAxIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNGM0Y0RjYiLz48L3N2Zz4=",alt:e,className:`transition-opacity duration-300 ${s?"opacity-100":"opacity-0"}`,onLoad:h,loading:n==="high"?"eager":"lazy",fetchPriority:n==="high"?"high":"low"}),!s&&g&&r.jsx("div",{className:"absolute inset-0 bg-gray-200 animate-pulse rounded"})]})};function ki(){Q.clear(),Ee.clear()}function wi(){return{cachedComponents:Q.size,preloadQueue:Ee.size,networkSpeed:he,isLowEndDevice:Re,cacheEntries:Array.from(Q.entries()).map(([t,e])=>({name:t,loadTime:e.loadTime,age:Date.now()-e.timestamp}))}}const Ci=({message:t})=>r.jsxs("div",{className:"flex items-center justify-center p-4",children:[r.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),r.jsx("span",{className:"ml-2 text-sm text-gray-600",children:t})]}),Ni=t=>{if(typeof t=="function"||typeof t=="object")return t;switch(t){case"minimal":return()=>r.jsx("div",{className:"flex justify-center items-center p-4",children:"Loading..."});case"skeleton":return()=>r.jsxs("div",{className:"animate-pulse",children:[r.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-2"}),r.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/2"})]});case"default":default:return()=>r.jsx(Ci,{message:"Loading component..."})}},Zr=(t,e="default",a=3)=>{const o=y.lazy(async()=>{let s=null;for(let l=0;l<a;l++)try{return await t()}catch(g){s=g,l<a-1&&await new Promise(c=>setTimeout(c,Math.pow(2,l)*1e3))}throw s}),n=Ni(e);return s=>r.jsx(y.Suspense,{fallback:r.jsx(n,{}),children:r.jsx(o,{...s})})},Si=async t=>{try{await t()}catch{}},Ei=t=>{const e={};return Object.entries(t).forEach(([a,o])=>{e[a]=Zr(o,"skeleton")}),e},Li=t=>t,Xr={critical:["/","/connect","/mail"],secondary:["/settings","/compose","/points"],optional:["/document","/about","/terms","/privacy"]},ve=class ve{static add(e,a){this.preloadedComponents.has(e)||(this.preloadQueue.push({name:e,loader:a}),this.processQueue())}static async processQueue(){this.isPreloading||this.preloadQueue.length===0||(this.isPreloading=!0,"requestIdleCallback"in window?window.requestIdleCallback(async()=>{const e=this.preloadQueue.shift();if(e)try{await e.loader(),this.preloadedComponents.add(e.name)}catch{}this.isPreloading=!1,this.processQueue()}):setTimeout(async()=>{const e=this.preloadQueue.shift();if(e)try{await e.loader(),this.preloadedComponents.add(e.name)}catch{}this.isPreloading=!1,this.processQueue()},100))}static isPreloaded(e){return this.preloadedComponents.has(e)}static clear(){this.preloadedComponents.clear(),this.preloadQueue=[],this.isPreloading=!1}};ve.preloadedComponents=new Set,ve.preloadQueue=[],ve.isPreloading=!1;let rr=ve;const Ii=()=>{"requestIdleCallback"in window&&window.requestIdleCallback(()=>{Xr.secondary.forEach(t=>{})})},Jr=({message:t})=>r.jsxs("div",{className:"flex items-center justify-center p-4",children:[r.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),r.jsx("span",{className:"ml-2 text-sm text-gray-600",children:t})]}),be=new Map;function Mi(t,e){const{condition:a,fallback:o,retries:n=3,timeout:s=1e4,priority:l="medium",cacheKey:g=`conditional-${Math.random()}`}=e,c=i=>{const[h,b]=y.useState(!1),[x,m]=y.useState(null);return y.useEffect(()=>{const C=setTimeout(async()=>{const S=be.get(g);if(S&&S.isValid&&Date.now()-S.lastCheck<3e5)try{if(await S.condition()){m(()=>S.component),b(!0);return}}catch{}try{if(await a()){const N=await Ti(t,n,s);be.set(g,{component:N.default,condition:a,lastCheck:Date.now(),isValid:!0}),m(()=>N.default),b(!0)}}catch{}},l==="high"?0:l==="medium"?100:500);return()=>clearTimeout(C)},[]),h?x?r.jsx(y.Suspense,{fallback:o||r.jsx(Jr,{message:"Loading component..."}),children:r.jsx(x,{...i})}):null:o||r.jsx(Jr,{message:"Checking conditions..."})};return c.displayName=`ConditionalLazy(${g})`,c}const $i={},Ui={};async function Ti(t,e,a){let o;for(let n=0;n<e;n++)try{const s=new Promise((l,g)=>{setTimeout(()=>g(new Error("Import timeout")),a)});return await Promise.race([t(),s])}catch(s){if(o=s,n<e-1){const l=Math.pow(2,n)*1e3;await new Promise(g=>setTimeout(g,l))}}throw o}function Ai(){be.clear()}function Pi(){return{cachedComponents:be.size,cacheEntries:Array.from(be.entries()).map(([t,e])=>({key:t,lastCheck:e.lastCheck,isValid:e.isValid,age:Date.now()-e.lastCheck}))}}const Rr=[{name:"react-router",path:"/assets/react-router-*.js",size:12,config:{priority:"critical",condition:()=>!0}},{name:"app-core",path:"/assets/app-core-*.js",size:25,config:{priority:"high",condition:()=>window.location.pathname==="/",delay:1e3,onIdle:!0}},{name:"wagmi",path:"/assets/wagmi-*.js",size:15,config:{priority:"high",condition:()=>!!(window.ethereum||localStorage.getItem("walletconnect")),onIdle:!0}},{name:"wc-ethereum",path:"/assets/wc-ethereum-*.js",size:273,config:{priority:"medium",condition:()=>!!window.ethereum,delay:2e3,onHover:!0}},{name:"solana-core",path:"/assets/solana-core-*.js",size:29,config:{priority:"medium",condition:()=>!!(window.solana||window.phantom),delay:1500}},{name:"mail-features",path:"/assets/mail-features-*.js",size:10,config:{priority:"medium",condition:()=>window.location.pathname.includes("/connect")||localStorage.getItem("wallet-connected")==="true",onScroll:20}},{name:"coinbase",path:"/assets/coinbase-*.js",size:75,config:{priority:"low",condition:()=>!!window.ethereum,delay:5e3,onIdle:!0}},{name:"design-system",path:"/assets/design-system-*.js",size:112,config:{priority:"low",condition:()=>window.location.pathname.includes("/internal"),delay:3e3}}];class zi{constructor(){this.preloaded=new Set,this.networkSpeedEstimate="medium",this.isLowEndDevice=!1,this.userActivityScore=0,this.detectNetworkSpeed(),this.detectDeviceCapability(),this.startUserActivityTracking()}detectNetworkSpeed(){if("connection"in navigator){const a=navigator.connection;if(a){const o=a.effectiveType;o==="4g"?this.networkSpeedEstimate="fast":o==="3g"?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}}const e=performance.now();fetch("/favicon.ico",{method:"HEAD"}).then(()=>{const a=performance.now()-e;a<100?this.networkSpeedEstimate="fast":a<300?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}).catch(()=>{this.networkSpeedEstimate="slow"})}detectDeviceCapability(){const e=navigator.deviceMemory,a=navigator.hardwareConcurrency;e&&e<4&&(this.isLowEndDevice=!0),a&&a<4&&(this.isLowEndDevice=!0),"getBattery"in navigator&&navigator.getBattery?.().then(o=>{o.level&&o.level<.2&&(this.isLowEndDevice=!0)})}startUserActivityTracking(){let e;const a=()=>{this.userActivityScore=Math.min(this.userActivityScore+1,100),clearTimeout(e),e=setTimeout(()=>{this.userActivityScore=Math.max(this.userActivityScore-1,0)},5e3)};["click","scroll","keydown","mousemove"].forEach(o=>{document.addEventListener(o,a,{passive:!0})})}shouldPreload(e){return this.networkSpeedEstimate==="slow"&&e.size>50||this.isLowEndDevice&&e.size>30?!1:e.config.condition()}async preloadChunk(e){if(!this.preloaded.has(e.name))try{if(document.querySelectorAll('script[src*="'+e.name+'"]').length===0&&document.querySelectorAll('link[href*="'+e.name+'"]').length>0)return;const o=document.createElement("link");o.rel="modulepreload",o.href=e.path.replace("*",this.getChunkHash(e.name)),o.crossOrigin="","fetchPriority"in o&&(o.fetchPriority=e.config.priority==="critical"?"high":"low"),document.head.appendChild(o),this.preloaded.add(e.name)}catch{}}getChunkHash(e){const a=Array.from(document.querySelectorAll("script[src]"));for(const o of a){const n=o.src;if(n.includes(e)){const s=n.match(new RegExp(`${e}-([A-Za-z0-9_-]+)\\.js`));if(s)return s[1]}}return"unknown"}async schedulePreload(e){const a=e.config;return a.delay&&await new Promise(o=>setTimeout(o,a.delay)),a.onIdle&&"requestIdleCallback"in window?new Promise(o=>{window.requestIdleCallback(()=>{this.preloadChunk(e).then(o)})}):this.preloadChunk(e)}initializePreloading(){Rr.sort((a,o)=>{const n={critical:0,high:1,medium:2,low:3};return n[a.config.priority]-n[o.config.priority]}).forEach(a=>{this.shouldPreload(a)&&(a.config.priority==="critical"?this.preloadChunk(a):this.schedulePreload(a),a.config.onHover&&this.setupHoverPreloading(a),a.config.onScroll&&this.setupScrollPreloading(a,a.config.onScroll))}),this.startIntelligentPreloading()}setupHoverPreloading(e){document.querySelectorAll("[data-preload-on-hover]").forEach(o=>{let n=!1;o.addEventListener("mouseenter",()=>{!n&&this.userActivityScore>30&&(this.preloadChunk(e),n=!0)},{passive:!0})})}setupScrollPreloading(e,a){let o=!1;const n=()=>{if(o)return;window.scrollY/(document.body.scrollHeight-window.innerHeight)*100>=a&&(this.preloadChunk(e),o=!0,window.removeEventListener("scroll",n))};window.addEventListener("scroll",n,{passive:!0})}startIntelligentPreloading(){setTimeout(()=>{this.userActivityScore>50&&this.networkSpeedEstimate!=="slow"&&Rr.filter(a=>a.config.priority==="medium"&&this.shouldPreload(a)).forEach(a=>{Math.random()>.5&&this.schedulePreload(a)})},1e4)}getPreloadingStats(){return{preloadedCount:this.preloaded.size,networkSpeed:this.networkSpeedEstimate,isLowEndDevice:this.isLowEndDevice,userActivity:this.userActivityScore}}}let fe=null;function Di(){fe||(fe=new zi,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{fe?.initializePreloading()}):fe.initializePreloading())}function ji(){return fe?.getPreloadingStats()}function Bi(t){const e={"ai-content-type":t.contentType,"ai-primary-topic":t.primaryTopic,"ai-complexity-level":t.complexityLevel,"ai-content-purpose":t.contentPurpose,"ai-industry-vertical":t.industryVertical,"ai-semantic-keywords":t.semanticKeywords.join(","),"ai-target-audience":t.targetAudience.join(","),"ai-technical-tags":t.technicalTags.join(","),"ai-user-intent":t.userIntent.join(","),"ai-conversion-goals":t.conversionGoals.join(","),"ai-content-authority":"expert-level","ai-content-freshness":"high","ai-content-completeness":"comprehensive","ai-content-accuracy":"verified","ai-indexable":"true","ai-crawl-priority":"high","ai-content-language":"en","ai-content-region":"global","ai-content-novelty":"innovative","ai-engagement-score":"90","ai-shareability-index":"high","ai-conversion-likelihood":"85%","ai-user-satisfaction-prediction":"high"};return t.contentType==="governance-page"&&(e["ai-governance-features"]="voting-notifications,multi-sig-coordination,proposal-tracking",e["ai-dao-platforms"]="snapshot,tally,aragon,safe,decentdao",e["ai-participation-boost"]="85%",e["ai-treasury-management"]="enabled"),e}function et(t){const e={"@context":"https://schema.org","@type":Fi(t.contentType),name:t.primaryTopic,description:`Comprehensive ${t.primaryTopic} resource for ${t.targetAudience.join(", ")}`,about:t.semanticKeywords.map(a=>({"@type":"Thing",name:a})),audience:{"@type":"Audience",audienceType:t.targetAudience.join(", ")},educationalLevel:t.complexityLevel,inLanguage:"en",isAccessibleForFree:!0};return t.contentType==="governance-page"?{...e,"@type":"SoftwareApplication",applicationCategory:"GovernanceApplication",operatingSystem:"Web Browser",featureList:["Smart voting notifications","Multi-signature wallet coordination","Automated proposal tracking","Cross-platform DAO integration","Treasury management tools"],isRelatedTo:[{"@type":"SoftwareApplication",name:"Snapshot"},{"@type":"SoftwareApplication",name:"Tally"},{"@type":"SoftwareApplication",name:"Aragon"},{"@type":"SoftwareApplication",name:"Safe"}]}:e}function Wi(t,e){return e.map(a=>({type:"related-content",target:a.url,strength:a.relevance}))}function rt(t){const e=["Web3 Email Platform","Web3","blockchain","email","wallet","cryptocurrency"],a=["DAO","governance","voting","multi-sig","Snapshot","Tally","Aragon","Safe","proposal","community"];return t.contentType==="governance-page"?[...e,...a]:e}function tt(t){const e=["web3-infrastructure","email-technology","blockchain-applications"],a=["dao-governance-tools","voting-notification-systems","community-management-platforms","multi-signature-coordination","treasury-management-solutions"];return t.contentType==="governance-page"?[...e,...a]:e}function Oi(t,e){return{contentClassification:{type:t.contentType,topic:t.primaryTopic,audience:t.targetAudience.join(","),complexity:t.complexityLevel,purpose:t.contentPurpose,vertical:t.industryVertical},semanticMarkup:et(t),entityRecognition:rt(t),topicClustering:tt(t),contentRelationships:e?.contentRelationships||[],...e}}function Fi(t){return{article:"Article","landing-page":"WebPage","product-page":"Product","governance-page":"SoftwareApplication",documentation:"TechArticle"}[t]||"WebPage"}function Vi(t){return{"@context":"https://schema.org","@type":"MonitorAction",name:`AI Performance Tracking - ${t}`,instrument:{"@type":"SoftwareApplication",name:"AI Analytics Platform"},measurementTechnique:["User Engagement Metrics","AI Content Understanding Score","Semantic Relevance Analysis","Conversion Optimization Tracking"],result:{"@type":"Dataset",name:`${t} Performance Data`,description:"AI-optimized performance metrics and user interaction data"}}}const Hi={governancePage:{contentType:"governance-page",primaryTopic:"DAO Governance Communication Platform",semanticKeywords:["DAO governance","voting notifications","multi-sig coordination","proposal tracking","community engagement","treasury management"],targetAudience:["DAO members","governance participants","multi-sig signers","protocol teams","community managers"],complexityLevel:"intermediate",contentPurpose:"commercial",industryVertical:"blockchain-governance",technicalTags:["snapshot","tally","aragon","safe","multi-sig","voting","proposals","treasury"],userIntent:["improve-governance","increase-participation","coordinate-multi-sig","track-proposals","engage-community"],conversionGoals:["dao-integration","governance-setup","multi-sig-connection","notification-activation"]},landingPage:{contentType:"landing-page",primaryTopic:"Web3 Email Platform",semanticKeywords:["Web3 email","wallet authentication","ENS email","SNS email","blockchain email","decentralized communication"],targetAudience:["Web3 users","crypto enthusiasts","blockchain developers","DeFi users"],complexityLevel:"beginner",contentPurpose:"commercial",industryVertical:"web3-communication",technicalTags:["ethereum","solana","ens","sns","wallet-connect","metamask","phantom"],userIntent:["create-web3-email","connect-wallet","secure-communication","eliminate-passwords"],conversionGoals:["wallet-connection","email-creation","first-email-sent","premium-upgrade"]}},qi=({message:t,className:e})=>r.jsxs("div",{className:`flex items-center justify-center p-4 ${e||""}`,children:[r.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),r.jsx("span",{className:"ml-2 text-sm text-gray-600",children:t})]}),tr=new Map,pe=new Set;function ar(){const t=[];return!!window.ethereum?.isMetaMask&&(pe.add("metamask"),t.push({name:"MetaMask",detected:!0,priority:1})),!!window.ethereum?.isCoinbaseWallet&&(pe.add("coinbase"),t.push({name:"Coinbase Wallet",detected:!0,priority:2})),!!window.solana?.isPhantom&&(pe.add("phantom"),t.push({name:"Phantom",detected:!0,priority:3})),t.push({name:"WalletConnect",detected:!0,priority:4}),t.sort((n,s)=>n.priority-s.priority)}function or(t){const e=`wallet-${t.toLowerCase()}`;if(tr.has(e))return tr.get(e);const a=()=>Promise.resolve({default:()=>y.createElement("div",{},`${t} Provider Placeholder`)}),o=y.lazy(a),n=s=>r.jsx(y.Suspense,{fallback:r.jsx(qi,{message:`Loading ${t} wallet...`,className:"wallet-loading"}),children:r.jsx(o,{...s})});return n.displayName=`Lazy${t}Provider`,tr.set(e,n),n}function _i({children:t}){const e=ar();return e.filter(a=>a.priority<=2&&a.detected).forEach(a=>{setTimeout(()=>{},1e3)}),r.jsxs(r.Fragment,{children:[e.map(a=>{const o=or(a.name);return r.jsx(o,{},a.name)}),t]})}const ir=class ir{static preloadWallet(e){const a=e.toLowerCase();this.preloadedWallets.has(a)||(this.preloadedWallets.add(a),setTimeout(()=>{or(e)},500))}static preloadCommonWallets(){["metamask","walletconnect","coinbase"].forEach((a,o)=>{setTimeout(()=>{this.preloadWallet(a)},o*1e3)})}static getPreloadedWallets(){return Array.from(this.preloadedWallets)}};ir.preloadedWallets=new Set;let ye=ir;function Gi(){return{availableWallets:ar(),preloadWallet:o=>{ye.preloadWallet(o)},getDetectedWallets:()=>Array.from(pe),hasWallet:o=>pe.has(o.toLowerCase())}}function Ki({walletName:t,onConnect:e,disabled:a=!1}){const o=()=>{ye.preloadWallet(t),setTimeout(e,100)};return r.jsxs("button",{onClick:o,disabled:a,className:"wallet-connect-btn","data-wallet":t.toLowerCase(),children:["Connect ",t]})}class Yi{constructor(){this.criticalResources=[],this.observedMetrics={fcp:0,lcp:0,fid:0,cls:0,ttfb:0},this.defineCriticalResources(),this.startPerformanceObservation()}defineCriticalResources(){this.criticalResources=[{url:"/assets/index-*.css",type:"style",priority:"critical",preload:!0},{url:"/assets/index-*.js",type:"script",priority:"critical"},{url:"/assets/react-core-*.js",type:"script",priority:"high",preload:!0},{url:"https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2",type:"font",priority:"critical",preload:!0},{url:"/logo.png",type:"image",priority:"high",preload:!0}]}startPerformanceObservation(){if("PerformanceObserver"in window)try{new PerformanceObserver(s=>{for(const l of s.getEntries())l.name==="first-contentful-paint"&&(this.observedMetrics.fcp=l.startTime,this.optimizeBasedOnFCP(l.startTime))}).observe({entryTypes:["paint"]}),new PerformanceObserver(s=>{for(const l of s.getEntries())this.observedMetrics.lcp=l.startTime,this.optimizeBasedOnLCP(l.startTime)}).observe({entryTypes:["largest-contentful-paint"]});let o=0;new PerformanceObserver(s=>{for(const l of s.getEntries())l.hadRecentInput||(o+=l.value);this.observedMetrics.cls=o}).observe({entryTypes:["layout-shift"]})}catch{}window.addEventListener("load",()=>{setTimeout(()=>{const e=performance.getEntriesByType("navigation")[0];e&&(this.observedMetrics.ttfb=e.responseStart-e.requestStart,this.optimizeBasedOnTTFB(this.observedMetrics.ttfb))},0)})}optimizeBasedOnFCP(e){e>2e3?this.applyEmergencyOptimizations():e>1500&&this.applyMediumOptimizations()}optimizeBasedOnLCP(e){e>2500&&this.optimizeLCPElements()}optimizeBasedOnTTFB(e){e>600&&this.enableAggressiveCaching()}applyEmergencyOptimizations(){document.querySelectorAll('img[data-priority="low"]').forEach(o=>{o.loading="lazy",o.style.display="none",setTimeout(()=>{o.style.display=""},3e3)}),document.querySelectorAll('script[data-priority="low"]').forEach(o=>{o.setAttribute("defer","")})}applyMediumOptimizations(){["/assets/app-core-*.js","/assets/react-router-*.js"].forEach(a=>{this.preloadResource(a,"script")})}optimizeLCPElements(){document.querySelectorAll("img[data-hero], [data-lcp-element]").forEach(o=>{o instanceof HTMLImageElement&&(o.fetchPriority="high",o.loading="eager")});const a=document.querySelector("img[data-hero]")?.getAttribute("src");a&&this.preloadResource(a,"image")}enableAggressiveCaching(){const e=document.createElement("meta");e.httpEquiv="Cache-Control",e.content="public, max-age=31536000, immutable",document.head.appendChild(e)}preloadResource(e,a){if(document.querySelector(`link[href*="${e}"]`))return;const n=document.createElement("link");switch(n.rel="preload",n.href=e,a){case"script":n.as="script";break;case"style":n.as="style";break;case"font":n.as="font",n.type="font/woff2",n.crossOrigin="";break;case"image":n.as="image";break}document.head.appendChild(n)}optimizeCriticalPath(){this.criticalResources.filter(e=>e.priority==="critical"&&e.preload).forEach(e=>{this.preloadResource(e.url,e.type)}),this.inlineCriticalCSS(),this.optimizeFontLoading(),this.removeRenderBlocking(),this.setupProgressiveLoading()}inlineCriticalCSS(){const e=document.querySelector('link[rel="stylesheet"][data-critical]');e&&this.isSmallResource(e.getAttribute("href")||"")&&fetch(e.getAttribute("href")||"").then(a=>a.text()).then(a=>{if(a.length<1e4){const o=document.createElement("style");o.textContent=a,document.head.appendChild(o),e.remove()}}).catch(()=>{})}optimizeFontLoading(){document.querySelectorAll('link[href*="fonts.googleapis.com"]').forEach(a=>{const o=a.getAttribute("href")||"";if(!o.includes("display=swap")){const n=o.includes("?")?"&":"?";a.setAttribute("href",`${o}${n}display=swap`)}})}removeRenderBlocking(){document.querySelectorAll('link[rel="stylesheet"]:not([data-critical])').forEach(a=>{const o=a.cloneNode(!0);o.rel="preload",o.as="style",o.onload=()=>{o.onload=null,o.rel="stylesheet"};const n=document.createElement("noscript"),s=a.cloneNode(!0);n.appendChild(s),document.head.appendChild(o),document.head.appendChild(n),a.remove()})}setupProgressiveLoading(){const e=document.querySelectorAll("img[data-src]");if("IntersectionObserver"in window){const a=new IntersectionObserver(o=>{o.forEach(n=>{if(n.isIntersecting){const s=n.target;s.src=s.dataset.src||"",s.removeAttribute("data-src"),a.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});e.forEach(o=>a.observe(o))}else e.forEach(a=>{const o=a;o.src=o.dataset.src||""})}isSmallResource(e){return e.includes("critical")||e.includes("inline")}getPerformanceMetrics(){return{...this.observedMetrics,score:this.calculatePerformanceScore()}}calculatePerformanceScore(){let e=100;return this.observedMetrics.fcp>2e3?e-=20:this.observedMetrics.fcp>1500&&(e-=10),this.observedMetrics.lcp>2500?e-=25:this.observedMetrics.lcp>2e3&&(e-=15),this.observedMetrics.cls>.1?e-=15:this.observedMetrics.cls>.05&&(e-=8),this.observedMetrics.ttfb>600?e-=10:this.observedMetrics.ttfb>400&&(e-=5),Math.max(e,0)}}const Le={mark:t=>{typeof performance<"u"&&performance.mark&&performance.mark(t)},measure:(t,e,a)=>{if(typeof performance<"u"&&performance.measure)try{performance.measure(t,e,a);const o=performance.getEntriesByName(t);return o[o.length-1]?.duration||0}catch{return 0}return 0},getEntries:t=>typeof performance<"u"&&performance.getEntriesByName?t?performance.getEntriesByName(t):performance.getEntries():[],clearEntries:t=>{typeof performance<"u"&&(t?(performance.clearMeasures?.(t),performance.clearMarks?.(t)):(performance.clearMeasures?.(),performance.clearMarks?.()))}},Qi=(t,e=[])=>{y.useEffect(()=>(Le.mark(`${t}-start`),()=>{Le.mark(`${t}-end`),Le.measure(t,`${t}-start`,`${t}-end`)}),[t,e])},Zi=t=>{const e=y.useRef(t);return e.current=t,y.useCallback((...a)=>e.current(...a),[])},Xi=(t,e,a)=>{const o=y.useRef(e),n=y.useRef(void 0);return y.useMemo(()=>(a&&process.env.NODE_ENV==="development"&&e.some((s,l)=>s!==o.current[l]),o.current=e,n.current=t(),n.current),[t,a,e])},Ie=new Map,Ji=t=>{const e=Ie.get(t)||0;Ie.set(t,e+1),y.useEffect(()=>{process.env.NODE_ENV})},Ri=()=>Object.fromEntries(Ie),ed=()=>Ie.clear(),rd=t=>y.lazy(t),td=(t=.1)=>{const[e,a]=y.useState(new Set),o=y.useRef(null);y.useEffect(()=>(o.current=new IntersectionObserver(s=>{s.forEach(l=>{if(l.isIntersecting){const g=l.target,c=g.dataset.src;c&&(g.src=c,g.onload=()=>{a(i=>new Set(i).add(c))},o.current?.unobserve(g))}})},{threshold:t}),()=>o.current?.disconnect()),[t]);const n=y.useCallback(s=>{s&&o.current&&o.current.observe(s)},[]);return{loadedImages:e,observeImage:n}},ad=t=>{typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{t().catch(()=>{})}):setTimeout(()=>{t().catch(()=>{})},100)},at={},od=t=>{at[t.name]=t.value,process.env.NODE_ENV},nd=()=>at,sd=(t,e="script")=>{if(typeof document<"u"){const a=document.createElement("link");a.rel="prefetch",a.href=t,a.as=e,document.head.appendChild(a)}},ld=(t,e="script",a)=>{if(typeof document<"u"){const o=document.createElement("link");o.rel="preload",o.href=t,o.as=e,a&&(o.crossOrigin="anonymous"),document.head.appendChild(o)}},id=t=>{const e=y.useRef(new Set),a=y.useRef(new Set),o=y.useCallback((s,l)=>{const g=setTimeout(()=>{e.current.delete(g),s()},l);return e.current.add(g),g},[]),n=y.useCallback((s,l)=>{const g=setInterval(s,l);return a.current.add(g),g},[]);return y.useEffect(()=>{const s=e.current,l=a.current;return()=>{s.forEach(g=>clearTimeout(g)),l.forEach(g=>clearInterval(g)),process.env.NODE_ENV}},[t]),{createTimer:o,createInterval:n}},Z={maxBundleSize:500,maxChunkSize:200,maxImageSize:100,maxFCP:1800,maxLCP:2500,maxFID:100,maxCLS:.1,check:t=>{const e=[];return t.FCP&&t.FCP>Z.maxFCP&&e.push(`FCP (${t.FCP}ms) exceeds budget (${Z.maxFCP}ms)`),t.LCP&&t.LCP>Z.maxLCP&&e.push(`LCP (${t.LCP}ms) exceeds budget (${Z.maxLCP}ms)`),t.FID&&t.FID>Z.maxFID&&e.push(`FID (${t.FID}ms) exceeds budget (${Z.maxFID}ms)`),t.CLS&&t.CLS>Z.maxCLS&&e.push(`CLS (${t.CLS}) exceeds budget (${Z.maxCLS})`),e}};class dd{constructor(e){this.metrics={timestamp:Date.now()},this.observers=[],this.performanceMarks=new Map,this.reportCallback=e,this.initializeWebVitals(),this.initializeCustomObservers(),this.collectDeviceInfo()}initializeWebVitals(){ge.onCLS(e=>{this.metrics.CLS=e.value,this.reportMetric("CLS",e.value)}),ge.onINP(e=>{this.metrics.INP=e.value,this.reportMetric("INP",e.value)}),ge.onFCP(e=>{this.metrics.FCP=e.value,this.reportMetric("FCP",e.value)}),ge.onLCP(e=>{this.metrics.LCP=e.value,this.reportMetric("LCP",e.value)}),ge.onTTFB(e=>{this.metrics.TTFB=e.value,this.reportMetric("TTFB",e.value)})}initializeCustomObservers(){if("PerformanceObserver"in window){const e=new PerformanceObserver(o=>{o.getEntries().forEach(s=>{if(s.entryType==="navigation"){const l=s;this.metrics.bundleLoadTime=l.loadEventEnd-l.fetchStart}})});try{e.observe({entryTypes:["navigation"]}),this.observers.push(e)}catch{}const a=new PerformanceObserver(o=>{o.getEntries().forEach(s=>{(s.name.includes(".js")||s.name.includes(".css"))&&this.trackResourceLoad(s.name,s.duration)})});try{a.observe({entryTypes:["resource"]}),this.observers.push(a)}catch{}}}collectDeviceInfo(){if(typeof window<"u"){const e=navigator;e.connection&&(this.metrics.connection=e.connection.effectiveType||e.connection.type),e.deviceMemory&&(this.metrics.deviceMemory=e.deviceMemory),e.hardwareConcurrency&&(this.metrics.hardwareConcurrency=e.hardwareConcurrency),this.metrics.viewport={width:window.innerWidth,height:window.innerHeight}}}reportMetric(e,a){this.reportCallback&&this.reportCallback({...this.metrics,timestamp:Date.now()}),process.env.NODE_ENV}trackResourceLoad(e,a){const o=e.includes(".js"),n=e.includes(".css");if(o||n){const s=o?"JavaScript":"CSS";this.reportMetric(`${s} Load`,a)}}measureComponentRender(e,a){this.metrics.componentRenderTime=a,this.reportMetric(`Component Render (${e})`,a)}measureAPICall(e,a){this.metrics.apiResponseTime=a,this.reportMetric(`API Call (${e})`,a)}measureRouteChange(e,a){this.metrics.routeChangeTime=a,this.reportMetric(`Route Change (${e})`,a)}markStart(e){this.performanceMarks.set(e,performance.now())}markEnd(e){const a=this.performanceMarks.get(e);if(a){const o=performance.now()-a;this.reportMetric(`Mark (${e})`,o),this.performanceMarks.delete(e)}}trackRouteChange(e,a,o){typeof a=="string"?this.measureRouteChange(a,o||performance.now()):this.measureRouteChange(e,a)}getSummary(){return{coreWebVitals:{score:this.calculateScore(),LCP:this.metrics.LCP,INP:this.metrics.INP,CLS:this.metrics.CLS},loadingPerformance:{FCP:this.metrics.FCP,TTFB:this.metrics.TTFB,bundleLoadTime:this.metrics.bundleLoadTime},runtime:{routeChangeTime:this.metrics.routeChangeTime,apiResponseTime:this.metrics.apiResponseTime,componentRenderTime:this.metrics.componentRenderTime},device:{connection:this.metrics.connection,deviceMemory:this.metrics.deviceMemory,hardwareConcurrency:this.metrics.hardwareConcurrency}}}calculateScore(){let e=100;return this.metrics.LCP&&this.metrics.LCP>2500?e-=25:this.metrics.LCP&&this.metrics.LCP>2e3&&(e-=15),this.metrics.INP&&this.metrics.INP>200?e-=20:this.metrics.INP&&this.metrics.INP>100&&(e-=10),this.metrics.CLS&&this.metrics.CLS>.1?e-=15:this.metrics.CLS&&this.metrics.CLS>.05&&(e-=8),Math.max(e,0)}getMetrics(){return{...this.metrics}}cleanup(){this.observers.forEach(e=>e.disconnect()),this.observers=[]}}let Me=null;const cd=t=>(Me||(Me=new dd(t)),Me),$e=()=>Me,ot=t=>{const e=y.useRef(performance.now());y.useEffect(()=>{const a=performance.now()-e.current,o=$e();o&&o.measureComponentRender(t,a)},[t])},gd=(t,e)=>y.forwardRef((a,o)=>(ot(e),y.createElement(t,{...a,ref:o}))),ud=async(t,e)=>{const a=performance.now(),o=await t(),n=performance.now()-a,s=$e();return s&&s.measureAPICall(e,n),o},nt={LCP:2500,INP:200,CLS:.1,FCP:1800,TTFB:800,bundleSize:17e4},hd=(t,e=nt)=>{const a=[];return e.LCP&&t.LCP&&t.LCP>e.LCP&&a.push(`LCP: ${t.LCP.toFixed(0)}ms (budget: ${e.LCP}ms)`),e.INP&&t.INP&&t.INP>e.INP&&a.push(`INP: ${t.INP.toFixed(0)}ms (budget: ${e.INP}ms)`),e.CLS&&t.CLS&&t.CLS>e.CLS&&a.push(`CLS: ${t.CLS.toFixed(3)} (budget: ${e.CLS})`),e.FCP&&t.FCP&&t.FCP>e.FCP&&a.push(`FCP: ${t.FCP.toFixed(0)}ms (budget: ${e.FCP}ms)`),e.TTFB&&t.TTFB&&t.TTFB>e.TTFB&&a.push(`TTFB: ${t.TTFB.toFixed(0)}ms (budget: ${e.TTFB}ms)`),{passed:a.length===0,violations:a}},bd=t=>{const e=t||$e()?.getMetrics()||{timestamp:Date.now()},a={timestamp:new Date().toISOString(),metrics:e,environment:{userAgent:typeof window<"u"?window.navigator.userAgent:"unknown",url:typeof window<"u"?window.location.href:"unknown",referrer:typeof document<"u"?document.referrer:"unknown",viewport:e.viewport,connection:e.connection,deviceMemory:e.deviceMemory,hardwareConcurrency:e.hardwareConcurrency}};return JSON.stringify(a,null,2)},fd=(t={})=>{const{successMessage:e="",successDuration:a=3e3,errorPrefix:o="",onSuccess:n,onError:s}=t,[l,g]=y.useState(!1),[c,i]=y.useState(""),[h,b]=y.useState(""),x=y.useCallback(()=>{i(""),b("")},[]),m=y.useCallback(()=>{i("")},[]),f=y.useCallback(()=>{b("")},[]),p=y.useCallback(async C=>{g(!0),x();try{await C(),e&&(i(e),a>0&&setTimeout(()=>{i("")},a)),n&&n()}catch(S){const k=S instanceof Error?S.message:"An error occurred";throw b(o?`${o}: ${k}`:k),s&&S instanceof Error&&s(S),S}finally{g(!1)}},[e,a,o,n,s,x]);return{isSubmitting:l,successMessage:c,errorMessage:h,submit:p,clearMessages:x,clearSuccess:m,clearError:f}},pd=(t=!1)=>{const[e,a]=y.useState(t),o=y.useCallback(()=>a(!0),[]),n=y.useCallback(()=>a(!1),[]),s=y.useCallback(()=>a(l=>!l),[]);return{value:e,setTrue:o,setFalse:n,toggle:s,setValue:a}},yd=t=>{if(t===0)return"0 Bytes";const e=1024,a=["Bytes","KB","MB","GB","TB"],o=Math.floor(Math.log(t)/Math.log(e)),n=Math.min(o,a.length-1);return parseFloat((t/Math.pow(e,n)).toFixed(2))+" "+a[n]},md=(t,e,a)=>{const o={bytes:0,kb:1,mb:2,gb:3,tb:4},n=1024,l=t*Math.pow(n,o[e])/Math.pow(n,o[a]);return Math.round(l*100)/100},vd=t=>{const e=t.match(/^(\d+(?:\.\d+)?)\s*(bytes?|kb|mb|gb|tb)$/i);if(!e)return null;const a=parseFloat(e[1]),o=e[2].toLowerCase(),s={bytes:1,byte:1,kb:1024,mb:1024*1024,gb:1024*1024*1024,tb:1024*1024*1024*1024}[o];return s?Math.round(a*s):null},xd=t=>t,kd=t=>{if(typeof document>"u")return;const e=document.createElement("style");e.textContent=t,e.setAttribute("data-critical","true"),document.head.appendChild(e)},wd=t=>{if(typeof document>"u")return;const e=document.createElement("link");e.rel="preload",e.as="style",e.href=t,e.onload=()=>{e.rel="stylesheet"},document.head.appendChild(e);const a=document.createElement("noscript");a.innerHTML=`<link rel="stylesheet" href="${t}">`,document.head.appendChild(a)},Cd=t=>{const e={};return Object.entries(t).forEach(([a,o])=>{e[`--${a}`]=typeof o=="number"?`${o}px`:o}),e},Nd={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Sd=(t,e=Nd)=>{const[a,o]=y.useState("base");return y.useEffect(()=>{const n=()=>{const s=window.innerWidth;s>=e["2xl"]?o("2xl"):s>=e.xl?o("xl"):s>=e.lg?o("lg"):s>=e.md?o("md"):s>=e.sm?o("sm"):s>=e.xs?o("xs"):o("base")};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),t[a]||t.base||{}},st=()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,Ed=()=>{const[t,e]=y.useState(st);return y.useEffect(()=>{const a=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{e(a.matches)};return a.addEventListener?a.addEventListener("change",o):a.addListener(o),()=>{a.removeEventListener?a.removeEventListener("change",o):a.removeListener(o)}},[]),t},Ld=(t,e=["layout","paint"])=>{t&&(t.style.contain=e.join(" "))},Id=(t,e)=>t?(t.style.willChange=e.join(", "),()=>{t.style.willChange="auto"}):void 0,Md=t=>{typeof window>"u"||requestAnimationFrame(()=>{t.forEach(e=>e())})},$d=(...t)=>t.filter(Boolean).join(" "),Ud=t=>{const e={},a=["display","position","width","height","margin","padding","fontSize","fontFamily","color","backgroundColor"];return Object.entries(t).forEach(([o,n])=>{a.includes(o)&&(e[o]=n)}),e},Td=(t,e=[])=>{const[a,o]=y.useState(null),[n,s]=y.useState(!0);return y.useEffect(()=>{let l=!0;return t().then(g=>{l&&(o(g.default),s(!1))}),()=>{l=!1}},[t,...e]),{styles:a,loading:n}},Ad=(t,e="1rem")=>({display:"grid",gridTemplateColumns:`repeat(${t}, minmax(0, 1fr))`,gap:e,contain:"layout",willChange:"transform"}),Pd=(t="row",e="center",a="flex-start")=>({display:"flex",flexDirection:t,alignItems:e,justifyContent:a,contain:"layout"}),zd=t=>{const[e,a]=y.useState(!1);return y.useEffect(()=>{const o=window.matchMedia(t);a(o.matches);const n=()=>a(o.matches);return o.addEventListener?o.addEventListener("change",n):o.addListener(n),()=>{o.removeEventListener?o.removeEventListener("change",n):o.removeListener(n)}},[t]),e},Dd=(t,e)=>{const[a,o]=y.useState("light");return y.useEffect(()=>{const n=window.matchMedia("(prefers-color-scheme: dark)");o(n.matches?"dark":"light");const s=()=>{o(n.matches?"dark":"light")};return n.addEventListener?n.addEventListener("change",s):n.addListener(s),()=>{n.removeEventListener?n.removeEventListener("change",s):n.removeListener(s)}},[]),a==="dark"?e:t},jd=t=>{const e={src:t.src,alt:t.alt,loading:t.loading||"lazy"};return t.title&&(e.title=t.title),t.width&&(e.width=t.width),t.height&&(e.height=t.height),t.sizes&&(e.sizes=t.sizes),t.srcSet&&(e.srcSet=t.srcSet),e.itemProp="image",e},Bd=(t,e=[320,640,768,1024,1280,1920])=>e.map(a=>`${t.replace(/\{width\}/g,a.toString())} ${a}w`).join(", "),Wd=t=>t.map(e=>e.maxWidth?`(max-width: ${e.maxWidth}px) ${e.size}`:e.size).join(", "),Od=(t,e="openGraph")=>{const a={};return e==="openGraph"?(a["og:image"]=t.url,t.width&&(a["og:image:width"]=t.width.toString()),t.height&&(a["og:image:height"]=t.height.toString()),t.alt&&(a["og:image:alt"]=t.alt),t.type&&(a["og:image:type"]=t.type)):(a["twitter:image"]=t.url,t.alt&&(a["twitter:image:alt"]=t.alt)),a},Fd=(t='img[loading="lazy"]')=>{if(typeof window>"u"||!("IntersectionObserver"in window))return;const e=document.querySelectorAll(t);if("loading"in HTMLImageElement.prototype){e.forEach(o=>{o.dataset.src&&(o.src=o.dataset.src)});return}const a=new IntersectionObserver(o=>{o.forEach(n=>{if(n.isIntersecting){const s=n.target;s.dataset.src&&(s.src=s.dataset.src,s.removeAttribute("data-src")),s.dataset.srcset&&(s.srcset=s.dataset.srcset,s.removeAttribute("data-srcset")),a.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});return e.forEach(o=>a.observe(o)),()=>{e.forEach(o=>a.unobserve(o))}},lt=()=>typeof window>"u"?Promise.resolve(!1):new Promise(t=>{const e=new Image;e.onload=e.onerror=function(){t(e.height===2)},e.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"}),it=()=>typeof window>"u"?Promise.resolve(!1):new Promise(t=>{const e=new Image;e.onload=()=>t(!0),e.onerror=()=>t(!1),e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="}),Vd=async(t="jpg")=>{const[e,a]=await Promise.all([lt(),it()]);return a?"avif":e?"webp":t},Hd=(t,e,a,o)=>`
|
|
33
|
+
`+t)}`,messages:(t,e)=>`sms:?&body=${encodeURIComponent(e+" "+t)}`},Gs=({shareConfig:t})=>{const[e,a]=p.useState(!1),[o,n]=p.useState(""),[s,l]=p.useState(!1),[g,i]=p.useState(!1),[c,h]=p.useState(!1);p.useEffect(()=>{const w=t.onBeforeShare;w&&!o&&(async()=>{l(!0);try{const v=typeof window<"u"?window.location.href:"",x=await w(v);n(x)}catch{const v=typeof window<"u"?window.location.href:"";n(v)}finally{l(!1)}})()},[t,o]);const b=o||(typeof window<"u"?window.location.href:""),k=typeof navigator<"u"&&navigator.share!==void 0,m=async()=>{if(!(!k||c)){h(!0);try{await navigator.share({title:t.title,text:t.description,url:b}),a(!1)}catch(w){w instanceof Error&&w.name!=="AbortError"&&(console.error("Share failed:",w),w.name!=="InvalidStateError"&&a(!0))}finally{h(!1)}}},f=async()=>{try{await navigator.clipboard.writeText(b),i(!0),setTimeout(()=>{i(!1),a(!1)},1500)}catch{}},y=()=>{a(!e)},C=w=>{window.open(w,"_blank","noopener,noreferrer,width=600,height=400"),a(!1)},S=[{name:"Twitter",url:Y.twitter(b,t.title,t.hashtags),color:"text-blue-400",svg:r.jsx("path",{d:"M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84"})},{name:"Facebook",url:Y.facebook(b),color:"text-blue-600",svg:r.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})},{name:"LinkedIn",url:Y.linkedin(b,t.title,t.description),color:"text-blue-700",svg:r.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})},{name:"Reddit",url:Y.reddit(b,t.title),color:"text-orange-600",svg:r.jsx("path",{d:"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"})},{name:"Telegram",url:Y.telegram(b,t.title),color:"text-blue-500",svg:r.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})},{name:"WhatsApp",url:Y.whatsapp(b,t.title),color:"text-green-600",svg:r.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"})},{name:"Discord",url:Y.discord(b,t.title),color:"text-indigo-500",svg:r.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})},{name:"Messages",url:Y.messages(b,t.title),color:"text-green-500",svg:r.jsx("path",{d:"M.05 3.555A3 3 0 013 0h18a3 3 0 012.95 3.555L22 11v8a3 3 0 01-3 3H5a3 3 0 01-3-3v-8l-1.95-7.445zM2 10.938V19a1 1 0 001 1h18a1 1 0 001-1v-8.062L20 19H4l-2-8.062zM3.38 2L5 8h14l1.62-6H3.38z"})},{name:"Email",url:Y.email(b,t.title,t.description),color:"text-gray-600",svg:r.jsx("path",{d:"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"})}];return r.jsxs("div",{className:"relative",children:[r.jsx("button",{onClick:y,disabled:s||c,className:"flex items-center justify-center w-8 h-8 bg-blue-50 hover:bg-blue-100 dark:bg-blue-900/30 dark:hover:bg-blue-900/50 text-blue-600 dark:text-blue-400 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Share this page",children:s||c?r.jsx("div",{className:"w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"}):r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"})})}),e&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-[999998]",onClick:()=>a(!1)}),r.jsxs("div",{className:"absolute right-0 top-10 z-[999999] w-40 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 py-1",children:[S.map(w=>r.jsxs("button",{onClick:()=>C(w.url),className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[r.jsx("svg",{className:`w-4 h-4 mr-2 ${w.color}`,fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:w.svg}),r.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:w.name})]},w.name)),r.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),k&&r.jsxs("button",{onClick:()=>{a(!1),m()},disabled:c,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors disabled:opacity-50",children:[r.jsx("svg",{className:"w-4 h-4 mr-2 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"})}),r.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"More..."})]}),r.jsxs("button",{onClick:f,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[r.jsx("svg",{className:"w-4 h-4 mr-2 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})}),r.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:g?"Copied!":"Copy Link"})]})]})]})]})},Ur=({items:t,shareConfig:e,className:a,showHome:o})=>r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("nav",{"aria-label":"Breadcrumb",children:r.jsx("ol",{className:"flex items-center text-sm space-x-2",children:t.map((n,s)=>r.jsxs(p.Fragment,{children:[r.jsx("li",{children:n.current?r.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:n.label}):r.jsx($e.Link,{to:n.href||"#",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors",children:n.label})}),s<t.length-1&&r.jsx("li",{children:r.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"/"})})]},s))})}),e&&r.jsx(Gs,{shareConfig:e})]}),Ks=({items:t,shareConfig:e})=>r.jsx("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 relative z-50",children:r.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3 relative",children:r.jsx(Ur,{items:t,shareConfig:e})})}),Pr=t=>{const[e,a]=p.useState(""),[o,n]=p.useState(!0),[s,l]=p.useState(null);return p.useEffect(()=>{t&&(async()=>{try{n(!0),l(null);const i=await fetch(`/code/${t}`);if(!i.ok)throw new Error(`Failed to load code file: ${t}`);const c=await i.text();a(c)}catch(i){l(i instanceof Error?i.message:"Unknown error"),a("// Error loading code file")}finally{n(!1)}})()},[t]),{code:e,loading:o,error:s}},Ys=({filename:t,code:e,language:a,title:o,className:n="",showCopy:s=!0,showHeader:l=!0})=>{const{t:g}=cr.useTranslation("codeBlock"),{code:i,loading:c,error:h}=Pr(t||""),[b,k]=p.useState(!1),m=e||i,y=a||(t?(S=>{switch(S.split(".").pop()?.toLowerCase()){case"sol":return"solidity";case"js":case"mjs":return"javascript";case"ts":return"typescript";case"sh":return"bash";case"graphql":return"graphql";case"json":return"json";case"css":return"css";case"html":return"html";case"jsx":return"jsx";case"tsx":return"tsx";case"py":return"python";case"java":return"java";case"cpp":case"c":return"cpp";case"go":return"go";case"rs":return"rust";case"php":return"php";case"rb":return"ruby";default:return"text"}})(t):"text"),C=async()=>{if(m)try{await navigator.clipboard.writeText(m),k(!0),setTimeout(()=>k(!1),2e3)}catch{}};return t&&c?r.jsx("div",{className:`bg-gray-900 text-green-400 rounded-lg p-4 font-mono text-sm ${n}`,children:r.jsx("div",{className:"animate-pulse text-gray-500",children:g("loadingCode","Loading code...")})}):t&&h?r.jsxs("div",{className:`bg-gray-900 text-red-400 rounded-lg p-4 font-mono text-sm ${n}`,children:[g("error","Error"),": ",h]}):m?r.jsxs("div",{className:`bg-gray-900 rounded-lg border border-green-500/20 shadow-lg shadow-green-500/10 ${n}`,children:[l&&r.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-green-500/20 bg-gray-800/50",children:[r.jsx("span",{className:"text-sm text-green-400 font-mono",children:o||t||`${y} code`}),s&&r.jsx("button",{onClick:C,className:"p-2 text-gray-400 hover:text-green-400 hover:bg-gray-800 rounded-lg transition-all duration-200 group",title:g("copyCode","Copy code"),children:b?r.jsx(T.CheckIcon,{className:"h-4 w-4 text-green-400"}):r.jsx(T.ClipboardDocumentIcon,{className:"h-4 w-4 group-hover:scale-110 transition-transform"})})]}),r.jsx("div",{className:"p-4 overflow-x-auto text-left",children:r.jsx("pre",{className:`text-sm language-${y}`,children:r.jsx("code",{className:"text-gray-100",children:m})})})]}):r.jsx("div",{className:`bg-gray-900 text-gray-400 rounded-lg p-4 font-mono text-sm ${n}`,children:g("noCode","No code to display")})},Qs=({subsections:t,isExpanded:e,selectedSubsection:a,parentSectionId:o,onSubsectionSelect:n})=>{const s=p.useRef(null),[l,g]=p.useState(void 0);return p.useLayoutEffect(()=>{if(s.current){const i=s.current.scrollHeight;g(e?i+16:0)}},[e,t]),r.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:l!==void 0?`${l}px`:"auto"},children:r.jsx("div",{ref:s,className:"ml-6 mt-1 mb-1 space-y-1",children:t.map(i=>r.jsxs("div",{className:"relative group",children:[a===i.id&&r.jsx("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"}),a!==i.id&&r.jsx("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"}),r.jsx("button",{onClick:()=>n?.(i.id,o),className:`relative z-10 block w-full text-left pl-4 pr-3 py-2 rounded-md text-sm transition-all duration-200 ${a===i.id?"text-blue-700 dark:text-blue-300":"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"}`,children:i.title})]},i.id))})})},Zs=({id:t,title:e,content:a,subsections:o,isSelected:n=!1,selectedSubsection:s=null,onSectionSelect:l,onSubsectionSelect:g,className:i=""})=>{const[c,h]=p.useState(!1),b=()=>{h(!c)},k=()=>{l?.(t)},m=o&&o.length>0;return r.jsxs("div",{className:i,children:[r.jsxs("div",{className:"relative flex items-center group",children:[n&&!s&&r.jsx("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"}),!(n&&!s)&&r.jsx("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"}),r.jsx("button",{onClick:k,className:`relative z-10 flex-1 text-left pl-5 pr-3 py-4 text-base font-medium transition-all duration-200 ${n&&!s?"text-blue-700 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100"}`,children:e}),m&&r.jsx("button",{onClick:b,className:"p-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200","aria-label":c?"Collapse section":"Expand section",children:r.jsx(T.ChevronRightIcon,{className:`h-5 w-5 text-gray-500 transition-transform duration-300 ease-in-out ${c?"rotate-90":"rotate-0"}`})})]}),m&&r.jsx(Qs,{subsections:o,isExpanded:c,selectedSubsection:s,parentSectionId:t,onSubsectionSelect:g})]})},Xs=({title:t,subtitle:e,buttonText:a,buttonIcon:o="envelope",variant:n="default",badgeText:s="FREE",prominentBadgeText:l="100% Free",onButtonClick:g,className:i=""})=>{const c=()=>o==="envelope"||o==="both"?r.jsx(T.EnvelopeIcon,{className:n==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1"}):o==="none"?null:r.jsx("svg",{className:n==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"})}),h=()=>o==="arrow"||o==="both"?r.jsx(T.ArrowRightIcon,{className:"h-4 w-4 ml-2"}):null,b=()=>n==="prominent"?"border-b-2 border-green-200 dark:border-green-700":"border-b border-green-200 dark:border-green-700",k=()=>{const y="bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 text-white rounded-lg font-bold transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-green-500/25 inline-flex items-center whitespace-nowrap cursor-pointer";return n==="prominent"?`${y} px-8 py-3 text-base`:`${y} px-6 py-2 text-sm`},m=()=>n==="prominent"?"text-green-800 dark:text-green-200 font-semibold text-lg":"text-green-800 dark:text-green-200 font-semibold",f=n==="prominent"?l:s;return r.jsx("div",{className:`bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 ${b()} ${i}`,children:r.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:r.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4",children:[r.jsxs("div",{className:`flex items-center ${n==="prominent"?"text-center sm:text-left":""}`,children:[r.jsx("div",{className:"bg-green-500 text-white text-xs font-bold px-3 py-1 rounded-full mr-3 animate-pulse",children:f}),r.jsxs("div",{children:[r.jsx("span",{className:m(),children:t}),e&&r.jsx("span",{className:"text-green-700 dark:text-green-300 text-sm block",children:e})]})]}),r.jsxs("button",{onClick:g,className:k(),children:[c(),a,h()]})]})})})},Js=({children:t,onClick:e,variant:a,size:o,disabled:n,className:s,type:l,trackingLabel:g,actionType:i,componentName:c,onTrack:h,trackingParams:b={},...k})=>{const m=f=>{if(h){const y=g||(typeof t=="string"?t:"")||"Unknown Button",S=a&&["default","primary","secondary","outline","ghost","destructive","link"].includes(a)?a:"default";h({button_text:y,button_type:S,component_name:c,action_type:i,...b})}e&&e(f)};return r.jsx(J,{...k,variant:a,size:o,disabled:n,className:s,type:l,onClick:m,children:t})},zr={en:{name:"English",flag:"🇺🇸"},ar:{name:"العربية",flag:"🇸🇦"},de:{name:"Deutsch",flag:"🇩🇪"},es:{name:"Español",flag:"🇪🇸"},fr:{name:"Français",flag:"🇫🇷"},it:{name:"Italiano",flag:"🇮🇹"},ja:{name:"日本語",flag:"🇯🇵"},ko:{name:"한국어",flag:"🇰🇷"},pt:{name:"Português",flag:"🇵🇹"},ru:{name:"Русский",flag:"🇷🇺"},sv:{name:"Svenska",flag:"🇸🇪"},th:{name:"ไทย",flag:"🇹🇭"},uk:{name:"Українська",flag:"🇺🇦"},vi:{name:"Tiếng Việt",flag:"🇻🇳"},zh:{name:"简体中文",flag:"🇨🇳"}},Rs=({variant:t="compact",className:e=""})=>{const{i18n:a,t:o}=cr.useTranslation("languageSelector"),[n,s]=p.useState(a.language),l=p.useMemo(()=>a.options.supportedLngs?a.options.supportedLngs.filter(c=>c!=="cimode").map(c=>({code:c,name:zr[c]?.name||c.toUpperCase(),flag:zr[c]?.flag||"🌐"})).sort((c,h)=>c.name.localeCompare(h.name)):[],[a.options.supportedLngs]),g=l.find(c=>c.code===n||c.code.toLowerCase()===n.toLowerCase());p.useEffect(()=>{s(a.language)},[a.language]);const i=c=>{localStorage.setItem("language",c),a.changeLanguage(c).then(()=>{s(a.language),setTimeout(()=>{window.dispatchEvent(new Event("languagechange"))},100)}).catch(()=>{})};return t==="compact"?r.jsx("div",{className:`relative ${e}`,children:r.jsxs(Mr,{value:n,onValueChange:i,children:[r.jsx(Be,{className:"h-10 w-auto px-3 border-0 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-0 focus:ring-offset-0",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:"text-lg leading-none",children:g?.flag}),r.jsx("span",{className:"hidden sm:block text-sm font-medium text-gray-700 dark:text-gray-300",children:g?.name})]})}),r.jsx(Oe,{children:l.map(c=>r.jsx(We,{value:c.code,className:"cursor-pointer",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:"text-lg leading-none",children:c.flag}),r.jsx("span",{className:"text-sm",children:c.name})]})},c.code))})]})}):r.jsxs("div",{className:`space-y-2 ${e}`,children:[r.jsxs("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 flex items-center space-x-2",children:[r.jsx(T.LanguageIcon,{className:"h-4 w-4 text-gray-500 dark:text-gray-400"}),r.jsx("span",{children:o("language","Language")})]}),r.jsxs(Mr,{value:n,onValueChange:i,children:[r.jsx(Be,{children:r.jsx(nn,{placeholder:o("selectLanguage","Select language")})}),r.jsx(Oe,{children:l.map(c=>r.jsx(We,{value:c.code,className:"cursor-pointer",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:"text-lg leading-none",children:c.flag}),r.jsx("span",{children:c.name})]})},c.code))})]}),r.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:o("selectPreferredLanguage","Select your preferred language")})]})},el=({items:t,type:e="ordered",variant:a="default",className:o,itemClassName:n})=>{const s=()=>{const c="space-y-2",h={ordered:e==="ordered"?"list-decimal":"",unordered:e==="unordered"?"list-disc":""},b={default:"list-inside",enhanced:"list-inside space-y-3",minimal:"list-none space-y-1"};return u(c,h[e],b[a])},l=c=>{const h="text-gray-600 dark:text-gray-400";return a==="enhanced"?u(h,"relative pl-8 pb-2 border-l-2 border-gray-200 dark:border-gray-700",c===t.length-1&&"border-l-transparent"):a==="minimal"?u(h,"flex items-start"):h},g=c=>a==="enhanced"&&e==="ordered"?r.jsx("div",{className:"absolute -left-4 -top-1 w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-medium",children:c+1}):null,i=(c,h)=>{const b=typeof c=="object",k=b?c.content:c,m=b?c.subItems:void 0;return r.jsxs("li",{className:u(l(h),n),children:[g(h),a==="minimal"&&e==="ordered"&&r.jsx("span",{className:"inline-block w-6 h-6 bg-blue-100 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 rounded-full text-sm font-medium text-center leading-6 mr-3 flex-shrink-0",children:h+1}),a==="minimal"&&e==="unordered"&&r.jsx("span",{className:"inline-block w-2 h-2 bg-blue-600 rounded-full mt-2 mr-3 flex-shrink-0"}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{children:k}),m&&m.length>0&&r.jsx("ul",{className:"mt-2 ml-4 space-y-1 list-disc list-inside text-sm text-gray-500 dark:text-gray-500",children:m.map((f,y)=>r.jsx("li",{children:f},y))})]})]},h)};return r.jsx("ul",{className:u(s(),o),children:t.map(i)})};class rl extends p.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,a){console.error("ErrorBoundary caught an error:",e,a),this.props.onError?.(e,a)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:r.jsxs("div",{style:{padding:"20px",border:"1px solid red",margin:"10px"},children:[r.jsx("h2",{children:"Something went wrong"}),r.jsxs("p",{children:["Error: ",this.state.error?.message||"Unknown error"]}),r.jsx("button",{onClick:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}}class tl extends p.Component{constructor(e){super(e),this.retryTimer=null,this.sendErrorToMonitoring=(a,o)=>{try{typeof window<"u"&&window.Sentry&&window.Sentry?.captureException(a,{contexts:{react:{componentStack:o.componentStack}},tags:{errorBoundary:!0,componentName:this.props.componentName||"unknown",lazyLoading:!0}}),typeof window<"u"&&window.gtag&&window.gtag?.("event","exception",{description:a.message,fatal:!1,custom_map:{component:this.props.componentName||"unknown"}})}catch{}},this.handleRetry=()=>{const{maxRetries:a=3,retryDelay:o=1e3}=this.props,{retryCount:n}=this.state;if(n>=a)return;this.setState({isRetrying:!0}),this.retryTimer&&clearTimeout(this.retryTimer);const s=o*Math.pow(2,n);this.retryTimer=setTimeout(()=>{this.setState({hasError:!1,error:null,errorInfo:null,retryCount:n+1,isRetrying:!1})},s)},this.handleReload=()=>{window.location.reload()},this.state={hasError:!1,error:null,errorInfo:null,retryCount:0,isRetrying:!1,lastErrorTime:0}}static getDerivedStateFromError(e){return{hasError:!0,error:e,lastErrorTime:Date.now()}}componentDidCatch(e,a){const{onError:o,componentName:n}=this.props;this.setState({error:e,errorInfo:a}),console.error(`LazyErrorBoundary caught an error in ${n||"Unknown Component"}:`,e,a),o?.(e,a),this.sendErrorToMonitoring(e,a)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){const{children:e,fallback:a,componentName:o,showRetryButton:n=!0,maxRetries:s=3}=this.props,{hasError:l,error:g,isRetrying:i,retryCount:c}=this.state;return l&&g?a||r.jsx("div",{className:"lazy-error-boundary error-boundary-container",children:r.jsxs("div",{className:"error-content",children:[r.jsx("div",{className:"error-icon",children:"⚠️"}),r.jsxs("h3",{className:"error-title",children:["Something went wrong loading ",o||"this component"]}),r.jsxs("div",{className:"error-details",children:[r.jsx("p",{className:"error-message",children:g.message}),process.env.NODE_ENV==="development"&&r.jsxs("details",{className:"error-stack",children:[r.jsx("summary",{children:"Error Details (Development)"}),r.jsx("pre",{children:g.stack})]})]}),r.jsxs("div",{className:"error-actions",children:[n&&c<s&&r.jsx("button",{onClick:this.handleRetry,disabled:i,className:"retry-button",children:i?"Retrying...":`Retry (${c}/${s})`}),c>=s&&r.jsx("button",{onClick:this.handleReload,className:"reload-button",children:"Reload Page"})]}),r.jsxs("div",{className:"error-help",children:[r.jsx("p",{children:"This might be a temporary issue. Try refreshing the page."}),navigator.onLine===!1&&r.jsx("p",{className:"offline-notice",children:"You appear to be offline. Check your connection and try again."})]})]})}):e}}const al=({children:t})=>r.jsx(r.Fragment,{children:t}),ol=({children:t})=>r.jsx(r.Fragment,{children:t}),nl=(t,e,a)=>{const o=p.memo(t,e);return a&&(o.displayName=`Memo(${a})`),process.env.NODE_ENV==="development"?n=>(p.useMemo(()=>{let l=0;return()=>++l},[])(),r.jsx(o,{...n})):o},sl=(t,e)=>p.memo(t,(a,o)=>e.every(n=>a[n]===o[n])),ll=p.memo(({children:t,compute:e,deps:a})=>{const o=p.useRef(a),n=p.useRef(e),s=p.useRef(void 0),l=p.useMemo(()=>{const g=a.length!==o.current.length||a.some((c,h)=>c!==o.current[h]),i=e!==n.current;if(g||i||s.current===void 0){let c;return process.env.NODE_ENV==="development"?(performance.now(),c=e(),performance.now()):c=e(),o.current=a,n.current=e,s.current=c,c}return s.current},[e,a]);return r.jsx(r.Fragment,{children:t(l)})}),il=p.memo(({item:t,index:e,style:a,renderItem:o})=>r.jsx("div",{style:a,children:o(t,e)}),(t,e)=>t.index===e.index&&t.item===e.item&&t.style.height===e.style.height&&t.style.top===e.style.top),dl=p.memo(({condition:t,children:e,fallback:a=null})=>t?r.jsx(r.Fragment,{children:e}):r.jsx(r.Fragment,{children:a})),cl=({children:t,threshold:e=.1,rootMargin:a="50px",fallback:o=null})=>{const[n,s]=p.useState(!1),l=p.useRef(null);return p.useEffect(()=>{const g=new IntersectionObserver(([i])=>{i.isIntersecting&&(s(!0),g.disconnect())},{threshold:e,rootMargin:a});return l.current&&g.observe(l.current),()=>g.disconnect()},[e,a]),r.jsx("div",{ref:l,children:n?t:o})},gl=({children:t,maxRenderTime:e=16,onSlowRender:a})=>{const o=p.useRef(0);return p.useLayoutEffect(()=>{o.current=performance.now()}),p.useEffect(()=>{const n=performance.now()-o.current;n>e&&a?.(n)}),r.jsx(r.Fragment,{children:t})},ul=({children:t,batchSize:e=5,delay:a=0})=>{const[o,n]=p.useState(e);return p.useEffect(()=>{if(o<t.length){const s=setTimeout(()=>{n(l=>Math.min(l+e,t.length))},a);return()=>clearTimeout(s)}},[o,t.length,e,a]),r.jsx(r.Fragment,{children:t.slice(0,o)})},hl=({src:t,alt:e,placeholder:a,lowQualitySrc:o,aspectRatio:n="16/9",eager:s=!1,className:l="",...g})=>{const[i,c]=p.useState(!1),[h,b]=p.useState(s),[k,m]=p.useState(!1),f=p.useRef(null),y=p.useRef(null);p.useEffect(()=>{if(s){b(!0);return}return y.current=new IntersectionObserver(w=>{w.forEach(N=>{N.isIntersecting&&(b(!0),y.current&&f.current&&y.current.unobserve(f.current))})},{rootMargin:"50px",threshold:.01}),f.current&&y.current.observe(f.current),()=>{y.current&&y.current.disconnect()}},[s]);const C=()=>{c(!0)},S=()=>{m(!0)};return r.jsxs("div",{className:`relative overflow-hidden ${l}`,style:{aspectRatio:n},children:[o&&!i&&r.jsx("img",{src:o,alt:"",className:"absolute inset-0 w-full h-full object-cover blur-sm","aria-hidden":"true"}),!o&&!i&&r.jsx("div",{className:"absolute inset-0 bg-gray-200 dark:bg-gray-700 animate-pulse","aria-hidden":"true"}),h&&!k&&r.jsx("img",{ref:f,src:t,alt:e,onLoad:C,onError:S,className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-500 ${i?"opacity-100":"opacity-0"}`,loading:s?"eager":"lazy",...g}),k&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-800",children:r.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[r.jsx("svg",{className:"mx-auto h-12 w-12 mb-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),r.jsx("p",{className:"text-sm",children:"Failed to load image"})]})})]})},bl=({children:t,backgroundClassName:e="",contentClassName:a=""})=>r.jsx("div",{className:e,children:r.jsx("div",{className:a,children:t})}),fl=({title:t,description:e})=>r.jsxs("div",{className:"mb-8",children:[r.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:t}),e&&r.jsx("p",{className:"mt-2 text-gray-600 dark:text-gray-400",children:e})]}),yl=({isSelected:t,onClick:e,icon:a,label:o,description:n,className:s=""})=>r.jsxs("div",{onClick:e,className:`relative flex items-start p-4 cursor-pointer transition-all border-b border-gray-200 dark:border-gray-700 last:border-b-0 group ${s}`,children:[t&&r.jsx("div",{className:"absolute inset-1 bg-blue-500/10 dark:bg-blue-400/10 rounded-lg pointer-events-none"}),r.jsxs("div",{className:"relative z-10 flex items-start w-full",children:[a&&r.jsx(a,{className:`h-5 w-5 mt-0.5 mr-3 flex-shrink-0 transition-colors ${t?"text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 group-hover:text-gray-700 dark:group-hover:text-gray-300"}`}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:`font-medium transition-colors ${t?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-gray-100 group-hover:text-gray-700 dark:group-hover:text-gray-300"}`,children:o}),n&&r.jsx("div",{className:`text-xs mt-0.5 transition-colors ${t?"text-blue-500 dark:text-blue-300":"text-gray-500 dark:text-gray-400"}`,children:n})]})]})]}),pl=({masterTitle:t,masterSubtitle:e,backButtonText:a,masterContent:o,detailContent:n,detailTitle:s,mobileView:l="navigation",onBackToNavigation:g,masterClassName:i="",detailClassName:c="",detailTitleClassName:h="",masterWidth:b=320,stickyMaster:k=!0,stickyTopOffset:m=96,desktopGap:f=32,showMasterBackground:y=!0,enableAnimations:C=!0,animationDuration:S=300,animationRef:w})=>{const N=`gap-${Math.round(f/4)}`||"gap-8",v=W=>W?W.split("-")[0].trim():"Back",x=a?v(a):t?v(t):"Back",[L,M]=p.useState(!1),[I,$]=p.useState("auto"),A=p.useRef(null),z=p.useRef(null);p.useEffect(()=>(w&&(w.current={triggerTransition:W=>{if(!C){W();return}if(A.current){const q=A.current.scrollHeight;$(q)}M(!0),z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{W(),setTimeout(()=>{if(A.current){const q=A.current.scrollHeight;$(q),setTimeout(()=>{$("auto"),M(!1)},S)}},50)},S/2)}}),()=>{z.current&&clearTimeout(z.current)}),[C,S,w]);const P=C?{height:I==="auto"?"auto":`${I}px`,transition:`height ${S}ms cubic-bezier(0.4, 0, 0.2, 1)`,width:"100%",maxWidth:"100%"}:{width:"100%",maxWidth:"100%"},O=C?`${L?"opacity-0 transform translate-y-2":"opacity-100 transform translate-y-0"}`:"",j=C?{transition:`opacity ${S}ms ease-in-out, transform ${S}ms ease-in-out`}:{};return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:`md:hidden ${l==="navigation"?"block":"hidden"} flex-1`,children:r.jsxs("div",{className:y?"bg-white dark:bg-gray-800 p-6":"p-6",children:[t&&r.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[r.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:t}),e&&r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:e})]}),r.jsx("div",{className:i,children:o})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[r.jsxs("div",{className:`md:hidden ${l==="content"?"block":"hidden"}`,children:[l==="content"&&g&&r.jsxs("button",{onClick:g,className:"mb-4 px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:["← ",x]}),r.jsx("div",{ref:A,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${c}`,style:P,children:r.jsxs("div",{className:O,style:j,children:[s&&r.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${h}`,children:s}),n]})})]}),r.jsxs("div",{className:`hidden md:flex min-h-full ${N}`,style:{width:"100%"},children:[r.jsx("aside",{className:"flex-shrink-0",style:{width:`${b}px`,minWidth:`${b}px`},children:r.jsxs("div",{className:k?"sticky":"",style:k?{top:`${m}px`}:void 0,children:[t&&r.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:t}),e&&r.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:e}),r.jsx("div",{className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 ${k?"max-h-[calc(100vh-200px)] overflow-y-auto":""} ${i}`,children:o})]})}),r.jsx("div",{className:"flex-1 min-w-0",style:{width:`calc(100% - ${b+f}px)`},children:r.jsx("div",{ref:A,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${c}`,style:P,children:r.jsxs("div",{className:O,style:j,children:[s&&r.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${h}`,children:s}),n]})})})]})]})]})},ml=({contentType:t,aiSummary:e,technicalComplexity:a="intermediate"})=>r.jsxs(ft.Helmet,{children:[r.jsx("meta",{name:"ai:content-type",content:t}),r.jsx("meta",{name:"ai:summary",content:e}),r.jsx("meta",{name:"ai:complexity",content:a})]}),vl=({children:t,className:e,...a})=>r.jsx("main",{className:e,...a,role:"main",children:t}),xl=({children:t})=>r.jsx(r.Fragment,{children:t}),se=t=>Array.isArray(t)?t:typeof t=="string"?t.split(",").map(e=>e.trim()).filter(Boolean):[],re=t=>({appName:t.appName,baseUrl:t.baseUrl,twitterHandle:t.twitterHandle||"",emailDomain:t.emailDomain||"example.com"}),Ge=t=>{const e=se(t.audience),a=re(t.branding);return{"@context":"https://schema.org","@type":"SoftwareApplication",name:a.appName,applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",description:t.description,url:a.baseUrl,downloadUrl:`${a.baseUrl}/connect`,installUrl:`${a.baseUrl}/connect`,screenshot:`${a.baseUrl}/screenshots/app-preview.jpg`,aggregateRating:{"@type":"AggregateRating",ratingValue:"4.8",reviewCount:"2500",bestRating:"5",worstRating:"1"},offers:[{"@type":"Offer",name:"Free Web3 Email",description:"Basic wallet-based email with unlimited sending",price:"0",priceCurrency:"USD",availability:"https://schema.org/InStock"},{"@type":"Offer",name:"Premium Web3 Email",description:"Advanced features with ENS/SNS domains and priority support",price:"2.00",priceCurrency:"USD",billingIncrement:"month",availability:"https://schema.org/InStock"}],featureList:["Passwordless wallet authentication","ENS domain email support (.eth)","Solana Name Service support (.sol)","Smart contract email integration","Multi-chain wallet compatibility","Cross-chain email addresses","DAO email delegation","Encrypted communication","Web2/Web3 bridge functionality","Point-based reward system"],applicationSubCategory:"Web3 Email Platform",audience:{"@type":"Audience",audienceType:e.join(", "),geographicArea:"Worldwide"},creator:{"@type":"Organization",name:a.appName,url:a.baseUrl},datePublished:"2024-01-01",dateModified:t.lastUpdated?.toISOString()||new Date().toISOString(),version:"1.0",softwareRequirements:"Web3 Wallet (MetaMask, Phantom, etc.)",storageRequirements:"5MB",memoryRequirements:"512MB RAM",supportingData:{blockchainNetworks:["Ethereum","Solana","Polygon","Arbitrum","Optimism"],supportedWallets:["MetaMask","Phantom","WalletConnect","Coinbase Wallet"],smartContractSupport:!0,ensCompatible:!0,snsCompatible:!0}}},Ke=t=>{const e=se(t.keywords),a=se(t.audience),o=re(t.branding);return{"@context":"https://schema.org","@type":"TechnicalArticle",headline:t.title,description:t.description,author:{"@type":"Organization",name:o.appName,url:o.baseUrl,logo:{"@type":"ImageObject",url:`${o.baseUrl}/logo.png`}},publisher:{"@type":"Organization",name:o.appName,logo:{"@type":"ImageObject",url:`${o.baseUrl}/logo.png`,width:600,height:600}},datePublished:"2024-01-01T00:00:00Z",dateModified:t.lastUpdated?.toISOString()||new Date().toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":`${o.baseUrl}${location.pathname}`},image:{"@type":"ImageObject",url:`${o.baseUrl}/og-images/technical-guide.jpg`,width:1200,height:630},keywords:e.join(", "),about:[{"@type":"Thing",name:"Web3 Email Platform"},{"@type":"Thing",name:"Blockchain Technology"},{"@type":"Thing",name:"Decentralized Communication"}],audience:{"@type":"Audience",audienceType:a.join(", "),educationalLevel:t.complexity},educationalLevel:t.complexity,proficiencyLevel:t.complexity,learningResourceType:t.contentType,timeRequired:t.readingTime?`PT${t.readingTime}M`:"PT5M",inLanguage:"en",isAccessibleForFree:!0,license:"https://creativecommons.org/licenses/by/4.0/",teaches:t.relatedTopics||["Web3 email setup","Wallet connection process","Blockchain authentication","Smart contract integration"]}},kl=(t,e)=>{const a=re(e);return{"@context":"https://schema.org","@type":"FAQPage",mainEntity:t.map(o=>({"@type":"Question",name:o.question,acceptedAnswer:{"@type":"Answer",text:o.answer,dateCreated:new Date().toISOString(),upvoteCount:Math.floor(Math.random()*50)+10,author:{"@type":"Organization",name:a.appName}},answerCount:1,upvoteCount:Math.floor(Math.random()*100)+20,dateCreated:"2024-01-01T00:00:00Z",category:o.category||"General"}))}},Ye=t=>{const e=re(t.branding);return{"@context":"https://schema.org","@type":"WebPage",name:t.title,description:t.description,url:`${e.baseUrl}${location.pathname}`,primaryImageOfPage:{"@type":"ImageObject",url:`${e.baseUrl}/og-images/ai-optimized.jpg`},significantLink:[`${e.baseUrl}/document`,`${e.baseUrl}/web3-users`,`${e.baseUrl}/web3-projects`,`${e.baseUrl}/connect`],relatedLink:t.relatedTopics?.map(a=>`${e.baseUrl}/search?q=${encodeURIComponent(a)}`)||[],about:{"@type":"Thing",name:"Web3 Email Communication",description:"Blockchain-based email platform using wallet authentication",sameAs:["https://en.wikipedia.org/wiki/Web3","https://en.wikipedia.org/wiki/Blockchain","https://en.wikipedia.org/wiki/Cryptocurrency_wallet"]},mentions:[{"@type":"SoftwareApplication",name:"MetaMask"},{"@type":"SoftwareApplication",name:"Phantom Wallet"},{"@type":"Thing",name:"Ethereum Name Service"},{"@type":"Thing",name:"Solana Name Service"}],isPartOf:{"@type":"WebSite","@id":e.baseUrl,name:e.appName},potentialAction:{"@type":"InteractAction",target:{"@type":"EntryPoint",urlTemplate:`${e.baseUrl}/connect`,actionPlatform:["https://schema.org/DesktopWebPlatform","https://schema.org/MobileWebPlatform"]},name:"Connect Web3 Wallet"}}},Dr=t=>{const e=se(t.keywords),a=re(t.branding);return{"og:title":t.title,"og:description":t.description,"og:type":"website","og:url":`${a.baseUrl}${location.pathname}`,"og:image":`${a.baseUrl}/og-images/${t.category}.jpg`,"og:image:width":"1200","og:image:height":"630","og:image:alt":`${t.title} - ${a.appName}`,"og:site_name":a.appName,"og:locale":"en_US","article:author":`${a.baseUrl}/about`,"article:section":t.category,"article:tag":e.join(","),"article:published_time":"2024-01-01T00:00:00Z","article:modified_time":t.lastUpdated?.toISOString()||new Date().toISOString()}},jr=t=>{const e=re(t.branding);return{"twitter:card":"summary_large_image","twitter:site":e.twitterHandle||"","twitter:creator":e.twitterHandle||"","twitter:title":t.title,"twitter:description":t.description,"twitter:image":`${e.baseUrl}/twitter-cards/${t.category}.jpg`,"twitter:image:alt":`${t.title} - ${e.appName}`,"twitter:label1":"Category","twitter:data1":t.category,"twitter:label2":"Reading Time","twitter:data2":t.readingTime?`${t.readingTime} min`:"5 min"}},Br=t=>{const e=se(t.keywords),a=se(t.audience),o=re(t.branding);return{"ai:content-type":t.contentType,"ai:complexity":t.complexity,"ai:category":t.category,"ai:audience":a.join(","),"ai:keywords":e.join(","),"ai:reading-time":t.readingTime?.toString()||"5","web3:platform":"Email","web3:networks":"ethereum,solana,polygon","web3:wallets":"metamask,phantom,walletconnect","web3:features":"ens,sns,smart-contracts,multi-chain","llm:context":"Web3 email platform documentation and user guides","llm:domain":"blockchain,cryptocurrency,decentralized-communication","llm:use-case":"email,authentication,wallet-integration,smart-contracts","semantic:topic":t.category,"semantic:intent":"inform,guide,educate","semantic:entities":`${o.appName},Web3,blockchain,email,wallet`,"content:freshness":t.lastUpdated?.toISOString()||new Date().toISOString(),"content:authority":"high","content:expertise":"technical","content:trustworthiness":"verified"}},wl=t=>({structuredData:{product:Ge(t),article:Ke(t),aiOptimized:Ye(t)},openGraph:Dr(t),twitterCard:jr(t),aiMetaTags:Br(t),jsonLD:[Ge(t),Ke(t),Ye(t)]}),Cl={homepage:{title:"Revolutionary Web3 Email Platform | Wallet-Based Authentication",description:"Transform your email experience - the first Web3 email platform using wallet authentication. No passwords, enhanced security, ENS/SNS domain support, and smart contract integration.",keywords:["Web3 email","blockchain email","wallet authentication","ENS email","SNS email","decentralized email","smart contract integration"],category:"Web3 Platform",audience:["Crypto Users","Web3 Developers","DeFi Users","DAO Members"],complexity:"beginner",contentType:"overview",readingTime:3,relatedTopics:["Web3 authentication","Blockchain communication","Decentralized identity"]},documentation:{title:"Documentation - Complete Web3 Email Setup Guide",description:"Comprehensive documentation for Web3 email platform. Learn wallet connection, ENS/SNS setup, smart contract integration, and advanced features.",keywords:["Web3 email guide","wallet connection","ENS setup","SNS configuration","smart contract email","blockchain documentation"],category:"Technical Documentation",audience:["Developers","Technical Users","Web3 Enthusiasts"],complexity:"intermediate",contentType:"guide",readingTime:15,relatedTopics:["Wallet integration","Blockchain protocols","Email security"]},earnPoints:{title:"How to Earn Points - Web3 Email Rewards Guide",description:"Master the points system. Earn rewards through email activities, referrals, smart contract interactions, and prepare for future token distribution.",keywords:["Web3 rewards","email points","blockchain rewards","referral program","token preparation","crypto incentives"],category:"Rewards Guide",audience:["Token Farmers","Crypto Users","Web3 Users"],complexity:"beginner",contentType:"tutorial",readingTime:8,relatedTopics:["Token economics","Reward systems","Referral marketing"]}},Nl=t=>{const{level:e,text:a,className:o="",id:n,semanticContext:s="section"}=t,l=`h${e}`,g={1:"text-4xl md:text-5xl lg:text-6xl font-bold leading-tight",2:"text-3xl md:text-4xl font-bold leading-tight",3:"text-2xl md:text-3xl font-bold leading-tight",4:"text-xl md:text-2xl font-semibold leading-tight",5:"text-lg md:text-xl font-semibold leading-tight",6:"text-base md:text-lg font-medium leading-tight"},i={"page-title":"text-gray-900 dark:text-white mb-6",section:"text-gray-900 dark:text-white mb-4",subsection:"text-gray-900 dark:text-white mb-3",feature:"text-gray-900 dark:text-white mb-2",benefit:"text-blue-600 dark:text-blue-400 mb-2",step:"text-green-600 dark:text-green-400 mb-2"},c=[g[e],i[s],o].filter(Boolean).join(" "),h=n||a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return p.createElement(l,{id:h,className:c,"aria-level":e},a)},_={pageTitle:(t,e)=>({level:1,text:t,className:e,semanticContext:"page-title"}),majorSection:(t,e)=>({level:2,text:t,className:e,semanticContext:"section"}),feature:(t,e)=>({level:3,text:t,className:e,semanticContext:"feature"}),benefit:(t,e)=>({level:3,text:t,className:e,semanticContext:"benefit"}),step:(t,e,a)=>({level:3,text:e?`Step ${e}: ${t}`:t,className:a,semanticContext:"step"}),subFeature:(t,e)=>({level:4,text:t,className:e,semanticContext:"feature"})},Sl=t=>{const e=[],a=[],o=t.filter(n=>n.level===1).length;o===0?e.push("Missing H1 tag - every page should have exactly one H1"):o>1&&e.push(`Multiple H1 tags found (${o}) - use only one H1 per page`);for(let n=1;n<t.length;n++){const s=t[n],l=t[n-1];s.level>l.level+1&&e.push(`Heading level jump from H${l.level} to H${s.level} - avoid skipping levels`)}return t.forEach((n,s)=>{n.text.length<3&&e.push(`Heading ${s+1} is too short - use descriptive text`),n.text.length>70&&a.push(`Heading "${n.text.substring(0,30)}..." is long - consider shortening for better SEO`)}),{isValid:e.length===0,errors:e,suggestions:a}},El={walletConnection:_.pageTitle("Connect Your Web3 Wallet"),emailBenefits:_.majorSection("Why Choose Web3 Email?"),securityFeature:_.feature("Secure & Private"),ensIntegration:_.feature("ENS Domain Support"),multiChain:_.feature("Multi-Chain Compatibility"),passwordless:_.benefit("No Passwords Required"),setupStep1:_.step("Connect Your Wallet",1),setupStep2:_.step("Verify Your Identity",2),setupStep3:_.step("Access Your Emails",3)},Ll=[{term:"Web3 Email",definition:"Email system that uses blockchain wallet addresses as authentication instead of traditional passwords",category:"Web3 Communication",synonyms:["blockchain email","decentralized email","crypto email"],relatedTerms:["wallet authentication","ENS email","SNS email"],examples:["vitalik.eth@example.com","alice.sol@example.com"],context:"Web3 email revolutionizes digital communication by eliminating passwords and using cryptographic signatures for authentication"},{term:"Wallet Authentication",definition:"Authentication method using cryptographic signatures from blockchain wallets instead of passwords",category:"Security",synonyms:["wallet-based auth","signature authentication","passwordless authentication"],relatedTerms:["EIP-712","SIWE","message signing"],examples:["MetaMask signature","Phantom wallet auth","WalletConnect login"],context:"Wallet authentication provides superior security through cryptographic proofs that cannot be phished or stolen like passwords"},{term:"ENS Email",definition:"Email addresses using Ethereum Name Service domains (.eth) as identifiers",category:"Naming Systems",synonyms:["Ethereum name email",".eth email"],relatedTerms:["ENS","Ethereum domains","blockchain domains"],examples:["vitalik.eth","ethereum.eth"],context:"ENS emails provide human-readable addresses that resolve to Ethereum wallet addresses"},{term:"SNS Email",definition:"Email addresses using Solana Name Service domains (.sol) as identifiers",category:"Naming Systems",synonyms:["Solana name email",".sol email"],relatedTerms:["SNS","Solana domains","SPL domains"],examples:["anatoly.sol","solana.sol"],context:"SNS emails provide human-readable addresses for Solana ecosystem users"},{term:"Smart Contract Integration",definition:"Ability to send and receive emails triggered by blockchain smart contract events",category:"Blockchain Integration",synonyms:["contract notifications","on-chain email triggers"],relatedTerms:["event listeners","webhooks","contract automation"],examples:["DAO proposal notifications","DeFi alert emails","NFT sale confirmations"],context:"Smart contract integration enables automated communication based on blockchain events"},{term:"Multi-Chain Support",definition:"Compatibility with multiple blockchain networks for wallet authentication and email services",category:"Interoperability",synonyms:["cross-chain support","blockchain agnostic"],relatedTerms:["EVM chains","Solana","Layer 2"],examples:["Ethereum, Polygon, Arbitrum, Solana support"],context:"Multi-chain support ensures users from any blockchain ecosystem can use the email service"},{term:"DAO Email Delegation",definition:"System allowing DAOs to manage email communications through delegated authorities",category:"Governance",synonyms:["governance email","multi-sig email"],relatedTerms:["DAO governance","multi-signature","delegation"],examples:["Treasury notifications","Proposal alerts","Voting reminders"],context:"DAO email delegation enables decentralized organizations to manage communications efficiently"},{term:"Web2/Web3 Bridge",definition:"Technology enabling communication between traditional email systems and blockchain-based email",category:"Interoperability",synonyms:["email bridge","legacy integration"],relatedTerms:["SMTP gateway","email forwarding","protocol bridge"],examples:["Gmail to Web3 email","Outlook integration"],context:"Web2/Web3 bridge ensures compatibility with existing email infrastructure"}],Il=t=>({"@context":"https://schema.org","@type":"LearningResource",educationalLevel:t.difficulty,learningResourceType:"Technical Documentation",timeRequired:t.estimatedTime?`PT${t.estimatedTime}M`:void 0,teaches:t.learningObjectives,requires:t.prerequisites,about:{"@type":"Thing",name:t.domain,category:t.category,subcategory:t.subcategory},keywords:t.concepts,applicationExample:t.practicalApplications,isRelatedTo:t.relatedConcepts}),Ml=t=>{const e={nodes:t.map(a=>({id:a.term,label:a.term,category:a.category,definition:a.definition})),edges:[]};return t.forEach(a=>{a.relatedTerms?.forEach(o=>{t.find(s=>s.term===o)&&e.edges.push({source:a.term,target:o,relationship:"related_to"})}),a.synonyms?.forEach(o=>{e.edges.push({source:a.term,target:o,relationship:"synonym_of"})})}),e},$l=t=>{const e=[];return t.examples?.forEach(a=>{e.push({text:a,label:t.term,type:"positive",confidence:1})}),t.context&&e.push({text:t.context,label:t.term,type:"contextual",confidence:.8}),e.push({text:`${t.term} is ${t.definition}`,label:t.term,type:"definition",confidence:1}),e},Tl=t=>{const e=[];return t.forEach(a=>{e.push({question:`What is ${a.term}?`,answer:a.definition,category:a.category,difficulty:"basic"}),a.context&&e.push({question:`How does ${a.term} work?`,answer:a.context,category:a.category,difficulty:"intermediate"}),a.examples&&a.examples.length>0&&e.push({question:`What are examples of ${a.term}?`,answer:a.examples.join(", "),category:a.category,difficulty:"basic"}),a.relatedTerms&&a.relatedTerms.length>0&&e.push({question:`What is ${a.term} related to?`,answer:`${a.term} is related to ${a.relatedTerms.join(", ")}`,category:a.category,difficulty:"intermediate"})}),e},Al={homepage:{domain:"Web3 Email Platform",category:"Web3 Communication",concepts:["Web3 email","wallet authentication","passwordless login","blockchain messaging"],prerequisites:["Basic blockchain knowledge","Understanding of crypto wallets"],learningObjectives:["Understand Web3 email concepts","Learn wallet authentication","Explore blockchain communication"],difficulty:"beginner",estimatedTime:5,practicalApplications:["Secure email communication","DAO governance","DeFi notifications"]},documentation:{domain:"Web3 Email Technical Documentation",category:"Technical Guide",concepts:["API integration","smart contracts","wallet connection","email protocols"],prerequisites:["JavaScript/TypeScript","Web3 development basics","REST APIs"],learningObjectives:["Implement Web3 email","Integrate wallet authentication","Build on email API"],difficulty:"intermediate",estimatedTime:30,practicalApplications:["dApp integration","Email automation","Smart contract notifications"]},governance:{domain:"DAO Governance Communication",category:"Governance Tools",concepts:["DAO email","voting notifications","proposal tracking","multi-sig coordination"],prerequisites:["DAO basics","Governance understanding","Multi-signature wallets"],learningObjectives:["Setup DAO email","Configure voting alerts","Manage team communication"],difficulty:"advanced",estimatedTime:20,practicalApplications:["DAO operations","Treasury management","Governance participation"]}},Ul=({children:t,appName:e,appUrl:a,apiUrl:o})=>(p.useEffect(()=>{const n=()=>{[].forEach(f=>{const y=document.createElement("link");y.rel="preload",y.href=f.href,y.as=f.as,f.type&&(y.type=f.type),f.crossorigin&&(y.crossOrigin=""),document.head.appendChild(y)})},s=()=>{document.querySelectorAll('img[data-priority="high"]').forEach(y=>{y.fetchPriority="high"});const f=document.querySelector("[data-hero]");if(f){const y=f.getAttribute("data-bg-image");if(y){const C=document.createElement("link");C.rel="preload",C.href=y,C.as="image",document.head.appendChild(C)}}},l=()=>{document.querySelectorAll("img:not([width]):not([height])").forEach(y=>{const C=y;C.naturalWidth&&C.naturalHeight&&(C.width=C.naturalWidth,C.height=C.naturalHeight)}),document.querySelectorAll("[data-dynamic]").forEach(y=>{y.getAttribute("style")?.includes("min-height")||(y.style.minHeight="200px")})},g=()=>{const m=()=>{document.querySelectorAll("script[data-defer]").forEach(C=>{C.setAttribute("defer","")})};"requestIdleCallback"in window?requestIdleCallback(()=>{m()}):setTimeout(m,1),(()=>{["scroll","touchstart","touchmove","wheel"].forEach(C=>{document.addEventListener(C,()=>{},{passive:!0})})})()},i=()=>{},c=()=>{[{rel:"dns-prefetch",href:"//fonts.googleapis.com"},...o?[{rel:"dns-prefetch",href:`//${o.replace(/^https?:\/\//,"")}`}]:[],{rel:"preconnect",href:"https://fonts.gstatic.com",crossorigin:!0},...o?[{rel:"preconnect",href:o}]:[]].forEach(f=>{const y=document.createElement("link");y.rel=f.rel,y.href=f.href,f.crossorigin&&(y.crossOrigin=""),document.head.appendChild(y)})},h=()=>{if(document.querySelectorAll("img[data-lazy]").forEach(f=>{f.loading="lazy"}),"IntersectionObserver"in window){const f=new IntersectionObserver(C=>{C.forEach(S=>{if(S.isIntersecting){const w=S.target;w.dataset.src&&(w.src=w.dataset.src,w.removeAttribute("data-src")),f.unobserve(w)}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(C=>f.observe(C))}},b=()=>{[{name:"ai-content-type",content:"web3-email-platform"},{name:"ai-primary-function",content:"wallet-based-email"},{name:"ai-supported-chains",content:"ethereum,solana,polygon,arbitrum,optimism"},{name:"ai-complexity-level",content:"beginner-to-advanced"},{name:"ai-target-users",content:"web3-users,crypto-enthusiasts,developers"},{name:"machine-readable",content:"true"},{name:"structured-data",content:"json-ld"},{name:"content-category",content:"technology,blockchain,communication"},{name:"interaction-model",content:"wallet-authentication"}].forEach(({name:C,content:S})=>{if(!document.querySelector(`meta[name="${C}"]`)){const w=document.createElement("meta");w.name=C,w.content=S,document.head.appendChild(w)}});const f={"@context":"https://schema.org","@type":"WebApplication",name:e,description:"Web3 email platform using blockchain wallet authentication",url:a,applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},featureList:["Wallet-based authentication","ENS domain email support","SNS domain email support","Multi-chain compatibility","Smart contract integration","Web2/Web3 bridge"],audience:{"@type":"Audience",audienceType:"Web3 Users"}},y=document.createElement("script");y.type="application/ld+json",y.textContent=JSON.stringify(f),document.head.appendChild(y)},k=()=>{document.querySelectorAll('link[rel="stylesheet"][data-non-critical]').forEach(f=>{const y=f.cloneNode(!0);y.rel="preload",y.as="style",y.onload=()=>{y.onload=null,y.rel="stylesheet"},document.head.appendChild(y),f.remove()})};return n(),s(),l(),g(),c(),h(),b(),k(),setTimeout(i,2e3),()=>{}},[o,e,a]),r.jsx(r.Fragment,{children:t})),Pl=()=>(p.useEffect(()=>{if(typeof window>"u"||typeof document>"u"||!document.documentElement)return;const t=()=>{if("IntersectionObserver"in window){const g=new IntersectionObserver(i=>{i.forEach(c=>{if(c.isIntersecting){const h=c.target;h.dataset.src&&(h.src=h.dataset.src,h.removeAttribute("data-src"),g.unobserve(h))}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(i=>{g.observe(i)})}const n=()=>{["/connect","/mail","/settings"].forEach(i=>{const c=document.createElement("link");c.rel="prefetch",c.href=i,document.head.appendChild(c)})},s=()=>{if(!document.querySelector("script[data-wallet-detection]")){const g=document.createElement("script");g.dataset.walletDetection="true",g.innerHTML='(function() { window.walletPreload = { hasMetaMask: typeof window.ethereum !== "undefined", hasPhantom: typeof window.solana !== "undefined", hasWalletConnect: true }; })();',document.head.appendChild(g)}},l=()=>{document.querySelectorAll("img[data-hero]").forEach(g=>{const i=g;i.loading="eager","fetchPriority"in i&&(i.fetchPriority="high")}),document.querySelectorAll('img[data-priority="low"]').forEach(g=>{const i=g;i.loading="lazy","fetchPriority"in i&&(i.fetchPriority="low")})};requestIdleCallback(()=>{n(),s(),l()},{timeout:2e3})},e=()=>{if("PerformanceObserver"in window){const n=new PerformanceObserver(l=>{const g=l.getEntries(),i=g[g.length-1];i&&i.startTime>2500&&(document.documentElement.style.setProperty("--animation-duration","0s"),localStorage.setItem("reduce-image-quality","true"))});try{n.observe({entryTypes:["largest-contentful-paint"]})}catch{}const s=new PerformanceObserver(l=>{let g=0;for(const i of l.getEntries())i.hadRecentInput||(g+=i.value);g>.1&&document.querySelectorAll("img:not([width]):not([height])").forEach(i=>{const c=i;c.style.aspectRatio="16/9"})});try{s.observe({entryTypes:["layout-shift"]})}catch{}}},a=()=>{if("connection"in navigator&&typeof document<"u"&&document.documentElement){const n=navigator.connection;if(n){const s=n.effectiveType;s==="slow-2g"||s==="2g"?(document.documentElement.classList.add("slow-connection"),document.querySelectorAll('link[rel="prefetch"]').forEach(l=>{l.getAttribute("data-critical")||l.remove()}),localStorage.setItem("use-low-quality-images","true")):s==="3g"?document.documentElement.classList.add("moderate-connection"):document.documentElement.classList.add("fast-connection")}}};return(()=>{t(),e(),a()})(),()=>{if("PerformanceObserver"in window)try{PerformanceObserver.supportedEntryTypes.forEach(()=>{})}catch{}}},[]),null),zl=({children:t})=>r.jsx(r.Fragment,{children:t}),Dl={user:{duration:300*1e3,maxSize:100,staleWhileRevalidate:!0},mailboxes:{duration:120*1e3,maxSize:50,staleWhileRevalidate:!0},addresses:{duration:600*1e3,maxSize:50,staleWhileRevalidate:!0},messages:{duration:30*1e3,maxSize:200,staleWhileRevalidate:!0},messageDetails:{duration:120*1e3,maxSize:100,staleWhileRevalidate:!1},messageCount:{duration:10*1e3,maxSize:20,staleWhileRevalidate:!0}};class jl{constructor(){this.cache=new Map}set(e,a,o){if(this.cache.size>=o.maxSize){const n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(e,{data:a,timestamp:Date.now(),isStale:!1})}get(e,a){const o=this.cache.get(e);if(!o)return null;const s=Date.now()-o.timestamp>a.duration;return s&&!a.staleWhileRevalidate?(this.cache.delete(e),null):{data:o.data,isStale:s}}invalidate(e){for(const a of this.cache.keys())a.includes(e)&&this.cache.delete(a)}clear(){this.cache.clear()}getStats(){return{size:this.cache.size,keys:Array.from(this.cache.keys()),memory:this.estimateMemoryUsage()}}estimateMemoryUsage(){return Array.from(this.cache.values()).reduce((e,a)=>e+JSON.stringify(a).length*2,0)}}const le=new jl,te=new Map,Or=async(t,e,a="messages")=>{const o=Dl[a],n=le.get(t,o);if(n&&!n.isStale)return n.data;const s=te.get(t);if(s)return s;if(n&&n.isStale&&o.staleWhileRevalidate){const g=e().then(i=>(le.set(t,i,o),te.delete(t),i)).catch(i=>{throw te.delete(t),i});return te.set(t,g),n.data}const l=e().then(g=>(le.set(t,g,o),te.delete(t),g)).catch(g=>{throw te.delete(t),g});return te.set(t,l),l};class Bl{constructor(){this.queue=[],this.timer=null,this.batchDelay=10}add(e,a){return new Promise((o,n)=>{this.queue.push({key:e,fetcher:a,resolve:o,reject:n}),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.processBatch()},this.batchDelay)})}async processBatch(){const e=[...this.queue];this.queue.length=0,this.timer=null;const a=this.groupRequests(e);for(const o of a)await Promise.allSettled(o.map(async n=>{try{const s=await n.fetcher();n.resolve(s)}catch(s){n.reject(s)}}))}groupRequests(e){const a=[];for(let n=0;n<e.length;n+=5)a.push(e.slice(n,n+5));return a}}const Ol=new Bl;class Wl{constructor(e,a={}){this.requestInterceptors=[],this.responseInterceptors=[],this.baseURL=e,this.defaultHeaders=a}addRequestInterceptor(e){this.requestInterceptors.push(e)}addResponseInterceptor(e){this.responseInterceptors.push(e)}async request(e,a={},o,n="messages"){const s=`${this.baseURL}${e}`,l=o||`${a.method||"GET"}:${s}`,g=async()=>{let i={...a,headers:{...this.defaultHeaders,...a.headers}};for(const h of this.requestInterceptors)i=h(i);let c=await fetch(s,i);for(const h of this.responseInterceptors)c=await h(c);if(!c.ok)throw new Error(`API Error: ${c.status} ${c.statusText}`);return c.json()};return a.method==="GET"&&this.shouldBatch(e)?Ol.add(l,g):Or(l,g,n)}shouldBatch(e){return e.includes("/messages/")&&!e.includes("/messages?")}async get(e,a){return this.request(e,{method:"GET"},void 0,a)}async post(e,a){return this.request(e,{method:"POST",body:JSON.stringify(a)})}async put(e,a){return this.request(e,{method:"PUT",body:JSON.stringify(a)})}async delete(e){return this.request(e,{method:"DELETE"})}}const Fl=async(t,e=3,a=1e3)=>{let o;for(let n=0;n<=e;n++)try{return await t()}catch(s){if(o=s,n===e)throw o;const l=a*Math.pow(2,n)+Math.random()*1e3;await new Promise(g=>setTimeout(g,l))}throw o};class Vl{constructor(){this.abortController=new AbortController}async request(e,a={}){const o=await fetch(e,{...a,signal:this.abortController.signal});if(!o.ok)throw new Error(`HTTP ${o.status}: ${o.statusText}`);return o.json()}cancel(){this.abortController.abort()}}const Hl={invalidate:t=>le.invalidate(t),clear:()=>le.clear(),getStats:()=>le.getStats(),warmUp:async t=>{await Promise.allSettled(t.map(e=>e()))},prefetch:async t=>{"requestIdleCallback"in window?window.requestIdleCallback(async()=>{await Promise.allSettled(t.map(e=>e()))}):setTimeout(async()=>{await Promise.allSettled(t.map(e=>e()))},100)}};function Wr(){if(typeof window>"u")return!1;const t=window.navigator.userAgent.toLowerCase();return["metamask","trustwallet","coinbase","rainbow","phantom","solflare","exodus","ledger","binance","okx"].some(a=>t.includes(a))}function Fr(){return typeof window>"u"?!1:window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"}function Vr(){if(typeof window>"u")return!1;const t=window.location.hostname;return/^\d+\.\d+\.\d+\.\d+$/.test(t)}function Hr(){return Fr()?"localhost":Wr()?"wallet-browser":Vr()?"network":"production"}function ql(){const t=Hr();return t==="localhost"||t==="wallet-browser"}function _l(t){}function qr(){return typeof window<"u"}function Gl(){return typeof window<"u"}function Kl(t,e){if(qr())t();else return e}const Qe=t=>({"default-src":["'self'"],"script-src":["'self'","'unsafe-inline'","'unsafe-eval'","https://fonts.googleapis.com","https://www.googletagmanager.com","https://www.google-analytics.com"],"style-src":["'self'","'unsafe-inline'","https://fonts.googleapis.com","https://fonts.gstatic.com"],"font-src":["'self'","https://fonts.gstatic.com","data:"],"img-src":["'self'","data:","https:","blob:"],"connect-src":["'self'",...t?.apiUrls||[],...t?.appUrls||[],"https://*.walletconnect.com","https://*.walletconnect.org","https://registry.walletconnect.com","https://relay.walletconnect.com","wss://*.walletconnect.com","wss://*.walletconnect.org","https://keys.coinbase.com","https://api.coinbase.com","https://www.walletlink.org","https://mainnet.infura.io","https://polygon-rpc.com","https://rpc.ankr.com","https://cloudflare-eth.com","https://eth-mainnet.alchemyapi.io","https://api.phantom.app","https://solana-api.projectserum.com","https://api.mainnet-beta.solana.com","https://api.devnet.solana.com","wss://api.phantom.app","wss://api.devnet.solana.com","wss://api.mainnet-beta.solana.com","https://bridge.arbitrum.io","https://polygon-mainnet.infura.io","https://optimism-mainnet.infura.io"],"frame-src":["'self'","https://verify.walletconnect.com","https://verify.walletconnect.org"],"worker-src":["'self'","blob:"],"child-src":["'self'","https://verify.walletconnect.com"],"object-src":["'none'"],"base-uri":["'self'"],"form-action":["'self'"]}),Yl=Qe(),_r=t=>{const e=Qe(t);return Object.entries(e).map(([a,o])=>`${a} ${o.join(" ")}`).join("; ")},Gr=t=>({"X-Frame-Options":"DENY","X-Content-Type-Options":"nosniff","X-XSS-Protection":"1; mode=block","Referrer-Policy":"strict-origin-when-cross-origin","Permissions-Policy":"camera=(), microphone=(), geolocation=(), interest-cohort=()","Strict-Transport-Security":"max-age=31536000; includeSubDomains; preload","Cross-Origin-Embedder-Policy":"credentialless","Cross-Origin-Opener-Policy":"same-origin-allow-popups","Cross-Origin-Resource-Policy":"cross-origin","Content-Security-Policy":_r(t)}),Ql=Gr(),Zl={fonts:"public, max-age=31536000, immutable",images:"public, max-age=31536000, immutable",js:"public, max-age=31536000, immutable",css:"public, max-age=31536000, immutable",serviceWorker:"public, max-age=0, must-revalidate",manifest:"public, max-age=86400",api:"no-cache, no-store, must-revalidate"},Xl=()=>{typeof window<"u"&&document.addEventListener("securitypolicyviolation",()=>{})},Jl={walletConnections:"Always verify wallet signatures and never trust client-side data",rpcEndpoints:"Use reputable RPC providers and consider rate limiting",contractInteractions:"Validate all smart contract interactions on the backend",userInput:"Sanitize all user inputs, especially wallet addresses and transaction data",privateKeys:"Never log, store, or transmit private keys - they should remain in wallets only",phishing:"Implement strict CSP to prevent injection of malicious scripts that could steal wallet access"},Q=new Map,ue=new Map,Se=new Set;let he="medium",Ze=!1;function Rl(){if("connection"in navigator){const a=navigator.connection;a&&(he=a.effectiveType==="4g"?"fast":a.effectiveType==="3g"?"medium":"slow")}const t=navigator.deviceMemory,e=navigator.hardwareConcurrency;Ze=t&&t<4||e&&e<4}Rl();function ei(t,e,a={}){const{retries:o=3,timeout:n=1e4,fallback:s,preloadCondition:l,cacheStrategy:g="memory",priority:i="medium",onLoad:c,onError:h}=a;if(Q.has(e))return Q.get(e).component;const b=p.lazy(async()=>{const m=performance.now();if(ue.has(e))return ue.get(e).then(y=>({default:y}));const f=ri(t,o,n);ue.set(e,f.then(y=>y.default));try{const y=await f,C=performance.now()-m;if(g!=="none"){const S={component:y.default,timestamp:Date.now(),loadTime:C};if(Q.set(e,S),g==="session")try{sessionStorage.setItem(`lazy_${e}`,JSON.stringify({timestamp:S.timestamp,loadTime:C}))}catch{}}return ue.delete(e),c?.(y.default),y}catch(y){throw ue.delete(e),h?.(y),y}}),k=m=>{const[f,y]=p.useState(!0);p.useEffect(()=>{if(l&&!Q.has(e)&&l()&&!Se.has(e)){Se.add(e);const w=ti(i,he);setTimeout(()=>{t().catch(()=>{})},w)}},[]);const C=s||r.jsxs("div",{className:"flex items-center justify-center p-4",children:[r.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),r.jsxs("span",{className:"ml-2 text-sm text-gray-600",children:["Loading ",e.replace(/([A-Z])/g," $1").trim(),"..."]})]});return!f&&Ze&&he==="slow"?r.jsx("div",{className:"lazy-placeholder",children:r.jsxs("button",{onClick:()=>y(!0),className:"load-component-btn",children:["Load ",e]})}):r.jsx(p.Suspense,{fallback:C,children:r.jsx(b,{...m})})};return k.displayName=`AdvancedLazy(${e})`,k}async function ri(t,e,a){let o;for(let n=0;n<e;n++)try{const s=new Promise((g,i)=>{setTimeout(()=>i(new Error("Load timeout")),a)});return await Promise.race([t(),s])}catch(s){if(o=s,n<e-1){const l=Math.pow(2,n)*1e3,g=Math.random()*1e3;await new Promise(i=>setTimeout(i,l+g))}}throw o}function ti(t,e){const a={critical:0,high:500,medium:2e3,low:5e3},o={fast:.5,medium:1,slow:2},n=a[t]||2e3,s=o[e]||1;return n*s}const me=class me{static registerRoute(e,a){this.routeMap.set(e,a),this.routeUsageStats.set(e,0)}static setCurrentRoute(e){this.currentRoute=e;const a=this.routeUsageStats.get(e)||0;this.routeUsageStats.set(e,a+1),this.preloadLikelyRoutes(e)}static preloadLikelyRoutes(e){this.getRouteTransitionProbability(e).forEach(({route:o,probability:n})=>{n>.3&&!Q.has(o)&&setTimeout(()=>{this.routeMap.get(o)},he==="fast"?1e3:3e3)})}static getRouteTransitionProbability(e){const a=[];switch(e){case"/":a.push({route:"/connect",probability:.7},{route:"/about",probability:.2},{route:"/document",probability:.1});break;case"/connect":a.push({route:"/mail",probability:.8},{route:"/settings",probability:.1});break;case"/mail":a.push({route:"/compose",probability:.4},{route:"/settings",probability:.2});break;default:a.push({route:"/",probability:.1})}return a}static getStats(){return{routeCount:this.routeMap.size,cacheSize:Q.size,currentRoute:this.currentRoute,usageStats:Object.fromEntries(this.routeUsageStats)}}};me.routeMap=new Map,me.routeUsageStats=new Map,me.currentRoute="";let Xe=me;const ai=({src:t,alt:e,className:a,placeholder:o,priority:n="medium"})=>{const[s,l]=p.useState(!1),[g,i]=p.useState(!1),c=p.useRef(null);p.useEffect(()=>{if(!c.current)return;if(n==="high"){i(!0);return}const b=new IntersectionObserver(([k])=>{k.isIntersecting&&(i(!0),b.unobserve(k.target))},{rootMargin:n==="low"?"100px":"200px",threshold:.1});return b.observe(c.current),()=>b.disconnect()},[n]);const h=()=>{l(!0)};return r.jsxs("div",{className:`lazy-image-container ${a}`,children:[r.jsx("img",{ref:c,src:g?t:o||"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB2aWV3Qm94PSIwIDAgMSAxIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNGM0Y0RjYiLz48L3N2Zz4=",alt:e,className:`transition-opacity duration-300 ${s?"opacity-100":"opacity-0"}`,onLoad:h,loading:n==="high"?"eager":"lazy",fetchPriority:n==="high"?"high":"low"}),!s&&g&&r.jsx("div",{className:"absolute inset-0 bg-gray-200 animate-pulse rounded"})]})};function oi(){Q.clear(),Se.clear()}function ni(){return{cachedComponents:Q.size,preloadQueue:Se.size,networkSpeed:he,isLowEndDevice:Ze,cacheEntries:Array.from(Q.entries()).map(([t,e])=>({name:t,loadTime:e.loadTime,age:Date.now()-e.timestamp}))}}const si=({message:t})=>r.jsxs("div",{className:"flex items-center justify-center p-4",children:[r.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),r.jsx("span",{className:"ml-2 text-sm text-gray-600",children:t})]}),li=t=>{if(typeof t=="function"||typeof t=="object")return t;switch(t){case"minimal":return()=>r.jsx("div",{className:"flex justify-center items-center p-4",children:"Loading..."});case"skeleton":return()=>r.jsxs("div",{className:"animate-pulse",children:[r.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-2"}),r.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/2"})]});case"default":default:return()=>r.jsx(si,{message:"Loading component..."})}},Kr=(t,e="default",a=3)=>{const o=p.lazy(async()=>{let s=null;for(let l=0;l<a;l++)try{return await t()}catch(g){s=g,l<a-1&&await new Promise(i=>setTimeout(i,Math.pow(2,l)*1e3))}throw s}),n=li(e);return s=>r.jsx(p.Suspense,{fallback:r.jsx(n,{}),children:r.jsx(o,{...s})})},ii=async t=>{try{await t()}catch{}},di=t=>{const e={};return Object.entries(t).forEach(([a,o])=>{e[a]=Kr(o,"skeleton")}),e},ci=t=>t,Yr={critical:["/","/connect","/mail"],secondary:["/settings","/compose","/points"],optional:["/document","/about","/terms","/privacy"]},ve=class ve{static add(e,a){this.preloadedComponents.has(e)||(this.preloadQueue.push({name:e,loader:a}),this.processQueue())}static async processQueue(){this.isPreloading||this.preloadQueue.length===0||(this.isPreloading=!0,"requestIdleCallback"in window?window.requestIdleCallback(async()=>{const e=this.preloadQueue.shift();if(e)try{await e.loader(),this.preloadedComponents.add(e.name)}catch{}this.isPreloading=!1,this.processQueue()}):setTimeout(async()=>{const e=this.preloadQueue.shift();if(e)try{await e.loader(),this.preloadedComponents.add(e.name)}catch{}this.isPreloading=!1,this.processQueue()},100))}static isPreloaded(e){return this.preloadedComponents.has(e)}static clear(){this.preloadedComponents.clear(),this.preloadQueue=[],this.isPreloading=!1}};ve.preloadedComponents=new Set,ve.preloadQueue=[],ve.isPreloading=!1;let Je=ve;const gi=()=>{"requestIdleCallback"in window&&window.requestIdleCallback(()=>{Yr.secondary.forEach(t=>{})})},Qr=({message:t})=>r.jsxs("div",{className:"flex items-center justify-center p-4",children:[r.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),r.jsx("span",{className:"ml-2 text-sm text-gray-600",children:t})]}),be=new Map;function ui(t,e){const{condition:a,fallback:o,retries:n=3,timeout:s=1e4,priority:l="medium",cacheKey:g=`conditional-${Math.random()}`}=e,i=c=>{const[h,b]=p.useState(!1),[k,m]=p.useState(null);return p.useEffect(()=>{const C=setTimeout(async()=>{const S=be.get(g);if(S&&S.isValid&&Date.now()-S.lastCheck<3e5)try{if(await S.condition()){m(()=>S.component),b(!0);return}}catch{}try{if(await a()){const N=await fi(t,n,s);be.set(g,{component:N.default,condition:a,lastCheck:Date.now(),isValid:!0}),m(()=>N.default),b(!0)}}catch{}},l==="high"?0:l==="medium"?100:500);return()=>clearTimeout(C)},[]),h?k?r.jsx(p.Suspense,{fallback:o||r.jsx(Qr,{message:"Loading component..."}),children:r.jsx(k,{...c})}):null:o||r.jsx(Qr,{message:"Checking conditions..."})};return i.displayName=`ConditionalLazy(${g})`,i}const hi={},bi={};async function fi(t,e,a){let o;for(let n=0;n<e;n++)try{const s=new Promise((l,g)=>{setTimeout(()=>g(new Error("Import timeout")),a)});return await Promise.race([t(),s])}catch(s){if(o=s,n<e-1){const l=Math.pow(2,n)*1e3;await new Promise(g=>setTimeout(g,l))}}throw o}function yi(){be.clear()}function pi(){return{cachedComponents:be.size,cacheEntries:Array.from(be.entries()).map(([t,e])=>({key:t,lastCheck:e.lastCheck,isValid:e.isValid,age:Date.now()-e.lastCheck}))}}const Zr=[{name:"react-router",path:"/assets/react-router-*.js",size:12,config:{priority:"critical",condition:()=>!0}},{name:"app-core",path:"/assets/app-core-*.js",size:25,config:{priority:"high",condition:()=>window.location.pathname==="/",delay:1e3,onIdle:!0}},{name:"wagmi",path:"/assets/wagmi-*.js",size:15,config:{priority:"high",condition:()=>!!(window.ethereum||localStorage.getItem("walletconnect")),onIdle:!0}},{name:"wc-ethereum",path:"/assets/wc-ethereum-*.js",size:273,config:{priority:"medium",condition:()=>!!window.ethereum,delay:2e3,onHover:!0}},{name:"solana-core",path:"/assets/solana-core-*.js",size:29,config:{priority:"medium",condition:()=>!!(window.solana||window.phantom),delay:1500}},{name:"mail-features",path:"/assets/mail-features-*.js",size:10,config:{priority:"medium",condition:()=>window.location.pathname.includes("/connect")||localStorage.getItem("wallet-connected")==="true",onScroll:20}},{name:"coinbase",path:"/assets/coinbase-*.js",size:75,config:{priority:"low",condition:()=>!!window.ethereum,delay:5e3,onIdle:!0}},{name:"design-system",path:"/assets/design-system-*.js",size:112,config:{priority:"low",condition:()=>window.location.pathname.includes("/internal"),delay:3e3}}];class mi{constructor(){this.preloaded=new Set,this.networkSpeedEstimate="medium",this.isLowEndDevice=!1,this.userActivityScore=0,this.detectNetworkSpeed(),this.detectDeviceCapability(),this.startUserActivityTracking()}detectNetworkSpeed(){if("connection"in navigator){const a=navigator.connection;if(a){const o=a.effectiveType;o==="4g"?this.networkSpeedEstimate="fast":o==="3g"?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}}const e=performance.now();fetch("/favicon.ico",{method:"HEAD"}).then(()=>{const a=performance.now()-e;a<100?this.networkSpeedEstimate="fast":a<300?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}).catch(()=>{this.networkSpeedEstimate="slow"})}detectDeviceCapability(){const e=navigator.deviceMemory,a=navigator.hardwareConcurrency;e&&e<4&&(this.isLowEndDevice=!0),a&&a<4&&(this.isLowEndDevice=!0),"getBattery"in navigator&&navigator.getBattery?.().then(o=>{o.level&&o.level<.2&&(this.isLowEndDevice=!0)})}startUserActivityTracking(){let e;const a=()=>{this.userActivityScore=Math.min(this.userActivityScore+1,100),clearTimeout(e),e=setTimeout(()=>{this.userActivityScore=Math.max(this.userActivityScore-1,0)},5e3)};["click","scroll","keydown","mousemove"].forEach(o=>{document.addEventListener(o,a,{passive:!0})})}shouldPreload(e){return this.networkSpeedEstimate==="slow"&&e.size>50||this.isLowEndDevice&&e.size>30?!1:e.config.condition()}async preloadChunk(e){if(!this.preloaded.has(e.name))try{if(document.querySelectorAll('script[src*="'+e.name+'"]').length===0&&document.querySelectorAll('link[href*="'+e.name+'"]').length>0)return;const o=document.createElement("link");o.rel="modulepreload",o.href=e.path.replace("*",this.getChunkHash(e.name)),o.crossOrigin="","fetchPriority"in o&&(o.fetchPriority=e.config.priority==="critical"?"high":"low"),document.head.appendChild(o),this.preloaded.add(e.name)}catch{}}getChunkHash(e){const a=Array.from(document.querySelectorAll("script[src]"));for(const o of a){const n=o.src;if(n.includes(e)){const s=n.match(new RegExp(`${e}-([A-Za-z0-9_-]+)\\.js`));if(s)return s[1]}}return"unknown"}async schedulePreload(e){const a=e.config;return a.delay&&await new Promise(o=>setTimeout(o,a.delay)),a.onIdle&&"requestIdleCallback"in window?new Promise(o=>{window.requestIdleCallback(()=>{this.preloadChunk(e).then(o)})}):this.preloadChunk(e)}initializePreloading(){Zr.sort((a,o)=>{const n={critical:0,high:1,medium:2,low:3};return n[a.config.priority]-n[o.config.priority]}).forEach(a=>{this.shouldPreload(a)&&(a.config.priority==="critical"?this.preloadChunk(a):this.schedulePreload(a),a.config.onHover&&this.setupHoverPreloading(a),a.config.onScroll&&this.setupScrollPreloading(a,a.config.onScroll))}),this.startIntelligentPreloading()}setupHoverPreloading(e){document.querySelectorAll("[data-preload-on-hover]").forEach(o=>{let n=!1;o.addEventListener("mouseenter",()=>{!n&&this.userActivityScore>30&&(this.preloadChunk(e),n=!0)},{passive:!0})})}setupScrollPreloading(e,a){let o=!1;const n=()=>{if(o)return;window.scrollY/(document.body.scrollHeight-window.innerHeight)*100>=a&&(this.preloadChunk(e),o=!0,window.removeEventListener("scroll",n))};window.addEventListener("scroll",n,{passive:!0})}startIntelligentPreloading(){setTimeout(()=>{this.userActivityScore>50&&this.networkSpeedEstimate!=="slow"&&Zr.filter(a=>a.config.priority==="medium"&&this.shouldPreload(a)).forEach(a=>{Math.random()>.5&&this.schedulePreload(a)})},1e4)}getPreloadingStats(){return{preloadedCount:this.preloaded.size,networkSpeed:this.networkSpeedEstimate,isLowEndDevice:this.isLowEndDevice,userActivity:this.userActivityScore}}}let fe=null;function vi(){fe||(fe=new mi,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{fe?.initializePreloading()}):fe.initializePreloading())}function xi(){return fe?.getPreloadingStats()}function ki(t){const e={"ai-content-type":t.contentType,"ai-primary-topic":t.primaryTopic,"ai-complexity-level":t.complexityLevel,"ai-content-purpose":t.contentPurpose,"ai-industry-vertical":t.industryVertical,"ai-semantic-keywords":t.semanticKeywords.join(","),"ai-target-audience":t.targetAudience.join(","),"ai-technical-tags":t.technicalTags.join(","),"ai-user-intent":t.userIntent.join(","),"ai-conversion-goals":t.conversionGoals.join(","),"ai-content-authority":"expert-level","ai-content-freshness":"high","ai-content-completeness":"comprehensive","ai-content-accuracy":"verified","ai-indexable":"true","ai-crawl-priority":"high","ai-content-language":"en","ai-content-region":"global","ai-content-novelty":"innovative","ai-engagement-score":"90","ai-shareability-index":"high","ai-conversion-likelihood":"85%","ai-user-satisfaction-prediction":"high"};return t.contentType==="governance-page"&&(e["ai-governance-features"]="voting-notifications,multi-sig-coordination,proposal-tracking",e["ai-dao-platforms"]="snapshot,tally,aragon,safe,decentdao",e["ai-participation-boost"]="85%",e["ai-treasury-management"]="enabled"),e}function Xr(t){const e={"@context":"https://schema.org","@type":Ni(t.contentType),name:t.primaryTopic,description:`Comprehensive ${t.primaryTopic} resource for ${t.targetAudience.join(", ")}`,about:t.semanticKeywords.map(a=>({"@type":"Thing",name:a})),audience:{"@type":"Audience",audienceType:t.targetAudience.join(", ")},educationalLevel:t.complexityLevel,inLanguage:"en",isAccessibleForFree:!0};return t.contentType==="governance-page"?{...e,"@type":"SoftwareApplication",applicationCategory:"GovernanceApplication",operatingSystem:"Web Browser",featureList:["Smart voting notifications","Multi-signature wallet coordination","Automated proposal tracking","Cross-platform DAO integration","Treasury management tools"],isRelatedTo:[{"@type":"SoftwareApplication",name:"Snapshot"},{"@type":"SoftwareApplication",name:"Tally"},{"@type":"SoftwareApplication",name:"Aragon"},{"@type":"SoftwareApplication",name:"Safe"}]}:e}function wi(t,e){return e.map(a=>({type:"related-content",target:a.url,strength:a.relevance}))}function Jr(t){const e=["Web3 Email Platform","Web3","blockchain","email","wallet","cryptocurrency"],a=["DAO","governance","voting","multi-sig","Snapshot","Tally","Aragon","Safe","proposal","community"];return t.contentType==="governance-page"?[...e,...a]:e}function Rr(t){const e=["web3-infrastructure","email-technology","blockchain-applications"],a=["dao-governance-tools","voting-notification-systems","community-management-platforms","multi-signature-coordination","treasury-management-solutions"];return t.contentType==="governance-page"?[...e,...a]:e}function Ci(t,e){return{contentClassification:{type:t.contentType,topic:t.primaryTopic,audience:t.targetAudience.join(","),complexity:t.complexityLevel,purpose:t.contentPurpose,vertical:t.industryVertical},semanticMarkup:Xr(t),entityRecognition:Jr(t),topicClustering:Rr(t),contentRelationships:e?.contentRelationships||[],...e}}function Ni(t){return{article:"Article","landing-page":"WebPage","product-page":"Product","governance-page":"SoftwareApplication",documentation:"TechArticle"}[t]||"WebPage"}function Si(t){return{"@context":"https://schema.org","@type":"MonitorAction",name:`AI Performance Tracking - ${t}`,instrument:{"@type":"SoftwareApplication",name:"AI Analytics Platform"},measurementTechnique:["User Engagement Metrics","AI Content Understanding Score","Semantic Relevance Analysis","Conversion Optimization Tracking"],result:{"@type":"Dataset",name:`${t} Performance Data`,description:"AI-optimized performance metrics and user interaction data"}}}const Ei={governancePage:{contentType:"governance-page",primaryTopic:"DAO Governance Communication Platform",semanticKeywords:["DAO governance","voting notifications","multi-sig coordination","proposal tracking","community engagement","treasury management"],targetAudience:["DAO members","governance participants","multi-sig signers","protocol teams","community managers"],complexityLevel:"intermediate",contentPurpose:"commercial",industryVertical:"blockchain-governance",technicalTags:["snapshot","tally","aragon","safe","multi-sig","voting","proposals","treasury"],userIntent:["improve-governance","increase-participation","coordinate-multi-sig","track-proposals","engage-community"],conversionGoals:["dao-integration","governance-setup","multi-sig-connection","notification-activation"]},landingPage:{contentType:"landing-page",primaryTopic:"Web3 Email Platform",semanticKeywords:["Web3 email","wallet authentication","ENS email","SNS email","blockchain email","decentralized communication"],targetAudience:["Web3 users","crypto enthusiasts","blockchain developers","DeFi users"],complexityLevel:"beginner",contentPurpose:"commercial",industryVertical:"web3-communication",technicalTags:["ethereum","solana","ens","sns","wallet-connect","metamask","phantom"],userIntent:["create-web3-email","connect-wallet","secure-communication","eliminate-passwords"],conversionGoals:["wallet-connection","email-creation","first-email-sent","premium-upgrade"]}},Li=({message:t,className:e})=>r.jsxs("div",{className:`flex items-center justify-center p-4 ${e||""}`,children:[r.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),r.jsx("span",{className:"ml-2 text-sm text-gray-600",children:t})]}),Re=new Map,ye=new Set;function er(){const t=[];return!!window.ethereum?.isMetaMask&&(ye.add("metamask"),t.push({name:"MetaMask",detected:!0,priority:1})),!!window.ethereum?.isCoinbaseWallet&&(ye.add("coinbase"),t.push({name:"Coinbase Wallet",detected:!0,priority:2})),!!window.solana?.isPhantom&&(ye.add("phantom"),t.push({name:"Phantom",detected:!0,priority:3})),t.push({name:"WalletConnect",detected:!0,priority:4}),t.sort((n,s)=>n.priority-s.priority)}function rr(t){const e=`wallet-${t.toLowerCase()}`;if(Re.has(e))return Re.get(e);const a=()=>Promise.resolve({default:()=>p.createElement("div",{},`${t} Provider Placeholder`)}),o=p.lazy(a),n=s=>r.jsx(p.Suspense,{fallback:r.jsx(Li,{message:`Loading ${t} wallet...`,className:"wallet-loading"}),children:r.jsx(o,{...s})});return n.displayName=`Lazy${t}Provider`,Re.set(e,n),n}function Ii({children:t}){const e=er();return e.filter(a=>a.priority<=2&&a.detected).forEach(a=>{setTimeout(()=>{},1e3)}),r.jsxs(r.Fragment,{children:[e.map(a=>{const o=rr(a.name);return r.jsx(o,{},a.name)}),t]})}const nr=class nr{static preloadWallet(e){const a=e.toLowerCase();this.preloadedWallets.has(a)||(this.preloadedWallets.add(a),setTimeout(()=>{rr(e)},500))}static preloadCommonWallets(){["metamask","walletconnect","coinbase"].forEach((a,o)=>{setTimeout(()=>{this.preloadWallet(a)},o*1e3)})}static getPreloadedWallets(){return Array.from(this.preloadedWallets)}};nr.preloadedWallets=new Set;let pe=nr;function Mi(){return{availableWallets:er(),preloadWallet:o=>{pe.preloadWallet(o)},getDetectedWallets:()=>Array.from(ye),hasWallet:o=>ye.has(o.toLowerCase())}}function $i({walletName:t,onConnect:e,disabled:a=!1}){const o=()=>{pe.preloadWallet(t),setTimeout(e,100)};return r.jsxs("button",{onClick:o,disabled:a,className:"wallet-connect-btn","data-wallet":t.toLowerCase(),children:["Connect ",t]})}class Ti{constructor(){this.criticalResources=[],this.observedMetrics={fcp:0,lcp:0,fid:0,cls:0,ttfb:0},this.defineCriticalResources(),this.startPerformanceObservation()}defineCriticalResources(){this.criticalResources=[{url:"/assets/index-*.css",type:"style",priority:"critical",preload:!0},{url:"/assets/index-*.js",type:"script",priority:"critical"},{url:"/assets/react-core-*.js",type:"script",priority:"high",preload:!0},{url:"https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2",type:"font",priority:"critical",preload:!0},{url:"/logo.png",type:"image",priority:"high",preload:!0}]}startPerformanceObservation(){if("PerformanceObserver"in window)try{new PerformanceObserver(s=>{for(const l of s.getEntries())l.name==="first-contentful-paint"&&(this.observedMetrics.fcp=l.startTime,this.optimizeBasedOnFCP(l.startTime))}).observe({entryTypes:["paint"]}),new PerformanceObserver(s=>{for(const l of s.getEntries())this.observedMetrics.lcp=l.startTime,this.optimizeBasedOnLCP(l.startTime)}).observe({entryTypes:["largest-contentful-paint"]});let o=0;new PerformanceObserver(s=>{for(const l of s.getEntries())l.hadRecentInput||(o+=l.value);this.observedMetrics.cls=o}).observe({entryTypes:["layout-shift"]})}catch{}window.addEventListener("load",()=>{setTimeout(()=>{const e=performance.getEntriesByType("navigation")[0];e&&(this.observedMetrics.ttfb=e.responseStart-e.requestStart,this.optimizeBasedOnTTFB(this.observedMetrics.ttfb))},0)})}optimizeBasedOnFCP(e){e>2e3?this.applyEmergencyOptimizations():e>1500&&this.applyMediumOptimizations()}optimizeBasedOnLCP(e){e>2500&&this.optimizeLCPElements()}optimizeBasedOnTTFB(e){e>600&&this.enableAggressiveCaching()}applyEmergencyOptimizations(){document.querySelectorAll('img[data-priority="low"]').forEach(o=>{o.loading="lazy",o.style.display="none",setTimeout(()=>{o.style.display=""},3e3)}),document.querySelectorAll('script[data-priority="low"]').forEach(o=>{o.setAttribute("defer","")})}applyMediumOptimizations(){["/assets/app-core-*.js","/assets/react-router-*.js"].forEach(a=>{this.preloadResource(a,"script")})}optimizeLCPElements(){document.querySelectorAll("img[data-hero], [data-lcp-element]").forEach(o=>{o instanceof HTMLImageElement&&(o.fetchPriority="high",o.loading="eager")});const a=document.querySelector("img[data-hero]")?.getAttribute("src");a&&this.preloadResource(a,"image")}enableAggressiveCaching(){const e=document.createElement("meta");e.httpEquiv="Cache-Control",e.content="public, max-age=31536000, immutable",document.head.appendChild(e)}preloadResource(e,a){if(document.querySelector(`link[href*="${e}"]`))return;const n=document.createElement("link");switch(n.rel="preload",n.href=e,a){case"script":n.as="script";break;case"style":n.as="style";break;case"font":n.as="font",n.type="font/woff2",n.crossOrigin="";break;case"image":n.as="image";break}document.head.appendChild(n)}optimizeCriticalPath(){this.criticalResources.filter(e=>e.priority==="critical"&&e.preload).forEach(e=>{this.preloadResource(e.url,e.type)}),this.inlineCriticalCSS(),this.optimizeFontLoading(),this.removeRenderBlocking(),this.setupProgressiveLoading()}inlineCriticalCSS(){const e=document.querySelector('link[rel="stylesheet"][data-critical]');e&&this.isSmallResource(e.getAttribute("href")||"")&&fetch(e.getAttribute("href")||"").then(a=>a.text()).then(a=>{if(a.length<1e4){const o=document.createElement("style");o.textContent=a,document.head.appendChild(o),e.remove()}}).catch(()=>{})}optimizeFontLoading(){document.querySelectorAll('link[href*="fonts.googleapis.com"]').forEach(a=>{const o=a.getAttribute("href")||"";if(!o.includes("display=swap")){const n=o.includes("?")?"&":"?";a.setAttribute("href",`${o}${n}display=swap`)}})}removeRenderBlocking(){document.querySelectorAll('link[rel="stylesheet"]:not([data-critical])').forEach(a=>{const o=a.cloneNode(!0);o.rel="preload",o.as="style",o.onload=()=>{o.onload=null,o.rel="stylesheet"};const n=document.createElement("noscript"),s=a.cloneNode(!0);n.appendChild(s),document.head.appendChild(o),document.head.appendChild(n),a.remove()})}setupProgressiveLoading(){const e=document.querySelectorAll("img[data-src]");if("IntersectionObserver"in window){const a=new IntersectionObserver(o=>{o.forEach(n=>{if(n.isIntersecting){const s=n.target;s.src=s.dataset.src||"",s.removeAttribute("data-src"),a.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});e.forEach(o=>a.observe(o))}else e.forEach(a=>{const o=a;o.src=o.dataset.src||""})}isSmallResource(e){return e.includes("critical")||e.includes("inline")}getPerformanceMetrics(){return{...this.observedMetrics,score:this.calculatePerformanceScore()}}calculatePerformanceScore(){let e=100;return this.observedMetrics.fcp>2e3?e-=20:this.observedMetrics.fcp>1500&&(e-=10),this.observedMetrics.lcp>2500?e-=25:this.observedMetrics.lcp>2e3&&(e-=15),this.observedMetrics.cls>.1?e-=15:this.observedMetrics.cls>.05&&(e-=8),this.observedMetrics.ttfb>600?e-=10:this.observedMetrics.ttfb>400&&(e-=5),Math.max(e,0)}}const Ee={mark:t=>{typeof performance<"u"&&performance.mark&&performance.mark(t)},measure:(t,e,a)=>{if(typeof performance<"u"&&performance.measure)try{performance.measure(t,e,a);const o=performance.getEntriesByName(t);return o[o.length-1]?.duration||0}catch{return 0}return 0},getEntries:t=>typeof performance<"u"&&performance.getEntriesByName?t?performance.getEntriesByName(t):performance.getEntries():[],clearEntries:t=>{typeof performance<"u"&&(t?(performance.clearMeasures?.(t),performance.clearMarks?.(t)):(performance.clearMeasures?.(),performance.clearMarks?.()))}},Ai=(t,e=[])=>{p.useEffect(()=>(Ee.mark(`${t}-start`),()=>{Ee.mark(`${t}-end`),Ee.measure(t,`${t}-start`,`${t}-end`)}),[t,e])},Ui=t=>{const e=p.useRef(t);return e.current=t,p.useCallback((...a)=>e.current(...a),[])},Pi=(t,e,a)=>{const o=p.useRef(e),n=p.useRef(void 0);return p.useMemo(()=>(a&&process.env.NODE_ENV==="development"&&e.some((s,l)=>s!==o.current[l]),o.current=e,n.current=t(),n.current),[t,a,e])},Le=new Map,zi=t=>{const e=Le.get(t)||0;Le.set(t,e+1),p.useEffect(()=>{process.env.NODE_ENV})},Di=()=>Object.fromEntries(Le),ji=()=>Le.clear(),Bi=t=>p.lazy(t),Oi=(t=.1)=>{const[e,a]=p.useState(new Set),o=p.useRef(null);p.useEffect(()=>(o.current=new IntersectionObserver(s=>{s.forEach(l=>{if(l.isIntersecting){const g=l.target,i=g.dataset.src;i&&(g.src=i,g.onload=()=>{a(c=>new Set(c).add(i))},o.current?.unobserve(g))}})},{threshold:t}),()=>o.current?.disconnect()),[t]);const n=p.useCallback(s=>{s&&o.current&&o.current.observe(s)},[]);return{loadedImages:e,observeImage:n}},Wi=t=>{typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{t().catch(()=>{})}):setTimeout(()=>{t().catch(()=>{})},100)},et={},Fi=t=>{et[t.name]=t.value,process.env.NODE_ENV},Vi=()=>et,Hi=(t,e="script")=>{if(typeof document<"u"){const a=document.createElement("link");a.rel="prefetch",a.href=t,a.as=e,document.head.appendChild(a)}},qi=(t,e="script",a)=>{if(typeof document<"u"){const o=document.createElement("link");o.rel="preload",o.href=t,o.as=e,a&&(o.crossOrigin="anonymous"),document.head.appendChild(o)}},_i=t=>{const e=p.useRef(new Set),a=p.useRef(new Set),o=p.useCallback((s,l)=>{const g=setTimeout(()=>{e.current.delete(g),s()},l);return e.current.add(g),g},[]),n=p.useCallback((s,l)=>{const g=setInterval(s,l);return a.current.add(g),g},[]);return p.useEffect(()=>{const s=e.current,l=a.current;return()=>{s.forEach(g=>clearTimeout(g)),l.forEach(g=>clearInterval(g)),process.env.NODE_ENV}},[t]),{createTimer:o,createInterval:n}},Z={maxBundleSize:500,maxChunkSize:200,maxImageSize:100,maxFCP:1800,maxLCP:2500,maxFID:100,maxCLS:.1,check:t=>{const e=[];return t.FCP&&t.FCP>Z.maxFCP&&e.push(`FCP (${t.FCP}ms) exceeds budget (${Z.maxFCP}ms)`),t.LCP&&t.LCP>Z.maxLCP&&e.push(`LCP (${t.LCP}ms) exceeds budget (${Z.maxLCP}ms)`),t.FID&&t.FID>Z.maxFID&&e.push(`FID (${t.FID}ms) exceeds budget (${Z.maxFID}ms)`),t.CLS&&t.CLS>Z.maxCLS&&e.push(`CLS (${t.CLS}) exceeds budget (${Z.maxCLS})`),e}};class Gi{constructor(e){this.metrics={timestamp:Date.now()},this.observers=[],this.performanceMarks=new Map,this.reportCallback=e,this.initializeWebVitals(),this.initializeCustomObservers(),this.collectDeviceInfo()}initializeWebVitals(){ge.onCLS(e=>{this.metrics.CLS=e.value,this.reportMetric("CLS",e.value)}),ge.onINP(e=>{this.metrics.INP=e.value,this.reportMetric("INP",e.value)}),ge.onFCP(e=>{this.metrics.FCP=e.value,this.reportMetric("FCP",e.value)}),ge.onLCP(e=>{this.metrics.LCP=e.value,this.reportMetric("LCP",e.value)}),ge.onTTFB(e=>{this.metrics.TTFB=e.value,this.reportMetric("TTFB",e.value)})}initializeCustomObservers(){if("PerformanceObserver"in window){const e=new PerformanceObserver(o=>{o.getEntries().forEach(s=>{if(s.entryType==="navigation"){const l=s;this.metrics.bundleLoadTime=l.loadEventEnd-l.fetchStart}})});try{e.observe({entryTypes:["navigation"]}),this.observers.push(e)}catch{}const a=new PerformanceObserver(o=>{o.getEntries().forEach(s=>{(s.name.includes(".js")||s.name.includes(".css"))&&this.trackResourceLoad(s.name,s.duration)})});try{a.observe({entryTypes:["resource"]}),this.observers.push(a)}catch{}}}collectDeviceInfo(){if(typeof window<"u"){const e=navigator;e.connection&&(this.metrics.connection=e.connection.effectiveType||e.connection.type),e.deviceMemory&&(this.metrics.deviceMemory=e.deviceMemory),e.hardwareConcurrency&&(this.metrics.hardwareConcurrency=e.hardwareConcurrency),this.metrics.viewport={width:window.innerWidth,height:window.innerHeight}}}reportMetric(e,a){this.reportCallback&&this.reportCallback({...this.metrics,timestamp:Date.now()}),process.env.NODE_ENV}trackResourceLoad(e,a){const o=e.includes(".js"),n=e.includes(".css");if(o||n){const s=o?"JavaScript":"CSS";this.reportMetric(`${s} Load`,a)}}measureComponentRender(e,a){this.metrics.componentRenderTime=a,this.reportMetric(`Component Render (${e})`,a)}measureAPICall(e,a){this.metrics.apiResponseTime=a,this.reportMetric(`API Call (${e})`,a)}measureRouteChange(e,a){this.metrics.routeChangeTime=a,this.reportMetric(`Route Change (${e})`,a)}markStart(e){this.performanceMarks.set(e,performance.now())}markEnd(e){const a=this.performanceMarks.get(e);if(a){const o=performance.now()-a;this.reportMetric(`Mark (${e})`,o),this.performanceMarks.delete(e)}}trackRouteChange(e,a,o){typeof a=="string"?this.measureRouteChange(a,o||performance.now()):this.measureRouteChange(e,a)}getSummary(){return{coreWebVitals:{score:this.calculateScore(),LCP:this.metrics.LCP,INP:this.metrics.INP,CLS:this.metrics.CLS},loadingPerformance:{FCP:this.metrics.FCP,TTFB:this.metrics.TTFB,bundleLoadTime:this.metrics.bundleLoadTime},runtime:{routeChangeTime:this.metrics.routeChangeTime,apiResponseTime:this.metrics.apiResponseTime,componentRenderTime:this.metrics.componentRenderTime},device:{connection:this.metrics.connection,deviceMemory:this.metrics.deviceMemory,hardwareConcurrency:this.metrics.hardwareConcurrency}}}calculateScore(){let e=100;return this.metrics.LCP&&this.metrics.LCP>2500?e-=25:this.metrics.LCP&&this.metrics.LCP>2e3&&(e-=15),this.metrics.INP&&this.metrics.INP>200?e-=20:this.metrics.INP&&this.metrics.INP>100&&(e-=10),this.metrics.CLS&&this.metrics.CLS>.1?e-=15:this.metrics.CLS&&this.metrics.CLS>.05&&(e-=8),Math.max(e,0)}getMetrics(){return{...this.metrics}}cleanup(){this.observers.forEach(e=>e.disconnect()),this.observers=[]}}let Ie=null;const Ki=t=>(Ie||(Ie=new Gi(t)),Ie),Me=()=>Ie,rt=t=>{const e=p.useRef(performance.now());p.useEffect(()=>{const a=performance.now()-e.current,o=Me();o&&o.measureComponentRender(t,a)},[t])},Yi=(t,e)=>p.forwardRef((a,o)=>(rt(e),p.createElement(t,{...a,ref:o}))),Qi=async(t,e)=>{const a=performance.now(),o=await t(),n=performance.now()-a,s=Me();return s&&s.measureAPICall(e,n),o},tt={LCP:2500,INP:200,CLS:.1,FCP:1800,TTFB:800,bundleSize:17e4},Zi=(t,e=tt)=>{const a=[];return e.LCP&&t.LCP&&t.LCP>e.LCP&&a.push(`LCP: ${t.LCP.toFixed(0)}ms (budget: ${e.LCP}ms)`),e.INP&&t.INP&&t.INP>e.INP&&a.push(`INP: ${t.INP.toFixed(0)}ms (budget: ${e.INP}ms)`),e.CLS&&t.CLS&&t.CLS>e.CLS&&a.push(`CLS: ${t.CLS.toFixed(3)} (budget: ${e.CLS})`),e.FCP&&t.FCP&&t.FCP>e.FCP&&a.push(`FCP: ${t.FCP.toFixed(0)}ms (budget: ${e.FCP}ms)`),e.TTFB&&t.TTFB&&t.TTFB>e.TTFB&&a.push(`TTFB: ${t.TTFB.toFixed(0)}ms (budget: ${e.TTFB}ms)`),{passed:a.length===0,violations:a}},Xi=t=>{const e=t||Me()?.getMetrics()||{timestamp:Date.now()},a={timestamp:new Date().toISOString(),metrics:e,environment:{userAgent:typeof window<"u"?window.navigator.userAgent:"unknown",url:typeof window<"u"?window.location.href:"unknown",referrer:typeof document<"u"?document.referrer:"unknown",viewport:e.viewport,connection:e.connection,deviceMemory:e.deviceMemory,hardwareConcurrency:e.hardwareConcurrency}};return JSON.stringify(a,null,2)},Ji=(t={})=>{const{successMessage:e="",successDuration:a=3e3,errorPrefix:o="",onSuccess:n,onError:s}=t,[l,g]=p.useState(!1),[i,c]=p.useState(""),[h,b]=p.useState(""),k=p.useCallback(()=>{c(""),b("")},[]),m=p.useCallback(()=>{c("")},[]),f=p.useCallback(()=>{b("")},[]),y=p.useCallback(async C=>{g(!0),k();try{await C(),e&&(c(e),a>0&&setTimeout(()=>{c("")},a)),n&&n()}catch(S){const w=S instanceof Error?S.message:"An error occurred";throw b(o?`${o}: ${w}`:w),s&&S instanceof Error&&s(S),S}finally{g(!1)}},[e,a,o,n,s,k]);return{isSubmitting:l,successMessage:i,errorMessage:h,submit:y,clearMessages:k,clearSuccess:m,clearError:f}},Ri=(t=!1)=>{const[e,a]=p.useState(t),o=p.useCallback(()=>a(!0),[]),n=p.useCallback(()=>a(!1),[]),s=p.useCallback(()=>a(l=>!l),[]);return{value:e,setTrue:o,setFalse:n,toggle:s,setValue:a}},ed=(t={})=>{const{successDuration:e=2e3,onSuccess:a,onError:o}=t,[n,s]=p.useState(null),l=p.useCallback(async c=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(c);else{const h=document.createElement("textarea");h.value=c,h.style.position="fixed",h.style.left="-999999px",h.style.top="-999999px",document.body.appendChild(h),h.focus(),h.select();const b=document.execCommand("copy");if(document.body.removeChild(h),!b)throw new Error("Copy command was unsuccessful")}return s(c),a?.(c),setTimeout(()=>{s(null)},e),!0}catch(h){const b=h instanceof Error?h:new Error("Copy failed");return o?.(b),!1}},[e,a,o]),g=p.useCallback(c=>n===c,[n]),i=p.useCallback(()=>{s(null)},[]);return{copiedValue:n,copyToClipboard:l,isCopied:g,resetCopiedState:i}},rd=(t={})=>{const{successDuration:e=2e3,onSuccess:a,onError:o}=t,[n,s]=p.useState({}),l=p.useCallback(async(c,h)=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(c);else{const b=document.createElement("textarea");b.value=c,b.style.position="fixed",b.style.left="-999999px",b.style.top="-999999px",document.body.appendChild(b),b.focus(),b.select();const k=document.execCommand("copy");if(document.body.removeChild(b),!k)throw new Error("Copy command was unsuccessful")}return s(b=>({...b,[h]:!0})),a?.(c),setTimeout(()=>{s(b=>({...b,[h]:!1}))},e),!0}catch(b){const k=b instanceof Error?b:new Error("Copy failed");return o?.(k),!1}},[e,a,o]),g=p.useCallback(c=>n[c]||!1,[n]),i=p.useCallback(c=>{s(c?h=>({...h,[c]:!1}):{})},[]);return{copiedStates:n,copyToClipboard:l,isCopied:g,resetCopiedState:i}},td=t=>{if(t===0)return"0 Bytes";const e=1024,a=["Bytes","KB","MB","GB","TB"],o=Math.floor(Math.log(t)/Math.log(e)),n=Math.min(o,a.length-1);return parseFloat((t/Math.pow(e,n)).toFixed(2))+" "+a[n]},ad=(t,e,a)=>{const o={bytes:0,kb:1,mb:2,gb:3,tb:4},n=1024,l=t*Math.pow(n,o[e])/Math.pow(n,o[a]);return Math.round(l*100)/100},od=t=>{const e=t.match(/^(\d+(?:\.\d+)?)\s*(bytes?|kb|mb|gb|tb)$/i);if(!e)return null;const a=parseFloat(e[1]),o=e[2].toLowerCase(),s={bytes:1,byte:1,kb:1024,mb:1024*1024,gb:1024*1024*1024,tb:1024*1024*1024*1024}[o];return s?Math.round(a*s):null},nd=t=>t,sd=t=>{if(typeof document>"u")return;const e=document.createElement("style");e.textContent=t,e.setAttribute("data-critical","true"),document.head.appendChild(e)},ld=t=>{if(typeof document>"u")return;const e=document.createElement("link");e.rel="preload",e.as="style",e.href=t,e.onload=()=>{e.rel="stylesheet"},document.head.appendChild(e);const a=document.createElement("noscript");a.innerHTML=`<link rel="stylesheet" href="${t}">`,document.head.appendChild(a)},id=t=>{const e={};return Object.entries(t).forEach(([a,o])=>{e[`--${a}`]=typeof o=="number"?`${o}px`:o}),e},dd={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},cd=(t,e=dd)=>{const[a,o]=p.useState("base");return p.useEffect(()=>{const n=()=>{const s=window.innerWidth;s>=e["2xl"]?o("2xl"):s>=e.xl?o("xl"):s>=e.lg?o("lg"):s>=e.md?o("md"):s>=e.sm?o("sm"):s>=e.xs?o("xs"):o("base")};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),t[a]||t.base||{}},at=()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,gd=()=>{const[t,e]=p.useState(at);return p.useEffect(()=>{const a=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{e(a.matches)};return a.addEventListener?a.addEventListener("change",o):a.addListener(o),()=>{a.removeEventListener?a.removeEventListener("change",o):a.removeListener(o)}},[]),t},ud=(t,e=["layout","paint"])=>{t&&(t.style.contain=e.join(" "))},hd=(t,e)=>t?(t.style.willChange=e.join(", "),()=>{t.style.willChange="auto"}):void 0,bd=t=>{typeof window>"u"||requestAnimationFrame(()=>{t.forEach(e=>e())})},fd=(...t)=>t.filter(Boolean).join(" "),yd=t=>{const e={},a=["display","position","width","height","margin","padding","fontSize","fontFamily","color","backgroundColor"];return Object.entries(t).forEach(([o,n])=>{a.includes(o)&&(e[o]=n)}),e},pd=(t,e=[])=>{const[a,o]=p.useState(null),[n,s]=p.useState(!0);return p.useEffect(()=>{let l=!0;return t().then(g=>{l&&(o(g.default),s(!1))}),()=>{l=!1}},[t,...e]),{styles:a,loading:n}},md=(t,e="1rem")=>({display:"grid",gridTemplateColumns:`repeat(${t}, minmax(0, 1fr))`,gap:e,contain:"layout",willChange:"transform"}),vd=(t="row",e="center",a="flex-start")=>({display:"flex",flexDirection:t,alignItems:e,justifyContent:a,contain:"layout"}),xd=t=>{const[e,a]=p.useState(!1);return p.useEffect(()=>{const o=window.matchMedia(t);a(o.matches);const n=()=>a(o.matches);return o.addEventListener?o.addEventListener("change",n):o.addListener(n),()=>{o.removeEventListener?o.removeEventListener("change",n):o.removeListener(n)}},[t]),e},kd=(t,e)=>{const[a,o]=p.useState("light");return p.useEffect(()=>{const n=window.matchMedia("(prefers-color-scheme: dark)");o(n.matches?"dark":"light");const s=()=>{o(n.matches?"dark":"light")};return n.addEventListener?n.addEventListener("change",s):n.addListener(s),()=>{n.removeEventListener?n.removeEventListener("change",s):n.removeListener(s)}},[]),a==="dark"?e:t},wd=t=>{const e={src:t.src,alt:t.alt,loading:t.loading||"lazy"};return t.title&&(e.title=t.title),t.width&&(e.width=t.width),t.height&&(e.height=t.height),t.sizes&&(e.sizes=t.sizes),t.srcSet&&(e.srcSet=t.srcSet),e.itemProp="image",e},Cd=(t,e=[320,640,768,1024,1280,1920])=>e.map(a=>`${t.replace(/\{width\}/g,a.toString())} ${a}w`).join(", "),Nd=t=>t.map(e=>e.maxWidth?`(max-width: ${e.maxWidth}px) ${e.size}`:e.size).join(", "),Sd=(t,e="openGraph")=>{const a={};return e==="openGraph"?(a["og:image"]=t.url,t.width&&(a["og:image:width"]=t.width.toString()),t.height&&(a["og:image:height"]=t.height.toString()),t.alt&&(a["og:image:alt"]=t.alt),t.type&&(a["og:image:type"]=t.type)):(a["twitter:image"]=t.url,t.alt&&(a["twitter:image:alt"]=t.alt)),a},Ed=(t='img[loading="lazy"]')=>{if(typeof window>"u"||!("IntersectionObserver"in window))return;const e=document.querySelectorAll(t);if("loading"in HTMLImageElement.prototype){e.forEach(o=>{o.dataset.src&&(o.src=o.dataset.src)});return}const a=new IntersectionObserver(o=>{o.forEach(n=>{if(n.isIntersecting){const s=n.target;s.dataset.src&&(s.src=s.dataset.src,s.removeAttribute("data-src")),s.dataset.srcset&&(s.srcset=s.dataset.srcset,s.removeAttribute("data-srcset")),a.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});return e.forEach(o=>a.observe(o)),()=>{e.forEach(o=>a.unobserve(o))}},ot=()=>typeof window>"u"?Promise.resolve(!1):new Promise(t=>{const e=new Image;e.onload=e.onerror=function(){t(e.height===2)},e.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"}),nt=()=>typeof window>"u"?Promise.resolve(!1):new Promise(t=>{const e=new Image;e.onload=()=>t(!0),e.onerror=()=>t(!1),e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="}),Ld=async(t="jpg")=>{const[e,a]=await Promise.all([ot(),nt()]);return a?"avif":e?"webp":t},Id=(t,e,a,o)=>`
|
|
39
34
|
<picture>
|
|
40
35
|
${t.map(s=>{const l=[`srcset="${s.srcSet}"`];return s.type&&l.push(`type="${s.type}"`),s.media&&l.push(`media="${s.media}"`),s.sizes&&l.push(`sizes="${s.sizes}"`),`<source ${l.join(" ")}>`}).join(`
|
|
41
36
|
`)}
|
|
42
37
|
<img src="${e}" alt="${a}"${o?` class="${o}"`:""} loading="lazy">
|
|
43
|
-
</picture>`.trim(),
|
|
38
|
+
</picture>`.trim(),Md=(t,e="image")=>{if(typeof document>"u")return;const a=document.createElement("link");a.rel="preload",a.as=e,a.href=t,t.includes(".webp")?a.type="image/webp":t.includes(".avif")&&(a.type="image/avif"),document.head.appendChild(a)},$d=(t,e,a)=>{if(typeof window>"u")return;const o=new Image;o.src=t,o.classList.add("progressive-image-placeholder"),a.appendChild(o);const n=new Image;n.src=e,n.classList.add("progressive-image-main"),n.style.opacity="0",n.onload=()=>{a.appendChild(n),requestAnimationFrame(()=>{n.style.transition="opacity 0.3s",n.style.opacity="1",setTimeout(()=>{o.remove()},300)})}},Td=t=>new Promise(e=>{const a=performance.now();t.complete?e({loadTime:0,size:0,format:t.src.split(".").pop()||"unknown",dimensions:{width:t.naturalWidth,height:t.naturalHeight},isLazyLoaded:t.loading==="lazy",isOptimized:t.srcset!==""||t.sizes!==""}):t.addEventListener("load",()=>{const o=performance.now()-a;e({loadTime:o,size:0,format:t.src.split(".").pop()||"unknown",dimensions:{width:t.naturalWidth,height:t.naturalHeight},isLazyLoaded:t.loading==="lazy",isOptimized:t.srcset!==""||t.sizes!==""})})}),Ad=(t,e,a="#e0e0e0")=>{const o=`
|
|
44
39
|
<svg width="${t}" height="${e}" xmlns="http://www.w3.org/2000/svg">
|
|
45
40
|
<rect width="100%" height="100%" fill="${a}"/>
|
|
46
41
|
</svg>
|
|
47
|
-
`;return`data:image/svg+xml;base64,${btoa(o)}`},Yd=(t,e)=>{const a=1/e*100;t.style.position="relative",t.style.paddingTop=`${a}%`;const o=t.querySelector("img");o&&(o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.style.objectFit="cover")},ie={createPureFunction:t=>t,isDevelopment:process.env.NODE_ENV==="development",isProduction:process.env.NODE_ENV==="production",isTest:process.env.NODE_ENV==="test",createFeatureFlags:(t={})=>({enableAnalytics:process.env.VITE_ENABLE_ANALYTICS==="true",enableDebugTools:process.env.NODE_ENV==="development",enablePerformanceMonitoring:process.env.VITE_ENABLE_PERF_MONITORING!=="false",...t})},Qd=t=>{const e={};return Object.entries(t).forEach(([a,o])=>{e[a]=()=>{try{return o()}catch{return Promise.resolve({default:null})}}}),e},dt={createDebounce:t=>e=>{let a;return((...o)=>{clearTimeout(a),a=setTimeout(()=>e(...o),t)})},memoize:t=>{const e=new Map;return((...a)=>{const o=JSON.stringify(a);if(e.has(o))return e.get(o);const n=t(...a);return e.set(o,n),n})},isDeepEqual:(t,e)=>{if(t===e)return!0;if(t==null||e==null||typeof t!="object"||typeof e!="object")return!1;const a=Object.keys(t),o=Object.keys(e);if(a.length!==o.length)return!1;for(const n of a)if(!o.includes(n)||!dt.isDeepEqual(t[n],e[n]))return!1;return!0},createThrottle:t=>e=>{let a=0;return((...o)=>{const n=Date.now();if(n-a>=t)return a=n,e(...o)})}},Zd=t=>{const e={};return Object.entries(t).forEach(([a,o])=>{e[a]={},Object.entries(o).forEach(([n,s])=>{e[a][n]=()=>import(s).then(l=>({[n]:l[n]}))})}),e},de={getModuleSize:t=>new Promise(e=>{if(typeof window<"u"&&"performance"in window){const o=performance.getEntriesByType("resource").find(n=>n.name.includes(t));e(o?.transferSize||0)}else e(0)}),usageTracker:new Set,trackUsage:t=>{ie.isDevelopment&&de.usageTracker.add(t)},getUsageReport:()=>ie.isDevelopment?Array.from(de.usageTracker).sort():[],estimateImpact:t=>{const e=t.map(a=>de.getModuleSize(a).then(o=>[a,o]));return Promise.all(e).then(a=>{const o={};let n=0;return a.forEach(([s,l])=>{o[s]=l,n+=l}),{total:n,modules:o}})}},ct={inlineCriticalCSS:t=>{if(typeof document<"u"){const e=document.createElement("style");e.textContent=t,document.head.appendChild(e)}},loadAsyncCSS:t=>{if(typeof document<"u"){const e=document.createElement("link");e.rel="stylesheet",e.href=t,e.media="print",e.onload=()=>{e.media="all"},document.head.appendChild(e)}},removeUnusedCSS:t=>{if(typeof document>"u")return;const e=new Set;return t.forEach(a=>{try{document.querySelector(a)&&e.add(a)}catch{}}),{used:Array.from(e),unused:t.filter(a=>!e.has(a))}}},Xd=(t={})=>{const{features:e={},criticalCSS:a="",enableUsageTracking:o=ie.isDevelopment}=t;return{features:ie.createFeatureFlags(e),initialize:()=>{a&&typeof document<"u"&&ct.inlineCriticalCSS(a)},cleanup:()=>{de.usageTracker.clear()},getReport:()=>({usage:de.getUsageReport(),features:ie.createFeatureFlags(e)})}};let nr;function Jd(t){throw typeof window<"u"?new Error("Web navigation service not implemented in shared library"):new Error("React Native navigation service not implemented in shared library")}function G(t){return nr||(nr=Jd()),nr}function Rd(){const t=G(),e=t.getCurrentState();return{navigate:(a,o)=>{t.navigate(a,o)},goBack:a=>{t.goBack(a)},replace:(a,o)=>{t.replace(a,o)},currentPath:e.currentPath,searchParams:e.searchParams,params:e.params,canGoBack:t.canGoBack(),isSupported:t.isSupported()}}function ec(){const e=G().getCurrentState(),a=Object.keys(e.searchParams).length>0?"?"+new URLSearchParams(e.searchParams).toString():"";return{pathname:e.currentPath,search:a,searchParams:e.searchParams,hash:"",state:{},key:e.currentPath}}function rc(){const t=G(),e=t.getCurrentState();return[new URLSearchParams(e.searchParams),n=>{const s=n instanceof URLSearchParams?Object.fromEntries(n.entries()):n,l=new URLSearchParams(s).toString(),g=e.currentPath+(l?`?${l}`:"");t.replace(g)}]}const ae={navigate:(t,e)=>{G().navigate(t,e)},goBack:t=>{G().goBack(t)},replace:(t,e)=>{G().replace(t,e)},getCurrentPath:()=>G().getCurrentPath(),getSearchParams:()=>G().getSearchParams(),goToMail:()=>{ae.navigate("/mail")},goToPreferences:()=>{ae.navigate("/preferences")},goToCompose:(t,e)=>{const a=new URLSearchParams;t&&a.set("type",t),e&&Object.entries(e).forEach(([n,s])=>{a.set(n,s)});const o=a.toString();ae.navigate(`/mail/compose${o?`?${o}`:""}`)},goToConnect:()=>{ae.navigate("/connect")},goToDelegate:()=>{ae.navigate("/admin/delegate")},goToHome:()=>{ae.navigate("/")},canGoBack:()=>G().canGoBack()};function tc(t,e=3,a=1e3){return y.lazy(()=>new Promise((o,n)=>{const s=l=>{t().then(o).catch(g=>{l>0?setTimeout(()=>{s(l-1)},a):n(g)})};s(e)}))}function ac(t){let e=null;const a=()=>(e||(e=t()),e.then(()=>{}));return{Component:y.lazy(()=>e||t()),preload:a}}function oc(t,e={}){const{fallback:a=r.jsx("div",{children:"Loading..."}),errorFallback:o=r.jsx("div",{children:"Failed to load component"}),loadingDelay:n=200,minimumLoadingTime:s=500}=e,l=y.lazy(async()=>{const c=Date.now();try{const i=await t(),h=Date.now()-c;return h<s&&await new Promise(b=>setTimeout(b,s-h)),i}catch{return{default:(()=>o)}}}),g=()=>{const[c,i]=y.useState(!1);return y.useEffect(()=>{const h=setTimeout(()=>{i(!0)},n);return()=>clearTimeout(h)},[]),c?r.jsx(r.Fragment,{children:a}):null};return y.forwardRef((c,i)=>r.jsx(y.Suspense,{fallback:r.jsx(g,{}),children:r.jsx(l,{...c,ref:i})}))}function gt(t,e={}){const[a,o]=y.useState(!1),[n,s]=y.useState(!1);return y.useEffect(()=>{const l=t.current;if(!l||n)return;const g=new IntersectionObserver(([c])=>{c.isIntersecting&&(o(!0),s(!0),g.disconnect())},{rootMargin:"50px",threshold:.01,...e});return g.observe(l),()=>{g.disconnect()}},[t,e,n]),a}const nc=({children:t,fallback:e=r.jsx("div",{children:"Loading..."}),threshold:a=.01,rootMargin:o="50px",placeholder:n})=>{const s=y.useRef(null),l=gt(s,{threshold:a,rootMargin:o});return r.jsx("div",{ref:s,children:l?t:n||e})};function sc(t){const{importFn:e,preloadOnHover:a=!0,preloadOnFocus:o=!0,prefetchDelay:n=50}=t;let s=null,l=null;const g=()=>(l||(l=e()),l),c=()=>{s&&clearTimeout(s),s=setTimeout(()=>{g()},n)};return{Component:y.lazy(()=>l||e()),preload:g,linkProps:{...a&&{onMouseEnter:c,onMouseLeave:()=>{s&&clearTimeout(s)}},...o&&{onFocus:c}}}}function lc(t,e=[]){const[a,o]=y.useState(null),[n,s]=y.useState(!0),[l,g]=y.useState(null);return y.useEffect(()=>{let c=!0;return s(!0),g(null),t().then(i=>{c&&(o(i),s(!1))}).catch(i=>{c&&(g(i),s(!1))}),()=>{c=!1}},[t,...e]),{module:a,loading:n,error:l}}class ut{constructor(e=3,a=100){this.queue=new Set,this.isProcessing=!1,this.batchSize=e,this.delay=a}add(e){this.queue.add(e),this.process()}async process(){if(this.isProcessing||this.queue.size===0)return;this.isProcessing=!0;const e=Array.from(this.queue).slice(0,this.batchSize);e.forEach(a=>this.queue.delete(a)),await Promise.all(e.map(a=>a().catch(()=>{}))),this.queue.size>0&&await new Promise(a=>setTimeout(a,this.delay)),this.isProcessing=!1,this.queue.size>0&&this.process()}}function ic(t,e,a){if(typeof document>"u")return;const o=document.createElement("link");o.rel=e,o.href=t,a&&(e==="preload"||e==="prefetch")&&(o.as=a),document.head.appendChild(o)}var sr=(t=>(t[t.HIGH=0]="HIGH",t[t.MEDIUM=1]="MEDIUM",t[t.LOW=2]="LOW",t[t.IDLE=3]="IDLE",t))(sr||{});class ht{constructor(){this.queues=new Map,this.isProcessing=!1,Object.values(sr).filter(e=>typeof e=="number").forEach(e=>{this.queues.set(e,[])})}load(e,a=1){const o=this.queues.get(a);o&&o.push(e),this.process()}async process(){if(!this.isProcessing){this.isProcessing=!0;for(const[e,a]of this.queues)for(;a.length>0;){const o=a.shift();if(o)try{await o()}catch{}e>=2&&await new Promise(n=>setTimeout(n,50))}this.isProcessing=!1}}}const dc=new ut,cc=new ht;class lr{constructor(e={}){this.prefix=e.prefix||"mailbox",this.defaultTTL=e.ttl,this.platformStorage=e.platformStorage||this.createFallbackStorage()}createFallbackStorage(){const e=new Map;return{getItem:a=>e.get(a)||null,setItem:(a,o)=>{e.set(a,o)},removeItem:a=>{e.delete(a)},clear:()=>{e.clear()},getAllKeys:()=>Array.from(e.keys())}}getKey(e){return`${this.prefix}-${e}`}isExpired(e){return e.ttl?Date.now()-e.timestamp>e.ttl:!1}set(e,a,o){try{const n={value:a,timestamp:Date.now(),ttl:o||this.defaultTTL};this.platformStorage.setItem(this.getKey(e),JSON.stringify(n))}catch{}}get(e,a){try{const o=this.platformStorage.getItem(this.getKey(e));if(!o)return a;const n=JSON.parse(o);return this.isExpired(n)?(this.remove(e),a):n.value}catch{return a}}remove(e){try{this.platformStorage.removeItem(this.getKey(e))}catch{}}clear(e){try{if(this.platformStorage.getAllKeys){const a=this.platformStorage.getAllKeys(),o=this.getKey(e||""),n=a.filter(s=>s.startsWith(o));for(const s of n)this.platformStorage.removeItem(s)}else this.platformStorage.clear?.()}catch(a){console.error("Failed to clear storage:",a)}}has(e){try{return this.platformStorage.getItem(this.getKey(e))!==null}catch(a){return console.error(`Failed to check item ${e}:`,a),!1}}getAllKeys(){try{if(this.platformStorage.getAllKeys){const e=this.platformStorage.getAllKeys(),a=`${this.prefix}-`;return e.filter(o=>o.startsWith(a)).map(o=>o.substring(a.length))}return[]}catch(e){return console.error("Failed to get all keys:",e),[]}}}const gc=new lr,uc=new lr({prefix:"mailbox-theme"}),hc=new lr({prefix:"walletUser",ttl:10080*60*1e3}),bc=t=>{if(!t)throw new Error("PlatformStorage must be provided to createSimpleStorage");return{setItem:(e,a)=>{try{t.setItem(e,a)}catch{}},getItem:e=>{try{return t.getItem(e)}catch{return null}},removeItem:e=>{try{t.removeItem(e)}catch{}}}};function bt(){const t={isWalletBrowser:!1,walletType:"unknown",hasEthereum:!1,hasSolana:!1,provider:null};if(typeof window>"u")return t;try{const e=navigator.userAgent.toLowerCase();let a="unknown",o=!1;e.includes("metamask")?(a="metamask",o=!0):e.includes("trustwallet")?(a="trustwallet",o=!0):e.includes("coinbase")?(a="coinbase",o=!0):e.includes("rainbow")?(a="rainbow",o=!0):e.includes("phantom")?(a="phantom",o=!0):e.includes("solflare")?(a="solflare",o=!0):e.includes("exodus")&&(a="exodus",o=!0);const n=!!window.ethereum,s=!!window.solana||!!window.phantom?.solana;(n||s)&&!o&&(o=!0,window.ethereum?.isMetaMask?a="metamask":window.ethereum?.isCoinbaseWallet?a="coinbase":window.ethereum?.isRainbow?a="rainbow":window.phantom?a="phantom":window.solflare&&(a="solflare"));const l=n?window.ethereum:s?window.solana||window.phantom?.solana:null;return{isWalletBrowser:o,walletType:a,hasEthereum:n,hasSolana:s,provider:l}}catch{return t}}async function fc(){const t=bt();if(!t.isWalletBrowser)return{success:!1,error:"Not running in a wallet browser"};try{if(t.hasEthereum&&t.provider)try{const e=await t.provider.request({method:"eth_requestAccounts"});if(e&&e.length>0)return{success:!0,address:e[0]}}catch{}if(t.hasSolana&&t.provider)try{const e=await t.provider.connect();if(e.publicKey)return{success:!0,address:e.publicKey.toString()}}catch{}return{success:!1,error:"Failed to connect to wallet provider"}}catch(e){return{success:!1,error:e instanceof Error?e.message:"Unknown connection error"}}}/**
|
|
42
|
+
`;return`data:image/svg+xml;base64,${btoa(o)}`},Ud=(t,e)=>{const a=1/e*100;t.style.position="relative",t.style.paddingTop=`${a}%`;const o=t.querySelector("img");o&&(o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.style.objectFit="cover")},ie={createPureFunction:t=>t,isDevelopment:process.env.NODE_ENV==="development",isProduction:process.env.NODE_ENV==="production",isTest:process.env.NODE_ENV==="test",createFeatureFlags:(t={})=>({enableAnalytics:process.env.VITE_ENABLE_ANALYTICS==="true",enableDebugTools:process.env.NODE_ENV==="development",enablePerformanceMonitoring:process.env.VITE_ENABLE_PERF_MONITORING!=="false",...t})},Pd=t=>{const e={};return Object.entries(t).forEach(([a,o])=>{e[a]=()=>{try{return o()}catch{return Promise.resolve({default:null})}}}),e},st={createDebounce:t=>e=>{let a;return((...o)=>{clearTimeout(a),a=setTimeout(()=>e(...o),t)})},memoize:t=>{const e=new Map;return((...a)=>{const o=JSON.stringify(a);if(e.has(o))return e.get(o);const n=t(...a);return e.set(o,n),n})},isDeepEqual:(t,e)=>{if(t===e)return!0;if(t==null||e==null||typeof t!="object"||typeof e!="object")return!1;const a=Object.keys(t),o=Object.keys(e);if(a.length!==o.length)return!1;for(const n of a)if(!o.includes(n)||!st.isDeepEqual(t[n],e[n]))return!1;return!0},createThrottle:t=>e=>{let a=0;return((...o)=>{const n=Date.now();if(n-a>=t)return a=n,e(...o)})}},zd=t=>{const e={};return Object.entries(t).forEach(([a,o])=>{e[a]={},Object.entries(o).forEach(([n,s])=>{e[a][n]=()=>import(s).then(l=>({[n]:l[n]}))})}),e},de={getModuleSize:t=>new Promise(e=>{if(typeof window<"u"&&"performance"in window){const o=performance.getEntriesByType("resource").find(n=>n.name.includes(t));e(o?.transferSize||0)}else e(0)}),usageTracker:new Set,trackUsage:t=>{ie.isDevelopment&&de.usageTracker.add(t)},getUsageReport:()=>ie.isDevelopment?Array.from(de.usageTracker).sort():[],estimateImpact:t=>{const e=t.map(a=>de.getModuleSize(a).then(o=>[a,o]));return Promise.all(e).then(a=>{const o={};let n=0;return a.forEach(([s,l])=>{o[s]=l,n+=l}),{total:n,modules:o}})}},lt={inlineCriticalCSS:t=>{if(typeof document<"u"){const e=document.createElement("style");e.textContent=t,document.head.appendChild(e)}},loadAsyncCSS:t=>{if(typeof document<"u"){const e=document.createElement("link");e.rel="stylesheet",e.href=t,e.media="print",e.onload=()=>{e.media="all"},document.head.appendChild(e)}},removeUnusedCSS:t=>{if(typeof document>"u")return;const e=new Set;return t.forEach(a=>{try{document.querySelector(a)&&e.add(a)}catch{}}),{used:Array.from(e),unused:t.filter(a=>!e.has(a))}}},Dd=(t={})=>{const{features:e={},criticalCSS:a="",enableUsageTracking:o=ie.isDevelopment}=t;return{features:ie.createFeatureFlags(e),initialize:()=>{a&&typeof document<"u"&<.inlineCriticalCSS(a)},cleanup:()=>{de.usageTracker.clear()},getReport:()=>({usage:de.getUsageReport(),features:ie.createFeatureFlags(e)})}};let tr;function jd(t){throw typeof window<"u"?new Error("Web navigation service not implemented in shared library"):new Error("React Native navigation service not implemented in shared library")}function G(t){return tr||(tr=jd()),tr}function Bd(){const t=G(),e=t.getCurrentState();return{navigate:(a,o)=>{t.navigate(a,o)},goBack:a=>{t.goBack(a)},replace:(a,o)=>{t.replace(a,o)},currentPath:e.currentPath,searchParams:e.searchParams,params:e.params,canGoBack:t.canGoBack(),isSupported:t.isSupported()}}function Od(){const e=G().getCurrentState(),a=Object.keys(e.searchParams).length>0?"?"+new URLSearchParams(e.searchParams).toString():"";return{pathname:e.currentPath,search:a,searchParams:e.searchParams,hash:"",state:{},key:e.currentPath}}function Wd(){const t=G(),e=t.getCurrentState();return[new URLSearchParams(e.searchParams),n=>{const s=n instanceof URLSearchParams?Object.fromEntries(n.entries()):n,l=new URLSearchParams(s).toString(),g=e.currentPath+(l?`?${l}`:"");t.replace(g)}]}const ae={navigate:(t,e)=>{G().navigate(t,e)},goBack:t=>{G().goBack(t)},replace:(t,e)=>{G().replace(t,e)},getCurrentPath:()=>G().getCurrentPath(),getSearchParams:()=>G().getSearchParams(),goToMail:()=>{ae.navigate("/mail")},goToPreferences:()=>{ae.navigate("/preferences")},goToCompose:(t,e)=>{const a=new URLSearchParams;t&&a.set("type",t),e&&Object.entries(e).forEach(([n,s])=>{a.set(n,s)});const o=a.toString();ae.navigate(`/mail/compose${o?`?${o}`:""}`)},goToConnect:()=>{ae.navigate("/connect")},goToDelegate:()=>{ae.navigate("/admin/delegate")},goToHome:()=>{ae.navigate("/")},canGoBack:()=>G().canGoBack()};function Fd(t,e=3,a=1e3){return p.lazy(()=>new Promise((o,n)=>{const s=l=>{t().then(o).catch(g=>{l>0?setTimeout(()=>{s(l-1)},a):n(g)})};s(e)}))}function Vd(t){let e=null;const a=()=>(e||(e=t()),e.then(()=>{}));return{Component:p.lazy(()=>e||t()),preload:a}}function Hd(t,e={}){const{fallback:a=r.jsx("div",{children:"Loading..."}),errorFallback:o=r.jsx("div",{children:"Failed to load component"}),loadingDelay:n=200,minimumLoadingTime:s=500}=e,l=p.lazy(async()=>{const i=Date.now();try{const c=await t(),h=Date.now()-i;return h<s&&await new Promise(b=>setTimeout(b,s-h)),c}catch{return{default:(()=>o)}}}),g=()=>{const[i,c]=p.useState(!1);return p.useEffect(()=>{const h=setTimeout(()=>{c(!0)},n);return()=>clearTimeout(h)},[]),i?r.jsx(r.Fragment,{children:a}):null};return p.forwardRef((i,c)=>r.jsx(p.Suspense,{fallback:r.jsx(g,{}),children:r.jsx(l,{...i,ref:c})}))}function it(t,e={}){const[a,o]=p.useState(!1),[n,s]=p.useState(!1);return p.useEffect(()=>{const l=t.current;if(!l||n)return;const g=new IntersectionObserver(([i])=>{i.isIntersecting&&(o(!0),s(!0),g.disconnect())},{rootMargin:"50px",threshold:.01,...e});return g.observe(l),()=>{g.disconnect()}},[t,e,n]),a}const qd=({children:t,fallback:e=r.jsx("div",{children:"Loading..."}),threshold:a=.01,rootMargin:o="50px",placeholder:n})=>{const s=p.useRef(null),l=it(s,{threshold:a,rootMargin:o});return r.jsx("div",{ref:s,children:l?t:n||e})};function _d(t){const{importFn:e,preloadOnHover:a=!0,preloadOnFocus:o=!0,prefetchDelay:n=50}=t;let s=null,l=null;const g=()=>(l||(l=e()),l),i=()=>{s&&clearTimeout(s),s=setTimeout(()=>{g()},n)};return{Component:p.lazy(()=>l||e()),preload:g,linkProps:{...a&&{onMouseEnter:i,onMouseLeave:()=>{s&&clearTimeout(s)}},...o&&{onFocus:i}}}}function Gd(t,e=[]){const[a,o]=p.useState(null),[n,s]=p.useState(!0),[l,g]=p.useState(null);return p.useEffect(()=>{let i=!0;return s(!0),g(null),t().then(c=>{i&&(o(c),s(!1))}).catch(c=>{i&&(g(c),s(!1))}),()=>{i=!1}},[t,...e]),{module:a,loading:n,error:l}}class dt{constructor(e=3,a=100){this.queue=new Set,this.isProcessing=!1,this.batchSize=e,this.delay=a}add(e){this.queue.add(e),this.process()}async process(){if(this.isProcessing||this.queue.size===0)return;this.isProcessing=!0;const e=Array.from(this.queue).slice(0,this.batchSize);e.forEach(a=>this.queue.delete(a)),await Promise.all(e.map(a=>a().catch(()=>{}))),this.queue.size>0&&await new Promise(a=>setTimeout(a,this.delay)),this.isProcessing=!1,this.queue.size>0&&this.process()}}function Kd(t,e,a){if(typeof document>"u")return;const o=document.createElement("link");o.rel=e,o.href=t,a&&(e==="preload"||e==="prefetch")&&(o.as=a),document.head.appendChild(o)}var ar=(t=>(t[t.HIGH=0]="HIGH",t[t.MEDIUM=1]="MEDIUM",t[t.LOW=2]="LOW",t[t.IDLE=3]="IDLE",t))(ar||{});class ct{constructor(){this.queues=new Map,this.isProcessing=!1,Object.values(ar).filter(e=>typeof e=="number").forEach(e=>{this.queues.set(e,[])})}load(e,a=1){const o=this.queues.get(a);o&&o.push(e),this.process()}async process(){if(!this.isProcessing){this.isProcessing=!0;for(const[e,a]of this.queues)for(;a.length>0;){const o=a.shift();if(o)try{await o()}catch{}e>=2&&await new Promise(n=>setTimeout(n,50))}this.isProcessing=!1}}}const Yd=new dt,Qd=new ct;class or{constructor(e={}){this.prefix=e.prefix||"mailbox",this.defaultTTL=e.ttl,this.platformStorage=e.platformStorage||this.createFallbackStorage()}createFallbackStorage(){const e=new Map;return{getItem:a=>e.get(a)||null,setItem:(a,o)=>{e.set(a,o)},removeItem:a=>{e.delete(a)},clear:()=>{e.clear()},getAllKeys:()=>Array.from(e.keys())}}getKey(e){return`${this.prefix}-${e}`}isExpired(e){return e.ttl?Date.now()-e.timestamp>e.ttl:!1}set(e,a,o){try{const n={value:a,timestamp:Date.now(),ttl:o||this.defaultTTL};this.platformStorage.setItem(this.getKey(e),JSON.stringify(n))}catch{}}get(e,a){try{const o=this.platformStorage.getItem(this.getKey(e));if(!o)return a;const n=JSON.parse(o);return this.isExpired(n)?(this.remove(e),a):n.value}catch{return a}}remove(e){try{this.platformStorage.removeItem(this.getKey(e))}catch{}}clear(e){try{if(this.platformStorage.getAllKeys){const a=this.platformStorage.getAllKeys(),o=this.getKey(e||""),n=a.filter(s=>s.startsWith(o));for(const s of n)this.platformStorage.removeItem(s)}else this.platformStorage.clear?.()}catch(a){console.error("Failed to clear storage:",a)}}has(e){try{return this.platformStorage.getItem(this.getKey(e))!==null}catch(a){return console.error(`Failed to check item ${e}:`,a),!1}}getAllKeys(){try{if(this.platformStorage.getAllKeys){const e=this.platformStorage.getAllKeys(),a=`${this.prefix}-`;return e.filter(o=>o.startsWith(a)).map(o=>o.substring(a.length))}return[]}catch(e){return console.error("Failed to get all keys:",e),[]}}}const Zd=new or,Xd=new or({prefix:"mailbox-theme"}),Jd=new or({prefix:"walletUser",ttl:10080*60*1e3}),Rd=t=>{if(!t)throw new Error("PlatformStorage must be provided to createSimpleStorage");return{setItem:(e,a)=>{try{t.setItem(e,a)}catch{}},getItem:e=>{try{return t.getItem(e)}catch{return null}},removeItem:e=>{try{t.removeItem(e)}catch{}}}};function gt(){const t={isWalletBrowser:!1,walletType:"unknown",hasEthereum:!1,hasSolana:!1,provider:null};if(typeof window>"u")return t;try{const e=navigator.userAgent.toLowerCase();let a="unknown",o=!1;e.includes("metamask")?(a="metamask",o=!0):e.includes("trustwallet")?(a="trustwallet",o=!0):e.includes("coinbase")?(a="coinbase",o=!0):e.includes("rainbow")?(a="rainbow",o=!0):e.includes("phantom")?(a="phantom",o=!0):e.includes("solflare")?(a="solflare",o=!0):e.includes("exodus")&&(a="exodus",o=!0);const n=!!window.ethereum,s=!!window.solana||!!window.phantom?.solana;(n||s)&&!o&&(o=!0,window.ethereum?.isMetaMask?a="metamask":window.ethereum?.isCoinbaseWallet?a="coinbase":window.ethereum?.isRainbow?a="rainbow":window.phantom?a="phantom":window.solflare&&(a="solflare"));const l=n?window.ethereum:s?window.solana||window.phantom?.solana:null;return{isWalletBrowser:o,walletType:a,hasEthereum:n,hasSolana:s,provider:l}}catch{return t}}async function ec(){const t=gt();if(!t.isWalletBrowser)return{success:!1,error:"Not running in a wallet browser"};try{if(t.hasEthereum&&t.provider)try{const e=await t.provider.request({method:"eth_requestAccounts"});if(e&&e.length>0)return{success:!0,address:e[0]}}catch{}if(t.hasSolana&&t.provider)try{const e=await t.provider.connect();if(e.publicKey)return{success:!0,address:e.publicKey.toString()}}catch{}return{success:!1,error:"Failed to connect to wallet provider"}}catch(e){return{success:!1,error:e instanceof Error?e.message:"Unknown connection error"}}}/**
|
|
48
43
|
* @sudobility/components v3.0.0
|
|
49
44
|
*
|
|
50
45
|
* A comprehensive React component library and design system.
|
|
@@ -52,4 +47,4 @@
|
|
|
52
47
|
*
|
|
53
48
|
* @author John Qiu Huang
|
|
54
49
|
* @license MIT
|
|
55
|
-
*/const pc={utils:{cn:u}};Object.defineProperty(d,"ArrowLeftIcon",{enumerable:!0,get:()=>U.ArrowLeftIcon}),Object.defineProperty(d,"ArrowRightIcon",{enumerable:!0,get:()=>U.ArrowRightIcon}),Object.defineProperty(d,"Bars3Icon",{enumerable:!0,get:()=>U.Bars3Icon}),Object.defineProperty(d,"BellIcon",{enumerable:!0,get:()=>U.BellIcon}),Object.defineProperty(d,"BellSlashIcon",{enumerable:!0,get:()=>U.BellSlashIcon}),Object.defineProperty(d,"ChartBarIcon",{enumerable:!0,get:()=>U.ChartBarIcon}),Object.defineProperty(d,"CheckCircleIcon",{enumerable:!0,get:()=>U.CheckCircleIcon}),Object.defineProperty(d,"CheckIcon",{enumerable:!0,get:()=>U.CheckIcon}),Object.defineProperty(d,"ChevronDownIcon",{enumerable:!0,get:()=>U.ChevronDownIcon}),Object.defineProperty(d,"ChevronLeftIcon",{enumerable:!0,get:()=>U.ChevronLeftIcon}),Object.defineProperty(d,"ChevronRightIcon",{enumerable:!0,get:()=>U.ChevronRightIcon}),Object.defineProperty(d,"ChevronUpIcon",{enumerable:!0,get:()=>U.ChevronUpIcon}),Object.defineProperty(d,"ClockIcon",{enumerable:!0,get:()=>U.ClockIcon}),Object.defineProperty(d,"CodeBracketIcon",{enumerable:!0,get:()=>U.CodeBracketIcon}),Object.defineProperty(d,"Cog6ToothIcon",{enumerable:!0,get:()=>U.Cog6ToothIcon}),Object.defineProperty(d,"CreditCardIcon",{enumerable:!0,get:()=>U.CreditCardIcon}),Object.defineProperty(d,"DocumentTextIcon",{enumerable:!0,get:()=>U.DocumentTextIcon}),Object.defineProperty(d,"EnvelopeIcon",{enumerable:!0,get:()=>U.EnvelopeIcon}),Object.defineProperty(d,"ExclamationTriangleIcon",{enumerable:!0,get:()=>U.ExclamationTriangleIcon}),Object.defineProperty(d,"EyeSlashIcon",{enumerable:!0,get:()=>U.EyeSlashIcon}),Object.defineProperty(d,"GlobeAltIcon",{enumerable:!0,get:()=>U.GlobeAltIcon}),Object.defineProperty(d,"HomeIcon",{enumerable:!0,get:()=>U.HomeIcon}),Object.defineProperty(d,"InboxIcon",{enumerable:!0,get:()=>U.InboxIcon}),Object.defineProperty(d,"InformationCircleIcon",{enumerable:!0,get:()=>U.InformationCircleIcon}),Object.defineProperty(d,"KeyIcon",{enumerable:!0,get:()=>U.KeyIcon}),Object.defineProperty(d,"MegaphoneIcon",{enumerable:!0,get:()=>U.MegaphoneIcon}),Object.defineProperty(d,"MinusIcon",{enumerable:!0,get:()=>U.MinusIcon}),Object.defineProperty(d,"PaperAirplaneIcon",{enumerable:!0,get:()=>U.PaperAirplaneIcon}),Object.defineProperty(d,"PaperClipIcon",{enumerable:!0,get:()=>U.PaperClipIcon}),Object.defineProperty(d,"PlusIcon",{enumerable:!0,get:()=>U.PlusIcon}),Object.defineProperty(d,"RocketLaunchIcon",{enumerable:!0,get:()=>U.RocketLaunchIcon}),Object.defineProperty(d,"ShieldCheckIcon",{enumerable:!0,get:()=>U.ShieldCheckIcon}),Object.defineProperty(d,"SparklesIcon",{enumerable:!0,get:()=>U.SparklesIcon}),Object.defineProperty(d,"StarIcon",{enumerable:!0,get:()=>U.StarIcon}),Object.defineProperty(d,"TrashIcon",{enumerable:!0,get:()=>U.TrashIcon}),Object.defineProperty(d,"UserGroupIcon",{enumerable:!0,get:()=>U.UserGroupIcon}),Object.defineProperty(d,"XMarkIcon",{enumerable:!0,get:()=>U.XMarkIcon}),Object.defineProperty(d,"CheckCircleIconSolid",{enumerable:!0,get:()=>R.CheckCircleIcon}),Object.defineProperty(d,"CheckIconSolid",{enumerable:!0,get:()=>R.CheckIcon}),Object.defineProperty(d,"ExclamationTriangleIconSolid",{enumerable:!0,get:()=>R.ExclamationTriangleIcon}),Object.defineProperty(d,"StarIconSolid",{enumerable:!0,get:()=>R.StarIcon}),d.AIMeta=zl,d.AITrainingEnhancer=jl,d.AI_TRAINING_CONFIGS=Ql,d.ActionButton=ko,d.Alert=Ae,d.AlertBanner=ka,d.AlertDescription=xa,d.AlertTitle=va,d.AreaChart=es,d.AspectRatio=Dt,d.AudioPlayer=Ls,d.Avatar=_n,d.Badge=Ia,d.BarChart=Xn,d.BatchRender=Ml,d.Blockquote=ia,d.BodyText=ta,d.BorderAccent=Vt,d.Box=br,d.Breadcrumb=Dr,d.BreadcrumbNav=Jo,d.BreadcrumbSection=cl,d.BurndownChart=ds,d.Calendar=Lr,d.CalloutBox=Hn,d.CancellableRequest=ni,d.Card=_e,d.CardContent=On,d.CardFooter=Fn,d.CardHeader=Wn,d.Center=$t,d.ChainBadge=Ta,d.Checkbox=Ka,d.Code=na,d.CodeBlock=gl,d.CodeDisplay=sa,d.CollapsibleDocumentationTopic=hl,d.CollapsibleEmailField=ze,d.ColorPicker=Io,d.ColorPickerAdvanced=Mo,d.ColorSwatch=$o,d.Combobox=Ra,d.ComponentPreloader=rr,d.ConditionalRender=El,d.ConfirmationDialog=Fs,d.Container=Et,d.CreditCardInput=Do,d.CurrencyInput=jo,d.DashboardStatCard=qn,d.DataTable=gn,d.DateInput=Ba,d.DateRangePicker=Eo,d.DateTimePicker=So,d.Dialog=js,d.Divider=Ot,d.DragDrop=Ys,d.Drawer=Hs,d.Dropdown=eo,d.EmailInputField=Pe,d.EmailInputGroup=Ga,d.EmptyState=zr,d.ErrorBoundary=ml,d.ErrorBoundaryLazy=vl,d.ExpensiveComponent=Nl,d.ExternalLink=Xo,d.FileIcon=no,d.FileInput=oo,d.Flex=vt,d.FlexContainer=St,d.FloatingPanel=Ht,d.FocusTrap=nl,d.FormAlerts=yo,d.FormField=ho,d.FormFieldGroup=Ne,d.FormattedNumber=ua,d.Gauge=us,d.Grid=Lt,d.HStack=Mt,d.Heading=Zt,d.HelperText=da,d.HoverCard=Gs,d.Image=ys,d.ImageCropper=xs,d.ImageGallery=ms,d.InfiniteScroll=il,d.InfoCard=Vn,d.Input=Ce,d.Kbd=la,d.KeyValuePair=Yn,d.Label=We,d.LanguageSelector=pl,d.LazyComponent=Ll,d.LazyImage=xi,d.LazyLoadQueue=ut,d.LazyWalletButton=Ki,d.LazyWrapper=nc,d.Lightbox=ks,d.LineChart=Jn,d.Link=Zo,d.List=mn,d.ListItem=vn,d.ListItemWithAction=Un,d.LiveStream=Es,d.LoadPriority=sr,d.LoadingDots=fa,d.LoadingOptimizer=Xl,d.LoadingOverlay=ba,d.LoadingState=pa,d.Masonry=Yt,d.MasterDetailLayout=Pl,d.MasterListItem=Al,d.MediaUploader=Ts,d.MentionInput=go,d.Modal=Ge,d.ModalContent=Ke,d.ModalFooter=Ye,d.ModalHeader=Ds,d.MultiSelect=Ja,d.NavigationList=rn,d.NavigationMenu=en,d.NoContent=Zn,d.NotificationBadge=Ea,d.NotificationPanel=La,d.NumberInput=Da,d.OptimizedAPIClient=ai,d.OptimizedImage=$l,d.OptimizedRoutePreloader=Jl,d.OtpInput=Ha,d.Overlay=ke,d.PageContainer=zt,d.PageHeader=Tl,d.PageTitle=Jt,d.Pagination=an,d.PaginationNav=on,d.PasswordInput=Oa,d.PerformanceBoundary=Il,d.PerformanceOptimizer=Zl,d.PhoneDirectory=mo,d.PhoneInput=Va,d.PieChart=Rn,d.PlatformSpecificComponents=Ui,d.PlaylistManager=Ps,d.PodcastPlayer=Us,d.Popover=_s,d.Portal=ee,d.PriorityLoader=ht,d.Progress=bs,d.ProgressBar=hs,d.ProgressCircle=fs,d.PromotionalBanner=bl,d.PullToRefresh=ll,d.QRCodeDisplay=zs,d.QuizBuilder=Go,d.RadioGroup=Ya,d.RelativeTime=ha,d.Resizable=_t,d.RouteBasedLazyLoader=er,d.SafeAppWrapper=xl,d.ScrollArea=Kt,d.ScrollSpy=sl,d.SearchInput=ja,d.Section=At,d.SectionTitle=ea,d.SecurityProvider=kl,d.Select=Qa,d.SelectContent=kr,d.SelectField=po,d.SelectGroup=Za,d.SelectItem=Cr,d.SelectLabel=wr,d.SelectScrollDownButton=je,d.SelectScrollUpButton=De,d.SelectSeparator=Nr,d.SelectTrigger=xr,d.SelectValue=Xa,d.SemanticHTML=Dl,d.Separator=Ft,d.Sheet=qs,d.SideNav=tn,d.SignaturePad=Uo,d.SignatureRequest=To,d.SkeletonLoader=ya,d.Slider=to,d.SliderInput=ao,d.SmartContent=Qo,d.SmartLink=Oe,d.SmartWalletProviders=_i,d.Spacer=Ut,d.Sparkline=ss,d.Spinner=we,d.SplitPane=qt,d.Stack=Te,d.StandardPageLayout=Ul,d.StatDisplay=Qn,d.StatusBadge=Ua,d.StatusIndicator=Pa,d.StepList=yl,d.Stepper=nn,d.StepperNav=sn,d.SubscriptionGatedComponents=$i,d.Switch=vr,d.Table=cn,d.TableOfContents=dn,d.Tabs=Ro,d.TabsContent=Ur,d.TabsList=Mr,d.TabsTrigger=$r,d.TagInput=co,d.Text=Qt,d.TextArea=za,d.TextAreaField=fo,d.TextField=bo,d.TextInputModal=Vs,d.TextLink=oa,d.TimePicker=yr,d.Toast=pr,d.ToastNotification=Sa,d.ToastProvider=Na,d.ToggleGroup=ro,d.Tooltip=Ks,d.TrackedButton=fl,d.TransferList=An,d.TreeView=zn,d.TruncatedText=ga,d.UaudioUwaveform=Is,d.UavatarUgroup=Gn,d.UbubbleUchart=ts,d.UcellUeditor=pn,d.UcodeUhighlighter=zo,d.UcolumnUresize=fn,d.UcurrencyUconverter=Bo,d.UcurrencyUrates=Wo,d.UdataUgrid=un,d.UdoubleUtap=rl,d.UdragUdropUlist=Qs,d.UfieldUmapper=qo,d.UfileUbrowser=so,d.UfileUpreview=lo,d.UfileUtree=io,d.UformUbuilder=Oo,d.UformUtemplate=Vo,d.UformUvalidator=Fo,d.UfunnelUchart=is,d.UgestureUdetector=Js,d.Uheatmap=ls,d.UhoverUtooltip=al,d.UimageUcomparison=vs,d.UinlineUedit=wo,d.UlistingUform=Dn,d.UlongUpress=tl,d.UmarkdownUrenderer=Po,d.UmediaUplaylist=As,d.UmetricUcomparison=gs,d.UnestedUdrag=Xs,d.UpasswordUstrength=No,d.UperformanceUchart=cs,d.UpinchUzoom=el,d.UpivotUtable=hn,d.UprivacyUtoggle=Co,d.UprofileUheader=Kn,d.UprogressUtracker=ps,d.UradarUchart=rs,d.UradialUmenu=ol,d.UresizableUpanels=Gt,d.UsankeyUdiagram=ns,d.UscatterUplot=as,d.UschemaUvalidator=Ho,d.UscreenUreaderUtext=ca,d.UsortableUgrid=Zs,d.UspreadsheetUgrid=bn,d.UsurveyUbuilder=_o,d.UswipeUactions=Rs,d.UtableUreservation=yn,d.UtimeUslotUpicker=Lo,d.UtreeUmap=os,d.UtwoUfactorUinput=qa,d.UuserUtable=Tn,d.UvideoUcall=Ss,d.UvideoUthumbnail=Cs,d.UvoiceUrecorder=$s,d.VStack=It,d.VideoEditor=Ns,d.VideoPlayer=ws,d.VirtualList=Pn,d.VirtualListItem=Sl,d.WEB3_CONCEPTS=ql,d.WEB3_EMAIL_HEADINGS=Hl,d.WEB3_HEADING_PATTERNS=_,d.WalletPreloader=ye,d.WaveForm=Ms,d.WysiwygEditor=Ao,d.addResourceHint=ic,d.aiOptimizationPresets=Hi,d.appStorage=gc,d.autoConnectWalletBrowser=fc,d.batchDOMUpdates=Md,d.bundleAnalysis=de,d.cacheHeaders=hi,d.cacheUtils=si,d.checkPerformanceBudget=hd,d.clearComponentCache=ki,d.clearConditionalCache=Ai,d.clearRenderCounts=ed,d.cn=u,d.conditionalCSS=ci,d.convertFileSize=md,d.createAIMetaTags=Fr,d.createAIOptimizedSchema=Xe,d.createAdvancedLazyComponent=yi,d.createCSSVariables=Cd,d.createConditionalImports=Qd,d.createConditionalLazyComponent=Mi,d.createEnhancedFAQSchema=Bl,d.createEnhancedOpenGraph=Wr,d.createEnhancedTwitterCard=Or,d.createLazyComponent=Zr,d.createLazyComponentFactory=rd,d.createLazyRoute=sc,d.createLazyWalletProvider=or,d.createLibraryImports=Li,d.createMemoComponent=wl,d.createOptimizedStyles=xd,d.createProgressiveComponent=oc,d.createSelectiveExports=Zd,d.createSelectiveMemoComponent=Cl,d.createSemanticHeading=Fl,d.createSimpleStorage=bc,d.createTechnicalArticleSchema=Ze,d.createTreeShakingConfig=Xd,d.createUIComponents=Ei,d.createWeb3ProductSchema=Qe,d.criticalPathOptimizer=Yi,d.cspDirectives=gi,d.cssOptimization=ct,d.deadCodeElimination=ie,d.default=pc,d.defaultPerformanceBudget=nt,d.detectAvailableWallets=ar,d.detectWalletBrowser=bt,d.exportPerformanceData=bd,d.formatFileSize=yd,d.generateAIMetaTags=Bi,d.generateAIMetadata=_l,d.generateAIStructuredData=Oi,d.generateAdvancedSEO=Wl,d.generateCSP=Yr,d.generateCSPDirectives=Je,d.generateConceptGraph=Gl,d.generateContentRelationships=Wi,d.generateEntityRecognition=rt,d.generateImageSEO=jd,d.generatePerformanceTrackingSchema=Vi,d.generatePictureElement=Hd,d.generatePlaceholder=Kd,d.generateQAPairs=Yl,d.generateSemanticMarkup=et,d.generateSizes=Wd,d.generateSocialImageMeta=Od,d.generateSrcSet=Bd,d.generateTopicClustering=tt,d.generateTrainingExamples=Kl,d.getConditionalStats=Pi,d.getEnvironmentType=Gr,d.getLazyLoadingStats=wi,d.getOptimalImageFormat=Vd,d.getPerformanceMonitor=$e,d.getPreloadingStats=ji,d.getRenderCounts=Ri,d.getSecurityHeaders=Qr,d.getUINavigationService=G,d.getWebVitals=nd,d.initializeAdvancedPreloading=Di,d.initializePerformanceMonitoring=cd,d.initializePreloading=Ii,d.inlineCriticalStyles=Ud,d.isLocalhost=qr,d.isNetworkAccess=_r,d.isWalletBrowser=Hr,d.isWebEnvironment=Kr,d.lazyLoadQueue=dc,d.lazyWithPreload=ac,d.lazyWithRetry=tc,d.loadCSS=ii,d.loadCriticalCSS=kd,d.loadNonCriticalCSS=wd,d.measureAsyncOperation=ud,d.measureImagePerformance=Gd,d.navigationHelper=ae,d.optimizeClassNames=$d,d.optimizeContainment=Ld,d.optimizeFlex=Pd,d.optimizeGrid=Ad,d.optimizeWillChange=Id,d.optimizedFetch=Vr,d.pageSEOConfigs=Ol,d.parseFileSize=vd,d.performanceBudget=Z,d.performanceUtils=Le,d.prefersReducedMotion=st,d.prefetchResource=sd,d.preloadComponent=Si,d.preloadImage=qd,d.preloadResource=ld,d.preloadRoute=ad,d.preserveAspectRatio=Yd,d.priorityLoader=cc,d.reportWebVitals=od,d.routeConfig=Xr,d.securityHeaders=ui,d.setupCSPReporting=bi,d.setupLazyLoading=Fd,d.setupProgressiveLoading=_d,d.shouldEnableWallet=li,d.smartLinkVariants=Se,d.supportsAVIF=it,d.supportsCSSImports=di,d.supportsWebP=lt,d.themeStorage=uc,d.useClickOutside=Sr,d.useCodeLoader=jr,d.useComponentPerformance=ot,d.useCopyToClipboard=Mn,d.useDebugMemo=Xi,d.useDynamicImport=lc,d.useFormSubmission=fd,d.useImageLazyLoading=td,d.useLazyLoad=gt,d.useLazyStyles=Td,d.useLocation=ec,d.useMediaQuery=zd,d.useMemoryLeakDetection=id,d.useMultipleCopyToClipboard=$n,d.useNavigation=Rd,d.useOptimizedTheme=Dd,d.useOptimizedWallets=Gi,d.usePerformanceMark=Qi,d.useReducedMotion=Ed,d.useRenderCount=Ji,d.useResponsiveStyles=Sd,d.useSearchParams=rc,d.useSmartLinks=Ko,d.useStableCallback=Zi,d.useToast=wa,d.useToggle=pd,d.utils=dt,d.validateHeadingStructure=Vl,d.walletStorage=hc,d.web3SecurityNotes=fi,d.withPerformanceTracking=gd,d.withRetry=oi,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
50
|
+
*/const rc={utils:{cn:u}};Object.defineProperty(d,"ArrowLeftIcon",{enumerable:!0,get:()=>T.ArrowLeftIcon}),Object.defineProperty(d,"ArrowRightIcon",{enumerable:!0,get:()=>T.ArrowRightIcon}),Object.defineProperty(d,"Bars3Icon",{enumerable:!0,get:()=>T.Bars3Icon}),Object.defineProperty(d,"BellIcon",{enumerable:!0,get:()=>T.BellIcon}),Object.defineProperty(d,"BellSlashIcon",{enumerable:!0,get:()=>T.BellSlashIcon}),Object.defineProperty(d,"ChartBarIcon",{enumerable:!0,get:()=>T.ChartBarIcon}),Object.defineProperty(d,"CheckCircleIcon",{enumerable:!0,get:()=>T.CheckCircleIcon}),Object.defineProperty(d,"CheckIcon",{enumerable:!0,get:()=>T.CheckIcon}),Object.defineProperty(d,"ChevronDownIcon",{enumerable:!0,get:()=>T.ChevronDownIcon}),Object.defineProperty(d,"ChevronLeftIcon",{enumerable:!0,get:()=>T.ChevronLeftIcon}),Object.defineProperty(d,"ChevronRightIcon",{enumerable:!0,get:()=>T.ChevronRightIcon}),Object.defineProperty(d,"ChevronUpIcon",{enumerable:!0,get:()=>T.ChevronUpIcon}),Object.defineProperty(d,"ClockIcon",{enumerable:!0,get:()=>T.ClockIcon}),Object.defineProperty(d,"CodeBracketIcon",{enumerable:!0,get:()=>T.CodeBracketIcon}),Object.defineProperty(d,"Cog6ToothIcon",{enumerable:!0,get:()=>T.Cog6ToothIcon}),Object.defineProperty(d,"CreditCardIcon",{enumerable:!0,get:()=>T.CreditCardIcon}),Object.defineProperty(d,"DocumentTextIcon",{enumerable:!0,get:()=>T.DocumentTextIcon}),Object.defineProperty(d,"EnvelopeIcon",{enumerable:!0,get:()=>T.EnvelopeIcon}),Object.defineProperty(d,"ExclamationTriangleIcon",{enumerable:!0,get:()=>T.ExclamationTriangleIcon}),Object.defineProperty(d,"EyeSlashIcon",{enumerable:!0,get:()=>T.EyeSlashIcon}),Object.defineProperty(d,"GlobeAltIcon",{enumerable:!0,get:()=>T.GlobeAltIcon}),Object.defineProperty(d,"HomeIcon",{enumerable:!0,get:()=>T.HomeIcon}),Object.defineProperty(d,"InboxIcon",{enumerable:!0,get:()=>T.InboxIcon}),Object.defineProperty(d,"InformationCircleIcon",{enumerable:!0,get:()=>T.InformationCircleIcon}),Object.defineProperty(d,"KeyIcon",{enumerable:!0,get:()=>T.KeyIcon}),Object.defineProperty(d,"MegaphoneIcon",{enumerable:!0,get:()=>T.MegaphoneIcon}),Object.defineProperty(d,"MinusIcon",{enumerable:!0,get:()=>T.MinusIcon}),Object.defineProperty(d,"PaperAirplaneIcon",{enumerable:!0,get:()=>T.PaperAirplaneIcon}),Object.defineProperty(d,"PaperClipIcon",{enumerable:!0,get:()=>T.PaperClipIcon}),Object.defineProperty(d,"PlusIcon",{enumerable:!0,get:()=>T.PlusIcon}),Object.defineProperty(d,"RocketLaunchIcon",{enumerable:!0,get:()=>T.RocketLaunchIcon}),Object.defineProperty(d,"ShieldCheckIcon",{enumerable:!0,get:()=>T.ShieldCheckIcon}),Object.defineProperty(d,"SparklesIcon",{enumerable:!0,get:()=>T.SparklesIcon}),Object.defineProperty(d,"StarIcon",{enumerable:!0,get:()=>T.StarIcon}),Object.defineProperty(d,"TrashIcon",{enumerable:!0,get:()=>T.TrashIcon}),Object.defineProperty(d,"UserGroupIcon",{enumerable:!0,get:()=>T.UserGroupIcon}),Object.defineProperty(d,"XMarkIcon",{enumerable:!0,get:()=>T.XMarkIcon}),Object.defineProperty(d,"CheckCircleIconSolid",{enumerable:!0,get:()=>R.CheckCircleIcon}),Object.defineProperty(d,"CheckIconSolid",{enumerable:!0,get:()=>R.CheckIcon}),Object.defineProperty(d,"ExclamationTriangleIconSolid",{enumerable:!0,get:()=>R.ExclamationTriangleIcon}),Object.defineProperty(d,"StarIconSolid",{enumerable:!0,get:()=>R.StarIcon}),d.AIMeta=ml,d.AITrainingEnhancer=xl,d.AI_TRAINING_CONFIGS=Al,d.ActionButton=io,d.Alert=Ae,d.AlertBanner=ma,d.AlertDescription=pa,d.AlertTitle=ya,d.AreaChart=jn,d.AspectRatio=Ut,d.AudioPlayer=cs,d.Avatar=In,d.Badge=Sa,d.BarChart=Pn,d.BatchRender=ul,d.Blockquote=na,d.BodyText=Rt,d.BorderAccent=Ot,d.Box=ur,d.Breadcrumb=Ur,d.BreadcrumbNav=jo,d.BreadcrumbSection=Ks,d.BurndownChart=Gn,d.Calendar=Nr,d.CalloutBox=En,d.CancellableRequest=Vl,d.Card=Ve,d.CardContent=Cn,d.CardFooter=Nn,d.CardHeader=wn,d.Center=Lt,d.ChainBadge=Ma,d.Checkbox=Oa,d.Code=ta,d.CodeBlock=Ys,d.CodeDisplay=aa,d.CollapsibleDocumentationTopic=Zs,d.ColorPicker=ho,d.ColorPickerAdvanced=bo,d.ColorSwatch=fo,d.Combobox=_a,d.ComponentPreloader=Je,d.ConditionalRender=dl,d.ConfirmationDialog=Ns,d.Container=Ct,d.CreditCardInput=ko,d.CurrencyInput=wo,d.DashboardStatCard=Ln,d.DataTable=Qo,d.DateInput=za,d.DateRangePicker=go,d.DateTimePicker=co,d.Dialog=xs,d.Divider=jt,d.DragDrop=Ts,d.Drawer=Es,d.Dropdown=Ga,d.EmptyState=Ar,d.ErrorBoundary=rl,d.ErrorBoundaryLazy=tl,d.ExpensiveComponent=ll,d.ExternalLink=Do,d.FileInput=Za,d.Flex=yt,d.FlexContainer=wt,d.FloatingPanel=Wt,d.FocusTrap=Vs,d.FormAlerts=oo,d.FormField=eo,d.FormFieldGroup=Ce,d.FormattedNumber=da,d.Gauge=Qn,d.Grid=Nt,d.HStack=Et,d.Heading=Kt,d.HelperText=sa,d.HoverCard=Ms,d.Image=es,d.ImageCropper=as,d.ImageGallery=rs,d.InfiniteScroll=_s,d.InfoCard=Sn,d.Input=we,d.Kbd=oa,d.KeyValuePair=Tn,d.Label=De,d.LanguageSelector=Rs,d.LazyComponent=cl,d.LazyImage=ai,d.LazyLoadQueue=dt,d.LazyWalletButton=$i,d.LazyWrapper=qd,d.Lightbox=os,d.LineChart=zn,d.Link=zo,d.List=tn,d.ListItem=an,d.ListItemWithAction=bn,d.LiveStream=ds,d.LoadPriority=ar,d.LoadingDots=ua,d.LoadingOptimizer=Pl,d.LoadingOverlay=ga,d.LoadingState=ha,d.Masonry=_t,d.MasterDetailLayout=pl,d.MasterListItem=yl,d.MediaUploader=fs,d.MentionInput=Ja,d.Modal=He,d.ModalContent=qe,d.ModalFooter=_e,d.ModalHeader=vs,d.MultiSelect=qa,d.NavigationList=Wo,d.NavigationMenu=Oo,d.NoContent=Un,d.NotificationBadge=Ca,d.NotificationPanel=Na,d.NumberInput=Ua,d.OptimizedAPIClient=Wl,d.OptimizedImage=hl,d.OptimizedRoutePreloader=zl,d.Overlay=xe,d.PageContainer=At,d.PageHeader=fl,d.PageTitle=Qt,d.Pagination=Vo,d.PaginationNav=Ho,d.PerformanceBoundary=gl,d.PerformanceOptimizer=Ul,d.PhoneDirectory=no,d.PhoneInput=Ba,d.PieChart=Dn,d.PlatformSpecificComponents=bi,d.PlaylistManager=ps,d.PodcastPlayer=bs,d.Popover=Is,d.Portal=ee,d.PriorityLoader=ct,d.Progress=Xn,d.ProgressBar=Zn,d.ProgressCircle=Jn,d.PromotionalBanner=Xs,d.PullToRefresh=qs,d.QRCodeDisplay=ms,d.QuizBuilder=To,d.RadioGroup=Wa,d.RelativeTime=ca,d.Resizable=Vt,d.RouteBasedLazyLoader=Xe,d.SafeAppWrapper=al,d.ScrollArea=qt,d.ScrollSpy=Hs,d.SearchInput=Pa,d.Section=$t,d.SectionTitle=Xt,d.SecurityProvider=ol,d.Select=Fa,d.SelectContent=mr,d.SelectField=ao,d.SelectGroup=Va,d.SelectItem=xr,d.SelectLabel=vr,d.SelectScrollDownButton=Pe,d.SelectScrollUpButton=Ue,d.SelectSeparator=kr,d.SelectTrigger=pr,d.SelectValue=Ha,d.SemanticHTML=vl,d.Separator=Bt,d.Sheet=Ls,d.SideNav=Fo,d.SignaturePad=yo,d.SignatureRequest=po,d.SkeletonLoader=ba,d.Slider=Ya,d.SliderInput=Qa,d.SmartContent=Po,d.SmartLink=je,d.SmartWalletProviders=Ii,d.Spacer=It,d.Sparkline=Hn,d.Spinner=ke,d.SplitPane=Ft,d.Stack=Te,d.StandardPageLayout=bl,d.StatDisplay=An,d.StatusBadge=Ia,d.StatusIndicator=Ta,d.StepList=el,d.Stepper=qo,d.StepperNav=_o,d.SubscriptionGatedComponents=hi,d.Switch=yr,d.Table=Yo,d.TableOfContents=Ko,d.Tabs=Bo,d.TabsContent=Ir,d.TabsList=Er,d.TabsTrigger=Lr,d.TagInput=Xa,d.Text=Gt,d.TextArea=Aa,d.TextAreaField=to,d.TextField=ro,d.TextInputModal=Ss,d.TextLink=ra,d.TimePicker=fr,d.Toast=br,d.ToastNotification=wa,d.ToastProvider=ka,d.ToggleGroup=Ka,d.Tooltip=$s,d.TrackedButton=Js,d.TransferList=yn,d.TreeView=mn,d.TruncatedText=ia,d.UaudioUwaveform=gs,d.UavatarUgroup=Mn,d.UbubbleUchart=On,d.UcellUeditor=en,d.UcodeUhighlighter=xo,d.UcolumnUresize=Ro,d.UcurrencyUconverter=Co,d.UcurrencyUrates=No,d.UdataUgrid=Zo,d.UdoubleUtap=Bs,d.UdragUdropUlist=As,d.UfieldUmapper=Mo,d.UformUbuilder=So,d.UformUtemplate=Lo,d.UformUvalidator=Eo,d.UfunnelUchart=_n,d.UgestureUdetector=zs,d.Uheatmap=qn,d.UhoverUtooltip=Ws,d.UimageUcomparison=ts,d.UlistingUform=vn,d.UlongUpress=Os,d.UmarkdownUrenderer=vo,d.UmediaUplaylist=ys,d.UmetricUcomparison=Yn,d.UnestedUdrag=Ps,d.UperformanceUchart=Kn,d.UpinchUzoom=js,d.UpivotUtable=Xo,d.UprofileUheader=$n,d.UprogressUtracker=Rn,d.UradarUchart=Bn,d.UradialUmenu=Fs,d.UresizableUpanels=Ht,d.UsankeyUdiagram=Vn,d.UscatterUplot=Wn,d.UschemaUvalidator=Io,d.UscreenUreaderUtext=la,d.UsortableUgrid=Us,d.UspreadsheetUgrid=Jo,d.UsurveyUbuilder=$o,d.UswipeUactions=Ds,d.UtableUreservation=rn,d.UtimeUslotUpicker=uo,d.UtreeUmap=Fn,d.UuserUtable=fn,d.UvideoUcall=is,d.UvideoUthumbnail=ss,d.UvoiceUrecorder=hs,d.VStack=St,d.VideoEditor=ls,d.VideoPlayer=ns,d.VirtualList=pn,d.VirtualListItem=il,d.WEB3_CONCEPTS=Ll,d.WEB3_EMAIL_HEADINGS=El,d.WEB3_HEADING_PATTERNS=_,d.WalletPreloader=pe,d.WaveForm=us,d.WysiwygEditor=mo,d.addResourceHint=Kd,d.aiOptimizationPresets=Ei,d.appStorage=Zd,d.autoConnectWalletBrowser=ec,d.batchDOMUpdates=bd,d.bundleAnalysis=de,d.cacheHeaders=Zl,d.cacheUtils=Hl,d.checkPerformanceBudget=Zi,d.clearComponentCache=oi,d.clearConditionalCache=yi,d.clearRenderCounts=ji,d.cn=u,d.conditionalCSS=Kl,d.convertFileSize=ad,d.createAIMetaTags=Br,d.createAIOptimizedSchema=Ye,d.createAdvancedLazyComponent=ei,d.createCSSVariables=id,d.createConditionalImports=Pd,d.createConditionalLazyComponent=ui,d.createEnhancedFAQSchema=kl,d.createEnhancedOpenGraph=Dr,d.createEnhancedTwitterCard=jr,d.createLazyComponent=Kr,d.createLazyComponentFactory=Bi,d.createLazyRoute=_d,d.createLazyWalletProvider=rr,d.createLibraryImports=ci,d.createMemoComponent=nl,d.createOptimizedStyles=nd,d.createProgressiveComponent=Hd,d.createSelectiveExports=zd,d.createSelectiveMemoComponent=sl,d.createSemanticHeading=Nl,d.createSimpleStorage=Rd,d.createTechnicalArticleSchema=Ke,d.createTreeShakingConfig=Dd,d.createUIComponents=di,d.createWeb3ProductSchema=Ge,d.criticalPathOptimizer=Ti,d.cspDirectives=Yl,d.cssOptimization=lt,d.deadCodeElimination=ie,d.default=rc,d.defaultPerformanceBudget=tt,d.detectAvailableWallets=er,d.detectWalletBrowser=gt,d.exportPerformanceData=Xi,d.formatFileSize=td,d.generateAIMetaTags=ki,d.generateAIMetadata=Il,d.generateAIStructuredData=Ci,d.generateAdvancedSEO=wl,d.generateCSP=_r,d.generateCSPDirectives=Qe,d.generateConceptGraph=Ml,d.generateContentRelationships=wi,d.generateEntityRecognition=Jr,d.generateImageSEO=wd,d.generatePerformanceTrackingSchema=Si,d.generatePictureElement=Id,d.generatePlaceholder=Ad,d.generateQAPairs=Tl,d.generateSemanticMarkup=Xr,d.generateSizes=Nd,d.generateSocialImageMeta=Sd,d.generateSrcSet=Cd,d.generateTopicClustering=Rr,d.generateTrainingExamples=$l,d.getConditionalStats=pi,d.getEnvironmentType=Hr,d.getLazyLoadingStats=ni,d.getOptimalImageFormat=Ld,d.getPerformanceMonitor=Me,d.getPreloadingStats=xi,d.getRenderCounts=Di,d.getSecurityHeaders=Gr,d.getUINavigationService=G,d.getWebVitals=Vi,d.initializeAdvancedPreloading=vi,d.initializePerformanceMonitoring=Ki,d.initializePreloading=gi,d.inlineCriticalStyles=yd,d.isLocalhost=Fr,d.isNetworkAccess=Vr,d.isWalletBrowser=Wr,d.isWebEnvironment=qr,d.lazyLoadQueue=Yd,d.lazyWithPreload=Vd,d.lazyWithRetry=Fd,d.loadCSS=_l,d.loadCriticalCSS=sd,d.loadNonCriticalCSS=ld,d.measureAsyncOperation=Qi,d.measureImagePerformance=Td,d.navigationHelper=ae,d.optimizeClassNames=fd,d.optimizeContainment=ud,d.optimizeFlex=vd,d.optimizeGrid=md,d.optimizeWillChange=hd,d.optimizedFetch=Or,d.pageSEOConfigs=Cl,d.parseFileSize=od,d.performanceBudget=Z,d.performanceUtils=Ee,d.prefersReducedMotion=at,d.prefetchResource=Hi,d.preloadComponent=ii,d.preloadImage=Md,d.preloadResource=qi,d.preloadRoute=Wi,d.preserveAspectRatio=Ud,d.priorityLoader=Qd,d.reportWebVitals=Fi,d.routeConfig=Yr,d.securityHeaders=Ql,d.setupCSPReporting=Xl,d.setupLazyLoading=Ed,d.setupProgressiveLoading=$d,d.shouldEnableWallet=ql,d.smartLinkVariants=Ne,d.supportsAVIF=nt,d.supportsCSSImports=Gl,d.supportsWebP=ot,d.themeStorage=Xd,d.useClickOutside=wr,d.useCodeLoader=Pr,d.useComponentPerformance=rt,d.useCopyToClipboard=ed,d.useDebugMemo=Pi,d.useDynamicImport=Gd,d.useFormSubmission=Ji,d.useImageLazyLoading=Oi,d.useLazyLoad=it,d.useLazyStyles=pd,d.useLocation=Od,d.useMediaQuery=xd,d.useMemoryLeakDetection=_i,d.useMultipleCopyToClipboard=rd,d.useNavigation=Bd,d.useOptimizedTheme=kd,d.useOptimizedWallets=Mi,d.usePerformanceMark=Ai,d.useReducedMotion=gd,d.useRenderCount=zi,d.useResponsiveStyles=cd,d.useSearchParams=Wd,d.useSmartLinks=Ao,d.useStableCallback=Ui,d.useToast=va,d.useToggle=Ri,d.utils=st,d.validateHeadingStructure=Sl,d.walletStorage=Jd,d.web3SecurityNotes=Jl,d.withPerformanceTracking=Yi,d.withRetry=Fl,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|