diff --git a/AGENT.md b/AGENT.md new file mode 100644 index 000000000..55f578b4f --- /dev/null +++ b/AGENT.md @@ -0,0 +1,112 @@ +# 🤖 AFAQCM Agent Guide + +Welcome to the **AFAQCM Assessment Platform**. + +This guide is intended for **assessment agents** who are responsible for managing company assessments, sending quotations, and ensuring that clients are guided through the evaluation journey using professional standards like the "الرباعية العبدلية" framework. + +--- + +## 🧱 System Overview + +- **Backend:** Laravel 12 +- **Admin Panel:** FilamentPHP 3.2 +- **Frontend:** React + TypeScript (via Inertia.js) + +AFAQCM allows companies to assess departments using industry-standard tools built around defined **domains**, **categories**, and **criteria**. One such example is the **Abdulliya Quadrant** (`الرباعية العبدلية`), used to evaluate marketing readiness. + +--- + +## 🧑‍💻 Your Role as Agent + +Agents are responsible for: + +- Monitoring incoming **assessment requests** +- Communicating with requesting companies +- Sending tailored **tool quotations** +- Assisting with onboarding companies to use the assessment tools +- Following up with free and premium users + +--- + +## 🔍 Understanding the Tool Structure + +Each tool consists of: + +1. **Domain** (e.g., Structure, Process, Innovation & Tech, Impact) +2. **Categories** under each domain (e.g., Team Structure, Strategic Planning) +3. **Criteria** that users evaluate or are evaluated against + +All of these are created and managed from the **Filament Admin Panel**. + +--- + +## 🧾 Handling a New Request + +1. Go to the **Filament Admin Panel** +2. Navigate to: + `Tool Requests → View` +3. Review user details: + - Tool requested + - Company name and contact info + - User type: Free or Premium + +--- + +## 📬 Sending a Quotation + +If the user is not yet Premium: + +1. Prepare a quotation with course/tool price and duration. +2. Use the `SendToolQuotation` feature to generate and email a quote. +3. Update the tool request status to `Quoted`. + +Make sure to: +- Personalize the message +- Attach any helpful documents (PDFs, brochures, etc.) + +--- + +## 🛠 Using the Assessment Tool + +Users (free or premium) complete assessments directly on the **React frontend**. + +You can: +- View user progress in the admin panel +- See which tool, domain, and category they’re interacting with +- Generate a **readiness report** if needed + +--- + +## 📌 Tips for Agents + +- Understand the assessment framework used in each tool (e.g., `الرباعية العبدلية`) +- Guide clients through tool expectations if needed +- Follow up with leads who requested but haven’t submitted assessments +- Mark tool requests with clear status updates: `Pending`, `Quoted`, `Completed` + +--- + +## 📈 Example: Abdulliya Quadrant Tool (الرباعية العبدلية) + +This tool includes 4 domains: +1. **Structure** – team roles, resources, policies +2. **Process** – marketing strategy, execution, data use +3. **Innovation & Tech** – CRM, automation, tech readiness +4. **Impact** – ROI, brand influence, customer satisfaction + +Each domain includes weighted criteria and scoring. Results determine if a company is: +- **Beginner** +- **Intermediate** +- **Mature** + +--- + +## 📞 Need Help? + +- Platform issues? → `support@afaqcm.com` +- Quotation questions? → Contact the administrator +- PDF references → See attached SADARAH-OMI-011 for tool criteria + +--- + +**Thank you for representing AFAQCM professionally and helping clients improve through structured assessments.** diff --git a/GartnerPDFGenerator.php b/GartnerPDFGenerator.php new file mode 100644 index 000000000..577607752 --- /dev/null +++ b/GartnerPDFGenerator.php @@ -0,0 +1,952 @@ +set([ + 'isRemoteEnabled' => true, // Allow external resources + 'isHtml5ParserEnabled' => true, // Better HTML parsing + 'isFontSubsettingEnabled' => true, // Optimize fonts + 'defaultFont' => 'DejaVu Sans', // Reliable default font + 'dpi' => 96, // Standard web DPI + 'fontHeightRatio' => 1.1, // Better line spacing + 'debugKeepTemp' => false, // Set true for debugging + 'chroot' => realpath(''), // Security measure + ]); + + $this->dompdf = new Dompdf($options); + + // Sample data structure matching the original document + $this->data = [ + 'title' => 'The CMO Value Playbook', + 'subtitle' => '5 strategies to boost influence and showcase marketing\'s value', + 'statistics' => [ + 'unable_to_prove' => 48, + 'able_to_prove' => 52, + 'cfo_skeptical' => 40, + 'ceo_skeptical' => 39 + ], + 'steps' => [ + [ + 'number' => 1, + 'title' => 'Focus on marketing\'s long-term, holistic impact', + 'metrics' => [ + 'holistic_long_term' => 68, + 'holistic_short_term' => 51, + 'individual_long_term' => 49, + 'individual_short_term' => 30 + ] + ], + [ + 'number' => 2, + 'title' => 'Build a narrative about marketing\'s value for all stakeholders', + 'description' => 'CEOs and CFOs are the most skeptical of marketing\'s value.' + ], + [ + 'number' => 3, + 'title' => 'Increase variety and sophistication of metric types', + 'metrics' => [ + 'no_high_complexity' => 37, + 'high_complexity' => 56 + ] + ], + [ + 'number' => 4, + 'title' => 'Expand leadership involvement in D&A activity', + 'description' => 'More leadership participation in D&A activity is advantageous.' + ], + [ + 'number' => 5, + 'title' => 'Invest in marketing talent to close gaps', + 'barriers' => [ + 'soft_skills' => 39, + 'analytical_talent' => 34, + 'technical_talent' => 33 + ] + ] + ] + ]; + } + + /** + * Generate the complete PDF document + */ + public function generate() + { + $html = $this->buildCompleteHTML(); + + $this->dompdf->loadHtml($html); + $this->dompdf->setPaper('A4', 'portrait'); + $this->dompdf->render(); + + return $this->dompdf->output(); + } + + /** + * Build the complete HTML structure + */ + private function buildCompleteHTML() + { + $css = $this->getStyles(); + $coverPage = $this->getCoverPage(); + $summaryPage = $this->getSummaryPage(); + $contentPages = $this->getContentPages(); + + return " + + + + + {$this->data['title']} + + + + {$coverPage} +
+ {$summaryPage} + {$contentPages} + + "; + } + + /** + * Professional CSS styling optimized for DomPDF + */ + private function getStyles() + { + return " + /* Base styles optimized for DomPDF */ + * { + margin: 0; + padding: 0; + box-sizing: border-box; + } + + body { + font-family: 'DejaVu Sans', Arial, sans-serif; + font-size: 12px; + line-height: 1.4; + color: #333; + } + + .page-break { + page-break-before: always; + } + + /* Cover Page Styles */ + .cover-page { + height: 100vh; + background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%); + background-color: #1a237e; /* Fallback for DomPDF */ + color: white; + position: relative; + padding: 60px 40px; + } + + .cover-network { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDYwMCA4MDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGRlZnM+CiAgICA8ZmlsdGVyIGlkPSJnbG93Ij4KICAgICAgPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMyIgcmVzdWx0PSJjb2xvcmVkQmx1ciIvPgogICAgICA8ZmVNZXJnZT4gCiAgICAgICAgPGZlTWVyZ2VOb2RlIGluPSJjb2xvcmVkQmx1ciIvPgogICAgICAgIDxmZU1lcmdlTm9kZSBpbj0iU291cmNlR3JhcGhpYyIvPiAKICAgICAgPC9mZU1lcmdlPgogICAgPC9maWx0ZXI+CiAgPC9kZWZzPgogIAogIDwhLS0gTmV0d29yayBub2RlcyAtLT4KICA8Y2lyY2xlIGN4PSIxMDAiIGN5PSIxNTAiIHI9IjE1IiBmaWxsPSIjZmZjMTA3IiBmaWx0ZXI9InVybCgjZ2xvdykiLz4KICA8Y2lyY2xlIGN4PSIzMDAiIGN5PSIyMDAiIHI9IjIwIiBmaWxsPSIjZmZjMTA3IiBmaWx0ZXI9InVybCgjZ2xvdykiLz4KICA8Y2lyY2xlIGN4PSI0NTAiIGN5PSIzNTAiIHI9IjI1IiBmaWxsPSIjZmZjMTA3IiBmaWx0ZXI9InVybCgjZ2xvdykiLz4KICA8Y2lyY2xlIGN4PSIyMDAiIGN5PSI0MDAiIHI9IjEyIiBmaWxsPSIjMDBiY2Q0IiBmaWx0ZXI9InVybCgjZ2xvdykiLz4KICA8Y2lyY2xlIGN4PSI1MDAiIGN5PSI1MDAiIHI9IjE4IiBmaWxsPSIjMDBiY2Q0IiBmaWx0ZXI9InVybCgjZ2xvdykiLz4KICA8Y2lyY2xlIGN4PSIzNTAiIGN5PSI2MDAiIHI9IjE1IiBmaWxsPSIjMDBiY2Q0IiBmaWx0ZXI9InVybCgjZ2xvdykiLz4KICAKICA8IS0tIENvbm5lY3RpbmcgbGluZXMgLS0+CiAgPGxpbmUgeDE9IjEwMCIgeTE9IjE1MCIgeDI9IjMwMCIgeTI9IjIwMCIgc3Ryb2tlPSIjNjRiNWY2IiBzdHJva2Utd2lkdGg9IjIiIG9wYWNpdHk9IjAuNyIvPgogIDxsaW5lIHgxPSIzMDAiIHkxPSIyMDAiIHgyPSI0NTAiIHkyPSIzNTAiIHN0cm9rZT0iIzY0YjVmNiIgc3Ryb2tlLXdpZHRoPSIyIiBvcGFjaXR5PSIwLjciLz4KICA8bGluZSB4MT0iMjAwIiB5MT0iNDAwIiB4Mj0iMzUwIiB5Mj0iNjAwIiBzdHJva2U9IiM2NGI1ZjYiIHN0cm9rZS13aWR0aD0iMiIgb3BhY2l0eT0iMC43Ii8+CiAgPGxpbmUgeDE9IjQ1MCIgeTE9IjM1MCIgeDI9IjUwMCIgeTI9IjUwMCIgc3Ryb2tlPSIjNjRiNWY2IiBzdHJva2Utd2lkdGg9IjIiIG9wYWNpdHk9IjAuNyIvPgo8L3N2Zz4='); + background-repeat: no-repeat; + background-position: center; + opacity: 0.3; + } + + .gartner-logo { + font-size: 24px; + font-weight: bold; + margin-bottom: 40px; + } + + .cover-title { + font-size: 48px; + font-weight: bold; + line-height: 1.2; + margin-bottom: 20px; + z-index: 10; + position: relative; + } + + .cover-subtitle { + font-size: 18px; + margin-bottom: 40px; + opacity: 0.9; + z-index: 10; + position: relative; + } + + /* Summary Page */ + .summary-page { + padding: 40px; + } + + .section-title { + font-size: 24px; + font-weight: bold; + color: #1a237e; + margin-bottom: 20px; + } + + .key-stats { + display: table; + width: 100%; + margin: 30px 0; + } + + .stat-row { + display: table-row; + } + + .stat-cell { + display: table-cell; + width: 50%; + padding: 20px; + text-align: center; + } + + .stat-number { + font-size: 36px; + font-weight: bold; + color: #1a237e; + } + + .stat-label { + font-size: 14px; + margin-top: 5px; + } + + /* Steps Overview */ + .steps-overview { + margin: 30px 0; + } + + .step-item { + display: table; + width: 100%; + margin-bottom: 15px; + padding: 15px; + border-left: 4px solid #ffc107; + background: #f8f9fa; + } + + .step-number { + display: table-cell; + width: 40px; + vertical-align: middle; + } + + .step-circle { + width: 30px; + height: 30px; + border-radius: 50%; + background: #ffc107; + color: #1a237e; + text-align: center; + line-height: 30px; + font-weight: bold; + } + + .step-content { + display: table-cell; + padding-left: 15px; + vertical-align: middle; + } + + .step-title { + font-weight: bold; + color: #1a237e; + margin-bottom: 5px; + } + + /* Content Pages */ + .content-page { + padding: 40px; + min-height: 90vh; + } + + .step-header { + display: table; + width: 100%; + margin-bottom: 30px; + } + + .step-indicator { + display: table-cell; + width: 100px; + vertical-align: top; + } + + .step-circles { + display: table; + width: 100%; + } + + .circle { + display: table-cell; + width: 20%; + text-align: center; + } + + .step-circle-large { + width: 40px; + height: 40px; + border-radius: 50%; + margin: 0 auto; + text-align: center; + line-height: 40px; + font-weight: bold; + color: white; + } + + .circle.active .step-circle-large { + background: #ffc107; + color: #1a237e; + } + + .circle.inactive .step-circle-large { + background: #e0e0e0; + color: #999; + } + + .main-content { + display: table-cell; + padding-left: 40px; + vertical-align: top; + } + + .content-title { + font-size: 28px; + font-weight: bold; + color: #1a237e; + margin-bottom: 20px; + } + + /* Charts and Data Visualization */ + .chart-container { + margin: 30px 0; + text-align: center; + } + + .pie-chart { + display: inline-block; + width: 200px; + height: 200px; + border-radius: 50%; + position: relative; + margin: 20px; + } + + .pie-chart.unable-prove { + background: conic-gradient(#1a237e 0% 48%, #ffc107 48% 100%); + background: #1a237e; /* Fallback for DomPDF */ + } + + .chart-label { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + font-size: 24px; + font-weight: bold; + color: white; + } + + .bar-chart { + margin: 20px 0; + padding: 20px; + background: #f8f9fa; + border-radius: 8px; + } + + .bar-item { + display: table; + width: 100%; + margin: 10px 0; + } + + .bar-label { + display: table-cell; + width: 200px; + padding-right: 15px; + vertical-align: middle; + font-weight: 500; + } + + .bar-visual { + display: table-cell; + vertical-align: middle; + } + + .bar-fill { + height: 25px; + background: #1a237e; + border-radius: 4px; + position: relative; + } + + .bar-value { + position: absolute; + right: 10px; + top: 50%; + transform: translateY(-50%); + color: white; + font-weight: bold; + font-size: 12px; + } + + /* Two-column layout using tables */ + .two-column { + display: table; + width: 100%; + margin: 20px 0; + } + + .column { + display: table-cell; + width: 50%; + padding: 0 15px; + vertical-align: top; + } + + .challenge-box { + background: #e3f2fd; + padding: 20px; + border-radius: 8px; + border-left: 4px solid #1976d2; + margin: 15px 0; + } + + .action-box { + background: #fff3e0; + padding: 20px; + border-radius: 8px; + border-left: 4px solid #ffc107; + margin: 15px 0; + } + + .box-title { + font-weight: bold; + color: #1a237e; + margin-bottom: 10px; + } + + /* Stakeholder Template */ + .stakeholder-grid { + display: table; + width: 100%; + border-collapse: collapse; + margin: 20px 0; + } + + .stakeholder-row { + display: table-row; + } + + .stakeholder-cell { + display: table-cell; + border: 1px solid #ddd; + padding: 15px; + text-align: center; + vertical-align: middle; + } + + .stakeholder-header { + background: #1a237e; + color: white; + font-weight: bold; + } + + .sentiment-positive { + background: #4caf50; + color: white; + padding: 5px 10px; + border-radius: 15px; + font-size: 12px; + } + + .sentiment-negative { + background: #f44336; + color: white; + padding: 5px 10px; + border-radius: 15px; + font-size: 12px; + } + + .sentiment-neutral { + background: #ff9800; + color: white; + padding: 5px 10px; + border-radius: 15px; + font-size: 12px; + } + + /* Footer */ + .page-footer { + position: fixed; + bottom: 20px; + right: 40px; + font-size: 10px; + color: #666; + } + + .gartner-branding { + position: fixed; + bottom: 20px; + left: 40px; + font-size: 10px; + color: #1a237e; + font-weight: bold; + } + "; + } + + /** + * Generate the cover page matching Gartner's design + */ + private function getCoverPage() + { + return " +
+
+
Gartner
+
{$this->data['title']}
+
{$this->data['subtitle']}
+
"; + } + + /** + * Generate the summary page with key statistics + */ + private function getSummaryPage() + { + $stats = $this->data['statistics']; + + return " +
+
Only half of marketing leaders can prove value and receive credit
+ +

The 2024 Gartner Marketing Analytics and Technology Survey indicates that proving the value of marketing and receiving credit for business outcomes is a common challenge, with nearly half of marketing leaders feeling it's out of reach.

+ +
+
+
+
{$stats['unable_to_prove']}%
+
Unable to prove value and/or don't get credit
+
+
+
{$stats['able_to_prove']}%
+
Able to prove value and get credit
+
+
+
+ +
+
+
{$stats['unable_to_prove']}%
+
+
+ +
5 steps to success for CMOs
+ +
"; + + foreach ($this->data['steps'] as $step) { + $html .= " +
+
+
{$step['number']}
+
+
+
{$step['title']}
+
+
"; + } + + $html .= " +
+
"; + + return $html; + } + + /** + * Generate content pages for each step + */ + private function getContentPages() + { + $html = ''; + + foreach ($this->data['steps'] as $index => $step) { + $html .= '
'; + $html .= $this->getStepPage($step, $index + 1); + } + + return $html; + } + + /** + * Generate individual step page + */ + private function getStepPage($step, $currentStep) + { + $html = " +
+
+
+
"; + + // Generate step indicator circles + for ($i = 1; $i <= 5; $i++) { + $class = ($i == $currentStep) ? 'active' : 'inactive'; + $html .= " +
+
{$i}
+
"; + } + + $html .= " +
+
+
+
{$step['title']}
+
+
"; + + // Add specific content based on step + switch ($currentStep) { + case 1: + $html .= $this->getStep1Content($step); + break; + case 2: + $html .= $this->getStep2Content($step); + break; + case 3: + $html .= $this->getStep3Content($step); + break; + case 4: + $html .= $this->getStep4Content($step); + break; + case 5: + $html .= $this->getStep5Content($step); + break; + } + + $html .= " +
"; + + return $html; + } + + /** + * Step 1 specific content with metrics + */ + private function getStep1Content($step) + { + $metrics = $step['metrics']; + + return " +
+
+
+
The challenge and opportunity
+

CMOs who adopt a long-term, holistic view are more successful in proving marketing's value and gaining credit. In contrast, only 30% of those focusing on short-term initiatives reported success.

+
+
+
+
+
+
Holistic, longer-term focus
+
+
+
{$metrics['holistic_long_term']}%
+
+
+
+
+
Holistic, shorter-term focus
+
+
+
{$metrics['holistic_short_term']}%
+
+
+
+
+
Individual, longer-term focus
+
+
+
{$metrics['individual_long_term']}%
+
+
+
+
+
Individual, shorter-term focus
+
+
+
{$metrics['individual_short_term']}%
+
+
+
+
+
+
"; + } + + /** + * Step 2 content with stakeholder analysis + */ + private function getStep2Content($step) + { + return " +
+
+

{$step['description']}

+

CMOs aiming to foster a strong relationship with their CEO and CFO should understand their main priorities and views on marketing.

+
+
+
+
+
Chief financial officer (CFO)
+
+
+
40%
+
+
+
+
+
Chief executive officer (CEO)
+
+
+
39%
+
+
+
+
+
+
+ +
+
+
Stakeholder
+
CEO
+
CFO
+
BU Heads
+
Sales & Service Heads
+
+
+
Perception of marketing
+
Champion
+
Skeptic
+
Neutral
+
Skeptic
+
+
+
Influence
+
High
+
High
+
High
+
High
+
+
"; + } + + /** + * Step 3 content with metric sophistication + */ + private function getStep3Content($step) + { + $metrics = $step['metrics']; + + return " +
+
+

The 2024 Gartner survey found that using a variety of metrics makes it 26% more likely to prove value and get credit. However, it's not just about variety; it's the quality of the metrics that matters.

+ +
+
The survey assessed marketing leaders' use of three high-complexity metrics:
+
    +
  • Relationship
  • +
  • Return on transactional
  • +
  • Operational
  • +
+
+
+
+
+
+
No high-complexity metrics
+
+
+
{$metrics['no_high_complexity']}%
+
+
+
+
+
At least one high-complexity metric
+
+
+
{$metrics['high_complexity']}%
+
+
+
+
+ +
+ 1.5x more likely to prove value and get credit +
+
+
"; + } + + /** + * Step 4 content + */ + private function getStep4Content($step) + { + return " +
+
+

{$step['description']}

+

CMO and senior marketing leader participation in a high number of D&A activities, particularly managing a D&A function, is vital to proving value and getting credit.

+ +
+
Analytical activities in the survey included:
+
    +
  • Managing a team of marketing data analysts
  • +
  • Creating a marketing dashboard
  • +
  • Building custom reports from raw marketing data
  • +
  • Developing measurement strategies for marketing activities
  • +
  • Synthesizing quantitative data to inform marketing strategies or tactics
  • +
+
+
+
+
+
+
Low number of activities (current role)
+
+
+
44%
+
+
+
+
+
High number of activities (current role)
+
+
+
60%
+
+
+
+
+ +
+ Those who did a high number of activities were 1.4x more likely to be able to prove value and get credit. +
+
+
"; + } + + /** + * Step 5 content with talent gaps + */ + private function getStep5Content($step) + { + $barriers = $step['barriers']; + + return " +
+
+

Talent gaps present the biggest barriers to proving the value of marketing. For CMOs, lacking the right talent affects how the C-suite perceives marketing's value and impacts investment in marketing D&A.

+ +
+
CMOs should develop adaptive capabilities including:
+
    +
  • Soft skills and competencies. Marketing leaders must tell a consistent, credible story to help the CFO understand how budget and talent investment decisions support marketing's purpose, value and ability to drive growth.
  • +
  • Analytical talent. CMOs must invest in continuous training and development to help bridge the analytical talent gap as key to enhancing decision-making capabilities.
  • +
  • Technical talent. CMOs must focus on recruiting and upskilling technical talent capable of leveraging advanced marketing technologies and ensuring seamless data integration.
  • +
+
+
+
+
+
+
Lack of necessary soft skills/competencies
+
+
+
{$barriers['soft_skills']}%
+
+
+
+
+
Lack of analytical talent to analyze data and generate insight
+
+
+
{$barriers['analytical_talent']}%
+
+
+
+
+
Lack of technical talent to integrate and analyze data
+
+
+
{$barriers['technical_talent']}%
+
+
+
+
+
+
"; + } + + /** + * Save PDF to file + */ + public function saveToPDF($filename = 'gartner_cmo_playbook.pdf') + { + $output = $this->generate(); + file_put_contents($filename, $output); + return $filename; + } + + /** + * Output PDF to browser + */ + public function streamToBrowser($filename = 'gartner_cmo_playbook.pdf') + { + $this->dompdf->stream($filename, ['Attachment' => false]); + } +} + +// Usage example +try { + $generator = new GartnerPDFGenerator(); + + // Generate and save to file + $filename = $generator->saveToPDF('gartner_cmo_playbook_clone.pdf'); + echo "PDF generated successfully: {$filename}\n"; + + // Or stream directly to browser (uncomment for web use) + // $generator->streamToBrowser(); + +} catch (Exception $e) { + echo "Error generating PDF: " . $e->getMessage() . "\n"; +} + +?> diff --git a/app/Console/Commands/DebugRouteAccess.php b/app/Console/Commands/DebugRouteAccess.php new file mode 100644 index 000000000..28ca53fd1 --- /dev/null +++ b/app/Console/Commands/DebugRouteAccess.php @@ -0,0 +1,169 @@ +argument('email'); + $user = User::where('email', $email)->first(); + + if (!$user) { + $this->error("User not found: {$email}"); + return Command::FAILURE; + } + + $this->info("=== DEBUGGING ROUTE ACCESS FOR {$user->email} ===\n"); + + // Check user setup + $this->checkUserSetup($user); + + // Check routes + $this->checkRoutes(); + + // Test user methods + $this->testUserMethods($user); + + return Command::SUCCESS; + } + + private function checkUserSetup($user) + { + $this->info("=== USER SETUP ==="); + $this->info("ID: {$user->id}"); + $this->info("Name: {$user->name}"); + $this->info("Email: {$user->email}"); + $this->info("User Type: " . ($user->user_type ?? 'NULL')); + $this->info("Created: {$user->created_at}"); + + // Check subscription + $subscription = $user->subscription; + $this->info("\n--- Subscription ---"); + if ($subscription) { + $this->info("✓ Subscription exists"); + $this->info(" Plan: {$subscription->plan_type}"); + $this->info(" Status: {$subscription->status}"); + } else { + $this->error("✗ No subscription found!"); + $this->warn("Run: php artisan users:fix-subscriptions"); + } + + // Check details + $details = $user->details; + $this->info("\n--- User Details ---"); + if ($details) { + $this->info("✓ User details exist"); + $this->info(" Company: " . ($details->company_name ?? 'NULL')); + } else { + $this->error("✗ No user details found!"); + } + + // Check roles + $this->info("\n--- Roles ---"); + if (method_exists($user, 'roles')) { + $roles = $user->roles; + if ($roles->count() > 0) { + $this->info("✓ Roles assigned: " . $roles->pluck('name')->implode(', ')); + } else { + $this->warn("⚠ No roles assigned"); + $this->warn("Run: php artisan db:seed --class=RolesAndPermissionsSeeder"); + } + } else { + $this->error("✗ Roles system not available (Spatie Permission not installed?)"); + } + } + + private function checkRoutes() + { + $this->info("\n=== ROUTE ANALYSIS ==="); + + $importantRoutes = [ + 'home' => '/', + 'home2' => '/home', + 'assessment-tools' => '/assessment-tools', + 'dashboard' => '/dashboard', + 'subscription.show' => '/subscription', + ]; + + foreach ($importantRoutes as $name => $uri) { + $route = Route::getRoutes()->getByName($name); + if ($route) { + $middleware = $route->gatherMiddleware(); + $this->info("✓ {$name} ({$uri})"); + $this->info(" Middleware: " . (empty($middleware) ? 'none' : implode(', ', $middleware))); + } else { + $this->error("✗ Route '{$name}' not found!"); + } + } + + // Check for admin routes + $this->info("\n--- Admin Routes ---"); + $adminRoutes = collect(Route::getRoutes())->filter(function ($route) { + $middleware = $route->gatherMiddleware(); + return in_array('checkAccess:admin', $middleware) || + in_array('admin', $middleware) || + str_contains($route->uri(), 'admin') || + str_contains($route->uri(), 'filament'); + }); + + if ($adminRoutes->count() > 0) { + $this->info("Found {$adminRoutes->count()} admin routes:"); + foreach ($adminRoutes->take(5) as $route) { + $this->info(" - {$route->uri()} [" . implode(',', $route->methods()) . "]"); + } + } + } + + private function testUserMethods($user) + { + $this->info("\n=== USER METHOD TESTS ==="); + + try { + $user->load(['subscription', 'details', 'roles']); + + $methods = [ + 'isPremium' => fn() => $user->isPremium(), + 'isAdmin' => fn() => $user->isAdmin(), + 'isFree' => fn() => $user->isFree(), + 'getSubscriptionStatus' => fn() => $user->getSubscriptionStatus(), + 'canCreateAssessment' => fn() => $user->canCreateAssessment(), + 'getAssessmentLimit' => fn() => $user->getAssessmentLimit(), + ]; + + foreach ($methods as $method => $callable) { + try { + $result = $callable(); + $this->info("✓ {$method}(): " . json_encode($result)); + } catch (\Exception $e) { + $this->error("✗ {$method}(): " . $e->getMessage()); + } + } + + } catch (\Exception $e) { + $this->error("Failed to load user relationships: " . $e->getMessage()); + } + + // Test what happens on login redirect + $this->info("\n--- Login Redirect Test ---"); + try { + if ($user->isAdmin()) { + $this->info("→ Should redirect to: dashboard (admin)"); + } elseif ($user->isPremium()) { + $this->info("→ Should redirect to: dashboard (premium)"); + } else { + $this->info("→ Should redirect to: assessment-tools (free)"); + } + } catch (\Exception $e) { + $this->error("→ Redirect test failed: " . $e->getMessage()); + $this->warn("→ Fallback: assessment-tools"); + } + } +} diff --git a/app/Console/Commands/DebugUserAccess.php b/app/Console/Commands/DebugUserAccess.php new file mode 100644 index 000000000..25bb1b44c --- /dev/null +++ b/app/Console/Commands/DebugUserAccess.php @@ -0,0 +1,104 @@ +argument('email'); + + $user = User::where('email', $email)->first(); + + if (!$user) { + $this->error("User with email {$email} not found."); + return Command::FAILURE; + } + + $this->info("=== USER DEBUG INFO ==="); + $this->info("ID: {$user->id}"); + $this->info("Name: {$user->name}"); + $this->info("Email: {$user->email}"); + $this->info("User Type: " . ($user->user_type ?? 'not set')); + + // Check subscription + $subscription = $user->subscription; + $this->info("\n=== SUBSCRIPTION INFO ==="); + if ($subscription) { + $this->info("Plan Type: {$subscription->plan_type}"); + $this->info("Status: {$subscription->status}"); + $this->info("Started: " . ($subscription->started_at ?? 'not set')); + $this->info("Expires: " . ($subscription->expires_at ?? 'never')); + } else { + $this->warn("No subscription found!"); + } + + // Check roles + $this->info("\n=== ROLES INFO ==="); + if (method_exists($user, 'roles')) { + $roles = $user->roles->pluck('name')->toArray(); + if (empty($roles)) { + $this->warn("No roles assigned!"); + } else { + $this->info("Roles: " . implode(', ', $roles)); + } + } else { + $this->warn("Spatie Permission not installed or configured!"); + } + + // Check user methods + $this->info("\n=== USER METHODS ==="); + try { + $this->info("isPremium(): " . ($user->isPremium() ? 'true' : 'false')); + } catch (\Exception $e) { + $this->error("isPremium() failed: " . $e->getMessage()); + } + + try { + $this->info("isAdmin(): " . ($user->isAdmin() ? 'true' : 'false')); + } catch (\Exception $e) { + $this->error("isAdmin() failed: " . $e->getMessage()); + } + + try { + $this->info("isFree(): " . ($user->isFree() ? 'true' : 'false')); + } catch (\Exception $e) { + $this->error("isFree() failed: " . $e->getMessage()); + } + + try { + $this->info("getSubscriptionStatus(): " . $user->getSubscriptionStatus()); + } catch (\Exception $e) { + $this->error("getSubscriptionStatus() failed: " . $e->getMessage()); + } + + // Recommendations + $this->info("\n=== RECOMMENDATIONS ==="); + if (!$subscription) { + $this->info("Run: php artisan users:fix-subscriptions"); + } + + if (method_exists($user, 'roles') && $user->roles->isEmpty()) { + $this->info("Run: php artisan db:seed --class=RolesAndPermissionsSeeder"); + $this->info("Then assign role: \$user->assignRole('free');"); + } + + return Command::SUCCESS; + } +} diff --git a/app/Console/Commands/FixUserRoleMismatch.php b/app/Console/Commands/FixUserRoleMismatch.php new file mode 100644 index 000000000..b152df8c1 --- /dev/null +++ b/app/Console/Commands/FixUserRoleMismatch.php @@ -0,0 +1,80 @@ +argument('email'); + $user = User::where('email', $email)->first(); + + if (!$user) { + $this->error("User not found: {$email}"); + return Command::FAILURE; + } + + $this->info("Fixing user role mismatch for: {$user->email}"); + + // Load relationships + $user->load(['subscription', 'roles']); + + $subscription = $user->subscription; + $currentRoles = $user->roles->pluck('name')->toArray(); + + $this->info("Current subscription: {$subscription->plan_type}"); + $this->info("Current roles: " . implode(', ', $currentRoles)); + + // Fix role based on subscription + if ($subscription && $subscription->plan_type === 'premium') { + // User has premium subscription, should have premium role + $this->info("User has premium subscription, updating role..."); + + // Remove old roles + $user->syncRoles([]); + + // Assign premium role + $user->assignRole('premium'); + + // Update user_type field to match + $user->update(['user_type' => 'premium']); + + $this->info("✓ Updated user to premium role"); + + } elseif ($subscription && $subscription->plan_type === 'free') { + // User has free subscription, should have free role + $this->info("User has free subscription, updating role..."); + + // Remove old roles + $user->syncRoles([]); + + // Assign free role + $user->assignRole('free'); + + // Update user_type field to match + $user->update(['user_type' => 'free']); + + $this->info("✓ Updated user to free role"); + } + + // Verify the fix + $user->refresh(); + $user->load(['subscription', 'roles']); + + $this->info("\n=== AFTER FIX ==="); + $this->info("Subscription: {$user->subscription->plan_type}"); + $this->info("Roles: " . $user->roles->pluck('name')->implode(', ')); + $this->info("User Type: {$user->user_type}"); + $this->info("isPremium(): " . ($user->isPremium() ? 'true' : 'false')); + $this->info("isAdmin(): " . ($user->isAdmin() ? 'true' : 'false')); + $this->info("isFree(): " . ($user->isFree() ? 'true' : 'false')); + + return Command::SUCCESS; + } +} diff --git a/app/Console/Commands/FixUserSubscriptions.php b/app/Console/Commands/FixUserSubscriptions.php new file mode 100644 index 000000000..dfc3a87ba --- /dev/null +++ b/app/Console/Commands/FixUserSubscriptions.php @@ -0,0 +1,96 @@ +info('Starting to fix user subscriptions and details...'); + + $users = User::all(); + $fixedCount = 0; + $detailsFixedCount = 0; + + foreach ($users as $user) { + DB::beginTransaction(); + + try { + // Fix missing subscription + if (!$user->subscription) { + UserSubscription::create([ + 'user_id' => $user->id, + 'plan_type' => 'free', + 'status' => 'active', + 'started_at' => $user->created_at ?? now(), + 'features' => [ + 'assessments_limit' => 1, + 'pdf_reports' => 'basic', + 'advanced_analytics' => false, + 'team_management' => false, + 'api_access' => false, + 'priority_support' => false, + 'custom_branding' => false, + ] + ]); + $fixedCount++; + $this->info("Created subscription for user: {$user->name} ({$user->email})"); + } + + // Fix missing user details + if (!$user->details) { + UserDetails::create([ + 'user_id' => $user->id, + 'preferred_language' => 'en', + 'marketing_emails' => true, + 'newsletter_subscription' => false, + ]); + $detailsFixedCount++; + $this->info("Created details for user: {$user->name} ({$user->email})"); + } + + // Assign free role if using Spatie Permission and user doesn't have any roles + if (method_exists($user, 'assignRole') && $user->roles->isEmpty()) { + try { + $user->assignRole('free'); + $this->info("Assigned 'free' role to user: {$user->name}"); + } catch (\Exception $e) { + $this->warn("Could not assign role to user {$user->name}: {$e->getMessage()}"); + } + } + + DB::commit(); + } catch (\Exception $e) { + DB::rollBack(); + $this->error("Failed to fix user {$user->name}: {$e->getMessage()}"); + } + } + + $this->info("Completed! Fixed {$fixedCount} subscriptions and {$detailsFixedCount} user details."); + + return Command::SUCCESS; + } +} diff --git a/app/Console/Commands/PaddleDebugTest.php b/app/Console/Commands/PaddleDebugTest.php new file mode 100644 index 000000000..8d247c56f --- /dev/null +++ b/app/Console/Commands/PaddleDebugTest.php @@ -0,0 +1,231 @@ +info('🔍 Debugging Paddle API Connection'); + $this->info('=================================='); + + $config = config('services.paddle'); + + if (!$config) { + $this->error('❌ Paddle configuration missing'); + return 1; + } + + // Test 1: Basic Configuration + $this->newLine(); + $this->info('1. Configuration Values:'); + $this->info(" Auth Code: " . substr($config['vendor_auth_code'], 0, 15) . "..."); + $this->info(" Sandbox: " . ($config['sandbox'] ? 'true' : 'false')); + + // Test 2: Direct cURL test + $this->newLine(); + $this->info('2. Direct cURL API Test:'); + + $url = $config['sandbox'] + ? 'https://sandbox-api.paddle.com/products' + : 'https://vendors.paddle.com/api/2.0/user/auth'; + + $this->info(" Testing URL: {$url}"); + + $postData = [ + 'vendor_auth_code' => $config['vendor_auth_code'] + ]; + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_TIMEOUT, 30); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); + curl_setopt($ch, CURLOPT_USERAGENT, 'Laravel Paddle Debug/1.0'); + curl_setopt($ch, CURLOPT_HTTPHEADER, [ + 'Content-Type: application/x-www-form-urlencoded', + 'Accept: application/json' + ]); + + // Enable verbose output for debugging + curl_setopt($ch, CURLOPT_VERBOSE, true); + $verboseHandle = fopen('php://temp', 'w+'); + curl_setopt($ch, CURLOPT_STDERR, $verboseHandle); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + $error = curl_error($ch); + $info = curl_getinfo($ch); + curl_close($ch); + + // Get verbose output + rewind($verboseHandle); + $verboseLog = stream_get_contents($verboseHandle); + fclose($verboseHandle); + + $this->info(" HTTP Code: {$httpCode}"); + + if ($error) { + $this->error(" cURL Error: {$error}"); + } + + if ($response) { + $this->info(" Response Length: " . strlen($response) . " bytes"); + + $data = json_decode($response, true); + if ($data) { + if (isset($data['success']) && $data['success']) { + $this->info(" ✅ API Response: Success"); + if (isset($data['response']['vendor_name'])) { + $this->info(" 📊 Vendor: " . $data['response']['vendor_name']); + } + } else { + $this->error(" ❌ API Response: Failed"); + if (isset($data['error'])) { + $errorCode = $data['error']['code'] ?? 'Unknown'; + $errorMessage = $data['error']['message'] ?? 'Unknown'; + + // Handle array values properly + if (is_array($errorCode)) { + $errorCode = json_encode($errorCode); + } + if (is_array($errorMessage)) { + $errorMessage = json_encode($errorMessage); + } + + $this->error(" Error Code: " . $errorCode); + $this->error(" Error Message: " . $errorMessage); + } + } + + $this->newLine(); + $this->info(' Full Response:'); + $this->line(' ' . json_encode($data, JSON_PRETTY_PRINT)); + } else { + $this->error(" ❌ Invalid JSON response"); + $this->info(" Raw Response: " . substr($response, 0, 200) . "..."); + } + } else { + $this->error(" ❌ No response received"); + } + + // Test 3: Using Laravel HTTP Client + $this->newLine(); + $this->info('3. Laravel HTTP Client Test:'); + + try { + $response = Http::timeout(30) + ->asForm() + ->post($url, $postData); + + $this->info(" HTTP Status: " . $response->status()); + + if ($response->successful()) { + $data = $response->json(); + if (isset($data['success']) && $data['success']) { + $this->info(" ✅ Laravel HTTP: Success"); + } else { + $this->error(" ❌ Laravel HTTP: API returned error"); + $this->error(" Error: " . ($data['error']['message'] ?? 'Unknown')); + } + } else { + $this->error(" ❌ Laravel HTTP: Request failed"); + $this->error(" Response: " . $response->body()); + } + + } catch (\Exception $e) { + $this->error(" ❌ Laravel HTTP Exception: " . $e->getMessage()); + } + + // Test 4: Check environment and dependencies + $this->newLine(); + $this->info('4. Environment Check:'); + + $this->info(" PHP Version: " . PHP_VERSION); + $this->info(" cURL Version: " . (function_exists('curl_version') ? curl_version()['version'] : 'Not available')); + $this->info(" OpenSSL: " . (extension_loaded('openssl') ? 'Available' : 'Missing')); + $this->info(" JSON: " . (extension_loaded('json') ? 'Available' : 'Missing')); + + // Test 5: Check internet connectivity + $this->newLine(); + $this->info('5. Connectivity Test:'); + + $testUrls = [ + 'https://google.com', + 'https://paddle.com', + 'https://sandbox-vendors.paddle.com' + ]; + + foreach ($testUrls as $testUrl) { + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $testUrl); + curl_setopt($ch, CURLOPT_NOBODY, true); + curl_setopt($ch, CURLOPT_TIMEOUT, 10); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + + $result = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + $status = ($result !== false && $httpCode < 400) ? '✅' : '❌'; + $this->info(" {$status} {$testUrl} (HTTP {$httpCode})"); + } + + // Test 6: Paddle SDK Test + $this->newLine(); + $this->info('6. Laravel Paddle SDK Test:'); + + try { + // Try to use Paddle SDK methods + $this->info(" Paddle class exists: " . (class_exists(\Laravel\Paddle\Paddle::class) ? 'Yes' : 'No')); + + // Check if we can access Paddle configuration + $paddleConfig = app('config')->get('services.paddle'); + $this->info(" Config accessible: " . ($paddleConfig ? 'Yes' : 'No')); + + } catch (\Exception $e) { + $this->error(" ❌ Paddle SDK Error: " . $e->getMessage()); + } + + // Summary and recommendations + $this->newLine(); + $this->info('🎯 Debug Summary & Recommendations:'); + $this->info('====================================='); + + if ($httpCode === 200) { + $this->info('✅ Your Paddle API connection is working!'); + $this->info(' The original test might have had a timeout issue.'); + } elseif ($httpCode === 401 || $httpCode === 403) { + $this->error('❌ Authentication failed:'); + $this->info(' 1. Double-check your vendor_id and vendor_auth_code in Paddle dashboard'); + $this->info(' 2. Make sure you\'re using the correct credentials for sandbox/production'); + $this->info(' 3. Verify your API key hasn\'t expired'); + } elseif ($httpCode === 0 || $httpCode >= 500) { + $this->error('❌ Network/Server issue:'); + $this->info(' 1. Check your internet connection'); + $this->info(' 2. Verify firewall settings aren\'t blocking Paddle API'); + $this->info(' 3. Try again in a few minutes (Paddle servers might be busy)'); + } else { + $this->error("❌ Unexpected HTTP code: {$httpCode}"); + $this->info(' Check the full response above for details'); + } + + $this->newLine(); + $this->info('Next steps:'); + $this->info('1. If authentication works here, your original test might have timed out'); + $this->info('2. Try creating a test checkout to verify full integration'); + $this->info('3. Set up ngrok for webhook testing'); + + return 0; + } +} diff --git a/app/Console/Commands/TestPaddleSetup.php b/app/Console/Commands/TestPaddleSetup.php new file mode 100644 index 000000000..9921696eb --- /dev/null +++ b/app/Console/Commands/TestPaddleSetup.php @@ -0,0 +1,181 @@ +info('🏄‍♂️ Testing Paddle Setup'); + $this->info('========================'); + + // Test 1: Configuration + $this->newLine(); + $this->info('1. Configuration Check:'); + + $config = config('services.paddle'); + + if (!$config) { + $this->error(' ❌ Paddle configuration not found in config/services.php'); + return 1; + } + + $this->checkConfig('vendor_id', $config['vendor_id'] ?? null); + $this->checkConfig('vendor_auth_code', $config['vendor_auth_code'] ?? null, true); + $this->checkConfig('client_side_token', $config['client_side_token'] ?? null, true); + $this->checkConfig('retain_key', $config['retain_key'] ?? null, true); + $this->checkConfig('sandbox', $config['sandbox'] ?? null); + $this->checkConfig('webhook.secret', $config['webhook']['secret'] ?? null, true); + + // Test 2: Paddle SDK + $this->newLine(); + $this->info('2. Paddle SDK Check:'); + + try { + $environment = $config['sandbox'] ? 'sandbox' : 'production'; + $this->info(" ✅ Environment: {$environment}"); + + // Test API credentials + $this->info(' Testing API connection...'); + + // Use Laravel Paddle to make a simple API call + $response = $this->testApiConnection($config); + + if ($response) { + $this->info(' ✅ API Connection: Successful'); + } else { + $this->error(' ❌ API Connection: Failed'); + } + + } catch (\Exception $e) { + $this->error(' ❌ Paddle SDK Error: ' . $e->getMessage()); + } + + // Test 3: Database + $this->newLine(); + $this->info('3. Database Check:'); + + try { + // Check if necessary tables exist + $tables = [ + 'tool_subscriptions', + 'users' + ]; + + foreach ($tables as $table) { + if (Schema::hasTable($table)) { + $this->info(" ✅ Table '{$table}' exists"); + } else { + $this->error(" ❌ Table '{$table}' missing"); + } + } + + } catch (\Exception $e) { + $this->error(' ❌ Database Error: ' . $e->getMessage()); + } + + // Test 4: Routes + $this->newLine(); + $this->info('4. Routes Check:'); + + $routes = [ + 'tools.paddle.checkout', + 'tools.payment.success', + 'paddle.webhook' + ]; + + foreach ($routes as $routeName) { + try { + $route = route($routeName, ['tool' => 1], false); + $this->info(" ✅ Route '{$routeName}': {$route}"); + } catch (\Exception $e) { + $this->error(" ❌ Route '{$routeName}' not found"); + } + } + + // Test 5: Models + $this->newLine(); + $this->info('5. Models Check:'); + + try { + if (class_exists(\App\Models\ToolSubscription::class)) { + $this->info(' ✅ ToolSubscription model exists'); + } else { + $this->error(' ❌ ToolSubscription model missing'); + } + + if (class_exists(\App\Models\Tool::class)) { + $this->info(' ✅ Tool model exists'); + } else { + $this->error(' ❌ Tool model missing'); + } + + } catch (\Exception $e) { + $this->error(' ❌ Model Error: ' . $e->getMessage()); + } + + $this->newLine(); + $this->info('🎯 Test Summary:'); + $this->info('================'); + $this->info('If all checks pass, your Paddle setup should be working!'); + $this->info(''); + $this->info('Next steps:'); + $this->info('1. Create a test product in your Paddle dashboard'); + $this->info('2. Test the checkout flow on your application'); + $this->info('3. Use ngrok to test webhooks locally'); + + return 0; + } + + private function checkConfig($key, $value, $hideValue = false) + { + if ($value) { + $displayValue = $hideValue ? substr($value, 0, 10) . '...' : $value; + $this->info(" ✅ {$key}: {$displayValue}"); + } else { + $this->error(" ❌ {$key}: Missing"); + } + } + + private function testApiConnection($config) + { + try { + $url = $config['sandbox'] + ? 'https://sandbox-vendors.paddle.com/api/2.0/product' + : 'https://sandbox-vendors.paddle.com/api/2.0/product'; + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ + 'vendor_id' => $config['vendor_id'], + 'vendor_auth_code' => $config['vendor_auth_code'] + ])); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_TIMEOUT, 10); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + if ($response && $httpCode === 200) { + $data = json_decode($response, true); + return isset($data['success']) && $data['success']; + } + + return false; + + } catch (\Exception $e) { + return false; + } + } +} diff --git a/app/Filament/Resources/AccountResource.php b/app/Filament/Resources/AccountResource.php new file mode 100644 index 000000000..10cb0bd1e --- /dev/null +++ b/app/Filament/Resources/AccountResource.php @@ -0,0 +1,100 @@ +schema([ + Forms\Components\TextInput::make('name') + ->required() + ->maxLength(255), + Forms\Components\TextInput::make('bank_name') + ->required() + ->maxLength(255), + Forms\Components\TextInput::make('account_number') + ->required() + ->maxLength(255), + Forms\Components\TextInput::make('iban') + ->required() + ->maxLength(255), + Forms\Components\TextInput::make('swift_code') + ->maxLength(255), + Forms\Components\TextInput::make('currency') + ->required() + ->maxLength(255) + ->default('SAR'), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('name') + ->searchable(), + Tables\Columns\TextColumn::make('bank_name') + ->searchable(), + Tables\Columns\TextColumn::make('account_number') + ->searchable(), + Tables\Columns\TextColumn::make('iban') + ->searchable(), + Tables\Columns\TextColumn::make('swift_code') + ->searchable(), + Tables\Columns\TextColumn::make('currency') + ->searchable(), + Tables\Columns\TextColumn::make('created_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('updated_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListAccounts::route('/'), + 'create' => Pages\CreateAccount::route('/create'), + 'edit' => Pages\EditAccount::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/AccountResource/Pages/CreateAccount.php b/app/Filament/Resources/AccountResource/Pages/CreateAccount.php new file mode 100644 index 000000000..9ff9a19cd --- /dev/null +++ b/app/Filament/Resources/AccountResource/Pages/CreateAccount.php @@ -0,0 +1,12 @@ +getLocale(); + return $locale === 'ar' ? $record->title_ar : $record->title_en; + } + + public static function form(Form $form): Form + { + return $form + ->schema([ + Forms\Components\Section::make(__('filament.form.assessment_information')) + ->schema([ + Forms\Components\Select::make('tool_id') + ->label(__('filament.fields.tool')) + ->relationship('tool', 'name_en') + ->required(), + Forms\Components\Select::make('user_id') + ->label(__('filament.fields.user')) + ->relationship('user', 'name') + ->nullable() + ->default(auth()->id()), + Forms\Components\TextInput::make('guest_email') + ->label(__('filament.fields.guest_email')) + ->email() + ->maxLength(255) + ->nullable(), + Forms\Components\TextInput::make('guest_name') + ->label(__('filament.fields.guest_name')) + ->maxLength(255) + ->nullable(), + Forms\Components\TextInput::make('organization') + ->label(__('filament.fields.organization')) + ->maxLength(255) + ->nullable(), + Forms\Components\Select::make('status') + ->label(__('filament.fields.status')) + ->options([ + 'draft' => __('filament.status.draft'), + 'in_progress' => __('filament.status.in_progress'), + 'completed' => __('filament.status.completed'), + 'archived' => __('filament.status.archived'), + ]) + ->default('draft') + ->required(), + ])->columns(2), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + // Dynamic title column that shows Arabic or English based on locale + Tables\Columns\TextColumn::make('title') + ->label(__('filament.fields.name')) + ->getStateUsing(function (Assessment $record): string { + $locale = app()->getLocale(); + return $locale === 'ar' + ? ($record->title_ar ?: $record->tool->name_ar) + : ($record->title_en ?: $record->tool->name_en); + }) + ->searchable(['title_en', 'title_ar']) + ->sortable() + ->limit(50), + + // Tool name with dynamic language support + Tables\Columns\TextColumn::make('tool.name') + ->label(__('filament.fields.tool')) + ->getStateUsing(function (Assessment $record): string { + $locale = app()->getLocale(); + return $locale === 'ar' ? $record->tool->name_ar : $record->tool->name_en; + }) + ->sortable(), + + Tables\Columns\TextColumn::make('user.name') + ->label(__('filament.fields.user')) + ->sortable() + ->placeholder(__('filament.fields.guest_name')), + + Tables\Columns\TextColumn::make('guest_name') + ->label(__('filament.fields.guest_name')) + ->sortable(), + + Tables\Columns\TextColumn::make('organization') + ->label(__('filament.fields.organization')) + ->sortable(), + + // Status badge with Arabic translations + Tables\Columns\BadgeColumn::make('status') + ->label(__('filament.fields.status')) + ->colors([ + 'gray' => 'draft', + 'warning' => 'in_progress', + 'success' => 'completed', + 'danger' => 'archived', + ]) + ->formatStateUsing(fn (string $state): string => __("filament.status.{$state}")), + + Tables\Columns\TextColumn::make('created_at') + ->label(__('filament.fields.created_at')) + ->dateTime() + ->sortable(), + + Tables\Columns\TextColumn::make('updated_at') + ->label(__('filament.fields.updated_at')) + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + ]) + ->filters([ + Tables\Filters\SelectFilter::make('tool') + ->label(__('filament.fields.tool')) + ->relationship('tool', 'name_en'), + Tables\Filters\SelectFilter::make('user') + ->label(__('filament.fields.user')) + ->relationship('user', 'name'), + Tables\Filters\SelectFilter::make('status') + ->label(__('filament.fields.status')) + ->options([ + 'draft' => __('filament.status.draft'), + 'in_progress' => __('filament.status.in_progress'), + 'completed' => __('filament.status.completed'), + 'archived' => __('filament.status.archived'), + ]), + ]) + ->actions([ + Tables\Actions\ViewAction::make() + ->label(__('filament.actions.view')), + Tables\Actions\EditAction::make() + ->label(__('filament.actions.edit')), + Tables\Actions\DeleteAction::make() + ->label(__('filament.actions.delete')), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make() + ->label(__('filament.actions.delete')), + ]), + ]) + ->defaultSort('created_at', 'desc') + ->emptyStateHeading(__('filament.empty_states.no_assessments')) + ->emptyStateDescription(__('filament.empty_states.start_by_creating', ['resource' => __('filament.resources.assessment.label')])); + } + + public static function getRelations(): array + { + return [ + ResponsesRelationManager::class, + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListAssessments::route('/'), + 'create' => Pages\CreateAssessment::route('/create'), + 'edit' => Pages\EditAssessment::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/AssessmentResource/Pages/CreateAssessment.php b/app/Filament/Resources/AssessmentResource/Pages/CreateAssessment.php new file mode 100644 index 000000000..ba60ccfd8 --- /dev/null +++ b/app/Filament/Resources/AssessmentResource/Pages/CreateAssessment.php @@ -0,0 +1,12 @@ +schema([ + Forms\Components\Select::make('criterion_id') + ->relationship('criterion', 'name_en') + ->required(), + Forms\Components\TextInput::make('value') + ->required() + ->numeric() + ->minValue(0) + ->maxValue(100), + Forms\Components\Textarea::make('notes') + ->maxLength(65535) + ->columnSpanFull(), + ]); + } + + public function table(Table $table): Table + { + return $table + ->recordTitleAttribute('criterion.name') + ->columns([ + Tables\Columns\TextColumn::make('criterion.name') + ->label('Criterion'), + Tables\Columns\TextColumn::make('criterion.category.name') + ->label('Category'), + Tables\Columns\TextColumn::make('value') + ->sortable(), + Tables\Columns\TextColumn::make('created_at') + ->dateTime() + ->sortable(), + ]) + ->filters([ + Tables\Filters\SelectFilter::make('criterion') + ->relationship('criterion', 'name_en'), + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]); + } +} diff --git a/app/Filament/Resources/AssessmentResponseResource.php b/app/Filament/Resources/AssessmentResponseResource.php new file mode 100644 index 000000000..6e858148b --- /dev/null +++ b/app/Filament/Resources/AssessmentResponseResource.php @@ -0,0 +1,105 @@ +schema([ + + Forms\Components\Select::make('criterion_id') + ->label(__('filament.fields.criterion')) + ->relationship('criterion', 'name_en') + ->required(), + Forms\Components\TextInput::make('value') + ->required() + ->numeric() + ->minValue(0) + ->maxValue(100), + Forms\Components\Textarea::make('notes') + ->label(__('filament.fields.notes')) + ->maxLength(65535) + ->columnSpanFull(), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('tool.name') + ->label(__('filament.resources.assessment.label')) + ->sortable(), + Tables\Columns\TextColumn::make('criterion.name') + ->label(__('filament.fields.criterion')) + ->sortable(), + Tables\Columns\TextColumn::make('criterion.category.name') + ->label(__('filament.fields.category')) + ->sortable(), + Tables\Columns\TextColumn::make('value') + ->sortable(), + Tables\Columns\TextColumn::make('created_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('updated_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + ]) + ->filters([ + + Tables\Filters\SelectFilter::make('criterion') + ->label(__('filament.fields.criterion')) + ->relationship('criterion', 'name_en'), + ]) + ->actions([ + Tables\Actions\ViewAction::make(), + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]); + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListAssessmentResponses::route('/'), + 'create' => Pages\CreateAssessmentResponse::route('/create'), + 'edit' => Pages\EditAssessmentResponse::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/AssessmentResponseResource/Pages/CreateAssessmentResponse.php b/app/Filament/Resources/AssessmentResponseResource/Pages/CreateAssessmentResponse.php new file mode 100644 index 000000000..cfbf877e7 --- /dev/null +++ b/app/Filament/Resources/AssessmentResponseResource/Pages/CreateAssessmentResponse.php @@ -0,0 +1,12 @@ +schema([ + Forms\Components\Select::make('domain_id') + ->relationship('domain', 'name_en') + ->required(), + Forms\Components\Tabs::make(__('filament.form.translations')) + ->tabs([ + Forms\Components\Tabs\Tab::make(__('filament.form.english')) + ->schema([ + Forms\Components\TextInput::make('name_en') + ->label(__('filament.fields.name_en')) + ->required() + ->maxLength(255), + Forms\Components\Textarea::make('description_en') + ->label(__('filament.fields.description_en')) + ->maxLength(65535) + ->columnSpanFull(), + ]), + Forms\Components\Tabs\Tab::make(__('filament.form.arabic')) + ->schema([ + Forms\Components\TextInput::make('name_ar') + ->label(__('filament.fields.name_ar')) + ->required() + ->maxLength(255), + Forms\Components\Textarea::make('description_ar') + ->label(__('filament.fields.description_ar')) + ->maxLength(65535) + ->columnSpanFull(), + ]), + ]) + ->columnSpanFull(), + Forms\Components\TextInput::make('order') + ->required() + ->numeric() + ->default(0), + Forms\Components\TextInput::make('weight_percentage') + ->required(), + Forms\Components\Select::make('status') + ->label(__('filament.fields.status')) + ->options([ + 'active' => __('filament.status.active'), + 'inactive' => __('filament.status.inactive'), + ]) + ->default('active') + ->required(), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('domain.name') + ->label(__('filament.fields.domain')) + ->sortable(), + Tables\Columns\TextColumn::make('name') + ->label(__('filament.fields.name')) + ->searchable(['name_en','name_ar']), + Tables\Columns\TextColumn::make('order') + ->sortable(), + Tables\Columns\TextColumn::make('weight_percentage') + ->label(__('filament.fields.weight_percentage')), + Tables\Columns\BadgeColumn::make('status') + ->colors([ + 'danger' => 'inactive', + 'success' => 'active', + ]), + Tables\Columns\TextColumn::make('created_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('updated_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + ]) + ->filters([ + Tables\Filters\SelectFilter::make('domain') + ->label(__('filament.fields.domain')) + ->relationship('domain', 'name_en'), + Tables\Filters\SelectFilter::make('status') + ->label(__('filament.fields.status')) + ->options([ + 'active' => __('filament.status.active'), + 'inactive' => __('filament.status.inactive'), + ]), + ]) + ->actions([ + Tables\Actions\ViewAction::make(), + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]) + ->defaultSort('order'); + } + + public static function getRelations(): array + { + return [ + CriteriaRelationManager::class, + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListCategories::route('/'), + 'create' => Pages\CreateCategory::route('/create'), + 'edit' => Pages\EditCategory::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/CategoryResource/Pages/CreateCategory.php b/app/Filament/Resources/CategoryResource/Pages/CreateCategory.php new file mode 100644 index 000000000..41b42d868 --- /dev/null +++ b/app/Filament/Resources/CategoryResource/Pages/CreateCategory.php @@ -0,0 +1,12 @@ +schema([ + Forms\Components\Tabs::make('Translations') + ->tabs([ + Forms\Components\Tabs\Tab::make('English') + ->schema([ + Forms\Components\TextInput::make('name_en') + ->label('Name (English)') + ->required() + ->maxLength(255), + Forms\Components\Textarea::make('description_en') + ->label('Description (English)') + ->maxLength(65535) + ->columnSpanFull(), + ]), + Forms\Components\Tabs\Tab::make('Arabic') + ->schema([ + Forms\Components\TextInput::make('name_ar') + ->label('Name (Arabic)') + ->required() + ->maxLength(255), + Forms\Components\Textarea::make('description_ar') + ->label('Description (Arabic)') + ->maxLength(65535) + ->columnSpanFull(), + ]), + ]) + ->columnSpanFull(), + Forms\Components\TextInput::make('order') + ->required() + ->numeric() + ->default(0), + Forms\Components\Select::make('status') + ->options([ + 'active' => 'Active', + 'inactive' => 'Inactive', + ]) + ->default('active') + ->required(), + ]); + } + + public function table(Table $table): Table + { + return $table + ->recordTitleAttribute('name') + ->columns([ + Tables\Columns\TextColumn::make('name') + ->label('Name'), + Tables\Columns\TextColumn::make('order') + ->sortable(), Tables\Columns\TextColumn::make('weight_percentage'), + Tables\Columns\BadgeColumn::make('status') + ->colors([ + 'danger' => 'inactive', + 'success' => 'active', + ]), + ]) + ->filters([ + Tables\Filters\SelectFilter::make('status') + ->options([ + 'active' => 'Active', + 'inactive' => 'Inactive', + ]), + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]) + ->reorderable('order') + ->defaultSort('order'); + } +} diff --git a/app/Filament/Resources/CriterionResource.php b/app/Filament/Resources/CriterionResource.php new file mode 100644 index 000000000..03665466e --- /dev/null +++ b/app/Filament/Resources/CriterionResource.php @@ -0,0 +1,162 @@ +schema([ + Forms\Components\Select::make('category_id') + ->label(__('filament.fields.category')) + ->relationship('category', 'name_en') + ->required(), + Forms\Components\Tabs::make(__('filament.form.translations')) + ->tabs([ + Forms\Components\Tabs\Tab::make(__('filament.form.english')) + ->schema([ + Forms\Components\TextInput::make('name_en') + ->label(__('filament.fields.name_en')) + ->required() + ->maxLength(255), + Forms\Components\Textarea::make('description_en') + ->label(__('filament.fields.description_en')) + ->maxLength(65535) + ->columnSpanFull(), + ]), + Forms\Components\Tabs\Tab::make(__('filament.form.arabic')) + ->schema([ + Forms\Components\TextInput::make('name_ar') + ->label(__('filament.fields.name_ar')) + ->required() + ->maxLength(255), + Forms\Components\Textarea::make('description_ar') + ->label(__('filament.fields.description_ar')) + ->maxLength(65535) + ->columnSpanFull(), + ]), + ]) + ->columnSpanFull(), + Forms\Components\TextInput::make('order') + ->required() + ->numeric() + ->default(0), + Forms\Components\Select::make('status') + ->label(__('filament.fields.status')) + ->options([ + 'active' => __('filament.status.active'), + 'inactive' => __('filament.status.inactive'), + ]) + ->default('active') + ->required(), + Forms\Components\Toggle::make('requires_attachment') + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('category.name') + ->label(__('filament.fields.category')) + ->getStateUsing(function ($record) { + return App::getLocale() === 'ar' + ? $record->category->name_ar + : $record->category->name_en; + }) + ->sortable(), + Tables\Columns\TextColumn::make('name') + ->label(__('filament.fields.name')) + + ->getStateUsing(function ($record) { + return App::getLocale() === 'ar' ? $record->name_ar : $record->name_en; + }) + ->searchable(['name_en','name_ar']), + Tables\Columns\TextColumn::make('order') + ->sortable(), + Tables\Columns\BadgeColumn::make('status') + ->colors([ + 'danger' => 'inactive', + 'success' => 'active', + ]), + Tables\Columns\ToggleColumn::make('requires_attachment') + + , + Tables\Columns\TextColumn::make('created_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('updated_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + ]) + ->filters([ + Tables\Filters\SelectFilter::make('category') + ->label(__('filament.fields.category')) + ->relationship('category', 'name_en'), + Tables\Filters\SelectFilter::make('status') + ->label(__('filament.fields.status')) + ->options([ + 'active' => __('filament.status.active'), + 'inactive' => __('filament.status.inactive'), + ]), + ]) + ->actions([ + Tables\Actions\ViewAction::make(), + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]) + ->defaultSort('order'); + } + + public static function getRelations(): array + { + return [ + ActionsRelationManager::class, + ]; + } + public static function getPages(): array + { + return [ + 'index' => Pages\ListCriteria::route('/'), + 'create' => Pages\CreateCriterion::route('/create'), + 'edit' => Pages\EditCriterion::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/CriterionResource/Pages/CreateCriterion.php b/app/Filament/Resources/CriterionResource/Pages/CreateCriterion.php new file mode 100644 index 000000000..eddf6d106 --- /dev/null +++ b/app/Filament/Resources/CriterionResource/Pages/CreateCriterion.php @@ -0,0 +1,12 @@ +schema([ + Forms\Components\Tabs::make('Translations') + ->tabs([ + Forms\Components\Tabs\Tab::make('English') + ->schema([ + Forms\Components\Textarea::make('action_en') + ->label('Action (English)') + ->required() + ->rows(3) + ->maxLength(1000), + ]), + Forms\Components\Tabs\Tab::make('Arabic') + ->schema([ + Forms\Components\Textarea::make('action_ar') + ->label('Action (Arabic)') + ->required() + ->rows(3) + ->maxLength(1000), + ]), + ]) + ->columnSpanFull(), + + Forms\Components\Select::make('flag') + ->label('Action Type') + ->options([ + true => 'Improvement Action (إجراءات تحسينية)', + false => 'Corrective Action (إجراءات تصليحية)', + ]) + ->required() + ->default(true) + ->helperText('Improvement actions enhance existing good practices. Corrective actions fix identified problems.'), + ]); + } + + public function table(Table $table): Table + { + return $table + ->recordTitleAttribute('action_en') + ->columns([ + Tables\Columns\TextColumn::make('action_en') + ->label('English Action') + ->limit(50) + ->tooltip(function (Tables\Columns\TextColumn $column): ?string { + $state = $column->getState(); + if (strlen($state) <= 50) { + return null; + } + return $state; + }), + + Tables\Columns\TextColumn::make('action_ar') + ->label('Arabic Action') + ->limit(50) + ->tooltip(function (Tables\Columns\TextColumn $column): ?string { + $state = $column->getState(); + if (strlen($state) <= 50) { + return null; + } + return $state; + }), + + Tables\Columns\BadgeColumn::make('flag') + ->label('Type') + ->formatStateUsing(fn (bool $state): string => $state ? 'Improvement' : 'Corrective') + ->colors([ + 'success' => fn ($state): bool => $state === true, + 'danger' => fn ($state): bool => $state === false, + ]) + ->icons([ + 'heroicon-o-arrow-trending-up' => fn ($state): bool => $state === true, + 'heroicon-o-wrench-screwdriver' => fn ($state): bool => $state === false, + ]), + + Tables\Columns\TextColumn::make('created_at') + ->label('Created') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + ]) + ->filters([ + Tables\Filters\SelectFilter::make('flag') + ->label('Action Type') + ->options([ + true => 'Improvement Actions', + false => 'Corrective Actions', + ]), + ]) + ->headerActions([ + Tables\Actions\CreateAction::make() + ->label('Add Action') + ->icon('heroicon-o-plus'), + ]) + ->actions([ + Tables\Actions\ViewAction::make() + ->label('') + ->tooltip('View Action'), + Tables\Actions\EditAction::make() + ->label('') + ->tooltip('Edit Action'), + Tables\Actions\DeleteAction::make() + ->label('') + ->tooltip('Delete Action'), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]) + ->emptyStateActions([ + Tables\Actions\CreateAction::make() + ->label('Add First Action') + ->icon('heroicon-o-plus'), + ]) + ->emptyStateHeading('No Actions Yet') + ->emptyStateDescription('Add improvement or corrective actions for this criterion.') + ->defaultSort('created_at', 'desc'); + } +} diff --git a/app/Filament/Resources/DomainResource.php b/app/Filament/Resources/DomainResource.php new file mode 100644 index 000000000..c180d68c6 --- /dev/null +++ b/app/Filament/Resources/DomainResource.php @@ -0,0 +1,154 @@ +schema([ + Forms\Components\Select::make('tool_id') + ->label(__('filament.fields.tool')) + ->relationship('tool', 'name_en') + ->required(), + Forms\Components\Tabs::make(__('filament.form.translations')) + ->tabs([ + Forms\Components\Tabs\Tab::make(__('filament.form.english')) + ->schema([ + Forms\Components\TextInput::make('name_en') + ->label(__('filament.fields.name_en')) + ->required() + ->maxLength(255), + Forms\Components\Textarea::make('description_en') + ->label(__('filament.fields.description_en')) + ->maxLength(65535) + ->columnSpanFull(), + ]), + Forms\Components\Tabs\Tab::make(__('filament.form.arabic')) + ->schema([ + Forms\Components\TextInput::make('name_ar') + ->label(__('filament.fields.name_ar')) + ->required() + ->maxLength(255), + Forms\Components\Textarea::make('description_ar') + ->label(__('filament.fields.description_ar')) + ->maxLength(65535) + ->columnSpanFull(), + ]), + ]) + ->columnSpanFull(), + Forms\Components\TextInput::make('order') + ->label(__('filament.fields.order')) + ->required() + ->numeric() + ->default(0), + Forms\Components\TextInput::make('weight_percentage') + ->label(__('filament.fields.weight_percentage')) + ->required(), + Forms\Components\Select::make('status') + ->label(__('filament.fields.status')) + ->options([ + 'active' => __('filament.status.active'), + 'inactive' => __('filament.status.inactive'), + ]) + ->default('active') + ->required(), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('tool.name') + ->label(__('filament.fields.tool')) + ->sortable(), + Tables\Columns\TextColumn::make('name') + ->label(__('filament.fields.name')) + ->searchable(['name_en','name_ar']), + Tables\Columns\TextColumn::make('order') + ->sortable(), + Tables\Columns\TextColumn::make('weight_percentage') + ->label(__('filament.fields.weight_percentage')), + Tables\Columns\BadgeColumn::make('status') + ->colors([ + 'danger' => 'inactive', + 'success' => 'active', + ]), + Tables\Columns\TextColumn::make('created_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('updated_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + ]) + ->filters([ + Tables\Filters\SelectFilter::make('tool') + ->label(__('filament.fields.tool')) + ->relationship('tool', 'name_en'), + Tables\Filters\SelectFilter::make('status') + ->label(__('filament.fields.status')) + ->options([ + 'active' => __('filament.status.active'), + 'inactive' => __('filament.status.inactive'), + ]), + ]) + ->actions([ + Tables\Actions\ViewAction::make(), + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]) + ->defaultSort('order'); + } + + public static function getRelations(): array + { + return [ + CategoriesRelationManager::class, + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListDomains::route('/'), + 'create' => Pages\CreateDomain::route('/create'), + 'edit' => Pages\EditDomain::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/DomainResource/Pages/CreateDomain.php b/app/Filament/Resources/DomainResource/Pages/CreateDomain.php new file mode 100644 index 000000000..c3f65ef69 --- /dev/null +++ b/app/Filament/Resources/DomainResource/Pages/CreateDomain.php @@ -0,0 +1,12 @@ +schema([ + Forms\Components\Tabs::make('Translations') + ->tabs([ + Forms\Components\Tabs\Tab::make('English') + ->schema([ + Forms\Components\TextInput::make('name_en') + ->label('Name (English)') + ->required() + ->maxLength(255), + Forms\Components\Textarea::make('description_en') + ->label('Description (English)') + ->maxLength(65535) + ->columnSpanFull(), + ]), + Forms\Components\Tabs\Tab::make('Arabic') + ->schema([ + Forms\Components\TextInput::make('name_ar') + ->label('Name (Arabic)') + ->required() + ->maxLength(255), + Forms\Components\Textarea::make('description_ar') + ->label('Description (Arabic)') + ->maxLength(65535) + ->columnSpanFull(), + ]), + ]) + ->columnSpanFull(), + Forms\Components\TextInput::make('order') + ->required() + ->numeric() + ->default(0), + Forms\Components\TextInput::make('weight_percentage') + ->numeric() + ->suffix('%') + ->required(), + Forms\Components\Select::make('status') + ->options([ + 'active' => 'Active', + 'inactive' => 'Inactive', + ]) + ->default('active') + ->required(), + ]); + } + + public function table(Table $table): Table + { + return $table + ->recordTitleAttribute('name') + ->columns([ + Tables\Columns\TextColumn::make('name') + ->label('Name'), + Tables\Columns\TextColumn::make('order') + ->sortable(), Tables\Columns\TextColumn::make('weight_percentage'), + Tables\Columns\BadgeColumn::make('status') + ->colors([ + 'danger' => 'inactive', + 'success' => 'active', + ]), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]) + ->reorderable('order') + ->defaultSort('order'); + } +} diff --git a/app/Filament/Resources/GuestSessionResource.php b/app/Filament/Resources/GuestSessionResource.php new file mode 100644 index 000000000..da33c29a0 --- /dev/null +++ b/app/Filament/Resources/GuestSessionResource.php @@ -0,0 +1,301 @@ +schema([ + Forms\Components\Section::make('Session Information') + ->schema([ + Forms\Components\TextInput::make('name') + ->required() + ->maxLength(255), + Forms\Components\TextInput::make('email') + ->email() + ->required() + ->maxLength(255), + Forms\Components\Select::make('assessment_id') + ->relationship('assessment', 'id') + ->getOptionLabelFromRecordUsing(fn ($record) => "{$record->tool->name} - {$record->name}") + ->required(), + ]), + + Forms\Components\Section::make('Technical Details') + ->schema([ + Forms\Components\TextInput::make('ip_address') + ->maxLength(45), + Forms\Components\TextInput::make('device_type') + ->maxLength(50), + Forms\Components\TextInput::make('browser') + ->maxLength(100), + Forms\Components\TextInput::make('browser_version') + ->maxLength(50), + Forms\Components\TextInput::make('operating_system') + ->maxLength(100), + ]) + ->columns(2), + + Forms\Components\Section::make('Location Information') + ->schema([ + Forms\Components\TextInput::make('country') + ->maxLength(100), + Forms\Components\TextInput::make('country_code') + ->maxLength(2), + Forms\Components\TextInput::make('region') + ->maxLength(100), + Forms\Components\TextInput::make('city') + ->maxLength(100), + Forms\Components\TextInput::make('timezone') + ->maxLength(50), + Forms\Components\TextInput::make('isp') + ->maxLength(255), + ]) + ->columns(2), + + Forms\Components\Section::make('Timestamps') + ->schema([ + Forms\Components\DateTimePicker::make('started_at'), + Forms\Components\DateTimePicker::make('completed_at'), + Forms\Components\DateTimePicker::make('last_activity'), + ]) + ->columns(3), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('name') + ->searchable() + ->sortable(), + Tables\Columns\TextColumn::make('email') + ->searchable() + ->sortable(), + Tables\Columns\TextColumn::make('assessment.tool.name') + ->label('Assessment Tool') + ->sortable() + ->limit(30), + Tables\Columns\IconColumn::make('status') + ->label('Status') + ->getStateUsing(fn (GuestSession $record): string => $record->completed_at ? 'completed' : 'active') + ->icon(fn (string $state): string => match ($state) { + 'completed' => 'heroicon-o-check-circle', + 'active' => 'heroicon-o-clock', + default => 'heroicon-o-question-mark-circle', + }) + ->color(fn (string $state): string => match ($state) { + 'completed' => 'success', + 'active' => 'warning', + default => 'gray', + }), + Tables\Columns\TextColumn::make('device_type') + ->badge() + ->color(fn (string $state): string => match ($state) { + 'Desktop' => 'gray', + 'Mobile' => 'warning', + 'Tablet' => 'info', + default => 'gray', + }), + Tables\Columns\TextColumn::make('browser') + ->formatStateUsing(fn (GuestSession $record): string => + $record->browser . ($record->browser_version ? " {$record->browser_version}" : '') + ), + Tables\Columns\TextColumn::make('country') + ->formatStateUsing(fn (GuestSession $record): string => + $record->country . ($record->country_code ? " ({$record->country_code})" : '') + ) + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('city') + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('started_at') + ->dateTime() + ->sortable(), + Tables\Columns\TextColumn::make('completed_at') + ->dateTime() + ->sortable() + ->placeholder('In Progress'), + Tables\Columns\TextColumn::make('duration') + ->label('Duration') + ->getStateUsing(fn (GuestSession $record): ?string => $record->getDuration()) + ->placeholder('Ongoing'), + Tables\Columns\IconColumn::make('is_active') + ->label('Active') + ->getStateUsing(fn (GuestSession $record): bool => $record->isActive()) + ->boolean(), + ]) + ->filters([ + Tables\Filters\SelectFilter::make('device_type') + ->options([ + 'Desktop' => 'Desktop', + 'Mobile' => 'Mobile', + 'Tablet' => 'Tablet', + ]), + Tables\Filters\SelectFilter::make('browser') + ->options([ + 'Chrome' => 'Chrome', + 'Firefox' => 'Firefox', + 'Safari' => 'Safari', + 'Edge' => 'Edge', + 'Opera' => 'Opera', + ]), + Tables\Filters\Filter::make('completed') + ->query(fn ($query) => $query->whereNotNull('completed_at')) + ->label('Completed Sessions'), + Tables\Filters\Filter::make('active') + ->query(fn ($query) => $query->whereNull('completed_at')) + ->label('Active Sessions'), + Tables\Filters\Filter::make('recent') + ->query(fn ($query) => $query->where('started_at', '>=', now()->subDay())) + ->label('Last 24 Hours'), + ]) + ->actions([ + Tables\Actions\ViewAction::make(), + Tables\Actions\Action::make('view_assessment') + ->label('View Assessment') + ->icon('heroicon-o-eye') + ->url(fn (GuestSession $record): string => + $record->completed_at + ? route('guest.assessment.results', $record->assessment_id) + : route('assessment.take', $record->assessment_id) + ) + ->openUrlInNewTab(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]) + ->defaultSort('started_at', 'desc'); + } + + public static function infolist(Infolist $infolist): Infolist + { + return $infolist + ->schema([ + Infolists\Components\Section::make('User Information') + ->schema([ + Infolists\Components\TextEntry::make('name'), + Infolists\Components\TextEntry::make('email'), + Infolists\Components\TextEntry::make('assessment.tool.name') + ->label('Assessment Tool'), + Infolists\Components\TextEntry::make('assessment.organization') + ->label('Organization') + ->placeholder('Not specified'), + ]) + ->columns(2), + + Infolists\Components\Section::make('Technical Details') + ->schema([ + Infolists\Components\TextEntry::make('ip_address') + ->label('IP Address') + ->copyable(), + Infolists\Components\TextEntry::make('device_type') + ->badge() + ->color(fn (string $state): string => match ($state) { + 'Desktop' => 'gray', + 'Mobile' => 'warning', + 'Tablet' => 'info', + default => 'gray', + }), + Infolists\Components\TextEntry::make('browser') + ->formatStateUsing(fn (GuestSession $record): string => + $record->browser . ($record->browser_version ? " {$record->browser_version}" : '') + ), + Infolists\Components\TextEntry::make('operating_system'), + Infolists\Components\TextEntry::make('user_agent') + ->label('User Agent') + ->columnSpanFull() + ->copyable(), + ]) + ->columns(2), + + Infolists\Components\Section::make('Location Information') + ->schema([ + Infolists\Components\TextEntry::make('country') + ->formatStateUsing(fn (GuestSession $record): string => + $record->country . ($record->country_code ? " ({$record->country_code})" : '') + ), + Infolists\Components\TextEntry::make('region'), + Infolists\Components\TextEntry::make('city'), + Infolists\Components\TextEntry::make('timezone'), + Infolists\Components\TextEntry::make('isp') + ->label('Internet Service Provider'), + Infolists\Components\TextEntry::make('coordinates') + ->label('Coordinates') + ->getStateUsing(fn (GuestSession $record): ?string => + $record->latitude && $record->longitude + ? "{$record->latitude}, {$record->longitude}" + : null + ) + ->placeholder('Not available'), + ]) + ->columns(2), + + Infolists\Components\Section::make('Session Timeline') + ->schema([ + Infolists\Components\TextEntry::make('started_at') + ->dateTime(), + Infolists\Components\TextEntry::make('last_activity') + ->dateTime(), + Infolists\Components\TextEntry::make('completed_at') + ->dateTime() + ->placeholder('Not completed'), + Infolists\Components\TextEntry::make('duration') + ->getStateUsing(fn (GuestSession $record): ?string => $record->getDuration()) + ->placeholder('Ongoing'), + Infolists\Components\IconEntry::make('is_active') + ->label('Currently Active') + ->getStateUsing(fn (GuestSession $record): bool => $record->isActive()) + ->boolean(), + ]) + ->columns(3), + + Infolists\Components\Section::make('Additional Data') + ->schema([ + Infolists\Components\KeyValueEntry::make('session_data') + ->label('Session Data') + ->columnSpanFull(), + ]) + ->visible(fn (GuestSession $record): bool => !empty($record->session_data)), + ]); + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListGuestSessions::route('/'), +// 'view' => Pages\ViewGuestSession::route('/{record}'), + 'edit' => Pages\EditGuestSession::route('/{record}/edit'), + ]; + } + + public static function getWidgets(): array + { + return [ +// GuestSessionDetailsWidget::class, + ]; + } +} + diff --git a/app/Filament/Resources/GuestSessionResource/Pages/CreateGuestSession.php b/app/Filament/Resources/GuestSessionResource/Pages/CreateGuestSession.php new file mode 100644 index 000000000..0093ba8c2 --- /dev/null +++ b/app/Filament/Resources/GuestSessionResource/Pages/CreateGuestSession.php @@ -0,0 +1,12 @@ +schema([ + Forms\Components\TextInput::make('title') + ->required() + ->reactive() + ->afterStateUpdated(fn($state, $set) => $set('slug', Str::slug($state))), + Forms\Components\TextInput::make('slug') + ->disabled() + ->required() + ->unique(ignoreRecord: true), + Forms\Components\RichEditor::make('content') + ->required() + ->columnSpanFull(), + Forms\Components\FileUpload::make('thumbnail') + ->image() + ->directory('thumbnails') + ->disk('public'), + + Forms\Components\FileUpload::make('image_gallery') + ->image() + ->multiple() + ->directory('gallery') + ->disk('public'), + + Forms\Components\FileUpload::make('audio') +// ->acceptedFileTypes(['audio/mpeg','audio/ogg']) + ->directory('audio'), + Forms\Components\FileUpload::make('video') +// ->acceptedFileTypes(['video/mp4']) + ->directory('video'), + Forms\Components\TextInput::make('youtube_url') + ->url() + ->maxLength(255), + Forms\Components\DateTimePicker::make('published_at'), + Forms\Components\Select::make('status') + ->options([ + 'draft' => 'Draft', + 'published' => 'Published', + ]) + ->default('draft') + ->required(), + ])->columns(2); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('title')->searchable()->sortable(), + Tables\Columns\TextColumn::make('status')->badge(), + Tables\Columns\TextColumn::make('published_at')->dateTime(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]); + } + + public static function getRelations(): array + { + return [ + CommentsRelationManager::class, + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListPosts::route('/'), + 'create' => Pages\CreatePost::route('/create'), + 'edit' => Pages\EditPost::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/PostResource/Pages/CreatePost.php b/app/Filament/Resources/PostResource/Pages/CreatePost.php new file mode 100644 index 000000000..0b3cee4b1 --- /dev/null +++ b/app/Filament/Resources/PostResource/Pages/CreatePost.php @@ -0,0 +1,12 @@ +schema([ + Forms\Components\TextInput::make('author_name')->required()->maxLength(255), + Forms\Components\Textarea::make('content')->required()->columnSpanFull(), + Forms\Components\Toggle::make('approved')->label('Approved'), + ]); + } + + public function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('author_name')->sortable()->searchable(), + Tables\Columns\TextColumn::make('content')->limit(50), + Tables\Columns\TextColumn::make('created_at')->dateTime()->sortable(), + Tables\Columns\IconColumn::make('approved')->boolean(), + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/ToolPerformanceLevelResource.php b/app/Filament/Resources/ToolPerformanceLevelResource.php new file mode 100644 index 000000000..6f8e8fd5f --- /dev/null +++ b/app/Filament/Resources/ToolPerformanceLevelResource.php @@ -0,0 +1,117 @@ +schema([ + Select::make('tool_id') + ->label(__('Tool')) + ->relationship('tool', 'id') // just use 'id' since we customize the label + ->getOptionLabelFromRecordUsing(fn ($record) => App::getLocale() === 'ar' ? $record->name_ar : $record->name_en) + ->required(), + Forms\Components\TextInput::make('code') + ->required() + ->maxLength(255), + Forms\Components\TextInput::make('min_percentage') + ->required() + ->numeric(), + Forms\Components\ColorPicker::make('color') + ->required(), + Forms\Components\TextInput::make('name_en') + ->required() + ->maxLength(255), + Forms\Components\TextInput::make('name_ar') + ->required() + ->maxLength(255), + Forms\Components\TextInput::make('text_en') + ->maxLength(255), + Forms\Components\TextInput::make('text_ar') + ->maxLength(255), + Forms\Components\Textarea::make('recommendation_en') + ->columnSpanFull(), + Forms\Components\Textarea::make('recommendation_ar') + ->columnSpanFull(), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('tool_id') + ->numeric() + ->sortable(), + Tables\Columns\TextColumn::make('code') + ->searchable(), + Tables\Columns\TextColumn::make('min_percentage') + ->numeric() + ->sortable(), + Tables\Columns\TextColumn::make('color') + ->searchable(), + Tables\Columns\TextColumn::make('name_en') + ->searchable(), + Tables\Columns\TextColumn::make('name_ar') + ->searchable(), + Tables\Columns\TextColumn::make('text_en') + ->searchable(), + Tables\Columns\TextColumn::make('text_ar') + ->searchable(), + Tables\Columns\TextColumn::make('created_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('updated_at') + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListToolPerformanceLevels::route('/'), + 'create' => Pages\CreateToolPerformanceLevel::route('/create'), + 'edit' => Pages\EditToolPerformanceLevel::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/ToolPerformanceLevelResource/Pages/CreateToolPerformanceLevel.php b/app/Filament/Resources/ToolPerformanceLevelResource/Pages/CreateToolPerformanceLevel.php new file mode 100644 index 000000000..877b44920 --- /dev/null +++ b/app/Filament/Resources/ToolPerformanceLevelResource/Pages/CreateToolPerformanceLevel.php @@ -0,0 +1,12 @@ +columns([ + Tables\Columns\TextColumn::make('name')->searchable(), + Tables\Columns\TextColumn::make('email'), + Tables\Columns\TextColumn::make('tool.name_en')->label('Tool'), + Tables\Columns\TextColumn::make('status')->badge(), + Tables\Columns\TextColumn::make('created_at')->dateTime(), + ]) + ->filters([ + SelectFilter::make('status') + ->options([ + 'pending' => 'Pending', + 'quoted' => 'Quoted', + 'done' => 'Done', + ]) + ]) + ->actions([ + Tables\Actions\ViewAction::make(), + ]); + } + + public static function form(Form $form): Form + { + return $form->schema([]); + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListToolRequests::route('/'), + 'view' => Pages\ViewToolRequest::route('/{record}'), + ]; + } +} diff --git a/app/Filament/Resources/ToolRequestResource/Pages/ListToolRequests.php b/app/Filament/Resources/ToolRequestResource/Pages/ListToolRequests.php new file mode 100644 index 000000000..3319a031a --- /dev/null +++ b/app/Filament/Resources/ToolRequestResource/Pages/ListToolRequests.php @@ -0,0 +1,11 @@ +label('Send Quotation') + ->form([ + TextInput::make('amount') + ->numeric() + ->required(), + Select::make('account_id') + ->label('Select Bank Account') + ->relationship('account', 'bank_name') + ->native(false) + ->required(), + Textarea::make('note'), + ]) + ->action(function (array $data) { + $record = $this->record; + + $account = \App\Models\Account::findOrFail($data['account_id']); + + // Update the relation + $record->update([ + 'account_id' => $account->id, + 'status' => 'quoted', + 'quotation_sent_at' => now(), + ]); + + Mail::to($record->email)->send(new SendToolQuotation($record, $account, $data)); + + Notification::make() + ->title('Quotation sent') + ->success() + ->send(); + }) + ->visible(fn ($record) => $record->status === 'pending'), + ]; + } + + public function infolist(\Filament\Infolists\Infolist $infolist): \Filament\Infolists\Infolist + { + return $infolist->schema([ + \Filament\Infolists\Components\TextEntry::make('name'), + \Filament\Infolists\Components\TextEntry::make('email'), + \Filament\Infolists\Components\TextEntry::make('organization'), + \Filament\Infolists\Components\TextEntry::make('message')->columnSpanFull(), + \Filament\Infolists\Components\TextEntry::make('status')->badge(), + \Filament\Infolists\Components\TextEntry::make('quotation_sent_at')->dateTime(), + \Filament\Infolists\Components\TextEntry::make('tool.name_en')->label('Tool'), + \Filament\Infolists\Components\TextEntry::make('created_at')->dateTime(), + ]); + } +} diff --git a/app/Filament/Resources/ToolResource.php b/app/Filament/Resources/ToolResource.php new file mode 100644 index 000000000..7aa839f86 --- /dev/null +++ b/app/Filament/Resources/ToolResource.php @@ -0,0 +1,163 @@ +schema([ + Forms\Components\Tabs::make(__('filament.form.translations')) + ->tabs([ + Forms\Components\Tabs\Tab::make(__('filament.form.english')) + ->schema([ + Forms\Components\TextInput::make('name_en') + ->label(__('filament.fields.name_en')) + ->required() + ->maxLength(255), + Forms\Components\Textarea::make('description_en') + ->label(__('filament.fields.description_en')) + ->maxLength(65535) + ->columnSpanFull(), + ]), + Forms\Components\Tabs\Tab::make(__('filament.form.arabic')) + ->schema([ + Forms\Components\TextInput::make('name_ar') + ->label(__('filament.fields.name_ar')) + ->required() + ->maxLength(255), + Forms\Components\Textarea::make('description_ar') + ->label(__('filament.fields.description_ar')) + ->maxLength(65535) + ->columnSpanFull(), + ]), + ]) + ->columnSpanFull(), + Forms\Components\FileUpload::make('image') + ->label(__('filament.fields.image')) + ->image() + ->directory('tools') + ->visibility('public') + ->columnSpanFull(), + Forms\Components\Select::make('status') + ->label(__('filament.fields.status')) + ->options([ + 'active' => __('filament.status.active'), + 'inactive' => __('filament.status.inactive'), + ]) + ->default('active') + ->required(), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\ImageColumn::make('image') + ->label(__('filament.fields.image')), + Tables\Columns\TextColumn::make('name_en') + ->label(__('filament.fields.name_en')) + ->searchable(), + Tables\Columns\TextColumn::make('name_ar') + ->label(__('filament.fields.name_ar')) + ->searchable(), + Tables\Columns\BadgeColumn::make('status') + ->label(__('filament.fields.status')) + ->colors([ + 'danger' => 'inactive', + 'success' => 'active', + ]) + ->formatStateUsing(fn (string $state): string => __("filament.status.{$state}")), + Tables\Columns\TextColumn::make('created_at') + ->label(__('filament.fields.created_at')) + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('updated_at') + ->label(__('filament.fields.updated_at')) + ->dateTime() + ->sortable() + ->toggleable(isToggledHiddenByDefault: true), + ]) + ->filters([ + Tables\Filters\SelectFilter::make('status') + ->label(__('filament.fields.status')) + ->options([ + 'active' => __('filament.status.active'), + 'inactive' => __('filament.status.inactive'), + ]), + ]) + ->actions([ + Tables\Actions\ViewAction::make() + ->label(__('filament.actions.view')), + Tables\Actions\EditAction::make() + ->label(__('filament.actions.edit')), + Tables\Actions\DeleteAction::make() + ->label(__('filament.actions.delete')), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make() + ->label(__('filament.actions.delete')), + ]), + ]) + ->emptyStateHeading(__('filament.empty_states.no_tools')) + ->emptyStateDescription(__('filament.empty_states.start_by_creating', ['resource' => __('filament.resources.tool.label')])) + ->emptyStateActions([ + Tables\Actions\CreateAction::make() + ->label(__('filament.empty_states.create_first', ['resource' => __('filament.resources.tool.label')])), + ]); + } + + public static function getRelations(): array + { + return [ + DomainRelationManager::class, + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListTools::route('/'), + 'create' => Pages\CreateTool::route('/create'), + 'edit' => Pages\EditTool::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/ToolResource/Pages/CreateTool.php b/app/Filament/Resources/ToolResource/Pages/CreateTool.php new file mode 100644 index 000000000..555e550ee --- /dev/null +++ b/app/Filament/Resources/ToolResource/Pages/CreateTool.php @@ -0,0 +1,12 @@ +schema([ + Forms\Components\Tabs::make('Translations') + ->tabs([ + Forms\Components\Tabs\Tab::make('English') + ->schema([ + Forms\Components\TextInput::make('name_en') + ->label('Name (English)') + ->required() + ->maxLength(255), + Forms\Components\Textarea::make('description_en') + ->label('Description (English)') + ->maxLength(65535) + ->columnSpanFull(), + ]), + Forms\Components\Tabs\Tab::make('Arabic') + ->schema([ + Forms\Components\TextInput::make('name_ar') + ->label('Name (Arabic)') + ->required() + ->maxLength(255), + Forms\Components\Textarea::make('description_ar') + ->label('Description (Arabic)') + ->maxLength(65535) + ->columnSpanFull(), + ]), + ]) + ->columnSpanFull(), + Forms\Components\TextInput::make('order') + ->required() + ->numeric() + ->default(0), + Forms\Components\Select::make('status') + ->options([ + 'active' => 'Active', + 'inactive' => 'Inactive', + ]) + ->default('active') + ->required(), + ]); + } + + public function table(Table $table): Table + { + return $table + ->recordTitleAttribute('name') + ->columns([ + Tables\Columns\TextColumn::make('name') + ->label('Name'), + Tables\Columns\TextColumn::make('order') + ->sortable(), + Tables\Columns\BadgeColumn::make('status') + ->colors([ + 'danger' => 'inactive', + 'success' => 'active', + ]), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]) + ->reorderable('order') + ->defaultSort('order'); + } +} diff --git a/app/Filament/Resources/ToolSubscriptionResource.php b/app/Filament/Resources/ToolSubscriptionResource.php new file mode 100644 index 000000000..6709c73f5 --- /dev/null +++ b/app/Filament/Resources/ToolSubscriptionResource.php @@ -0,0 +1,122 @@ +schema([ + Forms\Components\Select::make('user_id') + ->relationship('user', 'name') +// ->searchable() + ->required() + ->native(false), + Forms\Components\Select::make('tool_id') + ->relationship('tool', 'name_en') +// ->searchable() + ->required() + ->native(false), + Forms\Components\Select::make('plan_type') + ->options([ + 'free' => 'Free', + 'premium' => 'Premium', + ]) + ->required()->native(false), + Forms\Components\Select::make('status') + ->options([ + 'active' => 'Active', + 'inactive' => 'Inactive', + 'expired' => 'Expired', + ])->native(false) + ->required(), + Forms\Components\DateTimePicker::make('started_at') + ->required()->native(false), + Forms\Components\DateTimePicker::make('expires_at') + ->native(false), + Forms\Components\KeyValue::make('features') + ->columnSpanFull(), + Forms\Components\TextInput::make('amount') + ->numeric() + ->columnSpanFull(), + Forms\Components\TextInput::make('currency') + ->maxLength(3) + ->columnSpanFull(), + ]); + } + + public static function table(Table $table): Table + { + return $table->columns([ + Tables\Columns\TextColumn::make('user.name') + ->label('User') + ->sortable() + ->searchable(), + Tables\Columns\TextColumn::make('tool.name_en') + ->label('Tool') + ->sortable() + ->searchable(), + Tables\Columns\BadgeColumn::make('plan_type') + ->colors([ + 'primary' => 'free', + 'success' => 'premium', + ]), + Tables\Columns\BadgeColumn::make('status') + ->colors([ + 'success' => 'active', + 'danger' => 'inactive', + 'warning' => 'expired', + ]), + Tables\Columns\TextColumn::make('started_at') + ->dateTime() + ->sortable(), + Tables\Columns\TextColumn::make('expires_at') + ->dateTime() + ->sortable(), + ]) + ->filters([ + Tables\Filters\SelectFilter::make('plan_type') + ->options([ + 'free' => 'Free', + 'premium' => 'Premium', + ]), + Tables\Filters\SelectFilter::make('status') + ->options([ + 'active' => 'Active', + 'inactive' => 'Inactive', + 'expired' => 'Expired', + ]), + ]) + ->actions([ + Tables\Actions\ViewAction::make(), + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]); + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListToolSubscriptions::route('/'), + 'create' => Pages\CreateToolSubscription::route('/create'), + 'edit' => Pages\EditToolSubscription::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/ToolSubscriptionResource/Pages/CreateToolSubscription.php b/app/Filament/Resources/ToolSubscriptionResource/Pages/CreateToolSubscription.php new file mode 100644 index 000000000..cc2e83eb5 --- /dev/null +++ b/app/Filament/Resources/ToolSubscriptionResource/Pages/CreateToolSubscription.php @@ -0,0 +1,10 @@ +schema([ + Forms\Components\Section::make(__('filament.form.basic_information')) + ->schema([ + Forms\Components\TextInput::make('name') + ->label(__('filament.fields.name')) + ->required() + ->maxLength(255), + Forms\Components\TextInput::make('email') + ->label(__('filament.fields.email')) + ->email() + ->required() + ->maxLength(255) + ->unique(ignoreRecord: true), + Forms\Components\DateTimePicker::make('email_verified_at') + ->label(__('filament.fields.email_verified_at')), + ]) + ->columns(2), + + Forms\Components\CheckboxList::make('roles') + ->label(__('filament-shield::filament-shield.field.permissions')) + ->relationship('roles', 'name') + ->searchable(), + + Forms\Components\Section::make(__('filament.form.subscription_information')) + ->relationship('subscription') + ->schema([ + Forms\Components\Select::make('plan_type') + ->label(__('filament.fields.plan_type')) + ->options([ + 'free' => __('filament.plans.free'), + 'premium' => __('filament.plans.premium'), + ]) + ->required(), + Forms\Components\Select::make('status') + ->label(__('filament.fields.status')) + ->options([ + 'active' => __('filament.status.active'), + 'expired' => __('filament.status.expired'), + 'cancelled' => __('filament.status.cancelled'), + 'pending' => __('filament.status.pending'), + ]) + ->required(), + Forms\Components\DateTimePicker::make('started_at') + ->label(__('filament.fields.started_at')), + Forms\Components\DateTimePicker::make('expires_at') + ->label(__('filament.fields.completed_at')), + Forms\Components\TextInput::make('amount') + ->label(__('filament.fields.value')) + ->numeric() + ->prefix('$'), + Forms\Components\Textarea::make('notes') + ->label(__('filament.fields.notes')) + ->maxLength(65535), + ]) + ->columns(2), + + Forms\Components\Section::make(__('filament.form.user_details')) + ->relationship('details') + ->schema([ + Forms\Components\TextInput::make('phone') + ->label(__('filament.fields.phone')) + ->tel(), + Forms\Components\TextInput::make('company_name') + ->label(__('filament.fields.company_name')) + ->maxLength(255), + Forms\Components\Select::make('company_type') + ->label(__('filament.fields.company_type')) + ->options([ + 'commercial' => __('filament.company_types.commercial'), + 'government' => __('filament.company_types.government'), + 'service' => __('filament.company_types.service'), + ]), + Forms\Components\TextInput::make('position') + ->label(__('filament.fields.position')) + ->maxLength(255), + Forms\Components\TextInput::make('city') + ->label(__('filament.fields.city')) + ->maxLength(255), + Forms\Components\TextInput::make('country') + ->label(__('filament.fields.country')) + ->maxLength(255), + Forms\Components\TextInput::make('website') + ->label(__('filament.fields.website')) + ->url(), + Forms\Components\Toggle::make('marketing_emails') + ->label(__('filament.fields.marketing_emails')), + Forms\Components\Toggle::make('newsletter_subscription') + ->label(__('filament.fields.newsletter_subscription')), + ]) + ->columns(2), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('name') + ->label(__('filament.fields.name')) + ->searchable() + ->sortable(), + Tables\Columns\TextColumn::make('email') + ->label(__('filament.fields.email')) + ->searchable() + ->sortable(), + Tables\Columns\TextColumn::make('details.company_name') + ->label(__('filament.fields.company')) + ->searchable(), + + // Plan type with Arabic translation + Tables\Columns\TextColumn::make('subscription.plan_type') + ->label(__('filament.fields.plan_type')) + ->badge() + ->color(fn (string $state): string => match ($state) { + 'free' => 'gray', + 'premium' => 'success', + default => 'gray', + }) + ->formatStateUsing(fn (?string $state): string => + $state ? __("filament.plans.{$state}") : __('filament.plans.free') + ), + + // Status with Arabic translation + Tables\Columns\TextColumn::make('subscription.status') + ->label(__('filament.fields.status')) + ->badge() + ->color(fn (string $state): string => match ($state) { + 'active' => 'success', + 'expired' => 'danger', + 'cancelled' => 'warning', + 'pending' => 'info', + default => 'gray', + }) + ->formatStateUsing(fn (?string $state): string => + $state ? __("filament.status.{$state}") : __('filament.status.active') + ), + + Tables\Columns\TextColumn::make('assessments_count') + ->label(__('filament.fields.assessments_count')) + ->counts('assessments'), + Tables\Columns\TextColumn::make('created_at') + ->label(__('filament.fields.created_at')) + ->dateTime() + ->sortable() + ->toggleable(), + ]) + ->filters([ + // Plan type filter with Arabic options + Tables\Filters\SelectFilter::make('subscription.plan_type') + ->label(__('filament.fields.plan_type')) + ->relationship('subscription', 'plan_type') + ->options([ + 'free' => __('filament.plans.free'), + 'premium' => __('filament.plans.premium'), + ]), + + // Status filter with Arabic options + Tables\Filters\SelectFilter::make('subscription.status') + ->label(__('filament.fields.status')) + ->relationship('subscription', 'status') + ->options([ + 'active' => __('filament.status.active'), + 'expired' => __('filament.status.expired'), + 'cancelled' => __('filament.status.cancelled'), + 'pending' => __('filament.status.pending'), + ]), + ]) + ->actions([ + Tables\Actions\ViewAction::make() + ->label(__('filament.actions.view')), + Tables\Actions\EditAction::make() + ->label(__('filament.actions.edit')), + + // Custom action with Arabic label + Tables\Actions\Action::make('upgrade_to_premium') + ->label(__('filament.actions.upgrade_to_premium')) + ->icon('heroicon-o-star') + ->color('success') + ->action(function (User $record) { + $record->subscription()->updateOrCreate( + ['user_id' => $record->id], + [ + 'plan_type' => 'premium', + 'status' => 'active', + 'started_at' => now(), + 'expires_at' => now()->addYear(), + ] + ); + $record->assignRole('premium'); + }) + ->visible(fn (User $record) => $record->isFree()), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make() + ->label(__('filament.actions.delete')) + ->requiresConfirmation(), + ]) + ->defaultSort('created_at', 'desc') + ->emptyStateHeading(__('filament.empty_states.no_users')) + ->emptyStateDescription(__('filament.empty_states.start_by_creating', ['resource' => __('filament.resources.user.label')])); + } + + public static function getPages(): array + { + return [ + 'index' => UserResource\Pages\ListUsers::route('/'), + 'create' => UserResource\Pages\CreateUser::route('/create'), + 'view' => UserResource\Pages\ViewUser::route('/{record}'), + 'edit' => UserResource\Pages\EditUser::route('/{record}/edit'), + ]; + } + + public static function getEloquentQuery(): Builder + { + return parent::getEloquentQuery() + ->with(['details', 'subscription', 'assessments']); + } +} diff --git a/app/Filament/Resources/UserResource/Pages/CreateUser.php b/app/Filament/Resources/UserResource/Pages/CreateUser.php new file mode 100644 index 000000000..052479806 --- /dev/null +++ b/app/Filament/Resources/UserResource/Pages/CreateUser.php @@ -0,0 +1,31 @@ +record->details()->create([ + 'preferred_language' => 'en', + 'marketing_emails' => true, + ]); + + // Create default free subscription + $this->record->subscriptions()->create([ + 'plan_type' => 'free', + 'status' => 'active', + 'started_at' => now(), + ]); + + // Assign free role + $this->record->assignRole('free'); + } +} diff --git a/app/Filament/Resources/UserResource/Pages/EditUser.php b/app/Filament/Resources/UserResource/Pages/EditUser.php new file mode 100644 index 000000000..b651cf09e --- /dev/null +++ b/app/Filament/Resources/UserResource/Pages/EditUser.php @@ -0,0 +1,76 @@ +label('Send Password Reset') + ->icon('heroicon-o-key') + ->color('warning') + ->action(function () { + // Send password reset email + $this->record->sendPasswordResetNotification( + app('auth.password.broker')->createToken($this->record) + ); + + $this->notify('success', 'Password reset email sent successfully!'); + }), + Actions\Action::make('toggle_subscription') + ->label(fn () => $this->record->isPremium() ? 'Downgrade to Free' : 'Upgrade to Premium') + ->icon(fn () => $this->record->isPremium() ? 'heroicon-o-arrow-down' : 'heroicon-o-arrow-up') + ->color(fn () => $this->record->isPremium() ? 'warning' : 'success') + ->action(function () { + $subscription = $this->record->subscription; + + if ($this->record->isPremium()) { + // Downgrade to free + $subscription->update([ + 'plan_type' => 'free', + 'expires_at' => now(), + 'status' => 'cancelled', + 'cancelled_at' => now(), + 'cancelled_reason' => 'Downgraded by admin' + ]); + $this->record->syncRoles(['free']); +// $this->notify('success', 'User downgraded to free plan'); + } else { + // Upgrade to premium + if ($subscription) { + $subscription->update([ + 'plan_type' => 'premium', + 'status' => 'active', + 'expires_at' => now()->addYear(), + 'cancelled_at' => null, + 'cancelled_reason' => null + ]); + } else { + $this->record->subscriptions()->create([ + 'plan_type' => 'premium', + 'status' => 'active', + 'started_at' => now(), + 'expires_at' => now()->addYear(), + ]); + } + $this->record->syncRoles(['premium']); +// $this->notify('success', 'User upgraded to premium plan'); + } + }) + ->requiresConfirmation() + ->modalDescription(fn () => $this->record->isPremium() + ? 'This will downgrade the user to free plan and limit their access.' + : 'This will upgrade the user to premium plan with full access.'), + ]; + } +} diff --git a/app/Filament/Resources/UserResource/Pages/ListUsers.php b/app/Filament/Resources/UserResource/Pages/ListUsers.php new file mode 100644 index 000000000..30f91d4c6 --- /dev/null +++ b/app/Filament/Resources/UserResource/Pages/ListUsers.php @@ -0,0 +1,52 @@ +label('Export Users') + ->icon('heroicon-o-document-arrow-down') + ->color('info') + ->action(function () { + // Export users logic here + $this->notify('info', 'Export functionality to be implemented'); + }), + ]; + } + + public function getTabs(): array + { + return [ + 'all' => Tab::make('All Users'), + 'free' => Tab::make('Free Users') + ->modifyQueryUsing(fn (Builder $query) => + $query->whereHas('subscription', fn ($q) => $q->where('plan_type', 'free')) + ), + 'premium' => Tab::make('Premium Users') + ->modifyQueryUsing(fn (Builder $query) => + $query->whereHas('subscription', fn ($q) => $q->where('plan_type', 'premium')->where('status', 'active')) + ), + 'expired' => Tab::make('Expired') + ->modifyQueryUsing(fn (Builder $query) => + $query->whereHas('subscription', fn ($q) => $q->where('status', 'expired')) + ), + 'recent' => Tab::make('Recent') + ->modifyQueryUsing(fn (Builder $query) => + $query->where('created_at', '>=', now()->subWeek()) + ), + ]; + } +} diff --git a/app/Filament/Resources/UserResource/Pages/ViewUser.php b/app/Filament/Resources/UserResource/Pages/ViewUser.php new file mode 100644 index 000000000..2a4ef1b7c --- /dev/null +++ b/app/Filament/Resources/UserResource/Pages/ViewUser.php @@ -0,0 +1,80 @@ +schema([ + Infolists\Components\Section::make('User Information') + ->schema([ + Infolists\Components\TextEntry::make('name'), + Infolists\Components\TextEntry::make('email'), + Infolists\Components\TextEntry::make('email_verified_at') + ->dateTime(), + Infolists\Components\TextEntry::make('created_at') + ->dateTime(), + ]) + ->columns(2), + + Infolists\Components\Section::make('Contact Details') + ->schema([ + Infolists\Components\TextEntry::make('details.phone'), + Infolists\Components\TextEntry::make('details.company_name'), + Infolists\Components\TextEntry::make('details.company_type') + ->badge(), + Infolists\Components\TextEntry::make('details.position'), + Infolists\Components\TextEntry::make('details.city'), + Infolists\Components\TextEntry::make('details.country'), + Infolists\Components\TextEntry::make('details.website') + ->url(), + ]) + ->columns(2), + + Infolists\Components\Section::make('Subscription') + ->schema([ + Infolists\Components\TextEntry::make('subscription.plan_type') + ->badge(), + Infolists\Components\TextEntry::make('subscription.status') + ->badge(), + Infolists\Components\TextEntry::make('subscription.started_at') + ->dateTime(), + Infolists\Components\TextEntry::make('subscription.expires_at') + ->dateTime(), + Infolists\Components\TextEntry::make('subscription.amount') + ->money('USD'), + ]) + ->columns(2), + + Infolists\Components\Section::make('Activity') + ->schema([ + Infolists\Components\TextEntry::make('assessments_count') + ->label('Total Assessments') + ->state(fn ($record) => $record->assessments()->count()), + Infolists\Components\TextEntry::make('last_assessment') + ->label('Last Assessment') + ->state(fn ($record) => $record->assessments()->latest()->first()?->created_at?->diffForHumans() ?? 'Never'), + Infolists\Components\TextEntry::make('roles') + ->state(fn ($record) => $record->roles->pluck('name')->join(', ')), + ]) + ->columns(3), + ]); + } +} diff --git a/app/Filament/Widgets/DeviceBreakdownChart.php b/app/Filament/Widgets/DeviceBreakdownChart.php new file mode 100644 index 000000000..90da6ee0c --- /dev/null +++ b/app/Filament/Widgets/DeviceBreakdownChart.php @@ -0,0 +1,106 @@ + 'Last 7 days', + '30d' => 'Last 30 days', + '90d' => 'Last 3 months', + '1y' => 'This year', + ]; + } + + protected function getData(): array + { + $startDate = match ($this->filter) { + '7d' => now()->subDays(7), + '30d' => now()->subDays(30), + '90d' => now()->subDays(90), + '1y' => now()->subYear(), + default => now()->subDays(30), + }; + + $deviceData = GuestSession::whereBetween('created_at', [$startDate, now()]) + ->whereNotNull('device_type') + ->selectRaw('device_type, COUNT(*) as count') + ->groupBy('device_type') + ->pluck('count', 'device_type') + ->toArray(); + + $labels = array_keys($deviceData); + $data = array_values($deviceData); + + return [ + 'datasets' => [ + [ + 'label' => 'Device Usage', + 'data' => $data, + 'backgroundColor' => [ + '#3B82F6', // Blue for Desktop + '#10B981', // Green for Mobile + '#F59E0B', // Amber for Tablet + '#8B5CF6', // Purple for Unknown + ], + 'borderColor' => [ + '#2563EB', + '#059669', + '#D97706', + '#7C3AED', + ], + 'borderWidth' => 2, + ], + ], + 'labels' => $labels, + ]; + } + + protected function getType(): string + { + return 'doughnut'; + } + + protected function getOptions(): array + { + return [ + 'plugins' => [ + 'legend' => [ + 'display' => true, + 'position' => 'bottom', + ], + 'tooltip' => [ + 'enabled' => true, + 'backgroundColor' => 'rgba(0, 0, 0, 0.8)', + 'titleColor' => '#ffffff', + 'bodyColor' => '#ffffff', + 'callbacks' => [ + 'label' => 'function(context) { + const total = context.dataset.data.reduce((a, b) => a + b, 0); + const percentage = ((context.parsed / total) * 100).toFixed(1); + return context.label + ": " + context.parsed + " (" + percentage + "%)"; + }' + ] + ], + ], + 'responsive' => true, + 'maintainAspectRatio' => false, + ]; + } +} diff --git a/app/Filament/Widgets/GeographicDistributionChart.php b/app/Filament/Widgets/GeographicDistributionChart.php new file mode 100644 index 000000000..893abbe12 --- /dev/null +++ b/app/Filament/Widgets/GeographicDistributionChart.php @@ -0,0 +1,109 @@ + 'Last 7 days', + '30d' => 'Last 30 days', + '90d' => 'Last 3 months', + '1y' => 'This year', + ]; + } + + protected function getData(): array + { + $startDate = match ($this->filter) { + '7d' => now()->subDays(7), + '30d' => now()->subDays(30), + '90d' => now()->subDays(90), + '1y' => now()->subYear(), + default => now()->subDays(30), + }; + + $countryData = GuestSession::whereBetween('created_at', [$startDate, now()]) + ->whereNotNull('country') + ->selectRaw('country, COUNT(*) as count') + ->groupBy('country') + ->orderByDesc('count') + ->limit(10) + ->pluck('count', 'country') + ->toArray(); + + $labels = array_keys($countryData); + $data = array_values($countryData); + + return [ + 'datasets' => [ + [ + 'label' => 'Sessions by Country', + 'data' => $data, + 'backgroundColor' => [ + '#3B82F6', '#10B981', '#F59E0B', '#EF4444', '#8B5CF6', + '#EC4899', '#14B8A6', '#F97316', '#6366F1', '#84CC16' + ], + 'borderColor' => [ + '#2563EB', '#059669', '#D97706', '#DC2626', '#7C3AED', + '#DB2777', '#0D9488', '#EA580C', '#4F46E5', '#65A30D' + ], + 'borderWidth' => 1, + ], + ], + 'labels' => $labels, + ]; + } + + protected function getType(): string + { + return 'bar'; + } + + protected function getOptions(): array + { + return [ + 'plugins' => [ + 'legend' => [ + 'display' => false, + ], + 'tooltip' => [ + 'enabled' => true, + 'backgroundColor' => 'rgba(0, 0, 0, 0.8)', + 'titleColor' => '#ffffff', + 'bodyColor' => '#ffffff', + ], + ], + 'responsive' => true, + 'maintainAspectRatio' => false, + 'scales' => [ + 'y' => [ + 'beginAtZero' => true, + 'grid' => [ + 'color' => 'rgba(0, 0, 0, 0.1)', + ], + ], + 'x' => [ + 'grid' => [ + 'display' => false, + ], + ], + ], + ]; + } +} diff --git a/app/Filament/Widgets/GuestAnalyticsOverview.php b/app/Filament/Widgets/GuestAnalyticsOverview.php new file mode 100644 index 000000000..d1800d08b --- /dev/null +++ b/app/Filament/Widgets/GuestAnalyticsOverview.php @@ -0,0 +1,81 @@ +subDays(30); + $endDate = now(); + + // Get basic metrics + $totalSessions = GuestSession::whereBetween('created_at', [$startDate, $endDate])->count(); + $uniqueUsers = GuestSession::whereBetween('created_at', [$startDate, $endDate]) + ->distinct('email')->count(); + $completedAssessments = GuestSession::whereBetween('created_at', [$startDate, $endDate]) + ->whereNotNull('completed_at')->count(); + $conversionRate = $totalSessions > 0 ? ($completedAssessments / $totalSessions) * 100 : 0; + + // Get previous period for comparison + $previousStartDate = now()->subDays(60); + $previousEndDate = now()->subDays(30); + $previousTotalSessions = GuestSession::whereBetween('created_at', [$previousStartDate, $previousEndDate])->count(); + $previousCompletedAssessments = GuestSession::whereBetween('created_at', [$previousStartDate, $previousEndDate]) + ->whereNotNull('completed_at')->count(); + + // Calculate trends + $sessionsChange = $previousTotalSessions > 0 + ? (($totalSessions - $previousTotalSessions) / $previousTotalSessions) * 100 + : 0; + $completionChange = $previousCompletedAssessments > 0 + ? (($completedAssessments - $previousCompletedAssessments) / $previousCompletedAssessments) * 100 + : 0; + + return [ + Stat::make('Total Guest Sessions', number_format($totalSessions)) + ->description($sessionsChange >= 0 ? 'Increased by ' . number_format(abs($sessionsChange), 1) . '%' : 'Decreased by ' . number_format(abs($sessionsChange), 1) . '%') + ->descriptionIcon($sessionsChange >= 0 ? 'heroicon-m-arrow-trending-up' : 'heroicon-m-arrow-trending-down') + ->color($sessionsChange >= 0 ? 'success' : 'danger') + ->chart($this->getSessionsChart()), + + Stat::make('Unique Users', number_format($uniqueUsers)) + ->description('Last 30 days') + ->descriptionIcon('heroicon-m-user-group') + ->color('info'), + + Stat::make('Completed Assessments', number_format($completedAssessments)) + ->description($completionChange >= 0 ? 'Increased by ' . number_format(abs($completionChange), 1) . '%' : 'Decreased by ' . number_format(abs($completionChange), 1) . '%') + ->descriptionIcon($completionChange >= 0 ? 'heroicon-m-arrow-trending-up' : 'heroicon-m-arrow-trending-down') + ->color($completionChange >= 0 ? 'success' : 'warning'), + + Stat::make('Conversion Rate', number_format($conversionRate, 1) . '%') + ->description('Sessions to completion') + ->descriptionIcon('heroicon-m-chart-bar') + ->color($conversionRate >= 70 ? 'success' : ($conversionRate >= 50 ? 'warning' : 'danger')), + ]; + } + + private function getSessionsChart(): array + { + return GuestSession::selectRaw('DATE(created_at) as date, COUNT(*) as count') + ->whereBetween('created_at', [now()->subDays(7), now()]) + ->groupBy('date') + ->orderBy('date') + ->pluck('count') + ->toArray(); + } +} diff --git a/app/Filament/Widgets/GuestSessionsTable.php b/app/Filament/Widgets/GuestSessionsTable.php new file mode 100644 index 000000000..9e522b164 --- /dev/null +++ b/app/Filament/Widgets/GuestSessionsTable.php @@ -0,0 +1,113 @@ +query( + GuestSession::query() + ->with(['assessment.tool']) + ->latest() + ->limit(10) + ) + ->columns([ + Tables\Columns\TextColumn::make('name') + ->label('Name') + ->searchable() + ->sortable(), + + Tables\Columns\TextColumn::make('email') + ->label('Email') + ->searchable() + ->sortable(), + + Tables\Columns\TextColumn::make('assessment.tool.name_en') + ->label('Assessment Tool') + ->sortable(), + + Tables\Columns\TextColumn::make('device_type') + ->label('Device') + ->badge() + ->color(fn (string $state): string => match ($state) { + 'Mobile' => 'info', + 'Desktop' => 'success', + 'Tablet' => 'warning', + default => 'gray', + }) + ->icon(fn (string $state): string => match ($state) { + 'Mobile' => 'heroicon-m-device-phone-mobile', + 'Desktop' => 'heroicon-m-computer-desktop', + 'Tablet' => 'heroicon-m-device-tablet', + default => 'heroicon-m-question-mark-circle', + }), + + Tables\Columns\TextColumn::make('browser') + ->label('Browser') + ->formatStateUsing(fn (string $state, GuestSession $record): string => + $state . ($record->browser_version ? ' ' . $record->browser_version : '') + ), + + Tables\Columns\TextColumn::make('country') + ->label('Location') + ->formatStateUsing(fn (GuestSession $record): string => + $record->city && $record->country + ? $record->city . ', ' . $record->country + : ($record->country ?? 'Unknown') + ) + ->icon('heroicon-m-map-pin'), + + Tables\Columns\TextColumn::make('completed_at') + ->label('Status') + ->badge() + ->formatStateUsing(fn (?string $state): string => $state ? 'Completed' : 'Incomplete') + ->color(fn (?string $state): string => $state ? 'success' : 'warning'), + + Tables\Columns\TextColumn::make('created_at') + ->label('Started At') + ->dateTime() + ->sortable(), + ]) + ->actions([ + Tables\Actions\Action::make('view_session') + ->label('View Details') + ->icon('heroicon-m-eye') + ->color('info') + ->modalHeading(fn (GuestSession $record): string => 'Session Details - ' . $record->name) + ->modalContent(fn (GuestSession $record): \Illuminate\Contracts\View\View => view( + 'filament.widgets.guest-session-details', + ['session' => $record] + )), + + Tables\Actions\Action::make('view_assessment') + ->label('View Assessment') + ->icon('heroicon-m-document-text') + ->color('success') + ->url(fn (GuestSession $record): string => + route('guest.assessment.results', $record->assessment_id) + ) + ->openUrlInNewTab() + ->visible(fn (GuestSession $record): bool => $record->completed_at !== null), + ]) + ->defaultSort('created_at', 'desc') + ->striped() + ->emptyStateIcon('heroicon-o-user-group') + ->emptyStateHeading('No guest sessions yet') + ->emptyStateDescription('Guest sessions will appear here once users start taking assessments.'); + } +} diff --git a/app/Filament/Widgets/SessionsTrendChart.php b/app/Filament/Widgets/SessionsTrendChart.php new file mode 100644 index 000000000..07c29e40e --- /dev/null +++ b/app/Filament/Widgets/SessionsTrendChart.php @@ -0,0 +1,141 @@ + 'Last 7 days', + '30d' => 'Last 30 days', + '90d' => 'Last 3 months', + ]; + } + + protected function getData(): array + { + $days = match ($this->filter) { + '7d' => 7, + '30d' => 30, + '90d' => 90, + default => 30, + }; + + $startDate = now()->subDays($days); + $endDate = now(); + + // Get sessions data + $sessionsData = GuestSession::selectRaw('DATE(created_at) as date, COUNT(*) as total_sessions') + ->whereBetween('created_at', [$startDate, $endDate]) + ->groupBy('date') + ->orderBy('date') + ->pluck('total_sessions', 'date') + ->toArray(); + + // Get completed sessions data + $completedData = GuestSession::selectRaw('DATE(created_at) as date, COUNT(*) as completed_sessions') + ->whereBetween('created_at', [$startDate, $endDate]) + ->whereNotNull('completed_at') + ->groupBy('date') + ->orderBy('date') + ->pluck('completed_sessions', 'date') + ->toArray(); + + // Generate date range + $period = CarbonPeriod::create($startDate, $endDate); + $labels = []; + $totalSessions = []; + $completedSessions = []; + + foreach ($period as $date) { + $dateString = $date->format('Y-m-d'); + $labels[] = $date->format('M d'); + $totalSessions[] = $sessionsData[$dateString] ?? 0; + $completedSessions[] = $completedData[$dateString] ?? 0; + } + + return [ + 'datasets' => [ + [ + 'label' => 'Total Sessions', + 'data' => $totalSessions, + 'backgroundColor' => 'rgba(59, 130, 246, 0.1)', + 'borderColor' => '#3B82F6', + 'borderWidth' => 2, + 'fill' => true, + 'tension' => 0.4, + ], + [ + 'label' => 'Completed Sessions', + 'data' => $completedSessions, + 'backgroundColor' => 'rgba(16, 185, 129, 0.1)', + 'borderColor' => '#10B981', + 'borderWidth' => 2, + 'fill' => true, + 'tension' => 0.4, + ], + ], + 'labels' => $labels, + ]; + } + + protected function getType(): string + { + return 'line'; + } + + protected function getOptions(): array + { + return [ + 'plugins' => [ + 'legend' => [ + 'display' => true, + 'position' => 'top', + ], + 'tooltip' => [ + 'enabled' => true, + 'backgroundColor' => 'rgba(0, 0, 0, 0.8)', + 'titleColor' => '#ffffff', + 'bodyColor' => '#ffffff', + 'mode' => 'index', + 'intersect' => false, + ], + ], + 'responsive' => true, + 'maintainAspectRatio' => false, + 'interaction' => [ + 'mode' => 'index', + 'intersect' => false, + ], + 'scales' => [ + 'y' => [ + 'beginAtZero' => true, + 'grid' => [ + 'color' => 'rgba(0, 0, 0, 0.1)', + ], + ], + 'x' => [ + 'grid' => [ + 'display' => false, + ], + ], + ], + ]; + } +} diff --git a/app/Http/Controllers/AssessmentController.php b/app/Http/Controllers/AssessmentController.php new file mode 100644 index 000000000..6445564b0 --- /dev/null +++ b/app/Http/Controllers/AssessmentController.php @@ -0,0 +1,371 @@ +user(); + + // Ensure the assessment belongs to the user (or user is admin) + if ($assessment->user_id !== $user->id && !$user->isAdmin()) { + abort(403, 'Unauthorized access to assessment.'); + } + + Log::info('Assessment submission started', $request->all()); + + $validated = $request->validate([ + 'responses' => 'required|array', + 'responses.*' => 'required|in:yes,no,na', + 'notes' => 'nullable|array', + 'notes.*' => 'nullable|string|max:1000', + ]); + + try { + DB::beginTransaction(); + + // Remove any existing responses to avoid duplicates + $assessment->responses()->delete(); + + // Save new responses + foreach ($validated['responses'] as $criterionId => $response) { + AssessmentResponse::create([ + 'assessment_id' => $assessment->id, + 'criterion_id' => $criterionId, + 'response' => $response, + 'notes' => $validated['notes'][$criterionId] ?? null, + ]); + } + + // Mark assessment as completed + $assessment->update([ + 'status' => 'completed', + 'completed_at' => now(), + ]); + + // Calculate results + $assessment->calculateResults(); + + DB::commit(); + + // Update user's assessment count in session/cache if needed + session(['user_assessments_count' => $user->assessments()->count()]); + + return redirect()->route('assessment.results', $assessment->id) + ->with('success', 'Assessment completed successfully!'); + + } catch (Exception $e) { + DB::rollBack(); + Log::error('Assessment submission failed', [ + 'error' => $e->getMessage(), + 'user_id' => $user->id + ]); + + return back()->withErrors([ + 'submit' => 'There was an error submitting your assessment. Please try again.' + ]); + } + } + + /** + * Show user's assessments with proper routing for free vs premium users + */ + public function index(Request $request) + { + $user = auth()->user(); + $locale = app()->getLocale(); + + // Load user relationships + $user->load(['details', 'subscription']); + + $assessments = Assessment::with(['tool']) + ->where('user_id', $user->id) + ->orderBy('created_at', 'desc') + ->get() + ->map(function ($assessment) use ($locale) { + $overallScore = null; + $resultsData = null; + if ($assessment->status === 'completed') { + $results = $assessment->getResults(); + $overallScore = $results['overall_percentage'] ?? null; + $resultsData = [ + 'yes_count' => $results['yes_count'] ?? 0, + 'no_count' => $results['no_count'] ?? 0, + 'na_count' => $results['na_count'] ?? 0, + 'score_percentage' => $results['overall_percentage'] ?? 0, + 'weighted_score' => $results['overall_percentage'] ?? 0, + ]; + } + + return [ + 'id' => $assessment->id, + 'title_en' => $assessment->title_en ?? $assessment->tool->name_en, + 'title_ar' => $assessment->title_ar ?? $assessment->tool->name_ar, + 'tool' => [ + 'id' => $assessment->tool->id, + 'name_en' => $assessment->tool->name_en, + 'name_ar' => $assessment->tool->name_ar, + 'description_en' => $assessment->tool->description_en, + 'description_ar' => $assessment->tool->description_ar, + 'image' => $assessment->tool->image ? asset('storage/' . $assessment->tool->image) : null, + ], + 'guest_name' => $assessment->name ?? $user->name, + 'guest_email' => $assessment->email ?? $user->email, + 'organization' => $assessment->organization, + 'status' => $assessment->status, + 'created_at' => $assessment->created_at->toISOString(), + 'updated_at' => $assessment->updated_at->toISOString(), + 'overall_score' => $overallScore, + 'completion_percentage' => $assessment->getCompletionPercentage(), + 'user_id' => $assessment->user_id, + 'results' => $resultsData, + ]; + }); + + $userLimits = [ + 'current_assessments' => $assessments->count(), + 'assessment_limit' => $user->getAssessmentLimit(), + 'can_create_more' => $user->canCreateAssessment(), + 'is_premium' => $user->isPremium(), + 'subscription_status' => $user->getSubscriptionStatus(), + ]; + + // Route to different pages based on user type + if ($user->isPremium() || $user->isAdmin()) { + // Premium users get the full dashboard assessment index + return Inertia::render('assessments/index', [ + 'assessments' => $assessments, + 'userLimits' => $userLimits, + 'locale' => $locale, + 'auth' => [ + 'user' => $user->getFullProfileData() + ], + ]); + } else { + // Free users get the simplified assessment index + return Inertia::render('FreeUserAssessmentIndex', [ + 'assessments' => $assessments, + 'userLimits' => $userLimits, + 'locale' => $locale, + 'auth' => [ + 'user' => [ + 'id' => $user->id, + 'name' => $user->name, + 'email' => $user->email, + 'details' => $user->details ? [ + 'company_name' => $user->details->company_name, + 'phone' => $user->details->phone, + ] : null, + ] + ], + ]); + } + } + + /** + * Show assessment results with different views for free vs premium + */ + public function results(Assessment $assessment) + { + $user = auth()->user(); + $locale = app()->getLocale(); + + // Check if user can access this assessment + if ($assessment->user_id !== $user->id) { + abort(403, 'You do not have permission to view this assessment.'); + } + + // Load assessment with all related data + $assessment->load([ + 'tool', + 'responses.criterion.category.domain', + 'responses.criterion.category', + 'responses.criterion' + ]); + + // Get the results using the existing method + $results = $assessment->getResults(); + + $assessmentData = [ + 'id' => $assessment->id, + 'title_en' => $assessment->title_en ?? $assessment->tool->name_en, + 'title_ar' => $assessment->title_ar ?? $assessment->tool->name_ar, + 'tool' => [ + 'id' => $assessment->tool->id, + 'name_en' => $assessment->tool->name_en, + 'name_ar' => $assessment->tool->name_ar, + ], + 'name' => $assessment->name ?? $user->name, + 'email' => $assessment->email ?? $user->email, + 'organization' => $assessment->organization, + 'status' => $assessment->status, + 'created_at' => $assessment->created_at->format('Y-m-d H:i:s'), + 'completed_at' => $assessment->completed_at?->format('Y-m-d H:i:s'), + ]; + + if ($user->isPremium() || $user->isAdmin()) { + // Premium users get full results page + return Inertia::render('assessment/results', [ + 'assessment' => $assessmentData, + 'results' => $results, + 'locale' => $locale, + 'userAccess' => [ + 'is_premium' => true, + 'pdf_report_level' => 'full', + 'can_access_advanced_features' => true, + 'subscription_status' => $user->getSubscriptionStatus(), + ], + ]); + } else { + // Free users get limited results page + return Inertia::render('assessment/FreeUserResults', [ + 'assessment' => $assessmentData, + 'results' => $results, + 'locale' => $locale, + 'userAccess' => [ + 'is_premium' => false, + 'pdf_report_level' => 'basic', + 'can_access_advanced_features' => false, + 'subscription_status' => $user->getSubscriptionStatus(), + ], + ]); + } + } + public function take(Assessment $assessment) + { + $user = auth()->user(); + + // Ensure user owns this assessment or is admin + if ($assessment->user_id !== $user->id && !$user->isAdmin()) { + abort(403, 'Unauthorized to access this assessment.'); + } + + // Load assessment with tool and all related data + $assessment->load([ + 'tool.domains.categories.criteria', + 'responses' + ]); + + // Prepare assessment data for frontend + $assessmentData = [ + 'id' => $assessment->id, + 'name' => $assessment->name, + 'email' => $assessment->email, + 'organization' => $assessment->organization, + 'status' => $assessment->status, + 'started_at' => $assessment->started_at, + 'tool' => [ + 'id' => $assessment->tool->id, + 'name_en' => $assessment->tool->name_en, + 'name_ar' => $assessment->tool->name_ar, + 'description_en' => $assessment->tool->description_en, + 'description_ar' => $assessment->tool->description_ar, + 'domains' => $assessment->tool->domains->map(function ($domain) { + return [ + 'id' => $domain->id, + 'name_en' => $domain->name_en, + 'name_ar' => $domain->name_ar, + 'categories' => $domain->categories->map(function ($category) { + return [ + 'id' => $category->id, + 'name_en' => $category->name_en, + 'name_ar' => $category->name_ar, + 'criteria' => $category->criteria->map(function ($criterion) { + return [ + + 'id' => $criterion->id, + 'text_en' => $criterion->name_en, + 'text_ar' => $criterion->name_ar, + 'requires_attachment' => $criterion->requires_attachment, + 'order' => $criterion->order, + ]; + }) + ]; + }) + ]; + }) + ], + 'responses' => $assessment->responses->keyBy('criterion_id') + ]; + + return Inertia::render('assessment/Take', [ + 'assessmentData' => $assessmentData, + 'locale' => app()->getLocale(), + 'auth' => [ + 'user' => [ + 'id' => $user->id, + 'name' => $user->name, + 'email' => $user->email, + ] + ] + ]); + } + + /** + * Save assessment response + */ + public function saveResponse(Request $request, Assessment $assessment) + { + $user = auth()->user(); + + // Ensure user owns this assessment + if ($assessment->user_id !== $user->id && !$user->isAdmin()) { + abort(403, 'Unauthorized to modify this assessment.'); + } + + $request->validate([ + 'criterion_id' => 'required|exists:criteria,id', + 'response' => 'required|in:yes,no,na', + 'notes' => 'nullable|string', + 'file_path' => 'nullable|string', + ]); + + // Save or update response + $assessment->responses()->updateOrCreate( + ['criterion_id' => $request->criterion_id], + [ + 'response' => $request->response, + 'notes' => $request->notes, + 'file_path' => $request->file_path, + ] + ); + + return response()->json(['success' => true]); + } + + /** + * Review assessment before submission + */ + public function review(Assessment $assessment) + { + $user = auth()->user(); + + // Ensure user owns this assessment + if ($assessment->user_id !== $user->id && !$user->isAdmin()) { + abort(403, 'Unauthorized to access this assessment.'); + } + + // Load assessment with responses + $assessment->load([ + 'tool', + 'responses.criterion' + ]); + + return Inertia::render('assessment/Review', [ + 'assessment' => $assessment, + 'locale' => app()->getLocale(), + ]); + } +} diff --git a/app/Http/Controllers/AssessmentPDFController.php b/app/Http/Controllers/AssessmentPDFController.php new file mode 100644 index 000000000..32fa8d7b7 --- /dev/null +++ b/app/Http/Controllers/AssessmentPDFController.php @@ -0,0 +1,620 @@ +authorizeAssessment($assessment); + + // Get language from request, default to 'en' + $language = $request->get('lang', 'en'); + + // Validate language + if (!in_array($language, ['en', 'ar'])) { + $language = 'en'; + } + + // Ensure assessment is completed + if ($assessment->status !== 'completed') { + return response()->json([ + 'error' => 'Assessment not completed', + 'message' => 'PDF can only be generated for completed assessments.' + ], 400); + } + + // Get assessment results + $results = $assessment->getResults(); + + // Translate domain names based on language + $results = $this->translateDomainNames($results, $language, $assessment); + + // Get user for company information + $user = $assessment->user; + + // Create PDF service with language + $pdfService = new AssessmentPDFService($language); + $pdfService->setAssessmentData($assessment, $results, $user); + + // Generate and return PDF + return $pdfService->generatePDF(); + + } catch (\Exception $e) { + Log::error('Failed to generate assessment PDF', [ + 'assessment_id' => $assessment->id, + 'language' => $language ?? 'unknown', + 'error' => $e->getMessage() + ]); + + return response()->json([ + 'error' => 'Failed to generate PDF', + 'message' => 'Please try again or contact support if the problem persists.' + ], 500); + } + } + + /** + * Save assessment PDF to storage + * Route: POST /assessment/{assessment}/pdf/save + */ + public function saveAssessmentPDF(Request $request, Assessment $assessment) + { + try { + // Check authorization + $this->authorizeAssessment($assessment); + + // Validate request + $validated = $request->validate([ + 'filename' => 'sometimes|string|max:255', + 'lang' => 'sometimes|in:en,ar' + ]); + + $language = $validated['lang'] ?? 'en'; + + // Ensure assessment is completed + if ($assessment->status !== 'completed') { + return response()->json([ + 'error' => 'Assessment not completed', + 'message' => 'PDF can only be generated for completed assessments.' + ], 400); + } + + // Get assessment results + $results = $assessment->getResults(); + + // Translate domain names + $results = $this->translateDomainNames($results, $language, $assessment); + + $user = $assessment->user; + + // Create PDF service with language + $pdfService = new AssessmentPDFService($language); + $pdfService->setAssessmentData($assessment, $results, $user); + + // Generate custom filename if not provided + $filename = $validated['filename'] ?? null; + + // Save the PDF + $filePath = $pdfService->savePDF($filename); + + return response()->json([ + 'success' => true, + 'message' => 'Assessment PDF generated and saved successfully', + 'file_path' => $filePath, + 'download_url' => Storage::url($filePath), + 'language' => $language, + 'assessment' => [ + 'id' => $assessment->id, + 'name' => $assessment->name, + 'tool' => $language === 'ar' ? $assessment->tool->name_ar : $assessment->tool->name_en, + 'overall_score' => $results['overall_percentage'] + ] + ]); + + } catch (\Exception $e) { + Log::error('Failed to save assessment PDF', [ + 'assessment_id' => $assessment->id, + 'language' => $language ?? 'unknown', + 'error' => $e->getMessage() + ]); + + return response()->json([ + 'error' => 'Failed to save PDF', + 'message' => $e->getMessage() + ], 500); + } + } + + /** + * Preview assessment PDF in browser + * Route: GET /assessment/{assessment}/pdf/preview + */ + public function previewAssessmentPDF(Request $request, Assessment $assessment) + { + try { + // Check authorization + $this->authorizeAssessment($assessment); + + // Get language from request + $language = $request->get('lang', 'en'); + if (!in_array($language, ['en', 'ar'])) { + $language = 'en'; + } + + // Get assessment results - allow preview even if not completed for testing + $results = $assessment->getResults(); + + // Translate domain names + $results = $this->translateDomainNames($results, $language, $assessment); + + $user = $assessment->user; + + // Create PDF service with language + $pdfService = new AssessmentPDFService($language); + $pdfService->setAssessmentData($assessment, $results, $user); + + // Generate HTML preview + $htmlContent = $pdfService->generatePreview(); + + return response($htmlContent) + ->header('Content-Type', 'text/html'); + + } catch (\Exception $e) { + Log::error('Failed to generate assessment PDF preview', [ + 'assessment_id' => $assessment->id, + 'language' => $language ?? 'unknown', + 'error' => $e->getMessage() + ]); + + return response()->view('errors.500', [ + 'message' => 'Failed to generate preview: ' . $e->getMessage() + ], 500); + } + } + + /** + * Get assessment PDF via API + * Route: GET /api/assessment/{assessment}/pdf + */ + public function getAssessmentPDFAPI(Request $request, Assessment $assessment) + { + try { + // Check authorization + $this->authorizeAssessment($assessment); + + // Validate request + $validated = $request->validate([ + 'format' => 'sometimes|in:download,base64,url', + 'include_metadata' => 'sometimes|boolean', + 'lang' => 'sometimes|in:en,ar' + ]); + + $format = $validated['format'] ?? 'base64'; + $includeMetadata = $validated['include_metadata'] ?? true; + $language = $validated['lang'] ?? 'en'; + + // Ensure assessment is completed for API requests + if ($assessment->status !== 'completed') { + return response()->json([ + 'error' => 'Assessment not completed', + 'message' => 'PDF can only be generated for completed assessments.' + ], 400); + } + + // Get assessment results + $results = $assessment->getResults(); + + // Translate domain names + $results = $this->translateDomainNames($results, $language, $assessment); + + $user = $assessment->user; + + // Create PDF service with language + $pdfService = new AssessmentPDFService($language); + $pdfService->setAssessmentData($assessment, $results, $user); + + // Prepare metadata if requested + $metadata = []; + if ($includeMetadata) { + $metadata = [ + 'assessment' => [ + 'id' => $assessment->id, + 'name' => $assessment->name, + 'email' => $assessment->email, + 'organization' => $assessment->organization, + 'status' => $assessment->status, + 'completed_at' => $assessment->completed_at, + 'language' => $language, + 'tool' => [ + 'id' => $assessment->tool->id, + 'name' => $language === 'ar' ? $assessment->tool->name_ar : $assessment->tool->name_en, + ] + ], + 'results' => [ + 'overall_percentage' => $results['overall_percentage'], + 'total_domains' => count($results['domain_results']), + 'total_criteria' => $results['total_criteria'], + 'completion_rate' => $results['applicable_criteria'] / $results['total_criteria'] * 100 + ] + ]; + } + + switch ($format) { + case 'download': + return $pdfService->generatePDF(); + + case 'url': + $filename = $this->generateAPIFilename($assessment, $language); + $filePath = $pdfService->savePDF($filename); + + $response = [ + 'url' => Storage::url($filePath), + 'filename' => $filename, + 'file_path' => $filePath, + 'language' => $language + ]; + + if ($includeMetadata) { + $response['metadata'] = $metadata; + } + + return response()->json($response); + + case 'base64': + default: + // Generate PDF content and encode as base64 + $pdfContent = $pdfService->generatePDF()->getContent(); + $base64PDF = base64_encode($pdfContent); + + $response = [ + 'pdf_base64' => $base64PDF, + 'mime_type' => 'application/pdf', + 'filename' => $this->generateAPIFilename($assessment, $language), + 'language' => $language + ]; + + if ($includeMetadata) { + $response['metadata'] = $metadata; + } + + return response()->json($response); + } + + } catch (\Exception $e) { + Log::error('Failed to generate assessment PDF via API', [ + 'assessment_id' => $assessment->id, + 'language' => $language ?? 'unknown', + 'error' => $e->getMessage() + ]); + + return response()->json([ + 'error' => 'PDF generation failed', + 'message' => $e->getMessage() + ], 500); + } + } + + /** + * Bulk generate PDFs for multiple assessments + * Route: POST /assessments/pdf/bulk + */ + public function bulkGenerateAssessmentPDFs(Request $request) + { + try { + $validated = $request->validate([ + 'assessment_ids' => 'required|array|min:1|max:10', + 'assessment_ids.*' => 'integer|exists:assessments,id', + 'format' => 'sometimes|in:save,download_zip', + 'lang' => 'sometimes|in:en,ar' + ]); + + $format = $validated['format'] ?? 'save'; + $language = $validated['lang'] ?? 'en'; + $results = []; + $files = []; + + foreach ($validated['assessment_ids'] as $assessmentId) { + try { + $assessment = Assessment::findOrFail($assessmentId); + + // Check authorization for each assessment + $this->authorizeAssessment($assessment); + + // Skip incomplete assessments + if ($assessment->status !== 'completed') { + $results[] = [ + 'assessment_id' => $assessmentId, + 'success' => false, + 'error' => 'Assessment not completed' + ]; + continue; + } + + // Generate PDF for this assessment + $assessmentResults = $assessment->getResults(); + + // Translate domain names + $assessmentResults = $this->translateDomainNames($assessmentResults, $language, $assessment); + + $user = $assessment->user; + + // Create PDF service with language + $service = new AssessmentPDFService($language); + $service->setAssessmentData($assessment, $assessmentResults, $user); + + // Generate filename for this assessment + $filename = $this->generateBulkFilename($assessment, $language); + + if ($format === 'save') { + // Save to storage + $filePath = $service->savePDF($filename); + + $results[] = [ + 'assessment_id' => $assessmentId, + 'assessment_name' => $assessment->name, + 'tool_name' => $language === 'ar' ? $assessment->tool->name_ar : $assessment->tool->name_en, + 'language' => $language, + 'success' => true, + 'file_path' => $filePath, + 'download_url' => Storage::url($filePath) + ]; + } else { + // Prepare for ZIP download + $pdfContent = $service->generatePDF()->getContent(); + $files[$filename] = $pdfContent; + + $results[] = [ + 'assessment_id' => $assessmentId, + 'assessment_name' => $assessment->name, + 'tool_name' => $language === 'ar' ? $assessment->tool->name_ar : $assessment->tool->name_en, + 'language' => $language, + 'success' => true, + 'filename' => $filename + ]; + } + + } catch (\Exception $e) { + Log::error('Failed to generate PDF for assessment in bulk', [ + 'assessment_id' => $assessmentId, + 'language' => $language, + 'error' => $e->getMessage() + ]); + + $results[] = [ + 'assessment_id' => $assessmentId, + 'success' => false, + 'error' => $e->getMessage() + ]; + } + } + + if ($format === 'download_zip' && !empty($files)) { + // Create ZIP file and return as download + return $this->createZipDownload($files, $language); + } + + return response()->json([ + 'message' => 'Bulk PDF generation completed', + 'language' => $language, + 'results' => $results, + 'successful' => count(array_filter($results, fn($r) => $r['success'])), + 'failed' => count(array_filter($results, fn($r) => !$r['success'])) + ]); + + } catch (\Exception $e) { + Log::error('Failed bulk PDF generation', [ + 'language' => $language ?? 'unknown', + 'error' => $e->getMessage() + ]); + + return response()->json([ + 'error' => 'Bulk generation failed', + 'message' => $e->getMessage() + ], 500); + } + } + + /** + * Get assessment results as JSON for custom PDF generation + * Route: GET /assessment/{assessment}/results/json + */ + public function getAssessmentResultsJSON(Request $request, Assessment $assessment) + { + try { + // Check authorization + $this->authorizeAssessment($assessment); + + // Get language from request + $language = $request->get('lang', 'en'); + + if (!in_array($language, ['en', 'ar'])) { + $language = 'en'; + } + + // Get assessment results + $results = $assessment->getResults(); + + // Translate domain names + $results = $this->translateDomainNames($results, $language, $assessment); + + $user = $assessment->user; + + return response()->json([ + 'assessment' => [ + 'id' => $assessment->id, + 'name' => $assessment->name, + 'email' => $assessment->email, + 'organization' => $assessment->organization, + 'status' => $assessment->status, + 'completed_at' => $assessment->completed_at, + 'language' => $language, + 'tool' => [ + 'id' => $assessment->tool->id, + 'name_en' => $assessment->tool->name_en, + 'name_ar' => $assessment->tool->name_ar, + 'name' => $language === 'ar' ? $assessment->tool->name_ar : $assessment->tool->name_en, + ], + 'user' => [ + 'company_name' => $user && $user->details ? $user->details->company_name : $assessment->organization + ] + ], + 'results' => $results + ]); + + } catch (\Exception $e) { + Log::error('Failed to get assessment results JSON', [ + 'assessment_id' => $assessment->id, + 'language' => $language ?? 'unknown', + 'error' => $e->getMessage() + ]); + + return response()->json([ + 'error' => 'Failed to get results', + 'message' => $e->getMessage() + ], 500); + } + } + + /** + * Translate domain names based on language + */ + private function translateDomainNames(array $results, string $language, Assessment $assessment): array + { + if (!isset($results['domain_results']) || empty($results['domain_results'])) { + return $results; + } + + // Get all domains from the tool with their translations + $domains = $assessment->tool->domains; + $domainTranslations = []; + + foreach ($domains as $domain) { + $domainTranslations[$domain->id] = [ + 'en' => $domain->name_en, + 'ar' => $domain->name_ar ?? $domain->name_en // Fallback to English if Arabic not available + ]; + } + + // Update domain names in results + foreach ($results['domain_results'] as &$domainResult) { + if (isset($domainResult['domain_id']) && isset($domainTranslations[$domainResult['domain_id']])) { + $domainResult['domain_name'] = $domainTranslations[$domainResult['domain_id']][$language]; + } + } + + // Also update category names if they exist + if (isset($results['category_results'])) { + $categories = $assessment->tool->domains->flatMap->categories; + $categoryTranslations = []; + + foreach ($categories as $category) { + $categoryTranslations[$category->id] = [ + 'en' => $category->name_en, + 'ar' => $category->name_ar ?? $category->name_en + ]; + } + + foreach ($results['category_results'] as $domainId => &$categoryResults) { + foreach ($categoryResults as &$categoryResult) { + if (isset($categoryResult['category_id']) && isset($categoryTranslations[$categoryResult['category_id']])) { + $categoryResult['category_name'] = $categoryTranslations[$categoryResult['category_id']][$language]; + } + } + } + } + + return $results; + } + + /** + * Check if user can access the assessment + */ + private function authorizeAssessment(Assessment $assessment): void + { + $user = auth()->user(); + + if (!$user) { + abort(401, 'Authentication required'); + } + + // Check if user owns this assessment or has admin access + if ($assessment->user_id !== $user->id && !$user->hasRole('admin')) { + abort(403, 'Unauthorized access to this assessment'); + } + } + + /** + * Generate filename for API responses + */ + private function generateAPIFilename(Assessment $assessment, string $language = 'en'): string + { + $toolName = $language === 'ar' ? $assessment->tool->name_ar : $assessment->tool->name_en; + $toolName = preg_replace('/[^A-Za-z0-9_\u0600-\u06FF-]/', '_', $toolName); + $assessmentName = preg_replace('/[^A-Za-z0-9_\u0600-\u06FF-]/', '_', $assessment->name); + $date = now()->format('Y-m-d'); + + return "{$toolName}_{$assessmentName}_Results_{$date}_{$language}.pdf"; + } + + /** + * Generate filename for bulk operations + */ + private function generateBulkFilename(Assessment $assessment, string $language = 'en'): string + { + $toolName = $language === 'ar' ? $assessment->tool->name_ar : $assessment->tool->name_en; + $toolName = preg_replace('/[^A-Za-z0-9_\u0600-\u06FF-]/', '_', $toolName); + $assessmentId = $assessment->id; + $date = now()->format('Y-m-d'); + + return "{$toolName}_Assessment_{$assessmentId}_{$date}_{$language}.pdf"; + } + + /** + * Create ZIP file for bulk download + */ +// private function createZipDownload(array $files, string $language = 'en'): Response +// { +// $zip = new \ZipArchive(); +// $zipFileName = 'assessment_reports_' . $language . '_' . now()->format('Y-m-d_H-i-s') . '.zip'; +// $zipPath = storage_path('app/temp/' . $zipFileName); +// +// // Ensure temp directory exists +// if (!is_dir(dirname($zipPath))) { +// mkdir(dirname($zipPath), 0755, true); +// } +// +// if ($zip->open($zipPath, \ZipArchive::CREATE | \ZipArchive::OVERWRITE) === TRUE) { +// foreach ($files as $filename => $content) { +// $zip->addFromString($filename, $content); +// } +// $zip->close(); +// +// return response()->download($zipPath, $zipFileName)->deleteFileAfterSend(true); +// } +// +// throw new \Exception('Failed to create ZIP file'); +// } +} diff --git a/app/Http/Controllers/AssessmentReportController.php b/app/Http/Controllers/AssessmentReportController.php new file mode 100644 index 000000000..0e2f85abf --- /dev/null +++ b/app/Http/Controllers/AssessmentReportController.php @@ -0,0 +1,379 @@ +load([ + 'tool', + 'responses.criterion.category.domain', + 'responses.criterion.actions' // Load actions for each criterion + ]); + + // Get assessment results + $results = $this->getAssessmentResults($assessment); + + // Get actions data grouped by criteria with failed responses + $actions = $this->getRelevantActions($assessment); + + // Get report settings + $settings = $this->getReportSettings($request); + + // Get certification level + $certification = $this->getCertificationLevel($results['overall_percentage']); + + // Get recommendations + $recommendations = $this->generateRecommendations($results); + + // Prepare data for the view + $reportData = [ + 'results' => $results, + 'actions' => $actions, + 'settings' => $settings, + 'certification' => $certification, + 'recommendations' => $recommendations, + ]; + + // Generate PDF + $locale = app()->getLocale(); + $templatePath = $locale === 'ar' ? 'reports.comprehensive.ar' : 'reports.comprehensive.en'; + + $html = View::make($templatePath, $reportData)->render(); + + return $this->generatePDF($html, $assessment, $locale); + } + + /** + * Get relevant actions based on assessment responses + */ + private function getRelevantActions(Assessment $assessment): array + { + $actions = []; + + // Get all responses with 'no' answers (areas needing improvement) + $failedResponses = $assessment->responses() + ->where('response', 'no') + ->with(['criterion.actions', 'criterion.category.domain']) + ->get(); + + // Get actions for criteria that failed + foreach ($failedResponses as $response) { + $criterion = $response->criterion; + + if ($criterion && $criterion->actions->count() > 0) { + foreach ($criterion->actions as $action) { + $actions[] = [ + 'criterion_id' => $criterion->id, + 'criterion' => $criterion, + 'domain_name' => $criterion->category->domain->name_ar ?? $criterion->category->domain->name_en, + 'category_name' => $criterion->category->name_ar ?? $criterion->category->name_en, + 'criterion_name' => $criterion->name_ar ?? $criterion->name_en, + 'action_ar' => $action->action_ar, + 'action_en' => $action->action_en, + 'flag' => $action->flag, + 'action_type' => $action->getActionTypeText('ar'), + 'priority' => $this->getActionPriority($response, $criterion), + ]; + } + } + } + + // Also get improvement actions for areas that passed but could be enhanced + $passedResponses = $assessment->responses() + ->where('response', 'yes') + ->with(['criterion.actions', 'criterion.category.domain']) + ->get(); + + foreach ($passedResponses as $response) { + $criterion = $response->criterion; + + if ($criterion) { + // Only get improvement actions for passed criteria + $improvementActions = $criterion->actions()->where('flag', true)->get(); + + foreach ($improvementActions as $action) { + $actions[] = [ + 'criterion_id' => $criterion->id, + 'criterion' => $criterion, + 'domain_name' => $criterion->category->domain->name_ar ?? $criterion->category->domain->name_en, + 'category_name' => $criterion->category->name_ar ?? $criterion->category->name_en, + 'criterion_name' => $criterion->name_ar ?? $criterion->name_en, + 'action_ar' => $action->action_ar, + 'action_en' => $action->action_en, + 'flag' => $action->flag, + 'action_type' => $action->getActionTypeText('ar'), + 'priority' => 'منخفضة', // Low priority for improvement actions + ]; + } + } + } + + return $actions; + } + + /** + * Get action priority based on response and domain performance + */ + private function getActionPriority($response, $criterion): string + { + // Get domain score to determine priority + $domain = $criterion->category->domain; + $domainResponses = $domain->categories() + ->with('criteria.responses') + ->get() + ->flatMap(fn($category) => $category->criteria) + ->flatMap(fn($criteria) => $criteria->responses) + ->where('assessment_id', $response->assessment_id); + + $yesCount = $domainResponses->where('response', 'yes')->count(); + $totalCount = $domainResponses->whereIn('response', ['yes', 'no'])->count(); + + $domainScore = $totalCount > 0 ? ($yesCount / $totalCount) * 100 : 0; + + // Determine priority based on domain performance + if ($domainScore < 50) { + return 'عالية'; // High priority + } elseif ($domainScore < 75) { + return 'متوسطة'; // Medium priority + } else { + return 'منخفضة'; // Low priority + } + } + + /** + * Get assessment results + */ + private function getAssessmentResults(Assessment $assessment): array + { + return [ + 'assessment' => [ + 'client_name' => $assessment->name, + 'client_email' => $assessment->email, + 'organization' => $assessment->organization, + 'status' => $assessment->status, + 'created_at' => $assessment->created_at, + 'completed_at' => $assessment->completed_at, + ], + 'tool' => [ + 'name_ar' => $assessment->tool->name_ar, + 'name_en' => $assessment->tool->name_en, + ], + ...$assessment->getResults() // Use the existing getResults method + ]; + } + + /** + * Get report settings from request + */ + private function getReportSettings(Request $request): array + { + return [ + 'include_recommendations' => $request->get('include_recommendations', true), + 'include_actions' => $request->get('include_actions', true), + 'include_charts' => $request->get('include_charts', true), + 'template_type' => $request->get('template_type', 'comprehensive'), + ]; + } + + /** + * Get certification level based on score + */ + private function getCertificationLevel(float $score): array + { + if ($score >= 85) { + return [ + 'level' => 'full', + 'text_ar' => 'شهادة استيفاء كاملة', + 'text_en' => 'Full Compliance Certificate', + 'color' => '#22c55e', + ]; + } elseif ($score >= 70) { + return [ + 'level' => 'conditional', + 'text_ar' => 'شهادة استيفاء مشروطة', + 'text_en' => 'Conditional Compliance Certificate', + 'color' => '#f59e0b', + ]; + } else { + return [ + 'level' => 'denied', + 'text_ar' => 'عدم استيفاء المعايير', + 'text_en' => 'Non-Compliance', + 'color' => '#ef4444', + ]; + } + } + + /** + * Generate recommendations based on results + */ + private function generateRecommendations(array $results): array + { + $recommendations = []; + + foreach ($results['domain_results'] as $domain) { + $score = $domain['score_percentage']; + $priority = 'medium'; + $text = ''; + + if ($score < 60) { + $priority = 'high'; + $text = "يتطلب المجال تطوير شامل وإعادة هيكلة للعمليات والإجراءات"; + } elseif ($score < 80) { + $priority = 'medium'; + $text = "يحتاج المجال إلى تحسينات في بعض العمليات والممارسات"; + } else { + $priority = 'low'; + $text = "أداء جيد مع إمكانية التحسين المستمر"; + } + + $recommendations[] = [ + 'domain_name' => $domain['domain_name'], + 'priority' => $priority, + 'text' => $text, + 'score' => $score, + ]; + } + + // Sort by priority (high first) + $priorityOrder = ['high' => 1, 'medium' => 2, 'low' => 3]; + usort($recommendations, function($a, $b) use ($priorityOrder) { + return $priorityOrder[$a['priority']] <=> $priorityOrder[$b['priority']]; + }); + + return $recommendations; + } + + /** + * Generate PDF from HTML + */ + private function generatePDF(string $html, Assessment $assessment, string $locale): \Illuminate\Http\Response + { + $mpdf = new Mpdf([ + 'mode' => 'utf-8', + 'format' => 'A4', + 'orientation' => 'P', + 'margin_left' => 15, + 'margin_right' => 15, + 'margin_top' => 20, + 'margin_bottom' => 15, + 'default_font' => $locale === 'ar' ? 'almarai' : 'arial', + 'default_font_size' => 10, + 'tempDir' => storage_path('app/temp'), + 'autoScriptToLang' => true, + 'autoLangToFont' => true, + ]); + + // Set RTL direction for Arabic + if ($locale === 'ar') { + $mpdf->SetDirectionality('rtl'); + } + + $mpdf->WriteHTML($html); + + $filename = $this->generateFilename($assessment, $locale); + + return response($mpdf->Output('', 'S'), 200, [ + 'Content-Type' => 'application/pdf', + 'Content-Disposition' => 'attachment; filename="' . $filename . '"', + 'Content-Length' => strlen($mpdf->Output('', 'S')), + ]); + } + private function generateFilename(Assessment $assessment, string $locale): string + { + $toolName = str_replace([' ', '/', '\\', ':', '*', '?', '"', '<', '>', '|'], '_', + $locale === 'ar' ? $assessment->tool->name_ar : $assessment->tool->name_en + ); + $date = now()->format('Y-m-d'); + $assessmentId = $assessment->id; + + $prefix = $locale === 'ar' ? 'تقرير_تقييم' : 'Assessment_Report'; + + return "{$prefix}_{$toolName}_{$assessmentId}_{$date}.pdf"; + } + public function previewReport(Assessment $assessment, Request $request) + { + $assessment->load([ + 'tool', + 'responses.criterion.category.domain', + 'responses.criterion.actions' + ]); + + // Get all the data that would be used in the PDF + $results = $this->getAssessmentResults($assessment); + $actions = $this->getRelevantActions($assessment); + $settings = $this->getReportSettings($request); + $certification = $this->getCertificationLevel($results['overall_percentage']); + $recommendations = $this->generateRecommendations($results); + + return response()->json([ + 'success' => true, + 'data' => [ + 'results' => $results, + 'actions' => $actions, + 'settings' => $settings, + 'certification' => $certification, + 'recommendations' => $recommendations, + 'actions_summary' => [ + 'total_actions' => count($actions), + 'improvement_actions' => count(array_filter($actions, fn($a) => $a['flag'])), + 'corrective_actions' => count(array_filter($actions, fn($a) => !$a['flag'])), + 'high_priority' => count(array_filter($actions, fn($a) => $a['priority'] === 'عالية')), + 'medium_priority' => count(array_filter($actions, fn($a) => $a['priority'] === 'متوسطة')), + 'low_priority' => count(array_filter($actions, fn($a) => $a['priority'] === 'منخفضة')), + ] + ] + ]); + } + + /** + * Get available report templates + */ + public function getTemplates() + { + return response()->json([ + 'success' => true, + 'data' => [ + [ + 'id' => 'comprehensive', + 'name' => 'Comprehensive Report', + 'name_ar' => 'تقرير شامل', + 'description' => 'Complete assessment report with actions and recommendations', + 'description_ar' => 'تقرير تقييم كامل مع الإجراءات والتوصيات', + 'pages' => '10-15', + 'includes' => ['client_info', 'results', 'charts', 'actions', 'recommendations', 'action_plan'] + ], + [ + 'id' => 'summary', + 'name' => 'Executive Summary', + 'name_ar' => 'ملخص تنفيذي', + 'description' => 'Brief overview with key findings and priority actions', + 'description_ar' => 'نظرة عامة موجزة مع النتائج الرئيسية والإجراءات ذات الأولوية', + 'pages' => '5-7', + 'includes' => ['client_info', 'overall_score', 'priority_actions', 'key_recommendations'] + ], + [ + 'id' => 'actions_only', + 'name' => 'Action Plan Report', + 'name_ar' => 'تقرير خطة العمل', + 'description' => 'Focused report on required actions and implementation plan', + 'description_ar' => 'تقرير مركز على الإجراءات المطلوبة وخطة التنفيذ', + 'pages' => '6-8', + 'includes' => ['client_info', 'actions', 'implementation_timeline', 'priorities'] + ] + ] + ]); + } +} diff --git a/app/Http/Controllers/AssessmentToolsController.php b/app/Http/Controllers/AssessmentToolsController.php new file mode 100644 index 000000000..f85002587 --- /dev/null +++ b/app/Http/Controllers/AssessmentToolsController.php @@ -0,0 +1,137 @@ +user(); + + // Only premium users and admins can access assessment tools + if (!$user->isPremium() && !$user->isAdmin()) { + return redirect()->route('subscription.show') + ->with('error', 'Assessment tools are available for premium users only. Please upgrade your subscription.'); + } + + $tools = Tool::where('status', 'active') + ->withCount(['assessments', 'domains']) + ->with(['domains' => function($query) { + $query->withCount(['categories' => function($q) { + $q->withCount('criteria'); + }]); + }]) + ->orderBy('name_en') + ->get() + ->map(function ($tool) use ($user) { + // Calculate total criteria from loaded relationships + $totalCriteria = $tool->domains->sum(function($domain) { + return $domain->categories->sum('criteria_count'); + }); + + $estimatedTime = max(10, ceil($totalCriteria * 0.5)); // Minimum 10 minutes + + // Check per-tool access + $hasToolAccess = $user->hasAccessToTool($tool->id); + $toolSubscription = $user->getToolSubscription($tool->id); + + return [ + 'id' => $tool->id, + 'name_en' => $tool->name_en, + 'name_ar' => $tool->name_ar, + 'description_en' => $tool->description_en, + 'description_ar' => $tool->description_ar, + 'image' => $tool->image, + 'status' => $tool->status, + 'total_domains' => $tool->domains_count, + 'total_criteria' => $totalCriteria, + 'estimated_time' => $estimatedTime, + 'assessments_count' => $tool->assessments_count, + 'requires_premium' => $tool->requiresPremium(), + 'has_access' => $hasToolAccess, + 'subscription_type' => $toolSubscription ? $toolSubscription->plan_type : 'none', + ]; + }); + + // Get user limits and access info + $userLimits = [ + 'current_assessments' => $user->assessments()->count(), + 'assessment_limit' => $user->getAssessmentLimit(), + 'can_create_more' => $user->canCreateAssessment(), + 'is_premium' => $user->isPremium(), + 'is_admin' => $user->isAdmin(), + 'subscription_status' => $user->getSubscriptionStatus(), + ]; + + // Return the assessment tools page with per-tool access + return Inertia::render('assessment-tools', [ + 'tools' => $tools, + 'userLimits' => $userLimits, + 'locale' => app()->getLocale(), + ]); + } + + /** + * Start an assessment for a specific tool - WITH PER-TOOL ACCESS CHECK + */ + public function start(Tool $tool) + { + $user = auth()->user(); + + // Check if user has access to this specific tool + if (!$user->hasAccessToTool($tool->id)) { + return redirect()->route('subscription.show') + ->with('error', "You don't have access to the {$tool->name_en} tool. Please subscribe to access this tool."); + } + + // Check user limits for this specific tool + $toolSubscription = $user->getToolSubscription($tool->id); + + if ($toolSubscription) { + $assessmentLimit = $toolSubscription->getFeature('assessments_limit'); + $currentAssessments = $user->assessments()->where('tool_id', $tool->id)->count(); + + if ($assessmentLimit !== null && $currentAssessments >= $assessmentLimit) { + return redirect()->route('subscription.show') + ->with('error', "You have reached your assessment limit for {$tool->name_en}. Please upgrade to premium for unlimited assessments."); + } + } + + // Load tool with domains and criteria + $tool->load([ + 'domains.categories.criteria' => function ($query) { + $query->orderBy('order'); + } + ]); + + // Create the assessment + $assessment = Assessment::create([ + 'user_id' => $user->id, + 'tool_id' => $tool->id, + 'name' => $user->name . ' - ' . $tool->name_en, + 'email' => $user->email, + 'organization' => $user->details->organization ?? 'Not specified', + 'status' => 'in_progress', + 'started_at' => now(), + ]); + + return redirect()->route('assessment.take', $assessment); + } + + /** + * Premium dashboard version - for premium users accessing via dashboard + */ + public function premiumIndex() + { + // This method remains the same but could include additional premium features + return $this->index(); + } +} diff --git a/app/Http/Controllers/Auth/AuthenticatedSessionController.php b/app/Http/Controllers/Auth/AuthenticatedSessionController.php index b4a48d946..54e806346 100644 --- a/app/Http/Controllers/Auth/AuthenticatedSessionController.php +++ b/app/Http/Controllers/Auth/AuthenticatedSessionController.php @@ -4,9 +4,11 @@ use App\Http\Controllers\Controller; use App\Http\Requests\Auth\LoginRequest; +use App\Providers\RouteServiceProvider; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Route; use Inertia\Inertia; use Inertia\Response; @@ -14,13 +16,13 @@ class AuthenticatedSessionController extends Controller { /** - * Show the login page. + * Display the login view. */ - public function create(Request $request): Response + public function create(): Response { - return Inertia::render('auth/login', [ + return Inertia::render('Auth/Login', [ 'canResetPassword' => Route::has('password.request'), - 'status' => $request->session()->get('status'), + 'status' => session('status'), ]); } @@ -30,10 +32,71 @@ public function create(Request $request): Response public function store(LoginRequest $request): RedirectResponse { $request->authenticate(); - $request->session()->regenerate(); - return redirect()->intended(route('dashboard', absolute: false)); + $user = $request->user(); + Log::info('User logged in', ['user_id' => $user->id, 'email' => $user->email]); + + // Load user relationships safely + try { + $user->load(['subscription', 'details', 'roles']); + + // Create default subscription and details if missing + if (method_exists($user, 'createDefaultSubscriptionAndDetails')) { + if (!$user->subscription || !$user->details) { + $user->createDefaultSubscriptionAndDetails(); + $user->refresh(); + } + } + } catch (\Exception $e) { + Log::warning('Could not load user relationships or create defaults', [ + 'user_id' => $user->id, + 'error' => $e->getMessage() + ]); + } + + // FIXED: Determine redirect based on user type + try { + // Check if user is admin + $isAdmin = false; + if (method_exists($user, 'isAdmin')) { + $isAdmin = $user->isAdmin(); + } elseif ($user->roles) { + $isAdmin = $user->roles->contains('name', 'super_admin'); + } + + // Check if user has tool subscriptions (premium) + $hasToolSubscriptions = false; + if (method_exists($user, 'hasAnyToolSubscription')) { + $hasToolSubscriptions = $user->hasAnyToolSubscription(); + } elseif (method_exists($user, 'isPremium')) { + $hasToolSubscriptions = $user->isPremium(); + } elseif ($user->subscription) { + $hasToolSubscriptions = $user->subscription->plan_type === 'premium'; + } + + if ($isAdmin) { + Log::info('Redirecting admin user to dashboard', ['user_id' => $user->id]); + return redirect('/dashboard'); + } elseif ($hasToolSubscriptions) { + Log::info('Redirecting premium user to dashboard', ['user_id' => $user->id]); + return redirect('/dashboard'); + } else { + Log::info('Redirecting free user to tools discovery', ['user_id' => $user->id]); + // FIXED: Use correct URL + return redirect('/tools/discover'); + } + } catch (\Exception $e) { + // Fallback if user methods fail + Log::error('Login redirect failed', [ + 'user_id' => $user->id, + 'error' => $e->getMessage(), + 'trace' => $e->getTraceAsString() + ]); + + // FIXED: Safe fallback with correct URL + return redirect('/tools/discover'); + } } /** @@ -44,6 +107,7 @@ public function destroy(Request $request): RedirectResponse Auth::guard('web')->logout(); $request->session()->invalidate(); + $request->session()->regenerateToken(); return redirect('/'); diff --git a/app/Http/Controllers/Auth/VerifyEmailController.php b/app/Http/Controllers/Auth/VerifyEmailController.php index db389f20d..6dba181c7 100644 --- a/app/Http/Controllers/Auth/VerifyEmailController.php +++ b/app/Http/Controllers/Auth/VerifyEmailController.php @@ -14,11 +14,35 @@ class VerifyEmailController extends Controller public function __invoke(EmailVerificationRequest $request): RedirectResponse { if ($request->user()->hasVerifiedEmail()) { + $user = $request->user(); + + if ($user->isAdmin()) { + return redirect()->intended(route('dashboard', absolute: false).'?verified=1'); + } + + if ($user->hasAnyToolSubscription()) { + return redirect()->intended(route('dashboard', absolute: false).'?verified=1'); + } + + // Free users go to free assessment + return redirect()->intended(route('free-assessment.index', absolute: false).'?verified=1'); + } + + $request->user()->markEmailAsVerified(); + + event(new Verified($request->user())); + + $user = $request->user(); + + if ($user->isAdmin()) { return redirect()->intended(route('dashboard', absolute: false).'?verified=1'); } + if ($user->hasAnyToolSubscription()) { + return redirect()->intended(route('dashboard', absolute: false).'?verified=1'); + } $request->fulfill(); - return redirect()->intended(route('dashboard', absolute: false).'?verified=1'); + return redirect()->intended(route('free-assessment.index', absolute: false).'?verified=1'); } } diff --git a/app/Http/Controllers/BlogController.php b/app/Http/Controllers/BlogController.php new file mode 100644 index 000000000..11940b1b7 --- /dev/null +++ b/app/Http/Controllers/BlogController.php @@ -0,0 +1,172 @@ +with(['author:id,name,email']) + ->published() + ->latest('published_at'); + + // Search functionality + if ($request->search) { + $query->whereFullText(['title', 'excerpt', 'contentt'], $request->search); + } + + // Tag filtering + if ($request->tags) { + $tags = is_array($request->tags) ? $request->tags : [$request->tags]; + foreach ($tags as $tag) { + $query->whereJsonContains('tags', $tag); + } + } + + $posts = $query->paginate(12); + + // Get all unique tags for filter + $availableTags = BlogPost::published() + ->whereNotNull('tags') + ->pluck('tags') + ->flatten() + ->unique() + ->values() + ->toArray(); + + return Inertia::render('Blog/Index', [ + 'posts' => $posts, + 'availableTags' => $availableTags, + 'filters' => [ + 'search' => $request->search, + 'tags' => $request->tags ? (is_array($request->tags) ? $request->tags : [$request->tags]) : [], + ], + ]); + } + + public function show(BlogPost $post) + { + // Only show published posts to public + if ($post->status !== 'published' || + ($post->published_at && $post->published_at->isFuture())) { + abort(404); + } + + // Increment view count + $post->incrementViews(); + + // Load post with author + $post->load(['author:id,name,email']); + + // Get approved comments with replies + $comments = BlogComment::where('blog_post_id', $post->id) + ->where('status', 'approved') + ->with(['user:id,name,email']) + ->orderBy('created_at', 'asc') + ->get(); + + // Check if current user has liked this post + $isLiked = false; + if (auth()->check()) { + $isLiked = BlogPostLike::where('blog_post_id', $post->id) + ->where('user_id', auth()->id()) + ->exists(); + } else { + $isLiked = BlogPostLike::where('blog_post_id', $post->id) + ->where('session_id', session()->getId()) + ->exists(); + } + + return Inertia::render('Blog/Show', [ + 'post' => $post, + 'comments' => $comments, + 'isLiked' => $isLiked, + 'canComment' => auth()->check(), // Only authenticated users can comment + ]); + } + + public function like(BlogPost $post) + { + $userId = auth()->id(); + $sessionId = session()->getId(); + + // Check if already liked + $existingLike = BlogPostLike::where('blog_post_id', $post->id) + ->where(function ($query) use ($userId, $sessionId) { + if ($userId) { + $query->where('user_id', $userId); + } else { + $query->where('session_id', $sessionId); + } + }) + ->first(); + + if ($existingLike) { + return response()->json(['message' => 'Already liked'], 400); + } + + BlogPostLike::create([ + 'blog_post_id' => $post->id, + 'user_id' => $userId, + 'session_id' => $userId ? null : $sessionId, + 'ip_address' => request()->ip(), + ]); + + return response()->json(['message' => 'Post liked successfully']); + } + + public function unlike(BlogPost $post) + { + $userId = auth()->id(); + $sessionId = session()->getId(); + + $like = BlogPostLike::where('blog_post_id', $post->id) + ->where(function ($query) use ($userId, $sessionId) { + if ($userId) { + $query->where('user_id', $userId); + } else { + $query->where('session_id', $sessionId); + } + }) + ->first(); + + if (!$like) { + return response()->json(['message' => 'Not liked yet'], 400); + } + + $like->delete(); + + return response()->json(['message' => 'Post unliked successfully']); + } + + public function storeComment(Request $request, BlogPost $post) + { + $request->validate([ + 'contentt' => 'required|string|max:1000', + 'parent_id' => 'nullable|exists:blog_comments,id', + ]); + + $comment = BlogComment::create([ + 'blog_post_id' => $post->id, + 'user_id' => auth()->id(), + 'parent_id' => $request->parent_id, + 'contentt' => $request->contentt, + 'status' => 'pending', // Require moderation + 'meta_data' => [ + 'ip_address' => $request->ip(), + 'user_agent' => $request->userAgent(), + ], + ]); + + return back()->with('success', 'Comment submitted for review.'); + } +} diff --git a/app/Http/Controllers/ContactSalesController.php b/app/Http/Controllers/ContactSalesController.php new file mode 100644 index 000000000..08b23f1ea --- /dev/null +++ b/app/Http/Controllers/ContactSalesController.php @@ -0,0 +1,234 @@ + $request->name, + 'email' => $request->email, + 'phone' => $request->phone, + 'company' => $request->company, + 'position' => $request->position, + 'company_type' => $request->company_type, + 'interest' => $request->interest, + 'message' => $request->message, + 'estimated_users' => $request->estimated_users, + 'timeline' => $request->timeline, + 'budget_range' => $request->budget_range, + 'source' => 'website_form', + 'status' => 'new', + 'ip_address' => $request->ip(), + 'user_agent' => $request->userAgent(), + 'metadata' => [ + 'submitted_at' => now(), + 'form_version' => '1.0', + 'page_url' => $request->headers->get('referer'), + ] + ]); + + // Handle newsletter subscriptions + $this->handleSubscriptions($request, $lead); + + // Send email notifications + $this->sendEmailNotifications($lead); + + // Send WhatsApp notification if phone number provided + if ($lead->phone) { + $this->sendWhatsAppNotification($lead); + } + + // Log the successful submission + Log::info('Contact sales form submitted', [ + 'lead_id' => $lead->id, + 'company' => $lead->company, + 'email' => $lead->email + ]); + + return back()->with('success', 'Your request has been submitted successfully!'); + + } catch (\Exception $e) { + Log::error('Error processing contact sales form', [ + 'error' => $e->getMessage(), + 'email' => $request->email, + 'company' => $request->company + ]); + + return back()->withErrors(['general' => 'An error occurred while processing your request. Please try again.']); + } + } + + /** + * Handle newsletter and marketing subscriptions + */ + private function handleSubscriptions(ContactSalesRequest $request, ContactSalesLead $lead) + { + $subscriptionTypes = []; + + if ($request->subscribe_newsletter) { + $subscriptionTypes[] = 'newsletter'; + } + + if ($request->subscribe_updates) { + $subscriptionTypes[] = 'product_updates'; + } + + if ($request->subscribe_offers) { + $subscriptionTypes[] = 'marketing_offers'; + } + + if (!empty($subscriptionTypes)) { + NewsletterSubscriber::updateOrCreate( + ['email' => $lead->email], + [ + 'name' => $lead->name, + 'company' => $lead->company, + 'subscription_types' => $subscriptionTypes, + 'subscribed_at' => now(), + 'source' => 'contact_sales_form', + 'is_active' => true, + 'lead_id' => $lead->id, + ] + ); + } + } + + /** + * Send email notifications + */ + private function sendEmailNotifications(ContactSalesLead $lead) + { + // Send confirmation email to the lead + Mail::send('emails.contact-sales-confirmation', compact('lead'), function ($message) use ($lead) { + $message->to($lead->email, $lead->name) + ->subject('Thank you for contacting our sales team'); + }); + + // Send notification to sales team + $salesEmails = config('sales.notification_emails', ['sales@yourcompany.com']); + + Mail::send('emails.contact-sales-notification', compact('lead'), function ($message) use ($salesEmails) { + $message->to($salesEmails) + ->subject('New Sales Lead: ' . $lead->company); + }); + + // Dispatch job for CRM integration (if needed) + SendContactSalesNotification::dispatch($lead); + } + + /** + * Send WhatsApp notification + */ + private function sendWhatsAppNotification(ContactSalesLead $lead) + { + // Format phone number for WhatsApp + $phoneNumber = $this->formatPhoneNumber($lead->phone); + + if ($phoneNumber) { + $message = $this->generateWhatsAppMessage($lead); + + // Dispatch WhatsApp notification job + SendWhatsAppNotification::dispatch($phoneNumber, $message, $lead); + } + } + + /** + * Format phone number for WhatsApp API + */ + private function formatPhoneNumber($phone) + { + // Remove all non-numeric characters + $cleaned = preg_replace('/[^0-9]/', '', $phone); + + // Add country code if not present (assuming US +1 for this example) + if (strlen($cleaned) === 10) { + $cleaned = '1' . $cleaned; + } + + // Basic validation + if (strlen($cleaned) >= 10 && strlen($cleaned) <= 15) { + return $cleaned; + } + + return null; + } + + /** + * Generate WhatsApp message content + */ + private function generateWhatsAppMessage(ContactSalesLead $lead) + { + return "Hi {$lead->name}! 👋\n\n" . + "Thank you for your interest in our assessment platform! We've received your request and our sales team will contact you within 24 hours.\n\n" . + "Your request details:\n" . + "🏢 Company: {$lead->company}\n" . + "📧 Email: {$lead->email}\n" . + "🎯 Interest: {$lead->interest}\n\n" . + "Meanwhile, feel free to reply to this message if you have any urgent questions.\n\n" . + "Best regards,\n" . + "AssessmentHub Sales Team"; + } + + /** + * Show contact sales page (if you want a dedicated page) + */ + public function show() + { + return Inertia::render('ContactSales', [ + 'companyTypes' => $this->getCompanyTypes(), + 'interests' => $this->getInterests(), + ]); + } + + /** + * Get company types for the form + */ + private function getCompanyTypes() + { + return [ + 'Startup (1-10 employees)', + 'Small Business (11-50 employees)', + 'Medium Business (51-200 employees)', + 'Large Enterprise (201-1000 employees)', + 'Corporation (1000+ employees)', + 'Government/Public Sector', + 'Non-Profit Organization', + 'Educational Institution', + 'Other' + ]; + } + + /** + * Get interests for the form + */ + private function getInterests() + { + return [ + 'Assessment Platform Demo', + 'Enterprise Solutions', + 'Custom Assessment Development', + 'Training & Support', + 'Integration Services', + 'Volume Pricing', + 'Partnership Opportunities', + 'Other' + ]; + } +} diff --git a/app/Http/Controllers/DomainPDFController.php b/app/Http/Controllers/DomainPDFController.php new file mode 100644 index 000000000..a8d9828f1 --- /dev/null +++ b/app/Http/Controllers/DomainPDFController.php @@ -0,0 +1,10 @@ +user(); + + // Check if user can take free assessment +// if (!$user->canTakeFreeAssessment()) { +// return redirect()->route('tools.discover') +// ->with('info', 'You have already used your free assessment. Browse tools below to purchase more assessments.'); +// } + + // Get all tools available for free assessment + $freeTools = Tool::where('has_free_plan', true)->get(); + + if ($freeTools->isEmpty()) { + return redirect()->route('subscription.show') + ->with('error', 'No free assessment available. Please subscribe to access tools.'); + } + + $tools = $freeTools->map(function ($tool) use ($user) { + $existing = $user->assessments() + ->where('tool_id', $tool->id) + ->where('assessment_type', 'free') + ->first(); + + return [ + 'id' => $tool->id, + 'name_en' => $tool->name_en, + 'name_ar' => $tool->name_ar, + 'description_en' => $tool->description_en, + 'description_ar' => $tool->description_ar, + 'image' => $tool->image, + 'existing_assessment' => $existing ? [ + 'id' => $existing->id, + 'status' => $existing->status, + 'completed_at' => $existing->completed_at, + 'can_access_results' => $existing->status === 'completed', + ] : null, + ]; + }); + + return Inertia::render('FreeAssessment/Index', [ + 'tools' => $tools, + 'user' => [ + 'id' => $user->id, + 'name' => $user->name, + 'email' => $user->email, + 'access_level' => $user->getAccessLevel(), + ], + 'locale' => app()->getLocale(), + ]); + } + + /** + * Show tool request form for a specific tool + */ + public function requestForm(Tool $tool) + { + return Inertia::render('FreeAssessment/ToolRequest', [ + 'tool' => [ + 'id' => $tool->id, + 'name_en' => $tool->name_en, + 'name_ar' => $tool->name_ar, + 'description_en' => $tool->description_en, + 'description_ar' => $tool->description_ar, + 'image' => $tool->image, + ], + 'user' => auth()->user() ? [ + 'name' => auth()->user()->name, + 'email' => auth()->user()->email, + 'organization' => auth()->user()->getCompanyName(), + ] : null, + ]); + } + + /** + * Start or resume assessment + */ + public function start(Request $request) + { + $user = auth()->user(); + + // Check if user can take free assessment +// if (!$user->canTakeFreeAssessment()) { +// return redirect()->route('tools.discover') +// ->with('error', 'You have already used your free assessment.'); +// } + + $validated = $request->validate([ + 'tool_id' => 'required|exists:tools,id' + ]); + + // Get the tool and ensure it is available for free + $tool = Tool::findOrFail($validated['tool_id']); + + if (!$tool->hasFreeAccess()) { + return redirect()->route('free-assessment.index') + ->with('error', 'Selected tool is not available for free.'); + } + + try { + DB::beginTransaction(); + + // Create or find existing assessment + $assessment = $user->assessments() + ->where('tool_id', $tool->id) + ->where('assessment_type', 'free') + ->first(); + + if (!$assessment) { + $assessment = Assessment::create([ + 'tool_id' => $tool->id, + 'user_id' => $user->id, + 'name' => $user->name, + 'email' => $user->email, + 'organization' => null, + 'assessment_type' => 'free', + 'status' => 'in_progress', + 'started_at' => now(), + ]); + } + + DB::commit(); + + // Redirect to the assessment form + return redirect()->route('free-assessment.take', $assessment); + + } catch (Exception $e) { + DB::rollBack(); + Log::error('Failed to start assessment', [ + 'user_id' => $user->id, + 'tool_id' => $tool->id, + 'error' => $e->getMessage() + ]); + + return back()->withErrors(['start' => 'Failed to start assessment. Please try again.']); + } + } + + /** + * Show the take assessment form + */ + public function take(Assessment $assessment) + { + $user = auth()->user(); + + // Check ownership and type + if ($assessment->user_id !== $user->id || $assessment->assessment_type !== 'free') { + abort(403, 'Unauthorized access to assessment.'); + } + + // Load tool with all related data + $tool = Tool::with(['domains.categories.criteria' => function ($query) { + $query->where('status', 'active')->orderBy('order'); + }])->findOrFail($assessment->tool_id); + + // Load existing responses + $existingResponses = []; + $existingNotes = []; + + $responses = $assessment->responses()->with('criterion')->get(); + + foreach ($responses as $response) { + // Store the actual response value (yes/no/na) + $existingResponses[$response->criterion_id] = $response->response; + + if ($response->notes) { + $existingNotes[$response->criterion_id] = $response->notes; + } + } + + $assessmentData = [ + 'id' => $assessment->id, + 'tool' => [ + 'id' => $tool->id, + 'name_en' => $tool->name_en, + 'name_ar' => $tool->name_ar, + 'description_en' => $tool->description_en, + 'description_ar' => $tool->description_ar, + 'image' => $tool->image ? asset('storage/' . $tool->image) : null, + 'domains' => $tool->domains->map(function ($domain) { + return [ + 'id' => $domain->id, + 'name_en' => $domain->name_en, + 'name_ar' => $domain->name_ar, + 'description_en' => $domain->description_en, + 'description_ar' => $domain->description_ar, + 'order' => $domain->order, + 'categories' => $domain->categories->map(function ($category) { + return [ + 'id' => $category->id, + 'name_en' => $category->name_en, + 'name_ar' => $category->name_ar, + 'description_en' => $category->description_en, + 'description_ar' => $category->description_ar, + 'order' => $category->order, + 'criteria' => $category->criteria->map(function ($criterion) { + return [ + 'id' => $criterion->id, + 'text_en' => $criterion->name_en, + 'text_ar' => $criterion->name_ar, + 'description_en' => $criterion->description_en, + 'description_ar' => $criterion->description_ar, + 'order' => $criterion->order, + 'weight' => $criterion->weight ?? 1, + 'requires_file' => $criterion->requires_file ?? false, + ]; + })->toArray(), + ]; + })->toArray(), + ]; + })->toArray(), + ], + 'responses' => $existingResponses, // Pass responses as 'yes', 'no', 'na' + ]; + + return Inertia::render('FreeAssessment/Start', [ + 'assessmentData' => $assessmentData, + 'locale' => app()->getLocale(), + 'auth' => [ + 'user' => [ + 'id' => $user->id, + 'name' => $user->name, + 'email' => $user->email, + ] + ], + 'existingNotes' => $existingNotes, + 'isEdit' => count($existingResponses) > 0, + ]); + } + + /** + * Submit assessment - FIXED: Proper database field and Inertia redirect + */ + public function submit(Assessment $assessment, Request $request) + { + $user = auth()->user(); + + // Check ownership and type + if ($assessment->user_id !== $user->id || $assessment->assessment_type !== 'free') { + abort(403, 'Unauthorized access to assessment.'); + } + + $validated = $request->validate([ + 'responses' => 'required|array', + 'responses.*' => 'required|string|in:yes,no,na', + 'notes' => 'nullable|array', + 'notes.*' => 'nullable|string|max:1000', + 'files' => 'nullable|array', + ]); + + try { + DB::beginTransaction(); + + // Remove any previous free assessments for this tool including their results + $oldAssessments = Assessment::where('user_id', $user->id) + ->where('tool_id', $assessment->tool_id) + ->where('id', '!=', $assessment->id) + ->where('assessment_type', 'free') + ->get(); + + foreach ($oldAssessments as $old) { + // delete responses and results explicitly before removing the assessment + $old->responses()->delete(); + $old->results()->delete(); + $old->delete(); + } + // Remove any previous free assessments for this tool + Assessment::where('user_id', $user->id) + ->where('tool_id', $assessment->tool_id) + ->where('id', '!=', $assessment->id) + ->where('assessment_type', 'free') + ->delete(); + + // Clear existing responses to avoid duplicates + $assessment->responses()->delete(); + + // Store new responses - FIXED: Use 'response' field not 'score' + foreach ($validated['responses'] as $criterionId => $response) { + AssessmentResponse::create([ + 'assessment_id' => $assessment->id, + 'criterion_id' => $criterionId, + 'response' => $response, // Store as 'yes', 'no', 'na' string + 'notes' => $validated['notes'][$criterionId] ?? null, + ]); + } + + // Update assessment status + $assessment->update([ + 'status' => 'completed', + 'completed_at' => now(), + ]); + + // Calculate results + $assessment->calculateResults(); + + DB::commit(); + + // Redirect to completion page before showing results + return redirect()->route('free-assessment.complete', $assessment) + ->with('success', 'Assessment completed successfully!'); + + } catch (Exception $e) { + DB::rollBack(); + Log::error('Free assessment submission failed', [ + 'error' => $e->getMessage(), + 'assessment_id' => $assessment->id, + 'user_id' => $user->id + ]); + + return back()->withErrors([ + 'submit' => 'There was an error submitting your assessment. Please try again.' + ]); + } + } + + /** + * Show assessment results + */ + public function results(Assessment $assessment) + { + $user = auth()->user(); + + // Check ownership and type + if ($assessment->user_id !== $user->id || $assessment->assessment_type !== 'free') { + abort(403, 'Unauthorized access to assessment results.'); + } + + // Ensure assessment is completed + if ($assessment->status !== 'completed') { + return redirect()->route('free-assessment.take', $assessment) + ->with('info', 'Please complete the assessment first.'); + } + + // Load tool and responses with proper relationships + $tool = Tool::with(['domains.categories.criteria'])->findOrFail($assessment->tool_id); + $responses = $assessment->responses()->with('criterion.category.domain')->get(); + + // Calculate statistics + $totalQuestions = $responses->count(); + $yesAnswers = $responses->where('response', 'yes')->count(); + $noAnswers = $responses->where('response', 'no')->count(); + $naAnswers = $responses->where('response', 'na')->count(); + + // Calculate overall score + $totalScore = 0; + $maxPossibleScore = 0; + + foreach ($responses as $response) { + $weight = $response->criterion->weight ?? 1; + $maxPossibleScore += (100 * $weight); + + if ($response->response === 'yes') { + $totalScore += (100 * $weight); + } elseif ($response->response === 'na') { + // N/A responses don't count towards max score + $maxPossibleScore -= (100 * $weight); + } + } + + $overallScore = $maxPossibleScore > 0 ? ($totalScore / $maxPossibleScore) * 100 : 0; + + // Calculate domain scores + $domainScores = collect(); + + foreach ($tool->domains as $domain) { + $domainResponses = $responses->filter(function ($response) use ($domain) { + return $response->criterion->category->domain_id === $domain->id; + }); + + if ($domainResponses->count() > 0) { + $domainTotal = 0; + $domainMax = 0; + + foreach ($domainResponses as $response) { + $weight = $response->criterion->weight ?? 1; + $domainMax += (100 * $weight); + + if ($response->response === 'yes') { + $domainTotal += (100 * $weight); + } elseif ($response->response === 'na') { + $domainMax -= (100 * $weight); + } + } + + $domainPercentage = $domainMax > 0 ? ($domainTotal / $domainMax) * 100 : 0; + + $domainScores->push([ + 'domain_name_en' => $domain->name_en, + 'domain_name_ar' => $domain->name_ar, + 'score' => round($domainPercentage, 1), + 'max_score' => 100, + 'percentage' => round($domainPercentage, 1), + ]); + } + } + + // Check if user is premium for upgrade prompts + $isPremium = $user->isPremium(); + + return Inertia::render('FreeAssessment/Results', [ + 'assessment' => [ + 'id' => $assessment->id, + 'name' => $assessment->name, + 'organization' => $assessment->organization, + 'completed_at' => $assessment->completed_at, + 'overall_score' => round($overallScore, 1), + 'tool' => [ + 'name_en' => $assessment->tool->name_en, + 'name_ar' => $assessment->tool->name_ar, + ], + ], + 'statistics' => [ + 'total_questions' => $totalQuestions, + 'yes_answers' => $yesAnswers, + 'no_answers' => $noAnswers, + 'na_answers' => $naAnswers, + 'completion_rate' => 100, + ], + 'domainScores' => $domainScores, + 'user' => [ + 'id' => $user->id, + 'name' => $user->name, + 'email' => $user->email, + 'is_premium' => $isPremium, + ], + 'canEdit' => true, + 'locale' => app()->getLocale(), + ]); + } + + /** + * Show completion thank you page + */ + public function complete(Assessment $assessment) + { + $user = auth()->user(); + + if ($assessment->user_id !== $user->id || $assessment->assessment_type !== 'free') { + abort(403, 'Unauthorized access to assessment.'); + } + + return Inertia::render('FreeAssessment/Complete', [ + 'assessment' => [ + 'id' => $assessment->id, + 'tool' => [ + 'name_en' => $assessment->tool->name_en, + 'name_ar' => $assessment->tool->name_ar, + ], + ], + 'locale' => app()->getLocale(), + ]); + } + + /** + * Edit assessment - redirects to take route + */ + public function edit(Assessment $assessment) + { + $user = auth()->user(); + + // Check ownership and type + if ($assessment->user_id !== $user->id || $assessment->assessment_type !== 'free') { + abort(403, 'Unauthorized access to assessment.'); + } + + // Redirect to take route which handles both new and edit modes + return redirect()->route('free-assessment.take', $assessment); + } +} diff --git a/app/Http/Controllers/FreeUserController.php b/app/Http/Controllers/FreeUserController.php new file mode 100644 index 000000000..8beb8c626 --- /dev/null +++ b/app/Http/Controllers/FreeUserController.php @@ -0,0 +1,479 @@ +user(); + $locale = app()->getLocale(); + + // Only allow free users + if ($user->isPremium() || $user->isAdmin()) { + return redirect()->route('assessments.index'); + } + + // Load user relationships + $user->load(['details', 'subscription']); + + $assessments = Assessment::with(['tool']) + ->where('user_id', $user->id) + ->orderBy('created_at', 'desc') + ->get() + ->map(function ($assessment) use ($locale) { + $overallScore = null; + $resultsData = null; + if ($assessment->status === 'completed') { + try { + $results = $assessment->getResults(); + $overallScore = $results['overall_percentage'] ?? null; + $resultsData = [ + 'yes_count' => $results['yes_count'] ?? 0, + 'no_count' => $results['no_count'] ?? 0, + 'na_count' => $results['na_count'] ?? 0, + 'score_percentage' => $results['overall_percentage'] ?? 0, + 'weighted_score' => $results['overall_percentage'] ?? 0, + ]; + } catch (Exception $e) { + Log::warning('Failed to get results for assessment', [ + 'assessment_id' => $assessment->id, + 'error' => $e->getMessage() + ]); + } + } + + return [ + 'id' => $assessment->id, + 'title_en' => $assessment->title_en ?? $assessment->tool->name_en, + 'title_ar' => $assessment->title_ar ?? $assessment->tool->name_ar, + 'tool' => [ + 'id' => $assessment->tool->id, + 'name_en' => $assessment->tool->name_en, + 'name_ar' => $assessment->tool->name_ar, + 'description_en' => $assessment->tool->description_en, + 'description_ar' => $assessment->tool->description_ar, + 'image' => $assessment->tool->image ? asset('storage/' . $assessment->tool->image) : null, + ], + 'guest_name' => $assessment->name ?? $user->name, + 'guest_email' => $assessment->email ?? $user->email, + 'organization' => $assessment->organization, + 'status' => $assessment->status, + 'created_at' => $assessment->created_at->toISOString(), + 'updated_at' => $assessment->updated_at->toISOString(), + 'completed_at' => $assessment->completed_at?->toISOString(), + 'overall_score' => $overallScore, + 'completion_percentage' => $assessment->getCompletionPercentage(), + 'user_id' => $assessment->user_id, + 'results' => $resultsData, + ]; + }); + + $userLimits = [ + 'current_assessments' => $assessments->count(), + 'assessment_limit' => $user->getAssessmentLimit(), + 'can_create_more' => $user->canCreateAssessment(), + 'is_premium' => $user->isPremium(), + 'subscription_status' => $user->getSubscriptionStatus(), + ]; + + return Inertia::render('FreeUserAssessmentIndex', [ + 'assessments' => $assessments, + 'userLimits' => $userLimits, + 'locale' => $locale, + 'auth' => [ + 'user' => [ + 'id' => $user->id, + 'name' => $user->name, + 'email' => $user->email, + 'details' => $user->details ? [ + 'company_name' => $user->details->company_name, + 'phone' => $user->details->phone, + ] : null, + ] + ], + ]); + } + + /** + * Show assessment results for free users + */ + public function results(Assessment $assessment) + { + $user = auth()->user(); + $locale = app()->getLocale(); + + // Check if user can access this assessment + if ($assessment->user_id !== $user->id) { + abort(403, 'You do not have permission to view this assessment.'); + } + + // Only allow free users + if ($user->isPremium() || $user->isAdmin()) { + return redirect()->route('assessment.results', $assessment->id); + } + + // Load assessment with all related data + $assessment->load([ + 'tool', + 'responses.criterion.category.domain', + 'responses.criterion.category', + 'responses.criterion' + ]); + + // Get the results using the existing method + $results = $assessment->getResults(); + + $assessmentData = [ + 'id' => $assessment->id, + 'title_en' => $assessment->title_en ?? $assessment->tool->name_en, + 'title_ar' => $assessment->title_ar ?? $assessment->tool->name_ar, + 'tool' => [ + 'id' => $assessment->tool->id, + 'name_en' => $assessment->tool->name_en, + 'name_ar' => $assessment->tool->name_ar, + ], + 'name' => $assessment->name ?? $user->name, + 'email' => $assessment->email ?? $user->email, + 'organization' => $assessment->organization, + 'status' => $assessment->status, + 'created_at' => $assessment->created_at->format('Y-m-d H:i:s'), + 'completed_at' => $assessment->completed_at?->format('Y-m-d H:i:s'), + ]; + + return Inertia::render('FreeUserResults', [ + 'assessment' => $assessmentData, + 'results' => $results, + 'locale' => $locale, + 'userAccess' => [ + 'is_premium' => false, + 'pdf_report_level' => 'basic', + 'can_access_advanced_features' => false, + 'subscription_status' => $user->getSubscriptionStatus(), + ], + ]); + } + + /** + * Show edit form for free user assessment + */ + public function edit(Assessment $assessment) + { + $user = auth()->user(); + + // Check if user can access this assessment + if ($assessment->user_id !== $user->id) { + abort(403, 'You do not have permission to edit this assessment.'); + } + + // Only allow free users + if ($user->isPremium() || $user->isAdmin()) { + return redirect()->route('assessment.edit', $assessment->id); + } + + // Only allow editing of draft or in_progress assessments + if ($assessment->status === 'completed') { + return redirect()->route('free-user.results', $assessment->id) + ->with('error', 'Cannot edit completed assessments.'); + } + + // Load tool with all related data + $tool = Tool::with(['domains.categories.criteria' => function ($query) { + $query->where('status', 'active')->orderBy('order'); + }])->findOrFail($assessment->tool_id); + + // Load existing responses + $existingResponses = $assessment->responses() + ->with('criterion') + ->get() + ->keyBy('criterion_id') + ->map(function ($response) { + // Convert response back to numeric value for the form + return match ($response->response) { + 'yes' => 100, + 'no' => 0, + 'na' => 50, + default => 50 + }; + }) + ->toArray(); + + $existingNotes = $assessment->responses() + ->get() + ->keyBy('criterion_id') + ->map(fn($response) => $response->notes) + ->toArray(); + + $assessmentData = [ + 'tool' => [ + 'id' => $tool->id, + 'name_en' => $tool->name_en, + 'name_ar' => $tool->name_ar, + 'description_en' => $tool->description_en, + 'description_ar' => $tool->description_ar, + 'image' => $tool->image ? asset('storage/' . $tool->image) : null, + ], + 'domains' => $tool->domains->map(function ($domain) { + return [ + 'id' => $domain->id, + 'name_en' => $domain->name_en, + 'name_ar' => $domain->name_ar, + 'description_en' => $domain->description_en, + 'description_ar' => $domain->description_ar, + 'order' => $domain->order, + 'categories' => $domain->categories->map(function ($category) { + return [ + 'id' => $category->id, + 'name_en' => $category->name_en, + 'name_ar' => $category->name_ar, + 'description_en' => $category->description_en, + 'description_ar' => $category->description_ar, + 'order' => $category->order, + 'criteria' => $category->criteria->map(function ($criterion) { + return [ + 'id' => $criterion->id, + 'name_en' => $criterion->name_en, + 'name_ar' => $criterion->name_ar, + 'description_en' => $criterion->description_en, + 'description_ar' => $criterion->description_ar, + 'order' => $criterion->order, + 'requires_attachment' => $criterion->requires_attachment, + ]; + }), + ]; + }), + ]; + }), + ]; + + return Inertia::render('assessment/FreeUserEdit', [ + 'assessment' => [ + 'id' => $assessment->id, + 'name' => $assessment->name, + 'email' => $assessment->email, + 'organization' => $assessment->organization, + 'status' => $assessment->status, + ], + 'assessmentData' => $assessmentData, + 'existingResponses' => $existingResponses, + 'existingNotes' => $existingNotes, + 'locale' => app()->getLocale(), + 'user' => [ + 'id' => $user->id, + 'name' => $user->name, + 'email' => $user->email, + 'details' => $user->details ? [ + 'company_name' => $user->details->company_name, + ] : null, + ], + ]); + } + + /** + * Update free user assessment + */ + public function update(Request $request, Assessment $assessment) + { + $user = auth()->user(); + + // Check if user can access this assessment + if ($assessment->user_id !== $user->id) { + abort(403, 'You do not have permission to update this assessment.'); + } + + // Only allow free users + if ($user->isPremium() || $user->isAdmin()) { + return redirect()->route('assessment.update', $assessment->id); + } + + // Only allow editing of draft or in_progress assessments + if ($assessment->status === 'completed') { + return response()->json(['error' => 'Cannot edit completed assessments.'], 403); + } + + $validated = $request->validate([ + 'name' => 'required|string|max:255', + 'email' => 'required|email|max:255', + 'organization' => 'nullable|string|max:255', + 'responses' => 'required|array', + 'notes' => 'array', + 'action' => 'required|in:save,submit', + ]); + + try { + DB::beginTransaction(); + + // If submitting, remove any previous free assessments for this tool + if ($validated['action'] === 'submit') { + Assessment::where('user_id', $user->id) + ->where('tool_id', $assessment->tool_id) + ->where('id', '!=', $assessment->id) + ->where('assessment_type', 'free') + ->delete(); + } + + // Update assessment basic info + $assessment->update([ + 'name' => $validated['name'], + 'email' => $validated['email'], + 'organization' => $validated['organization'], + 'assessment_type' => 'free', + 'status' => $validated['action'] === 'submit' ? 'completed' : 'in_progress', + 'completed_at' => $validated['action'] === 'submit' ? now() : null, + ]); + + // Clear existing responses + $assessment->responses()->delete(); + + // Save new responses + foreach ($validated['responses'] as $criterionId => $responseValue) { + if ($responseValue !== null) { + // Convert numeric response to string + $responseString = match ((int)$responseValue) { + 100 => 'yes', + 0 => 'no', + 50 => 'na', + default => 'na' + }; + + AssessmentResponse::create([ + 'assessment_id' => $assessment->id, + 'criterion_id' => $criterionId, + 'response' => $responseString, + 'notes' => $validated['notes'][$criterionId] ?? null, + ]); + } + } + + // Calculate results if submitted + if ($validated['action'] === 'submit') { + $assessment->calculateResults(); + } + + DB::commit(); + + if ($validated['action'] === 'submit') { + return redirect()->route('free-user.results', $assessment->id) + ->with('success', 'Assessment completed successfully!'); + } else { + return redirect()->route('free-user.index') + ->with('success', 'Assessment saved successfully!'); + } + + } catch (Exception $e) { + DB::rollBack(); + Log::error('Free user assessment update failed', [ + 'error' => $e->getMessage(), + 'assessment_id' => $assessment->id, + 'user_id' => $user->id + ]); + + return back()->withErrors([ + 'submit' => 'There was an error updating your assessment. Please try again.' + ]); + } + } + + /** + * Submit free user assessment + */ + public function submit(Request $request) + { + $user = auth()->user(); + + // Double-check assessment limits + if (!$user->canCreateAssessment()) { + return response()->json([ + 'error' => 'Assessment limit exceeded. Please upgrade to premium.' + ], 403); + } + + // Only allow free users + if ($user->isPremium() || $user->isAdmin()) { + return redirect()->route('assessment.submit'); + } + + Log::info('Free user assessment submission started', $request->all()); + + $validated = $request->validate([ + 'tool_id' => 'required|exists:tools,id', + 'name' => 'required|string|max:255', + 'email' => 'required|email|max:255', + 'organization' => 'nullable|string|max:255', + 'responses' => 'required|array', + 'notes' => 'array', + ]); + + try { + DB::beginTransaction(); + + // Remove any previous free assessments for this tool + Assessment::where('user_id', $user->id) + ->where('tool_id', $validated['tool_id']) + ->where('assessment_type', 'free') + ->delete(); + + // Create the assessment + $assessment = Assessment::create([ + 'tool_id' => $validated['tool_id'], + 'user_id' => $user->id, + 'name' => $validated['name'], + 'email' => $validated['email'], + 'organization' => $validated['organization'], + 'assessment_type' => 'free', + 'status' => 'completed', + 'started_at' => now(), + 'completed_at' => now(), + ]); + + // Process responses + foreach ($validated['responses'] as $criterionId => $responseValue) { + // Convert numeric response back to string + $responseString = match ((int)$responseValue) { + 100 => 'yes', + 0 => 'no', + 50 => 'na', + default => 'na' + }; + + AssessmentResponse::create([ + 'assessment_id' => $assessment->id, + 'criterion_id' => $criterionId, + 'response' => $responseString, + 'notes' => $validated['notes'][$criterionId] ?? null, + ]); + } + + // Calculate results + $assessment->calculateResults(); + + DB::commit(); + + return redirect()->route('free-user.results', $assessment->id) + ->with('success', 'Assessment completed successfully!'); + + } catch (Exception $e) { + DB::rollBack(); + Log::error('Free user assessment submission failed', [ + 'error' => $e->getMessage(), + 'user_id' => $user->id + ]); + + return back()->withErrors([ + 'submit' => 'There was an error submitting your assessment. Please try again.' + ]); + } + } +} diff --git a/app/Http/Controllers/FreeUserPDFController.php b/app/Http/Controllers/FreeUserPDFController.php new file mode 100644 index 000000000..738fa5714 --- /dev/null +++ b/app/Http/Controllers/FreeUserPDFController.php @@ -0,0 +1,850 @@ +user_id !== $user->id) { + abort(403, 'You do not have permission to access this assessment.'); + } + + // Check if user is free (not premium) + if ($user->isPremium()) { + return redirect()->route('assessments.report.download', $assessment->id); + } + + Log::info('Free user PDF download requested', [ + 'assessment_id' => $assessment->id, + 'user_id' => $user->id + ]); + + try { + // Load assessment with necessary relationships + $assessment->load([ + 'tool', + 'responses' => function($query) { + $query->with([ + 'criterion' => function($q) { + $q->with([ + 'category' => function($q2) { + $q2->with('domain'); + } + ]); + } + ]); + } + ]); + + // Get assessment results + $results = $this->getAssessmentResults($assessment); + + // Generate PDF using mPDF + $pdf = $this->generateFreeUserPDF($assessment, $results, $user); + + // Create filename + $filename = $this->generateFilename($assessment); + + Log::info('Free user PDF generated successfully', [ + 'assessment_id' => $assessment->id, + 'filename' => $filename + ]); + + // FORCE DOWNLOAD - Set proper headers + return Response::make($pdf, 200, [ + 'Content-Type' => 'application/pdf', + 'Content-Disposition' => 'attachment; filename="' . $filename . '"', + 'Content-Length' => strlen($pdf), + 'Cache-Control' => 'no-cache, no-store, must-revalidate', + 'Pragma' => 'no-cache', + 'Expires' => '0', + ]); + + } catch (Exception $e) { + Log::error('Free user PDF generation failed', [ + 'assessment_id' => $assessment->id, + 'user_id' => $user->id, + 'error' => $e->getMessage(), + 'trace' => $e->getTraceAsString() + ]); + + return back()->withErrors([ + 'pdf' => 'Failed to generate PDF report. Please try again.' + ]); + } + } + + /** + * Get assessment results data - FIXED to include all domains + */ + private function getAssessmentResults(Assessment $assessment): array + { + try { + $results = $assessment->getResults(); + + return [ + 'overall_percentage' => $results['overall_percentage'] ?? 0, + 'total_criteria' => $results['total_criteria'] ?? 0, + 'applicable_criteria' => $results['applicable_criteria'] ?? 0, + 'yes_count' => $results['yes_count'] ?? 0, + 'no_count' => $results['no_count'] ?? 0, + 'na_count' => $results['na_count'] ?? 0, + 'domain_results' => $results['domain_results'] ?? [], + 'completion_date' => $assessment->completed_at, + ]; + } catch (Exception $e) { + Log::error('Failed to get assessment results for PDF', [ + 'assessment_id' => $assessment->id, + 'error' => $e->getMessage() + ]); + + // Fallback calculation if getResults fails + $responses = $assessment->responses; + $yesCount = $responses->where('response', 'yes')->count(); + $noCount = $responses->where('response', 'no')->count(); + $naCount = $responses->where('response', 'na')->count(); + $total = $yesCount + $noCount + $naCount; + $applicable = $yesCount + $noCount; + + return [ + 'overall_percentage' => $applicable > 0 ? round(($yesCount / $applicable) * 100, 2) : 0, + 'total_criteria' => $total, + 'applicable_criteria' => $applicable, + 'yes_count' => $yesCount, + 'no_count' => $noCount, + 'na_count' => $naCount, + 'domain_results' => [], + 'completion_date' => $assessment->completed_at, + ]; + } + } + + /** + * Generate PDF using mPDF with Arial font + */ + private function generateFreeUserPDF(Assessment $assessment, array $results, $user): string + { + try { + // Initialize mPDF with better configuration + $mpdf = new Mpdf([ + 'mode' => 'utf-8', + 'format' => 'A4', + 'orientation' => 'P', + 'margin_left' => 15, + 'margin_right' => 15, + 'margin_top' => 20, + 'margin_bottom' => 15, + 'default_font' => 'arial', + 'default_font_size' => 10, + 'tempDir' => storage_path('app/temp') + ]); + + // Get HTML content + $html = $this->generateCompactHTML($assessment, $results, $user); + + // Write HTML to PDF + $mpdf->WriteHTML($html); + + // Return PDF as string + return $mpdf->Output('', 'S'); + + } catch (Exception $e) { + Log::error('mPDF generation failed', [ + 'error' => $e->getMessage() + ]); + throw $e; + } + } + + /** + * Generate COMPACT PROFESSIONAL HTML content for free user report + */ + private function generateCompactHTML(Assessment $assessment, array $results, $user): string + { + $overallScore = $results['overall_percentage']; + $assessmentStatus = $this->getAssessmentStatus($overallScore); + $scoreColor = $this->getScoreColor($overallScore); + $domainResults = $results['domain_results'] ?? []; + + $html = ' + + + + + + + +
+ ASSESSMENT HUB - PROFESSIONAL EVALUATION REPORT
+ Generated: ' . now()->format('M j, Y g:i A') . ' | Report ID: #' . $assessment->id . ' +
+ +
+

ASSESSMENT REPORT

+

' . htmlspecialchars($assessment->tool->name_en) . ' - Free Plan Analysis

+
+ +
+
+
+
📋 Assessment Information
+
+ + + + + + + + + '; + + if ($assessment->organization) { + $html .= ' + + + + '; + } + + $html .= ' + + + + + + + + + + + + +
Assessor' . htmlspecialchars($assessment->name) . '
Email' . htmlspecialchars($assessment->email) . '
Organization' . htmlspecialchars($assessment->organization) . '
Assessment Tool' . htmlspecialchars($assessment->tool->name_en) . '
Completed Date' . ($assessment->completed_at ? $assessment->completed_at->format('M j, Y g:i A') : 'In Progress') . '
Assessment ID#' . $assessment->id . '
+
+
+
+ +
+
+
+
' . round($overallScore) . '%
+
Overall Score
+
+
+ ' . $assessmentStatus['label'] . ' +
+
+
+
+ +
+
📊 Results Summary
+
+
+
+ ' . $results['yes_count'] . ' + Yes +
+
+ ' . $results['no_count'] . ' + No +
+
+ ' . $results['na_count'] . ' + N/A +
+
+ ' . $results['total_criteria'] . ' + Total +
+
+
+
'; + + // Add Domain Results in compact grid + if (!empty($domainResults)) { + $html .= ' +
+
🎯 Domain Performance
+
+
'; + + foreach ($domainResults as $domain) { + $domainScore = $domain['score_percentage']; + $domainScoreColor = $this->getScoreColor($domainScore); + + $html .= ' +
+
+ ' . htmlspecialchars($domain['domain_name']) . ' + + ' . round($domainScore) . '% + +
+
+
+ ' . $domain['yes_count'] . ' + Yes +
+
+ ' . $domain['no_count'] . ' + No +
+
+ ' . $domain['na_count'] . ' + N/A +
+
+ ' . $domain['total_criteria'] . ' + Total +
+
+
'; + } + + $html .= ' +
+
+
'; + } + + $html .= ' +
+
📝 Assessment Summary & Recommendations
+
+
+

Assessment Status: ' . $assessmentStatus['label'] . '

+

' . $assessmentStatus['description'] . '

+
+ + ' . $this->getCompactRecommendations($overallScore, $domainResults) . ' +
+
+ +
+

🚀 UNLOCK COMPREHENSIVE ANALYSIS

+

Upgrade to Premium for detailed category breakdowns, advanced analytics, AI-powered recommendations, action plans, and unlimited assessments.

+
+ + + + '; + + return $html; + } + + /** + * Get compact recommendations + */ + private function getCompactRecommendations(float $overallScore, array $domainResults): string + { + $recommendations = ''; + + if ($overallScore >= 80) { + $recommendations = ' +
+

🏆 Excellence Maintenance Strategy:

+ +
'; + } elseif ($overallScore >= 70) { + $recommendations = ' +
+

📈 Performance Enhancement Plan:

+ +
'; + } elseif ($overallScore >= 60) { + $recommendations = ' +
+

⚡ Priority Improvement Initiative:

+ +
'; + } else { + $recommendations = ' +
+

🚨 Urgent Transformation Program:

+ +
'; + } + + // Add priority domains if available + if (!empty($domainResults)) { + $lowPerformingDomains = array_filter($domainResults, function($domain) { + return $domain['score_percentage'] < 70; + }); + + if (!empty($lowPerformingDomains)) { + $domainNames = array_column($lowPerformingDomains, 'domain_name'); + $domainList = implode(', ', $domainNames); + + $recommendations .= ' +
+
🎯 Priority Domains Requiring Attention:
+

The following domains scored below 70%: ' . $domainList . '

+

Consider developing domain-specific improvement plans with targeted actions and timelines.

+
'; + } + } + + return $recommendations; + } + + /** + * Get assessment status based on score + */ + private function getAssessmentStatus(float $score): array + { + if ($score >= 80) { + return [ + 'label' => '✅ EXCELLENT', + 'description' => 'Outstanding results! Your organization demonstrates excellent capabilities across all assessed areas.', + 'bg_color' => '#dcfce7', + 'text_color' => '#166534', + ]; + } elseif ($score >= 70) { + return [ + 'label' => '✅ GOOD', + 'description' => 'Solid results with good foundations. Strong capabilities with some enhancement opportunities.', + 'bg_color' => '#dbeafe', + 'text_color' => '#1e40af', + ]; + } elseif ($score >= 60) { + return [ + 'label' => '⚠️ ACCEPTABLE', + 'description' => 'Acceptable baseline with opportunities for improvement. Focus on enhancing key areas.', + 'bg_color' => '#fef3c7', + 'text_color' => '#92400e', + ]; + } elseif ($score >= 40) { + return [ + 'label' => '⚠️ NEEDS IMPROVEMENT', + 'description' => 'Performance below optimal levels. Immediate attention required in multiple areas.', + 'bg_color' => '#fed7d7', + 'text_color' => '#c53030', + ]; + } else { + return [ + 'label' => '❌ CRITICAL', + 'description' => 'Significant performance gaps identified. Urgent comprehensive review required.', + 'bg_color' => '#fecaca', + 'text_color' => '#991b1b', + ]; + } + } + + /** + * Get score color based on percentage + */ + private function getScoreColor(float $score): string + { + if ($score >= 80) return '#10b981'; // emerald + if ($score >= 70) return '#3b82f6'; // blue + if ($score >= 60) return '#f59e0b'; // amber + if ($score >= 40) return '#f97316'; // orange + return '#ef4444'; // red + } + + /** + * Generate filename for the PDF + */ + private function generateFilename(Assessment $assessment): string + { + $toolName = str_replace([' ', '/', '\\', ':', '*', '?', '"', '<', '>', '|'], '_', $assessment->tool->name_en); + $date = now()->format('Y-m-d'); + $assessmentId = $assessment->id; + + return "Assessment_Report_{$toolName}_{$assessmentId}_{$date}.pdf"; + } +} diff --git a/app/Http/Controllers/GuestAssessmentController.php b/app/Http/Controllers/GuestAssessmentController.php new file mode 100644 index 000000000..d14c49d95 --- /dev/null +++ b/app/Http/Controllers/GuestAssessmentController.php @@ -0,0 +1,756 @@ +user(); + + + + Log::info('Index method called', ['user_id' => $user?->id ?? 'guest']); + + // If user is authenticated, redirect them to their appropriate page + if ($user) { + try { + // Load relationships safely + $user->load(['subscription', 'details', 'roles']); + Log::info('User relationships loaded', ['user_id' => $user->id]); + + // Create default subscription/details if missing + if (!$user->subscription || !$user->details) { + Log::info('Creating default subscription/details', ['user_id' => $user->id]); + $user->createDefaultSubscriptionAndDetails(); + $user->refresh(); + } + + // Redirect based on user type - FIXED ROUTES + if ($user->isAdmin()) { + Log::info('Redirecting admin to dashboard', ['user_id' => $user->id]); + return redirect()->route('dashboard'); + } elseif ($user->isPremium()) { + Log::info('Redirecting premium to dashboard', ['user_id' => $user->id]); + return redirect()->route('dashboard'); + } else { + Log::info('Redirecting free user to assessment tools', ['user_id' => $user->id]); + return redirect()->route('assessment-tools'); + } + } catch (Exception $e) { + // Log error and fallback to assessment tools + Log::error('Home redirect failed', [ + 'user_id' => $user->id, + 'error' => $e->getMessage(), + 'trace' => $e->getTraceAsString() + ]); + + return redirect()->route('assessment-tools'); + } + } + + // Show welcome page for guests + Log::info('Showing welcome page for guest'); + return $this->renderWelcomePage(); + } + + /** + * Show the home2 page (/home) - For free users to register/subscribe + */ + public function index2() + { + $user = auth()->user(); + + Log::info('Index2 method called', ['user_id' => $user?->id ?? 'guest']); + + try { + // If user is authenticated, show them the welcome page with user info + if ($user) { + Log::info('Authenticated user accessing home2', ['user_id' => $user->id]); + + // Load relationships safely + $user->load(['subscription', 'details', 'roles']); + + // Create default subscription/details if missing + if (!$user->subscription || !$user->details) { + Log::info('Creating default subscription/details for user', ['user_id' => $user->id]); + $user->createDefaultSubscriptionAndDetails(); + $user->refresh(); + } + + // Show welcome page with user authentication info (NO BLOCKING) + return $this->renderWelcomePage([ + 'user' => [ + 'id' => $user->id, + 'name' => $user->name, + 'email' => $user->email, + 'subscription' => $user->subscription ? [ + 'plan_type' => $user->subscription->plan_type, + 'status' => $user->subscription->status, + ] : null, + ] + ]); + + } else { + Log::info('Guest user accessing home2'); + // Show welcome page for guests + return $this->renderWelcomePage(); + } + + } catch (Exception $e) { + // Log detailed error information + Log::error('Index2 failed', [ + 'user_id' => $user?->id ?? 'guest', + 'error' => $e->getMessage(), + 'file' => $e->getFile(), + 'line' => $e->getLine(), + 'trace' => $e->getTraceAsString() + ]); + + // Fallback - show basic welcome page + return $this->renderWelcomePage($user ? [ + 'user' => [ + 'id' => $user->id, + 'name' => $user->name, + 'email' => $user->email, + ] + ] : null); + } + } + + /** + * Render welcome page with consistent structure + */ + private function renderWelcomePage($authData = null) + { + $data = [ + 'auth' => $authData ? $authData : ['user' => null], + 'locale' => app()->getLocale() + ]; + + Log::info('Rendering Welcome2 page', [ + 'auth_data' => $authData ? 'provided' : 'null', + 'locale' => $data['locale'] + ]); + + try { + return Inertia::render('Welcome2', $data); + } catch (Exception $e) { + Log::error('Failed to render Welcome2', [ + 'error' => $e->getMessage(), + 'file' => $e->getFile(), + 'line' => $e->getLine() + ]); + + // Ultimate fallback - simple response + return response()->json([ + 'error' => 'Page rendering failed', + 'debug' => [ + 'message' => $e->getMessage(), + 'file' => basename($e->getFile()), + 'line' => $e->getLine() + ] + ], 500); + } + } + + /** + * Start a new assessment + */ + public function start(Request $request) + { + Log::info('Assessment start requested', $request->all()); + + $validator = Validator::make($request->all(), [ + 'tool_id' => 'required|exists:tools,id', + 'name' => 'required|string|max:255', + 'email' => 'required|email|max:255', + 'organization' => 'nullable|string|max:255', + ]); + + if ($validator->fails()) { + Log::warning('Assessment start validation failed', $validator->errors()->toArray()); + return back()->withErrors($validator)->withInput(); + } + + try { + $tool = Tool::with(['domains.categories.criteria'])->findOrFail($request->tool_id); + + // Create assessment + $assessment = Assessment::create([ + 'user_id' => Auth::id(), // This will be null for guests + 'tool_id' => $tool->id, + 'name' => $request->name, + 'email' => $request->email, + 'organization' => $request->organization, + 'status' => 'in_progress', + 'started_at' => now(), + ]); + + Log::info('Assessment created', ['assessment_id' => $assessment->id]); + + // Create guest session tracking + if (!Auth::check()) { + GuestSession::createFromRequest($request, $assessment); + Log::info('Guest session created', ['assessment_id' => $assessment->id]); + } + + return redirect()->route('assessment.take', ['assessment' => $assessment->id]); + + } catch (Exception $e) { + Log::error('Assessment start failed', [ + 'error' => $e->getMessage(), + 'request_data' => $request->all() + ]); + + return back()->withErrors(['general' => 'Failed to start assessment. Please try again.']); + } + } + + /** + * Take the assessment + */ + public function take(Assessment $assessment) + { + Log::info('Assessment take requested', ['assessment_id' => $assessment->id]); + + try { + // Load assessment with all related data + $assessment->load([ + 'tool.domains.categories.criteria' => function ($query) { + $query->orderBy('order'); + }, + 'responses' + ]); + + // Check if user can access this assessment + if (Auth::check() && $assessment->user_id && $assessment->user_id !== Auth::id()) { + Log::warning('Unauthorized assessment access attempt', [ + 'assessment_id' => $assessment->id, + 'user_id' => Auth::id(), + 'assessment_user_id' => $assessment->user_id + ]); + abort(403); + } + + // Get existing responses + $existingResponses = $assessment->responses->keyBy('criterion_id'); + + return Inertia::render('assessment/Take', [ + 'assessment' => $assessment, + 'tool' => $assessment->tool, + 'existingResponses' => $existingResponses, + 'completionPercentage' => $assessment->getCompletionPercentage(), + ]); + + } catch (Exception $e) { + Log::error('Assessment take failed', [ + 'assessment_id' => $assessment->id, + 'error' => $e->getMessage() + ]); + + return back()->withErrors(['general' => 'Failed to load assessment. Please try again.']); + } + } + + /** + * Save assessment response + */ + public function saveResponse(Request $request, Assessment $assessment) + { + Log::info('Save response requested', [ + 'assessment_id' => $assessment->id, + 'criterion_id' => $request->criterion_id + ]); + + try { + $validator = Validator::make($request->all(), [ + 'criterion_id' => 'required|exists:criteria,id', + 'response' => 'required|in:yes,no,na', + 'notes' => 'nullable|string|max:2000', + 'attachment' => 'nullable|file|max:10240|mimes:pdf,doc,docx,jpg,jpeg,png,txt', + ]); + + if ($validator->fails()) { + Log::warning('Save response validation failed', $validator->errors()->toArray()); + return back()->withErrors($validator); + } + + // Check if user can access this assessment + if (Auth::check() && $assessment->user_id && $assessment->user_id !== Auth::id()) { + Log::warning('Unauthorized response save attempt'); + abort(403); + } + + $responseData = [ + 'assessment_id' => $assessment->id, + 'criterion_id' => $request->criterion_id, + 'response' => $request->response, + 'notes' => $request->input('notes'), + ]; + + // Handle file upload + if ($request->hasFile('attachment')) { + $file = $request->file('attachment'); + $fileName = time() . '_' . $request->criterion_id . '_' . $file->getClientOriginalName(); + $filePath = $file->storeAs('assessments/' . $assessment->id, $fileName, 'public'); + $responseData['attachment'] = $filePath; + Log::info('File uploaded', ['file_path' => $filePath]); + } + + // Save or update response + AssessmentResponse::updateOrCreate( + [ + 'assessment_id' => $assessment->id, + 'criterion_id' => $request->criterion_id, + ], + $responseData + ); + + // Recalculate completion percentage + $completionPercentage = $assessment->getCompletionPercentage(); + $isComplete = $assessment->isComplete(); + + // Update assessment status if needed + if ($isComplete && $assessment->status !== 'completed') { + $assessment->update([ + 'status' => 'completed', + 'completed_at' => now(), + ]); + // Calculate results + $assessment->calculateResults(); + Log::info('Assessment completed and results calculated', ['assessment_id' => $assessment->id]); + } + + // Return back with success message for Inertia + return back()->with('success', 'Response saved successfully'); + + } catch (Exception $e) { + Log::error('Error saving assessment response', [ + 'assessment_id' => $assessment->id, + 'criterion_id' => $request->criterion_id ?? null, + 'error' => $e->getMessage(), + 'trace' => $e->getTraceAsString() + ]); + + return back()->withErrors(['response' => 'An error occurred while saving your response']); + } + } + + /** + * Show limited assessment results for guests + */ + public function results(Assessment $assessment) + { + Log::info('Results requested', ['assessment_id' => $assessment->id]); + + try { + // Check if user can access this assessment + if (Auth::check() && $assessment->user_id && $assessment->user_id !== Auth::id()) { + Log::warning('Unauthorized results access attempt'); + abort(403); + } + + if (!$assessment->isComplete()) { + Log::info('Assessment not complete, redirecting to take', ['assessment_id' => $assessment->id]); + return redirect()->route('assessment.take', $assessment) + ->with('error', 'Please complete the assessment to view results.'); + } + + // Load necessary relationships + $assessment->load(['tool', 'results.domain', 'results.category']); + + // Get basic results (limited for guests) + $results = $assessment->results()->with(['domain', 'category'])->get(); + $domainResults = $results->where('category_id', null); + + // Get guest session data + $guestSession = GuestSession::where('assessment_id', $assessment->id)->first(); + + // Format basic results for guests (limited information) + $basicResults = [ + 'overall_percentage' => (float) $domainResults->avg('score_percentage') ?? 0, + 'total_criteria' => $domainResults->sum('total_criteria'), + 'applicable_criteria' => $domainResults->sum('applicable_criteria'), + 'yes_count' => $domainResults->sum('yes_count'), + 'no_count' => $domainResults->sum('no_count'), + 'na_count' => $domainResults->sum('na_count'), + 'domain_count' => $domainResults->count(), + ]; + + // Format assessment data for frontend + $assessmentData = [ + 'id' => $assessment->id, + 'name' => $assessment->name, + 'email' => $assessment->email, + 'organization' => $assessment->organization, + 'status' => $assessment->status, + 'completed_at' => $assessment->completed_at ? $assessment->completed_at->toISOString() : null, + 'created_at' => $assessment->created_at->toISOString(), + 'tool' => [ + 'id' => $assessment->tool->id, + 'name_en' => $assessment->tool->name_en, + 'name_ar' => $assessment->tool->name_ar, + ] + ]; + + // Format session data + $sessionData = null; + if ($guestSession) { + $sessionData = [ + 'device_type' => $guestSession->device_type, + 'browser' => $guestSession->browser, + 'operating_system' => $guestSession->operating_system, + 'location' => $guestSession->country . ', ' . $guestSession->city, + 'ip_address' => $guestSession->ip_address, + ]; + } + + Log::info('Results prepared successfully', ['assessment_id' => $assessment->id]); + + return Inertia::render('assessment/GuestResults', [ + 'assessment' => $assessmentData, + 'results' => $basicResults, + 'sessionData' => $sessionData, + ]); + + } catch (Exception $e) { + Log::error('Results display failed', [ + 'assessment_id' => $assessment->id, + 'error' => $e->getMessage(), + 'trace' => $e->getTraceAsString() + ]); + + return back()->withErrors(['general' => 'Failed to load results. Please try again.']); + } + } + + /** + * Send email with results to guest + */ + public function sendEmail(Assessment $assessment) + { + Log::info('Send email requested', ['assessment_id' => $assessment->id]); + + try { + $results = $assessment->results()->with(['domain'])->get(); + $domainResults = $results->where('category_id', null); + + $basicResults = [ + 'overall_percentage' => (float) $domainResults->avg('score_percentage') ?? 0, + 'total_criteria' => $domainResults->sum('total_criteria'), + 'applicable_criteria' => $domainResults->sum('applicable_criteria'), + 'yes_count' => $domainResults->sum('yes_count'), + 'no_count' => $domainResults->sum('no_count'), + 'na_count' => $domainResults->sum('na_count'), + ]; + + // Generate results URL + $resultsUrl = route('guest.assessment.results', $assessment->id); + + // Send email + Mail::to($assessment->email)->send( + new GuestAssessmentCompleted($assessment, $resultsUrl, $basicResults) + ); + + Log::info('Email sent successfully', ['assessment_id' => $assessment->id]); + + return response()->json(['success' => true]); + + } catch (Exception $e) { + Log::error('Error sending guest assessment email', [ + 'assessment_id' => $assessment->id, + 'email' => $assessment->email, + 'error' => $e->getMessage() + ]); + + return response()->json(['error' => 'Failed to send email'], 500); + } + } + + /** + * Update guest session with additional device information + */ + public function updateSession(Request $request, Assessment $assessment) + { + Log::info('Update session requested', ['assessment_id' => $assessment->id]); + + try { + $guestSession = GuestSession::where('assessment_id', $assessment->id)->first(); + + if ($guestSession) { + $sessionData = $guestSession->session_data ?? []; + $sessionData = array_merge($sessionData, [ + 'device_info' => $request->input('device_info'), + 'completed_at' => $request->input('completed_at'), + 'updated_at' => now(), + ]); + + $guestSession->update([ + 'session_data' => $sessionData, + 'completed_at' => $request->input('completed_at') ? + \Carbon\Carbon::parse($request->input('completed_at')) : now(), + ]); + + Log::info('Session updated successfully', ['assessment_id' => $assessment->id]); + } + + return response()->json(['success' => true]); + + } catch (Exception $e) { + Log::error('Error updating guest session', [ + 'assessment_id' => $assessment->id, + 'error' => $e->getMessage() + ]); + + return response()->json(['error' => 'Failed to update session'], 500); + } + } + + /** + * Show assessment form with pre-filled data for authenticated users + */ + public function create(Tool $tool) + { + $user = Auth::user(); + + Log::info('Assessment create requested', [ + 'tool_id' => $tool->id, + 'user_id' => $user?->id ?? 'guest' + ]); + + try { + return Inertia::render('assessment/Create', [ + 'tool' => $tool->load(['domains.categories']), + 'prefillData' => $user ? [ + 'name' => $user->name, + 'email' => $user->email, + ] : null, + ]); + } catch (Exception $e) { + Log::error('Assessment create failed', [ + 'tool_id' => $tool->id, + 'error' => $e->getMessage() + ]); + + return back()->withErrors(['general' => 'Failed to load assessment form.']); + } + } + + /** + * Update assessment details (notes and attachment) + */ + public function updateDetails(Request $request, Assessment $assessment) + { + Log::info('Update details requested', ['assessment_id' => $assessment->id]); + + $validator = Validator::make($request->all(), [ + 'notes' => 'nullable|string|max:2000', + 'attachment' => 'nullable|file|max:10240|mimes:pdf,doc,docx,jpg,jpeg,png,txt', + ]); + + if ($validator->fails()) { + Log::warning('Update details validation failed', $validator->errors()->toArray()); + return response()->json(['errors' => $validator->errors()], 422); + } + + try { + // Check if user can access this assessment + if (Auth::check() && $assessment->user_id && $assessment->user_id !== Auth::id()) { + Log::warning('Unauthorized details update attempt'); + abort(403); + } + + $updateData = ['notes' => $request->input('notes')]; + + // Handle file upload + if ($request->hasFile('attachment')) { + $file = $request->file('attachment'); + $fileName = time() . '_' . $file->getClientOriginalName(); + $filePath = $file->storeAs('assessments/' . $assessment->id, $fileName, 'public'); + $updateData['attachment'] = $filePath; + Log::info('Attachment uploaded', ['file_path' => $filePath]); + } + + $assessment->update($updateData); + + Log::info('Details updated successfully', ['assessment_id' => $assessment->id]); + + return response()->json(['success' => true]); + + } catch (Exception $e) { + Log::error('Update details failed', [ + 'assessment_id' => $assessment->id, + 'error' => $e->getMessage() + ]); + + return response()->json(['error' => 'Failed to update details'], 500); + } + } + + /** + * Submit assessment + */ + public function submit(Request $request, Assessment $assessment) + { + Log::info('Assessment submit requested', [ + 'assessment_id' => $assessment->id, + 'responses_count' => count($request->input('responses', [])) + ]); + + // Check if user can access this assessment + if (Auth::check() && $assessment->user_id && $assessment->user_id !== Auth::id()) { + Log::warning('Unauthorized submit attempt'); + abort(403); + } + + // Validate the request data + $request->validate([ + 'responses' => 'required|array', + ]); + + try { + DB::beginTransaction(); + + // Process responses from the frontend + if (isset($request->responses)) { + foreach ($request->responses as $criterionId => $responseData) { + // Handle different response formats + if (is_array($responseData)) { + $response = $responseData['response'] ?? null; + $notes = $responseData['notes'] ?? null; + $attachment = $responseData['attachment'] ?? null; + } else { + $response = $responseData; + $notes = null; + $attachment = null; + } + + if (!$response) continue; + + $data = [ + 'assessment_id' => $assessment->id, + 'criterion_id' => $criterionId, + 'response' => $response, + 'notes' => $notes, + ]; + + // Handle file upload if present + if ($attachment && $attachment instanceof \Illuminate\Http\UploadedFile) { + $filename = time() . '_' . $criterionId . '_' . $attachment->getClientOriginalName(); + $path = $attachment->storeAs('assessment_attachments', $filename, 'public'); + $data['attachment'] = $path; + Log::info('Response attachment uploaded', ['file_path' => $path]); + } + + // Update or create response + AssessmentResponse::updateOrCreate( + [ + 'assessment_id' => $assessment->id, + 'criterion_id' => $criterionId, + ], + $data + ); + } + } + + // Mark assessment as completed + $assessment->markAsCompleted(); + + // Update guest session completion + $guestSession = GuestSession::where('assessment_id', $assessment->id)->first(); + if ($guestSession) { + $guestSession->update(['completed_at' => now()]); + } + + DB::commit(); + + Log::info('Assessment submitted successfully', ['assessment_id' => $assessment->id]); + + // Redirect to guest results page (limited view) + return redirect()->route('guest.assessment.results', $assessment) + ->with('success', 'Assessment submitted successfully!'); + + } catch (Exception $e) { + DB::rollBack(); + + Log::error('Assessment submission error', [ + 'assessment_id' => $assessment->id, + 'error' => $e->getMessage(), + 'trace' => $e->getTraceAsString() + ]); + + return back()->withErrors(['assessment' => 'There was an error submitting your assessment. Please try again.']); + } + } + + /** + * Get analytics data for admin dashboard + */ + public function getAnalytics(Request $request) + { + Log::info('Analytics requested'); + + // Only allow authenticated admin users + if (!Auth::check() || !Auth::user()->isAdmin()) { + Log::warning('Unauthorized analytics access attempt'); + abort(403); + } + + try { + $startDate = $request->input('start_date', now()->subDays(30)); + $endDate = $request->input('end_date', now()); + + $guestSessions = GuestSession::with(['assessment.tool']) + ->whereBetween('created_at', [$startDate, $endDate]) + ->get(); + + $analytics = [ + 'total_sessions' => $guestSessions->count(), + 'unique_emails' => $guestSessions->unique('email')->count(), + 'completed_assessments' => $guestSessions->whereNotNull('completed_at')->count(), + 'device_breakdown' => $guestSessions->groupBy('device_type')->map->count(), + 'browser_breakdown' => $guestSessions->groupBy('browser')->map->count(), + 'country_breakdown' => $guestSessions->groupBy('country')->map->count(), + 'top_locations' => $guestSessions->groupBy('city') + ->map->count() + ->sortDesc() + ->take(10), + 'conversion_rate' => $guestSessions->count() > 0 ? + ($guestSessions->whereNotNull('completed_at')->count() / $guestSessions->count()) * 100 : 0, + 'popular_tools' => $guestSessions->groupBy('assessment.tool.name_en') + ->map->count() + ->sortDesc() + ->take(5), + ]; + + Log::info('Analytics generated successfully'); + + return response()->json($analytics); + + } catch (Exception $e) { + Log::error('Analytics generation failed', [ + 'error' => $e->getMessage() + ]); + + return response()->json(['error' => 'Failed to generate analytics'], 500); + } + } +} diff --git a/app/Http/Controllers/NavigationController.php b/app/Http/Controllers/NavigationController.php new file mode 100644 index 000000000..05c532b91 --- /dev/null +++ b/app/Http/Controllers/NavigationController.php @@ -0,0 +1,149 @@ +user(); + + if (!$user) { + return response()->json([ + 'items' => [], + 'user_access_level' => 'guest', + 'user_stats' => null, + ]); + } + + $accessLevel = $user->getAccessLevel(); + $navigationItems = $this->getNavigationByAccessLevel($accessLevel); + $userStats = $this->getUserStats($user); + + return response()->json([ + 'items' => $navigationItems, + 'user_access_level' => $accessLevel, + 'user_stats' => $userStats, + ]); + } + + /** + * Get navigation items based on access level + */ + private function getNavigationByAccessLevel(string $accessLevel): array + { + switch ($accessLevel) { + case 'admin': + return [ + [ + 'title' => 'Dashboard', + 'href' => route('dashboard'), + 'icon' => 'LayoutGrid', + 'active' => request()->routeIs('dashboard'), + ], + [ + 'title' => 'Assessment Tools', + 'href' => route('assessment-tools'), + 'icon' => 'ClipboardCheck', + 'active' => request()->routeIs('assessment-tools*'), + ], + [ + 'title' => 'My Assessments', + 'href' => route('assessments.index'), + 'icon' => 'FileText', + 'active' => request()->routeIs('assessments*'), + ], + [ + 'title' => 'Admin Panel', + 'href' => '/admin', // Filament admin URL + 'icon' => 'Settings', + 'active' => request()->is('admin*'), + ], + ]; + + case 'premium': + return [ + [ + 'title' => 'Dashboard', + 'href' => route('dashboard'), + 'icon' => 'LayoutGrid', + 'active' => request()->routeIs('dashboard'), + ], + [ + 'title' => 'Assessment Tools', + 'href' => route('assessment-tools'), + 'icon' => 'ClipboardCheck', + 'active' => request()->routeIs('assessment-tools*'), + ], + [ + 'title' => 'My Assessments', + 'href' => route('assessments.index'), + 'icon' => 'FileText', + 'active' => request()->routeIs('assessments*'), + ], + [ + 'title' => 'Tool Subscriptions', + 'href' => route('tools.subscriptions'), + 'icon' => 'Crown', + 'active' => request()->routeIs('tools.subscriptions*'), + ], + ]; + + case 'free': + default: + $user = auth()->user(); + return [ + [ + 'title' => 'Free Assessment', + 'href' => route('free-assessment.index'), + 'icon' => 'FileText', + 'active' => request()->routeIs('free-assessment*'), + 'badge' => $user && $user->canTakeFreeAssessment() ? 'Available' : null, + 'badge_variant' => 'success', + ], + [ + 'title' => 'Browse Tools', + 'href' => route('tools.discover'), + 'icon' => 'ShoppingCart', + 'active' => request()->routeIs('tools.discover*'), + ], + [ + 'title' => 'Contact Sales', + 'href' => route('contact.sales.show'), + 'icon' => 'Info', + 'active' => request()->routeIs('contact.sales*'), + ], + ]; + } + } + + /** + * Get user statistics + */ + private function getUserStats($user): array + { + return [ + 'has_free_assessment' => $user->hasTakenFreeAssessment(), + 'can_take_free' => $user->canTakeFreeAssessment(), + 'tool_subscriptions_count' => $user->toolSubscriptions()->where('status', 'active')->count(), + 'total_assessments' => $user->assessments()->count(), + ]; + } +} diff --git a/app/Http/Controllers/PDFController.php b/app/Http/Controllers/PDFController.php new file mode 100644 index 000000000..6c269e63d --- /dev/null +++ b/app/Http/Controllers/PDFController.php @@ -0,0 +1,284 @@ +pdfService = new GartnerPDFService(); + } + + /** + * Generate and download the Gartner PDF replica + * Route: GET /pdf/gartner/download + * + * This method creates the PDF and immediately sends it to the user as a download. + * Perfect for "Generate Report" buttons in your application. + */ + public function downloadGartnerPDF(Request $request): Response + { + try { + // You can customize the data based on request parameters + // For example, if you want different statistics based on user input: + if ($request->has('custom_data')) { + $customData = $request->input('custom_data'); + $this->pdfService->setData($customData); + } + + // Generate the PDF and return it as a download + $response = $this->pdfService->generatePDF(); + + // Add additional headers if needed + $response->headers->set('Cache-Control', 'no-cache, no-store, must-revalidate'); + $response->headers->set('Pragma', 'no-cache'); + $response->headers->set('Expires', '0'); + + return $response; + + } catch (\Exception $e) { + // Handle errors gracefully - show user-friendly message + return response()->json([ + 'error' => 'Failed to generate PDF', + 'message' => 'Please try again or contact support if the problem persists.' + ], 500); + } + } + + /** + * Save PDF to storage and return the file path + * Route: POST /pdf/gartner/save + * + * This method saves the PDF to your Laravel storage system. + * Useful when you want to email PDFs later or keep them for records. + */ + public function saveGartnerPDF(Request $request) + { + try { + // Optional: validate request data + $validated = $request->validate([ + 'filename' => 'sometimes|string|max:255', + 'data' => 'sometimes|array' + ]); + + // Apply custom data if provided + if (isset($validated['data'])) { + $this->pdfService->setData($validated['data']); + } + + // Generate filename if not provided + $filename = $validated['filename'] ?? 'gartner_playbook_' . now()->format('Y-m-d_H-i-s') . '.pdf'; + + // Save the PDF and get the storage path + $filePath = $this->pdfService->savePDF($filename); + + // Return success response with file information + return response()->json([ + 'success' => true, + 'message' => 'PDF generated and saved successfully', + 'file_path' => $filePath, + 'download_url' => Storage::url($filePath), + 'filename' => $filename + ]); + + } catch (\Exception $e) { + return response()->json([ + 'error' => 'Failed to save PDF', + 'message' => $e->getMessage() + ], 500); + } + } + + /** + * Preview the PDF content in the browser + * Route: GET /pdf/gartner/preview + * + * This shows the HTML version in the browser so you can see exactly + * how the PDF will look before generating it. Great for testing and debugging. + */ + public function previewGartnerPDF(Request $request) + { + try { + // Apply any custom data + if ($request->has('data')) { + $this->pdfService->setData($request->input('data')); + } + + // Get the HTML content that would be converted to PDF + $htmlContent = $this->pdfService->generatePreview(); + + // Return the HTML directly to the browser + return response($htmlContent) + ->header('Content-Type', 'text/html'); + + } catch (\Exception $e) { + return response()->view('errors.500', [ + 'message' => 'Failed to generate preview: ' . $e->getMessage() + ], 500); + } + } + + /** + * API endpoint to get PDF as base64 encoded string + * Route: GET /api/pdf/gartner + * + * This is useful when you need to embed the PDF in other applications + * or send it via API to frontend applications. + */ + public function getGartnerPDFAPI(Request $request) + { + try { + // Validate API request + $validated = $request->validate([ + 'format' => 'sometimes|in:download,base64,url', + 'data' => 'sometimes|array' + ]); + + $format = $validated['format'] ?? 'base64'; + + // Apply custom data if provided + if (isset($validated['data'])) { + $this->pdfService->setData($validated['data']); + } + + switch ($format) { + case 'download': + return $this->pdfService->generatePDF(); + + case 'url': + $filename = 'gartner_api_' . now()->timestamp . '.pdf'; + $filePath = $this->pdfService->savePDF($filename); + return response()->json([ + 'url' => Storage::url($filePath), + 'filename' => $filename + ]); + + case 'base64': + default: + // Generate PDF content and encode as base64 + $pdfContent = $this->pdfService->generatePDF()->getContent(); + $base64PDF = base64_encode($pdfContent); + + return response()->json([ + 'pdf_base64' => $base64PDF, + 'mime_type' => 'application/pdf', + 'filename' => 'gartner_cmo_playbook.pdf' + ]); + } + + } catch (\Exception $e) { + return response()->json([ + 'error' => 'PDF generation failed', + 'message' => $e->getMessage() + ], 500); + } + } + + /** + * Bulk generate PDFs with different data sets + * Route: POST /pdf/gartner/bulk + * + * This allows you to generate multiple PDFs at once with different data. + * Useful for creating personalized reports for different departments or clients. + */ + public function bulkGenerateGartnerPDFs(Request $request) + { + try { + $validated = $request->validate([ + 'datasets' => 'required|array|min:1|max:10', // Limit to prevent server overload + 'datasets.*.name' => 'required|string', + 'datasets.*.data' => 'required|array' + ]); + + $results = []; + + foreach ($validated['datasets'] as $dataset) { + try { + // Create a new service instance for each dataset + $service = new GartnerPDFService(); + $service->setData($dataset['data']); + + // Generate filename based on dataset name + $filename = 'gartner_' . \Str::slug($dataset['name']) . '_' . now()->timestamp . '.pdf'; + + // Save the PDF + $filePath = $service->savePDF($filename); + + $results[] = [ + 'name' => $dataset['name'], + 'success' => true, + 'file_path' => $filePath, + 'download_url' => Storage::url($filePath) + ]; + + } catch (\Exception $e) { + $results[] = [ + 'name' => $dataset['name'], + 'success' => false, + 'error' => $e->getMessage() + ]; + } + } + + return response()->json([ + 'message' => 'Bulk PDF generation completed', + 'results' => $results, + 'successful' => count(array_filter($results, fn($r) => $r['success'])), + 'failed' => count(array_filter($results, fn($r) => !$r['success'])) + ]); + + } catch (\Exception $e) { + return response()->json([ + 'error' => 'Bulk generation failed', + 'message' => $e->getMessage() + ], 500); + } + } + + /** + * Debug preview with visible page boundaries + * Route: GET /pdf/gartner/debug + * + * This shows the HTML with visual indicators for page boundaries, + * helping you verify that content fits properly before generating PDF. + */ + public function debugGartnerPDF(Request $request) + { + try { + // Apply any custom data + if ($request->has('data')) { + $this->pdfService->setData($request->input('data')); + } + + // Get the debug HTML with visual page boundaries + $htmlContent = $this->pdfService->generateDebugPreview(); + + // Return the HTML directly to the browser + return response($htmlContent) + ->header('Content-Type', 'text/html'); + + } catch (\Exception $e) { + return response()->view('errors.500', [ + 'message' => 'Failed to generate debug preview: ' . $e->getMessage() + ], 500); + } + } +} diff --git a/app/Http/Controllers/PaddleWebhookController.php b/app/Http/Controllers/PaddleWebhookController.php new file mode 100644 index 000000000..9e85fb4ac --- /dev/null +++ b/app/Http/Controllers/PaddleWebhookController.php @@ -0,0 +1,84 @@ + $payload]); + return; + } + + try { + DB::transaction(function () use ($payload, $customData) { + $user = User::find($customData['user_id']); + $tool = Tool::find($customData['tool_id']); + + if ($user && $tool) { + $subscription = $user->toolSubscriptions()->updateOrCreate( + ['tool_id' => $tool->id], + [ + 'plan_type' => 'premium', + 'status' => 'active', + 'started_at' => now(), + 'expires_at' => now()->addYear(), + 'paddle_customer_id' => $payload['customer_id'] ?? null, + 'amount' => $payload['amount'] ?? 49.99, + 'currency' => $payload['currency'] ?? 'USD', + 'paddle_data' => $payload, + 'features' => [ + 'assessments_limit' => null, + 'pdf_reports' => 'detailed', + 'advanced_analytics' => true, + 'support' => 'priority', + ] + ] + ); + + Log::info('Tool subscription activated via Paddle webhook', [ + 'user_id' => $user->id, + 'tool_id' => $tool->id, + 'subscription_id' => $subscription->id, + ]); + } + }); + + } catch (\Exception $e) { + Log::error('Paddle webhook processing failed', [ + 'error' => $e->getMessage(), + 'payload' => $payload + ]); + } + } + + /** + * Handle a payment failed webhook + */ + public function handlePaymentFailed(array $payload) + { + Log::warning('Paddle payment failed', $payload); + + // Handle failed payment logic here + // You might want to notify the user or retry payment + } +} diff --git a/app/Http/Controllers/PostController.php b/app/Http/Controllers/PostController.php new file mode 100644 index 000000000..52f74088c --- /dev/null +++ b/app/Http/Controllers/PostController.php @@ -0,0 +1,54 @@ +latest('published_at') + ->get(); + + return Inertia::render('posts/Index', [ + 'posts' => $posts, + ]); + } + + public function show(Post $post) + { + if ($post->status !== 'published') { + abort(404); + } + + + // Only display approved comments in newest-first order + $comments = $post->comments() + ->where('approved', true) + ->latest() + ->get(); + + return Inertia::render('posts/Show', [ + 'post' => $post, + 'comments' => $comments, + ]); + } + + public function storeComment(Request $request, Post $post) + { + $data = $request->validate([ + 'author_name' => 'required|string|max:255', + 'content' => 'required|string', + ]); + + // Always create a pending comment awaiting approval + $post->comments()->create($data + ['approved' => false]); + + return redirect()->back(); + } +} diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php new file mode 100644 index 000000000..da2d16dc4 --- /dev/null +++ b/app/Http/Controllers/ReportController.php @@ -0,0 +1,201 @@ +getReportData(); + + // Render the enhanced Blade template +// $html = view('reports.cmo-playbook-professional', compact('data'))->render(); + $html = view('reports.cmo-playbook-professional', compact('data'))->render(); + + // Configure mPDF with ONLY valid settings + $mpdf = new Mpdf([ + 'mode' => 'utf-8', + 'format' => 'A4', + 'orientation' => 'L', + 'margin_left' => 10, + 'margin_right' => 10, + 'margin_top' => 10, + 'margin_bottom' => 10, + 'margin_header' => 5, + 'margin_footer' => 5, + 'tempDir' => sys_get_temp_dir(), + 'default_font' => 'sans-serif', // Using built-in font for better compatibility + 'default_font_size' => 12, + ]); + + // These are the CORRECT ways to enhance mPDF's CSS support + $mpdf->showImageErrors = true; + $mpdf->autoScriptToLang = true; + $mpdf->autoLangToFont = true; + + + $mpdf->WriteHTML($html); + + return response($mpdf->Output('CMO-Value-Playbook-Professional.pdf', 'D')) + ->header('Content-Type', 'application/pdf'); + } + + public function previewReport() + { + $data = $this->getReportData(); + return view('reports.cmo-playbook-professional', compact('data')); + } + + + + + /** + * Enhanced data structure with more detailed information for better visualizations + */ + private function getReportData() + { + return [ + 'title' => 'The CMO Value Playbook', + 'subtitle' => '5 strategies to boost influence and showcase marketing\'s value', + 'survey_info' => [ + 'year' => '2024', + 'source' => 'Gartner Marketing Analytics and Technology Survey', + 'sample_size' => 377, + 'respondent_type' => 'senior marketing leaders' + ], + 'key_statistics' => [ + 'prove_value_and_credit' => 52, + 'unable_to_prove' => 48, + 'holistic_long_term_success' => 68, + 'individual_short_term_success' => 30, + 'high_complexity_metrics_improvement' => 1.5, + 'da_activity_improvement' => 1.4 + ], + 'stakeholder_data' => [ + 'most_skeptical' => [ + ['role' => 'Chief Financial Officer (CFO)', 'percentage' => 40, 'color' => '#f59e0b'], + ['role' => 'Chief Executive Officer (CEO)', 'percentage' => 39, 'color' => '#3b82f6'] + ], + 'ceo_beliefs' => [ + 'Marketing is crucial, but measuring its direct impact on our bottom line can be challenging', + 'Marketing must move from being a cost center to a profit driver', + 'Marketing should demonstrate its impact on the overall business strategy' + ], + 'cfo_beliefs' => [ + 'Marketing\'s broad range of activities makes it challenging to pinpoint financial accountability', + 'Investments in marketing dollars need to show a clear and directly measurable impact on revenue and growth', + 'Marketing\'s impact is often subtle and temporary, as many of its efforts are geared toward indirectly influencing engagement and perception' + ] + ], + 'strategies' => [ + [ + 'number' => 1, + 'title' => 'Focus on marketing\'s long-term, holistic impact', + 'description' => 'CMOs who adopt a long-term, holistic view are more successful in proving marketing\'s value and gaining credit. Only 30% of those focusing on short-term initiatives reported success.', + 'key_stat' => '68% success rate with holistic, long-term focus', + 'actions' => [ + 'Measure long-term value using advanced approaches like marketing mix modeling (MMM)', + 'Create a holistic view across six value vectors: Connection to Strategy, ROI Story, Critical-Project Impact, Insight Engine, Empowering Others and Optimizing Resources' + ], + 'icon' => '📊' + ], + [ + 'number' => 2, + 'title' => 'Build a narrative about marketing\'s value for all stakeholders', + 'description' => 'CEOs and CFOs are the most skeptical of marketing\'s value. CMOs must understand their priorities and craft compelling narratives that resonate.', + 'key_stat' => '40% of CFOs and 39% of CEOs are skeptical', + 'actions' => [ + 'Address CEO concerns about measuring direct impact on bottom line', + 'Help CFOs understand clear financial accountability and measurable revenue impact' + ], + 'icon' => '🎯' + ], + [ + 'number' => 3, + 'title' => 'Increase variety and sophistication of metric types', + 'description' => 'Using high-complexity metrics drives significant improvement in proving value. Variety and quality of metrics both matter.', + 'key_stat' => '1.5x increase in likelihood to prove value', + 'actions' => [ + 'Implement relationship metrics: Customer LTV, CAC, LTV:CAC ratio', + 'Use return on transactional metrics: CPA, ROAS, ROI', + 'Track operational metrics: stakeholder satisfaction, resource productivity' + ], + 'icon' => '📈' + ], + [ + 'number' => 4, + 'title' => 'Expand leadership involvement in data and analytics activity', + 'description' => 'Marketing leaders engaged in D&A activities have a clear advantage. Regular meetings with stakeholders and hands-on involvement are crucial.', + 'key_stat' => '1.4x more likely to prove value', + 'actions' => [ + 'Manage teams of marketing data analysts', + 'Create marketing dashboards and custom reports', + 'Develop measurement strategies for marketing activities' + ], + 'icon' => '⚡' + ], + [ + 'number' => 5, + 'title' => 'Invest in marketing talent to close gaps', + 'description' => 'Talent gaps present the biggest barriers to proving marketing value. CMOs must develop adaptive capabilities across multiple skill areas.', + 'key_stat' => 'Top 3 barriers are all talent-related', + 'actions' => [ + 'Develop soft skills and competencies for storytelling', + 'Invest in analytical talent for data analysis and insights', + 'Focus on technical talent for data integration and advanced technologies' + ], + 'icon' => '👥' + ] + ], + 'barriers' => [ + ['description' => 'Lack of necessary soft skills/competencies', 'percentage' => 39, 'color' => '#ef4444'], + ['description' => 'Lack of analytical talent to analyze data and generate insight', 'percentage' => 34, 'color' => '#f97316'], + ['description' => 'Lack of technical talent to integrate and analyze data', 'percentage' => 33, 'color' => '#eab308'] + ], + 'success_matrix' => [ + 'holistic_long_term' => ['label' => 'Holistic, longer-term focus', 'value' => 68, 'category' => 'best'], + 'holistic_short_term' => ['label' => 'Holistic, shorter-term focus', 'value' => 51, 'category' => 'good'], + 'individual_long_term' => ['label' => 'Individual, longer-term focus', 'value' => 49, 'category' => 'moderate'], + 'individual_short_term' => ['label' => 'Individual, shorter-term focus', 'value' => 30, 'category' => 'worst'] + ] + ]; + } + + + + + public function landscapeChart() + { + + $data = [ + 'bars' => [ + ['label' => 'Marketing', 'value' => 60], + ['label' => 'Sales', 'value' => 40], + ['label' => 'Support', 'value' => 30], + ], + 'text' => 'Key takeaways from the performance data include increased marketing investment and noticeable under-resourcing of support.', + 'list' => [ + 'Rebalance budgets toward support', + 'Double down on ROI in marketing', + 'Explore AI-driven sales enablement tools' + ] + ]; + + $html = view('reports.half-chart', compact('data'))->render(); + + $mpdf = new Mpdf([ + 'format' => 'A4-L', // A4 Landscape + 'margin_top' => 10, + 'margin_bottom' => 10, + 'margin_left' => 10, + 'margin_right' => 10, + ]); + + $mpdf->WriteHTML($html); + return response($mpdf->Output('half_chart.pdf', 'I'))->header('Content-Type', 'application/pdf'); + } + +} diff --git a/app/Http/Controllers/ToolDiscoveryController.php b/app/Http/Controllers/ToolDiscoveryController.php new file mode 100644 index 000000000..98f3848f4 --- /dev/null +++ b/app/Http/Controllers/ToolDiscoveryController.php @@ -0,0 +1,138 @@ +user(); + + $tools = Tool::where('status', 'active') + ->withCount(['assessments', 'domains']) + ->with(['domains' => function($query) { + $query->withCount(['categories' => function($q) { + $q->withCount('criteria'); + }]); + }]) + ->orderBy('name_en') + ->get() + ->map(function ($tool) use ($user) { + // Calculate total criteria + $totalCriteria = $tool->domains->sum(function($domain) { + return $domain->categories->sum('criteria_count'); + }); + + $estimatedTime = max(10, ceil($totalCriteria * 0.5)); // Minimum 10 minutes + + // Check user access to this tool + $hasAccess = $user ? $user->hasAccessToTool($tool->id) : false; + $subscriptionType = 'none'; + + if ($user && $hasAccess) { + $subscription = $user->getToolSubscription($tool->id); + $subscriptionType = $subscription ? $subscription->plan_type : 'none'; + } + + return [ + 'id' => $tool->id, + 'name_en' => $tool->name_en, + 'name_ar' => $tool->name_ar, + 'description_en' => $tool->description_en, + 'description_ar' => $tool->description_ar, + 'image' => $tool->image, + 'total_domains' => $tool->domains_count, + 'total_criteria' => $totalCriteria, + 'estimated_time' => $estimatedTime, + 'assessments_count' => $tool->assessments_count, + 'has_access' => $hasAccess, + 'subscription_type' => $subscriptionType, + 'has_free_plan' => $tool->has_free_plan ?? false, + 'premium_price' => $tool->premium_price, + 'currency' => $tool->currency ?? 'USD', + ]; + }); + + $userInfo = $user ? [ + 'access_level' => $user->getAccessLevel(), + 'name_ar' => $user->name_ar, + 'name_en' => $user->name, + 'current_assessments' => $user->assessments()->count(), + 'tool_subscriptions' => $user->toolSubscriptions() + ->where('status', 'active') + ->pluck('tool_id', 'tool_id') + ->toArray(), + ] : [ + 'access_level' => 'free User', + 'current_assessments' => 0, + 'tool_subscriptions' => [], + ]; + + + return Inertia::render('ToolDiscover', [ + 'tools' => $tools, + 'user' => $userInfo, + 'locale' => app()->getLocale(), + ]); + } + + /** + * Show individual tool details + */ + public function show(Tool $tool): Response + { + $user = auth()->user(); + + $tool->load([ + 'domains.categories.criteria' => function ($query) { + $query->orderBy('order'); + } + ]); + + $toolData = [ + 'id' => $tool->id, + 'name_en' => $tool->name_en, + 'name_ar' => $tool->name_ar, + 'description_en' => $tool->description_en, + 'description_ar' => $tool->description_ar, + 'image' => $tool->image, + 'has_free_plan' => $tool->has_free_plan ?? false, + 'premium_price' => $tool->premium_price, + 'currency' => $tool->currency ?? 'USD', + 'domains' => $tool->domains->map(function ($domain) { + return [ + 'id' => $domain->id, + 'name_en' => $domain->name_en, + 'name_ar' => $domain->name_ar, + 'categories_count' => $domain->categories->count(), + 'criteria_count' => $domain->categories->sum(function($category) { + return $category->criteria->count(); + }), + ]; + }), + ]; + + $userAccess = $user ? [ + 'has_access' => $user->hasAccessToTool($tool->id), + 'subscription_type' => $user->getToolSubscription($tool->id)?->plan_type ?? 'none', + 'access_level' => $user->getAccessLevel(), + ] : [ + 'has_access' => false, + 'subscription_type' => 'none', + 'access_level' => 'guest', + ]; + + return Inertia::render('ToolDetails', [ + 'tool' => $toolData, + 'user_access' => $userAccess, + 'locale' => app()->getLocale(), + ]); + } +} diff --git a/app/Http/Controllers/ToolRequestController.php b/app/Http/Controllers/ToolRequestController.php new file mode 100644 index 000000000..2728d5d37 --- /dev/null +++ b/app/Http/Controllers/ToolRequestController.php @@ -0,0 +1,51 @@ + [ + 'id' => $tool->id, + 'name_en' => $tool->name_en, + 'name_ar' => $tool->name_ar, + 'description_en' => $tool->description_en, + 'description_ar' => $tool->description_ar, + 'image' => $tool->image, + ], + 'user' => auth()->user() ? [ + 'name' => auth()->user()->name, + 'email' => auth()->user()->email, + 'organization' => auth()->user()->getCompanyName(), + ] : null, + ]); + } + + public function store(StoreToolRequestRequest $request): RedirectResponse + { + $data = $request->validated(); + $data['user_id'] = auth()->id(); + $toolRequest = ToolRequest::create($data); + + $admins = User::whereHas('roles', function ($q) { + $q->whereIn('name', ['admin', 'super_admin']); + })->get(); + + Notification::make() + ->title('New Tool Request') + ->body($toolRequest->name.' requested access to '.$toolRequest->tool->name_en) + ->sendToDatabase($admins); + + return redirect()->back()->with('success', 'Request submitted successfully'); + } +} diff --git a/app/Http/Controllers/ToolSubscriptionController.php b/app/Http/Controllers/ToolSubscriptionController.php new file mode 100644 index 000000000..dfbaa42cf --- /dev/null +++ b/app/Http/Controllers/ToolSubscriptionController.php @@ -0,0 +1,507 @@ +user(); + + $subscriptions = $user->toolSubscriptions() + ->with('tool') + ->orderBy('created_at', 'desc') + ->get() + ->map(function ($subscription) { + return [ + 'id' => $subscription->id, + 'tool' => [ + 'id' => $subscription->tool->id, + 'name_en' => $subscription->tool->name_en, + 'name_ar' => $subscription->tool->name_ar, + 'image' => $subscription->tool->image, + ], + 'plan_type' => $subscription->plan_type, + 'status' => $subscription->status, + 'started_at' => $subscription->started_at, + 'expires_at' => $subscription->expires_at, + 'features' => $subscription->features, + 'paddle_subscription_id' => $subscription->paddle_subscription_id, + ]; + }); + + return Inertia::render('MyToolSubscriptions', [ + 'subscriptions' => $subscriptions, + ]); + } + + /** + * Show tool subscription page with pricing options + */ + public function show(Tool $tool) + { + $user = auth()->user(); + + // Load tool with pricing information + $tool->load(['domains.categories.criteria']); + + // Check current subscription status for this tool + $currentSubscription = $user->getToolSubscription($tool->id); + + // Calculate tool metrics + $totalCriteria = $tool->domains->sum(function($domain) { + return $domain->categories->sum(function($category) { + return $category->criteria->count(); + }); + }); + + return Inertia::render('ToolSubscription', [ + 'tool' => [ + 'id' => $tool->id, + 'name_en' => $tool->name_en, + 'name_ar' => $tool->name_ar, + 'description_en' => $tool->description_en, + 'description_ar' => $tool->description_ar, + 'image' => $tool->image, + 'total_criteria' => $totalCriteria, + 'estimated_time' => max(10, ceil($totalCriteria * 0.5)), + ], + 'currentSubscription' => $currentSubscription ? [ + 'plan_type' => $currentSubscription->plan_type, + 'status' => $currentSubscription->status, + 'expires_at' => $currentSubscription->expires_at, + 'features' => $currentSubscription->features, + ] : null, + 'user' => [ + 'id' => $user->id, + 'name' => $user->name, + 'email' => $user->email, + 'is_premium' => $user->isPremium(), + 'is_admin' => $user->isAdmin(), + ], + 'pricing' => [ + 'free' => [ + 'price' => 0, + 'currency' => 'USD', + 'features' => [ + 'assessments_limit' => 1, + 'pdf_reports' => 'basic', + 'advanced_analytics' => false, + 'support' => 'community', + ] + ], + 'premium' => [ + 'price' => 49.99, + 'currency' => 'USD', + 'features' => [ + 'assessments_limit' => null, // Unlimited + 'pdf_reports' => 'detailed', + 'advanced_analytics' => true, + 'support' => 'priority', + ] + ] + ], + 'paddle' => [ + 'vendor_id' => config('paddle.vendor_id'), + 'client_side_token' => config('paddle.client_side_token'), + 'environment' => config('paddle.sandbox') ? 'sandbox' : 'production', + ], + ]); + } + + /** + * Handle subscription request (both free and premium) + */ + public function subscribe(Request $request, Tool $tool) + { + $request->validate([ + 'plan_type' => 'required|in:free,premium', + ]); + + $user = auth()->user(); + + // Check if user already has a subscription for this tool + $existingSubscription = $user->getToolSubscription($tool->id); + if ($existingSubscription && $existingSubscription->status === 'active') { + return response()->json([ + 'success' => false, + 'error' => 'You already have an active subscription for this tool.', + ], 400); + } + + if ($request->plan_type === 'free') { + return $this->subscribeFree($user, $tool); + } else { + return $this->createPaddleCheckout($user, $tool); + } + } + + /** + * Create Paddle checkout for premium subscription + */ + private function createPaddleCheckout($user, $tool) + { + try { + // Prepare checkout data for Paddle API + $checkoutData = [ + 'items' => [ + [ + 'price_id' => config('paddle.products.tool_premium'), // Set this in config + 'quantity' => 1, + ] + ], + 'customer' => [ + 'email' => $user->email, + 'name' => $user->name, + ], + 'custom_data' => [ + 'user_id' => $user->id, + 'tool_id' => $tool->id, + 'plan_type' => 'premium', + 'tool_name' => $tool->name_en, + ], + 'return_url' => route('tools.payment.success', ['tool' => $tool->id]), + 'discount_id' => null, // Add discount logic if needed + ]; + + // Create checkout via Paddle API + $response = Http::withHeaders([ + 'Authorization' => 'Bearer ' . config('paddle.vendor_auth_code'), + 'Content-Type' => 'application/json', + ])->post('https://sandbox-api.paddle.com/transactions', $checkoutData); + + if ($response->successful()) { + $checkout = $response->json(); + + return response()->json([ + 'success' => true, + 'checkout_url' => $checkout['data']['checkout']['url'], + 'checkout_id' => $checkout['data']['id'], + ]); + } else { + Log::error('Paddle checkout creation failed', [ + 'user_id' => $user->id, + 'tool_id' => $tool->id, + 'response' => $response->body(), + ]); + + return response()->json([ + 'success' => false, + 'error' => 'Checkout creation failed. Please try again.', + ], 500); + } + + } catch (\Exception $e) { + Log::error('Paddle checkout exception', [ + 'user_id' => $user->id, + 'tool_id' => $tool->id, + 'error' => $e->getMessage(), + ]); + + return response()->json([ + 'success' => false, + 'error' => 'Checkout creation failed. Please try again.', + ], 500); + } + } + + /** + * Handle successful payment callback + */ + public function paymentSuccess(Request $request, Tool $tool) + { + $user = auth()->user(); + $transactionId = $request->query('_ptxn'); + + if (!$transactionId) { + return redirect()->route('tools.discover') + ->with('error', 'Payment verification failed.'); + } + + // Check if subscription was created (webhook should have handled this) + $subscription = $user->getToolSubscription($tool->id); + + if ($subscription && $subscription->status === 'active') { + return redirect()->route('assessment.start', $tool->id) + ->with('success', "Payment successful! You now have premium access to {$tool->name_en}."); + } else { + // Subscription not found, redirect to try again + return redirect()->route('tools.subscribe', $tool->id) + ->with('error', 'Payment processed but subscription setup is pending. Please contact support if this persists.'); + } + } + + /** + * Handle free subscription + */ + private function subscribeFree($user, $tool) + { + try { + DB::beginTransaction(); + + $subscription = $user->toolSubscriptions()->updateOrCreate( + ['tool_id' => $tool->id], + [ + 'plan_type' => 'free', + 'status' => 'active', + 'started_at' => now(), + 'expires_at' => null, // Free subscriptions don't expire + 'features' => [ + 'assessments_limit' => 1, + 'pdf_reports' => 'basic', + 'advanced_analytics' => false, + 'support' => 'community', + ] + ] + ); + + DB::commit(); + + return response()->json([ + 'success' => true, + 'message' => "You now have free access to {$tool->name_en}!", + 'redirect_url' => route('assessment.start', $tool->id), + ]); + + } catch (\Exception $e) { + DB::rollBack(); + + Log::error('Free subscription failed', [ + 'user_id' => $user->id, + 'tool_id' => $tool->id, + 'error' => $e->getMessage(), + ]); + + return response()->json([ + 'success' => false, + 'error' => 'Subscription failed. Please try again.', + ], 500); + } + } + + /** + * Cancel tool subscription + */ + public function cancel(ToolSubscription $subscription) + { + $user = auth()->user(); + + // Ensure user owns this subscription + if ($subscription->user_id !== $user->id) { + abort(403, 'Unauthorized to cancel this subscription.'); + } + + try { + DB::beginTransaction(); + + // If it's a premium subscription with Paddle, cancel it there too + if ($subscription->plan_type === 'premium' && $subscription->paddle_subscription_id) { + $this->cancelPaddleSubscription($subscription->paddle_subscription_id); + } + + // Update local subscription status + $subscription->update([ + 'status' => 'canceled', + 'canceled_at' => now(), + ]); + + DB::commit(); + + return redirect()->back() + ->with('success', 'Subscription canceled successfully.'); + + } catch (\Exception $e) { + DB::rollBack(); + + Log::error('Subscription cancellation failed', [ + 'subscription_id' => $subscription->id, + 'user_id' => $user->id, + 'error' => $e->getMessage(), + ]); + + return redirect()->back() + ->with('error', 'Failed to cancel subscription. Please try again.'); + } + } + + /** + * Cancel subscription in Paddle + */ + private function cancelPaddleSubscription($paddleSubscriptionId) + { + try { + $response = Http::withHeaders([ + 'Authorization' => 'Bearer ' . config('paddle.vendor_auth_code'), + 'Content-Type' => 'application/json', + ])->post("https://sandbox-api.paddle.com/subscriptions/{$paddleSubscriptionId}/cancel", [ + 'effective_from' => 'immediately', + ]); + + if (!$response->successful()) { + Log::warning('Failed to cancel Paddle subscription', [ + 'paddle_subscription_id' => $paddleSubscriptionId, + 'response' => $response->body(), + ]); + } + + } catch (\Exception $e) { + Log::error('Exception canceling Paddle subscription', [ + 'paddle_subscription_id' => $paddleSubscriptionId, + 'error' => $e->getMessage(), + ]); + } + } + + /** + * Webhook handler for Paddle events + */ + public function webhook(Request $request) + { + $signature = $request->header('Paddle-Signature'); + $webhookSecret = config('paddle.webhook_secret'); + + // Verify webhook signature + if (!$this->verifyWebhookSignature($request->getContent(), $signature, $webhookSecret)) { + Log::warning('Invalid webhook signature', [ + 'signature' => $signature, + ]); + return response('Invalid signature', 400); + } + + $payload = $request->json()->all(); + $eventType = $payload['event_type'] ?? null; + + try { + switch ($eventType) { + case 'transaction.completed': + $this->handleTransactionCompleted($payload); + break; + + case 'subscription.canceled': + $this->handleSubscriptionCanceled($payload); + break; + + case 'subscription.updated': + $this->handleSubscriptionUpdated($payload); + break; + + default: + Log::info('Unhandled webhook event', ['event_type' => $eventType]); + } + + return response('OK', 200); + + } catch (\Exception $e) { + Log::error('Webhook processing failed', [ + 'event_type' => $eventType, + 'error' => $e->getMessage(), + 'payload' => $payload, + ]); + + return response('Processing failed', 500); + } + } + + /** + * Handle transaction completed webhook + */ + private function handleTransactionCompleted($payload) + { + $customData = $payload['data']['custom_data'] ?? []; + $userId = $customData['user_id'] ?? null; + $toolId = $customData['tool_id'] ?? null; + + if (!$userId || !$toolId) { + Log::warning('Missing custom data in transaction webhook', $customData); + return; + } + + $user = \App\Models\User::find($userId); + $tool = Tool::find($toolId); + + if (!$user || !$tool) { + Log::warning('User or tool not found for webhook', [ + 'user_id' => $userId, + 'tool_id' => $toolId, + ]); + return; + } + + // Create premium subscription + $user->toolSubscriptions()->updateOrCreate( + ['tool_id' => $toolId], + [ + 'plan_type' => 'premium', + 'status' => 'active', + 'started_at' => now(), + 'expires_at' => null, // One-time payment, no expiry + 'paddle_transaction_id' => $payload['data']['id'], + 'features' => [ + 'assessments_limit' => null, // Unlimited + 'pdf_reports' => 'detailed', + 'advanced_analytics' => true, + 'support' => 'priority', + ] + ] + ); + + Log::info('Premium tool subscription created via webhook', [ + 'user_id' => $userId, + 'tool_id' => $toolId, + 'transaction_id' => $payload['data']['id'], + ]); + } + + /** + * Handle subscription canceled webhook + */ + private function handleSubscriptionCanceled($payload) + { + $subscriptionId = $payload['data']['id'] ?? null; + + if ($subscriptionId) { + ToolSubscription::where('paddle_subscription_id', $subscriptionId) + ->update([ + 'status' => 'canceled', + 'canceled_at' => now(), + ]); + } + } + + /** + * Handle subscription updated webhook + */ + private function handleSubscriptionUpdated($payload) + { + $subscriptionId = $payload['data']['id'] ?? null; + $status = $payload['data']['status'] ?? null; + + if ($subscriptionId && $status) { + ToolSubscription::where('paddle_subscription_id', $subscriptionId) + ->update(['status' => $status]); + } + } + + /** + * Verify Paddle webhook signature + */ + private function verifyWebhookSignature($payload, $signature, $secret) + { + // Implement Paddle signature verification + // This is a simplified version - use Paddle's official method + $computedSignature = hash_hmac('sha256', $payload, $secret); + return hash_equals($signature, $computedSignature); + } +} diff --git a/app/Http/Controllers/UserRegistrationController.php b/app/Http/Controllers/UserRegistrationController.php new file mode 100644 index 000000000..53e3b8093 --- /dev/null +++ b/app/Http/Controllers/UserRegistrationController.php @@ -0,0 +1,289 @@ + $request->except(['password', 'password_confirmation']), + 'ip' => $request->ip(), + 'user_agent' => $request->userAgent() + ]); + + try { + // Validate the request + $validated = $request->validate([ + 'name' => 'required|string|max:255', + 'email' => 'required|string|email|max:255|unique:users,email', + 'password' => 'required|string|min:8|confirmed', + 'company_name' => 'required|string|max:255', + 'marketing_emails' => 'nullable|boolean', + 'newsletter_subscription' => 'nullable|boolean', + ], [ + 'name.required' => 'Full name is required.', + 'email.required' => 'Email address is required.', + 'email.email' => 'Please enter a valid email address.', + 'email.unique' => 'This email address is already registered. Please use a different email or try signing in.', + 'password.required' => 'Password is required.', + 'password.min' => 'Password must be at least 8 characters long.', + 'password.confirmed' => 'Password confirmation does not match.', + 'company_name.required' => 'Company name is required.', + 'password.confirmed' => 'Password confirmation does not match.', + 'company_name.required' => 'Company name is required.', + ]); + + Log::info('Validation passed for user registration', ['email' => $validated['email']]); + + } catch (\Illuminate\Validation\ValidationException $e) { + Log::warning('Validation failed for user registration', [ + 'errors' => $e->errors(), + 'email' => $request->email ?? 'not provided' + ]); + throw $e; + } + + try { + DB::beginTransaction(); + + // Create the user + $user = User::create([ + 'name' => $validated['name'], + 'email' => $validated['email'], + 'password' => Hash::make($validated['password']), + 'email_verified_at' => now(), // Auto-verify for free users + ]); + + Log::info('User created successfully', ['user_id' => $user->id, 'email' => $user->email]); + + // Try to create user details (if the relationship exists) + try { + if (method_exists($user, 'details')) { + $user->details()->create([ + 'company' => $validated['company_name'], + 'company_name' => $validated['company_name'], + 'preferred_language' => app()->getLocale(), + 'marketing_emails' => (bool) ($validated['marketing_emails'] ?? false), + 'newsletter_subscription' => (bool) ($validated['newsletter_subscription'] ?? false), + 'marketing_emails' => true, + 'newsletter_subscription' => false, + 'profile_completed' => false, + ]); + Log::info('User details created', ['user_id' => $user->id]); + } + } catch (Exception $e) { + Log::warning('Failed to create user details, but continuing', [ + 'user_id' => $user->id, + 'error' => $e->getMessage() + ]); + // Don't fail registration if details creation fails + } + + // Try to create free subscription (if the relationship exists) + try { + if (method_exists($user, 'subscriptions')) { + $user->subscriptions()->create([ + 'plan_type' => 'free', + 'status' => 'active', + 'started_at' => now(), + 'features' => [ + 'assessments_limit' => 1, + 'pdf_reports' => 'basic', + 'advanced_analytics' => false, + 'team_management' => false, + 'api_access' => false, + 'priority_support' => false, + 'custom_branding' => false, + ] + ]); + Log::info('User subscription created', ['user_id' => $user->id]); + } + } catch (Exception $e) { + Log::warning('Failed to create user subscription, but continuing', [ + 'user_id' => $user->id, + 'error' => $e->getMessage() + ]); + } + + // Try to assign free role (if using Spatie Permission) + try { + if (method_exists($user, 'assignRole')) { + $user->assignRole('free'); + Log::info('Role assigned to user', ['user_id' => $user->id, 'role' => 'free']); + } + } catch (Exception $e) { + Log::warning('Could not assign role to user', [ + 'user_id' => $user->id, + 'error' => $e->getMessage() + ]); + } + + DB::commit(); + Log::info('User registration transaction committed', ['user_id' => $user->id]); + + // Send admin notification (non-blocking) + try { + $this->sendAdminNotification($user); + Log::info('New free user notification sent', ['user_id' => $user->id]); + } catch (Exception $e) { + Log::error('Failed to send new user notification', [ + 'user_id' => $user->id, + 'error' => $e->getMessage() + ]); + } + + // Log them in + auth()->login($user); + Log::info('User logged in after registration', ['user_id' => $user->id]); + + // Redirect to tools discovery page + return redirect()->route('tools.discover')->with('success', + 'Registration successful! Welcome to our platform. Browse available assessment tools below.' + ); + + } catch (Exception $e) { + DB::rollBack(); + + Log::error('Free user registration failed', [ + 'error' => $e->getMessage(), + 'trace' => $e->getTraceAsString(), + 'data' => $request->except(['password', 'password_confirmation']) + ]); + + // Return specific error message + if ($e instanceof \Illuminate\Database\QueryException) { + if (str_contains($e->getMessage(), 'users_email_unique')) { + throw ValidationException::withMessages([ + 'email' => 'This email address is already registered. Please use a different email or try signing in.' + ]); + } + } + + throw ValidationException::withMessages([ + 'email' => 'Registration failed due to a system error. Please try again in a few moments.' + ]); + } + } + + /** + * Complete user profile after initial registration + */ + public function completeProfile(Request $request) + { + $data = $request->validate([ + 'company_name_ar' => ['required', 'string', 'max:255'], + 'company_name_en' => ['required', 'string', 'max:255'], + 'company_type' => ['required', 'integer', 'in:1,2,3'], + 'region' => ['required', 'string', 'max:255'], + 'city' => ['required', 'string', 'max:255'], + 'employee_name_ar' => ['required', 'string', 'max:255'], + 'employee_name_en' => ['required', 'string', 'max:255'], + 'employee_type' => ['required', 'integer', 'in:1,2,3,4,5,6,7'], + 'phone' => ['required', 'string', 'max:255'], + 'website' => ['nullable', 'url', 'max:255'], + 'notes' => ['nullable', 'string'], + 'how_did_you_hear' => ['nullable', 'string', 'max:255'], + 'phone' => ['required', 'string', 'max:255'], + 'address' => ['required', 'string'], + ]); + + $user = $request->user(); + + if ($user && $user->details) { + $user->details->update([ + 'company_name_ar' => $data['company_name_ar'], + 'company_name_en' => $data['company_name_en'], + 'company_type' => $data['company_type'], + 'region' => $data['region'], + 'city' => $data['city'], + 'employee_name_ar' => $data['employee_name_ar'], + 'employee_name_en' => $data['employee_name_en'], + 'employee_type' => $data['employee_type'], + 'phone' => $data['phone'], + 'website' => $data['website'] ?? null, + 'notes' => $data['notes'] ?? null, + 'how_did_you_hear' => $data['how_did_you_hear'] ?? null, + 'phone' => $data['phone'], + 'address' => $data['address'], + 'profile_completed' => true, + ]); + } + + return redirect()->route('dashboard'); + } + + /** + * Send admin notification about new user + */ + private function sendAdminNotification(User $user) + { + try { + $adminEmail = env('ADMIN_EMAIL', 'admin@example.com'); + $subject = 'New Free User Registration - ' . $user->name; + + $message = "New free user registered:\n\n" . + "Name: {$user->name}\n" . + "Email: {$user->email}\n" . + "Registered At: {$user->created_at}\n"; + + // Simple mail function - you can replace with Laravel Mail facade if needed + if (function_exists('mail')) { + mail($adminEmail, $subject, $message); + } + + } catch (Exception $e) { + Log::error('Failed to send admin notification', [ + 'user_id' => $user->id, + 'error' => $e->getMessage() + ]); + } + } + + /** + * Show subscription upgrade page + */ + public function showSubscription() + { + $user = auth()->user(); + + if (!$user) { + return redirect()->route('login'); + } + + // Load relationships safely + try { + $user->load(['details', 'subscription']); + } catch (Exception $e) { + Log::warning('Could not load user relationships', [ + 'user_id' => $user->id, + 'error' => $e->getMessage() + ]); + } + + return Inertia::render('SubscriptionUpgrade', [ + 'user' => [ + 'id' => $user->id, + 'name' => $user->name, + 'email' => $user->email, + 'details' => $user->details ?? null, + 'subscription' => $user->subscription ?? null, + ], + 'currentPlan' => $user->subscription?->plan_type ?? 'free' + ]); + } +} diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php new file mode 100644 index 000000000..02efd8603 --- /dev/null +++ b/app/Http/Kernel.php @@ -0,0 +1,77 @@ + + */ + protected $middleware = [ + // \App\Http\Middleware\TrustHosts::class, + \App\Http\Middleware\TrustProxies::class, + \Illuminate\Http\Middleware\HandleCors::class, + \App\Http\Middleware\PreventRequestsDuringMaintenance::class, + \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, + \App\Http\Middleware\TrimStrings::class, + \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, + ]; + + /** + * The application's route middleware groups. + * + * @var array> + */ + protected $middlewareGroups = [ + 'web' => [ + \App\Http\Middleware\EncryptCookies::class, + \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, + \Illuminate\Session\Middleware\StartSession::class, + \Illuminate\View\Middleware\ShareErrorsFromSession::class, + \App\Http\Middleware\VerifyCsrfToken::class, + \Illuminate\Routing\Middleware\SubstituteBindings::class, + \App\Http\Middleware\HandleInertiaRequests::class, + \App\Http\Middleware\HandleAppearance::class, + // REMOVED: CheckFilamentAccess from web middleware - it should only be applied to admin routes + ], + + 'api' => [ + // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, + \Illuminate\Routing\Middleware\ThrottleRequests::class.':api', + \Illuminate\Routing\Middleware\SubstituteBindings::class, + ], + ]; + + /** + * The application's middleware aliases. + * + * Aliases may be used instead of class names to conveniently assign middleware to routes and groups. + * + * @var array + */ + protected $middlewareAliases = [ + 'auth' => \App\Http\Middleware\Authenticate::class, + 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, + 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class, + 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, + 'can' => \Illuminate\Auth\Middleware\Authorize::class, + 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, + 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, + 'precognitive' => \Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests::class, + 'signed' => \App\Http\Middleware\ValidateSignature::class, + 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, + 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, + + // Custom middleware aliases + 'checkAccess' => \App\Http\Middleware\CheckUserAccess::class, + 'checkAssessmentLimits' => \App\Http\Middleware\CheckAssessmentLimits::class, + // FIXED: Only apply CheckFilamentAccess to specific admin routes, not globally + 'checkFilamentAccess' => \App\Http\Middleware\CheckFilamentAccess::class, + ]; +} diff --git a/app/Http/Middleware/CheckAssessmentLimits.php b/app/Http/Middleware/CheckAssessmentLimits.php new file mode 100644 index 000000000..d1c08bdcd --- /dev/null +++ b/app/Http/Middleware/CheckAssessmentLimits.php @@ -0,0 +1,41 @@ +user(); + + // Allow access if no user (guest) + if (!$user) { + return $next($request); + } + + // Always allow premium/admin users + if ($user->isPremium() || $user->isAdmin()) { + return $next($request); + } + + // For free users, check limits only on POST requests (submissions) + if ($request->isMethod('POST') && $request->routeIs('assessment.submit')) { + if (!$user->canCreateAssessment()) { + return redirect()->route('subscription.show') + ->with('error', 'You have reached your assessment limit. Please upgrade to premium for unlimited assessments.'); + } + } + + // Allow GET requests (viewing assessment tools, starting assessments) + return $next($request); + } +} diff --git a/app/Http/Middleware/CheckFilamentAccess.php b/app/Http/Middleware/CheckFilamentAccess.php new file mode 100644 index 000000000..d3c8f6a67 --- /dev/null +++ b/app/Http/Middleware/CheckFilamentAccess.php @@ -0,0 +1,29 @@ +path(), 'admin') && !str_contains($request->path(), 'filament')) { +// return $next($request); +// } +// +// $user = auth()->user(); +// +// if (!$user || !$user->isAdmin()) { +// abort(403, 'Access denied to admin panel.'); +// } + + return $next($request); + } +} diff --git a/app/Http/Middleware/CheckToolAccess.php b/app/Http/Middleware/CheckToolAccess.php new file mode 100644 index 000000000..cfd6555ad --- /dev/null +++ b/app/Http/Middleware/CheckToolAccess.php @@ -0,0 +1,44 @@ +route('login'); + } + + $user = Auth::user(); + + // Get tool ID from route parameter if not provided + if (!$toolId) { + $toolId = $request->route('tool')?->id ?? $request->route('tool'); + } + + if (!$toolId) { + return redirect()->route('tools.discover') + ->with('error', 'Tool not specified.'); + } + + // Check if user has access to this specific tool + if (!$user->hasAccessToTool($toolId)) { + $tool = Tool::find($toolId); + $toolName = $tool ? $tool->name_en : 'this tool'; + + return redirect()->route('tools.subscribe', $toolId) + ->with('info', "Subscribe to {$toolName} to get started with assessments!"); + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/CheckUserAccess.php b/app/Http/Middleware/CheckUserAccess.php new file mode 100644 index 000000000..31f372e29 --- /dev/null +++ b/app/Http/Middleware/CheckUserAccess.php @@ -0,0 +1,79 @@ +user(); + + if (!$user) { + return redirect()->route('login'); + } + + // Load user relationships to avoid errors + $user->load(['subscription', 'details', 'roles']); + + // Create default subscription/details if missing + if (!$user->subscription || !$user->details) { + $user->createDefaultSubscriptionAndDetails(); + $user->refresh(); + } + + Log::info('CheckUserAccess middleware called', [ + 'user_id' => $user->id, + 'access_type' => $accessType, + 'user_is_admin' => $user->isAdmin(), + 'user_has_tool_subscriptions' => $user->hasAnyToolSubscription(), + 'requested_route' => $request->route()?->getName(), + ]); + + switch ($accessType) { + case 'admin': + // Only super admins can access admin routes + if (!$user->isAdmin()) { + Log::info('Non-admin user blocked from admin route', ['user_id' => $user->id]); + return redirect()->route('dashboard')->with('error', 'Access denied. Admin privileges required.'); + } + break; + + case 'premium': + // Only users with tool subscriptions or admins can access premium routes + if (!$user->hasAnyToolSubscription() && !$user->isAdmin()) { + Log::info('User without tool subscriptions blocked from premium route', ['user_id' => $user->id]); + return redirect()->route('tools.discover')->with('error', 'Please subscribe to a tool to access this feature.'); + } + break; + + case 'free': + // Only users WITHOUT tool subscriptions can access free routes (unless admin) + if ($user->hasAnyToolSubscription() && !$user->isAdmin()) { + Log::info('Premium user redirected from free route to dashboard', ['user_id' => $user->id]); + return redirect()->route('dashboard'); + } + break; + + default: + Log::warning('Unknown access type in CheckUserAccess middleware', [ + 'access_type' => $accessType, + 'user_id' => $user->id + ]); + break; + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/HandleAppearance.php b/app/Http/Middleware/HandleAppearance.php index f1a02bbc9..efcd13e47 100644 --- a/app/Http/Middleware/HandleAppearance.php +++ b/app/Http/Middleware/HandleAppearance.php @@ -16,7 +16,16 @@ class HandleAppearance */ public function handle(Request $request, Closure $next): Response { - View::share('appearance', $request->cookie('appearance') ?? 'system'); + // Get appearance preference from cookie, default to 'light' + $appearance = $request->cookie('appearance', 'light'); + + // Validate the appearance value + if (!in_array($appearance, ['light', 'dark', 'system'])) { + $appearance = 'light'; + } + + // Share with all views + View::share('appearance', $appearance); return $next($request); } diff --git a/app/Http/Requests/ContactSalesRequest.php b/app/Http/Requests/ContactSalesRequest.php new file mode 100644 index 000000000..3fcf5c35c --- /dev/null +++ b/app/Http/Requests/ContactSalesRequest.php @@ -0,0 +1,86 @@ + ['required', 'string', 'max:255'], + 'email' => ['required', 'email', 'max:255'], + 'phone' => ['nullable', 'string', 'max:20'], + 'company' => ['required', 'string', 'max:255'], + 'position' => ['nullable', 'string', 'max:255'], + 'company_type' => ['nullable', 'string', 'max:255'], + 'interest' => ['nullable', 'string', 'max:255'], + 'message' => ['nullable', 'string', 'max:2000'], + 'estimated_users' => ['nullable', 'string', 'max:50'], + 'timeline' => ['nullable', 'string', 'max:100'], + 'budget_range' => ['nullable', 'string', 'max:100'], + 'subscribe_newsletter' => ['boolean'], + 'subscribe_updates' => ['boolean'], + 'subscribe_offers' => ['boolean'], + ]; + } + + /** + * Get custom error messages for validation rules. + */ + public function messages(): array + { + return [ + 'name.required' => 'Please provide your full name.', + 'email.required' => 'A valid business email address is required.', + 'email.email' => 'Please provide a valid email address.', + 'company.required' => 'Please provide your company name.', + 'phone.max' => 'Phone number cannot exceed 20 characters.', + 'message.max' => 'Message cannot exceed 2000 characters.', + ]; + } + + /** + * Get custom attribute names for error messages. + */ + public function attributes(): array + { + return [ + 'name' => 'full name', + 'email' => 'email address', + 'phone' => 'phone number', + 'company' => 'company name', + 'position' => 'job title', + 'company_type' => 'company type', + 'interest' => 'primary interest', + 'message' => 'additional details', + 'estimated_users' => 'estimated users', + 'timeline' => 'implementation timeline', + 'budget_range' => 'budget range', + ]; + } + + /** + * Prepare the data for validation. + */ + protected function prepareForValidation(): void + { + $this->merge([ + 'subscribe_newsletter' => $this->boolean('subscribe_newsletter'), + 'subscribe_updates' => $this->boolean('subscribe_updates'), + 'subscribe_offers' => $this->boolean('subscribe_offers'), + ]); + } +} diff --git a/app/Http/Requests/StoreToolRequestRequest.php b/app/Http/Requests/StoreToolRequestRequest.php new file mode 100644 index 000000000..90fb40dea --- /dev/null +++ b/app/Http/Requests/StoreToolRequestRequest.php @@ -0,0 +1,23 @@ + ['required', 'integer', 'exists:tools,id'], + 'name' => ['required', 'string', 'max:255'], + 'email' => ['required', 'email', 'max:255'], + 'organization' => ['nullable', 'string', 'max:255'], + 'message' => ['nullable', 'string', 'max:2000'], + ]; + } +} diff --git a/app/Mail/GuestAssessmentCompleted.php b/app/Mail/GuestAssessmentCompleted.php new file mode 100644 index 000000000..89c638783 --- /dev/null +++ b/app/Mail/GuestAssessmentCompleted.php @@ -0,0 +1,52 @@ +assessment = $assessment; + $this->resultsUrl = $resultsUrl; + $this->basicResults = $basicResults; + } + + public function envelope(): Envelope + { + return new Envelope( + subject: 'Your Assessment Results - ' . $this->assessment->tool->name_en, + ); + } + + public function content(): Content + { + return new Content( + view: 'emails.guest-assessment-completed', + with: [ + 'assessment' => $this->assessment, + 'resultsUrl' => $this->resultsUrl, + 'basicResults' => $this->basicResults, + 'toolName' => $this->assessment->tool->name_en, + 'userName' => $this->assessment->name, + ] + ); + } + + public function attachments(): array + { + return []; + } +} diff --git a/app/Mail/SendToolQuotation.php b/app/Mail/SendToolQuotation.php new file mode 100644 index 000000000..40ae2aa19 --- /dev/null +++ b/app/Mail/SendToolQuotation.php @@ -0,0 +1,52 @@ +toolRequest = $toolRequest; + $this->account = $account; + $this->data = $data; + } + + public function envelope(): Envelope + { + return new Envelope( + subject: 'Quotation for ' . $this->toolRequest->tool->name_en, + ); + } + + public function content(): Content + { + return new Content( + view: 'emails.tool-quotation', + with: [ + 'request' => $this->toolRequest, + 'account' => $this->account, + 'data' => $this->data, + ] + ); + + } + + public function attachments(): array + { + return []; + } +} diff --git a/app/Mail/TestMail.php b/app/Mail/TestMail.php new file mode 100644 index 000000000..3adb1b58a --- /dev/null +++ b/app/Mail/TestMail.php @@ -0,0 +1,17 @@ +subject('Test Email') + ->view('emails.test'); + } +} diff --git a/app/Models/Account.php b/app/Models/Account.php new file mode 100644 index 000000000..12f397821 --- /dev/null +++ b/app/Models/Account.php @@ -0,0 +1,20 @@ + 'boolean', + ]; + + /** + * Get the criterion that this action belongs to + */ + public function criterion(): BelongsTo + { + return $this->belongsTo(Criterion::class, 'criteria_id'); + } + + /** + * Get the action text based on locale + */ + public function getAction(string $locale = null): string + { + $locale = $locale ?: app()->getLocale(); + $field = "action_{$locale}"; + + return $this->{$field} ?? $this->action_en; + } + + /** + * Get the action type text + */ + public function getActionTypeText(string $locale = 'en'): string + { + if ($locale === 'ar') { + return $this->flag ? 'إجراءات تحسينية' : 'إجراءات تصليحية'; + } + + return $this->flag ? 'Improvement Action' : 'Corrective Action'; + } + + /** + * Scope for improvement actions + */ + public function scopeImprovement($query) + { + return $query->where('flag', true); + } + + /** + * Scope for corrective actions + */ + public function scopeCorrective($query) + { + return $query->where('flag', false); + } +} diff --git a/app/Models/Assessment.php b/app/Models/Assessment.php new file mode 100644 index 000000000..7dfc6e268 --- /dev/null +++ b/app/Models/Assessment.php @@ -0,0 +1,500 @@ + 'datetime', + 'completed_at' => 'datetime', + ]; + + public function user(): BelongsTo + { + return $this->belongsTo(User::class); + } + + public function isFreeAssessment(): bool + { + return $this->assessment_type === 'free'; + } + + /** + * Check if this is a premium assessment + */ + public function isPremiumAssessment(): bool + { + return $this->assessment_type === 'premium'; + } + + /** + * Get simplified results for free assessments + */ + public function getSimplifiedResults(): array + { + if (!$this->isFreeAssessment()) { + return $this->getFullResults(); + } + + $responses = $this->responses; + $totalCriteria = $this->tool->getAllCriteriaCount(); + + $yesCount = $responses->where('response', 'yes')->count(); + $noCount = $responses->where('response', 'no')->count(); + $naCount = $responses->where('response', 'na')->count(); + + return [ + 'assessment_type' => 'free', + 'total_criteria' => $totalCriteria, + 'responses' => [ + 'yes' => $yesCount, + 'no' => $noCount, + 'na' => $naCount, + ], + 'completion_rate' => $totalCriteria > 0 ? round((($yesCount + $noCount + $naCount) / $totalCriteria) * 100, 1) : 0, + 'compliance_rate' => ($yesCount + $noCount) > 0 ? round(($yesCount / ($yesCount + $noCount)) * 100, 1) : 0, + 'message' => 'Upgrade to premium for detailed domain analysis and comprehensive reports.', + ]; + } + + /** + * Scope for free assessments + */ + public function scopeFreeAssessments($query) + { + return $query->where('assessment_type', 'free'); + } + + /** + * Scope for premium assessments + */ + public function scopePremiumAssessments($query) + { + return $query->where('assessment_type', 'premium'); + } + + public function guestSession(): HasOne + { + return $this->hasOne(GuestSession::class); + } + + public function tool(): BelongsTo + { + return $this->belongsTo(Tool::class); + } + + public function responses(): HasMany + { + return $this->hasMany(AssessmentResponse::class); + } + + public function results(): HasMany + { + return $this->hasMany(AssessmentResult::class); + } + + /** + * Get localized title for this assessment. + */ + public function getTitle(string $locale = null): string + { + $locale = $locale ?: app()->getLocale(); + $field = "title_{$locale}"; + + return $this->{$field} ?: $this->tool?->getName($locale); + } + + /** + * Accessor for localized title attribute. + */ + public function getTitleAttribute(): string + { + return $this->getTitle(); + } + + /** + * Check if this is a guest assessment (no user_id) + */ + public function isGuestAssessment(): bool + { + return is_null($this->user_id); + } + + /** + * Check if this assessment belongs to a specific user + */ + public function belongsToUser(int $userId): bool + { + return $this->user_id === $userId; + } + + /** + * Calculate and save assessment results + */ + public function calculateResults(): void + { + $tool = $this->tool->load(['domains.categories.criteria']); + $responses = $this->responses->keyBy('criterion_id'); + + // Convert responses to simple array format for the calculation methods + $responseArray = []; + foreach ($responses as $criterionId => $response) { + $responseArray[$criterionId] = $response->response; // 'yes', 'no', or 'na' + } + + Log::info('Calculating results for assessment', [ + 'assessment_id' => $this->id, + 'responses_count' => count($responseArray), + 'sample_responses' => array_slice($responseArray, 0, 5, true) + ]); + + // Clear existing results + $this->results()->delete(); + + // Calculate results for each domain and category + foreach ($tool->domains as $domain) { + $domainScore = $domain->calculateScore($responseArray); + + Log::info('Domain score calculated', [ + 'domain_id' => $domain->id, + 'domain_name' => $domain->name_en, + 'score' => $domainScore + ]); + + // Save domain result + AssessmentResult::create([ + 'assessment_id' => $this->id, + 'domain_id' => $domain->id, + 'category_id' => null, + 'total_criteria' => $domainScore['total_criteria'], + 'applicable_criteria' => $domainScore['applicable_criteria'], + 'yes_count' => $domainScore['yes_count'], + 'no_count' => $domainScore['no_count'], + 'na_count' => $domainScore['na_count'], + 'score_percentage' => $domainScore['percentage'], + 'weighted_score' => $domainScore['percentage'] * ($domain->weight_percentage ?? 100) / 100, + ]); + + // Save category results + foreach ($domainScore['category_scores'] as $categoryScore) { + AssessmentResult::create([ + 'assessment_id' => $this->id, + 'domain_id' => $domain->id, + 'category_id' => $categoryScore['category_id'], + 'total_criteria' => $domain->categories->find($categoryScore['category_id'])->criteria->count(), + 'applicable_criteria' => $categoryScore['applicable_count'], + 'yes_count' => $categoryScore['yes_count'], + 'no_count' => $categoryScore['no_count'], + 'na_count' => $categoryScore['na_count'], + 'score_percentage' => $categoryScore['percentage'], + 'weighted_score' => $categoryScore['percentage'] * ($categoryScore['weight_percentage'] ?? 100) / 100, + ]); + } + } + } + + /** + * Get assessment results with fixed calculation + */ + public function getResults(): array + { + Log::info('Getting results for assessment', ['assessment_id' => $this->id]); + + // Get all responses for this assessment + $responses = $this->responses()->with('criterion.category.domain')->get(); + + Log::info('Responses loaded', [ + 'count' => $responses->count(), + 'sample' => $responses->take(3)->map(function($r) { + return [ + 'criterion_id' => $r->criterion_id, + 'response' => $r->response, + 'criterion_name' => $r->criterion->name_en ?? 'Unknown' + ]; + }) + ]); + + if ($responses->isEmpty()) { + Log::warning('No responses found for assessment', ['assessment_id' => $this->id]); + return $this->getEmptyResults(); + } + + // Count responses by type + $yesCount = $responses->where('response', 'yes')->count(); + $noCount = $responses->where('response', 'no')->count(); + $naCount = $responses->where('response', 'na')->count(); + $totalResponses = $yesCount + $noCount + $naCount; + $applicableResponses = $yesCount + $noCount; // Exclude N/A from applicable + + Log::info('Response counts', [ + 'yes' => $yesCount, + 'no' => $noCount, + 'na' => $naCount, + 'total' => $totalResponses, + 'applicable' => $applicableResponses + ]); + + // Calculate overall percentage - FIXED LOGIC + // If all responses are "Yes", score should be 100% + // If all responses are "No", score should be 0% + // N/A responses are excluded from the calculation + $overallPercentage = 0; + if ($applicableResponses > 0) { + $overallPercentage = ($yesCount / $applicableResponses) * 100; + } + + Log::info('Overall percentage calculated', [ + 'percentage' => $overallPercentage, + 'calculation' => "({$yesCount} / {$applicableResponses}) * 100" + ]); + + // Group responses by domain + $domainResults = []; + $responsesByDomain = $responses->groupBy(function ($response) { + return $response->criterion->category->domain->id; + }); + + foreach ($responsesByDomain as $domainId => $domainResponses) { + $domain = $domainResponses->first()->criterion->category->domain; + + $domainYesCount = $domainResponses->where('response', 'yes')->count(); + $domainNoCount = $domainResponses->where('response', 'no')->count(); + $domainNaCount = $domainResponses->where('response', 'na')->count(); + $domainApplicable = $domainYesCount + $domainNoCount; + + // Calculate domain percentage + $domainPercentage = 0; + if ($domainApplicable > 0) { + $domainPercentage = ($domainYesCount / $domainApplicable) * 100; + } + + $domainResults[] = [ + 'domain_id' => $domain->id, + 'domain_name' => $domain->name_en, + 'score_percentage' => round($domainPercentage, 2), + 'total_criteria' => $domainResponses->count(), + 'applicable_criteria' => $domainApplicable, + 'yes_count' => $domainYesCount, + 'no_count' => $domainNoCount, + 'na_count' => $domainNaCount, + 'weighted_score' => round($domainPercentage, 2), + ]; + } + + // Group responses by category within domains + $categoryResults = []; + foreach ($responsesByDomain as $domainId => $domainResponses) { + $categoriesByDomain = $domainResponses->groupBy(function ($response) { + return $response->criterion->category->id; + }); + + $categoryResults[$domainId] = []; + foreach ($categoriesByDomain as $categoryId => $categoryResponses) { + $category = $categoryResponses->first()->criterion->category; + + $categoryYesCount = $categoryResponses->where('response', 'yes')->count(); + $categoryNoCount = $categoryResponses->where('response', 'no')->count(); + $categoryNaCount = $categoryResponses->where('response', 'na')->count(); + $categoryApplicable = $categoryYesCount + $categoryNoCount; + + // Calculate category percentage + $categoryPercentage = 0; + if ($categoryApplicable > 0) { + $categoryPercentage = ($categoryYesCount / $categoryApplicable) * 100; + } + + $categoryResults[$domainId][] = [ + 'category_id' => $category->id, + 'category_name' => $category->name_en, + 'score_percentage' => round($categoryPercentage, 2), + 'applicable_criteria' => $categoryApplicable, + 'yes_count' => $categoryYesCount, + 'no_count' => $categoryNoCount, + 'na_count' => $categoryNaCount, + ]; + } + } + + $results = [ + 'domain_results' => $domainResults, + 'category_results' => $categoryResults, + 'overall_percentage' => round($overallPercentage, 2), + 'total_criteria' => $totalResponses, + 'applicable_criteria' => $applicableResponses, + 'yes_count' => $yesCount, + 'no_count' => $noCount, + 'na_count' => $naCount, + ]; + + Log::info('Final results calculated', [ + 'overall_percentage' => $results['overall_percentage'], + 'domain_count' => count($domainResults) + ]); + + return $results; + } + + /** + * Get empty results structure + */ + private function getEmptyResults(): array + { + return [ + 'domain_results' => [], + 'category_results' => [], + 'overall_percentage' => 0, + 'total_criteria' => 0, + 'applicable_criteria' => 0, + 'yes_count' => 0, + 'no_count' => 0, + 'na_count' => 0, + ]; + } + + /** + * Check if assessment is complete + */ + public function isComplete(): bool + { + // Get all criteria for this tool + $totalCriteria = $this->tool->domains() + ->with('categories.criteria') + ->get() + ->flatMap(fn($domain) => $domain->categories) + ->flatMap(fn($category) => $category->criteria) + ->count(); + + $answeredCriteria = $this->responses()->count(); + + // Also check required attachments + $requiredAttachmentsMet = $this->checkRequiredAttachments(); + + return $totalCriteria === $answeredCriteria && $requiredAttachmentsMet; + } + + /** + * Check if all required attachments are provided + */ + public function checkRequiredAttachments(): bool + { + $yesResponsesRequiringAttachment = $this->responses() + ->where('response', 'yes') + ->whereHas('criterion', function($query) { + $query->where('requires_attachment', true); + }) + ->get(); + + foreach ($yesResponsesRequiringAttachment as $response) { + if (empty($response->attachment)) { + return false; + } + } + + return true; + } + + /** + * Get completion percentage + */ + public function getCompletionPercentage(): float + { + // Get all criteria for this tool + $totalCriteria = $this->tool->domains() + ->with('categories.criteria') + ->get() + ->flatMap(fn($domain) => $domain->categories) + ->flatMap(fn($category) => $category->criteria) + ->count(); + + $answeredCriteria = $this->responses()->count(); + + if ($totalCriteria === 0) { + return 100; + } + + return round(($answeredCriteria / $totalCriteria) * 100, 2); + } + + /** + * Mark assessment as completed + */ + public function markAsCompleted(): void + { + $this->update([ + 'status' => 'completed', + 'completed_at' => now(), + ]); + + $this->calculateResults(); + } + + /** + * Get the appropriate display name for the assessment + */ + public function getDisplayName(string $locale = 'en'): string + { + $field = "title_{$locale}"; + + // If assessment has a title, use it + if ($this->{$field}) { + return $this->{$field}; + } + + // Otherwise, use the tool name + $toolField = "name_{$locale}"; + return $this->tool->{$toolField} ?? $this->tool->name_en; + } + + /** + * Get the appropriate assessor name + */ + public function getAssessorName(): string + { + // If it's a user assessment, return the user's name + if ($this->user_id && $this->user) { + return $this->user->name; + } + + // Otherwise, return the guest name + return $this->name ?? 'Unknown'; + } + + /** + * Get the appropriate email + */ + public function getAssessorEmail(): string + { + // If it's a user assessment, return the user's email + if ($this->user_id && $this->user) { + return $this->user->email; + } + + // Otherwise, return the guest email + return $this->email ?? ''; + } +} diff --git a/app/Models/AssessmentResponse.php b/app/Models/AssessmentResponse.php new file mode 100644 index 000000000..b91dba194 --- /dev/null +++ b/app/Models/AssessmentResponse.php @@ -0,0 +1,45 @@ +belongsTo(Assessment::class); + } + + public function criterion(): BelongsTo + { + return $this->belongsTo(Criterion::class); + } + + // Add this method to help with debugging + public function getResponseValue(): string + { + return $this->response ?? 'na'; + } + + + + public function correctiveAction(): HasOne + { + return $this->hasOne(CorrectiveAction::class); + } + +} diff --git a/app/Models/AssessmentResult.php b/app/Models/AssessmentResult.php new file mode 100644 index 000000000..4200e2e7e --- /dev/null +++ b/app/Models/AssessmentResult.php @@ -0,0 +1,44 @@ + 'decimal:2', + 'weighted_score' => 'decimal:2', + ]; + + public function assessment(): BelongsTo + { + return $this->belongsTo(Assessment::class); + } + + public function domain(): BelongsTo + { + return $this->belongsTo(Domain::class); + } + + public function category(): BelongsTo + { + return $this->belongsTo(Category::class); + } +} diff --git a/app/Models/Category.php b/app/Models/Category.php new file mode 100644 index 000000000..96d0add25 --- /dev/null +++ b/app/Models/Category.php @@ -0,0 +1,138 @@ + 'decimal:2', + ]; + public function domain(): BelongsTo + { + return $this->belongsTo(Domain::class); + } + + public function criteria(): HasMany + { + return $this->hasMany(Criterion::class)->orderBy('order'); + } + + public function getName(string $locale = null): string + { + $locale = $locale ?: app()->getLocale(); + $field = "name_{$locale}"; + + return $this->{$field}; + } + + public function getDescription(string $locale = null): ?string + { + $locale = $locale ?: app()->getLocale(); + $field = "description_{$locale}"; + + return $this->{$field}; + } + + /** + * Accessor for localized name attribute. + */ + public function getNameAttribute(): string + { + return $this->getName(); + } + + /** + * Accessor for localized description attribute. + */ + public function getDescriptionAttribute(): ?string + { + return $this->getDescription(); + } + + + public function calculateScore(array $responses): array + { + $criteria = $this->criteria; + $totalCriteria = $criteria->count(); + + if ($totalCriteria === 0) { + return [ + 'score' => 0, + 'percentage' => 0, + 'applicable_count' => 0, + 'yes_count' => 0, + 'no_count' => 0, + 'na_count' => 0, + ]; + } + + $yesCount = 0; + $noCount = 0; + $naCount = 0; + $applicableCount = 0; + + foreach ($criteria as $criterion) { + // Check if response exists for this criterion + if (!isset($responses[$criterion->id])) { + // If no response exists, treat as unanswered (you might want to handle this differently) + $naCount++; // or you could skip this criterion entirely + continue; + } + + $response = $responses[$criterion->id]; + + switch ($response) { + case 'yes': + $yesCount++; + $applicableCount++; + break; + case 'no': + $noCount++; + $applicableCount++; + break; + case 'na': + $naCount++; + break; + default: + // Handle unexpected response values + $naCount++; + break; + } + } + + // Calculate percentage based on applicable criteria only + $percentage = $applicableCount > 0 ? ($yesCount / $applicableCount) * 100 : 0; + + return [ + 'score' => $yesCount, + 'percentage' => round($percentage, 2), + 'applicable_count' => $applicableCount, + 'yes_count' => $yesCount, + 'no_count' => $noCount, + 'na_count' => $naCount, + ]; + } +} + + + + diff --git a/app/Models/Comment.php b/app/Models/Comment.php new file mode 100644 index 000000000..2ce84236b --- /dev/null +++ b/app/Models/Comment.php @@ -0,0 +1,24 @@ +belongsTo(Post::class); + } +} diff --git a/app/Models/CorrectiveAction.php b/app/Models/CorrectiveAction.php new file mode 100644 index 000000000..ba6c6cf02 --- /dev/null +++ b/app/Models/CorrectiveAction.php @@ -0,0 +1,25 @@ +belongsTo(AssessmentResponse::class); + } +} diff --git a/app/Models/Criterion.php b/app/Models/Criterion.php new file mode 100644 index 000000000..ab6a0f469 --- /dev/null +++ b/app/Models/Criterion.php @@ -0,0 +1,96 @@ + 'boolean', + ]; + + public function category(): BelongsTo + { + return $this->belongsTo(Category::class); + } + + public function responses(): HasMany + { + return $this->hasMany(AssessmentResponse::class); + } + + /** + * Get all actions for this criterion + */ + public function actions(): HasMany + { + return $this->hasMany(Action::class); + } + + /** + * Get improvement actions only + */ + public function improvementActions(): HasMany + { + return $this->hasMany(Action::class)->where('flag', true); + } + + /** + * Get corrective actions only + */ + public function correctiveActions(): HasMany + { + return $this->hasMany(Action::class)->where('flag', false); + } + + public function getName(string $locale = null): string + { + $locale = $locale ?: app()->getLocale(); + $field = "name_{$locale}"; + + return $this->{$field}; + } + + public function getDescription(string $locale = null): ?string + { + $locale = $locale ?: app()->getLocale(); + $field = "description_{$locale}"; + + return $this->{$field}; + } + + /** + * Accessor for localized name attribute. + */ + public function getNameAttribute(): string + { + return $this->getName(); + } + + /** + * Accessor for localized description attribute. + */ + public function getDescriptionAttribute(): ?string + { + return $this->getDescription(); + } +} diff --git a/app/Models/Domain.php b/app/Models/Domain.php new file mode 100644 index 000000000..76f3027ea --- /dev/null +++ b/app/Models/Domain.php @@ -0,0 +1,135 @@ + 'decimal:2',]; + + public function tool(): BelongsTo + { + return $this->belongsTo(Tool::class); + } + + public function categories(): HasMany + { + return $this->hasMany(Category::class)->orderBy('order'); + } + + public function getName(string $locale = null): string + { + $locale = $locale ?: app()->getLocale(); + $field = "name_{$locale}"; + + return $this->{$field}; + } + + public function getDescription(string $locale = null): ?string + { + $locale = $locale ?: app()->getLocale(); + $field = "description_{$locale}"; + + return $this->{$field}; + } + + /** + * Accessor for localized name attribute. + */ + public function getNameAttribute(): string + { + return $this->getName(); + } + + /** + * Accessor for localized description attribute. + */ + public function getDescriptionAttribute(): ?string + { + return $this->getDescription(); + } + + public function calculateScore(array $responses): array + { + $categories = $this->categories; + $totalCategories = $categories->count(); + + if ($totalCategories === 0) { + return [ + 'score' => 0, + 'percentage' => 0, + 'category_scores' => [], + 'total_criteria' => 0, + 'applicable_criteria' => 0, + 'yes_count' => 0, + 'no_count' => 0, + 'na_count' => 0, + ]; + } + + $categoryScores = []; + $totalYes = 0; + $totalNo = 0; + $totalNA = 0; + $totalApplicable = 0; + $totalCriteria = 0; + $weightedScore = 0; + + foreach ($categories as $category) { + $categoryScore = $category->calculateScore($responses); + $categoryScores[] = array_merge($categoryScore, [ + 'category_id' => $category->id, + 'category_name' => $category->name, + 'weight_percentage' => $category->weight_percentage, + ]); + + $totalYes += $categoryScore['yes_count']; + $totalNo += $categoryScore['no_count']; + $totalNA += $categoryScore['na_count']; + $totalApplicable += $categoryScore['applicable_count']; + $totalCriteria += $category->criteria->count(); + + // Calculate weighted score if weight percentages are set + if ($category->weight_percentage) { + $weightedScore += ($categoryScore['percentage'] * $category->weight_percentage / 100); + } + } + + // If no weights are set, use simple average + if ($weightedScore === 0) { + $averagePercentages = collect($categoryScores)->avg('percentage'); + $finalPercentage = $averagePercentages ?? 0; + } else { + $finalPercentage = $weightedScore; + } + + return [ + 'score' => $totalYes, + 'percentage' => round($finalPercentage, 2), + 'category_scores' => $categoryScores, + 'total_criteria' => $totalCriteria, + 'applicable_criteria' => $totalApplicable, + 'yes_count' => $totalYes, + 'no_count' => $totalNo, + 'na_count' => $totalNA, + ]; + } +} diff --git a/app/Models/GuestSession.php b/app/Models/GuestSession.php new file mode 100644 index 000000000..acd072fbc --- /dev/null +++ b/app/Models/GuestSession.php @@ -0,0 +1,227 @@ + 'array', + 'started_at' => 'datetime', + 'completed_at' => 'datetime', + 'last_activity' => 'datetime', + 'latitude' => 'decimal:6', + 'longitude' => 'decimal:6', + ]; + + public function assessment(): BelongsTo + { + return $this->belongsTo(Assessment::class); + } + + /** + * Create a guest session from request data + */ + public static function createFromRequest($request, Assessment $assessment): self + { + $userAgent = $request->header('User-Agent'); + $ip = $request->ip(); + + // Parse user agent + $browser = self::parseBrowser($userAgent); + $os = self::parseOperatingSystem($userAgent); + $deviceType = self::parseDeviceType($userAgent); + + // Get location data (you can integrate with a service like ip-api.com) + $locationData = self::getLocationData($ip); + + return self::create([ + 'assessment_id' => $assessment->id, + 'session_id' => $request->session()->getId(), + 'name' => $assessment->name, + 'email' => $assessment->email, + 'ip_address' => $ip, + 'user_agent' => $userAgent, + 'device_type' => $deviceType, + 'browser' => $browser['name'] ?? null, + 'browser_version' => $browser['version'] ?? null, + 'operating_system' => $os, + 'country' => $locationData['country'] ?? null, + 'country_code' => $locationData['countryCode'] ?? null, + 'region' => $locationData['regionName'] ?? null, + 'city' => $locationData['city'] ?? null, + 'latitude' => $locationData['lat'] ?? null, + 'longitude' => $locationData['lon'] ?? null, + 'timezone' => $locationData['timezone'] ?? null, + 'isp' => $locationData['isp'] ?? null, + 'session_data' => [ + 'referrer' => $request->header('Referer'), + 'language' => $request->header('Accept-Language'), + ], + 'started_at' => now(), + 'last_activity' => now(), + ]); + } + + /** + * Update last activity + */ + public function updateActivity(): void + { + $this->update(['last_activity' => now()]); + } + + /** + * Mark session as completed + */ + public function markCompleted(): void + { + $this->update(['completed_at' => now()]); + } + + /** + * Check if session is active (within last 30 minutes) + */ + public function isActive(): bool + { + return $this->last_activity && $this->last_activity->gt(now()->subMinutes(30)); + } + + /** + * Get session duration + */ + public function getDuration(): ?string + { + if (!$this->completed_at) { + return null; + } + + return $this->started_at->diffForHumans($this->completed_at, true); + } + + /** + * Parse browser from user agent + */ + private static function parseBrowser(string $userAgent): array + { + $browsers = [ + 'Chrome' => '/Chrome\/([0-9.]+)/', + 'Firefox' => '/Firefox\/([0-9.]+)/', + 'Safari' => '/Safari\/([0-9.]+)/', + 'Edge' => '/Edge\/([0-9.]+)/', + 'Opera' => '/Opera\/([0-9.]+)/', + 'Internet Explorer' => '/MSIE ([0-9.]+)/', + ]; + + foreach ($browsers as $browser => $pattern) { + if (preg_match($pattern, $userAgent, $matches)) { + return [ + 'name' => $browser, + 'version' => $matches[1] ?? null, + ]; + } + } + + return ['name' => 'Unknown', 'version' => null]; + } + + /** + * Parse operating system from user agent + */ + private static function parseOperatingSystem(string $userAgent): ?string + { + $os = [ + 'Windows 11' => '/Windows NT 10.0.*rv:91/', + 'Windows 10' => '/Windows NT 10.0/', + 'Windows 8.1' => '/Windows NT 6.3/', + 'Windows 8' => '/Windows NT 6.2/', + 'Windows 7' => '/Windows NT 6.1/', + 'Mac OS X' => '/Mac OS X ([0-9_]+)/', + 'Linux' => '/Linux/', + 'Ubuntu' => '/Ubuntu/', + 'iPhone' => '/iPhone/', + 'iPad' => '/iPad/', + 'Android' => '/Android ([0-9.]+)/', + ]; + + foreach ($os as $osName => $pattern) { + if (preg_match($pattern, $userAgent)) { + return $osName; + } + } + + return 'Unknown'; + } + + /** + * Parse device type from user agent + */ + private static function parseDeviceType(string $userAgent): string + { + if (preg_match('/Mobile|Android|iPhone|iPad/', $userAgent)) { + if (preg_match('/iPad/', $userAgent)) { + return 'Tablet'; + } + return 'Mobile'; + } + + return 'Desktop'; + } + + /** + * Get location data from IP address + */ + private static function getLocationData(string $ip): array + { + // Skip for local/private IPs + if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false) { + return []; + } + + try { + // Using ip-api.com (free for non-commercial use) + $response = file_get_contents("http://ip-api.com/json/{$ip}"); + $data = json_decode($response, true); + + if ($data && $data['status'] === 'success') { + return $data; + } + } catch (\Exception $e) { + // Log error but don't fail + Log::warning('Failed to get location data', ['ip' => $ip, 'error' => $e->getMessage()]); + } + + return []; + } +} diff --git a/app/Models/Post.php b/app/Models/Post.php new file mode 100644 index 000000000..2ab5c24b9 --- /dev/null +++ b/app/Models/Post.php @@ -0,0 +1,86 @@ + 'array', + 'published_at' => 'datetime', + + ]; + + protected $appends = [ + 'thumbnail_url', + 'image_gallery_urls', + 'reading_time', + ]; + + protected static function booted() + { + static::creating(function (Post $post) { + $post->slug = static::generateUniqueSlug($post->title); + }); + } + + public function getThumbnailUrlAttribute() + { + return $this->thumbnail ? asset('storage/' . $this->thumbnail) : null; + } + + public function getImageGalleryUrlsAttribute() + { + return collect($this->image_gallery ?? [])->map(fn ($path) => asset('storage/' . $path)); + } + + + protected static function generateUniqueSlug(string $title): string + { + $slug = Str::slug($title); + $original = $slug; + $i = 1; + while (static::where('slug', $slug)->exists()) { + $slug = "$original-{$i}"; + $i++; + } + return $slug; + } + + // In app/Models/Post.php + +// Add this accessor to calculate reading time + public function getReadingTimeAttribute(): int + { + $wordCount = str_word_count(strip_tags($this->content)); + $minutes = ceil($wordCount / 200); // 200 is an average reading speed + return (int) $minutes; + } + +// Make sure it's appended to the JSON output + + + public function comments(): HasMany + { + return $this->hasMany(Comment::class); + } +} diff --git a/app/Models/Tool.php b/app/Models/Tool.php new file mode 100644 index 000000000..1c89d9169 --- /dev/null +++ b/app/Models/Tool.php @@ -0,0 +1,188 @@ +hasMany(Domain::class)->orderBy('order'); + } + + public function hasFreeAccess(): bool + { + return $this->has_free_plan ?? false; + } + + /** + * Get total criteria count for this tool + */ + public function getAllCriteriaCount(): int + { + return $this->domains() + ->withCount(['categories' => function($query) { + $query->withCount('criteria'); + }]) + ->get() + ->sum(function($domain) { + return $domain->categories->sum('criteria_count'); + }); + } + + /** + * Get estimated completion time + */ + public function getEstimatedTime(): int + { + $criteriaCount = $this->getAllCriteriaCount(); + return max(10, ceil($criteriaCount * 0.5)); // Minimum 10 minutes, 0.5 minutes per criterion + } + + /** + * Get tools available for free assessment + */ + public static function getAvailableForFreeAssessment() + { + return static::where('status', 'active') + ->where('has_free_plan', true) + ->orderBy('name_en') + ->get(); + } + public function assessments(): HasMany + { + return $this->hasMany(Assessment::class); + } + + public function getName(string $locale = null): string + { + $locale = $locale ?: app()->getLocale(); + $field = "name_{$locale}"; + + return $this->{$field}; + } + + public function getDescription(string $locale = null): ?string + { + $locale = $locale ?: app()->getLocale(); + $field = "description_{$locale}"; + + return $this->{$field}; + } + + /** + * Accessor for localized name attribute. + */ + public function getNameAttribute(): string + { + return $this->getName(); + } + + /** + * Accessor for localized description attribute. + */ + public function getDescriptionAttribute(): ?string + { + return $this->getDescription(); + } + + /** + * FIXED: Get criteria count using proper relationship counting + */ + public function getCriteriaCount(): int + { + // Option 1: Use relationship counting (more efficient) + return $this->domains() + ->withCount(['categories' => function ($query) { + $query->withCount('criteria'); + }]) + ->get() + ->sum(function ($domain) { + return $domain->categories->sum('criteria_count'); + }); + } + + /** + * Alternative method using raw DB query if relationships become complex + */ + public function getCriteriaCountRaw(): int + { + return DB::table('criteria') + ->join('categories', 'criteria.category_id', '=', 'categories.id') + ->join('domains', 'categories.domain_id', '=', 'domains.id') + ->where('domains.tool_id', $this->id) + ->count(); + } + + /** + * Even simpler approach using existing relationships + */ + public function getCriteriaCountSimple(): int + { + $count = 0; + foreach ($this->domains as $domain) { + foreach ($domain->categories as $category) { + $count += $category->criteria()->count(); + } + } + return $count; + } + + public function subscriptions(): HasMany + { + return $this->hasMany(ToolSubscription::class); + } + + /** + * Check if tool requires premium access + */ + public function requiresPremium(): bool + { + // You can add a 'premium_only' column to tools table + // or define premium tools by their IDs + return $this->premium_only ?? false; + } + + + /** + * Performance level thresholds associated with this tool. + */ + public function performanceLevels() + { + return $this->hasMany(ToolPerformanceLevel::class)->orderBy('min_percentage'); + } + + public function getPerformanceByScore(float $percentage): ?ToolPerformanceLevel + { + $percentage = floatval($percentage); // ensure number + + return $this->performanceLevels() + ->where('min_percentage', '<=', $percentage) + ->orderBy('min_percentage', 'asc') // ← ascending + ->get() + ->last(); // ← get highest within qualifying + } + + + + + +} diff --git a/app/Models/ToolPerformanceLevel.php b/app/Models/ToolPerformanceLevel.php new file mode 100644 index 000000000..bb8832b3e --- /dev/null +++ b/app/Models/ToolPerformanceLevel.php @@ -0,0 +1,36 @@ + 'float', + ]; + + + public function tool() + { + return $this->belongsTo(Tool::class); + } +} diff --git a/app/Models/ToolRequest.php b/app/Models/ToolRequest.php new file mode 100644 index 000000000..4787233f9 --- /dev/null +++ b/app/Models/ToolRequest.php @@ -0,0 +1,44 @@ + 'datetime', + ]; + + public function user(): BelongsTo + { + return $this->belongsTo(User::class); + } + + public function tool(): BelongsTo + { + return $this->belongsTo(Tool::class); + } + + + public function account(): BelongsTo + { + return $this->belongsTo(Account::class, 'account_id'); + } + +} diff --git a/app/Models/ToolSubscription.php b/app/Models/ToolSubscription.php new file mode 100644 index 000000000..abc23b461 --- /dev/null +++ b/app/Models/ToolSubscription.php @@ -0,0 +1,108 @@ + 'array', + 'started_at' => 'datetime', + 'expires_at' => 'datetime', + ]; + + // Relationships + public function user(): BelongsTo + { + return $this->belongsTo(User::class); + } + + public function tool(): BelongsTo + { + return $this->belongsTo(Tool::class); + } + + // Scopes + public function scopeActive($query) + { + return $query->where('status', 'active') + ->where(function($q) { + $q->whereNull('expires_at') + ->orWhere('expires_at', '>', now()); + }); + } + + public function scopeFree($query) + { + return $query->where('plan_type', 'free'); + } + + public function scopePremium($query) + { + return $query->where('plan_type', 'premium'); + } + + // Methods + public function isActive(): bool + { + return $this->status === 'active' && + ($this->expires_at === null || $this->expires_at->isFuture()); + } + + public function isFree(): bool + { + return $this->plan_type === 'free'; + } + + public function isPremium(): bool + { + return $this->plan_type === 'premium'; + } + + public function getFeature(string $feature, $default = null) + { + return $this->features[$feature] ?? $default; + } + + public function hasFeature(string $feature): bool + { + return isset($this->features[$feature]) && $this->features[$feature] === true; + } + + public function getRemainingAssessments(): ?int + { + $limit = $this->getFeature('assessments_limit'); + + if ($limit === null) { + return null; // Unlimited + } + + $used = $this->user->assessments() + ->where('tool_id', $this->tool_id) + ->count(); + + return max(0, $limit - $used); + } + + public function canCreateAssessment(): bool + { + if (!$this->isActive()) { + return false; + } + + $remaining = $this->getRemainingAssessments(); + return $remaining === null || $remaining > 0; + } +} diff --git a/app/Models/User.php b/app/Models/User.php index 749c7b77d..4eb21b9f7 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -3,14 +3,22 @@ namespace App\Models; // use Illuminate\Contracts\Auth\MustVerifyEmail; +use Filament\Models\Contracts\FilamentUser; +use Filament\Panel; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; +use Laravel\Paddle\Billable; +use Spatie\Permission\Traits\HasRoles; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Relations\HasOne; -class User extends Authenticatable +class User extends Authenticatable implements FilamentUser { /** @use HasFactory<\Database\Factories\UserFactory> */ use HasFactory, Notifiable; + use HasRoles; + use Billable; /** * The attributes that are mass assignable. @@ -21,7 +29,32 @@ class User extends Authenticatable 'name', 'email', 'password', + 'user_type', ]; + public function canAccessPanel(Panel $panel): bool + { + // Only allow actual admins to access Filament + return $this->hasRole(['admin', 'super_admin']); + } + public function paddleName(): string + { + return $this->name; + } + + /** + * Get the customer email that should be synced to Paddle. + */ + public function paddleEmail(): string + { + return $this->email; + } + + /** + * Determine if the entity has a given ability. + */ + + + /** * The attributes that should be hidden for serialization. @@ -45,4 +78,452 @@ protected function casts(): array 'password' => 'hashed', ]; } + + /** + * Get user's details + */ + public function details(): HasOne + { + return $this->hasOne(UserDetails::class); + } + + /** + * Get user's current subscription + */ + public function subscription(): HasOne + { + return $this->hasOne(UserSubscription::class)->latest(); + } + + /** + * Get all user's subscriptions + */ + public function subscriptions(): HasMany + { + return $this->hasMany(UserSubscription::class)->orderBy('created_at', 'desc'); + } + + /** + * Get user's assessments + */ + public function assessments(): HasMany + { + return $this->hasMany(Assessment::class); + } + + /** + * Check if user is free tier + */ + public function isFree(): bool + { + $subscription = $this->subscription; + return !$subscription || $subscription->isFree() || !$subscription->isActive(); + } + + /** + * Check if user is premium + */ +// public function isPremium(): bool +// { +// // Your existing logic +// $subscription = $this->subscription; +// return $subscription && $subscription->isPremium() && $subscription->isActive(); +// } + + /** + * Check if user is admin + */ + public function isAdmin(): bool + { + // Check if user has admin roles or if they have the admin user_type + return $this->hasRole(['super_admin', 'admin']) || $this->user_type === 'admin'; + } + + /** + * Check if subscription is active + */ + public function hasActiveSubscription(): bool + { + $subscription = $this->subscription; + return $subscription && $subscription->isActive(); + } + + /** + * Get subscription status with safer fallbacks + */ + public function getSubscriptionStatus(): string + { + if ($this->isAdmin()) { + return 'admin'; + } + + $subscription = $this->subscription; + + if (!$subscription) { + return 'free'; + } + + if ($subscription->isPremium() && $subscription->isActive()) { + return 'premium'; + } + + if ($subscription->isPremium() && $subscription->isExpired()) { + return 'expired'; + } + + return 'free'; + } + + /** + * Can access dashboard + */ +// public function canAccessDashboard(): bool +// { +// return $this->isPremium() || $this->isAdmin(); +// } + public function canAccessAssessmentTools(): bool + { + // Only if they have bought at least one tool or are admin + return $this->hasAnyToolSubscription() || $this->isAdmin(); + } + + public function getAccessLevel(): string + { + if ($this->isAdmin()) { + return 'admin'; + } + + if ($this->hasAnyToolSubscription()) { + return 'premium'; // Has bought at least one tool + } + + return 'free'; // No tool subscriptions + } + /** + * Can access advanced features + */ + public function canAccessAdvancedFeatures(): bool + { + return $this->isPremium() || $this->isAdmin(); + } + + /** + * Get user's assessment limit with safer fallbacks + */ + public function getAssessmentLimit(): ?int + { + if ($this->isPremium() || $this->isAdmin()) { + return null; // Unlimited + } + + $subscription = $this->subscription; + if ($subscription && method_exists($subscription, 'getFeature')) { + return $subscription->getFeature('assessments_limit', 1); + } + + return 1; // Free users get 1 assessment + } + + /** + * Check if user can create more assessments + */ + public function canCreateAssessment(): bool + { + if ($this->isAdmin()) { + return true; // Admins always can create + } + + $limit = $this->getAssessmentLimit(); + + if ($limit === null) { + return true; // Unlimited + } + + return $this->assessments()->count() < $limit; + } + +// public function toolSubscriptions() +// { +// return $this->hasMany(ToolSubscription::class); +// } + + /** + * Get active tool subscriptions + */ + public function activeToolSubscriptions() + { + return $this->toolSubscriptions()->active(); + } + + /** + * Get subscription for specific tool + */ +// public function getToolSubscription(int $toolId): ?ToolSubscription +// { +// return $this->toolSubscriptions() +// ->where('tool_id', $toolId) +// ->active() +// ->first(); +// } + + /** + * Check if user has access to specific tool + */ +// public function hasAccessToTool(int $toolId): bool +// { +// if ($this->isAdmin()) { +// return true; +// } +// +// return $this->getToolSubscription($toolId) !== null; +// } + + /** + * Get user's assessment limit for specific tool + */ + public function getAssessmentLimitForTool(int $toolId): ?int + { + $subscription = $this->getToolSubscription($toolId); + + if (!$subscription) { + return 0; + } + + return $subscription->getFeature('assessments_limit'); + } + + /** + * Check if user can create assessment for specific tool + */ + public function canCreateAssessmentForTool(int $toolId): bool + { + $subscription = $this->getToolSubscription($toolId); + + if (!$subscription) { + return false; + } + + return $subscription->canCreateAssessment(); + } + + /** + * Get user subscription summary + */ + public function getSubscriptionSummary(): array + { + $activeSubscriptions = $this->activeToolSubscriptions() + ->with('tool') + ->get(); + + return [ + 'total_subscriptions' => $activeSubscriptions->count(), + 'free_subscriptions' => $activeSubscriptions->where('plan_type', 'free')->count(), + 'premium_subscriptions' => $activeSubscriptions->where('plan_type', 'premium')->count(), + 'subscriptions' => $activeSubscriptions->map(function($subscription) { + return [ + 'tool_name' => $subscription->tool->name_en, + 'plan_type' => $subscription->plan_type, + 'remaining_assessments' => $subscription->getRemainingAssessments(), + 'expires_at' => $subscription->expires_at, + ]; + }), + ]; + } + + /** + * Get user's PDF report access level + */ + public function getPdfReportLevel(): string + { + if ($this->isPremium() || $this->isAdmin()) { + return 'full'; // Full detailed report + } + + $subscription = $this->subscription; + if ($subscription && method_exists($subscription, 'getFeature')) { + return $subscription->getFeature('pdf_reports', 'basic'); + } + + return 'basic'; // Domain-level only + } + + /** + * Get user's company name from details + */ + public function getCompanyName(): ?string + { + return $this->details?->company_name; + } + + /** + * Get user's phone from details + */ + public function getPhone(): ?string + { + return $this->details?->phone; + } + + /** + * Get user's full profile data with safe fallbacks + */ + public function getFullProfileData(): array + { + $details = $this->details; + $subscription = $this->subscription; + + return [ + 'id' => $this->id, + 'name' => $this->name, + 'email' => $this->email, + 'email_verified_at' => $this->email_verified_at, + 'created_at' => $this->created_at, + 'user_type' => $this->user_type ?? 'free', + 'details' => $details ? $details->toArray() : null, + 'subscription' => [ + 'plan_type' => $subscription?->plan_type ?? 'free', + 'status' => $subscription?->status ?? 'active', + 'expires_at' => $subscription?->expires_at, + 'features' => $subscription && method_exists($subscription, 'getFeatures') + ? $subscription->getFeatures() + : $this->getDefaultFeatures(), + 'is_active' => $subscription?->isActive() ?? true, + ], + 'roles' => method_exists($this, 'roles') ? $this->roles->pluck('name')->toArray() : [], + 'permissions' => [ + 'can_access_dashboard' => $this->canAccessDashboard(), + 'can_access_advanced_features' => $this->canAccessAdvancedFeatures(), + 'assessment_limit' => $this->getAssessmentLimit(), + 'pdf_report_level' => $this->getPdfReportLevel(), + ] + ]; + } + + /** + * Get default features for free users + */ + private function getDefaultFeatures(): array + { + return [ + 'assessments_limit' => 1, + 'pdf_reports' => 'basic', + 'advanced_analytics' => false, + 'team_management' => false, + 'api_access' => false, + 'priority_support' => false, + 'custom_branding' => false, + ]; + } + + /** + * Create default subscription and details for user + */ + public function createDefaultSubscriptionAndDetails(): void + { + // Create subscription if it doesn't exist + if (!$this->subscription) { + $this->subscriptions()->create([ + 'plan_type' => 'free', + 'status' => 'active', + 'started_at' => now(), + 'features' => $this->getDefaultFeatures() + ]); + } + + // Create details if they don't exist + if (!$this->details) { + $this->details()->create([ + 'preferred_language' => 'en', + 'marketing_emails' => true, + 'newsletter_subscription' => false, + 'profile_completed' => false, + ]); + } + } + + + public function toolSubscriptions() + { + return $this->hasMany(ToolSubscription::class); + } + + public function isPremium(): bool + { + // User is premium if they have any active tool subscription + return $this->hasAnyToolSubscription() || $this->isAdmin(); + } + public function canAccessDashboard(): bool + { + // Only if they have bought at least one tool or are admin + return $this->hasAnyToolSubscription() || $this->isAdmin(); + } + + public function hasCompletedProfile(): bool + { + return (bool) ($this->details?->profile_completed); + } + public function hasAccessToTool(int $toolId): bool + { + // Check if user is admin + if ($this->isAdmin()) { + return true; + } + + // Check if user has active subscription to this tool + $subscription = $this->toolSubscriptions() + ->where('tool_id', $toolId) + ->where('status', 'active') + ->first(); + + if ($subscription) { + return true; + } + + return false; + // Check if user has global premium subscription +// return $this->isPremium(); + } + public function hasTakenFreeAssessment(): bool + { + return $this->assessments() + ->where('assessment_type', 'free') + ->exists(); + } + + public function canTakeFreeAssessment(): bool + { + // Can take if they haven't taken one yet + return !$this->hasTakenFreeAssessment(); + } + public function hasAnyToolSubscription(): bool + { + return $this->toolSubscriptions() + ->where('status', 'active') + ->exists(); + } + + public function getToolSubscription(int $toolId): ?ToolSubscription + { + return $this->toolSubscriptions() + ->where('tool_id', $toolId) + ->where('status', 'active') + ->first(); + } + + public function subscribeToTool(int $toolId, string $planType = 'premium'): ToolSubscription + { + return $this->toolSubscriptions()->updateOrCreate( + ['tool_id' => $toolId], + [ + 'plan_type' => $planType, + 'status' => 'active', + 'started_at' => now(), + 'expires_at' => $planType === 'premium' ? now()->addYear() : null, + 'features' => [ + 'assessments_limit' => $planType === 'premium' ? null : 1, + 'pdf_reports' => $planType === 'premium' ? 'detailed' : 'basic', + 'advanced_analytics' => $planType === 'premium', + ] + ] + ); + } } diff --git a/app/Models/UserDetails.php b/app/Models/UserDetails.php new file mode 100644 index 000000000..9157ba166 --- /dev/null +++ b/app/Models/UserDetails.php @@ -0,0 +1,170 @@ + 'array', + 'interests' => 'array', + 'company_type' => 'integer', + 'employee_type' => 'integer', + 'marketing_emails' => 'boolean', + 'newsletter_subscription' => 'boolean', + 'annual_revenue' => 'decimal:2', + 'established_year' => 'integer', + 'company_size' => 'integer', + 'profile_completed' => 'boolean', + ]; + + /** + * Get the user that owns the details + */ + public function user(): BelongsTo + { + return $this->belongsTo(User::class); + } + + /** + * Get formatted company size + */ + public function getFormattedCompanySize(): string + { + if (!$this->company_size) return 'Not specified'; + + return match (true) { + $this->company_size <= 10 => '1-10 employees', + $this->company_size <= 50 => '11-50 employees', + $this->company_size <= 200 => '51-200 employees', + $this->company_size <= 500 => '201-500 employees', + $this->company_size <= 1000 => '501-1000 employees', + default => '1000+ employees' + }; + } + + /** + * Get formatted annual revenue + */ + public function getFormattedAnnualRevenue(): string + { + if (!$this->annual_revenue) return 'Not specified'; + + if ($this->annual_revenue >= 1000000) { + return number_format($this->annual_revenue / 1000000, 1) . 'M'; + } elseif ($this->annual_revenue >= 1000) { + return number_format($this->annual_revenue / 1000, 1) . 'K'; + } + + return number_format($this->annual_revenue, 0); + } + + /** + * Check if user allows marketing emails + */ + public function allowsMarketingEmails(): bool + { + return $this->marketing_emails ?? false; + } + + /** + * Check if user is subscribed to newsletter + */ + public function isNewsletterSubscribed(): bool + { + return $this->newsletter_subscription ?? false; + } + + /** + * Get communication preferences + */ + public function getCommunicationPreferences(): array + { + return $this->communication_preferences ?? [ + 'email' => true, + 'sms' => false, + 'whatsapp' => false, + 'phone' => false + ]; + } + + /** + * Get user interests + */ + public function getInterests(): array + { + return $this->interests ?? []; + } + + /** + * Add interest + */ + public function addInterest(string $interest): void + { + $interests = $this->getInterests(); + if (!in_array($interest, $interests)) { + $interests[] = $interest; + $this->update(['interests' => $interests]); + } + } + + /** + * Remove interest + */ + public function removeInterest(string $interest): void + { + $interests = $this->getInterests(); + $interests = array_filter($interests, fn($i) => $i !== $interest); + $this->update(['interests' => array_values($interests)]); + } + + /** + * Update communication preference + */ + public function updateCommunicationPreference(string $type, bool $enabled): void + { + $preferences = $this->getCommunicationPreferences(); + $preferences[$type] = $enabled; + $this->update(['communication_preferences' => $preferences]); + } +} diff --git a/app/Models/UserSubscription.php b/app/Models/UserSubscription.php new file mode 100644 index 000000000..9fb1e393b --- /dev/null +++ b/app/Models/UserSubscription.php @@ -0,0 +1,266 @@ + 'datetime', + 'expires_at' => 'datetime', + 'cancelled_at' => 'datetime', + 'amount' => 'decimal:2', + 'features' => 'array', + ]; + + /** + * Get the user that owns the subscription + */ + public function user(): BelongsTo + { + return $this->belongsTo(User::class); + } + + /** + * Check if subscription is active + */ + public function isActive(): bool + { + return $this->status === 'active' && + ($this->expires_at === null || $this->expires_at->gt(now())); + } + + /** + * Check if subscription is expired + */ + public function isExpired(): bool + { + return $this->status === 'expired' || + ($this->expires_at && $this->expires_at->lt(now())); + } + + /** + * Check if subscription is cancelled + */ + public function isCancelled(): bool + { + return $this->status === 'cancelled'; + } + + /** + * Check if subscription is pending + */ + public function isPending(): bool + { + return $this->status === 'pending'; + } + + /** + * Check if subscription is free plan + */ + public function isFree(): bool + { + return $this->plan_type === 'free'; + } + + /** + * Check if subscription is premium plan + */ + public function isPremium(): bool + { + return $this->plan_type === 'premium'; + } + + /** + * Get days until expiration + */ + public function getDaysUntilExpiration(): ?int + { + if (!$this->expires_at) { + return null; // Never expires + } + + return max(0, now()->diffInDays($this->expires_at, false)); + } + + /** + * Check if subscription expires soon (within 7 days) + */ + public function expiresSoon(): bool + { + $days = $this->getDaysUntilExpiration(); + return $days !== null && $days <= 7 && $days > 0; + } + + /** + * Get subscription features + */ + public function getFeatures(): array + { + return $this->features ?? $this->getDefaultFeatures(); + } + + /** + * Get default features based on plan type + */ + public function getDefaultFeatures(): array + { + return match ($this->plan_type) { + 'free' => [ + 'assessments_limit' => 1, + 'pdf_reports' => 'basic', + 'advanced_analytics' => false, + 'team_management' => false, + 'api_access' => false, + 'priority_support' => false, + 'custom_branding' => false, + ], + 'premium' => [ + 'assessments_limit' => null, // unlimited + 'pdf_reports' => 'full', + 'advanced_analytics' => true, + 'team_management' => true, + 'api_access' => true, + 'priority_support' => true, + 'custom_branding' => true, + ], + default => [] + }; + } + + /** + * Check if feature is available + */ + public function hasFeature(string $feature): bool + { + $features = $this->getFeatures(); + return isset($features[$feature]) && $features[$feature] !== false; + } + + /** + * Get feature value + */ + public function getFeature(string $feature, mixed $default = null): mixed + { + $features = $this->getFeatures(); + return $features[$feature] ?? $default; + } + + /** + * Cancel subscription + */ + public function cancel(string $reason = null): void + { + $this->update([ + 'status' => 'cancelled', + 'cancelled_at' => now(), + 'cancelled_reason' => $reason, + ]); + } + + /** + * Activate subscription + */ + public function activate(): void + { + $this->update([ + 'status' => 'active', + 'started_at' => $this->started_at ?? now(), + ]); + } + + /** + * Expire subscription + */ + public function expire(): void + { + $this->update([ + 'status' => 'expired', + ]); + } + + /** + * Extend subscription + */ + public function extend(Carbon $newExpirationDate): void + { + $this->update([ + 'expires_at' => $newExpirationDate, + 'status' => 'active', + ]); + } + + /** + * Get formatted amount + */ + public function getFormattedAmount(): string + { + if (!$this->amount) { + return 'Free'; + } + + return number_format($this->amount, 2) . ' ' . strtoupper($this->currency); + } + + /** + * Scope for active subscriptions + */ + public function scopeActive($query) + { + return $query->where('status', 'active') + ->where(function ($q) { + $q->whereNull('expires_at') + ->orWhere('expires_at', '>', now()); + }); + } + + /** + * Scope for expired subscriptions + */ + public function scopeExpired($query) + { + return $query->where('status', 'expired') + ->orWhere(function ($q) { + $q->where('expires_at', '<=', now()) + ->whereNotNull('expires_at'); + }); + } + + /** + * Scope for premium subscriptions + */ + public function scopePremium($query) + { + return $query->where('plan_type', 'premium'); + } + + /** + * Scope for free subscriptions + */ + public function scopeFree($query) + { + return $query->where('plan_type', 'free'); + } +} diff --git a/app/Notifications/NewFreeUserNotification.php b/app/Notifications/NewFreeUserNotification.php new file mode 100644 index 000000000..213fee001 --- /dev/null +++ b/app/Notifications/NewFreeUserNotification.php @@ -0,0 +1,69 @@ +user = $user; + } + + /** + * Get the notification's delivery channels. + * + * @return array + */ + public function via(object $notifiable): array + { + return ['mail']; + } + + /** + * Get the mail representation of the notification. + */ + public function toMail(object $notifiable): MailMessage + { + $details = $this->user->details; + + return (new MailMessage) + ->subject('New Free User Registration - ' . $this->user->name) + ->greeting('New Free User Registered!') + ->line('A new user has registered for free access to the assessment tools.') + ->line('') + ->line('**User Details:**') + ->line('Name: ' . $this->user->name) + ->line('Email: ' . $this->user->email) + ->line('Phone: ' . ($details?->phone ?: 'Not provided')) + ->line('Company: ' . ($details?->company_name ?: 'Not provided')) + ->line('Company Type: ' . ($details?->company_type ? ucfirst($details->company_type) : 'Not specified')) + ->line('Position: ' . ($details?->position ?: 'Not specified')) + ->line('City: ' . ($details?->city ?: 'Not specified')) + ->line('Website: ' . ($details?->website ?: 'Not specified')) + ->line('Industry: ' . ($details?->industry ?: 'Not specified')) + ->line('Company Size: ' . ($details?->getFormattedCompanySize() ?: 'Not specified')) + ->line('How they heard: ' . ($details?->how_did_you_hear ?: 'Not specified')) + ->line('') + ->line('**Registration Details:**') + ->line('Registered: ' . $this->user->created_at->format('Y-m-d H:i:s')) + ->line('Preferred Language: ' . ($details?->preferred_language ?: 'en')) + ->line('Marketing Emails: ' . ($details?->marketing_emails ? 'Yes' : 'No')) + ->line('Newsletter: ' . ($details?->newsletter_subscription ? 'Yes' : 'No')) + ->action('View User in Admin Panel', url('/admin/shield/users/' . $this->user->id)) + ->line('The user can now access free assessment tools with limited features.') + ->line('They can upgrade to premium by contacting us.'); + } +} diff --git a/app/Notifications/SubscriptionRequestNotification.php b/app/Notifications/SubscriptionRequestNotification.php new file mode 100644 index 000000000..e6bfe995a --- /dev/null +++ b/app/Notifications/SubscriptionRequestNotification.php @@ -0,0 +1,98 @@ +user = $user; + $this->requestData = $requestData; + } + + /** + * Get the notification's delivery channels. + */ + public function via(object $notifiable): array + { + return ['mail']; + } + + /** + * Get the mail representation of the notification. + */ + public function toMail(object $notifiable): MailMessage + { + $details = $this->user->details; + $subscription = $this->user->subscription; + + $message = (new MailMessage) + ->subject('Premium Subscription Request - ' . $this->user->name) + ->greeting('New Premium Subscription Request!') + ->line('A user has requested to upgrade to premium subscription.') + ->line('') + ->line('**User Details:**') + ->line('Name: ' . $this->user->name) + ->line('Email: ' . $this->user->email) + ->line('Phone: ' . ($details?->phone ?: 'Not provided')) + ->line('Company: ' . ($details?->company_name ?: 'Not provided')) + ->line('Company Type: ' . ($details?->company_type ? ucfirst($details->company_type) : 'Not specified')) + ->line('Position: ' . ($details?->position ?: 'Not specified')) + ->line('City: ' . ($details?->city ?: 'Not specified')) + ->line('Industry: ' . ($details?->industry ?: 'Not specified')) + ->line('Company Size: ' . ($details?->getFormattedCompanySize() ?: 'Not specified')) + ->line('Website: ' . ($details?->website ?: 'Not specified')) + ->line('') + ->line('**Current Subscription:**') + ->line('Current Plan: ' . ($subscription?->plan_type ?? 'Free')) + ->line('Status: ' . ($subscription?->status ?? 'Active')) + ->line('Member Since: ' . $this->user->created_at->format('Y-m-d')) + ->line('') + ->line('**Subscription Request:**') + ->line('Requested Plan: ' . ucfirst($this->requestData['plan'])) + ->line('Request Date: ' . now()->format('Y-m-d H:i:s')); + + if (!empty($this->requestData['message'])) { + $message->line('') + ->line('**User Message:**') + ->line('"' . $this->requestData['message'] . '"'); + } + + // Add assessment usage statistics if available + $assessmentCount = $this->user->assessments()->count(); + if ($assessmentCount > 0) { + $message->line('') + ->line('**Usage Statistics:**') + ->line('Total Assessments: ' . $assessmentCount) + ->line('Last Assessment: ' . $this->user->assessments()->latest()->first()?->created_at?->format('Y-m-d')); + } + + $message->line('') + ->action('Contact User', 'mailto:' . $this->user->email . '?subject=Premium Subscription Inquiry') + ->action('View User in Admin', url('/admin/shield/users/' . $this->user->id)) + ->line('') + ->line('**Next Steps:**') + ->line('1. Contact the user to discuss their specific needs') + ->line('2. Provide pricing and feature details') + ->line('3. Process payment if they decide to upgrade') + ->line('4. Activate premium features in the admin panel') + ->line('') + ->line('Please respond to this request within 24 hours.'); + + return $message; + } +} diff --git a/app/Policies/AssessmentPolicy.php b/app/Policies/AssessmentPolicy.php new file mode 100644 index 000000000..07a9c7506 --- /dev/null +++ b/app/Policies/AssessmentPolicy.php @@ -0,0 +1,108 @@ +can('view_any_assessment'); + } + + /** + * Determine whether the user can view the model. + */ + public function view(User $user, Assessment $assessment): bool + { + return $user->can('view_assessment'); + } + + /** + * Determine whether the user can create models. + */ + public function create(User $user): bool + { + return $user->can('create_assessment'); + } + + /** + * Determine whether the user can update the model. + */ + public function update(User $user, Assessment $assessment): bool + { + return $user->can('update_assessment'); + } + + /** + * Determine whether the user can delete the model. + */ + public function delete(User $user, Assessment $assessment): bool + { + return $user->can('delete_assessment'); + } + + /** + * Determine whether the user can bulk delete. + */ + public function deleteAny(User $user): bool + { + return $user->can('delete_any_assessment'); + } + + /** + * Determine whether the user can permanently delete. + */ + public function forceDelete(User $user, Assessment $assessment): bool + { + return $user->can('force_delete_assessment'); + } + + /** + * Determine whether the user can permanently bulk delete. + */ + public function forceDeleteAny(User $user): bool + { + return $user->can('force_delete_any_assessment'); + } + + /** + * Determine whether the user can restore. + */ + public function restore(User $user, Assessment $assessment): bool + { + return $user->can('restore_assessment'); + } + + /** + * Determine whether the user can bulk restore. + */ + public function restoreAny(User $user): bool + { + return $user->can('restore_any_assessment'); + } + + /** + * Determine whether the user can replicate. + */ + public function replicate(User $user, Assessment $assessment): bool + { + return $user->can('replicate_assessment'); + } + + /** + * Determine whether the user can reorder. + */ + public function reorder(User $user): bool + { + return $user->can('reorder_assessment'); + } +} diff --git a/app/Policies/AssessmentResponsePolicy.php b/app/Policies/AssessmentResponsePolicy.php new file mode 100644 index 000000000..96ffe18ce --- /dev/null +++ b/app/Policies/AssessmentResponsePolicy.php @@ -0,0 +1,108 @@ +can('view_any_assessment::response'); + } + + /** + * Determine whether the user can view the model. + */ + public function view(User $user, AssessmentResponse $assessmentResponse): bool + { + return $user->can('view_assessment::response'); + } + + /** + * Determine whether the user can create models. + */ + public function create(User $user): bool + { + return $user->can('create_assessment::response'); + } + + /** + * Determine whether the user can update the model. + */ + public function update(User $user, AssessmentResponse $assessmentResponse): bool + { + return $user->can('update_assessment::response'); + } + + /** + * Determine whether the user can delete the model. + */ + public function delete(User $user, AssessmentResponse $assessmentResponse): bool + { + return $user->can('delete_assessment::response'); + } + + /** + * Determine whether the user can bulk delete. + */ + public function deleteAny(User $user): bool + { + return $user->can('delete_any_assessment::response'); + } + + /** + * Determine whether the user can permanently delete. + */ + public function forceDelete(User $user, AssessmentResponse $assessmentResponse): bool + { + return $user->can('force_delete_assessment::response'); + } + + /** + * Determine whether the user can permanently bulk delete. + */ + public function forceDeleteAny(User $user): bool + { + return $user->can('force_delete_any_assessment::response'); + } + + /** + * Determine whether the user can restore. + */ + public function restore(User $user, AssessmentResponse $assessmentResponse): bool + { + return $user->can('restore_assessment::response'); + } + + /** + * Determine whether the user can bulk restore. + */ + public function restoreAny(User $user): bool + { + return $user->can('restore_any_assessment::response'); + } + + /** + * Determine whether the user can replicate. + */ + public function replicate(User $user, AssessmentResponse $assessmentResponse): bool + { + return $user->can('replicate_assessment::response'); + } + + /** + * Determine whether the user can reorder. + */ + public function reorder(User $user): bool + { + return $user->can('reorder_assessment::response'); + } +} diff --git a/app/Policies/CategoryPolicy.php b/app/Policies/CategoryPolicy.php new file mode 100644 index 000000000..d518809ba --- /dev/null +++ b/app/Policies/CategoryPolicy.php @@ -0,0 +1,108 @@ +can('view_any_category'); + } + + /** + * Determine whether the user can view the model. + */ + public function view(User $user, Category $category): bool + { + return $user->can('view_category'); + } + + /** + * Determine whether the user can create models. + */ + public function create(User $user): bool + { + return $user->can('create_category'); + } + + /** + * Determine whether the user can update the model. + */ + public function update(User $user, Category $category): bool + { + return $user->can('update_category'); + } + + /** + * Determine whether the user can delete the model. + */ + public function delete(User $user, Category $category): bool + { + return $user->can('delete_category'); + } + + /** + * Determine whether the user can bulk delete. + */ + public function deleteAny(User $user): bool + { + return $user->can('delete_any_category'); + } + + /** + * Determine whether the user can permanently delete. + */ + public function forceDelete(User $user, Category $category): bool + { + return $user->can('force_delete_category'); + } + + /** + * Determine whether the user can permanently bulk delete. + */ + public function forceDeleteAny(User $user): bool + { + return $user->can('force_delete_any_category'); + } + + /** + * Determine whether the user can restore. + */ + public function restore(User $user, Category $category): bool + { + return $user->can('restore_category'); + } + + /** + * Determine whether the user can bulk restore. + */ + public function restoreAny(User $user): bool + { + return $user->can('restore_any_category'); + } + + /** + * Determine whether the user can replicate. + */ + public function replicate(User $user, Category $category): bool + { + return $user->can('replicate_category'); + } + + /** + * Determine whether the user can reorder. + */ + public function reorder(User $user): bool + { + return $user->can('reorder_category'); + } +} diff --git a/app/Policies/CriterionPolicy.php b/app/Policies/CriterionPolicy.php new file mode 100644 index 000000000..f9811e676 --- /dev/null +++ b/app/Policies/CriterionPolicy.php @@ -0,0 +1,108 @@ +can('view_any_criterion'); + } + + /** + * Determine whether the user can view the model. + */ + public function view(User $user, Criterion $criterion): bool + { + return $user->can('view_criterion'); + } + + /** + * Determine whether the user can create models. + */ + public function create(User $user): bool + { + return $user->can('create_criterion'); + } + + /** + * Determine whether the user can update the model. + */ + public function update(User $user, Criterion $criterion): bool + { + return $user->can('update_criterion'); + } + + /** + * Determine whether the user can delete the model. + */ + public function delete(User $user, Criterion $criterion): bool + { + return $user->can('delete_criterion'); + } + + /** + * Determine whether the user can bulk delete. + */ + public function deleteAny(User $user): bool + { + return $user->can('delete_any_criterion'); + } + + /** + * Determine whether the user can permanently delete. + */ + public function forceDelete(User $user, Criterion $criterion): bool + { + return $user->can('force_delete_criterion'); + } + + /** + * Determine whether the user can permanently bulk delete. + */ + public function forceDeleteAny(User $user): bool + { + return $user->can('force_delete_any_criterion'); + } + + /** + * Determine whether the user can restore. + */ + public function restore(User $user, Criterion $criterion): bool + { + return $user->can('restore_criterion'); + } + + /** + * Determine whether the user can bulk restore. + */ + public function restoreAny(User $user): bool + { + return $user->can('restore_any_criterion'); + } + + /** + * Determine whether the user can replicate. + */ + public function replicate(User $user, Criterion $criterion): bool + { + return $user->can('replicate_criterion'); + } + + /** + * Determine whether the user can reorder. + */ + public function reorder(User $user): bool + { + return $user->can('reorder_criterion'); + } +} diff --git a/app/Policies/DomainPolicy.php b/app/Policies/DomainPolicy.php new file mode 100644 index 000000000..7436c76b9 --- /dev/null +++ b/app/Policies/DomainPolicy.php @@ -0,0 +1,108 @@ +can('view_any_domain'); + } + + /** + * Determine whether the user can view the model. + */ + public function view(User $user, Domain $domain): bool + { + return $user->can('view_domain'); + } + + /** + * Determine whether the user can create models. + */ + public function create(User $user): bool + { + return $user->can('create_domain'); + } + + /** + * Determine whether the user can update the model. + */ + public function update(User $user, Domain $domain): bool + { + return $user->can('update_domain'); + } + + /** + * Determine whether the user can delete the model. + */ + public function delete(User $user, Domain $domain): bool + { + return $user->can('delete_domain'); + } + + /** + * Determine whether the user can bulk delete. + */ + public function deleteAny(User $user): bool + { + return $user->can('delete_any_domain'); + } + + /** + * Determine whether the user can permanently delete. + */ + public function forceDelete(User $user, Domain $domain): bool + { + return $user->can('force_delete_domain'); + } + + /** + * Determine whether the user can permanently bulk delete. + */ + public function forceDeleteAny(User $user): bool + { + return $user->can('force_delete_any_domain'); + } + + /** + * Determine whether the user can restore. + */ + public function restore(User $user, Domain $domain): bool + { + return $user->can('restore_domain'); + } + + /** + * Determine whether the user can bulk restore. + */ + public function restoreAny(User $user): bool + { + return $user->can('restore_any_domain'); + } + + /** + * Determine whether the user can replicate. + */ + public function replicate(User $user, Domain $domain): bool + { + return $user->can('replicate_domain'); + } + + /** + * Determine whether the user can reorder. + */ + public function reorder(User $user): bool + { + return $user->can('reorder_domain'); + } +} diff --git a/app/Policies/GuestSessionPolicy.php b/app/Policies/GuestSessionPolicy.php new file mode 100644 index 000000000..0c1626895 --- /dev/null +++ b/app/Policies/GuestSessionPolicy.php @@ -0,0 +1,108 @@ +can('view_any_guest::session'); + } + + /** + * Determine whether the user can view the model. + */ + public function view(User $user, GuestSession $guestSession): bool + { + return $user->can('view_guest::session'); + } + + /** + * Determine whether the user can create models. + */ + public function create(User $user): bool + { + return $user->can('create_guest::session'); + } + + /** + * Determine whether the user can update the model. + */ + public function update(User $user, GuestSession $guestSession): bool + { + return $user->can('update_guest::session'); + } + + /** + * Determine whether the user can delete the model. + */ + public function delete(User $user, GuestSession $guestSession): bool + { + return $user->can('delete_guest::session'); + } + + /** + * Determine whether the user can bulk delete. + */ + public function deleteAny(User $user): bool + { + return $user->can('delete_any_guest::session'); + } + + /** + * Determine whether the user can permanently delete. + */ + public function forceDelete(User $user, GuestSession $guestSession): bool + { + return $user->can('force_delete_guest::session'); + } + + /** + * Determine whether the user can permanently bulk delete. + */ + public function forceDeleteAny(User $user): bool + { + return $user->can('force_delete_any_guest::session'); + } + + /** + * Determine whether the user can restore. + */ + public function restore(User $user, GuestSession $guestSession): bool + { + return $user->can('restore_guest::session'); + } + + /** + * Determine whether the user can bulk restore. + */ + public function restoreAny(User $user): bool + { + return $user->can('restore_any_guest::session'); + } + + /** + * Determine whether the user can replicate. + */ + public function replicate(User $user, GuestSession $guestSession): bool + { + return $user->can('replicate_guest::session'); + } + + /** + * Determine whether the user can reorder. + */ + public function reorder(User $user): bool + { + return $user->can('reorder_guest::session'); + } +} diff --git a/app/Policies/PostPolicy.php b/app/Policies/PostPolicy.php new file mode 100644 index 000000000..c31d70290 --- /dev/null +++ b/app/Policies/PostPolicy.php @@ -0,0 +1,108 @@ +can('view_any_post'); + } + + /** + * Determine whether the user can view the model. + */ + public function view(User $user, Post $post): bool + { + return $user->can('view_post'); + } + + /** + * Determine whether the user can create models. + */ + public function create(User $user): bool + { + return $user->can('create_post'); + } + + /** + * Determine whether the user can update the model. + */ + public function update(User $user, Post $post): bool + { + return $user->can('update_post'); + } + + /** + * Determine whether the user can delete the model. + */ + public function delete(User $user, Post $post): bool + { + return $user->can('delete_post'); + } + + /** + * Determine whether the user can bulk delete. + */ + public function deleteAny(User $user): bool + { + return $user->can('delete_any_post'); + } + + /** + * Determine whether the user can permanently delete. + */ + public function forceDelete(User $user, Post $post): bool + { + return $user->can('force_delete_post'); + } + + /** + * Determine whether the user can permanently bulk delete. + */ + public function forceDeleteAny(User $user): bool + { + return $user->can('force_delete_any_post'); + } + + /** + * Determine whether the user can restore. + */ + public function restore(User $user, Post $post): bool + { + return $user->can('restore_post'); + } + + /** + * Determine whether the user can bulk restore. + */ + public function restoreAny(User $user): bool + { + return $user->can('restore_any_post'); + } + + /** + * Determine whether the user can replicate. + */ + public function replicate(User $user, Post $post): bool + { + return $user->can('replicate_post'); + } + + /** + * Determine whether the user can reorder. + */ + public function reorder(User $user): bool + { + return $user->can('reorder_post'); + } +} diff --git a/app/Policies/RolePolicy.php b/app/Policies/RolePolicy.php new file mode 100644 index 000000000..ec0381d2e --- /dev/null +++ b/app/Policies/RolePolicy.php @@ -0,0 +1,108 @@ +can('view_any_role'); + } + + /** + * Determine whether the user can view the model. + */ + public function view(User $user, Role $role): bool + { + return $user->can('view_role'); + } + + /** + * Determine whether the user can create models. + */ + public function create(User $user): bool + { + return $user->can('create_role'); + } + + /** + * Determine whether the user can update the model. + */ + public function update(User $user, Role $role): bool + { + return $user->can('update_role'); + } + + /** + * Determine whether the user can delete the model. + */ + public function delete(User $user, Role $role): bool + { + return $user->can('delete_role'); + } + + /** + * Determine whether the user can bulk delete. + */ + public function deleteAny(User $user): bool + { + return $user->can('delete_any_role'); + } + + /** + * Determine whether the user can permanently delete. + */ + public function forceDelete(User $user, Role $role): bool + { + return $user->can('{{ ForceDelete }}'); + } + + /** + * Determine whether the user can permanently bulk delete. + */ + public function forceDeleteAny(User $user): bool + { + return $user->can('{{ ForceDeleteAny }}'); + } + + /** + * Determine whether the user can restore. + */ + public function restore(User $user, Role $role): bool + { + return $user->can('{{ Restore }}'); + } + + /** + * Determine whether the user can bulk restore. + */ + public function restoreAny(User $user): bool + { + return $user->can('{{ RestoreAny }}'); + } + + /** + * Determine whether the user can replicate. + */ + public function replicate(User $user, Role $role): bool + { + return $user->can('{{ Replicate }}'); + } + + /** + * Determine whether the user can reorder. + */ + public function reorder(User $user): bool + { + return $user->can('{{ Reorder }}'); + } +} diff --git a/app/Policies/ToolPolicy.php b/app/Policies/ToolPolicy.php new file mode 100644 index 000000000..07b30ca01 --- /dev/null +++ b/app/Policies/ToolPolicy.php @@ -0,0 +1,108 @@ +can('view_any_tool'); + } + + /** + * Determine whether the user can view the model. + */ + public function view(User $user, Tool $tool): bool + { + return $user->can('view_tool'); + } + + /** + * Determine whether the user can create models. + */ + public function create(User $user): bool + { + return $user->can('create_tool'); + } + + /** + * Determine whether the user can update the model. + */ + public function update(User $user, Tool $tool): bool + { + return $user->can('update_tool'); + } + + /** + * Determine whether the user can delete the model. + */ + public function delete(User $user, Tool $tool): bool + { + return $user->can('delete_tool'); + } + + /** + * Determine whether the user can bulk delete. + */ + public function deleteAny(User $user): bool + { + return $user->can('delete_any_tool'); + } + + /** + * Determine whether the user can permanently delete. + */ + public function forceDelete(User $user, Tool $tool): bool + { + return $user->can('force_delete_tool'); + } + + /** + * Determine whether the user can permanently bulk delete. + */ + public function forceDeleteAny(User $user): bool + { + return $user->can('force_delete_any_tool'); + } + + /** + * Determine whether the user can restore. + */ + public function restore(User $user, Tool $tool): bool + { + return $user->can('restore_tool'); + } + + /** + * Determine whether the user can bulk restore. + */ + public function restoreAny(User $user): bool + { + return $user->can('restore_any_tool'); + } + + /** + * Determine whether the user can replicate. + */ + public function replicate(User $user, Tool $tool): bool + { + return $user->can('replicate_tool'); + } + + /** + * Determine whether the user can reorder. + */ + public function reorder(User $user): bool + { + return $user->can('reorder_tool'); + } +} diff --git a/app/Policies/ToolRequestPolicy.php b/app/Policies/ToolRequestPolicy.php new file mode 100644 index 000000000..7b0778820 --- /dev/null +++ b/app/Policies/ToolRequestPolicy.php @@ -0,0 +1,108 @@ +can('view_any_tool::request'); + } + + /** + * Determine whether the user can view the model. + */ + public function view(User $user, ToolRequest $toolRequest): bool + { + return $user->can('view_tool::request'); + } + + /** + * Determine whether the user can create models. + */ + public function create(User $user): bool + { + return $user->can('create_tool::request'); + } + + /** + * Determine whether the user can update the model. + */ + public function update(User $user, ToolRequest $toolRequest): bool + { + return $user->can('update_tool::request'); + } + + /** + * Determine whether the user can delete the model. + */ + public function delete(User $user, ToolRequest $toolRequest): bool + { + return $user->can('delete_tool::request'); + } + + /** + * Determine whether the user can bulk delete. + */ + public function deleteAny(User $user): bool + { + return $user->can('delete_any_tool::request'); + } + + /** + * Determine whether the user can permanently delete. + */ + public function forceDelete(User $user, ToolRequest $toolRequest): bool + { + return $user->can('force_delete_tool::request'); + } + + /** + * Determine whether the user can permanently bulk delete. + */ + public function forceDeleteAny(User $user): bool + { + return $user->can('force_delete_any_tool::request'); + } + + /** + * Determine whether the user can restore. + */ + public function restore(User $user, ToolRequest $toolRequest): bool + { + return $user->can('restore_tool::request'); + } + + /** + * Determine whether the user can bulk restore. + */ + public function restoreAny(User $user): bool + { + return $user->can('restore_any_tool::request'); + } + + /** + * Determine whether the user can replicate. + */ + public function replicate(User $user, ToolRequest $toolRequest): bool + { + return $user->can('replicate_tool::request'); + } + + /** + * Determine whether the user can reorder. + */ + public function reorder(User $user): bool + { + return $user->can('reorder_tool::request'); + } +} diff --git a/app/Policies/ToolSubscriptionPolicy.php b/app/Policies/ToolSubscriptionPolicy.php new file mode 100644 index 000000000..06613d08b --- /dev/null +++ b/app/Policies/ToolSubscriptionPolicy.php @@ -0,0 +1,108 @@ +can('view_any_tool::subscription'); + } + + /** + * Determine whether the user can view the model. + */ + public function view(User $user, ToolSubscription $toolSubscription): bool + { + return $user->can('view_tool::subscription'); + } + + /** + * Determine whether the user can create models. + */ + public function create(User $user): bool + { + return $user->can('create_tool::subscription'); + } + + /** + * Determine whether the user can update the model. + */ + public function update(User $user, ToolSubscription $toolSubscription): bool + { + return $user->can('update_tool::subscription'); + } + + /** + * Determine whether the user can delete the model. + */ + public function delete(User $user, ToolSubscription $toolSubscription): bool + { + return $user->can('delete_tool::subscription'); + } + + /** + * Determine whether the user can bulk delete. + */ + public function deleteAny(User $user): bool + { + return $user->can('delete_any_tool::subscription'); + } + + /** + * Determine whether the user can permanently delete. + */ + public function forceDelete(User $user, ToolSubscription $toolSubscription): bool + { + return $user->can('force_delete_tool::subscription'); + } + + /** + * Determine whether the user can permanently bulk delete. + */ + public function forceDeleteAny(User $user): bool + { + return $user->can('force_delete_any_tool::subscription'); + } + + /** + * Determine whether the user can restore. + */ + public function restore(User $user, ToolSubscription $toolSubscription): bool + { + return $user->can('restore_tool::subscription'); + } + + /** + * Determine whether the user can bulk restore. + */ + public function restoreAny(User $user): bool + { + return $user->can('restore_any_tool::subscription'); + } + + /** + * Determine whether the user can replicate. + */ + public function replicate(User $user, ToolSubscription $toolSubscription): bool + { + return $user->can('replicate_tool::subscription'); + } + + /** + * Determine whether the user can reorder. + */ + public function reorder(User $user): bool + { + return $user->can('reorder_tool::subscription'); + } +} diff --git a/app/Policies/UserPolicy.php b/app/Policies/UserPolicy.php new file mode 100644 index 000000000..68e101ecf --- /dev/null +++ b/app/Policies/UserPolicy.php @@ -0,0 +1,144 @@ +can('view_any_user'); + } + + /** + * Determine whether the user can view the model. + * + * @param \App\Models\User $user + * @return bool + */ + public function view(User $user): bool + { + return $user->can('view_user'); + } + + /** + * Determine whether the user can create models. + * + * @param \App\Models\User $user + * @return bool + */ + public function create(User $user): bool + { + return $user->can('create_user'); + } + + /** + * Determine whether the user can update the model. + * + * @param \App\Models\User $user + * @return bool + */ + public function update(User $user): bool + { + return $user->can('update_user'); + } + + /** + * Determine whether the user can delete the model. + * + * @param \App\Models\User $user + * @return bool + */ + public function delete(User $user): bool + { + return $user->can('delete_user'); + } + + /** + * Determine whether the user can bulk delete. + * + * @param \App\Models\User $user + * @return bool + */ + public function deleteAny(User $user): bool + { + return $user->can('delete_any_user'); + } + + /** + * Determine whether the user can permanently delete. + * + * @param \App\Models\User $user + * @return bool + */ + public function forceDelete(User $user): bool + { + return $user->can('force_delete_user'); + } + + /** + * Determine whether the user can permanently bulk delete. + * + * @param \App\Models\User $user + * @return bool + */ + public function forceDeleteAny(User $user): bool + { + return $user->can('force_delete_any_user'); + } + + /** + * Determine whether the user can restore. + * + * @param \App\Models\User $user + * @return bool + */ + public function restore(User $user): bool + { + return $user->can('restore_user'); + } + + /** + * Determine whether the user can bulk restore. + * + * @param \App\Models\User $user + * @return bool + */ + public function restoreAny(User $user): bool + { + return $user->can('restore_any_user'); + } + + /** + * Determine whether the user can bulk restore. + * + * @param \App\Models\User $user + * @return bool + */ + public function replicate(User $user): bool + { + return $user->can('replicate_user'); + } + + /** + * Determine whether the user can reorder. + * + * @param \App\Models\User $user + * @return bool + */ + public function reorder(User $user): bool + { + return $user->can('reorder_user'); + } +} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 452e6b65b..6262d6970 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -2,6 +2,11 @@ namespace App\Providers; +use App\Models\User; +use BezhanSalleh\FilamentLanguageSwitch\LanguageSwitch; +use Filament\Facades\Filament; +use Illuminate\Support\Facades\Gate; +use Illuminate\Support\Facades\Route; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider @@ -19,6 +24,35 @@ public function register(): void */ public function boot(): void { - // + + + Gate::guessPolicyNamesUsing(function (string $modelClass) { + return str_replace('Models', 'Policies', $modelClass) . 'Policy'; + }); + Route::middleware('api') + ->prefix('api') + ->group(base_path('routes/api.php')); + + Filament::serving(function () { + // Only allow admin users to access Filament + Gate::define('viewFilament', function (User $user) { + return $user->isAdmin(); + }); + }); + LanguageSwitch::configureUsing(function (LanguageSwitch $switch) { + $switch + ->locales(['ar','en']); // also accepts a closure + }); + // Configure Filament auth guard and redirects + config([ + 'filament.auth.guard' => 'web', + 'filament.path' => 'admin', + 'filament.domain' => null, + 'filament.home_url' => '/', + 'filament.auth.pages.login' => \Filament\Http\Livewire\Auth\Login::class, + ]); + + } } + diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php new file mode 100644 index 000000000..10aa2e7b1 --- /dev/null +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -0,0 +1,86 @@ +default() + ->id('admin') + ->path('admin') + ->login() + ->colors([ + 'primary' => Color::Amber, + ])->brandName(function (): string { + return app()->getLocale() === 'ar' + ? 'لوحة إدارة التقييم' + : 'Assessment Admin Panel'; + }) + ->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources') + ->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages') + ->pages([ + Pages\Dashboard::class, + ])->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets') + ->widgets([]) + ->middleware([ + EncryptCookies::class, + AddQueuedCookiesToResponse::class, + StartSession::class, + AuthenticateSession::class, + ShareErrorsFromSession::class, + VerifyCsrfToken::class, + SubstituteBindings::class, + DisableBladeIconComponents::class, + DispatchServingFilamentEvent::class, + ])->plugins([ + FilamentShieldPlugin::make() + ->gridColumns([ + 'default' => 1, + 'sm' => 2, + 'lg' => 3 + ]) + ->sectionColumnSpan(1) + ->checkboxListColumns([ + 'default' => 1, + 'sm' => 2, + 'lg' => 4, + ]) + ->resourceCheckboxListColumns([ + 'default' => 1, + 'sm' => 2, + ]), + ])->authMiddleware([ + Authenticate::class, + ])->renderHook( + 'panels::head.end', + fn (): string => app()->getLocale() === 'ar' + ? '' + : '' + ); + } +} diff --git a/app/Providers/ReportServiceProvider.php b/app/Providers/ReportServiceProvider.php new file mode 100644 index 000000000..219b31c0d --- /dev/null +++ b/app/Providers/ReportServiceProvider.php @@ -0,0 +1,24 @@ +language = $language; + $this->isArabic = $language === 'ar'; + $this->initializeTranslations(); + + $this->data = [ + 'tool_id' => null, + 'tool_name' => '', + 'assessment_title' => '', + 'company_name' => '', + 'assessment_name' => '', + 'assessment_email' => '', + 'completion_date' => '', + 'overall_percentage' => 0, + 'certification_level' => '', + 'certification_color' => '', + 'certification_text' => '', + 'total_criteria' => 0, + 'applicable_criteria' => 0, + 'yes_count' => 0, + 'no_count' => 0, + 'na_count' => 0, + 'domain_results' => [] + ]; + } + + private function initializeTranslations(): void + { + $this->translations = [ + 'en' => [ + 'assessment_results' => 'Assessment Results', + 'report_for' => 'Report For', + 'completed_on' => 'Completed on', + 'assessment_completed_by' => 'Assessment completed by', + 'for' => 'for', + 'domain_performance_overview' => 'Domain Performance', + 'performance_analysis' => 'Performance Analysis', + 'response_breakdown' => 'Response Breakdown', + 'this_domain_achieved' => 'This domain achieved a score of', + 'which_is_considered' => 'which is considered', + 'recommendation' => 'Recommendation', + 'yes' => 'Yes', + 'no' => 'No', + 'not_applicable' => 'Not Applicable', + 'na' => 'N/A', + 'contact_us_prompt' => 'For more information: Contact Us', + 'overall_score' => 'Overall Score', + // NEW additions + 'assessment_report' => 'Assessment Report', + 'comprehensive_assessment' => 'Comprehensive Assessment', + 'detailed_analysis_report' => 'Detailed analysis report based on the Abdaliyah Quartet standards.', + 'prepared_for' => 'Prepared For', + 'confidential_report' => 'Confidential Report', + ], + 'ar' => [ + 'assessment_results' => 'نتائج التقييم', + 'report_for' => 'تقرير لـ', + 'completed_on' => 'اكتمل في', + 'assessment_completed_by' => 'تم إكمال التقييم بواسطة', + 'for' => 'لـ', + 'domain_performance_overview' => 'أداء المجالات', + 'performance_analysis' => 'تحليل الأداء', + 'response_breakdown' => 'تفصيل الإجابات', + 'this_domain_achieved' => 'حقق هذا المجال نتيجة', + 'which_is_considered' => 'والتي تعتبر', + 'recommendation' => 'التوصية', + 'yes' => 'نعم', + 'no' => 'لا', + 'not_applicable' => 'غير قابل للتطبيق', + 'na' => 'غ/م', + 'contact_us_prompt' => 'لمزيد من المعلومات: اتصل بنا', + 'overall_score' => 'النتيجة الإجمالية', + // NEW additions + 'assessment_report' => 'تقرير التقييم', + 'comprehensive_assessment' => 'تقييم شامل', + 'detailed_analysis_report' => 'تقرير تحليل مفصل بناءً على معايير الرباعية العبدلية.', + 'prepared_for' => 'مُعد لـ', + 'confidential_report' => 'تقرير سري', + ] + ]; + } + private function t(string $key): string + { + return $this->translations[$this->language][$key] ?? $key; + } + + public function setLogoPath(?string $path): void + { + if ($path && file_exists($path)) { + $this->logoPath = $path; + } + } + + public function setWhiteLogoPath(?string $path): void + { + if ($path && file_exists($path)) { + $this->whiteLogoPath = $path; + } + } + + public function setAssessmentData($assessment, $results, $user = null): void + { + $certificationInfo = $this->getCertificationInfo($assessment->tool_id, $results['overall_percentage'] ?? 0); + $toolName = $this->isArabic ? ($assessment->tool->name_ar ?? 'أداة التقييم') : ($assessment->tool->name_en ?? 'Assessment Tool'); + $assessmentTitle = $this->isArabic ? ($assessment->title_ar ?? $this->t('assessment_results')) : ($assessment->title_en ?? $this->t('assessment_results')); + + $this->data = [ + 'tool_id' => $assessment->tool_id, + 'tool_name' => $toolName, + 'assessment_title' => $assessmentTitle, + 'company_name' => $user->organization->name ?? $assessment->organization ?? ($this->isArabic ? 'مؤسستك' : 'Your Organization'), + 'assessment_name' => $assessment->name, + 'assessment_email' => $assessment->email, + 'completion_date' => $this->formatDate($assessment->completed_at ?? now()), + 'overall_percentage' => $results['overall_percentage'] ?? 0, + 'certification_level' => $certificationInfo['level'], + 'certification_color' => $certificationInfo['color'], + 'certification_text' => $certificationInfo['text'], + 'total_criteria' => $results['total_criteria'] ?? 0, + 'applicable_criteria' => $results['applicable_criteria'] ?? 0, + 'yes_count' => $results['yes_count'] ?? 0, + 'no_count' => $results['no_count'] ?? 0, + 'na_count' => $results['na_count'] ?? 0, + 'domain_results' => $results['domain_results'] ?? [] + ]; + } + + private function formatDate($date): string + { + if (!$date) $date = now(); + return $this->isArabic ? $date->locale('ar')->translatedFormat('d F Y') : $date->format('F d, Y'); + } + + public function generatePDF(): Response + { + $html = $this->buildCompleteHTML(); + $pdf = $this->createPdfFromHtml($html); + $filename = $this->generateFilename(); + + return response($pdf, 200, [ + 'Content-Type' => 'application/pdf', + 'Content-Disposition' => "attachment; filename=\"{$filename}\"" + ]); + } + + public function savePDF(string $filename = null): string + { + $filename = $filename ?? $this->generateFilename(); + $html = $this->buildCompleteHTML(); + $pdf = $this->createPdfFromHtml($html); + + Storage::disk('public')->put("pdfs/{$filename}", $pdf); + return "pdfs/{$filename}"; + } + + public function generatePreview(): string + { + return $this->buildCompleteHTML(); + } + + private function createPdfFromHtml(string $html): string + { + try { + return Browsershot::html($html) + ->format('A4') + ->margins(0, 0, 0, 0) + ->printBackground() + ->waitUntilNetworkIdle() + ->timeout(120) + ->setDelay(1000) + ->emulateMedia('print') + ->setOption('addStyleTag', json_encode(['content' => 'body { -webkit-print-color-adjust: exact; }'])) + ->setOption('args', ['--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage']) + ->pdf(); + } catch (\Exception $e) { + throw new \Exception("Failed to generate PDF: " . $e->getMessage()); + } + } + + private function buildCompleteHTML(): string + { + $lang = $this->language; + $dir = $this->isArabic ? 'rtl' : 'ltr'; + $css = $this->getAdvancedCSS(); + + $pages = []; + $pages[] = $this->generateCoverPage(); + $pages[] = $this->generateToolSummaryPage(); + $pages[] = $this->generateSummaryPage(); + + foreach ($this->data['domain_results'] as $index => $domain) { + $pages[] = $this->generateDomainPage($domain, $index + 1); + } + $pages[] = $this->generateContactPage(); + + $htmlContent = implode('', $pages); + + return "{$this->data['tool_name']} {$this->t('assessment_results')}{$htmlContent}"; + } + + private function getAdvancedCSS(): string + { + $fontFamily = $this->isArabic ? "'Amiri', 'Noto Sans Arabic', sans-serif" : "'Poppins', 'Calibri', sans-serif"; + $textAlign = $this->isArabic ? 'right' : 'left'; + $marginDir = $this->isArabic ? 'margin-left' : 'margin-right'; + $flexDir = $this->isArabic ? 'row-reverse' : 'row'; + + return " + @import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Noto+Sans+Arabic:wght@400;600;700&display=swap'); + @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap'); + * { margin: 0; padding: 0; box-sizing: border-box; } + body { font-family: {$fontFamily}; font-size: 14px; line-height: 1.6; color: #333; background: white; } + .page { width: 8.5in; height: 11in; margin: 0 auto; background: white; position: relative; page-break-after: always; overflow: hidden; padding: 60px; } + .page:last-child { page-break-after: avoid; } + /* FIXED: New class to remove padding for full-bleed color pages */ + .page.full-bleed { padding: 0; } + /* Professional Cover Page Styles */ +.cover-page-content { + display: flex; + flex-direction: column; + justify-content: space-between; + height: 100vh; + position: relative; + color: #0d2a4c; + background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); + overflow: hidden; +} + +/* Professional wave graphic positioning */ +.cover-graphic { + position: absolute; + top: 0; + right: 0; + width: 60%; + height: 100%; + object-fit: contain; + opacity: 0.5; + z-index: 1; + filter: contrast(1.1); +} + +html[dir='rtl'] .cover-graphic { + right: auto; + left: 0; +} + +/* Ensures all content is above the graphic */ +.cover-page-content > * { + z-index: 2; + position: relative; +} + +/* Professional header with better spacing */ +.cover-header { + display: flex; + justify-content: space-between; + align-items: flex-start; + padding: 40px 50px 20px 50px; + border-bottom: 2px solid #e2e8f0; +} + +.cover-logo { + max-width: 180px; + height: auto; + filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); +} + +.cover-date { + font-size: 16px; + font-weight: 500; + color: #64748b; + background: rgba(255, 255, 255, 0.9); + padding: 8px 16px; + border-radius: 6px; + border: 1px solid #e2e8f0; + box-shadow: 0 2px 4px rgba(0,0,0,0.05); +} + +/* Professional main title section */ +.cover-main { + flex: 1; + display: flex; + align-items: center; + justify-content: flex-start; + padding: 60px 50px; +} + +.cover-main h1 { + font-size: 48px; + font-weight: 700; + line-height: 1.2; + text-align: left; + margin: 0; + color: #0d2a4c; + text-shadow: 0 2px 4px rgba(0,0,0,0.1); + max-width: 70%; + background: linear-gradient(135deg, #0d2a4c 0%, #1e40af 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; +} + +html[dir='rtl'] .cover-main h1 { + text-align: right; +} + +/* Professional footer with better hierarchy */ +.cover-footer { + padding: 30px 50px 40px 50px; + background: rgba(255, 255, 255, 0.95); + border-top: 2px solid #e2e8f0; +} + +.cover-footer > div:first-child { + font-size: 14px; + font-weight: 500; + color: #64748b; + text-transform: uppercase; + letter-spacing: 0.5px; + margin-bottom: 8px; +} + +.cover-footer .company-name { + font-size: 28px; + font-weight: 700; + color: #0d2a4c; + text-shadow: 0 1px 2px rgba(0,0,0,0.1); + margin: 0; +} + +/* Add subtle geometric elements for professionalism */ +.cover-page-content::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 4px; + height: 100%; + background: linear-gradient(to bottom, #0d2a4c, #1e40af, #3b82f6); + z-index: 3; +} + +html[dir='rtl'] .cover-page-content::before { + left: auto; + right: 0; +} + +.cover-page-content::after { + content: ''; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 4px; + background: linear-gradient(to right, #0d2a4c, #1e40af, #3b82f6); + z-index: 3; +} + +/* Professional accent elements */ +.cover-accent-dot { + position: absolute; + width: 8px; + height: 8px; + background: #3b82f6; + border-radius: 50%; + top: 50px; + right: 60px; + z-index: 3; +} + +html[dir='rtl'] .cover-accent-dot { + right: auto; + left: 60px; +} + +.cover-accent-line { + position: absolute; + width: 60px; + height: 2px; + background: linear-gradient(to right, #3b82f6, transparent); + top: 53px; + right: 80px; + z-index: 3; +} + +html[dir='rtl'] .cover-accent-line { + right: auto; + left: 80px; + background: linear-gradient(to left, #3b82f6, transparent); +} + +/* Responsive design for smaller formats */ +@media (max-width: 768px) { + .cover-header, + .cover-main, + .cover-footer { + padding-left: 30px; + padding-right: 30px; + } + + .cover-main h1 { + font-size: 36px; + max-width: 85%; + } + + .cover-footer .company-name { + font-size: 22px; + } +} + +@media print { + .cover-page-content { + height: 100vh; + } + + .cover-graphic { + opacity: 0.06; + } +} + + .section-title { font-size: " . ($this->isArabic ? '30px' : '32px') . "; font-weight: 700; color: #0d2a4c; margin-bottom: 24px; border-bottom: 2px solid #dee2e6; padding-bottom: 10px; } + .section-subtitle { font-size: 16px; color: #546e7a; margin-top: 20px; line-height: 1.7; } + + /* NEW: Styles for the certification status badge */ + .status-container { text-align: center; margin: 30px 0; } + .certification-status-badge { display: inline-block; padding: 12px 35px; border-radius: 50px; font-size: 22px; font-weight: 700; color: white; } + .completion-info { text-align: center; font-size: 14px; color: #6c757d; } + + /* NEW: Styles for Category Bar Graph */ + /* In getAdvancedCSS(), replace the old bar graph styles with these */ + + +.bar-chart { + width: 100%; + max-width: 600px; + margin: 1rem 0; + font-family: 'Arial', sans-serif; +} + +.bar-item { + margin-bottom: 1rem; +} + +.bar-label { + display: flex; + justify-content: space-between; + font-size: 14px; + margin-bottom: 4px; + direction: rtl; +} + +.bar-track { + width: 100%; + height: 16px; + background-color: #e5e7eb; /* light gray */ + border-radius: 8px; + overflow: hidden; +} + +.bar-fill { + height: 100%; + background-color: #0d2a4c; /* deep blue */ + border-radius: 8px 0 0 8px; + transition: width 0.3s ease; +} + + + .summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; align-items: flex-start; } + .summary-card { background: #f8f9fa; border-radius: 12px; padding: 25px; height: 100%; } + .summary-card-title { font-size: 18px; font-weight: 600; color: #343a40; margin-bottom: 20px; } + .chart-container { display: flex; align-items: center; gap: 25px; flex-direction: {$flexDir}; } + .doughnut-chart { width: 140px; height: 140px; position: relative; flex-shrink: 0; } + .doughnut-chart-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; } + .doughnut-chart-score { font-size: 28px; font-weight: 700; line-height: 1; } + .doughnut-chart-label { font-size: 12px; color: #6c757d; } + .chart-legend { list-style: none; padding: 0; margin: 0; flex-grow: 1; } + .chart-legend li { display: flex; align-items: center; margin-bottom: 10px; font-size: 14px; flex-direction: {$flexDir}; } + .legend-marker { width: 12px; height: 12px; border-radius: 3px; {$marginDir}: 10px; } + + /* In getAdvancedCSS(), replace old tool summary styles with these */ + + /* Tool intro header - more compact for PDF */ +.tool-intro-header { + text-align: center; + margin-bottom: 20px; +} + +.tool-intro-header h1 { + font-size: 24px; + font-weight: 700; + color: #0d2a4c; + margin-bottom: 6px; +} + +.tool-intro-header p { + font-size: 14px; + color: #546e7a; + max-width: 85%; + margin: 0 auto; + line-height: 1.4; +} + +/* Compact horizontal domain list */ +.domain-list-pro { + list-style-type: none; + padding: 0; + margin-bottom: 20px; + display: flex; + flex-wrap: wrap; + gap: 15px; + justify-content: center; +} + +/* Compact card design - horizontal pill style */ +.domain-card-enhanced { + display: flex; + align-items: center; + background-color: #f8f9fa; + border-radius: 25px; + padding: 12px 20px; + border: 1px solid #e9ecef; + border-left: 4px solid #0056b3; + box-shadow: 0 2px 4px rgba(0,0,0,0.05); + min-width: 200px; + max-width: 280px; + flex: 1; +} + +html[dir='rtl'] .domain-card-enhanced { + border-left: none; + border-right: 4px solid #0d2a4c; +} + +.domain-card-icon { + flex-shrink: 0; + width: 24px; + height: 24px; + color: #0056b3; + margin-right: 12px; +} + +html[dir='rtl'] .domain-card-icon { + margin-right: 0; + margin-left: 12px; +} + +.domain-card-text h3 { + font-size: 14px; + font-weight: 600; + color: #343a40; + margin-bottom: 0; + line-height: 1.3; +} + +.domain-card-text p { + display: none; /* Hide description for compact view */ +} + +/* Alternative: Grid layout for better PDF fit */ +.domain-list-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); + gap: 12px; + margin-bottom: 20px; + padding: 0; + list-style: none; +} + +.domain-card-grid { + display: flex; + align-items: center; + background-color: #f8f9fa; + border-radius: 8px; + padding: 10px 15px; + border: 1px solid #e9ecef; + border-left: 3px solid #0056b3; + text-align: left; +} + +html[dir='rtl'] .domain-card-grid { + border-left: none; + border-right: 3px solid #0d2a4c; + text-align: right; +} + +.domain-card-grid h3 { + font-size: 13px; + font-weight: 600; + color: #343a40; + margin: 0; + line-height: 1.2; +} + +/* Vertical Bar Chart Styles - Adjusted for PDF */ +.vertical-bar-chart-container { + display: flex; + align-items: flex-end; + justify-content: space-around; + gap: 8px; + padding: 15px 10px; + background-color: #ffffff; + border-radius: 8px; + border: 1px solid #e2e8f0; + margin: 15px 0; + min-height: 180px; +} + +.bar-column { + display: flex; + flex-direction: column; + align-items: center; + flex: 1; + max-width: 80px; +} + +.bar-value { + font-size: 13px; + font-weight: 600; + color: #343a40; + margin-bottom: 6px; + min-height: 18px; +} + +.bar-container { + width: 35px; + height: 120px; + background-color: #f1f5f9; + border-radius: 18px; + border: 1px solid #e2e8f0; + position: relative; + display: flex; + align-items: flex-end; + margin-bottom: 8px; +} + +.bar-fill { + width: 100%; + border-radius: 18px; + background: linear-gradient(to top, #3b82f6, #0d2a4c); + transition: none; /* Remove animation for PDF */ + min-height: 2px; +} + +.bar-label { + font-size: 10px; + color: #6c757d; + margin-bottom: 3px; + text-align: center; +} + +.bar-domain { + font-size: 11px; + font-weight: 600; + color: #343a40; + text-align: center; + word-wrap: break-word; + line-height: 1.1; + max-width: 70px; +} + +/* PDF optimized styles */ +@media print { + .tool-intro-header { + margin-bottom: 15px; + } + + .domain-list-pro { + margin-bottom: 15px; + } + + .vertical-bar-chart-container { + min-height: 160px; + margin: 10px 0; + } + + .bar-container { + height: 100px; + } +} + /* Vertical Bar Chart Styles */ +.vertical-bar-chart-container { + display: flex; + align-items: flex-end; + justify-content: space-around; + gap: 10px; + padding: 10px; + background-color: #ffffff; + border-radius: 8px; + border: 1px solid #e2e8f0; + margin: 20px 0; + min-height: 50%; +} + +.bar-column { + display: flex; + flex-direction: column; + align-items: center; + flex: 1; + max-width: 50px; +} + +.bar-value { + font-size: 14px; + font-weight: 600; + color: #343a40; + margin-bottom: 8px; + min-height: 20px; +} + +.bar-container { + width: 40px; + height: 100px; + background-color: #f1f5f9; + border-radius: 20px; + border: 1px solid #e2e8f0; + position: relative; + display: flex; + align-items: flex-end; + margin-bottom: 12px; +} + +.bar-fill { + width: 100%; + border-radius: 20px; + background: linear-gradient(to top, #3b82f6, #0d2a4c); + transition: height 0.3s ease-in-out; + min-height: 2px; +} + +.bar-label { + font-size: 12px; + color: #6c757d; + margin-bottom: 4px; + text-align: center; +} + +.bar-domain { + font-size: 13px; + font-weight: 600; + color: #343a40; + text-align: center; + word-wrap: break-word; + line-height: 1.2; +} + +/* Responsive design */ +@media (max-width: 768px) { + .vertical-bar-chart-container { + gap: 10px; + padding: 0px; + min-height: 350px; + } + + .bar-column { + max-width: 60px; + } + + .bar-container { + width: 30px; + height: 250px; + } + + .bar-domain { + font-size: 11px; + } + + .bar-value { + font-size: 12px; + } +} + + .domain-perf-item { margin-bottom: 15px; } + .domain-perf-title { font-size: 14px; font-weight: 600; margin-bottom: 5px; display: flex; justify-content: space-between; } + .domain-perf-bar-bg { width: 100%; height: 18px; background: #e9ecef; border-radius: 9px; overflow: hidden; } + .domain-perf-bar-fill { height: 100%; border-radius: 9px; } + + .domain-header { display: flex; align-items: center; margin-bottom: 40px; gap: 20px; flex-direction: {$flexDir}; } + .domain-icon { width: 60px; height: 60px; border-radius: 50%; color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 24px; flex-shrink: 0; } + .domain-details { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; } + .detail-card { background: #f8f9fa; padding: 20px; border-radius: 8px; border: 1px solid #e9ecef; } + .card-title { font-size: 16px; font-weight: 700; color: #343a40; margin-bottom: 12px; } + .card-content { font-size: 14px; line-height: 1.7; color: #495057; } + .response-bar { display: flex; width: 100%; height: 24px; border-radius: 12px; overflow: hidden; background-color: #e9ecef; margin-bottom: 12px; flex-direction: {$flexDir}; } + .bar-segment { height: 100%; } + .bar-legend { display: flex; justify-content: center; gap: 20px; margin-top: 16px; font-size: 12px; } + .legend-item { display: flex; align-items: center; gap: 6px; } + .legend-color { width: 12px; height: 12px; border-radius: 3px; } + + .contact-page-content { align-items: center; text-align: center; margin-top: 45%; } + .contact-logo { max-width: 320px; margin-bottom: 40px; } + .contact-title { font-size: 22pt; font-weight: 700; margin-bottom: 40px; color: #0d2a4c; } + .contact-details { display: flex; justify-content: center; align-items: center; gap: 40px; width: 100%; flex-wrap: wrap; } + .contact-item { display: flex; align-items: center; gap: 12px; font-size: 11pt; color: #0d2a4c; flex-direction: {$flexDir}; } + .contact-icon-wrapper { width: 40px; height: 40px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.1); display: flex; align-items: center; justify-content: center; } + .contact-icon { height: 20px; width: 20px; } + "; + } + + private function generateCoverPage(): string + { + $logoHtml = $this->getLogoHtml('cover-logo'); + $backgroundGraphicHtml = $this->getBackgroundImageHtml(); + + // Format the date professionally + $formattedDate = date('F j, Y', strtotime($this->data['completion_date'])); + + return " +
+
+ " . $backgroundGraphicHtml . " + + +
+
+ +
+ " . $logoHtml . " +
{$formattedDate}
+
+ +
+

{$this->data['tool_name']}

+
+ +
+
" . $this->t('assessment_report') . "
+
{$this->data['company_name']}
+
+
+
"; + } + +// Alternative version with additional professional elements + private function generateProfessionalCoverPage(): string + { + $logoHtml = $this->getLogoHtml('cover-logo'); + $backgroundGraphicHtml = $this->getBackgroundImageHtml(); + + // Format the date professionally + $formattedDate = date('F j, Y', strtotime($this->data['completion_date'])); + + // Get current year for footer + $currentYear = date('Y'); + + return " +
+
+ " . $backgroundGraphicHtml . " + + +
+
+ +
+ " . $logoHtml . " +
{$formattedDate}
+
+ +
+
+
" . $this->t('comprehensive_assessment') . "
+

{$this->data['tool_name']}

+
" . $this->t('detailed_analysis_report') . "
+
+
+ +
+
" . $this->t('prepared_for') . "
+
{$this->data['company_name']}
+
+ " . $this->t('confidential_report') . " + © {$currentYear} +
+
+
+
"; + } + + private function getBackgroundImageHtml(): string + { + $path = storage_path('app/public/waves-blue.png'); + if (file_exists($path)) { + $type = pathinfo($path, PATHINFO_EXTENSION); + $data = file_get_contents($path); + $base64 = 'data:image/' . $type . ';base64,' . base64_encode($data); + return "Background Graphic"; + } + return ''; + } + private function generateToolSummaryPage(): string + { + $tool = Tool::find($this->data['tool_id']); + if (!$tool) return ''; + + $tool_name = $this->isArabic ? $tool->name_ar : $tool->name_en; + $tool_description = $this->isArabic ? $tool->description_ar : $tool->description_en; + + // Option 1: Horizontal pill layout + $domainsHTML = ''; + foreach ($tool->domains as $index => $domain) { + $domain_name = $this->isArabic ? $domain->name_ar : $domain->name_en; + + $domainsHTML .= " +
+
+

{$domain_name}

+
+
"; + } + + // Option 2: Grid layout (uncomment to use instead) + /* + $domainsHTML = ''; + foreach ($tool->domains as $index => $domain) { + $domain_name = $this->isArabic ? $domain->name_ar : $domain->name_en; + + $domainsHTML .= " +
+

{$domain_name}

+
"; + } + */ + + $chartHTML = $this->generateCriteriaBarGraph(); + + return " +
+
{$this->t('assessment_standards')}
+ +
+

{$tool_name}

+

{$tool_description}

+
+ +
+ {$domainsHTML} +
+ +
{$chartHTML}
+
"; + } + +// Alternative version using grid layout + private function generateToolSummaryPageGrid(): string + { + $tool = Tool::find($this->data['tool_id']); + if (!$tool) return ''; + + $tool_name = $this->isArabic ? $tool->name_ar : $tool->name_en; + $tool_description = $this->isArabic ? $tool->description_ar : $tool->description_en; + + $domainsHTML = ''; + foreach ($tool->domains as $index => $domain) { + $domain_name = $this->isArabic ? $domain->name_ar : $domain->name_en; + + $domainsHTML .= " +
+

{$domain_name}

+
"; + } + + $chartHTML = $this->generateCriteriaBarGraph(); + + return " +
+
{$this->t('assessment_standards')}
+ +
+

{$tool_name}

+

{$tool_description}

+
+ +
+ {$domainsHTML} +
+ +
{$chartHTML}
+
"; + } + + /** + * Generates a bar graph showing the total number of criteria per domain. + * This is a replacement for generateCategoryBarGraph. + */ + /** + * Generates a bar graph showing the total number of criteria per domain. + * This is a replacement for generateCategoryBarGraph. + */ + private function generateCriteriaBarGraph(): string + { + // Eager load domains, their categories, and the count of criteria for each category + $tool = Tool::with(['domains' => function ($query) { + $query->with(['categories' => function ($subQuery) { + $subQuery->withCount('criteria'); + }])->orderBy('order'); + }])->find($this->data['tool_id']); + + if (!$tool || $tool->domains->isEmpty()) { + return '

No domains found for this tool.

'; + } + + // First, calculate the total criteria for each domain and find the maximum + $domainCriteriaCounts = $tool->domains->map(function ($domain) { + // Sum the criteria_count from each of the domain's categories + return $domain->categories->sum('criteria_count'); + }); + + $maxCriteria = $domainCriteriaCounts->max(); + if ($maxCriteria == 0) $maxCriteria = 1; // Avoid division by zero + + $graphHtml = '
'; + + foreach ($tool->domains as $index => $domain) { + $domainName = $this->isArabic ? $domain->name_ar : $domain->name_en; + // Get the pre-calculated criteria count for the current domain + $criteriaCount = $domainCriteriaCounts[$index]; + $barHeight = ($criteriaCount / $maxCriteria) * 100; + + $graphHtml .= " +
+
{$criteriaCount}
+
+
+
+
{$this->t('criteria')}
+
{$domainName}
+
"; + } + + $graphHtml .= '
'; + return $graphHtml; + } + /** + * Returns an SVG icon for a domain based on its index. + */ + private function getDomainIconSVG(int $index): string + { + $icons = [ + // Icon 1: Structure + '', + // Icon 2: Process + '', + // Icon 3: Innovation & Technology + '', + // Icon 4: Impact + '' + ]; + // Return icon based on index, or the last icon as a default + return $icons[$index % count($icons)] ?? end($icons); + } + + private function generateSummaryPage(): string + { + $leftCard = "
+
{$this->t('response_breakdown')}
+
" . $this->generateDoughnutChart() . "
+
"; + + $domainsHTML = ''; + foreach ($this->data['domain_results'] as $domain) { + $scoreColor = $this->getScoreColor($this->data['tool_id'], $domain['score_percentage']); + $score = round($domain['score_percentage']); + $domainsHTML .= "
+
+ {$domain['domain_name']} + {$score}% +
+
+
"; + } + $rightCard = "
+
{$this->t('domain_performance_overview')}
+ {$domainsHTML} +
"; + + $gridContent = $this->isArabic ? $rightCard . $leftCard : $leftCard . $rightCard; + + // NEW: Get dynamic certification text and color + $certificationText = $this->data['certification_text']; + $certificationColor = $this->data['certification_color']; + + return "
+
{$this->t('assessment_results')}
+
{$gridContent}
+ +
+
+ {$certificationText} +
+
+ +
+ +
+
"; + } + /** + * Returns an SVG icon for a domain based on its index. + */ + + + private function generateDoughnutChart(): string + { + $yes = $this->data['yes_count']; + $no = $this->data['no_count']; + $na = $this->data['na_count']; + $total = $yes + $no + $na; + if ($total == 0) return ''; + + $yes_pct = $yes / $total; + $no_pct = $no / $total; + + $circumference = 2 * M_PI * 40; + $yes_dash = $yes_pct * $circumference; + $no_dash = $no_pct * $circumference; + + $yes_offset = 0; + $no_offset = -$yes_dash; + $na_offset = -$yes_dash - $no_dash; + + $chart_svg = "
+ + + + + + +
+
data['certification_color']};\">" . round($this->data['overall_percentage']) . "%
+
{$this->t('overall_score')}
+
+
"; + + $legend_html = "
    +
  • {$this->t('yes')} ({$yes})
  • +
  • {$this->t('no')} ({$no})
  • +
  • {$this->t('na')} ({$na})
  • +
"; + + return $chart_svg . $legend_html; + } + + private function generateDomainPage(array $domain, int $domainNumber): string + { + $scoreColor = $this->getScoreColor($this->data['tool_id'], $domain['score_percentage']); + $performanceLevel = $this->getPerformanceLevel($this->data['tool_id'], $domain['score_percentage']); + $recommendation = $this->getPerformanceRecommendation($this->data['tool_id'], $domain['score_percentage']); + + $totalResponses = $domain['yes_count'] + $domain['no_count'] + $domain['na_count']; + $yesPercent = $totalResponses > 0 ? ($domain['yes_count'] / $totalResponses) * 100 : 0; + $noPercent = $totalResponses > 0 ? ($domain['no_count'] / $totalResponses) * 100 : 0; + $naPercent = $totalResponses > 0 ? ($domain['na_count'] / $totalResponses) * 100 : 0; + + $barSegments = $this->isArabic + ? "
" + : "
"; + + $responseBreakdownHtml = "
{$barSegments}
+
+
{$this->t('yes')} ({$domain['yes_count']})
+
{$this->t('no')} ({$domain['no_count']})
+
{$this->t('not_applicable')} ({$domain['na_count']})
+
"; + + return "
+
+
{$domainNumber}
+
{$domain['domain_name']}
+
+
+
+
{$this->t('performance_analysis')}
+
+

{$this->t('this_domain_achieved')} " . round($domain['score_percentage']) . "%, {$this->t('which_is_considered')} " . $performanceLevel . ".

+

{$recommendation}

+
+
+
+
{$this->t('response_breakdown')}
+
{$responseBreakdownHtml}
+
+
+
"; + } + + private function generateContactPage(): string + { + $logoHtml = $this->getLogoHtml('contact-logo'); + $phoneIcon = $this->getIconSVG('phone'); + $twitterIcon = $this->getIconSVG('twitter'); + $emailIcon = $this->getIconSVG('email'); + $flexDir = $this->isArabic ? 'row-reverse' : 'row'; + + return "
+ {$logoHtml} +
{$this->t('contact_us_prompt')}
+
+
+966554834833
{$phoneIcon}
+
@afaqcm
{$twitterIcon}
+
info@afaqcm.com
{$emailIcon}
+
+
"; + } + + private function getWhiteLogoHtml(string $class = 'contact-logo'): string + { + $path = $this->whiteLogoPath ?? $this->logoPath; + if ($path && file_exists($path)) { + $type = pathinfo($path, PATHINFO_EXTENSION); + $data = file_get_contents($path); + $base64 = 'data:image/' . ($type === 'svg' ? 'svg+xml' : $type) . ';base64,' . base64_encode($data); + return "Company Logo"; + } + return ''; + } + + private function getLogoHtml(string $class = 'contact-logo'): string + { + $path = $this->LogoPath ?? $this->logoPath; + if ($path && file_exists($path)) { + $type = pathinfo($path, PATHINFO_EXTENSION); + $data = file_get_contents($path); + $base64 = 'data:image/' . ($type === 'svg' ? 'svg+xml' : $type) . ';base64,' . base64_encode($data); + return "Company Logo"; + } + return ''; + } + + private function getIconSVG(string $iconName): string + { + $icons = [ + 'phone' => '', + 'twitter' => '', + 'email' => '', + ]; + return $icons[$iconName] ?? ''; + } + + private function getCertificationInfo(int $toolId, float $percentage): array + { + $tool = Tool::find($toolId); + if (!$tool) return ['level' => 'unknown', 'color' => '#6c757d', 'text' => 'Tool Not Found', 'recommendation' => '']; + $level = $tool->getPerformanceByScore($percentage); + if (!$level) return ['level' => 'unclassified', 'color' => '#6c757d', 'text' => 'Unclassified', 'recommendation' => '']; + return [ + 'level' => $level->code, 'color' => $level->color, + 'text' => $this->isArabic ? $level->text_ar : $level->text_en, + 'recommendation' => $this->isArabic ? $level->recommendation_ar : $level->recommendation_en + ]; + } + + private function getScoreColor(int $toolId, float $percentage): string + { + return $this->getCertificationInfo($toolId, $percentage)['color'] ?? '#6c757d'; + } + + private function getPerformanceLevel(int $toolId, float $percentage): string + { + return $this->getCertificationInfo($toolId, $percentage)['text'] ?? 'Unclassified'; + } + + private function getPerformanceRecommendation(int $toolId, float $percentage): string + { + return $this->getCertificationInfo($toolId, $percentage)['recommendation'] ?? ''; + } + + private function generateFilename(): string + { + $toolName = preg_replace('/[^A-Za-z0-9_\x{0600}-\x{06FF}-]/u', '_', $this->data['tool_name']); + $companyName = preg_replace('/[^A-Za-z0-9_\x{0600}-\x{06FF}-]/u', '_', $this->data['company_name']); + return "{$toolName}_{$companyName}_Results_{$this->language}.pdf"; + } + + private function getChromePath(): ?string + { + $paths = ['/usr/bin/google-chrome-stable', '/usr/bin/google-chrome', '/usr/bin/chromium-browser', '/usr/bin/chromium', '/snap/bin/chromium', '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', '/Applications/Chromium.app/Contents/MacOS/Chromium']; + if (PHP_OS_FAMILY === 'Windows') { + $paths[] = 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe'; + $paths[] = 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe'; + } + foreach ($paths as $path) { + if (file_exists($path) && is_executable($path)) return $path; + } + return null; + } +} diff --git a/app/Services/AssessmentPDFService2.php b/app/Services/AssessmentPDFService2.php new file mode 100644 index 000000000..b7f1cc893 --- /dev/null +++ b/app/Services/AssessmentPDFService2.php @@ -0,0 +1,512 @@ +language = $language; + $this->isArabic = $language === 'ar'; + $this->initializeTranslations(); + + $this->data = [ + 'tool_id' => null, + 'tool_name' => '', + 'assessment_title' => '', + 'company_name' => '', + 'assessment_name' => '', + 'assessment_email' => '', + 'completion_date' => '', + 'overall_percentage' => 0, + 'certification_level' => '', + 'certification_color' => '', + 'certification_text' => '', + 'total_criteria' => 0, + 'applicable_criteria' => 0, + 'yes_count' => 0, + 'no_count' => 0, + 'na_count' => 0, + 'domain_results' => [] + ]; + } + + private function initializeTranslations(): void + { + $this->translations = [ + 'en' => [ + 'assessment_results' => 'Assessment Results', + 'report_for' => 'Report For', + 'completed_on' => 'Completed on', + 'assessment_completed_by' => 'Assessment completed by', + 'for' => 'for', + 'domain_performance_overview' => 'Domain Performance', + 'performance_analysis' => 'Performance Analysis', + 'response_breakdown' => 'Response Breakdown', + 'this_domain_achieved' => 'This domain achieved a score of', + 'which_is_considered' => 'which is considered', + 'recommendation' => 'Recommendation', + 'yes' => 'Yes', + 'no' => 'No', + 'not_applicable' => 'Not Applicable', + 'na' => 'N/A', + 'contact_us_prompt' => 'For more information: Contact Us', + 'overall_score' => 'Overall Score', + 'assessment_report' => 'Assessment Report', + 'comprehensive_assessment' => 'Comprehensive Assessment', + 'detailed_analysis_report' => 'Detailed analysis report based on the Abdaliyah Quartet standards.', + 'prepared_for' => 'Prepared For', + 'confidential_report' => 'Confidential Report', + ], + 'ar' => [ + 'assessment_results' => 'نتائج التقييم', + 'report_for' => 'تقرير لـ', + 'completed_on' => 'اكتمل في', + 'assessment_completed_by' => 'تم إكمال التقييم بواسطة', + 'for' => 'لـ', + 'domain_performance_overview' => 'أداء المجالات', + 'performance_analysis' => 'تحليل الأداء', + 'response_breakdown' => 'تفصيل الإجابات', + 'this_domain_achieved' => 'حقق هذا المجال نتيجة', + 'which_is_considered' => 'والتي تعتبر', + 'recommendation' => 'التوصية', + 'yes' => 'نعم', + 'no' => 'لا', + 'not_applicable' => 'غير قابل للتطبيق', + 'na' => 'غ/م', + 'contact_us_prompt' => 'لمزيد من المعلومات: اتصل بنا', + 'overall_score' => 'النتيجة الإجمالية', + 'assessment_report' => 'تقرير التقييم', + 'comprehensive_assessment' => 'تقييم شامل', + 'detailed_analysis_report' => 'تقرير تحليل مفصل بناءً على معايير الرباعية العبدلية.', + 'prepared_for' => 'مُعد لـ', + 'confidential_report' => 'تقرير سري', + ] + ]; + } + + private function t(string $key): string + { + return $this->translations[$this->language][$key] ?? $key; + } + + public function setLogoPath(?string $path): void + { + if ($path && file_exists($path)) { + $this->logoPath = $path; + } + } + + public function setWhiteLogoPath(?string $path): void + { + if ($path && file_exists($path)) { + $this->whiteLogoPath = $path; + } + } + + public function setAssessmentData($assessment, $results, $user = null): void + { + $certificationInfo = $this->getCertificationInfo($assessment->tool_id, $results['overall_percentage'] ?? 0); + $toolName = $this->isArabic ? ($assessment->tool->name_ar ?? 'أداة التقييم') : ($assessment->tool->name_en ?? 'Assessment Tool'); + $assessmentTitle = $this->isArabic ? ($assessment->title_ar ?? $this->t('assessment_results')) : ($assessment->title_en ?? $this->t('assessment_results')); + + $this->data = [ + 'tool_id' => $assessment->tool_id, + 'tool_name' => $toolName, + 'assessment_title' => $assessmentTitle, + 'company_name' => $user->organization->name ?? $assessment->organization ?? ($this->isArabic ? 'مؤسستك' : 'Your Organization'), + 'assessment_name' => $assessment->name, + 'assessment_email' => $assessment->email, + 'completion_date' => $this->formatDate($assessment->completed_at ?? now()), + 'overall_percentage' => $results['overall_percentage'] ?? 0, + 'certification_level' => $certificationInfo['level'], + 'certification_color' => $certificationInfo['color'], + 'certification_text' => $certificationInfo['text'], + 'total_criteria' => $results['total_criteria'] ?? 0, + 'applicable_criteria' => $results['applicable_criteria'] ?? 0, + 'yes_count' => $results['yes_count'] ?? 0, + 'no_count' => $results['no_count'] ?? 0, + 'na_count' => $results['na_count'] ?? 0, + 'domain_results' => $results['domain_results'] ?? [] + ]; + } + + private function formatDate($date): string + { + if (!$date) $date = now(); + $datetime = $date instanceof \DateTime ? $date : new \DateTime($date); + return $this->isArabic ? \IntlDateFormatter::formatObject($datetime, 'd MMMM yyyy', 'ar_SA') : $datetime->format('F j, Y'); + } + + public function generatePDF(): Response + { + $html = $this->buildCompleteHTML(); + $pdf = $this->createPdfFromHtml($html); + $filename = $this->generateFilename(); + + return response($pdf, 200, [ + 'Content-Type' => 'application/pdf', + 'Content-Disposition' => "attachment; filename=\"{$filename}\"" + ]); + } + + public function savePDF(string $filename = null): string + { + $filename = $filename ?? $this->generateFilename(); + $html = $this->buildCompleteHTML(); + $pdf = $this->createPdfFromHtml($html); + + Storage::disk('public')->put("pdfs/{$filename}", $pdf); + return "pdfs/{$filename}"; + } + + public function generatePreview(): string + { + return $this->buildCompleteHTML(); + } + + private function createPdfFromHtml(string $html): string + { + try { + return Browsershot::html($html) + ->format('A4') + ->margins(0, 0, 0, 0) + ->printBackground() + ->waitUntilNetworkIdle() + ->timeout(120) + ->setDelay(1000) + ->emulateMedia('print') + ->setOption('addStyleTag', json_encode(['content' => 'body { -webkit-print-color-adjust: exact; }'])) + ->setOption('args', ['--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage']) + ->pdf(); + } catch (\Exception $e) { + throw new \Exception("Failed to generate PDF: " . $e->getMessage()); + } + } + + private function buildCompleteHTML(): string + { + $lang = $this->language; + $dir = $this->isArabic ? 'rtl' : 'ltr'; + $css = $this->getAdvancedCSS(); + + $pages = []; + $pages[] = $this->generateCoverPage(); + // Add other pages back in as needed + // $pages[] = $this->generateSummaryPage(); + // ... loop for domain pages ... + // $pages[] = $this->generateContactPage(); + + $htmlContent = implode('', $pages); + + return "{$this->data['tool_name']} {$this->t('assessment_results')}{$htmlContent}"; + } + + private function getAdvancedCSS(): string + { + $fontFamily = $this->isArabic ? "'Amiri', 'Noto Sans Arabic', sans-serif" : "'Poppins', 'Calibri', sans-serif"; + $textAlign = $this->isArabic ? 'right' : 'left'; + + return " + @import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Noto+Sans+Arabic:wght@400;600;700&display=swap'); + @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap'); + + * { margin: 0; padding: 0; box-sizing: border-box; } + html, body { height: 100%; } + body { font-family: {$fontFamily}; font-size: 14px; line-height: 1.6; color: #333; background: white; } + + .page { width: 8.5in; min-height: 11in; margin: 0; background: white; position: relative; page-break-after: always; overflow: hidden; } + .page:last-child { page-break-after: avoid; } + .page.full-bleed { padding: 0 !important; } + + .cover-page-content { + display: flex; + flex-direction: column; + height: 100%; + position: relative; + color: #0d2a4c; + background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); + overflow: hidden; + } + + .cover-graphic { + position: absolute; + top: 0; + right: 0; + width: 65%; + height: 100%; + object-fit: cover; + opacity: 0.07; + z-index: 0; + filter: grayscale(100%) contrast(1.1); /* ENHANCEMENT: Grayscale for subtlety */ + } + + html[dir='rtl'] .cover-graphic { + right: auto; + left: 0; + } + + .cover-page-content > * { + z-index: 2; + position: relative; + } + + .cover-header { + display: flex; + justify-content: space-between; + align-items: flex-start; + padding: 40px 50px; + border-bottom: 1px solid #e2e8f0; + } + + .cover-logo { + max-width: 150px; + height: auto; + transition: transform 0.3s ease; /* ENHANCEMENT: Smooth hover effect for preview */ + } + .cover-logo:hover { + transform: scale(1.05); + } + + .cover-date { + font-size: 14px; + font-weight: 500; + color: #475569; + background: white; + padding: 8px 16px; + border-radius: 8px; + border: 1px solid #e2e8f0; + box-shadow: 0 4px 6px rgba(0,0,0,0.05); + } + + .cover-main { + flex-grow: 1; + display: flex; + align-items: center; + padding: 40px 50px; + } + + .cover-subtitle { + font-size: 16px; + font-weight: 500; + color: #3b82f6; /* A brighter blue for accent */ + margin-bottom: 8px; + text-transform: uppercase; + letter-spacing: 0.5px; + } + + .cover-main h1 { + font-size: 48px; + font-weight: 700; + line-height: 1.2; + margin: 0; + color: #0d2a4c; + text-shadow: 0 1px 2px rgba(255,255,255,0.5); + max-width: 60%; + } + + .cover-description { + font-size: 16px; + color: #475569; + margin-top: 16px; + max-width: 55%; + line-height: 1.7; + } + + .cover-footer { + padding: 30px 50px; + border-top: 1px solid #e2e8f0; + } + + .footer-label { + font-size: 14px; + font-weight: 500; + color: #64748b; + margin-bottom: 4px; + } + + .company-name { + font-size: 24px; + font-weight: 600; + color: #0d2a4c; + } + + .footer-meta { + /* ENHANCEMENT: Flexbox for clean alignment */ + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 20px; + font-size: 12px; + color: #94a3b8; + } + + /* Accent elements for a sharp, geometric look */ + .cover-accent-dot { + position: absolute; + width: 8px; height: 8px; + background: #3b82f6; + border-radius: 50%; + top: 50px; + right: 50px; + z-index: 3; + } + html[dir='rtl'] .cover-accent-dot { + right: auto; + left: 50px; + } + + .cover-accent-line { + position: absolute; + width: 100px; height: 1px; + background: linear-gradient(to right, #3b82f6, transparent); + top: 53px; + right: 65px; + z-index: 3; + } + html[dir='rtl'] .cover-accent-line { + right: auto; + left: 65px; + background: linear-gradient(to left, #3b82f6, transparent); + } + "; + } + + private function generateCoverPage(): string + { + $logoHtml = $this->getLogoHtml('cover-logo'); + $backgroundGraphicHtml = $this->getBackgroundImageHtml(); + + $date = $this->data['completion_date'] ? new \DateTime($this->data['completion_date']) : new \DateTime(); + $formattedDate = $this->formatDate($date); + + $currentYear = date('Y'); + + return " +
+
+ " . $backgroundGraphicHtml . " + +
+
+ +
+ " . $logoHtml . " +
{$formattedDate}
+
+ +
+
+
" . $this->t('comprehensive_assessment') . "
+

{$this->data['tool_name']}

+
" . $this->t('detailed_analysis_report') . "
+
+
+ +
+
" . $this->t('prepared_for') . "
+
{$this->data['company_name']}
+
+ " . $this->t('confidential_report') . " + © {$currentYear} +
+
+
+
"; + } + + private function getBackgroundImageHtml(): string + { + $path = storage_path('app/public/waves.png'); + if (file_exists($path)) { + $type = pathinfo($path, PATHINFO_EXTENSION); + $data = file_get_contents($path); + $base64 = 'data:image/' . $type . ';base64,' . base64_encode($data); + return "Background Graphic"; + } + return ''; + } + + private function getLogoHtml(string $class = 'logo'): string + { + if ($this->logoPath && file_exists($this->logoPath)) { + $type = pathinfo($this->logoPath, PATHINFO_EXTENSION); + $data = file_get_contents($this->logoPath); + $base64 = 'data:image/' . ($type === 'svg' ? 'svg+xml' : $type) . ';base64,' . base64_encode($data); + return "Company Logo"; + } + return ''; + } + + private function getWhiteLogoHtml(string $class = 'contact-logo'): string + { + $path = $this->whiteLogoPath ?? $this->logoPath; + if ($path && file_exists($path)) { + $type = pathinfo($path, PATHINFO_EXTENSION); + $data = file_get_contents($path); + $base64 = 'data:image/' . ($type === 'svg' ? 'svg+xml' : $type) . ';base64,' . base64_encode($data); + return "Company Logo"; + } + return ''; + } + + private function getCertificationInfo(int $toolId, float $percentage): array + { + $tool = Tool::find($toolId); + if (!$tool) return ['level' => 'unknown', 'color' => '#6c757d', 'text' => 'Tool Not Found', 'recommendation' => '']; + $level = $tool->getPerformanceByScore($percentage); + if (!$level) return ['level' => 'unclassified', 'color' => '#6c757d', 'text' => 'Unclassified', 'recommendation' => '']; + return [ + 'level' => $level->code, 'color' => $level->color, + 'text' => $this->isArabic ? $level->text_ar : $level->text_en, + 'recommendation' => $this->isArabic ? $level->recommendation_ar : $level->recommendation_en + ]; + } + + private function getScoreColor(int $toolId, float $percentage): string + { + return $this->getCertificationInfo($toolId, $percentage)['color'] ?? '#6c757d'; + } + + private function getPerformanceLevel(int $toolId, float $percentage): string + { + return $this->getCertificationInfo($toolId, $percentage)['text'] ?? 'Unclassified'; + } + + private function getPerformanceRecommendation(int $toolId, float $percentage): string + { + return $this->getCertificationInfo($toolId, $percentage)['recommendation'] ?? ''; + } + + private function generateFilename(): string + { + $toolName = preg_replace('/[^A-Za-z0-9_\x{0600}-\x{06FF}-]/u', '_', $this->data['tool_name']); + $companyName = preg_replace('/[^A-Za-z0-9_\x{0600}-\x{06FF}-]/u', '_', $this->data['company_name']); + return "{$toolName}_{$companyName}_Results_{$this->language}.pdf"; + } + + private function getChromePath(): ?string + { + $paths = ['/usr/bin/google-chrome-stable', '/usr/bin/google-chrome', '/usr/bin/chromium-browser', '/usr/bin/chromium', '/snap/bin/chromium', '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', '/Applications/Chromium.app/Contents/MacOS/Chromium']; + if (PHP_OS_FAMILY === 'Windows') { + $paths[] = 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe'; + $paths[] = 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe'; + } + foreach ($paths as $path) { + if (file_exists($path) && is_executable($path)) return $path; + } + return null; + } +} diff --git a/app/Services/AssessmentReportService.php b/app/Services/AssessmentReportService.php new file mode 100644 index 000000000..c49a4e799 --- /dev/null +++ b/app/Services/AssessmentReportService.php @@ -0,0 +1,523 @@ + 'arabic', + 'template' => 'comprehensive', + 'include_charts' => true, + 'include_recommendations' => true, + 'watermark' => false, + 'orientation' => 'portrait', + 'format' => 'A4' + ]; + + $settings = array_merge($defaultSettings, $settings); + $isArabic = $settings['language'] === 'arabic'; + + // Load assessment with all relationships + $assessment->load([ + 'tool.domains.categories.criteria', + 'responses.criterion.category.domain', + 'results' + ]); + + // Calculate results if not already done + if ($assessment->results->isEmpty()) { + $assessment->calculateResults(); + $assessment->refresh(); + } + + // Get structured results + $results = $this->getStructuredResults($assessment); + + // Determine certification based on tool configuration + $certification = $this->determineCertification($results['overall_percentage'], $assessment->tool); + + // Generate recommendations if enabled + $recommendations = $settings['include_recommendations'] + ? $this->generateSmartRecommendations($results, $assessment->tool, $isArabic) + : []; + + // Prepare template data + $templateData = [ + 'assessment' => $assessment, + 'results' => $results, + 'certification' => $certification, + 'recommendations' => $recommendations, + 'settings' => $settings, + 'isArabic' => $isArabic, + 'generatedAt' => now(), + ]; + + // Generate HTML + $html = $this->generateHTML($templateData, $settings); + + // Create PDF + return $this->createPDF($html, $settings); + } + + /** + * Get structured results that work with any tool configuration + */ + private function getStructuredResults(Assessment $assessment): array + { + $tool = $assessment->tool; + $results = $assessment->getResults(); + + // Calculate domain-specific metrics + $domainMetrics = []; + foreach ($results['domain_results'] as $domainResult) { + $domain = $tool->domains->find($domainResult['domain_id']); + + $domainMetrics[] = [ + 'domain_id' => $domainResult['domain_id'], + 'domain_name_en' => $domain->getName('en'), + 'domain_name_ar' => $domain->getName('ar'), + 'score_percentage' => $domainResult['score_percentage'], + 'total_criteria' => $domainResult['total_criteria'], + 'applicable_criteria' => $domainResult['applicable_criteria'], + 'yes_count' => $domainResult['yes_count'], + 'no_count' => $domainResult['no_count'], + 'na_count' => $domainResult['na_count'], + 'weighted_score' => $domainResult['weighted_score'], + 'categories' => $this->getCategoryBreakdown($domain, $results['category_results'][$domainResult['domain_id']] ?? []) + ]; + } + + return [ + 'assessment_info' => [ + 'id' => $assessment->id, + 'assessor_name' => $assessment->getAssessorName(), + 'assessor_email' => $assessment->getAssessorEmail(), + 'organization' => $assessment->organization, + 'status' => $assessment->status, + 'created_at' => $assessment->created_at, + 'completed_at' => $assessment->completed_at, + 'is_guest' => $assessment->isGuestAssessment(), + ], + 'tool_info' => [ + 'id' => $tool->id, + 'name_en' => $tool->getName('en'), + 'name_ar' => $tool->getName('ar'), + 'description_en' => $tool->getDescription('en'), + 'description_ar' => $tool->getDescription('ar'), + 'total_domains' => $tool->domains->count(), + 'total_criteria' => $tool->getCriteriaCount(), + ], + 'overall_percentage' => $results['overall_percentage'], + 'total_criteria' => $results['total_criteria'], + 'applicable_criteria' => $results['applicable_criteria'], + 'yes_count' => $results['yes_count'], + 'no_count' => $results['no_count'], + 'na_count' => $results['na_count'], + 'domain_results' => $domainMetrics, + 'summary_stats' => $this->calculateSummaryStats($results, $tool), + ]; + } + + /** + * Get category breakdown for a domain + */ + private function getCategoryBreakdown($domain, array $categoryResults): array + { + $breakdown = []; + + foreach ($categoryResults as $categoryResult) { + $category = $domain->categories->find($categoryResult['category_id']); + if ($category) { + $breakdown[] = [ + 'category_id' => $categoryResult['category_id'], + 'category_name_en' => $category->getName('en'), + 'category_name_ar' => $category->getName('ar'), + 'score_percentage' => $categoryResult['score_percentage'], + 'applicable_criteria' => $categoryResult['applicable_criteria'], + 'yes_count' => $categoryResult['yes_count'], + 'no_count' => $categoryResult['no_count'], + 'na_count' => $categoryResult['na_count'], + ]; + } + } + + return $breakdown; + } + + /** + * Calculate summary statistics + */ + private function calculateSummaryStats(array $results, Tool $tool): array + { + $totalResponses = $results['yes_count'] + $results['no_count'] + $results['na_count']; + $completionRate = $totalResponses > 0 ? ($results['applicable_criteria'] / $totalResponses) * 100 : 0; + $successRate = $results['applicable_criteria'] > 0 ? ($results['yes_count'] / $results['applicable_criteria']) * 100 : 0; + + // Find strongest and weakest domains + $domainScores = collect($results['domain_results'])->sortByDesc('score_percentage'); + $strongestDomain = $domainScores->first(); + $weakestDomain = $domainScores->last(); + + return [ + 'completion_rate' => round($completionRate, 1), + 'success_rate' => round($successRate, 1), + 'response_distribution' => [ + 'yes_percentage' => $totalResponses > 0 ? round(($results['yes_count'] / $totalResponses) * 100, 1) : 0, + 'no_percentage' => $totalResponses > 0 ? round(($results['no_count'] / $totalResponses) * 100, 1) : 0, + 'na_percentage' => $totalResponses > 0 ? round(($results['na_count'] / $totalResponses) * 100, 1) : 0, + ], + 'strongest_domain' => [ + 'name' => $strongestDomain['domain_name'], + 'score' => $strongestDomain['score_percentage'] + ], + 'weakest_domain' => [ + 'name' => $weakestDomain['domain_name'], + 'score' => $weakestDomain['score_percentage'] + ], + 'domains_above_80' => $domainScores->filter(fn($d) => $d['score_percentage'] >= 80)->count(), + 'domains_below_60' => $domainScores->filter(fn($d) => $d['score_percentage'] < 60)->count(), + ]; + } + + /** + * Determine certification level based on tool-specific thresholds + */ + private function determineCertification(float $overallScore, Tool $tool): array + { + // This could be enhanced to read from tool configuration + // For now, using standard thresholds + if ($overallScore >= 90) { + return [ + 'level' => 'full', + 'text_en' => 'Full Certification', + 'text_ar' => 'اعتماد كامل', + 'color' => '#22c55e', + 'bg_color' => '#dcfce7', + 'icon' => 'check-circle' + ]; + } elseif ($overallScore >= 80) { + return [ + 'level' => 'conditional', + 'text_en' => 'Conditional Certification', + 'text_ar' => 'اعتماد مشروط', + 'color' => '#f59e0b', + 'bg_color' => '#fef3c7', + 'icon' => 'alert-triangle' + ]; + } elseif ($overallScore >= 70) { + return [ + 'level' => 'improvement_needed', + 'text_en' => 'Improvement Needed', + 'text_ar' => 'يحتاج تحسين', + 'color' => '#f97316', + 'bg_color' => '#fed7aa', + 'icon' => 'alert-circle' + ]; + } else { + return [ + 'level' => 'insufficient', + 'text_en' => 'Insufficient', + 'text_ar' => 'غير كافي', + 'color' => '#ef4444', + 'bg_color' => '#fee2e2', + 'icon' => 'x-circle' + ]; + } + } + + /** + * Generate smart recommendations based on results + */ + private function generateSmartRecommendations(array $results, Tool $tool, bool $isArabic): array + { + $recommendations = []; + + // Priority recommendations based on domain scores + foreach ($results['domain_results'] as $domain) { + if ($domain['score_percentage'] < 70) { + $priority = $domain['score_percentage'] < 50 ? 'critical' : 'high'; + + $recommendations[] = [ + 'domain' => $isArabic ? $domain['domain_name_ar'] : $domain['domain_name_en'], + 'priority' => $priority, + 'score' => $domain['score_percentage'], + 'type' => 'domain_improvement', + 'title' => $isArabic + ? "تطوير {$domain['domain_name_ar']}" + : "Improve {$domain['domain_name_en']}", + 'description' => $this->getRecommendationText($domain, $isArabic), + 'actions' => $this->getActionItems($domain, $isArabic), + 'timeline' => $this->getRecommendedTimeline($domain['score_percentage']), + ]; + } + } + + // Add strategic recommendations + if ($results['overall_percentage'] < 80) { + $recommendations[] = [ + 'type' => 'strategic', + 'priority' => 'medium', + 'title' => $isArabic ? 'وضع خطة تحسين شاملة' : 'Develop Comprehensive Improvement Plan', + 'description' => $isArabic + ? 'ننصح بوضع خطة تحسين متكاملة تشمل جميع المجالات التي تحتاج تطوير' + : 'We recommend developing an integrated improvement plan covering all areas needing development', + 'timeline' => '3-6 months' + ]; + } + + // Add success reinforcement recommendations + $strongDomains = collect($results['domain_results'])->filter(fn($d) => $d['score_percentage'] >= 85); + if ($strongDomains->isNotEmpty()) { + $recommendations[] = [ + 'type' => 'reinforcement', + 'priority' => 'low', + 'title' => $isArabic ? 'الحفاظ على نقاط القوة' : 'Maintain Strengths', + 'description' => $isArabic + ? 'المحافظة على الأداء المتميز في المجالات القوية ومشاركة أفضل الممارسات' + : 'Maintain excellent performance in strong areas and share best practices', + 'timeline' => 'Ongoing' + ]; + } + + return $recommendations; + } + + /** + * Get recommendation text for a domain + */ + private function getRecommendationText(array $domain, bool $isArabic): string + { + $score = $domain['score_percentage']; + $domainName = $isArabic ? $domain['domain_name_ar'] : $domain['domain_name_en']; + + if ($score < 50) { + return $isArabic + ? "يتطلب {$domainName} إعادة هيكلة شاملة وتطوير أساسي. النتيجة الحالية {$score}% تشير إلى ضرورة اتخاذ إجراءات عاجلة." + : "{$domainName} requires comprehensive restructuring and fundamental development. Current score of {$score}% indicates urgent action needed."; + } elseif ($score < 70) { + return $isArabic + ? "يحتاج {$domainName} إلى تحسينات متوسطة وتطوير العمليات. النتيجة الحالية {$score}% قابلة للتحسن بجهود مركزة." + : "{$domainName} needs moderate improvements and process development. Current score of {$score}% can be improved with focused efforts."; + } else { + return $isArabic + ? "يمكن تطوير {$domainName} أكثر من خلال تحسينات طفيفة. النتيجة الحالية {$score}% جيدة ولكن قابلة للتحسن." + : "{$domainName} can be further developed through minor improvements. Current score of {$score}% is good but can be enhanced."; + } + } + + /** + * Get specific action items for domain improvement + */ + private function getActionItems(array $domain, bool $isArabic): array + { + $score = $domain['score_percentage']; + + if ($score < 50) { + return $isArabic ? [ + 'إجراء تقييم شامل للوضع الحالي', + 'وضع خطة إعادة هيكلة مفصلة', + 'تخصيص موارد كافية للتطوير', + 'تدريب الفريق على المهارات الأساسية', + 'وضع نظام مراقبة ومتابعة دقيق' + ] : [ + 'Conduct comprehensive current state assessment', + 'Develop detailed restructuring plan', + 'Allocate sufficient resources for development', + 'Train team on fundamental skills', + 'Implement precise monitoring and follow-up system' + ]; + } elseif ($score < 70) { + return $isArabic ? [ + 'تحليل الفجوات الحالية', + 'تطوير العمليات والإجراءات', + 'تحسين التدريب والتطوير', + 'تعزيز آليات المتابعة' + ] : [ + 'Analyze current gaps', + 'Develop processes and procedures', + 'Improve training and development', + 'Enhance follow-up mechanisms' + ]; + } else { + return $isArabic ? [ + 'مراجعة العمليات الحالية', + 'تطبيق أفضل الممارسات', + 'التحسين المستمر' + ] : [ + 'Review current processes', + 'Apply best practices', + 'Continuous improvement' + ]; + } + } + + /** + * Get recommended timeline based on score + */ + private function getRecommendedTimeline(float $score): string + { + if ($score < 50) return '6-12 months'; + if ($score < 70) return '3-6 months'; + return '1-3 months'; + } + + /** + * Generate HTML content using Blade templates + */ + private function generateHTML(array $data, array $settings): string + { + $template = $settings['template']; + $language = $settings['language'] === 'arabic' ? 'ar' : 'en'; + + $viewPath = "reports.{$template}.{$language}"; + + // Check if specific template exists, fallback to comprehensive + if (!View::exists($viewPath)) { + $viewPath = "reports.comprehensive.{$language}"; + } + + return View::make($viewPath, $data)->render(); + } + + /** + * Create PDF using mPDF with universal settings + */ + private function createPDF(string $html, array $settings): string + { + $isArabic = $settings['language'] === 'arabic'; + + $config = [ + 'mode' => 'utf-8', + 'format' => $settings['format'] ?? 'A4', + 'orientation' => $settings['orientation'] ?? 'portrait', + 'default_font_size' => 11, + 'default_font' => $isArabic ? 'almarai' : 'dejavusans', + 'margin_left' => 15, + 'margin_right' => 15, + 'margin_top' => 20, + 'margin_bottom' => 20, + 'margin_header' => 10, + 'margin_footer' => 10, + 'autoScriptToLang' => true, + 'autoLangToFont' => true, + 'dir' => $isArabic ? 'rtl' : 'ltr', + 'useSubstitutions' => true, + 'simpleTables' => true, + 'packTableData' => true, + 'useKerning' => true, + 'useOTL' => 0xFF, + 'useCSS' => true, + ]; + + $mpdf = new Mpdf($config); + + // Set document properties + $mpdf->SetTitle($isArabic ? 'تقرير التقييم' : 'Assessment Report'); + $mpdf->SetAuthor('Assessment System'); + $mpdf->SetCreator('Assessment Report Generator'); + + // Add watermark if requested + if ($settings['watermark']) { + $mpdf->SetWatermarkText($isArabic ? 'سري' : 'CONFIDENTIAL'); + $mpdf->watermark_font = $isArabic ? 'almarai' : 'dejavusans'; + $mpdf->watermarkTextAlpha = 0.1; + $mpdf->showWatermarkText = true; + } + + // Write HTML content + $mpdf->WriteHTML($html); + + return $mpdf->Output('', 'S'); // Return as string + } + + /** + * Save report to storage (optional) + */ + public function saveReport(Assessment $assessment, string $pdfContent, array $settings): string + { + $filename = $this->generateFilename($assessment, $settings); + $path = "reports/{$assessment->id}/{$filename}"; + + Storage::disk('private')->put($path, $pdfContent); + + return $path; + } + + /** + * Generate appropriate filename + */ + private function generateFilename(Assessment $assessment, array $settings): string + { + $assessorName = str_replace([' ', '.', '/', '\\'], '_', $assessment->getAssessorName()); + $toolName = str_replace([' ', '.', '/', '\\'], '_', $assessment->tool->getName('en')); + $date = $assessment->created_at->format('Y-m-d'); + $language = $settings['language']; + $template = $settings['template']; + + return "assessment_report_{$toolName}_{$assessorName}_{$date}_{$language}_{$template}.pdf"; + } + + /** + * Get chart data for visualizations + */ + public function getChartData(Assessment $assessment): array + { + $results = $this->getStructuredResults($assessment); + + return [ + 'domain_scores' => collect($results['domain_results'])->map(function ($domain) { + return [ + 'name' => $domain['domain_name_en'], + 'name_ar' => $domain['domain_name_ar'], + 'score' => $domain['score_percentage'], + 'color' => $this->getDomainColor($domain['domain_id']) + ]; + })->toArray(), + + 'response_distribution' => [ + 'yes' => $results['yes_count'], + 'no' => $results['no_count'], + 'na' => $results['na_count'] + ], + + 'progress_indicators' => [ + 'completion_rate' => $results['summary_stats']['completion_rate'], + 'success_rate' => $results['summary_stats']['success_rate'], + 'overall_score' => $results['overall_percentage'] + ] + ]; + } + + /** + * Get color for domain visualization + */ + private function getDomainColor(int $domainIndex): string + { + $colors = [ + '#3b82f6', // Blue + '#ef4444', // Red + '#f97316', // Orange + '#22c55e', // Green + '#8b5cf6', // Purple + '#06b6d4', // Cyan + '#f59e0b', // Amber + '#10b981', // Emerald + '#6366f1', // Indigo + '#ec4899', // Pink + ]; + + return $colors[$domainIndex % count($colors)]; + } +} diff --git a/app/Services/GartnerPDFGenerator.php b/app/Services/GartnerPDFGenerator.php new file mode 100644 index 000000000..cce675a40 --- /dev/null +++ b/app/Services/GartnerPDFGenerator.php @@ -0,0 +1,936 @@ +set([ + 'isRemoteEnabled' => true, // Allow external resources + 'isHtml5ParserEnabled' => true, // Better HTML parsing + 'isFontSubsettingEnabled' => true, // Optimize fonts + 'defaultFont' => 'DejaVu Sans', // Reliable default font + 'dpi' => 96, // Standard web DPI + 'fontHeightRatio' => 1.1, // Better line spacing + 'debugKeepTemp' => false, // Set true for debugging + 'chroot' => realpath(''), // Security measure + ]); + + $this->dompdf = new Dompdf($options); + + // Sample data structure matching the original document + $this->data = [ + 'title' => 'The CMO Value Playbook', + 'subtitle' => '5 strategies to boost influence and showcase marketing\'s value', + 'statistics' => [ + 'unable_to_prove' => 48, + 'able_to_prove' => 52, + 'cfo_skeptical' => 40, + 'ceo_skeptical' => 39 + ], + 'steps' => [ + [ + 'number' => 1, + 'title' => 'Focus on marketing\'s long-term, holistic impact', + 'metrics' => [ + 'holistic_long_term' => 68, + 'holistic_short_term' => 51, + 'individual_long_term' => 49, + 'individual_short_term' => 30 + ] + ], + [ + 'number' => 2, + 'title' => 'Build a narrative about marketing\'s value for all stakeholders', + 'description' => 'CEOs and CFOs are the most skeptical of marketing\'s value.' + ], + [ + 'number' => 3, + 'title' => 'Increase variety and sophistication of metric types', + 'metrics' => [ + 'no_high_complexity' => 37, + 'high_complexity' => 56 + ] + ], + [ + 'number' => 4, + 'title' => 'Expand leadership involvement in D&A activity', + 'description' => 'More leadership participation in D&A activity is advantageous.' + ], + [ + 'number' => 5, + 'title' => 'Invest in marketing talent to close gaps', + 'barriers' => [ + 'soft_skills' => 39, + 'analytical_talent' => 34, + 'technical_talent' => 33 + ] + ] + ] + ]; + } + + /** + * Generate the complete PDF document + */ + public function generate() + { + $html = $this->buildCompleteHTML(); + + $this->dompdf->loadHtml($html); + $this->dompdf->setPaper('A4', 'portrait'); + $this->dompdf->render(); + + return $this->dompdf->output(); + } + + /** + * Build the complete HTML structure + */ + private function buildCompleteHTML() + { + $css = $this->getStyles(); + $coverPage = $this->getCoverPage(); + $summaryPage = $this->getSummaryPage(); + $contentPages = $this->getContentPages(); + + return " + + + + + {$this->data['title']} + + + + {$coverPage} +
+ {$summaryPage} + {$contentPages} + + "; + } + + /** + * Professional CSS styling optimized for DomPDF + */ + private function getStyles() + { + return " + /* Base styles optimized for DomPDF */ + * { + margin: 0; + padding: 0; + box-sizing: border-box; + } + + body { + font-family: 'DejaVu Sans', Arial, sans-serif; + font-size: 12px; + line-height: 1.4; + color: #333; + } + + .page-break { + page-break-before: always; + } + + /* Cover Page Styles */ + .cover-page { + height: 100vh; + background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%); + background-color: #1a237e; /* Fallback for DomPDF */ + color: white; + position: relative; + padding: 60px 40px; + } + + .cover-network { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDYwMCA4MDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGRlZnM+CiAgICA8ZmlsdGVyIGlkPSJnbG93Ij4KICAgICAgPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMyIgcmVzdWx0PSJjb2xvcmVkQmx1ciIvPgogICAgICA8ZmVNZXJnZT4gCiAgICAgICAgPGZlTWVyZ2VOb2RlIGluPSJjb2xvcmVkQmx1ciIvPgogICAgICAgIDxmZU1lcmdlTm9kZSBpbj0iU291cmNlR3JhcGhpYyIvPiAKICAgICAgPC9mZU1lcmdlPgogICAgPC9maWx0ZXI+CiAgPC9kZWZzPgogIAogIDwhLS0gTmV0d29yayBub2RlcyAtLT4KICA8Y2lyY2xlIGN4PSIxMDAiIGN5PSIxNTAiIHI9IjE1IiBmaWxsPSIjZmZjMTA3IiBmaWx0ZXI9InVybCgjZ2xvdykiLz4KICA8Y2lyY2xlIGN4PSIzMDAiIGN5PSIyMDAiIHI9IjIwIiBmaWxsPSIjZmZjMTA3IiBmaWx0ZXI9InVybCgjZ2xvdykiLz4KICA8Y2lyY2xlIGN4PSI0NTAiIGN5PSIzNTAiIHI9IjI1IiBmaWxsPSIjZmZjMTA3IiBmaWx0ZXI9InVybCgjZ2xvdykiLz4KICA8Y2lyY2xlIGN4PSIyMDAiIGN5PSI0MDAiIHI9IjEyIiBmaWxsPSIjMDBiY2Q0IiBmaWx0ZXI9InVybCgjZ2xvdykiLz4KICA8Y2lyY2xlIGN4PSI1MDAiIGN5PSI1MDAiIHI9IjE4IiBmaWxsPSIjMDBiY2Q0IiBmaWx0ZXI9InVybCgjZ2xvdykiLz4KICA8Y2lyY2xlIGN4PSIzNTAiIGN5PSI2MDAiIHI9IjE1IiBmaWxsPSIjMDBiY2Q0IiBmaWx0ZXI9InVybCgjZ2xvdykiLz4KICAKICA8IS0tIENvbm5lY3RpbmcgbGluZXMgLS0+CiAgPGxpbmUgeDE9IjEwMCIgeTE9IjE1MCIgeDI9IjMwMCIgeTI9IjIwMCIgc3Ryb2tlPSIjNjRiNWY2IiBzdHJva2Utd2lkdGg9IjIiIG9wYWNpdHk9IjAuNyIvPgogIDxsaW5lIHgxPSIzMDAiIHkxPSIyMDAiIHgyPSI0NTAiIHkyPSIzNTAiIHN0cm9rZT0iIzY0YjVmNiIgc3Ryb2tlLXdpZHRoPSIyIiBvcGFjaXR5PSIwLjciLz4KICA8bGluZSB4MT0iMjAwIiB5MT0iNDAwIiB4Mj0iMzUwIiB5Mj0iNjAwIiBzdHJva2U9IiM2NGI1ZjYiIHN0cm9rZS13aWR0aD0iMiIgb3BhY2l0eT0iMC43Ii8+CiAgPGxpbmUgeDE9IjQ1MCIgeTE9IjM1MCIgeDI9IjUwMCIgeTI9IjUwMCIgc3Ryb2tlPSIjNjRiNWY2IiBzdHJva2Utd2lkdGg9IjIiIG9wYWNpdHk9IjAuNyIvPgo8L3N2Zz4='); + background-repeat: no-repeat; + background-position: center; + opacity: 0.3; + } + + .gartner-logo { + font-size: 24px; + font-weight: bold; + margin-bottom: 40px; + } + + .cover-title { + font-size: 48px; + font-weight: bold; + line-height: 1.2; + margin-bottom: 20px; + z-index: 10; + position: relative; + } + + .cover-subtitle { + font-size: 18px; + margin-bottom: 40px; + opacity: 0.9; + z-index: 10; + position: relative; + } + + /* Summary Page */ + .summary-page { + padding: 40px; + } + + .section-title { + font-size: 24px; + font-weight: bold; + color: #1a237e; + margin-bottom: 20px; + } + + .key-stats { + display: table; + width: 100%; + margin: 30px 0; + } + + .stat-row { + display: table-row; + } + + .stat-cell { + display: table-cell; + width: 50%; + padding: 20px; + text-align: center; + } + + .stat-number { + font-size: 36px; + font-weight: bold; + color: #1a237e; + } + + .stat-label { + font-size: 14px; + margin-top: 5px; + } + + /* Steps Overview */ + .steps-overview { + margin: 30px 0; + } + + .step-item { + display: table; + width: 100%; + margin-bottom: 15px; + padding: 15px; + border-left: 4px solid #ffc107; + background: #f8f9fa; + } + + .step-number { + display: table-cell; + width: 40px; + vertical-align: middle; + } + + .step-circle { + width: 30px; + height: 30px; + border-radius: 50%; + background: #ffc107; + color: #1a237e; + text-align: center; + line-height: 30px; + font-weight: bold; + } + + .step-content { + display: table-cell; + padding-left: 15px; + vertical-align: middle; + } + + .step-title { + font-weight: bold; + color: #1a237e; + margin-bottom: 5px; + } + + /* Content Pages */ + .content-page { + padding: 40px; + min-height: 90vh; + } + + .step-header { + display: table; + width: 100%; + margin-bottom: 30px; + } + + .step-indicator { + display: table-cell; + width: 100px; + vertical-align: top; + } + + .step-circles { + display: table; + width: 100%; + } + + .circle { + display: table-cell; + width: 20%; + text-align: center; + } + + .step-circle-large { + width: 40px; + height: 40px; + border-radius: 50%; + margin: 0 auto; + text-align: center; + line-height: 40px; + font-weight: bold; + color: white; + } + + .circle.active .step-circle-large { + background: #ffc107; + color: #1a237e; + } + + .circle.inactive .step-circle-large { + background: #e0e0e0; + color: #999; + } + + .main-content { + display: table-cell; + padding-left: 40px; + vertical-align: top; + } + + .content-title { + font-size: 28px; + font-weight: bold; + color: #1a237e; + margin-bottom: 20px; + } + + /* Charts and Data Visualization */ + .chart-container { + margin: 30px 0; + text-align: center; + } + + .pie-chart { + display: inline-block; + width: 200px; + height: 200px; + border-radius: 50%; + position: relative; + margin: 20px; + } + + .pie-chart.unable-prove { + background: conic-gradient(#1a237e 0% 48%, #ffc107 48% 100%); + background: #1a237e; /* Fallback for DomPDF */ + } + + .chart-label { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + font-size: 24px; + font-weight: bold; + color: white; + } + + .bar-chart { + margin: 20px 0; + padding: 20px; + background: #f8f9fa; + border-radius: 8px; + } + + .bar-item { + display: table; + width: 100%; + margin: 10px 0; + } + + .bar-label { + display: table-cell; + width: 200px; + padding-right: 15px; + vertical-align: middle; + font-weight: 500; + } + + .bar-visual { + display: table-cell; + vertical-align: middle; + } + + .bar-fill { + height: 25px; + background: #1a237e; + border-radius: 4px; + position: relative; + } + + .bar-value { + position: absolute; + right: 10px; + top: 50%; + transform: translateY(-50%); + color: white; + font-weight: bold; + font-size: 12px; + } + + /* Two-column layout using tables */ + .two-column { + display: table; + width: 100%; + margin: 20px 0; + } + + .column { + display: table-cell; + width: 50%; + padding: 0 15px; + vertical-align: top; + } + + .challenge-box { + background: #e3f2fd; + padding: 20px; + border-radius: 8px; + border-left: 4px solid #1976d2; + margin: 15px 0; + } + + .action-box { + background: #fff3e0; + padding: 20px; + border-radius: 8px; + border-left: 4px solid #ffc107; + margin: 15px 0; + } + + .box-title { + font-weight: bold; + color: #1a237e; + margin-bottom: 10px; + } + + /* Stakeholder Template */ + .stakeholder-grid { + display: table; + width: 100%; + border-collapse: collapse; + margin: 20px 0; + } + + .stakeholder-row { + display: table-row; + } + + .stakeholder-cell { + display: table-cell; + border: 1px solid #ddd; + padding: 15px; + text-align: center; + vertical-align: middle; + } + + .stakeholder-header { + background: #1a237e; + color: white; + font-weight: bold; + } + + .sentiment-positive { + background: #4caf50; + color: white; + padding: 5px 10px; + border-radius: 15px; + font-size: 12px; + } + + .sentiment-negative { + background: #f44336; + color: white; + padding: 5px 10px; + border-radius: 15px; + font-size: 12px; + } + + .sentiment-neutral { + background: #ff9800; + color: white; + padding: 5px 10px; + border-radius: 15px; + font-size: 12px; + } + + /* Footer */ + .page-footer { + position: fixed; + bottom: 20px; + right: 40px; + font-size: 10px; + color: #666; + } + + .gartner-branding { + position: fixed; + bottom: 20px; + left: 40px; + font-size: 10px; + color: #1a237e; + font-weight: bold; + } + "; + } + + /** + * Generate the cover page matching Gartner's design + */ + private function getCoverPage() + { + return " +
+
+
Gartner
+
{$this->data['title']}
+
{$this->data['subtitle']}
+
"; + } + + /** + * Generate the summary page with key statistics + */ + private function getSummaryPage() + { + $stats = $this->data['statistics']; + + $html = " +
+
Only half of marketing leaders can prove value and receive credit
+ +

The 2024 Gartner Marketing Analytics and Technology Survey indicates that proving the value of marketing and receiving credit for business outcomes is a common challenge, with nearly half of marketing leaders feeling it's out of reach.

+ +
+
+
+
{$stats['unable_to_prove']}%
+
Unable to prove value and/or don't get credit
+
+
+
{$stats['able_to_prove']}%
+
Able to prove value and get credit
+
+
+
+ +
+
+
{$stats['unable_to_prove']}%
+
+
+ +
5 steps to success for CMOs
+ +
"; + + foreach ($this->data['steps'] as $step) { + $html .= " +
+
+
{$step['number']}
+
+
+
{$step['title']}
+
+
"; + } + + $html .= " +
+
"; + + return $html; + } + + /** + * Generate content pages for each step + */ + private function getContentPages() + { + $html = ''; + + foreach ($this->data['steps'] as $index => $step) { + $html .= '
'; + $html .= $this->getStepPage($step, $index + 1); + } + + return $html; + } + + /** + * Generate individual step page + */ + private function getStepPage($step, $currentStep) + { + $html = " +
+
+
+
"; + + // Generate step indicator circles + for ($i = 1; $i <= 5; $i++) { + $class = ($i == $currentStep) ? 'active' : 'inactive'; + $html .= " +
+
{$i}
+
"; + } + + $html .= " +
+
+
+
{$step['title']}
+
+
"; + + // Add specific content based on step + switch ($currentStep) { + case 1: + $html .= $this->getStep1Content($step); + break; + case 2: + $html .= $this->getStep2Content($step); + break; + case 3: + $html .= $this->getStep3Content($step); + break; + case 4: + $html .= $this->getStep4Content($step); + break; + case 5: + $html .= $this->getStep5Content($step); + break; + } + + $html .= " +
"; + + return $html; + } + + /** + * Step 1 specific content with metrics + */ + private function getStep1Content($step) + { + $metrics = $step['metrics']; + + return " +
+
+
+
The challenge and opportunity
+

CMOs who adopt a long-term, holistic view are more successful in proving marketing's value and gaining credit. In contrast, only 30% of those focusing on short-term initiatives reported success.

+
+
+
+
+
+
Holistic, longer-term focus
+
+
+
{$metrics['holistic_long_term']}%
+
+
+
+
+
Holistic, shorter-term focus
+
+
+
{$metrics['holistic_short_term']}%
+
+
+
+
+
Individual, longer-term focus
+
+
+
{$metrics['individual_long_term']}%
+
+
+
+
+
Individual, shorter-term focus
+
+
+
{$metrics['individual_short_term']}%
+
+
+
+
+
+
"; + } + + /** + * Step 2 content with stakeholder analysis + */ + private function getStep2Content($step) + { + return " +
+
+

{$step['description']}

+

CMOs aiming to foster a strong relationship with their CEO and CFO should understand their main priorities and views on marketing.

+
+
+
+
+
Chief financial officer (CFO)
+
+
+
40%
+
+
+
+
+
Chief executive officer (CEO)
+
+
+
39%
+
+
+
+
+
+
+ +
+
+
Stakeholder
+
CEO
+
CFO
+
BU Heads
+
Sales & Service Heads
+
+
+
Perception of marketing
+
Champion
+
Skeptic
+
Neutral
+
Skeptic
+
+
+
Influence
+
High
+
High
+
High
+
High
+
+
"; + } + + /** + * Step 3 content with metric sophistication + */ + private function getStep3Content($step) + { + $metrics = $step['metrics']; + + return " +
+
+

The 2024 Gartner survey found that using a variety of metrics makes it 26% more likely to prove value and get credit. However, it's not just about variety; it's the quality of the metrics that matters.

+ +
+
The survey assessed marketing leaders' use of three high-complexity metrics:
+
    +
  • Relationship
  • +
  • Return on transactional
  • +
  • Operational
  • +
+
+
+
+
+
+
No high-complexity metrics
+
+
+
{$metrics['no_high_complexity']}%
+
+
+
+
+
At least one high-complexity metric
+
+
+
{$metrics['high_complexity']}%
+
+
+
+
+ +
+ 1.5x more likely to prove value and get credit +
+
+
"; + } + + /** + * Step 4 content + */ + private function getStep4Content($step) + { + return " +
+
+

{$step['description']}

+

CMO and senior marketing leader participation in a high number of D&A activities, particularly managing a D&A function, is vital to proving value and getting credit.

+ +
+
Analytical activities in the survey included:
+
    +
  • Managing a team of marketing data analysts
  • +
  • Creating a marketing dashboard
  • +
  • Building custom reports from raw marketing data
  • +
  • Developing measurement strategies for marketing activities
  • +
  • Synthesizing quantitative data to inform marketing strategies or tactics
  • +
+
+
+
+
+
+
Low number of activities (current role)
+
+
+
44%
+
+
+
+
+
High number of activities (current role)
+
+
+
60%
+
+
+
+
+ +
+ Those who did a high number of activities were 1.4x more likely to be able to prove value and get credit. +
+
+
"; + } + + /** + * Step 5 content with talent gaps + */ + private function getStep5Content($step) + { + $barriers = $step['barriers']; + + return " +
+
+

Talent gaps present the biggest barriers to proving the value of marketing. For CMOs, lacking the right talent affects how the C-suite perceives marketing's value and impacts investment in marketing D&A.

+ +
+
CMOs should develop adaptive capabilities including:
+
    +
  • Soft skills and competencies. Marketing leaders must tell a consistent, credible story to help the CFO understand how budget and talent investment decisions support marketing's purpose, value and ability to drive growth.
  • +
  • Analytical talent. CMOs must invest in continuous training and development to help bridge the analytical talent gap as key to enhancing decision-making capabilities.
  • +
  • Technical talent. CMOs must focus on recruiting and upskilling technical talent capable of leveraging advanced marketing technologies and ensuring seamless data integration.
  • +
+
+
+
+
+
+
Lack of necessary soft skills/competencies
+
+
+
{$barriers['soft_skills']}%
+
+
+
+
+
Lack of analytical talent to analyze data and generate insight
+
+
+
{$barriers['analytical_talent']}%
+
+
+
+
+
Lack of technical talent to integrate and analyze data
+
+
+
{$barriers['technical_talent']}%
+
+
+
+
+
+
"; + } + + /** + * Save PDF to file + */ + public function saveToPDF($filename = 'gartner_cmo_playbook.pdf') + { + $output = $this->generate(); + file_put_contents($filename, $output); + return $filename; + } + + /** + * Output PDF to browser + */ + public function streamToBrowser($filename = 'gartner_cmo_playbook.pdf') + { + $this->dompdf->stream($filename, ['Attachment' => false]); + } +} diff --git a/app/Services/GartnerPDFService.php b/app/Services/GartnerPDFService.php new file mode 100644 index 000000000..7aadcdd32 --- /dev/null +++ b/app/Services/GartnerPDFService.php @@ -0,0 +1,1184 @@ +generatePDF(); + */ + +namespace App\Services; + +use Spatie\Browsershot\Browsershot; +use Illuminate\Support\Facades\Storage; +use Illuminate\Http\Response; + +class GartnerPDFService +{ + private array $data; + + public function __construct() + { + // Sample data structure - in real usage, this would come from your database + // You might inject this through the constructor or load it from a model + $this->data = [ + 'title' => 'The CMO Value Playbook', + 'subtitle' => '5 strategies to boost influence and showcase marketing\'s value', + 'statistics' => [ + 'unable_to_prove' => 48, + 'able_to_prove' => 52, + 'cfo_skeptical' => 40, + 'ceo_skeptical' => 39 + ], + 'steps' => [ + [ + 'number' => 1, + 'title' => 'Focus on marketing\'s long-term, holistic impact', + 'metrics' => [ + 'holistic_long_term' => 68, + 'holistic_short_term' => 51, + 'individual_long_term' => 49, + 'individual_short_term' => 30 + ] + ], + [ + 'number' => 2, + 'title' => 'Build a narrative about marketing\'s value for all stakeholders', + 'description' => 'CEOs and CFOs are the most skeptical of marketing\'s value.' + ], + [ + 'number' => 3, + 'title' => 'Increase variety and sophistication of metric types', + 'metrics' => [ + 'no_high_complexity' => 37, + 'high_complexity' => 56 + ] + ], + [ + 'number' => 4, + 'title' => 'Expand leadership involvement in D&A activity', + 'description' => 'More leadership participation in D&A activity is advantageous.' + ], + [ + 'number' => 5, + 'title' => 'Invest in marketing talent to close gaps', + 'barriers' => [ + 'soft_skills' => 39, + 'analytical_talent' => 34, + 'technical_talent' => 33 + ] + ] + ] + ]; + } + + /** + * Generate PDF and return as download response + * This method orchestrates the entire PDF generation process + */ + public function generatePDF(): Response + { + // Generate the complete HTML content + $html = $this->buildCompleteHTML(); + + try { + // Create Browsershot instance with proper timeout and paper size settings + $browsershot = Browsershot::html($html) + ->format('A4') // Use standard A4 format instead of custom dimensions + ->margins(0, 0, 0, 0) // No margins for full-bleed design + ->printBackground() // Include CSS backgrounds and colors + ->waitUntilNetworkIdle() // Wait for any fonts or resources to load + ->timeout(120) // Increase timeout to 2 minutes for complex rendering + ->setDelay(1000) // Wait 1 second after page load before PDF generation + ->emulateMedia('print') // Use print media queries if any + ->setOption('addStyleTag', json_encode(['content' => 'body { -webkit-print-color-adjust: exact; }'])) // Ensure colors print + ->setOption('args', ['--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage']); // Stability options for server environments + + // Only set Chrome path if we found a valid one + $chromePath = $this->getChromePath(); + if ($chromePath !== null) { + $browsershot->setChromePath($chromePath); + } + // If $chromePath is null, Browsershot will auto-detect Chrome + + $pdf = $browsershot->pdf(); + + // Return as downloadable response + return response($pdf, 200, [ + 'Content-Type' => 'application/pdf', + 'Content-Disposition' => 'attachment; filename="gartner_cmo_playbook.pdf"' + ]); + + } catch (\Exception $e) { + // Handle errors gracefully - in production, you'd log this + throw new \Exception("Failed to generate PDF: " . $e->getMessage()); + } + } + + /** + * Alternative method: Save PDF to storage and return path + * Useful if you want to store the PDF for later use or email it + */ + public function savePDF(string $filename = null): string + { + $filename = $filename ?? 'gartner_playbook_' . now()->format('Y-m-d_H-i-s') . '.pdf'; + $html = $this->buildCompleteHTML(); + + $browsershot = Browsershot::html($html) + ->format('A4') + ->margins(0, 0, 0, 0) + ->printBackground() + ->waitUntilNetworkIdle() + ->timeout(120) + ->setDelay(1000) + ->emulateMedia('print') + ->setOption('addStyleTag', json_encode(['content' => 'body { -webkit-print-color-adjust: exact; }'])) + ->setOption('args', ['--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage']); + + // Only set Chrome path if we found a valid one + $chromePath = $this->getChromePath(); + if ($chromePath !== null) { + $browsershot->setChromePath($chromePath); + } + + $pdf = $browsershot->pdf(); + + // Save to Laravel's storage system + Storage::disk('public')->put("pdfs/{$filename}", $pdf); + + return "pdfs/{$filename}"; + } + + /** + * Generate preview HTML for browser viewing + * This allows you to test and preview the design before generating PDF + */ + public function generatePreview(): string + { + return $this->buildCompleteHTML(); + } + + /** + * Build the complete HTML document with all styling and content + * This is where the magic happens - we create a complete web page + * that looks exactly like the Gartner document + */ + private function buildCompleteHTML(): string + { + // Get all the component parts + $css = $this->getAdvancedCSS(); + $coverPage = $this->generateCoverPage(); + $summaryPage = $this->generateSummaryPage(); + $stepPages = $this->generateStepPages(); + + // Combine everything into a complete HTML document + return " + + + + + + {$this->data['title']} + + + + {$coverPage} + {$summaryPage} + {$stepPages} + + "; + } + + /** + * Professional CSS styling optimized for modern browser PDF generation + * This CSS uses all the advanced features that make the replica look professional + */ + private function getAdvancedCSS(): string + { + return " + /* Reset and base styles for consistent rendering */ + * { + margin: 0; + padding: 0; + box-sizing: border-box; + } + + /* Professional typography stack */ + body { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif; + font-size: 14px; + line-height: 1.5; + color: #2c3e50; + background: white; + } + + /* Page structure for perfect print layout */ + .page { + width: 8.5in; + min-height: 11in; + margin: 0 auto; + background: white; + position: relative; + page-break-after: always; + overflow: hidden; + } + + .page:last-child { + page-break-after: avoid; + } + + /* Cover page with Gartner's signature blue gradient */ + .cover-page { + background: linear-gradient(135deg, #1a237e 0%, #283593 25%, #3949ab 75%, #5c6bc0 100%); + color: white; + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-start; + padding: 80px 60px; + position: relative; + } + + /* Network pattern background using pure CSS */ + .cover-page::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-image: + radial-gradient(circle at 20% 25%, rgba(255, 193, 7, 0.4) 3px, transparent 3px), + radial-gradient(circle at 80% 35%, rgba(255, 193, 7, 0.3) 4px, transparent 4px), + radial-gradient(circle at 40% 70%, rgba(0, 188, 212, 0.4) 3px, transparent 3px), + radial-gradient(circle at 90% 80%, rgba(0, 188, 212, 0.3) 2px, transparent 2px); + background-size: 120px 120px, 180px 180px, 150px 150px, 100px 100px; + opacity: 0.7; + pointer-events: none; + } + + .gartner-logo { + font-size: 32px; + font-weight: 700; + margin-bottom: 60px; + z-index: 10; + position: relative; + } + + .cover-title { + font-size: 64px; + font-weight: 800; + line-height: 1.1; + margin-bottom: 24px; + z-index: 10; + position: relative; + text-shadow: 0 2px 4px rgba(0,0,0,0.3); + } + + .cover-subtitle { + font-size: 24px; + font-weight: 400; + opacity: 0.95; + z-index: 10; + position: relative; + max-width: 600px; + } + + /* Content pages with professional spacing */ + .content-page { + padding: 60px; + } + + .section-title { + font-size: 28px; + font-weight: 700; + color: #1a237e; + margin-bottom: 24px; + line-height: 1.3; + } + + .section-subtitle { + font-size: 16px; + color: #546e7a; + margin-bottom: 32px; + line-height: 1.6; + } + + /* Statistics layout using CSS Grid for perfect alignment */ + .stats-container { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 40px; + margin: 40px 0; + align-items: center; + } + + .stat-card { + text-align: center; + padding: 32px; + border-radius: 12px; + background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); + border: 1px solid #dee2e6; + box-shadow: 0 4px 12px rgba(0,0,0,0.08); + } + + .stat-number { + font-size: 72px; + font-weight: 800; + color: #1a237e; + line-height: 1; + margin-bottom: 12px; + } + + .stat-label { + font-size: 16px; + color: #495057; + font-weight: 500; + } + + /* Professional pie chart using conic-gradient */ + .chart-container { + display: flex; + justify-content: center; + margin: 48px 0; + } + + .pie-chart { + width: 300px; + height: 300px; + border-radius: 50%; + background: conic-gradient(#1a237e 0% 48%, #ffc107 48% 100%); + display: flex; + align-items: center; + justify-content: center; + position: relative; + box-shadow: 0 8px 32px rgba(26, 35, 126, 0.3); + } + + .chart-label { + font-size: 48px; + font-weight: 800; + color: white; + text-shadow: 0 2px 8px rgba(0,0,0,0.5); + } + + /* Modern card design for steps overview */ + .steps-overview { + margin: 48px 0; + } + + .step-item { + display: flex; + align-items: center; + margin-bottom: 20px; + padding: 24px; + background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%); + border-radius: 12px; + border-left: 6px solid #ffc107; + box-shadow: 0 2px 12px rgba(0,0,0,0.08); + } + + .step-number { + width: 48px; + height: 48px; + border-radius: 50%; + background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%); + color: #1a237e; + display: flex; + align-items: center; + justify-content: center; + font-weight: 800; + font-size: 20px; + margin-right: 24px; + box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4); + } + + .step-content { + flex: 1; + } + + .step-title { + font-size: 18px; + font-weight: 600; + color: #1a237e; + line-height: 1.4; + } + + /* Individual step pages with progress indicators */ + .step-page { + padding: 60px; + } + + .step-header { + display: flex; + align-items: flex-start; + margin-bottom: 48px; + gap: 48px; + } + + .progress-indicator { + display: flex; + gap: 16px; + align-items: center; + } + + .progress-circle { + width: 48px; + height: 48px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + font-weight: 700; + font-size: 18px; + } + + .progress-circle.active { + background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%); + color: #1a237e; + box-shadow: 0 4px 16px rgba(255, 193, 7, 0.4); + transform: scale(1.1); + } + + .progress-circle.inactive { + background: #e9ecef; + color: #6c757d; + } + + .step-main-title { + font-size: 36px; + font-weight: 700; + color: #1a237e; + line-height: 1.2; + flex: 1; + } + + /* Two-column content layout */ + .content-grid { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 48px; + margin: 32px 0; + } + + .content-card { + padding: 32px; + border-radius: 12px; + box-shadow: 0 4px 20px rgba(0,0,0,0.1); + } + + .challenge-card { + background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%); + border-left: 6px solid #2196f3; + } + + .action-card { + background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%); + border-left: 6px solid #ffc107; + } + + .card-title { + font-size: 18px; + font-weight: 700; + color: #1a237e; + margin-bottom: 16px; + } + + .card-content { + font-size: 15px; + line-height: 1.6; + color: #37474f; + } + + /* Professional bar charts with gradients */ + .bar-chart { + background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); + padding: 32px; + border-radius: 12px; + margin: 24px 0; + } + + .bar-item { + display: flex; + align-items: center; + margin-bottom: 20px; + gap: 16px; + } + + .bar-label { + min-width: 200px; + font-weight: 500; + font-size: 14px; + color: #495057; + } + + .bar-track { + flex: 1; + height: 32px; + background: #dee2e6; + border-radius: 16px; + overflow: hidden; + position: relative; + } + + .bar-fill { + height: 100%; + background: linear-gradient(90deg, #1a237e 0%, #3949ab 100%); + border-radius: 16px; + position: relative; + } + + .bar-value { + position: absolute; + right: 12px; + top: 50%; + transform: translateY(-50%); + color: white; + font-weight: 700; + font-size: 14px; + text-shadow: 0 1px 2px rgba(0,0,0,0.3); + } + + /* Stakeholder table with modern design */ + .stakeholder-table { + width: 100%; + border-collapse: separate; + border-spacing: 0; + border-radius: 12px; + overflow: hidden; + box-shadow: 0 4px 20px rgba(0,0,0,0.1); + margin: 32px 0; + } + + .stakeholder-table th { + background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%); + color: white; + padding: 20px; + font-weight: 700; + text-align: center; + font-size: 16px; + } + + .stakeholder-table td { + padding: 16px 20px; + text-align: center; + border-bottom: 1px solid #e9ecef; + background: white; + } + + .stakeholder-table tr:nth-child(even) td { + background: #f8f9fa; + } + + .sentiment-badge { + padding: 6px 16px; + border-radius: 20px; + font-weight: 600; + font-size: 12px; + text-transform: uppercase; + letter-spacing: 0.5px; + } + + .sentiment-positive { background: #4caf50; color: white; } + .sentiment-negative { background: #f44336; color: white; } + .sentiment-neutral { background: #ff9800; color: white; } + + /* Highlight boxes for key insights */ + .highlight-box { + background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%); + border: 2px solid #4caf50; + border-radius: 12px; + padding: 24px; + margin: 24px 0; + text-align: center; + } + + .highlight-text { + font-size: 20px; + font-weight: 700; + color: #2e7d32; + } + + /* List styling for professional bullet points */ + .content-list { + list-style: none; + padding-left: 0; + } + + .content-list li { + position: relative; + padding-left: 24px; + margin-bottom: 12px; + line-height: 1.6; + } + + .content-list li::before { + content: '•'; + color: #ffc107; + font-weight: bold; + position: absolute; + left: 0; + font-size: 16px; + } + + /* Print optimization */ + @media print { + body { margin: 0; } + .page { margin: 0; width: 100%; min-height: 100vh; } + } + "; + } + + /** + * Generate the professional cover page + */ + private function generateCoverPage(): string + { + return " +
+
Gartner
+
{$this->data['title']}
+
{$this->data['subtitle']}
+
"; + } + + /** + * Generate the summary page with key statistics + */ + private function generateSummaryPage(): string + { + $stats = $this->data['statistics']; + + $stepsHTML = ''; + foreach ($this->data['steps'] as $step) { + $stepsHTML .= " +
+
{$step['number']}
+
+
{$step['title']}
+
+
"; + } + + return " +
+
Only half of marketing leaders can prove value and receive credit
+
+ The 2024 Gartner Marketing Analytics and Technology Survey indicates that proving the value of marketing and + receiving credit for business outcomes is a common challenge, with nearly half of marketing leaders feeling it's out of reach. +
+ +
+
+
{$stats['unable_to_prove']}%
+
Unable to prove value and/or don't get credit
+
+
+
{$stats['able_to_prove']}%
+
Able to prove value and get credit
+
+
+ +
+
+
{$stats['unable_to_prove']}%
+
+
+ +
5 steps to success for CMOs
+
+ {$stepsHTML} +
+
"; + } + + /** + * Generate all individual step pages + */ + private function generateStepPages(): string + { + $pagesHTML = ''; + + foreach ($this->data['steps'] as $index => $step) { + $pagesHTML .= $this->generateStepPage($step, $index + 1); + } + + return $pagesHTML; + } + + /** + * Generate an individual step page with progress indicator and proper page breaks + */ + private function generateStepPage(array $step, int $currentStep): string + { + // Generate progress circles + $progressHTML = ''; + for ($i = 1; $i <= 5; $i++) { + $class = ($i == $currentStep) ? 'active' : 'inactive'; + $progressHTML .= "
{$i}
"; + } + + // Generate step-specific content + $contentHTML = $this->generateStepContent($step, $currentStep); + + return " +
+
+
+ {$progressHTML} +
+
{$step['title']}
+
+
+ {$contentHTML} +
+
"; + } + + /** + * Generate content specific to each step based on the step number + */ + private function generateStepContent(array $step, int $stepNumber): string + { + switch($stepNumber) { + case 1: + return $this->generateStep1Content($step); + case 2: + return $this->generateStep2Content($step); + case 3: + return $this->generateStep3Content($step); + case 4: + return $this->generateStep4Content($step); + case 5: + return $this->generateStep5Content($step); + default: + return ''; + } + } + + /** + * Step 1: Focus on long-term, holistic impact - compact version + */ + private function generateStep1Content(array $step): string + { + $metrics = $step['metrics']; + + return " +
+
+
The challenge and opportunity
+
+ CMOs who adopt a long-term, holistic view are more successful in proving marketing's value + and gaining credit. Only 30% of those focusing on short-term initiatives reported success. +
+
+
+
+
Holistic, longer-term focus
+
+
+
{$metrics['holistic_long_term']}%
+
+
+
+
+
Holistic, shorter-term focus
+
+
+
{$metrics['holistic_short_term']}%
+
+
+
+
+
Individual, longer-term focus
+
+
+
{$metrics['individual_long_term']}%
+
+
+
+
+
Individual, shorter-term focus
+
+
+
{$metrics['individual_short_term']}%
+
+
+
+
+
"; + } + + /** + * Step 2: Build narrative for stakeholders + */ + private function generateStep2Content(array $step): string + { + return " +
+
+
Understanding stakeholder perspectives
+
+ {$step['description']} CMOs aiming to foster a strong relationship with their CEO and CFO + should understand their main priorities and views on marketing. +
+
+
+
+
Chief financial officer (CFO)
+
+
+
40%
+
+
+
+
+
Chief executive officer (CEO)
+
+
+
39%
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
StakeholderCEOCFOBU HeadsSales & Service Heads
Perception of marketingChampionSkepticNeutralSkeptic
InfluenceHighHighHighHigh
"; + } + + /** + * Step 3: Increase metric sophistication + */ + private function generateStep3Content(array $step): string + { + $metrics = $step['metrics']; + + return " +
+
+
Quality over quantity in metrics
+
+ The 2024 Gartner survey found that using a variety of metrics makes it 26% more likely to prove value and get credit. + However, it's not just about variety; it's the quality of the metrics that matters. +
+
+
The survey assessed marketing leaders' use of three high-complexity metrics:
+
    +
  • Relationship
  • +
  • Return on transactional
  • +
  • Operational
  • +
+
+
+
+
+
+
No high-complexity metrics
+
+
+
{$metrics['no_high_complexity']}%
+
+
+
+
+
At least one high-complexity metric
+
+
+
{$metrics['high_complexity']}%
+
+
+
+
+
+
1.5x more likely to prove value and get credit
+
+
+
"; + } + + /** + * Step 4: Expand D&A leadership involvement - compact version + */ + private function generateStep4Content(array $step): string + { + return " +
+
+
Leadership makes the difference
+
+ {$step['description']} CMO and senior marketing leader participation in high D&A activities, + particularly managing a D&A function, is vital to proving value and getting credit. +
+
+
Analytical activities included:
+
    +
  • Managing marketing data analysts
  • +
  • Creating marketing dashboards
  • +
  • Building custom reports from raw data
  • +
  • Developing measurement strategies
  • +
  • Synthesizing data to inform strategies
  • +
+
+
+
+
+
+
Low number of activities (current role)
+
+
+
44%
+
+
+
+
+
High number of activities (current role)
+
+
+
60%
+
+
+
+
+
+
1.4x more likely to prove value and get credit
+
+
+
"; + } + + /** + * Step 5: Invest in marketing talent - ultra-compact version + */ + private function generateStep5Content(array $step): string + { + $barriers = $step['barriers']; + + return " +
+
+
Closing the talent gap
+
+ Talent gaps present the biggest barriers to proving marketing value. Lacking the right talent + affects how the C-suite perceives marketing's value and impacts D&A investment. +
+
+
CMOs should develop adaptive capabilities:
+
    +
  • Soft skills: Tell credible stories to help CFOs understand investment value.
  • +
  • Analytical talent: Invest in training to bridge gaps and enhance decisions.
  • +
  • Technical talent: Recruit and upskill talent for advanced technologies.
  • +
+
+
+
+
+
Lack of soft skills/competencies
+
+
+
{$barriers['soft_skills']}%
+
+
+
+
+
Lack of analytical talent
+
+
+
{$barriers['analytical_talent']}%
+
+
+
+
+
Lack of technical talent
+
+
+
{$barriers['technical_talent']}%
+
+
+
+
+
"; + } + + /** + * Helper method to find Chrome/Chromium path for different systems + * This method tries to locate Chrome in common installation directories + * and provides helpful debugging information when Chrome isn't found + */ + private function getChromePath(): ?string + { + // Build paths dynamically to avoid PHP string parsing issues + // This approach is more robust and handles different operating systems properly + $paths = []; + + // Linux paths (Ubuntu, Debian, CentOS, etc.) + $paths[] = '/usr/bin/google-chrome-stable'; // Most common Linux path + $paths[] = '/usr/bin/google-chrome'; // Alternative Linux path + $paths[] = '/usr/bin/chromium-browser'; // Chromium on Ubuntu/Debian + $paths[] = '/usr/bin/chromium'; // Chromium alternative name + $paths[] = '/snap/bin/chromium'; // Snap package installation + + // macOS paths + $paths[] = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'; + $paths[] = '/Applications/Chromium.app/Contents/MacOS/Chromium'; + + // Windows paths - constructed safely to avoid backslash issues + // We use forward slashes and let PHP handle the conversion, or build paths properly + if (PHP_OS_FAMILY === 'Windows') { + // Standard Program Files locations + $paths[] = 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe'; + $paths[] = 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe'; + + // User-specific installation - built dynamically to avoid syntax errors + $userPath = 'C:\\Users\\' . get_current_user() . '\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe'; + $paths[] = $userPath; + + // Alternative construction using DIRECTORY_SEPARATOR for better cross-platform support + $userProfilePath = getenv('USERPROFILE'); + if ($userProfilePath) { + $paths[] = $userProfilePath . '\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe'; + } + } + + // XAMPP/Local development specific paths + $paths[] = '/opt/google/chrome/chrome'; // Some XAMPP installations + $paths[] = '/usr/local/bin/chrome'; // Homebrew on macOS + $paths[] = '/usr/local/bin/chromium'; // Alternative local installation + + // Try each path and return the first one that exists + foreach ($paths as $path) { + if (file_exists($path) && is_executable($path)) { + // Log successful detection for debugging + \Log::info("Chrome detected at: {$path}"); + return $path; + } + } + + // If we reach here, Chrome wasn't found in any expected location + // Log this for debugging purposes + \Log::warning('Chrome not found in expected locations. Browsershot will attempt auto-detection.', [ + 'searched_paths' => $paths, + 'system' => PHP_OS_FAMILY, + 'current_user' => get_current_user(), + 'suggestion' => 'Install Chrome or set custom path if PDF generation fails' + ]); + + // Return null to let Browsershot try its own auto-detection + return null; + } + + /** + * Allow customization of data from outside the class + */ + public function setData(array $data): void + { + $this->data = array_merge($this->data, $data); + } + + /** + * Generate preview HTML with visual page boundaries for debugging + * This method adds visible page boundaries so you can see if content fits properly + */ + public function generateDebugPreview(): string + { + $html = $this->buildCompleteHTML(); + + // Add debug CSS to visualize page boundaries + $debugCSS = " + "; + + // Insert debug CSS before closing head tag + $html = str_replace('', $debugCSS . '', $html); + + return $html; + } +} diff --git a/app/Services/ReportService.php b/app/Services/ReportService.php new file mode 100644 index 000000000..337b95bbf --- /dev/null +++ b/app/Services/ReportService.php @@ -0,0 +1,268 @@ + $assessment->id, + 'report_type' => $reportType + ]); + + try { + // Get assessment results + $results = $this->getAssessmentResults($assessment); + + // Prepare data for PDF template + $data = [ + 'assessment' => $assessment, + 'results' => $results, + 'reportType' => $reportType, + 'generatedAt' => now(), + 'locale' => app()->getLocale(), + ]; + + // Select template based on report type + $template = $this->getTemplate($reportType); + + // Generate PDF + $pdf = Pdf::loadView($template, $data); + + // Set PDF options + $pdf->setPaper('A4', 'portrait'); + $pdf->setOptions([ + 'dpi' => 150, + 'defaultFont' => 'sans-serif', + 'isRemoteEnabled' => true, + 'isPhpEnabled' => true, + ]); + + return $pdf; + + } catch (Exception $e) { + Log::error('PDF generation failed', [ + 'assessment_id' => $assessment->id, + 'report_type' => $reportType, + 'error' => $e->getMessage() + ]); + throw $e; + } + } + + /** + * Get assessment results data + */ + private function getAssessmentResults(Assessment $assessment): array + { + // Load necessary relationships if not already loaded + if (!$assessment->relationLoaded('results')) { + $assessment->load('results.domain', 'results.category'); + } + + $results = $assessment->results; + $domainResults = $results->where('category_id', null); + $categoryResults = $results->where('category_id', '!=', null); + + // Calculate overall statistics + $totalCriteria = $domainResults->sum('total_criteria'); + $applicableCriteria = $domainResults->sum('applicable_criteria'); + $yesCount = $domainResults->sum('yes_count'); + $noCount = $domainResults->sum('no_count'); + $naCount = $domainResults->sum('na_count'); + $overallPercentage = $applicableCriteria > 0 ? ($yesCount / $applicableCriteria) * 100 : 0; + + // Format domain results + $domainData = $domainResults->map(function ($result) { + return [ + 'domain_id' => $result->domain_id, + 'domain_name' => $result->domain->name_en ?? 'Unknown Domain', + 'domain_name_ar' => $result->domain->name_ar ?? 'مجال غير معروف', + 'score_percentage' => $result->score_percentage, + 'total_criteria' => $result->total_criteria, + 'applicable_criteria' => $result->applicable_criteria, + 'yes_count' => $result->yes_count, + 'no_count' => $result->no_count, + 'na_count' => $result->na_count, + 'status' => $this->getScoreStatus($result->score_percentage), + ]; + }); + + // Format category results + $categoryData = $categoryResults->groupBy('domain_id')->map(function ($categories, $domainId) { + return $categories->map(function ($result) { + return [ + 'category_id' => $result->category_id, + 'category_name' => $result->category->name_en ?? 'Unknown Category', + 'category_name_ar' => $result->category->name_ar ?? 'فئة غير معروفة', + 'score_percentage' => $result->score_percentage, + 'total_criteria' => $result->total_criteria, + 'applicable_criteria' => $result->applicable_criteria, + 'yes_count' => $result->yes_count, + 'no_count' => $result->no_count, + 'na_count' => $result->na_count, + 'status' => $this->getScoreStatus($result->score_percentage), + ]; + }); + }); + + return [ + 'overall_percentage' => round($overallPercentage, 2), + 'total_criteria' => $totalCriteria, + 'applicable_criteria' => $applicableCriteria, + 'yes_count' => $yesCount, + 'no_count' => $noCount, + 'na_count' => $naCount, + 'domain_results' => $domainData, + 'category_results' => $categoryData, + 'completion_date' => $assessment->completed_at, + 'status_summary' => $this->getOverallStatus($overallPercentage), + ]; + } + + /** + * Get template path based on report type + */ + private function getTemplate(string $reportType): string + { + return match ($reportType) { + 'comprehensive' => 'reports.comprehensive', + 'basic' => 'reports.basic', + 'guest_basic' => 'reports.guest-basic', + 'executive' => 'reports.executive', + default => 'reports.basic', + }; + } + + /** + * Get score status based on percentage + */ + private function getScoreStatus(float $percentage): array + { + if ($percentage >= 80) { + return [ + 'level' => 'excellent', + 'label_en' => 'Excellent', + 'label_ar' => 'ممتاز', + 'color' => '#10B981', // green + 'description_en' => 'Outstanding performance', + 'description_ar' => 'أداء متميز' + ]; + } elseif ($percentage >= 60) { + return [ + 'level' => 'good', + 'label_en' => 'Good', + 'label_ar' => 'جيد', + 'color' => '#3B82F6', // blue + 'description_en' => 'Above average performance', + 'description_ar' => 'أداء فوق المتوسط' + ]; + } elseif ($percentage >= 40) { + return [ + 'level' => 'fair', + 'label_en' => 'Fair', + 'label_ar' => 'مقبول', + 'color' => '#F59E0B', // amber + 'description_en' => 'Average performance', + 'description_ar' => 'أداء متوسط' + ]; + } else { + return [ + 'level' => 'needs_improvement', + 'label_en' => 'Needs Improvement', + 'label_ar' => 'يحتاج تحسين', + 'color' => '#EF4444', // red + 'description_en' => 'Below average performance', + 'description_ar' => 'أداء دون المتوسط' + ]; + } + } + + /** + * Get overall status summary + */ + private function getOverallStatus(float $percentage): array + { + $status = $this->getScoreStatus($percentage); + + // Add recommendations based on score + if ($percentage >= 80) { + $status['recommendations_en'] = [ + 'Maintain current excellent standards', + 'Continue monitoring and improvement processes', + 'Share best practices with other departments', + 'Focus on innovation and advanced optimization' + ]; + $status['recommendations_ar'] = [ + 'حافظ على المعايير الممتازة الحالية', + 'واصل عمليات المراقبة والتحسين', + 'شارك أفضل الممارسات مع الأقسام الأخرى', + 'ركز على الابتكار والتحسين المتقدم' + ]; + } elseif ($percentage >= 60) { + $status['recommendations_en'] = [ + 'Identify specific areas for improvement', + 'Develop targeted action plans', + 'Implement regular monitoring systems', + 'Invest in training and development' + ]; + $status['recommendations_ar'] = [ + 'حدد المجالات المحددة للتحسين', + 'طور خطط عمل مستهدفة', + 'نفذ أنظمة مراقبة منتظمة', + 'استثمر في التدريب والتطوير' + ]; + } else { + $status['recommendations_en'] = [ + 'Conduct comprehensive review of current processes', + 'Prioritize critical improvement areas', + 'Implement immediate corrective actions', + 'Establish regular assessment cycles' + ]; + $status['recommendations_ar'] = [ + 'أجر مراجعة شاملة للعمليات الحالية', + 'أعط الأولوية لمجالات التحسين الحرجة', + 'نفذ إجراءات تصحيحية فورية', + 'أنشئ دورات تقييم منتظمة' + ]; + } + + return $status; + } + + /** + * Get chart data for PDF + */ + public function getChartData(Assessment $assessment): array + { + $results = $this->getAssessmentResults($assessment); + + return [ + 'overall_score' => $results['overall_percentage'], + 'domain_scores' => $results['domain_results']->pluck('score_percentage', 'domain_name'), + 'response_breakdown' => [ + 'Yes' => $results['yes_count'], + 'No' => $results['no_count'], + 'N/A' => $results['na_count'], + ], + 'colors' => [ + 'yes' => '#10B981', + 'no' => '#EF4444', + 'na' => '#6B7280', + 'excellent' => '#10B981', + 'good' => '#3B82F6', + 'fair' => '#F59E0B', + 'poor' => '#EF4444', + ] + ]; + } +} diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100755 index 000000000..e56b090d6 --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,39 @@ +# Use the official PHP image with necessary extensions +FROM php:8.2-fpm + +# Set working directory +WORKDIR /var/www + +# Install system dependencies and PHP extensions +RUN apt-get update && apt-get install -y \ + build-essential \ + libpng-dev \ + libjpeg-dev \ + libfreetype6-dev \ + libonig-dev \ + libxml2-dev \ + zip \ + unzip \ + curl \ + git \ + libpq-dev \ + && docker-php-ext-install pdo pdo_pgsql mbstring exif pcntl bcmath gd + +# Install Composer +COPY --from=composer:2 /usr/bin/composer /usr/bin/composer + +# Copy project files +COPY . . + +# Install Laravel dependencies +RUN composer install --no-interaction --prefer-dist --optimize-autoloader + +# Set correct permissions +RUN chown -R www-data:www-data /var/www \ + && chmod -R 755 /var/www/storage /var/www/bootstrap/cache + +# Expose port +EXPOSE 9000 + +# Run PHP-FPM +CMD ["php-fpm"] diff --git a/bootstrap/app.php b/bootstrap/app.php index 134581ab3..89ea9b68f 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,5 +1,9 @@ alias([ + 'checkAccess' => CheckUserAccess::class, + 'checkToolAccess' => CheckToolAccess::class, + 'filamentAccess' => CheckFilamentAccess::class, + 'checkAssessmentLimits' => CheckAssessmentLimits::class, + ])->validateCsrfTokens(except: [ + + 'paddle/*', + ]); + }) ->withExceptions(function (Exceptions $exceptions) { // diff --git a/bootstrap/providers.php b/bootstrap/providers.php index 38b258d18..b931cfecf 100644 --- a/bootstrap/providers.php +++ b/bootstrap/providers.php @@ -2,4 +2,6 @@ return [ App\Providers\AppServiceProvider::class, + App\Providers\Filament\AdminPanelProvider::class, + App\Providers\ReportServiceProvider::class, ]; diff --git a/composer.json b/composer.json index d33ae8c47..6fe030336 100644 --- a/composer.json +++ b/composer.json @@ -3,16 +3,23 @@ "name": "laravel/react-starter-kit", "type": "project", "description": "The skeleton application for the Laravel framework.", - "keywords": [ - "laravel", - "framework" - ], + "keywords": ["laravel", "framework"], "license": "MIT", "require": { "php": "^8.2", + "barryvdh/laravel-dompdf": "^3.1", + "bezhansalleh/filament-language-switch": "^3.1", + "bezhansalleh/filament-shield": "^3.3", + "dompdf/dompdf": "^3.1", + "filament/filament": "^3.0-stable", + "filament/infolists": "^3.3", + "guzzlehttp/guzzle": "*", "inertiajs/inertia-laravel": "^2.0", + "laravel/cashier-paddle": "^2.6", "laravel/framework": "^12.0", "laravel/tinker": "^2.10.1", + "mpdf/mpdf": "^8.2", + "spatie/browsershot": "^5.0", "tightenco/ziggy": "^2.4" }, "require-dev": { @@ -39,7 +46,8 @@ "scripts": { "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", - "@php artisan package:discover --ansi" + "@php artisan package:discover --ansi", + "@php artisan filament:upgrade" ], "post-update-cmd": [ "@php artisan vendor:publish --tag=laravel-assets --ansi --force" diff --git a/composer.lock b/composer.lock new file mode 100644 index 000000000..6f58f8e8e --- /dev/null +++ b/composer.lock @@ -0,0 +1,11226 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "2d98802501b819c5e14f5cdb94fd392a", + "packages": [ + { + "name": "anourvalar/eloquent-serialize", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/AnourValar/eloquent-serialize.git", + "reference": "060632195821e066de1fc0f869881dd585e2f299" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/AnourValar/eloquent-serialize/zipball/060632195821e066de1fc0f869881dd585e2f299", + "reference": "060632195821e066de1fc0f869881dd585e2f299", + "shasum": "" + }, + "require": { + "laravel/framework": "^8.0|^9.0|^10.0|^11.0|^12.0", + "php": "^7.4|^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.26", + "laravel/legacy-factories": "^1.1", + "orchestra/testbench": "^6.0|^7.0|^8.0|^9.0|^10.0", + "phpstan/phpstan": "^2.0", + "phpunit/phpunit": "^9.5|^10.5|^11.0", + "psalm/plugin-laravel": "^2.8|^3.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "EloquentSerialize": "AnourValar\\EloquentSerialize\\Facades\\EloquentSerializeFacade" + } + } + }, + "autoload": { + "psr-4": { + "AnourValar\\EloquentSerialize\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Laravel Query Builder (Eloquent) serialization", + "homepage": "https://github.com/AnourValar/eloquent-serialize", + "keywords": [ + "anourvalar", + "builder", + "copy", + "eloquent", + "job", + "laravel", + "query", + "querybuilder", + "queue", + "serializable", + "serialization", + "serialize" + ], + "support": { + "issues": "https://github.com/AnourValar/eloquent-serialize/issues", + "source": "https://github.com/AnourValar/eloquent-serialize/tree/1.3.1" + }, + "time": "2025-04-06T06:54:34+00:00" + }, + { + "name": "barryvdh/laravel-dompdf", + "version": "v3.1.1", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-dompdf.git", + "reference": "8e71b99fc53bb8eb77f316c3c452dd74ab7cb25d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/8e71b99fc53bb8eb77f316c3c452dd74ab7cb25d", + "reference": "8e71b99fc53bb8eb77f316c3c452dd74ab7cb25d", + "shasum": "" + }, + "require": { + "dompdf/dompdf": "^3.0", + "illuminate/support": "^9|^10|^11|^12", + "php": "^8.1" + }, + "require-dev": { + "larastan/larastan": "^2.7|^3.0", + "orchestra/testbench": "^7|^8|^9|^10", + "phpro/grumphp": "^2.5", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "PDF": "Barryvdh\\DomPDF\\Facade\\Pdf", + "Pdf": "Barryvdh\\DomPDF\\Facade\\Pdf" + }, + "providers": [ + "Barryvdh\\DomPDF\\ServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\DomPDF\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "A DOMPDF Wrapper for Laravel", + "keywords": [ + "dompdf", + "laravel", + "pdf" + ], + "support": { + "issues": "https://github.com/barryvdh/laravel-dompdf/issues", + "source": "https://github.com/barryvdh/laravel-dompdf/tree/v3.1.1" + }, + "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2025-02-13T15:07:54+00:00" + }, + { + "name": "bezhansalleh/filament-language-switch", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/bezhanSalleh/filament-language-switch.git", + "reference": "29d724e38a6e112b0e36b9f9059a18461ec92f0f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bezhanSalleh/filament-language-switch/zipball/29d724e38a6e112b0e36b9f9059a18461ec92f0f", + "reference": "29d724e38a6e112b0e36b9f9059a18461ec92f0f", + "shasum": "" + }, + "require": { + "filament/filament": "^3.0", + "php": "^8.1|^8.2|^8.3", + "spatie/laravel-package-tools": "^1.9" + }, + "require-dev": { + "laravel/pint": "^1.0", + "nunomaduro/collision": "^6.0|^7.0|8.0", + "orchestra/testbench": "^7.0|^8.0|^9.0", + "pestphp/pest": "^2.34", + "pestphp/pest-plugin-laravel": "^2.3", + "spatie/laravel-ray": "^1.26" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "BezhanSalleh\\FilamentLanguageSwitch\\FilamentLanguageSwitchServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "BezhanSalleh\\FilamentLanguageSwitch\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bezhan Salleh", + "email": "bezhan_salleh@yahoo.com", + "role": "Developer" + } + ], + "description": "Zero config Language Switch(Changer/Localizer) plugin for filamentphp admin", + "homepage": "https://github.com/bezhansalleh/filament-language-switch", + "keywords": [ + "bezhanSalleh", + "filament-language-changer", + "filament-language-switch", + "filament-locale-changer", + "filament-localizer", + "filament-plugin", + "filamentphp", + "laravel" + ], + "support": { + "issues": "https://github.com/bezhanSalleh/filament-language-switch/issues", + "source": "https://github.com/bezhanSalleh/filament-language-switch/tree/3.1.0" + }, + "funding": [ + { + "url": "https://github.com/bezhanSalleh", + "type": "github" + } + ], + "time": "2024-04-01T18:28:29+00:00" + }, + { + "name": "bezhansalleh/filament-shield", + "version": "3.3.6", + "source": { + "type": "git", + "url": "https://github.com/bezhanSalleh/filament-shield.git", + "reference": "f77e4a47a4c411ca973e1964dbc1f963dd09e1c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bezhanSalleh/filament-shield/zipball/f77e4a47a4c411ca973e1964dbc1f963dd09e1c4", + "reference": "f77e4a47a4c411ca973e1964dbc1f963dd09e1c4", + "shasum": "" + }, + "require": { + "filament/filament": "^3.2", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.9", + "spatie/laravel-permission": "^6.0" + }, + "require-dev": { + "larastan/larastan": "^2.0", + "laravel/pint": "^1.0", + "nunomaduro/collision": "^7.0|^8.0", + "orchestra/testbench": "^8.0|^9.0", + "pestphp/pest": "^2.34", + "pestphp/pest-plugin-laravel": "^2.3", + "phpstan/extension-installer": "^1.3", + "phpstan/phpstan-deprecation-rules": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^10.1", + "spatie/laravel-ray": "^1.37" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "FilamentShield": "BezhanSalleh\\FilamentShield\\Facades\\FilamentShield" + }, + "providers": [ + "BezhanSalleh\\FilamentShield\\FilamentShieldServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "BezhanSalleh\\FilamentShield\\": "src", + "BezhanSalleh\\FilamentShield\\Database\\Factories\\": "database/factories" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bezhan Salleh", + "email": "bezhan_salleh@yahoo.com", + "role": "Developer" + } + ], + "description": "Filament support for `spatie/laravel-permission`.", + "homepage": "https://github.com/bezhansalleh/filament-shield", + "keywords": [ + "acl", + "bezhanSalleh", + "filament", + "filament-shield", + "laravel", + "permission", + "permissions", + "rbac", + "roles", + "security" + ], + "support": { + "issues": "https://github.com/bezhanSalleh/filament-shield/issues", + "source": "https://github.com/bezhanSalleh/filament-shield/tree/3.3.6" + }, + "funding": [ + { + "url": "https://github.com/bezhanSalleh", + "type": "github" + } + ], + "time": "2025-05-03T02:31:53+00:00" + }, + { + "name": "blade-ui-kit/blade-heroicons", + "version": "2.6.0", + "source": { + "type": "git", + "url": "https://github.com/driesvints/blade-heroicons.git", + "reference": "4553b2a1f6c76f0ac7f3bc0de4c0cfa06a097d19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/driesvints/blade-heroicons/zipball/4553b2a1f6c76f0ac7f3bc0de4c0cfa06a097d19", + "reference": "4553b2a1f6c76f0ac7f3bc0de4c0cfa06a097d19", + "shasum": "" + }, + "require": { + "blade-ui-kit/blade-icons": "^1.6", + "illuminate/support": "^9.0|^10.0|^11.0|^12.0", + "php": "^8.0" + }, + "require-dev": { + "orchestra/testbench": "^7.0|^8.0|^9.0|^10.0", + "phpunit/phpunit": "^9.0|^10.5|^11.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "BladeUI\\Heroicons\\BladeHeroiconsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "BladeUI\\Heroicons\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dries Vints", + "homepage": "https://driesvints.com" + } + ], + "description": "A package to easily make use of Heroicons in your Laravel Blade views.", + "homepage": "https://github.com/blade-ui-kit/blade-heroicons", + "keywords": [ + "Heroicons", + "blade", + "laravel" + ], + "support": { + "issues": "https://github.com/driesvints/blade-heroicons/issues", + "source": "https://github.com/driesvints/blade-heroicons/tree/2.6.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/driesvints", + "type": "github" + }, + { + "url": "https://www.paypal.com/paypalme/driesvints", + "type": "paypal" + } + ], + "time": "2025-02-13T20:53:33+00:00" + }, + { + "name": "blade-ui-kit/blade-icons", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/driesvints/blade-icons.git", + "reference": "7b743f27476acb2ed04cb518213d78abe096e814" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/driesvints/blade-icons/zipball/7b743f27476acb2ed04cb518213d78abe096e814", + "reference": "7b743f27476acb2ed04cb518213d78abe096e814", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/filesystem": "^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/support": "^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/view": "^8.0|^9.0|^10.0|^11.0|^12.0", + "php": "^7.4|^8.0", + "symfony/console": "^5.3|^6.0|^7.0", + "symfony/finder": "^5.3|^6.0|^7.0" + }, + "require-dev": { + "mockery/mockery": "^1.5.1", + "orchestra/testbench": "^6.0|^7.0|^8.0|^9.0|^10.0", + "phpunit/phpunit": "^9.0|^10.5|^11.0" + }, + "bin": [ + "bin/blade-icons-generate" + ], + "type": "library", + "extra": { + "laravel": { + "providers": [ + "BladeUI\\Icons\\BladeIconsServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "BladeUI\\Icons\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dries Vints", + "homepage": "https://driesvints.com" + } + ], + "description": "A package to easily make use of icons in your Laravel Blade views.", + "homepage": "https://github.com/blade-ui-kit/blade-icons", + "keywords": [ + "blade", + "icons", + "laravel", + "svg" + ], + "support": { + "issues": "https://github.com/blade-ui-kit/blade-icons/issues", + "source": "https://github.com/blade-ui-kit/blade-icons" + }, + "funding": [ + { + "url": "https://github.com/sponsors/driesvints", + "type": "github" + }, + { + "url": "https://www.paypal.com/paypalme/driesvints", + "type": "paypal" + } + ], + "time": "2025-02-13T20:35:06+00:00" + }, + { + "name": "brick/math", + "version": "0.12.3", + "source": { + "type": "git", + "url": "https://github.com/brick/math.git", + "reference": "866551da34e9a618e64a819ee1e01c20d8a588ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/brick/math/zipball/866551da34e9a618e64a819ee1e01c20d8a588ba", + "reference": "866551da34e9a618e64a819ee1e01c20d8a588ba", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^10.1", + "vimeo/psalm": "6.8.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Brick\\Math\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Arbitrary-precision arithmetic library", + "keywords": [ + "Arbitrary-precision", + "BigInteger", + "BigRational", + "arithmetic", + "bigdecimal", + "bignum", + "bignumber", + "brick", + "decimal", + "integer", + "math", + "mathematics", + "rational" + ], + "support": { + "issues": "https://github.com/brick/math/issues", + "source": "https://github.com/brick/math/tree/0.12.3" + }, + "funding": [ + { + "url": "https://github.com/BenMorel", + "type": "github" + } + ], + "time": "2025-02-28T13:11:00+00:00" + }, + { + "name": "carbonphp/carbon-doctrine-types", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", + "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/18ba5ddfec8976260ead6e866180bd5d2f71aa1d", + "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "conflict": { + "doctrine/dbal": "<4.0.0 || >=5.0.0" + }, + "require-dev": { + "doctrine/dbal": "^4.0.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Types to use Carbon in Doctrine", + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], + "support": { + "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2024-02-09T16:56:22+00:00" + }, + { + "name": "danharrin/date-format-converter", + "version": "v0.3.1", + "source": { + "type": "git", + "url": "https://github.com/danharrin/date-format-converter.git", + "reference": "7c31171bc981e48726729a5f3a05a2d2b63f0b1e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danharrin/date-format-converter/zipball/7c31171bc981e48726729a5f3a05a2d2b63f0b1e", + "reference": "7c31171bc981e48726729a5f3a05a2d2b63f0b1e", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/helpers.php", + "src/standards.php" + ], + "psr-4": { + "DanHarrin\\DateFormatConverter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dan Harrin", + "email": "dan@danharrin.com" + } + ], + "description": "Convert token-based date formats between standards.", + "homepage": "https://github.com/danharrin/date-format-converter", + "support": { + "issues": "https://github.com/danharrin/date-format-converter/issues", + "source": "https://github.com/danharrin/date-format-converter" + }, + "funding": [ + { + "url": "https://github.com/danharrin", + "type": "github" + } + ], + "time": "2024-06-13T09:38:44+00:00" + }, + { + "name": "danharrin/livewire-rate-limiting", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/danharrin/livewire-rate-limiting.git", + "reference": "14dde653a9ae8f38af07a0ba4921dc046235e1a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danharrin/livewire-rate-limiting/zipball/14dde653a9ae8f38af07a0ba4921dc046235e1a0", + "reference": "14dde653a9ae8f38af07a0ba4921dc046235e1a0", + "shasum": "" + }, + "require": { + "illuminate/support": "^9.0|^10.0|^11.0|^12.0", + "php": "^8.0" + }, + "require-dev": { + "livewire/livewire": "^3.0", + "livewire/volt": "^1.3", + "orchestra/testbench": "^7.0|^8.0|^9.0|^10.0", + "phpunit/phpunit": "^9.0|^10.0|^11.5.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "DanHarrin\\LivewireRateLimiting\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dan Harrin", + "email": "dan@danharrin.com" + } + ], + "description": "Apply rate limiters to Laravel Livewire actions.", + "homepage": "https://github.com/danharrin/livewire-rate-limiting", + "support": { + "issues": "https://github.com/danharrin/livewire-rate-limiting/issues", + "source": "https://github.com/danharrin/livewire-rate-limiting" + }, + "funding": [ + { + "url": "https://github.com/danharrin", + "type": "github" + } + ], + "time": "2025-02-21T08:52:11+00:00" + }, + { + "name": "dflydev/dot-access-data", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/dflydev/dflydev-dot-access-data.git", + "reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/a23a2bf4f31d3518f3ecb38660c95715dfead60f", + "reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.42", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3", + "scrutinizer/ocular": "1.6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Dflydev\\DotAccessData\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Carlos Frutos", + "email": "carlos@kiwing.it", + "homepage": "https://github.com/cfrutos" + }, + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com" + } + ], + "description": "Given a deep data structure, access data by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-data", + "keywords": [ + "access", + "data", + "dot", + "notation" + ], + "support": { + "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.3" + }, + "time": "2024-07-08T12:26:09+00:00" + }, + { + "name": "doctrine/dbal", + "version": "4.2.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "33d2d7fe1269b2301640c44cf2896ea607b30e3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/33d2d7fe1269b2301640c44cf2896ea607b30e3e", + "reference": "33d2d7fe1269b2301640c44cf2896ea607b30e3e", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^0.5.3|^1", + "php": "^8.1", + "psr/cache": "^1|^2|^3", + "psr/log": "^1|^2|^3" + }, + "require-dev": { + "doctrine/coding-standard": "12.0.0", + "fig/log-test": "^1", + "jetbrains/phpstorm-stubs": "2023.2", + "phpstan/phpstan": "2.1.1", + "phpstan/phpstan-phpunit": "2.0.3", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "10.5.39", + "slevomat/coding-standard": "8.13.1", + "squizlabs/php_codesniffer": "3.10.2", + "symfony/cache": "^6.3.8|^7.0", + "symfony/console": "^5.4|^6.3|^7.0" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\DBAL\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", + "homepage": "https://www.doctrine-project.org/projects/dbal.html", + "keywords": [ + "abstraction", + "database", + "db2", + "dbal", + "mariadb", + "mssql", + "mysql", + "oci8", + "oracle", + "pdo", + "pgsql", + "postgresql", + "queryobject", + "sasql", + "sql", + "sqlite", + "sqlserver", + "sqlsrv" + ], + "support": { + "issues": "https://github.com/doctrine/dbal/issues", + "source": "https://github.com/doctrine/dbal/tree/4.2.3" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", + "type": "tidelift" + } + ], + "time": "2025-03-07T18:29:05+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "1.1.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38", + "reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "phpunit/phpunit": "<=7.5 || >=13" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^12 || ^13", + "phpstan/phpstan": "1.4.10 || 2.1.11", + "phpstan/phpstan-phpunit": "^1.0 || ^2", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12", + "psr/log": "^1 || ^2 || ^3" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.5" + }, + "time": "2025-04-07T20:06:18+00:00" + }, + { + "name": "doctrine/inflector", + "version": "2.0.10", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5817d0659c5b50c9b950feb9af7b9668e2c436bc", + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^11.0", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^8.5 || ^9.5", + "vimeo/psalm": "^4.25 || ^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.0.10" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "time": "2024-02-18T20:23:39+00:00" + }, + { + "name": "doctrine/lexer", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^12", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.21" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/3.0.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2024-02-05T11:56:58+00:00" + }, + { + "name": "dompdf/dompdf", + "version": "v3.1.0", + "source": { + "type": "git", + "url": "https://github.com/dompdf/dompdf.git", + "reference": "a51bd7a063a65499446919286fb18b518177155a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dompdf/dompdf/zipball/a51bd7a063a65499446919286fb18b518177155a", + "reference": "a51bd7a063a65499446919286fb18b518177155a", + "shasum": "" + }, + "require": { + "dompdf/php-font-lib": "^1.0.0", + "dompdf/php-svg-lib": "^1.0.0", + "ext-dom": "*", + "ext-mbstring": "*", + "masterminds/html5": "^2.0", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "ext-gd": "*", + "ext-json": "*", + "ext-zip": "*", + "mockery/mockery": "^1.3", + "phpunit/phpunit": "^7.5 || ^8 || ^9 || ^10 || ^11", + "squizlabs/php_codesniffer": "^3.5", + "symfony/process": "^4.4 || ^5.4 || ^6.2 || ^7.0" + }, + "suggest": { + "ext-gd": "Needed to process images", + "ext-gmagick": "Improves image processing performance", + "ext-imagick": "Improves image processing performance", + "ext-zlib": "Needed for pdf stream compression" + }, + "type": "library", + "autoload": { + "psr-4": { + "Dompdf\\": "src/" + }, + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "The Dompdf Community", + "homepage": "https://github.com/dompdf/dompdf/blob/master/AUTHORS.md" + } + ], + "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter", + "homepage": "https://github.com/dompdf/dompdf", + "support": { + "issues": "https://github.com/dompdf/dompdf/issues", + "source": "https://github.com/dompdf/dompdf/tree/v3.1.0" + }, + "time": "2025-01-15T14:09:04+00:00" + }, + { + "name": "dompdf/php-font-lib", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/dompdf/php-font-lib.git", + "reference": "6137b7d4232b7f16c882c75e4ca3991dbcf6fe2d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/6137b7d4232b7f16c882c75e4ca3991dbcf6fe2d", + "reference": "6137b7d4232b7f16c882c75e4ca3991dbcf6fe2d", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "^3 || ^4 || ^5 || ^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "FontLib\\": "src/FontLib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "The FontLib Community", + "homepage": "https://github.com/dompdf/php-font-lib/blob/master/AUTHORS.md" + } + ], + "description": "A library to read, parse, export and make subsets of different types of font files.", + "homepage": "https://github.com/dompdf/php-font-lib", + "support": { + "issues": "https://github.com/dompdf/php-font-lib/issues", + "source": "https://github.com/dompdf/php-font-lib/tree/1.0.1" + }, + "time": "2024-12-02T14:37:59+00:00" + }, + { + "name": "dompdf/php-svg-lib", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/dompdf/php-svg-lib.git", + "reference": "eb045e518185298eb6ff8d80d0d0c6b17aecd9af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/eb045e518185298eb6ff8d80d0d0c6b17aecd9af", + "reference": "eb045e518185298eb6ff8d80d0d0c6b17aecd9af", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^7.1 || ^8.0", + "sabberworm/php-css-parser": "^8.4" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Svg\\": "src/Svg" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "The SvgLib Community", + "homepage": "https://github.com/dompdf/php-svg-lib/blob/master/AUTHORS.md" + } + ], + "description": "A library to read, parse and export to PDF SVG files.", + "homepage": "https://github.com/dompdf/php-svg-lib", + "support": { + "issues": "https://github.com/dompdf/php-svg-lib/issues", + "source": "https://github.com/dompdf/php-svg-lib/tree/1.0.0" + }, + "time": "2024-04-29T13:26:35+00:00" + }, + { + "name": "dragonmantank/cron-expression", + "version": "v3.4.0", + "source": { + "type": "git", + "url": "https://github.com/dragonmantank/cron-expression.git", + "reference": "8c784d071debd117328803d86b2097615b457500" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/8c784d071debd117328803d86b2097615b457500", + "reference": "8c784d071debd117328803d86b2097615b457500", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0", + "webmozart/assert": "^1.0" + }, + "replace": { + "mtdowling/cron-expression": "^1.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.0", + "phpunit/phpunit": "^7.0|^8.0|^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Cron\\": "src/Cron/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Tankersley", + "email": "chris@ctankersley.com", + "homepage": "https://github.com/dragonmantank" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "support": { + "issues": "https://github.com/dragonmantank/cron-expression/issues", + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.4.0" + }, + "funding": [ + { + "url": "https://github.com/dragonmantank", + "type": "github" + } + ], + "time": "2024-10-09T13:47:03+00:00" + }, + { + "name": "egulias/email-validator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/egulias/EmailValidator.git", + "reference": "d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa", + "reference": "d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^2.0 || ^3.0", + "php": ">=8.1", + "symfony/polyfill-intl-idn": "^1.26" + }, + "require-dev": { + "phpunit/phpunit": "^10.2", + "vimeo/psalm": "^5.12" + }, + "suggest": { + "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Egulias\\EmailValidator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Gulias Davis" + } + ], + "description": "A library for validating emails against several RFCs", + "homepage": "https://github.com/egulias/EmailValidator", + "keywords": [ + "email", + "emailvalidation", + "emailvalidator", + "validation", + "validator" + ], + "support": { + "issues": "https://github.com/egulias/EmailValidator/issues", + "source": "https://github.com/egulias/EmailValidator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/egulias", + "type": "github" + } + ], + "time": "2025-03-06T22:45:56+00:00" + }, + { + "name": "filament/actions", + "version": "v3.3.16", + "source": { + "type": "git", + "url": "https://github.com/filamentphp/actions.git", + "reference": "66b509aa72fa882ce91218eb743684a9350bc3fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filamentphp/actions/zipball/66b509aa72fa882ce91218eb743684a9350bc3fb", + "reference": "66b509aa72fa882ce91218eb743684a9350bc3fb", + "shasum": "" + }, + "require": { + "anourvalar/eloquent-serialize": "^1.2", + "filament/forms": "self.version", + "filament/infolists": "self.version", + "filament/notifications": "self.version", + "filament/support": "self.version", + "illuminate/contracts": "^10.45|^11.0|^12.0", + "illuminate/database": "^10.45|^11.0|^12.0", + "illuminate/support": "^10.45|^11.0|^12.0", + "league/csv": "^9.16", + "openspout/openspout": "^4.23", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.9" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\Actions\\ActionsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Filament\\Actions\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Easily add beautiful action modals to any Livewire component.", + "homepage": "https://github.com/filamentphp/filament", + "support": { + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" + }, + "time": "2025-05-19T07:25:24+00:00" + }, + { + "name": "filament/filament", + "version": "v3.3.16", + "source": { + "type": "git", + "url": "https://github.com/filamentphp/panels.git", + "reference": "ed0a0109e6b2663247fcd73076c95c918bc5b412" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/ed0a0109e6b2663247fcd73076c95c918bc5b412", + "reference": "ed0a0109e6b2663247fcd73076c95c918bc5b412", + "shasum": "" + }, + "require": { + "danharrin/livewire-rate-limiting": "^0.3|^1.0|^2.0", + "filament/actions": "self.version", + "filament/forms": "self.version", + "filament/infolists": "self.version", + "filament/notifications": "self.version", + "filament/support": "self.version", + "filament/tables": "self.version", + "filament/widgets": "self.version", + "illuminate/auth": "^10.45|^11.0|^12.0", + "illuminate/console": "^10.45|^11.0|^12.0", + "illuminate/contracts": "^10.45|^11.0|^12.0", + "illuminate/cookie": "^10.45|^11.0|^12.0", + "illuminate/database": "^10.45|^11.0|^12.0", + "illuminate/http": "^10.45|^11.0|^12.0", + "illuminate/routing": "^10.45|^11.0|^12.0", + "illuminate/session": "^10.45|^11.0|^12.0", + "illuminate/support": "^10.45|^11.0|^12.0", + "illuminate/view": "^10.45|^11.0|^12.0", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.9" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\FilamentServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/global_helpers.php", + "src/helpers.php" + ], + "psr-4": { + "Filament\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A collection of full-stack components for accelerated Laravel app development.", + "homepage": "https://github.com/filamentphp/filament", + "support": { + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" + }, + "time": "2025-05-21T08:45:13+00:00" + }, + { + "name": "filament/forms", + "version": "v3.3.16", + "source": { + "type": "git", + "url": "https://github.com/filamentphp/forms.git", + "reference": "eeb18e482b1addc5fe88d57f59d6b91cb71957ff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/eeb18e482b1addc5fe88d57f59d6b91cb71957ff", + "reference": "eeb18e482b1addc5fe88d57f59d6b91cb71957ff", + "shasum": "" + }, + "require": { + "danharrin/date-format-converter": "^0.3", + "filament/actions": "self.version", + "filament/support": "self.version", + "illuminate/console": "^10.45|^11.0|^12.0", + "illuminate/contracts": "^10.45|^11.0|^12.0", + "illuminate/database": "^10.45|^11.0|^12.0", + "illuminate/filesystem": "^10.45|^11.0|^12.0", + "illuminate/support": "^10.45|^11.0|^12.0", + "illuminate/validation": "^10.45|^11.0|^12.0", + "illuminate/view": "^10.45|^11.0|^12.0", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.9" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\Forms\\FormsServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Filament\\Forms\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Easily add beautiful forms to any Livewire component.", + "homepage": "https://github.com/filamentphp/filament", + "support": { + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" + }, + "time": "2025-05-21T08:45:29+00:00" + }, + { + "name": "filament/infolists", + "version": "v3.3.16", + "source": { + "type": "git", + "url": "https://github.com/filamentphp/infolists.git", + "reference": "cc71f1c15f132660986384d302a33a2b20618a96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filamentphp/infolists/zipball/cc71f1c15f132660986384d302a33a2b20618a96", + "reference": "cc71f1c15f132660986384d302a33a2b20618a96", + "shasum": "" + }, + "require": { + "filament/actions": "self.version", + "filament/support": "self.version", + "illuminate/console": "^10.45|^11.0|^12.0", + "illuminate/contracts": "^10.45|^11.0|^12.0", + "illuminate/database": "^10.45|^11.0|^12.0", + "illuminate/filesystem": "^10.45|^11.0|^12.0", + "illuminate/support": "^10.45|^11.0|^12.0", + "illuminate/view": "^10.45|^11.0|^12.0", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.9" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\Infolists\\InfolistsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Filament\\Infolists\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Easily add beautiful read-only infolists to any Livewire component.", + "homepage": "https://github.com/filamentphp/filament", + "support": { + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" + }, + "time": "2025-04-23T06:39:44+00:00" + }, + { + "name": "filament/notifications", + "version": "v3.3.16", + "source": { + "type": "git", + "url": "https://github.com/filamentphp/notifications.git", + "reference": "356f50e24798a6f06522bfa5123c6ffd054171d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filamentphp/notifications/zipball/356f50e24798a6f06522bfa5123c6ffd054171d3", + "reference": "356f50e24798a6f06522bfa5123c6ffd054171d3", + "shasum": "" + }, + "require": { + "filament/actions": "self.version", + "filament/support": "self.version", + "illuminate/contracts": "^10.45|^11.0|^12.0", + "illuminate/filesystem": "^10.45|^11.0|^12.0", + "illuminate/notifications": "^10.45|^11.0|^12.0", + "illuminate/support": "^10.45|^11.0|^12.0", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.9" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\Notifications\\NotificationsServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/Testing/Autoload.php" + ], + "psr-4": { + "Filament\\Notifications\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Easily add beautiful notifications to any Livewire app.", + "homepage": "https://github.com/filamentphp/filament", + "support": { + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" + }, + "time": "2025-05-21T08:44:14+00:00" + }, + { + "name": "filament/support", + "version": "v3.3.16", + "source": { + "type": "git", + "url": "https://github.com/filamentphp/support.git", + "reference": "537663fa2c5057aa236a189255b623b5124d32d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filamentphp/support/zipball/537663fa2c5057aa236a189255b623b5124d32d8", + "reference": "537663fa2c5057aa236a189255b623b5124d32d8", + "shasum": "" + }, + "require": { + "blade-ui-kit/blade-heroicons": "^2.5", + "doctrine/dbal": "^3.2|^4.0", + "ext-intl": "*", + "illuminate/contracts": "^10.45|^11.0|^12.0", + "illuminate/support": "^10.45|^11.0|^12.0", + "illuminate/view": "^10.45|^11.0|^12.0", + "kirschbaum-development/eloquent-power-joins": "^3.0|^4.0", + "livewire/livewire": "^3.5", + "php": "^8.1", + "ryangjchandler/blade-capture-directive": "^0.2|^0.3|^1.0", + "spatie/color": "^1.5", + "spatie/invade": "^1.0|^2.0", + "spatie/laravel-package-tools": "^1.9", + "symfony/console": "^6.0|^7.0", + "symfony/html-sanitizer": "^6.1|^7.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\Support\\SupportServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Filament\\Support\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Core helper methods and foundation code for all Filament packages.", + "homepage": "https://github.com/filamentphp/filament", + "support": { + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" + }, + "time": "2025-05-21T08:45:20+00:00" + }, + { + "name": "filament/tables", + "version": "v3.3.16", + "source": { + "type": "git", + "url": "https://github.com/filamentphp/tables.git", + "reference": "64806e3c13caeabb23a8668a7aaf1efc8395df96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/64806e3c13caeabb23a8668a7aaf1efc8395df96", + "reference": "64806e3c13caeabb23a8668a7aaf1efc8395df96", + "shasum": "" + }, + "require": { + "filament/actions": "self.version", + "filament/forms": "self.version", + "filament/support": "self.version", + "illuminate/console": "^10.45|^11.0|^12.0", + "illuminate/contracts": "^10.45|^11.0|^12.0", + "illuminate/database": "^10.45|^11.0|^12.0", + "illuminate/filesystem": "^10.45|^11.0|^12.0", + "illuminate/support": "^10.45|^11.0|^12.0", + "illuminate/view": "^10.45|^11.0|^12.0", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.9" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\Tables\\TablesServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Filament\\Tables\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Easily add beautiful tables to any Livewire component.", + "homepage": "https://github.com/filamentphp/filament", + "support": { + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" + }, + "time": "2025-05-19T07:26:42+00:00" + }, + { + "name": "filament/widgets", + "version": "v3.3.16", + "source": { + "type": "git", + "url": "https://github.com/filamentphp/widgets.git", + "reference": "048c5a4bf0477efbe2910c54a1aeb55c64cf1348" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filamentphp/widgets/zipball/048c5a4bf0477efbe2910c54a1aeb55c64cf1348", + "reference": "048c5a4bf0477efbe2910c54a1aeb55c64cf1348", + "shasum": "" + }, + "require": { + "filament/support": "self.version", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.9" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\Widgets\\WidgetsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Filament\\Widgets\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Easily add beautiful dashboard widgets to any Livewire component.", + "homepage": "https://github.com/filamentphp/filament", + "support": { + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" + }, + "time": "2025-04-23T06:39:59+00:00" + }, + { + "name": "fruitcake/php-cors", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/fruitcake/php-cors.git", + "reference": "3d158f36e7875e2f040f37bc0573956240a5a38b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/3d158f36e7875e2f040f37bc0573956240a5a38b", + "reference": "3d158f36e7875e2f040f37bc0573956240a5a38b", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0", + "symfony/http-foundation": "^4.4|^5.4|^6|^7" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "phpunit/phpunit": "^9", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Fruitcake\\Cors\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fruitcake", + "homepage": "https://fruitcake.nl" + }, + { + "name": "Barryvdh", + "email": "barryvdh@gmail.com" + } + ], + "description": "Cross-origin resource sharing library for the Symfony HttpFoundation", + "homepage": "https://github.com/fruitcake/php-cors", + "keywords": [ + "cors", + "laravel", + "symfony" + ], + "support": { + "issues": "https://github.com/fruitcake/php-cors/issues", + "source": "https://github.com/fruitcake/php-cors/tree/v1.3.0" + }, + "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2023-10-12T05:21:21+00:00" + }, + { + "name": "graham-campbell/result-type", + "version": "v1.1.3", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + }, + "type": "library", + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2024-07-20T21:45:45+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.9.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-curl": "*", + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.9.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2025-03-27T13:37:11+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/7c69f28996b0a6920945dd20b3857e499d9ca96c", + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.2.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2025-03-27T13:27:01+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.7.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/c2270caaabe631b3b44c85f99e5a04bbb8060d16", + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.7.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2025-03-27T12:30:47+00:00" + }, + { + "name": "guzzlehttp/uri-template", + "version": "v1.0.4", + "source": { + "type": "git", + "url": "https://github.com/guzzle/uri-template.git", + "reference": "30e286560c137526eccd4ce21b2de477ab0676d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/uri-template/zipball/30e286560c137526eccd4ce21b2de477ab0676d2", + "reference": "30e286560c137526eccd4ce21b2de477ab0676d2", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "symfony/polyfill-php80": "^1.24" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", + "uri-template/tests": "1.0.0" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\UriTemplate\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + } + ], + "description": "A polyfill class for uri_template of PHP", + "keywords": [ + "guzzlehttp", + "uri-template" + ], + "support": { + "issues": "https://github.com/guzzle/uri-template/issues", + "source": "https://github.com/guzzle/uri-template/tree/v1.0.4" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/uri-template", + "type": "tidelift" + } + ], + "time": "2025-02-03T10:55:03+00:00" + }, + { + "name": "inertiajs/inertia-laravel", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/inertiajs/inertia-laravel.git", + "reference": "248e815cf8d41307cbfb735efaa514c118e2f3b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/inertiajs/inertia-laravel/zipball/248e815cf8d41307cbfb735efaa514c118e2f3b4", + "reference": "248e815cf8d41307cbfb735efaa514c118e2f3b4", + "shasum": "" + }, + "require": { + "ext-json": "*", + "laravel/framework": "^10.0|^11.0|^12.0", + "php": "^8.1.0", + "symfony/console": "^6.2|^7.0" + }, + "require-dev": { + "laravel/pint": "^1.16", + "mockery/mockery": "^1.3.3", + "orchestra/testbench": "^8.0|^9.2|^10.0", + "phpunit/phpunit": "^10.4|^11.5", + "roave/security-advisories": "dev-master" + }, + "suggest": { + "ext-pcntl": "Recommended when running the Inertia SSR server via the `inertia:start-ssr` artisan command." + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Inertia\\ServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "./helpers.php" + ], + "psr-4": { + "Inertia\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jonathan Reinink", + "email": "jonathan@reinink.ca", + "homepage": "https://reinink.ca" + } + ], + "description": "The Laravel adapter for Inertia.js.", + "keywords": [ + "inertia", + "laravel" + ], + "support": { + "issues": "https://github.com/inertiajs/inertia-laravel/issues", + "source": "https://github.com/inertiajs/inertia-laravel/tree/v2.0.2" + }, + "time": "2025-04-10T15:08:36+00:00" + }, + { + "name": "kirschbaum-development/eloquent-power-joins", + "version": "4.2.4", + "source": { + "type": "git", + "url": "https://github.com/kirschbaum-development/eloquent-power-joins.git", + "reference": "4a8012cef7abed8ac3633a180c69138a228b6c4c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kirschbaum-development/eloquent-power-joins/zipball/4a8012cef7abed8ac3633a180c69138a228b6c4c", + "reference": "4a8012cef7abed8ac3633a180c69138a228b6c4c", + "shasum": "" + }, + "require": { + "illuminate/database": "^11.42|^12.0", + "illuminate/support": "^11.42|^12.0", + "php": "^8.2" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "dev-master", + "laravel/legacy-factories": "^1.0@dev", + "orchestra/testbench": "^9.0|^10.0", + "phpunit/phpunit": "^10.0|^11.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Kirschbaum\\PowerJoins\\PowerJoinsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Kirschbaum\\PowerJoins\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Luis Dalmolin", + "email": "luis.nh@gmail.com", + "role": "Developer" + } + ], + "description": "The Laravel magic applied to joins.", + "homepage": "https://github.com/kirschbaum-development/eloquent-power-joins", + "keywords": [ + "eloquent", + "join", + "laravel", + "mysql" + ], + "support": { + "issues": "https://github.com/kirschbaum-development/eloquent-power-joins/issues", + "source": "https://github.com/kirschbaum-development/eloquent-power-joins/tree/4.2.4" + }, + "time": "2025-05-19T14:14:41+00:00" + }, + { + "name": "laravel/cashier-paddle", + "version": "v2.6.2", + "source": { + "type": "git", + "url": "https://github.com/laravel/cashier-paddle.git", + "reference": "24837352d5b5c0ee61aa952a4972d0708ff87f7a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/cashier-paddle/zipball/24837352d5b5c0ee61aa952a4972d0708ff87f7a", + "reference": "24837352d5b5c0ee61aa952a4972d0708ff87f7a", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-openssl": "*", + "guzzlehttp/guzzle": "^7.4.5", + "illuminate/contracts": "^10.0|^11.0|^12.0", + "illuminate/database": "^10.0|^11.0|^12.0", + "illuminate/http": "^10.0|^11.0|^12.0", + "illuminate/routing": "^10.0|^11.0|^12.0", + "illuminate/support": "^10.0|^11.0|^12.0", + "illuminate/view": "^10.0|^11.0|^12.0", + "moneyphp/money": "^3.2|^4.0", + "nesbot/carbon": "^2.67|^3.0", + "php": "^8.1", + "spatie/url": "^1.3.5|^2.0", + "symfony/http-kernel": "^6.2|^7.0", + "symfony/polyfill-intl-icu": "^1.22.1" + }, + "require-dev": { + "mockery/mockery": "^1.5.1", + "orchestra/testbench": "^8.14|^9.0|^10.0", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.4|^11.5" + }, + "suggest": { + "ext-intl": "Allows for more locales besides the default \"en\" when formatting money values." + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Paddle\\CashierServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\Paddle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Dries Vints", + "email": "dries@laravel.com" + } + ], + "description": "Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.", + "keywords": [ + "billing", + "laravel", + "paddle" + ], + "support": { + "issues": "https://github.com/laravel/cashier-paddle/issues", + "source": "https://github.com/laravel/cashier-paddle" + }, + "time": "2025-06-10T15:06:27+00:00" + }, + { + "name": "laravel/framework", + "version": "v12.15.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "2ef7fb183f18e547af4eb9f5a55b2ac1011f0b77" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/2ef7fb183f18e547af4eb9f5a55b2ac1011f0b77", + "reference": "2ef7fb183f18e547af4eb9f5a55b2ac1011f0b77", + "shasum": "" + }, + "require": { + "brick/math": "^0.11|^0.12", + "composer-runtime-api": "^2.2", + "doctrine/inflector": "^2.0.5", + "dragonmantank/cron-expression": "^3.4", + "egulias/email-validator": "^3.2.1|^4.0", + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-session": "*", + "ext-tokenizer": "*", + "fruitcake/php-cors": "^1.3", + "guzzlehttp/guzzle": "^7.8.2", + "guzzlehttp/uri-template": "^1.0", + "laravel/prompts": "^0.3.0", + "laravel/serializable-closure": "^1.3|^2.0", + "league/commonmark": "^2.7", + "league/flysystem": "^3.25.1", + "league/flysystem-local": "^3.25.1", + "league/uri": "^7.5.1", + "monolog/monolog": "^3.0", + "nesbot/carbon": "^3.8.4", + "nunomaduro/termwind": "^2.0", + "php": "^8.2", + "psr/container": "^1.1.1|^2.0.1", + "psr/log": "^1.0|^2.0|^3.0", + "psr/simple-cache": "^1.0|^2.0|^3.0", + "ramsey/uuid": "^4.7", + "symfony/console": "^7.2.0", + "symfony/error-handler": "^7.2.0", + "symfony/finder": "^7.2.0", + "symfony/http-foundation": "^7.2.0", + "symfony/http-kernel": "^7.2.0", + "symfony/mailer": "^7.2.0", + "symfony/mime": "^7.2.0", + "symfony/polyfill-php83": "^1.31", + "symfony/process": "^7.2.0", + "symfony/routing": "^7.2.0", + "symfony/uid": "^7.2.0", + "symfony/var-dumper": "^7.2.0", + "tijsverkoyen/css-to-inline-styles": "^2.2.5", + "vlucas/phpdotenv": "^5.6.1", + "voku/portable-ascii": "^2.0.2" + }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "psr/log-implementation": "1.0|2.0|3.0", + "psr/simple-cache-implementation": "1.0|2.0|3.0" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", + "illuminate/bus": "self.version", + "illuminate/cache": "self.version", + "illuminate/collections": "self.version", + "illuminate/concurrency": "self.version", + "illuminate/conditionable": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/contracts": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/hashing": "self.version", + "illuminate/http": "self.version", + "illuminate/log": "self.version", + "illuminate/macroable": "self.version", + "illuminate/mail": "self.version", + "illuminate/notifications": "self.version", + "illuminate/pagination": "self.version", + "illuminate/pipeline": "self.version", + "illuminate/process": "self.version", + "illuminate/queue": "self.version", + "illuminate/redis": "self.version", + "illuminate/routing": "self.version", + "illuminate/session": "self.version", + "illuminate/support": "self.version", + "illuminate/testing": "self.version", + "illuminate/translation": "self.version", + "illuminate/validation": "self.version", + "illuminate/view": "self.version", + "spatie/once": "*" + }, + "require-dev": { + "ably/ably-php": "^1.0", + "aws/aws-sdk-php": "^3.322.9", + "ext-gmp": "*", + "fakerphp/faker": "^1.24", + "guzzlehttp/promises": "^2.0.3", + "guzzlehttp/psr7": "^2.4", + "laravel/pint": "^1.18", + "league/flysystem-aws-s3-v3": "^3.25.1", + "league/flysystem-ftp": "^3.25.1", + "league/flysystem-path-prefixing": "^3.25.1", + "league/flysystem-read-only": "^3.25.1", + "league/flysystem-sftp-v3": "^3.25.1", + "mockery/mockery": "^1.6.10", + "orchestra/testbench-core": "^10.0.0", + "pda/pheanstalk": "^5.0.6|^7.0.0", + "php-http/discovery": "^1.15", + "phpstan/phpstan": "^2.0", + "phpunit/phpunit": "^10.5.35|^11.5.3|^12.0.1", + "predis/predis": "^2.3|^3.0", + "resend/resend-php": "^0.10.0", + "symfony/cache": "^7.2.0", + "symfony/http-client": "^7.2.0", + "symfony/psr-http-message-bridge": "^7.2.0", + "symfony/translation": "^7.2.0" + }, + "suggest": { + "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.322.9).", + "brianium/paratest": "Required to run tests in parallel (^7.0|^8.0).", + "ext-apcu": "Required to use the APC cache driver.", + "ext-fileinfo": "Required to use the Filesystem class.", + "ext-ftp": "Required to use the Flysystem FTP driver.", + "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", + "ext-memcached": "Required to use the memcache cache driver.", + "ext-pcntl": "Required to use all features of the queue worker and console signal trapping.", + "ext-pdo": "Required to use all database features.", + "ext-posix": "Required to use all features of the queue worker.", + "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0|^6.0).", + "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", + "filp/whoops": "Required for friendly error pages in development (^2.14.3).", + "laravel/tinker": "Required to use the tinker console command (^2.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.25.1).", + "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.25.1).", + "league/flysystem-path-prefixing": "Required to use the scoped driver (^3.25.1).", + "league/flysystem-read-only": "Required to use read-only disks (^3.25.1)", + "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.25.1).", + "mockery/mockery": "Required to use mocking (^1.6).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^5.0).", + "php-http/discovery": "Required to use PSR-7 bridging features (^1.15).", + "phpunit/phpunit": "Required to use assertions and run tests (^10.5.35|^11.5.3|^12.0.1).", + "predis/predis": "Required to use the predis connector (^2.3|^3.0).", + "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", + "resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^7.2).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^7.2).", + "symfony/http-client": "Required to enable support for the Symfony API mail transports (^7.2).", + "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^7.2).", + "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^7.2).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^7.2)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "12.x-dev" + } + }, + "autoload": { + "files": [ + "src/Illuminate/Collections/functions.php", + "src/Illuminate/Collections/helpers.php", + "src/Illuminate/Events/functions.php", + "src/Illuminate/Filesystem/functions.php", + "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Log/functions.php", + "src/Illuminate/Support/functions.php", + "src/Illuminate/Support/helpers.php" + ], + "psr-4": { + "Illuminate\\": "src/Illuminate/", + "Illuminate\\Support\\": [ + "src/Illuminate/Macroable/", + "src/Illuminate/Collections/", + "src/Illuminate/Conditionable/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Laravel Framework.", + "homepage": "https://laravel.com", + "keywords": [ + "framework", + "laravel" + ], + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2025-05-20T15:10:44+00:00" + }, + { + "name": "laravel/prompts", + "version": "v0.3.5", + "source": { + "type": "git", + "url": "https://github.com/laravel/prompts.git", + "reference": "57b8f7efe40333cdb925700891c7d7465325d3b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/prompts/zipball/57b8f7efe40333cdb925700891c7d7465325d3b1", + "reference": "57b8f7efe40333cdb925700891c7d7465325d3b1", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.2", + "ext-mbstring": "*", + "php": "^8.1", + "symfony/console": "^6.2|^7.0" + }, + "conflict": { + "illuminate/console": ">=10.17.0 <10.25.0", + "laravel/framework": ">=10.17.0 <10.25.0" + }, + "require-dev": { + "illuminate/collections": "^10.0|^11.0|^12.0", + "mockery/mockery": "^1.5", + "pestphp/pest": "^2.3|^3.4", + "phpstan/phpstan": "^1.11", + "phpstan/phpstan-mockery": "^1.1" + }, + "suggest": { + "ext-pcntl": "Required for the spinner to be animated." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.3.x-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Laravel\\Prompts\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Add beautiful and user-friendly forms to your command-line applications.", + "support": { + "issues": "https://github.com/laravel/prompts/issues", + "source": "https://github.com/laravel/prompts/tree/v0.3.5" + }, + "time": "2025-02-11T13:34:40+00:00" + }, + { + "name": "laravel/serializable-closure", + "version": "v2.0.4", + "source": { + "type": "git", + "url": "https://github.com/laravel/serializable-closure.git", + "reference": "b352cf0534aa1ae6b4d825d1e762e35d43f8a841" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/b352cf0534aa1ae6b4d825d1e762e35d43f8a841", + "reference": "b352cf0534aa1ae6b4d825d1e762e35d43f8a841", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "illuminate/support": "^10.0|^11.0|^12.0", + "nesbot/carbon": "^2.67|^3.0", + "pestphp/pest": "^2.36|^3.0", + "phpstan/phpstan": "^2.0", + "symfony/var-dumper": "^6.2.0|^7.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\SerializableClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "nuno@laravel.com" + } + ], + "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "keywords": [ + "closure", + "laravel", + "serializable" + ], + "support": { + "issues": "https://github.com/laravel/serializable-closure/issues", + "source": "https://github.com/laravel/serializable-closure" + }, + "time": "2025-03-19T13:51:03+00:00" + }, + { + "name": "laravel/tinker", + "version": "v2.10.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/tinker.git", + "reference": "22177cc71807d38f2810c6204d8f7183d88a57d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/tinker/zipball/22177cc71807d38f2810c6204d8f7183d88a57d3", + "reference": "22177cc71807d38f2810c6204d8f7183d88a57d3", + "shasum": "" + }, + "require": { + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", + "php": "^7.2.5|^8.0", + "psy/psysh": "^0.11.1|^0.12.0", + "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0" + }, + "require-dev": { + "mockery/mockery": "~1.3.3|^1.4.2", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8.5.8|^9.3.3|^10.0" + }, + "suggest": { + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0)." + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Tinker\\TinkerServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Tinker\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Powerful REPL for the Laravel framework.", + "keywords": [ + "REPL", + "Tinker", + "laravel", + "psysh" + ], + "support": { + "issues": "https://github.com/laravel/tinker/issues", + "source": "https://github.com/laravel/tinker/tree/v2.10.1" + }, + "time": "2025-01-27T14:24:01+00:00" + }, + { + "name": "league/commonmark", + "version": "2.7.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "6fbb36d44824ed4091adbcf4c7d4a3923cdb3405" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/6fbb36d44824ed4091adbcf4c7d4a3923cdb3405", + "reference": "6fbb36d44824ed4091adbcf4c7d4a3923cdb3405", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "league/config": "^1.1.1", + "php": "^7.4 || ^8.0", + "psr/event-dispatcher": "^1.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0", + "symfony/polyfill-php80": "^1.16" + }, + "require-dev": { + "cebe/markdown": "^1.0", + "commonmark/cmark": "0.31.1", + "commonmark/commonmark.js": "0.31.1", + "composer/package-versions-deprecated": "^1.8", + "embed/embed": "^4.4", + "erusev/parsedown": "^1.0", + "ext-json": "*", + "github/gfm": "0.29.0", + "michelf/php-markdown": "^1.4 || ^2.0", + "nyholm/psr7": "^1.5", + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0", + "scrutinizer/ocular": "^1.8.1", + "symfony/finder": "^5.3 | ^6.0 | ^7.0", + "symfony/process": "^5.4 | ^6.0 | ^7.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 | ^7.0", + "unleashedtech/php-coding-standard": "^3.1.1", + "vimeo/psalm": "^4.24.0 || ^5.0.0" + }, + "suggest": { + "symfony/yaml": "v2.3+ required if using the Front Matter extension" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "League\\CommonMark\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)", + "homepage": "https://commonmark.thephpleague.com", + "keywords": [ + "commonmark", + "flavored", + "gfm", + "github", + "github-flavored", + "markdown", + "md", + "parser" + ], + "support": { + "docs": "https://commonmark.thephpleague.com/", + "forum": "https://github.com/thephpleague/commonmark/discussions", + "issues": "https://github.com/thephpleague/commonmark/issues", + "rss": "https://github.com/thephpleague/commonmark/releases.atom", + "source": "https://github.com/thephpleague/commonmark" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/commonmark", + "type": "tidelift" + } + ], + "time": "2025-05-05T12:20:28+00:00" + }, + { + "name": "league/config", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/config.git", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^3.0.1", + "nette/schema": "^1.2", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.5", + "scrutinizer/ocular": "^1.8.1", + "unleashedtech/php-coding-standard": "^3.1", + "vimeo/psalm": "^4.7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Config\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Define configuration arrays with strict schemas and access values with dot notation", + "homepage": "https://config.thephpleague.com", + "keywords": [ + "array", + "config", + "configuration", + "dot", + "dot-access", + "nested", + "schema" + ], + "support": { + "docs": "https://config.thephpleague.com/", + "issues": "https://github.com/thephpleague/config/issues", + "rss": "https://github.com/thephpleague/config/releases.atom", + "source": "https://github.com/thephpleague/config" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + } + ], + "time": "2022-12-11T20:36:23+00:00" + }, + { + "name": "league/csv", + "version": "9.23.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/csv.git", + "reference": "774008ad8a634448e4f8e288905e070e8b317ff3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/csv/zipball/774008ad8a634448e4f8e288905e070e8b317ff3", + "reference": "774008ad8a634448e4f8e288905e070e8b317ff3", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^8.1.2" + }, + "require-dev": { + "ext-dom": "*", + "ext-xdebug": "*", + "friendsofphp/php-cs-fixer": "^3.69.0", + "phpbench/phpbench": "^1.4.0", + "phpstan/phpstan": "^1.12.18", + "phpstan/phpstan-deprecation-rules": "^1.2.1", + "phpstan/phpstan-phpunit": "^1.4.2", + "phpstan/phpstan-strict-rules": "^1.6.2", + "phpunit/phpunit": "^10.5.16 || ^11.5.7", + "symfony/var-dumper": "^6.4.8 || ^7.2.3" + }, + "suggest": { + "ext-dom": "Required to use the XMLConverter and the HTMLConverter classes", + "ext-iconv": "Needed to ease transcoding CSV using iconv stream filters", + "ext-mbstring": "Needed to ease transcoding CSV using mb stream filters", + "ext-mysqli": "Requiered to use the package with the MySQLi extension", + "ext-pdo": "Required to use the package with the PDO extension", + "ext-pgsql": "Requiered to use the package with the PgSQL extension", + "ext-sqlite3": "Required to use the package with the SQLite3 extension" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "League\\Csv\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://github.com/nyamsprod/", + "role": "Developer" + } + ], + "description": "CSV data manipulation made easy in PHP", + "homepage": "https://csv.thephpleague.com", + "keywords": [ + "convert", + "csv", + "export", + "filter", + "import", + "read", + "transform", + "write" + ], + "support": { + "docs": "https://csv.thephpleague.com", + "issues": "https://github.com/thephpleague/csv/issues", + "rss": "https://github.com/thephpleague/csv/releases.atom", + "source": "https://github.com/thephpleague/csv" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2025-03-28T06:52:04+00:00" + }, + { + "name": "league/flysystem", + "version": "3.29.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "edc1bb7c86fab0776c3287dbd19b5fa278347319" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/edc1bb7c86fab0776c3287dbd19b5fa278347319", + "reference": "edc1bb7c86fab0776c3287dbd19b5fa278347319", + "shasum": "" + }, + "require": { + "league/flysystem-local": "^3.0.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "conflict": { + "async-aws/core": "<1.19.0", + "async-aws/s3": "<1.14.0", + "aws/aws-sdk-php": "3.209.31 || 3.210.0", + "guzzlehttp/guzzle": "<7.0", + "guzzlehttp/ringphp": "<1.1.1", + "phpseclib/phpseclib": "3.0.15", + "symfony/http-client": "<5.2" + }, + "require-dev": { + "async-aws/s3": "^1.5 || ^2.0", + "async-aws/simple-s3": "^1.1 || ^2.0", + "aws/aws-sdk-php": "^3.295.10", + "composer/semver": "^3.0", + "ext-fileinfo": "*", + "ext-ftp": "*", + "ext-mongodb": "^1.3", + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.5", + "google/cloud-storage": "^1.23", + "guzzlehttp/psr7": "^2.6", + "microsoft/azure-storage-blob": "^1.1", + "mongodb/mongodb": "^1.2", + "phpseclib/phpseclib": "^3.0.36", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.5.11|^10.0", + "sabre/dav": "^4.6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "File storage abstraction for PHP", + "keywords": [ + "WebDAV", + "aws", + "cloud", + "file", + "files", + "filesystem", + "filesystems", + "ftp", + "s3", + "sftp", + "storage" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem/issues", + "source": "https://github.com/thephpleague/flysystem/tree/3.29.1" + }, + "time": "2024-10-08T08:58:34+00:00" + }, + { + "name": "league/flysystem-local", + "version": "3.29.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-local.git", + "reference": "e0e8d52ce4b2ed154148453d321e97c8e931bd27" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/e0e8d52ce4b2ed154148453d321e97c8e931bd27", + "reference": "e0e8d52ce4b2ed154148453d321e97c8e931bd27", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "league/flysystem": "^3.0.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\Local\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Local filesystem adapter for Flysystem.", + "keywords": [ + "Flysystem", + "file", + "files", + "filesystem", + "local" + ], + "support": { + "source": "https://github.com/thephpleague/flysystem-local/tree/3.29.0" + }, + "time": "2024-08-09T21:24:39+00:00" + }, + { + "name": "league/mime-type-detection", + "version": "1.16.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/2d6702ff215bf922936ccc1ad31007edc76451b9", + "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.2", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "support": { + "issues": "https://github.com/thephpleague/mime-type-detection/issues", + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.16.0" + }, + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2024-09-21T08:32:55+00:00" + }, + { + "name": "league/uri", + "version": "7.5.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "81fb5145d2644324614cc532b28efd0215bda430" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/81fb5145d2644324614cc532b28efd0215bda430", + "reference": "81fb5145d2644324614cc532b28efd0215bda430", + "shasum": "" + }, + "require": { + "league/uri-interfaces": "^7.5", + "php": "^8.1" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-fileinfo": "to create Data URI from file contennts", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", + "league/uri-components": "Needed to easily manipulate URI objects components", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "uri-template", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri/tree/7.5.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2024-12-08T08:40:02+00:00" + }, + { + "name": "league/uri-interfaces", + "version": "7.5.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", + "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^8.1", + "psr/http-factory": "^1", + "psr/http-message": "^1.1 || ^2.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "Common interfaces and classes for URI representation and interaction", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.5.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2024-12-08T08:18:47+00:00" + }, + { + "name": "livewire/livewire", + "version": "v3.6.3", + "source": { + "type": "git", + "url": "https://github.com/livewire/livewire.git", + "reference": "56aa1bb63a46e06181c56fa64717a7287e19115e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/livewire/livewire/zipball/56aa1bb63a46e06181c56fa64717a7287e19115e", + "reference": "56aa1bb63a46e06181c56fa64717a7287e19115e", + "shasum": "" + }, + "require": { + "illuminate/database": "^10.0|^11.0|^12.0", + "illuminate/routing": "^10.0|^11.0|^12.0", + "illuminate/support": "^10.0|^11.0|^12.0", + "illuminate/validation": "^10.0|^11.0|^12.0", + "laravel/prompts": "^0.1.24|^0.2|^0.3", + "league/mime-type-detection": "^1.9", + "php": "^8.1", + "symfony/console": "^6.0|^7.0", + "symfony/http-kernel": "^6.2|^7.0" + }, + "require-dev": { + "calebporzio/sushi": "^2.1", + "laravel/framework": "^10.15.0|^11.0|^12.0", + "mockery/mockery": "^1.3.1", + "orchestra/testbench": "^8.21.0|^9.0|^10.0", + "orchestra/testbench-dusk": "^8.24|^9.1|^10.0", + "phpunit/phpunit": "^10.4|^11.5", + "psy/psysh": "^0.11.22|^0.12" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "Livewire": "Livewire\\Livewire" + }, + "providers": [ + "Livewire\\LivewireServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Livewire\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Caleb Porzio", + "email": "calebporzio@gmail.com" + } + ], + "description": "A front-end framework for Laravel.", + "support": { + "issues": "https://github.com/livewire/livewire/issues", + "source": "https://github.com/livewire/livewire/tree/v3.6.3" + }, + "funding": [ + { + "url": "https://github.com/livewire", + "type": "github" + } + ], + "time": "2025-04-12T22:26:52+00:00" + }, + { + "name": "masterminds/html5", + "version": "2.9.0", + "source": { + "type": "git", + "url": "https://github.com/Masterminds/html5-php.git", + "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", + "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Masterminds\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matt Butcher", + "email": "technosophos@gmail.com" + }, + { + "name": "Matt Farina", + "email": "matt@mattfarina.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" + } + ], + "description": "An HTML5 parser and serializer.", + "homepage": "http://masterminds.github.io/html5-php", + "keywords": [ + "HTML5", + "dom", + "html", + "parser", + "querypath", + "serializer", + "xml" + ], + "support": { + "issues": "https://github.com/Masterminds/html5-php/issues", + "source": "https://github.com/Masterminds/html5-php/tree/2.9.0" + }, + "time": "2024-03-31T07:05:07+00:00" + }, + { + "name": "moneyphp/money", + "version": "v3.3.3", + "source": { + "type": "git", + "url": "https://github.com/moneyphp/money.git", + "reference": "0dc40e3791c67e8793e3aa13fead8cf4661ec9cd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/moneyphp/money/zipball/0dc40e3791c67e8793e3aa13fead8cf4661ec9cd", + "reference": "0dc40e3791c67e8793e3aa13fead8cf4661ec9cd", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=5.6" + }, + "require-dev": { + "cache/taggable-cache": "^0.4.0", + "doctrine/instantiator": "^1.0.5", + "ext-bcmath": "*", + "ext-gmp": "*", + "ext-intl": "*", + "florianv/exchanger": "^1.0", + "florianv/swap": "^3.0", + "friends-of-phpspec/phpspec-code-coverage": "^3.1.1 || ^4.3", + "moneyphp/iso-currencies": "^3.2.1", + "php-http/message": "^1.4", + "php-http/mock-client": "^1.0.0", + "phpspec/phpspec": "^3.4.3", + "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.18 || ^8.5", + "psr/cache": "^1.0", + "symfony/phpunit-bridge": "^4" + }, + "suggest": { + "ext-bcmath": "Calculate without integer limits", + "ext-gmp": "Calculate without integer limits", + "ext-intl": "Format Money objects with intl", + "florianv/exchanger": "Exchange rates library for PHP", + "florianv/swap": "Exchange rates library for PHP", + "psr/cache-implementation": "Used for Currency caching" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Money\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mathias Verraes", + "email": "mathias@verraes.net", + "homepage": "http://verraes.net" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + }, + { + "name": "Frederik Bosch", + "email": "f.bosch@genkgo.nl" + } + ], + "description": "PHP implementation of Fowler's Money pattern", + "homepage": "http://moneyphp.org", + "keywords": [ + "Value Object", + "money", + "vo" + ], + "support": { + "issues": "https://github.com/moneyphp/money/issues", + "source": "https://github.com/moneyphp/money/tree/v3.3.3" + }, + "time": "2022-09-21T07:43:36+00:00" + }, + { + "name": "monolog/monolog", + "version": "3.9.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/10d85740180ecba7896c87e06a166e0c95a0e3b6", + "reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^2.0 || ^3.0" + }, + "provide": { + "psr/log-implementation": "3.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^3.0", + "doctrine/couchdb": "~1.0@dev", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", + "graylog2/gelf-php": "^1.4.2 || ^2.0", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/psr7": "^2.2", + "mongodb/mongodb": "^1.8", + "php-amqplib/php-amqplib": "~2.4 || ^3", + "php-console/php-console": "^3.1.8", + "phpstan/phpstan": "^2", + "phpstan/phpstan-deprecation-rules": "^2", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^10.5.17 || ^11.0.7", + "predis/predis": "^1.1 || ^2", + "rollbar/rollbar": "^4.0", + "ruflin/elastica": "^7 || ^8", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "ext-openssl": "Required to send log messages using SSL", + "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "https://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/3.9.0" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2025-03-24T10:02:05+00:00" + }, + { + "name": "mpdf/mpdf", + "version": "v8.2.5", + "source": { + "type": "git", + "url": "https://github.com/mpdf/mpdf.git", + "reference": "e175b05e3e00977b85feb96a8cccb174ac63621f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mpdf/mpdf/zipball/e175b05e3e00977b85feb96a8cccb174ac63621f", + "reference": "e175b05e3e00977b85feb96a8cccb174ac63621f", + "shasum": "" + }, + "require": { + "ext-gd": "*", + "ext-mbstring": "*", + "mpdf/psr-http-message-shim": "^1.0 || ^2.0", + "mpdf/psr-log-aware-trait": "^2.0 || ^3.0", + "myclabs/deep-copy": "^1.7", + "paragonie/random_compat": "^1.4|^2.0|^9.99.99", + "php": "^5.6 || ^7.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", + "psr/http-message": "^1.0 || ^2.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "setasign/fpdi": "^2.1" + }, + "require-dev": { + "mockery/mockery": "^1.3.0", + "mpdf/qrcode": "^1.1.0", + "squizlabs/php_codesniffer": "^3.5.0", + "tracy/tracy": "~2.5", + "yoast/phpunit-polyfills": "^1.0" + }, + "suggest": { + "ext-bcmath": "Needed for generation of some types of barcodes", + "ext-xml": "Needed mainly for SVG manipulation", + "ext-zlib": "Needed for compression of embedded resources, such as fonts" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Mpdf\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-only" + ], + "authors": [ + { + "name": "Matěj Humpál", + "role": "Developer, maintainer" + }, + { + "name": "Ian Back", + "role": "Developer (retired)" + } + ], + "description": "PHP library generating PDF files from UTF-8 encoded HTML", + "homepage": "https://mpdf.github.io", + "keywords": [ + "pdf", + "php", + "utf-8" + ], + "support": { + "docs": "https://mpdf.github.io", + "issues": "https://github.com/mpdf/mpdf/issues", + "source": "https://github.com/mpdf/mpdf" + }, + "funding": [ + { + "url": "https://www.paypal.me/mpdf", + "type": "custom" + } + ], + "time": "2024-11-18T15:30:42+00:00" + }, + { + "name": "mpdf/psr-http-message-shim", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/mpdf/psr-http-message-shim.git", + "reference": "f25a0153d645e234f9db42e5433b16d9b113920f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mpdf/psr-http-message-shim/zipball/f25a0153d645e234f9db42e5433b16d9b113920f", + "reference": "f25a0153d645e234f9db42e5433b16d9b113920f", + "shasum": "" + }, + "require": { + "psr/http-message": "^2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Mpdf\\PsrHttpMessageShim\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Dorison", + "email": "mark@chromatichq.com" + }, + { + "name": "Kristofer Widholm", + "email": "kristofer@chromatichq.com" + }, + { + "name": "Nigel Cunningham", + "email": "nigel.cunningham@technocrat.com.au" + } + ], + "description": "Shim to allow support of different psr/message versions.", + "support": { + "issues": "https://github.com/mpdf/psr-http-message-shim/issues", + "source": "https://github.com/mpdf/psr-http-message-shim/tree/v2.0.1" + }, + "time": "2023-10-02T14:34:03+00:00" + }, + { + "name": "mpdf/psr-log-aware-trait", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/mpdf/psr-log-aware-trait.git", + "reference": "a633da6065e946cc491e1c962850344bb0bf3e78" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mpdf/psr-log-aware-trait/zipball/a633da6065e946cc491e1c962850344bb0bf3e78", + "reference": "a633da6065e946cc491e1c962850344bb0bf3e78", + "shasum": "" + }, + "require": { + "psr/log": "^3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Mpdf\\PsrLogAwareTrait\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Dorison", + "email": "mark@chromatichq.com" + }, + { + "name": "Kristofer Widholm", + "email": "kristofer@chromatichq.com" + } + ], + "description": "Trait to allow support of different psr/log versions.", + "support": { + "issues": "https://github.com/mpdf/psr-log-aware-trait/issues", + "source": "https://github.com/mpdf/psr-log-aware-trait/tree/v3.0.0" + }, + "time": "2023-05-03T06:19:36+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.13.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/1720ddd719e16cf0db4eb1c6eca108031636d46c", + "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2025-04-29T12:36:36+00:00" + }, + { + "name": "nesbot/carbon", + "version": "3.9.1", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon.git", + "reference": "ced71f79398ece168e24f7f7710462f462310d4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/ced71f79398ece168e24f7f7710462f462310d4d", + "reference": "ced71f79398ece168e24f7f7710462f462310d4d", + "shasum": "" + }, + "require": { + "carbonphp/carbon-doctrine-types": "<100.0", + "ext-json": "*", + "php": "^8.1", + "psr/clock": "^1.0", + "symfony/clock": "^6.3 || ^7.0", + "symfony/polyfill-mbstring": "^1.0", + "symfony/translation": "^4.4.18 || ^5.2.1|| ^6.0 || ^7.0" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "require-dev": { + "doctrine/dbal": "^3.6.3 || ^4.0", + "doctrine/orm": "^2.15.2 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.57.2", + "kylekatarnls/multi-tester": "^2.5.3", + "ondrejmirtes/better-reflection": "^6.25.0.4", + "phpmd/phpmd": "^2.15.0", + "phpstan/extension-installer": "^1.3.1", + "phpstan/phpstan": "^1.11.2", + "phpunit/phpunit": "^10.5.20", + "squizlabs/php_codesniffer": "^3.9.0" + }, + "bin": [ + "bin/carbon" + ], + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + }, + "branch-alias": { + "dev-2.x": "2.x-dev", + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "https://markido.com" + }, + { + "name": "kylekatarnls", + "homepage": "https://github.com/kylekatarnls" + } + ], + "description": "An API extension for DateTime that supports 281 different languages.", + "homepage": "https://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "support": { + "docs": "https://carbon.nesbot.com/docs", + "issues": "https://github.com/CarbonPHP/carbon/issues", + "source": "https://github.com/CarbonPHP/carbon" + }, + "funding": [ + { + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" + }, + { + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", + "type": "tidelift" + } + ], + "time": "2025-05-01T19:51:51+00:00" + }, + { + "name": "nette/schema", + "version": "v1.3.2", + "source": { + "type": "git", + "url": "https://github.com/nette/schema.git", + "reference": "da801d52f0354f70a638673c4a0f04e16529431d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/schema/zipball/da801d52f0354f70a638673c4a0f04e16529431d", + "reference": "da801d52f0354f70a638673c4a0f04e16529431d", + "shasum": "" + }, + "require": { + "nette/utils": "^4.0", + "php": "8.1 - 8.4" + }, + "require-dev": { + "nette/tester": "^2.5.2", + "phpstan/phpstan-nette": "^1.0", + "tracy/tracy": "^2.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "📐 Nette Schema: validating data structures against a given Schema.", + "homepage": "https://nette.org", + "keywords": [ + "config", + "nette" + ], + "support": { + "issues": "https://github.com/nette/schema/issues", + "source": "https://github.com/nette/schema/tree/v1.3.2" + }, + "time": "2024-10-06T23:10:23+00:00" + }, + { + "name": "nette/utils", + "version": "v4.0.6", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "ce708655043c7050eb050df361c5e313cf708309" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/ce708655043c7050eb050df361c5e313cf708309", + "reference": "ce708655043c7050eb050df361c5e313cf708309", + "shasum": "" + }, + "require": { + "php": "8.0 - 8.4" + }, + "conflict": { + "nette/finder": "<3", + "nette/schema": "<1.2.2" + }, + "require-dev": { + "jetbrains/phpstorm-attributes": "dev-master", + "nette/tester": "^2.5", + "phpstan/phpstan": "^1.0", + "tracy/tracy": "^2.9" + }, + "suggest": { + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", + "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", + "keywords": [ + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" + ], + "support": { + "issues": "https://github.com/nette/utils/issues", + "source": "https://github.com/nette/utils/tree/v4.0.6" + }, + "time": "2025-03-30T21:06:30+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.4.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "447a020a1f875a434d62f2a401f53b82a396e494" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", + "reference": "447a020a1f875a434d62f2a401f53b82a396e494", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" + }, + "time": "2024-12-30T11:07:19+00:00" + }, + { + "name": "nunomaduro/termwind", + "version": "v2.3.1", + "source": { + "type": "git", + "url": "https://github.com/nunomaduro/termwind.git", + "reference": "dfa08f390e509967a15c22493dc0bac5733d9123" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/dfa08f390e509967a15c22493dc0bac5733d9123", + "reference": "dfa08f390e509967a15c22493dc0bac5733d9123", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^8.2", + "symfony/console": "^7.2.6" + }, + "require-dev": { + "illuminate/console": "^11.44.7", + "laravel/pint": "^1.22.0", + "mockery/mockery": "^1.6.12", + "pestphp/pest": "^2.36.0 || ^3.8.2", + "phpstan/phpstan": "^1.12.25", + "phpstan/phpstan-strict-rules": "^1.6.2", + "symfony/var-dumper": "^7.2.6", + "thecodingmachine/phpstan-strict-rules": "^1.0.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Termwind\\Laravel\\TermwindServiceProvider" + ] + }, + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "files": [ + "src/Functions.php" + ], + "psr-4": { + "Termwind\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Its like Tailwind CSS, but for the console.", + "keywords": [ + "cli", + "console", + "css", + "package", + "php", + "style" + ], + "support": { + "issues": "https://github.com/nunomaduro/termwind/issues", + "source": "https://github.com/nunomaduro/termwind/tree/v2.3.1" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://github.com/xiCO2k", + "type": "github" + } + ], + "time": "2025-05-08T08:14:37+00:00" + }, + { + "name": "openspout/openspout", + "version": "v4.28.5", + "source": { + "type": "git", + "url": "https://github.com/openspout/openspout.git", + "reference": "ab05a09fe6fce57c90338f83280648a9786ce36b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/openspout/openspout/zipball/ab05a09fe6fce57c90338f83280648a9786ce36b", + "reference": "ab05a09fe6fce57c90338f83280648a9786ce36b", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-filter": "*", + "ext-libxml": "*", + "ext-xmlreader": "*", + "ext-zip": "*", + "php": "~8.2.0 || ~8.3.0 || ~8.4.0" + }, + "require-dev": { + "ext-zlib": "*", + "friendsofphp/php-cs-fixer": "^3.68.3", + "infection/infection": "^0.29.10", + "phpbench/phpbench": "^1.4.0", + "phpstan/phpstan": "^2.1.2", + "phpstan/phpstan-phpunit": "^2.0.4", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^11.5.4" + }, + "suggest": { + "ext-iconv": "To handle non UTF-8 CSV files (if \"php-mbstring\" is not already installed or is too limited)", + "ext-mbstring": "To handle non UTF-8 CSV files (if \"iconv\" is not already installed)" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "OpenSpout\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Adrien Loison", + "email": "adrien@box.com" + } + ], + "description": "PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way", + "homepage": "https://github.com/openspout/openspout", + "keywords": [ + "OOXML", + "csv", + "excel", + "memory", + "odf", + "ods", + "office", + "open", + "php", + "read", + "scale", + "spreadsheet", + "stream", + "write", + "xlsx" + ], + "support": { + "issues": "https://github.com/openspout/openspout/issues", + "source": "https://github.com/openspout/openspout/tree/v4.28.5" + }, + "funding": [ + { + "url": "https://paypal.me/filippotessarotto", + "type": "custom" + }, + { + "url": "https://github.com/Slamdunk", + "type": "github" + } + ], + "time": "2025-01-30T13:51:11+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.100", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", + "shasum": "" + }, + "require": { + "php": ">= 7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2020-10-15T08:29:30+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.9.3", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2024-07-20T21:41:07+00:00" + }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" + }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "time": "2022-11-25T14:36:26+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, + { + "name": "psr/log", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.2" + }, + "time": "2024-09-11T13:17:53+00:00" + }, + { + "name": "psr/simple-cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" + }, + "time": "2021-10-29T13:26:27+00:00" + }, + { + "name": "psy/psysh", + "version": "v0.12.8", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "85057ceedee50c49d4f6ecaff73ee96adb3b3625" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/85057ceedee50c49d4f6ecaff73ee96adb3b3625", + "reference": "85057ceedee50c49d4f6ecaff73ee96adb3b3625", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-tokenizer": "*", + "nikic/php-parser": "^5.0 || ^4.0", + "php": "^8.0 || ^7.4", + "symfony/console": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4", + "symfony/var-dumper": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4" + }, + "conflict": { + "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.2" + }, + "suggest": { + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-pdo-sqlite": "The doc command requires SQLite to work.", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well." + }, + "bin": [ + "bin/psysh" + ], + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": false, + "forward-command": false + }, + "branch-alias": { + "dev-main": "0.12.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Psy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "An interactive shell for modern PHP.", + "homepage": "http://psysh.org", + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ], + "support": { + "issues": "https://github.com/bobthecow/psysh/issues", + "source": "https://github.com/bobthecow/psysh/tree/v0.12.8" + }, + "time": "2025-03-16T03:05:19+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "ramsey/collection", + "version": "2.1.1", + "source": { + "type": "git", + "url": "https://github.com/ramsey/collection.git", + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/collection/zipball/344572933ad0181accbf4ba763e85a0306a8c5e2", + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "captainhook/plugin-composer": "^5.3", + "ergebnis/composer-normalize": "^2.45", + "fakerphp/faker": "^1.24", + "hamcrest/hamcrest-php": "^2.0", + "jangregor/phpstan-prophecy": "^2.1", + "mockery/mockery": "^1.6", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.4", + "phpspec/prophecy-phpunit": "^2.3", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-mockery": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^10.5", + "ramsey/coding-standard": "^2.3", + "ramsey/conventional-commits": "^1.6", + "roave/security-advisories": "dev-latest" + }, + "type": "library", + "extra": { + "captainhook": { + "force-install": true + }, + "ramsey/conventional-commits": { + "configFile": "conventional-commits.json" + } + }, + "autoload": { + "psr-4": { + "Ramsey\\Collection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "A PHP library for representing and manipulating collections.", + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "support": { + "issues": "https://github.com/ramsey/collection/issues", + "source": "https://github.com/ramsey/collection/tree/2.1.1" + }, + "time": "2025-03-22T05:38:12+00:00" + }, + { + "name": "ramsey/uuid", + "version": "4.7.6", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088", + "shasum": "" + }, + "require": { + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", + "ext-json": "*", + "php": "^8.0", + "ramsey/collection": "^1.2 || ^2.0" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "captainhook/captainhook": "^5.10", + "captainhook/plugin-composer": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.8", + "ergebnis/composer-normalize": "^2.15", + "mockery/mockery": "^1.3", + "paragonie/random-lib": "^2", + "php-mock/php-mock": "^2.2", + "php-mock/php-mock-mockery": "^1.3", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpbench/phpbench": "^1.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^8.5 || ^9", + "ramsey/composer-repl": "^1.4", + "slevomat/coding-standard": "^8.4", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.9" + }, + "suggest": { + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", + "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "type": "library", + "extra": { + "captainhook": { + "force-install": true + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "support": { + "issues": "https://github.com/ramsey/uuid/issues", + "source": "https://github.com/ramsey/uuid/tree/4.7.6" + }, + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid", + "type": "tidelift" + } + ], + "time": "2024-04-27T21:32:50+00:00" + }, + { + "name": "ryangjchandler/blade-capture-directive", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/ryangjchandler/blade-capture-directive.git", + "reference": "bbb1513dfd89eaec87a47fe0c449a7e3d4a1976d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ryangjchandler/blade-capture-directive/zipball/bbb1513dfd89eaec87a47fe0c449a7e3d4a1976d", + "reference": "bbb1513dfd89eaec87a47fe0c449a7e3d4a1976d", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^10.0|^11.0|^12.0", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.9.2" + }, + "require-dev": { + "nunomaduro/collision": "^7.0|^8.0", + "nunomaduro/larastan": "^2.0|^3.0", + "orchestra/testbench": "^8.0|^9.0|^10.0", + "pestphp/pest": "^2.0|^3.7", + "pestphp/pest-plugin-laravel": "^2.0|^3.1", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0|^2.0", + "phpstan/phpstan-phpunit": "^1.0|^2.0", + "phpunit/phpunit": "^10.0|^11.5.3", + "spatie/laravel-ray": "^1.26" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "BladeCaptureDirective": "RyanChandler\\BladeCaptureDirective\\Facades\\BladeCaptureDirective" + }, + "providers": [ + "RyanChandler\\BladeCaptureDirective\\BladeCaptureDirectiveServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "RyanChandler\\BladeCaptureDirective\\": "src", + "RyanChandler\\BladeCaptureDirective\\Database\\Factories\\": "database/factories" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ryan Chandler", + "email": "support@ryangjchandler.co.uk", + "role": "Developer" + } + ], + "description": "Create inline partials in your Blade templates with ease.", + "homepage": "https://github.com/ryangjchandler/blade-capture-directive", + "keywords": [ + "blade-capture-directive", + "laravel", + "ryangjchandler" + ], + "support": { + "issues": "https://github.com/ryangjchandler/blade-capture-directive/issues", + "source": "https://github.com/ryangjchandler/blade-capture-directive/tree/v1.1.0" + }, + "funding": [ + { + "url": "https://github.com/ryangjchandler", + "type": "github" + } + ], + "time": "2025-02-25T09:09:36+00:00" + }, + { + "name": "sabberworm/php-css-parser", + "version": "v8.8.0", + "source": { + "type": "git", + "url": "https://github.com/MyIntervals/PHP-CSS-Parser.git", + "reference": "3de493bdddfd1f051249af725c7e0d2c38fed740" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/3de493bdddfd1f051249af725c7e0d2c38fed740", + "reference": "3de493bdddfd1f051249af725c7e0d2c38fed740", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": "^5.6.20 || ^7.0.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" + }, + "require-dev": { + "phpunit/phpunit": "5.7.27 || 6.5.14 || 7.5.20 || 8.5.41" + }, + "suggest": { + "ext-mbstring": "for parsing UTF-8 CSS" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "9.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Sabberworm\\CSS\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Raphael Schweikert" + }, + { + "name": "Oliver Klee", + "email": "github@oliverklee.de" + }, + { + "name": "Jake Hotson", + "email": "jake.github@qzdesign.co.uk" + } + ], + "description": "Parser for CSS Files written in PHP", + "homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser", + "keywords": [ + "css", + "parser", + "stylesheet" + ], + "support": { + "issues": "https://github.com/MyIntervals/PHP-CSS-Parser/issues", + "source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v8.8.0" + }, + "time": "2025-03-23T17:59:05+00:00" + }, + { + "name": "setasign/fpdi", + "version": "v2.6.3", + "source": { + "type": "git", + "url": "https://github.com/Setasign/FPDI.git", + "reference": "67c31f5e50c93c20579ca9e23035d8c540b51941" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Setasign/FPDI/zipball/67c31f5e50c93c20579ca9e23035d8c540b51941", + "reference": "67c31f5e50c93c20579ca9e23035d8c540b51941", + "shasum": "" + }, + "require": { + "ext-zlib": "*", + "php": "^7.1 || ^8.0" + }, + "conflict": { + "setasign/tfpdf": "<1.31" + }, + "require-dev": { + "phpunit/phpunit": "^7", + "setasign/fpdf": "~1.8.6", + "setasign/tfpdf": "~1.33", + "squizlabs/php_codesniffer": "^3.5", + "tecnickcom/tcpdf": "^6.2" + }, + "suggest": { + "setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured." + }, + "type": "library", + "autoload": { + "psr-4": { + "setasign\\Fpdi\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Slabon", + "email": "jan.slabon@setasign.com", + "homepage": "https://www.setasign.com" + }, + { + "name": "Maximilian Kresse", + "email": "maximilian.kresse@setasign.com", + "homepage": "https://www.setasign.com" + } + ], + "description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.", + "homepage": "https://www.setasign.com/fpdi", + "keywords": [ + "fpdf", + "fpdi", + "pdf" + ], + "support": { + "issues": "https://github.com/Setasign/FPDI/issues", + "source": "https://github.com/Setasign/FPDI/tree/v2.6.3" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/setasign/fpdi", + "type": "tidelift" + } + ], + "time": "2025-02-05T13:22:35+00:00" + }, + { + "name": "spatie/browsershot", + "version": "5.0.10", + "source": { + "type": "git", + "url": "https://github.com/spatie/browsershot.git", + "reference": "9e5ae15487b3cdc3eb03318c1c8ac38971f60e58" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/browsershot/zipball/9e5ae15487b3cdc3eb03318c1c8ac38971f60e58", + "reference": "9e5ae15487b3cdc3eb03318c1c8ac38971f60e58", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "ext-json": "*", + "php": "^8.2", + "spatie/temporary-directory": "^2.0", + "symfony/process": "^6.0|^7.0" + }, + "require-dev": { + "pestphp/pest": "^3.0", + "spatie/image": "^3.6", + "spatie/pdf-to-text": "^1.52", + "spatie/phpunit-snapshot-assertions": "^4.2.3|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Browsershot\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://github.com/freekmurze", + "role": "Developer" + } + ], + "description": "Convert a webpage to an image or pdf using headless Chrome", + "homepage": "https://github.com/spatie/browsershot", + "keywords": [ + "chrome", + "convert", + "headless", + "image", + "pdf", + "puppeteer", + "screenshot", + "webpage" + ], + "support": { + "source": "https://github.com/spatie/browsershot/tree/5.0.10" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2025-05-15T07:10:57+00:00" + }, + { + "name": "spatie/color", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/color.git", + "reference": "142af7fec069a420babea80a5412eb2f646dcd8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/color/zipball/142af7fec069a420babea80a5412eb2f646dcd8c", + "reference": "142af7fec069a420babea80a5412eb2f646dcd8c", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "pestphp/pest": "^1.22", + "phpunit/phpunit": "^6.5||^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Color\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sebastian De Deyne", + "email": "sebastian@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "A little library to handle color conversions", + "homepage": "https://github.com/spatie/color", + "keywords": [ + "color", + "conversion", + "rgb", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/color/issues", + "source": "https://github.com/spatie/color/tree/1.8.0" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2025-02-10T09:22:41+00:00" + }, + { + "name": "spatie/invade", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/invade.git", + "reference": "b920f6411d21df4e8610a138e2e87ae4957d7f63" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/invade/zipball/b920f6411d21df4e8610a138e2e87ae4957d7f63", + "reference": "b920f6411d21df4e8610a138e2e87ae4957d7f63", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "pestphp/pest": "^1.20", + "phpstan/phpstan": "^1.4", + "spatie/ray": "^1.28" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Spatie\\Invade\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "role": "Developer" + } + ], + "description": "A PHP function to work with private properties and methods", + "homepage": "https://github.com/spatie/invade", + "keywords": [ + "invade", + "spatie" + ], + "support": { + "source": "https://github.com/spatie/invade/tree/2.1.0" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2024-05-17T09:06:10+00:00" + }, + { + "name": "spatie/laravel-package-tools", + "version": "1.92.4", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-package-tools.git", + "reference": "d20b1969f836d210459b78683d85c9cd5c5f508c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/d20b1969f836d210459b78683d85c9cd5c5f508c", + "reference": "d20b1969f836d210459b78683d85c9cd5c5f508c", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^9.28|^10.0|^11.0|^12.0", + "php": "^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.5", + "orchestra/testbench": "^7.7|^8.0|^9.0|^10.0", + "pestphp/pest": "^1.23|^2.1|^3.1", + "phpunit/php-code-coverage": "^9.0|^10.0|^11.0", + "phpunit/phpunit": "^9.5.24|^10.5|^11.5", + "spatie/pest-plugin-test-time": "^1.1|^2.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\LaravelPackageTools\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "role": "Developer" + } + ], + "description": "Tools for creating Laravel packages", + "homepage": "https://github.com/spatie/laravel-package-tools", + "keywords": [ + "laravel-package-tools", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/laravel-package-tools/issues", + "source": "https://github.com/spatie/laravel-package-tools/tree/1.92.4" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2025-04-11T15:27:14+00:00" + }, + { + "name": "spatie/laravel-permission", + "version": "6.18.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-permission.git", + "reference": "3c05f04d12275dfbe462c8b4aae3290e586c2dde" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/3c05f04d12275dfbe462c8b4aae3290e586c2dde", + "reference": "3c05f04d12275dfbe462c8b4aae3290e586c2dde", + "shasum": "" + }, + "require": { + "illuminate/auth": "^8.12|^9.0|^10.0|^11.0|^12.0", + "illuminate/container": "^8.12|^9.0|^10.0|^11.0|^12.0", + "illuminate/contracts": "^8.12|^9.0|^10.0|^11.0|^12.0", + "illuminate/database": "^8.12|^9.0|^10.0|^11.0|^12.0", + "php": "^8.0" + }, + "require-dev": { + "laravel/passport": "^11.0|^12.0", + "laravel/pint": "^1.0", + "orchestra/testbench": "^6.23|^7.0|^8.0|^9.0|^10.0", + "phpunit/phpunit": "^9.4|^10.1|^11.5" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\Permission\\PermissionServiceProvider" + ] + }, + "branch-alias": { + "dev-main": "6.x-dev", + "dev-master": "6.x-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Spatie\\Permission\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Permission handling for Laravel 8.0 and up", + "homepage": "https://github.com/spatie/laravel-permission", + "keywords": [ + "acl", + "laravel", + "permission", + "permissions", + "rbac", + "roles", + "security", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/laravel-permission/issues", + "source": "https://github.com/spatie/laravel-permission/tree/6.18.0" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2025-05-14T03:32:23+00:00" + }, + { + "name": "spatie/macroable", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/macroable.git", + "reference": "ec2c320f932e730607aff8052c44183cf3ecb072" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/macroable/zipball/ec2c320f932e730607aff8052c44183cf3ecb072", + "reference": "ec2c320f932e730607aff8052c44183cf3ecb072", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.0|^9.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Macroable\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "A trait to dynamically add methods to a class", + "homepage": "https://github.com/spatie/macroable", + "keywords": [ + "macroable", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/macroable/issues", + "source": "https://github.com/spatie/macroable/tree/2.0.0" + }, + "time": "2021-03-26T22:39:02+00:00" + }, + { + "name": "spatie/temporary-directory", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/temporary-directory.git", + "reference": "580eddfe9a0a41a902cac6eeb8f066b42e65a32b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/temporary-directory/zipball/580eddfe9a0a41a902cac6eeb8f066b42e65a32b", + "reference": "580eddfe9a0a41a902cac6eeb8f066b42e65a32b", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\TemporaryDirectory\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alex Vanderbist", + "email": "alex@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Easily create, use and destroy temporary directories", + "homepage": "https://github.com/spatie/temporary-directory", + "keywords": [ + "php", + "spatie", + "temporary-directory" + ], + "support": { + "issues": "https://github.com/spatie/temporary-directory/issues", + "source": "https://github.com/spatie/temporary-directory/tree/2.3.0" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2025-01-13T13:04:43+00:00" + }, + { + "name": "spatie/url", + "version": "2.4.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/url.git", + "reference": "93a51db743cdec22b081c64593e193887c9cd395" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/url/zipball/93a51db743cdec22b081c64593e193887c9cd395", + "reference": "93a51db743cdec22b081c64593e193887c9cd395", + "shasum": "" + }, + "require": { + "php": "^8.0", + "psr/http-message": "^1.0 || ^2.0", + "spatie/macroable": "^1.0 || ^2.0" + }, + "require-dev": { + "pestphp/pest": "^1.21" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Url\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sebastian De Deyne", + "email": "sebastian@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Parse, build and manipulate URL's", + "homepage": "https://github.com/spatie/url", + "keywords": [ + "spatie", + "url" + ], + "support": { + "issues": "https://github.com/spatie/url/issues", + "source": "https://github.com/spatie/url/tree/2.4.0" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2024-03-08T11:35:19+00:00" + }, + { + "name": "symfony/clock", + "version": "v7.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/clock.git", + "reference": "b81435fbd6648ea425d1ee96a2d8e68f4ceacd24" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/clock/zipball/b81435fbd6648ea425d1ee96a2d8e68f4ceacd24", + "reference": "b81435fbd6648ea425d1ee96a2d8e68f4ceacd24", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/clock": "^1.0", + "symfony/polyfill-php83": "^1.28" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/now.php" + ], + "psr-4": { + "Symfony\\Component\\Clock\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Decouples applications from the system clock", + "homepage": "https://symfony.com", + "keywords": [ + "clock", + "psr20", + "time" + ], + "support": { + "source": "https://github.com/symfony/clock/tree/v7.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:21:43+00:00" + }, + { + "name": "symfony/console", + "version": "v7.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "0e2e3f38c192e93e622e41ec37f4ca70cfedf218" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/0e2e3f38c192e93e622e41ec37f4ca70cfedf218", + "reference": "0e2e3f38c192e93e622e41ec37f4ca70cfedf218", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^6.4|^7.0" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v7.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-04-07T19:09:28+00:00" + }, + { + "name": "symfony/css-selector", + "version": "v7.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "601a5ce9aaad7bf10797e3663faefce9e26c24e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/601a5ce9aaad7bf10797e3663faefce9e26c24e2", + "reference": "601a5ce9aaad7bf10797e3663faefce9e26c24e2", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Converts CSS selectors to XPath expressions", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/css-selector/tree/v7.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:21:43+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.5.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:20:29+00:00" + }, + { + "name": "symfony/error-handler", + "version": "v7.2.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/error-handler.git", + "reference": "102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b", + "reference": "102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/log": "^1|^2|^3", + "symfony/var-dumper": "^6.4|^7.0" + }, + "conflict": { + "symfony/deprecation-contracts": "<2.5", + "symfony/http-kernel": "<6.4" + }, + "require-dev": { + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0" + }, + "bin": [ + "Resources/bin/patch-type-declarations" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\ErrorHandler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to manage errors and ease debugging PHP code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/error-handler/tree/v7.2.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-03-03T07:12:39+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v7.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/910c5db85a5356d0fea57680defec4e99eb9c8c1", + "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/event-dispatcher-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/service-contracts": "<2.5" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/error-handler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v7.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:21:43+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v3.5.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7642f5e970b672283b7823222ae8ef8bbc160b9f", + "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:20:29+00:00" + }, + { + "name": "symfony/finder", + "version": "v7.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "87a71856f2f56e4100373e92529eed3171695cfb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/87a71856f2f56e4100373e92529eed3171695cfb", + "reference": "87a71856f2f56e4100373e92529eed3171695cfb", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "symfony/filesystem": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v7.2.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-12-30T19:00:17+00:00" + }, + { + "name": "symfony/html-sanitizer", + "version": "v7.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/html-sanitizer.git", + "reference": "1bd0c8fd5938d9af3f081a7c43d360ddefd494ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/html-sanitizer/zipball/1bd0c8fd5938d9af3f081a7c43d360ddefd494ca", + "reference": "1bd0c8fd5938d9af3f081a7c43d360ddefd494ca", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "league/uri": "^6.5|^7.0", + "masterminds/html5": "^2.7.2", + "php": ">=8.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HtmlSanitizer\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Titouan Galopin", + "email": "galopintitouan@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to sanitize untrusted HTML input for safe insertion into a document's DOM.", + "homepage": "https://symfony.com", + "keywords": [ + "Purifier", + "html", + "sanitizer" + ], + "support": { + "source": "https://github.com/symfony/html-sanitizer/tree/v7.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-03-31T08:29:03+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v7.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "6023ec7607254c87c5e69fb3558255aca440d72b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/6023ec7607254c87c5e69fb3558255aca440d72b", + "reference": "6023ec7607254c87c5e69fb3558255aca440d72b", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3.0", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php83": "^1.27" + }, + "conflict": { + "doctrine/dbal": "<3.6", + "symfony/cache": "<6.4.12|>=7.0,<7.1.5" + }, + "require-dev": { + "doctrine/dbal": "^3.6|^4", + "predis/predis": "^1.1|^2.0", + "symfony/cache": "^6.4.12|^7.1.5", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/mime": "^6.4|^7.0", + "symfony/rate-limiter": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Defines an object-oriented layer for the HTTP specification", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v7.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-04-09T08:14:01+00:00" + }, + { + "name": "symfony/http-kernel", + "version": "v7.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "f9dec01e6094a063e738f8945ef69c0cfcf792ec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f9dec01e6094a063e738f8945ef69c0cfcf792ec", + "reference": "f9dec01e6094a063e738f8945ef69c0cfcf792ec", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/error-handler": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/browser-kit": "<6.4", + "symfony/cache": "<6.4", + "symfony/config": "<6.4", + "symfony/console": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/doctrine-bridge": "<6.4", + "symfony/form": "<6.4", + "symfony/http-client": "<6.4", + "symfony/http-client-contracts": "<2.5", + "symfony/mailer": "<6.4", + "symfony/messenger": "<6.4", + "symfony/translation": "<6.4", + "symfony/translation-contracts": "<2.5", + "symfony/twig-bridge": "<6.4", + "symfony/validator": "<6.4", + "symfony/var-dumper": "<6.4", + "twig/twig": "<3.12" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/cache": "^1.0|^2.0|^3.0", + "symfony/browser-kit": "^6.4|^7.0", + "symfony/clock": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/console": "^6.4|^7.0", + "symfony/css-selector": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/dom-crawler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", + "symfony/http-client-contracts": "^2.5|^3", + "symfony/process": "^6.4|^7.0", + "symfony/property-access": "^7.1", + "symfony/routing": "^6.4|^7.0", + "symfony/serializer": "^7.1", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/translation": "^6.4|^7.0", + "symfony/translation-contracts": "^2.5|^3", + "symfony/uid": "^6.4|^7.0", + "symfony/validator": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0", + "symfony/var-exporter": "^6.4|^7.0", + "twig/twig": "^3.12" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a structured process for converting a Request into a Response", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-kernel/tree/v7.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-05-02T09:04:03+00:00" + }, + { + "name": "symfony/mailer", + "version": "v7.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/mailer.git", + "reference": "998692469d6e698c6eadc7ef37a6530a9eabb356" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mailer/zipball/998692469d6e698c6eadc7ef37a6530a9eabb356", + "reference": "998692469d6e698c6eadc7ef37a6530a9eabb356", + "shasum": "" + }, + "require": { + "egulias/email-validator": "^2.1.10|^3|^4", + "php": ">=8.2", + "psr/event-dispatcher": "^1", + "psr/log": "^1|^2|^3", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/mime": "^7.2", + "symfony/service-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/http-client-contracts": "<2.5", + "symfony/http-kernel": "<6.4", + "symfony/messenger": "<6.4", + "symfony/mime": "<6.4", + "symfony/twig-bridge": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/twig-bridge": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Mailer\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Helps sending emails", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/mailer/tree/v7.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-04-04T09:50:51+00:00" + }, + { + "name": "symfony/mime", + "version": "v7.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/mime.git", + "reference": "706e65c72d402539a072d0d6ad105fff6c161ef1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mime/zipball/706e65c72d402539a072d0d6ad105fff6c161ef1", + "reference": "706e65c72d402539a072d0d6ad105fff6c161ef1", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "conflict": { + "egulias/email-validator": "~3.0.0", + "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<1.4.0", + "symfony/mailer": "<6.4", + "symfony/serializer": "<6.4.3|>7.0,<7.0.3" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10|^3.1|^4", + "league/html-to-markdown": "^5.0", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/property-access": "^6.4|^7.0", + "symfony/property-info": "^6.4|^7.0", + "symfony/serializer": "^6.4.3|^7.0.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Mime\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows manipulating MIME messages", + "homepage": "https://symfony.com", + "keywords": [ + "mime", + "mime-type" + ], + "support": { + "source": "https://github.com/symfony/mime/tree/v7.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-04-27T13:34:41+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-intl-icu", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-icu.git", + "reference": "763d2a91fea5681509ca01acbc1c5e450d127811" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/763d2a91fea5681509ca01acbc1c5e450d127811", + "reference": "763d2a91fea5681509ca01acbc1c5e450d127811", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance and support of other locales than \"en\"" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Icu\\": "" + }, + "classmap": [ + "Resources/stubs" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's ICU-related data and classes", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "icu", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-icu/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-12-21T18:38:29+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "9614ac4d8061dc257ecc64cba1b140873dce8ad3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/9614ac4d8061dc257ecc64cba1b140873dce8ad3", + "reference": "9614ac4d8061dc257ecc64cba1b140873dce8ad3", + "shasum": "" + }, + "require": { + "php": ">=7.2", + "symfony/polyfill-intl-normalizer": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-10T14:38:51+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "3833d7255cc303546435cb650316bff708a1c75c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-12-23T08:48:59+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-01-02T08:10:11+00:00" + }, + { + "name": "symfony/polyfill-php83", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php83.git", + "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/2fb86d65e2d424369ad2905e83b236a8805ba491", + "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php83\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php83/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-uuid", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-uuid.git", + "reference": "21533be36c24be3f4b1669c4725c7d1d2bab4ae2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/21533be36c24be3f4b1669c4725c7d1d2bab4ae2", + "reference": "21533be36c24be3f4b1669c4725c7d1d2bab4ae2", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-uuid": "*" + }, + "suggest": { + "ext-uuid": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Uuid\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Grégoire Pineau", + "email": "lyrixx@lyrixx.info" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for uuid functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "uuid" + ], + "support": { + "source": "https://github.com/symfony/polyfill-uuid/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/process", + "version": "v7.2.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "87b7c93e57df9d8e39a093d32587702380ff045d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/87b7c93e57df9d8e39a093d32587702380ff045d", + "reference": "87b7c93e57df9d8e39a093d32587702380ff045d", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v7.2.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-03-13T12:21:46+00:00" + }, + { + "name": "symfony/routing", + "version": "v7.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "ee9a67edc6baa33e5fae662f94f91fd262930996" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/ee9a67edc6baa33e5fae662f94f91fd262930996", + "reference": "ee9a67edc6baa33e5fae662f94f91fd262930996", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/config": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/yaml": "<6.4" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/yaml": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Maps an HTTP request to a set of configuration variables", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "support": { + "source": "https://github.com/symfony/routing/tree/v7.2.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-01-17T10:56:55+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.5.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:20:29+00:00" + }, + { + "name": "symfony/string", + "version": "v7.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "a214fe7d62bd4df2a76447c67c6b26e1d5e74931" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/a214fe7d62bd4df2a76447c67c6b26e1d5e74931", + "reference": "a214fe7d62bd4df2a76447c67c6b26e1d5e74931", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/emoji": "^7.1", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v7.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-04-20T20:18:16+00:00" + }, + { + "name": "symfony/translation", + "version": "v7.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "e7fd8e2a4239b79a0fd9fb1fef3e0e7f969c6dc6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/e7fd8e2a4239b79a0fd9fb1fef3e0e7f969c6dc6", + "reference": "e7fd8e2a4239b79a0fd9fb1fef3e0e7f969c6dc6", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/translation-contracts": "^2.5|^3.0" + }, + "conflict": { + "symfony/config": "<6.4", + "symfony/console": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/http-client-contracts": "<2.5", + "symfony/http-kernel": "<6.4", + "symfony/service-contracts": "<2.5", + "symfony/twig-bundle": "<6.4", + "symfony/yaml": "<6.4" + }, + "provide": { + "symfony/translation-implementation": "2.3|3.0" + }, + "require-dev": { + "nikic/php-parser": "^4.18|^5.0", + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0", + "symfony/console": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", + "symfony/http-client-contracts": "^2.5|^3.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", + "symfony/polyfill-intl-icu": "^1.21", + "symfony/routing": "^6.4|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to internationalize your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/translation/tree/v7.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-04-07T19:09:28+00:00" + }, + { + "name": "symfony/translation-contracts", + "version": "v3.5.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "4667ff3bd513750603a09c8dedbea942487fb07c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/4667ff3bd513750603a09c8dedbea942487fb07c", + "reference": "4667ff3bd513750603a09c8dedbea942487fb07c", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v3.5.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:20:29+00:00" + }, + { + "name": "symfony/uid", + "version": "v7.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/uid.git", + "reference": "2d294d0c48df244c71c105a169d0190bfb080426" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/uid/zipball/2d294d0c48df244c71c105a169d0190bfb080426", + "reference": "2d294d0c48df244c71c105a169d0190bfb080426", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-uuid": "^1.15" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Uid\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Grégoire Pineau", + "email": "lyrixx@lyrixx.info" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to generate and represent UIDs", + "homepage": "https://symfony.com", + "keywords": [ + "UID", + "ulid", + "uuid" + ], + "support": { + "source": "https://github.com/symfony/uid/tree/v7.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:21:43+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v7.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "9c46038cd4ed68952166cf7001b54eb539184ccb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9c46038cd4ed68952166cf7001b54eb539184ccb", + "reference": "9c46038cd4ed68952166cf7001b54eb539184ccb", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/console": "<6.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/uid": "^6.4|^7.0", + "twig/twig": "^3.12" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v7.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-04-09T08:14:01+00:00" + }, + { + "name": "tightenco/ziggy", + "version": "v2.5.3", + "source": { + "type": "git", + "url": "https://github.com/tighten/ziggy.git", + "reference": "0b3b521d2c55fbdb04b6721532f7f5f49d32f52b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tighten/ziggy/zipball/0b3b521d2c55fbdb04b6721532f7f5f49d32f52b", + "reference": "0b3b521d2c55fbdb04b6721532f7f5f49d32f52b", + "shasum": "" + }, + "require": { + "ext-json": "*", + "laravel/framework": ">=9.0", + "php": ">=8.1" + }, + "require-dev": { + "laravel/folio": "^1.1", + "orchestra/testbench": "^7.0 || ^8.0 || ^9.0 || ^10.0", + "pestphp/pest": "^2.26|^3.0", + "pestphp/pest-plugin-laravel": "^2.4|^3.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Tighten\\Ziggy\\ZiggyServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Tighten\\Ziggy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Coulbourne", + "email": "daniel@tighten.co" + }, + { + "name": "Jake Bathman", + "email": "jake@tighten.co" + }, + { + "name": "Jacob Baker-Kretzmar", + "email": "jacob@tighten.co" + } + ], + "description": "Use your Laravel named routes in JavaScript.", + "homepage": "https://github.com/tighten/ziggy", + "keywords": [ + "Ziggy", + "javascript", + "laravel", + "routes" + ], + "support": { + "issues": "https://github.com/tighten/ziggy/issues", + "source": "https://github.com/tighten/ziggy/tree/v2.5.3" + }, + "time": "2025-05-17T18:15:19+00:00" + }, + { + "name": "tijsverkoyen/css-to-inline-styles", + "version": "v2.3.0", + "source": { + "type": "git", + "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", + "reference": "0d72ac1c00084279c1816675284073c5a337c20d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/0d72ac1c00084279c1816675284073c5a337c20d", + "reference": "0d72ac1c00084279c1816675284073c5a337c20d", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "php": "^7.4 || ^8.0", + "symfony/css-selector": "^5.4 || ^6.0 || ^7.0" + }, + "require-dev": { + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^8.5.21 || ^9.5.10" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "TijsVerkoyen\\CssToInlineStyles\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Tijs Verkoyen", + "email": "css_to_inline_styles@verkoyen.eu", + "role": "Developer" + } + ], + "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", + "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", + "support": { + "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.3.0" + }, + "time": "2024-12-21T16:25:41+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v5.6.2", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "24ac4c74f91ee2c193fa1aaa5c249cb0822809af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/24ac4c74f91ee2c193fa1aaa5c249cb0822809af", + "reference": "24ac4c74f91ee2c193fa1aaa5c249cb0822809af", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "graham-campbell/result-type": "^1.1.3", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-filter": "*", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "5.6-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2025-04-30T23:37:27+00:00" + }, + { + "name": "voku/portable-ascii", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/voku/portable-ascii.git", + "reference": "b1d923f88091c6bf09699efcd7c8a1b1bfd7351d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/b1d923f88091c6bf09699efcd7c8a1b1bfd7351d", + "reference": "b1d923f88091c6bf09699efcd7c8a1b1bfd7351d", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~6.0 || ~7.0 || ~9.0" + }, + "suggest": { + "ext-intl": "Use Intl for transliterator_transliterate() support" + }, + "type": "library", + "autoload": { + "psr-4": { + "voku\\": "src/voku/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lars Moelleken", + "homepage": "https://www.moelleken.org/" + } + ], + "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", + "homepage": "https://github.com/voku/portable-ascii", + "keywords": [ + "ascii", + "clean", + "php" + ], + "support": { + "issues": "https://github.com/voku/portable-ascii/issues", + "source": "https://github.com/voku/portable-ascii/tree/2.0.3" + }, + "funding": [ + { + "url": "https://www.paypal.me/moelleken", + "type": "custom" + }, + { + "url": "https://github.com/voku", + "type": "github" + }, + { + "url": "https://opencollective.com/portable-ascii", + "type": "open_collective" + }, + { + "url": "https://www.patreon.com/voku", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", + "type": "tidelift" + } + ], + "time": "2024-11-21T01:49:47+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" + } + ], + "packages-dev": [ + { + "name": "fakerphp/faker", + "version": "v1.24.1", + "source": { + "type": "git", + "url": "https://github.com/FakerPHP/Faker.git", + "reference": "e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5", + "reference": "e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "psr/container": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "conflict": { + "fzaninotto/faker": "*" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "doctrine/persistence": "^1.3 || ^2.0", + "ext-intl": "*", + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" + }, + "suggest": { + "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", + "ext-curl": "Required by Faker\\Provider\\Image to download images.", + "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", + "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", + "ext-mbstring": "Required for multibyte Unicode string functionality." + }, + "type": "library", + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "support": { + "issues": "https://github.com/FakerPHP/Faker/issues", + "source": "https://github.com/FakerPHP/Faker/tree/v1.24.1" + }, + "time": "2024-11-21T13:46:39+00:00" + }, + { + "name": "filp/whoops", + "version": "2.18.0", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e", + "reference": "a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "psr/log": "^1.0.1 || ^2.0 || ^3.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^4.0 || ^5.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "throwable", + "whoops" + ], + "support": { + "issues": "https://github.com/filp/whoops/issues", + "source": "https://github.com/filp/whoops/tree/2.18.0" + }, + "funding": [ + { + "url": "https://github.com/denis-sokolov", + "type": "github" + } + ], + "time": "2025-03-15T12:00:00+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", + "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0 || ^3.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.1.1" + }, + "time": "2025-04-30T06:54:44+00:00" + }, + { + "name": "laravel/pail", + "version": "v1.2.2", + "source": { + "type": "git", + "url": "https://github.com/laravel/pail.git", + "reference": "f31f4980f52be17c4667f3eafe034e6826787db2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/pail/zipball/f31f4980f52be17c4667f3eafe034e6826787db2", + "reference": "f31f4980f52be17c4667f3eafe034e6826787db2", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "illuminate/console": "^10.24|^11.0|^12.0", + "illuminate/contracts": "^10.24|^11.0|^12.0", + "illuminate/log": "^10.24|^11.0|^12.0", + "illuminate/process": "^10.24|^11.0|^12.0", + "illuminate/support": "^10.24|^11.0|^12.0", + "nunomaduro/termwind": "^1.15|^2.0", + "php": "^8.2", + "symfony/console": "^6.0|^7.0" + }, + "require-dev": { + "laravel/framework": "^10.24|^11.0|^12.0", + "laravel/pint": "^1.13", + "orchestra/testbench-core": "^8.13|^9.0|^10.0", + "pestphp/pest": "^2.20|^3.0", + "pestphp/pest-plugin-type-coverage": "^2.3|^3.0", + "phpstan/phpstan": "^1.10", + "symfony/var-dumper": "^6.3|^7.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Pail\\PailServiceProvider" + ] + }, + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\Pail\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Easily delve into your Laravel application's log files directly from the command line.", + "homepage": "https://github.com/laravel/pail", + "keywords": [ + "laravel", + "logs", + "php", + "tail" + ], + "support": { + "issues": "https://github.com/laravel/pail/issues", + "source": "https://github.com/laravel/pail" + }, + "time": "2025-01-28T15:15:15+00:00" + }, + { + "name": "laravel/pint", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/pint.git", + "reference": "941d1927c5ca420c22710e98420287169c7bcaf7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/pint/zipball/941d1927c5ca420c22710e98420287169c7bcaf7", + "reference": "941d1927c5ca420c22710e98420287169c7bcaf7", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "ext-tokenizer": "*", + "ext-xml": "*", + "php": "^8.2.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.75.0", + "illuminate/view": "^11.44.7", + "larastan/larastan": "^3.4.0", + "laravel-zero/framework": "^11.36.1", + "mockery/mockery": "^1.6.12", + "nunomaduro/termwind": "^2.3.1", + "pestphp/pest": "^2.36.0" + }, + "bin": [ + "builds/pint" + ], + "type": "project", + "autoload": { + "psr-4": { + "App\\": "app/", + "Database\\Seeders\\": "database/seeders/", + "Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "An opinionated code formatter for PHP.", + "homepage": "https://laravel.com", + "keywords": [ + "format", + "formatter", + "lint", + "linter", + "php" + ], + "support": { + "issues": "https://github.com/laravel/pint/issues", + "source": "https://github.com/laravel/pint" + }, + "time": "2025-05-08T08:38:12+00:00" + }, + { + "name": "laravel/sail", + "version": "v1.43.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/sail.git", + "reference": "71a509b14b2621ce58574274a74290f933c687f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/sail/zipball/71a509b14b2621ce58574274a74290f933c687f7", + "reference": "71a509b14b2621ce58574274a74290f933c687f7", + "shasum": "" + }, + "require": { + "illuminate/console": "^9.52.16|^10.0|^11.0|^12.0", + "illuminate/contracts": "^9.52.16|^10.0|^11.0|^12.0", + "illuminate/support": "^9.52.16|^10.0|^11.0|^12.0", + "php": "^8.0", + "symfony/console": "^6.0|^7.0", + "symfony/yaml": "^6.0|^7.0" + }, + "require-dev": { + "orchestra/testbench": "^7.0|^8.0|^9.0|^10.0", + "phpstan/phpstan": "^1.10" + }, + "bin": [ + "bin/sail" + ], + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Sail\\SailServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Sail\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Docker files for running a basic Laravel application.", + "keywords": [ + "docker", + "laravel" + ], + "support": { + "issues": "https://github.com/laravel/sail/issues", + "source": "https://github.com/laravel/sail" + }, + "time": "2025-05-13T13:34:34+00:00" + }, + { + "name": "mockery/mockery", + "version": "1.6.12", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": ">=7.3" + }, + "conflict": { + "phpunit/phpunit": "<8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.6.17", + "symplify/easy-coding-standard": "^12.1.14" + }, + "type": "library", + "autoload": { + "files": [ + "library/helpers.php", + "library/Mockery.php" + ], + "psr-4": { + "Mockery\\": "library/Mockery" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "https://github.com/padraic", + "role": "Author" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "support": { + "docs": "https://docs.mockery.io/", + "issues": "https://github.com/mockery/mockery/issues", + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" + }, + "time": "2024-05-16T03:13:13+00:00" + }, + { + "name": "nunomaduro/collision", + "version": "v8.8.0", + "source": { + "type": "git", + "url": "https://github.com/nunomaduro/collision.git", + "reference": "4cf9f3b47afff38b139fb79ce54fc71799022ce8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/4cf9f3b47afff38b139fb79ce54fc71799022ce8", + "reference": "4cf9f3b47afff38b139fb79ce54fc71799022ce8", + "shasum": "" + }, + "require": { + "filp/whoops": "^2.18.0", + "nunomaduro/termwind": "^2.3.0", + "php": "^8.2.0", + "symfony/console": "^7.2.5" + }, + "conflict": { + "laravel/framework": "<11.44.2 || >=13.0.0", + "phpunit/phpunit": "<11.5.15 || >=13.0.0" + }, + "require-dev": { + "brianium/paratest": "^7.8.3", + "larastan/larastan": "^3.2", + "laravel/framework": "^11.44.2 || ^12.6", + "laravel/pint": "^1.21.2", + "laravel/sail": "^1.41.0", + "laravel/sanctum": "^4.0.8", + "laravel/tinker": "^2.10.1", + "orchestra/testbench-core": "^9.12.0 || ^10.1", + "pestphp/pest": "^3.8.0", + "sebastian/environment": "^7.2.0 || ^8.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" + ] + }, + "branch-alias": { + "dev-8.x": "8.x-dev" + } + }, + "autoload": { + "files": [ + "./src/Adapters/Phpunit/Autoload.php" + ], + "psr-4": { + "NunoMaduro\\Collision\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Cli error handling for console/command-line PHP applications.", + "keywords": [ + "artisan", + "cli", + "command-line", + "console", + "dev", + "error", + "handling", + "laravel", + "laravel-zero", + "php", + "symfony" + ], + "support": { + "issues": "https://github.com/nunomaduro/collision/issues", + "source": "https://github.com/nunomaduro/collision" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2025-04-03T14:33:09+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "11.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "14d63fbcca18457e49c6f8bebaa91a87e8e188d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/14d63fbcca18457e49c6f8bebaa91a87e8e188d7", + "reference": "14d63fbcca18457e49c6f8bebaa91a87e8e188d7", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^5.4.0", + "php": ">=8.2", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-text-template": "^4.0.1", + "sebastian/code-unit-reverse-lookup": "^4.0.1", + "sebastian/complexity": "^4.0.1", + "sebastian/environment": "^7.2.0", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", + "theseer/tokenizer": "^1.2.3" + }, + "require-dev": { + "phpunit/phpunit": "^11.5.2" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "11.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.9" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2025-02-25T13:26:39+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "5.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/118cfaaa8bc5aef3287bf315b6060b1174754af6", + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-08-27T05:02:59+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "5.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^11.0" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:07:44+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:08:43+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "7.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:09:35+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "11.5.20", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "e6bdea63ecb7a8287d2cdab25bdde3126e0cfe6f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e6bdea63ecb7a8287d2cdab25bdde3126e0cfe6f", + "reference": "e6bdea63ecb7a8287d2cdab25bdde3126e0cfe6f", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.13.1", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=8.2", + "phpunit/php-code-coverage": "^11.0.9", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.3", + "sebastian/comparator": "^6.3.1", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.0", + "sebastian/exporter": "^6.3.0", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/type": "^5.1.2", + "sebastian/version": "^5.0.2", + "staabm/side-effects-detector": "^1.0.5" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "11.5-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.20" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2025-05-11T06:39:52+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:41:36+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/54391c61e4af8078e5b276ab082b6d3c54c9ad64", + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2025-03-19T07:56:08+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:45:54+00:00" + }, + { + "name": "sebastian/comparator", + "version": "6.3.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "24b8fbc2c8e201bb1308e7b05148d6ab393b6959" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/24b8fbc2c8e201bb1308e7b05148d6ab393b6959", + "reference": "24b8fbc2c8e201bb1308e7b05148d6ab393b6959", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.4" + }, + "suggest": { + "ext-bcmath": "For comparing BcMath\\Number objects" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2025-03-07T06:57:01+00:00" + }, + { + "name": "sebastian/complexity", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^5.0", + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:49:50+00:00" + }, + { + "name": "sebastian/diff", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:53:05+00:00" + }, + { + "name": "sebastian/environment", + "version": "7.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "https://github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:54:44+00:00" + }, + { + "name": "sebastian/exporter", + "version": "6.3.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/3473f61172093b2da7de1fb5782e1f24cc036dc3", + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-12-05T09:17:50+00:00" + }, + { + "name": "sebastian/global-state", + "version": "7.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:57:36+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^5.0", + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:58:38+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "6.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:00:13+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:01:32+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/694d156164372abbd149a4b85ccda2e4670c0e16", + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:10:34+00:00" + }, + { + "name": "sebastian/type", + "version": "5.1.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "a8a7e30534b0eb0c77cd9d07e82de1a114389f5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/a8a7e30534b0eb0c77cd9d07e82de1a114389f5e", + "reference": "a8a7e30534b0eb0c77cd9d07e82de1a114389f5e", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/5.1.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2025-03-18T13:35:50+00:00" + }, + { + "name": "sebastian/version", + "version": "5.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-10-09T05:16:32+00:00" + }, + { + "name": "staabm/side-effects-detector", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/staabm/side-effects-detector.git", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^9.6.21", + "symfony/var-dumper": "^5.4.43", + "tomasvotruba/type-coverage": "1.0.0", + "tomasvotruba/unused-public": "1.0.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A static analysis tool to detect side effects in PHP code", + "keywords": [ + "static analysis" + ], + "support": { + "issues": "https://github.com/staabm/side-effects-detector/issues", + "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" + }, + "funding": [ + { + "url": "https://github.com/staabm", + "type": "github" + } + ], + "time": "2024-10-20T05:08:20+00:00" + }, + { + "name": "symfony/yaml", + "version": "v7.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "0feafffb843860624ddfd13478f481f4c3cd8b23" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/0feafffb843860624ddfd13478f481f4c3cd8b23", + "reference": "0feafffb843860624ddfd13478f481f4c3cd8b23", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/console": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v7.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-04-04T10:10:11+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:36:25+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": {}, + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": "^8.2" + }, + "platform-dev": {}, + "plugin-api-version": "2.6.0" +} diff --git a/config/dompdf.php b/config/dompdf.php new file mode 100644 index 000000000..35eef8ff6 --- /dev/null +++ b/config/dompdf.php @@ -0,0 +1,301 @@ + false, // Throw an Exception on warnings from dompdf + + 'public_path' => null, // Override the public path if needed + + /* + * Dejavu Sans font is missing glyphs for converted entities, turn it off if you need to show € and £. + */ + 'convert_entities' => true, + + 'options' => [ + /** + * The location of the DOMPDF font directory + * + * The location of the directory where DOMPDF will store fonts and font metrics + * Note: This directory must exist and be writable by the webserver process. + * *Please note the trailing slash.* + * + * Notes regarding fonts: + * Additional .afm font metrics can be added by executing load_font.php from command line. + * + * Only the original "Base 14 fonts" are present on all pdf viewers. Additional fonts must + * be embedded in the pdf file or the PDF may not display correctly. This can significantly + * increase file size unless font subsetting is enabled. Before embedding a font please + * review your rights under the font license. + * + * Any font specification in the source HTML is translated to the closest font available + * in the font directory. + * + * The pdf standard "Base 14 fonts" are: + * Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique, + * Helvetica, Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique, + * Times-Roman, Times-Bold, Times-BoldItalic, Times-Italic, + * Symbol, ZapfDingbats. + */ + 'font_dir' => storage_path('fonts'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782) + + /** + * The location of the DOMPDF font cache directory + * + * This directory contains the cached font metrics for the fonts used by DOMPDF. + * This directory can be the same as DOMPDF_FONT_DIR + * + * Note: This directory must exist and be writable by the webserver process. + */ + 'font_cache' => storage_path('fonts'), + + /** + * The location of a temporary directory. + * + * The directory specified must be writeable by the webserver process. + * The temporary directory is required to download remote images and when + * using the PDFLib back end. + */ + 'temp_dir' => sys_get_temp_dir(), + + /** + * ==== IMPORTANT ==== + * + * dompdf's "chroot": Prevents dompdf from accessing system files or other + * files on the webserver. All local files opened by dompdf must be in a + * subdirectory of this directory. DO NOT set it to '/' since this could + * allow an attacker to use dompdf to read any files on the server. This + * should be an absolute path. + * This is only checked on command line call by dompdf.php, but not by + * direct class use like: + * $dompdf = new DOMPDF(); $dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output(); + */ + 'chroot' => realpath(base_path()), + + /** + * Protocol whitelist + * + * Protocols and PHP wrappers allowed in URIs, and the validation rules + * that determine if a resouce may be loaded. Full support is not guaranteed + * for the protocols/wrappers specified + * by this array. + * + * @var array + */ + 'allowed_protocols' => [ + 'data://' => ['rules' => []], + 'file://' => ['rules' => []], + 'http://' => ['rules' => []], + 'https://' => ['rules' => []], + ], + + /** + * Operational artifact (log files, temporary files) path validation + */ + 'artifactPathValidation' => null, + + /** + * @var string + */ + 'log_output_file' => null, + + /** + * Whether to enable font subsetting or not. + */ + 'enable_font_subsetting' => false, + + /** + * The PDF rendering backend to use + * + * Valid settings are 'PDFLib', 'CPDF' (the bundled R&OS PDF class), 'GD' and + * 'auto'. 'auto' will look for PDFLib and use it if found, or if not it will + * fall back on CPDF. 'GD' renders PDFs to graphic files. + * {@link * Canvas_Factory} ultimately determines which rendering class to + * instantiate based on this setting. + * + * Both PDFLib & CPDF rendering backends provide sufficient rendering + * capabilities for dompdf, however additional features (e.g. object, + * image and font support, etc.) differ between backends. Please see + * {@link PDFLib_Adapter} for more information on the PDFLib backend + * and {@link CPDF_Adapter} and lib/class.pdf.php for more information + * on CPDF. Also see the documentation for each backend at the links + * below. + * + * The GD rendering backend is a little different than PDFLib and + * CPDF. Several features of CPDF and PDFLib are not supported or do + * not make any sense when creating image files. For example, + * multiple pages are not supported, nor are PDF 'objects'. Have a + * look at {@link GD_Adapter} for more information. GD support is + * experimental, so use it at your own risk. + * + * @link http://www.pdflib.com + * @link http://www.ros.co.nz/pdf + * @link http://www.php.net/image + */ + 'pdf_backend' => 'CPDF', + + /** + * html target media view which should be rendered into pdf. + * List of types and parsing rules for future extensions: + * http://www.w3.org/TR/REC-html40/types.html + * screen, tty, tv, projection, handheld, print, braille, aural, all + * Note: aural is deprecated in CSS 2.1 because it is replaced by speech in CSS 3. + * Note, even though the generated pdf file is intended for print output, + * the desired content might be different (e.g. screen or projection view of html file). + * Therefore allow specification of content here. + */ + 'default_media_type' => 'screen', + + /** + * The default paper size. + * + * North America standard is "letter"; other countries generally "a4" + * + * @see CPDF_Adapter::PAPER_SIZES for valid sizes ('letter', 'legal', 'A4', etc.) + */ + 'default_paper_size' => 'a4', + + /** + * The default paper orientation. + * + * The orientation of the page (portrait or landscape). + * + * @var string + */ + 'default_paper_orientation' => 'portrait', + + /** + * The default font family + * + * Used if no suitable fonts can be found. This must exist in the font folder. + * + * @var string + */ + 'default_font' => 'serif', + + /** + * Image DPI setting + * + * This setting determines the default DPI setting for images and fonts. The + * DPI may be overridden for inline images by explictly setting the + * image's width & height style attributes (i.e. if the image's native + * width is 600 pixels and you specify the image's width as 72 points, + * the image will have a DPI of 600 in the rendered PDF. The DPI of + * background images can not be overridden and is controlled entirely + * via this parameter. + * + * For the purposes of DOMPDF, pixels per inch (PPI) = dots per inch (DPI). + * If a size in html is given as px (or without unit as image size), + * this tells the corresponding size in pt. + * This adjusts the relative sizes to be similar to the rendering of the + * html page in a reference browser. + * + * In pdf, always 1 pt = 1/72 inch + * + * Rendering resolution of various browsers in px per inch: + * Windows Firefox and Internet Explorer: + * SystemControl->Display properties->FontResolution: Default:96, largefonts:120, custom:? + * Linux Firefox: + * about:config *resolution: Default:96 + * (xorg screen dimension in mm and Desktop font dpi settings are ignored) + * + * Take care about extra font/image zoom factor of browser. + * + * In images, size in pixel attribute, img css style, are overriding + * the real image dimension in px for rendering. + * + * @var int + */ + 'dpi' => 96, + + /** + * Enable embedded PHP + * + * If this setting is set to true then DOMPDF will automatically evaluate embedded PHP contained + * within tags. + * + * ==== IMPORTANT ==== Enabling this for documents you do not trust (e.g. arbitrary remote html pages) + * is a security risk. + * Embedded scripts are run with the same level of system access available to dompdf. + * Set this option to false (recommended) if you wish to process untrusted documents. + * This setting may increase the risk of system exploit. + * Do not change this settings without understanding the consequences. + * Additional documentation is available on the dompdf wiki at: + * https://github.com/dompdf/dompdf/wiki + * + * @var bool + */ + 'enable_php' => false, + + /** + * Rnable inline JavaScript + * + * If this setting is set to true then DOMPDF will automatically insert JavaScript code contained + * within tags as written into the PDF. + * NOTE: This is PDF-based JavaScript to be executed by the PDF viewer, + * not browser-based JavaScript executed by Dompdf. + * + * @var bool + */ + 'enable_javascript' => true, + + /** + * Enable remote file access + * + * If this setting is set to true, DOMPDF will access remote sites for + * images and CSS files as required. + * + * ==== IMPORTANT ==== + * This can be a security risk, in particular in combination with isPhpEnabled and + * allowing remote html code to be passed to $dompdf = new DOMPDF(); $dompdf->load_html(...); + * This allows anonymous users to download legally doubtful internet content which on + * tracing back appears to being downloaded by your server, or allows malicious php code + * in remote html pages to be executed by your server with your account privileges. + * + * This setting may increase the risk of system exploit. Do not change + * this settings without understanding the consequences. Additional + * documentation is available on the dompdf wiki at: + * https://github.com/dompdf/dompdf/wiki + * + * @var bool + */ + 'enable_remote' => false, + + /** + * List of allowed remote hosts + * + * Each value of the array must be a valid hostname. + * + * This will be used to filter which resources can be loaded in combination with + * isRemoteEnabled. If enable_remote is FALSE, then this will have no effect. + * + * Leave to NULL to allow any remote host. + * + * @var array|null + */ + 'allowed_remote_hosts' => null, + + /** + * A ratio applied to the fonts height to be more like browsers' line height + */ + 'font_height_ratio' => 1.1, + + /** + * Use the HTML5 Lib parser + * + * @deprecated This feature is now always on in dompdf 2.x + * + * @var bool + */ + 'enable_html5_parser' => true, + ], + +]; diff --git a/config/filament-shield.php b/config/filament-shield.php new file mode 100644 index 000000000..58298ee61 --- /dev/null +++ b/config/filament-shield.php @@ -0,0 +1,92 @@ + [ + 'should_register_navigation' => true, + 'slug' => 'shield/roles', + 'navigation_sort' => -1, + 'navigation_badge' => true, + 'navigation_group' => true, + 'sub_navigation_position' => null, + 'is_globally_searchable' => false, + 'show_model_path' => true, + 'is_scoped_to_tenant' => true, + 'cluster' => null, + ], + + 'tenant_model' => null, + + 'auth_provider_model' => [ + 'fqcn' => 'App\\Models\\User', + ], + + 'super_admin' => [ + 'enabled' => true, + 'name' => 'super_admin', // Should match your admin role + 'define_via_gate' => false, + 'intercept_gate' => 'before', // after + ], + + 'panel_user' => [ + 'enabled' => true, + 'name' => 'panel_user', + ], + + 'permission_prefixes' => [ + 'resource' => [ + 'view', + 'view_any', + 'create', + 'update', + 'restore', + 'restore_any', + 'replicate', + 'reorder', + 'delete', + 'delete_any', + 'force_delete', + 'force_delete_any', + ], + + 'page' => 'page', + 'widget' => 'widget', + ], + + 'entities' => [ + 'pages' => true, + 'widgets' => true, + 'resources' => true, + 'custom_permissions' => false, + ], + + 'generator' => [ + 'option' => 'policies_and_permissions', + 'policy_directory' => 'Policies', + 'policy_namespace' => 'Policies', + ], + + 'exclude' => [ + 'enabled' => true, + + 'pages' => [ + 'Dashboard', + ], + + 'widgets' => [ + 'AccountWidget', 'FilamentInfoWidget', + ], + + 'resources' => [], + ], + + 'discovery' => [ + 'discover_all_resources' => false, + 'discover_all_widgets' => false, + 'discover_all_pages' => false, + ], + + 'register_role_policy' => [ + 'enabled' => true, + ], + +]; diff --git a/config/filament.php b/config/filament.php new file mode 100644 index 000000000..6738783f3 --- /dev/null +++ b/config/filament.php @@ -0,0 +1,116 @@ + [ + + // 'echo' => [ + // 'broadcaster' => 'pusher', + // 'key' => env('VITE_PUSHER_APP_KEY'), + // 'cluster' => env('VITE_PUSHER_APP_CLUSTER'), + // 'wsHost' => env('VITE_PUSHER_HOST'), + // 'wsPort' => env('VITE_PUSHER_PORT'), + // 'wssPort' => env('VITE_PUSHER_PORT'), + // 'authEndpoint' => '/broadcasting/auth', + // 'disableStats' => true, + // 'encrypted' => true, + // 'forceTLS' => true, + // ], + + ], + + /* + |-------------------------------------------------------------------------- + | Default Filesystem Disk + |-------------------------------------------------------------------------- + | + | This is the storage disk Filament will use to store files. You may use + | any of the disks defined in the `config/filesystems.php`. + | + */ + + 'default_filesystem_disk' => env('FILAMENT_FILESYSTEM_DISK', 'public'), + + + /* + |-------------------------------------------------------------------------- + | Assets Path + |-------------------------------------------------------------------------- + | + | This is the directory where Filament's assets will be published to. It + | is relative to the `public` directory of your Laravel application. + | + | After changing the path, you should run `php artisan filament:assets`. + | + */ + + 'assets_path' => null, + + /* + |-------------------------------------------------------------------------- + | Cache Path + |-------------------------------------------------------------------------- + | + | This is the directory that Filament will use to store cache files that + | are used to optimize the registration of components. + | + | After changing the path, you should run `php artisan filament:cache-components`. + | + */ + + 'cache_path' => base_path('bootstrap/cache/filament'), + + /* + |-------------------------------------------------------------------------- + | Livewire Loading Delay + |-------------------------------------------------------------------------- + | + | This sets the delay before loading indicators appear. + | + | Setting this to 'none' makes indicators appear immediately, which can be + | desirable for high-latency connections. Setting it to 'default' applies + | Livewire's standard 200ms delay. + | + */ + + 'livewire_loading_delay' => 'default', + + /* + |-------------------------------------------------------------------------- + | System Route Prefix + |-------------------------------------------------------------------------- + | + | This is the prefix used for the system routes that Filament registers, + | such as the routes for downloading exports and failed import rows. + | + */ + + 'system_route_prefix' => 'filament', + + + 'auth' => [ + 'guard' => 'web', // Should be 'web' not 'admin' + 'pages' => [ + 'login' => \Filament\Http\Livewire\Auth\Login::class, + ], + ], + + 'middleware' => [ + 'auth' => [ + 'authenticate' => 'auth:web', // Should match your guard + ], + ], + +]; diff --git a/config/filesystems.php b/config/filesystems.php index 3d671bd91..4fec5fb33 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -41,12 +41,11 @@ 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), - 'url' => env('APP_URL').'/storage', + 'url' => env('APP_URL') . '/storage', 'visibility' => 'public', - 'throw' => false, - 'report' => false, ], + 's3' => [ 'driver' => 's3', 'key' => env('AWS_ACCESS_KEY_ID'), diff --git a/config/paddle.php b/config/paddle.php new file mode 100644 index 000000000..a24df87e2 --- /dev/null +++ b/config/paddle.php @@ -0,0 +1,8 @@ + [ + 'tool_premium' => env('PADDLE_PRODUCT_TOOL_PREMIUM', 'your_paddle_product_id'), + 'global_premium' => env('PADDLE_PRODUCT_GLOBAL_PREMIUM', 'your_global_product_id'), + ], +]; diff --git a/config/permission.php b/config/permission.php new file mode 100644 index 000000000..f39f6b5bf --- /dev/null +++ b/config/permission.php @@ -0,0 +1,202 @@ + [ + + /* + * When using the "HasPermissions" trait from this package, we need to know which + * Eloquent model should be used to retrieve your permissions. Of course, it + * is often just the "Permission" model but you may use whatever you like. + * + * The model you want to use as a Permission model needs to implement the + * `Spatie\Permission\Contracts\Permission` contract. + */ + + 'permission' => Spatie\Permission\Models\Permission::class, + + /* + * When using the "HasRoles" trait from this package, we need to know which + * Eloquent model should be used to retrieve your roles. Of course, it + * is often just the "Role" model but you may use whatever you like. + * + * The model you want to use as a Role model needs to implement the + * `Spatie\Permission\Contracts\Role` contract. + */ + + 'role' => Spatie\Permission\Models\Role::class, + + ], + + 'table_names' => [ + + /* + * When using the "HasRoles" trait from this package, we need to know which + * table should be used to retrieve your roles. We have chosen a basic + * default value but you may easily change it to any table you like. + */ + + 'roles' => 'roles', + + /* + * When using the "HasPermissions" trait from this package, we need to know which + * table should be used to retrieve your permissions. We have chosen a basic + * default value but you may easily change it to any table you like. + */ + + 'permissions' => 'permissions', + + /* + * When using the "HasPermissions" trait from this package, we need to know which + * table should be used to retrieve your models permissions. We have chosen a + * basic default value but you may easily change it to any table you like. + */ + + 'model_has_permissions' => 'model_has_permissions', + + /* + * When using the "HasRoles" trait from this package, we need to know which + * table should be used to retrieve your models roles. We have chosen a + * basic default value but you may easily change it to any table you like. + */ + + 'model_has_roles' => 'model_has_roles', + + /* + * When using the "HasRoles" trait from this package, we need to know which + * table should be used to retrieve your roles permissions. We have chosen a + * basic default value but you may easily change it to any table you like. + */ + + 'role_has_permissions' => 'role_has_permissions', + ], + + 'column_names' => [ + /* + * Change this if you want to name the related pivots other than defaults + */ + 'role_pivot_key' => null, // default 'role_id', + 'permission_pivot_key' => null, // default 'permission_id', + + /* + * Change this if you want to name the related model primary key other than + * `model_id`. + * + * For example, this would be nice if your primary keys are all UUIDs. In + * that case, name this `model_uuid`. + */ + + 'model_morph_key' => 'model_id', + + /* + * Change this if you want to use the teams feature and your related model's + * foreign key is other than `team_id`. + */ + + 'team_foreign_key' => 'team_id', + ], + + /* + * When set to true, the method for checking permissions will be registered on the gate. + * Set this to false if you want to implement custom logic for checking permissions. + */ + + 'register_permission_check_method' => true, + + /* + * When set to true, Laravel\Octane\Events\OperationTerminated event listener will be registered + * this will refresh permissions on every TickTerminated, TaskTerminated and RequestTerminated + * NOTE: This should not be needed in most cases, but an Octane/Vapor combination benefited from it. + */ + 'register_octane_reset_listener' => false, + + /* + * Events will fire when a role or permission is assigned/unassigned: + * \Spatie\Permission\Events\RoleAttached + * \Spatie\Permission\Events\RoleDetached + * \Spatie\Permission\Events\PermissionAttached + * \Spatie\Permission\Events\PermissionDetached + * + * To enable, set to true, and then create listeners to watch these events. + */ + 'events_enabled' => false, + + /* + * Teams Feature. + * When set to true the package implements teams using the 'team_foreign_key'. + * If you want the migrations to register the 'team_foreign_key', you must + * set this to true before doing the migration. + * If you already did the migration then you must make a new migration to also + * add 'team_foreign_key' to 'roles', 'model_has_roles', and 'model_has_permissions' + * (view the latest version of this package's migration file) + */ + + 'teams' => false, + + /* + * The class to use to resolve the permissions team id + */ + 'team_resolver' => \Spatie\Permission\DefaultTeamResolver::class, + + /* + * Passport Client Credentials Grant + * When set to true the package will use Passports Client to check permissions + */ + + 'use_passport_client_credentials' => false, + + /* + * When set to true, the required permission names are added to exception messages. + * This could be considered an information leak in some contexts, so the default + * setting is false here for optimum safety. + */ + + 'display_permission_in_exception' => false, + + /* + * When set to true, the required role names are added to exception messages. + * This could be considered an information leak in some contexts, so the default + * setting is false here for optimum safety. + */ + + 'display_role_in_exception' => false, + + /* + * By default wildcard permission lookups are disabled. + * See documentation to understand supported syntax. + */ + + 'enable_wildcard_permission' => false, + + /* + * The class to use for interpreting wildcard permissions. + * If you need to modify delimiters, override the class and specify its name here. + */ + // 'wildcard_permission' => Spatie\Permission\WildcardPermission::class, + + /* Cache-specific settings */ + + 'cache' => [ + + /* + * By default all permissions are cached for 24 hours to speed up performance. + * When permissions or roles are updated the cache is flushed automatically. + */ + + 'expiration_time' => \DateInterval::createFromDateString('24 hours'), + + /* + * The cache key used to store all permissions. + */ + + 'key' => 'spatie.permission.cache', + + /* + * You may optionally indicate a specific cache driver to use for permission and + * role caching using any of the `store` drivers listed in the cache.php config + * file. Using 'default' here means to use the `default` set in cache.php. + */ + + 'store' => 'default', + ], +]; diff --git a/config/services.php b/config/services.php index 27a36175f..bb323179d 100644 --- a/config/services.php +++ b/config/services.php @@ -35,4 +35,13 @@ ], ], + + 'paddle' => [ + 'vendor_auth_code' => env('PADDLE_VENDOR_AUTH_CODE'), + 'client_side_token' => env('PADDLE_CLIENT_SIDE_TOKEN'), + 'sandbox' => env('PADDLE_SANDBOX', true), + 'webhook' => [ + 'secret' => env('PADDLE_WEBHOOK_SECRET'), + ], + ], ]; diff --git a/database/migrations/2019_05_03_000001_create_customers_table.php b/database/migrations/2019_05_03_000001_create_customers_table.php new file mode 100644 index 000000000..de58b563b --- /dev/null +++ b/database/migrations/2019_05_03_000001_create_customers_table.php @@ -0,0 +1,32 @@ +id(); + $table->morphs('billable'); + $table->string('paddle_id')->unique(); + $table->string('name'); + $table->string('email'); + $table->timestamp('trial_ends_at')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('customers'); + } +}; diff --git a/database/migrations/2019_05_03_000002_create_subscriptions_table.php b/database/migrations/2019_05_03_000002_create_subscriptions_table.php new file mode 100644 index 000000000..3384260a0 --- /dev/null +++ b/database/migrations/2019_05_03_000002_create_subscriptions_table.php @@ -0,0 +1,34 @@ +id(); + $table->morphs('billable'); + $table->string('type'); + $table->string('paddle_id')->unique(); + $table->string('status'); + $table->timestamp('trial_ends_at')->nullable(); + $table->timestamp('paused_at')->nullable(); + $table->timestamp('ends_at')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('subscriptions'); + } +}; diff --git a/database/migrations/2019_05_03_000003_create_subscription_items_table.php b/database/migrations/2019_05_03_000003_create_subscription_items_table.php new file mode 100644 index 000000000..58d335a40 --- /dev/null +++ b/database/migrations/2019_05_03_000003_create_subscription_items_table.php @@ -0,0 +1,34 @@ +id(); + $table->foreignId('subscription_id'); + $table->string('product_id'); + $table->string('price_id'); + $table->string('status'); + $table->integer('quantity'); + $table->timestamps(); + + $table->unique(['subscription_id', 'price_id']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('subscription_items'); + } +}; diff --git a/database/migrations/2019_05_03_000004_create_transactions_table.php b/database/migrations/2019_05_03_000004_create_transactions_table.php new file mode 100644 index 000000000..475d5d6a8 --- /dev/null +++ b/database/migrations/2019_05_03_000004_create_transactions_table.php @@ -0,0 +1,36 @@ +id(); + $table->morphs('billable'); + $table->string('paddle_id')->unique(); + $table->string('paddle_subscription_id')->nullable()->index(); + $table->string('invoice_number')->nullable(); + $table->string('status'); + $table->string('total'); + $table->string('tax'); + $table->string('currency', 3); + $table->timestamp('billed_at'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('transactions'); + } +}; diff --git a/database/migrations/2025_05_21_112842_afaqcm_database.php b/database/migrations/2025_05_21_112842_afaqcm_database.php new file mode 100644 index 000000000..68bbbaccd --- /dev/null +++ b/database/migrations/2025_05_21_112842_afaqcm_database.php @@ -0,0 +1,98 @@ +id(); + $table->string('name_en'); + $table->string('name_ar'); + $table->text('description_en')->nullable(); + $table->text('description_ar')->nullable(); + $table->string('image')->nullable(); + $table->enum('status', ['active', 'inactive'])->default('active'); + $table->timestamps(); + }); + + Schema::create('domains', function (Blueprint $table) { + $table->id(); + $table->foreignId('tool_id')->constrained()->cascadeOnDelete(); + $table->string('name_en'); + $table->string('name_ar'); + $table->text('description_en')->nullable(); + $table->text('description_ar')->nullable(); + $table->integer('order')->default(0); + $table->enum('status', ['active', 'inactive'])->default('active'); + $table->timestamps(); + }); + + Schema::create('categories', function (Blueprint $table) { + $table->id(); + $table->foreignId('domain_id')->constrained()->cascadeOnDelete(); + $table->string('name_en'); + $table->string('name_ar'); + $table->text('description_en')->nullable(); + $table->text('description_ar')->nullable(); + $table->integer('order')->default(0); + $table->enum('status', ['active', 'inactive'])->default('active'); + $table->timestamps(); + }); + + Schema::create('criteria', function (Blueprint $table) { + $table->id(); + $table->foreignId('category_id')->constrained()->cascadeOnDelete(); + $table->string('name_en'); + $table->string('name_ar'); + $table->text('description_en')->nullable(); + $table->text('description_ar')->nullable(); + $table->integer('order')->default(0); + $table->enum('status', ['active', 'inactive'])->default('active'); + $table->timestamps(); + }); + + Schema::create('assessments', function (Blueprint $table) { + $table->id(); + $table->foreignId('tool_id')->constrained(); + $table->foreignId('user_id')->nullable()->constrained(); + $table->string('guest_email')->nullable(); + $table->string('guest_name')->nullable(); + $table->string('organization')->nullable(); + $table->enum('status', ['draft', 'completed', 'in_progress', 'archived'])->default('draft'); + $table->timestamps(); + }); + + Schema::create('assessment_responses', function (Blueprint $table) { + $table->id(); + $table->foreignId('assessment_id')->constrained()->cascadeOnDelete(); + $table->foreignId('criterion_id')->constrained(); + $table->boolean('is_available')->default(false); + $table->text('notes')->nullable(); + $table->timestamps(); + }); + + // Add premium_until field to users table + Schema::table('users', function (Blueprint $table) { + $table->timestamp('premium_until')->nullable(); + }); + } + + public function down(): void + { + Schema::dropIfExists('assessment_responses'); + Schema::dropIfExists('assessments'); + Schema::dropIfExists('criteria'); + Schema::dropIfExists('categories'); + Schema::dropIfExists('domains'); + Schema::dropIfExists('tools'); + + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('premium_until'); + }); + } + }; diff --git a/database/migrations/2025_05_22_082104_afaqcm_database_alteration.php b/database/migrations/2025_05_22_082104_afaqcm_database_alteration.php new file mode 100644 index 000000000..9fd1d6cf2 --- /dev/null +++ b/database/migrations/2025_05_22_082104_afaqcm_database_alteration.php @@ -0,0 +1,37 @@ +decimal('weight_percentage', 5, 2)->nullable()->after('name_ar'); + }); + + // Update categories table + Schema::table('categories', function (Blueprint $table) { + $table->decimal('weight_percentage', 5, 2)->nullable()->after('name_ar'); + }); + + + } + + public function down(): void + { + Schema::table('domains', function (Blueprint $table) { + $table->dropColumn(['weight_percentage',]); + }); + + Schema::table('categories', function (Blueprint $table) { + $table->dropColumn(['weight_percentage',]); + }); + + + + } +}; diff --git a/database/migrations/2025_05_22_092909_afaqcm__create__result.php b/database/migrations/2025_05_22_092909_afaqcm__create__result.php new file mode 100644 index 000000000..823cb3bd5 --- /dev/null +++ b/database/migrations/2025_05_22_092909_afaqcm__create__result.php @@ -0,0 +1,34 @@ +id(); + $table->foreignId('assessment_id')->constrained()->onDelete('cascade'); + $table->foreignId('domain_id')->constrained()->onDelete('cascade'); + $table->foreignId('category_id')->nullable()->constrained()->onDelete('cascade'); + $table->integer('total_criteria')->default(0); + $table->integer('applicable_criteria')->default(0); + $table->integer('yes_count')->default(0); + $table->integer('no_count')->default(0); + $table->integer('na_count')->default(0); + $table->decimal('score_percentage', 5, 2)->default(0); + $table->decimal('weighted_score', 5, 2)->default(0); + $table->timestamps(); + + $table->index(['assessment_id', 'domain_id']); + $table->index(['assessment_id', 'category_id']); + }); + } + + public function down(): void + { + Schema::dropIfExists('assessment_results'); + } +}; diff --git a/database/migrations/2025_05_22_100904_afaqcm_database_alteration2.php b/database/migrations/2025_05_22_100904_afaqcm_database_alteration2.php new file mode 100644 index 000000000..e3211edfe --- /dev/null +++ b/database/migrations/2025_05_22_100904_afaqcm_database_alteration2.php @@ -0,0 +1,23 @@ +foreignId('user_id')->nullable()->change(); + }); + } + + public function down(): void + { + Schema::table('assessments', function (Blueprint $table) { + $table->foreignId('user_id')->nullable(false)->change(); + }); + } +}; diff --git a/database/migrations/2025_05_22_103618_afaqcm_database_alteration3.php b/database/migrations/2025_05_22_103618_afaqcm_database_alteration3.php new file mode 100644 index 000000000..a63d7be37 --- /dev/null +++ b/database/migrations/2025_05_22_103618_afaqcm_database_alteration3.php @@ -0,0 +1,24 @@ +string('attachment')->nullable()->after('notes'); + }); + } + + public function down(): void + { + + Schema::table('assessment_responses', function (Blueprint $table) { + $table->dropColumn([ 'attachment']); + }); + } +}; diff --git a/database/migrations/2025_05_22_114656_afaqcm__create__result10.php b/database/migrations/2025_05_22_114656_afaqcm__create__result10.php new file mode 100644 index 000000000..4525b09ba --- /dev/null +++ b/database/migrations/2025_05_22_114656_afaqcm__create__result10.php @@ -0,0 +1,80 @@ +timestamp('started_at')->nullable()->after('status'); + $table->timestamp('completed_at')->nullable()->after('started_at'); + }); + + Schema::table('assessment_responses', function (Blueprint $table) { + // Add the new response column + $table->enum('response', ['yes', 'no', 'na'])->after('criterion_id'); + + // Add unique constraint to prevent duplicate responses + $table->unique(['assessment_id', 'criterion_id'], 'unique_assessment_criterion'); + }); + + // Migrate existing data from is_available to response + DB::table('assessment_responses')->update([ + 'response' => DB::raw(" + CASE + WHEN is_available = 1 THEN 'yes' + WHEN is_available = 0 THEN 'no' + WHEN is_available IS NULL THEN 'na' + ELSE 'na' + END + ") + ]); + + // Drop the old column after data migration + Schema::table('assessment_responses', function (Blueprint $table) { + $table->dropColumn('is_available'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('assessments', function (Blueprint $table) { + $table->dropColumn(['started_at', 'completed_at']); + }); + + Schema::table('assessment_responses', function (Blueprint $table) { + // Add back the is_available column + $table->boolean('is_available')->nullable()->after('criterion_id'); + + // Drop the unique constraint + $table->dropUnique('unique_assessment_criterion'); + }); + + // Migrate data back from response to is_available + DB::table('assessment_responses')->update([ + 'is_available' => DB::raw(" + CASE + WHEN response = 'yes' THEN 1 + WHEN response = 'no' THEN 0 + WHEN response = 'na' THEN NULL + ELSE NULL + END + ") + ]); + + // Drop the response column + Schema::table('assessment_responses', function (Blueprint $table) { + $table->dropColumn('response'); + }); + } +}; diff --git a/database/migrations/2025_05_24_100831_create_guest_sessions_table.php b/database/migrations/2025_05_24_100831_create_guest_sessions_table.php new file mode 100644 index 000000000..c12bfca0f --- /dev/null +++ b/database/migrations/2025_05_24_100831_create_guest_sessions_table.php @@ -0,0 +1,61 @@ +id(); + $table->foreignId('assessment_id')->constrained()->onDelete('cascade'); + $table->string('email'); + $table->string('name'); + + // Request Information + $table->string('ip_address')->nullable(); + $table->text('user_agent')->nullable(); + + // Device Information + $table->string('device_type')->nullable(); // Mobile, Desktop, Tablet + $table->string('browser')->nullable(); + $table->string('browser_version')->nullable(); + $table->string('operating_system')->nullable(); + + // Location Information + $table->string('country')->nullable(); + $table->string('country_code', 2)->nullable(); + $table->string('region')->nullable(); + $table->string('city')->nullable(); + $table->decimal('latitude', 10, 8)->nullable(); + $table->decimal('longitude', 11, 8)->nullable(); + $table->string('timezone')->nullable(); + $table->string('isp')->nullable(); + + // Additional Session Data + $table->json('session_data')->nullable(); // For any additional data + $table->timestamp('completed_at')->nullable(); + + $table->timestamps(); + + // Indexes + $table->index(['email', 'created_at']); + $table->index(['country_code', 'created_at']); + $table->index(['device_type', 'created_at']); + $table->index(['ip_address', 'created_at']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('guest_sessions'); + } +}; diff --git a/database/migrations/2025_05_24_104313_create_guest_sessions_table.php b/database/migrations/2025_05_24_104313_create_guest_sessions_table.php new file mode 100644 index 000000000..fd8df31ec --- /dev/null +++ b/database/migrations/2025_05_24_104313_create_guest_sessions_table.php @@ -0,0 +1,108 @@ +string('session_id')->after('assessment_id')->index(); + } + if (!Schema::hasColumn('guest_sessions', 'name')) { + $table->string('name')->after('session_id'); + } + if (!Schema::hasColumn('guest_sessions', 'email')) { + $table->string('email')->after('name'); + } + if (!Schema::hasColumn('guest_sessions', 'ip_address')) { + $table->string('ip_address', 45)->nullable()->after('email'); + } + if (!Schema::hasColumn('guest_sessions', 'user_agent')) { + $table->text('user_agent')->nullable()->after('ip_address'); + } + if (!Schema::hasColumn('guest_sessions', 'device_type')) { + $table->string('device_type', 50)->nullable()->after('user_agent'); + } + if (!Schema::hasColumn('guest_sessions', 'browser')) { + $table->string('browser', 100)->nullable()->after('device_type'); + } + if (!Schema::hasColumn('guest_sessions', 'browser_version')) { + $table->string('browser_version', 50)->nullable()->after('browser'); + } + if (!Schema::hasColumn('guest_sessions', 'operating_system')) { + $table->string('operating_system', 100)->nullable()->after('browser_version'); + } + if (!Schema::hasColumn('guest_sessions', 'country')) { + $table->string('country', 100)->nullable()->after('operating_system'); + } + if (!Schema::hasColumn('guest_sessions', 'country_code')) { + $table->string('country_code', 2)->nullable()->after('country'); + } + if (!Schema::hasColumn('guest_sessions', 'region')) { + $table->string('region', 100)->nullable()->after('country_code'); + } + if (!Schema::hasColumn('guest_sessions', 'city')) { + $table->string('city', 100)->nullable()->after('region'); + } + if (!Schema::hasColumn('guest_sessions', 'latitude')) { + $table->decimal('latitude', 10, 6)->nullable()->after('city'); + } + if (!Schema::hasColumn('guest_sessions', 'longitude')) { + $table->decimal('longitude', 10, 6)->nullable()->after('latitude'); + } + if (!Schema::hasColumn('guest_sessions', 'timezone')) { + $table->string('timezone', 50)->nullable()->after('longitude'); + } + if (!Schema::hasColumn('guest_sessions', 'isp')) { + $table->string('isp', 255)->nullable()->after('timezone'); + } + if (!Schema::hasColumn('guest_sessions', 'session_data')) { + $table->json('session_data')->nullable()->after('isp'); + } + if (!Schema::hasColumn('guest_sessions', 'started_at')) { + $table->timestamp('started_at')->nullable()->after('session_data'); + } + if (!Schema::hasColumn('guest_sessions', 'completed_at')) { + $table->timestamp('completed_at')->nullable()->after('started_at'); + } + if (!Schema::hasColumn('guest_sessions', 'last_activity')) { + $table->timestamp('last_activity')->nullable()->after('completed_at'); + } + }); + + // Add indexes if they don't exist + try { + Schema::table('guest_sessions', function (Blueprint $table) { + $table->index('ip_address'); + $table->index('started_at'); + $table->index('last_activity'); + }); + } catch (\Exception $e) { + // Indexes might already exist, ignore the error + } + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('guest_sessions', function (Blueprint $table) { + $table->dropColumn([ + 'session_id', 'name', 'email', 'ip_address', 'user_agent', + 'device_type', 'browser', 'browser_version', 'operating_system', + 'country', 'country_code', 'region', 'city', 'latitude', + 'longitude', 'timezone', 'isp', 'session_data', + 'started_at', 'completed_at', 'last_activity' + ]); + }); + } +}; diff --git a/database/migrations/2025_05_26_130421_create_permission_tables.php b/database/migrations/2025_05_26_130421_create_permission_tables.php new file mode 100644 index 000000000..ce4d9d2d4 --- /dev/null +++ b/database/migrations/2025_05_26_130421_create_permission_tables.php @@ -0,0 +1,136 @@ +engine('InnoDB'); + $table->bigIncrements('id'); // permission id + $table->string('name'); // For MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format) + $table->string('guard_name'); // For MyISAM use string('guard_name', 25); + $table->timestamps(); + + $table->unique(['name', 'guard_name']); + }); + + Schema::create($tableNames['roles'], static function (Blueprint $table) use ($teams, $columnNames) { + // $table->engine('InnoDB'); + $table->bigIncrements('id'); // role id + if ($teams || config('permission.testing')) { // permission.testing is a fix for sqlite testing + $table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable(); + $table->index($columnNames['team_foreign_key'], 'roles_team_foreign_key_index'); + } + $table->string('name'); // For MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format) + $table->string('guard_name'); // For MyISAM use string('guard_name', 25); + $table->timestamps(); + if ($teams || config('permission.testing')) { + $table->unique([$columnNames['team_foreign_key'], 'name', 'guard_name']); + } else { + $table->unique(['name', 'guard_name']); + } + }); + + Schema::create($tableNames['model_has_permissions'], static function (Blueprint $table) use ($tableNames, $columnNames, $pivotPermission, $teams) { + $table->unsignedBigInteger($pivotPermission); + + $table->string('model_type'); + $table->unsignedBigInteger($columnNames['model_morph_key']); + $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index'); + + $table->foreign($pivotPermission) + ->references('id') // permission id + ->on($tableNames['permissions']) + ->onDelete('cascade'); + if ($teams) { + $table->unsignedBigInteger($columnNames['team_foreign_key']); + $table->index($columnNames['team_foreign_key'], 'model_has_permissions_team_foreign_key_index'); + + $table->primary([$columnNames['team_foreign_key'], $pivotPermission, $columnNames['model_morph_key'], 'model_type'], + 'model_has_permissions_permission_model_type_primary'); + } else { + $table->primary([$pivotPermission, $columnNames['model_morph_key'], 'model_type'], + 'model_has_permissions_permission_model_type_primary'); + } + + }); + + Schema::create($tableNames['model_has_roles'], static function (Blueprint $table) use ($tableNames, $columnNames, $pivotRole, $teams) { + $table->unsignedBigInteger($pivotRole); + + $table->string('model_type'); + $table->unsignedBigInteger($columnNames['model_morph_key']); + $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index'); + + $table->foreign($pivotRole) + ->references('id') // role id + ->on($tableNames['roles']) + ->onDelete('cascade'); + if ($teams) { + $table->unsignedBigInteger($columnNames['team_foreign_key']); + $table->index($columnNames['team_foreign_key'], 'model_has_roles_team_foreign_key_index'); + + $table->primary([$columnNames['team_foreign_key'], $pivotRole, $columnNames['model_morph_key'], 'model_type'], + 'model_has_roles_role_model_type_primary'); + } else { + $table->primary([$pivotRole, $columnNames['model_morph_key'], 'model_type'], + 'model_has_roles_role_model_type_primary'); + } + }); + + Schema::create($tableNames['role_has_permissions'], static function (Blueprint $table) use ($tableNames, $pivotRole, $pivotPermission) { + $table->unsignedBigInteger($pivotPermission); + $table->unsignedBigInteger($pivotRole); + + $table->foreign($pivotPermission) + ->references('id') // permission id + ->on($tableNames['permissions']) + ->onDelete('cascade'); + + $table->foreign($pivotRole) + ->references('id') // role id + ->on($tableNames['roles']) + ->onDelete('cascade'); + + $table->primary([$pivotPermission, $pivotRole], 'role_has_permissions_permission_id_role_id_primary'); + }); + + app('cache') + ->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null) + ->forget(config('permission.cache.key')); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + $tableNames = config('permission.table_names'); + + if (empty($tableNames)) { + throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.'); + } + + Schema::drop($tableNames['role_has_permissions']); + Schema::drop($tableNames['model_has_roles']); + Schema::drop($tableNames['model_has_permissions']); + Schema::drop($tableNames['roles']); + Schema::drop($tableNames['permissions']); + } +}; diff --git a/database/migrations/2025_05_28_064339_create_user_details_and_subscriptions_tables.php b/database/migrations/2025_05_28_064339_create_user_details_and_subscriptions_tables.php new file mode 100644 index 000000000..3ffd30fff --- /dev/null +++ b/database/migrations/2025_05_28_064339_create_user_details_and_subscriptions_tables.php @@ -0,0 +1,96 @@ +id(); + $table->foreignId('user_id')->constrained()->onDelete('cascade'); + $table->string('phone')->nullable(); + $table->string('company')->nullable(); + // 1: Service, 2: Industrial, 3: Commercial + $table->unsignedTinyInteger('company_type')->nullable(); + $table->string('company_name')->nullable(); + $table->string('company_name_ar')->nullable(); + $table->string('company_name_en')->nullable(); + $table->string('region')->nullable(); + $table->string('city')->nullable(); + $table->string('employee_name_ar')->nullable(); + $table->string('employee_name_en')->nullable(); + // 1: Owner, 2: Board Chair, 3: General Manager, 4: CEO, 5: Department Manager, 6: Head of Section, 7: Authorized Employee + $table->unsignedTinyInteger('employee_type')->nullable(); + $table->string('position')->nullable(); + $table->string('website')->nullable(); + $table->text('address')->nullable(); + $table->string('country')->nullable(); + $table->string('industry')->nullable(); + $table->text('notes')->nullable(); + $table->integer('company_size')->nullable(); // Number of employees + $table->year('established_year')->nullable(); + $table->decimal('annual_revenue', 15, 2)->nullable(); + // Social links + $table->string('linkedin_profile')->nullable(); + $table->string('twitter_profile')->nullable(); + $table->string('facebook_profile')->nullable(); + // Preferences + $table->string('preferred_language', 5)->default('en'); + $table->string('timezone')->nullable(); + $table->json('communication_preferences')->nullable(); // email, sms, whatsapp preferences + $table->json('interests')->nullable(); // Areas of interest + // Marketing + $table->string('how_did_you_hear')->nullable(); // How they found us + $table->boolean('marketing_emails')->default(true); + $table->boolean('newsletter_subscription')->default(false); + $table->timestamps(); + + // Indexes + $table->index('phone'); + $table->index('company_name'); + $table->index('city'); + $table->index('country'); + $table->index('industry'); + }); + + // Create user_subscriptions table + Schema::create('user_subscriptions', function (Blueprint $table) { + $table->id(); + $table->foreignId('user_id')->constrained()->onDelete('cascade'); + $table->enum('plan_type', ['free', 'premium'])->default('free'); + $table->enum('status', ['active', 'expired', 'cancelled', 'pending'])->default('active'); + $table->timestamp('started_at')->nullable(); + $table->timestamp('expires_at')->nullable(); + $table->decimal('amount', 10, 2)->nullable(); + $table->string('currency', 3)->default('USD'); + $table->string('payment_method')->nullable(); // stripe, paypal, bank_transfer, etc. + $table->string('payment_reference')->nullable(); + $table->json('features')->nullable(); // What features this subscription includes + $table->text('notes')->nullable(); // Admin notes + $table->timestamp('cancelled_at')->nullable(); + $table->string('cancelled_reason')->nullable(); + $table->timestamps(); + + // Indexes + $table->index(['user_id', 'status']); + $table->index(['plan_type', 'status']); + $table->index('expires_at'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('user_subscriptions'); + Schema::dropIfExists('user_details'); + } +}; diff --git a/database/migrations/2025_05_28_100558_mds.php b/database/migrations/2025_05_28_100558_mds.php new file mode 100644 index 000000000..973a06506 --- /dev/null +++ b/database/migrations/2025_05_28_100558_mds.php @@ -0,0 +1,32 @@ +string('user_type')->default('free')->after('email'); + } + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + if (Schema::hasColumn('users', 'user_type')) { + $table->dropColumn('user_type'); + } + }); + } +}; diff --git a/database/migrations/2025_06_01_072549_create_actions_table.php b/database/migrations/2025_06_01_072549_create_actions_table.php new file mode 100644 index 000000000..ff53c05eb --- /dev/null +++ b/database/migrations/2025_06_01_072549_create_actions_table.php @@ -0,0 +1,37 @@ +id(); + $table->unsignedBigInteger('criterion_id'); // Changed to unsignedBigInteger for compatibility + $table->text('action_ar'); // Arabic description + $table->text('action_en'); // English description + $table->boolean('flag')->default(true); // true = Improvement Action, false = Corrective Action + $table->timestamps(); + + // Add foreign key constraint + $table->foreign('criterion_id')->references('id')->on('criteria')->onDelete('cascade'); + + // Add index for better performance + $table->index(['criterion_id', 'flag']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('actions'); + } +}; diff --git a/database/migrations/2025_06_01_075117_mds.php b/database/migrations/2025_06_01_075117_mds.php new file mode 100644 index 000000000..0b0fd8cff --- /dev/null +++ b/database/migrations/2025_06_01_075117_mds.php @@ -0,0 +1,38 @@ +id(); + $table->unsignedBigInteger('criterion_id'); // Changed to unsignedBigInteger for compatibility + $table->text('action_ar'); // Arabic description + $table->text('action_en'); // English description + $table->boolean('flag')->default(true); // true = Improvement Action, false = Corrective Action + $table->timestamps(); + + // Add foreign key constraint + $table->foreign('criterion_id')->references('id')->on('criteria')->onDelete('cascade'); + + // Add index for better performance + $table->index(['criterion_id', 'flag']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('actions'); + } +}; diff --git a/database/migrations/2025_06_16_065437_create_tool_subscriptions_table.php b/database/migrations/2025_06_16_065437_create_tool_subscriptions_table.php new file mode 100644 index 000000000..9739b50d6 --- /dev/null +++ b/database/migrations/2025_06_16_065437_create_tool_subscriptions_table.php @@ -0,0 +1,34 @@ +id(); + $table->foreignId('user_id')->constrained()->onDelete('cascade'); + $table->foreignId('tool_id')->constrained()->onDelete('cascade'); + $table->enum('plan_type', ['free', 'premium'])->default('free'); + $table->enum('status', ['active', 'inactive', 'expired'])->default('active'); + $table->timestamp('started_at')->useCurrent(); + $table->timestamp('expires_at')->nullable(); + $table->json('features')->nullable(); + $table->timestamps(); + + // Prevent duplicate subscriptions for same user-tool combination + $table->unique(['user_id', 'tool_id']); + }); + } + + public function down() + { + Schema::dropIfExists('tool_subscriptions'); + } +} diff --git a/database/migrations/2025_06_16_093743_add_paddle_fields_to_tool_subscriptions_table.php b/database/migrations/2025_06_16_093743_add_paddle_fields_to_tool_subscriptions_table.php new file mode 100644 index 000000000..1ca76017b --- /dev/null +++ b/database/migrations/2025_06_16_093743_add_paddle_fields_to_tool_subscriptions_table.php @@ -0,0 +1,35 @@ +string('paddle_subscription_id')->nullable(); + $table->string('paddle_customer_id')->nullable(); + $table->decimal('amount', 10, 2)->nullable(); + $table->string('currency', 3)->default('USD'); + $table->json('paddle_data')->nullable(); // Store additional Paddle data + }); + } + + public function down() + { + Schema::table('tool_subscriptions', function (Blueprint $table) { + $table->dropColumn([ + 'paddle_subscription_id', + 'paddle_customer_id', + 'amount', + 'currency', + 'paddle_data', + ]); + }); + } +}; diff --git a/database/migrations/2025_06_18_054411_create_blog_posts_table.php b/database/migrations/2025_06_18_054411_create_blog_posts_table.php new file mode 100644 index 000000000..2538e600a --- /dev/null +++ b/database/migrations/2025_06_18_054411_create_blog_posts_table.php @@ -0,0 +1,44 @@ +id(); + $table->string('title'); + $table->string('title_ar')->nullable(); + $table->string('slug')->unique(); + $table->text('excerpt'); + $table->text('excerpt_ar')->nullable(); + $table->longText('content'); + $table->longText('content_ar')->nullable(); + $table->string('featured_image')->nullable(); + $table->enum('status', ['draft', 'published', 'archived'])->default('draft'); + $table->json('tags')->nullable(); + $table->json('meta_data')->nullable(); // SEO and other metadata + $table->timestamp('published_at')->nullable(); + $table->foreignId('author_id')->constrained('users')->cascadeOnDelete(); + $table->unsignedInteger('views_count')->default(0); + $table->unsignedInteger('likes_count')->default(0); + $table->unsignedInteger('comments_count')->default(0); + $table->timestamps(); + + $table->index(['status', 'published_at']); + $table->index('author_id'); + if (Schema::getConnection()->getDriverName() !== 'sqlite') { + $table->fullText(['title', 'excerpt', 'content']); + } + }); + } + + public function down(): void + { + Schema::dropIfExists('blog_posts'); + } +}; diff --git a/database/migrations/2025_06_18_054426_create_blog_comments_table.php b/database/migrations/2025_06_18_054426_create_blog_comments_table.php new file mode 100644 index 000000000..2299d8748 --- /dev/null +++ b/database/migrations/2025_06_18_054426_create_blog_comments_table.php @@ -0,0 +1,35 @@ +id(); + $table->foreignId('blog_post_id')->constrained()->cascadeOnDelete(); + $table->foreignId('user_id')->nullable()->constrained()->nullOnDelete(); + $table->foreignId('parent_id')->nullable()->constrained('blog_comments')->cascadeOnDelete(); + $table->string('author_name')->nullable(); // For guest comments + $table->string('author_email')->nullable(); // For guest comments + $table->text('content'); + $table->enum('status', ['pending', 'approved', 'rejected'])->default('pending'); + $table->json('meta_data')->nullable(); // IP, user agent, etc. + $table->unsignedInteger('likes_count')->default(0); + $table->timestamps(); + + $table->index(['blog_post_id', 'status']); + $table->index(['parent_id']); + $table->index(['user_id']); + }); + } + + public function down(): void + { + Schema::dropIfExists('blog_comments'); + } +}; diff --git a/database/migrations/2025_06_18_054439_create_blog_post_likes_table.php b/database/migrations/2025_06_18_054439_create_blog_post_likes_table.php new file mode 100644 index 000000000..7574f0359 --- /dev/null +++ b/database/migrations/2025_06_18_054439_create_blog_post_likes_table.php @@ -0,0 +1,30 @@ +id(); + $table->foreignId('blog_post_id')->constrained()->cascadeOnDelete(); + $table->foreignId('user_id')->nullable()->constrained()->nullOnDelete(); + $table->string('session_id')->nullable(); // For guest likes + $table->ipAddress('ip_address')->nullable(); + $table->timestamps(); + + $table->unique(['blog_post_id', 'user_id']); + $table->unique(['blog_post_id', 'session_id']); + $table->index(['blog_post_id']); + }); + } + + public function down(): void + { + Schema::dropIfExists('blog_post_likes'); + } +}; diff --git a/database/migrations/2025_07_01_100000_create_posts_table.php b/database/migrations/2025_07_01_100000_create_posts_table.php new file mode 100644 index 000000000..0a724cafc --- /dev/null +++ b/database/migrations/2025_07_01_100000_create_posts_table.php @@ -0,0 +1,30 @@ +id(); + $table->string('title'); + $table->string('slug')->unique(); + $table->longText('content'); + $table->string('thumbnail')->nullable(); + $table->json('image_gallery')->nullable(); + $table->string('audio')->nullable(); + $table->string('video')->nullable(); + $table->string('youtube_url')->nullable(); + $table->timestamp('published_at')->nullable(); + $table->enum('status', ['draft', 'published'])->default('draft'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('posts'); + } +}; diff --git a/database/migrations/2025_07_01_100_create_comments_table.php b/database/migrations/2025_07_01_100_create_comments_table.php new file mode 100644 index 000000000..3256fec19 --- /dev/null +++ b/database/migrations/2025_07_01_100_create_comments_table.php @@ -0,0 +1,25 @@ +id(); + $table->foreignId('post_id')->constrained('posts')->cascadeOnDelete(); + $table->string('author_name'); + $table->text('content'); + $table->boolean('approved')->default(false); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('comments'); + } +}; diff --git a/database/migrations/2025_07_10_071904_create_accounts_table.php b/database/migrations/2025_07_10_071904_create_accounts_table.php new file mode 100644 index 000000000..f2ef0edda --- /dev/null +++ b/database/migrations/2025_07_10_071904_create_accounts_table.php @@ -0,0 +1,28 @@ +id(); + $table->string('name'); // Account holder name + $table->string('bank_name'); + $table->string('account_number'); + $table->string('iban'); + $table->string('swift_code')->nullable(); // Optional but recommended + $table->string('currency')->default('SAR'); // Optional + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('accounts'); + } +}; diff --git a/database/migrations/2025_07_10_072258_add_account_id_to_tool_requests_table.php b/database/migrations/2025_07_10_072258_add_account_id_to_tool_requests_table.php new file mode 100644 index 000000000..669c5d6f1 --- /dev/null +++ b/database/migrations/2025_07_10_072258_add_account_id_to_tool_requests_table.php @@ -0,0 +1,27 @@ +foreignId('account_id')->nullable()->constrained()->nullOnDelete(); + }); + } + } + + public function down(): void + { + if (Schema::hasTable('tool_requests')) { + Schema::table('tool_requests', function (Blueprint $table) { + $table->dropConstrainedForeignId('account_id'); + }); + } + } +}; + diff --git a/database/migrations/2025_07_15_000000_create_tool_requests_table.php b/database/migrations/2025_07_15_000000_create_tool_requests_table.php new file mode 100644 index 000000000..873538a94 --- /dev/null +++ b/database/migrations/2025_07_15_000000_create_tool_requests_table.php @@ -0,0 +1,27 @@ +id(); + $table->foreignId('user_id')->nullable()->constrained()->nullOnDelete(); + $table->foreignId('tool_id')->constrained()->cascadeOnDelete(); + $table->string('name'); + $table->string('email'); + $table->string('organization')->nullable(); + $table->text('message')->nullable(); + $table->enum('status', ['pending', 'quoted', 'done'])->default('pending'); + $table->timestamp('quotation_sent_at')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('tool_requests'); + } +}; diff --git a/database/migrations/2025_07_19_140413_create_tool_performance_levels_table.php b/database/migrations/2025_07_19_140413_create_tool_performance_levels_table.php new file mode 100644 index 000000000..7326e8e0f --- /dev/null +++ b/database/migrations/2025_07_19_140413_create_tool_performance_levels_table.php @@ -0,0 +1,30 @@ +id(); + $table->foreignId('tool_id')->constrained('tools')->onDelete('cascade'); + $table->string('code'); // e.g. 'excellent', 'good', etc. + $table->float('min_percentage'); // e.g. 90, 75, 60, etc. + $table->string('color', 7); // Color code like '#28a745' + $table->string('name_en'); + $table->string('name_ar'); + $table->string('text_en')->nullable(); + $table->string('text_ar')->nullable(); + $table->text('recommendation_en')->nullable(); + $table->text('recommendation_ar')->nullable(); + $table->timestamps(); + }); + } + + public function down() + { + Schema::dropIfExists('tool_performance_levels'); + } +} diff --git a/database/migrations/2025_08_03_083849_add_profile_completed_to_user_details_table.php b/database/migrations/2025_08_03_083849_add_profile_completed_to_user_details_table.php new file mode 100644 index 000000000..5b1ee7d50 --- /dev/null +++ b/database/migrations/2025_08_03_083849_add_profile_completed_to_user_details_table.php @@ -0,0 +1,28 @@ +boolean('profile_completed')->default(false)->after('newsletter_subscription'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('user_details', function (Blueprint $table) { + $table->dropColumn('profile_completed'); + }); + } +}; diff --git a/database/seeders/RolesAndPermissionsSeeder.php b/database/seeders/RolesAndPermissionsSeeder.php new file mode 100644 index 000000000..32e31ce56 --- /dev/null +++ b/database/seeders/RolesAndPermissionsSeeder.php @@ -0,0 +1,69 @@ +forgetCachedPermissions(); + + // Create permissions + $permissions = [ + 'view assessments', + 'create assessments', + 'edit assessments', + 'delete assessments', + 'view reports', + 'generate reports', + 'view analytics', + 'manage users', + 'manage subscriptions', + 'access admin panel', + ]; + + foreach ($permissions as $permission) { + Permission::firstOrCreate(['name' => $permission]); + } + + // Create roles and assign permissions + + // Free role + $freeRole = Role::firstOrCreate(['name' => 'free']); + $freeRole->givePermissionTo([ + 'view assessments', + 'create assessments', + 'view reports', + 'generate reports', + ]); + + // Premium role + $premiumRole = Role::firstOrCreate(['name' => 'premium']); + $premiumRole->givePermissionTo([ + 'view assessments', + 'create assessments', + 'edit assessments', + 'view reports', + 'generate reports', + 'view analytics', + ]); + + // Admin role + $adminRole = Role::firstOrCreate(['name' => 'admin']); + $adminRole->givePermissionTo(Permission::all()); + + // Super Admin role + $superAdminRole = Role::firstOrCreate(['name' => 'super_admin']); + $superAdminRole->givePermissionTo(Permission::all()); + + $this->command->info('Roles and permissions created successfully!'); + } +} diff --git a/lang/ar/filament.php b/lang/ar/filament.php new file mode 100644 index 000000000..89a391def --- /dev/null +++ b/lang/ar/filament.php @@ -0,0 +1,399 @@ + [ + 'tool' => [ + 'label' => 'أداة التقييم', + 'plural_label' => 'أدوات التقييم', + 'navigation_label' => 'أدوات التقييم', + 'navigation_group' => 'إدارة التقييم', + ], + 'domain' => [ + 'label' => 'مجال', + 'plural_label' => 'المجالات', + 'navigation_label' => 'المجالات', + ], + 'category' => [ + 'label' => 'فئة', + 'plural_label' => 'الفئات', + 'navigation_label' => 'الفئات', + ], + 'criterion' => [ + 'label' => 'معيار', + 'plural_label' => 'المعايير', + 'navigation_label' => 'المعايير', + ], + 'assessment' => [ + 'label' => 'تقييم', + 'plural_label' => 'التقييمات', + 'navigation_label' => 'التقييمات', + ], + 'assessment_response' => [ + 'label' => 'استجابة التقييم', + 'plural_label' => 'استجابات التقييم', + 'navigation_label' => 'استجابات التقييم', + ], + 'user' => [ + 'label' => 'مستخدم', + 'plural_label' => 'المستخدمون', + 'navigation_label' => 'المستخدمون', + 'navigation_group' => 'إدارة المستخدمين', + ], + 'guest_session' => [ + 'label' => 'جلسة ضيف', + 'plural_label' => 'جلسات الضيوف', + 'navigation_label' => 'جلسات الضيوف', + 'navigation_group' => 'إدارة التقييم', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Common Field Labels + |-------------------------------------------------------------------------- + */ + 'fields' => [ + // Basic fields + 'name' => 'الاسم', + 'name_en' => 'الاسم (بالإنجليزية)', + 'name_ar' => 'الاسم (بالعربية)', + 'description' => 'الوصف', + 'description_en' => 'الوصف (بالإنجليزية)', + 'description_ar' => 'الوصف (بالعربية)', + 'status' => 'الحالة', + 'order' => 'الترتيب', + 'image' => 'الصورة', + 'created_at' => 'تاريخ الإنشاء', + 'updated_at' => 'تاريخ التحديث', + + // Tool specific fields + 'tool_id' => 'أداة التقييم', + 'tool' => 'الأداة', + + // Domain specific fields + 'domain_id' => 'المجال', + 'domain' => 'المجال', + 'weight_percentage' => 'النسبة المئوية للوزن', + + // Category specific fields + 'category_id' => 'الفئة', + 'category' => 'الفئة', + + // Criterion specific fields + 'criterion_id' => 'المعيار', + 'criterion' => 'المعيار', + 'requires_attachment' => 'يتطلب مرفق', + + // Assessment fields + 'user_id' => 'المستخدم', + 'user' => 'المستخدم', + 'email' => 'البريد الإلكتروني', + 'phone' => 'رقم الهاتف', + 'organization' => 'المؤسسة', + 'company' => 'الشركة', + 'company_name' => 'اسم الشركة', + 'company_type' => 'نوع الشركة', + 'position' => 'المنصب', + 'city' => 'المدينة', + 'country' => 'البلد', + 'website' => 'الموقع الإلكتروني', + 'guest_name' => 'اسم الضيف', + 'guest_email' => 'بريد الضيف الإلكتروني', + 'title_en' => 'العنوان (بالإنجليزية)', + 'title_ar' => 'العنوان (بالعربية)', + 'excerpt_ar' => 'الملخص (بالعربية)', + 'content_ar' => 'المحتوى (بالعربية)', + 'published_at' => 'تاريخ ووقت النشر', + 'author' => 'الكاتب', + 'author_name' => 'اسم الكاتب (زائر)', + 'author_email' => 'بريد الكاتب (زائر)', + 'reply_to' => 'الرد على', + 'views' => 'المشاهدات', + 'likes' => 'الإعجابات', + 'comments' => 'التعليقات', + 'started_at' => 'تاريخ البدء', + 'completed_at' => 'تاريخ الإكمال', + + // Assessment Response fields + 'response' => 'الاستجابة', + 'value' => 'القيمة', + 'notes' => 'الملاحظات', + 'attachment' => 'المرفق', + + // User fields + 'password' => 'كلمة المرور', + 'email_verified_at' => 'تاريخ تأكيد البريد الإلكتروني', + 'plan_type' => 'نوع الخطة', + 'subscription_status' => 'حالة الاشتراك', + 'assessments_count' => 'عدد التقييمات', + 'reply' => 'رد', + + // Guest Session fields + 'session_id' => 'معرف الجلسة', + 'ip_address' => 'عنوان IP', + 'user_agent' => 'وكيل المستخدم', + 'device_type' => 'نوع الجهاز', + 'browser' => 'المتصفح', + 'browser_version' => 'إصدار المتصفح', + 'operating_system' => 'نظام التشغيل', + 'location' => 'الموقع', + 'timezone' => 'المنطقة الزمنية', + 'isp' => 'مزود خدمة الإنترنت', + 'session_data' => 'بيانات الجلسة', + 'last_activity' => 'آخر نشاط', + ], + + /* + |-------------------------------------------------------------------------- + | Status Values + |-------------------------------------------------------------------------- + */ + 'status' => [ + 'active' => 'نشط', + 'inactive' => 'غير نشط', + 'draft' => 'مسودة', + 'in_progress' => 'قيد التنفيذ', + 'completed' => 'مكتمل', + 'archived' => 'مؤرشف', + 'pending' => 'معلق', + 'approved' => 'مقبول', + 'rejected' => 'مرفوض', + 'expired' => 'منتهي الصلاحية', + 'cancelled' => 'ملغي', + ], + + /* + |-------------------------------------------------------------------------- + | Plan Types + |-------------------------------------------------------------------------- + */ + 'plans' => [ + 'free' => 'مجاني', + 'premium' => 'مميز', + 'professional' => 'احترافي', + 'enterprise' => 'مؤسسي', + ], + + /* + |-------------------------------------------------------------------------- + | Company Types + |-------------------------------------------------------------------------- + */ + 'company_types' => [ + 'commercial' => 'تجاري', + 'government' => 'حكومي', + 'service' => 'خدمي', + ], + + /* + |-------------------------------------------------------------------------- + | Device Types + |-------------------------------------------------------------------------- + */ + 'device_types' => [ + 'Desktop' => 'سطح المكتب', + 'Mobile' => 'هاتف محمول', + 'Tablet' => 'جهاز لوحي', + 'Unknown' => 'غير معروف', + ], + + /* + |-------------------------------------------------------------------------- + | Response Values + |-------------------------------------------------------------------------- + */ + 'responses' => [ + 'yes' => 'نعم', + 'no' => 'لا', + 'na' => 'غير قابل للتطبيق', + ], + + /* + |-------------------------------------------------------------------------- + | Actions + |-------------------------------------------------------------------------- + */ + 'actions' => [ + 'create' => 'إنشاء', + 'edit' => 'تعديل', + 'view' => 'عرض', + 'delete' => 'حذف', + 'save' => 'حفظ', + 'cancel' => 'إلغاء', + 'search' => 'بحث', + 'filter' => 'تصفية', + 'export' => 'تصدير', + 'import' => 'استيراد', + 'duplicate' => 'نسخ', + 'restore' => 'استعادة', + 'archive' => 'أرشفة', + 'activate' => 'تفعيل', + 'deactivate' => 'إلغاء التفعيل', + 'send_email' => 'إرسال بريد إلكتروني', + 'download_report' => 'تحميل التقرير', + 'view_details' => 'عرض التفاصيل', + 'upgrade_to_premium' => 'الترقية إلى المميز', + 'downgrade_to_free' => 'التراجع إلى المجاني', + 'send_password_reset' => 'إرسال إعادة تعيين كلمة المرور', + 'toggle_subscription' => 'تبديل الاشتراك', + 'contact_user' => 'التواصل مع المستخدم', + 'view_assessment' => 'عرض التقييم', + 'view_user_in_admin' => 'عرض المستخدم في لوحة الإدارة', + 'approve_selected' => 'الموافقة على المحدد', + 'reject_selected' => 'رفض المحدد', + ], + + /* + |-------------------------------------------------------------------------- + | Page Titles & Headings + |-------------------------------------------------------------------------- + */ + 'pages' => [ + 'dashboard' => 'لوحة التحكم', + 'create' => 'إنشاء :resource', + 'edit' => 'تعديل :resource', + 'view' => 'عرض :resource', + 'list' => 'قائمة :resource', + ], + + /* + |-------------------------------------------------------------------------- + | Table Headers & Labels + |-------------------------------------------------------------------------- + */ + 'table' => [ + 'no_records' => 'لا توجد سجلات', + 'search_placeholder' => 'البحث...', + 'actions' => 'الإجراءات', + 'bulk_actions' => 'إجراءات مجمعة', + 'selected_count' => 'تم تحديد :count عنصر', + 'per_page' => 'لكل صفحة', + 'page' => 'الصفحة', + 'of' => 'من', + 'results' => 'النتائج', + 'showing' => 'عرض', + 'to' => 'إلى', + ], + + /* + |-------------------------------------------------------------------------- + | Form Labels & Messages + |-------------------------------------------------------------------------- + */ + 'form' => [ + 'translations' => 'الترجمات', + 'english' => 'الإنجليزية', + 'arabic' => 'العربية', + 'basic_information' => 'المعلومات الأساسية', + 'contact_details' => 'تفاصيل الاتصال', + 'subscription_information' => 'معلومات الاشتراك', + 'user_details' => 'تفاصيل المستخدم', + 'content' => 'المحتوى', + 'media_settings' => 'الوسائط والإعدادات', + 'seo_meta_data' => 'سيو والبيانات الوصفية', + 'assessment_information' => 'معلومات التقييم', + 'session_information' => 'معلومات الجلسة', + 'technical_details' => 'التفاصيل التقنية', + 'location_information' => 'معلومات الموقع', + 'timestamps' => 'الطوابع الزمنية', + 'additional_data' => 'بيانات إضافية', + 'required_field' => 'حقل مطلوب', + 'optional_field' => 'حقل اختياري', + 'select_option' => 'اختر خيار...', + 'upload_file' => 'رفع ملف', + 'drag_drop_file' => 'اسحب وأفلت الملف هنا أو انقر للتصفح', + 'comment_details' => 'تفاصيل التعليق', + ], + + /* + |-------------------------------------------------------------------------- + | Notifications & Messages + |-------------------------------------------------------------------------- + */ + 'notifications' => [ + 'saved' => 'تم الحفظ بنجاح', + 'deleted' => 'تم الحذف بنجاح', + 'created' => 'تم الإنشاء بنجاح', + 'updated' => 'تم التحديث بنجاح', + 'restored' => 'تم الاستعادة بنجاح', + 'error' => 'حدث خطأ', + 'success' => 'تمت العملية بنجاح', + 'warning' => 'تحذير', + 'info' => 'معلومات', + 'email_sent' => 'تم إرسال البريد الإلكتروني بنجاح', + 'password_reset_sent' => 'تم إرسال رابط إعادة تعيين كلمة المرور بنجاح', + 'user_upgraded' => 'تمت ترقية المستخدم إلى الخطة المميزة', + 'user_downgraded' => 'تم تراجع المستخدم إلى الخطة المجانية', + ], + + /* + |-------------------------------------------------------------------------- + | Filters & Tabs + |-------------------------------------------------------------------------- + */ + 'filters' => [ + 'all' => 'الكل', + 'active' => 'النشط', + 'inactive' => 'غير النشط', + 'recent' => 'الحديث', + 'completed' => 'المكتمل', + 'in_progress' => 'قيد التنفيذ', + 'draft' => 'المسودات', + 'free_users' => 'المستخدمون المجانيون', + 'premium_users' => 'المستخدمون المميزون', + 'expired' => 'منتهي الصلاحية', + 'last_24_hours' => 'آخر 24 ساعة', + 'last_week' => 'الأسبوع الماضي', + 'last_month' => 'الشهر الماضي', + 'replies_only' => 'الردود فقط', + ], + + /* + |-------------------------------------------------------------------------- + | Widgets & Analytics + |-------------------------------------------------------------------------- + */ + 'widgets' => [ + 'total_sessions' => 'إجمالي الجلسات', + 'unique_users' => 'المستخدمون الفريدون', + 'completed_assessments' => 'التقييمات المكتملة', + 'conversion_rate' => 'معدل التحويل', + 'device_breakdown' => 'توزيع الأجهزة', + 'geographic_distribution' => 'التوزيع الجغرافي', + 'sessions_trend' => 'اتجاه الجلسات', + 'guest_analytics' => 'تحليلات الضيوف', + 'recent_guest_sessions' => 'جلسات الضيوف الحديثة', + 'increased_by' => 'زاد بنسبة', + 'decreased_by' => 'انخفض بنسبة', + 'sessions_to_completion' => 'الجلسات إلى الإكمال', + 'device_usage' => 'استخدام الأجهزة', + 'sessions_by_country' => 'الجلسات حسب البلد', + 'total_sessions_chart' => 'إجمالي الجلسات', + 'completed_sessions_chart' => 'الجلسات المكتملة', + 'last_7_days' => 'آخر 7 أيام', + 'last_30_days' => 'آخر 30 يوم', + 'last_3_months' => 'آخر 3 أشهر', + 'this_year' => 'هذا العام', + ], + + /* + |-------------------------------------------------------------------------- + | Empty States + |-------------------------------------------------------------------------- + */ + 'empty_states' => [ + 'no_tools' => 'لا توجد أدوات تقييم', + 'no_assessments' => 'لا توجد تقييمات', + 'no_users' => 'لا توجد مستخدمين', + 'no_sessions' => 'لا توجد جلسات', + 'no_responses' => 'لا توجد استجابات', + 'no_records_found' => 'لم يتم العثور على سجلات', + 'start_by_creating' => 'ابدأ بإنشاء :resource جديد', + 'create_first' => 'إنشاء أول :resource', + ], +]; diff --git a/lang/en/filament.php b/lang/en/filament.php new file mode 100644 index 000000000..6fc572a3a --- /dev/null +++ b/lang/en/filament.php @@ -0,0 +1,399 @@ + [ + 'tool' => [ + 'label' => 'Tool', + 'plural_label' => 'Tools', + 'navigation_label' => 'Tools', + 'navigation_group' => 'Assessment Management', + ], + 'domain' => [ + 'label' => 'Domain', + 'plural_label' => 'Domains', + 'navigation_label' => 'Domains', + ], + 'category' => [ + 'label' => 'Category', + 'plural_label' => 'Categories', + 'navigation_label' => 'Categories', + ], + 'criterion' => [ + 'label' => 'Criterion', + 'plural_label' => 'Criteria', + 'navigation_label' => 'Criteria', + ], + 'assessment' => [ + 'label' => 'Assessment', + 'plural_label' => 'Assessments', + 'navigation_label' => 'Assessments', + ], + 'assessment_response' => [ + 'label' => 'Assessment Response', + 'plural_label' => 'Assessment Responses', + 'navigation_label' => 'Assessment Responses', + ], + 'user' => [ + 'label' => 'User', + 'plural_label' => 'Users', + 'navigation_label' => 'Users', + 'navigation_group' => 'User Management', + ], + 'guest_session' => [ + 'label' => 'Guest Session', + 'plural_label' => 'Guest Sessions', + 'navigation_label' => 'Guest Sessions', + 'navigation_group' => 'Assessment Management', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Common Field Labels + |-------------------------------------------------------------------------- + */ + 'fields' => [ + // Basic fields + 'name' => 'Name', + 'name_en' => 'Name (English)', + 'name_ar' => 'Name (Arabic)', + 'description' => 'Description', + 'description_en' => 'Description (English)', + 'description_ar' => 'Description (Arabic)', + 'status' => 'Status', + 'order' => 'Order', + 'image' => 'Image', + 'created_at' => 'Created At', + 'updated_at' => 'Updated At', + + // Tool specific fields + 'tool_id' => 'Tool', + 'tool' => 'Tool', + + // Domain specific fields + 'domain_id' => 'Domain', + 'domain' => 'Domain', + 'weight_percentage' => 'Weight Percentage', + + // Category specific fields + 'category_id' => 'Category', + 'category' => 'Category', + + // Criterion specific fields + 'criterion_id' => 'Criterion', + 'criterion' => 'Criterion', + 'requires_attachment' => 'Requires Attachment', + + // Assessment fields + 'user_id' => 'User', + 'user' => 'User', + 'email' => 'Email', + 'phone' => 'Phone', + 'organization' => 'Organization', + 'company' => 'Company', + 'company_name' => 'Company Name', + 'company_type' => 'Company Type', + 'position' => 'Position', + 'city' => 'City', + 'country' => 'Country', + 'website' => 'Website', + 'guest_name' => 'Guest Name', + 'guest_email' => 'Guest Email', + 'title_en' => 'Title (English)', + 'title_ar' => 'Title (Arabic)', + 'excerpt_ar' => 'Excerpt (Arabic)', + 'content_ar' => 'Content (Arabic)', + 'published_at' => 'Publish Date & Time', + 'author' => 'Author', + 'author_name' => 'Author Name (Guest)', + 'author_email' => 'Author Email (Guest)', + 'reply_to' => 'Reply To', + 'views' => 'Views', + 'likes' => 'Likes', + 'comments' => 'Comments', + 'started_at' => 'Started At', + 'completed_at' => 'Completed At', + + // Assessment Response fields + 'response' => 'Response', + 'value' => 'Value', + 'notes' => 'Notes', + 'attachment' => 'Attachment', + + // User fields + 'password' => 'Password', + 'email_verified_at' => 'Email Verified At', + 'plan_type' => 'Plan Type', + 'subscription_status' => 'Subscription Status', + 'assessments_count' => 'Assessments Count', + 'reply' => 'Reply', + + // Guest Session fields + 'session_id' => 'Session ID', + 'ip_address' => 'IP Address', + 'user_agent' => 'User Agent', + 'device_type' => 'Device Type', + 'browser' => 'Browser', + 'browser_version' => 'Browser Version', + 'operating_system' => 'Operating System', + 'location' => 'Location', + 'timezone' => 'Timezone', + 'isp' => 'ISP', + 'session_data' => 'Session Data', + 'last_activity' => 'Last Activity', + ], + + /* + |-------------------------------------------------------------------------- + | Status Values + |-------------------------------------------------------------------------- + */ + 'status' => [ + 'active' => 'Active', + 'inactive' => 'Inactive', + 'draft' => 'Draft', + 'in_progress' => 'In Progress', + 'completed' => 'Completed', + 'archived' => 'Archived', + 'pending' => 'Pending', + 'approved' => 'Approved', + 'rejected' => 'Rejected', + 'expired' => 'Expired', + 'cancelled' => 'Cancelled', + ], + + /* + |-------------------------------------------------------------------------- + | Plan Types + |-------------------------------------------------------------------------- + */ + 'plans' => [ + 'free' => 'Free', + 'premium' => 'Premium', + 'professional' => 'Professional', + 'enterprise' => 'Enterprise', + ], + + /* + |-------------------------------------------------------------------------- + | Company Types + |-------------------------------------------------------------------------- + */ + 'company_types' => [ + 'commercial' => 'Commercial', + 'government' => 'Government', + 'service' => 'Service', + ], + + /* + |-------------------------------------------------------------------------- + | Device Types + |-------------------------------------------------------------------------- + */ + 'device_types' => [ + 'Desktop' => 'Desktop', + 'Mobile' => 'Mobile', + 'Tablet' => 'Tablet', + 'Unknown' => 'Unknown', + ], + + /* + |-------------------------------------------------------------------------- + | Response Values + |-------------------------------------------------------------------------- + */ + 'responses' => [ + 'yes' => 'Yes', + 'no' => 'No', + 'na' => 'N/A', + ], + + /* + |-------------------------------------------------------------------------- + | Actions + |-------------------------------------------------------------------------- + */ + 'actions' => [ + 'create' => 'Create', + 'edit' => 'Edit', + 'view' => 'View', + 'delete' => 'Delete', + 'save' => 'Save', + 'cancel' => 'Cancel', + 'search' => 'Search', + 'filter' => 'Filter', + 'export' => 'Export', + 'import' => 'Import', + 'duplicate' => 'Duplicate', + 'restore' => 'Restore', + 'archive' => 'Archive', + 'activate' => 'Activate', + 'deactivate' => 'Deactivate', + 'send_email' => 'Send Email', + 'download_report' => 'Download Report', + 'view_details' => 'View Details', + 'upgrade_to_premium' => 'Upgrade to Premium', + 'downgrade_to_free' => 'Downgrade to Free', + 'send_password_reset' => 'Send Password Reset', + 'toggle_subscription' => 'Toggle Subscription', + 'contact_user' => 'Contact User', + 'view_assessment' => 'View Assessment', + 'view_user_in_admin' => 'View User in Admin', + 'approve_selected' => 'Approve Selected', + 'reject_selected' => 'Reject Selected', + ], + + /* + |-------------------------------------------------------------------------- + | Page Titles & Headings + |-------------------------------------------------------------------------- + */ + 'pages' => [ + 'dashboard' => 'Dashboard', + 'create' => 'Create :resource', + 'edit' => 'Edit :resource', + 'view' => 'View :resource', + 'list' => 'List :resource', + ], + + /* + |-------------------------------------------------------------------------- + | Table Headers & Labels + |-------------------------------------------------------------------------- + */ + 'table' => [ + 'no_records' => 'No records found', + 'search_placeholder' => 'Search...', + 'actions' => 'Actions', + 'bulk_actions' => 'Bulk Actions', + 'selected_count' => ':count item(s) selected', + 'per_page' => 'Per Page', + 'page' => 'Page', + 'of' => 'of', + 'results' => 'Results', + 'showing' => 'Showing', + 'to' => 'to', + ], + + /* + |-------------------------------------------------------------------------- + | Form Labels & Messages + |-------------------------------------------------------------------------- + */ + 'form' => [ + 'translations' => 'Translations', + 'english' => 'English', + 'arabic' => 'Arabic', + 'basic_information' => 'Basic Information', + 'contact_details' => 'Contact Details', + 'subscription_information' => 'Subscription Information', + 'user_details' => 'User Details', + 'content' => 'Content', + 'media_settings' => 'Media & Settings', + 'seo_meta_data' => 'SEO & Meta Data', + 'assessment_information' => 'Assessment Information', + 'session_information' => 'Session Information', + 'technical_details' => 'Technical Details', + 'location_information' => 'Location Information', + 'timestamps' => 'Timestamps', + 'additional_data' => 'Additional Data', + 'required_field' => 'Required Field', + 'optional_field' => 'Optional Field', + 'select_option' => 'Select Option...', + 'upload_file' => 'Upload File', + 'drag_drop_file' => 'Drag & Drop file here or click to browse', + 'comment_details' => 'Comment Details', + ], + + /* + |-------------------------------------------------------------------------- + | Notifications & Messages + |-------------------------------------------------------------------------- + */ + 'notifications' => [ + 'saved' => 'Saved successfully', + 'deleted' => 'Deleted successfully', + 'created' => 'Created successfully', + 'updated' => 'Updated successfully', + 'restored' => 'Restored successfully', + 'error' => 'An error occurred', + 'success' => 'Operation successful', + 'warning' => 'Warning', + 'info' => 'Info', + 'email_sent' => 'Email sent successfully', + 'password_reset_sent' => 'Password reset link sent', + 'user_upgraded' => 'User upgraded to premium', + 'user_downgraded' => 'User downgraded to free plan', + ], + + /* + |-------------------------------------------------------------------------- + | Filters & Tabs + |-------------------------------------------------------------------------- + */ + 'filters' => [ + 'all' => 'All', + 'active' => 'Active', + 'inactive' => 'Inactive', + 'recent' => 'Recent', + 'completed' => 'Completed', + 'in_progress' => 'In Progress', + 'draft' => 'Draft', + 'free_users' => 'Free Users', + 'premium_users' => 'Premium Users', + 'expired' => 'Expired', + 'last_24_hours' => 'Last 24 Hours', + 'last_week' => 'Last Week', + 'last_month' => 'Last Month', + 'replies_only' => 'Replies Only', + ], + + /* + |-------------------------------------------------------------------------- + | Widgets & Analytics + |-------------------------------------------------------------------------- + */ + 'widgets' => [ + 'total_sessions' => 'Total Sessions', + 'unique_users' => 'Unique Users', + 'completed_assessments' => 'Completed Assessments', + 'conversion_rate' => 'Conversion Rate', + 'device_breakdown' => 'Device Breakdown', + 'geographic_distribution' => 'Geographic Distribution', + 'sessions_trend' => 'Sessions Trend', + 'guest_analytics' => 'Guest Analytics', + 'recent_guest_sessions' => 'Recent Guest Sessions', + 'increased_by' => 'Increased by', + 'decreased_by' => 'Decreased by', + 'sessions_to_completion' => 'Sessions to Completion', + 'device_usage' => 'Device Usage', + 'sessions_by_country' => 'Sessions by Country', + 'total_sessions_chart' => 'Total Sessions', + 'completed_sessions_chart' => 'Completed Sessions', + 'last_7_days' => 'Last 7 Days', + 'last_30_days' => 'Last 30 Days', + 'last_3_months' => 'Last 3 Months', + 'this_year' => 'This Year', + ], + + /* + |-------------------------------------------------------------------------- + | Empty States + |-------------------------------------------------------------------------- + */ + 'empty_states' => [ + 'no_tools' => 'No tools found', + 'no_assessments' => 'No assessments found', + 'no_users' => 'No users found', + 'no_sessions' => 'No sessions found', + 'no_responses' => 'No responses found', + 'no_records_found' => 'No records found', + 'start_by_creating' => 'Start by creating a new :resource', + 'create_first' => 'Create your first :resource', + ], +]; diff --git a/lang/vendor/filament-shield/ar/filament-shield.php b/lang/vendor/filament-shield/ar/filament-shield.php new file mode 100644 index 000000000..8adae593d --- /dev/null +++ b/lang/vendor/filament-shield/ar/filament-shield.php @@ -0,0 +1,80 @@ + 'العنوان', + 'column.guard_name' => 'اسم الحارس', + 'column.roles' => 'الأدوار', + 'column.permissions' => 'الصلاحيات', + 'column.updated_at' => 'تاريخ التحديث', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'العنوان', + 'field.guard_name' => 'اسم الحارس', + 'field.permissions' => 'الصلاحيات', + 'field.select_all.name' => 'تحديد الكل', + 'field.select_all.message' => 'تفعيل كافة الصلاحيات لهذا الدور', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'إدارة الوصول', + 'nav.role.label' => 'الأدوار', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'دور', + 'resource.label.roles' => 'الأدوار', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'الأقسام', + 'resources' => 'المصادر', + 'widgets' => 'الأجزاء', + 'pages' => 'الصفحات', + 'custom' => 'صلاحيات مخصصة', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'أنت غير مخول، لديك صلاحية للوصول', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'عرض', + 'view_any' => 'عرض الكل', + 'create' => 'إضافة', + 'update' => 'تعديل', + 'delete' => 'حذف', + 'delete_any' => 'حذف الكل', + 'force_delete' => 'إجبار الحذف', + 'force_delete_any' => ' إجبار حذف أي', + 'reorder' => 'إعادة ترتيب', + 'restore' => 'استرجاع', + 'restore_any' => 'استرجاع الكل', + 'replicate' => 'استنساخ', + ], +]; diff --git a/lang/vendor/filament-shield/ckb/filament-shield.php b/lang/vendor/filament-shield/ckb/filament-shield.php new file mode 100644 index 000000000..85a4014b3 --- /dev/null +++ b/lang/vendor/filament-shield/ckb/filament-shield.php @@ -0,0 +1,80 @@ + 'ناو', + 'column.guard_name' => 'ناوی گوارد', + 'column.roles' => 'ڕۆڵەکان', + 'column.permissions' => 'پێرمشنەکان', + 'column.updated_at' => 'نوێکردنەوە لە', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'ناو', + 'field.guard_name' => 'ناوی گوارد', + 'field.permissions' => 'پێرمشنەکان', + 'field.select_all.name' => 'دیاری کردنی هەموو', + 'field.select_all.message' => 'هەموو پێرمشنەکان چالاک بکە کە لە ئێستادا چالاک کراوە بۆ ئەم ڕۆڵە', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'فیڵەمێنت شیڵد', + 'nav.role.label' => 'ڕۆڵەکان', + 'nav.role.icon' => 'heroicon-o-users', + 'resource.label.role' => 'ڕۆڵ', + 'resource.label.roles' => 'ڕۆڵەکان', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'یەکەکان', + 'resources' => 'سەرچاوەکان', + 'widgets' => 'ویجتەکان', + 'pages' => 'پەیجەکان', + 'custom' => 'پێرمشنی تایبەت', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'تۆ مۆڵەتی چوونە ژوورەوەت نییە', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'بینین', + 'view_any' => 'بینینی هەریەک', + 'create' => 'دروستکردن', + 'update' => 'نوێکردنەوە', + 'delete' => 'سڕینەوە', + 'delete_any' => 'سڕینەوەی هەریەک', + 'force_delete' => 'سڕینەوەی تەواو', + 'force_delete_any' => 'سڕینەوەی تەواوی هەریەک', + 'restore' => 'گێڕاندنەوە', + 'reorder' => 'ڕیزکردن', + 'restore_any' => 'گێڕاندنەوەی هەریەک', + 'replicate' => 'دووبارەکردنەوە', + ], +]; diff --git a/lang/vendor/filament-shield/cs/filament-shield.php b/lang/vendor/filament-shield/cs/filament-shield.php new file mode 100644 index 000000000..9e25e8f70 --- /dev/null +++ b/lang/vendor/filament-shield/cs/filament-shield.php @@ -0,0 +1,80 @@ + 'Název', + 'column.guard_name' => 'Název guardu', + 'column.roles' => 'Role', + 'column.permissions' => 'Oprávnění', + 'column.updated_at' => 'Změněno dne', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'Název', + 'field.guard_name' => 'Název guardu', + 'field.permissions' => 'Oprávnění', + 'field.select_all.name' => 'Vybrat vše', + 'field.select_all.message' => 'Povolit všechny oprávnení právě Dostupné pro tuto roli', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'Role', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Role', + 'resource.label.roles' => 'Role', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'Entity', + 'resources' => 'Zdroje', + 'widgets' => 'Widgety', + 'pages' => 'Stránky', + 'custom' => 'Vlastní oprávnění', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'Nemáte oprávnění k přístupu', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Zobrazit', + 'view_any' => 'Zobrazit jakýkoliv', + 'create' => 'Vyvořit', + 'update' => 'Upravit', + 'delete' => 'Smazat', + 'delete_any' => 'Smazat jakýkoliv', + 'force_delete' => 'Trvale smazat', + 'force_delete_any' => 'Trvale smazat jakýkoliv', + 'restore' => 'Obnovit', + 'reorder' => 'Změnit pořadí', + 'restore_any' => 'Obnovit jakýkoliv', + 'replicate' => 'Duplikovat', + ], +]; diff --git a/lang/vendor/filament-shield/de/filament-shield.php b/lang/vendor/filament-shield/de/filament-shield.php new file mode 100644 index 000000000..1562e2b00 --- /dev/null +++ b/lang/vendor/filament-shield/de/filament-shield.php @@ -0,0 +1,80 @@ + 'Guard-Name', + 'column.name' => 'Name', + 'column.permissions' => 'Berechtigungen', + 'column.roles' => 'Rollen', + 'column.updated_at' => 'Aktualisiert am', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.guard_name' => 'Guard-Name', + 'field.name' => 'Name', + 'field.permissions' => 'Berechtigungen', + 'field.select_all.message' => 'Aktivierung aller Berechtigungen, die derzeit für diese Rolle aktiviert sind', + 'field.select_all.name' => 'Alle auswählen', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'nav.role.label' => 'Rollen', + 'resource.label.role' => 'Rolle', + 'resource.label.roles' => 'Rollen', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'Entitäten', + 'resources' => 'Ressourcen', + 'widgets' => 'Widgets', + 'pages' => 'Seiten', + 'custom' => 'benutzerdefinierte Berechtigungen', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'Sie haben keine Zugangsberechtigung', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Anzeigen', + 'view_any' => 'Alle anzeigen', + 'create' => 'Erstellen', + 'update' => 'Bearbeiten', + 'delete' => 'Löschen', + 'delete_any' => 'Alle löschen', + 'force_delete' => 'Endgültig löschen', + 'force_delete_any' => 'Alle endgültig löschen', + // 'reorder' => 'Reorder', + // 'replicate' => 'Replicate', + 'restore' => 'Wiederherstellen', + 'restore_any' => 'Alle wiederherstellen', + ], +]; diff --git a/lang/vendor/filament-shield/en/filament-shield.php b/lang/vendor/filament-shield/en/filament-shield.php new file mode 100644 index 000000000..7016ef017 --- /dev/null +++ b/lang/vendor/filament-shield/en/filament-shield.php @@ -0,0 +1,83 @@ + 'Name', + 'column.guard_name' => 'Guard Name', + 'column.team' => 'Team', + 'column.roles' => 'Roles', + 'column.permissions' => 'Permissions', + 'column.updated_at' => 'Updated At', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'Name', + 'field.guard_name' => 'Guard Name', + 'field.permissions' => 'Permissions', + 'field.team' => 'Team', + 'field.team.placeholder' => 'Select a team ...', + 'field.select_all.name' => 'Select All', + 'field.select_all.message' => 'Enables/Disables all Permissions for this role', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'Roles', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Role', + 'resource.label.roles' => 'Roles', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'Entities', + 'resources' => 'Resources', + 'widgets' => 'Widgets', + 'pages' => 'Pages', + 'custom' => 'Custom Permissions', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'You do not have permission to access', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'View', + 'view_any' => 'View Any', + 'create' => 'Create', + 'update' => 'Update', + 'delete' => 'Delete', + 'delete_any' => 'Delete Any', + 'force_delete' => 'Force Delete', + 'force_delete_any' => 'Force Delete Any', + 'restore' => 'Restore', + 'reorder' => 'Reorder', + 'restore_any' => 'Restore Any', + 'replicate' => 'Replicate', + ], +]; diff --git a/lang/vendor/filament-shield/es/filament-shield.php b/lang/vendor/filament-shield/es/filament-shield.php new file mode 100644 index 000000000..5993e1097 --- /dev/null +++ b/lang/vendor/filament-shield/es/filament-shield.php @@ -0,0 +1,80 @@ + 'Nombre', + 'column.guard_name' => 'Guard', + 'column.roles' => 'Roles', + 'column.permissions' => 'Permisos', + 'column.updated_at' => 'Actualizado el', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'Nombre', + 'field.guard_name' => 'Guard', + 'field.permissions' => 'Permisos', + 'field.select_all.name' => 'Seleccionar todos', + 'field.select_all.message' => 'Habilitar todos los permisos actualmente habilitados para este rol', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'Roles', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Rol', + 'resource.label.roles' => 'Roles', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'Entidades', + 'resources' => 'Recursos', + 'widgets' => 'Widgets', + 'pages' => 'Páginas', + 'custom' => 'Permisos personalizados', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'Usted no tiene permiso de acceso', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Ver un registro en particular', + 'view_any' => 'Ver el listado de registros', + 'create' => 'Crear', + 'update' => 'Actualizar', + 'delete' => 'Eliminar un registro en particular', + 'delete_any' => 'Eliminar varios registros a la vez', + 'force_delete' => 'Forzar elminación de un registro en particular', + 'force_delete_any' => 'Forzar eliminación de varios registros', + 'restore' => 'Restaurar un registro en particular', + 'reorder' => 'Reordenar', + 'restore_any' => 'Restaurar varios registros', + 'replicate' => 'Replicar', + ], +]; diff --git a/lang/vendor/filament-shield/fa/filament-shield.php b/lang/vendor/filament-shield/fa/filament-shield.php new file mode 100644 index 000000000..b1b992727 --- /dev/null +++ b/lang/vendor/filament-shield/fa/filament-shield.php @@ -0,0 +1,80 @@ + 'نام', + 'column.guard_name' => 'نام گارد', + 'column.roles' => 'نقش‌ها', + 'column.permissions' => 'دسترسی‌ها', + 'column.updated_at' => 'به‌روزشده در', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'نام', + 'field.guard_name' => 'نام گارد', + 'field.permissions' => 'دسترسی‌ها', + 'field.select_all.name' => 'انتخاب همه', + 'field.select_all.message' => 'تمام دسترسی‌های فعال فعلی را برای این نقش فعال کن.', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'نقش‌ها', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'نقش', + 'resource.label.roles' => 'نقش‌ها', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'موجودیت‌ها', + 'resources' => 'منابع', + 'widgets' => 'ویجت‌ها', + 'pages' => 'صفحات', + 'custom' => 'دسترسی‌های سفارشی', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'شما اجازه دسترسی ندارید.', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'نمایش', + 'view_any' => 'نمایش همه', + 'create' => 'ایجاد', + 'update' => 'ویرایش', + 'delete' => 'حذف', + 'delete_any' => 'حذف همه', + 'force_delete' => 'حذف اجباری', + 'force_delete_any' => 'حذف اجباری همه', + 'restore' => 'بازیابی', + 'replicate' => 'تکثیر', + 'reorder' => 'مرتب‌سازی', + 'restore_any' => 'بازیابی همه', + ], +]; diff --git a/lang/vendor/filament-shield/fr/filament-shield.php b/lang/vendor/filament-shield/fr/filament-shield.php new file mode 100644 index 000000000..f673672e2 --- /dev/null +++ b/lang/vendor/filament-shield/fr/filament-shield.php @@ -0,0 +1,80 @@ + 'Nom', + 'column.guard_name' => 'Nom du Guard', + 'column.roles' => 'Rôles', + 'column.permissions' => 'Permissions', + 'column.updated_at' => 'Mis à jour à', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'Nom', + 'field.guard_name' => 'Nom du Guard', + 'field.permissions' => 'Permissions', + 'field.select_all.name' => 'Tout sélectionner', + 'field.select_all.message' => 'Activer toutes les autorisations pour ce rôle', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'Rôles', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Rôle', + 'resource.label.roles' => 'Rôles', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'Section', + 'resources' => 'Ressources', + 'widgets' => 'Widgets', + 'pages' => 'Pages', + 'custom' => 'Permissions personnalisées', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'Vous n\'avez pas la permission d\'accéder', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Voir', + 'view_any' => 'Voir tout', + 'create' => 'Créer', + 'update' => 'Mettre à jour', + 'delete' => 'Supprimer', + 'delete_any' => 'Supprimer tout', + 'force_delete' => 'Forcer la suppression', + 'force_delete_any' => 'Forcer la suppression de tout', + 'restore' => 'Restaurer', + 'replicate' => 'Répliquer', + 'reorder' => 'Réordonner', + 'restore_any' => 'Restaurer tout', + ], +]; diff --git a/lang/vendor/filament-shield/hu/filament-shield.php b/lang/vendor/filament-shield/hu/filament-shield.php new file mode 100644 index 000000000..9cb40a17d --- /dev/null +++ b/lang/vendor/filament-shield/hu/filament-shield.php @@ -0,0 +1,80 @@ + 'Név', + 'column.guard_name' => 'Guard név', + 'column.roles' => 'Jogosultságok', + 'column.permissions' => 'Engedélyek', + 'column.updated_at' => 'Frissítve', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'Név', + 'field.guard_name' => 'Guard név', + 'field.permissions' => 'Engedélyek', + 'field.select_all.name' => 'Összes kijelölése', + 'field.select_all.message' => 'Engedélyezze az összes jelenleg bekapcsolt engedélyt a szerepkör számára.', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Rendszer', + 'nav.role.label' => 'Jogosultságok', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Jogosultság', + 'resource.label.roles' => 'Jogosultságok', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'Entitások', + 'resources' => 'Erőforrások', + 'widgets' => 'Widgetek', + 'pages' => 'Oldalak', + 'custom' => 'Egyedi jogosultságok', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'Nincs megfelelő hozzáférésed', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Megtekintés', + 'view_any' => 'Összes megtekintése', + 'create' => 'Létrehozás', + 'update' => 'Módosítás', + 'delete' => 'Törlés', + 'delete_any' => 'Összes törlése', + 'force_delete' => 'Végleges törlés', + 'force_delete_any' => 'Összes végeles törlése', + 'restore' => 'Helyreállítás', + 'reorder' => 'Sorbarendezés', + 'restore_any' => 'Összes helyreállítása', + 'replicate' => 'Másolás', + ], +]; diff --git a/lang/vendor/filament-shield/hy/filament-shield.php b/lang/vendor/filament-shield/hy/filament-shield.php new file mode 100644 index 000000000..a1485896a --- /dev/null +++ b/lang/vendor/filament-shield/hy/filament-shield.php @@ -0,0 +1,80 @@ + 'Անվանում', + 'column.guard_name' => 'Գուարդի անվանում', + 'column.roles' => 'Դերեր', + 'column.permissions' => 'Թույլտվություններ', + 'column.updated_at' => 'Թարմացվել է', + + /* + |------------------------------------------------- ------------------------- + | Form Fields + |------------------------------------------------- ------------------------- + */ + + 'field.name' => 'Անվանում', + 'field.guard_name' => 'Գուարդի անվանում', + 'field.permissions' => 'Թույլտվություններ', + 'field.select_all.name' => 'Ընտրել բոլորը', + 'field.select_all.message' => 'Միացնել բոլոր թույլտվությունները, որոնք Հասանելի են այս դերի համար', + + /* + |------------------------------------------------- ------------------------- + | Navigation & Resource + |------------------------------------------------- ------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'Դերեր', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Դեր', + 'resource.label.roles' => 'Դերեր', + + /* + |------------------------------------------------- ------------------------- + | Section & Tabs + |------------------------------------------------- ------------------------- + */ + + 'section' => 'Սուբյեկտներ', + 'resources' => 'Ռեսուրսներ', + 'widgets' => 'Վիդջեթներ', + 'pages' => 'Էջեր', + 'custom' => 'Օգտագործողի թույլտվություններ', + + /* + |------------------------------------------------- ------------------------- + | Messages + |------------------------------------------------- ------------------------- + */ + + 'forbidden' => 'Դուք հասանելիություն չունեք', + + /* + |------------------------------------------------- ------------------------- + | Resource Permissions' Labels + |------------------------------------------------- ------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Դիտել', + 'view_any' => 'Դիտել ցանկացած', + 'create' => 'Ստեղծել', + 'update' => 'Թարմացնել', + 'delete' => 'Ջնջել', + 'delete_any' => 'Ջնջել ցանկացած', + 'force_delete' => 'Ստիպել ջնջել', + 'force_delete_any' => 'Ստիպել ջնջել ցանկացածը', + 'restore' => 'Վերականգնել', + 'reorder' => 'Վերադասավորել', + 'restore_any' => 'Վերադասավորել ցանկացածը', + 'replicate' => 'Կրկնօրինակել', + ], +]; diff --git a/lang/vendor/filament-shield/id/filament-shield.php b/lang/vendor/filament-shield/id/filament-shield.php new file mode 100644 index 000000000..c4bd62cb5 --- /dev/null +++ b/lang/vendor/filament-shield/id/filament-shield.php @@ -0,0 +1,80 @@ + 'Nama', + 'column.guard_name' => 'Nama Penjaga', + 'column.roles' => 'Peran', + 'column.permissions' => 'Izin', + 'column.updated_at' => 'Dirubah', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'Nama', + 'field.guard_name' => 'Nama Penjaga', + 'field.permissions' => 'Izin', + 'field.select_all.name' => 'Pilih Semua', + 'field.select_all.message' => 'Aktifkan semua izin yang Tersedia untuk Peran ini.', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Pelindung', + 'nav.role.label' => 'Peran', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Peran', + 'resource.label.roles' => 'Peran', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'Entitas', + 'resources' => 'Sumber Daya', + 'widgets' => 'Widget', + 'pages' => 'Halaman', + 'custom' => 'Izin Kustom', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'Kamu tidak punya izin akses', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Lihat', + 'view_any' => 'Lihat Apa Saja', + 'create' => 'Buat', + 'update' => 'Perbarui', + 'delete' => 'Hapus', + 'delete_any' => 'Hapus Apa Saja', + 'force_delete' => 'Paksa Hapus', + 'force_delete_any' => 'Paksa Hapus Apa Saja', + 'restore' => 'Pulihkan', + 'replicate' => 'Replikasi', + 'reorder' => 'Susun Ulang', + 'restore_any' => 'Pulihkan Apa Saja', + ], +]; diff --git a/lang/vendor/filament-shield/it/filament-shield.php b/lang/vendor/filament-shield/it/filament-shield.php new file mode 100644 index 000000000..ae5b79563 --- /dev/null +++ b/lang/vendor/filament-shield/it/filament-shield.php @@ -0,0 +1,80 @@ + 'Nome', + 'column.guard_name' => 'Nome Guard', + 'column.roles' => 'Ruoli', + 'column.permissions' => 'Permessi', + 'column.updated_at' => 'Aggiornato a', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'Nome', + 'field.guard_name' => 'Nome Guard', + 'field.permissions' => 'Permessi', + 'field.select_all.name' => 'Seleziona Tutto', + 'field.select_all.message' => 'Abilita tutti i Permessi attualmente Abilitati per questo ruolo', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'Ruoli', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Ruolo', + 'resource.label.roles' => 'Ruoli', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'Entities', + 'resources' => 'Resources', + 'widgets' => 'Widgets', + 'pages' => 'Pages', + 'custom' => 'Permessi Personalizzati', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'Non hai i permessi di accesso', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + // 'resource_permission_prefixes_labels' => [ + // 'view' => 'View', + // 'view_any' => 'View Any', + // 'create' => 'Create', + // 'update' => 'Update', + // 'delete' => 'Delete', + // 'delete_any' => 'Delete Any', + // 'force_delete' => 'Force Delete', + // 'force_delete_any' => 'Force Delete Any', + // 'restore' => 'Restore', + // 'replicate' => 'Replicate', + // 'reorder' => 'Reorder', + // 'restore_any' => 'Restore Any', + // ], +]; diff --git a/lang/vendor/filament-shield/ja/filament-shield.php b/lang/vendor/filament-shield/ja/filament-shield.php new file mode 100644 index 000000000..81b3111ad --- /dev/null +++ b/lang/vendor/filament-shield/ja/filament-shield.php @@ -0,0 +1,80 @@ + '名前', + 'column.guard_name' => 'ガード名', + 'column.roles' => 'ロール', + 'column.permissions' => 'パーミッション', + 'column.updated_at' => '更新日時', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => '名前', + 'field.guard_name' => 'ガード名', + 'field.permissions' => 'パーミッション', + 'field.select_all.name' => 'すべて選択', + 'field.select_all.message' => 'このロールに対して現在有効となっているすべての権限を有効にします。', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'ロール', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'ロール', + 'resource.label.roles' => 'ロール', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'エンティティ', + 'resources' => 'リソース', + 'widgets' => 'ウィジェット', + 'pages' => 'ページ', + 'custom' => 'カスタムパーミッション', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'アクセスするパーミッションがありません。', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => '表示', + 'view_any' => 'どれでも表示', + 'create' => '作成', + 'update' => '更新', + 'delete' => '削除', + 'delete_any' => 'どれでも削除', + 'force_delete' => '強制削除', + 'force_delete_any' => 'どれでも強制削除', + 'restore' => 'リストア', + 'reorder' => '並べ直し', + 'restore_any' => 'どれでもリストア', + 'replicate' => 'レプリカ', + ], +]; diff --git a/lang/vendor/filament-shield/ka/filament-shield.php b/lang/vendor/filament-shield/ka/filament-shield.php new file mode 100644 index 000000000..5c11e5766 --- /dev/null +++ b/lang/vendor/filament-shield/ka/filament-shield.php @@ -0,0 +1,80 @@ + 'სახელი', + 'column.guard_name' => 'გუარდის სახელი', + 'column.roles' => 'როლები', + 'column.permissions' => 'ნებართვები', + 'column.updated_at' => 'განახლების თარიღი', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'სახელი', + 'field.guard_name' => 'გუარდის სახელი', + 'field.permissions' => 'ნებართვები', + 'field.select_all.name' => 'ყველას მონიშვნა', + 'field.select_all.message' => 'ჩართეთ ყველა ნებართვა, რომელიც ამჟამად ჩართულია ამ როლისთვის', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'როლები', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'როლი', + 'resource.label.roles' => 'როლები', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'ერთეულები', + 'resources' => 'რესურსები', + 'widgets' => 'ვიდჯეტები', + 'pages' => 'გვერდები', + 'custom' => 'მომხმარებლის ნებართვები', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'თქვენ არ გაქვთ წვდომის ნებართვა', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'ნახვა', + 'view_any' => 'ნებისმიერის ნახვა', + 'create' => 'შექმნა', + 'update' => 'განახლება', + 'delete' => 'წაშლა', + 'delete_any' => 'ნებისმიერის წაშლა', + 'force_delete' => 'იძულებითი წაშლა', + 'force_delete_any' => 'ნებისმიერის იძულებითი წაშლა', + 'restore' => 'აღდგენა', + 'reorder' => 'გადალაგება', + 'restore_any' => 'ნებისმიერის აღდგენა', + 'replicate' => 'დუბლირება', + ], +]; diff --git a/lang/vendor/filament-shield/km/filament-shield.php b/lang/vendor/filament-shield/km/filament-shield.php new file mode 100644 index 000000000..3ba540667 --- /dev/null +++ b/lang/vendor/filament-shield/km/filament-shield.php @@ -0,0 +1,80 @@ + 'ឈ្មោះ', + 'column.guard_name' => 'ឈ្មោះអ្នកមើល', + 'column.roles' => 'តួនាទី', + 'column.permissions' => 'ការអនុញ្ញាតិ', + 'column.updated_at' => 'បានធ្វើបច្ចុប្បន្នភាពនៅ', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'ឈ្មោះ', + 'field.guard_name' => 'ឈ្មោះអ្នកមើល', + 'field.permissions' => 'ការអនុញ្ញាតិ', + 'field.select_all.name' => 'ជ្រើសរើសទាំងអស់', + 'field.select_all.message' => 'បើកការអនុញ្ញាតទាំងអស់ដែលបច្ចុប្បន្នត្រូវបាន បើកដំណើរការ សម្រាប់តួនាទីនេះ។', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'តួនាទី', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'តួនាទី', + 'resource.label.roles' => 'តួនាទី', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'អង្គភាព', + 'resources' => 'ប្រភព', + 'widgets' => 'តារាង', + 'pages' => 'ទំព័រ', + 'custom' => 'ការអនុញ្ញាតផ្ទាល់ខ្លួន', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'អ្នកមិនមានសិទ្ធិចូលប្រើទេ។', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'មើល', + 'view_any' => 'មើលសន្ទស្សន៍', + 'create' => 'បង្កើត', + 'update' => 'ធ្វើបច្ចុប្បន្នភាព', + 'delete' => 'លុប', + 'delete_any' => 'លុបទាំងបាច់', + 'force_delete' => 'បង្ខំ​លុប', + 'force_delete_any' => 'បង្ខំលុបណាមួយ។', + 'restore' => 'ស្តារ', + 'restore_any' => 'ស្តារណាមួយ។', + 'reorder' => 'តម្រៀបឡើងវិញ', + 'replicate' => 'ចម្លង', + ], +]; diff --git a/lang/vendor/filament-shield/ko/filament-shield.php b/lang/vendor/filament-shield/ko/filament-shield.php new file mode 100644 index 000000000..4ae48d387 --- /dev/null +++ b/lang/vendor/filament-shield/ko/filament-shield.php @@ -0,0 +1,80 @@ + '이름', + 'column.guard_name' => '가드 이름', + 'column.roles' => '역할', + 'column.permissions' => '권한', + 'column.updated_at' => '최근 업데이트', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => '이름', + 'field.guard_name' => '가드 이름', + 'field.permissions' => '권한', + 'field.select_all.name' => '전체 선택', + 'field.select_all.message' => '현재 이 역할에 대해 활성화된 모든 권한을 활성화', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => '역할', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => '역할', + 'resource.label.roles' => '역할들', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => '섹션', + 'resources' => '리소스', + 'widgets' => '위젯', + 'pages' => '페이지', + 'custom' => '사용자 정의 권한', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => '접근 권한이 없습니다', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => '보기', + 'view_any' => '모두 보기', + 'create' => '생성', + 'update' => '업데이트', + 'delete' => '삭제', + 'delete_any' => '모두 삭제', + 'force_delete' => '강제 삭제', + 'force_delete_any' => '모두 강제 삭제', + 'restore' => '복구', + 'reorder' => '재정렬', + 'restore_any' => '모두 복구', + 'replicate' => '복제', + ], +]; diff --git a/lang/vendor/filament-shield/ku/filament-shield.php b/lang/vendor/filament-shield/ku/filament-shield.php new file mode 100644 index 000000000..85a4014b3 --- /dev/null +++ b/lang/vendor/filament-shield/ku/filament-shield.php @@ -0,0 +1,80 @@ + 'ناو', + 'column.guard_name' => 'ناوی گوارد', + 'column.roles' => 'ڕۆڵەکان', + 'column.permissions' => 'پێرمشنەکان', + 'column.updated_at' => 'نوێکردنەوە لە', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'ناو', + 'field.guard_name' => 'ناوی گوارد', + 'field.permissions' => 'پێرمشنەکان', + 'field.select_all.name' => 'دیاری کردنی هەموو', + 'field.select_all.message' => 'هەموو پێرمشنەکان چالاک بکە کە لە ئێستادا چالاک کراوە بۆ ئەم ڕۆڵە', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'فیڵەمێنت شیڵد', + 'nav.role.label' => 'ڕۆڵەکان', + 'nav.role.icon' => 'heroicon-o-users', + 'resource.label.role' => 'ڕۆڵ', + 'resource.label.roles' => 'ڕۆڵەکان', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'یەکەکان', + 'resources' => 'سەرچاوەکان', + 'widgets' => 'ویجتەکان', + 'pages' => 'پەیجەکان', + 'custom' => 'پێرمشنی تایبەت', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'تۆ مۆڵەتی چوونە ژوورەوەت نییە', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'بینین', + 'view_any' => 'بینینی هەریەک', + 'create' => 'دروستکردن', + 'update' => 'نوێکردنەوە', + 'delete' => 'سڕینەوە', + 'delete_any' => 'سڕینەوەی هەریەک', + 'force_delete' => 'سڕینەوەی تەواو', + 'force_delete_any' => 'سڕینەوەی تەواوی هەریەک', + 'restore' => 'گێڕاندنەوە', + 'reorder' => 'ڕیزکردن', + 'restore_any' => 'گێڕاندنەوەی هەریەک', + 'replicate' => 'دووبارەکردنەوە', + ], +]; diff --git a/lang/vendor/filament-shield/lv/filament-shield.php b/lang/vendor/filament-shield/lv/filament-shield.php new file mode 100644 index 000000000..1f90b92e5 --- /dev/null +++ b/lang/vendor/filament-shield/lv/filament-shield.php @@ -0,0 +1,80 @@ + 'Nosaukums', + 'column.guard_name' => 'Sargs', + 'column.roles' => 'Lomas', + 'column.permissions' => 'Tiesības', + 'column.updated_at' => 'Atjaunots', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'Nosaukums', + 'field.guard_name' => 'Sargs', + 'field.permissions' => 'Tiesības', + 'field.select_all.name' => 'Atzīmēt visu', + 'field.select_all.message' => 'Aktivizēt visas pieejamās tiesības šai lomai', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Tiesības', + 'nav.role.label' => 'Lomas', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Loma', + 'resource.label.roles' => 'Lomas', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'Vienības', + 'resources' => 'Resursi', + 'widgets' => 'Logrīki', + 'pages' => 'Lapas', + 'custom' => 'Speciālās tiesības', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'Jums nav pietiekamu tiesību šī resursa apskatei.', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Skatīt', + 'view_any' => 'Skatīt visu', + 'create' => 'Izveidot', + 'update' => 'Atjaunot', + 'delete' => 'Dzēst', + 'delete_any' => 'Dzēst visu', + 'force_delete' => 'Piespiedu dzēšana', + 'force_delete_any' => 'Piespiedu dzēšana visam', + 'restore' => 'Atjaunot', + 'reorder' => 'Pārkārtot', + 'restore_any' => 'Atjaunot visu', + 'replicate' => 'Replicēt', + ], +]; diff --git a/lang/vendor/filament-shield/nl/filament-shield.php b/lang/vendor/filament-shield/nl/filament-shield.php new file mode 100644 index 000000000..a26b6c6f9 --- /dev/null +++ b/lang/vendor/filament-shield/nl/filament-shield.php @@ -0,0 +1,80 @@ + 'Naam', + 'column.guard_name' => 'Guard Naam', + 'column.roles' => 'Rollen', + 'column.permissions' => 'Permissies', + 'column.updated_at' => 'Aangepast op', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'Naam', + 'field.guard_name' => 'Guard Naam', + 'field.permissions' => 'Permissies', + 'field.select_all.name' => 'Selecteer alles', + 'field.select_all.message' => 'Zet alle permissies aan, die momenteel aangevinkt staan voor deze rol.', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'Rollen', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Rol', + 'resource.label.roles' => 'Rollen', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'Entiteiten', + 'resources' => 'Resources', + 'widgets' => 'Widgets', + 'pages' => 'Pagina\'s', + 'custom' => 'Andere permissies', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'Je hebt geen toegang', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Bekijken', + 'view_any' => 'Bekijk elke', + 'create' => 'Aanmaken', + 'update' => 'Bewerken', + 'delete' => 'Verwijderen', + 'delete_any' => 'Verwijder elke', + 'force_delete' => 'Forceer verwijderen', + 'force_delete_any' => 'Forceer verwijderen elke', + 'restore' => 'Herstellen', + 'restore_any' => 'Herstel elke', + 'replicate' => 'Repliceren', + // 'reorder' => 'Reorder', + ], +]; diff --git a/lang/vendor/filament-shield/pl/filament-shield.php b/lang/vendor/filament-shield/pl/filament-shield.php new file mode 100644 index 000000000..b92f24cc6 --- /dev/null +++ b/lang/vendor/filament-shield/pl/filament-shield.php @@ -0,0 +1,80 @@ + 'Nazwa', + 'column.guard_name' => 'Nazwa strażnika', + 'column.roles' => 'Role', + 'column.permissions' => 'Permisje', + 'column.updated_at' => 'Zaktualizowano', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'Nazwa', + 'field.guard_name' => 'Nzwa strażnika', + 'field.permissions' => 'Permisje', + 'field.select_all.name' => 'Zaznacz wszystkie', + 'field.select_all.message' => 'Włącz wszystkie permisje obecnieWłączone dla tej roli', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'Role', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Rola', + 'resource.label.roles' => 'Role', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'Podmioty', + 'resources' => 'Zasoby', + 'widgets' => 'Widżety', + 'pages' => 'Strony', + 'custom' => 'Niestandardowe permisje', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'Nie masz uprawnień do dostępu', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Widok', + 'view_any' => 'Widok dowolnego', + 'create' => 'Tworzenie', + 'update' => 'Aktualizacja', + 'delete' => 'Usuwanie', + 'delete_any' => 'Usuwanie dowolnego', + 'force_delete' => 'Wymuszone usunięcie', + 'force_delete_any' => 'Wymuszone usunięcie dowolnego', + 'restore' => 'Przywracanie', + 'reorder' => 'Zmiana kolejności', + 'restore_any' => 'Przywracanie dowolnego', + 'replicate' => 'Duplikowanie', + ], +]; diff --git a/lang/vendor/filament-shield/pt_BR/filament-shield.php b/lang/vendor/filament-shield/pt_BR/filament-shield.php new file mode 100644 index 000000000..cc1014c38 --- /dev/null +++ b/lang/vendor/filament-shield/pt_BR/filament-shield.php @@ -0,0 +1,79 @@ + 'Nome', + 'column.guard_name' => 'Guard', + 'column.roles' => 'Funções', + 'column.permissions' => 'Permissões', + 'column.updated_at' => 'Alterado em', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'Nome', + 'field.guard_name' => 'Guard', + 'field.permissions' => 'Permissões', + 'field.select_all.name' => 'Selecionar todos', + 'field.select_all.message' => 'Habilitar todas as permissões para essa função', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'Funções', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Função', + 'resource.label.roles' => 'Funções', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + 'section' => 'Entidades', + 'resources' => 'Recursos', + 'widgets' => 'Widgets', + 'pages' => 'Páginas', + 'custom' => 'Permissões customizadas', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'Você não tem permissão para acessar', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + // 'resource_permission_prefixes_labels' => [ + // 'view' => 'View', + // 'view_any' => 'View Any', + // 'create' => 'Create', + // 'update' => 'Update', + // 'delete' => 'Delete', + // 'delete_any' => 'Delete Any', + // 'force_delete' => 'Force Delete', + // 'force_delete_any' => 'Force Delete Any', + // 'restore' => 'Restore', + // 'reorder' => 'Reorder', + // 'restore_any' => 'Restore Any', + // 'replicate' => 'Replicate', + // ], +]; diff --git a/lang/vendor/filament-shield/pt_PT/filament-shield.php b/lang/vendor/filament-shield/pt_PT/filament-shield.php new file mode 100644 index 000000000..0caf064c2 --- /dev/null +++ b/lang/vendor/filament-shield/pt_PT/filament-shield.php @@ -0,0 +1,80 @@ + 'Nome', + 'column.guard_name' => 'Nome da Protecção', + 'column.roles' => 'Funções', + 'column.permissions' => 'Permissões', + 'column.updated_at' => 'Actualizado em', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'Nome', + 'field.guard_name' => 'Nome da Protecção', + 'field.permissions' => 'Permissões', + 'field.select_all.name' => 'Selecionar Todos', + 'field.select_all.message' => 'Selecionar todas as Permissões Activas para esta função', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'Funções', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Função', + 'resource.label.roles' => 'Funções', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'Entidades', + 'resources' => 'Recursos', + 'widgets' => 'Widgets', + 'pages' => 'Páginas', + 'custom' => 'Permissões Personalizadas', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'Não possui permissões para aceder', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Visualizar', + 'view_any' => 'Visualizar Tudo', + 'create' => 'Criar', + 'update' => 'Actualizar', + 'delete' => 'Eliminar', + 'delete_any' => 'Eliminar Tudo', + 'force_delete' => 'Eliminar Permanentemente', + 'force_delete_any' => 'Eliminar Permanentemente Tudo', + 'restore' => 'Restaurar', + 'reorder' => 'Reordenar', + 'restore_any' => 'Restaurar Tudo', + 'replicate' => 'Replicar', + ], +]; diff --git a/lang/vendor/filament-shield/ro/filament-shield.php b/lang/vendor/filament-shield/ro/filament-shield.php new file mode 100644 index 000000000..d245e4e2d --- /dev/null +++ b/lang/vendor/filament-shield/ro/filament-shield.php @@ -0,0 +1,80 @@ + 'Număr', + 'column.guard_name' => 'Numele paznicului', + 'column.roles' => 'Roluri', + 'column.permissions' => 'Permisiuni', + 'column.updated_at' => 'Actualizat la', + + /* + |------------------------------------------------- ------------------------- + | Form Fields + |------------------------------------------------- ------------------------- + */ + + 'field.name' => 'Nume', + 'field.guard_name' => 'Numele paznicului', + 'field.permissions' => 'Permisiuni', + 'field.select_all.name' => 'Selectați tot', + 'field.select_all.message' => 'Activați toate permisiunile în prezent Activate pentru acest rol', + + /* + |------------------------------------------------- ------------------------- + | Navigation & Resources + |------------------------------------------------- ------------------------- + */ + + 'nav.group' => 'Scut', + 'nav.role.label' => 'Roluri', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Rol', + 'resource.label.roles' => 'Roluri', + + /* + |------------------------------------------------- ------------------------- + | Section & Tabs + |------------------------------------------------- ------------------------- + */ + + 'section' => 'Entități', + 'resources' => 'Resurse', + 'widgets' => 'Widget-uri', + 'pages' => 'Pagini', + 'custom' => 'Permisiuni personalizate', + + /* + |------------------------------------------------- ------------------------- + | Posts + |------------------------------------------------- ------------------------- + */ + + 'forbidden' => 'Nu aveți permisiunea de a accesa', + + /* + |------------------------------------------------- ------------------------- + | Resource Permissions' Labels + |------------------------------------------------- ------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Vizualizare', + 'view_any' => 'Vedeți orice', + 'create' => 'Creează', + 'update' => 'Actualizare', + 'delete' => 'Șterge', + 'delete_any' => 'Șterge orice', + 'force_delete' => 'Forțat ștergerea', + 'force_delete_any' => 'Forțat ștergerea oricărei', + 'restore' => 'Restaurare', + 'reorder' => 'Reordonare', + 'restore_any' => 'Restaurează orice', + 'replicate' => 'Replicare', + ], +]; diff --git a/lang/vendor/filament-shield/ru/filament-shield.php b/lang/vendor/filament-shield/ru/filament-shield.php new file mode 100644 index 000000000..3dcb671bb --- /dev/null +++ b/lang/vendor/filament-shield/ru/filament-shield.php @@ -0,0 +1,80 @@ + 'Имя', + 'column.guard_name' => 'Имя гварда', + 'column.roles' => 'Роли', + 'column.permissions' => 'Разрешения', + 'column.updated_at' => 'Обновлено', + + /* + |------------------------------------------------- ------------------------- + | Form Fields + |------------------------------------------------- ------------------------- + */ + + 'field.name' => 'Имя', + 'field.guard_name' => 'Имя гварда', + 'field.permissions' => 'Разрешения', + 'field.select_all.name' => 'Выбрать все', + 'field.select_all.message' => 'Включить все разрешения, которые Доступны для этой роли', + + /* + |------------------------------------------------- ------------------------- + | Navigation & Resource + |------------------------------------------------- ------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'Роли', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Роль', + 'resource.label.roles' => 'Роли', + + /* + |------------------------------------------------- ------------------------- + | Section & Tabs + |------------------------------------------------- ------------------------- + */ + + 'section' => 'Сути', + 'resources' => 'Ресурсы', + 'widgets' => 'Виджеты', + 'pages' => 'Страницы', + 'custom' => 'Пользовательские разрешения', + + /* + |------------------------------------------------- ------------------------- + | Messages + |------------------------------------------------- ------------------------- + */ + + 'forbidden' => 'У вас нет доступа', + + /* + |------------------------------------------------- ------------------------- + | Resource Permissions' Labels + |------------------------------------------------- ------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Просмотр', + 'view_any' => 'Может смотреть любое', + 'create' => 'Создание', + 'update' => 'Обновление', + 'delete' => 'Удаление', + 'delete_any' => 'Может удалить любой', + 'force_delete' => 'Принудительно удалить', + 'force_delete_any' => 'Может принудительно удалить любой', + 'restore' => 'Восстановление', + 'reorder' => 'Изменение порядка', + 'restore_any' => 'Может восстановить любой', + 'replicate' => 'Копировать', + ], +]; diff --git a/lang/vendor/filament-shield/sk/filament-shield.php b/lang/vendor/filament-shield/sk/filament-shield.php new file mode 100644 index 000000000..548d500b8 --- /dev/null +++ b/lang/vendor/filament-shield/sk/filament-shield.php @@ -0,0 +1,80 @@ + 'Meno', + 'column.guard_name' => 'Názov ochrany', + 'column.roles' => 'Roly', + 'column.permissions' => 'Oprávnenia', + 'column.updated_at' => 'Aktualizované', + + /* + |-------------------------------------------------------------------------- + | Polia formulára + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'Meno', + 'field.guard_name' => 'Názov ochrany', + 'field.permissions' => 'Oprávnenia', + 'field.select_all.name' => 'Vybrať všetko', + 'field.select_all.message' => 'Povoliť všetky oprávnenia aktuálne Povolené pre túto rolu', + + /* + |-------------------------------------------------------------------------- + | Navigácia & Zdroje + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'Roly', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Rola', + 'resource.label.roles' => 'Roly', + + /* + |-------------------------------------------------------------------------- + | Sekcie & Karty + |-------------------------------------------------------------------------- + */ + + 'section' => 'Entity', + 'resources' => 'Zdroje', + 'widgets' => 'Widgety', + 'pages' => 'Stránky', + 'custom' => 'Vlastné oprávnenia', + + /* + |-------------------------------------------------------------------------- + | Správy + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'Nemáte oprávnenie na prístup', + + /* + |-------------------------------------------------------------------------- + | Štítky oprávnení zdrojov + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Zobraziť', + 'view_any' => 'Zobraziť všetko', + 'create' => 'Vytvoriť', + 'update' => 'Aktualizovať', + 'delete' => 'Odstrániť', + 'delete_any' => 'Odstrániť všetko', + 'force_delete' => 'Natrvalo odstrániť', + 'force_delete_any' => 'Natrvalo odstrániť všetko', + 'restore' => 'Obnoviť', + 'reorder' => 'Preusporiadať', + 'restore_any' => 'Obnoviť všetko', + 'replicate' => 'Replikovať', + ], +]; diff --git a/lang/vendor/filament-shield/sq/filament-shield.php b/lang/vendor/filament-shield/sq/filament-shield.php new file mode 100644 index 000000000..b4dc19f5f --- /dev/null +++ b/lang/vendor/filament-shield/sq/filament-shield.php @@ -0,0 +1,80 @@ + 'Emri', + 'column.guard_name' => 'Emri i rojes', + 'column.roles' => 'Rolet', + 'column.permissions' => 'Lejet', + 'column.updated_at' => 'Përditësuar në', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'Emri', + 'field.guard_name' => 'Emri i rojes', + 'field.permissions' => 'Lejet', + 'field.select_all.name' => 'Zgjidh të gjitha', + 'field.select_all.message' => 'Aktivizo të gjitha lejet aktualisht Aktivizuar për këtë rol', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'Rolet', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Rol', + 'resource.label.roles' => 'Rolet', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'Seksioni', + 'resources' => 'Burimet', + 'widgets' => 'Widgets', + 'pages' => 'Faqet', + 'custom' => 'Lejet e personalizuara', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'Nuk ke leje për të hyrë', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Shiko', + 'view_any' => 'Shiko çdo', + 'create' => 'Krijo', + 'update' => 'Përditëso', + 'delete' => 'Fshi', + 'delete_any' => 'Fshi çdo', + 'force_delete' => 'Fshije me forcë', + 'force_delete_any' => 'Fshije me forcë çdo', + 'restore' => 'Rikthe', + 'reorder' => 'Rirendit', + 'restore_any' => 'Rikthe çdo', + 'replicate' => 'Ripërsërit', + ], +]; diff --git a/lang/vendor/filament-shield/tr/filament-shield.php b/lang/vendor/filament-shield/tr/filament-shield.php new file mode 100644 index 000000000..a66c46070 --- /dev/null +++ b/lang/vendor/filament-shield/tr/filament-shield.php @@ -0,0 +1,80 @@ + 'Ad', + 'column.guard_name' => 'Koruma Adı', + 'column.roles' => 'Roller', + 'column.permissions' => 'İzinler', + 'column.updated_at' => 'Güncellenme Tarihi', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'Ad', + 'field.guard_name' => 'Koruma Adı', + 'field.permissions' => 'İzinler', + 'field.select_all.name' => 'Tümünü Seç', + 'field.select_all.message' => 'Bu rol için şu anda Etkin olan tüm İzinleri etkinleştirin', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Kalkan', + 'nav.role.label' => 'Roller', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Rol', + 'resource.label.roles' => 'Roller', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'Varlıklar', + 'resources' => 'Kaynaklar', + 'widgets' => 'Araçlar', + 'pages' => 'Sayfalar', + 'custom' => 'Özel İzinler', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'Erişim izniniz yok', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Görüntüle', + 'view_any' => 'Herhangi birini görüntüle', + 'create' => 'Oluştur', + 'update' => 'Güncelle', + 'delete' => 'Sil', + 'delete_any' => 'Herhangi Birini Sil', + 'force_delete' => 'Kalıcı Sil', + 'force_delete_any' => 'Herhangi Birini Kalıcı Sil', + 'restore' => 'Geri Yükle', + 'reorder' => 'Sırala', + 'restore_any' => 'Herhangi Birini Geri Yükle', + 'replicate' => 'Kopyala/Çoğalt', + ], +]; diff --git a/lang/vendor/filament-shield/uk/filament-shield.php b/lang/vendor/filament-shield/uk/filament-shield.php new file mode 100644 index 000000000..db2a970e2 --- /dev/null +++ b/lang/vendor/filament-shield/uk/filament-shield.php @@ -0,0 +1,80 @@ + 'Назва', + 'column.guard_name' => 'Назва гварда', + 'column.roles' => 'Ролі', + 'column.permissions' => 'Дозволи', + 'column.updated_at' => 'Оновлено', + + /* + |------------------------------------------------- ------------------------- + | Form Fields + |------------------------------------------------- ------------------------- + */ + + 'field.name' => 'Назва', + 'field.guard_name' => 'Назва гварда', + 'field.permissions' => 'Дозволи', + 'field.select_all.name' => 'Вибрати все', + 'field.select_all.message' => 'Включити всі дозволи, які Доступні для цієї ролі', + + /* + |------------------------------------------------- ------------------------- + | Navigation & Resource + |------------------------------------------------- ------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'Ролі', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Роль', + 'resource.label.roles' => 'Ролі', + + /* + |------------------------------------------------- ------------------------- + | Section & Tabs + |------------------------------------------------- ------------------------- + */ + + 'section' => 'Сутності', + 'resources' => 'Ресурси', + 'widgets' => 'Віджети', + 'pages' => 'Сторінки', + 'custom' => 'Користувальницькі дозволи', + + /* + |------------------------------------------------- ------------------------- + | Messages + |------------------------------------------------- ------------------------- + */ + + 'forbidden' => 'У вас немає доступу', + + /* + |------------------------------------------------- ------------------------- + | Resource Permissions' Labels + |------------------------------------------------- ------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Перегляд', + 'view_any' => 'Перегляд будь-якого', + 'create' => 'Створити', + 'update' => 'Оновити', + 'delete' => 'Видалити', + 'delete_any' => 'Видалити будь-яке', + 'force_delete' => 'Примусове видалення', + 'force_delete_any' => 'Примусове видалення будь-якого', + 'restore' => 'Відновити', + 'reorder' => 'Змінити порядок', + 'restore_any' => 'Відновити будь-яке', + 'replicate' => 'Копіювати', + ], +]; diff --git a/lang/vendor/filament-shield/vi/filament-shield.php b/lang/vendor/filament-shield/vi/filament-shield.php new file mode 100644 index 000000000..986e95e31 --- /dev/null +++ b/lang/vendor/filament-shield/vi/filament-shield.php @@ -0,0 +1,80 @@ + 'Tên', + 'column.guard_name' => 'Tên guard', + 'column.roles' => 'Vai trò', + 'column.permissions' => 'Quyền', + 'column.updated_at' => 'Cập nhật lúc', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => 'Tên', + 'field.guard_name' => 'Tên guard', + 'field.permissions' => 'Quyền', + 'field.select_all.name' => 'Chọn tất cả', + 'field.select_all.message' => 'Bật tất cả Quyền hiện tại Đã bật cho vai trò này', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => 'Vai trò', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => 'Vai trò', + 'resource.label.roles' => 'Vai trò', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => 'Thực thể', + 'resources' => 'Tài nguyên', + 'widgets' => 'Widget', + 'pages' => 'Trang', + 'custom' => 'Quyền tùy chỉnh', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => 'Bạn không có quyền để truy cập.', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => 'Xem', + 'view_any' => 'Xem bất kỳ', + 'create' => 'Tạo', + 'update' => 'Cập nhật', + 'delete' => 'Xóa', + 'delete_any' => 'Xóa bất kỳ', + 'force_delete' => 'Xóa vĩnh viễn', + 'force_delete_any' => 'Xóa vĩnh viễn bất kỳ', + 'restore' => 'Khôi phục', + 'reorder' => 'Sắp xếp lại', + 'restore_any' => 'Khôi phục bất kỳ', + 'replicate' => 'Nhân bản', + ], +]; diff --git a/lang/vendor/filament-shield/zh_CN/filament-shield.php b/lang/vendor/filament-shield/zh_CN/filament-shield.php new file mode 100644 index 000000000..2a40504c5 --- /dev/null +++ b/lang/vendor/filament-shield/zh_CN/filament-shield.php @@ -0,0 +1,80 @@ + '角色名', + 'column.guard_name' => '守卫', + 'column.roles' => '角色', + 'column.permissions' => '权限', + 'column.updated_at' => '更新时间', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => '角色名', + 'field.guard_name' => '守卫', + 'field.permissions' => '权限', + 'field.select_all.name' => '全选', + 'field.select_all.message' => '启用当前为该角色 启用的 所有权限', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => '角色', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => '角色', + 'resource.label.roles' => '角色', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => '实体', + 'resources' => '资源', + 'widgets' => '小组件', + 'pages' => '页面', + 'custom' => '自定义', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => '无权访问', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => '详情', + 'view_any' => '列表', + 'create' => '创建', + 'update' => '编辑', + 'delete' => '删除', + 'delete_any' => '批量删除', + 'force_delete' => '永久删除', + 'force_delete_any' => '批量永久删除', + 'restore' => '恢复', + 'reorder' => '重新排序', + 'restore_any' => '批量恢复', + 'replicate' => '复制', + ], +]; diff --git a/lang/vendor/filament-shield/zh_TW/filament-shield.php b/lang/vendor/filament-shield/zh_TW/filament-shield.php new file mode 100644 index 000000000..8896fb70e --- /dev/null +++ b/lang/vendor/filament-shield/zh_TW/filament-shield.php @@ -0,0 +1,80 @@ + '角色名', + 'column.guard_name' => '守衛', + 'column.roles' => '角色', + 'column.permissions' => '權限', + 'column.updated_at' => '更新時間', + + /* + |-------------------------------------------------------------------------- + | Form Fields + |-------------------------------------------------------------------------- + */ + + 'field.name' => '角色名', + 'field.guard_name' => '守衛', + 'field.permissions' => '權限', + 'field.select_all.name' => '全選', + 'field.select_all.message' => '啟用當前為該角色 啟用的 所有權限', + + /* + |-------------------------------------------------------------------------- + | Navigation & Resource + |-------------------------------------------------------------------------- + */ + + 'nav.group' => 'Filament Shield', + 'nav.role.label' => '角色', + 'nav.role.icon' => 'heroicon-o-shield-check', + 'resource.label.role' => '角色', + 'resource.label.roles' => '角色', + + /* + |-------------------------------------------------------------------------- + | Section & Tabs + |-------------------------------------------------------------------------- + */ + + 'section' => '實體', + 'resources' => '資源', + 'widgets' => '小工具', + 'pages' => '頁面', + 'custom' => '自訂', + + /* + |-------------------------------------------------------------------------- + | Messages + |-------------------------------------------------------------------------- + */ + + 'forbidden' => '無權訪問', + + /* + |-------------------------------------------------------------------------- + | Resource Permissions' Labels + |-------------------------------------------------------------------------- + */ + + 'resource_permission_prefixes_labels' => [ + 'view' => '檢視', + 'view_any' => '列表', + 'create' => '建立', + 'update' => '編輯', + 'delete' => '刪除', + 'delete_any' => '批量刪除', + 'force_delete' => '永久刪除', + 'force_delete_any' => '批量永久刪除', + 'restore' => '還原', + 'reorder' => '重新排序', + 'restore_any' => '批量還原', + 'replicate' => '複製', + ], +]; diff --git a/package-lock.json b/package-lock.json index 72687b17f..38bb595c3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "react-starter-kit", + "name": "afaqcm", "lockfileVersion": 3, "requires": true, "packages": { @@ -14,15 +14,19 @@ "@radix-ui/react-dropdown-menu": "^2.1.6", "@radix-ui/react-label": "^2.1.2", "@radix-ui/react-navigation-menu": "^1.2.5", + "@radix-ui/react-progress": "^1.1.0", "@radix-ui/react-select": "^2.1.6", "@radix-ui/react-separator": "^1.1.2", "@radix-ui/react-slot": "^1.1.2", + "@radix-ui/react-tabs": "^1.1.1", "@radix-ui/react-toggle": "^1.1.2", "@radix-ui/react-toggle-group": "^1.1.2", "@radix-ui/react-tooltip": "^1.1.8", "@tailwindcss/vite": "^4.1.11", "@types/react": "^19.0.3", "@types/react-dom": "^19.0.2", + "@vitejs/plugin-react": "^4.3.4", + "apexcharts": "^4.7.0", "@vitejs/plugin-react": "^4.6.0", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", @@ -30,7 +34,9 @@ "globals": "^15.14.0", "laravel-vite-plugin": "^2.0", "lucide-react": "^0.475.0", + "puppeteer": "^24.10.2", "react": "^19.0.0", + "react-apexcharts": "^1.7.0", "react-dom": "^19.0.0", "tailwind-merge": "^3.0.1", "tailwindcss": "^4.0.0", @@ -1150,6 +1156,37 @@ "node": ">= 8" } }, + "node_modules/@puppeteer/browsers": { + "version": "2.10.5", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.10.5.tgz", + "integrity": "sha512-eifa0o+i8dERnngJwKrfp3dEq7ia5XFyoqB17S4gK8GhsQE4/P8nxOfQSE0zQHxzzLo/cmF+7+ywEQ7wK7Fb+w==", + "dependencies": { + "debug": "^4.4.1", + "extract-zip": "^2.0.1", + "progress": "^2.0.3", + "proxy-agent": "^6.5.0", + "semver": "^7.7.2", + "tar-fs": "^3.0.8", + "yargs": "^17.7.2" + }, + "bin": { + "browsers": "lib/cjs/main-cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@puppeteer/browsers/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@radix-ui/number": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.1.tgz", @@ -1695,6 +1732,96 @@ } } }, + "node_modules/@radix-ui/react-progress": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@radix-ui/react-progress/-/react-progress-1.1.7.tgz", + "integrity": "sha512-vPdg/tF6YC/ynuBIJlk1mm7Le0VgW6ub6J2UWnTQ7/D23KXcPI1qy+0vBkgKgd38RCMJavBXpB83HPNFMTb0Fg==", + "dependencies": { + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-primitive": "2.1.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-compose-refs": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz", + "integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.2.tgz", + "integrity": "sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz", + "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==", + "dependencies": { + "@radix-ui/react-slot": "1.2.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-slot": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz", + "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-roving-focus": { "version": "1.1.10", "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.10.tgz", @@ -1810,6 +1937,262 @@ } } }, + "node_modules/@radix-ui/react-tabs": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.12.tgz", + "integrity": "sha512-GTVAlRVrQrSw3cEARM0nAx73ixrWDPNZAruETn3oHCNP6SbZ/hNxdxp+u7VkIEv3/sFoLq1PfcHrl7Pnp0CDpw==", + "dependencies": { + "@radix-ui/primitive": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-direction": "1.1.1", + "@radix-ui/react-id": "1.1.1", + "@radix-ui/react-presence": "1.1.4", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-roving-focus": "1.1.10", + "@radix-ui/react-use-controllable-state": "1.2.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/primitive": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.2.tgz", + "integrity": "sha512-XnbHrrprsNqZKQhStrSwgRUQzoCI1glLzdw79xiZPoofhGICeZRSQ3dIxAKH1gb3OHfNf4d6f+vAv3kil2eggA==" + }, + "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-collection": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.7.tgz", + "integrity": "sha512-Fh9rGN0MoI4ZFUNyfFVNU4y9LUz93u9/0K+yLgA2bwRojxM8JU1DyvvMBabnZPBgMWREAJvU2jjVzq+LrFUglw==", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-slot": "1.2.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-compose-refs": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz", + "integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.2.tgz", + "integrity": "sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-direction": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.1.tgz", + "integrity": "sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-id": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.1.tgz", + "integrity": "sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.4.tgz", + "integrity": "sha512-ueDqRbdc4/bkaQT3GIpLQssRlFgWaL/U2z/S31qRwwLWoxHLgry3SIfCwhxeQNbirEUXFa+lq3RL3oBYXtcmIA==", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-primitive": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz", + "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==", + "dependencies": { + "@radix-ui/react-slot": "1.2.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-roving-focus": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.10.tgz", + "integrity": "sha512-dT9aOXUen9JSsxnMPv/0VqySQf5eDQ6LCk5Sw28kamz8wSOW2bJdlX2Bg5VUIIcV+6XlHpWTIuTPCf/UNIyq8Q==", + "dependencies": { + "@radix-ui/primitive": "1.1.2", + "@radix-ui/react-collection": "1.1.7", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-direction": "1.1.1", + "@radix-ui/react-id": "1.1.1", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-callback-ref": "1.1.1", + "@radix-ui/react-use-controllable-state": "1.2.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-slot": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz", + "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-use-callback-ref": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.1.tgz", + "integrity": "sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-use-controllable-state": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.2.tgz", + "integrity": "sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==", + "dependencies": { + "@radix-ui/react-use-effect-event": "0.0.2", + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz", + "integrity": "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-toggle": { "version": "1.1.9", "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle/-/react-toggle-1.1.9.tgz", @@ -1950,6 +2333,37 @@ } } }, + "node_modules/@radix-ui/react-use-effect-event": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.2.tgz", + "integrity": "sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-effect-event/node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz", + "integrity": "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-use-escape-keydown": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.1.tgz", @@ -2444,6 +2858,57 @@ "win32" ] }, + "node_modules/@svgdotjs/svg.draggable.js": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@svgdotjs/svg.draggable.js/-/svg.draggable.js-3.0.6.tgz", + "integrity": "sha512-7iJFm9lL3C40HQcqzEfezK2l+dW2CpoVY3b77KQGqc8GXWa6LhhmX5Ckv7alQfUXBuZbjpICZ+Dvq1czlGx7gA==", + "peerDependencies": { + "@svgdotjs/svg.js": "^3.2.4" + } + }, + "node_modules/@svgdotjs/svg.filter.js": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@svgdotjs/svg.filter.js/-/svg.filter.js-3.0.9.tgz", + "integrity": "sha512-/69XMRCDoam2HgC4ldHIaDgeQf1ViHIsa0Ld4uWgiXtZ+E24DWHe/9Ib6kbNiZ7WRIdlVokUDR1Fg0kjIpkfbw==", + "dependencies": { + "@svgdotjs/svg.js": "^3.2.4" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/@svgdotjs/svg.js": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@svgdotjs/svg.js/-/svg.js-3.2.4.tgz", + "integrity": "sha512-BjJ/7vWNowlX3Z8O4ywT58DqbNRyYlkk6Yz/D13aB7hGmfQTvGX4Tkgtm/ApYlu9M7lCQi15xUEidqMUmdMYwg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Fuzzyma" + } + }, + "node_modules/@svgdotjs/svg.resize.js": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@svgdotjs/svg.resize.js/-/svg.resize.js-2.0.5.tgz", + "integrity": "sha512-4heRW4B1QrJeENfi7326lUPYBCevj78FJs8kfeDxn5st0IYPIRXoTtOSYvTzFWgaWWXd3YCDE6ao4fmv91RthA==", + "engines": { + "node": ">= 14.18" + }, + "peerDependencies": { + "@svgdotjs/svg.js": "^3.2.4", + "@svgdotjs/svg.select.js": "^4.0.1" + } + }, + "node_modules/@svgdotjs/svg.select.js": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@svgdotjs/svg.select.js/-/svg.select.js-4.0.3.tgz", + "integrity": "sha512-qkMgso1sd2hXKd1FZ1weO7ANq12sNmQJeGDjs46QwDVsxSRcHmvWKL2NDF7Yimpwf3sl5esOLkPqtV2bQ3v/Jg==", + "engines": { + "node": ">= 14.18" + }, + "peerDependencies": { + "@svgdotjs/svg.js": "^3.2.4" + } + }, "node_modules/@swc/helpers": { "version": "0.5.17", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.17.tgz", @@ -2742,6 +3207,11 @@ "url": "https://github.com/sponsors/tannerlinsley" } }, + "node_modules/@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==" + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -2824,6 +3294,15 @@ "@types/react": "^19.0.0" } }, + "node_modules/@types/yauzl": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.38.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.38.0.tgz", @@ -2978,7 +3457,8 @@ "dev": true, "license": "MIT", "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -3115,6 +3595,11 @@ "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, + "node_modules/@yr/monotone-cubic-spline": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@yr/monotone-cubic-spline/-/monotone-cubic-spline-1.0.3.tgz", + "integrity": "sha512-FQXkOta0XBSUPHndIKON2Y9JeQz5ZeMqLYZVVK93FliNBFm7LNMIZmY6FrMEB9XPcDbE2bekMbZD6kzDkxwYjA==" + }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", @@ -3138,6 +3623,14 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/agent-base": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", + "engines": { + "node": ">= 14" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -3179,11 +3672,23 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/apexcharts": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-4.7.0.tgz", + "integrity": "sha512-iZSrrBGvVlL+nt2B1NpqfDuBZ9jX61X9I2+XV0hlYXHtTwhwLTHDKGXjNXAgFBDLuvSYCB/rq2nPWVPRv2DrGA==", + "dependencies": { + "@svgdotjs/svg.draggable.js": "^3.0.4", + "@svgdotjs/svg.filter.js": "^3.0.8", + "@svgdotjs/svg.js": "^3.2.4", + "@svgdotjs/svg.resize.js": "^2.0.2", + "@svgdotjs/svg.select.js": "^4.0.1", + "@yr/monotone-cubic-spline": "^1.0.3" + } + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, "license": "Python-2.0" }, "node_modules/aria-hidden": { @@ -3336,6 +3841,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/async-function": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", @@ -3379,6 +3895,11 @@ "proxy-from-env": "^1.1.0" } }, + "node_modules/b4a": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", + "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==" + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -3386,6 +3907,81 @@ "dev": true, "license": "MIT" }, + "node_modules/bare-events": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.4.tgz", + "integrity": "sha512-+gFfDkR8pj4/TrWCGUGWmJIkBwuxPS5F+a5yWjOHQt2hHvNZd5YLzadjmDUtFmMM4y429bnKLa8bYBMHcYdnQA==", + "optional": true + }, + "node_modules/bare-fs": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.1.5.tgz", + "integrity": "sha512-1zccWBMypln0jEE05LzZt+V/8y8AQsQQqxtklqaIyg5nu6OAYFhZxPXinJTSG+kU5qyNmeLgcn9AW7eHiCHVLA==", + "optional": true, + "dependencies": { + "bare-events": "^2.5.4", + "bare-path": "^3.0.0", + "bare-stream": "^2.6.4" + }, + "engines": { + "bare": ">=1.16.0" + }, + "peerDependencies": { + "bare-buffer": "*" + }, + "peerDependenciesMeta": { + "bare-buffer": { + "optional": true + } + } + }, + "node_modules/bare-os": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.6.1.tgz", + "integrity": "sha512-uaIjxokhFidJP+bmmvKSgiMzj2sV5GPHaZVAIktcxcpCyBFFWO+YlikVAdhmUo2vYFvFhOXIAlldqV29L8126g==", + "optional": true, + "engines": { + "bare": ">=1.14.0" + } + }, + "node_modules/bare-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-3.0.0.tgz", + "integrity": "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==", + "optional": true, + "dependencies": { + "bare-os": "^3.0.1" + } + }, + "node_modules/bare-stream": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.6.5.tgz", + "integrity": "sha512-jSmxKJNJmHySi6hC42zlZnq00rga4jjxcgNZjY9N5WlOe/iOoGRtdwGsHzQv2RlH2KOYMwGUXhf2zXd32BA9RA==", + "optional": true, + "dependencies": { + "streamx": "^2.21.0" + }, + "peerDependencies": { + "bare-buffer": "*", + "bare-events": "*" + }, + "peerDependenciesMeta": { + "bare-buffer": { + "optional": true + }, + "bare-events": { + "optional": true + } + } + }, + "node_modules/basic-ftp": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", + "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", @@ -3439,7 +4035,15 @@ "browserslist": "cli.js" }, "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "engines": { + "node": "*" } }, "node_modules/call-bind": { @@ -3494,7 +4098,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -3548,6 +4151,16 @@ "node": ">=8" } }, + "node_modules/chromium-bidi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-5.1.0.tgz", + "integrity": "sha512-9MSRhWRVoRPDG0TgzkHrshFSJJNZzfY5UFqUMuksg7zL1yoZIZ3jLB0YAgHclbiAxPI86pBnwDX1tbzoiV8aFw==", + "dependencies": { + "mitt": "^3.0.1", + "zod": "^3.24.1" + }, + "peerDependencies": { + "devtools-protocol": "*" "node_modules/chownr": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", @@ -3660,6 +4273,31 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "license": "MIT" }, + "node_modules/cosmiconfig": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -3681,6 +4319,14 @@ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "license": "MIT" }, + "node_modules/data-uri-to-buffer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "engines": { + "node": ">= 14" + } + }, "node_modules/data-view-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", @@ -3795,6 +4441,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "dependencies": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -3819,6 +4478,11 @@ "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==", "license": "MIT" }, + "node_modules/devtools-protocol": { + "version": "0.0.1452169", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1452169.tgz", + "integrity": "sha512-FOFDVMGrAUNp0dDKsAU1TorWJUx2JOU1k9xdgBKKJF3IBh/Uhl2yswG5r3TEAOrCiGY2QRp1e6LVDQrCsTKO4g==" + }, "node_modules/doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -3858,6 +4522,14 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "license": "MIT" }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "dependencies": { + "once": "^1.4.0" + } + }, "node_modules/enhanced-resolve": { "version": "5.18.2", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.2.tgz", @@ -3871,6 +4543,22 @@ "node": ">=10.13.0" } }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, "node_modules/es-abstract": { "version": "1.24.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", @@ -4117,6 +4805,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, "node_modules/eslint": { "version": "9.31.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.31.0.tgz", @@ -4288,6 +4996,18 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/esquery": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", @@ -4318,7 +5038,6 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=4.0" @@ -4328,12 +5047,30 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4341,6 +5078,11 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" + }, "node_modules/fast-glob": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", @@ -4395,6 +5137,14 @@ "reusify": "^1.0.4" } }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dependencies": { + "pend": "~1.2.0" + } + }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -4629,6 +5379,20 @@ "node": ">= 0.4" } }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-symbol-description": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", @@ -4647,6 +5411,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-uri": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.4.tgz", + "integrity": "sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==", + "dependencies": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.2", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -4804,6 +5581,30 @@ "node": ">= 0.4" } }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -4818,7 +5619,6 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", - "dev": true, "license": "MIT", "dependencies": { "parent-module": "^1.0.0", @@ -4856,6 +5656,18 @@ "node": ">= 0.4" } }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/is-array-buffer": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", @@ -4874,6 +5686,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + }, "node_modules/is-async-function": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", @@ -5307,7 +6124,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -5316,6 +6132,11 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" + }, "node_modules/jsesc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", @@ -5335,6 +6156,11 @@ "dev": true, "license": "MIT" }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -5648,6 +6474,11 @@ "url": "https://opencollective.com/parcel" } }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -5681,7 +6512,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, "license": "MIT", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" @@ -5784,6 +6614,10 @@ "node": "*" } }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==" "node_modules/minipass": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", @@ -5851,6 +6685,14 @@ "dev": true, "license": "MIT" }, + "node_modules/netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/node-releases": { "version": "2.0.19", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", @@ -5861,7 +6703,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -5964,6 +6805,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -6032,11 +6881,40 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/pac-proxy-agent": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz", + "integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==", + "dependencies": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.6", + "pac-resolver": "^7.0.1", + "socks-proxy-agent": "^8.0.5" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pac-resolver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "dependencies": { + "degenerator": "^5.0.0", + "netmask": "^2.0.2" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, "license": "MIT", "dependencies": { "callsites": "^3.0.0" @@ -6045,6 +6923,23 @@ "node": ">=6" } }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -6072,6 +6967,11 @@ "dev": true, "license": "MIT" }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -6258,11 +7158,18 @@ } } }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, "license": "MIT", "dependencies": { "loose-envify": "^1.4.0", @@ -6270,12 +7177,47 @@ "react-is": "^16.13.1" } }, + "node_modules/proxy-agent": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz", + "integrity": "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.6", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.1.0", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.5" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/proxy-agent/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "engines": { + "node": ">=12" + } + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "license": "MIT" }, + "node_modules/pump": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz", + "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -6286,6 +7228,42 @@ "node": ">=6" } }, + "node_modules/puppeteer": { + "version": "24.10.2", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-24.10.2.tgz", + "integrity": "sha512-+k26rCz6akFZntx0hqUoFjCojgOLIxZs6p2k53LmEicwsT8F/FMBKfRfiBw1sitjiCvlR/15K7lBqfjXa251FA==", + "hasInstallScript": true, + "dependencies": { + "@puppeteer/browsers": "2.10.5", + "chromium-bidi": "5.1.0", + "cosmiconfig": "^9.0.0", + "devtools-protocol": "0.0.1452169", + "puppeteer-core": "24.10.2", + "typed-query-selector": "^2.12.0" + }, + "bin": { + "puppeteer": "lib/cjs/puppeteer/node/cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/puppeteer-core": { + "version": "24.10.2", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-24.10.2.tgz", + "integrity": "sha512-CnzhOgrZj8DvkDqI+Yx+9or33i3Y9uUYbKyYpP4C13jWwXx/keQ38RMTMmxuLCWQlxjZrOH0Foq7P2fGP7adDQ==", + "dependencies": { + "@puppeteer/browsers": "2.10.5", + "chromium-bidi": "5.1.0", + "debug": "^4.4.1", + "devtools-protocol": "0.0.1452169", + "typed-query-selector": "^2.12.0", + "ws": "^8.18.2" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/qs": { "version": "6.14.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", @@ -6331,6 +7309,18 @@ "node": ">=0.10.0" } }, + "node_modules/react-apexcharts": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/react-apexcharts/-/react-apexcharts-1.7.0.tgz", + "integrity": "sha512-03oScKJyNLRf0Oe+ihJxFZliBQM9vW3UWwomVn4YVRTN1jsIR58dLWt0v1sb8RwJVHDMbeHiKQueM0KGpn7nOA==", + "dependencies": { + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "apexcharts": ">=4.0.0", + "react": ">=0.13" + } + }, "node_modules/react-dom": { "version": "19.1.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz", @@ -6347,7 +7337,6 @@ "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true, "license": "MIT" }, "node_modules/react-refresh": { @@ -6503,7 +7492,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -6831,6 +7819,50 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.5.tgz", + "integrity": "sha512-iF+tNDQla22geJdTyJB1wM/qrX9DMRwWrciEPwWLPRWAUEM8sQiyxgckLxWT1f7+9VabJS0jTGGr4QgBuvi6Ww==", + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -6840,6 +7872,21 @@ "node": ">=0.10.0" } }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" + }, + "node_modules/streamx": { + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.22.1.tgz", + "integrity": "sha512-znKXEBxfatz2GBNK02kRnCXjV+AA4kjZIUxeWSr3UGirZMJfTE9uiwKHobnbgxWyL/JWro8tTq+vOqAK1/qbSA==", + "dependencies": { + "fast-fifo": "^1.3.2", + "text-decoder": "^1.1.0" + }, + "optionalDependencies": { + "bare-events": "^2.2.0" "node_modules/stop-iteration-iterator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", @@ -7059,6 +8106,35 @@ "node": ">=6" } }, + "node_modules/tar-fs": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.10.tgz", + "integrity": "sha512-C1SwlQGNLe/jPNqapK8epDsXME7CAJR5RL3GcE6KWx1d9OUByzoHVcbu1VPI8tevg9H8Alae0AApHHFGzrD5zA==", + "dependencies": { + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + }, + "optionalDependencies": { + "bare-fs": "^4.0.1", + "bare-path": "^3.0.0" + } + }, + "node_modules/tar-stream": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, + "node_modules/text-decoder": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz", + "integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==", + "dependencies": { + "b4a": "^1.6.4" "node_modules/tar": { "version": "7.4.3", "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", @@ -7259,6 +8335,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/typed-query-selector": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.0.tgz", + "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==" + }, "node_modules/typescript": { "version": "5.8.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", @@ -7656,6 +8737,31 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/ws": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", + "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -7698,6 +8804,15 @@ "node": ">=12" } }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -7710,6 +8825,14 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zod": { + "version": "3.25.67", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.67.tgz", + "integrity": "sha512-idA2YXwpCdqUSKRCACDE6ItZD9TZzy3OZMtpfLoh6oPR47lipysRrJfjzMqFxQ3uJuUPyUeWe1r9vLH33xO/Qw==", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } } } diff --git a/package.json b/package.json index 7327bd34b..5cfc9c804 100644 --- a/package.json +++ b/package.json @@ -32,15 +32,19 @@ "@radix-ui/react-dropdown-menu": "^2.1.6", "@radix-ui/react-label": "^2.1.2", "@radix-ui/react-navigation-menu": "^1.2.5", + "@radix-ui/react-progress": "^1.1.0", "@radix-ui/react-select": "^2.1.6", "@radix-ui/react-separator": "^1.1.2", "@radix-ui/react-slot": "^1.1.2", + "@radix-ui/react-tabs": "^1.1.1", "@radix-ui/react-toggle": "^1.1.2", "@radix-ui/react-toggle-group": "^1.1.2", "@radix-ui/react-tooltip": "^1.1.8", "@tailwindcss/vite": "^4.1.11", "@types/react": "^19.0.3", "@types/react-dom": "^19.0.2", + "@vitejs/plugin-react": "^4.3.4", + "apexcharts": "^4.7.0", "@vitejs/plugin-react": "^4.6.0", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", @@ -48,7 +52,9 @@ "globals": "^15.14.0", "laravel-vite-plugin": "^2.0", "lucide-react": "^0.475.0", + "puppeteer": "^24.10.2", "react": "^19.0.0", + "react-apexcharts": "^1.7.0", "react-dom": "^19.0.0", "tailwind-merge": "^3.0.1", "tailwindcss": "^4.0.0", diff --git a/public/css/bezhansalleh/filament-language-switch/filament-language-switch.css b/public/css/bezhansalleh/filament-language-switch/filament-language-switch.css new file mode 100644 index 000000000..b230d317a --- /dev/null +++ b/public/css/bezhansalleh/filament-language-switch/filament-language-switch.css @@ -0,0 +1 @@ +.w-fit{width:-moz-fit-content;width:fit-content}.flex-shrink-0{flex-shrink:0}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.bg-primary-500\/10{background-color:rgba(var(--primary-500),.1)}.\!p-2{padding:.5rem!important}.\!p-2\.5{padding:.625rem!important}.text-gray-600,.text-primary-600{--tw-text-opacity:1}.flags-only{max-width:3rem!important}.fls-dropdown-width{max-width:-moz-fit-content!important;max-width:fit-content!important}/*! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgba(var(--gray-200),1)}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-family),ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:rgba(var(--gray-400),1)}input::placeholder,textarea::placeholder{opacity:1;color:rgba(var(--gray-400),1)}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:rgba(var(--gray-500),var(--tw-border-opacity,1));border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow:0 0 #0000}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,input:where(:not([type])):focus,select:focus,textarea:focus{outline:2px solid #0000;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:rgba(var(--gray-500),var(--tw-text-opacity,1));opacity:1}input::placeholder,textarea::placeholder{color:rgba(var(--gray-500),var(--tw-text-opacity,1));opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='rgba(var(--gray-500), var(--tw-stroke-opacity, 1))' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:rgba(var(--gray-500),var(--tw-border-opacity,1));border-width:1px;--tw-shadow:0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid #0000;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:#0000;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E")}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=checkbox]:indeterminate,[type=radio]:checked:focus,[type=radio]:checked:hover{border-color:#0000;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{border-color:#0000;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.hover\:bg-gray-950\/5:hover{background-color:rgba(var(--gray-950),.05)}.hover\:bg-transparent:hover{background-color:initial}.hover\:ring-gray-300:hover{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-300),var(--tw-ring-opacity))}.focus\:bg-gray-950\/5:focus{background-color:rgba(var(--gray-950),.05)}.group:hover .group-hover\:border{border-width:1px}.group:hover .group-hover\:border-primary-500\/10{border-color:rgba(var(--primary-500),.1)}.group:hover .group-hover\:bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.group:hover .group-hover\:text-primary-600{--tw-text-opacity:1;color:rgba(var(--primary-600),var(--tw-text-opacity))}.group:focus .group-focus\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is([dir=rtl] .rtl\:space-x-reverse)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}:is(.dark .dark\:bg-gray-950){--tw-bg-opacity:1;background-color:rgba(var(--gray-950),var(--tw-bg-opacity))}:is(.dark .dark\:text-gray-200){--tw-text-opacity:1;color:rgba(var(--gray-200),var(--tw-text-opacity))}:is(.dark .dark\:ring-gray-500){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-500),var(--tw-ring-opacity))}:is(.dark .dark\:hover\:bg-white\/5:hover){background-color:#ffffff0d}:is(.dark .hover\:dark\:ring-gray-400):hover{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-400),var(--tw-ring-opacity))}:is(.dark .dark\:focus\:bg-white\/5:focus){background-color:#ffffff0d} \ No newline at end of file diff --git a/public/css/filament/filament/app.css b/public/css/filament/filament/app.css new file mode 100644 index 000000000..3491f2db2 --- /dev/null +++ b/public/css/filament/filament/app.css @@ -0,0 +1 @@ +*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border-color:rgba(var(--gray-200),1);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:var(--font-family),ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:rgba(var(--gray-400),1);opacity:1}input::placeholder,textarea::placeholder{color:rgba(var(--gray-400),1);opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:rgba(var(--gray-500),var(--tw-border-opacity,1));border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,input:where(:not([type])):focus,select:focus,textarea:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#2563eb;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}input::-moz-placeholder,textarea::-moz-placeholder{color:rgba(var(--gray-500),var(--tw-text-opacity,1));opacity:1}input::placeholder,textarea::placeholder{color:rgba(var(--gray-500),var(--tw-text-opacity,1));opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-bottom:0;padding-top:0}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:rgba(var(--gray-500),var(--tw-border-opacity,1));border-width:1px;color:#2563eb;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1rem}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E")}@media (forced-colors:active) {[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}@media (forced-colors:active) {[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:transparent}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}@media (forced-colors:active) {[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:transparent}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}:root.dark{color-scheme:dark}[data-field-wrapper]{scroll-margin-top:8rem}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-bottom:1.2em;margin-top:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-bottom:3em;margin-top:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){border-inline-start-color:var(--tw-prose-quote-borders);border-inline-start-width:.25rem;color:var(--tw-prose-quotes);font-style:italic;font-weight:500;margin-bottom:1.6em;margin-top:1.6em;padding-inline-start:1em;quotes:"\201C""\201D""\2018""\2019"}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-size:2.25em;font-weight:800;line-height:1.1111111;margin-bottom:.8888889em;margin-top:0}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:900}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-size:1.5em;font-weight:700;line-height:1.3333333;margin-bottom:1em;margin-top:2em}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:800}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-size:1.25em;font-weight:600;line-height:1.6;margin-bottom:.6em;margin-top:1.6em}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;line-height:1.5;margin-bottom:.5em;margin-top:1.5em}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-bottom:2em;margin-top:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.3125rem;box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows)/10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows)/10%);color:var(--tw-prose-kbd);font-family:inherit;font-size:.875em;font-weight:500;padding-inline-end:.375em;padding-bottom:.1875em;padding-top:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:var(--tw-prose-pre-bg);border-radius:.375rem;color:var(--tw-prose-pre-code);font-size:.875em;font-weight:400;line-height:1.7142857;margin-bottom:1.7142857em;margin-top:1.7142857em;overflow-x:auto;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-top:.8571429em;padding-inline-start:1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;padding:0}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em;line-height:1.7142857;margin-bottom:2em;margin-top:2em;table-layout:auto;width:100%}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-color:var(--tw-prose-th-borders);border-bottom-width:1px}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em;vertical-align:bottom}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-color:var(--tw-prose-td-borders);border-bottom-width:1px}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-color:var(--tw-prose-th-borders);border-top-width:1px}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body:#374151;--tw-prose-headings:#111827;--tw-prose-lead:#4b5563;--tw-prose-links:#111827;--tw-prose-bold:#111827;--tw-prose-counters:#6b7280;--tw-prose-bullets:#d1d5db;--tw-prose-hr:#e5e7eb;--tw-prose-quotes:#111827;--tw-prose-quote-borders:#e5e7eb;--tw-prose-captions:#6b7280;--tw-prose-kbd:#111827;--tw-prose-kbd-shadows:17 24 39;--tw-prose-code:#111827;--tw-prose-pre-code:#e5e7eb;--tw-prose-pre-bg:#1f2937;--tw-prose-th-borders:#d1d5db;--tw-prose-td-borders:#e5e7eb;--tw-prose-invert-body:#d1d5db;--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:#9ca3af;--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:#9ca3af;--tw-prose-invert-bullets:#4b5563;--tw-prose-invert-hr:#374151;--tw-prose-invert-quotes:#f3f4f6;--tw-prose-invert-quote-borders:#374151;--tw-prose-invert-captions:#9ca3af;--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:255 255 255;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:#d1d5db;--tw-prose-invert-pre-bg:rgba(0,0,0,.5);--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.5em;margin-top:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.75em;margin-top:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.75em;margin-top:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-top:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em;margin-top:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-bottom:.8888889em;margin-top:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em;margin-top:1.3333333em;padding-inline-start:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;line-height:1.2;margin-bottom:.8em;margin-top:0}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;line-height:1.4;margin-bottom:.8em;margin-top:1.6em}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-bottom:.4444444em;margin-top:1.5555556em}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){line-height:1.4285714;margin-bottom:.5714286em;margin-top:1.4285714em}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7142857em;margin-top:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7142857em;margin-top:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7142857em;margin-top:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.3125rem;font-size:.8571429em;padding-inline-end:.3571429em;padding-bottom:.1428571em;padding-top:.1428571em;padding-inline-start:.3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.25rem;font-size:.8571429em;line-height:1.6666667;margin-bottom:1.6666667em;margin-top:1.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-top:.6666667em;padding-inline-start:1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em;margin-top:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em;margin-top:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.2857143em;margin-top:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.5714286em;margin-top:.5714286em}.prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.5714286em;margin-top:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em;margin-top:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-inline-start:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2.8571429em;margin-top:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.6666667em;padding-top:.6666667em;padding-inline-start:1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7142857em;margin-top:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-base{font-size:1rem;line-height:1.75}.prose-base :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em}.prose-base :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.25em;line-height:1.6;margin-bottom:1.2em;margin-top:1.2em}.prose-base :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.6em;margin-top:1.6em;padding-inline-start:1em}.prose-base :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.25em;line-height:1.1111111;margin-bottom:.8888889em;margin-top:0}.prose-base :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.5em;line-height:1.3333333;margin-bottom:1em;margin-top:2em}.prose-base :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.25em;line-height:1.6;margin-bottom:.6em;margin-top:1.6em}.prose-base :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){line-height:1.5;margin-bottom:.5em;margin-top:1.5em}.prose-base :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose-base :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose-base :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-base :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose-base :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.3125rem;font-size:.875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-top:.1875em;padding-inline-start:.375em}.prose-base :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em}.prose-base :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em}.prose-base :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-base :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.375rem;font-size:.875em;line-height:1.7142857;margin-bottom:1.7142857em;margin-top:1.7142857em;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-top:.8571429em;padding-inline-start:1.1428571em}.prose-base :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose-base :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em;padding-inline-start:1.625em}.prose-base :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.5em;margin-top:.5em}.prose-base :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose-base :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose-base :where(.prose-base>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.75em;margin-top:.75em}.prose-base :where(.prose-base>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose-base :where(.prose-base>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose-base :where(.prose-base>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose-base :where(.prose-base>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose-base :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.75em;margin-top:.75em}.prose-base :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em}.prose-base :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose-base :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose-base :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:3em;margin-top:3em}.prose-base :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-base :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-base :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-base :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-base :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em;line-height:1.7142857}.prose-base :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose-base :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-base :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-base :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-top:.5714286em;padding-inline-start:.5714286em}.prose-base :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-base :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-base :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose-base :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-base :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose-base :where(.prose-base>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-base :where(.prose-base>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-lg{font-size:1.125rem;line-height:1.7777778}.prose-lg :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em;margin-top:1.3333333em}.prose-lg :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2222222em;line-height:1.4545455;margin-bottom:1.0909091em;margin-top:1.0909091em}.prose-lg :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.6666667em;margin-top:1.6666667em;padding-inline-start:1em}.prose-lg :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.6666667em;line-height:1;margin-bottom:.8333333em;margin-top:0}.prose-lg :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.6666667em;line-height:1.3333333;margin-bottom:1.0666667em;margin-top:1.8666667em}.prose-lg :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.3333333em;line-height:1.5;margin-bottom:.6666667em;margin-top:1.6666667em}.prose-lg :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){line-height:1.5555556;margin-bottom:.4444444em;margin-top:1.7777778em}.prose-lg :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7777778em;margin-top:1.7777778em}.prose-lg :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7777778em;margin-top:1.7777778em}.prose-lg :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-lg :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7777778em;margin-top:1.7777778em}.prose-lg :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.3125rem;font-size:.8888889em;padding-inline-end:.4444444em;padding-bottom:.2222222em;padding-top:.2222222em;padding-inline-start:.4444444em}.prose-lg :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-lg :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8666667em}.prose-lg :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.875em}.prose-lg :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){border-radius:.375rem;font-size:.8888889em;line-height:1.75;margin-bottom:2em;margin-top:2em;padding-inline-end:1.5em;padding-bottom:1em;padding-top:1em;padding-inline-start:1.5em}.prose-lg :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em;margin-top:1.3333333em;padding-inline-start:1.5555556em}.prose-lg :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em;margin-top:1.3333333em;padding-inline-start:1.5555556em}.prose-lg :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.6666667em;margin-top:.6666667em}.prose-lg :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4444444em}.prose-lg :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4444444em}.prose-lg :where(.prose-lg>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.8888889em;margin-top:.8888889em}.prose-lg :where(.prose-lg>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em}.prose-lg :where(.prose-lg>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em}.prose-lg :where(.prose-lg>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em}.prose-lg :where(.prose-lg>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em}.prose-lg :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:.8888889em;margin-top:.8888889em}.prose-lg :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.3333333em;margin-top:1.3333333em}.prose-lg :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em}.prose-lg :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.6666667em;padding-inline-start:1.5555556em}.prose-lg :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:3.1111111em;margin-top:3.1111111em}.prose-lg :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-lg :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-lg :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-lg :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-lg :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em;line-height:1.5}.prose-lg :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.75em;padding-bottom:.75em;padding-inline-start:.75em}.prose-lg :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-lg :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-lg :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:.75em;padding-bottom:.75em;padding-top:.75em;padding-inline-start:.75em}.prose-lg :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-lg :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-lg :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.7777778em;margin-top:1.7777778em}.prose-lg :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose-lg :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em;line-height:1.5;margin-top:1em}.prose-lg :where(.prose-lg>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-lg :where(.prose-lg>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-4{inset:1rem}.inset-x-0{left:0;right:0}.inset-x-4{left:1rem;right:1rem}.inset-y-0{bottom:0;top:0}.-bottom-1\/2{bottom:-50%}.-top-1{top:-.25rem}.-top-1\/2{top:-50%}.-top-2{top:-.5rem}.-top-3{top:-.75rem}.bottom-0{bottom:0}.bottom-1\/2{bottom:50%}.end-0{inset-inline-end:0}.end-4{inset-inline-end:1rem}.end-6{inset-inline-end:1.5rem}.left-3{left:.75rem}.start-0{inset-inline-start:0}.start-full{inset-inline-start:100%}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-4{top:1rem}.top-6{top:1.5rem}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[1\]{z-index:1}.order-first{order:-9999}.col-\[--col-span-default\]{grid-column:var(--col-span-default)}.col-span-full{grid-column:1/-1}.col-start-2{grid-column-start:2}.col-start-3{grid-column-start:3}.col-start-\[--col-start-default\]{grid-column-start:var(--col-start-default)}.row-start-2{grid-row-start:2}.-m-0\.5{margin:-.125rem}.-m-1{margin:-.25rem}.-m-1\.5{margin:-.375rem}.-m-2{margin:-.5rem}.-m-2\.5{margin:-.625rem}.-m-3{margin:-.75rem}.-m-3\.5{margin:-.875rem}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.-my-1{margin-bottom:-.25rem;margin-top:-.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-auto{margin-left:auto;margin-right:auto}.my-16{margin-bottom:4rem;margin-top:4rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-4{margin-bottom:1rem;margin-top:1rem}.my-auto{margin-bottom:auto;margin-top:auto}.\!mt-0{margin-top:0!important}.-mb-4{margin-bottom:-1rem}.-mb-6{margin-bottom:-1.5rem}.-me-2{margin-inline-end:-.5rem}.-ms-0\.5{margin-inline-start:-.125rem}.-ms-1{margin-inline-start:-.25rem}.-ms-2{margin-inline-start:-.5rem}.-mt-3{margin-top:-.75rem}.-mt-4{margin-top:-1rem}.-mt-6{margin-top:-1.5rem}.-mt-7{margin-top:-1.75rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.me-1{margin-inline-end:.25rem}.me-3{margin-inline-end:.75rem}.me-4{margin-inline-end:1rem}.me-6{margin-inline-end:1.5rem}.ml-auto{margin-left:auto}.ms-1{margin-inline-start:.25rem}.ms-6{margin-inline-start:1.5rem}.ms-auto{margin-inline-start:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.line-clamp-\[--line-clamp\]{-webkit-box-orient:vertical;-webkit-line-clamp:var(--line-clamp);display:-webkit-box;overflow:hidden}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.hidden{display:none}.h-0{height:0}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-16{height:4rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[100dvh\],.h-dvh{height:100dvh}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:24rem}.min-h-\[theme\(spacing\.48\)\]{min-height:12rem}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-16{width:4rem}.w-20{width:5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[--sidebar-width\]{width:var(--sidebar-width)}.w-\[calc\(100\%\+2rem\)\]{width:calc(100% + 2rem)}.w-auto{width:auto}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-screen{width:100vw}.min-w-0{min-width:0}.min-w-48{min-width:12rem}.min-w-\[theme\(spacing\.4\)\]{min-width:1rem}.min-w-\[theme\(spacing\.5\)\]{min-width:1.25rem}.min-w-\[theme\(spacing\.6\)\]{min-width:1.5rem}.min-w-\[theme\(spacing\.8\)\]{min-width:2rem}.\!max-w-2xl{max-width:42rem!important}.\!max-w-3xl{max-width:48rem!important}.\!max-w-4xl{max-width:56rem!important}.\!max-w-5xl{max-width:64rem!important}.\!max-w-6xl{max-width:72rem!important}.\!max-w-7xl{max-width:80rem!important}.\!max-w-\[14rem\]{max-width:14rem!important}.\!max-w-lg{max-width:32rem!important}.\!max-w-md{max-width:28rem!important}.\!max-w-sm{max-width:24rem!important}.\!max-w-xl{max-width:36rem!important}.\!max-w-xs{max-width:20rem!important}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-max{max-width:-moz-max-content;max-width:max-content}.max-w-md{max-width:28rem}.max-w-min{max-width:-moz-min-content;max-width:min-content}.max-w-none{max-width:none}.max-w-prose{max-width:65ch}.max-w-screen-2xl{max-width:1536px}.max-w-screen-lg{max-width:1024px}.max-w-screen-md{max-width:768px}.max-w-screen-sm{max-width:640px}.max-w-screen-xl{max-width:1280px}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.table-auto{table-layout:auto}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.-translate-x-1\/4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-1\/4{--tw-translate-x:-25%}.-translate-x-12{--tw-translate-x:-3rem}.-translate-x-12,.-translate-x-5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-5{--tw-translate-x:-1.25rem}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-12{--tw-translate-y:-3rem}.-translate-y-12,.-translate-y-3\/4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-3\/4{--tw-translate-y:-75%}.translate-x-0{--tw-translate-x:0px}.translate-x-0,.translate-x-12{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-12{--tw-translate-x:3rem}.translate-x-5{--tw-translate-x:1.25rem}.translate-x-5,.translate-x-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x:100%}.translate-y-12{--tw-translate-y:3rem}.-rotate-180,.translate-y-12{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate:-180deg}.rotate-180{--tw-rotate:180deg}.rotate-180,.scale-100{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.scale-95,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.cursor-wait{cursor:wait}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize-none{resize:none}.resize{resize:both}.scroll-mt-9{scroll-margin-top:2.25rem}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.columns-\[--cols-default\]{-moz-columns:var(--cols-default);columns:var(--cols-default)}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.auto-cols-fr{grid-auto-columns:minmax(0,1fr)}.grid-flow-col{grid-auto-flow:column}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-\[--cols-default\]{grid-template-columns:var(--cols-default)}.grid-cols-\[1fr_auto_1fr\]{grid-template-columns:1fr auto 1fr}.grid-cols-\[repeat\(7\2c minmax\(theme\(spacing\.7\)\2c 1fr\)\)\]{grid-template-columns:repeat(7,minmax(1.75rem,1fr))}.grid-cols-\[repeat\(auto-fit\2c minmax\(0\2c 1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(0,1fr))}.grid-rows-\[1fr_auto_1fr\]{grid-template-rows:1fr auto 1fr}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-items-start{justify-items:start}.justify-items-center{justify-items:center}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-1\.5{-moz-column-gap:.375rem;column-gap:.375rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-2\.5{-moz-column-gap:.625rem;column-gap:.625rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-5{-moz-column-gap:1.25rem;column-gap:1.25rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-1{row-gap:.25rem}.gap-y-1\.5{row-gap:.375rem}.gap-y-2{row-gap:.5rem}.gap-y-3{row-gap:.75rem}.gap-y-4{row-gap:1rem}.gap-y-6{row-gap:1.5rem}.gap-y-7{row-gap:1.75rem}.gap-y-8{row-gap:2rem}.gap-y-px{row-gap:1px}.-space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-.25rem*var(--tw-space-x-reverse))}.-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-.5rem*var(--tw-space-x-reverse))}.-space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-.75rem*var(--tw-space-x-reverse))}.-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1rem*var(--tw-space-x-reverse))}.-space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1.25rem*var(--tw-space-x-reverse))}.-space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1.5rem*var(--tw-space-x-reverse))}.-space-x-7>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1.75rem*var(--tw-space-x-reverse))}.-space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(-2rem*var(--tw-space-x-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(1px*var(--tw-divide-x-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgba(var(--gray-100),var(--tw-divide-opacity,1))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgba(var(--gray-200),var(--tw-divide-opacity,1))}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-x-clip{overflow-x:clip}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-xl{border-bottom-left-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-x-\[0\.5px\]{border-left-width:.5px;border-right-width:.5px}.border-y{border-bottom-width:1px;border-top-width:1px}.\!border-t-0{border-top-width:0!important}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-e{border-inline-end-width:1px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.\!border-none{border-style:none!important}.border-none{border-style:none}.border-gray-100{--tw-border-opacity:1;border-color:rgba(var(--gray-100),var(--tw-border-opacity,1))}.border-gray-200{--tw-border-opacity:1;border-color:rgba(var(--gray-200),var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgba(var(--gray-300),var(--tw-border-opacity,1))}.border-gray-600{--tw-border-opacity:1;border-color:rgba(var(--gray-600),var(--tw-border-opacity,1))}.border-primary-500{--tw-border-opacity:1;border-color:rgba(var(--primary-500),var(--tw-border-opacity,1))}.border-primary-600{--tw-border-opacity:1;border-color:rgba(var(--primary-600),var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-t-gray-200{--tw-border-opacity:1;border-top-color:rgba(var(--gray-200),var(--tw-border-opacity,1))}.\!bg-gray-50{--tw-bg-opacity:1!important;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))!important}.\!bg-gray-700{--tw-bg-opacity:1!important;background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1))!important}.bg-black\/50{background-color:rgba(0,0,0,.5)}.bg-custom-100{--tw-bg-opacity:1;background-color:rgba(var(--c-100),var(--tw-bg-opacity,1))}.bg-custom-50{--tw-bg-opacity:1;background-color:rgba(var(--c-50),var(--tw-bg-opacity,1))}.bg-custom-600{--tw-bg-opacity:1;background-color:rgba(var(--c-600),var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(var(--gray-100),var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgba(var(--gray-200),var(--tw-bg-opacity,1))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgba(var(--gray-300),var(--tw-bg-opacity,1))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgba(var(--gray-400),var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.bg-gray-950\/50{background-color:rgba(var(--gray-950),.5)}.bg-primary-500{--tw-bg-opacity:1;background-color:rgba(var(--primary-500),var(--tw-bg-opacity,1))}.bg-primary-600{--tw-bg-opacity:1;background-color:rgba(var(--primary-600),var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/0{background-color:hsla(0,0%,100%,0)}.bg-white\/5{background-color:hsla(0,0%,100%,.05)}.\!bg-none{background-image:none!important}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-cover{-o-object-fit:cover;object-fit:cover}.object-center{-o-object-position:center;object-position:center}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-12{padding-bottom:3rem;padding-top:3rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-3\.5{padding-bottom:.875rem;padding-top:.875rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pe-0{padding-inline-end:0}.pe-1{padding-inline-end:.25rem}.pe-2{padding-inline-end:.5rem}.pe-3{padding-inline-end:.75rem}.pe-4{padding-inline-end:1rem}.pe-6{padding-inline-end:1.5rem}.pe-8{padding-inline-end:2rem}.ps-0{padding-inline-start:0}.ps-1{padding-inline-start:.25rem}.ps-2{padding-inline-start:.5rem}.ps-3{padding-inline-start:.75rem}.ps-4{padding-inline-start:1rem}.ps-\[5\.25rem\]{padding-inline-start:5.25rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-start{text-align:start}.text-end{text-align:end}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:var(--font-family),ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}.font-serif{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-extralight{font-weight:200}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-loose{line-height:2}.tracking-tight{letter-spacing:-.025em}.tracking-tighter{letter-spacing:-.05em}.text-custom-400{--tw-text-opacity:1;color:rgba(var(--c-400),var(--tw-text-opacity,1))}.text-custom-50{--tw-text-opacity:1;color:rgba(var(--c-50),var(--tw-text-opacity,1))}.text-custom-500{--tw-text-opacity:1;color:rgba(var(--c-500),var(--tw-text-opacity,1))}.text-custom-600{--tw-text-opacity:1;color:rgba(var(--c-600),var(--tw-text-opacity,1))}.text-custom-700\/50{color:rgba(var(--c-700),.5)}.text-danger-600{--tw-text-opacity:1;color:rgba(var(--danger-600),var(--tw-text-opacity,1))}.text-gray-100{--tw-text-opacity:1;color:rgba(var(--gray-100),var(--tw-text-opacity,1))}.text-gray-200{--tw-text-opacity:1;color:rgba(var(--gray-200),var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgba(var(--gray-600),var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgba(var(--gray-700),var(--tw-text-opacity,1))}.text-gray-700\/50{color:rgba(var(--gray-700),.5)}.text-gray-950{--tw-text-opacity:1;color:rgba(var(--gray-950),var(--tw-text-opacity,1))}.text-primary-400{--tw-text-opacity:1;color:rgba(var(--primary-400),var(--tw-text-opacity,1))}.text-primary-500{--tw-text-opacity:1;color:rgba(var(--primary-500),var(--tw-text-opacity,1))}.text-primary-600{--tw-text-opacity:1;color:rgba(var(--primary-600),var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-0{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-1,.ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-inset{--tw-ring-inset:inset}.ring-custom-600{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--c-600),var(--tw-ring-opacity,1))}.ring-custom-600\/10{--tw-ring-color:rgba(var(--c-600),0.1)}.ring-custom-600\/20{--tw-ring-color:rgba(var(--c-600),0.2)}.ring-danger-600{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-600),var(--tw-ring-opacity,1))}.ring-gray-200{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-200),var(--tw-ring-opacity,1))}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-300),var(--tw-ring-opacity,1))}.ring-gray-600\/10{--tw-ring-color:rgba(var(--gray-600),0.1)}.ring-gray-900\/10{--tw-ring-color:rgba(var(--gray-900),0.1)}.ring-gray-950\/10{--tw-ring-color:rgba(var(--gray-950),0.1)}.ring-gray-950\/5{--tw-ring-color:rgba(var(--gray-950),0.05)}.ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity,1))}.ring-white\/10{--tw-ring-color:hsla(0,0%,100%,.1)}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.delay-100{transition-delay:.1s}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[transform\:translateZ\(0\)\]{transform:translateZ(0)}.dark\:prose-invert:is(.dark *){--tw-prose-body:var(--tw-prose-invert-body);--tw-prose-headings:var(--tw-prose-invert-headings);--tw-prose-lead:var(--tw-prose-invert-lead);--tw-prose-links:var(--tw-prose-invert-links);--tw-prose-bold:var(--tw-prose-invert-bold);--tw-prose-counters:var(--tw-prose-invert-counters);--tw-prose-bullets:var(--tw-prose-invert-bullets);--tw-prose-hr:var(--tw-prose-invert-hr);--tw-prose-quotes:var(--tw-prose-invert-quotes);--tw-prose-quote-borders:var(--tw-prose-invert-quote-borders);--tw-prose-captions:var(--tw-prose-invert-captions);--tw-prose-kbd:var(--tw-prose-invert-kbd);--tw-prose-kbd-shadows:var(--tw-prose-invert-kbd-shadows);--tw-prose-code:var(--tw-prose-invert-code);--tw-prose-pre-code:var(--tw-prose-invert-pre-code);--tw-prose-pre-bg:var(--tw-prose-invert-pre-bg);--tw-prose-th-borders:var(--tw-prose-invert-th-borders);--tw-prose-td-borders:var(--tw-prose-invert-td-borders)}.placeholder\:text-gray-400::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.placeholder\:text-gray-400::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:inset-y-0:before{bottom:0;content:var(--tw-content);top:0}.before\:start-0:before{content:var(--tw-content);inset-inline-start:0}.before\:h-full:before{content:var(--tw-content);height:100%}.before\:w-0\.5:before{content:var(--tw-content);width:.125rem}.before\:bg-primary-600:before{--tw-bg-opacity:1;background-color:rgba(var(--primary-600),var(--tw-bg-opacity,1));content:var(--tw-content)}.first\:border-s-0:first-child{border-inline-start-width:0}.first\:border-t-0:first-child{border-top-width:0}.last\:border-e-0:last-child{border-inline-end-width:0}.first-of-type\:ps-1:first-of-type{padding-inline-start:.25rem}.last-of-type\:pe-1:last-of-type{padding-inline-end:.25rem}.checked\:ring-0:checked{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-within\:bg-gray-50:focus-within{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.hover\:bg-custom-400\/10:hover{background-color:rgba(var(--c-400),.1)}.hover\:bg-custom-50:hover{--tw-bg-opacity:1;background-color:rgba(var(--c-50),var(--tw-bg-opacity,1))}.hover\:bg-custom-500:hover{--tw-bg-opacity:1;background-color:rgba(var(--c-500),var(--tw-bg-opacity,1))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgba(var(--gray-100),var(--tw-bg-opacity,1))}.hover\:bg-gray-400\/10:hover{background-color:rgba(var(--gray-400),.1)}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.hover\:text-custom-600:hover{--tw-text-opacity:1;color:rgba(var(--c-600),var(--tw-text-opacity,1))}.hover\:text-custom-700\/75:hover{color:rgba(var(--c-700),.75)}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgba(var(--gray-700),var(--tw-text-opacity,1))}.hover\:text-gray-700\/75:hover{color:rgba(var(--gray-700),.75)}.hover\:opacity-100:hover{opacity:1}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-0:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-danger-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-600),var(--tw-ring-opacity,1))}.focus\:ring-primary-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-600),var(--tw-ring-opacity,1))}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px}.checked\:focus\:ring-danger-500\/50:focus:checked{--tw-ring-color:rgba(var(--danger-500),0.5)}.checked\:focus\:ring-primary-500\/50:focus:checked{--tw-ring-color:rgba(var(--primary-500),0.5)}.focus-visible\:z-10:focus-visible{z-index:10}.focus-visible\:border-primary-500:focus-visible{--tw-border-opacity:1;border-color:rgba(var(--primary-500),var(--tw-border-opacity,1))}.focus-visible\:bg-custom-50:focus-visible{--tw-bg-opacity:1;background-color:rgba(var(--c-50),var(--tw-bg-opacity,1))}.focus-visible\:bg-gray-100:focus-visible{--tw-bg-opacity:1;background-color:rgba(var(--gray-100),var(--tw-bg-opacity,1))}.focus-visible\:bg-gray-50:focus-visible{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.focus-visible\:text-custom-700\/75:focus-visible{color:rgba(var(--c-700),.75)}.focus-visible\:text-gray-500:focus-visible{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.focus-visible\:text-gray-700\/75:focus-visible{color:rgba(var(--gray-700),.75)}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-inset:focus-visible{--tw-ring-inset:inset}.focus-visible\:ring-custom-500\/50:focus-visible{--tw-ring-color:rgba(var(--c-500),0.5)}.focus-visible\:ring-custom-600:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--c-600),var(--tw-ring-opacity,1))}.focus-visible\:ring-gray-400\/40:focus-visible{--tw-ring-color:rgba(var(--gray-400),0.4)}.focus-visible\:ring-primary-500:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-500),var(--tw-ring-opacity,1))}.focus-visible\:ring-primary-600:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-600),var(--tw-ring-opacity,1))}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px}.enabled\:cursor-wait:enabled{cursor:wait}.enabled\:opacity-70:enabled{opacity:.7}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:bg-gray-50:disabled{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.disabled\:text-gray-50:disabled{--tw-text-opacity:1;color:rgba(var(--gray-50),var(--tw-text-opacity,1))}.disabled\:text-gray-500:disabled{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.disabled\:opacity-70:disabled{opacity:.7}.disabled\:\[-webkit-text-fill-color\:theme\(colors\.gray\.500\)\]:disabled{-webkit-text-fill-color:rgba(var(--gray-500),1)}.disabled\:placeholder\:\[-webkit-text-fill-color\:theme\(colors\.gray\.400\)\]:disabled::-moz-placeholder{-webkit-text-fill-color:rgba(var(--gray-400),1)}.disabled\:placeholder\:\[-webkit-text-fill-color\:theme\(colors\.gray\.400\)\]:disabled::placeholder{-webkit-text-fill-color:rgba(var(--gray-400),1)}.disabled\:checked\:bg-gray-400:checked:disabled{--tw-bg-opacity:1;background-color:rgba(var(--gray-400),var(--tw-bg-opacity,1))}.disabled\:checked\:text-gray-400:checked:disabled{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.group\/item:first-child .group-first\/item\:rounded-s-lg{border-end-start-radius:.5rem;border-start-start-radius:.5rem}.group\/item:last-child .group-last\/item\:rounded-e-lg{border-end-end-radius:.5rem;border-start-end-radius:.5rem}.group:hover .group-hover\:text-gray-500,.group\/button:hover .group-hover\/button\:text-gray-500{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.group:hover .group-hover\:text-gray-700{--tw-text-opacity:1;color:rgba(var(--gray-700),var(--tw-text-opacity,1))}.group\/item:hover .group-hover\/item\:underline,.group\/link:hover .group-hover\/link\:underline{text-decoration-line:underline}.group:focus-visible .group-focus-visible\:text-gray-500{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.group:focus-visible .group-focus-visible\:text-gray-700{--tw-text-opacity:1;color:rgba(var(--gray-700),var(--tw-text-opacity,1))}.group\/item:focus-visible .group-focus-visible\/item\:underline{text-decoration-line:underline}.group\/link:focus-visible .group-focus-visible\/link\:underline{text-decoration-line:underline}.dark\:flex:is(.dark *){display:flex}.dark\:hidden:is(.dark *){display:none}.dark\:divide-white\/10:is(.dark *)>:not([hidden])~:not([hidden]){border-color:hsla(0,0%,100%,.1)}.dark\:divide-white\/5:is(.dark *)>:not([hidden])~:not([hidden]){border-color:hsla(0,0%,100%,.05)}.dark\:border-gray-600:is(.dark *){--tw-border-opacity:1;border-color:rgba(var(--gray-600),var(--tw-border-opacity,1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity:1;border-color:rgba(var(--gray-700),var(--tw-border-opacity,1))}.dark\:border-primary-500:is(.dark *){--tw-border-opacity:1;border-color:rgba(var(--primary-500),var(--tw-border-opacity,1))}.dark\:border-white\/10:is(.dark *){border-color:hsla(0,0%,100%,.1)}.dark\:border-white\/5:is(.dark *){border-color:hsla(0,0%,100%,.05)}.dark\:border-t-white\/10:is(.dark *){border-top-color:hsla(0,0%,100%,.1)}.dark\:\!bg-gray-700:is(.dark *){--tw-bg-opacity:1!important;background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1))!important}.dark\:bg-custom-400\/10:is(.dark *){background-color:rgba(var(--c-400),.1)}.dark\:bg-custom-500:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--c-500),var(--tw-bg-opacity,1))}.dark\:bg-custom-500\/20:is(.dark *){background-color:rgba(var(--c-500),.2)}.dark\:bg-gray-400\/10:is(.dark *){background-color:rgba(var(--gray-400),.1)}.dark\:bg-gray-500:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-500),var(--tw-bg-opacity,1))}.dark\:bg-gray-500\/20:is(.dark *){background-color:rgba(var(--gray-500),.2)}.dark\:bg-gray-600:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-600),var(--tw-bg-opacity,1))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-800),var(--tw-bg-opacity,1))}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-900),var(--tw-bg-opacity,1))}.dark\:bg-gray-900\/30:is(.dark *){background-color:rgba(var(--gray-900),.3)}.dark\:bg-gray-950:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-950),var(--tw-bg-opacity,1))}.dark\:bg-gray-950\/75:is(.dark *){background-color:rgba(var(--gray-950),.75)}.dark\:bg-primary-400:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--primary-400),var(--tw-bg-opacity,1))}.dark\:bg-primary-500:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--primary-500),var(--tw-bg-opacity,1))}.dark\:bg-transparent:is(.dark *){background-color:transparent}.dark\:bg-white\/10:is(.dark *){background-color:hsla(0,0%,100%,.1)}.dark\:bg-white\/5:is(.dark *){background-color:hsla(0,0%,100%,.05)}.dark\:text-custom-300\/50:is(.dark *){color:rgba(var(--c-300),.5)}.dark\:text-custom-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--c-400),var(--tw-text-opacity,1))}.dark\:text-custom-400\/10:is(.dark *){color:rgba(var(--c-400),.1)}.dark\:text-danger-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--danger-400),var(--tw-text-opacity,1))}.dark\:text-danger-500:is(.dark *){--tw-text-opacity:1;color:rgba(var(--danger-500),var(--tw-text-opacity,1))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-200),var(--tw-text-opacity,1))}.dark\:text-gray-300\/50:is(.dark *){color:rgba(var(--gray-300),.5)}.dark\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.dark\:text-gray-500:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.dark\:text-gray-700:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-700),var(--tw-text-opacity,1))}.dark\:text-gray-800:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-800),var(--tw-text-opacity,1))}.dark\:text-primary-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--primary-400),var(--tw-text-opacity,1))}.dark\:text-primary-500:is(.dark *){--tw-text-opacity:1;color:rgba(var(--primary-500),var(--tw-text-opacity,1))}.dark\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\:text-white\/5:is(.dark *){color:hsla(0,0%,100%,.05)}.dark\:ring-custom-400\/30:is(.dark *){--tw-ring-color:rgba(var(--c-400),0.3)}.dark\:ring-custom-500:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--c-500),var(--tw-ring-opacity,1))}.dark\:ring-danger-500:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-500),var(--tw-ring-opacity,1))}.dark\:ring-gray-400\/20:is(.dark *){--tw-ring-color:rgba(var(--gray-400),0.2)}.dark\:ring-gray-50\/10:is(.dark *){--tw-ring-color:rgba(var(--gray-50),0.1)}.dark\:ring-gray-700:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-700),var(--tw-ring-opacity,1))}.dark\:ring-gray-900:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-900),var(--tw-ring-opacity,1))}.dark\:ring-white\/10:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.1)}.dark\:ring-white\/20:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.2)}.dark\:placeholder\:text-gray-500:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.dark\:placeholder\:text-gray-500:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.dark\:before\:bg-primary-500:is(.dark *):before{--tw-bg-opacity:1;background-color:rgba(var(--primary-500),var(--tw-bg-opacity,1));content:var(--tw-content)}.dark\:checked\:bg-danger-500:checked:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--danger-500),var(--tw-bg-opacity,1))}.dark\:checked\:bg-primary-500:checked:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--primary-500),var(--tw-bg-opacity,1))}.dark\:focus-within\:bg-white\/5:focus-within:is(.dark *){background-color:hsla(0,0%,100%,.05)}.dark\:hover\:bg-custom-400:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--c-400),var(--tw-bg-opacity,1))}.dark\:hover\:bg-custom-400\/10:hover:is(.dark *){background-color:rgba(var(--c-400),.1)}.dark\:hover\:bg-white\/10:hover:is(.dark *){background-color:hsla(0,0%,100%,.1)}.dark\:hover\:bg-white\/5:hover:is(.dark *){background-color:hsla(0,0%,100%,.05)}.dark\:hover\:text-custom-300:hover:is(.dark *){--tw-text-opacity:1;color:rgba(var(--c-300),var(--tw-text-opacity,1))}.dark\:hover\:text-custom-300\/75:hover:is(.dark *){color:rgba(var(--c-300),.75)}.dark\:hover\:text-gray-200:hover:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-200),var(--tw-text-opacity,1))}.dark\:hover\:text-gray-300\/75:hover:is(.dark *){color:rgba(var(--gray-300),.75)}.dark\:hover\:text-gray-400:hover:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.dark\:hover\:ring-white\/20:hover:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.2)}.dark\:focus\:ring-danger-500:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-500),var(--tw-ring-opacity,1))}.dark\:focus\:ring-primary-500:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-500),var(--tw-ring-opacity,1))}.dark\:checked\:focus\:ring-danger-400\/50:focus:checked:is(.dark *){--tw-ring-color:rgba(var(--danger-400),0.5)}.dark\:checked\:focus\:ring-primary-400\/50:focus:checked:is(.dark *){--tw-ring-color:rgba(var(--primary-400),0.5)}.dark\:focus-visible\:border-primary-500:focus-visible:is(.dark *){--tw-border-opacity:1;border-color:rgba(var(--primary-500),var(--tw-border-opacity,1))}.dark\:focus-visible\:bg-custom-400\/10:focus-visible:is(.dark *){background-color:rgba(var(--c-400),.1)}.dark\:focus-visible\:bg-white\/5:focus-visible:is(.dark *){background-color:hsla(0,0%,100%,.05)}.dark\:focus-visible\:text-custom-300\/75:focus-visible:is(.dark *){color:rgba(var(--c-300),.75)}.dark\:focus-visible\:text-gray-300\/75:focus-visible:is(.dark *){color:rgba(var(--gray-300),.75)}.dark\:focus-visible\:text-gray-400:focus-visible:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.dark\:focus-visible\:ring-custom-400\/50:focus-visible:is(.dark *){--tw-ring-color:rgba(var(--c-400),0.5)}.dark\:focus-visible\:ring-custom-500:focus-visible:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--c-500),var(--tw-ring-opacity,1))}.dark\:focus-visible\:ring-primary-500:focus-visible:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-500),var(--tw-ring-opacity,1))}.dark\:focus-visible\:ring-offset-gray-900:focus-visible:is(.dark *){--tw-ring-offset-color:rgba(var(--gray-900),1)}.dark\:disabled\:bg-transparent:disabled:is(.dark *){background-color:transparent}.dark\:disabled\:text-gray-400:disabled:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.dark\:disabled\:ring-white\/10:disabled:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.1)}.dark\:disabled\:\[-webkit-text-fill-color\:theme\(colors\.gray\.400\)\]:disabled:is(.dark *){-webkit-text-fill-color:rgba(var(--gray-400),1)}.dark\:disabled\:placeholder\:\[-webkit-text-fill-color\:theme\(colors\.gray\.500\)\]:disabled:is(.dark *)::-moz-placeholder{-webkit-text-fill-color:rgba(var(--gray-500),1)}.dark\:disabled\:placeholder\:\[-webkit-text-fill-color\:theme\(colors\.gray\.500\)\]:disabled:is(.dark *)::placeholder{-webkit-text-fill-color:rgba(var(--gray-500),1)}.dark\:disabled\:checked\:bg-gray-600:checked:disabled:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-600),var(--tw-bg-opacity,1))}.group\/button:hover .dark\:group-hover\/button\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.group:hover .dark\:group-hover\:text-gray-200:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-200),var(--tw-text-opacity,1))}.group:hover .dark\:group-hover\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.group:focus-visible .dark\:group-focus-visible\:text-gray-200:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-200),var(--tw-text-opacity,1))}.group:focus-visible .dark\:group-focus-visible\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}@media (min-width:640px){.sm\:relative{position:relative}.sm\:inset-x-auto{left:auto;right:auto}.sm\:end-0{inset-inline-end:0}.sm\:col-\[--col-span-sm\]{grid-column:var(--col-span-sm)}.sm\:col-span-2{grid-column:span 2/span 2}.sm\:col-start-\[--col-start-sm\]{grid-column-start:var(--col-start-sm)}.sm\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\:-my-2{margin-bottom:-.5rem;margin-top:-.5rem}.sm\:ms-auto{margin-inline-start:auto}.sm\:mt-7{margin-top:1.75rem}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:table-cell{display:table-cell}.sm\:grid{display:grid}.sm\:inline-grid{display:inline-grid}.sm\:hidden{display:none}.sm\:w-\[calc\(100\%\+3rem\)\]{width:calc(100% + 3rem)}.sm\:w-screen{width:100vw}.sm\:max-w-sm{max-width:24rem}.sm\:columns-\[--cols-sm\]{-moz-columns:var(--cols-sm);columns:var(--cols-sm)}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-\[--cols-sm\]{grid-template-columns:var(--cols-sm)}.sm\:grid-cols-\[repeat\(auto-fit\2c minmax\(0\2c 1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(0,1fr))}.sm\:grid-rows-\[1fr_auto_3fr\]{grid-template-rows:1fr auto 3fr}.sm\:flex-row{flex-direction:row}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-start{align-items:flex-start}.sm\:items-end{align-items:flex-end}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-1{gap:.25rem}.sm\:gap-3{gap:.75rem}.sm\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.sm\:rounded-xl{border-radius:.75rem}.sm\:p-10{padding:2.5rem}.sm\:px-12{padding-left:3rem;padding-right:3rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.sm\:pe-3{padding-inline-end:.75rem}.sm\:pe-6{padding-inline-end:1.5rem}.sm\:ps-3{padding-inline-start:.75rem}.sm\:ps-6{padding-inline-start:1.5rem}.sm\:pt-1\.5{padding-top:.375rem}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:leading-6{line-height:1.5rem}.sm\:first-of-type\:ps-3:first-of-type{padding-inline-start:.75rem}.sm\:first-of-type\:ps-6:first-of-type{padding-inline-start:1.5rem}.sm\:last-of-type\:pe-3:last-of-type{padding-inline-end:.75rem}.sm\:last-of-type\:pe-6:last-of-type{padding-inline-end:1.5rem}}@media (min-width:768px){.md\:bottom-4{bottom:1rem}.md\:order-first{order:-9999}.md\:col-\[--col-span-md\]{grid-column:var(--col-span-md)}.md\:col-span-2{grid-column:span 2/span 2}.md\:col-start-\[--col-start-md\]{grid-column-start:var(--col-start-md)}.md\:block{display:block}.md\:flex{display:flex}.md\:table-cell{display:table-cell}.md\:inline-grid{display:inline-grid}.md\:hidden{display:none}.md\:w-max{width:-moz-max-content;width:max-content}.md\:max-w-60{max-width:15rem}.md\:columns-\[--cols-md\]{-moz-columns:var(--cols-md);columns:var(--cols-md)}.md\:grid-flow-col{grid-auto-flow:column}.md\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-\[--cols-md\]{grid-template-columns:var(--cols-md)}.md\:flex-row{flex-direction:row}.md\:items-start{align-items:flex-start}.md\:items-end{align-items:flex-end}.md\:items-center{align-items:center}.md\:justify-end{justify-content:flex-end}.md\:gap-1{gap:.25rem}.md\:gap-3{gap:.75rem}.md\:divide-y-0>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(0px*var(--tw-divide-y-reverse));border-top-width:calc(0px*(1 - var(--tw-divide-y-reverse)))}.md\:overflow-x-auto{overflow-x:auto}.md\:rounded-xl{border-radius:.75rem}.md\:p-20{padding:5rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:pe-6{padding-inline-end:1.5rem}.md\:ps-3{padding-inline-start:.75rem}}@media (min-width:1024px){.lg\:sticky{position:sticky}.lg\:z-0{z-index:0}.lg\:col-\[--col-span-lg\]{grid-column:var(--col-span-lg)}.lg\:col-start-\[--col-start-lg\]{grid-column-start:var(--col-start-lg)}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:table-cell{display:table-cell}.lg\:inline-grid{display:inline-grid}.lg\:hidden{display:none}.lg\:h-full{height:100%}.lg\:max-w-xs{max-width:20rem}.lg\:-translate-x-full{--tw-translate-x:-100%}.lg\:-translate-x-full,.lg\:translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\:translate-x-0{--tw-translate-x:0px}.lg\:columns-\[--cols-lg\]{-moz-columns:var(--cols-lg);columns:var(--cols-lg)}.lg\:grid-cols-\[--cols-lg\]{grid-template-columns:var(--cols-lg)}.lg\:flex-row{flex-direction:row}.lg\:items-start{align-items:flex-start}.lg\:items-end{align-items:flex-end}.lg\:items-center{align-items:center}.lg\:gap-1{gap:.25rem}.lg\:gap-3{gap:.75rem}.lg\:bg-transparent{background-color:transparent}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pe-8{padding-inline-end:2rem}.lg\:shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.lg\:shadow-none,.lg\:shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.lg\:shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.lg\:ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.lg\:transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.lg\:transition-none{transition-property:none}.lg\:delay-100{transition-delay:.1s}.dark\:lg\:bg-transparent:is(.dark *){background-color:transparent}}@media (min-width:1280px){.xl\:col-\[--col-span-xl\]{grid-column:var(--col-span-xl)}.xl\:col-start-\[--col-start-xl\]{grid-column-start:var(--col-start-xl)}.xl\:block{display:block}.xl\:table-cell{display:table-cell}.xl\:inline-grid{display:inline-grid}.xl\:hidden{display:none}.xl\:columns-\[--cols-xl\]{-moz-columns:var(--cols-xl);columns:var(--cols-xl)}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-\[--cols-xl\]{grid-template-columns:var(--cols-xl)}.xl\:flex-row{flex-direction:row}.xl\:items-start{align-items:flex-start}.xl\:items-end{align-items:flex-end}.xl\:items-center{align-items:center}.xl\:gap-1{gap:.25rem}.xl\:gap-3{gap:.75rem}}@media (min-width:1536px){.\32xl\:col-\[--col-span-2xl\]{grid-column:var(--col-span-2xl)}.\32xl\:col-start-\[--col-start-2xl\]{grid-column-start:var(--col-start-2xl)}.\32xl\:block{display:block}.\32xl\:table-cell{display:table-cell}.\32xl\:inline-grid{display:inline-grid}.\32xl\:hidden{display:none}.\32xl\:columns-\[--cols-2xl\]{-moz-columns:var(--cols-2xl);columns:var(--cols-2xl)}.\32xl\:grid-cols-\[--cols-2xl\]{grid-template-columns:var(--cols-2xl)}.\32xl\:flex-row{flex-direction:row}.\32xl\:items-start{align-items:flex-start}.\32xl\:items-end{align-items:flex-end}.\32xl\:items-center{align-items:center}.\32xl\:gap-1{gap:.25rem}.\32xl\:gap-3{gap:.75rem}}.ltr\:hidden:where([dir=ltr],[dir=ltr] *){display:none}.rtl\:hidden:where([dir=rtl],[dir=rtl] *){display:none}.rtl\:-translate-x-0:where([dir=rtl],[dir=rtl] *){--tw-translate-x:-0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:-translate-x-5:where([dir=rtl],[dir=rtl] *){--tw-translate-x:-1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:-translate-x-full:where([dir=rtl],[dir=rtl] *){--tw-translate-x:-100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:translate-x-1\/2:where([dir=rtl],[dir=rtl] *){--tw-translate-x:50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:translate-x-1\/4:where([dir=rtl],[dir=rtl] *){--tw-translate-x:25%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:translate-x-full:where([dir=rtl],[dir=rtl] *){--tw-translate-x:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:rotate-180:where([dir=rtl],[dir=rtl] *){--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:flex-row-reverse:where([dir=rtl],[dir=rtl] *){flex-direction:row-reverse}.rtl\:divide-x-reverse:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:1}@media (min-width:1024px){.rtl\:lg\:-translate-x-0:where([dir=rtl],[dir=rtl] *){--tw-translate-x:-0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\:lg\:translate-x-full:where([dir=rtl],[dir=rtl] *){--tw-translate-x:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}}.\[\&\.trix-active\]\:bg-gray-50.trix-active{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.\[\&\.trix-active\]\:text-primary-600.trix-active{--tw-text-opacity:1;color:rgba(var(--primary-600),var(--tw-text-opacity,1))}.dark\:\[\&\.trix-active\]\:bg-white\/5.trix-active:is(.dark *){background-color:hsla(0,0%,100%,.05)}.dark\:\[\&\.trix-active\]\:text-primary-400.trix-active:is(.dark *){--tw-text-opacity:1;color:rgba(var(--primary-400),var(--tw-text-opacity,1))}.\[\&\:\:-ms-reveal\]\:hidden::-ms-reveal{display:none}.\[\&\:not\(\:first-of-type\)\]\:border-s:not(:first-of-type){border-inline-start-width:1px}.\[\&\:not\(\:has\(\.fi-ac-action\:focus\)\)\]\:focus-within\:ring-2:focus-within:not(:has(.fi-ac-action:focus)){--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.\[\&\:not\(\:has\(\.fi-ac-action\:focus\)\)\]\:focus-within\:ring-danger-600:focus-within:not(:has(.fi-ac-action:focus)){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-600),var(--tw-ring-opacity,1))}.\[\&\:not\(\:has\(\.fi-ac-action\:focus\)\)\]\:focus-within\:ring-primary-600:focus-within:not(:has(.fi-ac-action:focus)){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-600),var(--tw-ring-opacity,1))}.dark\:\[\&\:not\(\:has\(\.fi-ac-action\:focus\)\)\]\:focus-within\:ring-danger-500:focus-within:not(:has(.fi-ac-action:focus)):is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--danger-500),var(--tw-ring-opacity,1))}.dark\:\[\&\:not\(\:has\(\.fi-ac-action\:focus\)\)\]\:focus-within\:ring-primary-500:focus-within:not(:has(.fi-ac-action:focus)):is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-500),var(--tw-ring-opacity,1))}.\[\&\:not\(\:last-of-type\)\]\:border-e:not(:last-of-type){border-inline-end-width:1px}.\[\&\:not\(\:nth-child\(1_of_\.fi-btn\)\)\]\:shadow-\[-1px_0_0_0_theme\(colors\.gray\.200\)\]:not(:nth-child(1 of .fi-btn)){--tw-shadow:-1px 0 0 0 rgba(var(--gray-200),1);--tw-shadow-colored:-1px 0 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.dark\:\[\&\:not\(\:nth-child\(1_of_\.fi-btn\)\)\]\:shadow-\[-1px_0_0_0_theme\(colors\.white\/20\%\)\]:not(:nth-child(1 of .fi-btn)):is(.dark *){--tw-shadow:-1px 0 0 0 hsla(0,0%,100%,.2);--tw-shadow-colored:-1px 0 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.\[\&\:not\(\:nth-last-child\(1_of_\.fi-btn\)\)\]\:me-px:not(:nth-last-child(1 of .fi-btn)){margin-inline-end:1px}.\[\&\:nth-child\(1_of_\.fi-btn\)\]\:rounded-s-lg:nth-child(1 of .fi-btn){border-end-start-radius:.5rem;border-start-start-radius:.5rem}.\[\&\:nth-last-child\(1_of_\.fi-btn\)\]\:rounded-e-lg:nth-last-child(1 of .fi-btn){border-end-end-radius:.5rem;border-start-end-radius:.5rem}.\[\&\>\*\:first-child\]\:relative>:first-child{position:relative}.\[\&\>\*\:first-child\]\:mt-0>:first-child{margin-top:0}.\[\&\>\*\:first-child\]\:before\:absolute>:first-child:before{content:var(--tw-content);position:absolute}.\[\&\>\*\:first-child\]\:before\:inset-y-0>:first-child:before{bottom:0;content:var(--tw-content);top:0}.\[\&\>\*\:first-child\]\:before\:start-0>:first-child:before{content:var(--tw-content);inset-inline-start:0}.\[\&\>\*\:first-child\]\:before\:w-0\.5>:first-child:before{content:var(--tw-content);width:.125rem}.\[\&\>\*\:first-child\]\:before\:bg-primary-600>:first-child:before{--tw-bg-opacity:1;background-color:rgba(var(--primary-600),var(--tw-bg-opacity,1));content:var(--tw-content)}.\[\&\>\*\:first-child\]\:dark\:before\:bg-primary-500:is(.dark *)>:first-child:before{--tw-bg-opacity:1;background-color:rgba(var(--primary-500),var(--tw-bg-opacity,1));content:var(--tw-content)}.\[\&\>\*\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&_\.choices\\_\\_inner\]\:ps-0 .choices__inner{padding-inline-start:0}.\[\&_\.fi-badge-delete-button\]\:hidden .fi-badge-delete-button{display:none}.\[\&_\.filepond--root\]\:font-sans .filepond--root{font-family:var(--font-family),ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}.\[\&_optgroup\]\:bg-white optgroup{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.\[\&_optgroup\]\:dark\:bg-gray-900:is(.dark *) optgroup{--tw-bg-opacity:1;background-color:rgba(var(--gray-900),var(--tw-bg-opacity,1))}.\[\&_option\]\:bg-white option{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.\[\&_option\]\:dark\:bg-gray-900:is(.dark *) option{--tw-bg-opacity:1;background-color:rgba(var(--gray-900),var(--tw-bg-opacity,1))}:checked+*>.\[\:checked\+\*\>\&\]\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}@media(hover:hover){.\[\@media\(hover\:hover\)\]\:transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.\[\@media\(hover\:hover\)\]\:duration-75{transition-duration:75ms}}input:checked+.\[input\:checked\+\&\]\:bg-custom-600{--tw-bg-opacity:1;background-color:rgba(var(--c-600),var(--tw-bg-opacity,1))}input:checked+.\[input\:checked\+\&\]\:bg-gray-400{--tw-bg-opacity:1;background-color:rgba(var(--gray-400),var(--tw-bg-opacity,1))}input:checked+.\[input\:checked\+\&\]\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}input:checked+.\[input\:checked\+\&\]\:ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}input:checked+.\[input\:checked\+\&\]\:hover\:bg-custom-500:hover{--tw-bg-opacity:1;background-color:rgba(var(--c-500),var(--tw-bg-opacity,1))}input:checked+.\[input\:checked\+\&\]\:hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgba(var(--gray-300),var(--tw-bg-opacity,1))}input:checked+.dark\:\[input\:checked\+\&\]\:bg-custom-500:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--c-500),var(--tw-bg-opacity,1))}input:checked+.dark\:\[input\:checked\+\&\]\:bg-gray-600:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-600),var(--tw-bg-opacity,1))}input:checked+.dark\:\[input\:checked\+\&\]\:hover\:bg-custom-400:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--c-400),var(--tw-bg-opacity,1))}input:checked+.dark\:\[input\:checked\+\&\]\:hover\:bg-gray-500:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-500),var(--tw-bg-opacity,1))}input:checked:focus-visible+.\[input\:checked\:focus-visible\+\&\]\:ring-custom-500\/50{--tw-ring-color:rgba(var(--c-500),0.5)}input:checked:focus-visible+.dark\:\[input\:checked\:focus-visible\+\&\]\:ring-custom-400\/50:is(.dark *){--tw-ring-color:rgba(var(--c-400),0.5)}input:focus-visible+.\[input\:focus-visible\+\&\]\:z-10{z-index:10}input:focus-visible+.\[input\:focus-visible\+\&\]\:ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}input:focus-visible+.\[input\:focus-visible\+\&\]\:ring-gray-950\/10{--tw-ring-color:rgba(var(--gray-950),0.1)}input:focus-visible+.dark\:\[input\:focus-visible\+\&\]\:ring-white\/20:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.2)} \ No newline at end of file diff --git a/public/css/filament/forms/forms.css b/public/css/filament/forms/forms.css new file mode 100644 index 000000000..c3ec78f92 --- /dev/null +++ b/public/css/filament/forms/forms.css @@ -0,0 +1,49 @@ +input::-webkit-datetime-edit{display:block;padding:0}.cropper-container{-webkit-touch-callout:none;direction:ltr;font-size:0;line-height:0;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.cropper-container img{backface-visibility:hidden;display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{inset:0;position:absolute}.cropper-canvas,.cropper-wrap-box{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:#3399ffbf;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:33.33333%;left:0;top:33.33333%;width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:33.33333%;top:0;width:33.33333%}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:after,.cropper-center:before{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width:768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width:992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width:1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}.filepond--assistant{clip:rect(1px,1px,1px,1px);border:0;clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.filepond--browser.filepond--browser{font-size:0;left:1em;margin:0;opacity:0;padding:0;position:absolute;top:1.75em;width:calc(100% - 2em)}.filepond--data{border:none;contain:strict;height:0;margin:0;padding:0;visibility:hidden;width:0}.filepond--data,.filepond--drip{pointer-events:none;position:absolute}.filepond--drip{background:#00000003;border-radius:.5em;inset:0;opacity:.1;overflow:hidden}.filepond--drip-blob{background:#292625;border-radius:50%;height:8em;margin-left:-4em;margin-top:-4em;transform-origin:center center;width:8em}.filepond--drip-blob,.filepond--drop-label{left:0;position:absolute;top:0;will-change:transform,opacity}.filepond--drop-label{align-items:center;color:#4f4f4f;display:flex;height:0;justify-content:center;margin:0;right:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.filepond--drop-label.filepond--drop-label label{display:block;margin:0;padding:.5em}.filepond--drop-label label{cursor:default;font-size:.875em;font-weight:400;line-height:1.5;text-align:center}.filepond--label-action{-webkit-text-decoration-skip:ink;cursor:pointer;text-decoration:underline;text-decoration-color:#a7a4a4;text-decoration-skip-ink:auto}.filepond--root[data-disabled] .filepond--drop-label label{opacity:.5}.filepond--file-action-button.filepond--file-action-button{border:none;font-family:inherit;font-size:1em;height:1.625em;line-height:inherit;margin:0;outline:none;padding:0;width:1.625em;will-change:transform,opacity}.filepond--file-action-button.filepond--file-action-button span{clip:rect(1px,1px,1px,1px);border:0;clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.filepond--file-action-button.filepond--file-action-button svg{height:100%;width:100%}.filepond--file-action-button.filepond--file-action-button:after{content:"";inset:-.75em;position:absolute}.filepond--file-action-button{background-color:#00000080;background-image:none;border-radius:50%;box-shadow:0 0 #fff0;color:#fff;cursor:auto;transition:box-shadow .25s ease-in}.filepond--file-action-button:focus,.filepond--file-action-button:hover{box-shadow:0 0 0 .125em #ffffffe6}.filepond--file-action-button[disabled]{background-color:#00000040;color:#ffffff80}.filepond--file-action-button[hidden]{display:none}.filepond--file-info{align-items:flex-start;display:flex;flex:1;flex-direction:column;margin:0 .5em 0 0;min-width:0;pointer-events:none;position:static;-webkit-user-select:none;-moz-user-select:none;user-select:none;will-change:transform,opacity}.filepond--file-info *{margin:0}.filepond--file-info .filepond--file-info-main{font-size:.75em;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.filepond--file-info .filepond--file-info-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out;white-space:nowrap}.filepond--file-info .filepond--file-info-sub:empty{display:none}.filepond--file-status{align-items:flex-end;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;margin:0;min-width:2.25em;pointer-events:none;position:static;text-align:right;-webkit-user-select:none;-moz-user-select:none;user-select:none;will-change:transform,opacity}.filepond--file-status *{margin:0;white-space:nowrap}.filepond--file-status .filepond--file-status-main{font-size:.75em;line-height:1.2}.filepond--file-status .filepond--file-status-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out}.filepond--file-wrapper.filepond--file-wrapper{border:none;height:100%;margin:0;min-width:0;padding:0}.filepond--file-wrapper.filepond--file-wrapper>legend{clip:rect(1px,1px,1px,1px);border:0;clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.filepond--file{align-items:flex-start;border-radius:.5em;color:#fff;display:flex;height:100%;padding:.5625em;position:static}.filepond--file .filepond--file-status{margin-left:auto;margin-right:2.25em}.filepond--file .filepond--processing-complete-indicator{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:3}.filepond--file .filepond--file-action-button,.filepond--file .filepond--processing-complete-indicator,.filepond--file .filepond--progress-indicator{position:absolute}.filepond--file [data-align*=left]{left:.5625em}.filepond--file [data-align*=right]{right:.5625em}.filepond--file [data-align*=center]{left:calc(50% - .8125em)}.filepond--file [data-align*=bottom]{bottom:1.125em}.filepond--file [data-align=center]{top:calc(50% - .8125em)}.filepond--file .filepond--progress-indicator{margin-top:.1875em}.filepond--file .filepond--progress-indicator[data-align*=right]{margin-right:.1875em}.filepond--file .filepond--progress-indicator[data-align*=left]{margin-left:.1875em}[data-filepond-item-state*=error] .filepond--file-info,[data-filepond-item-state*=invalid] .filepond--file-info,[data-filepond-item-state=cancelled] .filepond--file-info{margin-right:2.25em}[data-filepond-item-state~=processing] .filepond--file-status-sub{opacity:0}[data-filepond-item-state~=processing] .filepond--action-abort-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-error] .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-error] .filepond--action-retry-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing svg{animation:fall .5s linear .125s both}[data-filepond-item-state=processing-complete] .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--file-info-sub,[data-filepond-item-state=processing-complete] .filepond--processing-complete-indicator:not([style*=hidden])~.filepond--file-status .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing~.filepond--file-info .filepond--file-info-sub{opacity:.5}[data-filepond-item-state*=error] .filepond--file-wrapper,[data-filepond-item-state*=error] .filepond--panel,[data-filepond-item-state*=invalid] .filepond--file-wrapper,[data-filepond-item-state*=invalid] .filepond--panel{animation:shake .65s linear both}[data-filepond-item-state*=busy] .filepond--progress-indicator svg{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes shake{10%,90%{transform:translate(-.0625em)}20%,80%{transform:translate(.125em)}30%,50%,70%{transform:translate(-.25em)}40%,60%{transform:translate(.25em)}}@keyframes fall{0%{animation-timing-function:ease-out;opacity:0;transform:scale(.5)}70%{animation-timing-function:ease-in-out;opacity:1;transform:scale(1.1)}to{animation-timing-function:ease-out;transform:scale(1)}}.filepond--hopper[data-hopper-state=drag-over]>*{pointer-events:none}.filepond--hopper[data-hopper-state=drag-over]:after{content:"";inset:0;position:absolute;z-index:100}.filepond--progress-indicator{z-index:103}.filepond--file-action-button{z-index:102}.filepond--file-status{z-index:101}.filepond--file-info{z-index:100}.filepond--item{left:0;margin:.25em;padding:0;position:absolute;right:0;top:0;touch-action:auto;will-change:transform,opacity;z-index:1}.filepond--item>.filepond--panel{z-index:-1}.filepond--item>.filepond--panel .filepond--panel-bottom{box-shadow:0 .0625em .125em -.0625em #00000040}.filepond--item>.filepond--file-wrapper,.filepond--item>.filepond--panel{transition:opacity .15s ease-out}.filepond--item[data-drag-state]{cursor:grab}.filepond--item[data-drag-state]>.filepond--panel{box-shadow:0 0 0 transparent;transition:box-shadow .125s ease-in-out}.filepond--item[data-drag-state=drag]{cursor:grabbing}.filepond--item[data-drag-state=drag]>.filepond--panel{box-shadow:0 .125em .3125em #00000053}.filepond--item[data-drag-state]:not([data-drag-state=idle]){z-index:2}.filepond--item-panel{background-color:#64605e}[data-filepond-item-state=processing-complete] .filepond--item-panel{background-color:#369763}[data-filepond-item-state*=error] .filepond--item-panel,[data-filepond-item-state*=invalid] .filepond--item-panel{background-color:#c44e47}.filepond--item-panel{border-radius:.5em;transition:background-color .25s}.filepond--list-scroller{left:0;margin:0;position:absolute;right:0;top:0;will-change:transform}.filepond--list-scroller[data-state=overflow] .filepond--list{bottom:0;right:0}.filepond--list-scroller[data-state=overflow]{-webkit-overflow-scrolling:touch;-webkit-mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent);mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent);overflow-x:hidden;overflow-y:scroll}.filepond--list-scroller::-webkit-scrollbar{background:transparent}.filepond--list-scroller::-webkit-scrollbar:vertical{width:1em}.filepond--list-scroller::-webkit-scrollbar:horizontal{height:0}.filepond--list-scroller::-webkit-scrollbar-thumb{background-clip:content-box;background-color:#0000004d;border:.3125em solid transparent;border-radius:99999px}.filepond--list.filepond--list{list-style-type:none;margin:0;padding:0;position:absolute;top:0;will-change:transform}.filepond--list{left:.75em;right:.75em}.filepond--root[data-style-panel-layout~=integrated]{height:100%;margin:0;max-width:none;width:100%}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root{border-radius:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root>*,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{align-items:center;bottom:0;display:flex;height:auto;justify-content:center;z-index:7}.filepond--root[data-style-panel-layout~=circle] .filepond--item-panel,.filepond--root[data-style-panel-layout~=integrated] .filepond--item-panel{display:none}.filepond--root[data-style-panel-layout~=compact] .filepond--list-scroller,.filepond--root[data-style-panel-layout~=integrated] .filepond--list-scroller{height:100%;margin-bottom:0;margin-top:0;overflow:hidden}.filepond--root[data-style-panel-layout~=compact] .filepond--list,.filepond--root[data-style-panel-layout~=integrated] .filepond--list{height:100%;left:0;right:0}.filepond--root[data-style-panel-layout~=compact] .filepond--item,.filepond--root[data-style-panel-layout~=integrated] .filepond--item{margin:0}.filepond--root[data-style-panel-layout~=compact] .filepond--file-wrapper,.filepond--root[data-style-panel-layout~=integrated] .filepond--file-wrapper{height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{z-index:7}.filepond--root[data-style-panel-layout~=circle]{border-radius:99999rem;overflow:hidden}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel{border-radius:inherit}.filepond--root[data-style-panel-layout~=circle] .filepond--file-info,.filepond--root[data-style-panel-layout~=circle] .filepond--file-status,.filepond--root[data-style-panel-layout~=circle]>.filepond--panel>*{display:none}@media not all and (-webkit-min-device-pixel-ratio:0),not all and (min-resolution:.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.filepond--root[data-style-panel-layout~=circle]{will-change:transform}}}.filepond--panel-root{background-color:#f1f0ef;border-radius:.5em}.filepond--panel{height:100%!important;left:0;margin:0;pointer-events:none;position:absolute;right:0;top:0}.filepond-panel:not([data-scalable=false]){height:auto!important}.filepond--panel[data-scalable=false]>div{display:none}.filepond--panel[data-scalable=true]{background-color:transparent!important;border:none!important;transform-style:preserve-3d}.filepond--panel-bottom,.filepond--panel-center,.filepond--panel-top{left:0;margin:0;padding:0;position:absolute;right:0;top:0}.filepond--panel-bottom,.filepond--panel-top{height:.5em}.filepond--panel-top{border-bottom:none!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.filepond--panel-top:after{background-color:inherit;bottom:-1px;content:"";height:2px;left:0;position:absolute;right:0}.filepond--panel-bottom,.filepond--panel-center{backface-visibility:hidden;transform:translate3d(0,.5em,0);transform-origin:left top;will-change:transform}.filepond--panel-bottom{border-top:none!important;border-top-left-radius:0!important;border-top-right-radius:0!important}.filepond--panel-bottom:before{background-color:inherit;content:"";height:2px;left:0;position:absolute;right:0;top:-1px}.filepond--panel-center{border-bottom:none!important;border-radius:0!important;border-top:none!important;height:100px!important}.filepond--panel-center:not([style]){visibility:hidden}.filepond--progress-indicator{color:#fff;height:1.25em;margin:0;pointer-events:none;position:static;width:1.25em;will-change:transform,opacity}.filepond--progress-indicator svg{height:100%;transform-box:fill-box;vertical-align:top;width:100%}.filepond--progress-indicator path{fill:none;stroke:currentColor}.filepond--list-scroller{z-index:6}.filepond--drop-label{z-index:5}.filepond--drip{z-index:3}.filepond--root>.filepond--panel{z-index:2}.filepond--browser{z-index:1}.filepond--root{box-sizing:border-box;contain:layout style size;direction:ltr;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:1rem;font-weight:450;line-height:normal;margin-bottom:1em;position:relative;text-align:left;text-rendering:optimizeLegibility}.filepond--root *{box-sizing:inherit;line-height:inherit}.filepond--root :not(text){font-size:inherit}.filepond--root[data-disabled]{pointer-events:none}.filepond--root[data-disabled] .filepond--list-scroller{pointer-events:all}.filepond--root[data-disabled] .filepond--list{pointer-events:none}.filepond--root .filepond--drop-label{min-height:4.75em}.filepond--root .filepond--list-scroller{margin-bottom:1em;margin-top:1em}.filepond--root .filepond--credits{bottom:-14px;color:inherit;font-size:11px;line-height:.85;opacity:.4;position:absolute;right:0;text-decoration:none;z-index:3}.filepond--root .filepond--credits[style]{bottom:auto;margin-top:14px;top:0}.filepond--action-edit-item.filepond--action-edit-item{height:2em;padding:.1875em;width:2em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=center]{margin-left:-.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=bottom]{margin-bottom:-.1875em}.filepond--action-edit-item-alt{background:transparent;border:none;color:inherit;font-family:inherit;line-height:inherit;margin:0 0 0 .25em;outline:none;padding:0;pointer-events:all;position:absolute}.filepond--action-edit-item-alt svg{height:1.3125em;width:1.3125em}.filepond--action-edit-item-alt span{font-size:0;opacity:0}.filepond--root[data-style-panel-layout~=circle] .filepond--action-edit-item{opacity:1!important;visibility:visible!important}.filepond--image-preview-markup{left:0;position:absolute;top:0}.filepond--image-preview-wrapper{z-index:2}.filepond--image-preview-overlay{display:block;left:0;margin:0;max-height:7rem;min-height:5rem;opacity:0;pointer-events:none;position:absolute;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%;z-index:2}.filepond--image-preview-overlay svg{color:inherit;height:auto;max-height:inherit;width:100%}.filepond--image-preview-overlay-idle{color:#282828d9;mix-blend-mode:multiply}.filepond--image-preview-overlay-success{color:#369763;mix-blend-mode:normal}.filepond--image-preview-overlay-failure{color:#c44e47;mix-blend-mode:normal}@supports (-webkit-marquee-repetition:infinite) and ((-o-object-fit:fill) or (object-fit:fill)){.filepond--image-preview-overlay-idle{mix-blend-mode:normal}}.filepond--image-preview-wrapper{background:#00000003;border-radius:.45em;height:100%;left:0;margin:0;overflow:hidden;position:absolute;right:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.filepond--image-preview{align-items:center;background:#222;display:flex;height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;will-change:transform,opacity;z-index:1}.filepond--image-clip{margin:0 auto;overflow:hidden;position:relative}.filepond--image-clip[data-transparency-indicator=grid] canvas,.filepond--image-clip[data-transparency-indicator=grid] img{background-color:#fff;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' fill='%23eee'%3E%3Cpath d='M0 0h50v50H0M50 50h50v50H50'/%3E%3C/svg%3E");background-size:1.25em 1.25em}.filepond--image-bitmap,.filepond--image-vector{left:0;position:absolute;top:0;will-change:transform}.filepond--root[data-style-panel-layout~=integrated] .filepond--image-preview-wrapper{border-radius:0}.filepond--root[data-style-panel-layout~=integrated] .filepond--image-preview{align-items:center;display:flex;height:100%;justify-content:center}.filepond--root[data-style-panel-layout~=circle] .filepond--image-preview-wrapper{border-radius:99999rem}.filepond--root[data-style-panel-layout~=circle] .filepond--image-preview-overlay{bottom:0;top:auto;transform:scaleY(-1)}.filepond--root[data-style-panel-layout~=circle] .filepond--file .filepond--file-action-button[data-align*=bottom]:not([data-align*=center]){margin-bottom:.325em}.filepond--root[data-style-panel-layout~=circle] .filepond--file [data-align*=left]{left:calc(50% - 3em)}.filepond--root[data-style-panel-layout~=circle] .filepond--file [data-align*=right]{right:calc(50% - 3em)}.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=left],.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=right]{margin-bottom:.5125em}.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=center]{margin-bottom:.1875em;margin-left:.1875em;margin-top:0}.filepond--media-preview audio{display:none}.filepond--media-preview .audioplayer{margin:2.3em auto auto;width:calc(100% - 1.4em)}.filepond--media-preview .playpausebtn{background-position:50%;background-repeat:no-repeat;border:none;border-radius:25px;cursor:pointer;float:left;height:25px;margin-right:.3em;margin-top:.3em;outline:none;width:25px}.filepond--media-preview .playpausebtn:hover{background-color:#00000080}.filepond--media-preview .play{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAyElEQVQ4T9XUsWoCQRRG4XPaFL5SfIy8gKYKBCysrax8Ahs7qzQ2qVIFOwsrsbEWLEK6EBFGBrIQhN2d3dnGgalm+Jh7789Ix8uOPe4YDCH0gZ66atKW0pJDCE/AEngDXtRjCpwCRucbGANzNVTBqWBhfAJDdV+GNgWj8wtM41bPt3AbsDB2f69d/0dzwC0wUDe54A8wAWbqJbfkD+BZPeQO5QsYqYu6LKb0MIb7VT3VYfG8CnwEHtT3FKi4c8e/TZMyk3LYFrwCgMdHFbRDKS8AAAAASUVORK5CYII=)}.filepond--media-preview .pause{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAh0lEQVQ4T+2UsQkCURBE30PLMbAMMResQrAPsQ0TK9AqDKxGZeTLD74aGNwlhzfZssvADDMrPcOe+RggYZIJcG2s2KinMidZAvu6u6uzT8u+JCeZArfmcKUeK+EaONTdQy23bxgJX8aPHvIHsSnVuzTx36rn2pQFsGuqN//ZlK7vbIDvq6vkJ9yteBXzecYbAAAAAElFTkSuQmCC)}.filepond--media-preview .timeline{background:#ffffff4d;border-radius:15px;float:left;height:3px;margin-top:1em;width:calc(100% - 2.5em)}.filepond--media-preview .playhead{background:#fff;border-radius:50%;height:13px;margin-top:-5px;width:13px}.filepond--media-preview-wrapper{background:#00000003;border-radius:.45em;height:100%;left:0;margin:0;overflow:hidden;pointer-events:auto;position:absolute;right:0;top:0}.filepond--media-preview-wrapper:before{background:linear-gradient(180deg,#000,#0000);content:" ";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#000000",endColorstr="#00000000",GradientType=0);height:2em;position:absolute;width:100%;z-index:3}.filepond--media-preview{display:block;height:100%;position:relative;transform-origin:center center;width:100%;will-change:transform,opacity;z-index:1}.filepond--media-preview audio,.filepond--media-preview video{width:100%;will-change:transform}.filepond--root{--tw-bg-opacity:1;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:rgba(var(--gray-950),0.1);background-color:rgb(255 255 255/var(--tw-bg-opacity,1));border-radius:.5rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);margin-bottom:0}.filepond--root:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.2);background-color:hsla(0,0%,100%,.05)}.filepond--root[data-disabled=disabled]{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.filepond--root[data-disabled=disabled]:is(.dark *){--tw-ring-color:hsla(0,0%,100%,.1);background-color:transparent}.filepond--panel-root{background-color:transparent}.filepond--drop-label label{--tw-text-opacity:1;color:rgba(var(--gray-600),var(--tw-text-opacity,1));font-size:.875rem;line-height:1.25rem;padding:.75rem!important}.filepond--drop-label label:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.filepond--label-action{--tw-text-opacity:1;color:rgba(var(--primary-600),var(--tw-text-opacity,1));font-weight:500;text-decoration-line:none;transition-duration:75ms;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.filepond--label-action:hover{--tw-text-opacity:1;color:rgba(var(--primary-500),var(--tw-text-opacity,1))}.filepond--label-action:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.filepond--label-action:hover:is(.dark *){--tw-text-opacity:1;color:rgba(var(--primary-500),var(--tw-text-opacity,1))}.filepond--drip-blob{--tw-bg-opacity:1;background-color:rgba(var(--gray-400),var(--tw-bg-opacity,1))}.filepond--drip-blob:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-500),var(--tw-bg-opacity,1))}.filepond--root[data-style-panel-layout=grid] .filepond--item{display:inline;width:calc(50% - .5rem)}@media (min-width:1024px){.filepond--root[data-style-panel-layout=grid] .filepond--item{width:calc(33.33% - .5rem)}}.filepond--download-icon{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));display:inline-block;height:1rem;margin-inline-end:.25rem;pointer-events:auto;vertical-align:bottom;width:1rem}.filepond--download-icon:hover{background-color:hsla(0,0%,100%,.7)}.filepond--download-icon{-webkit-mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLWRvd25sb2FkIj48cGF0aCBkPSJNMjEgMTV2NGEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMnYtNE03IDEwbDUgNSA1LTVNMTIgMTVWMyIvPjwvc3ZnPg==);mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLWRvd25sb2FkIj48cGF0aCBkPSJNMjEgMTV2NGEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMnYtNE03IDEwbDUgNSA1LTVNMTIgMTVWMyIvPjwvc3ZnPg==);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}.filepond--open-icon{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));display:inline-block;height:1rem;margin-inline-end:.25rem;pointer-events:auto;vertical-align:bottom;width:1rem}.filepond--open-icon:hover{background-color:hsla(0,0%,100%,.7)}.filepond--open-icon{-webkit-mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEwIDZINmEyIDIgMCAwIDAtMiAydjEwYTIgMiAwIDAgMCAyIDJoMTBhMiAyIDAgMCAwIDItMnYtNE0xNCA0aDZtMCAwdjZtMC02TDEwIDE0Ii8+PC9zdmc+);mask-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEwIDZINmEyIDIgMCAwIDAtMiAydjEwYTIgMiAwIDAgMCAyIDJoMTBhMiAyIDAgMCAwIDItMnYtNE0xNCA0aDZtMCAwdjZtMC02TDEwIDE0Ii8+PC9zdmc+);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}.filepond--file-action-button.filepond--action-edit-item{background-color:rgba(0,0,0,.5)}.cropper-drag-box.cropper-crop.cropper-modal{background-color:rgba(var(--gray-100),.5);opacity:1}.cropper-drag-box.cropper-crop.cropper-modal:is(.dark *){background-color:rgba(var(--gray-900),.8)}.fi-fo-file-upload-circle-cropper .cropper-face,.fi-fo-file-upload-circle-cropper .cropper-view-box{border-radius:50%}.CodeMirror{color:#000;direction:ltr;font-family:monospace;height:300px}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{background-color:#f7f7f7;border-right:1px solid #ddd;white-space:nowrap}.CodeMirror-linenumber{color:#999;min-width:20px;padding:0 3px 0 5px;text-align:right;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{background:#7e7;border:0!important;width:auto}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:0 0}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:0 0}.cm-fat-cursor{caret-color:transparent}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{inset:-50px 0 0;overflow:hidden;position:absolute}.CodeMirror-ruler{border-left:1px solid #ccc;bottom:0;position:absolute;top:0}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:#ff96004d}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{background:#fff;overflow:hidden;position:relative}.CodeMirror-scroll{height:100%;margin-bottom:-50px;margin-right:-50px;outline:0;overflow:scroll!important;padding-bottom:50px;position:relative;z-index:0}.CodeMirror-sizer{border-right:50px solid transparent;position:relative}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{display:none;outline:0;position:absolute;z-index:6}.CodeMirror-vscrollbar{overflow-x:hidden;overflow-y:scroll;right:0;top:0}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-x:scroll;overflow-y:hidden}.CodeMirror-scrollbar-filler{bottom:0;right:0}.CodeMirror-gutter-filler{bottom:0;left:0}.CodeMirror-gutters{left:0;min-height:100%;position:absolute;top:0;z-index:3}.CodeMirror-gutter{display:inline-block;height:100%;margin-bottom:-50px;vertical-align:top;white-space:normal}.CodeMirror-gutter-wrapper{background:0 0!important;border:none!important;position:absolute;z-index:4}.CodeMirror-gutter-background{bottom:0;position:absolute;top:0;z-index:4}.CodeMirror-gutter-elt{cursor:default;position:absolute;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{word-wrap:normal;-webkit-tap-highlight-color:transparent;background:0 0;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-variant-ligatures:contextual;line-height:inherit;margin:0;overflow:visible;position:relative;white-space:pre;z-index:2}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{inset:0;position:absolute;z-index:0}.CodeMirror-linewidget{padding:.1px;position:relative;z-index:2}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{box-sizing:content-box}.CodeMirror-measure{height:0;overflow:hidden;position:absolute;visibility:hidden;width:100%}.CodeMirror-cursor{pointer-events:none;position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{position:relative;visibility:hidden;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:#ff06}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:0 0}.EasyMDEContainer{display:block}.CodeMirror-rtl pre{direction:rtl}.EasyMDEContainer.sided--no-fullscreen{display:flex;flex-direction:row;flex-wrap:wrap}.EasyMDEContainer .CodeMirror{word-wrap:break-word;border:1px solid #ced4da;border-bottom-left-radius:4px;border-bottom-right-radius:4px;box-sizing:border-box;font:inherit;height:auto;padding:10px;z-index:0}.EasyMDEContainer .CodeMirror-scroll{cursor:text}.EasyMDEContainer .CodeMirror-fullscreen{background:#fff;border-bottom-right-radius:0!important;border-right:none!important;height:auto;inset:50px 0 0;position:fixed!important;z-index:8}.EasyMDEContainer .CodeMirror-sided{width:50%!important}.EasyMDEContainer.sided--no-fullscreen .CodeMirror-sided{border-bottom-right-radius:0;border-right:none!important;flex:1 1 auto;position:relative}.EasyMDEContainer .CodeMirror-placeholder{opacity:.5}.EasyMDEContainer .CodeMirror-focused .CodeMirror-selected{background:#d9d9d9}.editor-toolbar{border-left:1px solid #ced4da;border-right:1px solid #ced4da;border-top:1px solid #ced4da;border-top-left-radius:4px;border-top-right-radius:4px;padding:9px 10px;position:relative;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none}.editor-toolbar.fullscreen{background:#fff;border:0;box-sizing:border-box;height:50px;left:0;opacity:1;padding-bottom:10px;padding-top:10px;position:fixed;top:0;width:100%;z-index:9}.editor-toolbar.fullscreen:before{background:linear-gradient(90deg,#fff 0,#fff0);height:50px;left:0;margin:0;padding:0;position:fixed;top:0;width:20px}.editor-toolbar.fullscreen:after{background:linear-gradient(90deg,#fff0 0,#fff);height:50px;margin:0;padding:0;position:fixed;right:0;top:0;width:20px}.EasyMDEContainer.sided--no-fullscreen .editor-toolbar{width:100%}.editor-toolbar .easymde-dropdown,.editor-toolbar button{background:0 0;border:1px solid transparent;border-radius:3px;cursor:pointer;display:inline-block;height:30px;margin:0;padding:0;text-align:center;text-decoration:none!important}.editor-toolbar button{font-weight:700;min-width:30px;padding:0 6px;white-space:nowrap}.editor-toolbar button.active,.editor-toolbar button:hover{background:#fcfcfc;border-color:#95a5a6}.editor-toolbar i.separator{border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:transparent;display:inline-block;margin:0 6px;text-indent:-10px;width:0}.editor-toolbar button:after{font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:65%;position:relative;top:2px;vertical-align:text-bottom}.editor-toolbar button.heading-1:after{content:"1"}.editor-toolbar button.heading-2:after{content:"2"}.editor-toolbar button.heading-3:after{content:"3"}.editor-toolbar button.heading-bigger:after{content:"\25b2"}.editor-toolbar button.heading-smaller:after{content:"\25bc"}.editor-toolbar.disabled-for-preview button:not(.no-disable){opacity:.6;pointer-events:none}@media only screen and (max-width:700px){.editor-toolbar i.no-mobile{display:none}}.editor-statusbar{color:#959694;font-size:12px;padding:8px 10px;text-align:right}.EasyMDEContainer.sided--no-fullscreen .editor-statusbar{width:100%}.editor-statusbar span{display:inline-block;margin-left:1em;min-width:4em}.editor-statusbar .lines:before{content:"lines: "}.editor-statusbar .words:before{content:"words: "}.editor-statusbar .characters:before{content:"characters: "}.editor-preview-full{height:100%;left:0;position:absolute;top:0;width:100%;z-index:7}.editor-preview-full,.editor-preview-side{box-sizing:border-box;display:none;overflow:auto}.editor-preview-side{word-wrap:break-word;border:1px solid #ddd;bottom:0;position:fixed;right:0;top:50px;width:50%;z-index:9}.editor-preview-active-side{display:block}.EasyMDEContainer.sided--no-fullscreen .editor-preview-active-side{flex:1 1 auto;height:auto;position:static}.editor-preview-active{display:block}.editor-preview{background:#fafafa;padding:10px}.editor-preview>p{margin-top:0}.editor-preview pre{background:#eee;margin-bottom:10px}.editor-preview table td,.editor-preview table th{border:1px solid #ddd;padding:5px}.cm-s-easymde .cm-tag{color:#63a35c}.cm-s-easymde .cm-attribute{color:#795da3}.cm-s-easymde .cm-string{color:#183691}.cm-s-easymde .cm-header-1{font-size:calc(1.375rem + 1.5vw)}.cm-s-easymde .cm-header-2{font-size:calc(1.325rem + .9vw)}.cm-s-easymde .cm-header-3{font-size:calc(1.3rem + .6vw)}.cm-s-easymde .cm-header-4{font-size:calc(1.275rem + .3vw)}.cm-s-easymde .cm-header-5{font-size:1.25rem}.cm-s-easymde .cm-header-6{font-size:1rem}.cm-s-easymde .cm-header-1,.cm-s-easymde .cm-header-2,.cm-s-easymde .cm-header-3,.cm-s-easymde .cm-header-4,.cm-s-easymde .cm-header-5,.cm-s-easymde .cm-header-6{line-height:1.2;margin-bottom:.5rem}.cm-s-easymde .cm-comment{background:#0000000d;border-radius:2px}.cm-s-easymde .cm-link{color:#7f8c8d}.cm-s-easymde .cm-url{color:#aab2b3}.cm-s-easymde .cm-quote{color:#7f8c8d;font-style:italic}.editor-toolbar .easymde-dropdown{border:1px solid #fff;border-radius:0;position:relative}.editor-toolbar .easymde-dropdown,.editor-toolbar .easymde-dropdown:hover{background:linear-gradient(to bottom right,#fff 0 84%,#333 50% 100%)}.easymde-dropdown-content{background-color:#f9f9f9;box-shadow:0 8px 16px #0003;display:block;padding:8px;position:absolute;top:30px;visibility:hidden;z-index:2}.easymde-dropdown:active .easymde-dropdown-content,.easymde-dropdown:focus .easymde-dropdown-content,.easymde-dropdown:focus-within .easymde-dropdown-content{visibility:visible}.easymde-dropdown-content button{display:block}span[data-img-src]:after{background-image:var(--bg-image);background-repeat:no-repeat;background-size:contain;content:"";display:block;height:0;max-height:100%;max-width:100%;padding-top:var(--height);width:var(--width)}.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:#ff000026}:root{--color-cm-red:#991b1b;--color-cm-orange:#9a3412;--color-cm-amber:#92400e;--color-cm-yellow:#854d0e;--color-cm-lime:#3f6212;--color-cm-green:#166534;--color-cm-emerald:#065f46;--color-cm-teal:#115e59;--color-cm-cyan:#155e75;--color-cm-sky:#075985;--color-cm-blue:#1e40af;--color-cm-indigo:#3730a3;--color-cm-violet:#5b21b6;--color-cm-purple:#6b21a8;--color-cm-fuchsia:#86198f;--color-cm-pink:#9d174d;--color-cm-rose:#9f1239;--color-cm-gray:#18181b;--color-cm-gray-muted:#71717a;--color-cm-gray-background:#e4e4e7}.dark{--color-cm-red:#f87171;--color-cm-orange:#fb923c;--color-cm-amber:#fbbf24;--color-cm-yellow:#facc15;--color-cm-lime:#a3e635;--color-cm-green:#4ade80;--color-cm-emerald:#4ade80;--color-cm-teal:#2dd4bf;--color-cm-cyan:#22d3ee;--color-cm-sky:#38bdf8;--color-cm-blue:#60a5fa;--color-cm-indigo:#818cf8;--color-cm-violet:#a78bfa;--color-cm-purple:#c084fc;--color-cm-fuchsia:#e879f9;--color-cm-pink:#f472b6;--color-cm-rose:#fb7185;--color-cm-gray:#fafafa;--color-cm-gray-muted:#a1a1aa;--color-cm-gray-background:#52525b}.cm-s-easymde .cm-comment{background-color:transparent;color:var(--color-cm-gray-muted)}.EasyMDEContainer .CodeMirror-cursor{border-color:currentColor}.dark .EasyMDEContainer .cm-s-easymde span.CodeMirror-selectedtext{filter:invert(100%)}.EasyMDEContainer .cm-s-easymde .cm-keyword{color:var(--color-cm-violet)}.EasyMDEContainer .cm-s-easymde .cm-atom{color:var(--color-cm-blue)}.EasyMDEContainer .cm-s-easymde .cm-number{color:var(--color-cm-green)}.EasyMDEContainer .cm-s-easymde .cm-def{color:var(--color-cm-blue)}.EasyMDEContainer .cm-s-easymde .cm-variable{color:var(--color-cm-yellow)}.EasyMDEContainer .cm-s-easymde .cm-variable-2{color:var(--color-cm-blue)}.EasyMDEContainer .cm-s-easymde .cm-variable-3{color:var(--color-cm-emerald)}.EasyMDEContainer .cm-s-easymde .cm-operator,.EasyMDEContainer .cm-s-easymde .cm-property{color:var(--color-cm-gray)}.EasyMDEContainer .cm-s-easymde .cm-string,.EasyMDEContainer .cm-s-easymde .cm-string-2{color:var(--color-cm-rose)}.EasyMDEContainer .cm-s-easymde .cm-meta{color:var(--color-cm-gray-muted)}.EasyMDEContainer .cm-s-easymde .cm-error{color:var(--color-cm-red)}.EasyMDEContainer .cm-s-easymde .cm-qualifier{color:var(--color-cm-gray-muted)}.EasyMDEContainer .cm-s-easymde .cm-builtin{color:var(--color-cm-violet)}.EasyMDEContainer .cm-s-easymde .cm-bracket{color:var(--color-cm-gray-muted)}.EasyMDEContainer .cm-s-easymde .cm-tag{color:var(--color-cm-green)}.EasyMDEContainer .cm-s-easymde .cm-attribute{color:var(--color-cm-blue)}.EasyMDEContainer .cm-s-easymde .cm-hr{color:var(--color-cm-gray-muted)}.EasyMDEContainer .cm-s-easymde .cm-formatting-quote{color:var(--color-cm-sky)}.EasyMDEContainer .cm-s-easymde .cm-formatting-quote+.cm-quote{color:var(--color-cm-gray-muted)}.EasyMDEContainer .cm-s-easymde .cm-formatting-list,.EasyMDEContainer .cm-s-easymde .cm-formatting-list+.cm-variable-2,.EasyMDEContainer .cm-s-easymde .cm-tab+.cm-variable-2{color:var(--color-cm-gray)}.EasyMDEContainer .cm-s-easymde .cm-link{color:var(--color-cm-blue)}.EasyMDEContainer .cm-s-easymde .cm-tag{color:var(--color-cm-red)}.EasyMDEContainer .cm-s-easymde .cm-attribute{color:var(--color-cm-amber)}.EasyMDEContainer .cm-s-easymde .cm-attribute+.cm-string{color:var(--color-cm-green)}.EasyMDEContainer .cm-s-easymde .cm-formatting-code+.cm-comment:not(.cm-formatting-code){background-color:var(--color-cm-gray-background);color:var(--color-cm-gray)}.EasyMDEContainer .cm-s-easymde .cm-header-1{font-size:1.875rem;line-height:2.25rem}.EasyMDEContainer .cm-s-easymde .cm-header-2{font-size:1.5rem;line-height:2rem}.EasyMDEContainer .cm-s-easymde .cm-header-3{font-size:1.25rem;line-height:1.75rem}.EasyMDEContainer .cm-s-easymde .cm-header-4{font-size:1.125rem;line-height:1.75rem}.EasyMDEContainer .cm-s-easymde .cm-header-5{font-size:1rem;line-height:1.5rem}.EasyMDEContainer .cm-s-easymde .cm-header-6{font-size:.875rem;line-height:1.25rem}.EasyMDEContainer .cm-s-easymde .cm-comment{background-image:none}.EasyMDEContainer .CodeMirror,.EasyMDEContainer .cm-s-easymde .cm-formatting-code-block,.EasyMDEContainer .cm-s-easymde .cm-tab+.cm-comment{background-color:transparent;color:inherit}.EasyMDEContainer .CodeMirror{border-style:none;padding:.375rem .75rem}.EasyMDEContainer .CodeMirror-scroll{height:auto}.EasyMDEContainer .editor-toolbar{--tw-border-opacity:1;border-color:rgba(var(--gray-200),var(--tw-border-opacity,1));border-radius:0;border-width:0 0 1px;-moz-column-gap:.25rem;column-gap:.25rem;display:flex;overflow-x:auto;padding:.5rem .625rem}.EasyMDEContainer .editor-toolbar:is(.dark *){border-color:hsla(0,0%,100%,.1)}.EasyMDEContainer .editor-toolbar button{border-radius:.5rem;border-style:none;cursor:pointer;display:grid;height:2rem;padding:0;place-content:center;transition-duration:75ms;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:2rem}.EasyMDEContainer .editor-toolbar button:hover{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar button:focus-visible{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar button:hover:is(.dark *){background-color:hsla(0,0%,100%,.05)}.EasyMDEContainer .editor-toolbar button:focus-visible:is(.dark *){background-color:hsla(0,0%,100%,.05)}.EasyMDEContainer .editor-toolbar button.active{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar button.active:is(.dark *){background-color:hsla(0,0%,100%,.05)}.EasyMDEContainer .editor-toolbar button:before{--tw-bg-opacity:1;background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1));display:block;height:1.25rem;width:1.25rem}.EasyMDEContainer .editor-toolbar button:is(.dark *):before{--tw-bg-opacity:1;background-color:rgba(var(--gray-300),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar button:before{content:"";-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.EasyMDEContainer .editor-toolbar button.active:before{--tw-bg-opacity:1;background-color:rgba(var(--primary-600),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar button.active:is(.dark *):before{--tw-bg-opacity:1;background-color:rgba(var(--primary-400),var(--tw-bg-opacity,1))}.EasyMDEContainer .editor-toolbar .separator{border-style:none;margin:0!important;width:.25rem}.EasyMDEContainer .editor-toolbar .bold:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M4 3a1 1 0 0 1 1-1h6a4.5 4.5 0 0 1 3.274 7.587A4.75 4.75 0 0 1 11.25 18H5a1 1 0 0 1-1-1V3Zm2.5 5.5v-4H11a2 2 0 1 1 0 4H6.5Zm0 2.5v4.5h4.75a2.25 2.25 0 0 0 0-4.5H6.5Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M4 3a1 1 0 0 1 1-1h6a4.5 4.5 0 0 1 3.274 7.587A4.75 4.75 0 0 1 11.25 18H5a1 1 0 0 1-1-1V3Zm2.5 5.5v-4H11a2 2 0 1 1 0 4H6.5Zm0 2.5v4.5h4.75a2.25 2.25 0 0 0 0-4.5H6.5Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .italic:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M8 2.75A.75.75 0 0 1 8.75 2h7.5a.75.75 0 0 1 0 1.5h-3.215l-4.483 13h2.698a.75.75 0 0 1 0 1.5h-7.5a.75.75 0 0 1 0-1.5h3.215l4.483-13H8.75A.75.75 0 0 1 8 2.75Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M8 2.75A.75.75 0 0 1 8.75 2h7.5a.75.75 0 0 1 0 1.5h-3.215l-4.483 13h2.698a.75.75 0 0 1 0 1.5h-7.5a.75.75 0 0 1 0-1.5h3.215l4.483-13H8.75A.75.75 0 0 1 8 2.75Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .strikethrough:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M11.617 3.963c-1.186-.318-2.418-.323-3.416.015-.992.336-1.49.91-1.642 1.476-.152.566-.007 1.313.684 2.1.528.6 1.273 1.1 2.128 1.446h7.879a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5h3.813a5.976 5.976 0 0 1-.447-.456C5.18 7.479 4.798 6.231 5.11 5.066c.312-1.164 1.268-2.055 2.61-2.509 1.336-.451 2.877-.42 4.286-.043.856.23 1.684.592 2.409 1.074a.75.75 0 1 1-.83 1.25 6.723 6.723 0 0 0-1.968-.875Zm1.909 8.123a.75.75 0 0 1 1.015.309c.53.99.607 2.062.18 3.01-.421.94-1.289 1.648-2.441 2.038-1.336.452-2.877.42-4.286.043-1.409-.377-2.759-1.121-3.69-2.18a.75.75 0 1 1 1.127-.99c.696.791 1.765 1.403 2.952 1.721 1.186.318 2.418.323 3.416-.015.853-.288 1.34-.756 1.555-1.232.21-.467.205-1.049-.136-1.69a.75.75 0 0 1 .308-1.014Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M11.617 3.963c-1.186-.318-2.418-.323-3.416.015-.992.336-1.49.91-1.642 1.476-.152.566-.007 1.313.684 2.1.528.6 1.273 1.1 2.128 1.446h7.879a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5h3.813a5.976 5.976 0 0 1-.447-.456C5.18 7.479 4.798 6.231 5.11 5.066c.312-1.164 1.268-2.055 2.61-2.509 1.336-.451 2.877-.42 4.286-.043.856.23 1.684.592 2.409 1.074a.75.75 0 1 1-.83 1.25 6.723 6.723 0 0 0-1.968-.875Zm1.909 8.123a.75.75 0 0 1 1.015.309c.53.99.607 2.062.18 3.01-.421.94-1.289 1.648-2.441 2.038-1.336.452-2.877.42-4.286.043-1.409-.377-2.759-1.121-3.69-2.18a.75.75 0 1 1 1.127-.99c.696.791 1.765 1.403 2.952 1.721 1.186.318 2.418.323 3.416-.015.853-.288 1.34-.756 1.555-1.232.21-.467.205-1.049-.136-1.69a.75.75 0 0 1 .308-1.014Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .link:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath d='M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z'/%3E%3Cpath d='M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath d='M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z'/%3E%3Cpath d='M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .heading:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M2.75 4a.75.75 0 0 1 .75.75v4.5h5v-4.5a.75.75 0 0 1 1.5 0v10.5a.75.75 0 0 1-1.5 0v-4.5h-5v4.5a.75.75 0 0 1-1.5 0V4.75A.75.75 0 0 1 2.75 4ZM13 8.75a.75.75 0 0 1 .75-.75h1.75a.75.75 0 0 1 .75.75v5.75h1a.75.75 0 0 1 0 1.5h-3.5a.75.75 0 0 1 0-1.5h1v-5h-1a.75.75 0 0 1-.75-.75Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M2.75 4a.75.75 0 0 1 .75.75v4.5h5v-4.5a.75.75 0 0 1 1.5 0v10.5a.75.75 0 0 1-1.5 0v-4.5h-5v4.5a.75.75 0 0 1-1.5 0V4.75A.75.75 0 0 1 2.75 4ZM13 8.75a.75.75 0 0 1 .75-.75h1.75a.75.75 0 0 1 .75.75v5.75h1a.75.75 0 0 1 0 1.5h-3.5a.75.75 0 0 1 0-1.5h1v-5h-1a.75.75 0 0 1-.75-.75Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .quote:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M10 2c-2.236 0-4.43.18-6.57.524C1.993 2.755 1 4.014 1 5.426v5.148c0 1.413.993 2.67 2.43 2.902 1.168.188 2.352.327 3.55.414.28.02.521.18.642.413l1.713 3.293a.75.75 0 0 0 1.33 0l1.713-3.293a.783.783 0 0 1 .642-.413 41.102 41.102 0 0 0 3.55-.414c1.437-.231 2.43-1.49 2.43-2.902V5.426c0-1.413-.993-2.67-2.43-2.902A41.289 41.289 0 0 0 10 2ZM6.75 6a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Zm0 2.5a.75.75 0 0 0 0 1.5h3.5a.75.75 0 0 0 0-1.5h-3.5Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M10 2c-2.236 0-4.43.18-6.57.524C1.993 2.755 1 4.014 1 5.426v5.148c0 1.413.993 2.67 2.43 2.902 1.168.188 2.352.327 3.55.414.28.02.521.18.642.413l1.713 3.293a.75.75 0 0 0 1.33 0l1.713-3.293a.783.783 0 0 1 .642-.413 41.102 41.102 0 0 0 3.55-.414c1.437-.231 2.43-1.49 2.43-2.902V5.426c0-1.413-.993-2.67-2.43-2.902A41.289 41.289 0 0 0 10 2ZM6.75 6a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Zm0 2.5a.75.75 0 0 0 0 1.5h3.5a.75.75 0 0 0 0-1.5h-3.5Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .code:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M6.28 5.22a.75.75 0 0 1 0 1.06L2.56 10l3.72 3.72a.75.75 0 0 1-1.06 1.06L.97 10.53a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Zm7.44 0a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L17.44 10l-3.72-3.72a.75.75 0 0 1 0-1.06Zm-2.343-3.209a.75.75 0 0 1 .612.867l-2.5 14.5a.75.75 0 0 1-1.478-.255l2.5-14.5a.75.75 0 0 1 .866-.612Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M6.28 5.22a.75.75 0 0 1 0 1.06L2.56 10l3.72 3.72a.75.75 0 0 1-1.06 1.06L.97 10.53a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Zm7.44 0a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L17.44 10l-3.72-3.72a.75.75 0 0 1 0-1.06Zm-2.343-3.209a.75.75 0 0 1 .612.867l-2.5 14.5a.75.75 0 0 1-1.478-.255l2.5-14.5a.75.75 0 0 1 .866-.612Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .unordered-list:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M6 4.75A.75.75 0 0 1 6.75 4h10.5a.75.75 0 0 1 0 1.5H6.75A.75.75 0 0 1 6 4.75ZM6 10a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H6.75A.75.75 0 0 1 6 10Zm0 5.25a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H6.75a.75.75 0 0 1-.75-.75ZM1.99 4.75a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1v-.01Zm0 10.5a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1v-.01Zm0-5.25a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1V10Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M6 4.75A.75.75 0 0 1 6.75 4h10.5a.75.75 0 0 1 0 1.5H6.75A.75.75 0 0 1 6 4.75ZM6 10a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H6.75A.75.75 0 0 1 6 10Zm0 5.25a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H6.75a.75.75 0 0 1-.75-.75ZM1.99 4.75a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1v-.01Zm0 10.5a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1v-.01Zm0-5.25a1 1 0 0 1 1-1H3a1 1 0 0 1 1 1v.01a1 1 0 0 1-1 1h-.01a1 1 0 0 1-1-1V10Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .ordered-list:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath d='M3 1.25a.75.75 0 0 0 0 1.5h.25v2.5a.75.75 0 0 0 1.5 0V2A.75.75 0 0 0 4 1.25H3Zm-.03 7.404a3.5 3.5 0 0 1 1.524-.12.034.034 0 0 1-.012.012L2.415 9.579A.75.75 0 0 0 2 10.25v1c0 .414.336.75.75.75h2.5a.75.75 0 0 0 0-1.5H3.927l1.225-.613c.52-.26.848-.79.848-1.371 0-.647-.429-1.327-1.193-1.451a5.03 5.03 0 0 0-2.277.155.75.75 0 0 0 .44 1.434ZM7.75 3a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm0 6.25a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm0 6.25a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm-5.125-1.625a.75.75 0 0 0 0 1.5h1.5a.125.125 0 0 1 0 .25H3.5a.75.75 0 0 0 0 1.5h.625a.125.125 0 0 1 0 .25h-1.5a.75.75 0 0 0 0 1.5h1.5a1.625 1.625 0 0 0 1.37-2.5 1.625 1.625 0 0 0-1.37-2.5h-1.5Z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath d='M3 1.25a.75.75 0 0 0 0 1.5h.25v2.5a.75.75 0 0 0 1.5 0V2A.75.75 0 0 0 4 1.25H3Zm-.03 7.404a3.5 3.5 0 0 1 1.524-.12.034.034 0 0 1-.012.012L2.415 9.579A.75.75 0 0 0 2 10.25v1c0 .414.336.75.75.75h2.5a.75.75 0 0 0 0-1.5H3.927l1.225-.613c.52-.26.848-.79.848-1.371 0-.647-.429-1.327-1.193-1.451a5.03 5.03 0 0 0-2.277.155.75.75 0 0 0 .44 1.434ZM7.75 3a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm0 6.25a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm0 6.25a.75.75 0 0 0 0 1.5h9.5a.75.75 0 0 0 0-1.5h-9.5Zm-5.125-1.625a.75.75 0 0 0 0 1.5h1.5a.125.125 0 0 1 0 .25H3.5a.75.75 0 0 0 0 1.5h.625a.125.125 0 0 1 0 .25h-1.5a.75.75 0 0 0 0 1.5h1.5a1.625 1.625 0 0 0 1.37-2.5 1.625 1.625 0 0 0-1.37-2.5h-1.5Z'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .table:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M.99 5.24A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25l.01 9.5A2.25 2.25 0 0 1 16.76 17H3.26A2.267 2.267 0 0 1 1 14.74l-.01-9.5Zm8.26 9.52v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.615c0 .414.336.75.75.75h5.373a.75.75 0 0 0 .627-.74Zm1.5 0a.75.75 0 0 0 .627.74h5.373a.75.75 0 0 0 .75-.75v-.615a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625Zm6.75-3.63v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75ZM17.5 7.5v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M.99 5.24A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25l.01 9.5A2.25 2.25 0 0 1 16.76 17H3.26A2.267 2.267 0 0 1 1 14.74l-.01-9.5Zm8.26 9.52v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.615c0 .414.336.75.75.75h5.373a.75.75 0 0 0 .627-.74Zm1.5 0a.75.75 0 0 0 .627.74h5.373a.75.75 0 0 0 .75-.75v-.615a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625Zm6.75-3.63v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75v.625c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75ZM17.5 7.5v-.625a.75.75 0 0 0-.75-.75H11.5a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75h5.25a.75.75 0 0 0 .75-.75Zm-8.25 0v-.625a.75.75 0 0 0-.75-.75H3.25a.75.75 0 0 0-.75.75V7.5c0 .414.336.75.75.75H8.5a.75.75 0 0 0 .75-.75Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .upload-image:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M1 5.25A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25v9.5A2.25 2.25 0 0 1 16.75 17H3.25A2.25 2.25 0 0 1 1 14.75v-9.5Zm1.5 5.81v3.69c0 .414.336.75.75.75h13.5a.75.75 0 0 0 .75-.75v-2.69l-2.22-2.219a.75.75 0 0 0-1.06 0l-1.91 1.909.47.47a.75.75 0 1 1-1.06 1.06L6.53 8.091a.75.75 0 0 0-1.06 0l-2.97 2.97ZM12 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M1 5.25A2.25 2.25 0 0 1 3.25 3h13.5A2.25 2.25 0 0 1 19 5.25v9.5A2.25 2.25 0 0 1 16.75 17H3.25A2.25 2.25 0 0 1 1 14.75v-9.5Zm1.5 5.81v3.69c0 .414.336.75.75.75h13.5a.75.75 0 0 0 .75-.75v-2.69l-2.22-2.219a.75.75 0 0 0-1.06 0l-1.91 1.909.47.47a.75.75 0 1 1-1.06 1.06L6.53 8.091a.75.75 0 0 0-1.06 0l-2.97 2.97ZM12 7a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .undo:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M7.793 2.232a.75.75 0 0 1-.025 1.06L3.622 7.25h10.003a5.375 5.375 0 0 1 0 10.75H10.75a.75.75 0 0 1 0-1.5h2.875a3.875 3.875 0 0 0 0-7.75H3.622l4.146 3.957a.75.75 0 0 1-1.036 1.085l-5.5-5.25a.75.75 0 0 1 0-1.085l5.5-5.25a.75.75 0 0 1 1.06.025Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M7.793 2.232a.75.75 0 0 1-.025 1.06L3.622 7.25h10.003a5.375 5.375 0 0 1 0 10.75H10.75a.75.75 0 0 1 0-1.5h2.875a3.875 3.875 0 0 0 0-7.75H3.622l4.146 3.957a.75.75 0 0 1-1.036 1.085l-5.5-5.25a.75.75 0 0 1 0-1.085l5.5-5.25a.75.75 0 0 1 1.06.025Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-toolbar .redo:before{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M12.207 2.232a.75.75 0 0 0 .025 1.06l4.146 3.958H6.375a5.375 5.375 0 0 0 0 10.75H9.25a.75.75 0 0 0 0-1.5H6.375a3.875 3.875 0 0 1 0-7.75h10.003l-4.146 3.957a.75.75 0 0 0 1.036 1.085l5.5-5.25a.75.75 0 0 0 0-1.085l-5.5-5.25a.75.75 0 0 0-1.06.025Z' clip-rule='evenodd'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='size-5'%3E%3Cpath fill-rule='evenodd' d='M12.207 2.232a.75.75 0 0 0 .025 1.06l4.146 3.958H6.375a5.375 5.375 0 0 0 0 10.75H9.25a.75.75 0 0 0 0-1.5H6.375a3.875 3.875 0 0 1 0-7.75h10.003l-4.146 3.957a.75.75 0 0 0 1.036 1.085l5.5-5.25a.75.75 0 0 0 0-1.085l-5.5-5.25a.75.75 0 0 0-1.06.025Z' clip-rule='evenodd'/%3E%3C/svg%3E")}.EasyMDEContainer .editor-statusbar{display:none}.fi-fo-rich-editor trix-toolbar .trix-dialogs{position:relative}.fi-fo-rich-editor trix-toolbar .trix-dialog{--tw-bg-opacity:1;--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1));border-radius:.5rem;bottom:auto;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);left:0;padding:.5rem;position:absolute;right:0;top:1rem}.fi-fo-rich-editor trix-toolbar .trix-dialog:is(.dark *){--tw-bg-opacity:1;background-color:rgba(var(--gray-800),var(--tw-bg-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields{display:flex;flex-direction:column;gap:.5rem;width:100%}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-button-group{display:flex;gap:.5rem}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:rgba(var(--gray-950),0.1);background-color:rgb(255 255 255/var(--tw-bg-opacity,1));border-radius:.375rem;border-style:none;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);color:rgba(var(--gray-950),var(--tw-text-opacity,1));display:block;font-size:.875rem;line-height:1.25rem;outline:2px solid transparent;outline-offset:2px;padding-bottom:.375rem;padding-inline-end:.75rem;padding-top:.375rem;padding-inline-start:.75rem;transition-duration:75ms;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:100%}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input:focus-within{--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-600),var(--tw-ring-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input:is(.dark *){--tw-bg-opacity:1;--tw-text-opacity:1;--tw-ring-color:hsla(0,0%,100%,.2);background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1));color:rgb(255 255 255/var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input:focus-within:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgba(var(--primary-600),var(--tw-ring-opacity,1))}@media (min-width:640px){.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-input{font-size:.875rem;line-height:1.5rem}}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-button-group .trix-button{--tw-bg-opacity:1;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-200),var(--tw-ring-opacity,1));background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1));border-radius:.375rem;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);font-size:.75rem;line-height:1rem;padding:.125rem .5rem}.fi-fo-rich-editor trix-toolbar .trix-dialog__link-fields .trix-button-group .trix-button:is(.dark *){--tw-bg-opacity:1;--tw-ring-opacity:1;--tw-ring-color:rgba(var(--gray-600),var(--tw-ring-opacity,1));background-color:rgba(var(--gray-700),var(--tw-bg-opacity,1))}.fi-fo-rich-editor trix-editor:empty:before{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-editor:empty:is(.dark *):before{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.fi-fo-rich-editor trix-editor:empty:before{content:attr(placeholder)}.fi-fo-rich-editor trix-editor.prose :where(ol):not(:where([class~=not-prose] *)),.fi-fo-rich-editor trix-editor.prose :where(ul):not(:where([class~=not-prose] *)){padding-inline-end:0!important;padding-inline-start:1.625em!important}.fi-fo-rich-editor trix-editor.prose :where(ul>li):not(:where([class~=not-prose] *)){padding-inline-end:0!important;padding-inline-start:.375em!important}select:not(.choices){background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E")}[dir=rtl] select{background-position:left .5rem center!important}.choices{outline:2px solid transparent;outline-offset:2px;position:relative}.choices [hidden]{display:none!important}.choices[data-type*=select-one] .has-no-choices{display:none}.choices[data-type*=select-one] .choices__input{display:block;margin:0;width:100%}.choices__inner{background-repeat:no-repeat;outline:2px solid transparent;outline-offset:2px;padding-bottom:.375rem;padding-inline-end:2rem;padding-top:.375rem;padding-inline-start:.75rem}@media (min-width:640px){.choices__inner{font-size:.875rem;line-height:1.5rem}}.choices__inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-size:1.5em 1.5em;&:has(.choices__button){padding-inline-end:3.5rem}}.choices.is-disabled .choices__inner{cursor:default}[dir=rtl] .choices__inner{background-position:left .5rem center}.choices__list--single{display:inline-block}.choices__list--single .choices__item{--tw-text-opacity:1;color:rgba(var(--gray-950),var(--tw-text-opacity,1))}.choices__list--single .choices__item:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.choices.is-disabled .choices__list--single .choices__item{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices.is-disabled .choices__list--single .choices__item:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.choices__list--multiple{display:flex;flex-wrap:wrap;gap:.375rem}.choices__list--multiple:not(:empty){margin-bottom:.25rem;margin-left:-.25rem;margin-right:-.25rem;padding-bottom:.125rem;padding-top:.125rem}.choices__list--multiple .choices__item{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-inset:inset;--tw-ring-color:rgba(var(--primary-600),0.1);align-items:center;background-color:rgba(var(--primary-50),var(--tw-bg-opacity,1));border-radius:.375rem;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);color:rgba(var(--primary-600),var(--tw-text-opacity,1));display:inline-flex;font-size:.75rem;font-weight:500;gap:.25rem;line-height:1rem;padding:.25rem .5rem;word-break:break-all}.choices__list--multiple .choices__item:is(.dark *){--tw-text-opacity:1;--tw-ring-color:rgba(var(--primary-400),0.3);background-color:rgba(var(--primary-400),.1);color:rgba(var(--primary-400),var(--tw-text-opacity,1))}.choices__list--dropdown,.choices__list[aria-expanded]{--tw-bg-opacity:1;--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:rgba(var(--gray-950),0.05);background-color:rgb(255 255 255/var(--tw-bg-opacity,1));border-radius:.5rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);display:none;font-size:.875rem;line-height:1.25rem;margin-top:.5rem;overflow:hidden;overflow-wrap:break-word;position:absolute;top:100%;width:100%;will-change:visibility;z-index:10}.choices__list--dropdown:is(.dark *),.choices__list[aria-expanded]:is(.dark *){--tw-bg-opacity:1;--tw-ring-color:hsla(0,0%,100%,.1);background-color:rgba(var(--gray-900),var(--tw-bg-opacity,1))}.is-active.choices__list--dropdown,.is-active.choices__list[aria-expanded]{display:block;padding:.25rem}.choices__list--dropdown .choices__list,.choices__list[aria-expanded] .choices__list{max-height:15rem;overflow:auto;will-change:scroll-position}.choices__item--choice{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1));padding:.5rem;transition-duration:75ms;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.choices__item--choice:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.choices__item--choice.choices__item--selectable{--tw-text-opacity:1;border-radius:.375rem;color:rgba(var(--gray-950),var(--tw-text-opacity,1))}.choices__item--choice.choices__item--selectable:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.choices__list--dropdown .choices__item--selectable.is-highlighted,.choices__list[aria-expanded] .choices__item--selectable.is-highlighted{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity,1))}.choices__list--dropdown .choices__item--selectable.is-highlighted:is(.dark *),.choices__list[aria-expanded] .choices__item--selectable.is-highlighted:is(.dark *){background-color:hsla(0,0%,100%,.05)}.choices__item{cursor:default}.choices__item--disabled{pointer-events:none}.choices__item--disabled:disabled{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices__item--disabled:disabled:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.choices.is-disabled .choices__placeholder.choices__item,.choices__placeholder.choices__item{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1));cursor:default}.choices.is-disabled .choices__placeholder.choices__item:is(.dark *),.choices__placeholder.choices__item:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices__button{background-color:transparent;background-position:50%;background-repeat:no-repeat;border-width:0;outline:2px solid transparent;outline-offset:2px;text-indent:-9999px}.choices[data-type*=select-one] .choices__button{height:1rem;inset-inline-end:0;margin-inline-end:2.25rem;opacity:.5;padding:0;position:absolute;transition-duration:75ms;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);width:1rem}.choices[data-type*=select-one] .choices__button:is(.dark *){opacity:.4}.choices[data-type*=select-one] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMi41OTIuMDQ0IDE4LjM2NCAxOC4zNjQtMi41NDggMi41NDhMLjA0NCAyLjU5MnoiLz48cGF0aCBkPSJNMCAxOC4zNjQgMTguMzY0IDBsMi41NDggMi41NDhMMi41NDggMjAuOTEyeiIvPjwvZz48L3N2Zz4=);background-size:.7142em .7142em;top:calc(50% - .5714em)}.dark .choices[data-type*=select-one] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMi41OTIuMDQ0IDE4LjM2NCAxOC4zNjQtMi41NDggMi41NDhMLjA0NCAyLjU5MnoiLz48cGF0aCBkPSJNMCAxOC4zNjQgMTguMzY0IDBsMi41NDggMi41NDhMMi41NDggMjAuOTEyeiIvPjwvZz48L3N2Zz4=)}.choices[data-type*=select-multiple] .choices__button{height:1rem;opacity:.5;width:1rem}.choices[data-type*=select-multiple] .choices__button:is(.dark *){opacity:.4}.choices[data-type*=select-multiple] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMi41OTIuMDQ0IDE4LjM2NCAxOC4zNjQtMi41NDggMi41NDhMLjA0NCAyLjU5MnoiLz48cGF0aCBkPSJNMCAxOC4zNjQgMTguMzY0IDBsMi41NDggMi41NDhMMi41NDggMjAuOTEyeiIvPjwvZz48L3N2Zz4=);background-size:.7142em .7142em}.dark .choices[data-type*=select-multiple] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMi41OTIuMDQ0IDE4LjM2NCAxOC4zNjQtMi41NDggMi41NDhMLjA0NCAyLjU5MnoiLz48cGF0aCBkPSJNMCAxOC4zNjQgMTguMzY0IDBsMi41NDggMi41NDhMMi41NDggMjAuOTEyeiIvPjwvZz48L3N2Zz4=)}.choices[data-type*=select-multiple] .choices__button:focus-visible,.choices[data-type*=select-multiple] .choices__button:hover,.choices[data-type*=select-one] .choices__button:focus-visible,.choices[data-type*=select-one] .choices__button:hover{opacity:.7}.choices[data-type*=select-multiple] .choices__button:focus-visible:is(.dark *),.choices[data-type*=select-multiple] .choices__button:hover:is(.dark *),.choices[data-type*=select-one] .choices__button:focus-visible:is(.dark *),.choices[data-type*=select-one] .choices__button:hover:is(.dark *){opacity:.6}.choices.is-disabled .choices__button,.choices[data-type*=select-one] .choices__item[data-value=""] .choices__button{display:none}.choices__input{--tw-text-opacity:1;background-color:transparent!important;border-style:none;color:rgba(var(--gray-950),var(--tw-text-opacity,1));font-size:1rem!important;line-height:1.5rem!important;padding:0!important;transition-duration:75ms;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.choices__input::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.choices__input::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.choices__input:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.choices__input:disabled{--tw-text-opacity:1;-webkit-text-fill-color:rgba(var(--gray-500),1);color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices__input:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.choices__input:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices__input:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1))}.choices__input:disabled:is(.dark *){--tw-text-opacity:1;-webkit-text-fill-color:rgba(var(--gray-400),1);color:rgba(var(--gray-400),var(--tw-text-opacity,1))}@media (min-width:640px){.choices__input{font-size:.875rem!important;line-height:1.5rem}}.choices__list--dropdown .choices__input{padding:.5rem!important}.choices__input::-webkit-search-cancel-button,.choices__input::-webkit-search-decoration,.choices__input::-webkit-search-results-button,.choices__input::-webkit-search-results-decoration{display:none}.choices__input::-ms-clear,.choices__input::-ms-reveal{display:none;height:0;width:0}.choices__group{--tw-text-opacity:1;color:rgba(var(--gray-500),var(--tw-text-opacity,1));padding:1rem .5rem .5rem}.choices__group:first-child{padding-top:.5rem}.choices__group:is(.dark *){--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity,1))}.webkit-calendar-picker-indicator\:opacity-0::-webkit-calendar-picker-indicator{opacity:0}/*! Bundled license information: + +cropperjs/dist/cropper.min.css: + (*! + * Cropper.js v1.6.2 + * https://fengyuanchen.github.io/cropperjs + * + * Copyright 2015-present Chen Fengyuan + * Released under the MIT license + * + * Date: 2024-04-21T07:43:02.731Z + *) + +filepond/dist/filepond.min.css: + (*! + * FilePond 4.32.7 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + *) + +filepond-plugin-image-edit/dist/filepond-plugin-image-edit.css: + (*! + * FilePondPluginImageEdit 1.6.3 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + *) + +filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css: + (*! + * FilePondPluginImagePreview 4.6.12 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + *) + +filepond-plugin-media-preview/dist/filepond-plugin-media-preview.css: + (*! + * FilePondPluginmediaPreview 1.0.11 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit undefined for details. + *) + +easymde/dist/easymde.min.css: + (** + * easymde v2.18.0 + * Copyright Jeroen Akkerman + * @link https://github.com/ionaru/easy-markdown-editor + * @license MIT + *) +*/ \ No newline at end of file diff --git a/public/css/filament/support/support.css b/public/css/filament/support/support.css new file mode 100644 index 000000000..a80d070c8 --- /dev/null +++ b/public/css/filament/support/support.css @@ -0,0 +1 @@ +.fi-pagination-items,.fi-pagination-overview,.fi-pagination-records-per-page-select:not(.fi-compact){display:none}@supports (container-type:inline-size){.fi-pagination{container-type:inline-size}@container (min-width: 28rem){.fi-pagination-records-per-page-select.fi-compact{display:none}.fi-pagination-records-per-page-select:not(.fi-compact){display:inline}}@container (min-width: 56rem){.fi-pagination:not(.fi-simple)>.fi-pagination-previous-btn{display:none}.fi-pagination-overview{display:inline}.fi-pagination:not(.fi-simple)>.fi-pagination-next-btn{display:none}.fi-pagination-items{display:flex}}}@supports not (container-type:inline-size){@media (min-width:640px){.fi-pagination-records-per-page-select.fi-compact{display:none}.fi-pagination-records-per-page-select:not(.fi-compact){display:inline}}@media (min-width:768px){.fi-pagination:not(.fi-simple)>.fi-pagination-previous-btn{display:none}.fi-pagination-overview{display:inline}.fi-pagination:not(.fi-simple)>.fi-pagination-next-btn{display:none}.fi-pagination-items{display:flex}}}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{background-color:#333;border-radius:4px;color:#fff;font-size:14px;line-height:1.4;outline:0;position:relative;transition-property:transform,visibility,opacity;white-space:normal}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{border-top-color:initial;border-width:8px 8px 0;bottom:-7px;left:0;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:initial;border-width:0 8px 8px;left:0;top:-7px;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-left-color:initial;border-width:8px 0 8px 8px;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{border-right-color:initial;border-width:8px 8px 8px 0;left:-7px;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{color:#333;height:16px;width:16px}.tippy-arrow:before{border-color:transparent;border-style:solid;content:"";position:absolute}.tippy-content{padding:5px 9px;position:relative;z-index:1}.tippy-box[data-theme~=light]{background-color:#fff;box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;color:#26323d}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}.fi-sortable-ghost{opacity:.3} \ No newline at end of file diff --git a/public/js/filament/filament/app.js b/public/js/filament/filament/app.js new file mode 100644 index 000000000..caff16739 --- /dev/null +++ b/public/js/filament/filament/app.js @@ -0,0 +1 @@ +(()=>{var Z=Object.create,L=Object.defineProperty,ee=Object.getPrototypeOf,te=Object.prototype.hasOwnProperty,re=Object.getOwnPropertyNames,ne=Object.getOwnPropertyDescriptor,ae=s=>L(s,"__esModule",{value:!0}),ie=(s,n)=>()=>(n||(n={exports:{}},s(n.exports,n)),n.exports),oe=(s,n,p)=>{if(n&&typeof n=="object"||typeof n=="function")for(let d of re(n))!te.call(s,d)&&d!=="default"&&L(s,d,{get:()=>n[d],enumerable:!(p=ne(n,d))||p.enumerable});return s},se=s=>oe(ae(L(s!=null?Z(ee(s)):{},"default",s&&s.__esModule&&"default"in s?{get:()=>s.default,enumerable:!0}:{value:s,enumerable:!0})),s),fe=ie((s,n)=>{(function(p,d,M){if(!p)return;for(var h={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},y={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},g={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},q={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},S,w=1;w<20;++w)h[111+w]="f"+w;for(w=0;w<=9;++w)h[w+96]=w.toString();function C(e,t,a){if(e.addEventListener){e.addEventListener(t,a,!1);return}e.attachEvent("on"+t,a)}function T(e){if(e.type=="keypress"){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return h[e.which]?h[e.which]:y[e.which]?y[e.which]:String.fromCharCode(e.which).toLowerCase()}function V(e,t){return e.sort().join(",")===t.sort().join(",")}function $(e){var t=[];return e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),t}function B(e){if(e.preventDefault){e.preventDefault();return}e.returnValue=!1}function H(e){if(e.stopPropagation){e.stopPropagation();return}e.cancelBubble=!0}function O(e){return e=="shift"||e=="ctrl"||e=="alt"||e=="meta"}function J(){if(!S){S={};for(var e in h)e>95&&e<112||h.hasOwnProperty(e)&&(S[h[e]]=e)}return S}function U(e,t,a){return a||(a=J()[e]?"keydown":"keypress"),a=="keypress"&&t.length&&(a="keydown"),a}function X(e){return e==="+"?["+"]:(e=e.replace(/\+{2}/g,"+plus"),e.split("+"))}function I(e,t){var a,c,b,P=[];for(a=X(e),b=0;b1){z(r,m,o,l);return}f=I(r,l),t._callbacks[f.key]=t._callbacks[f.key]||[],j(f.key,f.modifiers,{type:f.action},i,r,u),t._callbacks[f.key][i?"unshift":"push"]({callback:o,modifiers:f.modifiers,action:f.action,seq:i,level:u,combo:r})}t._bindMultiple=function(r,o,l){for(var i=0;i-1||D(t,a.target))return!1;if("composedPath"in e&&typeof e.composedPath=="function"){var c=e.composedPath()[0];c!==e.target&&(t=c)}return t.tagName=="INPUT"||t.tagName=="SELECT"||t.tagName=="TEXTAREA"||t.isContentEditable},v.prototype.handleKey=function(){var e=this;return e._handleKey.apply(e,arguments)},v.addKeycodes=function(e){for(var t in e)e.hasOwnProperty(t)&&(h[t]=e[t]);S=null},v.init=function(){var e=v(d);for(var t in e)t.charAt(0)!=="_"&&(v[t]=function(a){return function(){return e[a].apply(e,arguments)}}(t))},v.init(),p.Mousetrap=v,typeof n<"u"&&n.exports&&(n.exports=v),typeof define=="function"&&define.amd&&define(function(){return v})})(typeof window<"u"?window:null,typeof window<"u"?document:null)}),R=se(fe());(function(s){if(s){var n={},p=s.prototype.stopCallback;s.prototype.stopCallback=function(d,M,h,y){var g=this;return g.paused?!0:n[h]||n[y]?!1:p.call(g,d,M,h)},s.prototype.bindGlobal=function(d,M,h){var y=this;if(y.bind(d,M,h),d instanceof Array){for(var g=0;g{s.directive("mousetrap",(n,{modifiers:p,expression:d},{evaluate:M})=>{let h=()=>d?M(d):n.click();p=p.map(y=>y.replace(/-/g,"+")),p.includes("global")&&(p=p.filter(y=>y!=="global"),R.default.bindGlobal(p,y=>{y.preventDefault(),h()})),R.default.bind(p,y=>{y.preventDefault(),h()})})},F=le;document.addEventListener("alpine:init",()=>{window.Alpine.plugin(F),window.Alpine.store("sidebar",{isOpen:window.Alpine.$persist(!0).as("isOpen"),collapsedGroups:window.Alpine.$persist(null).as("collapsedGroups"),groupIsCollapsed:function(n){return this.collapsedGroups.includes(n)},collapseGroup:function(n){this.collapsedGroups.includes(n)||(this.collapsedGroups=this.collapsedGroups.concat(n))},toggleCollapsedGroup:function(n){this.collapsedGroups=this.collapsedGroups.includes(n)?this.collapsedGroups.filter(p=>p!==n):this.collapsedGroups.concat(n)},close:function(){this.isOpen=!1},open:function(){this.isOpen=!0}});let s=localStorage.getItem("theme")??getComputedStyle(document.documentElement).getPropertyValue("--default-theme-mode");window.Alpine.store("theme",s==="dark"||s==="system"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),window.addEventListener("theme-changed",n=>{let p=n.detail;localStorage.setItem("theme",p),p==="system"&&(p=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),window.Alpine.store("theme",p)}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n=>{localStorage.getItem("theme")==="system"&&window.Alpine.store("theme",n.matches?"dark":"light")}),window.Alpine.effect(()=>{window.Alpine.store("theme")==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")})});})(); diff --git a/public/js/filament/filament/echo.js b/public/js/filament/filament/echo.js new file mode 100644 index 000000000..65edaf5eb --- /dev/null +++ b/public/js/filament/filament/echo.js @@ -0,0 +1,13 @@ +(()=>{var Ci=Object.create;var he=Object.defineProperty;var Ti=Object.getOwnPropertyDescriptor;var Pi=Object.getOwnPropertyNames;var xi=Object.getPrototypeOf,Oi=Object.prototype.hasOwnProperty;var Ai=(l,h)=>()=>(h||l((h={exports:{}}).exports,h),h.exports);var Ei=(l,h,a,c)=>{if(h&&typeof h=="object"||typeof h=="function")for(let s of Pi(h))!Oi.call(l,s)&&s!==a&&he(l,s,{get:()=>h[s],enumerable:!(c=Ti(h,s))||c.enumerable});return l};var Li=(l,h,a)=>(a=l!=null?Ci(xi(l)):{},Ei(h||!l||!l.__esModule?he(a,"default",{value:l,enumerable:!0}):a,l));var me=Ai((vt,It)=>{(function(h,a){typeof vt=="object"&&typeof It=="object"?It.exports=a():typeof define=="function"&&define.amd?define([],a):typeof vt=="object"?vt.Pusher=a():h.Pusher=a()})(window,function(){return function(l){var h={};function a(c){if(h[c])return h[c].exports;var s=h[c]={i:c,l:!1,exports:{}};return l[c].call(s.exports,s,s.exports,a),s.l=!0,s.exports}return a.m=l,a.c=h,a.d=function(c,s,f){a.o(c,s)||Object.defineProperty(c,s,{enumerable:!0,get:f})},a.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})},a.t=function(c,s){if(s&1&&(c=a(c)),s&8||s&4&&typeof c=="object"&&c&&c.__esModule)return c;var f=Object.create(null);if(a.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:c}),s&2&&typeof c!="string")for(var d in c)a.d(f,d,function(N){return c[N]}.bind(null,d));return f},a.n=function(c){var s=c&&c.__esModule?function(){return c.default}:function(){return c};return a.d(s,"a",s),s},a.o=function(c,s){return Object.prototype.hasOwnProperty.call(c,s)},a.p="",a(a.s=2)}([function(l,h,a){"use strict";var c=this&&this.__extends||function(){var b=function(v,y){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,O){w.__proto__=O}||function(w,O){for(var I in O)O.hasOwnProperty(I)&&(w[I]=O[I])},b(v,y)};return function(v,y){b(v,y);function w(){this.constructor=v}v.prototype=y===null?Object.create(y):(w.prototype=y.prototype,new w)}}();Object.defineProperty(h,"__esModule",{value:!0});var s=256,f=function(){function b(v){v===void 0&&(v="="),this._paddingCharacter=v}return b.prototype.encodedLength=function(v){return this._paddingCharacter?(v+2)/3*4|0:(v*8+5)/6|0},b.prototype.encode=function(v){for(var y="",w=0;w>>3*6&63),y+=this._encodeByte(O>>>2*6&63),y+=this._encodeByte(O>>>1*6&63),y+=this._encodeByte(O>>>0*6&63)}var I=v.length-w;if(I>0){var O=v[w]<<16|(I===2?v[w+1]<<8:0);y+=this._encodeByte(O>>>3*6&63),y+=this._encodeByte(O>>>2*6&63),I===2?y+=this._encodeByte(O>>>1*6&63):y+=this._paddingCharacter||"",y+=this._paddingCharacter||""}return y},b.prototype.maxDecodedLength=function(v){return this._paddingCharacter?v/4*3|0:(v*6+7)/8|0},b.prototype.decodedLength=function(v){return this.maxDecodedLength(v.length-this._getPaddingLength(v))},b.prototype.decode=function(v){if(v.length===0)return new Uint8Array(0);for(var y=this._getPaddingLength(v),w=v.length-y,O=new Uint8Array(this.maxDecodedLength(w)),I=0,q=0,M=0,J=0,F=0,z=0,B=0;q>>4,O[I++]=F<<4|z>>>2,O[I++]=z<<6|B,M|=J&s,M|=F&s,M|=z&s,M|=B&s;if(q>>4,M|=J&s,M|=F&s),q>>2,M|=z&s),q>>8&6,y+=51-v>>>8&-75,y+=61-v>>>8&-15,y+=62-v>>>8&3,String.fromCharCode(y)},b.prototype._decodeChar=function(v){var y=s;return y+=(42-v&v-44)>>>8&-s+v-43+62,y+=(46-v&v-48)>>>8&-s+v-47+63,y+=(47-v&v-58)>>>8&-s+v-48+52,y+=(64-v&v-91)>>>8&-s+v-65+0,y+=(96-v&v-123)>>>8&-s+v-97+26,y},b.prototype._getPaddingLength=function(v){var y=0;if(this._paddingCharacter){for(var w=v.length-1;w>=0&&v[w]===this._paddingCharacter;w--)y++;if(v.length<4||y>2)throw new Error("Base64Coder: incorrect padding")}return y},b}();h.Coder=f;var d=new f;function N(b){return d.encode(b)}h.encode=N;function P(b){return d.decode(b)}h.decode=P;var T=function(b){c(v,b);function v(){return b!==null&&b.apply(this,arguments)||this}return v.prototype._encodeByte=function(y){var w=y;return w+=65,w+=25-y>>>8&6,w+=51-y>>>8&-75,w+=61-y>>>8&-13,w+=62-y>>>8&49,String.fromCharCode(w)},v.prototype._decodeChar=function(y){var w=s;return w+=(44-y&y-46)>>>8&-s+y-45+62,w+=(94-y&y-96)>>>8&-s+y-95+63,w+=(47-y&y-58)>>>8&-s+y-48+52,w+=(64-y&y-91)>>>8&-s+y-65+0,w+=(96-y&y-123)>>>8&-s+y-97+26,w},v}(f);h.URLSafeCoder=T;var S=new T;function C(b){return S.encode(b)}h.encodeURLSafe=C;function x(b){return S.decode(b)}h.decodeURLSafe=x,h.encodedLength=function(b){return d.encodedLength(b)},h.maxDecodedLength=function(b){return d.maxDecodedLength(b)},h.decodedLength=function(b){return d.decodedLength(b)}},function(l,h,a){"use strict";Object.defineProperty(h,"__esModule",{value:!0});var c="utf8: invalid string",s="utf8: invalid source encoding";function f(P){for(var T=new Uint8Array(d(P)),S=0,C=0;C>6,T[S++]=128|x&63):x<55296?(T[S++]=224|x>>12,T[S++]=128|x>>6&63,T[S++]=128|x&63):(C++,x=(x&1023)<<10,x|=P.charCodeAt(C)&1023,x+=65536,T[S++]=240|x>>18,T[S++]=128|x>>12&63,T[S++]=128|x>>6&63,T[S++]=128|x&63)}return T}h.encode=f;function d(P){for(var T=0,S=0;S=P.length-1)throw new Error(c);S++,T+=4}else throw new Error(c)}return T}h.encodedLength=d;function N(P){for(var T=[],S=0;S=P.length)throw new Error(s);var b=P[++S];if((b&192)!==128)throw new Error(s);C=(C&31)<<6|b&63,x=128}else if(C<240){if(S>=P.length-1)throw new Error(s);var b=P[++S],v=P[++S];if((b&192)!==128||(v&192)!==128)throw new Error(s);C=(C&15)<<12|(b&63)<<6|v&63,x=2048}else if(C<248){if(S>=P.length-2)throw new Error(s);var b=P[++S],v=P[++S],y=P[++S];if((b&192)!==128||(v&192)!==128||(y&192)!==128)throw new Error(s);C=(C&15)<<18|(b&63)<<12|(v&63)<<6|y&63,x=65536}else throw new Error(s);if(C=55296&&C<=57343)throw new Error(s);if(C>=65536){if(C>1114111)throw new Error(s);C-=65536,T.push(String.fromCharCode(55296|C>>10)),C=56320|C&1023}}T.push(String.fromCharCode(C))}return T.join("")}h.decode=N},function(l,h,a){l.exports=a(3).default},function(l,h,a){"use strict";a.r(h);var c=function(){function e(t,n){this.lastId=0,this.prefix=t,this.name=n}return e.prototype.create=function(t){this.lastId++;var n=this.lastId,r=this.prefix+n,i=this.name+"["+n+"]",o=!1,u=function(){o||(t.apply(null,arguments),o=!0)};return this[n]=u,{number:n,id:r,name:i,callback:u}},e.prototype.remove=function(t){delete this[t.number]},e}(),s=new c("_pusher_script_","Pusher.ScriptReceivers"),f={VERSION:"7.6.0",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,cluster:"mt1",userAuthentication:{endpoint:"/pusher/user-auth",transport:"ajax"},channelAuthorization:{endpoint:"/pusher/auth",transport:"ajax"},cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},d=f,N=function(){function e(t){this.options=t,this.receivers=t.receivers||s,this.loading={}}return e.prototype.load=function(t,n,r){var i=this;if(i.loading[t]&&i.loading[t].length>0)i.loading[t].push(r);else{i.loading[t]=[r];var o=m.createScriptRequest(i.getPath(t,n)),u=i.receivers.create(function(p){if(i.receivers.remove(u),i.loading[t]){var _=i.loading[t];delete i.loading[t];for(var g=function(E){E||o.cleanup()},k=0;k<_.length;k++)_[k](p,g)}});o.send(u)}},e.prototype.getRoot=function(t){var n,r=m.getDocument().location.protocol;return t&&t.useTLS||r==="https:"?n=this.options.cdn_https:n=this.options.cdn_http,n.replace(/\/*$/,"")+"/"+this.options.version},e.prototype.getPath=function(t,n){return this.getRoot(n)+"/"+t+this.options.suffix+".js"},e}(),P=N,T=new c("_pusher_dependencies","Pusher.DependenciesReceivers"),S=new P({cdn_http:d.cdn_http,cdn_https:d.cdn_https,version:d.VERSION,suffix:d.dependency_suffix,receivers:T}),C={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}},x=function(e){var t="See:",n=C.urls[e];if(!n)return"";var r;return n.fullUrl?r=n.fullUrl:n.path&&(r=C.baseUrl+n.path),r?t+" "+r:""},b={buildLogSuffix:x},v;(function(e){e.UserAuthentication="user-authentication",e.ChannelAuthorization="channel-authorization"})(v||(v={}));var y=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),O=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),I=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),q=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),M=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),J=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),F=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),z=function(e){y(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return Object.setPrototypeOf(i,r.prototype),i}return t}(Error),B=function(e){y(t,e);function t(n,r){var i=this.constructor,o=e.call(this,r)||this;return o.status=n,Object.setPrototypeOf(o,i.prototype),o}return t}(Error),ke=function(e,t,n,r,i){var o=m.createXHR();o.open("POST",n.endpoint,!0),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var u in n.headers)o.setRequestHeader(u,n.headers[u]);if(n.headersProvider!=null){var p=n.headersProvider();for(var u in p)o.setRequestHeader(u,p[u])}return o.onreadystatechange=function(){if(o.readyState===4)if(o.status===200){var _=void 0,g=!1;try{_=JSON.parse(o.responseText),g=!0}catch{i(new B(200,"JSON returned from "+r.toString()+" endpoint was invalid, yet status code was 200. Data was: "+o.responseText),null)}g&&i(null,_)}else{var k="";switch(r){case v.UserAuthentication:k=b.buildLogSuffix("authenticationEndpoint");break;case v.ChannelAuthorization:k="Clients must be authorized to join private or presence channels. "+b.buildLogSuffix("authorizationEndpoint");break}i(new B(o.status,"Unable to retrieve auth string from "+r.toString()+" endpoint - "+("received status: "+o.status+" from "+n.endpoint+". "+k)),null)}},o.send(t),o},Se=ke;function Ce(e){return Ee(Oe(e))}for(var nt=String.fromCharCode,Z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Te={},ct=0,Pe=Z.length;ct>>6)+nt(128|t&63):nt(224|t>>>12&15)+nt(128|t>>>6&63)+nt(128|t&63)},Oe=function(e){return e.replace(/[^\x00-\x7F]/g,xe)},Ae=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0),r=[Z.charAt(n>>>18),Z.charAt(n>>>12&63),t>=2?"=":Z.charAt(n>>>6&63),t>=1?"=":Z.charAt(n&63)];return r.join("")},Ee=window.btoa||function(e){return e.replace(/[\s\S]{1,3}/g,Ae)},Le=function(){function e(t,n,r,i){var o=this;this.clear=n,this.timer=t(function(){o.timer&&(o.timer=i(o.timer))},r)}return e.prototype.isRunning=function(){return this.timer!==null},e.prototype.ensureAborted=function(){this.timer&&(this.clear(this.timer),this.timer=null)},e}(),jt=Le,Nt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();function Re(e){window.clearTimeout(e)}function Ie(e){window.clearInterval(e)}var Q=function(e){Nt(t,e);function t(n,r){return e.call(this,setTimeout,Re,n,function(i){return r(),null})||this}return t}(jt),je=function(e){Nt(t,e);function t(n,r){return e.call(this,setInterval,Ie,n,function(i){return r(),i})||this}return t}(jt),Ne={now:function(){return Date.now?Date.now():new Date().valueOf()},defer:function(e){return new Q(0,e)},method:function(e){for(var t=[],n=1;n0)for(var i=0;i=1002&&e.code<=1004?"backoff":null:e.code===4e3?"tls_only":e.code<4100?"refused":e.code<4200?"backoff":e.code<4300?"retry":"refused"},getCloseError:function(e){return e.code!==1e3&&e.code!==1001?{type:"PusherError",data:{code:e.code,message:e.reason||e.message}}:null}},K=Vt,Cn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tn=function(e){Cn(t,e);function t(n,r){var i=e.call(this)||this;return i.id=n,i.transport=r,i.activityTimeout=r.activityTimeout,i.bindListeners(),i}return t.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},t.prototype.send=function(n){return this.transport.send(n)},t.prototype.send_event=function(n,r,i){var o={event:n,data:r};return i&&(o.channel=i),A.debug("Event sent",o),this.send(K.encodeMessage(o))},t.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})},t.prototype.close=function(){this.transport.close()},t.prototype.bindListeners=function(){var n=this,r={message:function(o){var u;try{u=K.decodeMessage(o)}catch(p){n.emit("error",{type:"MessageParseError",error:p,data:o.data})}if(u!==void 0){switch(A.debug("Event recd",u),u.event){case"pusher:error":n.emit("error",{type:"PusherError",data:u.data});break;case"pusher:ping":n.emit("ping");break;case"pusher:pong":n.emit("pong");break}n.emit("message",u)}},activity:function(){n.emit("activity")},error:function(o){n.emit("error",o)},closed:function(o){i(),o&&o.code&&n.handleCloseEvent(o),n.transport=null,n.emit("closed")}},i=function(){W(r,function(o,u){n.transport.unbind(u,o)})};W(r,function(o,u){n.transport.bind(u,o)})},t.prototype.handleCloseEvent=function(n){var r=K.getCloseAction(n),i=K.getCloseError(n);i&&this.emit("error",i),r&&this.emit(r,{action:r,error:i})},t}(V),Pn=Tn,xn=function(){function e(t,n){this.transport=t,this.callback=n,this.bindListeners()}return e.prototype.close=function(){this.unbindListeners(),this.transport.close()},e.prototype.bindListeners=function(){var t=this;this.onMessage=function(n){t.unbindListeners();var r;try{r=K.processHandshake(n)}catch(i){t.finish("error",{error:i}),t.transport.close();return}r.action==="connected"?t.finish("connected",{connection:new Pn(r.id,t.transport),activityTimeout:r.activityTimeout}):(t.finish(r.action,{error:r.error}),t.transport.close())},this.onClosed=function(n){t.unbindListeners();var r=K.getCloseAction(n)||"backoff",i=K.getCloseError(n);t.finish(r,{error:i})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)},e.prototype.unbindListeners=function(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)},e.prototype.finish=function(t,n){this.callback(U({transport:this.transport,action:t},n))},e}(),On=xn,An=function(){function e(t,n){this.timeline=t,this.options=n||{}}return e.prototype.send=function(t,n){this.timeline.isEmpty()||this.timeline.send(m.TimelineTransport.getAgent(this,t),n)},e}(),En=An,Ln=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rn=function(e){Ln(t,e);function t(n,r){var i=e.call(this,function(o,u){A.debug("No callbacks on "+n+" for "+o)})||this;return i.name=n,i.pusher=r,i.subscribed=!1,i.subscriptionPending=!1,i.subscriptionCancelled=!1,i}return t.prototype.authorize=function(n,r){return r(null,{auth:""})},t.prototype.trigger=function(n,r){if(n.indexOf("client-")!==0)throw new w("Event '"+n+"' does not start with 'client-'");if(!this.subscribed){var i=b.buildLogSuffix("triggeringClientEvents");A.warn("Client event triggered before channel 'subscription_succeeded' event . "+i)}return this.pusher.send_event(n,r,this.name)},t.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},t.prototype.handleEvent=function(n){var r=n.event,i=n.data;if(r==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(n);else if(r==="pusher_internal:subscription_count")this.handleSubscriptionCountEvent(n);else if(r.indexOf("pusher_internal:")!==0){var o={};this.emit(r,i,o)}},t.prototype.handleSubscriptionSucceededEvent=function(n){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",n.data)},t.prototype.handleSubscriptionCountEvent=function(n){n.data.subscription_count&&(this.subscriptionCount=n.data.subscription_count),this.emit("pusher:subscription_count",n.data)},t.prototype.subscribe=function(){var n=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(r,i){r?(n.subscriptionPending=!1,A.error(r.toString()),n.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:r.message},r instanceof B?{status:r.status}:{}))):n.pusher.send_event("pusher:subscribe",{auth:i.auth,channel_data:i.channel_data,channel:n.name})}))},t.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})},t.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},t.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},t}(V),bt=Rn,In=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jn=function(e){In(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.authorize=function(n,r){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:n},r)},t}(bt),mt=jn,Nn=function(){function e(){this.reset()}return e.prototype.get=function(t){return Object.prototype.hasOwnProperty.call(this.members,t)?{id:t,info:this.members[t]}:null},e.prototype.each=function(t){var n=this;W(this.members,function(r,i){t(n.get(i))})},e.prototype.setMyID=function(t){this.myID=t},e.prototype.onSubscription=function(t){this.members=t.presence.hash,this.count=t.presence.count,this.me=this.get(this.myID)},e.prototype.addMember=function(t){return this.get(t.user_id)===null&&this.count++,this.members[t.user_id]=t.user_info,this.get(t.user_id)},e.prototype.removeMember=function(t){var n=this.get(t.user_id);return n&&(delete this.members[t.user_id],this.count--),n},e.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},e}(),qn=Nn,Un=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dn=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(u){u(o)})}return new(n||(n=Promise))(function(o,u){function p(k){try{g(r.next(k))}catch(E){u(E)}}function _(k){try{g(r.throw(k))}catch(E){u(E)}}function g(k){k.done?o(k.value):i(k.value).then(p,_)}g((r=r.apply(e,t||[])).next())})},Hn=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,u;return u={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function p(g){return function(k){return _([g,k])}}function _(g){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=g[0]&2?i.return:g[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,g[1])).done)return o;switch(i=0,o&&(g=[g[0]&2,o.value]),g[0]){case 0:case 1:o=g;break;case 4:return n.label++,{value:g[1],done:!1};case 5:n.label++,i=g[1],g=[0];continue;case 7:g=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(g[0]===6||g[0]===2)){n=0;continue}if(g[0]===3&&(!o||g[1]>o[0]&&g[1]0&&this.emit("connecting_in",Math.round(n/1e3)),this.retryTimer=new Q(n||0,function(){r.disconnectInternally(),r.connect()})},t.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},t.prototype.setUnavailableTimer=function(){var n=this;this.unavailableTimer=new Q(this.options.unavailableTimeout,function(){n.updateState("unavailable")})},t.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},t.prototype.sendActivityCheck=function(){var n=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new Q(this.options.pongTimeout,function(){n.timeline.error({pong_timed_out:n.options.pongTimeout}),n.retryIn(0)})},t.prototype.resetActivityCheck=function(){var n=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new Q(this.activityTimeout,function(){n.sendActivityCheck()}))},t.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},t.prototype.buildConnectionCallbacks=function(n){var r=this;return U({},n,{message:function(i){r.resetActivityCheck(),r.emit("message",i)},ping:function(){r.send_event("pusher:pong",{})},activity:function(){r.resetActivityCheck()},error:function(i){r.emit("error",i)},closed:function(){r.abandonConnection(),r.shouldRetry()&&r.retryIn(1e3)}})},t.prototype.buildHandshakeCallbacks=function(n){var r=this;return U({},n,{connected:function(i){r.activityTimeout=Math.min(r.options.activityTimeout,i.activityTimeout,i.connection.activityTimeout||1/0),r.clearUnavailableTimer(),r.setConnection(i.connection),r.socket_id=r.connection.id,r.updateState("connected",{socket_id:r.socket_id})}})},t.prototype.buildErrorCallbacks=function(){var n=this,r=function(i){return function(o){o.error&&n.emit("error",{type:"WebSocketError",error:o.error}),i(o)}};return{tls_only:r(function(){n.usingTLS=!0,n.updateStrategy(),n.retryIn(0)}),refused:r(function(){n.disconnect()}),backoff:r(function(){n.retryIn(1e3)}),retry:r(function(){n.retryIn(0)})}},t.prototype.setConnection=function(n){this.connection=n;for(var r in this.connectionCallbacks)this.connection.bind(r,this.connectionCallbacks[r]);this.resetActivityCheck()},t.prototype.abandonConnection=function(){if(this.connection){this.stopActivityCheck();for(var n in this.connectionCallbacks)this.connection.unbind(n,this.connectionCallbacks[n]);var r=this.connection;return this.connection=null,r}},t.prototype.updateState=function(n,r){var i=this.state;if(this.state=n,i!==n){var o=n;o==="connected"&&(o+=" with new socket ID "+r.socket_id),A.debug("State changed",i+" -> "+o),this.timeline.info({state:n,params:r}),this.emit("state_change",{previous:i,current:n}),this.emit(n,r)}},t.prototype.shouldRetry=function(){return this.state==="connecting"||this.state==="connected"},t}(V),Gn=Vn,Qn=function(){function e(){this.channels={}}return e.prototype.add=function(t,n){return this.channels[t]||(this.channels[t]=Yn(t,n)),this.channels[t]},e.prototype.all=function(){return Ue(this.channels)},e.prototype.find=function(t){return this.channels[t]},e.prototype.remove=function(t){var n=this.channels[t];return delete this.channels[t],n},e.prototype.disconnect=function(){W(this.channels,function(t){t.disconnect()})},e}(),Kn=Qn;function Yn(e,t){if(e.indexOf("private-encrypted-")===0){if(t.config.nacl)return G.createEncryptedChannel(e,t,t.config.nacl);var n="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",r=b.buildLogSuffix("encryptedChannelSupport");throw new J(n+". "+r)}else{if(e.indexOf("private-")===0)return G.createPrivateChannel(e,t);if(e.indexOf("presence-")===0)return G.createPresenceChannel(e,t);if(e.indexOf("#")===0)throw new O('Cannot create a channel with name "'+e+'".');return G.createChannel(e,t)}}var $n={createChannels:function(){return new Kn},createConnectionManager:function(e,t){return new Gn(e,t)},createChannel:function(e,t){return new bt(e,t)},createPrivateChannel:function(e,t){return new mt(e,t)},createPresenceChannel:function(e,t){return new zn(e,t)},createEncryptedChannel:function(e,t,n){return new Jn(e,t,n)},createTimelineSender:function(e,t){return new En(e,t)},createHandshake:function(e,t){return new On(e,t)},createAssistantToTheTransportManager:function(e,t,n){return new Sn(e,t,n)}},G=$n,Zn=function(){function e(t){this.options=t||{},this.livesLeft=this.options.lives||1/0}return e.prototype.getAssistant=function(t){return G.createAssistantToTheTransportManager(this,t,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},e.prototype.isAlive=function(){return this.livesLeft>0},e.prototype.reportDeath=function(){this.livesLeft-=1},e}(),Gt=Zn,tr=function(){function e(t,n){this.strategies=t,this.loop=!!n.loop,this.failFast=!!n.failFast,this.timeout=n.timeout,this.timeoutLimit=n.timeoutLimit}return e.prototype.isSupported=function(){return zt(this.strategies,j.method("isSupported"))},e.prototype.connect=function(t,n){var r=this,i=this.strategies,o=0,u=this.timeout,p=null,_=function(g,k){k?n(null,k):(o=o+1,r.loop&&(o=o%i.length),o0&&(o=new Q(r.timeout,function(){u.abort(),i(!0)})),u=t.connect(n,function(p,_){p&&o&&o.isRunning()&&!r.failFast||(o&&o.ensureAborted(),i(p,_))}),{abort:function(){o&&o.ensureAborted(),u.abort()},forceMinPriority:function(p){u.forceMinPriority(p)}}},e}(),Y=tr,er=function(){function e(t){this.strategies=t}return e.prototype.isSupported=function(){return zt(this.strategies,j.method("isSupported"))},e.prototype.connect=function(t,n){return nr(this.strategies,t,function(r,i){return function(o,u){if(i[r].error=o,o){rr(i)&&n(!0);return}rt(i,function(p){p.forceMinPriority(u.transport.priority)}),n(null,u)}})},e}(),kt=er;function nr(e,t,n){var r=Dt(e,function(i,o,u,p){return i.connect(t,n(o,p))});return{abort:function(){rt(r,ir)},forceMinPriority:function(i){rt(r,function(o){o.forceMinPriority(i)})}}}function rr(e){return Me(e,function(t){return!!t.error})}function ir(e){!e.error&&!e.aborted&&(e.abort(),e.aborted=!0)}var or=function(){function e(t,n,r){this.strategy=t,this.transports=n,this.ttl=r.ttl||1800*1e3,this.usingTLS=r.useTLS,this.timeline=r.timeline}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,n){var r=this.usingTLS,i=ar(r),o=[this.strategy];if(i&&i.timestamp+this.ttl>=j.now()){var u=this.transports[i.transport];u&&(this.timeline.info({cached:!0,transport:i.transport,latency:i.latency}),o.push(new Y([u],{timeout:i.latency*2+1e3,failFast:!0})))}var p=j.now(),_=o.pop().connect(t,function g(k,E){k?(Qt(r),o.length>0?(p=j.now(),_=o.pop().connect(t,g)):n(k)):(cr(r,E.transport.name,j.now()-p),n(null,E))});return{abort:function(){_.abort()},forceMinPriority:function(g){t=g,_&&_.forceMinPriority(g)}}},e}(),sr=or;function St(e){return"pusherTransport"+(e?"TLS":"NonTLS")}function ar(e){var t=m.getLocalStorage();if(t)try{var n=t[St(e)];if(n)return JSON.parse(n)}catch{Qt(e)}return null}function cr(e,t,n){var r=m.getLocalStorage();if(r)try{r[St(e)]=ut({timestamp:j.now(),transport:t,latency:n})}catch{}}function Qt(e){var t=m.getLocalStorage();if(t)try{delete t[St(e)]}catch{}}var ur=function(){function e(t,n){var r=n.delay;this.strategy=t,this.options={delay:r}}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,n){var r=this.strategy,i,o=new Q(this.options.delay,function(){i=r.connect(t,n)});return{abort:function(){o.ensureAborted(),i&&i.abort()},forceMinPriority:function(u){t=u,i&&i.forceMinPriority(u)}}},e}(),lt=ur,hr=function(){function e(t,n,r){this.test=t,this.trueBranch=n,this.falseBranch=r}return e.prototype.isSupported=function(){var t=this.test()?this.trueBranch:this.falseBranch;return t.isSupported()},e.prototype.connect=function(t,n){var r=this.test()?this.trueBranch:this.falseBranch;return r.connect(t,n)},e}(),it=hr,lr=function(){function e(t){this.strategy=t}return e.prototype.isSupported=function(){return this.strategy.isSupported()},e.prototype.connect=function(t,n){var r=this.strategy.connect(t,function(i,o){o&&r.abort(),n(i,o)});return r},e}(),fr=lr;function ot(e){return function(){return e.isSupported()}}var pr=function(e,t,n){var r={};function i(ce,mi,wi,ki,Si){var ue=n(e,ce,mi,wi,ki,Si);return r[ce]=ue,ue}var o=Object.assign({},t,{hostNonTLS:e.wsHost+":"+e.wsPort,hostTLS:e.wsHost+":"+e.wssPort,httpPath:e.wsPath}),u=Object.assign({},o,{useTLS:!0}),p=Object.assign({},t,{hostNonTLS:e.httpHost+":"+e.httpPort,hostTLS:e.httpHost+":"+e.httpsPort,httpPath:e.httpPath}),_={loop:!0,timeout:15e3,timeoutLimit:6e4},g=new Gt({lives:2,minPingDelay:1e4,maxPingDelay:e.activityTimeout}),k=new Gt({lives:2,minPingDelay:1e4,maxPingDelay:e.activityTimeout}),E=i("ws","ws",3,o,g),X=i("wss","ws",3,u,g),vi=i("sockjs","sockjs",1,p),ne=i("xhr_streaming","xhr_streaming",1,p,k),yi=i("xdr_streaming","xdr_streaming",1,p,k),re=i("xhr_polling","xhr_polling",1,p),gi=i("xdr_polling","xdr_polling",1,p),ie=new Y([E],_),_i=new Y([X],_),bi=new Y([vi],_),oe=new Y([new it(ot(ne),ne,yi)],_),se=new Y([new it(ot(re),re,gi)],_),ae=new Y([new it(ot(oe),new kt([oe,new lt(se,{delay:4e3})]),se)],_),xt=new it(ot(ae),ae,bi),Ot;return t.useTLS?Ot=new kt([ie,new lt(xt,{delay:2e3})]):Ot=new kt([ie,new lt(_i,{delay:2e3}),new lt(xt,{delay:5e3})]),new sr(new fr(new it(ot(E),Ot,xt)),r,{ttl:18e5,timeline:t.timeline,useTLS:t.useTLS})},dr=pr,vr=function(){var e=this;e.timeline.info(e.buildTimelineMessage({transport:e.name+(e.options.useTLS?"s":"")})),e.hooks.isInitialized()?e.changeState("initialized"):e.hooks.file?(e.changeState("initializing"),S.load(e.hooks.file,{useTLS:e.options.useTLS},function(t,n){e.hooks.isInitialized()?(e.changeState("initialized"),n(!0)):(t&&e.onError(t),e.onClose(),n(!1))})):e.onClose()},yr={getRequest:function(e){var t=new window.XDomainRequest;return t.ontimeout=function(){e.emit("error",new I),e.close()},t.onerror=function(n){e.emit("error",n),e.close()},t.onprogress=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText)},t.onload=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText),e.emit("finished",200),e.close()},t},abortRequest:function(e){e.ontimeout=e.onerror=e.onprogress=e.onload=null,e.abort()}},gr=yr,_r=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),br=256*1024,mr=function(e){_r(t,e);function t(n,r,i){var o=e.call(this)||this;return o.hooks=n,o.method=r,o.url=i,o}return t.prototype.start=function(n){var r=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){r.close()},m.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(n)},t.prototype.close=function(){this.unloader&&(m.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},t.prototype.onChunk=function(n,r){for(;;){var i=this.advanceBuffer(r);if(i)this.emit("chunk",{status:n,data:i});else break}this.isBufferTooLong(r)&&this.emit("buffer_too_long")},t.prototype.advanceBuffer=function(n){var r=n.slice(this.position),i=r.indexOf(` +`);return i!==-1?(this.position+=i+1,r.slice(0,i)):null},t.prototype.isBufferTooLong=function(n){return this.position===n.length&&n.length>br},t}(V),wr=mr,Ct;(function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSED=3]="CLOSED"})(Ct||(Ct={}));var $=Ct,kr=1,Sr=function(){function e(t,n){this.hooks=t,this.session=Yt(1e3)+"/"+xr(8),this.location=Cr(n),this.readyState=$.CONNECTING,this.openStream()}return e.prototype.send=function(t){return this.sendRaw(JSON.stringify([t]))},e.prototype.ping=function(){this.hooks.sendHeartbeat(this)},e.prototype.close=function(t,n){this.onClose(t,n,!0)},e.prototype.sendRaw=function(t){if(this.readyState===$.OPEN)try{return m.createSocketRequest("POST",Kt(Tr(this.location,this.session))).start(t),!0}catch{return!1}else return!1},e.prototype.reconnect=function(){this.closeStream(),this.openStream()},e.prototype.onClose=function(t,n,r){this.closeStream(),this.readyState=$.CLOSED,this.onclose&&this.onclose({code:t,reason:n,wasClean:r})},e.prototype.onChunk=function(t){if(t.status===200){this.readyState===$.OPEN&&this.onActivity();var n,r=t.data.slice(0,1);switch(r){case"o":n=JSON.parse(t.data.slice(1)||"{}"),this.onOpen(n);break;case"a":n=JSON.parse(t.data.slice(1)||"[]");for(var i=0;i0&&e.onChunk(n.status,n.responseText);break;case 4:n.responseText&&n.responseText.length>0&&e.onChunk(n.status,n.responseText),e.emit("finished",n.status),e.close();break}},n},abortRequest:function(e){e.onreadystatechange=null,e.abort()}},jr=Ir,Nr={createStreamingSocket:function(e){return this.createSocket(Er,e)},createPollingSocket:function(e){return this.createSocket(Rr,e)},createSocket:function(e,t){return new Or(e,t)},createXHR:function(e,t){return this.createRequest(jr,e,t)},createRequest:function(e,t,n){return new wr(e,t,n)}},$t=Nr;$t.createXDR=function(e,t){return this.createRequest(gr,e,t)};var qr=$t,Ur={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:s,DependenciesReceivers:T,getDefaultStrategy:dr,Transports:_n,transportConnectionInitializer:vr,HTTPFactory:qr,TimelineTransport:Ze,getXHRAPI:function(){return window.XMLHttpRequest},getWebSocketAPI:function(){return window.WebSocket||window.MozWebSocket},setup:function(e){var t=this;window.Pusher=e;var n=function(){t.onDocumentBody(e.ready)};window.JSON?n():S.load("json2",{},n)},getDocument:function(){return document},getProtocol:function(){return this.getDocument().location.protocol},getAuthorizers:function(){return{ajax:Se,jsonp:We}},onDocumentBody:function(e){var t=this;document.body?e():setTimeout(function(){t.onDocumentBody(e)},0)},createJSONPRequest:function(e,t){return new Ke(e,t)},createScriptRequest:function(e){return new Ge(e)},getLocalStorage:function(){try{return window.localStorage}catch{return}},createXHR:function(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest:function(){var e=this.getXHRAPI();return new e},createMicrosoftXHR:function(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork:function(){return wn},createWebSocket:function(e){var t=this.getWebSocketAPI();return new t(e)},createSocketRequest:function(e,t){if(this.isXHRSupported())return this.HTTPFactory.createXHR(e,t);if(this.isXDRSupported(t.indexOf("https:")===0))return this.HTTPFactory.createXDR(e,t);throw"Cross-origin HTTP requests are not supported"},isXHRSupported:function(){var e=this.getXHRAPI();return!!e&&new e().withCredentials!==void 0},isXDRSupported:function(e){var t=e?"https:":"http:",n=this.getProtocol();return!!window.XDomainRequest&&n===t},addUnloadListener:function(e){window.addEventListener!==void 0?window.addEventListener("unload",e,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",e)},removeUnloadListener:function(e){window.addEventListener!==void 0?window.removeEventListener("unload",e,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",e)},randomInt:function(e){var t=function(){var n=window.crypto||window.msCrypto,r=n.getRandomValues(new Uint32Array(1))[0];return r/Math.pow(2,32)};return Math.floor(t()*e)}},m=Ur,Tt;(function(e){e[e.ERROR=3]="ERROR",e[e.INFO=6]="INFO",e[e.DEBUG=7]="DEBUG"})(Tt||(Tt={}));var ft=Tt,Dr=function(){function e(t,n,r){this.key=t,this.session=n,this.events=[],this.options=r||{},this.sent=0,this.uniqueID=0}return e.prototype.log=function(t,n){t<=this.options.level&&(this.events.push(U({},n,{timestamp:j.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},e.prototype.error=function(t){this.log(ft.ERROR,t)},e.prototype.info=function(t){this.log(ft.INFO,t)},e.prototype.debug=function(t){this.log(ft.DEBUG,t)},e.prototype.isEmpty=function(){return this.events.length===0},e.prototype.send=function(t,n){var r=this,i=U({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],t(i,function(o,u){o||r.sent++,n&&n(o,u)}),!0},e.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},e}(),Hr=Dr,Mr=function(){function e(t,n,r,i){this.name=t,this.priority=n,this.transport=r,this.options=i||{}}return e.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},e.prototype.connect=function(t,n){var r=this;if(this.isSupported()){if(this.priority"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ii(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function ji(l,h){if(h&&(typeof h=="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ii(l)}function H(l){var h=Ri();return function(){var c=pt(l),s;if(h){var f=pt(this).constructor;s=Reflect.construct(c,arguments,f)}else s=c.apply(this,arguments);return ji(this,s)}}var Et=function(){function l(){L(this,l)}return R(l,[{key:"listenForWhisper",value:function(a,c){return this.listen(".client-"+a,c)}},{key:"notification",value:function(a){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",a)}},{key:"stopListeningForWhisper",value:function(a,c){return this.stopListening(".client-"+a,c)}}]),l}(),de=function(){function l(h){L(this,l),this.namespace=h}return R(l,[{key:"format",value:function(a){return[".","\\"].includes(a.charAt(0))?a.substring(1):(this.namespace&&(a=this.namespace+"."+a),a.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(a){this.namespace=a}}]),l}();function Ni(l){try{new l}catch(h){if(h.message.includes("is not a constructor"))return!1}return!0}var Lt=function(l){D(a,l);var h=H(a);function a(c,s,f){var d;return L(this,a),d=h.call(this),d.name=s,d.pusher=c,d.options=f,d.eventFormatter=new de(d.options.namespace),d.subscribe(),d}return R(a,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(s,f){return this.on(this.eventFormatter.format(s),f),this}},{key:"listenToAll",value:function(s){var f=this;return this.subscription.bind_global(function(d,N){if(!d.startsWith("pusher:")){var P=f.options.namespace.replace(/\./g,"\\"),T=d.startsWith(P)?d.substring(P.length+1):"."+d;s(T,N)}}),this}},{key:"stopListening",value:function(s,f){return f?this.subscription.unbind(this.eventFormatter.format(s),f):this.subscription.unbind(this.eventFormatter.format(s)),this}},{key:"stopListeningToAll",value:function(s){return s?this.subscription.unbind_global(s):this.subscription.unbind_global(),this}},{key:"subscribed",value:function(s){return this.on("pusher:subscription_succeeded",function(){s()}),this}},{key:"error",value:function(s){return this.on("pusher:subscription_error",function(f){s(f)}),this}},{key:"on",value:function(s,f){return this.subscription.bind(s,f),this}}]),a}(Et),ve=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"whisper",value:function(s,f){return this.pusher.channels.channels[this.name].trigger("client-".concat(s),f),this}}]),a}(Lt),qi=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"whisper",value:function(s,f){return this.pusher.channels.channels[this.name].trigger("client-".concat(s),f),this}}]),a}(Lt),Ui=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"here",value:function(s){return this.on("pusher:subscription_succeeded",function(f){s(Object.keys(f.members).map(function(d){return f.members[d]}))}),this}},{key:"joining",value:function(s){return this.on("pusher:member_added",function(f){s(f.info)}),this}},{key:"whisper",value:function(s,f){return this.pusher.channels.channels[this.name].trigger("client-".concat(s),f),this}},{key:"leaving",value:function(s){return this.on("pusher:member_removed",function(f){s(f.info)}),this}}]),a}(ve),ye=function(l){D(a,l);var h=H(a);function a(c,s,f){var d;return L(this,a),d=h.call(this),d.events={},d.listeners={},d.name=s,d.socket=c,d.options=f,d.eventFormatter=new de(d.options.namespace),d.subscribe(),d}return R(a,[{key:"subscribe",value:function(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"unsubscribe",value:function(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"listen",value:function(s,f){return this.on(this.eventFormatter.format(s),f),this}},{key:"stopListening",value:function(s,f){return this.unbindEvent(this.eventFormatter.format(s),f),this}},{key:"subscribed",value:function(s){return this.on("connect",function(f){s(f)}),this}},{key:"error",value:function(s){return this}},{key:"on",value:function(s,f){var d=this;return this.listeners[s]=this.listeners[s]||[],this.events[s]||(this.events[s]=function(N,P){d.name===N&&d.listeners[s]&&d.listeners[s].forEach(function(T){return T(P)})},this.socket.on(s,this.events[s])),this.listeners[s].push(f),this}},{key:"unbind",value:function(){var s=this;Object.keys(this.events).forEach(function(f){s.unbindEvent(f)})}},{key:"unbindEvent",value:function(s,f){this.listeners[s]=this.listeners[s]||[],f&&(this.listeners[s]=this.listeners[s].filter(function(d){return d!==f})),(!f||this.listeners[s].length===0)&&(this.events[s]&&(this.socket.removeListener(s,this.events[s]),delete this.events[s]),delete this.listeners[s])}}]),a}(Et),ge=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"whisper",value:function(s,f){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(s),data:f}),this}}]),a}(ye),Di=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"here",value:function(s){return this.on("presence:subscribed",function(f){s(f.map(function(d){return d.user_info}))}),this}},{key:"joining",value:function(s){return this.on("presence:joining",function(f){return s(f.user_info)}),this}},{key:"whisper",value:function(s,f){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(s),data:f}),this}},{key:"leaving",value:function(s){return this.on("presence:leaving",function(f){return s(f.user_info)}),this}}]),a}(ge),dt=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}},{key:"listen",value:function(s,f){return this}},{key:"listenToAll",value:function(s){return this}},{key:"stopListening",value:function(s,f){return this}},{key:"subscribed",value:function(s){return this}},{key:"error",value:function(s){return this}},{key:"on",value:function(s,f){return this}}]),a}(Et),_e=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"whisper",value:function(s,f){return this}}]),a}(dt),Hi=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"whisper",value:function(s,f){return this}}]),a}(dt),Mi=function(l){D(a,l);var h=H(a);function a(){return L(this,a),h.apply(this,arguments)}return R(a,[{key:"here",value:function(s){return this}},{key:"joining",value:function(s){return this}},{key:"whisper",value:function(s,f){return this}},{key:"leaving",value:function(s){return this}}]),a}(_e),Rt=function(){function l(h){L(this,l),this._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",userAuthentication:{endpoint:"/broadcasting/user-auth",headers:{}},broadcaster:"pusher",csrfToken:null,bearerToken:null,host:null,key:null,namespace:"App.Events"},this.setOptions(h),this.connect()}return R(l,[{key:"setOptions",value:function(a){this.options=at(this._defaultOptions,a);var c=this.csrfToken();return c&&(this.options.auth.headers["X-CSRF-TOKEN"]=c,this.options.userAuthentication.headers["X-CSRF-TOKEN"]=c),c=this.options.bearerToken,c&&(this.options.auth.headers.Authorization="Bearer "+c,this.options.userAuthentication.headers.Authorization="Bearer "+c),a}},{key:"csrfToken",value:function(){var a;return typeof window<"u"&&window.Laravel&&window.Laravel.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:typeof document<"u"&&typeof document.querySelector=="function"&&(a=document.querySelector('meta[name="csrf-token"]'))?a.getAttribute("content"):null}}]),l}(),fe=function(l){D(a,l);var h=H(a);function a(){var c;return L(this,a),c=h.apply(this,arguments),c.channels={},c}return R(a,[{key:"connect",value:function(){typeof this.options.client<"u"?this.pusher=this.options.client:this.options.Pusher?this.pusher=new this.options.Pusher(this.options.key,this.options):this.pusher=new Pusher(this.options.key,this.options)}},{key:"signin",value:function(){this.pusher.signin()}},{key:"listen",value:function(s,f,d){return this.channel(s).listen(f,d)}},{key:"channel",value:function(s){return this.channels[s]||(this.channels[s]=new Lt(this.pusher,s,this.options)),this.channels[s]}},{key:"privateChannel",value:function(s){return this.channels["private-"+s]||(this.channels["private-"+s]=new ve(this.pusher,"private-"+s,this.options)),this.channels["private-"+s]}},{key:"encryptedPrivateChannel",value:function(s){return this.channels["private-encrypted-"+s]||(this.channels["private-encrypted-"+s]=new qi(this.pusher,"private-encrypted-"+s,this.options)),this.channels["private-encrypted-"+s]}},{key:"presenceChannel",value:function(s){return this.channels["presence-"+s]||(this.channels["presence-"+s]=new Ui(this.pusher,"presence-"+s,this.options)),this.channels["presence-"+s]}},{key:"leave",value:function(s){var f=this,d=[s,"private-"+s,"private-encrypted-"+s,"presence-"+s];d.forEach(function(N,P){f.leaveChannel(N)})}},{key:"leaveChannel",value:function(s){this.channels[s]&&(this.channels[s].unsubscribe(),delete this.channels[s])}},{key:"socketId",value:function(){return this.pusher.connection.socket_id}},{key:"disconnect",value:function(){this.pusher.disconnect()}}]),a}(Rt),pe=function(l){D(a,l);var h=H(a);function a(){var c;return L(this,a),c=h.apply(this,arguments),c.channels={},c}return R(a,[{key:"connect",value:function(){var s=this,f=this.getSocketIO();return this.socket=f(this.options.host,this.options),this.socket.on("reconnect",function(){Object.values(s.channels).forEach(function(d){d.subscribe()})}),this.socket}},{key:"getSocketIO",value:function(){if(typeof this.options.client<"u")return this.options.client;if(typeof io<"u")return io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}},{key:"listen",value:function(s,f,d){return this.channel(s).listen(f,d)}},{key:"channel",value:function(s){return this.channels[s]||(this.channels[s]=new ye(this.socket,s,this.options)),this.channels[s]}},{key:"privateChannel",value:function(s){return this.channels["private-"+s]||(this.channels["private-"+s]=new ge(this.socket,"private-"+s,this.options)),this.channels["private-"+s]}},{key:"presenceChannel",value:function(s){return this.channels["presence-"+s]||(this.channels["presence-"+s]=new Di(this.socket,"presence-"+s,this.options)),this.channels["presence-"+s]}},{key:"leave",value:function(s){var f=this,d=[s,"private-"+s,"presence-"+s];d.forEach(function(N){f.leaveChannel(N)})}},{key:"leaveChannel",value:function(s){this.channels[s]&&(this.channels[s].unsubscribe(),delete this.channels[s])}},{key:"socketId",value:function(){return this.socket.id}},{key:"disconnect",value:function(){this.socket.disconnect()}}]),a}(Rt),zi=function(l){D(a,l);var h=H(a);function a(){var c;return L(this,a),c=h.apply(this,arguments),c.channels={},c}return R(a,[{key:"connect",value:function(){}},{key:"listen",value:function(s,f,d){return new dt}},{key:"channel",value:function(s){return new dt}},{key:"privateChannel",value:function(s){return new _e}},{key:"encryptedPrivateChannel",value:function(s){return new Hi}},{key:"presenceChannel",value:function(s){return new Mi}},{key:"leave",value:function(s){}},{key:"leaveChannel",value:function(s){}},{key:"socketId",value:function(){return"fake-socket-id"}},{key:"disconnect",value:function(){}}]),a}(Rt),be=function(){function l(h){L(this,l),this.options=h,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}return R(l,[{key:"channel",value:function(a){return this.connector.channel(a)}},{key:"connect",value:function(){if(this.options.broadcaster=="reverb")this.connector=new fe(at(at({},this.options),{cluster:""}));else if(this.options.broadcaster=="pusher")this.connector=new fe(this.options);else if(this.options.broadcaster=="socket.io")this.connector=new pe(this.options);else if(this.options.broadcaster=="null")this.connector=new zi(this.options);else if(typeof this.options.broadcaster=="function"&&Ni(this.options.broadcaster))this.connector=new this.options.broadcaster(this.options);else throw new Error("Broadcaster ".concat(st(this.options.broadcaster)," ").concat(this.options.broadcaster," is not supported."))}},{key:"disconnect",value:function(){this.connector.disconnect()}},{key:"join",value:function(a){return this.connector.presenceChannel(a)}},{key:"leave",value:function(a){this.connector.leave(a)}},{key:"leaveChannel",value:function(a){this.connector.leaveChannel(a)}},{key:"leaveAllChannels",value:function(){for(var a in this.connector.channels)this.leaveChannel(a)}},{key:"listen",value:function(a,c,s){return this.connector.listen(a,c,s)}},{key:"private",value:function(a){return this.connector.privateChannel(a)}},{key:"encryptedPrivate",value:function(a){if(this.connector instanceof pe)throw new Error("Broadcaster ".concat(st(this.options.broadcaster)," ").concat(this.options.broadcaster," does not support encrypted private channels."));return this.connector.encryptedPrivateChannel(a)}},{key:"socketId",value:function(){return this.connector.socketId()}},{key:"registerInterceptors",value:function(){typeof Vue=="function"&&Vue.http&&this.registerVueRequestInterceptor(),typeof axios=="function"&&this.registerAxiosRequestInterceptor(),typeof jQuery=="function"&&this.registerjQueryAjaxSetup(),(typeof Turbo>"u"?"undefined":st(Turbo))==="object"&&this.registerTurboRequestInterceptor()}},{key:"registerVueRequestInterceptor",value:function(){var a=this;Vue.http.interceptors.push(function(c,s){a.socketId()&&c.headers.set("X-Socket-ID",a.socketId()),s()})}},{key:"registerAxiosRequestInterceptor",value:function(){var a=this;axios.interceptors.request.use(function(c){return a.socketId()&&(c.headers["X-Socket-Id"]=a.socketId()),c})}},{key:"registerjQueryAjaxSetup",value:function(){var a=this;typeof jQuery.ajax<"u"&&jQuery.ajaxPrefilter(function(c,s,f){a.socketId()&&f.setRequestHeader("X-Socket-Id",a.socketId())})}},{key:"registerTurboRequestInterceptor",value:function(){var a=this;document.addEventListener("turbo:before-fetch-request",function(c){c.detail.fetchOptions.headers["X-Socket-Id"]=a.socketId()})}}]),l}();var we=Li(me(),1);window.EchoFactory=be;window.Pusher=we.default;})(); +/*! Bundled license information: + +pusher-js/dist/web/pusher.js: + (*! + * Pusher JavaScript Library v7.6.0 + * https://pusher.com/ + * + * Copyright 2020, Pusher + * Released under the MIT licence. + *) +*/ diff --git a/public/js/filament/forms/components/color-picker.js b/public/js/filament/forms/components/color-picker.js new file mode 100644 index 000000000..6d807128c --- /dev/null +++ b/public/js/filament/forms/components/color-picker.js @@ -0,0 +1 @@ +var c=(e,t=0,r=1)=>e>r?r:eMath.round(r*e)/r;var nt={grad:360/400,turn:360,rad:360/(Math.PI*2)},F=e=>G(v(e)),v=e=>(e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?n(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?n(parseInt(e.substring(6,8),16)/255,2):1}),at=(e,t="deg")=>Number(e)*(nt[t]||1),it=e=>{let r=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return r?lt({h:at(r[1],r[2]),s:Number(r[3]),l:Number(r[4]),a:r[5]===void 0?1:Number(r[5])/(r[6]?100:1)}):{h:0,s:0,v:0,a:1}},J=it,lt=({h:e,s:t,l:r,a:o})=>(t*=(r<50?r:100-r)/100,{h:e,s:t>0?2*t/(r+t)*100:0,v:r+t,a:o}),X=e=>ct(A(e)),Y=({h:e,s:t,v:r,a:o})=>{let s=(200-t)*r/100;return{h:n(e),s:n(s>0&&s<200?t*r/100/(s<=100?s:200-s)*100:0),l:n(s/2),a:n(o,2)}};var d=e=>{let{h:t,s:r,l:o}=Y(e);return`hsl(${t}, ${r}%, ${o}%)`},$=e=>{let{h:t,s:r,l:o,a:s}=Y(e);return`hsla(${t}, ${r}%, ${o}%, ${s})`},A=({h:e,s:t,v:r,a:o})=>{e=e/360*6,t=t/100,r=r/100;let s=Math.floor(e),a=r*(1-t),i=r*(1-(e-s)*t),l=r*(1-(1-e+s)*t),q=s%6;return{r:n([r,i,a,a,l,r][q]*255),g:n([l,r,r,i,a,a][q]*255),b:n([a,a,l,r,r,i][q]*255),a:n(o,2)}},B=e=>{let{r:t,g:r,b:o}=A(e);return`rgb(${t}, ${r}, ${o})`},D=e=>{let{r:t,g:r,b:o,a:s}=A(e);return`rgba(${t}, ${r}, ${o}, ${s})`};var I=e=>{let r=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return r?G({r:Number(r[1])/(r[2]?100/255:1),g:Number(r[3])/(r[4]?100/255:1),b:Number(r[5])/(r[6]?100/255:1),a:r[7]===void 0?1:Number(r[7])/(r[8]?100:1)}):{h:0,s:0,v:0,a:1}},U=I,b=e=>{let t=e.toString(16);return t.length<2?"0"+t:t},ct=({r:e,g:t,b:r,a:o})=>{let s=o<1?b(n(o*255)):"";return"#"+b(e)+b(t)+b(r)+s},G=({r:e,g:t,b:r,a:o})=>{let s=Math.max(e,t,r),a=s-Math.min(e,t,r),i=a?s===e?(t-r)/a:s===t?2+(r-e)/a:4+(e-t)/a:0;return{h:n(60*(i<0?i+6:i)),s:n(s?a/s*100:0),v:n(s/255*100),a:o}};var L=(e,t)=>{if(e===t)return!0;for(let r in e)if(e[r]!==t[r])return!1;return!0},h=(e,t)=>e.replace(/\s/g,"")===t.replace(/\s/g,""),K=(e,t)=>e.toLowerCase()===t.toLowerCase()?!0:L(v(e),v(t));var Q={},H=e=>{let t=Q[e];return t||(t=document.createElement("template"),t.innerHTML=e,Q[e]=t),t},f=(e,t,r)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))};var m=!1,O=e=>"touches"in e,pt=e=>m&&!O(e)?!1:(m||(m=O(e)),!0),W=(e,t)=>{let r=O(t)?t.touches[0]:t,o=e.el.getBoundingClientRect();f(e.el,"move",e.getMove({x:c((r.pageX-(o.left+window.pageXOffset))/o.width),y:c((r.pageY-(o.top+window.pageYOffset))/o.height)}))},ut=(e,t)=>{let r=t.keyCode;r>40||e.xy&&r<37||r<33||(t.preventDefault(),f(e.el,"move",e.getMove({x:r===39?.01:r===37?-.01:r===34?.05:r===33?-.05:r===35?1:r===36?-1:0,y:r===40?.01:r===38?-.01:0},!0)))},u=class{constructor(t,r,o,s){let a=H(`
`);t.appendChild(a.content.cloneNode(!0));let i=t.querySelector(`[part=${r}]`);i.addEventListener("mousedown",this),i.addEventListener("touchstart",this),i.addEventListener("keydown",this),this.el=i,this.xy=s,this.nodes=[i.firstChild,i]}set dragging(t){let r=t?document.addEventListener:document.removeEventListener;r(m?"touchmove":"mousemove",this),r(m?"touchend":"mouseup",this)}handleEvent(t){switch(t.type){case"mousedown":case"touchstart":if(t.preventDefault(),!pt(t)||!m&&t.button!=0)return;this.el.focus(),W(this,t),this.dragging=!0;break;case"mousemove":case"touchmove":t.preventDefault(),W(this,t);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":ut(this,t);break}}style(t){t.forEach((r,o)=>{for(let s in r)this.nodes[o].style.setProperty(s,r[s])})}};var S=class extends u{constructor(t){super(t,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:t}){this.h=t,this.style([{left:`${t/360*100}%`,color:d({h:t,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${n(t)}`)}getMove(t,r){return{h:r?c(this.h+t.x*360,0,360):360*t.x}}};var T=class extends u{constructor(t){super(t,"saturation",'aria-label="Color"',!0)}update(t){this.hsva=t,this.style([{top:`${100-t.v}%`,left:`${t.s}%`,color:d(t)},{"background-color":d({h:t.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${n(t.s)}%, Brightness ${n(t.v)}%`)}getMove(t,r){return{s:r?c(this.hsva.s+t.x*100,0,100):t.x*100,v:r?c(this.hsva.v-t.y*100,0,100):Math.round(100-t.y*100)}}};var Z=':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}';var tt="[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}";var rt="[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}";var w=Symbol("same"),R=Symbol("color"),et=Symbol("hsva"),_=Symbol("update"),ot=Symbol("parts"),g=Symbol("css"),x=Symbol("sliders"),p=class extends HTMLElement{static get observedAttributes(){return["color"]}get[g](){return[Z,tt,rt]}get[x](){return[T,S]}get color(){return this[R]}set color(t){if(!this[w](t)){let r=this.colorModel.toHsva(t);this[_](r),this[R]=t}}constructor(){super();let t=H(``),r=this.attachShadow({mode:"open"});r.appendChild(t.content.cloneNode(!0)),r.addEventListener("move",this),this[ot]=this[x].map(o=>new o(r))}connectedCallback(){if(this.hasOwnProperty("color")){let t=this.color;delete this.color,this.color=t}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(t,r,o){let s=this.colorModel.fromAttr(o);this[w](s)||(this.color=s)}handleEvent(t){let r=this[et],o={...r,...t.detail};this[_](o);let s;!L(o,r)&&!this[w](s=this.colorModel.fromHsva(o))&&(this[R]=s,f(this,"color-changed",{value:s}))}[w](t){return this.color&&this.colorModel.equal(t,this.color)}[_](t){this[et]=t,this[ot].forEach(r=>r.update(t))}};var dt={defaultColor:"#000",toHsva:F,fromHsva:({h:e,s:t,v:r})=>X({h:e,s:t,v:r,a:1}),equal:K,fromAttr:e=>e},y=class extends p{get colorModel(){return dt}};var P=class extends y{};customElements.define("hex-color-picker",P);var ht={defaultColor:"hsl(0, 0%, 0%)",toHsva:J,fromHsva:d,equal:h,fromAttr:e=>e},M=class extends p{get colorModel(){return ht}};var z=class extends M{};customElements.define("hsl-string-color-picker",z);var mt={defaultColor:"rgb(0, 0, 0)",toHsva:U,fromHsva:B,equal:h,fromAttr:e=>e},C=class extends p{get colorModel(){return mt}};var V=class extends C{};customElements.define("rgb-string-color-picker",V);var k=class extends u{constructor(t){super(t,"alpha",'aria-label="Alpha" aria-valuemin="0" aria-valuemax="1"',!1)}update(t){this.hsva=t;let r=$({...t,a:0}),o=$({...t,a:1}),s=t.a*100;this.style([{left:`${s}%`,color:$(t)},{"--gradient":`linear-gradient(90deg, ${r}, ${o}`}]);let a=n(s);this.el.setAttribute("aria-valuenow",`${a}`),this.el.setAttribute("aria-valuetext",`${a}%`)}getMove(t,r){return{a:r?c(this.hsva.a+t.x):t.x}}};var st=`[part=alpha]{flex:0 0 24px}[part=alpha]::after{display:block;content:"";position:absolute;top:0;left:0;right:0;bottom:0;border-radius:inherit;background-image:var(--gradient);box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part^=alpha]{background-color:#fff;background-image:url('data:image/svg+xml,')}[part=alpha-pointer]{top:50%}`;var E=class extends p{get[g](){return[...super[g],st]}get[x](){return[...super[x],k]}};var ft={defaultColor:"rgba(0, 0, 0, 1)",toHsva:I,fromHsva:D,equal:h,fromAttr:e=>e},N=class extends E{get colorModel(){return ft}};var j=class extends N{};customElements.define("rgba-string-color-picker",j);function gt({isAutofocused:e,isDisabled:t,isLive:r,isLiveDebounced:o,isLiveOnBlur:s,liveDebounce:a,state:i}){return{state:i,init:function(){this.state===null||this.state===""||this.setState(this.state),e&&this.togglePanelVisibility(this.$refs.input),this.$refs.input.addEventListener("change",l=>{this.setState(l.target.value)}),this.$refs.panel.addEventListener("color-changed",l=>{this.setState(l.detail.value),!(s||!(r||o))&&setTimeout(()=>{this.state===l.detail.value&&this.commitState()},o?a:250)}),(r||o||s)&&new MutationObserver(()=>this.isOpen()?null:this.commitState()).observe(this.$refs.panel,{attributes:!0,childList:!0})},togglePanelVisibility:function(){t||this.$refs.panel.toggle(this.$refs.input)},setState:function(l){this.state=l,this.$refs.input.value=l,this.$refs.panel.color=l},isOpen:function(){return this.$refs.panel.style.display==="block"},commitState:function(){JSON.stringify(this.$wire.__instance.canonical)!==JSON.stringify(this.$wire.__instance.ephemeral)&&this.$wire.$commit()}}}export{gt as default}; diff --git a/public/js/filament/forms/components/date-time-picker.js b/public/js/filament/forms/components/date-time-picker.js new file mode 100644 index 000000000..b4e38cd22 --- /dev/null +++ b/public/js/filament/forms/components/date-time-picker.js @@ -0,0 +1 @@ +var vi=Object.create;var fn=Object.defineProperty;var gi=Object.getOwnPropertyDescriptor;var Si=Object.getOwnPropertyNames;var bi=Object.getPrototypeOf,ki=Object.prototype.hasOwnProperty;var k=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var Hi=(n,t,s,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of Si(t))!ki.call(n,e)&&e!==s&&fn(n,e,{get:()=>t[e],enumerable:!(i=gi(t,e))||i.enumerable});return n};var de=(n,t,s)=>(s=n!=null?vi(bi(n)):{},Hi(t||!n||!n.__esModule?fn(s,"default",{value:n,enumerable:!0}):s,n));var bn=k((He,je)=>{(function(n,t){typeof He=="object"&&typeof je<"u"?je.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_advancedFormat=t()})(He,function(){"use strict";return function(n,t){var s=t.prototype,i=s.format;s.format=function(e){var r=this,a=this.$locale();if(!this.isValid())return i.bind(this)(e);var u=this.$utils(),o=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((r.$M+1)/3);case"Do":return a.ordinal(r.$D);case"gggg":return r.weekYear();case"GGGG":return r.isoWeekYear();case"wo":return a.ordinal(r.week(),"W");case"w":case"ww":return u.s(r.week(),d==="w"?1:2,"0");case"W":case"WW":return u.s(r.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return u.s(String(r.$H===0?24:r.$H),d==="k"?1:2,"0");case"X":return Math.floor(r.$d.getTime()/1e3);case"x":return r.$d.getTime();case"z":return"["+r.offsetName()+"]";case"zzz":return"["+r.offsetName("long")+"]";default:return d}});return i.bind(this)(o)}}})});var kn=k((Te,we)=>{(function(n,t){typeof Te=="object"&&typeof we<"u"?we.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_customParseFormat=t()})(Te,function(){"use strict";var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,i=/\d\d/,e=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,a={},u=function(m){return(m=+m)+(m>68?1900:2e3)},o=function(m){return function(Y){this[m]=+Y}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(Y){if(!Y||Y==="Z")return 0;var L=Y.match(/([+-]|\d\d)/g),D=60*L[1]+(+L[2]||0);return D===0?0:L[0]==="+"?-D:D}(m)}],_=function(m){var Y=a[m];return Y&&(Y.indexOf?Y:Y.s.concat(Y.f))},y=function(m,Y){var L,D=a.meridiem;if(D){for(var w=1;w<=24;w+=1)if(m.indexOf(D(w,0,Y))>-1){L=w>12;break}}else L=m===(Y?"pm":"PM");return L},l={A:[r,function(m){this.afternoon=y(m,!1)}],a:[r,function(m){this.afternoon=y(m,!0)}],Q:[s,function(m){this.month=3*(m-1)+1}],S:[s,function(m){this.milliseconds=100*+m}],SS:[i,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[e,o("seconds")],ss:[e,o("seconds")],m:[e,o("minutes")],mm:[e,o("minutes")],H:[e,o("hours")],h:[e,o("hours")],HH:[e,o("hours")],hh:[e,o("hours")],D:[e,o("day")],DD:[i,o("day")],Do:[r,function(m){var Y=a.ordinal,L=m.match(/\d+/);if(this.day=L[0],Y)for(var D=1;D<=31;D+=1)Y(D).replace(/\[|\]/g,"")===m&&(this.day=D)}],w:[e,o("week")],ww:[i,o("week")],M:[e,o("month")],MM:[i,o("month")],MMM:[r,function(m){var Y=_("months"),L=(_("monthsShort")||Y.map(function(D){return D.slice(0,3)})).indexOf(m)+1;if(L<1)throw new Error;this.month=L%12||L}],MMMM:[r,function(m){var Y=_("months").indexOf(m)+1;if(Y<1)throw new Error;this.month=Y%12||Y}],Y:[/[+-]?\d+/,o("year")],YY:[i,function(m){this.year=u(m)}],YYYY:[/\d{4}/,o("year")],Z:d,ZZ:d};function f(m){var Y,L;Y=m,L=a&&a.formats;for(var D=(m=Y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,H,W){var U=W&&W.toUpperCase();return H||L[W]||n[W]||L[U].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(v,h,c){return h||c.slice(1)})})).match(t),w=D.length,g=0;g-1)return new Date((M==="X"?1e3:1)*p);var T=f(M)(p),I=T.year,N=T.month,E=T.day,P=T.hours,B=T.minutes,Q=T.seconds,re=T.milliseconds,Z=T.zone,J=T.week,G=new Date,X=E||(I||N?1:G.getDate()),ee=I||G.getFullYear(),le=0;I&&!N||(le=N>0?N-1:G.getMonth());var me,pe=P||0,De=B||0,Le=Q||0,ve=re||0;return Z?new Date(Date.UTC(ee,le,X,pe,De,Le,ve+60*Z.offset*1e3)):S?new Date(Date.UTC(ee,le,X,pe,De,Le,ve)):(me=new Date(ee,le,X,pe,De,Le,ve),J&&(me=b(me).week(J).toDate()),me)}catch{return new Date("")}}(C,x,A,L),this.init(),U&&U!==!0&&(this.$L=this.locale(U).$L),W&&C!=this.format(x)&&(this.$d=new Date("")),a={}}else if(x instanceof Array)for(var v=x.length,h=1;h<=v;h+=1){q[1]=x[h-1];var c=L.apply(this,q);if(c.isValid()){this.$d=c.$d,this.$L=c.$L,this.init();break}h===v&&(this.$d=new Date(""))}else w.call(this,g)}}})});var Hn=k(($e,Ce)=>{(function(n,t){typeof $e=="object"&&typeof Ce<"u"?Ce.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_localeData=t()})($e,function(){"use strict";return function(n,t,s){var i=t.prototype,e=function(d){return d&&(d.indexOf?d:d.s)},r=function(d,_,y,l,f){var m=d.name?d:d.$locale(),Y=e(m[_]),L=e(m[y]),D=Y||L.map(function(g){return g.slice(0,l)});if(!f)return D;var w=m.weekStart;return D.map(function(g,C){return D[(C+(w||0))%7]})},a=function(){return s.Ls[s.locale()]},u=function(d,_){return d.formats[_]||function(y){return y.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(l,f,m){return f||m.slice(1)})}(d.formats[_.toUpperCase()])},o=function(){var d=this;return{months:function(_){return _?_.format("MMMM"):r(d,"months")},monthsShort:function(_){return _?_.format("MMM"):r(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(_){return _?_.format("dddd"):r(d,"weekdays")},weekdaysMin:function(_){return _?_.format("dd"):r(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(_){return _?_.format("ddd"):r(d,"weekdaysShort","weekdays",3)},longDateFormat:function(_){return u(d.$locale(),_)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return o.bind(this)()},s.localeData=function(){var d=a();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return s.weekdays()},weekdaysShort:function(){return s.weekdaysShort()},weekdaysMin:function(){return s.weekdaysMin()},months:function(){return s.months()},monthsShort:function(){return s.monthsShort()},longDateFormat:function(_){return u(d,_)},meridiem:d.meridiem,ordinal:d.ordinal}},s.months=function(){return r(a(),"months")},s.monthsShort=function(){return r(a(),"monthsShort","months",3)},s.weekdays=function(d){return r(a(),"weekdays",null,null,d)},s.weekdaysShort=function(d){return r(a(),"weekdaysShort","weekdays",3,d)},s.weekdaysMin=function(d){return r(a(),"weekdaysMin","weekdays",2,d)}}})});var jn=k((Oe,ze)=>{(function(n,t){typeof Oe=="object"&&typeof ze<"u"?ze.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_timezone=t()})(Oe,function(){"use strict";var n={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(s,i,e){var r,a=function(_,y,l){l===void 0&&(l={});var f=new Date(_),m=function(Y,L){L===void 0&&(L={});var D=L.timeZoneName||"short",w=Y+"|"+D,g=t[w];return g||(g=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:Y,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:D}),t[w]=g),g}(y,l);return m.formatToParts(f)},u=function(_,y){for(var l=a(_,y),f=[],m=0;m=0&&(f[w]=parseInt(D,10))}var g=f[3],C=g===24?0:g,A=f[0]+"-"+f[1]+"-"+f[2]+" "+C+":"+f[4]+":"+f[5]+":000",q=+_;return(e.utc(A).valueOf()-(q-=q%1e3))/6e4},o=i.prototype;o.tz=function(_,y){_===void 0&&(_=r);var l,f=this.utcOffset(),m=this.toDate(),Y=m.toLocaleString("en-US",{timeZone:_}),L=Math.round((m-new Date(Y))/1e3/60),D=15*-Math.round(m.getTimezoneOffset()/15)-L;if(!Number(D))l=this.utcOffset(0,y);else if(l=e(Y,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(D,!0),y){var w=l.utcOffset();l=l.add(f-w,"minute")}return l.$x.$timezone=_,l},o.offsetName=function(_){var y=this.$x.$timezone||e.tz.guess(),l=a(this.valueOf(),y,{timeZoneName:_}).find(function(f){return f.type.toLowerCase()==="timezonename"});return l&&l.value};var d=o.startOf;o.startOf=function(_,y){if(!this.$x||!this.$x.$timezone)return d.call(this,_,y);var l=e(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return d.call(l,_,y).tz(this.$x.$timezone,!0)},e.tz=function(_,y,l){var f=l&&y,m=l||y||r,Y=u(+e(),m);if(typeof _!="string")return e(_).tz(m);var L=function(C,A,q){var x=C-60*A*1e3,$=u(x,q);if(A===$)return[x,A];var H=u(x-=60*($-A)*1e3,q);return $===H?[x,$]:[C-60*Math.min($,H)*1e3,Math.max($,H)]}(e.utc(_,f).valueOf(),Y,m),D=L[0],w=L[1],g=e(D).utcOffset(w);return g.$x.$timezone=m,g},e.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},e.tz.setDefault=function(_){r=_}}})});var Tn=k((Ae,Ie)=>{(function(n,t){typeof Ae=="object"&&typeof Ie<"u"?Ie.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_utc=t()})(Ae,function(){"use strict";var n="minute",t=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(i,e,r){var a=e.prototype;r.utc=function(f){var m={date:f,utc:!0,args:arguments};return new e(m)},a.utc=function(f){var m=r(this.toDate(),{locale:this.$L,utc:!0});return f?m.add(this.utcOffset(),n):m},a.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var u=a.parse;a.parse=function(f){f.utc&&(this.$u=!0),this.$utils().u(f.$offset)||(this.$offset=f.$offset),u.call(this,f)};var o=a.init;a.init=function(){if(this.$u){var f=this.$d;this.$y=f.getUTCFullYear(),this.$M=f.getUTCMonth(),this.$D=f.getUTCDate(),this.$W=f.getUTCDay(),this.$H=f.getUTCHours(),this.$m=f.getUTCMinutes(),this.$s=f.getUTCSeconds(),this.$ms=f.getUTCMilliseconds()}else o.call(this)};var d=a.utcOffset;a.utcOffset=function(f,m){var Y=this.$utils().u;if(Y(f))return this.$u?0:Y(this.$offset)?d.call(this):this.$offset;if(typeof f=="string"&&(f=function(g){g===void 0&&(g="");var C=g.match(t);if(!C)return null;var A=(""+C[0]).match(s)||["-",0,0],q=A[0],x=60*+A[1]+ +A[2];return x===0?0:q==="+"?x:-x}(f),f===null))return this;var L=Math.abs(f)<=16?60*f:f,D=this;if(m)return D.$offset=L,D.$u=f===0,D;if(f!==0){var w=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(D=this.local().add(L+w,n)).$offset=L,D.$x.$localOffset=w}else D=this.utc();return D};var _=a.format;a.format=function(f){var m=f||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return _.call(this,m)},a.valueOf=function(){var f=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*f},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var y=a.toDate;a.toDate=function(f){return f==="s"&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():y.call(this)};var l=a.diff;a.diff=function(f,m,Y){if(f&&this.$u===f.$u)return l.call(this,f,m,Y);var L=this.local(),D=r(f).local();return l.call(L,D,m,Y)}}})});var j=k((qe,xe)=>{(function(n,t){typeof qe=="object"&&typeof xe<"u"?xe.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs=t()})(qe,function(){"use strict";var n=1e3,t=6e4,s=36e5,i="millisecond",e="second",r="minute",a="hour",u="day",o="week",d="month",_="quarter",y="year",l="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,L={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(v){var h=["th","st","nd","rd"],c=v%100;return"["+v+(h[(c-20)%10]||h[c]||h[0])+"]"}},D=function(v,h,c){var p=String(v);return!p||p.length>=h?v:""+Array(h+1-p.length).join(c)+v},w={s:D,z:function(v){var h=-v.utcOffset(),c=Math.abs(h),p=Math.floor(c/60),M=c%60;return(h<=0?"+":"-")+D(p,2,"0")+":"+D(M,2,"0")},m:function v(h,c){if(h.date()1)return v(b[0])}else{var T=h.name;C[T]=h,M=T}return!p&&M&&(g=M),M||!p&&g},$=function(v,h){if(q(v))return v.clone();var c=typeof h=="object"?h:{};return c.date=v,c.args=arguments,new W(c)},H=w;H.l=x,H.i=q,H.w=function(v,h){return $(v,{locale:h.$L,utc:h.$u,x:h.$x,$offset:h.$offset})};var W=function(){function v(c){this.$L=x(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[A]=!0}var h=v.prototype;return h.parse=function(c){this.$d=function(p){var M=p.date,S=p.utc;if(M===null)return new Date(NaN);if(H.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var b=M.match(m);if(b){var T=b[2]-1||0,I=(b[7]||"0").substring(0,3);return S?new Date(Date.UTC(b[1],T,b[3]||1,b[4]||0,b[5]||0,b[6]||0,I)):new Date(b[1],T,b[3]||1,b[4]||0,b[5]||0,b[6]||0,I)}}return new Date(M)}(c),this.init()},h.init=function(){var c=this.$d;this.$y=c.getFullYear(),this.$M=c.getMonth(),this.$D=c.getDate(),this.$W=c.getDay(),this.$H=c.getHours(),this.$m=c.getMinutes(),this.$s=c.getSeconds(),this.$ms=c.getMilliseconds()},h.$utils=function(){return H},h.isValid=function(){return this.$d.toString()!==f},h.isSame=function(c,p){var M=$(c);return this.startOf(p)<=M&&M<=this.endOf(p)},h.isAfter=function(c,p){return $(c){(function(n,t){typeof Ne=="object"&&typeof Ee<"u"?Ee.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_ar=t(n.dayjs)})(Ne,function(n){"use strict";function t(u){return u&&typeof u=="object"&&"default"in u?u:{default:u}}var s=t(n),i="\u064A\u0646\u0627\u064A\u0631_\u0641\u0628\u0631\u0627\u064A\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064A\u0644_\u0645\u0627\u064A\u0648_\u064A\u0648\u0646\u064A\u0648_\u064A\u0648\u0644\u064A\u0648_\u0623\u063A\u0633\u0637\u0633_\u0633\u0628\u062A\u0645\u0628\u0631_\u0623\u0643\u062A\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062F\u064A\u0633\u0645\u0628\u0631".split("_"),e={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},r={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},a={name:"ar",weekdays:"\u0627\u0644\u0623\u062D\u062F_\u0627\u0644\u0625\u062B\u0646\u064A\u0646_\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062E\u0645\u064A\u0633_\u0627\u0644\u062C\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062A".split("_"),weekdaysShort:"\u0623\u062D\u062F_\u0625\u062B\u0646\u064A\u0646_\u062B\u0644\u0627\u062B\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062E\u0645\u064A\u0633_\u062C\u0645\u0639\u0629_\u0633\u0628\u062A".split("_"),weekdaysMin:"\u062D_\u0646_\u062B_\u0631_\u062E_\u062C_\u0633".split("_"),months:i,monthsShort:i,weekStart:6,meridiem:function(u){return u>12?"\u0645":"\u0635"},relativeTime:{future:"\u0628\u0639\u062F %s",past:"\u0645\u0646\u0630 %s",s:"\u062B\u0627\u0646\u064A\u0629 \u0648\u0627\u062D\u062F\u0629",m:"\u062F\u0642\u064A\u0642\u0629 \u0648\u0627\u062D\u062F\u0629",mm:"%d \u062F\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629 \u0648\u0627\u062D\u062F\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062A",d:"\u064A\u0648\u0645 \u0648\u0627\u062D\u062F",dd:"%d \u0623\u064A\u0627\u0645",M:"\u0634\u0647\u0631 \u0648\u0627\u062D\u062F",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0639\u0627\u0645 \u0648\u0627\u062D\u062F",yy:"%d \u0623\u0639\u0648\u0627\u0645"},preparse:function(u){return u.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(o){return r[o]}).replace(/،/g,",")},postformat:function(u){return u.replace(/\d/g,function(o){return e[o]}).replace(/,/g,"\u060C")},ordinal:function(u){return u},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200FM/\u200FYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"}};return s.default.locale(a,null,!0),a})});var $n=k((Fe,Je)=>{(function(n,t){typeof Fe=="object"&&typeof Je<"u"?Je.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_bs=t(n.dayjs)})(Fe,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"bs",weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010Detvrtak_petak_subota".split("_"),months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),weekStart:1,weekdaysShort:"ned._pon._uto._sri._\u010Det._pet._sub.".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010De_pe_su".split("_"),ordinal:function(e){return e},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"}};return s.default.locale(i,null,!0),i})});var Cn=k((We,Ue)=>{(function(n,t){typeof We=="object"&&typeof Ue<"u"?Ue.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_ca=t(n.dayjs)})(We,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"ca",weekdays:"Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),weekdaysShort:"Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),months:"Gener_Febrer_Mar\xE7_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),monthsShort:"Gen._Febr._Mar\xE7_Abr._Maig_Juny_Jul._Ag._Set._Oct._Nov._Des.".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",ll:"D MMM YYYY",lll:"D MMM YYYY, H:mm",llll:"ddd D MMM YYYY, H:mm"},relativeTime:{future:"d'aqu\xED %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:function(e){return""+e+(e===1||e===3?"r":e===2?"n":e===4?"t":"\xE8")}};return s.default.locale(i,null,!0),i})});var Pe=k((Ye,On)=>{(function(n,t){typeof Ye=="object"&&typeof On<"u"?t(Ye,j()):typeof define=="function"&&define.amd?define(["exports","dayjs"],t):t((n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_ku={},n.dayjs)})(Ye,function(n,t){"use strict";function s(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var i=s(t),e={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},r={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},a=["\u06A9\u0627\u0646\u0648\u0648\u0646\u06CC \u062F\u0648\u0648\u06D5\u0645","\u0634\u0648\u0628\u0627\u062A","\u0626\u0627\u062F\u0627\u0631","\u0646\u06CC\u0633\u0627\u0646","\u0626\u0627\u06CC\u0627\u0631","\u062D\u0648\u0632\u06D5\u06CC\u0631\u0627\u0646","\u062A\u06D5\u0645\u0645\u0648\u0648\u0632","\u0626\u0627\u0628","\u0626\u06D5\u06CC\u0644\u0648\u0648\u0644","\u062A\u0634\u0631\u06CC\u0646\u06CC \u06CC\u06D5\u06A9\u06D5\u0645","\u062A\u0634\u0631\u06CC\u0646\u06CC \u062F\u0648\u0648\u06D5\u0645","\u06A9\u0627\u0646\u0648\u0648\u0646\u06CC \u06CC\u06D5\u06A9\u06D5\u0645"],u={name:"ku",months:a,monthsShort:a,weekdays:"\u06CC\u06D5\u06A9\u0634\u06D5\u0645\u0645\u06D5_\u062F\u0648\u0648\u0634\u06D5\u0645\u0645\u06D5_\u0633\u06CE\u0634\u06D5\u0645\u0645\u06D5_\u0686\u0648\u0627\u0631\u0634\u06D5\u0645\u0645\u06D5_\u067E\u06CE\u0646\u062C\u0634\u06D5\u0645\u0645\u06D5_\u0647\u06D5\u06CC\u0646\u06CC_\u0634\u06D5\u0645\u0645\u06D5".split("_"),weekdaysShort:"\u06CC\u06D5\u06A9\u0634\u06D5\u0645_\u062F\u0648\u0648\u0634\u06D5\u0645_\u0633\u06CE\u0634\u06D5\u0645_\u0686\u0648\u0627\u0631\u0634\u06D5\u0645_\u067E\u06CE\u0646\u062C\u0634\u06D5\u0645_\u0647\u06D5\u06CC\u0646\u06CC_\u0634\u06D5\u0645\u0645\u06D5".split("_"),weekStart:6,weekdaysMin:"\u06CC_\u062F_\u0633_\u0686_\u067E_\u0647\u0640_\u0634".split("_"),preparse:function(o){return o.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(d){return r[d]}).replace(/،/g,",")},postformat:function(o){return o.replace(/\d/g,function(d){return e[d]}).replace(/,/g,"\u060C")},ordinal:function(o){return o},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiem:function(o){return o<12?"\u067E.\u0646":"\u062F.\u0646"},relativeTime:{future:"\u0644\u06D5 %s",past:"\u0644\u06D5\u0645\u06D5\u0648\u067E\u06CE\u0634 %s",s:"\u0686\u06D5\u0646\u062F \u0686\u0631\u06A9\u06D5\u06CC\u06D5\u06A9",m:"\u06CC\u06D5\u06A9 \u062E\u0648\u0644\u06D5\u06A9",mm:"%d \u062E\u0648\u0644\u06D5\u06A9",h:"\u06CC\u06D5\u06A9 \u06A9\u0627\u062A\u0698\u0645\u06CE\u0631",hh:"%d \u06A9\u0627\u062A\u0698\u0645\u06CE\u0631",d:"\u06CC\u06D5\u06A9 \u0695\u06C6\u0698",dd:"%d \u0695\u06C6\u0698",M:"\u06CC\u06D5\u06A9 \u0645\u0627\u0646\u06AF",MM:"%d \u0645\u0627\u0646\u06AF",y:"\u06CC\u06D5\u06A9 \u0633\u0627\u06B5",yy:"%d \u0633\u0627\u06B5"}};i.default.locale(u,null,!0),n.default=u,n.englishToArabicNumbersMap=e,Object.defineProperty(n,"__esModule",{value:!0})})});var zn=k((Re,Ge)=>{(function(n,t){typeof Re=="object"&&typeof Ge<"u"?Ge.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_cs=t(n.dayjs)})(Re,function(n){"use strict";function t(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var s=t(n);function i(a){return a>1&&a<5&&~~(a/10)!=1}function e(a,u,o,d){var _=a+" ";switch(o){case"s":return u||d?"p\xE1r sekund":"p\xE1r sekundami";case"m":return u?"minuta":d?"minutu":"minutou";case"mm":return u||d?_+(i(a)?"minuty":"minut"):_+"minutami";case"h":return u?"hodina":d?"hodinu":"hodinou";case"hh":return u||d?_+(i(a)?"hodiny":"hodin"):_+"hodinami";case"d":return u||d?"den":"dnem";case"dd":return u||d?_+(i(a)?"dny":"dn\xED"):_+"dny";case"M":return u||d?"m\u011Bs\xEDc":"m\u011Bs\xEDcem";case"MM":return u||d?_+(i(a)?"m\u011Bs\xEDce":"m\u011Bs\xEDc\u016F"):_+"m\u011Bs\xEDci";case"y":return u||d?"rok":"rokem";case"yy":return u||d?_+(i(a)?"roky":"let"):_+"lety"}}var r={name:"cs",weekdays:"ned\u011Ble_pond\u011Bl\xED_\xFAter\xFD_st\u0159eda_\u010Dtvrtek_p\xE1tek_sobota".split("_"),weekdaysShort:"ne_po_\xFAt_st_\u010Dt_p\xE1_so".split("_"),weekdaysMin:"ne_po_\xFAt_st_\u010Dt_p\xE1_so".split("_"),months:"leden_\xFAnor_b\u0159ezen_duben_kv\u011Bten_\u010Derven_\u010Dervenec_srpen_z\xE1\u0159\xED_\u0159\xEDjen_listopad_prosinec".split("_"),monthsShort:"led_\xFAno_b\u0159e_dub_kv\u011B_\u010Dvn_\u010Dvc_srp_z\xE1\u0159_\u0159\xEDj_lis_pro".split("_"),weekStart:1,yearStart:4,ordinal:function(a){return a+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},relativeTime:{future:"za %s",past:"p\u0159ed %s",s:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e}};return s.default.locale(r,null,!0),r})});var An=k((Ze,Ve)=>{(function(n,t){typeof Ze=="object"&&typeof Ve<"u"?Ve.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_cy=t(n.dayjs)})(Ze,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"cy",weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),weekStart:1,weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"mewn %s",past:"%s yn \xF4l",s:"ychydig eiliadau",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"}};return s.default.locale(i,null,!0),i})});var In=k((Ke,Qe)=>{(function(n,t){typeof Ke=="object"&&typeof Qe<"u"?Qe.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_da=t(n.dayjs)})(Ke,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"da",weekdays:"s\xF8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xF8rdag".split("_"),weekdaysShort:"s\xF8n._man._tirs._ons._tors._fre._l\xF8r.".split("_"),weekdaysMin:"s\xF8._ma._ti._on._to._fr._l\xF8.".split("_"),months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj_juni_juli_aug._sept._okt._nov._dec.".split("_"),weekStart:1,yearStart:4,ordinal:function(e){return e+"."},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},relativeTime:{future:"om %s",past:"%s siden",s:"f\xE5 sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en m\xE5ned",MM:"%d m\xE5neder",y:"et \xE5r",yy:"%d \xE5r"}};return s.default.locale(i,null,!0),i})});var qn=k((Xe,Be)=>{(function(n,t){typeof Xe=="object"&&typeof Be<"u"?Be.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_de=t(n.dayjs)})(Xe,function(n){"use strict";function t(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var s=t(n),i={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function e(a,u,o){var d=i[o];return Array.isArray(d)&&(d=d[u?0:1]),d.replace("%d",a)}var r={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_M\xE4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xE4rz_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(a){return a+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e}};return s.default.locale(r,null,!0),r})});var xn=k((et,tt)=>{(function(n,t){typeof et=="object"&&typeof tt<"u"?tt.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_en=t()})(et,function(){"use strict";return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var t=["th","st","nd","rd"],s=n%100;return"["+n+(t[(s-20)%10]||t[s]||t[0])+"]"}}})});var Nn=k((nt,it)=>{(function(n,t){typeof nt=="object"&&typeof it<"u"?it.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_es=t(n.dayjs)})(nt,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_mi\xE9rcoles_jueves_viernes_s\xE1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xE9._jue._vie._s\xE1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xE1".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xEDa",dd:"%d d\xEDas",M:"un mes",MM:"%d meses",y:"un a\xF1o",yy:"%d a\xF1os"},ordinal:function(e){return e+"\xBA"}};return s.default.locale(i,null,!0),i})});var En=k((st,rt)=>{(function(n,t){typeof st=="object"&&typeof rt<"u"?rt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_et=t(n.dayjs)})(st,function(n){"use strict";function t(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var s=t(n);function i(r,a,u,o){var d={s:["m\xF5ne sekundi","m\xF5ni sekund","paar sekundit"],m:["\xFChe minuti","\xFCks minut"],mm:["%d minuti","%d minutit"],h:["\xFChe tunni","tund aega","\xFCks tund"],hh:["%d tunni","%d tundi"],d:["\xFChe p\xE4eva","\xFCks p\xE4ev"],M:["kuu aja","kuu aega","\xFCks kuu"],MM:["%d kuu","%d kuud"],y:["\xFChe aasta","aasta","\xFCks aasta"],yy:["%d aasta","%d aastat"]};return a?(d[u][2]?d[u][2]:d[u][1]).replace("%d",r):(o?d[u][0]:d[u][1]).replace("%d",r)}var e={name:"et",weekdays:"p\xFChap\xE4ev_esmasp\xE4ev_teisip\xE4ev_kolmap\xE4ev_neljap\xE4ev_reede_laup\xE4ev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),months:"jaanuar_veebruar_m\xE4rts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_m\xE4rts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),ordinal:function(r){return r+"."},weekStart:1,relativeTime:{future:"%s p\xE4rast",past:"%s tagasi",s:i,m:i,mm:i,h:i,hh:i,d:i,dd:"%d p\xE4eva",M:i,MM:i,y:i,yy:i},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"}};return s.default.locale(e,null,!0),e})});var Fn=k((at,ut)=>{(function(n,t){typeof at=="object"&&typeof ut<"u"?ut.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_fa=t(n.dayjs)})(at,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"fa",weekdays:"\u06CC\u06A9\u200C\u0634\u0646\u0628\u0647_\u062F\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200C\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067E\u0646\u062C\u200C\u0634\u0646\u0628\u0647_\u062C\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysShort:"\u06CC\u06A9\u200C\u0634\u0646\u0628\u0647_\u062F\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200C\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067E\u0646\u062C\u200C\u0634\u0646\u0628\u0647_\u062C\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysMin:"\u06CC_\u062F_\u0633_\u0686_\u067E_\u062C_\u0634".split("_"),weekStart:6,months:"\u0698\u0627\u0646\u0648\u06CC\u0647_\u0641\u0648\u0631\u06CC\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06CC\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06CC\u0647_\u0627\u0648\u062A_\u0633\u067E\u062A\u0627\u0645\u0628\u0631_\u0627\u06A9\u062A\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062F\u0633\u0627\u0645\u0628\u0631".split("_"),monthsShort:"\u0698\u0627\u0646\u0648\u06CC\u0647_\u0641\u0648\u0631\u06CC\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06CC\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06CC\u0647_\u0627\u0648\u062A_\u0633\u067E\u062A\u0627\u0645\u0628\u0631_\u0627\u06A9\u062A\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062F\u0633\u0627\u0645\u0628\u0631".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"\u062F\u0631 %s",past:"%s \u067E\u06CC\u0634",s:"\u0686\u0646\u062F \u062B\u0627\u0646\u06CC\u0647",m:"\u06CC\u06A9 \u062F\u0642\u06CC\u0642\u0647",mm:"%d \u062F\u0642\u06CC\u0642\u0647",h:"\u06CC\u06A9 \u0633\u0627\u0639\u062A",hh:"%d \u0633\u0627\u0639\u062A",d:"\u06CC\u06A9 \u0631\u0648\u0632",dd:"%d \u0631\u0648\u0632",M:"\u06CC\u06A9 \u0645\u0627\u0647",MM:"%d \u0645\u0627\u0647",y:"\u06CC\u06A9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"}};return s.default.locale(i,null,!0),i})});var Jn=k((ot,dt)=>{(function(n,t){typeof ot=="object"&&typeof dt<"u"?dt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_fi=t(n.dayjs)})(ot,function(n){"use strict";function t(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var s=t(n);function i(r,a,u,o){var d={s:"muutama sekunti",m:"minuutti",mm:"%d minuuttia",h:"tunti",hh:"%d tuntia",d:"p\xE4iv\xE4",dd:"%d p\xE4iv\xE4\xE4",M:"kuukausi",MM:"%d kuukautta",y:"vuosi",yy:"%d vuotta",numbers:"nolla_yksi_kaksi_kolme_nelj\xE4_viisi_kuusi_seitsem\xE4n_kahdeksan_yhdeks\xE4n".split("_")},_={s:"muutaman sekunnin",m:"minuutin",mm:"%d minuutin",h:"tunnin",hh:"%d tunnin",d:"p\xE4iv\xE4n",dd:"%d p\xE4iv\xE4n",M:"kuukauden",MM:"%d kuukauden",y:"vuoden",yy:"%d vuoden",numbers:"nollan_yhden_kahden_kolmen_nelj\xE4n_viiden_kuuden_seitsem\xE4n_kahdeksan_yhdeks\xE4n".split("_")},y=o&&!a?_:d,l=y[u];return r<10?l.replace("%d",y.numbers[r]):l.replace("%d",r)}var e={name:"fi",weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kes\xE4kuu_hein\xE4kuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kes\xE4_hein\xE4_elo_syys_loka_marras_joulu".split("_"),ordinal:function(r){return r+"."},weekStart:1,yearStart:4,relativeTime:{future:"%s p\xE4\xE4st\xE4",past:"%s sitten",s:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM[ta] YYYY",LLL:"D. MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, D. MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"D. MMM YYYY",lll:"D. MMM YYYY, [klo] HH.mm",llll:"ddd, D. MMM YYYY, [klo] HH.mm"}};return s.default.locale(e,null,!0),e})});var Wn=k((_t,ft)=>{(function(n,t){typeof _t=="object"&&typeof ft<"u"?ft.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_fr=t(n.dayjs)})(_t,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_f\xE9vrier_mars_avril_mai_juin_juillet_ao\xFBt_septembre_octobre_novembre_d\xE9cembre".split("_"),monthsShort:"janv._f\xE9vr._mars_avr._mai_juin_juil._ao\xFBt_sept._oct._nov._d\xE9c.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(e){return""+e+(e===1?"er":"")}};return s.default.locale(i,null,!0),i})});var Un=k((lt,mt)=>{(function(n,t){typeof lt=="object"&&typeof mt<"u"?mt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_hi=t(n.dayjs)})(lt,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"hi",weekdays:"\u0930\u0935\u093F\u0935\u093E\u0930_\u0938\u094B\u092E\u0935\u093E\u0930_\u092E\u0902\u0917\u0932\u0935\u093E\u0930_\u092C\u0941\u0927\u0935\u093E\u0930_\u0917\u0941\u0930\u0942\u0935\u093E\u0930_\u0936\u0941\u0915\u094D\u0930\u0935\u093E\u0930_\u0936\u0928\u093F\u0935\u093E\u0930".split("_"),months:"\u091C\u0928\u0935\u0930\u0940_\u092B\u093C\u0930\u0935\u0930\u0940_\u092E\u093E\u0930\u094D\u091A_\u0905\u092A\u094D\u0930\u0948\u0932_\u092E\u0908_\u091C\u0942\u0928_\u091C\u0941\u0932\u093E\u0908_\u0905\u0917\u0938\u094D\u0924_\u0938\u093F\u0924\u092E\u094D\u092C\u0930_\u0905\u0915\u094D\u091F\u0942\u092C\u0930_\u0928\u0935\u092E\u094D\u092C\u0930_\u0926\u093F\u0938\u092E\u094D\u092C\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093F_\u0938\u094B\u092E_\u092E\u0902\u0917\u0932_\u092C\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094D\u0930_\u0936\u0928\u093F".split("_"),monthsShort:"\u091C\u0928._\u092B\u093C\u0930._\u092E\u093E\u0930\u094D\u091A_\u0905\u092A\u094D\u0930\u0948._\u092E\u0908_\u091C\u0942\u0928_\u091C\u0941\u0932._\u0905\u0917._\u0938\u093F\u0924._\u0905\u0915\u094D\u091F\u0942._\u0928\u0935._\u0926\u093F\u0938.".split("_"),weekdaysMin:"\u0930_\u0938\u094B_\u092E\u0902_\u092C\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),ordinal:function(e){return e},formats:{LT:"A h:mm \u092C\u091C\u0947",LTS:"A h:mm:ss \u092C\u091C\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u092C\u091C\u0947",LLLL:"dddd, D MMMM YYYY, A h:mm \u092C\u091C\u0947"},relativeTime:{future:"%s \u092E\u0947\u0902",past:"%s \u092A\u0939\u0932\u0947",s:"\u0915\u0941\u091B \u0939\u0940 \u0915\u094D\u0937\u0923",m:"\u090F\u0915 \u092E\u093F\u0928\u091F",mm:"%d \u092E\u093F\u0928\u091F",h:"\u090F\u0915 \u0918\u0902\u091F\u093E",hh:"%d \u0918\u0902\u091F\u0947",d:"\u090F\u0915 \u0926\u093F\u0928",dd:"%d \u0926\u093F\u0928",M:"\u090F\u0915 \u092E\u0939\u0940\u0928\u0947",MM:"%d \u092E\u0939\u0940\u0928\u0947",y:"\u090F\u0915 \u0935\u0930\u094D\u0937",yy:"%d \u0935\u0930\u094D\u0937"}};return s.default.locale(i,null,!0),i})});var Pn=k((ct,ht)=>{(function(n,t){typeof ct=="object"&&typeof ht<"u"?ht.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_hu=t(n.dayjs)})(ct,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"hu",weekdays:"vas\xE1rnap_h\xE9tf\u0151_kedd_szerda_cs\xFCt\xF6rt\xF6k_p\xE9ntek_szombat".split("_"),weekdaysShort:"vas_h\xE9t_kedd_sze_cs\xFCt_p\xE9n_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),months:"janu\xE1r_febru\xE1r_m\xE1rcius_\xE1prilis_m\xE1jus_j\xFAnius_j\xFAlius_augusztus_szeptember_okt\xF3ber_november_december".split("_"),monthsShort:"jan_feb_m\xE1rc_\xE1pr_m\xE1j_j\xFAn_j\xFAl_aug_szept_okt_nov_dec".split("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"%s m\xFAlva",past:"%s",s:function(e,r,a,u){return"n\xE9h\xE1ny m\xE1sodperc"+(u||r?"":"e")},m:function(e,r,a,u){return"egy perc"+(u||r?"":"e")},mm:function(e,r,a,u){return e+" perc"+(u||r?"":"e")},h:function(e,r,a,u){return"egy "+(u||r?"\xF3ra":"\xF3r\xE1ja")},hh:function(e,r,a,u){return e+" "+(u||r?"\xF3ra":"\xF3r\xE1ja")},d:function(e,r,a,u){return"egy "+(u||r?"nap":"napja")},dd:function(e,r,a,u){return e+" "+(u||r?"nap":"napja")},M:function(e,r,a,u){return"egy "+(u||r?"h\xF3nap":"h\xF3napja")},MM:function(e,r,a,u){return e+" "+(u||r?"h\xF3nap":"h\xF3napja")},y:function(e,r,a,u){return"egy "+(u||r?"\xE9v":"\xE9ve")},yy:function(e,r,a,u){return e+" "+(u||r?"\xE9v":"\xE9ve")}},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"}};return s.default.locale(i,null,!0),i})});var Rn=k((Mt,yt)=>{(function(n,t){typeof Mt=="object"&&typeof yt<"u"?yt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_hy_am=t(n.dayjs)})(Mt,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"hy-am",weekdays:"\u056F\u056B\u0580\u0561\u056F\u056B_\u0565\u0580\u056F\u0578\u0582\u0577\u0561\u0562\u0569\u056B_\u0565\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056B_\u0579\u0578\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056B_\u0570\u056B\u0576\u0563\u0577\u0561\u0562\u0569\u056B_\u0578\u0582\u0580\u0562\u0561\u0569_\u0577\u0561\u0562\u0561\u0569".split("_"),months:"\u0570\u0578\u0582\u0576\u057E\u0561\u0580\u056B_\u0583\u0565\u057F\u0580\u057E\u0561\u0580\u056B_\u0574\u0561\u0580\u057F\u056B_\u0561\u057A\u0580\u056B\u056C\u056B_\u0574\u0561\u0575\u056B\u057D\u056B_\u0570\u0578\u0582\u0576\u056B\u057D\u056B_\u0570\u0578\u0582\u056C\u056B\u057D\u056B_\u0585\u0563\u0578\u057D\u057F\u0578\u057D\u056B_\u057D\u0565\u057A\u057F\u0565\u0574\u0562\u0565\u0580\u056B_\u0570\u0578\u056F\u057F\u0565\u0574\u0562\u0565\u0580\u056B_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580\u056B_\u0564\u0565\u056F\u057F\u0565\u0574\u0562\u0565\u0580\u056B".split("_"),weekStart:1,weekdaysShort:"\u056F\u0580\u056F_\u0565\u0580\u056F_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),monthsShort:"\u0570\u0576\u057E_\u0583\u057F\u0580_\u0574\u0580\u057F_\u0561\u057A\u0580_\u0574\u0575\u057D_\u0570\u0576\u057D_\u0570\u056C\u057D_\u0585\u0563\u057D_\u057D\u057A\u057F_\u0570\u056F\u057F_\u0576\u0574\u0562_\u0564\u056F\u057F".split("_"),weekdaysMin:"\u056F\u0580\u056F_\u0565\u0580\u056F_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0569.",LLL:"D MMMM YYYY \u0569., HH:mm",LLLL:"dddd, D MMMM YYYY \u0569., HH:mm"},relativeTime:{future:"%s \u0570\u0565\u057F\u0578",past:"%s \u0561\u057C\u0561\u057B",s:"\u0574\u056B \u0584\u0561\u0576\u056B \u057E\u0561\u0575\u0580\u056F\u0575\u0561\u0576",m:"\u0580\u0578\u057A\u0565",mm:"%d \u0580\u0578\u057A\u0565",h:"\u056A\u0561\u0574",hh:"%d \u056A\u0561\u0574",d:"\u0585\u0580",dd:"%d \u0585\u0580",M:"\u0561\u0574\u056B\u057D",MM:"%d \u0561\u0574\u056B\u057D",y:"\u057F\u0561\u0580\u056B",yy:"%d \u057F\u0561\u0580\u056B"}};return s.default.locale(i,null,!0),i})});var Gn=k((Yt,pt)=>{(function(n,t){typeof Yt=="object"&&typeof pt<"u"?pt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_id=t(n.dayjs)})(Yt,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"id",weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),weekStart:1,formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},ordinal:function(e){return e+"."}};return s.default.locale(i,null,!0),i})});var Zn=k((Dt,Lt)=>{(function(n,t){typeof Dt=="object"&&typeof Lt<"u"?Lt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_it=t(n.dayjs)})(Dt,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"it",weekdays:"domenica_luned\xEC_marted\xEC_mercoled\xEC_gioved\xEC_venerd\xEC_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(e){return e+"\xBA"}};return s.default.locale(i,null,!0),i})});var Vn=k((vt,gt)=>{(function(n,t){typeof vt=="object"&&typeof gt<"u"?gt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_ja=t(n.dayjs)})(vt,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"ja",weekdays:"\u65E5\u66DC\u65E5_\u6708\u66DC\u65E5_\u706B\u66DC\u65E5_\u6C34\u66DC\u65E5_\u6728\u66DC\u65E5_\u91D1\u66DC\u65E5_\u571F\u66DC\u65E5".split("_"),weekdaysShort:"\u65E5_\u6708_\u706B_\u6C34_\u6728_\u91D1_\u571F".split("_"),weekdaysMin:"\u65E5_\u6708_\u706B_\u6C34_\u6728_\u91D1_\u571F".split("_"),months:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),ordinal:function(e){return e+"\u65E5"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5 HH:mm",LLLL:"YYYY\u5E74M\u6708D\u65E5 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5(ddd) HH:mm"},meridiem:function(e){return e<12?"\u5348\u524D":"\u5348\u5F8C"},relativeTime:{future:"%s\u5F8C",past:"%s\u524D",s:"\u6570\u79D2",m:"1\u5206",mm:"%d\u5206",h:"1\u6642\u9593",hh:"%d\u6642\u9593",d:"1\u65E5",dd:"%d\u65E5",M:"1\u30F6\u6708",MM:"%d\u30F6\u6708",y:"1\u5E74",yy:"%d\u5E74"}};return s.default.locale(i,null,!0),i})});var Kn=k((St,bt)=>{(function(n,t){typeof St=="object"&&typeof bt<"u"?bt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_ka=t(n.dayjs)})(St,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"ka",weekdays:"\u10D9\u10D5\u10D8\u10E0\u10D0_\u10DD\u10E0\u10E8\u10D0\u10D1\u10D0\u10D7\u10D8_\u10E1\u10D0\u10DB\u10E8\u10D0\u10D1\u10D0\u10D7\u10D8_\u10DD\u10D7\u10EE\u10E8\u10D0\u10D1\u10D0\u10D7\u10D8_\u10EE\u10E3\u10D7\u10E8\u10D0\u10D1\u10D0\u10D7\u10D8_\u10DE\u10D0\u10E0\u10D0\u10E1\u10D9\u10D4\u10D5\u10D8_\u10E8\u10D0\u10D1\u10D0\u10D7\u10D8".split("_"),weekdaysShort:"\u10D9\u10D5\u10D8_\u10DD\u10E0\u10E8_\u10E1\u10D0\u10DB_\u10DD\u10D7\u10EE_\u10EE\u10E3\u10D7_\u10DE\u10D0\u10E0_\u10E8\u10D0\u10D1".split("_"),weekdaysMin:"\u10D9\u10D5_\u10DD\u10E0_\u10E1\u10D0_\u10DD\u10D7_\u10EE\u10E3_\u10DE\u10D0_\u10E8\u10D0".split("_"),months:"\u10D8\u10D0\u10DC\u10D5\u10D0\u10E0\u10D8_\u10D7\u10D4\u10D1\u10D4\u10E0\u10D5\u10D0\u10DA\u10D8_\u10DB\u10D0\u10E0\u10E2\u10D8_\u10D0\u10DE\u10E0\u10D8\u10DA\u10D8_\u10DB\u10D0\u10D8\u10E1\u10D8_\u10D8\u10D5\u10DC\u10D8\u10E1\u10D8_\u10D8\u10D5\u10DA\u10D8\u10E1\u10D8_\u10D0\u10D2\u10D5\u10D8\u10E1\u10E2\u10DD_\u10E1\u10D4\u10E5\u10E2\u10D4\u10DB\u10D1\u10D4\u10E0\u10D8_\u10DD\u10E5\u10E2\u10DD\u10DB\u10D1\u10D4\u10E0\u10D8_\u10DC\u10DD\u10D4\u10DB\u10D1\u10D4\u10E0\u10D8_\u10D3\u10D4\u10D9\u10D4\u10DB\u10D1\u10D4\u10E0\u10D8".split("_"),monthsShort:"\u10D8\u10D0\u10DC_\u10D7\u10D4\u10D1_\u10DB\u10D0\u10E0_\u10D0\u10DE\u10E0_\u10DB\u10D0\u10D8_\u10D8\u10D5\u10DC_\u10D8\u10D5\u10DA_\u10D0\u10D2\u10D5_\u10E1\u10D4\u10E5_\u10DD\u10E5\u10E2_\u10DC\u10DD\u10D4_\u10D3\u10D4\u10D9".split("_"),weekStart:1,formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},relativeTime:{future:"%s \u10E8\u10D4\u10DB\u10D3\u10D4\u10D2",past:"%s \u10EC\u10D8\u10DC",s:"\u10EC\u10D0\u10DB\u10D8",m:"\u10EC\u10E3\u10D7\u10D8",mm:"%d \u10EC\u10E3\u10D7\u10D8",h:"\u10E1\u10D0\u10D0\u10D7\u10D8",hh:"%d \u10E1\u10D0\u10D0\u10D7\u10D8\u10E1",d:"\u10D3\u10E6\u10D4\u10E1",dd:"%d \u10D3\u10E6\u10D8\u10E1 \u10D2\u10D0\u10DC\u10DB\u10D0\u10D5\u10DA\u10DD\u10D1\u10D0\u10E8\u10D8",M:"\u10D7\u10D5\u10D8\u10E1",MM:"%d \u10D7\u10D5\u10D8\u10E1",y:"\u10EC\u10D4\u10DA\u10D8",yy:"%d \u10EC\u10DA\u10D8\u10E1"},ordinal:function(e){return e}};return s.default.locale(i,null,!0),i})});var Qn=k((kt,Ht)=>{(function(n,t){typeof kt=="object"&&typeof Ht<"u"?Ht.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_km=t(n.dayjs)})(kt,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"km",weekdays:"\u17A2\u17B6\u1791\u17B7\u178F\u17D2\u1799_\u1785\u17D0\u1793\u17D2\u1791_\u17A2\u1784\u17D2\u1782\u17B6\u179A_\u1796\u17BB\u1792_\u1796\u17D2\u179A\u17A0\u179F\u17D2\u1794\u178F\u17B7\u17CD_\u179F\u17BB\u1780\u17D2\u179A_\u179F\u17C5\u179A\u17CD".split("_"),months:"\u1798\u1780\u179A\u17B6_\u1780\u17BB\u1798\u17D2\u1797\u17C8_\u1798\u17B8\u1793\u17B6_\u1798\u17C1\u179F\u17B6_\u17A7\u179F\u1797\u17B6_\u1798\u17B7\u1790\u17BB\u1793\u17B6_\u1780\u1780\u17D2\u1780\u178A\u17B6_\u179F\u17B8\u17A0\u17B6_\u1780\u1789\u17D2\u1789\u17B6_\u178F\u17BB\u179B\u17B6_\u179C\u17B7\u1785\u17D2\u1786\u17B7\u1780\u17B6_\u1792\u17D2\u1793\u17BC".split("_"),weekStart:1,weekdaysShort:"\u17A2\u17B6_\u1785_\u17A2_\u1796_\u1796\u17D2\u179A_\u179F\u17BB_\u179F".split("_"),monthsShort:"\u1798\u1780\u179A\u17B6_\u1780\u17BB\u1798\u17D2\u1797\u17C8_\u1798\u17B8\u1793\u17B6_\u1798\u17C1\u179F\u17B6_\u17A7\u179F\u1797\u17B6_\u1798\u17B7\u1790\u17BB\u1793\u17B6_\u1780\u1780\u17D2\u1780\u178A\u17B6_\u179F\u17B8\u17A0\u17B6_\u1780\u1789\u17D2\u1789\u17B6_\u178F\u17BB\u179B\u17B6_\u179C\u17B7\u1785\u17D2\u1786\u17B7\u1780\u17B6_\u1792\u17D2\u1793\u17BC".split("_"),weekdaysMin:"\u17A2\u17B6_\u1785_\u17A2_\u1796_\u1796\u17D2\u179A_\u179F\u17BB_\u179F".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%s\u1791\u17C0\u178F",past:"%s\u1798\u17BB\u1793",s:"\u1794\u17C9\u17BB\u1793\u17D2\u1798\u17B6\u1793\u179C\u17B7\u1793\u17B6\u1791\u17B8",m:"\u1798\u17BD\u1799\u1793\u17B6\u1791\u17B8",mm:"%d \u1793\u17B6\u1791\u17B8",h:"\u1798\u17BD\u1799\u1798\u17C9\u17C4\u1784",hh:"%d \u1798\u17C9\u17C4\u1784",d:"\u1798\u17BD\u1799\u1790\u17D2\u1784\u17C3",dd:"%d \u1790\u17D2\u1784\u17C3",M:"\u1798\u17BD\u1799\u1781\u17C2",MM:"%d \u1781\u17C2",y:"\u1798\u17BD\u1799\u1786\u17D2\u1793\u17B6\u17C6",yy:"%d \u1786\u17D2\u1793\u17B6\u17C6"}};return s.default.locale(i,null,!0),i})});var Xn=k((jt,Tt)=>{(function(n,t){typeof jt=="object"&&typeof Tt<"u"?Tt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_lt=t(n.dayjs)})(jt,function(n){"use strict";function t(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var s=t(n),i="sausio_vasario_kovo_baland\u017Eio_gegu\u017E\u0117s_bir\u017Eelio_liepos_rugpj\u016B\u010Dio_rugs\u0117jo_spalio_lapkri\u010Dio_gruod\u017Eio".split("_"),e="sausis_vasaris_kovas_balandis_gegu\u017E\u0117_bir\u017Eelis_liepa_rugpj\u016Btis_rugs\u0117jis_spalis_lapkritis_gruodis".split("_"),r=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,a=function(o,d){return r.test(d)?i[o.month()]:e[o.month()]};a.s=e,a.f=i;var u={name:"lt",weekdays:"sekmadienis_pirmadienis_antradienis_tre\u010Diadienis_ketvirtadienis_penktadienis_\u0161e\u0161tadienis".split("_"),weekdaysShort:"sek_pir_ant_tre_ket_pen_\u0161e\u0161".split("_"),weekdaysMin:"s_p_a_t_k_pn_\u0161".split("_"),months:a,monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),ordinal:function(o){return o+"."},weekStart:1,relativeTime:{future:"u\u017E %s",past:"prie\u0161 %s",s:"kelias sekundes",m:"minut\u0119",mm:"%d minutes",h:"valand\u0105",hh:"%d valandas",d:"dien\u0105",dd:"%d dienas",M:"m\u0117nes\u012F",MM:"%d m\u0117nesius",y:"metus",yy:"%d metus"},format:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"}};return s.default.locale(u,null,!0),u})});var Bn=k((wt,$t)=>{(function(n,t){typeof wt=="object"&&typeof $t<"u"?$t.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_lv=t(n.dayjs)})(wt,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"lv",weekdays:"sv\u0113tdiena_pirmdiena_otrdiena_tre\u0161diena_ceturtdiena_piektdiena_sestdiena".split("_"),months:"janv\u0101ris_febru\u0101ris_marts_apr\u012Blis_maijs_j\u016Bnijs_j\u016Blijs_augusts_septembris_oktobris_novembris_decembris".split("_"),weekStart:1,weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),monthsShort:"jan_feb_mar_apr_mai_j\u016Bn_j\u016Bl_aug_sep_okt_nov_dec".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},relativeTime:{future:"p\u0113c %s",past:"pirms %s",s:"da\u017E\u0101m sekund\u0113m",m:"min\u016Btes",mm:"%d min\u016Bt\u0113m",h:"stundas",hh:"%d stund\u0101m",d:"dienas",dd:"%d dien\u0101m",M:"m\u0113ne\u0161a",MM:"%d m\u0113ne\u0161iem",y:"gada",yy:"%d gadiem"}};return s.default.locale(i,null,!0),i})});var ei=k((Ct,Ot)=>{(function(n,t){typeof Ct=="object"&&typeof Ot<"u"?Ot.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_ms=t(n.dayjs)})(Ct,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"ms",weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekStart:1,formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH.mm",LLLL:"dddd, D MMMM YYYY HH.mm"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},ordinal:function(e){return e+"."}};return s.default.locale(i,null,!0),i})});var ti=k((zt,At)=>{(function(n,t){typeof zt=="object"&&typeof At<"u"?At.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_my=t(n.dayjs)})(zt,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"my",weekdays:"\u1010\u1014\u1004\u103A\u1039\u1002\u1014\u103D\u1031_\u1010\u1014\u1004\u103A\u1039\u101C\u102C_\u1021\u1004\u103A\u1039\u1002\u102B_\u1017\u102F\u1012\u1039\u1013\u101F\u1030\u1038_\u1000\u103C\u102C\u101E\u1015\u1010\u1031\u1038_\u101E\u1031\u102C\u1000\u103C\u102C_\u1005\u1014\u1031".split("_"),months:"\u1007\u1014\u103A\u1014\u101D\u102B\u101B\u102E_\u1016\u1031\u1016\u1031\u102C\u103A\u101D\u102B\u101B\u102E_\u1019\u1010\u103A_\u1027\u1015\u103C\u102E_\u1019\u1031_\u1007\u103D\u1014\u103A_\u1007\u1030\u101C\u102D\u102F\u1004\u103A_\u101E\u103C\u1002\u102F\u1010\u103A_\u1005\u1000\u103A\u1010\u1004\u103A\u1018\u102C_\u1021\u1031\u102C\u1000\u103A\u1010\u102D\u102F\u1018\u102C_\u1014\u102D\u102F\u101D\u1004\u103A\u1018\u102C_\u1012\u102E\u1007\u1004\u103A\u1018\u102C".split("_"),weekStart:1,weekdaysShort:"\u1014\u103D\u1031_\u101C\u102C_\u1002\u102B_\u101F\u1030\u1038_\u1000\u103C\u102C_\u101E\u1031\u102C_\u1014\u1031".split("_"),monthsShort:"\u1007\u1014\u103A_\u1016\u1031_\u1019\u1010\u103A_\u1015\u103C\u102E_\u1019\u1031_\u1007\u103D\u1014\u103A_\u101C\u102D\u102F\u1004\u103A_\u101E\u103C_\u1005\u1000\u103A_\u1021\u1031\u102C\u1000\u103A_\u1014\u102D\u102F_\u1012\u102E".split("_"),weekdaysMin:"\u1014\u103D\u1031_\u101C\u102C_\u1002\u102B_\u101F\u1030\u1038_\u1000\u103C\u102C_\u101E\u1031\u102C_\u1014\u1031".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"\u101C\u102C\u1019\u100A\u103A\u1037 %s \u1019\u103E\u102C",past:"\u101C\u103D\u1014\u103A\u1001\u1032\u1037\u101E\u1031\u102C %s \u1000",s:"\u1005\u1000\u1039\u1000\u1014\u103A.\u1021\u1014\u100A\u103A\u1038\u1004\u101A\u103A",m:"\u1010\u1005\u103A\u1019\u102D\u1014\u1005\u103A",mm:"%d \u1019\u102D\u1014\u1005\u103A",h:"\u1010\u1005\u103A\u1014\u102C\u101B\u102E",hh:"%d \u1014\u102C\u101B\u102E",d:"\u1010\u1005\u103A\u101B\u1000\u103A",dd:"%d \u101B\u1000\u103A",M:"\u1010\u1005\u103A\u101C",MM:"%d \u101C",y:"\u1010\u1005\u103A\u1014\u103E\u1005\u103A",yy:"%d \u1014\u103E\u1005\u103A"}};return s.default.locale(i,null,!0),i})});var ni=k((It,qt)=>{(function(n,t){typeof It=="object"&&typeof qt<"u"?qt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_nl=t(n.dayjs)})(It,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"nl",weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),ordinal:function(e){return"["+e+(e===1||e===8||e>=20?"ste":"de")+"]"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"een minuut",mm:"%d minuten",h:"een uur",hh:"%d uur",d:"een dag",dd:"%d dagen",M:"een maand",MM:"%d maanden",y:"een jaar",yy:"%d jaar"}};return s.default.locale(i,null,!0),i})});var ii=k((xt,Nt)=>{(function(n,t){typeof xt=="object"&&typeof Nt<"u"?Nt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_nb=t(n.dayjs)})(xt,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"nb",weekdays:"s\xF8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xF8rdag".split("_"),weekdaysShort:"s\xF8._ma._ti._on._to._fr._l\xF8.".split("_"),weekdaysMin:"s\xF8_ma_ti_on_to_fr_l\xF8".split("_"),months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),ordinal:function(e){return e+"."},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en m\xE5ned",MM:"%d m\xE5neder",y:"ett \xE5r",yy:"%d \xE5r"}};return s.default.locale(i,null,!0),i})});var si=k((Et,Ft)=>{(function(n,t){typeof Et=="object"&&typeof Ft<"u"?Ft.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_pl=t(n.dayjs)})(Et,function(n){"use strict";function t(_){return _&&typeof _=="object"&&"default"in _?_:{default:_}}var s=t(n);function i(_){return _%10<5&&_%10>1&&~~(_/10)%10!=1}function e(_,y,l){var f=_+" ";switch(l){case"m":return y?"minuta":"minut\u0119";case"mm":return f+(i(_)?"minuty":"minut");case"h":return y?"godzina":"godzin\u0119";case"hh":return f+(i(_)?"godziny":"godzin");case"MM":return f+(i(_)?"miesi\u0105ce":"miesi\u0119cy");case"yy":return f+(i(_)?"lata":"lat")}}var r="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrze\u015Bnia_pa\u017Adziernika_listopada_grudnia".split("_"),a="stycze\u0144_luty_marzec_kwiecie\u0144_maj_czerwiec_lipiec_sierpie\u0144_wrzesie\u0144_pa\u017Adziernik_listopad_grudzie\u0144".split("_"),u=/D MMMM/,o=function(_,y){return u.test(y)?r[_.month()]:a[_.month()]};o.s=a,o.f=r;var d={name:"pl",weekdays:"niedziela_poniedzia\u0142ek_wtorek_\u015Broda_czwartek_pi\u0105tek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_\u015Br_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_\u015Ar_Cz_Pt_So".split("_"),months:o,monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_pa\u017A_lis_gru".split("_"),ordinal:function(_){return _+"."},weekStart:1,yearStart:4,relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:e,mm:e,h:e,hh:e,d:"1 dzie\u0144",dd:"%d dni",M:"miesi\u0105c",MM:e,y:"rok",yy:e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};return s.default.locale(d,null,!0),d})});var ri=k((Jt,Wt)=>{(function(n,t){typeof Jt=="object"&&typeof Wt<"u"?Wt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_pt_br=t(n.dayjs)})(Jt,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"pt-br",weekdays:"domingo_segunda-feira_ter\xE7a-feira_quarta-feira_quinta-feira_sexta-feira_s\xE1bado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_s\xE1b".split("_"),weekdaysMin:"Do_2\xAA_3\xAA_4\xAA_5\xAA_6\xAA_S\xE1".split("_"),months:"janeiro_fevereiro_mar\xE7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),ordinal:function(e){return e+"\xBA"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [\xE0s] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [\xE0s] HH:mm"},relativeTime:{future:"em %s",past:"h\xE1 %s",s:"poucos segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um m\xEAs",MM:"%d meses",y:"um ano",yy:"%d anos"}};return s.default.locale(i,null,!0),i})});var ai=k((Ut,Pt)=>{(function(n,t){typeof Ut=="object"&&typeof Pt<"u"?Pt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_pt=t(n.dayjs)})(Ut,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"pt",weekdays:"domingo_segunda-feira_ter\xE7a-feira_quarta-feira_quinta-feira_sexta-feira_s\xE1bado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sab".split("_"),weekdaysMin:"Do_2\xAA_3\xAA_4\xAA_5\xAA_6\xAA_Sa".split("_"),months:"janeiro_fevereiro_mar\xE7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),ordinal:function(e){return e+"\xBA"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [\xE0s] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [\xE0s] HH:mm"},relativeTime:{future:"em %s",past:"h\xE1 %s",s:"alguns segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um m\xEAs",MM:"%d meses",y:"um ano",yy:"%d anos"}};return s.default.locale(i,null,!0),i})});var ui=k((Rt,Gt)=>{(function(n,t){typeof Rt=="object"&&typeof Gt<"u"?Gt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_ro=t(n.dayjs)})(Rt,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"ro",weekdays:"Duminic\u0103_Luni_Mar\u021Bi_Miercuri_Joi_Vineri_S\xE2mb\u0103t\u0103".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_S\xE2m".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_S\xE2".split("_"),months:"Ianuarie_Februarie_Martie_Aprilie_Mai_Iunie_Iulie_August_Septembrie_Octombrie_Noiembrie_Decembrie".split("_"),monthsShort:"Ian._Febr._Mart._Apr._Mai_Iun._Iul._Aug._Sept._Oct._Nov._Dec.".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},relativeTime:{future:"peste %s",past:"acum %s",s:"c\xE2teva secunde",m:"un minut",mm:"%d minute",h:"o or\u0103",hh:"%d ore",d:"o zi",dd:"%d zile",M:"o lun\u0103",MM:"%d luni",y:"un an",yy:"%d ani"},ordinal:function(e){return e}};return s.default.locale(i,null,!0),i})});var oi=k((Zt,Vt)=>{(function(n,t){typeof Zt=="object"&&typeof Vt<"u"?Vt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_ru=t(n.dayjs)})(Zt,function(n){"use strict";function t(l){return l&&typeof l=="object"&&"default"in l?l:{default:l}}var s=t(n),i="\u044F\u043D\u0432\u0430\u0440\u044F_\u0444\u0435\u0432\u0440\u0430\u043B\u044F_\u043C\u0430\u0440\u0442\u0430_\u0430\u043F\u0440\u0435\u043B\u044F_\u043C\u0430\u044F_\u0438\u044E\u043D\u044F_\u0438\u044E\u043B\u044F_\u0430\u0432\u0433\u0443\u0441\u0442\u0430_\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F_\u043E\u043A\u0442\u044F\u0431\u0440\u044F_\u043D\u043E\u044F\u0431\u0440\u044F_\u0434\u0435\u043A\u0430\u0431\u0440\u044F".split("_"),e="\u044F\u043D\u0432\u0430\u0440\u044C_\u0444\u0435\u0432\u0440\u0430\u043B\u044C_\u043C\u0430\u0440\u0442_\u0430\u043F\u0440\u0435\u043B\u044C_\u043C\u0430\u0439_\u0438\u044E\u043D\u044C_\u0438\u044E\u043B\u044C_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C_\u043E\u043A\u0442\u044F\u0431\u0440\u044C_\u043D\u043E\u044F\u0431\u0440\u044C_\u0434\u0435\u043A\u0430\u0431\u0440\u044C".split("_"),r="\u044F\u043D\u0432._\u0444\u0435\u0432\u0440._\u043C\u0430\u0440._\u0430\u043F\u0440._\u043C\u0430\u044F_\u0438\u044E\u043D\u044F_\u0438\u044E\u043B\u044F_\u0430\u0432\u0433._\u0441\u0435\u043D\u0442._\u043E\u043A\u0442._\u043D\u043E\u044F\u0431._\u0434\u0435\u043A.".split("_"),a="\u044F\u043D\u0432._\u0444\u0435\u0432\u0440._\u043C\u0430\u0440\u0442_\u0430\u043F\u0440._\u043C\u0430\u0439_\u0438\u044E\u043D\u044C_\u0438\u044E\u043B\u044C_\u0430\u0432\u0433._\u0441\u0435\u043D\u0442._\u043E\u043A\u0442._\u043D\u043E\u044F\u0431._\u0434\u0435\u043A.".split("_"),u=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function o(l,f,m){var Y,L;return m==="m"?f?"\u043C\u0438\u043D\u0443\u0442\u0430":"\u043C\u0438\u043D\u0443\u0442\u0443":l+" "+(Y=+l,L={mm:f?"\u043C\u0438\u043D\u0443\u0442\u0430_\u043C\u0438\u043D\u0443\u0442\u044B_\u043C\u0438\u043D\u0443\u0442":"\u043C\u0438\u043D\u0443\u0442\u0443_\u043C\u0438\u043D\u0443\u0442\u044B_\u043C\u0438\u043D\u0443\u0442",hh:"\u0447\u0430\u0441_\u0447\u0430\u0441\u0430_\u0447\u0430\u0441\u043E\u0432",dd:"\u0434\u0435\u043D\u044C_\u0434\u043D\u044F_\u0434\u043D\u0435\u0439",MM:"\u043C\u0435\u0441\u044F\u0446_\u043C\u0435\u0441\u044F\u0446\u0430_\u043C\u0435\u0441\u044F\u0446\u0435\u0432",yy:"\u0433\u043E\u0434_\u0433\u043E\u0434\u0430_\u043B\u0435\u0442"}[m].split("_"),Y%10==1&&Y%100!=11?L[0]:Y%10>=2&&Y%10<=4&&(Y%100<10||Y%100>=20)?L[1]:L[2])}var d=function(l,f){return u.test(f)?i[l.month()]:e[l.month()]};d.s=e,d.f=i;var _=function(l,f){return u.test(f)?r[l.month()]:a[l.month()]};_.s=a,_.f=r;var y={name:"ru",weekdays:"\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435_\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A_\u0432\u0442\u043E\u0440\u043D\u0438\u043A_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043F\u044F\u0442\u043D\u0438\u0446\u0430_\u0441\u0443\u0431\u0431\u043E\u0442\u0430".split("_"),weekdaysShort:"\u0432\u0441\u043A_\u043F\u043D\u0434_\u0432\u0442\u0440_\u0441\u0440\u0434_\u0447\u0442\u0432_\u043F\u0442\u043D_\u0441\u0431\u0442".split("_"),weekdaysMin:"\u0432\u0441_\u043F\u043D_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043F\u0442_\u0441\u0431".split("_"),months:d,monthsShort:_,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., H:mm",LLLL:"dddd, D MMMM YYYY \u0433., H:mm"},relativeTime:{future:"\u0447\u0435\u0440\u0435\u0437 %s",past:"%s \u043D\u0430\u0437\u0430\u0434",s:"\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u043A\u0443\u043D\u0434",m:o,mm:o,h:"\u0447\u0430\u0441",hh:o,d:"\u0434\u0435\u043D\u044C",dd:o,M:"\u043C\u0435\u0441\u044F\u0446",MM:o,y:"\u0433\u043E\u0434",yy:o},ordinal:function(l){return l},meridiem:function(l){return l<4?"\u043D\u043E\u0447\u0438":l<12?"\u0443\u0442\u0440\u0430":l<17?"\u0434\u043D\u044F":"\u0432\u0435\u0447\u0435\u0440\u0430"}};return s.default.locale(y,null,!0),y})});var di=k((Kt,Qt)=>{(function(n,t){typeof Kt=="object"&&typeof Qt<"u"?Qt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_sv=t(n.dayjs)})(Kt,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"sv",weekdays:"s\xF6ndag_m\xE5ndag_tisdag_onsdag_torsdag_fredag_l\xF6rdag".split("_"),weekdaysShort:"s\xF6n_m\xE5n_tis_ons_tor_fre_l\xF6r".split("_"),weekdaysMin:"s\xF6_m\xE5_ti_on_to_fr_l\xF6".split("_"),months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekStart:1,yearStart:4,ordinal:function(e){var r=e%10;return"["+e+(r===1||r===2?"a":"e")+"]"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},relativeTime:{future:"om %s",past:"f\xF6r %s sedan",s:"n\xE5gra sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en m\xE5nad",MM:"%d m\xE5nader",y:"ett \xE5r",yy:"%d \xE5r"}};return s.default.locale(i,null,!0),i})});var _i=k((Xt,Bt)=>{(function(n,t){typeof Xt=="object"&&typeof Bt<"u"?Bt.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_th=t(n.dayjs)})(Xt,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"th",weekdays:"\u0E2D\u0E32\u0E17\u0E34\u0E15\u0E22\u0E4C_\u0E08\u0E31\u0E19\u0E17\u0E23\u0E4C_\u0E2D\u0E31\u0E07\u0E04\u0E32\u0E23_\u0E1E\u0E38\u0E18_\u0E1E\u0E24\u0E2B\u0E31\u0E2A\u0E1A\u0E14\u0E35_\u0E28\u0E38\u0E01\u0E23\u0E4C_\u0E40\u0E2A\u0E32\u0E23\u0E4C".split("_"),weekdaysShort:"\u0E2D\u0E32\u0E17\u0E34\u0E15\u0E22\u0E4C_\u0E08\u0E31\u0E19\u0E17\u0E23\u0E4C_\u0E2D\u0E31\u0E07\u0E04\u0E32\u0E23_\u0E1E\u0E38\u0E18_\u0E1E\u0E24\u0E2B\u0E31\u0E2A_\u0E28\u0E38\u0E01\u0E23\u0E4C_\u0E40\u0E2A\u0E32\u0E23\u0E4C".split("_"),weekdaysMin:"\u0E2D\u0E32._\u0E08._\u0E2D._\u0E1E._\u0E1E\u0E24._\u0E28._\u0E2A.".split("_"),months:"\u0E21\u0E01\u0E23\u0E32\u0E04\u0E21_\u0E01\u0E38\u0E21\u0E20\u0E32\u0E1E\u0E31\u0E19\u0E18\u0E4C_\u0E21\u0E35\u0E19\u0E32\u0E04\u0E21_\u0E40\u0E21\u0E29\u0E32\u0E22\u0E19_\u0E1E\u0E24\u0E29\u0E20\u0E32\u0E04\u0E21_\u0E21\u0E34\u0E16\u0E38\u0E19\u0E32\u0E22\u0E19_\u0E01\u0E23\u0E01\u0E0E\u0E32\u0E04\u0E21_\u0E2A\u0E34\u0E07\u0E2B\u0E32\u0E04\u0E21_\u0E01\u0E31\u0E19\u0E22\u0E32\u0E22\u0E19_\u0E15\u0E38\u0E25\u0E32\u0E04\u0E21_\u0E1E\u0E24\u0E28\u0E08\u0E34\u0E01\u0E32\u0E22\u0E19_\u0E18\u0E31\u0E19\u0E27\u0E32\u0E04\u0E21".split("_"),monthsShort:"\u0E21.\u0E04._\u0E01.\u0E1E._\u0E21\u0E35.\u0E04._\u0E40\u0E21.\u0E22._\u0E1E.\u0E04._\u0E21\u0E34.\u0E22._\u0E01.\u0E04._\u0E2A.\u0E04._\u0E01.\u0E22._\u0E15.\u0E04._\u0E1E.\u0E22._\u0E18.\u0E04.".split("_"),formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY \u0E40\u0E27\u0E25\u0E32 H:mm",LLLL:"\u0E27\u0E31\u0E19dddd\u0E17\u0E35\u0E48 D MMMM YYYY \u0E40\u0E27\u0E25\u0E32 H:mm"},relativeTime:{future:"\u0E2D\u0E35\u0E01 %s",past:"%s\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27",s:"\u0E44\u0E21\u0E48\u0E01\u0E35\u0E48\u0E27\u0E34\u0E19\u0E32\u0E17\u0E35",m:"1 \u0E19\u0E32\u0E17\u0E35",mm:"%d \u0E19\u0E32\u0E17\u0E35",h:"1 \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07",hh:"%d \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07",d:"1 \u0E27\u0E31\u0E19",dd:"%d \u0E27\u0E31\u0E19",M:"1 \u0E40\u0E14\u0E37\u0E2D\u0E19",MM:"%d \u0E40\u0E14\u0E37\u0E2D\u0E19",y:"1 \u0E1B\u0E35",yy:"%d \u0E1B\u0E35"},ordinal:function(e){return e+"."}};return s.default.locale(i,null,!0),i})});var fi=k((en,tn)=>{(function(n,t){typeof en=="object"&&typeof tn<"u"?tn.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_tr=t(n.dayjs)})(en,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"tr",weekdays:"Pazar_Pazartesi_Sal\u0131_\xC7ar\u015Famba_Per\u015Fembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_\xC7ar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_\xC7a_Pe_Cu_Ct".split("_"),months:"Ocak_\u015Eubat_Mart_Nisan_May\u0131s_Haziran_Temmuz_A\u011Fustos_Eyl\xFCl_Ekim_Kas\u0131m_Aral\u0131k".split("_"),monthsShort:"Oca_\u015Eub_Mar_Nis_May_Haz_Tem_A\u011Fu_Eyl_Eki_Kas_Ara".split("_"),weekStart:1,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%s sonra",past:"%s \xF6nce",s:"birka\xE7 saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir g\xFCn",dd:"%d g\xFCn",M:"bir ay",MM:"%d ay",y:"bir y\u0131l",yy:"%d y\u0131l"},ordinal:function(e){return e+"."}};return s.default.locale(i,null,!0),i})});var li=k((nn,sn)=>{(function(n,t){typeof nn=="object"&&typeof sn<"u"?sn.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_uk=t(n.dayjs)})(nn,function(n){"use strict";function t(d){return d&&typeof d=="object"&&"default"in d?d:{default:d}}var s=t(n),i="\u0441\u0456\u0447\u043D\u044F_\u043B\u044E\u0442\u043E\u0433\u043E_\u0431\u0435\u0440\u0435\u0437\u043D\u044F_\u043A\u0432\u0456\u0442\u043D\u044F_\u0442\u0440\u0430\u0432\u043D\u044F_\u0447\u0435\u0440\u0432\u043D\u044F_\u043B\u0438\u043F\u043D\u044F_\u0441\u0435\u0440\u043F\u043D\u044F_\u0432\u0435\u0440\u0435\u0441\u043D\u044F_\u0436\u043E\u0432\u0442\u043D\u044F_\u043B\u0438\u0441\u0442\u043E\u043F\u0430\u0434\u0430_\u0433\u0440\u0443\u0434\u043D\u044F".split("_"),e="\u0441\u0456\u0447\u0435\u043D\u044C_\u043B\u044E\u0442\u0438\u0439_\u0431\u0435\u0440\u0435\u0437\u0435\u043D\u044C_\u043A\u0432\u0456\u0442\u0435\u043D\u044C_\u0442\u0440\u0430\u0432\u0435\u043D\u044C_\u0447\u0435\u0440\u0432\u0435\u043D\u044C_\u043B\u0438\u043F\u0435\u043D\u044C_\u0441\u0435\u0440\u043F\u0435\u043D\u044C_\u0432\u0435\u0440\u0435\u0441\u0435\u043D\u044C_\u0436\u043E\u0432\u0442\u0435\u043D\u044C_\u043B\u0438\u0441\u0442\u043E\u043F\u0430\u0434_\u0433\u0440\u0443\u0434\u0435\u043D\u044C".split("_"),r=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function a(d,_,y){var l,f;return y==="m"?_?"\u0445\u0432\u0438\u043B\u0438\u043D\u0430":"\u0445\u0432\u0438\u043B\u0438\u043D\u0443":y==="h"?_?"\u0433\u043E\u0434\u0438\u043D\u0430":"\u0433\u043E\u0434\u0438\u043D\u0443":d+" "+(l=+d,f={ss:_?"\u0441\u0435\u043A\u0443\u043D\u0434\u0430_\u0441\u0435\u043A\u0443\u043D\u0434\u0438_\u0441\u0435\u043A\u0443\u043D\u0434":"\u0441\u0435\u043A\u0443\u043D\u0434\u0443_\u0441\u0435\u043A\u0443\u043D\u0434\u0438_\u0441\u0435\u043A\u0443\u043D\u0434",mm:_?"\u0445\u0432\u0438\u043B\u0438\u043D\u0430_\u0445\u0432\u0438\u043B\u0438\u043D\u0438_\u0445\u0432\u0438\u043B\u0438\u043D":"\u0445\u0432\u0438\u043B\u0438\u043D\u0443_\u0445\u0432\u0438\u043B\u0438\u043D\u0438_\u0445\u0432\u0438\u043B\u0438\u043D",hh:_?"\u0433\u043E\u0434\u0438\u043D\u0430_\u0433\u043E\u0434\u0438\u043D\u0438_\u0433\u043E\u0434\u0438\u043D":"\u0433\u043E\u0434\u0438\u043D\u0443_\u0433\u043E\u0434\u0438\u043D\u0438_\u0433\u043E\u0434\u0438\u043D",dd:"\u0434\u0435\u043D\u044C_\u0434\u043D\u0456_\u0434\u043D\u0456\u0432",MM:"\u043C\u0456\u0441\u044F\u0446\u044C_\u043C\u0456\u0441\u044F\u0446\u0456_\u043C\u0456\u0441\u044F\u0446\u0456\u0432",yy:"\u0440\u0456\u043A_\u0440\u043E\u043A\u0438_\u0440\u043E\u043A\u0456\u0432"}[y].split("_"),l%10==1&&l%100!=11?f[0]:l%10>=2&&l%10<=4&&(l%100<10||l%100>=20)?f[1]:f[2])}var u=function(d,_){return r.test(_)?i[d.month()]:e[d.month()]};u.s=e,u.f=i;var o={name:"uk",weekdays:"\u043D\u0435\u0434\u0456\u043B\u044F_\u043F\u043E\u043D\u0435\u0434\u0456\u043B\u043E\u043A_\u0432\u0456\u0432\u0442\u043E\u0440\u043E\u043A_\u0441\u0435\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440_\u043F\u2019\u044F\u0442\u043D\u0438\u0446\u044F_\u0441\u0443\u0431\u043E\u0442\u0430".split("_"),weekdaysShort:"\u043D\u0434\u043B_\u043F\u043D\u0434_\u0432\u0442\u0440_\u0441\u0440\u0434_\u0447\u0442\u0432_\u043F\u0442\u043D_\u0441\u0431\u0442".split("_"),weekdaysMin:"\u043D\u0434_\u043F\u043D_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043F\u0442_\u0441\u0431".split("_"),months:u,monthsShort:"\u0441\u0456\u0447_\u043B\u044E\u0442_\u0431\u0435\u0440_\u043A\u0432\u0456\u0442_\u0442\u0440\u0430\u0432_\u0447\u0435\u0440\u0432_\u043B\u0438\u043F_\u0441\u0435\u0440\u043F_\u0432\u0435\u0440_\u0436\u043E\u0432\u0442_\u043B\u0438\u0441\u0442_\u0433\u0440\u0443\u0434".split("_"),weekStart:1,relativeTime:{future:"\u0437\u0430 %s",past:"%s \u0442\u043E\u043C\u0443",s:"\u0434\u0435\u043A\u0456\u043B\u044C\u043A\u0430 \u0441\u0435\u043A\u0443\u043D\u0434",m:a,mm:a,h:a,hh:a,d:"\u0434\u0435\u043D\u044C",dd:a,M:"\u043C\u0456\u0441\u044F\u0446\u044C",MM:a,y:"\u0440\u0456\u043A",yy:a},ordinal:function(d){return d},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0440.",LLL:"D MMMM YYYY \u0440., HH:mm",LLLL:"dddd, D MMMM YYYY \u0440., HH:mm"}};return s.default.locale(o,null,!0),o})});var mi=k((rn,an)=>{(function(n,t){typeof rn=="object"&&typeof an<"u"?an.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_vi=t(n.dayjs)})(rn,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"vi",weekdays:"ch\u1EE7 nh\u1EADt_th\u1EE9 hai_th\u1EE9 ba_th\u1EE9 t\u01B0_th\u1EE9 n\u0103m_th\u1EE9 s\xE1u_th\u1EE9 b\u1EA3y".split("_"),months:"th\xE1ng 1_th\xE1ng 2_th\xE1ng 3_th\xE1ng 4_th\xE1ng 5_th\xE1ng 6_th\xE1ng 7_th\xE1ng 8_th\xE1ng 9_th\xE1ng 10_th\xE1ng 11_th\xE1ng 12".split("_"),weekStart:1,weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [n\u0103m] YYYY",LLL:"D MMMM [n\u0103m] YYYY HH:mm",LLLL:"dddd, D MMMM [n\u0103m] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},relativeTime:{future:"%s t\u1EDBi",past:"%s tr\u01B0\u1EDBc",s:"v\xE0i gi\xE2y",m:"m\u1ED9t ph\xFAt",mm:"%d ph\xFAt",h:"m\u1ED9t gi\u1EDD",hh:"%d gi\u1EDD",d:"m\u1ED9t ng\xE0y",dd:"%d ng\xE0y",M:"m\u1ED9t th\xE1ng",MM:"%d th\xE1ng",y:"m\u1ED9t n\u0103m",yy:"%d n\u0103m"}};return s.default.locale(i,null,!0),i})});var ci=k((un,on)=>{(function(n,t){typeof un=="object"&&typeof on<"u"?on.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_zh_cn=t(n.dayjs)})(un,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"zh-cn",weekdays:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),weekdaysShort:"\u5468\u65E5_\u5468\u4E00_\u5468\u4E8C_\u5468\u4E09_\u5468\u56DB_\u5468\u4E94_\u5468\u516D".split("_"),weekdaysMin:"\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),ordinal:function(e,r){return r==="W"?e+"\u5468":e+"\u65E5"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5Ah\u70B9mm\u5206",LLLL:"YYYY\u5E74M\u6708D\u65E5ddddAh\u70B9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm"},relativeTime:{future:"%s\u5185",past:"%s\u524D",s:"\u51E0\u79D2",m:"1 \u5206\u949F",mm:"%d \u5206\u949F",h:"1 \u5C0F\u65F6",hh:"%d \u5C0F\u65F6",d:"1 \u5929",dd:"%d \u5929",M:"1 \u4E2A\u6708",MM:"%d \u4E2A\u6708",y:"1 \u5E74",yy:"%d \u5E74"},meridiem:function(e,r){var a=100*e+r;return a<600?"\u51CC\u6668":a<900?"\u65E9\u4E0A":a<1100?"\u4E0A\u5348":a<1300?"\u4E2D\u5348":a<1800?"\u4E0B\u5348":"\u665A\u4E0A"}};return s.default.locale(i,null,!0),i})});var hi=k((dn,_n)=>{(function(n,t){typeof dn=="object"&&typeof _n<"u"?_n.exports=t(j()):typeof define=="function"&&define.amd?define(["dayjs"],t):(n=typeof globalThis<"u"?globalThis:n||self).dayjs_locale_zh_tw=t(n.dayjs)})(dn,function(n){"use strict";function t(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var s=t(n),i={name:"zh-tw",weekdays:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),weekdaysShort:"\u9031\u65E5_\u9031\u4E00_\u9031\u4E8C_\u9031\u4E09_\u9031\u56DB_\u9031\u4E94_\u9031\u516D".split("_"),weekdaysMin:"\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),ordinal:function(e,r){return r==="W"?e+"\u9031":e+"\u65E5"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5 HH:mm",LLLL:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm"},relativeTime:{future:"%s\u5167",past:"%s\u524D",s:"\u5E7E\u79D2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5C0F\u6642",hh:"%d \u5C0F\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500B\u6708",MM:"%d \u500B\u6708",y:"1 \u5E74",yy:"%d \u5E74"},meridiem:function(e,r){var a=100*e+r;return a<600?"\u51CC\u6668":a<900?"\u65E9\u4E0A":a<1100?"\u4E0A\u5348":a<1300?"\u4E2D\u5348":a<1800?"\u4E0B\u5348":"\u665A\u4E0A"}};return s.default.locale(i,null,!0),i})});var ln=60,mn=ln*60,cn=mn*24,ji=cn*7,ae=1e3,ce=ln*ae,ge=mn*ae,hn=cn*ae,Mn=ji*ae,_e="millisecond",te="second",ne="minute",ie="hour",V="day",oe="week",R="month",he="quarter",K="year",se="date",yn="YYYY-MM-DDTHH:mm:ssZ",Se="Invalid Date",Yn=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,pn=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;var Ln={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var s=["th","st","nd","rd"],i=t%100;return"["+t+(s[(i-20)%10]||s[i]||s[0])+"]"}};var be=function(t,s,i){var e=String(t);return!e||e.length>=s?t:""+Array(s+1-e.length).join(i)+t},Ti=function(t){var s=-t.utcOffset(),i=Math.abs(s),e=Math.floor(i/60),r=i%60;return(s<=0?"+":"-")+be(e,2,"0")+":"+be(r,2,"0")},wi=function n(t,s){if(t.date()1)return n(a[0])}else{var u=t.name;ue[u]=t,e=u}return!i&&e&&(fe=e),e||!i&&fe},F=function(t,s){if(ke(t))return t.clone();var i=typeof s=="object"?s:{};return i.date=t,i.args=arguments,new ye(i)},zi=function(t,s){return F(t,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})},z=vn;z.l=Me;z.i=ke;z.w=zi;var Ai=function(t){var s=t.date,i=t.utc;if(s===null)return new Date(NaN);if(z.u(s))return new Date;if(s instanceof Date)return new Date(s);if(typeof s=="string"&&!/Z$/i.test(s)){var e=s.match(Yn);if(e){var r=e[2]-1||0,a=(e[7]||"0").substring(0,3);return i?new Date(Date.UTC(e[1],r,e[3]||1,e[4]||0,e[5]||0,e[6]||0,a)):new Date(e[1],r,e[3]||1,e[4]||0,e[5]||0,e[6]||0,a)}}return new Date(s)},ye=function(){function n(s){this.$L=Me(s.locale,null,!0),this.parse(s),this.$x=this.$x||s.x||{},this[gn]=!0}var t=n.prototype;return t.parse=function(i){this.$d=Ai(i),this.init()},t.init=function(){var i=this.$d;this.$y=i.getFullYear(),this.$M=i.getMonth(),this.$D=i.getDate(),this.$W=i.getDay(),this.$H=i.getHours(),this.$m=i.getMinutes(),this.$s=i.getSeconds(),this.$ms=i.getMilliseconds()},t.$utils=function(){return z},t.isValid=function(){return this.$d.toString()!==Se},t.isSame=function(i,e){var r=F(i);return this.startOf(e)<=r&&r<=this.endOf(e)},t.isAfter=function(i,e){return F(i)this.togglePanelVisibility(this.$refs.button)),this.$watch("focusedMonth",()=>{this.focusedMonth=+this.focusedMonth,this.focusedDate.month()!==this.focusedMonth&&(this.focusedDate=this.focusedDate.month(this.focusedMonth))}),this.$watch("focusedYear",()=>{if(this.focusedYear?.length>4&&(this.focusedYear=this.focusedYear.substring(0,4)),!this.focusedYear||this.focusedYear?.length!==4)return;let o=+this.focusedYear;Number.isInteger(o)||(o=O().tz(a).year(),this.focusedYear=o),this.focusedDate.year()!==o&&(this.focusedDate=this.focusedDate.year(o))}),this.$watch("focusedDate",()=>{let o=this.focusedDate.month(),d=this.focusedDate.year();this.focusedMonth!==o&&(this.focusedMonth=o),this.focusedYear!==d&&(this.focusedYear=d),this.setupDaysGrid()}),this.$watch("hour",()=>{let o=+this.hour;if(Number.isInteger(o)?o>23?this.hour=0:o<0?this.hour=23:this.hour=o:this.hour=0,this.isClearingState)return;let d=this.getSelectedDate()??this.focusedDate;this.setState(d.hour(this.hour??0))}),this.$watch("minute",()=>{let o=+this.minute;if(Number.isInteger(o)?o>59?this.minute=0:o<0?this.minute=59:this.minute=o:this.minute=0,this.isClearingState)return;let d=this.getSelectedDate()??this.focusedDate;this.setState(d.minute(this.minute??0))}),this.$watch("second",()=>{let o=+this.second;if(Number.isInteger(o)?o>59?this.second=0:o<0?this.second=59:this.second=o:this.second=0,this.isClearingState)return;let d=this.getSelectedDate()??this.focusedDate;this.setState(d.second(this.second??0))}),this.$watch("state",()=>{if(this.state===void 0)return;let o=this.getSelectedDate();if(o===null){this.clearState();return}this.getMaxDate()!==null&&o?.isAfter(this.getMaxDate())&&(o=null),this.getMinDate()!==null&&o?.isBefore(this.getMinDate())&&(o=null);let d=o?.hour()??0;this.hour!==d&&(this.hour=d);let _=o?.minute()??0;this.minute!==_&&(this.minute=_);let y=o?.second()??0;this.second!==y&&(this.second=y),this.setDisplayText()})},clearState:function(){this.isClearingState=!0,this.setState(null),this.hour=0,this.minute=0,this.second=0,this.$nextTick(()=>this.isClearingState=!1)},dateIsDisabled:function(u){return!!(this.$refs?.disabledDates&&JSON.parse(this.$refs.disabledDates.value??[]).some(o=>(o=O(o),o.isValid()?o.isSame(u,"day"):!1))||this.getMaxDate()&&u.isAfter(this.getMaxDate(),"day")||this.getMinDate()&&u.isBefore(this.getMinDate(),"day"))},dayIsDisabled:function(u){return this.focusedDate??(this.focusedDate=O().tz(a)),this.dateIsDisabled(this.focusedDate.date(u))},dayIsSelected:function(u){let o=this.getSelectedDate();return o===null?!1:(this.focusedDate??(this.focusedDate=O().tz(a)),o.date()===u&&o.month()===this.focusedDate.month()&&o.year()===this.focusedDate.year())},dayIsToday:function(u){let o=O().tz(a);return this.focusedDate??(this.focusedDate=o),o.date()===u&&o.month()===this.focusedDate.month()&&o.year()===this.focusedDate.year()},focusPreviousDay:function(){this.focusedDate??(this.focusedDate=O().tz(a)),this.focusedDate=this.focusedDate.subtract(1,"day")},focusPreviousWeek:function(){this.focusedDate??(this.focusedDate=O().tz(a)),this.focusedDate=this.focusedDate.subtract(1,"week")},focusNextDay:function(){this.focusedDate??(this.focusedDate=O().tz(a)),this.focusedDate=this.focusedDate.add(1,"day")},focusNextWeek:function(){this.focusedDate??(this.focusedDate=O().tz(a)),this.focusedDate=this.focusedDate.add(1,"week")},getDayLabels:function(){let u=O.weekdaysShort();return t===0?u:[...u.slice(t),...u.slice(0,t)]},getMaxDate:function(){let u=O(this.$refs.maxDate?.value);return u.isValid()?u:null},getMinDate:function(){let u=O(this.$refs.minDate?.value);return u.isValid()?u:null},getSelectedDate:function(){if(this.state===void 0||this.state===null)return null;let u=O(this.state);return u.isValid()?u:null},togglePanelVisibility:function(){this.isOpen()||(this.focusedDate=this.getSelectedDate()??this.getMinDate()??O().tz(a),this.setupDaysGrid()),this.$refs.panel.toggle(this.$refs.button)},selectDate:function(u=null){u&&this.setFocusedDay(u),this.focusedDate??(this.focusedDate=O().tz(a)),this.setState(this.focusedDate),e&&this.togglePanelVisibility()},setDisplayText:function(){this.displayText=this.getSelectedDate()?this.getSelectedDate().format(n):""},setMonths:function(){this.months=O.months()},setDayLabels:function(){this.dayLabels=this.getDayLabels()},setupDaysGrid:function(){this.focusedDate??(this.focusedDate=O().tz(a)),this.emptyDaysInFocusedMonth=Array.from({length:this.focusedDate.date(8-t).day()},(u,o)=>o+1),this.daysInFocusedMonth=Array.from({length:this.focusedDate.daysInMonth()},(u,o)=>o+1)},setFocusedDay:function(u){this.focusedDate=(this.focusedDate??O().tz(a)).date(u)},setState:function(u){if(u===null){this.state=null,this.setDisplayText();return}this.dateIsDisabled(u)||(this.state=u.hour(this.hour??0).minute(this.minute??0).second(this.second??0).format("YYYY-MM-DD HH:mm:ss"),this.setDisplayText())},isOpen:function(){return this.$refs.panel?.style.display==="block"}}}var Mi={ar:wn(),bs:$n(),ca:Cn(),ckb:Pe(),cs:zn(),cy:An(),da:In(),de:qn(),en:xn(),es:Nn(),et:En(),fa:Fn(),fi:Jn(),fr:Wn(),hi:Un(),hu:Pn(),hy:Rn(),id:Gn(),it:Zn(),ja:Vn(),ka:Kn(),km:Qn(),ku:Pe(),lt:Xn(),lv:Bn(),ms:ei(),my:ti(),nl:ni(),no:ii(),pl:si(),pt_BR:ri(),pt_PT:ai(),ro:ui(),ru:oi(),sv:di(),th:_i(),tr:fi(),uk:li(),vi:mi(),zh_CN:ci(),zh_TW:hi()};export{Ii as default}; diff --git a/public/js/filament/forms/components/file-upload.js b/public/js/filament/forms/components/file-upload.js new file mode 100644 index 000000000..e78c02a69 --- /dev/null +++ b/public/js/filament/forms/components/file-upload.js @@ -0,0 +1,123 @@ +var pr=Object.defineProperty;var mr=(e,t)=>{for(var i in t)pr(e,i,{get:t[i],enumerable:!0})};var la={};mr(la,{FileOrigin:()=>Ct,FileStatus:()=>Et,OptionTypes:()=>Ui,Status:()=>ll,create:()=>gt,destroy:()=>ft,find:()=>Hi,getOptions:()=>ji,parse:()=>Wi,registerPlugin:()=>ve,setOptions:()=>Ft,supported:()=>Gi});var ur=e=>e instanceof HTMLElement,gr=(e,t=[],i=[])=>{let a={...e},n=[],l=[],o=()=>({...a}),r=()=>{let g=[...n];return n.length=0,g},s=()=>{let g=[...l];l.length=0,g.forEach(({type:f,data:h})=>{p(f,h)})},p=(g,f,h)=>{if(h&&!document.hidden){l.push({type:g,data:f});return}u[g]&&u[g](f),n.push({type:g,data:f})},c=(g,...f)=>m[g]?m[g](...f):null,d={getState:o,processActionQueue:r,processDispatchQueue:s,dispatch:p,query:c},m={};t.forEach(g=>{m={...g(a),...m}});let u={};return i.forEach(g=>{u={...g(p,c,a),...u}}),d},fr=(e,t,i)=>{if(typeof i=="function"){e[t]=i;return}Object.defineProperty(e,t,{...i})},te=(e,t)=>{for(let i in e)e.hasOwnProperty(i)&&t(i,e[i])},We=e=>{let t={};return te(e,i=>{fr(t,i,e[i])}),t},ce=(e,t,i=null)=>{if(i===null)return e.getAttribute(t)||e.hasAttribute(t);e.setAttribute(t,i)},hr="http://www.w3.org/2000/svg",br=["svg","path"],za=e=>br.includes(e),li=(e,t,i={})=>{typeof t=="object"&&(i=t,t=null);let a=za(e)?document.createElementNS(hr,e):document.createElement(e);return t&&(za(e)?ce(a,"class",t):a.className=t),te(i,(n,l)=>{ce(a,n,l)}),a},Er=e=>(t,i)=>{typeof i<"u"&&e.children[i]?e.insertBefore(t,e.children[i]):e.appendChild(t)},Tr=(e,t)=>(i,a)=>(typeof a<"u"?t.splice(a,0,i):t.push(i),i),Ir=(e,t)=>i=>(t.splice(t.indexOf(i),1),i.element.parentNode&&e.removeChild(i.element),i),vr=typeof window<"u"&&typeof window.document<"u",En=()=>vr,xr=En()?li("svg"):{},yr="children"in xr?e=>e.children.length:e=>e.childNodes.length,Tn=(e,t,i,a)=>{let n=i[0]||e.left,l=i[1]||e.top,o=n+e.width,r=l+e.height*(a[1]||1),s={element:{...e},inner:{left:e.left,top:e.top,right:e.right,bottom:e.bottom},outer:{left:n,top:l,right:o,bottom:r}};return t.filter(p=>!p.isRectIgnored()).map(p=>p.rect).forEach(p=>{Oa(s.inner,{...p.inner}),Oa(s.outer,{...p.outer})}),Fa(s.inner),s.outer.bottom+=s.element.marginBottom,s.outer.right+=s.element.marginRight,Fa(s.outer),s},Oa=(e,t)=>{t.top+=e.top,t.right+=e.left,t.bottom+=e.top,t.left+=e.left,t.bottom>e.bottom&&(e.bottom=t.bottom),t.right>e.right&&(e.right=t.right)},Fa=e=>{e.width=e.right-e.left,e.height=e.bottom-e.top},$e=e=>typeof e=="number",Rr=(e,t,i,a=.001)=>Math.abs(e-t){let a=null,n=null,l=0,o=!1,p=We({interpolate:(c,d)=>{if(o)return;if(!($e(a)&&$e(n))){o=!0,l=0;return}let m=-(n-a)*e;l+=m/i,n+=l,l*=t,Rr(n,a,l)||d?(n=a,l=0,o=!0,p.onupdate(n),p.oncomplete(n)):p.onupdate(n)},target:{set:c=>{if($e(c)&&!$e(n)&&(n=c),a===null&&(a=c,n=c),a=c,n===a||typeof a>"u"){o=!0,l=0,p.onupdate(n),p.oncomplete(n);return}o=!1},get:()=>a},resting:{get:()=>o},onupdate:c=>{},oncomplete:c=>{}});return p};var _r=e=>e<.5?2*e*e:-1+(4-2*e)*e,wr=({duration:e=500,easing:t=_r,delay:i=0}={})=>{let a=null,n,l,o=!0,r=!1,s=null,c=We({interpolate:(d,m)=>{o||s===null||(a===null&&(a=d),!(d-a=e||m?(n=1,l=r?0:1,c.onupdate(l*s),c.oncomplete(l*s),o=!0):(l=n/e,c.onupdate((n>=0?t(r?1-l:l):0)*s))))},target:{get:()=>r?0:s,set:d=>{if(s===null){s=d,c.onupdate(d),c.oncomplete(d);return}do},onupdate:d=>{},oncomplete:d=>{}});return c},Da={spring:Sr,tween:wr},Lr=(e,t,i)=>{let a=e[t]&&typeof e[t][i]=="object"?e[t][i]:e[t]||e,n=typeof a=="string"?a:a.type,l=typeof a=="object"?{...a}:{};return Da[n]?Da[n](l):null},Yi=(e,t,i,a=!1)=>{t=Array.isArray(t)?t:[t],t.forEach(n=>{e.forEach(l=>{let o=l,r=()=>i[l],s=p=>i[l]=p;typeof l=="object"&&(o=l.key,r=l.getter||r,s=l.setter||s),!(n[o]&&!a)&&(n[o]={get:r,set:s})})})},Mr=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a})=>{let n={...t},l=[];return te(e,(o,r)=>{let s=Lr(r);if(!s)return;s.onupdate=c=>{t[o]=c},s.target=n[o],Yi([{key:o,setter:c=>{s.target!==c&&(s.target=c)},getter:()=>t[o]}],[i,a],t,!0),l.push(s)}),{write:o=>{let r=document.hidden,s=!0;return l.forEach(p=>{p.resting||(s=!1),p.interpolate(o,r)}),s},destroy:()=>{}}},Ar=e=>(t,i)=>{e.addEventListener(t,i)},Pr=e=>(t,i)=>{e.removeEventListener(t,i)},zr=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a,viewState:n,view:l})=>{let o=[],r=Ar(l.element),s=Pr(l.element);return a.on=(p,c)=>{o.push({type:p,fn:c}),r(p,c)},a.off=(p,c)=>{o.splice(o.findIndex(d=>d.type===p&&d.fn===c),1),s(p,c)},{write:()=>!0,destroy:()=>{o.forEach(p=>{s(p.type,p.fn)})}}},Or=({mixinConfig:e,viewProps:t,viewExternalAPI:i})=>{Yi(e,i,t)},ue=e=>e!=null,Fr={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},Dr=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a,view:n})=>{let l={...t},o={};Yi(e,[i,a],t);let r=()=>[t.translateX||0,t.translateY||0],s=()=>[t.scaleX||0,t.scaleY||0],p=()=>n.rect?Tn(n.rect,n.childViews,r(),s()):null;return i.rect={get:p},a.rect={get:p},e.forEach(c=>{t[c]=typeof l[c]>"u"?Fr[c]:l[c]}),{write:()=>{if(Cr(o,t))return Br(n.element,t),Object.assign(o,{...t}),!0},destroy:()=>{}}},Cr=(e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!0;for(let i in t)if(t[i]!==e[i])return!0;return!1},Br=(e,{opacity:t,perspective:i,translateX:a,translateY:n,scaleX:l,scaleY:o,rotateX:r,rotateY:s,rotateZ:p,originX:c,originY:d,width:m,height:u})=>{let g="",f="";(ue(c)||ue(d))&&(f+=`transform-origin: ${c||0}px ${d||0}px;`),ue(i)&&(g+=`perspective(${i}px) `),(ue(a)||ue(n))&&(g+=`translate3d(${a||0}px, ${n||0}px, 0) `),(ue(l)||ue(o))&&(g+=`scale3d(${ue(l)?l:1}, ${ue(o)?o:1}, 1) `),ue(p)&&(g+=`rotateZ(${p}rad) `),ue(r)&&(g+=`rotateX(${r}rad) `),ue(s)&&(g+=`rotateY(${s}rad) `),g.length&&(f+=`transform:${g};`),ue(t)&&(f+=`opacity:${t};`,t===0&&(f+="visibility:hidden;"),t<1&&(f+="pointer-events:none;")),ue(u)&&(f+=`height:${u}px;`),ue(m)&&(f+=`width:${m}px;`);let h=e.elementCurrentStyle||"";(f.length!==h.length||f!==h)&&(e.style.cssText=f,e.elementCurrentStyle=f)},Nr={styles:Dr,listeners:zr,animations:Mr,apis:Or},Ca=(e={},t={},i={})=>(t.layoutCalculated||(e.paddingTop=parseInt(i.paddingTop,10)||0,e.marginTop=parseInt(i.marginTop,10)||0,e.marginRight=parseInt(i.marginRight,10)||0,e.marginBottom=parseInt(i.marginBottom,10)||0,e.marginLeft=parseInt(i.marginLeft,10)||0,t.layoutCalculated=!0),e.left=t.offsetLeft||0,e.top=t.offsetTop||0,e.width=t.offsetWidth||0,e.height=t.offsetHeight||0,e.right=e.left+e.width,e.bottom=e.top+e.height,e.scrollTop=t.scrollTop,e.hidden=t.offsetParent===null,e),ne=({tag:e="div",name:t=null,attributes:i={},read:a=()=>{},write:n=()=>{},create:l=()=>{},destroy:o=()=>{},filterFrameActionsForChild:r=(u,g)=>g,didCreateView:s=()=>{},didWriteView:p=()=>{},ignoreRect:c=!1,ignoreRectUpdate:d=!1,mixins:m=[]}={})=>(u,g={})=>{let f=li(e,`filepond--${t}`,i),h=window.getComputedStyle(f,null),I=Ca(),b=null,T=!1,v=[],y=[],E={},_={},x=[n],R=[a],z=[o],P=()=>f,A=()=>v.concat(),B=()=>E,w=k=>(H,Y)=>H(k,Y),O=()=>b||(b=Tn(I,v,[0,0],[1,1]),b),S=()=>h,L=()=>{b=null,v.forEach(Y=>Y._read()),!(d&&I.width&&I.height)&&Ca(I,f,h);let H={root:K,props:g,rect:I};R.forEach(Y=>Y(H))},D=(k,H,Y)=>{let re=H.length===0;return x.forEach(ee=>{ee({props:g,root:K,actions:H,timestamp:k,shouldOptimize:Y})===!1&&(re=!1)}),y.forEach(ee=>{ee.write(k)===!1&&(re=!1)}),v.filter(ee=>!!ee.element.parentNode).forEach(ee=>{ee._write(k,r(ee,H),Y)||(re=!1)}),v.forEach((ee,dt)=>{ee.element.parentNode||(K.appendChild(ee.element,dt),ee._read(),ee._write(k,r(ee,H),Y),re=!1)}),T=re,p({props:g,root:K,actions:H,timestamp:k}),re},F=()=>{y.forEach(k=>k.destroy()),z.forEach(k=>{k({root:K,props:g})}),v.forEach(k=>k._destroy())},G={element:{get:P},style:{get:S},childViews:{get:A}},C={...G,rect:{get:O},ref:{get:B},is:k=>t===k,appendChild:Er(f),createChildView:w(u),linkView:k=>(v.push(k),k),unlinkView:k=>{v.splice(v.indexOf(k),1)},appendChildView:Tr(f,v),removeChildView:Ir(f,v),registerWriter:k=>x.push(k),registerReader:k=>R.push(k),registerDestroyer:k=>z.push(k),invalidateLayout:()=>f.layoutCalculated=!1,dispatch:u.dispatch,query:u.query},q={element:{get:P},childViews:{get:A},rect:{get:O},resting:{get:()=>T},isRectIgnored:()=>c,_read:L,_write:D,_destroy:F},X={...G,rect:{get:()=>I}};Object.keys(m).sort((k,H)=>k==="styles"?1:H==="styles"?-1:0).forEach(k=>{let H=Nr[k]({mixinConfig:m[k],viewProps:g,viewState:_,viewInternalAPI:C,viewExternalAPI:q,view:We(X)});H&&y.push(H)});let K=We(C);l({root:K,props:g});let oe=yr(f);return v.forEach((k,H)=>{K.appendChild(k.element,oe+H)}),s(K),We(q)},kr=(e,t,i=60)=>{let a="__framePainter";if(window[a]){window[a].readers.push(e),window[a].writers.push(t);return}window[a]={readers:[e],writers:[t]};let n=window[a],l=1e3/i,o=null,r=null,s=null,p=null,c=()=>{document.hidden?(s=()=>window.setTimeout(()=>d(performance.now()),l),p=()=>window.clearTimeout(r)):(s=()=>window.requestAnimationFrame(d),p=()=>window.cancelAnimationFrame(r))};document.addEventListener("visibilitychange",()=>{p&&p(),c(),d(performance.now())});let d=m=>{r=s(d),o||(o=m);let u=m-o;u<=l||(o=m-u%l,n.readers.forEach(g=>g()),n.writers.forEach(g=>g(m)))};return c(),d(performance.now()),{pause:()=>{p(r)}}},fe=(e,t)=>({root:i,props:a,actions:n=[],timestamp:l,shouldOptimize:o})=>{n.filter(r=>e[r.type]).forEach(r=>e[r.type]({root:i,props:a,action:r.data,timestamp:l,shouldOptimize:o})),t&&t({root:i,props:a,actions:n,timestamp:l,shouldOptimize:o})},Ba=(e,t)=>t.parentNode.insertBefore(e,t),Na=(e,t)=>t.parentNode.insertBefore(e,t.nextSibling),ci=e=>Array.isArray(e),ke=e=>e==null,Vr=e=>e.trim(),di=e=>""+e,Gr=(e,t=",")=>ke(e)?[]:ci(e)?e:di(e).split(t).map(Vr).filter(i=>i.length),In=e=>typeof e=="boolean",vn=e=>In(e)?e:e==="true",ge=e=>typeof e=="string",xn=e=>$e(e)?e:ge(e)?di(e).replace(/[a-z]+/gi,""):0,ni=e=>parseInt(xn(e),10),ka=e=>parseFloat(xn(e)),bt=e=>$e(e)&&isFinite(e)&&Math.floor(e)===e,Va=(e,t=1e3)=>{if(bt(e))return e;let i=di(e).trim();return/MB$/i.test(i)?(i=i.replace(/MB$i/,"").trim(),ni(i)*t*t):/KB/i.test(i)?(i=i.replace(/KB$i/,"").trim(),ni(i)*t):ni(i)},Xe=e=>typeof e=="function",Ur=e=>{let t=self,i=e.split("."),a=null;for(;a=i.shift();)if(t=t[a],!t)return null;return t},Ga={process:"POST",patch:"PATCH",revert:"DELETE",fetch:"GET",restore:"GET",load:"GET"},Wr=e=>{let t={};return t.url=ge(e)?e:e.url||"",t.timeout=e.timeout?parseInt(e.timeout,10):0,t.headers=e.headers?e.headers:{},te(Ga,i=>{t[i]=Hr(i,e[i],Ga[i],t.timeout,t.headers)}),t.process=e.process||ge(e)||e.url?t.process:null,t.remove=e.remove||null,delete t.headers,t},Hr=(e,t,i,a,n)=>{if(t===null)return null;if(typeof t=="function")return t;let l={url:i==="GET"||i==="PATCH"?`?${e}=`:"",method:i,headers:n,withCredentials:!1,timeout:a,onload:null,ondata:null,onerror:null};if(ge(t))return l.url=t,l;if(Object.assign(l,t),ge(l.headers)){let o=l.headers.split(/:(.+)/);l.headers={header:o[0],value:o[1]}}return l.withCredentials=vn(l.withCredentials),l},jr=e=>Wr(e),Yr=e=>e===null,de=e=>typeof e=="object"&&e!==null,qr=e=>de(e)&&ge(e.url)&&de(e.process)&&de(e.revert)&&de(e.restore)&&de(e.fetch),Oi=e=>ci(e)?"array":Yr(e)?"null":bt(e)?"int":/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(e)?"bytes":qr(e)?"api":typeof e,$r=e=>e.replace(/{\s*'/g,'{"').replace(/'\s*}/g,'"}').replace(/'\s*:/g,'":').replace(/:\s*'/g,':"').replace(/,\s*'/g,',"').replace(/'\s*,/g,'",'),Xr={array:Gr,boolean:vn,int:e=>Oi(e)==="bytes"?Va(e):ni(e),number:ka,float:ka,bytes:Va,string:e=>Xe(e)?e:di(e),function:e=>Ur(e),serverapi:jr,object:e=>{try{return JSON.parse($r(e))}catch{return null}}},Kr=(e,t)=>Xr[t](e),yn=(e,t,i)=>{if(e===t)return e;let a=Oi(e);if(a!==i){let n=Kr(e,i);if(a=Oi(n),n===null)throw`Trying to assign value with incorrect type to "${option}", allowed type: "${i}"`;e=n}return e},Qr=(e,t)=>{let i=e;return{enumerable:!0,get:()=>i,set:a=>{i=yn(a,e,t)}}},Zr=e=>{let t={};return te(e,i=>{let a=e[i];t[i]=Qr(a[0],a[1])}),We(t)},Jr=e=>({items:[],listUpdateTimeout:null,itemUpdateTimeout:null,processingQueue:[],options:Zr(e)}),pi=(e,t="-")=>e.split(/(?=[A-Z])/).map(i=>i.toLowerCase()).join(t),es=(e,t)=>{let i={};return te(t,a=>{i[a]={get:()=>e.getState().options[a],set:n=>{e.dispatch(`SET_${pi(a,"_").toUpperCase()}`,{value:n})}}}),i},ts=e=>(t,i,a)=>{let n={};return te(e,l=>{let o=pi(l,"_").toUpperCase();n[`SET_${o}`]=r=>{try{a.options[l]=r.value}catch{}t(`DID_SET_${o}`,{value:a.options[l]})}}),n},is=e=>t=>{let i={};return te(e,a=>{i[`GET_${pi(a,"_").toUpperCase()}`]=n=>t.options[a]}),i},Re={API:1,DROP:2,BROWSE:3,PASTE:4,NONE:5},qi=()=>Math.random().toString(36).substring(2,11),$i=(e,t)=>e.splice(t,1),as=(e,t)=>{t?e():document.hidden?Promise.resolve(1).then(e):setTimeout(e,0)},mi=()=>{let e=[],t=(a,n)=>{$i(e,e.findIndex(l=>l.event===a&&(l.cb===n||!n)))},i=(a,n,l)=>{e.filter(o=>o.event===a).map(o=>o.cb).forEach(o=>as(()=>o(...n),l))};return{fireSync:(a,...n)=>{i(a,n,!0)},fire:(a,...n)=>{i(a,n,!1)},on:(a,n)=>{e.push({event:a,cb:n})},onOnce:(a,n)=>{e.push({event:a,cb:(...l)=>{t(a,n),n(...l)}})},off:t}},Rn=(e,t,i)=>{Object.getOwnPropertyNames(e).filter(a=>!i.includes(a)).forEach(a=>Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(e,a)))},ns=["fire","process","revert","load","on","off","onOnce","retryLoad","extend","archive","archived","release","released","requestProcessing","freeze"],he=e=>{let t={};return Rn(e,t,ns),t},ls=e=>{e.forEach((t,i)=>{t.released&&$i(e,i)})},U={INIT:1,IDLE:2,PROCESSING_QUEUED:9,PROCESSING:3,PROCESSING_COMPLETE:5,PROCESSING_ERROR:6,PROCESSING_REVERT_ERROR:10,LOADING:7,LOAD_ERROR:8},se={INPUT:1,LIMBO:2,LOCAL:3},Sn=e=>/[^0-9]+/.exec(e),_n=()=>Sn(1.1.toLocaleString())[0],os=()=>{let e=_n(),t=1e3.toLocaleString();return t!=="1000"?Sn(t)[0]:e==="."?",":"."},M={BOOLEAN:"boolean",INT:"int",NUMBER:"number",STRING:"string",ARRAY:"array",OBJECT:"object",FUNCTION:"function",ACTION:"action",SERVER_API:"serverapi",REGEX:"regex"},Xi=[],Ae=(e,t,i)=>new Promise((a,n)=>{let l=Xi.filter(r=>r.key===e).map(r=>r.cb);if(l.length===0){a(t);return}let o=l.shift();l.reduce((r,s)=>r.then(p=>s(p,i)),o(t,i)).then(r=>a(r)).catch(r=>n(r))}),tt=(e,t,i)=>Xi.filter(a=>a.key===e).map(a=>a.cb(t,i)),rs=(e,t)=>Xi.push({key:e,cb:t}),ss=e=>Object.assign(pt,e),oi=()=>({...pt}),cs=e=>{te(e,(t,i)=>{pt[t]&&(pt[t][0]=yn(i,pt[t][0],pt[t][1]))})},pt={id:[null,M.STRING],name:["filepond",M.STRING],disabled:[!1,M.BOOLEAN],className:[null,M.STRING],required:[!1,M.BOOLEAN],captureMethod:[null,M.STRING],allowSyncAcceptAttribute:[!0,M.BOOLEAN],allowDrop:[!0,M.BOOLEAN],allowBrowse:[!0,M.BOOLEAN],allowPaste:[!0,M.BOOLEAN],allowMultiple:[!1,M.BOOLEAN],allowReplace:[!0,M.BOOLEAN],allowRevert:[!0,M.BOOLEAN],allowRemove:[!0,M.BOOLEAN],allowProcess:[!0,M.BOOLEAN],allowReorder:[!1,M.BOOLEAN],allowDirectoriesOnly:[!1,M.BOOLEAN],storeAsFile:[!1,M.BOOLEAN],forceRevert:[!1,M.BOOLEAN],maxFiles:[null,M.INT],checkValidity:[!1,M.BOOLEAN],itemInsertLocationFreedom:[!0,M.BOOLEAN],itemInsertLocation:["before",M.STRING],itemInsertInterval:[75,M.INT],dropOnPage:[!1,M.BOOLEAN],dropOnElement:[!0,M.BOOLEAN],dropValidation:[!1,M.BOOLEAN],ignoredFiles:[[".ds_store","thumbs.db","desktop.ini"],M.ARRAY],instantUpload:[!0,M.BOOLEAN],maxParallelUploads:[2,M.INT],allowMinimumUploadDuration:[!0,M.BOOLEAN],chunkUploads:[!1,M.BOOLEAN],chunkForce:[!1,M.BOOLEAN],chunkSize:[5e6,M.INT],chunkRetryDelays:[[500,1e3,3e3],M.ARRAY],server:[null,M.SERVER_API],fileSizeBase:[1e3,M.INT],labelFileSizeBytes:["bytes",M.STRING],labelFileSizeKilobytes:["KB",M.STRING],labelFileSizeMegabytes:["MB",M.STRING],labelFileSizeGigabytes:["GB",M.STRING],labelDecimalSeparator:[_n(),M.STRING],labelThousandsSeparator:[os(),M.STRING],labelIdle:['Drag & Drop your files or Browse',M.STRING],labelInvalidField:["Field contains invalid files",M.STRING],labelFileWaitingForSize:["Waiting for size",M.STRING],labelFileSizeNotAvailable:["Size not available",M.STRING],labelFileCountSingular:["file in list",M.STRING],labelFileCountPlural:["files in list",M.STRING],labelFileLoading:["Loading",M.STRING],labelFileAdded:["Added",M.STRING],labelFileLoadError:["Error during load",M.STRING],labelFileRemoved:["Removed",M.STRING],labelFileRemoveError:["Error during remove",M.STRING],labelFileProcessing:["Uploading",M.STRING],labelFileProcessingComplete:["Upload complete",M.STRING],labelFileProcessingAborted:["Upload cancelled",M.STRING],labelFileProcessingError:["Error during upload",M.STRING],labelFileProcessingRevertError:["Error during revert",M.STRING],labelTapToCancel:["tap to cancel",M.STRING],labelTapToRetry:["tap to retry",M.STRING],labelTapToUndo:["tap to undo",M.STRING],labelButtonRemoveItem:["Remove",M.STRING],labelButtonAbortItemLoad:["Abort",M.STRING],labelButtonRetryItemLoad:["Retry",M.STRING],labelButtonAbortItemProcessing:["Cancel",M.STRING],labelButtonUndoItemProcessing:["Undo",M.STRING],labelButtonRetryItemProcessing:["Retry",M.STRING],labelButtonProcessItem:["Upload",M.STRING],iconRemove:['',M.STRING],iconProcess:['',M.STRING],iconRetry:['',M.STRING],iconUndo:['',M.STRING],iconDone:['',M.STRING],oninit:[null,M.FUNCTION],onwarning:[null,M.FUNCTION],onerror:[null,M.FUNCTION],onactivatefile:[null,M.FUNCTION],oninitfile:[null,M.FUNCTION],onaddfilestart:[null,M.FUNCTION],onaddfileprogress:[null,M.FUNCTION],onaddfile:[null,M.FUNCTION],onprocessfilestart:[null,M.FUNCTION],onprocessfileprogress:[null,M.FUNCTION],onprocessfileabort:[null,M.FUNCTION],onprocessfilerevert:[null,M.FUNCTION],onprocessfile:[null,M.FUNCTION],onprocessfiles:[null,M.FUNCTION],onremovefile:[null,M.FUNCTION],onpreparefile:[null,M.FUNCTION],onupdatefiles:[null,M.FUNCTION],onreorderfiles:[null,M.FUNCTION],beforeDropFile:[null,M.FUNCTION],beforeAddFile:[null,M.FUNCTION],beforeRemoveFile:[null,M.FUNCTION],beforePrepareFile:[null,M.FUNCTION],stylePanelLayout:[null,M.STRING],stylePanelAspectRatio:[null,M.STRING],styleItemPanelAspectRatio:[null,M.STRING],styleButtonRemoveItemPosition:["left",M.STRING],styleButtonProcessItemPosition:["right",M.STRING],styleLoadIndicatorPosition:["right",M.STRING],styleProgressIndicatorPosition:["right",M.STRING],styleButtonRemoveItemAlign:[!1,M.BOOLEAN],files:[[],M.ARRAY],credits:[["https://pqina.nl/","Powered by PQINA"],M.ARRAY]},Ke=(e,t)=>ke(t)?e[0]||null:bt(t)?e[t]||null:(typeof t=="object"&&(t=t.id),e.find(i=>i.id===t)||null),wn=e=>{if(ke(e))return e;if(/:/.test(e)){let t=e.split(":");return t[1]/t[0]}return parseFloat(e)},Pe=e=>e.filter(t=>!t.archived),Ln={EMPTY:0,IDLE:1,ERROR:2,BUSY:3,READY:4},Zt=null,ds=()=>{if(Zt===null)try{let e=new DataTransfer;e.items.add(new File(["hello world"],"This_Works.txt"));let t=document.createElement("input");t.setAttribute("type","file"),t.files=e.files,Zt=t.files.length===1}catch{Zt=!1}return Zt},ps=[U.LOAD_ERROR,U.PROCESSING_ERROR,U.PROCESSING_REVERT_ERROR],ms=[U.LOADING,U.PROCESSING,U.PROCESSING_QUEUED,U.INIT],us=[U.PROCESSING_COMPLETE],gs=e=>ps.includes(e.status),fs=e=>ms.includes(e.status),hs=e=>us.includes(e.status),Ua=e=>de(e.options.server)&&(de(e.options.server.process)||Xe(e.options.server.process)),bs=e=>({GET_STATUS:()=>{let t=Pe(e.items),{EMPTY:i,ERROR:a,BUSY:n,IDLE:l,READY:o}=Ln;return t.length===0?i:t.some(gs)?a:t.some(fs)?n:t.some(hs)?o:l},GET_ITEM:t=>Ke(e.items,t),GET_ACTIVE_ITEM:t=>Ke(Pe(e.items),t),GET_ACTIVE_ITEMS:()=>Pe(e.items),GET_ITEMS:()=>e.items,GET_ITEM_NAME:t=>{let i=Ke(e.items,t);return i?i.filename:null},GET_ITEM_SIZE:t=>{let i=Ke(e.items,t);return i?i.fileSize:null},GET_STYLES:()=>Object.keys(e.options).filter(t=>/^style/.test(t)).map(t=>({name:t,value:e.options[t]})),GET_PANEL_ASPECT_RATIO:()=>/circle/.test(e.options.stylePanelLayout)?1:wn(e.options.stylePanelAspectRatio),GET_ITEM_PANEL_ASPECT_RATIO:()=>e.options.styleItemPanelAspectRatio,GET_ITEMS_BY_STATUS:t=>Pe(e.items).filter(i=>i.status===t),GET_TOTAL_ITEMS:()=>Pe(e.items).length,SHOULD_UPDATE_FILE_INPUT:()=>e.options.storeAsFile&&ds()&&!Ua(e),IS_ASYNC:()=>Ua(e),GET_FILE_SIZE_LABELS:t=>({labelBytes:t("GET_LABEL_FILE_SIZE_BYTES")||void 0,labelKilobytes:t("GET_LABEL_FILE_SIZE_KILOBYTES")||void 0,labelMegabytes:t("GET_LABEL_FILE_SIZE_MEGABYTES")||void 0,labelGigabytes:t("GET_LABEL_FILE_SIZE_GIGABYTES")||void 0})}),Es=e=>{let t=Pe(e.items).length;if(!e.options.allowMultiple)return t===0;let i=e.options.maxFiles;return i===null||tMath.max(Math.min(i,e),t),Ts=(e,t,i)=>e.splice(t,0,i),Is=(e,t,i)=>ke(t)?null:typeof i>"u"?(e.push(t),t):(i=Mn(i,0,e.length),Ts(e,i,t),t),Fi=e=>/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(e),Dt=e=>`${e}`.split("/").pop().split("?").shift(),ui=e=>e.split(".").pop(),vs=e=>{if(typeof e!="string")return"";let t=e.split("/").pop();return/svg/.test(t)?"svg":/zip|compressed/.test(t)?"zip":/plain/.test(t)?"txt":/msword/.test(t)?"doc":/[a-z]+/.test(t)?t==="jpeg"?"jpg":t:""},At=(e,t="")=>(t+e).slice(-t.length),An=(e=new Date)=>`${e.getFullYear()}-${At(e.getMonth()+1,"00")}-${At(e.getDate(),"00")}_${At(e.getHours(),"00")}-${At(e.getMinutes(),"00")}-${At(e.getSeconds(),"00")}`,ht=(e,t,i=null,a=null)=>{let n=typeof i=="string"?e.slice(0,e.size,i):e.slice(0,e.size,e.type);return n.lastModifiedDate=new Date,e._relativePath&&(n._relativePath=e._relativePath),ge(t)||(t=An()),t&&a===null&&ui(t)?n.name=t:(a=a||vs(n.type),n.name=t+(a?"."+a:"")),n},xs=()=>window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,Pn=(e,t)=>{let i=xs();if(i){let a=new i;return a.append(e),a.getBlob(t)}return new Blob([e],{type:t})},ys=(e,t)=>{let i=new ArrayBuffer(e.length),a=new Uint8Array(i);for(let n=0;n(/^data:(.+);/.exec(e)||[])[1]||null,Rs=e=>e.split(",")[1].replace(/\s/g,""),Ss=e=>atob(Rs(e)),_s=e=>{let t=zn(e),i=Ss(e);return ys(i,t)},ws=(e,t,i)=>ht(_s(e),t,null,i),Ls=e=>{if(!/^content-disposition:/i.test(e))return null;let t=e.split(/filename=|filename\*=.+''/).splice(1).map(i=>i.trim().replace(/^["']|[;"']{0,2}$/g,"")).filter(i=>i.length);return t.length?decodeURI(t[t.length-1]):null},Ms=e=>{if(/content-length:/i.test(e)){let t=e.match(/[0-9]+/)[0];return t?parseInt(t,10):null}return null},As=e=>/x-content-transfer-id:/i.test(e)&&(e.split(":")[1]||"").trim()||null,Ki=e=>{let t={source:null,name:null,size:null},i=e.split(` +`);for(let a of i){let n=Ls(a);if(n){t.name=n;continue}let l=Ms(a);if(l){t.size=l;continue}let o=As(a);if(o){t.source=o;continue}}return t},Ps=e=>{let t={source:null,complete:!1,progress:0,size:null,timestamp:null,duration:0,request:null},i=()=>t.progress,a=()=>{t.request&&t.request.abort&&t.request.abort()},n=()=>{let r=t.source;o.fire("init",r),r instanceof File?o.fire("load",r):r instanceof Blob?o.fire("load",ht(r,r.name)):Fi(r)?o.fire("load",ws(r)):l(r)},l=r=>{if(!e){o.fire("error",{type:"error",body:"Can't load URL",code:400});return}t.timestamp=Date.now(),t.request=e(r,s=>{t.duration=Date.now()-t.timestamp,t.complete=!0,s instanceof Blob&&(s=ht(s,s.name||Dt(r))),o.fire("load",s instanceof Blob?s:s?s.body:null)},s=>{o.fire("error",typeof s=="string"?{type:"error",code:0,body:s}:s)},(s,p,c)=>{if(c&&(t.size=c),t.duration=Date.now()-t.timestamp,!s){t.progress=null;return}t.progress=p/c,o.fire("progress",t.progress)},()=>{o.fire("abort")},s=>{let p=Ki(typeof s=="string"?s:s.headers);o.fire("meta",{size:t.size||p.size,filename:p.name,source:p.source})})},o={...mi(),setSource:r=>t.source=r,getProgress:i,abort:a,load:n};return o},Wa=e=>/GET|HEAD/.test(e),Qe=(e,t,i)=>{let a={onheaders:()=>{},onprogress:()=>{},onload:()=>{},ontimeout:()=>{},onerror:()=>{},onabort:()=>{},abort:()=>{n=!0,o.abort()}},n=!1,l=!1;i={method:"POST",headers:{},withCredentials:!1,...i},t=encodeURI(t),Wa(i.method)&&e&&(t=`${t}${encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))}`);let o=new XMLHttpRequest,r=Wa(i.method)?o:o.upload;return r.onprogress=s=>{n||a.onprogress(s.lengthComputable,s.loaded,s.total)},o.onreadystatechange=()=>{o.readyState<2||o.readyState===4&&o.status===0||l||(l=!0,a.onheaders(o))},o.onload=()=>{o.status>=200&&o.status<300?a.onload(o):a.onerror(o)},o.onerror=()=>a.onerror(o),o.onabort=()=>{n=!0,a.onabort()},o.ontimeout=()=>a.ontimeout(o),o.open(i.method,t,!0),bt(i.timeout)&&(o.timeout=i.timeout),Object.keys(i.headers).forEach(s=>{let p=unescape(encodeURIComponent(i.headers[s]));o.setRequestHeader(s,p)}),i.responseType&&(o.responseType=i.responseType),i.withCredentials&&(o.withCredentials=!0),o.send(e),a},ie=(e,t,i,a)=>({type:e,code:t,body:i,headers:a}),Ze=e=>t=>{e(ie("error",0,"Timeout",t.getAllResponseHeaders()))},Ha=e=>/\?/.test(e),Ot=(...e)=>{let t="";return e.forEach(i=>{t+=Ha(t)&&Ha(i)?i.replace(/\?/,"&"):i}),t},wi=(e="",t)=>{if(typeof t=="function")return t;if(!t||!ge(t.url))return null;let i=t.onload||(n=>n),a=t.onerror||(n=>null);return(n,l,o,r,s,p)=>{let c=Qe(n,Ot(e,t.url),{...t,responseType:"blob"});return c.onload=d=>{let m=d.getAllResponseHeaders(),u=Ki(m).name||Dt(n);l(ie("load",d.status,t.method==="HEAD"?null:ht(i(d.response),u),m))},c.onerror=d=>{o(ie("error",d.status,a(d.response)||d.statusText,d.getAllResponseHeaders()))},c.onheaders=d=>{p(ie("headers",d.status,null,d.getAllResponseHeaders()))},c.ontimeout=Ze(o),c.onprogress=r,c.onabort=s,c}},xe={QUEUED:0,COMPLETE:1,PROCESSING:2,ERROR:3,WAITING:4},zs=(e,t,i,a,n,l,o,r,s,p,c)=>{let d=[],{chunkTransferId:m,chunkServer:u,chunkSize:g,chunkRetryDelays:f}=c,h={serverId:m,aborted:!1},I=t.ondata||(w=>w),b=t.onload||((w,O)=>O==="HEAD"?w.getResponseHeader("Upload-Offset"):w.response),T=t.onerror||(w=>null),v=w=>{let O=new FormData;de(n)&&O.append(i,JSON.stringify(n));let S=typeof t.headers=="function"?t.headers(a,n):{...t.headers,"Upload-Length":a.size},L={...t,headers:S},D=Qe(I(O),Ot(e,t.url),L);D.onload=F=>w(b(F,L.method)),D.onerror=F=>o(ie("error",F.status,T(F.response)||F.statusText,F.getAllResponseHeaders())),D.ontimeout=Ze(o)},y=w=>{let O=Ot(e,u.url,h.serverId),L={headers:typeof t.headers=="function"?t.headers(h.serverId):{...t.headers},method:"HEAD"},D=Qe(null,O,L);D.onload=F=>w(b(F,L.method)),D.onerror=F=>o(ie("error",F.status,T(F.response)||F.statusText,F.getAllResponseHeaders())),D.ontimeout=Ze(o)},E=Math.floor(a.size/g);for(let w=0;w<=E;w++){let O=w*g,S=a.slice(O,O+g,"application/offset+octet-stream");d[w]={index:w,size:S.size,offset:O,data:S,file:a,progress:0,retries:[...f],status:xe.QUEUED,error:null,request:null,timeout:null}}let _=()=>l(h.serverId),x=w=>w.status===xe.QUEUED||w.status===xe.ERROR,R=w=>{if(h.aborted)return;if(w=w||d.find(x),!w){d.every(C=>C.status===xe.COMPLETE)&&_();return}w.status=xe.PROCESSING,w.progress=null;let O=u.ondata||(C=>C),S=u.onerror||(C=>null),L=u.onload||(()=>{}),D=Ot(e,u.url,h.serverId),F=typeof u.headers=="function"?u.headers(w):{...u.headers,"Content-Type":"application/offset+octet-stream","Upload-Offset":w.offset,"Upload-Length":a.size,"Upload-Name":a.name},G=w.request=Qe(O(w.data),D,{...u,headers:F});G.onload=C=>{L(C,w.index,d.length),w.status=xe.COMPLETE,w.request=null,A()},G.onprogress=(C,q,X)=>{w.progress=C?q:null,P()},G.onerror=C=>{w.status=xe.ERROR,w.request=null,w.error=S(C.response)||C.statusText,z(w)||o(ie("error",C.status,S(C.response)||C.statusText,C.getAllResponseHeaders()))},G.ontimeout=C=>{w.status=xe.ERROR,w.request=null,z(w)||Ze(o)(C)},G.onabort=()=>{w.status=xe.QUEUED,w.request=null,s()}},z=w=>w.retries.length===0?!1:(w.status=xe.WAITING,clearTimeout(w.timeout),w.timeout=setTimeout(()=>{R(w)},w.retries.shift()),!0),P=()=>{let w=d.reduce((S,L)=>S===null||L.progress===null?null:S+L.progress,0);if(w===null)return r(!1,0,0);let O=d.reduce((S,L)=>S+L.size,0);r(!0,w,O)},A=()=>{d.filter(O=>O.status===xe.PROCESSING).length>=1||R()},B=()=>{d.forEach(w=>{clearTimeout(w.timeout),w.request&&w.request.abort()})};return h.serverId?y(w=>{h.aborted||(d.filter(O=>O.offset{O.status=xe.COMPLETE,O.progress=O.size}),A())}):v(w=>{h.aborted||(p(w),h.serverId=w,A())}),{abort:()=>{h.aborted=!0,B()}}},Os=(e,t,i,a)=>(n,l,o,r,s,p,c)=>{if(!n)return;let d=a.chunkUploads,m=d&&n.size>a.chunkSize,u=d&&(m||a.chunkForce);if(n instanceof Blob&&u)return zs(e,t,i,n,l,o,r,s,p,c,a);let g=t.ondata||(y=>y),f=t.onload||(y=>y),h=t.onerror||(y=>null),I=typeof t.headers=="function"?t.headers(n,l)||{}:{...t.headers},b={...t,headers:I};var T=new FormData;de(l)&&T.append(i,JSON.stringify(l)),(n instanceof Blob?[{name:null,file:n}]:n).forEach(y=>{T.append(i,y.file,y.name===null?y.file.name:`${y.name}${y.file.name}`)});let v=Qe(g(T),Ot(e,t.url),b);return v.onload=y=>{o(ie("load",y.status,f(y.response),y.getAllResponseHeaders()))},v.onerror=y=>{r(ie("error",y.status,h(y.response)||y.statusText,y.getAllResponseHeaders()))},v.ontimeout=Ze(r),v.onprogress=s,v.onabort=p,v},Fs=(e="",t,i,a)=>typeof t=="function"?(...n)=>t(i,...n,a):!t||!ge(t.url)?null:Os(e,t,i,a),Pt=(e="",t)=>{if(typeof t=="function")return t;if(!t||!ge(t.url))return(n,l)=>l();let i=t.onload||(n=>n),a=t.onerror||(n=>null);return(n,l,o)=>{let r=Qe(n,e+t.url,t);return r.onload=s=>{l(ie("load",s.status,i(s.response),s.getAllResponseHeaders()))},r.onerror=s=>{o(ie("error",s.status,a(s.response)||s.statusText,s.getAllResponseHeaders()))},r.ontimeout=Ze(o),r}},On=(e=0,t=1)=>e+Math.random()*(t-e),Ds=(e,t=1e3,i=0,a=25,n=250)=>{let l=null,o=Date.now(),r=()=>{let s=Date.now()-o,p=On(a,n);s+p>t&&(p=s+p-t);let c=s/t;if(c>=1||document.hidden){e(1);return}e(c),l=setTimeout(r,p)};return t>0&&r(),{clear:()=>{clearTimeout(l)}}},Cs=(e,t)=>{let i={complete:!1,perceivedProgress:0,perceivedPerformanceUpdater:null,progress:null,timestamp:null,perceivedDuration:0,duration:0,request:null,response:null},{allowMinimumUploadDuration:a}=t,n=(c,d)=>{let m=()=>{i.duration===0||i.progress===null||p.fire("progress",p.getProgress())},u=()=>{i.complete=!0,p.fire("load-perceived",i.response.body)};p.fire("start"),i.timestamp=Date.now(),i.perceivedPerformanceUpdater=Ds(g=>{i.perceivedProgress=g,i.perceivedDuration=Date.now()-i.timestamp,m(),i.response&&i.perceivedProgress===1&&!i.complete&&u()},a?On(750,1500):0),i.request=e(c,d,g=>{i.response=de(g)?g:{type:"load",code:200,body:`${g}`,headers:{}},i.duration=Date.now()-i.timestamp,i.progress=1,p.fire("load",i.response.body),(!a||a&&i.perceivedProgress===1)&&u()},g=>{i.perceivedPerformanceUpdater.clear(),p.fire("error",de(g)?g:{type:"error",code:0,body:`${g}`})},(g,f,h)=>{i.duration=Date.now()-i.timestamp,i.progress=g?f/h:null,m()},()=>{i.perceivedPerformanceUpdater.clear(),p.fire("abort",i.response?i.response.body:null)},g=>{p.fire("transfer",g)})},l=()=>{i.request&&(i.perceivedPerformanceUpdater.clear(),i.request.abort&&i.request.abort(),i.complete=!0)},o=()=>{l(),i.complete=!1,i.perceivedProgress=0,i.progress=0,i.timestamp=null,i.perceivedDuration=0,i.duration=0,i.request=null,i.response=null},r=a?()=>i.progress?Math.min(i.progress,i.perceivedProgress):null:()=>i.progress||null,s=a?()=>Math.min(i.duration,i.perceivedDuration):()=>i.duration,p={...mi(),process:n,abort:l,getProgress:r,getDuration:s,reset:o};return p},Fn=e=>e.substring(0,e.lastIndexOf("."))||e,Bs=e=>{let t=[e.name,e.size,e.type];return e instanceof Blob||Fi(e)?t[0]=e.name||An():Fi(e)?(t[1]=e.length,t[2]=zn(e)):ge(e)&&(t[0]=Dt(e),t[1]=0,t[2]="application/octet-stream"),{name:t[0],size:t[1],type:t[2]}},Je=e=>!!(e instanceof File||e instanceof Blob&&e.name),Dn=e=>{if(!de(e))return e;let t=ci(e)?[]:{};for(let i in e){if(!e.hasOwnProperty(i))continue;let a=e[i];t[i]=a&&de(a)?Dn(a):a}return t},Ns=(e=null,t=null,i=null)=>{let a=qi(),n={archived:!1,frozen:!1,released:!1,source:null,file:i,serverFileReference:t,transferId:null,processingAborted:!1,status:t?U.PROCESSING_COMPLETE:U.INIT,activeLoader:null,activeProcessor:null},l=null,o={},r=x=>n.status=x,s=(x,...R)=>{n.released||n.frozen||E.fire(x,...R)},p=()=>ui(n.file.name),c=()=>n.file.type,d=()=>n.file.size,m=()=>n.file,u=(x,R,z)=>{if(n.source=x,E.fireSync("init"),n.file){E.fireSync("load-skip");return}n.file=Bs(x),R.on("init",()=>{s("load-init")}),R.on("meta",P=>{n.file.size=P.size,n.file.filename=P.filename,P.source&&(e=se.LIMBO,n.serverFileReference=P.source,n.status=U.PROCESSING_COMPLETE),s("load-meta")}),R.on("progress",P=>{r(U.LOADING),s("load-progress",P)}),R.on("error",P=>{r(U.LOAD_ERROR),s("load-request-error",P)}),R.on("abort",()=>{r(U.INIT),s("load-abort")}),R.on("load",P=>{n.activeLoader=null;let A=w=>{n.file=Je(w)?w:n.file,e===se.LIMBO&&n.serverFileReference?r(U.PROCESSING_COMPLETE):r(U.IDLE),s("load")},B=w=>{n.file=P,s("load-meta"),r(U.LOAD_ERROR),s("load-file-error",w)};if(n.serverFileReference){A(P);return}z(P,A,B)}),R.setSource(x),n.activeLoader=R,R.load()},g=()=>{n.activeLoader&&n.activeLoader.load()},f=()=>{if(n.activeLoader){n.activeLoader.abort();return}r(U.INIT),s("load-abort")},h=(x,R)=>{if(n.processingAborted){n.processingAborted=!1;return}if(r(U.PROCESSING),l=null,!(n.file instanceof Blob)){E.on("load",()=>{h(x,R)});return}x.on("load",A=>{n.transferId=null,n.serverFileReference=A}),x.on("transfer",A=>{n.transferId=A}),x.on("load-perceived",A=>{n.activeProcessor=null,n.transferId=null,n.serverFileReference=A,r(U.PROCESSING_COMPLETE),s("process-complete",A)}),x.on("start",()=>{s("process-start")}),x.on("error",A=>{n.activeProcessor=null,r(U.PROCESSING_ERROR),s("process-error",A)}),x.on("abort",A=>{n.activeProcessor=null,n.serverFileReference=A,r(U.IDLE),s("process-abort"),l&&l()}),x.on("progress",A=>{s("process-progress",A)});let z=A=>{n.archived||x.process(A,{...o})},P=console.error;R(n.file,z,P),n.activeProcessor=x},I=()=>{n.processingAborted=!1,r(U.PROCESSING_QUEUED)},b=()=>new Promise(x=>{if(!n.activeProcessor){n.processingAborted=!0,r(U.IDLE),s("process-abort"),x();return}l=()=>{x()},n.activeProcessor.abort()}),T=(x,R)=>new Promise((z,P)=>{let A=n.serverFileReference!==null?n.serverFileReference:n.transferId;if(A===null){z();return}x(A,()=>{n.serverFileReference=null,n.transferId=null,z()},B=>{if(!R){z();return}r(U.PROCESSING_REVERT_ERROR),s("process-revert-error"),P(B)}),r(U.IDLE),s("process-revert")}),v=(x,R,z)=>{let P=x.split("."),A=P[0],B=P.pop(),w=o;P.forEach(O=>w=w[O]),JSON.stringify(w[B])!==JSON.stringify(R)&&(w[B]=R,s("metadata-update",{key:A,value:o[A],silent:z}))},E={id:{get:()=>a},origin:{get:()=>e,set:x=>e=x},serverId:{get:()=>n.serverFileReference},transferId:{get:()=>n.transferId},status:{get:()=>n.status},filename:{get:()=>n.file.name},filenameWithoutExtension:{get:()=>Fn(n.file.name)},fileExtension:{get:p},fileType:{get:c},fileSize:{get:d},file:{get:m},relativePath:{get:()=>n.file._relativePath},source:{get:()=>n.source},getMetadata:x=>Dn(x?o[x]:o),setMetadata:(x,R,z)=>{if(de(x)){let P=x;return Object.keys(P).forEach(A=>{v(A,P[A],R)}),x}return v(x,R,z),R},extend:(x,R)=>_[x]=R,abortLoad:f,retryLoad:g,requestProcessing:I,abortProcessing:b,load:u,process:h,revert:T,...mi(),freeze:()=>n.frozen=!0,release:()=>n.released=!0,released:{get:()=>n.released},archive:()=>n.archived=!0,archived:{get:()=>n.archived},setFile:x=>n.file=x},_=We(E);return _},ks=(e,t)=>ke(t)?0:ge(t)?e.findIndex(i=>i.id===t):-1,ja=(e,t)=>{let i=ks(e,t);if(!(i<0))return e[i]||null},Ya=(e,t,i,a,n,l)=>{let o=Qe(null,e,{method:"GET",responseType:"blob"});return o.onload=r=>{let s=r.getAllResponseHeaders(),p=Ki(s).name||Dt(e);t(ie("load",r.status,ht(r.response,p),s))},o.onerror=r=>{i(ie("error",r.status,r.statusText,r.getAllResponseHeaders()))},o.onheaders=r=>{l(ie("headers",r.status,null,r.getAllResponseHeaders()))},o.ontimeout=Ze(i),o.onprogress=a,o.onabort=n,o},qa=e=>(e.indexOf("//")===0&&(e=location.protocol+e),e.toLowerCase().replace("blob:","").replace(/([a-z])?:\/\//,"$1").split("/")[0]),Vs=e=>(e.indexOf(":")>-1||e.indexOf("//")>-1)&&qa(location.href)!==qa(e),Jt=e=>(...t)=>Xe(e)?e(...t):e,Gs=e=>!Je(e.file),Li=(e,t)=>{clearTimeout(t.listUpdateTimeout),t.listUpdateTimeout=setTimeout(()=>{e("DID_UPDATE_ITEMS",{items:Pe(t.items)})},0)},$a=(e,...t)=>new Promise(i=>{if(!e)return i(!0);let a=e(...t);if(a==null)return i(!0);if(typeof a=="boolean")return i(a);typeof a.then=="function"&&a.then(i)}),Mi=(e,t)=>{e.items.sort((i,a)=>t(he(i),he(a)))},ye=(e,t)=>({query:i,success:a=()=>{},failure:n=()=>{},...l}={})=>{let o=Ke(e.items,i);if(!o){n({error:ie("error",0,"Item not found"),file:null});return}t(o,a,n,l||{})},Us=(e,t,i)=>({ABORT_ALL:()=>{Pe(i.items).forEach(a=>{a.freeze(),a.abortLoad(),a.abortProcessing()})},DID_SET_FILES:({value:a=[]})=>{let n=a.map(o=>({source:o.source?o.source:o,options:o.options})),l=Pe(i.items);l.forEach(o=>{n.find(r=>r.source===o.source||r.source===o.file)||e("REMOVE_ITEM",{query:o,remove:!1})}),l=Pe(i.items),n.forEach((o,r)=>{l.find(s=>s.source===o.source||s.file===o.source)||e("ADD_ITEM",{...o,interactionMethod:Re.NONE,index:r})})},DID_UPDATE_ITEM_METADATA:({id:a,action:n,change:l})=>{l.silent||(clearTimeout(i.itemUpdateTimeout),i.itemUpdateTimeout=setTimeout(()=>{let o=ja(i.items,a);if(!t("IS_ASYNC")){Ae("SHOULD_PREPARE_OUTPUT",!1,{item:o,query:t,action:n,change:l}).then(c=>{let d=t("GET_BEFORE_PREPARE_FILE");d&&(c=d(o,c)),c&&e("REQUEST_PREPARE_OUTPUT",{query:a,item:o,success:m=>{e("DID_PREPARE_OUTPUT",{id:a,file:m})}},!0)});return}o.origin===se.LOCAL&&e("DID_LOAD_ITEM",{id:o.id,error:null,serverFileReference:o.source});let r=()=>{setTimeout(()=>{e("REQUEST_ITEM_PROCESSING",{query:a})},32)},s=c=>{o.revert(Pt(i.options.server.url,i.options.server.revert),t("GET_FORCE_REVERT")).then(c?r:()=>{}).catch(()=>{})},p=c=>{o.abortProcessing().then(c?r:()=>{})};if(o.status===U.PROCESSING_COMPLETE)return s(i.options.instantUpload);if(o.status===U.PROCESSING)return p(i.options.instantUpload);i.options.instantUpload&&r()},0))},MOVE_ITEM:({query:a,index:n})=>{let l=Ke(i.items,a);if(!l)return;let o=i.items.indexOf(l);n=Mn(n,0,i.items.length-1),o!==n&&i.items.splice(n,0,i.items.splice(o,1)[0])},SORT:({compare:a})=>{Mi(i,a),e("DID_SORT_ITEMS",{items:t("GET_ACTIVE_ITEMS")})},ADD_ITEMS:({items:a,index:n,interactionMethod:l,success:o=()=>{},failure:r=()=>{}})=>{let s=n;if(n===-1||typeof n>"u"){let u=t("GET_ITEM_INSERT_LOCATION"),g=t("GET_TOTAL_ITEMS");s=u==="before"?0:g}let p=t("GET_IGNORED_FILES"),c=u=>Je(u)?!p.includes(u.name.toLowerCase()):!ke(u),m=a.filter(c).map(u=>new Promise((g,f)=>{e("ADD_ITEM",{interactionMethod:l,source:u.source||u,success:g,failure:f,index:s++,options:u.options||{}})}));Promise.all(m).then(o).catch(r)},ADD_ITEM:({source:a,index:n=-1,interactionMethod:l,success:o=()=>{},failure:r=()=>{},options:s={}})=>{if(ke(a)){r({error:ie("error",0,"No source"),file:null});return}if(Je(a)&&i.options.ignoredFiles.includes(a.name.toLowerCase()))return;if(!Es(i)){if(i.options.allowMultiple||!i.options.allowMultiple&&!i.options.allowReplace){let b=ie("warning",0,"Max files");e("DID_THROW_MAX_FILES",{source:a,error:b}),r({error:b,file:null});return}let I=Pe(i.items)[0];if(I.status===U.PROCESSING_COMPLETE||I.status===U.PROCESSING_REVERT_ERROR){let b=t("GET_FORCE_REVERT");if(I.revert(Pt(i.options.server.url,i.options.server.revert),b).then(()=>{b&&e("ADD_ITEM",{source:a,index:n,interactionMethod:l,success:o,failure:r,options:s})}).catch(()=>{}),b)return}e("REMOVE_ITEM",{query:I.id})}let p=s.type==="local"?se.LOCAL:s.type==="limbo"?se.LIMBO:se.INPUT,c=Ns(p,p===se.INPUT?null:a,s.file);Object.keys(s.metadata||{}).forEach(I=>{c.setMetadata(I,s.metadata[I])}),tt("DID_CREATE_ITEM",c,{query:t,dispatch:e});let d=t("GET_ITEM_INSERT_LOCATION");i.options.itemInsertLocationFreedom||(n=d==="before"?-1:i.items.length),Is(i.items,c,n),Xe(d)&&a&&Mi(i,d);let m=c.id;c.on("init",()=>{e("DID_INIT_ITEM",{id:m})}),c.on("load-init",()=>{e("DID_START_ITEM_LOAD",{id:m})}),c.on("load-meta",()=>{e("DID_UPDATE_ITEM_META",{id:m})}),c.on("load-progress",I=>{e("DID_UPDATE_ITEM_LOAD_PROGRESS",{id:m,progress:I})}),c.on("load-request-error",I=>{let b=Jt(i.options.labelFileLoadError)(I);if(I.code>=400&&I.code<500){e("DID_THROW_ITEM_INVALID",{id:m,error:I,status:{main:b,sub:`${I.code} (${I.body})`}}),r({error:I,file:he(c)});return}e("DID_THROW_ITEM_LOAD_ERROR",{id:m,error:I,status:{main:b,sub:i.options.labelTapToRetry}})}),c.on("load-file-error",I=>{e("DID_THROW_ITEM_INVALID",{id:m,error:I.status,status:I.status}),r({error:I.status,file:he(c)})}),c.on("load-abort",()=>{e("REMOVE_ITEM",{query:m})}),c.on("load-skip",()=>{c.on("metadata-update",I=>{Je(c.file)&&e("DID_UPDATE_ITEM_METADATA",{id:m,change:I})}),e("COMPLETE_LOAD_ITEM",{query:m,item:c,data:{source:a,success:o}})}),c.on("load",()=>{let I=b=>{if(!b){e("REMOVE_ITEM",{query:m});return}c.on("metadata-update",T=>{e("DID_UPDATE_ITEM_METADATA",{id:m,change:T})}),Ae("SHOULD_PREPARE_OUTPUT",!1,{item:c,query:t}).then(T=>{let v=t("GET_BEFORE_PREPARE_FILE");v&&(T=v(c,T));let y=()=>{e("COMPLETE_LOAD_ITEM",{query:m,item:c,data:{source:a,success:o}}),Li(e,i)};if(T){e("REQUEST_PREPARE_OUTPUT",{query:m,item:c,success:E=>{e("DID_PREPARE_OUTPUT",{id:m,file:E}),y()}},!0);return}y()})};Ae("DID_LOAD_ITEM",c,{query:t,dispatch:e}).then(()=>{$a(t("GET_BEFORE_ADD_FILE"),he(c)).then(I)}).catch(b=>{if(!b||!b.error||!b.status)return I(!1);e("DID_THROW_ITEM_INVALID",{id:m,error:b.error,status:b.status})})}),c.on("process-start",()=>{e("DID_START_ITEM_PROCESSING",{id:m})}),c.on("process-progress",I=>{e("DID_UPDATE_ITEM_PROCESS_PROGRESS",{id:m,progress:I})}),c.on("process-error",I=>{e("DID_THROW_ITEM_PROCESSING_ERROR",{id:m,error:I,status:{main:Jt(i.options.labelFileProcessingError)(I),sub:i.options.labelTapToRetry}})}),c.on("process-revert-error",I=>{e("DID_THROW_ITEM_PROCESSING_REVERT_ERROR",{id:m,error:I,status:{main:Jt(i.options.labelFileProcessingRevertError)(I),sub:i.options.labelTapToRetry}})}),c.on("process-complete",I=>{e("DID_COMPLETE_ITEM_PROCESSING",{id:m,error:null,serverFileReference:I}),e("DID_DEFINE_VALUE",{id:m,value:I})}),c.on("process-abort",()=>{e("DID_ABORT_ITEM_PROCESSING",{id:m})}),c.on("process-revert",()=>{e("DID_REVERT_ITEM_PROCESSING",{id:m}),e("DID_DEFINE_VALUE",{id:m,value:null})}),e("DID_ADD_ITEM",{id:m,index:n,interactionMethod:l}),Li(e,i);let{url:u,load:g,restore:f,fetch:h}=i.options.server||{};c.load(a,Ps(p===se.INPUT?ge(a)&&Vs(a)&&h?wi(u,h):Ya:p===se.LIMBO?wi(u,f):wi(u,g)),(I,b,T)=>{Ae("LOAD_FILE",I,{query:t}).then(b).catch(T)})},REQUEST_PREPARE_OUTPUT:({item:a,success:n,failure:l=()=>{}})=>{let o={error:ie("error",0,"Item not found"),file:null};if(a.archived)return l(o);Ae("PREPARE_OUTPUT",a.file,{query:t,item:a}).then(r=>{Ae("COMPLETE_PREPARE_OUTPUT",r,{query:t,item:a}).then(s=>{if(a.archived)return l(o);n(s)})})},COMPLETE_LOAD_ITEM:({item:a,data:n})=>{let{success:l,source:o}=n,r=t("GET_ITEM_INSERT_LOCATION");if(Xe(r)&&o&&Mi(i,r),e("DID_LOAD_ITEM",{id:a.id,error:null,serverFileReference:a.origin===se.INPUT?null:o}),l(he(a)),a.origin===se.LOCAL){e("DID_LOAD_LOCAL_ITEM",{id:a.id});return}if(a.origin===se.LIMBO){e("DID_COMPLETE_ITEM_PROCESSING",{id:a.id,error:null,serverFileReference:o}),e("DID_DEFINE_VALUE",{id:a.id,value:a.serverId||o});return}t("IS_ASYNC")&&i.options.instantUpload&&e("REQUEST_ITEM_PROCESSING",{query:a.id})},RETRY_ITEM_LOAD:ye(i,a=>{a.retryLoad()}),REQUEST_ITEM_PREPARE:ye(i,(a,n,l)=>{e("REQUEST_PREPARE_OUTPUT",{query:a.id,item:a,success:o=>{e("DID_PREPARE_OUTPUT",{id:a.id,file:o}),n({file:a,output:o})},failure:l},!0)}),REQUEST_ITEM_PROCESSING:ye(i,(a,n,l)=>{if(!(a.status===U.IDLE||a.status===U.PROCESSING_ERROR)){let r=()=>e("REQUEST_ITEM_PROCESSING",{query:a,success:n,failure:l}),s=()=>document.hidden?r():setTimeout(r,32);a.status===U.PROCESSING_COMPLETE||a.status===U.PROCESSING_REVERT_ERROR?a.revert(Pt(i.options.server.url,i.options.server.revert),t("GET_FORCE_REVERT")).then(s).catch(()=>{}):a.status===U.PROCESSING&&a.abortProcessing().then(s);return}a.status!==U.PROCESSING_QUEUED&&(a.requestProcessing(),e("DID_REQUEST_ITEM_PROCESSING",{id:a.id}),e("PROCESS_ITEM",{query:a,success:n,failure:l},!0))}),PROCESS_ITEM:ye(i,(a,n,l)=>{let o=t("GET_MAX_PARALLEL_UPLOADS");if(t("GET_ITEMS_BY_STATUS",U.PROCESSING).length===o){i.processingQueue.push({id:a.id,success:n,failure:l});return}if(a.status===U.PROCESSING)return;let s=()=>{let c=i.processingQueue.shift();if(!c)return;let{id:d,success:m,failure:u}=c,g=Ke(i.items,d);if(!g||g.archived){s();return}e("PROCESS_ITEM",{query:d,success:m,failure:u},!0)};a.onOnce("process-complete",()=>{n(he(a)),s();let c=i.options.server;if(i.options.instantUpload&&a.origin===se.LOCAL&&Xe(c.remove)){let u=()=>{};a.origin=se.LIMBO,i.options.server.remove(a.source,u,u)}t("GET_ITEMS_BY_STATUS",U.PROCESSING_COMPLETE).length===i.items.length&&e("DID_COMPLETE_ITEM_PROCESSING_ALL")}),a.onOnce("process-error",c=>{l({error:c,file:he(a)}),s()});let p=i.options;a.process(Cs(Fs(p.server.url,p.server.process,p.name,{chunkTransferId:a.transferId,chunkServer:p.server.patch,chunkUploads:p.chunkUploads,chunkForce:p.chunkForce,chunkSize:p.chunkSize,chunkRetryDelays:p.chunkRetryDelays}),{allowMinimumUploadDuration:t("GET_ALLOW_MINIMUM_UPLOAD_DURATION")}),(c,d,m)=>{Ae("PREPARE_OUTPUT",c,{query:t,item:a}).then(u=>{e("DID_PREPARE_OUTPUT",{id:a.id,file:u}),d(u)}).catch(m)})}),RETRY_ITEM_PROCESSING:ye(i,a=>{e("REQUEST_ITEM_PROCESSING",{query:a})}),REQUEST_REMOVE_ITEM:ye(i,a=>{$a(t("GET_BEFORE_REMOVE_FILE"),he(a)).then(n=>{n&&e("REMOVE_ITEM",{query:a})})}),RELEASE_ITEM:ye(i,a=>{a.release()}),REMOVE_ITEM:ye(i,(a,n,l,o)=>{let r=()=>{let p=a.id;ja(i.items,p).archive(),e("DID_REMOVE_ITEM",{error:null,id:p,item:a}),Li(e,i),n(he(a))},s=i.options.server;a.origin===se.LOCAL&&s&&Xe(s.remove)&&o.remove!==!1?(e("DID_START_ITEM_REMOVE",{id:a.id}),s.remove(a.source,()=>r(),p=>{e("DID_THROW_ITEM_REMOVE_ERROR",{id:a.id,error:ie("error",0,p,null),status:{main:Jt(i.options.labelFileRemoveError)(p),sub:i.options.labelTapToRetry}})})):((o.revert&&a.origin!==se.LOCAL&&a.serverId!==null||i.options.chunkUploads&&a.file.size>i.options.chunkSize||i.options.chunkUploads&&i.options.chunkForce)&&a.revert(Pt(i.options.server.url,i.options.server.revert),t("GET_FORCE_REVERT")),r())}),ABORT_ITEM_LOAD:ye(i,a=>{a.abortLoad()}),ABORT_ITEM_PROCESSING:ye(i,a=>{if(a.serverId){e("REVERT_ITEM_PROCESSING",{id:a.id});return}a.abortProcessing().then(()=>{i.options.instantUpload&&e("REMOVE_ITEM",{query:a.id})})}),REQUEST_REVERT_ITEM_PROCESSING:ye(i,a=>{if(!i.options.instantUpload){e("REVERT_ITEM_PROCESSING",{query:a});return}let n=r=>{r&&e("REVERT_ITEM_PROCESSING",{query:a})},l=t("GET_BEFORE_REMOVE_FILE");if(!l)return n(!0);let o=l(he(a));if(o==null)return n(!0);if(typeof o=="boolean")return n(o);typeof o.then=="function"&&o.then(n)}),REVERT_ITEM_PROCESSING:ye(i,a=>{a.revert(Pt(i.options.server.url,i.options.server.revert),t("GET_FORCE_REVERT")).then(()=>{(i.options.instantUpload||Gs(a))&&e("REMOVE_ITEM",{query:a.id})}).catch(()=>{})}),SET_OPTIONS:({options:a})=>{let n=Object.keys(a),l=Ws.filter(r=>n.includes(r));[...l,...Object.keys(a).filter(r=>!l.includes(r))].forEach(r=>{e(`SET_${pi(r,"_").toUpperCase()}`,{value:a[r]})})}}),Ws=["server"],Qi=e=>e,Ve=e=>document.createElement(e),ae=(e,t)=>{let i=e.childNodes[0];i?t!==i.nodeValue&&(i.nodeValue=t):(i=document.createTextNode(t),e.appendChild(i))},Xa=(e,t,i,a)=>{let n=(a%360-90)*Math.PI/180;return{x:e+i*Math.cos(n),y:t+i*Math.sin(n)}},Hs=(e,t,i,a,n,l)=>{let o=Xa(e,t,i,n),r=Xa(e,t,i,a);return["M",o.x,o.y,"A",i,i,0,l,0,r.x,r.y].join(" ")},js=(e,t,i,a,n)=>{let l=1;return n>a&&n-a<=.5&&(l=0),a>n&&a-n>=.5&&(l=0),Hs(e,t,i,Math.min(.9999,a)*360,Math.min(.9999,n)*360,l)},Ys=({root:e,props:t})=>{t.spin=!1,t.progress=0,t.opacity=0;let i=li("svg");e.ref.path=li("path",{"stroke-width":2,"stroke-linecap":"round"}),i.appendChild(e.ref.path),e.ref.svg=i,e.appendChild(i)},qs=({root:e,props:t})=>{if(t.opacity===0)return;t.align&&(e.element.dataset.align=t.align);let i=parseInt(ce(e.ref.path,"stroke-width"),10),a=e.rect.element.width*.5,n=0,l=0;t.spin?(n=0,l=.5):(n=0,l=t.progress);let o=js(a,a,a-i,n,l);ce(e.ref.path,"d",o),ce(e.ref.path,"stroke-opacity",t.spin||t.progress>0?1:0)},Ka=ne({tag:"div",name:"progress-indicator",ignoreRectUpdate:!0,ignoreRect:!0,create:Ys,write:qs,mixins:{apis:["progress","spin","align"],styles:["opacity"],animations:{opacity:{type:"tween",duration:500},progress:{type:"spring",stiffness:.95,damping:.65,mass:10}}}}),$s=({root:e,props:t})=>{e.element.innerHTML=(t.icon||"")+`${t.label}`,t.isDisabled=!1},Xs=({root:e,props:t})=>{let{isDisabled:i}=t,a=e.query("GET_DISABLED")||t.opacity===0;a&&!i?(t.isDisabled=!0,ce(e.element,"disabled","disabled")):!a&&i&&(t.isDisabled=!1,e.element.removeAttribute("disabled"))},Cn=ne({tag:"button",attributes:{type:"button"},ignoreRect:!0,ignoreRectUpdate:!0,name:"file-action-button",mixins:{apis:["label"],styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}},listeners:!0},create:$s,write:Xs}),Bn=(e,t=".",i=1e3,a={})=>{let{labelBytes:n="bytes",labelKilobytes:l="KB",labelMegabytes:o="MB",labelGigabytes:r="GB"}=a;e=Math.round(Math.abs(e));let s=i,p=i*i,c=i*i*i;return ee.toFixed(t).split(".").filter(a=>a!=="0").join(i),Ks=({root:e,props:t})=>{let i=Ve("span");i.className="filepond--file-info-main",ce(i,"aria-hidden","true"),e.appendChild(i),e.ref.fileName=i;let a=Ve("span");a.className="filepond--file-info-sub",e.appendChild(a),e.ref.fileSize=a,ae(a,e.query("GET_LABEL_FILE_WAITING_FOR_SIZE")),ae(i,Qi(e.query("GET_ITEM_NAME",t.id)))},Di=({root:e,props:t})=>{ae(e.ref.fileSize,Bn(e.query("GET_ITEM_SIZE",t.id),".",e.query("GET_FILE_SIZE_BASE"),e.query("GET_FILE_SIZE_LABELS",e.query))),ae(e.ref.fileName,Qi(e.query("GET_ITEM_NAME",t.id)))},Za=({root:e,props:t})=>{if(bt(e.query("GET_ITEM_SIZE",t.id))){Di({root:e,props:t});return}ae(e.ref.fileSize,e.query("GET_LABEL_FILE_SIZE_NOT_AVAILABLE"))},Qs=ne({name:"file-info",ignoreRect:!0,ignoreRectUpdate:!0,write:fe({DID_LOAD_ITEM:Di,DID_UPDATE_ITEM_META:Di,DID_THROW_ITEM_LOAD_ERROR:Za,DID_THROW_ITEM_INVALID:Za}),didCreateView:e=>{tt("CREATE_VIEW",{...e,view:e})},create:Ks,mixins:{styles:["translateX","translateY"],animations:{translateX:"spring",translateY:"spring"}}}),Nn=e=>Math.round(e*100),Zs=({root:e})=>{let t=Ve("span");t.className="filepond--file-status-main",e.appendChild(t),e.ref.main=t;let i=Ve("span");i.className="filepond--file-status-sub",e.appendChild(i),e.ref.sub=i,kn({root:e,action:{progress:null}})},kn=({root:e,action:t})=>{let i=t.progress===null?e.query("GET_LABEL_FILE_LOADING"):`${e.query("GET_LABEL_FILE_LOADING")} ${Nn(t.progress)}%`;ae(e.ref.main,i),ae(e.ref.sub,e.query("GET_LABEL_TAP_TO_CANCEL"))},Js=({root:e,action:t})=>{let i=t.progress===null?e.query("GET_LABEL_FILE_PROCESSING"):`${e.query("GET_LABEL_FILE_PROCESSING")} ${Nn(t.progress)}%`;ae(e.ref.main,i),ae(e.ref.sub,e.query("GET_LABEL_TAP_TO_CANCEL"))},ec=({root:e})=>{ae(e.ref.main,e.query("GET_LABEL_FILE_PROCESSING")),ae(e.ref.sub,e.query("GET_LABEL_TAP_TO_CANCEL"))},tc=({root:e})=>{ae(e.ref.main,e.query("GET_LABEL_FILE_PROCESSING_ABORTED")),ae(e.ref.sub,e.query("GET_LABEL_TAP_TO_RETRY"))},ic=({root:e})=>{ae(e.ref.main,e.query("GET_LABEL_FILE_PROCESSING_COMPLETE")),ae(e.ref.sub,e.query("GET_LABEL_TAP_TO_UNDO"))},Ja=({root:e})=>{ae(e.ref.main,""),ae(e.ref.sub,"")},zt=({root:e,action:t})=>{ae(e.ref.main,t.status.main),ae(e.ref.sub,t.status.sub)},ac=ne({name:"file-status",ignoreRect:!0,ignoreRectUpdate:!0,write:fe({DID_LOAD_ITEM:Ja,DID_REVERT_ITEM_PROCESSING:Ja,DID_REQUEST_ITEM_PROCESSING:ec,DID_ABORT_ITEM_PROCESSING:tc,DID_COMPLETE_ITEM_PROCESSING:ic,DID_UPDATE_ITEM_PROCESS_PROGRESS:Js,DID_UPDATE_ITEM_LOAD_PROGRESS:kn,DID_THROW_ITEM_LOAD_ERROR:zt,DID_THROW_ITEM_INVALID:zt,DID_THROW_ITEM_PROCESSING_ERROR:zt,DID_THROW_ITEM_PROCESSING_REVERT_ERROR:zt,DID_THROW_ITEM_REMOVE_ERROR:zt}),didCreateView:e=>{tt("CREATE_VIEW",{...e,view:e})},create:Zs,mixins:{styles:["translateX","translateY","opacity"],animations:{opacity:{type:"tween",duration:250},translateX:"spring",translateY:"spring"}}}),Ci={AbortItemLoad:{label:"GET_LABEL_BUTTON_ABORT_ITEM_LOAD",action:"ABORT_ITEM_LOAD",className:"filepond--action-abort-item-load",align:"LOAD_INDICATOR_POSITION"},RetryItemLoad:{label:"GET_LABEL_BUTTON_RETRY_ITEM_LOAD",action:"RETRY_ITEM_LOAD",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-load",align:"BUTTON_PROCESS_ITEM_POSITION"},RemoveItem:{label:"GET_LABEL_BUTTON_REMOVE_ITEM",action:"REQUEST_REMOVE_ITEM",icon:"GET_ICON_REMOVE",className:"filepond--action-remove-item",align:"BUTTON_REMOVE_ITEM_POSITION"},ProcessItem:{label:"GET_LABEL_BUTTON_PROCESS_ITEM",action:"REQUEST_ITEM_PROCESSING",icon:"GET_ICON_PROCESS",className:"filepond--action-process-item",align:"BUTTON_PROCESS_ITEM_POSITION"},AbortItemProcessing:{label:"GET_LABEL_BUTTON_ABORT_ITEM_PROCESSING",action:"ABORT_ITEM_PROCESSING",className:"filepond--action-abort-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RetryItemProcessing:{label:"GET_LABEL_BUTTON_RETRY_ITEM_PROCESSING",action:"RETRY_ITEM_PROCESSING",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RevertItemProcessing:{label:"GET_LABEL_BUTTON_UNDO_ITEM_PROCESSING",action:"REQUEST_REVERT_ITEM_PROCESSING",icon:"GET_ICON_UNDO",className:"filepond--action-revert-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"}},Bi=[];te(Ci,e=>{Bi.push(e)});var Ie=e=>{if(Ni(e)==="right")return 0;let t=e.ref.buttonRemoveItem.rect.element;return t.hidden?null:t.width+t.left},nc=e=>e.ref.buttonAbortItemLoad.rect.element.width,ei=e=>Math.floor(e.ref.buttonRemoveItem.rect.element.height/4),lc=e=>Math.floor(e.ref.buttonRemoveItem.rect.element.left/2),oc=e=>e.query("GET_STYLE_LOAD_INDICATOR_POSITION"),rc=e=>e.query("GET_STYLE_PROGRESS_INDICATOR_POSITION"),Ni=e=>e.query("GET_STYLE_BUTTON_REMOVE_ITEM_POSITION"),sc={buttonAbortItemLoad:{opacity:0},buttonRetryItemLoad:{opacity:0},buttonRemoveItem:{opacity:0},buttonProcessItem:{opacity:0},buttonAbortItemProcessing:{opacity:0},buttonRetryItemProcessing:{opacity:0},buttonRevertItemProcessing:{opacity:0},loadProgressIndicator:{opacity:0,align:oc},processProgressIndicator:{opacity:0,align:rc},processingCompleteIndicator:{opacity:0,scaleX:.75,scaleY:.75},info:{translateX:0,translateY:0,opacity:0},status:{translateX:0,translateY:0,opacity:0}},en={buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:Ie},status:{translateX:Ie}},Ai={buttonAbortItemProcessing:{opacity:1},processProgressIndicator:{opacity:1},status:{opacity:1}},mt={DID_THROW_ITEM_INVALID:{buttonRemoveItem:{opacity:1},info:{translateX:Ie},status:{translateX:Ie,opacity:1}},DID_START_ITEM_LOAD:{buttonAbortItemLoad:{opacity:1},loadProgressIndicator:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_LOAD_ERROR:{buttonRetryItemLoad:{opacity:1},buttonRemoveItem:{opacity:1},info:{translateX:Ie},status:{opacity:1}},DID_START_ITEM_REMOVE:{processProgressIndicator:{opacity:1,align:Ni},info:{translateX:Ie},status:{opacity:0}},DID_THROW_ITEM_REMOVE_ERROR:{processProgressIndicator:{opacity:0,align:Ni},buttonRemoveItem:{opacity:1},info:{translateX:Ie},status:{opacity:1,translateX:Ie}},DID_LOAD_ITEM:en,DID_LOAD_LOCAL_ITEM:{buttonRemoveItem:{opacity:1},info:{translateX:Ie},status:{translateX:Ie}},DID_START_ITEM_PROCESSING:Ai,DID_REQUEST_ITEM_PROCESSING:Ai,DID_UPDATE_ITEM_PROCESS_PROGRESS:Ai,DID_COMPLETE_ITEM_PROCESSING:{buttonRevertItemProcessing:{opacity:1},info:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_PROCESSING_ERROR:{buttonRemoveItem:{opacity:1},buttonRetryItemProcessing:{opacity:1},status:{opacity:1},info:{translateX:Ie}},DID_THROW_ITEM_PROCESSING_REVERT_ERROR:{buttonRevertItemProcessing:{opacity:1},status:{opacity:1},info:{opacity:1}},DID_ABORT_ITEM_PROCESSING:{buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:Ie},status:{opacity:1}},DID_REVERT_ITEM_PROCESSING:en},cc=ne({create:({root:e})=>{e.element.innerHTML=e.query("GET_ICON_DONE")},name:"processing-complete-indicator",ignoreRect:!0,mixins:{styles:["scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",opacity:{type:"tween",duration:250}}}}),dc=({root:e,props:t})=>{let i=Object.keys(Ci).reduce((g,f)=>(g[f]={...Ci[f]},g),{}),{id:a}=t,n=e.query("GET_ALLOW_REVERT"),l=e.query("GET_ALLOW_REMOVE"),o=e.query("GET_ALLOW_PROCESS"),r=e.query("GET_INSTANT_UPLOAD"),s=e.query("IS_ASYNC"),p=e.query("GET_STYLE_BUTTON_REMOVE_ITEM_ALIGN"),c;s?o&&!n?c=g=>!/RevertItemProcessing/.test(g):!o&&n?c=g=>!/ProcessItem|RetryItemProcessing|AbortItemProcessing/.test(g):!o&&!n&&(c=g=>!/Process/.test(g)):c=g=>!/Process/.test(g);let d=c?Bi.filter(c):Bi.concat();if(r&&n&&(i.RevertItemProcessing.label="GET_LABEL_BUTTON_REMOVE_ITEM",i.RevertItemProcessing.icon="GET_ICON_REMOVE"),s&&!n){let g=mt.DID_COMPLETE_ITEM_PROCESSING;g.info.translateX=lc,g.info.translateY=ei,g.status.translateY=ei,g.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}if(s&&!o&&(["DID_START_ITEM_PROCESSING","DID_REQUEST_ITEM_PROCESSING","DID_UPDATE_ITEM_PROCESS_PROGRESS","DID_THROW_ITEM_PROCESSING_ERROR"].forEach(g=>{mt[g].status.translateY=ei}),mt.DID_THROW_ITEM_PROCESSING_ERROR.status.translateX=nc),p&&n){i.RevertItemProcessing.align="BUTTON_REMOVE_ITEM_POSITION";let g=mt.DID_COMPLETE_ITEM_PROCESSING;g.info.translateX=Ie,g.status.translateY=ei,g.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}l||(i.RemoveItem.disabled=!0),te(i,(g,f)=>{let h=e.createChildView(Cn,{label:e.query(f.label),icon:e.query(f.icon),opacity:0});d.includes(g)&&e.appendChildView(h),f.disabled&&(h.element.setAttribute("disabled","disabled"),h.element.setAttribute("hidden","hidden")),h.element.dataset.align=e.query(`GET_STYLE_${f.align}`),h.element.classList.add(f.className),h.on("click",I=>{I.stopPropagation(),!f.disabled&&e.dispatch(f.action,{query:a})}),e.ref[`button${g}`]=h}),e.ref.processingCompleteIndicator=e.appendChildView(e.createChildView(cc)),e.ref.processingCompleteIndicator.element.dataset.align=e.query("GET_STYLE_BUTTON_PROCESS_ITEM_POSITION"),e.ref.info=e.appendChildView(e.createChildView(Qs,{id:a})),e.ref.status=e.appendChildView(e.createChildView(ac,{id:a}));let m=e.appendChildView(e.createChildView(Ka,{opacity:0,align:e.query("GET_STYLE_LOAD_INDICATOR_POSITION")}));m.element.classList.add("filepond--load-indicator"),e.ref.loadProgressIndicator=m;let u=e.appendChildView(e.createChildView(Ka,{opacity:0,align:e.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}));u.element.classList.add("filepond--process-indicator"),e.ref.processProgressIndicator=u,e.ref.activeStyles=[]},pc=({root:e,actions:t,props:i})=>{mc({root:e,actions:t,props:i});let a=t.concat().filter(n=>/^DID_/.test(n.type)).reverse().find(n=>mt[n.type]);if(a){e.ref.activeStyles=[];let n=mt[a.type];te(sc,(l,o)=>{let r=e.ref[l];te(o,(s,p)=>{let c=n[l]&&typeof n[l][s]<"u"?n[l][s]:p;e.ref.activeStyles.push({control:r,key:s,value:c})})})}e.ref.activeStyles.forEach(({control:n,key:l,value:o})=>{n[l]=typeof o=="function"?o(e):o})},mc=fe({DID_SET_LABEL_BUTTON_ABORT_ITEM_PROCESSING:({root:e,action:t})=>{e.ref.buttonAbortItemProcessing.label=t.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_LOAD:({root:e,action:t})=>{e.ref.buttonAbortItemLoad.label=t.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_REMOVAL:({root:e,action:t})=>{e.ref.buttonAbortItemRemoval.label=t.value},DID_REQUEST_ITEM_PROCESSING:({root:e})=>{e.ref.processProgressIndicator.spin=!0,e.ref.processProgressIndicator.progress=0},DID_START_ITEM_LOAD:({root:e})=>{e.ref.loadProgressIndicator.spin=!0,e.ref.loadProgressIndicator.progress=0},DID_START_ITEM_REMOVE:({root:e})=>{e.ref.processProgressIndicator.spin=!0,e.ref.processProgressIndicator.progress=0},DID_UPDATE_ITEM_LOAD_PROGRESS:({root:e,action:t})=>{e.ref.loadProgressIndicator.spin=!1,e.ref.loadProgressIndicator.progress=t.progress},DID_UPDATE_ITEM_PROCESS_PROGRESS:({root:e,action:t})=>{e.ref.processProgressIndicator.spin=!1,e.ref.processProgressIndicator.progress=t.progress}}),uc=ne({create:dc,write:pc,didCreateView:e=>{tt("CREATE_VIEW",{...e,view:e})},name:"file"}),gc=({root:e,props:t})=>{e.ref.fileName=Ve("legend"),e.appendChild(e.ref.fileName),e.ref.file=e.appendChildView(e.createChildView(uc,{id:t.id})),e.ref.data=!1},fc=({root:e,props:t})=>{ae(e.ref.fileName,Qi(e.query("GET_ITEM_NAME",t.id)))},hc=ne({create:gc,ignoreRect:!0,write:fe({DID_LOAD_ITEM:fc}),didCreateView:e=>{tt("CREATE_VIEW",{...e,view:e})},tag:"fieldset",name:"file-wrapper"}),tn={type:"spring",damping:.6,mass:7},bc=({root:e,props:t})=>{[{name:"top"},{name:"center",props:{translateY:null,scaleY:null},mixins:{animations:{scaleY:tn},styles:["translateY","scaleY"]}},{name:"bottom",props:{translateY:null},mixins:{animations:{translateY:tn},styles:["translateY"]}}].forEach(i=>{Ec(e,i,t.name)}),e.element.classList.add(`filepond--${t.name}`),e.ref.scalable=null},Ec=(e,t,i)=>{let a=ne({name:`panel-${t.name} filepond--${i}`,mixins:t.mixins,ignoreRectUpdate:!0}),n=e.createChildView(a,t.props);e.ref[t.name]=e.appendChildView(n)},Tc=({root:e,props:t})=>{if((e.ref.scalable===null||t.scalable!==e.ref.scalable)&&(e.ref.scalable=In(t.scalable)?t.scalable:!0,e.element.dataset.scalable=e.ref.scalable),!t.height)return;let i=e.ref.top.rect.element,a=e.ref.bottom.rect.element,n=Math.max(i.height+a.height,t.height);e.ref.center.translateY=i.height,e.ref.center.scaleY=(n-i.height-a.height)/100,e.ref.bottom.translateY=n-a.height},Vn=ne({name:"panel",read:({root:e,props:t})=>t.heightCurrent=e.ref.bottom.translateY,write:Tc,create:bc,ignoreRect:!0,mixins:{apis:["height","heightCurrent","scalable"]}}),Ic=e=>{let t=e.map(a=>a.id),i;return{setIndex:a=>{i=a},getIndex:()=>i,getItemIndex:a=>t.indexOf(a.id)}},an={type:"spring",stiffness:.75,damping:.45,mass:10},nn="spring",ln={DID_START_ITEM_LOAD:"busy",DID_UPDATE_ITEM_LOAD_PROGRESS:"loading",DID_THROW_ITEM_INVALID:"load-invalid",DID_THROW_ITEM_LOAD_ERROR:"load-error",DID_LOAD_ITEM:"idle",DID_THROW_ITEM_REMOVE_ERROR:"remove-error",DID_START_ITEM_REMOVE:"busy",DID_START_ITEM_PROCESSING:"busy processing",DID_REQUEST_ITEM_PROCESSING:"busy processing",DID_UPDATE_ITEM_PROCESS_PROGRESS:"processing",DID_COMPLETE_ITEM_PROCESSING:"processing-complete",DID_THROW_ITEM_PROCESSING_ERROR:"processing-error",DID_THROW_ITEM_PROCESSING_REVERT_ERROR:"processing-revert-error",DID_ABORT_ITEM_PROCESSING:"cancelled",DID_REVERT_ITEM_PROCESSING:"idle"},vc=({root:e,props:t})=>{if(e.ref.handleClick=a=>e.dispatch("DID_ACTIVATE_ITEM",{id:t.id}),e.element.id=`filepond--item-${t.id}`,e.element.addEventListener("click",e.ref.handleClick),e.ref.container=e.appendChildView(e.createChildView(hc,{id:t.id})),e.ref.panel=e.appendChildView(e.createChildView(Vn,{name:"item-panel"})),e.ref.panel.height=null,t.markedForRemoval=!1,!e.query("GET_ALLOW_REORDER"))return;e.element.dataset.dragState="idle";let i=a=>{if(!a.isPrimary)return;let n=!1,l={x:a.pageX,y:a.pageY};t.dragOrigin={x:e.translateX,y:e.translateY},t.dragCenter={x:a.offsetX,y:a.offsetY};let o=Ic(e.query("GET_ACTIVE_ITEMS"));e.dispatch("DID_GRAB_ITEM",{id:t.id,dragState:o});let r=d=>{if(!d.isPrimary)return;d.stopPropagation(),d.preventDefault(),t.dragOffset={x:d.pageX-l.x,y:d.pageY-l.y},t.dragOffset.x*t.dragOffset.x+t.dragOffset.y*t.dragOffset.y>16&&!n&&(n=!0,e.element.removeEventListener("click",e.ref.handleClick)),e.dispatch("DID_DRAG_ITEM",{id:t.id,dragState:o})},s=d=>{d.isPrimary&&(t.dragOffset={x:d.pageX-l.x,y:d.pageY-l.y},c())},p=()=>{c()},c=()=>{document.removeEventListener("pointercancel",p),document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",s),e.dispatch("DID_DROP_ITEM",{id:t.id,dragState:o}),n&&setTimeout(()=>e.element.addEventListener("click",e.ref.handleClick),0)};document.addEventListener("pointercancel",p),document.addEventListener("pointermove",r),document.addEventListener("pointerup",s)};e.element.addEventListener("pointerdown",i)},xc=fe({DID_UPDATE_PANEL_HEIGHT:({root:e,action:t})=>{e.height=t.height}}),yc=fe({DID_GRAB_ITEM:({root:e,props:t})=>{t.dragOrigin={x:e.translateX,y:e.translateY}},DID_DRAG_ITEM:({root:e})=>{e.element.dataset.dragState="drag"},DID_DROP_ITEM:({root:e,props:t})=>{t.dragOffset=null,t.dragOrigin=null,e.element.dataset.dragState="drop"}},({root:e,actions:t,props:i,shouldOptimize:a})=>{e.element.dataset.dragState==="drop"&&e.scaleX<=1&&(e.element.dataset.dragState="idle");let n=t.concat().filter(o=>/^DID_/.test(o.type)).reverse().find(o=>ln[o.type]);n&&n.type!==i.currentState&&(i.currentState=n.type,e.element.dataset.filepondItemState=ln[i.currentState]||"");let l=e.query("GET_ITEM_PANEL_ASPECT_RATIO")||e.query("GET_PANEL_ASPECT_RATIO");l?a||(e.height=e.rect.element.width*l):(xc({root:e,actions:t,props:i}),!e.height&&e.ref.container.rect.element.height>0&&(e.height=e.ref.container.rect.element.height)),a&&(e.ref.panel.height=null),e.ref.panel.height=e.height}),Rc=ne({create:vc,write:yc,destroy:({root:e,props:t})=>{e.element.removeEventListener("click",e.ref.handleClick),e.dispatch("RELEASE_ITEM",{query:t.id})},tag:"li",name:"item",mixins:{apis:["id","interactionMethod","markedForRemoval","spawnDate","dragCenter","dragOrigin","dragOffset"],styles:["translateX","translateY","scaleX","scaleY","opacity","height"],animations:{scaleX:nn,scaleY:nn,translateX:an,translateY:an,opacity:{type:"tween",duration:150}}}}),Zi=(e,t)=>Math.max(1,Math.floor((e+1)/t)),Ji=(e,t,i)=>{if(!i)return;let a=e.rect.element.width,n=t.length,l=null;if(n===0||i.topb){if(i.left{ce(e.element,"role","list"),e.ref.lastItemSpanwDate=Date.now()},_c=({root:e,action:t})=>{let{id:i,index:a,interactionMethod:n}=t;e.ref.addIndex=a;let l=Date.now(),o=l,r=1;if(n!==Re.NONE){r=0;let s=e.query("GET_ITEM_INSERT_INTERVAL"),p=l-e.ref.lastItemSpanwDate;o=p{e.dragOffset?(e.translateX=null,e.translateY=null,e.translateX=e.dragOrigin.x+e.dragOffset.x,e.translateY=e.dragOrigin.y+e.dragOffset.y,e.scaleX=1.025,e.scaleY=1.025):(e.translateX=t,e.translateY=i,Date.now()>e.spawnDate&&(e.opacity===0&&wc(e,t,i,a,n),e.scaleX=1,e.scaleY=1,e.opacity=1))},wc=(e,t,i,a,n)=>{e.interactionMethod===Re.NONE?(e.translateX=null,e.translateX=t,e.translateY=null,e.translateY=i):e.interactionMethod===Re.DROP?(e.translateX=null,e.translateX=t-a*20,e.translateY=null,e.translateY=i-n*10,e.scaleX=.8,e.scaleY=.8):e.interactionMethod===Re.BROWSE?(e.translateY=null,e.translateY=i-30):e.interactionMethod===Re.API&&(e.translateX=null,e.translateX=t-30,e.translateY=null)},Lc=({root:e,action:t})=>{let{id:i}=t,a=e.childViews.find(n=>n.id===i);a&&(a.scaleX=.9,a.scaleY=.9,a.opacity=0,a.markedForRemoval=!0)},Pi=e=>e.rect.element.height+e.rect.element.marginBottom*.5+e.rect.element.marginTop*.5,Mc=e=>e.rect.element.width+e.rect.element.marginLeft*.5+e.rect.element.marginRight*.5,Ac=({root:e,action:t})=>{let{id:i,dragState:a}=t,n=e.query("GET_ITEM",{id:i}),l=e.childViews.find(h=>h.id===i),o=e.childViews.length,r=a.getItemIndex(n);if(!l)return;let s={x:l.dragOrigin.x+l.dragOffset.x+l.dragCenter.x,y:l.dragOrigin.y+l.dragOffset.y+l.dragCenter.y},p=Pi(l),c=Mc(l),d=Math.floor(e.rect.outer.width/c);d>o&&(d=o);let m=Math.floor(o/d+1);ti.setHeight=p*m,ti.setWidth=c*d;var u={y:Math.floor(s.y/p),x:Math.floor(s.x/c),getGridIndex:function(){return s.y>ti.getHeight||s.y<0||s.x>ti.getWidth||s.x<0?r:this.y*d+this.x},getColIndex:function(){let I=e.query("GET_ACTIVE_ITEMS"),b=e.childViews.filter(P=>P.rect.element.height),T=I.map(P=>b.find(A=>A.id===P.id)),v=T.findIndex(P=>P===l),y=Pi(l),E=T.length,_=E,x=0,R=0,z=0;for(let P=0;PP){if(s.y1?u.getGridIndex():u.getColIndex();e.dispatch("MOVE_ITEM",{query:l,index:g});let f=a.getIndex();if(f===void 0||f!==g){if(a.setIndex(g),f===void 0)return;e.dispatch("DID_REORDER_ITEMS",{items:e.query("GET_ACTIVE_ITEMS"),origin:r,target:g})}},Pc=fe({DID_ADD_ITEM:_c,DID_REMOVE_ITEM:Lc,DID_DRAG_ITEM:Ac}),zc=({root:e,props:t,actions:i,shouldOptimize:a})=>{Pc({root:e,props:t,actions:i});let{dragCoordinates:n}=t,l=e.rect.element.width,o=e.childViews.filter(T=>T.rect.element.height),r=e.query("GET_ACTIVE_ITEMS").map(T=>o.find(v=>v.id===T.id)).filter(T=>T),s=n?Ji(e,r,n):null,p=e.ref.addIndex||null;e.ref.addIndex=null;let c=0,d=0,m=0;if(r.length===0)return;let u=r[0].rect.element,g=u.marginTop+u.marginBottom,f=u.marginLeft+u.marginRight,h=u.width+f,I=u.height+g,b=Zi(l,h);if(b===1){let T=0,v=0;r.forEach((y,E)=>{if(s){let R=E-s;R===-2?v=-g*.25:R===-1?v=-g*.75:R===0?v=g*.75:R===1?v=g*.25:v=0}a&&(y.translateX=null,y.translateY=null),y.markedForRemoval||on(y,0,T+v);let x=(y.rect.element.height+g)*(y.markedForRemoval?y.opacity:1);T+=x})}else{let T=0,v=0;r.forEach((y,E)=>{E===s&&(c=1),E===p&&(m+=1),y.markedForRemoval&&y.opacity<.5&&(d-=1);let _=E+m+c+d,x=_%b,R=Math.floor(_/b),z=x*h,P=R*I,A=Math.sign(z-T),B=Math.sign(P-v);T=z,v=P,!y.markedForRemoval&&(a&&(y.translateX=null,y.translateY=null),on(y,z,P,A,B))})}},Oc=(e,t)=>t.filter(i=>i.data&&i.data.id?e.id===i.data.id:!0),Fc=ne({create:Sc,write:zc,tag:"ul",name:"list",didWriteView:({root:e})=>{e.childViews.filter(t=>t.markedForRemoval&&t.opacity===0&&t.resting).forEach(t=>{t._destroy(),e.removeChildView(t)})},filterFrameActionsForChild:Oc,mixins:{apis:["dragCoordinates"]}}),Dc=({root:e,props:t})=>{e.ref.list=e.appendChildView(e.createChildView(Fc)),t.dragCoordinates=null,t.overflowing=!1},Cc=({root:e,props:t,action:i})=>{e.query("GET_ITEM_INSERT_LOCATION_FREEDOM")&&(t.dragCoordinates={left:i.position.scopeLeft-e.ref.list.rect.element.left,top:i.position.scopeTop-(e.rect.outer.top+e.rect.element.marginTop+e.rect.element.scrollTop)})},Bc=({props:e})=>{e.dragCoordinates=null},Nc=fe({DID_DRAG:Cc,DID_END_DRAG:Bc}),kc=({root:e,props:t,actions:i})=>{if(Nc({root:e,props:t,actions:i}),e.ref.list.dragCoordinates=t.dragCoordinates,t.overflowing&&!t.overflow&&(t.overflowing=!1,e.element.dataset.state="",e.height=null),t.overflow){let a=Math.round(t.overflow);a!==e.height&&(t.overflowing=!0,e.element.dataset.state="overflow",e.height=a)}},Vc=ne({create:Dc,write:kc,name:"list-scroller",mixins:{apis:["overflow","dragCoordinates"],styles:["height","translateY"],animations:{translateY:"spring"}}}),ze=(e,t,i,a="")=>{i?ce(e,t,a):e.removeAttribute(t)},Gc=e=>{if(!(!e||e.value==="")){try{e.value=""}catch{}if(e.value){let t=Ve("form"),i=e.parentNode,a=e.nextSibling;t.appendChild(e),t.reset(),a?i.insertBefore(e,a):i.appendChild(e)}}},Uc=({root:e,props:t})=>{e.element.id=`filepond--browser-${t.id}`,ce(e.element,"name",e.query("GET_NAME")),ce(e.element,"aria-controls",`filepond--assistant-${t.id}`),ce(e.element,"aria-labelledby",`filepond--drop-label-${t.id}`),Gn({root:e,action:{value:e.query("GET_ACCEPTED_FILE_TYPES")}}),Un({root:e,action:{value:e.query("GET_ALLOW_MULTIPLE")}}),Wn({root:e,action:{value:e.query("GET_ALLOW_DIRECTORIES_ONLY")}}),ki({root:e}),Hn({root:e,action:{value:e.query("GET_REQUIRED")}}),jn({root:e,action:{value:e.query("GET_CAPTURE_METHOD")}}),e.ref.handleChange=i=>{if(!e.element.value)return;let a=Array.from(e.element.files).map(n=>(n._relativePath=n.webkitRelativePath,n));setTimeout(()=>{t.onload(a),Gc(e.element)},250)},e.element.addEventListener("change",e.ref.handleChange)},Gn=({root:e,action:t})=>{e.query("GET_ALLOW_SYNC_ACCEPT_ATTRIBUTE")&&ze(e.element,"accept",!!t.value,t.value?t.value.join(","):"")},Un=({root:e,action:t})=>{ze(e.element,"multiple",t.value)},Wn=({root:e,action:t})=>{ze(e.element,"webkitdirectory",t.value)},ki=({root:e})=>{let t=e.query("GET_DISABLED"),i=e.query("GET_ALLOW_BROWSE"),a=t||!i;ze(e.element,"disabled",a)},Hn=({root:e,action:t})=>{t.value?e.query("GET_TOTAL_ITEMS")===0&&ze(e.element,"required",!0):ze(e.element,"required",!1)},jn=({root:e,action:t})=>{ze(e.element,"capture",!!t.value,t.value===!0?"":t.value)},rn=({root:e})=>{let{element:t}=e;if(e.query("GET_TOTAL_ITEMS")>0){ze(t,"required",!1),ze(t,"name",!1);let i=e.query("GET_ACTIVE_ITEMS"),a=!1;for(let n=0;n{e.query("GET_CHECK_VALIDITY")&&e.element.setCustomValidity(e.query("GET_LABEL_INVALID_FIELD"))},Hc=ne({tag:"input",name:"browser",ignoreRect:!0,ignoreRectUpdate:!0,attributes:{type:"file"},create:Uc,destroy:({root:e})=>{e.element.removeEventListener("change",e.ref.handleChange)},write:fe({DID_LOAD_ITEM:rn,DID_REMOVE_ITEM:rn,DID_THROW_ITEM_INVALID:Wc,DID_SET_DISABLED:ki,DID_SET_ALLOW_BROWSE:ki,DID_SET_ALLOW_DIRECTORIES_ONLY:Wn,DID_SET_ALLOW_MULTIPLE:Un,DID_SET_ACCEPTED_FILE_TYPES:Gn,DID_SET_CAPTURE_METHOD:jn,DID_SET_REQUIRED:Hn})}),sn={ENTER:13,SPACE:32},jc=({root:e,props:t})=>{let i=Ve("label");ce(i,"for",`filepond--browser-${t.id}`),ce(i,"id",`filepond--drop-label-${t.id}`),e.ref.handleKeyDown=a=>{(a.keyCode===sn.ENTER||a.keyCode===sn.SPACE)&&(a.preventDefault(),e.ref.label.click())},e.ref.handleClick=a=>{a.target===i||i.contains(a.target)||e.ref.label.click()},i.addEventListener("keydown",e.ref.handleKeyDown),e.element.addEventListener("click",e.ref.handleClick),Yn(i,t.caption),e.appendChild(i),e.ref.label=i},Yn=(e,t)=>{e.innerHTML=t;let i=e.querySelector(".filepond--label-action");return i&&ce(i,"tabindex","0"),t},Yc=ne({name:"drop-label",ignoreRect:!0,create:jc,destroy:({root:e})=>{e.ref.label.addEventListener("keydown",e.ref.handleKeyDown),e.element.removeEventListener("click",e.ref.handleClick)},write:fe({DID_SET_LABEL_IDLE:({root:e,action:t})=>{Yn(e.ref.label,t.value)}}),mixins:{styles:["opacity","translateX","translateY"],animations:{opacity:{type:"tween",duration:150},translateX:"spring",translateY:"spring"}}}),qc=ne({name:"drip-blob",ignoreRect:!0,mixins:{styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}}}}),$c=({root:e})=>{let t=e.rect.element.width*.5,i=e.rect.element.height*.5;e.ref.blob=e.appendChildView(e.createChildView(qc,{opacity:0,scaleX:2.5,scaleY:2.5,translateX:t,translateY:i}))},Xc=({root:e,action:t})=>{if(!e.ref.blob){$c({root:e});return}e.ref.blob.translateX=t.position.scopeLeft,e.ref.blob.translateY=t.position.scopeTop,e.ref.blob.scaleX=1,e.ref.blob.scaleY=1,e.ref.blob.opacity=1},Kc=({root:e})=>{e.ref.blob&&(e.ref.blob.opacity=0)},Qc=({root:e})=>{e.ref.blob&&(e.ref.blob.scaleX=2.5,e.ref.blob.scaleY=2.5,e.ref.blob.opacity=0)},Zc=({root:e,props:t,actions:i})=>{Jc({root:e,props:t,actions:i});let{blob:a}=e.ref;i.length===0&&a&&a.opacity===0&&(e.removeChildView(a),e.ref.blob=null)},Jc=fe({DID_DRAG:Xc,DID_DROP:Qc,DID_END_DRAG:Kc}),ed=ne({ignoreRect:!0,ignoreRectUpdate:!0,name:"drip",write:Zc}),qn=(e,t)=>{try{let i=new DataTransfer;t.forEach(a=>{a instanceof File?i.items.add(a):i.items.add(new File([a],a.name,{type:a.type}))}),e.files=i.files}catch{return!1}return!0},td=({root:e})=>{e.ref.fields={};let t=document.createElement("legend");t.textContent="Files",e.element.appendChild(t)},gi=(e,t)=>e.ref.fields[t],ea=e=>{e.query("GET_ACTIVE_ITEMS").forEach(t=>{e.ref.fields[t.id]&&e.element.appendChild(e.ref.fields[t.id])})},cn=({root:e})=>ea(e),id=({root:e,action:t})=>{let n=!(e.query("GET_ITEM",t.id).origin===se.LOCAL)&&e.query("SHOULD_UPDATE_FILE_INPUT"),l=Ve("input");l.type=n?"file":"hidden",l.name=e.query("GET_NAME"),e.ref.fields[t.id]=l,ea(e)},ad=({root:e,action:t})=>{let i=gi(e,t.id);if(!i||(t.serverFileReference!==null&&(i.value=t.serverFileReference),!e.query("SHOULD_UPDATE_FILE_INPUT")))return;let a=e.query("GET_ITEM",t.id);qn(i,[a.file])},nd=({root:e,action:t})=>{e.query("SHOULD_UPDATE_FILE_INPUT")&&setTimeout(()=>{let i=gi(e,t.id);i&&qn(i,[t.file])},0)},ld=({root:e})=>{e.element.disabled=e.query("GET_DISABLED")},od=({root:e,action:t})=>{let i=gi(e,t.id);i&&(i.parentNode&&i.parentNode.removeChild(i),delete e.ref.fields[t.id])},rd=({root:e,action:t})=>{let i=gi(e,t.id);i&&(t.value===null?i.removeAttribute("value"):i.type!="file"&&(i.value=t.value),ea(e))},sd=fe({DID_SET_DISABLED:ld,DID_ADD_ITEM:id,DID_LOAD_ITEM:ad,DID_REMOVE_ITEM:od,DID_DEFINE_VALUE:rd,DID_PREPARE_OUTPUT:nd,DID_REORDER_ITEMS:cn,DID_SORT_ITEMS:cn}),cd=ne({tag:"fieldset",name:"data",create:td,write:sd,ignoreRect:!0}),dd=e=>"getRootNode"in e?e.getRootNode():document,pd=["jpg","jpeg","png","gif","bmp","webp","svg","tiff"],md=["css","csv","html","txt"],ud={zip:"zip|compressed",epub:"application/epub+zip"},$n=(e="")=>(e=e.toLowerCase(),pd.includes(e)?"image/"+(e==="jpg"?"jpeg":e==="svg"?"svg+xml":e):md.includes(e)?"text/"+e:ud[e]||""),ta=e=>new Promise((t,i)=>{let a=vd(e);if(a.length&&!gd(e))return t(a);fd(e).then(t)}),gd=e=>e.files?e.files.length>0:!1,fd=e=>new Promise((t,i)=>{let a=(e.items?Array.from(e.items):[]).filter(n=>hd(n)).map(n=>bd(n));if(!a.length){t(e.files?Array.from(e.files):[]);return}Promise.all(a).then(n=>{let l=[];n.forEach(o=>{l.push.apply(l,o)}),t(l.filter(o=>o).map(o=>(o._relativePath||(o._relativePath=o.webkitRelativePath),o)))}).catch(console.error)}),hd=e=>{if(Xn(e)){let t=ia(e);if(t)return t.isFile||t.isDirectory}return e.kind==="file"},bd=e=>new Promise((t,i)=>{if(Id(e)){Ed(ia(e)).then(t).catch(i);return}t([e.getAsFile()])}),Ed=e=>new Promise((t,i)=>{let a=[],n=0,l=0,o=()=>{l===0&&n===0&&t(a)},r=s=>{n++;let p=s.createReader(),c=()=>{p.readEntries(d=>{if(d.length===0){n--,o();return}d.forEach(m=>{m.isDirectory?r(m):(l++,m.file(u=>{let g=Td(u);m.fullPath&&(g._relativePath=m.fullPath),a.push(g),l--,o()}))}),c()},i)};c()};r(e)}),Td=e=>{if(e.type.length)return e;let t=e.lastModifiedDate,i=e.name,a=$n(ui(e.name));return a.length&&(e=e.slice(0,e.size,a),e.name=i,e.lastModifiedDate=t),e},Id=e=>Xn(e)&&(ia(e)||{}).isDirectory,Xn=e=>"webkitGetAsEntry"in e,ia=e=>e.webkitGetAsEntry(),vd=e=>{let t=[];try{if(t=yd(e),t.length)return t;t=xd(e)}catch{}return t},xd=e=>{let t=e.getData("url");return typeof t=="string"&&t.length?[t]:[]},yd=e=>{let t=e.getData("text/html");if(typeof t=="string"&&t.length){let i=t.match(/src\s*=\s*"(.+?)"/);if(i)return[i[1]]}return[]},ri=[],et=e=>({pageLeft:e.pageX,pageTop:e.pageY,scopeLeft:e.offsetX||e.layerX,scopeTop:e.offsetY||e.layerY}),Rd=(e,t,i)=>{let a=Sd(t),n={element:e,filterElement:i,state:null,ondrop:()=>{},onenter:()=>{},ondrag:()=>{},onexit:()=>{},onload:()=>{},allowdrop:()=>{}};return n.destroy=a.addListener(n),n},Sd=e=>{let t=ri.find(a=>a.element===e);if(t)return t;let i=_d(e);return ri.push(i),i},_d=e=>{let t=[],i={dragenter:Ld,dragover:Md,dragleave:Pd,drop:Ad},a={};te(i,(l,o)=>{a[l]=o(e,t),e.addEventListener(l,a[l],!1)});let n={element:e,addListener:l=>(t.push(l),()=>{t.splice(t.indexOf(l),1),t.length===0&&(ri.splice(ri.indexOf(n),1),te(i,o=>{e.removeEventListener(o,a[o],!1)}))})};return n},wd=(e,t)=>("elementFromPoint"in e||(e=document),e.elementFromPoint(t.x,t.y)),aa=(e,t)=>{let i=dd(t),a=wd(i,{x:e.pageX-window.pageXOffset,y:e.pageY-window.pageYOffset});return a===t||t.contains(a)},Kn=null,ii=(e,t)=>{try{e.dropEffect=t}catch{}},Ld=(e,t)=>i=>{i.preventDefault(),Kn=i.target,t.forEach(a=>{let{element:n,onenter:l}=a;aa(i,n)&&(a.state="enter",l(et(i)))})},Md=(e,t)=>i=>{i.preventDefault();let a=i.dataTransfer;ta(a).then(n=>{let l=!1;t.some(o=>{let{filterElement:r,element:s,onenter:p,onexit:c,ondrag:d,allowdrop:m}=o;ii(a,"copy");let u=m(n);if(!u){ii(a,"none");return}if(aa(i,s)){if(l=!0,o.state===null){o.state="enter",p(et(i));return}if(o.state="over",r&&!u){ii(a,"none");return}d(et(i))}else r&&!l&&ii(a,"none"),o.state&&(o.state=null,c(et(i)))})})},Ad=(e,t)=>i=>{i.preventDefault();let a=i.dataTransfer;ta(a).then(n=>{t.forEach(l=>{let{filterElement:o,element:r,ondrop:s,onexit:p,allowdrop:c}=l;if(l.state=null,!(o&&!aa(i,r))){if(!c(n))return p(et(i));s(et(i),n)}})})},Pd=(e,t)=>i=>{Kn===i.target&&t.forEach(a=>{let{onexit:n}=a;a.state=null,n(et(i))})},zd=(e,t,i)=>{e.classList.add("filepond--hopper");let{catchesDropsOnPage:a,requiresDropOnElement:n,filterItems:l=c=>c}=i,o=Rd(e,a?document.documentElement:e,n),r="",s="";o.allowdrop=c=>t(l(c)),o.ondrop=(c,d)=>{let m=l(d);if(!t(m)){p.ondragend(c);return}s="drag-drop",p.onload(m,c)},o.ondrag=c=>{p.ondrag(c)},o.onenter=c=>{s="drag-over",p.ondragstart(c)},o.onexit=c=>{s="drag-exit",p.ondragend(c)};let p={updateHopperState:()=>{r!==s&&(e.dataset.hopperState=s,r=s)},onload:()=>{},ondragstart:()=>{},ondrag:()=>{},ondragend:()=>{},destroy:()=>{o.destroy()}};return p},Vi=!1,ut=[],Qn=e=>{let t=document.activeElement;if(t&&(/textarea|input/i.test(t.nodeName)||t.getAttribute("contenteditable")==="true")){let a=!1,n=t;for(;n!==document.body;){if(n.classList.contains("filepond--root")){a=!0;break}n=n.parentNode}if(!a)return}ta(e.clipboardData).then(a=>{a.length&&ut.forEach(n=>n(a))})},Od=e=>{ut.includes(e)||(ut.push(e),!Vi&&(Vi=!0,document.addEventListener("paste",Qn)))},Fd=e=>{$i(ut,ut.indexOf(e)),ut.length===0&&(document.removeEventListener("paste",Qn),Vi=!1)},Dd=()=>{let e=i=>{t.onload(i)},t={destroy:()=>{Fd(e)},onload:()=>{}};return Od(e),t},Cd=({root:e,props:t})=>{e.element.id=`filepond--assistant-${t.id}`,ce(e.element,"role","alert"),ce(e.element,"aria-live","polite"),ce(e.element,"aria-relevant","additions")},dn=null,pn=null,zi=[],fi=(e,t)=>{e.element.textContent=t},Bd=e=>{e.element.textContent=""},Zn=(e,t,i)=>{let a=e.query("GET_TOTAL_ITEMS");fi(e,`${i} ${t}, ${a} ${a===1?e.query("GET_LABEL_FILE_COUNT_SINGULAR"):e.query("GET_LABEL_FILE_COUNT_PLURAL")}`),clearTimeout(pn),pn=setTimeout(()=>{Bd(e)},1500)},Jn=e=>e.element.parentNode.contains(document.activeElement),Nd=({root:e,action:t})=>{if(!Jn(e))return;e.element.textContent="";let i=e.query("GET_ITEM",t.id);zi.push(i.filename),clearTimeout(dn),dn=setTimeout(()=>{Zn(e,zi.join(", "),e.query("GET_LABEL_FILE_ADDED")),zi.length=0},750)},kd=({root:e,action:t})=>{if(!Jn(e))return;let i=t.item;Zn(e,i.filename,e.query("GET_LABEL_FILE_REMOVED"))},Vd=({root:e,action:t})=>{let a=e.query("GET_ITEM",t.id).filename,n=e.query("GET_LABEL_FILE_PROCESSING_COMPLETE");fi(e,`${a} ${n}`)},mn=({root:e,action:t})=>{let a=e.query("GET_ITEM",t.id).filename,n=e.query("GET_LABEL_FILE_PROCESSING_ABORTED");fi(e,`${a} ${n}`)},ai=({root:e,action:t})=>{let a=e.query("GET_ITEM",t.id).filename;fi(e,`${t.status.main} ${a} ${t.status.sub}`)},Gd=ne({create:Cd,ignoreRect:!0,ignoreRectUpdate:!0,write:fe({DID_LOAD_ITEM:Nd,DID_REMOVE_ITEM:kd,DID_COMPLETE_ITEM_PROCESSING:Vd,DID_ABORT_ITEM_PROCESSING:mn,DID_REVERT_ITEM_PROCESSING:mn,DID_THROW_ITEM_REMOVE_ERROR:ai,DID_THROW_ITEM_LOAD_ERROR:ai,DID_THROW_ITEM_INVALID:ai,DID_THROW_ITEM_PROCESSING_ERROR:ai}),tag:"span",name:"assistant"}),el=(e,t="-")=>e.replace(new RegExp(`${t}.`,"g"),i=>i.charAt(1).toUpperCase()),tl=(e,t=16,i=!0)=>{let a=Date.now(),n=null;return(...l)=>{clearTimeout(n);let o=Date.now()-a,r=()=>{a=Date.now(),e(...l)};oe.preventDefault(),Wd=({root:e,props:t})=>{let i=e.query("GET_ID");i&&(e.element.id=i);let a=e.query("GET_CLASS_NAME");a&&a.split(" ").filter(s=>s.length).forEach(s=>{e.element.classList.add(s)}),e.ref.label=e.appendChildView(e.createChildView(Yc,{...t,translateY:null,caption:e.query("GET_LABEL_IDLE")})),e.ref.list=e.appendChildView(e.createChildView(Vc,{translateY:null})),e.ref.panel=e.appendChildView(e.createChildView(Vn,{name:"panel-root"})),e.ref.assistant=e.appendChildView(e.createChildView(Gd,{...t})),e.ref.data=e.appendChildView(e.createChildView(cd,{...t})),e.ref.measure=Ve("div"),e.ref.measure.style.height="100%",e.element.appendChild(e.ref.measure),e.ref.bounds=null,e.query("GET_STYLES").filter(s=>!ke(s.value)).map(({name:s,value:p})=>{e.element.dataset[s]=p}),e.ref.widthPrevious=null,e.ref.widthUpdated=tl(()=>{e.ref.updateHistory=[],e.dispatch("DID_RESIZE_ROOT")},250),e.ref.previousAspectRatio=null,e.ref.updateHistory=[];let n=window.matchMedia("(pointer: fine) and (hover: hover)").matches,l="PointerEvent"in window;e.query("GET_ALLOW_REORDER")&&l&&!n&&(e.element.addEventListener("touchmove",si,{passive:!1}),e.element.addEventListener("gesturestart",si));let o=e.query("GET_CREDITS");if(o.length===2){let s=document.createElement("a");s.className="filepond--credits",s.href=o[0],s.tabIndex=-1,s.target="_blank",s.rel="noopener noreferrer nofollow",s.textContent=o[1],e.element.appendChild(s),e.ref.credits=s}},Hd=({root:e,props:t,actions:i})=>{if(Xd({root:e,props:t,actions:i}),i.filter(E=>/^DID_SET_STYLE_/.test(E.type)).filter(E=>!ke(E.data.value)).map(({type:E,data:_})=>{let x=el(E.substring(8).toLowerCase(),"_");e.element.dataset[x]=_.value,e.invalidateLayout()}),e.rect.element.hidden)return;e.rect.element.width!==e.ref.widthPrevious&&(e.ref.widthPrevious=e.rect.element.width,e.ref.widthUpdated());let a=e.ref.bounds;a||(a=e.ref.bounds=qd(e),e.element.removeChild(e.ref.measure),e.ref.measure=null);let{hopper:n,label:l,list:o,panel:r}=e.ref;n&&n.updateHopperState();let s=e.query("GET_PANEL_ASPECT_RATIO"),p=e.query("GET_ALLOW_MULTIPLE"),c=e.query("GET_TOTAL_ITEMS"),d=p?e.query("GET_MAX_FILES")||Ud:1,m=c===d,u=i.find(E=>E.type==="DID_ADD_ITEM");if(m&&u){let E=u.data.interactionMethod;l.opacity=0,p?l.translateY=-40:E===Re.API?l.translateX=40:E===Re.BROWSE?l.translateY=40:l.translateY=30}else m||(l.opacity=1,l.translateX=0,l.translateY=0);let g=jd(e),f=Yd(e),h=l.rect.element.height,I=!p||m?0:h,b=m?o.rect.element.marginTop:0,T=c===0?0:o.rect.element.marginBottom,v=I+b+f.visual+T,y=I+b+f.bounds+T;if(o.translateY=Math.max(0,I-o.rect.element.marginTop)-g.top,s){let E=e.rect.element.width,_=E*s;s!==e.ref.previousAspectRatio&&(e.ref.previousAspectRatio=s,e.ref.updateHistory=[]);let x=e.ref.updateHistory;x.push(E);let R=2;if(x.length>R*2){let P=x.length,A=P-10,B=0;for(let w=P;w>=A;w--)if(x[w]===x[w-2]&&B++,B>=R)return}r.scalable=!1,r.height=_;let z=_-I-(T-g.bottom)-(m?b:0);f.visual>z?o.overflow=z:o.overflow=null,e.height=_}else if(a.fixedHeight){r.scalable=!1;let E=a.fixedHeight-I-(T-g.bottom)-(m?b:0);f.visual>E?o.overflow=E:o.overflow=null}else if(a.cappedHeight){let E=v>=a.cappedHeight,_=Math.min(a.cappedHeight,v);r.scalable=!0,r.height=E?_:_-g.top-g.bottom;let x=_-I-(T-g.bottom)-(m?b:0);v>a.cappedHeight&&f.visual>x?o.overflow=x:o.overflow=null,e.height=Math.min(a.cappedHeight,y-g.top-g.bottom)}else{let E=c>0?g.top+g.bottom:0;r.scalable=!0,r.height=Math.max(h,v-E),e.height=Math.max(h,y-E)}e.ref.credits&&r.heightCurrent&&(e.ref.credits.style.transform=`translateY(${r.heightCurrent}px)`)},jd=e=>{let t=e.ref.list.childViews[0].childViews[0];return t?{top:t.rect.element.marginTop,bottom:t.rect.element.marginBottom}:{top:0,bottom:0}},Yd=e=>{let t=0,i=0,a=e.ref.list,n=a.childViews[0],l=n.childViews.filter(b=>b.rect.element.height),o=e.query("GET_ACTIVE_ITEMS").map(b=>l.find(T=>T.id===b.id)).filter(b=>b);if(o.length===0)return{visual:t,bounds:i};let r=n.rect.element.width,s=Ji(n,o,a.dragCoordinates),p=o[0].rect.element,c=p.marginTop+p.marginBottom,d=p.marginLeft+p.marginRight,m=p.width+d,u=p.height+c,g=typeof s<"u"&&s>=0?1:0,f=o.find(b=>b.markedForRemoval&&b.opacity<.45)?-1:0,h=o.length+g+f,I=Zi(r,m);return I===1?o.forEach(b=>{let T=b.rect.element.height+c;i+=T,t+=T*b.opacity}):(i=Math.ceil(h/I)*u,t=i),{visual:t,bounds:i}},qd=e=>{let t=e.ref.measureHeight||null;return{cappedHeight:parseInt(e.style.maxHeight,10)||null,fixedHeight:t===0?null:t}},na=(e,t)=>{let i=e.query("GET_ALLOW_REPLACE"),a=e.query("GET_ALLOW_MULTIPLE"),n=e.query("GET_TOTAL_ITEMS"),l=e.query("GET_MAX_FILES"),o=t.length;return!a&&o>1?(e.dispatch("DID_THROW_MAX_FILES",{source:t,error:ie("warning",0,"Max files")}),!0):(l=a?l:1,!a&&i?!1:bt(l)&&n+o>l?(e.dispatch("DID_THROW_MAX_FILES",{source:t,error:ie("warning",0,"Max files")}),!0):!1)},$d=(e,t,i)=>{let a=e.childViews[0];return Ji(a,t,{left:i.scopeLeft-a.rect.element.left,top:i.scopeTop-(e.rect.outer.top+e.rect.element.marginTop+e.rect.element.scrollTop)})},un=e=>{let t=e.query("GET_ALLOW_DROP"),i=e.query("GET_DISABLED"),a=t&&!i;if(a&&!e.ref.hopper){let n=zd(e.element,l=>{let o=e.query("GET_BEFORE_DROP_FILE")||(()=>!0);return e.query("GET_DROP_VALIDATION")?l.every(s=>tt("ALLOW_HOPPER_ITEM",s,{query:e.query}).every(p=>p===!0)&&o(s)):!0},{filterItems:l=>{let o=e.query("GET_IGNORED_FILES");return l.filter(r=>Je(r)?!o.includes(r.name.toLowerCase()):!0)},catchesDropsOnPage:e.query("GET_DROP_ON_PAGE"),requiresDropOnElement:e.query("GET_DROP_ON_ELEMENT")});n.onload=(l,o)=>{let s=e.ref.list.childViews[0].childViews.filter(c=>c.rect.element.height),p=e.query("GET_ACTIVE_ITEMS").map(c=>s.find(d=>d.id===c.id)).filter(c=>c);Ae("ADD_ITEMS",l,{dispatch:e.dispatch}).then(c=>{if(na(e,c))return!1;e.dispatch("ADD_ITEMS",{items:c,index:$d(e.ref.list,p,o),interactionMethod:Re.DROP})}),e.dispatch("DID_DROP",{position:o}),e.dispatch("DID_END_DRAG",{position:o})},n.ondragstart=l=>{e.dispatch("DID_START_DRAG",{position:l})},n.ondrag=tl(l=>{e.dispatch("DID_DRAG",{position:l})}),n.ondragend=l=>{e.dispatch("DID_END_DRAG",{position:l})},e.ref.hopper=n,e.ref.drip=e.appendChildView(e.createChildView(ed))}else!a&&e.ref.hopper&&(e.ref.hopper.destroy(),e.ref.hopper=null,e.removeChildView(e.ref.drip))},gn=(e,t)=>{let i=e.query("GET_ALLOW_BROWSE"),a=e.query("GET_DISABLED"),n=i&&!a;n&&!e.ref.browser?e.ref.browser=e.appendChildView(e.createChildView(Hc,{...t,onload:l=>{Ae("ADD_ITEMS",l,{dispatch:e.dispatch}).then(o=>{if(na(e,o))return!1;e.dispatch("ADD_ITEMS",{items:o,index:-1,interactionMethod:Re.BROWSE})})}}),0):!n&&e.ref.browser&&(e.removeChildView(e.ref.browser),e.ref.browser=null)},fn=e=>{let t=e.query("GET_ALLOW_PASTE"),i=e.query("GET_DISABLED"),a=t&&!i;a&&!e.ref.paster?(e.ref.paster=Dd(),e.ref.paster.onload=n=>{Ae("ADD_ITEMS",n,{dispatch:e.dispatch}).then(l=>{if(na(e,l))return!1;e.dispatch("ADD_ITEMS",{items:l,index:-1,interactionMethod:Re.PASTE})})}):!a&&e.ref.paster&&(e.ref.paster.destroy(),e.ref.paster=null)},Xd=fe({DID_SET_ALLOW_BROWSE:({root:e,props:t})=>{gn(e,t)},DID_SET_ALLOW_DROP:({root:e})=>{un(e)},DID_SET_ALLOW_PASTE:({root:e})=>{fn(e)},DID_SET_DISABLED:({root:e,props:t})=>{un(e),fn(e),gn(e,t),e.query("GET_DISABLED")?e.element.dataset.disabled="disabled":e.element.removeAttribute("data-disabled")}}),Kd=ne({name:"root",read:({root:e})=>{e.ref.measure&&(e.ref.measureHeight=e.ref.measure.offsetHeight)},create:Wd,write:Hd,destroy:({root:e})=>{e.ref.paster&&e.ref.paster.destroy(),e.ref.hopper&&e.ref.hopper.destroy(),e.element.removeEventListener("touchmove",si),e.element.removeEventListener("gesturestart",si)},mixins:{styles:["height"]}}),Qd=(e={})=>{let t=null,i=oi(),a=gr(Jr(i),[bs,is(i)],[Us,ts(i)]);a.dispatch("SET_OPTIONS",{options:e});let n=()=>{document.hidden||a.dispatch("KICK")};document.addEventListener("visibilitychange",n);let l=null,o=!1,r=!1,s=null,p=null,c=()=>{o||(o=!0),clearTimeout(l),l=setTimeout(()=>{o=!1,s=null,p=null,r&&(r=!1,a.dispatch("DID_STOP_RESIZE"))},500)};window.addEventListener("resize",c);let d=Kd(a,{id:qi()}),m=!1,u=!1,g={_read:()=>{o&&(p=window.innerWidth,s||(s=p),!r&&p!==s&&(a.dispatch("DID_START_RESIZE"),r=!0)),u&&m&&(m=d.element.offsetParent===null),!m&&(d._read(),u=d.rect.element.hidden)},_write:S=>{let L=a.processActionQueue().filter(D=>!/^SET_/.test(D.type));m&&!L.length||(b(L),m=d._write(S,L,r),ls(a.query("GET_ITEMS")),m&&a.processDispatchQueue())}},f=S=>L=>{let D={type:S};if(!L)return D;if(L.hasOwnProperty("error")&&(D.error=L.error?{...L.error}:null),L.status&&(D.status={...L.status}),L.file&&(D.output=L.file),L.source)D.file=L.source;else if(L.item||L.id){let F=L.item?L.item:a.query("GET_ITEM",L.id);D.file=F?he(F):null}return L.items&&(D.items=L.items.map(he)),/progress/.test(S)&&(D.progress=L.progress),L.hasOwnProperty("origin")&&L.hasOwnProperty("target")&&(D.origin=L.origin,D.target=L.target),D},h={DID_DESTROY:f("destroy"),DID_INIT:f("init"),DID_THROW_MAX_FILES:f("warning"),DID_INIT_ITEM:f("initfile"),DID_START_ITEM_LOAD:f("addfilestart"),DID_UPDATE_ITEM_LOAD_PROGRESS:f("addfileprogress"),DID_LOAD_ITEM:f("addfile"),DID_THROW_ITEM_INVALID:[f("error"),f("addfile")],DID_THROW_ITEM_LOAD_ERROR:[f("error"),f("addfile")],DID_THROW_ITEM_REMOVE_ERROR:[f("error"),f("removefile")],DID_PREPARE_OUTPUT:f("preparefile"),DID_START_ITEM_PROCESSING:f("processfilestart"),DID_UPDATE_ITEM_PROCESS_PROGRESS:f("processfileprogress"),DID_ABORT_ITEM_PROCESSING:f("processfileabort"),DID_COMPLETE_ITEM_PROCESSING:f("processfile"),DID_COMPLETE_ITEM_PROCESSING_ALL:f("processfiles"),DID_REVERT_ITEM_PROCESSING:f("processfilerevert"),DID_THROW_ITEM_PROCESSING_ERROR:[f("error"),f("processfile")],DID_REMOVE_ITEM:f("removefile"),DID_UPDATE_ITEMS:f("updatefiles"),DID_ACTIVATE_ITEM:f("activatefile"),DID_REORDER_ITEMS:f("reorderfiles")},I=S=>{let L={pond:O,...S};delete L.type,d.element.dispatchEvent(new CustomEvent(`FilePond:${S.type}`,{detail:L,bubbles:!0,cancelable:!0,composed:!0}));let D=[];S.hasOwnProperty("error")&&D.push(S.error),S.hasOwnProperty("file")&&D.push(S.file);let F=["type","error","file"];Object.keys(S).filter(C=>!F.includes(C)).forEach(C=>D.push(S[C])),O.fire(S.type,...D);let G=a.query(`GET_ON${S.type.toUpperCase()}`);G&&G(...D)},b=S=>{S.length&&S.filter(L=>h[L.type]).forEach(L=>{let D=h[L.type];(Array.isArray(D)?D:[D]).forEach(F=>{L.type==="DID_INIT_ITEM"?I(F(L.data)):setTimeout(()=>{I(F(L.data))},0)})})},T=S=>a.dispatch("SET_OPTIONS",{options:S}),v=S=>a.query("GET_ACTIVE_ITEM",S),y=S=>new Promise((L,D)=>{a.dispatch("REQUEST_ITEM_PREPARE",{query:S,success:F=>{L(F)},failure:F=>{D(F)}})}),E=(S,L={})=>new Promise((D,F)=>{R([{source:S,options:L}],{index:L.index}).then(G=>D(G&&G[0])).catch(F)}),_=S=>S.file&&S.id,x=(S,L)=>(typeof S=="object"&&!_(S)&&!L&&(L=S,S=void 0),a.dispatch("REMOVE_ITEM",{...L,query:S}),a.query("GET_ACTIVE_ITEM",S)===null),R=(...S)=>new Promise((L,D)=>{let F=[],G={};if(ci(S[0]))F.push.apply(F,S[0]),Object.assign(G,S[1]||{});else{let C=S[S.length-1];typeof C=="object"&&!(C instanceof Blob)&&Object.assign(G,S.pop()),F.push(...S)}a.dispatch("ADD_ITEMS",{items:F,index:G.index,interactionMethod:Re.API,success:L,failure:D})}),z=()=>a.query("GET_ACTIVE_ITEMS"),P=S=>new Promise((L,D)=>{a.dispatch("REQUEST_ITEM_PROCESSING",{query:S,success:F=>{L(F)},failure:F=>{D(F)}})}),A=(...S)=>{let L=Array.isArray(S[0])?S[0]:S,D=L.length?L:z();return Promise.all(D.map(y))},B=(...S)=>{let L=Array.isArray(S[0])?S[0]:S;if(!L.length){let D=z().filter(F=>!(F.status===U.IDLE&&F.origin===se.LOCAL)&&F.status!==U.PROCESSING&&F.status!==U.PROCESSING_COMPLETE&&F.status!==U.PROCESSING_REVERT_ERROR);return Promise.all(D.map(P))}return Promise.all(L.map(P))},w=(...S)=>{let L=Array.isArray(S[0])?S[0]:S,D;typeof L[L.length-1]=="object"?D=L.pop():Array.isArray(S[0])&&(D=S[1]);let F=z();return L.length?L.map(C=>$e(C)?F[C]?F[C].id:null:C).filter(C=>C).map(C=>x(C,D)):Promise.all(F.map(C=>x(C,D)))},O={...mi(),...g,...es(a,i),setOptions:T,addFile:E,addFiles:R,getFile:v,processFile:P,prepareFile:y,removeFile:x,moveFile:(S,L)=>a.dispatch("MOVE_ITEM",{query:S,index:L}),getFiles:z,processFiles:B,removeFiles:w,prepareFiles:A,sort:S=>a.dispatch("SORT",{compare:S}),browse:()=>{var S=d.element.querySelector("input[type=file]");S&&S.click()},destroy:()=>{O.fire("destroy",d.element),a.dispatch("ABORT_ALL"),d._destroy(),window.removeEventListener("resize",c),document.removeEventListener("visibilitychange",n),a.dispatch("DID_DESTROY")},insertBefore:S=>Ba(d.element,S),insertAfter:S=>Na(d.element,S),appendTo:S=>S.appendChild(d.element),replaceElement:S=>{Ba(d.element,S),S.parentNode.removeChild(S),t=S},restoreElement:()=>{t&&(Na(t,d.element),d.element.parentNode.removeChild(d.element),t=null)},isAttachedTo:S=>d.element===S||t===S,element:{get:()=>d.element},status:{get:()=>a.query("GET_STATUS")}};return a.dispatch("DID_INIT"),We(O)},il=(e={})=>{let t={};return te(oi(),(a,n)=>{t[a]=n[0]}),Qd({...t,...e})},Zd=e=>e.charAt(0).toLowerCase()+e.slice(1),Jd=e=>el(e.replace(/^data-/,"")),al=(e,t)=>{te(t,(i,a)=>{te(e,(n,l)=>{let o=new RegExp(i);if(!o.test(n)||(delete e[n],a===!1))return;if(ge(a)){e[a]=l;return}let s=a.group;de(a)&&!e[s]&&(e[s]={}),e[s][Zd(n.replace(o,""))]=l}),a.mapping&&al(e[a.group],a.mapping)})},ep=(e,t={})=>{let i=[];te(e.attributes,n=>{i.push(e.attributes[n])});let a=i.filter(n=>n.name).reduce((n,l)=>{let o=ce(e,l.name);return n[Jd(l.name)]=o===l.name?!0:o,n},{});return al(a,t),a},tp=(e,t={})=>{let i={"^class$":"className","^multiple$":"allowMultiple","^capture$":"captureMethod","^webkitdirectory$":"allowDirectoriesOnly","^server":{group:"server",mapping:{"^process":{group:"process"},"^revert":{group:"revert"},"^fetch":{group:"fetch"},"^restore":{group:"restore"},"^load":{group:"load"}}},"^type$":!1,"^files$":!1};tt("SET_ATTRIBUTE_TO_OPTION_MAP",i);let a={...t},n=ep(e.nodeName==="FIELDSET"?e.querySelector("input[type=file]"):e,i);Object.keys(n).forEach(o=>{de(n[o])?(de(a[o])||(a[o]={}),Object.assign(a[o],n[o])):a[o]=n[o]}),a.files=(t.files||[]).concat(Array.from(e.querySelectorAll("input:not([type=file])")).map(o=>({source:o.value,options:{type:o.dataset.type}})));let l=il(a);return e.files&&Array.from(e.files).forEach(o=>{l.addFile(o)}),l.replaceElement(e),l},ip=(...e)=>ur(e[0])?tp(...e):il(...e),ap=["fire","_read","_write"],hn=e=>{let t={};return Rn(e,t,ap),t},np=(e,t)=>e.replace(/(?:{([a-zA-Z]+)})/g,(i,a)=>t[a]),lp=e=>{let t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),i=URL.createObjectURL(t),a=new Worker(i);return{transfer:(n,l)=>{},post:(n,l,o)=>{let r=qi();a.onmessage=s=>{s.data.id===r&&l(s.data.message)},a.postMessage({id:r,message:n},o)},terminate:()=>{a.terminate(),URL.revokeObjectURL(i)}}},op=e=>new Promise((t,i)=>{let a=new Image;a.onload=()=>{t(a)},a.onerror=n=>{i(n)},a.src=e}),nl=(e,t)=>{let i=e.slice(0,e.size,e.type);return i.lastModifiedDate=e.lastModifiedDate,i.name=t,i},rp=e=>nl(e,e.name),bn=[],sp=e=>{if(bn.includes(e))return;bn.push(e);let t=e({addFilter:rs,utils:{Type:M,forin:te,isString:ge,isFile:Je,toNaturalFileSize:Bn,replaceInString:np,getExtensionFromFilename:ui,getFilenameWithoutExtension:Fn,guesstimateMimeType:$n,getFileFromBlob:ht,getFilenameFromURL:Dt,createRoute:fe,createWorker:lp,createView:ne,createItemAPI:he,loadImage:op,copyFile:rp,renameFile:nl,createBlob:Pn,applyFilterChain:Ae,text:ae,getNumericAspectRatioFromString:wn},views:{fileActionButton:Cn}});ss(t.options)},cp=()=>Object.prototype.toString.call(window.operamini)==="[object OperaMini]",dp=()=>"Promise"in window,pp=()=>"slice"in Blob.prototype,mp=()=>"URL"in window&&"createObjectURL"in window.URL,up=()=>"visibilityState"in document,gp=()=>"performance"in window,fp=()=>"supports"in(window.CSS||{}),hp=()=>/MSIE|Trident/.test(window.navigator.userAgent),Gi=(()=>{let e=En()&&!cp()&&up()&&dp()&&pp()&&mp()&&gp()&&(fp()||hp());return()=>e})(),Ue={apps:[]},bp="filepond",it=()=>{},ll={},Et={},Ct={},Ui={},gt=it,ft=it,Wi=it,Hi=it,ve=it,ji=it,Ft=it;if(Gi()){kr(()=>{Ue.apps.forEach(i=>i._read())},i=>{Ue.apps.forEach(a=>a._write(i))});let e=()=>{document.dispatchEvent(new CustomEvent("FilePond:loaded",{detail:{supported:Gi,create:gt,destroy:ft,parse:Wi,find:Hi,registerPlugin:ve,setOptions:Ft}})),document.removeEventListener("DOMContentLoaded",e)};document.readyState!=="loading"?setTimeout(()=>e(),0):document.addEventListener("DOMContentLoaded",e);let t=()=>te(oi(),(i,a)=>{Ui[i]=a[1]});ll={...Ln},Ct={...se},Et={...U},Ui={},t(),gt=(...i)=>{let a=ip(...i);return a.on("destroy",ft),Ue.apps.push(a),hn(a)},ft=i=>{let a=Ue.apps.findIndex(n=>n.isAttachedTo(i));return a>=0?(Ue.apps.splice(a,1)[0].restoreElement(),!0):!1},Wi=i=>Array.from(i.querySelectorAll(`.${bp}`)).filter(l=>!Ue.apps.find(o=>o.isAttachedTo(l))).map(l=>gt(l)),Hi=i=>{let a=Ue.apps.find(n=>n.isAttachedTo(i));return a?hn(a):null},ve=(...i)=>{i.forEach(sp),t()},ji=()=>{let i={};return te(oi(),(a,n)=>{i[a]=n[0]}),i},Ft=i=>(de(i)&&(Ue.apps.forEach(a=>{a.setOptions(i)}),cs(i)),ji())}function ol(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),i.push.apply(i,a)}return i}function xl(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,a=new Array(t);i
',Dp=Number.isNaN||De.isNaN;function j(e){return typeof e=="number"&&!Dp(e)}var Tl=function(t){return t>0&&t<1/0};function oa(e){return typeof e>"u"}function lt(e){return sa(e)==="object"&&e!==null}var Cp=Object.prototype.hasOwnProperty;function It(e){if(!lt(e))return!1;try{var t=e.constructor,i=t.prototype;return t&&i&&Cp.call(i,"isPrototypeOf")}catch{return!1}}function be(e){return typeof e=="function"}var Bp=Array.prototype.slice;function zl(e){return Array.from?Array.from(e):Bp.call(e)}function le(e,t){return e&&be(t)&&(Array.isArray(e)||j(e.length)?zl(e).forEach(function(i,a){t.call(e,i,a,e)}):lt(e)&&Object.keys(e).forEach(function(i){t.call(e,e[i],i,e)})),e}var J=Object.assign||function(t){for(var i=arguments.length,a=new Array(i>1?i-1:0),n=1;n0&&a.forEach(function(l){lt(l)&&Object.keys(l).forEach(function(o){t[o]=l[o]})}),t},Np=/\.\d*(?:0|9){12}\d*$/;function xt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Np.test(e)?Math.round(e*t)/t:e}var kp=/^width|height|left|top|marginLeft|marginTop$/;function je(e,t){var i=e.style;le(t,function(a,n){kp.test(n)&&j(a)&&(a="".concat(a,"px")),i[n]=a})}function Vp(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function pe(e,t){if(t){if(j(e.length)){le(e,function(a){pe(a,t)});return}if(e.classList){e.classList.add(t);return}var i=e.className.trim();i?i.indexOf(t)<0&&(e.className="".concat(i," ").concat(t)):e.className=t}}function Fe(e,t){if(t){if(j(e.length)){le(e,function(i){Fe(i,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function vt(e,t,i){if(t){if(j(e.length)){le(e,function(a){vt(a,t,i)});return}i?pe(e,t):Fe(e,t)}}var Gp=/([a-z\d])([A-Z])/g;function xa(e){return e.replace(Gp,"$1-$2").toLowerCase()}function ba(e,t){return lt(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(xa(t)))}function Wt(e,t,i){lt(i)?e[t]=i:e.dataset?e.dataset[t]=i:e.setAttribute("data-".concat(xa(t)),i)}function Up(e,t){if(lt(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute("data-".concat(xa(t)))}var Ol=/\s\s*/,Fl=function(){var e=!1;if(Ti){var t=!1,i=function(){},a=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(l){t=l}});De.addEventListener("test",i,a),De.removeEventListener("test",i,a)}return e}();function Oe(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i;t.trim().split(Ol).forEach(function(l){if(!Fl){var o=e.listeners;o&&o[l]&&o[l][i]&&(n=o[l][i],delete o[l][i],Object.keys(o[l]).length===0&&delete o[l],Object.keys(o).length===0&&delete e.listeners)}e.removeEventListener(l,n,a)})}function Se(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i;t.trim().split(Ol).forEach(function(l){if(a.once&&!Fl){var o=e.listeners,r=o===void 0?{}:o;n=function(){delete r[l][i],e.removeEventListener(l,n,a);for(var p=arguments.length,c=new Array(p),d=0;dMath.abs(i)&&(i=m)})}),i}function bi(e,t){var i=e.pageX,a=e.pageY,n={endX:i,endY:a};return t?n:xl({startX:i,startY:a},n)}function jp(e){var t=0,i=0,a=0;return le(e,function(n){var l=n.startX,o=n.startY;t+=l,i+=o,a+=1}),t/=a,i/=a,{pageX:t,pageY:i}}function Ye(e){var t=e.aspectRatio,i=e.height,a=e.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",l=Tl(a),o=Tl(i);if(l&&o){var r=i*t;n==="contain"&&r>a||n==="cover"&&r90?{width:s,height:r}:{width:r,height:s}}function qp(e,t,i,a){var n=t.aspectRatio,l=t.naturalWidth,o=t.naturalHeight,r=t.rotate,s=r===void 0?0:r,p=t.scaleX,c=p===void 0?1:p,d=t.scaleY,m=d===void 0?1:d,u=i.aspectRatio,g=i.naturalWidth,f=i.naturalHeight,h=a.fillColor,I=h===void 0?"transparent":h,b=a.imageSmoothingEnabled,T=b===void 0?!0:b,v=a.imageSmoothingQuality,y=v===void 0?"low":v,E=a.maxWidth,_=E===void 0?1/0:E,x=a.maxHeight,R=x===void 0?1/0:x,z=a.minWidth,P=z===void 0?0:z,A=a.minHeight,B=A===void 0?0:A,w=document.createElement("canvas"),O=w.getContext("2d"),S=Ye({aspectRatio:u,width:_,height:R}),L=Ye({aspectRatio:u,width:P,height:B},"cover"),D=Math.min(S.width,Math.max(L.width,g)),F=Math.min(S.height,Math.max(L.height,f)),G=Ye({aspectRatio:n,width:_,height:R}),C=Ye({aspectRatio:n,width:P,height:B},"cover"),q=Math.min(G.width,Math.max(C.width,l)),X=Math.min(G.height,Math.max(C.height,o)),K=[-q/2,-X/2,q,X];return w.width=xt(D),w.height=xt(F),O.fillStyle=I,O.fillRect(0,0,D,F),O.save(),O.translate(D/2,F/2),O.rotate(s*Math.PI/180),O.scale(c,m),O.imageSmoothingEnabled=T,O.imageSmoothingQuality=y,O.drawImage.apply(O,[e].concat(Rl(K.map(function(oe){return Math.floor(xt(oe))})))),O.restore(),w}var Cl=String.fromCharCode;function $p(e,t,i){var a="";i+=t;for(var n=t;n0;)i.push(Cl.apply(null,zl(n.subarray(0,a)))),n=n.subarray(a);return"data:".concat(t,";base64,").concat(btoa(i.join("")))}function Zp(e){var t=new DataView(e),i;try{var a,n,l;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var o=t.byteLength,r=2;r+1=8&&(l=p+d)}}}if(l){var m=t.getUint16(l,a),u,g;for(g=0;g=0?l:Al),height:Math.max(a.offsetHeight,o>=0?o:Pl)};this.containerData=r,je(n,{width:r.width,height:r.height}),pe(t,Ee),Fe(n,Ee)},initCanvas:function(){var t=this.containerData,i=this.imageData,a=this.options.viewMode,n=Math.abs(i.rotate)%180===90,l=n?i.naturalHeight:i.naturalWidth,o=n?i.naturalWidth:i.naturalHeight,r=l/o,s=t.width,p=t.height;t.height*r>t.width?a===3?s=t.height*r:p=t.width/r:a===3?p=t.width/r:s=t.height*r;var c={aspectRatio:r,naturalWidth:l,naturalHeight:o,width:s,height:p};this.canvasData=c,this.limited=a===1||a===2,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=J({},c)},limitCanvas:function(t,i){var a=this.options,n=this.containerData,l=this.canvasData,o=this.cropBoxData,r=a.viewMode,s=l.aspectRatio,p=this.cropped&&o;if(t){var c=Number(a.minCanvasWidth)||0,d=Number(a.minCanvasHeight)||0;r>1?(c=Math.max(c,n.width),d=Math.max(d,n.height),r===3&&(d*s>c?c=d*s:d=c/s)):r>0&&(c?c=Math.max(c,p?o.width:0):d?d=Math.max(d,p?o.height:0):p&&(c=o.width,d=o.height,d*s>c?c=d*s:d=c/s));var m=Ye({aspectRatio:s,width:c,height:d});c=m.width,d=m.height,l.minWidth=c,l.minHeight=d,l.maxWidth=1/0,l.maxHeight=1/0}if(i)if(r>(p?0:1)){var u=n.width-l.width,g=n.height-l.height;l.minLeft=Math.min(0,u),l.minTop=Math.min(0,g),l.maxLeft=Math.max(0,u),l.maxTop=Math.max(0,g),p&&this.limited&&(l.minLeft=Math.min(o.left,o.left+(o.width-l.width)),l.minTop=Math.min(o.top,o.top+(o.height-l.height)),l.maxLeft=o.left,l.maxTop=o.top,r===2&&(l.width>=n.width&&(l.minLeft=Math.min(0,u),l.maxLeft=Math.max(0,u)),l.height>=n.height&&(l.minTop=Math.min(0,g),l.maxTop=Math.max(0,g))))}else l.minLeft=-l.width,l.minTop=-l.height,l.maxLeft=n.width,l.maxTop=n.height},renderCanvas:function(t,i){var a=this.canvasData,n=this.imageData;if(i){var l=Yp({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),o=l.width,r=l.height,s=a.width*(o/a.naturalWidth),p=a.height*(r/a.naturalHeight);a.left-=(s-a.width)/2,a.top-=(p-a.height)/2,a.width=s,a.height=p,a.aspectRatio=o/r,a.naturalWidth=o,a.naturalHeight=r,this.limitCanvas(!0,!1)}(a.width>a.maxWidth||a.widtha.maxHeight||a.heighti.width?l.height=l.width/a:l.width=l.height*a),this.cropBoxData=l,this.limitCropBox(!0,!0),l.width=Math.min(Math.max(l.width,l.minWidth),l.maxWidth),l.height=Math.min(Math.max(l.height,l.minHeight),l.maxHeight),l.width=Math.max(l.minWidth,l.width*n),l.height=Math.max(l.minHeight,l.height*n),l.left=i.left+(i.width-l.width)/2,l.top=i.top+(i.height-l.height)/2,l.oldLeft=l.left,l.oldTop=l.top,this.initialCropBoxData=J({},l)},limitCropBox:function(t,i){var a=this.options,n=this.containerData,l=this.canvasData,o=this.cropBoxData,r=this.limited,s=a.aspectRatio;if(t){var p=Number(a.minCropBoxWidth)||0,c=Number(a.minCropBoxHeight)||0,d=r?Math.min(n.width,l.width,l.width+l.left,n.width-l.left):n.width,m=r?Math.min(n.height,l.height,l.height+l.top,n.height-l.top):n.height;p=Math.min(p,n.width),c=Math.min(c,n.height),s&&(p&&c?c*s>p?c=p/s:p=c*s:p?c=p/s:c&&(p=c*s),m*s>d?m=d/s:d=m*s),o.minWidth=Math.min(p,d),o.minHeight=Math.min(c,m),o.maxWidth=d,o.maxHeight=m}i&&(r?(o.minLeft=Math.max(0,l.left),o.minTop=Math.max(0,l.top),o.maxLeft=Math.min(n.width,l.left+l.width)-o.width,o.maxTop=Math.min(n.height,l.top+l.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=n.width-o.width,o.maxTop=n.height-o.height))},renderCropBox:function(){var t=this.options,i=this.containerData,a=this.cropBoxData;(a.width>a.maxWidth||a.widtha.maxHeight||a.height=i.width&&a.height>=i.height?_l:Ia),je(this.cropBox,J({width:a.width,height:a.height},Gt({translateX:a.left,translateY:a.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),yt(this.element,ma,this.getData())}},tm={initPreview:function(){var t=this.element,i=this.crossOrigin,a=this.options.preview,n=i?this.crossOriginUrl:this.url,l=t.alt||"The image to preview",o=document.createElement("img");if(i&&(o.crossOrigin=i),o.src=n,o.alt=l,this.viewBox.appendChild(o),this.viewBoxImage=o,!!a){var r=a;typeof a=="string"?r=t.ownerDocument.querySelectorAll(a):a.querySelector&&(r=[a]),this.previews=r,le(r,function(s){var p=document.createElement("img");Wt(s,hi,{width:s.offsetWidth,height:s.offsetHeight,html:s.innerHTML}),i&&(p.crossOrigin=i),p.src=n,p.alt=l,p.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',s.innerHTML="",s.appendChild(p)})}},resetPreview:function(){le(this.previews,function(t){var i=ba(t,hi);je(t,{width:i.width,height:i.height}),t.innerHTML=i.html,Up(t,hi)})},preview:function(){var t=this.imageData,i=this.canvasData,a=this.cropBoxData,n=a.width,l=a.height,o=t.width,r=t.height,s=a.left-i.left-t.left,p=a.top-i.top-t.top;!this.cropped||this.disabled||(je(this.viewBoxImage,J({width:o,height:r},Gt(J({translateX:-s,translateY:-p},t)))),le(this.previews,function(c){var d=ba(c,hi),m=d.width,u=d.height,g=m,f=u,h=1;n&&(h=m/n,f=l*h),l&&f>u&&(h=u/l,g=n*h,f=u),je(c,{width:g,height:f}),je(c.getElementsByTagName("img")[0],J({width:o*h,height:r*h},Gt(J({translateX:-s*h,translateY:-p*h},t))))}))}},im={bind:function(){var t=this.element,i=this.options,a=this.cropper;be(i.cropstart)&&Se(t,fa,i.cropstart),be(i.cropmove)&&Se(t,ga,i.cropmove),be(i.cropend)&&Se(t,ua,i.cropend),be(i.crop)&&Se(t,ma,i.crop),be(i.zoom)&&Se(t,ha,i.zoom),Se(a,pl,this.onCropStart=this.cropStart.bind(this)),i.zoomable&&i.zoomOnWheel&&Se(a,hl,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),i.toggleDragModeOnDblclick&&Se(a,dl,this.onDblclick=this.dblclick.bind(this)),Se(t.ownerDocument,ml,this.onCropMove=this.cropMove.bind(this)),Se(t.ownerDocument,ul,this.onCropEnd=this.cropEnd.bind(this)),i.responsive&&Se(window,fl,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,i=this.options,a=this.cropper;be(i.cropstart)&&Oe(t,fa,i.cropstart),be(i.cropmove)&&Oe(t,ga,i.cropmove),be(i.cropend)&&Oe(t,ua,i.cropend),be(i.crop)&&Oe(t,ma,i.crop),be(i.zoom)&&Oe(t,ha,i.zoom),Oe(a,pl,this.onCropStart),i.zoomable&&i.zoomOnWheel&&Oe(a,hl,this.onWheel,{passive:!1,capture:!0}),i.toggleDragModeOnDblclick&&Oe(a,dl,this.onDblclick),Oe(t.ownerDocument,ml,this.onCropMove),Oe(t.ownerDocument,ul,this.onCropEnd),i.responsive&&Oe(window,fl,this.onResize)}},am={resize:function(){if(!this.disabled){var t=this.options,i=this.container,a=this.containerData,n=i.offsetWidth/a.width,l=i.offsetHeight/a.height,o=Math.abs(n-1)>Math.abs(l-1)?n:l;if(o!==1){var r,s;t.restore&&(r=this.getCanvasData(),s=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(le(r,function(p,c){r[c]=p*o})),this.setCropBoxData(le(s,function(p,c){s[c]=p*o})))}}},dblclick:function(){this.disabled||this.options.dragMode===Ml||this.setDragMode(Vp(this.dragBox,da)?Ll:va)},wheel:function(t){var i=this,a=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){i.wheeling=!1},50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*a,t)))},cropStart:function(t){var i=t.buttons,a=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(j(i)&&i!==1||j(a)&&a!==0||t.ctrlKey))){var n=this.options,l=this.pointers,o;t.changedTouches?le(t.changedTouches,function(r){l[r.identifier]=bi(r)}):l[t.pointerId||0]=bi(t),Object.keys(l).length>1&&n.zoomable&&n.zoomOnTouch?o=wl:o=ba(t.target,Ut),Ap.test(o)&&yt(this.element,fa,{originalEvent:t,action:o})!==!1&&(t.preventDefault(),this.action=o,this.cropping=!1,o===Sl&&(this.cropping=!0,pe(this.dragBox,Ei)))}},cropMove:function(t){var i=this.action;if(!(this.disabled||!i)){var a=this.pointers;t.preventDefault(),yt(this.element,ga,{originalEvent:t,action:i})!==!1&&(t.changedTouches?le(t.changedTouches,function(n){J(a[n.identifier]||{},bi(n,!0))}):J(a[t.pointerId||0]||{},bi(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var i=this.action,a=this.pointers;t.changedTouches?le(t.changedTouches,function(n){delete a[n.identifier]}):delete a[t.pointerId||0],i&&(t.preventDefault(),Object.keys(a).length||(this.action=""),this.cropping&&(this.cropping=!1,vt(this.dragBox,Ei,this.cropped&&this.options.modal)),yt(this.element,ua,{originalEvent:t,action:i}))}}},nm={change:function(t){var i=this.options,a=this.canvasData,n=this.containerData,l=this.cropBoxData,o=this.pointers,r=this.action,s=i.aspectRatio,p=l.left,c=l.top,d=l.width,m=l.height,u=p+d,g=c+m,f=0,h=0,I=n.width,b=n.height,T=!0,v;!s&&t.shiftKey&&(s=d&&m?d/m:1),this.limited&&(f=l.minLeft,h=l.minTop,I=f+Math.min(n.width,a.width,a.left+a.width),b=h+Math.min(n.height,a.height,a.top+a.height));var y=o[Object.keys(o)[0]],E={x:y.endX-y.startX,y:y.endY-y.startY},_=function(R){switch(R){case at:u+E.x>I&&(E.x=I-u);break;case nt:p+E.xb&&(E.y=b-g);break}};switch(r){case Ia:p+=E.x,c+=E.y;break;case at:if(E.x>=0&&(u>=I||s&&(c<=h||g>=b))){T=!1;break}_(at),d+=E.x,d<0&&(r=nt,d=-d,p-=d),s&&(m=d/s,c+=(l.height-m)/2);break;case He:if(E.y<=0&&(c<=h||s&&(p<=f||u>=I))){T=!1;break}_(He),m-=E.y,c+=E.y,m<0&&(r=Tt,m=-m,c-=m),s&&(d=m*s,p+=(l.width-d)/2);break;case nt:if(E.x<=0&&(p<=f||s&&(c<=h||g>=b))){T=!1;break}_(nt),d-=E.x,p+=E.x,d<0&&(r=at,d=-d,p-=d),s&&(m=d/s,c+=(l.height-m)/2);break;case Tt:if(E.y>=0&&(g>=b||s&&(p<=f||u>=I))){T=!1;break}_(Tt),m+=E.y,m<0&&(r=He,m=-m,c-=m),s&&(d=m*s,p+=(l.width-d)/2);break;case Bt:if(s){if(E.y<=0&&(c<=h||u>=I)){T=!1;break}_(He),m-=E.y,c+=E.y,d=m*s}else _(He),_(at),E.x>=0?uh&&(m-=E.y,c+=E.y):(m-=E.y,c+=E.y);d<0&&m<0?(r=Vt,m=-m,d=-d,c-=m,p-=d):d<0?(r=Nt,d=-d,p-=d):m<0&&(r=kt,m=-m,c-=m);break;case Nt:if(s){if(E.y<=0&&(c<=h||p<=f)){T=!1;break}_(He),m-=E.y,c+=E.y,d=m*s,p+=l.width-d}else _(He),_(nt),E.x<=0?p>f?(d-=E.x,p+=E.x):E.y<=0&&c<=h&&(T=!1):(d-=E.x,p+=E.x),E.y<=0?c>h&&(m-=E.y,c+=E.y):(m-=E.y,c+=E.y);d<0&&m<0?(r=kt,m=-m,d=-d,c-=m,p-=d):d<0?(r=Bt,d=-d,p-=d):m<0&&(r=Vt,m=-m,c-=m);break;case Vt:if(s){if(E.x<=0&&(p<=f||g>=b)){T=!1;break}_(nt),d-=E.x,p+=E.x,m=d/s}else _(Tt),_(nt),E.x<=0?p>f?(d-=E.x,p+=E.x):E.y>=0&&g>=b&&(T=!1):(d-=E.x,p+=E.x),E.y>=0?g=0&&(u>=I||g>=b)){T=!1;break}_(at),d+=E.x,m=d/s}else _(Tt),_(at),E.x>=0?u=0&&g>=b&&(T=!1):d+=E.x,E.y>=0?g0?r=E.y>0?kt:Bt:E.x<0&&(p-=d,r=E.y>0?Vt:Nt),E.y<0&&(c-=m),this.cropped||(Fe(this.cropBox,Ee),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}T&&(l.width=d,l.height=m,l.left=p,l.top=c,this.action=r,this.renderCropBox()),le(o,function(x){x.startX=x.endX,x.startY=x.endY})}},lm={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&pe(this.dragBox,Ei),Fe(this.cropBox,Ee),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=J({},this.initialImageData),this.canvasData=J({},this.initialCanvasData),this.cropBoxData=J({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(J(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Fe(this.dragBox,Ei),pe(this.cropBox,Ee)),this},replace:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),i?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,le(this.previews,function(a){a.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Fe(this.cropper,sl)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,pe(this.cropper,sl)),this},destroy:function(){var t=this.element;return t[Z]?(t[Z]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,a=this.canvasData,n=a.left,l=a.top;return this.moveTo(oa(t)?t:n+Number(t),oa(i)?i:l+Number(i))},moveTo:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,a=this.canvasData,n=!1;return t=Number(t),i=Number(i),this.ready&&!this.disabled&&this.options.movable&&(j(t)&&(a.left=t,n=!0),j(i)&&(a.top=i,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,i){var a=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(a.width*t/a.naturalWidth,null,i)},zoomTo:function(t,i,a){var n=this.options,l=this.canvasData,o=l.width,r=l.height,s=l.naturalWidth,p=l.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&n.zoomable){var c=s*t,d=p*t;if(yt(this.element,ha,{ratio:t,oldRatio:o/s,originalEvent:a})===!1)return this;if(a){var m=this.pointers,u=Dl(this.cropper),g=m&&Object.keys(m).length?jp(m):{pageX:a.pageX,pageY:a.pageY};l.left-=(c-o)*((g.pageX-u.left-l.left)/o),l.top-=(d-r)*((g.pageY-u.top-l.top)/r)}else It(i)&&j(i.x)&&j(i.y)?(l.left-=(c-o)*((i.x-l.left)/o),l.top-=(d-r)*((i.y-l.top)/r)):(l.left-=(c-o)/2,l.top-=(d-r)/2);l.width=c,l.height=d,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),j(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var i=this.imageData.scaleY;return this.scale(t,j(i)?i:1)},scaleY:function(t){var i=this.imageData.scaleX;return this.scale(j(i)?i:1,t)},scale:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,a=this.imageData,n=!1;return t=Number(t),i=Number(i),this.ready&&!this.disabled&&this.options.scalable&&(j(t)&&(a.scaleX=t,n=!0),j(i)&&(a.scaleY=i,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=this.options,a=this.imageData,n=this.canvasData,l=this.cropBoxData,o;if(this.ready&&this.cropped){o={x:l.left-n.left,y:l.top-n.top,width:l.width,height:l.height};var r=a.width/a.naturalWidth;if(le(o,function(c,d){o[d]=c/r}),t){var s=Math.round(o.y+o.height),p=Math.round(o.x+o.width);o.x=Math.round(o.x),o.y=Math.round(o.y),o.width=p-o.x,o.height=s-o.y}}else o={x:0,y:0,width:0,height:0};return i.rotatable&&(o.rotate=a.rotate||0),i.scalable&&(o.scaleX=a.scaleX||1,o.scaleY=a.scaleY||1),o},setData:function(t){var i=this.options,a=this.imageData,n=this.canvasData,l={};if(this.ready&&!this.disabled&&It(t)){var o=!1;i.rotatable&&j(t.rotate)&&t.rotate!==a.rotate&&(a.rotate=t.rotate,o=!0),i.scalable&&(j(t.scaleX)&&t.scaleX!==a.scaleX&&(a.scaleX=t.scaleX,o=!0),j(t.scaleY)&&t.scaleY!==a.scaleY&&(a.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=a.width/a.naturalWidth;j(t.x)&&(l.left=t.x*r+n.left),j(t.y)&&(l.top=t.y*r+n.top),j(t.width)&&(l.width=t.width*r),j(t.height)&&(l.height=t.height*r),this.setCropBoxData(l)}return this},getContainerData:function(){return this.ready?J({},this.containerData):{}},getImageData:function(){return this.sized?J({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,i={};return this.ready&&le(["left","top","width","height","naturalWidth","naturalHeight"],function(a){i[a]=t[a]}),i},setCanvasData:function(t){var i=this.canvasData,a=i.aspectRatio;return this.ready&&!this.disabled&&It(t)&&(j(t.left)&&(i.left=t.left),j(t.top)&&(i.top=t.top),j(t.width)?(i.width=t.width,i.height=t.width/a):j(t.height)&&(i.height=t.height,i.width=t.height*a),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,i;return this.ready&&this.cropped&&(i={left:t.left,top:t.top,width:t.width,height:t.height}),i||{}},setCropBoxData:function(t){var i=this.cropBoxData,a=this.options.aspectRatio,n,l;return this.ready&&this.cropped&&!this.disabled&&It(t)&&(j(t.left)&&(i.left=t.left),j(t.top)&&(i.top=t.top),j(t.width)&&t.width!==i.width&&(n=!0,i.width=t.width),j(t.height)&&t.height!==i.height&&(l=!0,i.height=t.height),a&&(n?i.height=i.width/a:l&&(i.width=i.height*a)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var i=this.canvasData,a=qp(this.image,this.imageData,i,t);if(!this.cropped)return a;var n=this.getData(t.rounded),l=n.x,o=n.y,r=n.width,s=n.height,p=a.width/Math.floor(i.naturalWidth);p!==1&&(l*=p,o*=p,r*=p,s*=p);var c=r/s,d=Ye({aspectRatio:c,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),m=Ye({aspectRatio:c,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=Ye({aspectRatio:c,width:t.width||(p!==1?a.width:r),height:t.height||(p!==1?a.height:s)}),g=u.width,f=u.height;g=Math.min(d.width,Math.max(m.width,g)),f=Math.min(d.height,Math.max(m.height,f));var h=document.createElement("canvas"),I=h.getContext("2d");h.width=xt(g),h.height=xt(f),I.fillStyle=t.fillColor||"transparent",I.fillRect(0,0,g,f);var b=t.imageSmoothingEnabled,T=b===void 0?!0:b,v=t.imageSmoothingQuality;I.imageSmoothingEnabled=T,v&&(I.imageSmoothingQuality=v);var y=a.width,E=a.height,_=l,x=o,R,z,P,A,B,w;_<=-r||_>y?(_=0,R=0,P=0,B=0):_<=0?(P=-_,_=0,R=Math.min(y,r+_),B=R):_<=y&&(P=0,R=Math.min(r,y-_),B=R),R<=0||x<=-s||x>E?(x=0,z=0,A=0,w=0):x<=0?(A=-x,x=0,z=Math.min(E,s+x),w=z):x<=E&&(A=0,z=Math.min(s,E-x),w=z);var O=[_,x,R,z];if(B>0&&w>0){var S=g/r;O.push(P*S,A*S,B*S,w*S)}return I.drawImage.apply(I,[a].concat(Rl(O.map(function(L){return Math.floor(xt(L))})))),h},setAspectRatio:function(t){var i=this.options;return!this.disabled&&!oa(t)&&(i.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var i=this.options,a=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var l=t===va,o=i.movable&&t===Ll;t=l||o?t:Ml,i.dragMode=t,Wt(a,Ut,t),vt(a,da,l),vt(a,pa,o),i.cropBoxMovable||(Wt(n,Ut,t),vt(n,da,l),vt(n,pa,o))}return this}},om=De.Cropper,ya=function(){function e(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Tp(this,e),!t||!Op.test(t.tagName))throw new Error("The first argument is required and must be an or element.");this.element=t,this.options=J({},El,It(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return Ip(e,[{key:"init",value:function(){var i=this.element,a=i.tagName.toLowerCase(),n;if(!i[Z]){if(i[Z]=this,a==="img"){if(this.isImg=!0,n=i.getAttribute("src")||"",this.originalUrl=n,!n)return;n=i.src}else a==="canvas"&&window.HTMLCanvasElement&&(n=i.toDataURL());this.load(n)}}},{key:"load",value:function(i){var a=this;if(i){this.url=i,this.imageData={};var n=this.element,l=this.options;if(!l.rotatable&&!l.scalable&&(l.checkOrientation=!1),!l.checkOrientation||!window.ArrayBuffer){this.clone();return}if(Pp.test(i)){zp.test(i)?this.read(Kp(i)):this.clone();return}var o=new XMLHttpRequest,r=this.clone.bind(this);this.reloading=!0,this.xhr=o,o.onabort=r,o.onerror=r,o.ontimeout=r,o.onprogress=function(){o.getResponseHeader("content-type")!==bl&&o.abort()},o.onload=function(){a.read(o.response)},o.onloadend=function(){a.reloading=!1,a.xhr=null},l.checkCrossOrigin&&Il(i)&&n.crossOrigin&&(i=vl(i)),o.open("GET",i,!0),o.responseType="arraybuffer",o.withCredentials=n.crossOrigin==="use-credentials",o.send()}}},{key:"read",value:function(i){var a=this.options,n=this.imageData,l=Zp(i),o=0,r=1,s=1;if(l>1){this.url=Qp(i,bl);var p=Jp(l);o=p.rotate,r=p.scaleX,s=p.scaleY}a.rotatable&&(n.rotate=o),a.scalable&&(n.scaleX=r,n.scaleY=s),this.clone()}},{key:"clone",value:function(){var i=this.element,a=this.url,n=i.crossOrigin,l=a;this.options.checkCrossOrigin&&Il(a)&&(n||(n="anonymous"),l=vl(a)),this.crossOrigin=n,this.crossOriginUrl=l;var o=document.createElement("img");n&&(o.crossOrigin=n),o.src=l||a,o.alt=i.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),pe(o,cl),i.parentNode.insertBefore(o,i.nextSibling)}},{key:"start",value:function(){var i=this,a=this.image;a.onload=null,a.onerror=null,this.sizing=!0;var n=De.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(De.navigator.userAgent),l=function(p,c){J(i.imageData,{naturalWidth:p,naturalHeight:c,aspectRatio:p/c}),i.initialImageData=J({},i.imageData),i.sizing=!1,i.sized=!0,i.build()};if(a.naturalWidth&&!n){l(a.naturalWidth,a.naturalHeight);return}var o=document.createElement("img"),r=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){l(o.width,o.height),n||r.removeChild(o)},o.src=a.src,n||(o.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",r.appendChild(o))}},{key:"stop",value:function(){var i=this.image;i.onload=null,i.onerror=null,i.parentNode.removeChild(i),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var i=this.element,a=this.options,n=this.image,l=i.parentNode,o=document.createElement("div");o.innerHTML=Fp;var r=o.querySelector(".".concat(Z,"-container")),s=r.querySelector(".".concat(Z,"-canvas")),p=r.querySelector(".".concat(Z,"-drag-box")),c=r.querySelector(".".concat(Z,"-crop-box")),d=c.querySelector(".".concat(Z,"-face"));this.container=l,this.cropper=r,this.canvas=s,this.dragBox=p,this.cropBox=c,this.viewBox=r.querySelector(".".concat(Z,"-view-box")),this.face=d,s.appendChild(n),pe(i,Ee),l.insertBefore(r,i.nextSibling),Fe(n,cl),this.initPreview(),this.bind(),a.initialAspectRatio=Math.max(0,a.initialAspectRatio)||NaN,a.aspectRatio=Math.max(0,a.aspectRatio)||NaN,a.viewMode=Math.max(0,Math.min(3,Math.round(a.viewMode)))||0,pe(c,Ee),a.guides||pe(c.getElementsByClassName("".concat(Z,"-dashed")),Ee),a.center||pe(c.getElementsByClassName("".concat(Z,"-center")),Ee),a.background&&pe(r,"".concat(Z,"-bg")),a.highlight||pe(d,_p),a.cropBoxMovable&&(pe(d,pa),Wt(d,Ut,Ia)),a.cropBoxResizable||(pe(c.getElementsByClassName("".concat(Z,"-line")),Ee),pe(c.getElementsByClassName("".concat(Z,"-point")),Ee)),this.render(),this.ready=!0,this.setDragMode(a.dragMode),a.autoCrop&&this.crop(),this.setData(a.data),be(a.ready)&&Se(i,gl,a.ready,{once:!0}),yt(i,gl)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var i=this.cropper.parentNode;i&&i.removeChild(this.cropper),Fe(this.element,Ee)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=om,e}},{key:"setDefaults",value:function(i){J(El,It(i)&&i)}}])}();J(ya.prototype,em,tm,im,am,nm,lm);var Bl={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.slides":["ggs"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.gov.sk.xmldatacontainer+xml":["xdcf"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.nato.bindingdataobject+xml":["bdo"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.bary":["bary"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["*mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(Bl);var Nl=Bl;var kl={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(kl);var Vl=kl;var _e=function(e,t,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(e):a?a.value:t.get(e)},Rt,Ht,ot,Ra=class{constructor(...t){Rt.set(this,new Map),Ht.set(this,new Map),ot.set(this,new Map);for(let i of t)this.define(i)}define(t,i=!1){for(let[a,n]of Object.entries(t)){a=a.toLowerCase(),n=n.map(r=>r.toLowerCase()),_e(this,ot,"f").has(a)||_e(this,ot,"f").set(a,new Set);let l=_e(this,ot,"f").get(a),o=!0;for(let r of n){let s=r.startsWith("*");if(r=s?r.slice(1):r,l?.add(r),o&&_e(this,Ht,"f").set(a,r),o=!1,s)continue;let p=_e(this,Rt,"f").get(r);if(p&&p!=a&&!i)throw new Error(`"${a} -> ${r}" conflicts with "${p} -> ${r}". Pass \`force=true\` to override this definition.`);_e(this,Rt,"f").set(r,a)}}return this}getType(t){if(typeof t!="string")return null;let i=t.replace(/^.*[/\\]/,"").toLowerCase(),a=i.replace(/^.*\./,"").toLowerCase(),n=i.length{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(let t of _e(this,ot,"f").values())Object.freeze(t);return this}_getTestState(){return{types:_e(this,Rt,"f"),extensions:_e(this,Ht,"f")}}};Rt=new WeakMap,Ht=new WeakMap,ot=new WeakMap;var Sa=Ra;var Gl=new Sa(Vl,Nl)._freeze();var Ul=({addFilter:e,utils:t})=>{let{Type:i,replaceInString:a,toNaturalFileSize:n}=t;return e("ALLOW_HOPPER_ITEM",(l,{query:o})=>{if(!o("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;let r=o("GET_MAX_FILE_SIZE");if(r!==null&&l.size>r)return!1;let s=o("GET_MIN_FILE_SIZE");return!(s!==null&&l.sizenew Promise((r,s)=>{if(!o("GET_ALLOW_FILE_SIZE_VALIDATION"))return r(l);let p=o("GET_FILE_VALIDATE_SIZE_FILTER");if(p&&!p(l))return r(l);let c=o("GET_MAX_FILE_SIZE");if(c!==null&&l.size>c){s({status:{main:o("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:a(o("GET_LABEL_MAX_FILE_SIZE"),{filesize:n(c,".",o("GET_FILE_SIZE_BASE"),o("GET_FILE_SIZE_LABELS",o))})}});return}let d=o("GET_MIN_FILE_SIZE");if(d!==null&&l.sizeg+f.fileSize,0)>m){s({status:{main:o("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:a(o("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:n(m,".",o("GET_FILE_SIZE_BASE"),o("GET_FILE_SIZE_LABELS",o))})}});return}r(l)})),{options:{allowFileSizeValidation:[!0,i.BOOLEAN],maxFileSize:[null,i.INT],minFileSize:[null,i.INT],maxTotalFileSize:[null,i.INT],fileValidateSizeFilter:[null,i.FUNCTION],labelMinFileSizeExceeded:["File is too small",i.STRING],labelMinFileSize:["Minimum file size is {filesize}",i.STRING],labelMaxFileSizeExceeded:["File is too large",i.STRING],labelMaxFileSize:["Maximum file size is {filesize}",i.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",i.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",i.STRING]}}},rm=typeof window<"u"&&typeof window.document<"u";rm&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Ul}));var Wl=Ul;var Hl=({addFilter:e,utils:t})=>{let{Type:i,isString:a,replaceInString:n,guesstimateMimeType:l,getExtensionFromFilename:o,getFilenameFromURL:r}=t,s=(u,g)=>{let f=(/^[^/]+/.exec(u)||[]).pop(),h=g.slice(0,-2);return f===h},p=(u,g)=>u.some(f=>/\*$/.test(f)?s(g,f):f===g),c=u=>{let g="";if(a(u)){let f=r(u),h=o(f);h&&(g=l(h))}else g=u.type;return g},d=(u,g,f)=>{if(g.length===0)return!0;let h=c(u);return f?new Promise((I,b)=>{f(u,h).then(T=>{p(g,T)?I():b()}).catch(b)}):p(g,h)},m=u=>g=>u[g]===null?!1:u[g]||g;return e("SET_ATTRIBUTE_TO_OPTION_MAP",u=>Object.assign(u,{accept:"acceptedFileTypes"})),e("ALLOW_HOPPER_ITEM",(u,{query:g})=>g("GET_ALLOW_FILE_TYPE_VALIDATION")?d(u,g("GET_ACCEPTED_FILE_TYPES")):!0),e("LOAD_FILE",(u,{query:g})=>new Promise((f,h)=>{if(!g("GET_ALLOW_FILE_TYPE_VALIDATION")){f(u);return}let I=g("GET_ACCEPTED_FILE_TYPES"),b=g("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),T=d(u,I,b),v=()=>{let y=I.map(m(g("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"))).filter(_=>_!==!1),E=y.filter((_,x)=>y.indexOf(_)===x);h({status:{main:g("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:n(g("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"),{allTypes:E.join(", "),allButLastType:E.slice(0,-1).join(", "),lastType:E[E.length-1]})}})};if(typeof T=="boolean")return T?f(u):v();T.then(()=>{f(u)}).catch(v)})),{options:{allowFileTypeValidation:[!0,i.BOOLEAN],acceptedFileTypes:[[],i.ARRAY],labelFileTypeNotAllowed:["File is of invalid type",i.STRING],fileValidateTypeLabelExpectedTypes:["Expects {allButLastType} or {lastType}",i.STRING],fileValidateTypeLabelExpectedTypesMap:[{},i.OBJECT],fileValidateTypeDetectType:[null,i.FUNCTION]}}},sm=typeof window<"u"&&typeof window.document<"u";sm&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Hl}));var jl=Hl;var Yl=e=>/^image/.test(e.type),ql=({addFilter:e,utils:t})=>{let{Type:i,isFile:a,getNumericAspectRatioFromString:n}=t,l=(p,c)=>!(!Yl(p.file)||!c("GET_ALLOW_IMAGE_CROP")),o=p=>typeof p=="object",r=p=>typeof p=="number",s=(p,c)=>p.setMetadata("crop",Object.assign({},p.getMetadata("crop"),c));return e("DID_CREATE_ITEM",(p,{query:c})=>{p.extend("setImageCrop",d=>{if(!(!l(p,c)||!o(center)))return p.setMetadata("crop",d),d}),p.extend("setImageCropCenter",d=>{if(!(!l(p,c)||!o(d)))return s(p,{center:d})}),p.extend("setImageCropZoom",d=>{if(!(!l(p,c)||!r(d)))return s(p,{zoom:Math.max(1,d)})}),p.extend("setImageCropRotation",d=>{if(!(!l(p,c)||!r(d)))return s(p,{rotation:d})}),p.extend("setImageCropFlip",d=>{if(!(!l(p,c)||!o(d)))return s(p,{flip:d})}),p.extend("setImageCropAspectRatio",d=>{if(!l(p,c)||typeof d>"u")return;let m=p.getMetadata("crop"),u=n(d),g={center:{x:.5,y:.5},flip:m?Object.assign({},m.flip):{horizontal:!1,vertical:!1},rotation:0,zoom:1,aspectRatio:u};return p.setMetadata("crop",g),g})}),e("DID_LOAD_ITEM",(p,{query:c})=>new Promise((d,m)=>{let u=p.file;if(!a(u)||!Yl(u)||!c("GET_ALLOW_IMAGE_CROP")||p.getMetadata("crop"))return d(p);let f=c("GET_IMAGE_CROP_ASPECT_RATIO");p.setMetadata("crop",{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},rotation:0,zoom:1,aspectRatio:f?n(f):null}),d(p)})),{options:{allowImageCrop:[!0,i.BOOLEAN],imageCropAspectRatio:[null,i.STRING]}}},cm=typeof window<"u"&&typeof window.document<"u";cm&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:ql}));var $l=ql;var _a=e=>/^image/.test(e.type),Xl=e=>{let{addFilter:t,utils:i,views:a}=e,{Type:n,createRoute:l,createItemAPI:o=c=>c}=i,{fileActionButton:r}=a;t("SHOULD_REMOVE_ON_REVERT",(c,{item:d,query:m})=>new Promise(u=>{let{file:g}=d,f=m("GET_ALLOW_IMAGE_EDIT")&&m("GET_IMAGE_EDIT_ALLOW_EDIT")&&_a(g);u(!f)})),t("DID_LOAD_ITEM",(c,{query:d,dispatch:m})=>new Promise((u,g)=>{if(c.origin>1){u(c);return}let{file:f}=c;if(!d("GET_ALLOW_IMAGE_EDIT")||!d("GET_IMAGE_EDIT_INSTANT_EDIT")){u(c);return}if(!_a(f)){u(c);return}let h=(b,T,v)=>y=>{s.shift(),y?T(b):v(b),m("KICK"),I()},I=()=>{if(!s.length)return;let{item:b,resolve:T,reject:v}=s[0];m("EDIT_ITEM",{id:b.id,handleEditorResponse:h(b,T,v)})};p({item:c,resolve:u,reject:g}),s.length===1&&I()})),t("DID_CREATE_ITEM",(c,{query:d,dispatch:m})=>{c.extend("edit",()=>{m("EDIT_ITEM",{id:c.id})})});let s=[],p=c=>(s.push(c),c);return t("CREATE_VIEW",c=>{let{is:d,view:m,query:u}=c;if(!u("GET_ALLOW_IMAGE_EDIT"))return;let g=u("GET_ALLOW_IMAGE_PREVIEW");if(!(d("file-info")&&!g||d("file")&&g))return;let h=u("GET_IMAGE_EDIT_EDITOR");if(!h)return;h.filepondCallbackBridge||(h.outputData=!0,h.outputFile=!1,h.filepondCallbackBridge={onconfirm:h.onconfirm||(()=>{}),oncancel:h.oncancel||(()=>{})});let I=({root:v,props:y,action:E})=>{let{id:_}=y,{handleEditorResponse:x}=E;h.cropAspectRatio=v.query("GET_IMAGE_CROP_ASPECT_RATIO")||h.cropAspectRatio,h.outputCanvasBackgroundColor=v.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||h.outputCanvasBackgroundColor;let R=v.query("GET_ITEM",_);if(!R)return;let z=R.file,P=R.getMetadata("crop"),A={center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},B=R.getMetadata("resize"),w=R.getMetadata("filter")||null,O=R.getMetadata("filters")||null,S=R.getMetadata("colors")||null,L=R.getMetadata("markup")||null,D={crop:P||A,size:B?{upscale:B.upscale,mode:B.mode,width:B.size.width,height:B.size.height}:null,filter:O?O.id||O.matrix:v.query("GET_ALLOW_IMAGE_FILTER")&&v.query("GET_IMAGE_FILTER_COLOR_MATRIX")&&!S?w:null,color:S,markup:L};h.onconfirm=({data:F})=>{let{crop:G,size:C,filter:q,color:X,colorMatrix:K,markup:oe}=F,k={};if(G&&(k.crop=G),C){let H=(R.getMetadata("resize")||{}).size,Y={width:C.width,height:C.height};!(Y.width&&Y.height)&&H&&(Y.width=H.width,Y.height=H.height),(Y.width||Y.height)&&(k.resize={upscale:C.upscale,mode:C.mode,size:Y})}oe&&(k.markup=oe),k.colors=X,k.filters=q,k.filter=K,R.setMetadata(k),h.filepondCallbackBridge.onconfirm(F,o(R)),x&&(h.onclose=()=>{x(!0),h.onclose=null})},h.oncancel=()=>{h.filepondCallbackBridge.oncancel(o(R)),x&&(h.onclose=()=>{x(!1),h.onclose=null})},h.open(z,D)},b=({root:v,props:y})=>{if(!u("GET_IMAGE_EDIT_ALLOW_EDIT"))return;let{id:E}=y,_=u("GET_ITEM",E);if(!_)return;let x=_.file;if(_a(x))if(v.ref.handleEdit=R=>{R.stopPropagation(),v.dispatch("EDIT_ITEM",{id:E})},g){let R=m.createChildView(r,{label:"edit",icon:u("GET_IMAGE_EDIT_ICON_EDIT"),opacity:0});R.element.classList.add("filepond--action-edit-item"),R.element.dataset.align=u("GET_STYLE_IMAGE_EDIT_BUTTON_EDIT_ITEM_POSITION"),R.on("click",v.ref.handleEdit),v.ref.buttonEditItem=m.appendChildView(R)}else{let R=m.element.querySelector(".filepond--file-info-main"),z=document.createElement("button");z.className="filepond--action-edit-item-alt",z.innerHTML=u("GET_IMAGE_EDIT_ICON_EDIT")+"edit",z.addEventListener("click",v.ref.handleEdit),R.appendChild(z),v.ref.editButton=z}};m.registerDestroyer(({root:v})=>{v.ref.buttonEditItem&&v.ref.buttonEditItem.off("click",v.ref.handleEdit),v.ref.editButton&&v.ref.editButton.removeEventListener("click",v.ref.handleEdit)});let T={EDIT_ITEM:I,DID_LOAD_ITEM:b};if(g){let v=({root:y})=>{y.ref.buttonEditItem&&(y.ref.buttonEditItem.opacity=1)};T.DID_IMAGE_PREVIEW_SHOW=v}m.registerWriter(l(T))}),{options:{allowImageEdit:[!0,n.BOOLEAN],styleImageEditButtonEditItemPosition:["bottom center",n.STRING],imageEditInstantEdit:[!1,n.BOOLEAN],imageEditAllowEdit:[!0,n.BOOLEAN],imageEditIconEdit:['',n.STRING],imageEditEditor:[null,n.OBJECT]}}},dm=typeof window<"u"&&typeof window.document<"u";dm&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Xl}));var Kl=Xl;var pm=e=>/^image\/jpeg/.test(e.type),rt={JPEG:65496,APP1:65505,EXIF:1165519206,TIFF:18761,Orientation:274,Unknown:65280},st=(e,t,i=!1)=>e.getUint16(t,i),Ql=(e,t,i=!1)=>e.getUint32(t,i),mm=e=>new Promise((t,i)=>{let a=new FileReader;a.onload=function(n){let l=new DataView(n.target.result);if(st(l,0)!==rt.JPEG){t(-1);return}let o=l.byteLength,r=2;for(;rum,fm="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=",Zl,Ii=gm()?new Image:{};Ii.onload=()=>Zl=Ii.naturalWidth>Ii.naturalHeight;Ii.src=fm;var hm=()=>Zl,Jl=({addFilter:e,utils:t})=>{let{Type:i,isFile:a}=t;return e("DID_LOAD_ITEM",(n,{query:l})=>new Promise((o,r)=>{let s=n.file;if(!a(s)||!pm(s)||!l("GET_ALLOW_IMAGE_EXIF_ORIENTATION")||!hm())return o(n);mm(s).then(p=>{n.setMetadata("exif",{orientation:p}),o(n)})})),{options:{allowImageExifOrientation:[!0,i.BOOLEAN]}}},bm=typeof window<"u"&&typeof window.document<"u";bm&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Jl}));var eo=Jl;var Em=e=>/^image/.test(e.type),to=(e,t)=>Yt(e.x*t,e.y*t),io=(e,t)=>Yt(e.x+t.x,e.y+t.y),Tm=e=>{let t=Math.sqrt(e.x*e.x+e.y*e.y);return t===0?{x:0,y:0}:Yt(e.x/t,e.y/t)},vi=(e,t,i)=>{let a=Math.cos(t),n=Math.sin(t),l=Yt(e.x-i.x,e.y-i.y);return Yt(i.x+a*l.x-n*l.y,i.y+n*l.x+a*l.y)},Yt=(e=0,t=0)=>({x:e,y:t}),Te=(e,t,i=1,a)=>{if(typeof e=="string")return parseFloat(e)*i;if(typeof e=="number")return e*(a?t[a]:Math.min(t.width,t.height))},Im=(e,t,i)=>{let a=e.borderStyle||e.lineStyle||"solid",n=e.backgroundColor||e.fontColor||"transparent",l=e.borderColor||e.lineColor||"transparent",o=Te(e.borderWidth||e.lineWidth,t,i),r=e.lineCap||"round",s=e.lineJoin||"round",p=typeof a=="string"?"":a.map(d=>Te(d,t,i)).join(","),c=e.opacity||1;return{"stroke-linecap":r,"stroke-linejoin":s,"stroke-width":o||0,"stroke-dasharray":p,stroke:l,fill:n,opacity:c}},we=e=>e!=null,vm=(e,t,i=1)=>{let a=Te(e.x,t,i,"width")||Te(e.left,t,i,"width"),n=Te(e.y,t,i,"height")||Te(e.top,t,i,"height"),l=Te(e.width,t,i,"width"),o=Te(e.height,t,i,"height"),r=Te(e.right,t,i,"width"),s=Te(e.bottom,t,i,"height");return we(n)||(we(o)&&we(s)?n=t.height-o-s:n=s),we(a)||(we(l)&&we(r)?a=t.width-l-r:a=r),we(l)||(we(a)&&we(r)?l=t.width-a-r:l=0),we(o)||(we(n)&&we(s)?o=t.height-n-s:o=0),{x:a||0,y:n||0,width:l||0,height:o||0}},xm=e=>e.map((t,i)=>`${i===0?"M":"L"} ${t.x} ${t.y}`).join(" "),Be=(e,t)=>Object.keys(t).forEach(i=>e.setAttribute(i,t[i])),ym="http://www.w3.org/2000/svg",St=(e,t)=>{let i=document.createElementNS(ym,e);return t&&Be(i,t),i},Rm=e=>Be(e,{...e.rect,...e.styles}),Sm=e=>{let t=e.rect.x+e.rect.width*.5,i=e.rect.y+e.rect.height*.5,a=e.rect.width*.5,n=e.rect.height*.5;return Be(e,{cx:t,cy:i,rx:a,ry:n,...e.styles})},_m={contain:"xMidYMid meet",cover:"xMidYMid slice"},wm=(e,t)=>{Be(e,{...e.rect,...e.styles,preserveAspectRatio:_m[t.fit]||"none"})},Lm={left:"start",center:"middle",right:"end"},Mm=(e,t,i,a)=>{let n=Te(t.fontSize,i,a),l=t.fontFamily||"sans-serif",o=t.fontWeight||"normal",r=Lm[t.textAlign]||"start";Be(e,{...e.rect,...e.styles,"stroke-width":0,"font-weight":o,"font-size":n,"font-family":l,"text-anchor":r}),e.text!==t.text&&(e.text=t.text,e.textContent=t.text.length?t.text:" ")},Am=(e,t,i,a)=>{Be(e,{...e.rect,...e.styles,fill:"none"});let n=e.childNodes[0],l=e.childNodes[1],o=e.childNodes[2],r=e.rect,s={x:e.rect.x+e.rect.width,y:e.rect.y+e.rect.height};if(Be(n,{x1:r.x,y1:r.y,x2:s.x,y2:s.y}),!t.lineDecoration)return;l.style.display="none",o.style.display="none";let p=Tm({x:s.x-r.x,y:s.y-r.y}),c=Te(.05,i,a);if(t.lineDecoration.indexOf("arrow-begin")!==-1){let d=to(p,c),m=io(r,d),u=vi(r,2,m),g=vi(r,-2,m);Be(l,{style:"display:block;",d:`M${u.x},${u.y} L${r.x},${r.y} L${g.x},${g.y}`})}if(t.lineDecoration.indexOf("arrow-end")!==-1){let d=to(p,-c),m=io(s,d),u=vi(s,2,m),g=vi(s,-2,m);Be(o,{style:"display:block;",d:`M${u.x},${u.y} L${s.x},${s.y} L${g.x},${g.y}`})}},Pm=(e,t,i,a)=>{Be(e,{...e.styles,fill:"none",d:xm(t.points.map(n=>({x:Te(n.x,i,a,"width"),y:Te(n.y,i,a,"height")})))})},xi=e=>t=>St(e,{id:t.id}),zm=e=>{let t=St("image",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round",opacity:"0"});return t.onload=()=>{t.setAttribute("opacity",e.opacity||1)},t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.src),t},Om=e=>{let t=St("g",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round"}),i=St("line");t.appendChild(i);let a=St("path");t.appendChild(a);let n=St("path");return t.appendChild(n),t},Fm={image:zm,rect:xi("rect"),ellipse:xi("ellipse"),text:xi("text"),path:xi("path"),line:Om},Dm={rect:Rm,ellipse:Sm,image:wm,text:Mm,path:Pm,line:Am},Cm=(e,t)=>Fm[e](t),Bm=(e,t,i,a,n)=>{t!=="path"&&(e.rect=vm(i,a,n)),e.styles=Im(i,a,n),Dm[t](e,i,a,n)},Nm=["x","y","left","top","right","bottom","width","height"],km=e=>typeof e=="string"&&/%/.test(e)?parseFloat(e)/100:e,Vm=e=>{let[t,i]=e,a=i.points?{}:Nm.reduce((n,l)=>(n[l]=km(i[l]),n),{});return[t,{zIndex:0,...i,...a}]},Gm=(e,t)=>e[1].zIndex>t[1].zIndex?1:e[1].zIndexe.utils.createView({name:"image-preview-markup",tag:"svg",ignoreRect:!0,mixins:{apis:["width","height","crop","markup","resize","dirty"]},write:({root:t,props:i})=>{if(!i.dirty)return;let{crop:a,resize:n,markup:l}=i,o=i.width,r=i.height,s=a.width,p=a.height;if(n){let{size:u}=n,g=u&&u.width,f=u&&u.height,h=n.mode,I=n.upscale;g&&!f&&(f=g),f&&!g&&(g=f);let b=s{let[g,f]=u,h=Cm(g,f);Bm(h,g,f,c,d),t.element.appendChild(h)})}}),jt=(e,t)=>({x:e,y:t}),Wm=(e,t)=>e.x*t.x+e.y*t.y,ao=(e,t)=>jt(e.x-t.x,e.y-t.y),Hm=(e,t)=>Wm(ao(e,t),ao(e,t)),no=(e,t)=>Math.sqrt(Hm(e,t)),lo=(e,t)=>{let i=e,a=1.5707963267948966,n=t,l=1.5707963267948966-t,o=Math.sin(a),r=Math.sin(n),s=Math.sin(l),p=Math.cos(l),c=i/o,d=c*r,m=c*s;return jt(p*d,p*m)},jm=(e,t)=>{let i=e.width,a=e.height,n=lo(i,t),l=lo(a,t),o=jt(e.x+Math.abs(n.x),e.y-Math.abs(n.y)),r=jt(e.x+e.width+Math.abs(l.y),e.y+Math.abs(l.x)),s=jt(e.x-Math.abs(l.y),e.y+e.height-Math.abs(l.x));return{width:no(o,r),height:no(o,s)}},Ym=(e,t,i=1)=>{let a=e.height/e.width,n=1,l=t,o=1,r=a;r>l&&(r=l,o=r/a);let s=Math.max(n/o,l/r),p=e.width/(i*s*o),c=p*t;return{width:p,height:c}},ro=(e,t,i,a)=>{let n=a.x>.5?1-a.x:a.x,l=a.y>.5?1-a.y:a.y,o=n*2*e.width,r=l*2*e.height,s=jm(t,i);return Math.max(s.width/o,s.height/r)},so=(e,t)=>{let i=e.width,a=i*t;a>e.height&&(a=e.height,i=a/t);let n=(e.width-i)*.5,l=(e.height-a)*.5;return{x:n,y:l,width:i,height:a}},qm=(e,t={})=>{let{zoom:i,rotation:a,center:n,aspectRatio:l}=t;l||(l=e.height/e.width);let o=Ym(e,l,i),r={x:o.width*.5,y:o.height*.5},s={x:0,y:0,width:o.width,height:o.height,center:r},p=typeof t.scaleToFit>"u"||t.scaleToFit,c=ro(e,so(s,l),a,p?n:{x:.5,y:.5}),d=i*c;return{widthFloat:o.width/d,heightFloat:o.height/d,width:Math.round(o.width/d),height:Math.round(o.height/d)}},Ce={type:"spring",stiffness:.5,damping:.45,mass:10},$m=e=>e.utils.createView({name:"image-bitmap",ignoreRect:!0,mixins:{styles:["scaleX","scaleY"]},create:({root:t,props:i})=>{t.appendChild(i.image)}}),Xm=e=>e.utils.createView({name:"image-canvas-wrapper",tag:"div",ignoreRect:!0,mixins:{apis:["crop","width","height"],styles:["originX","originY","translateX","translateY","scaleX","scaleY","rotateZ"],animations:{originX:Ce,originY:Ce,scaleX:Ce,scaleY:Ce,translateX:Ce,translateY:Ce,rotateZ:Ce}},create:({root:t,props:i})=>{i.width=i.image.width,i.height=i.image.height,t.ref.bitmap=t.appendChildView(t.createChildView($m(e),{image:i.image}))},write:({root:t,props:i})=>{let{flip:a}=i.crop,{bitmap:n}=t.ref;n.scaleX=a.horizontal?-1:1,n.scaleY=a.vertical?-1:1}}),Km=e=>e.utils.createView({name:"image-clip",tag:"div",ignoreRect:!0,mixins:{apis:["crop","markup","resize","width","height","dirty","background"],styles:["width","height","opacity"],animations:{opacity:{type:"tween",duration:250}}},didWriteView:function({root:t,props:i}){i.background&&(t.element.style.backgroundColor=i.background)},create:({root:t,props:i})=>{t.ref.image=t.appendChildView(t.createChildView(Xm(e),Object.assign({},i))),t.ref.createMarkup=()=>{t.ref.markup||(t.ref.markup=t.appendChildView(t.createChildView(Um(e),Object.assign({},i))))},t.ref.destroyMarkup=()=>{t.ref.markup&&(t.removeChildView(t.ref.markup),t.ref.markup=null)};let a=t.query("GET_IMAGE_PREVIEW_TRANSPARENCY_INDICATOR");a!==null&&(a==="grid"?t.element.dataset.transparencyIndicator=a:t.element.dataset.transparencyIndicator="color")},write:({root:t,props:i,shouldOptimize:a})=>{let{crop:n,markup:l,resize:o,dirty:r,width:s,height:p}=i;t.ref.image.crop=n;let c={x:0,y:0,width:s,height:p,center:{x:s*.5,y:p*.5}},d={width:t.ref.image.width,height:t.ref.image.height},m={x:n.center.x*d.width,y:n.center.y*d.height},u={x:c.center.x-d.width*n.center.x,y:c.center.y-d.height*n.center.y},g=Math.PI*2+n.rotation%(Math.PI*2),f=n.aspectRatio||d.height/d.width,h=typeof n.scaleToFit>"u"||n.scaleToFit,I=ro(d,so(c,f),g,h?n.center:{x:.5,y:.5}),b=n.zoom*I;l&&l.length?(t.ref.createMarkup(),t.ref.markup.width=s,t.ref.markup.height=p,t.ref.markup.resize=o,t.ref.markup.dirty=r,t.ref.markup.markup=l,t.ref.markup.crop=qm(d,n)):t.ref.markup&&t.ref.destroyMarkup();let T=t.ref.image;if(a){T.originX=null,T.originY=null,T.translateX=null,T.translateY=null,T.rotateZ=null,T.scaleX=null,T.scaleY=null;return}T.originX=m.x,T.originY=m.y,T.translateX=u.x,T.translateY=u.y,T.rotateZ=g,T.scaleX=b,T.scaleY=b}}),Qm=e=>e.utils.createView({name:"image-preview",tag:"div",ignoreRect:!0,mixins:{apis:["image","crop","markup","resize","dirty","background"],styles:["translateY","scaleX","scaleY","opacity"],animations:{scaleX:Ce,scaleY:Ce,translateY:Ce,opacity:{type:"tween",duration:400}}},create:({root:t,props:i})=>{t.ref.clip=t.appendChildView(t.createChildView(Km(e),{id:i.id,image:i.image,crop:i.crop,markup:i.markup,resize:i.resize,dirty:i.dirty,background:i.background}))},write:({root:t,props:i,shouldOptimize:a})=>{let{clip:n}=t.ref,{image:l,crop:o,markup:r,resize:s,dirty:p}=i;if(n.crop=o,n.markup=r,n.resize=s,n.dirty=p,n.opacity=a?0:1,a||t.rect.element.hidden)return;let c=l.height/l.width,d=o.aspectRatio||c,m=t.rect.inner.width,u=t.rect.inner.height,g=t.query("GET_IMAGE_PREVIEW_HEIGHT"),f=t.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),h=t.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),I=t.query("GET_PANEL_ASPECT_RATIO"),b=t.query("GET_ALLOW_MULTIPLE");I&&!b&&(g=m*I,d=I);let T=g!==null?g:Math.max(f,Math.min(m*d,h)),v=T/d;v>m&&(v=m,T=v*d),T>u&&(T=u,v=u/d),n.width=v,n.height=T}}),Zm=` + + + + + + + + + + + + + + + + + +`,oo=0,Jm=e=>e.utils.createView({name:"image-preview-overlay",tag:"div",ignoreRect:!0,create:({root:t,props:i})=>{let a=Zm;if(document.querySelector("base")){let n=new URL(window.location.href.replace(window.location.hash,"")).href;a=a.replace(/url\(\#/g,"url("+n+"#")}oo++,t.element.classList.add(`filepond--image-preview-overlay-${i.status}`),t.element.innerHTML=a.replace(/__UID__/g,oo)},mixins:{styles:["opacity"],animations:{opacity:{type:"spring",mass:25}}}}),eu=function(){self.onmessage=e=>{createImageBitmap(e.data.message.file).then(t=>{self.postMessage({id:e.data.id,message:t},[t])})}},tu=function(){self.onmessage=e=>{let t=e.data.message.imageData,i=e.data.message.colorMatrix,a=t.data,n=a.length,l=i[0],o=i[1],r=i[2],s=i[3],p=i[4],c=i[5],d=i[6],m=i[7],u=i[8],g=i[9],f=i[10],h=i[11],I=i[12],b=i[13],T=i[14],v=i[15],y=i[16],E=i[17],_=i[18],x=i[19],R=0,z=0,P=0,A=0,B=0;for(;R{let i=new Image;i.onload=()=>{let a=i.naturalWidth,n=i.naturalHeight;i=null,t(a,n)},i.src=e},au={1:()=>[1,0,0,1,0,0],2:e=>[-1,0,0,1,e,0],3:(e,t)=>[-1,0,0,-1,e,t],4:(e,t)=>[1,0,0,-1,0,t],5:()=>[0,1,1,0,0,0],6:(e,t)=>[0,1,-1,0,t,0],7:(e,t)=>[0,-1,-1,0,t,e],8:e=>[0,-1,1,0,0,e]},nu=(e,t,i,a)=>{a!==-1&&e.transform.apply(e,au[a](t,i))},lu=(e,t,i,a)=>{t=Math.round(t),i=Math.round(i);let n=document.createElement("canvas");n.width=t,n.height=i;let l=n.getContext("2d");return a>=5&&a<=8&&([t,i]=[i,t]),nu(l,t,i,a),l.drawImage(e,0,0,t,i),n},co=e=>/^image/.test(e.type)&&!/svg/.test(e.type),ou=10,ru=10,su=e=>{let t=Math.min(ou/e.width,ru/e.height),i=document.createElement("canvas"),a=i.getContext("2d"),n=i.width=Math.ceil(e.width*t),l=i.height=Math.ceil(e.height*t);a.drawImage(e,0,0,n,l);let o=null;try{o=a.getImageData(0,0,n,l).data}catch{return null}let r=o.length,s=0,p=0,c=0,d=0;for(;dMath.floor(Math.sqrt(e/(t/4))),cu=(e,t)=>(t=t||document.createElement("canvas"),t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t),du=e=>{let t;try{t=new ImageData(e.width,e.height)}catch{t=document.createElement("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(new Uint8ClampedArray(e.data)),t},pu=e=>new Promise((t,i)=>{let a=new Image;a.crossOrigin="Anonymous",a.onload=()=>{t(a)},a.onerror=n=>{i(n)},a.src=e}),mu=e=>{let t=Jm(e),i=Qm(e),{createWorker:a}=e.utils,n=(b,T,v)=>new Promise(y=>{b.ref.imageData||(b.ref.imageData=v.getContext("2d").getImageData(0,0,v.width,v.height));let E=du(b.ref.imageData);if(!T||T.length!==20)return v.getContext("2d").putImageData(E,0,0),y();let _=a(tu);_.post({imageData:E,colorMatrix:T},x=>{v.getContext("2d").putImageData(x,0,0),_.terminate(),y()},[E.data.buffer])}),l=(b,T)=>{b.removeChildView(T),T.image.width=1,T.image.height=1,T._destroy()},o=({root:b})=>{let T=b.ref.images.shift();return T.opacity=0,T.translateY=-15,b.ref.imageViewBin.push(T),T},r=({root:b,props:T,image:v})=>{let y=T.id,E=b.query("GET_ITEM",{id:y});if(!E)return;let _=E.getMetadata("crop")||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},x=b.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),R,z,P=!1;b.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(R=E.getMetadata("markup")||[],z=E.getMetadata("resize"),P=!0);let A=b.appendChildView(b.createChildView(i,{id:y,image:v,crop:_,resize:z,markup:R,dirty:P,background:x,opacity:0,scaleX:1.15,scaleY:1.15,translateY:15}),b.childViews.length);b.ref.images.push(A),A.opacity=1,A.scaleX=1,A.scaleY=1,A.translateY=0,setTimeout(()=>{b.dispatch("DID_IMAGE_PREVIEW_SHOW",{id:y})},250)},s=({root:b,props:T})=>{let v=b.query("GET_ITEM",{id:T.id});if(!v)return;let y=b.ref.images[b.ref.images.length-1];y.crop=v.getMetadata("crop"),y.background=b.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),b.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(y.dirty=!0,y.resize=v.getMetadata("resize"),y.markup=v.getMetadata("markup"))},p=({root:b,props:T,action:v})=>{if(!/crop|filter|markup|resize/.test(v.change.key)||!b.ref.images.length)return;let y=b.query("GET_ITEM",{id:T.id});if(y){if(/filter/.test(v.change.key)){let E=b.ref.images[b.ref.images.length-1];n(b,v.change.value,E.image);return}if(/crop|markup|resize/.test(v.change.key)){let E=y.getMetadata("crop"),_=b.ref.images[b.ref.images.length-1];if(E&&E.aspectRatio&&_.crop&&_.crop.aspectRatio&&Math.abs(E.aspectRatio-_.crop.aspectRatio)>1e-5){let x=o({root:b});r({root:b,props:T,image:cu(x.image)})}else s({root:b,props:T})}}},c=b=>{let v=window.navigator.userAgent.match(/Firefox\/([0-9]+)\./),y=v?parseInt(v[1]):null;return y!==null&&y<=58?!1:"createImageBitmap"in window&&co(b)},d=({root:b,props:T})=>{let{id:v}=T,y=b.query("GET_ITEM",v);if(!y)return;let E=URL.createObjectURL(y.file);iu(E,(_,x)=>{b.dispatch("DID_IMAGE_PREVIEW_CALCULATE_SIZE",{id:v,width:_,height:x})})},m=({root:b,props:T})=>{let{id:v}=T,y=b.query("GET_ITEM",v);if(!y)return;let E=URL.createObjectURL(y.file),_=()=>{pu(E).then(x)},x=R=>{URL.revokeObjectURL(E);let P=(y.getMetadata("exif")||{}).orientation||-1,{width:A,height:B}=R;if(!A||!B)return;P>=5&&P<=8&&([A,B]=[B,A]);let w=Math.max(1,window.devicePixelRatio*.75),S=b.query("GET_IMAGE_PREVIEW_ZOOM_FACTOR")*w,L=B/A,D=b.rect.element.width,F=b.rect.element.height,G=D,C=G*L;L>1?(G=Math.min(A,D*S),C=G*L):(C=Math.min(B,F*S),G=C/L);let q=lu(R,G,C,P),X=()=>{let oe=b.query("GET_IMAGE_PREVIEW_CALCULATE_AVERAGE_IMAGE_COLOR")?su(data):null;y.setMetadata("color",oe,!0),"close"in R&&R.close(),b.ref.overlayShadow.opacity=1,r({root:b,props:T,image:q})},K=y.getMetadata("filter");K?n(b,K,q).then(X):X()};if(c(y.file)){let R=a(eu);R.post({file:y.file},z=>{if(R.terminate(),!z){_();return}x(z)})}else _()},u=({root:b})=>{let T=b.ref.images[b.ref.images.length-1];T.translateY=0,T.scaleX=1,T.scaleY=1,T.opacity=1},g=({root:b})=>{b.ref.overlayShadow.opacity=1,b.ref.overlayError.opacity=0,b.ref.overlaySuccess.opacity=0},f=({root:b})=>{b.ref.overlayShadow.opacity=.25,b.ref.overlayError.opacity=1},h=({root:b})=>{b.ref.overlayShadow.opacity=.25,b.ref.overlaySuccess.opacity=1},I=({root:b})=>{b.ref.images=[],b.ref.imageData=null,b.ref.imageViewBin=[],b.ref.overlayShadow=b.appendChildView(b.createChildView(t,{opacity:0,status:"idle"})),b.ref.overlaySuccess=b.appendChildView(b.createChildView(t,{opacity:0,status:"success"})),b.ref.overlayError=b.appendChildView(b.createChildView(t,{opacity:0,status:"failure"}))};return e.utils.createView({name:"image-preview-wrapper",create:I,styles:["height"],apis:["height"],destroy:({root:b})=>{b.ref.images.forEach(T=>{T.image.width=1,T.image.height=1})},didWriteView:({root:b})=>{b.ref.images.forEach(T=>{T.dirty=!1})},write:e.utils.createRoute({DID_IMAGE_PREVIEW_DRAW:u,DID_IMAGE_PREVIEW_CONTAINER_CREATE:d,DID_FINISH_CALCULATE_PREVIEWSIZE:m,DID_UPDATE_ITEM_METADATA:p,DID_THROW_ITEM_LOAD_ERROR:f,DID_THROW_ITEM_PROCESSING_ERROR:f,DID_THROW_ITEM_INVALID:f,DID_COMPLETE_ITEM_PROCESSING:h,DID_START_ITEM_PROCESSING:g,DID_REVERT_ITEM_PROCESSING:g},({root:b})=>{let T=b.ref.imageViewBin.filter(v=>v.opacity===0);b.ref.imageViewBin=b.ref.imageViewBin.filter(v=>v.opacity>0),T.forEach(v=>l(b,v)),T.length=0})})},po=e=>{let{addFilter:t,utils:i}=e,{Type:a,createRoute:n,isFile:l}=i,o=mu(e);return t("CREATE_VIEW",r=>{let{is:s,view:p,query:c}=r;if(!s("file")||!c("GET_ALLOW_IMAGE_PREVIEW"))return;let d=({root:h,props:I})=>{let{id:b}=I,T=c("GET_ITEM",b);if(!T||!l(T.file)||T.archived)return;let v=T.file;if(!Em(v)||!c("GET_IMAGE_PREVIEW_FILTER_ITEM")(T))return;let y="createImageBitmap"in(window||{}),E=c("GET_IMAGE_PREVIEW_MAX_FILE_SIZE");if(!y&&E&&v.size>E)return;h.ref.imagePreview=p.appendChildView(p.createChildView(o,{id:b}));let _=h.query("GET_IMAGE_PREVIEW_HEIGHT");_&&h.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:T.id,height:_});let x=!y&&v.size>c("GET_IMAGE_PREVIEW_MAX_INSTANT_PREVIEW_FILE_SIZE");h.dispatch("DID_IMAGE_PREVIEW_CONTAINER_CREATE",{id:b},x)},m=(h,I)=>{if(!h.ref.imagePreview)return;let{id:b}=I,T=h.query("GET_ITEM",{id:b});if(!T)return;let v=h.query("GET_PANEL_ASPECT_RATIO"),y=h.query("GET_ITEM_PANEL_ASPECT_RATIO"),E=h.query("GET_IMAGE_PREVIEW_HEIGHT");if(v||y||E)return;let{imageWidth:_,imageHeight:x}=h.ref;if(!_||!x)return;let R=h.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),z=h.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),A=(T.getMetadata("exif")||{}).orientation||-1;if(A>=5&&A<=8&&([_,x]=[x,_]),!co(T.file)||h.query("GET_IMAGE_PREVIEW_UPSCALE")){let D=2048/_;_*=D,x*=D}let B=x/_,w=(T.getMetadata("crop")||{}).aspectRatio||B,O=Math.max(R,Math.min(x,z)),S=h.rect.element.width,L=Math.min(S*w,O);h.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:T.id,height:L})},u=({root:h})=>{h.ref.shouldRescale=!0},g=({root:h,action:I})=>{I.change.key==="crop"&&(h.ref.shouldRescale=!0)},f=({root:h,action:I})=>{h.ref.imageWidth=I.width,h.ref.imageHeight=I.height,h.ref.shouldRescale=!0,h.ref.shouldDrawPreview=!0,h.dispatch("KICK")};p.registerWriter(n({DID_RESIZE_ROOT:u,DID_STOP_RESIZE:u,DID_LOAD_ITEM:d,DID_IMAGE_PREVIEW_CALCULATE_SIZE:f,DID_UPDATE_ITEM_METADATA:g},({root:h,props:I})=>{h.ref.imagePreview&&(h.rect.element.hidden||(h.ref.shouldRescale&&(m(h,I),h.ref.shouldRescale=!1),h.ref.shouldDrawPreview&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{h.dispatch("DID_FINISH_CALCULATE_PREVIEWSIZE",{id:I.id})})}),h.ref.shouldDrawPreview=!1)))}))}),{options:{allowImagePreview:[!0,a.BOOLEAN],imagePreviewFilterItem:[()=>!0,a.FUNCTION],imagePreviewHeight:[null,a.INT],imagePreviewMinHeight:[44,a.INT],imagePreviewMaxHeight:[256,a.INT],imagePreviewMaxFileSize:[null,a.INT],imagePreviewZoomFactor:[2,a.INT],imagePreviewUpscale:[!1,a.BOOLEAN],imagePreviewMaxInstantPreviewFileSize:[1e6,a.INT],imagePreviewTransparencyIndicator:[null,a.STRING],imagePreviewCalculateAverageImageColor:[!1,a.BOOLEAN],imagePreviewMarkupShow:[!0,a.BOOLEAN],imagePreviewMarkupFilter:[()=>!0,a.FUNCTION]}}},uu=typeof window<"u"&&typeof window.document<"u";uu&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:po}));var mo=po;var gu=e=>/^image/.test(e.type),fu=(e,t)=>{let i=new Image;i.onload=()=>{let a=i.naturalWidth,n=i.naturalHeight;i=null,t({width:a,height:n})},i.onerror=()=>t(null),i.src=e},uo=({addFilter:e,utils:t})=>{let{Type:i}=t;return e("DID_LOAD_ITEM",(a,{query:n})=>new Promise((l,o)=>{let r=a.file;if(!gu(r)||!n("GET_ALLOW_IMAGE_RESIZE"))return l(a);let s=n("GET_IMAGE_RESIZE_MODE"),p=n("GET_IMAGE_RESIZE_TARGET_WIDTH"),c=n("GET_IMAGE_RESIZE_TARGET_HEIGHT"),d=n("GET_IMAGE_RESIZE_UPSCALE");if(p===null&&c===null)return l(a);let m=p===null?c:p,u=c===null?m:c,g=URL.createObjectURL(r);fu(g,f=>{if(URL.revokeObjectURL(g),!f)return l(a);let{width:h,height:I}=f,b=(a.getMetadata("exif")||{}).orientation||-1;if(b>=5&&b<=8&&([h,I]=[I,h]),h===m&&I===u)return l(a);if(!d){if(s==="cover"){if(h<=m||I<=u)return l(a)}else if(h<=m&&I<=m)return l(a)}a.setMetadata("resize",{mode:s,upscale:d,size:{width:m,height:u}}),l(a)})})),{options:{allowImageResize:[!0,i.BOOLEAN],imageResizeMode:["cover",i.STRING],imageResizeUpscale:[!0,i.BOOLEAN],imageResizeTargetWidth:[null,i.INT],imageResizeTargetHeight:[null,i.INT]}}},hu=typeof window<"u"&&typeof window.document<"u";hu&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:uo}));var go=uo;var bu=e=>/^image/.test(e.type),Eu=e=>e.substr(0,e.lastIndexOf("."))||e,Tu={jpeg:"jpg","svg+xml":"svg"},Iu=(e,t)=>{let i=Eu(e),a=t.split("/")[1],n=Tu[a]||a;return`${i}.${n}`},vu=e=>/jpeg|png|svg\+xml/.test(e)?e:"image/jpeg",xu=e=>/^image/.test(e.type),yu={1:()=>[1,0,0,1,0,0],2:e=>[-1,0,0,1,e,0],3:(e,t)=>[-1,0,0,-1,e,t],4:(e,t)=>[1,0,0,-1,0,t],5:()=>[0,1,1,0,0,0],6:(e,t)=>[0,1,-1,0,t,0],7:(e,t)=>[0,-1,-1,0,t,e],8:e=>[0,-1,1,0,0,e]},Ru=(e,t,i)=>(i===-1&&(i=1),yu[i](e,t)),qt=(e,t)=>({x:e,y:t}),Su=(e,t)=>e.x*t.x+e.y*t.y,fo=(e,t)=>qt(e.x-t.x,e.y-t.y),_u=(e,t)=>Su(fo(e,t),fo(e,t)),ho=(e,t)=>Math.sqrt(_u(e,t)),bo=(e,t)=>{let i=e,a=1.5707963267948966,n=t,l=1.5707963267948966-t,o=Math.sin(a),r=Math.sin(n),s=Math.sin(l),p=Math.cos(l),c=i/o,d=c*r,m=c*s;return qt(p*d,p*m)},wu=(e,t)=>{let i=e.width,a=e.height,n=bo(i,t),l=bo(a,t),o=qt(e.x+Math.abs(n.x),e.y-Math.abs(n.y)),r=qt(e.x+e.width+Math.abs(l.y),e.y+Math.abs(l.x)),s=qt(e.x-Math.abs(l.y),e.y+e.height-Math.abs(l.x));return{width:ho(o,r),height:ho(o,s)}},Io=(e,t,i=0,a={x:.5,y:.5})=>{let n=a.x>.5?1-a.x:a.x,l=a.y>.5?1-a.y:a.y,o=n*2*e.width,r=l*2*e.height,s=wu(t,i);return Math.max(s.width/o,s.height/r)},vo=(e,t)=>{let i=e.width,a=i*t;a>e.height&&(a=e.height,i=a/t);let n=(e.width-i)*.5,l=(e.height-a)*.5;return{x:n,y:l,width:i,height:a}},Eo=(e,t,i=1)=>{let a=e.height/e.width,n=1,l=t,o=1,r=a;r>l&&(r=l,o=r/a);let s=Math.max(n/o,l/r),p=e.width/(i*s*o),c=p*t;return{width:p,height:c}},xo=e=>{e.width=1,e.height=1,e.getContext("2d").clearRect(0,0,1,1)},To=e=>e&&(e.horizontal||e.vertical),Lu=(e,t,i)=>{if(t<=1&&!To(i))return e.width=e.naturalWidth,e.height=e.naturalHeight,e;let a=document.createElement("canvas"),n=e.naturalWidth,l=e.naturalHeight,o=t>=5&&t<=8;o?(a.width=l,a.height=n):(a.width=n,a.height=l);let r=a.getContext("2d");if(t&&r.transform.apply(r,Ru(n,l,t)),To(i)){let s=[1,0,0,1,0,0];(!o&&i.horizontal||o&i.vertical)&&(s[0]=-1,s[4]=n),(!o&&i.vertical||o&&i.horizontal)&&(s[3]=-1,s[5]=l),r.transform(...s)}return r.drawImage(e,0,0,n,l),a},Mu=(e,t,i={},a={})=>{let{canvasMemoryLimit:n,background:l=null}=a,o=i.zoom||1,r=Lu(e,t,i.flip),s={width:r.width,height:r.height},p=i.aspectRatio||s.height/s.width,c=Eo(s,p,o);if(n){let T=c.width*c.height;if(T>n){let v=Math.sqrt(n)/Math.sqrt(T);s.width=Math.floor(s.width*v),s.height=Math.floor(s.height*v),c=Eo(s,p,o)}}let d=document.createElement("canvas"),m={x:c.width*.5,y:c.height*.5},u={x:0,y:0,width:c.width,height:c.height,center:m},g=typeof i.scaleToFit>"u"||i.scaleToFit,f=o*Io(s,vo(u,p),i.rotation,g?i.center:{x:.5,y:.5});d.width=Math.round(c.width/f),d.height=Math.round(c.height/f),m.x/=f,m.y/=f;let h={x:m.x-s.width*(i.center?i.center.x:.5),y:m.y-s.height*(i.center?i.center.y:.5)},I=d.getContext("2d");l&&(I.fillStyle=l,I.fillRect(0,0,d.width,d.height)),I.translate(m.x,m.y),I.rotate(i.rotation||0),I.drawImage(r,h.x-m.x,h.y-m.y,s.width,s.height);let b=I.getImageData(0,0,d.width,d.height);return xo(d),b},Au=typeof window<"u"&&typeof window.document<"u";Au&&(HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,i){var a=this.toDataURL(t,i).split(",")[1];setTimeout(function(){for(var n=atob(a),l=n.length,o=new Uint8Array(l),r=0;rnew Promise(a=>{let n=i?i(e):e;Promise.resolve(n).then(l=>{l.toBlob(a,t.type,t.quality)})}),Ri=(e,t)=>$t(e.x*t,e.y*t),Si=(e,t)=>$t(e.x+t.x,e.y+t.y),yo=e=>{let t=Math.sqrt(e.x*e.x+e.y*e.y);return t===0?{x:0,y:0}:$t(e.x/t,e.y/t)},qe=(e,t,i)=>{let a=Math.cos(t),n=Math.sin(t),l=$t(e.x-i.x,e.y-i.y);return $t(i.x+a*l.x-n*l.y,i.y+n*l.x+a*l.y)},$t=(e=0,t=0)=>({x:e,y:t}),me=(e,t,i=1,a)=>{if(typeof e=="string")return parseFloat(e)*i;if(typeof e=="number")return e*(a?t[a]:Math.min(t.width,t.height))},ct=(e,t,i)=>{let a=e.borderStyle||e.lineStyle||"solid",n=e.backgroundColor||e.fontColor||"transparent",l=e.borderColor||e.lineColor||"transparent",o=me(e.borderWidth||e.lineWidth,t,i),r=e.lineCap||"round",s=e.lineJoin||"round",p=typeof a=="string"?"":a.map(d=>me(d,t,i)).join(","),c=e.opacity||1;return{"stroke-linecap":r,"stroke-linejoin":s,"stroke-width":o||0,"stroke-dasharray":p,stroke:l,fill:n,opacity:c}},Le=e=>e!=null,wt=(e,t,i=1)=>{let a=me(e.x,t,i,"width")||me(e.left,t,i,"width"),n=me(e.y,t,i,"height")||me(e.top,t,i,"height"),l=me(e.width,t,i,"width"),o=me(e.height,t,i,"height"),r=me(e.right,t,i,"width"),s=me(e.bottom,t,i,"height");return Le(n)||(Le(o)&&Le(s)?n=t.height-o-s:n=s),Le(a)||(Le(l)&&Le(r)?a=t.width-l-r:a=r),Le(l)||(Le(a)&&Le(r)?l=t.width-a-r:l=0),Le(o)||(Le(n)&&Le(s)?o=t.height-n-s:o=0),{x:a||0,y:n||0,width:l||0,height:o||0}},zu=e=>e.map((t,i)=>`${i===0?"M":"L"} ${t.x} ${t.y}`).join(" "),Ne=(e,t)=>Object.keys(t).forEach(i=>e.setAttribute(i,t[i])),Ou="http://www.w3.org/2000/svg",_t=(e,t)=>{let i=document.createElementNS(Ou,e);return t&&Ne(i,t),i},Fu=e=>Ne(e,{...e.rect,...e.styles}),Du=e=>{let t=e.rect.x+e.rect.width*.5,i=e.rect.y+e.rect.height*.5,a=e.rect.width*.5,n=e.rect.height*.5;return Ne(e,{cx:t,cy:i,rx:a,ry:n,...e.styles})},Cu={contain:"xMidYMid meet",cover:"xMidYMid slice"},Bu=(e,t)=>{Ne(e,{...e.rect,...e.styles,preserveAspectRatio:Cu[t.fit]||"none"})},Nu={left:"start",center:"middle",right:"end"},ku=(e,t,i,a)=>{let n=me(t.fontSize,i,a),l=t.fontFamily||"sans-serif",o=t.fontWeight||"normal",r=Nu[t.textAlign]||"start";Ne(e,{...e.rect,...e.styles,"stroke-width":0,"font-weight":o,"font-size":n,"font-family":l,"text-anchor":r}),e.text!==t.text&&(e.text=t.text,e.textContent=t.text.length?t.text:" ")},Vu=(e,t,i,a)=>{Ne(e,{...e.rect,...e.styles,fill:"none"});let n=e.childNodes[0],l=e.childNodes[1],o=e.childNodes[2],r=e.rect,s={x:e.rect.x+e.rect.width,y:e.rect.y+e.rect.height};if(Ne(n,{x1:r.x,y1:r.y,x2:s.x,y2:s.y}),!t.lineDecoration)return;l.style.display="none",o.style.display="none";let p=yo({x:s.x-r.x,y:s.y-r.y}),c=me(.05,i,a);if(t.lineDecoration.indexOf("arrow-begin")!==-1){let d=Ri(p,c),m=Si(r,d),u=qe(r,2,m),g=qe(r,-2,m);Ne(l,{style:"display:block;",d:`M${u.x},${u.y} L${r.x},${r.y} L${g.x},${g.y}`})}if(t.lineDecoration.indexOf("arrow-end")!==-1){let d=Ri(p,-c),m=Si(s,d),u=qe(s,2,m),g=qe(s,-2,m);Ne(o,{style:"display:block;",d:`M${u.x},${u.y} L${s.x},${s.y} L${g.x},${g.y}`})}},Gu=(e,t,i,a)=>{Ne(e,{...e.styles,fill:"none",d:zu(t.points.map(n=>({x:me(n.x,i,a,"width"),y:me(n.y,i,a,"height")})))})},yi=e=>t=>_t(e,{id:t.id}),Uu=e=>{let t=_t("image",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round",opacity:"0"});return t.onload=()=>{t.setAttribute("opacity",e.opacity||1)},t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.src),t},Wu=e=>{let t=_t("g",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round"}),i=_t("line");t.appendChild(i);let a=_t("path");t.appendChild(a);let n=_t("path");return t.appendChild(n),t},Hu={image:Uu,rect:yi("rect"),ellipse:yi("ellipse"),text:yi("text"),path:yi("path"),line:Wu},ju={rect:Fu,ellipse:Du,image:Bu,text:ku,path:Gu,line:Vu},Yu=(e,t)=>Hu[e](t),qu=(e,t,i,a,n)=>{t!=="path"&&(e.rect=wt(i,a,n)),e.styles=ct(i,a,n),ju[t](e,i,a,n)},Ro=(e,t)=>e[1].zIndex>t[1].zIndex?1:e[1].zIndexnew Promise(n=>{let{background:l=null}=a,o=new FileReader;o.onloadend=()=>{let r=o.result,s=document.createElement("div");s.style.cssText="position:absolute;pointer-events:none;width:0;height:0;visibility:hidden;",s.innerHTML=r;let p=s.querySelector("svg");document.body.appendChild(s);let c=p.getBBox();s.parentNode.removeChild(s);let d=s.querySelector("title"),m=p.getAttribute("viewBox")||"",u=p.getAttribute("width")||"",g=p.getAttribute("height")||"",f=parseFloat(u)||null,h=parseFloat(g)||null,I=(u.match(/[a-z]+/)||[])[0]||"",b=(g.match(/[a-z]+/)||[])[0]||"",T=m.split(" ").map(parseFloat),v=T.length?{x:T[0],y:T[1],width:T[2],height:T[3]}:c,y=f??v.width,E=h??v.height;p.style.overflow="visible",p.setAttribute("width",y),p.setAttribute("height",E);let _="";if(i&&i.length){let K={width:y,height:E};_=i.sort(Ro).reduce((oe,k)=>{let H=Yu(k[0],k[1]);return qu(H,k[0],k[1],K),H.removeAttribute("id"),H.getAttribute("opacity")===1&&H.removeAttribute("opacity"),oe+` +`+H.outerHTML+` +`},""),_=` + +${_.replace(/ /g," ")} + +`}let x=t.aspectRatio||E/y,R=y,z=R*x,P=typeof t.scaleToFit>"u"||t.scaleToFit,A=t.center?t.center.x:.5,B=t.center?t.center.y:.5,w=Io({width:y,height:E},vo({width:R,height:z},x),t.rotation,P?{x:A,y:B}:{x:.5,y:.5}),O=t.zoom*w,S=t.rotation*(180/Math.PI),L={x:R*.5,y:z*.5},D={x:L.x-y*A,y:L.y-E*B},F=[`rotate(${S} ${L.x} ${L.y})`,`translate(${L.x} ${L.y})`,`scale(${O})`,`translate(${-L.x} ${-L.y})`,`translate(${D.x} ${D.y})`],G=t.flip&&t.flip.horizontal,C=t.flip&&t.flip.vertical,q=[`scale(${G?-1:1} ${C?-1:1})`,`translate(${G?-y:0} ${C?-E:0})`],X=` + + +${d?d.textContent:""} + + +${p.outerHTML}${_} + + +`;n(X)},o.readAsText(e)}),Xu=e=>{let t;try{t=new ImageData(e.width,e.height)}catch{t=document.createElement("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(e.data),t},Ku=()=>{let e={resize:c,filter:p},t=(d,m)=>(d.forEach(u=>{m=e[u.type](m,u.data)}),m),i=(d,m)=>{let u=d.transforms,g=null;if(u.forEach(f=>{f.type==="filter"&&(g=f)}),g){let f=null;u.forEach(h=>{h.type==="resize"&&(f=h)}),f&&(f.data.matrix=g.data,u=u.filter(h=>h.type!=="filter"))}m(t(u,d.imageData))};self.onmessage=d=>{i(d.data.message,m=>{self.postMessage({id:d.data.id,message:m},[m.data.buffer])})};let a=1,n=1,l=1;function o(d,m,u){let g=m[d]/255,f=m[d+1]/255,h=m[d+2]/255,I=m[d+3]/255,b=g*u[0]+f*u[1]+h*u[2]+I*u[3]+u[4],T=g*u[5]+f*u[6]+h*u[7]+I*u[8]+u[9],v=g*u[10]+f*u[11]+h*u[12]+I*u[13]+u[14],y=g*u[15]+f*u[16]+h*u[17]+I*u[18]+u[19],E=Math.max(0,b*y)+a*(1-y),_=Math.max(0,T*y)+n*(1-y),x=Math.max(0,v*y)+l*(1-y);m[d]=Math.max(0,Math.min(1,E))*255,m[d+1]=Math.max(0,Math.min(1,_))*255,m[d+2]=Math.max(0,Math.min(1,x))*255}let r=self.JSON.stringify([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]);function s(d){return self.JSON.stringify(d||[])===r}function p(d,m){if(!m||s(m))return d;let u=d.data,g=u.length,f=m[0],h=m[1],I=m[2],b=m[3],T=m[4],v=m[5],y=m[6],E=m[7],_=m[8],x=m[9],R=m[10],z=m[11],P=m[12],A=m[13],B=m[14],w=m[15],O=m[16],S=m[17],L=m[18],D=m[19],F=0,G=0,C=0,q=0,X=0,K=0,oe=0,k=0,H=0,Y=0,re=0,ee=0;for(;F1&&g===!1)return p(d,I);f=d.width*w,h=d.height*w}let b=d.width,T=d.height,v=Math.round(f),y=Math.round(h),E=d.data,_=new Uint8ClampedArray(v*y*4),x=b/v,R=T/y,z=Math.ceil(x*.5),P=Math.ceil(R*.5);for(let A=0;A=-1&&re<=1&&(O=2*re*re*re-3*re*re+1,O>0)){Y=4*(H+X*b);let ee=E[Y+3];C+=O*ee,L+=O,ee<255&&(O=O*ee/250),D+=O*E[Y],F+=O*E[Y+1],G+=O*E[Y+2],S+=O}}}_[w]=D/S,_[w+1]=F/S,_[w+2]=G/S,_[w+3]=C/L,I&&o(w,_,I)}return{data:_,width:v,height:y}}},Qu=(e,t)=>{if(e.getUint32(t+4,!1)!==1165519206)return;t+=4;let i=e.getUint16(t+=6,!1)===18761;t+=e.getUint32(t+4,i);let a=e.getUint16(t,i);t+=2;for(let n=0;n{let t=new DataView(e);if(t.getUint16(0)!==65496)return null;let i=2,a,n,l=!1;for(;i=65504&&a<=65519||a===65534)||(l||(l=Qu(t,i,n)),i+n>t.byteLength)));)i+=n;return e.slice(0,i)},Ju=e=>new Promise(t=>{let i=new FileReader;i.onload=()=>t(Zu(i.result)||null),i.readAsArrayBuffer(e.slice(0,256*1024))}),eg=()=>window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,tg=(e,t)=>{let i=eg();if(i){let a=new i;return a.append(e),a.getBlob(t)}return new Blob([e],{type:t})},ig=()=>Math.random().toString(36).substr(2,9),ag=e=>{let t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),i=URL.createObjectURL(t),a=new Worker(i),n=[];return{transfer:()=>{},post:(l,o,r)=>{let s=ig();n[s]=o,a.onmessage=p=>{let c=n[p.data.id];c&&(c(p.data.message),delete n[p.data.id])},a.postMessage({id:s,message:l},r)},terminate:()=>{a.terminate(),URL.revokeObjectURL(i)}}},ng=e=>new Promise((t,i)=>{let a=new Image;a.onload=()=>{t(a)},a.onerror=n=>{i(n)},a.src=e}),lg=e=>e.reduce((t,i)=>t.then(a=>i().then(Array.prototype.concat.bind(a))),Promise.resolve([])),og=(e,t)=>new Promise(i=>{let a={width:e.width,height:e.height},n=e.getContext("2d"),l=t.sort(Ro).map(o=>()=>new Promise(r=>{ug[o[0]](n,a,o[1],r)&&r()}));lg(l).then(()=>i(e))}),Lt=(e,t)=>{e.beginPath(),e.lineCap=t["stroke-linecap"],e.lineJoin=t["stroke-linejoin"],e.lineWidth=t["stroke-width"],t["stroke-dasharray"].length&&e.setLineDash(t["stroke-dasharray"].split(",")),e.fillStyle=t.fill,e.strokeStyle=t.stroke,e.globalAlpha=t.opacity||1},Mt=e=>{e.fill(),e.stroke(),e.globalAlpha=1},rg=(e,t,i)=>{let a=wt(i,t),n=ct(i,t);return Lt(e,n),e.rect(a.x,a.y,a.width,a.height),Mt(e,n),!0},sg=(e,t,i)=>{let a=wt(i,t),n=ct(i,t);Lt(e,n);let l=a.x,o=a.y,r=a.width,s=a.height,p=.5522848,c=r/2*p,d=s/2*p,m=l+r,u=o+s,g=l+r/2,f=o+s/2;return e.moveTo(l,f),e.bezierCurveTo(l,f-d,g-c,o,g,o),e.bezierCurveTo(g+c,o,m,f-d,m,f),e.bezierCurveTo(m,f+d,g+c,u,g,u),e.bezierCurveTo(g-c,u,l,f+d,l,f),Mt(e,n),!0},cg=(e,t,i,a)=>{let n=wt(i,t),l=ct(i,t);Lt(e,l);let o=new Image;new URL(i.src,window.location.href).origin!==window.location.origin&&(o.crossOrigin=""),o.onload=()=>{if(i.fit==="cover"){let s=n.width/n.height,p=s>1?o.width:o.height*s,c=s>1?o.width/s:o.height,d=o.width*.5-p*.5,m=o.height*.5-c*.5;e.drawImage(o,d,m,p,c,n.x,n.y,n.width,n.height)}else if(i.fit==="contain"){let s=Math.min(n.width/o.width,n.height/o.height),p=s*o.width,c=s*o.height,d=n.x+n.width*.5-p*.5,m=n.y+n.height*.5-c*.5;e.drawImage(o,0,0,o.width,o.height,d,m,p,c)}else e.drawImage(o,0,0,o.width,o.height,n.x,n.y,n.width,n.height);Mt(e,l),a()},o.src=i.src},dg=(e,t,i)=>{let a=wt(i,t),n=ct(i,t);Lt(e,n);let l=me(i.fontSize,t),o=i.fontFamily||"sans-serif",r=i.fontWeight||"normal",s=i.textAlign||"left";return e.font=`${r} ${l}px ${o}`,e.textAlign=s,e.fillText(i.text,a.x,a.y),Mt(e,n),!0},pg=(e,t,i)=>{let a=ct(i,t);Lt(e,a),e.beginPath();let n=i.points.map(o=>({x:me(o.x,t,1,"width"),y:me(o.y,t,1,"height")}));e.moveTo(n[0].x,n[0].y);let l=n.length;for(let o=1;o{let a=wt(i,t),n=ct(i,t);Lt(e,n),e.beginPath();let l={x:a.x,y:a.y},o={x:a.x+a.width,y:a.y+a.height};e.moveTo(l.x,l.y),e.lineTo(o.x,o.y);let r=yo({x:o.x-l.x,y:o.y-l.y}),s=.04*Math.min(t.width,t.height);if(i.lineDecoration.indexOf("arrow-begin")!==-1){let p=Ri(r,s),c=Si(l,p),d=qe(l,2,c),m=qe(l,-2,c);e.moveTo(d.x,d.y),e.lineTo(l.x,l.y),e.lineTo(m.x,m.y)}if(i.lineDecoration.indexOf("arrow-end")!==-1){let p=Ri(r,-s),c=Si(o,p),d=qe(o,2,c),m=qe(o,-2,c);e.moveTo(d.x,d.y),e.lineTo(o.x,o.y),e.lineTo(m.x,m.y)}return Mt(e,n),!0},ug={rect:rg,ellipse:sg,image:cg,text:dg,line:mg,path:pg},gg=e=>{let t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").putImageData(e,0,0),t},fg=(e,t,i={})=>new Promise((a,n)=>{if(!e||!xu(e))return n({status:"not an image file",file:e});let{stripImageHead:l,beforeCreateBlob:o,afterCreateBlob:r,canvasMemoryLimit:s}=i,{crop:p,size:c,filter:d,markup:m,output:u}=t,g=t.image&&t.image.orientation?Math.max(1,Math.min(8,t.image.orientation)):null,f=u&&u.quality,h=f===null?null:f/100,I=u&&u.type||null,b=u&&u.background||null,T=[];c&&(typeof c.width=="number"||typeof c.height=="number")&&T.push({type:"resize",data:c}),d&&d.length===20&&T.push({type:"filter",data:d});let v=_=>{let x=r?r(_):_;Promise.resolve(x).then(a)},y=(_,x)=>{let R=gg(_),z=m.length?og(R,m):R;Promise.resolve(z).then(P=>{Pu(P,x,o).then(A=>{if(xo(P),l)return v(A);Ju(e).then(B=>{B!==null&&(A=new Blob([B,A.slice(20)],{type:A.type})),v(A)})}).catch(n)})};if(/svg/.test(e.type)&&I===null)return $u(e,p,m,{background:b}).then(_=>{a(tg(_,"image/svg+xml"))});let E=URL.createObjectURL(e);ng(E).then(_=>{URL.revokeObjectURL(E);let x=Mu(_,g,p,{canvasMemoryLimit:s,background:b}),R={quality:h,type:I||e.type};if(!T.length)return y(x,R);let z=ag(Ku);z.post({transforms:T,imageData:x},P=>{y(Xu(P),R),z.terminate()},[x.data.buffer])}).catch(n)}),hg=["x","y","left","top","right","bottom","width","height"],bg=e=>typeof e=="string"&&/%/.test(e)?parseFloat(e)/100:e,Eg=e=>{let[t,i]=e,a=i.points?{}:hg.reduce((n,l)=>(n[l]=bg(i[l]),n),{});return[t,{zIndex:0,...i,...a}]},Tg=e=>new Promise((t,i)=>{let a=new Image;a.src=URL.createObjectURL(e);let n=()=>{let o=a.naturalWidth,r=a.naturalHeight;o&&r&&(URL.revokeObjectURL(a.src),clearInterval(l),t({width:o,height:r}))};a.onerror=o=>{URL.revokeObjectURL(a.src),clearInterval(l),i(o)};let l=setInterval(n,1);n()});typeof window<"u"&&typeof window.document<"u"&&(HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,i){let a=this;setTimeout(()=>{let n=a.toDataURL(t,i).split(",")[1],l=atob(n),o=l.length,r=new Uint8Array(o);for(;o--;)r[o]=l.charCodeAt(o);e(new Blob([r],{type:t||"image/png"}))})}}));var La=typeof window<"u"&&typeof window.document<"u",Ig=La&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,So=({addFilter:e,utils:t})=>{let{Type:i,forin:a,getFileFromBlob:n,isFile:l}=t,o=["crop","resize","filter","markup","output"],r=c=>(d,m,u)=>d(m,c?c(u):u),s=c=>c.aspectRatio===null&&c.rotation===0&&c.zoom===1&&c.center&&c.center.x===.5&&c.center.y===.5&&c.flip&&c.flip.horizontal===!1&&c.flip.vertical===!1;e("SHOULD_PREPARE_OUTPUT",(c,{query:d})=>new Promise(m=>{m(!d("IS_ASYNC"))}));let p=(c,d,m)=>new Promise(u=>{if(!c("GET_ALLOW_IMAGE_TRANSFORM")||m.archived||!l(d)||!bu(d))return u(!1);Tg(d).then(()=>{let g=c("GET_IMAGE_TRANSFORM_IMAGE_FILTER");if(g){let f=g(d);if(f==null)return handleRevert(!0);if(typeof f=="boolean")return u(f);if(typeof f.then=="function")return f.then(u)}u(!0)}).catch(g=>{u(!1)})});return e("DID_CREATE_ITEM",(c,{query:d,dispatch:m})=>{d("GET_ALLOW_IMAGE_TRANSFORM")&&c.extend("requestPrepare",()=>new Promise((u,g)=>{m("REQUEST_PREPARE_OUTPUT",{query:c.id,item:c,success:u,failure:g},!0)}))}),e("PREPARE_OUTPUT",(c,{query:d,item:m})=>new Promise(u=>{p(d,c,m).then(g=>{if(!g)return u(c);let f=[];d("GET_IMAGE_TRANSFORM_VARIANTS_INCLUDE_ORIGINAL")&&f.push(()=>new Promise(x=>{x({name:d("GET_IMAGE_TRANSFORM_VARIANTS_ORIGINAL_NAME"),file:c})})),d("GET_IMAGE_TRANSFORM_VARIANTS_INCLUDE_DEFAULT")&&f.push((x,R,z)=>new Promise(P=>{x(R,z).then(A=>P({name:d("GET_IMAGE_TRANSFORM_VARIANTS_DEFAULT_NAME"),file:A}))}));let h=d("GET_IMAGE_TRANSFORM_VARIANTS")||{};a(h,(x,R)=>{let z=r(R);f.push((P,A,B)=>new Promise(w=>{z(P,A,B).then(O=>w({name:x,file:O}))}))});let I=d("GET_IMAGE_TRANSFORM_OUTPUT_QUALITY"),b=d("GET_IMAGE_TRANSFORM_OUTPUT_QUALITY_MODE"),T=I===null?null:I/100,v=d("GET_IMAGE_TRANSFORM_OUTPUT_MIME_TYPE"),y=d("GET_IMAGE_TRANSFORM_CLIENT_TRANSFORMS")||o;m.setMetadata("output",{type:v,quality:T,client:y},!0);let E=(x,R)=>new Promise((z,P)=>{let A={...R};Object.keys(A).filter(C=>C!=="exif").forEach(C=>{y.indexOf(C)===-1&&delete A[C]});let{resize:B,exif:w,output:O,crop:S,filter:L,markup:D}=A,F={image:{orientation:w?w.orientation:null},output:O&&(O.type||typeof O.quality=="number"||O.background)?{type:O.type,quality:typeof O.quality=="number"?O.quality*100:null,background:O.background||d("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||null}:void 0,size:B&&(B.size.width||B.size.height)?{mode:B.mode,upscale:B.upscale,...B.size}:void 0,crop:S&&!s(S)?{...S}:void 0,markup:D&&D.length?D.map(Eg):[],filter:L};if(F.output){let C=O.type?O.type!==x.type:!1,q=/\/jpe?g$/.test(x.type),X=O.quality!==null?q&&b==="always":!1;if(!!!(F.size||F.crop||F.filter||C||X))return z(x)}let G={beforeCreateBlob:d("GET_IMAGE_TRANSFORM_BEFORE_CREATE_BLOB"),afterCreateBlob:d("GET_IMAGE_TRANSFORM_AFTER_CREATE_BLOB"),canvasMemoryLimit:d("GET_IMAGE_TRANSFORM_CANVAS_MEMORY_LIMIT"),stripImageHead:d("GET_IMAGE_TRANSFORM_OUTPUT_STRIP_IMAGE_HEAD")};fg(x,F,G).then(C=>{let q=n(C,Iu(x.name,vu(C.type)));z(q)}).catch(P)}),_=f.map(x=>x(E,c,m.getMetadata()));Promise.all(_).then(x=>{u(x.length===1&&x[0].name===null?x[0].file:x)})})})),{options:{allowImageTransform:[!0,i.BOOLEAN],imageTransformImageFilter:[null,i.FUNCTION],imageTransformOutputMimeType:[null,i.STRING],imageTransformOutputQuality:[null,i.INT],imageTransformOutputStripImageHead:[!0,i.BOOLEAN],imageTransformClientTransforms:[null,i.ARRAY],imageTransformOutputQualityMode:["always",i.STRING],imageTransformVariants:[null,i.OBJECT],imageTransformVariantsIncludeDefault:[!0,i.BOOLEAN],imageTransformVariantsDefaultName:[null,i.STRING],imageTransformVariantsIncludeOriginal:[!1,i.BOOLEAN],imageTransformVariantsOriginalName:["original_",i.STRING],imageTransformBeforeCreateBlob:[null,i.FUNCTION],imageTransformAfterCreateBlob:[null,i.FUNCTION],imageTransformCanvasMemoryLimit:[La&&Ig?4096*4096:null,i.INT],imageTransformCanvasBackgroundColor:[null,i.STRING]}}};La&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:So}));var _o=So;var Ma=e=>/^video/.test(e.type),Xt=e=>/^audio/.test(e.type),Aa=class{constructor(t,i){this.mediaEl=t,this.audioElems=i,this.onplayhead=!1,this.duration=0,this.timelineWidth=this.audioElems.timeline.offsetWidth-this.audioElems.playhead.offsetWidth,this.moveplayheadFn=this.moveplayhead.bind(this),this.registerListeners()}registerListeners(){this.mediaEl.addEventListener("timeupdate",this.timeUpdate.bind(this),!1),this.mediaEl.addEventListener("canplaythrough",()=>this.duration=this.mediaEl.duration,!1),this.audioElems.timeline.addEventListener("click",this.timelineClicked.bind(this),!1),this.audioElems.button.addEventListener("click",this.play.bind(this)),this.audioElems.playhead.addEventListener("mousedown",this.mouseDown.bind(this),!1),window.addEventListener("mouseup",this.mouseUp.bind(this),!1)}play(){this.mediaEl.paused?this.mediaEl.play():this.mediaEl.pause(),this.audioElems.button.classList.toggle("play"),this.audioElems.button.classList.toggle("pause")}timeUpdate(){let t=this.mediaEl.currentTime/this.duration*100;this.audioElems.playhead.style.marginLeft=t+"%",this.mediaEl.currentTime===this.duration&&(this.audioElems.button.classList.toggle("play"),this.audioElems.button.classList.toggle("pause"))}moveplayhead(t){let i=t.clientX-this.getPosition(this.audioElems.timeline);i>=0&&i<=this.timelineWidth&&(this.audioElems.playhead.style.marginLeft=i+"px"),i<0&&(this.audioElems.playhead.style.marginLeft="0px"),i>this.timelineWidth&&(this.audioElems.playhead.style.marginLeft=this.timelineWidth-4+"px")}timelineClicked(t){this.moveplayhead(t),this.mediaEl.currentTime=this.duration*this.clickPercent(t)}mouseDown(){this.onplayhead=!0,window.addEventListener("mousemove",this.moveplayheadFn,!0),this.mediaEl.removeEventListener("timeupdate",this.timeUpdate.bind(this),!1)}mouseUp(t){window.removeEventListener("mousemove",this.moveplayheadFn,!0),this.onplayhead==!0&&(this.moveplayhead(t),this.mediaEl.currentTime=this.duration*this.clickPercent(t),this.mediaEl.addEventListener("timeupdate",this.timeUpdate.bind(this),!1)),this.onplayhead=!1}clickPercent(t){return(t.clientX-this.getPosition(this.audioElems.timeline))/this.timelineWidth}getPosition(t){return t.getBoundingClientRect().left}},vg=e=>e.utils.createView({name:"media-preview",tag:"div",ignoreRect:!0,create:({root:t,props:i})=>{let{id:a}=i,n=t.query("GET_ITEM",{id:i.id}),l=Xt(n.file)?"audio":"video";if(t.ref.media=document.createElement(l),t.ref.media.setAttribute("controls",!0),t.element.appendChild(t.ref.media),Xt(n.file)){let o=document.createDocumentFragment();t.ref.audio=[],t.ref.audio.container=document.createElement("div"),t.ref.audio.button=document.createElement("span"),t.ref.audio.timeline=document.createElement("div"),t.ref.audio.playhead=document.createElement("div"),t.ref.audio.container.className="audioplayer",t.ref.audio.button.className="playpausebtn play",t.ref.audio.timeline.className="timeline",t.ref.audio.playhead.className="playhead",t.ref.audio.timeline.appendChild(t.ref.audio.playhead),t.ref.audio.container.appendChild(t.ref.audio.button),t.ref.audio.container.appendChild(t.ref.audio.timeline),o.appendChild(t.ref.audio.container),t.element.appendChild(o)}},write:e.utils.createRoute({DID_MEDIA_PREVIEW_LOAD:({root:t,props:i})=>{let{id:a}=i,n=t.query("GET_ITEM",{id:i.id});if(!n)return;let l=window.URL||window.webkitURL,o=new Blob([n.file],{type:n.file.type});t.ref.media.type=n.file.type,t.ref.media.src=n.file.mock&&n.file.url||l.createObjectURL(o),Xt(n.file)&&new Aa(t.ref.media,t.ref.audio),t.ref.media.addEventListener("loadeddata",()=>{let r=75;if(Ma(n.file)){let s=t.ref.media.offsetWidth,p=t.ref.media.videoWidth/s;r=t.ref.media.videoHeight/p}t.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:i.id,height:r})},!1)}})}),xg=e=>{let t=({root:a,props:n})=>{let{id:l}=n;a.query("GET_ITEM",l)&&a.dispatch("DID_MEDIA_PREVIEW_LOAD",{id:l})},i=({root:a,props:n})=>{let l=vg(e);a.ref.media=a.appendChildView(a.createChildView(l,{id:n.id}))};return e.utils.createView({name:"media-preview-wrapper",create:i,write:e.utils.createRoute({DID_MEDIA_PREVIEW_CONTAINER_CREATE:t})})},Pa=e=>{let{addFilter:t,utils:i}=e,{Type:a,createRoute:n}=i,l=xg(e);return t("CREATE_VIEW",o=>{let{is:r,view:s,query:p}=o;if(!r("file"))return;let c=({root:d,props:m})=>{let{id:u}=m,g=p("GET_ITEM",u),f=p("GET_ALLOW_VIDEO_PREVIEW"),h=p("GET_ALLOW_AUDIO_PREVIEW");!g||g.archived||(!Ma(g.file)||!f)&&(!Xt(g.file)||!h)||(d.ref.mediaPreview=s.appendChildView(s.createChildView(l,{id:u})),d.dispatch("DID_MEDIA_PREVIEW_CONTAINER_CREATE",{id:u}))};s.registerWriter(n({DID_LOAD_ITEM:c},({root:d,props:m})=>{let{id:u}=m,g=p("GET_ITEM",u),f=d.query("GET_ALLOW_VIDEO_PREVIEW"),h=d.query("GET_ALLOW_AUDIO_PREVIEW");!g||(!Ma(g.file)||!f)&&(!Xt(g.file)||!h)||d.rect.element.hidden}))}),{options:{allowVideoPreview:[!0,a.BOOLEAN],allowAudioPreview:[!0,a.BOOLEAN]}}},yg=typeof window<"u"&&typeof window.document<"u";yg&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Pa}));var wo={labelIdle:'\u134B\u12ED\u120E\u127D \u1235\u1260\u12CD \u12A5\u12DA\u1205 \u130B\u122D \u12ED\u120D\u1240\u1241\u1275 \u12C8\u12ED\u121D \u134B\u12ED\u1209\u1295 \u12ED\u121D\u1228\u1321 ',labelInvalidField:"\u1218\u1235\u12A9 \u120D\u12AD \u12EB\u120D\u1206\u1291 \u134B\u12ED\u120E\u127D\u1295 \u12ED\u12DF\u120D",labelFileWaitingForSize:"\u12E8\u134B\u12ED\u1209\u1295 \u1218\u1320\u1295 \u1260\u1218\u1320\u1263\u1260\u1245 \u120B\u12ED",labelFileSizeNotAvailable:"\u12E8\u134B\u12ED\u1209\u1295 \u1218\u1320\u1295 \u120A\u1308\u129D \u12A0\u120D\u127B\u1208\u121D",labelFileLoading:"\u1260\u121B\u1295\u1260\u1265 \u120B\u12ED",labelFileLoadError:"\u1260\u121B\u1295\u1260\u1265 \u120B\u12ED \u127D\u130D\u122D \u1270\u1348\u1325\u122F\u120D",labelFileProcessing:"\u134B\u12ED\u1209\u1295 \u1260\u1218\u132B\u1295 \u120B\u12ED",labelFileProcessingComplete:"\u134B\u12ED\u1209\u1295 \u1218\u132B\u1295 \u1270\u1320\u1293\u1245\u124B\u120D",labelFileProcessingAborted:"\u134B\u12ED\u1209\u1295 \u1218\u132B\u1295 \u1270\u124B\u122D\u1327\u120D",labelFileProcessingError:"\u134B\u12ED\u1209\u1295 \u1260\u1218\u132B\u1295 \u120B\u12ED \u127D\u130D\u122D \u1270\u1348\u1325\u122F\u120D",labelFileProcessingRevertError:"\u1348\u12ED\u1209\u1295 \u1260\u1218\u1240\u120D\u1260\u1235 \u120B\u12ED \u127D\u130D\u122D \u1270\u1348\u1325\u122F\u120D",labelFileRemoveError:"\u1260\u121B\u1325\u134B\u1275 \u120B\u12ED \u127D\u130D\u122D \u1270\u1348\u1325\u122F\u120D",labelTapToCancel:"\u1208\u121B\u124B\u1228\u1325 \u1290\u12AB \u12EB\u12F5\u122D\u1309",labelTapToRetry:"\u12F0\u130D\u121E \u1208\u1218\u121E\u12A8\u122D \u1290\u12AB \u12EB\u12F5\u122D\u1309",labelTapToUndo:"\u12C8\u12F0\u1290\u1260\u1228\u1260\u1275 \u1208\u1218\u1218\u1208\u1235 \u1290\u12AB \u12EB\u12F5\u122D\u1309",labelButtonRemoveItem:"\u120B\u1325\u134B",labelButtonAbortItemLoad:"\u120B\u124B\u122D\u1325",labelButtonRetryItemLoad:"\u12F0\u130D\u121C \u120D\u121E\u12AD\u122D",labelButtonAbortItemProcessing:"\u12ED\u1245\u122D",labelButtonUndoItemProcessing:"\u12C8\u12F0\u1290\u1260\u1228\u1260\u1275 \u120D\u1218\u120D\u1235",labelButtonRetryItemProcessing:"\u12F0\u130D\u121C \u120D\u121E\u12AD\u122D",labelButtonProcessItem:"\u120D\u132B\u1295",labelMaxFileSizeExceeded:"\u134B\u12ED\u1209 \u1270\u120D\u124B\u120D",labelMaxFileSize:"\u12E8\u134B\u12ED\u120D \u1218\u1320\u1295 \u12A8 {filesize} \u1218\u1265\u1208\u1325 \u12A0\u12ED\u1348\u1240\u12F5\u121D",labelMaxTotalFileSizeExceeded:"\u12E8\u121A\u1348\u1240\u12F0\u12CD\u1295 \u1320\u1245\u120B\u120B \u12E8\u134B\u12ED\u120D \u1218\u1320\u1295 \u12A0\u120D\u1348\u12CB\u120D",labelMaxTotalFileSize:"\u1320\u1245\u120B\u120B \u12E8\u134B\u12ED\u120D \u1218\u1320\u1295 \u12A8 {filesize} \u1218\u1265\u1208\u1325 \u12A0\u12ED\u1348\u1240\u12F5\u121D",labelFileTypeNotAllowed:"\u12E8\u1270\u1233\u1233\u1270 \u12E8\u134B\u12ED\u120D \u12A0\u12ED\u1290\u1275 \u1290\u12CD",fileValidateTypeLabelExpectedTypes:"\u12E8\u134B\u12ED\u120D \u12A0\u12ED\u1290\u1271 \u1218\u1206\u1295 \u12E8\u121A\u1308\u1263\u12CD {allButLastType} \u12A5\u1293 {lastType} \u1290\u12CD",imageValidateSizeLabelFormatError:"\u12E8\u121D\u1235\u120D \u12A0\u12ED\u1290\u1271 \u1208\u1218\u132B\u1295 \u12A0\u12ED\u1206\u1295\u121D",imageValidateSizeLabelImageSizeTooSmall:"\u121D\u1235\u1209 \u1260\u1323\u121D \u12A0\u1295\u1237\u120D",imageValidateSizeLabelImageSizeTooBig:"\u121D\u1235\u1209 \u1260\u1323\u121D \u1270\u120D\u124B\u120D",imageValidateSizeLabelExpectedMinSize:"\u12DD\u1245\u1270\u129B\u12CD \u12E8\u121D\u1235\u120D \u120D\u12AC\u1275 {minWidth} \xD7 {minHeight} \u1290\u12CD",imageValidateSizeLabelExpectedMaxSize:"\u12A8\u134D\u1270\u129B\u12CD \u12E8\u121D\u1235\u120D \u120D\u12AC\u1275 {maxWidth} \xD7 {maxHeight} \u1290\u12CD",imageValidateSizeLabelImageResolutionTooLow:"\u12E8\u121D\u1235\u1209 \u1325\u122B\u1275 \u1260\u1323\u121D \u12DD\u1245\u1270\u129B \u1290\u12CD",imageValidateSizeLabelImageResolutionTooHigh:"\u12E8\u121D\u1235\u1209 \u1325\u122B\u1275 \u1260\u1323\u121D \u12A8\u134D\u1270\u129B \u1290\u12CD",imageValidateSizeLabelExpectedMinResolution:"\u12DD\u1245\u1270\u129B\u12CD \u12E8\u121D\u1235\u120D \u1325\u122B\u1275 {minResolution} \u1290\u12CD",imageValidateSizeLabelExpectedMaxResolution:"\u12A8\u134D\u1270\u129B\u12CD \u12E8\u121D\u1235\u120D \u1325\u122B\u1275 {maxResolution} \u1290\u12CD"};var Lo={labelIdle:'\u0627\u0633\u062D\u0628 \u0648 \u0627\u062F\u0631\u062C \u0645\u0644\u0641\u0627\u062A\u0643 \u0623\u0648 \u062A\u0635\u0641\u062D ',labelInvalidField:"\u0627\u0644\u062D\u0642\u0644 \u064A\u062D\u062A\u0648\u064A \u0639\u0644\u0649 \u0645\u0644\u0641\u0627\u062A \u063A\u064A\u0631 \u0635\u0627\u0644\u062D\u0629",labelFileWaitingForSize:"\u0628\u0627\u0646\u062A\u0638\u0627\u0631 \u0627\u0644\u062D\u062C\u0645",labelFileSizeNotAvailable:"\u0627\u0644\u062D\u062C\u0645 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D",labelFileLoading:"\u0628\u0627\u0644\u0625\u0646\u062A\u0638\u0627\u0631",labelFileLoadError:"\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u062A\u062D\u0645\u064A\u0644",labelFileProcessing:"\u064A\u062A\u0645 \u0627\u0644\u0631\u0641\u0639",labelFileProcessingComplete:"\u062A\u0645 \u0627\u0644\u0631\u0641\u0639",labelFileProcessingAborted:"\u062A\u0645 \u0625\u0644\u063A\u0627\u0621 \u0627\u0644\u0631\u0641\u0639",labelFileProcessingError:"\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u0631\u0641\u0639",labelFileProcessingRevertError:"\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u062A\u0631\u0627\u062C\u0639",labelFileRemoveError:"\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u062D\u0630\u0641",labelTapToCancel:"\u0627\u0646\u0642\u0631 \u0644\u0644\u0625\u0644\u063A\u0627\u0621",labelTapToRetry:"\u0627\u0646\u0642\u0631 \u0644\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",labelTapToUndo:"\u0627\u0646\u0642\u0631 \u0644\u0644\u062A\u0631\u0627\u062C\u0639",labelButtonRemoveItem:"\u0645\u0633\u062D",labelButtonAbortItemLoad:"\u0625\u0644\u063A\u0627\u0621",labelButtonRetryItemLoad:"\u0625\u0639\u0627\u062F\u0629",labelButtonAbortItemProcessing:"\u0625\u0644\u063A\u0627\u0621",labelButtonUndoItemProcessing:"\u062A\u0631\u0627\u062C\u0639",labelButtonRetryItemProcessing:"\u0625\u0639\u0627\u062F\u0629",labelButtonProcessItem:"\u0631\u0641\u0639",labelMaxFileSizeExceeded:"\u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u0627",labelMaxFileSize:"\u062D\u062C\u0645 \u0627\u0644\u0645\u0644\u0641 \u0627\u0644\u0623\u0642\u0635\u0649: {filesize}",labelMaxTotalFileSizeExceeded:"\u062A\u0645 \u062A\u062C\u0627\u0648\u0632 \u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u062D\u062C\u0645 \u0627\u0644\u0625\u062C\u0645\u0627\u0644\u064A",labelMaxTotalFileSize:"\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u062D\u062C\u0645 \u0627\u0644\u0645\u0644\u0641: {filesize}",labelFileTypeNotAllowed:"\u0645\u0644\u0641 \u0645\u0646 \u0646\u0648\u0639 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D",fileValidateTypeLabelExpectedTypes:"\u062A\u062A\u0648\u0642\u0639 {allButLastType} \u0645\u0646 {lastType}",imageValidateSizeLabelFormatError:"\u0646\u0648\u0639 \u0627\u0644\u0635\u0648\u0631\u0629 \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645",imageValidateSizeLabelImageSizeTooSmall:"\u0627\u0644\u0635\u0648\u0631\u0629 \u0635\u063A\u064A\u0631 \u062C\u062F\u0627",imageValidateSizeLabelImageSizeTooBig:"\u0627\u0644\u0635\u0648\u0631\u0629 \u0643\u0628\u064A\u0631\u0629 \u062C\u062F\u0627",imageValidateSizeLabelExpectedMinSize:"\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u062F\u0646\u0649 \u0644\u0644\u0623\u0628\u0639\u0627\u062F \u0647\u0648: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u0623\u0628\u0639\u0627\u062F \u0647\u0648: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0627\u0644\u062F\u0642\u0629 \u0636\u0639\u064A\u0641\u0629 \u062C\u062F\u0627",imageValidateSizeLabelImageResolutionTooHigh:"\u0627\u0644\u062F\u0642\u0629 \u0645\u0631\u062A\u0641\u0639\u0629 \u062C\u062F\u0627",imageValidateSizeLabelExpectedMinResolution:"\u0623\u0642\u0644 \u062F\u0642\u0629: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u0623\u0642\u0635\u0649 \u062F\u0642\u0629: {maxResolution}"};var Mo={labelIdle:'Fayl\u0131n\u0131z\u0131 S\xFCr\xFC\u015Fd\xFCr\xFCn & Burax\u0131n ya da Se\xE7in ',labelInvalidField:"Sah\u0259d\u0259 etibars\u0131z fayllar var",labelFileWaitingForSize:"\xD6l\xE7\xFC hesablan\u0131r",labelFileSizeNotAvailable:"\xD6l\xE7\xFC m\xF6vcud deyil",labelFileLoading:"Y\xFCkl\u0259nir",labelFileLoadError:"Y\xFCkl\u0259m\u0259 \u0259snas\u0131nda x\u0259ta ba\u015F verdi",labelFileProcessing:"Y\xFCkl\u0259nir",labelFileProcessingComplete:"Y\xFCkl\u0259m\u0259 tamamland\u0131",labelFileProcessingAborted:"Y\xFCkl\u0259m\u0259 l\u0259\u011Fv edildi",labelFileProcessingError:"Y\xFCk\u0259y\u0259rk\u0259n x\u0259ta ba\u015F verdi",labelFileProcessingRevertError:"Geri \xE7\u0259k\u0259rk\u0259n x\u0259ta ba\u015F verdi",labelFileRemoveError:"\xC7\u0131xarark\u0259n x\u0259ta ba\u015F verdi",labelTapToCancel:"\u0130mtina etm\u0259k \xFC\xE7\xFCn klikl\u0259yin",labelTapToRetry:"T\u0259krar yoxlamaq \xFC\xE7\xFCn klikl\u0259yin",labelTapToUndo:"Geri almaq \xFC\xE7\xFCn klikl\u0259yin",labelButtonRemoveItem:"\xC7\u0131xar",labelButtonAbortItemLoad:"\u0130mtina Et",labelButtonRetryItemLoad:"T\u0259krar yoxla",labelButtonAbortItemProcessing:"\u0130mtina et",labelButtonUndoItemProcessing:"Geri Al",labelButtonRetryItemProcessing:"T\u0259krar yoxla",labelButtonProcessItem:"Y\xFCkl\u0259",labelMaxFileSizeExceeded:"Fayl \xE7ox b\xF6y\xFCkd\xFCr",labelMaxFileSize:"\u018Fn b\xF6y\xFCk fayl \xF6l\xE7\xFCs\xFC: {filesize}",labelMaxTotalFileSizeExceeded:"Maksimum \xF6l\xE7\xFC ke\xE7ildi",labelMaxTotalFileSize:"Maksimum fayl \xF6l\xE7\xFCs\xFC :{filesize}",labelFileTypeNotAllowed:"Etibars\u0131z fayl tipi",fileValidateTypeLabelExpectedTypes:"Bu {allButLastType} ya da bu fayl olmas\u0131 laz\u0131md\u0131r: {lastType}",imageValidateSizeLabelFormatError:"\u015E\u0259kil tipi d\u0259st\u0259kl\u0259nmir",imageValidateSizeLabelImageSizeTooSmall:"\u015E\u0259kil \xE7ox ki\xE7ik",imageValidateSizeLabelImageSizeTooBig:"\u015E\u0259kil \xE7ox b\xF6y\xFCk",imageValidateSizeLabelExpectedMinSize:"Minimum \xF6l\xE7\xFC {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimum \xF6l\xE7\xFC {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"G\xF6r\xFCnt\xFC imkan\u0131 \xE7ox a\u015Fa\u011F\u0131",imageValidateSizeLabelImageResolutionTooHigh:"G\xF6r\xFCnt\xFC imkan\u0131 \xE7ox y\xFCks\u0259k",imageValidateSizeLabelExpectedMinResolution:"Minimum g\xF6r\xFCnt\xFC imkan\u0131 {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximum g\xF6r\xFCnt\xFC imkan\u0131 {maxResolution}"};var Ao={labelIdle:'Arrossega i deixa anar els teus fitxers o Navega ',labelInvalidField:"El camp cont\xE9 fitxers inv\xE0lids",labelFileWaitingForSize:"Esperant mida",labelFileSizeNotAvailable:"Mida no disponible",labelFileLoading:"Carregant",labelFileLoadError:"Error durant la c\xE0rrega",labelFileProcessing:"Pujant",labelFileProcessingComplete:"Pujada completada",labelFileProcessingAborted:"Pujada cancel\xB7lada",labelFileProcessingError:"Error durant la pujada",labelFileProcessingRevertError:"Error durant la reversi\xF3",labelFileRemoveError:"Error durant l'eliminaci\xF3",labelTapToCancel:"toca per cancel\xB7lar",labelTapToRetry:"toca per reintentar",labelTapToUndo:"toca per desfer",labelButtonRemoveItem:"Eliminar",labelButtonAbortItemLoad:"Cancel\xB7lar",labelButtonRetryItemLoad:"Reintentar",labelButtonAbortItemProcessing:"Cancel\xB7lar",labelButtonUndoItemProcessing:"Desfer",labelButtonRetryItemProcessing:"Reintentar",labelButtonProcessItem:"Pujar",labelMaxFileSizeExceeded:"El fitxer \xE9s massa gran",labelMaxFileSize:"La mida m\xE0xima del fitxer \xE9s {filesize}",labelMaxTotalFileSizeExceeded:"Mida m\xE0xima total excedida",labelMaxTotalFileSize:"La mida m\xE0xima total del fitxer \xE9s {filesize}",labelFileTypeNotAllowed:"Fitxer de tipus inv\xE0lid",fileValidateTypeLabelExpectedTypes:"Espera {allButLastType} o {lastType}",imageValidateSizeLabelFormatError:"Tipus d'imatge no suportada",imageValidateSizeLabelImageSizeTooSmall:"La imatge \xE9s massa petita",imageValidateSizeLabelImageSizeTooBig:"La imatge \xE9s massa gran",imageValidateSizeLabelExpectedMinSize:"La mida m\xEDnima \xE9s {minWidth} x {minHeight}",imageValidateSizeLabelExpectedMaxSize:"La mida m\xE0xima \xE9s {maxWidth} x {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"La resoluci\xF3 \xE9s massa baixa",imageValidateSizeLabelImageResolutionTooHigh:"La resoluci\xF3 \xE9s massa alta",imageValidateSizeLabelExpectedMinResolution:"La resoluci\xF3 m\xEDnima \xE9s {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"La resoluci\xF3 m\xE0xima \xE9s {maxResolution}"};var Po={labelIdle:'\u067E\u06D5\u0695\u06AF\u06D5\u06A9\u0627\u0646 \u0641\u0695\u06CE \u0628\u062F\u06D5 \u0626\u06CE\u0631\u06D5 \u0628\u06C6 \u0628\u0627\u0631\u06A9\u0631\u062F\u0646 \u06CC\u0627\u0646 \u0647\u06D5\u06B5\u0628\u0698\u06CE\u0631\u06D5 ',labelInvalidField:"\u067E\u06D5\u0695\u06AF\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06CC \u062A\u06CE\u062F\u0627\u06CC\u06D5",labelFileWaitingForSize:"\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06CC\u06CC \u0642\u06D5\u0628\u0627\u0631\u06D5",labelFileSizeNotAvailable:"\u0642\u06D5\u0628\u0627\u0631\u06D5 \u0628\u06D5\u0631\u062F\u06D5\u0633\u062A \u0646\u06CC\u06D5",labelFileLoading:"\u0628\u0627\u0631\u06A9\u0631\u062F\u0646",labelFileLoadError:"\u0647\u06D5\u06B5\u06D5 \u0644\u06D5\u0645\u0627\u0648\u06D5\u06CC \u0628\u0627\u0631\u06A9\u0631\u062F\u0646",labelFileProcessing:"\u0628\u0627\u0631\u06A9\u0631\u062F\u0646",labelFileProcessingComplete:"\u0628\u0627\u0631\u06A9\u0631\u062F\u0646 \u062A\u06D5\u0648\u0627\u0648 \u0628\u0648\u0648",labelFileProcessingAborted:"\u0628\u0627\u0631\u06A9\u0631\u062F\u0646 \u0647\u06D5\u06B5\u0648\u06D5\u0634\u0627\u06CC\u06D5\u0648\u06D5",labelFileProcessingError:"\u0647\u06D5\u06B5\u06D5 \u0644\u06D5\u06A9\u0627\u062A\u06CC \u0628\u0627\u0631\u06A9\u0631\u062F\u0646\u062F\u0627",labelFileProcessingRevertError:"\u0647\u06D5\u06B5\u06D5 \u0644\u06D5 \u06A9\u0627\u062A\u06CC \u06AF\u06D5\u0695\u0627\u0646\u06D5\u0648\u06D5",labelFileRemoveError:"\u0647\u06D5\u06B5\u06D5 \u0644\u06D5 \u06A9\u0627\u062A\u06CC \u0633\u0695\u06CC\u0646\u06D5\u0648\u06D5",labelTapToCancel:"\u0628\u06C6 \u0647\u06D5\u06B5\u0648\u06D5\u0634\u0627\u0646\u062F\u0646\u06D5\u0648\u06D5 Tab \u062F\u0627\u0628\u06AF\u0631\u06D5",labelTapToRetry:"tap \u062F\u0627\u0628\u06AF\u0631\u06D5 \u0628\u06C6 \u062F\u0648\u0648\u0628\u0627\u0631\u06D5\u06A9\u0631\u062F\u0646\u06D5\u0648\u06D5",labelTapToUndo:"tap \u062F\u0627\u0628\u06AF\u0631\u06D5 \u0628\u06C6 \u06AF\u06D5\u0695\u0627\u0646\u062F\u0646\u06D5\u0648\u06D5",labelButtonRemoveItem:"\u0633\u0695\u06CC\u0646\u06D5\u0648\u06D5",labelButtonAbortItemLoad:"\u0647\u06D5\u06B5\u0648\u06D5\u0634\u0627\u0646\u062F\u0646\u06D5\u0648\u06D5",labelButtonRetryItemLoad:"\u0647\u06D5\u0648\u06B5\u062F\u0627\u0646\u06D5\u0648\u06D5",labelButtonAbortItemProcessing:"\u067E\u06D5\u0634\u06CC\u0645\u0627\u0646\u0628\u0648\u0648\u0646\u06D5\u0648\u06D5",labelButtonUndoItemProcessing:"\u06AF\u06D5\u0695\u0627\u0646\u062F\u0646\u06D5\u0648\u06D5",labelButtonRetryItemProcessing:"\u0647\u06D5\u0648\u06B5\u062F\u0627\u0646\u06D5\u0648\u06D5",labelButtonProcessItem:"\u0628\u0627\u0631\u06A9\u0631\u062F\u0646",labelMaxFileSizeExceeded:"\u067E\u06D5\u0695\u06AF\u06D5 \u0632\u06C6\u0631 \u06AF\u06D5\u0648\u0631\u06D5\u06CC\u06D5",labelMaxFileSize:"\u0632\u06C6\u0631\u062A\u0631\u06CC\u0646 \u0642\u06D5\u0628\u0627\u0631\u06D5 {filesize}",labelMaxTotalFileSizeExceeded:"\u0632\u06C6\u0631\u062A\u0631\u06CC\u0646 \u0642\u06D5\u0628\u0627\u0631\u06D5\u06CC \u06A9\u06C6\u06CC \u06AF\u0634\u062A\u06CC \u062A\u06CE\u067E\u06D5\u0695\u06CE\u0646\u062F\u0631\u0627",labelMaxTotalFileSize:"\u0632\u06C6\u0631\u062A\u0631\u06CC\u0646 \u0642\u06D5\u0628\u0627\u0631\u06D5\u06CC \u06A9\u06C6\u06CC \u067E\u06D5\u0695\u06AF\u06D5 {filesize}",labelFileTypeNotAllowed:"\u062C\u06C6\u0631\u06CC \u067E\u06D5\u0695\u06AF\u06D5\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5",fileValidateTypeLabelExpectedTypes:"\u062C\u06AF\u06D5 \u0644\u06D5 {allButLastType} \u06CC\u0627\u0646 {lastType}",imageValidateSizeLabelFormatError:"\u062C\u06C6\u0631\u06CC \u0648\u06CE\u0646\u06D5 \u067E\u0627\u06B5\u067E\u0634\u062A\u06CC\u06CC \u0646\u06D5\u06A9\u0631\u0627\u0648\u06D5",imageValidateSizeLabelImageSizeTooSmall:"\u0648\u06CE\u0646\u06D5\u06A9\u06D5 \u0632\u06C6\u0631 \u0628\u0686\u0648\u0648\u06A9\u06D5",imageValidateSizeLabelImageSizeTooBig:"\u0648\u06CE\u0646\u06D5\u06A9\u06D5 \u0632\u06C6\u0631 \u06AF\u06D5\u0648\u0631\u06D5\u06CC\u06D5",imageValidateSizeLabelExpectedMinSize:"\u06A9\u06D5\u0645\u062A\u0631\u06CC\u0646 \u0642\u06D5\u0628\u0627\u0631\u06D5 {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u0632\u06C6\u0631\u062A\u0631\u06CC\u0646 \u0642\u06D5\u0628\u0627\u0631\u06D5 {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0648\u0631\u062F\u0628\u06CC\u0646\u06CC\u06CC\u06D5\u06A9\u06D5\u06CC \u0632\u06C6\u0631 \u06A9\u06D5\u0645\u06D5",imageValidateSizeLabelImageResolutionTooHigh:"\u0648\u0631\u062F\u0628\u06CC\u0646\u06CC\u06CC\u06D5\u06A9\u06D5\u06CC \u0632\u06C6\u0631 \u0628\u06D5\u0631\u0632\u06D5",imageValidateSizeLabelExpectedMinResolution:"\u06A9\u06D5\u0645\u062A\u0631\u06CC\u0646 \u0648\u0631\u062F\u0628\u06CC\u0646\u06CC\u06CC {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u0632\u06C6\u0631\u062A\u0631\u06CC\u0646 \u0648\u0631\u062F\u0628\u06CC\u0646\u06CC {maxResolution}"};var zo={labelIdle:'P\u0159et\xE1hn\u011Bte soubor sem (drag&drop) nebo Vyhledat ',labelInvalidField:"Pole obsahuje chybn\xE9 soubory",labelFileWaitingForSize:"Zji\u0161\u0165uje se velikost",labelFileSizeNotAvailable:"Velikost nen\xED zn\xE1m\xE1",labelFileLoading:"P\u0159en\xE1\u0161\xED se",labelFileLoadError:"Chyba p\u0159i p\u0159enosu",labelFileProcessing:"Prob\xEDh\xE1 upload",labelFileProcessingComplete:"Upload dokon\u010Den",labelFileProcessingAborted:"Upload stornov\xE1n",labelFileProcessingError:"Chyba p\u0159i uploadu",labelFileProcessingRevertError:"Chyba p\u0159i obnov\u011B",labelFileRemoveError:"Chyba p\u0159i odstran\u011Bn\xED",labelTapToCancel:"klepn\u011Bte pro storno",labelTapToRetry:"klepn\u011Bte pro opakov\xE1n\xED",labelTapToUndo:"klepn\u011Bte pro vr\xE1cen\xED",labelButtonRemoveItem:"Odstranit",labelButtonAbortItemLoad:"Storno",labelButtonRetryItemLoad:"Opakovat",labelButtonAbortItemProcessing:"Zp\u011Bt",labelButtonUndoItemProcessing:"Vr\xE1tit",labelButtonRetryItemProcessing:"Opakovat",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Soubor je p\u0159\xEDli\u0161 velk\xFD",labelMaxFileSize:"Nejv\u011Bt\u0161\xED velikost souboru je {filesize}",labelMaxTotalFileSizeExceeded:"P\u0159ekro\u010Dena maxim\xE1ln\xED celkov\xE1 velikost souboru",labelMaxTotalFileSize:"Maxim\xE1ln\xED celkov\xE1 velikost souboru je {filesize}",labelFileTypeNotAllowed:"Soubor je nespr\xE1vn\xE9ho typu",fileValidateTypeLabelExpectedTypes:"O\u010Dek\xE1v\xE1 se {allButLastType} nebo {lastType}",imageValidateSizeLabelFormatError:"Obr\xE1zek tohoto typu nen\xED podporov\xE1n",imageValidateSizeLabelImageSizeTooSmall:"Obr\xE1zek je p\u0159\xEDli\u0161 mal\xFD",imageValidateSizeLabelImageSizeTooBig:"Obr\xE1zek je p\u0159\xEDli\u0161 velk\xFD",imageValidateSizeLabelExpectedMinSize:"Minim\xE1ln\xED rozm\u011Br je {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maxim\xE1ln\xED rozm\u011Br je {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rozli\u0161en\xED je p\u0159\xEDli\u0161 mal\xE9",imageValidateSizeLabelImageResolutionTooHigh:"Rozli\u0161en\xED je p\u0159\xEDli\u0161 velk\xE9",imageValidateSizeLabelExpectedMinResolution:"Minim\xE1ln\xED rozli\u0161en\xED je {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maxim\xE1ln\xED rozli\u0161en\xED je {maxResolution}"};var Oo={labelIdle:'Tr\xE6k & slip filer eller Gennemse ',labelInvalidField:"Felt indeholder ugyldige filer",labelFileWaitingForSize:"Venter p\xE5 st\xF8rrelse",labelFileSizeNotAvailable:"St\xF8rrelse ikke tilg\xE6ngelig",labelFileLoading:"Loader",labelFileLoadError:"Load fejlede",labelFileProcessing:"Uploader",labelFileProcessingComplete:"Upload f\xE6rdig",labelFileProcessingAborted:"Upload annulleret",labelFileProcessingError:"Upload fejlede",labelFileProcessingRevertError:"Fortryd fejlede",labelFileRemoveError:"Fjern fejlede",labelTapToCancel:"tryk for at annullere",labelTapToRetry:"tryk for at pr\xF8ve igen",labelTapToUndo:"tryk for at fortryde",labelButtonRemoveItem:"Fjern",labelButtonAbortItemLoad:"Annuller",labelButtonRetryItemLoad:"Fors\xF8g igen",labelButtonAbortItemProcessing:"Annuller",labelButtonUndoItemProcessing:"Fortryd",labelButtonRetryItemProcessing:"Pr\xF8v igen",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Filen er for stor",labelMaxFileSize:"Maksimal filst\xF8rrelse er {filesize}",labelMaxTotalFileSizeExceeded:"Maksimal totalst\xF8rrelse overskredet",labelMaxTotalFileSize:"Maksimal total filst\xF8rrelse er {filesize}",labelFileTypeNotAllowed:"Ugyldig filtype",fileValidateTypeLabelExpectedTypes:"Forventer {allButLastType} eller {lastType}",imageValidateSizeLabelFormatError:"Ugyldigt format",imageValidateSizeLabelImageSizeTooSmall:"Billedet er for lille",imageValidateSizeLabelImageSizeTooBig:"Billedet er for stort",imageValidateSizeLabelExpectedMinSize:"Minimum st\xF8rrelse er {minBredde} \xD7 {minH\xF8jde}",imageValidateSizeLabelExpectedMaxSize:"Maksimal st\xF8rrelse er {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"For lav opl\xF8sning",imageValidateSizeLabelImageResolutionTooHigh:"For h\xF8j opl\xF8sning",imageValidateSizeLabelExpectedMinResolution:"Minimum opl\xF8sning er {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimal opl\xF8sning er {maxResolution}"};var Fo={labelIdle:'Dateien ablegen oder ausw\xE4hlen ',labelInvalidField:"Feld beinhaltet ung\xFCltige Dateien",labelFileWaitingForSize:"Dateigr\xF6\xDFe berechnen",labelFileSizeNotAvailable:"Dateigr\xF6\xDFe nicht verf\xFCgbar",labelFileLoading:"Laden",labelFileLoadError:"Fehler beim Laden",labelFileProcessing:"Upload l\xE4uft",labelFileProcessingComplete:"Upload abgeschlossen",labelFileProcessingAborted:"Upload abgebrochen",labelFileProcessingError:"Fehler beim Upload",labelFileProcessingRevertError:"Fehler beim Wiederherstellen",labelFileRemoveError:"Fehler beim L\xF6schen",labelTapToCancel:"abbrechen",labelTapToRetry:"erneut versuchen",labelTapToUndo:"r\xFCckg\xE4ngig",labelButtonRemoveItem:"Entfernen",labelButtonAbortItemLoad:"Verwerfen",labelButtonRetryItemLoad:"Erneut versuchen",labelButtonAbortItemProcessing:"Abbrechen",labelButtonUndoItemProcessing:"R\xFCckg\xE4ngig",labelButtonRetryItemProcessing:"Erneut versuchen",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Datei ist zu gro\xDF",labelMaxFileSize:"Maximale Dateigr\xF6\xDFe: {filesize}",labelMaxTotalFileSizeExceeded:"Maximale gesamte Dateigr\xF6\xDFe \xFCberschritten",labelMaxTotalFileSize:"Maximale gesamte Dateigr\xF6\xDFe: {filesize}",labelFileTypeNotAllowed:"Dateityp ung\xFCltig",fileValidateTypeLabelExpectedTypes:"Erwartet {allButLastType} oder {lastType}",imageValidateSizeLabelFormatError:"Bildtyp nicht unterst\xFCtzt",imageValidateSizeLabelImageSizeTooSmall:"Bild ist zu klein",imageValidateSizeLabelImageSizeTooBig:"Bild ist zu gro\xDF",imageValidateSizeLabelExpectedMinSize:"Mindestgr\xF6\xDFe: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximale Gr\xF6\xDFe: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Aufl\xF6sung ist zu niedrig",imageValidateSizeLabelImageResolutionTooHigh:"Aufl\xF6sung ist zu hoch",imageValidateSizeLabelExpectedMinResolution:"Mindestaufl\xF6sung: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximale Aufl\xF6sung: {maxResolution}"};var Do={labelIdle:'\u03A3\u03CD\u03C1\u03B5\u03C4\u03B5 \u03C4\u03B1 \u03B1\u03C1\u03C7\u03B5\u03AF\u03B1 \u03C3\u03B1\u03C2 \u03C3\u03C4\u03BF \u03C0\u03BB\u03B1\u03AF\u03C3\u03B9\u03BF \u03AE \u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 ',labelInvalidField:"\u03A4\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 \u03BC\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B1 \u03B1\u03C1\u03C7\u03B5\u03AF\u03B1",labelFileWaitingForSize:"\u03A3\u03B5 \u03B1\u03BD\u03B1\u03BC\u03BF\u03BD\u03AE \u03B3\u03B9\u03B1 \u03C4\u03BF \u03BC\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2",labelFileSizeNotAvailable:"\u039C\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03BC\u03B7 \u03B4\u03B9\u03B1\u03B8\u03AD\u03C3\u03B9\u03BC\u03BF",labelFileLoading:"\u03A6\u03CC\u03C1\u03C4\u03C9\u03C3\u03B7 \u03C3\u03B5 \u03B5\u03BE\u03AD\u03BB\u03B9\u03BE\u03B7",labelFileLoadError:"\u03A3\u03C6\u03AC\u03BB\u03BC\u03B1 \u03BA\u03B1\u03C4\u03AC \u03C4\u03B7 \u03C6\u03CC\u03C1\u03C4\u03C9\u03C3\u03B7",labelFileProcessing:"\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1",labelFileProcessingComplete:"\u0397 \u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03BF\u03BB\u03BF\u03BA\u03BB\u03B7\u03C1\u03CE\u03B8\u03B7\u03BA\u03B5",labelFileProcessingAborted:"\u0397 \u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03B1\u03BA\u03C5\u03C1\u03CE\u03B8\u03B7\u03BA\u03B5",labelFileProcessingError:"\u03A3\u03C6\u03AC\u03BB\u03BC\u03B1 \u03BA\u03B1\u03C4\u03AC \u03C4\u03B7\u03BD \u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1",labelFileProcessingRevertError:"\u03A3\u03C6\u03AC\u03BB\u03BC\u03B1 \u03BA\u03B1\u03C4\u03AC \u03C4\u03B7\u03BD \u03B5\u03C0\u03B1\u03BD\u03B1\u03C6\u03BF\u03C1\u03AC",labelFileRemoveError:"\u03A3\u03C6\u03AC\u03BB\u03BC\u03B1 \u03BA\u03B1\u03C4\u03AC \u03C4\u03B7\u03BD \u03B4\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE",labelTapToCancel:"\u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 \u03B3\u03B9\u03B1 \u03B1\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",labelTapToRetry:"\u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 \u03B3\u03B9\u03B1 \u03B5\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7",labelTapToUndo:"\u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 \u03B3\u03B9\u03B1 \u03B1\u03BD\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7",labelButtonRemoveItem:"\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7",labelButtonAbortItemLoad:"\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",labelButtonRetryItemLoad:"\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7",labelButtonAbortItemProcessing:"\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",labelButtonUndoItemProcessing:"\u0391\u03BD\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7",labelButtonRetryItemProcessing:"\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7",labelButtonProcessItem:"\u039C\u03B5\u03C4\u03B1\u03C6\u03CC\u03C1\u03C4\u03C9\u03C3\u03B7",labelMaxFileSizeExceeded:"\u03A4\u03BF \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF",labelMaxFileSize:"\u03A4\u03BF \u03BC\u03AD\u03B3\u03B9\u03C3\u03C4\u03BF \u03BC\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 \u03B5\u03AF\u03BD\u03B1\u03B9 {filesize}",labelMaxTotalFileSizeExceeded:"\u03A5\u03C0\u03AD\u03C1\u03B2\u03B1\u03C3\u03B7 \u03C4\u03BF\u03C5 \u03BC\u03AD\u03B3\u03B9\u03C3\u03C4\u03BF\u03C5 \u03C3\u03C5\u03BD\u03BF\u03BB\u03B9\u03BA\u03BF\u03CD \u03BC\u03B5\u03B3\u03AD\u03B8\u03BF\u03C5\u03C2",labelMaxTotalFileSize:"\u03A4\u03BF \u03BC\u03AD\u03B3\u03B9\u03C3\u03C4\u03BF \u03C3\u03C5\u03BD\u03BF\u03BB\u03B9\u03BA\u03CC \u03BC\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD \u03B5\u03AF\u03BD\u03B1\u03B9 {filesize}",labelFileTypeNotAllowed:"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03C4\u03CD\u03C0\u03BF\u03C2 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5",fileValidateTypeLabelExpectedTypes:"\u03A4\u03B1 \u03B1\u03C0\u03BF\u03B4\u03B5\u03BA\u03C4\u03AC \u03B1\u03C1\u03C7\u03B5\u03AF\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 {allButLastType} \u03AE {lastType}",imageValidateSizeLabelFormatError:"\u039F \u03C4\u03CD\u03C0\u03BF\u03C2 \u03C4\u03B7\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 \u03B4\u03B5\u03BD \u03C5\u03C0\u03BF\u03C3\u03C4\u03B7\u03C1\u03AF\u03B6\u03B5\u03C4\u03B1\u03B9",imageValidateSizeLabelImageSizeTooSmall:"\u0397 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03AE",imageValidateSizeLabelImageSizeTooBig:"\u0397 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03B7",imageValidateSizeLabelExpectedMinSize:"\u03A4\u03BF \u03B5\u03BB\u03AC\u03C7\u03B9\u03C3\u03C4\u03BF \u03B1\u03C0\u03BF\u03B4\u03B5\u03BA\u03C4\u03CC \u03BC\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03B5\u03AF\u03BD\u03B1\u03B9 {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u03A4\u03BF \u03BC\u03AD\u03B3\u03B9\u03C3\u03C4\u03BF \u03B1\u03C0\u03BF\u03B4\u03B5\u03BA\u03C4\u03CC \u03BC\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03B5\u03AF\u03BD\u03B1\u03B9 {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0397 \u03B1\u03BD\u03AC\u03BB\u03C5\u03C3\u03B7 \u03C4\u03B7\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03CD \u03C7\u03B1\u03BC\u03B7\u03BB\u03AE",imageValidateSizeLabelImageResolutionTooHigh:"\u0397 \u03B1\u03BD\u03AC\u03BB\u03C5\u03C3\u03B7 \u03C4\u03B7\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03CD \u03C5\u03C8\u03B7\u03BB\u03AE",imageValidateSizeLabelExpectedMinResolution:"\u0397 \u03B5\u03BB\u03AC\u03C7\u03B9\u03C3\u03C4\u03B7 \u03B1\u03C0\u03BF\u03B4\u03B5\u03BA\u03C4\u03AE \u03B1\u03BD\u03AC\u03BB\u03C5\u03C3\u03B7 \u03B5\u03AF\u03BD\u03B1\u03B9 {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u0397 \u03BC\u03AD\u03B3\u03B9\u03C3\u03C4\u03B7 \u03B1\u03C0\u03BF\u03B4\u03B5\u03BA\u03C4\u03AE \u03B1\u03BD\u03AC\u03BB\u03C5\u03C3\u03B7 \u03B5\u03AF\u03BD\u03B1\u03B9 {maxResolution}"};var Co={labelIdle:'Drag & Drop your files or Browse ',labelInvalidField:"Field contains invalid files",labelFileWaitingForSize:"Waiting for size",labelFileSizeNotAvailable:"Size not available",labelFileLoading:"Loading",labelFileLoadError:"Error during load",labelFileProcessing:"Uploading",labelFileProcessingComplete:"Upload complete",labelFileProcessingAborted:"Upload cancelled",labelFileProcessingError:"Error during upload",labelFileProcessingRevertError:"Error during revert",labelFileRemoveError:"Error during remove",labelTapToCancel:"tap to cancel",labelTapToRetry:"tap to retry",labelTapToUndo:"tap to undo",labelButtonRemoveItem:"Remove",labelButtonAbortItemLoad:"Abort",labelButtonRetryItemLoad:"Retry",labelButtonAbortItemProcessing:"Cancel",labelButtonUndoItemProcessing:"Undo",labelButtonRetryItemProcessing:"Retry",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"File is too large",labelMaxFileSize:"Maximum file size is {filesize}",labelMaxTotalFileSizeExceeded:"Maximum total size exceeded",labelMaxTotalFileSize:"Maximum total file size is {filesize}",labelFileTypeNotAllowed:"File of invalid type",fileValidateTypeLabelExpectedTypes:"Expects {allButLastType} or {lastType}",imageValidateSizeLabelFormatError:"Image type not supported",imageValidateSizeLabelImageSizeTooSmall:"Image is too small",imageValidateSizeLabelImageSizeTooBig:"Image is too big",imageValidateSizeLabelExpectedMinSize:"Minimum size is {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximum size is {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolution is too low",imageValidateSizeLabelImageResolutionTooHigh:"Resolution is too high",imageValidateSizeLabelExpectedMinResolution:"Minimum resolution is {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximum resolution is {maxResolution}"};var Bo={labelIdle:'Arrastra y suelta tus archivos o Examina ',labelInvalidField:"El campo contiene archivos inv\xE1lidos",labelFileWaitingForSize:"Esperando tama\xF1o",labelFileSizeNotAvailable:"Tama\xF1o no disponible",labelFileLoading:"Cargando",labelFileLoadError:"Error durante la carga",labelFileProcessing:"Subiendo",labelFileProcessingComplete:"Subida completa",labelFileProcessingAborted:"Subida cancelada",labelFileProcessingError:"Error durante la subida",labelFileProcessingRevertError:"Error durante la reversi\xF3n",labelFileRemoveError:"Error durante la eliminaci\xF3n",labelTapToCancel:"toca para cancelar",labelTapToRetry:"tocar para reintentar",labelTapToUndo:"tocar para deshacer",labelButtonRemoveItem:"Eliminar",labelButtonAbortItemLoad:"Cancelar",labelButtonRetryItemLoad:"Reintentar",labelButtonAbortItemProcessing:"Cancelar",labelButtonUndoItemProcessing:"Deshacer",labelButtonRetryItemProcessing:"Reintentar",labelButtonProcessItem:"Subir",labelMaxFileSizeExceeded:"El archivo es demasiado grande",labelMaxFileSize:"El tama\xF1o m\xE1ximo del archivo es {filesize}",labelMaxTotalFileSizeExceeded:"Tama\xF1o total m\xE1ximo excedido",labelMaxTotalFileSize:"El tama\xF1o total m\xE1ximo del archivo es {filesize}",labelFileTypeNotAllowed:"Archivo de tipo inv\xE1lido",fileValidateTypeLabelExpectedTypes:"Espera {allButLastType} o {lastType}",imageValidateSizeLabelFormatError:"Tipo de imagen no soportada",imageValidateSizeLabelImageSizeTooSmall:"La imagen es demasiado peque\xF1a",imageValidateSizeLabelImageSizeTooBig:"La imagen es demasiado grande",imageValidateSizeLabelExpectedMinSize:"El tama\xF1o m\xEDnimo es {minWidth} x {minHeight}",imageValidateSizeLabelExpectedMaxSize:"El tama\xF1o m\xE1ximo es {maxWidth} x {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"La resoluci\xF3n es demasiado baja",imageValidateSizeLabelImageResolutionTooHigh:"La resoluci\xF3n es demasiado alta",imageValidateSizeLabelExpectedMinResolution:"La resoluci\xF3n m\xEDnima es {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"La resoluci\xF3n m\xE1xima es {maxResolution}"};var No={labelIdle:'\u0641\u0627\u06CC\u0644 \u0631\u0627 \u0627\u06CC\u0646\u062C\u0627 \u0628\u06A9\u0634\u06CC\u062F \u0648 \u0631\u0647\u0627 \u06A9\u0646\u06CC\u062F\u060C \u06CC\u0627 \u062C\u0633\u062A\u062C\u0648 \u06A9\u0646\u06CC\u062F ',labelInvalidField:"\u0641\u06CC\u0644\u062F \u062F\u0627\u0631\u0627\u06CC \u0641\u0627\u06CC\u0644 \u0647\u0627\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A",labelFileWaitingForSize:"Waiting for size",labelFileSizeNotAvailable:"\u062D\u062C\u0645 \u0641\u0627\u06CC\u0644 \u0645\u062C\u0627\u0632 \u0646\u06CC\u0633\u062A",labelFileLoading:"\u062F\u0631\u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC",labelFileLoadError:"\u062E\u0637\u0627 \u062F\u0631 \u0632\u0645\u0627\u0646 \u0627\u062C\u0631\u0627",labelFileProcessing:"\u062F\u0631\u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC",labelFileProcessingComplete:"\u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u06A9\u0627\u0645\u0644 \u0634\u062F",labelFileProcessingAborted:"\u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u0644\u063A\u0648 \u0634\u062F",labelFileProcessingError:"\u062E\u0637\u0627 \u062F\u0631 \u0632\u0645\u0627\u0646 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC",labelFileProcessingRevertError:"\u062E\u0637\u0627 \u062F\u0631 \u0632\u0645\u0627\u0646 \u062D\u0630\u0641",labelFileRemoveError:"\u062E\u0637\u0627 \u062F\u0631 \u0632\u0645\u0627\u0646 \u062D\u0630\u0641",labelTapToCancel:"\u0628\u0631\u0627\u06CC \u0644\u063A\u0648 \u0636\u0631\u0628\u0647 \u0628\u0632\u0646\u06CC\u062F",labelTapToRetry:"\u0628\u0631\u0627\u06CC \u062A\u06A9\u0631\u0627\u0631 \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F",labelTapToUndo:"\u0628\u0631\u0627\u06CC \u0628\u0631\u06AF\u0634\u062A \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F",labelButtonRemoveItem:"\u062D\u0630\u0641",labelButtonAbortItemLoad:"\u0644\u063A\u0648",labelButtonRetryItemLoad:"\u062A\u06A9\u0631\u0627\u0631",labelButtonAbortItemProcessing:"\u0644\u063A\u0648",labelButtonUndoItemProcessing:"\u0628\u0631\u06AF\u0634\u062A",labelButtonRetryItemProcessing:"\u062A\u06A9\u0631\u0627\u0631",labelButtonProcessItem:"\u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC",labelMaxFileSizeExceeded:"\u0641\u0627\u06CC\u0644 \u0628\u0633\u06CC\u0627\u0631 \u062D\u062C\u06CC\u0645 \u0627\u0633\u062A",labelMaxFileSize:"\u062D\u062F\u0627\u06A9\u062B\u0631 \u0645\u062C\u0627\u0632 \u0641\u0627\u06CC\u0644 {filesize} \u0627\u0633\u062A",labelMaxTotalFileSizeExceeded:"\u0627\u0632 \u062D\u062F\u0627\u06A9\u062B\u0631 \u062D\u062C\u0645 \u0641\u0627\u06CC\u0644 \u0628\u06CC\u0634\u062A\u0631 \u0634\u062F",labelMaxTotalFileSize:"\u062D\u062F\u0627\u06A9\u062B\u0631 \u062D\u062C\u0645 \u0641\u0627\u06CC\u0644 {filesize} \u0627\u0633\u062A",labelFileTypeNotAllowed:"\u0646\u0648\u0639 \u0641\u0627\u06CC\u0644 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A",fileValidateTypeLabelExpectedTypes:"\u062F\u0631 \u0627\u0646\u062A\u0638\u0627\u0631 {allButLastType} \u06CC\u0627 {lastType}",imageValidateSizeLabelFormatError:"\u0641\u0631\u0645\u062A \u062A\u0635\u0648\u06CC\u0631 \u067E\u0634\u062A\u06CC\u0628\u0627\u0646\u06CC \u0646\u0645\u06CC \u0634\u0648\u062F",imageValidateSizeLabelImageSizeTooSmall:"\u062A\u0635\u0648\u06CC\u0631 \u0628\u0633\u06CC\u0627\u0631 \u06A9\u0648\u0686\u06A9 \u0627\u0633\u062A",imageValidateSizeLabelImageSizeTooBig:"\u062A\u0635\u0648\u06CC\u0631 \u0628\u0633\u06CC\u0627\u0631 \u0628\u0632\u0631\u06AF \u0627\u0633\u062A",imageValidateSizeLabelExpectedMinSize:"\u062D\u062F\u0627\u0642\u0644 \u0627\u0646\u062F\u0627\u0632\u0647 {minWidth} \xD7 {minHeight} \u0627\u0633\u062A",imageValidateSizeLabelExpectedMaxSize:"\u062D\u062F\u0627\u06A9\u062B\u0631 \u0627\u0646\u062F\u0627\u0632\u0647 {maxWidth} \xD7 {maxHeight} \u0627\u0633\u062A",imageValidateSizeLabelImageResolutionTooLow:"\u0648\u0636\u0648\u062D \u062A\u0635\u0648\u06CC\u0631 \u0628\u0633\u06CC\u0627\u0631 \u06A9\u0645 \u0627\u0633\u062A",imageValidateSizeLabelImageResolutionTooHigh:"\u0648\u0636\u0648\u0639 \u062A\u0635\u0648\u06CC\u0631 \u0628\u0633\u06CC\u0627\u0631 \u0632\u06CC\u0627\u062F \u0627\u0633\u062A",imageValidateSizeLabelExpectedMinResolution:"\u062D\u062F\u0627\u0642\u0644 \u0648\u0636\u0648\u062D \u062A\u0635\u0648\u06CC\u0631 {minResolution} \u0627\u0633\u062A",imageValidateSizeLabelExpectedMaxResolution:"\u062D\u062F\u0627\u06A9\u062B\u0631 \u0648\u0636\u0648\u062D \u062A\u0635\u0648\u06CC\u0631 {maxResolution} \u0627\u0633\u062A"};var ko={labelIdle:'Ved\xE4 ja pudota tiedostoja tai Selaa ',labelInvalidField:"Kent\xE4ss\xE4 on virheellisi\xE4 tiedostoja",labelFileWaitingForSize:"Odotetaan kokoa",labelFileSizeNotAvailable:"Kokoa ei saatavilla",labelFileLoading:"Ladataan",labelFileLoadError:"Virhe latauksessa",labelFileProcessing:"L\xE4hetet\xE4\xE4n",labelFileProcessingComplete:"L\xE4hetys valmis",labelFileProcessingAborted:"L\xE4hetys peruttu",labelFileProcessingError:"Virhe l\xE4hetyksess\xE4",labelFileProcessingRevertError:"Virhe palautuksessa",labelFileRemoveError:"Virhe poistamisessa",labelTapToCancel:"peruuta napauttamalla",labelTapToRetry:"yrit\xE4 uudelleen napauttamalla",labelTapToUndo:"kumoa napauttamalla",labelButtonRemoveItem:"Poista",labelButtonAbortItemLoad:"Keskeyt\xE4",labelButtonRetryItemLoad:"Yrit\xE4 uudelleen",labelButtonAbortItemProcessing:"Peruuta",labelButtonUndoItemProcessing:"Kumoa",labelButtonRetryItemProcessing:"Yrit\xE4 uudelleen",labelButtonProcessItem:"L\xE4het\xE4",labelMaxFileSizeExceeded:"Tiedoston koko on liian suuri",labelMaxFileSize:"Tiedoston maksimikoko on {filesize}",labelMaxTotalFileSizeExceeded:"Tiedostojen yhdistetty maksimikoko ylitetty",labelMaxTotalFileSize:"Tiedostojen yhdistetty maksimikoko on {filesize}",labelFileTypeNotAllowed:"Tiedostotyyppi\xE4 ei sallita",fileValidateTypeLabelExpectedTypes:"Sallitaan {allButLastType} tai {lastType}",imageValidateSizeLabelFormatError:"Kuvatyyppi\xE4 ei tueta",imageValidateSizeLabelImageSizeTooSmall:"Kuva on liian pieni",imageValidateSizeLabelImageSizeTooBig:"Kuva on liian suuri",imageValidateSizeLabelExpectedMinSize:"Minimikoko on {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimikoko on {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resoluutio on liian pieni",imageValidateSizeLabelImageResolutionTooHigh:"Resoluutio on liian suuri",imageValidateSizeLabelExpectedMinResolution:"Minimiresoluutio on {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimiresoluutio on {maxResolution}"};var Vo={labelIdle:'Faites glisser vos fichiers ou Parcourir ',labelInvalidField:"Le champ contient des fichiers invalides",labelFileWaitingForSize:"En attente de taille",labelFileSizeNotAvailable:"Taille non disponible",labelFileLoading:"Chargement",labelFileLoadError:"Erreur durant le chargement",labelFileProcessing:"Traitement",labelFileProcessingComplete:"Traitement effectu\xE9",labelFileProcessingAborted:"Traitement interrompu",labelFileProcessingError:"Erreur durant le traitement",labelFileProcessingRevertError:"Erreur durant la restauration",labelFileRemoveError:"Erreur durant la suppression",labelTapToCancel:"appuyer pour annuler",labelTapToRetry:"appuyer pour r\xE9essayer",labelTapToUndo:"appuyer pour revenir en arri\xE8re",labelButtonRemoveItem:"Retirer",labelButtonAbortItemLoad:"Annuler",labelButtonRetryItemLoad:"Recommencer",labelButtonAbortItemProcessing:"Annuler",labelButtonUndoItemProcessing:"Revenir en arri\xE8re",labelButtonRetryItemProcessing:"Recommencer",labelButtonProcessItem:"Transf\xE9rer",labelMaxFileSizeExceeded:"Le fichier est trop volumineux",labelMaxFileSize:"La taille maximale de fichier est {filesize}",labelMaxTotalFileSizeExceeded:"Taille totale maximale d\xE9pass\xE9e",labelMaxTotalFileSize:"La taille totale maximale des fichiers est {filesize}",labelFileTypeNotAllowed:"Fichier non valide",fileValidateTypeLabelExpectedTypes:"Attendu {allButLastType} ou {lastType}",imageValidateSizeLabelFormatError:"Type d'image non pris en charge",imageValidateSizeLabelImageSizeTooSmall:"L'image est trop petite",imageValidateSizeLabelImageSizeTooBig:"L'image est trop grande",imageValidateSizeLabelExpectedMinSize:"La taille minimale est {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"La taille maximale est {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"La r\xE9solution est trop faible",imageValidateSizeLabelImageResolutionTooHigh:"La r\xE9solution est trop \xE9lev\xE9e",imageValidateSizeLabelExpectedMinResolution:"La r\xE9solution minimale est {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"La r\xE9solution maximale est {maxResolution}"};var Go={labelIdle:'\u05D2\u05E8\u05D5\u05E8 \u05D5\u05E9\u05D7\u05E8\u05E8 \u05D0\u05EA \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD \u05DB\u05D0\u05DF \u05D0\u05D5 \u05DC\u05D7\u05E5 \u05DB\u05D0\u05DF \u05DC\u05D1\u05D7\u05D9\u05E8\u05D4 ',labelInvalidField:"\u05E7\u05D5\u05D1\u05E5 \u05DC\u05D0 \u05D7\u05D5\u05E7\u05D9",labelFileWaitingForSize:"\u05DE\u05D7\u05E9\u05D1 \u05D0\u05EA \u05D2\u05D5\u05D3\u05DC \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD",labelFileSizeNotAvailable:"\u05DC\u05D0 \u05E0\u05D9\u05EA\u05DF \u05DC\u05E7\u05D1\u05D5\u05E2 \u05D0\u05EA \u05D2\u05D5\u05D3\u05DC \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD",labelFileLoading:"\u05D8\u05D5\u05E2\u05DF...",labelFileLoadError:"\u05E9\u05D2\u05D9\u05D0\u05D4 \u05D0\u05E8\u05E2\u05D4 \u05D1\u05E2\u05EA \u05D8\u05E2\u05D9\u05E0\u05EA \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD",labelFileProcessing:"\u05DE\u05E2\u05DC\u05D4 \u05D0\u05EA \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD",labelFileProcessingComplete:"\u05D4\u05E2\u05DC\u05D0\u05EA \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD \u05D4\u05E1\u05EA\u05D9\u05D9\u05DE\u05D4",labelFileProcessingAborted:"\u05D4\u05E2\u05DC\u05D0\u05EA \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD \u05D1\u05D5\u05D8\u05DC\u05D4",labelFileProcessingError:"\u05E9\u05D2\u05D9\u05D0\u05D4 \u05D0\u05E8\u05E2\u05D4 \u05D1\u05E2\u05EA \u05D4\u05E2\u05DC\u05D0\u05EA \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD",labelFileProcessingRevertError:"\u05E9\u05D2\u05D9\u05D0\u05D4 \u05D0\u05E8\u05E2\u05D4 \u05D1\u05E2\u05EA \u05E9\u05D7\u05D6\u05D5\u05E8 \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD",labelFileRemoveError:"\u05E9\u05D2\u05D9\u05D0\u05D4 \u05D0\u05E8\u05E2\u05D4 \u05D1\u05E2\u05EA \u05D4\u05E1\u05E8\u05EA \u05D4\u05E7\u05D5\u05D1\u05E5",labelTapToCancel:"\u05D4\u05E7\u05DC\u05E7 \u05DC\u05D1\u05D9\u05D8\u05D5\u05DC",labelTapToRetry:"\u05D4\u05E7\u05DC\u05E7 \u05DC\u05E0\u05E1\u05D5\u05EA \u05E9\u05E0\u05D9\u05EA",labelTapToUndo:"\u05D4\u05E7\u05DC\u05E7 \u05DC\u05E9\u05D7\u05D6\u05E8",labelButtonRemoveItem:"\u05D4\u05E1\u05E8",labelButtonAbortItemLoad:"\u05D1\u05D8\u05DC",labelButtonRetryItemLoad:"\u05D8\u05E2\u05DF \u05E9\u05E0\u05D9\u05EA",labelButtonAbortItemProcessing:"\u05D1\u05D8\u05DC",labelButtonUndoItemProcessing:"\u05E9\u05D7\u05D6\u05E8",labelButtonRetryItemProcessing:"\u05E0\u05E1\u05D4 \u05E9\u05E0\u05D9\u05EA",labelButtonProcessItem:"\u05D4\u05E2\u05DC\u05D4 \u05E7\u05D5\u05D1\u05E5",labelMaxFileSizeExceeded:"\u05D4\u05E7\u05D5\u05D1\u05E5 \u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9",labelMaxFileSize:"\u05D2\u05D5\u05D3\u05DC \u05D4\u05DE\u05D9\u05E8\u05D1\u05D9 \u05D4\u05DE\u05D5\u05EA\u05E8 \u05D4\u05D5\u05D0: {filesize}",labelMaxTotalFileSizeExceeded:"\u05D2\u05D5\u05D3\u05DC \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD \u05D7\u05D5\u05E8\u05D2 \u05DE\u05D4\u05DB\u05DE\u05D5\u05EA \u05D4\u05DE\u05D5\u05EA\u05E8\u05EA",labelMaxTotalFileSize:"\u05D4\u05D2\u05D5\u05D3\u05DC \u05D4\u05DE\u05D9\u05E8\u05D1\u05D9 \u05E9\u05DC \u05E1\u05DA \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD: {filesize}",labelFileTypeNotAllowed:"\u05E7\u05D5\u05D1\u05E5 \u05DE\u05E1\u05D5\u05D2 \u05D6\u05D4 \u05D0\u05D9\u05E0\u05D5 \u05DE\u05D5\u05EA\u05E8",fileValidateTypeLabelExpectedTypes:"\u05D4\u05E7\u05D1\u05E6\u05D9\u05DD \u05D4\u05DE\u05D5\u05EA\u05E8\u05D9\u05DD \u05D4\u05DD {allButLastType} \u05D0\u05D5 {lastType}",imageValidateSizeLabelFormatError:"\u05EA\u05DE\u05D5\u05E0\u05D4 \u05D1\u05E4\u05D5\u05E8\u05DE\u05D8 \u05D6\u05D4 \u05D0\u05D9\u05E0\u05D4 \u05E0\u05EA\u05DE\u05DB\u05EA",imageValidateSizeLabelImageSizeTooSmall:"\u05EA\u05DE\u05D5\u05E0\u05D4 \u05D6\u05D5 \u05E7\u05D8\u05E0\u05D4 \u05DE\u05D3\u05D9",imageValidateSizeLabelImageSizeTooBig:"\u05EA\u05DE\u05D5\u05E0\u05D4 \u05D6\u05D5 \u05D2\u05D3\u05D5\u05DC\u05D4 \u05DE\u05D3\u05D9",imageValidateSizeLabelExpectedMinSize:"\u05D4\u05D2\u05D5\u05D3\u05DC \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA \u05DC\u05E4\u05D7\u05D5\u05EA: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u05D4\u05D2\u05D5\u05D3\u05DC \u05D4\u05DE\u05E8\u05D1\u05D9 \u05D4\u05DE\u05D5\u05EA\u05E8: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u05D4\u05E8\u05D6\u05D5\u05DC\u05D5\u05E6\u05D9\u05D4 \u05E9\u05DC \u05EA\u05DE\u05D5\u05E0\u05D4 \u05D6\u05D5 \u05E0\u05DE\u05D5\u05DB\u05D4 \u05DE\u05D3\u05D9",imageValidateSizeLabelImageResolutionTooHigh:"\u05D4\u05E8\u05D6\u05D5\u05DC\u05D5\u05E6\u05D9\u05D4 \u05E9\u05DC \u05EA\u05DE\u05D5\u05E0\u05D4 \u05D6\u05D5 \u05D2\u05D1\u05D5\u05D4\u05D4 \u05DE\u05D3\u05D9",imageValidateSizeLabelExpectedMinResolution:"\u05D4\u05E8\u05D6\u05D5\u05DC\u05D5\u05E6\u05D9\u05D4 \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DC\u05E4\u05D7\u05D5\u05EA: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u05D4\u05E8\u05D6\u05D5\u05DC\u05D5\u05E6\u05D9\u05D4 \u05D4\u05DE\u05D9\u05E8\u05D1\u05D9\u05EA \u05D4\u05DE\u05D5\u05EA\u05E8\u05EA \u05D4\u05D9\u05D0: {maxResolution}"};var Uo={labelIdle:'Ovdje "ispusti" datoteku ili Pretra\u017Ei ',labelInvalidField:"Polje sadr\u017Ei neispravne datoteke",labelFileWaitingForSize:"\u010Cekanje na veli\u010Dinu datoteke",labelFileSizeNotAvailable:"Veli\u010Dina datoteke nije dostupna",labelFileLoading:"U\u010Ditavanje",labelFileLoadError:"Gre\u0161ka tijekom u\u010Ditavanja",labelFileProcessing:"Prijenos",labelFileProcessingComplete:"Prijenos zavr\u0161en",labelFileProcessingAborted:"Prijenos otkazan",labelFileProcessingError:"Gre\u0161ka tijekom prijenosa",labelFileProcessingRevertError:"Gre\u0161ka tijekom vra\u0107anja",labelFileRemoveError:"Gre\u0161ka tijekom uklananja datoteke",labelTapToCancel:"Dodirni za prekid",labelTapToRetry:"Dodirni za ponovno",labelTapToUndo:"Dodirni za vra\u0107anje",labelButtonRemoveItem:"Ukloni",labelButtonAbortItemLoad:"Odbaci",labelButtonRetryItemLoad:"Ponovi",labelButtonAbortItemProcessing:"Prekini",labelButtonUndoItemProcessing:"Vrati",labelButtonRetryItemProcessing:"Ponovi",labelButtonProcessItem:"Prijenos",labelMaxFileSizeExceeded:"Datoteka je prevelika",labelMaxFileSize:"Maksimalna veli\u010Dina datoteke je {filesize}",labelMaxTotalFileSizeExceeded:"Maksimalna ukupna veli\u010Dina datoteke prekora\u010Dena",labelMaxTotalFileSize:"Maksimalna ukupna veli\u010Dina datoteke je {filesize}",labelFileTypeNotAllowed:"Tip datoteke nije podr\u017Ean",fileValidateTypeLabelExpectedTypes:"O\u010Dekivan {allButLastType} ili {lastType}",imageValidateSizeLabelFormatError:"Tip slike nije podr\u017Ean",imageValidateSizeLabelImageSizeTooSmall:"Slika je premala",imageValidateSizeLabelImageSizeTooBig:"Slika je prevelika",imageValidateSizeLabelExpectedMinSize:"Minimalna veli\u010Dina je {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimalna veli\u010Dina je {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rezolucija je preniska",imageValidateSizeLabelImageResolutionTooHigh:"Rezolucija je previsoka",imageValidateSizeLabelExpectedMinResolution:"Minimalna rezolucija je {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimalna rezolucija je {maxResolution}"};var Wo={labelIdle:'Mozgasd ide a f\xE1jlt a felt\xF6lt\xE9shez, vagy tall\xF3z\xE1s ',labelInvalidField:"A mez\u0151 \xE9rv\xE9nytelen f\xE1jlokat tartalmaz",labelFileWaitingForSize:"F\xE1ljm\xE9ret kisz\xE1mol\xE1sa",labelFileSizeNotAvailable:"A f\xE1jlm\xE9ret nem el\xE9rhet\u0151",labelFileLoading:"T\xF6lt\xE9s",labelFileLoadError:"Hiba a bet\xF6lt\xE9s sor\xE1n",labelFileProcessing:"Felt\xF6lt\xE9s",labelFileProcessingComplete:"Sikeres felt\xF6lt\xE9s",labelFileProcessingAborted:"A felt\xF6lt\xE9s megszak\xEDtva",labelFileProcessingError:"Hiba t\xF6rt\xE9nt a felt\xF6lt\xE9s sor\xE1n",labelFileProcessingRevertError:"Hiba a vissza\xE1ll\xEDt\xE1s sor\xE1n",labelFileRemoveError:"Hiba t\xF6rt\xE9nt az elt\xE1vol\xEDt\xE1s sor\xE1n",labelTapToCancel:"koppints a t\xF6rl\xE9shez",labelTapToRetry:"koppints az \xFAjrakezd\xE9shez",labelTapToUndo:"koppints a visszavon\xE1shoz",labelButtonRemoveItem:"Elt\xE1vol\xEDt\xE1s",labelButtonAbortItemLoad:"Megszak\xEDt\xE1s",labelButtonRetryItemLoad:"\xDAjrapr\xF3b\xE1lkoz\xE1s",labelButtonAbortItemProcessing:"Megszak\xEDt\xE1s",labelButtonUndoItemProcessing:"Visszavon\xE1s",labelButtonRetryItemProcessing:"\xDAjrapr\xF3b\xE1lkoz\xE1s",labelButtonProcessItem:"Felt\xF6lt\xE9s",labelMaxFileSizeExceeded:"A f\xE1jl t\xFAll\xE9pte a maxim\xE1lis m\xE9retet",labelMaxFileSize:"Maxim\xE1lis f\xE1jlm\xE9ret: {filesize}",labelMaxTotalFileSizeExceeded:"T\xFAll\xE9pte a maxim\xE1lis teljes m\xE9retet",labelMaxTotalFileSize:"A maxim\xE1is teljes f\xE1jlm\xE9ret: {filesize}",labelFileTypeNotAllowed:"\xC9rv\xE9nytelen t\xEDpus\xFA f\xE1jl",fileValidateTypeLabelExpectedTypes:"Enged\xE9lyezett t\xEDpusok {allButLastType} vagy {lastType}",imageValidateSizeLabelFormatError:"A k\xE9pt\xEDpus nem t\xE1mogatott",imageValidateSizeLabelImageSizeTooSmall:"A k\xE9p t\xFAl kicsi",imageValidateSizeLabelImageSizeTooBig:"A k\xE9p t\xFAl nagy",imageValidateSizeLabelExpectedMinSize:"Minimum m\xE9ret: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximum m\xE9ret: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"A felbont\xE1s t\xFAl alacsony",imageValidateSizeLabelImageResolutionTooHigh:"A felbont\xE1s t\xFAl magas",imageValidateSizeLabelExpectedMinResolution:"Minim\xE1is felbont\xE1s: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maxim\xE1lis felbont\xE1s: {maxResolution}"};var Ho={labelIdle:'Seret & Jatuhkan berkas Anda atau Jelajahi',labelInvalidField:"Isian berisi berkas yang tidak valid",labelFileWaitingForSize:"Menunggu ukuran berkas",labelFileSizeNotAvailable:"Ukuran berkas tidak tersedia",labelFileLoading:"Memuat",labelFileLoadError:"Kesalahan saat memuat",labelFileProcessing:"Mengunggah",labelFileProcessingComplete:"Pengunggahan selesai",labelFileProcessingAborted:"Pengunggahan dibatalkan",labelFileProcessingError:"Kesalahan saat pengunggahan",labelFileProcessingRevertError:"Kesalahan saat pemulihan",labelFileRemoveError:"Kesalahan saat penghapusan",labelTapToCancel:"ketuk untuk membatalkan",labelTapToRetry:"ketuk untuk mencoba lagi",labelTapToUndo:"ketuk untuk mengurungkan",labelButtonRemoveItem:"Hapus",labelButtonAbortItemLoad:"Batalkan",labelButtonRetryItemLoad:"Coba Kembali",labelButtonAbortItemProcessing:"Batalkan",labelButtonUndoItemProcessing:"Urungkan",labelButtonRetryItemProcessing:"Coba Kembali",labelButtonProcessItem:"Unggah",labelMaxFileSizeExceeded:"Berkas terlalu besar",labelMaxFileSize:"Ukuran berkas maksimum adalah {filesize}",labelMaxTotalFileSizeExceeded:"Jumlah berkas maksimum terlampaui",labelMaxTotalFileSize:"Jumlah berkas maksimum adalah {filesize}",labelFileTypeNotAllowed:"Jenis berkas tidak valid",fileValidateTypeLabelExpectedTypes:"Mengharapkan {allButLastType} atau {lastType}",imageValidateSizeLabelFormatError:"Jenis citra tidak didukung",imageValidateSizeLabelImageSizeTooSmall:"Citra terlalu kecil",imageValidateSizeLabelImageSizeTooBig:"Citra terlalu besar",imageValidateSizeLabelExpectedMinSize:"Ukuran minimum adalah {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Ukuran maksimum adalah {minWidth} \xD7 {minHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolusi terlalu rendah",imageValidateSizeLabelImageResolutionTooHigh:"Resolusi terlalu tinggi",imageValidateSizeLabelExpectedMinResolution:"Resolusi minimum adalah {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Resolusi maksimum adalah {maxResolution}"};var jo={labelIdle:'Trascina e rilascia i tuoi file oppure Carica ',labelInvalidField:"Il campo contiene dei file non validi",labelFileWaitingForSize:"Aspettando le dimensioni",labelFileSizeNotAvailable:"Dimensioni non disponibili",labelFileLoading:"Caricamento",labelFileLoadError:"Errore durante il caricamento",labelFileProcessing:"Caricamento",labelFileProcessingComplete:"Caricamento completato",labelFileProcessingAborted:"Caricamento cancellato",labelFileProcessingError:"Errore durante il caricamento",labelFileProcessingRevertError:"Errore durante il ripristino",labelFileRemoveError:"Errore durante l'eliminazione",labelTapToCancel:"tocca per cancellare",labelTapToRetry:"tocca per riprovare",labelTapToUndo:"tocca per ripristinare",labelButtonRemoveItem:"Elimina",labelButtonAbortItemLoad:"Cancella",labelButtonRetryItemLoad:"Ritenta",labelButtonAbortItemProcessing:"Camcella",labelButtonUndoItemProcessing:"Indietro",labelButtonRetryItemProcessing:"Ritenta",labelButtonProcessItem:"Carica",labelMaxFileSizeExceeded:"Il peso del file \xE8 eccessivo",labelMaxFileSize:"Il peso massimo del file \xE8 {filesize}",labelMaxTotalFileSizeExceeded:"Dimensione totale massima superata",labelMaxTotalFileSize:"La dimensione massima totale del file \xE8 {filesize}",labelFileTypeNotAllowed:"File non supportato",fileValidateTypeLabelExpectedTypes:"Aspetta {allButLastType} o {lastType}",imageValidateSizeLabelFormatError:"Tipo di immagine non compatibile",imageValidateSizeLabelImageSizeTooSmall:"L'immagine \xE8 troppo piccola",imageValidateSizeLabelImageSizeTooBig:"L'immagine \xE8 troppo grande",imageValidateSizeLabelExpectedMinSize:"La dimensione minima \xE8 {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"La dimensione massima \xE8 {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"La risoluzione \xE8 troppo bassa",imageValidateSizeLabelImageResolutionTooHigh:"La risoluzione \xE8 troppo alta",imageValidateSizeLabelExpectedMinResolution:"La risoluzione minima \xE8 {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"La risoluzione massima \xE8 {maxResolution}"};var Yo={labelIdle:'\u30D5\u30A1\u30A4\u30EB\u3092\u30C9\u30E9\u30C3\u30B0&\u30C9\u30ED\u30C3\u30D7\u53C8\u306F\u30D5\u30A1\u30A4\u30EB\u9078\u629E',labelInvalidField:"\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3067\u304D\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059",labelFileWaitingForSize:"\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u3092\u5F85\u3063\u3066\u3044\u307E\u3059",labelFileSizeNotAvailable:"\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u304C\u307F\u3064\u304B\u308A\u307E\u305B\u3093",labelFileLoading:"\u8AAD\u8FBC\u4E2D...",labelFileLoadError:"\u8AAD\u8FBC\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F",labelFileProcessing:"\u8AAD\u8FBC\u4E2D...",labelFileProcessingComplete:"\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u5B8C\u4E86",labelFileProcessingAborted:"\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u304C\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u307E\u3057\u305F",labelFileProcessingError:"\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F",labelFileProcessingRevertError:"\u30ED\u30FC\u30EB\u30D0\u30C3\u30AF\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F",labelFileRemoveError:"\u524A\u9664\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F",labelTapToCancel:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30AD\u30E3\u30F3\u30BB\u30EB",labelTapToRetry:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u4E0B\u3055\u3044",labelTapToUndo:"\u5143\u306B\u623B\u3059\u306B\u306F\u30BF\u30C3\u30D7\u3057\u307E\u3059",labelButtonRemoveItem:"\u524A\u9664",labelButtonAbortItemLoad:"\u4E2D\u65AD",labelButtonRetryItemLoad:"\u3082\u3046\u4E00\u5EA6\u5B9F\u884C",labelButtonAbortItemProcessing:"\u30AD\u30E3\u30F3\u30BB\u30EB",labelButtonUndoItemProcessing:"\u5143\u306B\u623B\u3059",labelButtonRetryItemProcessing:"\u3082\u3046\u4E00\u5EA6\u5B9F\u884C",labelButtonProcessItem:"\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",labelMaxFileSizeExceeded:"\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u304C\u5927\u304D\u3059\u304E\u307E\u3059",labelMaxFileSize:"\u6700\u5927\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u306F {filesize} \u3067\u3059",labelMaxTotalFileSizeExceeded:"\u6700\u5927\u5408\u8A08\u30B5\u30A4\u30BA\u3092\u8D85\u3048\u307E\u3057\u305F",labelMaxTotalFileSize:"\u6700\u5927\u5408\u8A08\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u306F {filesize} \u3067\u3059",labelFileTypeNotAllowed:"\u7121\u52B9\u306A\u30D5\u30A1\u30A4\u30EB\u3067\u3059",fileValidateTypeLabelExpectedTypes:"\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u308B\u30D5\u30A1\u30A4\u30EB\u306F {allButLastType} \u53C8\u306F {lastType} \u3067\u3059",imageValidateSizeLabelFormatError:"\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u306A\u3044\u753B\u50CF\u3067\u3059",imageValidateSizeLabelImageSizeTooSmall:"\u753B\u50CF\u304C\u5C0F\u3055\u3059\u304E\u307E\u3059",imageValidateSizeLabelImageSizeTooBig:"\u753B\u50CF\u304C\u5927\u304D\u3059\u304E\u307E\u3059",imageValidateSizeLabelExpectedMinSize:"\u753B\u50CF\u306E\u6700\u5C0F\u30B5\u30A4\u30BA\u306F{minWidth}\xD7{minHeight}\u3067\u3059",imageValidateSizeLabelExpectedMaxSize:"\u753B\u50CF\u306E\u6700\u5927\u30B5\u30A4\u30BA\u306F{maxWidth} \xD7 {maxHeight}\u3067\u3059",imageValidateSizeLabelImageResolutionTooLow:"\u753B\u50CF\u306E\u89E3\u50CF\u5EA6\u304C\u4F4E\u3059\u304E\u307E\u3059",imageValidateSizeLabelImageResolutionTooHigh:"\u753B\u50CF\u306E\u89E3\u50CF\u5EA6\u304C\u9AD8\u3059\u304E\u307E\u3059",imageValidateSizeLabelExpectedMinResolution:"\u753B\u50CF\u306E\u6700\u5C0F\u89E3\u50CF\u5EA6\u306F{minResolution}\u3067\u3059",imageValidateSizeLabelExpectedMaxResolution:"\u753B\u50CF\u306E\u6700\u5927\u89E3\u50CF\u5EA6\u306F{maxResolution}\u3067\u3059"};var qo={labelIdle:'\u1791\u17B6\u1789&\u178A\u17B6\u1780\u17CB\u17A0\u17D2\u179C\u17B6\u179B\u17CB\u17AF\u1780\u179F\u17B6\u179A\u179A\u1794\u179F\u17CB\u17A2\u17D2\u1793\u1780 \u17AC \u179F\u17D2\u179C\u17C2\u1784\u179A\u1780 ',labelInvalidField:"\u1785\u1793\u17D2\u179B\u17C4\u17C7\u1798\u17B6\u1793\u17AF\u1780\u179F\u17B6\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C",labelFileWaitingForSize:"\u1780\u17C6\u1796\u17BB\u1784\u179A\u1784\u17CB\u1785\u17B6\u17C6\u1791\u17C6\u17A0\u17C6",labelFileSizeNotAvailable:"\u1791\u17C6\u17A0\u17C6\u1798\u17B7\u1793\u17A2\u17B6\u1785\u1794\u17D2\u179A\u17BE\u1794\u17B6\u1793",labelFileLoading:"\u1780\u17C6\u1796\u17BB\u1784\u178A\u17C6\u178E\u17BE\u179A\u1780\u17B6\u179A",labelFileLoadError:"\u1798\u17B6\u1793\u1794\u1789\u17D2\u17A0\u17B6\u1780\u17C6\u17A1\u17BB\u1784\u1796\u17C1\u179B\u178A\u17C6\u178E\u17BE\u179A\u1780\u17B6\u179A",labelFileProcessing:"\u1780\u17C6\u1796\u17BB\u1784\u1795\u17D2\u1791\u17BB\u1780\u17A1\u17BE\u1784",labelFileProcessingComplete:"\u1780\u17B6\u179A\u1795\u17D2\u1791\u17BB\u1780\u17A1\u17BE\u1784\u1796\u17C1\u1789\u179B\u17C1\u1789",labelFileProcessingAborted:"\u1780\u17B6\u179A\u1794\u1784\u17D2\u17A0\u17C4\u17C7\u178F\u17D2\u179A\u17BC\u179C\u1794\u17B6\u1793\u1794\u17C4\u17C7\u1794\u1784\u17CB",labelFileProcessingError:"\u1798\u17B6\u1793\u1794\u1789\u17D2\u17A0\u17B6\u1780\u17C6\u17A1\u17BB\u1784\u1796\u17C1\u179B\u1780\u17C6\u1796\u17BB\u1784\u1795\u17D2\u1791\u17BB\u1780\u17A1\u17BE\u1784",labelFileProcessingRevertError:"\u1798\u17B6\u1793\u1794\u1789\u17D2\u17A0\u17B6\u1780\u17C6\u17A1\u17BB\u1784\u1796\u17C1\u179B\u178F\u17D2\u179A\u17A1\u1794\u17CB",labelFileRemoveError:"\u1798\u17B6\u1793\u1794\u1789\u17D2\u17A0\u17B6\u1780\u17C6\u17A1\u17BB\u1784\u1796\u17C1\u179B\u178A\u1780\u1785\u17C1\u1789",labelTapToCancel:"\u1785\u17BB\u1785\u178A\u17BE\u1798\u17D2\u1794\u17B8\u1794\u17C4\u17C7\u1794\u1784\u17CB",labelTapToRetry:"\u1785\u17BB\u1785\u178A\u17BE\u1798\u17D2\u1794\u17B8\u1796\u17D2\u1799\u17B6\u1799\u17B6\u1798\u1798\u17D2\u178F\u1784\u1791\u17C0\u178F",labelTapToUndo:"\u1785\u17BB\u1785\u178A\u17BE\u1798\u17D2\u1794\u17B8\u1798\u17B7\u1793\u1792\u17D2\u179C\u17BE\u179C\u17B7\u1789",labelButtonRemoveItem:"\u1799\u1780\u1785\u17C1\u1789",labelButtonAbortItemLoad:"\u1794\u17C4\u17C7\u1794\u1784\u17CB",labelButtonRetryItemLoad:"\u1796\u17D2\u1799\u17B6\u1799\u17B6\u1798\u1798\u17D2\u178F\u1784\u1791\u17C0\u178F",labelButtonAbortItemProcessing:"\u1794\u17C4\u17C7\u1794\u1784\u17CB",labelButtonUndoItemProcessing:"\u1798\u17B7\u1793\u1792\u17D2\u179C\u17BE\u179C\u17B7\u1789",labelButtonRetryItemProcessing:"\u1796\u17D2\u1799\u17B6\u1799\u17B6\u1798\u1798\u17D2\u178F\u1784\u1791\u17C0\u178F",labelButtonProcessItem:"\u1795\u17D2\u1791\u17BB\u1780\u17A1\u17BE\u1784",labelMaxFileSizeExceeded:"\u17AF\u1780\u179F\u17B6\u179A\u1792\u17C6\u1796\u17C1\u1780",labelMaxFileSize:"\u1791\u17C6\u17A0\u17C6\u17AF\u1780\u179F\u17B6\u179A\u17A2\u178F\u17B7\u1794\u179A\u1798\u17B6\u1782\u17BA {filesize}",labelMaxTotalFileSizeExceeded:"\u179B\u17BE\u179F\u1791\u17C6\u17A0\u17C6\u179F\u179A\u17BB\u1794\u17A2\u178F\u17B7\u1794\u179A\u1798\u17B6",labelMaxTotalFileSize:"\u1791\u17C6\u17A0\u17C6\u17AF\u1780\u179F\u17B6\u179A\u179F\u179A\u17BB\u1794\u17A2\u178F\u17B7\u1794\u179A\u1798\u17B6\u1782\u17BA {filesize}",labelFileTypeNotAllowed:"\u1794\u17D2\u179A\u1797\u17C1\u1791\u17AF\u1780\u179F\u17B6\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C",fileValidateTypeLabelExpectedTypes:"\u179A\u17C6\u1796\u17B9\u1784\u1790\u17B6 {allButLastType} \u17AC {lastType}",imageValidateSizeLabelFormatError:"\u1794\u17D2\u179A\u1797\u17C1\u1791\u179A\u17BC\u1794\u1797\u17B6\u1796\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C",imageValidateSizeLabelImageSizeTooSmall:"\u179A\u17BC\u1794\u1797\u17B6\u1796\u178F\u17BC\u1785\u1796\u17C1\u1780",imageValidateSizeLabelImageSizeTooBig:"\u179A\u17BC\u1794\u1797\u17B6\u1796\u1792\u17C6\u1796\u17C1\u1780",imageValidateSizeLabelExpectedMinSize:"\u1791\u17C6\u17A0\u17C6\u17A2\u1794\u17D2\u1794\u1794\u179A\u1798\u17B6\u1782\u17BA {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u1791\u17C6\u17A0\u17C6\u17A2\u178F\u17B7\u1794\u179A\u1798\u17B6\u1782\u17BA {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u1782\u17BB\u178E\u1797\u17B6\u1796\u1794\u1784\u17D2\u17A0\u17B6\u1789\u1791\u17B6\u1794\u1796\u17C1\u1780",imageValidateSizeLabelImageResolutionTooHigh:"\u1782\u17BB\u178E\u1797\u17B6\u1796\u1794\u1784\u17D2\u17A0\u17B6\u1789\u1781\u17D2\u1796\u179F\u17CB\u1796\u17C1\u1780",imageValidateSizeLabelExpectedMinResolution:"\u1782\u17BB\u178E\u1797\u17B6\u1796\u1794\u1784\u17D2\u17A0\u17B6\u1789\u17A2\u1794\u17D2\u1794\u1794\u179A\u1798\u17B6\u1782\u17BA {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u1782\u17BB\u178E\u1797\u17B6\u1796\u1794\u1784\u17D2\u17A0\u17B6\u1789\u17A2\u178F\u17B7\u1794\u179A\u1798\u17B6\u1782\u17BA {maxResolution}"};var $o={labelIdle:'\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8 \uD558\uAC70\uB098 \uCC3E\uC544\uBCF4\uAE30 ',labelInvalidField:"\uD544\uB4DC\uC5D0 \uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 \uD30C\uC77C\uC774 \uC788\uC2B5\uB2C8\uB2E4.",labelFileWaitingForSize:"\uC6A9\uB7C9 \uD655\uC778\uC911",labelFileSizeNotAvailable:"\uC0AC\uC6A9\uD560 \uC218 \uC5C6\uB294 \uC6A9\uB7C9",labelFileLoading:"\uBD88\uB7EC\uC624\uB294 \uC911",labelFileLoadError:"\uD30C\uC77C \uBD88\uB7EC\uC624\uAE30 \uC2E4\uD328",labelFileProcessing:"\uC5C5\uB85C\uB4DC \uC911",labelFileProcessingComplete:"\uC5C5\uB85C\uB4DC \uC131\uACF5",labelFileProcessingAborted:"\uC5C5\uB85C\uB4DC \uCDE8\uC18C\uB428",labelFileProcessingError:"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328",labelFileProcessingRevertError:"\uB418\uB3CC\uB9AC\uAE30 \uC2E4\uD328",labelFileRemoveError:"\uC81C\uAC70 \uC2E4\uD328",labelTapToCancel:"\uD0ED\uD558\uC5EC \uCDE8\uC18C",labelTapToRetry:"\uD0ED\uD558\uC5EC \uC7AC\uC2DC\uC791",labelTapToUndo:"\uD0ED\uD558\uC5EC \uC2E4\uD589 \uCDE8\uC18C",labelButtonRemoveItem:"\uC81C\uAC70",labelButtonAbortItemLoad:"\uC911\uB2E8",labelButtonRetryItemLoad:"\uC7AC\uC2DC\uC791",labelButtonAbortItemProcessing:"\uCDE8\uC18C",labelButtonUndoItemProcessing:"\uC2E4\uD589 \uCDE8\uC18C",labelButtonRetryItemProcessing:"\uC7AC\uC2DC\uC791",labelButtonProcessItem:"\uC5C5\uB85C\uB4DC",labelMaxFileSizeExceeded:"\uD30C\uC77C\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4.",labelMaxFileSize:"\uCD5C\uB300 \uD30C\uC77C \uC6A9\uB7C9\uC740 {filesize} \uC785\uB2C8\uB2E4.",labelMaxTotalFileSizeExceeded:"\uCD5C\uB300 \uC804\uCCB4 \uD30C\uC77C \uC6A9\uB7C9 \uCD08\uACFC\uD558\uC600\uC2B5\uB2C8\uB2E4.",labelMaxTotalFileSize:"\uCD5C\uB300 \uC804\uCCB4 \uD30C\uC77C \uC6A9\uB7C9\uC740 {filesize} \uC785\uB2C8\uB2E4.",labelFileTypeNotAllowed:"\uC798\uBABB\uB41C \uD615\uC2DD\uC758 \uD30C\uC77C",fileValidateTypeLabelExpectedTypes:"{allButLastType} \uB610\uB294 {lastType}",imageValidateSizeLabelFormatError:"\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC774\uBBF8\uC9C0 \uC720\uD615",imageValidateSizeLabelImageSizeTooSmall:"\uC774\uBBF8\uC9C0\uAC00 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4.",imageValidateSizeLabelImageSizeTooBig:"\uC774\uBBF8\uC9C0\uAC00 \uB108\uBB34 \uD07D\uB2C8\uB2E4.",imageValidateSizeLabelExpectedMinSize:"\uC774\uBBF8\uC9C0 \uCD5C\uC18C \uD06C\uAE30\uB294 {minWidth} \xD7 {minHeight} \uC785\uB2C8\uB2E4",imageValidateSizeLabelExpectedMaxSize:"\uC774\uBBF8\uC9C0 \uCD5C\uB300 \uD06C\uAE30\uB294 {maxWidth} \xD7 {maxHeight} \uC785\uB2C8\uB2E4",imageValidateSizeLabelImageResolutionTooLow:"\uD574\uC0C1\uB3C4\uAC00 \uB108\uBB34 \uB0AE\uC2B5\uB2C8\uB2E4.",imageValidateSizeLabelImageResolutionTooHigh:"\uD574\uC0C1\uB3C4\uAC00 \uB108\uBB34 \uB192\uC2B5\uB2C8\uB2E4.",imageValidateSizeLabelExpectedMinResolution:"\uCD5C\uC18C \uD574\uC0C1\uB3C4\uB294 {minResolution} \uC785\uB2C8\uB2E4.",imageValidateSizeLabelExpectedMaxResolution:"\uCD5C\uB300 \uD574\uC0C1\uB3C4\uB294 {maxResolution} \uC785\uB2C8\uB2E4."};var Xo={labelIdle:'\u012Ed\u0117kite failus \u010Dia arba Ie\u0161kokite ',labelInvalidField:"Laukelis talpina netinkamus failus",labelFileWaitingForSize:"Laukiama dyd\u017Eio",labelFileSizeNotAvailable:"Dydis ne\u017Einomas",labelFileLoading:"Kraunama",labelFileLoadError:"Klaida \u012Fkeliant",labelFileProcessing:"\u012Ekeliama",labelFileProcessingComplete:"\u012Ek\u0117limas s\u0117kmingas",labelFileProcessingAborted:"\u012Ek\u0117limas at\u0161auktas",labelFileProcessingError:"\u012Ekeliant \u012Fvyko klaida",labelFileProcessingRevertError:"At\u0161aukiant \u012Fvyko klaida",labelFileRemoveError:"I\u0161trinant \u012Fvyko klaida",labelTapToCancel:"Palieskite nor\u0117dami at\u0161aukti",labelTapToRetry:"Palieskite nor\u0117dami pakartoti",labelTapToUndo:"Palieskite nor\u0117dami at\u0161aukti",labelButtonRemoveItem:"I\u0161trinti",labelButtonAbortItemLoad:"Sustabdyti",labelButtonRetryItemLoad:"Pakartoti",labelButtonAbortItemProcessing:"At\u0161aukti",labelButtonUndoItemProcessing:"At\u0161aukti",labelButtonRetryItemProcessing:"Pakartoti",labelButtonProcessItem:"\u012Ekelti",labelMaxFileSizeExceeded:"Failas per didelis",labelMaxFileSize:"Maksimalus failo dydis yra {filesize}",labelMaxTotalFileSizeExceeded:"Vir\u0161ijote maksimal\u0173 leistin\u0105 dyd\u012F",labelMaxTotalFileSize:"Maksimalus leistinas dydis yra {filesize}",labelFileTypeNotAllowed:"Netinkamas failas",fileValidateTypeLabelExpectedTypes:"Tikisi {allButLastType} arba {lastType}",imageValidateSizeLabelFormatError:"Nuotraukos formatas nepalaikomas",imageValidateSizeLabelImageSizeTooSmall:"Nuotrauka per ma\u017Ea",imageValidateSizeLabelImageSizeTooBig:"Nuotrauka per didel\u0117",imageValidateSizeLabelExpectedMinSize:"Minimalus dydis yra {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimalus dydis yra {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rezoliucija per ma\u017Ea",imageValidateSizeLabelImageResolutionTooHigh:"Rezoliucija per didel\u0117",imageValidateSizeLabelExpectedMinResolution:"Minimali rezoliucija yra {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimali rezoliucija yra {maxResolution}"};var Ko={labelIdle:'Ievelciet savus failus vai p\u0101rl\u016Bkojiet \u0161eit ',labelInvalidField:"Lauks satur neder\u012Bgus failus",labelFileWaitingForSize:"Gaid\u0101m faila izm\u0113ru",labelFileSizeNotAvailable:"Izm\u0113rs nav pieejams",labelFileLoading:"Notiek iel\u0101de",labelFileLoadError:"Notika k\u013C\u016Bda iel\u0101des laik\u0101",labelFileProcessing:"Notiek aug\u0161upiel\u0101de",labelFileProcessingComplete:"Aug\u0161upiel\u0101de pabeigta",labelFileProcessingAborted:"Aug\u0161upiel\u0101de atcelta",labelFileProcessingError:"Notika k\u013C\u016Bda aug\u0161upiel\u0101des laik\u0101",labelFileProcessingRevertError:"Notika k\u013C\u016Bda atgrie\u0161anas laik\u0101",labelFileRemoveError:"Notika k\u013C\u016Bda dz\u0113\u0161anas laik\u0101",labelTapToCancel:"pieskarieties, lai atceltu",labelTapToRetry:"pieskarieties, lai m\u0113\u0123in\u0101tu v\u0113lreiz",labelTapToUndo:"pieskarieties, lai atsauktu",labelButtonRemoveItem:"Dz\u0113st",labelButtonAbortItemLoad:"P\u0101rtraukt",labelButtonRetryItemLoad:"M\u0113\u0123in\u0101t v\u0113lreiz",labelButtonAbortItemProcessing:"P\u0101rtraucam",labelButtonUndoItemProcessing:"Atsaucam",labelButtonRetryItemProcessing:"M\u0113\u0123in\u0101m v\u0113lreiz",labelButtonProcessItem:"Aug\u0161upiel\u0101d\u0113t",labelMaxFileSizeExceeded:"Fails ir p\u0101r\u0101k liels",labelMaxFileSize:"Maksim\u0101lais faila izm\u0113rs ir {filesize}",labelMaxTotalFileSizeExceeded:"P\u0101rsniegts maksim\u0101lais kop\u0113jais failu izm\u0113rs",labelMaxTotalFileSize:"Maksim\u0101lais kop\u0113jais failu izm\u0113rs ir {filesize}",labelFileTypeNotAllowed:"Neder\u012Bgs faila tips",fileValidateTypeLabelExpectedTypes:"Sagaid\u0101m {allButLastType} vai {lastType}",imageValidateSizeLabelFormatError:"Neatbilsto\u0161s att\u0113la tips",imageValidateSizeLabelImageSizeTooSmall:"Att\u0113ls ir p\u0101r\u0101k mazs",imageValidateSizeLabelImageSizeTooBig:"Att\u0113ls ir p\u0101r\u0101k liels",imageValidateSizeLabelExpectedMinSize:"Minim\u0101lais izm\u0113rs ir {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksim\u0101lais izm\u0113rs ir {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Iz\u0161\u0137irtsp\u0113ja ir p\u0101r\u0101k zema",imageValidateSizeLabelImageResolutionTooHigh:"Iz\u0161\u0137irtsp\u0113ja ir p\u0101r\u0101k augsta",imageValidateSizeLabelExpectedMinResolution:"Minim\u0101l\u0101 iz\u0161\u0137irtsp\u0113ja ir {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksim\u0101l\u0101 iz\u0161\u0137irtsp\u0113ja ir {maxResolution}"};var Qo={labelIdle:'Drag & Drop je bestanden of Bladeren ',labelInvalidField:"Veld bevat ongeldige bestanden",labelFileWaitingForSize:"Wachten op grootte",labelFileSizeNotAvailable:"Grootte niet beschikbaar",labelFileLoading:"Laden",labelFileLoadError:"Fout tijdens laden",labelFileProcessing:"Uploaden",labelFileProcessingComplete:"Upload afgerond",labelFileProcessingAborted:"Upload geannuleerd",labelFileProcessingError:"Fout tijdens upload",labelFileProcessingRevertError:"Fout bij herstellen",labelFileRemoveError:"Fout bij verwijderen",labelTapToCancel:"tik om te annuleren",labelTapToRetry:"tik om opnieuw te proberen",labelTapToUndo:"tik om ongedaan te maken",labelButtonRemoveItem:"Verwijderen",labelButtonAbortItemLoad:"Afbreken",labelButtonRetryItemLoad:"Opnieuw proberen",labelButtonAbortItemProcessing:"Annuleren",labelButtonUndoItemProcessing:"Ongedaan maken",labelButtonRetryItemProcessing:"Opnieuw proberen",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"Bestand is te groot",labelMaxFileSize:"Maximale bestandsgrootte is {filesize}",labelMaxTotalFileSizeExceeded:"Maximale totale grootte overschreden",labelMaxTotalFileSize:"Maximale totale bestandsgrootte is {filesize}",labelFileTypeNotAllowed:"Ongeldig bestandstype",fileValidateTypeLabelExpectedTypes:"Verwacht {allButLastType} of {lastType}",imageValidateSizeLabelFormatError:"Afbeeldingstype niet ondersteund",imageValidateSizeLabelImageSizeTooSmall:"Afbeelding is te klein",imageValidateSizeLabelImageSizeTooBig:"Afbeelding is te groot",imageValidateSizeLabelExpectedMinSize:"Minimale afmeting is {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximale afmeting is {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolutie is te laag",imageValidateSizeLabelImageResolutionTooHigh:"Resolution is too high",imageValidateSizeLabelExpectedMinResolution:"Minimale resolutie is {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximale resolutie is {maxResolution}"};var Zo={labelIdle:'Dra og slipp filene dine, eller Bla gjennom... ',labelInvalidField:"Feltet inneholder ugyldige filer",labelFileWaitingForSize:"Venter p\xE5 st\xF8rrelse",labelFileSizeNotAvailable:"St\xF8rrelse ikke tilgjengelig",labelFileLoading:"Laster",labelFileLoadError:"Feil under lasting",labelFileProcessing:"Laster opp",labelFileProcessingComplete:"Opplasting ferdig",labelFileProcessingAborted:"Opplasting avbrutt",labelFileProcessingError:"Feil under opplasting",labelFileProcessingRevertError:"Feil under reversering",labelFileRemoveError:"Feil under flytting",labelTapToCancel:"klikk for \xE5 avbryte",labelTapToRetry:"klikk for \xE5 pr\xF8ve p\xE5 nytt",labelTapToUndo:"klikk for \xE5 angre",labelButtonRemoveItem:"Fjern",labelButtonAbortItemLoad:"Avbryt",labelButtonRetryItemLoad:"Pr\xF8v p\xE5 nytt",labelButtonAbortItemProcessing:"Avbryt",labelButtonUndoItemProcessing:"Angre",labelButtonRetryItemProcessing:"Pr\xF8v p\xE5 nytt",labelButtonProcessItem:"Last opp",labelMaxFileSizeExceeded:"Filen er for stor",labelMaxFileSize:"Maksimal filst\xF8rrelse er {filesize}",labelMaxTotalFileSizeExceeded:"Maksimal total st\xF8rrelse oversteget",labelMaxTotalFileSize:"Maksimal total st\xF8rrelse er {filesize}",labelFileTypeNotAllowed:"Ugyldig filtype",fileValidateTypeLabelExpectedTypes:"Forventer {allButLastType} eller {lastType}",imageValidateSizeLabelFormatError:"Bildeformat ikke st\xF8ttet",imageValidateSizeLabelImageSizeTooSmall:"Bildet er for lite",imageValidateSizeLabelImageSizeTooBig:"Bildet er for stort",imageValidateSizeLabelExpectedMinSize:"Minimumsst\xF8rrelse er {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksimumsst\xF8rrelse er {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Oppl\xF8sningen er for lav",imageValidateSizeLabelImageResolutionTooHigh:"Oppl\xF8sningen er for h\xF8y",imageValidateSizeLabelExpectedMinResolution:"Minimum oppl\xF8sning er {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksimal oppl\xF8sning er {maxResolution}"};var Jo={labelIdle:'Przeci\u0105gnij i upu\u015B\u0107 lub wybierz pliki',labelInvalidField:"Nieprawid\u0142owe pliki",labelFileWaitingForSize:"Pobieranie rozmiaru",labelFileSizeNotAvailable:"Nieznany rozmiar",labelFileLoading:"Wczytywanie",labelFileLoadError:"B\u0142\u0105d wczytywania",labelFileProcessing:"Przesy\u0142anie",labelFileProcessingComplete:"Przes\u0142ano",labelFileProcessingAborted:"Przerwano",labelFileProcessingError:"Przesy\u0142anie nie powiod\u0142o si\u0119",labelFileProcessingRevertError:"Co\u015B posz\u0142o nie tak",labelFileRemoveError:"Nieudane usuni\u0119cie",labelTapToCancel:"Anuluj",labelTapToRetry:"Pon\xF3w",labelTapToUndo:"Cofnij",labelButtonRemoveItem:"Usu\u0144",labelButtonAbortItemLoad:"Przerwij",labelButtonRetryItemLoad:"Pon\xF3w",labelButtonAbortItemProcessing:"Anuluj",labelButtonUndoItemProcessing:"Cofnij",labelButtonRetryItemProcessing:"Pon\xF3w",labelButtonProcessItem:"Prze\u015Blij",labelMaxFileSizeExceeded:"Plik jest zbyt du\u017Cy",labelMaxFileSize:"Dopuszczalna wielko\u015B\u0107 pliku to {filesize}",labelMaxTotalFileSizeExceeded:"Przekroczono \u0142\u0105czny rozmiar plik\xF3w",labelMaxTotalFileSize:"\u0141\u0105czny rozmiar plik\xF3w nie mo\u017Ce przekroczy\u0107 {filesize}",labelFileTypeNotAllowed:"Niedozwolony rodzaj pliku",fileValidateTypeLabelExpectedTypes:"Oczekiwano {allButLastType} lub {lastType}",imageValidateSizeLabelFormatError:"Nieobs\u0142ugiwany format obrazu",imageValidateSizeLabelImageSizeTooSmall:"Obraz jest zbyt ma\u0142y",imageValidateSizeLabelImageSizeTooBig:"Obraz jest zbyt du\u017Cy",imageValidateSizeLabelExpectedMinSize:"Minimalne wymiary obrazu to {minWidth}\xD7{minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maksymalna wymiary obrazu to {maxWidth}\xD7{maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rozdzielczo\u015B\u0107 jest zbyt niska",imageValidateSizeLabelImageResolutionTooHigh:"Rozdzielczo\u015B\u0107 jest zbyt wysoka",imageValidateSizeLabelExpectedMinResolution:"Minimalna rozdzielczo\u015B\u0107 to {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maksymalna rozdzielczo\u015B\u0107 to {maxResolution}"};var _i={labelIdle:'Arraste e solte os arquivos ou Clique aqui ',labelInvalidField:"Arquivos inv\xE1lidos",labelFileWaitingForSize:"Calculando o tamanho do arquivo",labelFileSizeNotAvailable:"Tamanho do arquivo indispon\xEDvel",labelFileLoading:"Carregando",labelFileLoadError:"Erro durante o carregamento",labelFileProcessing:"Enviando",labelFileProcessingComplete:"Envio finalizado",labelFileProcessingAborted:"Envio cancelado",labelFileProcessingError:"Erro durante o envio",labelFileProcessingRevertError:"Erro ao reverter o envio",labelFileRemoveError:"Erro ao remover o arquivo",labelTapToCancel:"clique para cancelar",labelTapToRetry:"clique para reenviar",labelTapToUndo:"clique para desfazer",labelButtonRemoveItem:"Remover",labelButtonAbortItemLoad:"Abortar",labelButtonRetryItemLoad:"Reenviar",labelButtonAbortItemProcessing:"Cancelar",labelButtonUndoItemProcessing:"Desfazer",labelButtonRetryItemProcessing:"Reenviar",labelButtonProcessItem:"Enviar",labelMaxFileSizeExceeded:"Arquivo \xE9 muito grande",labelMaxFileSize:"O tamanho m\xE1ximo permitido: {filesize}",labelMaxTotalFileSizeExceeded:"Tamanho total dos arquivos excedido",labelMaxTotalFileSize:"Tamanho total permitido: {filesize}",labelFileTypeNotAllowed:"Tipo de arquivo inv\xE1lido",fileValidateTypeLabelExpectedTypes:"Tipos de arquivo suportados s\xE3o {allButLastType} ou {lastType}",imageValidateSizeLabelFormatError:"Tipo de imagem inv\xE1lida",imageValidateSizeLabelImageSizeTooSmall:"Imagem muito pequena",imageValidateSizeLabelImageSizeTooBig:"Imagem muito grande",imageValidateSizeLabelExpectedMinSize:"Tamanho m\xEDnimo permitida: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Tamanho m\xE1ximo permitido: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolu\xE7\xE3o muito baixa",imageValidateSizeLabelImageResolutionTooHigh:"Resolu\xE7\xE3o muito alta",imageValidateSizeLabelExpectedMinResolution:"Resolu\xE7\xE3o m\xEDnima permitida: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Resolu\xE7\xE3o m\xE1xima permitida: {maxResolution}"};var er={labelIdle:'Trage \u0219i plaseaz\u0103 fi\u0219iere sau Caut\u0103-le ',labelInvalidField:"C\xE2mpul con\u021Bine fi\u0219iere care nu sunt valide",labelFileWaitingForSize:"\xCEn a\u0219teptarea dimensiunii",labelFileSizeNotAvailable:"Dimensiunea nu este diponibil\u0103",labelFileLoading:"Se \xEEncarc\u0103",labelFileLoadError:"Eroare la \xEEnc\u0103rcare",labelFileProcessing:"Se \xEEncarc\u0103",labelFileProcessingComplete:"\xCEnc\u0103rcare finalizat\u0103",labelFileProcessingAborted:"\xCEnc\u0103rcare anulat\u0103",labelFileProcessingError:"Eroare la \xEEnc\u0103rcare",labelFileProcessingRevertError:"Eroare la anulare",labelFileRemoveError:"Eroare la \u015Ftergere",labelTapToCancel:"apas\u0103 pentru a anula",labelTapToRetry:"apas\u0103 pentru a re\xEEncerca",labelTapToUndo:"apas\u0103 pentru a anula",labelButtonRemoveItem:"\u015Eterge",labelButtonAbortItemLoad:"Anuleaz\u0103",labelButtonRetryItemLoad:"Re\xEEncearc\u0103",labelButtonAbortItemProcessing:"Anuleaz\u0103",labelButtonUndoItemProcessing:"Anuleaz\u0103",labelButtonRetryItemProcessing:"Re\xEEncearc\u0103",labelButtonProcessItem:"\xCEncarc\u0103",labelMaxFileSizeExceeded:"Fi\u0219ierul este prea mare",labelMaxFileSize:"Dimensiunea maxim\u0103 a unui fi\u0219ier este de {filesize}",labelMaxTotalFileSizeExceeded:"Dimensiunea total\u0103 maxim\u0103 a fost dep\u0103\u0219it\u0103",labelMaxTotalFileSize:"Dimensiunea total\u0103 maxim\u0103 a fi\u0219ierelor este de {filesize}",labelFileTypeNotAllowed:"Tipul fi\u0219ierului nu este valid",fileValidateTypeLabelExpectedTypes:"Se a\u0219teapt\u0103 {allButLastType} sau {lastType}",imageValidateSizeLabelFormatError:"Formatul imaginii nu este acceptat",imageValidateSizeLabelImageSizeTooSmall:"Imaginea este prea mic\u0103",imageValidateSizeLabelImageSizeTooBig:"Imaginea este prea mare",imageValidateSizeLabelExpectedMinSize:"M\u0103rimea minim\u0103 este de {maxWidth} x {maxHeight}",imageValidateSizeLabelExpectedMaxSize:"M\u0103rimea maxim\u0103 este de {maxWidth} x {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rezolu\u021Bia este prea mic\u0103",imageValidateSizeLabelImageResolutionTooHigh:"Rezolu\u021Bia este prea mare",imageValidateSizeLabelExpectedMinResolution:"Rezolu\u021Bia minim\u0103 este de {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Rezolu\u021Bia maxim\u0103 este de {maxResolution}"};var tr={labelIdle:'\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B \u0438\u043B\u0438 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 ',labelInvalidField:"\u041F\u043E\u043B\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0435 \u0444\u0430\u0439\u043B\u044B",labelFileWaitingForSize:"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0440\u0430\u0437\u043C\u0435\u0440",labelFileSizeNotAvailable:"\u0420\u0430\u0437\u043C\u0435\u0440 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F",labelFileLoading:"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435",labelFileLoadError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0438",labelFileProcessing:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430",labelFileProcessingComplete:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430",labelFileProcessingAborted:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u0430",labelFileProcessingError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0435",labelFileProcessingRevertError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u0435",labelFileRemoveError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0438",labelTapToCancel:"\u043D\u0430\u0436\u043C\u0438\u0442\u0435 \u0434\u043B\u044F \u043E\u0442\u043C\u0435\u043D\u044B",labelTapToRetry:"\u043D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u043F\u043E\u043F\u044B\u0442\u043A\u0443",labelTapToUndo:"\u043D\u0430\u0436\u043C\u0438\u0442\u0435 \u0434\u043B\u044F \u043E\u0442\u043C\u0435\u043D\u044B \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F",labelButtonRemoveItem:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",labelButtonAbortItemLoad:"\u041F\u0440\u0435\u043A\u0440\u0430\u0449\u0435\u043D\u043E",labelButtonRetryItemLoad:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u043F\u044B\u0442\u043A\u0443",labelButtonAbortItemProcessing:"\u041E\u0442\u043C\u0435\u043D\u0430",labelButtonUndoItemProcessing:"\u041E\u0442\u043C\u0435\u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F",labelButtonRetryItemProcessing:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u043F\u044B\u0442\u043A\u0443",labelButtonProcessItem:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430",labelMaxFileSizeExceeded:"\u0424\u0430\u0439\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439",labelMaxFileSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440 \u0444\u0430\u0439\u043B\u0430: {filesize}",labelMaxTotalFileSizeExceeded:"\u041F\u0440\u0435\u0432\u044B\u0448\u0435\u043D \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440",labelMaxTotalFileSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440 \u0444\u0430\u0439\u043B\u0430: {filesize}",labelFileTypeNotAllowed:"\u0424\u0430\u0439\u043B \u043D\u0435\u0432\u0435\u0440\u043D\u043E\u0433\u043E \u0442\u0438\u043F\u0430",fileValidateTypeLabelExpectedTypes:"\u041E\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044F {allButLastType} \u0438\u043B\u0438 {lastType}",imageValidateSizeLabelFormatError:"\u0422\u0438\u043F \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F",imageValidateSizeLabelImageSizeTooSmall:"\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435",imageValidateSizeLabelImageSizeTooBig:"\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435",imageValidateSizeLabelExpectedMinSize:"\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u043D\u0438\u0437\u043A\u043E\u0435",imageValidateSizeLabelImageResolutionTooHigh:"\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0432\u044B\u0441\u043E\u043A\u043E\u0435",imageValidateSizeLabelExpectedMinResolution:"\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435: {maxResolution}"};var ir={labelIdle:'Natiahn\xFA\u0165 s\xFAbor (drag&drop) alebo Vyh\u013Eada\u0165 ',labelInvalidField:"Pole obsahuje chybn\xE9 s\xFAbory",labelFileWaitingForSize:"Zis\u0165uje sa ve\u013Ekos\u0165",labelFileSizeNotAvailable:"Nezn\xE1ma ve\u013Ekos\u0165",labelFileLoading:"Pren\xE1\u0161a sa",labelFileLoadError:"Chyba pri prenose",labelFileProcessing:"Prebieha upload",labelFileProcessingComplete:"Upload dokon\u010Den\xFD",labelFileProcessingAborted:"Upload stornovan\xFD",labelFileProcessingError:"Chyba pri uploade",labelFileProcessingRevertError:"Chyba pri obnove",labelFileRemoveError:"Chyba pri odstr\xE1nen\xED",labelTapToCancel:"Kliknite pre storno",labelTapToRetry:"Kliknite pre opakovanie",labelTapToUndo:"Kliknite pre vr\xE1tenie",labelButtonRemoveItem:"Odstr\xE1ni\u0165",labelButtonAbortItemLoad:"Storno",labelButtonRetryItemLoad:"Opakova\u0165",labelButtonAbortItemProcessing:"Sp\xE4\u0165",labelButtonUndoItemProcessing:"Vr\xE1ti\u0165",labelButtonRetryItemProcessing:"Opakova\u0165",labelButtonProcessItem:"Upload",labelMaxFileSizeExceeded:"S\xFAbor je pr\xEDli\u0161 ve\u013Ek\xFD",labelMaxFileSize:"Najv\xE4\u010D\u0161ia ve\u013Ekos\u0165 s\xFAboru je {filesize}",labelMaxTotalFileSizeExceeded:"Prekro\u010Den\xE1 maxim\xE1lna celkov\xE1 ve\u013Ekos\u0165 s\xFAboru",labelMaxTotalFileSize:"Maxim\xE1lna celkov\xE1 ve\u013Ekos\u0165 s\xFAboru je {filesize}",labelFileTypeNotAllowed:"S\xFAbor je nespr\xE1vneho typu",fileValidateTypeLabelExpectedTypes:"O\u010Dak\xE1va sa {allButLastType} alebo {lastType}",imageValidateSizeLabelFormatError:"Obr\xE1zok tohto typu nie je podporovan\xFD",imageValidateSizeLabelImageSizeTooSmall:"Obr\xE1zok je pr\xEDli\u0161 mal\xFD",imageValidateSizeLabelImageSizeTooBig:"Obr\xE1zok je pr\xEDli\u0161 ve\u013Ek\xFD",imageValidateSizeLabelExpectedMinSize:"Minim\xE1lny rozmer je {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maxim\xE1lny rozmer je {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Rozl\xED\u0161enie je pr\xEDli\u0161 mal\xE9",imageValidateSizeLabelImageResolutionTooHigh:"Rozli\u0161enie je pr\xEDli\u0161 ve\u013Ek\xE9",imageValidateSizeLabelExpectedMinResolution:"Minim\xE1lne rozl\xED\u0161enie je {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maxim\xE1lne rozl\xED\u0161enie je {maxResolution}"};var ar={labelIdle:'Drag och sl\xE4pp dina filer eller Bl\xE4ddra ',labelInvalidField:"F\xE4ltet inneh\xE5ller felaktiga filer",labelFileWaitingForSize:"V\xE4ntar p\xE5 storlek",labelFileSizeNotAvailable:"Storleken finns inte tillg\xE4nglig",labelFileLoading:"Laddar",labelFileLoadError:"Fel under laddning",labelFileProcessing:"Laddar upp",labelFileProcessingComplete:"Uppladdning klar",labelFileProcessingAborted:"Uppladdning avbruten",labelFileProcessingError:"Fel under uppladdning",labelFileProcessingRevertError:"Fel under \xE5terst\xE4llning",labelFileRemoveError:"Fel under borttagning",labelTapToCancel:"tryck f\xF6r att avbryta",labelTapToRetry:"tryck f\xF6r att f\xF6rs\xF6ka igen",labelTapToUndo:"tryck f\xF6r att \xE5ngra",labelButtonRemoveItem:"Tabort",labelButtonAbortItemLoad:"Avbryt",labelButtonRetryItemLoad:"F\xF6rs\xF6k igen",labelButtonAbortItemProcessing:"Avbryt",labelButtonUndoItemProcessing:"\xC5ngra",labelButtonRetryItemProcessing:"F\xF6rs\xF6k igen",labelButtonProcessItem:"Ladda upp",labelMaxFileSizeExceeded:"Filen \xE4r f\xF6r stor",labelMaxFileSize:"St\xF6rsta till\xE5tna filstorlek \xE4r {filesize}",labelMaxTotalFileSizeExceeded:"Maximal uppladdningsstorlek uppn\xE5d",labelMaxTotalFileSize:"Maximal uppladdningsstorlek \xE4r {filesize}",labelFileTypeNotAllowed:"Felaktig filtyp",fileValidateTypeLabelExpectedTypes:"Godk\xE4nda filtyper {allButLastType} eller {lastType}",imageValidateSizeLabelFormatError:"Bildtypen saknar st\xF6d",imageValidateSizeLabelImageSizeTooSmall:"Bilden \xE4r f\xF6r liten",imageValidateSizeLabelImageSizeTooBig:"Bilden \xE4r f\xF6r stor",imageValidateSizeLabelExpectedMinSize:"Minimal storlek \xE4r {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximal storlek \xE4r {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Uppl\xF6sningen \xE4r f\xF6r l\xE5g",imageValidateSizeLabelImageResolutionTooHigh:"Uppl\xF6sningen \xE4r f\xF6r h\xF6g",imageValidateSizeLabelExpectedMinResolution:"Minsta till\xE5tna uppl\xF6sning \xE4r {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"H\xF6gsta till\xE5tna uppl\xF6sning \xE4r {maxResolution}"};var nr={labelIdle:'Dosyan\u0131z\u0131 S\xFCr\xFCkleyin & B\u0131rak\u0131n ya da Se\xE7in ',labelInvalidField:"Alan ge\xE7ersiz dosyalar i\xE7eriyor",labelFileWaitingForSize:"Boyut hesaplan\u0131yor",labelFileSizeNotAvailable:"Boyut mevcut de\u011Fil",labelFileLoading:"Y\xFCkleniyor",labelFileLoadError:"Y\xFCkleme s\u0131ras\u0131nda hata olu\u015Ftu",labelFileProcessing:"Y\xFCkleniyor",labelFileProcessingComplete:"Y\xFCkleme tamamland\u0131",labelFileProcessingAborted:"Y\xFCkleme iptal edildi",labelFileProcessingError:"Y\xFCklerken hata olu\u015Ftu",labelFileProcessingRevertError:"Geri \xE7ekerken hata olu\u015Ftu",labelFileRemoveError:"Kald\u0131r\u0131rken hata olu\u015Ftu",labelTapToCancel:"\u0130ptal etmek i\xE7in t\u0131klay\u0131n",labelTapToRetry:"Tekrar denemek i\xE7in t\u0131klay\u0131n",labelTapToUndo:"Geri almak i\xE7in t\u0131klay\u0131n",labelButtonRemoveItem:"Kald\u0131r",labelButtonAbortItemLoad:"\u0130ptal Et",labelButtonRetryItemLoad:"Tekrar dene",labelButtonAbortItemProcessing:"\u0130ptal et",labelButtonUndoItemProcessing:"Geri Al",labelButtonRetryItemProcessing:"Tekrar dene",labelButtonProcessItem:"Y\xFCkle",labelMaxFileSizeExceeded:"Dosya \xE7ok b\xFCy\xFCk",labelMaxFileSize:"En fazla dosya boyutu: {filesize}",labelMaxTotalFileSizeExceeded:"Maximum boyut a\u015F\u0131ld\u0131",labelMaxTotalFileSize:"Maximum dosya boyutu :{filesize}",labelFileTypeNotAllowed:"Ge\xE7ersiz dosya tipi",fileValidateTypeLabelExpectedTypes:"\u015Eu {allButLastType} ya da \u015Fu dosya olmas\u0131 gerekir: {lastType}",imageValidateSizeLabelFormatError:"Resim tipi desteklenmiyor",imageValidateSizeLabelImageSizeTooSmall:"Resim \xE7ok k\xFC\xE7\xFCk",imageValidateSizeLabelImageSizeTooBig:"Resim \xE7ok b\xFCy\xFCk",imageValidateSizeLabelExpectedMinSize:"Minimum boyut {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Maximum boyut {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\xC7\xF6z\xFCn\xFCrl\xFCk \xE7ok d\xFC\u015F\xFCk",imageValidateSizeLabelImageResolutionTooHigh:"\xC7\xF6z\xFCn\xFCrl\xFCk \xE7ok y\xFCksek",imageValidateSizeLabelExpectedMinResolution:"Minimum \xE7\xF6z\xFCn\xFCrl\xFCk {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Maximum \xE7\xF6z\xFCn\xFCrl\xFCk {maxResolution}"};var lr={labelIdle:'\u041F\u0435\u0440\u0435\u0442\u044F\u0433\u043D\u0456\u0442\u044C \u0444\u0430\u0439\u043B\u0438 \u0430\u0431\u043E \u0432\u0438\u0431\u0435\u0440\u0456\u0442\u044C ',labelInvalidField:"\u041F\u043E\u043B\u0435 \u043C\u0456\u0441\u0442\u0438\u0442\u044C \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u0456 \u0444\u0430\u0439\u043B\u0438",labelFileWaitingForSize:"\u0412\u043A\u0430\u0436\u0456\u0442\u044C \u0440\u043E\u0437\u043C\u0456\u0440",labelFileSizeNotAvailable:"\u0420\u043E\u0437\u043C\u0456\u0440 \u043D\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0438\u0439",labelFileLoading:"\u041E\u0447\u0456\u043A\u0443\u0432\u0430\u043D\u043D\u044F",labelFileLoadError:"\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u043E\u0447\u0456\u043A\u0443\u0432\u0430\u043D\u043D\u0456",labelFileProcessing:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F",labelFileProcessingComplete:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E",labelFileProcessingAborted:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F \u0441\u043A\u0430\u0441\u043E\u0432\u0430\u043D\u043E",labelFileProcessingError:"\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u0437\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u0456",labelFileProcessingRevertError:"\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u0432\u0456\u0434\u043D\u043E\u0432\u043B\u0435\u043D\u043D\u0456",labelFileRemoveError:"\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u0432\u0438\u0434\u0430\u043B\u0435\u043D\u043D\u0456",labelTapToCancel:"\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438",labelTapToRetry:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438 \u0441\u043F\u0440\u043E\u0431\u0443",labelTapToUndo:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u0432\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438 \u043E\u0441\u0442\u0430\u043D\u043D\u044E \u0434\u0456\u044E",labelButtonRemoveItem:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438",labelButtonAbortItemLoad:"\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438",labelButtonRetryItemLoad:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438 \u0441\u043F\u0440\u043E\u0431\u0443",labelButtonAbortItemProcessing:"\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438",labelButtonUndoItemProcessing:"\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438 \u043E\u0441\u0442\u0430\u043D\u043D\u044E \u0434\u0456\u044E",labelButtonRetryItemProcessing:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438 \u0441\u043F\u0440\u043E\u0431\u0443",labelButtonProcessItem:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F",labelMaxFileSizeExceeded:"\u0424\u0430\u0439\u043B \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0438\u0439",labelMaxFileSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440 \u0444\u0430\u0439\u043B\u0443: {filesize}",labelMaxTotalFileSizeExceeded:"\u041F\u0435\u0440\u0435\u0432\u0438\u0449\u0435\u043D\u043E \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0437\u0430\u0433\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440",labelMaxTotalFileSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0437\u0430\u0433\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440: {filesize}",labelFileTypeNotAllowed:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0444\u0430\u0439\u043B\u0443 \u043D\u0435 \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0454\u0442\u044C\u0441\u044F",fileValidateTypeLabelExpectedTypes:"\u041E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F {allButLastType} \u0430\u0431\u043E {lastType}",imageValidateSizeLabelFormatError:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u043D\u0435 \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0454\u0442\u044C\u0441\u044F",imageValidateSizeLabelImageSizeTooSmall:"\u0417\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u0435",imageValidateSizeLabelImageSizeTooBig:"\u0417\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435",imageValidateSizeLabelExpectedMinSize:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0420\u043E\u0437\u043C\u0456\u0440\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u0456",imageValidateSizeLabelImageResolutionTooHigh:"\u0420\u043E\u0437\u043C\u0456\u0440\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0456",imageValidateSizeLabelExpectedMinResolution:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0456 \u0440\u043E\u0437\u043C\u0456\u0440\u0438: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0456 \u0440\u043E\u0437\u043C\u0456\u0440\u0438: {maxResolution}"};var or={labelIdle:'K\xE9o th\u1EA3 t\u1EC7p c\u1EE7a b\u1EA1n ho\u1EB7c T\xECm ki\u1EBFm ',labelInvalidField:"Tr\u01B0\u1EDDng ch\u1EE9a c\xE1c t\u1EC7p kh\xF4ng h\u1EE3p l\u1EC7",labelFileWaitingForSize:"\u0110ang ch\u1EDD k\xEDch th\u01B0\u1EDBc",labelFileSizeNotAvailable:"K\xEDch th\u01B0\u1EDBc kh\xF4ng c\xF3 s\u1EB5n",labelFileLoading:"\u0110ang t\u1EA3i",labelFileLoadError:"L\u1ED7i khi t\u1EA3i",labelFileProcessing:"\u0110ang t\u1EA3i l\xEAn",labelFileProcessingComplete:"T\u1EA3i l\xEAn th\xE0nh c\xF4ng",labelFileProcessingAborted:"\u0110\xE3 hu\u1EF7 t\u1EA3i l\xEAn",labelFileProcessingError:"L\u1ED7i khi t\u1EA3i l\xEAn",labelFileProcessingRevertError:"L\u1ED7i khi ho\xE0n nguy\xEAn",labelFileRemoveError:"L\u1ED7i khi x\xF3a",labelTapToCancel:"nh\u1EA5n \u0111\u1EC3 h\u1EE7y",labelTapToRetry:"nh\u1EA5n \u0111\u1EC3 th\u1EED l\u1EA1i",labelTapToUndo:"nh\u1EA5n \u0111\u1EC3 ho\xE0n t\xE1c",labelButtonRemoveItem:"Xo\xE1",labelButtonAbortItemLoad:"Hu\u1EF7 b\u1ECF",labelButtonRetryItemLoad:"Th\u1EED l\u1EA1i",labelButtonAbortItemProcessing:"H\u1EE7y b\u1ECF",labelButtonUndoItemProcessing:"Ho\xE0n t\xE1c",labelButtonRetryItemProcessing:"Th\u1EED l\u1EA1i",labelButtonProcessItem:"T\u1EA3i l\xEAn",labelMaxFileSizeExceeded:"T\u1EADp tin qu\xE1 l\u1EDBn",labelMaxFileSize:"K\xEDch th\u01B0\u1EDBc t\u1EC7p t\u1ED1i \u0111a l\xE0 {filesize}",labelMaxTotalFileSizeExceeded:"\u0110\xE3 v\u01B0\u1EE3t qu\xE1 t\u1ED5ng k\xEDch th\u01B0\u1EDBc t\u1ED1i \u0111a",labelMaxTotalFileSize:"T\u1ED5ng k\xEDch th\u01B0\u1EDBc t\u1EC7p t\u1ED1i \u0111a l\xE0 {filesize}",labelFileTypeNotAllowed:"T\u1EC7p thu\u1ED9c lo\u1EA1i kh\xF4ng h\u1EE3p l\u1EC7",fileValidateTypeLabelExpectedTypes:"Ki\u1EC3u t\u1EC7p h\u1EE3p l\u1EC7 l\xE0 {allButLastType} ho\u1EB7c {lastType}",imageValidateSizeLabelFormatError:"Lo\u1EA1i h\xECnh \u1EA3nh kh\xF4ng \u0111\u01B0\u1EE3c h\u1ED7 tr\u1EE3",imageValidateSizeLabelImageSizeTooSmall:"H\xECnh \u1EA3nh qu\xE1 nh\u1ECF",imageValidateSizeLabelImageSizeTooBig:"H\xECnh \u1EA3nh qu\xE1 l\u1EDBn",imageValidateSizeLabelExpectedMinSize:"K\xEDch th\u01B0\u1EDBc t\u1ED1i thi\u1EC3u l\xE0 {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"K\xEDch th\u01B0\u1EDBc t\u1ED1i \u0111a l\xE0 {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u0110\u1ED9 ph\xE2n gi\u1EA3i qu\xE1 th\u1EA5p",imageValidateSizeLabelImageResolutionTooHigh:"\u0110\u1ED9 ph\xE2n gi\u1EA3i qu\xE1 cao",imageValidateSizeLabelExpectedMinResolution:"\u0110\u1ED9 ph\xE2n gi\u1EA3i t\u1ED1i thi\u1EC3u l\xE0 {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u0110\u1ED9 ph\xE2n gi\u1EA3i t\u1ED1i \u0111a l\xE0 {maxResolution}"};var rr={labelIdle:'\u62D6\u653E\u6587\u4EF6\uFF0C\u6216\u8005 \u6D4F\u89C8 ',labelInvalidField:"\u5B57\u6BB5\u5305\u542B\u65E0\u6548\u6587\u4EF6",labelFileWaitingForSize:"\u8BA1\u7B97\u6587\u4EF6\u5927\u5C0F",labelFileSizeNotAvailable:"\u6587\u4EF6\u5927\u5C0F\u4E0D\u53EF\u7528",labelFileLoading:"\u52A0\u8F7D",labelFileLoadError:"\u52A0\u8F7D\u9519\u8BEF",labelFileProcessing:"\u4E0A\u4F20",labelFileProcessingComplete:"\u5DF2\u4E0A\u4F20",labelFileProcessingAborted:"\u4E0A\u4F20\u5DF2\u53D6\u6D88",labelFileProcessingError:"\u4E0A\u4F20\u51FA\u9519",labelFileProcessingRevertError:"\u8FD8\u539F\u51FA\u9519",labelFileRemoveError:"\u5220\u9664\u51FA\u9519",labelTapToCancel:"\u70B9\u51FB\u53D6\u6D88",labelTapToRetry:"\u70B9\u51FB\u91CD\u8BD5",labelTapToUndo:"\u70B9\u51FB\u64A4\u6D88",labelButtonRemoveItem:"\u5220\u9664",labelButtonAbortItemLoad:"\u4E2D\u6B62",labelButtonRetryItemLoad:"\u91CD\u8BD5",labelButtonAbortItemProcessing:"\u53D6\u6D88",labelButtonUndoItemProcessing:"\u64A4\u6D88",labelButtonRetryItemProcessing:"\u91CD\u8BD5",labelButtonProcessItem:"\u4E0A\u4F20",labelMaxFileSizeExceeded:"\u6587\u4EF6\u592A\u5927",labelMaxFileSize:"\u6700\u5927\u503C: {filesize}",labelMaxTotalFileSizeExceeded:"\u8D85\u8FC7\u6700\u5927\u6587\u4EF6\u5927\u5C0F",labelMaxTotalFileSize:"\u6700\u5927\u6587\u4EF6\u5927\u5C0F\uFF1A{filesize}",labelFileTypeNotAllowed:"\u6587\u4EF6\u7C7B\u578B\u65E0\u6548",fileValidateTypeLabelExpectedTypes:"\u5E94\u4E3A {allButLastType} \u6216 {lastType}",imageValidateSizeLabelFormatError:"\u4E0D\u652F\u6301\u56FE\u50CF\u7C7B\u578B",imageValidateSizeLabelImageSizeTooSmall:"\u56FE\u50CF\u592A\u5C0F",imageValidateSizeLabelImageSizeTooBig:"\u56FE\u50CF\u592A\u5927",imageValidateSizeLabelExpectedMinSize:"\u6700\u5C0F\u503C: {minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u6700\u5927\u503C: {maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u5206\u8FA8\u7387\u592A\u4F4E",imageValidateSizeLabelImageResolutionTooHigh:"\u5206\u8FA8\u7387\u592A\u9AD8",imageValidateSizeLabelExpectedMinResolution:"\u6700\u5C0F\u5206\u8FA8\u7387\uFF1A{minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u6700\u5927\u5206\u8FA8\u7387\uFF1A{maxResolution}"};var sr={labelIdle:'\u62D6\u653E\u6A94\u6848\uFF0C\u6216\u8005 \u700F\u89BD ',labelInvalidField:"\u4E0D\u652F\u63F4\u6B64\u6A94\u6848",labelFileWaitingForSize:"\u6B63\u5728\u8A08\u7B97\u6A94\u6848\u5927\u5C0F",labelFileSizeNotAvailable:"\u6A94\u6848\u5927\u5C0F\u4E0D\u7B26",labelFileLoading:"\u8B80\u53D6\u4E2D",labelFileLoadError:"\u8B80\u53D6\u932F\u8AA4",labelFileProcessing:"\u4E0A\u50B3",labelFileProcessingComplete:"\u5DF2\u4E0A\u50B3",labelFileProcessingAborted:"\u4E0A\u50B3\u5DF2\u53D6\u6D88",labelFileProcessingError:"\u4E0A\u50B3\u767C\u751F\u932F\u8AA4",labelFileProcessingRevertError:"\u9084\u539F\u932F\u8AA4",labelFileRemoveError:"\u522A\u9664\u932F\u8AA4",labelTapToCancel:"\u9EDE\u64CA\u53D6\u6D88",labelTapToRetry:"\u9EDE\u64CA\u91CD\u8A66",labelTapToUndo:"\u9EDE\u64CA\u9084\u539F",labelButtonRemoveItem:"\u522A\u9664",labelButtonAbortItemLoad:"\u505C\u6B62",labelButtonRetryItemLoad:"\u91CD\u8A66",labelButtonAbortItemProcessing:"\u53D6\u6D88",labelButtonUndoItemProcessing:"\u53D6\u6D88",labelButtonRetryItemProcessing:"\u91CD\u8A66",labelButtonProcessItem:"\u4E0A\u50B3",labelMaxFileSizeExceeded:"\u6A94\u6848\u904E\u5927",labelMaxFileSize:"\u6700\u5927\u503C\uFF1A{filesize}",labelMaxTotalFileSizeExceeded:"\u8D85\u904E\u6700\u5927\u53EF\u4E0A\u50B3\u5927\u5C0F",labelMaxTotalFileSize:"\u6700\u5927\u53EF\u4E0A\u50B3\u5927\u5C0F\uFF1A{filesize}",labelFileTypeNotAllowed:"\u4E0D\u652F\u63F4\u6B64\u985E\u578B\u6A94\u6848",fileValidateTypeLabelExpectedTypes:"\u61C9\u70BA {allButLastType} \u6216 {lastType}",imageValidateSizeLabelFormatError:"\u4E0D\u652F\u6301\u6B64\u985E\u5716\u7247\u985E\u578B",imageValidateSizeLabelImageSizeTooSmall:"\u5716\u7247\u904E\u5C0F",imageValidateSizeLabelImageSizeTooBig:"\u5716\u7247\u904E\u5927",imageValidateSizeLabelExpectedMinSize:"\u6700\u5C0F\u5C3A\u5BF8\uFF1A{minWidth} \xD7 {minHeight}",imageValidateSizeLabelExpectedMaxSize:"\u6700\u5927\u5C3A\u5BF8\uFF1A{maxWidth} \xD7 {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"\u89E3\u6790\u5EA6\u904E\u4F4E",imageValidateSizeLabelImageResolutionTooHigh:"\u89E3\u6790\u5EA6\u904E\u9AD8",imageValidateSizeLabelExpectedMinResolution:"\u6700\u4F4E\u89E3\u6790\u5EA6\uFF1A{minResolution}",imageValidateSizeLabelExpectedMaxResolution:"\u6700\u9AD8\u89E3\u6790\u5EA6\uFF1A{maxResolution}"};ve(Wl);ve(jl);ve($l);ve(Kl);ve(eo);ve(mo);ve(go);ve(_o);ve(Pa);window.FilePond=la;function Rg({acceptedFileTypes:e,imageEditorEmptyFillColor:t,imageEditorMode:i,imageEditorViewportHeight:a,imageEditorViewportWidth:n,deleteUploadedFileUsing:l,isDeletable:o,isDisabled:r,getUploadedFilesUsing:s,imageCropAspectRatio:p,imagePreviewHeight:c,imageResizeMode:d,imageResizeTargetHeight:m,imageResizeTargetWidth:u,imageResizeUpscale:g,isAvatar:f,hasImageEditor:h,hasCircleCropper:I,canEditSvgs:b,isSvgEditingConfirmed:T,confirmSvgEditingMessage:v,disabledSvgEditingMessage:y,isDownloadable:E,isMultiple:_,isOpenable:x,isPreviewable:R,isReorderable:z,itemPanelAspectRatio:P,loadingIndicatorPosition:A,locale:B,maxFiles:w,maxSize:O,minSize:S,maxParallelUploads:L,mimeTypeMap:D,panelAspectRatio:F,panelLayout:G,placeholder:C,removeUploadedFileButtonPosition:q,removeUploadedFileUsing:X,reorderUploadedFilesUsing:K,shouldAppendFiles:oe,shouldOrientImageFromExif:k,shouldTransformImage:H,state:Y,uploadButtonPosition:re,uploadingMessage:ee,uploadProgressIndicatorPosition:dt,uploadUsing:dr}){return{fileKeyIndex:{},pond:null,shouldUpdateState:!0,state:Y,lastState:null,error:null,uploadedFileIndex:{},isEditorOpen:!1,editingFile:{},currentRatio:"",editor:{},init:async function(){Ft(cr[B]??cr.en),this.pond=gt(this.$refs.input,{acceptedFileTypes:e,allowImageExifOrientation:k,allowPaste:!1,allowRemove:o,allowReorder:z,allowImagePreview:R,allowVideoPreview:R,allowAudioPreview:R,allowImageTransform:H,credits:!1,files:await this.getFiles(),imageCropAspectRatio:p,imagePreviewHeight:c,imageResizeTargetHeight:m,imageResizeTargetWidth:u,imageResizeMode:d,imageResizeUpscale:g,imageTransformOutputStripImageHead:!1,itemInsertLocation:oe?"after":"before",...C&&{labelIdle:C},maxFiles:w,maxFileSize:O,minFileSize:S,...L&&{maxParallelUploads:L},styleButtonProcessItemPosition:re,styleButtonRemoveItemPosition:q,styleItemPanelAspectRatio:P,styleLoadIndicatorPosition:A,stylePanelAspectRatio:F,stylePanelLayout:G,styleProgressIndicatorPosition:dt,server:{load:async(N,W)=>{let Q=await(await fetch(N,{cache:"no-store"})).blob();W(Q)},process:(N,W,$,Q,Ge,Me)=>{this.shouldUpdateState=!1;let Kt=("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,Qt=>(Qt^crypto.getRandomValues(new Uint8Array(1))[0]&15>>Qt/4).toString(16));dr(Kt,W,Qt=>{this.shouldUpdateState=!0,Q(Qt)},Ge,Me)},remove:async(N,W)=>{let $=this.uploadedFileIndex[N]??null;$&&(await l($),W())},revert:async(N,W)=>{await X(N),W()}},allowImageEdit:h,imageEditEditor:{open:N=>this.loadEditor(N),onconfirm:()=>{},oncancel:()=>this.closeEditor(),onclose:()=>this.closeEditor()},fileValidateTypeDetectType:(N,W)=>new Promise(($,Q)=>{let Ge=N.name.split(".").pop().toLowerCase(),Me=D[Ge]||W||Gl.getType(Ge);Me?$(Me):Q()})}),this.$watch("state",async()=>{if(this.pond&&this.shouldUpdateState&&this.state!==void 0){if(this.state!==null&&Object.values(this.state).filter(N=>N.startsWith("livewire-file:")).length){this.lastState=null;return}JSON.stringify(this.state)!==this.lastState&&(this.lastState=JSON.stringify(this.state),this.pond.files=await this.getFiles())}}),this.pond.on("reorderfiles",async N=>{let W=N.map($=>$.source instanceof File?$.serverId:this.uploadedFileIndex[$.source]??null).filter($=>$);await K(oe?W:W.reverse())}),this.pond.on("initfile",async N=>{E&&(f||this.insertDownloadLink(N))}),this.pond.on("initfile",async N=>{x&&(f||this.insertOpenLink(N))}),this.pond.on("addfilestart",async N=>{N.status===Et.PROCESSING_QUEUED&&this.dispatchFormEvent("form-processing-started",{message:ee})});let V=async()=>{this.pond.getFiles().filter(N=>N.status===Et.PROCESSING||N.status===Et.PROCESSING_QUEUED).length||this.dispatchFormEvent("form-processing-finished")};this.pond.on("processfile",V),this.pond.on("processfileabort",V),this.pond.on("processfilerevert",V),G==="compact circle"&&(this.pond.on("error",N=>{this.error=`${N.main}: ${N.sub}`.replace("Expects or","Expects")}),this.pond.on("removefile",()=>this.error=null))},destroy:function(){this.destroyEditor(),ft(this.$refs.input),this.pond=null},dispatchFormEvent:function(V,N={}){this.$el.closest("form")?.dispatchEvent(new CustomEvent(V,{composed:!0,cancelable:!0,detail:N}))},getUploadedFiles:async function(){let V=await s();this.fileKeyIndex=V??{},this.uploadedFileIndex=Object.entries(this.fileKeyIndex).filter(([N,W])=>W?.url).reduce((N,[W,$])=>(N[$.url]=W,N),{})},getFiles:async function(){await this.getUploadedFiles();let V=[];for(let N of Object.values(this.fileKeyIndex))N&&V.push({source:N.url,options:{type:"local",...!N.type||R&&(/^audio/.test(N.type)||/^image/.test(N.type)||/^video/.test(N.type))?{}:{file:{name:N.name,size:N.size,type:N.type}}}});return oe?V:V.reverse()},insertDownloadLink:function(V){if(V.origin!==Ct.LOCAL)return;let N=this.getDownloadLink(V);N&&document.getElementById(`filepond--item-${V.id}`).querySelector(".filepond--file-info-main").prepend(N)},insertOpenLink:function(V){if(V.origin!==Ct.LOCAL)return;let N=this.getOpenLink(V);N&&document.getElementById(`filepond--item-${V.id}`).querySelector(".filepond--file-info-main").prepend(N)},getDownloadLink:function(V){let N=V.source;if(!N)return;let W=document.createElement("a");return W.className="filepond--download-icon",W.href=N,W.download=V.file.name,W},getOpenLink:function(V){let N=V.source;if(!N)return;let W=document.createElement("a");return W.className="filepond--open-icon",W.href=N,W.target="_blank",W},initEditor:function(){r||h&&(this.editor=new ya(this.$refs.editor,{aspectRatio:n/a,autoCropArea:1,center:!0,crop:V=>{this.$refs.xPositionInput.value=Math.round(V.detail.x),this.$refs.yPositionInput.value=Math.round(V.detail.y),this.$refs.heightInput.value=Math.round(V.detail.height),this.$refs.widthInput.value=Math.round(V.detail.width),this.$refs.rotationInput.value=V.detail.rotate},cropBoxResizable:!0,guides:!0,highlight:!0,responsive:!0,toggleDragModeOnDblclick:!0,viewMode:i,wheelZoomRatio:.02}))},closeEditor:function(){this.editingFile={},this.isEditorOpen=!1,this.destroyEditor()},fixImageDimensions:function(V,N){if(V.type!=="image/svg+xml")return N(V);let W=new FileReader;W.onload=$=>{let Q=new DOMParser().parseFromString($.target.result,"image/svg+xml")?.querySelector("svg");if(!Q)return N(V);let Ge=["viewBox","ViewBox","viewbox"].find(Kt=>Q.hasAttribute(Kt));if(!Ge)return N(V);let Me=Q.getAttribute(Ge).split(" ");return!Me||Me.length!==4?N(V):(Q.setAttribute("width",parseFloat(Me[2])+"pt"),Q.setAttribute("height",parseFloat(Me[3])+"pt"),N(new File([new Blob([new XMLSerializer().serializeToString(Q)],{type:"image/svg+xml"})],V.name,{type:"image/svg+xml",_relativePath:""})))},W.readAsText(V)},loadEditor:function(V){if(r||!h||!V)return;let N=V.type==="image/svg+xml";if(!b&&N){alert(y);return}T&&N&&!confirm(v)||this.fixImageDimensions(V,W=>{this.editingFile=W,this.initEditor();let $=new FileReader;$.onload=Q=>{this.isEditorOpen=!0,setTimeout(()=>this.editor.replace(Q.target.result),200)},$.readAsDataURL(V)})},getRoundedCanvas:function(V){let N=V.width,W=V.height,$=document.createElement("canvas");$.width=N,$.height=W;let Q=$.getContext("2d");return Q.imageSmoothingEnabled=!0,Q.drawImage(V,0,0,N,W),Q.globalCompositeOperation="destination-in",Q.beginPath(),Q.ellipse(N/2,W/2,N/2,W/2,0,0,2*Math.PI),Q.fill(),$},saveEditor:function(){if(r||!h)return;let V=this.editor.getCroppedCanvas({fillColor:t??"transparent",height:m,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",width:u});I&&(V=this.getRoundedCanvas(V)),V.toBlob(N=>{_&&this.pond.removeFile(this.pond.getFiles().find(W=>W.filename===this.editingFile.name)?.id,{revert:!0}),this.$nextTick(()=>{this.shouldUpdateState=!1;let W=this.editingFile.name.slice(0,this.editingFile.name.lastIndexOf(".")),$=this.editingFile.name.split(".").pop();$==="svg"&&($="png");let Q=/-v(\d+)/;Q.test(W)?W=W.replace(Q,(Ge,Me)=>`-v${Number(Me)+1}`):W+="-v1",this.pond.addFile(new File([N],`${W}.${$}`,{type:this.editingFile.type==="image/svg+xml"||I?"image/png":this.editingFile.type,lastModified:new Date().getTime()})).then(()=>{this.closeEditor()}).catch(()=>{this.closeEditor()})})},I?"image/png":this.editingFile.type)},destroyEditor:function(){this.editor&&typeof this.editor.destroy=="function"&&this.editor.destroy(),this.editor=null}}}var cr={am:wo,ar:Lo,az:Mo,ca:Ao,ckb:Po,cs:zo,da:Oo,de:Fo,el:Do,en:Co,es:Bo,fa:No,fi:ko,fr:Vo,he:Go,hr:Uo,hu:Wo,id:Ho,it:jo,ja:Yo,km:qo,ko:$o,lt:Xo,lv:Ko,nl:Qo,no:Zo,pl:Jo,pt_BR:_i,pt_PT:_i,ro:er,ru:tr,sk:ir,sv:ar,tr:nr,uk:lr,vi:or,zh_CN:rr,zh_TW:sr};export{Rg as default}; +/*! Bundled license information: + +filepond/dist/filepond.esm.js: + (*! + * FilePond 4.32.7 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + *) + +cropperjs/dist/cropper.esm.js: + (*! + * Cropper.js v1.6.2 + * https://fengyuanchen.github.io/cropperjs + * + * Copyright 2015-present Chen Fengyuan + * Released under the MIT license + * + * Date: 2024-04-21T07:43:05.335Z + *) + +filepond-plugin-file-validate-size/dist/filepond-plugin-file-validate-size.esm.js: + (*! + * FilePondPluginFileValidateSize 2.2.8 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + *) + +filepond-plugin-file-validate-type/dist/filepond-plugin-file-validate-type.esm.js: + (*! + * FilePondPluginFileValidateType 1.2.9 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + *) + +filepond-plugin-image-crop/dist/filepond-plugin-image-crop.esm.js: + (*! + * FilePondPluginImageCrop 2.0.6 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + *) + +filepond-plugin-image-edit/dist/filepond-plugin-image-edit.esm.js: + (*! + * FilePondPluginImageEdit 1.6.3 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + *) + +filepond-plugin-image-exif-orientation/dist/filepond-plugin-image-exif-orientation.esm.js: + (*! + * FilePondPluginImageExifOrientation 1.0.11 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + *) + +filepond-plugin-image-preview/dist/filepond-plugin-image-preview.esm.js: + (*! + * FilePondPluginImagePreview 4.6.12 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + *) + +filepond-plugin-image-resize/dist/filepond-plugin-image-resize.esm.js: + (*! + * FilePondPluginImageResize 2.0.10 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + *) + +filepond-plugin-image-transform/dist/filepond-plugin-image-transform.esm.js: + (*! + * FilePondPluginImageTransform 3.8.7 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + *) + +filepond-plugin-media-preview/dist/filepond-plugin-media-preview.esm.js: + (*! + * FilePondPluginMediaPreview 1.0.11 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit undefined for details. + *) +*/ diff --git a/public/js/filament/forms/components/key-value.js b/public/js/filament/forms/components/key-value.js new file mode 100644 index 000000000..9c847c018 --- /dev/null +++ b/public/js/filament/forms/components/key-value.js @@ -0,0 +1 @@ +function r({state:o}){return{state:o,rows:[],shouldUpdateRows:!0,init:function(){this.updateRows(),this.rows.length<=0?this.rows.push({key:"",value:""}):this.updateState(),this.$watch("state",(t,e)=>{let s=i=>i===null?0:Array.isArray(i)?i.length:typeof i!="object"?0:Object.keys(i).length;s(t)===0&&s(e)===0||this.updateRows()})},addRow:function(){this.rows.push({key:"",value:""}),this.updateState()},deleteRow:function(t){this.rows.splice(t,1),this.rows.length<=0&&this.addRow(),this.updateState()},reorderRows:function(t){let e=Alpine.raw(this.rows);this.rows=[];let s=e.splice(t.oldIndex,1)[0];e.splice(t.newIndex,0,s),this.$nextTick(()=>{this.rows=e,this.updateState()})},updateRows:function(){if(!this.shouldUpdateRows){this.shouldUpdateRows=!0;return}let t=[];for(let[e,s]of Object.entries(this.state??{}))t.push({key:e,value:s});this.rows=t},updateState:function(){let t={};this.rows.forEach(e=>{e.key===""||e.key===null||(t[e.key]=e.value)}),this.shouldUpdateRows=!1,this.state=t}}}export{r as default}; diff --git a/public/js/filament/forms/components/markdown-editor.js b/public/js/filament/forms/components/markdown-editor.js new file mode 100644 index 000000000..14c4fc4fe --- /dev/null +++ b/public/js/filament/forms/components/markdown-editor.js @@ -0,0 +1,51 @@ +var ss=Object.defineProperty;var Sd=Object.getOwnPropertyDescriptor;var Td=Object.getOwnPropertyNames;var Ld=Object.prototype.hasOwnProperty;var Cd=(o,p)=>()=>(o&&(p=o(o=0)),p);var Ke=(o,p)=>()=>(p||o((p={exports:{}}).exports,p),p.exports);var Ed=(o,p,v,C)=>{if(p&&typeof p=="object"||typeof p=="function")for(let b of Td(p))!Ld.call(o,b)&&b!==v&&ss(o,b,{get:()=>p[b],enumerable:!(C=Sd(p,b))||C.enumerable});return o};var zd=o=>Ed(ss({},"__esModule",{value:!0}),o);var We=Ke((Yo,Qo)=>{(function(o,p){typeof Yo=="object"&&typeof Qo<"u"?Qo.exports=p():typeof define=="function"&&define.amd?define(p):(o=o||self,o.CodeMirror=p())})(Yo,function(){"use strict";var o=navigator.userAgent,p=navigator.platform,v=/gecko\/\d/i.test(o),C=/MSIE \d/.test(o),b=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(o),S=/Edge\/(\d+)/.exec(o),s=C||b||S,h=s&&(C?document.documentMode||6:+(S||b)[1]),g=!S&&/WebKit\//.test(o),T=g&&/Qt\/\d+\.\d+/.test(o),y=!S&&/Chrome\/(\d+)/.exec(o),c=y&&+y[1],d=/Opera\//.test(o),k=/Apple Computer/.test(navigator.vendor),z=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(o),M=/PhantomJS/.test(o),w=k&&(/Mobile\/\w+/.test(o)||navigator.maxTouchPoints>2),W=/Android/.test(o),E=w||W||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(o),N=w||/Mac/.test(p),G=/\bCrOS\b/.test(o),J=/win/i.test(p),re=d&&o.match(/Version\/(\d*\.\d*)/);re&&(re=Number(re[1])),re&&re>=15&&(d=!1,g=!0);var q=N&&(T||d&&(re==null||re<12.11)),O=v||s&&h>=9;function D(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Q=function(e,t){var n=e.className,r=D(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function R(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function V(e,t){return R(e).appendChild(t)}function x(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a=t)return l+(t-a);l+=u-a,l+=n-l%n,a=u+1}}var qe=function(){this.id=null,this.f=null,this.time=0,this.handler=Ee(this.onTimeout,this)};qe.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},qe.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n=t)return r+Math.min(l,t-i);if(i+=a-r,i+=n-i%n,r=a+1,i>=t)return r}}var U=[""];function Z(e){for(;U.length<=e;)U.push(ce(U)+" ");return U[e]}function ce(e){return e[e.length-1]}function Be(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ue.test(e))}function Me(e,t){return t?t.source.indexOf("\\w")>-1&&we(e)?!0:t.test(e):we(e)}function Le(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var $=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function B(e){return e.charCodeAt(0)>=768&&$.test(e)}function se(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}function nt(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,a=0;at||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),l.level==1?"rtl":"ltr",a),i=!0)}i||r(t,n,"ltr")}var dt=null;function Pt(e,t,n){var r;dt=null;for(var i=0;it)return i;a.to==t&&(a.from!=a.to&&n=="before"?r=i:dt=i),a.from==t&&(a.from!=a.to&&n!="before"?r=i:dt=i)}return r??dt}var Ft=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(m){return m<=247?e.charAt(m):1424<=m&&m<=1524?"R":1536<=m&&m<=1785?t.charAt(m-1536):1774<=m&&m<=2220?"r":8192<=m&&m<=8203?"w":m==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,u=/[1n]/;function f(m,A,j){this.level=m,this.from=A,this.to=j}return function(m,A){var j=A=="ltr"?"L":"R";if(m.length==0||A=="ltr"&&!r.test(m))return!1;for(var ee=m.length,Y=[],ie=0;ie-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function it(e,t){var n=nr(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Wt(e){e.prototype.on=function(t,n){Ie(this,t,n)},e.prototype.off=function(t,n){_t(this,t,n)}}function kt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Hr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ct(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function dr(e){kt(e),Hr(e)}function yn(e){return e.target||e.srcElement}function Ut(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),N&&e.ctrlKey&&t==1&&(t=3),t}var eo=function(){if(s&&h<9)return!1;var e=x("div");return"draggable"in e||"dragDrop"in e}(),Br;function ei(e){if(Br==null){var t=x("span","\u200B");V(e,x("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Br=t.offsetWidth<=1&&t.offsetHeight>2&&!(s&&h<8))}var n=Br?x("span","\u200B"):x("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var xn;function pr(e){if(xn!=null)return xn;var t=V(e,document.createTextNode("A\u062EA")),n=X(t,0,1).getBoundingClientRect(),r=X(t,1,2).getBoundingClientRect();return R(e),!n||n.left==n.right?!1:xn=r.right-n.right<3}var Bt=` + +b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(` +`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=a.indexOf("\r");l!=-1?(n.push(a.slice(0,l)),t+=l+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},hr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},ti=function(){var e=x("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),$t=null;function to(e){if($t!=null)return $t;var t=V(e,x("span","x")),n=t.getBoundingClientRect(),r=X(t,0,1).getBoundingClientRect();return $t=Math.abs(n.left-r.left)>1}var Wr={},Kt={};function Gt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Wr[e]=t}function Cr(e,t){Kt[e]=t}function Ur(e){if(typeof e=="string"&&Kt.hasOwnProperty(e))e=Kt[e];else if(e&&typeof e.name=="string"&&Kt.hasOwnProperty(e.name)){var t=Kt[e.name];typeof t=="string"&&(t={name:t}),e=oe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ur("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ur("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function $r(e,t){t=Ur(t);var n=Wr[t.name];if(!n)return $r(e,"text/plain");var r=n(e,t);if(gr.hasOwnProperty(t.name)){var i=gr[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var gr={};function Kr(e,t){var n=gr.hasOwnProperty(e)?gr[e]:gr[e]={};ge(t,n)}function Vt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function _n(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Gr(e,t,n){return e.startState?e.startState(t,n):!0}var at=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};at.prototype.eol=function(){return this.pos>=this.string.length},at.prototype.sol=function(){return this.pos==this.lineStart},at.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},at.prototype.next=function(){if(this.post},at.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},at.prototype.skipToEnd=function(){this.pos=this.string.length},at.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},at.prototype.backUp=function(e){this.pos-=e},at.prototype.column=function(){return this.lastColumnPos0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},at.prototype.current=function(){return this.string.slice(this.start,this.pos)},at.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},at.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},at.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ae(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t=e.first&&tn?ne(n,Ae(e,n).text.length):Sc(t,Ae(e,t.line).text.length)}function Sc(e,t){var n=e.ch;return n==null||n>t?ne(e.line,t):n<0?ne(e.line,0):e}function ca(e,t){for(var n=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},Jt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Jt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Jt.fromSaved=function(e,t,n){return t instanceof ri?new Jt(e,Vt(e.mode,t.state),n,t.lookAhead):new Jt(e,Vt(e.mode,t),n)},Jt.prototype.save=function(e){var t=e!==!1?Vt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ri(t,this.maxLookAhead):t};function fa(e,t,n,r){var i=[e.state.modeGen],a={};va(e,t.text,e.doc.mode,n,function(m,A){return i.push(m,A)},a,r);for(var l=n.state,u=function(m){n.baseTokens=i;var A=e.state.overlays[m],j=1,ee=0;n.state=!0,va(e,t.text,A.mode,n,function(Y,ie){for(var ue=j;eeY&&i.splice(j,1,Y,i[j+1],me),j+=2,ee=Math.min(Y,me)}if(ie)if(A.opaque)i.splice(ue,j-ue,Y,"overlay "+ie),j=ue+2;else for(;uee.options.maxHighlightLength&&Vt(e.doc.mode,r.state),a=fa(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function wn(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Jt(r,!0,t);var a=Tc(e,t,n),l=a>r.first&&Ae(r,a-1).stateAfter,u=l?Jt.fromSaved(r,l,a):new Jt(r,Gr(r.mode),a);return r.iter(a,t,function(f){ro(e,f.text,u);var m=u.line;f.stateAfter=m==t-1||m%5==0||m>=i.viewFrom&&mt.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var ha=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function ga(e,t,n,r){var i=e.doc,a=i.mode,l;t=Re(i,t);var u=Ae(i,t.line),f=wn(e,t.line,n),m=new at(u.text,e.options.tabSize,f),A;for(r&&(A=[]);(r||m.pose.options.maxHighlightLength?(u=!1,l&&ro(e,t,r,A.pos),A.pos=t.length,j=null):j=ma(no(n,A,r.state,ee),a),ee){var Y=ee[0].name;Y&&(j="m-"+(j?Y+" "+j:Y))}if(!u||m!=j){for(;fl;--u){if(u<=a.first)return a.first;var f=Ae(a,u-1),m=f.stateAfter;if(m&&(!n||u+(m instanceof ri?m.lookAhead:0)<=a.modeFrontier))return u;var A=Oe(f.text,null,e.options.tabSize);(i==null||r>A)&&(i=u-1,r=A)}return i}function Lc(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Ae(e,r).stateAfter;if(i&&(!(i instanceof ri)||r+i.lookAhead=t:a.to>t);(r||(r=[])).push(new ni(l,a.from,f?null:a.to))}}return r}function Dc(e,t,n){var r;if(e)for(var i=0;i=t:a.to>t);if(u||a.from==t&&l.type=="bookmark"&&(!n||a.marker.insertLeft)){var f=a.from==null||(l.inclusiveLeft?a.from<=t:a.from0&&u)for(var Ce=0;Ce0)){var A=[f,1],j=ye(m.from,u.from),ee=ye(m.to,u.to);(j<0||!l.inclusiveLeft&&!j)&&A.push({from:m.from,to:u.from}),(ee>0||!l.inclusiveRight&&!ee)&&A.push({from:u.to,to:m.to}),i.splice.apply(i,A),f+=A.length-3}}return i}function xa(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!r||oo(r,a.marker)<0)&&(r=a.marker)}return r}function Sa(e,t,n,r,i){var a=Ae(e,t),l=or&&a.markedSpans;if(l)for(var u=0;u=0&&j<=0||A<=0&&j>=0)&&(A<=0&&(f.marker.inclusiveRight&&i.inclusiveLeft?ye(m.to,n)>=0:ye(m.to,n)>0)||A>=0&&(f.marker.inclusiveRight&&i.inclusiveLeft?ye(m.from,r)<=0:ye(m.from,r)<0)))return!0}}}function Zt(e){for(var t;t=wa(e);)e=t.find(-1,!0).line;return e}function Ic(e){for(var t;t=ai(e);)e=t.find(1,!0).line;return e}function Nc(e){for(var t,n;t=ai(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function ao(e,t){var n=Ae(e,t),r=Zt(n);return n==r?t:_(r)}function Ta(e,t){if(t>e.lastLine())return t;var n=Ae(e,t),r;if(!mr(e,n))return t;for(;r=ai(n);)n=r.find(1,!0).line;return _(n)+1}function mr(e,t){var n=or&&t.markedSpans;if(n){for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Xr=function(e,t,n){this.text=e,_a(this,t),this.height=n?n(this):1};Xr.prototype.lineNo=function(){return _(this)},Wt(Xr);function Oc(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),xa(e),_a(e,n);var i=r?r(e):1;i!=e.height&&jt(e,i)}function Pc(e){e.parent=null,xa(e)}var jc={},Rc={};function La(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Rc:jc;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Ca(e,t){var n=K("span",null,null,g?"padding-right: .1px":null),r={pre:K("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=Bc,pr(e.display.measure)&&(l=Pe(a,e.doc.direction))&&(r.addToken=Uc(r.addToken,l)),r.map=[];var u=t!=e.display.externalMeasured&&_(a);$c(a,r,da(e,a,u)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=xe(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=xe(a.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(ei(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(g){var f=r.content.lastChild;(/\bcm-tab\b/.test(f.className)||f.querySelector&&f.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return it(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=xe(r.pre.className,r.textClass||"")),r}function Hc(e){var t=x("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Bc(e,t,n,r,i,a,l){if(t){var u=e.splitSpaces?Wc(t,e.trailingSpace):t,f=e.cm.state.specialChars,m=!1,A;if(!f.test(t))e.col+=t.length,A=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,A),s&&h<9&&(m=!0),e.pos+=t.length;else{A=document.createDocumentFragment();for(var j=0;;){f.lastIndex=j;var ee=f.exec(t),Y=ee?ee.index-j:t.length-j;if(Y){var ie=document.createTextNode(u.slice(j,j+Y));s&&h<9?A.appendChild(x("span",[ie])):A.appendChild(ie),e.map.push(e.pos,e.pos+Y,ie),e.col+=Y,e.pos+=Y}if(!ee)break;j+=Y+1;var ue=void 0;if(ee[0]==" "){var me=e.cm.options.tabSize,ve=me-e.col%me;ue=A.appendChild(x("span",Z(ve),"cm-tab")),ue.setAttribute("role","presentation"),ue.setAttribute("cm-text"," "),e.col+=ve}else ee[0]=="\r"||ee[0]==` +`?(ue=A.appendChild(x("span",ee[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ue.setAttribute("cm-text",ee[0]),e.col+=1):(ue=e.cm.options.specialCharPlaceholder(ee[0]),ue.setAttribute("cm-text",ee[0]),s&&h<9?A.appendChild(x("span",[ue])):A.appendChild(ue),e.col+=1);e.map.push(e.pos,e.pos+1,ue),e.pos++}}if(e.trailingSpace=u.charCodeAt(t.length-1)==32,n||r||i||m||a||l){var _e=n||"";r&&(_e+=r),i&&(_e+=i);var be=x("span",[A],_e,a);if(l)for(var Ce in l)l.hasOwnProperty(Ce)&&Ce!="style"&&Ce!="class"&&be.setAttribute(Ce,l[Ce]);return e.content.appendChild(be)}e.content.appendChild(A)}}function Wc(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;im&&j.from<=m));ee++);if(j.to>=A)return e(n,r,i,a,l,u,f);e(n,r.slice(0,j.to-m),i,a,null,u,f),a=null,r=r.slice(j.to-m),m=j.to}}}function Ea(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function $c(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(!r){for(var l=1;lf||$e.collapsed&&Fe.to==f&&Fe.from==f)){if(Fe.to!=null&&Fe.to!=f&&Y>Fe.to&&(Y=Fe.to,ue=""),$e.className&&(ie+=" "+$e.className),$e.css&&(ee=(ee?ee+";":"")+$e.css),$e.startStyle&&Fe.from==f&&(me+=" "+$e.startStyle),$e.endStyle&&Fe.to==Y&&(Ce||(Ce=[])).push($e.endStyle,Fe.to),$e.title&&((_e||(_e={})).title=$e.title),$e.attributes)for(var Ve in $e.attributes)(_e||(_e={}))[Ve]=$e.attributes[Ve];$e.collapsed&&(!ve||oo(ve.marker,$e)<0)&&(ve=Fe)}else Fe.from>f&&Y>Fe.from&&(Y=Fe.from)}if(Ce)for(var vt=0;vt=u)break;for(var Ot=Math.min(u,Y);;){if(A){var At=f+A.length;if(!ve){var ut=At>Ot?A.slice(0,Ot-f):A;t.addToken(t,ut,j?j+ie:ie,me,f+ut.length==Y?ue:"",ee,_e)}if(At>=Ot){A=A.slice(Ot-f),f=Ot;break}f=At,me=""}A=i.slice(a,a=n[m++]),j=La(n[m++],t.cm.options)}}}function za(e,t,n){this.line=t,this.rest=Nc(t),this.size=this.rest?_(ce(this.rest))-n+1:1,this.node=this.text=null,this.hidden=mr(e,t)}function si(e,t,n){for(var r=[],i,a=t;a2&&a.push((f.bottom+m.top)/2-n.top)}}a.push(n.bottom-n.top)}}function Na(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function rf(e,t){t=Zt(t);var n=_(t),r=e.display.externalMeasured=new za(e.doc,t,n);r.lineN=n;var i=r.built=Ca(e,r);return r.text=i.pre,V(e.display.lineMeasure,i.pre),r}function Oa(e,t,n,r){return tr(e,Qr(e,t),n,r)}function po(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(a=f-u,i=a-1,t>=f&&(l="right")),i!=null){if(r=e[m+2],u==f&&n==(r.insertLeft?"left":"right")&&(l=n),n=="left"&&i==0)for(;m&&e[m-2]==e[m-3]&&e[m-1].insertLeft;)r=e[(m-=3)+2],l="left";if(n=="right"&&i==f-u)for(;m=0&&(n=e[i]).left==n.right;i--);return n}function of(e,t,n,r){var i=ja(t.map,n,r),a=i.node,l=i.start,u=i.end,f=i.collapse,m;if(a.nodeType==3){for(var A=0;A<4;A++){for(;l&&B(t.line.text.charAt(i.coverStart+l));)--l;for(;i.coverStart+u0&&(f=r="right");var j;e.options.lineWrapping&&(j=a.getClientRects()).length>1?m=j[r=="right"?j.length-1:0]:m=a.getBoundingClientRect()}if(s&&h<9&&!l&&(!m||!m.left&&!m.right)){var ee=a.parentNode.getClientRects()[0];ee?m={left:ee.left,right:ee.left+Jr(e.display),top:ee.top,bottom:ee.bottom}:m=Pa}for(var Y=m.top-t.rect.top,ie=m.bottom-t.rect.top,ue=(Y+ie)/2,me=t.view.measure.heights,ve=0;ve=r.text.length?(f=r.text.length,m="before"):f<=0&&(f=0,m="after"),!u)return l(m=="before"?f-1:f,m=="before");function A(ie,ue,me){var ve=u[ue],_e=ve.level==1;return l(me?ie-1:ie,_e!=me)}var j=Pt(u,f,m),ee=dt,Y=A(f,j,m=="before");return ee!=null&&(Y.other=A(f,ee,m!="before")),Y}function $a(e,t){var n=0;t=Re(e.doc,t),e.options.lineWrapping||(n=Jr(e.display)*t.ch);var r=Ae(e.doc,t.line),i=ar(r)+ui(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function go(e,t,n,r,i){var a=ne(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function mo(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return go(r.first,0,null,-1,-1);var i=P(r,n),a=r.first+r.size-1;if(i>a)return go(r.first+r.size-1,Ae(r,a).text.length,null,1,1);t<0&&(t=0);for(var l=Ae(r,i);;){var u=lf(e,l,i,t,n),f=Fc(l,u.ch+(u.xRel>0||u.outside>0?1:0));if(!f)return u;var m=f.find(1);if(m.line==i)return m;l=Ae(r,i=m.line)}}function Ka(e,t,n,r){r-=ho(t);var i=t.text.length,a=De(function(l){return tr(e,n,l-1).bottom<=r},i,0);return i=De(function(l){return tr(e,n,l).top>r},a,i),{begin:a,end:i}}function Ga(e,t,n,r){n||(n=Qr(e,t));var i=ci(e,t,tr(e,n,r),"line").top;return Ka(e,t,n,i)}function vo(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function lf(e,t,n,r,i){i-=ar(t);var a=Qr(e,t),l=ho(t),u=0,f=t.text.length,m=!0,A=Pe(t,e.doc.direction);if(A){var j=(e.options.lineWrapping?uf:sf)(e,t,n,a,A,r,i);m=j.level!=1,u=m?j.from:j.to-1,f=m?j.to:j.from-1}var ee=null,Y=null,ie=De(function(Ne){var Fe=tr(e,a,Ne);return Fe.top+=l,Fe.bottom+=l,vo(Fe,r,i,!1)?(Fe.top<=i&&Fe.left<=r&&(ee=Ne,Y=Fe),!0):!1},u,f),ue,me,ve=!1;if(Y){var _e=r-Y.left=Ce.bottom?1:0}return ie=se(t.text,ie,1),go(n,ie,me,ve,r-ue)}function sf(e,t,n,r,i,a,l){var u=De(function(j){var ee=i[j],Y=ee.level!=1;return vo(Xt(e,ne(n,Y?ee.to:ee.from,Y?"before":"after"),"line",t,r),a,l,!0)},0,i.length-1),f=i[u];if(u>0){var m=f.level!=1,A=Xt(e,ne(n,m?f.from:f.to,m?"after":"before"),"line",t,r);vo(A,a,l,!0)&&A.top>l&&(f=i[u-1])}return f}function uf(e,t,n,r,i,a,l){var u=Ka(e,t,r,l),f=u.begin,m=u.end;/\s/.test(t.text.charAt(m-1))&&m--;for(var A=null,j=null,ee=0;ee=m||Y.to<=f)){var ie=Y.level!=1,ue=tr(e,r,ie?Math.min(m,Y.to)-1:Math.max(f,Y.from)).right,me=ueme)&&(A=Y,j=me)}}return A||(A=i[i.length-1]),A.fromm&&(A={from:A.from,to:m,level:A.level}),A}var zr;function Vr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(zr==null){zr=x("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)zr.appendChild(document.createTextNode("x")),zr.appendChild(x("br"));zr.appendChild(document.createTextNode("x"))}V(e.measure,zr);var n=zr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),R(e.measure),n||1}function Jr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=x("span","xxxxxxxxxx"),n=x("pre",[t],"CodeMirror-line-like");V(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function bo(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,l=0;a;a=a.nextSibling,++l){var u=e.display.gutterSpecs[l].className;n[u]=a.offsetLeft+a.clientLeft+i,r[u]=a.clientWidth}return{fixedPos:yo(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function yo(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Za(e){var t=Vr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Jr(e.display)-3);return function(i){if(mr(e.doc,i))return 0;var a=0;if(i.widgets)for(var l=0;l0&&(m=Ae(e.doc,f.line).text).length==f.ch){var A=Oe(m,m.length,e.options.tabSize)-m.length;f=ne(f.line,Math.max(0,Math.round((a-Ia(e.display).left)/Jr(e.display))-A))}return f}function Ar(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)or&&ao(e.doc,t)i.viewFrom?br(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)br(e);else if(t<=i.viewFrom){var a=di(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):br(e)}else if(n>=i.viewTo){var l=di(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):br(e)}else{var u=di(e,t,t,-1),f=di(e,n,n+r,1);u&&f?(i.view=i.view.slice(0,u.index).concat(si(e,u.lineN,f.lineN)).concat(i.view.slice(f.index)),i.viewTo+=r):br(e)}var m=i.externalMeasured;m&&(n=i.lineN&&t=r.viewTo)){var a=r.view[Ar(e,t)];if(a.node!=null){var l=a.changes||(a.changes=[]);Se(l,n)==-1&&l.push(n)}}}function br(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function di(e,t,n,r){var i=Ar(e,t),a,l=e.display.view;if(!or||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var u=e.display.viewFrom,f=0;f0){if(i==l.length-1)return null;a=u+l[i].size-t,i++}else a=u-t;t+=a,n+=a}for(;ao(e.doc,n)!=n;){if(i==(r<0?0:l.length-1))return null;n+=r*l[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function cf(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=si(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=si(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Ar(e,n)))),r.viewTo=n}function Xa(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||f.to().line0?l:e.defaultCharWidth())+"px"}if(r.other){var u=n.appendChild(x("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));u.style.display="",u.style.left=r.other.left+"px",u.style.top=r.other.top+"px",u.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function pi(e,t){return e.top-t.top||e.left-t.left}function ff(e,t,n){var r=e.display,i=e.doc,a=document.createDocumentFragment(),l=Ia(e.display),u=l.left,f=Math.max(r.sizerWidth,Er(e)-r.sizer.offsetLeft)-l.right,m=i.direction=="ltr";function A(be,Ce,Ne,Fe){Ce<0&&(Ce=0),Ce=Math.round(Ce),Fe=Math.round(Fe),a.appendChild(x("div",null,"CodeMirror-selected","position: absolute; left: "+be+`px; + top: `+Ce+"px; width: "+(Ne??f-be)+`px; + height: `+(Fe-Ce)+"px"))}function j(be,Ce,Ne){var Fe=Ae(i,be),$e=Fe.text.length,Ve,vt;function rt(ut,Dt){return fi(e,ne(be,ut),"div",Fe,Dt)}function Ot(ut,Dt,yt){var ft=Ga(e,Fe,null,ut),ct=Dt=="ltr"==(yt=="after")?"left":"right",lt=yt=="after"?ft.begin:ft.end-(/\s/.test(Fe.text.charAt(ft.end-1))?2:1);return rt(lt,ct)[ct]}var At=Pe(Fe,i.direction);return nt(At,Ce||0,Ne??$e,function(ut,Dt,yt,ft){var ct=yt=="ltr",lt=rt(ut,ct?"left":"right"),qt=rt(Dt-1,ct?"right":"left"),pn=Ce==null&&ut==0,Sr=Ne==null&&Dt==$e,St=ft==0,rr=!At||ft==At.length-1;if(qt.top-lt.top<=3){var bt=(m?pn:Sr)&&St,Zo=(m?Sr:pn)&&rr,cr=bt?u:(ct?lt:qt).left,Nr=Zo?f:(ct?qt:lt).right;A(cr,lt.top,Nr-cr,lt.bottom)}else{var Or,Lt,hn,Xo;ct?(Or=m&&pn&&St?u:lt.left,Lt=m?f:Ot(ut,yt,"before"),hn=m?u:Ot(Dt,yt,"after"),Xo=m&&Sr&&rr?f:qt.right):(Or=m?Ot(ut,yt,"before"):u,Lt=!m&&pn&&St?f:lt.right,hn=!m&&Sr&&rr?u:qt.left,Xo=m?Ot(Dt,yt,"after"):f),A(Or,lt.top,Lt-Or,lt.bottom),lt.bottom0?t.blinker=setInterval(function(){e.hasFocus()||en(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Qa(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||So(e))}function wo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&en(e))},100)}function So(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(it(e,"focus",e,t),e.state.focused=!0,le(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),g&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ko(e))}function en(e,t){e.state.delayingBlurEvent||(e.state.focused&&(it(e,"blur",e,t),e.state.focused=!1,Q(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function hi(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,a=0,l=0;l.005||Y<-.005)&&(ie.display.sizerWidth){var ue=Math.ceil(A/Jr(e.display));ue>e.display.maxLineLength&&(e.display.maxLineLength=ue,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function Va(e){if(e.widgets)for(var t=0;t=l&&(a=P(t,ar(Ae(t,f))-e.wrapper.clientHeight),l=f)}return{from:a,to:Math.max(l,a+1)}}function df(e,t){if(!ot(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,a=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(i=!1),i!=null&&!M){var l=x("div","\u200B",null,`position: absolute; + top: `+(t.top-n.viewOffset-ui(e.display))+`px; + height: `+(t.bottom-t.top+er(e)+n.barHeight)+`px; + left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function pf(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?ne(t.line,t.ch+1,"before"):t,t=t.ch?ne(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var l=!1,u=Xt(e,t),f=!n||n==t?u:Xt(e,n);i={left:Math.min(u.left,f.left),top:Math.min(u.top,f.top)-r,right:Math.max(u.left,f.left),bottom:Math.max(u.bottom,f.bottom)+r};var m=To(e,i),A=e.doc.scrollTop,j=e.doc.scrollLeft;if(m.scrollTop!=null&&(An(e,m.scrollTop),Math.abs(e.doc.scrollTop-A)>1&&(l=!0)),m.scrollLeft!=null&&(Dr(e,m.scrollLeft),Math.abs(e.doc.scrollLeft-j)>1&&(l=!0)),!l)break}return i}function hf(e,t){var n=To(e,t);n.scrollTop!=null&&An(e,n.scrollTop),n.scrollLeft!=null&&Dr(e,n.scrollLeft)}function To(e,t){var n=e.display,r=Vr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,a=fo(e),l={};t.bottom-t.top>a&&(t.bottom=t.top+a);var u=e.doc.height+co(n),f=t.topu-r;if(t.topi+a){var A=Math.min(t.top,(m?u:t.bottom)-a);A!=i&&(l.scrollTop=A)}var j=e.options.fixedGutter?0:n.gutters.offsetWidth,ee=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-j,Y=Er(e)-n.gutters.offsetWidth,ie=t.right-t.left>Y;return ie&&(t.right=t.left+Y),t.left<10?l.scrollLeft=0:t.leftY+ee-3&&(l.scrollLeft=t.right+(ie?0:10)-Y),l}function Lo(e,t){t!=null&&(mi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function tn(e){mi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Mn(e,t,n){(t!=null||n!=null)&&mi(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function gf(e,t){mi(e),e.curOp.scrollToPos=t}function mi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=$a(e,t.from),r=$a(e,t.to);Ja(e,n,r,t.margin)}}function Ja(e,t,n,r){var i=To(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Mn(e,i.scrollLeft,i.scrollTop)}function An(e,t){Math.abs(e.doc.scrollTop-t)<2||(v||Eo(e,{top:t}),el(e,t,!0),v&&Eo(e),Fn(e,100))}function el(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Dr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,ol(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Dn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+co(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+er(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var qr=function(e,t,n){this.cm=n;var r=this.vert=x("div",[x("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=x("div",[x("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),Ie(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ie(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,s&&h<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};qr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},qr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},qr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},qr.prototype.zeroWidthHack=function(){var e=N&&!z?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new qe,this.disableVert=new qe},qr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="";function r(){var i=e.getBoundingClientRect(),a=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);a!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},qr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var qn=function(){};qn.prototype.update=function(){return{bottom:0,right:0}},qn.prototype.setScrollLeft=function(){},qn.prototype.setScrollTop=function(){},qn.prototype.clear=function(){};function rn(e,t){t||(t=Dn(e));var n=e.display.barWidth,r=e.display.barHeight;tl(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&hi(e),tl(e,Dn(e)),n=e.display.barWidth,r=e.display.barHeight}function tl(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var rl={native:qr,null:qn};function nl(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Q(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new rl[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ie(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?Dr(e,t):An(e,t)},e),e.display.scrollbars.addClass&&le(e.display.wrapper,e.display.scrollbars.addClass)}var mf=0;function Fr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++mf,markArrays:null},Kc(e.curOp)}function Ir(e){var t=e.curOp;t&&Zc(t,function(n){for(var r=0;r=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new vi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function yf(e){e.updatedDisplay=e.mustUpdate&&Co(e.cm,e.update)}function xf(e){var t=e.cm,n=t.display;e.updatedDisplay&&hi(t),e.barMeasure=Dn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Oa(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+er(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Er(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function _f(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=wn(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(r.line>=e.display.viewFrom){var l=a.styles,u=a.text.length>e.options.maxHighlightLength?Vt(t.mode,r.state):null,f=fa(e,a,r,!0);u&&(r.state=u),a.styles=f.styles;var m=a.styleClasses,A=f.classes;A?a.styleClasses=A:m&&(a.styleClasses=null);for(var j=!l||l.length!=a.styles.length||m!=A&&(!m||!A||m.bgClass!=A.bgClass||m.textClass!=A.textClass),ee=0;!j&&een)return Fn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Nt(e,function(){for(var a=0;a=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&Xa(e)==0)return!1;al(e)&&(br(e),t.dims=bo(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroml&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),or&&(a=ao(e.doc,a),l=Ta(e.doc,l));var u=a!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;cf(e,a,l),n.viewOffset=ar(Ae(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var f=Xa(e);if(!u&&f==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var m=Tf(e);return f>4&&(n.lineDiv.style.display="none"),Cf(e,n.updateLineNumbers,t.dims),f>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Lf(m),R(n.cursorDiv),R(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,u&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Fn(e,400)),n.updateLineNumbers=null,!0}function il(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==Er(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+co(e.display)-fo(e),n.top)}),t.visible=gi(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=gi(e.display,e.doc,n));if(!Co(e,t))break;hi(e);var i=Dn(e);zn(e),rn(e,i),Mo(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Eo(e,t){var n=new vi(e,t);if(Co(e,n)){hi(e),il(e,n);var r=Dn(e);zn(e),rn(e,r),Mo(e,r),n.finish()}}function Cf(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,l=a.firstChild;function u(ie){var ue=ie.nextSibling;return g&&N&&e.display.currentWheelTarget==ie?ie.style.display="none":ie.parentNode.removeChild(ie),ue}for(var f=r.view,m=r.viewFrom,A=0;A-1&&(Y=!1),Ma(e,j,m,n)),Y&&(R(j.lineNumber),j.lineNumber.appendChild(document.createTextNode(he(e.options,m)))),l=j.node.nextSibling}m+=j.size}for(;l;)l=u(l)}function zo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ht(e,"gutterChanged",e)}function Mo(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+er(e)+"px"}function ol(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=yo(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",l=0;l=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),s&&h<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!g&&!(v&&E)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Ao(r.gutters,r.lineNumbers),ll(i),n.init(i)}var bi=0,sr=null;s?sr=-.53:v?sr=15:y?sr=-.7:k&&(sr=-1/3);function sl(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function zf(e){var t=sl(e);return t.x*=sr,t.y*=sr,t}function ul(e,t){y&&c==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var n=sl(t),r=n.x,i=n.y,a=sr;t.deltaMode===0&&(r=t.deltaX,i=t.deltaY,a=1);var l=e.display,u=l.scroller,f=u.scrollWidth>u.clientWidth,m=u.scrollHeight>u.clientHeight;if(r&&f||i&&m){if(i&&N&&g){e:for(var A=t.target,j=l.view;A!=u;A=A.parentNode)for(var ee=0;ee=0&&ye(e,r.to())<=0)return n}return-1};var Ye=function(e,t){this.anchor=e,this.head=t};Ye.prototype.from=function(){return Zr(this.anchor,this.head)},Ye.prototype.to=function(){return Et(this.anchor,this.head)},Ye.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Yt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(ee,Y){return ye(ee.from(),Y.from())}),n=Se(t,i);for(var a=1;a0:f>=0){var m=Zr(u.from(),l.from()),A=Et(u.to(),l.to()),j=u.empty()?l.from()==l.head:u.from()==u.head;a<=n&&--n,t.splice(--a,2,new Ye(j?A:m,j?m:A))}}return new Rt(t,n)}function yr(e,t){return new Rt([new Ye(e,t||e)],0)}function xr(e){return e.text?ne(e.from.line+e.text.length-1,ce(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function cl(e,t){if(ye(e,t.from)<0)return e;if(ye(e,t.to)<=0)return xr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=xr(t).ch-t.to.ch),ne(n,r)}function Do(e,t){for(var n=[],r=0;r1&&e.remove(u.line+1,ie-1),e.insert(u.line+1,ve)}ht(e,"change",e,t)}function _r(e,t,n){function r(i,a,l){if(i.linked)for(var u=0;u1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ce(e.done)}function ml(e,t,n,r){var i=e.history;i.undone.length=0;var a=+new Date,l,u;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=Df(i,i.lastOp==r)))u=ce(l.changes),ye(t.from,t.to)==0&&ye(t.from,u.to)==0?u.to=xr(t):l.changes.push(Io(e,t));else{var f=ce(i.done);for((!f||!f.ranges)&&xi(e.sel,i.done),l={changes:[Io(e,t)],generation:i.generation},i.done.push(l);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,u||it(e,"historyAdded")}function qf(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Ff(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||qf(e,a,ce(i.done),t))?i.done[i.done.length-1]=t:xi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&r.clearRedo!==!1&&gl(i.undone)}function xi(e,t){var n=ce(t);n&&n.ranges&&n.equals(e)||t.push(e)}function vl(e,t,n,r){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(l){l.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=l.markedSpans),++a})}function If(e){if(!e)return null;for(var t,n=0;n-1&&(ce(u)[j]=m[j],delete m[j])}}return r}function No(e,t,n,r){if(r){var i=e.anchor;if(n){var a=ye(t,i)<0;a!=ye(n,i)<0?(i=t,t=n):a!=ye(t,n)<0&&(t=n)}return new Ye(i,t)}else return new Ye(n||t,t)}function _i(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),wt(e,new Rt([No(e.sel.primary(),t,n,i)],0),r)}function yl(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a=t.ch:u.to>t.ch))){if(i&&(it(f,"beforeCursorEnter"),f.explicitlyCleared))if(a.markedSpans){--l;continue}else break;if(!f.atomic)continue;if(n){var j=f.find(r<0?1:-1),ee=void 0;if((r<0?A:m)&&(j=Tl(e,j,-r,j&&j.line==t.line?a:null)),j&&j.line==t.line&&(ee=ye(j,n))&&(r<0?ee<0:ee>0))return on(e,j,t,r,i)}var Y=f.find(r<0?-1:1);return(r<0?m:A)&&(Y=Tl(e,Y,r,Y.line==t.line?a:null)),Y?on(e,Y,t,r,i):null}}return t}function wi(e,t,n,r,i){var a=r||1,l=on(e,t,n,a,i)||!i&&on(e,t,n,a,!0)||on(e,t,n,-a,i)||!i&&on(e,t,n,-a,!0);return l||(e.cantEdit=!0,ne(e.first,0))}function Tl(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Re(e,ne(t.line-1)):null:n>0&&t.ch==(r||Ae(e,t.line)).text.length?t.line=0;--i)El(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else El(e,t)}}function El(e,t){if(!(t.text.length==1&&t.text[0]==""&&ye(t.from,t.to)==0)){var n=Do(e,t);ml(e,t,n,e.cm?e.cm.curOp.id:NaN),On(e,t,n,io(e,t));var r=[];_r(e,function(i,a){!a&&Se(r,i.history)==-1&&(Dl(i.history,t),r.push(i.history)),On(i,t,null,io(i,t))})}}function Si(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,a,l=e.sel,u=t=="undo"?i.done:i.undone,f=t=="undo"?i.undone:i.done,m=0;m=0;--Y){var ie=ee(Y);if(ie)return ie.v}}}}function zl(e,t){if(t!=0&&(e.first+=t,e.sel=new Rt(Be(e.sel.ranges,function(i){return new Ye(ne(i.anchor.line+t,i.anchor.ch),ne(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){zt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linea&&(t={from:t.from,to:ne(a,Ae(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ir(e,t.from,t.to),n||(n=Do(e,t)),e.cm?Pf(e.cm,t,r):Fo(e,t,r),ki(e,n,ke),e.cantEdit&&wi(e,ne(e.firstLine(),0))&&(e.cantEdit=!1)}}function Pf(e,t,n){var r=e.doc,i=e.display,a=t.from,l=t.to,u=!1,f=a.line;e.options.lineWrapping||(f=_(Zt(Ae(r,a.line))),r.iter(f,l.line+1,function(Y){if(Y==i.maxLine)return u=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Ht(e),Fo(r,t,n,Za(e)),e.options.lineWrapping||(r.iter(f,a.line+t.text.length,function(Y){var ie=li(Y);ie>i.maxLineLength&&(i.maxLine=Y,i.maxLineLength=ie,i.maxLineChanged=!0,u=!1)}),u&&(e.curOp.updateMaxLine=!0)),Lc(r,a.line),Fn(e,400);var m=t.text.length-(l.line-a.line)-1;t.full?zt(e):a.line==l.line&&t.text.length==1&&!dl(e.doc,t)?vr(e,a.line,"text"):zt(e,a.line,l.line+1,m);var A=It(e,"changes"),j=It(e,"change");if(j||A){var ee={from:a,to:l,text:t.text,removed:t.removed,origin:t.origin};j&&ht(e,"change",e,ee),A&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(ee)}e.display.selForContextMenu=null}function ln(e,t,n,r,i){var a;r||(r=n),ye(r,n)<0&&(a=[r,n],n=a[0],r=a[1]),typeof t=="string"&&(t=e.splitLines(t)),an(e,{from:n,to:r,text:t,origin:i})}function Ml(e,t,n,r){n1||!(this.children[0]instanceof jn))){var u=[];this.collapse(u),this.children=[new jn(u)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,u=l;u10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=m,e.display.maxLineLength=A,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&zt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&wl(e.doc)),e&&ht(e,"markerCleared",e,this,r,i),t&&Ir(e),this.parent&&this.parent.clear()}},kr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i0||l==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=K("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Sa(e,t.line,t,n,a)||t.line!=n.line&&Sa(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ec()}a.addToHistory&&ml(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var u=t.line,f=e.cm,m;if(e.iter(u,n.line+1,function(j){f&&a.collapsed&&!f.options.lineWrapping&&Zt(j)==f.display.maxLine&&(m=!0),a.collapsed&&u!=t.line&&jt(j,0),Mc(j,new ni(a,u==t.line?t.ch:null,u==n.line?n.ch:null),e.cm&&e.cm.curOp),++u}),a.collapsed&&e.iter(t.line,n.line+1,function(j){mr(e,j)&&jt(j,0)}),a.clearOnEnter&&Ie(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Cc(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Fl,a.atomic=!0),f){if(m&&(f.curOp.updateMaxLine=!0),a.collapsed)zt(f,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var A=t.line;A<=n.line;A++)vr(f,A,"text");a.atomic&&wl(f.doc),ht(f,"markerAdded",f,a)}return a}var Bn=function(e,t){this.markers=e,this.primary=t;for(var n=0;n=0;f--)an(this,r[f]);u?_l(this,u):this.cm&&tn(this.cm)}),undo:mt(function(){Si(this,"undo")}),redo:mt(function(){Si(this,"redo")}),undoSelection:mt(function(){Si(this,"undo",!0)}),redoSelection:mt(function(){Si(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Re(this,e),t=Re(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var l=a.markedSpans;if(l)for(var u=0;u=f.to||f.from==null&&i!=e.line||f.from!=null&&i==t.line&&f.from>=t.ch)&&(!n||n(f.marker))&&r.push(f.marker.parent||f.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=a,++n}),Re(this,ne(n,t))},indexFromPos:function(e){e=Re(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var A=e.dataTransfer.getData("Text");if(A){var j;if(t.state.draggingText&&!t.state.draggingText.copy&&(j=t.listSelections()),ki(t.doc,yr(n,n)),j)for(var ee=0;ee=0;u--)ln(e.doc,"",r[u].from,r[u].to,"+delete");tn(e)})}function Po(e,t,n){var r=se(e.text,t+n,n);return r<0||r>e.text.length?null:r}function jo(e,t,n){var r=Po(e,t.ch,n);return r==null?null:new ne(t.line,r,n<0?"after":"before")}function Ro(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=Pe(n,t.doc.direction);if(a){var l=i<0?ce(a):a[0],u=i<0==(l.level==1),f=u?"after":"before",m;if(l.level>0||t.doc.direction=="rtl"){var A=Qr(t,n);m=i<0?n.text.length-1:0;var j=tr(t,A,m).top;m=De(function(ee){return tr(t,A,ee).top==j},i<0==(l.level==1)?l.from:l.to-1,m),f=="before"&&(m=Po(n,m,1))}else m=i<0?l.to:l.from;return new ne(r,m,f)}}return new ne(r,i<0?n.text.length:0,i<0?"before":"after")}function Vf(e,t,n,r){var i=Pe(t,e.doc.direction);if(!i)return jo(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=Pt(i,n.ch,n.sticky),l=i[a];if(e.doc.direction=="ltr"&&l.level%2==0&&(r>0?l.to>n.ch:l.from=l.from&&ee>=A.begin)){var Y=j?"before":"after";return new ne(n.line,ee,Y)}}var ie=function(ve,_e,be){for(var Ce=function(Ve,vt){return vt?new ne(n.line,u(Ve,1),"before"):new ne(n.line,Ve,"after")};ve>=0&&ve0==(Ne.level!=1),$e=Fe?be.begin:u(be.end,-1);if(Ne.from<=$e&&$e0?A.end:u(A.begin,-1);return me!=null&&!(r>0&&me==t.text.length)&&(ue=ie(r>0?0:i.length-1,r,m(me)),ue)?ue:null}var $n={selectAll:Ll,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ke)},killLine:function(e){return cn(e,function(t){if(t.empty()){var n=Ae(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new ne(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),ne(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Ae(e.doc,i.line-1).text;l&&(i=new ne(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ne(i.line-1,l.length-1),i,"+transpose"))}}n.push(new Ye(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Nt(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&ye(t,this.pos)==0&&n==this.button};var Gn,Zn;function od(e,t){var n=+new Date;return Zn&&Zn.compare(n,e,t)?(Gn=Zn=null,"triple"):Gn&&Gn.compare(n,e,t)?(Zn=new Bo(n,e,t),Gn=null,"double"):(Gn=new Bo(n,e,t),Zn=null,"single")}function Yl(e){var t=this,n=t.display;if(!(ot(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,lr(n,e)){g||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!Wo(t,e)){var r=Mr(t,e),i=Ut(e),a=r?od(r,i):"single";pe(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&ad(t,i,r,a,e))&&(i==1?r?sd(t,r,a,e):yn(e)==n.scroller&&kt(e):i==2?(r&&_i(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(O?t.display.input.onContextMenu(e):wo(t)))}}}function ad(e,t,n,r,i){var a="Click";return r=="double"?a="Double"+a:r=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,Kn(e,Hl(a,i),i,function(l){if(typeof l=="string"&&(l=$n[l]),!l)return!1;var u=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),u=l(e,n)!=Ze}finally{e.state.suppressEdits=!1}return u})}function ld(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var a=G?n.shiftKey&&n.metaKey:n.altKey;i.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=N?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(N?n.altKey:n.ctrlKey)),i}function sd(e,t,n,r){s?setTimeout(Ee(Qa,e),0):e.curOp.focus=H(de(e));var i=ld(e,n,r),a=e.doc.sel,l;e.options.dragDrop&&eo&&!e.isReadOnly()&&n=="single"&&(l=a.contains(t))>-1&&(ye((l=a.ranges[l]).from(),t)<0||t.xRel>0)&&(ye(l.to(),t)>0||t.xRel<0)?ud(e,r,t,i):cd(e,r,t,i)}function ud(e,t,n,r){var i=e.display,a=!1,l=gt(e,function(m){g&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:wo(e)),_t(i.wrapper.ownerDocument,"mouseup",l),_t(i.wrapper.ownerDocument,"mousemove",u),_t(i.scroller,"dragstart",f),_t(i.scroller,"drop",l),a||(kt(m),r.addNew||_i(e.doc,n,null,null,r.extend),g&&!k||s&&h==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),u=function(m){a=a||Math.abs(t.clientX-m.clientX)+Math.abs(t.clientY-m.clientY)>=10},f=function(){return a=!0};g&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,Ie(i.wrapper.ownerDocument,"mouseup",l),Ie(i.wrapper.ownerDocument,"mousemove",u),Ie(i.scroller,"dragstart",f),Ie(i.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Ql(e,t,n){if(n=="char")return new Ye(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new Ye(ne(t.line,0),Re(e.doc,ne(t.line+1,0)));var r=n(e,t);return new Ye(r.from,r.to)}function cd(e,t,n,r){s&&wo(e);var i=e.display,a=e.doc;kt(t);var l,u,f=a.sel,m=f.ranges;if(r.addNew&&!r.extend?(u=a.sel.contains(n),u>-1?l=m[u]:l=new Ye(n,n)):(l=a.sel.primary(),u=a.sel.primIndex),r.unit=="rectangle")r.addNew||(l=new Ye(n,n)),n=Mr(e,t,!0,!0),u=-1;else{var A=Ql(e,n,r.unit);r.extend?l=No(l,A.anchor,A.head,r.extend):l=A}r.addNew?u==-1?(u=m.length,wt(a,Yt(e,m.concat([l]),u),{scroll:!1,origin:"*mouse"})):m.length>1&&m[u].empty()&&r.unit=="char"&&!r.extend?(wt(a,Yt(e,m.slice(0,u).concat(m.slice(u+1)),0),{scroll:!1,origin:"*mouse"}),f=a.sel):Oo(a,u,l,Je):(u=0,wt(a,new Rt([l],0),Je),f=a.sel);var j=n;function ee(be){if(ye(j,be)!=0)if(j=be,r.unit=="rectangle"){for(var Ce=[],Ne=e.options.tabSize,Fe=Oe(Ae(a,n.line).text,n.ch,Ne),$e=Oe(Ae(a,be.line).text,be.ch,Ne),Ve=Math.min(Fe,$e),vt=Math.max(Fe,$e),rt=Math.min(n.line,be.line),Ot=Math.min(e.lastLine(),Math.max(n.line,be.line));rt<=Ot;rt++){var At=Ae(a,rt).text,ut=Ge(At,Ve,Ne);Ve==vt?Ce.push(new Ye(ne(rt,ut),ne(rt,ut))):At.length>ut&&Ce.push(new Ye(ne(rt,ut),ne(rt,Ge(At,vt,Ne))))}Ce.length||Ce.push(new Ye(n,n)),wt(a,Yt(e,f.ranges.slice(0,u).concat(Ce),u),{origin:"*mouse",scroll:!1}),e.scrollIntoView(be)}else{var Dt=l,yt=Ql(e,be,r.unit),ft=Dt.anchor,ct;ye(yt.anchor,ft)>0?(ct=yt.head,ft=Zr(Dt.from(),yt.anchor)):(ct=yt.anchor,ft=Et(Dt.to(),yt.head));var lt=f.ranges.slice(0);lt[u]=fd(e,new Ye(Re(a,ft),ct)),wt(a,Yt(e,lt,u),Je)}}var Y=i.wrapper.getBoundingClientRect(),ie=0;function ue(be){var Ce=++ie,Ne=Mr(e,be,!0,r.unit=="rectangle");if(Ne)if(ye(Ne,j)!=0){e.curOp.focus=H(de(e)),ee(Ne);var Fe=gi(i,a);(Ne.line>=Fe.to||Ne.lineY.bottom?20:0;$e&&setTimeout(gt(e,function(){ie==Ce&&(i.scroller.scrollTop+=$e,ue(be))}),50)}}function me(be){e.state.selectingText=!1,ie=1/0,be&&(kt(be),i.input.focus()),_t(i.wrapper.ownerDocument,"mousemove",ve),_t(i.wrapper.ownerDocument,"mouseup",_e),a.history.lastSelOrigin=null}var ve=gt(e,function(be){be.buttons===0||!Ut(be)?me(be):ue(be)}),_e=gt(e,me);e.state.selectingText=_e,Ie(i.wrapper.ownerDocument,"mousemove",ve),Ie(i.wrapper.ownerDocument,"mouseup",_e)}function fd(e,t){var n=t.anchor,r=t.head,i=Ae(e.doc,n.line);if(ye(n,r)==0&&n.sticky==r.sticky)return t;var a=Pe(i);if(!a)return t;var l=Pt(a,n.ch,n.sticky),u=a[l];if(u.from!=n.ch&&u.to!=n.ch)return t;var f=l+(u.from==n.ch==(u.level!=1)?0:1);if(f==0||f==a.length)return t;var m;if(r.line!=n.line)m=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var A=Pt(a,r.ch,r.sticky),j=A-l||(r.ch-n.ch)*(u.level==1?-1:1);A==f-1||A==f?m=j<0:m=j>0}var ee=a[f+(m?-1:0)],Y=m==(ee.level==1),ie=Y?ee.from:ee.to,ue=Y?"after":"before";return n.ch==ie&&n.sticky==ue?t:new Ye(new ne(n.line,ie,ue),r)}function Vl(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&kt(t);var l=e.display,u=l.lineDiv.getBoundingClientRect();if(a>u.bottom||!It(e,n))return Ct(t);a-=u.top-l.viewOffset;for(var f=0;f=i){var A=P(e.doc,a),j=e.display.gutterSpecs[f];return it(e,n,e,A,j.className,t),Ct(t)}}}function Wo(e,t){return Vl(e,t,"gutterClick",!0)}function Jl(e,t){lr(e.display,t)||dd(e,t)||ot(e,t,"contextmenu")||O||e.display.input.onContextMenu(t)}function dd(e,t){return It(e,"gutterContextMenu")?Vl(e,t,"gutterContextMenu",!1):!1}function es(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),En(e)}var fn={toString:function(){return"CodeMirror.Init"}},ts={},Ei={};function pd(e){var t=e.optionHandlers;function n(r,i,a,l){e.defaults[r]=i,a&&(t[r]=l?function(u,f,m){m!=fn&&a(u,f,m)}:a)}e.defineOption=n,e.Init=fn,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,qo(r)},!0),n("indentUnit",2,qo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){Nn(r),En(r),zt(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var a=[],l=r.doc.first;r.doc.iter(function(f){for(var m=0;;){var A=f.text.indexOf(i,m);if(A==-1)break;m=A+i.length,a.push(ne(l,A))}l++});for(var u=a.length-1;u>=0;u--)ln(r.doc,i,a[u],ne(a[u].line,a[u].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,i,a){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=fn&&r.refresh()}),n("specialCharPlaceholder",Hc,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",E?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!J),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){es(r),In(r)},!0),n("keyMap","default",function(r,i,a){var l=Li(i),u=a!=fn&&Li(a);u&&u.detach&&u.detach(r,l),l.attach&&l.attach(r,u||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,gd,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Ao(i,r.options.lineNumbers),In(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?yo(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return rn(r)},!0),n("scrollbarStyle","native",function(r){nl(r),rn(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=Ao(r.options.gutters,i),In(r)},!0),n("firstLineNumber",1,In,!0),n("lineNumberFormatter",function(r){return r},In,!0),n("showCursorWhenSelecting",!1,zn,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(en(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,hd),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,zn,!0),n("singleCursorHeightPerLine",!0,zn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Nn,!0),n("addModeClass",!1,Nn,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,Nn,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function hd(e,t,n){var r=n&&n!=fn;if(!t!=!r){var i=e.display.dragFunctions,a=t?Ie:_t;a(e.display.scroller,"dragstart",i.start),a(e.display.scroller,"dragenter",i.enter),a(e.display.scroller,"dragover",i.over),a(e.display.scroller,"dragleave",i.leave),a(e.display.scroller,"drop",i.drop)}}function gd(e){e.options.lineWrapping?(le(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Q(e.display.wrapper,"CodeMirror-wrap"),so(e)),xo(e),zt(e),En(e),setTimeout(function(){return rn(e)},100)}function tt(e,t){var n=this;if(!(this instanceof tt))return new tt(e,t);this.options=t=t?ge(t):{},ge(ts,t,!1);var r=t.value;typeof r=="string"?r=new Mt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new tt.inputStyles[t.inputStyle](this),a=this.display=new Ef(e,r,i,t);a.wrapper.CodeMirror=this,es(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),nl(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new qe,keySeq:null,specialChars:null},t.autofocus&&!E&&a.input.focus(),s&&h<11&&setTimeout(function(){return n.display.input.reset(!0)},20),md(this),Gf(),Fr(this),this.curOp.forceUpdate=!0,pl(this,r),t.autofocus&&!E||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&So(n)},20):en(this);for(var l in Ei)Ei.hasOwnProperty(l)&&Ei[l](this,t[l],fn);al(this),t.finishInit&&t.finishInit(this);for(var u=0;u20*20}Ie(t.scroller,"touchstart",function(f){if(!ot(e,f)&&!a(f)&&!Wo(e,f)){t.input.ensurePolled(),clearTimeout(n);var m=+new Date;t.activeTouch={start:m,moved:!1,prev:m-r.end<=300?r:null},f.touches.length==1&&(t.activeTouch.left=f.touches[0].pageX,t.activeTouch.top=f.touches[0].pageY)}}),Ie(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ie(t.scroller,"touchend",function(f){var m=t.activeTouch;if(m&&!lr(t,f)&&m.left!=null&&!m.moved&&new Date-m.start<300){var A=e.coordsChar(t.activeTouch,"page"),j;!m.prev||l(m,m.prev)?j=new Ye(A,A):!m.prev.prev||l(m,m.prev.prev)?j=e.findWordAt(A):j=new Ye(ne(A.line,0),Re(e.doc,ne(A.line+1,0))),e.setSelection(j.anchor,j.head),e.focus(),kt(f)}i()}),Ie(t.scroller,"touchcancel",i),Ie(t.scroller,"scroll",function(){t.scroller.clientHeight&&(An(e,t.scroller.scrollTop),Dr(e,t.scroller.scrollLeft,!0),it(e,"scroll",e))}),Ie(t.scroller,"mousewheel",function(f){return ul(e,f)}),Ie(t.scroller,"DOMMouseScroll",function(f){return ul(e,f)}),Ie(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(f){ot(e,f)||dr(f)},over:function(f){ot(e,f)||(Kf(e,f),dr(f))},start:function(f){return $f(e,f)},drop:gt(e,Uf),leave:function(f){ot(e,f)||Ol(e)}};var u=t.input.getField();Ie(u,"keyup",function(f){return Zl.call(e,f)}),Ie(u,"keydown",gt(e,Gl)),Ie(u,"keypress",gt(e,Xl)),Ie(u,"focus",function(f){return So(e,f)}),Ie(u,"blur",function(f){return en(e,f)})}var Uo=[];tt.defineInitHook=function(e){return Uo.push(e)};function Xn(e,t,n,r){var i=e.doc,a;n==null&&(n="add"),n=="smart"&&(i.mode.indent?a=wn(e,t).state:n="prev");var l=e.options.tabSize,u=Ae(i,t),f=Oe(u.text,null,l);u.stateAfter&&(u.stateAfter=null);var m=u.text.match(/^\s*/)[0],A;if(!r&&!/\S/.test(u.text))A=0,n="not";else if(n=="smart"&&(A=i.mode.indent(a,u.text.slice(m.length),u.text),A==Ze||A>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?A=Oe(Ae(i,t-1).text,null,l):A=0:n=="add"?A=f+e.options.indentUnit:n=="subtract"?A=f-e.options.indentUnit:typeof n=="number"&&(A=f+n),A=Math.max(0,A);var j="",ee=0;if(e.options.indentWithTabs)for(var Y=Math.floor(A/l);Y;--Y)ee+=l,j+=" ";if(eel,f=Bt(t),m=null;if(u&&r.ranges.length>1)if(Qt&&Qt.text.join(` +`)==t){if(r.ranges.length%Qt.text.length==0){m=[];for(var A=0;A=0;ee--){var Y=r.ranges[ee],ie=Y.from(),ue=Y.to();Y.empty()&&(n&&n>0?ie=ne(ie.line,ie.ch-n):e.state.overwrite&&!u?ue=ne(ue.line,Math.min(Ae(a,ue.line).text.length,ue.ch+ce(f).length)):u&&Qt&&Qt.lineWise&&Qt.text.join(` +`)==f.join(` +`)&&(ie=ue=ne(ie.line,0)));var me={from:ie,to:ue,text:m?m[ee%m.length]:f,origin:i||(u?"paste":e.state.cutIncoming>l?"cut":"+input")};an(e.doc,me),ht(e,"inputRead",e,me)}t&&!u&&ns(e,t),tn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=j),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function rs(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Nt(t,function(){return $o(t,n,0,null,"paste")}),!0}function ns(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),l=!1;if(a.electricChars){for(var u=0;u-1){l=Xn(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Ae(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Xn(e,i.head.line,"smart"));l&&ht(e,"electricInput",e,i.head.line)}}}function is(e){for(var t=[],n=[],r=0;ra&&(Xn(this,u.head.line,r,!0),a=u.head.line,l==this.doc.sel.primIndex&&tn(this));else{var f=u.from(),m=u.to(),A=Math.max(a,f.line);a=Math.min(this.lastLine(),m.line-(m.ch?0:1))+1;for(var j=A;j0&&Oo(this.doc,l,new Ye(f,ee[l].to()),ke)}}}),getTokenAt:function(r,i){return ga(this,r,i)},getLineTokens:function(r,i){return ga(this,ne(r),i,!0)},getTokenTypeAt:function(r){r=Re(this.doc,r);var i=da(this,Ae(this.doc,r.line)),a=0,l=(i.length-1)/2,u=r.ch,f;if(u==0)f=i[2];else for(;;){var m=a+l>>1;if((m?i[m*2-1]:0)>=u)l=m;else if(i[m*2+1]f&&(r=f,l=!0),u=Ae(this.doc,r)}else u=r;return ci(this,u,{top:0,left:0},i||"page",a||l).top+(l?this.doc.height-ar(u):0)},defaultTextHeight:function(){return Vr(this.display)},defaultCharWidth:function(){return Jr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,a,l,u){var f=this.display;r=Xt(this,Re(this.doc,r));var m=r.bottom,A=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),f.sizer.appendChild(i),l=="over")m=r.top;else if(l=="above"||l=="near"){var j=Math.max(f.wrapper.clientHeight,this.doc.height),ee=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);(l=="above"||r.bottom+i.offsetHeight>j)&&r.top>i.offsetHeight?m=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=j&&(m=r.bottom),A+i.offsetWidth>ee&&(A=ee-i.offsetWidth)}i.style.top=m+"px",i.style.left=i.style.right="",u=="right"?(A=f.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(u=="left"?A=0:u=="middle"&&(A=(f.sizer.clientWidth-i.offsetWidth)/2),i.style.left=A+"px"),a&&hf(this,{left:A,top:m,right:A+i.offsetWidth,bottom:m+i.offsetHeight})},triggerOnKeyDown:Tt(Gl),triggerOnKeyPress:Tt(Xl),triggerOnKeyUp:Zl,triggerOnMouseDown:Tt(Yl),execCommand:function(r){if($n.hasOwnProperty(r))return $n[r].call(null,this)},triggerElectric:Tt(function(r){ns(this,r)}),findPosH:function(r,i,a,l){var u=1;i<0&&(u=-1,i=-i);for(var f=Re(this.doc,r),m=0;m0&&A(a.charAt(l-1));)--l;for(;u.5||this.options.lineWrapping)&&xo(this),it(this,"refresh",this)}),swapDoc:Tt(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),pl(this,r),En(this),this.display.input.reset(),Mn(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,ht(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Wt(e),e.registerHelper=function(r,i,a){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=a},e.registerGlobalHelper=function(r,i,a,l){e.registerHelper(r,i,l),n[r]._global.push({pred:a,val:l})}}function Go(e,t,n,r,i){var a=t,l=n,u=Ae(e,t.line),f=i&&e.direction=="rtl"?-n:n;function m(){var _e=t.line+f;return _e=e.first+e.size?!1:(t=new ne(_e,t.ch,t.sticky),u=Ae(e,_e))}function A(_e){var be;if(r=="codepoint"){var Ce=u.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(Ce))be=null;else{var Ne=n>0?Ce>=55296&&Ce<56320:Ce>=56320&&Ce<57343;be=new ne(t.line,Math.max(0,Math.min(u.text.length,t.ch+n*(Ne?2:1))),-n)}}else i?be=Vf(e.cm,u,t,n):be=jo(u,t,n);if(be==null)if(!_e&&m())t=Ro(i,e.cm,u,t.line,f);else return!1;else t=be;return!0}if(r=="char"||r=="codepoint")A();else if(r=="column")A(!0);else if(r=="word"||r=="group")for(var j=null,ee=r=="group",Y=e.cm&&e.cm.getHelper(t,"wordChars"),ie=!0;!(n<0&&!A(!ie));ie=!1){var ue=u.text.charAt(t.ch)||` +`,me=Me(ue,Y)?"w":ee&&ue==` +`?"n":!ee||/\s/.test(ue)?null:"p";if(ee&&!ie&&!me&&(me="s"),j&&j!=me){n<0&&(n=1,A(),t.sticky="after");break}if(me&&(j=me),n>0&&!A(!ie))break}var ve=wi(e,t,a,l,!0);return Xe(a,ve)&&(ve.hitSide=!0),ve}function as(e,t,n,r){var i=e.doc,a=t.left,l;if(r=="page"){var u=Math.min(e.display.wrapper.clientHeight,pe(e).innerHeight||i(e).documentElement.clientHeight),f=Math.max(u-.5*Vr(e.display),3);l=(n>0?t.bottom:t.top)+n*f}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var m;m=mo(e,a,l),!!m.outside;){if(n<0?l<=0:l>=i.height){m.hitSide=!0;break}l+=n*5}return m}var Qe=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new qe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Qe.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,Ko(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function a(u){for(var f=u.target;f;f=f.parentNode){if(f==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(f.className))break}return!1}Ie(i,"paste",function(u){!a(u)||ot(r,u)||rs(u,r)||h<=11&&setTimeout(gt(r,function(){return t.updateFromDOM()}),20)}),Ie(i,"compositionstart",function(u){t.composing={data:u.data,done:!1}}),Ie(i,"compositionupdate",function(u){t.composing||(t.composing={data:u.data,done:!1})}),Ie(i,"compositionend",function(u){t.composing&&(u.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ie(i,"touchstart",function(){return n.forceCompositionEnd()}),Ie(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(u){if(!(!a(u)||ot(r,u))){if(r.somethingSelected())zi({lineWise:!1,text:r.getSelections()}),u.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var f=is(r);zi({lineWise:!0,text:f.text}),u.type=="cut"&&r.operation(function(){r.setSelections(f.ranges,0,ke),r.replaceSelection("",null,"cut")})}else return;if(u.clipboardData){u.clipboardData.clearData();var m=Qt.text.join(` +`);if(u.clipboardData.setData("Text",m),u.clipboardData.getData("Text")==m){u.preventDefault();return}}var A=os(),j=A.firstChild;Ko(j),r.display.lineSpace.insertBefore(A,r.display.lineSpace.firstChild),j.value=Qt.text.join(` +`);var ee=H(ze(i));F(j),setTimeout(function(){r.display.lineSpace.removeChild(A),ee.focus(),ee==i&&n.showPrimarySelection()},50)}}Ie(i,"copy",l),Ie(i,"cut",l)},Qe.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Qe.prototype.prepareSelection=function(){var e=Ya(this.cm,!1);return e.focus=H(ze(this.div))==this.div,e},Qe.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Qe.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Qe.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line=t.display.viewFrom&&ls(t,r)||{node:u[0].measure.map[2],offset:0},m=i.linee.firstLine()&&(r=ne(r.line-1,Ae(e.doc,r.line-1).length)),i.ch==Ae(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var a,l,u;r.line==t.viewFrom||(a=Ar(e,r.line))==0?(l=_(t.view[0].line),u=t.view[0].node):(l=_(t.view[a].line),u=t.view[a-1].node.nextSibling);var f=Ar(e,i.line),m,A;if(f==t.view.length-1?(m=t.viewTo-1,A=t.lineDiv.lastChild):(m=_(t.view[f+1].line)-1,A=t.view[f+1].node.previousSibling),!u)return!1;for(var j=e.doc.splitLines(yd(e,u,A,l,m)),ee=ir(e.doc,ne(l,0),ne(m,Ae(e.doc,m).text.length));j.length>1&&ee.length>1;)if(ce(j)==ce(ee))j.pop(),ee.pop(),m--;else if(j[0]==ee[0])j.shift(),ee.shift(),l++;else break;for(var Y=0,ie=0,ue=j[0],me=ee[0],ve=Math.min(ue.length,me.length);Yr.ch&&_e.charCodeAt(_e.length-ie-1)==be.charCodeAt(be.length-ie-1);)Y--,ie++;j[j.length-1]=_e.slice(0,_e.length-ie).replace(/^\u200b+/,""),j[0]=j[0].slice(Y).replace(/\u200b+$/,"");var Ne=ne(l,Y),Fe=ne(m,ee.length?ce(ee).length-ie:0);if(j.length>1||j[0]||ye(Ne,Fe))return ln(e.doc,j,Ne,Fe,"+input"),!0},Qe.prototype.ensurePolled=function(){this.forceCompositionEnd()},Qe.prototype.reset=function(){this.forceCompositionEnd()},Qe.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Qe.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},Qe.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Nt(this.cm,function(){return zt(e.cm)})},Qe.prototype.setUneditable=function(e){e.contentEditable="false"},Qe.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||gt(this.cm,$o)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Qe.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Qe.prototype.onContextMenu=function(){},Qe.prototype.resetPosition=function(){},Qe.prototype.needsContentAttribute=!0;function ls(e,t){var n=po(e,t.line);if(!n||n.hidden)return null;var r=Ae(e.doc,t.line),i=Na(n,r,t.line),a=Pe(r,e.doc.direction),l="left";if(a){var u=Pt(a,t.ch);l=u%2?"right":"left"}var f=ja(i.map,t.ch,l);return f.offset=f.collapse=="right"?f.end:f.start,f}function bd(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function dn(e,t){return t&&(e.bad=!0),e}function yd(e,t,n,r,i){var a="",l=!1,u=e.doc.lineSeparator(),f=!1;function m(Y){return function(ie){return ie.id==Y}}function A(){l&&(a+=u,f&&(a+=u),l=f=!1)}function j(Y){Y&&(A(),a+=Y)}function ee(Y){if(Y.nodeType==1){var ie=Y.getAttribute("cm-text");if(ie){j(ie);return}var ue=Y.getAttribute("cm-marker"),me;if(ue){var ve=e.findMarks(ne(r,0),ne(i+1,0),m(+ue));ve.length&&(me=ve[0].find(0))&&j(ir(e.doc,me.from,me.to).join(u));return}if(Y.getAttribute("contenteditable")=="false")return;var _e=/^(pre|div|p|li|table|br)$/i.test(Y.nodeName);if(!/^br$/i.test(Y.nodeName)&&Y.textContent.length==0)return;_e&&A();for(var be=0;be=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),Ie(i,"paste",function(l){ot(r,l)||rs(l,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function a(l){if(!ot(r,l)){if(r.somethingSelected())zi({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var u=is(r);zi({lineWise:!0,text:u.text}),l.type=="cut"?r.setSelections(u.ranges,null,ke):(n.prevInput="",i.value=u.text.join(` +`),F(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}Ie(i,"cut",a),Ie(i,"copy",a),Ie(e.scroller,"paste",function(l){if(!(lr(e,l)||ot(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var u=new Event("paste");u.clipboardData=l.clipboardData,i.dispatchEvent(u)}}),Ie(e.lineSpace,"selectstart",function(l){lr(e,l)||kt(l)}),Ie(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},st.prototype.createField=function(e){this.wrapper=os(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Ko(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},st.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},st.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Ya(e);if(e.options.moveInputWithCursor){var i=Xt(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-a.left))}return r},st.prototype.showSelection=function(e){var t=this.cm,n=t.display;V(n.cursorDiv,e.cursors),V(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},st.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&F(this.textarea),s&&h>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",s&&h>=9&&(this.hasSelection=null));this.resetting=!1}},st.prototype.getField=function(){return this.textarea},st.prototype.supportsTouch=function(){return!1},st.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!E||H(ze(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},st.prototype.blur=function(){this.textarea.blur()},st.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},st.prototype.receivedFocus=function(){this.slowPoll()},st.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},st.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},st.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||hr(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(s&&h>=9&&this.hasSelection===i||N&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!r&&(r="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,u=Math.min(r.length,i.length);l1e3||i.indexOf(` +`)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},st.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},st.prototype.onKeyPress=function(){s&&h>=9&&(this.hasSelection=null),this.fastPoll()},st.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Mr(n,e),l=r.scroller.scrollTop;if(!a||d)return;var u=n.options.resetSelectionOnContextMenu;u&&n.doc.sel.contains(a)==-1&>(n,wt)(n.doc,yr(a),ke);var f=i.style.cssText,m=t.wrapper.style.cssText,A=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px; + top: `+(e.clientY-A.top-5)+"px; left: "+(e.clientX-A.left-5)+`px; + z-index: 1000; background: `+(s?"rgba(255, 255, 255, .05)":"transparent")+`; + outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var j;g&&(j=i.ownerDocument.defaultView.scrollY),r.input.focus(),g&&i.ownerDocument.defaultView.scrollTo(null,j),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=Y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function ee(){if(i.selectionStart!=null){var ue=n.somethingSelected(),me="\u200B"+(ue?i.value:"");i.value="\u21DA",i.value=me,t.prevInput=ue?"":"\u200B",i.selectionStart=1,i.selectionEnd=me.length,r.selForContextMenu=n.doc.sel}}function Y(){if(t.contextMenuPending==Y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=m,i.style.cssText=f,s&&h<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!s||s&&h<9)&&ee();var ue=0,me=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?gt(n,Ll)(n):ue++<10?r.detectingSelectAll=setTimeout(me,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(me,200)}}if(s&&h>=9&&ee(),O){dr(e);var ie=function(){_t(window,"mouseup",ie),setTimeout(Y,20)};Ie(window,"mouseup",ie)}else setTimeout(Y,50)},st.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},st.prototype.setUneditable=function(){},st.prototype.needsContentAttribute=!1;function _d(e,t){if(t=t?ge(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=H(ze(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=u.getValue()}var i;if(e.form&&(Ie(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var l=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=l}}catch{}}t.finishInit=function(f){f.save=r,f.getTextArea=function(){return e},f.toTextArea=function(){f.toTextArea=isNaN,r(),e.parentNode.removeChild(f.getWrapperElement()),e.style.display="",e.form&&(_t(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var u=tt(function(f){return e.parentNode.insertBefore(f,e.nextSibling)},t);return u}function kd(e){e.off=_t,e.on=Ie,e.wheelEventPixels=zf,e.Doc=Mt,e.splitLines=Bt,e.countColumn=Oe,e.findColumn=Ge,e.isWordChar=we,e.Pass=Ze,e.signal=it,e.Line=Xr,e.changeEnd=xr,e.scrollbarModel=rl,e.Pos=ne,e.cmpPos=ye,e.modes=Wr,e.mimeModes=Kt,e.resolveMode=Ur,e.getMode=$r,e.modeExtensions=gr,e.extendMode=Kr,e.copyState=Vt,e.startState=Gr,e.innerMode=_n,e.commands=$n,e.keyMap=ur,e.keyName=Bl,e.isModifierKey=Rl,e.lookupKey=un,e.normalizeKeyMap=Qf,e.StringStream=at,e.SharedTextMarker=Bn,e.TextMarker=kr,e.LineWidget=Hn,e.e_preventDefault=kt,e.e_stopPropagation=Hr,e.e_stop=dr,e.addClass=le,e.contains=I,e.rmClass=Q,e.keyNames=wr}pd(tt),vd(tt);var wd="iter insert remove copy getEditor constructor".split(" ");for(var Ai in Mt.prototype)Mt.prototype.hasOwnProperty(Ai)&&Se(wd,Ai)<0&&(tt.prototype[Ai]=function(e){return function(){return e.apply(this.doc,arguments)}}(Mt.prototype[Ai]));return Wt(Mt),tt.inputStyles={textarea:st,contenteditable:Qe},tt.defineMode=function(e){!tt.defaults.mode&&e!="null"&&(tt.defaults.mode=e),Gt.apply(this,arguments)},tt.defineMIME=Cr,tt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),tt.defineMIME("text/plain","null"),tt.defineExtension=function(e,t){tt.prototype[e]=t},tt.defineDocExtension=function(e,t){Mt.prototype[e]=t},tt.fromTextArea=_d,kd(tt),tt.version="5.65.18",tt})});var Yn=Ke((us,cs)=>{(function(o){typeof us=="object"&&typeof cs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.overlayMode=function(p,v,C){return{startState:function(){return{base:o.startState(p),overlay:o.startState(v),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(b){return{base:o.copyState(p,b.base),overlay:o.copyState(v,b.overlay),basePos:b.basePos,baseCur:null,overlayPos:b.overlayPos,overlayCur:null}},token:function(b,S){return(b!=S.streamSeen||Math.min(S.basePos,S.overlayPos){(function(o){typeof fs=="object"&&typeof ds=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";var p=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,v=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,C=/[*+-]\s/;o.commands.newlineAndIndentContinueMarkdownList=function(S){if(S.getOption("disableInput"))return o.Pass;for(var s=S.listSelections(),h=[],g=0;g\s*$/.test(z),E=!/>\s*$/.test(z);(W||E)&&S.replaceRange("",{line:T.line,ch:0},{line:T.line,ch:T.ch+1}),h[g]=` +`}else{var N=M[1],G=M[5],J=!(C.test(M[2])||M[2].indexOf(">")>=0),re=J?parseInt(M[3],10)+1+M[4]:M[2].replace("x"," ");h[g]=` +`+N+re+G,J&&b(S,T)}}S.replaceSelections(h)};function b(S,s){var h=s.line,g=0,T=0,y=p.exec(S.getLine(h)),c=y[1];do{g+=1;var d=h+g,k=S.getLine(d),z=p.exec(k);if(z){var M=z[1],w=parseInt(y[3],10)+g-T,W=parseInt(z[3],10),E=W;if(c===M&&!isNaN(W))w===W&&(E=W+1),w>W&&(E=w+1),S.replaceRange(k.replace(p,M+E+z[4]+z[5]),{line:d,ch:0},{line:d,ch:k.length});else{if(c.length>M.length||c.length{(function(o){typeof hs=="object"&&typeof gs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){o.defineOption("placeholder","",function(h,g,T){var y=T&&T!=o.Init;if(g&&!y)h.on("blur",b),h.on("change",S),h.on("swapDoc",S),o.on(h.getInputField(),"compositionupdate",h.state.placeholderCompose=function(){C(h)}),S(h);else if(!g&&y){h.off("blur",b),h.off("change",S),h.off("swapDoc",S),o.off(h.getInputField(),"compositionupdate",h.state.placeholderCompose),p(h);var c=h.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}g&&!h.hasFocus()&&b(h)});function p(h){h.state.placeholder&&(h.state.placeholder.parentNode.removeChild(h.state.placeholder),h.state.placeholder=null)}function v(h){p(h);var g=h.state.placeholder=document.createElement("pre");g.style.cssText="height: 0; overflow: visible",g.style.direction=h.getOption("direction"),g.className="CodeMirror-placeholder CodeMirror-line-like";var T=h.getOption("placeholder");typeof T=="string"&&(T=document.createTextNode(T)),g.appendChild(T),h.display.lineSpace.insertBefore(g,h.display.lineSpace.firstChild)}function C(h){setTimeout(function(){var g=!1;if(h.lineCount()==1){var T=h.getInputField();g=T.nodeName=="TEXTAREA"?!h.getLine(0).length:!/[^\u200b]/.test(T.querySelector(".CodeMirror-line").textContent)}g?v(h):p(h)},20)}function b(h){s(h)&&v(h)}function S(h){var g=h.getWrapperElement(),T=s(h);g.className=g.className.replace(" CodeMirror-empty","")+(T?" CodeMirror-empty":""),T?v(h):p(h)}function s(h){return h.lineCount()===1&&h.getLine(0)===""}})});var ys=Ke((vs,bs)=>{(function(o){typeof vs=="object"&&typeof bs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineOption("styleSelectedText",!1,function(y,c,d){var k=d&&d!=o.Init;c&&!k?(y.state.markedSelection=[],y.state.markedSelectionStyle=typeof c=="string"?c:"CodeMirror-selectedtext",g(y),y.on("cursorActivity",p),y.on("change",v)):!c&&k&&(y.off("cursorActivity",p),y.off("change",v),h(y),y.state.markedSelection=y.state.markedSelectionStyle=null)});function p(y){y.state.markedSelection&&y.operation(function(){T(y)})}function v(y){y.state.markedSelection&&y.state.markedSelection.length&&y.operation(function(){h(y)})}var C=8,b=o.Pos,S=o.cmpPos;function s(y,c,d,k){if(S(c,d)!=0)for(var z=y.state.markedSelection,M=y.state.markedSelectionStyle,w=c.line;;){var W=w==c.line?c:b(w,0),E=w+C,N=E>=d.line,G=N?d:b(E,0),J=y.markText(W,G,{className:M});if(k==null?z.push(J):z.splice(k++,0,J),N)break;w=E}}function h(y){for(var c=y.state.markedSelection,d=0;d1)return g(y);var c=y.getCursor("start"),d=y.getCursor("end"),k=y.state.markedSelection;if(!k.length)return s(y,c,d);var z=k[0].find(),M=k[k.length-1].find();if(!z||!M||d.line-c.line<=C||S(c,M.to)>=0||S(d,z.from)<=0)return g(y);for(;S(c,z.from)>0;)k.shift().clear(),z=k[0].find();for(S(c,z.from)<0&&(z.to.line-c.line0&&(d.line-M.from.line{(function(o){typeof xs=="object"&&typeof _s=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";var p=o.Pos;function v(w){var W=w.flags;return W??(w.ignoreCase?"i":"")+(w.global?"g":"")+(w.multiline?"m":"")}function C(w,W){for(var E=v(w),N=E,G=0;Gre);q++){var O=w.getLine(J++);N=N==null?O:N+` +`+O}G=G*2,W.lastIndex=E.ch;var D=W.exec(N);if(D){var Q=N.slice(0,D.index).split(` +`),R=D[0].split(` +`),V=E.line+Q.length-1,x=Q[Q.length-1].length;return{from:p(V,x),to:p(V+R.length-1,R.length==1?x+R[0].length:R[R.length-1].length),match:D}}}}function h(w,W,E){for(var N,G=0;G<=w.length;){W.lastIndex=G;var J=W.exec(w);if(!J)break;var re=J.index+J[0].length;if(re>w.length-E)break;(!N||re>N.index+N[0].length)&&(N=J),G=J.index+1}return N}function g(w,W,E){W=C(W,"g");for(var N=E.line,G=E.ch,J=w.firstLine();N>=J;N--,G=-1){var re=w.getLine(N),q=h(re,W,G<0?0:re.length-G);if(q)return{from:p(N,q.index),to:p(N,q.index+q[0].length),match:q}}}function T(w,W,E){if(!b(W))return g(w,W,E);W=C(W,"gm");for(var N,G=1,J=w.getLine(E.line).length-E.ch,re=E.line,q=w.firstLine();re>=q;){for(var O=0;O=q;O++){var D=w.getLine(re--);N=N==null?D:D+` +`+N}G*=2;var Q=h(N,W,J);if(Q){var R=N.slice(0,Q.index).split(` +`),V=Q[0].split(` +`),x=re+R.length,K=R[R.length-1].length;return{from:p(x,K),to:p(x+V.length-1,V.length==1?K+V[0].length:V[V.length-1].length),match:Q}}}}var y,c;String.prototype.normalize?(y=function(w){return w.normalize("NFD").toLowerCase()},c=function(w){return w.normalize("NFD")}):(y=function(w){return w.toLowerCase()},c=function(w){return w});function d(w,W,E,N){if(w.length==W.length)return E;for(var G=0,J=E+Math.max(0,w.length-W.length);;){if(G==J)return G;var re=G+J>>1,q=N(w.slice(0,re)).length;if(q==E)return re;q>E?J=re:G=re+1}}function k(w,W,E,N){if(!W.length)return null;var G=N?y:c,J=G(W).split(/\r|\n\r?/);e:for(var re=E.line,q=E.ch,O=w.lastLine()+1-J.length;re<=O;re++,q=0){var D=w.getLine(re).slice(q),Q=G(D);if(J.length==1){var R=Q.indexOf(J[0]);if(R==-1)continue e;var E=d(D,Q,R,G)+q;return{from:p(re,d(D,Q,R,G)+q),to:p(re,d(D,Q,R+J[0].length,G)+q)}}else{var V=Q.length-J[0].length;if(Q.slice(V)!=J[0])continue e;for(var x=1;x=O;re--,q=-1){var D=w.getLine(re);q>-1&&(D=D.slice(0,q));var Q=G(D);if(J.length==1){var R=Q.lastIndexOf(J[0]);if(R==-1)continue e;return{from:p(re,d(D,Q,R,G)),to:p(re,d(D,Q,R+J[0].length,G))}}else{var V=J[J.length-1];if(Q.slice(0,V.length)!=V)continue e;for(var x=1,E=re-J.length+1;x(this.doc.getLine(W.line)||"").length&&(W.ch=0,W.line++)),o.cmpPos(W,this.doc.clipPos(W))!=0))return this.atOccurrence=!1;var E=this.matches(w,W);if(this.afterEmptyMatch=E&&o.cmpPos(E.from,E.to)==0,E)return this.pos=E,this.atOccurrence=!0,this.pos.match||!0;var N=p(w?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:N,to:N},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(w,W){if(this.atOccurrence){var E=o.splitLines(w);this.doc.replaceRange(E,this.pos.from,this.pos.to,W),this.pos.to=p(this.pos.from.line+E.length-1,E[E.length-1].length+(E.length==1?this.pos.from.ch:0))}}},o.defineExtension("getSearchCursor",function(w,W,E){return new M(this.doc,w,W,E)}),o.defineDocExtension("getSearchCursor",function(w,W,E){return new M(this,w,W,E)}),o.defineExtension("selectMatches",function(w,W){for(var E=[],N=this.getSearchCursor(w,this.getCursor("from"),W);N.findNext()&&!(o.cmpPos(N.to(),this.getCursor("to"))>0);)E.push({anchor:N.from(),head:N.to()});E.length&&this.setSelections(E,0)})})});var Vo=Ke((ws,Ss)=>{(function(o){typeof ws=="object"&&typeof Ss=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(I,H,le,xe,F,L){this.indented=I,this.column=H,this.type=le,this.info=xe,this.align=F,this.prev=L}function v(I,H,le,xe){var F=I.indented;return I.context&&I.context.type=="statement"&&le!="statement"&&(F=I.context.indented),I.context=new p(F,H,le,xe,null,I.context)}function C(I){var H=I.context.type;return(H==")"||H=="]"||H=="}")&&(I.indented=I.context.indented),I.context=I.context.prev}function b(I,H,le){if(H.prevToken=="variable"||H.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(I.string.slice(0,le))||H.typeAtEndOfLine&&I.column()==I.indentation())return!0}function S(I){for(;;){if(!I||I.type=="top")return!0;if(I.type=="}"&&I.prev.info!="namespace")return!1;I=I.prev}}o.defineMode("clike",function(I,H){var le=I.indentUnit,xe=H.statementIndentUnit||le,F=H.dontAlignCalls,L=H.keywords||{},de=H.types||{},ze=H.builtin||{},pe=H.blockKeywords||{},Ee=H.defKeywords||{},ge=H.atoms||{},Oe=H.hooks||{},qe=H.multiLineStrings,Se=H.indentStatements!==!1,je=H.indentSwitch!==!1,Ze=H.namespaceSeparator,ke=H.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,Je=H.numberStart||/[\d\.]/,He=H.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,Ge=H.isOperatorChar||/[+\-*&%=<>!?|\/]/,U=H.isIdentifierChar||/[\w\$_\xa1-\uffff]/,Z=H.isReservedIdentifier||!1,ce,Be;function te(we,Me){var Le=we.next();if(Oe[Le]){var $=Oe[Le](we,Me);if($!==!1)return $}if(Le=='"'||Le=="'")return Me.tokenize=fe(Le),Me.tokenize(we,Me);if(Je.test(Le)){if(we.backUp(1),we.match(He))return"number";we.next()}if(ke.test(Le))return ce=Le,null;if(Le=="/"){if(we.eat("*"))return Me.tokenize=oe,oe(we,Me);if(we.eat("/"))return we.skipToEnd(),"comment"}if(Ge.test(Le)){for(;!we.match(/^\/[\/*]/,!1)&&we.eat(Ge););return"operator"}if(we.eatWhile(U),Ze)for(;we.match(Ze);)we.eatWhile(U);var B=we.current();return h(L,B)?(h(pe,B)&&(ce="newstatement"),h(Ee,B)&&(Be=!0),"keyword"):h(de,B)?"type":h(ze,B)||Z&&Z(B)?(h(pe,B)&&(ce="newstatement"),"builtin"):h(ge,B)?"atom":"variable"}function fe(we){return function(Me,Le){for(var $=!1,B,se=!1;(B=Me.next())!=null;){if(B==we&&!$){se=!0;break}$=!$&&B=="\\"}return(se||!($||qe))&&(Le.tokenize=null),"string"}}function oe(we,Me){for(var Le=!1,$;$=we.next();){if($=="/"&&Le){Me.tokenize=null;break}Le=$=="*"}return"comment"}function Ue(we,Me){H.typeFirstDefinitions&&we.eol()&&S(Me.context)&&(Me.typeAtEndOfLine=b(we,Me,we.pos))}return{startState:function(we){return{tokenize:null,context:new p((we||0)-le,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(we,Me){var Le=Me.context;if(we.sol()&&(Le.align==null&&(Le.align=!1),Me.indented=we.indentation(),Me.startOfLine=!0),we.eatSpace())return Ue(we,Me),null;ce=Be=null;var $=(Me.tokenize||te)(we,Me);if($=="comment"||$=="meta")return $;if(Le.align==null&&(Le.align=!0),ce==";"||ce==":"||ce==","&&we.match(/^\s*(?:\/\/.*)?$/,!1))for(;Me.context.type=="statement";)C(Me);else if(ce=="{")v(Me,we.column(),"}");else if(ce=="[")v(Me,we.column(),"]");else if(ce=="(")v(Me,we.column(),")");else if(ce=="}"){for(;Le.type=="statement";)Le=C(Me);for(Le.type=="}"&&(Le=C(Me));Le.type=="statement";)Le=C(Me)}else ce==Le.type?C(Me):Se&&((Le.type=="}"||Le.type=="top")&&ce!=";"||Le.type=="statement"&&ce=="newstatement")&&v(Me,we.column(),"statement",we.current());if($=="variable"&&(Me.prevToken=="def"||H.typeFirstDefinitions&&b(we,Me,we.start)&&S(Me.context)&&we.match(/^\s*\(/,!1))&&($="def"),Oe.token){var B=Oe.token(we,Me,$);B!==void 0&&($=B)}return $=="def"&&H.styleDefs===!1&&($="variable"),Me.startOfLine=!1,Me.prevToken=Be?"def":$||ce,Ue(we,Me),$},indent:function(we,Me){if(we.tokenize!=te&&we.tokenize!=null||we.typeAtEndOfLine&&S(we.context))return o.Pass;var Le=we.context,$=Me&&Me.charAt(0),B=$==Le.type;if(Le.type=="statement"&&$=="}"&&(Le=Le.prev),H.dontIndentStatements)for(;Le.type=="statement"&&H.dontIndentStatements.test(Le.info);)Le=Le.prev;if(Oe.indent){var se=Oe.indent(we,Le,Me,le);if(typeof se=="number")return se}var De=Le.prev&&Le.prev.info=="switch";if(H.allmanIndentation&&/[{(]/.test($)){for(;Le.type!="top"&&Le.type!="}";)Le=Le.prev;return Le.indented}return Le.type=="statement"?Le.indented+($=="{"?0:xe):Le.align&&(!F||Le.type!=")")?Le.column+(B?0:1):Le.type==")"&&!B?Le.indented+xe:Le.indented+(B?0:le)+(!B&&De&&!/^(?:case|default)\b/.test(Me)?le:0)},electricInput:je?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function s(I){for(var H={},le=I.split(" "),xe=0;xe!?|\/#:@]/,hooks:{"@":function(I){return I.eatWhile(/[\w\$_]/),"meta"},'"':function(I,H){return I.match('""')?(H.tokenize=R,H.tokenize(I,H)):!1},"'":function(I){return I.match(/^(\\[^'\s]+|[^\\'])'/)?"string-2":(I.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(I,H){var le=H.context;return le.type=="}"&&le.align&&I.eat(">")?(H.context=new p(le.indented,le.column,le.type,le.info,null,le.prev),"operator"):!1},"/":function(I,H){return I.eat("*")?(H.tokenize=V(1),H.tokenize(I,H)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function x(I){return function(H,le){for(var xe=!1,F,L=!1;!H.eol();){if(!I&&!xe&&H.match('"')){L=!0;break}if(I&&H.match('"""')){L=!0;break}F=H.next(),!xe&&F=="$"&&H.match("{")&&H.skipTo("}"),xe=!xe&&F=="\\"&&!I}return(L||!I)&&(le.tokenize=null),"string"}}Q("text/x-kotlin",{name:"clike",keywords:s("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value"),types:s("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:s("catch class do else finally for if where try while enum"),defKeywords:s("class val var object interface fun"),atoms:s("true false null this"),hooks:{"@":function(I){return I.eatWhile(/[\w\$_]/),"meta"},"*":function(I,H){return H.prevToken=="."?"variable":"operator"},'"':function(I,H){return H.tokenize=x(I.match('""')),H.tokenize(I,H)},"/":function(I,H){return I.eat("*")?(H.tokenize=V(1),H.tokenize(I,H)):!1},indent:function(I,H,le,xe){var F=le&&le.charAt(0);if((I.prevToken=="}"||I.prevToken==")")&&le=="")return I.indented;if(I.prevToken=="operator"&&le!="}"&&I.context.type!="}"||I.prevToken=="variable"&&F=="."||(I.prevToken=="}"||I.prevToken==")")&&F==".")return xe*2+H.indented;if(H.align&&H.type=="}")return H.indented+(I.context.type==(le||"").charAt(0)?0:xe)}},modeProps:{closeBrackets:{triples:'"'}}}),Q(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:s("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:s("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:s("for while do if else struct"),builtin:s("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:s("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":E},modeProps:{fold:["brace","include"]}}),Q("text/x-nesc",{name:"clike",keywords:s(g+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:z,blockKeywords:s(w),atoms:s("null true false"),hooks:{"#":E},modeProps:{fold:["brace","include"]}}),Q("text/x-objectivec",{name:"clike",keywords:s(g+" "+y),types:M,builtin:s(c),blockKeywords:s(w+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:s(W+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:s("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:G,hooks:{"#":E,"*":N},modeProps:{fold:["brace","include"]}}),Q("text/x-objectivec++",{name:"clike",keywords:s(g+" "+y+" "+T),types:M,builtin:s(c),blockKeywords:s(w+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:s(W+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:s("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:G,hooks:{"#":E,"*":N,u:re,U:re,L:re,R:re,0:J,1:J,2:J,3:J,4:J,5:J,6:J,7:J,8:J,9:J,token:function(I,H,le){if(le=="variable"&&I.peek()=="("&&(H.prevToken==";"||H.prevToken==null||H.prevToken=="}")&&q(I.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),Q("text/x-squirrel",{name:"clike",keywords:s("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:z,blockKeywords:s("case catch class else for foreach if switch try while"),defKeywords:s("function local class"),typeFirstDefinitions:!0,atoms:s("true false null"),hooks:{"#":E},modeProps:{fold:["brace","include"]}});var K=null;function X(I){return function(H,le){for(var xe=!1,F,L=!1;!H.eol();){if(!xe&&H.match('"')&&(I=="single"||H.match('""'))){L=!0;break}if(!xe&&H.match("``")){K=X(I),L=!0;break}F=H.next(),xe=I=="single"&&!xe&&F=="\\"}return L&&(le.tokenize=null),"string"}}Q("text/x-ceylon",{name:"clike",keywords:s("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(I){var H=I.charAt(0);return H===H.toUpperCase()&&H!==H.toLowerCase()},blockKeywords:s("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:s("class dynamic function interface module object package value"),builtin:s("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:s("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(I){return I.eatWhile(/[\w\$_]/),"meta"},'"':function(I,H){return H.tokenize=X(I.match('""')?"triple":"single"),H.tokenize(I,H)},"`":function(I,H){return!K||!I.match("`")?!1:(H.tokenize=K,K=null,H.tokenize(I,H))},"'":function(I){return I.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(I,H,le){if((le=="variable"||le=="type")&&H.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})});var Cs=Ke((Ts,Ls)=>{(function(o){typeof Ts=="object"&&typeof Ls=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("cmake",function(){var p=/({)?[a-zA-Z0-9_]+(})?/;function v(b,S){for(var s,h,g=!1;!b.eol()&&(s=b.next())!=S.pending;){if(s==="$"&&h!="\\"&&S.pending=='"'){g=!0;break}h=s}return g&&b.backUp(1),s==S.pending?S.continueString=!1:S.continueString=!0,"string"}function C(b,S){var s=b.next();return s==="$"?b.match(p)?"variable-2":"variable":S.continueString?(b.backUp(1),v(b,S)):b.match(/(\s+)?\w+\(/)||b.match(/(\s+)?\w+\ \(/)?(b.backUp(1),"def"):s=="#"?(b.skipToEnd(),"comment"):s=="'"||s=='"'?(S.pending=s,v(b,S)):s=="("||s==")"?"bracket":s.match(/[0-9]/)?"number":(b.eatWhile(/[\w-]/),null)}return{startState:function(){var b={};return b.inDefinition=!1,b.inInclude=!1,b.continueString=!1,b.pending=!1,b},token:function(b,S){return b.eatSpace()?null:C(b,S)}}}),o.defineMIME("text/x-cmake","cmake")})});var gn=Ke((Es,zs)=>{(function(o){typeof Es=="object"&&typeof zs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("css",function(O,D){var Q=D.inline;D.propertyKeywords||(D=o.resolveMode("text/css"));var R=O.indentUnit,V=D.tokenHooks,x=D.documentTypes||{},K=D.mediaTypes||{},X=D.mediaFeatures||{},I=D.mediaValueKeywords||{},H=D.propertyKeywords||{},le=D.nonStandardPropertyKeywords||{},xe=D.fontProperties||{},F=D.counterDescriptors||{},L=D.colorKeywords||{},de=D.valueKeywords||{},ze=D.allowNested,pe=D.lineComment,Ee=D.supportsAtComponent===!0,ge=O.highlightNonStandardPropertyKeywords!==!1,Oe,qe;function Se(te,fe){return Oe=fe,te}function je(te,fe){var oe=te.next();if(V[oe]){var Ue=V[oe](te,fe);if(Ue!==!1)return Ue}if(oe=="@")return te.eatWhile(/[\w\\\-]/),Se("def",te.current());if(oe=="="||(oe=="~"||oe=="|")&&te.eat("="))return Se(null,"compare");if(oe=='"'||oe=="'")return fe.tokenize=Ze(oe),fe.tokenize(te,fe);if(oe=="#")return te.eatWhile(/[\w\\\-]/),Se("atom","hash");if(oe=="!")return te.match(/^\s*\w*/),Se("keyword","important");if(/\d/.test(oe)||oe=="."&&te.eat(/\d/))return te.eatWhile(/[\w.%]/),Se("number","unit");if(oe==="-"){if(/[\d.]/.test(te.peek()))return te.eatWhile(/[\w.%]/),Se("number","unit");if(te.match(/^-[\w\\\-]*/))return te.eatWhile(/[\w\\\-]/),te.match(/^\s*:/,!1)?Se("variable-2","variable-definition"):Se("variable-2","variable");if(te.match(/^\w+-/))return Se("meta","meta")}else return/[,+>*\/]/.test(oe)?Se(null,"select-op"):oe=="."&&te.match(/^-?[_a-z][_a-z0-9-]*/i)?Se("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(oe)?Se(null,oe):te.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(te.current())&&(fe.tokenize=ke),Se("variable callee","variable")):/[\w\\\-]/.test(oe)?(te.eatWhile(/[\w\\\-]/),Se("property","word")):Se(null,null)}function Ze(te){return function(fe,oe){for(var Ue=!1,we;(we=fe.next())!=null;){if(we==te&&!Ue){te==")"&&fe.backUp(1);break}Ue=!Ue&&we=="\\"}return(we==te||!Ue&&te!=")")&&(oe.tokenize=null),Se("string","string")}}function ke(te,fe){return te.next(),te.match(/^\s*[\"\')]/,!1)?fe.tokenize=null:fe.tokenize=Ze(")"),Se(null,"(")}function Je(te,fe,oe){this.type=te,this.indent=fe,this.prev=oe}function He(te,fe,oe,Ue){return te.context=new Je(oe,fe.indentation()+(Ue===!1?0:R),te.context),oe}function Ge(te){return te.context.prev&&(te.context=te.context.prev),te.context.type}function U(te,fe,oe){return Be[oe.context.type](te,fe,oe)}function Z(te,fe,oe,Ue){for(var we=Ue||1;we>0;we--)oe.context=oe.context.prev;return U(te,fe,oe)}function ce(te){var fe=te.current().toLowerCase();de.hasOwnProperty(fe)?qe="atom":L.hasOwnProperty(fe)?qe="keyword":qe="variable"}var Be={};return Be.top=function(te,fe,oe){if(te=="{")return He(oe,fe,"block");if(te=="}"&&oe.context.prev)return Ge(oe);if(Ee&&/@component/i.test(te))return He(oe,fe,"atComponentBlock");if(/^@(-moz-)?document$/i.test(te))return He(oe,fe,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(te))return He(oe,fe,"atBlock");if(/^@(font-face|counter-style)/i.test(te))return oe.stateArg=te,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(te))return"keyframes";if(te&&te.charAt(0)=="@")return He(oe,fe,"at");if(te=="hash")qe="builtin";else if(te=="word")qe="tag";else{if(te=="variable-definition")return"maybeprop";if(te=="interpolation")return He(oe,fe,"interpolation");if(te==":")return"pseudo";if(ze&&te=="(")return He(oe,fe,"parens")}return oe.context.type},Be.block=function(te,fe,oe){if(te=="word"){var Ue=fe.current().toLowerCase();return H.hasOwnProperty(Ue)?(qe="property","maybeprop"):le.hasOwnProperty(Ue)?(qe=ge?"string-2":"property","maybeprop"):ze?(qe=fe.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(qe+=" error","maybeprop")}else return te=="meta"?"block":!ze&&(te=="hash"||te=="qualifier")?(qe="error","block"):Be.top(te,fe,oe)},Be.maybeprop=function(te,fe,oe){return te==":"?He(oe,fe,"prop"):U(te,fe,oe)},Be.prop=function(te,fe,oe){if(te==";")return Ge(oe);if(te=="{"&&ze)return He(oe,fe,"propBlock");if(te=="}"||te=="{")return Z(te,fe,oe);if(te=="(")return He(oe,fe,"parens");if(te=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(fe.current()))qe+=" error";else if(te=="word")ce(fe);else if(te=="interpolation")return He(oe,fe,"interpolation");return"prop"},Be.propBlock=function(te,fe,oe){return te=="}"?Ge(oe):te=="word"?(qe="property","maybeprop"):oe.context.type},Be.parens=function(te,fe,oe){return te=="{"||te=="}"?Z(te,fe,oe):te==")"?Ge(oe):te=="("?He(oe,fe,"parens"):te=="interpolation"?He(oe,fe,"interpolation"):(te=="word"&&ce(fe),"parens")},Be.pseudo=function(te,fe,oe){return te=="meta"?"pseudo":te=="word"?(qe="variable-3",oe.context.type):U(te,fe,oe)},Be.documentTypes=function(te,fe,oe){return te=="word"&&x.hasOwnProperty(fe.current())?(qe="tag",oe.context.type):Be.atBlock(te,fe,oe)},Be.atBlock=function(te,fe,oe){if(te=="(")return He(oe,fe,"atBlock_parens");if(te=="}"||te==";")return Z(te,fe,oe);if(te=="{")return Ge(oe)&&He(oe,fe,ze?"block":"top");if(te=="interpolation")return He(oe,fe,"interpolation");if(te=="word"){var Ue=fe.current().toLowerCase();Ue=="only"||Ue=="not"||Ue=="and"||Ue=="or"?qe="keyword":K.hasOwnProperty(Ue)?qe="attribute":X.hasOwnProperty(Ue)?qe="property":I.hasOwnProperty(Ue)?qe="keyword":H.hasOwnProperty(Ue)?qe="property":le.hasOwnProperty(Ue)?qe=ge?"string-2":"property":de.hasOwnProperty(Ue)?qe="atom":L.hasOwnProperty(Ue)?qe="keyword":qe="error"}return oe.context.type},Be.atComponentBlock=function(te,fe,oe){return te=="}"?Z(te,fe,oe):te=="{"?Ge(oe)&&He(oe,fe,ze?"block":"top",!1):(te=="word"&&(qe="error"),oe.context.type)},Be.atBlock_parens=function(te,fe,oe){return te==")"?Ge(oe):te=="{"||te=="}"?Z(te,fe,oe,2):Be.atBlock(te,fe,oe)},Be.restricted_atBlock_before=function(te,fe,oe){return te=="{"?He(oe,fe,"restricted_atBlock"):te=="word"&&oe.stateArg=="@counter-style"?(qe="variable","restricted_atBlock_before"):U(te,fe,oe)},Be.restricted_atBlock=function(te,fe,oe){return te=="}"?(oe.stateArg=null,Ge(oe)):te=="word"?(oe.stateArg=="@font-face"&&!xe.hasOwnProperty(fe.current().toLowerCase())||oe.stateArg=="@counter-style"&&!F.hasOwnProperty(fe.current().toLowerCase())?qe="error":qe="property","maybeprop"):"restricted_atBlock"},Be.keyframes=function(te,fe,oe){return te=="word"?(qe="variable","keyframes"):te=="{"?He(oe,fe,"top"):U(te,fe,oe)},Be.at=function(te,fe,oe){return te==";"?Ge(oe):te=="{"||te=="}"?Z(te,fe,oe):(te=="word"?qe="tag":te=="hash"&&(qe="builtin"),"at")},Be.interpolation=function(te,fe,oe){return te=="}"?Ge(oe):te=="{"||te==";"?Z(te,fe,oe):(te=="word"?qe="variable":te!="variable"&&te!="("&&te!=")"&&(qe="error"),"interpolation")},{startState:function(te){return{tokenize:null,state:Q?"block":"top",stateArg:null,context:new Je(Q?"block":"top",te||0,null)}},token:function(te,fe){if(!fe.tokenize&&te.eatSpace())return null;var oe=(fe.tokenize||je)(te,fe);return oe&&typeof oe=="object"&&(Oe=oe[1],oe=oe[0]),qe=oe,Oe!="comment"&&(fe.state=Be[fe.state](Oe,te,fe)),qe},indent:function(te,fe){var oe=te.context,Ue=fe&&fe.charAt(0),we=oe.indent;return oe.type=="prop"&&(Ue=="}"||Ue==")")&&(oe=oe.prev),oe.prev&&(Ue=="}"&&(oe.type=="block"||oe.type=="top"||oe.type=="interpolation"||oe.type=="restricted_atBlock")?(oe=oe.prev,we=oe.indent):(Ue==")"&&(oe.type=="parens"||oe.type=="atBlock_parens")||Ue=="{"&&(oe.type=="at"||oe.type=="atBlock"))&&(we=Math.max(0,oe.indent-R))),we},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:pe,fold:"brace"}});function p(O){for(var D={},Q=0;Q{(function(o){typeof Ms=="object"&&typeof As=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("diff",function(){var p={"+":"positive","-":"negative","@":"meta"};return{token:function(v){var C=v.string.search(/[\t ]+?$/);if(!v.sol()||C===0)return v.skipToEnd(),("error "+(p[v.string.charAt(0)]||"")).replace(/ $/,"");var b=p[v.peek()]||v.skipToEnd();return C===-1?v.skipToEnd():v.pos=C,b}}}),o.defineMIME("text/x-diff","diff")})});var mn=Ke((qs,Fs)=>{(function(o){typeof qs=="object"&&typeof Fs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";var p={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},v={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};o.defineMode("xml",function(C,b){var S=C.indentUnit,s={},h=b.htmlMode?p:v;for(var g in h)s[g]=h[g];for(var g in b)s[g]=b[g];var T,y;function c(x,K){function X(le){return K.tokenize=le,le(x,K)}var I=x.next();if(I=="<")return x.eat("!")?x.eat("[")?x.match("CDATA[")?X(z("atom","]]>")):null:x.match("--")?X(z("comment","-->")):x.match("DOCTYPE",!0,!0)?(x.eatWhile(/[\w\._\-]/),X(M(1))):null:x.eat("?")?(x.eatWhile(/[\w\._\-]/),K.tokenize=z("meta","?>"),"meta"):(T=x.eat("/")?"closeTag":"openTag",K.tokenize=d,"tag bracket");if(I=="&"){var H;return x.eat("#")?x.eat("x")?H=x.eatWhile(/[a-fA-F\d]/)&&x.eat(";"):H=x.eatWhile(/[\d]/)&&x.eat(";"):H=x.eatWhile(/[\w\.\-:]/)&&x.eat(";"),H?"atom":"error"}else return x.eatWhile(/[^&<]/),null}c.isInText=!0;function d(x,K){var X=x.next();if(X==">"||X=="/"&&x.eat(">"))return K.tokenize=c,T=X==">"?"endTag":"selfcloseTag","tag bracket";if(X=="=")return T="equals",null;if(X=="<"){K.tokenize=c,K.state=G,K.tagName=K.tagStart=null;var I=K.tokenize(x,K);return I?I+" tag error":"tag error"}else return/[\'\"]/.test(X)?(K.tokenize=k(X),K.stringStartCol=x.column(),K.tokenize(x,K)):(x.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function k(x){var K=function(X,I){for(;!X.eol();)if(X.next()==x){I.tokenize=d;break}return"string"};return K.isInAttribute=!0,K}function z(x,K){return function(X,I){for(;!X.eol();){if(X.match(K)){I.tokenize=c;break}X.next()}return x}}function M(x){return function(K,X){for(var I;(I=K.next())!=null;){if(I=="<")return X.tokenize=M(x+1),X.tokenize(K,X);if(I==">")if(x==1){X.tokenize=c;break}else return X.tokenize=M(x-1),X.tokenize(K,X)}return"meta"}}function w(x){return x&&x.toLowerCase()}function W(x,K,X){this.prev=x.context,this.tagName=K||"",this.indent=x.indented,this.startOfLine=X,(s.doNotIndent.hasOwnProperty(K)||x.context&&x.context.noIndent)&&(this.noIndent=!0)}function E(x){x.context&&(x.context=x.context.prev)}function N(x,K){for(var X;;){if(!x.context||(X=x.context.tagName,!s.contextGrabbers.hasOwnProperty(w(X))||!s.contextGrabbers[w(X)].hasOwnProperty(w(K))))return;E(x)}}function G(x,K,X){return x=="openTag"?(X.tagStart=K.column(),J):x=="closeTag"?re:G}function J(x,K,X){return x=="word"?(X.tagName=K.current(),y="tag",D):s.allowMissingTagName&&x=="endTag"?(y="tag bracket",D(x,K,X)):(y="error",J)}function re(x,K,X){if(x=="word"){var I=K.current();return X.context&&X.context.tagName!=I&&s.implicitlyClosed.hasOwnProperty(w(X.context.tagName))&&E(X),X.context&&X.context.tagName==I||s.matchClosing===!1?(y="tag",q):(y="tag error",O)}else return s.allowMissingTagName&&x=="endTag"?(y="tag bracket",q(x,K,X)):(y="error",O)}function q(x,K,X){return x!="endTag"?(y="error",q):(E(X),G)}function O(x,K,X){return y="error",q(x,K,X)}function D(x,K,X){if(x=="word")return y="attribute",Q;if(x=="endTag"||x=="selfcloseTag"){var I=X.tagName,H=X.tagStart;return X.tagName=X.tagStart=null,x=="selfcloseTag"||s.autoSelfClosers.hasOwnProperty(w(I))?N(X,I):(N(X,I),X.context=new W(X,I,H==X.indented)),G}return y="error",D}function Q(x,K,X){return x=="equals"?R:(s.allowMissing||(y="error"),D(x,K,X))}function R(x,K,X){return x=="string"?V:x=="word"&&s.allowUnquoted?(y="string",D):(y="error",D(x,K,X))}function V(x,K,X){return x=="string"?V:D(x,K,X)}return{startState:function(x){var K={tokenize:c,state:G,indented:x||0,tagName:null,tagStart:null,context:null};return x!=null&&(K.baseIndent=x),K},token:function(x,K){if(!K.tagName&&x.sol()&&(K.indented=x.indentation()),x.eatSpace())return null;T=null;var X=K.tokenize(x,K);return(X||T)&&X!="comment"&&(y=null,K.state=K.state(T||X,x,K),y&&(X=y=="error"?X+" error":y)),X},indent:function(x,K,X){var I=x.context;if(x.tokenize.isInAttribute)return x.tagStart==x.indented?x.stringStartCol+1:x.indented+S;if(I&&I.noIndent)return o.Pass;if(x.tokenize!=d&&x.tokenize!=c)return X?X.match(/^(\s*)/)[0].length:0;if(x.tagName)return s.multilineTagIndentPastTag!==!1?x.tagStart+x.tagName.length+2:x.tagStart+S*(s.multilineTagIndentFactor||1);if(s.alignCDATA&&/$/,blockCommentStart:"",configuration:s.htmlMode?"html":"xml",helperType:s.htmlMode?"html":"xml",skipAttribute:function(x){x.state==R&&(x.state=D)},xmlCurrentTag:function(x){return x.tagName?{name:x.tagName,close:x.type=="closeTag"}:null},xmlCurrentContext:function(x){for(var K=[],X=x.context;X;X=X.prev)K.push(X.tagName);return K.reverse()}}}),o.defineMIME("text/xml","xml"),o.defineMIME("application/xml","xml"),o.mimeModes.hasOwnProperty("text/html")||o.defineMIME("text/html",{name:"xml",htmlMode:!0})})});var vn=Ke((Is,Ns)=>{(function(o){typeof Is=="object"&&typeof Ns=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("javascript",function(p,v){var C=p.indentUnit,b=v.statementIndent,S=v.jsonld,s=v.json||S,h=v.trackScope!==!1,g=v.typescript,T=v.wordCharacters||/[\w$\xa1-\uffff]/,y=function(){function _(pt){return{type:pt,style:"keyword"}}var P=_("keyword a"),ae=_("keyword b"),he=_("keyword c"),ne=_("keyword d"),ye=_("operator"),Xe={type:"atom",style:"atom"};return{if:_("if"),while:P,with:P,else:ae,do:ae,try:ae,finally:ae,return:ne,break:ne,continue:ne,new:_("new"),delete:he,void:he,throw:he,debugger:_("debugger"),var:_("var"),const:_("var"),let:_("var"),function:_("function"),catch:_("catch"),for:_("for"),switch:_("switch"),case:_("case"),default:_("default"),in:ye,typeof:ye,instanceof:ye,true:Xe,false:Xe,null:Xe,undefined:Xe,NaN:Xe,Infinity:Xe,this:_("this"),class:_("class"),super:_("atom"),yield:he,export:_("export"),import:_("import"),extends:he,await:he}}(),c=/[+\-*&%=<>!?|~^@]/,d=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function k(_){for(var P=!1,ae,he=!1;(ae=_.next())!=null;){if(!P){if(ae=="/"&&!he)return;ae=="["?he=!0:he&&ae=="]"&&(he=!1)}P=!P&&ae=="\\"}}var z,M;function w(_,P,ae){return z=_,M=ae,P}function W(_,P){var ae=_.next();if(ae=='"'||ae=="'")return P.tokenize=E(ae),P.tokenize(_,P);if(ae=="."&&_.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return w("number","number");if(ae=="."&&_.match(".."))return w("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(ae))return w(ae);if(ae=="="&&_.eat(">"))return w("=>","operator");if(ae=="0"&&_.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return w("number","number");if(/\d/.test(ae))return _.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),w("number","number");if(ae=="/")return _.eat("*")?(P.tokenize=N,N(_,P)):_.eat("/")?(_.skipToEnd(),w("comment","comment")):jt(_,P,1)?(k(_),_.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),w("regexp","string-2")):(_.eat("="),w("operator","operator",_.current()));if(ae=="`")return P.tokenize=G,G(_,P);if(ae=="#"&&_.peek()=="!")return _.skipToEnd(),w("meta","meta");if(ae=="#"&&_.eatWhile(T))return w("variable","property");if(ae=="<"&&_.match("!--")||ae=="-"&&_.match("->")&&!/\S/.test(_.string.slice(0,_.start)))return _.skipToEnd(),w("comment","comment");if(c.test(ae))return(ae!=">"||!P.lexical||P.lexical.type!=">")&&(_.eat("=")?(ae=="!"||ae=="=")&&_.eat("="):/[<>*+\-|&?]/.test(ae)&&(_.eat(ae),ae==">"&&_.eat(ae))),ae=="?"&&_.eat(".")?w("."):w("operator","operator",_.current());if(T.test(ae)){_.eatWhile(T);var he=_.current();if(P.lastType!="."){if(y.propertyIsEnumerable(he)){var ne=y[he];return w(ne.type,ne.style,he)}if(he=="async"&&_.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return w("async","keyword",he)}return w("variable","variable",he)}}function E(_){return function(P,ae){var he=!1,ne;if(S&&P.peek()=="@"&&P.match(d))return ae.tokenize=W,w("jsonld-keyword","meta");for(;(ne=P.next())!=null&&!(ne==_&&!he);)he=!he&&ne=="\\";return he||(ae.tokenize=W),w("string","string")}}function N(_,P){for(var ae=!1,he;he=_.next();){if(he=="/"&&ae){P.tokenize=W;break}ae=he=="*"}return w("comment","comment")}function G(_,P){for(var ae=!1,he;(he=_.next())!=null;){if(!ae&&(he=="`"||he=="$"&&_.eat("{"))){P.tokenize=W;break}ae=!ae&&he=="\\"}return w("quasi","string-2",_.current())}var J="([{}])";function re(_,P){P.fatArrowAt&&(P.fatArrowAt=null);var ae=_.string.indexOf("=>",_.start);if(!(ae<0)){if(g){var he=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(_.string.slice(_.start,ae));he&&(ae=he.index)}for(var ne=0,ye=!1,Xe=ae-1;Xe>=0;--Xe){var pt=_.string.charAt(Xe),Et=J.indexOf(pt);if(Et>=0&&Et<3){if(!ne){++Xe;break}if(--ne==0){pt=="("&&(ye=!0);break}}else if(Et>=3&&Et<6)++ne;else if(T.test(pt))ye=!0;else if(/["'\/`]/.test(pt))for(;;--Xe){if(Xe==0)return;var Zr=_.string.charAt(Xe-1);if(Zr==pt&&_.string.charAt(Xe-2)!="\\"){Xe--;break}}else if(ye&&!ne){++Xe;break}}ye&&!ne&&(P.fatArrowAt=Xe)}}var q={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function O(_,P,ae,he,ne,ye){this.indented=_,this.column=P,this.type=ae,this.prev=ne,this.info=ye,he!=null&&(this.align=he)}function D(_,P){if(!h)return!1;for(var ae=_.localVars;ae;ae=ae.next)if(ae.name==P)return!0;for(var he=_.context;he;he=he.prev)for(var ae=he.vars;ae;ae=ae.next)if(ae.name==P)return!0}function Q(_,P,ae,he,ne){var ye=_.cc;for(R.state=_,R.stream=ne,R.marked=null,R.cc=ye,R.style=P,_.lexical.hasOwnProperty("align")||(_.lexical.align=!0);;){var Xe=ye.length?ye.pop():s?Se:Oe;if(Xe(ae,he)){for(;ye.length&&ye[ye.length-1].lex;)ye.pop()();return R.marked?R.marked:ae=="variable"&&D(_,he)?"variable-2":P}}}var R={state:null,column:null,marked:null,cc:null};function V(){for(var _=arguments.length-1;_>=0;_--)R.cc.push(arguments[_])}function x(){return V.apply(null,arguments),!0}function K(_,P){for(var ae=P;ae;ae=ae.next)if(ae.name==_)return!0;return!1}function X(_){var P=R.state;if(R.marked="def",!!h){if(P.context){if(P.lexical.info=="var"&&P.context&&P.context.block){var ae=I(_,P.context);if(ae!=null){P.context=ae;return}}else if(!K(_,P.localVars)){P.localVars=new xe(_,P.localVars);return}}v.globalVars&&!K(_,P.globalVars)&&(P.globalVars=new xe(_,P.globalVars))}}function I(_,P){if(P)if(P.block){var ae=I(_,P.prev);return ae?ae==P.prev?P:new le(ae,P.vars,!0):null}else return K(_,P.vars)?P:new le(P.prev,new xe(_,P.vars),!1);else return null}function H(_){return _=="public"||_=="private"||_=="protected"||_=="abstract"||_=="readonly"}function le(_,P,ae){this.prev=_,this.vars=P,this.block=ae}function xe(_,P){this.name=_,this.next=P}var F=new xe("this",new xe("arguments",null));function L(){R.state.context=new le(R.state.context,R.state.localVars,!1),R.state.localVars=F}function de(){R.state.context=new le(R.state.context,R.state.localVars,!0),R.state.localVars=null}L.lex=de.lex=!0;function ze(){R.state.localVars=R.state.context.vars,R.state.context=R.state.context.prev}ze.lex=!0;function pe(_,P){var ae=function(){var he=R.state,ne=he.indented;if(he.lexical.type=="stat")ne=he.lexical.indented;else for(var ye=he.lexical;ye&&ye.type==")"&&ye.align;ye=ye.prev)ne=ye.indented;he.lexical=new O(ne,R.stream.column(),_,null,he.lexical,P)};return ae.lex=!0,ae}function Ee(){var _=R.state;_.lexical.prev&&(_.lexical.type==")"&&(_.indented=_.lexical.indented),_.lexical=_.lexical.prev)}Ee.lex=!0;function ge(_){function P(ae){return ae==_?x():_==";"||ae=="}"||ae==")"||ae=="]"?V():x(P)}return P}function Oe(_,P){return _=="var"?x(pe("vardef",P),Hr,ge(";"),Ee):_=="keyword a"?x(pe("form"),Ze,Oe,Ee):_=="keyword b"?x(pe("form"),Oe,Ee):_=="keyword d"?R.stream.match(/^\s*$/,!1)?x():x(pe("stat"),Je,ge(";"),Ee):_=="debugger"?x(ge(";")):_=="{"?x(pe("}"),de,De,Ee,ze):_==";"?x():_=="if"?(R.state.lexical.info=="else"&&R.state.cc[R.state.cc.length-1]==Ee&&R.state.cc.pop()(),x(pe("form"),Ze,Oe,Ee,Br)):_=="function"?x(Bt):_=="for"?x(pe("form"),de,ei,Oe,ze,Ee):_=="class"||g&&P=="interface"?(R.marked="keyword",x(pe("form",_=="class"?_:P),Wr,Ee)):_=="variable"?g&&P=="declare"?(R.marked="keyword",x(Oe)):g&&(P=="module"||P=="enum"||P=="type")&&R.stream.match(/^\s*\w/,!1)?(R.marked="keyword",P=="enum"?x(Ae):P=="type"?x(ti,ge("operator"),Pe,ge(";")):x(pe("form"),Ct,ge("{"),pe("}"),De,Ee,Ee)):g&&P=="namespace"?(R.marked="keyword",x(pe("form"),Se,Oe,Ee)):g&&P=="abstract"?(R.marked="keyword",x(Oe)):x(pe("stat"),Ue):_=="switch"?x(pe("form"),Ze,ge("{"),pe("}","switch"),de,De,Ee,Ee,ze):_=="case"?x(Se,ge(":")):_=="default"?x(ge(":")):_=="catch"?x(pe("form"),L,qe,Oe,Ee,ze):_=="export"?x(pe("stat"),Ur,Ee):_=="import"?x(pe("stat"),gr,Ee):_=="async"?x(Oe):P=="@"?x(Se,Oe):V(pe("stat"),Se,ge(";"),Ee)}function qe(_){if(_=="(")return x($t,ge(")"))}function Se(_,P){return ke(_,P,!1)}function je(_,P){return ke(_,P,!0)}function Ze(_){return _!="("?V():x(pe(")"),Je,ge(")"),Ee)}function ke(_,P,ae){if(R.state.fatArrowAt==R.stream.start){var he=ae?Be:ce;if(_=="(")return x(L,pe(")"),B($t,")"),Ee,ge("=>"),he,ze);if(_=="variable")return V(L,Ct,ge("=>"),he,ze)}var ne=ae?Ge:He;return q.hasOwnProperty(_)?x(ne):_=="function"?x(Bt,ne):_=="class"||g&&P=="interface"?(R.marked="keyword",x(pe("form"),to,Ee)):_=="keyword c"||_=="async"?x(ae?je:Se):_=="("?x(pe(")"),Je,ge(")"),Ee,ne):_=="operator"||_=="spread"?x(ae?je:Se):_=="["?x(pe("]"),at,Ee,ne):_=="{"?se(Me,"}",null,ne):_=="quasi"?V(U,ne):_=="new"?x(te(ae)):x()}function Je(_){return _.match(/[;\}\)\],]/)?V():V(Se)}function He(_,P){return _==","?x(Je):Ge(_,P,!1)}function Ge(_,P,ae){var he=ae==!1?He:Ge,ne=ae==!1?Se:je;if(_=="=>")return x(L,ae?Be:ce,ze);if(_=="operator")return/\+\+|--/.test(P)||g&&P=="!"?x(he):g&&P=="<"&&R.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?x(pe(">"),B(Pe,">"),Ee,he):P=="?"?x(Se,ge(":"),ne):x(ne);if(_=="quasi")return V(U,he);if(_!=";"){if(_=="(")return se(je,")","call",he);if(_==".")return x(we,he);if(_=="[")return x(pe("]"),Je,ge("]"),Ee,he);if(g&&P=="as")return R.marked="keyword",x(Pe,he);if(_=="regexp")return R.state.lastType=R.marked="operator",R.stream.backUp(R.stream.pos-R.stream.start-1),x(ne)}}function U(_,P){return _!="quasi"?V():P.slice(P.length-2)!="${"?x(U):x(Je,Z)}function Z(_){if(_=="}")return R.marked="string-2",R.state.tokenize=G,x(U)}function ce(_){return re(R.stream,R.state),V(_=="{"?Oe:Se)}function Be(_){return re(R.stream,R.state),V(_=="{"?Oe:je)}function te(_){return function(P){return P=="."?x(_?oe:fe):P=="variable"&&g?x(It,_?Ge:He):V(_?je:Se)}}function fe(_,P){if(P=="target")return R.marked="keyword",x(He)}function oe(_,P){if(P=="target")return R.marked="keyword",x(Ge)}function Ue(_){return _==":"?x(Ee,Oe):V(He,ge(";"),Ee)}function we(_){if(_=="variable")return R.marked="property",x()}function Me(_,P){if(_=="async")return R.marked="property",x(Me);if(_=="variable"||R.style=="keyword"){if(R.marked="property",P=="get"||P=="set")return x(Le);var ae;return g&&R.state.fatArrowAt==R.stream.start&&(ae=R.stream.match(/^\s*:\s*/,!1))&&(R.state.fatArrowAt=R.stream.pos+ae[0].length),x($)}else{if(_=="number"||_=="string")return R.marked=S?"property":R.style+" property",x($);if(_=="jsonld-keyword")return x($);if(g&&H(P))return R.marked="keyword",x(Me);if(_=="[")return x(Se,nt,ge("]"),$);if(_=="spread")return x(je,$);if(P=="*")return R.marked="keyword",x(Me);if(_==":")return V($)}}function Le(_){return _!="variable"?V($):(R.marked="property",x(Bt))}function $(_){if(_==":")return x(je);if(_=="(")return V(Bt)}function B(_,P,ae){function he(ne,ye){if(ae?ae.indexOf(ne)>-1:ne==","){var Xe=R.state.lexical;return Xe.info=="call"&&(Xe.pos=(Xe.pos||0)+1),x(function(pt,Et){return pt==P||Et==P?V():V(_)},he)}return ne==P||ye==P?x():ae&&ae.indexOf(";")>-1?V(_):x(ge(P))}return function(ne,ye){return ne==P||ye==P?x():V(_,he)}}function se(_,P,ae){for(var he=3;he"),Pe);if(_=="quasi")return V(_t,Ht)}function xt(_){if(_=="=>")return x(Pe)}function Ie(_){return _.match(/[\}\)\]]/)?x():_==","||_==";"?x(Ie):V(nr,Ie)}function nr(_,P){if(_=="variable"||R.style=="keyword")return R.marked="property",x(nr);if(P=="?"||_=="number"||_=="string")return x(nr);if(_==":")return x(Pe);if(_=="[")return x(ge("variable"),dt,ge("]"),nr);if(_=="(")return V(hr,nr);if(!_.match(/[;\}\)\],]/))return x()}function _t(_,P){return _!="quasi"?V():P.slice(P.length-2)!="${"?x(_t):x(Pe,it)}function it(_){if(_=="}")return R.marked="string-2",R.state.tokenize=G,x(_t)}function ot(_,P){return _=="variable"&&R.stream.match(/^\s*[?:]/,!1)||P=="?"?x(ot):_==":"?x(Pe):_=="spread"?x(ot):V(Pe)}function Ht(_,P){if(P=="<")return x(pe(">"),B(Pe,">"),Ee,Ht);if(P=="|"||_=="."||P=="&")return x(Pe);if(_=="[")return x(Pe,ge("]"),Ht);if(P=="extends"||P=="implements")return R.marked="keyword",x(Pe);if(P=="?")return x(Pe,ge(":"),Pe)}function It(_,P){if(P=="<")return x(pe(">"),B(Pe,">"),Ee,Ht)}function Wt(){return V(Pe,kt)}function kt(_,P){if(P=="=")return x(Pe)}function Hr(_,P){return P=="enum"?(R.marked="keyword",x(Ae)):V(Ct,nt,Ut,eo)}function Ct(_,P){if(g&&H(P))return R.marked="keyword",x(Ct);if(_=="variable")return X(P),x();if(_=="spread")return x(Ct);if(_=="[")return se(yn,"]");if(_=="{")return se(dr,"}")}function dr(_,P){return _=="variable"&&!R.stream.match(/^\s*:/,!1)?(X(P),x(Ut)):(_=="variable"&&(R.marked="property"),_=="spread"?x(Ct):_=="}"?V():_=="["?x(Se,ge("]"),ge(":"),dr):x(ge(":"),Ct,Ut))}function yn(){return V(Ct,Ut)}function Ut(_,P){if(P=="=")return x(je)}function eo(_){if(_==",")return x(Hr)}function Br(_,P){if(_=="keyword b"&&P=="else")return x(pe("form","else"),Oe,Ee)}function ei(_,P){if(P=="await")return x(ei);if(_=="(")return x(pe(")"),xn,Ee)}function xn(_){return _=="var"?x(Hr,pr):_=="variable"?x(pr):V(pr)}function pr(_,P){return _==")"?x():_==";"?x(pr):P=="in"||P=="of"?(R.marked="keyword",x(Se,pr)):V(Se,pr)}function Bt(_,P){if(P=="*")return R.marked="keyword",x(Bt);if(_=="variable")return X(P),x(Bt);if(_=="(")return x(L,pe(")"),B($t,")"),Ee,Pt,Oe,ze);if(g&&P=="<")return x(pe(">"),B(Wt,">"),Ee,Bt)}function hr(_,P){if(P=="*")return R.marked="keyword",x(hr);if(_=="variable")return X(P),x(hr);if(_=="(")return x(L,pe(")"),B($t,")"),Ee,Pt,ze);if(g&&P=="<")return x(pe(">"),B(Wt,">"),Ee,hr)}function ti(_,P){if(_=="keyword"||_=="variable")return R.marked="type",x(ti);if(P=="<")return x(pe(">"),B(Wt,">"),Ee)}function $t(_,P){return P=="@"&&x(Se,$t),_=="spread"?x($t):g&&H(P)?(R.marked="keyword",x($t)):g&&_=="this"?x(nt,Ut):V(Ct,nt,Ut)}function to(_,P){return _=="variable"?Wr(_,P):Kt(_,P)}function Wr(_,P){if(_=="variable")return X(P),x(Kt)}function Kt(_,P){if(P=="<")return x(pe(">"),B(Wt,">"),Ee,Kt);if(P=="extends"||P=="implements"||g&&_==",")return P=="implements"&&(R.marked="keyword"),x(g?Pe:Se,Kt);if(_=="{")return x(pe("}"),Gt,Ee)}function Gt(_,P){if(_=="async"||_=="variable"&&(P=="static"||P=="get"||P=="set"||g&&H(P))&&R.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return R.marked="keyword",x(Gt);if(_=="variable"||R.style=="keyword")return R.marked="property",x(Cr,Gt);if(_=="number"||_=="string")return x(Cr,Gt);if(_=="[")return x(Se,nt,ge("]"),Cr,Gt);if(P=="*")return R.marked="keyword",x(Gt);if(g&&_=="(")return V(hr,Gt);if(_==";"||_==",")return x(Gt);if(_=="}")return x();if(P=="@")return x(Se,Gt)}function Cr(_,P){if(P=="!"||P=="?")return x(Cr);if(_==":")return x(Pe,Ut);if(P=="=")return x(je);var ae=R.state.lexical.prev,he=ae&&ae.info=="interface";return V(he?hr:Bt)}function Ur(_,P){return P=="*"?(R.marked="keyword",x(Gr,ge(";"))):P=="default"?(R.marked="keyword",x(Se,ge(";"))):_=="{"?x(B($r,"}"),Gr,ge(";")):V(Oe)}function $r(_,P){if(P=="as")return R.marked="keyword",x(ge("variable"));if(_=="variable")return V(je,$r)}function gr(_){return _=="string"?x():_=="("?V(Se):_=="."?V(He):V(Kr,Vt,Gr)}function Kr(_,P){return _=="{"?se(Kr,"}"):(_=="variable"&&X(P),P=="*"&&(R.marked="keyword"),x(_n))}function Vt(_){if(_==",")return x(Kr,Vt)}function _n(_,P){if(P=="as")return R.marked="keyword",x(Kr)}function Gr(_,P){if(P=="from")return R.marked="keyword",x(Se)}function at(_){return _=="]"?x():V(B(je,"]"))}function Ae(){return V(pe("form"),Ct,ge("{"),pe("}"),B(ir,"}"),Ee,Ee)}function ir(){return V(Ct,Ut)}function kn(_,P){return _.lastType=="operator"||_.lastType==","||c.test(P.charAt(0))||/[,.]/.test(P.charAt(0))}function jt(_,P,ae){return P.tokenize==W&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(P.lastType)||P.lastType=="quasi"&&/\{\s*$/.test(_.string.slice(0,_.pos-(ae||0)))}return{startState:function(_){var P={tokenize:W,lastType:"sof",cc:[],lexical:new O((_||0)-C,0,"block",!1),localVars:v.localVars,context:v.localVars&&new le(null,null,!1),indented:_||0};return v.globalVars&&typeof v.globalVars=="object"&&(P.globalVars=v.globalVars),P},token:function(_,P){if(_.sol()&&(P.lexical.hasOwnProperty("align")||(P.lexical.align=!1),P.indented=_.indentation(),re(_,P)),P.tokenize!=N&&_.eatSpace())return null;var ae=P.tokenize(_,P);return z=="comment"?ae:(P.lastType=z=="operator"&&(M=="++"||M=="--")?"incdec":z,Q(P,ae,z,M,_))},indent:function(_,P){if(_.tokenize==N||_.tokenize==G)return o.Pass;if(_.tokenize!=W)return 0;var ae=P&&P.charAt(0),he=_.lexical,ne;if(!/^\s*else\b/.test(P))for(var ye=_.cc.length-1;ye>=0;--ye){var Xe=_.cc[ye];if(Xe==Ee)he=he.prev;else if(Xe!=Br&&Xe!=ze)break}for(;(he.type=="stat"||he.type=="form")&&(ae=="}"||(ne=_.cc[_.cc.length-1])&&(ne==He||ne==Ge)&&!/^[,\.=+\-*:?[\(]/.test(P));)he=he.prev;b&&he.type==")"&&he.prev.type=="stat"&&(he=he.prev);var pt=he.type,Et=ae==pt;return pt=="vardef"?he.indented+(_.lastType=="operator"||_.lastType==","?he.info.length+1:0):pt=="form"&&ae=="{"?he.indented:pt=="form"?he.indented+C:pt=="stat"?he.indented+(kn(_,P)?b||C:0):he.info=="switch"&&!Et&&v.doubleIndentSwitch!=!1?he.indented+(/^(?:case|default)\b/.test(P)?C:2*C):he.align?he.column+(Et?0:1):he.indented+(Et?0:C)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:S,jsonMode:s,expressionAllowed:jt,skipExpression:function(_){Q(_,"atom","atom","true",new o.StringStream("",2,null))}}}),o.registerHelper("wordChars","javascript",/[\w$]/),o.defineMIME("text/javascript","javascript"),o.defineMIME("text/ecmascript","javascript"),o.defineMIME("application/javascript","javascript"),o.defineMIME("application/x-javascript","javascript"),o.defineMIME("application/ecmascript","javascript"),o.defineMIME("application/json",{name:"javascript",json:!0}),o.defineMIME("application/x-json",{name:"javascript",json:!0}),o.defineMIME("application/manifest+json",{name:"javascript",json:!0}),o.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),o.defineMIME("text/typescript",{name:"javascript",typescript:!0}),o.defineMIME("application/typescript",{name:"javascript",typescript:!0})})});var Qn=Ke((Os,Ps)=>{(function(o){typeof Os=="object"&&typeof Ps=="object"?o(We(),mn(),vn(),gn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],o):o(CodeMirror)})(function(o){"use strict";var p={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function v(T,y,c){var d=T.current(),k=d.search(y);return k>-1?T.backUp(d.length-k):d.match(/<\/?$/)&&(T.backUp(d.length),T.match(y,!1)||T.match(d)),c}var C={};function b(T){var y=C[T];return y||(C[T]=new RegExp("\\s+"+T+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function S(T,y){var c=T.match(b(y));return c?/^\s*(.*?)\s*$/.exec(c[2])[1]:""}function s(T,y){return new RegExp((y?"^":"")+"","i")}function h(T,y){for(var c in T)for(var d=y[c]||(y[c]=[]),k=T[c],z=k.length-1;z>=0;z--)d.unshift(k[z])}function g(T,y){for(var c=0;c=0;M--)d.script.unshift(["type",z[M].matches,z[M].mode]);function w(W,E){var N=c.token(W,E.htmlState),G=/\btag\b/.test(N),J;if(G&&!/[<>\s\/]/.test(W.current())&&(J=E.htmlState.tagName&&E.htmlState.tagName.toLowerCase())&&d.hasOwnProperty(J))E.inTag=J+" ";else if(E.inTag&&G&&/>$/.test(W.current())){var re=/^([\S]+) (.*)/.exec(E.inTag);E.inTag=null;var q=W.current()==">"&&g(d[re[1]],re[2]),O=o.getMode(T,q),D=s(re[1],!0),Q=s(re[1],!1);E.token=function(R,V){return R.match(D,!1)?(V.token=w,V.localState=V.localMode=null,null):v(R,Q,V.localMode.token(R,V.localState))},E.localMode=O,E.localState=o.startState(O,c.indent(E.htmlState,"",""))}else E.inTag&&(E.inTag+=W.current(),W.eol()&&(E.inTag+=" "));return N}return{startState:function(){var W=o.startState(c);return{token:w,inTag:null,localMode:null,localState:null,htmlState:W}},copyState:function(W){var E;return W.localState&&(E=o.copyState(W.localMode,W.localState)),{token:W.token,inTag:W.inTag,localMode:W.localMode,localState:E,htmlState:o.copyState(c,W.htmlState)}},token:function(W,E){return E.token(W,E)},indent:function(W,E,N){return!W.localMode||/^\s*<\//.test(E)?c.indent(W.htmlState,E,N):W.localMode.indent?W.localMode.indent(W.localState,E,N):o.Pass},innerMode:function(W){return{state:W.localState||W.htmlState,mode:W.localMode||c}}}},"xml","javascript","css"),o.defineMIME("text/html","htmlmixed")})});var Hs=Ke((js,Rs)=>{(function(o){typeof js=="object"&&typeof Rs=="object"?o(We(),Qn(),Yn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/overlay"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("django:inner",function(){var p=["block","endblock","for","endfor","true","false","filter","endfilter","loop","none","self","super","if","elif","endif","as","else","import","with","endwith","without","context","ifequal","endifequal","ifnotequal","endifnotequal","extends","include","load","comment","endcomment","empty","url","static","trans","blocktrans","endblocktrans","now","regroup","lorem","ifchanged","endifchanged","firstof","debug","cycle","csrf_token","autoescape","endautoescape","spaceless","endspaceless","ssi","templatetag","verbatim","endverbatim","widthratio"],v=["add","addslashes","capfirst","center","cut","date","default","default_if_none","dictsort","dictsortreversed","divisibleby","escape","escapejs","filesizeformat","first","floatformat","force_escape","get_digit","iriencode","join","last","length","length_is","linebreaks","linebreaksbr","linenumbers","ljust","lower","make_list","phone2numeric","pluralize","pprint","random","removetags","rjust","safe","safeseq","slice","slugify","stringformat","striptags","time","timesince","timeuntil","title","truncatechars","truncatechars_html","truncatewords","truncatewords_html","unordered_list","upper","urlencode","urlize","urlizetrunc","wordcount","wordwrap","yesno"],C=["==","!=","<",">","<=",">="],b=["in","not","or","and"];p=new RegExp("^\\b("+p.join("|")+")\\b"),v=new RegExp("^\\b("+v.join("|")+")\\b"),C=new RegExp("^\\b("+C.join("|")+")\\b"),b=new RegExp("^\\b("+b.join("|")+")\\b");function S(c,d){if(c.match("{{"))return d.tokenize=h,"tag";if(c.match("{%"))return d.tokenize=g,"tag";if(c.match("{#"))return d.tokenize=T,"comment";for(;c.next()!=null&&!c.match(/\{[{%#]/,!1););return null}function s(c,d){return function(k,z){if(!z.escapeNext&&k.eat(c))z.tokenize=d;else{z.escapeNext&&(z.escapeNext=!1);var M=k.next();M=="\\"&&(z.escapeNext=!0)}return"string"}}function h(c,d){if(d.waitDot){if(d.waitDot=!1,c.peek()!=".")return"null";if(c.match(/\.\W+/))return"error";if(c.eat("."))return d.waitProperty=!0,"null";throw Error("Unexpected error while waiting for property.")}if(d.waitPipe){if(d.waitPipe=!1,c.peek()!="|")return"null";if(c.match(/\.\W+/))return"error";if(c.eat("|"))return d.waitFilter=!0,"null";throw Error("Unexpected error while waiting for filter.")}return d.waitProperty&&(d.waitProperty=!1,c.match(/\b(\w+)\b/))?(d.waitDot=!0,d.waitPipe=!0,"property"):d.waitFilter&&(d.waitFilter=!1,c.match(v))?"variable-2":c.eatSpace()?(d.waitProperty=!1,"null"):c.match(/\b\d+(\.\d+)?\b/)?"number":c.match("'")?(d.tokenize=s("'",d.tokenize),"string"):c.match('"')?(d.tokenize=s('"',d.tokenize),"string"):c.match(/\b(\w+)\b/)&&!d.foundVariable?(d.waitDot=!0,d.waitPipe=!0,"variable"):c.match("}}")?(d.waitProperty=null,d.waitFilter=null,d.waitDot=null,d.waitPipe=null,d.tokenize=S,"tag"):(c.next(),"null")}function g(c,d){if(d.waitDot){if(d.waitDot=!1,c.peek()!=".")return"null";if(c.match(/\.\W+/))return"error";if(c.eat("."))return d.waitProperty=!0,"null";throw Error("Unexpected error while waiting for property.")}if(d.waitPipe){if(d.waitPipe=!1,c.peek()!="|")return"null";if(c.match(/\.\W+/))return"error";if(c.eat("|"))return d.waitFilter=!0,"null";throw Error("Unexpected error while waiting for filter.")}if(d.waitProperty&&(d.waitProperty=!1,c.match(/\b(\w+)\b/)))return d.waitDot=!0,d.waitPipe=!0,"property";if(d.waitFilter&&(d.waitFilter=!1,c.match(v)))return"variable-2";if(c.eatSpace())return d.waitProperty=!1,"null";if(c.match(/\b\d+(\.\d+)?\b/))return"number";if(c.match("'"))return d.tokenize=s("'",d.tokenize),"string";if(c.match('"'))return d.tokenize=s('"',d.tokenize),"string";if(c.match(C))return"operator";if(c.match(b))return"keyword";var k=c.match(p);return k?(k[0]=="comment"&&(d.blockCommentTag=!0),"keyword"):c.match(/\b(\w+)\b/)?(d.waitDot=!0,d.waitPipe=!0,"variable"):c.match("%}")?(d.waitProperty=null,d.waitFilter=null,d.waitDot=null,d.waitPipe=null,d.blockCommentTag?(d.blockCommentTag=!1,d.tokenize=y):d.tokenize=S,"tag"):(c.next(),"null")}function T(c,d){return c.match(/^.*?#\}/)?d.tokenize=S:c.skipToEnd(),"comment"}function y(c,d){return c.match(/\{%\s*endcomment\s*%\}/,!1)?(d.tokenize=g,c.match("{%"),"tag"):(c.next(),"comment")}return{startState:function(){return{tokenize:S}},token:function(c,d){return d.tokenize(c,d)},blockCommentStart:"{% comment %}",blockCommentEnd:"{% endcomment %}"}}),o.defineMode("django",function(p){var v=o.getMode(p,"text/html"),C=o.getMode(p,"django:inner");return o.overlayMode(v,C)}),o.defineMIME("text/x-django","django")})});var Di=Ke((Bs,Ws)=>{(function(o){typeof Bs=="object"&&typeof Ws=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineSimpleMode=function(y,c){o.defineMode(y,function(d){return o.simpleMode(d,c)})},o.simpleMode=function(y,c){p(c,"start");var d={},k=c.meta||{},z=!1;for(var M in c)if(M!=k&&c.hasOwnProperty(M))for(var w=d[M]=[],W=c[M],E=0;E2&&N.token&&typeof N.token!="string"){for(var re=2;re-1)return o.Pass;var M=d.indent.length-1,w=y[d.state];e:for(;;){for(var W=0;W{(function(o){typeof Us=="object"&&typeof $s=="object"?o(We(),Di()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],o):o(CodeMirror)})(function(o){"use strict";var p="from",v=new RegExp("^(\\s*)\\b("+p+")\\b","i"),C=["run","cmd","entrypoint","shell"],b=new RegExp("^(\\s*)("+C.join("|")+")(\\s+\\[)","i"),S="expose",s=new RegExp("^(\\s*)("+S+")(\\s+)","i"),h=["arg","from","maintainer","label","env","add","copy","volume","user","workdir","onbuild","stopsignal","healthcheck","shell"],g=[p,S].concat(C).concat(h),T="("+g.join("|")+")",y=new RegExp("^(\\s*)"+T+"(\\s*)(#.*)?$","i"),c=new RegExp("^(\\s*)"+T+"(\\s+)","i");o.defineSimpleMode("dockerfile",{start:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:v,token:[null,"keyword"],sol:!0,next:"from"},{regex:y,token:[null,"keyword",null,"error"],sol:!0},{regex:b,token:[null,"keyword",null],sol:!0,next:"array"},{regex:s,token:[null,"keyword",null],sol:!0,next:"expose"},{regex:c,token:[null,"keyword",null],sol:!0,next:"arguments"},{regex:/./,token:null}],from:[{regex:/\s*$/,token:null,next:"start"},{regex:/(\s*)(#.*)$/,token:[null,"error"],next:"start"},{regex:/(\s*\S+\s+)(as)/i,token:[null,"keyword"],next:"start"},{token:null,next:"start"}],single:[{regex:/(?:[^\\']|\\.)/,token:"string"},{regex:/'/,token:"string",pop:!0}],double:[{regex:/(?:[^\\"]|\\.)/,token:"string"},{regex:/"/,token:"string",pop:!0}],array:[{regex:/\]/,token:null,next:"start"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"}],expose:[{regex:/\d+$/,token:"number",next:"start"},{regex:/[^\d]+$/,token:null,next:"start"},{regex:/\d+/,token:"number"},{regex:/[^\d]+/,token:null},{token:null,next:"start"}],arguments:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:/"(?:[^\\"]|\\.)*"?$/,token:"string",next:"start"},{regex:/"/,token:"string",push:"double"},{regex:/'(?:[^\\']|\\.)*'?$/,token:"string",next:"start"},{regex:/'/,token:"string",push:"single"},{regex:/[^#"']+[\\`]$/,token:null},{regex:/[^#"']+$/,token:null,next:"start"},{regex:/[^#"']+/,token:null},{token:null,next:"start"}],meta:{lineComment:"#"}}),o.defineMIME("text/x-dockerfile","dockerfile")})});var Xs=Ke((Gs,Zs)=>{(function(o){typeof Gs=="object"&&typeof Zs=="object"?o(We()):typeof define=="function"&&define.amd?define(["../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var p=0;p-1&&C.substring(s+1,C.length);if(h)return o.findModeByExtension(h)},o.findModeByName=function(C){C=C.toLowerCase();for(var b=0;b{(function(o){typeof Ys=="object"&&typeof Qs=="object"?o(We(),mn(),Xs()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../meta"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("markdown",function(p,v){var C=o.getMode(p,"text/html"),b=C.name=="null";function S(F){if(o.findModeByName){var L=o.findModeByName(F);L&&(F=L.mime||L.mimes[0])}var de=o.getMode(p,F);return de.name=="null"?null:de}v.highlightFormatting===void 0&&(v.highlightFormatting=!1),v.maxBlockquoteDepth===void 0&&(v.maxBlockquoteDepth=0),v.taskLists===void 0&&(v.taskLists=!1),v.strikethrough===void 0&&(v.strikethrough=!1),v.emoji===void 0&&(v.emoji=!1),v.fencedCodeBlockHighlighting===void 0&&(v.fencedCodeBlockHighlighting=!0),v.fencedCodeBlockDefaultMode===void 0&&(v.fencedCodeBlockDefaultMode="text/plain"),v.xml===void 0&&(v.xml=!0),v.tokenTypeOverrides===void 0&&(v.tokenTypeOverrides={});var s={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var h in s)s.hasOwnProperty(h)&&v.tokenTypeOverrides[h]&&(s[h]=v.tokenTypeOverrides[h]);var g=/^([*\-_])(?:\s*\1){2,}\s*$/,T=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,y=/^\[(x| )\](?=\s)/i,c=v.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,d=/^ {0,3}(?:\={1,}|-{2,})\s*$/,k=/^[^#!\[\]*_\\<>` "'(~:]+/,z=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,M=/^\s*\[[^\]]+?\]:.*$/,w=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,W=" ";function E(F,L,de){return L.f=L.inline=de,de(F,L)}function N(F,L,de){return L.f=L.block=de,de(F,L)}function G(F){return!F||!/\S/.test(F.string)}function J(F){if(F.linkTitle=!1,F.linkHref=!1,F.linkText=!1,F.em=!1,F.strong=!1,F.strikethrough=!1,F.quote=0,F.indentedCode=!1,F.f==q){var L=b;if(!L){var de=o.innerMode(C,F.htmlState);L=de.mode.name=="xml"&&de.state.tagStart===null&&!de.state.context&&de.state.tokenize.isInText}L&&(F.f=R,F.block=re,F.htmlState=null)}return F.trailingSpace=0,F.trailingSpaceNewLine=!1,F.prevLine=F.thisLine,F.thisLine={stream:null},null}function re(F,L){var de=F.column()===L.indentation,ze=G(L.prevLine.stream),pe=L.indentedCode,Ee=L.prevLine.hr,ge=L.list!==!1,Oe=(L.listStack[L.listStack.length-1]||0)+3;L.indentedCode=!1;var qe=L.indentation;if(L.indentationDiff===null&&(L.indentationDiff=L.indentation,ge)){for(L.list=null;qe=4&&(pe||L.prevLine.fencedCodeEnd||L.prevLine.header||ze))return F.skipToEnd(),L.indentedCode=!0,s.code;if(F.eatSpace())return null;if(de&&L.indentation<=Oe&&(Ze=F.match(c))&&Ze[1].length<=6)return L.quote=0,L.header=Ze[1].length,L.thisLine.header=!0,v.highlightFormatting&&(L.formatting="header"),L.f=L.inline,D(L);if(L.indentation<=Oe&&F.eat(">"))return L.quote=de?1:L.quote+1,v.highlightFormatting&&(L.formatting="quote"),F.eatSpace(),D(L);if(!je&&!L.setext&&de&&L.indentation<=Oe&&(Ze=F.match(T))){var ke=Ze[1]?"ol":"ul";return L.indentation=qe+F.current().length,L.list=!0,L.quote=0,L.listStack.push(L.indentation),L.em=!1,L.strong=!1,L.code=!1,L.strikethrough=!1,v.taskLists&&F.match(y,!1)&&(L.taskList=!0),L.f=L.inline,v.highlightFormatting&&(L.formatting=["list","list-"+ke]),D(L)}else{if(de&&L.indentation<=Oe&&(Ze=F.match(z,!0)))return L.quote=0,L.fencedEndRE=new RegExp(Ze[1]+"+ *$"),L.localMode=v.fencedCodeBlockHighlighting&&S(Ze[2]||v.fencedCodeBlockDefaultMode),L.localMode&&(L.localState=o.startState(L.localMode)),L.f=L.block=O,v.highlightFormatting&&(L.formatting="code-block"),L.code=-1,D(L);if(L.setext||(!Se||!ge)&&!L.quote&&L.list===!1&&!L.code&&!je&&!M.test(F.string)&&(Ze=F.lookAhead(1))&&(Ze=Ze.match(d)))return L.setext?(L.header=L.setext,L.setext=0,F.skipToEnd(),v.highlightFormatting&&(L.formatting="header")):(L.header=Ze[0].charAt(0)=="="?1:2,L.setext=L.header),L.thisLine.header=!0,L.f=L.inline,D(L);if(je)return F.skipToEnd(),L.hr=!0,L.thisLine.hr=!0,s.hr;if(F.peek()==="[")return E(F,L,I)}return E(F,L,L.inline)}function q(F,L){var de=C.token(F,L.htmlState);if(!b){var ze=o.innerMode(C,L.htmlState);(ze.mode.name=="xml"&&ze.state.tagStart===null&&!ze.state.context&&ze.state.tokenize.isInText||L.md_inside&&F.current().indexOf(">")>-1)&&(L.f=R,L.block=re,L.htmlState=null)}return de}function O(F,L){var de=L.listStack[L.listStack.length-1]||0,ze=L.indentation=F.quote?L.push(s.formatting+"-"+F.formatting[de]+"-"+F.quote):L.push("error"))}if(F.taskOpen)return L.push("meta"),L.length?L.join(" "):null;if(F.taskClosed)return L.push("property"),L.length?L.join(" "):null;if(F.linkHref?L.push(s.linkHref,"url"):(F.strong&&L.push(s.strong),F.em&&L.push(s.em),F.strikethrough&&L.push(s.strikethrough),F.emoji&&L.push(s.emoji),F.linkText&&L.push(s.linkText),F.code&&L.push(s.code),F.image&&L.push(s.image),F.imageAltText&&L.push(s.imageAltText,"link"),F.imageMarker&&L.push(s.imageMarker)),F.header&&L.push(s.header,s.header+"-"+F.header),F.quote&&(L.push(s.quote),!v.maxBlockquoteDepth||v.maxBlockquoteDepth>=F.quote?L.push(s.quote+"-"+F.quote):L.push(s.quote+"-"+v.maxBlockquoteDepth)),F.list!==!1){var ze=(F.listStack.length-1)%3;ze?ze===1?L.push(s.list2):L.push(s.list3):L.push(s.list1)}return F.trailingSpaceNewLine?L.push("trailing-space-new-line"):F.trailingSpace&&L.push("trailing-space-"+(F.trailingSpace%2?"a":"b")),L.length?L.join(" "):null}function Q(F,L){if(F.match(k,!0))return D(L)}function R(F,L){var de=L.text(F,L);if(typeof de<"u")return de;if(L.list)return L.list=null,D(L);if(L.taskList){var ze=F.match(y,!0)[1]===" ";return ze?L.taskOpen=!0:L.taskClosed=!0,v.highlightFormatting&&(L.formatting="task"),L.taskList=!1,D(L)}if(L.taskOpen=!1,L.taskClosed=!1,L.header&&F.match(/^#+$/,!0))return v.highlightFormatting&&(L.formatting="header"),D(L);var pe=F.next();if(L.linkTitle){L.linkTitle=!1;var Ee=pe;pe==="("&&(Ee=")"),Ee=(Ee+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ge="^\\s*(?:[^"+Ee+"\\\\]+|\\\\\\\\|\\\\.)"+Ee;if(F.match(new RegExp(ge),!0))return s.linkHref}if(pe==="`"){var Oe=L.formatting;v.highlightFormatting&&(L.formatting="code"),F.eatWhile("`");var qe=F.current().length;if(L.code==0&&(!L.quote||qe==1))return L.code=qe,D(L);if(qe==L.code){var Se=D(L);return L.code=0,Se}else return L.formatting=Oe,D(L)}else if(L.code)return D(L);if(pe==="\\"&&(F.next(),v.highlightFormatting)){var je=D(L),Ze=s.formatting+"-escape";return je?je+" "+Ze:Ze}if(pe==="!"&&F.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return L.imageMarker=!0,L.image=!0,v.highlightFormatting&&(L.formatting="image"),D(L);if(pe==="["&&L.imageMarker&&F.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return L.imageMarker=!1,L.imageAltText=!0,v.highlightFormatting&&(L.formatting="image"),D(L);if(pe==="]"&&L.imageAltText){v.highlightFormatting&&(L.formatting="image");var je=D(L);return L.imageAltText=!1,L.image=!1,L.inline=L.f=x,je}if(pe==="["&&!L.image)return L.linkText&&F.match(/^.*?\]/)||(L.linkText=!0,v.highlightFormatting&&(L.formatting="link")),D(L);if(pe==="]"&&L.linkText){v.highlightFormatting&&(L.formatting="link");var je=D(L);return L.linkText=!1,L.inline=L.f=F.match(/\(.*?\)| ?\[.*?\]/,!1)?x:R,je}if(pe==="<"&&F.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=V,v.highlightFormatting&&(L.formatting="link");var je=D(L);return je?je+=" ":je="",je+s.linkInline}if(pe==="<"&&F.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=V,v.highlightFormatting&&(L.formatting="link");var je=D(L);return je?je+=" ":je="",je+s.linkEmail}if(v.xml&&pe==="<"&&F.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ke=F.string.indexOf(">",F.pos);if(ke!=-1){var Je=F.string.substring(F.start,ke);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Je)&&(L.md_inside=!0)}return F.backUp(1),L.htmlState=o.startState(C),N(F,L,q)}if(v.xml&&pe==="<"&&F.match(/^\/\w*?>/))return L.md_inside=!1,"tag";if(pe==="*"||pe==="_"){for(var He=1,Ge=F.pos==1?" ":F.string.charAt(F.pos-2);He<3&&F.eat(pe);)He++;var U=F.peek()||" ",Z=!/\s/.test(U)&&(!w.test(U)||/\s/.test(Ge)||w.test(Ge)),ce=!/\s/.test(Ge)&&(!w.test(Ge)||/\s/.test(U)||w.test(U)),Be=null,te=null;if(He%2&&(!L.em&&Z&&(pe==="*"||!ce||w.test(Ge))?Be=!0:L.em==pe&&ce&&(pe==="*"||!Z||w.test(U))&&(Be=!1)),He>1&&(!L.strong&&Z&&(pe==="*"||!ce||w.test(Ge))?te=!0:L.strong==pe&&ce&&(pe==="*"||!Z||w.test(U))&&(te=!1)),te!=null||Be!=null){v.highlightFormatting&&(L.formatting=Be==null?"strong":te==null?"em":"strong em"),Be===!0&&(L.em=pe),te===!0&&(L.strong=pe);var Se=D(L);return Be===!1&&(L.em=!1),te===!1&&(L.strong=!1),Se}}else if(pe===" "&&(F.eat("*")||F.eat("_"))){if(F.peek()===" ")return D(L);F.backUp(1)}if(v.strikethrough){if(pe==="~"&&F.eatWhile(pe)){if(L.strikethrough){v.highlightFormatting&&(L.formatting="strikethrough");var Se=D(L);return L.strikethrough=!1,Se}else if(F.match(/^[^\s]/,!1))return L.strikethrough=!0,v.highlightFormatting&&(L.formatting="strikethrough"),D(L)}else if(pe===" "&&F.match("~~",!0)){if(F.peek()===" ")return D(L);F.backUp(2)}}if(v.emoji&&pe===":"&&F.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){L.emoji=!0,v.highlightFormatting&&(L.formatting="emoji");var fe=D(L);return L.emoji=!1,fe}return pe===" "&&(F.match(/^ +$/,!1)?L.trailingSpace++:L.trailingSpace&&(L.trailingSpaceNewLine=!0)),D(L)}function V(F,L){var de=F.next();if(de===">"){L.f=L.inline=R,v.highlightFormatting&&(L.formatting="link");var ze=D(L);return ze?ze+=" ":ze="",ze+s.linkInline}return F.match(/^[^>]+/,!0),s.linkInline}function x(F,L){if(F.eatSpace())return null;var de=F.next();return de==="("||de==="["?(L.f=L.inline=X(de==="("?")":"]"),v.highlightFormatting&&(L.formatting="link-string"),L.linkHref=!0,D(L)):"error"}var K={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function X(F){return function(L,de){var ze=L.next();if(ze===F){de.f=de.inline=R,v.highlightFormatting&&(de.formatting="link-string");var pe=D(de);return de.linkHref=!1,pe}return L.match(K[F]),de.linkHref=!0,D(de)}}function I(F,L){return F.match(/^([^\]\\]|\\.)*\]:/,!1)?(L.f=H,F.next(),v.highlightFormatting&&(L.formatting="link"),L.linkText=!0,D(L)):E(F,L,R)}function H(F,L){if(F.match("]:",!0)){L.f=L.inline=le,v.highlightFormatting&&(L.formatting="link");var de=D(L);return L.linkText=!1,de}return F.match(/^([^\]\\]|\\.)+/,!0),s.linkText}function le(F,L){return F.eatSpace()?null:(F.match(/^[^\s]+/,!0),F.peek()===void 0?L.linkTitle=!0:F.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),L.f=L.inline=R,s.linkHref+" url")}var xe={startState:function(){return{f:re,prevLine:{stream:null},thisLine:{stream:null},block:re,htmlState:null,indentation:0,inline:R,text:Q,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(F){return{f:F.f,prevLine:F.prevLine,thisLine:F.thisLine,block:F.block,htmlState:F.htmlState&&o.copyState(C,F.htmlState),indentation:F.indentation,localMode:F.localMode,localState:F.localMode?o.copyState(F.localMode,F.localState):null,inline:F.inline,text:F.text,formatting:!1,linkText:F.linkText,linkTitle:F.linkTitle,linkHref:F.linkHref,code:F.code,em:F.em,strong:F.strong,strikethrough:F.strikethrough,emoji:F.emoji,header:F.header,setext:F.setext,hr:F.hr,taskList:F.taskList,list:F.list,listStack:F.listStack.slice(0),quote:F.quote,indentedCode:F.indentedCode,trailingSpace:F.trailingSpace,trailingSpaceNewLine:F.trailingSpaceNewLine,md_inside:F.md_inside,fencedEndRE:F.fencedEndRE}},token:function(F,L){if(L.formatting=!1,F!=L.thisLine.stream){if(L.header=0,L.hr=!1,F.match(/^\s*$/,!0))return J(L),null;if(L.prevLine=L.thisLine,L.thisLine={stream:F},L.taskList=!1,L.trailingSpace=0,L.trailingSpaceNewLine=!1,!L.localState&&(L.f=L.block,L.f!=q)){var de=F.match(/^\s*/,!0)[0].replace(/\t/g,W).length;if(L.indentation=de,L.indentationDiff=null,de>0)return null}}return L.f(F,L)},innerMode:function(F){return F.block==q?{state:F.htmlState,mode:C}:F.localState?{state:F.localState,mode:F.localMode}:{state:F,mode:xe}},indent:function(F,L,de){return F.block==q&&C.indent?C.indent(F.htmlState,L,de):F.localState&&F.localMode.indent?F.localMode.indent(F.localState,L,de):o.Pass},blankLine:J,getType:D,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return xe},"xml"),o.defineMIME("text/markdown","markdown"),o.defineMIME("text/x-markdown","markdown")})});var eu=Ke((Vs,Js)=>{(function(o){typeof Vs=="object"&&typeof Js=="object"?o(We(),Jo(),Yn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../markdown/markdown","../../addon/mode/overlay"],o):o(CodeMirror)})(function(o){"use strict";var p=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;o.defineMode("gfm",function(v,C){var b=0;function S(T){return T.code=!1,null}var s={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(T){return{code:T.code,codeBlock:T.codeBlock,ateSpace:T.ateSpace}},token:function(T,y){if(y.combineTokens=null,y.codeBlock)return T.match(/^```+/)?(y.codeBlock=!1,null):(T.skipToEnd(),null);if(T.sol()&&(y.code=!1),T.sol()&&T.match(/^```+/))return T.skipToEnd(),y.codeBlock=!0,null;if(T.peek()==="`"){T.next();var c=T.pos;T.eatWhile("`");var d=1+T.pos-c;return y.code?d===b&&(y.code=!1):(b=d,y.code=!0),null}else if(y.code)return T.next(),null;if(T.eatSpace())return y.ateSpace=!0,null;if((T.sol()||y.ateSpace)&&(y.ateSpace=!1,C.gitHubSpice!==!1)){if(T.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return y.combineTokens=!0,"link";if(T.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return y.combineTokens=!0,"link"}return T.match(p)&&T.string.slice(T.start-2,T.start)!="]("&&(T.start==0||/\W/.test(T.string.charAt(T.start-1)))?(y.combineTokens=!0,"link"):(T.next(),null)},blankLine:S},h={taskLists:!0,strikethrough:!0,emoji:!0};for(var g in C)h[g]=C[g];return h.name="markdown",o.overlayMode(o.getMode(v,h),s)},"markdown"),o.defineMIME("text/x-gfm","gfm")})});var nu=Ke((tu,ru)=>{(function(o){typeof tu=="object"&&typeof ru=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("go",function(p){var v=p.indentUnit,C={break:!0,case:!0,chan:!0,const:!0,continue:!0,default:!0,defer:!0,else:!0,fallthrough:!0,for:!0,func:!0,go:!0,goto:!0,if:!0,import:!0,interface:!0,map:!0,package:!0,range:!0,return:!0,select:!0,struct:!0,switch:!0,type:!0,var:!0,bool:!0,byte:!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,int:!0,uint:!0,uintptr:!0,error:!0,rune:!0,any:!0,comparable:!0},b={true:!0,false:!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,delete:!0,imag:!0,len:!0,make:!0,new:!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},S=/[+\-*&^%:=<>!|\/]/,s;function h(k,z){var M=k.next();if(M=='"'||M=="'"||M=="`")return z.tokenize=g(M),z.tokenize(k,z);if(/[\d\.]/.test(M))return M=="."?k.match(/^[0-9_]+([eE][\-+]?[0-9_]+)?/):M=="0"?k.match(/^[xX][0-9a-fA-F_]+/)||k.match(/^[0-7_]+/):k.match(/^[0-9_]*\.?[0-9_]*([eE][\-+]?[0-9_]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(M))return s=M,null;if(M=="/"){if(k.eat("*"))return z.tokenize=T,T(k,z);if(k.eat("/"))return k.skipToEnd(),"comment"}if(S.test(M))return k.eatWhile(S),"operator";k.eatWhile(/[\w\$_\xa1-\uffff]/);var w=k.current();return C.propertyIsEnumerable(w)?((w=="case"||w=="default")&&(s="case"),"keyword"):b.propertyIsEnumerable(w)?"atom":"variable"}function g(k){return function(z,M){for(var w=!1,W,E=!1;(W=z.next())!=null;){if(W==k&&!w){E=!0;break}w=!w&&k!="`"&&W=="\\"}return(E||!(w||k=="`"))&&(M.tokenize=h),"string"}}function T(k,z){for(var M=!1,w;w=k.next();){if(w=="/"&&M){z.tokenize=h;break}M=w=="*"}return"comment"}function y(k,z,M,w,W){this.indented=k,this.column=z,this.type=M,this.align=w,this.prev=W}function c(k,z,M){return k.context=new y(k.indented,z,M,null,k.context)}function d(k){if(k.context.prev){var z=k.context.type;return(z==")"||z=="]"||z=="}")&&(k.indented=k.context.indented),k.context=k.context.prev}}return{startState:function(k){return{tokenize:null,context:new y((k||0)-v,0,"top",!1),indented:0,startOfLine:!0}},token:function(k,z){var M=z.context;if(k.sol()&&(M.align==null&&(M.align=!1),z.indented=k.indentation(),z.startOfLine=!0,M.type=="case"&&(M.type="}")),k.eatSpace())return null;s=null;var w=(z.tokenize||h)(k,z);return w=="comment"||(M.align==null&&(M.align=!0),s=="{"?c(z,k.column(),"}"):s=="["?c(z,k.column(),"]"):s=="("?c(z,k.column(),")"):s=="case"?M.type="case":(s=="}"&&M.type=="}"||s==M.type)&&d(z),z.startOfLine=!1),w},indent:function(k,z){if(k.tokenize!=h&&k.tokenize!=null)return o.Pass;var M=k.context,w=z&&z.charAt(0);if(M.type=="case"&&/^(?:case|default)\b/.test(z))return k.context.type="}",M.indented;var W=w==M.type;return M.align?M.column+(W?0:1):M.indented+(W?0:v)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),o.defineMIME("text/x-go","go")})});var au=Ke((iu,ou)=>{(function(o){typeof iu=="object"&&typeof ou=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("http",function(){function p(T,y){return T.skipToEnd(),y.cur=h,"error"}function v(T,y){return T.match(/^HTTP\/\d\.\d/)?(y.cur=C,"keyword"):T.match(/^[A-Z]+/)&&/[ \t]/.test(T.peek())?(y.cur=S,"keyword"):p(T,y)}function C(T,y){var c=T.match(/^\d+/);if(!c)return p(T,y);y.cur=b;var d=Number(c[0]);return d>=100&&d<200?"positive informational":d>=200&&d<300?"positive success":d>=300&&d<400?"positive redirect":d>=400&&d<500?"negative client-error":d>=500&&d<600?"negative server-error":"error"}function b(T,y){return T.skipToEnd(),y.cur=h,null}function S(T,y){return T.eatWhile(/\S/),y.cur=s,"string-2"}function s(T,y){return T.match(/^HTTP\/\d\.\d$/)?(y.cur=h,"keyword"):p(T,y)}function h(T){return T.sol()&&!T.eat(/[ \t]/)?T.match(/^.*?:/)?"atom":(T.skipToEnd(),"error"):(T.skipToEnd(),"string")}function g(T){return T.skipToEnd(),null}return{token:function(T,y){var c=y.cur;return c!=h&&c!=g&&T.eatSpace()?null:c(T,y)},blankLine:function(T){T.cur=g},startState:function(){return{cur:v}}}}),o.defineMIME("message/http","http")})});var uu=Ke((lu,su)=>{(function(o){typeof lu=="object"&&typeof su=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("jinja2",function(){var p=["and","as","block","endblock","by","cycle","debug","else","elif","extends","filter","endfilter","firstof","do","for","endfor","if","endif","ifchanged","endifchanged","ifequal","endifequal","ifnotequal","set","raw","endraw","endifnotequal","in","include","load","not","now","or","parsed","regroup","reversed","spaceless","call","endcall","macro","endmacro","endspaceless","ssi","templatetag","openblock","closeblock","openvariable","closevariable","without","context","openbrace","closebrace","opencomment","closecomment","widthratio","url","with","endwith","get_current_language","trans","endtrans","noop","blocktrans","endblocktrans","get_available_languages","get_current_language_bidi","pluralize","autoescape","endautoescape"],v=/^[+\-*&%=<>!?|~^]/,C=/^[:\[\(\{]/,b=["true","false"],S=/^(\d[+\-\*\/])?\d+(\.\d+)?/;p=new RegExp("(("+p.join(")|(")+"))\\b"),b=new RegExp("(("+b.join(")|(")+"))\\b");function s(h,g){var T=h.peek();if(g.incomment)return h.skipTo("#}")?(h.eatWhile(/\#|}/),g.incomment=!1):h.skipToEnd(),"comment";if(g.intag){if(g.operator){if(g.operator=!1,h.match(b))return"atom";if(h.match(S))return"number"}if(g.sign){if(g.sign=!1,h.match(b))return"atom";if(h.match(S))return"number"}if(g.instring)return T==g.instring&&(g.instring=!1),h.next(),"string";if(T=="'"||T=='"')return g.instring=T,h.next(),"string";if(g.inbraces>0&&T==")")h.next(),g.inbraces--;else if(T=="(")h.next(),g.inbraces++;else if(g.inbrackets>0&&T=="]")h.next(),g.inbrackets--;else if(T=="[")h.next(),g.inbrackets++;else{if(!g.lineTag&&(h.match(g.intag+"}")||h.eat("-")&&h.match(g.intag+"}")))return g.intag=!1,"tag";if(h.match(v))return g.operator=!0,"operator";if(h.match(C))g.sign=!0;else{if(h.column()==1&&g.lineTag&&h.match(p))return"keyword";if(h.eat(" ")||h.sol()){if(h.match(p))return"keyword";if(h.match(b))return"atom";if(h.match(S))return"number";h.sol()&&h.next()}else h.next()}}return"variable"}else if(h.eat("{")){if(h.eat("#"))return g.incomment=!0,h.skipTo("#}")?(h.eatWhile(/\#|}/),g.incomment=!1):h.skipToEnd(),"comment";if(T=h.eat(/\{|%/))return g.intag=T,g.inbraces=0,g.inbrackets=0,T=="{"&&(g.intag="}"),h.eat("-"),"tag"}else if(h.eat("#")){if(h.peek()=="#")return h.skipToEnd(),"comment";if(!h.eol())return g.intag=!0,g.lineTag=!0,g.inbraces=0,g.inbrackets=0,"tag"}h.next()}return{startState:function(){return{tokenize:s,inbrackets:0,inbraces:0}},token:function(h,g){var T=g.tokenize(h,g);return h.eol()&&g.lineTag&&!g.instring&&g.inbraces==0&&g.inbrackets==0&&(g.intag=!1,g.lineTag=!1),T},blockCommentStart:"{#",blockCommentEnd:"#}",lineComment:"##"}}),o.defineMIME("text/jinja2","jinja2")})});var du=Ke((cu,fu)=>{(function(o){typeof cu=="object"&&typeof fu=="object"?o(We(),mn(),vn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript"],o):o(CodeMirror)})(function(o){"use strict";function p(C,b,S,s){this.state=C,this.mode=b,this.depth=S,this.prev=s}function v(C){return new p(o.copyState(C.mode,C.state),C.mode,C.depth,C.prev&&v(C.prev))}o.defineMode("jsx",function(C,b){var S=o.getMode(C,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),s=o.getMode(C,b&&b.base||"javascript");function h(c){var d=c.tagName;c.tagName=null;var k=S.indent(c,"","");return c.tagName=d,k}function g(c,d){return d.context.mode==S?T(c,d,d.context):y(c,d,d.context)}function T(c,d,k){if(k.depth==2)return c.match(/^.*?\*\//)?k.depth=1:c.skipToEnd(),"comment";if(c.peek()=="{"){S.skipAttribute(k.state);var z=h(k.state),M=k.state.context;if(M&&c.match(/^[^>]*>\s*$/,!1)){for(;M.prev&&!M.startOfLine;)M=M.prev;M.startOfLine?z-=C.indentUnit:k.prev.state.lexical&&(z=k.prev.state.lexical.indented)}else k.depth==1&&(z+=C.indentUnit);return d.context=new p(o.startState(s,z),s,0,d.context),null}if(k.depth==1){if(c.peek()=="<")return S.skipAttribute(k.state),d.context=new p(o.startState(S,h(k.state)),S,0,d.context),null;if(c.match("//"))return c.skipToEnd(),"comment";if(c.match("/*"))return k.depth=2,g(c,d)}var w=S.token(c,k.state),W=c.current(),E;return/\btag\b/.test(w)?/>$/.test(W)?k.state.context?k.depth=0:d.context=d.context.prev:/^-1&&c.backUp(W.length-E),w}function y(c,d,k){if(c.peek()=="<"&&!c.match(/^<([^<>]|<[^>]*>)+,\s*>/,!1)&&s.expressionAllowed(c,k.state))return d.context=new p(o.startState(S,s.indent(k.state,"","")),S,0,d.context),s.skipExpression(k.state),null;var z=s.token(c,k.state);if(!z&&k.depth!=null){var M=c.current();M=="{"?k.depth++:M=="}"&&--k.depth==0&&(d.context=d.context.prev)}return z}return{startState:function(){return{context:new p(o.startState(s),s)}},copyState:function(c){return{context:v(c.context)}},token:g,indent:function(c,d,k){return c.context.mode.indent(c.context.state,d,k)},innerMode:function(c){return c.context}}},"xml","javascript"),o.defineMIME("text/jsx","jsx"),o.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})});var gu=Ke((pu,hu)=>{(function(o){typeof pu=="object"&&typeof hu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("nginx",function(p){function v(k){for(var z={},M=k.split(" "),w=0;w*\/]/.test(w)?g(null,"select-op"):/[;{}:\[\]]/.test(w)?g(null,w):(k.eatWhile(/[\w\\\-]/),g("variable","variable"))}function y(k,z){for(var M=!1,w;(w=k.next())!=null;){if(M&&w=="/"){z.tokenize=T;break}M=w=="*"}return g("comment","comment")}function c(k,z){for(var M=0,w;(w=k.next())!=null;){if(M>=2&&w==">"){z.tokenize=T;break}M=w=="-"?M+1:0}return g("comment","comment")}function d(k){return function(z,M){for(var w=!1,W;(W=z.next())!=null&&!(W==k&&!w);)w=!w&&W=="\\";return w||(M.tokenize=T),g("string","string")}}return{startState:function(k){return{tokenize:T,baseIndent:k||0,stack:[]}},token:function(k,z){if(k.eatSpace())return null;h=null;var M=z.tokenize(k,z),w=z.stack[z.stack.length-1];return h=="hash"&&w=="rule"?M="atom":M=="variable"&&(w=="rule"?M="number":(!w||w=="@media{")&&(M="tag")),w=="rule"&&/^[\{\};]$/.test(h)&&z.stack.pop(),h=="{"?w=="@media"?z.stack[z.stack.length-1]="@media{":z.stack.push("{"):h=="}"?z.stack.pop():h=="@media"?z.stack.push("@media"):w=="{"&&h!="comment"&&z.stack.push("rule"),M},indent:function(k,z){var M=k.stack.length;return/^\}/.test(z)&&(M-=k.stack[k.stack.length-1]=="rule"?2:1),k.baseIndent+M*s},electricChars:"}"}}),o.defineMIME("text/x-nginx-conf","nginx")})});var bu=Ke((mu,vu)=>{(function(o){typeof mu=="object"&&typeof vu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("pascal",function(){function p(T){for(var y={},c=T.split(" "),d=0;d!?|\/]/;function S(T,y){var c=T.next();if(c=="#"&&y.startOfLine)return T.skipToEnd(),"meta";if(c=='"'||c=="'")return y.tokenize=s(c),y.tokenize(T,y);if(c=="("&&T.eat("*"))return y.tokenize=h,h(T,y);if(c=="{")return y.tokenize=g,g(T,y);if(/[\[\]\(\),;\:\.]/.test(c))return null;if(/\d/.test(c))return T.eatWhile(/[\w\.]/),"number";if(c=="/"&&T.eat("/"))return T.skipToEnd(),"comment";if(b.test(c))return T.eatWhile(b),"operator";T.eatWhile(/[\w\$_]/);var d=T.current();return v.propertyIsEnumerable(d)?"keyword":C.propertyIsEnumerable(d)?"atom":"variable"}function s(T){return function(y,c){for(var d=!1,k,z=!1;(k=y.next())!=null;){if(k==T&&!d){z=!0;break}d=!d&&k=="\\"}return(z||!d)&&(c.tokenize=null),"string"}}function h(T,y){for(var c=!1,d;d=T.next();){if(d==")"&&c){y.tokenize=null;break}c=d=="*"}return"comment"}function g(T,y){for(var c;c=T.next();)if(c=="}"){y.tokenize=null;break}return"comment"}return{startState:function(){return{tokenize:null}},token:function(T,y){if(T.eatSpace())return null;var c=(y.tokenize||S)(T,y);return c=="comment"||c=="meta",c},electricChars:"{}"}}),o.defineMIME("text/x-pascal","pascal")})});var _u=Ke((yu,xu)=>{(function(o){typeof yu=="object"&&typeof xu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("perl",function(){var S={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,if:[1,1],elsif:[1,1],else:[1,1],while:[1,1],unless:[1,1],for:[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,break:1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,continue:[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,default:1,defined:1,delete:1,die:1,do:1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,goto:1,grep:1,hex:1,import:1,index:1,int:1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,new:1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,package:1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,return:1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},s="string-2",h=/[goseximacplud]/;function g(c,d,k,z,M){return d.chain=null,d.style=null,d.tail=null,d.tokenize=function(w,W){for(var E=!1,N,G=0;N=w.next();){if(N===k[G]&&!E)return k[++G]!==void 0?(W.chain=k[G],W.style=z,W.tail=M):M&&w.eatWhile(M),W.tokenize=y,z;E=!E&&N=="\\"}return z},d.tokenize(c,d)}function T(c,d,k){return d.tokenize=function(z,M){return z.string==k&&(M.tokenize=y),z.skipToEnd(),"string"},d.tokenize(c,d)}function y(c,d){if(c.eatSpace())return null;if(d.chain)return g(c,d,d.chain,d.style,d.tail);if(c.match(/^(\-?((\d[\d_]*)?\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F_]+|0b[01_]+|\d[\d_]*(e[+-]?\d+)?)/))return"number";if(c.match(/^<<(?=[_a-zA-Z])/))return c.eatWhile(/\w/),T(c,d,c.current().substr(2));if(c.sol()&&c.match(/^\=item(?!\w)/))return T(c,d,"=cut");var k=c.next();if(k=='"'||k=="'"){if(v(c,3)=="<<"+k){var z=c.pos;c.eatWhile(/\w/);var M=c.current().substr(1);if(M&&c.eat(k))return T(c,d,M);c.pos=z}return g(c,d,[k],"string")}if(k=="q"){var w=p(c,-2);if(!(w&&/\w/.test(w))){if(w=p(c,0),w=="x"){if(w=p(c,1),w=="(")return b(c,2),g(c,d,[")"],s,h);if(w=="[")return b(c,2),g(c,d,["]"],s,h);if(w=="{")return b(c,2),g(c,d,["}"],s,h);if(w=="<")return b(c,2),g(c,d,[">"],s,h);if(/[\^'"!~\/]/.test(w))return b(c,1),g(c,d,[c.eat(w)],s,h)}else if(w=="q"){if(w=p(c,1),w=="(")return b(c,2),g(c,d,[")"],"string");if(w=="[")return b(c,2),g(c,d,["]"],"string");if(w=="{")return b(c,2),g(c,d,["}"],"string");if(w=="<")return b(c,2),g(c,d,[">"],"string");if(/[\^'"!~\/]/.test(w))return b(c,1),g(c,d,[c.eat(w)],"string")}else if(w=="w"){if(w=p(c,1),w=="(")return b(c,2),g(c,d,[")"],"bracket");if(w=="[")return b(c,2),g(c,d,["]"],"bracket");if(w=="{")return b(c,2),g(c,d,["}"],"bracket");if(w=="<")return b(c,2),g(c,d,[">"],"bracket");if(/[\^'"!~\/]/.test(w))return b(c,1),g(c,d,[c.eat(w)],"bracket")}else if(w=="r"){if(w=p(c,1),w=="(")return b(c,2),g(c,d,[")"],s,h);if(w=="[")return b(c,2),g(c,d,["]"],s,h);if(w=="{")return b(c,2),g(c,d,["}"],s,h);if(w=="<")return b(c,2),g(c,d,[">"],s,h);if(/[\^'"!~\/]/.test(w))return b(c,1),g(c,d,[c.eat(w)],s,h)}else if(/[\^'"!~\/(\[{<]/.test(w)){if(w=="(")return b(c,1),g(c,d,[")"],"string");if(w=="[")return b(c,1),g(c,d,["]"],"string");if(w=="{")return b(c,1),g(c,d,["}"],"string");if(w=="<")return b(c,1),g(c,d,[">"],"string");if(/[\^'"!~\/]/.test(w))return g(c,d,[c.eat(w)],"string")}}}if(k=="m"){var w=p(c,-2);if(!(w&&/\w/.test(w))&&(w=c.eat(/[(\[{<\^'"!~\/]/),w)){if(/[\^'"!~\/]/.test(w))return g(c,d,[w],s,h);if(w=="(")return g(c,d,[")"],s,h);if(w=="[")return g(c,d,["]"],s,h);if(w=="{")return g(c,d,["}"],s,h);if(w=="<")return g(c,d,[">"],s,h)}}if(k=="s"){var w=/[\/>\]})\w]/.test(p(c,-2));if(!w&&(w=c.eat(/[(\[{<\^'"!~\/]/),w))return w=="["?g(c,d,["]","]"],s,h):w=="{"?g(c,d,["}","}"],s,h):w=="<"?g(c,d,[">",">"],s,h):w=="("?g(c,d,[")",")"],s,h):g(c,d,[w,w],s,h)}if(k=="y"){var w=/[\/>\]})\w]/.test(p(c,-2));if(!w&&(w=c.eat(/[(\[{<\^'"!~\/]/),w))return w=="["?g(c,d,["]","]"],s,h):w=="{"?g(c,d,["}","}"],s,h):w=="<"?g(c,d,[">",">"],s,h):w=="("?g(c,d,[")",")"],s,h):g(c,d,[w,w],s,h)}if(k=="t"){var w=/[\/>\]})\w]/.test(p(c,-2));if(!w&&(w=c.eat("r"),w&&(w=c.eat(/[(\[{<\^'"!~\/]/),w)))return w=="["?g(c,d,["]","]"],s,h):w=="{"?g(c,d,["}","}"],s,h):w=="<"?g(c,d,[">",">"],s,h):w=="("?g(c,d,[")",")"],s,h):g(c,d,[w,w],s,h)}if(k=="`")return g(c,d,[k],"variable-2");if(k=="/")return/~\s*$/.test(v(c))?g(c,d,[k],s,h):"operator";if(k=="$"){var z=c.pos;if(c.eatWhile(/\d/)||c.eat("{")&&c.eatWhile(/\d/)&&c.eat("}"))return"variable-2";c.pos=z}if(/[$@%]/.test(k)){var z=c.pos;if(c.eat("^")&&c.eat(/[A-Z]/)||!/[@$%&]/.test(p(c,-2))&&c.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var w=c.current();if(S[w])return"variable-2"}c.pos=z}if(/[$@%&]/.test(k)&&(c.eatWhile(/[\w$]/)||c.eat("{")&&c.eatWhile(/[\w$]/)&&c.eat("}"))){var w=c.current();return S[w]?"variable-2":"variable"}if(k=="#"&&p(c,-2)!="$")return c.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(k)){var z=c.pos;if(c.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),S[c.current()])return"operator";c.pos=z}if(k=="_"&&c.pos==1){if(C(c,6)=="_END__")return g(c,d,["\0"],"comment");if(C(c,7)=="_DATA__")return g(c,d,["\0"],"variable-2");if(C(c,7)=="_C__")return g(c,d,["\0"],"string")}if(/\w/.test(k)){var z=c.pos;if(p(c,-2)=="{"&&(p(c,0)=="}"||c.eatWhile(/\w/)&&p(c,0)=="}"))return"string";c.pos=z}if(/[A-Z]/.test(k)){var W=p(c,-2),z=c.pos;if(c.eatWhile(/[A-Z_]/),/[\da-z]/.test(p(c,0)))c.pos=z;else{var w=S[c.current()];return w?(w[1]&&(w=w[0]),W!=":"?w==1?"keyword":w==2?"def":w==3?"atom":w==4?"operator":w==5?"variable-2":"meta":"meta"):"meta"}}if(/[a-zA-Z_]/.test(k)){var W=p(c,-2);c.eatWhile(/\w/);var w=S[c.current()];return w?(w[1]&&(w=w[0]),W!=":"?w==1?"keyword":w==2?"def":w==3?"atom":w==4?"operator":w==5?"variable-2":"meta":"meta"):"meta"}return null}return{startState:function(){return{tokenize:y,chain:null,style:null,tail:null}},token:function(c,d){return(d.tokenize||y)(c,d)},lineComment:"#"}}),o.registerHelper("wordChars","perl",/[\w$]/),o.defineMIME("text/x-perl","perl");function p(S,s){return S.string.charAt(S.pos+(s||0))}function v(S,s){if(s){var h=S.pos-s;return S.string.substr(h>=0?h:0,s)}else return S.string.substr(0,S.pos-1)}function C(S,s){var h=S.string.length,g=h-S.pos+1;return S.string.substr(S.pos,s&&s=(g=S.string.length-1)?S.pos=g:S.pos=h}})});var Su=Ke((ku,wu)=>{(function(o){typeof ku=="object"&&typeof wu=="object"?o(We(),Qn(),Vo()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],o):o(CodeMirror)})(function(o){"use strict";function p(T){for(var y={},c=T.split(" "),d=0;d\w/,!1)&&(y.tokenize=v([[["->",null]],[[/[\w]+/,"variable"]]],c,d)),"variable-2";for(var k=!1;!T.eol()&&(k||d===!1||!T.match("{$",!1)&&!T.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!k&&T.match(c)){y.tokenize=null,y.tokStack.pop(),y.tokStack.pop();break}k=T.next()=="\\"&&!k}return"string"}var S="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile enum extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally readonly match",s="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",h="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage memory_get_peak_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";o.registerHelper("hintWords","php",[S,s,h].join(" ").split(" ")),o.registerHelper("wordChars","php",/[\w$]/);var g={name:"clike",helperType:"php",keywords:p(S),blockKeywords:p("catch do else elseif for foreach if switch try while finally"),defKeywords:p("class enum function interface namespace trait"),atoms:p(s),builtin:p(h),multiLineStrings:!0,hooks:{$:function(T){return T.eatWhile(/[\w\$_]/),"variable-2"},"<":function(T,y){var c;if(c=T.match(/^<<\s*/)){var d=T.eat(/['"]/);T.eatWhile(/[\w\.]/);var k=T.current().slice(c[0].length+(d?2:1));if(d&&T.eat(d),k)return(y.tokStack||(y.tokStack=[])).push(k,0),y.tokenize=C(k,d!="'"),"string"}return!1},"#":function(T){for(;!T.eol()&&!T.match("?>",!1);)T.next();return"comment"},"/":function(T){if(T.eat("/")){for(;!T.eol()&&!T.match("?>",!1);)T.next();return"comment"}return!1},'"':function(T,y){return(y.tokStack||(y.tokStack=[])).push('"',0),y.tokenize=C('"'),"string"},"{":function(T,y){return y.tokStack&&y.tokStack.length&&y.tokStack[y.tokStack.length-1]++,!1},"}":function(T,y){return y.tokStack&&y.tokStack.length>0&&!--y.tokStack[y.tokStack.length-1]&&(y.tokenize=C(y.tokStack[y.tokStack.length-2])),!1}}};o.defineMode("php",function(T,y){var c=o.getMode(T,y&&y.htmlMode||"text/html"),d=o.getMode(T,g);function k(z,M){var w=M.curMode==d;if(z.sol()&&M.pending&&M.pending!='"'&&M.pending!="'"&&(M.pending=null),w)return w&&M.php.tokenize==null&&z.match("?>")?(M.curMode=c,M.curState=M.html,M.php.context.prev||(M.php=null),"meta"):d.token(z,M.curState);if(z.match(/^<\?\w*/))return M.curMode=d,M.php||(M.php=o.startState(d,c.indent(M.html,"",""))),M.curState=M.php,"meta";if(M.pending=='"'||M.pending=="'"){for(;!z.eol()&&z.next()!=M.pending;);var W="string"}else if(M.pending&&z.pos/.test(E)?M.pending=G[0]:M.pending={end:z.pos,style:W},z.backUp(E.length-N)),W}return{startState:function(){var z=o.startState(c),M=y.startOpen?o.startState(d):null;return{html:z,php:M,curMode:y.startOpen?d:c,curState:y.startOpen?M:z,pending:null}},copyState:function(z){var M=z.html,w=o.copyState(c,M),W=z.php,E=W&&o.copyState(d,W),N;return z.curMode==c?N=w:N=E,{html:w,php:E,curMode:z.curMode,curState:N,pending:z.pending}},token:k,indent:function(z,M,w){return z.curMode!=d&&/^\s*<\//.test(M)||z.curMode==d&&/^\?>/.test(M)?c.indent(z.html,M,w):z.curMode.indent(z.curState,M,w)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(z){return{state:z.curState,mode:z.curMode}}}},"htmlmixed","clike"),o.defineMIME("application/x-httpd-php","php"),o.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),o.defineMIME("text/x-php",g)})});var Cu=Ke((Tu,Lu)=>{(function(o){typeof Tu=="object"&&typeof Lu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(s){return new RegExp("^(("+s.join(")|(")+"))\\b","i")}var v=["package","message","import","syntax","required","optional","repeated","reserved","default","extensions","packed","bool","bytes","double","enum","float","string","int32","int64","uint32","uint64","sint32","sint64","fixed32","fixed64","sfixed32","sfixed64","option","service","rpc","returns"],C=p(v);o.registerHelper("hintWords","protobuf",v);var b=new RegExp("^[_A-Za-z\xA1-\uFFFF][_A-Za-z0-9\xA1-\uFFFF]*");function S(s){return s.eatSpace()?null:s.match("//")?(s.skipToEnd(),"comment"):s.match(/^[0-9\.+-]/,!1)&&(s.match(/^[+-]?0x[0-9a-fA-F]+/)||s.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/)||s.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))?"number":s.match(/^"([^"]|(""))*"/)||s.match(/^'([^']|(''))*'/)?"string":s.match(C)?"keyword":s.match(b)?"variable":(s.next(),null)}o.defineMode("protobuf",function(){return{token:S,fold:"brace"}}),o.defineMIME("text/x-protobuf","protobuf")})});var Mu=Ke((Eu,zu)=>{(function(o){typeof Eu=="object"&&typeof zu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(h){return new RegExp("^(("+h.join(")|(")+"))\\b")}var v=p(["and","or","not","is"]),C=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in","False","True"],b=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];o.registerHelper("hintWords","python",C.concat(b).concat(["exec","print"]));function S(h){return h.scopes[h.scopes.length-1]}o.defineMode("python",function(h,g){for(var T="error",y=g.delimiters||g.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,c=[g.singleOperators,g.doubleOperators,g.doubleDelimiters,g.tripleDelimiters,g.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],d=0;dH?D(X):le0&&R(K,X)&&(xe+=" "+T),xe}}return re(K,X)}function re(K,X,I){if(K.eatSpace())return null;if(!I&&K.match(/^#.*/))return"comment";if(K.match(/^[0-9\.]/,!1)){var H=!1;if(K.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(H=!0),K.match(/^[\d_]+\.\d*/)&&(H=!0),K.match(/^\.\d+/)&&(H=!0),H)return K.eat(/J/i),"number";var le=!1;if(K.match(/^0x[0-9a-f_]+/i)&&(le=!0),K.match(/^0b[01_]+/i)&&(le=!0),K.match(/^0o[0-7_]+/i)&&(le=!0),K.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(K.eat(/J/i),le=!0),K.match(/^0(?![\dx])/i)&&(le=!0),le)return K.eat(/L/i),"number"}if(K.match(E)){var xe=K.current().toLowerCase().indexOf("f")!==-1;return xe?(X.tokenize=q(K.current(),X.tokenize),X.tokenize(K,X)):(X.tokenize=O(K.current(),X.tokenize),X.tokenize(K,X))}for(var F=0;F=0;)K=K.substr(1);var I=K.length==1,H="string";function le(F){return function(L,de){var ze=re(L,de,!0);return ze=="punctuation"&&(L.current()=="{"?de.tokenize=le(F+1):L.current()=="}"&&(F>1?de.tokenize=le(F-1):de.tokenize=xe)),ze}}function xe(F,L){for(;!F.eol();)if(F.eatWhile(/[^'"\{\}\\]/),F.eat("\\")){if(F.next(),I&&F.eol())return H}else{if(F.match(K))return L.tokenize=X,H;if(F.match("{{"))return H;if(F.match("{",!1))return L.tokenize=le(0),F.current()?H:L.tokenize(F,L);if(F.match("}}"))return H;if(F.match("}"))return T;F.eat(/['"]/)}if(I){if(g.singleLineStringErrors)return T;L.tokenize=X}return H}return xe.isString=!0,xe}function O(K,X){for(;"rubf".indexOf(K.charAt(0).toLowerCase())>=0;)K=K.substr(1);var I=K.length==1,H="string";function le(xe,F){for(;!xe.eol();)if(xe.eatWhile(/[^'"\\]/),xe.eat("\\")){if(xe.next(),I&&xe.eol())return H}else{if(xe.match(K))return F.tokenize=X,H;xe.eat(/['"]/)}if(I){if(g.singleLineStringErrors)return T;F.tokenize=X}return H}return le.isString=!0,le}function D(K){for(;S(K).type!="py";)K.scopes.pop();K.scopes.push({offset:S(K).offset+h.indentUnit,type:"py",align:null})}function Q(K,X,I){var H=K.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:K.column()+1;X.scopes.push({offset:X.indent+k,type:I,align:H})}function R(K,X){for(var I=K.indentation();X.scopes.length>1&&S(X).offset>I;){if(S(X).type!="py")return!0;X.scopes.pop()}return S(X).offset!=I}function V(K,X){K.sol()&&(X.beginningOfLine=!0,X.dedent=!1);var I=X.tokenize(K,X),H=K.current();if(X.beginningOfLine&&H=="@")return K.match(W,!1)?"meta":w?"operator":T;if(/\S/.test(H)&&(X.beginningOfLine=!1),(I=="variable"||I=="builtin")&&X.lastToken=="meta"&&(I="meta"),(H=="pass"||H=="return")&&(X.dedent=!0),H=="lambda"&&(X.lambda=!0),H==":"&&!X.lambda&&S(X).type=="py"&&K.match(/^\s*(?:#|$)/,!1)&&D(X),H.length==1&&!/string|comment/.test(I)){var le="[({".indexOf(H);if(le!=-1&&Q(K,X,"])}".slice(le,le+1)),le="])}".indexOf(H),le!=-1)if(S(X).type==H)X.indent=X.scopes.pop().offset-k;else return T}return X.dedent&&K.eol()&&S(X).type=="py"&&X.scopes.length>1&&X.scopes.pop(),I}var x={startState:function(K){return{tokenize:J,scopes:[{offset:K||0,type:"py",align:null}],indent:K||0,lastToken:null,lambda:!1,dedent:0}},token:function(K,X){var I=X.errorToken;I&&(X.errorToken=!1);var H=V(K,X);return H&&H!="comment"&&(X.lastToken=H=="keyword"||H=="punctuation"?K.current():H),H=="punctuation"&&(H=null),K.eol()&&X.lambda&&(X.lambda=!1),I?H+" "+T:H},indent:function(K,X){if(K.tokenize!=J)return K.tokenize.isString?o.Pass:0;var I=S(K),H=I.type==X.charAt(0)||I.type=="py"&&!K.dedent&&/^(else:|elif |except |finally:)/.test(X);return I.align!=null?I.align-(H?1:0):I.offset-(H?k:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:`'"`},lineComment:"#",fold:"indent"};return x}),o.defineMIME("text/x-python","python");var s=function(h){return h.split(" ")};o.defineMIME("text/x-cython",{name:"python",extra_keywords:s("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})});var qu=Ke((Au,Du)=>{(function(o){typeof Au=="object"&&typeof Du=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(g){for(var T={},y=0,c=g.length;y]/)?(E.eat(/[\<\>]/),"atom"):E.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":E.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(E.eatWhile(/[\w$\xa1-\uffff]/),E.eat(/[\?\!\=]/),"atom"):"operator";if(G=="@"&&E.match(/^@?[a-zA-Z_\xa1-\uffff]/))return E.eat("@"),E.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if(G=="$")return E.eat(/[a-zA-Z_]/)?E.eatWhile(/[\w]/):E.eat(/\d/)?E.eat(/\d/):E.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(G))return E.eatWhile(/[\w\xa1-\uffff]/),E.eat(/[\?\!]/),E.eat(":")?"atom":"ident";if(G=="|"&&(N.varList||N.lastTok=="{"||N.lastTok=="do"))return T="|",null;if(/[\(\)\[\]{}\\;]/.test(G))return T=G,null;if(G=="-"&&E.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(G)){var D=E.eatWhile(/[=+\-\/*:\.^%<>~|]/);return G=="."&&!D&&(T="."),"operator"}else return null}}}function d(E){for(var N=E.pos,G=0,J,re=!1,q=!1;(J=E.next())!=null;)if(q)q=!1;else{if("[{(".indexOf(J)>-1)G++;else if("]})".indexOf(J)>-1){if(G--,G<0)break}else if(J=="/"&&G==0){re=!0;break}q=J=="\\"}return E.backUp(E.pos-N),re}function k(E){return E||(E=1),function(N,G){if(N.peek()=="}"){if(E==1)return G.tokenize.pop(),G.tokenize[G.tokenize.length-1](N,G);G.tokenize[G.tokenize.length-1]=k(E-1)}else N.peek()=="{"&&(G.tokenize[G.tokenize.length-1]=k(E+1));return c(N,G)}}function z(){var E=!1;return function(N,G){return E?(G.tokenize.pop(),G.tokenize[G.tokenize.length-1](N,G)):(E=!0,c(N,G))}}function M(E,N,G,J){return function(re,q){var O=!1,D;for(q.context.type==="read-quoted-paused"&&(q.context=q.context.prev,re.eat("}"));(D=re.next())!=null;){if(D==E&&(J||!O)){q.tokenize.pop();break}if(G&&D=="#"&&!O){if(re.eat("{")){E=="}"&&(q.context={prev:q.context,type:"read-quoted-paused"}),q.tokenize.push(k());break}else if(/[@\$]/.test(re.peek())){q.tokenize.push(z());break}}O=!O&&D=="\\"}return N}}function w(E,N){return function(G,J){return N&&G.eatSpace(),G.match(E)?J.tokenize.pop():G.skipToEnd(),"string"}}function W(E,N){return E.sol()&&E.match("=end")&&E.eol()&&N.tokenize.pop(),E.skipToEnd(),"comment"}return{startState:function(){return{tokenize:[c],indented:0,context:{type:"top",indented:-g.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(E,N){T=null,E.sol()&&(N.indented=E.indentation());var G=N.tokenize[N.tokenize.length-1](E,N),J,re=T;if(G=="ident"){var q=E.current();G=N.lastTok=="."?"property":C.propertyIsEnumerable(E.current())?"keyword":/^[A-Z]/.test(q)?"tag":N.lastTok=="def"||N.lastTok=="class"||N.varList?"def":"variable",G=="keyword"&&(re=q,b.propertyIsEnumerable(q)?J="indent":S.propertyIsEnumerable(q)?J="dedent":((q=="if"||q=="unless")&&E.column()==E.indentation()||q=="do"&&N.context.indented{(function(o){typeof Fu=="object"&&typeof Iu=="object"?o(We(),Di()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],o):o(CodeMirror)})(function(o){"use strict";o.defineSimpleMode("rust",{start:[{regex:/b?"/,token:"string",next:"string"},{regex:/b?r"/,token:"string",next:"string_raw"},{regex:/b?r#+"/,token:"string",next:"string_raw_hash"},{regex:/'(?:[^'\\]|\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\}))'/,token:"string-2"},{regex:/b'(?:[^']|\\(?:['\\nrt0]|x[\da-fA-F]{2}))'/,token:"string-2"},{regex:/(?:(?:[0-9][0-9_]*)(?:(?:[Ee][+-]?[0-9_]+)|\.[0-9_]+(?:[Ee][+-]?[0-9_]+)?)(?:f32|f64)?)|(?:0(?:b[01_]+|(?:o[0-7_]+)|(?:x[0-9a-fA-F_]+))|(?:[0-9][0-9_]*))(?:u8|u16|u32|u64|i8|i16|i32|i64|isize|usize)?/,token:"number"},{regex:/(let(?:\s+mut)?|fn|enum|mod|struct|type|union)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/(?:abstract|alignof|as|async|await|box|break|continue|const|crate|do|dyn|else|enum|extern|fn|for|final|if|impl|in|loop|macro|match|mod|move|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,token:"keyword"},{regex:/\b(?:Self|isize|usize|char|bool|u8|u16|u32|u64|f16|f32|f64|i8|i16|i32|i64|str|Option)\b/,token:"atom"},{regex:/\b(?:true|false|Some|None|Ok|Err)\b/,token:"builtin"},{regex:/\b(fn)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/#!?\[.*\]/,token:"meta"},{regex:/\/\/.*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/[a-zA-Z_]\w*!/,token:"variable-3"},{regex:/[a-zA-Z_]\w*/,token:"variable"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0}],string:[{regex:/"/,token:"string",next:"start"},{regex:/(?:[^\\"]|\\(?:.|$))*/,token:"string"}],string_raw:[{regex:/"/,token:"string",next:"start"},{regex:/[^"]*/,token:"string"}],string_raw_hash:[{regex:/"#+/,token:"string",next:"start"},{regex:/(?:[^"]|"(?!#))*/,token:"string"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{dontIndentStates:["comment"],electricInput:/^\s*\}$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),o.defineMIME("text/x-rustsrc","rust"),o.defineMIME("text/rust","rust")})});var ea=Ke((Ou,Pu)=>{(function(o){typeof Ou=="object"&&typeof Pu=="object"?o(We(),gn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../css/css"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("sass",function(p){var v=o.mimeModes["text/css"],C=v.propertyKeywords||{},b=v.colorKeywords||{},S=v.valueKeywords||{},s=v.fontProperties||{};function h(q){return new RegExp("^"+q.join("|"))}var g=["true","false","null","auto"],T=new RegExp("^"+g.join("|")),y=["\\(","\\)","=",">","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"],c=h(y),d=/^::?[a-zA-Z_][\w\-]*/,k;function z(q){return!q.peek()||q.match(/\s+$/,!1)}function M(q,O){var D=q.peek();return D===")"?(q.next(),O.tokenizer=J,"operator"):D==="("?(q.next(),q.eatSpace(),"operator"):D==="'"||D==='"'?(O.tokenizer=W(q.next()),"string"):(O.tokenizer=W(")",!1),"string")}function w(q,O){return function(D,Q){return D.sol()&&D.indentation()<=q?(Q.tokenizer=J,J(D,Q)):(O&&D.skipTo("*/")?(D.next(),D.next(),Q.tokenizer=J):D.skipToEnd(),"comment")}}function W(q,O){O==null&&(O=!0);function D(Q,R){var V=Q.next(),x=Q.peek(),K=Q.string.charAt(Q.pos-2),X=V!=="\\"&&x===q||V===q&&K!=="\\";return X?(V!==q&&O&&Q.next(),z(Q)&&(R.cursorHalf=0),R.tokenizer=J,"string"):V==="#"&&x==="{"?(R.tokenizer=E(D),Q.next(),"operator"):"string"}return D}function E(q){return function(O,D){return O.peek()==="}"?(O.next(),D.tokenizer=q,"operator"):J(O,D)}}function N(q){if(q.indentCount==0){q.indentCount++;var O=q.scopes[0].offset,D=O+p.indentUnit;q.scopes.unshift({offset:D})}}function G(q){q.scopes.length!=1&&q.scopes.shift()}function J(q,O){var D=q.peek();if(q.match("/*"))return O.tokenizer=w(q.indentation(),!0),O.tokenizer(q,O);if(q.match("//"))return O.tokenizer=w(q.indentation(),!1),O.tokenizer(q,O);if(q.match("#{"))return O.tokenizer=E(J),"operator";if(D==='"'||D==="'")return q.next(),O.tokenizer=W(D),"string";if(O.cursorHalf){if(D==="#"&&(q.next(),q.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/))||q.match(/^-?[0-9\.]+/))return z(q)&&(O.cursorHalf=0),"number";if(q.match(/^(px|em|in)\b/))return z(q)&&(O.cursorHalf=0),"unit";if(q.match(T))return z(q)&&(O.cursorHalf=0),"keyword";if(q.match(/^url/)&&q.peek()==="(")return O.tokenizer=M,z(q)&&(O.cursorHalf=0),"atom";if(D==="$")return q.next(),q.eatWhile(/[\w-]/),z(q)&&(O.cursorHalf=0),"variable-2";if(D==="!")return q.next(),O.cursorHalf=0,q.match(/^[\w]+/)?"keyword":"operator";if(q.match(c))return z(q)&&(O.cursorHalf=0),"operator";if(q.eatWhile(/[\w-]/))return z(q)&&(O.cursorHalf=0),k=q.current().toLowerCase(),S.hasOwnProperty(k)?"atom":b.hasOwnProperty(k)?"keyword":C.hasOwnProperty(k)?(O.prevProp=q.current().toLowerCase(),"property"):"tag";if(z(q))return O.cursorHalf=0,null}else{if(D==="-"&&q.match(/^-\w+-/))return"meta";if(D==="."){if(q.next(),q.match(/^[\w-]+/))return N(O),"qualifier";if(q.peek()==="#")return N(O),"tag"}if(D==="#"){if(q.next(),q.match(/^[\w-]+/))return N(O),"builtin";if(q.peek()==="#")return N(O),"tag"}if(D==="$")return q.next(),q.eatWhile(/[\w-]/),"variable-2";if(q.match(/^-?[0-9\.]+/))return"number";if(q.match(/^(px|em|in)\b/))return"unit";if(q.match(T))return"keyword";if(q.match(/^url/)&&q.peek()==="(")return O.tokenizer=M,"atom";if(D==="="&&q.match(/^=[\w-]+/))return N(O),"meta";if(D==="+"&&q.match(/^\+[\w-]+/))return"variable-3";if(D==="@"&&q.match("@extend")&&(q.match(/\s*[\w]/)||G(O)),q.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return N(O),"def";if(D==="@")return q.next(),q.eatWhile(/[\w-]/),"def";if(q.eatWhile(/[\w-]/))if(q.match(/ *: *[\w-\+\$#!\("']/,!1)){k=q.current().toLowerCase();var Q=O.prevProp+"-"+k;return C.hasOwnProperty(Q)?"property":C.hasOwnProperty(k)?(O.prevProp=k,"property"):s.hasOwnProperty(k)?"property":"tag"}else return q.match(/ *:/,!1)?(N(O),O.cursorHalf=1,O.prevProp=q.current().toLowerCase(),"property"):(q.match(/ *,/,!1)||N(O),"tag");if(D===":")return q.match(d)?"variable-3":(q.next(),O.cursorHalf=1,"operator")}return q.match(c)?"operator":(q.next(),null)}function re(q,O){q.sol()&&(O.indentCount=0);var D=O.tokenizer(q,O),Q=q.current();if((Q==="@return"||Q==="}")&&G(O),D!==null){for(var R=q.pos-Q.length,V=R+p.indentUnit*O.indentCount,x=[],K=0;K{(function(o){typeof ju=="object"&&typeof Ru=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("shell",function(){var p={};function v(d,k){for(var z=0;z1&&d.eat("$");var z=d.next();return/['"({]/.test(z)?(k.tokens[0]=h(z,z=="("?"quote":z=="{"?"def":"string"),c(d,k)):(/\d/.test(z)||d.eatWhile(/\w/),k.tokens.shift(),"def")};function y(d){return function(k,z){return k.sol()&&k.string==d&&z.tokens.shift(),k.skipToEnd(),"string-2"}}function c(d,k){return(k.tokens[0]||s)(d,k)}return{startState:function(){return{tokens:[]}},token:function(d,k){return c(d,k)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),o.defineMIME("text/x-sh","shell"),o.defineMIME("application/x-sh","shell")})});var Uu=Ke((Bu,Wu)=>{(function(o){typeof Bu=="object"&&typeof Wu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("sql",function(g,T){var y=T.client||{},c=T.atoms||{false:!0,true:!0,null:!0},d=T.builtin||s(h),k=T.keywords||s(S),z=T.operatorChars||/^[*+\-%<>!=&|~^\/]/,M=T.support||{},w=T.hooks||{},W=T.dateSQL||{date:!0,time:!0,timestamp:!0},E=T.backslashStringEscapes!==!1,N=T.brackets||/^[\{}\(\)\[\]]/,G=T.punctuation||/^[;.,:]/;function J(Q,R){var V=Q.next();if(w[V]){var x=w[V](Q,R);if(x!==!1)return x}if(M.hexNumber&&(V=="0"&&Q.match(/^[xX][0-9a-fA-F]+/)||(V=="x"||V=="X")&&Q.match(/^'[0-9a-fA-F]*'/)))return"number";if(M.binaryNumber&&((V=="b"||V=="B")&&Q.match(/^'[01]*'/)||V=="0"&&Q.match(/^b[01]+/)))return"number";if(V.charCodeAt(0)>47&&V.charCodeAt(0)<58)return Q.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),M.decimallessFloat&&Q.match(/^\.(?!\.)/),"number";if(V=="?"&&(Q.eatSpace()||Q.eol()||Q.eat(";")))return"variable-3";if(V=="'"||V=='"'&&M.doubleQuote)return R.tokenize=re(V),R.tokenize(Q,R);if((M.nCharCast&&(V=="n"||V=="N")||M.charsetCast&&V=="_"&&Q.match(/[a-z][a-z0-9]*/i))&&(Q.peek()=="'"||Q.peek()=='"'))return"keyword";if(M.escapeConstant&&(V=="e"||V=="E")&&(Q.peek()=="'"||Q.peek()=='"'&&M.doubleQuote))return R.tokenize=function(X,I){return(I.tokenize=re(X.next(),!0))(X,I)},"keyword";if(M.commentSlashSlash&&V=="/"&&Q.eat("/"))return Q.skipToEnd(),"comment";if(M.commentHash&&V=="#"||V=="-"&&Q.eat("-")&&(!M.commentSpaceRequired||Q.eat(" ")))return Q.skipToEnd(),"comment";if(V=="/"&&Q.eat("*"))return R.tokenize=q(1),R.tokenize(Q,R);if(V=="."){if(M.zerolessFloat&&Q.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(Q.match(/^\.+/))return null;if(Q.match(/^[\w\d_$#]+/))return"variable-2"}else{if(z.test(V))return Q.eatWhile(z),"operator";if(N.test(V))return"bracket";if(G.test(V))return Q.eatWhile(G),"punctuation";if(V=="{"&&(Q.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||Q.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";Q.eatWhile(/^[_\w\d]/);var K=Q.current().toLowerCase();return W.hasOwnProperty(K)&&(Q.match(/^( )+'[^']*'/)||Q.match(/^( )+"[^"]*"/))?"number":c.hasOwnProperty(K)?"atom":d.hasOwnProperty(K)?"type":k.hasOwnProperty(K)?"keyword":y.hasOwnProperty(K)?"builtin":null}}function re(Q,R){return function(V,x){for(var K=!1,X;(X=V.next())!=null;){if(X==Q&&!K){x.tokenize=J;break}K=(E||R)&&!K&&X=="\\"}return"string"}}function q(Q){return function(R,V){var x=R.match(/^.*?(\/\*|\*\/)/);return x?x[1]=="/*"?V.tokenize=q(Q+1):Q>1?V.tokenize=q(Q-1):V.tokenize=J:R.skipToEnd(),"comment"}}function O(Q,R,V){R.context={prev:R.context,indent:Q.indentation(),col:Q.column(),type:V}}function D(Q){Q.indent=Q.context.indent,Q.context=Q.context.prev}return{startState:function(){return{tokenize:J,context:null}},token:function(Q,R){if(Q.sol()&&R.context&&R.context.align==null&&(R.context.align=!1),R.tokenize==J&&Q.eatSpace())return null;var V=R.tokenize(Q,R);if(V=="comment")return V;R.context&&R.context.align==null&&(R.context.align=!0);var x=Q.current();return x=="("?O(Q,R,")"):x=="["?O(Q,R,"]"):R.context&&R.context.type==x&&D(R),V},indent:function(Q,R){var V=Q.context;if(!V)return o.Pass;var x=R.charAt(0)==V.type;return V.align?V.col+(x?0:1):V.indent+(x?0:g.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:M.commentSlashSlash?"//":M.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``",config:T}});function p(g){for(var T;(T=g.next())!=null;)if(T=="`"&&!g.eat("`"))return"variable-2";return g.backUp(g.current().length-1),g.eatWhile(/\w/)?"variable-2":null}function v(g){for(var T;(T=g.next())!=null;)if(T=='"'&&!g.eat('"'))return"variable-2";return g.backUp(g.current().length-1),g.eatWhile(/\w/)?"variable-2":null}function C(g){return g.eat("@")&&(g.match("session."),g.match("local."),g.match("global.")),g.eat("'")?(g.match(/^.*'/),"variable-2"):g.eat('"')?(g.match(/^.*"/),"variable-2"):g.eat("`")?(g.match(/^.*`/),"variable-2"):g.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function b(g){return g.eat("N")?"atom":g.match(/^[a-zA-Z.#!?]/)?"variable-2":null}var S="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function s(g){for(var T={},y=g.split(" "),c=0;c!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:s("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":C}}),o.defineMIME("text/x-mysql",{name:"sql",client:s("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:s(S+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:s("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:s("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:s("date time timestamp"),support:s("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":C,"`":p,"\\":b}}),o.defineMIME("text/x-mariadb",{name:"sql",client:s("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:s(S+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:s("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:s("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:s("date time timestamp"),support:s("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":C,"`":p,"\\":b}}),o.defineMIME("text/x-sqlite",{name:"sql",client:s("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:s(S+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:s("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:s("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:s("date time timestamp datetime"),support:s("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":C,":":C,"?":C,$:C,'"':v,"`":p}}),o.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:s("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:s("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:s("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:s("commentSlashSlash decimallessFloat"),hooks:{}}),o.defineMIME("text/x-plsql",{name:"sql",client:s("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:s("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:s("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:s("date time timestamp"),support:s("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),o.defineMIME("text/x-hive",{name:"sql",keywords:s("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:s("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:s("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:s("date timestamp"),support:s("doubleQuote binaryNumber hexNumber")}),o.defineMIME("text/x-pgsql",{name:"sql",client:s("source"),keywords:s(S+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:s("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time zone timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:s("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:s("date time timestamp"),support:s("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),o.defineMIME("text/x-gql",{name:"sql",keywords:s("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:s("false true"),builtin:s("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),o.defineMIME("text/x-gpsql",{name:"sql",client:s("source"),keywords:s("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:s("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:s("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:s("date time timestamp"),support:s("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),o.defineMIME("text/x-sparksql",{name:"sql",keywords:s("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:s("abs acos acosh add_months aggregate and any approx_count_distinct approx_percentile array array_contains array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 between bigint bin binary bit_and bit_count bit_get bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality case cast cbrt ceil ceiling char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees delimited dense_rank div double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot if ifnull in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name inputformat instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or outputformat overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank rcfile reflect regexp regexp_extract regexp_extract_all regexp_like regexp_replace repeat replace reverse right rint rlike round row_number rpad rtrim schema_of_csv schema_of_json second sentences sequence sequencefile serde session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex space spark_partition_id split sqrt stack std stddev stddev_pop stddev_samp str_to_map string struct substr substring substring_index sum tan tanh textfile timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values translate trim trunc try_add try_divide typeof ucase unbase64 unhex uniontype unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with"),atoms:s("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:s("date time timestamp"),support:s("doubleQuote zerolessFloat")}),o.defineMIME("text/x-esper",{name:"sql",client:s("source"),keywords:s("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:s("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:s("time"),support:s("decimallessFloat zerolessFloat binaryNumber hexNumber")}),o.defineMIME("text/x-trino",{name:"sql",keywords:s("abs absent acos add admin after all all_match alter analyze and any any_match approx_distinct approx_most_frequent approx_percentile approx_set arbitrary array_agg array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_sort array_union arrays_overlap as asc asin at at_timezone atan atan2 authorization avg bar bernoulli beta_cdf between bing_tile bing_tile_at bing_tile_coordinates bing_tile_polygon bing_tile_quadkey bing_tile_zoom_level bing_tiles_around bit_count bitwise_and bitwise_and_agg bitwise_left_shift bitwise_not bitwise_or bitwise_or_agg bitwise_right_shift bitwise_right_shift_arithmetic bitwise_xor bool_and bool_or both by call cardinality cascade case cast catalogs cbrt ceil ceiling char2hexint checksum chr classify coalesce codepoint column columns combinations comment commit committed concat concat_ws conditional constraint contains contains_sequence convex_hull_agg copartition corr cos cosh cosine_similarity count count_if covar_pop covar_samp crc32 create cross cube cume_dist current current_catalog current_date current_groups current_path current_role current_schema current_time current_timestamp current_timezone current_user data date_add date_diff date_format date_parse date_trunc day day_of_month day_of_week day_of_year deallocate default define definer degrees delete dense_rank deny desc describe descriptor distinct distributed dow doy drop e element_at else empty empty_approx_set encoding end error escape evaluate_classifier_predictions every except excluding execute exists exp explain extract false features fetch filter final first first_value flatten floor following for format format_datetime format_number from from_base from_base32 from_base64 from_base64url from_big_endian_32 from_big_endian_64 from_encoded_polyline from_geojson_geometry from_hex from_ieee754_32 from_ieee754_64 from_iso8601_date from_iso8601_timestamp from_iso8601_timestamp_nanos from_unixtime from_unixtime_nanos from_utf8 full functions geometric_mean geometry_from_hadoop_shape geometry_invalid_reason geometry_nearest_points geometry_to_bing_tiles geometry_union geometry_union_agg grant granted grants graphviz great_circle_distance greatest group grouping groups hamming_distance hash_counts having histogram hmac_md5 hmac_sha1 hmac_sha256 hmac_sha512 hour human_readable_seconds if ignore in including index infinity initial inner input insert intersect intersection_cardinality into inverse_beta_cdf inverse_normal_cdf invoker io is is_finite is_infinite is_json_scalar is_nan isolation jaccard_index join json_array json_array_contains json_array_get json_array_length json_exists json_extract json_extract_scalar json_format json_object json_parse json_query json_size json_value keep key keys kurtosis lag last last_day_of_month last_value lateral lead leading learn_classifier learn_libsvm_classifier learn_libsvm_regressor learn_regressor least left length level levenshtein_distance like limit line_interpolate_point line_interpolate_points line_locate_point listagg ln local localtime localtimestamp log log10 log2 logical lower lpad ltrim luhn_check make_set_digest map_agg map_concat map_entries map_filter map_from_entries map_keys map_union map_values map_zip_with match match_recognize matched matches materialized max max_by md5 measures merge merge_set_digest millisecond min min_by minute mod month multimap_agg multimap_from_entries murmur3 nan natural next nfc nfd nfkc nfkd ngrams no none none_match normal_cdf normalize not now nth_value ntile null nullif nulls numeric_histogram object objectid_timestamp of offset omit on one only option or order ordinality outer output over overflow parse_data_size parse_datetime parse_duration partition partitions passing past path pattern per percent_rank permute pi position pow power preceding prepare privileges properties prune qdigest_agg quarter quotes radians rand random range rank read recursive reduce reduce_agg refresh regexp_count regexp_extract regexp_extract_all regexp_like regexp_position regexp_replace regexp_split regr_intercept regr_slope regress rename render repeat repeatable replace reset respect restrict returning reverse revoke rgb right role roles rollback rollup round row_number rows rpad rtrim running scalar schema schemas second security seek select sequence serializable session set sets sha1 sha256 sha512 show shuffle sign simplify_geometry sin skewness skip slice some soundex spatial_partitioning spatial_partitions split split_part split_to_map split_to_multimap spooky_hash_v2_32 spooky_hash_v2_64 sqrt st_area st_asbinary st_astext st_boundary st_buffer st_centroid st_contains st_convexhull st_coorddim st_crosses st_difference st_dimension st_disjoint st_distance st_endpoint st_envelope st_envelopeaspts st_equals st_exteriorring st_geometries st_geometryfromtext st_geometryn st_geometrytype st_geomfrombinary st_interiorringn st_interiorrings st_intersection st_intersects st_isclosed st_isempty st_isring st_issimple st_isvalid st_length st_linefromtext st_linestring st_multipoint st_numgeometries st_numinteriorring st_numpoints st_overlaps st_point st_pointn st_points st_polygon st_relate st_startpoint st_symdifference st_touches st_union st_within st_x st_xmax st_xmin st_y st_ymax st_ymin start starts_with stats stddev stddev_pop stddev_samp string strpos subset substr substring sum system table tables tablesample tan tanh tdigest_agg text then ties timestamp_objectid timezone_hour timezone_minute to to_base to_base32 to_base64 to_base64url to_big_endian_32 to_big_endian_64 to_char to_date to_encoded_polyline to_geojson_geometry to_geometry to_hex to_ieee754_32 to_ieee754_64 to_iso8601 to_milliseconds to_spherical_geography to_timestamp to_unixtime to_utf8 trailing transaction transform transform_keys transform_values translate trim trim_array true truncate try try_cast type typeof uescape unbounded uncommitted unconditional union unique unknown unmatched unnest update upper url_decode url_encode url_extract_fragment url_extract_host url_extract_parameter url_extract_path url_extract_port url_extract_protocol url_extract_query use user using utf16 utf32 utf8 validate value value_at_quantile values values_at_quantiles var_pop var_samp variance verbose version view week week_of_year when where width_bucket wilson_interval_lower wilson_interval_upper window with with_timezone within without word_stem work wrapper write xxhash64 year year_of_week yow zip zip_with"),builtin:s("array bigint bingtile boolean char codepoints color date decimal double function geometry hyperloglog int integer interval ipaddress joniregexp json json2016 jsonpath kdbtree likepattern map model objectid p4hyperloglog precision qdigest re2jregexp real regressor row setdigest smallint sphericalgeography tdigest time timestamp tinyint uuid varbinary varchar zone"),atoms:s("false true null unknown"),operatorChars:/^[[\]|<>=!\-+*/%]/,dateSQL:s("date time timestamp zone"),support:s("decimallessFloat zerolessFloat hexNumber")})})});var ta=Ke(($u,Ku)=>{(function(o){typeof $u=="object"&&typeof Ku=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("stylus",function(E){for(var N=E.indentUnit,G="",J=w(p),re=/^(a|b|i|s|col|em)$/i,q=w(S),O=w(s),D=w(T),Q=w(g),R=w(v),V=M(v),x=w(b),K=w(C),X=w(h),I=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,H=M(y),le=w(c),xe=new RegExp(/^\-(moz|ms|o|webkit)-/i),F=w(d),L="",de={},ze,pe,Ee,ge;G.length|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),B.context.line.firstWord=L?L[0].replace(/^\s*/,""):"",B.context.line.indent=$.indentation(),ze=$.peek(),$.match("//"))return $.skipToEnd(),["comment","comment"];if($.match("/*"))return B.tokenize=qe,qe($,B);if(ze=='"'||ze=="'")return $.next(),B.tokenize=Se(ze),B.tokenize($,B);if(ze=="@")return $.next(),$.eatWhile(/[\w\\-]/),["def",$.current()];if(ze=="#"){if($.next(),$.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i))return["atom","atom"];if($.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return $.match(xe)?["meta","vendor-prefixes"]:$.match(/^-?[0-9]?\.?[0-9]/)?($.eatWhile(/[a-z%]/i),["number","unit"]):ze=="!"?($.next(),[$.match(/^(important|optional)/i)?"keyword":"operator","important"]):ze=="."&&$.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:$.match(V)?($.peek()=="("&&(B.tokenize=je),["property","word"]):$.match(/^[a-z][\w-]*\(/i)?($.backUp(1),["keyword","mixin"]):$.match(/^(\+|-)[a-z][\w-]*\(/i)?($.backUp(1),["keyword","block-mixin"]):$.string.match(/^\s*&/)&&$.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:$.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?($.backUp(1),["variable-3","reference"]):$.match(/^&{1}\s*$/)?["variable-3","reference"]:$.match(H)?["operator","operator"]:$.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?$.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!U($.current())?($.match("."),["variable-2","variable-name"]):["variable-2","word"]:$.match(I)?["operator",$.current()]:/[:;,{}\[\]\(\)]/.test(ze)?($.next(),[null,ze]):($.next(),[null,null])}function qe($,B){for(var se=!1,De;(De=$.next())!=null;){if(se&&De=="/"){B.tokenize=null;break}se=De=="*"}return["comment","comment"]}function Se($){return function(B,se){for(var De=!1,nt;(nt=B.next())!=null;){if(nt==$&&!De){$==")"&&B.backUp(1);break}De=!De&&nt=="\\"}return(nt==$||!De&&$!=")")&&(se.tokenize=null),["string","string"]}}function je($,B){return $.next(),$.match(/\s*[\"\')]/,!1)?B.tokenize=null:B.tokenize=Se(")"),[null,"("]}function Ze($,B,se,De){this.type=$,this.indent=B,this.prev=se,this.line=De||{firstWord:"",indent:0}}function ke($,B,se,De){return De=De>=0?De:N,$.context=new Ze(se,B.indentation()+De,$.context),se}function Je($,B){var se=$.context.indent-N;return B=B||!1,$.context=$.context.prev,B&&($.context.indent=se),$.context.type}function He($,B,se){return de[se.context.type]($,B,se)}function Ge($,B,se,De){for(var nt=De||1;nt>0;nt--)se.context=se.context.prev;return He($,B,se)}function U($){return $.toLowerCase()in J}function Z($){return $=$.toLowerCase(),$ in q||$ in X}function ce($){return $.toLowerCase()in le}function Be($){return $.toLowerCase().match(xe)}function te($){var B=$.toLowerCase(),se="variable-2";return U($)?se="tag":ce($)?se="block-keyword":Z($)?se="property":B in D||B in F?se="atom":B=="return"||B in Q?se="keyword":$.match(/^[A-Z]/)&&(se="string"),se}function fe($,B){return Me(B)&&($=="{"||$=="]"||$=="hash"||$=="qualifier")||$=="block-mixin"}function oe($,B){return $=="{"&&B.match(/^\s*\$?[\w-]+/i,!1)}function Ue($,B){return $==":"&&B.match(/^[a-z-]+/,!1)}function we($){return $.sol()||$.string.match(new RegExp("^\\s*"+W($.current())))}function Me($){return $.eol()||$.match(/^\s*$/,!1)}function Le($){var B=/^\s*[-_]*[a-z0-9]+[\w-]*/i,se=typeof $=="string"?$.match(B):$.string.match(B);return se?se[0].replace(/^\s*/,""):""}return de.block=function($,B,se){if($=="comment"&&we(B)||$==","&&Me(B)||$=="mixin")return ke(se,B,"block",0);if(oe($,B))return ke(se,B,"interpolation");if(Me(B)&&$=="]"&&!/^\s*(\.|#|:|\[|\*|&)/.test(B.string)&&!U(Le(B)))return ke(se,B,"block",0);if(fe($,B))return ke(se,B,"block");if($=="}"&&Me(B))return ke(se,B,"block",0);if($=="variable-name")return B.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||ce(Le(B))?ke(se,B,"variableName"):ke(se,B,"variableName",0);if($=="=")return!Me(B)&&!ce(Le(B))?ke(se,B,"block",0):ke(se,B,"block");if($=="*"&&(Me(B)||B.match(/\s*(,|\.|#|\[|:|{)/,!1)))return ge="tag",ke(se,B,"block");if(Ue($,B))return ke(se,B,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test($))return ke(se,B,Me(B)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test($))return ke(se,B,"keyframes");if(/@extends?/.test($))return ke(se,B,"extend",0);if($&&$.charAt(0)=="@")return B.indentation()>0&&Z(B.current().slice(1))?(ge="variable-2","block"):/(@import|@require|@charset)/.test($)?ke(se,B,"block",0):ke(se,B,"block");if($=="reference"&&Me(B))return ke(se,B,"block");if($=="(")return ke(se,B,"parens");if($=="vendor-prefixes")return ke(se,B,"vendorPrefixes");if($=="word"){var De=B.current();if(ge=te(De),ge=="property")return we(B)?ke(se,B,"block",0):(ge="atom","block");if(ge=="tag"){if(/embed|menu|pre|progress|sub|table/.test(De)&&Z(Le(B))||B.string.match(new RegExp("\\[\\s*"+De+"|"+De+"\\s*\\]")))return ge="atom","block";if(re.test(De)&&(we(B)&&B.string.match(/=/)||!we(B)&&!B.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!U(Le(B))))return ge="variable-2",ce(Le(B))?"block":ke(se,B,"block",0);if(Me(B))return ke(se,B,"block")}if(ge=="block-keyword")return ge="keyword",B.current(/(if|unless)/)&&!we(B)?"block":ke(se,B,"block");if(De=="return")return ke(se,B,"block",0);if(ge=="variable-2"&&B.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return ke(se,B,"block")}return se.context.type},de.parens=function($,B,se){if($=="(")return ke(se,B,"parens");if($==")")return se.context.prev.type=="parens"?Je(se):B.string.match(/^[a-z][\w-]*\(/i)&&Me(B)||ce(Le(B))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(Le(B))||!B.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&U(Le(B))?ke(se,B,"block"):B.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||B.string.match(/^\s*(\(|\)|[0-9])/)||B.string.match(/^\s+[a-z][\w-]*\(/i)||B.string.match(/^\s+[\$-]?[a-z]/i)?ke(se,B,"block",0):Me(B)?ke(se,B,"block"):ke(se,B,"block",0);if($&&$.charAt(0)=="@"&&Z(B.current().slice(1))&&(ge="variable-2"),$=="word"){var De=B.current();ge=te(De),ge=="tag"&&re.test(De)&&(ge="variable-2"),(ge=="property"||De=="to")&&(ge="atom")}return $=="variable-name"?ke(se,B,"variableName"):Ue($,B)?ke(se,B,"pseudo"):se.context.type},de.vendorPrefixes=function($,B,se){return $=="word"?(ge="property",ke(se,B,"block",0)):Je(se)},de.pseudo=function($,B,se){return Z(Le(B.string))?Ge($,B,se):(B.match(/^[a-z-]+/),ge="variable-3",Me(B)?ke(se,B,"block"):Je(se))},de.atBlock=function($,B,se){if($=="(")return ke(se,B,"atBlock_parens");if(fe($,B))return ke(se,B,"block");if(oe($,B))return ke(se,B,"interpolation");if($=="word"){var De=B.current().toLowerCase();if(/^(only|not|and|or)$/.test(De)?ge="keyword":R.hasOwnProperty(De)?ge="tag":K.hasOwnProperty(De)?ge="attribute":x.hasOwnProperty(De)?ge="property":O.hasOwnProperty(De)?ge="string-2":ge=te(B.current()),ge=="tag"&&Me(B))return ke(se,B,"block")}return $=="operator"&&/^(not|and|or)$/.test(B.current())&&(ge="keyword"),se.context.type},de.atBlock_parens=function($,B,se){if($=="{"||$=="}")return se.context.type;if($==")")return Me(B)?ke(se,B,"block"):ke(se,B,"atBlock");if($=="word"){var De=B.current().toLowerCase();return ge=te(De),/^(max|min)/.test(De)&&(ge="property"),ge=="tag"&&(re.test(De)?ge="variable-2":ge="atom"),se.context.type}return de.atBlock($,B,se)},de.keyframes=function($,B,se){return B.indentation()=="0"&&($=="}"&&we(B)||$=="]"||$=="hash"||$=="qualifier"||U(B.current()))?Ge($,B,se):$=="{"?ke(se,B,"keyframes"):$=="}"?we(B)?Je(se,!0):ke(se,B,"keyframes"):$=="unit"&&/^[0-9]+\%$/.test(B.current())?ke(se,B,"keyframes"):$=="word"&&(ge=te(B.current()),ge=="block-keyword")?(ge="keyword",ke(se,B,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test($)?ke(se,B,Me(B)?"block":"atBlock"):$=="mixin"?ke(se,B,"block",0):se.context.type},de.interpolation=function($,B,se){return $=="{"&&Je(se)&&ke(se,B,"block"),$=="}"?B.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||B.string.match(/^\s*[a-z]/i)&&U(Le(B))?ke(se,B,"block"):!B.string.match(/^(\{|\s*\&)/)||B.match(/\s*[\w-]/,!1)?ke(se,B,"block",0):ke(se,B,"block"):$=="variable-name"?ke(se,B,"variableName",0):($=="word"&&(ge=te(B.current()),ge=="tag"&&(ge="atom")),se.context.type)},de.extend=function($,B,se){return $=="["||$=="="?"extend":$=="]"?Je(se):$=="word"?(ge=te(B.current()),"extend"):Je(se)},de.variableName=function($,B,se){return $=="string"||$=="["||$=="]"||B.current().match(/^(\.|\$)/)?(B.current().match(/^\.[\w-]+/i)&&(ge="variable-2"),"variableName"):Ge($,B,se)},{startState:function($){return{tokenize:null,state:"block",context:new Ze("block",$||0,null)}},token:function($,B){return!B.tokenize&&$.eatSpace()?null:(pe=(B.tokenize||Oe)($,B),pe&&typeof pe=="object"&&(Ee=pe[1],pe=pe[0]),ge=pe,B.state=de[B.state](Ee,$,B),ge)},indent:function($,B,se){var De=$.context,nt=B&&B.charAt(0),dt=De.indent,Pt=Le(B),Ft=se.match(/^\s*/)[0].replace(/\t/g,G).length,Pe=$.context.prev?$.context.prev.line.firstWord:"",xt=$.context.prev?$.context.prev.line.indent:Ft;return De.prev&&(nt=="}"&&(De.type=="block"||De.type=="atBlock"||De.type=="keyframes")||nt==")"&&(De.type=="parens"||De.type=="atBlock_parens")||nt=="{"&&De.type=="at")?dt=De.indent-N:/(\})/.test(nt)||(/@|\$|\d/.test(nt)||/^\{/.test(B)||/^\s*\/(\/|\*)/.test(B)||/^\s*\/\*/.test(Pe)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(B)||/^(\+|-)?[a-z][\w-]*\(/i.test(B)||/^return/.test(B)||ce(Pt)?dt=Ft:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(nt)||U(Pt)?/\,\s*$/.test(Pe)?dt=xt:/^\s+/.test(se)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(Pe)||U(Pe))?dt=Ft<=xt?xt:xt+N:dt=Ft:!/,\s*$/.test(se)&&(Be(Pt)||Z(Pt))&&(ce(Pe)?dt=Ft<=xt?xt:xt+N:/^\{/.test(Pe)?dt=Ft<=xt?Ft:xt+N:Be(Pe)||Z(Pe)?dt=Ft>=xt?xt:Ft:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(Pe)||/=\s*$/.test(Pe)||U(Pe)||/^\$[\w-\.\[\]\'\"]/.test(Pe)?dt=xt+N:dt=Ft)),dt},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"indent"}});var p=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","bgsound","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video"],v=["domain","regexp","url-prefix","url"],C=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],b=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","dynamic-range","video-dynamic-range"],S=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode","font-smoothing","osx-font-smoothing"],s=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],h=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],T=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","high","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","spell-out","square","square-button","standard","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","x-large","x-small","xor","xx-large","xx-small","bicubic","optimizespeed","grayscale","row","row-reverse","wrap","wrap-reverse","column-reverse","flex-start","flex-end","space-between","space-around","unset"],y=["in","and","or","not","is not","is a","is","isnt","defined","if unless"],c=["for","if","else","unless","from","to"],d=["null","true","false","href","title","type","not-allowed","readonly","disabled"],k=["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"],z=p.concat(v,C,b,S,s,g,T,h,y,c,d,k);function M(E){return E=E.sort(function(N,G){return G>N}),new RegExp("^(("+E.join(")|(")+"))\\b")}function w(E){for(var N={},G=0;G{(function(o){typeof Gu=="object"&&typeof Zu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";function p(q){for(var O={},D=0;D~^?!",h=":;,.(){}[]",g=/^\-?0b[01][01_]*/,T=/^\-?0o[0-7][0-7_]*/,y=/^\-?0x[\dA-Fa-f][\dA-Fa-f_]*(?:(?:\.[\dA-Fa-f][\dA-Fa-f_]*)?[Pp]\-?\d[\d_]*)?/,c=/^\-?\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee]\-?\d[\d_]*)?/,d=/^\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1/,k=/^\.(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/,z=/^\#[A-Za-z]+/,M=/^@(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/;function w(q,O,D){if(q.sol()&&(O.indented=q.indentation()),q.eatSpace())return null;var Q=q.peek();if(Q=="/"){if(q.match("//"))return q.skipToEnd(),"comment";if(q.match("/*"))return O.tokenize.push(N),N(q,O)}if(q.match(z))return"builtin";if(q.match(M))return"attribute";if(q.match(g)||q.match(T)||q.match(y)||q.match(c))return"number";if(q.match(k))return"property";if(s.indexOf(Q)>-1)return q.next(),"operator";if(h.indexOf(Q)>-1)return q.next(),q.match(".."),"punctuation";var R;if(R=q.match(/("""|"|')/)){var V=E.bind(null,R[0]);return O.tokenize.push(V),V(q,O)}if(q.match(d)){var x=q.current();return S.hasOwnProperty(x)?"variable-2":b.hasOwnProperty(x)?"atom":v.hasOwnProperty(x)?(C.hasOwnProperty(x)&&(O.prev="define"),"keyword"):D=="define"?"def":"variable"}return q.next(),null}function W(){var q=0;return function(O,D,Q){var R=w(O,D,Q);if(R=="punctuation"){if(O.current()=="(")++q;else if(O.current()==")"){if(q==0)return O.backUp(1),D.tokenize.pop(),D.tokenize[D.tokenize.length-1](O,D);--q}}return R}}function E(q,O,D){for(var Q=q.length==1,R,V=!1;R=O.peek();)if(V){if(O.next(),R=="(")return D.tokenize.push(W()),"string";V=!1}else{if(O.match(q))return D.tokenize.pop(),"string";O.next(),V=R=="\\"}return Q&&D.tokenize.pop(),"string"}function N(q,O){for(var D;D=q.next();)if(D==="/"&&q.eat("*"))O.tokenize.push(N);else if(D==="*"&&q.eat("/")){O.tokenize.pop();break}return"comment"}function G(q,O,D){this.prev=q,this.align=O,this.indented=D}function J(q,O){var D=O.match(/^\s*($|\/[\/\*])/,!1)?null:O.column()+1;q.context=new G(q.context,D,q.indented)}function re(q){q.context&&(q.indented=q.context.indented,q.context=q.context.prev)}o.defineMode("swift",function(q){return{startState:function(){return{prev:null,context:null,indented:0,tokenize:[]}},token:function(O,D){var Q=D.prev;D.prev=null;var R=D.tokenize[D.tokenize.length-1]||w,V=R(O,D,Q);if(!V||V=="comment"?D.prev=Q:D.prev||(D.prev=V),V=="punctuation"){var x=/[\(\[\{]|([\]\)\}])/.exec(O.current());x&&(x[1]?re:J)(D,O)}return V},indent:function(O,D){var Q=O.context;if(!Q)return 0;var R=/^[\]\}\)]/.test(D);return Q.align!=null?Q.align-(R?1:0):Q.indented+(R?0:q.indentUnit)},electricInput:/^\s*[\)\}\]]$/,lineComment:"//",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace",closeBrackets:"()[]{}''\"\"``"}}),o.defineMIME("text/x-swift","swift")})});var Vu=Ke((Yu,Qu)=>{(function(o){typeof Yu=="object"&&typeof Qu=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("coffeescript",function(p,v){var C="error";function b(O){return new RegExp("^(("+O.join(")|(")+"))\\b")}var S=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,s=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,h=/^[_A-Za-z$][_A-Za-z$0-9]*/,g=/^@[_A-Za-z$][_A-Za-z$0-9]*/,T=b(["and","or","not","is","isnt","in","instanceof","typeof"]),y=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],c=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"],d=b(y.concat(c));y=b(y);var k=/^('{3}|\"{3}|['\"])/,z=/^(\/{3}|\/)/,M=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],w=b(M);function W(O,D){if(O.sol()){D.scope.align===null&&(D.scope.align=!1);var Q=D.scope.offset;if(O.eatSpace()){var R=O.indentation();return R>Q&&D.scope.type=="coffee"?"indent":R0&&J(O,D)}if(O.eatSpace())return null;var V=O.peek();if(O.match("####"))return O.skipToEnd(),"comment";if(O.match("###"))return D.tokenize=N,D.tokenize(O,D);if(V==="#")return O.skipToEnd(),"comment";if(O.match(/^-?[0-9\.]/,!1)){var x=!1;if(O.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(x=!0),O.match(/^-?\d+\.\d*/)&&(x=!0),O.match(/^-?\.\d+/)&&(x=!0),x)return O.peek()=="."&&O.backUp(1),"number";var K=!1;if(O.match(/^-?0x[0-9a-f]+/i)&&(K=!0),O.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(K=!0),O.match(/^-?0(?![\dx])/i)&&(K=!0),K)return"number"}if(O.match(k))return D.tokenize=E(O.current(),!1,"string"),D.tokenize(O,D);if(O.match(z)){if(O.current()!="/"||O.match(/^.*\//,!1))return D.tokenize=E(O.current(),!0,"string-2"),D.tokenize(O,D);O.backUp(1)}return O.match(S)||O.match(T)?"operator":O.match(s)?"punctuation":O.match(w)?"atom":O.match(g)||D.prop&&O.match(h)?"property":O.match(d)?"keyword":O.match(h)?"variable":(O.next(),C)}function E(O,D,Q){return function(R,V){for(;!R.eol();)if(R.eatWhile(/[^'"\/\\]/),R.eat("\\")){if(R.next(),D&&R.eol())return Q}else{if(R.match(O))return V.tokenize=W,Q;R.eat(/['"\/]/)}return D&&(v.singleLineStringErrors?Q=C:V.tokenize=W),Q}}function N(O,D){for(;!O.eol();){if(O.eatWhile(/[^#]/),O.match("###")){D.tokenize=W;break}O.eatWhile("#")}return"comment"}function G(O,D,Q){Q=Q||"coffee";for(var R=0,V=!1,x=null,K=D.scope;K;K=K.prev)if(K.type==="coffee"||K.type=="}"){R=K.offset+p.indentUnit;break}Q!=="coffee"?(V=null,x=O.column()+O.current().length):D.scope.align&&(D.scope.align=!1),D.scope={offset:R,type:Q,prev:D.scope,align:V,alignOffset:x}}function J(O,D){if(D.scope.prev)if(D.scope.type==="coffee"){for(var Q=O.indentation(),R=!1,V=D.scope;V;V=V.prev)if(Q===V.offset){R=!0;break}if(!R)return!0;for(;D.scope.prev&&D.scope.offset!==Q;)D.scope=D.scope.prev;return!1}else return D.scope=D.scope.prev,!1}function re(O,D){var Q=D.tokenize(O,D),R=O.current();R==="return"&&(D.dedent=!0),((R==="->"||R==="=>")&&O.eol()||Q==="indent")&&G(O,D);var V="[({".indexOf(R);if(V!==-1&&G(O,D,"])}".slice(V,V+1)),y.exec(R)&&G(O,D),R=="then"&&J(O,D),Q==="dedent"&&J(O,D))return C;if(V="])}".indexOf(R),V!==-1){for(;D.scope.type=="coffee"&&D.scope.prev;)D.scope=D.scope.prev;D.scope.type==R&&(D.scope=D.scope.prev)}return D.dedent&&O.eol()&&(D.scope.type=="coffee"&&D.scope.prev&&(D.scope=D.scope.prev),D.dedent=!1),Q}var q={startState:function(O){return{tokenize:W,scope:{offset:O||0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(O,D){var Q=D.scope.align===null&&D.scope;Q&&O.sol()&&(Q.align=!1);var R=re(O,D);return R&&R!="comment"&&(Q&&(Q.align=!0),D.prop=R=="punctuation"&&O.current()=="."),R},indent:function(O,D){if(O.tokenize!=W)return 0;var Q=O.scope,R=D&&"])}".indexOf(D.charAt(0))>-1;if(R)for(;Q.type=="coffee"&&Q.prev;)Q=Q.prev;var V=R&&Q.type===D.charAt(0);return Q.align?Q.alignOffset-(V?1:0):(V?Q.prev:Q).offset},lineComment:"#",fold:"indent"};return q}),o.defineMIME("application/vnd.coffeescript","coffeescript"),o.defineMIME("text/x-coffeescript","coffeescript"),o.defineMIME("text/coffeescript","coffeescript")})});var tc=Ke((Ju,ec)=>{(function(o){typeof Ju=="object"&&typeof ec=="object"?o(We(),vn(),gn(),Qn()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../javascript/javascript","../css/css","../htmlmixed/htmlmixed"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("pug",function(p){var v="keyword",C="meta",b="builtin",S="qualifier",s={"{":"}","(":")","[":"]"},h=o.getMode(p,"javascript");function g(){this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=o.startState(h),this.restOfLine="",this.isIncludeFiltered=!1,this.isEach=!1,this.lastTag="",this.scriptType="",this.isAttrs=!1,this.attrsNest=[],this.inAttributeName=!0,this.attributeIsType=!1,this.attrValue="",this.indentOf=1/0,this.indentToken="",this.innerMode=null,this.innerState=null,this.innerModeForLine=!1}g.prototype.copy=function(){var U=new g;return U.javaScriptLine=this.javaScriptLine,U.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,U.javaScriptArguments=this.javaScriptArguments,U.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,U.isInterpolating=this.isInterpolating,U.interpolationNesting=this.interpolationNesting,U.jsState=o.copyState(h,this.jsState),U.innerMode=this.innerMode,this.innerMode&&this.innerState&&(U.innerState=o.copyState(this.innerMode,this.innerState)),U.restOfLine=this.restOfLine,U.isIncludeFiltered=this.isIncludeFiltered,U.isEach=this.isEach,U.lastTag=this.lastTag,U.scriptType=this.scriptType,U.isAttrs=this.isAttrs,U.attrsNest=this.attrsNest.slice(),U.inAttributeName=this.inAttributeName,U.attributeIsType=this.attributeIsType,U.attrValue=this.attrValue,U.indentOf=this.indentOf,U.indentToken=this.indentToken,U.innerModeForLine=this.innerModeForLine,U};function T(U,Z){if(U.sol()&&(Z.javaScriptLine=!1,Z.javaScriptLineExcludesColon=!1),Z.javaScriptLine){if(Z.javaScriptLineExcludesColon&&U.peek()===":"){Z.javaScriptLine=!1,Z.javaScriptLineExcludesColon=!1;return}var ce=h.token(U,Z.jsState);return U.eol()&&(Z.javaScriptLine=!1),ce||!0}}function y(U,Z){if(Z.javaScriptArguments){if(Z.javaScriptArgumentsDepth===0&&U.peek()!=="("){Z.javaScriptArguments=!1;return}if(U.peek()==="("?Z.javaScriptArgumentsDepth++:U.peek()===")"&&Z.javaScriptArgumentsDepth--,Z.javaScriptArgumentsDepth===0){Z.javaScriptArguments=!1;return}var ce=h.token(U,Z.jsState);return ce||!0}}function c(U){if(U.match(/^yield\b/))return"keyword"}function d(U){if(U.match(/^(?:doctype) *([^\n]+)?/))return C}function k(U,Z){if(U.match("#{"))return Z.isInterpolating=!0,Z.interpolationNesting=0,"punctuation"}function z(U,Z){if(Z.isInterpolating){if(U.peek()==="}"){if(Z.interpolationNesting--,Z.interpolationNesting<0)return U.next(),Z.isInterpolating=!1,"punctuation"}else U.peek()==="{"&&Z.interpolationNesting++;return h.token(U,Z.jsState)||!0}}function M(U,Z){if(U.match(/^case\b/))return Z.javaScriptLine=!0,v}function w(U,Z){if(U.match(/^when\b/))return Z.javaScriptLine=!0,Z.javaScriptLineExcludesColon=!0,v}function W(U){if(U.match(/^default\b/))return v}function E(U,Z){if(U.match(/^extends?\b/))return Z.restOfLine="string",v}function N(U,Z){if(U.match(/^append\b/))return Z.restOfLine="variable",v}function G(U,Z){if(U.match(/^prepend\b/))return Z.restOfLine="variable",v}function J(U,Z){if(U.match(/^block\b *(?:(prepend|append)\b)?/))return Z.restOfLine="variable",v}function re(U,Z){if(U.match(/^include\b/))return Z.restOfLine="string",v}function q(U,Z){if(U.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&U.match("include"))return Z.isIncludeFiltered=!0,v}function O(U,Z){if(Z.isIncludeFiltered){var ce=H(U,Z);return Z.isIncludeFiltered=!1,Z.restOfLine="string",ce}}function D(U,Z){if(U.match(/^mixin\b/))return Z.javaScriptLine=!0,v}function Q(U,Z){if(U.match(/^\+([-\w]+)/))return U.match(/^\( *[-\w]+ *=/,!1)||(Z.javaScriptArguments=!0,Z.javaScriptArgumentsDepth=0),"variable";if(U.match("+#{",!1))return U.next(),Z.mixinCallAfter=!0,k(U,Z)}function R(U,Z){if(Z.mixinCallAfter)return Z.mixinCallAfter=!1,U.match(/^\( *[-\w]+ *=/,!1)||(Z.javaScriptArguments=!0,Z.javaScriptArgumentsDepth=0),!0}function V(U,Z){if(U.match(/^(if|unless|else if|else)\b/))return Z.javaScriptLine=!0,v}function x(U,Z){if(U.match(/^(- *)?(each|for)\b/))return Z.isEach=!0,v}function K(U,Z){if(Z.isEach){if(U.match(/^ in\b/))return Z.javaScriptLine=!0,Z.isEach=!1,v;if(U.sol()||U.eol())Z.isEach=!1;else if(U.next()){for(;!U.match(/^ in\b/,!1)&&U.next(););return"variable"}}}function X(U,Z){if(U.match(/^while\b/))return Z.javaScriptLine=!0,v}function I(U,Z){var ce;if(ce=U.match(/^(\w(?:[-:\w]*\w)?)\/?/))return Z.lastTag=ce[1].toLowerCase(),Z.lastTag==="script"&&(Z.scriptType="application/javascript"),"tag"}function H(U,Z){if(U.match(/^:([\w\-]+)/)){var ce;return p&&p.innerModes&&(ce=p.innerModes(U.current().substring(1))),ce||(ce=U.current().substring(1)),typeof ce=="string"&&(ce=o.getMode(p,ce)),je(U,Z,ce),"atom"}}function le(U,Z){if(U.match(/^(!?=|-)/))return Z.javaScriptLine=!0,"punctuation"}function xe(U){if(U.match(/^#([\w-]+)/))return b}function F(U){if(U.match(/^\.([\w-]+)/))return S}function L(U,Z){if(U.peek()=="(")return U.next(),Z.isAttrs=!0,Z.attrsNest=[],Z.inAttributeName=!0,Z.attrValue="",Z.attributeIsType=!1,"punctuation"}function de(U,Z){if(Z.isAttrs){if(s[U.peek()]&&Z.attrsNest.push(s[U.peek()]),Z.attrsNest[Z.attrsNest.length-1]===U.peek())Z.attrsNest.pop();else if(U.eat(")"))return Z.isAttrs=!1,"punctuation";if(Z.inAttributeName&&U.match(/^[^=,\)!]+/))return(U.peek()==="="||U.peek()==="!")&&(Z.inAttributeName=!1,Z.jsState=o.startState(h),Z.lastTag==="script"&&U.current().trim().toLowerCase()==="type"?Z.attributeIsType=!0:Z.attributeIsType=!1),"attribute";var ce=h.token(U,Z.jsState);if(Z.attributeIsType&&ce==="string"&&(Z.scriptType=U.current().toString()),Z.attrsNest.length===0&&(ce==="string"||ce==="variable"||ce==="keyword"))try{return Function("","var x "+Z.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),Z.inAttributeName=!0,Z.attrValue="",U.backUp(U.current().length),de(U,Z)}catch{}return Z.attrValue+=U.current(),ce||!0}}function ze(U,Z){if(U.match(/^&attributes\b/))return Z.javaScriptArguments=!0,Z.javaScriptArgumentsDepth=0,"keyword"}function pe(U){if(U.sol()&&U.eatSpace())return"indent"}function Ee(U,Z){if(U.match(/^ *\/\/(-)?([^\n]*)/))return Z.indentOf=U.indentation(),Z.indentToken="comment","comment"}function ge(U){if(U.match(/^: */))return"colon"}function Oe(U,Z){if(U.match(/^(?:\| ?| )([^\n]+)/))return"string";if(U.match(/^(<[^\n]*)/,!1))return je(U,Z,"htmlmixed"),Z.innerModeForLine=!0,Ze(U,Z,!0)}function qe(U,Z){if(U.eat(".")){var ce=null;return Z.lastTag==="script"&&Z.scriptType.toLowerCase().indexOf("javascript")!=-1?ce=Z.scriptType.toLowerCase().replace(/"|'/g,""):Z.lastTag==="style"&&(ce="css"),je(U,Z,ce),"dot"}}function Se(U){return U.next(),null}function je(U,Z,ce){ce=o.mimeModes[ce]||ce,ce=p.innerModes&&p.innerModes(ce)||ce,ce=o.mimeModes[ce]||ce,ce=o.getMode(p,ce),Z.indentOf=U.indentation(),ce&&ce.name!=="null"?Z.innerMode=ce:Z.indentToken="string"}function Ze(U,Z,ce){if(U.indentation()>Z.indentOf||Z.innerModeForLine&&!U.sol()||ce)return Z.innerMode?(Z.innerState||(Z.innerState=Z.innerMode.startState?o.startState(Z.innerMode,U.indentation()):{}),U.hideFirstChars(Z.indentOf+2,function(){return Z.innerMode.token(U,Z.innerState)||!0})):(U.skipToEnd(),Z.indentToken);U.sol()&&(Z.indentOf=1/0,Z.indentToken=null,Z.innerMode=null,Z.innerState=null)}function ke(U,Z){if(U.sol()&&(Z.restOfLine=""),Z.restOfLine){U.skipToEnd();var ce=Z.restOfLine;return Z.restOfLine="",ce}}function Je(){return new g}function He(U){return U.copy()}function Ge(U,Z){var ce=Ze(U,Z)||ke(U,Z)||z(U,Z)||O(U,Z)||K(U,Z)||de(U,Z)||T(U,Z)||y(U,Z)||R(U,Z)||c(U)||d(U)||k(U,Z)||M(U,Z)||w(U,Z)||W(U)||E(U,Z)||N(U,Z)||G(U,Z)||J(U,Z)||re(U,Z)||q(U,Z)||D(U,Z)||Q(U,Z)||V(U,Z)||x(U,Z)||X(U,Z)||I(U,Z)||H(U,Z)||le(U,Z)||xe(U)||F(U)||L(U,Z)||ze(U,Z)||pe(U)||Oe(U,Z)||Ee(U,Z)||ge(U)||qe(U,Z)||Se(U);return ce===!0?null:ce}return{startState:Je,copyState:He,token:Ge}},"javascript","css","htmlmixed"),o.defineMIME("text/x-pug","pug"),o.defineMIME("text/x-jade","pug")})});var ic=Ke((rc,nc)=>{(function(o){typeof rc=="object"&&typeof nc=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.multiplexingMode=function(p){var v=Array.prototype.slice.call(arguments,1);function C(b,S,s,h){if(typeof S=="string"){var g=b.indexOf(S,s);return h&&g>-1?g+S.length:g}var T=S.exec(s?b.slice(s):b);return T?T.index+s+(h?T[0].length:0):-1}return{startState:function(){return{outer:o.startState(p),innerActive:null,inner:null,startingInner:!1}},copyState:function(b){return{outer:o.copyState(p,b.outer),innerActive:b.innerActive,inner:b.innerActive&&o.copyState(b.innerActive.mode,b.inner),startingInner:b.startingInner}},token:function(b,S){if(S.innerActive){var z=S.innerActive,h=b.string;if(!z.close&&b.sol())return S.innerActive=S.inner=null,this.token(b,S);var y=z.close&&!S.startingInner?C(h,z.close,b.pos,z.parseDelimiters):-1;if(y==b.pos&&!z.parseDelimiters)return b.match(z.close),S.innerActive=S.inner=null,z.delimStyle&&z.delimStyle+" "+z.delimStyle+"-close";y>-1&&(b.string=h.slice(0,y));var M=z.mode.token(b,S.inner);return y>-1?b.string=h:b.pos>b.start&&(S.startingInner=!1),y==b.pos&&z.parseDelimiters&&(S.innerActive=S.inner=null),z.innerStyle&&(M?M=M+" "+z.innerStyle:M=z.innerStyle),M}else{for(var s=1/0,h=b.string,g=0;g{(function(o){typeof oc=="object"&&typeof ac=="object"?o(We(),Di(),ic()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple","../../addon/mode/multiplex"],o):o(CodeMirror)})(function(o){"use strict";o.defineSimpleMode("handlebars-tags",{start:[{regex:/\{\{\{/,push:"handlebars_raw",token:"tag"},{regex:/\{\{!--/,push:"dash_comment",token:"comment"},{regex:/\{\{!/,push:"comment",token:"comment"},{regex:/\{\{/,push:"handlebars",token:"tag"}],handlebars_raw:[{regex:/\}\}\}/,pop:!0,token:"tag"}],handlebars:[{regex:/\}\}/,pop:!0,token:"tag"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/>|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],meta:{blockCommentStart:"{{--",blockCommentEnd:"--}}"}}),o.defineMode("handlebars",function(p,v){var C=o.getMode(p,"handlebars-tags");return!v||!v.base?C:o.multiplexingMode(o.getMode(p,v.base),{open:"{{",close:/\}\}\}?/,mode:C,parseDelimiters:!0})}),o.defineMIME("text/x-handlebars-template","handlebars")})});var cc=Ke((sc,uc)=>{(function(o){"use strict";typeof sc=="object"&&typeof uc=="object"?o(We(),Yn(),mn(),vn(),Vu(),gn(),ea(),ta(),tc(),lc()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/overlay","../xml/xml","../javascript/javascript","../coffeescript/coffeescript","../css/css","../sass/sass","../stylus/stylus","../pug/pug","../handlebars/handlebars"],o):o(CodeMirror)})(function(o){var p={script:[["lang",/coffee(script)?/,"coffeescript"],["type",/^(?:text|application)\/(?:x-)?coffee(?:script)?$/,"coffeescript"],["lang",/^babel$/,"javascript"],["type",/^text\/babel$/,"javascript"],["type",/^text\/ecmascript-\d+$/,"javascript"]],style:[["lang",/^stylus$/i,"stylus"],["lang",/^sass$/i,"sass"],["lang",/^less$/i,"text/x-less"],["lang",/^scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?styl(us)?$/i,"stylus"],["type",/^text\/sass/i,"sass"],["type",/^(text\/)?(x-)?scss$/i,"text/x-scss"],["type",/^(text\/)?(x-)?less$/i,"text/x-less"]],template:[["lang",/^vue-template$/i,"vue"],["lang",/^pug$/i,"pug"],["lang",/^handlebars$/i,"handlebars"],["type",/^(text\/)?(x-)?pug$/i,"pug"],["type",/^text\/x-handlebars-template$/i,"handlebars"],[null,null,"vue-template"]]};o.defineMode("vue-template",function(v,C){var b={token:function(S){if(S.match(/^\{\{.*?\}\}/))return"meta mustache";for(;S.next()&&!S.match("{{",!1););return null}};return o.overlayMode(o.getMode(v,C.backdrop||"text/html"),b)}),o.defineMode("vue",function(v){return o.getMode(v,{name:"htmlmixed",tags:p})},"htmlmixed","xml","javascript","coffeescript","css","sass","stylus","pug","handlebars"),o.defineMIME("script/x-vue","vue"),o.defineMIME("text/x-vue","vue")})});var pc=Ke((fc,dc)=>{(function(o){typeof fc=="object"&&typeof dc=="object"?o(We()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("yaml",function(){var p=["true","false","on","off","yes","no"],v=new RegExp("\\b(("+p.join(")|(")+"))$","i");return{token:function(C,b){var S=C.peek(),s=b.escaped;if(b.escaped=!1,S=="#"&&(C.pos==0||/\s/.test(C.string.charAt(C.pos-1))))return C.skipToEnd(),"comment";if(C.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(b.literal&&C.indentation()>b.keyCol)return C.skipToEnd(),"string";if(b.literal&&(b.literal=!1),C.sol()){if(b.keyCol=0,b.pair=!1,b.pairStart=!1,C.match("---")||C.match("..."))return"def";if(C.match(/\s*-\s+/))return"meta"}if(C.match(/^(\{|\}|\[|\])/))return S=="{"?b.inlinePairs++:S=="}"?b.inlinePairs--:S=="["?b.inlineList++:b.inlineList--,"meta";if(b.inlineList>0&&!s&&S==",")return C.next(),"meta";if(b.inlinePairs>0&&!s&&S==",")return b.keyCol=0,b.pair=!1,b.pairStart=!1,C.next(),"meta";if(b.pairStart){if(C.match(/^\s*(\||\>)\s*/))return b.literal=!0,"meta";if(C.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(b.inlinePairs==0&&C.match(/^\s*-?[0-9\.\,]+\s?$/)||b.inlinePairs>0&&C.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(C.match(v))return"keyword"}return!b.pair&&C.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)?(b.pair=!0,b.keyCol=C.indentation(),"atom"):b.pair&&C.match(/^:\s*/)?(b.pairStart=!0,"meta"):(b.pairStart=!1,b.escaped=S=="\\",C.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),o.defineMIME("text/x-yaml","yaml"),o.defineMIME("text/yaml","yaml")})});var $d={};function qd(o){for(var p;(p=Md.exec(o))!==null;){var v=p[0];if(v.indexOf("target=")===-1){var C=v.replace(/>$/,' target="_blank">');o=o.replace(v,C)}}return o}function Fd(o){for(var p=new DOMParser,v=p.parseFromString(o,"text/html"),C=v.getElementsByTagName("li"),b=0;b0){for(var d=document.createElement("i"),k=0;k=0&&(y=s.getLineHandle(d),!v(y));d--);var W=s.getTokenAt({line:d,ch:1}),E=C(W).fencedChars,N,G,J,re;v(s.getLineHandle(h.line))?(N="",G=h.line):v(s.getLineHandle(h.line-1))?(N="",G=h.line-1):(N=E+` +`,G=h.line),v(s.getLineHandle(g.line))?(J="",re=g.line,g.ch===0&&(re+=1)):g.ch!==0&&v(s.getLineHandle(g.line+1))?(J="",re=g.line+1):(J=E+` +`,re=g.line+1),g.ch===0&&(re-=1),s.operation(function(){s.replaceRange(J,{line:re,ch:0},{line:re+(J?0:1),ch:0}),s.replaceRange(N,{line:G,ch:0},{line:G+(N?0:1),ch:0})}),s.setSelection({line:G+(N?1:0),ch:0},{line:re+(N?1:-1),ch:0}),s.focus()}else{var q=h.line;if(v(s.getLineHandle(h.line))&&(b(s,h.line+1)==="fenced"?(d=h.line,q=h.line+1):(k=h.line,q=h.line-1)),d===void 0)for(d=q;d>=0&&(y=s.getLineHandle(d),!v(y));d--);if(k===void 0)for(z=s.lineCount(),k=q;k=0;d--)if(y=s.getLineHandle(d),!y.text.match(/^\s*$/)&&b(s,d,y)!=="indented"){d+=1;break}for(z=s.lineCount(),k=h.line;k\s+/,"unordered-list":C,"ordered-list":C},T=function(z,M){var w={quote:">","unordered-list":v,"ordered-list":"%%i."};return w[z].replace("%%i",M)},y=function(z,M){var w={quote:">","unordered-list":"\\"+v,"ordered-list":"\\d+."},W=new RegExp(w[z]);return M&&W.test(M)},c=function(z,M,w){var W=C.exec(M),E=T(z,d);return W!==null?(y(z,W[2])&&(E=""),M=W[1]+E+W[3]+M.replace(b,"").replace(g[z],"$1")):w==!1&&(M=E+" "+M),M},d=1,k=s.line;k<=h.line;k++)(function(z){var M=o.getLine(z);S[p]?M=M.replace(g[p],"$1"):(p=="unordered-list"&&(M=c("ordered-list",M,!0)),M=c(p,M,!1),d+=1),o.replaceRange(M,{line:z,ch:0},{line:z,ch:99999999999999})})(k);o.focus()}}function xc(o,p,v,C){if(!(!o.codemirror||o.isPreviewActive())){var b=o.codemirror,S=Tr(b),s=S[p];if(!s){Rr(b,s,v,C);return}var h=b.getCursor("start"),g=b.getCursor("end"),T=b.getLine(h.line),y=T.slice(0,h.ch),c=T.slice(h.ch);p=="link"?y=y.replace(/(.*)[^!]\[/,"$1"):p=="image"&&(y=y.replace(/(.*)!\[$/,"$1")),c=c.replace(/]\(.*?\)/,""),b.replaceRange(y+c,{line:h.line,ch:0},{line:h.line,ch:99999999999999}),h.ch-=v[0].length,h!==g&&(g.ch-=v[0].length),b.setSelection(h,g),b.focus()}}function sa(o,p,v,C){if(!(!o.codemirror||o.isPreviewActive())){C=typeof C>"u"?v:C;var b=o.codemirror,S=Tr(b),s,h=v,g=C,T=b.getCursor("start"),y=b.getCursor("end");S[p]?(s=b.getLine(T.line),h=s.slice(0,T.ch),g=s.slice(T.ch),p=="bold"?(h=h.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),g=g.replace(/(\*\*|__)/,"")):p=="italic"?(h=h.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),g=g.replace(/(\*|_)/,"")):p=="strikethrough"&&(h=h.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),g=g.replace(/(\*\*|~~)/,"")),b.replaceRange(h+g,{line:T.line,ch:0},{line:T.line,ch:99999999999999}),p=="bold"||p=="strikethrough"?(T.ch-=2,T!==y&&(y.ch-=2)):p=="italic"&&(T.ch-=1,T!==y&&(y.ch-=1))):(s=b.getSelection(),p=="bold"?(s=s.split("**").join(""),s=s.split("__").join("")):p=="italic"?(s=s.split("*").join(""),s=s.split("_").join("")):p=="strikethrough"&&(s=s.split("~~").join("")),b.replaceSelection(h+s+g),T.ch+=v.length,y.ch=T.ch+s.length),b.setSelection(T,y),b.focus()}}function Pd(o){if(!o.getWrapperElement().lastChild.classList.contains("editor-preview-active"))for(var p=o.getCursor("start"),v=o.getCursor("end"),C,b=p.line;b<=v.line;b++)C=o.getLine(b),C=C.replace(/^[ ]*([# ]+|\*|-|[> ]+|[0-9]+(.|\)))[ ]*/,""),o.replaceRange(C,{line:b,ch:0},{line:b,ch:99999999999999})}function Fi(o,p){if(Math.abs(o)<1024)return""+o+p[0];var v=0;do o/=1024,++v;while(Math.abs(o)>=1024&&v=19968?C+=v[b].length:C+=1;return C}function Te(o){o=o||{},o.parent=this;var p=!0;if(o.autoDownloadFontAwesome===!1&&(p=!1),o.autoDownloadFontAwesome!==!0)for(var v=document.styleSheets,C=0;C-1&&(p=!1);if(p){var b=document.createElement("link");b.rel="stylesheet",b.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(b)}if(o.element)this.element=o.element;else if(o.element===null){console.log("EasyMDE: Error. No element was found.");return}if(o.toolbar===void 0){o.toolbar=[];for(var S in Pr)Object.prototype.hasOwnProperty.call(Pr,S)&&(S.indexOf("separator-")!=-1&&o.toolbar.push("|"),(Pr[S].default===!0||o.showIcons&&o.showIcons.constructor===Array&&o.showIcons.indexOf(S)!=-1)&&o.toolbar.push(S))}if(Object.prototype.hasOwnProperty.call(o,"previewClass")||(o.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(o,"status")||(o.status=["autosave","lines","words","cursor"],o.uploadImage&&o.status.unshift("upload-image")),o.previewRender||(o.previewRender=function(h){return this.parent.markdown(h)}),o.parsingConfig=fr({highlightFormatting:!0},o.parsingConfig||{}),o.insertTexts=fr({},jd,o.insertTexts||{}),o.promptTexts=fr({},Rd,o.promptTexts||{}),o.blockStyles=fr({},Bd,o.blockStyles||{}),o.autosave!=null&&(o.autosave.timeFormat=fr({},Hd,o.autosave.timeFormat||{})),o.iconClassMap=fr({},et,o.iconClassMap||{}),o.shortcuts=fr({},Ad,o.shortcuts||{}),o.maxHeight=o.maxHeight||void 0,o.direction=o.direction||"ltr",typeof o.maxHeight<"u"?o.minHeight=o.maxHeight:o.minHeight=o.minHeight||"300px",o.errorCallback=o.errorCallback||function(h){alert(h)},o.uploadImage=o.uploadImage||!1,o.imageMaxSize=o.imageMaxSize||2097152,o.imageAccept=o.imageAccept||"image/png, image/jpeg, image/gif, image/avif",o.imageTexts=fr({},Wd,o.imageTexts||{}),o.errorMessages=fr({},Ud,o.errorMessages||{}),o.imagePathAbsolute=o.imagePathAbsolute||!1,o.imageCSRFName=o.imageCSRFName||"csrfmiddlewaretoken",o.imageCSRFHeader=o.imageCSRFHeader||!1,o.autosave!=null&&o.autosave.unique_id!=null&&o.autosave.unique_id!=""&&(o.autosave.uniqueId=o.autosave.unique_id),o.overlayMode&&o.overlayMode.combine===void 0&&(o.overlayMode.combine=!0),this.options=o,this.render(),o.initialValue&&(!this.options.autosave||this.options.autosave.foundSavedValue!==!0)&&this.value(o.initialValue),o.uploadImage){var s=this;this.codemirror.on("dragenter",function(h,g){s.updateStatusBar("upload-image",s.options.imageTexts.sbOnDragEnter),g.stopPropagation(),g.preventDefault()}),this.codemirror.on("dragend",function(h,g){s.updateStatusBar("upload-image",s.options.imageTexts.sbInit),g.stopPropagation(),g.preventDefault()}),this.codemirror.on("dragleave",function(h,g){s.updateStatusBar("upload-image",s.options.imageTexts.sbInit),g.stopPropagation(),g.preventDefault()}),this.codemirror.on("dragover",function(h,g){s.updateStatusBar("upload-image",s.options.imageTexts.sbOnDragEnter),g.stopPropagation(),g.preventDefault()}),this.codemirror.on("drop",function(h,g){g.stopPropagation(),g.preventDefault(),o.imageUploadFunction?s.uploadImagesUsingCustomFunction(o.imageUploadFunction,g.dataTransfer.files):s.uploadImages(g.dataTransfer.files)}),this.codemirror.on("paste",function(h,g){o.imageUploadFunction?s.uploadImagesUsingCustomFunction(o.imageUploadFunction,g.clipboardData.files):s.uploadImages(g.clipboardData.files)})}}function kc(){if(typeof localStorage=="object")try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch{return!1}else return!1;return!0}var mc,Md,Vn,Ad,Dd,ra,hc,et,Pr,jd,Rd,Hd,Bd,Wd,Ud,wc=Cd(()=>{mc=/Mac/.test(navigator.platform),Md=new RegExp(/()+?/g),Vn={toggleBold:Ii,toggleItalic:Ni,drawLink:Gi,toggleHeadingSmaller:Jn,toggleHeadingBigger:Ri,drawImage:Zi,toggleBlockquote:ji,toggleOrderedList:$i,toggleUnorderedList:Ui,toggleCodeBlock:Pi,togglePreview:Ji,toggleStrikethrough:Oi,toggleHeading1:Hi,toggleHeading2:Bi,toggleHeading3:Wi,toggleHeading4:na,toggleHeading5:ia,toggleHeading6:oa,cleanBlock:Ki,drawTable:Xi,drawHorizontalRule:Yi,undo:Qi,redo:Vi,toggleSideBySide:bn,toggleFullScreen:jr},Ad={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",toggleHeading1:"Ctrl+Alt+1",toggleHeading2:"Ctrl+Alt+2",toggleHeading3:"Ctrl+Alt+3",toggleHeading4:"Ctrl+Alt+4",toggleHeading5:"Ctrl+Alt+5",toggleHeading6:"Ctrl+Alt+6",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},Dd=function(o){for(var p in Vn)if(Vn[p]===o)return p;return null},ra=function(){var o=!1;return function(p){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(p)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(p.substr(0,4)))&&(o=!0)}(navigator.userAgent||navigator.vendor||window.opera),o};hc="";et={bold:"fa fa-bold",italic:"fa fa-italic",strikethrough:"fa fa-strikethrough",heading:"fa fa-header fa-heading","heading-smaller":"fa fa-header fa-heading header-smaller","heading-bigger":"fa fa-header fa-heading header-bigger","heading-1":"fa fa-header fa-heading header-1","heading-2":"fa fa-header fa-heading header-2","heading-3":"fa fa-header fa-heading header-3",code:"fa fa-code",quote:"fa fa-quote-left","ordered-list":"fa fa-list-ol","unordered-list":"fa fa-list-ul","clean-block":"fa fa-eraser",link:"fa fa-link",image:"fa fa-image","upload-image":"fa fa-image",table:"fa fa-table","horizontal-rule":"fa fa-minus",preview:"fa fa-eye","side-by-side":"fa fa-columns",fullscreen:"fa fa-arrows-alt",guide:"fa fa-question-circle",undo:"fa fa-undo",redo:"fa fa-repeat fa-redo"},Pr={bold:{name:"bold",action:Ii,className:et.bold,title:"Bold",default:!0},italic:{name:"italic",action:Ni,className:et.italic,title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:Oi,className:et.strikethrough,title:"Strikethrough"},heading:{name:"heading",action:Jn,className:et.heading,title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:Jn,className:et["heading-smaller"],title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:Ri,className:et["heading-bigger"],title:"Bigger Heading"},"heading-1":{name:"heading-1",action:Hi,className:et["heading-1"],title:"Big Heading"},"heading-2":{name:"heading-2",action:Bi,className:et["heading-2"],title:"Medium Heading"},"heading-3":{name:"heading-3",action:Wi,className:et["heading-3"],title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:Pi,className:et.code,title:"Code"},quote:{name:"quote",action:ji,className:et.quote,title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:Ui,className:et["unordered-list"],title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:$i,className:et["ordered-list"],title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:Ki,className:et["clean-block"],title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:Gi,className:et.link,title:"Create Link",default:!0},image:{name:"image",action:Zi,className:et.image,title:"Insert Image",default:!0},"upload-image":{name:"upload-image",action:aa,className:et["upload-image"],title:"Import an image"},table:{name:"table",action:Xi,className:et.table,title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:Yi,className:et["horizontal-rule"],title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:Ji,className:et.preview,noDisable:!0,title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:bn,className:et["side-by-side"],noDisable:!0,noMobile:!0,title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:jr,className:et.fullscreen,noDisable:!0,noMobile:!0,title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://www.markdownguide.org/basic-syntax/",className:et.guide,noDisable:!0,title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:Qi,className:et.undo,noDisable:!0,title:"Undo"},redo:{name:"redo",action:Vi,className:et.redo,noDisable:!0,title:"Redo"}},jd={link:["[","](#url#)"],image:["![","](#url#)"],uploadedImage:["![](#url#)",""],table:["",` + +| Column 1 | Column 2 | Column 3 | +| -------- | -------- | -------- | +| Text | Text | Text | + +`],horizontalRule:["",` + +----- + +`]},Rd={link:"URL for the link:",image:"URL of the image:"},Hd={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},Bd={bold:"**",code:"```",italic:"*"},Wd={sbInit:"Attach files by drag and dropping or pasting from clipboard.",sbOnDragEnter:"Drop image to upload it.",sbOnDrop:"Uploading image #images_names#...",sbProgress:"Uploading #file_name#: #progress#%",sbOnUploaded:"Uploaded #image_name#",sizeUnits:" B, KB, MB"},Ud={noFileGiven:"You must select a file.",typeNotAllowed:"This image type is not allowed.",fileTooLarge:`Image #image_name# is too big (#image_size#). +Maximum file size is #image_max_size#.`,importError:"Something went wrong when uploading the image #image_name#."};Te.prototype.uploadImages=function(o,p,v){if(o.length!==0){for(var C=[],b=0;b=0;re--){let q=G[re];if(q&&q.tagName==="INPUT"&&!q.closest(".editor-toolbar")){q.focus();break}}}}for(var s in p.shortcuts)p.shortcuts[s]!==null&&Vn[s]!==null&&function(E){C[vc(p.shortcuts[E])]=function(){var N=Vn[E];typeof N=="function"?N(v):typeof N=="string"&&window.open(N,"_blank")}}(s);C.Enter="newlineAndIndentContinueMarkdownList",C.Tab=E=>{let N=E.getSelection();N&&N.length>0?E.execCommand("indentMore"):b(E)},C["Shift-Tab"]=E=>{let N=E.getSelection();N&&N.length>0?E.execCommand("indentLess"):S(E)},C.Esc=function(E){E.getOption("fullScreen")&&jr(v)},this.documentOnKeyDown=function(E){E=E||window.event,E.keyCode==27&&v.codemirror.getOption("fullScreen")&&jr(v)},document.addEventListener("keydown",this.documentOnKeyDown,!1);var h,g;p.overlayMode?(CodeMirror.defineMode("overlay-mode",function(E){return CodeMirror.overlayMode(CodeMirror.getMode(E,p.spellChecker!==!1?"spell-checker":"gfm"),p.overlayMode.mode,p.overlayMode.combine)}),h="overlay-mode",g=p.parsingConfig,g.gitHubSpice=!1):(h=p.parsingConfig,h.name="gfm",h.gitHubSpice=!1),p.spellChecker!==!1&&(h="spell-checker",g=p.parsingConfig,g.name="gfm",g.gitHubSpice=!1,typeof p.spellChecker=="function"?p.spellChecker({codeMirrorInstance:CodeMirror}):CodeMirrorSpellChecker({codeMirrorInstance:CodeMirror}));function T(E,N,G){return{addNew:!1}}if(CodeMirror.getMode("php").mime="text/x-php",this.codemirror=CodeMirror.fromTextArea(o,{mode:h,backdrop:g,theme:p.theme!=null?p.theme:"easymde",tabSize:p.tabSize!=null?p.tabSize:2,indentUnit:p.tabSize!=null?p.tabSize:2,indentWithTabs:p.indentWithTabs!==!1,lineNumbers:p.lineNumbers===!0,autofocus:p.autofocus===!0,extraKeys:C,direction:p.direction,lineWrapping:p.lineWrapping!==!1,allowDropFileTypes:["text/plain"],placeholder:p.placeholder||o.getAttribute("placeholder")||"",styleSelectedText:p.styleSelectedText!=null?p.styleSelectedText:!ra(),scrollbarStyle:p.scrollbarStyle!=null?p.scrollbarStyle:"native",configureMouse:T,inputStyle:p.inputStyle!=null?p.inputStyle:ra()?"contenteditable":"textarea",spellcheck:p.nativeSpellcheck!=null?p.nativeSpellcheck:!0,autoRefresh:p.autoRefresh!=null?p.autoRefresh:!1}),this.codemirror.getScrollerElement().style.minHeight=p.minHeight,typeof p.maxHeight<"u"&&(this.codemirror.getScrollerElement().style.height=p.maxHeight),p.forceSync===!0){var y=this.codemirror;y.on("change",function(){y.save()})}this.gui={};var c=document.createElement("div");c.classList.add("EasyMDEContainer"),c.setAttribute("role","application");var d=this.codemirror.getWrapperElement();d.parentNode.insertBefore(c,d),c.appendChild(d),p.toolbar!==!1&&(this.gui.toolbar=this.createToolbar()),p.status!==!1&&(this.gui.statusbar=this.createStatusbar()),p.autosave!=null&&p.autosave.enabled===!0&&(this.autosave(),this.codemirror.on("change",function(){clearTimeout(v._autosave_timeout),v._autosave_timeout=setTimeout(function(){v.autosave()},v.options.autosave.submit_delay||v.options.autosave.delay||1e3)}));function k(E,N){var G,J=window.getComputedStyle(document.querySelector(".CodeMirror-sizer")).width.replace("px","");return E=2){var J=G[1];if(p.imagesPreviewHandler){var re=p.imagesPreviewHandler(G[1]);typeof re=="string"&&(J=re)}if(window.EMDEimagesCache[J])M(N,window.EMDEimagesCache[J]);else{var q=document.createElement("img");q.onload=function(){window.EMDEimagesCache[J]={naturalWidth:q.naturalWidth,naturalHeight:q.naturalHeight,url:J},M(N,window.EMDEimagesCache[J])},q.src=J}}}})}this.codemirror.on("update",function(){w()}),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element,(p.autofocus===!0||o.autofocus)&&this.codemirror.focus();var W=this.codemirror;setTimeout(function(){W.refresh()}.bind(W),0)};Te.prototype.cleanup=function(){document.removeEventListener("keydown",this.documentOnKeyDown)};Te.prototype.autosave=function(){if(kc()){var o=this;if(this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to use the autosave feature");return}this.options.autosave.binded!==!0&&(o.element.form!=null&&o.element.form!=null&&o.element.form.addEventListener("submit",function(){clearTimeout(o.autosaveTimeoutId),o.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+o.options.autosave.uniqueId)}),this.options.autosave.binded=!0),this.options.autosave.loaded!==!0&&(typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)=="string"&&localStorage.getItem("smde_"+this.options.autosave.uniqueId)!=""&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0);var p=o.value();p!==""?localStorage.setItem("smde_"+this.options.autosave.uniqueId,p):localStorage.removeItem("smde_"+this.options.autosave.uniqueId);var v=document.getElementById("autosaved");if(v!=null&&v!=null&&v!=""){var C=new Date,b=new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale,"en-US"],this.options.autosave.timeFormat.format).format(C),S=this.options.autosave.text==null?"Autosaved: ":this.options.autosave.text;v.innerHTML=S+b}}else console.log("EasyMDE: localStorage not available, cannot autosave")};Te.prototype.clearAutosavedValue=function(){if(kc()){if(this.options.autosave==null||this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to clear the autosave value");return}localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("EasyMDE: localStorage not available, cannot autosave")};Te.prototype.openBrowseFileWindow=function(o,p){var v=this,C=this.gui.toolbar.getElementsByClassName("imageInput")[0];C.click();function b(S){v.options.imageUploadFunction?v.uploadImagesUsingCustomFunction(v.options.imageUploadFunction,S.target.files):v.uploadImages(S.target.files,o,p),C.removeEventListener("change",b)}C.addEventListener("change",b)};Te.prototype.uploadImage=function(o,p,v){var C=this;p=p||function(T){yc(C,T)};function b(g){C.updateStatusBar("upload-image",g),setTimeout(function(){C.updateStatusBar("upload-image",C.options.imageTexts.sbInit)},1e4),v&&typeof v=="function"&&v(g),C.options.errorCallback(g)}function S(g){var T=C.options.imageTexts.sizeUnits.split(",");return g.replace("#image_name#",o.name).replace("#image_size#",Fi(o.size,T)).replace("#image_max_size#",Fi(C.options.imageMaxSize,T))}if(o.size>this.options.imageMaxSize){b(S(this.options.errorMessages.fileTooLarge));return}var s=new FormData;s.append("image",o),C.options.imageCSRFToken&&!C.options.imageCSRFHeader&&s.append(C.options.imageCSRFName,C.options.imageCSRFToken);var h=new XMLHttpRequest;h.upload.onprogress=function(g){if(g.lengthComputable){var T=""+Math.round(g.loaded*100/g.total);C.updateStatusBar("upload-image",C.options.imageTexts.sbProgress.replace("#file_name#",o.name).replace("#progress#",T))}},h.open("POST",this.options.imageUploadEndpoint),C.options.imageCSRFToken&&C.options.imageCSRFHeader&&h.setRequestHeader(C.options.imageCSRFName,C.options.imageCSRFToken),h.onload=function(){try{var g=JSON.parse(this.responseText)}catch{console.error("EasyMDE: The server did not return a valid json."),b(S(C.options.errorMessages.importError));return}this.status===200&&g&&!g.error&&g.data&&g.data.filePath?p((C.options.imagePathAbsolute?"":window.location.origin+"/")+g.data.filePath):g.error&&g.error in C.options.errorMessages?b(S(C.options.errorMessages[g.error])):g.error?b(S(g.error)):(console.error("EasyMDE: Received an unexpected response after uploading the image."+this.status+" ("+this.statusText+")"),b(S(C.options.errorMessages.importError)))},h.onerror=function(g){console.error("EasyMDE: An unexpected error occurred when trying to upload the image."+g.target.status+" ("+g.target.statusText+")"),b(C.options.errorMessages.importError)},h.send(s)};Te.prototype.uploadImageUsingCustomFunction=function(o,p){var v=this;function C(s){yc(v,s)}function b(s){var h=S(s);v.updateStatusBar("upload-image",h),setTimeout(function(){v.updateStatusBar("upload-image",v.options.imageTexts.sbInit)},1e4),v.options.errorCallback(h)}function S(s){var h=v.options.imageTexts.sizeUnits.split(",");return s.replace("#image_name#",p.name).replace("#image_size#",Fi(p.size,h)).replace("#image_max_size#",Fi(v.options.imageMaxSize,h))}o.apply(this,[p,C,b])};Te.prototype.setPreviewMaxHeight=function(){var o=this.codemirror,p=o.getWrapperElement(),v=p.nextSibling,C=parseInt(window.getComputedStyle(p).paddingTop),b=parseInt(window.getComputedStyle(p).borderTopWidth),S=parseInt(this.options.maxHeight),s=S+C*2+b*2,h=s.toString()+"px";v.style.height=h};Te.prototype.createSideBySide=function(){var o=this.codemirror,p=o.getWrapperElement(),v=p.nextSibling;if(!v||!v.classList.contains("editor-preview-side")){if(v=document.createElement("div"),v.className="editor-preview-side",this.options.previewClass)if(Array.isArray(this.options.previewClass))for(var C=0;C{try{let z=k[k.length-1];if(z.origin==="+input"){let M="(https://)",w=z.text[z.text.length-1];if(w.endsWith(M)&&w!=="[]"+M){let W=z.from,E=z.to,G=z.text.length>1?0:W.ch;setTimeout(()=>{d.setSelection({line:E.line,ch:G+w.lastIndexOf("(")+1},{line:E.line,ch:G+w.lastIndexOf(")")})},25)}}}catch{}}),this.editor.codemirror.on("change",Alpine.debounce(()=>{this.editor&&(this.state=this.editor.value(),p&&this.$wire.call("$refresh"))},C??300)),v&&this.editor.codemirror.on("blur",()=>this.$wire.call("$refresh")),this.$watch("state",()=>{this.editor&&(this.editor.codemirror.hasFocus()||Alpine.raw(this.editor).value(this.state??""))}),h&&h(this)},destroy:function(){this.editor.cleanup(),this.editor=null},getToolbar:function(){let d=[];return y.includes("bold")&&d.push({name:"bold",action:EasyMDE.toggleBold,title:T.toolbar_buttons?.bold}),y.includes("italic")&&d.push({name:"italic",action:EasyMDE.toggleItalic,title:T.toolbar_buttons?.italic}),y.includes("strike")&&d.push({name:"strikethrough",action:EasyMDE.toggleStrikethrough,title:T.toolbar_buttons?.strike}),y.includes("link")&&d.push({name:"link",action:EasyMDE.drawLink,title:T.toolbar_buttons?.link}),["bold","italic","strike","link"].some(k=>y.includes(k))&&["heading"].some(k=>y.includes(k))&&d.push("|"),y.includes("heading")&&d.push({name:"heading",action:EasyMDE.toggleHeadingSmaller,title:T.toolbar_buttons?.heading}),["heading"].some(k=>y.includes(k))&&["blockquote","codeBlock","bulletList","orderedList"].some(k=>y.includes(k))&&d.push("|"),y.includes("blockquote")&&d.push({name:"quote",action:EasyMDE.toggleBlockquote,title:T.toolbar_buttons?.blockquote}),y.includes("codeBlock")&&d.push({name:"code",action:EasyMDE.toggleCodeBlock,title:T.toolbar_buttons?.code_block}),y.includes("bulletList")&&d.push({name:"unordered-list",action:EasyMDE.toggleUnorderedList,title:T.toolbar_buttons?.bullet_list}),y.includes("orderedList")&&d.push({name:"ordered-list",action:EasyMDE.toggleOrderedList,title:T.toolbar_buttons?.ordered_list}),["blockquote","codeBlock","bulletList","orderedList"].some(k=>y.includes(k))&&["table","attachFiles"].some(k=>y.includes(k))&&d.push("|"),y.includes("table")&&d.push({name:"table",action:EasyMDE.drawTable,title:T.toolbar_buttons?.table}),y.includes("attachFiles")&&d.push({name:"upload-image",action:EasyMDE.drawUploadedImage,title:T.toolbar_buttons?.attach_files}),["table","attachFiles"].some(k=>y.includes(k))&&["undo","redo"].some(k=>y.includes(k))&&d.push("|"),y.includes("undo")&&d.push({name:"undo",action:EasyMDE.undo,title:T.toolbar_buttons?.undo}),y.includes("redo")&&d.push({name:"redo",action:EasyMDE.redo,title:T.toolbar_buttons?.redo}),d}}}export{Kd as default}; diff --git a/public/js/filament/forms/components/rich-editor.js b/public/js/filament/forms/components/rich-editor.js new file mode 100644 index 000000000..a07fd6cb8 --- /dev/null +++ b/public/js/filament/forms/components/rich-editor.js @@ -0,0 +1,150 @@ +var po="2.1.15",Rt="[data-trix-attachment]",mi={preview:{presentation:"gallery",caption:{name:!0,size:!0}},file:{caption:{size:!0}}},U={default:{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,htmlAttributes:["language"],text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test(i){return Gi(i.parentNode)===U[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test(i){return Gi(i.parentNode)===U[this.listAttribute].tagName}},attachmentGallery:{tagName:"div",exclusive:!0,terminal:!0,parse:!1,group:!1}},Gi=i=>{var t;return i==null||(t=i.tagName)===null||t===void 0?void 0:t.toLowerCase()},Yi=navigator.userAgent.match(/android\s([0-9]+.*Chrome)/i),Sn=Yi&&parseInt(Yi[1]),xe={composesExistingText:/Android.*Chrome/.test(navigator.userAgent),recentAndroid:Sn&&Sn>12,samsungAndroid:Sn&&navigator.userAgent.match(/Android.*SM-/),forcesObjectResizing:/Trident.*rv:11/.test(navigator.userAgent),supportsInputEvents:typeof InputEvent<"u"&&["data","getTargetRanges","inputType"].every(i=>i in InputEvent.prototype)},Lr={ADD_ATTR:["language"],SAFE_FOR_XML:!1,RETURN_DOM:!0},m={attachFiles:"Attach Files",bold:"Bold",bullets:"Bullets",byte:"Byte",bytes:"Bytes",captionPlaceholder:"Add a caption\u2026",code:"Code",heading1:"Heading",indent:"Increase Level",italic:"Italic",link:"Link",numbers:"Numbers",outdent:"Decrease Level",quote:"Quote",redo:"Redo",remove:"Remove",strike:"Strikethrough",undo:"Undo",unlink:"Unlink",url:"URL",urlPlaceholder:"Enter a URL\u2026",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"},fo=[m.bytes,m.KB,m.MB,m.GB,m.TB,m.PB],Dr={prefix:"IEC",precision:2,formatter(i){switch(i){case 0:return"0 ".concat(m.bytes);case 1:return"1 ".concat(m.byte);default:let t;this.prefix==="SI"?t=1e3:this.prefix==="IEC"&&(t=1024);let e=Math.floor(Math.log(i)/Math.log(t)),n=(i/Math.pow(t,e)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"");return"".concat(n," ").concat(fo[e])}}},ln="\uFEFF",ft="\xA0",Nr=function(i){for(let t in i){let e=i[t];this[t]=e}return this},pi=document.documentElement,bo=pi.matches,S=function(i){let{onElement:t,matchingSelector:e,withCallback:n,inPhase:r,preventDefault:o,times:s}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=t||pi,c=e,u=r==="capturing",d=function(C){s!=null&&--s==0&&d.destroy();let T=vt(C.target,{matchingSelector:c});T!=null&&(n?.call(T,C,T),o&&C.preventDefault())};return d.destroy=()=>l.removeEventListener(i,d,u),l.addEventListener(i,d,u),d},de=function(i){let{onElement:t,bubbles:e,cancelable:n,attributes:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t??pi;e=e!==!1,n=n!==!1;let s=document.createEvent("Events");return s.initEvent(i,e,n),r!=null&&Nr.call(s,r),o.dispatchEvent(s)},Ir=function(i,t){if(i?.nodeType===1)return bo.call(i,t)},vt=function(i){let{matchingSelector:t,untilNode:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(;i&&i.nodeType!==Node.ELEMENT_NODE;)i=i.parentNode;if(i!=null){if(t==null)return i;if(i.closest&&e==null)return i.closest(t);for(;i&&i!==e;){if(Ir(i,t))return i;i=i.parentNode}}},fi=i=>document.activeElement!==i&&kt(i,document.activeElement),kt=function(i,t){if(i&&t)for(;t;){if(t===i)return!0;t=t.parentNode}},kn=function(i){var t;if((t=i)===null||t===void 0||!t.parentNode)return;let e=0;for(i=i.previousSibling;i;)e++,i=i.previousSibling;return e},At=i=>{var t;return i==null||(t=i.parentNode)===null||t===void 0?void 0:t.removeChild(i)},je=function(i){let{onlyNodesOfType:t,usingFilter:e,expandEntityReferences:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(()=>{switch(t){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}})();return document.createTreeWalker(i,r,e??null,n===!0)},W=i=>{var t;return i==null||(t=i.tagName)===null||t===void 0?void 0:t.toLowerCase()},p=function(i){let t,e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof i=="object"?(n=i,i=n.tagName):n={attributes:n};let r=document.createElement(i);if(n.editable!=null&&(n.attributes==null&&(n.attributes={}),n.attributes.contenteditable=n.editable),n.attributes)for(t in n.attributes)e=n.attributes[t],r.setAttribute(t,e);if(n.style)for(t in n.style)e=n.style[t],r.style[t]=e;if(n.data)for(t in n.data)e=n.data[t],r.dataset[t]=e;return n.className&&n.className.split(" ").forEach(o=>{r.classList.add(o)}),n.textContent&&(r.textContent=n.textContent),n.childNodes&&[].concat(n.childNodes).forEach(o=>{r.appendChild(o)}),r},re,ge=function(){if(re!=null)return re;re=[];for(let i in U){let t=U[i];t.tagName&&re.push(t.tagName)}return re},Rn=i=>Vt(i?.firstChild),$i=function(i){let{strict:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{strict:!0};return t?Vt(i):Vt(i)||!Vt(i.firstChild)&&function(e){return ge().includes(W(e))&&!ge().includes(W(e.firstChild))}(i)},Vt=i=>vo(i)&&i?.data==="block",vo=i=>i?.nodeType===Node.COMMENT_NODE,zt=function(i){let{name:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i)return me(i)?i.data===ln?!t||i.parentNode.dataset.trixCursorTarget===t:void 0:zt(i.firstChild)},Tt=i=>Ir(i,Rt),Or=i=>me(i)&&i?.data==="",me=i=>i?.nodeType===Node.TEXT_NODE,bi={level2Enabled:!0,getLevel(){return this.level2Enabled&&xe.supportsInputEvents?2:0},pickFiles(i){let t=p("input",{type:"file",multiple:!0,hidden:!0,id:this.fileInputId});t.addEventListener("change",()=>{i(t.files),At(t)}),At(document.getElementById(this.fileInputId)),document.body.appendChild(t),t.click()}},Me={removeBlankTableCells:!1,tableCellSeparator:" | ",tableRowSeparator:` +`},Dt={bold:{tagName:"strong",inheritable:!0,parser(i){let t=window.getComputedStyle(i);return t.fontWeight==="bold"||t.fontWeight>=600}},italic:{tagName:"em",inheritable:!0,parser:i=>window.getComputedStyle(i).fontStyle==="italic"},href:{groupTagName:"a",parser(i){let t="a:not(".concat(Rt,")"),e=i.closest(t);if(e)return e.getAttribute("href")}},strike:{tagName:"del",inheritable:!0},frozen:{style:{backgroundColor:"highlight"}}},Fr={getDefaultHTML:()=>`
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
`)},$n={interval:5e3},Ce=Object.freeze({__proto__:null,attachments:mi,blockAttributes:U,browser:xe,css:{attachment:"attachment",attachmentCaption:"attachment__caption",attachmentCaptionEditor:"attachment__caption-editor",attachmentMetadata:"attachment__metadata",attachmentMetadataContainer:"attachment__metadata-container",attachmentName:"attachment__name",attachmentProgress:"attachment__progress",attachmentSize:"attachment__size",attachmentToolbar:"attachment__toolbar",attachmentGallery:"attachment-gallery"},dompurify:Lr,fileSize:Dr,input:bi,keyNames:{8:"backspace",9:"tab",13:"return",27:"escape",37:"left",39:"right",46:"delete",68:"d",72:"h",79:"o"},lang:m,parser:Me,textAttributes:Dt,toolbar:Fr,undo:$n}),R=class{static proxyMethod(t){let{name:e,toMethod:n,toProperty:r,optional:o}=Ao(t);this.prototype[e]=function(){let s,l;var c,u;return n?l=o?(c=this[n])===null||c===void 0?void 0:c.call(this):this[n]():r&&(l=this[r]),o?(s=(u=l)===null||u===void 0?void 0:u[e],s?Xi.call(s,l,arguments):void 0):(s=l[e],Xi.call(s,l,arguments))}}},Ao=function(i){let t=i.match(yo);if(!t)throw new Error("can't parse @proxyMethod expression: ".concat(i));let e={name:t[4]};return t[2]!=null?e.toMethod=t[1]:e.toProperty=t[1],t[3]!=null&&(e.optional=!0),e},{apply:Xi}=Function.prototype,yo=new RegExp("^(.+?)(\\(\\))?(\\?)?\\.(.+?)$"),Tn,wn,Ln,Nt=class extends R{static box(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t instanceof this?t:this.fromUCS2String(t?.toString())}static fromUCS2String(t){return new this(t,Xn(t))}static fromCodepoints(t){return new this(Zn(t),t)}constructor(t,e){super(...arguments),this.ucs2String=t,this.codepoints=e,this.length=this.codepoints.length,this.ucs2Length=this.ucs2String.length}offsetToUCS2Offset(t){return Zn(this.codepoints.slice(0,Math.max(0,t))).length}offsetFromUCS2Offset(t){return Xn(this.ucs2String.slice(0,Math.max(0,t))).length}slice(){return this.constructor.fromCodepoints(this.codepoints.slice(...arguments))}charAt(t){return this.slice(t,t+1)}isEqualTo(t){return this.constructor.box(t).ucs2String===this.ucs2String}toJSON(){return this.ucs2String}getCacheKey(){return this.ucs2String}toString(){return this.ucs2String}},xo=((Tn=Array.from)===null||Tn===void 0?void 0:Tn.call(Array,"\u{1F47C}").length)===1,Co=((wn=" ".codePointAt)===null||wn===void 0?void 0:wn.call(" ",0))!=null,Eo=((Ln=String.fromCodePoint)===null||Ln===void 0?void 0:Ln.call(String,32,128124))===" \u{1F47C}",Xn,Zn;Xn=xo&&Co?i=>Array.from(i).map(t=>t.codePointAt(0)):function(i){let t=[],e=0,{length:n}=i;for(;eString.fromCodePoint(...Array.from(i||[])):function(i){return(()=>{let t=[];return Array.from(i).forEach(e=>{let n="";e>65535&&(e-=65536,n+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t.push(n+String.fromCharCode(e))}),t})().join("")};var So=0,ht=class extends R{static fromJSONString(t){return this.fromJSON(JSON.parse(t))}constructor(){super(...arguments),this.id=++So}hasSameConstructorAs(t){return this.constructor===t?.constructor}isEqualTo(t){return this===t}inspect(){let t=[],e=this.contentsForInspection()||{};for(let n in e){let r=e[n];t.push("".concat(n,"=").concat(r))}return"#<".concat(this.constructor.name,":").concat(this.id).concat(t.length?" ".concat(t.join(", ")):"",">")}contentsForInspection(){}toJSONString(){return JSON.stringify(this)}toUTF16String(){return Nt.box(this)}getCacheKey(){return this.id.toString()}},It=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(i.length!==t.length)return!1;for(let e=0;e1?e-1:0),r=1;r(Dn||(Dn=wo().concat(To())),Dn),L=i=>U[i],To=()=>(Nn||(Nn=Object.keys(U)),Nn),ti=i=>Dt[i],wo=()=>(In||(In=Object.keys(Dt)),In),Pr=function(i,t){Lo(i).textContent=t.replace(/%t/g,i)},Lo=function(i){let t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("data-tag-name",i.toLowerCase());let e=Do();return e&&t.setAttribute("nonce",e),document.head.insertBefore(t,document.head.firstChild),t},Do=function(){let i=Zi("trix-csp-nonce")||Zi("csp-nonce");if(i){let{nonce:t,content:e}=i;return t==""?e:t}},Zi=i=>document.head.querySelector("meta[name=".concat(i,"]")),Qi={"application/x-trix-feature-detection":"test"},Mr=function(i){let t=i.getData("text/plain"),e=i.getData("text/html");if(!t||!e)return t?.length;{let{body:n}=new DOMParser().parseFromString(e,"text/html");if(n.textContent===t)return!n.querySelector("*")}},Br=/Mac|^iP/.test(navigator.platform)?i=>i.metaKey:i=>i.ctrlKey,Ai=i=>setTimeout(i,1),_r=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={};for(let e in i){let n=i[e];t[e]=n}return t},Zt=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Object.keys(i).length!==Object.keys(t).length)return!1;for(let e in i)if(i[e]!==t[e])return!1;return!0},y=function(i){if(i!=null)return Array.isArray(i)||(i=[i,i]),[tr(i[0]),tr(i[1]!=null?i[1]:i[0])]},ut=function(i){if(i==null)return;let[t,e]=y(i);return ei(t,e)},We=function(i,t){if(i==null||t==null)return;let[e,n]=y(i),[r,o]=y(t);return ei(e,r)&&ei(n,o)},tr=function(i){return typeof i=="number"?i:_r(i)},ei=function(i,t){return typeof i=="number"?i===t:Zt(i,t)},Ue=class extends R{constructor(){super(...arguments),this.update=this.update.bind(this),this.selectionManagers=[]}start(){this.started||(this.started=!0,document.addEventListener("selectionchange",this.update,!0))}stop(){if(this.started)return this.started=!1,document.removeEventListener("selectionchange",this.update,!0)}registerSelectionManager(t){if(!this.selectionManagers.includes(t))return this.selectionManagers.push(t),this.start()}unregisterSelectionManager(t){if(this.selectionManagers=this.selectionManagers.filter(e=>e!==t),this.selectionManagers.length===0)return this.stop()}notifySelectionManagersOfSelectionChange(){return this.selectionManagers.map(t=>t.selectionDidChange())}update(){this.notifySelectionManagersOfSelectionChange()}reset(){this.update()}},Ot=new Ue,jr=function(){let i=window.getSelection();if(i.rangeCount>0)return i},pe=function(){var i;let t=(i=jr())===null||i===void 0?void 0:i.getRangeAt(0);if(t&&!No(t))return t},Wr=function(i){let t=window.getSelection();return t.removeAllRanges(),t.addRange(i),Ot.update()},No=i=>er(i.startContainer)||er(i.endContainer),er=i=>!Object.getPrototypeOf(i),he=i=>i.replace(new RegExp("".concat(ln),"g"),"").replace(new RegExp("".concat(ft),"g")," "),yi=new RegExp("[^\\S".concat(ft,"]")),xi=i=>i.replace(new RegExp("".concat(yi.source),"g")," ").replace(/\ {2,}/g," "),nr=function(i,t){if(i.isEqualTo(t))return["",""];let e=On(i,t),{length:n}=e.utf16String,r;if(n){let{offset:o}=e,s=i.codepoints.slice(0,o).concat(i.codepoints.slice(o+n));r=On(t,Nt.fromCodepoints(s))}else r=On(t,i);return[e.utf16String.toString(),r.utf16String.toString()]},On=function(i,t){let e=0,n=i.length,r=t.length;for(;ee+1&&i.charAt(n-1).isEqualTo(t.charAt(r-1));)n--,r--;return{utf16String:i.slice(e,n),offset:e}},X=class i extends ht{static fromCommonAttributesOfObjects(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(!t.length)return new this;let e=oe(t[0]),n=e.getKeys();return t.slice(1).forEach(r=>{n=e.getKeysCommonToHash(oe(r)),e=e.slice(n)}),e}static box(t){return oe(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(...arguments),this.values=Be(t)}add(t,e){return this.merge(Io(t,e))}remove(t){return new i(Be(this.values,t))}get(t){return this.values[t]}has(t){return t in this.values}merge(t){return new i(Oo(this.values,Fo(t)))}slice(t){let e={};return Array.from(t).forEach(n=>{this.has(n)&&(e[n]=this.values[n])}),new i(e)}getKeys(){return Object.keys(this.values)}getKeysCommonToHash(t){return t=oe(t),this.getKeys().filter(e=>this.values[e]===t.values[e])}isEqualTo(t){return It(this.toArray(),oe(t).toArray())}isEmpty(){return this.getKeys().length===0}toArray(){if(!this.array){let t=[];for(let e in this.values){let n=this.values[e];t.push(t.push(e,n))}this.array=t.slice(0)}return this.array}toObject(){return Be(this.values)}toJSON(){return this.toObject()}contentsForInspection(){return{values:JSON.stringify(this.values)}}},Io=function(i,t){let e={};return e[i]=t,e},Oo=function(i,t){let e=Be(i);for(let n in t){let r=t[n];e[n]=r}return e},Be=function(i,t){let e={};return Object.keys(i).sort().forEach(n=>{n!==t&&(e[n]=i[n])}),e},oe=function(i){return i instanceof X?i:new X(i)},Fo=function(i){return i instanceof X?i.values:i},be=class{static groupObjects(){let t,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{depth:n,asTree:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r&&n==null&&(n=0);let o=[];return Array.from(e).forEach(s=>{var l;if(t){var c,u,d;if((c=s.canBeGrouped)!==null&&c!==void 0&&c.call(s,n)&&(u=(d=t[t.length-1]).canBeGroupedWith)!==null&&u!==void 0&&u.call(d,s,n))return void t.push(s);o.push(new this(t,{depth:n,asTree:r})),t=null}(l=s.canBeGrouped)!==null&&l!==void 0&&l.call(s,n)?t=[s]:o.push(s)}),t&&o.push(new this(t,{depth:n,asTree:r})),o}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{depth:e,asTree:n}=arguments.length>1?arguments[1]:void 0;this.objects=t,n&&(this.depth=e,this.objects=this.constructor.groupObjects(this.objects,{asTree:n,depth:this.depth+1}))}getObjects(){return this.objects}getDepth(){return this.depth}getCacheKey(){let t=["objectGroup"];return Array.from(this.getObjects()).forEach(e=>{t.push(e.getCacheKey())}),t.join("/")}},ni=class extends R{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.objects={},Array.from(t).forEach(e=>{let n=JSON.stringify(e);this.objects[n]==null&&(this.objects[n]=e)})}find(t){let e=JSON.stringify(t);return this.objects[e]}},ii=class{constructor(t){this.reset(t)}add(t){let e=ir(t);this.elements[e]=t}remove(t){let e=ir(t),n=this.elements[e];if(n)return delete this.elements[e],n}reset(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return this.elements={},Array.from(t).forEach(e=>{this.add(e)}),t}},ir=i=>i.dataset.trixStoreKey,Ht=class extends R{isPerforming(){return this.performing===!0}hasPerformed(){return this.performed===!0}hasSucceeded(){return this.performed&&this.succeeded}hasFailed(){return this.performed&&!this.succeeded}getPromise(){return this.promise||(this.promise=new Promise((t,e)=>(this.performing=!0,this.perform((n,r)=>{this.succeeded=n,this.performing=!1,this.performed=!0,this.succeeded?t(r):e(r)})))),this.promise}perform(t){return t(!1)}release(){var t,e;(t=this.promise)===null||t===void 0||(e=t.cancel)===null||e===void 0||e.call(t),this.promise=null,this.performing=null,this.performed=null,this.succeeded=null}};Ht.proxyMethod("getPromise().then"),Ht.proxyMethod("getPromise().catch");var dt=class extends R{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.object=t,this.options=e,this.childViews=[],this.rootView=this}getNodes(){return this.nodes||(this.nodes=this.createNodes()),this.nodes.map(t=>t.cloneNode(!0))}invalidate(){var t;return this.nodes=null,this.childViews=[],(t=this.parentView)===null||t===void 0?void 0:t.invalidate()}invalidateViewForObject(t){var e;return(e=this.findViewForObject(t))===null||e===void 0?void 0:e.invalidate()}findOrCreateCachedChildView(t,e,n){let r=this.getCachedViewForObject(e);return r?this.recordChildView(r):(r=this.createChildView(...arguments),this.cacheViewForObject(r,e)),r}createChildView(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};e instanceof be&&(n.viewClass=t,t=ri);let r=new t(e,n);return this.recordChildView(r)}recordChildView(t){return t.parentView=this,t.rootView=this.rootView,this.childViews.push(t),t}getAllChildViews(){let t=[];return this.childViews.forEach(e=>{t.push(e),t=t.concat(e.getAllChildViews())}),t}findElement(){return this.findElementForObject(this.object)}findElementForObject(t){let e=t?.id;if(e)return this.rootView.element.querySelector("[data-trix-id='".concat(e,"']"))}findViewForObject(t){for(let e of this.getAllChildViews())if(e.object===t)return e}getViewCache(){return this.rootView!==this?this.rootView.getViewCache():this.isViewCachingEnabled()?(this.viewCache||(this.viewCache={}),this.viewCache):void 0}isViewCachingEnabled(){return this.shouldCacheViews!==!1}enableViewCaching(){this.shouldCacheViews=!0}disableViewCaching(){this.shouldCacheViews=!1}getCachedViewForObject(t){var e;return(e=this.getViewCache())===null||e===void 0?void 0:e[t.getCacheKey()]}cacheViewForObject(t,e){let n=this.getViewCache();n&&(n[e.getCacheKey()]=t)}garbageCollectCachedViews(){let t=this.getViewCache();if(t){let e=this.getAllChildViews().concat(this).map(n=>n.object.getCacheKey());for(let n in t)e.includes(n)||delete t[n]}}},ri=class extends dt{constructor(){super(...arguments),this.objectGroup=this.object,this.viewClass=this.options.viewClass,delete this.options.viewClass}getChildViews(){return this.childViews.length||Array.from(this.objectGroup.getObjects()).forEach(t=>{this.findOrCreateCachedChildView(this.viewClass,t,this.options)}),this.childViews}createNodes(){let t=this.createContainerElement();return this.getChildViews().forEach(e=>{Array.from(e.getNodes()).forEach(n=>{t.appendChild(n)})}),[t]}createContainerElement(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.objectGroup.getDepth();return this.getChildViews()[0].createContainerElement(t)}};var{entries:Ur,setPrototypeOf:rr,isFrozen:Po,getPrototypeOf:Mo,getOwnPropertyDescriptor:Bo}=Object,{freeze:z,seal:G,create:Vr}=Object,{apply:oi,construct:si}=typeof Reflect<"u"&&Reflect;z||(z=function(i){return i}),G||(G=function(i){return i}),oi||(oi=function(i,t,e){return i.apply(t,e)}),si||(si=function(i,t){return new i(...t)});var Ne=H(Array.prototype.forEach),_o=H(Array.prototype.lastIndexOf),or=H(Array.prototype.pop),se=H(Array.prototype.push),jo=H(Array.prototype.splice),_e=H(String.prototype.toLowerCase),Fn=H(String.prototype.toString),sr=H(String.prototype.match),ae=H(String.prototype.replace),Wo=H(String.prototype.indexOf),Uo=H(String.prototype.trim),Y=H(Object.prototype.hasOwnProperty),j=H(RegExp.prototype.test),le=(ar=TypeError,function(){for(var i=arguments.length,t=new Array(i),e=0;e1?e-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:_e;rr&&rr(i,null);let n=t.length;for(;n--;){let r=t[n];if(typeof r=="string"){let o=e(r);o!==r&&(Po(t)||(t[n]=o),r=o)}i[r]=!0}return i}function Vo(i){for(let t=0;t/gm),Ko=G(/\$\{[\w\W]*/gm),Go=G(/^data-[\-\w.\u00B7-\uFFFF]+$/),Yo=G(/^aria-[\-\w]+$/),zr=G(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$o=G(/^(?:\w+script|data):/i),Xo=G(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Hr=G(/^html$/i),Zo=G(/^[a-z][.\w]*(-[.\w]+)+$/i),dr=Object.freeze({__proto__:null,ARIA_ATTR:Yo,ATTR_WHITESPACE:Xo,CUSTOM_ELEMENT:Zo,DATA_ATTR:Go,DOCTYPE_NAME:Hr,ERB_EXPR:Jo,IS_ALLOWED_URI:zr,IS_SCRIPT_OR_DATA:$o,MUSTACHE_EXPR:qo,TMPLIT_EXPR:Ko}),Qo=1,ts=3,es=7,ns=8,is=9,rs=function(){return typeof window>"u"?null:window},Ve=function i(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rs(),e=a=>i(a);if(e.version="3.2.5",e.removed=[],!t||!t.document||t.document.nodeType!==is||!t.Element)return e.isSupported=!1,e;let{document:n}=t,r=n,o=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:l,Node:c,Element:u,NodeFilter:d,NamedNodeMap:C=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:T,DOMParser:J,trustedTypes:Q}=t,M=u.prototype,mt=ce(M,"cloneNode"),yt=ce(M,"remove"),Qt=ce(M,"nextSibling"),te=ce(M,"childNodes"),F=ce(M,"parentNode");if(typeof l=="function"){let a=n.createElement("template");a.content&&a.content.ownerDocument&&(n=a.content.ownerDocument)}let k,rt="",{implementation:xt,createNodeIterator:eo,createDocumentFragment:no,getElementsByTagName:io}=n,{importNode:ro}=r,B={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};e.isSupported=typeof Ur=="function"&&typeof F=="function"&&xt&&xt.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:un,ERB_EXPR:hn,TMPLIT_EXPR:dn,DATA_ATTR:oo,ARIA_ATTR:so,IS_SCRIPT_OR_DATA:ao,ATTR_WHITESPACE:Ei,CUSTOM_ELEMENT:lo}=dr,{IS_ALLOWED_URI:Si}=dr,N=null,ki=b({},[...lr,...Pn,...Mn,...Bn,...cr]),O=null,Ri=b({},[...ur,..._n,...hr,...Ie]),w=Object.seal(Vr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ee=null,gn=null,Ti=!0,mn=!0,wi=!1,Li=!0,Pt=!1,pn=!0,Ct=!1,fn=!1,bn=!1,Mt=!1,Ee=!1,Se=!1,Di=!0,Ni=!1,vn=!0,ne=!1,Bt={},_t=null,Ii=b({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Oi=null,Fi=b({},["audio","video","img","source","image","track"]),An=null,Pi=b({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ke="http://www.w3.org/1998/Math/MathML",Re="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml",jt=ot,yn=!1,xn=null,co=b({},[ke,Re,ot],Fn),Te=b({},["mi","mo","mn","ms","mtext"]),we=b({},["annotation-xml"]),uo=b({},["title","style","font","a","script"]),ie=null,ho=["application/xhtml+xml","text/html"],I=null,Wt=null,go=n.createElement("form"),Mi=function(a){return a instanceof RegExp||a instanceof Function},Cn=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Wt||Wt!==a){if(a&&typeof a=="object"||(a={}),a=St(a),ie=ho.indexOf(a.PARSER_MEDIA_TYPE)===-1?"text/html":a.PARSER_MEDIA_TYPE,I=ie==="application/xhtml+xml"?Fn:_e,N=Y(a,"ALLOWED_TAGS")?b({},a.ALLOWED_TAGS,I):ki,O=Y(a,"ALLOWED_ATTR")?b({},a.ALLOWED_ATTR,I):Ri,xn=Y(a,"ALLOWED_NAMESPACES")?b({},a.ALLOWED_NAMESPACES,Fn):co,An=Y(a,"ADD_URI_SAFE_ATTR")?b(St(Pi),a.ADD_URI_SAFE_ATTR,I):Pi,Oi=Y(a,"ADD_DATA_URI_TAGS")?b(St(Fi),a.ADD_DATA_URI_TAGS,I):Fi,_t=Y(a,"FORBID_CONTENTS")?b({},a.FORBID_CONTENTS,I):Ii,ee=Y(a,"FORBID_TAGS")?b({},a.FORBID_TAGS,I):{},gn=Y(a,"FORBID_ATTR")?b({},a.FORBID_ATTR,I):{},Bt=!!Y(a,"USE_PROFILES")&&a.USE_PROFILES,Ti=a.ALLOW_ARIA_ATTR!==!1,mn=a.ALLOW_DATA_ATTR!==!1,wi=a.ALLOW_UNKNOWN_PROTOCOLS||!1,Li=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Pt=a.SAFE_FOR_TEMPLATES||!1,pn=a.SAFE_FOR_XML!==!1,Ct=a.WHOLE_DOCUMENT||!1,Mt=a.RETURN_DOM||!1,Ee=a.RETURN_DOM_FRAGMENT||!1,Se=a.RETURN_TRUSTED_TYPE||!1,bn=a.FORCE_BODY||!1,Di=a.SANITIZE_DOM!==!1,Ni=a.SANITIZE_NAMED_PROPS||!1,vn=a.KEEP_CONTENT!==!1,ne=a.IN_PLACE||!1,Si=a.ALLOWED_URI_REGEXP||zr,jt=a.NAMESPACE||ot,Te=a.MATHML_TEXT_INTEGRATION_POINTS||Te,we=a.HTML_INTEGRATION_POINTS||we,w=a.CUSTOM_ELEMENT_HANDLING||{},a.CUSTOM_ELEMENT_HANDLING&&Mi(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(w.tagNameCheck=a.CUSTOM_ELEMENT_HANDLING.tagNameCheck),a.CUSTOM_ELEMENT_HANDLING&&Mi(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(w.attributeNameCheck=a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(w.allowCustomizedBuiltInElements=a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Pt&&(mn=!1),Ee&&(Mt=!0),Bt&&(N=b({},cr),O=[],Bt.html===!0&&(b(N,lr),b(O,ur)),Bt.svg===!0&&(b(N,Pn),b(O,_n),b(O,Ie)),Bt.svgFilters===!0&&(b(N,Mn),b(O,_n),b(O,Ie)),Bt.mathMl===!0&&(b(N,Bn),b(O,hr),b(O,Ie))),a.ADD_TAGS&&(N===ki&&(N=St(N)),b(N,a.ADD_TAGS,I)),a.ADD_ATTR&&(O===Ri&&(O=St(O)),b(O,a.ADD_ATTR,I)),a.ADD_URI_SAFE_ATTR&&b(An,a.ADD_URI_SAFE_ATTR,I),a.FORBID_CONTENTS&&(_t===Ii&&(_t=St(_t)),b(_t,a.FORBID_CONTENTS,I)),vn&&(N["#text"]=!0),Ct&&b(N,["html","head","body"]),N.table&&(b(N,["tbody"]),delete ee.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw le('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw le('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=a.TRUSTED_TYPES_POLICY,rt=k.createHTML("")}else k===void 0&&(k=function(g,h){if(typeof g!="object"||typeof g.createPolicy!="function")return null;let v=null,A="data-tt-policy-suffix";h&&h.hasAttribute(A)&&(v=h.getAttribute(A));let f="dompurify"+(v?"#"+v:"");try{return g.createPolicy(f,{createHTML:D=>D,createScriptURL:D=>D})}catch{return console.warn("TrustedTypes policy "+f+" could not be created."),null}}(Q,o)),k!==null&&typeof rt=="string"&&(rt=k.createHTML(""));z&&z(a),Wt=a}},Bi=b({},[...Pn,...Mn,...zo]),_i=b({},[...Bn,...Ho]),tt=function(a){se(e.removed,{element:a});try{F(a).removeChild(a)}catch{yt(a)}},Le=function(a,g){try{se(e.removed,{attribute:g.getAttributeNode(a),from:g})}catch{se(e.removed,{attribute:null,from:g})}if(g.removeAttribute(a),a==="is")if(Mt||Ee)try{tt(g)}catch{}else try{g.setAttribute(a,"")}catch{}},ji=function(a){let g=null,h=null;if(bn)a=""+a;else{let f=sr(a,/^[\r\n\t ]+/);h=f&&f[0]}ie==="application/xhtml+xml"&&jt===ot&&(a=''+a+"");let v=k?k.createHTML(a):a;if(jt===ot)try{g=new J().parseFromString(v,ie)}catch{}if(!g||!g.documentElement){g=xt.createDocument(jt,"template",null);try{g.documentElement.innerHTML=yn?rt:v}catch{}}let A=g.body||g.documentElement;return a&&h&&A.insertBefore(n.createTextNode(h),A.childNodes[0]||null),jt===ot?io.call(g,Ct?"html":"body")[0]:Ct?g.documentElement:A},Wi=function(a){return eo.call(a.ownerDocument||a,a,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},En=function(a){return a instanceof T&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof C)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},Ui=function(a){return typeof c=="function"&&a instanceof c};function st(a,g,h){Ne(a,v=>{v.call(e,g,h,Wt)})}let Vi=function(a){let g=null;if(st(B.beforeSanitizeElements,a,null),En(a))return tt(a),!0;let h=I(a.nodeName);if(st(B.uponSanitizeElement,a,{tagName:h,allowedTags:N}),a.hasChildNodes()&&!Ui(a.firstElementChild)&&j(/<[/\w!]/g,a.innerHTML)&&j(/<[/\w!]/g,a.textContent)||a.nodeType===es||pn&&a.nodeType===ns&&j(/<[/\w]/g,a.data))return tt(a),!0;if(!N[h]||ee[h]){if(!ee[h]&&Hi(h)&&(w.tagNameCheck instanceof RegExp&&j(w.tagNameCheck,h)||w.tagNameCheck instanceof Function&&w.tagNameCheck(h)))return!1;if(vn&&!_t[h]){let v=F(a)||a.parentNode,A=te(a)||a.childNodes;if(A&&v)for(let f=A.length-1;f>=0;--f){let D=mt(A[f],!0);D.__removalCount=(a.__removalCount||0)+1,v.insertBefore(D,Qt(a))}}return tt(a),!0}return a instanceof u&&!function(v){let A=F(v);A&&A.tagName||(A={namespaceURI:jt,tagName:"template"});let f=_e(v.tagName),D=_e(A.tagName);return!!xn[v.namespaceURI]&&(v.namespaceURI===Re?A.namespaceURI===ot?f==="svg":A.namespaceURI===ke?f==="svg"&&(D==="annotation-xml"||Te[D]):!!Bi[f]:v.namespaceURI===ke?A.namespaceURI===ot?f==="math":A.namespaceURI===Re?f==="math"&&we[D]:!!_i[f]:v.namespaceURI===ot?!(A.namespaceURI===Re&&!we[D])&&!(A.namespaceURI===ke&&!Te[D])&&!_i[f]&&(uo[f]||!Bi[f]):!(ie!=="application/xhtml+xml"||!xn[v.namespaceURI]))}(a)?(tt(a),!0):h!=="noscript"&&h!=="noembed"&&h!=="noframes"||!j(/<\/no(script|embed|frames)/i,a.innerHTML)?(Pt&&a.nodeType===ts&&(g=a.textContent,Ne([un,hn,dn],v=>{g=ae(g,v," ")}),a.textContent!==g&&(se(e.removed,{element:a.cloneNode()}),a.textContent=g)),st(B.afterSanitizeElements,a,null),!1):(tt(a),!0)},zi=function(a,g,h){if(Di&&(g==="id"||g==="name")&&(h in n||h in go))return!1;if(!(mn&&!gn[g]&&j(oo,g))){if(!(Ti&&j(so,g))){if(!O[g]||gn[g]){if(!(Hi(a)&&(w.tagNameCheck instanceof RegExp&&j(w.tagNameCheck,a)||w.tagNameCheck instanceof Function&&w.tagNameCheck(a))&&(w.attributeNameCheck instanceof RegExp&&j(w.attributeNameCheck,g)||w.attributeNameCheck instanceof Function&&w.attributeNameCheck(g))||g==="is"&&w.allowCustomizedBuiltInElements&&(w.tagNameCheck instanceof RegExp&&j(w.tagNameCheck,h)||w.tagNameCheck instanceof Function&&w.tagNameCheck(h))))return!1}else if(!An[g]){if(!j(Si,ae(h,Ei,""))){if((g!=="src"&&g!=="xlink:href"&&g!=="href"||a==="script"||Wo(h,"data:")!==0||!Oi[a])&&!(wi&&!j(ao,ae(h,Ei,"")))){if(h)return!1}}}}}return!0},Hi=function(a){return a!=="annotation-xml"&&sr(a,lo)},qi=function(a){st(B.beforeSanitizeAttributes,a,null);let{attributes:g}=a;if(!g||En(a))return;let h={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:O,forceKeepAttr:void 0},v=g.length;for(;v--;){let A=g[v],{name:f,namespaceURI:D,value:at}=A,et=I(f),_=f==="value"?at:Uo(at);if(h.attrName=et,h.attrValue=_,h.keepAttr=!0,h.forceKeepAttr=void 0,st(B.uponSanitizeAttribute,a,h),_=h.attrValue,!Ni||et!=="id"&&et!=="name"||(Le(f,a),_="user-content-"+_),pn&&j(/((--!?|])>)|<\/(style|title)/i,_)){Le(f,a);continue}if(h.forceKeepAttr||(Le(f,a),!h.keepAttr))continue;if(!Li&&j(/\/>/i,_)){Le(f,a);continue}Pt&&Ne([un,hn,dn],Ki=>{_=ae(_,Ki," ")});let Ji=I(a.nodeName);if(zi(Ji,et,_)){if(k&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!D)switch(Q.getAttributeType(Ji,et)){case"TrustedHTML":_=k.createHTML(_);break;case"TrustedScriptURL":_=k.createScriptURL(_)}try{D?a.setAttributeNS(D,f,_):a.setAttribute(f,_),En(a)?tt(a):or(e.removed)}catch{}}}st(B.afterSanitizeAttributes,a,null)},mo=function a(g){let h=null,v=Wi(g);for(st(B.beforeSanitizeShadowDOM,g,null);h=v.nextNode();)st(B.uponSanitizeShadowNode,h,null),Vi(h),qi(h),h.content instanceof s&&a(h.content);st(B.afterSanitizeShadowDOM,g,null)};return e.sanitize=function(a){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=null,v=null,A=null,f=null;if(yn=!a,yn&&(a=""),typeof a!="string"&&!Ui(a)){if(typeof a.toString!="function")throw le("toString is not a function");if(typeof(a=a.toString())!="string")throw le("dirty is not a string, aborting")}if(!e.isSupported)return a;if(fn||Cn(g),e.removed=[],typeof a=="string"&&(ne=!1),ne){if(a.nodeName){let et=I(a.nodeName);if(!N[et]||ee[et])throw le("root node is forbidden and cannot be sanitized in-place")}}else if(a instanceof c)h=ji(""),v=h.ownerDocument.importNode(a,!0),v.nodeType===Qo&&v.nodeName==="BODY"||v.nodeName==="HTML"?h=v:h.appendChild(v);else{if(!Mt&&!Pt&&!Ct&&a.indexOf("<")===-1)return k&&Se?k.createHTML(a):a;if(h=ji(a),!h)return Mt?null:Se?rt:""}h&&bn&&tt(h.firstChild);let D=Wi(ne?a:h);for(;A=D.nextNode();)Vi(A),qi(A),A.content instanceof s&&mo(A.content);if(ne)return a;if(Mt){if(Ee)for(f=no.call(h.ownerDocument);h.firstChild;)f.appendChild(h.firstChild);else f=h;return(O.shadowroot||O.shadowrootmode)&&(f=ro.call(r,f,!0)),f}let at=Ct?h.outerHTML:h.innerHTML;return Ct&&N["!doctype"]&&h.ownerDocument&&h.ownerDocument.doctype&&h.ownerDocument.doctype.name&&j(Hr,h.ownerDocument.doctype.name)&&(at=" +`+at),Pt&&Ne([un,hn,dn],et=>{at=ae(at,et," ")}),k&&Se?k.createHTML(at):at},e.setConfig=function(){Cn(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),fn=!0},e.clearConfig=function(){Wt=null,fn=!1},e.isValidAttribute=function(a,g,h){Wt||Cn({});let v=I(a),A=I(g);return zi(v,A,h)},e.addHook=function(a,g){typeof g=="function"&&se(B[a],g)},e.removeHook=function(a,g){if(g!==void 0){let h=_o(B[a],g);return h===-1?void 0:jo(B[a],h,1)[0]}return or(B[a])},e.removeHooks=function(a){B[a]=[]},e.removeAllHooks=function(){B={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},e}();Ve.addHook("uponSanitizeAttribute",function(i,t){/^data-trix-/.test(t.attrName)&&(t.forceKeepAttr=!0)});var os="style href src width height language class".split(" "),ss="javascript:".split(" "),as="script iframe form noscript".split(" "),qt=class extends R{static setHTML(t,e,n){let r=new this(e,n).sanitize(),o=r.getHTML?r.getHTML():r.outerHTML;t.innerHTML=o}static sanitize(t,e){let n=new this(t,e);return n.sanitize(),n}constructor(t){let{allowedAttributes:e,forbiddenProtocols:n,forbiddenElements:r,purifyOptions:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.allowedAttributes=e||os,this.forbiddenProtocols=n||ss,this.forbiddenElements=r||as,this.purifyOptions=o||{},this.body=ls(t)}sanitize(){this.sanitizeElements(),this.normalizeListElementNesting();let t=Object.assign({},Lr,this.purifyOptions);return Ve.setConfig(t),this.body=Ve.sanitize(this.body),this.body}getHTML(){return this.body.innerHTML}getBody(){return this.body}sanitizeElements(){let t=je(this.body),e=[];for(;t.nextNode();){let n=t.currentNode;switch(n.nodeType){case Node.ELEMENT_NODE:this.elementIsRemovable(n)?e.push(n):this.sanitizeElement(n);break;case Node.COMMENT_NODE:e.push(n)}}return e.forEach(n=>At(n)),this.body}sanitizeElement(t){return t.hasAttribute("href")&&this.forbiddenProtocols.includes(t.protocol)&&t.removeAttribute("href"),Array.from(t.attributes).forEach(e=>{let{name:n}=e;this.allowedAttributes.includes(n)||n.indexOf("data-trix")===0||t.removeAttribute(n)}),t}normalizeListElementNesting(){return Array.from(this.body.querySelectorAll("ul,ol")).forEach(t=>{let e=t.previousElementSibling;e&&W(e)==="li"&&e.appendChild(t)}),this.body}elementIsRemovable(t){if(t?.nodeType===Node.ELEMENT_NODE)return this.elementIsForbidden(t)||this.elementIsntSerializable(t)}elementIsForbidden(t){return this.forbiddenElements.includes(W(t))}elementIsntSerializable(t){return t.getAttribute("data-trix-serialize")==="false"&&!Tt(t)}},ls=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";i=i.replace(/<\/html[^>]*>[^]*$/i,"");let t=document.implementation.createHTMLDocument("");return t.documentElement.innerHTML=i,Array.from(t.head.querySelectorAll("style")).forEach(e=>{t.body.appendChild(e)}),t.body},{css:pt}=Ce,ve=class extends dt{constructor(){super(...arguments),this.attachment=this.object,this.attachment.uploadProgressDelegate=this,this.attachmentPiece=this.options.piece}createContentNodes(){return[]}createNodes(){let t,e=t=p({tagName:"figure",className:this.getClassName(),data:this.getData(),editable:!1}),n=this.getHref();return n&&(t=p({tagName:"a",editable:!1,attributes:{href:n,tabindex:-1}}),e.appendChild(t)),this.attachment.hasContent()?qt.setHTML(t,this.attachment.getContent()):this.createContentNodes().forEach(r=>{t.appendChild(r)}),t.appendChild(this.createCaptionElement()),this.attachment.isPending()&&(this.progressElement=p({tagName:"progress",attributes:{class:pt.attachmentProgress,value:this.attachment.getUploadProgress(),max:100},data:{trixMutable:!0,trixStoreKey:["progressElement",this.attachment.id].join("/")}}),e.appendChild(this.progressElement)),[gr("left"),e,gr("right")]}createCaptionElement(){let t=p({tagName:"figcaption",className:pt.attachmentCaption}),e=this.attachmentPiece.getCaption();if(e)t.classList.add("".concat(pt.attachmentCaption,"--edited")),t.textContent=e;else{let n,r,o=this.getCaptionConfig();if(o.name&&(n=this.attachment.getFilename()),o.size&&(r=this.attachment.getFormattedFilesize()),n){let s=p({tagName:"span",className:pt.attachmentName,textContent:n});t.appendChild(s)}if(r){n&&t.appendChild(document.createTextNode(" "));let s=p({tagName:"span",className:pt.attachmentSize,textContent:r});t.appendChild(s)}}return t}getClassName(){let t=[pt.attachment,"".concat(pt.attachment,"--").concat(this.attachment.getType())],e=this.attachment.getExtension();return e&&t.push("".concat(pt.attachment,"--").concat(e)),t.join(" ")}getData(){let t={trixAttachment:JSON.stringify(this.attachment),trixContentType:this.attachment.getContentType(),trixId:this.attachment.id},{attributes:e}=this.attachmentPiece;return e.isEmpty()||(t.trixAttributes=JSON.stringify(e)),this.attachment.isPending()&&(t.trixSerialize=!1),t}getHref(){if(!cs(this.attachment.getContent(),"a"))return this.attachment.getHref()}getCaptionConfig(){var t;let e=this.attachment.getType(),n=_r((t=mi[e])===null||t===void 0?void 0:t.caption);return e==="file"&&(n.name=!0),n}findProgressElement(){var t;return(t=this.findElement())===null||t===void 0?void 0:t.querySelector("progress")}attachmentDidChangeUploadProgress(){let t=this.attachment.getUploadProgress(),e=this.findProgressElement();e&&(e.value=t)}},gr=i=>p({tagName:"span",textContent:ln,data:{trixCursorTarget:i,trixSerialize:!1}}),cs=function(i,t){let e=p("div");return qt.setHTML(e,i||""),e.querySelector(t)},ze=class extends ve{constructor(){super(...arguments),this.attachment.previewDelegate=this}createContentNodes(){return this.image=p({tagName:"img",attributes:{src:""},data:{trixMutable:!0}}),this.refresh(this.image),[this.image]}createCaptionElement(){let t=super.createCaptionElement(...arguments);return t.textContent||t.setAttribute("data-trix-placeholder",m.captionPlaceholder),t}refresh(t){var e;if(t||(t=(e=this.findElement())===null||e===void 0?void 0:e.querySelector("img")),t)return this.updateAttributesForImage(t)}updateAttributesForImage(t){let e=this.attachment.getURL(),n=this.attachment.getPreviewURL();if(t.src=n||e,n===e)t.removeAttribute("data-trix-serialized-attributes");else{let l=JSON.stringify({src:e});t.setAttribute("data-trix-serialized-attributes",l)}let r=this.attachment.getWidth(),o=this.attachment.getHeight();r!=null&&(t.width=r),o!=null&&(t.height=o);let s=["imageElement",this.attachment.id,t.src,t.width,t.height].join("/");t.dataset.trixStoreKey=s}attachmentDidChangeAttributes(){return this.refresh(this.image),this.refresh()}},He=class extends dt{constructor(){super(...arguments),this.piece=this.object,this.attributes=this.piece.getAttributes(),this.textConfig=this.options.textConfig,this.context=this.options.context,this.piece.attachment?this.attachment=this.piece.attachment:this.string=this.piece.toString()}createNodes(){let t=this.attachment?this.createAttachmentNodes():this.createStringNodes(),e=this.createElement();if(e){let n=function(r){for(;(o=r)!==null&&o!==void 0&&o.firstElementChild;){var o;r=r.firstElementChild}return r}(e);Array.from(t).forEach(r=>{n.appendChild(r)}),t=[e]}return t}createAttachmentNodes(){let t=this.attachment.isPreviewable()?ze:ve;return this.createChildView(t,this.piece.attachment,{piece:this.piece}).getNodes()}createStringNodes(){var t;if((t=this.textConfig)!==null&&t!==void 0&&t.plaintext)return[document.createTextNode(this.string)];{let e=[],n=this.string.split(` +`);for(let r=0;r0){let s=p("br");e.push(s)}if(o.length){let s=document.createTextNode(this.preserveSpaces(o));e.push(s)}}return e}}createElement(){let t,e,n,r={};for(e in this.attributes){n=this.attributes[e];let s=ti(e);if(s){if(s.tagName){var o;let l=p(s.tagName);o?(o.appendChild(l),o=l):t=o=l}if(s.styleProperty&&(r[s.styleProperty]=n),s.style)for(e in s.style)n=s.style[e],r[e]=n}}if(Object.keys(r).length)for(e in t||(t=p("span")),r)n=r[e],t.style[e]=n;return t}createContainerElement(){for(let t in this.attributes){let e=this.attributes[t],n=ti(t);if(n&&n.groupTagName){let r={};return r[t]=e,p(n.groupTagName,r)}}}preserveSpaces(t){return this.context.isLast&&(t=t.replace(/\ $/,ft)),t=t.replace(/(\S)\ {3}(\S)/g,"$1 ".concat(ft," $2")).replace(/\ {2}/g,"".concat(ft," ")).replace(/\ {2}/g," ".concat(ft)),(this.context.isFirst||this.context.followsWhitespace)&&(t=t.replace(/^\ /,ft)),t}},qe=class extends dt{constructor(){super(...arguments),this.text=this.object,this.textConfig=this.options.textConfig}createNodes(){let t=[],e=be.groupObjects(this.getPieces()),n=e.length-1;for(let o=0;o!t.hasAttribute("blockBreak"))}},us=i=>/\s$/.test(i?.toString()),{css:mr}=Ce,Je=class extends dt{constructor(){super(...arguments),this.block=this.object,this.attributes=this.block.getAttributes()}createNodes(){let t=[document.createComment("block")];if(this.block.isEmpty())t.push(p("br"));else{var e;let n=(e=L(this.block.getLastAttribute()))===null||e===void 0?void 0:e.text,r=this.findOrCreateCachedChildView(qe,this.block.text,{textConfig:n});t.push(...Array.from(r.getNodes()||[])),this.shouldAddExtraNewlineElement()&&t.push(p("br"))}if(this.attributes.length)return t;{let n,{tagName:r}=U.default;this.block.isRTL()&&(n={dir:"rtl"});let o=p({tagName:r,attributes:n});return t.forEach(s=>o.appendChild(s)),[o]}}createContainerElement(t){let e={},n,r=this.attributes[t],{tagName:o,htmlAttributes:s=[]}=L(r);if(t===0&&this.block.isRTL()&&Object.assign(e,{dir:"rtl"}),r==="attachmentGallery"){let l=this.block.getBlockBreakPosition();n="".concat(mr.attachmentGallery," ").concat(mr.attachmentGallery,"--").concat(l)}return Object.entries(this.block.htmlAttributes).forEach(l=>{let[c,u]=l;s.includes(c)&&(e[c]=u)}),p({tagName:o,className:n,attributes:e})}shouldAddExtraNewlineElement(){return/\n\n$/.test(this.block.toString())}},Jt=class extends dt{static render(t){let e=p("div"),n=new this(t,{element:e});return n.render(),n.sync(),e}constructor(){super(...arguments),this.element=this.options.element,this.elementStore=new ii,this.setDocument(this.object)}setDocument(t){t.isEqualTo(this.document)||(this.document=this.object=t)}render(){if(this.childViews=[],this.shadowElement=p("div"),!this.document.isEmpty()){let t=be.groupObjects(this.document.getBlocks(),{asTree:!0});Array.from(t).forEach(e=>{let n=this.findOrCreateCachedChildView(Je,e);Array.from(n.getNodes()).map(r=>this.shadowElement.appendChild(r))})}}isSynced(){return hs(this.shadowElement,this.element)}sync(){let t=this.createDocumentFragmentForSync();for(;this.element.lastChild;)this.element.removeChild(this.element.lastChild);return this.element.appendChild(t),this.didSync()}didSync(){return this.elementStore.reset(pr(this.element)),Ai(()=>this.garbageCollectCachedViews())}createDocumentFragmentForSync(){let t=document.createDocumentFragment();return Array.from(this.shadowElement.childNodes).forEach(e=>{t.appendChild(e.cloneNode(!0))}),Array.from(pr(t)).forEach(e=>{let n=this.elementStore.remove(e);n&&e.parentNode.replaceChild(n,e)}),t}},pr=i=>i.querySelectorAll("[data-trix-store-key]"),hs=(i,t)=>fr(i.innerHTML)===fr(t.innerHTML),fr=i=>i.replace(/ /g," ");function Oe(i){var t,e;function n(o,s){try{var l=i[o](s),c=l.value,u=c instanceof ds;Promise.resolve(u?c.v:c).then(function(d){if(u){var C=o==="return"?"return":"next";if(!c.k||d.done)return n(C,d);d=i[C](d).value}r(l.done?"return":"normal",d)},function(d){n("throw",d)})}catch(d){r("throw",d)}}function r(o,s){switch(o){case"return":t.resolve({value:s,done:!0});break;case"throw":t.reject(s);break;default:t.resolve({value:s,done:!1})}(t=t.next)?n(t.key,t.arg):e=null}this._invoke=function(o,s){return new Promise(function(l,c){var u={key:o,arg:s,resolve:l,reject:c,next:null};e?e=e.next=u:(t=e=u,n(o,s))})},typeof i.return!="function"&&(this.return=void 0)}function ds(i,t){this.v=i,this.k=t}function V(i,t,e){return(t=gs(t))in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function gs(i){var t=function(e,n){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}(i,"string");return typeof t=="symbol"?t:String(t)}Oe.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Oe.prototype.next=function(i){return this._invoke("next",i)},Oe.prototype.throw=function(i){return this._invoke("throw",i)},Oe.prototype.return=function(i){return this._invoke("return",i)};function x(i,t){return ms(i,qr(i,t,"get"))}function Ci(i,t,e){return ps(i,qr(i,t,"set"),e),e}function qr(i,t,e){if(!t.has(i))throw new TypeError("attempted to "+e+" private field on non-instance");return t.get(i)}function ms(i,t){return t.get?t.get.call(i):t.value}function ps(i,t,e){if(t.set)t.set.call(i,e);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=e}}function Fe(i,t,e){if(!t.has(i))throw new TypeError("attempted to get private field on non-instance");return e}function Jr(i,t){if(t.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fe(i,t,e){Jr(i,t),t.set(i,e)}var gt=class extends ht{static registerType(t,e){e.type=t,this.types[t]=e}static fromJSON(t){let e=this.types[t.type];if(e)return e.fromJSON(t)}constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.attributes=X.box(e)}copyWithAttributes(t){return new this.constructor(this.getValue(),t)}copyWithAdditionalAttributes(t){return this.copyWithAttributes(this.attributes.merge(t))}copyWithoutAttribute(t){return this.copyWithAttributes(this.attributes.remove(t))}copy(){return this.copyWithAttributes(this.attributes)}getAttribute(t){return this.attributes.get(t)}getAttributesHash(){return this.attributes}getAttributes(){return this.attributes.toObject()}hasAttribute(t){return this.attributes.has(t)}hasSameStringValueAsPiece(t){return t&&this.toString()===t.toString()}hasSameAttributesAsPiece(t){return t&&(this.attributes===t.attributes||this.attributes.isEqualTo(t.attributes))}isBlockBreak(){return!1}isEqualTo(t){return super.isEqualTo(...arguments)||this.hasSameConstructorAs(t)&&this.hasSameStringValueAsPiece(t)&&this.hasSameAttributesAsPiece(t)}isEmpty(){return this.length===0}isSerializable(){return!0}toJSON(){return{type:this.constructor.type,attributes:this.getAttributes()}}contentsForInspection(){return{type:this.constructor.type,attributes:this.attributes.inspect()}}canBeGrouped(){return this.hasAttribute("href")}canBeGroupedWith(t){return this.getAttribute("href")===t.getAttribute("href")}getLength(){return this.length}canBeConsolidatedWith(t){return!1}};V(gt,"types",{});var Ke=class extends Ht{constructor(t){super(...arguments),this.url=t}perform(t){let e=new Image;e.onload=()=>(e.width=this.width=e.naturalWidth,e.height=this.height=e.naturalHeight,t(!0,e)),e.onerror=()=>t(!1),e.src=this.url}},Kt=class i extends ht{static attachmentForFile(t){let e=new this(this.attributesForFile(t));return e.setFile(t),e}static attributesForFile(t){return new X({filename:t.name,filesize:t.size,contentType:t.type})}static fromJSON(t){return new this(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(t),this.releaseFile=this.releaseFile.bind(this),this.attributes=X.box(t),this.didChangeAttributes()}getAttribute(t){return this.attributes.get(t)}hasAttribute(t){return this.attributes.has(t)}getAttributes(){return this.attributes.toObject()}setAttributes(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=this.attributes.merge(t);var n,r,o,s;if(!this.attributes.isEqualTo(e))return this.attributes=e,this.didChangeAttributes(),(n=this.previewDelegate)===null||n===void 0||(r=n.attachmentDidChangeAttributes)===null||r===void 0||r.call(n,this),(o=this.delegate)===null||o===void 0||(s=o.attachmentDidChangeAttributes)===null||s===void 0?void 0:s.call(o,this)}didChangeAttributes(){if(this.isPreviewable())return this.preloadURL()}isPending(){return this.file!=null&&!(this.getURL()||this.getHref())}isPreviewable(){return this.attributes.has("previewable")?this.attributes.get("previewable"):i.previewablePattern.test(this.getContentType())}getType(){return this.hasContent()?"content":this.isPreviewable()?"preview":"file"}getURL(){return this.attributes.get("url")}getHref(){return this.attributes.get("href")}getFilename(){return this.attributes.get("filename")||""}getFilesize(){return this.attributes.get("filesize")}getFormattedFilesize(){let t=this.attributes.get("filesize");return typeof t=="number"?Dr.formatter(t):""}getExtension(){var t;return(t=this.getFilename().match(/\.(\w+)$/))===null||t===void 0?void 0:t[1].toLowerCase()}getContentType(){return this.attributes.get("contentType")}hasContent(){return this.attributes.has("content")}getContent(){return this.attributes.get("content")}getWidth(){return this.attributes.get("width")}getHeight(){return this.attributes.get("height")}getFile(){return this.file}setFile(t){if(this.file=t,this.isPreviewable())return this.preloadFile()}releaseFile(){this.releasePreloadedFile(),this.file=null}getUploadProgress(){return this.uploadProgress!=null?this.uploadProgress:0}setUploadProgress(t){var e,n;if(this.uploadProgress!==t)return this.uploadProgress=t,(e=this.uploadProgressDelegate)===null||e===void 0||(n=e.attachmentDidChangeUploadProgress)===null||n===void 0?void 0:n.call(e,this)}toJSON(){return this.getAttributes()}getCacheKey(){return[super.getCacheKey(...arguments),this.attributes.getCacheKey(),this.getPreviewURL()].join("/")}getPreviewURL(){return this.previewURL||this.preloadingURL}setPreviewURL(t){var e,n,r,o;if(t!==this.getPreviewURL())return this.previewURL=t,(e=this.previewDelegate)===null||e===void 0||(n=e.attachmentDidChangeAttributes)===null||n===void 0||n.call(e,this),(r=this.delegate)===null||r===void 0||(o=r.attachmentDidChangePreviewURL)===null||o===void 0?void 0:o.call(r,this)}preloadURL(){return this.preload(this.getURL(),this.releaseFile)}preloadFile(){if(this.file)return this.fileObjectURL=URL.createObjectURL(this.file),this.preload(this.fileObjectURL)}releasePreloadedFile(){this.fileObjectURL&&(URL.revokeObjectURL(this.fileObjectURL),this.fileObjectURL=null)}preload(t,e){if(t&&t!==this.getPreviewURL())return this.preloadingURL=t,new Ke(t).then(n=>{let{width:r,height:o}=n;return this.getWidth()&&this.getHeight()||this.setAttributes({width:r,height:o}),this.preloadingURL=null,this.setPreviewURL(t),e?.()}).catch(()=>(this.preloadingURL=null,e?.()))}};V(Kt,"previewablePattern",/^image(\/(gif|png|webp|jpe?g)|$)/);var Gt=class i extends gt{static fromJSON(t){return new this(Kt.fromJSON(t.attachment),t.attributes)}constructor(t){super(...arguments),this.attachment=t,this.length=1,this.ensureAttachmentExclusivelyHasAttribute("href"),this.attachment.hasContent()||this.removeProhibitedAttributes()}ensureAttachmentExclusivelyHasAttribute(t){this.hasAttribute(t)&&(this.attachment.hasAttribute(t)||this.attachment.setAttributes(this.attributes.slice([t])),this.attributes=this.attributes.remove(t))}removeProhibitedAttributes(){let t=this.attributes.slice(i.permittedAttributes);t.isEqualTo(this.attributes)||(this.attributes=t)}getValue(){return this.attachment}isSerializable(){return!this.attachment.isPending()}getCaption(){return this.attributes.get("caption")||""}isEqualTo(t){var e;return super.isEqualTo(t)&&this.attachment.id===(t==null||(e=t.attachment)===null||e===void 0?void 0:e.id)}toString(){return"\uFFFC"}toJSON(){let t=super.toJSON(...arguments);return t.attachment=this.attachment,t}getCacheKey(){return[super.getCacheKey(...arguments),this.attachment.getCacheKey()].join("/")}toConsole(){return JSON.stringify(this.toString())}};V(Gt,"permittedAttributes",["caption","presentation"]),gt.registerType("attachment",Gt);var Ae=class extends gt{static fromJSON(t){return new this(t.string,t.attributes)}constructor(t){super(...arguments),this.string=(e=>e.replace(/\r\n?/g,` +`))(t),this.length=this.string.length}getValue(){return this.string}toString(){return this.string.toString()}isBlockBreak(){return this.toString()===` +`&&this.getAttribute("blockBreak")===!0}toJSON(){let t=super.toJSON(...arguments);return t.string=this.string,t}canBeConsolidatedWith(t){return t&&this.hasSameConstructorAs(t)&&this.hasSameAttributesAsPiece(t)}consolidateWith(t){return new this.constructor(this.toString()+t.toString(),this.attributes)}splitAtOffset(t){let e,n;return t===0?(e=null,n=this):t===this.length?(e=this,n=null):(e=new this.constructor(this.string.slice(0,t),this.attributes),n=new this.constructor(this.string.slice(t),this.attributes)),[e,n]}toConsole(){let{string:t}=this;return t.length>15&&(t=t.slice(0,14)+"\u2026"),JSON.stringify(t.toString())}};gt.registerType("string",Ae);var Yt=class extends ht{static box(t){return t instanceof this?t:new this(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.objects=t.slice(0),this.length=this.objects.length}indexOf(t){return this.objects.indexOf(t)}splice(){for(var t=arguments.length,e=new Array(t),n=0;nt(e,n))}insertObjectAtIndex(t,e){return this.splice(e,0,t)}insertSplittableListAtIndex(t,e){return this.splice(e,0,...t.objects)}insertSplittableListAtPosition(t,e){let[n,r]=this.splitObjectAtPosition(e);return new this.constructor(n).insertSplittableListAtIndex(t,r)}editObjectAtIndex(t,e){return this.replaceObjectAtIndex(e(this.objects[t]),t)}replaceObjectAtIndex(t,e){return this.splice(e,1,t)}removeObjectAtIndex(t){return this.splice(t,1)}getObjectAtIndex(t){return this.objects[t]}getSplittableListInRange(t){let[e,n,r]=this.splitObjectsAtRange(t);return new this.constructor(e.slice(n,r+1))}selectSplittableList(t){let e=this.objects.filter(n=>t(n));return new this.constructor(e)}removeObjectsInRange(t){let[e,n,r]=this.splitObjectsAtRange(t);return new this.constructor(e).splice(n,r-n+1)}transformObjectsInRange(t,e){let[n,r,o]=this.splitObjectsAtRange(t),s=n.map((l,c)=>r<=c&&c<=o?e(l):l);return new this.constructor(s)}splitObjectsAtRange(t){let e,[n,r,o]=this.splitObjectAtPosition(bs(t));return[n,e]=new this.constructor(n).splitObjectAtPosition(vs(t)+o),[n,r,e-1]}getObjectAtPosition(t){let{index:e}=this.findIndexAndOffsetAtPosition(t);return this.objects[e]}splitObjectAtPosition(t){let e,n,{index:r,offset:o}=this.findIndexAndOffsetAtPosition(t),s=this.objects.slice(0);if(r!=null)if(o===0)e=r,n=0;else{let l=this.getObjectAtIndex(r),[c,u]=l.splitAtOffset(o);s.splice(r,1,c,u),e=r+1,n=c.getLength()-o}else e=s.length,n=0;return[s,e,n]}consolidate(){let t=[],e=this.objects[0];return this.objects.slice(1).forEach(n=>{var r,o;(r=(o=e).canBeConsolidatedWith)!==null&&r!==void 0&&r.call(o,n)?e=e.consolidateWith(n):(t.push(e),e=n)}),e&&t.push(e),new this.constructor(t)}consolidateFromIndexToIndex(t,e){let n=this.objects.slice(0).slice(t,e+1),r=new this.constructor(n).consolidate().toArray();return this.splice(t,n.length,...r)}findIndexAndOffsetAtPosition(t){let e,n=0;for(e=0;ethis.endPosition+=t.getLength())),this.endPosition}toString(){return this.objects.join("")}toArray(){return this.objects.slice(0)}toJSON(){return this.toArray()}isEqualTo(t){return super.isEqualTo(...arguments)||fs(this.objects,t?.objects)}contentsForInspection(){return{objects:"[".concat(this.objects.map(t=>t.inspect()).join(", "),"]")}}},fs=function(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(i.length!==t.length)return!1;let e=!0;for(let n=0;ni[0],vs=i=>i[1],K=class extends ht{static textForAttachmentWithAttributes(t,e){return new this([new Gt(t,e)])}static textForStringWithAttributes(t,e){return new this([new Ae(t,e)])}static fromJSON(t){return new this(Array.from(t).map(e=>gt.fromJSON(e)))}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments);let e=t.filter(n=>!n.isEmpty());this.pieceList=new Yt(e)}copy(){return this.copyWithPieceList(this.pieceList)}copyWithPieceList(t){return new this.constructor(t.consolidate().toArray())}copyUsingObjectMap(t){let e=this.getPieces().map(n=>t.find(n)||n);return new this.constructor(e)}appendText(t){return this.insertTextAtPosition(t,this.getLength())}insertTextAtPosition(t,e){return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t.pieceList,e))}removeTextAtRange(t){return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t))}replaceTextAtRange(t,e){return this.removeTextAtRange(e).insertTextAtPosition(t,e[0])}moveTextFromRangeToPosition(t,e){if(t[0]<=e&&e<=t[1])return;let n=this.getTextAtRange(t),r=n.getLength();return t[0]n.copyWithAdditionalAttributes(t)))}removeAttributeAtRange(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,n=>n.copyWithoutAttribute(t)))}setAttributesAtRange(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,n=>n.copyWithAttributes(t)))}getAttributesAtPosition(t){var e;return((e=this.pieceList.getObjectAtPosition(t))===null||e===void 0?void 0:e.getAttributes())||{}}getCommonAttributes(){let t=Array.from(this.pieceList.toArray()).map(e=>e.getAttributes());return X.fromCommonAttributesOfObjects(t).toObject()}getCommonAttributesAtRange(t){return this.getTextAtRange(t).getCommonAttributes()||{}}getExpandedRangeForAttributeAtOffset(t,e){let n,r=n=e,o=this.getLength();for(;r>0&&this.getCommonAttributesAtRange([r-1,n])[t];)r--;for(;n!!t.attachment)}getAttachments(){return this.getAttachmentPieces().map(t=>t.attachment)}getAttachmentAndPositionById(t){let e=0;for(let r of this.pieceList.toArray()){var n;if(((n=r.attachment)===null||n===void 0?void 0:n.id)===t)return{attachment:r.attachment,position:e};e+=r.length}return{attachment:null,position:null}}getAttachmentById(t){let{attachment:e}=this.getAttachmentAndPositionById(t);return e}getRangeOfAttachment(t){let e=this.getAttachmentAndPositionById(t.id),n=e.position;if(t=e.attachment)return[n,n+1]}updateAttributesForAttachment(t,e){let n=this.getRangeOfAttachment(e);return n?this.addAttributesAtRange(t,n):this}getLength(){return this.pieceList.getEndPosition()}isEmpty(){return this.getLength()===0}isEqualTo(t){var e;return super.isEqualTo(t)||(t==null||(e=t.pieceList)===null||e===void 0?void 0:e.isEqualTo(this.pieceList))}isBlockBreak(){return this.getLength()===1&&this.pieceList.getObjectAtIndex(0).isBlockBreak()}eachPiece(t){return this.pieceList.eachObject(t)}getPieces(){return this.pieceList.toArray()}getPieceAtPosition(t){return this.pieceList.getObjectAtPosition(t)}contentsForInspection(){return{pieceList:this.pieceList.inspect()}}toSerializableText(){let t=this.pieceList.selectSplittableList(e=>e.isSerializable());return this.copyWithPieceList(t)}toString(){return this.pieceList.toString()}toJSON(){return this.pieceList.toJSON()}toConsole(){return JSON.stringify(this.pieceList.toArray().map(t=>JSON.parse(t.toConsole())))}getDirection(){return Ro(this.toString())}isRTL(){return this.getDirection()==="rtl"}},bt=class i extends ht{static fromJSON(t){return new this(K.fromJSON(t.text),t.attributes,t.htmlAttributes)}constructor(t,e,n){super(...arguments),this.text=As(t||new K),this.attributes=e||[],this.htmlAttributes=n||{}}isEmpty(){return this.text.isBlockBreak()}isEqualTo(t){return!!super.isEqualTo(t)||this.text.isEqualTo(t?.text)&&It(this.attributes,t?.attributes)&&Zt(this.htmlAttributes,t?.htmlAttributes)}copyWithText(t){return new i(t,this.attributes,this.htmlAttributes)}copyWithoutText(){return this.copyWithText(null)}copyWithAttributes(t){return new i(this.text,t,this.htmlAttributes)}copyWithoutAttributes(){return this.copyWithAttributes(null)}copyUsingObjectMap(t){let e=t.find(this.text);return e?this.copyWithText(e):this.copyWithText(this.text.copyUsingObjectMap(t))}addAttribute(t){let e=this.attributes.concat(br(t));return this.copyWithAttributes(e)}addHTMLAttribute(t,e){let n=Object.assign({},this.htmlAttributes,{[t]:e});return new i(this.text,this.attributes,n)}removeAttribute(t){let{listAttribute:e}=L(t),n=Ar(Ar(this.attributes,t),e);return this.copyWithAttributes(n)}removeLastAttribute(){return this.removeAttribute(this.getLastAttribute())}getLastAttribute(){return vr(this.attributes)}getAttributes(){return this.attributes.slice(0)}getAttributeLevel(){return this.attributes.length}getAttributeAtLevel(t){return this.attributes[t-1]}hasAttribute(t){return this.attributes.includes(t)}hasAttributes(){return this.getAttributeLevel()>0}getLastNestableAttribute(){return vr(this.getNestableAttributes())}getNestableAttributes(){return this.attributes.filter(t=>L(t).nestable)}getNestingLevel(){return this.getNestableAttributes().length}decreaseNestingLevel(){let t=this.getLastNestableAttribute();return t?this.removeAttribute(t):this}increaseNestingLevel(){let t=this.getLastNestableAttribute();if(t){let e=this.attributes.lastIndexOf(t),n=vi(this.attributes,e+1,0,...br(t));return this.copyWithAttributes(n)}return this}getListItemAttributes(){return this.attributes.filter(t=>L(t).listAttribute)}isListItem(){var t;return(t=L(this.getLastAttribute()))===null||t===void 0?void 0:t.listAttribute}isTerminalBlock(){var t;return(t=L(this.getLastAttribute()))===null||t===void 0?void 0:t.terminal}breaksOnReturn(){var t;return(t=L(this.getLastAttribute()))===null||t===void 0?void 0:t.breakOnReturn}findLineBreakInDirectionFromPosition(t,e){let n=this.toString(),r;switch(t){case"forward":r=n.indexOf(` +`,e);break;case"backward":r=n.slice(0,e).lastIndexOf(` +`)}if(r!==-1)return r}contentsForInspection(){return{text:this.text.inspect(),attributes:this.attributes}}toString(){return this.text.toString()}toJSON(){return{text:this.text,attributes:this.attributes,htmlAttributes:this.htmlAttributes}}getDirection(){return this.text.getDirection()}isRTL(){return this.text.isRTL()}getLength(){return this.text.getLength()}canBeConsolidatedWith(t){return!this.hasAttributes()&&!t.hasAttributes()&&this.getDirection()===t.getDirection()}consolidateWith(t){let e=K.textForStringWithAttributes(` +`),n=this.getTextWithoutBlockBreak().appendText(e);return this.copyWithText(n.appendText(t.text))}splitAtOffset(t){let e,n;return t===0?(e=null,n=this):t===this.getLength()?(e=this,n=null):(e=this.copyWithText(this.text.getTextAtRange([0,t])),n=this.copyWithText(this.text.getTextAtRange([t,this.getLength()]))),[e,n]}getBlockBreakPosition(){return this.text.getLength()-1}getTextWithoutBlockBreak(){return Kr(this.text)?this.text.getTextAtRange([0,this.getBlockBreakPosition()]):this.text.copy()}canBeGrouped(t){return this.attributes[t]}canBeGroupedWith(t,e){let n=t.getAttributes(),r=n[e],o=this.attributes[e];return o===r&&!(L(o).group===!1&&!(()=>{if(!De){De=[];for(let s in U){let{listAttribute:l}=U[s];l!=null&&De.push(l)}}return De})().includes(n[e+1]))&&(this.getDirection()===t.getDirection()||t.isEmpty())}},As=function(i){return i=ys(i),i=Cs(i)},ys=function(i){let t=!1,e=i.getPieces(),n=e.slice(0,e.length-1),r=e[e.length-1];return r?(n=n.map(o=>o.isBlockBreak()?(t=!0,Es(o)):o),t?new K([...n,r]):i):i},xs=K.textForStringWithAttributes(` +`,{blockBreak:!0}),Cs=function(i){return Kr(i)?i:i.appendText(xs)},Kr=function(i){let t=i.getLength();return t===0?!1:i.getTextAtRange([t-1,t]).isBlockBreak()},Es=i=>i.copyWithoutAttribute("blockBreak"),br=function(i){let{listAttribute:t}=L(i);return t?[t,i]:[i]},vr=i=>i.slice(-1)[0],Ar=function(i,t){let e=i.lastIndexOf(t);return e===-1?i:vi(i,e,1)},q=class extends ht{static fromJSON(t){return new this(Array.from(t).map(e=>bt.fromJSON(e)))}static fromString(t,e){let n=K.textForStringWithAttributes(t,e);return new this([new bt(n)])}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),t.length===0&&(t=[new bt]),this.blockList=Yt.box(t)}isEmpty(){let t=this.getBlockAtIndex(0);return this.blockList.length===1&&t.isEmpty()&&!t.hasAttributes()}copy(){let t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).consolidateBlocks?this.blockList.consolidate().toArray():this.blockList.toArray();return new this.constructor(t)}copyUsingObjectsFromDocument(t){let e=new ni(t.getObjects());return this.copyUsingObjectMap(e)}copyUsingObjectMap(t){let e=this.getBlocks().map(n=>t.find(n)||n.copyUsingObjectMap(t));return new this.constructor(e)}copyWithBaseBlockAttributes(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=this.getBlocks().map(n=>{let r=t.concat(n.getAttributes());return n.copyWithAttributes(r)});return new this.constructor(e)}replaceBlock(t,e){let n=this.blockList.indexOf(t);return n===-1?this:new this.constructor(this.blockList.replaceObjectAtIndex(e,n))}insertDocumentAtRange(t,e){let{blockList:n}=t;e=y(e);let[r]=e,{index:o,offset:s}=this.locationFromPosition(r),l=this,c=this.getBlockAtPosition(r);return ut(e)&&c.isEmpty()&&!c.hasAttributes()?l=new this.constructor(l.blockList.removeObjectAtIndex(o)):c.getBlockBreakPosition()===s&&r++,l=l.removeTextAtRange(e),new this.constructor(l.blockList.insertSplittableListAtPosition(n,r))}mergeDocumentAtRange(t,e){let n,r;e=y(e);let[o]=e,s=this.locationFromPosition(o),l=this.getBlockAtIndex(s.index).getAttributes(),c=t.getBaseBlockAttributes(),u=l.slice(-c.length);if(It(c,u)){let T=l.slice(0,-c.length);n=t.copyWithBaseBlockAttributes(T)}else n=t.copy({consolidateBlocks:!0}).copyWithBaseBlockAttributes(l);let d=n.getBlockCount(),C=n.getBlockAtIndex(0);if(It(l,C.getAttributes())){let T=C.getTextWithoutBlockBreak();if(r=this.insertTextAtRange(T,e),d>1){n=new this.constructor(n.getBlocks().slice(1));let J=o+T.getLength();r=r.insertDocumentAtRange(n,J)}}else r=this.insertDocumentAtRange(n,e);return r}insertTextAtRange(t,e){e=y(e);let[n]=e,{index:r,offset:o}=this.locationFromPosition(n),s=this.removeTextAtRange(e);return new this.constructor(s.blockList.editObjectAtIndex(r,l=>l.copyWithText(l.text.insertTextAtPosition(t,o))))}removeTextAtRange(t){let e;t=y(t);let[n,r]=t;if(ut(t))return this;let[o,s]=Array.from(this.locationRangeFromRange(t)),l=o.index,c=o.offset,u=this.getBlockAtIndex(l),d=s.index,C=s.offset,T=this.getBlockAtIndex(d);if(r-n==1&&u.getBlockBreakPosition()===c&&T.getBlockBreakPosition()!==C&&T.text.getStringAtPosition(C)===` +`)e=this.blockList.editObjectAtIndex(d,J=>J.copyWithText(J.text.removeTextAtRange([C,C+1])));else{let J,Q=u.text.getTextAtRange([0,c]),M=T.text.getTextAtRange([C,T.getLength()]),mt=Q.appendText(M);J=l!==d&&c===0&&u.getAttributeLevel()>=T.getAttributeLevel()?T.copyWithText(mt):u.copyWithText(mt);let yt=d+1-l;e=this.blockList.splice(l,yt,J)}return new this.constructor(e)}moveTextFromRangeToPosition(t,e){let n;t=y(t);let[r,o]=t;if(r<=e&&e<=o)return this;let s=this.getDocumentAtRange(t),l=this.removeTextAtRange(t),c=rr=r.editObjectAtIndex(l,function(){return L(t)?o.addAttribute(t,e):s[0]===s[1]?o:o.copyWithText(o.text.addAttributeAtRange(t,e,s))})),new this.constructor(r)}addAttribute(t,e){let{blockList:n}=this;return this.eachBlock((r,o)=>n=n.editObjectAtIndex(o,()=>r.addAttribute(t,e))),new this.constructor(n)}removeAttributeAtRange(t,e){let{blockList:n}=this;return this.eachBlockAtRange(e,function(r,o,s){L(t)?n=n.editObjectAtIndex(s,()=>r.removeAttribute(t)):o[0]!==o[1]&&(n=n.editObjectAtIndex(s,()=>r.copyWithText(r.text.removeAttributeAtRange(t,o))))}),new this.constructor(n)}updateAttributesForAttachment(t,e){let n=this.getRangeOfAttachment(e),[r]=Array.from(n),{index:o}=this.locationFromPosition(r),s=this.getTextAtIndex(o);return new this.constructor(this.blockList.editObjectAtIndex(o,l=>l.copyWithText(s.updateAttributesForAttachment(t,e))))}removeAttributeForAttachment(t,e){let n=this.getRangeOfAttachment(e);return this.removeAttributeAtRange(t,n)}setHTMLAttributeAtPosition(t,e,n){let r=this.getBlockAtPosition(t),o=r.addHTMLAttribute(e,n);return this.replaceBlock(r,o)}insertBlockBreakAtRange(t){let e;t=y(t);let[n]=t,{offset:r}=this.locationFromPosition(n),o=this.removeTextAtRange(t);return r===0&&(e=[new bt]),new this.constructor(o.blockList.insertSplittableListAtPosition(new Yt(e),n))}applyBlockAttributeAtRange(t,e,n){let r=this.expandRangeToLineBreaksAndSplitBlocks(n),o=r.document;n=r.range;let s=L(t);if(s.listAttribute){o=o.removeLastListAttributeAtRange(n,{exceptAttributeName:t});let l=o.convertLineBreaksToBlockBreaksInRange(n);o=l.document,n=l.range}else o=s.exclusive?o.removeBlockAttributesAtRange(n):s.terminal?o.removeLastTerminalAttributeAtRange(n):o.consolidateBlocksAtRange(n);return o.addAttributeAtRange(t,e,n)}removeLastListAttributeAtRange(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{blockList:n}=this;return this.eachBlockAtRange(t,function(r,o,s){let l=r.getLastAttribute();l&&L(l).listAttribute&&l!==e.exceptAttributeName&&(n=n.editObjectAtIndex(s,()=>r.removeAttribute(l)))}),new this.constructor(n)}removeLastTerminalAttributeAtRange(t){let{blockList:e}=this;return this.eachBlockAtRange(t,function(n,r,o){let s=n.getLastAttribute();s&&L(s).terminal&&(e=e.editObjectAtIndex(o,()=>n.removeAttribute(s)))}),new this.constructor(e)}removeBlockAttributesAtRange(t){let{blockList:e}=this;return this.eachBlockAtRange(t,function(n,r,o){n.hasAttributes()&&(e=e.editObjectAtIndex(o,()=>n.copyWithoutAttributes()))}),new this.constructor(e)}expandRangeToLineBreaksAndSplitBlocks(t){let e;t=y(t);let[n,r]=t,o=this.locationFromPosition(n),s=this.locationFromPosition(r),l=this,c=l.getBlockAtIndex(o.index);if(o.offset=c.findLineBreakInDirectionFromPosition("backward",o.offset),o.offset!=null&&(e=l.positionFromLocation(o),l=l.insertBlockBreakAtRange([e,e+1]),s.index+=1,s.offset-=l.getBlockAtIndex(o.index).getLength(),o.index+=1),o.offset=0,s.offset===0&&s.index>o.index)s.index-=1,s.offset=l.getBlockAtIndex(s.index).getBlockBreakPosition();else{let u=l.getBlockAtIndex(s.index);u.text.getStringAtRange([s.offset-1,s.offset])===` +`?s.offset-=1:s.offset=u.findLineBreakInDirectionFromPosition("forward",s.offset),s.offset!==u.getBlockBreakPosition()&&(e=l.positionFromLocation(s),l=l.insertBlockBreakAtRange([e,e+1]))}return n=l.positionFromLocation(o),r=l.positionFromLocation(s),{document:l,range:t=y([n,r])}}convertLineBreaksToBlockBreaksInRange(t){t=y(t);let[e]=t,n=this.getStringAtRange(t).slice(0,-1),r=this;return n.replace(/.*?\n/g,function(o){e+=o.length,r=r.insertBlockBreakAtRange([e-1,e])}),{document:r,range:t}}consolidateBlocksAtRange(t){t=y(t);let[e,n]=t,r=this.locationFromPosition(e).index,o=this.locationFromPosition(n).index;return new this.constructor(this.blockList.consolidateFromIndexToIndex(r,o))}getDocumentAtRange(t){t=y(t);let e=this.blockList.getSplittableListInRange(t).toArray();return new this.constructor(e)}getStringAtRange(t){let e,n=t=y(t);return n[n.length-1]!==this.getLength()&&(e=-1),this.getDocumentAtRange(t).toString().slice(0,e)}getBlockAtIndex(t){return this.blockList.getObjectAtIndex(t)}getBlockAtPosition(t){let{index:e}=this.locationFromPosition(t);return this.getBlockAtIndex(e)}getTextAtIndex(t){var e;return(e=this.getBlockAtIndex(t))===null||e===void 0?void 0:e.text}getTextAtPosition(t){let{index:e}=this.locationFromPosition(t);return this.getTextAtIndex(e)}getPieceAtPosition(t){let{index:e,offset:n}=this.locationFromPosition(t);return this.getTextAtIndex(e).getPieceAtPosition(n)}getCharacterAtPosition(t){let{index:e,offset:n}=this.locationFromPosition(t);return this.getTextAtIndex(e).getStringAtRange([n,n+1])}getLength(){return this.blockList.getEndPosition()}getBlocks(){return this.blockList.toArray()}getBlockCount(){return this.blockList.length}getEditCount(){return this.editCount}eachBlock(t){return this.blockList.eachObject(t)}eachBlockAtRange(t,e){let n,r;t=y(t);let[o,s]=t,l=this.locationFromPosition(o),c=this.locationFromPosition(s);if(l.index===c.index)return n=this.getBlockAtIndex(l.index),r=[l.offset,c.offset],e(n,r,l.index);for(let u=l.index;u<=c.index;u++)if(n=this.getBlockAtIndex(u),n){switch(u){case l.index:r=[l.offset,n.text.getLength()];break;case c.index:r=[0,c.offset];break;default:r=[0,n.text.getLength()]}e(n,r,u)}}getCommonAttributesAtRange(t){t=y(t);let[e]=t;if(ut(t))return this.getCommonAttributesAtPosition(e);{let n=[],r=[];return this.eachBlockAtRange(t,function(o,s){if(s[0]!==s[1])return n.push(o.text.getCommonAttributesAtRange(s)),r.push(yr(o))}),X.fromCommonAttributesOfObjects(n).merge(X.fromCommonAttributesOfObjects(r)).toObject()}}getCommonAttributesAtPosition(t){let e,n,{index:r,offset:o}=this.locationFromPosition(t),s=this.getBlockAtIndex(r);if(!s)return{};let l=yr(s),c=s.text.getAttributesAtPosition(o),u=s.text.getAttributesAtPosition(o-1),d=Object.keys(Dt).filter(C=>Dt[C].inheritable);for(e in u)n=u[e],(n===c[e]||d.includes(e))&&(l[e]=n);return l}getRangeOfCommonAttributeAtPosition(t,e){let{index:n,offset:r}=this.locationFromPosition(e),o=this.getTextAtIndex(n),[s,l]=Array.from(o.getExpandedRangeForAttributeAtOffset(t,r)),c=this.positionFromLocation({index:n,offset:s}),u=this.positionFromLocation({index:n,offset:l});return y([c,u])}getBaseBlockAttributes(){let t=this.getBlockAtIndex(0).getAttributes();for(let e=1;e{let o=[];for(let s=0;s{let{text:n}=e;return t=t.concat(n.getAttachmentPieces())}),t}getAttachments(){return this.getAttachmentPieces().map(t=>t.attachment)}getRangeOfAttachment(t){let e=0,n=this.blockList.toArray();for(let r=0;r{let o=r.getLength();r.hasAttribute(t)&&n.push([e,e+o]),e+=o}),n}findRangesForTextAttribute(t){let{withValue:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=0,r=[],o=[];return this.getPieces().forEach(s=>{let l=s.getLength();(function(c){return e?c.getAttribute(t)===e:c.hasAttribute(t)})(s)&&(r[1]===n?r[1]=n+l:o.push(r=[n,n+l])),n+=l}),o}locationFromPosition(t){let e=this.blockList.findIndexAndOffsetAtPosition(Math.max(0,t));if(e.index!=null)return e;{let n=this.getBlocks();return{index:n.length-1,offset:n[n.length-1].getLength()}}}positionFromLocation(t){return this.blockList.findPositionAtIndexAndOffset(t.index,t.offset)}locationRangeFromPosition(t){return y(this.locationFromPosition(t))}locationRangeFromRange(t){if(!(t=y(t)))return;let[e,n]=Array.from(t),r=this.locationFromPosition(e),o=this.locationFromPosition(n);return y([r,o])}rangeFromLocationRange(t){let e;t=y(t);let n=this.positionFromLocation(t[0]);return ut(t)||(e=this.positionFromLocation(t[1])),y([n,e])}isEqualTo(t){return this.blockList.isEqualTo(t?.blockList)}getTexts(){return this.getBlocks().map(t=>t.text)}getPieces(){let t=[];return Array.from(this.getTexts()).forEach(e=>{t.push(...Array.from(e.getPieces()||[]))}),t}getObjects(){return this.getBlocks().concat(this.getTexts()).concat(this.getPieces())}toSerializableDocument(){let t=[];return this.blockList.eachObject(e=>t.push(e.copyWithText(e.text.toSerializableText()))),new this.constructor(t)}toString(){return this.blockList.toString()}toJSON(){return this.blockList.toJSON()}toConsole(){return JSON.stringify(this.blockList.toArray().map(t=>JSON.parse(t.text.toConsole())))}},yr=function(i){let t={},e=i.getLastAttribute();return e&&(t[e]=!0),t},jn=function(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return{string:i=he(i),attributes:t,type:"string"}},xr=(i,t)=>{try{return JSON.parse(i.getAttribute("data-trix-".concat(t)))}catch{return{}}},Ft=class extends R{static parse(t,e){let n=new this(t,e);return n.parse(),n}constructor(t){let{referenceElement:e,purifyOptions:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.html=t,this.referenceElement=e,this.purifyOptions=n,this.blocks=[],this.blockElements=[],this.processedElements=[]}getDocument(){return q.fromJSON(this.blocks)}parse(){try{this.createHiddenContainer(),qt.setHTML(this.containerElement,this.html,{purifyOptions:this.purifyOptions});let t=je(this.containerElement,{usingFilter:ks});for(;t.nextNode();)this.processNode(t.currentNode);return this.translateBlockElementMarginsToNewlines()}finally{this.removeHiddenContainer()}}createHiddenContainer(){return this.referenceElement?(this.containerElement=this.referenceElement.cloneNode(!1),this.containerElement.removeAttribute("id"),this.containerElement.setAttribute("data-trix-internal",""),this.containerElement.style.display="none",this.referenceElement.parentNode.insertBefore(this.containerElement,this.referenceElement.nextSibling)):(this.containerElement=p({tagName:"div",style:{display:"none"}}),document.body.appendChild(this.containerElement))}removeHiddenContainer(){return At(this.containerElement)}processNode(t){switch(t.nodeType){case Node.TEXT_NODE:if(!this.isInsignificantTextNode(t))return this.appendBlockForTextNode(t),this.processTextNode(t);break;case Node.ELEMENT_NODE:return this.appendBlockForElement(t),this.processElement(t)}}appendBlockForTextNode(t){let e=t.parentNode;if(e===this.currentBlockElement&&this.isBlockElement(t.previousSibling))return this.appendStringWithAttributes(` +`);if(e===this.containerElement||this.isBlockElement(e)){var n;let r=this.getBlockAttributes(e),o=this.getBlockHTMLAttributes(e);It(r,(n=this.currentBlock)===null||n===void 0?void 0:n.attributes)||(this.currentBlock=this.appendBlockForAttributesWithElement(r,e,o),this.currentBlockElement=e)}}appendBlockForElement(t){let e=this.isBlockElement(t),n=kt(this.currentBlockElement,t);if(e&&!this.isBlockElement(t.firstChild)){if(!this.isInsignificantTextNode(t.firstChild)||!this.isBlockElement(t.firstElementChild)){let r=this.getBlockAttributes(t),o=this.getBlockHTMLAttributes(t);if(t.firstChild){if(n&&It(r,this.currentBlock.attributes))return this.appendStringWithAttributes(` +`);this.currentBlock=this.appendBlockForAttributesWithElement(r,t,o),this.currentBlockElement=t}}}else if(this.currentBlockElement&&!n&&!e){let r=this.findParentBlockElement(t);if(r)return this.appendBlockForElement(r);this.currentBlock=this.appendEmptyBlock(),this.currentBlockElement=null}}findParentBlockElement(t){let{parentElement:e}=t;for(;e&&e!==this.containerElement;){if(this.isBlockElement(e)&&this.blockElements.includes(e))return e;e=e.parentElement}return null}processTextNode(t){let e=t.data;var n;return Cr(t.parentNode)||(e=xi(e),Gr((n=t.previousSibling)===null||n===void 0?void 0:n.textContent)&&(e=Rs(e))),this.appendStringWithAttributes(e,this.getTextAttributes(t.parentNode))}processElement(t){let e;if(Tt(t)){if(e=xr(t,"attachment"),Object.keys(e).length){let n=this.getTextAttributes(t);this.appendAttachmentWithAttributes(e,n),t.innerHTML=""}return this.processedElements.push(t)}switch(W(t)){case"br":return this.isExtraBR(t)||this.isBlockElement(t.nextSibling)||this.appendStringWithAttributes(` +`,this.getTextAttributes(t)),this.processedElements.push(t);case"img":e={url:t.getAttribute("src"),contentType:"image"};let n=(r=>{let o=r.getAttribute("width"),s=r.getAttribute("height"),l={};return o&&(l.width=parseInt(o,10)),s&&(l.height=parseInt(s,10)),l})(t);for(let r in n){let o=n[r];e[r]=o}return this.appendAttachmentWithAttributes(e,this.getTextAttributes(t)),this.processedElements.push(t);case"tr":if(this.needsTableSeparator(t))return this.appendStringWithAttributes(Me.tableRowSeparator);break;case"td":if(this.needsTableSeparator(t))return this.appendStringWithAttributes(Me.tableCellSeparator)}}appendBlockForAttributesWithElement(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.blockElements.push(e);let r=function(){return{text:[],attributes:arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},htmlAttributes:arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}}}(t,n);return this.blocks.push(r),r}appendEmptyBlock(){return this.appendBlockForAttributesWithElement([],null)}appendStringWithAttributes(t,e){return this.appendPiece(jn(t,e))}appendAttachmentWithAttributes(t,e){return this.appendPiece(function(n){return{attachment:n,attributes:arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},type:"attachment"}}(t,e))}appendPiece(t){return this.blocks.length===0&&this.appendEmptyBlock(),this.blocks[this.blocks.length-1].text.push(t)}appendStringToTextAtIndex(t,e){let{text:n}=this.blocks[e],r=n[n.length-1];if(r?.type!=="string")return n.push(jn(t));r.string+=t}prependStringToTextAtIndex(t,e){let{text:n}=this.blocks[e],r=n[0];if(r?.type!=="string")return n.unshift(jn(t));r.string=t+r.string}getTextAttributes(t){let e,n={};for(let r in Dt){let o=Dt[r];if(o.tagName&&vt(t,{matchingSelector:o.tagName,untilNode:this.containerElement}))n[r]=!0;else if(o.parser){if(e=o.parser(t),e){let s=!1;for(let l of this.findBlockElementAncestors(t))if(o.parser(l)===e){s=!0;break}s||(n[r]=e)}}else o.styleProperty&&(e=t.style[o.styleProperty],e&&(n[r]=e))}if(Tt(t)){let r=xr(t,"attributes");for(let o in r)e=r[o],n[o]=e}return n}getBlockAttributes(t){let e=[];for(;t&&t!==this.containerElement;){for(let r in U){let o=U[r];var n;o.parse!==!1&&W(t)===o.tagName&&((n=o.test)!==null&&n!==void 0&&n.call(o,t)||!o.test)&&(e.push(r),o.listAttribute&&e.push(o.listAttribute))}t=t.parentNode}return e.reverse()}getBlockHTMLAttributes(t){let e={},n=Object.values(U).find(r=>r.tagName===W(t));return(n?.htmlAttributes||[]).forEach(r=>{t.hasAttribute(r)&&(e[r]=t.getAttribute(r))}),e}findBlockElementAncestors(t){let e=[];for(;t&&t!==this.containerElement;){let n=W(t);ge().includes(n)&&e.push(t),t=t.parentNode}return e}isBlockElement(t){if(t?.nodeType===Node.ELEMENT_NODE&&!Tt(t)&&!vt(t,{matchingSelector:"td",untilNode:this.containerElement}))return ge().includes(W(t))||window.getComputedStyle(t).display==="block"}isInsignificantTextNode(t){if(t?.nodeType!==Node.TEXT_NODE||!Ts(t.data))return;let{parentNode:e,previousSibling:n,nextSibling:r}=t;return Ss(e.previousSibling)&&!this.isBlockElement(e.previousSibling)||Cr(e)?void 0:!n||this.isBlockElement(n)||!r||this.isBlockElement(r)}isExtraBR(t){return W(t)==="br"&&this.isBlockElement(t.parentNode)&&t.parentNode.lastChild===t}needsTableSeparator(t){if(Me.removeBlankTableCells){var e;let n=(e=t.previousSibling)===null||e===void 0?void 0:e.textContent;return n&&/\S/.test(n)}return t.previousSibling}translateBlockElementMarginsToNewlines(){let t=this.getMarginOfDefaultBlockElement();for(let e=0;e2*t.top&&this.prependStringToTextAtIndex(` +`,e),n.bottom>2*t.bottom&&this.appendStringToTextAtIndex(` +`,e))}}getMarginOfBlockElementAtIndex(t){let e=this.blockElements[t];if(e&&e.textContent&&!ge().includes(W(e))&&!this.processedElements.includes(e))return Er(e)}getMarginOfDefaultBlockElement(){let t=p(U.default.tagName);return this.containerElement.appendChild(t),Er(t)}},Cr=function(i){let{whiteSpace:t}=window.getComputedStyle(i);return["pre","pre-wrap","pre-line"].includes(t)},Ss=i=>i&&!Gr(i.textContent),Er=function(i){let t=window.getComputedStyle(i);if(t.display==="block")return{top:parseInt(t.marginTop),bottom:parseInt(t.marginBottom)}},ks=function(i){return W(i)==="style"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},Rs=i=>i.replace(new RegExp("^".concat(yi.source,"+")),""),Ts=i=>new RegExp("^".concat(yi.source,"*$")).test(i),Gr=i=>/\s$/.test(i),ws=["contenteditable","data-trix-id","data-trix-store-key","data-trix-mutable","data-trix-placeholder","tabindex"],ai="data-trix-serialized-attributes",Ls="[".concat(ai,"]"),Ds=new RegExp("","g"),Ns={"application/json":function(i){let t;if(i instanceof q)t=i;else{if(!(i instanceof HTMLElement))throw new Error("unserializable object");t=Ft.parse(i.innerHTML).getDocument()}return t.toSerializableDocument().toJSONString()},"text/html":function(i){let t;if(i instanceof q)t=Jt.render(i);else{if(!(i instanceof HTMLElement))throw new Error("unserializable object");t=i.cloneNode(!0)}return Array.from(t.querySelectorAll("[data-trix-serialize=false]")).forEach(e=>{At(e)}),ws.forEach(e=>{Array.from(t.querySelectorAll("[".concat(e,"]"))).forEach(n=>{n.removeAttribute(e)})}),Array.from(t.querySelectorAll(Ls)).forEach(e=>{try{let n=JSON.parse(e.getAttribute(ai));e.removeAttribute(ai);for(let r in n){let o=n[r];e.setAttribute(r,o)}}catch{}}),t.innerHTML.replace(Ds,"")}},Is=Object.freeze({__proto__:null}),E=class extends R{constructor(t,e){super(...arguments),this.attachmentManager=t,this.attachment=e,this.id=this.attachment.id,this.file=this.attachment.file}remove(){return this.attachmentManager.requestRemovalOfAttachment(this.attachment)}};E.proxyMethod("attachment.getAttribute"),E.proxyMethod("attachment.hasAttribute"),E.proxyMethod("attachment.setAttribute"),E.proxyMethod("attachment.getAttributes"),E.proxyMethod("attachment.setAttributes"),E.proxyMethod("attachment.isPending"),E.proxyMethod("attachment.isPreviewable"),E.proxyMethod("attachment.getURL"),E.proxyMethod("attachment.getHref"),E.proxyMethod("attachment.getFilename"),E.proxyMethod("attachment.getFilesize"),E.proxyMethod("attachment.getFormattedFilesize"),E.proxyMethod("attachment.getExtension"),E.proxyMethod("attachment.getContentType"),E.proxyMethod("attachment.getFile"),E.proxyMethod("attachment.setFile"),E.proxyMethod("attachment.releaseFile"),E.proxyMethod("attachment.getUploadProgress"),E.proxyMethod("attachment.setUploadProgress");var Ge=class extends R{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.managedAttachments={},Array.from(t).forEach(e=>{this.manageAttachment(e)})}getAttachments(){let t=[];for(let e in this.managedAttachments){let n=this.managedAttachments[e];t.push(n)}return t}manageAttachment(t){return this.managedAttachments[t.id]||(this.managedAttachments[t.id]=new E(this,t)),this.managedAttachments[t.id]}attachmentIsManaged(t){return t.id in this.managedAttachments}requestRemovalOfAttachment(t){var e,n;if(this.attachmentIsManaged(t))return(e=this.delegate)===null||e===void 0||(n=e.attachmentManagerDidRequestRemovalOfAttachment)===null||n===void 0?void 0:n.call(e,t)}unmanageAttachment(t){let e=this.managedAttachments[t.id];return delete this.managedAttachments[t.id],e}},Ye=class{constructor(t){this.composition=t,this.document=this.composition.document;let e=this.composition.getSelectedRange();this.startPosition=e[0],this.endPosition=e[1],this.startLocation=this.document.locationFromPosition(this.startPosition),this.endLocation=this.document.locationFromPosition(this.endPosition),this.block=this.document.getBlockAtIndex(this.endLocation.index),this.breaksOnReturn=this.block.breaksOnReturn(),this.previousCharacter=this.block.text.getStringAtPosition(this.endLocation.offset-1),this.nextCharacter=this.block.text.getStringAtPosition(this.endLocation.offset)}shouldInsertBlockBreak(){return this.block.hasAttributes()&&this.block.isListItem()&&!this.block.isEmpty()?this.startLocation.offset!==0:this.breaksOnReturn&&this.nextCharacter!==` +`}shouldBreakFormattedBlock(){return this.block.hasAttributes()&&!this.block.isListItem()&&(this.breaksOnReturn&&this.nextCharacter===` +`||this.previousCharacter===` +`)}shouldDecreaseListLevel(){return this.block.hasAttributes()&&this.block.isListItem()&&this.block.isEmpty()}shouldPrependListItem(){return this.block.isListItem()&&this.startLocation.offset===0&&!this.block.isEmpty()}shouldRemoveLastBlockAttribute(){return this.block.hasAttributes()&&!this.block.isListItem()&&this.block.isEmpty()}},it=class extends R{constructor(){super(...arguments),this.document=new q,this.attachments=[],this.currentAttributes={},this.revision=0}setDocument(t){var e,n;if(!t.isEqualTo(this.document))return this.document=t,this.refreshAttachments(),this.revision++,(e=this.delegate)===null||e===void 0||(n=e.compositionDidChangeDocument)===null||n===void 0?void 0:n.call(e,t)}getSnapshot(){return{document:this.document,selectedRange:this.getSelectedRange()}}loadSnapshot(t){var e,n,r,o;let{document:s,selectedRange:l}=t;return(e=this.delegate)===null||e===void 0||(n=e.compositionWillLoadSnapshot)===null||n===void 0||n.call(e),this.setDocument(s??new q),this.setSelection(l??[0,0]),(r=this.delegate)===null||r===void 0||(o=r.compositionDidLoadSnapshot)===null||o===void 0?void 0:o.call(r)}insertText(t){let{updatePosition:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{updatePosition:!0},n=this.getSelectedRange();this.setDocument(this.document.insertTextAtRange(t,n));let r=n[0],o=r+t.getLength();return e&&this.setSelection(o),this.notifyDelegateOfInsertionAtRange([r,o])}insertBlock(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new bt,e=new q([t]);return this.insertDocument(e)}insertDocument(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new q,e=this.getSelectedRange();this.setDocument(this.document.insertDocumentAtRange(t,e));let n=e[0],r=n+t.getLength();return this.setSelection(r),this.notifyDelegateOfInsertionAtRange([n,r])}insertString(t,e){let n=this.getCurrentTextAttributes(),r=K.textForStringWithAttributes(t,n);return this.insertText(r,e)}insertBlockBreak(){let t=this.getSelectedRange();this.setDocument(this.document.insertBlockBreakAtRange(t));let e=t[0],n=e+1;return this.setSelection(n),this.notifyDelegateOfInsertionAtRange([e,n])}insertLineBreak(){let t=new Ye(this);if(t.shouldDecreaseListLevel())return this.decreaseListLevel(),this.setSelection(t.startPosition);if(t.shouldPrependListItem()){let e=new q([t.block.copyWithoutText()]);return this.insertDocument(e)}return t.shouldInsertBlockBreak()?this.insertBlockBreak():t.shouldRemoveLastBlockAttribute()?this.removeLastBlockAttribute():t.shouldBreakFormattedBlock()?this.breakFormattedBlock(t):this.insertString(` +`)}insertHTML(t){let e=Ft.parse(t,{purifyOptions:{SAFE_FOR_XML:!0}}).getDocument(),n=this.getSelectedRange();this.setDocument(this.document.mergeDocumentAtRange(e,n));let r=n[0],o=r+e.getLength()-1;return this.setSelection(o),this.notifyDelegateOfInsertionAtRange([r,o])}replaceHTML(t){let e=Ft.parse(t).getDocument().copyUsingObjectsFromDocument(this.document),n=this.getLocationRange({strict:!1}),r=this.document.rangeFromLocationRange(n);return this.setDocument(e),this.setSelection(r)}insertFile(t){return this.insertFiles([t])}insertFiles(t){let e=[];return Array.from(t).forEach(n=>{var r;if((r=this.delegate)!==null&&r!==void 0&&r.compositionShouldAcceptFile(n)){let o=Kt.attachmentForFile(n);e.push(o)}}),this.insertAttachments(e)}insertAttachment(t){return this.insertAttachments([t])}insertAttachments(t){let e=new K;return Array.from(t).forEach(n=>{var r;let o=n.getType(),s=(r=mi[o])===null||r===void 0?void 0:r.presentation,l=this.getCurrentTextAttributes();s&&(l.presentation=s);let c=K.textForAttachmentWithAttributes(n,l);e=e.appendText(c)}),this.insertText(e)}shouldManageDeletingInDirection(t){let e=this.getLocationRange();if(ut(e)){if(t==="backward"&&e[0].offset===0||this.shouldManageMovingCursorInDirection(t))return!0}else if(e[0].index!==e[1].index)return!0;return!1}deleteInDirection(t){let e,n,r,{length:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getLocationRange(),l=this.getSelectedRange(),c=ut(l);if(c?n=t==="backward"&&s[0].offset===0:r=s[0].index!==s[1].index,n&&this.canDecreaseBlockAttributeLevel()){let u=this.getBlock();if(u.isListItem()?this.decreaseListLevel():this.decreaseBlockAttributeLevel(),this.setSelection(l[0]),u.isEmpty())return!1}return c&&(l=this.getExpandedRangeInDirection(t,{length:o}),t==="backward"&&(e=this.getAttachmentAtRange(l))),e?(this.editAttachment(e),!1):(this.setDocument(this.document.removeTextAtRange(l)),this.setSelection(l[0]),!n&&!r&&void 0)}moveTextFromRange(t){let[e]=Array.from(this.getSelectedRange());return this.setDocument(this.document.moveTextFromRangeToPosition(t,e)),this.setSelection(e)}removeAttachment(t){let e=this.document.getRangeOfAttachment(t);if(e)return this.stopEditingAttachment(),this.setDocument(this.document.removeTextAtRange(e)),this.setSelection(e[0])}removeLastBlockAttribute(){let[t,e]=Array.from(this.getSelectedRange()),n=this.document.getBlockAtPosition(e);return this.removeCurrentAttribute(n.getLastAttribute()),this.setSelection(t)}insertPlaceholder(){return this.placeholderPosition=this.getPosition(),this.insertString(" ")}selectPlaceholder(){if(this.placeholderPosition!=null)return this.setSelectedRange([this.placeholderPosition,this.placeholderPosition+1]),this.getSelectedRange()}forgetPlaceholder(){this.placeholderPosition=null}hasCurrentAttribute(t){let e=this.currentAttributes[t];return e!=null&&e!==!1}toggleCurrentAttribute(t){let e=!this.currentAttributes[t];return e?this.setCurrentAttribute(t,e):this.removeCurrentAttribute(t)}canSetCurrentAttribute(t){return L(t)?this.canSetCurrentBlockAttribute(t):this.canSetCurrentTextAttribute(t)}canSetCurrentTextAttribute(t){let e=this.getSelectedDocument();if(e){for(let n of Array.from(e.getAttachments()))if(!n.hasContent())return!1;return!0}}canSetCurrentBlockAttribute(t){let e=this.getBlock();if(e)return!e.isTerminalBlock()}setCurrentAttribute(t,e){return L(t)?this.setBlockAttribute(t,e):(this.setTextAttribute(t,e),this.currentAttributes[t]=e,this.notifyDelegateOfCurrentAttributesChange())}setHTMLAtributeAtPosition(t,e,n){var r;let o=this.document.getBlockAtPosition(t),s=(r=L(o.getLastAttribute()))===null||r===void 0?void 0:r.htmlAttributes;if(o&&s!=null&&s.includes(e)){let l=this.document.setHTMLAttributeAtPosition(t,e,n);this.setDocument(l)}}setTextAttribute(t,e){let n=this.getSelectedRange();if(!n)return;let[r,o]=Array.from(n);if(r!==o)return this.setDocument(this.document.addAttributeAtRange(t,e,n));if(t==="href"){let s=K.textForStringWithAttributes(e,{href:e});return this.insertText(s)}}setBlockAttribute(t,e){let n=this.getSelectedRange();if(this.canSetCurrentAttribute(t))return this.setDocument(this.document.applyBlockAttributeAtRange(t,e,n)),this.setSelection(n)}removeCurrentAttribute(t){return L(t)?(this.removeBlockAttribute(t),this.updateCurrentAttributes()):(this.removeTextAttribute(t),delete this.currentAttributes[t],this.notifyDelegateOfCurrentAttributesChange())}removeTextAttribute(t){let e=this.getSelectedRange();if(e)return this.setDocument(this.document.removeAttributeAtRange(t,e))}removeBlockAttribute(t){let e=this.getSelectedRange();if(e)return this.setDocument(this.document.removeAttributeAtRange(t,e))}canDecreaseNestingLevel(){var t;return((t=this.getBlock())===null||t===void 0?void 0:t.getNestingLevel())>0}canIncreaseNestingLevel(){var t;let e=this.getBlock();if(e){if((t=L(e.getLastNestableAttribute()))===null||t===void 0||!t.listAttribute)return e.getNestingLevel()>0;{let n=this.getPreviousBlock();if(n)return function(){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return It((arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).slice(0,r.length),r)}(n.getListItemAttributes(),e.getListItemAttributes())}}}decreaseNestingLevel(){let t=this.getBlock();if(t)return this.setDocument(this.document.replaceBlock(t,t.decreaseNestingLevel()))}increaseNestingLevel(){let t=this.getBlock();if(t)return this.setDocument(this.document.replaceBlock(t,t.increaseNestingLevel()))}canDecreaseBlockAttributeLevel(){var t;return((t=this.getBlock())===null||t===void 0?void 0:t.getAttributeLevel())>0}decreaseBlockAttributeLevel(){var t;let e=(t=this.getBlock())===null||t===void 0?void 0:t.getLastAttribute();if(e)return this.removeCurrentAttribute(e)}decreaseListLevel(){let[t]=Array.from(this.getSelectedRange()),{index:e}=this.document.locationFromPosition(t),n=e,r=this.getBlock().getAttributeLevel(),o=this.document.getBlockAtIndex(n+1);for(;o&&o.isListItem()&&!(o.getAttributeLevel()<=r);)n++,o=this.document.getBlockAtIndex(n+1);t=this.document.positionFromLocation({index:e,offset:0});let s=this.document.positionFromLocation({index:n,offset:0});return this.setDocument(this.document.removeLastListAttributeAtRange([t,s]))}updateCurrentAttributes(){let t=this.getSelectedRange({ignoreLock:!0});if(t){let e=this.document.getCommonAttributesAtRange(t);if(Array.from(Qn()).forEach(n=>{e[n]||this.canSetCurrentAttribute(n)||(e[n]=!1)}),!Zt(e,this.currentAttributes))return this.currentAttributes=e,this.notifyDelegateOfCurrentAttributesChange()}}getCurrentAttributes(){return Nr.call({},this.currentAttributes)}getCurrentTextAttributes(){let t={};for(let e in this.currentAttributes){let n=this.currentAttributes[e];n!==!1&&ti(e)&&(t[e]=n)}return t}freezeSelection(){return this.setCurrentAttribute("frozen",!0)}thawSelection(){return this.removeCurrentAttribute("frozen")}hasFrozenSelection(){return this.hasCurrentAttribute("frozen")}setSelection(t){var e;let n=this.document.locationRangeFromRange(t);return(e=this.delegate)===null||e===void 0?void 0:e.compositionDidRequestChangingSelectionToLocationRange(n)}getSelectedRange(){let t=this.getLocationRange();if(t)return this.document.rangeFromLocationRange(t)}setSelectedRange(t){let e=this.document.locationRangeFromRange(t);return this.getSelectionManager().setLocationRange(e)}getPosition(){let t=this.getLocationRange();if(t)return this.document.positionFromLocation(t[0])}getLocationRange(t){return this.targetLocationRange?this.targetLocationRange:this.getSelectionManager().getLocationRange(t)||y({index:0,offset:0})}withTargetLocationRange(t,e){let n;this.targetLocationRange=t;try{n=e()}finally{this.targetLocationRange=null}return n}withTargetRange(t,e){let n=this.document.locationRangeFromRange(t);return this.withTargetLocationRange(n,e)}withTargetDOMRange(t,e){let n=this.createLocationRangeFromDOMRange(t,{strict:!1});return this.withTargetLocationRange(n,e)}getExpandedRangeInDirection(t){let{length:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},[n,r]=Array.from(this.getSelectedRange());return t==="backward"?e?n-=e:n=this.translateUTF16PositionFromOffset(n,-1):e?r+=e:r=this.translateUTF16PositionFromOffset(r,1),y([n,r])}shouldManageMovingCursorInDirection(t){if(this.editingAttachment)return!0;let e=this.getExpandedRangeInDirection(t);return this.getAttachmentAtRange(e)!=null}moveCursorInDirection(t){let e,n;if(this.editingAttachment)n=this.document.getRangeOfAttachment(this.editingAttachment);else{let r=this.getSelectedRange();n=this.getExpandedRangeInDirection(t),e=!We(r,n)}if(t==="backward"?this.setSelectedRange(n[0]):this.setSelectedRange(n[1]),e){let r=this.getAttachmentAtRange(n);if(r)return this.editAttachment(r)}}expandSelectionInDirection(t){let{length:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getExpandedRangeInDirection(t,{length:e});return this.setSelectedRange(n)}expandSelectionForEditing(){if(this.hasCurrentAttribute("href"))return this.expandSelectionAroundCommonAttribute("href")}expandSelectionAroundCommonAttribute(t){let e=this.getPosition(),n=this.document.getRangeOfCommonAttributeAtPosition(t,e);return this.setSelectedRange(n)}selectionContainsAttachments(){var t;return((t=this.getSelectedAttachments())===null||t===void 0?void 0:t.length)>0}selectionIsInCursorTarget(){return this.editingAttachment||this.positionIsCursorTarget(this.getPosition())}positionIsCursorTarget(t){let e=this.document.locationFromPosition(t);if(e)return this.locationIsCursorTarget(e)}positionIsBlockBreak(t){var e;return(e=this.document.getPieceAtPosition(t))===null||e===void 0?void 0:e.isBlockBreak()}getSelectedDocument(){let t=this.getSelectedRange();if(t)return this.document.getDocumentAtRange(t)}getSelectedAttachments(){var t;return(t=this.getSelectedDocument())===null||t===void 0?void 0:t.getAttachments()}getAttachments(){return this.attachments.slice(0)}refreshAttachments(){let t=this.document.getAttachments(),{added:e,removed:n}=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=[],l=[],c=new Set;r.forEach(d=>{c.add(d)});let u=new Set;return o.forEach(d=>{u.add(d),c.has(d)||s.push(d)}),r.forEach(d=>{u.has(d)||l.push(d)}),{added:s,removed:l}}(this.attachments,t);return this.attachments=t,Array.from(n).forEach(r=>{var o,s;r.delegate=null,(o=this.delegate)===null||o===void 0||(s=o.compositionDidRemoveAttachment)===null||s===void 0||s.call(o,r)}),(()=>{let r=[];return Array.from(e).forEach(o=>{var s,l;o.delegate=this,r.push((s=this.delegate)===null||s===void 0||(l=s.compositionDidAddAttachment)===null||l===void 0?void 0:l.call(s,o))}),r})()}attachmentDidChangeAttributes(t){var e,n;return this.revision++,(e=this.delegate)===null||e===void 0||(n=e.compositionDidEditAttachment)===null||n===void 0?void 0:n.call(e,t)}attachmentDidChangePreviewURL(t){var e,n;return this.revision++,(e=this.delegate)===null||e===void 0||(n=e.compositionDidChangeAttachmentPreviewURL)===null||n===void 0?void 0:n.call(e,t)}editAttachment(t,e){var n,r;if(t!==this.editingAttachment)return this.stopEditingAttachment(),this.editingAttachment=t,(n=this.delegate)===null||n===void 0||(r=n.compositionDidStartEditingAttachment)===null||r===void 0?void 0:r.call(n,this.editingAttachment,e)}stopEditingAttachment(){var t,e;this.editingAttachment&&((t=this.delegate)===null||t===void 0||(e=t.compositionDidStopEditingAttachment)===null||e===void 0||e.call(t,this.editingAttachment),this.editingAttachment=null)}updateAttributesForAttachment(t,e){return this.setDocument(this.document.updateAttributesForAttachment(t,e))}removeAttributeForAttachment(t,e){return this.setDocument(this.document.removeAttributeForAttachment(t,e))}breakFormattedBlock(t){let{document:e}=t,{block:n}=t,r=t.startPosition,o=[r-1,r];n.getBlockBreakPosition()===t.startLocation.offset?(n.breaksOnReturn()&&t.nextCharacter===` +`?r+=1:e=e.removeTextAtRange(o),o=[r,r]):t.nextCharacter===` +`?t.previousCharacter===` +`?o=[r-1,r+1]:(o=[r,r+1],r+=1):t.startLocation.offset-1!=0&&(r+=1);let s=new q([n.removeLastAttribute().copyWithoutText()]);return this.setDocument(e.insertDocumentAtRange(s,o)),this.setSelection(r)}getPreviousBlock(){let t=this.getLocationRange();if(t){let{index:e}=t[0];if(e>0)return this.document.getBlockAtIndex(e-1)}}getBlock(){let t=this.getLocationRange();if(t)return this.document.getBlockAtIndex(t[0].index)}getAttachmentAtRange(t){let e=this.document.getDocumentAtRange(t);if(e.toString()==="".concat("\uFFFC",` +`))return e.getAttachments()[0]}notifyDelegateOfCurrentAttributesChange(){var t,e;return(t=this.delegate)===null||t===void 0||(e=t.compositionDidChangeCurrentAttributes)===null||e===void 0?void 0:e.call(t,this.currentAttributes)}notifyDelegateOfInsertionAtRange(t){var e,n;return(e=this.delegate)===null||e===void 0||(n=e.compositionDidPerformInsertionAtRange)===null||n===void 0?void 0:n.call(e,t)}translateUTF16PositionFromOffset(t,e){let n=this.document.toUTF16String(),r=n.offsetFromUCS2Offset(t);return n.offsetToUCS2Offset(r+e)}};it.proxyMethod("getSelectionManager().getPointRange"),it.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"),it.proxyMethod("getSelectionManager().createLocationRangeFromDOMRange"),it.proxyMethod("getSelectionManager().locationIsCursorTarget"),it.proxyMethod("getSelectionManager().selectionIsExpanded"),it.proxyMethod("delegate?.getSelectionManager");var ye=class extends R{constructor(t){super(...arguments),this.composition=t,this.undoEntries=[],this.redoEntries=[]}recordUndoEntry(t){let{context:e,consolidatable:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.undoEntries.slice(-1)[0];if(!n||!Os(r,t,e)){let o=this.createEntry({description:t,context:e});this.undoEntries.push(o),this.redoEntries=[]}}undo(){let t=this.undoEntries.pop();if(t){let e=this.createEntry(t);return this.redoEntries.push(e),this.composition.loadSnapshot(t.snapshot)}}redo(){let t=this.redoEntries.pop();if(t){let e=this.createEntry(t);return this.undoEntries.push(e),this.composition.loadSnapshot(t.snapshot)}}canUndo(){return this.undoEntries.length>0}canRedo(){return this.redoEntries.length>0}createEntry(){let{description:t,context:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{description:t?.toString(),context:JSON.stringify(e),snapshot:this.composition.getSnapshot()}}},Os=(i,t,e)=>i?.description===t?.toString()&&i?.context===JSON.stringify(e),Wn="attachmentGallery",$e=class{constructor(t){this.document=t.document,this.selectedRange=t.selectedRange}perform(){return this.removeBlockAttribute(),this.applyBlockAttribute()}getSnapshot(){return{document:this.document,selectedRange:this.selectedRange}}removeBlockAttribute(){return this.findRangesOfBlocks().map(t=>this.document=this.document.removeAttributeAtRange(Wn,t))}applyBlockAttribute(){let t=0;this.findRangesOfPieces().forEach(e=>{e[1]-e[0]>1&&(e[0]+=t,e[1]+=t,this.document.getCharacterAtPosition(e[1])!==` +`&&(this.document=this.document.insertBlockBreakAtRange(e[1]),e[1]0&&arguments[0]!==void 0?arguments[0]:"",e=Ft.parse(t,{referenceElement:this.element}).getDocument();return this.loadDocument(e)}loadJSON(t){let{document:e,selectedRange:n}=t;return e=q.fromJSON(e),this.loadSnapshot({document:e,selectedRange:n})}loadSnapshot(t){return this.undoManager=new ye(this.composition),this.composition.loadSnapshot(t)}getDocument(){return this.composition.document}getSelectedDocument(){return this.composition.getSelectedDocument()}getSnapshot(){return this.composition.getSnapshot()}toJSON(){return this.getSnapshot()}deleteInDirection(t){return this.composition.deleteInDirection(t)}insertAttachment(t){return this.composition.insertAttachment(t)}insertAttachments(t){return this.composition.insertAttachments(t)}insertDocument(t){return this.composition.insertDocument(t)}insertFile(t){return this.composition.insertFile(t)}insertFiles(t){return this.composition.insertFiles(t)}insertHTML(t){return this.composition.insertHTML(t)}insertString(t){return this.composition.insertString(t)}insertText(t){return this.composition.insertText(t)}insertLineBreak(){return this.composition.insertLineBreak()}getSelectedRange(){return this.composition.getSelectedRange()}getPosition(){return this.composition.getPosition()}getClientRectAtPosition(t){let e=this.getDocument().locationRangeFromRange([t,t+1]);return this.selectionManager.getClientRectAtLocationRange(e)}expandSelectionInDirection(t){return this.composition.expandSelectionInDirection(t)}moveCursorInDirection(t){return this.composition.moveCursorInDirection(t)}setSelectedRange(t){return this.composition.setSelectedRange(t)}activateAttribute(t){let e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return this.composition.setCurrentAttribute(t,e)}attributeIsActive(t){return this.composition.hasCurrentAttribute(t)}canActivateAttribute(t){return this.composition.canSetCurrentAttribute(t)}deactivateAttribute(t){return this.composition.removeCurrentAttribute(t)}setHTMLAtributeAtPosition(t,e,n){this.composition.setHTMLAtributeAtPosition(t,e,n)}canDecreaseNestingLevel(){return this.composition.canDecreaseNestingLevel()}canIncreaseNestingLevel(){return this.composition.canIncreaseNestingLevel()}decreaseNestingLevel(){if(this.canDecreaseNestingLevel())return this.composition.decreaseNestingLevel()}increaseNestingLevel(){if(this.canIncreaseNestingLevel())return this.composition.increaseNestingLevel()}canRedo(){return this.undoManager.canRedo()}canUndo(){return this.undoManager.canUndo()}recordUndoEntry(t){let{context:e,consolidatable:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.undoManager.recordUndoEntry(t,{context:e,consolidatable:n})}redo(){if(this.canRedo())return this.undoManager.redo()}undo(){if(this.canUndo())return this.undoManager.undo()}},Ze=class{constructor(t){this.element=t}findLocationFromContainerAndOffset(t,e){let{strict:n}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{strict:!0},r=0,o=!1,s={index:0,offset:0},l=this.findAttachmentElementParentForNode(t);l&&(t=l.parentNode,e=kn(l));let c=je(this.element,{usingFilter:$r});for(;c.nextNode();){let u=c.currentNode;if(u===t&&me(t)){zt(u)||(s.offset+=e);break}if(u.parentNode===t){if(r++===e)break}else if(!kt(t,u)&&r>0)break;$i(u,{strict:n})?(o&&s.index++,s.offset=0,o=!0):s.offset+=Un(u)}return s}findContainerAndOffsetFromLocation(t){let e,n;if(t.index===0&&t.offset===0){for(e=this.element,n=0;e.firstChild;)if(e=e.firstChild,Rn(e)){n=1;break}return[e,n]}let[r,o]=this.findNodeAndOffsetFromLocation(t);if(r){if(me(r))Un(r)===0?(e=r.parentNode.parentNode,n=kn(r.parentNode),zt(r,{name:"right"})&&n++):(e=r,n=t.offset-o);else{if(e=r.parentNode,!$i(r.previousSibling)&&!Rn(e))for(;r===e.lastChild&&(r=e,e=e.parentNode,!Rn(e)););n=kn(r),t.offset!==0&&n++}return[e,n]}}findNodeAndOffsetFromLocation(t){let e,n,r=0;for(let o of this.getSignificantNodesForIndex(t.index)){let s=Un(o);if(t.offset<=r+s)if(me(o)){if(e=o,n=r,t.offset===n&&zt(e))break}else e||(e=o,n=r);if(r+=s,r>t.offset)break}return[e,n]}findAttachmentElementParentForNode(t){for(;t&&t!==this.element;){if(Tt(t))return t;t=t.parentNode}}getSignificantNodesForIndex(t){let e=[],n=je(this.element,{usingFilter:Ps}),r=!1;for(;n.nextNode();){let s=n.currentNode;var o;if(Vt(s)){if(o!=null?o++:o=0,o===t)r=!0;else if(r)break}else r&&e.push(s)}return e}},Un=function(i){return i.nodeType===Node.TEXT_NODE?zt(i)?0:i.textContent.length:W(i)==="br"||Tt(i)?1:0},Ps=function(i){return Ms(i)===NodeFilter.FILTER_ACCEPT?$r(i):NodeFilter.FILTER_REJECT},Ms=function(i){return Or(i)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},$r=function(i){return Tt(i.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},Qe=class{createDOMRangeFromPoint(t){let e,{x:n,y:r}=t;if(document.caretPositionFromPoint){let{offsetNode:o,offset:s}=document.caretPositionFromPoint(n,r);return e=document.createRange(),e.setStart(o,s),e}if(document.caretRangeFromPoint)return document.caretRangeFromPoint(n,r);if(document.body.createTextRange){let o=pe();try{let s=document.body.createTextRange();s.moveToPoint(n,r),s.select()}catch{}return e=pe(),Wr(o),e}}getClientRectsForDOMRange(t){let e=Array.from(t.getClientRects());return[e[0],e[e.length-1]]}},ct=class extends R{constructor(t){super(...arguments),this.didMouseDown=this.didMouseDown.bind(this),this.selectionDidChange=this.selectionDidChange.bind(this),this.element=t,this.locationMapper=new Ze(this.element),this.pointMapper=new Qe,this.lockCount=0,S("mousedown",{onElement:this.element,withCallback:this.didMouseDown})}getLocationRange(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t.strict===!1?this.createLocationRangeFromDOMRange(pe()):t.ignoreLock?this.currentLocationRange:this.lockedLocationRange?this.lockedLocationRange:this.currentLocationRange}setLocationRange(t){if(this.lockedLocationRange)return;t=y(t);let e=this.createDOMRangeFromLocationRange(t);e&&(Wr(e),this.updateCurrentLocationRange(t))}setLocationRangeFromPointRange(t){t=y(t);let e=this.getLocationAtPoint(t[0]),n=this.getLocationAtPoint(t[1]);this.setLocationRange([e,n])}getClientRectAtLocationRange(t){let e=this.createDOMRangeFromLocationRange(t);if(e)return this.getClientRectsForDOMRange(e)[1]}locationIsCursorTarget(t){let e=Array.from(this.findNodeAndOffsetFromLocation(t))[0];return zt(e)}lock(){this.lockCount++==0&&(this.updateCurrentLocationRange(),this.lockedLocationRange=this.getLocationRange())}unlock(){if(--this.lockCount==0){let{lockedLocationRange:t}=this;if(this.lockedLocationRange=null,t!=null)return this.setLocationRange(t)}}clearSelection(){var t;return(t=jr())===null||t===void 0?void 0:t.removeAllRanges()}selectionIsCollapsed(){var t;return((t=pe())===null||t===void 0?void 0:t.collapsed)===!0}selectionIsExpanded(){return!this.selectionIsCollapsed()}createLocationRangeFromDOMRange(t,e){if(t==null||!this.domRangeWithinElement(t))return;let n=this.findLocationFromContainerAndOffset(t.startContainer,t.startOffset,e);if(!n)return;let r=t.collapsed?void 0:this.findLocationFromContainerAndOffset(t.endContainer,t.endOffset,e);return y([n,r])}didMouseDown(){return this.pauseTemporarily()}pauseTemporarily(){let t;this.paused=!0;let e=()=>{if(this.paused=!1,clearTimeout(n),Array.from(t).forEach(r=>{r.destroy()}),kt(document,this.element))return this.selectionDidChange()},n=setTimeout(e,200);t=["mousemove","keydown"].map(r=>S(r,{onElement:document,withCallback:e}))}selectionDidChange(){if(!this.paused&&!fi(this.element))return this.updateCurrentLocationRange()}updateCurrentLocationRange(t){var e,n;if((t??(t=this.createLocationRangeFromDOMRange(pe())))&&!We(t,this.currentLocationRange))return this.currentLocationRange=t,(e=this.delegate)===null||e===void 0||(n=e.locationRangeDidChange)===null||n===void 0?void 0:n.call(e,this.currentLocationRange.slice(0))}createDOMRangeFromLocationRange(t){let e=this.findContainerAndOffsetFromLocation(t[0]),n=ut(t)?e:this.findContainerAndOffsetFromLocation(t[1])||e;if(e!=null&&n!=null){let r=document.createRange();return r.setStart(...Array.from(e||[])),r.setEnd(...Array.from(n||[])),r}}getLocationAtPoint(t){let e=this.createDOMRangeFromPoint(t);var n;if(e)return(n=this.createLocationRangeFromDOMRange(e))===null||n===void 0?void 0:n[0]}domRangeWithinElement(t){return t.collapsed?kt(this.element,t.startContainer):kt(this.element,t.startContainer)&&kt(this.element,t.endContainer)}};ct.proxyMethod("locationMapper.findLocationFromContainerAndOffset"),ct.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"),ct.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"),ct.proxyMethod("pointMapper.createDOMRangeFromPoint"),ct.proxyMethod("pointMapper.getClientRectsForDOMRange");var Xr=Object.freeze({__proto__:null,Attachment:Kt,AttachmentManager:Ge,AttachmentPiece:Gt,Block:bt,Composition:it,Document:q,Editor:Xe,HTMLParser:Ft,HTMLSanitizer:qt,LineBreakInsertion:Ye,LocationMapper:Ze,ManagedAttachment:E,Piece:gt,PointMapper:Qe,SelectionManager:ct,SplittableList:Yt,StringPiece:Ae,Text:K,UndoManager:ye}),Bs=Object.freeze({__proto__:null,ObjectView:dt,AttachmentView:ve,BlockView:Je,DocumentView:Jt,PieceView:He,PreviewableAttachmentView:ze,TextView:qe}),{lang:Vn,css:Et,keyNames:_s}=Ce,zn=function(i){return function(){let t=i.apply(this,arguments);t.do(),this.undos||(this.undos=[]),this.undos.push(t.undo)}},tn=class extends R{constructor(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(...arguments),V(this,"makeElementMutable",zn(()=>({do:()=>{this.element.dataset.trixMutable=!0},undo:()=>delete this.element.dataset.trixMutable}))),V(this,"addToolbar",zn(()=>{let o=p({tagName:"div",className:Et.attachmentToolbar,data:{trixMutable:!0},childNodes:p({tagName:"div",className:"trix-button-row",childNodes:p({tagName:"span",className:"trix-button-group trix-button-group--actions",childNodes:p({tagName:"button",className:"trix-button trix-button--remove",textContent:Vn.remove,attributes:{title:Vn.remove},data:{trixAction:"remove"}})})})});return this.attachment.isPreviewable()&&o.appendChild(p({tagName:"div",className:Et.attachmentMetadataContainer,childNodes:p({tagName:"span",className:Et.attachmentMetadata,childNodes:[p({tagName:"span",className:Et.attachmentName,textContent:this.attachment.getFilename(),attributes:{title:this.attachment.getFilename()}}),p({tagName:"span",className:Et.attachmentSize,textContent:this.attachment.getFormattedFilesize()})]})})),S("click",{onElement:o,withCallback:this.didClickToolbar}),S("click",{onElement:o,matchingSelector:"[data-trix-action]",withCallback:this.didClickActionButton}),de("trix-attachment-before-toolbar",{onElement:this.element,attributes:{toolbar:o,attachment:this.attachment}}),{do:()=>this.element.appendChild(o),undo:()=>At(o)}})),V(this,"installCaptionEditor",zn(()=>{let o=p({tagName:"textarea",className:Et.attachmentCaptionEditor,attributes:{placeholder:Vn.captionPlaceholder},data:{trixMutable:!0}});o.value=this.attachmentPiece.getCaption();let s=o.cloneNode();s.classList.add("trix-autoresize-clone"),s.tabIndex=-1;let l=function(){s.value=o.value,o.style.height=s.scrollHeight+"px"};S("input",{onElement:o,withCallback:l}),S("input",{onElement:o,withCallback:this.didInputCaption}),S("keydown",{onElement:o,withCallback:this.didKeyDownCaption}),S("change",{onElement:o,withCallback:this.didChangeCaption}),S("blur",{onElement:o,withCallback:this.didBlurCaption});let c=this.element.querySelector("figcaption"),u=c.cloneNode();return{do:()=>{if(c.style.display="none",u.appendChild(o),u.appendChild(s),u.classList.add("".concat(Et.attachmentCaption,"--editing")),c.parentElement.insertBefore(u,c),l(),this.options.editCaption)return Ai(()=>o.focus())},undo(){At(u),c.style.display=null}}})),this.didClickToolbar=this.didClickToolbar.bind(this),this.didClickActionButton=this.didClickActionButton.bind(this),this.didKeyDownCaption=this.didKeyDownCaption.bind(this),this.didInputCaption=this.didInputCaption.bind(this),this.didChangeCaption=this.didChangeCaption.bind(this),this.didBlurCaption=this.didBlurCaption.bind(this),this.attachmentPiece=t,this.element=e,this.container=n,this.options=r,this.attachment=this.attachmentPiece.attachment,W(this.element)==="a"&&(this.element=this.element.firstChild),this.install()}install(){this.makeElementMutable(),this.addToolbar(),this.attachment.isPreviewable()&&this.installCaptionEditor()}uninstall(){var t;let e=this.undos.pop();for(this.savePendingCaption();e;)e(),e=this.undos.pop();(t=this.delegate)===null||t===void 0||t.didUninstallAttachmentEditor(this)}savePendingCaption(){if(this.pendingCaption!=null){let o=this.pendingCaption;var t,e,n,r;this.pendingCaption=null,o?(t=this.delegate)===null||t===void 0||(e=t.attachmentEditorDidRequestUpdatingAttributesForAttachment)===null||e===void 0||e.call(t,{caption:o},this.attachment):(n=this.delegate)===null||n===void 0||(r=n.attachmentEditorDidRequestRemovingAttributeForAttachment)===null||r===void 0||r.call(n,"caption",this.attachment)}}didClickToolbar(t){return t.preventDefault(),t.stopPropagation()}didClickActionButton(t){var e;if(t.target.getAttribute("data-trix-action")==="remove")return(e=this.delegate)===null||e===void 0?void 0:e.attachmentEditorDidRequestRemovalOfAttachment(this.attachment)}didKeyDownCaption(t){var e,n;if(_s[t.keyCode]==="return")return t.preventDefault(),this.savePendingCaption(),(e=this.delegate)===null||e===void 0||(n=e.attachmentEditorDidRequestDeselectingAttachment)===null||n===void 0?void 0:n.call(e,this.attachment)}didInputCaption(t){this.pendingCaption=t.target.value.replace(/\s/g," ").trim()}didChangeCaption(t){return this.savePendingCaption()}didBlurCaption(t){return this.savePendingCaption()}},en=class extends R{constructor(t,e){super(...arguments),this.didFocus=this.didFocus.bind(this),this.didBlur=this.didBlur.bind(this),this.didClickAttachment=this.didClickAttachment.bind(this),this.element=t,this.composition=e,this.documentView=new Jt(this.composition.document,{element:this.element}),S("focus",{onElement:this.element,withCallback:this.didFocus}),S("blur",{onElement:this.element,withCallback:this.didBlur}),S("click",{onElement:this.element,matchingSelector:"a[contenteditable=false]",preventDefault:!0}),S("mousedown",{onElement:this.element,matchingSelector:Rt,withCallback:this.didClickAttachment}),S("click",{onElement:this.element,matchingSelector:"a".concat(Rt),preventDefault:!0})}didFocus(t){var e;let n=()=>{var r,o;if(!this.focused)return this.focused=!0,(r=this.delegate)===null||r===void 0||(o=r.compositionControllerDidFocus)===null||o===void 0?void 0:o.call(r)};return((e=this.blurPromise)===null||e===void 0?void 0:e.then(n))||n()}didBlur(t){this.blurPromise=new Promise(e=>Ai(()=>{var n,r;return fi(this.element)||(this.focused=null,(n=this.delegate)===null||n===void 0||(r=n.compositionControllerDidBlur)===null||r===void 0||r.call(n)),this.blurPromise=null,e()}))}didClickAttachment(t,e){var n,r;let o=this.findAttachmentForElement(e),s=!!vt(t.target,{matchingSelector:"figcaption"});return(n=this.delegate)===null||n===void 0||(r=n.compositionControllerDidSelectAttachment)===null||r===void 0?void 0:r.call(n,o,{editCaption:s})}getSerializableElement(){return this.isEditingAttachment()?this.documentView.shadowElement:this.element}render(){var t,e,n,r,o,s;return this.revision!==this.composition.revision&&(this.documentView.setDocument(this.composition.document),this.documentView.render(),this.revision=this.composition.revision),this.canSyncDocumentView()&&!this.documentView.isSynced()&&((n=this.delegate)===null||n===void 0||(r=n.compositionControllerWillSyncDocumentView)===null||r===void 0||r.call(n),this.documentView.sync(),(o=this.delegate)===null||o===void 0||(s=o.compositionControllerDidSyncDocumentView)===null||s===void 0||s.call(o)),(t=this.delegate)===null||t===void 0||(e=t.compositionControllerDidRender)===null||e===void 0?void 0:e.call(t)}rerenderViewForObject(t){return this.invalidateViewForObject(t),this.render()}invalidateViewForObject(t){return this.documentView.invalidateViewForObject(t)}isViewCachingEnabled(){return this.documentView.isViewCachingEnabled()}enableViewCaching(){return this.documentView.enableViewCaching()}disableViewCaching(){return this.documentView.disableViewCaching()}refreshViewCache(){return this.documentView.garbageCollectCachedViews()}isEditingAttachment(){return!!this.attachmentEditor}installAttachmentEditorForAttachment(t,e){var n;if(((n=this.attachmentEditor)===null||n===void 0?void 0:n.attachment)===t)return;let r=this.documentView.findElementForObject(t);if(!r)return;this.uninstallAttachmentEditor();let o=this.composition.document.getAttachmentPieceForAttachment(t);this.attachmentEditor=new tn(o,r,this.element,e),this.attachmentEditor.delegate=this}uninstallAttachmentEditor(){var t;return(t=this.attachmentEditor)===null||t===void 0?void 0:t.uninstall()}didUninstallAttachmentEditor(){return this.attachmentEditor=null,this.render()}attachmentEditorDidRequestUpdatingAttributesForAttachment(t,e){var n,r;return(n=this.delegate)===null||n===void 0||(r=n.compositionControllerWillUpdateAttachment)===null||r===void 0||r.call(n,e),this.composition.updateAttributesForAttachment(t,e)}attachmentEditorDidRequestRemovingAttributeForAttachment(t,e){var n,r;return(n=this.delegate)===null||n===void 0||(r=n.compositionControllerWillUpdateAttachment)===null||r===void 0||r.call(n,e),this.composition.removeAttributeForAttachment(t,e)}attachmentEditorDidRequestRemovalOfAttachment(t){var e,n;return(e=this.delegate)===null||e===void 0||(n=e.compositionControllerDidRequestRemovalOfAttachment)===null||n===void 0?void 0:n.call(e,t)}attachmentEditorDidRequestDeselectingAttachment(t){var e,n;return(e=this.delegate)===null||e===void 0||(n=e.compositionControllerDidRequestDeselectingAttachment)===null||n===void 0?void 0:n.call(e,t)}canSyncDocumentView(){return!this.isEditingAttachment()}findAttachmentForElement(t){return this.composition.document.getAttachmentById(parseInt(t.dataset.trixId,10))}},nn=class extends R{},Zr="data-trix-mutable",js="[".concat(Zr,"]"),Ws={attributes:!0,childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},rn=class extends R{constructor(t){super(t),this.didMutate=this.didMutate.bind(this),this.element=t,this.observer=new window.MutationObserver(this.didMutate),this.start()}start(){return this.reset(),this.observer.observe(this.element,Ws)}stop(){return this.observer.disconnect()}didMutate(t){var e,n;if(this.mutations.push(...Array.from(this.findSignificantMutations(t)||[])),this.mutations.length)return(e=this.delegate)===null||e===void 0||(n=e.elementDidMutate)===null||n===void 0||n.call(e,this.getMutationSummary()),this.reset()}reset(){this.mutations=[]}findSignificantMutations(t){return t.filter(e=>this.mutationIsSignificant(e))}mutationIsSignificant(t){if(this.nodeIsMutable(t.target))return!1;for(let e of Array.from(this.nodesModifiedByMutation(t)))if(this.nodeIsSignificant(e))return!0;return!1}nodeIsSignificant(t){return t!==this.element&&!this.nodeIsMutable(t)&&!Or(t)}nodeIsMutable(t){return vt(t,{matchingSelector:js})}nodesModifiedByMutation(t){let e=[];switch(t.type){case"attributes":t.attributeName!==Zr&&e.push(t.target);break;case"characterData":e.push(t.target.parentNode),e.push(t.target);break;case"childList":e.push(...Array.from(t.addedNodes||[])),e.push(...Array.from(t.removedNodes||[]))}return e}getMutationSummary(){return this.getTextMutationSummary()}getTextMutationSummary(){let{additions:t,deletions:e}=this.getTextChangesFromCharacterData(),n=this.getTextChangesFromChildList();Array.from(n.additions).forEach(l=>{Array.from(t).includes(l)||t.push(l)}),e.push(...Array.from(n.deletions||[]));let r={},o=t.join("");o&&(r.textAdded=o);let s=e.join("");return s&&(r.textDeleted=s),r}getMutationsByType(t){return Array.from(this.mutations).filter(e=>e.type===t)}getTextChangesFromChildList(){let t,e,n=[],r=[];Array.from(this.getMutationsByType("childList")).forEach(l=>{n.push(...Array.from(l.addedNodes||[])),r.push(...Array.from(l.removedNodes||[]))}),n.length===0&&r.length===1&&Vt(r[0])?(t=[],e=[` +`]):(t=li(n),e=li(r));let o=t.filter((l,c)=>l!==e[c]).map(he),s=e.filter((l,c)=>l!==t[c]).map(he);return{additions:o,deletions:s}}getTextChangesFromCharacterData(){let t,e,n=this.getMutationsByType("characterData");if(n.length){let r=n[0],o=n[n.length-1],s=function(l,c){let u,d;return l=Nt.box(l),(c=Nt.box(c)).length0&&arguments[0]!==void 0?arguments[0]:[],t=[];for(let e of Array.from(i))switch(e.nodeType){case Node.TEXT_NODE:t.push(e.data);break;case Node.ELEMENT_NODE:W(e)==="br"?t.push(` +`):t.push(...Array.from(li(e.childNodes)||[]))}return t},on=class extends Ht{constructor(t){super(...arguments),this.file=t}perform(t){let e=new FileReader;return e.onerror=()=>t(!1),e.onload=()=>{e.onerror=null;try{e.abort()}catch{}return t(!0,this.file)},e.readAsArrayBuffer(this.file)}},ci=class{constructor(t){this.element=t}shouldIgnore(t){return!!xe.samsungAndroid&&(this.previousEvent=this.event,this.event=t,this.checkSamsungKeyboardBuggyModeStart(),this.checkSamsungKeyboardBuggyModeEnd(),this.buggyMode)}checkSamsungKeyboardBuggyModeStart(){this.insertingLongTextAfterUnidentifiedChar()&&Us(this.element.innerText,this.event.data)&&(this.buggyMode=!0,this.event.preventDefault())}checkSamsungKeyboardBuggyModeEnd(){this.buggyMode&&this.event.inputType!=="insertText"&&(this.buggyMode=!1)}insertingLongTextAfterUnidentifiedChar(){var t;return this.isBeforeInputInsertText()&&this.previousEventWasUnidentifiedKeydown()&&((t=this.event.data)===null||t===void 0?void 0:t.length)>50}isBeforeInputInsertText(){return this.event.type==="beforeinput"&&this.event.inputType==="insertText"}previousEventWasUnidentifiedKeydown(){var t,e;return((t=this.previousEvent)===null||t===void 0?void 0:t.type)==="keydown"&&((e=this.previousEvent)===null||e===void 0?void 0:e.key)==="Unidentified"}},Us=(i,t)=>Sr(i)===Sr(t),Vs=new RegExp("(".concat("\uFFFC","|").concat(ln,"|").concat(ft,"|\\s)+"),"g"),Sr=i=>i.replace(Vs," ").trim(),$t=class extends R{constructor(t){super(...arguments),this.element=t,this.mutationObserver=new rn(this.element),this.mutationObserver.delegate=this,this.flakyKeyboardDetector=new ci(this.element);for(let e in this.constructor.events)S(e,{onElement:this.element,withCallback:this.handlerFor(e)})}elementDidMutate(t){}editorWillSyncDocumentView(){return this.mutationObserver.stop()}editorDidSyncDocumentView(){return this.mutationObserver.start()}requestRender(){var t,e;return(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidRequestRender)===null||e===void 0?void 0:e.call(t)}requestReparse(){var t,e;return(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidRequestReparse)===null||e===void 0||e.call(t),this.requestRender()}attachFiles(t){let e=Array.from(t).map(n=>new on(n));return Promise.all(e).then(n=>{this.handleInput(function(){var r,o;return(r=this.delegate)===null||r===void 0||r.inputControllerWillAttachFiles(),(o=this.responder)===null||o===void 0||o.insertFiles(n),this.requestRender()})})}handlerFor(t){return e=>{e.defaultPrevented||this.handleInput(()=>{if(!fi(this.element)){if(this.flakyKeyboardDetector.shouldIgnore(e))return;this.eventName=t,this.constructor.events[t].call(this,e)}})}}handleInput(t){try{var e;(e=this.delegate)===null||e===void 0||e.inputControllerWillHandleInput(),t.call(this)}finally{var n;(n=this.delegate)===null||n===void 0||n.inputControllerDidHandleInput()}}createLinkHTML(t,e){let n=document.createElement("a");return n.href=t,n.textContent=e||t,n.outerHTML}},Hn;V($t,"events",{});var{browser:zs,keyNames:Qr}=Ce,Hs=0,$=class extends $t{constructor(){super(...arguments),this.resetInputSummary()}setInputSummary(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.inputSummary.eventName=this.eventName;for(let e in t){let n=t[e];this.inputSummary[e]=n}return this.inputSummary}resetInputSummary(){this.inputSummary={}}reset(){return this.resetInputSummary(),Ot.reset()}elementDidMutate(t){var e,n;return this.isComposing()?(e=this.delegate)===null||e===void 0||(n=e.inputControllerDidAllowUnhandledInput)===null||n===void 0?void 0:n.call(e):this.handleInput(function(){return this.mutationIsSignificant(t)&&(this.mutationIsExpected(t)?this.requestRender():this.requestReparse()),this.reset()})}mutationIsExpected(t){let{textAdded:e,textDeleted:n}=t;if(this.inputSummary.preferDocument)return!0;let r=e!=null?e===this.inputSummary.textAdded:!this.inputSummary.textAdded,o=n!=null?this.inputSummary.didDelete:!this.inputSummary.didDelete,s=[` +`,` +`].includes(e)&&!r,l=n===` +`&&!o;if(s&&!l||l&&!s){let u=this.getSelectedRange();if(u){var c;let d=s?e.replace(/\n$/,"").length||-1:e?.length||1;if((c=this.responder)!==null&&c!==void 0&&c.positionIsBlockBreak(u[1]+d))return!0}}return r&&o}mutationIsSignificant(t){var e;let n=Object.keys(t).length>0,r=((e=this.compositionInput)===null||e===void 0?void 0:e.getEndData())==="";return n||!r}getCompositionInput(){if(this.isComposing())return this.compositionInput;this.compositionInput=new nt(this)}isComposing(){return this.compositionInput&&!this.compositionInput.isEnded()}deleteInDirection(t,e){var n;return((n=this.responder)===null||n===void 0?void 0:n.deleteInDirection(t))!==!1?this.setInputSummary({didDelete:!0}):e?(e.preventDefault(),this.requestRender()):void 0}serializeSelectionToDataTransfer(t){var e;if(!function(r){if(r==null||!r.setData)return!1;for(let o in Qi){let s=Qi[o];try{if(r.setData(o,s),!r.getData(o)===s)return!1}catch{return!1}}return!0}(t))return;let n=(e=this.responder)===null||e===void 0?void 0:e.getSelectedDocument().toSerializableDocument();return t.setData("application/x-trix-document",JSON.stringify(n)),t.setData("text/html",Jt.render(n).innerHTML),t.setData("text/plain",n.toString().replace(/\n$/,"")),!0}canAcceptDataTransfer(t){let e={};return Array.from(t?.types||[]).forEach(n=>{e[n]=!0}),e.Files||e["application/x-trix-document"]||e["text/html"]||e["text/plain"]}getPastedHTMLUsingHiddenElement(t){let e=this.getSelectedRange(),n={position:"absolute",left:"".concat(window.pageXOffset,"px"),top:"".concat(window.pageYOffset,"px"),opacity:0},r=p({style:n,tagName:"div",editable:!0});return document.body.appendChild(r),r.focus(),requestAnimationFrame(()=>{let o=r.innerHTML;return At(r),this.setSelectedRange(e),t(o)})}};V($,"events",{keydown(i){this.isComposing()||this.resetInputSummary(),this.inputSummary.didInput=!0;let t=Qr[i.keyCode];if(t){var e;let r=this.keys;["ctrl","alt","shift","meta"].forEach(o=>{var s;i["".concat(o,"Key")]&&(o==="ctrl"&&(o="control"),r=(s=r)===null||s===void 0?void 0:s[o])}),((e=r)===null||e===void 0?void 0:e[t])!=null&&(this.setInputSummary({keyName:t}),Ot.reset(),r[t].call(this,i))}if(Br(i)){let r=String.fromCharCode(i.keyCode).toLowerCase();if(r){var n;let o=["alt","shift"].map(s=>{if(i["".concat(s,"Key")])return s}).filter(s=>s);o.push(r),(n=this.delegate)!==null&&n!==void 0&&n.inputControllerDidReceiveKeyboardCommand(o)&&i.preventDefault()}}},keypress(i){if(this.inputSummary.eventName!=null||i.metaKey||i.ctrlKey&&!i.altKey)return;let t=Ks(i);var e,n;return t?((e=this.delegate)===null||e===void 0||e.inputControllerWillPerformTyping(),(n=this.responder)===null||n===void 0||n.insertString(t),this.setInputSummary({textAdded:t,didDelete:this.selectionIsExpanded()})):void 0},textInput(i){let{data:t}=i,{textAdded:e}=this.inputSummary;if(e&&e!==t&&e.toUpperCase()===t){var n;let r=this.getSelectedRange();return this.setSelectedRange([r[0],r[1]+e.length]),(n=this.responder)===null||n===void 0||n.insertString(t),this.setInputSummary({textAdded:t}),this.setSelectedRange(r)}},dragenter(i){i.preventDefault()},dragstart(i){var t,e;return this.serializeSelectionToDataTransfer(i.dataTransfer),this.draggedRange=this.getSelectedRange(),(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidStartDrag)===null||e===void 0?void 0:e.call(t)},dragover(i){if(this.draggedRange||this.canAcceptDataTransfer(i.dataTransfer)){i.preventDefault();let n={x:i.clientX,y:i.clientY};var t,e;if(!Zt(n,this.draggingPoint))return this.draggingPoint=n,(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidReceiveDragOverPoint)===null||e===void 0?void 0:e.call(t,this.draggingPoint)}},dragend(i){var t,e;(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidCancelDrag)===null||e===void 0||e.call(t),this.draggedRange=null,this.draggingPoint=null},drop(i){var t,e;i.preventDefault();let n=(t=i.dataTransfer)===null||t===void 0?void 0:t.files,r=i.dataTransfer.getData("application/x-trix-document"),o={x:i.clientX,y:i.clientY};if((e=this.responder)===null||e===void 0||e.setLocationRangeFromPointRange(o),n!=null&&n.length)this.attachFiles(n);else if(this.draggedRange){var s,l;(s=this.delegate)===null||s===void 0||s.inputControllerWillMoveText(),(l=this.responder)===null||l===void 0||l.moveTextFromRange(this.draggedRange),this.draggedRange=null,this.requestRender()}else if(r){var c;let u=q.fromJSONString(r);(c=this.responder)===null||c===void 0||c.insertDocument(u),this.requestRender()}this.draggedRange=null,this.draggingPoint=null},cut(i){var t,e;if((t=this.responder)!==null&&t!==void 0&&t.selectionIsExpanded()&&(this.serializeSelectionToDataTransfer(i.clipboardData)&&i.preventDefault(),(e=this.delegate)===null||e===void 0||e.inputControllerWillCutText(),this.deleteInDirection("backward"),i.defaultPrevented))return this.requestRender()},copy(i){var t;(t=this.responder)!==null&&t!==void 0&&t.selectionIsExpanded()&&this.serializeSelectionToDataTransfer(i.clipboardData)&&i.preventDefault()},paste(i){let t=i.clipboardData||i.testClipboardData,e={clipboard:t};if(!t||Gs(i))return void this.getPastedHTMLUsingHiddenElement(F=>{var k,rt,xt;return e.type="text/html",e.html=F,(k=this.delegate)===null||k===void 0||k.inputControllerWillPaste(e),(rt=this.responder)===null||rt===void 0||rt.insertHTML(e.html),this.requestRender(),(xt=this.delegate)===null||xt===void 0?void 0:xt.inputControllerDidPaste(e)});let n=t.getData("URL"),r=t.getData("text/html"),o=t.getData("public.url-name");if(n){var s,l,c;let F;e.type="text/html",F=o?xi(o).trim():n,e.html=this.createLinkHTML(n,F),(s=this.delegate)===null||s===void 0||s.inputControllerWillPaste(e),this.setInputSummary({textAdded:F,didDelete:this.selectionIsExpanded()}),(l=this.responder)===null||l===void 0||l.insertHTML(e.html),this.requestRender(),(c=this.delegate)===null||c===void 0||c.inputControllerDidPaste(e)}else if(Mr(t)){var u,d,C;e.type="text/plain",e.string=t.getData("text/plain"),(u=this.delegate)===null||u===void 0||u.inputControllerWillPaste(e),this.setInputSummary({textAdded:e.string,didDelete:this.selectionIsExpanded()}),(d=this.responder)===null||d===void 0||d.insertString(e.string),this.requestRender(),(C=this.delegate)===null||C===void 0||C.inputControllerDidPaste(e)}else if(r){var T,J,Q;e.type="text/html",e.html=r,(T=this.delegate)===null||T===void 0||T.inputControllerWillPaste(e),(J=this.responder)===null||J===void 0||J.insertHTML(e.html),this.requestRender(),(Q=this.delegate)===null||Q===void 0||Q.inputControllerDidPaste(e)}else if(Array.from(t.types).includes("Files")){var M,mt;let F=(M=t.items)===null||M===void 0||(M=M[0])===null||M===void 0||(mt=M.getAsFile)===null||mt===void 0?void 0:mt.call(M);if(F){var yt,Qt,te;let k=qs(F);!F.name&&k&&(F.name="pasted-file-".concat(++Hs,".").concat(k)),e.type="File",e.file=F,(yt=this.delegate)===null||yt===void 0||yt.inputControllerWillAttachFiles(),(Qt=this.responder)===null||Qt===void 0||Qt.insertFile(e.file),this.requestRender(),(te=this.delegate)===null||te===void 0||te.inputControllerDidPaste(e)}}i.preventDefault()},compositionstart(i){return this.getCompositionInput().start(i.data)},compositionupdate(i){return this.getCompositionInput().update(i.data)},compositionend(i){return this.getCompositionInput().end(i.data)},beforeinput(i){this.inputSummary.didInput=!0},input(i){return this.inputSummary.didInput=!0,i.stopPropagation()}}),V($,"keys",{backspace(i){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("backward",i)},delete(i){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("forward",i)},return(i){var t,e;return this.setInputSummary({preferDocument:!0}),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(e=this.responder)===null||e===void 0?void 0:e.insertLineBreak()},tab(i){var t,e;(t=this.responder)!==null&&t!==void 0&&t.canIncreaseNestingLevel()&&((e=this.responder)===null||e===void 0||e.increaseNestingLevel(),this.requestRender(),i.preventDefault())},left(i){var t;if(this.selectionIsInCursorTarget())return i.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("backward")},right(i){var t;if(this.selectionIsInCursorTarget())return i.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("forward")},control:{d(i){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("forward",i)},h(i){var t;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.deleteInDirection("backward",i)},o(i){var t,e;return i.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(e=this.responder)===null||e===void 0||e.insertString(` +`,{updatePosition:!1}),this.requestRender()}},shift:{return(i){var t,e;(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(e=this.responder)===null||e===void 0||e.insertString(` +`),this.requestRender(),i.preventDefault()},tab(i){var t,e;(t=this.responder)!==null&&t!==void 0&&t.canDecreaseNestingLevel()&&((e=this.responder)===null||e===void 0||e.decreaseNestingLevel(),this.requestRender(),i.preventDefault())},left(i){if(this.selectionIsInCursorTarget())return i.preventDefault(),this.expandSelectionInDirection("backward")},right(i){if(this.selectionIsInCursorTarget())return i.preventDefault(),this.expandSelectionInDirection("forward")}},alt:{backspace(i){var t;return this.setInputSummary({preferDocument:!1}),(t=this.delegate)===null||t===void 0?void 0:t.inputControllerWillPerformTyping()}},meta:{backspace(i){var t;return this.setInputSummary({preferDocument:!1}),(t=this.delegate)===null||t===void 0?void 0:t.inputControllerWillPerformTyping()}}}),$.proxyMethod("responder?.getSelectedRange"),$.proxyMethod("responder?.setSelectedRange"),$.proxyMethod("responder?.expandSelectionInDirection"),$.proxyMethod("responder?.selectionIsInCursorTarget"),$.proxyMethod("responder?.selectionIsExpanded");var qs=i=>{var t;return(t=i.type)===null||t===void 0||(t=t.match(/\/(\w+)$/))===null||t===void 0?void 0:t[1]},Js=!((Hn=" ".codePointAt)===null||Hn===void 0||!Hn.call(" ",0)),Ks=function(i){if(i.key&&Js&&i.key.codePointAt(0)===i.keyCode)return i.key;{let t;if(i.which===null?t=i.keyCode:i.which!==0&&i.charCode!==0&&(t=i.charCode),t!=null&&Qr[t]!=="escape")return Nt.fromCodepoints([t]).toString()}},Gs=function(i){let t=i.clipboardData;if(t){if(t.types.includes("text/html")){for(let e of t.types){let n=/^CorePasteboardFlavorType/.test(e),r=/^dyn\./.test(e)&&t.getData(e);if(n||r)return!0}return!1}{let e=t.types.includes("com.apple.webarchive"),n=t.types.includes("com.apple.flat-rtfd");return e||n}}},nt=class extends R{constructor(t){super(...arguments),this.inputController=t,this.responder=this.inputController.responder,this.delegate=this.inputController.delegate,this.inputSummary=this.inputController.inputSummary,this.data={}}start(t){if(this.data.start=t,this.isSignificant()){var e,n;this.inputSummary.eventName==="keypress"&&this.inputSummary.textAdded&&((n=this.responder)===null||n===void 0||n.deleteInDirection("left")),this.selectionIsExpanded()||(this.insertPlaceholder(),this.requestRender()),this.range=(e=this.responder)===null||e===void 0?void 0:e.getSelectedRange()}}update(t){if(this.data.update=t,this.isSignificant()){let e=this.selectPlaceholder();e&&(this.forgetPlaceholder(),this.range=e)}}end(t){return this.data.end=t,this.isSignificant()?(this.forgetPlaceholder(),this.canApplyToDocument()?(this.setInputSummary({preferDocument:!0,didInput:!1}),(e=this.delegate)===null||e===void 0||e.inputControllerWillPerformTyping(),(n=this.responder)===null||n===void 0||n.setSelectedRange(this.range),(r=this.responder)===null||r===void 0||r.insertString(this.data.end),(o=this.responder)===null||o===void 0?void 0:o.setSelectedRange(this.range[0]+this.data.end.length)):this.data.start!=null||this.data.update!=null?(this.requestReparse(),this.inputController.reset()):void 0):this.inputController.reset();var e,n,r,o}getEndData(){return this.data.end}isEnded(){return this.getEndData()!=null}isSignificant(){return!zs.composesExistingText||this.inputSummary.didInput}canApplyToDocument(){var t,e;return((t=this.data.start)===null||t===void 0?void 0:t.length)===0&&((e=this.data.end)===null||e===void 0?void 0:e.length)>0&&this.range}};nt.proxyMethod("inputController.setInputSummary"),nt.proxyMethod("inputController.requestRender"),nt.proxyMethod("inputController.requestReparse"),nt.proxyMethod("responder?.selectionIsExpanded"),nt.proxyMethod("responder?.insertPlaceholder"),nt.proxyMethod("responder?.selectPlaceholder"),nt.proxyMethod("responder?.forgetPlaceholder");var wt=class extends $t{constructor(){super(...arguments),this.render=this.render.bind(this)}elementDidMutate(){return this.scheduledRender?this.composing?(t=this.delegate)===null||t===void 0||(e=t.inputControllerDidAllowUnhandledInput)===null||e===void 0?void 0:e.call(t):void 0:this.reparse();var t,e}scheduleRender(){return this.scheduledRender?this.scheduledRender:this.scheduledRender=requestAnimationFrame(this.render)}render(){var t,e;cancelAnimationFrame(this.scheduledRender),this.scheduledRender=null,this.composing||(e=this.delegate)===null||e===void 0||e.render(),(t=this.afterRender)===null||t===void 0||t.call(this),this.afterRender=null}reparse(){var t;return(t=this.delegate)===null||t===void 0?void 0:t.reparse()}insertString(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),this.withTargetDOMRange(function(){var r;return(r=this.responder)===null||r===void 0?void 0:r.insertString(e,n)})}toggleAttributeIfSupported(t){var e;if(Qn().includes(t))return(e=this.delegate)===null||e===void 0||e.inputControllerWillPerformFormatting(t),this.withTargetDOMRange(function(){var n;return(n=this.responder)===null||n===void 0?void 0:n.toggleCurrentAttribute(t)})}activateAttributeIfSupported(t,e){var n;if(Qn().includes(t))return(n=this.delegate)===null||n===void 0||n.inputControllerWillPerformFormatting(t),this.withTargetDOMRange(function(){var r;return(r=this.responder)===null||r===void 0?void 0:r.setCurrentAttribute(t,e)})}deleteInDirection(t){let{recordUndoEntry:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{recordUndoEntry:!0};var n;e&&((n=this.delegate)===null||n===void 0||n.inputControllerWillPerformTyping());let r=()=>{var s;return(s=this.responder)===null||s===void 0?void 0:s.deleteInDirection(t)},o=this.getTargetDOMRange({minLength:this.composing?1:2});return o?this.withTargetDOMRange(o,r):r()}withTargetDOMRange(t,e){var n;return typeof t=="function"&&(e=t,t=this.getTargetDOMRange()),t?(n=this.responder)===null||n===void 0?void 0:n.withTargetDOMRange(t,e.bind(this)):(Ot.reset(),e.call(this))}getTargetDOMRange(){var t,e;let{minLength:n}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{minLength:0},r=(t=(e=this.event).getTargetRanges)===null||t===void 0?void 0:t.call(e);if(r&&r.length){let o=Ys(r[0]);if(n===0||o.toString().length>=n)return o}}withEvent(t,e){let n;this.event=t;try{n=e.call(this)}finally{this.event=null}return n}};V(wt,"events",{keydown(i){if(Br(i)){var t;let e=Zs(i);(t=this.delegate)!==null&&t!==void 0&&t.inputControllerDidReceiveKeyboardCommand(e)&&i.preventDefault()}else{let e=i.key;i.altKey&&(e+="+Alt"),i.shiftKey&&(e+="+Shift");let n=this.constructor.keys[e];if(n)return this.withEvent(i,n)}},paste(i){var t;let e,n=(t=i.clipboardData)===null||t===void 0?void 0:t.getData("URL");return to(i)?(i.preventDefault(),this.attachFiles(i.clipboardData.files)):Xs(i)?(i.preventDefault(),e={type:"text/plain",string:i.clipboardData.getData("text/plain")},(r=this.delegate)===null||r===void 0||r.inputControllerWillPaste(e),(o=this.responder)===null||o===void 0||o.insertString(e.string),this.render(),(s=this.delegate)===null||s===void 0?void 0:s.inputControllerDidPaste(e)):n?(i.preventDefault(),e={type:"text/html",html:this.createLinkHTML(n)},(l=this.delegate)===null||l===void 0||l.inputControllerWillPaste(e),(c=this.responder)===null||c===void 0||c.insertHTML(e.html),this.render(),(u=this.delegate)===null||u===void 0?void 0:u.inputControllerDidPaste(e)):void 0;var r,o,s,l,c,u},beforeinput(i){let t=this.constructor.inputTypes[i.inputType],e=(n=i,!(!/iPhone|iPad/.test(navigator.userAgent)||n.inputType&&n.inputType!=="insertParagraph"));var n;t&&(this.withEvent(i,t),e||this.scheduleRender()),e&&this.render()},input(i){Ot.reset()},dragstart(i){var t,e;(t=this.responder)!==null&&t!==void 0&&t.selectionContainsAttachments()&&(i.dataTransfer.setData("application/x-trix-dragging",!0),this.dragging={range:(e=this.responder)===null||e===void 0?void 0:e.getSelectedRange(),point:Jn(i)})},dragenter(i){qn(i)&&i.preventDefault()},dragover(i){if(this.dragging){i.preventDefault();let e=Jn(i);var t;if(!Zt(e,this.dragging.point))return this.dragging.point=e,(t=this.responder)===null||t===void 0?void 0:t.setLocationRangeFromPointRange(e)}else qn(i)&&i.preventDefault()},drop(i){var t,e;if(this.dragging)return i.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillMoveText(),(e=this.responder)===null||e===void 0||e.moveTextFromRange(this.dragging.range),this.dragging=null,this.scheduleRender();if(qn(i)){var n;i.preventDefault();let r=Jn(i);return(n=this.responder)===null||n===void 0||n.setLocationRangeFromPointRange(r),this.attachFiles(i.dataTransfer.files)}},dragend(){var i;this.dragging&&((i=this.responder)===null||i===void 0||i.setSelectedRange(this.dragging.range),this.dragging=null)},compositionend(i){this.composing&&(this.composing=!1,xe.recentAndroid||this.scheduleRender())}}),V(wt,"keys",{ArrowLeft(){var i,t;if((i=this.responder)!==null&&i!==void 0&&i.shouldManageMovingCursorInDirection("backward"))return this.event.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("backward")},ArrowRight(){var i,t;if((i=this.responder)!==null&&i!==void 0&&i.shouldManageMovingCursorInDirection("forward"))return this.event.preventDefault(),(t=this.responder)===null||t===void 0?void 0:t.moveCursorInDirection("forward")},Backspace(){var i,t,e;if((i=this.responder)!==null&&i!==void 0&&i.shouldManageDeletingInDirection("backward"))return this.event.preventDefault(),(t=this.delegate)===null||t===void 0||t.inputControllerWillPerformTyping(),(e=this.responder)===null||e===void 0||e.deleteInDirection("backward"),this.render()},Tab(){var i,t;if((i=this.responder)!==null&&i!==void 0&&i.canIncreaseNestingLevel())return this.event.preventDefault(),(t=this.responder)===null||t===void 0||t.increaseNestingLevel(),this.render()},"Tab+Shift"(){var i,t;if((i=this.responder)!==null&&i!==void 0&&i.canDecreaseNestingLevel())return this.event.preventDefault(),(t=this.responder)===null||t===void 0||t.decreaseNestingLevel(),this.render()}}),V(wt,"inputTypes",{deleteByComposition(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteByCut(){return this.deleteInDirection("backward")},deleteByDrag(){return this.event.preventDefault(),this.withTargetDOMRange(function(){var i;this.deleteByDragRange=(i=this.responder)===null||i===void 0?void 0:i.getSelectedRange()})},deleteCompositionText(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteContent(){return this.deleteInDirection("backward")},deleteContentBackward(){return this.deleteInDirection("backward")},deleteContentForward(){return this.deleteInDirection("forward")},deleteEntireSoftLine(){return this.deleteInDirection("forward")},deleteHardLineBackward(){return this.deleteInDirection("backward")},deleteHardLineForward(){return this.deleteInDirection("forward")},deleteSoftLineBackward(){return this.deleteInDirection("backward")},deleteSoftLineForward(){return this.deleteInDirection("forward")},deleteWordBackward(){return this.deleteInDirection("backward")},deleteWordForward(){return this.deleteInDirection("forward")},formatBackColor(){return this.activateAttributeIfSupported("backgroundColor",this.event.data)},formatBold(){return this.toggleAttributeIfSupported("bold")},formatFontColor(){return this.activateAttributeIfSupported("color",this.event.data)},formatFontName(){return this.activateAttributeIfSupported("font",this.event.data)},formatIndent(){var i;if((i=this.responder)!==null&&i!==void 0&&i.canIncreaseNestingLevel())return this.withTargetDOMRange(function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.increaseNestingLevel()})},formatItalic(){return this.toggleAttributeIfSupported("italic")},formatJustifyCenter(){return this.toggleAttributeIfSupported("justifyCenter")},formatJustifyFull(){return this.toggleAttributeIfSupported("justifyFull")},formatJustifyLeft(){return this.toggleAttributeIfSupported("justifyLeft")},formatJustifyRight(){return this.toggleAttributeIfSupported("justifyRight")},formatOutdent(){var i;if((i=this.responder)!==null&&i!==void 0&&i.canDecreaseNestingLevel())return this.withTargetDOMRange(function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.decreaseNestingLevel()})},formatRemove(){this.withTargetDOMRange(function(){for(let e in(i=this.responder)===null||i===void 0?void 0:i.getCurrentAttributes()){var i,t;(t=this.responder)===null||t===void 0||t.removeCurrentAttribute(e)}})},formatSetBlockTextDirection(){return this.activateAttributeIfSupported("blockDir",this.event.data)},formatSetInlineTextDirection(){return this.activateAttributeIfSupported("textDir",this.event.data)},formatStrikeThrough(){return this.toggleAttributeIfSupported("strike")},formatSubscript(){return this.toggleAttributeIfSupported("sub")},formatSuperscript(){return this.toggleAttributeIfSupported("sup")},formatUnderline(){return this.toggleAttributeIfSupported("underline")},historyRedo(){var i;return(i=this.delegate)===null||i===void 0?void 0:i.inputControllerWillPerformRedo()},historyUndo(){var i;return(i=this.delegate)===null||i===void 0?void 0:i.inputControllerWillPerformUndo()},insertCompositionText(){return this.composing=!0,this.insertString(this.event.data)},insertFromComposition(){return this.composing=!1,this.insertString(this.event.data)},insertFromDrop(){let i=this.deleteByDragRange;var t;if(i)return this.deleteByDragRange=null,(t=this.delegate)===null||t===void 0||t.inputControllerWillMoveText(),this.withTargetDOMRange(function(){var e;return(e=this.responder)===null||e===void 0?void 0:e.moveTextFromRange(i)})},insertFromPaste(){let{dataTransfer:i}=this.event,t={dataTransfer:i},e=i.getData("URL"),n=i.getData("text/html");if(e){var r;let c;this.event.preventDefault(),t.type="text/html";let u=i.getData("public.url-name");c=u?xi(u).trim():e,t.html=this.createLinkHTML(e,c),(r=this.delegate)===null||r===void 0||r.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var d;return(d=this.responder)===null||d===void 0?void 0:d.insertHTML(t.html)}),this.afterRender=()=>{var d;return(d=this.delegate)===null||d===void 0?void 0:d.inputControllerDidPaste(t)}}else if(Mr(i)){var o;t.type="text/plain",t.string=i.getData("text/plain"),(o=this.delegate)===null||o===void 0||o.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var c;return(c=this.responder)===null||c===void 0?void 0:c.insertString(t.string)}),this.afterRender=()=>{var c;return(c=this.delegate)===null||c===void 0?void 0:c.inputControllerDidPaste(t)}}else if($s(this.event)){var s;t.type="File",t.file=i.files[0],(s=this.delegate)===null||s===void 0||s.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var c;return(c=this.responder)===null||c===void 0?void 0:c.insertFile(t.file)}),this.afterRender=()=>{var c;return(c=this.delegate)===null||c===void 0?void 0:c.inputControllerDidPaste(t)}}else if(n){var l;this.event.preventDefault(),t.type="text/html",t.html=n,(l=this.delegate)===null||l===void 0||l.inputControllerWillPaste(t),this.withTargetDOMRange(function(){var c;return(c=this.responder)===null||c===void 0?void 0:c.insertHTML(t.html)}),this.afterRender=()=>{var c;return(c=this.delegate)===null||c===void 0?void 0:c.inputControllerDidPaste(t)}}},insertFromYank(){return this.insertString(this.event.data)},insertLineBreak(){return this.insertString(` +`)},insertLink(){return this.activateAttributeIfSupported("href",this.event.data)},insertOrderedList(){return this.toggleAttributeIfSupported("number")},insertParagraph(){var i;return(i=this.delegate)===null||i===void 0||i.inputControllerWillPerformTyping(),this.withTargetDOMRange(function(){var t;return(t=this.responder)===null||t===void 0?void 0:t.insertLineBreak()})},insertReplacementText(){let i=this.event.dataTransfer.getData("text/plain"),t=this.event.getTargetRanges()[0];this.withTargetDOMRange(t,()=>{this.insertString(i,{updatePosition:!1})})},insertText(){var i;return this.insertString(this.event.data||((i=this.event.dataTransfer)===null||i===void 0?void 0:i.getData("text/plain")))},insertTranspose(){return this.insertString(this.event.data)},insertUnorderedList(){return this.toggleAttributeIfSupported("bullet")}});var Ys=function(i){let t=document.createRange();return t.setStart(i.startContainer,i.startOffset),t.setEnd(i.endContainer,i.endOffset),t},qn=i=>{var t;return Array.from(((t=i.dataTransfer)===null||t===void 0?void 0:t.types)||[]).includes("Files")},$s=i=>{var t;return((t=i.dataTransfer.files)===null||t===void 0?void 0:t[0])&&!to(i)&&!(e=>{let{dataTransfer:n}=e;return n.types.includes("Files")&&n.types.includes("text/html")&&n.getData("text/html").includes("urn:schemas-microsoft-com:office:office")})(i)},to=function(i){let t=i.clipboardData;if(t)return Array.from(t.types).filter(e=>e.match(/file/i)).length===t.types.length&&t.files.length>=1},Xs=function(i){let t=i.clipboardData;if(t)return t.types.includes("text/plain")&&t.types.length===1},Zs=function(i){let t=[];return i.altKey&&t.push("alt"),i.shiftKey&&t.push("shift"),t.push(i.key),t},Jn=i=>({x:i.clientX,y:i.clientY}),ui="[data-trix-attribute]",hi="[data-trix-action]",Qs="".concat(ui,", ").concat(hi),cn="[data-trix-dialog]",ta="".concat(cn,"[data-trix-active]"),ea="".concat(cn," [data-trix-method]"),kr="".concat(cn," [data-trix-input]"),Rr=(i,t)=>(t||(t=Ut(i)),i.querySelector("[data-trix-input][name='".concat(t,"']"))),Tr=i=>i.getAttribute("data-trix-action"),Ut=i=>i.getAttribute("data-trix-attribute")||i.getAttribute("data-trix-dialog-attribute"),sn=class extends R{constructor(t){super(t),this.didClickActionButton=this.didClickActionButton.bind(this),this.didClickAttributeButton=this.didClickAttributeButton.bind(this),this.didClickDialogButton=this.didClickDialogButton.bind(this),this.didKeyDownDialogInput=this.didKeyDownDialogInput.bind(this),this.element=t,this.attributes={},this.actions={},this.resetDialogInputs(),S("mousedown",{onElement:this.element,matchingSelector:hi,withCallback:this.didClickActionButton}),S("mousedown",{onElement:this.element,matchingSelector:ui,withCallback:this.didClickAttributeButton}),S("click",{onElement:this.element,matchingSelector:Qs,preventDefault:!0}),S("click",{onElement:this.element,matchingSelector:ea,withCallback:this.didClickDialogButton}),S("keydown",{onElement:this.element,matchingSelector:kr,withCallback:this.didKeyDownDialogInput})}didClickActionButton(t,e){var n;(n=this.delegate)===null||n===void 0||n.toolbarDidClickButton(),t.preventDefault();let r=Tr(e);return this.getDialog(r)?this.toggleDialog(r):(o=this.delegate)===null||o===void 0?void 0:o.toolbarDidInvokeAction(r,e);var o}didClickAttributeButton(t,e){var n;(n=this.delegate)===null||n===void 0||n.toolbarDidClickButton(),t.preventDefault();let r=Ut(e);var o;return this.getDialog(r)?this.toggleDialog(r):(o=this.delegate)===null||o===void 0||o.toolbarDidToggleAttribute(r),this.refreshAttributeButtons()}didClickDialogButton(t,e){let n=vt(e,{matchingSelector:cn});return this[e.getAttribute("data-trix-method")].call(this,n)}didKeyDownDialogInput(t,e){if(t.keyCode===13){t.preventDefault();let n=e.getAttribute("name"),r=this.getDialog(n);this.setAttribute(r)}if(t.keyCode===27)return t.preventDefault(),this.hideDialog()}updateActions(t){return this.actions=t,this.refreshActionButtons()}refreshActionButtons(){return this.eachActionButton((t,e)=>{t.disabled=this.actions[e]===!1})}eachActionButton(t){return Array.from(this.element.querySelectorAll(hi)).map(e=>t(e,Tr(e)))}updateAttributes(t){return this.attributes=t,this.refreshAttributeButtons()}refreshAttributeButtons(){return this.eachAttributeButton((t,e)=>(t.disabled=this.attributes[e]===!1,this.attributes[e]||this.dialogIsVisible(e)?(t.setAttribute("data-trix-active",""),t.classList.add("trix-active")):(t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"))))}eachAttributeButton(t){return Array.from(this.element.querySelectorAll(ui)).map(e=>t(e,Ut(e)))}applyKeyboardCommand(t){let e=JSON.stringify(t.sort());for(let n of Array.from(this.element.querySelectorAll("[data-trix-key]"))){let r=n.getAttribute("data-trix-key").split("+");if(JSON.stringify(r.sort())===e)return de("mousedown",{onElement:n}),!0}return!1}dialogIsVisible(t){let e=this.getDialog(t);if(e)return e.hasAttribute("data-trix-active")}toggleDialog(t){return this.dialogIsVisible(t)?this.hideDialog():this.showDialog(t)}showDialog(t){var e,n;this.hideDialog(),(e=this.delegate)===null||e===void 0||e.toolbarWillShowDialog();let r=this.getDialog(t);r.setAttribute("data-trix-active",""),r.classList.add("trix-active"),Array.from(r.querySelectorAll("input[disabled]")).forEach(s=>{s.removeAttribute("disabled")});let o=Ut(r);if(o){let s=Rr(r,t);s&&(s.value=this.attributes[o]||"",s.select())}return(n=this.delegate)===null||n===void 0?void 0:n.toolbarDidShowDialog(t)}setAttribute(t){var e;let n=Ut(t),r=Rr(t,n);return!r.willValidate||(r.setCustomValidity(""),r.checkValidity()&&this.isSafeAttribute(r))?((e=this.delegate)===null||e===void 0||e.toolbarDidUpdateAttribute(n,r.value),this.hideDialog()):(r.setCustomValidity("Invalid value"),r.setAttribute("data-trix-validate",""),r.classList.add("trix-validate"),r.focus())}isSafeAttribute(t){return!t.hasAttribute("data-trix-validate-href")||Ve.isValidAttribute("a","href",t.value)}removeAttribute(t){var e;let n=Ut(t);return(e=this.delegate)===null||e===void 0||e.toolbarDidRemoveAttribute(n),this.hideDialog()}hideDialog(){let t=this.element.querySelector(ta);var e;if(t)return t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"),this.resetDialogInputs(),(e=this.delegate)===null||e===void 0?void 0:e.toolbarDidHideDialog((n=>n.getAttribute("data-trix-dialog"))(t))}resetDialogInputs(){Array.from(this.element.querySelectorAll(kr)).forEach(t=>{t.setAttribute("disabled","disabled"),t.removeAttribute("data-trix-validate"),t.classList.remove("trix-validate")})}getDialog(t){return this.element.querySelector("[data-trix-dialog=".concat(t,"]"))}},Lt=class extends nn{constructor(t){let{editorElement:e,document:n,html:r}=t;super(...arguments),this.editorElement=e,this.selectionManager=new ct(this.editorElement),this.selectionManager.delegate=this,this.composition=new it,this.composition.delegate=this,this.attachmentManager=new Ge(this.composition.getAttachments()),this.attachmentManager.delegate=this,this.inputController=bi.getLevel()===2?new wt(this.editorElement):new $(this.editorElement),this.inputController.delegate=this,this.inputController.responder=this.composition,this.compositionController=new en(this.editorElement,this.composition),this.compositionController.delegate=this,this.toolbarController=new sn(this.editorElement.toolbarElement),this.toolbarController.delegate=this,this.editor=new Xe(this.composition,this.selectionManager,this.editorElement),n?this.editor.loadDocument(n):this.editor.loadHTML(r)}registerSelectionManager(){return Ot.registerSelectionManager(this.selectionManager)}unregisterSelectionManager(){return Ot.unregisterSelectionManager(this.selectionManager)}render(){return this.compositionController.render()}reparse(){return this.composition.replaceHTML(this.editorElement.innerHTML)}compositionDidChangeDocument(t){if(this.notifyEditorElement("document-change"),!this.handlingInput)return this.render()}compositionDidChangeCurrentAttributes(t){return this.currentAttributes=t,this.toolbarController.updateAttributes(this.currentAttributes),this.updateCurrentActions(),this.notifyEditorElement("attributes-change",{attributes:this.currentAttributes})}compositionDidPerformInsertionAtRange(t){this.pasting&&(this.pastedRange=t)}compositionShouldAcceptFile(t){return this.notifyEditorElement("file-accept",{file:t})}compositionDidAddAttachment(t){let e=this.attachmentManager.manageAttachment(t);return this.notifyEditorElement("attachment-add",{attachment:e})}compositionDidEditAttachment(t){this.compositionController.rerenderViewForObject(t);let e=this.attachmentManager.manageAttachment(t);return this.notifyEditorElement("attachment-edit",{attachment:e}),this.notifyEditorElement("change")}compositionDidChangeAttachmentPreviewURL(t){return this.compositionController.invalidateViewForObject(t),this.notifyEditorElement("change")}compositionDidRemoveAttachment(t){let e=this.attachmentManager.unmanageAttachment(t);return this.notifyEditorElement("attachment-remove",{attachment:e})}compositionDidStartEditingAttachment(t,e){return this.attachmentLocationRange=this.composition.document.getLocationRangeOfAttachment(t),this.compositionController.installAttachmentEditorForAttachment(t,e),this.selectionManager.setLocationRange(this.attachmentLocationRange)}compositionDidStopEditingAttachment(t){this.compositionController.uninstallAttachmentEditor(),this.attachmentLocationRange=null}compositionDidRequestChangingSelectionToLocationRange(t){if(!this.loadingSnapshot||this.isFocused())return this.requestedLocationRange=t,this.compositionRevisionWhenLocationRangeRequested=this.composition.revision,this.handlingInput?void 0:this.render()}compositionWillLoadSnapshot(){this.loadingSnapshot=!0}compositionDidLoadSnapshot(){this.compositionController.refreshViewCache(),this.render(),this.loadingSnapshot=!1}getSelectionManager(){return this.selectionManager}attachmentManagerDidRequestRemovalOfAttachment(t){return this.removeAttachment(t)}compositionControllerWillSyncDocumentView(){return this.inputController.editorWillSyncDocumentView(),this.selectionManager.lock(),this.selectionManager.clearSelection()}compositionControllerDidSyncDocumentView(){return this.inputController.editorDidSyncDocumentView(),this.selectionManager.unlock(),this.updateCurrentActions(),this.notifyEditorElement("sync")}compositionControllerDidRender(){this.requestedLocationRange&&(this.compositionRevisionWhenLocationRangeRequested===this.composition.revision&&this.selectionManager.setLocationRange(this.requestedLocationRange),this.requestedLocationRange=null,this.compositionRevisionWhenLocationRangeRequested=null),this.renderedCompositionRevision!==this.composition.revision&&(this.runEditorFilters(),this.composition.updateCurrentAttributes(),this.notifyEditorElement("render")),this.renderedCompositionRevision=this.composition.revision}compositionControllerDidFocus(){return this.isFocusedInvisibly()&&this.setLocationRange({index:0,offset:0}),this.toolbarController.hideDialog(),this.notifyEditorElement("focus")}compositionControllerDidBlur(){return this.notifyEditorElement("blur")}compositionControllerDidSelectAttachment(t,e){return this.toolbarController.hideDialog(),this.composition.editAttachment(t,e)}compositionControllerDidRequestDeselectingAttachment(t){let e=this.attachmentLocationRange||this.composition.document.getLocationRangeOfAttachment(t);return this.selectionManager.setLocationRange(e[1])}compositionControllerWillUpdateAttachment(t){return this.editor.recordUndoEntry("Edit Attachment",{context:t.id,consolidatable:!0})}compositionControllerDidRequestRemovalOfAttachment(t){return this.removeAttachment(t)}inputControllerWillHandleInput(){this.handlingInput=!0,this.requestedRender=!1}inputControllerDidRequestRender(){this.requestedRender=!0}inputControllerDidHandleInput(){if(this.handlingInput=!1,this.requestedRender)return this.requestedRender=!1,this.render()}inputControllerDidAllowUnhandledInput(){return this.notifyEditorElement("change")}inputControllerDidRequestReparse(){return this.reparse()}inputControllerWillPerformTyping(){return this.recordTypingUndoEntry()}inputControllerWillPerformFormatting(t){return this.recordFormattingUndoEntry(t)}inputControllerWillCutText(){return this.editor.recordUndoEntry("Cut")}inputControllerWillPaste(t){return this.editor.recordUndoEntry("Paste"),this.pasting=!0,this.notifyEditorElement("before-paste",{paste:t})}inputControllerDidPaste(t){return t.range=this.pastedRange,this.pastedRange=null,this.pasting=null,this.notifyEditorElement("paste",{paste:t})}inputControllerWillMoveText(){return this.editor.recordUndoEntry("Move")}inputControllerWillAttachFiles(){return this.editor.recordUndoEntry("Drop Files")}inputControllerWillPerformUndo(){return this.editor.undo()}inputControllerWillPerformRedo(){return this.editor.redo()}inputControllerDidReceiveKeyboardCommand(t){return this.toolbarController.applyKeyboardCommand(t)}inputControllerDidStartDrag(){this.locationRangeBeforeDrag=this.selectionManager.getLocationRange()}inputControllerDidReceiveDragOverPoint(t){return this.selectionManager.setLocationRangeFromPointRange(t)}inputControllerDidCancelDrag(){this.selectionManager.setLocationRange(this.locationRangeBeforeDrag),this.locationRangeBeforeDrag=null}locationRangeDidChange(t){return this.composition.updateCurrentAttributes(),this.updateCurrentActions(),this.attachmentLocationRange&&!We(this.attachmentLocationRange,t)&&this.composition.stopEditingAttachment(),this.notifyEditorElement("selection-change")}toolbarDidClickButton(){if(!this.getLocationRange())return this.setLocationRange({index:0,offset:0})}toolbarDidInvokeAction(t,e){return this.invokeAction(t,e)}toolbarDidToggleAttribute(t){if(this.recordFormattingUndoEntry(t),this.composition.toggleCurrentAttribute(t),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarDidUpdateAttribute(t,e){if(this.recordFormattingUndoEntry(t),this.composition.setCurrentAttribute(t,e),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarDidRemoveAttribute(t){if(this.recordFormattingUndoEntry(t),this.composition.removeCurrentAttribute(t),this.render(),!this.selectionFrozen)return this.editorElement.focus()}toolbarWillShowDialog(t){return this.composition.expandSelectionForEditing(),this.freezeSelection()}toolbarDidShowDialog(t){return this.notifyEditorElement("toolbar-dialog-show",{dialogName:t})}toolbarDidHideDialog(t){return this.thawSelection(),this.editorElement.focus(),this.notifyEditorElement("toolbar-dialog-hide",{dialogName:t})}freezeSelection(){if(!this.selectionFrozen)return this.selectionManager.lock(),this.composition.freezeSelection(),this.selectionFrozen=!0,this.render()}thawSelection(){if(this.selectionFrozen)return this.composition.thawSelection(),this.selectionManager.unlock(),this.selectionFrozen=!1,this.render()}canInvokeAction(t){return!!this.actionIsExternal(t)||!((e=this.actions[t])===null||e===void 0||(e=e.test)===null||e===void 0||!e.call(this));var e}invokeAction(t,e){return this.actionIsExternal(t)?this.notifyEditorElement("action-invoke",{actionName:t,invokingElement:e}):(n=this.actions[t])===null||n===void 0||(n=n.perform)===null||n===void 0?void 0:n.call(this);var n}actionIsExternal(t){return/^x-./.test(t)}getCurrentActions(){let t={};for(let e in this.actions)t[e]=this.canInvokeAction(e);return t}updateCurrentActions(){let t=this.getCurrentActions();if(!Zt(t,this.currentActions))return this.currentActions=t,this.toolbarController.updateActions(this.currentActions),this.notifyEditorElement("actions-change",{actions:this.currentActions})}runEditorFilters(){let t=this.composition.getSnapshot();if(Array.from(this.editor.filters).forEach(r=>{let{document:o,selectedRange:s}=t;t=r.call(this.editor,t)||{},t.document||(t.document=o),t.selectedRange||(t.selectedRange=s)}),e=t,n=this.composition.getSnapshot(),!We(e.selectedRange,n.selectedRange)||!e.document.isEqualTo(n.document))return this.composition.loadSnapshot(t);var e,n}updateInputElement(){let t=function(e,n){let r=Ns[n];if(r)return r(e);throw new Error("unknown content type: ".concat(n))}(this.compositionController.getSerializableElement(),"text/html");return this.editorElement.setFormValue(t)}notifyEditorElement(t,e){switch(t){case"document-change":this.documentChangedSinceLastRender=!0;break;case"render":this.documentChangedSinceLastRender&&(this.documentChangedSinceLastRender=!1,this.notifyEditorElement("change"));break;case"change":case"attachment-add":case"attachment-edit":case"attachment-remove":this.updateInputElement()}return this.editorElement.notify(t,e)}removeAttachment(t){return this.editor.recordUndoEntry("Delete Attachment"),this.composition.removeAttachment(t),this.render()}recordFormattingUndoEntry(t){let e=L(t),n=this.selectionManager.getLocationRange();if(e||!ut(n))return this.editor.recordUndoEntry("Formatting",{context:this.getUndoContext(),consolidatable:!0})}recordTypingUndoEntry(){return this.editor.recordUndoEntry("Typing",{context:this.getUndoContext(this.currentAttributes),consolidatable:!0})}getUndoContext(){for(var t=arguments.length,e=new Array(t),n=0;n0?Math.floor(new Date().getTime()/$n.interval):0}isFocused(){var t;return this.editorElement===((t=this.editorElement.ownerDocument)===null||t===void 0?void 0:t.activeElement)}isFocusedInvisibly(){return this.isFocused()&&!this.getLocationRange()}get actions(){return this.constructor.actions}};V(Lt,"actions",{undo:{test(){return this.editor.canUndo()},perform(){return this.editor.undo()}},redo:{test(){return this.editor.canRedo()},perform(){return this.editor.redo()}},link:{test(){return this.editor.canActivateAttribute("href")}},increaseNestingLevel:{test(){return this.editor.canIncreaseNestingLevel()},perform(){return this.editor.increaseNestingLevel()&&this.render()}},decreaseNestingLevel:{test(){return this.editor.canDecreaseNestingLevel()},perform(){return this.editor.decreaseNestingLevel()&&this.render()}},attachFiles:{test:()=>!0,perform(){return bi.pickFiles(this.editor.insertFiles)}}}),Lt.proxyMethod("getSelectionManager().setLocationRange"),Lt.proxyMethod("getSelectionManager().getLocationRange");var na=Object.freeze({__proto__:null,AttachmentEditorController:tn,CompositionController:en,Controller:nn,EditorController:Lt,InputController:$t,Level0InputController:$,Level2InputController:wt,ToolbarController:sn}),ia=Object.freeze({__proto__:null,MutationObserver:rn,SelectionChangeObserver:Ue}),ra=Object.freeze({__proto__:null,FileVerificationOperation:on,ImagePreloadOperation:Ke});Pr("trix-toolbar",`%t { + display: block; +} + +%t { + white-space: nowrap; +} + +%t [data-trix-dialog] { + display: none; +} + +%t [data-trix-dialog][data-trix-active] { + display: block; +} + +%t [data-trix-dialog] [data-trix-validate]:invalid { + background-color: #ffdddd; +}`);var an=class extends HTMLElement{connectedCallback(){this.innerHTML===""&&(this.innerHTML=Fr.getDefaultHTML())}},oa=0,sa=function(i){if(!i.hasAttribute("contenteditable"))return i.setAttribute("contenteditable",""),function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.times=1,S(t,e)}("focus",{onElement:i,withCallback:()=>aa(i)})},aa=function(i){return la(i),ca(i)},la=function(i){var t,e;if((t=(e=document).queryCommandSupported)!==null&&t!==void 0&&t.call(e,"enableObjectResizing"))return document.execCommand("enableObjectResizing",!1,!1),S("mscontrolselect",{onElement:i,preventDefault:!0})},ca=function(i){var t,e;if((t=(e=document).queryCommandSupported)!==null&&t!==void 0&&t.call(e,"DefaultParagraphSeparator")){let{tagName:n}=U.default;if(["div","p"].includes(n))return document.execCommand("DefaultParagraphSeparator",!1,n)}},wr=xe.forcesObjectResizing?{display:"inline",width:"auto"}:{display:"inline-block",width:"1px"};Pr("trix-editor",`%t { + display: block; +} + +%t:empty::before { + content: attr(placeholder); + color: graytext; + cursor: text; + pointer-events: none; + white-space: pre-line; +} + +%t a[contenteditable=false] { + cursor: text; +} + +%t img { + max-width: 100%; + height: auto; +} + +%t `.concat(Rt,` figcaption textarea { + resize: none; +} + +%t `).concat(Rt,` figcaption textarea.trix-autoresize-clone { + position: absolute; + left: -9999px; + max-height: 0px; +} + +%t `).concat(Rt,` figcaption[data-trix-placeholder]:empty::before { + content: attr(data-trix-placeholder); + color: graytext; +} + +%t [data-trix-cursor-target] { + display: `).concat(wr.display,` !important; + width: `).concat(wr.width,` !important; + padding: 0 !important; + margin: 0 !important; + border: none !important; +} + +%t [data-trix-cursor-target=left] { + vertical-align: top !important; + margin-left: -1px !important; +} + +%t [data-trix-cursor-target=right] { + vertical-align: bottom !important; + margin-right: -1px !important; +}`));var lt=new WeakMap,ue=new WeakSet,di=class{constructor(t){var e,n;Jr(e=this,n=ue),n.add(e),fe(this,lt,{writable:!0,value:void 0}),this.element=t,Ci(this,lt,t.attachInternals())}connectedCallback(){Fe(this,ue,Pe).call(this)}disconnectedCallback(){}get labels(){return x(this,lt).labels}get disabled(){var t;return(t=this.element.inputElement)===null||t===void 0?void 0:t.disabled}set disabled(t){this.element.toggleAttribute("disabled",t)}get required(){return this.element.hasAttribute("required")}set required(t){this.element.toggleAttribute("required",t),Fe(this,ue,Pe).call(this)}get validity(){return x(this,lt).validity}get validationMessage(){return x(this,lt).validationMessage}get willValidate(){return x(this,lt).willValidate}setFormValue(t){Fe(this,ue,Pe).call(this)}checkValidity(){return x(this,lt).checkValidity()}reportValidity(){return x(this,lt).reportValidity()}setCustomValidity(t){Fe(this,ue,Pe).call(this,t)}};function Pe(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",{required:t,value:e}=this.element,n=t&&!e,r=!!i,o=p("input",{required:t}),s=i||o.validationMessage;x(this,lt).setValidity({valueMissing:n,customError:r},s)}var Kn=new WeakMap,Gn=new WeakMap,Yn=new WeakMap,gi=class{constructor(t){fe(this,Kn,{writable:!0,value:void 0}),fe(this,Gn,{writable:!0,value:e=>{e.defaultPrevented||e.target===this.element.form&&this.element.reset()}}),fe(this,Yn,{writable:!0,value:e=>{if(e.defaultPrevented||this.element.contains(e.target))return;let n=vt(e.target,{matchingSelector:"label"});n&&Array.from(this.labels).includes(n)&&this.element.focus()}}),this.element=t}connectedCallback(){Ci(this,Kn,function(t){if(t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby"))return;let e=function(){let n=Array.from(t.labels).map(o=>{if(!o.contains(t))return o.textContent}).filter(o=>o),r=n.join(" ");return r?t.setAttribute("aria-label",r):t.removeAttribute("aria-label")};return e(),S("focus",{onElement:t,withCallback:e})}(this.element)),window.addEventListener("reset",x(this,Gn),!1),window.addEventListener("click",x(this,Yn),!1)}disconnectedCallback(){var t;(t=x(this,Kn))===null||t===void 0||t.destroy(),window.removeEventListener("reset",x(this,Gn),!1),window.removeEventListener("click",x(this,Yn),!1)}get labels(){let t=[];this.element.id&&this.element.ownerDocument&&t.push(...Array.from(this.element.ownerDocument.querySelectorAll("label[for='".concat(this.element.id,"']"))||[]));let e=vt(this.element,{matchingSelector:"label"});return e&&[this.element,null].includes(e.control)&&t.push(e),t}get disabled(){return console.warn("This browser does not support the [disabled] attribute for trix-editor elements."),!1}set disabled(t){console.warn("This browser does not support the [disabled] attribute for trix-editor elements.")}get required(){return console.warn("This browser does not support the [required] attribute for trix-editor elements."),!1}set required(t){console.warn("This browser does not support the [required] attribute for trix-editor elements.")}get validity(){return console.warn("This browser does not support the validity property for trix-editor elements."),null}get validationMessage(){return console.warn("This browser does not support the validationMessage property for trix-editor elements."),""}get willValidate(){return console.warn("This browser does not support the willValidate property for trix-editor elements."),!1}setFormValue(t){}checkValidity(){return console.warn("This browser does not support checkValidity() for trix-editor elements."),!0}reportValidity(){return console.warn("This browser does not support reportValidity() for trix-editor elements."),!0}setCustomValidity(t){console.warn("This browser does not support setCustomValidity(validationMessage) for trix-editor elements.")}},P=new WeakMap,Xt=class extends HTMLElement{constructor(){super(),fe(this,P,{writable:!0,value:void 0}),Ci(this,P,this.constructor.formAssociated?new di(this):new gi(this))}get trixId(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++oa),this.trixId)}get labels(){return x(this,P).labels}get disabled(){return x(this,P).disabled}set disabled(t){x(this,P).disabled=t}get required(){return x(this,P).required}set required(t){x(this,P).required=t}get validity(){return x(this,P).validity}get validationMessage(){return x(this,P).validationMessage}get willValidate(){return x(this,P).willValidate}get type(){return this.localName}get toolbarElement(){var t;if(this.hasAttribute("toolbar"))return(t=this.ownerDocument)===null||t===void 0?void 0:t.getElementById(this.getAttribute("toolbar"));if(this.parentNode){let e="trix-toolbar-".concat(this.trixId);return this.setAttribute("toolbar",e),this.internalToolbar=p("trix-toolbar",{id:e}),this.parentNode.insertBefore(this.internalToolbar,this),this.internalToolbar}}get form(){var t;return(t=this.inputElement)===null||t===void 0?void 0:t.form}get inputElement(){var t;if(this.hasAttribute("input"))return(t=this.ownerDocument)===null||t===void 0?void 0:t.getElementById(this.getAttribute("input"));if(this.parentNode){let e="trix-input-".concat(this.trixId);this.setAttribute("input",e);let n=p("input",{type:"hidden",id:e});return this.parentNode.insertBefore(n,this.nextElementSibling),n}}get editor(){var t;return(t=this.editorController)===null||t===void 0?void 0:t.editor}get name(){var t;return(t=this.inputElement)===null||t===void 0?void 0:t.name}get value(){var t;return(t=this.inputElement)===null||t===void 0?void 0:t.value}set value(t){var e;this.defaultValue=t,(e=this.editor)===null||e===void 0||e.loadHTML(this.defaultValue)}attributeChangedCallback(t,e,n){t==="connected"&&this.isConnected&&e!=null&&e!==n&&requestAnimationFrame(()=>this.reconnect())}notify(t,e){if(this.editorController)return de("trix-".concat(t),{onElement:this,attributes:e})}setFormValue(t){this.inputElement&&(this.inputElement.value=t,x(this,P).setFormValue(t))}connectedCallback(){this.hasAttribute("data-trix-internal")||(sa(this),function(t){t.hasAttribute("role")||t.setAttribute("role","textbox")}(this),this.editorController||(de("trix-before-initialize",{onElement:this}),this.editorController=new Lt({editorElement:this,html:this.defaultValue=this.value}),requestAnimationFrame(()=>de("trix-initialize",{onElement:this}))),this.editorController.registerSelectionManager(),x(this,P).connectedCallback(),this.toggleAttribute("connected",!0),function(t){!document.querySelector(":focus")&&t.hasAttribute("autofocus")&&document.querySelector("[autofocus]")===t&&t.focus()}(this))}disconnectedCallback(){var t;(t=this.editorController)===null||t===void 0||t.unregisterSelectionManager(),x(this,P).disconnectedCallback(),this.toggleAttribute("connected",!1)}reconnect(){this.removeInternalToolbar(),this.disconnectedCallback(),this.connectedCallback()}removeInternalToolbar(){var t;(t=this.internalToolbar)===null||t===void 0||t.remove(),this.internalToolbar=null}checkValidity(){return x(this,P).checkValidity()}reportValidity(){return x(this,P).reportValidity()}setCustomValidity(t){x(this,P).setCustomValidity(t)}formDisabledCallback(t){this.inputElement&&(this.inputElement.disabled=t),this.toggleAttribute("contenteditable",!t)}formResetCallback(){this.reset()}reset(){this.value=this.defaultValue}};V(Xt,"formAssociated","ElementInternals"in window),V(Xt,"observedAttributes",["connected"]);var Z={VERSION:po,config:Ce,core:Is,models:Xr,views:Bs,controllers:na,observers:ia,operations:ra,elements:Object.freeze({__proto__:null,TrixEditorElement:Xt,TrixToolbarElement:an}),filters:Object.freeze({__proto__:null,Filter:$e,attachmentGalleryFilter:Yr})};Object.assign(Z,Xr),window.Trix=Z,setTimeout(function(){customElements.get("trix-toolbar")||customElements.define("trix-toolbar",an),customElements.get("trix-editor")||customElements.define("trix-editor",Xt)},0);Z.config.blockAttributes.default.tagName="p";Z.config.blockAttributes.default.breakOnReturn=!0;Z.config.blockAttributes.heading={tagName:"h2",terminal:!0,breakOnReturn:!0,group:!1};Z.config.blockAttributes.subHeading={tagName:"h3",terminal:!0,breakOnReturn:!0,group:!1};Z.config.textAttributes.underline={style:{textDecoration:"underline"},inheritable:!0,parser:i=>window.getComputedStyle(i).textDecoration.includes("underline")};Z.Block.prototype.breaksOnReturn=function(){let i=this.getLastAttribute();return Z.config.blockAttributes[i||"default"]?.breakOnReturn??!1};Z.LineBreakInsertion.prototype.shouldInsertBlockBreak=function(){return this.block.hasAttributes()&&this.block.isListItem()&&!this.block.isEmpty()?this.startLocation.offset>0:this.shouldBreakFormattedBlock()?!1:this.breaksOnReturn};function ua({state:i}){return{state:i,init:function(){this.$refs.trixValue.value=this.state,this.$refs.trix.editor?.loadHTML(this.state??""),this.$watch("state",()=>{document.activeElement!==this.$refs.trix&&(this.$refs.trixValue.value=this.state,this.$refs.trix.editor?.loadHTML(this.state??""))})}}}export{ua as default}; +/*! Bundled license information: + +trix/dist/trix.esm.min.js: + (*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE *) +*/ diff --git a/public/js/filament/forms/components/select.js b/public/js/filament/forms/components/select.js new file mode 100644 index 000000000..fdea5da1c --- /dev/null +++ b/public/js/filament/forms/components/select.js @@ -0,0 +1,6 @@ +var lt=Object.create;var Ge=Object.defineProperty;var ct=Object.getOwnPropertyDescriptor;var ut=Object.getOwnPropertyNames;var ht=Object.getPrototypeOf,dt=Object.prototype.hasOwnProperty;var ft=(se,ie)=>()=>(ie||se((ie={exports:{}}).exports,ie),ie.exports);var pt=(se,ie,X,me)=>{if(ie&&typeof ie=="object"||typeof ie=="function")for(let j of ut(ie))!dt.call(se,j)&&j!==X&&Ge(se,j,{get:()=>ie[j],enumerable:!(me=ct(ie,j))||me.enumerable});return se};var mt=(se,ie,X)=>(X=se!=null?lt(ht(se)):{},pt(ie||!se||!se.__esModule?Ge(X,"default",{value:se,enumerable:!0}):X,se));var $e=ft((Ae,Ye)=>{(function(ie,X){typeof Ae=="object"&&typeof Ye=="object"?Ye.exports=X():typeof define=="function"&&define.amd?define([],X):typeof Ae=="object"?Ae.Choices=X():ie.Choices=X()})(window,function(){return function(){"use strict";var se={282:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0}),i.clearChoices=i.activateChoices=i.filterChoices=i.addChoice=void 0;var _=b(883),h=function(c){var l=c.value,O=c.label,L=c.id,y=c.groupId,D=c.disabled,k=c.elementId,Q=c.customProperties,Z=c.placeholder,ne=c.keyCode;return{type:_.ACTION_TYPES.ADD_CHOICE,value:l,label:O,id:L,groupId:y,disabled:D,elementId:k,customProperties:Q,placeholder:Z,keyCode:ne}};i.addChoice=h;var d=function(c){return{type:_.ACTION_TYPES.FILTER_CHOICES,results:c}};i.filterChoices=d;var a=function(c){return c===void 0&&(c=!0),{type:_.ACTION_TYPES.ACTIVATE_CHOICES,active:c}};i.activateChoices=a;var r=function(){return{type:_.ACTION_TYPES.CLEAR_CHOICES}};i.clearChoices=r},783:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0}),i.addGroup=void 0;var _=b(883),h=function(d){var a=d.value,r=d.id,c=d.active,l=d.disabled;return{type:_.ACTION_TYPES.ADD_GROUP,value:a,id:r,active:c,disabled:l}};i.addGroup=h},464:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0}),i.highlightItem=i.removeItem=i.addItem=void 0;var _=b(883),h=function(r){var c=r.value,l=r.label,O=r.id,L=r.choiceId,y=r.groupId,D=r.customProperties,k=r.placeholder,Q=r.keyCode;return{type:_.ACTION_TYPES.ADD_ITEM,value:c,label:l,id:O,choiceId:L,groupId:y,customProperties:D,placeholder:k,keyCode:Q}};i.addItem=h;var d=function(r,c){return{type:_.ACTION_TYPES.REMOVE_ITEM,id:r,choiceId:c}};i.removeItem=d;var a=function(r,c){return{type:_.ACTION_TYPES.HIGHLIGHT_ITEM,id:r,highlighted:c}};i.highlightItem=a},137:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0}),i.setIsLoading=i.resetTo=i.clearAll=void 0;var _=b(883),h=function(){return{type:_.ACTION_TYPES.CLEAR_ALL}};i.clearAll=h;var d=function(r){return{type:_.ACTION_TYPES.RESET_TO,state:r}};i.resetTo=d;var a=function(r){return{type:_.ACTION_TYPES.SET_IS_LOADING,isLoading:r}};i.setIsLoading=a},373:function(j,i,b){var _=this&&this.__spreadArray||function(g,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,v;n=0?this._store.getGroupById(v):null;return this._store.dispatch((0,l.highlightItem)(n,!0)),t&&this.passedElement.triggerEvent(y.EVENTS.highlightItem,{id:n,value:M,label:f,groupValue:u&&u.value?u.value:null}),this},g.prototype.unhighlightItem=function(e){if(!e||!e.id)return this;var t=e.id,n=e.groupId,s=n===void 0?-1:n,v=e.value,P=v===void 0?"":v,M=e.label,K=M===void 0?"":M,f=s>=0?this._store.getGroupById(s):null;return this._store.dispatch((0,l.highlightItem)(t,!1)),this.passedElement.triggerEvent(y.EVENTS.highlightItem,{id:t,value:P,label:K,groupValue:f&&f.value?f.value:null}),this},g.prototype.highlightAll=function(){var e=this;return this._store.items.forEach(function(t){return e.highlightItem(t)}),this},g.prototype.unhighlightAll=function(){var e=this;return this._store.items.forEach(function(t){return e.unhighlightItem(t)}),this},g.prototype.removeActiveItemsByValue=function(e){var t=this;return this._store.activeItems.filter(function(n){return n.value===e}).forEach(function(n){return t._removeItem(n)}),this},g.prototype.removeActiveItems=function(e){var t=this;return this._store.activeItems.filter(function(n){var s=n.id;return s!==e}).forEach(function(n){return t._removeItem(n)}),this},g.prototype.removeHighlightedItems=function(e){var t=this;return e===void 0&&(e=!1),this._store.highlightedActiveItems.forEach(function(n){t._removeItem(n),e&&t._triggerChange(n.value)}),this},g.prototype.showDropdown=function(e){var t=this;return this.dropdown.isActive?this:(requestAnimationFrame(function(){t.dropdown.show(),t.containerOuter.open(t.dropdown.distanceFromTopWindow),!e&&t._canSearch&&t.input.focus(),t.passedElement.triggerEvent(y.EVENTS.showDropdown,{})}),this)},g.prototype.hideDropdown=function(e){var t=this;return this.dropdown.isActive?(requestAnimationFrame(function(){t.dropdown.hide(),t.containerOuter.close(),!e&&t._canSearch&&(t.input.removeActiveDescendant(),t.input.blur()),t.passedElement.triggerEvent(y.EVENTS.hideDropdown,{})}),this):this},g.prototype.getValue=function(e){e===void 0&&(e=!1);var t=this._store.activeItems.reduce(function(n,s){var v=e?s.value:s;return n.push(v),n},[]);return this._isSelectOneElement?t[0]:t},g.prototype.setValue=function(e){var t=this;return this.initialised?(e.forEach(function(n){return t._setChoiceOrItem(n)}),this):this},g.prototype.setChoiceByValue=function(e){var t=this;if(!this.initialised||this._isTextElement)return this;var n=Array.isArray(e)?e:[e];return n.forEach(function(s){return t._findAndSelectChoiceByValue(s)}),this},g.prototype.setChoices=function(e,t,n,s){var v=this;if(e===void 0&&(e=[]),t===void 0&&(t="value"),n===void 0&&(n="label"),s===void 0&&(s=!1),!this.initialised)throw new ReferenceError("setChoices was called on a non-initialized instance of Choices");if(!this._isSelectElement)throw new TypeError("setChoices can't be used with INPUT based Choices");if(typeof t!="string"||!t)throw new TypeError("value parameter must be a name of 'value' field in passed objects");if(s&&this.clearChoices(),typeof e=="function"){var P=e(this);if(typeof Promise=="function"&&P instanceof Promise)return new Promise(function(M){return requestAnimationFrame(M)}).then(function(){return v._handleLoadingState(!0)}).then(function(){return P}).then(function(M){return v.setChoices(M,t,n,s)}).catch(function(M){v.config.silent||console.error(M)}).then(function(){return v._handleLoadingState(!1)}).then(function(){return v});if(!Array.isArray(P))throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: ".concat(typeof P));return this.setChoices(P,t,n,!1)}if(!Array.isArray(e))throw new TypeError(".setChoices must be called either with array of choices with a function resulting into Promise of array of choices");return this.containerOuter.removeLoadingState(),this._startLoading(),e.forEach(function(M){if(M.choices)v._addGroup({id:M.id?parseInt("".concat(M.id),10):null,group:M,valueKey:t,labelKey:n});else{var K=M;v._addChoice({value:K[t],label:K[n],isSelected:!!K.selected,isDisabled:!!K.disabled,placeholder:!!K.placeholder,customProperties:K.customProperties})}}),this._stopLoading(),this},g.prototype.clearChoices=function(){return this._store.dispatch((0,r.clearChoices)()),this},g.prototype.clearStore=function(){return this._store.dispatch((0,O.clearAll)()),this},g.prototype.clearInput=function(){var e=!this._isSelectOneElement;return this.input.clear(e),!this._isTextElement&&this._canSearch&&(this._isSearching=!1,this._store.dispatch((0,r.activateChoices)(!0))),this},g.prototype._render=function(){if(!this._store.isLoading()){this._currentState=this._store.state;var e=this._currentState.choices!==this._prevState.choices||this._currentState.groups!==this._prevState.groups||this._currentState.items!==this._prevState.items,t=this._isSelectElement,n=this._currentState.items!==this._prevState.items;e&&(t&&this._renderChoices(),n&&this._renderItems(),this._prevState=this._currentState)}},g.prototype._renderChoices=function(){var e=this,t=this._store,n=t.activeGroups,s=t.activeChoices,v=document.createDocumentFragment();if(this.choiceList.clear(),this.config.resetScrollPosition&&requestAnimationFrame(function(){return e.choiceList.scrollToTop()}),n.length>=1&&!this._isSearching){var P=s.filter(function(C){return C.placeholder===!0&&C.groupId===-1});P.length>=1&&(v=this._createChoicesFragment(P,v)),v=this._createGroupsFragment(n,s,v)}else s.length>=1&&(v=this._createChoicesFragment(s,v));if(v.childNodes&&v.childNodes.length>0){var M=this._store.activeItems,K=this._canAddItem(M,this.input.value);if(K.response)this.choiceList.append(v),this._highlightChoice();else{var f=this._getTemplate("notice",K.notice);this.choiceList.append(f)}}else{var u=void 0,f=void 0;this._isSearching?(f=typeof this.config.noResultsText=="function"?this.config.noResultsText():this.config.noResultsText,u=this._getTemplate("notice",f,"no-results")):(f=typeof this.config.noChoicesText=="function"?this.config.noChoicesText():this.config.noChoicesText,u=this._getTemplate("notice",f,"no-choices")),this.choiceList.append(u)}},g.prototype._renderItems=function(){var e=this._store.activeItems||[];this.itemList.clear();var t=this._createItemsFragment(e);t.childNodes&&this.itemList.append(t)},g.prototype._createGroupsFragment=function(e,t,n){var s=this;n===void 0&&(n=document.createDocumentFragment());var v=function(P){return t.filter(function(M){return s._isSelectOneElement?M.groupId===P.id:M.groupId===P.id&&(s.config.renderSelectedChoices==="always"||!M.selected)})};return this.config.shouldSort&&e.sort(this.config.sorter),e.forEach(function(P){var M=v(P);if(M.length>=1){var K=s._getTemplate("choiceGroup",P);n.appendChild(K),s._createChoicesFragment(M,n,!0)}}),n},g.prototype._createChoicesFragment=function(e,t,n){var s=this;t===void 0&&(t=document.createDocumentFragment()),n===void 0&&(n=!1);var v=this.config,P=v.renderSelectedChoices,M=v.searchResultLimit,K=v.renderChoiceLimit,f=this._isSearching?k.sortByScore:this.config.sorter,u=function(z){var ee=P==="auto"?s._isSelectOneElement||!z.selected:!0;if(ee){var ae=s._getTemplate("choice",z,s.config.itemSelectText);t.appendChild(ae)}},C=e;P==="auto"&&!this._isSelectOneElement&&(C=e.filter(function(z){return!z.selected}));var Y=C.reduce(function(z,ee){return ee.placeholder?z.placeholderChoices.push(ee):z.normalChoices.push(ee),z},{placeholderChoices:[],normalChoices:[]}),V=Y.placeholderChoices,U=Y.normalChoices;(this.config.shouldSort||this._isSearching)&&U.sort(f);var $=C.length,W=this._isSelectOneElement?_(_([],V,!0),U,!0):U;this._isSearching?$=M:K&&K>0&&!n&&($=K);for(var J=0;J<$;J+=1)W[J]&&u(W[J]);return t},g.prototype._createItemsFragment=function(e,t){var n=this;t===void 0&&(t=document.createDocumentFragment());var s=this.config,v=s.shouldSortItems,P=s.sorter,M=s.removeItemButton;v&&!this._isSelectOneElement&&e.sort(P),this._isTextElement?this.passedElement.value=e.map(function(f){var u=f.value;return u}).join(this.config.delimiter):this.passedElement.options=e;var K=function(f){var u=n._getTemplate("item",f,M);t.appendChild(u)};return e.forEach(K),t},g.prototype._triggerChange=function(e){e!=null&&this.passedElement.triggerEvent(y.EVENTS.change,{value:e})},g.prototype._selectPlaceholderChoice=function(e){this._addItem({value:e.value,label:e.label,choiceId:e.id,groupId:e.groupId,placeholder:e.placeholder}),this._triggerChange(e.value)},g.prototype._handleButtonAction=function(e,t){if(!(!e||!t||!this.config.removeItems||!this.config.removeItemButton)){var n=t.parentNode&&t.parentNode.dataset.id,s=n&&e.find(function(v){return v.id===parseInt(n,10)});s&&(this._removeItem(s),this._triggerChange(s.value),this._isSelectOneElement&&this._store.placeholderChoice&&this._selectPlaceholderChoice(this._store.placeholderChoice))}},g.prototype._handleItemAction=function(e,t,n){var s=this;if(n===void 0&&(n=!1),!(!e||!t||!this.config.removeItems||this._isSelectOneElement)){var v=t.dataset.id;e.forEach(function(P){P.id===parseInt("".concat(v),10)&&!P.highlighted?s.highlightItem(P):!n&&P.highlighted&&s.unhighlightItem(P)}),this.input.focus()}},g.prototype._handleChoiceAction=function(e,t){if(!(!e||!t)){var n=t.dataset.id,s=n&&this._store.getChoiceById(n);if(s){var v=e[0]&&e[0].keyCode?e[0].keyCode:void 0,P=this.dropdown.isActive;if(s.keyCode=v,this.passedElement.triggerEvent(y.EVENTS.choice,{choice:s}),!s.selected&&!s.disabled){var M=this._canAddItem(e,s.value);M.response&&(this._addItem({value:s.value,label:s.label,choiceId:s.id,groupId:s.groupId,customProperties:s.customProperties,placeholder:s.placeholder,keyCode:s.keyCode}),this._triggerChange(s.value))}this.clearInput(),P&&this._isSelectOneElement&&(this.hideDropdown(!0),this.containerOuter.focus())}}},g.prototype._handleBackspace=function(e){if(!(!this.config.removeItems||!e)){var t=e[e.length-1],n=e.some(function(s){return s.highlighted});this.config.editItems&&!n&&t?(this.input.value=t.value,this.input.setWidth(),this._removeItem(t),this._triggerChange(t.value)):(n||this.highlightItem(t,!1),this.removeHighlightedItems(!0))}},g.prototype._startLoading=function(){this._store.dispatch((0,O.setIsLoading)(!0))},g.prototype._stopLoading=function(){this._store.dispatch((0,O.setIsLoading)(!1))},g.prototype._handleLoadingState=function(e){e===void 0&&(e=!0);var t=this.itemList.getChild(".".concat(this.config.classNames.placeholder));e?(this.disable(),this.containerOuter.addLoadingState(),this._isSelectOneElement?t?t.innerHTML=this.config.loadingText:(t=this._getTemplate("placeholder",this.config.loadingText),t&&this.itemList.append(t)):this.input.placeholder=this.config.loadingText):(this.enable(),this.containerOuter.removeLoadingState(),this._isSelectOneElement?t&&(t.innerHTML=this._placeholderValue||""):this.input.placeholder=this._placeholderValue||"")},g.prototype._handleSearch=function(e){if(this.input.isFocussed){var t=this._store.choices,n=this.config,s=n.searchFloor,v=n.searchChoices,P=t.some(function(K){return!K.active});if(e!==null&&typeof e<"u"&&e.length>=s){var M=v?this._searchChoices(e):0;this.passedElement.triggerEvent(y.EVENTS.search,{value:e,resultCount:M})}else P&&(this._isSearching=!1,this._store.dispatch((0,r.activateChoices)(!0)))}},g.prototype._canAddItem=function(e,t){var n=!0,s=typeof this.config.addItemText=="function"?this.config.addItemText(t):this.config.addItemText;if(!this._isSelectOneElement){var v=(0,k.existsInArray)(e,t);this.config.maxItemCount>0&&this.config.maxItemCount<=e.length&&(n=!1,s=typeof this.config.maxItemText=="function"?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText),!this.config.duplicateItemsAllowed&&v&&n&&(n=!1,s=typeof this.config.uniqueItemText=="function"?this.config.uniqueItemText(t):this.config.uniqueItemText),this._isTextElement&&this.config.addItems&&n&&typeof this.config.addItemFilter=="function"&&!this.config.addItemFilter(t)&&(n=!1,s=typeof this.config.customAddItemText=="function"?this.config.customAddItemText(t):this.config.customAddItemText)}return{response:n,notice:s}},g.prototype._searchChoices=function(e){var t=typeof e=="string"?e.trim():e,n=typeof this._currentValue=="string"?this._currentValue.trim():this._currentValue;if(t.length<1&&t==="".concat(n," "))return 0;var s=this._store.searchableChoices,v=t,P=Object.assign(this.config.fuseOptions,{keys:_([],this.config.searchFields,!0),includeMatches:!0}),M=new a.default(s,P),K=M.search(v);return this._currentValue=t,this._highlightPosition=0,this._isSearching=!0,this._store.dispatch((0,r.filterChoices)(K)),K.length},g.prototype._addEventListeners=function(){var e=document.documentElement;e.addEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.addEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("click",this._onClick,{passive:!0}),e.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.dropdown.element.addEventListener("mouseover",this._onMouseOver,{passive:!0}),this._isSelectOneElement&&(this.containerOuter.element.addEventListener("focus",this._onFocus,{passive:!0}),this.containerOuter.element.addEventListener("blur",this._onBlur,{passive:!0})),this.input.element.addEventListener("keyup",this._onKeyUp,{passive:!0}),this.input.element.addEventListener("focus",this._onFocus,{passive:!0}),this.input.element.addEventListener("blur",this._onBlur,{passive:!0}),this.input.element.form&&this.input.element.form.addEventListener("reset",this._onFormReset,{passive:!0}),this.input.addEventListeners()},g.prototype._removeEventListeners=function(){var e=document.documentElement;e.removeEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.removeEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("click",this._onClick),e.removeEventListener("touchmove",this._onTouchMove),this.dropdown.element.removeEventListener("mouseover",this._onMouseOver),this._isSelectOneElement&&(this.containerOuter.element.removeEventListener("focus",this._onFocus),this.containerOuter.element.removeEventListener("blur",this._onBlur)),this.input.element.removeEventListener("keyup",this._onKeyUp),this.input.element.removeEventListener("focus",this._onFocus),this.input.element.removeEventListener("blur",this._onBlur),this.input.element.form&&this.input.element.form.removeEventListener("reset",this._onFormReset),this.input.removeEventListeners()},g.prototype._onKeyDown=function(e){var t=e.keyCode,n=this._store.activeItems,s=this.input.isFocussed,v=this.dropdown.isActive,P=this.itemList.hasChildren(),M=String.fromCharCode(t),K=/[^\x00-\x1F]/.test(M),f=y.KEY_CODES.BACK_KEY,u=y.KEY_CODES.DELETE_KEY,C=y.KEY_CODES.ENTER_KEY,Y=y.KEY_CODES.A_KEY,V=y.KEY_CODES.ESC_KEY,U=y.KEY_CODES.UP_KEY,$=y.KEY_CODES.DOWN_KEY,W=y.KEY_CODES.PAGE_UP_KEY,J=y.KEY_CODES.PAGE_DOWN_KEY;switch(!this._isTextElement&&!v&&K&&(this.showDropdown(),this.input.isFocussed||(this.input.value+=e.key.toLowerCase())),t){case Y:return this._onSelectKey(e,P);case C:return this._onEnterKey(e,n,v);case V:return this._onEscapeKey(v);case U:case W:case $:case J:return this._onDirectionKey(e,v);case u:case f:return this._onDeleteKey(e,n,s);default:}},g.prototype._onKeyUp=function(e){var t=e.target,n=e.keyCode,s=this.input.value,v=this._store.activeItems,P=this._canAddItem(v,s),M=y.KEY_CODES.BACK_KEY,K=y.KEY_CODES.DELETE_KEY;if(this._isTextElement){var f=P.notice&&s;if(f){var u=this._getTemplate("notice",P.notice);this.dropdown.element.innerHTML=u.outerHTML,this.showDropdown(!0)}else this.hideDropdown(!0)}else{var C=n===M||n===K,Y=C&&t&&!t.value,V=!this._isTextElement&&this._isSearching,U=this._canSearch&&P.response;Y&&V?(this._isSearching=!1,this._store.dispatch((0,r.activateChoices)(!0))):U&&this._handleSearch(this.input.rawValue)}this._canSearch=this.config.searchEnabled},g.prototype._onSelectKey=function(e,t){var n=e.ctrlKey,s=e.metaKey,v=n||s;if(v&&t){this._canSearch=!1;var P=this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement;P&&this.highlightAll()}},g.prototype._onEnterKey=function(e,t,n){var s=e.target,v=y.KEY_CODES.ENTER_KEY,P=s&&s.hasAttribute("data-button");if(this._isTextElement&&s&&s.value){var M=this.input.value,K=this._canAddItem(t,M);K.response&&(this.hideDropdown(!0),this._addItem({value:M}),this._triggerChange(M),this.clearInput())}if(P&&(this._handleButtonAction(t,s),e.preventDefault()),n){var f=this.dropdown.getChild(".".concat(this.config.classNames.highlightedState));f&&(t[0]&&(t[0].keyCode=v),this._handleChoiceAction(t,f)),e.preventDefault()}else this._isSelectOneElement&&(this.showDropdown(),e.preventDefault())},g.prototype._onEscapeKey=function(e){e&&(this.hideDropdown(!0),this.containerOuter.focus())},g.prototype._onDirectionKey=function(e,t){var n=e.keyCode,s=e.metaKey,v=y.KEY_CODES.DOWN_KEY,P=y.KEY_CODES.PAGE_UP_KEY,M=y.KEY_CODES.PAGE_DOWN_KEY;if(t||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;var K=n===v||n===M?1:-1,f=s||n===M||n===P,u="[data-choice-selectable]",C=void 0;if(f)K>0?C=this.dropdown.element.querySelector("".concat(u,":last-of-type")):C=this.dropdown.element.querySelector(u);else{var Y=this.dropdown.element.querySelector(".".concat(this.config.classNames.highlightedState));Y?C=(0,k.getAdjacentEl)(Y,u,K):C=this.dropdown.element.querySelector(u)}C&&((0,k.isScrolledIntoView)(C,this.choiceList.element,K)||this.choiceList.scrollToChildElement(C,K),this._highlightChoice(C)),e.preventDefault()}},g.prototype._onDeleteKey=function(e,t,n){var s=e.target;!this._isSelectOneElement&&!s.value&&n&&(this._handleBackspace(t),e.preventDefault())},g.prototype._onTouchMove=function(){this._wasTap&&(this._wasTap=!1)},g.prototype._onTouchEnd=function(e){var t=(e||e.touches[0]).target,n=this._wasTap&&this.containerOuter.element.contains(t);if(n){var s=t===this.containerOuter.element||t===this.containerInner.element;s&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),e.stopPropagation()}this._wasTap=!0},g.prototype._onMouseDown=function(e){var t=e.target;if(t instanceof HTMLElement){if(E&&this.choiceList.element.contains(t)){var n=this.choiceList.element.firstElementChild,s=this._direction==="ltr"?e.offsetX>=n.offsetWidth:e.offsetX0;s&&this.unhighlightAll(),this.containerOuter.removeFocusState(),this.hideDropdown(!0)}},g.prototype._onFocus=function(e){var t,n=this,s=e.target,v=s&&this.containerOuter.element.contains(s);if(v){var P=(t={},t[y.TEXT_TYPE]=function(){s===n.input.element&&n.containerOuter.addFocusState()},t[y.SELECT_ONE_TYPE]=function(){n.containerOuter.addFocusState(),s===n.input.element&&n.showDropdown(!0)},t[y.SELECT_MULTIPLE_TYPE]=function(){s===n.input.element&&(n.showDropdown(!0),n.containerOuter.addFocusState())},t);P[this.passedElement.element.type]()}},g.prototype._onBlur=function(e){var t,n=this,s=e.target,v=s&&this.containerOuter.element.contains(s);if(v&&!this._isScrollingOnIe){var P=this._store.activeItems,M=P.some(function(f){return f.highlighted}),K=(t={},t[y.TEXT_TYPE]=function(){s===n.input.element&&(n.containerOuter.removeFocusState(),M&&n.unhighlightAll(),n.hideDropdown(!0))},t[y.SELECT_ONE_TYPE]=function(){n.containerOuter.removeFocusState(),(s===n.input.element||s===n.containerOuter.element&&!n._canSearch)&&n.hideDropdown(!0)},t[y.SELECT_MULTIPLE_TYPE]=function(){s===n.input.element&&(n.containerOuter.removeFocusState(),n.hideDropdown(!0),M&&n.unhighlightAll())},t);K[this.passedElement.element.type]()}else this._isScrollingOnIe=!1,this.input.element.focus()},g.prototype._onFormReset=function(){this._store.dispatch((0,O.resetTo)(this._initialState))},g.prototype._highlightChoice=function(e){var t=this;e===void 0&&(e=null);var n=Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]"));if(n.length){var s=e,v=Array.from(this.dropdown.element.querySelectorAll(".".concat(this.config.classNames.highlightedState)));v.forEach(function(P){P.classList.remove(t.config.classNames.highlightedState),P.setAttribute("aria-selected","false")}),s?this._highlightPosition=n.indexOf(s):(n.length>this._highlightPosition?s=n[this._highlightPosition]:s=n[n.length-1],s||(s=n[0])),s.classList.add(this.config.classNames.highlightedState),s.setAttribute("aria-selected","true"),this.passedElement.triggerEvent(y.EVENTS.highlightChoice,{el:s}),this.dropdown.isActive&&(this.input.setActiveDescendant(s.id),this.containerOuter.setActiveDescendant(s.id))}},g.prototype._addItem=function(e){var t=e.value,n=e.label,s=n===void 0?null:n,v=e.choiceId,P=v===void 0?-1:v,M=e.groupId,K=M===void 0?-1:M,f=e.customProperties,u=f===void 0?{}:f,C=e.placeholder,Y=C===void 0?!1:C,V=e.keyCode,U=V===void 0?-1:V,$=typeof t=="string"?t.trim():t,W=this._store.items,J=s||$,z=P||-1,ee=K>=0?this._store.getGroupById(K):null,ae=W?W.length+1:1;this.config.prependValue&&($=this.config.prependValue+$.toString()),this.config.appendValue&&($+=this.config.appendValue.toString()),this._store.dispatch((0,l.addItem)({value:$,label:J,id:ae,choiceId:z,groupId:K,customProperties:u,placeholder:Y,keyCode:U})),this._isSelectOneElement&&this.removeActiveItems(ae),this.passedElement.triggerEvent(y.EVENTS.addItem,{id:ae,value:$,label:J,customProperties:u,groupValue:ee&&ee.value?ee.value:null,keyCode:U})},g.prototype._removeItem=function(e){var t=e.id,n=e.value,s=e.label,v=e.customProperties,P=e.choiceId,M=e.groupId,K=M&&M>=0?this._store.getGroupById(M):null;!t||!P||(this._store.dispatch((0,l.removeItem)(t,P)),this.passedElement.triggerEvent(y.EVENTS.removeItem,{id:t,value:n,label:s,customProperties:v,groupValue:K&&K.value?K.value:null}))},g.prototype._addChoice=function(e){var t=e.value,n=e.label,s=n===void 0?null:n,v=e.isSelected,P=v===void 0?!1:v,M=e.isDisabled,K=M===void 0?!1:M,f=e.groupId,u=f===void 0?-1:f,C=e.customProperties,Y=C===void 0?{}:C,V=e.placeholder,U=V===void 0?!1:V,$=e.keyCode,W=$===void 0?-1:$;if(!(typeof t>"u"||t===null)){var J=this._store.choices,z=s||t,ee=J?J.length+1:1,ae="".concat(this._baseId,"-").concat(this._idNames.itemChoice,"-").concat(ee);this._store.dispatch((0,r.addChoice)({id:ee,groupId:u,elementId:ae,value:t,label:z,disabled:K,customProperties:Y,placeholder:U,keyCode:W})),P&&this._addItem({value:t,label:z,choiceId:ee,customProperties:Y,placeholder:U,keyCode:W})}},g.prototype._addGroup=function(e){var t=this,n=e.group,s=e.id,v=e.valueKey,P=v===void 0?"value":v,M=e.labelKey,K=M===void 0?"label":M,f=(0,k.isType)("Object",n)?n.choices:Array.from(n.getElementsByTagName("OPTION")),u=s||Math.floor(new Date().valueOf()*Math.random()),C=n.disabled?n.disabled:!1;if(f){this._store.dispatch((0,c.addGroup)({value:n.label,id:u,active:!0,disabled:C}));var Y=function(V){var U=V.disabled||V.parentNode&&V.parentNode.disabled;t._addChoice({value:V[P],label:(0,k.isType)("Object",V)?V[K]:V.innerHTML,isSelected:V.selected,isDisabled:U,groupId:u,customProperties:V.customProperties,placeholder:V.placeholder})};f.forEach(Y)}else this._store.dispatch((0,c.addGroup)({value:n.label,id:n.id,active:!1,disabled:n.disabled}))},g.prototype._getTemplate=function(e){for(var t,n=[],s=1;s0?this.element.scrollTop+y-O:a.offsetTop;requestAnimationFrame(function(){c._animateScroll(D,r)})}},d.prototype._scrollDown=function(a,r,c){var l=(c-a)/r,O=l>1?l:1;this.element.scrollTop=a+O},d.prototype._scrollUp=function(a,r,c){var l=(a-c)/r,O=l>1?l:1;this.element.scrollTop=a-O},d.prototype._animateScroll=function(a,r){var c=this,l=_.SCROLLING_SPEED,O=this.element.scrollTop,L=!1;r>0?(this._scrollDown(O,l,a),Oa&&(L=!0)),L&&requestAnimationFrame(function(){c._animateScroll(a,r)})},d}();i.default=h},730:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0});var _=b(799),h=function(){function d(a){var r=a.element,c=a.classNames;if(this.element=r,this.classNames=c,!(r instanceof HTMLInputElement)&&!(r instanceof HTMLSelectElement))throw new TypeError("Invalid element passed");this.isDisabled=!1}return Object.defineProperty(d.prototype,"isActive",{get:function(){return this.element.dataset.choice==="active"},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"dir",{get:function(){return this.element.dir},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"value",{get:function(){return this.element.value},set:function(a){this.element.value=a},enumerable:!1,configurable:!0}),d.prototype.conceal=function(){this.element.classList.add(this.classNames.input),this.element.hidden=!0,this.element.tabIndex=-1;var a=this.element.getAttribute("style");a&&this.element.setAttribute("data-choice-orig-style",a),this.element.setAttribute("data-choice","active")},d.prototype.reveal=function(){this.element.classList.remove(this.classNames.input),this.element.hidden=!1,this.element.removeAttribute("tabindex");var a=this.element.getAttribute("data-choice-orig-style");a?(this.element.removeAttribute("data-choice-orig-style"),this.element.setAttribute("style",a)):this.element.removeAttribute("style"),this.element.removeAttribute("data-choice"),this.element.value=this.element.value},d.prototype.enable=function(){this.element.removeAttribute("disabled"),this.element.disabled=!1,this.isDisabled=!1},d.prototype.disable=function(){this.element.setAttribute("disabled",""),this.element.disabled=!0,this.isDisabled=!0},d.prototype.triggerEvent=function(a,r){(0,_.dispatchEvent)(this.element,a,r)},d}();i.default=h},541:function(j,i,b){var _=this&&this.__extends||function(){var r=function(c,l){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,L){O.__proto__=L}||function(O,L){for(var y in L)Object.prototype.hasOwnProperty.call(L,y)&&(O[y]=L[y])},r(c,l)};return function(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");r(c,l);function O(){this.constructor=c}c.prototype=l===null?Object.create(l):(O.prototype=l.prototype,new O)}}(),h=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:!0});var d=h(b(730)),a=function(r){_(c,r);function c(l){var O=l.element,L=l.classNames,y=l.delimiter,D=r.call(this,{element:O,classNames:L})||this;return D.delimiter=y,D}return Object.defineProperty(c.prototype,"value",{get:function(){return this.element.value},set:function(l){this.element.setAttribute("value",l),this.element.value=l},enumerable:!1,configurable:!0}),c}(d.default);i.default=a},982:function(j,i,b){var _=this&&this.__extends||function(){var r=function(c,l){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,L){O.__proto__=L}||function(O,L){for(var y in L)Object.prototype.hasOwnProperty.call(L,y)&&(O[y]=L[y])},r(c,l)};return function(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");r(c,l);function O(){this.constructor=c}c.prototype=l===null?Object.create(l):(O.prototype=l.prototype,new O)}}(),h=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:!0});var d=h(b(730)),a=function(r){_(c,r);function c(l){var O=l.element,L=l.classNames,y=l.template,D=r.call(this,{element:O,classNames:L})||this;return D.template=y,D}return Object.defineProperty(c.prototype,"placeholderOption",{get:function(){return this.element.querySelector('option[value=""]')||this.element.querySelector("option[placeholder]")},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"optionGroups",{get:function(){return Array.from(this.element.getElementsByTagName("OPTGROUP"))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"options",{get:function(){return Array.from(this.element.options)},set:function(l){var O=this,L=document.createDocumentFragment(),y=function(D){var k=O.template(D);L.appendChild(k)};l.forEach(function(D){return y(D)}),this.appendDocFragment(L)},enumerable:!1,configurable:!0}),c.prototype.appendDocFragment=function(l){this.element.innerHTML="",this.element.appendChild(l)},c}(d.default);i.default=a},883:function(j,i){Object.defineProperty(i,"__esModule",{value:!0}),i.SCROLLING_SPEED=i.SELECT_MULTIPLE_TYPE=i.SELECT_ONE_TYPE=i.TEXT_TYPE=i.KEY_CODES=i.ACTION_TYPES=i.EVENTS=void 0,i.EVENTS={showDropdown:"showDropdown",hideDropdown:"hideDropdown",change:"change",choice:"choice",search:"search",addItem:"addItem",removeItem:"removeItem",highlightItem:"highlightItem",highlightChoice:"highlightChoice",unhighlightItem:"unhighlightItem"},i.ACTION_TYPES={ADD_CHOICE:"ADD_CHOICE",FILTER_CHOICES:"FILTER_CHOICES",ACTIVATE_CHOICES:"ACTIVATE_CHOICES",CLEAR_CHOICES:"CLEAR_CHOICES",ADD_GROUP:"ADD_GROUP",ADD_ITEM:"ADD_ITEM",REMOVE_ITEM:"REMOVE_ITEM",HIGHLIGHT_ITEM:"HIGHLIGHT_ITEM",CLEAR_ALL:"CLEAR_ALL",RESET_TO:"RESET_TO",SET_IS_LOADING:"SET_IS_LOADING"},i.KEY_CODES={BACK_KEY:46,DELETE_KEY:8,ENTER_KEY:13,A_KEY:65,ESC_KEY:27,UP_KEY:38,DOWN_KEY:40,PAGE_UP_KEY:33,PAGE_DOWN_KEY:34},i.TEXT_TYPE="text",i.SELECT_ONE_TYPE="select-one",i.SELECT_MULTIPLE_TYPE="select-multiple",i.SCROLLING_SPEED=4},789:function(j,i,b){Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_CONFIG=i.DEFAULT_CLASSNAMES=void 0;var _=b(799);i.DEFAULT_CLASSNAMES={containerOuter:"choices",containerInner:"choices__inner",input:"choices__input",inputCloned:"choices__input--cloned",list:"choices__list",listItems:"choices__list--multiple",listSingle:"choices__list--single",listDropdown:"choices__list--dropdown",item:"choices__item",itemSelectable:"choices__item--selectable",itemDisabled:"choices__item--disabled",itemChoice:"choices__item--choice",placeholder:"choices__placeholder",group:"choices__group",groupHeading:"choices__heading",button:"choices__button",activeState:"is-active",focusState:"is-focused",openState:"is-open",disabledState:"is-disabled",highlightedState:"is-highlighted",selectedState:"is-selected",flippedState:"is-flipped",loadingState:"is-loading",noResults:"has-no-results",noChoices:"has-no-choices"},i.DEFAULT_CONFIG={items:[],choices:[],silent:!1,renderChoiceLimit:-1,maxItemCount:-1,addItems:!0,addItemFilter:null,removeItems:!0,removeItemButton:!1,editItems:!1,allowHTML:!0,duplicateItemsAllowed:!0,delimiter:",",paste:!0,searchEnabled:!0,searchChoices:!0,searchFloor:1,searchResultLimit:4,searchFields:["label","value"],position:"auto",resetScrollPosition:!0,shouldSort:!0,shouldSortItems:!1,sorter:_.sortByAlpha,placeholder:!0,placeholderValue:null,searchPlaceholderValue:null,prependValue:null,appendValue:null,renderSelectedChoices:"auto",loadingText:"Loading...",noResultsText:"No results found",noChoicesText:"No choices to choose from",itemSelectText:"Press to select",uniqueItemText:"Only unique values can be added",customAddItemText:"Only values matching specific conditions can be added",addItemText:function(h){return'Press Enter to add "'.concat((0,_.sanitise)(h),'"')},maxItemText:function(h){return"Only ".concat(h," values can be added")},valueComparer:function(h,d){return h===d},fuseOptions:{includeScore:!0},labelId:"",callbackOnInit:null,callbackOnCreateTemplates:null,classNames:i.DEFAULT_CLASSNAMES}},18:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},978:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},948:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},359:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},285:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},533:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},187:function(j,i,b){var _=this&&this.__createBinding||(Object.create?function(d,a,r,c){c===void 0&&(c=r);var l=Object.getOwnPropertyDescriptor(a,r);(!l||("get"in l?!a.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(d,c,l)}:function(d,a,r,c){c===void 0&&(c=r),d[c]=a[r]}),h=this&&this.__exportStar||function(d,a){for(var r in d)r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&_(a,d,r)};Object.defineProperty(i,"__esModule",{value:!0}),h(b(18),i),h(b(978),i),h(b(948),i),h(b(359),i),h(b(285),i),h(b(533),i),h(b(287),i),h(b(132),i),h(b(837),i),h(b(598),i),h(b(369),i),h(b(37),i),h(b(47),i),h(b(923),i),h(b(876),i)},287:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},132:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},837:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},598:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},37:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},369:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},47:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},923:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},876:function(j,i){Object.defineProperty(i,"__esModule",{value:!0})},799:function(j,i){Object.defineProperty(i,"__esModule",{value:!0}),i.parseCustomProperties=i.diff=i.cloneObject=i.existsInArray=i.dispatchEvent=i.sortByScore=i.sortByAlpha=i.strToEl=i.sanitise=i.isScrolledIntoView=i.getAdjacentEl=i.wrap=i.isType=i.getType=i.generateId=i.generateChars=i.getRandomNumber=void 0;var b=function(E,w){return Math.floor(Math.random()*(w-E)+E)};i.getRandomNumber=b;var _=function(E){return Array.from({length:E},function(){return(0,i.getRandomNumber)(0,36).toString(36)}).join("")};i.generateChars=_;var h=function(E,w){var N=E.id||E.name&&"".concat(E.name,"-").concat((0,i.generateChars)(2))||(0,i.generateChars)(4);return N=N.replace(/(:|\.|\[|\]|,)/g,""),N="".concat(w,"-").concat(N),N};i.generateId=h;var d=function(E){return Object.prototype.toString.call(E).slice(8,-1)};i.getType=d;var a=function(E,w){return w!=null&&(0,i.getType)(w)===E};i.isType=a;var r=function(E,w){return w===void 0&&(w=document.createElement("div")),E.parentNode&&(E.nextSibling?E.parentNode.insertBefore(w,E.nextSibling):E.parentNode.appendChild(w)),w.appendChild(E)};i.wrap=r;var c=function(E,w,N){N===void 0&&(N=1);for(var g="".concat(N>0?"next":"previous","ElementSibling"),e=E[g];e;){if(e.matches(w))return e;e=e[g]}return e};i.getAdjacentEl=c;var l=function(E,w,N){if(N===void 0&&(N=1),!E)return!1;var g;return N>0?g=w.scrollTop+w.offsetHeight>=E.offsetTop+E.offsetHeight:g=E.offsetTop>=w.scrollTop,g};i.isScrolledIntoView=l;var O=function(E){return typeof E!="string"?E:E.replace(/&/g,"&").replace(/>/g,">").replace(/-1?h.map(function(y){var D=y;return D.id===parseInt("".concat(c.choiceId),10)&&(D.selected=!0),D}):h}case"REMOVE_ITEM":{var l=d;return l.choiceId&&l.choiceId>-1?h.map(function(y){var D=y;return D.id===parseInt("".concat(l.choiceId),10)&&(D.selected=!1),D}):h}case"FILTER_CHOICES":{var O=d;return h.map(function(y){var D=y;return D.active=O.results.some(function(k){var Q=k.item,Z=k.score;return Q.id===D.id?(D.score=Z,!0):!1}),D})}case"ACTIVATE_CHOICES":{var L=d;return h.map(function(y){var D=y;return D.active=L.active,D})}case"CLEAR_CHOICES":return i.defaultState;default:return h}}i.default=_},871:function(j,i){var b=this&&this.__spreadArray||function(h,d,a){if(a||arguments.length===2)for(var r=0,c=d.length,l;r0?"treeitem":"option"),Object.assign(t.dataset,{choice:"",id:Q,value:Z,selectText:d}),N?(t.classList.add(D),t.dataset.choiceDisabled="",t.setAttribute("aria-disabled","true")):(t.classList.add(L),t.dataset.choiceSelectable=""),t},input:function(_,h){var d=_.classNames,a=d.input,r=d.inputCloned,c=Object.assign(document.createElement("input"),{type:"search",name:"search_terms",className:"".concat(a," ").concat(r),autocomplete:"off",autocapitalize:"off",spellcheck:!1});return c.setAttribute("role","textbox"),c.setAttribute("aria-autocomplete","list"),c.setAttribute("aria-label",h),c},dropdown:function(_){var h=_.classNames,d=h.list,a=h.listDropdown,r=document.createElement("div");return r.classList.add(d,a),r.setAttribute("aria-expanded","false"),r},notice:function(_,h,d){var a,r=_.allowHTML,c=_.classNames,l=c.item,O=c.itemChoice,L=c.noResults,y=c.noChoices;d===void 0&&(d="");var D=[l,O];return d==="no-choices"?D.push(y):d==="no-results"&&D.push(L),Object.assign(document.createElement("div"),(a={},a[r?"innerHTML":"innerText"]=h,a.className=D.join(" "),a))},option:function(_){var h=_.label,d=_.value,a=_.customProperties,r=_.active,c=_.disabled,l=new Option(h,d,!1,r);return a&&(l.dataset.customProperties="".concat(a)),l.disabled=!!c,l}};i.default=b},996:function(j){var i=function(w){return b(w)&&!_(w)};function b(E){return!!E&&typeof E=="object"}function _(E){var w=Object.prototype.toString.call(E);return w==="[object RegExp]"||w==="[object Date]"||a(E)}var h=typeof Symbol=="function"&&Symbol.for,d=h?Symbol.for("react.element"):60103;function a(E){return E.$$typeof===d}function r(E){return Array.isArray(E)?[]:{}}function c(E,w){return w.clone!==!1&&w.isMergeableObject(E)?Z(r(E),E,w):E}function l(E,w,N){return E.concat(w).map(function(g){return c(g,N)})}function O(E,w){if(!w.customMerge)return Z;var N=w.customMerge(E);return typeof N=="function"?N:Z}function L(E){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(E).filter(function(w){return E.propertyIsEnumerable(w)}):[]}function y(E){return Object.keys(E).concat(L(E))}function D(E,w){try{return w in E}catch{return!1}}function k(E,w){return D(E,w)&&!(Object.hasOwnProperty.call(E,w)&&Object.propertyIsEnumerable.call(E,w))}function Q(E,w,N){var g={};return N.isMergeableObject(E)&&y(E).forEach(function(e){g[e]=c(E[e],N)}),y(w).forEach(function(e){k(E,e)||(D(E,e)&&N.isMergeableObject(w[e])?g[e]=O(e,N)(E[e],w[e],N):g[e]=c(w[e],N))}),g}function Z(E,w,N){N=N||{},N.arrayMerge=N.arrayMerge||l,N.isMergeableObject=N.isMergeableObject||i,N.cloneUnlessOtherwiseSpecified=c;var g=Array.isArray(w),e=Array.isArray(E),t=g===e;return t?g?N.arrayMerge(E,w,N):Q(E,w,N):c(w,N)}Z.all=function(w,N){if(!Array.isArray(w))throw new Error("first argument should be an array");return w.reduce(function(g,e){return Z(g,e,N)},{})};var ne=Z;j.exports=ne},221:function(j,i,b){b.r(i),b.d(i,{default:function(){return Se}});function _(p){return Array.isArray?Array.isArray(p):k(p)==="[object Array]"}let h=1/0;function d(p){if(typeof p=="string")return p;let o=p+"";return o=="0"&&1/p==-h?"-0":o}function a(p){return p==null?"":d(p)}function r(p){return typeof p=="string"}function c(p){return typeof p=="number"}function l(p){return p===!0||p===!1||L(p)&&k(p)=="[object Boolean]"}function O(p){return typeof p=="object"}function L(p){return O(p)&&p!==null}function y(p){return p!=null}function D(p){return!p.trim().length}function k(p){return p==null?p===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(p)}let Q="Extended search is not available",Z="Incorrect 'index' type",ne=p=>`Invalid value for key ${p}`,E=p=>`Pattern length exceeds max of ${p}.`,w=p=>`Missing ${p} property in key`,N=p=>`Property 'weight' in key '${p}' must be a positive integer`,g=Object.prototype.hasOwnProperty;class e{constructor(o){this._keys=[],this._keyMap={};let m=0;o.forEach(S=>{let I=t(S);m+=I.weight,this._keys.push(I),this._keyMap[I.id]=I,m+=I.weight}),this._keys.forEach(S=>{S.weight/=m})}get(o){return this._keyMap[o]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function t(p){let o=null,m=null,S=null,I=1,T=null;if(r(p)||_(p))S=p,o=n(p),m=s(p);else{if(!g.call(p,"name"))throw new Error(w("name"));let A=p.name;if(S=A,g.call(p,"weight")&&(I=p.weight,I<=0))throw new Error(N(A));o=n(A),m=s(A),T=p.getFn}return{path:o,id:m,weight:I,src:S,getFn:T}}function n(p){return _(p)?p:p.split(".")}function s(p){return _(p)?p.join("."):p}function v(p,o){let m=[],S=!1,I=(T,A,R)=>{if(y(T))if(!A[R])m.push(T);else{let F=A[R],H=T[F];if(!y(H))return;if(R===A.length-1&&(r(H)||c(H)||l(H)))m.push(a(H));else if(_(H)){S=!0;for(let B=0,x=H.length;Bp.score===o.score?p.idx{this._keysMap[m.id]=S})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,r(this.docs[0])?this.docs.forEach((o,m)=>{this._addString(o,m)}):this.docs.forEach((o,m)=>{this._addObject(o,m)}),this.norm.clear())}add(o){let m=this.size();r(o)?this._addString(o,m):this._addObject(o,m)}removeAt(o){this.records.splice(o,1);for(let m=o,S=this.size();m{let A=I.getFn?I.getFn(o):this.getFn(o,I.path);if(y(A)){if(_(A)){let R=[],F=[{nestedArrIndex:-1,value:A}];for(;F.length;){let{nestedArrIndex:H,value:B}=F.pop();if(y(B))if(r(B)&&!D(B)){let x={v:B,i:H,n:this.norm.get(B)};R.push(x)}else _(B)&&B.forEach((x,G)=>{F.push({nestedArrIndex:G,value:x})})}S.$[T]=R}else if(r(A)&&!D(A)){let R={v:A,n:this.norm.get(A)};S.$[T]=R}}}),this.records.push(S)}toJSON(){return{keys:this.keys,records:this.records}}}function U(p,o,{getFn:m=u.getFn,fieldNormWeight:S=u.fieldNormWeight}={}){let I=new V({getFn:m,fieldNormWeight:S});return I.setKeys(p.map(t)),I.setSources(o),I.create(),I}function $(p,{getFn:o=u.getFn,fieldNormWeight:m=u.fieldNormWeight}={}){let{keys:S,records:I}=p,T=new V({getFn:o,fieldNormWeight:m});return T.setKeys(S),T.setIndexRecords(I),T}function W(p,{errors:o=0,currentLocation:m=0,expectedLocation:S=0,distance:I=u.distance,ignoreLocation:T=u.ignoreLocation}={}){let A=o/p.length;if(T)return A;let R=Math.abs(S-m);return I?A+R/I:R?1:A}function J(p=[],o=u.minMatchCharLength){let m=[],S=-1,I=-1,T=0;for(let A=p.length;T=o&&m.push([S,I]),S=-1)}return p[T-1]&&T-S>=o&&m.push([S,T-1]),m}let z=32;function ee(p,o,m,{location:S=u.location,distance:I=u.distance,threshold:T=u.threshold,findAllMatches:A=u.findAllMatches,minMatchCharLength:R=u.minMatchCharLength,includeMatches:F=u.includeMatches,ignoreLocation:H=u.ignoreLocation}={}){if(o.length>z)throw new Error(E(z));let B=o.length,x=p.length,G=Math.max(0,Math.min(S,x)),q=T,re=G,ue=R>1||F,Ee=ue?Array(x):[],ve;for(;(ve=p.indexOf(o,re))>-1;){let he=W(o,{currentLocation:ve,expectedLocation:G,distance:I,ignoreLocation:H});if(q=Math.min(he,q),re=ve+B,ue){let ge=0;for(;ge=Ue;fe-=1){let Le=fe-1,We=m[p.charAt(Le)];if(ue&&(Ee[Le]=+!!We),Oe[fe]=(Oe[fe+1]<<1|1)&We,he&&(Oe[fe]|=(Ie[fe+1]|Ie[fe])<<1|1|Ie[fe+1]),Oe[fe]&at&&(be=W(o,{errors:he,currentLocation:Le,expectedLocation:G,distance:I,ignoreLocation:H}),be<=q)){if(q=be,re=Le,re<=G)break;Ue=Math.max(1,2*G-re)}}if(W(o,{errors:he+1,currentLocation:G,expectedLocation:G,distance:I,ignoreLocation:H})>q)break;Ie=Oe}let Ke={isMatch:re>=0,score:Math.max(.001,be)};if(ue){let he=J(Ee,R);he.length?F&&(Ke.indices=he):Ke.isMatch=!1}return Ke}function ae(p){let o={};for(let m=0,S=p.length;m{this.chunks.push({pattern:G,alphabet:ae(G),startIndex:q})},x=this.pattern.length;if(x>z){let G=0,q=x%z,re=x-q;for(;G{let{isMatch:ve,score:Ie,indices:be}=ee(o,re,ue,{location:I+Ee,distance:T,threshold:A,findAllMatches:R,minMatchCharLength:F,includeMatches:S,ignoreLocation:H});ve&&(G=!0),x+=Ie,ve&&be&&(B=[...B,...be])});let q={isMatch:G,score:G?x/this.chunks.length:1};return G&&S&&(q.indices=B),q}}class le{constructor(o){this.pattern=o}static isMultiMatch(o){return _e(o,this.multiRegex)}static isSingleMatch(o){return _e(o,this.singleRegex)}search(){}}function _e(p,o){let m=p.match(o);return m?m[1]:null}class te extends le{constructor(o){super(o)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(o){let m=o===this.pattern;return{isMatch:m,score:m?0:1,indices:[0,this.pattern.length-1]}}}class de extends le{constructor(o){super(o)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(o){let S=o.indexOf(this.pattern)===-1;return{isMatch:S,score:S?0:1,indices:[0,o.length-1]}}}class pe extends le{constructor(o){super(o)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(o){let m=o.startsWith(this.pattern);return{isMatch:m,score:m?0:1,indices:[0,this.pattern.length-1]}}}class oe extends le{constructor(o){super(o)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(o){let m=!o.startsWith(this.pattern);return{isMatch:m,score:m?0:1,indices:[0,o.length-1]}}}class Te extends le{constructor(o){super(o)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(o){let m=o.endsWith(this.pattern);return{isMatch:m,score:m?0:1,indices:[o.length-this.pattern.length,o.length-1]}}}class Pe extends le{constructor(o){super(o)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(o){let m=!o.endsWith(this.pattern);return{isMatch:m,score:m?0:1,indices:[0,o.length-1]}}}class He extends le{constructor(o,{location:m=u.location,threshold:S=u.threshold,distance:I=u.distance,includeMatches:T=u.includeMatches,findAllMatches:A=u.findAllMatches,minMatchCharLength:R=u.minMatchCharLength,isCaseSensitive:F=u.isCaseSensitive,ignoreLocation:H=u.ignoreLocation}={}){super(o),this._bitapSearch=new ce(o,{location:m,threshold:S,distance:I,includeMatches:T,findAllMatches:A,minMatchCharLength:R,isCaseSensitive:F,ignoreLocation:H})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(o){return this._bitapSearch.searchIn(o)}}class Be extends le{constructor(o){super(o)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(o){let m=0,S,I=[],T=this.pattern.length;for(;(S=o.indexOf(this.pattern,m))>-1;)m=S+T,I.push([S,m-1]);let A=!!I.length;return{isMatch:A,score:A?0:1,indices:I}}}let Me=[te,Be,pe,oe,Pe,Te,de,He],Ve=Me.length,Xe=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Je="|";function Qe(p,o={}){return p.split(Je).map(m=>{let S=m.trim().split(Xe).filter(T=>T&&!!T.trim()),I=[];for(let T=0,A=S.length;T!!(p[Ce.AND]||p[Ce.OR]),tt=p=>!!p[je.PATH],it=p=>!_(p)&&O(p)&&!Re(p),ke=p=>({[Ce.AND]:Object.keys(p).map(o=>({[o]:p[o]}))});function xe(p,o,{auto:m=!0}={}){let S=I=>{let T=Object.keys(I),A=tt(I);if(!A&&T.length>1&&!Re(I))return S(ke(I));if(it(I)){let F=A?I[je.PATH]:T[0],H=A?I[je.PATTERN]:I[F];if(!r(H))throw new Error(ne(F));let B={keyId:s(F),pattern:H};return m&&(B.searcher=Ne(H,o)),B}let R={children:[],operator:T[0]};return T.forEach(F=>{let H=I[F];_(H)&&H.forEach(B=>{R.children.push(S(B))})}),R};return Re(p)||(p=ke(p)),S(p)}function nt(p,{ignoreFieldNorm:o=u.ignoreFieldNorm}){p.forEach(m=>{let S=1;m.matches.forEach(({key:I,norm:T,score:A})=>{let R=I?I.weight:null;S*=Math.pow(A===0&&R?Number.EPSILON:A,(R||1)*(o?1:T))}),m.score=S})}function rt(p,o){let m=p.matches;o.matches=[],y(m)&&m.forEach(S=>{if(!y(S.indices)||!S.indices.length)return;let{indices:I,value:T}=S,A={indices:I,value:T};S.key&&(A.key=S.key.src),S.idx>-1&&(A.refIndex=S.idx),o.matches.push(A)})}function st(p,o){o.score=p.score}function ot(p,o,{includeMatches:m=u.includeMatches,includeScore:S=u.includeScore}={}){let I=[];return m&&I.push(rt),S&&I.push(st),p.map(T=>{let{idx:A}=T,R={item:o[A],refIndex:A};return I.length&&I.forEach(F=>{F(T,R)}),R})}class Se{constructor(o,m={},S){this.options={...u,...m},this.options.useExtendedSearch,this._keyStore=new e(this.options.keys),this.setCollection(o,S)}setCollection(o,m){if(this._docs=o,m&&!(m instanceof V))throw new Error(Z);this._myIndex=m||U(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(o){y(o)&&(this._docs.push(o),this._myIndex.add(o))}remove(o=()=>!1){let m=[];for(let S=0,I=this._docs.length;S-1&&(F=F.slice(0,m)),ot(F,this._docs,{includeMatches:S,includeScore:I})}_searchStringList(o){let m=Ne(o,this.options),{records:S}=this._myIndex,I=[];return S.forEach(({v:T,i:A,n:R})=>{if(!y(T))return;let{isMatch:F,score:H,indices:B}=m.searchIn(T);F&&I.push({item:T,idx:A,matches:[{score:H,value:T,norm:R,indices:B}]})}),I}_searchLogical(o){let m=xe(o,this.options),S=(R,F,H)=>{if(!R.children){let{keyId:x,searcher:G}=R,q=this._findMatches({key:this._keyStore.get(x),value:this._myIndex.getValueForItemAtKeyId(F,x),searcher:G});return q&&q.length?[{idx:H,item:F,matches:q}]:[]}let B=[];for(let x=0,G=R.children.length;x{if(y(R)){let H=S(m,R,F);H.length&&(T[F]||(T[F]={idx:F,item:R,matches:[]},A.push(T[F])),H.forEach(({matches:B})=>{T[F].matches.push(...B)}))}}),A}_searchObjectList(o){let m=Ne(o,this.options),{keys:S,records:I}=this._myIndex,T=[];return I.forEach(({$:A,i:R})=>{if(!y(A))return;let F=[];S.forEach((H,B)=>{F.push(...this._findMatches({key:H,value:A[B],searcher:m}))}),F.length&&T.push({idx:R,item:A,matches:F})}),T}_findMatches({key:o,value:m,searcher:S}){if(!y(m))return[];let I=[];if(_(m))m.forEach(({v:T,i:A,n:R})=>{if(!y(T))return;let{isMatch:F,score:H,indices:B}=S.searchIn(T);F&&I.push({score:H,key:o,value:T,idx:A,norm:R,indices:B})});else{let{v:T,n:A}=m,{isMatch:R,score:F,indices:H}=S.searchIn(T);R&&I.push({score:F,key:o,value:T,norm:A,indices:H})}return I}}Se.version="6.6.2",Se.createIndex=U,Se.parseIndex=$,Se.config=u,Se.parseQuery=xe,et(qe)},791:function(j,i,b){b.r(i),b.d(i,{__DO_NOT_USE__ActionTypes:function(){return y},applyMiddleware:function(){return M},bindActionCreators:function(){return v},combineReducers:function(){return n},compose:function(){return P},createStore:function(){return w},legacy_createStore:function(){return N}});function _(f){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},_(f)}function h(f,u){if(_(f)!=="object"||f===null)return f;var C=f[Symbol.toPrimitive];if(C!==void 0){var Y=C.call(f,u||"default");if(_(Y)!=="object")return Y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(f)}function d(f){var u=h(f,"string");return _(u)==="symbol"?u:String(u)}function a(f,u,C){return u=d(u),u in f?Object.defineProperty(f,u,{value:C,enumerable:!0,configurable:!0,writable:!0}):f[u]=C,f}function r(f,u){var C=Object.keys(f);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(f);u&&(Y=Y.filter(function(V){return Object.getOwnPropertyDescriptor(f,V).enumerable})),C.push.apply(C,Y)}return C}function c(f){for(var u=1;u"u"&&(C=u,u=void 0),typeof C<"u"){if(typeof C!="function")throw new Error(l(1));return C(w)(f,u)}if(typeof f!="function")throw new Error(l(2));var V=f,U=u,$=[],W=$,J=!1;function z(){W===$&&(W=$.slice())}function ee(){if(J)throw new Error(l(3));return U}function ae(te){if(typeof te!="function")throw new Error(l(4));if(J)throw new Error(l(5));var de=!0;return z(),W.push(te),function(){if(de){if(J)throw new Error(l(6));de=!1,z();var oe=W.indexOf(te);W.splice(oe,1),$=null}}}function ce(te){if(!D(te))throw new Error(l(7));if(typeof te.type>"u")throw new Error(l(8));if(J)throw new Error(l(9));try{J=!0,U=V(U,te)}finally{J=!1}for(var de=$=W,pe=0;pe0)return"Unexpected "+($.length>1?"keys":"key")+" "+('"'+$.join('", "')+'" found in '+U+". ")+"Expected to find one of the known reducer keys instead: "+('"'+V.join('", "')+'". Unexpected keys will be ignored.')}function t(f){Object.keys(f).forEach(function(u){var C=f[u],Y=C(void 0,{type:y.INIT});if(typeof Y>"u")throw new Error(l(12));if(typeof C(void 0,{type:y.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(l(13))})}function n(f){for(var u=Object.keys(f),C={},Y=0;Y"u"){var Te=ee&&ee.type;throw new Error(l(14))}le[te]=oe,ce=ce||oe!==pe}return ce=ce||U.length!==Object.keys(z).length,ce?le:z}}function s(f,u){return function(){return u(f.apply(this,arguments))}}function v(f,u){if(typeof f=="function")return s(f,u);if(typeof f!="object"||f===null)throw new Error(l(16));var C={};for(var Y in f){var V=f[Y];typeof V=="function"&&(C[Y]=s(V,u))}return C}function P(){for(var f=arguments.length,u=new Array(f),C=0;Cwindow.pluralize(O,e,{count:e}),noChoicesText:E,noResultsText:L,placeholderValue:k,position:Q??"auto",removeItemButton:se,renderChoiceLimit:D,searchEnabled:h,searchFields:w??["label"],searchPlaceholderValue:E,searchResultLimit:D,shouldSort:!1,searchFloor:a?0:1}),await this.refreshChoices({withInitialOptions:!0}),[null,void 0,""].includes(this.state)||this.select.setChoiceByValue(this.formatState(this.state)),this.refreshPlaceholder(),b&&this.select.showDropdown(),this.$refs.input.addEventListener("change",()=>{this.refreshPlaceholder(),!this.isStateBeingUpdated&&(this.isStateBeingUpdated=!0,this.state=this.select.getValue(!0)??null,this.$nextTick(()=>this.isStateBeingUpdated=!1))}),d&&this.$refs.input.addEventListener("showDropdown",async()=>{this.select.clearChoices(),await this.select.setChoices([{label:c,value:"",disabled:!0}]),await this.refreshChoices()}),a&&(this.$refs.input.addEventListener("search",async e=>{let t=e.detail.value?.trim();this.isSearching=!0,this.select.clearChoices(),await this.select.setChoices([{label:[null,void 0,""].includes(t)?c:ne,value:"",disabled:!0}])}),this.$refs.input.addEventListener("search",Alpine.debounce(async e=>{await this.refreshChoices({search:e.detail.value?.trim()}),this.isSearching=!1},Z))),_||window.addEventListener("filament-forms::select.refreshSelectedOptionLabel",async e=>{e.detail.livewireId===r&&e.detail.statePath===g&&await this.refreshChoices({withInitialOptions:!1})}),this.$watch("state",async()=>{this.select&&(this.refreshPlaceholder(),!this.isStateBeingUpdated&&await this.refreshChoices({withInitialOptions:!d}))})},destroy:function(){this.select.destroy(),this.select=null},refreshChoices:async function(e={}){let t=await this.getChoices(e);this.select&&(this.select.clearStore(),this.refreshPlaceholder(),this.setChoices(t),[null,void 0,""].includes(this.state)||this.select.setChoiceByValue(this.formatState(this.state)))},setChoices:function(e){this.select.setChoices(e,"value","label",!0)},getChoices:async function(e={}){let t=await this.getExistingOptions(e);return t.concat(await this.getMissingOptions(t))},getExistingOptions:async function({search:e,withInitialOptions:t}){if(t)return y;let n=[];return e!==""&&e!==null&&e!==void 0?n=await i(e):n=await j(),n.map(s=>s.choices?(s.choices=s.choices.map(v=>(v.selected=Array.isArray(this.state)?this.state.includes(v.value):this.state===v.value,v)),s):(s.selected=Array.isArray(this.state)?this.state.includes(s.value):this.state===s.value,s))},refreshPlaceholder:function(){_||(this.select._renderItems(),[null,void 0,""].includes(this.state)&&(this.$el.querySelector(".choices__list--single").innerHTML=`
${k??""}
`))},formatState:function(e){return _?(e??[]).map(t=>t?.toString()):e?.toString()},getMissingOptions:async function(e){let t=this.formatState(this.state);if([null,void 0,"",[],{}].includes(t))return{};let n=new Set;return e.forEach(s=>{if(s.choices){s.choices.forEach(v=>n.add(v.value));return}n.add(s.value)}),_?t.every(s=>n.has(s))?{}:(await me()).filter(s=>!n.has(s.value)).map(s=>(s.selected=!0,s)):n.has(t)?n:[{label:await X(),value:t,selected:!0}]}}}export{vt as default}; +/*! Bundled license information: + +choices.js/public/assets/scripts/choices.js: + (*! choices.js v10.2.0 | © 2022 Josh Johnson | https://github.com/jshjohnson/Choices#readme *) +*/ diff --git a/public/js/filament/forms/components/tags-input.js b/public/js/filament/forms/components/tags-input.js new file mode 100644 index 000000000..6a2aa3009 --- /dev/null +++ b/public/js/filament/forms/components/tags-input.js @@ -0,0 +1 @@ +function i({state:a,splitKeys:n}){return{newTag:"",state:a,createTag:function(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.newTag=""}},deleteTag:function(t){this.state=this.state.filter(e=>e!==t)},reorderTags:function(t){let e=this.state.splice(t.oldIndex,1)[0];this.state.splice(t.newIndex,0,e),this.state=[...this.state]},input:{"x-on:blur":"createTag()","x-model":"newTag","x-on:keydown"(t){["Enter",...n].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.createTag())},"x-on:paste"(){this.$nextTick(()=>{if(n.length===0){this.createTag();return}let t=n.map(e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(t,"g")).forEach(e=>{this.newTag=e,this.createTag()})})}}}}export{i as default}; diff --git a/public/js/filament/forms/components/textarea.js b/public/js/filament/forms/components/textarea.js new file mode 100644 index 000000000..4fda241af --- /dev/null +++ b/public/js/filament/forms/components/textarea.js @@ -0,0 +1 @@ +function r({initialHeight:t,shouldAutosize:i,state:s}){return{state:s,wrapperEl:null,init:function(){this.wrapperEl=this.$el.parentNode,this.setInitialHeight(),i?this.$watch("state",()=>{this.resize()}):this.setUpResizeObserver()},setInitialHeight:function(){this.$el.scrollHeight<=0||(this.wrapperEl.style.height=t+"rem")},resize:function(){if(this.setInitialHeight(),this.$el.scrollHeight<=0)return;let e=this.$el.scrollHeight+"px";this.wrapperEl.style.height!==e&&(this.wrapperEl.style.height=e)},setUpResizeObserver:function(){new ResizeObserver(()=>{this.wrapperEl.style.height=this.$el.style.height}).observe(this.$el)}}}export{r as default}; diff --git a/public/js/filament/notifications/notifications.js b/public/js/filament/notifications/notifications.js new file mode 100644 index 000000000..7ce306318 --- /dev/null +++ b/public/js/filament/notifications/notifications.js @@ -0,0 +1 @@ +(()=>{var O=Object.create;var N=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var d=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports);var j=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Y(t))!W.call(i,n)&&n!==e&&N(i,n,{get:()=>t[n],enumerable:!(s=V(t,n))||s.enumerable});return i};var J=(i,t,e)=>(e=i!=null?O(H(i)):{},j(t||!i||!i.__esModule?N(e,"default",{value:i,enumerable:!0}):e,i));var S=d((ut,_)=>{var v,g=typeof global<"u"&&(global.crypto||global.msCrypto);g&&g.getRandomValues&&(y=new Uint8Array(16),v=function(){return g.getRandomValues(y),y});var y;v||(T=new Array(16),v=function(){for(var i=0,t;i<16;i++)(i&3)===0&&(t=Math.random()*4294967296),T[i]=t>>>((i&3)<<3)&255;return T});var T;_.exports=v});var C=d((ct,U)=>{var P=[];for(f=0;f<256;++f)P[f]=(f+256).toString(16).substr(1);var f;function K(i,t){var e=t||0,s=P;return s[i[e++]]+s[i[e++]]+s[i[e++]]+s[i[e++]]+"-"+s[i[e++]]+s[i[e++]]+"-"+s[i[e++]]+s[i[e++]]+"-"+s[i[e++]]+s[i[e++]]+"-"+s[i[e++]]+s[i[e++]]+s[i[e++]]+s[i[e++]]+s[i[e++]]+s[i[e++]]}U.exports=K});var R=d((lt,b)=>{var Q=S(),X=C(),a=Q(),Z=[a[0]|1,a[1],a[2],a[3],a[4],a[5]],F=(a[6]<<8|a[7])&16383,D=0,A=0;function tt(i,t,e){var s=t&&e||0,n=t||[];i=i||{};var r=i.clockseq!==void 0?i.clockseq:F,o=i.msecs!==void 0?i.msecs:new Date().getTime(),h=i.nsecs!==void 0?i.nsecs:A+1,l=o-D+(h-A)/1e4;if(l<0&&i.clockseq===void 0&&(r=r+1&16383),(l<0||o>D)&&i.nsecs===void 0&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");D=o,A=h,F=r,o+=122192928e5;var c=((o&268435455)*1e4+h)%4294967296;n[s++]=c>>>24&255,n[s++]=c>>>16&255,n[s++]=c>>>8&255,n[s++]=c&255;var u=o/4294967296*1e4&268435455;n[s++]=u>>>8&255,n[s++]=u&255,n[s++]=u>>>24&15|16,n[s++]=u>>>16&255,n[s++]=r>>>8|128,n[s++]=r&255;for(var $=i.node||Z,m=0;m<6;++m)n[s+m]=$[m];return t||X(n)}b.exports=tt});var I=d((dt,G)=>{var it=S(),et=C();function st(i,t,e){var s=t&&e||0;typeof i=="string"&&(t=i=="binary"?new Array(16):null,i=null),i=i||{};var n=i.random||(i.rng||it)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t)for(var r=0;r<16;++r)t[s+r]=n[r];return t||et(n)}G.exports=st});var z=d((ft,M)=>{var nt=R(),L=I(),E=L;E.v1=nt;E.v4=L;M.exports=E});function k(i,t=()=>{}){let e=!1;return function(){e?t.apply(this,arguments):(e=!0,i.apply(this,arguments))}}var q=i=>{i.data("notificationComponent",({notification:t})=>({isShown:!1,computedStyle:null,transitionDuration:null,transitionEasing:null,init:function(){this.computedStyle=window.getComputedStyle(this.$el),this.transitionDuration=parseFloat(this.computedStyle.transitionDuration)*1e3,this.transitionEasing=this.computedStyle.transitionTimingFunction,this.configureTransitions(),this.configureAnimations(),t.duration&&t.duration!=="persistent"&&setTimeout(()=>{if(!this.$el.matches(":hover")){this.close();return}this.$el.addEventListener("mouseleave",()=>this.close())},t.duration),this.isShown=!0},configureTransitions:function(){let e=this.computedStyle.display,s=()=>{i.mutateDom(()=>{this.$el.style.setProperty("display",e),this.$el.style.setProperty("visibility","visible")}),this.$el._x_isShown=!0},n=()=>{i.mutateDom(()=>{this.$el._x_isShown?this.$el.style.setProperty("visibility","hidden"):this.$el.style.setProperty("display","none")})},r=k(o=>o?s():n(),o=>{this.$el._x_toggleAndCascadeWithTransitions(this.$el,o,s,n)});i.effect(()=>r(this.isShown))},configureAnimations:function(){let e;Livewire.hook("commit",({component:s,commit:n,succeed:r,fail:o,respond:h})=>{s.snapshot.data.isFilamentNotificationsComponent&&requestAnimationFrame(()=>{let l=()=>this.$el.getBoundingClientRect().top,c=l();h(()=>{e=()=>{this.isShown&&this.$el.animate([{transform:`translateY(${c-l()}px)`},{transform:"translateY(0px)"}],{duration:this.transitionDuration,easing:this.transitionEasing})},this.$el.getAnimations().forEach(u=>u.finish())}),r(({snapshot:u,effect:$})=>{e()})})})},close:function(){this.isShown=!1,setTimeout(()=>window.dispatchEvent(new CustomEvent("notificationClosed",{detail:{id:t.id}})),this.transitionDuration)},markAsRead:function(){window.dispatchEvent(new CustomEvent("markedNotificationAsRead",{detail:{id:t.id}}))},markAsUnread:function(){window.dispatchEvent(new CustomEvent("markedNotificationAsUnread",{detail:{id:t.id}}))}}))};var B=J(z(),1),p=class{constructor(){return this.id((0,B.v4)()),this}id(t){return this.id=t,this}title(t){return this.title=t,this}body(t){return this.body=t,this}actions(t){return this.actions=t,this}status(t){return this.status=t,this}color(t){return this.color=t,this}icon(t){return this.icon=t,this}iconColor(t){return this.iconColor=t,this}duration(t){return this.duration=t,this}seconds(t){return this.duration(t*1e3),this}persistent(){return this.duration("persistent"),this}danger(){return this.status("danger"),this}info(){return this.status("info"),this}success(){return this.status("success"),this}warning(){return this.status("warning"),this}view(t){return this.view=t,this}viewData(t){return this.viewData=t,this}send(){return window.dispatchEvent(new CustomEvent("notificationSent",{detail:{notification:this}})),this}},w=class{constructor(t){return this.name(t),this}name(t){return this.name=t,this}color(t){return this.color=t,this}dispatch(t,e){return this.event(t),this.eventData(e),this}dispatchSelf(t,e){return this.dispatch(t,e),this.dispatchDirection="self",this}dispatchTo(t,e,s){return this.dispatch(e,s),this.dispatchDirection="to",this.dispatchToComponent=t,this}emit(t,e){return this.dispatch(t,e),this}emitSelf(t,e){return this.dispatchSelf(t,e),this}emitTo(t,e,s){return this.dispatchTo(t,e,s),this}dispatchDirection(t){return this.dispatchDirection=t,this}dispatchToComponent(t){return this.dispatchToComponent=t,this}event(t){return this.event=t,this}eventData(t){return this.eventData=t,this}extraAttributes(t){return this.extraAttributes=t,this}icon(t){return this.icon=t,this}iconPosition(t){return this.iconPosition=t,this}outlined(t=!0){return this.isOutlined=t,this}disabled(t=!0){return this.isDisabled=t,this}label(t){return this.label=t,this}close(t=!0){return this.shouldClose=t,this}openUrlInNewTab(t=!0){return this.shouldOpenUrlInNewTab=t,this}size(t){return this.size=t,this}url(t){return this.url=t,this}view(t){return this.view=t,this}button(){return this.view("filament-actions::button-action"),this}grouped(){return this.view("filament-actions::grouped-action"),this}link(){return this.view("filament-actions::link-action"),this}},x=class{constructor(t){return this.actions(t),this}actions(t){return this.actions=t.map(e=>e.grouped()),this}color(t){return this.color=t,this}icon(t){return this.icon=t,this}iconPosition(t){return this.iconPosition=t,this}label(t){return this.label=t,this}tooltip(t){return this.tooltip=t,this}};window.FilamentNotificationAction=w;window.FilamentNotificationActionGroup=x;window.FilamentNotification=p;document.addEventListener("alpine:init",()=>{window.Alpine.plugin(q)});})(); diff --git a/public/js/filament/support/support.js b/public/js/filament/support/support.js new file mode 100644 index 000000000..9b2b2dce6 --- /dev/null +++ b/public/js/filament/support/support.js @@ -0,0 +1,46 @@ +(()=>{var Vo=Object.create;var Pi=Object.defineProperty;var Yo=Object.getOwnPropertyDescriptor;var Xo=Object.getOwnPropertyNames;var qo=Object.getPrototypeOf,Go=Object.prototype.hasOwnProperty;var Jr=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ko=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Xo(e))!Go.call(t,i)&&i!==r&&Pi(t,i,{get:()=>e[i],enumerable:!(n=Yo(e,i))||n.enumerable});return t};var Jo=(t,e,r)=>(r=t!=null?Vo(qo(t)):{},Ko(e||!t||!t.__esModule?Pi(r,"default",{value:t,enumerable:!0}):r,t));var po=Jr(()=>{});var ho=Jr(()=>{});var vo=Jr((js,yr)=>{(function(){"use strict";var t="input is invalid type",e="finalize already called",r=typeof window=="object",n=r?window:{};n.JS_MD5_NO_WINDOW&&(r=!1);var i=!r&&typeof self=="object",o=!n.JS_MD5_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?n=global:i&&(n=self);var a=!n.JS_MD5_NO_COMMON_JS&&typeof yr=="object"&&yr.exports,d=typeof define=="function"&&define.amd,f=!n.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),w=[128,32768,8388608,-2147483648],m=[0,8,16,24],E=["hex","array","digest","buffer","arrayBuffer","base64"],O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),S=[],M;if(f){var I=new ArrayBuffer(68);M=new Uint8Array(I),S=new Uint32Array(I)}var $=Array.isArray;(n.JS_MD5_NO_NODE_JS||!$)&&($=function(l){return Object.prototype.toString.call(l)==="[object Array]"});var A=ArrayBuffer.isView;f&&(n.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!A)&&(A=function(l){return typeof l=="object"&&l.buffer&&l.buffer.constructor===ArrayBuffer});var k=function(l){var h=typeof l;if(h==="string")return[l,!0];if(h!=="object"||l===null)throw new Error(t);if(f&&l.constructor===ArrayBuffer)return[new Uint8Array(l),!1];if(!$(l)&&!A(l))throw new Error(t);return[l,!1]},Y=function(l){return function(h){return new X(!0).update(h)[l]()}},nt=function(){var l=Y("hex");o&&(l=J(l)),l.create=function(){return new X},l.update=function(p){return l.create().update(p)};for(var h=0;h>>6,Vt[P++]=128|p&63):p<55296||p>=57344?(Vt[P++]=224|p>>>12,Vt[P++]=128|p>>>6&63,Vt[P++]=128|p&63):(p=65536+((p&1023)<<10|l.charCodeAt(++j)&1023),Vt[P++]=240|p>>>18,Vt[P++]=128|p>>>12&63,Vt[P++]=128|p>>>6&63,Vt[P++]=128|p&63);else for(P=this.start;j>>2]|=p<>>2]|=(192|p>>>6)<>>2]|=(128|p&63)<=57344?(Q[P>>>2]|=(224|p>>>12)<>>2]|=(128|p>>>6&63)<>>2]|=(128|p&63)<>>2]|=(240|p>>>18)<>>2]|=(128|p>>>12&63)<>>2]|=(128|p>>>6&63)<>>2]|=(128|p&63)<>>2]|=l[j]<=64?(this.start=P-64,this.hash(),this.hashed=!0):this.start=P}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},X.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var l=this.blocks,h=this.lastByteIndex;l[h>>>2]|=w[h&3],h>=56&&(this.hashed||this.hash(),l[0]=l[16],l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),l[14]=this.bytes<<3,l[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},X.prototype.hash=function(){var l,h,v,p,j,P,R=this.blocks;this.first?(l=R[0]-680876937,l=(l<<7|l>>>25)-271733879<<0,p=(-1732584194^l&2004318071)+R[1]-117830708,p=(p<<12|p>>>20)+l<<0,v=(-271733879^p&(l^-271733879))+R[2]-1126478375,v=(v<<17|v>>>15)+p<<0,h=(l^v&(p^l))+R[3]-1316259209,h=(h<<22|h>>>10)+v<<0):(l=this.h0,h=this.h1,v=this.h2,p=this.h3,l+=(p^h&(v^p))+R[0]-680876936,l=(l<<7|l>>>25)+h<<0,p+=(v^l&(h^v))+R[1]-389564586,p=(p<<12|p>>>20)+l<<0,v+=(h^p&(l^h))+R[2]+606105819,v=(v<<17|v>>>15)+p<<0,h+=(l^v&(p^l))+R[3]-1044525330,h=(h<<22|h>>>10)+v<<0),l+=(p^h&(v^p))+R[4]-176418897,l=(l<<7|l>>>25)+h<<0,p+=(v^l&(h^v))+R[5]+1200080426,p=(p<<12|p>>>20)+l<<0,v+=(h^p&(l^h))+R[6]-1473231341,v=(v<<17|v>>>15)+p<<0,h+=(l^v&(p^l))+R[7]-45705983,h=(h<<22|h>>>10)+v<<0,l+=(p^h&(v^p))+R[8]+1770035416,l=(l<<7|l>>>25)+h<<0,p+=(v^l&(h^v))+R[9]-1958414417,p=(p<<12|p>>>20)+l<<0,v+=(h^p&(l^h))+R[10]-42063,v=(v<<17|v>>>15)+p<<0,h+=(l^v&(p^l))+R[11]-1990404162,h=(h<<22|h>>>10)+v<<0,l+=(p^h&(v^p))+R[12]+1804603682,l=(l<<7|l>>>25)+h<<0,p+=(v^l&(h^v))+R[13]-40341101,p=(p<<12|p>>>20)+l<<0,v+=(h^p&(l^h))+R[14]-1502002290,v=(v<<17|v>>>15)+p<<0,h+=(l^v&(p^l))+R[15]+1236535329,h=(h<<22|h>>>10)+v<<0,l+=(v^p&(h^v))+R[1]-165796510,l=(l<<5|l>>>27)+h<<0,p+=(h^v&(l^h))+R[6]-1069501632,p=(p<<9|p>>>23)+l<<0,v+=(l^h&(p^l))+R[11]+643717713,v=(v<<14|v>>>18)+p<<0,h+=(p^l&(v^p))+R[0]-373897302,h=(h<<20|h>>>12)+v<<0,l+=(v^p&(h^v))+R[5]-701558691,l=(l<<5|l>>>27)+h<<0,p+=(h^v&(l^h))+R[10]+38016083,p=(p<<9|p>>>23)+l<<0,v+=(l^h&(p^l))+R[15]-660478335,v=(v<<14|v>>>18)+p<<0,h+=(p^l&(v^p))+R[4]-405537848,h=(h<<20|h>>>12)+v<<0,l+=(v^p&(h^v))+R[9]+568446438,l=(l<<5|l>>>27)+h<<0,p+=(h^v&(l^h))+R[14]-1019803690,p=(p<<9|p>>>23)+l<<0,v+=(l^h&(p^l))+R[3]-187363961,v=(v<<14|v>>>18)+p<<0,h+=(p^l&(v^p))+R[8]+1163531501,h=(h<<20|h>>>12)+v<<0,l+=(v^p&(h^v))+R[13]-1444681467,l=(l<<5|l>>>27)+h<<0,p+=(h^v&(l^h))+R[2]-51403784,p=(p<<9|p>>>23)+l<<0,v+=(l^h&(p^l))+R[7]+1735328473,v=(v<<14|v>>>18)+p<<0,h+=(p^l&(v^p))+R[12]-1926607734,h=(h<<20|h>>>12)+v<<0,j=h^v,l+=(j^p)+R[5]-378558,l=(l<<4|l>>>28)+h<<0,p+=(j^l)+R[8]-2022574463,p=(p<<11|p>>>21)+l<<0,P=p^l,v+=(P^h)+R[11]+1839030562,v=(v<<16|v>>>16)+p<<0,h+=(P^v)+R[14]-35309556,h=(h<<23|h>>>9)+v<<0,j=h^v,l+=(j^p)+R[1]-1530992060,l=(l<<4|l>>>28)+h<<0,p+=(j^l)+R[4]+1272893353,p=(p<<11|p>>>21)+l<<0,P=p^l,v+=(P^h)+R[7]-155497632,v=(v<<16|v>>>16)+p<<0,h+=(P^v)+R[10]-1094730640,h=(h<<23|h>>>9)+v<<0,j=h^v,l+=(j^p)+R[13]+681279174,l=(l<<4|l>>>28)+h<<0,p+=(j^l)+R[0]-358537222,p=(p<<11|p>>>21)+l<<0,P=p^l,v+=(P^h)+R[3]-722521979,v=(v<<16|v>>>16)+p<<0,h+=(P^v)+R[6]+76029189,h=(h<<23|h>>>9)+v<<0,j=h^v,l+=(j^p)+R[9]-640364487,l=(l<<4|l>>>28)+h<<0,p+=(j^l)+R[12]-421815835,p=(p<<11|p>>>21)+l<<0,P=p^l,v+=(P^h)+R[15]+530742520,v=(v<<16|v>>>16)+p<<0,h+=(P^v)+R[2]-995338651,h=(h<<23|h>>>9)+v<<0,l+=(v^(h|~p))+R[0]-198630844,l=(l<<6|l>>>26)+h<<0,p+=(h^(l|~v))+R[7]+1126891415,p=(p<<10|p>>>22)+l<<0,v+=(l^(p|~h))+R[14]-1416354905,v=(v<<15|v>>>17)+p<<0,h+=(p^(v|~l))+R[5]-57434055,h=(h<<21|h>>>11)+v<<0,l+=(v^(h|~p))+R[12]+1700485571,l=(l<<6|l>>>26)+h<<0,p+=(h^(l|~v))+R[3]-1894986606,p=(p<<10|p>>>22)+l<<0,v+=(l^(p|~h))+R[10]-1051523,v=(v<<15|v>>>17)+p<<0,h+=(p^(v|~l))+R[1]-2054922799,h=(h<<21|h>>>11)+v<<0,l+=(v^(h|~p))+R[8]+1873313359,l=(l<<6|l>>>26)+h<<0,p+=(h^(l|~v))+R[15]-30611744,p=(p<<10|p>>>22)+l<<0,v+=(l^(p|~h))+R[6]-1560198380,v=(v<<15|v>>>17)+p<<0,h+=(p^(v|~l))+R[13]+1309151649,h=(h<<21|h>>>11)+v<<0,l+=(v^(h|~p))+R[4]-145523070,l=(l<<6|l>>>26)+h<<0,p+=(h^(l|~v))+R[11]-1120210379,p=(p<<10|p>>>22)+l<<0,v+=(l^(p|~h))+R[2]+718787259,v=(v<<15|v>>>17)+p<<0,h+=(p^(v|~l))+R[9]-343485551,h=(h<<21|h>>>11)+v<<0,this.first?(this.h0=l+1732584193<<0,this.h1=h-271733879<<0,this.h2=v-1732584194<<0,this.h3=p+271733878<<0,this.first=!1):(this.h0=this.h0+l<<0,this.h1=this.h1+h<<0,this.h2=this.h2+v<<0,this.h3=this.h3+p<<0)},X.prototype.hex=function(){this.finalize();var l=this.h0,h=this.h1,v=this.h2,p=this.h3;return u[l>>>4&15]+u[l&15]+u[l>>>12&15]+u[l>>>8&15]+u[l>>>20&15]+u[l>>>16&15]+u[l>>>28&15]+u[l>>>24&15]+u[h>>>4&15]+u[h&15]+u[h>>>12&15]+u[h>>>8&15]+u[h>>>20&15]+u[h>>>16&15]+u[h>>>28&15]+u[h>>>24&15]+u[v>>>4&15]+u[v&15]+u[v>>>12&15]+u[v>>>8&15]+u[v>>>20&15]+u[v>>>16&15]+u[v>>>28&15]+u[v>>>24&15]+u[p>>>4&15]+u[p&15]+u[p>>>12&15]+u[p>>>8&15]+u[p>>>20&15]+u[p>>>16&15]+u[p>>>28&15]+u[p>>>24&15]},X.prototype.toString=X.prototype.hex,X.prototype.digest=function(){this.finalize();var l=this.h0,h=this.h1,v=this.h2,p=this.h3;return[l&255,l>>>8&255,l>>>16&255,l>>>24&255,h&255,h>>>8&255,h>>>16&255,h>>>24&255,v&255,v>>>8&255,v>>>16&255,v>>>24&255,p&255,p>>>8&255,p>>>16&255,p>>>24&255]},X.prototype.array=X.prototype.digest,X.prototype.arrayBuffer=function(){this.finalize();var l=new ArrayBuffer(16),h=new Uint32Array(l);return h[0]=this.h0,h[1]=this.h1,h[2]=this.h2,h[3]=this.h3,l},X.prototype.buffer=X.prototype.arrayBuffer,X.prototype.base64=function(){for(var l,h,v,p="",j=this.array(),P=0;P<15;)l=j[P++],h=j[P++],v=j[P++],p+=O[l>>>2]+O[(l<<4|h>>>4)&63]+O[(h<<2|v>>>6)&63]+O[v&63];return l=j[P],p+=O[l>>>2]+O[l<<4&63]+"==",p};function Z(l,h){var v,p=k(l);if(l=p[0],p[1]){var j=[],P=l.length,R=0,Q;for(v=0;v>>6,j[R++]=128|Q&63):Q<55296||Q>=57344?(j[R++]=224|Q>>>12,j[R++]=128|Q>>>6&63,j[R++]=128|Q&63):(Q=65536+((Q&1023)<<10|l.charCodeAt(++v)&1023),j[R++]=240|Q>>>18,j[R++]=128|Q>>>12&63,j[R++]=128|Q>>>6&63,j[R++]=128|Q&63);l=j}l.length>64&&(l=new X(!0).update(l).array());var Vt=[],Re=[];for(v=0;v<64;++v){var ze=l[v]||0;Vt[v]=92^ze,Re[v]=54^ze}X.call(this,h),this.update(Re),this.oKeyPad=Vt,this.inner=!0,this.sharedMemory=h}Z.prototype=new X,Z.prototype.finalize=function(){if(X.prototype.finalize.call(this),this.inner){this.inner=!1;var l=this.array();X.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(l),X.prototype.finalize.call(this)}};var mt=nt();mt.md5=mt,mt.md5.hmac=dt(),a?yr.exports=mt:(n.md5=mt,d&&define(function(){return mt}))})()});var $i=["top","right","bottom","left"],Mi=["start","end"],Ri=$i.reduce((t,e)=>t.concat(e,e+"-"+Mi[0],e+"-"+Mi[1]),[]),Ee=Math.min,ee=Math.max,hr=Math.round,pr=Math.floor,nn=t=>({x:t,y:t}),Zo={left:"right",right:"left",bottom:"top",top:"bottom"},Qo={start:"end",end:"start"};function Zr(t,e,r){return ee(t,Ee(e,r))}function je(t,e){return typeof t=="function"?t(e):t}function pe(t){return t.split("-")[0]}function xe(t){return t.split("-")[1]}function Wi(t){return t==="x"?"y":"x"}function Qr(t){return t==="y"?"height":"width"}function Pn(t){return["top","bottom"].includes(pe(t))?"y":"x"}function ti(t){return Wi(Pn(t))}function zi(t,e,r){r===void 0&&(r=!1);let n=xe(t),i=ti(t),o=Qr(i),a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(a=mr(a)),[a,mr(a)]}function ta(t){let e=mr(t);return[vr(t),e,vr(e)]}function vr(t){return t.replace(/start|end/g,e=>Qo[e])}function ea(t,e,r){let n=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return r?e?i:n:e?n:i;case"left":case"right":return e?o:a;default:return[]}}function na(t,e,r,n){let i=xe(t),o=ea(pe(t),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),e&&(o=o.concat(o.map(vr)))),o}function mr(t){return t.replace(/left|right|bottom|top/g,e=>Zo[e])}function ra(t){return{top:0,right:0,bottom:0,left:0,...t}}function ei(t){return typeof t!="number"?ra(t):{top:t,right:t,bottom:t,left:t}}function Cn(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Ii(t,e,r){let{reference:n,floating:i}=t,o=Pn(e),a=ti(e),d=Qr(a),f=pe(e),u=o==="y",w=n.x+n.width/2-i.width/2,m=n.y+n.height/2-i.height/2,E=n[d]/2-i[d]/2,O;switch(f){case"top":O={x:w,y:n.y-i.height};break;case"bottom":O={x:w,y:n.y+n.height};break;case"right":O={x:n.x+n.width,y:m};break;case"left":O={x:n.x-i.width,y:m};break;default:O={x:n.x,y:n.y}}switch(xe(e)){case"start":O[a]-=E*(r&&u?-1:1);break;case"end":O[a]+=E*(r&&u?-1:1);break}return O}var ia=async(t,e,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,d=o.filter(Boolean),f=await(a.isRTL==null?void 0:a.isRTL(e)),u=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:w,y:m}=Ii(u,n,f),E=n,O={},S=0;for(let M=0;M({name:"arrow",options:t,async fn(e){let{x:r,y:n,placement:i,rects:o,platform:a,elements:d,middlewareData:f}=e,{element:u,padding:w=0}=je(t,e)||{};if(u==null)return{};let m=ei(w),E={x:r,y:n},O=ti(i),S=Qr(O),M=await a.getDimensions(u),I=O==="y",$=I?"top":"left",A=I?"bottom":"right",k=I?"clientHeight":"clientWidth",Y=o.reference[S]+o.reference[O]-E[O]-o.floating[S],nt=E[O]-o.reference[O],J=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u)),U=J?J[k]:0;(!U||!await(a.isElement==null?void 0:a.isElement(J)))&&(U=d.floating[k]||o.floating[S]);let dt=Y/2-nt/2,X=U/2-M[S]/2-1,Z=Ee(m[$],X),mt=Ee(m[A],X),l=Z,h=U-M[S]-mt,v=U/2-M[S]/2+dt,p=Zr(l,v,h),j=!f.arrow&&xe(i)!=null&&v!==p&&o.reference[S]/2-(vxe(i)===t),...r.filter(i=>xe(i)!==t)]:r.filter(i=>pe(i)===i)).filter(i=>t?xe(i)===t||(e?vr(i)!==i:!1):!0)}var sa=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,n,i;let{rects:o,middlewareData:a,placement:d,platform:f,elements:u}=e,{crossAxis:w=!1,alignment:m,allowedPlacements:E=Ri,autoAlignment:O=!0,...S}=je(t,e),M=m!==void 0||E===Ri?aa(m||null,O,E):E,I=await _n(e,S),$=((r=a.autoPlacement)==null?void 0:r.index)||0,A=M[$];if(A==null)return{};let k=zi(A,o,await(f.isRTL==null?void 0:f.isRTL(u.floating)));if(d!==A)return{reset:{placement:M[0]}};let Y=[I[pe(A)],I[k[0]],I[k[1]]],nt=[...((n=a.autoPlacement)==null?void 0:n.overflows)||[],{placement:A,overflows:Y}],J=M[$+1];if(J)return{data:{index:$+1,overflows:nt},reset:{placement:J}};let U=nt.map(Z=>{let mt=xe(Z.placement);return[Z.placement,mt&&w?Z.overflows.slice(0,2).reduce((l,h)=>l+h,0):Z.overflows[0],Z.overflows]}).sort((Z,mt)=>Z[1]-mt[1]),X=((i=U.filter(Z=>Z[2].slice(0,xe(Z[0])?2:3).every(mt=>mt<=0))[0])==null?void 0:i[0])||U[0][0];return X!==d?{data:{index:$+1,overflows:nt},reset:{placement:X}}:{}}}},la=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;let{placement:i,middlewareData:o,rects:a,initialPlacement:d,platform:f,elements:u}=e,{mainAxis:w=!0,crossAxis:m=!0,fallbackPlacements:E,fallbackStrategy:O="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:M=!0,...I}=je(t,e);if((r=o.arrow)!=null&&r.alignmentOffset)return{};let $=pe(i),A=pe(d)===d,k=await(f.isRTL==null?void 0:f.isRTL(u.floating)),Y=E||(A||!M?[mr(d)]:ta(d));!E&&S!=="none"&&Y.push(...na(d,M,S,k));let nt=[d,...Y],J=await _n(e,I),U=[],dt=((n=o.flip)==null?void 0:n.overflows)||[];if(w&&U.push(J[$]),m){let l=zi(i,a,k);U.push(J[l[0]],J[l[1]])}if(dt=[...dt,{placement:i,overflows:U}],!U.every(l=>l<=0)){var X,Z;let l=(((X=o.flip)==null?void 0:X.index)||0)+1,h=nt[l];if(h)return{data:{index:l,overflows:dt},reset:{placement:h}};let v=(Z=dt.filter(p=>p.overflows[0]<=0).sort((p,j)=>p.overflows[1]-j.overflows[1])[0])==null?void 0:Z.placement;if(!v)switch(O){case"bestFit":{var mt;let p=(mt=dt.map(j=>[j.placement,j.overflows.filter(P=>P>0).reduce((P,R)=>P+R,0)]).sort((j,P)=>j[1]-P[1])[0])==null?void 0:mt[0];p&&(v=p);break}case"initialPlacement":v=d;break}if(i!==v)return{reset:{placement:v}}}return{}}}};function Fi(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Li(t){return $i.some(e=>t[e]>=0)}var ca=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:r}=e,{strategy:n="referenceHidden",...i}=je(t,e);switch(n){case"referenceHidden":{let o=await _n(e,{...i,elementContext:"reference"}),a=Fi(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Li(a)}}}case"escaped":{let o=await _n(e,{...i,altBoundary:!0}),a=Fi(o,r.floating);return{data:{escapedOffsets:a,escaped:Li(a)}}}default:return{}}}}};function Ui(t){let e=Ee(...t.map(o=>o.left)),r=Ee(...t.map(o=>o.top)),n=ee(...t.map(o=>o.right)),i=ee(...t.map(o=>o.bottom));return{x:e,y:r,width:n-e,height:i-r}}function fa(t){let e=t.slice().sort((i,o)=>i.y-o.y),r=[],n=null;for(let i=0;in.height/2?r.push([o]):r[r.length-1].push(o),n=o}return r.map(i=>Cn(Ui(i)))}var ua=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){let{placement:r,elements:n,rects:i,platform:o,strategy:a}=e,{padding:d=2,x:f,y:u}=je(t,e),w=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),m=fa(w),E=Cn(Ui(w)),O=ei(d);function S(){if(m.length===2&&m[0].left>m[1].right&&f!=null&&u!=null)return m.find(I=>f>I.left-O.left&&fI.top-O.top&&u=2){if(Pn(r)==="y"){let Z=m[0],mt=m[m.length-1],l=pe(r)==="top",h=Z.top,v=mt.bottom,p=l?Z.left:mt.left,j=l?Z.right:mt.right,P=j-p,R=v-h;return{top:h,bottom:v,left:p,right:j,width:P,height:R,x:p,y:h}}let I=pe(r)==="left",$=ee(...m.map(Z=>Z.right)),A=Ee(...m.map(Z=>Z.left)),k=m.filter(Z=>I?Z.left===A:Z.right===$),Y=k[0].top,nt=k[k.length-1].bottom,J=A,U=$,dt=U-J,X=nt-Y;return{top:Y,bottom:nt,left:J,right:U,width:dt,height:X,x:J,y:Y}}return E}let M=await o.getElementRects({reference:{getBoundingClientRect:S},floating:n.floating,strategy:a});return i.reference.x!==M.reference.x||i.reference.y!==M.reference.y||i.reference.width!==M.reference.width||i.reference.height!==M.reference.height?{reset:{rects:M}}:{}}}};async function da(t,e){let{placement:r,platform:n,elements:i}=t,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=pe(r),d=xe(r),f=Pn(r)==="y",u=["left","top"].includes(a)?-1:1,w=o&&f?-1:1,m=je(e,t),{mainAxis:E,crossAxis:O,alignmentAxis:S}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return d&&typeof S=="number"&&(O=d==="end"?S*-1:S),f?{x:O*w,y:E*u}:{x:E*u,y:O*w}}var Vi=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;let{x:i,y:o,placement:a,middlewareData:d}=e,f=await da(e,t);return a===((r=d.offset)==null?void 0:r.placement)&&(n=d.arrow)!=null&&n.alignmentOffset?{}:{x:i+f.x,y:o+f.y,data:{...f,placement:a}}}}},pa=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:n,placement:i}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:d={fn:I=>{let{x:$,y:A}=I;return{x:$,y:A}}},...f}=je(t,e),u={x:r,y:n},w=await _n(e,f),m=Pn(pe(i)),E=Wi(m),O=u[E],S=u[m];if(o){let I=E==="y"?"top":"left",$=E==="y"?"bottom":"right",A=O+w[I],k=O-w[$];O=Zr(A,O,k)}if(a){let I=m==="y"?"top":"left",$=m==="y"?"bottom":"right",A=S+w[I],k=S-w[$];S=Zr(A,S,k)}let M=d.fn({...e,[E]:O,[m]:S});return{...M,data:{x:M.x-r,y:M.y-n}}}}},ha=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){let{placement:r,rects:n,platform:i,elements:o}=e,{apply:a=()=>{},...d}=je(t,e),f=await _n(e,d),u=pe(r),w=xe(r),m=Pn(r)==="y",{width:E,height:O}=n.floating,S,M;u==="top"||u==="bottom"?(S=u,M=w===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(M=u,S=w==="end"?"top":"bottom");let I=O-f[S],$=E-f[M],A=!e.middlewareData.shift,k=I,Y=$;if(m){let J=E-f.left-f.right;Y=w||A?Ee($,J):J}else{let J=O-f.top-f.bottom;k=w||A?Ee(I,J):J}if(A&&!w){let J=ee(f.left,0),U=ee(f.right,0),dt=ee(f.top,0),X=ee(f.bottom,0);m?Y=E-2*(J!==0||U!==0?J+U:ee(f.left,f.right)):k=O-2*(dt!==0||X!==0?dt+X:ee(f.top,f.bottom))}await a({...e,availableWidth:Y,availableHeight:k});let nt=await i.getDimensions(o.floating);return E!==nt.width||O!==nt.height?{reset:{rects:!0}}:{}}}};function rn(t){return Yi(t)?(t.nodeName||"").toLowerCase():"#document"}function ce(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Be(t){var e;return(e=(Yi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Yi(t){return t instanceof Node||t instanceof ce(t).Node}function ke(t){return t instanceof Element||t instanceof ce(t).Element}function Te(t){return t instanceof HTMLElement||t instanceof ce(t).HTMLElement}function Ni(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ce(t).ShadowRoot}function Vn(t){let{overflow:e,overflowX:r,overflowY:n,display:i}=he(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function va(t){return["table","td","th"].includes(rn(t))}function ni(t){let e=ri(),r=he(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function ma(t){let e=Tn(t);for(;Te(e)&&!gr(e);){if(ni(e))return e;e=Tn(e)}return null}function ri(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function gr(t){return["html","body","#document"].includes(rn(t))}function he(t){return ce(t).getComputedStyle(t)}function br(t){return ke(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Tn(t){if(rn(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Ni(t)&&t.host||Be(t);return Ni(e)?e.host:e}function Xi(t){let e=Tn(t);return gr(e)?t.ownerDocument?t.ownerDocument.body:t.body:Te(e)&&Vn(e)?e:Xi(e)}function Un(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);let i=Xi(t),o=i===((n=t.ownerDocument)==null?void 0:n.body),a=ce(i);return o?e.concat(a,a.visualViewport||[],Vn(i)?i:[],a.frameElement&&r?Un(a.frameElement):[]):e.concat(i,Un(i,[],r))}function qi(t){let e=he(t),r=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=Te(t),o=i?t.offsetWidth:r,a=i?t.offsetHeight:n,d=hr(r)!==o||hr(n)!==a;return d&&(r=o,n=a),{width:r,height:n,$:d}}function ii(t){return ke(t)?t:t.contextElement}function Dn(t){let e=ii(t);if(!Te(e))return nn(1);let r=e.getBoundingClientRect(),{width:n,height:i,$:o}=qi(e),a=(o?hr(r.width):r.width)/n,d=(o?hr(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!d||!Number.isFinite(d))&&(d=1),{x:a,y:d}}var ga=nn(0);function Gi(t){let e=ce(t);return!ri()||!e.visualViewport?ga:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ba(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==ce(t)?!1:e}function vn(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);let i=t.getBoundingClientRect(),o=ii(t),a=nn(1);e&&(n?ke(n)&&(a=Dn(n)):a=Dn(t));let d=ba(o,r,n)?Gi(o):nn(0),f=(i.left+d.x)/a.x,u=(i.top+d.y)/a.y,w=i.width/a.x,m=i.height/a.y;if(o){let E=ce(o),O=n&&ke(n)?ce(n):n,S=E,M=S.frameElement;for(;M&&n&&O!==S;){let I=Dn(M),$=M.getBoundingClientRect(),A=he(M),k=$.left+(M.clientLeft+parseFloat(A.paddingLeft))*I.x,Y=$.top+(M.clientTop+parseFloat(A.paddingTop))*I.y;f*=I.x,u*=I.y,w*=I.x,m*=I.y,f+=k,u+=Y,S=ce(M),M=S.frameElement}}return Cn({width:w,height:m,x:f,y:u})}var ya=[":popover-open",":modal"];function Ki(t){return ya.some(e=>{try{return t.matches(e)}catch{return!1}})}function wa(t){let{elements:e,rect:r,offsetParent:n,strategy:i}=t,o=i==="fixed",a=Be(n),d=e?Ki(e.floating):!1;if(n===a||d&&o)return r;let f={scrollLeft:0,scrollTop:0},u=nn(1),w=nn(0),m=Te(n);if((m||!m&&!o)&&((rn(n)!=="body"||Vn(a))&&(f=br(n)),Te(n))){let E=vn(n);u=Dn(n),w.x=E.x+n.clientLeft,w.y=E.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-f.scrollLeft*u.x+w.x,y:r.y*u.y-f.scrollTop*u.y+w.y}}function xa(t){return Array.from(t.getClientRects())}function Ji(t){return vn(Be(t)).left+br(t).scrollLeft}function Ea(t){let e=Be(t),r=br(t),n=t.ownerDocument.body,i=ee(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=ee(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+Ji(t),d=-r.scrollTop;return he(n).direction==="rtl"&&(a+=ee(e.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:d}}function Oa(t,e){let r=ce(t),n=Be(t),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,d=0,f=0;if(i){o=i.width,a=i.height;let u=ri();(!u||u&&e==="fixed")&&(d=i.offsetLeft,f=i.offsetTop)}return{width:o,height:a,x:d,y:f}}function Sa(t,e){let r=vn(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,o=Te(t)?Dn(t):nn(1),a=t.clientWidth*o.x,d=t.clientHeight*o.y,f=i*o.x,u=n*o.y;return{width:a,height:d,x:f,y:u}}function ki(t,e,r){let n;if(e==="viewport")n=Oa(t,r);else if(e==="document")n=Ea(Be(t));else if(ke(e))n=Sa(e,r);else{let i=Gi(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return Cn(n)}function Zi(t,e){let r=Tn(t);return r===e||!ke(r)||gr(r)?!1:he(r).position==="fixed"||Zi(r,e)}function Aa(t,e){let r=e.get(t);if(r)return r;let n=Un(t,[],!1).filter(d=>ke(d)&&rn(d)!=="body"),i=null,o=he(t).position==="fixed",a=o?Tn(t):t;for(;ke(a)&&!gr(a);){let d=he(a),f=ni(a);!f&&d.position==="fixed"&&(i=null),(o?!f&&!i:!f&&d.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Vn(a)&&!f&&Zi(t,a))?n=n.filter(w=>w!==a):i=d,a=Tn(a)}return e.set(t,n),n}function Da(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t,a=[...r==="clippingAncestors"?Aa(e,this._c):[].concat(r),n],d=a[0],f=a.reduce((u,w)=>{let m=ki(e,w,i);return u.top=ee(m.top,u.top),u.right=Ee(m.right,u.right),u.bottom=Ee(m.bottom,u.bottom),u.left=ee(m.left,u.left),u},ki(e,d,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Ca(t){let{width:e,height:r}=qi(t);return{width:e,height:r}}function _a(t,e,r){let n=Te(e),i=Be(e),o=r==="fixed",a=vn(t,!0,o,e),d={scrollLeft:0,scrollTop:0},f=nn(0);if(n||!n&&!o)if((rn(e)!=="body"||Vn(i))&&(d=br(e)),n){let m=vn(e,!0,o,e);f.x=m.x+e.clientLeft,f.y=m.y+e.clientTop}else i&&(f.x=Ji(i));let u=a.left+d.scrollLeft-f.x,w=a.top+d.scrollTop-f.y;return{x:u,y:w,width:a.width,height:a.height}}function ji(t,e){return!Te(t)||he(t).position==="fixed"?null:e?e(t):t.offsetParent}function Qi(t,e){let r=ce(t);if(!Te(t)||Ki(t))return r;let n=ji(t,e);for(;n&&va(n)&&he(n).position==="static";)n=ji(n,e);return n&&(rn(n)==="html"||rn(n)==="body"&&he(n).position==="static"&&!ni(n))?r:n||ma(t)||r}var Ta=async function(t){let e=this.getOffsetParent||Qi,r=this.getDimensions;return{reference:_a(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await r(t.floating)}}};function Pa(t){return he(t).direction==="rtl"}var Ma={convertOffsetParentRelativeRectToViewportRelativeRect:wa,getDocumentElement:Be,getClippingRect:Da,getOffsetParent:Qi,getElementRects:Ta,getClientRects:xa,getDimensions:Ca,getScale:Dn,isElement:ke,isRTL:Pa};function Ra(t,e){let r=null,n,i=Be(t);function o(){var d;clearTimeout(n),(d=r)==null||d.disconnect(),r=null}function a(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),o();let{left:u,top:w,width:m,height:E}=t.getBoundingClientRect();if(d||e(),!m||!E)return;let O=pr(w),S=pr(i.clientWidth-(u+m)),M=pr(i.clientHeight-(w+E)),I=pr(u),A={rootMargin:-O+"px "+-S+"px "+-M+"px "+-I+"px",threshold:ee(0,Ee(1,f))||1},k=!0;function Y(nt){let J=nt[0].intersectionRatio;if(J!==f){if(!k)return a();J?a(!1,J):n=setTimeout(()=>{a(!1,1e-7)},100)}k=!1}try{r=new IntersectionObserver(Y,{...A,root:i.ownerDocument})}catch{r=new IntersectionObserver(Y,A)}r.observe(t)}return a(!0),o}function Bi(t,e,r,n){n===void 0&&(n={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=n,u=ii(t),w=i||o?[...u?Un(u):[],...Un(e)]:[];w.forEach($=>{i&&$.addEventListener("scroll",r,{passive:!0}),o&&$.addEventListener("resize",r)});let m=u&&d?Ra(u,r):null,E=-1,O=null;a&&(O=new ResizeObserver($=>{let[A]=$;A&&A.target===u&&O&&(O.unobserve(e),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var k;(k=O)==null||k.observe(e)})),r()}),u&&!f&&O.observe(u),O.observe(e));let S,M=f?vn(t):null;f&&I();function I(){let $=vn(t);M&&($.x!==M.x||$.y!==M.y||$.width!==M.width||$.height!==M.height)&&r(),M=$,S=requestAnimationFrame(I)}return r(),()=>{var $;w.forEach(A=>{i&&A.removeEventListener("scroll",r),o&&A.removeEventListener("resize",r)}),m?.(),($=O)==null||$.disconnect(),O=null,f&&cancelAnimationFrame(S)}}var oi=sa,to=pa,eo=la,no=ha,ro=ca,io=oa,oo=ua,Hi=(t,e,r)=>{let n=new Map,i={platform:Ma,...r},o={...i.platform,_c:n};return ia(t,e,{...i,platform:o})},Ia=t=>{let e={placement:"bottom",strategy:"absolute",middleware:[]},r=Object.keys(t),n=i=>t[i];return r.includes("offset")&&e.middleware.push(Vi(n("offset"))),r.includes("teleport")&&(e.strategy="fixed"),r.includes("placement")&&(e.placement=n("placement")),r.includes("autoPlacement")&&!r.includes("flip")&&e.middleware.push(oi(n("autoPlacement"))),r.includes("flip")&&e.middleware.push(eo(n("flip"))),r.includes("shift")&&e.middleware.push(to(n("shift"))),r.includes("inline")&&e.middleware.push(oo(n("inline"))),r.includes("arrow")&&e.middleware.push(io(n("arrow"))),r.includes("hide")&&e.middleware.push(ro(n("hide"))),r.includes("size")&&e.middleware.push(no(n("size"))),e},Fa=(t,e)=>{let r={component:{trap:!1},float:{placement:"bottom",strategy:"absolute",middleware:[]}},n=i=>t[t.indexOf(i)+1];if(t.includes("trap")&&(r.component.trap=!0),t.includes("teleport")&&(r.float.strategy="fixed"),t.includes("offset")&&r.float.middleware.push(Vi(e.offset||10)),t.includes("placement")&&(r.float.placement=n("placement")),t.includes("autoPlacement")&&!t.includes("flip")&&r.float.middleware.push(oi(e.autoPlacement)),t.includes("flip")&&r.float.middleware.push(eo(e.flip)),t.includes("shift")&&r.float.middleware.push(to(e.shift)),t.includes("inline")&&r.float.middleware.push(oo(e.inline)),t.includes("arrow")&&r.float.middleware.push(io(e.arrow)),t.includes("hide")&&r.float.middleware.push(ro(e.hide)),t.includes("size")){let i=e.size?.availableWidth??null,o=e.size?.availableHeight??null;i&&delete e.size.availableWidth,o&&delete e.size.availableHeight,r.float.middleware.push(no({...e.size,apply({availableWidth:a,availableHeight:d,elements:f}){Object.assign(f.floating.style,{maxWidth:`${i??a}px`,maxHeight:`${o??d}px`})}}))}return r},La=t=>{var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".split(""),r="";t||(t=Math.floor(Math.random()*e.length));for(var n=0;n{}){let r=!1;return function(){r?e.apply(this,arguments):(r=!0,t.apply(this,arguments))}}function ka(t){let e={dismissable:!0,trap:!1};function r(n,i=null){if(n){if(n.hasAttribute("aria-expanded")||n.setAttribute("aria-expanded",!1),i.hasAttribute("id"))n.setAttribute("aria-controls",i.getAttribute("id"));else{let o=`panel-${La(8)}`;n.setAttribute("aria-controls",o),i.setAttribute("id",o)}i.setAttribute("aria-modal",!0),i.setAttribute("role","dialog")}}t.magic("float",n=>(i={},o={})=>{let a={...e,...o},d=Object.keys(i).length>0?Ia(i):{middleware:[oi()]},f=n,u=n.parentElement.closest("[x-data]"),w=u.querySelector('[x-ref="panel"]');r(f,w);function m(){return w.style.display=="block"}function E(){w.style.display="none",f.setAttribute("aria-expanded","false"),a.trap&&w.setAttribute("x-trap","false"),Bi(n,w,M)}function O(){w.style.display="block",f.setAttribute("aria-expanded","true"),a.trap&&w.setAttribute("x-trap","true"),M()}function S(){m()?E():O()}async function M(){return await Hi(n,w,d).then(({middlewareData:I,placement:$,x:A,y:k})=>{if(I.arrow){let Y=I.arrow?.x,nt=I.arrow?.y,J=d.middleware.filter(dt=>dt.name=="arrow")[0].options.element,U={top:"bottom",right:"left",bottom:"top",left:"right"}[$.split("-")[0]];Object.assign(J.style,{left:Y!=null?`${Y}px`:"",top:nt!=null?`${nt}px`:"",right:"",bottom:"",[U]:"-4px"})}if(I.hide){let{referenceHidden:Y}=I.hide;Object.assign(w.style,{visibility:Y?"hidden":"visible"})}Object.assign(w.style,{left:`${A}px`,top:`${k}px`})})}a.dismissable&&(window.addEventListener("click",I=>{!u.contains(I.target)&&m()&&S()}),window.addEventListener("keydown",I=>{I.key==="Escape"&&m()&&S()},!0)),S()}),t.directive("float",(n,{modifiers:i,expression:o},{evaluate:a,effect:d})=>{let f=o?a(o):{},u=i.length>0?Fa(i,f):{},w=null;u.float.strategy=="fixed"&&(n.style.position="fixed");let m=U=>n.parentElement&&!n.parentElement.closest("[x-data]").contains(U.target)?n.close():null,E=U=>U.key==="Escape"?n.close():null,O=n.getAttribute("x-ref"),S=n.parentElement.closest("[x-data]"),M=S.querySelectorAll(`[\\@click^="$refs.${O}"]`),I=S.querySelectorAll(`[x-on\\:click^="$refs.${O}"]`);n.style.setProperty("display","none"),r([...M,...I][0],n),n._x_isShown=!1,n.trigger=null,n._x_doHide||(n._x_doHide=()=>{n.style.setProperty("display","none",i.includes("important")?"important":void 0)}),n._x_doShow||(n._x_doShow=()=>{n.style.setProperty("display","block",i.includes("important")?"important":void 0)});let $=()=>{n._x_doHide(),n._x_isShown=!1},A=()=>{n._x_doShow(),n._x_isShown=!0},k=()=>setTimeout(A),Y=Na(U=>U?A():$(),U=>{typeof n._x_toggleAndCascadeWithTransitions=="function"?n._x_toggleAndCascadeWithTransitions(n,U,A,$):U?k():$()}),nt,J=!0;d(()=>a(U=>{!J&&U===nt||(i.includes("immediate")&&(U?k():$()),Y(U),nt=U,J=!1)})),n.open=async function(U){n.trigger=U.currentTarget?U.currentTarget:U,Y(!0),n.trigger.setAttribute("aria-expanded","true"),u.component.trap&&n.setAttribute("x-trap","true"),w=Bi(n.trigger,n,()=>{Hi(n.trigger,n,u.float).then(({middlewareData:dt,placement:X,x:Z,y:mt})=>{if(dt.arrow){let l=dt.arrow?.x,h=dt.arrow?.y,v=u.float.middleware.filter(j=>j.name=="arrow")[0].options.element,p={top:"bottom",right:"left",bottom:"top",left:"right"}[X.split("-")[0]];Object.assign(v.style,{left:l!=null?`${l}px`:"",top:h!=null?`${h}px`:"",right:"",bottom:"",[p]:"-4px"})}if(dt.hide){let{referenceHidden:l}=dt.hide;Object.assign(n.style,{visibility:l?"hidden":"visible"})}Object.assign(n.style,{left:`${Z}px`,top:`${mt}px`})})}),window.addEventListener("click",m),window.addEventListener("keydown",E,!0)},n.close=function(){if(!n._x_isShown)return!1;Y(!1),n.trigger.setAttribute("aria-expanded","false"),u.component.trap&&n.setAttribute("x-trap","false"),w(),window.removeEventListener("click",m),window.removeEventListener("keydown",E,!1)},n.toggle=function(U){n._x_isShown?n.close():n.open(U)}})}var ao=ka;function ja(t){t.store("lazyLoadedAssets",{loaded:new Set,check(a){return Array.isArray(a)?a.every(d=>this.loaded.has(d)):this.loaded.has(a)},markLoaded(a){Array.isArray(a)?a.forEach(d=>this.loaded.add(d)):this.loaded.add(a)}});let e=a=>new CustomEvent(a,{bubbles:!0,composed:!0,cancelable:!0}),r=(a,d={},f,u)=>{let w=document.createElement(a);return Object.entries(d).forEach(([m,E])=>w[m]=E),f&&(u?f.insertBefore(w,u):f.appendChild(w)),w},n=(a,d,f={},u=null,w=null)=>{let m=a==="link"?`link[href="${d}"]`:`script[src="${d}"]`;if(document.querySelector(m)||t.store("lazyLoadedAssets").check(d))return Promise.resolve();let E=a==="link"?{...f,href:d}:{...f,src:d},O=r(a,E,u,w);return new Promise((S,M)=>{O.onload=()=>{t.store("lazyLoadedAssets").markLoaded(d),S()},O.onerror=()=>{M(new Error(`Failed to load ${a}: ${d}`))}})},i=async(a,d,f=null,u=null)=>{let w={type:"text/css",rel:"stylesheet"};d&&(w.media=d);let m=document.head,E=null;if(f&&u){let O=document.querySelector(`link[href*="${u}"]`);O?(m=O.parentElement,E=f==="before"?O:O.nextSibling):(console.warn(`Target (${u}) not found for ${a}. Appending to head.`),m=document.head,E=null)}await n("link",a,w,m,E)},o=async(a,d,f=null,u=null,w=null)=>{let m=document.head,E=null;if(f&&u){let S=document.querySelector(`script[src*="${u}"]`);S?(m=S.parentElement,E=f==="before"?S:S.nextSibling):(console.warn(`Target (${u}) not found for ${a}. Falling back to head or body.`),m=document.head,E=null)}else(d.has("body-start")||d.has("body-end"))&&(m=document.body,d.has("body-start")&&(E=document.body.firstChild));let O={};w&&(O.type="module"),await n("script",a,O,m,E)};t.directive("load-css",(a,{expression:d},{evaluate:f})=>{let u=f(d),w=a.media,m=a.getAttribute("data-dispatch"),E=a.getAttribute("data-css-before")?"before":a.getAttribute("data-css-after")?"after":null,O=a.getAttribute("data-css-before")||a.getAttribute("data-css-after")||null;Promise.all(u.map(S=>i(S,w,E,O))).then(()=>{m&&window.dispatchEvent(e(`${m}-css`))}).catch(console.error)}),t.directive("load-js",(a,{expression:d,modifiers:f},{evaluate:u})=>{let w=u(d),m=new Set(f),E=a.getAttribute("data-js-before")?"before":a.getAttribute("data-js-after")?"after":null,O=a.getAttribute("data-js-before")||a.getAttribute("data-js-after")||null,S=a.getAttribute("data-js-as-module")||a.getAttribute("data-as-module")||!1,M=a.getAttribute("data-dispatch");Promise.all(w.map(I=>o(I,m,E,O,S))).then(()=>{M&&window.dispatchEvent(e(`${M}-js`))}).catch(console.error)})}var so=ja;function Ba(){return!0}function Ha({component:t,argument:e}){return new Promise(r=>{if(e)window.addEventListener(e,()=>r(),{once:!0});else{let n=i=>{i.detail.id===t.id&&(window.removeEventListener("async-alpine:load",n),r())};window.addEventListener("async-alpine:load",n)}})}function $a(){return new Promise(t=>{"requestIdleCallback"in window?window.requestIdleCallback(t):setTimeout(t,200)})}function Wa({argument:t}){return new Promise(e=>{if(!t)return console.log("Async Alpine: media strategy requires a media query. Treating as 'eager'"),e();let r=window.matchMedia(`(${t})`);r.matches?e():r.addEventListener("change",e,{once:!0})})}function za({component:t,argument:e}){return new Promise(r=>{let n=e||"0px 0px 0px 0px",i=new IntersectionObserver(o=>{o[0].isIntersecting&&(i.disconnect(),r())},{rootMargin:n});i.observe(t.el)})}var lo={eager:Ba,event:Ha,idle:$a,media:Wa,visible:za};async function Ua(t){let e=Va(t.strategy);await ai(t,e)}async function ai(t,e){if(e.type==="expression"){if(e.operator==="&&")return Promise.all(e.parameters.map(r=>ai(t,r)));if(e.operator==="||")return Promise.any(e.parameters.map(r=>ai(t,r)))}return lo[e.method]?lo[e.method]({component:t,argument:e.argument}):!1}function Va(t){let e=Ya(t),r=fo(e);return r.type==="method"?{type:"expression",operator:"&&",parameters:[r]}:r}function Ya(t){let e=/\s*([()])\s*|\s*(\|\||&&|\|)\s*|\s*((?:[^()&|]+\([^()]+\))|[^()&|]+)\s*/g,r=[],n;for(;(n=e.exec(t))!==null;){let[i,o,a,d]=n;if(o!==void 0)r.push({type:"parenthesis",value:o});else if(a!==void 0)r.push({type:"operator",value:a==="|"?"&&":a});else{let f={type:"method",method:d.trim()};d.includes("(")&&(f.method=d.substring(0,d.indexOf("(")).trim(),f.argument=d.substring(d.indexOf("(")+1,d.indexOf(")"))),d.method==="immediate"&&(d.method="eager"),r.push(f)}}return r}function fo(t){let e=co(t);for(;t.length>0&&(t[0].value==="&&"||t[0].value==="|"||t[0].value==="||");){let r=t.shift().value,n=co(t);e.type==="expression"&&e.operator===r?e.parameters.push(n):e={type:"expression",operator:r,parameters:[e,n]}}return e}function co(t){if(t[0].value==="("){t.shift();let e=fo(t);return t[0].value===")"&&t.shift(),e}else return t.shift()}function uo(t){let e="load",r=t.prefixed("load-src"),n=t.prefixed("ignore"),i={defaultStrategy:"eager",keepRelativeURLs:!1},o=!1,a={},d=0;function f(){return d++}t.asyncOptions=A=>{i={...i,...A}},t.asyncData=(A,k=!1)=>{a[A]={loaded:!1,download:k}},t.asyncUrl=(A,k)=>{!A||!k||a[A]||(a[A]={loaded:!1,download:()=>import($(k))})},t.asyncAlias=A=>{o=A};let u=A=>{t.skipDuringClone(()=>{A._x_async||(A._x_async="init",A._x_ignore=!0,A.setAttribute(n,""))})()},w=async A=>{t.skipDuringClone(async()=>{if(A._x_async!=="init")return;A._x_async="await";let{name:k,strategy:Y}=m(A);await Ua({name:k,strategy:Y,el:A,id:A.id||f()}),A.isConnected&&(await E(k),A.isConnected&&(S(A),A._x_async="loaded"))})()};w.inline=u,t.directive(e,w).before("ignore");function m(A){let k=I(A.getAttribute(t.prefixed("data"))),Y=A.getAttribute(t.prefixed(e))||i.defaultStrategy,nt=A.getAttribute(r);return nt&&t.asyncUrl(k,nt),{name:k,strategy:Y}}async function E(A){if(A.startsWith("_x_async_")||(M(A),!a[A]||a[A].loaded))return;let k=await O(A);t.data(A,k),a[A].loaded=!0}async function O(A){if(!a[A])return;let k=await a[A].download(A);return typeof k=="function"?k:k[A]||k.default||Object.values(k)[0]||!1}function S(A){t.destroyTree(A),A._x_ignore=!1,A.removeAttribute(n),!A.closest(`[${n}]`)&&t.initTree(A)}function M(A){if(!(!o||a[A])){if(typeof o=="function"){t.asyncData(A,o);return}t.asyncUrl(A,o.replaceAll("[name]",A))}}function I(A){return(A||"").split(/[({]/g)[0]||`_x_async_${f()}`}function $(A){return i.keepRelativeURLs||new RegExp("^(?:[a-z+]+:)?//","i").test(A)?A:new URL(A,document.baseURI).href}}var Uo=Jo(vo(),1);function mo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Me(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}function Ga(t,e){if(t==null)return{};var r=qa(t,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var Ka="1.15.6";function He(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var We=He(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),tr=He(/Edge/i),go=He(/firefox/i),Gn=He(/safari/i)&&!He(/chrome/i)&&!He(/android/i),wi=He(/iP(ad|od|hone)/i),Ao=He(/chrome/i)&&He(/android/i),Do={capture:!1,passive:!1};function Ot(t,e,r){t.addEventListener(e,r,!We&&Do)}function Et(t,e,r){t.removeEventListener(e,r,!We&&Do)}function Tr(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function Co(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Se(t,e,r,n){if(t){r=r||document;do{if(e!=null&&(e[0]===">"?t.parentNode===r&&Tr(t,e):Tr(t,e))||n&&t===r)return t;if(t===r)break}while(t=Co(t))}return null}var bo=/\s+/g;function fe(t,e,r){if(t&&e)if(t.classList)t.classList[r?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(bo," ").replace(" "+e+" "," ");t.className=(n+(r?" "+e:"")).replace(bo," ")}}function at(t,e,r){var n=t&&t.style;if(n){if(r===void 0)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(r=t.currentStyle),e===void 0?r:r[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=r+(typeof r=="string"?"":"px")}}function Ln(t,e){var r="";if(typeof t=="string")r=t;else do{var n=at(t,"transform");n&&n!=="none"&&(r=n+" "+r)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(r)}function _o(t,e,r){if(t){var n=t.getElementsByTagName(e),i=0,o=n.length;if(r)for(;i=o:a=i<=o,!a)return n;if(n===Pe())break;n=sn(n,!1)}return!1}function Nn(t,e,r,n){for(var i=0,o=0,a=t.children;o2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,o=Ga(n,is);er.pluginEvent.bind(st)(e,r,Me({dragEl:N,parentEl:Ut,ghostEl:ut,rootEl:kt,nextEl:bn,lastDownEl:Ar,cloneEl:Wt,cloneHidden:an,dragStarted:Yn,putSortable:Zt,activeSortable:st.active,originalEvent:i,oldIndex:Fn,oldDraggableIndex:Jn,newIndex:ue,newDraggableIndex:on,hideGhostForTarget:No,unhideGhostForTarget:ko,cloneNowHidden:function(){an=!0},cloneNowShown:function(){an=!1},dispatchSortableEvent:function(d){ie({sortable:r,name:d,originalEvent:i})}},o))};function ie(t){rs(Me({putSortable:Zt,cloneEl:Wt,targetEl:N,rootEl:kt,oldIndex:Fn,oldDraggableIndex:Jn,newIndex:ue,newDraggableIndex:on},t))}var N,Ut,ut,kt,bn,Ar,Wt,an,Fn,ue,Jn,on,wr,Zt,In=!1,Pr=!1,Mr=[],mn,Oe,ci,fi,xo,Eo,Yn,Rn,Zn,Qn=!1,xr=!1,Dr,ne,ui=[],mi=!1,Rr=[],Fr=typeof document<"u",Er=wi,Oo=tr||We?"cssFloat":"float",os=Fr&&!Ao&&!wi&&"draggable"in document.createElement("div"),Io=function(){if(Fr){if(We)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Fo=function(e,r){var n=at(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Nn(e,0,r),a=Nn(e,1,r),d=o&&at(o),f=a&&at(a),u=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+qt(o).width,w=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+qt(a).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&d.float&&d.float!=="none"){var m=d.float==="left"?"left":"right";return a&&(f.clear==="both"||f.clear===m)?"vertical":"horizontal"}return o&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||u>=i&&n[Oo]==="none"||a&&n[Oo]==="none"&&u+w>i)?"vertical":"horizontal"},as=function(e,r,n){var i=n?e.left:e.top,o=n?e.right:e.bottom,a=n?e.width:e.height,d=n?r.left:r.top,f=n?r.right:r.bottom,u=n?r.width:r.height;return i===d||o===f||i+a/2===d+u/2},ss=function(e,r){var n;return Mr.some(function(i){var o=i[se].options.emptyInsertThreshold;if(!(!o||xi(i))){var a=qt(i),d=e>=a.left-o&&e<=a.right+o,f=r>=a.top-o&&r<=a.bottom+o;if(d&&f)return n=i}}),n},Lo=function(e){function r(o,a){return function(d,f,u,w){var m=d.options.group.name&&f.options.group.name&&d.options.group.name===f.options.group.name;if(o==null&&(a||m))return!0;if(o==null||o===!1)return!1;if(a&&o==="clone")return o;if(typeof o=="function")return r(o(d,f,u,w),a)(d,f,u,w);var E=(a?d:f).options.group.name;return o===!0||typeof o=="string"&&o===E||o.join&&o.indexOf(E)>-1}}var n={},i=e.group;(!i||Sr(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=r(i.pull,!0),n.checkPut=r(i.put),n.revertClone=i.revertClone,e.group=n},No=function(){!Io&&ut&&at(ut,"display","none")},ko=function(){!Io&&ut&&at(ut,"display","")};Fr&&!Ao&&document.addEventListener("click",function(t){if(Pr)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Pr=!1,!1},!0);var gn=function(e){if(N){e=e.touches?e.touches[0]:e;var r=ss(e.clientX,e.clientY);if(r){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=r,n.preventDefault=void 0,n.stopPropagation=void 0,r[se]._onDragOver(n)}}},ls=function(e){N&&N.parentNode[se]._isOutsideThisEl(e.target)};function st(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=$e({},e),t[se]=this;var r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Fo(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,d){a.setData("Text",d.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:st.supportPointer!==!1&&"PointerEvent"in window&&(!Gn||wi),emptyInsertThreshold:5};er.initializePlugins(this,t,r);for(var n in r)!(n in e)&&(e[n]=r[n]);Lo(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:os,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Ot(t,"pointerdown",this._onTapStart):(Ot(t,"mousedown",this._onTapStart),Ot(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ot(t,"dragover",this),Ot(t,"dragenter",this)),Mr.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),$e(this,ts())}st.prototype={constructor:st,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Rn=null)},_getDirection:function(e,r){return typeof this.options.direction=="function"?this.options.direction.call(this,e,r,N):this.options.direction},_onTapStart:function(e){if(e.cancelable){var r=this,n=this.el,i=this.options,o=i.preventOnFilter,a=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,f=(d||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||f,w=i.filter;if(ms(n),!N&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Gn&&f&&f.tagName.toUpperCase()==="SELECT")&&(f=Se(f,i.draggable,n,!1),!(f&&f.animated)&&Ar!==f)){if(Fn=ve(f),Jn=ve(f,i.draggable),typeof w=="function"){if(w.call(this,e,f,this)){ie({sortable:r,rootEl:u,name:"filter",targetEl:f,toEl:n,fromEl:n}),ae("filter",r,{evt:e}),o&&e.preventDefault();return}}else if(w&&(w=w.split(",").some(function(m){if(m=Se(u,m.trim(),n,!1),m)return ie({sortable:r,rootEl:m,name:"filter",targetEl:f,fromEl:n,toEl:n}),ae("filter",r,{evt:e}),!0}),w)){o&&e.preventDefault();return}i.handle&&!Se(u,i.handle,n,!1)||this._prepareDragStart(e,d,f)}}},_prepareDragStart:function(e,r,n){var i=this,o=i.el,a=i.options,d=o.ownerDocument,f;if(n&&!N&&n.parentNode===o){var u=qt(n);if(kt=o,N=n,Ut=N.parentNode,bn=N.nextSibling,Ar=n,wr=a.group,st.dragged=N,mn={target:N,clientX:(r||e).clientX,clientY:(r||e).clientY},xo=mn.clientX-u.left,Eo=mn.clientY-u.top,this._lastX=(r||e).clientX,this._lastY=(r||e).clientY,N.style["will-change"]="all",f=function(){if(ae("delayEnded",i,{evt:e}),st.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!go&&i.nativeDraggable&&(N.draggable=!0),i._triggerDragStart(e,r),ie({sortable:i,name:"choose",originalEvent:e}),fe(N,a.chosenClass,!0)},a.ignore.split(",").forEach(function(w){_o(N,w.trim(),di)}),Ot(d,"dragover",gn),Ot(d,"mousemove",gn),Ot(d,"touchmove",gn),a.supportPointer?(Ot(d,"pointerup",i._onDrop),!this.nativeDraggable&&Ot(d,"pointercancel",i._onDrop)):(Ot(d,"mouseup",i._onDrop),Ot(d,"touchend",i._onDrop),Ot(d,"touchcancel",i._onDrop)),go&&this.nativeDraggable&&(this.options.touchStartThreshold=4,N.draggable=!0),ae("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||r)&&(!this.nativeDraggable||!(tr||We))){if(st.eventCanceled){this._onDrop();return}a.supportPointer?(Ot(d,"pointerup",i._disableDelayedDrag),Ot(d,"pointercancel",i._disableDelayedDrag)):(Ot(d,"mouseup",i._disableDelayedDrag),Ot(d,"touchend",i._disableDelayedDrag),Ot(d,"touchcancel",i._disableDelayedDrag)),Ot(d,"mousemove",i._delayedDragTouchMoveHandler),Ot(d,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&Ot(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(f,a.delay)}else f()}},_delayedDragTouchMoveHandler:function(e){var r=e.touches?e.touches[0]:e;Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){N&&di(N),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Et(e,"mouseup",this._disableDelayedDrag),Et(e,"touchend",this._disableDelayedDrag),Et(e,"touchcancel",this._disableDelayedDrag),Et(e,"pointerup",this._disableDelayedDrag),Et(e,"pointercancel",this._disableDelayedDrag),Et(e,"mousemove",this._delayedDragTouchMoveHandler),Et(e,"touchmove",this._delayedDragTouchMoveHandler),Et(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,r){r=r||e.pointerType=="touch"&&e,!this.nativeDraggable||r?this.options.supportPointer?Ot(document,"pointermove",this._onTouchMove):r?Ot(document,"touchmove",this._onTouchMove):Ot(document,"mousemove",this._onTouchMove):(Ot(N,"dragend",this),Ot(kt,"dragstart",this._onDragStart));try{document.selection?Cr(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,r){if(In=!1,kt&&N){ae("dragStarted",this,{evt:r}),this.nativeDraggable&&Ot(document,"dragover",ls);var n=this.options;!e&&fe(N,n.dragClass,!1),fe(N,n.ghostClass,!0),st.active=this,e&&this._appendGhost(),ie({sortable:this,name:"start",originalEvent:r})}else this._nulling()},_emulateDragOver:function(){if(Oe){this._lastX=Oe.clientX,this._lastY=Oe.clientY,No();for(var e=document.elementFromPoint(Oe.clientX,Oe.clientY),r=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Oe.clientX,Oe.clientY),e!==r);)r=e;if(N.parentNode[se]._isOutsideThisEl(e),r)do{if(r[se]){var n=void 0;if(n=r[se]._onDragOver({clientX:Oe.clientX,clientY:Oe.clientY,target:e,rootEl:r}),n&&!this.options.dragoverBubble)break}e=r}while(r=Co(r));ko()}},_onTouchMove:function(e){if(mn){var r=this.options,n=r.fallbackTolerance,i=r.fallbackOffset,o=e.touches?e.touches[0]:e,a=ut&&Ln(ut,!0),d=ut&&a&&a.a,f=ut&&a&&a.d,u=Er&&ne&&wo(ne),w=(o.clientX-mn.clientX+i.x)/(d||1)+(u?u[0]-ui[0]:0)/(d||1),m=(o.clientY-mn.clientY+i.y)/(f||1)+(u?u[1]-ui[1]:0)/(f||1);if(!st.active&&!In){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(ie({rootEl:Ut,name:"add",toEl:Ut,fromEl:kt,originalEvent:e}),ie({sortable:this,name:"remove",toEl:Ut,originalEvent:e}),ie({rootEl:Ut,name:"sort",toEl:Ut,fromEl:kt,originalEvent:e}),ie({sortable:this,name:"sort",toEl:Ut,originalEvent:e})),Zt&&Zt.save()):ue!==Fn&&ue>=0&&(ie({sortable:this,name:"update",toEl:Ut,originalEvent:e}),ie({sortable:this,name:"sort",toEl:Ut,originalEvent:e})),st.active&&((ue==null||ue===-1)&&(ue=Fn,on=Jn),ie({sortable:this,name:"end",toEl:Ut,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){ae("nulling",this),kt=N=Ut=ut=bn=Wt=Ar=an=mn=Oe=Yn=ue=on=Fn=Jn=Rn=Zn=Zt=wr=st.dragged=st.ghost=st.clone=st.active=null,Rr.forEach(function(e){e.checked=!0}),Rr.length=ci=fi=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":N&&(this._onDragOver(e),cs(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],r,n=this.el.children,i=0,o=n.length,a=this.options;ii.right+o||t.clientY>n.bottom&&t.clientX>n.left:t.clientY>i.bottom+o||t.clientX>n.right&&t.clientY>n.top}function ps(t,e,r,n,i,o,a,d){var f=n?t.clientY:t.clientX,u=n?r.height:r.width,w=n?r.top:r.left,m=n?r.bottom:r.right,E=!1;if(!a){if(d&&Drw+u*o/2:fm-Dr)return-Zn}else if(f>w+u*(1-i)/2&&fm-u*o/2)?f>w+u/2?1:-1:0}function hs(t){return ve(N){t.directive("sortable",e=>{let r=parseInt(e.dataset?.sortableAnimationDuration);r!==0&&!r&&(r=300),e.sortable=Si.create(e,{group:e.getAttribute("x-sortable-group"),draggable:"[x-sortable-item]",handle:"[x-sortable-handle]",dataIdAttr:"x-sortable-item",animation:r,ghostClass:"fi-sortable-ghost"})})};var bs=Object.create,Ci=Object.defineProperty,ys=Object.getPrototypeOf,ws=Object.prototype.hasOwnProperty,xs=Object.getOwnPropertyNames,Es=Object.getOwnPropertyDescriptor,Os=t=>Ci(t,"__esModule",{value:!0}),Ho=(t,e)=>()=>(e||(e={exports:{}},t(e.exports,e)),e.exports),Ss=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of xs(e))!ws.call(t,n)&&n!=="default"&&Ci(t,n,{get:()=>e[n],enumerable:!(r=Es(e,n))||r.enumerable});return t},$o=t=>Ss(Os(Ci(t!=null?bs(ys(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),As=Ho(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});function e(c){var s=c.getBoundingClientRect();return{width:s.width,height:s.height,top:s.top,right:s.right,bottom:s.bottom,left:s.left,x:s.left,y:s.top}}function r(c){if(c==null)return window;if(c.toString()!=="[object Window]"){var s=c.ownerDocument;return s&&s.defaultView||window}return c}function n(c){var s=r(c),b=s.pageXOffset,_=s.pageYOffset;return{scrollLeft:b,scrollTop:_}}function i(c){var s=r(c).Element;return c instanceof s||c instanceof Element}function o(c){var s=r(c).HTMLElement;return c instanceof s||c instanceof HTMLElement}function a(c){if(typeof ShadowRoot>"u")return!1;var s=r(c).ShadowRoot;return c instanceof s||c instanceof ShadowRoot}function d(c){return{scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}}function f(c){return c===r(c)||!o(c)?n(c):d(c)}function u(c){return c?(c.nodeName||"").toLowerCase():null}function w(c){return((i(c)?c.ownerDocument:c.document)||window.document).documentElement}function m(c){return e(w(c)).left+n(c).scrollLeft}function E(c){return r(c).getComputedStyle(c)}function O(c){var s=E(c),b=s.overflow,_=s.overflowX,T=s.overflowY;return/auto|scroll|overlay|hidden/.test(b+T+_)}function S(c,s,b){b===void 0&&(b=!1);var _=w(s),T=e(c),L=o(s),z={scrollLeft:0,scrollTop:0},H={x:0,y:0};return(L||!L&&!b)&&((u(s)!=="body"||O(_))&&(z=f(s)),o(s)?(H=e(s),H.x+=s.clientLeft,H.y+=s.clientTop):_&&(H.x=m(_))),{x:T.left+z.scrollLeft-H.x,y:T.top+z.scrollTop-H.y,width:T.width,height:T.height}}function M(c){var s=e(c),b=c.offsetWidth,_=c.offsetHeight;return Math.abs(s.width-b)<=1&&(b=s.width),Math.abs(s.height-_)<=1&&(_=s.height),{x:c.offsetLeft,y:c.offsetTop,width:b,height:_}}function I(c){return u(c)==="html"?c:c.assignedSlot||c.parentNode||(a(c)?c.host:null)||w(c)}function $(c){return["html","body","#document"].indexOf(u(c))>=0?c.ownerDocument.body:o(c)&&O(c)?c:$(I(c))}function A(c,s){var b;s===void 0&&(s=[]);var _=$(c),T=_===((b=c.ownerDocument)==null?void 0:b.body),L=r(_),z=T?[L].concat(L.visualViewport||[],O(_)?_:[]):_,H=s.concat(z);return T?H:H.concat(A(I(z)))}function k(c){return["table","td","th"].indexOf(u(c))>=0}function Y(c){return!o(c)||E(c).position==="fixed"?null:c.offsetParent}function nt(c){var s=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,b=navigator.userAgent.indexOf("Trident")!==-1;if(b&&o(c)){var _=E(c);if(_.position==="fixed")return null}for(var T=I(c);o(T)&&["html","body"].indexOf(u(T))<0;){var L=E(T);if(L.transform!=="none"||L.perspective!=="none"||L.contain==="paint"||["transform","perspective"].indexOf(L.willChange)!==-1||s&&L.willChange==="filter"||s&&L.filter&&L.filter!=="none")return T;T=T.parentNode}return null}function J(c){for(var s=r(c),b=Y(c);b&&k(b)&&E(b).position==="static";)b=Y(b);return b&&(u(b)==="html"||u(b)==="body"&&E(b).position==="static")?s:b||nt(c)||s}var U="top",dt="bottom",X="right",Z="left",mt="auto",l=[U,dt,X,Z],h="start",v="end",p="clippingParents",j="viewport",P="popper",R="reference",Q=l.reduce(function(c,s){return c.concat([s+"-"+h,s+"-"+v])},[]),Vt=[].concat(l,[mt]).reduce(function(c,s){return c.concat([s,s+"-"+h,s+"-"+v])},[]),Re="beforeRead",ze="read",Nr="afterRead",kr="beforeMain",jr="main",Ue="afterMain",nr="beforeWrite",Br="write",rr="afterWrite",Ie=[Re,ze,Nr,kr,jr,Ue,nr,Br,rr];function Hr(c){var s=new Map,b=new Set,_=[];c.forEach(function(L){s.set(L.name,L)});function T(L){b.add(L.name);var z=[].concat(L.requires||[],L.requiresIfExists||[]);z.forEach(function(H){if(!b.has(H)){var G=s.get(H);G&&T(G)}}),_.push(L)}return c.forEach(function(L){b.has(L.name)||T(L)}),_}function me(c){var s=Hr(c);return Ie.reduce(function(b,_){return b.concat(s.filter(function(T){return T.phase===_}))},[])}function Ve(c){var s;return function(){return s||(s=new Promise(function(b){Promise.resolve().then(function(){s=void 0,b(c())})})),s}}function Ae(c){for(var s=arguments.length,b=new Array(s>1?s-1:0),_=1;_=0,_=b&&o(c)?J(c):c;return i(_)?s.filter(function(T){return i(T)&&kn(T,_)&&u(T)!=="body"}):[]}function wn(c,s,b){var _=s==="clippingParents"?yn(c):[].concat(s),T=[].concat(_,[b]),L=T[0],z=T.reduce(function(H,G){var ot=sr(c,G);return H.top=ge(ot.top,H.top),H.right=ln(ot.right,H.right),H.bottom=ln(ot.bottom,H.bottom),H.left=ge(ot.left,H.left),H},sr(c,L));return z.width=z.right-z.left,z.height=z.bottom-z.top,z.x=z.left,z.y=z.top,z}function cn(c){return c.split("-")[1]}function de(c){return["top","bottom"].indexOf(c)>=0?"x":"y"}function lr(c){var s=c.reference,b=c.element,_=c.placement,T=_?oe(_):null,L=_?cn(_):null,z=s.x+s.width/2-b.width/2,H=s.y+s.height/2-b.height/2,G;switch(T){case U:G={x:z,y:s.y-b.height};break;case dt:G={x:z,y:s.y+s.height};break;case X:G={x:s.x+s.width,y:H};break;case Z:G={x:s.x-b.width,y:H};break;default:G={x:s.x,y:s.y}}var ot=T?de(T):null;if(ot!=null){var V=ot==="y"?"height":"width";switch(L){case h:G[ot]=G[ot]-(s[V]/2-b[V]/2);break;case v:G[ot]=G[ot]+(s[V]/2-b[V]/2);break}}return G}function cr(){return{top:0,right:0,bottom:0,left:0}}function fr(c){return Object.assign({},cr(),c)}function ur(c,s){return s.reduce(function(b,_){return b[_]=c,b},{})}function qe(c,s){s===void 0&&(s={});var b=s,_=b.placement,T=_===void 0?c.placement:_,L=b.boundary,z=L===void 0?p:L,H=b.rootBoundary,G=H===void 0?j:H,ot=b.elementContext,V=ot===void 0?P:ot,Ct=b.altBoundary,Lt=Ct===void 0?!1:Ct,Dt=b.padding,xt=Dt===void 0?0:Dt,Mt=fr(typeof xt!="number"?xt:ur(xt,l)),St=V===P?R:P,Bt=c.elements.reference,Rt=c.rects.popper,Ht=c.elements[Lt?St:V],ct=wn(i(Ht)?Ht:Ht.contextElement||w(c.elements.popper),z,G),Pt=e(Bt),_t=lr({reference:Pt,element:Rt,strategy:"absolute",placement:T}),Nt=Xe(Object.assign({},Rt,_t)),Ft=V===P?Nt:Pt,Yt={top:ct.top-Ft.top+Mt.top,bottom:Ft.bottom-ct.bottom+Mt.bottom,left:ct.left-Ft.left+Mt.left,right:Ft.right-ct.right+Mt.right},$t=c.modifiersData.offset;if(V===P&&$t){var zt=$t[T];Object.keys(Yt).forEach(function(we){var te=[X,dt].indexOf(we)>=0?1:-1,Le=[U,dt].indexOf(we)>=0?"y":"x";Yt[we]+=zt[Le]*te})}return Yt}var dr="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",Vr="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",xn={placement:"bottom",modifiers:[],strategy:"absolute"};function fn(){for(var c=arguments.length,s=new Array(c),b=0;b100){console.error(Vr);break}if(V.reset===!0){V.reset=!1,Pt=-1;continue}var _t=V.orderedModifiers[Pt],Nt=_t.fn,Ft=_t.options,Yt=Ft===void 0?{}:Ft,$t=_t.name;typeof Nt=="function"&&(V=Nt({state:V,options:Yt,name:$t,instance:Dt})||V)}}},update:Ve(function(){return new Promise(function(St){Dt.forceUpdate(),St(V)})}),destroy:function(){Mt(),Lt=!0}};if(!fn(H,G))return console.error(dr),Dt;Dt.setOptions(ot).then(function(St){!Lt&&ot.onFirstUpdate&&ot.onFirstUpdate(St)});function xt(){V.orderedModifiers.forEach(function(St){var Bt=St.name,Rt=St.options,Ht=Rt===void 0?{}:Rt,ct=St.effect;if(typeof ct=="function"){var Pt=ct({state:V,name:Bt,instance:Dt,options:Ht}),_t=function(){};Ct.push(Pt||_t)}})}function Mt(){Ct.forEach(function(St){return St()}),Ct=[]}return Dt}}var On={passive:!0};function Yr(c){var s=c.state,b=c.instance,_=c.options,T=_.scroll,L=T===void 0?!0:T,z=_.resize,H=z===void 0?!0:z,G=r(s.elements.popper),ot=[].concat(s.scrollParents.reference,s.scrollParents.popper);return L&&ot.forEach(function(V){V.addEventListener("scroll",b.update,On)}),H&&G.addEventListener("resize",b.update,On),function(){L&&ot.forEach(function(V){V.removeEventListener("scroll",b.update,On)}),H&&G.removeEventListener("resize",b.update,On)}}var jn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Yr,data:{}};function Xr(c){var s=c.state,b=c.name;s.modifiersData[b]=lr({reference:s.rects.reference,element:s.rects.popper,strategy:"absolute",placement:s.placement})}var Bn={name:"popperOffsets",enabled:!0,phase:"read",fn:Xr,data:{}},qr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Gr(c){var s=c.x,b=c.y,_=window,T=_.devicePixelRatio||1;return{x:Ye(Ye(s*T)/T)||0,y:Ye(Ye(b*T)/T)||0}}function Hn(c){var s,b=c.popper,_=c.popperRect,T=c.placement,L=c.offsets,z=c.position,H=c.gpuAcceleration,G=c.adaptive,ot=c.roundOffsets,V=ot===!0?Gr(L):typeof ot=="function"?ot(L):L,Ct=V.x,Lt=Ct===void 0?0:Ct,Dt=V.y,xt=Dt===void 0?0:Dt,Mt=L.hasOwnProperty("x"),St=L.hasOwnProperty("y"),Bt=Z,Rt=U,Ht=window;if(G){var ct=J(b),Pt="clientHeight",_t="clientWidth";ct===r(b)&&(ct=w(b),E(ct).position!=="static"&&(Pt="scrollHeight",_t="scrollWidth")),ct=ct,T===U&&(Rt=dt,xt-=ct[Pt]-_.height,xt*=H?1:-1),T===Z&&(Bt=X,Lt-=ct[_t]-_.width,Lt*=H?1:-1)}var Nt=Object.assign({position:z},G&&qr);if(H){var Ft;return Object.assign({},Nt,(Ft={},Ft[Rt]=St?"0":"",Ft[Bt]=Mt?"0":"",Ft.transform=(Ht.devicePixelRatio||1)<2?"translate("+Lt+"px, "+xt+"px)":"translate3d("+Lt+"px, "+xt+"px, 0)",Ft))}return Object.assign({},Nt,(s={},s[Rt]=St?xt+"px":"",s[Bt]=Mt?Lt+"px":"",s.transform="",s))}function g(c){var s=c.state,b=c.options,_=b.gpuAcceleration,T=_===void 0?!0:_,L=b.adaptive,z=L===void 0?!0:L,H=b.roundOffsets,G=H===void 0?!0:H,ot=E(s.elements.popper).transitionProperty||"";z&&["transform","top","right","bottom","left"].some(function(Ct){return ot.indexOf(Ct)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',` + +`,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",` + +`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "));var V={placement:oe(s.placement),popper:s.elements.popper,popperRect:s.rects.popper,gpuAcceleration:T};s.modifiersData.popperOffsets!=null&&(s.styles.popper=Object.assign({},s.styles.popper,Hn(Object.assign({},V,{offsets:s.modifiersData.popperOffsets,position:s.options.strategy,adaptive:z,roundOffsets:G})))),s.modifiersData.arrow!=null&&(s.styles.arrow=Object.assign({},s.styles.arrow,Hn(Object.assign({},V,{offsets:s.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:G})))),s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-placement":s.placement})}var y={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:g,data:{}};function D(c){var s=c.state;Object.keys(s.elements).forEach(function(b){var _=s.styles[b]||{},T=s.attributes[b]||{},L=s.elements[b];!o(L)||!u(L)||(Object.assign(L.style,_),Object.keys(T).forEach(function(z){var H=T[z];H===!1?L.removeAttribute(z):L.setAttribute(z,H===!0?"":H)}))})}function F(c){var s=c.state,b={popper:{position:s.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(s.elements.popper.style,b.popper),s.styles=b,s.elements.arrow&&Object.assign(s.elements.arrow.style,b.arrow),function(){Object.keys(s.elements).forEach(function(_){var T=s.elements[_],L=s.attributes[_]||{},z=Object.keys(s.styles.hasOwnProperty(_)?s.styles[_]:b[_]),H=z.reduce(function(G,ot){return G[ot]="",G},{});!o(T)||!u(T)||(Object.assign(T.style,H),Object.keys(L).forEach(function(G){T.removeAttribute(G)}))})}}var q={name:"applyStyles",enabled:!0,phase:"write",fn:D,effect:F,requires:["computeStyles"]};function W(c,s,b){var _=oe(c),T=[Z,U].indexOf(_)>=0?-1:1,L=typeof b=="function"?b(Object.assign({},s,{placement:c})):b,z=L[0],H=L[1];return z=z||0,H=(H||0)*T,[Z,X].indexOf(_)>=0?{x:H,y:z}:{x:z,y:H}}function B(c){var s=c.state,b=c.options,_=c.name,T=b.offset,L=T===void 0?[0,0]:T,z=Vt.reduce(function(V,Ct){return V[Ct]=W(Ct,s.rects,L),V},{}),H=z[s.placement],G=H.x,ot=H.y;s.modifiersData.popperOffsets!=null&&(s.modifiersData.popperOffsets.x+=G,s.modifiersData.popperOffsets.y+=ot),s.modifiersData[_]=z}var bt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:B},lt={left:"right",right:"left",bottom:"top",top:"bottom"};function pt(c){return c.replace(/left|right|bottom|top/g,function(s){return lt[s]})}var yt={start:"end",end:"start"};function Tt(c){return c.replace(/start|end/g,function(s){return yt[s]})}function jt(c,s){s===void 0&&(s={});var b=s,_=b.placement,T=b.boundary,L=b.rootBoundary,z=b.padding,H=b.flipVariations,G=b.allowedAutoPlacements,ot=G===void 0?Vt:G,V=cn(_),Ct=V?H?Q:Q.filter(function(xt){return cn(xt)===V}):l,Lt=Ct.filter(function(xt){return ot.indexOf(xt)>=0});Lt.length===0&&(Lt=Ct,console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var Dt=Lt.reduce(function(xt,Mt){return xt[Mt]=qe(c,{placement:Mt,boundary:T,rootBoundary:L,padding:z})[oe(Mt)],xt},{});return Object.keys(Dt).sort(function(xt,Mt){return Dt[xt]-Dt[Mt]})}function At(c){if(oe(c)===mt)return[];var s=pt(c);return[Tt(c),s,Tt(s)]}function It(c){var s=c.state,b=c.options,_=c.name;if(!s.modifiersData[_]._skip){for(var T=b.mainAxis,L=T===void 0?!0:T,z=b.altAxis,H=z===void 0?!0:z,G=b.fallbackPlacements,ot=b.padding,V=b.boundary,Ct=b.rootBoundary,Lt=b.altBoundary,Dt=b.flipVariations,xt=Dt===void 0?!0:Dt,Mt=b.allowedAutoPlacements,St=s.options.placement,Bt=oe(St),Rt=Bt===St,Ht=G||(Rt||!xt?[pt(St)]:At(St)),ct=[St].concat(Ht).reduce(function(et,gt){return et.concat(oe(gt)===mt?jt(s,{placement:gt,boundary:V,rootBoundary:Ct,padding:ot,flipVariations:xt,allowedAutoPlacements:Mt}):gt)},[]),Pt=s.rects.reference,_t=s.rects.popper,Nt=new Map,Ft=!0,Yt=ct[0],$t=0;$t=0,dn=Le?"width":"height",Ze=qe(s,{placement:zt,boundary:V,rootBoundary:Ct,altBoundary:Lt,padding:ot}),Ne=Le?te?X:Z:te?dt:U;Pt[dn]>_t[dn]&&(Ne=pt(Ne));var $n=pt(Ne),Qe=[];if(L&&Qe.push(Ze[we]<=0),H&&Qe.push(Ze[Ne]<=0,Ze[$n]<=0),Qe.every(function(et){return et})){Yt=zt,Ft=!1;break}Nt.set(zt,Qe)}if(Ft)for(var Sn=xt?3:1,Wn=function(gt){var wt=ct.find(function(Kt){var Jt=Nt.get(Kt);if(Jt)return Jt.slice(0,gt).every(function(Ce){return Ce})});if(wt)return Yt=wt,"break"},C=Sn;C>0;C--){var K=Wn(C);if(K==="break")break}s.placement!==Yt&&(s.modifiersData[_]._skip=!0,s.placement=Yt,s.reset=!0)}}var rt={name:"flip",enabled:!0,phase:"main",fn:It,requiresIfExists:["offset"],data:{_skip:!1}};function ht(c){return c==="x"?"y":"x"}function vt(c,s,b){return ge(c,ln(s,b))}function tt(c){var s=c.state,b=c.options,_=c.name,T=b.mainAxis,L=T===void 0?!0:T,z=b.altAxis,H=z===void 0?!1:z,G=b.boundary,ot=b.rootBoundary,V=b.altBoundary,Ct=b.padding,Lt=b.tether,Dt=Lt===void 0?!0:Lt,xt=b.tetherOffset,Mt=xt===void 0?0:xt,St=qe(s,{boundary:G,rootBoundary:ot,padding:Ct,altBoundary:V}),Bt=oe(s.placement),Rt=cn(s.placement),Ht=!Rt,ct=de(Bt),Pt=ht(ct),_t=s.modifiersData.popperOffsets,Nt=s.rects.reference,Ft=s.rects.popper,Yt=typeof Mt=="function"?Mt(Object.assign({},s.rects,{placement:s.placement})):Mt,$t={x:0,y:0};if(_t){if(L||H){var zt=ct==="y"?U:Z,we=ct==="y"?dt:X,te=ct==="y"?"height":"width",Le=_t[ct],dn=_t[ct]+St[zt],Ze=_t[ct]-St[we],Ne=Dt?-Ft[te]/2:0,$n=Rt===h?Nt[te]:Ft[te],Qe=Rt===h?-Ft[te]:-Nt[te],Sn=s.elements.arrow,Wn=Dt&&Sn?M(Sn):{width:0,height:0},C=s.modifiersData["arrow#persistent"]?s.modifiersData["arrow#persistent"].padding:cr(),K=C[zt],et=C[we],gt=vt(0,Nt[te],Wn[te]),wt=Ht?Nt[te]/2-Ne-gt-K-Yt:$n-gt-K-Yt,Kt=Ht?-Nt[te]/2+Ne+gt+et+Yt:Qe+gt+et+Yt,Jt=s.elements.arrow&&J(s.elements.arrow),Ce=Jt?ct==="y"?Jt.clientTop||0:Jt.clientLeft||0:0,zn=s.modifiersData.offset?s.modifiersData.offset[s.placement][ct]:0,_e=_t[ct]+wt-zn-Ce,An=_t[ct]+Kt-zn;if(L){var pn=vt(Dt?ln(dn,_e):dn,Le,Dt?ge(Ze,An):Ze);_t[ct]=pn,$t[ct]=pn-Le}if(H){var tn=ct==="x"?U:Z,Kr=ct==="x"?dt:X,en=_t[Pt],hn=en+St[tn],_i=en-St[Kr],Ti=vt(Dt?ln(hn,_e):hn,en,Dt?ge(_i,An):_i);_t[Pt]=Ti,$t[Pt]=Ti-en}}s.modifiersData[_]=$t}}var it={name:"preventOverflow",enabled:!0,phase:"main",fn:tt,requiresIfExists:["offset"]},x=function(s,b){return s=typeof s=="function"?s(Object.assign({},b.rects,{placement:b.placement})):s,fr(typeof s!="number"?s:ur(s,l))};function Gt(c){var s,b=c.state,_=c.name,T=c.options,L=b.elements.arrow,z=b.modifiersData.popperOffsets,H=oe(b.placement),G=de(H),ot=[Z,X].indexOf(H)>=0,V=ot?"height":"width";if(!(!L||!z)){var Ct=x(T.padding,b),Lt=M(L),Dt=G==="y"?U:Z,xt=G==="y"?dt:X,Mt=b.rects.reference[V]+b.rects.reference[G]-z[G]-b.rects.popper[V],St=z[G]-b.rects.reference[G],Bt=J(L),Rt=Bt?G==="y"?Bt.clientHeight||0:Bt.clientWidth||0:0,Ht=Mt/2-St/2,ct=Ct[Dt],Pt=Rt-Lt[V]-Ct[xt],_t=Rt/2-Lt[V]/2+Ht,Nt=vt(ct,_t,Pt),Ft=G;b.modifiersData[_]=(s={},s[Ft]=Nt,s.centerOffset=Nt-_t,s)}}function ft(c){var s=c.state,b=c.options,_=b.element,T=_===void 0?"[data-popper-arrow]":_;if(T!=null&&!(typeof T=="string"&&(T=s.elements.popper.querySelector(T),!T))){if(o(T)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" ")),!kn(s.elements.popper,T)){console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}s.elements.arrow=T}}var Fe={name:"arrow",enabled:!0,phase:"main",fn:Gt,effect:ft,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function be(c,s,b){return b===void 0&&(b={x:0,y:0}),{top:c.top-s.height-b.y,right:c.right-s.width+b.x,bottom:c.bottom-s.height+b.y,left:c.left-s.width-b.x}}function Ge(c){return[U,X,dt,Z].some(function(s){return c[s]>=0})}function Ke(c){var s=c.state,b=c.name,_=s.rects.reference,T=s.rects.popper,L=s.modifiersData.preventOverflow,z=qe(s,{elementContext:"reference"}),H=qe(s,{altBoundary:!0}),G=be(z,_),ot=be(H,T,L),V=Ge(G),Ct=Ge(ot);s.modifiersData[b]={referenceClippingOffsets:G,popperEscapeOffsets:ot,isReferenceHidden:V,hasPopperEscaped:Ct},s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-reference-hidden":V,"data-popper-escaped":Ct})}var Je={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ke},re=[jn,Bn,y,q],le=En({defaultModifiers:re}),ye=[jn,Bn,y,q,bt,rt,it,Fe,Je],un=En({defaultModifiers:ye});t.applyStyles=q,t.arrow=Fe,t.computeStyles=y,t.createPopper=un,t.createPopperLite=le,t.defaultModifiers=ye,t.detectOverflow=qe,t.eventListeners=jn,t.flip=rt,t.hide=Je,t.offset=bt,t.popperGenerator=En,t.popperOffsets=Bn,t.preventOverflow=it}),Wo=Ho(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=As(),r='',n="tippy-box",i="tippy-content",o="tippy-backdrop",a="tippy-arrow",d="tippy-svg-arrow",f={passive:!0,capture:!0};function u(g,y){return{}.hasOwnProperty.call(g,y)}function w(g,y,D){if(Array.isArray(g)){var F=g[y];return F??(Array.isArray(D)?D[y]:D)}return g}function m(g,y){var D={}.toString.call(g);return D.indexOf("[object")===0&&D.indexOf(y+"]")>-1}function E(g,y){return typeof g=="function"?g.apply(void 0,y):g}function O(g,y){if(y===0)return g;var D;return function(F){clearTimeout(D),D=setTimeout(function(){g(F)},y)}}function S(g,y){var D=Object.assign({},g);return y.forEach(function(F){delete D[F]}),D}function M(g){return g.split(/\s+/).filter(Boolean)}function I(g){return[].concat(g)}function $(g,y){g.indexOf(y)===-1&&g.push(y)}function A(g){return g.filter(function(y,D){return g.indexOf(y)===D})}function k(g){return g.split("-")[0]}function Y(g){return[].slice.call(g)}function nt(g){return Object.keys(g).reduce(function(y,D){return g[D]!==void 0&&(y[D]=g[D]),y},{})}function J(){return document.createElement("div")}function U(g){return["Element","Fragment"].some(function(y){return m(g,y)})}function dt(g){return m(g,"NodeList")}function X(g){return m(g,"MouseEvent")}function Z(g){return!!(g&&g._tippy&&g._tippy.reference===g)}function mt(g){return U(g)?[g]:dt(g)?Y(g):Array.isArray(g)?g:Y(document.querySelectorAll(g))}function l(g,y){g.forEach(function(D){D&&(D.style.transitionDuration=y+"ms")})}function h(g,y){g.forEach(function(D){D&&D.setAttribute("data-state",y)})}function v(g){var y,D=I(g),F=D[0];return!(F==null||(y=F.ownerDocument)==null)&&y.body?F.ownerDocument:document}function p(g,y){var D=y.clientX,F=y.clientY;return g.every(function(q){var W=q.popperRect,B=q.popperState,bt=q.props,lt=bt.interactiveBorder,pt=k(B.placement),yt=B.modifiersData.offset;if(!yt)return!0;var Tt=pt==="bottom"?yt.top.y:0,jt=pt==="top"?yt.bottom.y:0,At=pt==="right"?yt.left.x:0,It=pt==="left"?yt.right.x:0,rt=W.top-F+Tt>lt,ht=F-W.bottom-jt>lt,vt=W.left-D+At>lt,tt=D-W.right-It>lt;return rt||ht||vt||tt})}function j(g,y,D){var F=y+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(q){g[F](q,D)})}var P={isTouch:!1},R=0;function Q(){P.isTouch||(P.isTouch=!0,window.performance&&document.addEventListener("mousemove",Vt))}function Vt(){var g=performance.now();g-R<20&&(P.isTouch=!1,document.removeEventListener("mousemove",Vt)),R=g}function Re(){var g=document.activeElement;if(Z(g)){var y=g._tippy;g.blur&&!y.state.isVisible&&g.blur()}}function ze(){document.addEventListener("touchstart",Q,f),window.addEventListener("blur",Re)}var Nr=typeof window<"u"&&typeof document<"u",kr=Nr?navigator.userAgent:"",jr=/MSIE |Trident\//.test(kr);function Ue(g){var y=g==="destroy"?"n already-":" ";return[g+"() was called on a"+y+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function nr(g){var y=/[ \t]{2,}/g,D=/^[ \t]*/gm;return g.replace(y," ").replace(D,"").trim()}function Br(g){return nr(` + %ctippy.js + + %c`+nr(g)+` + + %c\u{1F477}\u200D This is a development-only message. It will be removed in production. + `)}function rr(g){return[Br(g),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Ie;Hr();function Hr(){Ie=new Set}function me(g,y){if(g&&!Ie.has(y)){var D;Ie.add(y),(D=console).warn.apply(D,rr(y))}}function Ve(g,y){if(g&&!Ie.has(y)){var D;Ie.add(y),(D=console).error.apply(D,rr(y))}}function Ae(g){var y=!g,D=Object.prototype.toString.call(g)==="[object Object]"&&!g.addEventListener;Ve(y,["tippy() was passed","`"+String(g)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),Ve(D,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var De={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},$r={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Qt=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},De,{},$r),Wr=Object.keys(Qt),zr=function(y){ge(y,[]);var D=Object.keys(y);D.forEach(function(F){Qt[F]=y[F]})};function oe(g){var y=g.plugins||[],D=y.reduce(function(F,q){var W=q.name,B=q.defaultValue;return W&&(F[W]=g[W]!==void 0?g[W]:B),F},{});return Object.assign({},g,{},D)}function Ur(g,y){var D=y?Object.keys(oe(Object.assign({},Qt,{plugins:y}))):Wr,F=D.reduce(function(q,W){var B=(g.getAttribute("data-tippy-"+W)||"").trim();if(!B)return q;if(W==="content")q[W]=B;else try{q[W]=JSON.parse(B)}catch{q[W]=B}return q},{});return F}function ir(g,y){var D=Object.assign({},y,{content:E(y.content,[g])},y.ignoreAttributes?{}:Ur(g,y.plugins));return D.aria=Object.assign({},Qt.aria,{},D.aria),D.aria={expanded:D.aria.expanded==="auto"?y.interactive:D.aria.expanded,content:D.aria.content==="auto"?y.interactive?null:"describedby":D.aria.content},D}function ge(g,y){g===void 0&&(g={}),y===void 0&&(y=[]);var D=Object.keys(g);D.forEach(function(F){var q=S(Qt,Object.keys(De)),W=!u(q,F);W&&(W=y.filter(function(B){return B.name===F}).length===0),me(W,["`"+F+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",` + +`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/ +`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var ln=function(){return"innerHTML"};function Ye(g,y){g[ln()]=y}function or(g){var y=J();return g===!0?y.className=a:(y.className=d,U(g)?y.appendChild(g):Ye(y,g)),y}function kn(g,y){U(y.content)?(Ye(g,""),g.appendChild(y.content)):typeof y.content!="function"&&(y.allowHTML?Ye(g,y.content):g.textContent=y.content)}function Xe(g){var y=g.firstElementChild,D=Y(y.children);return{box:y,content:D.find(function(F){return F.classList.contains(i)}),arrow:D.find(function(F){return F.classList.contains(a)||F.classList.contains(d)}),backdrop:D.find(function(F){return F.classList.contains(o)})}}function ar(g){var y=J(),D=J();D.className=n,D.setAttribute("data-state","hidden"),D.setAttribute("tabindex","-1");var F=J();F.className=i,F.setAttribute("data-state","hidden"),kn(F,g.props),y.appendChild(D),D.appendChild(F),q(g.props,g.props);function q(W,B){var bt=Xe(y),lt=bt.box,pt=bt.content,yt=bt.arrow;B.theme?lt.setAttribute("data-theme",B.theme):lt.removeAttribute("data-theme"),typeof B.animation=="string"?lt.setAttribute("data-animation",B.animation):lt.removeAttribute("data-animation"),B.inertia?lt.setAttribute("data-inertia",""):lt.removeAttribute("data-inertia"),lt.style.maxWidth=typeof B.maxWidth=="number"?B.maxWidth+"px":B.maxWidth,B.role?lt.setAttribute("role",B.role):lt.removeAttribute("role"),(W.content!==B.content||W.allowHTML!==B.allowHTML)&&kn(pt,g.props),B.arrow?yt?W.arrow!==B.arrow&&(lt.removeChild(yt),lt.appendChild(or(B.arrow))):lt.appendChild(or(B.arrow)):yt&<.removeChild(yt)}return{popper:y,onUpdate:q}}ar.$$tippy=!0;var sr=1,yn=[],wn=[];function cn(g,y){var D=ir(g,Object.assign({},Qt,{},oe(nt(y)))),F,q,W,B=!1,bt=!1,lt=!1,pt=!1,yt,Tt,jt,At=[],It=O(Rt,D.interactiveDebounce),rt,ht=sr++,vt=null,tt=A(D.plugins),it={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},x={id:ht,reference:g,popper:J(),popperInstance:vt,props:D,state:it,plugins:tt,clearDelayTimeouts:Le,setProps:dn,setContent:Ze,show:Ne,hide:$n,hideWithInteractivity:Qe,enable:we,disable:te,unmount:Sn,destroy:Wn};if(!D.render)return Ve(!0,"render() function has not been supplied."),x;var Gt=D.render(x),ft=Gt.popper,Fe=Gt.onUpdate;ft.setAttribute("data-tippy-root",""),ft.id="tippy-"+x.id,x.popper=ft,g._tippy=x,ft._tippy=x;var be=tt.map(function(C){return C.fn(x)}),Ge=g.hasAttribute("aria-expanded");return Mt(),T(),s(),b("onCreate",[x]),D.showOnCreate&&$t(),ft.addEventListener("mouseenter",function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()}),ft.addEventListener("mouseleave",function(C){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(ye().addEventListener("mousemove",It),It(C))}),x;function Ke(){var C=x.props.touch;return Array.isArray(C)?C:[C,0]}function Je(){return Ke()[0]==="hold"}function re(){var C;return!!((C=x.props.render)!=null&&C.$$tippy)}function le(){return rt||g}function ye(){var C=le().parentNode;return C?v(C):document}function un(){return Xe(ft)}function c(C){return x.state.isMounted&&!x.state.isVisible||P.isTouch||yt&&yt.type==="focus"?0:w(x.props.delay,C?0:1,Qt.delay)}function s(){ft.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",ft.style.zIndex=""+x.props.zIndex}function b(C,K,et){if(et===void 0&&(et=!0),be.forEach(function(wt){wt[C]&&wt[C].apply(void 0,K)}),et){var gt;(gt=x.props)[C].apply(gt,K)}}function _(){var C=x.props.aria;if(C.content){var K="aria-"+C.content,et=ft.id,gt=I(x.props.triggerTarget||g);gt.forEach(function(wt){var Kt=wt.getAttribute(K);if(x.state.isVisible)wt.setAttribute(K,Kt?Kt+" "+et:et);else{var Jt=Kt&&Kt.replace(et,"").trim();Jt?wt.setAttribute(K,Jt):wt.removeAttribute(K)}})}}function T(){if(!(Ge||!x.props.aria.expanded)){var C=I(x.props.triggerTarget||g);C.forEach(function(K){x.props.interactive?K.setAttribute("aria-expanded",x.state.isVisible&&K===le()?"true":"false"):K.removeAttribute("aria-expanded")})}}function L(){ye().removeEventListener("mousemove",It),yn=yn.filter(function(C){return C!==It})}function z(C){if(!(P.isTouch&&(lt||C.type==="mousedown"))&&!(x.props.interactive&&ft.contains(C.target))){if(le().contains(C.target)){if(P.isTouch||x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else b("onClickOutside",[x,C]);x.props.hideOnClick===!0&&(x.clearDelayTimeouts(),x.hide(),bt=!0,setTimeout(function(){bt=!1}),x.state.isMounted||V())}}function H(){lt=!0}function G(){lt=!1}function ot(){var C=ye();C.addEventListener("mousedown",z,!0),C.addEventListener("touchend",z,f),C.addEventListener("touchstart",G,f),C.addEventListener("touchmove",H,f)}function V(){var C=ye();C.removeEventListener("mousedown",z,!0),C.removeEventListener("touchend",z,f),C.removeEventListener("touchstart",G,f),C.removeEventListener("touchmove",H,f)}function Ct(C,K){Dt(C,function(){!x.state.isVisible&&ft.parentNode&&ft.parentNode.contains(ft)&&K()})}function Lt(C,K){Dt(C,K)}function Dt(C,K){var et=un().box;function gt(wt){wt.target===et&&(j(et,"remove",gt),K())}if(C===0)return K();j(et,"remove",Tt),j(et,"add",gt),Tt=gt}function xt(C,K,et){et===void 0&&(et=!1);var gt=I(x.props.triggerTarget||g);gt.forEach(function(wt){wt.addEventListener(C,K,et),At.push({node:wt,eventType:C,handler:K,options:et})})}function Mt(){Je()&&(xt("touchstart",Bt,{passive:!0}),xt("touchend",Ht,{passive:!0})),M(x.props.trigger).forEach(function(C){if(C!=="manual")switch(xt(C,Bt),C){case"mouseenter":xt("mouseleave",Ht);break;case"focus":xt(jr?"focusout":"blur",ct);break;case"focusin":xt("focusout",ct);break}})}function St(){At.forEach(function(C){var K=C.node,et=C.eventType,gt=C.handler,wt=C.options;K.removeEventListener(et,gt,wt)}),At=[]}function Bt(C){var K,et=!1;if(!(!x.state.isEnabled||Pt(C)||bt)){var gt=((K=yt)==null?void 0:K.type)==="focus";yt=C,rt=C.currentTarget,T(),!x.state.isVisible&&X(C)&&yn.forEach(function(wt){return wt(C)}),C.type==="click"&&(x.props.trigger.indexOf("mouseenter")<0||B)&&x.props.hideOnClick!==!1&&x.state.isVisible?et=!0:$t(C),C.type==="click"&&(B=!et),et&&!gt&&zt(C)}}function Rt(C){var K=C.target,et=le().contains(K)||ft.contains(K);if(!(C.type==="mousemove"&&et)){var gt=Yt().concat(ft).map(function(wt){var Kt,Jt=wt._tippy,Ce=(Kt=Jt.popperInstance)==null?void 0:Kt.state;return Ce?{popperRect:wt.getBoundingClientRect(),popperState:Ce,props:D}:null}).filter(Boolean);p(gt,C)&&(L(),zt(C))}}function Ht(C){var K=Pt(C)||x.props.trigger.indexOf("click")>=0&&B;if(!K){if(x.props.interactive){x.hideWithInteractivity(C);return}zt(C)}}function ct(C){x.props.trigger.indexOf("focusin")<0&&C.target!==le()||x.props.interactive&&C.relatedTarget&&ft.contains(C.relatedTarget)||zt(C)}function Pt(C){return P.isTouch?Je()!==C.type.indexOf("touch")>=0:!1}function _t(){Nt();var C=x.props,K=C.popperOptions,et=C.placement,gt=C.offset,wt=C.getReferenceClientRect,Kt=C.moveTransition,Jt=re()?Xe(ft).arrow:null,Ce=wt?{getBoundingClientRect:wt,contextElement:wt.contextElement||le()}:g,zn={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(pn){var tn=pn.state;if(re()){var Kr=un(),en=Kr.box;["placement","reference-hidden","escaped"].forEach(function(hn){hn==="placement"?en.setAttribute("data-placement",tn.placement):tn.attributes.popper["data-popper-"+hn]?en.setAttribute("data-"+hn,""):en.removeAttribute("data-"+hn)}),tn.attributes.popper={}}}},_e=[{name:"offset",options:{offset:gt}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Kt}},zn];re()&&Jt&&_e.push({name:"arrow",options:{element:Jt,padding:3}}),_e.push.apply(_e,K?.modifiers||[]),x.popperInstance=e.createPopper(Ce,ft,Object.assign({},K,{placement:et,onFirstUpdate:jt,modifiers:_e}))}function Nt(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function Ft(){var C=x.props.appendTo,K,et=le();x.props.interactive&&C===Qt.appendTo||C==="parent"?K=et.parentNode:K=E(C,[et]),K.contains(ft)||K.appendChild(ft),_t(),me(x.props.interactive&&C===Qt.appendTo&&et.nextElementSibling!==ft,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",` + +`,"Using a wrapper
or tag around the reference element","solves this by creating a new parentNode context.",` + +`,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",` + +`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Yt(){return Y(ft.querySelectorAll("[data-tippy-root]"))}function $t(C){x.clearDelayTimeouts(),C&&b("onTrigger",[x,C]),ot();var K=c(!0),et=Ke(),gt=et[0],wt=et[1];P.isTouch&>==="hold"&&wt&&(K=wt),K?F=setTimeout(function(){x.show()},K):x.show()}function zt(C){if(x.clearDelayTimeouts(),b("onUntrigger",[x,C]),!x.state.isVisible){V();return}if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(C.type)>=0&&B)){var K=c(!1);K?q=setTimeout(function(){x.state.isVisible&&x.hide()},K):W=requestAnimationFrame(function(){x.hide()})}}function we(){x.state.isEnabled=!0}function te(){x.hide(),x.state.isEnabled=!1}function Le(){clearTimeout(F),clearTimeout(q),cancelAnimationFrame(W)}function dn(C){if(me(x.state.isDestroyed,Ue("setProps")),!x.state.isDestroyed){b("onBeforeUpdate",[x,C]),St();var K=x.props,et=ir(g,Object.assign({},x.props,{},C,{ignoreAttributes:!0}));x.props=et,Mt(),K.interactiveDebounce!==et.interactiveDebounce&&(L(),It=O(Rt,et.interactiveDebounce)),K.triggerTarget&&!et.triggerTarget?I(K.triggerTarget).forEach(function(gt){gt.removeAttribute("aria-expanded")}):et.triggerTarget&&g.removeAttribute("aria-expanded"),T(),s(),Fe&&Fe(K,et),x.popperInstance&&(_t(),Yt().forEach(function(gt){requestAnimationFrame(gt._tippy.popperInstance.forceUpdate)})),b("onAfterUpdate",[x,C])}}function Ze(C){x.setProps({content:C})}function Ne(){me(x.state.isDestroyed,Ue("show"));var C=x.state.isVisible,K=x.state.isDestroyed,et=!x.state.isEnabled,gt=P.isTouch&&!x.props.touch,wt=w(x.props.duration,0,Qt.duration);if(!(C||K||et||gt)&&!le().hasAttribute("disabled")&&(b("onShow",[x],!1),x.props.onShow(x)!==!1)){if(x.state.isVisible=!0,re()&&(ft.style.visibility="visible"),s(),ot(),x.state.isMounted||(ft.style.transition="none"),re()){var Kt=un(),Jt=Kt.box,Ce=Kt.content;l([Jt,Ce],0)}jt=function(){var _e;if(!(!x.state.isVisible||pt)){if(pt=!0,ft.offsetHeight,ft.style.transition=x.props.moveTransition,re()&&x.props.animation){var An=un(),pn=An.box,tn=An.content;l([pn,tn],wt),h([pn,tn],"visible")}_(),T(),$(wn,x),(_e=x.popperInstance)==null||_e.forceUpdate(),x.state.isMounted=!0,b("onMount",[x]),x.props.animation&&re()&&Lt(wt,function(){x.state.isShown=!0,b("onShown",[x])})}},Ft()}}function $n(){me(x.state.isDestroyed,Ue("hide"));var C=!x.state.isVisible,K=x.state.isDestroyed,et=!x.state.isEnabled,gt=w(x.props.duration,1,Qt.duration);if(!(C||K||et)&&(b("onHide",[x],!1),x.props.onHide(x)!==!1)){if(x.state.isVisible=!1,x.state.isShown=!1,pt=!1,B=!1,re()&&(ft.style.visibility="hidden"),L(),V(),s(),re()){var wt=un(),Kt=wt.box,Jt=wt.content;x.props.animation&&(l([Kt,Jt],gt),h([Kt,Jt],"hidden"))}_(),T(),x.props.animation?re()&&Ct(gt,x.unmount):x.unmount()}}function Qe(C){me(x.state.isDestroyed,Ue("hideWithInteractivity")),ye().addEventListener("mousemove",It),$(yn,It),It(C)}function Sn(){me(x.state.isDestroyed,Ue("unmount")),x.state.isVisible&&x.hide(),x.state.isMounted&&(Nt(),Yt().forEach(function(C){C._tippy.unmount()}),ft.parentNode&&ft.parentNode.removeChild(ft),wn=wn.filter(function(C){return C!==x}),x.state.isMounted=!1,b("onHidden",[x]))}function Wn(){me(x.state.isDestroyed,Ue("destroy")),!x.state.isDestroyed&&(x.clearDelayTimeouts(),x.unmount(),St(),delete g._tippy,x.state.isDestroyed=!0,b("onDestroy",[x]))}}function de(g,y){y===void 0&&(y={});var D=Qt.plugins.concat(y.plugins||[]);Ae(g),ge(y,D),ze();var F=Object.assign({},y,{plugins:D}),q=mt(g),W=U(F.content),B=q.length>1;me(W&&B,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",` + +`,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",` + +`,`1) content: element.innerHTML +`,"2) content: () => element.cloneNode(true)"].join(" "));var bt=q.reduce(function(lt,pt){var yt=pt&&cn(pt,F);return yt&<.push(yt),lt},[]);return U(g)?bt[0]:bt}de.defaultProps=Qt,de.setDefaultProps=zr,de.currentInput=P;var lr=function(y){var D=y===void 0?{}:y,F=D.exclude,q=D.duration;wn.forEach(function(W){var B=!1;if(F&&(B=Z(F)?W.reference===F:W.popper===F.popper),!B){var bt=W.props.duration;W.setProps({duration:q}),W.hide(),W.state.isDestroyed||W.setProps({duration:bt})}})},cr=Object.assign({},e.applyStyles,{effect:function(y){var D=y.state,F={popper:{position:D.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(D.elements.popper.style,F.popper),D.styles=F,D.elements.arrow&&Object.assign(D.elements.arrow.style,F.arrow)}}),fr=function(y,D){var F;D===void 0&&(D={}),Ve(!Array.isArray(y),["The first argument passed to createSingleton() must be an array of","tippy instances. The passed value was",String(y)].join(" "));var q=y,W=[],B,bt=D.overrides,lt=[],pt=!1;function yt(){W=q.map(function(tt){return tt.reference})}function Tt(tt){q.forEach(function(it){tt?it.enable():it.disable()})}function jt(tt){return q.map(function(it){var x=it.setProps;return it.setProps=function(Gt){x(Gt),it.reference===B&&tt.setProps(Gt)},function(){it.setProps=x}})}function At(tt,it){var x=W.indexOf(it);if(it!==B){B=it;var Gt=(bt||[]).concat("content").reduce(function(ft,Fe){return ft[Fe]=q[x].props[Fe],ft},{});tt.setProps(Object.assign({},Gt,{getReferenceClientRect:typeof Gt.getReferenceClientRect=="function"?Gt.getReferenceClientRect:function(){return it.getBoundingClientRect()}}))}}Tt(!1),yt();var It={fn:function(){return{onDestroy:function(){Tt(!0)},onHidden:function(){B=null},onClickOutside:function(x){x.props.showOnCreate&&!pt&&(pt=!0,B=null)},onShow:function(x){x.props.showOnCreate&&!pt&&(pt=!0,At(x,W[0]))},onTrigger:function(x,Gt){At(x,Gt.currentTarget)}}}},rt=de(J(),Object.assign({},S(D,["overrides"]),{plugins:[It].concat(D.plugins||[]),triggerTarget:W,popperOptions:Object.assign({},D.popperOptions,{modifiers:[].concat(((F=D.popperOptions)==null?void 0:F.modifiers)||[],[cr])})})),ht=rt.show;rt.show=function(tt){if(ht(),!B&&tt==null)return At(rt,W[0]);if(!(B&&tt==null)){if(typeof tt=="number")return W[tt]&&At(rt,W[tt]);if(q.includes(tt)){var it=tt.reference;return At(rt,it)}if(W.includes(tt))return At(rt,tt)}},rt.showNext=function(){var tt=W[0];if(!B)return rt.show(0);var it=W.indexOf(B);rt.show(W[it+1]||tt)},rt.showPrevious=function(){var tt=W[W.length-1];if(!B)return rt.show(tt);var it=W.indexOf(B),x=W[it-1]||tt;rt.show(x)};var vt=rt.setProps;return rt.setProps=function(tt){bt=tt.overrides||bt,vt(tt)},rt.setInstances=function(tt){Tt(!0),lt.forEach(function(it){return it()}),q=tt,Tt(!1),yt(),jt(rt),rt.setProps({triggerTarget:W})},lt=jt(rt),rt},ur={mouseover:"mouseenter",focusin:"focus",click:"click"};function qe(g,y){Ve(!(y&&y.target),["You must specity a `target` prop indicating a CSS selector string matching","the target elements that should receive a tippy."].join(" "));var D=[],F=[],q=!1,W=y.target,B=S(y,["target"]),bt=Object.assign({},B,{trigger:"manual",touch:!1}),lt=Object.assign({},B,{showOnCreate:!0}),pt=de(g,bt),yt=I(pt);function Tt(ht){if(!(!ht.target||q)){var vt=ht.target.closest(W);if(vt){var tt=vt.getAttribute("data-tippy-trigger")||y.trigger||Qt.trigger;if(!vt._tippy&&!(ht.type==="touchstart"&&typeof lt.touch=="boolean")&&!(ht.type!=="touchstart"&&tt.indexOf(ur[ht.type])<0)){var it=de(vt,lt);it&&(F=F.concat(it))}}}}function jt(ht,vt,tt,it){it===void 0&&(it=!1),ht.addEventListener(vt,tt,it),D.push({node:ht,eventType:vt,handler:tt,options:it})}function At(ht){var vt=ht.reference;jt(vt,"touchstart",Tt,f),jt(vt,"mouseover",Tt),jt(vt,"focusin",Tt),jt(vt,"click",Tt)}function It(){D.forEach(function(ht){var vt=ht.node,tt=ht.eventType,it=ht.handler,x=ht.options;vt.removeEventListener(tt,it,x)}),D=[]}function rt(ht){var vt=ht.destroy,tt=ht.enable,it=ht.disable;ht.destroy=function(x){x===void 0&&(x=!0),x&&F.forEach(function(Gt){Gt.destroy()}),F=[],It(),vt()},ht.enable=function(){tt(),F.forEach(function(x){return x.enable()}),q=!1},ht.disable=function(){it(),F.forEach(function(x){return x.disable()}),q=!0},At(ht)}return yt.forEach(rt),pt}var dr={name:"animateFill",defaultValue:!1,fn:function(y){var D;if(!((D=y.props.render)!=null&&D.$$tippy))return Ve(y.props.animateFill,"The `animateFill` plugin requires the default render function."),{};var F=Xe(y.popper),q=F.box,W=F.content,B=y.props.animateFill?Vr():null;return{onCreate:function(){B&&(q.insertBefore(B,q.firstElementChild),q.setAttribute("data-animatefill",""),q.style.overflow="hidden",y.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(B){var lt=q.style.transitionDuration,pt=Number(lt.replace("ms",""));W.style.transitionDelay=Math.round(pt/10)+"ms",B.style.transitionDuration=lt,h([B],"visible")}},onShow:function(){B&&(B.style.transitionDuration="0ms")},onHide:function(){B&&h([B],"hidden")}}}};function Vr(){var g=J();return g.className=o,h([g],"hidden"),g}var xn={clientX:0,clientY:0},fn=[];function En(g){var y=g.clientX,D=g.clientY;xn={clientX:y,clientY:D}}function On(g){g.addEventListener("mousemove",En)}function Yr(g){g.removeEventListener("mousemove",En)}var jn={name:"followCursor",defaultValue:!1,fn:function(y){var D=y.reference,F=v(y.props.triggerTarget||D),q=!1,W=!1,B=!0,bt=y.props;function lt(){return y.props.followCursor==="initial"&&y.state.isVisible}function pt(){F.addEventListener("mousemove",jt)}function yt(){F.removeEventListener("mousemove",jt)}function Tt(){q=!0,y.setProps({getReferenceClientRect:null}),q=!1}function jt(rt){var ht=rt.target?D.contains(rt.target):!0,vt=y.props.followCursor,tt=rt.clientX,it=rt.clientY,x=D.getBoundingClientRect(),Gt=tt-x.left,ft=it-x.top;(ht||!y.props.interactive)&&y.setProps({getReferenceClientRect:function(){var be=D.getBoundingClientRect(),Ge=tt,Ke=it;vt==="initial"&&(Ge=be.left+Gt,Ke=be.top+ft);var Je=vt==="horizontal"?be.top:Ke,re=vt==="vertical"?be.right:Ge,le=vt==="horizontal"?be.bottom:Ke,ye=vt==="vertical"?be.left:Ge;return{width:re-ye,height:le-Je,top:Je,right:re,bottom:le,left:ye}}})}function At(){y.props.followCursor&&(fn.push({instance:y,doc:F}),On(F))}function It(){fn=fn.filter(function(rt){return rt.instance!==y}),fn.filter(function(rt){return rt.doc===F}).length===0&&Yr(F)}return{onCreate:At,onDestroy:It,onBeforeUpdate:function(){bt=y.props},onAfterUpdate:function(ht,vt){var tt=vt.followCursor;q||tt!==void 0&&bt.followCursor!==tt&&(It(),tt?(At(),y.state.isMounted&&!W&&!lt()&&pt()):(yt(),Tt()))},onMount:function(){y.props.followCursor&&!W&&(B&&(jt(xn),B=!1),lt()||pt())},onTrigger:function(ht,vt){X(vt)&&(xn={clientX:vt.clientX,clientY:vt.clientY}),W=vt.type==="focus"},onHidden:function(){y.props.followCursor&&(Tt(),yt(),B=!0)}}}};function Xr(g,y){var D;return{popperOptions:Object.assign({},g.popperOptions,{modifiers:[].concat((((D=g.popperOptions)==null?void 0:D.modifiers)||[]).filter(function(F){var q=F.name;return q!==y.name}),[y])})}}var Bn={name:"inlinePositioning",defaultValue:!1,fn:function(y){var D=y.reference;function F(){return!!y.props.inlinePositioning}var q,W=-1,B=!1,bt={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(jt){var At=jt.state;F()&&(q!==At.placement&&y.setProps({getReferenceClientRect:function(){return lt(At.placement)}}),q=At.placement)}};function lt(Tt){return qr(k(Tt),D.getBoundingClientRect(),Y(D.getClientRects()),W)}function pt(Tt){B=!0,y.setProps(Tt),B=!1}function yt(){B||pt(Xr(y.props,bt))}return{onCreate:yt,onAfterUpdate:yt,onTrigger:function(jt,At){if(X(At)){var It=Y(y.reference.getClientRects()),rt=It.find(function(ht){return ht.left-2<=At.clientX&&ht.right+2>=At.clientX&&ht.top-2<=At.clientY&&ht.bottom+2>=At.clientY});W=It.indexOf(rt)}},onUntrigger:function(){W=-1}}}};function qr(g,y,D,F){if(D.length<2||g===null)return y;if(D.length===2&&F>=0&&D[0].left>D[1].right)return D[F]||y;switch(g){case"top":case"bottom":{var q=D[0],W=D[D.length-1],B=g==="top",bt=q.top,lt=W.bottom,pt=B?q.left:W.left,yt=B?q.right:W.right,Tt=yt-pt,jt=lt-bt;return{top:bt,bottom:lt,left:pt,right:yt,width:Tt,height:jt}}case"left":case"right":{var At=Math.min.apply(Math,D.map(function(ft){return ft.left})),It=Math.max.apply(Math,D.map(function(ft){return ft.right})),rt=D.filter(function(ft){return g==="left"?ft.left===At:ft.right===It}),ht=rt[0].top,vt=rt[rt.length-1].bottom,tt=At,it=It,x=it-tt,Gt=vt-ht;return{top:ht,bottom:vt,left:tt,right:it,width:x,height:Gt}}default:return y}}var Gr={name:"sticky",defaultValue:!1,fn:function(y){var D=y.reference,F=y.popper;function q(){return y.popperInstance?y.popperInstance.state.elements.reference:D}function W(pt){return y.props.sticky===!0||y.props.sticky===pt}var B=null,bt=null;function lt(){var pt=W("reference")?q().getBoundingClientRect():null,yt=W("popper")?F.getBoundingClientRect():null;(pt&&Hn(B,pt)||yt&&Hn(bt,yt))&&y.popperInstance&&y.popperInstance.update(),B=pt,bt=yt,y.state.isMounted&&requestAnimationFrame(lt)}return{onMount:function(){y.props.sticky&<()}}}};function Hn(g,y){return g&&y?g.top!==y.top||g.right!==y.right||g.bottom!==y.bottom||g.left!==y.left:!0}de.setDefaultProps({render:ar}),t.animateFill=dr,t.createSingleton=fr,t.default=de,t.delegate=qe,t.followCursor=jn,t.hideAll=lr,t.inlinePositioning=Bn,t.roundArrow=r,t.sticky=Gr}),Ai=$o(Wo()),Ds=$o(Wo()),Cs=t=>{let e={plugins:[]},r=i=>t[t.indexOf(i)+1];if(t.includes("animation")&&(e.animation=r("animation")),t.includes("duration")&&(e.duration=parseInt(r("duration"))),t.includes("delay")){let i=r("delay");e.delay=i.includes("-")?i.split("-").map(o=>parseInt(o)):parseInt(i)}if(t.includes("cursor")){e.plugins.push(Ds.followCursor);let i=r("cursor");["x","initial"].includes(i)?e.followCursor=i==="x"?"horizontal":"initial":e.followCursor=!0}t.includes("on")&&(e.trigger=r("on")),t.includes("arrowless")&&(e.arrow=!1),t.includes("html")&&(e.allowHTML=!0),t.includes("interactive")&&(e.interactive=!0),t.includes("border")&&e.interactive&&(e.interactiveBorder=parseInt(r("border"))),t.includes("debounce")&&e.interactive&&(e.interactiveDebounce=parseInt(r("debounce"))),t.includes("max-width")&&(e.maxWidth=parseInt(r("max-width"))),t.includes("theme")&&(e.theme=r("theme")),t.includes("placement")&&(e.placement=r("placement"));let n={};return t.includes("no-flip")&&(n.modifiers||(n.modifiers=[]),n.modifiers.push({name:"flip",enabled:!1})),e.popperOptions=n,e};function Di(t){t.magic("tooltip",e=>(r,n={})=>{let i=n.timeout;delete n.timeout;let o=(0,Ai.default)(e,{content:r,trigger:"manual",...n});o.show(),setTimeout(()=>{o.hide(),setTimeout(()=>o.destroy(),n.duration||300)},i||2e3)}),t.directive("tooltip",(e,{modifiers:r,expression:n},{evaluateLater:i,effect:o,cleanup:a})=>{let d=r.length>0?Cs(r):{};e.__x_tippy||(e.__x_tippy=(0,Ai.default)(e,d)),a(()=>{e.__x_tippy&&(e.__x_tippy.destroy(),delete e.__x_tippy)});let f=()=>e.__x_tippy.enable(),u=()=>e.__x_tippy.disable(),w=m=>{m?(f(),e.__x_tippy.setContent(m)):u()};if(r.includes("raw"))w(n);else{let m=i(n);o(()=>{m(E=>{typeof E=="object"?(e.__x_tippy.setProps(E),f()):w(E)})})}})}Di.defaultProps=t=>(Ai.default.setDefaultProps(t),Di);var _s=Di,zo=_s;var Lr=()=>{document.querySelectorAll("[ax-load][x-ignore]").forEach(t=>{t.removeAttribute("x-ignore"),t.setAttribute("x-load",t.getAttribute("ax-load")),t.setAttribute("x-load-src",t.getAttribute("ax-load-src"))}),document.querySelectorAll("[ax-load]").forEach(t=>{t.setAttribute("x-load",t.getAttribute("ax-load")),t.setAttribute("x-load-src",t.getAttribute("ax-load-src"))})};document.body?(Lr(),new MutationObserver(Lr).observe(document.body,{childList:!0,subtree:!0})):document.addEventListener("DOMContentLoaded",()=>{Lr(),new MutationObserver(Lr).observe(document.body,{childList:!0,subtree:!0})});document.addEventListener("alpine:init",()=>{window.Alpine.plugin(ao),window.Alpine.plugin(so),window.Alpine.plugin(uo),window.Alpine.plugin(Bo),window.Alpine.plugin(zo)});var Ts=function(t,e,r){function n(w,m){for(let E of w){let O=i(E,m);if(O!==null)return O}}function i(w,m){let E=w.match(/^[\{\[]([^\[\]\{\}]*)[\}\]](.*)/s);if(E===null||E.length!==3)return null;let O=E[1],S=E[2];if(O.includes(",")){let[M,I]=O.split(",",2);if(I==="*"&&m>=M)return S;if(M==="*"&&m<=I)return S;if(m>=M&&m<=I)return S}return O==m?S:null}function o(w){return w.toString().charAt(0).toUpperCase()+w.toString().slice(1)}function a(w,m){if(m.length===0)return w;let E={};for(let[O,S]of Object.entries(m))E[":"+o(O??"")]=o(S??""),E[":"+O.toUpperCase()]=S.toString().toUpperCase(),E[":"+O]=S;return Object.entries(E).forEach(([O,S])=>{w=w.replaceAll(O,S)}),w}function d(w){return w.map(m=>m.replace(/^[\{\[]([^\[\]\{\}]*)[\}\]]/,""))}let f=t.split("|"),u=n(f,e);return u!=null?a(u.trim(),r):(f=d(f),a(f.length>1&&e>1?f[1]:f[0],r))};window.jsMd5=Uo.md5;window.pluralize=Ts;})(); +/*! Bundled license information: + +js-md5/src/md5.js: + (** + * [js-md5]{@link https://github.com/emn178/js-md5} + * + * @namespace md5 + * @version 0.8.3 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2014-2023 + * @license MIT + *) + +sortablejs/modular/sortable.esm.js: + (**! + * Sortable 1.15.6 + * @author RubaXa + * @author owenm + * @license MIT + *) +*/ diff --git a/public/js/filament/tables/components/table.js b/public/js/filament/tables/components/table.js new file mode 100644 index 000000000..ea16d8561 --- /dev/null +++ b/public/js/filament/tables/components/table.js @@ -0,0 +1 @@ +function n(){return{checkboxClickController:null,collapsedGroups:[],isLoading:!1,selectedRecords:[],shouldCheckUniqueSelection:!0,lastCheckedRecord:null,livewireId:null,init:function(){this.livewireId=this.$root.closest("[wire\\:id]").attributes["wire:id"].value,this.$wire.$on("deselectAllTableRecords",()=>this.deselectAllRecords()),this.$watch("selectedRecords",()=>{if(!this.shouldCheckUniqueSelection){this.shouldCheckUniqueSelection=!0;return}this.selectedRecords=[...new Set(this.selectedRecords)],this.shouldCheckUniqueSelection=!1}),this.$nextTick(()=>this.watchForCheckboxClicks()),Livewire.hook("element.init",({component:e})=>{e.id===this.livewireId&&this.watchForCheckboxClicks()})},mountAction:function(e,t=null){this.$wire.set("selectedTableRecords",this.selectedRecords,!1),this.$wire.mountTableAction(e,t)},mountBulkAction:function(e){this.$wire.set("selectedTableRecords",this.selectedRecords,!1),this.$wire.mountTableBulkAction(e)},toggleSelectRecordsOnPage:function(){let e=this.getRecordsOnPage();if(this.areRecordsSelected(e)){this.deselectRecords(e);return}this.selectRecords(e)},toggleSelectRecordsInGroup:async function(e){if(this.isLoading=!0,this.areRecordsSelected(this.getRecordsInGroupOnPage(e))){this.deselectRecords(await this.$wire.getGroupedSelectableTableRecordKeys(e));return}this.selectRecords(await this.$wire.getGroupedSelectableTableRecordKeys(e)),this.isLoading=!1},getRecordsInGroupOnPage:function(e){let t=[];for(let s of this.$root?.getElementsByClassName("fi-ta-record-checkbox")??[])s.dataset.group===e&&t.push(s.value);return t},getRecordsOnPage:function(){let e=[];for(let t of this.$root?.getElementsByClassName("fi-ta-record-checkbox")??[])e.push(t.value);return e},selectRecords:function(e){for(let t of e)this.isRecordSelected(t)||this.selectedRecords.push(t)},deselectRecords:function(e){for(let t of e){let s=this.selectedRecords.indexOf(t);s!==-1&&this.selectedRecords.splice(s,1)}},selectAllRecords:async function(){this.isLoading=!0,this.selectedRecords=await this.$wire.getAllSelectableTableRecordKeys(),this.isLoading=!1},deselectAllRecords:function(){this.selectedRecords=[]},isRecordSelected:function(e){return this.selectedRecords.includes(e)},areRecordsSelected:function(e){return e.every(t=>this.isRecordSelected(t))},toggleCollapseGroup:function(e){if(this.isGroupCollapsed(e)){this.collapsedGroups.splice(this.collapsedGroups.indexOf(e),1);return}this.collapsedGroups.push(e)},isGroupCollapsed:function(e){return this.collapsedGroups.includes(e)},resetCollapsedGroups:function(){this.collapsedGroups=[]},watchForCheckboxClicks:function(){this.checkboxClickController&&this.checkboxClickController.abort(),this.checkboxClickController=new AbortController;let{signal:e}=this.checkboxClickController;this.$root?.addEventListener("click",t=>t.target?.matches(".fi-ta-record-checkbox")&&this.handleCheckboxClick(t,t.target),{signal:e})},handleCheckboxClick:function(e,t){if(!this.lastChecked){this.lastChecked=t;return}if(e.shiftKey){let s=Array.from(this.$root?.getElementsByClassName("fi-ta-record-checkbox")??[]);if(!s.includes(this.lastChecked)){this.lastChecked=t;return}let o=s.indexOf(this.lastChecked),r=s.indexOf(t),l=[o,r].sort((i,d)=>i-d),c=[];for(let i=l[0];i<=l[1];i++)s[i].checked=t.checked,c.push(s[i].value);t.checked?this.selectRecords(c):this.deselectRecords(c)}this.lastChecked=t}}}export{n as default}; diff --git a/public/js/filament/widgets/components/chart.js b/public/js/filament/widgets/components/chart.js new file mode 100644 index 000000000..4d062d1fd --- /dev/null +++ b/public/js/filament/widgets/components/chart.js @@ -0,0 +1,37 @@ +function Ft(){}var Do=function(){let i=0;return function(){return i++}}();function P(i){return i===null||typeof i>"u"}function B(i){if(Array.isArray&&Array.isArray(i))return!0;let t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function F(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}var q=i=>(typeof i=="number"||i instanceof Number)&&isFinite(+i);function ft(i,t){return q(i)?i:t}function E(i,t){return typeof i>"u"?t:i}var Eo=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:i/t,En=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function $(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function V(i,t,e,s){let n,r,o;if(B(i))if(r=i.length,s)for(n=r-1;n>=0;n--)t.call(e,i[n],n);else for(n=0;ni,x:i=>i.x,y:i=>i.y};function Vt(i,t){return(mo[t]||(mo[t]=Ic(t)))(i)}function Ic(i){let t=Cc(i);return e=>{for(let s of t){if(s==="")break;e=e&&e[s]}return e}}function Cc(i){let t=i.split("."),e=[],s="";for(let n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function vs(i){return i.charAt(0).toUpperCase()+i.slice(1)}var dt=i=>typeof i<"u",zt=i=>typeof i=="function",In=(i,t)=>{if(i.size!==t.size)return!1;for(let e of i)if(!t.has(e))return!1;return!0};function Co(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}var j=Math.PI,H=2*j,Fc=H+j,ks=Number.POSITIVE_INFINITY,Ac=j/180,U=j/2,pi=j/4,go=j*2/3,mt=Math.log10,Mt=Math.sign;function Cn(i){let t=Math.round(i);i=Pe(i,t,i/1e3)?t:i;let e=Math.pow(10,Math.floor(mt(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function Fo(i){let t=[],e=Math.sqrt(i),s;for(s=1;sn-r).pop(),t}function ge(i){return!isNaN(parseFloat(i))&&isFinite(i)}function Pe(i,t,e){return Math.abs(i-t)=i}function Fn(i,t,e){let s,n,r;for(s=0,n=i.length;sl&&c=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function Ds(i,t,e){e=e||(o=>i[o]1;)r=n+s>>1,e(r)?n=r:s=r;return{lo:n,hi:s}}var Ct=(i,t,e,s)=>Ds(i,e,s?n=>i[n][t]<=e:n=>i[n][t]Ds(i,e,s=>i[s][t]>=e);function No(i,t,e){let s=0,n=i.length;for(;ss&&i[n-1]>e;)n--;return s>0||n{let s="_onData"+vs(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...r){let o=n.apply(this,r);return i._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...r)}),o}})})}function Pn(i,t){let e=i._chartjs;if(!e)return;let s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(Ro.forEach(r=>{delete i[r]}),delete i._chartjs)}function Nn(i){let t=new Set,e,s;for(e=0,s=i.length;e"u"?function(i){return i()}:window.requestAnimationFrame}();function Wn(i,t,e){let s=e||(o=>Array.prototype.slice.call(o)),n=!1,r=[];return function(...o){r=s(o),n||(n=!0,Rn.call(window,()=>{n=!1,i.apply(t,r)}))}}function zo(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}var Es=i=>i==="start"?"left":i==="end"?"right":"center",nt=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Vo=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function zn(i,t,e){let s=t.length,n=0,r=s;if(i._sorted){let{iScale:o,_parsed:a}=i,l=o.axis,{min:c,max:h,minDefined:u,maxDefined:d}=o.getUserBounds();u&&(n=tt(Math.min(Ct(a,o.axis,c).lo,e?s:Ct(t,l,o.getPixelForValue(c)).lo),0,s-1)),d?r=tt(Math.max(Ct(a,o.axis,h,!0).hi+1,e?0:Ct(t,l,o.getPixelForValue(h),!0).hi+1),n,s)-n:r=s-n}return{start:n,count:r}}function Vn(i){let{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;let r=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),r}var ys=i=>i===0||i===1,po=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*H/e)),yo=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*H/e)+1,Ie={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*U)+1,easeOutSine:i=>Math.sin(i*U),easeInOutSine:i=>-.5*(Math.cos(j*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>ys(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>ys(i)?i:po(i,.075,.3),easeOutElastic:i=>ys(i)?i:yo(i,.075,.3),easeInOutElastic(i){return ys(i)?i:i<.5?.5*po(i*2,.1125,.45):.5+.5*yo(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Ie.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Ie.easeInBounce(i*2)*.5:Ie.easeOutBounce(i*2-1)*.5+.5};function wi(i){return i+.5|0}var Gt=(i,t,e)=>Math.max(Math.min(i,e),t);function yi(i){return Gt(wi(i*2.55),0,255)}function Xt(i){return Gt(wi(i*255),0,255)}function Wt(i){return Gt(wi(i/2.55)/100,0,1)}function bo(i){return Gt(wi(i*100),0,100)}var xt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},vn=[..."0123456789ABCDEF"],Pc=i=>vn[i&15],Nc=i=>vn[(i&240)>>4]+vn[i&15],bs=i=>(i&240)>>4===(i&15),Rc=i=>bs(i.r)&&bs(i.g)&&bs(i.b)&&bs(i.a);function Wc(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&xt[i[1]]*17,g:255&xt[i[2]]*17,b:255&xt[i[3]]*17,a:t===5?xt[i[4]]*17:255}:(t===7||t===9)&&(e={r:xt[i[1]]<<4|xt[i[2]],g:xt[i[3]]<<4|xt[i[4]],b:xt[i[5]]<<4|xt[i[6]],a:t===9?xt[i[7]]<<4|xt[i[8]]:255})),e}var zc=(i,t)=>i<255?t(i):"";function Vc(i){var t=Rc(i)?Pc:Nc;return i?"#"+t(i.r)+t(i.g)+t(i.b)+zc(i.a,t):void 0}var Hc=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ho(i,t,e){let s=t*Math.min(e,1-e),n=(r,o=(r+i/30)%12)=>e-s*Math.max(Math.min(o-3,9-o,1),-1);return[n(0),n(8),n(4)]}function Bc(i,t,e){let s=(n,r=(n+i/60)%6)=>e-e*t*Math.max(Math.min(r,4-r,1),0);return[s(5),s(3),s(1)]}function $c(i,t,e){let s=Ho(i,1,.5),n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function jc(i,t,e,s,n){return i===n?(t-e)/s+(t.5?h/(2-r-o):h/(r+o),l=jc(e,s,n,h,r),l=l*60+.5),[l|0,c||0,a]}function Bn(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(Xt)}function $n(i,t,e){return Bn(Ho,i,t,e)}function Uc(i,t,e){return Bn($c,i,t,e)}function Yc(i,t,e){return Bn(Bc,i,t,e)}function Bo(i){return(i%360+360)%360}function Zc(i){let t=Hc.exec(i),e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?yi(+t[5]):Xt(+t[5]));let n=Bo(+t[2]),r=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?s=Uc(n,r,o):t[1]==="hsv"?s=Yc(n,r,o):s=$n(n,r,o),{r:s[0],g:s[1],b:s[2],a:e}}function qc(i,t){var e=Hn(i);e[0]=Bo(e[0]+t),e=$n(e),i.r=e[0],i.g=e[1],i.b=e[2]}function Gc(i){if(!i)return;let t=Hn(i),e=t[0],s=bo(t[1]),n=bo(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${Wt(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}var xo={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},_o={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Xc(){let i={},t=Object.keys(_o),e=Object.keys(xo),s,n,r,o,a;for(s=0;s>16&255,r>>8&255,r&255]}return i}var xs;function Kc(i){xs||(xs=Xc(),xs.transparent=[0,0,0,0]);let t=xs[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var Jc=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Qc(i){let t=Jc.exec(i),e=255,s,n,r;if(t){if(t[7]!==s){let o=+t[7];e=t[8]?yi(o):Gt(o*255,0,255)}return s=+t[1],n=+t[3],r=+t[5],s=255&(t[2]?yi(s):Gt(s,0,255)),n=255&(t[4]?yi(n):Gt(n,0,255)),r=255&(t[6]?yi(r):Gt(r,0,255)),{r:s,g:n,b:r,a:e}}}function th(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${Wt(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}var Sn=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Ee=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function eh(i,t,e){let s=Ee(Wt(i.r)),n=Ee(Wt(i.g)),r=Ee(Wt(i.b));return{r:Xt(Sn(s+e*(Ee(Wt(t.r))-s))),g:Xt(Sn(n+e*(Ee(Wt(t.g))-n))),b:Xt(Sn(r+e*(Ee(Wt(t.b))-r))),a:i.a+e*(t.a-i.a)}}function _s(i,t,e){if(i){let s=Hn(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=$n(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function $o(i,t){return i&&Object.assign(t||{},i)}function wo(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=Xt(i[3]))):(t=$o(i,{r:0,g:0,b:0,a:1}),t.a=Xt(t.a)),t}function ih(i){return i.charAt(0)==="r"?Qc(i):Zc(i)}var On=class i{constructor(t){if(t instanceof i)return t;let e=typeof t,s;e==="object"?s=wo(t):e==="string"&&(s=Wc(t)||Kc(t)||ih(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=$o(this._rgb);return t&&(t.a=Wt(t.a)),t}set rgb(t){this._rgb=wo(t)}rgbString(){return this._valid?th(this._rgb):void 0}hexString(){return this._valid?Vc(this._rgb):void 0}hslString(){return this._valid?Gc(this._rgb):void 0}mix(t,e){if(t){let s=this.rgb,n=t.rgb,r,o=e===r?.5:e,a=2*o-1,l=s.a-n.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;r=1-c,s.r=255&c*s.r+r*n.r+.5,s.g=255&c*s.g+r*n.g+.5,s.b=255&c*s.b+r*n.b+.5,s.a=o*s.a+(1-o)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=eh(this._rgb,t._rgb,e)),this}clone(){return new i(this.rgb)}alpha(t){return this._rgb.a=Xt(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=wi(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return _s(this._rgb,2,t),this}darken(t){return _s(this._rgb,2,-t),this}saturate(t){return _s(this._rgb,1,t),this}desaturate(t){return _s(this._rgb,1,-t),this}rotate(t){return qc(this._rgb,t),this}};function jo(i){return new On(i)}function Uo(i){if(i&&typeof i=="object"){let t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function jn(i){return Uo(i)?i:jo(i)}function kn(i){return Uo(i)?i:jo(i).saturate(.5).darken(.1).hexString()}var Kt=Object.create(null),Is=Object.create(null);function bi(i,t){if(!t)return i;let e=t.split(".");for(let s=0,n=e.length;se.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,s)=>kn(s.backgroundColor),this.hoverBorderColor=(e,s)=>kn(s.borderColor),this.hoverColor=(e,s)=>kn(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return Mn(this,t,e)}get(t){return bi(this,t)}describe(t,e){return Mn(Is,t,e)}override(t,e){return Mn(Kt,t,e)}route(t,e,s,n){let r=bi(this,t),o=bi(this,s),a="_"+e;Object.defineProperties(r,{[a]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){let l=this[a],c=o[n];return F(l)?Object.assign({},c,l):E(l,c)},set(l){this[a]=l}}})}},A=new Dn({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function sh(i){return!i||P(i.size)||P(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function xi(i,t,e,s,n){let r=t[n];return r||(r=t[n]=i.measureText(n).width,e.push(n)),r>s&&(s=r),s}function Yo(i,t,e,s){s=s||{};let n=s.data=s.data||{},r=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(n=s.data={},r=s.garbageCollect=[],s.font=t),i.save(),i.font=t;let o=0,a=e.length,l,c,h,u,d;for(l=0;le.length){for(l=0;l0&&i.stroke()}}function Fe(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&r.strokeColor!=="",l,c;for(i.save(),i.font=n.string,nh(i,r),l=0;l+i||0;function Fs(i,t){let e={},s=F(t),n=s?Object.keys(t):t,r=F(i)?s?o=>E(i[o],i[t[o]]):o=>i[o]:()=>i;for(let o of n)e[o]=ch(r(o));return e}function Zn(i){return Fs(i,{top:"y",right:"x",bottom:"y",left:"x"})}function te(i){return Fs(i,["topLeft","topRight","bottomLeft","bottomRight"])}function rt(i){let t=Zn(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Q(i,t){i=i||{},t=t||A.font;let e=E(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=E(i.style,t.style);s&&!(""+s).match(ah)&&(console.warn('Invalid font style specified: "'+s+'"'),s="");let n={family:E(i.family,t.family),lineHeight:lh(E(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:E(i.weight,t.weight),string:""};return n.string=sh(n),n}function We(i,t,e,s){let n=!0,r,o,a;for(r=0,o=i.length;re&&a===0?0:a+l;return{min:o(s,-Math.abs(r)),max:o(n,r)}}function Ht(i,t){return Object.assign(Object.create(i),t)}function As(i,t=[""],e=i,s,n=()=>i[0]){dt(s)||(s=Jo("_fallback",i));let r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:e,_fallback:s,_getTarget:n,override:o=>As([o,...i],t,e,s)};return new Proxy(r,{deleteProperty(o,a){return delete o[a],delete o._keys,delete i[0][a],!0},get(o,a){return Xo(o,a,()=>yh(a,t,i,o))},getOwnPropertyDescriptor(o,a){return Reflect.getOwnPropertyDescriptor(o._scopes[0],a)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(o,a){return ko(o).includes(a)},ownKeys(o){return ko(o)},set(o,a,l){let c=o._storage||(o._storage=n());return o[a]=c[a]=l,delete o._keys,!0}})}function me(i,t,e,s){let n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:qn(i,s),setContext:r=>me(i,r,e,s),override:r=>me(i.override(r),t,e,s)};return new Proxy(n,{deleteProperty(r,o){return delete r[o],delete i[o],!0},get(r,o,a){return Xo(r,o,()=>uh(r,o,a))},getOwnPropertyDescriptor(r,o){return r._descriptors.allKeys?Reflect.has(i,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,o)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(r,o){return Reflect.has(i,o)},ownKeys(){return Reflect.ownKeys(i)},set(r,o,a){return i[o]=a,delete r[o],!0}})}function qn(i,t={scriptable:!0,indexable:!0}){let{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:zt(e)?e:()=>e,isIndexable:zt(s)?s:()=>s}}var hh=(i,t)=>i?i+vs(t):t,Gn=(i,t)=>F(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Xo(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];let s=e();return i[t]=s,s}function uh(i,t,e){let{_proxy:s,_context:n,_subProxy:r,_descriptors:o}=i,a=s[t];return zt(a)&&o.isScriptable(t)&&(a=dh(t,a,i,e)),B(a)&&a.length&&(a=fh(t,a,i,o.isIndexable)),Gn(t,a)&&(a=me(a,n,r&&r[t],o)),a}function dh(i,t,e,s){let{_proxy:n,_context:r,_subProxy:o,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);return a.add(i),t=t(r,o||s),a.delete(i),Gn(i,t)&&(t=Xn(n._scopes,n,i,t)),t}function fh(i,t,e,s){let{_proxy:n,_context:r,_subProxy:o,_descriptors:a}=e;if(dt(r.index)&&s(i))t=t[r.index%t.length];else if(F(t[0])){let l=t,c=n._scopes.filter(h=>h!==l);t=[];for(let h of l){let u=Xn(c,n,i,h);t.push(me(u,r,o&&o[i],a))}}return t}function Ko(i,t,e){return zt(i)?i(t,e):i}var mh=(i,t)=>i===!0?t:typeof i=="string"?Vt(t,i):void 0;function gh(i,t,e,s,n){for(let r of t){let o=mh(e,r);if(o){i.add(o);let a=Ko(o._fallback,e,n);if(dt(a)&&a!==e&&a!==s)return a}else if(o===!1&&dt(s)&&e!==s)return null}return!1}function Xn(i,t,e,s){let n=t._rootScopes,r=Ko(t._fallback,e,s),o=[...i,...n],a=new Set;a.add(s);let l=So(a,o,e,r||e,s);return l===null||dt(r)&&r!==e&&(l=So(a,o,r,l,s),l===null)?!1:As(Array.from(a),[""],n,r,()=>ph(t,e,s))}function So(i,t,e,s,n){for(;e;)e=gh(i,t,e,s,n);return e}function ph(i,t,e){let s=i._getTarget();t in s||(s[t]={});let n=s[t];return B(n)&&F(e)?e:n}function yh(i,t,e,s){let n;for(let r of t)if(n=Jo(hh(r,i),e),dt(n))return Gn(i,n)?Xn(e,s,i,n):n}function Jo(i,t){for(let e of t){if(!e)continue;let s=e[i];if(dt(s))return s}}function ko(i){let t=i._keys;return t||(t=i._keys=bh(i._scopes)),t}function bh(i){let t=new Set;for(let e of i)for(let s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}function Kn(i,t,e,s){let{iScale:n}=i,{key:r="r"}=this._parsing,o=new Array(s),a,l,c,h;for(a=0,l=s;ati==="x"?"y":"x";function _h(i,t,e,s){let n=i.skip?t:i,r=t,o=e.skip?t:e,a=Ms(r,n),l=Ms(o,r),c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;let u=s*c,d=s*h;return{previous:{x:r.x-u*(o.x-n.x),y:r.y-u*(o.y-n.y)},next:{x:r.x+d*(o.x-n.x),y:r.y+d*(o.y-n.y)}}}function wh(i,t,e){let s=i.length,n,r,o,a,l,c=Ae(i,0);for(let h=0;h!c.skip)),t.cubicInterpolationMode==="monotone")kh(i,n);else{let c=s?i[i.length-1]:i[0];for(r=0,o=i.length;rwindow.getComputedStyle(i,null);function Th(i,t){return Ps(i).getPropertyValue(t)}var vh=["top","right","bottom","left"];function fe(i,t,e){let s={};e=e?"-"+e:"";for(let n=0;n<4;n++){let r=vh[n];s[r]=parseFloat(i[t+"-"+r+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}var Oh=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function Dh(i,t){let e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:r}=s,o=!1,a,l;if(Oh(n,r,i.target))a=n,l=r;else{let c=t.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function ee(i,t){if("native"in i)return i;let{canvas:e,currentDevicePixelRatio:s}=t,n=Ps(e),r=n.boxSizing==="border-box",o=fe(n,"padding"),a=fe(n,"border","width"),{x:l,y:c,box:h}=Dh(i,e),u=o.left+(h&&a.left),d=o.top+(h&&a.top),{width:f,height:m}=t;return r&&(f-=o.width+a.width,m-=o.height+a.height),{x:Math.round((l-u)/f*e.width/s),y:Math.round((c-d)/m*e.height/s)}}function Eh(i,t,e){let s,n;if(t===void 0||e===void 0){let r=Ls(i);if(!r)t=i.clientWidth,e=i.clientHeight;else{let o=r.getBoundingClientRect(),a=Ps(r),l=fe(a,"border","width"),c=fe(a,"padding");t=o.width-c.width-l.width,e=o.height-c.height-l.height,s=Ts(a.maxWidth,r,"clientWidth"),n=Ts(a.maxHeight,r,"clientHeight")}}return{width:t,height:e,maxWidth:s||ks,maxHeight:n||ks}}var Tn=i=>Math.round(i*10)/10;function ea(i,t,e,s){let n=Ps(i),r=fe(n,"margin"),o=Ts(n.maxWidth,i,"clientWidth")||ks,a=Ts(n.maxHeight,i,"clientHeight")||ks,l=Eh(i,t,e),{width:c,height:h}=l;if(n.boxSizing==="content-box"){let u=fe(n,"border","width"),d=fe(n,"padding");c-=d.width+u.width,h-=d.height+u.height}return c=Math.max(0,c-r.width),h=Math.max(0,s?Math.floor(c/s):h-r.height),c=Tn(Math.min(c,o,l.maxWidth)),h=Tn(Math.min(h,a,l.maxHeight)),c&&!h&&(h=Tn(c/2)),{width:c,height:h}}function Qn(i,t,e){let s=t||1,n=Math.floor(i.height*s),r=Math.floor(i.width*s);i.height=n/s,i.width=r/s;let o=i.canvas;return o.style&&(e||!o.style.height&&!o.style.width)&&(o.style.height=`${i.height}px`,o.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||o.height!==n||o.width!==r?(i.currentDevicePixelRatio=s,o.height=n,o.width=r,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}var ia=function(){let i=!1;try{let t={get passive(){return i=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return i}();function tr(i,t){let e=Th(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function qt(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function sa(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function na(i,t,e,s){let n={x:i.cp2x,y:i.cp2y},r={x:t.cp1x,y:t.cp1y},o=qt(i,n,e),a=qt(n,r,e),l=qt(r,t,e),c=qt(o,a,e),h=qt(a,l,e);return qt(c,h,e)}var Mo=new Map;function Ih(i,t){t=t||{};let e=i+JSON.stringify(t),s=Mo.get(e);return s||(s=new Intl.NumberFormat(i,t),Mo.set(e,s)),s}function ze(i,t,e){return Ih(t,e).format(i)}var Ch=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},Fh=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function pe(i,t,e){return i?Ch(t,e):Fh()}function er(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function ir(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function ra(i){return i==="angle"?{between:Ne,compare:Lc,normalize:ct}:{between:At,compare:(t,e)=>t-e,normalize:t=>t}}function To({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function Ah(i,t,e){let{property:s,start:n,end:r}=e,{between:o,normalize:a}=ra(s),l=t.length,{start:c,end:h,loop:u}=i,d,f;if(u){for(c+=l,h+=l,d=0,f=l;dl(n,_,y)&&a(n,_)!==0,x=()=>a(r,y)===0||l(r,_,y),S=()=>g||w(),k=()=>!g||x();for(let v=h,T=h;v<=u;++v)b=t[v%o],!b.skip&&(y=c(b[s]),y!==_&&(g=l(y,n,r),p===null&&S()&&(p=a(y,n)===0?v:T),p!==null&&k()&&(m.push(To({start:p,end:v,loop:d,count:o,style:f})),p=null),T=v,_=y));return p!==null&&m.push(To({start:p,end:u,loop:d,count:o,style:f})),m}function nr(i,t){let e=[],s=i.segments;for(let n=0;nn&&i[r%t].skip;)r--;return r%=t,{start:n,end:r}}function Ph(i,t,e,s){let n=i.length,r=[],o=t,a=i[t],l;for(l=t+1;l<=e;++l){let c=i[l%n];c.skip||c.stop?a.skip||(s=!1,r.push({start:t%n,end:(l-1)%n,loop:s}),t=o=c.stop?l:null):(o=l,a.skip&&(t=l)),a=c}return o!==null&&r.push({start:t%n,end:o%n,loop:s}),r}function oa(i,t){let e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];let r=!!i._loop,{start:o,end:a}=Lh(e,n,r,s);if(s===!0)return vo(i,[{start:o,end:a,loop:r}],e,t);let l=aa({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(s-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Rn.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;let r=s.items,o=r.length-1,a=!1,l;for(;o>=0;--o)l=r[o],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),a=!0):(r[o]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,s,t,"progress")),r.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=r.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){let e=this._charts,s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let s=e.items,n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},Bt=new mr,aa="transparent",Wh={boolean(i,t,e){return e>.5?t:i},color(i,t,e){let s=jn(i||aa),n=s.valid&&jn(t||aa);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}},gr=class{constructor(t,e,s,n){let r=e[s];n=We([t.to,n,r,t.from]);let o=We([t.from,r,n]);this._active=!0,this._fn=t.fn||Wh[t.type||typeof o],this._easing=Ie[t.easing]||Ie.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);let n=this._target[this._prop],r=s-this._start,o=this._duration-r;this._start=s,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=We([t.to,e,n,t.from]),this._from=We([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e=t-this._start,s=this._duration,n=this._prop,r=this._from,o=this._loop,a=this._to,l;if(this._active=r!==a&&(o||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(r,a,l)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){let e=t?"res":"rej",s=this._promises||[];for(let n=0;ni!=="onProgress"&&i!=="onComplete"&&i!=="fn"});A.set("animations",{colors:{type:"color",properties:Vh},numbers:{type:"number",properties:zh}});A.describe("animations",{_fallback:"animation"});A.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:i=>i|0}}}});var $s=class{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!F(t))return;let e=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{let n=t[s];if(!F(n))return;let r={};for(let o of Hh)r[o]=n[o];(B(n.properties)&&n.properties||[s]).forEach(o=>{(o===s||!e.has(o))&&e.set(o,r)})})}_animateOptions(t,e){let s=e.options,n=$h(t,s);if(!n)return[];let r=this._createAnimations(n,s);return s.$shared&&Bh(t.options.$animations,s).then(()=>{t.options=s},()=>{}),r}_createAnimations(t,e){let s=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now(),l;for(l=o.length-1;l>=0;--l){let c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}let h=e[c],u=r[c],d=s.get(c);if(u)if(d&&u.active()){u.update(d,h,a);continue}else u.cancel();if(!d||!d.duration){t[c]=h;continue}r[c]=u=new gr(d,t,c,h),n.push(u)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}let s=this._createAnimations(t,e);if(s.length)return Bt.add(this._chart,s),!0}};function Bh(i,t){let e=[],s=Object.keys(t);for(let n=0;n0||!e&&r<0)return n.index}return null}function da(i,t){let{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:r,vScale:o,index:a}=s,l=r.axis,c=o.axis,h=Zh(r,o,s),u=t.length,d;for(let f=0;fe[s].axis===t).shift()}function Xh(i,t){return Ht(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Kh(i,t,e){return Ht(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Mi(i,t){let e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(let n of t){let r=n._stacks;if(!r||r[s]===void 0||r[s][e]===void 0)return;delete r[s][e]}}}var or=i=>i==="reset"||i==="none",fa=(i,t)=>t?i:Object.assign({},i),Jh=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:Ja(e,!0),values:null},gt=class{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ha(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Mi(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(u,d,f,m)=>u==="x"?d:u==="r"?m:f,r=e.xAxisID=E(s.xAxisID,rr(t,"x")),o=e.yAxisID=E(s.yAxisID,rr(t,"y")),a=e.rAxisID=E(s.rAxisID,rr(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,r,o,a),h=e.vAxisID=n(l,o,r,a);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Pn(this._data,this),t._stacked&&Mi(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(F(e))this._data=Yh(e);else if(s!==e){if(s){Pn(s,this);let n=this._cachedMeta;Mi(n),n._parsed=[]}e&&Object.isExtensible(e)&&Wo(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,s=this.getDataset(),n=!1;this._dataCheck();let r=e._stacked;e._stacked=ha(e.vScale,e),e.stack!==s.stack&&(n=!0,Mi(e),e.stack=s.stack),this._resyncElements(t),(n||r!==e._stacked)&&da(this,e._parsed)}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let{_cachedMeta:s,_data:n}=this,{iScale:r,_stacked:o}=s,a=r.axis,l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,u,d;if(this._parsing===!1)s._parsed=n,s._sorted=!0,d=n;else{B(n[t])?d=this.parseArrayData(s,n,t,e):F(n[t])?d=this.parseObjectData(s,n,t,e):d=this.parsePrimitiveData(s,n,t,e);let f=()=>u[a]===null||c&&u[a]g||u=0;--d)if(!m()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){let e=this._cachedMeta._parsed,s=[],n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(s,n),g=c.resolveNamedOptions(d,f,m,u);return g.$shared&&(g.$shared=l,r[o]=Object.freeze(fa(g,l))),g}_resolveAnimations(t,e,s){let n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,a=r[o];if(a)return a;let l;if(n.options.animation!==!1){let h=this.chart.config,u=h.datasetAnimationScopeKeys(this._type,e),d=h.getOptionScopes(this.getDataset(),u);l=h.createResolver(d,this.getContext(t,s,e))}let c=new $s(n,l&&l.animations);return l&&l._cacheable&&(r[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||or(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,r=this.getSharedOptions(s),o=this.includeOptions(e,r)||r!==n;return this.updateSharedOptions(r,e,s),{sharedOptions:r,includeOptions:o}}updateElement(t,e,s,n){or(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!or(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;let r=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,s=this._cachedMeta.data;for(let[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];let n=s.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(c.length+=e,a=c.length-1;a>=o;a--)c[a]=c[a-e]};for(l(r),a=t;an-r))}return i._cache.$bar}function tu(i){let t=i.iScale,e=Qh(t,i.type),s=t._length,n,r,o,a,l=()=>{o===32767||o===-32768||(dt(a)&&(s=Math.min(s,Math.abs(o-a)||s)),a=o)};for(n=0,r=e.length;n0?n[i-1]:null,a=iMath.abs(a)&&(l=a,c=o),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:r,min:o,max:a}}function Qa(i,t,e,s){return B(i)?su(i,t,e,s):t[e.axis]=e.parse(i,s),t}function ma(i,t,e,s){let n=i.iScale,r=i.vScale,o=n.getLabels(),a=n===r,l=[],c,h,u,d;for(c=e,h=e+s;c=e?1:-1)}function ru(i){let t,e,s,n,r;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.basel.controller.options.grouped),r=s.options.stacked,o=[],a=l=>{let c=l.controller.getParsed(e),h=c&&c[l.vScale.axis];if(P(h)||isNaN(h))return!0};for(let l of n)if(!(e!==void 0&&a(l))&&((r===!1||o.indexOf(l.stack)===-1||r===void 0&&l.stack===void 0)&&o.push(l.stack),l.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,s){let n=this._getStacks(t,s),r=e!==void 0?n.indexOf(e):-1;return r===-1?n.length-1:r}_getRuler(){let t=this.options,e=this._cachedMeta,s=e.iScale,n=[],r,o;for(r=0,o=e.data.length;r=0;--s)e=Math.max(e,t[s].size(this.resolveDataElementOptions(s))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,{xScale:s,yScale:n}=e,r=this.getParsed(t),o=s.getLabelForValue(r.x),a=n.getLabelForValue(r.y),l=r._custom;return{label:e.label,value:"("+o+", "+a+(l?", "+l:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,s,n){let r=n==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,n),h=o.axis,u=a.axis;for(let d=e;dNe(_,a,l,!0)?1:Math.max(w,w*e,x,x*e),m=(_,w,x)=>Ne(_,a,l,!0)?-1:Math.min(w,w*e,x,x*e),g=f(0,c,u),p=f(U,h,d),y=m(j,c,u),b=m(j+U,h,d);s=(g-y)/2,n=(p-b)/2,r=-(g+y)/2,o=-(p+b)/2}return{ratioX:s,ratioY:n,offsetX:r,offsetY:o}}var ne=class extends gt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let r=l=>+s[l];if(F(s[t])){let{key:l="value"}=this._parsing;r=c=>+Vt(s[c],l)}let o,a;for(o=t,a=t+e;o0&&!isNaN(t)?H*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,s=this.chart,n=s.data.labels||[],r=ze(e._parsed[t],s.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0,s=this.chart,n,r,o,a,l;if(!t){for(n=0,r=s.data.datasets.length;ni!=="spacing",_indexable:i=>i!=="spacing"};ne.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){let t=i.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:e}}=i.legend.options;return t.labels.map((s,n)=>{let o=i.getDatasetMeta(0).controller.getStyle(n);return{text:s,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(n),index:n}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(i){let t=i.label,e=": "+i.formattedValue;return B(t)?(t=t.slice(),t[0]+=e):t+=e,t}}}}};var je=class extends gt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:s,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled,{start:a,count:l}=zn(e,n,o);this._drawStart=a,this._drawCount=l,Vn(e)&&(a=0,l=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!r._decimated,s.points=n;let c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!o,options:c},t),this.updateElements(n,a,l,t)}updateElements(t,e,s,n){let r=n==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:u}=this._getSharedOptions(e,n),d=o.axis,f=a.axis,{spanGaps:m,segment:g}=this.options,p=ge(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||r||n==="none",b=e>0&&this.getParsed(e-1);for(let _=e;_0&&Math.abs(x[d]-b[d])>p,g&&(S.parsed=x,S.raw=c.data[_]),u&&(S.options=h||this.resolveDataElementOptions(_,w.active?"active":n)),y||this.updateElement(w,_,S,n),b=x}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;let r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,r,o)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}};je.id="line";je.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};je.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};var Ue=class extends gt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,s=this.chart,n=s.data.labels||[],r=ze(e._parsed[t].r,s.options.locale);return{label:n[t]||"",value:r}}parseObjectData(t,e,s,n){return Kn.bind(this)(t,e,s,n)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((s,n)=>{let r=this.getParsed(n).r;!isNaN(r)&&this.chart.getDataVisibility(n)&&(re.max&&(e.max=r))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,s=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=Math.max(s.cutoutPercentage?r/100*s.cutoutPercentage:1,0),a=(r-o)/t.getVisibleDatasetCount();this.outerRadius=r-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,s,n){let r=n==="reset",o=this.chart,l=o.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,u=c.yCenter,d=c.getIndexAngle(0)-.5*j,f=d,m,g=360/this.countVisibleElements();for(m=0;m{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,s){return this.chart.getDataVisibility(t)?_t(this.resolveDataElementOptions(t,e).angle||s):0}};Ue.id="polarArea";Ue.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};Ue.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){let t=i.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:e}}=i.legend.options;return t.labels.map((s,n)=>{let o=i.getDatasetMeta(0).controller.getStyle(n);return{text:s,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(n),index:n}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(i){return i.chart.data.labels[i.dataIndex]+": "+i.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};var Ci=class extends ne{};Ci.id="pie";Ci.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};var Ye=class extends gt{getLabelAndValue(t){let e=this._cachedMeta.vScale,s=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(s[e.axis])}}parseObjectData(t,e,s,n){return Kn.bind(this)(t,e,s,n)}update(t){let e=this._cachedMeta,s=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(s.points=n,t!=="resize"){let o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);let a={_loop:!0,_fullLoop:r.length===n.length,options:o};this.updateElement(s,void 0,a,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,s,n){let r=this._cachedMeta.rScale,o=n==="reset";for(let a=e;a{n[r]=s[r]&&s[r].active()?s[r]._to:this[r]}),n}};pt.defaults={};pt.defaultRoutes=void 0;var tl={values(i){return B(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";let s=this.chart.options.locale,n,r=i;if(e.length>1){let c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),r=hu(i,e)}let o=mt(Math.abs(r)),a=Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),ze(i,s,l)},logarithmic(i,t,e){if(i===0)return"0";let s=i/Math.pow(10,Math.floor(mt(i)));return s===1||s===2||s===5?tl.numeric.call(this,i,t,e):""}};function hu(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var Gs={formatters:tl};A.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(i,t)=>t.lineWidth,tickColor:(i,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Gs.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});A.route("scale.ticks","color","","color");A.route("scale.grid","color","","borderColor");A.route("scale.grid","borderColor","","borderColor");A.route("scale.title","color","","color");A.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&i!=="callback"&&i!=="parser",_indexable:i=>i!=="borderDash"&&i!=="tickBorderDash"});A.describe("scales",{_fallback:"scale"});A.describe("scale.ticks",{_scriptable:i=>i!=="backdropPadding"&&i!=="callback",_indexable:i=>i!=="backdropPadding"});function uu(i,t){let e=i.options.ticks,s=e.maxTicksLimit||du(i),n=e.major.enabled?mu(t):[],r=n.length,o=n[0],a=n[r-1],l=[];if(r>s)return gu(t,l,n,r/s),l;let c=fu(n,t,s);if(r>0){let h,u,d=r>1?Math.round((a-o)/(r-1)):null;for(Ns(t,l,c,P(d)?0:o-d,o),h=0,u=r-1;hn)return l}return Math.max(n,1)}function mu(i){let t=[],e,s;for(e=0,s=i.length;ei==="left"?"right":i==="right"?"left":i,ya=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e;function ba(i,t){let e=[],s=i.length/t,n=i.length,r=0;for(;ro+a)))return l}function xu(i,t){V(i,e=>{let s=e.gc,n=s.length/2,r;if(n>t){for(r=0;rs?s:e,s=n&&e>s?e:s,{min:ft(e,ft(s,e)),max:ft(s,ft(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$(this.options.beforeUpdate,[this])}update(t,e,s){let{beginAtZero:n,grace:r,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Go(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=a=r||s<=1||!this.isHorizontal()){this.labelRotation=n;return}let h=this._getLabelSizes(),u=h.widest.width,d=h.highest.height,f=tt(this.chart.width-u,0,this.maxWidth);a=t.offset?this.maxWidth/s:f/(s-1),u+6>a&&(a=f/(s-(t.offset?.5:1)),l=this.maxHeight-Ti(t.grid)-e.padding-xa(t.title,this.chart.options.font),c=Math.sqrt(u*u+d*d),o=Os(Math.min(Math.asin(tt((h.highest.height+6)/a,-1,1)),Math.asin(tt(l/c,-1,1))-Math.asin(tt(d/c,-1,1)))),o=Math.max(n,Math.min(r,o))),this.labelRotation=o}afterCalculateLabelRotation(){$(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:r}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){let l=xa(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=Ti(r)+l):(t.height=this.maxHeight,t.width=Ti(r)+l),s.display&&this.ticks.length){let{first:c,last:h,widest:u,highest:d}=this._getLabelSizes(),f=s.padding*2,m=_t(this.labelRotation),g=Math.cos(m),p=Math.sin(m);if(a){let y=s.mirror?0:p*u.width+g*d.height;t.height=Math.min(this.maxHeight,t.height+y+f)}else{let y=s.mirror?0:g*u.width+p*d.height;t.width=Math.min(this.maxWidth,t.width+y+f)}this._calculatePadding(c,h,p,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){let{ticks:{align:r,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1),d=0,f=0;l?c?(d=n*t.width,f=s*e.height):(d=s*t.height,f=n*e.width):r==="start"?f=e.width:r==="end"?d=t.width:r!=="inner"&&(d=t.width/2,f=e.width/2),this.paddingLeft=Math.max((d-h+o)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-u+o)*this.width/(this.width-u),0)}else{let h=e.height/2,u=t.height/2;r==="start"?(h=0,u=t.height):r==="end"&&(h=e.height,u=0),this.paddingTop=h+o,this.paddingBottom=u+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){$(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e({width:r[k]||0,height:o[k]||0});return{first:S(0),last:S(e-1),widest:S(w),highest:S(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return Lo(this._alignToPixels?Jt(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){let e=this.ticks||[];if(t>=0&&ta*n?a/s:l/n:l*n0}_computeGridLineItems(t){let e=this.axis,s=this.chart,n=this.options,{grid:r,position:o}=n,a=r.offset,l=this.isHorizontal(),h=this.ticks.length+(a?1:0),u=Ti(r),d=[],f=r.setContext(this.getContext()),m=f.drawBorder?f.borderWidth:0,g=m/2,p=function(D){return Jt(s,D,m)},y,b,_,w,x,S,k,v,T,C,N,L;if(o==="top")y=p(this.bottom),S=this.bottom-u,v=y-g,C=p(t.top)+g,L=t.bottom;else if(o==="bottom")y=p(this.top),C=t.top,L=p(t.bottom)-g,S=y+g,v=this.top+u;else if(o==="left")y=p(this.right),x=this.right-u,k=y-g,T=p(t.left)+g,N=t.right;else if(o==="right")y=p(this.left),T=t.left,N=p(t.right)-g,x=y+g,k=this.left+u;else if(e==="x"){if(o==="center")y=p((t.top+t.bottom)/2+.5);else if(F(o)){let D=Object.keys(o)[0],J=o[D];y=p(this.chart.scales[D].getPixelForValue(J))}C=t.top,L=t.bottom,S=y+g,v=S+u}else if(e==="y"){if(o==="center")y=p((t.left+t.right)/2);else if(F(o)){let D=Object.keys(o)[0],J=o[D];y=p(this.chart.scales[D].getPixelForValue(J))}x=y-g,k=x-u,T=t.left,N=t.right}let K=E(n.ticks.maxTicksLimit,h),lt=Math.max(1,Math.ceil(h/K));for(b=0;br.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){let e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),r,o,a=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(r=0,o=n.length;r{this.draw(n)}}]:[{z:s,draw:n=>{this.drawBackground(),this.drawGrid(n),this.drawTitle()}},{z:s+1,draw:()=>{this.drawBorder()}},{z:e,draw:n=>{this.drawLabels(n)}}]}getMatchingVisibleMetas(t){let e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[],r,o;for(r=0,o=e.length;r{let s=e.split("."),n=s.pop(),r=[i].concat(s).join("."),o=t[e].split("."),a=o.pop(),l=o.join(".");A.route(r,n,l,a)})}function vu(i){return"id"in i&&"defaults"in i}var pr=class{constructor(){this.controllers=new He(gt,"datasets",!0),this.elements=new He(pt,"elements"),this.plugins=new He(Object,"plugins"),this.scales=new He(be,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{let r=s||this._getRegistryForType(n);s||r.isForType(n)||r===this.plugins&&n.id?this._exec(t,r,n):V(n,o=>{let a=s||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,e,s){let n=vs(t);$(s["before"+n],[],s),e[t](s),$(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;e0&&this.getParsed(e-1);for(let w=e;w0&&Math.abs(S[f]-_[f])>y,p&&(k.parsed=S,k.raw=c.data[w]),d&&(k.options=u||this.resolveDataElementOptions(w,x.active?"active":n)),b||this.updateElement(x,w,k,n),_=S}this.updateSharedOptions(u,n,h)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let a=0;for(let l=e.length-1;l>=0;--l)a=Math.max(a,e[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}let s=t.dataset,n=s.options&&s.options.borderWidth||0;if(!e.length)return n;let r=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,r,o)/2}};Ze.id="scatter";Ze.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};Ze.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(i){return"("+i.label+", "+i.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Ou=Object.freeze({__proto__:null,BarController:Be,BubbleController:$e,DoughnutController:ne,LineController:je,PolarAreaController:Ue,PieController:Ci,RadarController:Ye,ScatterController:Ze});function ye(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var Fi=class{constructor(t){this.options=t||{}}init(t){}formats(){return ye()}parse(t,e){return ye()}format(t,e){return ye()}add(t,e,s){return ye()}diff(t,e,s){return ye()}startOf(t,e,s){return ye()}endOf(t,e){return ye()}};Fi.override=function(i){Object.assign(Fi.prototype,i)};var Or={_date:Fi};function Du(i,t,e,s){let{controller:n,data:r,_sorted:o}=i,a=n._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&o&&r.length){let l=a._reversePixels?Po:Ct;if(s){if(n._sharedOptions){let c=r[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){let u=l(r,t,e-h),d=l(r,t,e+h);return{lo:u.lo,hi:d.hi}}}}else return l(r,t,e)}return{lo:0,hi:r.length-1}}function zi(i,t,e,s,n){let r=i.getSortedVisibleDatasetMetas(),o=e[t];for(let a=0,l=r.length;a{l[o](t[e],n)&&(r.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,n))}),s&&!a?[]:r}var Fu={evaluateInteractionItems:zi,modes:{index(i,t,e,s){let n=ee(t,i),r=e.axis||"x",o=e.includeInvisible||!1,a=e.intersect?lr(i,n,r,s,o):cr(i,n,r,!1,s,o),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{let h=a[0].index,u=c.data[h];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){let n=ee(t,i),r=e.axis||"xy",o=e.includeInvisible||!1,a=e.intersect?lr(i,n,r,s,o):cr(i,n,r,!1,s,o);if(a.length>0){let l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let h=0;he.pos===t)}function wa(i,t){return i.filter(e=>el.indexOf(e.pos)===-1&&e.box.axis===t)}function Oi(i,t){return i.sort((e,s)=>{let n=t?s:e,r=t?e:s;return n.weight===r.weight?n.index-r.index:n.weight-r.weight})}function Au(i){let t=[],e,s,n,r,o,a;for(e=0,s=(i||[]).length;ec.box.fullSize),!0),s=Oi(vi(t,"left"),!0),n=Oi(vi(t,"right")),r=Oi(vi(t,"top"),!0),o=Oi(vi(t,"bottom")),a=wa(t,"x"),l=wa(t,"y");return{fullSize:e,leftAndTop:s.concat(r),rightAndBottom:n.concat(l).concat(o).concat(a),chartArea:vi(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:r.concat(o).concat(a)}}function Sa(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function il(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function Ru(i,t,e,s){let{pos:n,box:r}=e,o=i.maxPadding;if(!F(n)){e.size&&(i[n]-=e.size);let u=s[e.stack]||{size:0,count:1};u.size=Math.max(u.size,e.horizontal?r.height:r.width),e.size=u.size/u.count,i[n]+=e.size}r.getPadding&&il(o,r.getPadding());let a=Math.max(0,t.outerWidth-Sa(o,i,"left","right")),l=Math.max(0,t.outerHeight-Sa(o,i,"top","bottom")),c=a!==i.w,h=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Wu(i){let t=i.maxPadding;function e(s){let n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function zu(i,t){let e=t.maxPadding;function s(n){let r={left:0,top:0,right:0,bottom:0};return n.forEach(o=>{r[o]=Math.max(t[o],e[o])}),r}return s(i?["left","right"]:["top","bottom"])}function Ei(i,t,e,s){let n=[],r,o,a,l,c,h;for(r=0,o=i.length,c=0;r{typeof g.beforeLayout=="function"&&g.beforeLayout()});let h=l.reduce((g,p)=>p.box.options&&p.box.options.display===!1?g:g+1,0)||1,u=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/h,hBoxMaxHeight:o/2}),d=Object.assign({},n);il(d,rt(s));let f=Object.assign({maxPadding:d,w:r,h:o,x:n.left,y:n.top},n),m=Pu(l.concat(c),u);Ei(a.fullSize,f,u,m),Ei(l,f,u,m),Ei(c,f,u,m)&&Ei(l,f,u,m),Wu(f),ka(a.leftAndTop,f,u,m),f.x+=f.w,f.y+=f.h,ka(a.rightAndBottom,f,u,m),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},V(a.chartArea,g=>{let p=g.box;Object.assign(p,i.chartArea),p.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},js=class{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}},yr=class extends js{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},Bs="$chartjs",Vu={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ma=i=>i===null||i==="";function Hu(i,t){let e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[Bs]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Ma(n)){let r=tr(i,"width");r!==void 0&&(i.width=r)}if(Ma(s))if(i.style.height==="")i.height=i.width/(t||2);else{let r=tr(i,"height");r!==void 0&&(i.height=r)}return i}var sl=ia?{passive:!0}:!1;function Bu(i,t,e){i.addEventListener(t,e,sl)}function $u(i,t,e){i.canvas.removeEventListener(t,e,sl)}function ju(i,t){let e=Vu[i.type]||i.type,{x:s,y:n}=ee(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function Us(i,t){for(let e of i)if(e===t||e.contains(t))return!0}function Uu(i,t,e){let s=i.canvas,n=new MutationObserver(r=>{let o=!1;for(let a of r)o=o||Us(a.addedNodes,s),o=o&&!Us(a.removedNodes,s);o&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function Yu(i,t,e){let s=i.canvas,n=new MutationObserver(r=>{let o=!1;for(let a of r)o=o||Us(a.removedNodes,s),o=o&&!Us(a.addedNodes,s);o&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}var Ai=new Map,Ta=0;function nl(){let i=window.devicePixelRatio;i!==Ta&&(Ta=i,Ai.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function Zu(i,t){Ai.size||window.addEventListener("resize",nl),Ai.set(i,t)}function qu(i){Ai.delete(i),Ai.size||window.removeEventListener("resize",nl)}function Gu(i,t,e){let s=i.canvas,n=s&&Ls(s);if(!n)return;let r=Wn((a,l)=>{let c=n.clientWidth;e(a,l),c{let l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||r(c,h)});return o.observe(n),Zu(i,r),o}function hr(i,t,e){e&&e.disconnect(),t==="resize"&&qu(i)}function Xu(i,t,e){let s=i.canvas,n=Wn(r=>{i.ctx!==null&&e(ju(r,i))},i,r=>{let o=r[0];return[o,o.offsetX,o.offsetY]});return Bu(s,t,n),n}var br=class extends js{acquireContext(t,e){let s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(Hu(t,e),s):null}releaseContext(t){let e=t.canvas;if(!e[Bs])return!1;let s=e[Bs].initial;["height","width"].forEach(r=>{let o=s[r];P(o)?e.removeAttribute(r):e.setAttribute(r,o)});let n=s.style||{};return Object.keys(n).forEach(r=>{e.style[r]=n[r]}),e.width=e.width,delete e[Bs],!0}addEventListener(t,e,s){this.removeEventListener(t,e);let n=t.$proxies||(t.$proxies={}),o={attach:Uu,detach:Yu,resize:Gu}[e]||Xu;n[e]=o(t,e,s)}removeEventListener(t,e){let s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:hr,detach:hr,resize:hr}[e]||$u)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return ea(t,e,s,n)}isAttached(t){let e=Ls(t);return!!(e&&e.isConnected)}};function Ku(i){return!Jn()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?yr:br}var xr=class{constructor(){this._init=[]}notify(t,e,s,n){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));let r=n?this._descriptors(t).filter(n):this._descriptors(t),o=this._notify(r,t,e,s);return e==="afterDestroy"&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,s,n){n=n||{};for(let r of t){let o=r.plugin,a=o[s],l=[e,n,r.options];if($(a,l,o)===!1&&n.cancelable)return!1}return!0}invalidate(){P(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){let s=t&&t.config,n=E(s.options&&s.options.plugins,{}),r=Ju(s);return n===!1&&!e?[]:td(t,r,n,e)}_notifyStateChanges(t){let e=this._oldCache||[],s=this._cache,n=(r,o)=>r.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}};function Ju(i){let t={},e=[],s=Object.keys(Pt.plugins.items);for(let r=0;r{let l=s[a];if(!F(l))return console.error(`Invalid scale configuration for scale: ${a}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);let c=wr(a,l),h=sd(c,n),u=e.scales||{};r[c]=r[c]||a,o[a]=Le(Object.create(null),[{axis:c},l,u[c],u[h]])}),i.data.datasets.forEach(a=>{let l=a.type||i.type,c=a.indexAxis||_r(l,t),u=(Kt[l]||{}).scales||{};Object.keys(u).forEach(d=>{let f=id(d,c),m=a[f+"AxisID"]||r[f]||f;o[m]=o[m]||Object.create(null),Le(o[m],[{axis:f},s[m],u[d]])})}),Object.keys(o).forEach(a=>{let l=o[a];Le(l,[A.scales[l.type],A.scale])}),o}function rl(i){let t=i.options||(i.options={});t.plugins=E(t.plugins,{}),t.scales=rd(i,t)}function ol(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function od(i){return i=i||{},i.data=ol(i.data),rl(i),i}var va=new Map,al=new Set;function Ws(i,t){let e=va.get(i);return e||(e=t(),va.set(i,e),al.add(e)),e}var Di=(i,t,e)=>{let s=Vt(t,e);s!==void 0&&i.add(s)},Sr=class{constructor(t){this._config=od(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=ol(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),rl(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ws(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Ws(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Ws(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,s=this.type;return Ws(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let s=this._scopeCache,n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){let{options:n,type:r}=this,o=this._cachedScopes(t,s),a=o.get(e);if(a)return a;let l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(u=>Di(l,t,u))),h.forEach(u=>Di(l,n,u)),h.forEach(u=>Di(l,Kt[r]||{},u)),h.forEach(u=>Di(l,A,u)),h.forEach(u=>Di(l,Is,u))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),al.has(e)&&o.set(e,c),c}chartOptionScopes(){let{options:t,type:e}=this;return[t,Kt[e]||{},A.datasets[e]||{},{type:e},A,Is]}resolveNamedOptions(t,e,s,n=[""]){let r={$shared:!0},{resolver:o,subPrefixes:a}=Oa(this._resolverCache,t,n),l=o;if(ld(o,e)){r.$shared=!1,s=zt(s)?s():s;let c=this.createResolver(t,s,a);l=me(o,s,c)}for(let c of e)r[c]=l[c];return r}createResolver(t,e,s=[""],n){let{resolver:r}=Oa(this._resolverCache,t,s);return F(e)?me(r,e,void 0,n):r}};function Oa(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));let n=e.join(),r=s.get(n);return r||(r={resolver:As(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},s.set(n,r)),r}var ad=i=>F(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||zt(i[e]),!1);function ld(i,t){let{isScriptable:e,isIndexable:s}=qn(i);for(let n of t){let r=e(n),o=s(n),a=(o||r)&&i[n];if(r&&(zt(a)||ad(a))||o&&B(a))return!0}return!1}var cd="3.9.1",hd=["top","bottom","left","right","chartArea"];function Da(i,t){return i==="top"||i==="bottom"||hd.indexOf(i)===-1&&t==="x"}function Ea(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function Ia(i){let t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),$(e&&e.onComplete,[i],t)}function ud(i){let t=i.chart,e=t.options.animation;$(e&&e.onProgress,[i],t)}function ll(i){return Jn()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}var Ys={},cl=i=>{let t=ll(i);return Object.values(Ys).filter(e=>e.canvas===t).pop()};function dd(i,t,e){let s=Object.keys(i);for(let n of s){let r=+n;if(r>=t){let o=i[n];delete i[n],(e>0||r>t)&&(i[r+e]=o)}}}function fd(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}var xe=class{constructor(t,e){let s=this.config=new Sr(e),n=ll(t),r=cl(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");let o=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Ku(n)),this.platform.updateConfig(s);let a=this.platform.acquireContext(n,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Do(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new xr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=zo(u=>this.update(u),o.resizeDelay||0),this._dataChanges=[],Ys[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Bt.listen(this,"complete",Ia),Bt.listen(this,"progress",ud),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:r}=this;return P(t)?e&&r?r:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Qn(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Un(this.canvas,this.ctx),this}stop(){return Bt.stop(this),this}resize(t,e){Bt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let s=this.options,n=this.canvas,r=s.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Qn(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),$(s.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};V(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){let t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((o,a)=>(o[a]=!1,o),{}),r=[];e&&(r=r.concat(Object.keys(e).map(o=>{let a=e[o],l=wr(o,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),V(r,o=>{let a=o.options,l=a.id,c=wr(l,a),h=E(a.type,o.dtype);(a.position===void 0||Da(a.position,c)!==Da(o.dposition))&&(a.position=o.dposition),n[l]=!0;let u=null;if(l in s&&s[l].type===h)u=s[l];else{let d=Pt.getScale(h);u=new d({id:l,type:h,ctx:this.ctx,chart:this}),s[u.id]=u}u.init(a,t)}),V(n,(o,a)=>{o||delete s[a]}),V(s,o=>{ot.configure(this,o,o.options),ot.addBox(this,o)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,r)=>n.index-r.index),s>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(r=>r===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ea("z","_idx"));let{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){V(this.scales,t=>{ot.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!In(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:s,start:n,count:r}of e){let o=s==="_removeElements"?-r:r;dd(t,n,o)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,s=r=>new Set(t.filter(o=>o[0]===r).map((o,a)=>a+","+o.splice(1).join(","))),n=s(0);for(let r=1;rr.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ot.update(this,this.width,this.height,t);let e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],V(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,r)=>{n._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,s=t._clip,n=!s.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(n&&Si(e,{left:s.left===!1?0:r.left-s.left,right:s.right===!1?this.width:r.right+s.right,top:s.top===!1?0:r.top-s.top,bottom:s.bottom===!1?this.height:r.bottom+s.bottom}),t.controller.draw(),n&&ki(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Fe(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){let r=Fu.modes[e];return typeof r=="function"?r(this,t,s,n):[]}getDatasetMeta(t){let e=this.data.datasets[t],s=this._metasets,n=s.filter(r=>r&&r._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=Ht(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){let s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){let n=s?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);dt(e)?(r.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),o.update(r,{visible:s}),this.update(a=>a.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Bt.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,r,o),t[r]=o},n=(r,o,a)=>{r.offsetX=o,r.offsetY=a,this._eventHandler(r)};V(this.options.events,r=>s(r,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},r=(l,c)=>{this.canvas&&this.resize(l,c)},o,a=()=>{n("attach",a),this.attached=!0,this.resize(),s("resize",r),s("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),s("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){V(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},V(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){let n=s?"set":"remove",r,o,a,l;for(e==="dataset"&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),a=0,l=t.length;a{let a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[o],index:o}});!_i(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}_updateHoverStyles(t,e,s){let n=this.options.hover,r=(l,c)=>l.filter(h=>!c.some(u=>h.datasetIndex===u.datasetIndex&&h.index===u.index)),o=r(e,t),a=s?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){let s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;let r=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(r||s.changed)&&this.render(),this}_handleEvent(t,e,s){let{_active:n=[],options:r}=this,o=e,a=this._getActiveElements(t,n,s,o),l=Co(t),c=fd(t,this._lastEvent,s,l);s&&(this._lastEvent=null,$(r.onHover,[t,a,this],this),l&&$(r.onClick,[t,a,this],this));let h=!_i(a,n);return(h||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;let r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,n)}},Ca=()=>V(xe.instances,i=>i._plugins.invalidate()),ie=!0;Object.defineProperties(xe,{defaults:{enumerable:ie,value:A},instances:{enumerable:ie,value:Ys},overrides:{enumerable:ie,value:Kt},registry:{enumerable:ie,value:Pt},version:{enumerable:ie,value:cd},getChart:{enumerable:ie,value:cl},register:{enumerable:ie,value:(...i)=>{Pt.add(...i),Ca()}},unregister:{enumerable:ie,value:(...i)=>{Pt.remove(...i),Ca()}}});function hl(i,t,e){let{startAngle:s,pixelMargin:n,x:r,y:o,outerRadius:a,innerRadius:l}=t,c=n/a;i.beginPath(),i.arc(r,o,a,s-c,e+c),l>n?(c=n/l,i.arc(r,o,l,e+c,s-c,!0)):i.arc(r,o,n,e+U,s-U),i.closePath(),i.clip()}function md(i){return Fs(i,["outerStart","outerEnd","innerStart","innerEnd"])}function gd(i,t,e,s){let n=md(i.options.borderRadius),r=(e-t)/2,o=Math.min(r,s*t/2),a=l=>{let c=(e-Math.min(r,l))*s/2;return tt(l,0,Math.min(r,c))};return{outerStart:a(n.outerStart),outerEnd:a(n.outerEnd),innerStart:tt(n.innerStart,0,o),innerEnd:tt(n.innerEnd,0,o)}}function Ve(i,t,e,s){return{x:e+i*Math.cos(t),y:s+i*Math.sin(t)}}function kr(i,t,e,s,n,r){let{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=t,u=Math.max(t.outerRadius+s+e-c,0),d=h>0?h+s+e+c:0,f=0,m=n-l;if(s){let D=h>0?h-s:0,J=u>0?u-s:0,X=(D+J)/2,de=X!==0?m*X/(X+s):m;f=(m-de)/2}let g=Math.max(.001,m*u-e/j)/u,p=(m-g)/2,y=l+p+f,b=n-p-f,{outerStart:_,outerEnd:w,innerStart:x,innerEnd:S}=gd(t,d,u,b-y),k=u-_,v=u-w,T=y+_/k,C=b-w/v,N=d+x,L=d+S,K=y+x/N,lt=b-S/L;if(i.beginPath(),r){if(i.arc(o,a,u,T,C),w>0){let X=Ve(v,C,o,a);i.arc(X.x,X.y,w,C,b+U)}let D=Ve(L,b,o,a);if(i.lineTo(D.x,D.y),S>0){let X=Ve(L,lt,o,a);i.arc(X.x,X.y,S,b+U,lt+Math.PI)}if(i.arc(o,a,d,b-S/d,y+x/d,!0),x>0){let X=Ve(N,K,o,a);i.arc(X.x,X.y,x,K+Math.PI,y-U)}let J=Ve(k,y,o,a);if(i.lineTo(J.x,J.y),_>0){let X=Ve(k,T,o,a);i.arc(X.x,X.y,_,y-U,T)}}else{i.moveTo(o,a);let D=Math.cos(T)*u+o,J=Math.sin(T)*u+a;i.lineTo(D,J);let X=Math.cos(C)*u+o,de=Math.sin(C)*u+a;i.lineTo(X,de)}i.closePath()}function pd(i,t,e,s,n){let{fullCircles:r,startAngle:o,circumference:a}=t,l=t.endAngle;if(r){kr(i,t,e,s,o+H,n);for(let c=0;c=H||Ne(r,a,l),g=At(o,c+d,h+d);return m&&g}getCenterPoint(t){let{x:e,y:s,startAngle:n,endAngle:r,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:c}=this.options,h=(n+r)/2,u=(o+a+c+l)/2;return{x:e+Math.cos(h)*u,y:s+Math.sin(h)*u}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){let{options:e,circumference:s}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=s>H?Math.floor(s/H):0,s===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let a=0;if(n){a=n/2;let c=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(c)*a,Math.sin(c)*a),this.circumference>=j&&(a=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;let l=pd(t,this,a,r,o);bd(t,this,a,r,l,o),t.restore()}};qe.id="arc";qe.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};qe.defaultRoutes={backgroundColor:"backgroundColor"};function ul(i,t,e=t){i.lineCap=E(e.borderCapStyle,t.borderCapStyle),i.setLineDash(E(e.borderDash,t.borderDash)),i.lineDashOffset=E(e.borderDashOffset,t.borderDashOffset),i.lineJoin=E(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=E(e.borderWidth,t.borderWidth),i.strokeStyle=E(e.borderColor,t.borderColor)}function xd(i,t,e){i.lineTo(e.x,e.y)}function _d(i){return i.stepped?Zo:i.tension||i.cubicInterpolationMode==="monotone"?qo:xd}function dl(i,t,e={}){let s=i.length,{start:n=0,end:r=s-1}=e,{start:o,end:a}=t,l=Math.max(n,o),c=Math.min(r,a),h=na&&r>a;return{count:s,start:l,loop:t.loop,ilen:c(o+(c?a-w:w))%r,_=()=>{g!==p&&(i.lineTo(h,p),i.lineTo(h,g),i.lineTo(h,y))};for(l&&(f=n[b(0)],i.moveTo(f.x,f.y)),d=0;d<=a;++d){if(f=n[b(d)],f.skip)continue;let w=f.x,x=f.y,S=w|0;S===m?(xp&&(p=x),h=(u*h+w)/++u):(_(),i.lineTo(w,x),m=S,u=0,g=p=x),y=x}_()}function Mr(i){let t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Sd:wd}function kd(i){return i.stepped?sa:i.tension||i.cubicInterpolationMode==="monotone"?na:qt}function Md(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),ul(i,t.options),i.stroke(n)}function Td(i,t,e,s){let{segments:n,options:r}=t,o=Mr(t);for(let a of n)ul(i,r,a.style),i.beginPath(),o(i,t,a,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}var vd=typeof Path2D=="function";function Od(i,t,e,s){vd&&!t.options.segment?Md(i,t,e,s):Td(i,t,e,s)}var Nt=class extends pt{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){let s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){let n=s.spanGaps?this._loop:this._fullLoop;ta(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=oa(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){let s=this.options,n=t[e],r=this.points,o=nr(this,{property:e,start:n,end:n});if(!o.length)return;let a=[],l=kd(s),c,h;for(c=0,h=o.length;ci!=="borderDash"&&i!=="fill"};function Fa(i,t,e,s){let n=i.options,{[e]:r}=i.getProps([e],s);return Math.abs(t-r)=e)return i.slice(t,t+e);let o=[],a=(e-2)/(r-2),l=0,c=t+e-1,h=t,u,d,f,m,g;for(o[l++]=i[h],u=0;uf&&(f=m,d=i[b],g=b);o[l++]=d,h=g}return o[l++]=i[c],o}function Pd(i,t,e,s){let n=0,r=0,o,a,l,c,h,u,d,f,m,g,p=[],y=t+e-1,b=i[t].x,w=i[y].x-b;for(o=t;og&&(g=c,d=o),n=(r*n+a.x)/++r;else{let S=o-1;if(!P(u)&&!P(d)){let k=Math.min(u,d),v=Math.max(u,d);k!==f&&k!==S&&p.push({...i[k],x:n}),v!==f&&v!==S&&p.push({...i[v],x:n})}o>0&&S!==f&&p.push(i[S]),p.push(a),h=x,r=0,m=g=c,u=d=f=o}}return p}function ml(i){if(i._decimated){let t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{value:t})}}function Aa(i){i.data.datasets.forEach(t=>{ml(t)})}function Nd(i,t){let e=t.length,s=0,n,{iScale:r}=i,{min:o,max:a,minDefined:l,maxDefined:c}=r.getUserBounds();return l&&(s=tt(Ct(t,r.axis,o).lo,0,e-1)),c?n=tt(Ct(t,r.axis,a).hi+1,s,e)-s:n=e-s,{start:s,count:n}}var Rd={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){Aa(i);return}let s=i.width;i.data.datasets.forEach((n,r)=>{let{_data:o,indexAxis:a}=n,l=i.getDatasetMeta(r),c=o||n.data;if(We([a,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let h=i.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||i.options.parsing)return;let{start:u,count:d}=Nd(l,c),f=e.threshold||4*s;if(d<=f){ml(n);return}P(o)&&(n._data=c,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let m;switch(e.algorithm){case"lttb":m=Ld(c,u,d,s,e);break;case"min-max":m=Pd(c,u,d,s);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=m})},destroy(i){Aa(i)}};function Wd(i,t,e){let s=i.segments,n=i.points,r=t.points,o=[];for(let a of s){let{start:l,end:c}=a;c=Dr(l,c,n);let h=Tr(e,n[l],n[c],a.loop);if(!t.segments){o.push({source:a,target:h,start:n[l],end:n[c]});continue}let u=nr(t,h);for(let d of u){let f=Tr(e,r[d.start],r[d.end],d.loop),m=sr(a,n,f);for(let g of m)o.push({source:g,target:d,start:{[e]:La(h,f,"start",Math.max)},end:{[e]:La(h,f,"end",Math.min)}})}}return o}function Tr(i,t,e,s){if(s)return;let n=t[i],r=e[i];return i==="angle"&&(n=ct(n),r=ct(r)),{property:i,start:n,end:r}}function zd(i,t){let{x:e=null,y:s=null}=i||{},n=t.points,r=[];return t.segments.forEach(({start:o,end:a})=>{a=Dr(o,a,n);let l=n[o],c=n[a];s!==null?(r.push({x:l.x,y:s}),r.push({x:c.x,y:s})):e!==null&&(r.push({x:e,y:l.y}),r.push({x:e,y:c.y}))}),r}function Dr(i,t,e){for(;t>i;t--){let s=e[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function La(i,t,e,s){return i&&t?s(i[e],t[e]):i?i[e]:t?t[e]:0}function gl(i,t){let e=[],s=!1;return B(i)?(s=!0,e=i):e=zd(i,t),e.length?new Nt({points:e,options:{tension:0},_loop:s,_fullLoop:s}):null}function Pa(i){return i&&i.fill!==!1}function Vd(i,t,e){let n=i[t].fill,r=[t],o;if(!e)return n;for(;n!==!1&&r.indexOf(n)===-1;){if(!q(n))return n;if(o=i[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function Hd(i,t,e){let s=Ud(i);if(F(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return q(n)&&Math.floor(n)===n?Bd(s[0],t,n,e):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Bd(i,t,e,s){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=s?!1:e}function $d(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:F(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function jd(i,t,e){let s;return i==="start"?s=e:i==="end"?s=t.options.reverse?t.min:t.max:F(i)?s=i.value:s=t.getBaseValue(),s}function Ud(i){let t=i.options,e=t.fill,s=E(e&&e.target,e);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function Yd(i){let{scale:t,index:e,line:s}=i,n=[],r=s.segments,o=s.points,a=Zd(t,e);a.push(gl({x:null,y:t.bottom},s));for(let l=0;l=0;--o){let a=n[o].$filler;a&&(a.line.updateControlPoints(r,a.axis),s&&a.fill&&fr(i.ctx,a,r))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;let s=i.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){let r=s[n].$filler;Pa(r)&&fr(i.ctx,r,i.chartArea)}},beforeDatasetDraw(i,t,e){let s=t.meta.$filler;!Pa(s)||e.drawTime!=="beforeDatasetDraw"||fr(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},za=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},rf=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index,qs=class extends pt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let t=this.options.labels||{},e=$(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}let s=t.labels,n=Q(s.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=za(s,r),c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(o,r,a,l)+10):(h=this.maxHeight,c=this._fitCols(o,r,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){let{ctx:r,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+a,u=t;r.textAlign="left",r.textBaseline="middle";let d=-1,f=-h;return this.legendItems.forEach((m,g)=>{let p=s+e/2+r.measureText(m.text).width;(g===0||c[c.length-1]+p+2*a>o)&&(u+=h,c[c.length-(g>0?0:1)]=0,f+=h,d++),l[g]={left:0,top:f,row:d,width:p,height:n},c[c.length-1]+=p+a}),u}_fitCols(t,e,s,n){let{ctx:r,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=o-t,u=a,d=0,f=0,m=0,g=0;return this.legendItems.forEach((p,y)=>{let b=s+e/2+r.measureText(p.text).width;y>0&&f+n+2*a>h&&(u+=d+a,c.push({width:d,height:f}),m+=d+a,g++,d=f=0),l[y]={left:m,top:f,col:g,width:b,height:n},d=Math.max(d,b),f+=n+a}),u+=d,c.push({width:d,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:r}}=this,o=pe(r,this.left,this.width);if(this.isHorizontal()){let a=0,l=nt(s,this.left+n,this.right-this.lineWidths[a]);for(let c of e)a!==c.row&&(a=c.row,l=nt(s,this.left+n,this.right-this.lineWidths[a])),c.top+=this.top+t+n,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+n}else{let a=0,l=nt(s,this.top+t+n,this.bottom-this.columnSizes[a].height);for(let c of e)c.col!==a&&(a=c.col,l=nt(s,this.top+t+n,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+n,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;Si(t,this),this._draw(),ki(t)}}_draw(){let{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:r,labels:o}=t,a=A.color,l=pe(t.rtl,this.left,this.width),c=Q(o.font),{color:h,padding:u}=o,d=c.size,f=d/2,m;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;let{boxWidth:g,boxHeight:p,itemHeight:y}=za(o,d),b=function(k,v,T){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;n.save();let C=E(T.lineWidth,1);if(n.fillStyle=E(T.fillStyle,a),n.lineCap=E(T.lineCap,"butt"),n.lineDashOffset=E(T.lineDashOffset,0),n.lineJoin=E(T.lineJoin,"miter"),n.lineWidth=C,n.strokeStyle=E(T.strokeStyle,a),n.setLineDash(E(T.lineDash,[])),o.usePointStyle){let N={radius:p*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:C},L=l.xPlus(k,g/2),K=v+f;Yn(n,N,L,K,o.pointStyleWidth&&g)}else{let N=v+Math.max((d-p)/2,0),L=l.leftForLtr(k,g),K=te(T.borderRadius);n.beginPath(),Object.values(K).some(lt=>lt!==0)?Re(n,{x:L,y:N,w:g,h:p,radius:K}):n.rect(L,N,g,p),n.fill(),C!==0&&n.stroke()}n.restore()},_=function(k,v,T){Qt(n,T.text,k,v+y/2,c,{strikethrough:T.hidden,textAlign:l.textAlign(T.textAlign)})},w=this.isHorizontal(),x=this._computeTitleHeight();w?m={x:nt(r,this.left+u,this.right-s[0]),y:this.top+u+x,line:0}:m={x:this.left+u,y:nt(r,this.top+x+u,this.bottom-e[0].height),line:0},er(this.ctx,t.textDirection);let S=y+u;this.legendItems.forEach((k,v)=>{n.strokeStyle=k.fontColor||h,n.fillStyle=k.fontColor||h;let T=n.measureText(k.text).width,C=l.textAlign(k.textAlign||(k.textAlign=o.textAlign)),N=g+f+T,L=m.x,K=m.y;l.setWidth(this.width),w?v>0&&L+N+u>this.right&&(K=m.y+=S,m.line++,L=m.x=nt(r,this.left+u,this.right-s[m.line])):v>0&&K+S>this.bottom&&(L=m.x=L+e[m.line].width+u,m.line++,K=m.y=nt(r,this.top+x+u,this.bottom-e[m.line].height));let lt=l.x(L);b(lt,K,k),L=Vo(C,L+g+f,w?L+N:this.right,t.rtl),_(l.x(L),K,k),w?m.x+=N+u:m.y+=S}),ir(this.ctx,t.textDirection)}drawTitle(){let t=this.options,e=t.title,s=Q(e.font),n=rt(e.padding);if(!e.display)return;let r=pe(t.rtl,this.left,this.width),o=this.ctx,a=e.position,l=s.size/2,c=n.top+l,h,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+c,u=nt(t.align,u,this.right-d);else{let m=this.columnSizes.reduce((g,p)=>Math.max(g,p.height),0);h=c+nt(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}let f=nt(a,u,u+d);o.textAlign=r.textAlign(Es(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=s.string,Qt(o,e.text,f,h,s)}_computeTitleHeight(){let t=this.options.title,e=Q(t.font),s=rt(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,r;if(At(t,this.left,this.right)&&At(e,this.top,this.bottom)){for(r=this.legendHitBoxes,s=0;si.chart.options.color,boxWidth:40,padding:10,generateLabels(i){let t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:r}}=i.legend.options;return i._getSortedDatasetMetas().map(o=>{let a=o.controller.getStyle(e?0:void 0),l=rt(a.borderWidth);return{text:t[o.index].label,fillStyle:a.backgroundColor,fontColor:r,hidden:!o.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:a.borderColor,pointStyle:s||a.pointStyle,rotation:a.rotation,textAlign:n||a.textAlign,borderRadius:0,datasetIndex:o.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}},Li=class extends pt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){let s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;let n=B(s.text)?s.text.length:1;this._padding=rt(s.padding);let r=n*Q(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:e,left:s,bottom:n,right:r,options:o}=this,a=o.align,l=0,c,h,u;return this.isHorizontal()?(h=nt(a,s,r),u=e+t,c=r-s):(o.position==="left"?(h=s+t,u=nt(a,n,e),l=j*-.5):(h=r-t,u=nt(a,e,n),l=j*.5),c=n-e),{titleX:h,titleY:u,maxWidth:c,rotation:l}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let s=Q(e.font),r=s.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(r);Qt(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:Es(e.align),textBaseline:"middle",translation:[o,a]})}};function lf(i,t){let e=new Li({ctx:i.ctx,options:t,chart:i});ot.configure(i,e,t),ot.addBox(i,e),i.titleBlock=e}var cf={id:"title",_element:Li,start(i,t,e){lf(i,e)},stop(i){let t=i.titleBlock;ot.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){let s=i.titleBlock;ot.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},zs=new WeakMap,hf={id:"subtitle",start(i,t,e){let s=new Li({ctx:i.ctx,options:e,chart:i});ot.configure(i,s,e),ot.addBox(i,s),zs.set(i,s)},stop(i){ot.removeBox(i,zs.get(i)),zs.delete(i)},beforeUpdate(i,t,e){let s=zs.get(i);ot.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Ii={average(i){if(!i.length)return!1;let t,e,s=0,n=0,r=0;for(t=0,e=i.length;t-1?i.split(` +`):i}function uf(i,t){let{element:e,datasetIndex:s,index:n}=t,r=i.getDatasetMeta(s).controller,{label:o,value:a}=r.getLabelAndValue(n);return{chart:i,label:o,parsed:r.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:a,dataset:r.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function Va(i,t){let e=i.chart.ctx,{body:s,footer:n,title:r}=i,{boxWidth:o,boxHeight:a}=t,l=Q(t.bodyFont),c=Q(t.titleFont),h=Q(t.footerFont),u=r.length,d=n.length,f=s.length,m=rt(t.padding),g=m.height,p=0,y=s.reduce((w,x)=>w+x.before.length+x.lines.length+x.after.length,0);if(y+=i.beforeBody.length+i.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),y){let w=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=f*w+(y-f)*l.lineHeight+(y-1)*t.bodySpacing}d&&(g+=t.footerMarginTop+d*h.lineHeight+(d-1)*t.footerSpacing);let b=0,_=function(w){p=Math.max(p,e.measureText(w).width+b)};return e.save(),e.font=c.string,V(i.title,_),e.font=l.string,V(i.beforeBody.concat(i.afterBody),_),b=t.displayColors?o+2+t.boxPadding:0,V(s,w=>{V(w.before,_),V(w.lines,_),V(w.after,_)}),b=0,e.font=h.string,V(i.footer,_),e.restore(),p+=m.width,{width:p,height:g}}function df(i,t){let{y:e,height:s}=t;return ei.height-s/2?"bottom":"center"}function ff(i,t,e,s){let{x:n,width:r}=s,o=e.caretSize+e.caretPadding;if(i==="left"&&n+r+o>t.width||i==="right"&&n-r-o<0)return!0}function mf(i,t,e,s){let{x:n,width:r}=e,{width:o,chartArea:{left:a,right:l}}=i,c="center";return s==="center"?c=n<=(a+l)/2?"left":"right":n<=r/2?c="left":n>=o-r/2&&(c="right"),ff(c,i,t,e)&&(c="center"),c}function Ha(i,t,e){let s=e.yAlign||t.yAlign||df(i,e);return{xAlign:e.xAlign||t.xAlign||mf(i,t,e,s),yAlign:s}}function gf(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function pf(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function Ba(i,t,e,s){let{caretSize:n,caretPadding:r,cornerRadius:o}=i,{xAlign:a,yAlign:l}=e,c=n+r,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=te(o),m=gf(t,a),g=pf(t,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(h,d)+n:a==="right"&&(m+=Math.max(u,f)+n),{x:tt(m,0,s.width-t.width),y:tt(g,0,s.height-t.height)}}function Vs(i,t,e){let s=rt(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function $a(i){return Lt([],$t(i))}function yf(i,t,e){return Ht(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function ja(i,t){let e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}var Pi=class extends pt{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,r=new $s(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=yf(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:s}=e,n=s.beforeTitle.apply(this,[t]),r=s.title.apply(this,[t]),o=s.afterTitle.apply(this,[t]),a=[];return a=Lt(a,$t(n)),a=Lt(a,$t(r)),a=Lt(a,$t(o)),a}getBeforeBody(t,e){return $a(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){let{callbacks:s}=e,n=[];return V(t,r=>{let o={before:[],lines:[],after:[]},a=ja(s,r);Lt(o.before,$t(a.beforeLabel.call(this,r))),Lt(o.lines,a.label.call(this,r)),Lt(o.after,$t(a.afterLabel.call(this,r))),n.push(o)}),n}getAfterBody(t,e){return $a(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){let{callbacks:s}=e,n=s.beforeFooter.apply(this,[t]),r=s.footer.apply(this,[t]),o=s.afterFooter.apply(this,[t]),a=[];return a=Lt(a,$t(n)),a=Lt(a,$t(r)),a=Lt(a,$t(o)),a}_createItems(t){let e=this._active,s=this.chart.data,n=[],r=[],o=[],a=[],l,c;for(l=0,c=e.length;lt.filter(h,u,d,s))),t.itemSort&&(a=a.sort((h,u)=>t.itemSort(h,u,s))),V(a,h=>{let u=ja(t.callbacks,h);n.push(u.labelColor.call(this,h)),r.push(u.labelPointStyle.call(this,h)),o.push(u.labelTextColor.call(this,h))}),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=a,a}update(t,e){let s=this.options.setContext(this.getContext()),n=this._active,r,o=[];if(!n.length)this.opacity!==0&&(r={opacity:0});else{let a=Ii[s.position].call(this,n,this._eventPosition);o=this._createItems(s),this.title=this.getTitle(o,s),this.beforeBody=this.getBeforeBody(o,s),this.body=this.getBody(o,s),this.afterBody=this.getAfterBody(o,s),this.footer=this.getFooter(o,s);let l=this._size=Va(this,s),c=Object.assign({},a,l),h=Ha(this.chart,s,c),u=Ba(s,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,r={opacity:1,x:u.x,y:u.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){let r=this.getCaretPosition(t,s,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,s){let{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:a}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:u}=te(a),{x:d,y:f}=t,{width:m,height:g}=e,p,y,b,_,w,x;return r==="center"?(w=f+g/2,n==="left"?(p=d,y=p-o,_=w+o,x=w-o):(p=d+m,y=p+o,_=w-o,x=w+o),b=p):(n==="left"?y=d+Math.max(l,h)+o:n==="right"?y=d+m-Math.max(c,u)-o:y=this.caretX,r==="top"?(_=f,w=_-o,p=y-o,b=y+o):(_=f+g,w=_+o,p=y+o,b=y-o),x=_),{x1:p,x2:y,x3:b,y1:_,y2:w,y3:x}}drawTitle(t,e,s){let n=this.title,r=n.length,o,a,l;if(r){let c=pe(s.rtl,this.x,this.width);for(t.x=Vs(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",o=Q(s.titleFont),a=s.titleSpacing,e.fillStyle=s.titleColor,e.font=o.string,l=0;l_!==0)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,Re(t,{x:p,y:g,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Re(t,{x:y,y:g+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(p,g,c,l),t.strokeRect(p,g,c,l),t.fillStyle=o.backgroundColor,t.fillRect(y,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){let{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:h}=s,u=Q(s.bodyFont),d=u.lineHeight,f=0,m=pe(s.rtl,this.x,this.width),g=function(v){e.fillText(v,m.x(t.x+f),t.y+d/2),t.y+=d+r},p=m.textAlign(o),y,b,_,w,x,S,k;for(e.textAlign=o,e.textBaseline="middle",e.font=u.string,t.x=Vs(this,p,s),e.fillStyle=s.bodyColor,V(this.beforeBody,g),f=a&&p!=="right"?o==="center"?c/2+h:c+2+h:0,w=0,S=n.length;w0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,s=this.$animations,n=s&&s.x,r=s&&s.y;if(n||r){let o=Ii[t.position].call(this,this._active,this._eventPosition);if(!o)return;let a=this._size=Va(this,t),l=Object.assign({},o,this._size),c=Ha(e,t,l),h=Ba(t,l,c,e);(n._to!==h.x||r._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),s=this.opacity;if(!s)return;this._updateAnimationTarget(e);let n={width:this.width,height:this.height},r={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;let o=rt(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=s,this.drawBackground(r,t,n,e),er(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),ir(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let s=this._active,n=t.map(({datasetIndex:a,index:l})=>{let c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),r=!_i(s,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let n=this.options,r=this._active||[],o=this._getActiveElements(t,r,e,s),a=this._positionChanged(o,t),l=e||!_i(o,r)||a;return l&&(this._active=o,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){let r=this.options;if(t.type==="mouseout")return[];if(!n)return e;let o=this.chart.getElementsAtEventForMode(t,r.mode,r,s);return r.reverse&&o.reverse(),o}_positionChanged(t,e){let{caretX:s,caretY:n,options:r}=this,o=Ii[r.position].call(this,t,e);return o!==!1&&(s!==o.x||n!==o.y)}};Pi.positioners=Ii;var bf={id:"tooltip",_element:Pi,positioners:Ii,afterInit(i,t,e){e&&(i.tooltip=new Pi({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){let t=i.tooltip;if(t&&t._willRender()){let e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",e)===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){let e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:Ft,title(i){if(i.length>0){let t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndexi!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},xf=Object.freeze({__proto__:null,Decimation:Rd,Filler:nf,Legend:af,SubTitle:hf,Title:cf,Tooltip:bf}),_f=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function wf(i,t,e,s){let n=i.indexOf(t);if(n===-1)return _f(i,t,e,s);let r=i.lastIndexOf(t);return n!==r?e:n}var Sf=(i,t)=>i===null?null:tt(Math.round(i),0,t),Ke=class extends be{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let s=this.getLabels();for(let{index:n,label:r}of e)s[n]===r&&s.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(P(t))return null;let s=this.getLabels();return e=isFinite(e)&&s[e]===t?e:wf(s,t,E(e,t),this._addedLabels),Sf(e,s.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:s,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),e||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){let t=this.min,e=this.max,s=this.options.offset,n=[],r=this.getLabels();r=t===0&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let o=t;o<=e;o++)n.push({value:o});return n}getLabelForValue(t){let e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}};Ke.id="category";Ke.defaults={ticks:{callback:Ke.prototype.getLabelForValue}};function kf(i,t){let e=[],{bounds:n,step:r,min:o,max:a,precision:l,count:c,maxTicks:h,maxDigits:u,includeBounds:d}=i,f=r||1,m=h-1,{min:g,max:p}=t,y=!P(o),b=!P(a),_=!P(c),w=(p-g)/(u+1),x=Cn((p-g)/m/f)*f,S,k,v,T;if(x<1e-14&&!y&&!b)return[{value:g},{value:p}];T=Math.ceil(p/x)-Math.floor(g/x),T>m&&(x=Cn(T*x/m/f)*f),P(l)||(S=Math.pow(10,l),x=Math.ceil(x*S)/S),n==="ticks"?(k=Math.floor(g/x)*x,v=Math.ceil(p/x)*x):(k=g,v=p),y&&b&&r&&Ao((a-o)/r,x/1e3)?(T=Math.round(Math.min((a-o)/x,h)),x=(a-o)/T,k=o,v=a):_?(k=y?o:k,v=b?a:v,T=c-1,x=(v-k)/T):(T=(v-k)/x,Pe(T,Math.round(T),x/1e3)?T=Math.round(T):T=Math.ceil(T));let C=Math.max(An(x),An(k));S=Math.pow(10,P(l)?C:l),k=Math.round(k*S)/S,v=Math.round(v*S)/S;let N=0;for(y&&(d&&k!==o?(e.push({value:o}),kn=e?n:l,a=l=>r=s?r:l;if(t){let l=Mt(n),c=Mt(r);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(n===r){let l=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(r*.05)),a(r+l),t||o(n-l)}this.min=n,this.max=r}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,s=this.getTickLimit();s=Math.max(2,s);let n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},r=this._range||this,o=kf(n,r);return t.bounds==="ticks"&&Fn(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){let t=this.ticks,e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){let n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return ze(t,this.chart.options.locale,this.options.ticks.format)}},Ni=class extends Je{determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=q(t)?t:0,this.max=q(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,s=_t(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}};Ni.id="linear";Ni.defaults={ticks:{callback:Gs.formatters.numeric}};function Ya(i){return i/Math.pow(10,Math.floor(mt(i)))===1}function Mf(i,t){let e=Math.floor(mt(t.max)),s=Math.ceil(t.max/Math.pow(10,e)),n=[],r=ft(i.min,Math.pow(10,Math.floor(mt(t.min)))),o=Math.floor(mt(r)),a=Math.floor(r/Math.pow(10,o)),l=o<0?Math.pow(10,Math.abs(o)):1;do n.push({value:r,major:Ya(r)}),++a,a===10&&(a=1,++o,l=o>=0?1:l),r=Math.round(a*Math.pow(10,o)*l)/l;while(o0?s:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=q(t)?Math.max(0,t):null,this.max=q(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),s=this.min,n=this.max,r=l=>s=t?s:l,o=l=>n=e?n:l,a=(l,c)=>Math.pow(10,Math.floor(mt(l))+c);s===n&&(s<=0?(r(1),o(10)):(r(a(s,-1)),o(a(n,1)))),s<=0&&r(a(n,-1)),n<=0&&o(a(s,1)),this._zero&&this.min!==this._suggestedMin&&s===a(this.min,0)&&r(a(s,-1)),this.min=s,this.max=n}buildTicks(){let t=this.options,e={min:this._userMin,max:this._userMax},s=Mf(e,this);return t.bounds==="ticks"&&Fn(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?"0":ze(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=mt(t),this._valueRange=mt(this.max)-mt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(mt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}};Ri.id="logarithmic";Ri.defaults={ticks:{callback:Gs.formatters.logarithmic,major:{enabled:!0}}};function vr(i){let t=i.ticks;if(t.display&&i.display){let e=rt(t.backdropPadding);return E(t.font&&t.font.size,A.font.size)+e.height}return 0}function Tf(i,t,e){return e=B(e)?e:[e],{w:Yo(i,t.string,e),h:e.length*t.lineHeight}}function Za(i,t,e,s,n){return i===s||i===n?{start:t-e/2,end:t+e/2}:in?{start:t-e,end:t}:{start:t,end:t+e}}function vf(i){let t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),s=[],n=[],r=i._pointLabels.length,o=i.options.pointLabels,a=o.centerPointLabels?j/r:0;for(let l=0;lt.r&&(a=(s.end-t.r)/r,i.r=Math.max(i.r,t.r+a)),n.startt.b&&(l=(n.end-t.b)/o,i.b=Math.max(i.b,t.b+l))}function Df(i,t,e){let s=[],n=i._pointLabels.length,r=i.options,o=vr(r)/2,a=i.drawingArea,l=r.pointLabels.centerPointLabels?j/n:0;for(let c=0;c270||e<90)&&(i-=t),i}function Ff(i,t){let{ctx:e,options:{pointLabels:s}}=i;for(let n=t-1;n>=0;n--){let r=s.setContext(i.getPointLabelContext(n)),o=Q(r.font),{x:a,y:l,textAlign:c,left:h,top:u,right:d,bottom:f}=i._pointLabelItems[n],{backdropColor:m}=r;if(!P(m)){let g=te(r.borderRadius),p=rt(r.backdropPadding);e.fillStyle=m;let y=h-p.left,b=u-p.top,_=d-h+p.width,w=f-u+p.height;Object.values(g).some(x=>x!==0)?(e.beginPath(),Re(e,{x:y,y:b,w:_,h:w,radius:g}),e.fill()):e.fillRect(y,b,_,w)}Qt(e,i._pointLabels[n],a,l+o.lineHeight/2,o,{color:r.color,textAlign:c,textBaseline:"middle"})}}function pl(i,t,e,s){let{ctx:n}=i;if(e)n.arc(i.xCenter,i.yCenter,t,0,H);else{let r=i.getPointPosition(0,t);n.moveTo(r.x,r.y);for(let o=1;o{let n=$(this.options.pointLabels.callback,[e,s],this);return n||n===0?n:""}).filter((e,s)=>this.chart.getDataVisibility(s))}fit(){let t=this.options;t.display&&t.pointLabels.display?vf(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,s,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,s,n))}getIndexAngle(t){let e=H/(this._pointLabels.length||1),s=this.options.startAngle||0;return ct(t*e+_t(s))}getDistanceFromCenterForValue(t){if(P(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(P(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t{if(h!==0){a=this.getDistanceFromCenterForValue(c.value);let u=n.setContext(this.getContext(h-1));Af(this,u,a,r)}}),s.display){for(t.save(),o=r-1;o>=0;o--){let c=s.setContext(this.getPointLabelContext(o)),{color:h,lineWidth:u}=c;!u||!h||(t.lineWidth=u,t.strokeStyle=h,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,a=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(o,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){let t=this.ctx,e=this.options,s=e.ticks;if(!s.display)return;let n=this.getIndexAngle(0),r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!e.reverse)return;let c=s.setContext(this.getContext(l)),h=Q(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,o=t.measureText(a.label).width,t.fillStyle=c.backdropColor;let u=rt(c.backdropPadding);t.fillRect(-o/2-u.left,-r-h.size/2-u.top,o+u.width,h.size+u.height)}Qt(t,a.label,0,-r,h,{color:c.color})}),t.restore()}drawTitle(){}};_e.id="radialLinear";_e.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Gs.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(i){return i},padding:5,centerPointLabels:!1}};_e.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};_e.descriptors={angleLines:{_fallback:"grid"}};var Xs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ht=Object.keys(Xs);function Pf(i,t){return i-t}function qa(i,t){if(P(t))return null;let e=i._adapter,{parser:s,round:n,isoWeekday:r}=i._parseOpts,o=t;return typeof s=="function"&&(o=s(o)),q(o)||(o=typeof s=="string"?e.parse(o,s):e.parse(o)),o===null?null:(n&&(o=n==="week"&&(ge(r)||r===!0)?e.startOf(o,"isoWeek",r):e.startOf(o,n)),+o)}function Ga(i,t,e,s){let n=ht.length;for(let r=ht.indexOf(i);r=ht.indexOf(e);r--){let o=ht[r];if(Xs[o].common&&i._adapter.diff(n,s,o)>=t-1)return o}return ht[e?ht.indexOf(e):0]}function Rf(i){for(let t=ht.indexOf(i)+1,e=ht.length;t=t?e[s]:e[n];i[r]=!0}}function Wf(i,t,e,s){let n=i._adapter,r=+n.startOf(t[0].value,s),o=t[t.length-1].value,a,l;for(a=r;a<=o;a=+n.add(a,1,s))l=e[a],l>=0&&(t[l].major=!0);return t}function Ka(i,t,e){let s=[],n={},r=t.length,o,a;for(o=0;o+t.value))}initOffsets(t){let e=0,s=0,n,r;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,r=this.getDecimalForValue(t[t.length-1]),t.length===1?s=r:s=(r-this.getDecimalForValue(t[t.length-2]))/2);let o=t.length<3?.5:.25;e=tt(e,0,o),s=tt(s,0,o),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){let t=this._adapter,e=this.min,s=this.max,n=this.options,r=n.time,o=r.unit||Ga(r.minUnit,e,s,this._getLabelCapacity(e)),a=E(r.stepSize,1),l=o==="week"?r.isoWeekday:!1,c=ge(l)||l===!0,h={},u=e,d,f;if(c&&(u=+t.startOf(u,"isoWeek",l)),u=+t.startOf(u,c?"day":o),t.diff(s,e,o)>1e5*a)throw new Error(e+" and "+s+" are too far apart with stepSize of "+a+" "+o);let m=n.ticks.source==="data"&&this.getDataTimestamps();for(d=u,f=0;dg-p).map(g=>+g)}getLabelForValue(t){let e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}_tickFormatFunction(t,e,s,n){let r=this.options,o=r.time.displayFormats,a=this._unit,l=this._majorUnit,c=a&&o[a],h=l&&o[l],u=s[e],d=l&&h&&u&&u.major,f=this._adapter.format(t,n||(d?h:c)),m=r.ticks.callback;return m?$(m,[f,e,s],this):f}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;let n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=Ct(i,"pos",t)),{pos:r,time:a}=i[s],{pos:o,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=Ct(i,"time",t)),{time:r,pos:a}=i[s],{time:o,pos:l}=i[n]);let c=o-r;return c?a+(l-a)*(t-r)/c:a}var Wi=class extends we{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Hs(e,this.min),this._tableRange=Hs(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:e,max:s}=this,n=[],r=[],o,a,l,c,h;for(o=0,a=t.length;o=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(o=0,a=n.length;o=0?m:1e3+m,(d-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}};var bl={};function jf(i,t={}){let e=JSON.stringify([i,t]),s=bl[e];return s||(s=new Intl.ListFormat(i,t),bl[e]=s),s}var Fr={};function Ar(i,t={}){let e=JSON.stringify([i,t]),s=Fr[e];return s||(s=new Intl.DateTimeFormat(i,t),Fr[e]=s),s}var Lr={};function Uf(i,t={}){let e=JSON.stringify([i,t]),s=Lr[e];return s||(s=new Intl.NumberFormat(i,t),Lr[e]=s),s}var Pr={};function Yf(i,t={}){let{base:e,...s}=t,n=JSON.stringify([i,s]),r=Pr[n];return r||(r=new Intl.RelativeTimeFormat(i,t),Pr[n]=r),r}var rs=null;function Zf(){return rs||(rs=new Intl.DateTimeFormat().resolvedOptions().locale,rs)}var xl={};function qf(i){let t=xl[i];if(!t){let e=new Intl.Locale(i);t="getWeekInfo"in e?e.getWeekInfo():e.weekInfo,xl[i]=t}return t}function Gf(i){let t=i.indexOf("-x-");t!==-1&&(i=i.substring(0,t));let e=i.indexOf("-u-");if(e===-1)return[i];{let s,n;try{s=Ar(i).resolvedOptions(),n=i}catch{let l=i.substring(0,e);s=Ar(l).resolvedOptions(),n=l}let{numberingSystem:r,calendar:o}=s;return[n,r,o]}}function Xf(i,t,e){return(e||t)&&(i.includes("-u-")||(i+="-u"),e&&(i+=`-ca-${e}`),t&&(i+=`-nu-${t}`)),i}function Kf(i){let t=[];for(let e=1;e<=12;e++){let s=I.utc(2009,e,1);t.push(i(s))}return t}function Jf(i){let t=[];for(let e=1;e<=7;e++){let s=I.utc(2016,11,13+e);t.push(i(s))}return t}function rn(i,t,e,s){let n=i.listingMode();return n==="error"?null:n==="en"?e(t):s(t)}function Qf(i){return i.numberingSystem&&i.numberingSystem!=="latn"?!1:i.numberingSystem==="latn"||!i.locale||i.locale.startsWith("en")||new Intl.DateTimeFormat(i.intl).resolvedOptions().numberingSystem==="latn"}var Nr=class{constructor(t,e,s){this.padTo=s.padTo||0,this.floor=s.floor||!1;let{padTo:n,floor:r,...o}=s;if(!e||Object.keys(o).length>0){let a={useGrouping:!1,...s};s.padTo>0&&(a.minimumIntegerDigits=s.padTo),this.inf=Uf(t,a)}}format(t){if(this.inf){let e=this.floor?Math.floor(t):t;return this.inf.format(e)}else{let e=this.floor?Math.floor(t):ei(t,3);return Y(e,this.padTo)}}},Rr=class{constructor(t,e,s){this.opts=s,this.originalZone=void 0;let n;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){let o=-1*(t.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;t.offset!==0&&at.create(a).valid?(n=a,this.dt=t):(n="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,n=t.zone.name):(n="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);let r={...this.opts};r.timeZone=r.timeZone||n,this.dtf=Ar(e,r)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(e=>{if(e.type==="timeZoneName"){let s=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:s}}else return e}):t}resolvedOptions(){return this.dtf.resolvedOptions()}},Wr=class{constructor(t,e,s){this.opts={style:"long",...s},!e&&on()&&(this.rtf=Yf(t,s))}format(t,e){return this.rtf?this.rtf.format(t,e):_l(e,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}},tm={firstDay:1,minimalDays:4,weekend:[6,7]},W=class i{static fromOpts(t){return i.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,e,s,n,r=!1){let o=t||R.defaultLocale,a=o||(r?"en-US":Zf()),l=e||R.defaultNumberingSystem,c=s||R.defaultOutputCalendar,h=os(n)||R.defaultWeekSettings;return new i(a,l,c,h,o)}static resetCache(){rs=null,Fr={},Lr={},Pr={}}static fromObject({locale:t,numberingSystem:e,outputCalendar:s,weekSettings:n}={}){return i.create(t,e,s,n)}constructor(t,e,s,n,r){let[o,a,l]=Gf(t);this.locale=o,this.numberingSystem=e||a||null,this.outputCalendar=s||l||null,this.weekSettings=n,this.intl=Xf(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Qf(this)),this.fastNumbersCached}listingMode(){let t=this.isEnglish(),e=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&e?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:i.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,os(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1){return rn(this,t,zr,()=>{let s=e?{month:t,day:"numeric"}:{month:t},n=e?"format":"standalone";return this.monthsCache[n][t]||(this.monthsCache[n][t]=Kf(r=>this.extract(r,s,"month"))),this.monthsCache[n][t]})}weekdays(t,e=!1){return rn(this,t,Vr,()=>{let s=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},n=e?"format":"standalone";return this.weekdaysCache[n][t]||(this.weekdaysCache[n][t]=Jf(r=>this.extract(r,s,"weekday"))),this.weekdaysCache[n][t]})}meridiems(){return rn(this,void 0,()=>Hr,()=>{if(!this.meridiemCache){let t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[I.utc(2016,11,13,9),I.utc(2016,11,13,19)].map(e=>this.extract(e,t,"dayperiod"))}return this.meridiemCache})}eras(t){return rn(this,t,Br,()=>{let e={era:t};return this.eraCache[t]||(this.eraCache[t]=[I.utc(-40,1,1),I.utc(2017,1,1)].map(s=>this.extract(s,e,"era"))),this.eraCache[t]})}extract(t,e,s){let n=this.dtFormatter(t,e),r=n.formatToParts(),o=r.find(a=>a.type.toLowerCase()===s);return o?o.value:null}numberFormatter(t={}){return new Nr(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new Rr(t,this.intl,e)}relFormatter(t={}){return new Wr(this.intl,this.isEnglish(),t)}listFormatter(t={}){return jf(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:an()?qf(this.locale):tm}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}};var jr=null,et=class i extends ut{static get utcInstance(){return jr===null&&(jr=new i(0)),jr}static instance(t){return t===0?i.utcInstance:new i(t)}static parseSpecifier(t){if(t){let e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new i(Se(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ae(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ae(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return ae(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}};var ii=class extends ut{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function Dt(i,t){let e;if(O(i)||i===null)return t;if(i instanceof ut)return i;if(wl(i)){let s=i.toLowerCase();return s==="default"?t:s==="local"||s==="system"?oe.instance:s==="utc"||s==="gmt"?et.utcInstance:et.parseSpecifier(s)||at.create(i)}else return Et(i)?et.instance(i):typeof i=="object"&&"offset"in i&&typeof i.offset=="function"?i:new ii(i)}var Ur={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},Sl={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},em=Ur.hanidec.replace(/[\[|\]]/g,"").split("");function kl(i){let t=parseInt(i,10);if(isNaN(t)){t="";for(let e=0;e=r&&s<=o&&(t+=s-r)}}return parseInt(t,10)}else return t}var si={};function Ml(){si={}}function wt({numberingSystem:i},t=""){let e=i||"latn";return si[e]||(si[e]={}),si[e][t]||(si[e][t]=new RegExp(`${Ur[e]}${t}`)),si[e][t]}var Tl=()=>Date.now(),vl="system",Ol=null,Dl=null,El=null,Il=60,Cl,Fl=null,R=class{static get now(){return Tl}static set now(t){Tl=t}static set defaultZone(t){vl=t}static get defaultZone(){return Dt(vl,oe.instance)}static get defaultLocale(){return Ol}static set defaultLocale(t){Ol=t}static get defaultNumberingSystem(){return Dl}static set defaultNumberingSystem(t){Dl=t}static get defaultOutputCalendar(){return El}static set defaultOutputCalendar(t){El=t}static get defaultWeekSettings(){return Fl}static set defaultWeekSettings(t){Fl=os(t)}static get twoDigitCutoffYear(){return Il}static set twoDigitCutoffYear(t){Il=t%100}static get throwOnInvalid(){return Cl}static set throwOnInvalid(t){Cl=t}static resetCaches(){W.resetCache(),at.resetCache(),I.resetCache(),Ml()}};var it=class{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}};var Al=[0,31,59,90,120,151,181,212,243,273,304,334],Ll=[0,31,60,91,121,152,182,213,244,274,305,335];function St(i,t){return new it("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${i}, which is invalid`)}function ln(i,t,e){let s=new Date(Date.UTC(i,t-1,e));i<100&&i>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);let n=s.getUTCDay();return n===0?7:n}function Pl(i,t,e){return e+(Me(i)?Ll:Al)[t-1]}function Nl(i,t){let e=Me(i)?Ll:Al,s=e.findIndex(r=>rke(s,t,e)?(c=s+1,l=1):c=s,{weekYear:c,weekNumber:l,weekday:a,...cs(i)}}function Yr(i,t=4,e=1){let{weekYear:s,weekNumber:n,weekday:r}=i,o=cn(ln(s,1,t),e),a=le(s),l=n*7+r-o-7+t,c;l<1?(c=s-1,l+=le(c)):l>a?(c=s+1,l-=le(s)):c=s;let{month:h,day:u}=Nl(c,l);return{year:c,month:h,day:u,...cs(i)}}function hn(i){let{year:t,month:e,day:s}=i,n=Pl(t,e,s);return{year:t,ordinal:n,...cs(i)}}function Zr(i){let{year:t,ordinal:e}=i,{month:s,day:n}=Nl(t,e);return{year:t,month:s,day:n,...cs(i)}}function qr(i,t){if(!O(i.localWeekday)||!O(i.localWeekNumber)||!O(i.localWeekYear)){if(!O(i.weekday)||!O(i.weekNumber)||!O(i.weekYear))throw new Tt("Cannot mix locale-based week fields with ISO-based week fields");return O(i.localWeekday)||(i.weekday=i.localWeekday),O(i.localWeekNumber)||(i.weekNumber=i.localWeekNumber),O(i.localWeekYear)||(i.weekYear=i.localWeekYear),delete i.localWeekday,delete i.localWeekNumber,delete i.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Rl(i,t=4,e=1){let s=ls(i.weekYear),n=bt(i.weekNumber,1,ke(i.weekYear,t,e)),r=bt(i.weekday,1,7);return s?n?r?!1:St("weekday",i.weekday):St("week",i.weekNumber):St("weekYear",i.weekYear)}function Wl(i){let t=ls(i.year),e=bt(i.ordinal,1,le(i.year));return t?e?!1:St("ordinal",i.ordinal):St("year",i.year)}function Gr(i){let t=ls(i.year),e=bt(i.month,1,12),s=bt(i.day,1,ni(i.year,i.month));return t?e?s?!1:St("day",i.day):St("month",i.month):St("year",i.year)}function Xr(i){let{hour:t,minute:e,second:s,millisecond:n}=i,r=bt(t,0,23)||t===24&&e===0&&s===0&&n===0,o=bt(e,0,59),a=bt(s,0,59),l=bt(n,0,999);return r?o?a?l?!1:St("millisecond",n):St("second",s):St("minute",e):St("hour",t)}function O(i){return typeof i>"u"}function Et(i){return typeof i=="number"}function ls(i){return typeof i=="number"&&i%1===0}function wl(i){return typeof i=="string"}function Vl(i){return Object.prototype.toString.call(i)==="[object Date]"}function on(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function an(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Hl(i){return Array.isArray(i)?i:[i]}function Kr(i,t,e){if(i.length!==0)return i.reduce((s,n)=>{let r=[t(n),n];return s&&e(s[0],r[0])===s[0]?s:r},null)[1]}function Bl(i,t){return t.reduce((e,s)=>(e[s]=i[s],e),{})}function ce(i,t){return Object.prototype.hasOwnProperty.call(i,t)}function os(i){if(i==null)return null;if(typeof i!="object")throw new G("Week settings must be an object");if(!bt(i.firstDay,1,7)||!bt(i.minimalDays,1,7)||!Array.isArray(i.weekend)||i.weekend.some(t=>!bt(t,1,7)))throw new G("Invalid week settings");return{firstDay:i.firstDay,minimalDays:i.minimalDays,weekend:Array.from(i.weekend)}}function bt(i,t,e){return ls(i)&&i>=t&&i<=e}function im(i,t){return i-t*Math.floor(i/t)}function Y(i,t=2){let e=i<0,s;return e?s="-"+(""+-i).padStart(t,"0"):s=(""+i).padStart(t,"0"),s}function Ut(i){if(!(O(i)||i===null||i===""))return parseInt(i,10)}function he(i){if(!(O(i)||i===null||i===""))return parseFloat(i)}function hs(i){if(!(O(i)||i===null||i==="")){let t=parseFloat("0."+i)*1e3;return Math.floor(t)}}function ei(i,t,e=!1){let s=10**t;return(e?Math.trunc:Math.round)(i*s)/s}function Me(i){return i%4===0&&(i%100!==0||i%400===0)}function le(i){return Me(i)?366:365}function ni(i,t){let e=im(t-1,12)+1,s=i+(t-e)/12;return e===2?Me(s)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][e-1]}function ti(i){let t=Date.UTC(i.year,i.month-1,i.day,i.hour,i.minute,i.second,i.millisecond);return i.year<100&&i.year>=0&&(t=new Date(t),t.setUTCFullYear(i.year,i.month-1,i.day)),+t}function zl(i,t,e){return-cn(ln(i,1,t),e)+t-1}function ke(i,t=4,e=1){let s=zl(i,t,e),n=zl(i+1,t,e);return(le(i)-s+n)/7}function us(i){return i>99?i:i>R.twoDigitCutoffYear?1900+i:2e3+i}function en(i,t,e,s=null){let n=new Date(i),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(r.timeZone=s);let o={timeZoneName:t,...r},a=new Intl.DateTimeFormat(e,o).formatToParts(n).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function Se(i,t){let e=parseInt(i,10);Number.isNaN(e)&&(e=0);let s=parseInt(t,10)||0,n=e<0||Object.is(e,-0)?-s:s;return e*60+n}function Jr(i){let t=Number(i);if(typeof i=="boolean"||i===""||Number.isNaN(t))throw new G(`Invalid unit value ${i}`);return t}function ri(i,t){let e={};for(let s in i)if(ce(i,s)){let n=i[s];if(n==null)continue;e[t(s)]=Jr(n)}return e}function ae(i,t){let e=Math.trunc(Math.abs(i/60)),s=Math.trunc(Math.abs(i%60)),n=i>=0?"+":"-";switch(t){case"short":return`${n}${Y(e,2)}:${Y(s,2)}`;case"narrow":return`${n}${e}${s>0?`:${s}`:""}`;case"techie":return`${n}${Y(e,2)}${Y(s,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function cs(i){return Bl(i,["hour","minute","second","millisecond"])}var sm=["January","February","March","April","May","June","July","August","September","October","November","December"],Qr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],nm=["J","F","M","A","M","J","J","A","S","O","N","D"];function zr(i){switch(i){case"narrow":return[...nm];case"short":return[...Qr];case"long":return[...sm];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var to=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],eo=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],rm=["M","T","W","T","F","S","S"];function Vr(i){switch(i){case"narrow":return[...rm];case"short":return[...eo];case"long":return[...to];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Hr=["AM","PM"],om=["Before Christ","Anno Domini"],am=["BC","AD"],lm=["B","A"];function Br(i){switch(i){case"narrow":return[...lm];case"short":return[...am];case"long":return[...om];default:return null}}function $l(i){return Hr[i.hour<12?0:1]}function jl(i,t){return Vr(t)[i.weekday-1]}function Ul(i,t){return zr(t)[i.month-1]}function Yl(i,t){return Br(t)[i.year<0?0:1]}function _l(i,t,e="always",s=!1){let n={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},r=["hours","minutes","seconds"].indexOf(i)===-1;if(e==="auto"&&r){let u=i==="days";switch(t){case 1:return u?"tomorrow":`next ${n[i][0]}`;case-1:return u?"yesterday":`last ${n[i][0]}`;case 0:return u?"today":`this ${n[i][0]}`;default:}}let o=Object.is(t,-0)||t<0,a=Math.abs(t),l=a===1,c=n[i],h=s?l?c[1]:c[2]||c[1]:l?n[i][0]:i;return o?`${a} ${h} ago`:`in ${a} ${h}`}function Zl(i,t){let e="";for(let s of i)s.literal?e+=s.val:e+=t(s.val);return e}var cm={D:re,DD:Vi,DDD:Hi,DDDD:Bi,t:$i,tt:ji,ttt:Ui,tttt:Yi,T:Zi,TT:qi,TTT:Gi,TTTT:Xi,f:Ki,ff:Qi,fff:es,ffff:ss,F:Ji,FF:ts,FFF:is,FFFF:ns},st=class i{static create(t,e={}){return new i(t,e)}static parseFormat(t){let e=null,s="",n=!1,r=[];for(let o=0;o0&&r.push({literal:n||/^\s+$/.test(s),val:s}),e=null,s="",n=!n):n||a===e?s+=a:(s.length>0&&r.push({literal:/^\s+$/.test(s),val:s}),s=a,e=a)}return s.length>0&&r.push({literal:n||/^\s+$/.test(s),val:s}),r}static macroTokenToFormatOpts(t){return cm[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...e}).format()}dtFormatter(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e})}formatDateTime(t,e){return this.dtFormatter(t,e).format()}formatDateTimeParts(t,e){return this.dtFormatter(t,e).formatToParts()}formatInterval(t,e){return this.dtFormatter(t.start,e).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,e){return this.dtFormatter(t,e).resolvedOptions()}num(t,e=0){if(this.opts.forceSimple)return Y(t,e);let s={...this.opts};return e>0&&(s.padTo=e),this.loc.numberFormatter(s).format(t)}formatDateTimeFromString(t,e){let s=this.loc.listingMode()==="en",n=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",r=(f,m)=>this.loc.extract(t,f,m),o=f=>t.isOffsetFixed&&t.offset===0&&f.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,f.format):"",a=()=>s?$l(t):r({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(f,m)=>s?Ul(t,f):r(m?{month:f}:{month:f,day:"numeric"},"month"),c=(f,m)=>s?jl(t,f):r(m?{weekday:f}:{weekday:f,month:"long",day:"numeric"},"weekday"),h=f=>{let m=i.macroTokenToFormatOpts(f);return m?this.formatWithSystemDefault(t,m):f},u=f=>s?Yl(t,f):r({era:f},"era"),d=f=>{switch(f){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return a();case"d":return n?r({day:"numeric"},"day"):this.num(t.day);case"dd":return n?r({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return n?r({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return n?r({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return n?r({month:"numeric"},"month"):this.num(t.month);case"MM":return n?r({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return n?r({year:"numeric"},"year"):this.num(t.year);case"yy":return n?r({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return n?r({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return n?r({year:"numeric"},"year"):this.num(t.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return h(f)}};return Zl(i.parseFormat(e),d)}formatDurationFromString(t,e){let s=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=l=>c=>{let h=s(c);return h?this.num(l.get(h),c.length):c},r=i.parseFormat(e),o=r.reduce((l,{literal:c,val:h})=>c?l:l.concat(h),[]),a=t.shiftTo(...o.map(s).filter(l=>l));return Zl(r,n(a))}};var Gl=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ai(...i){let t=i.reduce((e,s)=>e+s.source,"");return RegExp(`^${t}$`)}function li(...i){return t=>i.reduce(([e,s,n],r)=>{let[o,a,l]=r(t,n);return[{...e,...o},a||s,l]},[{},null,1]).slice(0,2)}function ci(i,...t){if(i==null)return[null,null];for(let[e,s]of t){let n=e.exec(i);if(n)return s(n)}return[null,null]}function Xl(...i){return(t,e)=>{let s={},n;for(n=0;nf!==void 0&&(m||f&&h)?-f:f;return[{years:d(he(e)),months:d(he(s)),weeks:d(he(n)),days:d(he(r)),hours:d(he(o)),minutes:d(he(a)),seconds:d(he(l),l==="-0"),milliseconds:d(hs(c),u)}]}var Sm={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function no(i,t,e,s,n,r,o){let a={year:t.length===2?us(Ut(t)):Ut(t),month:Qr.indexOf(e)+1,day:Ut(s),hour:Ut(n),minute:Ut(r)};return o&&(a.second=Ut(o)),i&&(a.weekday=i.length>3?to.indexOf(i)+1:eo.indexOf(i)+1),a}var km=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Mm(i){let[,t,e,s,n,r,o,a,l,c,h,u]=i,d=no(t,n,s,e,r,o,a),f;return l?f=Sm[l]:c?f=0:f=Se(h,u),[d,new et(f)]}function Tm(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var vm=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Om=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Dm=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function ql(i){let[,t,e,s,n,r,o,a]=i;return[no(t,n,s,e,r,o,a),et.utcInstance]}function Em(i){let[,t,e,s,n,r,o,a]=i;return[no(t,a,e,s,n,r,o),et.utcInstance]}var Im=ai(um,so),Cm=ai(dm,so),Fm=ai(fm,so),Am=ai(Jl),tc=li(bm,hi,ds,fs),Lm=li(mm,hi,ds,fs),Pm=li(gm,hi,ds,fs),Nm=li(hi,ds,fs);function ec(i){return ci(i,[Im,tc],[Cm,Lm],[Fm,Pm],[Am,Nm])}function ic(i){return ci(Tm(i),[km,Mm])}function sc(i){return ci(i,[vm,ql],[Om,ql],[Dm,Em])}function nc(i){return ci(i,[_m,wm])}var Rm=li(hi);function rc(i){return ci(i,[xm,Rm])}var Wm=ai(pm,ym),zm=ai(Ql),Vm=li(hi,ds,fs);function oc(i){return ci(i,[Wm,tc],[zm,Vm])}var ac="Invalid Duration",cc={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Hm={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...cc},kt=146097/400,ui=146097/4800,Bm={years:{quarters:4,months:12,weeks:kt/7,days:kt,hours:kt*24,minutes:kt*24*60,seconds:kt*24*60*60,milliseconds:kt*24*60*60*1e3},quarters:{months:3,weeks:kt/28,days:kt/4,hours:kt*24/4,minutes:kt*24*60/4,seconds:kt*24*60*60/4,milliseconds:kt*24*60*60*1e3/4},months:{weeks:ui/7,days:ui,hours:ui*24,minutes:ui*24*60,seconds:ui*24*60*60,milliseconds:ui*24*60*60*1e3},...cc},Te=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],$m=Te.slice(0).reverse();function ue(i,t,e=!1){let s={values:e?t.values:{...i.values,...t.values||{}},loc:i.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||i.conversionAccuracy,matrix:t.matrix||i.matrix};return new Z(s)}function hc(i,t){let e=t.milliseconds??0;for(let s of $m.slice(1))t[s]&&(e+=t[s]*i[s].milliseconds);return e}function lc(i,t){let e=hc(i,t)<0?-1:1;Te.reduceRight((s,n)=>{if(O(t[n]))return s;if(s){let r=t[s]*e,o=i[n][s],a=Math.floor(r/o);t[n]+=a*e,t[s]-=a*o*e}return n},null),Te.reduce((s,n)=>{if(O(t[n]))return s;if(s){let r=t[s]%1;t[s]-=r,t[n]+=r*i[s][n]}return n},null)}function jm(i){let t={};for(let[e,s]of Object.entries(i))s!==0&&(t[e]=s);return t}var Z=class i{constructor(t){let e=t.conversionAccuracy==="longterm"||!1,s=e?Bm:Hm;t.matrix&&(s=t.matrix),this.values=t.values,this.loc=t.loc||W.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=s,this.isLuxonDuration=!0}static fromMillis(t,e){return i.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(t==null||typeof t!="object")throw new G(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new i({values:ri(t,i.normalizeUnit),loc:W.fromObject(e),conversionAccuracy:e.conversionAccuracy,matrix:e.matrix})}static fromDurationLike(t){if(Et(t))return i.fromMillis(t);if(i.isDuration(t))return t;if(typeof t=="object")return i.fromObject(t);throw new G(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){let[s]=nc(t);return s?i.fromObject(s,e):i.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){let[s]=rc(t);return s?i.fromObject(s,e):i.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new G("need to specify a reason the Duration is invalid");let s=t instanceof it?t:new it(t,e);if(R.throwOnInvalid)throw new Qs(s);return new i({invalid:s})}static normalizeUnit(t){let e={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!e)throw new Qe(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){let s={...e,floor:e.round!==!1&&e.floor!==!1};return this.isValid?st.create(this.loc,s).formatDurationFromString(this,t):ac}toHuman(t={}){if(!this.isValid)return ac;let e=Te.map(s=>{let n=this.values[s];return O(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:s.slice(0,-1)}).format(n)}).filter(s=>s);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(e)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=ei(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;let e=this.toMillis();return e<0||e>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},I.fromMillis(e,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?hc(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;let e=i.fromDurationLike(t),s={};for(let n of Te)(ce(e.values,n)||ce(this.values,n))&&(s[n]=e.get(n)+this.get(n));return ue(this,{values:s},!0)}minus(t){if(!this.isValid)return this;let e=i.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;let e={};for(let s of Object.keys(this.values))e[s]=Jr(t(this.values[s],s));return ue(this,{values:e},!0)}get(t){return this[i.normalizeUnit(t)]}set(t){if(!this.isValid)return this;let e={...this.values,...ri(t,i.normalizeUnit)};return ue(this,{values:e})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:s,matrix:n}={}){let o={loc:this.loc.clone({locale:t,numberingSystem:e}),matrix:n,conversionAccuracy:s};return ue(this,o)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;let t=this.toObject();return lc(this.matrix,t),ue(this,{values:t},!0)}rescale(){if(!this.isValid)return this;let t=jm(this.normalize().shiftToAll().toObject());return ue(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(o=>i.normalizeUnit(o));let e={},s={},n=this.toObject(),r;for(let o of Te)if(t.indexOf(o)>=0){r=o;let a=0;for(let c in s)a+=this.matrix[c][o]*s[c],s[c]=0;Et(n[o])&&(a+=n[o]);let l=Math.trunc(a);e[o]=l,s[o]=(a*1e3-l*1e3)/1e3}else Et(n[o])&&(s[o]=n[o]);for(let o in s)s[o]!==0&&(e[r]+=o===r?s[o]:s[o]/this.matrix[r][o]);return lc(this.matrix,e),ue(this,{values:e},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let t={};for(let e of Object.keys(this.values))t[e]=this.values[e]===0?0:-this.values[e];return ue(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function e(s,n){return s===void 0||s===0?n===void 0||n===0:s===n}for(let s of Te)if(!e(this.values[s],t.values[s]))return!1;return!0}};var di="Invalid Interval";function Um(i,t){return!i||!i.isValid?Yt.invalid("missing or invalid start"):!t||!t.isValid?Yt.invalid("missing or invalid end"):tt:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:e}={}){return this.isValid?i.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];let e=t.map(fi).filter(o=>this.contains(o)).sort((o,a)=>o.toMillis()-a.toMillis()),s=[],{s:n}=this,r=0;for(;n+this.e?this.e:o;s.push(i.fromDateTimes(n,a)),n=a,r+=1}return s}splitBy(t){let e=Z.fromDurationLike(t);if(!this.isValid||!e.isValid||e.as("milliseconds")===0)return[];let{s}=this,n=1,r,o=[];for(;sl*n));r=+a>+this.e?this.e:a,o.push(i.fromDateTimes(s,r)),s=r,n+=1}return o}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;let e=this.s>t.s?this.s:t.s,s=this.e=s?null:i.fromDateTimes(e,s)}union(t){if(!this.isValid)return this;let e=this.st.e?this.e:t.e;return i.fromDateTimes(e,s)}static merge(t){let[e,s]=t.sort((n,r)=>n.s-r.s).reduce(([n,r],o)=>r?r.overlaps(o)||r.abutsStart(o)?[n,r.union(o)]:[n.concat([r]),o]:[n,o],[[],null]);return s&&e.push(s),e}static xor(t){let e=null,s=0,n=[],r=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...r),a=o.sort((l,c)=>l.time-c.time);for(let l of a)s+=l.type==="s"?1:-1,s===1?e=l.time:(e&&+e!=+l.time&&n.push(i.fromDateTimes(e,l.time)),e=null);return i.merge(n)}difference(...t){return i.xor([this].concat(t)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:di}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=re,e={}){return this.isValid?st.create(this.s.loc.clone(e),t).formatInterval(this):di}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:di}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:di}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:di}toFormat(t,{separator:e=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:di}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):Z.invalid(this.invalidReason)}mapEndpoints(t){return i.fromDateTimes(t(this.s),t(this.e))}};var Zt=class{static hasDST(t=R.defaultZone){let e=I.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return at.isValidZone(t)}static normalizeZone(t){return Dt(t,R.defaultZone)}static getStartOfWeek({locale:t=null,locObj:e=null}={}){return(e||W.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:e=null}={}){return(e||W.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:e=null}={}){return(e||W.create(t)).getWeekendDays().slice()}static months(t="long",{locale:e=null,numberingSystem:s=null,locObj:n=null,outputCalendar:r="gregory"}={}){return(n||W.create(e,s,r)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:s=null,locObj:n=null,outputCalendar:r="gregory"}={}){return(n||W.create(e,s,r)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:s=null,locObj:n=null}={}){return(n||W.create(e,s,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:s=null,locObj:n=null}={}){return(n||W.create(e,s,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return W.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return W.create(e,null,"gregory").eras(t)}static features(){return{relative:on(),localeWeek:an()}}};function uc(i,t){let e=n=>n.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),s=e(t)-e(i);return Math.floor(Z.fromMillis(s).as("days"))}function Ym(i,t,e){let s=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{let h=uc(l,c);return(h-h%7)/7}],["days",uc]],n={},r=i,o,a;for(let[l,c]of s)e.indexOf(l)>=0&&(o=l,n[l]=c(i,t),a=r.plus(n),a>t?(n[l]--,i=r.plus(n),i>t&&(a=i,n[l]--,i=r.plus(n))):i=a);return[i,n,a,o]}function dc(i,t,e,s){let[n,r,o,a]=Ym(i,t,e),l=t-n,c=e.filter(u=>["hours","minutes","seconds","milliseconds"].indexOf(u)>=0);c.length===0&&(o0?Z.fromMillis(l,s).shiftTo(...c).plus(h):h}var Zm="missing Intl.DateTimeFormat.formatToParts support";function z(i,t=e=>e){return{regex:i,deser:([e])=>t(kl(e))}}var qm="\xA0",gc=`[ ${qm}]`,pc=new RegExp(gc,"g");function Gm(i){return i.replace(/\./g,"\\.?").replace(pc,gc)}function fc(i){return i.replace(/\./g,"").replace(pc," ").toLowerCase()}function It(i,t){return i===null?null:{regex:RegExp(i.map(Gm).join("|")),deser:([e])=>i.findIndex(s=>fc(e)===fc(s))+t}}function mc(i,t){return{regex:i,deser:([,e,s])=>Se(e,s),groups:t}}function un(i){return{regex:i,deser:([t])=>t}}function Xm(i){return i.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Km(i,t){let e=wt(t),s=wt(t,"{2}"),n=wt(t,"{3}"),r=wt(t,"{4}"),o=wt(t,"{6}"),a=wt(t,"{1,2}"),l=wt(t,"{1,3}"),c=wt(t,"{1,6}"),h=wt(t,"{1,9}"),u=wt(t,"{2,4}"),d=wt(t,"{4,6}"),f=p=>({regex:RegExp(Xm(p.val)),deser:([y])=>y,literal:!0}),g=(p=>{if(i.literal)return f(p);switch(p.val){case"G":return It(t.eras("short"),0);case"GG":return It(t.eras("long"),0);case"y":return z(c);case"yy":return z(u,us);case"yyyy":return z(r);case"yyyyy":return z(d);case"yyyyyy":return z(o);case"M":return z(a);case"MM":return z(s);case"MMM":return It(t.months("short",!0),1);case"MMMM":return It(t.months("long",!0),1);case"L":return z(a);case"LL":return z(s);case"LLL":return It(t.months("short",!1),1);case"LLLL":return It(t.months("long",!1),1);case"d":return z(a);case"dd":return z(s);case"o":return z(l);case"ooo":return z(n);case"HH":return z(s);case"H":return z(a);case"hh":return z(s);case"h":return z(a);case"mm":return z(s);case"m":return z(a);case"q":return z(a);case"qq":return z(s);case"s":return z(a);case"ss":return z(s);case"S":return z(l);case"SSS":return z(n);case"u":return un(h);case"uu":return un(a);case"uuu":return z(e);case"a":return It(t.meridiems(),0);case"kkkk":return z(r);case"kk":return z(u,us);case"W":return z(a);case"WW":return z(s);case"E":case"c":return z(e);case"EEE":return It(t.weekdays("short",!1),1);case"EEEE":return It(t.weekdays("long",!1),1);case"ccc":return It(t.weekdays("short",!0),1);case"cccc":return It(t.weekdays("long",!0),1);case"Z":case"ZZ":return mc(new RegExp(`([+-]${a.source})(?::(${s.source}))?`),2);case"ZZZ":return mc(new RegExp(`([+-]${a.source})(${s.source})?`),2);case"z":return un(/[a-z_+-/]{1,256}?/i);case" ":return un(/[^\S\n\r]/);default:return f(p)}})(i)||{invalidReason:Zm};return g.token=i,g}var Jm={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Qm(i,t,e){let{type:s,value:n}=i;if(s==="literal"){let l=/^\s+$/.test(n);return{literal:!l,val:l?" ":n}}let r=t[s],o=s;s==="hour"&&(t.hour12!=null?o=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?o="hour12":o="hour24":o=e.hour12?"hour12":"hour24");let a=Jm[o];if(typeof a=="object"&&(a=a[r]),a)return{literal:!1,val:a}}function tg(i){return[`^${i.map(e=>e.regex).reduce((e,s)=>`${e}(${s.source})`,"")}$`,i]}function eg(i,t,e){let s=i.match(t);if(s){let n={},r=1;for(let o in e)if(ce(e,o)){let a=e[o],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(n[a.token.val[0]]=a.deser(s.slice(r,r+l))),r+=l}return[s,n]}else return[s,{}]}function ig(i){let t=r=>{switch(r){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},e=null,s;return O(i.z)||(e=at.create(i.z)),O(i.Z)||(e||(e=new et(i.Z)),s=i.Z),O(i.q)||(i.M=(i.q-1)*3+1),O(i.h)||(i.h<12&&i.a===1?i.h+=12:i.h===12&&i.a===0&&(i.h=0)),i.G===0&&i.y&&(i.y=-i.y),O(i.u)||(i.S=hs(i.u)),[Object.keys(i).reduce((r,o)=>{let a=t(o);return a&&(r[a]=i[o]),r},{}),e,s]}var ro=null;function sg(){return ro||(ro=I.fromMillis(1555555555555)),ro}function ng(i,t){if(i.literal)return i;let e=st.macroTokenToFormatOpts(i.val),s=lo(e,t);return s==null||s.includes(void 0)?i:s}function oo(i,t){return Array.prototype.concat(...i.map(e=>ng(e,t)))}var ms=class{constructor(t,e){if(this.locale=t,this.format=e,this.tokens=oo(st.parseFormat(e),t),this.units=this.tokens.map(s=>Km(s,t)),this.disqualifyingUnit=this.units.find(s=>s.invalidReason),!this.disqualifyingUnit){let[s,n]=tg(this.units);this.regex=RegExp(s,"i"),this.handlers=n}}explainFromTokens(t){if(this.isValid){let[e,s]=eg(t,this.regex,this.handlers),[n,r,o]=s?ig(s):[null,null,void 0];if(ce(s,"a")&&ce(s,"H"))throw new Tt("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:e,matches:s,result:n,zone:r,specificOffset:o}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function ao(i,t,e){return new ms(i,e).explainFromTokens(t)}function yc(i,t,e){let{result:s,zone:n,specificOffset:r,invalidReason:o}=ao(i,t,e);return[s,n,r,o]}function lo(i,t){if(!i)return null;let s=st.create(t,i).dtFormatter(sg()),n=s.formatToParts(),r=s.resolvedOptions();return n.map(o=>Qm(o,i,r))}var co="Invalid DateTime",bc=864e13;function gs(i){return new it("unsupported zone",`the zone "${i.name}" is not supported`)}function ho(i){return i.weekData===null&&(i.weekData=as(i.c)),i.weekData}function uo(i){return i.localWeekData===null&&(i.localWeekData=as(i.c,i.loc.getMinDaysInFirstWeek(),i.loc.getStartOfWeek())),i.localWeekData}function ve(i,t){let e={ts:i.ts,zone:i.zone,c:i.c,o:i.o,loc:i.loc,invalid:i.invalid};return new I({...e,...t,old:e})}function Tc(i,t,e){let s=i-t*60*1e3,n=e.offset(s);if(t===n)return[s,t];s-=(n-t)*60*1e3;let r=e.offset(s);return n===r?[s,n]:[i-Math.min(n,r)*60*1e3,Math.max(n,r)]}function dn(i,t){i+=t*60*1e3;let e=new Date(i);return{year:e.getUTCFullYear(),month:e.getUTCMonth()+1,day:e.getUTCDate(),hour:e.getUTCHours(),minute:e.getUTCMinutes(),second:e.getUTCSeconds(),millisecond:e.getUTCMilliseconds()}}function mn(i,t,e){return Tc(ti(i),t,e)}function xc(i,t){let e=i.o,s=i.c.year+Math.trunc(t.years),n=i.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,r={...i.c,year:s,month:n,day:Math.min(i.c.day,ni(s,n))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=Z.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=ti(r),[l,c]=Tc(a,e,i.zone);return o!==0&&(l+=o,c=i.zone.offset(l)),{ts:l,o:c}}function mi(i,t,e,s,n,r){let{setZone:o,zone:a}=e;if(i&&Object.keys(i).length!==0||t){let l=t||a,c=I.fromObject(i,{...e,zone:l,specificOffset:r});return o?c:c.setZone(a)}else return I.invalid(new it("unparsable",`the input "${n}" can't be parsed as ${s}`))}function fn(i,t,e=!0){return i.isValid?st.create(W.create("en-US"),{allowZ:e,forceSimple:!0}).formatDateTimeFromString(i,t):null}function fo(i,t){let e=i.c.year>9999||i.c.year<0,s="";return e&&i.c.year>=0&&(s+="+"),s+=Y(i.c.year,e?6:4),t?(s+="-",s+=Y(i.c.month),s+="-",s+=Y(i.c.day)):(s+=Y(i.c.month),s+=Y(i.c.day)),s}function _c(i,t,e,s,n,r){let o=Y(i.c.hour);return t?(o+=":",o+=Y(i.c.minute),(i.c.millisecond!==0||i.c.second!==0||!e)&&(o+=":")):o+=Y(i.c.minute),(i.c.millisecond!==0||i.c.second!==0||!e)&&(o+=Y(i.c.second),(i.c.millisecond!==0||!s)&&(o+=".",o+=Y(i.c.millisecond,3))),n&&(i.isOffsetFixed&&i.offset===0&&!r?o+="Z":i.o<0?(o+="-",o+=Y(Math.trunc(-i.o/60)),o+=":",o+=Y(Math.trunc(-i.o%60))):(o+="+",o+=Y(Math.trunc(i.o/60)),o+=":",o+=Y(Math.trunc(i.o%60)))),r&&(o+="["+i.zone.ianaName+"]"),o}var vc={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rg={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},og={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Oc=["year","month","day","hour","minute","second","millisecond"],ag=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],lg=["year","ordinal","hour","minute","second","millisecond"];function cg(i){let t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[i.toLowerCase()];if(!t)throw new Qe(i);return t}function wc(i){switch(i.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return cg(i)}}function hg(i){return pn[i]||(gn===void 0&&(gn=R.now()),pn[i]=i.offset(gn)),pn[i]}function Sc(i,t){let e=Dt(t.zone,R.defaultZone);if(!e.isValid)return I.invalid(gs(e));let s=W.fromObject(t),n,r;if(O(i.year))n=R.now();else{for(let l of Oc)O(i[l])&&(i[l]=vc[l]);let o=Gr(i)||Xr(i);if(o)return I.invalid(o);let a=hg(e);[n,r]=mn(i,a,e)}return new I({ts:n,zone:e,loc:s,o:r})}function kc(i,t,e){let s=O(e.round)?!0:e.round,n=(o,a)=>(o=ei(o,s||e.calendary?0:2,!0),t.loc.clone(e).relFormatter(e).format(o,a)),r=o=>e.calendary?t.hasSame(i,o)?0:t.startOf(o).diff(i.startOf(o),o).get(o):t.diff(i,o).get(o);if(e.unit)return n(r(e.unit),e.unit);for(let o of e.units){let a=r(o);if(Math.abs(a)>=1)return n(a,o)}return n(i>t?-0:0,e.units[e.units.length-1])}function Mc(i){let t={},e;return i.length>0&&typeof i[i.length-1]=="object"?(t=i[i.length-1],e=Array.from(i).slice(0,i.length-1)):e=Array.from(i),[t,e]}var gn,pn={},I=class i{constructor(t){let e=t.zone||R.defaultZone,s=t.invalid||(Number.isNaN(t.ts)?new it("invalid input"):null)||(e.isValid?null:gs(e));this.ts=O(t.ts)?R.now():t.ts;let n=null,r=null;if(!s)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e))[n,r]=[t.old.c,t.old.o];else{let a=Et(t.o)&&!t.old?t.o:e.offset(this.ts);n=dn(this.ts,a),s=Number.isNaN(n.year)?new it("invalid input"):null,n=s?null:n,r=s?null:a}this._zone=e,this.loc=t.loc||W.create(),this.invalid=s,this.weekData=null,this.localWeekData=null,this.c=n,this.o=r,this.isLuxonDateTime=!0}static now(){return new i({})}static local(){let[t,e]=Mc(arguments),[s,n,r,o,a,l,c]=e;return Sc({year:s,month:n,day:r,hour:o,minute:a,second:l,millisecond:c},t)}static utc(){let[t,e]=Mc(arguments),[s,n,r,o,a,l,c]=e;return t.zone=et.utcInstance,Sc({year:s,month:n,day:r,hour:o,minute:a,second:l,millisecond:c},t)}static fromJSDate(t,e={}){let s=Vl(t)?t.valueOf():NaN;if(Number.isNaN(s))return i.invalid("invalid input");let n=Dt(e.zone,R.defaultZone);return n.isValid?new i({ts:s,zone:n,loc:W.fromObject(e)}):i.invalid(gs(n))}static fromMillis(t,e={}){if(Et(t))return t<-bc||t>bc?i.invalid("Timestamp out of range"):new i({ts:t,zone:Dt(e.zone,R.defaultZone),loc:W.fromObject(e)});throw new G(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(Et(t))return new i({ts:t*1e3,zone:Dt(e.zone,R.defaultZone),loc:W.fromObject(e)});throw new G("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};let s=Dt(e.zone,R.defaultZone);if(!s.isValid)return i.invalid(gs(s));let n=W.fromObject(e),r=ri(t,wc),{minDaysInFirstWeek:o,startOfWeek:a}=qr(r,n),l=R.now(),c=O(e.specificOffset)?s.offset(l):e.specificOffset,h=!O(r.ordinal),u=!O(r.year),d=!O(r.month)||!O(r.day),f=u||d,m=r.weekYear||r.weekNumber;if((f||h)&&m)throw new Tt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&h)throw new Tt("Can't mix ordinal dates with month/day");let g=m||r.weekday&&!f,p,y,b=dn(l,c);g?(p=ag,y=rg,b=as(b,o,a)):h?(p=lg,y=og,b=hn(b)):(p=Oc,y=vc);let _=!1;for(let C of p){let N=r[C];O(N)?_?r[C]=y[C]:r[C]=b[C]:_=!0}let w=g?Rl(r,o,a):h?Wl(r):Gr(r),x=w||Xr(r);if(x)return i.invalid(x);let S=g?Yr(r,o,a):h?Zr(r):r,[k,v]=mn(S,c,s),T=new i({ts:k,zone:s,o:v,loc:n});return r.weekday&&f&&t.weekday!==T.weekday?i.invalid("mismatched weekday",`you can't specify both a weekday of ${r.weekday} and a date of ${T.toISO()}`):T.isValid?T:i.invalid(T.invalid)}static fromISO(t,e={}){let[s,n]=ec(t);return mi(s,n,e,"ISO 8601",t)}static fromRFC2822(t,e={}){let[s,n]=ic(t);return mi(s,n,e,"RFC 2822",t)}static fromHTTP(t,e={}){let[s,n]=sc(t);return mi(s,n,e,"HTTP",e)}static fromFormat(t,e,s={}){if(O(t)||O(e))throw new G("fromFormat requires an input string and a format");let{locale:n=null,numberingSystem:r=null}=s,o=W.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),[a,l,c,h]=yc(o,t,e);return h?i.invalid(h):mi(a,l,s,`format ${e}`,t,c)}static fromString(t,e,s={}){return i.fromFormat(t,e,s)}static fromSQL(t,e={}){let[s,n]=oc(t);return mi(s,n,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new G("need to specify a reason the DateTime is invalid");let s=t instanceof it?t:new it(t,e);if(R.throwOnInvalid)throw new Ks(s);return new i({invalid:s})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,e={}){let s=lo(t,W.fromObject(e));return s?s.map(n=>n?n.val:null).join(""):null}static expandFormat(t,e={}){return oo(st.parseFormat(t),W.fromObject(e)).map(n=>n.val).join("")}static resetCache(){gn=void 0,pn={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ho(this).weekYear:NaN}get weekNumber(){return this.isValid?ho(this).weekNumber:NaN}get weekday(){return this.isValid?ho(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?uo(this).weekday:NaN}get localWeekNumber(){return this.isValid?uo(this).weekNumber:NaN}get localWeekYear(){return this.isValid?uo(this).weekYear:NaN}get ordinal(){return this.isValid?hn(this.c).ordinal:NaN}get monthShort(){return this.isValid?Zt.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Zt.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Zt.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Zt.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let t=864e5,e=6e4,s=ti(this.c),n=this.zone.offset(s-t),r=this.zone.offset(s+t),o=this.zone.offset(s-n*e),a=this.zone.offset(s-r*e);if(o===a)return[this];let l=s-o*e,c=s-a*e,h=dn(l,o),u=dn(c,a);return h.hour===u.hour&&h.minute===u.minute&&h.second===u.second&&h.millisecond===u.millisecond?[ve(this,{ts:l}),ve(this,{ts:c})]:[this]}get isInLeapYear(){return Me(this.year)}get daysInMonth(){return ni(this.year,this.month)}get daysInYear(){return this.isValid?le(this.year):NaN}get weeksInWeekYear(){return this.isValid?ke(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ke(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){let{locale:e,numberingSystem:s,calendar:n}=st.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:s,outputCalendar:n}}toUTC(t=0,e={}){return this.setZone(et.instance(t),e)}toLocal(){return this.setZone(R.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:s=!1}={}){if(t=Dt(t,R.defaultZone),t.equals(this.zone))return this;if(t.isValid){let n=this.ts;if(e||s){let r=t.offset(this.ts),o=this.toObject();[n]=mn(o,r,t)}return ve(this,{ts:n,zone:t})}else return i.invalid(gs(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:s}={}){let n=this.loc.clone({locale:t,numberingSystem:e,outputCalendar:s});return ve(this,{loc:n})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;let e=ri(t,wc),{minDaysInFirstWeek:s,startOfWeek:n}=qr(e,this.loc),r=!O(e.weekYear)||!O(e.weekNumber)||!O(e.weekday),o=!O(e.ordinal),a=!O(e.year),l=!O(e.month)||!O(e.day),c=a||l,h=e.weekYear||e.weekNumber;if((c||o)&&h)throw new Tt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new Tt("Can't mix ordinal dates with month/day");let u;r?u=Yr({...as(this.c,s,n),...e},s,n):O(e.ordinal)?(u={...this.toObject(),...e},O(e.day)&&(u.day=Math.min(ni(u.year,u.month),u.day))):u=Zr({...hn(this.c),...e});let[d,f]=mn(u,this.o,this.zone);return ve(this,{ts:d,o:f})}plus(t){if(!this.isValid)return this;let e=Z.fromDurationLike(t);return ve(this,xc(this,e))}minus(t){if(!this.isValid)return this;let e=Z.fromDurationLike(t).negate();return ve(this,xc(this,e))}startOf(t,{useLocaleWeeks:e=!1}={}){if(!this.isValid)return this;let s={},n=Z.normalizeUnit(t);switch(n){case"years":s.month=1;case"quarters":case"months":s.day=1;case"weeks":case"days":s.hour=0;case"hours":s.minute=0;case"minutes":s.second=0;case"seconds":s.millisecond=0;break;case"milliseconds":break}if(n==="weeks")if(e){let r=this.loc.getStartOfWeek(),{weekday:o}=this;othis.valueOf(),a=o?this:t,l=o?t:this,c=dc(a,l,r,n);return o?c.negate():c}diffNow(t="milliseconds",e={}){return this.diff(i.now(),t,e)}until(t){return this.isValid?Yt.fromDateTimes(this,t):this}hasSame(t,e,s){if(!this.isValid)return!1;let n=t.valueOf(),r=this.setZone(t.zone,{keepLocalTime:!0});return r.startOf(e,s)<=n&&n<=r.endOf(e,s)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;let e=t.base||i.fromObject({},{zone:this.zone}),s=t.padding?thise.valueOf(),Math.min)}static max(...t){if(!t.every(i.isDateTime))throw new G("max requires all arguments be DateTimes");return Kr(t,e=>e.valueOf(),Math.max)}static fromFormatExplain(t,e,s={}){let{locale:n=null,numberingSystem:r=null}=s,o=W.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return ao(o,t,e)}static fromStringExplain(t,e,s={}){return i.fromFormatExplain(t,e,s)}static buildFormatParser(t,e={}){let{locale:s=null,numberingSystem:n=null}=e,r=W.fromOpts({locale:s,numberingSystem:n,defaultToEN:!0});return new ms(r,t)}static fromFormatParser(t,e,s={}){if(O(t)||O(e))throw new G("fromFormatParser requires an input string and a format parser");let{locale:n=null,numberingSystem:r=null}=s,o=W.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});if(!o.equals(e.locale))throw new G(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${e.locale}`);let{result:a,zone:l,specificOffset:c,invalidReason:h}=e.explainFromTokens(t);return h?i.invalid(h):mi(a,l,s,`format ${e.format}`,t,c)}static get DATE_SHORT(){return re}static get DATE_MED(){return Vi}static get DATE_MED_WITH_WEEKDAY(){return Er}static get DATE_FULL(){return Hi}static get DATE_HUGE(){return Bi}static get TIME_SIMPLE(){return $i}static get TIME_WITH_SECONDS(){return ji}static get TIME_WITH_SHORT_OFFSET(){return Ui}static get TIME_WITH_LONG_OFFSET(){return Yi}static get TIME_24_SIMPLE(){return Zi}static get TIME_24_WITH_SECONDS(){return qi}static get TIME_24_WITH_SHORT_OFFSET(){return Gi}static get TIME_24_WITH_LONG_OFFSET(){return Xi}static get DATETIME_SHORT(){return Ki}static get DATETIME_SHORT_WITH_SECONDS(){return Ji}static get DATETIME_MED(){return Qi}static get DATETIME_MED_WITH_SECONDS(){return ts}static get DATETIME_MED_WITH_WEEKDAY(){return Ir}static get DATETIME_FULL(){return es}static get DATETIME_FULL_WITH_SECONDS(){return is}static get DATETIME_HUGE(){return ss}static get DATETIME_HUGE_WITH_SECONDS(){return ns}};function fi(i){if(I.isDateTime(i))return i;if(i&&i.valueOf&&Et(i.valueOf()))return I.fromJSDate(i);if(i&&typeof i=="object")return I.fromObject(i);throw new G(`Unknown datetime argument: ${i}, of type ${typeof i}`)}var ug={datetime:I.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:I.TIME_WITH_SECONDS,minute:I.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};Or._date.override({_id:"luxon",_create:function(i){return I.fromMillis(i,this.options)},init(i){this.options.locale||(this.options.locale=i.locale)},formats:function(){return ug},parse:function(i,t){let e=this.options,s=typeof i;return i===null||s==="undefined"?null:(s==="number"?i=this._create(i):s==="string"?typeof t=="string"?i=I.fromFormat(i,t,e):i=I.fromISO(i,e):i instanceof Date?i=I.fromJSDate(i,e):s==="object"&&!(i instanceof I)&&(i=I.fromObject(i,e)),i.isValid?i.valueOf():null)},format:function(i,t){let e=this._create(i);return typeof t=="string"?e.toFormat(t):e.toLocaleString(t)},add:function(i,t,e){let s={};return s[e]=t,this._create(i).plus(s).valueOf()},diff:function(i,t,e){return this._create(i).diff(this._create(t)).as(e).valueOf()},startOf:function(i,t,e){if(t==="isoWeek"){e=Math.trunc(Math.min(Math.max(0,e),6));let s=this._create(i);return s.minus({days:(s.weekday-e+7)%7}).startOf("day").valueOf()}return t?this._create(i).startOf(t).valueOf():i},endOf:function(i,t){return this._create(i).endOf(t).valueOf()}});function yn({cachedData:i,options:t,type:e}){return{init:function(){this.initChart(),this.$wire.$on("updateChartData",({data:s})=>{yn=this.getChart(),yn.data=s,yn.update("resize")}),Alpine.effect(()=>{Alpine.store("theme"),this.$nextTick(()=>{this.getChart()&&(this.getChart().destroy(),this.initChart())})}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Alpine.store("theme")==="system"&&this.$nextTick(()=>{this.getChart().destroy(),this.initChart()})})},initChart:function(s=null){var o,a,l,c,h,u,d,f,m;if(!this.$refs.canvas||!this.$refs.backgroundColorElement||!this.$refs.borderColorElement||!this.$refs.textColorElement||!this.$refs.gridColorElement)return;Rt.defaults.animation.duration=0,Rt.defaults.backgroundColor=getComputedStyle(this.$refs.backgroundColorElement).color;let n=getComputedStyle(this.$refs.borderColorElement).color;Rt.defaults.borderColor=n,Rt.defaults.color=getComputedStyle(this.$refs.textColorElement).color,Rt.defaults.font.family=getComputedStyle(this.$el).fontFamily,Rt.defaults.plugins.legend.labels.boxWidth=12,Rt.defaults.plugins.legend.position="bottom";let r=getComputedStyle(this.$refs.gridColorElement).color;return t??(t={}),t.borderWidth??(t.borderWidth=2),t.pointBackgroundColor??(t.pointBackgroundColor=n),t.pointHitRadius??(t.pointHitRadius=4),t.pointRadius??(t.pointRadius=2),t.scales??(t.scales={}),(o=t.scales).x??(o.x={}),(a=t.scales.x).grid??(a.grid={}),(l=t.scales.x.grid).color??(l.color=r),(c=t.scales.x.grid).display??(c.display=!1),(h=t.scales.x.grid).drawBorder??(h.drawBorder=!1),(u=t.scales).y??(u.y={}),(d=t.scales.y).grid??(d.grid={}),(f=t.scales.y.grid).color??(f.color=r),(m=t.scales.y.grid).drawBorder??(m.drawBorder=!1),new Rt(this.$refs.canvas,{type:e,data:s??i,options:t,plugins:window.filamentChartJsPlugins??[]})},getChart:function(){return this.$refs.canvas?Rt.getChart(this.$refs.canvas):null}}}export{yn as default}; +/*! Bundled license information: + +chart.js/dist/chunks/helpers.segment.mjs: + (*! + * Chart.js v3.9.1 + * https://www.chartjs.org + * (c) 2022 Chart.js Contributors + * Released under the MIT License + *) + +chart.js/dist/chunks/helpers.segment.mjs: + (*! + * @kurkle/color v0.2.1 + * https://github.com/kurkle/color#readme + * (c) 2022 Jukka Kurkela + * Released under the MIT License + *) + +chart.js/dist/chart.mjs: + (*! + * Chart.js v3.9.1 + * https://www.chartjs.org + * (c) 2022 Chart.js Contributors + * Released under the MIT License + *) + +chartjs-adapter-luxon/dist/chartjs-adapter-luxon.esm.js: + (*! + * chartjs-adapter-luxon v1.3.1 + * https://www.chartjs.org + * (c) 2023 chartjs-adapter-luxon Contributors + * Released under the MIT license + *) +*/ diff --git a/public/js/filament/widgets/components/stats-overview/stat/chart.js b/public/js/filament/widgets/components/stats-overview/stat/chart.js new file mode 100644 index 000000000..b607cd185 --- /dev/null +++ b/public/js/filament/widgets/components/stats-overview/stat/chart.js @@ -0,0 +1,29 @@ +function rt(){}var Hs=function(){let i=0;return function(){return i++}}();function T(i){return i===null||typeof i>"u"}function I(i){if(Array.isArray&&Array.isArray(i))return!0;let t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function D(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}var W=i=>(typeof i=="number"||i instanceof Number)&&isFinite(+i);function Q(i,t){return W(i)?i:t}function C(i,t){return typeof i>"u"?t:i}var js=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:i/t,Di=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function z(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function E(i,t,e,s){let n,o,a;if(I(i))if(o=i.length,s)for(n=o-1;n>=0;n--)t.call(e,i[n],n);else for(n=0;ni,x:i=>i.x,y:i=>i.y};function gt(i,t){return(Ds[t]||(Ds[t]=Io(t)))(i)}function Io(i){let t=zo(i);return e=>{for(let s of t){if(s==="")break;e=e&&e[s]}return e}}function zo(i){let t=i.split("."),e=[],s="";for(let n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function Xe(i){return i.charAt(0).toUpperCase()+i.slice(1)}var J=i=>typeof i<"u",ft=i=>typeof i=="function",Oi=(i,t)=>{if(i.size!==t.size)return!1;for(let e of i)if(!t.has(e))return!1;return!0};function Ys(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}var B=Math.PI,F=2*B,Bo=F+B,je=Number.POSITIVE_INFINITY,Vo=B/180,V=B/2,ue=B/4,Os=B*2/3,tt=Math.log10,ot=Math.sign;function Ai(i){let t=Math.round(i);i=Ut(i,t,i/1e3)?t:i;let e=Math.pow(10,Math.floor(tt(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function Xs(i){let t=[],e=Math.sqrt(i),s;for(s=1;sn-o).pop(),t}function Lt(i){return!isNaN(parseFloat(i))&&isFinite(i)}function Ut(i,t,e){return Math.abs(i-t)=i}function Ti(i,t,e){let s,n,o;for(s=0,n=i.length;sl&&c=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function Ke(i,t,e){e=e||(a=>i[a]1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}var at=(i,t,e,s)=>Ke(i,e,s?n=>i[n][t]<=e:n=>i[n][t]Ke(i,e,s=>i[s][t]>=e);function Gs(i,t,e){let s=0,n=i.length;for(;ss&&i[n-1]>e;)n--;return s>0||n{let s="_onData"+Xe(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){let a=n.apply(this,o);return i._chartjs.listeners.forEach(r=>{typeof r[s]=="function"&&r[s](...o)}),a}})})}function Ei(i,t){let e=i._chartjs;if(!e)return;let s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(Zs.forEach(o=>{delete i[o]}),delete i._chartjs)}function Fi(i){let t=new Set,e,s;for(e=0,s=i.length;e"u"?function(i){return i()}:window.requestAnimationFrame}();function zi(i,t,e){let s=e||(a=>Array.prototype.slice.call(a)),n=!1,o=[];return function(...a){o=s(a),n||(n=!0,Ii.call(window,()=>{n=!1,i.apply(t,o)}))}}function Qs(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}var qe=i=>i==="start"?"left":i==="end"?"right":"center",X=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,tn=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function Bi(i,t,e){let s=t.length,n=0,o=s;if(i._sorted){let{iScale:a,_parsed:r}=i,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(n=Y(Math.min(at(r,a.axis,c).lo,e?s:at(t,l,a.getPixelForValue(c)).lo),0,s-1)),u?o=Y(Math.max(at(r,a.axis,h,!0).hi+1,e?0:at(t,l,a.getPixelForValue(h),!0).hi+1),n,s)-n:o=s-n}return{start:n,count:o}}function Vi(i){let{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;let o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}var ze=i=>i===0||i===1,As=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*F/e)),Ts=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*F/e)+1,Ht={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*V)+1,easeOutSine:i=>Math.sin(i*V),easeInOutSine:i=>-.5*(Math.cos(B*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>ze(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>ze(i)?i:As(i,.075,.3),easeOutElastic:i=>ze(i)?i:Ts(i,.075,.3),easeInOutElastic(i){return ze(i)?i:i<.5?.5*As(i*2,.1125,.45):.5+.5*Ts(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Ht.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Ht.easeInBounce(i*2)*.5:Ht.easeOutBounce(i*2-1)*.5+.5};function be(i){return i+.5|0}var xt=(i,t,e)=>Math.max(Math.min(i,e),t);function fe(i){return xt(be(i*2.55),0,255)}function yt(i){return xt(be(i*255),0,255)}function ut(i){return xt(be(i/2.55)/100,0,1)}function Ls(i){return xt(be(i*100),0,100)}var st={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Si=[..."0123456789ABCDEF"],No=i=>Si[i&15],Ho=i=>Si[(i&240)>>4]+Si[i&15],Be=i=>(i&240)>>4===(i&15),jo=i=>Be(i.r)&&Be(i.g)&&Be(i.b)&&Be(i.a);function $o(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&st[i[1]]*17,g:255&st[i[2]]*17,b:255&st[i[3]]*17,a:t===5?st[i[4]]*17:255}:(t===7||t===9)&&(e={r:st[i[1]]<<4|st[i[2]],g:st[i[3]]<<4|st[i[4]],b:st[i[5]]<<4|st[i[6]],a:t===9?st[i[7]]<<4|st[i[8]]:255})),e}var Yo=(i,t)=>i<255?t(i):"";function Xo(i){var t=jo(i)?No:Ho;return i?"#"+t(i.r)+t(i.g)+t(i.b)+Yo(i.a,t):void 0}var Uo=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function en(i,t,e){let s=t*Math.min(e,1-e),n=(o,a=(o+i/30)%12)=>e-s*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function Ko(i,t,e){let s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function qo(i,t,e){let s=en(i,1,.5),n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function Go(i,t,e,s,n){return i===n?(t-e)/s+(t.5?h/(2-o-a):h/(o+a),l=Go(e,s,n,h,o),l=l*60+.5),[l|0,c||0,r]}function Ni(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(yt)}function Hi(i,t,e){return Ni(en,i,t,e)}function Zo(i,t,e){return Ni(qo,i,t,e)}function Jo(i,t,e){return Ni(Ko,i,t,e)}function sn(i){return(i%360+360)%360}function Qo(i){let t=Uo.exec(i),e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?fe(+t[5]):yt(+t[5]));let n=sn(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?s=Zo(n,o,a):t[1]==="hsv"?s=Jo(n,o,a):s=Hi(n,o,a),{r:s[0],g:s[1],b:s[2],a:e}}function ta(i,t){var e=Wi(i);e[0]=sn(e[0]+t),e=Hi(e),i.r=e[0],i.g=e[1],i.b=e[2]}function ea(i){if(!i)return;let t=Wi(i),e=t[0],s=Ls(t[1]),n=Ls(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${ut(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}var Rs={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Es={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function ia(){let i={},t=Object.keys(Es),e=Object.keys(Rs),s,n,o,a,r;for(s=0;s>16&255,o>>8&255,o&255]}return i}var Ve;function sa(i){Ve||(Ve=ia(),Ve.transparent=[0,0,0,0]);let t=Ve[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var na=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function oa(i){let t=na.exec(i),e=255,s,n,o;if(t){if(t[7]!==s){let a=+t[7];e=t[8]?fe(a):xt(a*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?fe(s):xt(s,0,255)),n=255&(t[4]?fe(n):xt(n,0,255)),o=255&(t[6]?fe(o):xt(o,0,255)),{r:s,g:n,b:o,a:e}}}function aa(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${ut(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}var vi=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Nt=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function ra(i,t,e){let s=Nt(ut(i.r)),n=Nt(ut(i.g)),o=Nt(ut(i.b));return{r:yt(vi(s+e*(Nt(ut(t.r))-s))),g:yt(vi(n+e*(Nt(ut(t.g))-n))),b:yt(vi(o+e*(Nt(ut(t.b))-o))),a:i.a+e*(t.a-i.a)}}function We(i,t,e){if(i){let s=Wi(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=Hi(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function nn(i,t){return i&&Object.assign(t||{},i)}function Fs(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=yt(i[3]))):(t=nn(i,{r:0,g:0,b:0,a:1}),t.a=yt(t.a)),t}function la(i){return i.charAt(0)==="r"?oa(i):Qo(i)}var Pi=class i{constructor(t){if(t instanceof i)return t;let e=typeof t,s;e==="object"?s=Fs(t):e==="string"&&(s=$o(t)||sa(t)||la(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=nn(this._rgb);return t&&(t.a=ut(t.a)),t}set rgb(t){this._rgb=Fs(t)}rgbString(){return this._valid?aa(this._rgb):void 0}hexString(){return this._valid?Xo(this._rgb):void 0}hslString(){return this._valid?ea(this._rgb):void 0}mix(t,e){if(t){let s=this.rgb,n=t.rgb,o,a=e===o?.5:e,r=2*a-1,l=s.a-n.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=a*s.a+(1-a)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=ra(this._rgb,t._rgb,e)),this}clone(){return new i(this.rgb)}alpha(t){return this._rgb.a=yt(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=be(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return We(this._rgb,2,t),this}darken(t){return We(this._rgb,2,-t),this}saturate(t){return We(this._rgb,1,t),this}desaturate(t){return We(this._rgb,1,-t),this}rotate(t){return ta(this._rgb,t),this}};function on(i){return new Pi(i)}function an(i){if(i&&typeof i=="object"){let t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function ji(i){return an(i)?i:on(i)}function Mi(i){return an(i)?i:on(i).saturate(.5).darken(.1).hexString()}var vt=Object.create(null),Ge=Object.create(null);function ge(i,t){if(!t)return i;let e=t.split(".");for(let s=0,n=e.length;se.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,s)=>Mi(s.backgroundColor),this.hoverBorderColor=(e,s)=>Mi(s.borderColor),this.hoverColor=(e,s)=>Mi(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return wi(this,t,e)}get(t){return ge(this,t)}describe(t,e){return wi(Ge,t,e)}override(t,e){return wi(vt,t,e)}route(t,e,s,n){let o=ge(this,t),a=ge(this,s),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){let l=this[r],c=a[n];return D(l)?Object.assign({},c,l):C(l,c)},set(l){this[r]=l}}})}},O=new Ci({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ca(i){return!i||T(i.size)||T(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function pe(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function rn(i,t,e,s){s=s||{};let n=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(n=s.data={},o=s.garbageCollect=[],s.font=t),i.save(),i.font=t;let a=0,r=e.length,l,c,h,d,u;for(l=0;le.length){for(l=0;l0&&i.stroke()}}function $t(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&o.strokeColor!=="",l,c;for(i.save(),i.font=n.string,ha(i,o),l=0;l+i||0;function Je(i,t){let e={},s=D(t),n=s?Object.keys(t):t,o=D(i)?s?a=>C(i[a],i[t[a]]):a=>i[a]:()=>i;for(let a of n)e[a]=pa(o(a));return e}function Xi(i){return Je(i,{top:"y",right:"x",bottom:"y",left:"x"})}function kt(i){return Je(i,["topLeft","topRight","bottomLeft","bottomRight"])}function U(i){let t=Xi(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function $(i,t){i=i||{},t=t||O.font;let e=C(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=C(i.style,t.style);s&&!(""+s).match(fa)&&(console.warn('Invalid font style specified: "'+s+'"'),s="");let n={family:C(i.family,t.family),lineHeight:ga(C(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:C(i.weight,t.weight),string:""};return n.string=ca(n),n}function Gt(i,t,e,s){let n=!0,o,a,r;for(o=0,a=i.length;oe&&r===0?0:r+l;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function pt(i,t){return Object.assign(Object.create(i),t)}function Qe(i,t=[""],e=i,s,n=()=>i[0]){J(s)||(s=fn("_fallback",i));let o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:e,_fallback:s,_getTarget:n,override:a=>Qe([a,...i],t,e,s)};return new Proxy(o,{deleteProperty(a,r){return delete a[r],delete a._keys,delete i[0][r],!0},get(a,r){return dn(a,r,()=>wa(r,t,i,a))},getOwnPropertyDescriptor(a,r){return Reflect.getOwnPropertyDescriptor(a._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,r){return zs(a).includes(r)},ownKeys(a){return zs(a)},set(a,r,l){let c=a._storage||(a._storage=n());return a[r]=c[r]=l,delete a._keys,!0}})}function Tt(i,t,e,s){let n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:Ui(i,s),setContext:o=>Tt(i,o,e,s),override:o=>Tt(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,a){return delete o[a],delete i[a],!0},get(o,a,r){return dn(o,a,()=>ba(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(i,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,a)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,a){return Reflect.has(i,a)},ownKeys(){return Reflect.ownKeys(i)},set(o,a,r){return i[a]=r,delete o[a],!0}})}function Ui(i,t={scriptable:!0,indexable:!0}){let{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:ft(e)?e:()=>e,isIndexable:ft(s)?s:()=>s}}var ma=(i,t)=>i?i+Xe(t):t,Ki=(i,t)=>D(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function dn(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];let s=e();return i[t]=s,s}function ba(i,t,e){let{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=i,r=s[t];return ft(r)&&a.isScriptable(t)&&(r=_a(t,r,i,e)),I(r)&&r.length&&(r=xa(t,r,i,a.isIndexable)),Ki(t,r)&&(r=Tt(r,n,o&&o[t],a)),r}function _a(i,t,e,s){let{_proxy:n,_context:o,_subProxy:a,_stack:r}=e;if(r.has(i))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+i);return r.add(i),t=t(o,a||s),r.delete(i),Ki(i,t)&&(t=qi(n._scopes,n,i,t)),t}function xa(i,t,e,s){let{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=e;if(J(o.index)&&s(i))t=t[o.index%t.length];else if(D(t[0])){let l=t,c=n._scopes.filter(h=>h!==l);t=[];for(let h of l){let d=qi(c,n,i,h);t.push(Tt(d,o,a&&a[i],r))}}return t}function un(i,t,e){return ft(i)?i(t,e):i}var ya=(i,t)=>i===!0?t:typeof i=="string"?gt(t,i):void 0;function va(i,t,e,s,n){for(let o of t){let a=ya(e,o);if(a){i.add(a);let r=un(a._fallback,e,n);if(J(r)&&r!==e&&r!==s)return r}else if(a===!1&&J(s)&&e!==s)return null}return!1}function qi(i,t,e,s){let n=t._rootScopes,o=un(t._fallback,e,s),a=[...i,...n],r=new Set;r.add(s);let l=Is(r,a,e,o||e,s);return l===null||J(o)&&o!==e&&(l=Is(r,a,o,l,s),l===null)?!1:Qe(Array.from(r),[""],n,o,()=>Ma(t,e,s))}function Is(i,t,e,s,n){for(;e;)e=va(i,t,e,s,n);return e}function Ma(i,t,e){let s=i._getTarget();t in s||(s[t]={});let n=s[t];return I(n)&&D(e)?e:n}function wa(i,t,e,s){let n;for(let o of t)if(n=fn(ma(o,i),e),J(n))return Ki(i,n)?qi(e,s,i,n):n}function fn(i,t){for(let e of t){if(!e)continue;let s=e[i];if(J(s))return s}}function zs(i){let t=i._keys;return t||(t=i._keys=ka(i._scopes)),t}function ka(i){let t=new Set;for(let e of i)for(let s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}function Gi(i,t,e,s){let{iScale:n}=i,{key:o="r"}=this._parsing,a=new Array(s),r,l,c,h;for(r=0,l=s;rti==="x"?"y":"x";function Pa(i,t,e,s){let n=i.skip?t:i,o=t,a=e.skip?t:e,r=$e(o,n),l=$e(a,o),c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;let d=s*c,u=s*h;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function Ca(i,t,e){let s=i.length,n,o,a,r,l,c=Yt(i,0);for(let h=0;h!c.skip)),t.cubicInterpolationMode==="monotone")Oa(i,n);else{let c=s?i[i.length-1]:i[0];for(o=0,a=i.length;owindow.getComputedStyle(i,null);function Ta(i,t){return ei(i).getPropertyValue(t)}var La=["top","right","bottom","left"];function At(i,t,e){let s={};e=e?"-"+e:"";for(let n=0;n<4;n++){let o=La[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}var Ra=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function Ea(i,t){let e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s,a=!1,r,l;if(Ra(n,o,i.target))r=n,l=o;else{let c=t.getBoundingClientRect();r=s.clientX-c.left,l=s.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function St(i,t){if("native"in i)return i;let{canvas:e,currentDevicePixelRatio:s}=t,n=ei(e),o=n.boxSizing==="border-box",a=At(n,"padding"),r=At(n,"border","width"),{x:l,y:c,box:h}=Ea(i,e),d=a.left+(h&&r.left),u=a.top+(h&&r.top),{width:f,height:g}=t;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*e.width/s),y:Math.round((c-u)/g*e.height/s)}}function Fa(i,t,e){let s,n;if(t===void 0||e===void 0){let o=ti(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{let a=o.getBoundingClientRect(),r=ei(o),l=At(r,"border","width"),c=At(r,"padding");t=a.width-c.width-l.width,e=a.height-c.height-l.height,s=Ye(r.maxWidth,o,"clientWidth"),n=Ye(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||je,maxHeight:n||je}}var ki=i=>Math.round(i*10)/10;function mn(i,t,e,s){let n=ei(i),o=At(n,"margin"),a=Ye(n.maxWidth,i,"clientWidth")||je,r=Ye(n.maxHeight,i,"clientHeight")||je,l=Fa(i,t,e),{width:c,height:h}=l;if(n.boxSizing==="content-box"){let d=At(n,"border","width"),u=At(n,"padding");c-=u.width+d.width,h-=u.height+d.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?Math.floor(c/s):h-o.height),c=ki(Math.min(c,a,l.maxWidth)),h=ki(Math.min(h,r,l.maxHeight)),c&&!h&&(h=ki(c/2)),{width:c,height:h}}function Ji(i,t,e){let s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=n/s,i.width=o/s;let a=i.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${i.height}px`,a.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||a.height!==n||a.width!==o?(i.currentDevicePixelRatio=s,a.height=n,a.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}var bn=function(){let i=!1;try{let t={get passive(){return i=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return i}();function Qi(i,t){let e=Ta(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function _t(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function _n(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function xn(i,t,e,s){let n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},a=_t(i,n,e),r=_t(n,o,e),l=_t(o,t,e),c=_t(a,r,e),h=_t(r,l,e);return _t(c,h,e)}var Bs=new Map;function Ia(i,t){t=t||{};let e=i+JSON.stringify(t),s=Bs.get(e);return s||(s=new Intl.NumberFormat(i,t),Bs.set(e,s)),s}function Zt(i,t,e){return Ia(t,e).format(i)}var za=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},Ba=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function Rt(i,t,e){return i?za(t,e):Ba()}function ts(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function es(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function yn(i){return i==="angle"?{between:Kt,compare:Wo,normalize:G}:{between:lt,compare:(t,e)=>t-e,normalize:t=>t}}function Vs({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function Va(i,t,e){let{property:s,start:n,end:o}=e,{between:a,normalize:r}=yn(s),l=t.length,{start:c,end:h,loop:d}=i,u,f;if(d){for(c+=l,h+=l,u=0,f=l;ul(n,v,b)&&r(n,v)!==0,x=()=>r(o,b)===0||l(o,v,b),M=()=>p||y(),w=()=>!p||x();for(let S=h,k=h;S<=d;++S)_=t[S%a],!_.skip&&(b=c(_[s]),b!==v&&(p=l(b,n,o),m===null&&M()&&(m=r(b,n)===0?S:k),m!==null&&w()&&(g.push(Vs({start:m,end:S,loop:u,count:a,style:f})),m=null),k=S,v=b));return m!==null&&g.push(Vs({start:m,end:d,loop:u,count:a,style:f})),g}function ss(i,t){let e=[],s=i.segments;for(let n=0;nn&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function Na(i,t,e,s){let n=i.length,o=[],a=t,r=i[t],l;for(l=t+1;l<=e;++l){let c=i[l%n];c.skip||c.stop?r.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=a=c.stop?l:null):(a=l,r.skip&&(t=l)),r=c}return a!==null&&o.push({start:t%n,end:a%n,loop:s}),o}function vn(i,t){let e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];let o=!!i._loop,{start:a,end:r}=Wa(e,n,o,s);if(s===!0)return Ws(i,[{start:a,end:r,loop:o}],e,t);let l=rr({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(s-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Ii.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;let o=s.items,a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){let e=this._charts,s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let s=e.items,n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},mt=new fs,Mn="transparent",$a={boolean(i,t,e){return e>.5?t:i},color(i,t,e){let s=ji(i||Mn),n=s.valid&&ji(t||Mn);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}},gs=class{constructor(t,e,s,n){let o=e[s];n=Gt([t.to,n,o,t.from]);let a=Gt([t.from,o,n]);this._active=!0,this._fn=t.fn||$a[t.type||typeof a],this._easing=Ht[t.easing]||Ht.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);let n=this._target[this._prop],o=s-this._start,a=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Gt([t.to,e,n,t.from]),this._from=Gt([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e=t-this._start,s=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to,l;if(this._active=o!==r&&(a||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,r,l)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){let e=t?"res":"rej",s=this._promises||[];for(let n=0;ni!=="onProgress"&&i!=="onComplete"&&i!=="fn"});O.set("animations",{colors:{type:"color",properties:Xa},numbers:{type:"number",properties:Ya}});O.describe("animations",{_fallback:"animation"});O.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:i=>i|0}}}});var ci=class{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!D(t))return;let e=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{let n=t[s];if(!D(n))return;let o={};for(let a of Ua)o[a]=n[a];(I(n.properties)&&n.properties||[s]).forEach(a=>{(a===s||!e.has(a))&&e.set(a,o)})})}_animateOptions(t,e){let s=e.options,n=qa(t,s);if(!n)return[];let o=this._createAnimations(n,s);return s.$shared&&Ka(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){let s=this._properties,n=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now(),l;for(l=a.length-1;l>=0;--l){let c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}let h=e[c],d=o[c],u=s.get(c);if(d)if(u&&d.active()){d.update(u,h,r);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new gs(u,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}let s=this._createAnimations(t,e);if(s.length)return mt.add(this._chart,s),!0}};function Ka(i,t){let e=[],s=Object.keys(t);for(let n=0;n0||!e&&o<0)return n.index}return null}function Cn(i,t){let{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,c=a.axis,h=Qa(o,a,s),d=t.length,u;for(let f=0;fe[s].axis===t).shift()}function ir(i,t){return pt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function sr(i,t,e){return pt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function ye(i,t){let e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(let n of t){let o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e]}}}var os=i=>i==="reset"||i==="none",Dn=(i,t)=>t?i:Object.assign({},i),nr=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:go(e,!0),values:null},et=class{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Sn(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&ye(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,u,f,g)=>d==="x"?u:d==="r"?g:f,o=e.xAxisID=C(s.xAxisID,ns(t,"x")),a=e.yAxisID=C(s.yAxisID,ns(t,"y")),r=e.rAxisID=C(s.rAxisID,ns(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,a,r),h=e.vAxisID=n(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Ei(this._data,this),t._stacked&&ye(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(D(e))this._data=Ja(e);else if(s!==e){if(s){Ei(s,this);let n=this._cachedMeta;ye(n),n._parsed=[]}e&&Object.isExtensible(e)&&Js(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,s=this.getDataset(),n=!1;this._dataCheck();let o=e._stacked;e._stacked=Sn(e.vScale,e),e.stack!==s.stack&&(n=!0,ye(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&Cn(this,e._parsed)}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:a}=s,r=o.axis,l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,u;if(this._parsing===!1)s._parsed=n,s._sorted=!0,u=n;else{I(n[t])?u=this.parseArrayData(s,n,t,e):D(n[t])?u=this.parseObjectData(s,n,t,e):u=this.parsePrimitiveData(s,n,t,e);let f=()=>d[r]===null||c&&d[r]p||d=0;--u)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){let e=this._cachedMeta._parsed,s=[],n,o,a;for(n=0,o=e.length;n=0&&tthis.getContext(s,n),p=c.resolveNamedOptions(u,f,g,d);return p.$shared&&(p.$shared=l,o[a]=Object.freeze(Dn(p,l))),p}_resolveAnimations(t,e,s){let n=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(n.options.animation!==!1){let h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,s,e))}let c=new ci(n,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||os(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),a=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:a}}updateElement(t,e,s,n){os(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!os(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;let o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,s=this._cachedMeta.data;for(let[r,l,c]of this._syncList)this[r](l,c);this._syncList=[];let n=s.length,o=e.length,a=Math.min(o,n);a&&this.parse(0,a),o>n?this._insertElements(n,o-n,t):o{for(c.length+=e,r=c.length-1;r>=a;r--)c[r]=c[r-e]};for(l(o),r=t;rn-o))}return i._cache.$bar}function ar(i){let t=i.iScale,e=or(t,i.type),s=t._length,n,o,a,r,l=()=>{a===32767||a===-32768||(J(r)&&(s=Math.min(s,Math.abs(a-r)||s)),r=a)};for(n=0,o=e.length;n0?n[i-1]:null,r=iMath.abs(r)&&(l=r,c=a),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:o,min:a,max:r}}function po(i,t,e,s){return I(i)?cr(i,t,e,s):t[e.axis]=e.parse(i,s),t}function On(i,t,e,s){let n=i.iScale,o=i.vScale,a=n.getLabels(),r=n===o,l=[],c,h,d,u;for(c=e,h=e+s;c=e?1:-1)}function dr(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.basel.controller.options.grouped),o=s.options.stacked,a=[],r=l=>{let c=l.controller.getParsed(e),h=c&&c[l.vScale.axis];if(T(h)||isNaN(h))return!0};for(let l of n)if(!(e!==void 0&&r(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,s){let n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){let t=this.options,e=this._cachedMeta,s=e.iScale,n=[],o,a;for(o=0,a=e.data.length;o=0;--s)e=Math.max(e,t[s].size(this.resolveDataElementOptions(s))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,{xScale:s,yScale:n}=e,o=this.getParsed(t),a=s.getLabelForValue(o.x),r=n.getLabelForValue(o.y),l=o._custom;return{label:e.label,value:"("+a+", "+r+(l?", "+l:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,s,n){let o=n==="reset",{iScale:a,vScale:r}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,n),h=a.axis,d=r.axis;for(let u=e;uKt(v,r,l,!0)?1:Math.max(y,y*e,x,x*e),g=(v,y,x)=>Kt(v,r,l,!0)?-1:Math.min(y,y*e,x,x*e),p=f(0,c,d),m=f(V,h,u),b=g(B,c,d),_=g(B+V,h,u);s=(p-b)/2,n=(m-_)/2,o=-(p+b)/2,a=-(m+_)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}var Dt=class extends et{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let o=l=>+s[l];if(D(s[t])){let{key:l="value"}=this._parsing;o=c=>+gt(s[c],l)}let a,r;for(a=t,r=t+e;a0&&!isNaN(t)?F*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=Zt(e._parsed[t],s.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0,s=this.chart,n,o,a,r,l;if(!t){for(n=0,o=s.data.datasets.length;ni!=="spacing",_indexable:i=>i!=="spacing"};Dt.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){let t=i.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:e}}=i.legend.options;return t.labels.map((s,n)=>{let a=i.getDatasetMeta(0).controller.getStyle(n);return{text:s,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(n),index:n}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(i){let t=i.label,e=": "+i.formattedValue;return I(t)?(t=t.slice(),t[0]+=e):t+=e,t}}}}};var ie=class extends et{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:s,data:n=[],_dataset:o}=e,a=this.chart._animationsDisabled,{start:r,count:l}=Bi(e,n,a);this._drawStart=r,this._drawCount=l,Vi(e)&&(r=0,l=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=n;let c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!a,options:c},t),this.updateElements(n,r,l,t)}updateElements(t,e,s,n){let o=n==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,n),u=a.axis,f=r.axis,{spanGaps:g,segment:p}=this.options,m=Lt(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||n==="none",_=e>0&&this.getParsed(e-1);for(let v=e;v0&&Math.abs(x[u]-_[u])>m,p&&(M.parsed=x,M.raw=c.data[v]),d&&(M.options=h||this.resolveDataElementOptions(v,y.active?"active":n)),b||this.updateElement(y,v,M,n),_=x}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;let o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,a)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}};ie.id="line";ie.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};ie.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};var se=class extends et{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=Zt(e._parsed[t].r,s.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,s,n){return Gi.bind(this)(t,e,s,n)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((s,n)=>{let o=this.getParsed(n).r;!isNaN(o)&&this.chart.getDataVisibility(n)&&(oe.max&&(e.max=o))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,s=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),a=Math.max(s.cutoutPercentage?o/100*s.cutoutPercentage:1,0),r=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,s,n){let o=n==="reset",a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*B,f=u,g,p=360/this.countVisibleElements();for(g=0;g{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,s){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,e).angle||s):0}};se.id="polarArea";se.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};se.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){let t=i.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:e}}=i.legend.options;return t.labels.map((s,n)=>{let a=i.getDatasetMeta(0).controller.getStyle(n);return{text:s,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:e,hidden:!i.getDataVisibility(n),index:n}})}return[]}},onClick(i,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(i){return i.chart.data.labels[i.dataIndex]+": "+i.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};var Ce=class extends Dt{};Ce.id="pie";Ce.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};var ne=class extends et{getLabelAndValue(t){let e=this._cachedMeta.vScale,s=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(s[e.axis])}}parseObjectData(t,e,s,n){return Gi.bind(this)(t,e,s,n)}update(t){let e=this._cachedMeta,s=e.dataset,n=e.data||[],o=e.iScale.getLabels();if(s.points=n,t!=="resize"){let a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);let r={_loop:!0,_fullLoop:o.length===n.length,options:a};this.updateElement(s,void 0,r,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,s,n){let o=this._cachedMeta.rScale,a=n==="reset";for(let r=e;r{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}};it.defaults={};it.defaultRoutes=void 0;var mo={values(i){return I(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";let s=this.chart.options.locale,n,o=i;if(e.length>1){let c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=mr(i,e)}let a=tt(Math.abs(o)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Zt(i,s,l)},logarithmic(i,t,e){if(i===0)return"0";let s=i/Math.pow(10,Math.floor(tt(i)));return s===1||s===2||s===5?mo.numeric.call(this,i,t,e):""}};function mr(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var pi={formatters:mo};O.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(i,t)=>t.lineWidth,tickColor:(i,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:pi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});O.route("scale.ticks","color","","color");O.route("scale.grid","color","","borderColor");O.route("scale.grid","borderColor","","borderColor");O.route("scale.title","color","","color");O.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&i!=="callback"&&i!=="parser",_indexable:i=>i!=="borderDash"&&i!=="tickBorderDash"});O.describe("scales",{_fallback:"scale"});O.describe("scale.ticks",{_scriptable:i=>i!=="backdropPadding"&&i!=="callback",_indexable:i=>i!=="backdropPadding"});function br(i,t){let e=i.options.ticks,s=e.maxTicksLimit||_r(i),n=e.major.enabled?yr(t):[],o=n.length,a=n[0],r=n[o-1],l=[];if(o>s)return vr(t,l,n,o/s),l;let c=xr(n,t,s);if(o>0){let h,d,u=o>1?Math.round((r-a)/(o-1)):null;for(ii(t,l,c,T(u)?0:a-u,a),h=0,d=o-1;hn)return l}return Math.max(n,1)}function yr(i){let t=[],e,s;for(e=0,s=i.length;ei==="left"?"right":i==="right"?"left":i,Ln=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e;function Rn(i,t){let e=[],s=i.length/t,n=i.length,o=0;for(;oa+r)))return l}function Sr(i,t){E(i,e=>{let s=e.gc,n=s.length/2,o;if(n>t){for(o=0;os?s:e,s=n&&e>s?e:s,{min:Q(e,Q(s,e)),max:Q(s,Q(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){z(this.options.beforeUpdate,[this])}update(t,e,s){let{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=hn(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=r=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}let h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=Y(this.chart.width-d,0,this.maxWidth);r=t.offset?this.maxWidth/s:f/(s-1),d+6>r&&(r=f/(s-(t.offset?.5:1)),l=this.maxHeight-ve(t.grid)-e.padding-En(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=Ue(Math.min(Math.asin(Y((h.highest.height+6)/r,-1,1)),Math.asin(Y(l/c,-1,1))-Math.asin(Y(u/c,-1,1)))),a=Math.max(n,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){z(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){z(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){let l=En(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=ve(o)+l):(t.height=this.maxHeight,t.width=ve(o)+l),s.display&&this.ticks.length){let{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=s.padding*2,g=nt(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(r){let b=s.mirror?0:m*d.width+p*u.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{let b=s.mirror?0:p*d.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(c,h,m,p)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){let{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),u=0,f=0;l?c?(u=n*t.width,f=s*e.height):(u=s*t.height,f=n*e.width):o==="start"?f=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+a)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+a,this.paddingBottom=d+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){z(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e({width:o[w]||0,height:a[w]||0});return{first:M(0),last:M(e-1),widest:M(y),highest:M(x),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return Ks(this._alignToPixels?Mt(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){let e=this.ticks||[];if(t>=0&&tr*n?r/s:l/n:l*n0}_computeGridLineItems(t){let e=this.axis,s=this.chart,n=this.options,{grid:o,position:a}=n,r=o.offset,l=this.isHorizontal(),h=this.ticks.length+(r?1:0),d=ve(o),u=[],f=o.setContext(this.getContext()),g=f.drawBorder?f.borderWidth:0,p=g/2,m=function(P){return Mt(s,P,g)},b,_,v,y,x,M,w,S,k,L,R,A;if(a==="top")b=m(this.bottom),M=this.bottom-d,S=b-p,L=m(t.top)+p,A=t.bottom;else if(a==="bottom")b=m(this.top),L=t.top,A=m(t.bottom)-p,M=b+p,S=this.top+d;else if(a==="left")b=m(this.right),x=this.right-d,w=b-p,k=m(t.left)+p,R=t.right;else if(a==="right")b=m(this.left),k=t.left,R=m(t.right)-p,x=b+p,w=this.left+d;else if(e==="x"){if(a==="center")b=m((t.top+t.bottom)/2+.5);else if(D(a)){let P=Object.keys(a)[0],j=a[P];b=m(this.chart.scales[P].getPixelForValue(j))}L=t.top,A=t.bottom,M=b+p,S=M+d}else if(e==="y"){if(a==="center")b=m((t.left+t.right)/2);else if(D(a)){let P=Object.keys(a)[0],j=a[P];b=m(this.chart.scales[P].getPixelForValue(j))}x=b-p,w=x-d,k=t.left,R=t.right}let H=C(n.ticks.maxTicksLimit,h),q=Math.max(1,Math.ceil(h/H));for(_=0;_o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){let e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),o,a,r=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,a=n.length;o{this.draw(n)}}]:[{z:s,draw:n=>{this.drawBackground(),this.drawGrid(n),this.drawTitle()}},{z:s+1,draw:()=>{this.drawBorder()}},{z:e,draw:n=>{this.drawLabels(n)}}]}getMatchingVisibleMetas(t){let e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[],o,a;for(o=0,a=e.length;o{let s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");O.route(o,n,l,r)})}function Lr(i){return"id"in i&&"defaults"in i}var ps=class{constructor(){this.controllers=new Qt(et,"datasets",!0),this.elements=new Qt(it,"elements"),this.plugins=new Qt(Object,"plugins"),this.scales=new Qt(Ft,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{let o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):E(n,a=>{let r=s||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,s){let n=Xe(t);z(s["before"+n],[],s),e[t](s),z(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;e0&&this.getParsed(e-1);for(let y=e;y0&&Math.abs(M[f]-v[f])>b,m&&(w.parsed=M,w.raw=c.data[y]),u&&(w.options=d||this.resolveDataElementOptions(y,x.active?"active":n)),_||this.updateElement(x,y,w,n),v=M}this.updateSharedOptions(d,n,h)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let r=0;for(let l=e.length-1;l>=0;--l)r=Math.max(r,e[l].size(this.resolveDataElementOptions(l))/2);return r>0&&r}let s=t.dataset,n=s.options&&s.options.borderWidth||0;if(!e.length)return n;let o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,o,a)/2}};oe.id="scatter";oe.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};oe.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(i){return"("+i.label+", "+i.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Rr=Object.freeze({__proto__:null,BarController:te,BubbleController:ee,DoughnutController:Dt,LineController:ie,PolarAreaController:se,PieController:Ce,RadarController:ne,ScatterController:oe});function Et(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var De=class{constructor(t){this.options=t||{}}init(t){}formats(){return Et()}parse(t,e){return Et()}format(t,e){return Et()}add(t,e,s){return Et()}diff(t,e,s){return Et()}startOf(t,e,s){return Et()}endOf(t,e){return Et()}};De.override=function(i){Object.assign(De.prototype,i)};var Er={_date:De};function Fr(i,t,e,s){let{controller:n,data:o,_sorted:a}=i,r=n._cachedMeta.iScale;if(r&&t===r.axis&&t!=="r"&&a&&o.length){let l=r._reversePixels?qs:at;if(s){if(n._sharedOptions){let c=o[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){let d=l(o,t,e-h),u=l(o,t,e+h);return{lo:d.lo,hi:u.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function Fe(i,t,e,s,n){let o=i.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r{l[a](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(t.x,t.y,n))}),s&&!r?[]:o}var Vr={evaluateInteractionItems:Fe,modes:{index(i,t,e,s){let n=St(t,i),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?rs(i,n,o,s,a):ls(i,n,o,!1,s,a),l=[];return r.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{let h=r[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){let n=St(t,i),o=e.axis||"xy",a=e.includeInvisible||!1,r=e.intersect?rs(i,n,o,s,a):ls(i,n,o,!1,s,a);if(r.length>0){let l=r[0].datasetIndex,c=i.getDatasetMeta(l).data;r=[];for(let h=0;he.pos===t)}function In(i,t){return i.filter(e=>bo.indexOf(e.pos)===-1&&e.box.axis===t)}function we(i,t){return i.sort((e,s)=>{let n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function Wr(i){let t=[],e,s,n,o,a,r;for(e=0,s=(i||[]).length;ec.box.fullSize),!0),s=we(Me(t,"left"),!0),n=we(Me(t,"right")),o=we(Me(t,"top"),!0),a=we(Me(t,"bottom")),r=In(t,"x"),l=In(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:Me(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}function zn(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function _o(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function $r(i,t,e,s){let{pos:n,box:o}=e,a=i.maxPadding;if(!D(n)){e.size&&(i[n]-=e.size);let d=s[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[n]+=e.size}o.getPadding&&_o(a,o.getPadding());let r=Math.max(0,t.outerWidth-zn(a,i,"left","right")),l=Math.max(0,t.outerHeight-zn(a,i,"top","bottom")),c=r!==i.w,h=l!==i.h;return i.w=r,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Yr(i){let t=i.maxPadding;function e(s){let n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Xr(i,t){let e=t.maxPadding;function s(n){let o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return s(i?["left","right"]:["top","bottom"])}function Se(i,t,e,s){let n=[],o,a,r,l,c,h;for(o=0,a=i.length,c=0;o{typeof p.beforeLayout=="function"&&p.beforeLayout()});let h=l.reduce((p,m)=>m.box.options&&m.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},n);_o(u,U(s));let f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),g=Hr(l.concat(c),d);Se(r.fullSize,f,d,g),Se(l,f,d,g),Se(c,f,d,g)&&Se(l,f,d,g),Yr(f),Bn(r.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,Bn(r.rightAndBottom,f,d,g),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},E(r.chartArea,p=>{let m=p.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},hi=class{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}},ms=class extends hi{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},li="$chartjs",Ur={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Vn=i=>i===null||i==="";function Kr(i,t){let e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[li]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Vn(n)){let o=Qi(i,"width");o!==void 0&&(i.width=o)}if(Vn(s))if(i.style.height==="")i.height=i.width/(t||2);else{let o=Qi(i,"height");o!==void 0&&(i.height=o)}return i}var xo=bn?{passive:!0}:!1;function qr(i,t,e){i.addEventListener(t,e,xo)}function Gr(i,t,e){i.canvas.removeEventListener(t,e,xo)}function Zr(i,t){let e=Ur[i.type]||i.type,{x:s,y:n}=St(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function di(i,t){for(let e of i)if(e===t||e.contains(t))return!0}function Jr(i,t,e){let s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||di(r.addedNodes,s),a=a&&!di(r.removedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function Qr(i,t,e){let s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||di(r.removedNodes,s),a=a&&!di(r.addedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}var Oe=new Map,Wn=0;function yo(){let i=window.devicePixelRatio;i!==Wn&&(Wn=i,Oe.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function tl(i,t){Oe.size||window.addEventListener("resize",yo),Oe.set(i,t)}function el(i){Oe.delete(i),Oe.size||window.removeEventListener("resize",yo)}function il(i,t,e){let s=i.canvas,n=s&&ti(s);if(!n)return;let o=zi((r,l)=>{let c=n.clientWidth;e(r,l),c{let l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(n),tl(i,o),a}function cs(i,t,e){e&&e.disconnect(),t==="resize"&&el(i)}function sl(i,t,e){let s=i.canvas,n=zi(o=>{i.ctx!==null&&e(Zr(o,i))},i,o=>{let a=o[0];return[a,a.offsetX,a.offsetY]});return qr(s,t,n),n}var bs=class extends hi{acquireContext(t,e){let s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(Kr(t,e),s):null}releaseContext(t){let e=t.canvas;if(!e[li])return!1;let s=e[li].initial;["height","width"].forEach(o=>{let a=s[o];T(a)?e.removeAttribute(o):e.setAttribute(o,a)});let n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[li],!0}addEventListener(t,e,s){this.removeEventListener(t,e);let n=t.$proxies||(t.$proxies={}),a={attach:Jr,detach:Qr,resize:il}[e]||sl;n[e]=a(t,e,s)}removeEventListener(t,e){let s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:cs,detach:cs,resize:cs}[e]||Gr)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return mn(t,e,s,n)}isAttached(t){let e=ti(t);return!!(e&&e.isConnected)}};function nl(i){return!Zi()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?ms:bs}var _s=class{constructor(){this._init=[]}notify(t,e,s,n){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));let o=n?this._descriptors(t).filter(n):this._descriptors(t),a=this._notify(o,t,e,s);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,s,n){n=n||{};for(let o of t){let a=o.plugin,r=a[s],l=[e,n,o.options];if(z(r,l,a)===!1&&n.cancelable)return!1}return!0}invalidate(){T(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){let s=t&&t.config,n=C(s.options&&s.options.plugins,{}),o=ol(s);return n===!1&&!e?[]:rl(t,o,n,e)}_notifyStateChanges(t){let e=this._oldCache||[],s=this._cache,n=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}};function ol(i){let t={},e=[],s=Object.keys(ht.plugins.items);for(let o=0;o{let l=s[r];if(!D(l))return console.error(`Invalid scale configuration for scale: ${r}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);let c=ys(r,l),h=hl(c,n),d=e.scales||{};o[c]=o[c]||r,a[r]=Xt(Object.create(null),[{axis:c},l,d[c],d[h]])}),i.data.datasets.forEach(r=>{let l=r.type||i.type,c=r.indexAxis||xs(l,t),d=(vt[l]||{}).scales||{};Object.keys(d).forEach(u=>{let f=cl(u,c),g=r[f+"AxisID"]||o[f]||f;a[g]=a[g]||Object.create(null),Xt(a[g],[{axis:f},s[g],d[u]])})}),Object.keys(a).forEach(r=>{let l=a[r];Xt(l,[O.scales[l.type],O.scale])}),a}function vo(i){let t=i.options||(i.options={});t.plugins=C(t.plugins,{}),t.scales=ul(i,t)}function Mo(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function fl(i){return i=i||{},i.data=Mo(i.data),vo(i),i}var Nn=new Map,wo=new Set;function ni(i,t){let e=Nn.get(i);return e||(e=t(),Nn.set(i,e),wo.add(e)),e}var ke=(i,t,e)=>{let s=gt(t,e);s!==void 0&&i.add(s)},vs=class{constructor(t){this._config=fl(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Mo(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),vo(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ni(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return ni(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return ni(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,s=this.type;return ni(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let s=this._scopeCache,n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){let{options:n,type:o}=this,a=this._cachedScopes(t,s),r=a.get(e);if(r)return r;let l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>ke(l,t,d))),h.forEach(d=>ke(l,n,d)),h.forEach(d=>ke(l,vt[o]||{},d)),h.forEach(d=>ke(l,O,d)),h.forEach(d=>ke(l,Ge,d))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),wo.has(e)&&a.set(e,c),c}chartOptionScopes(){let{options:t,type:e}=this;return[t,vt[e]||{},O.datasets[e]||{},{type:e},O,Ge]}resolveNamedOptions(t,e,s,n=[""]){let o={$shared:!0},{resolver:a,subPrefixes:r}=Hn(this._resolverCache,t,n),l=a;if(pl(a,e)){o.$shared=!1,s=ft(s)?s():s;let c=this.createResolver(t,s,r);l=Tt(a,s,c)}for(let c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){let{resolver:o}=Hn(this._resolverCache,t,s);return D(e)?Tt(o,e,void 0,n):o}};function Hn(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));let n=e.join(),o=s.get(n);return o||(o={resolver:Qe(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},s.set(n,o)),o}var gl=i=>D(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||ft(i[e]),!1);function pl(i,t){let{isScriptable:e,isIndexable:s}=Ui(i);for(let n of t){let o=e(n),a=s(n),r=(a||o)&&i[n];if(o&&(ft(r)||gl(r))||a&&I(r))return!0}return!1}var ml="3.9.1",bl=["top","bottom","left","right","chartArea"];function jn(i,t){return i==="top"||i==="bottom"||bl.indexOf(i)===-1&&t==="x"}function $n(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function Yn(i){let t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),z(e&&e.onComplete,[i],t)}function _l(i){let t=i.chart,e=t.options.animation;z(e&&e.onProgress,[i],t)}function ko(i){return Zi()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}var ui={},So=i=>{let t=ko(i);return Object.values(ui).filter(e=>e.canvas===t).pop()};function xl(i,t,e){let s=Object.keys(i);for(let n of s){let o=+n;if(o>=t){let a=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=a)}}}function yl(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}var It=class{constructor(t,e){let s=this.config=new vs(e),n=ko(t),o=So(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");let a=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||nl(n)),this.platform.updateConfig(s);let r=this.platform.acquireContext(n,a.aspectRatio),l=r&&r.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Hs(),this.ctx=r,this.canvas=l,this.width=h,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new _s,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Qs(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],ui[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}mt.listen(this,"complete",Yn),mt.listen(this,"progress",_l),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return T(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ji(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return $i(this.canvas,this.ctx),this}stop(){return mt.stop(this),this}resize(t,e){mt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,o),r=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Ji(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),z(s.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};E(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){let t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((a,r)=>(a[r]=!1,a),{}),o=[];e&&(o=o.concat(Object.keys(e).map(a=>{let r=e[a],l=ys(a,r),c=l==="r",h=l==="x";return{options:r,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),E(o,a=>{let r=a.options,l=r.id,c=ys(l,r),h=C(r.type,a.dtype);(r.position===void 0||jn(r.position,c)!==jn(a.dposition))&&(r.position=a.dposition),n[l]=!0;let d=null;if(l in s&&s[l].type===h)d=s[l];else{let u=ht.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(r,t)}),E(n,(a,r)=>{a||delete s[r]}),E(s,a=>{K.configure(this,a,a.options),K.addBox(this,a)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort($n("z","_idx"));let{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){E(this.scales,t=>{K.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Oi(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:s,start:n,count:o}of e){let a=s==="_removeElements"?-o:o;xl(t,n,a)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,s=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),n=s(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;K.update(this,this.width,this.height,t);let e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],E(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,s=t._clip,n=!s.disabled,o=this.chartArea,a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(n&&_e(e,{left:s.left===!1?0:o.left-s.left,right:s.right===!1?this.width:o.right+s.right,top:s.top===!1?0:o.top-s.top,bottom:s.bottom===!1?this.height:o.bottom+s.bottom}),t.controller.draw(),n&&xe(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return $t(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){let o=Vr.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){let e=this.data.datasets[t],s=this._metasets,n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=pt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){let s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){let n=s?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,n);J(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),a.update(o,{visible:s}),this.update(r=>r.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),mt.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,o,a),t[o]=a},n=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};E(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)},a,r=()=>{n("attach",r),this.attached=!0,this.resize(),s("resize",o),s("detach",a)};a=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){E(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},E(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){let n=s?"set":"remove",o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,l=t.length;r{let r=this.getDatasetMeta(o);if(!r)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:r.data[a],index:a}});!me(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}_updateHoverStyles(t,e,s){let n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),a=o(e,t),r=s?t:o(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){let s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;let o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){let{_active:n=[],options:o}=this,a=e,r=this._getActiveElements(t,n,s,a),l=Ys(t),c=yl(t,this._lastEvent,s,l);s&&(this._lastEvent=null,z(o.onHover,[t,r,this],this),l&&z(o.onClick,[t,r,this],this));let h=!me(r,n);return(h||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;let o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}},Xn=()=>E(It.instances,i=>i._plugins.invalidate()),Pt=!0;Object.defineProperties(It,{defaults:{enumerable:Pt,value:O},instances:{enumerable:Pt,value:ui},overrides:{enumerable:Pt,value:vt},registry:{enumerable:Pt,value:ht},version:{enumerable:Pt,value:ml},getChart:{enumerable:Pt,value:So},register:{enumerable:Pt,value:(...i)=>{ht.add(...i),Xn()}},unregister:{enumerable:Pt,value:(...i)=>{ht.remove(...i),Xn()}}});function Po(i,t,e){let{startAngle:s,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=t,c=n/r;i.beginPath(),i.arc(o,a,r,s-c,e+c),l>n?(c=n/l,i.arc(o,a,l,e+c,s-c,!0)):i.arc(o,a,n,e+V,s-V),i.closePath(),i.clip()}function vl(i){return Je(i,["outerStart","outerEnd","innerStart","innerEnd"])}function Ml(i,t,e,s){let n=vl(i.options.borderRadius),o=(e-t)/2,a=Math.min(o,s*t/2),r=l=>{let c=(e-Math.min(o,l))*s/2;return Y(l,0,Math.min(o,c))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:Y(n.innerStart,0,a),innerEnd:Y(n.innerEnd,0,a)}}function Jt(i,t,e,s){return{x:e+i*Math.cos(t),y:s+i*Math.sin(t)}}function Ms(i,t,e,s,n,o){let{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:h}=t,d=Math.max(t.outerRadius+s+e-c,0),u=h>0?h+s+e+c:0,f=0,g=n-l;if(s){let P=h>0?h-s:0,j=d>0?d-s:0,N=(P+j)/2,Ot=N!==0?g*N/(N+s):g;f=(g-Ot)/2}let p=Math.max(.001,g*d-e/B)/d,m=(g-p)/2,b=l+m+f,_=n-m-f,{outerStart:v,outerEnd:y,innerStart:x,innerEnd:M}=Ml(t,u,d,_-b),w=d-v,S=d-y,k=b+v/w,L=_-y/S,R=u+x,A=u+M,H=b+x/R,q=_-M/A;if(i.beginPath(),o){if(i.arc(a,r,d,k,L),y>0){let N=Jt(S,L,a,r);i.arc(N.x,N.y,y,L,_+V)}let P=Jt(A,_,a,r);if(i.lineTo(P.x,P.y),M>0){let N=Jt(A,q,a,r);i.arc(N.x,N.y,M,_+V,q+Math.PI)}if(i.arc(a,r,u,_-M/u,b+x/u,!0),x>0){let N=Jt(R,H,a,r);i.arc(N.x,N.y,x,H+Math.PI,b-V)}let j=Jt(w,b,a,r);if(i.lineTo(j.x,j.y),v>0){let N=Jt(w,k,a,r);i.arc(N.x,N.y,v,b-V,k)}}else{i.moveTo(a,r);let P=Math.cos(k)*d+a,j=Math.sin(k)*d+r;i.lineTo(P,j);let N=Math.cos(L)*d+a,Ot=Math.sin(L)*d+r;i.lineTo(N,Ot)}i.closePath()}function wl(i,t,e,s,n){let{fullCircles:o,startAngle:a,circumference:r}=t,l=t.endAngle;if(o){Ms(i,t,e,s,a+F,n);for(let c=0;c=F||Kt(o,r,l),p=lt(a,c+u,h+u);return g&&p}getCenterPoint(t){let{x:e,y:s,startAngle:n,endAngle:o,innerRadius:a,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:c}=this.options,h=(n+o)/2,d=(a+r+c+l)/2;return{x:e+Math.cos(h)*d,y:s+Math.sin(h)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){let{options:e,circumference:s}=this,n=(e.offset||0)/2,o=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=s>F?Math.floor(s/F):0,s===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let r=0;if(n){r=n/2;let c=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(c)*r,Math.sin(c)*r),this.circumference>=B&&(r=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;let l=wl(t,this,r,o,a);Sl(t,this,r,o,l,a),t.restore()}};ae.id="arc";ae.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};ae.defaultRoutes={backgroundColor:"backgroundColor"};function Co(i,t,e=t){i.lineCap=C(e.borderCapStyle,t.borderCapStyle),i.setLineDash(C(e.borderDash,t.borderDash)),i.lineDashOffset=C(e.borderDashOffset,t.borderDashOffset),i.lineJoin=C(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=C(e.borderWidth,t.borderWidth),i.strokeStyle=C(e.borderColor,t.borderColor)}function Pl(i,t,e){i.lineTo(e.x,e.y)}function Cl(i){return i.stepped?ln:i.tension||i.cubicInterpolationMode==="monotone"?cn:Pl}function Do(i,t,e={}){let s=i.length,{start:n=0,end:o=s-1}=e,{start:a,end:r}=t,l=Math.max(n,a),c=Math.min(o,r),h=nr&&o>r;return{count:s,start:l,loop:t.loop,ilen:c(a+(c?r-y:y))%o,v=()=>{p!==m&&(i.lineTo(h,m),i.lineTo(h,p),i.lineTo(h,b))};for(l&&(f=n[_(0)],i.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=n[_(u)],f.skip)continue;let y=f.x,x=f.y,M=y|0;M===g?(xm&&(m=x),h=(d*h+y)/++d):(v(),i.lineTo(y,x),g=M,d=0,p=m=x),b=x}v()}function ws(i){let t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Ol:Dl}function Al(i){return i.stepped?_n:i.tension||i.cubicInterpolationMode==="monotone"?xn:_t}function Tl(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),Co(i,t.options),i.stroke(n)}function Ll(i,t,e,s){let{segments:n,options:o}=t,a=ws(t);for(let r of n)Co(i,o,r.style),i.beginPath(),a(i,t,r,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}var Rl=typeof Path2D=="function";function El(i,t,e,s){Rl&&!t.options.segment?Tl(i,t,e,s):Ll(i,t,e,s)}var dt=class extends it{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){let s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){let n=s.spanGaps?this._loop:this._fullLoop;pn(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=vn(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){let s=this.options,n=t[e],o=this.points,a=ss(this,{property:e,start:n,end:n});if(!a.length)return;let r=[],l=Al(s),c,h;for(c=0,h=a.length;ci!=="borderDash"&&i!=="fill"};function Un(i,t,e,s){let n=i.options,{[e]:o}=i.getProps([e],s);return Math.abs(t-o)=e)return i.slice(t,t+e);let a=[],r=(e-2)/(o-2),l=0,c=t+e-1,h=t,d,u,f,g,p;for(a[l++]=i[h],d=0;df&&(f=g,u=i[_],p=_);a[l++]=u,h=p}return a[l++]=i[c],a}function Hl(i,t,e,s){let n=0,o=0,a,r,l,c,h,d,u,f,g,p,m=[],b=t+e-1,_=i[t].x,y=i[b].x-_;for(a=t;ap&&(p=c,u=a),n=(o*n+r.x)/++o;else{let M=a-1;if(!T(d)&&!T(u)){let w=Math.min(d,u),S=Math.max(d,u);w!==f&&w!==M&&m.push({...i[w],x:n}),S!==f&&S!==M&&m.push({...i[S],x:n})}a>0&&M!==f&&m.push(i[M]),m.push(r),h=x,o=0,g=p=c,d=u=f=a}}return m}function Ao(i){if(i._decimated){let t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{value:t})}}function Kn(i){i.data.datasets.forEach(t=>{Ao(t)})}function jl(i,t){let e=t.length,s=0,n,{iScale:o}=i,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(s=Y(at(t,o.axis,a).lo,0,e-1)),c?n=Y(at(t,o.axis,r).hi+1,s,e)-s:n=e-s,{start:s,count:n}}var $l={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){Kn(i);return}let s=i.width;i.data.datasets.forEach((n,o)=>{let{_data:a,indexAxis:r}=n,l=i.getDatasetMeta(o),c=a||n.data;if(Gt([r,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let h=i.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||i.options.parsing)return;let{start:d,count:u}=jl(l,c),f=e.threshold||4*s;if(u<=f){Ao(n);return}T(a)&&(n._data=c,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let g;switch(e.algorithm){case"lttb":g=Nl(c,d,u,s,e);break;case"min-max":g=Hl(c,d,u,s);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=g})},destroy(i){Kn(i)}};function Yl(i,t,e){let s=i.segments,n=i.points,o=t.points,a=[];for(let r of s){let{start:l,end:c}=r;c=Ps(l,c,n);let h=ks(e,n[l],n[c],r.loop);if(!t.segments){a.push({source:r,target:h,start:n[l],end:n[c]});continue}let d=ss(t,h);for(let u of d){let f=ks(e,o[u.start],o[u.end],u.loop),g=is(r,n,f);for(let p of g)a.push({source:p,target:u,start:{[e]:qn(h,f,"start",Math.max)},end:{[e]:qn(h,f,"end",Math.min)}})}}return a}function ks(i,t,e,s){if(s)return;let n=t[i],o=e[i];return i==="angle"&&(n=G(n),o=G(o)),{property:i,start:n,end:o}}function Xl(i,t){let{x:e=null,y:s=null}=i||{},n=t.points,o=[];return t.segments.forEach(({start:a,end:r})=>{r=Ps(a,r,n);let l=n[a],c=n[r];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function Ps(i,t,e){for(;t>i;t--){let s=e[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function qn(i,t,e,s){return i&&t?s(i[e],t[e]):i?i[e]:t?t[e]:0}function To(i,t){let e=[],s=!1;return I(i)?(s=!0,e=i):e=Xl(i,t),e.length?new dt({points:e,options:{tension:0},_loop:s,_fullLoop:s}):null}function Gn(i){return i&&i.fill!==!1}function Ul(i,t,e){let n=i[t].fill,o=[t],a;if(!e)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!W(n))return n;if(a=i[n],!a)return!1;if(a.visible)return n;o.push(n),n=a.fill}return!1}function Kl(i,t,e){let s=Jl(i);if(D(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return W(n)&&Math.floor(n)===n?ql(s[0],t,n,e):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function ql(i,t,e,s){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=s?!1:e}function Gl(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:D(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Zl(i,t,e){let s;return i==="start"?s=e:i==="end"?s=t.options.reverse?t.min:t.max:D(i)?s=i.value:s=t.getBaseValue(),s}function Jl(i){let t=i.options,e=t.fill,s=C(e&&e.target,e);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function Ql(i){let{scale:t,index:e,line:s}=i,n=[],o=s.segments,a=s.points,r=tc(t,e);r.push(To({x:null,y:t.bottom},s));for(let l=0;l=0;--a){let r=n[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),s&&r.fill&&us(i.ctx,r,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;let s=i.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){let o=s[n].$filler;Gn(o)&&us(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){let s=t.meta.$filler;!Gn(s)||e.drawTime!=="beforeDatasetDraw"||us(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},to=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},dc=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index,gi=class extends it{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let t=this.options.labels||{},e=z(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}let s=t.labels,n=$(s.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=to(s,o),c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,o,r,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){let{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+r,d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((g,p)=>{let m=s+e/2+o.measureText(g.text).width;(p===0||c[c.length-1]+m+2*r>a)&&(d+=h,c[c.length-(p>0?0:1)]=0,f+=h,u++),l[p]={left:0,top:f,row:u,width:m,height:n},c[c.length-1]+=m+r}),d}_fitCols(t,e,s,n){let{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=a-t,d=r,u=0,f=0,g=0,p=0;return this.legendItems.forEach((m,b)=>{let _=s+e/2+o.measureText(m.text).width;b>0&&f+n+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,p++,u=f=0),l[b]={left:g,top:f,col:p,width:_,height:n},u=Math.max(u,_),f+=n+r}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,a=Rt(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=X(s,this.left+n,this.right-this.lineWidths[r]);for(let c of e)r!==c.row&&(r=c.row,l=X(s,this.left+n,this.right-this.lineWidths[r])),c.top+=this.top+t+n,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+n}else{let r=0,l=X(s,this.top+t+n,this.bottom-this.columnSizes[r].height);for(let c of e)c.col!==r&&(r=c.col,l=X(s,this.top+t+n,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+n,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;_e(t,this),this._draw(),xe(t)}}_draw(){let{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:a}=t,r=O.color,l=Rt(t.rtl,this.left,this.width),c=$(a.font),{color:h,padding:d}=a,u=c.size,f=u/2,g;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;let{boxWidth:p,boxHeight:m,itemHeight:b}=to(a,u),_=function(w,S,k){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;n.save();let L=C(k.lineWidth,1);if(n.fillStyle=C(k.fillStyle,r),n.lineCap=C(k.lineCap,"butt"),n.lineDashOffset=C(k.lineDashOffset,0),n.lineJoin=C(k.lineJoin,"miter"),n.lineWidth=L,n.strokeStyle=C(k.strokeStyle,r),n.setLineDash(C(k.lineDash,[])),a.usePointStyle){let R={radius:m*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:L},A=l.xPlus(w,p/2),H=S+f;Yi(n,R,A,H,a.pointStyleWidth&&p)}else{let R=S+Math.max((u-m)/2,0),A=l.leftForLtr(w,p),H=kt(k.borderRadius);n.beginPath(),Object.values(H).some(q=>q!==0)?qt(n,{x:A,y:R,w:p,h:m,radius:H}):n.rect(A,R,p,m),n.fill(),L!==0&&n.stroke()}n.restore()},v=function(w,S,k){wt(n,k.text,w,S+b/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},y=this.isHorizontal(),x=this._computeTitleHeight();y?g={x:X(o,this.left+d,this.right-s[0]),y:this.top+d+x,line:0}:g={x:this.left+d,y:X(o,this.top+x+d,this.bottom-e[0].height),line:0},ts(this.ctx,t.textDirection);let M=b+d;this.legendItems.forEach((w,S)=>{n.strokeStyle=w.fontColor||h,n.fillStyle=w.fontColor||h;let k=n.measureText(w.text).width,L=l.textAlign(w.textAlign||(w.textAlign=a.textAlign)),R=p+f+k,A=g.x,H=g.y;l.setWidth(this.width),y?S>0&&A+R+d>this.right&&(H=g.y+=M,g.line++,A=g.x=X(o,this.left+d,this.right-s[g.line])):S>0&&H+M>this.bottom&&(A=g.x=A+e[g.line].width+d,g.line++,H=g.y=X(o,this.top+x+d,this.bottom-e[g.line].height));let q=l.x(A);_(q,H,w),A=tn(L,A+p+f,y?A+R:this.right,t.rtl),v(l.x(A),H,w),y?g.x+=R+d:g.y+=M}),es(this.ctx,t.textDirection)}drawTitle(){let t=this.options,e=t.title,s=$(e.font),n=U(e.padding);if(!e.display)return;let o=Rt(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=s.size/2,c=n.top+l,h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=X(t.align,d,this.right-u);else{let g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);h=c+X(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}let f=X(r,d,d+u);a.textAlign=o.textAlign(qe(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=s.string,wt(a,e.text,f,h,s)}_computeTitleHeight(){let t=this.options.title,e=$(t.font),s=U(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(lt(t,this.left,this.right)&<(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;si.chart.options.color,boxWidth:40,padding:10,generateLabels(i){let t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o}}=i.legend.options;return i._getSortedDatasetMetas().map(a=>{let r=a.controller.getStyle(e?0:void 0),l=U(r.borderWidth);return{text:t[a.index].label,fillStyle:r.backgroundColor,fontColor:o,hidden:!a.visible,lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:r.borderColor,pointStyle:s||r.pointStyle,rotation:r.rotation,textAlign:n||r.textAlign,borderRadius:0,datasetIndex:a.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}},Ae=class extends it{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){let s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;let n=I(s.text)?s.text.length:1;this._padding=U(s.padding);let o=n*$(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:e,left:s,bottom:n,right:o,options:a}=this,r=a.align,l=0,c,h,d;return this.isHorizontal()?(h=X(r,s,o),d=e+t,c=o-s):(a.position==="left"?(h=s+t,d=X(r,n,e),l=B*-.5):(h=o-t,d=X(r,e,n),l=B*.5),c=n-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let s=$(e.font),o=s.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);wt(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:qe(e.align),textBaseline:"middle",translation:[a,r]})}};function gc(i,t){let e=new Ae({ctx:i.ctx,options:t,chart:i});K.configure(i,e,t),K.addBox(i,e),i.titleBlock=e}var pc={id:"title",_element:Ae,start(i,t,e){gc(i,e)},stop(i){let t=i.titleBlock;K.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){let s=i.titleBlock;K.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},oi=new WeakMap,mc={id:"subtitle",start(i,t,e){let s=new Ae({ctx:i.ctx,options:e,chart:i});K.configure(i,s,e),K.addBox(i,s),oi.set(i,s)},stop(i){K.removeBox(i,oi.get(i)),oi.delete(i)},beforeUpdate(i,t,e){let s=oi.get(i);K.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Pe={average(i){if(!i.length)return!1;let t,e,s=0,n=0,o=0;for(t=0,e=i.length;t-1?i.split(` +`):i}function bc(i,t){let{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:i,label:a,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function eo(i,t){let e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:a,boxHeight:r}=t,l=$(t.bodyFont),c=$(t.titleFont),h=$(t.footerFont),d=o.length,u=n.length,f=s.length,g=U(t.padding),p=g.height,m=0,b=s.reduce((y,x)=>y+x.before.length+x.lines.length+x.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){let y=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;p+=f*y+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}u&&(p+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let _=0,v=function(y){m=Math.max(m,e.measureText(y).width+_)};return e.save(),e.font=c.string,E(i.title,v),e.font=l.string,E(i.beforeBody.concat(i.afterBody),v),_=t.displayColors?a+2+t.boxPadding:0,E(s,y=>{E(y.before,v),E(y.lines,v),E(y.after,v)}),_=0,e.font=h.string,E(i.footer,v),e.restore(),m+=g.width,{width:m,height:p}}function _c(i,t){let{y:e,height:s}=t;return ei.height-s/2?"bottom":"center"}function xc(i,t,e,s){let{x:n,width:o}=s,a=e.caretSize+e.caretPadding;if(i==="left"&&n+o+a>t.width||i==="right"&&n-o-a<0)return!0}function yc(i,t,e,s){let{x:n,width:o}=e,{width:a,chartArea:{left:r,right:l}}=i,c="center";return s==="center"?c=n<=(r+l)/2?"left":"right":n<=o/2?c="left":n>=a-o/2&&(c="right"),xc(c,i,t,e)&&(c="center"),c}function io(i,t,e){let s=e.yAlign||t.yAlign||_c(i,e);return{xAlign:e.xAlign||t.xAlign||yc(i,t,e,s),yAlign:s}}function vc(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function Mc(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function so(i,t,e,s){let{caretSize:n,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=kt(a),g=vc(t,r),p=Mc(t,l,c);return l==="center"?r==="left"?g+=c:r==="right"&&(g-=c):r==="left"?g-=Math.max(h,u)+n:r==="right"&&(g+=Math.max(d,f)+n),{x:Y(g,0,s.width-t.width),y:Y(p,0,s.height-t.height)}}function ai(i,t,e){let s=U(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function no(i){return ct([],bt(i))}function wc(i,t,e){return pt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function oo(i,t){let e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}var Te=class extends it{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new ci(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=wc(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:s}=e,n=s.beforeTitle.apply(this,[t]),o=s.title.apply(this,[t]),a=s.afterTitle.apply(this,[t]),r=[];return r=ct(r,bt(n)),r=ct(r,bt(o)),r=ct(r,bt(a)),r}getBeforeBody(t,e){return no(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){let{callbacks:s}=e,n=[];return E(t,o=>{let a={before:[],lines:[],after:[]},r=oo(s,o);ct(a.before,bt(r.beforeLabel.call(this,o))),ct(a.lines,r.label.call(this,o)),ct(a.after,bt(r.afterLabel.call(this,o))),n.push(a)}),n}getAfterBody(t,e){return no(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){let{callbacks:s}=e,n=s.beforeFooter.apply(this,[t]),o=s.footer.apply(this,[t]),a=s.afterFooter.apply(this,[t]),r=[];return r=ct(r,bt(n)),r=ct(r,bt(o)),r=ct(r,bt(a)),r}_createItems(t){let e=this._active,s=this.chart.data,n=[],o=[],a=[],r=[],l,c;for(l=0,c=e.length;lt.filter(h,d,u,s))),t.itemSort&&(r=r.sort((h,d)=>t.itemSort(h,d,s))),E(r,h=>{let d=oo(t.callbacks,h);n.push(d.labelColor.call(this,h)),o.push(d.labelPointStyle.call(this,h)),a.push(d.labelTextColor.call(this,h))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){let s=this.options.setContext(this.getContext()),n=this._active,o,a=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{let r=Pe[s.position].call(this,n,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);let l=this._size=eo(this,s),c=Object.assign({},r,l),h=io(this.chart,s,c),d=so(s,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){let o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){let{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:r}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=kt(r),{x:u,y:f}=t,{width:g,height:p}=e,m,b,_,v,y,x;return o==="center"?(y=f+p/2,n==="left"?(m=u,b=m-a,v=y+a,x=y-a):(m=u+g,b=m+a,v=y-a,x=y+a),_=m):(n==="left"?b=u+Math.max(l,h)+a:n==="right"?b=u+g-Math.max(c,d)-a:b=this.caretX,o==="top"?(v=f,y=v-a,m=b-a,_=b+a):(v=f+p,y=v+a,m=b+a,_=b-a),x=v),{x1:m,x2:b,x3:_,y1:v,y2:y,y3:x}}drawTitle(t,e,s){let n=this.title,o=n.length,a,r,l;if(o){let c=Rt(s.rtl,this.x,this.width);for(t.x=ai(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",a=$(s.titleFont),r=s.titleSpacing,e.fillStyle=s.titleColor,e.font=a.string,l=0;lv!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,qt(t,{x:m,y:p,w:c,h:l,radius:_}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),qt(t,{x:b,y:p+1,w:c-2,h:l-2,radius:_}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(m,p,c,l),t.strokeRect(m,p,c,l),t.fillStyle=a.backgroundColor,t.fillRect(b,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){let{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:h}=s,d=$(s.bodyFont),u=d.lineHeight,f=0,g=Rt(s.rtl,this.x,this.width),p=function(S){e.fillText(S,g.x(t.x+f),t.y+u/2),t.y+=u+o},m=g.textAlign(a),b,_,v,y,x,M,w;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=ai(this,m,s),e.fillStyle=s.bodyColor,E(this.beforeBody,p),f=r&&m!=="right"?a==="center"?c/2+h:c+2+h:0,y=0,M=n.length;y0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){let a=Pe[t.position].call(this,this._active,this._eventPosition);if(!a)return;let r=this._size=eo(this,t),l=Object.assign({},a,this._size),c=io(e,t,l),h=so(t,l,c,e);(n._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),s=this.opacity;if(!s)return;this._updateAnimationTarget(e);let n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;let a=U(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,e),ts(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),es(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let s=this._active,n=t.map(({datasetIndex:r,index:l})=>{let c=this.chart.getDatasetMeta(r);if(!c)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:c.data[l],index:l}}),o=!me(s,n),a=this._positionChanged(n,e);(o||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let n=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,s),r=this._positionChanged(a,t),l=e||!me(a,o)||r;return l&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){let o=this.options;if(t.type==="mouseout")return[];if(!n)return e;let a=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&a.reverse(),a}_positionChanged(t,e){let{caretX:s,caretY:n,options:o}=this,a=Pe[o.position].call(this,t,e);return a!==!1&&(s!==a.x||n!==a.y)}};Te.positioners=Pe;var kc={id:"tooltip",_element:Te,positioners:Pe,afterInit(i,t,e){e&&(i.tooltip=new Te({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){let t=i.tooltip;if(t&&t._willRender()){let e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",e)===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){let e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:rt,title(i){if(i.length>0){let t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndexi!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Sc=Object.freeze({__proto__:null,Decimation:$l,Filler:hc,Legend:fc,SubTitle:mc,Title:pc,Tooltip:kc}),Pc=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Cc(i,t,e,s){let n=i.indexOf(t);if(n===-1)return Pc(i,t,e,s);let o=i.lastIndexOf(t);return n!==o?e:n}var Dc=(i,t)=>i===null?null:Y(Math.round(i),0,t),ce=class extends Ft{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let s=this.getLabels();for(let{index:n,label:o}of e)s[n]===o&&s.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(T(t))return null;let s=this.getLabels();return e=isFinite(e)&&s[e]===t?e:Cc(s,t,C(e,t),this._addedLabels),Dc(e,s.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:s,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),e||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){let t=this.min,e=this.max,s=this.options.offset,n=[],o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let a=t;a<=e;a++)n.push({value:a});return n}getLabelForValue(t){let e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}};ce.id="category";ce.defaults={ticks:{callback:ce.prototype.getLabelForValue}};function Oc(i,t){let e=[],{bounds:n,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,g=h-1,{min:p,max:m}=t,b=!T(a),_=!T(r),v=!T(c),y=(m-p)/(d+1),x=Ai((m-p)/g/f)*f,M,w,S,k;if(x<1e-14&&!b&&!_)return[{value:p},{value:m}];k=Math.ceil(m/x)-Math.floor(p/x),k>g&&(x=Ai(k*x/g/f)*f),T(l)||(M=Math.pow(10,l),x=Math.ceil(x*M)/M),n==="ticks"?(w=Math.floor(p/x)*x,S=Math.ceil(m/x)*x):(w=p,S=m),b&&_&&o&&Us((r-a)/o,x/1e3)?(k=Math.round(Math.min((r-a)/x,h)),x=(r-a)/k,w=a,S=r):v?(w=b?a:w,S=_?r:S,k=c-1,x=(S-w)/k):(k=(S-w)/x,Ut(k,Math.round(k),x/1e3)?k=Math.round(k):k=Math.ceil(k));let L=Math.max(Li(x),Li(w));M=Math.pow(10,T(l)?L:l),w=Math.round(w*M)/M,S=Math.round(S*M)/M;let R=0;for(b&&(u&&w!==a?(e.push({value:a}),wn=e?n:l,r=l=>o=s?o:l;if(t){let l=ot(n),c=ot(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(n===o){let l=1;(o>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(o*.05)),r(o+l),t||a(n-l)}this.min=n,this.max=o}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,s=this.getTickLimit();s=Math.max(2,s);let n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,a=Oc(n,o);return t.bounds==="ticks"&&Ti(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){let t=this.ticks,e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){let n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return Zt(t,this.chart.options.locale,this.options.ticks.format)}},Le=class extends he{determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?t:0,this.max=W(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,s=nt(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}};Le.id="linear";Le.defaults={ticks:{callback:pi.formatters.numeric}};function ro(i){return i/Math.pow(10,Math.floor(tt(i)))===1}function Ac(i,t){let e=Math.floor(tt(t.max)),s=Math.ceil(t.max/Math.pow(10,e)),n=[],o=Q(i.min,Math.pow(10,Math.floor(tt(t.min)))),a=Math.floor(tt(o)),r=Math.floor(o/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do n.push({value:o,major:ro(o)}),++r,r===10&&(r=1,++a,l=a>=0?1:l),o=Math.round(r*Math.pow(10,a)*l)/l;while(a0?s:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?Math.max(0,t):null,this.max=W(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),s=this.min,n=this.max,o=l=>s=t?s:l,a=l=>n=e?n:l,r=(l,c)=>Math.pow(10,Math.floor(tt(l))+c);s===n&&(s<=0?(o(1),a(10)):(o(r(s,-1)),a(r(n,1)))),s<=0&&o(r(n,-1)),n<=0&&a(r(s,1)),this._zero&&this.min!==this._suggestedMin&&s===r(this.min,0)&&o(r(s,-1)),this.min=s,this.max=n}buildTicks(){let t=this.options,e={min:this._userMin,max:this._userMax},s=Ac(e,this);return t.bounds==="ticks"&&Ti(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?"0":Zt(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=tt(t),this._valueRange=tt(this.max)-tt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(tt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}};Re.id="logarithmic";Re.defaults={ticks:{callback:pi.formatters.logarithmic,major:{enabled:!0}}};function Ss(i){let t=i.ticks;if(t.display&&i.display){let e=U(t.backdropPadding);return C(t.font&&t.font.size,O.font.size)+e.height}return 0}function Tc(i,t,e){return e=I(e)?e:[e],{w:rn(i,t.string,e),h:e.length*t.lineHeight}}function lo(i,t,e,s,n){return i===s||i===n?{start:t-e/2,end:t+e/2}:in?{start:t-e,end:t}:{start:t,end:t+e}}function Lc(i){let t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),s=[],n=[],o=i._pointLabels.length,a=i.options.pointLabels,r=a.centerPointLabels?B/o:0;for(let l=0;lt.r&&(r=(s.end-t.r)/o,i.r=Math.max(i.r,t.r+r)),n.startt.b&&(l=(n.end-t.b)/a,i.b=Math.max(i.b,t.b+l))}function Ec(i,t,e){let s=[],n=i._pointLabels.length,o=i.options,a=Ss(o)/2,r=i.drawingArea,l=o.pointLabels.centerPointLabels?B/n:0;for(let c=0;c270||e<90)&&(i-=t),i}function Bc(i,t){let{ctx:e,options:{pointLabels:s}}=i;for(let n=t-1;n>=0;n--){let o=s.setContext(i.getPointLabelContext(n)),a=$(o.font),{x:r,y:l,textAlign:c,left:h,top:d,right:u,bottom:f}=i._pointLabelItems[n],{backdropColor:g}=o;if(!T(g)){let p=kt(o.borderRadius),m=U(o.backdropPadding);e.fillStyle=g;let b=h-m.left,_=d-m.top,v=u-h+m.width,y=f-d+m.height;Object.values(p).some(x=>x!==0)?(e.beginPath(),qt(e,{x:b,y:_,w:v,h:y,radius:p}),e.fill()):e.fillRect(b,_,v,y)}wt(e,i._pointLabels[n],r,l+a.lineHeight/2,a,{color:o.color,textAlign:c,textBaseline:"middle"})}}function Lo(i,t,e,s){let{ctx:n}=i;if(e)n.arc(i.xCenter,i.yCenter,t,0,F);else{let o=i.getPointPosition(0,t);n.moveTo(o.x,o.y);for(let a=1;a{let n=z(this.options.pointLabels.callback,[e,s],this);return n||n===0?n:""}).filter((e,s)=>this.chart.getDataVisibility(s))}fit(){let t=this.options;t.display&&t.pointLabels.display?Lc(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,s,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,s,n))}getIndexAngle(t){let e=F/(this._pointLabels.length||1),s=this.options.startAngle||0;return G(t*e+nt(s))}getDistanceFromCenterForValue(t){if(T(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(T(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t{if(h!==0){r=this.getDistanceFromCenterForValue(c.value);let d=n.setContext(this.getContext(h-1));Vc(this,d,r,o)}}),s.display){for(t.save(),a=o-1;a>=0;a--){let c=s.setContext(this.getPointLabelContext(a)),{color:h,lineWidth:d}=c;!d||!h||(t.lineWidth=d,t.strokeStyle=h,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,r=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){let t=this.ctx,e=this.options,s=e.ticks;if(!s.display)return;let n=this.getIndexAngle(0),o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&!e.reverse)return;let c=s.setContext(this.getContext(l)),h=$(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,a=t.measureText(r.label).width,t.fillStyle=c.backdropColor;let d=U(c.backdropPadding);t.fillRect(-a/2-d.left,-o-h.size/2-d.top,a+d.width,h.size+d.height)}wt(t,r.label,0,-o,h,{color:c.color})}),t.restore()}drawTitle(){}};zt.id="radialLinear";zt.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:pi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(i){return i},padding:5,centerPointLabels:!1}};zt.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};zt.descriptors={angleLines:{_fallback:"grid"}};var mi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Z=Object.keys(mi);function Nc(i,t){return i-t}function co(i,t){if(T(t))return null;let e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts,a=t;return typeof s=="function"&&(a=s(a)),W(a)||(a=typeof s=="string"?e.parse(a,s):e.parse(a)),a===null?null:(n&&(a=n==="week"&&(Lt(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,n)),+a)}function ho(i,t,e,s){let n=Z.length;for(let o=Z.indexOf(i);o=Z.indexOf(e);o--){let a=Z[o];if(mi[a].common&&i._adapter.diff(n,s,a)>=t-1)return a}return Z[e?Z.indexOf(e):0]}function jc(i){for(let t=Z.indexOf(i)+1,e=Z.length;t=t?e[s]:e[n];i[o]=!0}}function $c(i,t,e,s){let n=i._adapter,o=+n.startOf(t[0].value,s),a=t[t.length-1].value,r,l;for(r=o;r<=a;r=+n.add(r,1,s))l=e[r],l>=0&&(t[l].major=!0);return t}function fo(i,t,e){let s=[],n={},o=t.length,a,r;for(a=0;a+t.value))}initOffsets(t){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);let a=t.length<3?.5:.25;e=Y(e,0,a),s=Y(s,0,a),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){let t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,a=o.unit||ho(o.minUnit,e,s,this._getLabelCapacity(e)),r=C(o.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Lt(l)||l===!0,h={},d=e,u,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(s,e,a)>1e5*r)throw new Error(e+" and "+s+" are too far apart with stepSize of "+r+" "+a);let g=n.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;up-m).map(p=>+p)}getLabelForValue(t){let e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}_tickFormatFunction(t,e,s,n){let o=this.options,a=o.time.displayFormats,r=this._unit,l=this._majorUnit,c=r&&a[r],h=l&&a[l],d=s[e],u=l&&h&&d&&d.major,f=this._adapter.format(t,n||(u?h:c)),g=o.ticks.callback;return g?z(g,[f,e,s],this):f}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;let n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=at(i,"pos",t)),{pos:o,time:r}=i[s],{pos:a,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=at(i,"time",t)),{time:o,pos:r}=i[s],{time:a,pos:l}=i[n]);let c=a-o;return c?r+(l-r)*(t-o)/c:r}var Ee=class extends Bt{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ri(e,this.min),this._tableRange=ri(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:e,max:s}=this,n=[],o=[],a,r,l,c,h;for(a=0,r=t.length;a=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(a=0,r=n.length;a{Alpine.store("theme");let s=this.getChart();s&&s.destroy(),this.initChart()}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Alpine.store("theme")==="system"&&this.$nextTick(()=>{let s=this.getChart();s&&s.destroy(),this.initChart()})})},initChart:function(){if(!(!this.$refs.canvas||!this.$refs.backgroundColorElement||!this.$refs.borderColorElement))return new Cs(this.$refs.canvas,{type:"line",data:{labels:t,datasets:[{data:e,borderWidth:2,fill:"start",tension:.5,backgroundColor:getComputedStyle(this.$refs.backgroundColorElement).color,borderColor:getComputedStyle(this.$refs.borderColorElement).color}]},options:{animation:{duration:0},elements:{point:{radius:0}},maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{x:{display:!1},y:{display:!1}},tooltips:{enabled:!1}}})},getChart:function(){return this.$refs.canvas?Cs.getChart(this.$refs.canvas):null}}}export{Xc as default}; +/*! Bundled license information: + +chart.js/dist/chunks/helpers.segment.mjs: + (*! + * Chart.js v3.9.1 + * https://www.chartjs.org + * (c) 2022 Chart.js Contributors + * Released under the MIT License + *) + +chart.js/dist/chunks/helpers.segment.mjs: + (*! + * @kurkle/color v0.2.1 + * https://github.com/kurkle/color#readme + * (c) 2022 Jukka Kurkela + * Released under the MIT License + *) + +chart.js/dist/chart.mjs: + (*! + * Chart.js v3.9.1 + * https://www.chartjs.org + * (c) 2022 Chart.js Contributors + * Released under the MIT License + *) +*/ diff --git a/public/my_gartner_clone.pdf b/public/my_gartner_clone.pdf new file mode 100644 index 000000000..b63938456 Binary files /dev/null and b/public/my_gartner_clone.pdf differ diff --git a/resources/css/app.css b/resources/css/app.css index 9bf659fc7..c5c74c87b 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -93,6 +93,10 @@ --sidebar-accent-foreground: oklch(0.205 0 0); --sidebar-border: oklch(0.922 0 0); --sidebar-ring: oklch(0.87 0 0); + + + --sidebar-width: 16rem; + --sidebar-width-icon: 3rem; } .dark { @@ -139,3 +143,15 @@ @apply bg-background text-foreground; } } + + +@media (max-width: 768px) { + :root { + --sidebar-width: 18rem; /* optional mobile override */ + } +} + +html[dir="rtl"] { + --sidebar-width: 16rem; + --sidebar-width-icon: 3rem; +} diff --git a/resources/js/AppWrapper.tsx b/resources/js/AppWrapper.tsx new file mode 100644 index 000000000..494febfe3 --- /dev/null +++ b/resources/js/AppWrapper.tsx @@ -0,0 +1,6 @@ +import { useDirectionEffect } from '@/hooks/use-direction-effect'; + +export default function AppWrapper({ children }: { children: React.ReactNode }) { + useDirectionEffect(); // <-- applies RTL or LTR on language change + return <>{children}; +} diff --git a/resources/js/app.tsx b/resources/js/app.tsx index ae0997825..2097d701e 100644 --- a/resources/js/app.tsx +++ b/resources/js/app.tsx @@ -4,21 +4,45 @@ import { createInertiaApp } from '@inertiajs/react'; import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'; import { createRoot } from 'react-dom/client'; import { initializeTheme } from './hooks/use-appearance'; +// 👇 UPDATED IMPORT - Note the .tsx extension +import { ToastProvider } from './components/ui/use-toast'; +import { LanguageProvider } from './hooks/use-language'; +import AppWrapper from './AppWrapper'; const appName = import.meta.env.VITE_APP_NAME || 'Laravel'; createInertiaApp({ + title: (title) => `${title} - ${appName}`, + title: (title) => title ? `${title} - ${appName}` : appName, resolve: (name) => resolvePageComponent(`./pages/${name}.tsx`, import.meta.glob('./pages/**/*.tsx')), setup({ el, App, props }) { const root = createRoot(el); - root.render(); + // 👇 WRAP THE APP WITH TOAST PROVIDER + root.render( + + + + + + + + ); }, progress: { color: '#4B5563', }, }); -// This will set light / dark mode on load... -initializeTheme(); +// Initialize theme immediately when the app loads +// This ensures consistent theme handling across all pages +if (typeof window !== 'undefined') { + // Set default to light mode if no preference is stored + if (!localStorage.getItem('appearance') && !document.cookie.includes('appearance=')) { + localStorage.setItem('appearance', 'light'); + document.cookie = 'appearance=light;path=/;max-age=31536000;SameSite=Lax'; + } + + initializeTheme(); +} diff --git a/resources/js/components/DownloadButton.tsx b/resources/js/components/DownloadButton.tsx new file mode 100644 index 000000000..7885c9ba1 --- /dev/null +++ b/resources/js/components/DownloadButton.tsx @@ -0,0 +1,112 @@ +import React, { useState } from 'react'; +import { Button } from '@/components/ui/button'; +import { Download, Loader2, FileText, CheckCircle } from 'lucide-react'; + +interface DownloadButtonProps { + assessmentId: number; + reportType?: 'basic' | 'comprehensive' | 'guest'; + isGuest?: boolean; + disabled?: boolean; + variant?: 'outline' | 'default'; + size?: 'sm' | 'default' | 'lg'; + className?: string; +} + +export function DownloadButton({ + assessmentId, + reportType = 'basic', + isGuest = false, + disabled = false, + variant = 'outline', + size = 'default', + className = '' + }: DownloadButtonProps) { + const [isDownloading, setIsDownloading] = useState(false); + const [downloadComplete, setDownloadComplete] = useState(false); + + const handleDownload = async () => { + if (isDownloading || disabled) return; + + setIsDownloading(true); + setDownloadComplete(false); + + try { + // Determine the correct route + const routeName = isGuest ? 'guest.assessments.report.download' : 'assessments.report.download'; + const downloadUrl = route(routeName, assessmentId); + + // Create a temporary link element to force download + const link = document.createElement('a'); + link.href = downloadUrl; + link.style.display = 'none'; + + // Add download attribute to force download instead of preview + const filename = `Assessment_Report_${assessmentId}_${new Date().toISOString().split('T')[0]}.pdf`; + link.download = filename; + + // Add to DOM, click, and remove + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + + // Show success state briefly + setTimeout(() => { + setDownloadComplete(true); + setTimeout(() => { + setDownloadComplete(false); + }, 2000); + }, 1000); + + } catch (error) { + console.error('Download failed:', error); + // You might want to show an error toast here + } finally { + setIsDownloading(false); + } + }; + + return ( + + ); +} + +// Usage in your components: +// Replace the Link with this component + +// For authenticated users: +// + +// For guest users: +// diff --git a/resources/js/components/PDFGeneratorComponent.tsx b/resources/js/components/PDFGeneratorComponent.tsx new file mode 100644 index 000000000..2b488c3af --- /dev/null +++ b/resources/js/components/PDFGeneratorComponent.tsx @@ -0,0 +1,223 @@ +import React, { useState, useEffect, useRef } from 'react'; +import { useToast } from '@/components/ui/use-toast'; +import { + Download, + Eye, + Save, + Share2, + CheckCircle, + Loader2, + Copy +} from 'lucide-react'; +import { Button } from '@/components/ui/button'; +import { useLanguage } from '@/hooks/use-language'; + +// --- TYPE DEFINITIONS --- +interface Assessment { + id: number; + name: string; + email: string; + organization?: string; + status: string; + completed_at?: string; + tool: { + id: number; + name_en: string; + name_ar: string; + }; +} + +interface AssessmentResults { + overall_percentage: number; + yes_count: number; + no_count: number; + na_count: number; + total_criteria: number; + applicable_criteria: number; +} + +interface PDFGeneratorComponentProps { + assessment: Assessment; + results: AssessmentResults; + locale?: string; + isGuest?: boolean; + children: React.ReactNode; // Added to wrap the trigger button +} + +// --- TRANSLATIONS --- +const translations = { + en: { + menuTitle: 'Assessment Summary', + score: 'Score', + yes: 'Yes', + no: 'No', + applicableCriteria: 'Applicable Criteria', + download: 'Download', + preview: 'Preview', + save: 'Save', + share: 'Share', + note: 'Note: The PDF report contains a comprehensive summary with charts and recommendations.', + error: 'Error', + success: 'Success', + assessmentIncomplete: 'Assessment must be completed first.', + downloadSuccess: 'PDF download initiated.', + downloadError: 'Failed to download PDF.', + previewSuccess: 'PDF preview opened.', + previewError: 'Failed to open PDF preview.', + saveSuccess: 'PDF saved successfully. You can now share the link.', + saveError: 'Failed to save PDF.', + copySuccess: 'Link copied to clipboard.', + copyError: 'Failed to copy link.', + }, + ar: { + menuTitle: 'ملخص التقييم', + score: 'النتيجة', + yes: 'نعم', + no: 'لا', + applicableCriteria: 'المعايير المطبقة', + download: 'تنزيل', + preview: 'معاينة', + save: 'حفظ', + share: 'مشاركة', + note: 'ملاحظة: يحتوي تقرير PDF على ملخص شامل لنتائج التقييم مع الرسوم البيانية والتوصيات.', + error: 'خطأ', + success: 'نجاح', + assessmentIncomplete: 'يجب إكمال التقييم أولاً.', + downloadSuccess: 'تم بدء تنزيل ملف PDF.', + downloadError: 'فشل في تنزيل ملف PDF.', + previewSuccess: 'تم فتح معاينة PDF.', + previewError: 'فشل في فتح معاينة PDF.', + saveSuccess: 'تم حفظ ملف PDF بنجاح. يمكنك الآن مشاركة الرابط.', + saveError: 'فشل في حفظ ملف PDF.', + copySuccess: 'تم نسخ الرابط إلى الحافظة.', + copyError: 'فشل في نسخ الرابط.', + } +}; + +// --- MAIN COMPONENT --- +const PDFGeneratorComponent: React.FC = ({ + assessment, + results, + locale = 'en', + isGuest = false, + children + }) => { + const { toast } = useToast(); + const { language } = useLanguage(); + const t = translations[language as 'en' | 'ar']; + const isArabic = language === 'ar'; + + const [isMenuOpen, setIsMenuOpen] = useState(false); + const [loadingStates, setLoadingStates] = useState({ + download: false, + preview: false, + save: false, + }); + const [savedPDFUrl, setSavedPDFUrl] = useState(null); + const menuRef = useRef(null); + + // Close menu on outside click + useEffect(() => { + const handleClickOutside = (event: MouseEvent) => { + if (menuRef.current && !menuRef.current.contains(event.target as Node)) { + setIsMenuOpen(false); + } + }; + document.addEventListener('mousedown', handleClickOutside); + return () => document.removeEventListener('mousedown', handleClickOutside); + }, []); + + const setLoading = (action: keyof typeof loadingStates, isLoading: boolean) => { + setLoadingStates(prev => ({ ...prev, [action]: isLoading })); + }; + + const getCSRFToken = (): string => { + return document.querySelector('meta[name="csrf-token"]')?.getAttribute('content') || ''; + }; + + const handleAction = async (action: 'download' | 'preview' | 'save') => { + if (assessment.status !== 'completed' && action !== 'preview') { + toast({ title: t.error, description: t.assessmentIncomplete, variant: 'destructive' }); + return; + } + + setLoading(action, true); + try { + // THE FIX: Append the current language as a query parameter to the URL. + const url = `/assessment/${assessment.id}/pdf/${action}?lang=${language}`; + + if (action === 'save') { + const response = await fetch(url, { + method: 'POST', + headers: { 'Content-Type': 'application/json', 'X-CSRF-TOKEN': getCSRFToken(), 'Accept': 'application/json' }, + body: JSON.stringify({ lang: language }) // Also send lang in body for POST + }); + const data = await response.json(); + if (!response.ok) throw new Error(data.message || 'Server error'); + setSavedPDFUrl(data.download_url); + toast({ title: t.success, description: t.saveSuccess, variant: 'success' }); + } else { + window.open(url, '_blank'); + } + } catch (error: any) { + toast({ title: t.error, description: error.message || t[`${action}Error`], variant: 'destructive' }); + } finally { + setLoading(action, false); + setIsMenuOpen(false); + } + }; + + const copyLink = () => { + if (!savedPDFUrl) return; + navigator.clipboard.writeText(window.location.origin + savedPDFUrl) + .then(() => toast({ title: t.success, description: t.copySuccess, variant: 'success' })) + .catch(() => toast({ title: t.error, description: t.copyError, variant: 'destructive' })); + }; + + const toolName = isArabic ? assessment.tool.name_ar : assessment.tool.name_en; + const summaryText = `${toolName} - ${t.score}: ${Math.round(results.overall_percentage)}% (${results.yes_count} ${t.yes}, ${results.no_count} ${t.no})`; + + return ( +
+
setIsMenuOpen(!isMenuOpen)}> + {children} +
+ + {isMenuOpen && ( +
+
+
+

{t.menuTitle}

+

{summaryText}

+
+
+ } label={t.download} onClick={() => handleAction('download')} loading={loadingStates.download} /> + } label={t.preview} onClick={() => handleAction('preview')} loading={loadingStates.preview} /> + } label={t.save} onClick={() => handleAction('save')} loading={loadingStates.save} /> + } label={t.share} onClick={copyLink} loading={false} disabled={!savedPDFUrl} /> +
+
+

{t.note}

+
+
+
+ )} +
+ ); +}; + +const ActionButton = ({ icon, label, onClick, loading, disabled = false }: any) => ( + +); + +export default PDFGeneratorComponent; diff --git a/resources/js/components/ProfileWizard.tsx b/resources/js/components/ProfileWizard.tsx new file mode 100644 index 000000000..0a85d694a --- /dev/null +++ b/resources/js/components/ProfileWizard.tsx @@ -0,0 +1,408 @@ +import { useState } from 'react'; +import { useState, ChangeEvent, FormEvent } from 'react'; +import { useForm } from '@inertiajs/react'; +import { Input } from '@/components/ui/input'; +import { Button } from '@/components/ui/button'; +import { Label } from '@/components/ui/label'; +import { Textarea } from '@/components/ui/textarea'; +import { + Select, + SelectTrigger, + SelectValue, + SelectContent, + SelectItem, +} from '@/components/ui/select'; + +interface ProfileWizardProps { + onComplete?: () => void; +} + +const companyTypeOptions = [ + { value: '1', label: 'خدمي (Service)' }, + { value: '2', label: 'صناعي (Industrial)' }, + { value: '3', label: 'تجاري (Commercial)' }, +]; + +const regionOptions = [ + { value: 'central', label: 'Central Region (المنطقة الوسطى)' }, + { value: 'eastern', label: 'Eastern Region (المنطقة الشرقية)' }, + { value: 'western', label: 'Western Region (المنطقة الغربية)' }, + { value: 'northern', label: 'Northern Region (المنطقة الشمالية)' }, + { value: 'southern', label: 'Southern Region (المنطقة الجنوبية)' }, +]; + +const employeeTypeOptions = [ + { value: '1', label: 'المالك' }, + { value: '2', label: 'رئيس مجلس الاداره' }, + { value: '3', label: 'المدير العام' }, + { value: '4', label: 'المدير التنفيذي' }, + { value: '5', label: 'مدير اداره' }, + { value: '6', label: 'رئيس قسم' }, + { value: '7', label: 'موضف مفوض' }, +]; + +const ProfileWizard = ({ onComplete }: ProfileWizardProps) => { + const [step, setStep] = useState(1); + const { data, setData, post, processing, errors } = useForm({ + company_name_ar: '', + company_name_en: '', + company_type: '', + region: '', + city: '', + employee_name_ar: '', + employee_name_en: '', + employee_type: '', + phone: '', + website: '', + notes: '', + how_did_you_hear: '', + }); + + const handleChange = ( + e: React.ChangeEvent + ) => { + const { name, value } = e.target; + setData(name as keyof typeof data, value); + }; + + const nextStep = () => setStep((prev) => prev + 1); + const prevStep = () => setStep((prev) => prev - 1); + + const handleSubmit = () => { + post(route('profile.complete'), { + onSuccess: () => { + if (onComplete) onComplete(); + }, + }); + }; + + return ( +
+ {step === 1 && ( +
+

Step 1: Company Information

+ + + {errors.company_type && ( +
+ {errors.company_type} +
+ )} + + + + {errors.company_name_ar && ( +
+ {errors.company_name_ar} +
+ )} + + + + {errors.company_name_en && ( +
+ {errors.company_name_en} +
+ )} + + +
+ )} + + {step === 2 && ( +
+

Step 2: Location

+ + + {errors.region && ( +
{errors.region}
+ )} + + + + {errors.city && ( +
{errors.city}
+ )} + +
+ + +
+
+ )} + + {step === 3 && ( +
+

Step 3: Contact

+ + + {errors.employee_name_ar && ( +
+ {errors.employee_name_ar} +
+ )} + + + + {errors.employee_name_en && ( +
+ {errors.employee_name_en} +
+ )} + + + + {errors.employee_type && ( +
+ {errors.employee_type} +
+ )} + + + + {errors.phone && ( +
{errors.phone}
+ )} + + + + {errors.website && ( +
{errors.website}
+ )} + +
+ + +
+
+ )} + + {step === 4 && ( +
+

Step 4: Additional Information

+ + + +
+ + )} + +
+ {comments.length > 0 ? ( + comments.map((comment) => ( +
+ + + {comment.author.name.slice(0, 2)} + +
+
+

{comment.author.name}

+ +
+

{comment.content}

+
+
+ )) + ) : ( +

+ No comments yet. Be the first to share your thoughts! +

+ )} +
+
+
+ + + + + ) +} diff --git a/resources/js/pages/posts/Index.tsx b/resources/js/pages/posts/Index.tsx new file mode 100644 index 000000000..d1c7a8def --- /dev/null +++ b/resources/js/pages/posts/Index.tsx @@ -0,0 +1,215 @@ +import BlogLayout from '@/layouts/blog-layout'; +import { Post } from '@/types/post'; +import { Link } from '@inertiajs/react'; +import { Calendar, Clock, Tag, User, ArrowRight, Eye, Film, ImageIcon, Mic } from 'lucide-react'; + +// Props definition remains the same +interface Props { + posts: Post[]; +} + +/** + * Generates a truncated excerpt from post content. + * @param content The HTML content of the post. + * @param limit The word limit for the excerpt. + * @returns A plain text string of the excerpt. + */ +const createExcerpt = (content: string, limit: number = 20): string => { + const text = content.replace(/<[^>]+>/g, ''); // Strip HTML tags + const words = text.split(' '); + if (words.length > limit) { + return words.slice(0, limit).join(' ') + '...'; + } + return text; +}; + + +// Main Component: PostIndex +export default function PostIndex({ posts }: Props) { + // Separate the first post as featured, and the next two for a special layout + const [featured, prominent, ...others] = posts; + + return ( + +
+ {/* Modern Header */} +
+
+ {/* Floating shapes for decoration */} +
+
+ +
+

+ The Knowledge Hub +

+

+ Fresh insights, expert tips, and stories from our team. +

+
+
+ + {/* Main Content Area */} +
+ {/* Featured Post */} + {featured && ( +
+ +
+
+ {featured.thumbnail_url ? ( + {featured.title} + ) : ( +
+ +
+ )} +
+
+
+
+ {featured.tags?.[0] && ( + + {featured.tags[0]} + + )} + + {new Date(featured.published_at).toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' })} + +
+

+ {featured.title} +

+

+ {createExcerpt(featured.content, 30)} +

+
+ + author + {featured.author || 'Admin'} + + + Read More + +
+
+
+ +
+ )} + + {/* Grid for other posts */} + {posts.length > 1 ? ( +
+ {/* Render the second post if it exists */} + {prominent && } + + {/* Render all other posts */} + {others.map((post) => ( + + ))} +
+ ) : ( + // Enhanced "No Articles" state +
+
+ +
+
+
+

+ More Posts Coming Soon +

+

+ Our team is busy writing. Check back in a bit for new articles! +

+
+ )} +
+
+
+ ); +} + + +// Sub-component: PostCard +interface PostCardProps { + post: Post; + isProminent?: boolean; +} + +function PostCard({ post, isProminent = false }: PostCardProps) { + // Determine card classes based on prominence + const cardClasses = isProminent + ? "lg:col-span-2" // Make the second post span two columns on large screens + : ""; + + return ( + +
+ {/* Card Image */} +
+ {post.thumbnail_url ? ( + {post.title} + ) : ( +
+ +
+ )} +
+ {post.tags?.[0] && ( + + {post.tags[0]} + + )} +
+ + {/* Card Content */} +
+

+ {post.title} +

+

+ {createExcerpt(post.content)} +

+ + {/* Card Footer */} +
+ + + {new Date(post.published_at).toLocaleDateString(undefined, { month: 'short', day: 'numeric' })} + + + {post.reading_time} min read + +
+
+
+ + ); +} + +// Add this style for the line clamp utility if it's not globally defined in your CSS +// This is an alternative to the style jsx you were using before. +// You can place this in your main app.css file. +/* +@layer utilities { + .line-clamp-2 { + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; + } +} +*/ diff --git a/resources/js/pages/posts/Show.tsx b/resources/js/pages/posts/Show.tsx new file mode 100644 index 000000000..cbaba15a3 --- /dev/null +++ b/resources/js/pages/posts/Show.tsx @@ -0,0 +1,81 @@ +import BlogLayout from '@/layouts/blog-layout'; +import { Post, Comment } from '@/types/post'; +import { Head, router } from '@inertiajs/react'; +import React, { useState, useEffect } from 'react'; + +// Import the separated components +import { PostMedia } from '@/components/post/post-media'; +import { CommentList } from '@/components/post/comment-list'; +import { CommentForm } from '@/components/post/comment-form'; + +interface PageProps { + post: Post; + comments: Comment[]; +} + +export default function PostShow({ post, comments: initialComments }: PageProps) { + const [comments, setComments] = useState(initialComments); + + // This hook syncs the local state with server props. + // When `router.reload` fetches new comments, `initialComments` changes, + // and this hook updates the `comments` state, re-rendering the list. + useEffect(() => { + setComments(initialComments); + }, [initialComments]); + + // This function is passed to the form. + // It's the "refresh button" that the form presses on success. + const refreshComments = () => { + router.reload({ only: ['comments'], preserveScroll: true }); + }; + + return ( + + + +
+ {/* Post Header */} +
+

{post.title}

+ {post.published_at && ( +

+ Published on {new Date(post.published_at).toLocaleDateString(undefined, { + year: 'numeric', + month: 'long', + day: 'numeric', + })} +

+ )} +
+ + {/* Media Component */} + + + {/* Content */} +
+ + {/* Leave a Comment Section */} +
+

Leave a Comment

+
+ {/* Pass the refresh function to the form */} + +
+
+ + {/* Comments Section */} +
+

+ Comments ({comments.length}) +

+
+ +
+
+
+
+ ); +} diff --git a/resources/js/pages/settings/appearance.tsx b/resources/js/pages/settings/appearance.tsx index 5099b2524..f4449956b 100644 --- a/resources/js/pages/settings/appearance.tsx +++ b/resources/js/pages/settings/appearance.tsx @@ -6,22 +6,37 @@ import { type BreadcrumbItem } from '@/types'; import AppLayout from '@/layouts/app-layout'; import SettingsLayout from '@/layouts/settings/layout'; +import { useLanguage } from '@/hooks/use-language'; -const breadcrumbs: BreadcrumbItem[] = [ - { - title: 'Appearance settings', - href: '/settings/appearance', +const translations = { + en: { + breadcrumb: 'Appearance settings', + pageTitle: 'Appearance settings', + heading: 'Appearance settings', + description: "Update your account's appearance settings", }, -]; + ar: { + breadcrumb: 'إعدادات المظهر', + pageTitle: 'إعدادات المظهر', + heading: 'إعدادات المظهر', + description: 'قم بتحديث إعدادات مظهر حسابك', + }, +} as const; export default function Appearance() { + const { language } = useLanguage(); + const t = translations[language]; + const breadcrumbs: BreadcrumbItem[] = [ + { title: t.breadcrumb, href: '/settings/appearance' }, + ]; + return ( - +
- +
diff --git a/resources/js/pages/settings/password.tsx b/resources/js/pages/settings/password.tsx index 43540bb1b..102ff08a4 100644 --- a/resources/js/pages/settings/password.tsx +++ b/resources/js/pages/settings/password.tsx @@ -5,20 +5,51 @@ import { type BreadcrumbItem } from '@/types'; import { Transition } from '@headlessui/react'; import { Head, useForm } from '@inertiajs/react'; import { FormEventHandler, useRef } from 'react'; +import { useLanguage } from '@/hooks/use-language'; import HeadingSmall from '@/components/heading-small'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; -const breadcrumbs: BreadcrumbItem[] = [ - { - title: 'Password settings', - href: '/settings/password', +const translations = { + en: { + breadcrumb: 'Password settings', + pageTitle: 'Password settings', + heading: 'Update password', + description: 'Ensure your account is using a long, random password to stay secure', + currentPassword: 'Current password', + newPassword: 'New password', + confirmPassword: 'Confirm password', + placeholderCurrent: 'Current password', + placeholderNew: 'New password', + placeholderConfirm: 'Confirm password', + save: 'Save password', + saved: 'Saved', }, -]; + ar: { + breadcrumb: 'إعدادات كلمة المرور', + pageTitle: 'إعدادات كلمة المرور', + heading: 'تحديث كلمة المرور', + description: 'تأكد من استخدام كلمة مرور طويلة وعشوائية لحماية حسابك', + currentPassword: 'كلمة المرور الحالية', + newPassword: 'كلمة المرور الجديدة', + confirmPassword: 'تأكيد كلمة المرور', + placeholderCurrent: 'كلمة المرور الحالية', + placeholderNew: 'كلمة المرور الجديدة', + placeholderConfirm: 'تأكيد كلمة المرور', + save: 'حفظ كلمة المرور', + saved: 'تم الحفظ', + }, +} as const; export default function Password() { + const { language } = useLanguage(); + const t = translations[language]; + const breadcrumbs: BreadcrumbItem[] = [ + { title: t.breadcrumb, href: '/settings/password' }, + ]; + const passwordInput = useRef(null); const currentPasswordInput = useRef(null); @@ -50,15 +81,16 @@ export default function Password() { return ( +
- +
- +
- +
- +
- + -

Saved

+

{t.saved}

diff --git a/resources/js/pages/settings/profile.tsx b/resources/js/pages/settings/profile.tsx index 3aeed3a7b..5fb3b611d 100644 --- a/resources/js/pages/settings/profile.tsx +++ b/resources/js/pages/settings/profile.tsx @@ -2,6 +2,7 @@ import { type BreadcrumbItem, type SharedData } from '@/types'; import { Transition } from '@headlessui/react'; import { Head, Link, useForm, usePage } from '@inertiajs/react'; import { FormEventHandler } from 'react'; +import { useLanguage } from '@/hooks/use-language'; import DeleteUser from '@/components/delete-user'; import HeadingSmall from '@/components/heading-small'; @@ -12,12 +13,38 @@ import { Label } from '@/components/ui/label'; import AppLayout from '@/layouts/app-layout'; import SettingsLayout from '@/layouts/settings/layout'; -const breadcrumbs: BreadcrumbItem[] = [ - { - title: 'Profile settings', - href: '/settings/profile', +const translations = { + en: { + breadcrumb: 'Profile settings', + pageTitle: 'Profile settings', + headingTitle: 'Profile information', + headingDesc: 'Update your name and email address', + name: 'Name', + email: 'Email address', + placeholderName: 'Full name', + placeholderEmail: 'Email address', + unverified: 'Your email address is unverified.', + resend: 'Click here to resend the verification email.', + verificationSent: 'A new verification link has been sent to your email address.', + save: 'Save', + saved: 'Saved', }, -]; + ar: { + breadcrumb: 'إعدادات الملف الشخصي', + pageTitle: 'إعدادات الملف الشخصي', + headingTitle: 'معلومات الملف الشخصي', + headingDesc: 'قم بتحديث اسمك وبريدك الإلكتروني', + name: 'الاسم', + email: 'البريد الإلكتروني', + placeholderName: 'الاسم الكامل', + placeholderEmail: 'البريد الإلكتروني', + unverified: 'عنوان بريدك الإلكتروني غير موثق.', + resend: 'اضغط هنا لإعادة إرسال رابط التوثيق.', + verificationSent: 'تم إرسال رابط تحقق جديد إلى بريدك الإلكتروني.', + save: 'حفظ', + saved: 'تم الحفظ', + }, +} as const; type ProfileForm = { name: string; @@ -25,6 +52,12 @@ type ProfileForm = { }; export default function Profile({ mustVerifyEmail, status }: { mustVerifyEmail: boolean; status?: string }) { + const { language } = useLanguage(); + const t = translations[language]; + const breadcrumbs: BreadcrumbItem[] = [ + { title: t.breadcrumb, href: '/settings/profile' }, + ]; + const { auth } = usePage().props; const { data, setData, patch, errors, processing, recentlySuccessful } = useForm>({ @@ -42,15 +75,15 @@ export default function Profile({ mustVerifyEmail, status }: { mustVerifyEmail: return ( - +
- +
- + setData('name', e.target.value)} required autoComplete="name" - placeholder="Full name" + placeholder={t.placeholderName} />
- + setData('email', e.target.value)} required autoComplete="username" - placeholder="Email address" + placeholder={t.placeholderEmail} /> @@ -84,6 +117,8 @@ export default function Profile({ mustVerifyEmail, status }: { mustVerifyEmail: {mustVerifyEmail && auth.user.email_verified_at === null && (
+

+ {t.unverified}{' '}

Your email address is unverified.{' '} - Click here to resend the verification email. + {t.resend}

{status === 'verification-link-sent' && (
- A new verification link has been sent to your email address. + {t.verificationSent}
)}
)}
- + -

Saved

+

{t.saved}

diff --git a/resources/js/pages/welcome.tsx b/resources/js/pages/welcome.tsx index 3f3afc1b2..d17f511a1 100644 --- a/resources/js/pages/welcome.tsx +++ b/resources/js/pages/welcome.tsx @@ -1,790 +1,465 @@ -import { type SharedData } from '@/types'; -import { Head, Link, usePage } from '@inertiajs/react'; +import { Head, Link } from '@inertiajs/react'; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Button } from '@/components/ui/button'; +import { Badge } from '@/components/ui/badge'; +import ContactSales from '@/components/contact-sales'; +import { useState, useEffect } from 'react'; +import { initializeTheme } from '@/hooks/use-appearance'; +import ThemeToggle from '@/components/theme-toggle'; +import { + CheckCircle, + BarChart3, + FileText, + Users, + ArrowRight, + Star, + Zap, + Shield, + Target, + TrendingUp, + Award, + ChevronRight, + Play, + Sparkles, + Phone, + MessageSquare, + Calendar, + Mail +} from 'lucide-react'; -export default function Welcome() { - const { auth } = usePage().props; +interface Tool { + id: number; + name: string; + name_en: string; + name_ar: string; + description: string; + description_en?: string; + description_ar?: string; + domains: Array<{ + id: number; + name: string; + name_en: string; + name_ar: string; + categories: Array<{ + id: number; + name: string; + name_en: string; + name_ar: string; + }>; + }>; +} + +interface WelcomeProps { + tools: Tool[]; + auth?: { + user?: { + name: string; + email: string; + } | null; + }; +} + +export default function Welcome({ tools, auth }: WelcomeProps) { + const [isVisible, setIsVisible] = useState(false); + const [currentTestimonial, setCurrentTestimonial] = useState(0); + const [isContactSalesOpen, setIsContactSalesOpen] = useState(false); + + // Initialize theme on component mount + useEffect(() => { + initializeTheme(); + setIsVisible(true); + const interval = setInterval(() => { + setCurrentTestimonial((prev) => (prev + 1) % 3); + }, 5000); + return () => clearInterval(interval); + }, []); + + const features = [ + { + icon: BarChart3, + title: "Advanced Analytics", + description: "Get AI-powered insights with real-time dashboards and predictive analytics to guide your strategic decisions.", + color: "from-blue-500 to-cyan-500" + }, + { + icon: CheckCircle, + title: "Smart Assessment Engine", + description: "Adaptive questionnaires that adjust based on your responses, providing personalized evaluation paths.", + color: "from-emerald-500 to-green-500" + }, + { + icon: Shield, + title: "Enterprise Security", + description: "Bank-grade security with end-to-end encryption, compliance certifications, and data protection.", + color: "from-purple-500 to-violet-500" + }, + { + icon: Users, + title: "Collaborative Platform", + description: "Real-time collaboration tools with role-based access, team workflows, and stakeholder engagement.", + color: "from-orange-500 to-red-500" + } + ]; + + const testimonials = [ + { + text: "This platform transformed how we approach organizational assessments. The insights are invaluable.", + author: "Sarah Chen, CTO at TechCorp", + rating: 5 + }, + { + text: "Implementation was seamless and the ROI was evident within the first quarter.", + author: "Michael Rodriguez, Strategy Director", + rating: 5 + }, + { + text: "The most comprehensive assessment tool we've used. Highly recommend for any organization.", + author: "Dr. Emma Thompson, Consultant", + rating: 5 + } + ]; + + const stats = [ + { number: "10,000+", label: "Organizations Assessed", icon: Target }, + { number: "99.9%", label: "Uptime Reliability", icon: Shield }, + { number: "24/7", label: "Expert Support", icon: Users }, + { number: "150+", label: "Countries Served", icon: TrendingUp } + ]; return ( <> - - - - -
-
- + + {/* Enhanced Auth Buttons */} +
+ {/* Theme Toggle */} + + + {auth?.user ? ( +
+ Welcome, {auth.user.name} + + + +
+ ) : ( +
+ + + + + + +
+ )} +
+
+
-
-
-
-

Let's get started

-

- Laravel has an incredibly rich ecosystem. -
- We suggest starting with the following. + + {/* Enhanced Hero Section */} +

+
+
+ + + Trusted by 10,000+ Organizations Worldwide + + +

+ Transform Your + + Organization + + with AI-Powered Assessments +

+ +

+ Unlock your organization's full potential with our comprehensive assessment platform. + Get actionable insights, identify growth opportunities, and drive strategic transformation.

- - + +
+ + + + +
-
- +
+ + {/* Contact Options Bar */} +
+
+
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + WhatsApp + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + Email Us + + +
-
-
-
+
+ + + {/* Stats Section */} +
+
+
+ {stats.map((stat, index) => ( +
+
+ +
+
{stat.number}
+
{stat.label}
+
+ ))} +
+
+
+ + {/* Rest of the sections remain the same as in the original Welcome component */} + {/* Enhanced Assessment Tools Section */} +
+
+
+ + + Choose Your Assessment Path + +

+ Discover Your + + Perfect Assessment + +

+

+ Select from our curated collection of industry-specific assessment tools, + each designed to provide deep insights and actionable recommendations. +

+ + {/* Enterprise CTA */} +
+ + +
+
+

+ Need Enterprise Solutions? +

+

+ Get custom pricing, dedicated support, and advanced features +

+
+ +
+
+
+
+
+ +
+ {tools.map((tool, index) => ( + +
+ + +
+
+ {index % 3 === 0 ? : + index % 3 === 1 ? : + } +
+ + {tool.domains.length} Domains + +
+ + + {tool.name_en || tool.name} + + + {tool.description_en || tool.description} + +
+ + +
+ {/* Enhanced Tool Stats */} +
+
+ + {tool.domains.length} Domains +
+
+ + + {tool.domains.reduce((acc, domain) => acc + domain.categories.length, 0)} Categories + +
+
+ + {/* Enhanced Domains Preview */} +
+

+ + Key Assessment Areas: +

+
+ {tool.domains.slice(0, 3).map((domain) => ( +
+ {domain.name_en || domain.name} + +
+ ))} + {tool.domains.length > 3 && ( +
+ +{tool.domains.length - 3} more assessment areas +
+ )} +
+
+
+ + {/* Enhanced CTA Buttons */} +
+ + + + + +
+
+
+ ))} +
+
+
+ + {/* Rest of your existing sections... */} + {/* Features, Testimonials, How It Works, CTA, Footer sections remain the same */} + + {/* Contact Sales Modal */} +
); diff --git a/resources/js/types/blog.ts b/resources/js/types/blog.ts new file mode 100644 index 000000000..2c09875b3 --- /dev/null +++ b/resources/js/types/blog.ts @@ -0,0 +1,66 @@ +// resources/js/types/blog.ts + +export interface BlogPost { + id: number; + title: string; + title_ar?: string; + slug: string; + excerpt: string; + excerpt_ar?: string; + content: string; + content_ar?: string; + featured_image?: string; + thumbnail_url?: string; + image_gallery_urls?: string[]; + audio?: string | null; + video?: string | null; + youtube_url?: string | null; + attachments?: string[]; + status: 'draft' | 'published' | 'archived'; + tags?: string[]; + meta_data?: Record; + published_at: string; + views_count: number; + likes_count: number; + comments_count: number; + created_at: string; + updated_at: string; + author: { + id: number; + name: string; + email: string; + avatar?: string; + }; +} + +export interface BlogComment { + id: number; + blog_post_id: number; + user_id?: number; + parent_id?: number; + author_name?: string; + author_email?: string; + content: string; + status: 'pending' | 'approved' | 'rejected'; + meta_data?: Record; + likes_count: number; + created_at: string; + updated_at: string; + user?: { + id: number; + name: string; + email: string; + avatar?: string; + }; + replies?: BlogComment[]; +} + +export interface BlogPostLike { + id: number; + blog_post_id: number; + user_id?: number; + session_id?: string; + ip_address?: string; + created_at: string; + updated_at: string; +} diff --git a/resources/js/types/post.ts b/resources/js/types/post.ts new file mode 100644 index 000000000..3feda90ab --- /dev/null +++ b/resources/js/types/post.ts @@ -0,0 +1,22 @@ +export interface Post { + id: number; + title: string; + slug: string; + content: string; + thumbnail?: string | null; + image_gallery?: string[] | null; + audio?: string | null; + video?: string | null; + youtube_url?: string | null; + published_at?: string | null; + status: 'draft' | 'published'; +} + +export interface Comment { + id: number; + post_id: number; + author_name: string; + content: string; + created_at: string; + approved: boolean; +} diff --git a/resources/views/app.blade.php b/resources/views/app.blade.php index 821826797..055316d62 100644 --- a/resources/views/app.blade.php +++ b/resources/views/app.blade.php @@ -1,50 +1,108 @@ - ($appearance ?? 'system') == 'dark'])> - - - + + + + + + {{-- Enhanced theme detection and application --}} + + } - {{-- Inline style to set the HTML background color based on our theme in app.css --}} - + })(); + + + {{-- CSS custom properties for themes --}} + - - + {{ config('app.name', 'Laravel') }} - @routes + + + + + + + + @routes + @if (!app()->runningUnitTests()) @viteReactRefresh @vite(['resources/js/app.tsx', "resources/js/pages/{$page['component']}.tsx"]) - @inertiaHead - - - @inertia - + @endif + @inertiaHead + @paddleJS + + +@inertia + +{{-- Show body after theme is applied --}} + + diff --git a/resources/views/emails/contact-sales-confirmation.blade.php b/resources/views/emails/contact-sales-confirmation.blade.php new file mode 100644 index 000000000..ad83b9a70 --- /dev/null +++ b/resources/views/emails/contact-sales-confirmation.blade.php @@ -0,0 +1,224 @@ + + + + + + + Thank you for contacting our sales team + + + + + + diff --git a/resources/views/emails/contact-sales-notification.blade.php b/resources/views/emails/contact-sales-notification.blade.php new file mode 100644 index 000000000..f09dcfa73 --- /dev/null +++ b/resources/views/emails/contact-sales-notification.blade.php @@ -0,0 +1,230 @@ + + + + + + New Sales Lead: {{ $lead->company }} + + + + + + diff --git a/resources/views/emails/guest-assessment-completed.blade.php b/resources/views/emails/guest-assessment-completed.blade.php new file mode 100644 index 000000000..d1e804ff4 --- /dev/null +++ b/resources/views/emails/guest-assessment-completed.blade.php @@ -0,0 +1,275 @@ + + + + + + Your Assessment Results + + + +
+
+ +

Assessment Complete!

+

{{ $toolName }} Results

+
+ +

Hello {{ $userName }},

+ +

Congratulations! You've successfully completed the {{ $toolName }} assessment. Here's a preview of your results:

+ +
+
{{ number_format($basicResults['overall_percentage'], 1) }}%
+
Overall Score
+
+ +
+
+
{{ $basicResults['total_criteria'] }}
+
Total Questions
+
+
+
{{ $basicResults['yes_count'] }}
+
Yes Responses
+
+
+
{{ $basicResults['applicable_criteria'] }}
+
Applicable
+
+
+ +
+

🎯 Unlock Your Full Results

+

+ Get detailed insights, recommendations, and track your progress over time by creating your free account. +

+ + + Create Free Account + + + + View Basic Results + +
+ +
+

What you'll get with an account:

+ +
+
📈
+
+ Detailed Analytics
+ Domain-wise breakdowns and category analysis +
+
+ +
+
💡
+
+ Personalized Recommendations
+ Actionable insights to improve your scores +
+
+ +
+
📊
+
+ Progress Tracking
+ Monitor improvements over multiple assessments +
+
+ +
+
📄
+
+ Professional Reports
+ Download PDF reports for your organization +
+
+
+ +
+

+ Assessment Details:
+ Completed on {{ $assessment->completed_at->format('F j, Y \a\t g:i A') }}
+ Assessment ID: #{{ $assessment->id }} +

+
+ + +
+ + diff --git a/resources/views/emails/test.blade.php b/resources/views/emails/test.blade.php new file mode 100644 index 000000000..962fa2b8c --- /dev/null +++ b/resources/views/emails/test.blade.php @@ -0,0 +1,9 @@ + + + + Test Email + + +

This is a test email from Laravel

+ + diff --git a/resources/views/emails/tool-quotation.blade.php b/resources/views/emails/tool-quotation.blade.php new file mode 100644 index 000000000..d9683ca07 --- /dev/null +++ b/resources/views/emails/tool-quotation.blade.php @@ -0,0 +1,98 @@ + + + + + Tool Quotation + + + + + + + + + + + + + + +
+ Company Logo +
+

Quotation for: {{ $request->tool->getNameAttribute() }}

+

{{ $request->tool->getDescriptionAttribute() }}

+ + + + + + + + + + + + + + + + + + +
Name:{{ $request->name }}
Email:{{ $request->email }}
Organization:{{ $request->organization }}
Status:{{ ucfirst($request->status ?? 'pending') }}
+ @if(!empty($request->message)) +
+

Message

+

+ {{ $request->message }} +

+
+ @endif +
+ +

Quotation Details

+ + + + + + + + + + + + + + + + + + + + + + @if ($account->swift_code) + + + + + @endif + + @if (!empty($data['note'])) + + + + + @endif +
Amount:{{ $data['amount'] .' '.$account->currency ?? 'N/A' }}
Bank Name:{{ $account->bank_name }}
IBAN:{{ $account->iban }}
Account Number:{{ $account->account_number }}
Account Holder:{{ $account->name }}
SWIFT Code:{{ $account->swift_code }}
Note:{{ $data['note'] }}
+ +

+ Thank you for your interest. If you have any questions, feel free to reply to this email. +

+
+ © {{ now()->year }} Afaqcm. All rights reserved. +
+ + diff --git a/resources/views/emails/tool-quotation2.blade.php b/resources/views/emails/tool-quotation2.blade.php new file mode 100644 index 000000000..119846db8 --- /dev/null +++ b/resources/views/emails/tool-quotation2.blade.php @@ -0,0 +1,24 @@ +@component('mail::message') +# Quotation for {{ $request->tool->name_en }} + +Dear {{ $request->name }}, + +Thank you for your interest in {{ $request->tool->name_en }}. Below are the quotation details: + +@component('mail::panel') +**Amount:** {{ $data['amount'] }} + +**Bank:** {{ $data['bank_name'] }} + +**IBAN:** {{ $data['iban'] }} +@endcomponent + +@if(!empty($data['note'])) +{{ $data['note'] }} +@endif + +If you have any questions, feel free to reply to this email. + +Thanks, +{{ config('app.name') }} Team +@endcomponent diff --git a/resources/views/pdf/free-assessment-report.blade.php b/resources/views/pdf/free-assessment-report.blade.php new file mode 100644 index 000000000..a96cfe32b --- /dev/null +++ b/resources/views/pdf/free-assessment-report.blade.php @@ -0,0 +1,970 @@ + + + + + + Gartner CMO Value Playbook + + + + +
+ +
+
+ +

The CMO Value Playbook

+

5 strategies to boost influence and showcase marketing's value

+ +
+
+
48%
+
Unable to prove value and/or don't get credit
+
+
+
52%
+
Able to prove value and get credit
+
+
+
+
+ + +
+

The Challenge for Marketing Leaders

+

The 2024 Gartner Marketing Analytics and Technology Survey indicates that proving the value of marketing and receiving credit for business outcomes is a common challenge, with nearly half of marketing leaders feeling it's out of reach.

+

A deeper dive shows that just proving value isn't always enough to get credit. Skepticism and traditional beliefs often stand in the way of recognizing marketing's true value.

+ +
+
Perceptions of Marketing's Ability to Prove Value and Get Credit
+
+
+
48%
+
Unable to prove value
+
+
+
52%
+
Able to prove value
+
+
+

n = 377 senior marketing leaders

+
+
+ + +
+
1
+

Focus on marketing's long-term, holistic impact

+ +
+
+

The Challenge

+

CMOs who adopt a long-term, holistic view are more successful in proving marketing's value and gaining credit. In contrast, only 30% of those focusing on short-term initiatives reported success.

+
+ +
+

Recommended Actions

+
    +
  • +
    1
    +
    + Measure long-term value: Capturing marketing's effect over time requires more advanced approaches to measurement like measuring brand health and marketing mix modeling (MMM). +
    +
  • +
  • +
    2
    +
    + Create a holistic view: Develop a comprehensive view of marketing's value across six "value vectors": Connection to Strategy, ROI Story, Critical-Project Impact, Insight Engine, Empowering Others and Optimizing Resources. +
    +
  • +
+
+
+ +
+
Focusing on holistic, longer-term impact helps prove value and get credit
+
+
+
30%
+
Individual short-term
+
+
+
51%
+
Holistic short-term
+
+
+
49%
+
Individual long-term
+
+
+
68%
+
Holistic long-term
+
+
+

n = 377 senior marketing leaders

+
+
+ + +
+
2
+

Build a narrative about marketing's value for all stakeholders

+ +
+
+

The Challenge

+

CEOs and CFOs are the most skeptical of marketing's value. CMOs aiming to foster strong relationships should understand their priorities and views on marketing to craft a compelling narrative.

+
+ +
+

Recommended Approach

+
    +
  • +
    +
    Tailor your value story to specific stakeholders
    +
  • +
  • +
    +
    Address specific stakeholder misconceptions
    +
  • +
  • +
    +
    Use the Key Stakeholder Shortlist Template
    +
  • +
+
+
+ +

Stakeholders most skeptical of marketing's value

+
+
+
+
+ +
+
CFO
+
+
    +
  • Marketing's broad activities make financial accountability challenging
  • +
  • Marketing investments need clear, measurable impact on revenue
  • +
  • Marketing's impact is often subtle and temporary
  • +
+
+ +
+
+
+ +
+
CEO
+
+
    +
  • Marketing is crucial but hard to measure
  • +
  • Marketing must move from cost center to profit driver
  • +
  • Marketing should demonstrate impact on business strategy
  • +
+
+
+ +
+
Skepticism Levels Among Stakeholders
+
+
+
40%
+
CFO
+
+
+
39%
+
CEO
+
+
+
+
+ + +
+
3
+

Increase variety and sophistication of metric types

+ +
+
+

The Challenge

+

Using a variety of metrics makes it 26% more likely to prove value and get credit. However, it's not just about variety; it's the quality of the metrics that matters. Using at least one high-complexity metric type drives a 1.5x increase in likelihood to prove value.

+
+ +
+

Recommended Actions

+
    +
  • +
    +
    Prioritize high-complexity metrics
    +
  • +
  • +
    +
    Use Gartner's Hierarchy of Marketing Metrics
    +
  • +
  • +
    +
    Start with stakeholder interviews
    +
  • +
+
+
+ +
+
Impact of High-Complexity Metrics
+
+
+
37%
+
No high-complexity metrics
+
+
+
56%
+
With high-complexity metrics
+
+
+

1.5x more likely to prove value and get credit

+
+ +

High-Complexity Metric Types

+
+
+
Relationship Metrics
+

Metrics that measure customer relationships over time

+
+ Examples: Customer lifetime value (LTV), Customer acquisition cost (CAC), LTV-CAC ratio +
+
+ +
+
Return on Transactional
+

Metrics that measure the financial return on specific activities

+
+ Examples: Cost per acquisition (CPA), Return on ad spend (ROAS), ROI +
+
+ +
+
Operational Metrics
+

Metrics that measure the efficiency and effectiveness of marketing operations

+
+ Examples: Stakeholder satisfaction, Productivity of marketing resources, Capacity utilization +
+
+
+
+ + +
+
4
+

Expand leadership involvement in D&A activity

+ +
+
+

The Challenge

+

CMO and senior marketing leader participation in a high number of D&A activities, particularly managing a D&A function, is vital to proving value and getting credit.

+
+ +
+

Recommended Actions

+
    +
  • +
    +
    Increase involvement in analytical activities
    +
  • +
  • +
    +
    Regular meetings with team members and executives
    +
  • +
  • +
    +
    Develop measurement strategies for marketing activities
    +
  • +
+
+
+ +
+
Impact of D&A Activities on Proving Marketing Value
+
+
+
44%
+
Low activities in role
+
+
+
60%
+
High activities in role
+
+
+
48%
+
Low activities in career
+
+
+
55%
+
High activities in career
+
+
+
+
+ + +
+
5
+

Invest in marketing talent to close gaps

+ +
+
+

The Challenge

+

Talent gaps present the biggest barriers to proving the value of marketing. For CMOs, lacking the right talent affects how the C-suite perceives marketing's value and impacts investment in marketing D&A.

+
+ +
+

Recommended Actions

+
    +
  • +
    +
    Develop soft skills and competencies to tell a consistent, credible story
    +
  • +
  • +
    +
    Invest in analytical talent to bridge the talent gap
    +
  • +
  • +
    +
    Focus on recruiting and upskilling technical talent
    +
  • +
+
+
+ +
+
Top Barriers to Proving Marketing Value
+
+
+
39%
+
Lack of soft skills
+
+
+
34%
+
Lack of analytical talent
+
+
+
33%
+
Lack of technical talent
+
+
+
+
+ + +
+

Additional Resources

+

Explore these additional complimentary resources and tools for marketing leaders:

+ +
+
+
+ +
+

Change the Perception of Marketing

+

Learn how CMOs use measurement and storytelling to communicate the impact of marketing.

+ +
+ +
+
+ +
+

Marketing Talent Trends

+

Learn marketing talent trends and CMO action steps to drive success.

+ +
+ +
+
+ +
+

Marketing Budget Template

+

Build your 2025 budget with this comprehensive template.

+ +
+ +
+
+ +
+

Prove Marketing Value Guide

+

Use the hierarchy of marketing metrics to quantify marketing's impact.

+ +
+
+
+
+ + +
+
+ + + +
+

U.S.: 1 855 811 7593

+

International: +44 (0) 3330 607 044

+
+ + + + +
+
+ + + + diff --git a/resources/views/reports/cmo-playbook-professional.blade.php b/resources/views/reports/cmo-playbook-professional.blade.php new file mode 100644 index 000000000..0f37127a3 --- /dev/null +++ b/resources/views/reports/cmo-playbook-professional.blade.php @@ -0,0 +1,277 @@ + + + + + {{ $data['title'] }} + + + + +
+
+

{{ $data['title'] }}

+

{{ $data['subtitle'] }}

+

© {{ date('Y') }} Gartner, Inc.

+
+ +
+ +
Key Statistics
+
+
+
{{ $data['key_statistics']['prove_value_and_credit'] }}%
+
Able to prove value and get credit
+
+
+
{{ $data['key_statistics']['unable_to_prove'] }}%
+
Unable to prove value or receive credit
+
+
+ +
+

Key Insight

+

+ The {{ $data['survey_info']['year'] }} {{ $data['survey_info']['source'] }} of + {{ $data['survey_info']['sample_size'] }} {{ $data['survey_info']['respondent_type'] }} found that + proving marketing value is a challenge for nearly half of CMOs. +

+
+ +
+ +
5 Proven Strategies
+ @foreach($data['strategies'] as $strategy) +
+

{{ $strategy['number'] }}. {{ $strategy['title'] }}

+

{{ $strategy['description'] }}

+

📊 {{ $strategy['key_stat'] }}

+
    + @foreach($strategy['actions'] as $action) +
  • {{ $action }}
  • + @endforeach +
+
+ @endforeach + +
+ +
Stakeholder Skepticism
+ @foreach($data['stakeholder_data']['most_skeptical'] as $item) +
+
{{ $item['role'] }} — {{ $item['percentage'] }}%
+
+
 
+
+
+ @endforeach + @foreach($data['stakeholder_data']['most_skeptical'] as $item) +
+
{{ $item['role'] }} — {{ $item['percentage'] }}%
+
+
 
+
+
+ @endforeach + +
+

Strategic Insight

+

+ CFOs seek direct accountability from marketing. CEOs want marketing to become a growth engine, not a cost center. +

+
+
+

Strategic Insight

+

+ CFOs seek direct accountability from marketing. CEOs want marketing to become a growth engine, not a cost center. +

+
+ + +
+ +
Top Barriers to Proving Value
+ @foreach($data['barriers'] as $item) +
+
{{ $item['description'] }} — {{ $item['percentage'] }}%
+
+
 
+
+
+ @endforeach + +
+

Talent Investment Priority

+

+ Soft skills, data literacy, and tech capabilities are essential to overcome these top barriers. +

+
+ + +
+ + + + + diff --git a/resources/views/reports/comprehensive/ar.blade.php b/resources/views/reports/comprehensive/ar.blade.php new file mode 100644 index 000000000..050ea3a52 --- /dev/null +++ b/resources/views/reports/comprehensive/ar.blade.php @@ -0,0 +1,668 @@ +{{-- resources/views/reports/comprehensive/ar.blade.php --}} + + + + + تقرير التقييم النهائي - {{ $results['assessment']['client_name'] }} + + + +
+ {{-- Header --}} +
+

تقرير التقييم النهائي

+

{{ $results['tool']['name_ar'] }}

+
+ التاريخ: {{ $results['assessment']['created_at']->format('Y/m/d') }} | + النوع: تقييم شامل | + الحالة: {{ $results['assessment']['status'] === 'completed' ? 'مكتمل' : 'قيد المعالجة' }} +
+
+ + {{-- Client Information --}} +
+

معلومات العميل

+
+
+
+

اسم العميل

+

{{ $results['assessment']['client_name'] }}

+
+
+

البريد الإلكتروني

+

{{ $results['assessment']['client_email'] }}

+
+
+

المؤسسة

+

{{ $results['assessment']['organization'] ?: 'غير محدد' }}

+
+
+

أداة التقييم

+

{{ $results['tool']['name_ar'] }}

+
+
+
+
+ + {{-- Overall Results --}} +
+

النتيجة الإجمالية

+
+
+ {{ number_format($results['overall_percentage'], 1) }}% +
+
+ {{ $certification['text_ar'] }} +
+ +
+
+
+
{{ $results['yes_count'] }}
+
إجابات نعم
+
+
+
{{ $results['no_count'] }}
+
إجابات لا
+
+
+
{{ $results['na_count'] }}
+
غير قابل للتطبيق
+
+
+
+
+
+ + {{-- Domain Results --}} +
+

النتائج التفصيلية

+ @foreach($results['domain_results'] as $domain) +
+
+
+ {{ $loop->iteration }} +
+
+

{{ $domain['domain_name'] }}

+

النتيجة: {{ number_format($domain['score_percentage'], 1) }}% | + المعايير: {{ $domain['total_criteria'] }} | + القابل للتطبيق: {{ $domain['applicable_criteria'] }}

+
+
+ +
+
+
+ +
+
+
+
{{ $domain['yes_count'] }}
+
نعم
+
+
+
{{ $domain['no_count'] }}
+
لا
+
+
+
{{ $domain['na_count'] }}
+
غير قابل
+
+
+
+
+ @endforeach +
+ + {{-- ENHANCED: Detailed Actions Section using Action Model --}} + @if(isset($actions) && !empty($actions)) +
+

الإجراءات المطلوبة

+ + {{-- Group actions by criteria --}} + @php + $actionsByCriteria = collect($actions)->groupBy('criterion_id'); + @endphp + + @foreach($actionsByCriteria as $criterionId => $criterionActions) + @php + $criterion = $criterionActions->first()->criterion ?? null; + $improvementActions = $criterionActions->where('flag', true); + $correctiveActions = $criterionActions->where('flag', false); + @endphp + +
+
+ {{ $criterion ? $criterion->name_ar : "معيار غير محدد" }} +
+
+ {{-- Improvement Actions --}} + @if($improvementActions->count() > 0) +
+ 🔧 إجراءات تحسينية ({{ $improvementActions->count() }}) +
+ @foreach($improvementActions as $action) +
+ {{ $action->action_ar }} +
+ @endforeach + @endif + + {{-- Corrective Actions --}} + @if($correctiveActions->count() > 0) +
+ ⚠️ إجراءات تصحيحية ({{ $correctiveActions->count() }}) +
+ @foreach($correctiveActions as $action) +
+ {{ $action->action_ar }} +
+ @endforeach + @endif +
+
+ @endforeach +
+ @endif + + {{-- Recommendations --}} + @if($settings['include_recommendations'] && !empty($recommendations)) +
+

التوصيات

+
+
توصيات التحسين:
+ @foreach($recommendations as $recommendation) +
+ {{ $recommendation['domain_name'] }}: + {{ $recommendation['text'] }} +
+ @endforeach +
+
+ @endif + + {{-- ENHANCED: Action Plan using dynamic data --}} +
+

خطة العمل الموصى بها

+ + + + + + + + + + + + + @foreach($results['domain_results'] as $domain) + @php + $priority = getPriorityLevel($domain['score_percentage']); + $targetScore = getTargetScore($domain['score_percentage']); + $actionType = getRecommendedActionType($domain['score_percentage']); + @endphp + + + + + + + + + @endforeach + +
المجالالنتيجة الحاليةالهدف المطلوبالأولويةالإجراءات المطلوبةنوع الإجراء
{{ $domain['domain_name'] }}{{ number_format($domain['score_percentage'], 1) }}%{{ $targetScore }}%{{ $priority }}{{ getActionPlan($domain['domain_name'], $domain['score_percentage']) }} + {{ $actionType }} +
+
+ + {{-- Summary Statistics --}} + @if(isset($actions)) +
+

إحصائيات الإجراءات

+ @php + $totalActions = collect($actions)->count(); + $improvementCount = collect($actions)->where('flag', true)->count(); + $correctiveCount = collect($actions)->where('flag', false)->count(); + @endphp + +
+
+
+
{{ $improvementCount }}
+
إجراءات تحسينية
+
+
+
{{ $correctiveCount }}
+
إجراءات تصحيحية
+
+
+
{{ $totalActions }}
+
إجمالي الإجراءات
+
+
+
+
+ @endif + + {{-- Footer --}} + +
+ + + +@php + function getDomainColor($index) { + $colors = ['#3b82f6', '#ef4444', '#f97316', '#22c55e', '#8b5cf6', '#06b6d4']; + return $colors[$index % count($colors)]; + } + + function getScoreClass($score) { + if ($score >= 85) return 'excellent'; + if ($score >= 70) return 'good'; + if ($score >= 55) return 'fair'; + return 'poor'; + } + + function getActionPlan($domainName, $score) { + if ($score < 60) { + return "إعادة هيكلة وتطوير شامل لـ {$domainName}"; + } elseif ($score < 80) { + return "تحسين وتطوير العمليات في {$domainName}"; + } else { + return "مراجعة دورية والحفاظ على المستوى الحالي"; + } + } + + function getPriorityLevel($score) { + if ($score < 60) return 'عالية'; + if ($score < 80) return 'متوسطة'; + return 'منخفضة'; + } + + function getPriorityColor($priority) { + switch($priority) { + case 'عالية': return '#dc2626'; + case 'متوسطة': return '#f59e0b'; + case 'منخفضة': return '#059669'; + default: return '#6b7280'; + } + } + + function getTargetScore($currentScore) { + if ($currentScore < 70) return '85+'; + if ($currentScore < 85) return '90+'; + return '95+'; + } + + function getRecommendedActionType($score) { + return $score < 70 ? 'تصحيحية' : 'تحسينية'; + } +@endphp diff --git a/resources/views/reports/comprehensive/en.blade.php b/resources/views/reports/comprehensive/en.blade.php new file mode 100644 index 000000000..e69de29bb diff --git a/resources/views/reports/detailed/ar.blade.php b/resources/views/reports/detailed/ar.blade.php new file mode 100644 index 000000000..f9ffe2d36 --- /dev/null +++ b/resources/views/reports/detailed/ar.blade.php @@ -0,0 +1 @@ +ar.blade.php diff --git a/resources/views/reports/detailed/en.blade.php b/resources/views/reports/detailed/en.blade.php new file mode 100644 index 000000000..f9ffe2d36 --- /dev/null +++ b/resources/views/reports/detailed/en.blade.php @@ -0,0 +1 @@ +ar.blade.php diff --git a/resources/views/reports/half-chart.blade.php b/resources/views/reports/half-chart.blade.php new file mode 100644 index 000000000..01d50c1f3 --- /dev/null +++ b/resources/views/reports/half-chart.blade.php @@ -0,0 +1,205 @@ + + + + + + + + Report - PageCapture + + + + + +
+
+
+ +
+

+ Activity Summary +

+ August 2022 +
+
+
+
+ +
+

Overview

+ +
+
+

+ Total Subscribers +

+
+

+ 71,897 +

+

+ + 122 +

+
+
+ +
+

+ New Subscribers +

+
+

+ 51,194 +

+

+ + 1,123 +

+
+
+ +
+

+ PDFs Generated +

+
+

+ 98,123 +

+

+ + 1,212 +

+
+
+ +
+

+ Images Generated +

+
+

+ 65,301 +

+

+ + 2,002 +

+
+
+
+ +
+ +
+

New Subscribers

+ +
+ + +
+
+ +
+ +
+

Actions

+ +
+ + +
+
+
+ + diff --git a/resources/views/reports/summary/ar.blade.php b/resources/views/reports/summary/ar.blade.php new file mode 100644 index 000000000..f9ffe2d36 --- /dev/null +++ b/resources/views/reports/summary/ar.blade.php @@ -0,0 +1 @@ +ar.blade.php diff --git a/resources/views/reports/summary/en.blade.php b/resources/views/reports/summary/en.blade.php new file mode 100644 index 000000000..f9ffe2d36 --- /dev/null +++ b/resources/views/reports/summary/en.blade.php @@ -0,0 +1 @@ +ar.blade.php diff --git a/routes/api.php b/routes/api.php new file mode 100644 index 000000000..941646b1b --- /dev/null +++ b/routes/api.php @@ -0,0 +1,37 @@ +group(function () { + + // Generate PDF report for assessment + Route::post('/assessments/{assessment}/reports/generate', [AssessmentReportController::class, 'generateReport']) + ->name('api.assessments.reports.generate'); + + // Preview report data (for frontend preview) + Route::get('/assessments/{assessment}/reports/preview', [AssessmentReportController::class, 'previewReport']) + ->name('api.assessments.reports.preview'); + + // Get available report templates + Route::get('/reports/templates', [AssessmentReportController::class, 'getTemplates']) + ->name('api.reports.templates'); +}); + +// Guest PDF Generation (for guest assessments) +Route::middleware(['throttle:10,1'])->group(function () { + + // Generate PDF for guest assessment with session validation + Route::post('/guest/assessments/{assessment}/reports/generate', [AssessmentReportController::class, 'generateGuestReport']) + ->name('api.guest.assessments.reports.generate'); + +}); + +// Additional methods for AssessmentReportController + +/** + * Preview report data without generating PDF + */ + diff --git a/routes/web.php b/routes/web.php index 5e4cebdf6..22abbdb24 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,17 +1,410 @@ name('home'); +// ======================================== +// PUBLIC HOME ROUTE - UPDATED FOR PROPER REDIRECT LOGIC +// ======================================== + +//Route::get('/', function () { +// if (auth()->check()) { +// $user = auth()->user(); +// +// // Load user relationships +// $user->load(['subscription', 'details', 'roles']); +// +// // Create default subscription/details if missing +// if (!$user->subscription || !$user->details) { +// $user->createDefaultSubscriptionAndDetails(); +// $user->refresh(); +// } +// +// // FIXED REDIRECT LOGIC: +// // 1. Admin users -> dashboard +// if ($user->isAdmin()) { +// return redirect()->route('dashboard'); +// } +// +// // 2. Users with tool subscriptions (premium) -> dashboard +// if ($user->hasAnyToolSubscription()) { +// return redirect()->route('dashboard'); +// } +// +// // 3. Free users -> tools discovery page to browse available tools +// return redirect()->route('tools.discover'); +// } +// +// // Guest users see welcome page +// return app(GuestAssessmentController::class)->index2(); +//})->name('home'); + +// Alternative home route for compatibility +Route::get('/', [GuestAssessmentController::class, 'index2'])->name('home'); + +// ======================================== +// PUBLIC GUEST ROUTES +// ======================================== + +// Guest assessment routes +Route::get('/guest/assessment', [GuestAssessmentController::class, 'create'])->name('guest.assessment.create'); +Route::post('/guest/assessment', [GuestAssessmentController::class, 'store'])->name('guest.assessment.store'); +Route::get('/guest/assessment/{session}', [GuestAssessmentController::class, 'show'])->name('guest.assessment.show'); +Route::post('/guest/assessment/{session}/response', [GuestAssessmentController::class, 'storeResponse'])->name('guest.assessment.response'); +Route::post('/guest/assessment/{session}/submit', [GuestAssessmentController::class, 'submit'])->name('guest.assessment.submit'); +Route::get('/guest/assessment/{session}/results', [GuestAssessmentController::class, 'results'])->name('guest.assessment.results'); + +// Free user registration route +Route::post('/user/register-free', [UserRegistrationController::class, 'registerFreeUser'])->middleware('guest')->name('user.register-free'); + + +// Contact sales +Route::post('/contact-sales', [ContactSalesController::class, 'store'])->name('contact.sales'); + +// Tool access requests +Route::get('/tools/request/{tool}', [ToolRequestController::class, 'create'])->name('tool-request.create'); +Route::post('/tool-requests', [ToolRequestController::class, 'store'])->name('tool-request.store'); + +// Guest PDF report generation +Route::post('/guest/assessments/{assessment}/reports/generate', [AssessmentPDFController::class, 'downloadGuestReport']) + ->middleware(['throttle:10,1']); + + +// Blog posts + Route::get('/posts', [PostController::class, 'index'])->name('posts.index'); + Route::get('/posts/{post:slug}', [PostController::class, 'show'])->name('posts.show'); + Route::post('/posts/{post:slug}/comments', [PostController::class, 'storeComment'])->name('posts.comments.store'); + +// Paddle webhooks (no auth middleware) +Route::post('/paddle/webhook', [PaddleWebhookController::class, 'handleWebhook']) + ->name('paddle.webhook'); + +// ======================================== +// AUTHENTICATED USER ROUTES +// ======================================== Route::middleware(['auth', 'verified'])->group(function () { - Route::get('dashboard', function () { - return Inertia::render('dashboard'); - })->name('dashboard'); + + // ======================================== + // API ROUTES FOR NAVIGATION + // ======================================== + + Route::get('/api/navigation', [NavigationController::class, 'getNavigationItems']) + ->name('api.navigation'); + + + Route::get('/tools/discover', [ToolDiscoveryController::class, 'index']) + ->name('tools.discover'); + + Route::get('/tools/{tool}/details', [ToolDiscoveryController::class, 'show']) + ->name('tools.show'); + + Route::get('/tools/{tool}/subscribe', [ToolSubscriptionController::class, 'show']) + ->name('tools.subscribe'); + + Route::post('/tools/{tool}/subscribe', [ToolSubscriptionController::class, 'subscribe']) + ->name('tools.subscribe.store'); + + // Paddle checkout routes + Route::post('/tools/{tool}/paddle-checkout', [ToolSubscriptionController::class, 'createCheckout']) + ->name('tools.paddle.checkout'); + + Route::get('/tools/{tool}/payment/success', [ToolSubscriptionController::class, 'paymentSuccess']) + ->name('tools.payment.success'); + Route::get('logout', [App\Http\Controllers\Auth\AuthenticatedSessionController::class, 'destroy']); + // User's tool subscriptions management + Route::get('/my-tool-subscriptions', [ToolSubscriptionController::class, 'index']) + ->name('tools.subscriptions'); + + Route::delete('/tool-subscriptions/{subscription}', [ToolSubscriptionController::class, 'cancel']) + ->name('tools.subscriptions.cancel'); + + // ======================================== + // FREE ASSESSMENT ROUTES - ONLY for users WITHOUT tool subscriptions + // ======================================== + + Route::middleware(['checkAccess:free'])->group(function () { + + // 1. Index page - shows tool info and start button (Index.tsx) + Route::get('/free-assessment', [FreeAssessmentController::class, 'index']) + ->name('free-assessment.index'); + + // Request access to a tool + Route::get('/free-assessment/request/{tool}', [FreeAssessmentController::class, 'requestForm']) + ->name('free-assessment.request'); + + // 2. Start assessment - NO PARAMETERS NEEDED (uses single free tool) + Route::post('/free-assessment/start', [FreeAssessmentController::class, 'start']) + ->name('free-assessment.start'); + + // 3. Take assessment - main assessment form (Start.tsx) + Route::get('/free-assessment/{assessment}/take', [FreeAssessmentController::class, 'take']) + ->name('free-assessment.take') + ->where('assessment', '[0-9]+'); + + // 4. Submit final assessment (from Start.tsx form) + Route::post('/free-assessment/{assessment}/submit', [FreeAssessmentController::class, 'submit']) + ->name('free-assessment.submit'); + + // 5. Completion page before showing results + Route::get('/free-assessment/{assessment}/complete', [FreeAssessmentController::class, 'complete']) + ->name('free-assessment.complete'); + + // 6. View basic results (Results.tsx) + Route::get('/free-assessment/{assessment}/results', [FreeAssessmentController::class, 'results']) + ->name('free-assessment.results'); + + // 7. Edit assessment (redirects to take route) + Route::get('/free-assessment/{assessment}/edit', [FreeAssessmentController::class, 'edit']) + ->name('free-assessment.edit'); + + // 7. Download PDF report (NEW) + Route::get('/free-assessment/{assessment}/pdf', [FreeAssessmentController::class, 'downloadPDF']) + ->name('free-assessment.pdf'); + + // 8. Premium results page (Premium.tsx) - for premium users or upgrade prompt + Route::get('/free-assessment/{assessment}/premium', [FreeAssessmentController::class, 'premiumResults']) + ->name('free-assessment.premium'); + }); + // ======================================== + // PREMIUM ROUTES - ONLY for users WITH tool subscriptions OR admins + // ======================================== + + Route::middleware(['checkAccess:premium'])->group(function () { + + Route::get('/profile/setup', function () { + return Inertia::render('ProfileWizard'); + })->name('profile.setup'); + + Route::post('/profile/setup', [UserRegistrationController::class, 'completeProfile']) + ->name('profile.complete'); + + // Dashboard access + Route::get('dashboard', function () { + $user = auth()->user(); + if (!$user->hasCompletedProfile()) { + return redirect()->route('profile.setup'); + } + return Inertia::render('dashboard'); + })->name('dashboard'); + + // Assessment tools access + Route::get('/assessment-tools', [AssessmentToolsController::class, 'index']) + ->name('assessment-tools'); + + Route::get('/assessments/tool/{tool}', [AssessmentToolsController::class, 'start']) + ->name('assessment.start'); + + Route::get('/assessments/{assessment}', [AssessmentController::class, 'show']) + ->name('assessment.show'); + + Route::get('/assessments/{assessment}/take', [AssessmentController::class, 'take']) + ->name('assessment.take'); + + Route::post('/assessments/{assessment}/response', [AssessmentController::class, 'saveResponse']) + ->name('assessment.response'); + + Route::post('/assessments/{assessment}/submit', [AssessmentController::class, 'submit']) + ->name('assessment.submit'); + + Route::get('/assessments/{assessment}/results', [AssessmentController::class, 'results']) + ->name('assessment.results'); + + Route::get('/assessments/{assessment}/edit', [AssessmentController::class, 'edit']) + ->name('assessment.edit'); + + Route::get('/assessments', [AssessmentController::class, 'index']) + ->name('assessments.index'); + + Route::post('/assessments/{assessment}/save-exit', function($assessmentId) { + return response()->json(['success' => true, 'message' => 'Progress saved']); + })->name('assessment.save-exit'); + + Route::prefix('assessment/{assessment}/pdf')->name('assessment.pdf.')->group(function () { + + // Download PDF directly + Route::get('/download', [AssessmentPDFController::class, 'downloadAssessmentPDF']) + ->name('download'); + + // Save PDF to storage and get URL + Route::post('/save', [AssessmentPDFController::class, 'saveAssessmentPDF']) + ->name('save'); + + // Preview PDF in browser (HTML version) + Route::get('/preview', [AssessmentPDFController::class, 'previewAssessmentPDF']) + ->name('preview'); + }); + }); + + // ======================================== + // LEGACY FREE USER ROUTES - REDIRECT TO NEW SYSTEM + // ======================================== + + // Redirect old free user routes to new system + Route::get('/free-user/assessments', function () { + $user = auth()->user(); + + if ($user->hasAnyToolSubscription() || $user->isAdmin()) { + return redirect()->route('dashboard'); + } + + return redirect()->route('tools.discover'); + })->name('free-user.index'); + + Route::get('/free-user/assessments/{assessment}/results', function ($assessmentId) { + $user = auth()->user(); + + if ($user->hasAnyToolSubscription() || $user->isAdmin()) { + return redirect()->route('dashboard'); + } + + return redirect()->route('free-assessment.results', $assessmentId); + })->name('free-user.results'); + + // Legacy assessment tools redirect + Route::get('/freeUserAssessmentPage', function () { + return redirect()->route('tools.discover'); + }); + + + + // ======================================== + // SUBSCRIPTION AND UPGRADE ROUTES + // ======================================== + + Route::get('/subscription', [UserRegistrationController::class, 'showSubscription']) + ->name('subscription.show'); + + Route::get('/upgrade', [UserRegistrationController::class, 'showSubscription']) + ->name('subscription'); + + Route::post('/subscription/request', [UserRegistrationController::class, 'requestSubscription']) + ->name('subscription.request'); + +}); + +// ======================================== +// ADMIN ROUTES - Only for super_admin role +// ======================================== + +Route::middleware(['auth', 'verified', 'checkAccess:admin'])->group(function () { + // Admin-specific routes + // Filament admin panel routes are handled by FilamentServiceProvider }); -require __DIR__.'/settings.php'; -require __DIR__.'/auth.php'; +// ======================================== +// ADDITIONAL ROUTES FROM YOUR EXISTING SETUP +// ======================================== + +// CMO Report routes (if needed) +Route::get('/cmo-report', [ReportController::class, 'generateReport'])->name('cmo.report'); +Route::get('/cmo-report/preview', [ReportController::class, 'previewReport'])->name('cmo.report.preview'); +Route::get('/report/landscape', [ReportController::class, 'landscapeChart']); + +// Include settings and auth routes +require __DIR__ . '/settings.php'; +require __DIR__ . '/auth.php'; + +use App\Services\GartnerPDFGenerator; + +Route::get('/pdf', function () { + try { + // Simple usage + $generator = new GartnerPDFGenerator(); + + // Option 1: Save to file and return download + $filename = $generator->saveToPDF('my_gartner_clone.pdf'); + return response()->download($filename); + + // Option 2: Stream directly to browser (uncomment to use instead) + // return response()->stream(function() use ($generator) { + // $generator->streamToBrowser(); + // }, 200, [ + // 'Content-Type' => 'application/pdf', + // 'Content-Disposition' => 'inline; filename="gartner_cmo_playbook.pdf"' + // ]); + + } catch (Exception $e) { + // Better error handling for production + return response()->json([ + 'error' => 'PDF generation failed', + 'message' => $e->getMessage() + ], 500); + } +}); + +// Alternative approach if you want more control: +Route::get('/pdf-custom', function () { + $generator = new GartnerPDFGenerator(); + + // Generate the PDF content + $pdfContent = $generator->generate(); + + // Return as direct response + return response($pdfContent, 200, [ + 'Content-Type' => 'application/pdf', + 'Content-Disposition' => 'inline; filename="gartner_clone.pdf"' + ]); +}); + +// For testing purposes - simple text response +//Route::get('/pdf-test', function () { +// try { +// $generator = new GartnerPDFGenerator(); +// return "PDF Generator class loaded successfully!"; +// } catch (Exception $e) { +// return "Error: " . $e->getMessage(); +// } +//}); + + +// File: routes/web.php + + +// PDF Generation Routes +Route::prefix('pdf')->group(function () { + // Download PDF directly + Route::get('/gartner/download', [PDFController::class, 'downloadGartnerPDF']) + ->name('pdf.gartner.download'); + + // Preview in browser + Route::get('/gartner/preview', [PDFController::class, 'previewGartnerPDF']) + ->name('pdf.gartner.preview'); + + // Save PDF to storage + Route::post('/gartner/save', [PDFController::class, 'saveGartnerPDF']) + ->name('pdf.gartner.save'); + + // Get generation statistics + Route::get('/stats', [PDFController::class, 'getPDFStats']) + ->name('pdf.stats'); +}); + +Route::get('/pdf/test', [PDFController::class, 'testSimplePDF']); +// API Routes (add to routes/api.php if you want API access) +Route::prefix('api/pdf')->group(function () { + Route::get('/gartner', [PDFController::class, 'getGartnerPDFAPI']); + Route::post('/gartner/bulk', [PDFController::class, 'bulkGenerateGartnerPDFs']); +}); diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 000000000..4a1b928d2 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,19 @@ +module.exports = { + content: [/* your paths */], + darkMode: 'class', + theme: { + extend: {}, + }, + plugins: [], + corePlugins: { + preflight: true, + }, + // 👇 Make sure this is added + variants: { + extend: { + margin: ['rtl', 'ltr'], + padding: ['rtl', 'ltr'], + textAlign: ['rtl', 'ltr'], + }, + }, +} diff --git a/vite.config.ts b/vite.config.ts index 290d90e80..0df2d4ed4 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -7,7 +7,7 @@ import { defineConfig } from 'vite'; export default defineConfig({ plugins: [ laravel({ - input: ['resources/css/app.css', 'resources/js/app.tsx'], + input: ['resources/css/app.css', 'resources/js/app.tsx',], ssr: 'resources/js/ssr.tsx', refresh: true, }),