SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.
JavaScript a2aagentic-aiai-agentsdevtoolsmcp-clientn8n-alternativeno-codeopen-sourceorchestrationsmythosvisual-builder
Runtime (#116)
forhad-hosainabebf481720a
diff --git a/.vscode/launch.json b/.vscode/launch.jsonindex 664d395e..eaf23d20 100644--- a/.vscode/launch.json+++ b/.vscode/launch.json@@ -32,11 +32,11 @@"name": "Launch Runtime Server","type": "node","request": "launch",- "program": "${workspaceFolder}/packages/runtime/dist/index.cjs",- "preLaunchTask": "runtime: build",+ "program": "${workspaceFolder}/packages/runtime/dist/index.dev.cjs",+ "preLaunchTask": "runtime: build:dev","skipFiles": ["<node_internals>/**"],"sourceMaps": true,- "outFiles": ["${workspaceFolder}/packages/runtime/dist/**/*.js"],+ "outFiles": ["${workspaceFolder}/packages/runtime/dist/**/*.cjs"],"cwd": "${workspaceFolder}/packages/runtime","env": {"NODE_ENV": "development"diff --git a/.vscode/tasks.json b/.vscode/tasks.jsonindex ed44b927..10748cea 100644--- a/.vscode/tasks.json+++ b/.vscode/tasks.json@@ -53,6 +53,17 @@"problemMatcher": [],"detail": "Build runtime server for production"},+ {+ "label": "runtime: build:dev",+ "type": "shell",+ "command": "NODE_ENV=development FORMAT=cjs npx rollup -c",+ "options": {+ "cwd": "${workspaceFolder}/packages/runtime"+ },+ "group": "build",+ "problemMatcher": [],+ "detail": "Build runtime server for development with source maps"+ },{"label": "runtime: clean","type": "npm",diff --git a/packages/app/src/backend/routes/api/page/chat.ts b/packages/app/src/backend/routes/api/page/chat.tsindex 7044f467..48b25f3c 100644--- a/packages/app/src/backend/routes/api/page/chat.ts+++ b/packages/app/src/backend/routes/api/page/chat.ts@@ -2,6 +2,7 @@ import { assetStorage } from '@src/backend/services/storage';import axios from 'axios';import { randomUUID } from 'crypto';import express from 'express';+import { createProxyMiddleware } from 'http-proxy-middleware';import config from '../../../config';import { includeTeamDetails } from '../../../middlewares/auth.mw';import { authHeaders, includeAxiosAuth, md5Hash, posixPath, smythAPIReq } from '../../../utils';@@ -59,25 +60,18 @@ const uploadFileMw = assetStorage.createUploadMw({});router.post('/stream', async (req, res) => {- let { message, fileKeys = [] } = req.body;+ let { message, attachments = [] } = req.body;const userId = req._user?.id;const teamId = req._team?.id;const token = req.user.accessToken;const agentId = req.headers['x-agent-id'];const conversationId = req.headers['x-conversation-id'];const isAgentChat = req.headers['x-ai-agent'] === 'true';- const filePublicUrls = fileKeys.map((key) => assetStorage.getPublicUrl(key));-- if (filePublicUrls.length > 0) {- message = [message, '###', 'Attachments:', ...filePublicUrls.map((url) => `- ${url}`)].join(- '\n',- );- }try {const result = await axios.post(- getAgentServerURL(agentId as string, isUsingLocalServer) + '/aichat/stream',- { message },+ getAgentServerURL(agentId as string, isUsingLocalServer) + '/v1/emb/chat/stream',+ { message, attachments: req.body.attachments || [] },{headers: {...includeAxiosAuth(token).headers,@@ -215,28 +209,57 @@ router.get('/messages', async (req, res) => {}});-router.post('/upload', [includeTeamDetails, uploadFileMw.single('file')], async (req, res) => {- if (!req.file) {- return res.status(400).json({ message: 'No file uploaded' });+// Upload endpoint: proxy multipart form-data directly to runtime `/aichat/upload`+router.post('/upload', [includeTeamDetails], (req: any, res, next) => {+ const token = req.user?.accessToken;+ const userId = req._user?.id;+ const teamId = req._team?.id;+ const headerAgentId = req.headers['x-agent-id'] as string | undefined;+ const queryAgentId =+ (req.query.agentId as string | undefined) || (req.query['agent-id'] as string | undefined);++ // Try to extract agentId from Referer URL if not provided directly+ let refererAgentId: string | undefined;+ const referer = req.get('referer') || req.get('referrer');+ if (!headerAgentId && !queryAgentId && referer) {+ try {+ const url = new URL(referer);+ refererAgentId =+ (url.searchParams.get('agentId') as string | undefined) ||+ (url.searchParams.get('aiAgentId') as string | undefined) ||+ (url.searchParams.get('agent-id') as string | undefined);+ } catch {}}+ const agentId = headerAgentId || queryAgentId || refererAgentId;- try {- // @ts-ignore- const key = req.file.key;- const publicUrl = assetStorage.getPublicUrl(key);-- return res.json({- success: true,- file: {- key: key,- url: publicUrl,- name: req.file.originalname,- type: req.file.mimetype,- },- });- } catch (error) {- return res.status(500).json({ message: 'Failed to upload file' });+ if (!agentId) {+ return res+ .status(400)+ .json({ error: 'Missing X-AGENT-ID header or ?agentId query param (or Referer agentId)' });}++ const target = getAgentServerURL(agentId as string, isUsingLocalServer);++ const proxyMw = createProxyMiddleware({+ target,+ changeOrigin: true,+ pathRewrite: () => '/v1/emb/chat/upload',+ onProxyReq: (proxyReq) => {+ if (token) proxyReq.setHeader('Authorization', 'Bearer ' + token);+ if (userId) proxyReq.setHeader('x-user-id', userId);+ if (teamId) {+ proxyReq.setHeader('x-team-id', teamId);+ proxyReq.setHeader('x-smyth-team-id', teamId);+ }+ // Ensure agent id is forwarded for agent resolution by runtime+ proxyReq.setHeader('X-AGENT-ID', agentId);+ proxyReq.setHeader('x-agent-id', agentId);+ // Ensure cookies aren’t forwarded+ proxyReq.removeHeader('Cookie');+ },+ });++ return proxyMw(req, res, next);});router.delete('/deleteFile', [includeTeamDetails], async (req, res) => {diff --git a/packages/app/src/react/features/ai-chat/hooks/use-chat-actions.ts b/packages/app/src/react/features/ai-chat/hooks/use-chat-actions.tsindex 1b8878fc..8410c6ad 100644--- a/packages/app/src/react/features/ai-chat/hooks/use-chat-actions.ts+++ b/packages/app/src/react/features/ai-chat/hooks/use-chat-actions.ts@@ -112,7 +112,14 @@ export const useChatActions = ({await chatUtils.generateResponse({agentId,query: message,- fileKeys: attachedFiles?.map((f) => f.metadata.key).filter(Boolean) as string[],+ attachments: (attachedFiles || [])+ .map((f) => ({+ url: f.metadata.publicUrl,+ name: f.file?.name,+ type: f.metadata.fileType,+ size: f.file?.size,+ }))+ .filter((a) => !!a.url),chatId,signal,onResponse: (value: string, errorInfo?: { isError?: boolean; errorType?: string }) => {@@ -272,9 +279,14 @@ export const useChatActions = ({await chatUtils.generateResponse({agentId,query: lastMessage.message,- fileKeys: lastMessage.attachedFiles- ?.map((f) => f.metadata.key)- .filter(Boolean) as string[],+ attachments: (lastUserMessageRef.current.attachedFiles || [])+ .map((f) => ({+ url: f.metadata.publicUrl,+ name: f.file?.name,+ type: f.metadata.fileType,+ size: f.file?.size,+ }))+ .filter((a) => !!a.url),chatId,signal,onResponse: (value: string, errorInfo?: { isError?: boolean; errorType?: string }) => {diff --git a/packages/app/src/react/features/ai-chat/hooks/use-fileupload.ts b/packages/app/src/react/features/ai-chat/hooks/use-fileupload.tsindex 68e33d90..d850cbba 100644--- a/packages/app/src/react/features/ai-chat/hooks/use-fileupload.ts+++ b/packages/app/src/react/features/ai-chat/hooks/use-fileupload.ts@@ -32,7 +32,9 @@ const generateUniqueFileId = (file: File): string => {return `${file.name}-${file.size}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;};-export const useFileUpload = (): UseFileUploadReturn => {+export const useFileUpload = (params?: { agentId?: string; chatId?: string }): UseFileUploadReturn => {+ const agentId = params?.agentId || '';+ const chatId = params?.chatId;const [files, setFiles] = useState<FileWithMetadata[]>([]);const [uploadingFiles, setUploadingFiles] = useState<Set<string>>(new Set());const [uploadError, setUploadError] = useState<FileUploadError>({ show: false, message: '' });@@ -110,9 +112,11 @@ export const useFileUpload = (): UseFileUploadReturn => {// Upload files concurrentlyconst uploadPromises = filesToUpload.map(async ({ file, id }) => {try {- const result = await uploadFile(file);+ const result = await uploadFile(file, agentId, chatId);if (result.success) {+ // Normalize response from runtime (/aichat/upload)+ const runtimeFile = result.data?.files?.[0];setFiles((prevFiles) =>prevFiles.map((f) =>f.id === id@@ -120,9 +124,9 @@ export const useFileUpload = (): UseFileUploadReturn => {...f,metadata: {...f.metadata,- key: result.data.file.key,- publicUrl: result.data.file.url,- fileType: result.data.file.type,+ // Do not set key for runtime uploads (avoid delete attempts)+ publicUrl: runtimeFile?.url || result.data?.file?.url,+ fileType: runtimeFile?.mimetype || result.data?.file?.type,isUploading: false,},}@@ -147,7 +151,7 @@ export const useFileUpload = (): UseFileUploadReturn => {await Promise.all(uploadPromises);}},- [files.length],+ [files.length, agentId, chatId],);const handleFileChange = useCallback(diff --git a/packages/app/src/react/features/ai-chat/pages/ai-chat.tsx b/packages/app/src/react/features/ai-chat/pages/ai-chat.tsxindex 3445aeb6..2e6d7ce9 100644--- a/packages/app/src/react/features/ai-chat/pages/ai-chat.tsx+++ b/packages/app/src/react/features/ai-chat/pages/ai-chat.tsx@@ -58,7 +58,10 @@ const AIChat = () => {clearError,isUploadInProgress,clearFiles,- } = useFileUpload();+ } = useFileUpload({+ agentId: agentId || '',+ chatId: agentSettingsData?.settings?.lastConversationId,+ });const {messagesHistory,diff --git a/packages/app/src/react/features/ai-chat/utils/file.ts b/packages/app/src/react/features/ai-chat/utils/file.tsindex dfdd837c..8004d6a2 100644--- a/packages/app/src/react/features/ai-chat/utils/file.ts+++ b/packages/app/src/react/features/ai-chat/utils/file.ts@@ -114,6 +114,8 @@ export const validateSingleFile = (file: File): string | null => {*/export const uploadFile = async (file: File,+ agentId: string,+ chatId?: string,): Promise<{ success: boolean; data?: any; error?: string }> => {try {const formData = new FormData();@@ -122,6 +124,10 @@ export const uploadFile = async (const response = await fetch('/api/page/chat/upload', {method: 'POST',body: formData,+ headers: {+ 'X-AGENT-ID': agentId,+ ...(chatId ? { 'x-conversation-id': chatId } : {}),+ },});if (!response.ok) {diff --git a/packages/app/src/react/features/ai-chat/utils/index.ts b/packages/app/src/react/features/ai-chat/utils/index.tsindex 9e97dc7e..59617163 100644--- a/packages/app/src/react/features/ai-chat/utils/index.ts+++ b/packages/app/src/react/features/ai-chat/utils/index.ts@@ -6,7 +6,7 @@ type GenerateResponseInput = {agentId: string;chatId: string;query: string;- fileKeys?: string[];+ attachments?: { url: string; name?: string; type?: string; size?: number }[];signal: AbortSignal;onResponse: (value: string, errorInfo?: { isError?: boolean; errorType?: string }) => void;onStart: () => void;@@ -262,7 +262,10 @@ export const chatUtils = {'x-conversation-id': input.chatId,'x-ai-agent': 'true',},- body: JSON.stringify({ message: input.query, fileKeys: input.fileKeys }),+ body: JSON.stringify({+ message: input.query,+ attachments: input.attachments,+ }),signal: input.signal,});diff --git a/packages/runtime/README.md b/packages/runtime/README.mdindex 38722dab..544b4a08 100644--- a/packages/runtime/README.md+++ b/packages/runtime/README.md@@ -1,132 +1,121 @@-# SRE Runtime Server+# SmythOS Runtime Server-A Runtime Server that combines the functionality of three separate SmythOS Runtime servers:--- **sre-agent-server** (Agent Runner)-- **sre-builder-debugger** (Debugger)-- **sre-embodiment-server** (Embodiment)+A unified runtime server that provides comprehensive execution, debugging, and integration capabilities for SmythOS agents.## 📚 Table of Contents-- [🚀 Quick Start - Smart Routing](#-quick-start---smart-routing)-- [🚀 Smart Routing System](#-smart-routing-system) ⭐ **New!**-- [Server Modes](#server-modes)-- [Installation & Usage](#installation--usage)-- [Configuration](#configuration)-- [Health Check](#health-check)+- [🚀 Quick Start](#-quick-start)+- [💡 What is SmythOS Runtime?](#-what-is-smythos-runtime)+- [🏗️ Architecture](#️-architecture)+- [⚙️ Installation & Usage](#️-installation--usage)+- [🔧 Configuration](#-configuration)+- [🌐 API Modules](#-api-modules)+- [🚀 Smart Routing](#-smart-routing)+- [🌐 Deployment](#-deployment)+- [🔍 Troubleshooting](#-troubleshooting)-## 🚀 Quick Start - Smart Routing+## 🚀 Quick Start```bash-# Default (Agent Runner)-curl http://localhost:5000/api/test--# Force Agent Runner-curl -H "X-FORCE-AGENT-RUNNER: true" http://localhost:5000/api/test+# Install dependencies+pnpm install-# Force Debugger-curl -H "X-FORCE-DEBUGGER: true" http://localhost:5000/api/test+# Start development server+pnpm run dev-# Debug Session-curl -H "X-DEBUG-RUN: true" http://localhost:5000/api/test+# Health check+curl http://localhost:5053/health```-> 📖 **[See full Smart Routing documentation below](#-smart-routing-system)**+## 💡 What is SmythOS Runtime?-## Server Modes+The SmythOS Runtime Server is the execution engine for SmythOS agents. It provides:-The server can run in different modes based on the `SERVER_MODE` environment variable:+- **Agent Execution**: Run and manage SmythOS agents with OAuth authentication+- **Debug Capabilities**: Debug agent workflows with real-time monitoring+- **Integration Hub**: Connect agents to external services (ChatGPT, OpenAI, Alexa, etc.)+- **API Gateway**: Unified API for all SmythOS runtime operations-- `runtime` (default): All functionality enabled-- `agent`: Only agent runner functionality-- `debugger`: Only debugger functionality-- `embodiment`: Only embodiment functionality+## 🏗️ Architecture-## Directory Structure+The runtime server is organized into three core modules:```src/-├── core/ # Shared functionality across all servers-│ ├── services/ # Common services (Redis, logging, etc.)-│ ├── middlewares/ # Common middlewares (CORS, rate limiting, etc.)-│ ├── types/ # Shared TypeScript types-│ └── utils/ # Utility functions-├── agent-runner/ # Agent server specific code-│ ├── routes/ # Agent routes (/oauth, /agent, etc.)-│ └── middlewares/ # Agent-specific middlewares-├── debugger/ # Debugger specific code-│ ├── routes/ # Debugger routes (/models, etc.)-│ └── services/ # Debugger services (component-async-ctx)-└── embodiment/ # Embodiment specific code- ├── modules/ # Embodiment modules (ChatGPT, OpenAI, etc.)- ├── helpers/ # Helper functions- └── routes/ # Embodiment routes+├── core/ # Shared infrastructure+│ ├── config/ # Configuration management+│ ├── middlewares/ # Common middleware (CORS, auth, etc.)+│ ├── services/ # Shared services+│ ├── types/ # TypeScript definitions+│ └── utils/ # Utility functions+├── modules/ # Runtime modules+│ ├── agent-runner/ # Agent execution & OAuth+│ ├── debugger/ # Debug capabilities & monitoring+│ └── embodiment/ # External integrations+└── services/ # Additional services+ └── code-sandbox.service.ts```-## Configuration+### Core Components-1. Copy `.env.example` to `.env` and configure your environment variables-2. Set `PORT=5000` to run on port 5000-3. Set `SERVER_MODE=runtime` to enable all functionality+- **Agent Runner**: Executes SmythOS agents with authentication and rate limiting+- **Debugger**: Provides debugging capabilities with component-level tracking+- **Embodiment**: Handles integrations with external platforms and services-## Installation & Usage+## ⚙️ Installation & Usage++### Development```bash# Install dependencies-npm install+pnpm install-# Link smyth-runtime (if needed)-npm link smyth-runtime+# Start development server with auto-reload+pnpm run dev-# Development mode with auto-reload-npm run dev+# The server will start on http://localhost:5053+```-# Build for development-npm run build:dev+### Production-# Build for production-npm run build+```bash+# Build the application+pnpm run build-# Start the server-npm run start+# Start production server+pnpm run start:prod```-## Available Scripts+### Available Scripts-### Core Scripts (Minimal)-- `npm run dev` - Development mode with auto-reload using nodemon-- `npm run build` - Build for production-- `npm run start:prod` - Start server in production mode+| Script | Description |+| --------------------- | --------------------------------- |+| `pnpm run dev` | Development mode with auto-reload |+| `pnpm run build` | Build for production |+| `pnpm run start:prod` | Start production server |+| `pnpm run test` | Run tests |+| `pnpm run lint` | Lint TypeScript files |+| `pnpm run clean` | Clean build directory |-### Additional Scripts-- `npm run test` - Run tests-- `npm run clean` - Clean the dist directory-- `npm run lint` - Lint TypeScript files-- `npm run lint-fix` - Lint and auto-fix TypeScript files-- `npm run ts-error-scan` - Check for TypeScript errors without emitting files-- `npm run format` - Format TypeScript files with Prettier-- `npm run prettier:format` - Format all supported files with Prettier-- `npm run bump` - Bump patch version+## 🔧 Configuration-## 🔧 Environment Setup+### Required Environment Variables-### Required (for both development and production):```bash-# Authentication (get these from your LogTo setup)+# Authentication (LogTo configuration)LOGTO_M2M_APP_SECRET="your-m2m-app-secret"-LOGTO_M2M_APP_ID="your-m2m-app-id"+LOGTO_M2M_APP_ID="your-m2m-app-id"LOGTO_SERVER="https://auth.yourdomain.com"LOGTO_API_RESOURCE="https://api.yourdomain.com"MIDDLEWARE_API_BASE_URL="http://middleware.yourdomain.com"```-### Optional (development):-```bash-# Ports-PORT="5053" # Runtime server port-ADMIN_PORT="5054" # Admin interface port+### Optional Configuration-# URLs+```bash+# Server Configuration+PORT="5053" # Runtime server port+ADMIN_PORT="5054" # Admin interface portBASE_URL="http://localhost:5053"UI_SERVER="http://localhost:4000"@@ -135,433 +124,195 @@ SESSION_SECRET="your-random-secret-here"# StorageDATA_PATH="/path/to/your/data"-```--### Domain Configuration:-> **⚠️ WARNING**: To run the agent locally, the domain name must contain `localagent`--When running agents in a local development environment, ensure your domain configuration includes the keyword `localagent`. This is required for proper local agent execution and routing.--```bash-# Development/staging wildcard domain+# Agent Domain ConfigurationDEFAULT_AGENT_DOMAIN="localagent.stage.yourdomain.ai"--# Production wildcard domainPROD_AGENT_DOMAIN="agentid.yourdomain.com"```-**Example:**-```bash-# ✅ Correct - domain contains 'localagent'-DEFAULT_AGENT_DOMAIN="localagent.stage.yourdomain.ai"+> **⚠️ Local Development**: For local agent execution, ensure your domain contains `localagent`-# ❌ Incorrect - missing 'localagent' keyword-DEFAULT_AGENT_DOMAIN="localhost:3000"-```+## 🌐 API Modules-## 🌐 Deployment+### Agent Runner (`/api/*`)-### Environment Requirements+- **OAuth Authentication**: `/oauth/*` - Handle OAuth flows+- **Agent Execution**: `/agent/*` - Execute and manage agents+- **File Operations**: File upload and processing capabilities-**Development:**-- Node.js 18+-- pnpm 8+-- LogTo authentication server+### Debugger (`/models/*`)-**Production:**-- All development requirements-- Redis (for session management)-- SSL certificates (for production domains)-- Load balancer (recommended)+- **Model Management**: Team-based access control for AI models+- **Debug Sessions**: Real-time agent debugging and monitoring+- **Component Tracking**: Async component execution tracking-### Quick Deploy+### Embodiment (Various endpoints)-1. **Build everything:**- ```bash- npm run build- ```+- **ChatGPT Plugin**: `/chatgpt/*` - ChatGPT plugin integration+- **OpenAI Proxy**: `/openai/*` - OpenAI API proxy+- **Alexa Skills**: `/alexa/*` - Amazon Alexa integration+- **MCP Protocol**: `/mcp/*` - Model Context Protocol support+- **API Documentation**: `/swagger/*` - Interactive API docs+- **Postman Collections**: `/postman/*` - Generate API collections-2. **Set production environment:**- ```bash- NODE_ENV=production- PORT=5053- # Add your production environment variables- ```+## 🚀 Smart Routing-3. **Start production server:**- ```bash- npm run start:prod- ```--### Production Checklist--- [ ] Environment variables configured-- [ ] Authentication server running-- [ ] Database connected-- [ ] Redis connected (for sessions)-- [ ] SSL certificates installed-- [ ] Domain routing configured-- [ ] Health checks passing (`http://your-domain/health`)--## 🔍 Troubleshooting+The runtime server uses intelligent routing to direct requests to the appropriate module based on HTTP headers:-### Common Issues:+### Quick Examples-**"Agent not routing correctly"**```bash-# Check routing with explicit headers-curl -H "X-FORCE-DEBUGGER: true" http://localhost:5053/api/test-```+# Default behavior (Agent Runner)+curl http://localhost:5053/api/test-**"Authentication failing"**-- Verify LogTo environment variables-- Check LogTo server is accessible-- Confirm M2M app is configured correctly--**"Development server not starting"**-```bash-# Clean and reinstall-rm -rf node_modules-npm install-```+# Force specific modules+curl -H "X-FORCE-AGENT-RUNNER: true" http://localhost:5053/api/test+curl -H "X-FORCE-DEBUGGER: true" http://localhost:5053/api/test-**"Build failing"**-```bash-# Increase memory for builds-export NODE_OPTIONS='--max-old-space-size=4096'-npm run build+# Debug session+curl -H "X-DEBUG-RUN: true" http://localhost:5053/api/test```-## Health Check--Once running, check server health at:--- `http://localhost:5000/health`--The health endpoint shows:--- Server mode-- Available functionality-- Version information--## Conditional Routing--The server automatically detects the mode and enables appropriate routes:--### Agent Mode Routes--- `/oauth/*` - OAuth authentication-- `/agent/*` - Agent execution-- `/debugger-proxy/*` - Debugger proxy--### Debugger Mode Routes--- `/models/*` - Model management with team access control-- All agent routes (debugger extends agent functionality)--### Embodiment Mode Routes--- `/static/*` - Static file serving-- `/swagger/*` - Swagger UI-- Various embodiment modules:- - `/chatgpt/*`- - `/openai/*`- - `/alexa/*`- - `/mcp/*`- - And more...--## Mode Detection--The server uses several methods to detect the appropriate functionality:--1. **Environment Variable**: `SERVER_MODE` setting-2. **Header Detection**: `x-smyth-debug: true` for debugger mode-3. **Path Detection**: Certain paths automatically enable specific modes-4. **User Agent**: SmythOS-Agent user agent for agent mode--## Migration from Individual Servers--This Runtime Server replaces the need for running three separate servers:--- Port 5000 now handles all functionality-- Environment variables from all three servers are supported-- All routes and features are preserved--## Features by Mode--### Agent Runner Features--- OAuth authentication-- Agent execution and management-- File uploads and processing-- Rate limiting and usage tracking--### Debugger Features--- Model management with team access-- Component async context tracking-- Debug mode detection via headers-- Extended agent functionality--### Embodiment Features--- Session management with Redis-- Static file serving-- Multiple integration modules:- - ChatGPT Plugin support- - OpenAI API proxy- - Alexa Skills integration- - MCP (Model Context Protocol)- - Postman collection generation- - Swagger documentation- - Form preview functionality- - Agent chat interface--## 🚀 Smart Routing System--The Runtime Server features an intelligent routing system that automatically directs requests to the appropriate service (Agent Runner or Debugger) based on HTTP headers. This provides **predictable, header-based routing** that works consistently across all environments.+### Routing Headers-### 🎯 Quick Start+| Header | Purpose | Routes To |+| ---------------------- | ----------------------- | ------------ |+| `X-FORCE-AGENT-RUNNER` | Force agent execution | Agent Runner |+| `X-FORCE-DEBUGGER` | Force debug mode | Debugger |+| `X-DEBUG-RUN` | Start debug session | Debugger |+| `X-MONITOR-ID` | Monitor agent execution | Debugger |-**Default Behavior (No Headers)**+### Server Modes-```bash-curl http://localhost:5000/api/test-# → Routes to Agent Runner (production-safe default)-```--**Force Agent Runner**+Control server functionality with the `SERVER_MODE` environment variable:-```bash-curl -H "X-FORCE-AGENT-RUNNER: true" http://localhost:5000/api/test-# → Always routes to Agent Runner-```+- `runtime` (default): Full functionality+- `agent`: Agent runner only+- `debugger`: Debugger only+- `embodiment`: Integrations only-**Force Debugger**+## 🌐 Deployment-```bash-curl -H "X-FORCE-DEBUGGER: true" http://localhost:5000/api/test-# → Always routes to Debugger-```+### Environment Requirements-**Debug Session**+**Development:**-```bash-curl -H "X-DEBUG-RUN: true" http://localhost:5000/api/test-# → Routes to Debugger for debugging-```+- Node.js 18++- pnpm 8++- LogTo authentication server-### 📋 Routing Priority (Highest to Lowest)+**Production:**-| Priority | Header | Routes To | Use Case |-| -------- | --------------------------- | ------------ | ------------------------- |-| 1 | `X-FORCE-AGENT-RUNNER` | Agent Runner | Force production behavior |-| 2 | `X-DEBUG-*`, `X-MONITOR-ID` | Debugger | Debug sessions |-| 3 | `X-FORCE-DEBUGGER` | Debugger | Force debug behavior |-| 4 | Deployed versions | Agent Runner | Production safety |-| 5 | `X-ROUTING-MODE` | As specified | Explicit routing |-| 6 | No headers | Agent Runner | Safe default |+- All development requirements+- Redis (for session management)+- SSL certificates+- Load balancer (recommended)-### 🔧 Available Headers+### Production Deployment-#### Force Routing Headers+1. **Build the application:**-```bash-# Force Agent Runner (highest priority)-X-FORCE-AGENT-RUNNER: true+ ```bash+ pnpm run build+ ```-# Force Debugger-X-FORCE-DEBUGGER: true-```+2. **Set environment:**-#### Debug Session Headers+ ```bash+ NODE_ENV=production+ PORT=5053+ # Add production environment variables+ ```-```bash-# Any of these will route to Debugger-X-DEBUG-RUN: true-X-DEBUG-STOP: true-X-DEBUG-READ: true-X-DEBUG-INJ: true-X-DEBUG-SKIP: true-X-MONITOR-ID: your-monitor-id-```+3. **Start server:**+ ```bash+ pnpm run start:prod+ ```-#### Explicit Mode Headers+### Health Monitoring-```bash-# Explicit routing mode-X-ROUTING-MODE: debugger # Routes to Debugger-X-ROUTING-MODE: agent-runner # Routes to Agent Runner-```+Check server health at: `http://localhost:5053/health`-### 🧪 Testing Different Environments+The health endpoint provides:-#### Test Agent Runner from Localhost+- Server status and mode+- Available modules+- Version information-```bash-# Without header (old behavior might route to debugger)-curl http://localhost:5000/api/test+## 🔍 Troubleshooting-# With header (guaranteed agent runner)-curl -H "X-FORCE-AGENT-RUNNER: true" http://localhost:5000/api/test-```+### Common Issues-#### Test Debugger from Production+**Authentication Failing**-```bash-# Force debugger even on production domains-curl -H "X-FORCE-DEBUGGER: true" https://your-agent.com/api/test-```+- Verify LogTo environment variables+- Ensure LogTo server is accessible+- Check M2M app configuration-#### Debug Sessions+**Routing Issues**```bash-# Start a debug session-curl -H "X-DEBUG-RUN: true" http://localhost:5000/api/test--# Monitor agent execution-curl -H "X-MONITOR-ID: session-123" http://localhost:5000/api/test+# Test with explicit headers+curl -H "X-FORCE-AGENT-RUNNER: true" http://localhost:5053/api/test```-### 🛠️ For Developers--#### Example Scripts--We provide ready-to-use test scripts:+**Build Problems**```bash-# Test routing logic programmatically-node examples/test-smart-routing.js--# Test routing with actual HTTP requests (server must be running)-./examples/test-routing-http.sh-```--#### Testing Routing Logic--```typescript-import { testRoutingDecision, RoutingHeaders } from "./core/smart-agent-router";--const agent = { agentVersion: "development" };--// Test different scenarios-const scenarios = [- { headers: RoutingHeaders.FORCE_AGENT_RUNNER, expected: "agent-runner" },- { headers: RoutingHeaders.DEBUG_RUN, expected: "debugger" },- { headers: RoutingHeaders.NONE, expected: "agent-runner" },-];--scenarios.forEach(({ headers, expected }) => {- const result = testRoutingDecision(agent, headers);- console.log(`Headers: ${JSON.stringify(headers)}`);- console.log(`Routes to: ${result.useDebugger ? "debugger" : "agent-runner"}`);- console.log(`Reason: ${result.reason}\n`);-});-```--#### Available Test Headers--```typescript-import { RoutingHeaders } from "./core/smart-agent-router";--// Pre-defined header combinations-RoutingHeaders.FORCE_AGENT_RUNNER; // { "X-FORCE-AGENT-RUNNER": "true" }-RoutingHeaders.FORCE_DEBUGGER; // { "X-FORCE-DEBUGGER": "true" }-RoutingHeaders.DEBUG_RUN; // { "X-DEBUG-RUN": "true" }-RoutingHeaders.DEBUG_STOP; // { "X-DEBUG-STOP": "true" }-RoutingHeaders.MODE_DEBUGGER; // { "X-ROUTING-MODE": "debugger" }-RoutingHeaders.MODE_AGENT_RUNNER; // { "X-ROUTING-MODE": "agent-runner" }-RoutingHeaders.NONE; // {} (no headers)+# Increase memory for builds+export NODE_OPTIONS='--max-old-space-size=4096'+pnpm run build```-### 🔍 Troubleshooting--#### Request Not Routing as Expected?--1. **Check your headers**: Use browser dev tools or `curl -v` to verify headers-2. **Check the logs**: The server logs routing decisions with reasons-3. **Test with explicit headers**: Use `X-FORCE-*` headers to override behavior--#### Common Issues--**Issue**: "Agent always routes to debugger from localhost"+**Development Server Issues**```bash-# Solution: Use explicit header-curl -H "X-FORCE-AGENT-RUNNER: true" http://localhost:5000/api/test+# Clean reinstall+rm -rf node_modules+pnpm install```-**Issue**: "Can't debug from production domain"--```bash-# Solution: Use debug header-curl -H "X-FORCE-DEBUGGER: true" https://production.com/api/test-```+### Debug Mode-**Issue**: "Routing is inconsistent"+Enable debug logging by setting routing headers:```bash-# Solution: Use explicit routing mode-curl -H "X-ROUTING-MODE: agent-runner" http://your-domain.com/api/test-```--### 📊 Monitoring--The server logs all routing decisions:+# Enable debug mode+curl -H "X-DEBUG-RUN: true" http://localhost:5053/api/test+# Monitor specific session+curl -H "X-MONITOR-ID: session-123" http://localhost:5053/api/test```-Routing decision: AGENT-RUNNER - X-FORCE-AGENT-RUNNER header present-Routing decision: DEBUGGER - Debug headers present-Routing decision: AGENT-RUNNER - Default production-safe routing-```--### 🎯 Best Practices-1. **Production**: No headers = safe default (Agent Runner)-2. **Development**: Use explicit headers for predictable behavior-3. **Testing**: Use `X-FORCE-*` headers to test specific services-4. **Debugging**: Use `X-DEBUG-*` headers for debug sessions-5. **CI/CD**: Use `X-ROUTING-MODE` for explicit test scenarios+## 📊 Monitoring & Logging-### 🔄 Migration from Domain-Based Routing--If you were relying on domain-based routing:--**Old Way** (unreliable):--```bash-# Localhost = debugger, production = agent-runner (unpredictable)-curl http://localhost:5000/api/test-```--**New Way** (explicit):--```bash-# Explicit header-based routing (predictable)-curl -H "X-FORCE-AGENT-RUNNER: true" http://localhost:5000/api/test-curl -H "X-FORCE-DEBUGGER: true" http://production.com/api/test-```+The server provides comprehensive logging for:----+- Request routing decisions+- Authentication events+- Agent execution status+- Error tracking and debugging-## 📁 Examples Directory+Logs are formatted for easy consumption and include routing reasons for troubleshooting.-The `examples/` directory contains helpful scripts for testing and understanding the Smart Routing system:+## 🔐 Security Features-- **`test-smart-routing.js`** - Programmatic testing of routing logic-- **`test-routing-http.sh`** - HTTP request testing with curl-- Run these scripts to validate your routing configuration+- **Rate Limiting**: Built-in rate limiting for API endpoints+- **CORS Protection**: Configurable CORS policies+- **Authentication**: OAuth 2.0 with LogTo integration+- **Input Validation**: Request validation with Joi schemas+- **Error Handling**: Secure error responses without sensitive data exposure## 🤝 Contributing-When contributing to the Smart Routing system:+When contributing to the runtime server:-1. **Test all scenarios** using the provided example scripts-2. **Update documentation** if adding new headers or routing logic-3. **Maintain backward compatibility** with existing debug headers-4. **Follow the priority system** when adding new routing rules+1. **Follow TypeScript best practices**+2. **Add tests for new functionality**+3. **Update documentation for API changes**+4. **Maintain backward compatibility**+5. **Test routing scenarios thoroughly**## 📄 License-This project is part of the SmythOS Runtime system.+This project is part of the SmythOS ecosystem.diff --git a/packages/runtime/knip.json b/packages/runtime/knip.jsonnew file mode 100644index 00000000..50d786fd--- /dev/null+++ b/packages/runtime/knip.json@@ -0,0 +1,15 @@+{+ "project": ["src/**/*.{js,ts,json}"],+ "ignore": [+ "src/**/node_modules/**",+ "**/dist/**",+ "**/build/**",+ "static/**",+ "_data/**",+ "docs/**",+ ".contentlayer/**"+ ],+ "ignoreDependencies": [+ "pkce-challenge"+ ]+}\ No newline at end of filediff --git a/packages/runtime/nodemon.json b/packages/runtime/nodemon.jsonindex b79d92d9..09f7857f 100644--- a/packages/runtime/nodemon.json+++ b/packages/runtime/nodemon.json@@ -1,15 +1,6 @@{"watch": ["src", "package.json"],- "ext": "ts,js,json",- "ignore": [- "src/**/*.test.ts",- "src/**/*.spec.ts",- "tests/**/*",- "dist/**/*",- "node_modules/**/*"- ],- "exec": "npm run build && npm run start:prod",- "env": {- "NODE_ENV": "development"- }+ "ext": "ts",+ "ignore": ["src/**/*.spec.ts"],+ "exec": "npm run dev"}diff --git a/packages/runtime/package.json b/packages/runtime/package.jsonindex 1efb543c..1c6c8aa3 100644--- a/packages/runtime/package.json+++ b/packages/runtime/package.json@@ -5,17 +5,16 @@"main": "dist/index.cjs","type": "module","scripts": {- "dev": "nodemon",- "build": "cross-env NODE_ENV=production NODE_OPTIONS='--max-old-space-size=4096' rollup -c",+ "dev": "cross-env NODE_ENV=development FORMAT=cjs rollup -c && node --enable-source-maps ./dist/index.dev.cjs",+ "build": "cross-env NODE_ENV=production FORMAT=cjs NODE_OPTIONS='--max-old-space-size=4096' rollup -c","start:prod": "cross-env NODE_ENV=production node ./dist/index.cjs","test": "cross-env TEST_ENV=true vitest --reporter verbose","clean": "rm -rf dist","lint": "eslint --ext .ts src/","lint-fix": "eslint --ext .ts src/ --fix",- "ts-error-scan": "tsc --noEmit",- "format": "prettier --write \"**/*.ts\"",- "prettier:format": "prettier --write **/*.{js,jsx,ts,tsx,json,css,md}","lint-staged": "lint-staged",+ "ts-error-scan": "tsc --noEmit",+ "prettier:format": "prettier --write \"**/*.ts\"","bump": "pnpm version patch"},"author": "Alaa-eddine KADDOURI",@@ -23,64 +22,52 @@"@rollup/plugin-commonjs": "^28.0.1","@rollup/plugin-json": "^6.1.0","@rollup/plugin-node-resolve": "^15.3.0",+ "@rollup/pluginutils": "^5.1.0","@types/compression": "^1.8.1",- "@types/express-http-proxy": "^1.6.6","@types/node": "^22.9.0","@types/swagger-ui-express": "^4.1.7","@types/uuid": "^9.0.8","@typescript-eslint/eslint-plugin": "^5.59.0",+ "@typescript-eslint/parser": "^5.59.0","cross-env": "^7.0.3","eslint": "^8.38.0","eslint-config-airbnb-base": "^15.0.0","eslint-config-prettier": "^8.8.0",- "eslint-config-standard-with-typescript": "^34.0.1","eslint-plugin-import": "^2.27.5","eslint-plugin-prettier": "^4.2.1",- "eslint-plugin-promise": "^6.1.1","knip": "^5.61.3","lint-staged": "^13.2.1","nodemon": "^3.0.2","prettier": "^2.8.7",- "pkg": "^5.8.1","rollup": "^2.79.2","rollup-plugin-copy": "^3.5.0","rollup-plugin-esbuild": "^6.1.1","rollup-plugin-sourcemaps": "^0.6.3","rollup-plugin-terser": "^7.0.2","rollup-plugin-typescript-paths": "^1.5.0",- "rollup-plugin-typescript2": "^0.36.0",- "ts-node": "^10.9.0",+ "supertest": "^6.3.3","typescript": "^5.0.0","vite-tsconfig-paths": "^5.1.2","vitest": "^2.1.4"},"dependencies": {- "@aws-sdk/client-s3": "^3.717.0","@modelcontextprotocol/sdk": "^1.10.1",- "@smythos/sre": "^1.5.50",+ "@smythos/sre": "^1.5.64","axios": "^1.7.7","compression": "^1.8.0","cookie-parser": "^1.4.7","cors": "^2.8.5","dotenv": "^16.4.5","express": "^4.21.1",- "express-http-proxy": "^2.1.1","express-session": "^1.18.1",- "gpt-tokenizer": "^2.8.1",- "http-proxy-middleware": "^3.0.3","joi": "^17.13.3",- "jsonwebtoken": "^9.0.2",- "jwks-rsa": "^3.1.0","multer": "^1.4.5-lts.1","openai": "^4.72.0","openapi-to-postmanv2": "^4.24.0","pkce-challenge": "^5.0.0",- "qs": "^6.14.0",- "rate-limiter-flexible": "^5.0.4",- "swagger-ui-dist": "^5.18.2",+ "source-map-support": "^0.5.21","swagger-ui-express": "^5.0.0",- "uuid": "^9.0.1",- "winston": "^3.17.0"+ "uuid": "^9.0.1"},"keywords": [],"license": "ISC"diff --git a/packages/runtime/rollup.config.js b/packages/runtime/rollup.config.jsindex 535bbbd8..f1cab766 100644--- a/packages/runtime/rollup.config.js+++ b/packages/runtime/rollup.config.js@@ -1,17 +1,17 @@-import commonjs from "@rollup/plugin-commonjs";-import json from "@rollup/plugin-json";-import resolve from "@rollup/plugin-node-resolve";-import { createFilter } from "@rollup/pluginutils";-import path from "path";-import copy from "rollup-plugin-copy";-import esbuild from "rollup-plugin-esbuild";-import sourcemaps from "rollup-plugin-sourcemaps";-import { terser } from "rollup-plugin-terser";-import typescriptPaths from "rollup-plugin-typescript-paths";-import pkg from "./package.json";+import json from '@rollup/plugin-json';+import { createFilter } from '@rollup/pluginutils';+import path from 'path';+import esbuild from 'rollup-plugin-esbuild';+import sourcemaps from 'rollup-plugin-sourcemaps';+import { terser } from 'rollup-plugin-terser';+import typescriptPaths from 'rollup-plugin-typescript-paths';+import commonjs from '@rollup/plugin-commonjs';+import resolve from '@rollup/plugin-node-resolve';+import pkg from './package.json';+import copy from 'rollup-plugin-copy';-const isProduction = process.env.NODE_ENV === "production";-const isDevelopment = process.env.NODE_ENV === "development";+const isProduction = process.env.NODE_ENV === 'production';+const format = process.env.FORMAT || 'es';const banner = `/*** ${pkg.name} v${pkg.version}@@ -19,101 +19,134 @@ const banner = `/***/`;-// Base plugins for all configurations-const basePlugins = [- resolve({- browser: false,- preferBuiltins: true,- mainFields: ["module", "main"],- extensions: [".js", ".ts", ".json"],- }),- commonjs(),- json(),- filenameReplacePlugin(),- typescriptPaths({- tsconfig: "./tsconfig.json",- preserveExtensions: true,- nonRelative: false,- }),- sourcemaps(),-];--// Development configuration-const devConfig = {- input: "./src/index.ts",+const devCJSConfig = {+ input: './src/index.ts',output: {- file: "./dist/index.cjs",- format: "cjs",+ file: './dist/index.dev.cjs',+ format: 'cjs',sourcemap: true,inlineDynamicImports: true,banner,},plugins: [- ...basePlugins,+ resolve({+ browser: false,+ preferBuiltins: true,+ mainFields: ['module', 'main'],+ extensions: ['.js', '.ts', '.json'],+ }),+ commonjs(),+ json(),+ filenameReplacePlugin(),+ typescriptPaths({+ tsconfig: './tsconfig.json',+ preserveExtensions: true,+ nonRelative: false,+ }),+ esbuild({+ sourceMap: true,+ minify: false,+ treeShaking: false,+ target: 'node18',+ }),+ sourcemaps(),+ copy({+ targets: [+ { src: 'src/data/*', dest: 'dist/data' },+ { src: 'src/static/*', dest: 'dist/static' },+ { src: 'node_modules/swagger-ui-dist/*.{js,css,html,.js.map}', dest: 'dist' },+ ],+ }),+ ],+};++const devESConfig = {+ input: './src/index.ts',+ output: {+ format: 'es',+ sourcemap: true,+ file: './dist/index.dev.js',+ banner,+ },+ plugins: [+ json(),+ filenameReplacePlugin(),+ typescriptPaths({+ tsconfig: './tsconfig.json',+ preserveExtensions: true,+ nonRelative: false,+ }),esbuild({sourceMap: true,minify: false,treeShaking: false,- target: "node18",+ target: 'node18',}),+ sourcemaps(),copy({targets: [- { src: "src/data/*", dest: "dist/data" },- { src: "src/static/*", dest: "dist/static" },- {- src: "node_modules/swagger-ui-dist/*.{js,css,html,js.map}",- dest: "dist",- },+ { src: 'src/data/*', dest: 'dist/data' },+ { src: 'src/static/*', dest: 'dist/static' },],}),],};-// Production configurationconst prodConfig = {- input: "./src/index.ts",+ input: './src/index.ts',output: {- file: "./dist/index.cjs",- format: "cjs",+ file: './dist/index.cjs',+ format: 'cjs',sourcemap: true,inlineDynamicImports: true,banner,},plugins: [- ...basePlugins,+ resolve({+ browser: false,+ preferBuiltins: true,+ mainFields: ['module', 'main'],+ extensions: ['.js', '.ts', '.json'],+ }),+ commonjs(),+ json(),+ typescriptPaths({+ tsconfig: './tsconfig.json',+ preserveExtensions: true,+ nonRelative: false,+ }),+ filenameReplacePlugin(),esbuild({sourceMap: true,minify: true,treeShaking: true,- target: "node18",- }),- terser({- compress: {- drop_console: false, // Keep console logs for server apps- },+ target: 'node18',}),+ sourcemaps(),+ terser(),copy({targets: [- { src: "src/data/*", dest: "dist/data" },- { src: "src/static/*", dest: "dist/static" },- {- src: "node_modules/swagger-ui-dist/*.{js,css,html,js.map}",- dest: "dist",- },+ { src: 'src/data/*', dest: 'dist/data' },+ { src: 'src/static/*', dest: 'dist/static' },],}),],};+let devConfig = devESConfig;+if (format === 'cjs') {+ devConfig = devCJSConfig;+}+const config = isProduction ? prodConfig : devConfig;export default config;function filenameReplacePlugin() {- const filter = createFilter("**/*.ts", "node_modules/**");+ const filter = createFilter('**/*.ts', 'node_modules/**');return {- name: "filename-replace",+ name: 'filename-replace',transform(code, id) {if (!filter(id)) return null;@@ -121,14 +154,11 @@ function filenameReplacePlugin() {const normalizedId = path.normalize(id);// Extract the part of the path after '/src' and remove the file extension- const relativePath = path.relative(path.resolve("src"), normalizedId);- const filenameWithoutExtension = relativePath.replace(- path.extname(relativePath),- ""- );+ const relativePath = path.relative(path.resolve('src'), normalizedId);+ const filenameWithoutExtension = relativePath.replace(path.extname(relativePath), '');// Replace backslashes with forward slashes if on Windows- const unixStylePath = filenameWithoutExtension.replace(/\\/g, "/");+ const unixStylePath = filenameWithoutExtension.replace(/\\/g, '/');const modifiedCode = code.replace(/___FILENAME___/g, unixStylePath);diff --git a/packages/runtime/src/core/component/Code.class.ts b/packages/runtime/src/core/component/Code.class.tsdeleted file mode 100644index b9c5e625..00000000--- a/packages/runtime/src/core/component/Code.class.ts+++ /dev/null@@ -1,95 +0,0 @@-import { Agent, Component, TemplateStringHelper } from "@smythos/sre";-import axios from "axios";-import Joi from "joi";--export class Code extends Component {- protected configSchema = Joi.object({- code_vars: Joi.string().max(1000).allow("").label("Variables"),- code_body: Joi.string().max(500000).allow("").label("Code"),- _templateSettings: Joi.object().allow(null).label("Template Settings"),- _templateVars: Joi.object().allow(null).label("Template Variables"),- });- constructor() {- super();- }- init() {}- async process(input, config, agent: Agent) {- await super.process(input, config, agent);-- const logger = this.createComponentLogger(agent, config);- try {- let Output: any = {};- let _error = undefined;- const url = config.env.CODE_SANDBOX_URL + "/run-js";-- let codeInputs = {};- for (let fieldName in input) {- const _type = typeof input[fieldName];- switch (_type) {- case "string":- //escape string- //codeInputs[fieldName] = `\`${input[fieldName]}\``;-- //encode string- const b64encoded = Buffer.from(input[fieldName]).toString("base64");- codeInputs[fieldName] = `___internal.b64decode('${b64encoded}')`;-- break;- case "number":- case "boolean":- codeInputs[fieldName] = input[fieldName];- break;- default:- codeInputs[fieldName] = input[fieldName];- break;- }- }- //FIXME : don't trust code_vars from user input ==> generate it-- // let code_vars = parseTemplate(config.data.code_vars || '', codeInputs, { escapeString: false, processUnmatched: false });- let code_vars = TemplateStringHelper.create(config.data.code_vars || "")- .parse(codeInputs)- .clean(undefined, "undefined").result;-- //TODO: the current template parser doesn't support the processUnmatched or unmached options !!!!- // code_vars = parseTemplate(code_vars || '', codeInputs, { escapeString: false, unmached: 'undefined' });- let code_body = config.data.code_body;- if (config.data._templateVars) {- // code_body = parseTemplate(code_body, config.data._templateVars);- code_body = TemplateStringHelper.create(code_body).parse(- config.data._templateVars- ).result;- }- const code = code_vars + "\n" + code_body;-- logger.debug(` Running code \n${code}\n`);-- const result: any = await axios- .post(url, { code })- .catch((error) => ({ error }));-- if (result.error) {- _error =- result.error?.response?.data ||- result.error?.message ||- result.error.toString() ||- "Unknown error";- logger.error(- ` Error running code \n${JSON.stringify(result.error, null, 2)}\n`- );- Output = undefined; //prevents running next component if the code execution failed- } else {- logger.debug(- ` Code result \n${JSON.stringify(result.data, null, 2)}\n`- );- Output = result.data?.Output;- }-- return { Output, _error, _debug: logger.output };- } catch (err: any) {- const _error = err?.response?.data || err?.message || err.toString();- logger.error(` Error running code \n${_error}\n`);- return { Output: undefined, _error, _debug: logger.output };- }- }-}diff --git a/packages/runtime/src/core/component/componentRegistry.ts b/packages/runtime/src/core/component/componentRegistry.tsdeleted file mode 100644index c33afcbd..00000000--- a/packages/runtime/src/core/component/componentRegistry.ts+++ /dev/null@@ -1,24 +0,0 @@-import {- AccessCandidate,- ComponentConnector,- ConnectorService,-} from "@smythos/sre";--import { Code } from "./Code.class";--const COMPONENTS = [["Code", Code]] as const;--/**- * Register all components- */-export function registerComponents(): void {- const componentConnector =- ConnectorService.getComponentConnector() as ComponentConnector;- const requester = componentConnector.requester(- AccessCandidate.user("system")- );-- COMPONENTS.forEach(([name, componentClass]) => {- requester.register(name, new componentClass());- });-}diff --git a/packages/runtime/src/core/config.ts b/packages/runtime/src/core/config.tsindex bb4dd01d..63788ffd 100644--- a/packages/runtime/src/core/config.ts+++ b/packages/runtime/src/core/config.ts@@ -1,6 +1,6 @@-import dotenv from "dotenv";-import path from "path";-import { fileURLToPath } from "url";+import dotenv from 'dotenv';+import path from 'path';+import { fileURLToPath } from 'url';dotenv.config();@@ -9,17 +9,17 @@ const __dirname = path.dirname(__filename);const config = {env: {- PORT: parseInt(process.env.PORT || "5053"),+ PORT: parseInt(process.env.PORT || '5053'),// Required environment variablesLOGTO_M2M_APP_SECRET: process.env.LOGTO_M2M_APP_SECRET,LOGTO_SERVER: process.env.LOGTO_SERVER,LOGTO_API_RESOURCE: process.env.LOGTO_API_RESOURCE,MIDDLEWARE_API_BASE_URL: process.env.MIDDLEWARE_API_BASE_URL,- NODE_ENV: process.env?.NODE_ENV || "development",+ NODE_ENV: process.env?.NODE_ENV || 'development',ADMIN_PORT: process.env.ADMIN_PORT || 5054,- BASE_URL: process.env.BASE_URL || "http://localhost:5053",+ BASE_URL: process.env.BASE_URL || 'http://localhost:5053',LOGTO_M2M_APP_ID: process.env.LOGTO_M2M_APP_ID,@@ -30,12 +30,12 @@ const config = {REQ_LIMIT_PER_MINUTE: process.env.REQ_LIMIT_PER_MINUTE || 300,MAX_CONCURRENT_REQUESTS: process.env.MAX_CONCURRENT_REQUESTS || 10,- UI_SERVER: process.env.UI_SERVER || "http://localhost:4000",+ UI_SERVER: process.env.UI_SERVER || 'http://localhost:4000',SESSION_SECRET: process.env.SESSION_SECRET,- DATA_PATH: process.env.DATA_PATH || path.resolve(__dirname, "../../data"),+ DATA_PATH: process.env.DATA_PATH || path.resolve(__dirname, '../../data'),- SMYTHOS_SERVER_TYPE: process.env.SMYTHOS_SERVER_TYPE || "combined",+ SMYTHOS_SERVER_TYPE: process.env.SMYTHOS_SERVER_TYPE || 'combined',},};diff --git a/packages/runtime/src/core/config/index.ts b/packages/runtime/src/core/config/index.tsdeleted file mode 100644index b0ddd04b..00000000--- a/packages/runtime/src/core/config/index.ts+++ /dev/null@@ -1,8 +0,0 @@-/**- * Core Configuration Exports- *- * This file provides centralized exports for all configuration modules- * in the SmythOS runtime environment.- */--export * from './models.config';diff --git a/packages/runtime/src/core/config/models.config.ts b/packages/runtime/src/core/config/models.config.tsindex 7b39ad3c..b51999ff 100644--- a/packages/runtime/src/core/config/models.config.ts+++ b/packages/runtime/src/core/config/models.config.ts@@ -5,7 +5,7 @@* from a JSON file for better maintainability.*/-import modelsData from "@data/models.json";+import modelsData from '@data/models.json';// Base interface with all possible fields for non-Echo modelsinterface BaseModelConfig {@@ -30,13 +30,13 @@ interface BaseModelConfig {// Echo model configuration (only requires provider)interface EchoModelConfig {- provider: "Echo";+ provider: 'Echo';}// Conditional type: if provider is "Echo", use EchoModelConfig, otherwise use BaseModelConfig-export type ModelConfig = EchoModelConfig | BaseModelConfig;+type ModelConfig = EchoModelConfig | BaseModelConfig;-export type ModelsConfig = Record<string, ModelConfig>;+type ModelsConfig = Record<string, ModelConfig>;// Load models configuration from JSON fileexport const modelsConfig: ModelsConfig = modelsData as ModelsConfig;diff --git a/packages/runtime/src/core/connectors/SmythOSSAccount.class.ts b/packages/runtime/src/core/connectors/SmythOSSAccount.class.tsindex eea9908a..f9c07e7f 100644--- a/packages/runtime/src/core/connectors/SmythOSSAccount.class.ts+++ b/packages/runtime/src/core/connectors/SmythOSSAccount.class.ts@@ -1,4 +1,4 @@-import axios, { AxiosInstance } from "axios";+import axios, { AxiosInstance } from 'axios';import {AccessRequest,@@ -11,14 +11,14 @@ import {OAuthConfig,TAccessLevel,TAccessRole,-} from "@smythos/sre";+} from '@smythos/sre';-import { getM2MToken } from "@core/helpers/logto.helper";-import { SmythConfigs } from "@core/types/general.types";+import { getM2MToken } from '@core/helpers/logto.helper';+import { SmythConfigs } from '@core/types/general.types';-const console = Logger("SmythOSSAccount");+const console = Logger('SmythOSSAccount');export class SmythOSSAccount extends AccountConnector {- public name: string = "SmythOSSAccount";+ public name = 'SmythOSSAccount';private oAuthAppId: string;private oAuthAppSecret: string;private oAuthBaseUrl: string;@@ -28,22 +28,19 @@ export class SmythOSSAccount extends AccountConnector {constructor(protected _settings: SmythConfigs & OAuthConfig) {super(_settings);- //if (!SmythRuntime.Instance) throw new Error('SRE not initialized');+ // if (!SmythRuntime.Instance) throw new Error('SRE not initialized');this.oAuthAppId = _settings.oAuthAppID;this.oAuthAppSecret = _settings.oAuthAppSecret;this.oAuthBaseUrl = _settings.oAuthBaseUrl;- this.oAuthResource = _settings.oAuthResource || "";- this.oAuthScope = _settings.oAuthScope || "";+ this.oAuthResource = _settings.oAuthResource || '';+ this.oAuthScope = _settings.oAuthScope || '';this.smythAPI = axios.create({baseURL: `${_settings.smythAPIBaseUrl}`,});}- public async isTeamMember(- teamId: string,- candidate: IAccessCandidate- ): Promise<boolean> {+ public async isTeamMember(teamId: string, candidate: IAccessCandidate): Promise<boolean> {try {const candidateTeamId = await this.getCandidateTeam(candidate);if (teamId === candidateTeamId) {@@ -55,9 +52,7 @@ export class SmythOSSAccount extends AccountConnector {}}- public async getCandidateTeam(- candidate: IAccessCandidate- ): Promise<string | undefined> {+ public async getCandidateTeam(candidate: IAccessCandidate): Promise<string | undefined> {if (candidate.role === TAccessRole.Team) {return candidate.id;}@@ -76,10 +71,7 @@ export class SmythOSSAccount extends AccountConnector {return null;}- public async getAllTeamSettings(- acRequest: AccessRequest,- teamId: string- ): Promise<KeyValueObject | null> {+ public async getAllTeamSettings(acRequest: AccessRequest, teamId: string): Promise<KeyValueObject | null> {try {const response = await this.smythAPI.get(`/v1/teams/${teamId}/settings`, {headers: await this.getSmythRequestHeaders(),@@ -98,15 +90,9 @@ export class SmythOSSAccount extends AccountConnector {}}- public async getAllUserSettings(- acRequest: AccessRequest,- accountId: string- ): Promise<KeyValueObject | null> {+ public async getAllUserSettings(acRequest: AccessRequest, accountId: string): Promise<KeyValueObject | null> {try {- const response = await this.smythAPI.get(- `/v1/user/${accountId}/settings`,- { headers: await this.getSmythRequestHeaders() }- );+ const response = await this.smythAPI.get(`/v1/user/${accountId}/settings`, { headers: await this.getSmythRequestHeaders() });if (response?.data?.settings?.length > 0) {const settingsObject: KeyValueObject = {};@@ -121,34 +107,20 @@ export class SmythOSSAccount extends AccountConnector {}}- public async getTeamSetting(- acRequest: AccessRequest,- teamId: string,- settingKey: string- ): Promise<string> {+ public async getTeamSetting(acRequest: AccessRequest, teamId: string, settingKey: string): Promise<string> {try {- const response = await this.smythAPI.get(- `/v1/teams/${teamId}/settings/${settingKey}`,- { headers: await this.getSmythRequestHeaders() }- );+ const response = await this.smythAPI.get(`/v1/teams/${teamId}/settings/${settingKey}`, { headers: await this.getSmythRequestHeaders() });return response?.data?.setting?.settingValue || null;} catch (error) {return null;}}- public async getUserSetting(- acRequest: AccessRequest,- accountId: string,- settingKey: string- ): Promise<string> {+ public async getUserSetting(acRequest: AccessRequest, accountId: string, settingKey: string): Promise<string> {try {- const response = await this.smythAPI.get(- `/v1/user/${accountId}/settings/${settingKey}`,- {- headers: await this.getSmythRequestHeaders(),- }- );+ const response = await this.smythAPI.get(`/v1/user/${accountId}/settings/${settingKey}`, {+ headers: await this.getSmythRequestHeaders(),+ });return response?.data?.setting?.settingValue || null;} catch (error) {return null;@@ -156,8 +128,7 @@ export class SmythOSSAccount extends AccountConnector {}public async getResourceACL(resourceId: string, candidate: IAccessCandidate) {- const accountConnector =- ConnectorService.getAccountConnector("SmythAccount");+ const accountConnector = ConnectorService.getAccountConnector('SmythAccount');const teamId = await accountConnector.getCandidateTeam(candidate);const acl = new ACL();@@ -182,30 +153,20 @@ export class SmythOSSAccount extends AccountConnector {};}- public async getAgentSetting(- acRequest: AccessRequest,- agentId: string,- settingKey: string- ): Promise<string> {+ public async getAgentSetting(acRequest: AccessRequest, agentId: string, settingKey: string): Promise<string> {try {// TODO: use following endpoint when Ahmed make it available// const response = await this.smythAPI.get(`/v1/ai-agent/${agentId}/settings/${settingKey}`, {// headers: await this.getSmythRequestHeaders(),// });- const response = await this.smythAPI.get(- `/v1/ai-agent/${agentId}/settings/`,- {- headers: await this.getSmythRequestHeaders(),- }- );- const setting =- response?.data?.settings?.find(- (setting: KeyValueObject) => setting?.key === settingKey- ) || null;- return setting?.value || "";+ const response = await this.smythAPI.get(`/v1/ai-agent/${agentId}/settings/`, {+ headers: await this.getSmythRequestHeaders(),+ });+ const setting = response?.data?.settings?.find((setting: KeyValueObject) => setting?.key === settingKey) || null;+ return setting?.value || '';} catch (error) {- return "";+ return '';}}}diff --git a/packages/runtime/src/core/connectors/SmythOSSAgentDataConnector.class.ts b/packages/runtime/src/core/connectors/SmythOSSAgentDataConnector.class.tsindex 33f8ab2c..765709a2 100644--- a/packages/runtime/src/core/connectors/SmythOSSAgentDataConnector.class.ts+++ b/packages/runtime/src/core/connectors/SmythOSSAgentDataConnector.class.ts@@ -1,11 +1,12 @@import axios, { AxiosInstance } from 'axios';-import { AgentDataConnector, OAuthConfig } from '@smythos/sre';+import { AgentDataConnector, Logger, OAuthConfig } from '@smythos/sre';import { SmythConfigs } from '@core/types/general.types';+const console = Logger('Connector: SmythOSSAgentData');export class SmythOSSAgentDataConnector extends AgentDataConnector {- public name: string = 'SmythOSSAgentData';+ public name = 'SmythOSSAgentData';private oAuthAppId: string;private oAuthAppSecret: string;private oAuthBaseUrl: string;@@ -17,7 +18,7 @@ export class SmythOSSAgentDataConnector extends AgentDataConnector {constructor(private config: SmythConfigs & OAuthConfig & { agentStageDomain: string; agentProdDomain: string }) {super();- //if (!SmythRuntime.Instance) throw new Error('SRE not initialized');+ // if (!SmythRuntime.Instance) throw new Error('SRE not initialized');this.oAuthAppId = config.oAuthAppID;this.oAuthAppSecret = config.oAuthAppSecret;this.oAuthBaseUrl = config.oAuthBaseUrl;@@ -39,15 +40,13 @@ export class SmythOSSAgentDataConnector extends AgentDataConnector {public async getAgentData(agentId: string, version?: string): Promise<any> {try {- let agentObj;-- //FIXME : once we have the agent name in deployment api response, we can skip this call+ // FIXME : once we have the agent name in deployment api response, we can skip this call// const response = await mwSysAPI.get(`/ai-agent/${agentID}?include=team.subscription`, includeAuth(token));const response = await this.smythAPI.get(`/v1/ai-agent/${agentId}?include=team.subscription`, {headers: await this.getSmythRequestHeaders(),});- agentObj = response.data.agent;- const authData = agentObj.data.auth; //use most up to date auth data+ const agentObj = response.data.agent;+ const authData = agentObj.data.auth; // use most up to date auth data// const tasksResponse = await mwSysAPI.get(`/quota/team/${agentObj.teamId}/tasks/subscription`, includeAuth(token));@@ -57,7 +56,7 @@ export class SmythOSSAgentDataConnector extends AgentDataConnector {isFreeUser: false,};- agentObj.data.debugSessionEnabled = agentObj?.data?.debugSessionEnabled && agentObj?.isLocked; //disable debug session if agent is not locked (locked agent means that it's open in the Agent builder)+ agentObj.data.debugSessionEnabled = agentObj?.data?.debugSessionEnabled && agentObj?.isLocked; // disable debug session if agent is not locked (locked agent means that it's open in the Agent builder)if (version) {// const deploymentsList = await mwSysAPI.get(`/ai-agent/${agentID}/deployments`, includeAuth(token));@@ -74,19 +73,19 @@ export class SmythOSSAgentDataConnector extends AgentDataConnector {headers: await this.getSmythRequestHeaders(),});agentObj.data = deployResponse?.data?.deployment?.aiAgentData;- agentObj.data.debugSessionEnabled = false; //never enable debug session when using a deployed version+ agentObj.data.debugSessionEnabled = false; // never enable debug session when using a deployed versionagentObj.data.agentVersion = deployment.version;agentObj.version = deployment.version;} else {- //if (version !== 'latest') {+ // if (version !== 'latest') {throw new Error(`Requested Deploy Version not found: ${version}`);- //} // if version == 'latest' but no deployment is found we just fallback to the agent live data+ // } // if version == 'latest' but no deployment is found we just fallback to the agent live data}}- //TODO: Also include team and subscription info+ // TODO: Also include team and subscription info- //agentObj.data.auth = authData;+ // agentObj.data.auth = authData;if (!agentObj?.data?.auth?.method || agentObj?.data?.auth?.method == 'none') agentObj.data.auth = authData;agentObj.data = this.migrateAgentData(agentObj.data);@@ -101,18 +100,18 @@ export class SmythOSSAgentDataConnector extends AgentDataConnector {public async getAgentIdByDomain(domain: string): Promise<string> {let agentId;- //first check if this is the internal wildcard agents domain+ // first check if this is the internal wildcard agents domainconst isStageWildcardDomain = domain.includes(this.agentStageDomain);const isProdWildcardDomain = domain.includes(this.agentProdDomain);if (isStageWildcardDomain || isProdWildcardDomain) {- //console.log('Internal agent domain detected', domain);+ // console.log('Internal agent domain detected', domain);agentId = domain.split('.')[0];- //sanity check+ // sanity checkif (`${agentId}.${this.agentStageDomain}` !== domain && `${agentId}.${this.agentProdDomain}` !== domain) {throw new Error(`Invalid agent domain: ${domain}`);}- //if this is a stage domain, no more check, return the agentId+ // if this is a stage domain, no more check, return the agentIdif (isStageWildcardDomain) return agentId;}@@ -127,7 +126,7 @@ export class SmythOSSAgentDataConnector extends AgentDataConnector {throw new Error('Error getting domain info');}- //we have an agentId from the wildcard domain, if this domain is already associated with+ // we have an agentId from the wildcard domain, if this domain is already associated withif (agentId) {const hasDomain = result.data.domains.find((domainEntry: any) => domainEntry?.aiAgent?.id === agentId);if (hasDomain) {@@ -137,7 +136,7 @@ export class SmythOSSAgentDataConnector extends AgentDataConnector {agentId = result.data.domains.find((domainEntry: any) => domainEntry.name === domain)?.aiAgent?.id;}- //if a custom domain is found, use it, otherwise use the agentId from the wildcard domain+ // if a custom domain is found, use it, otherwise use the agentId from the wildcard domainreturn agentId;}@@ -197,7 +196,7 @@ export class SmythOSSAgentDataConnector extends AgentDataConnector {});return deploymentsList?.data?.deployments?.length > 0;} catch (error) {- console.error(error);+ // console.error(error);return false;}}@@ -213,7 +212,7 @@ export class SmythOSSAgentDataConnector extends AgentDataConnector {console.log(`Agent [${data.name}] has an old schema. Migrating to latest version...`);// version 0 ===> migrate from receptors/connectors to inputs/outputsconst newData = JSON.parse(JSON.stringify(data));- for (let component of newData.components) {+ for (const component of newData.components) {component.outputs = component.connectors;component.inputs = component.receptors;component.outputProps = component.connectorProps;@@ -227,10 +226,10 @@ export class SmythOSSAgentDataConnector extends AgentDataConnector {}if (data.version === '1.0.0') {- //migrate .description to .behavior+ // migrate .description to .behaviorif (data.description && !data.behavior) {- data.behavior = data.description;- //delete newConfig.description;+ const newData = { ...data, behavior: data.description };+ return newData;}}diff --git a/packages/runtime/src/core/connectors/connectorRegistry.ts b/packages/runtime/src/core/connectors/connectorRegistry.tsindex 645e2caf..271a3a07 100644--- a/packages/runtime/src/core/connectors/connectorRegistry.ts+++ b/packages/runtime/src/core/connectors/connectorRegistry.ts@@ -1,20 +1,12 @@-import {- ConnectorService,- JSONModelsProvider,- TConnectorService,-} from "@smythos/sre";+import { ConnectorService, JSONModelsProvider, TConnectorService } from '@smythos/sre';-import { SmythOSSAccount } from "./SmythOSSAccount.class";-import { SmythOSSAgentDataConnector } from "./SmythOSSAgentDataConnector.class";+import { SmythOSSAccount } from './SmythOSSAccount.class';+import { SmythOSSAgentDataConnector } from './SmythOSSAgentDataConnector.class';const CONNECTORS = [- [- TConnectorService.AgentData,- "SmythOSSAgentData",- SmythOSSAgentDataConnector,- ],- [TConnectorService.Account, "SmythOSSAccount", SmythOSSAccount],- [TConnectorService.ModelsProvider, "SmythModelsProvider", JSONModelsProvider],+ [TConnectorService.AgentData, 'SmythOSSAgentData', SmythOSSAgentDataConnector],+ [TConnectorService.Account, 'SmythOSSAccount', SmythOSSAccount],+ [TConnectorService.ModelsProvider, 'SmythModelsProvider', JSONModelsProvider],] as const;/**diff --git a/packages/runtime/src/core/constants.ts b/packages/runtime/src/core/constants.tsindex 56b6c0a8..e1c0337e 100644--- a/packages/runtime/src/core/constants.ts+++ b/packages/runtime/src/core/constants.ts@@ -1,17 +1,11 @@-export const DEFAULT_AGENT_MODEL_SETTINGS_KEY = "chatGptModel"; // the key in the agent settings object that contains the model name-export const DEFAULT_MODEL = "gpt-5-mini"; // the default model to use if no model is specified in the agent settings+export const DEFAULT_AGENT_MODEL_SETTINGS_KEY = 'chatGptModel'; // the key in the agent settings object that contains the model name+export const DEFAULT_MODEL = 'gpt-5-mini'; // the default model to use if no model is specified in the agent settings-export const PROD_VERSION_VALUES = ["prod", "production", "stable"];-export const TEST_VERSION_VALUES = [- "dev",- "develop",- "development",- "test",- "staging",-];+export const PROD_VERSION_VALUES = ['prod', 'production', 'stable'];+export const TEST_VERSION_VALUES = ['dev', 'develop', 'development', 'test', 'staging'];export const MAX_FILE_SIZE = 5 * 1024 * 1024; // 5 MBexport const MAX_FILE_COUNT = 5;-export const AGENT_AUTH_SETTINGS_KEY = "agentAuth";-export const MOCK_DATA_SETTINGS_KEY = "agent-mock-data";+export const AGENT_AUTH_SETTINGS_KEY = 'agentAuth';+export const MOCK_DATA_SETTINGS_KEY = 'agent-mock-data';diff --git a/packages/runtime/src/core/default-file-parsing-agent.ts b/packages/runtime/src/core/default-file-parsing-agent.tsindex b3ec2f07..b0576aae 100644--- a/packages/runtime/src/core/default-file-parsing-agent.ts+++ b/packages/runtime/src/core/default-file-parsing-agent.ts@@ -1,119 +1,117 @@-import { DEFAULT_MODEL } from "@core/constants";+import { DEFAULT_MODEL } from '@core/constants';export const defaultFileParsingAgent = {components: [{- id: "CM6JHAW8TNQB",- name: "APIEndpoint",+ id: 'CM6JHAW8TNQB',+ name: 'APIEndpoint',outputs: [- { name: "headers", color: "#3C89F9", index: 0, default: true },- { name: "body", color: "#3C89F9", index: 1, default: true },- { name: "query", color: "#3C89F9", index: 2, default: true },+ { name: 'headers', color: '#3C89F9', index: 0, default: true },+ { name: 'body', color: '#3C89F9', index: 1, default: true },+ { name: 'query', color: '#3C89F9', index: 2, default: true },{- name: "message",- color: "#3C89F9",- expression: "body.message",+ name: 'message',+ color: '#3C89F9',+ expression: 'body.message',index: 3,default: false,},{- name: "attachments",- color: "#3C89F9",- expression: "body.attachments",+ name: 'attachments',+ color: '#3C89F9',+ expression: 'body.attachments',index: 4,default: false,},],inputs: [{- name: "message",- type: "Any",- friendlyInputType: "Text",- coreInputType: "Any",- color: "#F35063",+ name: 'message',+ type: 'Any',+ friendlyInputType: 'Text',+ coreInputType: 'Any',+ color: '#F35063',optional: false,description: "User's query.",index: 0,default: false,},{- name: "attachments",- type: "Binary",- friendlyInputType: "Text",- coreInputType: "Binary",- color: "#F35063",+ name: 'attachments',+ type: 'Binary',+ friendlyInputType: 'Text',+ coreInputType: 'Binary',+ color: '#F35063',optional: false,- description:- "Files, images, and attachments to parse and answer questions about.",+ description: 'Files, images, and attachments to parse and answer questions about.',index: 1,default: false,},],data: {- method: "POST",- endpoint: "process_attachment_fallback",- description:- "Use this endpoint to process user queries with attachments, if there is no other endpoint to process the attachments.",+ method: 'POST',+ endpoint: 'process_attachment_fallback',+ description: 'Use this endpoint to process user queries with attachments, if there is no other endpoint to process the attachments.',ai_exposed: true,- summary: "",+ summary: '',advancedModeEnabled: false,},- top: "72.6576px",- left: "539.408px",- width: "",- height: "",- displayName: "APIEndpoint",- title: "Agent Skill",- aiTitle: "",- description: "An API Endpoint with input parameters for your AI agent.",+ top: '72.6576px',+ left: '539.408px',+ width: '',+ height: '',+ displayName: 'APIEndpoint',+ title: 'Agent Skill',+ aiTitle: '',+ description: 'An API Endpoint with input parameters for your AI agent.',},{- id: "CM6JHDY7QJR",- name: "APIOutput",- outputs: [{ name: "Output", color: "#3C89F9", index: 0, default: true }],+ id: 'CM6JHDY7QJR',+ name: 'APIOutput',+ outputs: [{ name: 'Output', color: '#3C89F9', index: 0, default: true }],inputs: [{- name: "result",- type: "Any",- friendlyInputType: "",- coreInputType: "Any",- color: "#F35063",+ name: 'result',+ type: 'Any',+ friendlyInputType: '',+ coreInputType: 'Any',+ color: '#F35063',optional: false,index: 0,default: false,},],- data: { format: "minimal" },- top: "131.801px",- left: "1269.49px",- width: "",- height: "",- displayName: "APIOutput",- title: "APIOutput",- aiTitle: "",- description: "",+ data: { format: 'minimal' },+ top: '131.801px',+ left: '1269.49px',+ width: '',+ height: '',+ displayName: 'APIOutput',+ title: 'APIOutput',+ aiTitle: '',+ description: '',},{- id: "CM6QMI3IGUCK",- name: "GenAILLM",- outputs: [{ name: "Reply", color: "#3C89F9", index: 0, default: true }],+ id: 'CM6QMI3IGUCK',+ name: 'GenAILLM',+ outputs: [{ name: 'Reply', color: '#3C89F9', index: 0, default: true }],inputs: [{- name: "Input",- type: "Any",- friendlyInputType: "",- coreInputType: "",- color: "#F35063",+ name: 'Input',+ type: 'Any',+ friendlyInputType: '',+ coreInputType: '',+ color: '#F35063',optional: false,index: 0,default: false,},{- name: "Attachment",- type: "Binary",- friendlyInputType: "",- coreInputType: "",- color: "#F35063",+ name: 'Attachment',+ type: 'Binary',+ friendlyInputType: '',+ coreInputType: '',+ color: '#F35063',optional: true,index: 1,default: false,@@ -121,46 +119,44 @@ export const defaultFileParsingAgent = {],data: {model: DEFAULT_MODEL,- prompt:- "Answer question the user's questions: {{Input}}\nUse the attachments for context if needed.",- temperature: "1",- maxTokens: "16384",- topP: "1",- topK: "0",- frequencyPenalty: "0",- presencePenalty: "0",+ prompt: "Answer question the user's questions: {{Input}}\nUse the attachments for context if needed.",+ temperature: '1',+ maxTokens: '16384',+ topP: '1',+ topK: '0',+ frequencyPenalty: '0',+ presencePenalty: '0',passthrough: false,- stopSequences: "",- maxThinkingTokens: "816",+ stopSequences: '',+ maxThinkingTokens: '816',},- top: "34.9306px",- left: "902.845px",- width: "",- height: "",- displayName: "GenAI LLM",- title: "Question Answering System",- aiTitle: "Question Answering System",- description:- "Make a GenAI request to an AI model. Works with many input file types.",+ top: '34.9306px',+ left: '902.845px',+ width: '',+ height: '',+ displayName: 'GenAI LLM',+ title: 'Question Answering System',+ aiTitle: 'Question Answering System',+ description: 'Make a GenAI request to an AI model. Works with many input file types.',},],connections: [{- sourceId: "CM6JHAW8TNQB",+ sourceId: 'CM6JHAW8TNQB',sourceIndex: 3,- targetId: "CM6QMI3IGUCK",+ targetId: 'CM6QMI3IGUCK',targetIndex: 0,},{- sourceId: "CM6JHAW8TNQB",+ sourceId: 'CM6JHAW8TNQB',sourceIndex: 4,- targetId: "CM6QMI3IGUCK",+ targetId: 'CM6QMI3IGUCK',targetIndex: 1,},{- sourceId: "CM6QMI3IGUCK",+ sourceId: 'CM6QMI3IGUCK',sourceIndex: 0,- targetId: "CM6JHDY7QJR",+ targetId: 'CM6JHDY7QJR',targetIndex: 0,},],diff --git a/packages/runtime/src/core/helpers/agent.helper.ts b/packages/runtime/src/core/helpers/agent.helper.tsindex 5a1a7b00..4662399c 100644--- a/packages/runtime/src/core/helpers/agent.helper.ts+++ b/packages/runtime/src/core/helpers/agent.helper.ts@@ -1,13 +1,12 @@import axios from 'axios';import config from '../config';-import { Logger } from '@smythos/sre';+import { AccessCandidate, ConnectorService, Logger } from '@smythos/sre';import { includeAuth, mwSysAPI } from '../services/smythAPIReq';import { getM2MToken } from './logto.helper';import { AGENT_AUTH_SETTINGS_KEY, MOCK_DATA_SETTINGS_KEY, PROD_VERSION_VALUES, TEST_VERSION_VALUES } from '@core/constants';-import { AccessCandidate, ConnectorService } from '@smythos/sre';import { defaultFileParsingAgent } from '../default-file-parsing-agent';const logger = Logger('(Core) Service: Agent Helper');@@ -109,7 +108,7 @@ export async function getAgentEmbodiments(agentID) {export async function getAgentIdByDomain(domain = '') {let agentId;- //first check if this is the internal wildcard agents domain+ // first check if this is the internal wildcard agents domainconst isStageWildcardDomain = domain.includes(config.env.DEFAULT_AGENT_DOMAIN);const isProdWildcardDomain = domain.includes(config.env.PROD_AGENT_DOMAIN);if (isStageWildcardDomain || isProdWildcardDomain) {@@ -143,7 +142,7 @@ export async function getAgentIdByDomain(domain = '') {function migrateAgentData(data) {if (!data.version) {const newData = JSON.parse(JSON.stringify(data));- for (let component of newData.components) {+ for (const component of newData.components) {component.outputs = component.connectors;component.inputs = component.receptors;component.outputProps = component.connectorProps;@@ -158,7 +157,8 @@ function migrateAgentData(data) {if (data.version === '1.0.0') {if (data.description && !data.behavior) {- data.behavior = data.description;+ const newData = { ...data, behavior: data.description };+ return newData;}}@@ -169,10 +169,8 @@ export async function getAgentDataById(agentID, version) {try {const token = (await getM2MToken('https://api.smyth.ai')) as string;- let agentObj;-const response = await mwSysAPI.get(`/ai-agent/${agentID}?include=team.subscription`, includeAuth(token));- agentObj = response.data.agent;+ const agentObj = response.data.agent;const authData = agentObj.data.auth;// const tasksResponse = await mwSysAPI.get(@@ -221,10 +219,10 @@ export function addDefaultComponentsAndConnections(agentData) {async function fetchAgentAuthData(agentId: string) {const accountConnector = ConnectorService.getAccountConnector();- return await accountConnector.user(AccessCandidate.agent(agentId)).getAgentSetting(AGENT_AUTH_SETTINGS_KEY);+ return accountConnector.user(AccessCandidate.agent(agentId)).getAgentSetting(AGENT_AUTH_SETTINGS_KEY);}-export async function getAgentAuthData(agentId: string) {+async function getAgentAuthData(agentId: string) {const freshSettings = await fetchAgentAuthData(agentId);return JSON.parse(freshSettings || '{}');}diff --git a/packages/runtime/src/core/helpers/logto.helper.ts b/packages/runtime/src/core/helpers/logto.helper.tsindex 1905bdf9..97eeb550 100644--- a/packages/runtime/src/core/helpers/logto.helper.ts+++ b/packages/runtime/src/core/helpers/logto.helper.ts@@ -1,8 +1,5 @@-export function getM2MToken(resource?, scope?) {- return new Promise((resolve, reject) => {- resolve('M2M_TOKEN'); // static token- });+ return new Promise((resolve, reject) => {+ resolve('M2M_TOKEN'); // static token+ });}--diff --git a/packages/runtime/src/core/management-router.ts b/packages/runtime/src/core/management-router.tsindex da82a3d1..273766b8 100644--- a/packages/runtime/src/core/management-router.ts+++ b/packages/runtime/src/core/management-router.ts@@ -1,15 +1,15 @@-import express from "express";-import { app } from "../index.js";-import { Server } from "http";-import config from "./config";+import express from 'express';+import { app } from '../index.js';+import { Server } from 'http';+import config from './config';const ADMIN_PORT = config.env.ADMIN_PORT || 5054;const PORT = config.env.PORT || 5053;// eslint-disable-next-line import/no-mutable-exports-export let server: Server;+let server: Server;-const host = config.env.NODE_ENV === "production" ? "localhost" : "";+const host = config.env.NODE_ENV === 'production' ? 'localhost' : '';function enableAppPort() {if (server && server.listening) {@@ -27,34 +27,31 @@ function enableAppPort() {// Function to disable port 5000 to stop accepting new connectionsfunction disableAppPort() {server.close(() => {- console.info(- `App Server listening on port ${PORT} no longer accepting connections`- );+ console.info(`App Server listening on port ${PORT} no longer accepting connections`);});}// Management app listening on port 5054const managementApp = express();-export { managementApp };// Route to handle management operations-managementApp.get("/", (req, res) => {- res.send("Management operations.");+managementApp.get('/', (req, res) => {+ res.send('Management operations.');});// Route to enable port 5000 for new connections-managementApp.get("/enable", (req, res) => {+managementApp.get('/enable', (req, res) => {enableAppPort();res.send(`Port ${PORT} enabled for new connections via management port.`);});// Route to disable port 5000 for new connections-managementApp.get("/disable", (req, res) => {+managementApp.get('/disable', (req, res) => {disableAppPort();res.send(`Port ${PORT} disabled for new connections via management port.`);});-managementApp.get("/stats", (req, res) => {+managementApp.get('/stats', (req, res) => {server.getConnections((err, count) => {if (err) {res.status(500).send(err);diff --git a/packages/runtime/src/core/middlewares/cors.mw.ts b/packages/runtime/src/core/middlewares/cors.mw.tsindex d4c4d1e5..2dff73fa 100644--- a/packages/runtime/src/core/middlewares/cors.mw.ts+++ b/packages/runtime/src/core/middlewares/cors.mw.ts@@ -1,23 +1,13 @@-import cors from "cors";+import cors from 'cors';-import config from "@core/config";+import config from '@core/config';// Minimal CORS - allow everything in development, configurable for productionconst corsOptions: cors.CorsOptions = {- origin:- process.env.NODE_ENV === "production"- ? process.env.CORS_ORIGINS?.split(",") || false- : true,+ origin: process.env.NODE_ENV === 'production' ? process.env.CORS_ORIGINS?.split(',') || false : true,credentials: true,- methods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"],- allowedHeaders: [- "Content-Type",- "Authorization",- "X-Conversation-Id",- "X-Auth-Token",- "X-Parent-Cookie",- "X-Monitor-Id",- ],+ methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],+ allowedHeaders: ['Content-Type', 'Authorization', 'X-Conversation-Id', 'X-Auth-Token', 'X-Parent-Cookie', 'X-Monitor-Id'],};export default cors(corsOptions);diff --git a/packages/runtime/src/core/middlewares/error.mw.ts b/packages/runtime/src/core/middlewares/error.mw.tsindex 725e0a53..e5f4373b 100644--- a/packages/runtime/src/core/middlewares/error.mw.ts+++ b/packages/runtime/src/core/middlewares/error.mw.ts@@ -1,26 +1,21 @@-import { ErrorRequestHandler, Request, Response, NextFunction } from "express";-import { Logger } from "@smythos/sre";+import { ErrorRequestHandler, Request, Response, NextFunction } from 'express';+import { Logger } from '@smythos/sre';-import config from "@core/config";+import config from '@core/config';-const logger = Logger("(Core) Middleware: Error");+const logger = Logger('(Core) Middleware: Error');/*** Centralized error handler for all application errors*/-const errorHandler: ErrorRequestHandler = (- err: any,- req: Request,- res: Response,- _next: NextFunction-) => {+const errorHandler: ErrorRequestHandler = (err: any, req: Request, res: Response, _next: NextFunction) => {// eslint-disable-next-line prefer-constlet { statusCode, message, errKey } = err;// Handle operational vs programming errorsif (!err.isOperational) {statusCode = 500;- message = "Internal Server Error";+ message = 'Internal Server Error';}res.locals.errorMessage = err.message;@@ -28,23 +23,20 @@ const errorHandler: ErrorRequestHandler = (const response = {success: false,code: statusCode ?? 500,- message: message ?? "Internal Server Error",- ...(config.env.NODE_ENV === "development" && { stack: err.stack }),+ message: message ?? 'Internal Server Error',+ ...(config.env.NODE_ENV === 'development' && { stack: err.stack }),...(errKey && { errKey }),};// Log error with request context- logger.error(- `[${statusCode ?? 500}] ${req.method} ${req.path} - ${message}`,- {- statusCode: statusCode ?? 500,- method: req.method,- path: req.path,- userAgent: req.get("User-Agent"),- ip: req.ip,- ...(config.env.NODE_ENV === "development" && { stack: err.stack }),- }- );+ logger.error(`[${statusCode ?? 500}] ${req.method} ${req.path} - ${message}`, {+ statusCode: statusCode ?? 500,+ method: req.method,+ path: req.path,+ userAgent: req.get('User-Agent'),+ ip: req.ip,+ ...(config.env.NODE_ENV === 'development' && { stack: err.stack }),+ });return res.status(statusCode ?? 500).json(response);};@@ -52,11 +44,7 @@ const errorHandler: ErrorRequestHandler = (/*** 404 Not Found handler - creates error and passes to error handler*/-const notFoundHandler = (- req: Request,- res: Response,- next: NextFunction-): void => {+const notFoundHandler = (req: Request, res: Response, next: NextFunction): void => {const error = new Error(`Path not found: ${req.method} ${req.path}`);(error as any).statusCode = 404;(error as any).isOperational = true;diff --git a/packages/runtime/src/core/middlewares/rateLimiter.mw.ts b/packages/runtime/src/core/middlewares/rateLimiter.mw.tsindex 1727a786..8c264b9c 100644--- a/packages/runtime/src/core/middlewares/rateLimiter.mw.ts+++ b/packages/runtime/src/core/middlewares/rateLimiter.mw.ts@@ -1,9 +1,9 @@-import { Request, Response, NextFunction } from "express";-import { Logger } from "@smythos/sre";+import { Request, Response, NextFunction } from 'express';+import { Logger } from '@smythos/sre';-import config from "@core/config";+import config from '@core/config';-const console = Logger("(Core) Middleware: RateLimiter");+const console = Logger('(Core) Middleware: RateLimiter');// Configuration from environment variables with sensible defaultsconst REQUESTS_PER_MINUTE = config.env.REQ_LIMIT_PER_MINUTE as number;@@ -30,14 +30,14 @@ const concurrentStore = new Map<string, ConcurrentEntry>();*/const shouldExcludeIP = (ip: string): boolean => {const excludedPrefixes = [- "127.0.0.1", // localhost IPv4- "::1", // localhost IPv6- "10.20.", // internal network- "10.30.", // internal network- "192.168.", // private network- "172.16.", // private network+ '127.0.0.1', // localhost IPv4+ '::1', // localhost IPv6+ '10.20.', // internal network+ '10.30.', // internal network+ '192.168.', // private network+ '172.16.', // private network];- return excludedPrefixes.some((prefix) => ip.startsWith(prefix));+ return excludedPrefixes.some(prefix => ip.startsWith(prefix));};/**@@ -49,9 +49,7 @@ const cleanupExpiredEntries = (): void => {// Cleanup rate limit entriesfor (const [key, entry] of rateLimitStore.entries()) {if (now - entry.lastCleanup > CLEANUP_INTERVAL_MS) {- entry.requests = entry.requests.filter(- (timestamp) => now - timestamp < WINDOW_SIZE_MS- );+ entry.requests = entry.requests.filter(timestamp => now - timestamp < WINDOW_SIZE_MS);entry.lastCleanup = now;if (entry.requests.length === 0) {@@ -86,9 +84,7 @@ const checkRateLimit = (clientIP: string): boolean => {}// Clean up old requests- entry.requests = entry.requests.filter(- (timestamp) => now - timestamp < WINDOW_SIZE_MS- );+ entry.requests = entry.requests.filter(timestamp => now - timestamp < WINDOW_SIZE_MS);if (entry.requests.length >= REQUESTS_PER_MINUTE) {return true; // Rate limit exceeded@@ -110,7 +106,7 @@ const checkConcurrentRequests = (clientIP: string): (() => void) | null => {const currentCount = entry?.count || 0;if (currentCount >= MAX_CONCURRENT_REQUESTS) {- throw new Error("Concurrent limit exceeded");+ throw new Error('Concurrent limit exceeded');}// Increment counter@@ -144,7 +140,7 @@ setInterval(cleanupExpiredEntries, CLEANUP_INTERVAL_MS);*/const RateLimiter = (req: Request, res: Response, next: NextFunction): void => {try {- const clientIP = req.ip || req.connection.remoteAddress || "unknown";+ const clientIP = req.ip || req.connection.remoteAddress || 'unknown';// Skip rate limiting for excluded IPs (localhost, private networks)if (shouldExcludeIP(clientIP)) {@@ -155,8 +151,8 @@ const RateLimiter = (req: Request, res: Response, next: NextFunction): void => {if (checkRateLimit(clientIP)) {console.log(`Rate limit exceeded for IP: ${clientIP}`);res.status(429).json({- error: "Too Many Requests",- message: "Rate limit exceeded. Please try again later.",+ error: 'Too Many Requests',+ message: 'Rate limit exceeded. Please try again later.',retryAfter: Math.ceil(WINDOW_SIZE_MS / 1000), // seconds until window resets});return;@@ -167,11 +163,11 @@ const RateLimiter = (req: Request, res: Response, next: NextFunction): void => {try {cleanupConcurrent = checkConcurrentRequests(clientIP);} catch (err) {- if (err.message === "Concurrent limit exceeded") {+ if (err.message === 'Concurrent limit exceeded') {console.log(`Concurrent request limit exceeded for IP: ${clientIP}`);res.status(429).json({- error: "Too Many Requests",- message: "Too many concurrent requests. Please try again later.",+ error: 'Too Many Requests',+ message: 'Too many concurrent requests. Please try again later.',});return;}@@ -181,20 +177,20 @@ const RateLimiter = (req: Request, res: Response, next: NextFunction): void => {// Set up cleanup for concurrent requests if neededif (cleanupConcurrent) {const cleanup = () => {- res.removeListener("finish", cleanup);- res.removeListener("close", cleanup);- res.removeListener("error", cleanup);+ res.removeListener('finish', cleanup);+ res.removeListener('close', cleanup);+ res.removeListener('error', cleanup);cleanupConcurrent();};- res.on("finish", cleanup);- res.on("close", cleanup);- res.on("error", cleanup);+ res.on('finish', cleanup);+ res.on('close', cleanup);+ res.on('error', cleanup);}next();} catch (err) {- console.error("Unexpected error in rate limiter:", err);+ console.error('Unexpected error in rate limiter:', err);// Don't block requests on unexpected errorsnext();}diff --git a/packages/runtime/src/core/middlewares/uploadHandler.mw.ts b/packages/runtime/src/core/middlewares/uploadHandler.mw.tsindex cfa5df5f..2ef3ca20 100644--- a/packages/runtime/src/core/middlewares/uploadHandler.mw.ts+++ b/packages/runtime/src/core/middlewares/uploadHandler.mw.ts@@ -1,5 +1,5 @@-import multer from "multer";-import { MAX_FILE_SIZE, MAX_FILE_COUNT } from "@core/constants";+import multer from 'multer';+import { MAX_FILE_SIZE, MAX_FILE_COUNT } from '@core/constants';const upload = multer({limits: { fileSize: MAX_FILE_SIZE },@@ -7,13 +7,13 @@ const upload = multer({});export function uploadHandler(req, res, next) {- upload.any()(req, res, (err) => {+ upload.any()(req, res, err => {if (err) {return next(new Error(`File upload error: ${err.message}`));}if (req.files && req.files.length > MAX_FILE_COUNT) {- return res.status(400).send("Too many files");+ return res.status(400).send('Too many files');}next();diff --git a/packages/runtime/src/core/middlewares/userAgentAccessCheck.mw.ts b/packages/runtime/src/core/middlewares/userAgentAccessCheck.mw.tsindex ac233cb7..204e6df2 100644--- a/packages/runtime/src/core/middlewares/userAgentAccessCheck.mw.ts+++ b/packages/runtime/src/core/middlewares/userAgentAccessCheck.mw.ts@@ -1,43 +1,39 @@-import { ConnectorService, Logger } from "@smythos/sre";-import { mwUserAPI } from "@core/services/smythAPIReq";+import { ConnectorService, Logger } from '@smythos/sre';+import { mwUserAPI } from '@core/services/smythAPIReq';-const console = Logger("(Core) Middleware: User Agent Access Check");+const console = Logger('(Core) Middleware: User Agent Access Check');export default async function UserAgentAccessCheck(req, res, next) {const agentDataConnector = ConnectorService.getAgentDataConnector();- let agentId = req.header("X-AGENT-ID");- const accessToken = req.header("Authorization")- ? req.header("Authorization").split(" ")[1]- : null;+ let agentId = req.header('X-AGENT-ID');+ const accessToken = req.header('Authorization') ? req.header('Authorization').split(' ')[1] : null;if (!accessToken) {- return res.status(401).send({ error: "Unauthorized" });+ return res.status(401).send({ error: 'Unauthorized' });}if (!agentId) {const domain = req.hostname;- agentId = await agentDataConnector- .getAgentIdByDomain(domain)- .catch((error) => {- console.error(error);- });+ agentId = await agentDataConnector.getAgentIdByDomain(domain).catch(error => {+ console.error(error);+ });}const agent = await mwUserAPI.get(`/ai-agent/${agentId}`, {headers: {Authorization: `Bearer ${accessToken}`,- "x-smyth-team-id": req.header("x-smyth-team-id") ?? undefined,+ 'x-smyth-team-id': req.header('x-smyth-team-id') ?? undefined,},})- .catch((err) => {+ .catch(err => {console.error(err);return false;});if (!agent) {- return res.status(401).send({ error: "Unauthorized" });+ return res.status(401).send({ error: 'Unauthorized' });}next();}diff --git a/packages/runtime/src/core/middlewares/validate.mw.ts b/packages/runtime/src/core/middlewares/validate.mw.tsindex 6360ee41..b9384a68 100644--- a/packages/runtime/src/core/middlewares/validate.mw.ts+++ b/packages/runtime/src/core/middlewares/validate.mw.ts@@ -3,37 +3,37 @@ import Joi, { ObjectSchema, Schema } from 'joi';import ApiError from '../utils/apiError';type AnyObject = {- [x: string]: any;+ [x: string]: any;};const pick = (object: AnyObject, keys: string[]) =>- keys.reduce((newObject: AnyObject, key) => {- if (object && Object.prototype.hasOwnProperty.call(object, key)) {- // eslint-disable-next-line no-param-reassign- newObject[key] = object[key];- }- return newObject;- }, {});+ keys.reduce((newObject: AnyObject, key) => {+ if (object && Object.hasOwn(object, key)) {+ // eslint-disable-next-line no-param-reassign+ newObject[key] = object[key];+ }+ return newObject;+ }, {});type SchemaObject = {- body?: ObjectSchema<any> | Schema;- query?: ObjectSchema<any> | Schema;- params?: ObjectSchema<any> | Schema;+ body?: ObjectSchema<any> | Schema;+ query?: ObjectSchema<any> | Schema;+ params?: ObjectSchema<any> | Schema;};const validate = (schema: SchemaObject) => (req: any, _res: any, next: NextFunction) => {- const validSchema = pick(schema, ['params', 'query', 'body']);- const object = pick(req, Object.keys(validSchema));- const { value, error } = Joi.compile(validSchema)- .prefs({ errors: { label: 'key' }, abortEarly: false })- .validate(object);+ const validSchema = pick(schema, ['params', 'query', 'body']);+ const object = pick(req, Object.keys(validSchema));+ const { value, error } = Joi.compile(validSchema)+ .prefs({ errors: { label: 'key' }, abortEarly: false })+ .validate(object);- if (error) {- const errorMessage = error.details.map((details) => details.message).join(', ');- return next(new ApiError(400, errorMessage));- }- Object.assign(req, value);- return next();+ if (error) {+ const errorMessage = error.details.map(details => details.message).join(', ');+ return next(new ApiError(400, errorMessage));+ }+ Object.assign(req, value);+ return next();};export { validate };diff --git a/packages/runtime/src/core/router-config.ts b/packages/runtime/src/core/router-config.tsindex f601d889..9f97f4fa 100644--- a/packages/runtime/src/core/router-config.ts+++ b/packages/runtime/src/core/router-config.ts@@ -1,30 +1,21 @@-import { Express } from "express";+import { Express } from 'express';-import { uploadHandler } from "@core/middlewares/uploadHandler.mw";+import agentRunnerAgentLoader from '@agent-runner/middlewares/agentLoader.mw';+import agentRunnerOauthRouter from '@agent-runner/routes/_oauth/router';+import { processAgentRequest as agentRunnerProcessAgentRequest } from '@agent-runner/services/agent-request-handler';-import agentRunnerAgentLoader from "@agent-runner/middlewares/agentLoader.mw";-import agentRunnerOauthRouter from "@agent-runner/routes/_oauth/router";-import { processAgentRequest as agentRunnerProcessAgentRequest } from "@agent-runner/services/agent-request-handler";--import debuggerAgentLoader from "@debugger/middlewares/agentLoader.mw";-import modelsRouter from "@debugger/routes/models/router";+import debuggerAgentLoader from '@debugger/middlewares/agentLoader.mw';+import modelsRouter from '@debugger/routes/models/router';import {createSseConnection as debuggerCreateSseConnection,getDebugSession as debuggerGetDebugSession,processAgentRequest as debuggerProcessAgentRequest,-} from "@debugger/services/agent-request-handler";+} from '@debugger/services/agent-request-handler';-import {- RuntimeConfig,- loadRuntimeConfig,- validateRuntimeConfig,-} from "./runtime-config";-import {- createAgentRunnerRouter,- createDebuggerRouter,-} from "./shared-agent-router";-import { createConfiguredSmartRouter } from "./smart-agent-router";-import config from "./config";+import config from './config';+import { RuntimeConfig, loadRuntimeConfig, validateRuntimeConfig } from './runtime-config';+import { createAgentRunnerRouter, createDebuggerRouter } from './shared-agent-router';+import { createConfiguredSmartRouter } from './smart-agent-router';/*** Configures and mounts agent routers based on runtime configuration@@ -36,18 +27,13 @@ import config from "./config";* - 'agent-runner': Only agent-runner service* - 'embodiment': Only embodiment service*/-export function configureAgentRouters(- app: Express,- runtimeConfig?: RuntimeConfig-) {+export function configureAgentRouters(app: Express, runtimeConfig?: RuntimeConfig) {const config = runtimeConfig || loadRuntimeConfig();// Validate configurationconst validation = validateRuntimeConfig(config);if (!validation.valid) {- throw new Error(- `Invalid runtime configuration: ${validation.errors.join(", ")}`- );+ throw new Error(`Invalid runtime configuration: ${validation.errors.join(', ')}`);}console.log(`Configuring ${config.serverType} server with services:`, {@@ -58,8 +44,7 @@ export function configureAgentRouters(});// Mount common routes that should be available in all server configurations- console.log("Mounting /models route (available for all server types)");- app.use("/models", modelsRouter);+ app.use('/models', modelsRouter);// Configure based on routing strategy and enabled servicesconst debuggerEnabled = config.services.debugger.enabled;@@ -67,65 +52,51 @@ export function configureAgentRouters(const embodimentEnabled = config.services.embodiment.enabled;// Smart routing: Multiple services with intelligent request routing- if (- config.routing.strategy === "smart" &&- debuggerEnabled &&- agentRunnerEnabled- ) {- console.log("Using smart router for intelligent request routing");+ if (config.routing.strategy === 'smart' && debuggerEnabled && agentRunnerEnabled) {+ console.log('Using smart router for intelligent request routing');const smartRouter = createConfiguredSmartRouter({debugger: {- middlewares: [uploadHandler, debuggerAgentLoader],+ middlewares: [debuggerAgentLoader],processAgentRequest: debuggerProcessAgentRequest,getDebugSession: debuggerGetDebugSession,createSseConnection: debuggerCreateSseConnection,},agentRunner: {- middlewares: [uploadHandler, agentRunnerAgentLoader],+ middlewares: [agentRunnerAgentLoader],processAgentRequest: agentRunnerProcessAgentRequest,},},{enableMetrics: config.server.metrics,enableDebuggerRoutes: debuggerEnabled,- }+ },);- app.use("/", smartRouter);+ app.use('/', smartRouter);return;}// Separate routing: Mount individual routers (extraction-ready)- if (- config.routing.strategy === "separate" ||- config.routing.strategy === "smart"- ) {+ if (config.routing.strategy === 'separate' || config.routing.strategy === 'smart') {if (debuggerEnabled) {- console.log("Mounting debugger router");- const debuggerRouter = createDebuggerRouter(- [uploadHandler, debuggerAgentLoader],- debuggerProcessAgentRequest,- {- getDebugSession: debuggerGetDebugSession,- createSseConnection: debuggerCreateSseConnection,- }- );- app.use("/", debuggerRouter);+ console.log('Mounting debugger router');+ const debuggerRouter = createDebuggerRouter([debuggerAgentLoader], debuggerProcessAgentRequest, {+ getDebugSession: debuggerGetDebugSession,+ createSseConnection: debuggerCreateSseConnection,+ });+ app.use('/', debuggerRouter);}if (agentRunnerEnabled) {- console.log("Mounting agent-runner router");- const agentRunnerRouter = createAgentRunnerRouter(- [uploadHandler, agentRunnerAgentLoader],- agentRunnerProcessAgentRequest- );- app.use("/", agentRunnerRouter);+ console.log('Mounting agent-runner router');+ const agentRunnerRouter = createAgentRunnerRouter([agentRunnerAgentLoader], agentRunnerProcessAgentRequest);+ app.use('/', agentRunnerRouter);// Mount agent-runner-specific routes- console.log("Mounting /oauth route for agent-runner");- app.use("/oauth", agentRunnerOauthRouter);+ console.log('Mounting /oauth route for agent-runner');+ app.use('/oauth', agentRunnerOauthRouter);}// Note: Embodiment router will be mounted here when embodimentEnabled is true@@ -133,23 +104,19 @@ export function configureAgentRouters(}// Legacy routing: Use original individual routers (for backward compatibility)- if (config.routing.strategy === "legacy") {- console.log("Using legacy routing with original routers");+ if (config.routing.strategy === 'legacy') {+ console.log('Using legacy routing with original routers');if (debuggerEnabled) {- import("@debugger/routes/agent/routes").then(- ({ default: debuggerRouter }) => {- app.use("/", debuggerRouter);- }- );+ import('@debugger/routes/agent/routes').then(({ default: debuggerRouter }) => {+ app.use('/', debuggerRouter);+ });}if (agentRunnerEnabled) {- import("@agent-runner/routes/agent/router").then(- ({ default: agentRunnerRouter }) => {- app.use("/", agentRunnerRouter);- }- );+ import('@agent-runner/routes/agent/router').then(({ default: agentRunnerRouter }) => {+ app.use('/', agentRunnerRouter);+ });}}}@@ -160,18 +127,18 @@ export function configureAgentRouters(*/// For backward compatibility - these functions now return RuntimeConfig-export function createDebuggerServerConfig(): RuntimeConfig {+function createDebuggerServerConfig(): RuntimeConfig {return {- serverType: "debugger",+ serverType: 'debugger',services: {debugger: { enabled: true, standalone: true },agentRunner: { enabled: false, standalone: false },embodiment: { enabled: false, standalone: false },},- routing: { strategy: "separate" },+ routing: { strategy: 'separate' },server: {port: config.env.PORT,- name: "smythos-debugger-server",+ name: 'smythos-debugger-server',healthCheck: true,metrics: true,},@@ -184,18 +151,18 @@ export function createDebuggerServerConfig(): RuntimeConfig {};}-export function createAgentRunnerServerConfig(): RuntimeConfig {+function createAgentRunnerServerConfig(): RuntimeConfig {return {- serverType: "agent-runner",+ serverType: 'agent-runner',services: {debugger: { enabled: false, standalone: false },agentRunner: { enabled: true, standalone: true },embodiment: { enabled: false, standalone: false },},- routing: { strategy: "separate" },+ routing: { strategy: 'separate' },server: {port: config.env.PORT,- name: "smythos-agent-runner-server",+ name: 'smythos-agent-runner-server',healthCheck: true,metrics: true,},@@ -208,18 +175,18 @@ export function createAgentRunnerServerConfig(): RuntimeConfig {};}-export function createEmbodimentServerConfig(): RuntimeConfig {+function createEmbodimentServerConfig(): RuntimeConfig {return {- serverType: "embodiment",+ serverType: 'embodiment',services: {debugger: { enabled: false, standalone: false },agentRunner: { enabled: false, standalone: false },embodiment: { enabled: true, standalone: true },},- routing: { strategy: "separate" },+ routing: { strategy: 'separate' },server: {port: config.env.PORT,- name: "smythos-embodiment-server",+ name: 'smythos-embodiment-server',healthCheck: true,metrics: true,},@@ -234,16 +201,16 @@ export function createEmbodimentServerConfig(): RuntimeConfig {export function createCombinedServerConfig(): RuntimeConfig {return {- serverType: "combined",+ serverType: 'combined',services: {debugger: { enabled: true, standalone: false },agentRunner: { enabled: true, standalone: false },embodiment: { enabled: true, standalone: false },},- routing: { strategy: "smart" },+ routing: { strategy: 'smart' },server: {port: config.env.PORT,- name: "smythos-runtime-combined",+ name: 'smythos-runtime-combined',healthCheck: true,metrics: true,},diff --git a/packages/runtime/src/core/routing/types.ts b/packages/runtime/src/core/routing/types.tsdeleted file mode 100644index b4bf13de..00000000--- a/packages/runtime/src/core/routing/types.ts+++ /dev/null@@ -1,82 +0,0 @@-/**- * Enterprise-grade routing system types- * Following Domain-Driven Design and Clean Architecture principles- */--import { Request } from "express";--export interface AgentContext {- id: string;- version?: string;- usingTestDomain: boolean;- debugSessionEnabled: boolean;- isLocked?: boolean;- agentVersion?: string;-}--export interface RequestContext {- correlationId: string;- timestamp: number;- clientIp: string;- userAgent?: string;- headers: Record<string, string>;-}--export interface RoutingDecision {- service: 'debugger' | 'agent-runner';- reason: string;- confidence: number;- metadata: Record<string, any>;-}--export interface ServiceHealth {- service: 'debugger' | 'agent-runner';- healthy: boolean;- lastCheck: number;- responseTime?: number;- errorRate?: number;-}--export interface RoutingMetrics {- totalRequests: number;- debuggerRequests: number;- agentRunnerRequests: number;- errors: number;- averageResponseTime: number;-}--export interface AgentRequestProcessor {- name: string;- canHandle(agent: AgentContext, request: RequestContext): Promise<boolean>;- process(agent: AgentContext, req: Request): Promise<ProcessingResult>;- healthCheck(): Promise<ServiceHealth>;-}--export interface ProcessingResult {- status: number;- data: any;- metadata?: {- processingTime: number;- service: string;- correlationId: string;- };-}--export interface RoutingStrategy {- decide(agent: AgentContext, request: RequestContext): Promise<RoutingDecision>;-}--export interface CircuitBreakerConfig {- failureThreshold: number;- resetTimeout: number;- monitoringPeriod: number;-}--export interface RoutingConfig {- enableMetrics: boolean;- enableCircuitBreaker: boolean;- circuitBreakerConfig: CircuitBreakerConfig;- healthCheckInterval: number;- requestTimeout: number;- maxRetries: number;-}diff --git a/packages/runtime/src/core/runtime-config.ts b/packages/runtime/src/core/runtime-config.tsindex 7143eb7c..fd80f426 100644--- a/packages/runtime/src/core/runtime-config.ts+++ b/packages/runtime/src/core/runtime-config.ts@@ -1,4 +1,4 @@-import config from "./config";+import config from './config';/*** Runtime Configuration System* Designed for future server extraction without code changes@@ -6,7 +6,7 @@ import config from "./config";export interface RuntimeConfig {// Server identity - determines which services this instance provides- serverType: "combined" | "debugger" | "agent-runner" | "embodiment";+ serverType: 'combined' | 'debugger' | 'agent-runner' | 'embodiment';// Service enablement flagsservices: {@@ -26,7 +26,7 @@ export interface RuntimeConfig {// Routing strategy when multiple services are enabledrouting: {- strategy: "smart" | "separate" | "legacy";+ strategy: 'smart' | 'separate' | 'legacy';// Smart: Intelligent routing based on request characteristics// Separate: Mount separate routers (current approach)// Legacy: Use original individual routers@@ -52,19 +52,19 @@ export interface RuntimeConfig {/*** Predefined configurations for different deployment scenarios*/-export const RuntimeConfigs = {+const RuntimeConfigs = {// Combined server (current default)combined: (): RuntimeConfig => ({- serverType: "combined",+ serverType: 'combined',services: {debugger: { enabled: true, standalone: false },agentRunner: { enabled: true, standalone: false },embodiment: { enabled: true, standalone: false },},- routing: { strategy: "smart" },+ routing: { strategy: 'smart' },server: {port: 5000,- name: "smythos-runtime-combined",+ name: 'smythos-runtime-combined',healthCheck: true,metrics: true,},@@ -78,16 +78,16 @@ export const RuntimeConfigs = {// Debugger-only server (for extraction)debugger: (): RuntimeConfig => ({- serverType: "debugger",+ serverType: 'debugger',services: {debugger: { enabled: true, standalone: true },agentRunner: { enabled: false, standalone: false },embodiment: { enabled: false, standalone: false },},- routing: { strategy: "separate" },+ routing: { strategy: 'separate' },server: {port: 5001,- name: "smythos-debugger-server",+ name: 'smythos-debugger-server',healthCheck: true,metrics: true,},@@ -101,16 +101,16 @@ export const RuntimeConfigs = {// Agent-runner-only server (for extraction)agentRunner: (): RuntimeConfig => ({- serverType: "agent-runner",+ serverType: 'agent-runner',services: {debugger: { enabled: false, standalone: false },agentRunner: { enabled: true, standalone: true },embodiment: { enabled: false, standalone: false },},- routing: { strategy: "separate" },+ routing: { strategy: 'separate' },server: {port: 5002,- name: "smythos-agent-runner-server",+ name: 'smythos-agent-runner-server',healthCheck: true,metrics: true,},@@ -124,16 +124,16 @@ export const RuntimeConfigs = {// Embodiment-only server (for extraction)embodiment: (): RuntimeConfig => ({- serverType: "embodiment",+ serverType: 'embodiment',services: {debugger: { enabled: false, standalone: false },agentRunner: { enabled: false, standalone: false },embodiment: { enabled: true, standalone: true },},- routing: { strategy: "separate" },+ routing: { strategy: 'separate' },server: {port: 5003,- name: "smythos-embodiment-server",+ name: 'smythos-embodiment-server',healthCheck: true,metrics: true,},@@ -154,13 +154,13 @@ export function loadRuntimeConfig(): RuntimeConfig {const configType = config.env.SMYTHOS_SERVER_TYPE;switch (configType) {- case "debugger":+ case 'debugger':return RuntimeConfigs.debugger();- case "agent-runner":+ case 'agent-runner':return RuntimeConfigs.agentRunner();- case "embodiment":+ case 'embodiment':return RuntimeConfigs.embodiment();- case "combined":+ case 'combined':default:return RuntimeConfigs.combined();}@@ -176,11 +176,9 @@ export function validateRuntimeConfig(config: RuntimeConfig): {const errors: string[] = [];// At least one service must be enabled- const enabledServices = Object.values(config.services).filter(- (service) => service.enabled- );+ const enabledServices = Object.values(config.services).filter(service => service.enabled);if (enabledServices.length === 0) {- errors.push("At least one service must be enabled");+ errors.push('At least one service must be enabled');}// Standalone services should be the only enabled service@@ -189,11 +187,7 @@ export function validateRuntimeConfig(config: RuntimeConfig): {.map(([name, _]) => name);if (standaloneServices.length > 1) {- errors.push(- `Multiple standalone services not allowed: ${standaloneServices.join(- ", "- )}`- );+ errors.push(`Multiple standalone services not allowed: ${standaloneServices.join(', ')}`);}if (standaloneServices.length === 1) {@@ -202,17 +196,13 @@ export function validateRuntimeConfig(config: RuntimeConfig): {.map(([name, _]) => name);if (otherEnabledServices.length > 0) {- errors.push(- `Standalone service cannot coexist with other services: ${otherEnabledServices.join(- ", "- )}`- );+ errors.push(`Standalone service cannot coexist with other services: ${otherEnabledServices.join(', ')}`);}}// Smart routing requires multiple services- if (config.routing.strategy === "smart" && enabledServices.length < 2) {- errors.push("Smart routing requires multiple enabled services");+ if (config.routing.strategy === 'smart' && enabledServices.length < 2) {+ errors.push('Smart routing requires multiple enabled services');}return {diff --git a/packages/runtime/src/core/services/BillingError.class.ts b/packages/runtime/src/core/services/BillingError.class.tsdeleted file mode 100644index 15fbf081..00000000--- a/packages/runtime/src/core/services/BillingError.class.ts+++ /dev/null@@ -1,14 +0,0 @@-export class BillingError extends Error {- code: string;- status: number;-- constructor(message: string, code: string = 'BILLING_LIMIT_REACHED', status: number = 402) {- super(message);- this.status = status;- this.code = code;- this.name = 'BillingError';-- // Fix prototype chain for proper instanceof behavior with custom Error classes- Object.setPrototypeOf(this, new.target.prototype);- }-}diff --git a/packages/runtime/src/core/services/request-context.ts b/packages/runtime/src/core/services/request-context.tsindex 5268b56c..0a42aee6 100644--- a/packages/runtime/src/core/services/request-context.ts+++ b/packages/runtime/src/core/services/request-context.ts@@ -3,20 +3,20 @@ import { AsyncLocalStorage } from 'async_hooks';const asyncLocalStorage = new AsyncLocalStorage();export const requestContext = {- run: (callback, initialValue = {}) => {- asyncLocalStorage.run(initialValue, callback);- },- get: (key: string) => {- const store = asyncLocalStorage.getStore();- if (store) {- return store[key];- }- return null;- },- set: (key: string, value: any) => {- const store = asyncLocalStorage.getStore();- if (store) {- store[key] = value;- }- },+ run: (callback, initialValue = {}) => {+ asyncLocalStorage.run(initialValue, callback);+ },+ get: (key: string) => {+ const store = asyncLocalStorage.getStore();+ if (store) {+ return store[key];+ }+ return null;+ },+ set: (key: string, value: any) => {+ const store = asyncLocalStorage.getStore();+ if (store) {+ store[key] = value;+ }+ },};diff --git a/packages/runtime/src/core/services/smythAPIReq.ts b/packages/runtime/src/core/services/smythAPIReq.tsindex d7f55245..5bd04f30 100644--- a/packages/runtime/src/core/services/smythAPIReq.ts+++ b/packages/runtime/src/core/services/smythAPIReq.ts@@ -1,7 +1,7 @@-import axios from "axios";-import config from "../config";+import axios from 'axios';+import config from '../config';-//middleware sys API+// middleware sys APIexport const mwSysAPI = axios.create({baseURL: `${config.env.MIDDLEWARE_API_BASE_URL}/_sysapi/v1`,});@@ -22,14 +22,12 @@ export function includeAuth(token: string) {* @param authHeader - The Authorization header value* @returns The extracted token or null if the token is invalid*/-export const extractBearerToken = (- authHeader: string | undefined-): string | null => {+export const extractBearerToken = (authHeader: string | undefined): string | null => {if (!authHeader) {return null;}- if (typeof authHeader !== "string" || !authHeader.startsWith("Bearer ")) {+ if (typeof authHeader !== 'string' || !authHeader.startsWith('Bearer ')) {return null;}diff --git a/packages/runtime/src/core/shared-agent-router.ts b/packages/runtime/src/core/shared-agent-router.tsindex 122a1cfa..23bd895c 100644--- a/packages/runtime/src/core/shared-agent-router.ts+++ b/packages/runtime/src/core/shared-agent-router.ts@@ -1,8 +1,9 @@-import { Logger } from "@smythos/sre";-import express from "express";+import { Logger } from '@smythos/sre';+import express from 'express';+import { uploadHandler } from '@core/middlewares/uploadHandler.mw';-export interface AgentRouterConfig {- mode: "debugger" | "agent-runner";+interface AgentRouterConfig {+ mode: 'debugger' | 'agent-runner';middlewares: express.RequestHandler[];processAgentRequest: (agentOrId: any, req: express.Request) => Promise<any>;additionalRoutes?: (router: express.Router) => void;@@ -13,8 +14,8 @@ export interface AgentRouterConfig {* Creates a shared agent router that can be configured for both debugger and agent-runner modes* This allows code reuse while maintaining the ability to extract servers separately*/-export function createAgentRouter(config: AgentRouterConfig): express.Router {- const console = Logger(config.loggerPrefix || "[Shared] Router: Agent");+function createAgentRouter(config: AgentRouterConfig): express.Router {+ const console = Logger(config.loggerPrefix || '[Shared] Router: Agent');const router = express.Router();// Add any additional routes specific to the mode (e.g., debugger's /debugSession and /monitor)@@ -24,24 +25,27 @@ export function createAgentRouter(config: AgentRouterConfig): express.Router {// Common API routes with configurable middleware and processingconst apiRoutes = [- { method: "post", path: "/api/*" },- { method: "get", path: "/api/*" },- { method: "post", path: "/:version/api/*" },- { method: "get", path: "/:version/api/*" },- { method: "post", path: /^\/v[0-9]+(\.[0-9]+)?\/api\/(.+)/ },+ { method: 'post', path: '/api/*' },+ { method: 'get', path: '/api/*' },+ { method: 'post', path: '/:version/api/*' },+ { method: 'get', path: '/:version/api/*' },+ { method: 'post', path: /^\/v[0-9]+(\.[0-9]+)?\/api\/(.+)/ },];apiRoutes.forEach(({ method, path }) => {- router[method](path, config.middlewares, async (req: any, res) => {+ // Add uploadHandler to all API routes (matches old server pattern)+ // Comment from old server: "uploadHandler should precede AgentLoader to parse multipart/form-data correctly"+ const middlewares = [uploadHandler, ...config.middlewares];+ router[method](path, middlewares, async (req: any, res) => {try {const agent = req._agent;if (!agent) {- return res.status(404).json({ error: "Agent not found" });+ return res.status(404).json({ error: 'Agent not found' });}// Handle different function signatures based on modelet result: any;- if (config.mode === "debugger") {+ if (config.mode === 'debugger') {// Debugger mode: pass agent.id as first parameterresult = await config.processAgentRequest(agent.id, req);} else {@@ -51,8 +55,8 @@ export function createAgentRouter(config: AgentRouterConfig): express.Router {return res.status(result?.status || 500).send(result?.data);} catch (error) {- console.error("Error processing agent request:", error);- return res.status(500).json({ error: "Internal Server Error" });+ console.error('Error processing agent request:', error);+ return res.status(500).json({ error: 'Internal Server Error' });}});});@@ -69,34 +73,35 @@ export function createDebuggerRouter(additionalServices?: {getDebugSession: (id: string) => any;createSseConnection: (req: any) => string;- }+ },): express.Router {+ const console = Logger('[Debugger] Router: Agent');return createAgentRouter({- mode: "debugger",+ mode: 'debugger',middlewares,processAgentRequest,- loggerPrefix: "[Debugger] Router: Agent",- additionalRoutes: (router) => {+ loggerPrefix: '[Debugger] Router: Agent',+ additionalRoutes: router => {// Additional routes are now mounted directly in router-config.tsif (additionalServices) {// Debug session route- router.get("/agent/:id/debugSession", (req, res) => {+ router.get('/agent/:id/debugSession', (req, res) => {console.log(- `Getting debug session for agent ${req.params.id} with client IP ${req.headers["x-forwarded-for"]} - ${req.socket.remoteAddress}. x-hash-id ${req.headers["x-hash-id"]}`+ `Getting debug session for agent ${req.params.id} with client IP ${req.headers['x-forwarded-for']} - ${req.socket.remoteAddress}. x-hash-id ${req.headers['x-hash-id']}`,);const dbgSession = additionalServices.getDebugSession(req.params.id);res.send({ dbgSession });});// Monitor route (SSE)- router.get("/agent/:id/monitor", (req, res) => {+ router.get('/agent/:id/monitor', (req, res) => {const sseId = additionalServices.createSseConnection(req);// Set headers for SSE- res.setHeader("Content-Type", "text/event-stream");- res.setHeader("Cache-Control", "no-cache");- res.setHeader("Connection", "keep-alive");+ res.setHeader('Content-Type', 'text/event-stream');+ res.setHeader('Cache-Control', 'no-cache');+ res.setHeader('Connection', 'keep-alive');// Send the unique ID as the first eventres.write(`event: init\n`);@@ -112,14 +117,14 @@ export function createDebuggerRouter(*/export function createAgentRunnerRouter(middlewares: express.RequestHandler[],- processAgentRequest: (agent: any, req: express.Request) => Promise<any>+ processAgentRequest: (agent: any, req: express.Request) => Promise<any>,): express.Router {return createAgentRouter({- mode: "agent-runner",+ mode: 'agent-runner',middlewares,processAgentRequest,- loggerPrefix: "(Agent Runner) Router: Agent",- additionalRoutes: (router) => {+ loggerPrefix: '(Agent Runner) Router: Agent',+ additionalRoutes: router => {// Additional routes are now mounted directly in router-config.ts},});diff --git a/packages/runtime/src/core/smart-agent-router.ts b/packages/runtime/src/core/smart-agent-router.tsindex 0efa239d..ced20fcb 100644--- a/packages/runtime/src/core/smart-agent-router.ts+++ b/packages/runtime/src/core/smart-agent-router.ts@@ -4,20 +4,18 @@**/-import { Logger } from "@smythos/sre";-import express from "express";-import { v4 as uuidv4 } from "uuid";+import { Logger } from '@smythos/sre';+import express from 'express';+import { uploadHandler } from '@core/middlewares/uploadHandler.mw';+import { v4 as uuidv4 } from 'uuid';-const console = Logger("[Smart Agent Router]");+const console = Logger('[Smart Agent Router]');-export interface RouterDependencies {+interface RouterDependencies {// Debugger dependenciesdebugger: {middlewares: express.RequestHandler[];- processAgentRequest: (- agentId: string,- req: express.Request- ) => Promise<any>;+ processAgentRequest: (agentId: string, req: express.Request) => Promise<any>;getDebugSession: (id: string) => any;createSseConnection: (req: any) => string;};@@ -47,154 +45,129 @@ export interface RouterDependencies {*/function shouldUseDebugger(req: any): { useDebugger: boolean; reason: string } {// 1. Check for explicit agent-runner header (highest priority)- const forceAgentRunner = req.header("X-FORCE-AGENT-RUNNER") !== undefined;+ const forceAgentRunner = req.header('X-FORCE-AGENT-RUNNER') !== undefined;if (forceAgentRunner) {return {useDebugger: false,- reason: "X-FORCE-AGENT-RUNNER header present",+ reason: 'X-FORCE-AGENT-RUNNER header present',};}// 2. Check for debug headers (second highest priority)- const debugHeaders = [- "X-DEBUG-RUN",- "X-DEBUG-READ",- "X-DEBUG-INJ",- "X-DEBUG-STOP",- "X-DEBUG-SKIP",- "X-MONITOR-ID",- ];+ const debugHeaders = ['X-DEBUG-RUN', 'X-DEBUG-READ', 'X-DEBUG-INJ', 'X-DEBUG-STOP', 'X-DEBUG-SKIP', 'X-MONITOR-ID'];- const hasDebugHeader = debugHeaders.some(- (header) => req.header(header) !== undefined- );+ const hasDebugHeader = debugHeaders.some(header => req.header(header) !== undefined);if (hasDebugHeader) {- return { useDebugger: true, reason: "Debug headers present" };+ return { useDebugger: true, reason: 'Debug headers present' };}// 3. Check for explicit debugger header- const forceDebugger = req.header("X-FORCE-DEBUGGER") !== undefined;+ const forceDebugger = req.header('X-FORCE-DEBUGGER') !== undefined;if (forceDebugger) {- return { useDebugger: true, reason: "X-FORCE-DEBUGGER header present" };+ return { useDebugger: true, reason: 'X-FORCE-DEBUGGER header present' };}// 4. Default routing based on explicit mode header- const routingMode = req.header("X-ROUTING-MODE");- if (routingMode === "debugger") {- return { useDebugger: true, reason: "X-ROUTING-MODE: debugger" };+ const routingMode = req.header('X-ROUTING-MODE');+ if (routingMode === 'debugger') {+ return { useDebugger: true, reason: 'X-ROUTING-MODE: debugger' };}- if (routingMode === "agent-runner") {- return { useDebugger: false, reason: "X-ROUTING-MODE: agent-runner" };+ if (routingMode === 'agent-runner') {+ return { useDebugger: false, reason: 'X-ROUTING-MODE: agent-runner' };}// 5. Final fallback: Default to agent-runner for production safetyreturn {useDebugger: false,- reason: "Default production-safe routing (no explicit routing headers)",+ reason: 'Default production-safe routing (no explicit routing headers)',};}/*** Creates a smart router that automatically chooses between debugger and agent-runner*/-export function createSmartAgentRouter(- dependencies: RouterDependencies-): express.Router {+function createSmartAgentRouter(dependencies: RouterDependencies): express.Router {const router = express.Router();// Add correlation ID for request tracingrouter.use((req: any, res, next) => {- if (!req.headers["x-correlation-id"]) {- req.headers["x-correlation-id"] = uuidv4();+ if (!req.headers['x-correlation-id']) {+ req.headers['x-correlation-id'] = uuidv4();}- res.setHeader("x-correlation-id", req.headers["x-correlation-id"]);+ res.setHeader('x-correlation-id', req.headers['x-correlation-id']);next();});// Debugger-specific routes (always use debugger)- router.get("/agent/:id/debugSession", async (req, res) => {+ router.get('/agent/:id/debugSession', async (req, res) => {try {const dbgSession = dependencies.debugger.getDebugSession(req.params.id);res.send({ dbgSession });} catch (error) {- console.error("Debug session error:", error);- res.status(500).json({ error: "Debug session unavailable" });+ console.error('Debug session error:', error);+ res.status(500).json({ error: 'Debug session unavailable' });}});- router.get("/agent/:id/monitor", async (req, res) => {+ router.get('/agent/:id/monitor', async (req, res) => {try {const sseId = dependencies.debugger.createSseConnection(req);- res.setHeader("Content-Type", "text/event-stream");- res.setHeader("Cache-Control", "no-cache");- res.setHeader("Connection", "keep-alive");+ res.setHeader('Content-Type', 'text/event-stream');+ res.setHeader('Cache-Control', 'no-cache');+ res.setHeader('Connection', 'keep-alive');res.write(`event: init\n`);res.write(`data: ${sseId}\n\n`);} catch (error) {- console.error("Monitor error:", error);- res.status(500).json({ error: "Monitor unavailable" });+ console.error('Monitor error:', error);+ res.status(500).json({ error: 'Monitor unavailable' });}});// Smart middleware that chooses the right serviceconst smartMiddleware = async (req: any, res: express.Response) => {- const correlationId = req.headers["x-correlation-id"];+ const correlationId = req.headers['x-correlation-id'];const startTime = Date.now();try {- // Step 1: Make routing decision based on headers+ // Step 1: Handle file uploads for all API requests (matches old server pattern)+ // Comment from old server: "uploadHandler should precede AgentLoader to parse multipart/form-data correctly"+ await runMiddleware(req, res, uploadHandler);++ // Step 2: Make routing decision based on headersconst { useDebugger, reason } = shouldUseDebugger(req);- // Step 2: Apply service-specific middleware (including upload handlers)- const serviceMiddlewares = useDebugger- ? dependencies.debugger.middlewares- : dependencies.agentRunner.middlewares;-- console.debug(- `Applying ${serviceMiddlewares.length} ${- useDebugger ? "debugger" : "agent-runner"- } middleware(s)`,- {- correlationId,- middlewares: serviceMiddlewares.map((mw) => mw.name || "anonymous"),- }- );+ // Step 3: Apply service-specific middleware+ const serviceMiddlewares = useDebugger ? dependencies.debugger.middlewares : dependencies.agentRunner.middlewares;++ console.debug(`Applying ${serviceMiddlewares.length} ${useDebugger ? 'debugger' : 'agent-runner'} middleware(s)`, {+ correlationId,+ middlewares: serviceMiddlewares.map(mw => mw.name || 'anonymous'),+ });await runMiddlewares(req, res, serviceMiddlewares);- console.log(- `Routing decision: ${- useDebugger ? "DEBUGGER" : "AGENT-RUNNER"- } - ${reason}`,- {- correlationId,- agentId: req._agent?.id,- path: req.path,- }- );+ console.log(`Routing decision: ${useDebugger ? 'DEBUGGER' : 'AGENT-RUNNER'} - ${reason}`, {+ correlationId,+ agentId: req._agent?.id,+ path: req.path,+ });- // Step 3: Process with appropriate service+ // Step 4: Process with appropriate servicelet result: any;if (useDebugger) {- result = await dependencies.debugger.processAgentRequest(- req._agent.id,- req- );+ result = await dependencies.debugger.processAgentRequest(req._agent.id, req);} else {- result = await dependencies.agentRunner.processAgentRequest(- req._agent,- req- );+ result = await dependencies.agentRunner.processAgentRequest(req._agent, req);}// Step 4: Send responseconst processingTime = Date.now() - startTime;console.debug(`Request completed`, {correlationId,- service: useDebugger ? "debugger" : "agent-runner",+ service: useDebugger ? 'debugger' : 'agent-runner',status: result?.status || 200,processingTime,});@@ -209,7 +182,7 @@ export function createSmartAgentRouter(});return res.status(500).json({- error: "Internal Server Error",+ error: 'Internal Server Error',correlationId,timestamp: new Date().toISOString(),});@@ -218,11 +191,11 @@ export function createSmartAgentRouter(// Common API routesconst apiRoutes = [- { method: "post", path: "/api/*" },- { method: "get", path: "/api/*" },- { method: "post", path: "/:version/api/*" },- { method: "get", path: "/:version/api/*" },- { method: "post", path: /^\/v[0-9]+(\.[0-9]+)?\/api\/(.+)/ },+ { method: 'post', path: '/api/*' },+ { method: 'get', path: '/api/*' },+ { method: 'post', path: '/:version/api/*' },+ { method: 'get', path: '/:version/api/*' },+ { method: 'post', path: /^\/v[0-9]+(\.[0-9]+)?\/api\/(.+)/ },];apiRoutes.forEach(({ method, path }) => {@@ -235,13 +208,9 @@ export function createSmartAgentRouter(/*** Helper function to promisify Express middleware*/-function runMiddleware(- req: any,- res: express.Response,- middleware: express.RequestHandler-): Promise<void> {+function runMiddleware(req: any, res: express.Response, middleware: express.RequestHandler): Promise<void> {return new Promise((resolve, reject) => {- middleware(req, res, (err) => {+ middleware(req, res, err => {if (err) reject(err);else resolve();});@@ -251,11 +220,7 @@ function runMiddleware(/*** Helper function to run an array of middlewares sequentially*/-async function runMiddlewares(- req: any,- res: express.Response,- middlewares: express.RequestHandler[]-): Promise<void> {+async function runMiddlewares(req: any, res: express.Response, middlewares: express.RequestHandler[]): Promise<void> {for (const middleware of middlewares) {await runMiddleware(req, res, middleware);}@@ -264,24 +229,21 @@ async function runMiddlewares(/*** Configuration helper for different deployment scenarios*/-export interface SmartRouterConfig {+interface SmartRouterConfig {enableDebuggerRoutes?: boolean;enableMetrics?: boolean;- logLevel?: "debug" | "info" | "warn" | "error";+ logLevel?: 'debug' | 'info' | 'warn' | 'error';}-export function createConfiguredSmartRouter(- dependencies: RouterDependencies,- config: SmartRouterConfig = {}-): express.Router {+export function createConfiguredSmartRouter(dependencies: RouterDependencies, config: SmartRouterConfig = {}): express.Router {const router = createSmartAgentRouter(dependencies);// Add health check endpoint- router.get("/health/smart-router", (req, res) => {+ router.get('/health/smart-router', (req, res) => {res.json({- status: "healthy",+ status: 'healthy',timestamp: new Date().toISOString(),- version: "1.0.0",+ version: '1.0.0',});});@@ -294,11 +256,11 @@ export function createConfiguredSmartRouter(router.use((req: any, res, next) => {requestCount++;- res.on("finish", () => {+ res.on('finish', () => {// This is a simple way to track which service was used// In a real implementation, you'd want more sophisticated metrics- const userAgent = req.headers["user-agent"] || "";- if (userAgent.includes("debug")) {+ const userAgent = req.headers['user-agent'] || '';+ if (userAgent.includes('debug')) {debuggerCount++;} else {agentRunnerCount++;@@ -308,7 +270,7 @@ export function createConfiguredSmartRouter(next();});- router.get("/metrics/smart-router", (req, res) => {+ router.get('/metrics/smart-router', (req, res) => {res.json({totalRequests: requestCount,debuggerRequests: debuggerCount,@@ -325,7 +287,7 @@ export function createConfiguredSmartRouter(* Utility function to test routing decisions without making actual requests* Useful for debugging and testing the routing logic*/-export function testRoutingDecision(headers: Record<string, string> = {}): {+function testRoutingDecision(headers: Record<string, string> = {}): {useDebugger: boolean;reason: string;} {@@ -339,24 +301,24 @@ export function testRoutingDecision(headers: Record<string, string> = {}): {/*** Helper function to create common header combinations for testing*/-export const RoutingHeaders = {+const RoutingHeaders = {// Force agent-runner (highest priority)- FORCE_AGENT_RUNNER: { "X-FORCE-AGENT-RUNNER": "true" },+ FORCE_AGENT_RUNNER: { 'X-FORCE-AGENT-RUNNER': 'true' },// Force debugger- FORCE_DEBUGGER: { "X-FORCE-DEBUGGER": "true" },+ FORCE_DEBUGGER: { 'X-FORCE-DEBUGGER': 'true' },// Debug session headers- DEBUG_RUN: { "X-DEBUG-RUN": "true" },- DEBUG_STOP: { "X-DEBUG-STOP": "true" },- DEBUG_READ: { "X-DEBUG-READ": "true" },- DEBUG_INJ: { "X-DEBUG-INJ": "true" },- DEBUG_SKIP: { "X-DEBUG-SKIP": "true" },- MONITOR: { "X-MONITOR-ID": "test-monitor" },+ DEBUG_RUN: { 'X-DEBUG-RUN': 'true' },+ DEBUG_STOP: { 'X-DEBUG-STOP': 'true' },+ DEBUG_READ: { 'X-DEBUG-READ': 'true' },+ DEBUG_INJ: { 'X-DEBUG-INJ': 'true' },+ DEBUG_SKIP: { 'X-DEBUG-SKIP': 'true' },+ MONITOR: { 'X-MONITOR-ID': 'test-monitor' },// Explicit routing mode- MODE_DEBUGGER: { "X-ROUTING-MODE": "debugger" },- MODE_AGENT_RUNNER: { "X-ROUTING-MODE": "agent-runner" },+ MODE_DEBUGGER: { 'X-ROUTING-MODE': 'debugger' },+ MODE_AGENT_RUNNER: { 'X-ROUTING-MODE': 'agent-runner' },// No headers (default behavior)NONE: {},diff --git a/packages/runtime/src/core/types/declarations/smythos.express.d.ts b/packages/runtime/src/core/types/declarations/smythos.express.d.tsindex 43809955..50810c71 100644--- a/packages/runtime/src/core/types/declarations/smythos.express.d.ts+++ b/packages/runtime/src/core/types/declarations/smythos.express.d.ts@@ -1,8 +1,8 @@-import multer from "multer";+import multer from 'multer';-import { Agent } from "@smythos/sre";+import { Agent } from '@smythos/sre';-import Chatbot from "@embodiment/services/Chatbot.class";+import Chatbot from '@embodiment/services/Chatbot.class';declare global {namespace Express {diff --git a/packages/runtime/src/core/types/llm.types.ts b/packages/runtime/src/core/types/llm.types.tsdeleted file mode 100644index 0aa826bc..00000000--- a/packages/runtime/src/core/types/llm.types.ts+++ /dev/null@@ -1,20 +0,0 @@-export type OpenAiParamsProps = Record<- string,- {- type: string;- description?: string;- items?: object;- additionalProperties?: object;- enum?: string[];- }->;-export type OpenAiParams = {- type: string;- properties: OpenAiParamsProps;- required: string[];-};-export interface OpenAiFunctionArg {- name: string;- description: string;- parameters: OpenAiParams;-}\ No newline at end of filediff --git a/packages/runtime/src/core/types/openapi.types.ts b/packages/runtime/src/core/types/openapi.types.tsindex 2f107a62..59d4dd31 100644--- a/packages/runtime/src/core/types/openapi.types.ts+++ b/packages/runtime/src/core/types/openapi.types.ts@@ -4,53 +4,53 @@*/export interface AgentData {- id?: string;- name?: string;- data?: {- version?: string;- behavior?: string;- shortDescription?: string;- description?: string;- components?: Array<AgentComponent>;- };- settings?: { [key: string]: any };- embodiments?: any[];- deployed?: boolean;+ id?: string;+ name?: string;+ data?: {+ version?: string;+ behavior?: string;+ shortDescription?: string;+ description?: string;+ components?: Array<AgentComponent>;+ };+ settings?: { [key: string]: any };+ embodiments?: any[];+ deployed?: boolean;}-export interface AgentComponent {- name: string;- data: {- endpoint?: string;- method?: string;- description?: string;- doc?: string;- ai_exposed?: boolean;- };- inputs?: Array<AgentInput>;+interface AgentComponent {+ name: string;+ data: {+ endpoint?: string;+ method?: string;+ description?: string;+ doc?: string;+ ai_exposed?: boolean;+ };+ inputs?: Array<AgentInput>;}-export interface AgentInput {- name: string;- type: string;- description?: string;- optional?: boolean;- defaultVal?: any;+interface AgentInput {+ name: string;+ type: string;+ description?: string;+ optional?: boolean;+ defaultVal?: any;}export interface OpenAPISpec {- openapi: string;- info: {- title: string;- description: string;- version: string;- };- servers: Array<{ url: string }>;- paths: { [path: string]: any };- components?: {- schemas?: { [key: string]: any };- securitySchemes?: { [key: string]: any };- };- security?: Array<{ [key: string]: string[] }>;- [key: string]: any; // Allow additional OpenAPI properties+ openapi: string;+ info: {+ title: string;+ description: string;+ version: string;+ };+ servers: Array<{ url: string }>;+ paths: { [path: string]: any };+ components?: {+ schemas?: { [key: string]: any };+ securitySchemes?: { [key: string]: any };+ };+ security?: Array<{ [key: string]: string[] }>;+ [key: string]: any; // Allow additional OpenAPI properties}diff --git a/packages/runtime/src/core/utils/apiError.ts b/packages/runtime/src/core/utils/apiError.tsindex 95b231ee..6779e08a 100644--- a/packages/runtime/src/core/utils/apiError.ts+++ b/packages/runtime/src/core/utils/apiError.ts@@ -8,33 +8,33 @@*/class ApiError extends Error {- statusCode: number | null | undefined;+ statusCode: number | null | undefined;- isOperational: boolean;+ isOperational: boolean;- stack: string | undefined;+ stack: string | undefined;- errKey: string | undefined;+ errKey: string | undefined;- isApiError: boolean;+ isApiError: boolean;- /**- *- * @param statusCode - http status code of the error- * @param message - error message- * @param isOperational - whether the error should be shown in production or not (if not, internal server error will be shown)- * @param stack - error stack trace- * @param errKey - error code to be used in the response- */+ /**+ *+ * @param statusCode - http status code of the error+ * @param message - error message+ * @param isOperational - whether the error should be shown in production or not (if not, internal server error will be shown)+ * @param stack - error stack trace+ * @param errKey - error code to be used in the response+ */- // eslint-disable-next-line default-param-last- constructor(statusCode: number | null | undefined, message: string, errKey?: string, isOperational = true, stack?: string) {- super(message);- this.statusCode = statusCode;- this.isOperational = isOperational === undefined ? true : isOperational;- this.errKey = errKey;- this.isApiError = true;- }+ // eslint-disable-next-line default-param-last+ constructor(statusCode: number | null | undefined, message: string, errKey?: string, isOperational = true, stack?: string) {+ super(message);+ this.statusCode = statusCode;+ this.isOperational = isOperational === undefined ? true : isOperational;+ this.errKey = errKey;+ this.isApiError = true;+ }}export default ApiError;diff --git a/packages/runtime/src/core/utils/chat.utils.ts b/packages/runtime/src/core/utils/chat.utils.tsindex 4430f81b..ea04970d 100644--- a/packages/runtime/src/core/utils/chat.utils.ts+++ b/packages/runtime/src/core/utils/chat.utils.ts@@ -1,33 +1,34 @@import crypto from 'crypto';import { getCurrentFormattedDate, toDateFromFormattedDateStr } from './date-time.utils';-export type ChatConversationsEnv = 'test' | 'prod';+import { ChatConversationsEnv } from '@embodiment/types/chat.types';+export const CHAT_PREFIXES: Record<ChatConversationsEnv, string> = {- test: 'chat-test-',- prod: 'chat-',+ test: 'chat-test-',+ prod: 'chat-',};export const buildConversationId = (uid?: string, isTestConv = false) => {- const prefix = isTestConv ? CHAT_PREFIXES.test : CHAT_PREFIXES.prod;- const convId = uid ?? `${prefix}${getCurrentFormattedDate()}-${crypto.randomBytes(8).toString('hex')}`;- return `${prefix}${getCurrentFormattedDate()}-${convId}`;+ const prefix = isTestConv ? CHAT_PREFIXES.test : CHAT_PREFIXES.prod;+ const convId = uid ?? `${prefix}${getCurrentFormattedDate()}-${crypto.randomBytes(8).toString('hex')}`;+ return `${prefix}${getCurrentFormattedDate()}-${convId}`;};export const parseDateFromConvId = (convId: string) => {- const match = convId.match(/\d{4}-\d{2}-\d{2}-\d{2}-\d{2}-\d{2}/);+ const match = convId.match(/\d{4}-\d{2}-\d{2}-\d{2}-\d{2}-\d{2}/);- if (!match) return null;- return toDateFromFormattedDateStr(match[0]);+ if (!match) return null;+ return toDateFromFormattedDateStr(match[0]);};export const getChatPrefixByEnv = (env: ChatConversationsEnv) => {- return CHAT_PREFIXES[env];+ return CHAT_PREFIXES[env];};export const parseDateRange = (dateRange: string) => {- const [start, end] = dateRange.split(',');- return { start: parseInt(start), end: parseInt(end) };+ const [start, end] = dateRange.split(',');+ return { start: parseInt(start), end: parseInt(end) };};export const isValidDateRange = (dateRange: string) => {- if (!dateRange) return false;- const { start, end } = parseDateRange(dateRange);- return !isNaN(start) && !isNaN(end) && start < end;+ if (!dateRange) return false;+ const { start, end } = parseDateRange(dateRange);+ return !isNaN(start) && !isNaN(end) && start < end;};diff --git a/packages/runtime/src/core/utils/date-time.utils.ts b/packages/runtime/src/core/utils/date-time.utils.tsindex 9184e5d5..d53904a6 100644--- a/packages/runtime/src/core/utils/date-time.utils.ts+++ b/packages/runtime/src/core/utils/date-time.utils.ts@@ -1,27 +1,27 @@export function getCurrentFormattedDate() {- const date = new Date();- const year = date.getFullYear();- const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based- const day = String(date.getDate()).padStart(2, '0');- const hours = String(date.getHours()).padStart(2, '0');- const minutes = String(date.getMinutes()).padStart(2, '0');- const seconds = String(date.getSeconds()).padStart(2, '0');- return `${year}-${month}-${day}-${hours}-${minutes}-${seconds}`;+ const date = new Date();+ const year = date.getFullYear();+ const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based+ const day = String(date.getDate()).padStart(2, '0');+ const hours = String(date.getHours()).padStart(2, '0');+ const minutes = String(date.getMinutes()).padStart(2, '0');+ const seconds = String(date.getSeconds()).padStart(2, '0');+ return `${year}-${month}-${day}-${hours}-${minutes}-${seconds}`;}export function toDateFromFormattedDateStr(formattedDate: string) {- const [year, month, day, hour, minute, second] = formattedDate.split('-').map(Number);- return new Date(year, month - 1, day, hour, minute, second);+ const [year, month, day, hour, minute, second] = formattedDate.split('-').map(Number);+ return new Date(year, month - 1, day, hour, minute, second);}export function getDayFormattedDate() {- const date = new Date();- const year = date.getFullYear();- const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based- const day = String(date.getDate()).padStart(2, '0');- return `${year}-${month}-${day}`;+ const date = new Date();+ const year = date.getFullYear();+ const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based+ const day = String(date.getDate()).padStart(2, '0');+ return `${year}-${month}-${day}`;}export function delay(ms) {- return new Promise((r) => setTimeout(r, ms));+ return new Promise(r => setTimeout(r, ms));}diff --git a/packages/runtime/src/core/utils/general.utils.ts b/packages/runtime/src/core/utils/general.utils.tsindex 75de713d..93230dbd 100644--- a/packages/runtime/src/core/utils/general.utils.ts+++ b/packages/runtime/src/core/utils/general.utils.ts@@ -1,52 +1,50 @@import fs from 'fs/promises';export function uid() {- return (Date.now() + Math.random()).toString(36).replace('.', '').toUpperCase();+ return (Date.now() + Math.random()).toString(36).replace('.', '').toUpperCase();}-export const hasKeyTemplateVar = (str: string = ''): boolean => {- if (!str || typeof str !== 'string') return false;- return (str?.match(/{{KEY\((.*?)\)}}/g) ?? []).length > 0;+export const hasKeyTemplateVar = (str = ''): boolean => {+ if (!str || typeof str !== 'string') return false;+ return (str?.match(/{{KEY\((.*?)\)}}/g) ?? []).length > 0;};export function parseTemplate(str, obj, { escapeString = true, processUnmatched = true, unmached = '' } = {}) {- try {- const parsed = str?.replace(/{{(.*?)}}/g, function (match, varName) {- // if key template var, return as is- if (hasKeyTemplateVar(match)) return match;-- let objVal = obj[varName.trim()];-- if (typeof objVal === 'object') {- objVal = JSON.stringify(objVal);- } else {- if (escapeString && typeof objVal === 'string') {- //escape double quotes, slashes ...- objVal = objVal?.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t');- }- }-- // Need to consider boolean 'false' as a valid value- // const val = objVal || match;- const val = objVal !== undefined ? objVal : match;-- return typeof val == 'string' || typeof val == 'number' ? val : JSON.stringify(val);- });-- //replace unmached vars with default value, make sure to ignore the key template var- return str == parsed && processUnmatched ? parsed?.replace(/{{(?!KEY\().*?}}/g, unmached) : parsed;- } catch (err) {- console.log('Error on parse template: ', err);-- return str;- }+ try {+ const parsed = str?.replace(/{{(.*?)}}/g, function (match, varName) {+ // if key template var, return as is+ if (hasKeyTemplateVar(match)) return match;++ let objVal = obj[varName.trim()];++ if (typeof objVal === 'object') {+ objVal = JSON.stringify(objVal);+ } else if (escapeString && typeof objVal === 'string') {+ // escape double quotes, slashes ...+ objVal = objVal?.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t');+ }++ // Need to consider boolean 'false' as a valid value+ // const val = objVal || match;+ const val = objVal !== undefined ? objVal : match;++ return typeof val == 'string' || typeof val == 'number' ? val : JSON.stringify(val);+ });++ // replace unmached vars with default value, make sure to ignore the key template var+ return str == parsed && processUnmatched ? parsed?.replace(/{{(?!KEY\().*?}}/g, unmached) : parsed;+ } catch (err) {+ console.log('Error on parse template: ', err);++ return str;+ }}export const fsExists = async (path: string) => {- try {- await fs.access(path);- return true;- } catch {- return false;- }+ try {+ await fs.access(path);+ return true;+ } catch {+ return false;+ }};diff --git a/packages/runtime/src/index.ts b/packages/runtime/src/index.tsindex 802a34ce..04d7cf27 100644--- a/packages/runtime/src/index.ts+++ b/packages/runtime/src/index.ts@@ -1,4 +1,3 @@-import { Logger, SmythRuntime, version } from '@smythos/sre';import compression from 'compression';import cookieParser from 'cookie-parser';import crypto from 'crypto';@@ -8,8 +7,11 @@ import fs from 'fs';import { Server } from 'http';import os from 'os';import path from 'path';+import 'source-map-support/register.js';import url from 'url';+import { Logger, SmythRuntime, version } from '@smythos/sre';+// Core importsimport config from '@core/config';import { modelsConfig } from '@core/config/models.config';@@ -17,7 +19,6 @@ import { startServers } from '@core/management-router';import cors from '@core/middlewares/cors.mw';import { errorHandler, notFoundHandler } from '@core/middlewares/error.mw';import RateLimiter from '@core/middlewares/rateLimiter.mw';-import { uploadHandler } from '@core/middlewares/uploadHandler.mw';import { requestContext } from '@core/services/request-context';import { registerConnectors } from '@core/connectors/connectorRegistry';@@ -72,7 +73,12 @@ const sre = SmythRuntime.Instance.init({Account: {Connector: 'SmythOSSAccount',Settings: {- smythAPIBaseUrl: config.env.MIDDLEWARE_API_BASE_URL + '/_sysapi',+ oAuthAppID: config.env.LOGTO_M2M_APP_ID,+ oAuthAppSecret: config.env.LOGTO_M2M_APP_SECRET,+ oAuthBaseUrl: `${config.env.LOGTO_SERVER}/oidc/token`,+ oAuthResource: config.env.LOGTO_API_RESOURCE,+ oAuthScope: '',+ smythAPIBaseUrl: `${config.env.MIDDLEWARE_API_BASE_URL}/_sysapi`,},},Vault: {@@ -96,7 +102,7 @@ const sre = SmythRuntime.Instance.init({Settings: {agentStageDomain: config.env.DEFAULT_AGENT_DOMAIN || '',agentProdDomain: config.env.PROD_AGENT_DOMAIN || '',- smythAPIBaseUrl: config.env.MIDDLEWARE_API_BASE_URL + '/_sysapi',+ smythAPIBaseUrl: `${config.env.MIDDLEWARE_API_BASE_URL}/_sysapi`,},},Log: {@@ -160,20 +166,19 @@ app.use(}),);-app.use(uploadHandler);app.use(RateLimiter);app.use(express.json({ limit: '10mb' }));app.use(express.urlencoded({ extended: false, limit: '100kb' }));// Health endpointapp.get('/health', (req: any, res) => {- let agent_domain = config.env.DEFAULT_AGENT_DOMAIN;- if (config.env.AGENT_DOMAIN_PORT) agent_domain += `:${config.env.AGENT_DOMAIN_PORT}`;+ let agentDomain = config.env.DEFAULT_AGENT_DOMAIN;+ if (config.env.AGENT_DOMAIN_PORT) agentDomain += `:${config.env.AGENT_DOMAIN_PORT}`;res.send({message: 'Health Check Complete',hostname: req.hostname,- agent_domain,+ agent_domain: agentDomain,success: true,node: port?.toString()?.substr(2),name: 'smythos-runtime-server',diff --git a/packages/runtime/src/modules/agent-runner/constants.ts b/packages/runtime/src/modules/agent-runner/constants.tsindex 273f2f99..1844d63e 100644--- a/packages/runtime/src/modules/agent-runner/constants.ts+++ b/packages/runtime/src/modules/agent-runner/constants.ts@@ -1 +1 @@-export const DEFAULT_FILE_PARSING_ENDPOINT = "/api/process_attachment_fallback";+export const DEFAULT_FILE_PARSING_ENDPOINT = '/api/process_attachment_fallback';diff --git a/packages/runtime/src/modules/agent-runner/middlewares/agent-oauth.mw/bearer.ts b/packages/runtime/src/modules/agent-runner/middlewares/agent-oauth.mw/bearer.tsdeleted file mode 100644index 354cc00f..00000000--- a/packages/runtime/src/modules/agent-runner/middlewares/agent-oauth.mw/bearer.ts+++ /dev/null@@ -1,25 +0,0 @@-import { NextFunction, Request, Response } from 'express';-import axios from 'axios';-import qs from 'qs';--const mwFactory = (config: any) => {- // Middleware to validate an access token using the token introspection endpoint- const validateTokenMiddleware = async (req: Request, res: Response, next: NextFunction) => {- // Extract the token from the request header or URL query- const token = req.headers['authorization']?.split(' ')[1] || req.query.token;-- if (!token) {- return res.status(401).json({ error: 'Access token is required' });- }-- if (token == config.token) {- next();- } else {- // Token is not active- res.status(401).json({ error: 'Invalid access token' });- }- };- return validateTokenMiddleware;-};--export default mwFactory;diff --git a/packages/runtime/src/modules/agent-runner/middlewares/agent-oauth.mw/index.ts b/packages/runtime/src/modules/agent-runner/middlewares/agent-oauth.mw/index.tsdeleted file mode 100644index 6422c9f8..00000000--- a/packages/runtime/src/modules/agent-runner/middlewares/agent-oauth.mw/index.ts+++ /dev/null@@ -1,52 +0,0 @@-import { NextFunction, Response } from "express";--import { Logger } from "@smythos/sre";--import { getAgentAuthData } from "@core/helpers/agent.helper";--import BearerMWFactory from "./bearer";-import OIDCMWFactory from "./oidc";--const console = Logger("(Agent Runner) Middleware: Agent OAuth");--//this maps to agent.auth.provider entry, the selected provider is stored in agent.auth.method-const providers = {- "oauth-oidc": OIDCMWFactory,- "api-key-bearer": BearerMWFactory,-};--const middleware = async (req: any, res: Response, next: NextFunction) => {- console.log("Agent Auth Middleware");- const agent: any = req._agent;-- if (!agent) {- return res.status(500).send({ error: "Agent not found" });- }-- if (agent?.auth?.method && agent?.auth?.method != "none") {- console.log("Using agent-oauth middleware");-- // #region Get auth data from settings- const authFromSettings = await getAgentAuthData(agent.id);- const legacyAuthData = agent?.auth || {};- const authData = authFromSettings?.provider- ? authFromSettings- : legacyAuthData;- // #endregion-- const providerInfo = authData?.provider?.[authData?.method];- if (!providerInfo) {- console.warn(`Auth provider ${agent?.auth?.method} not configured`);- return res.status(401).send({ error: "Auth provider not configured" });- }-- const authProvider = providers[agent?.auth?.method];- const middleware = await authProvider(providerInfo, res);-- return middleware(req, res, next);- }-- next();-};--export default middleware;diff --git a/packages/runtime/src/modules/agent-runner/middlewares/agent-oauth.mw/oidc.ts b/packages/runtime/src/modules/agent-runner/middlewares/agent-oauth.mw/oidc.tsdeleted file mode 100644index 16abe8f7..00000000--- a/packages/runtime/src/modules/agent-runner/middlewares/agent-oauth.mw/oidc.ts+++ /dev/null@@ -1,309 +0,0 @@-import { NextFunction, Request, Response } from 'express';-import axios from 'axios';-import qs from 'qs';-import jwt from 'jsonwebtoken';-import jwksClient from 'jwks-rsa';--function isJWT(token) {- const parts = token.split('.');- if (parts.length === 3) {- try {- const header = JSON.parse(Buffer.from(parts[0], 'base64').toString('utf8'));- const payload = JSON.parse(Buffer.from(parts[1], 'base64').toString('utf8'));-- // Optionally, check if header contains typical JWT properties- if (header.alg && header.typ) {- return true;- }- } catch (error) {- // Errors in parsing mean this isn't a valid JWT- return false;- }- }- return false; // Not in JWT format if it doesn't have three parts-}--//FIXME : handle JWT tokens as well-const mwFactory = async (providerInfo: any, res: Response) => {- console.log('Agent Auth OIDC');- const authOIDCConfigURL = providerInfo.OIDCConfigURL;- const clientID = providerInfo.clientID;- const clientSecret = providerInfo.clientSecret;- const allowedEmails = (providerInfo.allowedEmails || []).filter((e: string) => e.trim());-- if (!authOIDCConfigURL || !clientID || !clientSecret) {- console.log('OIDC:Auth provider not configured');- return res.status(401).send({ error: 'Auth provider not configured' });- }-- const openid: any = await axios.get(authOIDCConfigURL).catch((error) => ({ error }));-- if (openid?.error) {- console.log('OIDC:Error getting OIDC config');- return res.status(401).send({ error: 'Error getting OIDC config' });- }-- const config = { openid: openid.data, clientID, clientSecret };-- let jwks;- function getKey(header, callback) {- jwks.getSigningKey(header.kid, function (err, key: any) {- const signingKey = key?.publicKey || key?.rsaPublicKey;- callback(null, signingKey);- });- }-- // Middleware to validate an opaque access token using the token introspection endpoint- const validateOpaqueTokenMiddleware = async (token, req: Request) => {- const auth = {- username: config.clientID,- password: config.clientSecret,- };- try {- // Send a POST request to the introspection endpoint- const response = await axios.post(- config.openid.introspection_endpoint,- qs.stringify({- token: token, // The token you want to introspect- // Optionally include token_type_hint: 'access_token' if needed- }),- {- // Basic Auth with the client ID and client secret- auth,- headers: {- 'Content-Type': 'application/x-www-form-urlencoded',- },- },- );-- //console.log('Token introspection response:', config.openid.introspection_endpoint, response.data);- // The introspection response will contain a boolean "active" field indicating validity- if (response.data && response.data.active) {- // Token is valid; you could attach token details to the request object if needed- const oidc_introspect_data = response.data; // This attaches the token data to the request object- //console.log('OIDC:Token introspection response:', oidc_introspect_data);-- try {- //TODO : cache this for a short time- const userInfo = await axios.get(config.openid.userinfo_endpoint, {- headers: {- Authorization: `Bearer ${token}`,- },- });-- //check if the user is allowed- console.log('OIDC:userinfo', userInfo?.data);-- if (allowedEmails.length > 0) {- const email = userInfo?.data?.email || '';- const domain = email.split('@')[1];- if (!allowedEmails.includes(email) && !allowedEmails.includes(domain)) {- console.log('OIDC:User not allowed', email, domain);- //the status code should be 403 here, but chatGPT goes in infinite loop if we use it.- return { error: 'OIDC:User not allowed', status: 200 };- }- }-- req['_agent_authinfo'] = { userinfo: userInfo?.data };-- return { error: null };- } catch (error) {- return { error: 'OIDC:userinfo failed', status: 401 };- }- } else {- // Token is not active- return { error: 'OIDC:Agent Access token is invalid or expired', status: 401 };- }- } catch (error) {- // Handle errors, such as network issues or the introspection endpoint being down- console.error('Token introspection error:', error);- return { error: 'OIDC:Internal server error during token validation', status: 500 };- }- };-- const validateJWTTokenMiddleware = async (token, req: Request) => {- if (!token) {- return res.status(401).json({ error: 'Access token is required' });- }-- // Check if token is a JWT- if (token.split('.').length === 3) {- // Token is a JWT, validate it- try {- const decoded = jwt.verify(token, getKey, {- algorithms: ['RS256'],- });-- console.log(decoded);- return { error: null };- } catch (err) {- return res.status(401).json({ error: 'Invalid JWT token' });- }- } else if (config.openid.introspection_endpoint) {- // Token is not a JWT, use introspection endpoint- try {- const response = await axios.post(- config.openid.introspection_endpoint,- qs.stringify({- token: token,- }),- {- auth: {- username: config.clientID,- password: config.clientSecret,- },- headers: {- 'Content-Type': 'application/x-www-form-urlencoded',- },- },- );-- if (response.data && response.data.active) {- return { error: null };- } else {- return { error: 'Access token is invalid or expired', status: 401 };- }- } catch (error) {- console.error('Token introspection error:', error);- return { error: 'Internal server error during token validation', status: 500 };- }- } else {- // No suitable method to validate the token- return { error: 'Unable to validate access token', status: 401 };- }- };-- const validateTokenMiddleware = async (req: Request, res: Response, next: NextFunction) => {- const token = req.headers['authorization']?.split(' ')[1] || req.query.token;- if (!token) {- console.log('OIDC:Access token is required');- return res.status(401).json({ error: 'Access token is required' });- }-- const isJWTToken = isJWT(token);-- if (isJWTToken) {- // Set up JWKS client using the JWKS URI from the OpenID configuration- jwks = jwksClient({- jwksUri: config.openid.jwks_uri,- });- const result: any = await validateJWTTokenMiddleware(token, req);- if (result.error) {- console.log('OIDC:JWT validation failed', result.error);- return res.status(result.status).json({ error: result.error });- }- return next();- } else {- const result: any = await validateOpaqueTokenMiddleware(token, req);- if (result.error) {- console.log('OIDC:Token validation failed', result.error);- return res.status(result.status).json({ error: result.error });- }- return next();- }- };- return validateTokenMiddleware;-};--export default mwFactory;--//TODO : test below updated code that handles jwt tokens as well-/*-import { NextFunction, Request, Response } from 'express';-import axios from 'axios';-import qs from 'qs';-import jwt from 'jsonwebtoken';-import jwksClient from 'jwks-rsa';--const mwFactory = async (providerInfo: any, res: Response) => {- const authOIDCConfigURL = providerInfo.OIDCConfigURL;- const clientID = providerInfo.clientID;- const clientSecret = providerInfo.clientSecret;-- if (!authOIDCConfigURL || !clientID || !clientSecret) {- return res.status(401).send({ error: 'Auth provider not configured' });- }-- const openid: any = await axios.get(authOIDCConfigURL).catch((error) => ({ error }));-- if (openid?.error) {- return res.status(401).send({ error: 'Error getting OIDC config' });- }-- const config = { openid: openid.data, clientID, clientSecret };-- // Set up JWKS client using the JWKS URI from the OpenID configuration- const jwks = jwksClient({- jwksUri: config.openid.jwks_uri,- });-- function getKey(header, callback) {- jwks.getSigningKey(header.kid, function (err, key) {- var signingKey = key.publicKey || key.rsaPublicKey;- callback(null, signingKey);- });- }-- // Middleware to validate an access token using JWT validation or token introspection endpoint- const validateTokenMiddleware = async (req: Request, res: Response, next: NextFunction) => {- const token = req.headers['authorization']?.split(' ')[1] || req.query.token;-- if (!token) {- return res.status(401).json({ error: 'Access token is required' });- }-- // Check if token is a JWT- if (token.split('.').length === 3) {- // Token is a JWT, validate it- try {- const decoded = jwt.verify(token, getKey, {- algorithms: ['RS256'],- });-- req.user = decoded; // This attaches the token data to the request object- return next(); // Proceed to the next middleware- } catch (err) {- return res.status(401).json({ error: 'Invalid JWT token' });- }- } else if (config.openid.introspection_endpoint) {- // Token is not a JWT, use introspection endpoint- try {- const response = await axios.post(- config.openid.introspection_endpoint,- qs.stringify({- token: token,- }),- {- auth: {- username: config.clientID,- password: config.clientSecret,- },- headers: {- 'Content-Type': 'application/x-www-form-urlencoded',- },- },- );-- if (response.data && response.data.active) {- req.user = response.data;- return next();- } else {- return res.status(401).json({ error: 'Access token is invalid or expired' });- }- } catch (error) {- console.error('Token introspection error:', error);- return res.status(500).json({ error: 'Internal server error during token validation' });- }- } else {- // No suitable method to validate the token- return res.status(401).json({ error: 'Unable to validate access token' });- }- };-- return validateTokenMiddleware;-};--export default mwFactory;---*/diff --git a/packages/runtime/src/modules/agent-runner/middlewares/agentLoader.mw.ts b/packages/runtime/src/modules/agent-runner/middlewares/agentLoader.mw.tsindex 4331c5c7..30c7e003 100644--- a/packages/runtime/src/modules/agent-runner/middlewares/agentLoader.mw.ts+++ b/packages/runtime/src/modules/agent-runner/middlewares/agentLoader.mw.ts@@ -1,29 +1,24 @@-import { ConnectorService, Logger } from "@smythos/sre";+import { ConnectorService, Logger } from '@smythos/sre';-import config from "@core/config";-import {- addDefaultComponentsAndConnections,- extractAgentVerionsAndPath,- getAgentDomainById,-} from "@core/helpers/agent.helper";+import config from '@core/config';+import { addDefaultComponentsAndConnections, extractAgentVerionsAndPath, getAgentDomainById } from '@core/helpers/agent.helper';-import { DEFAULT_FILE_PARSING_ENDPOINT } from "@agent-runner/constants";+import { DEFAULT_FILE_PARSING_ENDPOINT } from '@agent-runner/constants';-const console = Logger("(Agent Runner) Middleware: Agent Loader");+const console = Logger('(Agent Runner) Middleware: Agent Loader');export default async function agentLoader(req, res, next) {- console.log("agentLoader", req.path);+ console.log('agentLoader', req.path);const agentDataConnector = ConnectorService.getAgentDataConnector();- if (req.path.startsWith("/static/")) {+ if (req.path.startsWith('/static/')) {return next();}- let agentId = req.header("X-AGENT-ID");- let agentVersion = req.header("X-AGENT-VERSION") || "";- const isAgentChatRequest = req.header("x-conversation-id") !== undefined;- const isAgentFileParsingRequest =- isAgentChatRequest || req.header("X-AGENT-REMOTE-CALL") !== undefined;- let agentDomain: any = "";+ let agentId = req.header('X-AGENT-ID');+ const agentVersion = req.header('X-AGENT-VERSION') || '';+ const isAgentChatRequest = req.header('x-conversation-id') !== undefined;+ const isAgentFileParsingRequest = isAgentChatRequest || req.header('X-AGENT-REMOTE-CALL') !== undefined;+ let agentDomain: any = '';let isTestDomain = false;let { path, version } = extractAgentVerionsAndPath(req.path);if (!version) version = agentVersion;@@ -33,17 +28,15 @@ export default async function agentLoader(req, res, next) {try {const result = agentDataConnector?.getAgentIdByDomain?.(domain);- if (result && typeof result.catch === "function") {- agentId = await result.catch((error) => {+ if (result && typeof result.catch === 'function') {+ agentId = await result.catch(error => {console.error(error);});} else {- console.error(- "getAgentIdByDomain method is not available or does not return a promise"- );+ console.error('getAgentIdByDomain method is not available or does not return a promise');}} catch (error) {- console.error("Error calling getAgentIdByDomain:", error);+ console.error('Error calling getAgentIdByDomain:', error);}agentDomain = domain;if (agentId && domain.includes(config.env.DEFAULT_AGENT_DOMAIN)) {@@ -51,47 +44,40 @@ export default async function agentLoader(req, res, next) {}}if (agentId) {- if (!isTestDomain && agentId && req.hostname.includes("localhost")) {- console.log(- `Agent is running on localhost (${req.hostname}), assuming test domain`- );+ if (!isTestDomain && agentId && req.hostname.includes('localhost')) {+ console.log(`Agent is running on localhost (${req.hostname}), assuming test domain`);isTestDomain = true;}if (agentDomain && !isTestDomain && !version) {- //when using a production domain but no version is specified, use latest- version = "latest";+ // when using a production domain but no version is specified, use latest+ version = 'latest';}let agentData;try {const result = agentDataConnector?.getAgentData?.(agentId, version);- if (result && typeof result.catch === "function") {- agentData = await result.catch((error) => {+ if (result && typeof result.catch === 'function') {+ agentData = await result.catch(error => {console.error(error);return { error: error.message };});} else {- console.error(- "getAgentData method is not available or does not return a promise"- );- agentData = { error: "getAgentData method is not available" };+ console.error('getAgentData method is not available or does not return a promise');+ agentData = { error: 'getAgentData method is not available' };}} catch (error) {- console.error("Error calling getAgentData:", error);+ console.error('Error calling getAgentData:', error);agentData = { error: error.message };}if (agentData?.error) {// return Not found error for storage requests- if (req.path.startsWith("/storage/")) {+ if (req.path.startsWith('/storage/')) {return res.status(404).send(`File Not Found`);}return res.status(500).send({ error: agentData.error });}- if (- isAgentFileParsingRequest &&- path.startsWith(DEFAULT_FILE_PARSING_ENDPOINT)- ) {+ if (isAgentFileParsingRequest && path.startsWith(DEFAULT_FILE_PARSING_ENDPOINT)) {addDefaultComponentsAndConnections(agentData);}@@ -103,9 +89,7 @@ export default async function agentLoader(req, res, next) {req._agent.usingTestDomain = isTestDomain;req._agent.domain = agentDomain || (await getAgentDomainById(agentId));- console.log(- `Loaded Agent:${agentId} v=${version} path=${path} isTestDomain=${isTestDomain} domain=${agentDomain}`- );+ console.log(`Loaded Agent:${agentId} v=${version} path=${path} isTestDomain=${isTestDomain} domain=${agentDomain}`);return next();}@@ -116,9 +100,7 @@ export default async function agentLoader(req, res, next) {function cleanAgentData(agentData) {if (agentData) {// remove Note components- agentData.data.components = agentData.data.components.filter(- (c) => c.name != "Note"- );+ agentData.data.components = agentData.data.components.filter(c => c.name != 'Note');// remove templateInfodelete agentData.data?.templateInfo;diff --git a/packages/runtime/src/modules/agent-runner/middlewares/index.ts b/packages/runtime/src/modules/agent-runner/middlewares/index.tsdeleted file mode 100644index 45f994fa..00000000--- a/packages/runtime/src/modules/agent-runner/middlewares/index.ts+++ /dev/null@@ -1,52 +0,0 @@-import { NextFunction, Response } from "express";--import { Logger } from "@smythos/sre";--import { getAgentAuthData } from "@core/helpers/agent.helper";--import BearerMWFactory from "./agent-oauth.mw/bearer";-import OIDCMWFactory from "./agent-oauth.mw/oidc";--const console = Logger("(Agent Runner) Middleware: Index");--//this maps to agent.auth.provider entry, the selected provider is stored in agent.auth.method-const providers = {- "oauth-oidc": OIDCMWFactory,- "api-key-bearer": BearerMWFactory,-};--const middleware = async (req: any, res: Response, next: NextFunction) => {- console.log("Agent Auth Middleware");- const agent: any = req._agent;-- if (!agent) {- return res.status(500).send({ error: "Agent not found" });- }-- if (agent?.auth?.method && agent?.auth?.method != "none") {- console.log("Using agent-oauth middleware");-- // #region Get auth data from settings- const authFromSettings = await getAgentAuthData(agent.id);- const legacyAuthData = agent?.auth || {};- const authData = authFromSettings?.provider- ? authFromSettings- : legacyAuthData;- // #endregion-- const providerInfo = authData?.provider?.[authData?.method];- if (!providerInfo) {- console.warn(`Auth provider ${agent?.auth?.method} not configured`);- return res.status(401).send({ error: "Auth provider not configured" });- }-- const authProvider = providers[agent?.auth?.method];- const middleware = await authProvider(providerInfo, res);-- return middleware(req, res, next);- }-- next();-};--export default middleware;diff --git a/packages/runtime/src/modules/agent-runner/routes/_oauth/router.ts b/packages/runtime/src/modules/agent-runner/routes/_oauth/router.tsindex 9350eda2..043036b2 100644--- a/packages/runtime/src/modules/agent-runner/routes/_oauth/router.ts+++ b/packages/runtime/src/modules/agent-runner/routes/_oauth/router.ts@@ -1,20 +1,20 @@-import axios from "axios";-import express, { Request, Response } from "express";-import querystring from "querystring";+import axios from 'axios';+import express, { Request, Response } from 'express';+import querystring from 'querystring';-import { readAgentOAuthConfig } from "@core/helpers/agent.helper";+import { readAgentOAuthConfig } from '@core/helpers/agent.helper';-import agentLoader from "@agent-runner/middlewares/agentLoader.mw";+import agentLoader from '@agent-runner/middlewares/agentLoader.mw';const router = express.Router();router.use(agentLoader);// @ts-ignore-router.get("/authorize", async (req: Request, res: Response) => {- //@ts-ignore+router.get('/authorize', async (req: Request, res: Response) => {+ // @ts-ignoreconst agent: Agent = req._agent;if (!agent) {- return res.status(404).json({ error: "Agent not found" });+ return res.status(404).json({ error: 'Agent not found' });}const authInfo = await readAgentOAuthConfig(agent);const authorizationURL = authInfo.authorizationURL;@@ -23,31 +23,31 @@ router.get("/authorize", async (req: Request, res: Response) => {const client_secret = authInfo.clientSecret;if (!client_id || !client_secret) {- return res.status(404).json({ error: "Agent not configured for OAuth" });+ return res.status(404).json({ error: 'Agent not configured for OAuth' });}- console.log("OIDC:AUTHORIZE", req.query);+ console.log('OIDC:AUTHORIZE', req.query);const query: any = {...req.query,client_id,- prompt: "consent",- scope: req.query.scope || "openid offline_access profile email",+ prompt: 'consent',+ scope: req.query.scope || 'openid offline_access profile email',};- console.log("OIDC:AUTHORIZE PATCHED for OIDC", query);+ console.log('OIDC:AUTHORIZE PATCHED for OIDC', query);// Here, we maintain the original query parameters in the redirectionconst redirectUrl = new URL(authorizationURL);redirectUrl.search = new URLSearchParams(query).toString();- console.log("OIDC:AUTHORIZE redir URL", redirectUrl.href);+ console.log('OIDC:AUTHORIZE redir URL', redirectUrl.href);res.redirect(redirectUrl.href);});// @ts-ignore-router.post("/token", async (req: Request, res: Response) => {+router.post('/token', async (req: Request, res: Response) => {// @ts-ignoreconst agent: Agent = req._agent;if (!agent) {- return res.status(404).json({ error: "Agent not found" });+ return res.status(404).json({ error: 'Agent not found' });}const authInfo = await readAgentOAuthConfig(agent);const authorizationURL = authInfo.authorizationURL;@@ -56,23 +56,23 @@ router.post("/token", async (req: Request, res: Response) => {const client_secret = authInfo.clientSecret;if (!client_id || !client_secret) {- return res.status(404).json({ error: "Agent not configured for OAuth" });+ return res.status(404).json({ error: 'Agent not configured for OAuth' });}- console.log("OIDC:TOKEN", req.body);+ console.log('OIDC:TOKEN', req.body);const data = { ...req.body, client_id, client_secret };- console.log("OIDC:TOKEN Patched for OIDC", data);+ console.log('OIDC:TOKEN Patched for OIDC', data);try {const result = await axios.post(tokenUrl, querystring.stringify(data), {headers: {- "Content-Type": "application/x-www-form-urlencoded",+ 'Content-Type': 'application/x-www-form-urlencoded',},});- console.log("OIDC:AUTH", result.data);+ console.log('OIDC:AUTH', result.data);res.json(result.data);} catch (error: any) {if (error?.response?.status === 400) {- console.log("OIDC:AUTH ERROR status 400", error?.response?.data);+ console.log('OIDC:AUTH ERROR status 400', error?.response?.data);return res.status(400).json(error?.response?.data);// const fakeToken = {// access_token: '0000401-' + req.body.refresh_token,@@ -84,8 +84,8 @@ router.post("/token", async (req: Request, res: Response) => {// };// return res.status(200).json(fakeToken);}- console.log("OIDC:AUTH ERROR 500", error);- res.status(500).json({ message: "An error occurred" });+ console.log('OIDC:AUTH ERROR 500', error);+ res.status(500).json({ message: 'An error occurred' });}});diff --git a/packages/runtime/src/modules/agent-runner/routes/agent/router.ts b/packages/runtime/src/modules/agent-runner/routes/agent/router.tsindex 1741c258..a5136450 100644--- a/packages/runtime/src/modules/agent-runner/routes/agent/router.ts+++ b/packages/runtime/src/modules/agent-runner/routes/agent/router.ts@@ -1,12 +1,9 @@-import agentLoader from "@agent-runner/middlewares/agentLoader.mw";-import { processAgentRequest } from "@agent-runner/services/agent-request-handler";+import agentLoader from '@agent-runner/middlewares/agentLoader.mw';+import { processAgentRequest } from '@agent-runner/services/agent-request-handler';-import { uploadHandler } from "@core/middlewares/uploadHandler.mw";-import { createAgentRunnerRouter } from "@core/shared-agent-router";+import { createAgentRunnerRouter } from '@core/shared-agent-router';-/* agentLoader must come before agentAuth because agentAuth relies on req._agent, set by agentLoader.-Also, uploadHandler should precede agentLoader to parse multipart/form-data correctly */-const middlewares = [uploadHandler, agentLoader];+const middlewares = [agentLoader];const router = createAgentRunnerRouter(middlewares, processAgentRequest);diff --git a/packages/runtime/src/modules/agent-runner/services/BillingError.class.ts b/packages/runtime/src/modules/agent-runner/services/BillingError.class.tsdeleted file mode 100644index 15fbf081..00000000--- a/packages/runtime/src/modules/agent-runner/services/BillingError.class.ts+++ /dev/null@@ -1,14 +0,0 @@-export class BillingError extends Error {- code: string;- status: number;-- constructor(message: string, code: string = 'BILLING_LIMIT_REACHED', status: number = 402) {- super(message);- this.status = status;- this.code = code;- this.name = 'BillingError';-- // Fix prototype chain for proper instanceof behavior with custom Error classes- Object.setPrototypeOf(this, new.target.prototype);- }-}diff --git a/packages/runtime/src/modules/agent-runner/services/agent-request-handler.ts b/packages/runtime/src/modules/agent-runner/services/agent-request-handler.tsindex 962914c6..58a282ea 100644--- a/packages/runtime/src/modules/agent-runner/services/agent-request-handler.ts+++ b/packages/runtime/src/modules/agent-runner/services/agent-request-handler.ts@@ -1,30 +1,25 @@-import { Request } from "express";+import { Request } from 'express';-import { AgentProcess, Logger } from "@smythos/sre";+import { AgentProcess, Logger } from '@smythos/sre';-const console = Logger("(Agent Runner) Service: Agent Request Handler");+const console = Logger('(Agent Runner) Service: Agent Request Handler');export async function processAgentRequest(agent: any, req: Request) {if (!agent) {- return { status: 404, data: "Agent not found" };+ return { status: 404, data: 'Agent not found' };}- //const req = agent.agentRequest;+ // const req = agent.agentRequest;- req.socket.on("close", () => {+ req.socket.on('close', () => {// console.log('Client socket closed, killing agent');// Handle the cancellation logic// agent.kill();});- const hasDebugHeader = [- "X-DEBUG-RUN",- "X-DEBUG-READ",- "X-DEBUG-INJ",- "X-DEBUG-STOP",- ].some((header) => req.header(header));+ const hasDebugHeader = ['X-DEBUG-RUN', 'X-DEBUG-READ', 'X-DEBUG-INJ', 'X-DEBUG-STOP'].some(header => req.header(header));if (hasDebugHeader) {- return { status: 403, data: "Debug functions are not supported" };+ return { status: 403, data: 'Debug functions are not supported' };}return runAgentProcess(agent, req);@@ -32,12 +27,12 @@ export async function processAgentRequest(agent: any, req: Request) {async function runAgentProcess(agent: any, req: any) {try {- //extract endpoint path- //live agents (dev) do not have a version number- //deployed agents have a version number+ // extract endpoint path+ // live agents (dev) do not have a version number+ // deployed agents have a version numberconst pathMatches = req.path.match(/(^\/v[0-9]+\.[0-9]+?)?(\/api\/(.+)?)/);if (!pathMatches || !pathMatches[2]) {- return { status: 404, data: { error: "Endpoint not found" } };+ return { status: 404, data: { error: 'Endpoint not found' } };}const { data: result } = await AgentProcess.load(req._agent)@@ -46,10 +41,10 @@ async function runAgentProcess(agent: any, req: any) {path: req.path,url: undefined,})- .catch((error) => ({ data: { error: error.toString() } }));+ .catch(error => ({ data: { error: error.toString() } }));if (result.error) {- console.error("ERROR", result.error);+ console.error('ERROR', result.error);return {status: 500,data: {@@ -69,7 +64,7 @@ async function runAgentProcess(agent: any, req: any) {return { status: error.response.status, data: error.response.data };} else {// Some other error occurred- return { status: 500, data: "Internal Server Error" };+ return { status: 500, data: 'Internal Server Error' };}}}diff --git a/packages/runtime/src/modules/debugger/middlewares/agentLoader.mw.ts b/packages/runtime/src/modules/debugger/middlewares/agentLoader.mw.tsindex 9763dc69..5c934b67 100644--- a/packages/runtime/src/modules/debugger/middlewares/agentLoader.mw.ts+++ b/packages/runtime/src/modules/debugger/middlewares/agentLoader.mw.ts@@ -1,33 +1,28 @@-import { ConnectorService, Logger } from "@smythos/sre";+import { ConnectorService, Logger } from '@smythos/sre';-import config from "@core/config";-import {- addDefaultComponentsAndConnections,- extractAgentVerionsAndPath,- getAgentDomainById,-} from "@core/helpers/agent.helper";+import config from '@core/config';+import { addDefaultComponentsAndConnections, extractAgentVerionsAndPath, getAgentDomainById } from '@core/helpers/agent.helper';-const console = Logger("[Debugger] Middleware: agentLoader");+const console = Logger('[Debugger] Middleware: agentLoader');export default async function agentLoader(req, res, next) {- console.log("agentLoader", req.path);+ console.log('agentLoader', req.path);const agentDataConnector = ConnectorService.getAgentDataConnector();- if (req.path.startsWith("/static/")) {+ if (req.path.startsWith('/static/')) {return next();}- let agentId = req.header("X-AGENT-ID");- let agentVersion = req.header("X-AGENT-VERSION") || "";- const isAgentChatRequest = req.header("x-conversation-id") !== undefined;- const isAgentFileParsingRequest =- isAgentChatRequest || req.header("X-AGENT-REMOTE-CALL") !== undefined;+ let agentId = req.header('X-AGENT-ID');+ const agentVersion = req.header('X-AGENT-VERSION') || '';+ const isAgentChatRequest = req.header('x-conversation-id') !== undefined;+ const isAgentFileParsingRequest = isAgentChatRequest || req.header('X-AGENT-REMOTE-CALL') !== undefined;const debugHeader =- req.header("X-DEBUG-STOP") !== undefined ||- req.header("X-DEBUG-RUN") !== undefined ||- req.header("X-DEBUG-INJ") !== undefined ||- req.header("X-DEBUG-READ") !== undefined;+ req.header('X-DEBUG-STOP') !== undefined ||+ req.header('X-DEBUG-RUN') !== undefined ||+ req.header('X-DEBUG-INJ') !== undefined ||+ req.header('X-DEBUG-READ') !== undefined;- let agentDomain: any = "";+ let agentDomain: any = '';let isTestDomain = false;let { path, version } = extractAgentVerionsAndPath(req.path);if (!version) version = agentVersion;@@ -37,17 +32,15 @@ export default async function agentLoader(req, res, next) {if (!agentId) {try {const result = agentDataConnector?.getAgentIdByDomain?.(domain);- if (result && typeof result.catch === "function") {- agentId = await result.catch((error) => {+ if (result && typeof result.catch === 'function') {+ agentId = await result.catch(error => {console.error(error);});} else {- console.error(- "getAgentIdByDomain method is not available or does not return a promise"- );+ console.error('getAgentIdByDomain method is not available or does not return a promise');}} catch (error) {- console.error("Error calling getAgentIdByDomain:", error);+ console.error('Error calling getAgentIdByDomain:', error);}}agentDomain = domain;@@ -55,49 +48,42 @@ export default async function agentLoader(req, res, next) {isTestDomain = true;}if (agentId) {- if (!isTestDomain && agentId && req.hostname.includes("localhost")) {- console.log(- `Host ${req.hostname} is using debug session. Assuming test domain`- );+ if (!isTestDomain && agentId && req.hostname.includes('localhost')) {+ console.log(`Host ${req.hostname} is using debug session. Assuming test domain`);isTestDomain = true;}if (agentDomain && !isTestDomain && !version && !debugHeader) {- //when using a production domain but no version is specified, use latest- version = "latest";+ // when using a production domain but no version is specified, use latest+ version = 'latest';}let agentData;try {const result = agentDataConnector?.getAgentData?.(agentId, version);- if (result && typeof result.catch === "function") {- agentData = await result.catch((error) => {+ if (result && typeof result.catch === 'function') {+ agentData = await result.catch(error => {console.error(error);return { error: error.message };});} else {- console.error(- "getAgentData method is not available or does not return a promise"- );- agentData = { error: "getAgentData method is not available" };+ console.error('getAgentData method is not available or does not return a promise');+ agentData = { error: 'getAgentData method is not available' };}} catch (error) {- console.error("Error calling getAgentData:", error);+ console.error('Error calling getAgentData:', error);agentData = { error: error.message };}if (agentData?.error) {// return Not found error for storage requests- if (req.path.startsWith("/storage/")) {+ if (req.path.startsWith('/storage/')) {return res.status(404).send(`File Not Found`);}return res.status(500).send({ error: agentData.error });}- if (- isAgentFileParsingRequest &&- path.startsWith("/api/process_attachment_fallback")- ) {+ if (isAgentFileParsingRequest && path.startsWith('/api/process_attachment_fallback')) {// only add default components and connections for file parsing agent on file parsing requestsaddDefaultComponentsAndConnections(agentData);- req.headers["x-debug-skip"] = "true"; // should be lowercase+ req.headers['x-debug-skip'] = 'true'; // should be lowercase}// clean up agent data@@ -106,18 +92,14 @@ export default async function agentLoader(req, res, next) {req._agent = agentData.data;if (!isTestDomain && req._agent.debugSessionEnabled && debugHeader) {- console.log(- `Host ${req.hostname} is using debug session. Assuming test domain.#2`- );+ console.log(`Host ${req.hostname} is using debug session. Assuming test domain.#2`);isTestDomain = true;}req._agent.usingTestDomain = isTestDomain;req._agent.domain = agentDomain || (await getAgentDomainById(agentId));- console.log(- `Loaded Agent:${agentId} v=${version} path=${path} isTestDomain=${isTestDomain} domain=${agentDomain}`- );+ console.log(`Loaded Agent:${agentId} v=${version} path=${path} isTestDomain=${isTestDomain} domain=${agentDomain}`);return next();}@@ -127,9 +109,7 @@ export default async function agentLoader(req, res, next) {function cleanAgentData(agentData) {if (agentData) {// remove Note components- agentData.data.components = agentData.data.components.filter(- (c) => c.name != "Note"- );+ agentData.data.components = agentData.data.components.filter(c => c.name != 'Note');// remove templateInfodelete agentData.data?.templateInfo;diff --git a/packages/runtime/src/modules/debugger/middlewares/teamAccessCheck.mw.ts b/packages/runtime/src/modules/debugger/middlewares/teamAccessCheck.mw.tsindex 431588aa..fac6c19e 100644--- a/packages/runtime/src/modules/debugger/middlewares/teamAccessCheck.mw.ts+++ b/packages/runtime/src/modules/debugger/middlewares/teamAccessCheck.mw.ts@@ -1,41 +1,39 @@-import { Logger } from "@smythos/sre";+import { Logger } from '@smythos/sre';-import { mwUserAPI } from "@core/services/smythAPIReq";+import { mwUserAPI } from '@core/services/smythAPIReq';-const console = Logger("(Debugger) Middleware: Team Access Check");+const console = Logger('(Debugger) Middleware: Team Access Check');export async function teamAccessCheck(req, res, next) {- let teamId = req.params.teamId;- const accessToken = req.header("Authorization")- ? req.header("Authorization").split(" ")[1]- : null;+ const teamId = req.params.teamId;+ const accessToken = req.header('Authorization') ? req.header('Authorization').split(' ')[1] : null;if (!accessToken) {- return res.status(401).send({ error: "Unauthorized" });+ return res.status(401).send({ error: 'Unauthorized' });}if (!teamId) {- console.error("Team ID is required");- return res.status(400).send({ error: "Team ID is required" });+ console.error('Team ID is required');+ return res.status(400).send({ error: 'Team ID is required' });}try {const result = await mwUserAPI.get(`/teams/me`, {headers: {Authorization: `Bearer ${accessToken}`,- "x-smyth-team-id": teamId,+ 'x-smyth-team-id': teamId,},});const team = result?.data?.team || {};if (teamId !== team?.id) {- return res.status(401).send({ error: "Unauthorized" });+ return res.status(401).send({ error: 'Unauthorized' });}next();} catch (err) {console.error(err);- return res.status(401).send({ error: "Unauthorized" });+ return res.status(401).send({ error: 'Unauthorized' });}}diff --git a/packages/runtime/src/modules/debugger/routes/agent/routes.ts b/packages/runtime/src/modules/debugger/routes/agent/routes.tsindex a695569c..449c96f1 100644--- a/packages/runtime/src/modules/debugger/routes/agent/routes.ts+++ b/packages/runtime/src/modules/debugger/routes/agent/routes.ts@@ -1,14 +1,8 @@-import { uploadHandler } from "@core/middlewares/uploadHandler.mw";-import { createDebuggerRouter } from "@core/shared-agent-router";-import agentLoader from "@debugger/middlewares/agentLoader.mw";-import {- createSseConnection,- getDebugSession,- processAgentRequest,-} from "@debugger/services/agent-request-handler";+import { createDebuggerRouter } from '@core/shared-agent-router';+import agentLoader from '@debugger/middlewares/agentLoader.mw';+import { createSseConnection, getDebugSession, processAgentRequest } from '@debugger/services/agent-request-handler';-/* uploadHandler should precede agentLoader to parse multipart/form-data correctly */-const middlewares = [uploadHandler, agentLoader];+const middlewares = [agentLoader];const router = createDebuggerRouter(middlewares, processAgentRequest, {getDebugSession,diff --git a/packages/runtime/src/modules/debugger/routes/models/router.ts b/packages/runtime/src/modules/debugger/routes/models/router.tsindex 7b0928bd..801eee19 100644--- a/packages/runtime/src/modules/debugger/routes/models/router.ts+++ b/packages/runtime/src/modules/debugger/routes/models/router.ts@@ -1,33 +1,28 @@-import { createHash } from "crypto";-import express, { Response } from "express";+import { createHash } from 'crypto';+import express, { Response } from 'express';-import {- AccessCandidate,- ConnectorService,- Logger,- ModelsProviderConnector,-} from "@smythos/sre";+import { AccessCandidate, ConnectorService, Logger, ModelsProviderConnector } from '@smythos/sre';-import { teamAccessCheck } from "@debugger/middlewares/teamAccessCheck.mw";+import { teamAccessCheck } from '@debugger/middlewares/teamAccessCheck.mw';-const console = Logger("[Builder] Router: Models");+const console = Logger('[Builder] Router: Models');const router = express.Router();// Constants-const MODELS_HASH_KEY = "models_content_hash";+const MODELS_HASH_KEY = 'models_content_hash';-router.head("/", async (req, res, next) => {+router.head('/', async (req, res, next) => {try {const modelsHash = await getModelsHash();- res.setHeader("x-models-hash", modelsHash);+ res.setHeader('x-models-hash', modelsHash);res.status(200).send();} catch (error) {handleError(error, res);}});-router.get("/", async (req, res, next) => {+router.get('/', async (req, res, next) => {try {const models = await getModels();const modelsHash = await getModelsHash();@@ -37,26 +32,26 @@ router.get("/", async (req, res, next) => {const cacheConnector = ConnectorService.getCacheConnector();// We are intentionally not awaiting this operation, as updating the model hash does not need to block the response.cacheConnector- .user(AccessCandidate.user("system-smyth"))+ .user(AccessCandidate.user('system-smyth'))?.set(MODELS_HASH_KEY, modelsHash)- .catch((err) => {- console.warn("Updating models hash cache error:", err?.message || err);+ .catch(err => {+ console.warn('Updating models hash cache error:', err?.message || err);});// #endregion Cache model hash- res.setHeader("x-models-hash", modelsHash);+ res.setHeader('x-models-hash', modelsHash);res.status(200).send(models);} catch (error) {handleError(error, res);}});-router.get("/custom/:teamId", teamAccessCheck, async (req, res, next) => {+router.get('/custom/:teamId', teamAccessCheck, async (req, res, next) => {try {const teamId = req.params.teamId;if (!teamId) {- return res.status(400).send({ error: "Team ID is required" });+ return res.status(400).send({ error: 'Team ID is required' });}const models = await getCustomModels(teamId);@@ -68,11 +63,8 @@ router.get("/custom/:teamId", teamAccessCheck, async (req, res, next) => {});async function getCustomModels(teamId: string): Promise<Record<string, any>> {- const modelsProviderConnector: ModelsProviderConnector =- ConnectorService.getModelsProviderConnector();- const modelProviderCandidate = modelsProviderConnector.requester(- AccessCandidate.team(teamId)- );+ const modelsProviderConnector: ModelsProviderConnector = ConnectorService.getModelsProviderConnector();+ const modelProviderCandidate = modelsProviderConnector.requester(AccessCandidate.team(teamId));const models = await modelProviderCandidate.getCustomModels();return models;}@@ -80,11 +72,8 @@ async function getCustomModels(teamId: string): Promise<Record<string, any>> {// Helper functionsasync function getModels(): Promise<Record<string, any>> {- const modelsProviderConnector: ModelsProviderConnector =- ConnectorService.getModelsProviderConnector();- const modelProviderCandidate = modelsProviderConnector.requester(- AccessCandidate.user("system-smyth")- );+ const modelsProviderConnector: ModelsProviderConnector = ConnectorService.getModelsProviderConnector();+ const modelProviderCandidate = modelsProviderConnector.requester(AccessCandidate.user('system-smyth'));const models = await modelProviderCandidate.getModels();return models;}@@ -92,16 +81,16 @@ async function getModels(): Promise<Record<string, any>> {async function getModelsHash(): Promise<string> {const models = await getModels();const modelsString = JSON.stringify(models);- const hash = createHash("sha256").update(modelsString).digest("hex");+ const hash = createHash('sha256').update(modelsString).digest('hex');return hash;}function handleError(error: any, res: Response): void {- console.warn("Error in models route:", error);+ console.warn('Error in models route:', error);const status = error.status || 500;- const message = error.message || "Internal server error";+ const message = error.message || 'Internal server error';res.status(status).send({ error: message });}diff --git a/packages/runtime/src/modules/debugger/services/agent-request-handler.ts b/packages/runtime/src/modules/debugger/services/agent-request-handler.tsindex b7108ed1..fcce3749 100644--- a/packages/runtime/src/modules/debugger/services/agent-request-handler.ts+++ b/packages/runtime/src/modules/debugger/services/agent-request-handler.ts@@ -1,39 +1,25 @@-import axios from "axios";-import { Request } from "express";+import axios from 'axios';+import { Request } from 'express';-import { AgentProcess, Logger } from "@smythos/sre";+import { AgentProcess, Logger } from '@smythos/sre';-import config from "@/core/config";-import { getMockData } from "@core/helpers/agent.helper";+import config from '@/core/config';+import { getMockData } from '@core/helpers/agent.helper';-const console = Logger("Service: Agent Request Handler");+const console = Logger('Service: Agent Request Handler');-const debugPromises: any = {}; //TODO : persist this ?-export const sseConnections = new Map();+const debugPromises: any = {}; // TODO : persist this ?+const sseConnections = new Map();export function getDebugSession(id) {- console.log(- `Getting debug session for agent ${id} with session id ${debugPromises[id]?.dbgSession}`- );- console.log(- `Session exists: ${- debugPromises[id] ? "Yes" : "No"- } and session.dbgSession exists: ${- debugPromises[id]?.dbgSession ? "Yes" : "No"- }`- );- console.log(- `Debug sessions found for the following agents: ${Object.keys(- debugPromises- ).join(", ")}`- );+ console.log(`Getting debug session for agent ${id} with session id ${debugPromises[id]?.dbgSession}`);+ console.log(`Session exists: ${debugPromises[id] ? 'Yes' : 'No'} and session.dbgSession exists: ${debugPromises[id]?.dbgSession ? 'Yes' : 'No'}`);+ console.log(`Debug sessions found for the following agents: ${Object.keys(debugPromises).join(', ')}`);return debugPromises[id]?.dbgSession;}export function createSseConnection(req: any) {- const sseId =- Math.random().toString(36).substring(2, 15) +- Math.random().toString(36).substring(2, 15);+ const sseId = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);const INACTIVITY_TIMEOUT = 60 * 60 * 1000; // 1 hourconst res = req.res;const connection = { res, timeout: null };@@ -57,7 +43,7 @@ export function createSseConnection(req: any) {};// Clean up when the client disconnects- req.on("close", () => {+ req.on('close', () => {console.log(`Client disconnected: ${sseId}`);sseConnections.delete(sseId);res.end();@@ -70,25 +56,25 @@ export async function processAgentRequest(agentId: string, req: any) {const agentProcess = AgentProcess.load(req._agent);if (!agentProcess) {- return { status: 404, data: "Agent not found" };+ return { status: 404, data: 'Agent not found' };}await agentProcess.ready();- //const req = agent.agentRequest;+ // const req = agent.agentRequest;- req.socket.on("close", () => {+ req.socket.on('close', () => {// console.log('Client socket closed, killing agent');// Handle the cancellation logic- //agentProcess.agent.kill();+ // agentProcess.agent.kill();});- const skipDebug = typeof req.header("X-DEBUG-SKIP") != "undefined";- const monitorIds = req.header("X-MONITOR-ID")+ const skipDebug = typeof req.header('X-DEBUG-SKIP') != 'undefined';+ const monitorIds = req.header('X-MONITOR-ID')? new Set<string>(req- .header("X-MONITOR-ID")- .split(",")- .map((id: string) => id.trim())+ .header('X-MONITOR-ID')+ .split(',')+ .map((id: string) => id.trim()),): undefined;if (monitorIds) {@@ -100,7 +86,7 @@ export async function processAgentRequest(agentId: string, req: any) {}}- const readStateId: string = req.header("X-DEBUG-READ") || "";+ const readStateId: string = req.header('X-DEBUG-READ') || '';if (readStateId) {try {const result = await agentProcess.readDebugState(readStateId, {@@ -114,7 +100,7 @@ export async function processAgentRequest(agentId: string, req: any) {return { status: 200, data: result };} catch (error: any) {console.error(error);- return { status: 400, data: "Agent State Unavailable" };+ return { status: 400, data: 'Agent State Unavailable' };}}@@ -124,10 +110,10 @@ export async function processAgentRequest(agentId: string, req: any) {startLiveDebug =req._agent.usingTestDomain &&req._agent.debugSessionEnabled &&- typeof req.header("X-DEBUG-RUN") == "undefined" &&- typeof req.header("X-DEBUG-read") == "undefined" &&- typeof req.header("X-DEBUG-INJ") == "undefined" &&- typeof req.header("X-DEBUG-STOP") == "undefined";+ typeof req.header('X-DEBUG-RUN') == 'undefined' &&+ typeof req.header('X-DEBUG-read') == 'undefined' &&+ typeof req.header('X-DEBUG-INJ') == 'undefined' &&+ typeof req.header('X-DEBUG-STOP') == 'undefined';}// #region[mock_data]@@ -151,21 +137,21 @@ export async function processAgentRequest(agentId: string, req: any) {}}} catch (error) {- console.warn("Error getting mock data", error);+ console.warn('Error getting mock data', error);}// When we have mock data to inject, we need to set the x-mock-data-inj headerif (body?.length > 0) {- req.headers["x-mock-data-inj"] = "";+ req.headers['x-mock-data-inj'] = '';}// If the body is an empty object, we need to convert it to an arrayconst existingBody = Object.keys(req.body).length === 0 ? [] : req.body;if (Array.isArray(existingBody)) {- const existingComponentIds = existingBody?.map((item) => item.id) || [];+ const existingComponentIds = existingBody?.map(item => item.id) || [];- body = body.filter((item) => !existingComponentIds.includes(item.id));+ body = body.filter(item => !existingComponentIds.includes(item.id));req.body = [...existingBody, ...body];}@@ -179,42 +165,36 @@ export async function processAgentRequest(agentId: string, req: any) {}}-async function runAgentProcess(- agentId: string,- agentProcess: AgentProcess,- req: any-) {+async function runAgentProcess(agentId: string, agentProcess: AgentProcess, req: any) {try {- //const req = agent.agentRequest;+ // const req = agent.agentRequest;const debugPromiseId = `${agentId}`;- if (req.header("X-DEBUG-STOP")) {+ if (req.header('X-DEBUG-STOP')) {if (debugPromises[debugPromiseId]) {- console.log(- `Debug session for agent ${agentId} with session id ${debugPromiseId} stopped because of X-DEBUG-STOP header. DELETING PROMISE`- );+ console.log(`Debug session for agent ${agentId} with session id ${debugPromiseId} stopped because of X-DEBUG-STOP header. DELETING PROMISE`);const dbgPromise: any = debugPromises[debugPromiseId];delete debugPromises[debugPromiseId];- dbgPromise.resolve({ status: 400, error: "Debug Session Stopped" });+ dbgPromise.resolve({ status: 400, error: 'Debug Session Stopped' });}}- //at this point dbgPromise might not exist yet+ // at this point dbgPromise might not exist yetlet dbgPromise = debugPromises[debugPromiseId];if (dbgPromise?.sse) {- //this sse was set by the runAgentDebug() function- //we need to propagate it in order to capture each execution step stream in the same SSE monitor+ // this sse was set by the runAgentDebug() function+ // we need to propagate it in order to capture each execution step stream in the same SSE monitoragentProcess.agent.addSSE(dbgPromise.sse);}- //extract endpoint path- //live agents (dev) do not have a version number- //deployed agents have a version number+ // extract endpoint path+ // live agents (dev) do not have a version number+ // deployed agents have a version numberconst pathMatches = req.path.match(/(^\/v[0-9]+\.[0-9]+?)?(\/api\/(.+)?)/);if (!pathMatches || !pathMatches[2]) {- return { status: 404, data: { error: "Endpoint not found" } };+ return { status: 404, data: { error: 'Endpoint not found' } };}const endpointPath = pathMatches[2];- const input = req.method == "GET" ? req.query : req.body;+ const input = req.method == 'GET' ? req.query : req.body;// const result: any = await agent.process(endpointPath, input).catch((error) => ({ error }));const { data: result } = await agentProcess@@ -224,33 +204,33 @@ async function runAgentProcess(url: undefined,headers: {...req.headers,- //'X-DEBUG-RUN': '',+ // 'X-DEBUG-RUN': '',},})- .catch((error) => ({ data: { error: error.toString() } }));+ .catch(error => ({ data: { error: error.toString() } }));if (result.error) {- console.error("ERROR", result.error);- //res.status(500).json({ ...result, error: result.error.toString(), agentId: agent.id, agentName: agent.name });+ console.error('ERROR', result.error);+ // res.status(500).json({ ...result, error: result.error.toString(), agentId: agent.id, agentName: agent.name });return {status: 500,data: {...result,error: result.error.toString(),- agentId: agentId,+ agentId,// agentName: agent?.nameagentName: undefined,},};}- //handle API embodiments debug response- const dbgSession = result?.dbgSession || result?.expiredDbgSession || "";+ // handle API embodiments debug response+ const dbgSession = result?.dbgSession || result?.expiredDbgSession || '';dbgPromise = debugPromises[debugPromiseId];if (dbgSession && dbgPromise) {if (result.finalResult) {- //const result = debugPromises[agent.id].result;+ // const result = debugPromises[agent.id].result;console.log(- `Debug session for agent ${agentId} with session id ${debugPromiseId} resolved since the final result is available. DELETING PROMISE`+ `Debug session for agent ${agentId} with session id ${debugPromiseId} resolved since the final result is available. DELETING PROMISE`,);delete debugPromises[debugPromiseId];@@ -265,34 +245,29 @@ async function runAgentProcess(return { status: error.response.status, data: error.response.data };} else {// Some other error occurred- return { status: 500, data: "Internal Server Error" };+ return { status: 500, data: 'Internal Server Error' };}}}-async function runAgentDebug(- agentId: string,- agentProcess: AgentProcess,- req: Request-) {+async function runAgentDebug(agentId: string, agentProcess: AgentProcess, req: Request) {try {- //const req = agent.agentRequest;+ // const req = agent.agentRequest;const debugPromiseId = `${agentId}`;- const excludedHeaders = ["host", "content-length", "accept-encoding"];+ const excludedHeaders = ['host', 'content-length', 'accept-encoding'];const headers = Object.keys(req.headers)- .filter((header) => !excludedHeaders.includes(header.toLowerCase()))+ .filter(header => !excludedHeaders.includes(header.toLowerCase())).reduce((obj, header) => {- obj[header] = req.headers[header];- return obj;+ return { ...obj, [header]: req.headers[header] };}, {});- headers["X-AGENT-ID"] = agentId;- headers["X-DEBUG-RUN"] = "";+ headers['X-AGENT-ID'] = agentId;+ headers['X-DEBUG-RUN'] = '';- //'X-DEBUG-RUN': '',+ // 'X-DEBUG-RUN': '',const port = config.env.PORT;- let url = `http://localhost:${port}${req.path.replace("/debug", "/api")}`;- //add query params+ const url = `http://localhost:${port}${req.path.replace('/debug', '/api')}`;+ // add query params// * query params will add with 'params' property in axios to parse Object type data properly/* if (req.query) {const query = Object.keys(req.query)@@ -301,29 +276,31 @@ async function runAgentDebug(url += `?${query}`;} */- const input = req.method == "GET" ? req.query : req.body;+ const input = req.method == 'GET' ? req.query : req.body;- //check if request has form-data+ // check if request has form-data- //the following line does not handle get request case- //const apiResponse = await axios.post(url, input, { headers }); //call the actual agentAPI locally+ // the following line does not handle get request case+ // const apiResponse = await axios.post(url, input, { headers }); //call the actual agentAPI locallylet apiResponse;- //make sure to map binary data back to the request body that we'll send to the agent+ // make sure to map binary data back to the request body that we'll send to the agent// @ts-ignoreif (req.files) {- //send request with formData+ // send request with formDataconst formData = new FormData();- //@ts-ignore- for (let file of req.files) {+ // @ts-ignore+ for (const file of req.files) {const fieldname = file.fieldname;- //get blob from file.buffer+ // get blob from file.bufferconst blob = new Blob([file.buffer], { type: file.mimetype });formData.append(fieldname, blob, file.originalname);}- for (let entry in req.body) {- formData.append(entry, req.body[entry]);+ for (const entry in req.body) {+ if (Object.hasOwn(req.body, entry)) {+ formData.append(entry, req.body[entry]);+ }}apiResponse = await axios({@@ -334,7 +311,7 @@ async function runAgentDebug(params: req.query,});} else {- //send request with json body+ // send request with json bodyapiResponse = await axios({method: req.method,url,@@ -343,13 +320,13 @@ async function runAgentDebug(params: req.query,});}- //const apiAgentResponse = await runAgentProcess(agent); //TODO : refactor the internal logic to use runAgentProcess() instead of making a post request+ // const apiAgentResponse = await runAgentProcess(agent); //TODO : refactor the internal logic to use runAgentProcess() instead of making a post requestconst dbgSession = apiResponse?.data?.dbgSession;if (dbgSession) {- //const agentId = agent.id;+ // const agentId = agent.id;if (debugPromises[debugPromiseId]) {console.log(- `Tried to start a new debug session for agent ${agentId}, but a session is already running. req path ${req.path} and url ${req.url}. DELETING THE OLD PROMISE TO START A NEW ONE`+ `Tried to start a new debug session for agent ${agentId}, but a session is already running. req path ${req.path} and url ${req.url}. DELETING THE OLD PROMISE TO START A NEW ONE`,);agentProcess?.agent?.sse?.close();@@ -357,7 +334,7 @@ async function runAgentDebug(dbgPromise.reject({status: 400,data: {- error: "Debug session interrupted by another request",+ error: 'Debug session interrupted by another request',details: { debugPromiseId, session: dbgPromise.dbgSession },},});@@ -366,7 +343,7 @@ async function runAgentDebug(}const sessionPromise = new Promise((resolve, reject) => {console.log(- `A new debug session is started for agent ${agentId} with session id ${dbgSession} and req path ${req.path} and url${req.url}. CLIENT IP: ${req.headers["x-forwarded-for"]} - ${req.socket.remoteAddress}. X-HASH-ID: ${req.headers["x-hash-id"]}`+ `A new debug session is started for agent ${agentId} with session id ${dbgSession} and req path ${req.path} and url${req.url}. CLIENT IP: ${req.headers['x-forwarded-for']} - ${req.socket.remoteAddress}. X-HASH-ID: ${req.headers['x-hash-id']}`,);debugPromises[debugPromiseId] = {dbgSession,@@ -374,20 +351,18 @@ async function runAgentDebug(reject,sse: agentProcess.agent.sse,};- //promise expiration+ // promise expirationsetTimeout(() => {- console.log(- `Debug session for agent ${agentId} with session id ${dbgSession} expired. DELETING PROMISE`- );+ console.log(`Debug session for agent ${agentId} with session id ${dbgSession} expired. DELETING PROMISE`);delete debugPromises[debugPromiseId];- reject({ status: 500, data: "Debug Session Expired" });+ reject(new Error('Debug Session Expired'));},- 60 * 60 * 1000 // 1 hour+ 60 * 60 * 1000, // 1 hour);});- const finalResult: any = await sessionPromise.catch((error) => ({+ const finalResult: any = await sessionPromise.catch(error => ({error,}));@@ -400,11 +375,11 @@ async function runAgentDebug(};}- let data = finalResult;+ const data = finalResult;return { status: 200, data };}- //res.status(apiResponse.status).send(apiResponse.data);+ // res.status(apiResponse.status).send(apiResponse.data);} catch (error: any) {if (error.response) {// The request was made, but the server responded with a non-2xx status@@ -413,15 +388,15 @@ async function runAgentDebug(} else {// Some other error occurredconsole.error(error);- return { status: 500, data: "Internal Server Error" };+ return { status: 500, data: 'Internal Server Error' };}}}-process.on("MANAGEMENT:DISABLE_PORT" as any, async () => {+process.on('MANAGEMENT:DISABLE_PORT' as any, async () => {// close each connection at once using promise.all- console.log("Closing all SSE connections");- sseConnections.forEach((connection) => {+ console.log('Closing all SSE connections');+ sseConnections.forEach(connection => {connection.res.end();});sseConnections.clear();diff --git a/packages/runtime/src/modules/debugger/services/component-async-ctx.ts b/packages/runtime/src/modules/debugger/services/component-async-ctx.tsdeleted file mode 100644index 3fe19d6f..00000000--- a/packages/runtime/src/modules/debugger/services/component-async-ctx.ts+++ /dev/null@@ -1,29 +0,0 @@-import { AsyncLocalStorage } from 'async_hooks';--const asyncLocalStorage = new AsyncLocalStorage();--export const componentAsyncCtx = {- run: async (callback, initialValue = {}) => {- return await asyncLocalStorage.run(initialValue, callback);- },- enterWith: (initialValue = {}) => {- // preserve the store (if any)- const store = (asyncLocalStorage.getStore() as any) || {};- return asyncLocalStorage.enterWith({ ...store, ...initialValue });- },- get: (key: string) => {- const store = asyncLocalStorage.getStore();- if (store) {- return store[key];- }- return null;- },- set: (key: string, value: any) => {- const store = asyncLocalStorage.getStore();- if (store) {- store[key] = value;- } else {- console.log('ComponentAsyncCtx: no store found');- }- },-};diff --git a/packages/runtime/src/modules/embodiment/constants.ts b/packages/runtime/src/modules/embodiment/constants.tsindex 3462fdb0..2c75d22d 100644--- a/packages/runtime/src/modules/embodiment/constants.ts+++ b/packages/runtime/src/modules/embodiment/constants.ts@@ -1,5 +1,4 @@export enum EMBODIMENT_TYPES {- ChatBot = "chatBot",- ChatGPT = "chatGPT",- FormPreview = "form",+ ChatBot = 'chatBot',+ ChatGPT = 'chatGPT',}diff --git a/packages/runtime/src/modules/embodiment/helpers/agentChat.helper.ts b/packages/runtime/src/modules/embodiment/helpers/agentChat.helper.tsdeleted file mode 100644index f2436fc6..00000000--- a/packages/runtime/src/modules/embodiment/helpers/agentChat.helper.ts+++ /dev/null@@ -1,26 +0,0 @@-import { getM2MToken } from '@/core/helpers/logto.helper';-import { includeAuth, mwSysAPI } from '@core/services/smythAPIReq';-import { IMetadataFile } from '../types/chat.types';--export async function updateConversation({ data, conversationId }: { conversationId: string; data: IMetadataFile }) {- const token = (await getM2MToken('https://api.smyth.ai')) as string;- const response = await mwSysAPI- .put(- `/chats/${conversationId}`,- {- conversation: {- label: data.label,- summary: data.summary,- chunkSize: data.chunkSize,- lastChunkID: data.lastChunkId?.toString(),- },- },- includeAuth(token),- )- .catch((error) => {- console.error('Error updating conversation', error);- return null;- });-- return response?.status === 200;-}diff --git a/packages/runtime/src/modules/embodiment/helpers/chatgpt.helper.ts b/packages/runtime/src/modules/embodiment/helpers/chatgpt.helper.tsindex 3ffc11c1..cc638eed 100644--- a/packages/runtime/src/modules/embodiment/helpers/chatgpt.helper.ts+++ b/packages/runtime/src/modules/embodiment/helpers/chatgpt.helper.ts@@ -1,32 +1,30 @@-import fs from "fs";-import path from "path";+import fs from 'fs';+import path from 'path';-import { JSONContentHelper, TemplateStringHelper } from "@smythos/sre";+import { JSONContentHelper, Logger, TemplateStringHelper } from '@smythos/sre';-import {- getAgentDataById,- getAgentEmbodiments,- getAgentIdByDomain,-} from "@core/helpers/agent.helper";+import { getAgentDataById, getAgentEmbodiments, getAgentIdByDomain } from '@core/helpers/agent.helper';-import { EMBODIMENT_TYPES } from "@embodiment/constants";-import { ChatGPTManifest } from "@embodiment/types/chatgpt.types";+import { EMBODIMENT_TYPES } from '@embodiment/constants';+import { ChatGPTManifest } from '@embodiment/types/chatgpt.types';-let chatGPTDataPath = "./data/chatGPT";+const console = Logger('[Embodiment] Helper: ChatGPT');++let chatGPTDataPath = './data/chatGPT';// Path to data files differs between server ('./data/chatGPT') and tests ('../data/chatGPT').if (process.env.TEST_ENV) {- chatGPTDataPath = "../data/chatGPT";+ chatGPTDataPath = '../data/chatGPT';}// a function that splits a string on a word boundary not exceeding a max characters length-function splitOnSeparator(str = "", maxLen, separator = " .") {+function splitOnSeparator(maxLen: number, str = '', separator = ' .') {if (str.length <= maxLen) {return str;}// Find the last occurrence of the separator before maxLen- let idx = str.lastIndexOf(separator, maxLen);+ const idx = str.lastIndexOf(separator, maxLen);// If the separator is not found, return the substring up to maxLenif (idx === -1) {@@ -37,17 +35,13 @@ function splitOnSeparator(str = "", maxLen, separator = " .") {return str.substring(0, idx);}-//FIXME load version from prod domain-export async function getChatGPTManifestById(- agentId: string,- domain: string,- version: string-): Promise<ChatGPTManifest> {- console.log("getChatGPTManifestById", agentId, domain, version);+// FIXME load version from prod domain+async function getChatGPTManifestById(agentId: string, domain: string, version: string): Promise<ChatGPTManifest> {+ console.log('getChatGPTManifestById', agentId, domain, version);if (!agentId) {- throw new Error("Agent not found");+ throw new Error('Agent not found');}- const agentData = await getAgentDataById(agentId, version).catch((error) => {+ const agentData = await getAgentDataById(agentId, version).catch(error => {console.error(error);return { error };});@@ -58,87 +52,64 @@ export async function getChatGPTManifestById(const embodiments = await getAgentEmbodiments(agentId);// find chatgpt embodiment as we have multiple embodiments per agent- const chatgptEmbodiment = embodiments.find(- (embodiment: any) =>- embodiment.type?.toLowerCase() === EMBODIMENT_TYPES.ChatGPT.toLowerCase()- );+ const chatgptEmbodiment = embodiments.find((embodiment: any) => embodiment.type?.toLowerCase() === EMBODIMENT_TYPES.ChatGPT.toLowerCase());// Extract properties from the ChatGPT embodimentconst _chatgptDesctiption = chatgptEmbodiment?.properties?.modelDescription;const _chatgptHumanName = chatgptEmbodiment?.properties?.humanName;const _chatgptModelName = chatgptEmbodiment?.properties?.modelName;- const _chatgptHumanDescription =- chatgptEmbodiment?.properties?.humanDescription;+ const _chatgptHumanDescription = chatgptEmbodiment?.properties?.humanDescription;const _contactEmail = chatgptEmbodiment?.properties?.contactEmail;const _legalInfoUrl = chatgptEmbodiment?.properties?.legalInfoUrl;- const name = _chatgptHumanName || agentData.name || "Smyth Agent";- const modelName =- _chatgptModelName || name.replace(/ /g, "_") || "Smyth Agent";+ const name = _chatgptHumanName || agentData.name || 'Smyth Agent';+ const modelName = _chatgptModelName || name.replace(/ /g, '_') || 'Smyth Agent';- //data.description is deprecated, use data.shortDescription for human description and data.behavior for model description+ // data.description is deprecated, use data.shortDescription for human description and data.behavior for model descriptionconst humanDescription = splitOnSeparator(- _chatgptHumanDescription ||- agentData.data.shortDescription ||- agentData.data.description ||- "",120,- "."- );- const description = splitOnSeparator(- _chatgptDesctiption ||- agentData.data.behavior ||- agentData.data.description ||- "",- 8000,- "."+ _chatgptHumanDescription || agentData.data.shortDescription || agentData.data.description || '',+ '.',);+ const description = splitOnSeparator(8000, _chatgptDesctiption || agentData.data.behavior || agentData.data.description || '', '.');- const icon_url =- chatgptEmbodiment?.properties?.logoUrl ||- "https://proxy-02.api.smyth.ai/static/img/icon.svg";- const contact_email = _contactEmail || "";- const legal_info_url = _legalInfoUrl || "";+ const iconUrl = chatgptEmbodiment?.properties?.logoUrl || 'https://proxy-02.api.smyth.ai/static/img/icon.svg';+ const contactEmail = _contactEmail || '';+ const legalInfoUrl = _legalInfoUrl || '';- const aiPluginTemplate = fs.readFileSync(- path.resolve(__dirname, `${chatGPTDataPath}/ai-plugin.tpl.json`),- "utf8"- );+ const aiPluginTemplate = fs.readFileSync(path.resolve(__dirname, `${chatGPTDataPath}/ai-plugin.tpl.json`), 'utf8');let manifest = TemplateStringHelper.create(aiPluginTemplate).parse({human_name: name,model_name: modelName,human_description: humanDescription,model_description: description,- icon_url,- contact_email,- legal_info_url,+ icon_url: iconUrl,+ contact_email: contactEmail,+ legal_info_url: legalInfoUrl,domain,}).result;const parsedManifest = JSONContentHelper.create(manifest).tryParse();- manifest =- typeof parsedManifest === "string"- ? JSON.parse(parsedManifest)- : parsedManifest;+ manifest = typeof parsedManifest === 'string' ? JSON.parse(parsedManifest) : parsedManifest;const auth = (manifest as any).auth;const authMethod = agentData.data?.auth?.method;const authProvider = agentData.data?.auth?.provider[authMethod];if (authProvider) {- if (authMethod === "oauth-oidc") {- auth.type = "oauth";+ if (authMethod === 'oauth-oidc') {+ auth.type = 'oauth';auth.client_url = `https://${domain}/oauth/authorize`;- auth.scope = "offline_access openid profile email";+ auth.scope = 'offline_access openid profile email';auth.authorization_url = `https://${domain}/oauth/token`;- auth.authorization_content_type = "application/json";+ auth.authorization_content_type = 'application/json';auth.verification_tokens = {openai: authProvider?.OIDCOpenAIVerificationToken,};}- if (authMethod === "api-key-bearer") {- auth.type = "service_http";- auth.authorization_type = "bearer";+ if (authMethod === 'api-key-bearer') {+ auth.type = 'service_http';+ auth.authorization_type = 'bearer';auth.verification_tokens = {openai: authProvider?.BearerOpenAIVerificationToken,};@@ -148,13 +119,10 @@ export async function getChatGPTManifestById(return manifest as unknown as ChatGPTManifest;}-export async function getChatGPTManifest(- domain: string,- version: string-): Promise<ChatGPTManifest> {+export async function getChatGPTManifest(domain: string, version: string): Promise<ChatGPTManifest> {const agentId = await getAgentIdByDomain(domain);if (!agentId) {- throw new Error("Agent not found");+ throw new Error('Agent not found');}return getChatGPTManifestById(agentId, domain, version);diff --git a/packages/runtime/src/modules/embodiment/helpers/formPreview.helper.ts b/packages/runtime/src/modules/embodiment/helpers/formPreview.helper.tsindex b24f885f..0b814944 100644--- a/packages/runtime/src/modules/embodiment/helpers/formPreview.helper.ts+++ b/packages/runtime/src/modules/embodiment/helpers/formPreview.helper.ts@@ -1,18 +1,18 @@-import axios, { AxiosError } from "axios";+import axios, { AxiosError } from 'axios';-import config from "@core/config";+import config from '@core/config';-export type CallSkillParams = {+type CallSkillParams = {agentId: string;};-export type CallSkillBody = {+type CallSkillBody = {componentId: string;- payload?: Record<string, any> | null | "";- version?: "dev" | "latest";+ payload?: Record<string, any> | null | '';+ version?: 'dev' | 'latest';};-export type CallSkillType = {+type CallSkillType = {params: CallSkillParams;body: CallSkillBody;endpoint: string;@@ -28,20 +28,16 @@ export async function callSkill({ params, body, endpoint }: CallSkillType) {request.body = JSON.stringify(body?.payload || {});request.headers = {- "Content-Type": "application/json",- "X-DEBUG-SKIP": "true",- ...(body.version !== "dev" && { "X-AGENT-VERSION": body.version }), // if version is dev, don't send it- "X-AGENT-ID": params.agentId,+ 'Content-Type': 'application/json',+ 'X-DEBUG-SKIP': 'true',+ ...(body.version !== 'dev' && { 'X-AGENT-VERSION': body.version }), // if version is dev, don't send it+ 'X-AGENT-ID': params.agentId,};try {- const res = await axios.post(- `${RUNTIME_AGENT_URL}/api/${endpoint}`,- request.body,- {- headers: request.headers,- }- );+ const res = await axios.post(`${RUNTIME_AGENT_URL}/api/${endpoint}`, request.body, {+ headers: request.headers,+ });return res.data;} catch (error) {const axiosErr = error as AxiosError;diff --git a/packages/runtime/src/modules/embodiment/helpers/openapi-adapter.helper.ts b/packages/runtime/src/modules/embodiment/helpers/openapi-adapter.helper.tsindex b6aa295e..7521d1ee 100644--- a/packages/runtime/src/modules/embodiment/helpers/openapi-adapter.helper.ts+++ b/packages/runtime/src/modules/embodiment/helpers/openapi-adapter.helper.ts@@ -1,14 +1,10 @@-import { AgentDataConnector, Logger } from "@smythos/sre";+import { AgentDataConnector, Logger } from '@smythos/sre';-import config from "@core/config";-import {- addDefaultComponentsAndConnections,- getAgentDataById,- getAgentIdByDomain,-} from "@core/helpers/agent.helper";-import type { AgentData, OpenAPISpec } from "@core/types/openapi.types";+import config from '@core/config';+import { addDefaultComponentsAndConnections, getAgentDataById, getAgentIdByDomain } from '@core/helpers/agent.helper';+import type { AgentData, OpenAPISpec } from '@core/types/openapi.types';-const console = Logger("openapi-adapter.helper.ts");+const console = Logger('openapi-adapter.helper.ts');/*** AgentDataConnector implementation for sre-embodiment-server@@ -24,10 +20,7 @@ class EmbodimentAgentDataConnector extends AgentDataConnector {return getAgentIdByDomain(domain);}- async getAgentSettings(- agentId: string,- version?: string- ): Promise<{ [key: string]: any }> {+ async getAgentSettings(agentId: string, version?: string): Promise<{ [key: string]: any }> {const agentData = await this.getAgentData(agentId, version);return agentData?.settings || {};}@@ -42,24 +35,15 @@ class EmbodimentAgentDataConnector extends AgentDataConnector {const agentData = await this.getAgentData(agentId);return agentData?.deployed || false;} catch (error) {- console.warn(- `Failed to check deployment status for agent ${agentId}:`,- error- );+ console.warn(`Failed to check deployment status for agent ${agentId}:`, error);return false;}}- async listTeamAgents(- teamId: string,- deployedOnly?: boolean,- includeData?: boolean- ): Promise<AgentData[]> {+ async listTeamAgents(teamId: string, deployedOnly?: boolean, includeData?: boolean): Promise<AgentData[]> {// This method would need to be implemented based on your team agent retrieval logic// For now, returning empty array as it's not used in the current OpenAPI generation- console.warn(- "listTeamAgents not fully implemented in EmbodimentAgentDataConnector"- );+ console.warn('listTeamAgents not fully implemented in EmbodimentAgentDataConnector');return [];}@@ -76,19 +60,13 @@ const agentDataConnector = new EmbodimentAgentDataConnector();* Constructs the server URL from domain using environment configuration*/function constructServerUrl(domain: string): string {- const server_url_scheme =- config.env.NODE_ENV === "development" &&- config.env.AGENT_DOMAIN_PORT &&- domain.includes(config.env.DEFAULT_AGENT_DOMAIN)- ? "http"- : "https";- const server_url_port =- config.env.NODE_ENV === "development" &&- config.env.AGENT_DOMAIN_PORT &&- domain.includes(config.env.DEFAULT_AGENT_DOMAIN)+ const serverUrlScheme =+ config.env.NODE_ENV === 'development' && config.env.AGENT_DOMAIN_PORT && domain.includes(config.env.DEFAULT_AGENT_DOMAIN) ? 'http' : 'https';+ const serverUrlPort =+ config.env.NODE_ENV === 'development' && config.env.AGENT_DOMAIN_PORT && domain.includes(config.env.DEFAULT_AGENT_DOMAIN)? `:${config.env.AGENT_DOMAIN_PORT}`- : "";- return `${server_url_scheme}://${domain}${server_url_port}`;+ : '';+ return `${serverUrlScheme}://${domain}${serverUrlPort}`;}/**@@ -100,19 +78,9 @@ function constructServerUrl(domain: string): string {* @param aiOnly - Whether to include only AI-exposed endpoints* @returns Promise<object> - The OpenAPI specification*/-export async function getOpenAPIJSON(- agent: any,- domain: string,- version: string,- aiOnly: boolean = false-): Promise<OpenAPISpec> {- const server_url = constructServerUrl(domain);- const result = await agentDataConnector.getOpenAPIJSON(- agent,- server_url,- version,- aiOnly- );+export async function getOpenAPIJSON(agent: any, domain: string, version: string, aiOnly = false): Promise<OpenAPISpec> {+ const serverUrl = constructServerUrl(domain);+ const result = await agentDataConnector.getOpenAPIJSON(agent, serverUrl, version, aiOnly);return result;}@@ -126,26 +94,24 @@ export async function getOpenAPIJSON(* @param addDefaultFileParsingAgent - Whether to add default file parsing components* @returns Promise<any> - The OpenAPI specification or error*/-export async function getOpenAPIJSONById(+async function getOpenAPIJSONById(agentId: string,domain: string,version: string,- aiOnly: boolean = false,- addDefaultFileParsingAgent: boolean = false+ aiOnly = false,+ addDefaultFileParsingAgent = false,): Promise<any> {try {if (!agentId) {- return { error: "Agent not found" };+ return { error: 'Agent not found' };}- const agentData = await getAgentDataById(agentId, version).catch(- (error) => {- console.error("Failed to fetch agent data:", error);- return {- error: `Failed to fetch agent data: ${error.message || error}`,- };- }- );+ const agentData = await getAgentDataById(agentId, version).catch(error => {+ console.error('Failed to fetch agent data:', error);+ return {+ error: `Failed to fetch agent data: ${error.message || error}`,+ };+ });if (agentData?.error) {return agentData;@@ -155,16 +121,11 @@ export async function getOpenAPIJSONById(addDefaultComponentsAndConnections(agentData);}- const server_url = constructServerUrl(domain);- const result = await agentDataConnector.getOpenAPIJSON(- agentData,- server_url,- version,- aiOnly- );+ const serverUrl = constructServerUrl(domain);+ const result = await agentDataConnector.getOpenAPIJSON(agentData, serverUrl, version, aiOnly);return result;} catch (error) {- return { error: error.message || "OpenAPI generation failed" };+ return { error: error.message || 'OpenAPI generation failed' };}}@@ -176,31 +137,15 @@ export async function getOpenAPIJSONById(* @param addDefaultFileParsingAgent - Whether to add default file parsing components* @returns Promise<any> - The OpenAPI specification or error*/-export async function getOpenAPIJSONForAI(- domain: string,- version: string,- addDefaultFileParsingAgent: boolean = false-): Promise<any> {+export async function getOpenAPIJSONForAI(domain: string, version: string, addDefaultFileParsingAgent = false): Promise<any> {try {const agentId = await getAgentIdByDomain(domain);if (!agentId) {- return { error: "Agent not found" };+ return { error: 'Agent not found' };}- return getOpenAPIJSONById(- agentId,- domain,- version,- true,- addDefaultFileParsingAgent- );+ return getOpenAPIJSONById(agentId, domain, version, true, addDefaultFileParsingAgent);} catch (error) {- return { error: error.message || "OpenAPI generation failed" };+ return { error: error.message || 'OpenAPI generation failed' };}}--// Export utility functions for backward compatibility-export {- getAgentDataById,- getAgentIdByDomain,-} from "@core/helpers/agent.helper";diff --git a/packages/runtime/src/modules/embodiment/middlewares/ChatbotLoader.mw.ts b/packages/runtime/src/modules/embodiment/middlewares/ChatbotLoader.mw.tsindex 372f8ba6..24971520 100644--- a/packages/runtime/src/modules/embodiment/middlewares/ChatbotLoader.mw.ts+++ b/packages/runtime/src/modules/embodiment/middlewares/ChatbotLoader.mw.ts@@ -1,20 +1,22 @@-import { Agent } from "@smythos/sre";-import Chatbot from "../services/Chatbot.class";-import ApiError from "../utils/apiError";-//TODO : handle cache TTL+import { Agent, Logger } from '@smythos/sre';-const __chatbot_cache = { 0: 1 };+import Chatbot from '../services/Chatbot.class';+import ApiError from '../utils/apiError';++const console = Logger('[Embodiment] Middleware: Chatbot Loader');++// TODO : handle cache TTL++const chatbotCache = { 0: 1 };export default async function ChatbotLoader(req, res, next) {- console.log("ChatbotLoader");+ console.log('ChatbotLoader');const agent: Agent = req._agent;if (!agent) return next();try {- if (__chatbot_cache[agent.id] && !agent.usingTestDomain) {- const chatBotData = __chatbot_cache[agent.id];+ if (chatbotCache[agent.id] && !agent.usingTestDomain) {+ const chatBotData = chatbotCache[agent.id];if (chatBotData.agentVersion == agent.version) {- console.log(- `Chatbot loaded from cache, domain=${chatBotData.domain} version=${chatBotData.version}`- );+ console.log(`Chatbot loaded from cache, domain=${chatBotData.domain} version=${chatBotData.version}`);const chatbot = new Chatbot(req);chatbot.deserialize(chatBotData);req._chatbot = chatbot;@@ -25,10 +27,10 @@ export default async function ChatbotLoader(req, res, next) {req._chatbot = chatbot;await req._chatbot.init();- __chatbot_cache[agent.id] = chatbot.serialize(); //we cannot store an object in session, so we serialize it+ chatbotCache[agent.id] = chatbot.serialize(); // we cannot store an object in session, so we serialize it}} catch (error) {- if (error.errKey == "MODEL_NOT_SUPPORTED") {+ if (error.errKey == 'MODEL_NOT_SUPPORTED') {console.warn(error.message);return next(new ApiError(400, error.message, error.errKey));}diff --git a/packages/runtime/src/modules/embodiment/middlewares/agentLoader.mw.ts b/packages/runtime/src/modules/embodiment/middlewares/agentLoader.mw.tsindex 14f783b7..fcafbb9a 100644--- a/packages/runtime/src/modules/embodiment/middlewares/agentLoader.mw.ts+++ b/packages/runtime/src/modules/embodiment/middlewares/agentLoader.mw.ts@@ -1,46 +1,33 @@-import {- Agent,- AgentRequest,- AgentSettings,- ConnectorService,- Logger,-} from "@smythos/sre";--import config from "@core/config";-import {- addDefaultComponentsAndConnections,- extractAgentVerionsAndPath,- getAgentDomainById,- getAgentIdAndVersion,-} from "@core/helpers/agent.helper";--const console = Logger("[Embodiment] Middleware: Agent Loader");+import { Agent, AgentRequest, AgentSettings, ConnectorService, Logger } from '@smythos/sre';++import config from '@core/config';+import { addDefaultComponentsAndConnections, extractAgentVerionsAndPath, getAgentDomainById, getAgentIdAndVersion } from '@core/helpers/agent.helper';++const console = Logger('[Embodiment] Middleware: Agent Loader');export default async function agentLoader(req, res, next) {- console.log("agentLoader", req.path);+ console.log('agentLoader', req.path);const agentDataConnector = ConnectorService.getAgentDataConnector();- const isAgentLLMCall = req.body.model ? true : false;- const agentFromModel: any = isAgentLLMCall- ? getAgentIdAndVersion(req.body.model)- : {};+ const isAgentLLMCall = !!req.body.model;+ const agentFromModel: any = isAgentLLMCall ? getAgentIdAndVersion(req.body.model) : {};- if (req.path.startsWith("/static/")) {+ if (req.path.startsWith('/static/')) {return next();}- let agentId = req.header("X-AGENT-ID") || agentFromModel.agentId;- let agentVersion =- req.header("X-AGENT-VERSION") || agentFromModel.version || "";- const isAgentChatRequest = req.header("x-conversation-id") !== undefined;+ let agentId = req.header('X-AGENT-ID') || agentFromModel.agentId;+ const agentVersion = req.header('X-AGENT-VERSION') || agentFromModel.version || '';+ const isAgentChatRequest = req.header('x-conversation-id') !== undefined;const debugHeader =- req.header("X-DEBUG-STOP") !== undefined ||- req.header("X-DEBUG-RUN") !== undefined ||- req.header("X-DEBUG-INJ") !== undefined ||- req.header("X-DEBUG-READ") !== undefined;+ req.header('X-DEBUG-STOP') !== undefined ||+ req.header('X-DEBUG-RUN') !== undefined ||+ req.header('X-DEBUG-INJ') !== undefined ||+ req.header('X-DEBUG-READ') !== undefined;- let agentDomain: any = "";+ let agentDomain: any = '';let isTestDomain = false;- let { path, version } = extractAgentVerionsAndPath(req.path);+ const { path, version: extractedVersion } = extractAgentVerionsAndPath(req.path);+ let version = extractedVersion;if (!version) version = agentVersion;if (!agentId) {const domain = req.hostname;@@ -48,17 +35,15 @@ export default async function agentLoader(req, res, next) {try {const result = agentDataConnector?.getAgentIdByDomain?.(domain);- if (result && typeof result.catch === "function") {- agentId = await result.catch((error) => {+ if (result && typeof result.catch === 'function') {+ agentId = await result.catch(error => {console.error(error);});} else {- console.error(- "getAgentIdByDomain method is not available or does not return a promise"- );+ console.error('getAgentIdByDomain method is not available or does not return a promise');}} catch (error) {- console.error("Error calling getAgentIdByDomain:", error);+ console.error('Error calling getAgentIdByDomain:', error);}agentDomain = domain;if (agentId && domain.includes(config.env.DEFAULT_AGENT_DOMAIN)) {@@ -66,38 +51,38 @@ export default async function agentLoader(req, res, next) {}}if (agentId) {- if (!isTestDomain && agentId && req.hostname.includes("localhost")) {- console.log(- `Host ${req.hostname} is using debug session. Assuming test domain`- );+ if (!isTestDomain && agentId && req.hostname.includes('localhost')) {+ console.log(`Host ${req.hostname} is using debug session. Assuming test domain`);isTestDomain = true;}if (agentDomain && !isTestDomain && !version) {- //when using a production domain but no version is specified, use latest- version = "latest";+ // when using a production domain but no version is specified, use latest+ version = 'latest';}let agentData;try {const result = agentDataConnector?.getAgentData?.(agentId, version);- if (result && typeof result.catch === "function") {- agentData = await result.catch((error) => {+ if (result && typeof result.catch === 'function') {+ agentData = await result.catch(error => {console.error(error);return { error: error.message };});} else {- console.error(- "getAgentData method is not available or does not return a promise"- );- agentData = { error: "getAgentData method is not available" };+ console.error('getAgentData method is not available or does not return a promise');+ agentData = { error: 'getAgentData method is not available' };}} catch (error) {- console.error("Error calling getAgentData:", error);+ console.error('Error calling getAgentData:', error);agentData = { error: error.message };}+ // Ensure default components for file parsing are added for all agent chat stream routesif (isAgentChatRequest &&- (path.startsWith("/stream") || path.startsWith("/chat-stream"))+ (path.startsWith('/stream') ||+ path.startsWith('/chat-stream') ||+ path.includes('/v1/emb/chat/stream') ||+ req.path.includes('/v1/emb/chat/stream'))) {// only add default components and connections for file parsing agent on chat requestsaddDefaultComponentsAndConnections(agentData);@@ -112,10 +97,10 @@ export default async function agentLoader(req, res, next) {req._agent = new Agent(agentId, agentData, agentSettings, agentRequest);req._rawAgent = agentData;- req.socket.on("close", () => {+ req.socket.on('close', () => {// console.log('Client socket closed, killing agent');// Handle the cancellation logic- //req._agent.kill();+ // req._agent.kill();});// req._agent.auth is empty for sre-embodiment-server; the actual auth data exists in agentData.data.auth or req._agent.data.auth// However, the auth middleware in the sre-agent-server project expects auth data in req._agent.auth,@@ -123,23 +108,17 @@ export default async function agentLoader(req, res, next) {req._agent.auth = agentData?.data?.auth || {};if (!isTestDomain && req._agent.debugSessionEnabled && debugHeader) {- console.log(- `Host ${req.hostname} is using debug session. Assuming test domain.#2`- );+ console.log(`Host ${req.hostname} is using debug session. Assuming test domain.#2`);isTestDomain = true;}req._agent.usingTestDomain = isTestDomain;- req._agent.domain = isAgentLLMCall- ? "AgentLLM"- : agentDomain || (await getAgentDomainById(agentId));+ req._agent.domain = isAgentLLMCall ? 'AgentLLM' : agentDomain || (await getAgentDomainById(agentId));// req._agent.version = version;req._agentVersion = version;- //req._data1 = 1;+ // req._data1 = 1;- console.log(- `Loaded Agent:${agentId} v=${version} path=${path} isTestDomain=${isTestDomain} domain=${agentDomain}`- );+ console.log(`Loaded Agent:${agentId} v=${version} path=${path} isTestDomain=${isTestDomain} domain=${agentDomain}`);return next();}@@ -150,11 +129,11 @@ export default async function agentLoader(req, res, next) {function cleanAgentData(agentData) {if (agentData) {// remove Note components- agentData.data.components = agentData.data.components.filter(- (c) => c.name != "Note"- );+ // eslint-disable-next-line no-param-reassign+ agentData.data.components = agentData.data.components.filter(c => c.name != 'Note');// remove templateInfo+ // eslint-disable-next-line no-param-reassigndelete agentData.data?.templateInfo;// TODO : remove UI attributesdiff --git a/packages/runtime/src/modules/embodiment/modules/API/routes/router.ts b/packages/runtime/src/modules/embodiment/modules/API/routes/router.tsindex 61b07608..fb3c91a3 100644--- a/packages/runtime/src/modules/embodiment/modules/API/routes/router.ts+++ b/packages/runtime/src/modules/embodiment/modules/API/routes/router.ts@@ -1,25 +1,20 @@-import { Agent } from "@smythos/sre";-import express from "express";+import { Agent } from '@smythos/sre';+import express from 'express';-import { getOpenAPIJSON } from "@embodiment/helpers/openapi-adapter.helper";-import agentLoader from "@embodiment/middlewares/agentLoader.mw";+import { getOpenAPIJSON } from '@embodiment/helpers/openapi-adapter.helper';+import agentLoader from '@embodiment/middlewares/agentLoader.mw';const router = express.Router();const openapiJSONHandler = async (req, res) => {const agent: Agent = req._agent;- let domain = req.hostname;+ const domain = req.hostname;// const debugSessionEnabled = agent.debugSessionEnabled;// const isTestDomain = agent.usingTestDomain;- //FIXME : use the right version depending on domain [FIXED]+ // FIXME : use the right version depending on domain [FIXED]// const version = isTestDomain ? '' : 'latest';- const openAPIObj = await getOpenAPIJSON(- req._rawAgent,- domain,- req._agentVersion,- false- ).catch((error) => {+ const openAPIObj = await getOpenAPIJSON(req._rawAgent, domain, req._agentVersion, false).catch(error => {console.error(error);return { error: error.message };});@@ -27,24 +22,19 @@ const openapiJSONHandler = async (req, res) => {if (openAPIObj?.error) {return res.status(500).send({ error: openAPIObj.error });}- //set application type to json- res.setHeader("Content-Type", "application/json");+ // set application type to json+ res.setHeader('Content-Type', 'application/json');res.send(JSON.stringify(openAPIObj, null, 2));};const openapiJSON4LLMHandler = async (req, res) => {- let domain = req.hostname;+ const domain = req.hostname;// const debugSessionEnabled = agent.debugSessionEnabled;// const isTestDomain = agent.usingTestDomain;- //FIXME : use the right version depending on domain [FIXED]+ // FIXME : use the right version depending on domain [FIXED]// const version = isTestDomain ? '' : 'latest';- const openAPIObj = await getOpenAPIJSON(- req._rawAgent,- domain,- req._agentVersion,- true- ).catch((error) => {+ const openAPIObj = await getOpenAPIJSON(req._rawAgent, domain, req._agentVersion, true).catch(error => {console.error(error);return { error: error.message };});@@ -52,14 +42,14 @@ const openapiJSON4LLMHandler = async (req, res) => {if (openAPIObj?.error) {return res.status(500).send({ error: openAPIObj.error });}- //set application type to json- res.setHeader("Content-Type", "application/json");+ // set application type to json+ res.setHeader('Content-Type', 'application/json');res.send(JSON.stringify(openAPIObj, null, 2));};-router.get("/api-docs/openapi.json", agentLoader, openapiJSONHandler);-router.get("/api-docs/openapi-llm.json", agentLoader, openapiJSON4LLMHandler);-//legacy-router.get("/.well-known/openapi.json", agentLoader, openapiJSONHandler);+router.get('/api-docs/openapi.json', agentLoader, openapiJSONHandler);+router.get('/api-docs/openapi-llm.json', agentLoader, openapiJSON4LLMHandler);+// legacy+router.get('/.well-known/openapi.json', agentLoader, openapiJSONHandler);export { router as apiRouter };diff --git a/packages/runtime/src/modules/embodiment/modules/agentChat/routes/router.ts b/packages/runtime/src/modules/embodiment/modules/agentChat/routes/router.tsindex eb566371..b726b484 100644--- a/packages/runtime/src/modules/embodiment/modules/agentChat/routes/router.ts+++ b/packages/runtime/src/modules/embodiment/modules/agentChat/routes/router.ts@@ -1,45 +1,28 @@-import express from "express";-import Joi from "joi";+import express from 'express';+import Joi from 'joi';-import config from "@core/config";-import { getM2MToken } from "@core/helpers/logto.helper";-import UserAgentAccessCheck from "@core/middlewares/userAgentAccessCheck.mw";-import { validate } from "@core/middlewares/validate.mw";-import { requestContext } from "@core/services/request-context";-import { includeAuth, mwSysAPI } from "@core/services/smythAPIReq";+import { Logger } from '@smythos/sre';-import agentLoader from "@embodiment/middlewares/agentLoader.mw";-import ChatbotLoader from "@embodiment/middlewares/ChatbotLoader.mw";-import Chatbot from "@embodiment/services/Chatbot.class";-import { buildConversationId } from "@embodiment/utils/chat.utils";+import config from '@core/config';+import { getM2MToken } from '@core/helpers/logto.helper';+import { uploadHandler } from '@core/middlewares/uploadHandler.mw';+import UserAgentAccessCheck from '@core/middlewares/userAgentAccessCheck.mw';+import { validate } from '@core/middlewares/validate.mw';+import { requestContext } from '@core/services/request-context';+import { includeAuth, mwSysAPI } from '@core/services/smythAPIReq';-// Import ChatbotResponse type for proper typing-type ChatbotResponse = {- content?: string;- title?: string;- debug?: string;- function?: string;- parameters?: any[];- function_call?: any;- isError?: boolean;- errorType?: string;-};+import agentLoader from '@embodiment/middlewares/agentLoader.mw';+import ChatbotLoader from '@embodiment/middlewares/ChatbotLoader.mw';+import { buildConversationId } from '@embodiment/utils/chat.utils';-// declare the req._chatbot type+const console = Logger('[Embodiment] Router: Agent Chat');const router = express.Router();-const middlewares = [UserAgentAccessCheck, agentLoader, ChatbotLoader];+// Note: Intentionally excluding UserAgentAccessCheck to mirror working chatbot routes and avoid SSL certificate issues+const middlewares = [uploadHandler, agentLoader, ChatbotLoader];router.use(middlewares);-let localAgentAuthorizations = {- //FIXME : this seems like a hardcoded value used by Arslan during implementation, should we remove it ?- clzi8yw441kcfblqz6zj9bv1h: {- verifiedKey: "SomeRandomToken",- authMethod: "api-key-bearer",- },-};-const validations = {exportConversations: {body: Joi.object({@@ -47,119 +30,34 @@ const validations = {dateRange: Joi.string().optional().regex(/^\d+,\d+$/)- .message("Invalid date range. Expected format: timestamp,timestamp"),+ .message('Invalid date range. Expected format: timestamp,timestamp'),// e.g test, prod (enum)- env: Joi.string().valid("test", "prod").required(),+ env: Joi.string().valid('test', 'prod').required(),}),},};-router.post("/stream", async (req, res) => {- let streamStarted = false;- const isLocalAgent = req.hostname.includes("localagent");- const agentId = req._agent?.id;- const agentVersion = req._agent?.version;- let verifiedKey = null;-- if (isLocalAgent) {- verifiedKey = localAgentAuthorizations?.[agentId]?.verifiedKey;- } else {- verifiedKey = req.session.agentAuthorizations?.[agentId]?.verifiedKey;- }-- const abortController = new AbortController();- try {- const { message } = req.body;- if (!req._chatbot) {- return res.status(404).send({ error: "Chatbot not found" });- }- const chatbot: Chatbot = req._chatbot;- const userId = req.header("x-user-id") || "none";- const teamId = req.header("x-team-id") || "none";- const isAgentChatRequest = req.header("x-conversation-id") !== undefined;- chatbot.conversationID = req.header("x-conversation-id") || req.sessionID;-- const headers: any = {};- if (verifiedKey) {- headers["Authorization"] = `Bearer ${verifiedKey}`;- }-- console.log("headers", {- userId,- teamId,- conver: chatbot.conversationID,- });-- const dataPath = config.env.DATA_PATH;-- if (!dataPath) {- return res.status(500).send({ error: "Data path is not set" });- }-- //set response headers- res.setHeader("Content-Type", "text/event-stream");- res.setHeader("Cache-Control", "no-cache");- res.setHeader("Connection", "keep-alive");+// Removed legacy /aichat/stream in favor of /v1/emb/chat/stream- //const headers = { 'X-AGENT-ID': agentId, 'X-AGENT-VERSION': agentVersion };- headers["X-AGENT-ID"] = undefined; // because we don't debug with agent chat and this is required to make sre-runtime call the agent via http- headers["X-AGENT-VERSION"] = agentVersion;- headers["x-conversation-id"] = chatbot.conversationID;+// New v1 endpoint mirroring chatbot /chat-stream behavior but for Agent Chat- await chatbot.getChatStreaming({- message,- callback: (data: ChatbotResponse) => {- res.write(JSON.stringify(data));- streamStarted = true;- },- headers,- abortSignal: abortController.signal,- isAgentChatRequest,- });-- res.end();- } catch (error: any) {- console.error(error);- if (!streamStarted) {- res.status(500).send({- content: error?.message || "An error occurred. Please try again later.",- isError: true,- errorType: "api_error",- });- } else {- // Stream error message in the same format as normal responses- res.write(- JSON.stringify({- content: "I'm not able to contact the server. Please try again.",- isError: true,- errorType: "connection_error",- })- );- res.end();- }- }-});--router.post("/new", async (req, res) => {+router.post('/new', async (req, res) => {const { conversation = {} } = req.body;- const isTestDomain = req.hostname.includes(- `.${config.env.DEFAULT_AGENT_DOMAIN}`- );- let agentId = req.header("X-AGENT-ID");+ const isTestDomain = req.hostname.includes(`.${config.env.DEFAULT_AGENT_DOMAIN}`);+ const agentId = req.header('X-AGENT-ID');const teamDetails = requestContext.get(`team_info:${agentId}`);- if (!teamDetails?.teamId)- return res.status(400).send({ error: "Internal server error" });+ if (!teamDetails?.teamId) return res.status(400).send({ error: 'Internal server error' });// const conversationId = buildConversationId(undefined, isTestDomain);try {- const token = (await getM2MToken("https://api.smyth.ai")) as string;+ const token = (await getM2MToken('https://api.smyth.ai')) as string;const response = await mwSysAPI.post(- "/chats",+ '/chats',{conversation: {- label: conversation.label || "Untitled Chat",- summary: conversation.summary || "",+ label: conversation.label || 'Untitled Chat',+ summary: conversation.summary || '',teamId: teamDetails.teamId,ownerId: conversation.ownerId || undefined,aiAgentId: agentId,@@ -167,12 +65,9 @@ router.post("/new", async (req, res) => {lastChunkID: conversation?.lastChunkID || undefined,},},- includeAuth(token)- );- const conversationId = buildConversationId(- response.data?.conversation?.id,- isTestDomain+ includeAuth(token),);+ const conversationId = buildConversationId(response.data?.conversation?.id, isTestDomain);const finalResponse = {...(response.data?.conversation || {}),@@ -186,73 +81,68 @@ router.post("/new", async (req, res) => {}});-//* NOTE THAT THIS ROUTE IS PROTECTED BY UserAgentAccessCheck middleware AND IT SHOULD ALWAYS BE PROTECTED-router.post(- "/export-conversations",- validate(validations.exportConversations),- async (req, res) => {- const agentId = req._agent?.id;- if (!agentId) {- return res.status(400).send({ error: "agentId is required" });- }- const { dateRange, env } = req.body;- const chatbot = req._chatbot;+// Removed legacy /aichat/upload in favor of unified /v1/emb/chat/upload- let responseStarted = false;-- try {- // Set headers before starting the response- res.setHeader("Content-Type", "application/json");- res.setHeader(- "Content-Disposition",- 'attachment; filename="chat-export.json"'- );+//* NOTE THAT THIS ROUTE IS PROTECTED BY UserAgentAccessCheck middleware AND IT SHOULD ALWAYS BE PROTECTED+router.post('/export-conversations', UserAgentAccessCheck, validate(validations.exportConversations), async (req, res) => {+ const agentId = req._agent?.id;+ if (!agentId) {+ return res.status(400).send({ error: 'agentId is required' });+ }+ const { dateRange, env } = req.body;+ const chatbot = req._chatbot;- res.write("[");- responseStarted = true;+ let responseStarted = false;- let first = true;- for await (const convJson of chatbot.exportAllConversations({- dateRange,- env,- })) {- if (!first) res.write(",");- res.write(`{"convId": "${convJson.convId}", "history": `);- await new Promise((resolve, reject) => {- convJson.stream.pipe(res, { end: false });- convJson.stream.on("end", resolve);- convJson.stream.on("error", reject);- });- res.write("}");- first = false;- }+ try {+ // Set headers before starting the response+ res.setHeader('Content-Type', 'application/json');+ res.setHeader('Content-Disposition', 'attachment; filename="chat-export.json"');++ res.write('[');+ responseStarted = true;++ let first = true;+ for await (const convJson of chatbot.exportAllConversations({+ dateRange,+ env,+ })) {+ if (!first) res.write(',');+ res.write(`{"convId": "${convJson.convId}", "history": `);+ await new Promise((resolve, reject) => {+ convJson.stream.pipe(res, { end: false });+ convJson.stream.on('end', resolve);+ convJson.stream.on('error', reject);+ });+ res.write('}');+ first = false;+ }- res.write("]");- res.end();- } catch (err) {- console.error("Export failed:", err);+ res.write(']');+ res.end();+ } catch (err) {+ console.error('Export failed:', err);- if (!responseStarted) {- // If response hasn't started, we can send a proper error response- return res.status(500).json({ error: "Failed to export chat history" });- } else {- // If response has started, we need to end it gracefully- try {- if (!res.headersSent) {- res.status(500);- }- res.write("]}"); // Close the JSON array properly- res.end();- } catch (endError) {- console.error("Error ending response:", endError);- // Force end the response if possible- if (!res.destroyed) {- res.destroy();- }+ if (!responseStarted) {+ // If response hasn't started, we can send a proper error response+ return res.status(500).json({ error: 'Failed to export chat history' });+ } else {+ // If response has started, we need to end it gracefully+ try {+ if (!res.headersSent) {+ res.status(500);+ }+ res.write(']}'); // Close the JSON array properly+ res.end();+ } catch (endError) {+ console.error('Error ending response:', endError);+ // Force end the response if possible+ if (!res.destroyed) {+ res.destroy();}}}}-);+});export { router as agentChatRouter };diff --git a/packages/runtime/src/modules/embodiment/modules/alexa/routes/router.ts b/packages/runtime/src/modules/embodiment/modules/alexa/routes/router.tsindex 10ff1886..436ff7be 100644--- a/packages/runtime/src/modules/embodiment/modules/alexa/routes/router.ts+++ b/packages/runtime/src/modules/embodiment/modules/alexa/routes/router.ts@@ -1,22 +1,15 @@-import { Agent } from "@smythos/sre";-import express from "express";+import { Agent } from '@smythos/sre';+import express from 'express';-import {- DEFAULT_AGENT_MODEL_SETTINGS_KEY,- DEFAULT_MODEL,-} from "@core/constants";+import { DEFAULT_AGENT_MODEL_SETTINGS_KEY, DEFAULT_MODEL } from '@core/constants';-import agentLoader from "@embodiment/middlewares/agentLoader.mw";+import agentLoader from '@embodiment/middlewares/agentLoader.mw';++import { createAlexaSkill, handleAlexaRequest, isAlexaEnabled, parseAlexaRequest } from '../services/alexa.service';-import {- createAlexaSkill,- handleAlexaRequest,- isAlexaEnabled,- parseAlexaRequest,-} from "../services/alexa.service";const router = express.Router();-router.post("/", agentLoader, async (req: any, res) => {+router.post('/', agentLoader, async (req: any, res) => {try {const agent: Agent = req._agent;await agent.agentSettings?.ready();@@ -25,16 +18,9 @@ router.post("/", agentLoader, async (req: any, res) => {await agent.agentSettings?.embodiments?.ready();const alexRequest = parseAlexaRequest(req.body);- const model =- agent.agentSettings?.get(DEFAULT_AGENT_MODEL_SETTINGS_KEY) ||- DEFAULT_MODEL;+ const model = agent.agentSettings?.get(DEFAULT_AGENT_MODEL_SETTINGS_KEY) || DEFAULT_MODEL;- const response = await handleAlexaRequest(- agent,- alexRequest,- model,- isEnabled- );+ const response = await handleAlexaRequest(agent, alexRequest, model, isEnabled);res.json(response);} catch (error: any) {@@ -43,24 +29,24 @@ router.post("/", agentLoader, async (req: any, res) => {}});-router.post("/publish", agentLoader, async (req: any, res) => {+router.post('/publish', agentLoader, async (req: any, res) => {try {const agent: Agent = req._agent;const agentName = agent.name;const agentDomain = agent.domain;- let accessToken = req.body.accessToken;- let vendorId = req.body.vendorId;- const scheme = agentDomain.includes(":") ? "http" : "https";- let endpoint = `${scheme}://${agentDomain}/alexa`;+ const accessToken = req.body.accessToken;+ const vendorId = req.body.vendorId;+ const scheme = agentDomain.includes(':') ? 'http' : 'https';+ const endpoint = `${scheme}://${agentDomain}/alexa`;await createAlexaSkill(agentName, accessToken, vendorId, endpoint);return res.json({success: true,- message: "Agent published to Alexa successfully",+ message: 'Agent published to Alexa successfully',});} catch (error: any) {- console.error("Error publishing to Alexa:", error);+ console.error('Error publishing to Alexa:', error);return res.status(500).json({ success: false, error: error.message });}});diff --git a/packages/runtime/src/modules/embodiment/modules/alexa/services/alexa.service.ts b/packages/runtime/src/modules/embodiment/modules/alexa/services/alexa.service.tsindex 21551ddd..9762f4c8 100644--- a/packages/runtime/src/modules/embodiment/modules/alexa/services/alexa.service.ts+++ b/packages/runtime/src/modules/embodiment/modules/alexa/services/alexa.service.ts@@ -1,30 +1,20 @@-import { getOpenAPIJSONForAI } from "@embodiment/helpers/openapi-adapter.helper";-import { Agent, Conversation } from "@smythos/sre";-import axios from "axios";-const SPEAKABLE_FORMAT_PROMPT = "Return the response in speakable format";-const ALEXA_BASE_URL = "https://api.amazonalexa.com";-const ALEXA_SETTINGS_KEY = "alexa";+import { getOpenAPIJSONForAI } from '@embodiment/helpers/openapi-adapter.helper';+import { Agent, Conversation } from '@smythos/sre';+import axios from 'axios';-export async function handleAlexaRequest(- agent: Agent,- alexRequest: any,- model: string,- isEnabled: boolean-) {+const SPEAKABLE_FORMAT_PROMPT = 'Return the response in speakable format';+const ALEXA_BASE_URL = 'https://api.amazonalexa.com';+const ALEXA_SETTINGS_KEY = 'alexa';++export async function handleAlexaRequest(agent: Agent, alexRequest: any, model: string, isEnabled: boolean) {if (!isEnabled) {- return buildAlexaResponse("Alexa is not enabled for this agent");+ return buildAlexaResponse('Alexa is not enabled for this agent');}- if (alexRequest.type === "LaunchRequest") {- return buildAlexaResponse(- "Hi I am smythos agent. What can I help you with?"- );+ if (alexRequest.type === 'LaunchRequest') {+ return buildAlexaResponse('Hi I am smythos agent. What can I help you with?');}const searchQuery = alexRequest.slots.searchQuery.heardAs;- const agentResponse = await processAlexaSearchQuery(- searchQuery,- model,- agent- );+ const agentResponse = await processAlexaSearchQuery(searchQuery, model, agent);const response = buildAlexaResponse(agentResponse);return response;}@@ -36,10 +26,10 @@ export function parseAlexaRequest(alexRequest: any) {return { type, intent, slots };}-export function getSlotValues(filledSlots) {+function getSlotValues(filledSlots) {const slotValues = {};- Object.keys(filledSlots).forEach((item) => {+ Object.keys(filledSlots).forEach(item => {const name = filledSlots[item].name;if (@@ -49,23 +39,19 @@ export function getSlotValues(filledSlots) {filledSlots[item].resolutions.resolutionsPerAuthority[0].status &&filledSlots[item].resolutions.resolutionsPerAuthority[0].status.code) {- switch (- filledSlots[item].resolutions.resolutionsPerAuthority[0].status.code- ) {- case "ER_SUCCESS_MATCH":+ switch (filledSlots[item].resolutions.resolutionsPerAuthority[0].status.code) {+ case 'ER_SUCCESS_MATCH':slotValues[name] = {heardAs: filledSlots[item].value,- resolved:- filledSlots[item].resolutions.resolutionsPerAuthority[0].values[0]- .value.name,- ERstatus: "ER_SUCCESS_MATCH",+ resolved: filledSlots[item].resolutions.resolutionsPerAuthority[0].values[0].value.name,+ ERstatus: 'ER_SUCCESS_MATCH',};break;- case "ER_SUCCESS_NO_MATCH":+ case 'ER_SUCCESS_NO_MATCH':slotValues[name] = {heardAs: filledSlots[item].value,- resolved: "",- ERstatus: "ER_SUCCESS_NO_MATCH",+ resolved: '',+ ERstatus: 'ER_SUCCESS_NO_MATCH',};break;default:@@ -73,9 +59,9 @@ export function getSlotValues(filledSlots) {}} else {slotValues[name] = {- heardAs: filledSlots[item].value || "", // may be null- resolved: "",- ERstatus: "",+ heardAs: filledSlots[item].value || '', // may be null+ resolved: '',+ ERstatus: '',};}}, this);@@ -83,67 +69,58 @@ export function getSlotValues(filledSlots) {return slotValues;}-export function buildAlexaResponse(- outputSpeech: string,- reprompt = "",- shouldEndSession = false-) {+function buildAlexaResponse(outputSpeech: string, reprompt = '', shouldEndSession = false) {return {- version: "1.0",+ version: '1.0',sessionAttributes: {},response: {outputSpeech: {- type: "PlainText",+ type: 'PlainText',text: outputSpeech,},reprompt: {outputSpeech: {- type: "PlainText",+ type: 'PlainText',text: reprompt,},},- shouldEndSession: shouldEndSession,+ shouldEndSession,},};}-export async function createAlexaSkill(- agentName: string,- accessToken: string,- vendorId: string,- endpoint: string-) {+export async function createAlexaSkill(agentName: string, accessToken: string, vendorId: string, endpoint: string) {try {const response = await axios({- method: "post",+ method: 'post',url: `${ALEXA_BASE_URL}/v1/skills`,headers: {- Authorization: "Bearer " + accessToken,- "Content-Type": "application/json",+ Authorization: `Bearer ${accessToken}`,+ 'Content-Type': 'application/json',},data: {- vendorId: vendorId,+ vendorId,manifest: {apis: {custom: {endpoint: {- sslCertificateType: "Wildcard",+ sslCertificateType: 'Wildcard',uri: endpoint,},interfaces: [],locales: {},},},- manifestVersion: "1.0",+ manifestVersion: '1.0',publishingInformation: {- category: "ORGANIZERS_AND_ASSISTANTS",+ category: 'ORGANIZERS_AND_ASSISTANTS',locales: {- "en-US": {- description: "Smythos agent",- examplePhrases: ["Alexa open " + agentName],+ 'en-US': {+ description: 'Smythos agent',+ examplePhrases: [`Alexa open ${agentName}`],keywords: [agentName],name: agentName,- summary: "invoke " + agentName,+ summary: `invoke ${agentName}`,},},},@@ -151,14 +128,14 @@ export async function createAlexaSkill(},});const skillId = response.data.skillId;- await new Promise((resolve) => setTimeout(resolve, 2000));+ await new Promise(resolve => setTimeout(resolve, 2000));await axios({- method: "put",+ method: 'put',url: `${ALEXA_BASE_URL}/v1/skills/${skillId}/stages/development/interactionModel/locales/en-US`,headers: {- Authorization: "Bearer " + accessToken,- "Content-Type": "application/json",+ Authorization: `Bearer ${accessToken}`,+ 'Content-Type': 'application/json',},data: {interactionModel: {@@ -166,34 +143,34 @@ export async function createAlexaSkill(invocationName: agentName.toLowerCase(),intents: [{- name: "AMAZON.CancelIntent",+ name: 'AMAZON.CancelIntent',samples: [],},{- name: "AMAZON.HelpIntent",+ name: 'AMAZON.HelpIntent',samples: [],},{- name: "AMAZON.StopIntent",+ name: 'AMAZON.StopIntent',samples: [],},{- name: "AMAZON.FallbackIntent",+ name: 'AMAZON.FallbackIntent',samples: [],},{- name: "AMAZON.NavigateHomeIntent",+ name: 'AMAZON.NavigateHomeIntent',samples: [],},{- name: "SmythosQuery",+ name: 'SmythosQuery',slots: [{- name: "searchQuery",- type: "AMAZON.SearchQuery",+ name: 'searchQuery',+ type: 'AMAZON.SearchQuery',},],- samples: ["Hi {searchQuery}", "Hello {searchQuery}"],+ samples: ['Hi {searchQuery}', 'Hello {searchQuery}'],},],types: [],@@ -207,42 +184,34 @@ export async function createAlexaSkill(}}-export function processAlexaSearchQuery(- query: string,- model: string,- agent: Agent-): Promise<string> {+function processAlexaSearchQuery(query: string, model: string, agent: Agent): Promise<string> {return new Promise(async (resolve, reject) => {// const { agentId, agentVersion } = getAgentIdAndVersion(model);- let result = "";- const spec = await getOpenAPIJSONForAI(- agent.domain,- agent.usingTestDomain ? "" : "latest",- false- );+ let result = '';+ const spec = await getOpenAPIJSONForAI(agent.domain, agent.usingTestDomain ? '' : 'latest', false);// Adapt the model based on the user's plan, especially to support certain OpenAI models for legacy users with limited tokens without their own API key.const conversation = new Conversation(model, spec, {agentId: agent.id,});- conversation.on("error", (error) => {- console.error("Error in conversation:", error);+ conversation.on('error', error => {+ console.error('Error in conversation:', error);throw `An error occurred. Please try again later or select a different model.`;});- conversation.on("content", (content) => {+ conversation.on('content', content => {try {- if (content?.indexOf("}{") >= 0) {- content = content.replace(/}{/g, "} {");+ if (content?.indexOf('}{') >= 0) {+ content = content.replace(/}{/g, '} {');}result += content;} catch (e) {}});- conversation.on("end", () => {- console.log("streaming: [DONE]");+ conversation.on('end', () => {+ console.log('streaming: [DONE]');resolve(result);});conversation.streamPrompt(`${query} ${SPEAKABLE_FORMAT_PROMPT}`, {- "X-AGENT-ID": agent.id,+ 'X-AGENT-ID': agent.id,});});}@@ -251,5 +220,5 @@ export function isAlexaEnabled(agent: Agent) {if (agent.usingTestDomain) {return true;}- return agent.agentSettings?.get(ALEXA_SETTINGS_KEY) === "true";+ return agent.agentSettings?.get(ALEXA_SETTINGS_KEY) === 'true';}diff --git a/packages/runtime/src/modules/embodiment/modules/chat/routes/router.ts b/packages/runtime/src/modules/embodiment/modules/chat/routes/router.tsnew file mode 100644index 00000000..cc2c3075--- /dev/null+++ b/packages/runtime/src/modules/embodiment/modules/chat/routes/router.ts@@ -0,0 +1,155 @@+import express from 'express';++import { AccessCandidate, Agent, BinaryInput, Logger } from '@smythos/sre';++import Chatbot from '@embodiment/services/Chatbot.class';++import { uploadHandler } from '@core/middlewares/uploadHandler.mw';++import agentLoader from '@embodiment/middlewares/agentLoader.mw';+import ChatbotLoader from '@embodiment/middlewares/ChatbotLoader.mw';++const console = Logger('[Embodiment] Router: Chat (Unified Upload)');++const router = express.Router();++// Reuse the same TTL that was used in chatbot upload+const MAX_TTL_CHAT_FILE_UPLOAD = 60 * 60 * 24 * 1; // 1 day++// Middlewares: keep this accessible for both chatbot and agent chat+// Note: Intentionally excluding UserAgentAccessCheck to mirror /chatbot/upload accessibility+router.use([agentLoader, ChatbotLoader]);++// Exportable handler so other modules (e.g., chatbot) can reuse unified logic+export async function uploadFile(req: any, res: any) {+ try {+ if (!req.files || req.files.length === 0) {+ return res.status(400).json({ error: 'No files uploaded' });+ }++ const agent: Agent = req._agent;+ const uploadedFiles: any[] = [];++ for (const file of req.files) {+ try {+ const candidate = AccessCandidate.agent(agent.id);+ const binaryInput = BinaryInput.from(file.buffer, null, file.mimetype, candidate);+ await binaryInput.ready();+ // getJsonData implicitly uploads the file to SmythFS+ const fileData = await binaryInput.getJsonData(candidate, MAX_TTL_CHAT_FILE_UPLOAD);++ uploadedFiles.push({+ size: file.size,+ url: fileData.url,+ mimetype: file.mimetype,+ originalName: file.originalname,+ });+ } catch (error) {+ console.error('Error uploading file:', file.originalname, error);+ }+ }++ res.json({ success: true, files: uploadedFiles });+ } catch (error) {+ console.error('Error handling file upload:', error);+ res.status(500).json({ success: false, error: 'Failed to process file upload' });+ }+}++// Unified upload endpoint for both Chatbot and Agent Chat+router.post('/upload', uploadHandler, uploadFile);++type ChatbotResponse = {+ content?: string;+ title?: string;+ debug?: string;+ function?: string;+ parameters?: any[];+ function_call?: any;+ isError?: boolean;+ errorType?: string;+};++// POST /v1/emb/chat/stream+router.post('/chat/stream', async (req: any, res) => {+ let streamStarted = false;+ const agentId = req._agent?.id;+ const agentVersion = req._agent?.version;+ const isDebugSession = req._agent?.debugSessionEnabled;++ const verifiedKey = req.session.agentAuthorizations?.[agentId]?.verifiedKey || null;++ const abortController = new AbortController();++ try {+ let { message } = req.body;+ const { attachments = [] } = req.body;+ if (Array.isArray(attachments) && attachments.length > 0) {+ message = [message, '###', 'Attachments:', ...attachments.map((a: any) => `- ${a?.url}`)].join('\n');+ }++ if (!req._chatbot) {+ return res.status(404).send({ error: 'Chatbot not found' });+ }+ const chatbot: Chatbot = req._chatbot;+ chatbot.conversationID = (req.header('x-conversation-id') as string) || req.sessionID;+ const monitorId = req.header('x-monitor-id');+ const hasAttachments = Array.isArray(attachments) && attachments.length > 0;++ const headers: any = isDebugSession+ ? {+ 'X-DEBUG': true,+ 'X-AGENT-ID': agentId,+ 'X-AGENT-VERSION': agentVersion,+ 'X-AGENT-REMOTE-CALL': hasAttachments,+ 'x-conversation-id': chatbot.conversationID,+ }+ : {+ 'X-AGENT-ID': agentId,+ 'X-AGENT-VERSION': agentVersion,+ 'X-AGENT-REMOTE-CALL': hasAttachments,+ 'x-conversation-id': chatbot.conversationID,+ };+ if (monitorId) headers['X-MONITOR-ID'] = monitorId;+ if (verifiedKey) headers.Authorization = `Bearer ${verifiedKey}`;++ req.on('close', () => abortController.abort());++ res.setHeader('Content-Type', 'text/event-stream');+ res.setHeader('Cache-Control', 'no-cache');+ res.setHeader('Connection', 'keep-alive');++ await chatbot.getChatStreaming({+ message,+ callback: (data: ChatbotResponse) => {+ res.write(JSON.stringify(data));+ streamStarted = true;+ },+ headers,+ abortSignal: abortController.signal,+ isAgentChatRequest: hasAttachments,+ });++ res.end();+ } catch (error: any) {+ console.error(error);+ if (!streamStarted) {+ res.status(500).send({+ content: error?.message || 'An error occurred. Please try again later.',+ isError: true,+ errorType: 'api_error',+ });+ } else {+ res.write(+ JSON.stringify({+ content: "I'm not able to contact the server. Please try again.",+ isError: true,+ errorType: 'connection_error',+ }),+ );+ res.end();+ }+ }+});++export { router as chatRouter };diff --git a/packages/runtime/src/modules/embodiment/modules/chatGPT/routes/router.ts b/packages/runtime/src/modules/embodiment/modules/chatGPT/routes/router.tsindex 1b334e14..2e069894 100644--- a/packages/runtime/src/modules/embodiment/modules/chatGPT/routes/router.ts+++ b/packages/runtime/src/modules/embodiment/modules/chatGPT/routes/router.ts@@ -1,46 +1,37 @@-import { getChatGPTManifest } from "@embodiment/helpers/chatgpt.helper";-import { getOpenAPIJSON } from "@embodiment/helpers/openapi-adapter.helper";-import agentLoader from "@embodiment/middlewares/agentLoader.mw";-import express from "express";+import express from 'express';-const router = express.Router();+import { Logger } from '@smythos/sre';-router.get(- "/.well-known/ai-plugin.json",- agentLoader,- async (req: any, res) => {- let domain = req.hostname;+import { getChatGPTManifest } from '@embodiment/helpers/chatgpt.helper';+import { getOpenAPIJSON } from '@embodiment/helpers/openapi-adapter.helper';+import agentLoader from '@embodiment/middlewares/agentLoader.mw';- const manifest = await getChatGPTManifest(req._rawAgent, domain).catch(- (error) => {- console.error(error);- return { error: error.message };- }- );+const console = Logger('[Embodiment] Router: ChatGPT');- if ("error" in manifest && manifest.error) {- return res.status(500).send({ error: manifest.error });- }+const router = express.Router();++router.get('/.well-known/ai-plugin.json', agentLoader, async (req: any, res) => {+ const domain = req.hostname;++ const manifest = await getChatGPTManifest(req._rawAgent, domain).catch(error => {+ console.error(error);+ return { error: error.message };+ });- console.log(- `Manifest requested from domain ${domain} = ` +- JSON.stringify(manifest, null, 2)- );- res.setHeader("Content-Type", "application/json");- res.send(JSON.stringify(manifest, null, 2));- //res.json(manifest);+ if ('error' in manifest && manifest.error) {+ return res.status(500).send({ error: manifest.error });}-);-router.get("/api-docs/openapi-gpt.json", agentLoader, async (req: any, res) => {- let domain = req.hostname;+ console.log(`Manifest requested from domain ${domain} = ${JSON.stringify(manifest, null, 2)}`);+ res.setHeader('Content-Type', 'application/json');+ res.send(JSON.stringify(manifest, null, 2));+ // res.json(manifest);+});++router.get('/api-docs/openapi-gpt.json', agentLoader, async (req: any, res) => {+ const domain = req.hostname;- const openAPIObj = await getOpenAPIJSON(- req._rawAgent,- domain,- req._agentVersion,- true- ).catch((error) => {+ const openAPIObj = await getOpenAPIJSON(req._rawAgent, domain, req._agentVersion, true).catch(error => {console.error(error);return { error: error.message };});@@ -52,25 +43,25 @@ router.get("/api-docs/openapi-gpt.json", agentLoader, async (req: any, res) => {// Transform from 3.0.1 to 3.1.0 format for GPT compatibilityconst transformedSpec = transformOpenAPI301to310(openAPIObj);- //console.log(`openAPI requested from domain ${domain} = ` + JSON.stringify(transformedSpec, null, 2));- //FIXME : should use a more robust solution for limiting the function description length- //ChatGPT function description is limited to 300 characters max, but SmythOS are not- if ("paths" in transformedSpec) {- for (let path in transformedSpec.paths) {- const entry = transformedSpec.paths[path];- for (let method in entry) {- if (!entry[method].summary) continue;- // * Improvement: Instead of truncating the summary, we can rephrase it using an LLM.- entry[method].summary = splitOnSeparator(- entry[method].summary,- 300,- "."- );+ // console.log(`openAPI requested from domain ${domain} = ` + JSON.stringify(transformedSpec, null, 2));+ // FIXME : should use a more robust solution for limiting the function description length+ // ChatGPT function description is limited to 300 characters max, but SmythOS are not+ if ('paths' in transformedSpec) {+ for (const path in transformedSpec.paths) {+ if (Object.hasOwn(transformedSpec.paths, path)) {+ const entry = transformedSpec.paths[path];+ for (const method in entry) {+ if (Object.hasOwn(entry, method)) {+ if (!entry[method].summary) continue;+ // * Improvement: Instead of truncating the summary, we can rephrase it using an LLM.+ entry[method].summary = splitOnSeparator(300, entry[method].summary, '.');+ }+ }}}}- //set application type to json- res.setHeader("Content-Type", "application/json");+ // set application type to json+ res.setHeader('Content-Type', 'application/json');res.send(JSON.stringify(transformedSpec, null, 2));});@@ -96,71 +87,72 @@ function transformOpenAPI301to310(spec: any): any {const transformed = JSON.parse(JSON.stringify(spec));// Update version- transformed.openapi = "3.1.0";+ transformed.openapi = '3.1.0';// Transform schemas recursivelyfunction transformSchema(schema: any): any {- if (!schema || typeof schema !== "object") return schema;+ if (!schema || typeof schema !== 'object') return schema;++ // Create a copy to avoid mutating the parameter+ const schemaCopy = { ...schema };// Handle array schemas - ensure items is properly defined- if (schema.type === "array") {- if (!schema.items || Object.keys(schema.items).length === 0) {- schema.items = { type: "string" }; // Default to string items+ if (schemaCopy.type === 'array') {+ if (!schemaCopy.items || Object.keys(schemaCopy.items).length === 0) {+ schemaCopy.items = { type: 'string' }; // Default to string items} else {- schema.items = transformSchema(schema.items);+ schemaCopy.items = transformSchema(schemaCopy.items);}}// Handle object schemas - fix empty additionalProperties- if (schema.type === "object") {+ if (schemaCopy.type === 'object') {if (- schema.additionalProperties !== undefined &&- typeof schema.additionalProperties === "object" &&- Object.keys(schema.additionalProperties).length === 0+ schemaCopy.additionalProperties !== undefined &&+ typeof schemaCopy.additionalProperties === 'object' &&+ Object.keys(schemaCopy.additionalProperties).length === 0) {- schema.additionalProperties = true; // Allow any additional properties+ schemaCopy.additionalProperties = true; // Allow any additional properties}// Transform nested properties- if (schema.properties) {- for (const [key, prop] of Object.entries(schema.properties)) {- schema.properties[key] = transformSchema(prop);+ if (schemaCopy.properties) {+ for (const [key, prop] of Object.entries(schemaCopy.properties)) {+ schemaCopy.properties[key] = transformSchema(prop);}}}// Handle binary format - convert to string with contentEncoding- if (schema.format === "binary") {- delete schema.format;- schema.type = "string";- schema.contentEncoding = "base64";+ if (schemaCopy.format === 'binary') {+ delete schemaCopy.format;+ schemaCopy.type = 'string';+ schemaCopy.contentEncoding = 'base64';}// Handle nullable fields (3.0.1 -> 3.1.0)- if (schema.nullable === true) {- delete schema.nullable;+ if (schemaCopy.nullable === true) {+ delete schemaCopy.nullable;// Convert to union type with null- if (schema.type) {- schema.type = Array.isArray(schema.type)- ? [...schema.type, "null"]- : [schema.type, "null"];+ if (schemaCopy.type) {+ schemaCopy.type = Array.isArray(schemaCopy.type) ? [...schemaCopy.type, 'null'] : [schemaCopy.type, 'null'];}}// Recursively transform nested schemas- if (schema.allOf) schema.allOf = schema.allOf.map(transformSchema);- if (schema.oneOf) schema.oneOf = schema.oneOf.map(transformSchema);- if (schema.anyOf) schema.anyOf = schema.anyOf.map(transformSchema);- if (schema.not) schema.not = transformSchema(schema.not);+ if (schemaCopy.allOf) schemaCopy.allOf = schemaCopy.allOf.map(transformSchema);+ if (schemaCopy.oneOf) schemaCopy.oneOf = schemaCopy.oneOf.map(transformSchema);+ if (schemaCopy.anyOf) schemaCopy.anyOf = schemaCopy.anyOf.map(transformSchema);+ if (schemaCopy.not) schemaCopy.not = transformSchema(schemaCopy.not);- return schema;+ return schemaCopy;}// Transform request/response schemas in pathsif (transformed.paths) {for (const pathItem of Object.values(transformed.paths)) {for (const operation of Object.values(pathItem as any)) {- if (typeof operation !== "object" || !operation) continue;+ if (typeof operation !== 'object' || !operation) continue;const op = operation as any;@@ -168,9 +160,7 @@ function transformOpenAPI301to310(spec: any): any {if (op.requestBody?.content) {for (const mediaObj of Object.values(op.requestBody.content)) {if ((mediaObj as any).schema) {- (mediaObj as any).schema = transformSchema(- (mediaObj as any).schema- );+ (mediaObj as any).schema = transformSchema((mediaObj as any).schema);}}}@@ -181,9 +171,7 @@ function transformOpenAPI301to310(spec: any): any {if ((response as any).content) {for (const mediaObj of Object.values((response as any).content)) {if ((mediaObj as any).schema) {- (mediaObj as any).schema = transformSchema(- (mediaObj as any).schema- );+ (mediaObj as any).schema = transformSchema((mediaObj as any).schema);}}}@@ -194,7 +182,7 @@ function transformOpenAPI301to310(spec: any): any {if (op.parameters) {op.parameters = op.parameters.map((param: any) => {if (param.schema) {- param.schema = transformSchema(param.schema);+ return { ...param, schema: transformSchema(param.schema) };}return param;});@@ -205,9 +193,7 @@ function transformOpenAPI301to310(spec: any): any {// Transform component schemasif (transformed.components?.schemas) {- for (const [name, schema] of Object.entries(- transformed.components.schemas- )) {+ for (const [name, schema] of Object.entries(transformed.components.schemas)) {transformed.components.schemas[name] = transformSchema(schema);}}@@ -215,13 +201,13 @@ function transformOpenAPI301to310(spec: any): any {return transformed;}-function splitOnSeparator(str = "", maxLen: number, separator = " .") {+function splitOnSeparator(maxLen: number, str = '', separator = ' .') {if (str.length <= maxLen) {return str;}// Find the last occurrence of the separator before maxLen- let idx = str.lastIndexOf(separator, maxLen);+ const idx = str.lastIndexOf(separator, maxLen);// If the separator is not found, return the substring up to maxLenif (idx === -1) {diff --git a/packages/runtime/src/modules/embodiment/modules/chatbot/routes/router.ts b/packages/runtime/src/modules/embodiment/modules/chatbot/routes/router.tsindex 859a6308..327b59f8 100644--- a/packages/runtime/src/modules/embodiment/modules/chatbot/routes/router.ts+++ b/packages/runtime/src/modules/embodiment/modules/chatbot/routes/router.ts@@ -1,17 +1,20 @@-import axios from "axios";-import express from "express";+import axios from 'axios';+import express from 'express';-import { AccessCandidate, Agent, BinaryInput } from "@smythos/sre";+import { Agent, Logger } from '@smythos/sre';-import config from "@core/config";-import { readAgentOAuthConfig } from "@core/helpers/agent.helper";-import { uploadHandler } from "@core/middlewares/uploadHandler.mw";+import config from '@core/config';+import { readAgentOAuthConfig } from '@core/helpers/agent.helper';+import { uploadHandler } from '@core/middlewares/uploadHandler.mw';+import { uploadFile } from '@embodiment/modules/chat/routes/router';-import { EMBODIMENT_TYPES } from "@embodiment/constants";-import { getChatGPTManifest } from "@embodiment/helpers/chatgpt.helper";-import agentLoader from "@embodiment/middlewares/agentLoader.mw";-import ChatbotLoader from "@embodiment/middlewares/ChatbotLoader.mw";-import { buildConversationId } from "@embodiment/utils/chat.utils";+import { EMBODIMENT_TYPES } from '@embodiment/constants';+import { getChatGPTManifest } from '@embodiment/helpers/chatgpt.helper';+import agentLoader from '@embodiment/middlewares/agentLoader.mw';+import ChatbotLoader from '@embodiment/middlewares/ChatbotLoader.mw';+import { buildConversationId } from '@embodiment/utils/chat.utils';++const console = Logger('[Embodiment] Router: Chatbot');// Import ChatbotResponse type for proper typingtype ChatbotResponse = {@@ -34,9 +37,9 @@ let localAgentAuthorizations = {};const middleweares = [agentLoader, ChatbotLoader];router.use(middleweares);-router.get("/", async (req, res) => {+router.get('/', async (req, res) => {const agent: Agent = req._agent;- //FIXME : using name as intro message his as a workaround+ // FIXME : using name as intro message his as a workaroundconst name = agent.name;const debugSessionEnabled = agent.debugSessionEnabled;const isTestDomain = agent.usingTestDomain;@@ -44,28 +47,17 @@ router.get("/", async (req, res) => {// wait for agent embodiments to be readyawait agent.agentSettings?.embodiments?.ready();- const chatbotName =- agent.agentSettings?.embodiments?.get(EMBODIMENT_TYPES.ChatBot, "name") ||- agent.name;- let introMessage =- agent.agentSettings?.embodiments?.get(- EMBODIMENT_TYPES.ChatBot,- "introMessage"- ) || "";- //escape string for javascript+ const _chatbotName = agent.agentSettings?.embodiments?.get(EMBODIMENT_TYPES.ChatBot, 'name') || agent.name;+ let introMessage = agent.agentSettings?.embodiments?.get(EMBODIMENT_TYPES.ChatBot, 'introMessage') || '';+ // escape string for javascriptintroMessage = introMessage.replace(/'/g, "\\'").replace(/"/g, '\\"');- const logo =- agent.agentSettings?.embodiments?.get(EMBODIMENT_TYPES.ChatBot, "icon") ||- "https://proxy-02.api.smyth.ai/static/img/icon.svg";- const colors = agent.agentSettings?.embodiments?.get(- EMBODIMENT_TYPES.ChatBot,- "colors"- );+ const logo = agent.agentSettings?.embodiments?.get(EMBODIMENT_TYPES.ChatBot, 'icon') || 'https://proxy-02.api.smyth.ai/static/img/icon.svg';+ const colors = agent.agentSettings?.embodiments?.get(EMBODIMENT_TYPES.ChatBot, 'colors');const { allowAttachments = true } = req.query;- let debugScript = "";+ let debugScript = '';if (isTestDomain || debugSessionEnabled) {debugScript = `<script src="/static/embodiment/chatBot/chatbot-debug.js"></script>@@ -101,20 +93,17 @@ initDebug('${config.env.UI_SERVER}', '${agent.id}');</html>`);});-router.get("/chat-configs", async (req: any, res) => {+router.get('/chat-configs', async (req: any, res) => {if (!req._chatbot) {- return res.status(404).send({ error: "Chatbot not found" });+ return res.status(404).send({ error: 'Chatbot not found' });}const agent: Agent = req._agent;- const pluginManifest = await getChatGPTManifest(- agent.domain,- agent.version- ).catch((error) => {+ const pluginManifest = await getChatGPTManifest(agent.domain, agent.version).catch(_error => {return null;});if (!pluginManifest) {- return res.status(404).send({ error: "Chatbot Config not found" });+ return res.status(404).send({ error: 'Chatbot Config not found' });}if (agent.usingTestDomain) {@@ -124,9 +113,10 @@ router.get("/chat-configs", async (req: any, res) => {res.send(chatbot.pluginManifest);});-router.post("/chat-stream", async (req, res) => {+// * NOTE: This endpoint will be deprecated and replaced by `/v1/emb/chat/stream`.+router.post('/chat-stream', async (req, res) => {let streamStarted = false;- const isLocalAgent = req.hostname.includes("localagent");+ const isLocalAgent = req.hostname.includes('localagent');const agentId = req._agent?.id;const agentVersion = req._agent?.version;const isDebugSession = req._agent.debugSessionEnabled;@@ -142,54 +132,50 @@ router.post("/chat-stream", async (req, res) => {const abortController = new AbortController();try {- let { message, attachments = [] } = req.body;+ let { message } = req.body;+ const { attachments = [] } = req.body;if (attachments.length > 0) {- message = [- message,- "###",- "Attachments:",- ...attachments.map((attachment) => `- ${attachment.url}`),- ].join("\n");+ message = [message, '###', 'Attachments:', ...attachments.map(attachment => `- ${attachment.url}`)].join('\n');}if (!req._chatbot) {- return res.status(404).send({ error: "Chatbot not found" });+ return res.status(404).send({ error: 'Chatbot not found' });}const chatbot = req._chatbot;- chatbot.conversationID = req.headers["x-conversation-id"] || req.sessionID;- const monitorId = req.headers["x-monitor-id"];+ chatbot.conversationID = req.headers['x-conversation-id'] || req.sessionID;+ const monitorId = req.headers['x-monitor-id'];const hasAttachments = attachments?.length > 0;- //TODO @AK : pass agent id and version in order to allow bypassing http call for agent invocation in conv manager- //const headers = { 'X-AGENT-ID': agentId, 'X-AGENT-VERSION': req._agent?.version };- const headers = isDebugSession+ // TODO @AK : pass agent id and version in order to allow bypassing http call for agent invocation in conv manager+ // const headers = { 'X-AGENT-ID': agentId, 'X-AGENT-VERSION': req._agent?.version };+ const headers: any = isDebugSession? {- "X-DEBUG": true,- "X-AGENT-ID": agentId,- "X-MONITOR-ID": monitorId,- "X-AGENT-REMOTE-CALL": hasAttachments, // for now, we're assuming that all attachments require injected agent which needs remote call- "x-conversation-id": chatbot.conversationID,+ 'X-DEBUG': true,+ 'X-AGENT-ID': agentId,+ 'X-MONITOR-ID': monitorId,+ 'X-AGENT-REMOTE-CALL': hasAttachments, // for now, we're assuming that all attachments require injected agent which needs remote call+ 'x-conversation-id': chatbot.conversationID,}: {- "X-AGENT-ID": agentId,- "X-MONITOR-ID": monitorId,- "X-AGENT-VERSION": agentVersion,- "X-AGENT-REMOTE-CALL": hasAttachments,- "x-conversation-id": chatbot.conversationID,+ 'X-AGENT-ID': agentId,+ 'X-MONITOR-ID': monitorId,+ 'X-AGENT-VERSION': agentVersion,+ 'X-AGENT-REMOTE-CALL': hasAttachments,+ 'x-conversation-id': chatbot.conversationID,};if (verifiedKey) {- headers["Authorization"] = `Bearer ${verifiedKey}`;+ headers.Authorization = `Bearer ${verifiedKey}`;}// Set up an event listener for client disconnection- req.on("close", () => {+ req.on('close', () => {abortController.abort();});- //set response headers- res.setHeader("Content-Type", "text/event-stream");- res.setHeader("Cache-Control", "no-cache");- res.setHeader("Connection", "keep-alive");+ // set response headers+ res.setHeader('Content-Type', 'text/event-stream');+ res.setHeader('Cache-Control', 'no-cache');+ res.setHeader('Connection', 'keep-alive');await chatbot.getChatStreaming({message,@@ -207,9 +193,9 @@ router.post("/chat-stream", async (req, res) => {console.error(error);if (!streamStarted) {res.status(500).send({- content: error?.message || "An error occurred. Please try again later.",+ content: error?.message || 'An error occurred. Please try again later.',isError: true,- errorType: "api_error",+ errorType: 'api_error',});} else {// Stream error message in the same format as normal responses@@ -217,36 +203,33 @@ router.post("/chat-stream", async (req, res) => {JSON.stringify({content: "I'm not able to contact the server. Please try again.",isError: true,- errorType: "connection_error",- })+ errorType: 'connection_error',+ }),);res.end();}}});-router.get("/params", async (req, res) => {+router.get('/params', async (req, res) => {if (!req._chatbot) {- return res.status(404).send({ error: "Chatbot not found" });+ return res.status(404).send({ error: 'Chatbot not found' });}const agent: Agent = req._agent;- let sessionData = req.session;+ const sessionData = req.session;// wait for agent settings and embodiments to be ready// await agent.agentSettings?.ready();// await agent.agentSettings?.embodiments?.ready();- let promises = [- agent.agentSettings?.ready(),- agent.agentSettings?.embodiments?.ready(),- ];+ const promises = [agent.agentSettings?.ready(), agent.agentSettings?.embodiments?.ready()];let authInfo;if (!!agent?.data?.auth) {- const oauthPromise = readAgentOAuthConfig(agent?.data).then((_auth) => {+ const oauthPromise = readAgentOAuthConfig(agent?.data).then(_auth => {authInfo = _auth;});promises.push(oauthPromise);@@ -255,9 +238,7 @@ router.get("/params", async (req, res) => {await Promise.all(promises);// Determine if the chatbot is enabled- let isChatbotEnabled =- agent?.agentSettings?.get(EMBODIMENT_TYPES.ChatBot.toLowerCase()) ===- "true";+ let isChatbotEnabled = agent?.agentSettings?.get(EMBODIMENT_TYPES.ChatBot.toLowerCase()) === 'true';if (agent && agent.usingTestDomain) {isChatbotEnabled = true; // Chatbot is always enabled on test domain@@ -271,33 +252,24 @@ router.get("/params", async (req, res) => {}// Retrieve chatbot properties- const chatbotProperties =- agent.agentSettings?.embodiments?.get(EMBODIMENT_TYPES.ChatBot) || {};+ const chatbotProperties = agent.agentSettings?.embodiments?.get(EMBODIMENT_TYPES.ChatBot) || {};// If chatbot properties exist, append the 'chatbotEnabled' flagif (chatbotProperties) {- const isLocalAgent = req.hostname.includes("localagent");+ const isLocalAgent = req.hostname.includes('localagent');const agentId = agent?.id;- const chatbotName =- agent.agentSettings?.embodiments.get(EMBODIMENT_TYPES.ChatBot, "name") ||- agent.name;+ const chatbotName = agent.agentSettings?.embodiments.get(EMBODIMENT_TYPES.ChatBot, 'name') || agent.name;const sessionAuthorized = isLocalAgent- ? !!localAgentAuthorizations?.[agentId]?.verifiedKey &&- localAgentAuthorizations?.[agentId]?.authMethod === authInfo?.method- : !!sessionData?.agentAuthorizations?.[agentId]?.verifiedKey &&- sessionData?.agentAuthorizations?.[agentId]?.authMethod ===- authInfo?.method;-- const agentUrl = isLocalAgent- ? `http://${req.hostname}:${config.env.AGENT_DOMAIN_PORT}`- : `https://${req.hostname}`;+ ? !!localAgentAuthorizations?.[agentId]?.verifiedKey && localAgentAuthorizations?.[agentId]?.authMethod === authInfo?.method+ : !!sessionData?.agentAuthorizations?.[agentId]?.verifiedKey && sessionData?.agentAuthorizations?.[agentId]?.authMethod === authInfo?.method;++ const agentUrl = isLocalAgent ? `http://${req.hostname}:${config.env.AGENT_DOMAIN_PORT}` : `https://${req.hostname}`;const redirectUri = `${agentUrl}/chatbot/callback`;const authorizationUrl = `${agentUrl}/oauth/authorize?response_type=code&client_id=${authInfo?.provider?.clientID}&redirect_uri=${redirectUri}`;const isAuthRequired = () => {- const isAuthDisabled =- agent?.debugSessionEnabled && agent.usingTestDomain;+ const isAuthDisabled = agent?.debugSessionEnabled && agent.usingTestDomain;const hasAuthMethod = !!authInfo?.method;const isNotAuthorized = !sessionAuthorized;return !isAuthDisabled && hasAuthMethod && isNotAuthorized;@@ -312,10 +284,10 @@ router.get("/params", async (req, res) => {authRequired: isAuthRequired(),auth: {method: authInfo?.method,- redirectUri: redirectUri,- authorizationUrl: authorizationUrl,+ redirectUri,+ authorizationUrl,clientID: authInfo?.provider?.clientID,- redirectInternalEndpoint: "/chatbot/callback",+ redirectInternalEndpoint: '/chatbot/callback',},});@@ -324,13 +296,11 @@ router.get("/params", async (req, res) => {//* Note: chatbot conversations are not created in db table, it is just a uid created on the fly//* On the other hand, Agent Chat conversations are created in db table and can be retrieved from db- const isTestDomain = req.hostname.includes(- `.${config.env.DEFAULT_AGENT_DOMAIN}`- );+ const isTestDomain = req.hostname.includes(`.${config.env.DEFAULT_AGENT_DOMAIN}`);const conversationId = buildConversationId(undefined, isTestDomain);chatbotProperties.headers = {- "x-conversation-id": conversationId,+ 'x-conversation-id': conversationId,};res.send(chatbotProperties);@@ -340,15 +310,10 @@ router.get("/params", async (req, res) => {}});-function setSessionToken(- req: any,- res: any,- token: string,- authMethod: string-) {+function setSessionToken(req: any, res: any, token: string, authMethod: string) {const agentId = req._agent?.id;if (!agentId) {- console.error("Agent ID not found in request");+ console.error('Agent ID not found in request');return;}@@ -357,24 +322,24 @@ function setSessionToken(}req.session.agentAuthorizations[agentId] = {verifiedKey: token,- authMethod: authMethod,+ authMethod,};- req.session.save((err) => {+ req.session.save(err => {if (err) {- console.error("Error saving session:", err);+ console.error('Error saving session:', err);}});}function handleLocalAgent(req: any, token: string, authMethod: string) {const agentId = req._agent?.id;- if (req._agent?.domain?.includes("localagent")) {+ if (req._agent?.domain?.includes('localagent')) {if (!localAgentAuthorizations) {localAgentAuthorizations = {};}localAgentAuthorizations[agentId] = {verifiedKey: token,- authMethod: authMethod,+ authMethod,};}}@@ -382,11 +347,7 @@ function handleLocalAgent(req: any, token: string, authMethod: string) {async function handleOAuthCallback(req: any, res: any) {if (req.query.code) {const authInfo = await getAuthInfo(req);- const accessToken = await exchangeCodeForToken(- req.query.code,- req._agent?.domain,- authInfo- );+ const accessToken = await exchangeCodeForToken(req.query.code, req._agent?.domain, authInfo);if (accessToken) {const token = accessToken.access_token;setSessionToken(req, res, token, authInfo?.method);@@ -397,7 +358,7 @@ async function handleOAuthCallback(req: any, res: any) {async function getAuthInfo(req: any) {if (req._agent?.data?.auth) {- return await readAgentOAuthConfig(req._agent.data);+ return readAgentOAuthConfig(req._agent.data);}return null;}@@ -419,15 +380,9 @@ function sendCloseTabResponse(res: any) {</html>`);}-async function exchangeCodeForToken(- code: string,- domain: string,- authInfo: any-): Promise<any> {- const isLocalAgent = domain.includes("localagent");- const baseUrl = isLocalAgent- ? `http://${domain}:${config.env.PORT}`- : `https://${domain}`;+async function exchangeCodeForToken(code: string, domain: string, authInfo: any): Promise<any> {+ const isLocalAgent = domain.includes('localagent');+ const baseUrl = isLocalAgent ? `http://${domain}:${config.env.PORT}` : `https://${domain}`;const tokenEndpoint = `${baseUrl}/oauth/token`;const redirectUri = `${baseUrl}/chatbot/callback`;@@ -435,11 +390,11 @@ async function exchangeCodeForToken(const clientSecret = authInfo?.provider?.clientSecret;if (!clientId || !clientSecret) {- throw new Error("Missing client ID or client secret");+ throw new Error('Missing client ID or client secret');}const params = new URLSearchParams({- grant_type: "authorization_code",+ grant_type: 'authorization_code',code,redirect_uri: redirectUri,client_id: clientId,@@ -450,92 +405,44 @@ async function exchangeCodeForToken(const response = await axios.post(tokenEndpoint, params);return response.data;} catch (error) {- console.error("Error exchanging code for token:", error);+ console.error('Error exchanging code for token:', error);throw error;}}-router.post("/verify-chat-key", async (req: any, res) => {+router.post('/verify-chat-key', async (req: any, res) => {if (!req._chatbot) {- return res.status(404).json({ error: "Chatbot not found" });+ return res.status(404).json({ error: 'Chatbot not found' });}const { apiKey } = req.body;const agent: Agent = req._agent;try {- const authInfo = agent?.data?.auth- ? await readAgentOAuthConfig(agent.data)- : null;+ const authInfo = agent?.data?.auth ? await readAgentOAuthConfig(agent.data) : null;if (apiKey !== authInfo?.provider?.token) {- return res.status(401).json({ error: "Invalid API key", success: false });+ return res.status(401).json({ error: 'Invalid API key', success: false });}setSessionToken(req, res, apiKey, authInfo?.method);handleLocalAgent(req, apiKey, authInfo?.method);- return res.json({ message: "Access granted", success: true });+ return res.json({ message: 'Access granted', success: true });} catch (error) {- console.error("Error verifying chat key:", error);- return res- .status(500)- .json({ error: "Internal server error", success: false });+ console.error('Error verifying chat key:', error);++ return res.status(500).json({ error: 'Internal server error', success: false });}});-router.get("/callback", async (req: any, res) => {+router.get('/callback', async (req: any, res) => {await handleOAuthCallback(req, res);sendCloseTabResponse(res);});-router.post("/upload", uploadHandler, async (req: any, res) => {- try {- if (!req.files || req.files.length === 0) {- return res.status(400).json({ error: "No files uploaded" });- }-- const agent = req._agent;- const uploadedFiles = [];-- for (const file of req.files) {- try {- const candidate = AccessCandidate.agent(agent.id);- const binaryInput = BinaryInput.from(- file.buffer,- null,- file.mimetype,- candidate- );- await binaryInput.ready();- // getJsonData implicitly uploads the file to SmythFS- const fileData = await binaryInput.getJsonData(- candidate,- MAX_TTL_CHATBOT_FILE_UPLOAD- );-- uploadedFiles.push({- size: file.size,- url: fileData.url,- mimetype: file.mimetype,- originalName: file.originalname,- });- } catch (error) {- console.error("Error uploading file:", file.originalname, error);- }- }-- res.json({- success: true,- files: uploadedFiles,- });- } catch (error) {- console.error("Error handling file upload:", error);- res.status(500).json({- success: false,- error: "Failed to process file upload",- });- }-});+// Delegate chatbot upload to the unified chat/upload handler+// * NOTE: This endpoint will be deprecated and replaced by `/v1/emb/chat/upload`.+router.post('/upload', uploadHandler, uploadFile);export { router as chatBotRouter };diff --git a/packages/runtime/src/modules/embodiment/modules/formPreview/routes/router.ts b/packages/runtime/src/modules/embodiment/modules/formPreview/routes/router.tsindex f6792626..a15d9d47 100644--- a/packages/runtime/src/modules/embodiment/modules/formPreview/routes/router.ts+++ b/packages/runtime/src/modules/embodiment/modules/formPreview/routes/router.ts@@ -1,15 +1,15 @@-import config from "@core/config";-import { callSkill } from "@embodiment/helpers/formPreview.helper";-import agentLoader from "@embodiment/middlewares/agentLoader.mw";-import { Agent } from "@smythos/sre";-import express from "express";+import config from '@core/config';+import { callSkill } from '@embodiment/helpers/formPreview.helper';+import agentLoader from '@embodiment/middlewares/agentLoader.mw';+import { Agent } from '@smythos/sre';+import express from 'express';const router = express.Router();const middlewares = [agentLoader];router.use(middlewares);-router.get("/", async (req, res) => {+router.get('/', async (req, res) => {const agent: Agent = req._agent;res.send(`@@ -34,14 +34,14 @@ router.get("/", async (req, res) => {</html>`);});-router.get("/params", async (req, res) => {+router.get('/params', async (req, res) => {const agent: Agent = req._agent;- let promises = [agent.agentSettings?.ready()];+ const promises = [agent.agentSettings?.ready()];await Promise.all(promises);- const isLocalAgent = req.hostname.includes("localagent");+ const isLocalAgent = req.hostname.includes('localagent');const agentId = agent?.id;const port = isLocalAgent ? config.env.AGENT_DOMAIN_PORT : undefined;@@ -56,18 +56,16 @@ router.get("/params", async (req, res) => {res.send(agentData);});-router.post("/call-skill", async (req, res) => {+router.post('/call-skill', async (req, res) => {const agent: Agent = req._agent;const agentId = agent?.id;const { componentId, payload, version } = req.body;- const component = (agent.data as Agent).components.find(- (c) => c.id === componentId- );+ const component = (agent.data as Agent).components.find(c => c.id === componentId);if (!component) {- res.status(404).send({ error: "Component not found" });+ res.status(404).send({ error: 'Component not found' });}const response = await callSkill({@@ -75,7 +73,7 @@ router.post("/call-skill", async (req, res) => {body: {componentId: componentId as string,payload: payload as Record<string, any>,- version: version as "dev" | "latest",+ version: version as 'dev' | 'latest',},endpoint: component.data.endpoint!,});diff --git a/packages/runtime/src/modules/embodiment/modules/mcp/routes/router.ts b/packages/runtime/src/modules/embodiment/modules/mcp/routes/router.tsindex 9b30a1c9..f40ff803 100644--- a/packages/runtime/src/modules/embodiment/modules/mcp/routes/router.ts+++ b/packages/runtime/src/modules/embodiment/modules/mcp/routes/router.ts@@ -1,49 +1,31 @@-import express from "express";-import agentLoader from "@embodiment/middlewares/agentLoader.mw";-import { Agent } from "@smythos/sre";-import { getOpenAPIJSON } from "@embodiment/helpers/openapi-adapter.helper";-import { Server } from "@modelcontextprotocol/sdk/server/index.js";-import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";-import {- CallToolRequestSchema,- ListToolsRequestSchema,- Tool,-} from "@modelcontextprotocol/sdk/types.js";-import { AgentProcess } from "@smythos/sre";-import {- extractMCPToolSchema,- formatMCPSchemaProperties,- isMcpEnabled,-} from "../services/mcp.services";+import express from 'express';+import agentLoader from '@embodiment/middlewares/agentLoader.mw';+import { Agent, AgentProcess } from '@smythos/sre';+import { getOpenAPIJSON } from '@embodiment/helpers/openapi-adapter.helper';+import { Server } from '@modelcontextprotocol/sdk/server/index.js';+import { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js';+import { CallToolRequestSchema, ListToolsRequestSchema, Tool } from '@modelcontextprotocol/sdk/types.js';+import { extractMCPToolSchema, formatMCPSchemaProperties, isMcpEnabled } from '../services/mcp.services';+const router = express.Router();-//let transport: SSEServerTransport;-const clientTransports = new Map<- string,- { transport: SSEServerTransport; server: Server }->();+// let transport: SSEServerTransport;+const clientTransports = new Map<string, { transport: SSEServerTransport; server: Server }>();-router.get("/sse", agentLoader, async (req: any, res) => {+router.get('/sse', agentLoader, async (req: any, res) => {try {const agent: Agent = req._agent;- if (agent?.data?.auth?.method && agent?.data?.auth?.method !== "none") {+ if (agent?.data?.auth?.method && agent?.data?.auth?.method !== 'none') {return res.status(400).send({- error: "Agents with authentication enabled are not supported for MCP",+ error: 'Agents with authentication enabled are not supported for MCP',});}await agent.agentSettings?.ready();const isEnabled = isMcpEnabled(agent);if (!isEnabled) {- return res- .status(503)- .send({ error: "MCP is not enabled for this agent" });+ return res.status(503).send({ error: 'MCP is not enabled for this agent' });}- const openAPISpec = await getOpenAPIJSON(- agent,- "localhost",- "latest",- true- );+ const openAPISpec = await getOpenAPIJSON(agent, 'localhost', 'latest', true);// Server implementationconst server = new Server(@@ -55,81 +37,74 @@ router.get("/sse", agentLoader, async (req: any, res) => {capabilities: {tools: {},},- }+ },);- req.on("error", (error: any) => {- console.error("Error:", error);+ req.on('error', (error: any) => {+ console.error('Error:', error);// server.close();});// Handle client disconnect- req.on("close", () => {- console.log("Client disconnected");+ req.on('close', () => {+ console.log('Client disconnected');clientTransports.delete(transport.sessionId);// server.close();});server.onerror = (error: any) => {- console.error("Server error:", error);+ console.error('Server error:', error);// server.close();};server.onclose = async () => {- console.log("Server closing");+ console.log('Server closing');// await server.close();// process.exit(0);};// Extract available endpoints and their methods- const tools: Tool[] = Object.entries(openAPISpec.paths).map(- ([path, methods]) => {- const method = Object.keys(methods)[0];- const endpoint = path.split("/api/")[1];- const operation = methods[method];- const schema = extractMCPToolSchema(operation, method);- const properties = formatMCPSchemaProperties(schema);-- return {- name: endpoint,- description:- operation.summary ||- `Endpoint that handles ${method.toUpperCase()} requests to ${endpoint}. ` +- `${schema?.description || ""}`,- inputSchema: {- type: "object",- properties: properties,- required: schema?.required || [],- },- };- }- );+ const tools: Tool[] = Object.entries(openAPISpec.paths).map(([path, methods]) => {+ const method = Object.keys(methods)[0];+ const endpoint = path.split('/api/')[1];+ const operation = methods[method];+ const schema = extractMCPToolSchema(operation, method);+ const properties = formatMCPSchemaProperties(schema);++ return {+ name: endpoint,+ description: operation.summary || `Endpoint that handles ${method.toUpperCase()} requests to ${endpoint}. ` + `${schema?.description || ''}`,+ inputSchema: {+ type: 'object',+ properties,+ required: schema?.required || [],+ },+ };+ });// Tool handlersserver.setRequestHandler(ListToolsRequestSchema, async () => ({tools,}));- server.setRequestHandler(CallToolRequestSchema, async (request) => {+ server.setRequestHandler(CallToolRequestSchema, async request => {try {const { name, arguments: args } = request.params;if (!args) {- throw new Error("No arguments provided");+ throw new Error('No arguments provided');}// Find the matching tool from our tools array- const tool = tools.find((t) => t.name === name);+ const tool = tools.find(t => t.name === name);if (!tool) {return {- content: [{ type: "text", text: `Unknown tool: ${name}` }],+ content: [{ type: 'text', text: `Unknown tool: ${name}` }],isError: true,};}try {// Extract method and path from OpenAPI spec- const pathEntry = Object.entries(openAPISpec.paths).find(- ([path]) => path.split("/api/")[1] === name- );+ const pathEntry = Object.entries(openAPISpec.paths).find(([path]) => path.split('/api/')[1] === name);if (!pathEntry) {throw new Error(`Could not find path for tool: ${name}`);}@@ -139,20 +114,20 @@ router.get("/sse", agentLoader, async (req: any, res) => {// Process the request through the agentconst result = await AgentProcess.load(agent.data).run({- method: method,- path: path,+ method,+ path,body: args,});return {- content: [{ type: "text", text: JSON.stringify(result) }],+ content: [{ type: 'text', text: JSON.stringify(result) }],isError: false,};} catch (error) {return {content: [{- type: "text",+ type: 'text',text: `Error processing request: ${error.message}`,},],@@ -163,10 +138,8 @@ router.get("/sse", agentLoader, async (req: any, res) => {return {content: [{- type: "text",- text: `Error: ${- error instanceof Error ? error.message : String(error)- }`,+ type: 'text',+ text: `Error: ${error instanceof Error ? error.message : String(error)}`,},],isError: true,@@ -174,24 +147,24 @@ router.get("/sse", agentLoader, async (req: any, res) => {}});- const transport = new SSEServerTransport("/emb/mcp/message", res);+ const transport = new SSEServerTransport('/emb/mcp/message', res);await server.connect(transport);clientTransports.set(transport.sessionId, { transport, server });- console.log("Generated sessionId", transport.sessionId);- console.log("MCP Server running on sse");+ console.log('Generated sessionId', transport.sessionId);+ console.log('MCP Server running on sse');} catch (error: any) {console.error(error);return res.status(500).send({ error: error.message });}});-router.post("/message", async (req, res) => {+router.post('/message', async (req, res) => {const sessionId = req.query.sessionId;- console.log("Received sessionId", sessionId);+ console.log('Received sessionId', sessionId);const transport = clientTransports.get(sessionId as string)?.transport;if (!transport) {- return res.status(404).send({ error: "Transport not found" });+ return res.status(404).send({ error: 'Transport not found' });}await transport.handlePostMessage(req, res, req.body);});diff --git a/packages/runtime/src/modules/embodiment/modules/mcp/services/mcp.services.ts b/packages/runtime/src/modules/embodiment/modules/mcp/services/mcp.services.tsindex acac4552..33869f26 100644--- a/packages/runtime/src/modules/embodiment/modules/mcp/services/mcp.services.ts+++ b/packages/runtime/src/modules/embodiment/modules/mcp/services/mcp.services.ts@@ -1,5 +1,6 @@-import { Agent } from "@smythos/sre";-const MCP_SETTINGS_KEY = "mcp";+import { Agent } from '@smythos/sre';++const MCP_SETTINGS_KEY = 'mcp';export const isMcpEnabled = (agent: Agent) => {if (agent.usingTestDomain) {@@ -21,15 +22,15 @@ export const isMcpEnabled = (agent: Agent) => {};export function extractMCPToolSchema(jsonSpec: any, method: string) {- if (method.toLowerCase() === "get") {+ if (method.toLowerCase() === 'get') {const schema = jsonSpec?.parameters;if (!schema) return {};const properties = {};const required = [];- schema.forEach((param) => {- if (param.in === "query") {+ schema.forEach(param => {+ if (param.in === 'query') {properties[param.name] = param.schema;if (param.required) {required.push(param.name);@@ -38,12 +39,12 @@ export function extractMCPToolSchema(jsonSpec: any, method: string) {});return {- type: "object",+ type: 'object',properties,required,};}- const schema = jsonSpec?.requestBody?.content?.["application/json"]?.schema;+ const schema = jsonSpec?.requestBody?.content?.['application/json']?.schema;return schema;}@@ -52,11 +53,11 @@ export function formatMCPSchemaProperties(schema: any) {for (const property in properties) {const propertySchema = properties[property];- if (propertySchema.type === "array") {+ if (propertySchema.type === 'array') {properties[property] = {- type: "array",+ type: 'array',items: {- type: ["string", "number", "boolean", "object", "array"],+ type: ['string', 'number', 'boolean', 'object', 'array'],},};}diff --git a/packages/runtime/src/modules/embodiment/modules/openai/routes/router.ts b/packages/runtime/src/modules/embodiment/modules/openai/routes/router.tsindex de48824d..a2128f95 100644--- a/packages/runtime/src/modules/embodiment/modules/openai/routes/router.ts+++ b/packages/runtime/src/modules/embodiment/modules/openai/routes/router.ts@@ -1,19 +1,17 @@-import {- DEFAULT_AGENT_MODEL_SETTINGS_KEY,- DEFAULT_MODEL,-} from "@core/constants";-import { validate } from "@core/middlewares/validate.mw";-import { extractBearerToken } from "@core/services/smythAPIReq";-import ApiError from "@core/utils/apiError";-import agentLoader from "@embodiment/middlewares/agentLoader.mw";-import { chatService } from "@embodiment/modules/openai/services/chat.service";-import { chatValidations } from "@embodiment/modules/openai/validations/openai.validation";-import { Logger } from "@smythos/sre";-import { Request, Response, Router } from "express";-import OpenAI from "openai";-import { Readable } from "stream";+import { DEFAULT_AGENT_MODEL_SETTINGS_KEY, DEFAULT_MODEL } from '@core/constants';+import { validate } from '@core/middlewares/validate.mw';+import { extractBearerToken } from '@core/services/smythAPIReq';+import ApiError from '@core/utils/apiError';+import agentLoader from '@embodiment/middlewares/agentLoader.mw';+import { chatService } from '@embodiment/modules/openai/services/chat.service';+import { chatValidations } from '@embodiment/modules/openai/validations/openai.validation';+import { Logger } from '@smythos/sre';+import { Request, Response, Router } from 'express';+import OpenAI from 'openai';+import { Readable } from 'stream';+const router = Router();-const console = Logger("[Embodiment] Router: OpenAI");+const console = Logger('[Embodiment] Router: OpenAI');// Helper function to create OpenAI API errorsconst createOpenAIError = (statusCode: number, error: any) => {@@ -25,70 +23,63 @@ const createOpenAIError = (statusCode: number, error: any) => {type: error?.name,},error?.message,- null+ null,);};-router.post(- "/v1/chat/completions",- agentLoader,- validate(chatValidations.chatCompletion),- async (req: Request & { _agent: any }, res: Response) => {- try {- const agent = req._agent;-- // wait for agent settings to be ready- await agent.agentSettings?.ready();-- const model =- agent.agentSettings?.get(DEFAULT_AGENT_MODEL_SETTINGS_KEY) ||- DEFAULT_MODEL;-- const authHeader = req.headers["authorization"];- const apiKey = extractBearerToken(authHeader);-- const result = await chatService.chatCompletion({- apiKey,- modelId: model,- params: req.body,- options: req.query,- agent,- });+router.post('/v1/chat/completions', agentLoader, validate(chatValidations.chatCompletion), async (req: Request & { _agent: any }, res: Response) => {+ try {+ const agent = req._agent;++ // wait for agent settings to be ready+ await agent.agentSettings?.ready();++ const model = agent.agentSettings?.get(DEFAULT_AGENT_MODEL_SETTINGS_KEY) || DEFAULT_MODEL;- if (result instanceof ApiError) {- const error = createOpenAIError(result.statusCode, result);- return res.status(result.statusCode).json(error);- }+ const authHeader = req.headers.authorization;+ const apiKey = extractBearerToken(authHeader);- if (result instanceof Readable) {- // Set proper headers for SSE- res.setHeader("Content-Type", "text/event-stream");- res.setHeader("Cache-Control", "no-cache");- res.setHeader("Connection", "keep-alive");+ const result = await chatService.chatCompletion({+ apiKey,+ modelId: model,+ params: req.body,+ options: req.query,+ agent,+ });- let headersSent = false;+ if (result instanceof ApiError) {+ const error = createOpenAIError(result.statusCode, result);+ return res.status(result.statusCode).json(error);+ }++ if (result instanceof Readable) {+ // Set proper headers for SSE+ res.setHeader('Content-Type', 'text/event-stream');+ res.setHeader('Cache-Control', 'no-cache');+ res.setHeader('Connection', 'keep-alive');- result.on("error", (error: any) => {- console.warn("Chat completion error:", error);+ const headersSent = false;- const status = error?.status || 500;+ result.on('error', (error: any) => {+ console.warn('Chat completion error:', error);- const apiError = createOpenAIError(status, error);- res.status(status).json(apiError);- });+ const status = error?.status || 500;- result.pipe(res);- } else {- res.json(result);- }- } catch (error) {- console.warn("Chat completion error:", error);+ const apiError = createOpenAIError(status, error);+ res.status(status).json(apiError);+ });- const status = error?.status || 500;- const apiError = createOpenAIError(status, error);- return res.status(status).json(apiError);+ result.pipe(res);+ } else {+ res.json(result);}+ } catch (error) {+ console.warn('Chat completion error:', error);++ const status = error?.status || 500;+ const apiError = createOpenAIError(status, error);+ return res.status(status).json(apiError);}-);+});export { router as openaiRouter };diff --git a/packages/runtime/src/modules/embodiment/modules/openai/services/chat.service.ts b/packages/runtime/src/modules/embodiment/modules/openai/services/chat.service.tsindex 2141a0c8..83ec852e 100644--- a/packages/runtime/src/modules/embodiment/modules/openai/services/chat.service.ts+++ b/packages/runtime/src/modules/embodiment/modules/openai/services/chat.service.ts@@ -1,19 +1,13 @@-import crypto from "crypto";-import { OpenAI } from "openai";-import { Readable } from "stream";+import crypto from 'crypto';+import { OpenAI } from 'openai';+import { Readable } from 'stream';-import {- AccessCandidate,- Agent,- ConnectorService,- Conversation,- Logger,-} from "@smythos/sre";+import { AccessCandidate, Agent, ConnectorService, Conversation, Logger } from '@smythos/sre';-import ApiError from "@core/utils/apiError";-import { getAgentIdAndVersion } from "@core/helpers/agent.helper";+import ApiError from '@core/utils/apiError';+import { getAgentIdAndVersion } from '@core/helpers/agent.helper';-const console = Logger("[Embodiment] Service: OpenAI Chat");+const console = Logger('[Embodiment] Service: OpenAI Chat');interface ChatCompletionParams {apiKey: string;@@ -32,14 +26,12 @@ class OpenAIChatService {params,options,agent,- }: ChatCompletionParams): Promise<- OpenAI.Chat.Completions.ChatCompletion | Readable | ApiError- > {+ }: ChatCompletionParams): Promise<OpenAI.Chat.Completions.ChatCompletion | Readable | ApiError> {const { agentId, agentVersion } = getAgentIdAndVersion(params.model);- console.log("parsed agentId and agentVersion", agentId, agentVersion);+ console.log('parsed agentId and agentVersion', agentId, agentVersion);if (!apiKey) {- return new ApiError(401, "Invalid Authentication", "Unauthorized");+ return new ApiError(401, 'Invalid Authentication', 'Unauthorized');}// TODO: move this to the agent loader middleware@@ -48,19 +40,19 @@ class OpenAIChatService {const exists = await vaultConnector.user(accessCandidate).exists(apiKey)- .catch((error) => {- console.error("Error checking if api key exists:", error);+ .catch(error => {+ console.error('Error checking if api key exists:', error);return false;});if (!exists) {- return new ApiError(401, "Incorrect API key provided", "Unauthorized");+ return new ApiError(401, 'Incorrect API key provided', 'Unauthorized');}const systemPrompt = params.messages- .filter((m) => m.role === "system")- .map((m) => m.content)- .join("\n");+ .filter(m => m.role === 'system')+ .map(m => m.content)+ .join('\n');// Adapt the model based on the user's plan, especially to support certain OpenAI models for legacy users with limited tokens without their own API key.const conv = new Conversation(modelId, agentId, { agentVersion });@@ -69,21 +61,18 @@ class OpenAIChatService {conv.systemPrompt += `\n\n######\n\n${systemPrompt}`;}- const history = params.messages.filter((m) => m.role !== "system");- const lastUserMessageIndx =- history.length -- 1 -- [...history].reverse().findIndex((m) => m.role === "user");+ const history = params.messages.filter(m => m.role !== 'system');+ const lastUserMessageIndx = history.length - 1 - [...history].reverse().findIndex(m => m.role === 'user');// remove the last user message from the historyconst lastUserMessage = history.splice(lastUserMessageIndx, 1)[0];for (const message of history) {switch (message.role) {- case "user":+ case 'user':const id = crypto.randomUUID();conv.context.addUserMessage(message.content as string, id);break;- case "assistant":+ case 'assistant':const id2 = crypto.randomUUID();conv.context.addAssistantMessage(message.content as string, id2);break;@@ -97,11 +86,11 @@ class OpenAIChatService {read() {},});- conv.on("content", (content) => {+ conv.on('content', content => {const now = Date.now();const preparedContent: OpenAI.Chat.Completions.ChatCompletionChunk = {id: completionId,- object: "chat.completion.chunk",+ object: 'chat.completion.chunk',created: now,model: params.model,choices: [{ index: 0, delta: { content }, finish_reason: null }],@@ -110,7 +99,7 @@ class OpenAIChatService {readable.push(`data: ${JSON.stringify(preparedContent)}\n\n`);});- //Removed : passthrough content is now returned as normal content in the content event+ // Removed : passthrough content is now returned as normal content in the content event// conv.on('agentCallback', (content) => {// const now = Date.now();// const preparedContent: OpenAI.Chat.Completions.ChatCompletionChunk = {@@ -124,9 +113,9 @@ class OpenAIChatService {// readable.push(`data: ${JSON.stringify(preparedContent)}\n\n`);// });- conv.on("beforeToolCall", (info) => {+ conv.on('beforeToolCall', info => {const now = Date.now();- console.log("Before Tool Call:", info);+ console.log('Before Tool Call:', info);// tool name info?.tool?.nameif (!options?.include_status) return;@@ -138,7 +127,7 @@ class OpenAIChatService {}[];} = {id: completionId,- object: "chat.completion.chunk",+ object: 'chat.completion.chunk',created: now,model: params.model,choices: [@@ -146,7 +135,7 @@ class OpenAIChatService {finish_reason: null,index: 0,delta: {- content: "",+ content: '',status: info?.tool?.name,},},@@ -155,9 +144,9 @@ class OpenAIChatService {readable.push(`data: ${JSON.stringify(toolStatusChunk)}\n\n`);});- conv.on("toolCall", (info) => {+ conv.on('toolCall', info => {const now = Date.now();- console.debug("Tool Call:", info);+ console.debug('Tool Call:', info);const toolStatusChunk: OpenAI.Chat.Completions.ChatCompletionChunk & {choices: {index: number;@@ -166,7 +155,7 @@ class OpenAIChatService {}[];} = {id: completionId,- object: "chat.completion.chunk",+ object: 'chat.completion.chunk',created: now,model: params.model,choices: [@@ -175,10 +164,10 @@ class OpenAIChatService {index: 0,delta: {smyth_event: {- type: "toolCall",+ type: 'toolCall',content: info?.tool?.name,},- content: "",+ content: '',},},],@@ -186,9 +175,9 @@ class OpenAIChatService {readable.push(`data: ${JSON.stringify(toolStatusChunk)}\n\n`);});- conv.on("usage", (usage) => {+ conv.on('usage', usage => {const now = Date.now();- console.debug("Usage:", usage);+ console.debug('Usage:', usage);// tool name info?.tool?.name// if (!options?.include_status) return;@@ -200,7 +189,7 @@ class OpenAIChatService {}[];} = {id: completionId,- object: "chat.completion.chunk",+ object: 'chat.completion.chunk',created: now,model: params.model,choices: [@@ -209,10 +198,10 @@ class OpenAIChatService {index: 0,delta: {smyth_event: {- type: "usage",+ type: 'usage',content: usage,},- content: "",+ content: '',},},],@@ -220,43 +209,43 @@ class OpenAIChatService {readable.push(`data: ${JSON.stringify(toolStatusChunk)}\n\n`);});- conv.on("end", () => {- console.log("streaming: [DONE]");- readable.push("data: [DONE]\n\n");+ conv.on('end', () => {+ console.log('streaming: [DONE]');+ readable.push('data: [DONE]\n\n');readable.push(null);});- conv.on("error", (error) => {- console.info("streaming: error", error);- readable.emit("error", error);+ conv.on('error', error => {+ console.info('streaming: error', error);+ readable.emit('error', error);});conv.streamPrompt(lastUserMessage?.content as string, {- "X-AGENT-ID": agentId,+ 'X-AGENT-ID': agentId,})- .catch((error) => {- readable.emit("error", error);+ .catch(error => {+ readable.emit('error', error);});return readable;} else {const now = Date.now();const result = (await conv.prompt(lastUserMessage?.content as string, {- "X-AGENT-ID": agentId,+ 'X-AGENT-ID': agentId,})) as string;return {id: completionId,- object: "chat.completion",+ object: 'chat.completion',created: now,model: params.model,choices: [{index: 0,- message: { role: "assistant", content: result, refusal: null },+ message: { role: 'assistant', content: result, refusal: null },logprobs: null,- finish_reason: "stop",+ finish_reason: 'stop',},],};@@ -268,14 +257,14 @@ class OpenAIChatService {readable: Readable,completionId: string,now: number,- params: OpenAI.Chat.Completions.ChatCompletionCreateParamsNonStreaming+ params: OpenAI.Chat.Completions.ChatCompletionCreateParamsNonStreaming,) {const shouldEmitStatus = this.firstTime || Math.random() < 0.5;this.firstTime && (this.firstTime = false);const randomToolStatus = [- { text: "Thinking", pauseDelay: 5_000 },- { text: "Analyzing", pauseDelay: 5_000 },+ { text: 'Thinking', pauseDelay: 5_000 },+ { text: 'Analyzing', pauseDelay: 5_000 },];if (shouldEmitStatus) {const status = randomToolStatus.pop();@@ -288,13 +277,13 @@ class OpenAIChatService {}[];} = {id: completionId,- object: "chat.completion.chunk",+ object: 'chat.completion.chunk',created: now,model: params.model,choices: [{index: 0,- delta: { content: "", status: status.text },+ delta: { content: '', status: status.text },finish_reason: null,},],diff --git a/packages/runtime/src/modules/embodiment/modules/openai/validations/openai.validation.ts b/packages/runtime/src/modules/embodiment/modules/openai/validations/openai.validation.tsindex d99f5859..8517e139 100644--- a/packages/runtime/src/modules/embodiment/modules/openai/validations/openai.validation.ts+++ b/packages/runtime/src/modules/embodiment/modules/openai/validations/openai.validation.ts@@ -1,24 +1,24 @@import Joi from 'joi';export const chatValidations = {- chatCompletion: {- headers: Joi.object({- authorization: Joi.string().required()- }).required(),- query: Joi.object({- include_status: Joi.boolean().optional(),- }),- body: Joi.object({- messages: Joi.array()- .items(- Joi.object({- role: Joi.string().valid('system', 'user', 'assistant').required(),- content: Joi.string().allow(null).required(),- })- )- .required(),- model: Joi.string().required(),- stream: Joi.boolean().optional(),- }).required(),- },+ chatCompletion: {+ headers: Joi.object({+ authorization: Joi.string().required(),+ }).required(),+ query: Joi.object({+ include_status: Joi.boolean().optional(),+ }),+ body: Joi.object({+ messages: Joi.array()+ .items(+ Joi.object({+ role: Joi.string().valid('system', 'user', 'assistant').required(),+ content: Joi.string().allow(null).required(),+ }),+ )+ .required(),+ model: Joi.string().required(),+ stream: Joi.boolean().optional(),+ }).required(),+ },};diff --git a/packages/runtime/src/modules/embodiment/modules/postman/routes/router.ts b/packages/runtime/src/modules/embodiment/modules/postman/routes/router.tsindex b60a0b2d..c40b531b 100644--- a/packages/runtime/src/modules/embodiment/modules/postman/routes/router.ts+++ b/packages/runtime/src/modules/embodiment/modules/postman/routes/router.ts@@ -1,20 +1,15 @@-import { getOpenAPIJSON } from "@embodiment/helpers/openapi-adapter.helper";-import agentLoader from "@embodiment/middlewares/agentLoader.mw";-import express from "express";-import Converter from "openapi-to-postmanv2";+import { getOpenAPIJSON } from '@embodiment/helpers/openapi-adapter.helper';+import agentLoader from '@embodiment/middlewares/agentLoader.mw';+import express from 'express';+import Converter from 'openapi-to-postmanv2';const router = express.Router();-router.get("/", agentLoader, async (req: any, res) => {- let domain = req.hostname;+router.get('/', agentLoader, async (req: any, res) => {+ const domain = req.hostname;try {- const openAPISpec = await getOpenAPIJSON(- req._rawAgent,- domain,- req._agentVersion,- false- ).catch((error) => {+ const openAPISpec = await getOpenAPIJSON(req._rawAgent, domain, req._agentVersion, false).catch(error => {console.error(error);return { error: error.message };});@@ -24,25 +19,21 @@ router.get("/", agentLoader, async (req: any, res) => {}const conversionResult: any = await new Promise((resolve, reject) => {- Converter.convert(- { type: "json", data: openAPISpec },- {},- (err, result) => {- if (err) {- reject(err);- } else if (result.result) {- resolve(result);- } else {- reject(new Error(`Conversion failed: ${result.reason}`));- }+ Converter.convert({ type: 'json', data: openAPISpec }, {}, (err, result) => {+ if (err) {+ reject(err);+ } else if (result.result) {+ resolve(result);+ } else {+ reject(new Error(`Conversion failed: ${result.reason}`));}- );+ });});// Force download the generated Postman collectionconst filename = `${req._rawAgent.name}.postman.json`; // Specify the filename here- res.setHeader("Content-Disposition", `attachment; filename="${filename}"`);- res.setHeader("Content-Type", "application/json");+ res.setHeader('Content-Disposition', `attachment; filename="${filename}"`);+ res.setHeader('Content-Type', 'application/json');res.send(JSON.stringify(conversionResult?.output?.[0]?.data, null, 2));} catch (error: any) {console.error(error);diff --git a/packages/runtime/src/modules/embodiment/modules/swagger/routes/router.ts b/packages/runtime/src/modules/embodiment/modules/swagger/routes/router.tsindex 7da36bf4..0a50b065 100644--- a/packages/runtime/src/modules/embodiment/modules/swagger/routes/router.ts+++ b/packages/runtime/src/modules/embodiment/modules/swagger/routes/router.ts@@ -1,38 +1,33 @@-import express from "express";-import swaggerUi from "swagger-ui-express";+import express from 'express';+import swaggerUi from 'swagger-ui-express';-import config from "@core/config";-import { getOpenAPIJSON } from "@embodiment/helpers/openapi-adapter.helper";-import agentLoader from "@embodiment/middlewares/agentLoader.mw";-import { Agent } from "@smythos/sre";+import config from '@core/config';+import { getOpenAPIJSON } from '@embodiment/helpers/openapi-adapter.helper';+import agentLoader from '@embodiment/middlewares/agentLoader.mw';+import { Agent } from '@smythos/sre';const router = express.Router();// router.use(swaggerUi.serve);-router.use("/", agentLoader, async (req: any, res) => {- //TODO : handle release switch : dev, prod, prod old versions [DONE]+router.use('/', agentLoader, async (req: any, res) => {+ // TODO : handle release switch : dev, prod, prod old versions [DONE]const agent: Agent = req._agent;- let domain = req.hostname;+ const domain = req.hostname;// const debugSessionEnabled = agent.debugSessionEnabled;const isTestDomain = agent.usingTestDomain;// FIXME : use the right version depending on domain [FIXED]// const version = isTestDomain ? '' : 'latest';- const openApiDocument = await getOpenAPIJSON(- req._rawAgent,- domain,- req._agentVersion,- false- );-- if (agent?.data?.auth?.method && agent?.data?.auth?.method != "none") {+ const openApiDocument = await getOpenAPIJSON(req._rawAgent, domain, req._agentVersion, false);++ if (agent?.data?.auth?.method && agent?.data?.auth?.method != 'none') {// Add or update security definitionsopenApiDocument.components = openApiDocument.components || {};openApiDocument.components.securitySchemes = {ApiKeyAuth: {- type: "apiKey",- in: "header",- name: "Authorization",+ type: 'apiKey',+ in: 'header',+ name: 'Authorization',},};openApiDocument.security = [{ ApiKeyAuth: [] }];@@ -40,8 +35,7 @@ router.use("/", agentLoader, async (req: any, res) => {let htmlContent = swaggerUi.generateHTML(openApiDocument);- let debugScript =- '<script src="/static/embodiment/swagger/swagger.js"></script>';+ let debugScript = '<script src="/static/embodiment/swagger/swagger.js"></script>';if (isTestDomain) {debugScript += `<script src="/static/embodiment/swagger/swagger-debug.js"></script>@@ -51,8 +45,8 @@ initDebug('${config.env.UI_SERVER}', '${agent.id}');`;}- //inject the debug script before closing body tag- htmlContent = htmlContent.replace("</body>", `${debugScript}</body>`);+ // inject the debug script before closing body tag+ htmlContent = htmlContent.replace('</body>', `${debugScript}</body>`);res.send(htmlContent);});diff --git a/packages/runtime/src/modules/embodiment/routes/index.ts b/packages/runtime/src/modules/embodiment/routes/index.tsindex 1cd245fb..76dced84 100644--- a/packages/runtime/src/modules/embodiment/routes/index.ts+++ b/packages/runtime/src/modules/embodiment/routes/index.ts@@ -1,18 +1,19 @@-import { Router } from "express";-import swaggerUi from "swagger-ui-express";+import { Router } from 'express';+import swaggerUi from 'swagger-ui-express';-import config from "@core/config";+import config from '@core/config';-import { agentChatRouter } from "@embodiment/modules/agentChat/routes/router";-import { alexaRouter } from "@embodiment/modules/alexa/routes/router";-import { apiRouter } from "@embodiment/modules/API/routes/router";-import { chatBotRouter } from "@embodiment/modules/chatbot/routes/router";-import { chatGPTRouter } from "@embodiment/modules/chatGPT/routes/router";-import { formPreviewRouter } from "@embodiment/modules/formPreview/routes/router";-import { mcpRouter } from "@embodiment/modules/mcp/routes/router";-import { openaiRouter } from "@embodiment/modules/openai/routes/router";-import { postmanRouter } from "@embodiment/modules/postman/routes/router";-import { swaggerRouter } from "@embodiment/modules/swagger/routes/router";+import { agentChatRouter } from '@embodiment/modules/agentChat/routes/router';+import { alexaRouter } from '@embodiment/modules/alexa/routes/router';+import { apiRouter } from '@embodiment/modules/API/routes/router';+import { chatRouter } from '@embodiment/modules/chat/routes/router';+import { chatBotRouter } from '@embodiment/modules/chatbot/routes/router';+import { chatGPTRouter } from '@embodiment/modules/chatGPT/routes/router';+import { formPreviewRouter } from '@embodiment/modules/formPreview/routes/router';+import { mcpRouter } from '@embodiment/modules/mcp/routes/router';+import { openaiRouter } from '@embodiment/modules/openai/routes/router';+import { postmanRouter } from '@embodiment/modules/postman/routes/router';+import { swaggerRouter } from '@embodiment/modules/swagger/routes/router';const mainRouter = Router();@@ -24,61 +25,65 @@ type Route = {const defaultRoutes: Route[] = [{- rootPath: ["/_openai", "/emb/openai"],+ rootPath: ['/_openai', '/emb/openai'],route: openaiRouter,},{- rootPath: ["/postman", "/emb/postman"],+ rootPath: ['/postman', '/emb/postman'],route: postmanRouter,},- // #region Swagger, we need both+ // #region Swagger, we need both routers{- rootPath: ["/swagger", "/emb/swagger"],+ rootPath: ['/swagger', '/emb/swagger'],route: swaggerUi.serve,},{- rootPath: ["/swagger", "/emb/swagger"],+ rootPath: ['/swagger', '/emb/swagger'],route: swaggerRouter,},// #endregion{- rootPath: ["/", "/emb/api"],+ rootPath: ['/', '/emb/api'],route: apiRouter,},{- rootPath: ["/", "/emb/chatgpt"],+ rootPath: ['/', '/emb/chatgpt'],route: chatGPTRouter,},{- rootPath: ["/chatbot", "chatBot", "/emb/chatbot"],+ rootPath: ['/chatbot', 'chatBot', '/emb/chatbot'],route: chatBotRouter,},{- rootPath: ["/aichat", "/emb/aichat"],+ rootPath: ['/v1/emb/chat'],+ route: chatRouter,+ },+ {+ rootPath: ['/aichat', '/emb/aichat'],route: agentChatRouter,},{- rootPath: ["/alexa", "/emb/alexa"],+ rootPath: ['/alexa', '/emb/alexa'],route: alexaRouter,},{- rootPath: ["/mcp", "/emb/mcp"],+ rootPath: ['/mcp', '/emb/mcp'],route: mcpRouter,},{- rootPath: ["/form-preview", "/emb/form-preview"],+ rootPath: ['/form-preview', '/emb/form-preview'],route: formPreviewRouter,},];const devRoutes: Route[] = [];-defaultRoutes.forEach((route) => {+defaultRoutes.forEach(route => {if (Array.isArray(route.rootPath)) {- route.rootPath.forEach((path) => {+ route.rootPath.forEach(path => {mainRouter.use(path, route.route);});} else {@@ -86,10 +91,10 @@ defaultRoutes.forEach((route) => {}});-if (config.env.NODE_ENV === "development") {- devRoutes.forEach((route) => {+if (config.env.NODE_ENV === 'development') {+ devRoutes.forEach(route => {if (Array.isArray(route.rootPath)) {- route.rootPath.forEach((path) => {+ route.rootPath.forEach(path => {mainRouter.use(path, route.route);});} else {diff --git a/packages/runtime/src/modules/embodiment/services/Chatbot.class.ts b/packages/runtime/src/modules/embodiment/services/Chatbot.class.tsindex 6552e255..29eb031e 100644--- a/packages/runtime/src/modules/embodiment/services/Chatbot.class.ts+++ b/packages/runtime/src/modules/embodiment/services/Chatbot.class.ts@@ -1,22 +1,22 @@-import { Request } from "express";+import { Request } from 'express';-import { Agent, AgentLogger, Conversation } from "@smythos/sre";+import { Agent, AgentLogger, Conversation } from '@smythos/sre';-import config from "@core/config";-import { DEFAULT_MODEL } from "@core/constants";+import config from '@core/config';+import { DEFAULT_MODEL } from '@core/constants';-import { EMBODIMENT_TYPES } from "@embodiment/constants";+import { EMBODIMENT_TYPES } from '@embodiment/constants';+import { ChatConversationsEnv } from '@embodiment/types/chat.types';-import { getOpenAPIJSONForAI } from "../helpers/openapi-adapter.helper";-import { ChatConversationsEnv } from "../utils/chat.utils";-import { delay } from "../utils/date-time.utils";-import { FsChatbotContextStore } from "./FsChatbotContextStore.class";-import { ConversationStreamYield } from "./FsChatbotContextStore.class/FsChatbotContextExporter.class";+import { getOpenAPIJSONForAI } from '../helpers/openapi-adapter.helper';+import { delay } from '../utils/date-time.utils';+import { FsChatbotContextStore } from './FsChatbotContextStore.class';+import { ConversationStreamYield } from './FsChatbotContextStore.class/FsChatbotContextExporter.class';type Headers = {- "x-conversation-id": string;+ 'x-conversation-id': string;Authorization?: string;- "x-forwarded-for"?: string;+ 'x-forwarded-for'?: string;};type ChatbotResponse = {@@ -30,12 +30,14 @@ type ChatbotResponse = {errorType?: string;};-function fnv1aHash(str) {+function fnv1aHash(str: string): string {let hash = 0x811c9dc5; // FNV offset basisfor (let i = 0; i < str.length; i++) {+ // eslint-disable-next-line no-bitwisehash ^= str.charCodeAt(i);hash = Math.imul(hash, 0x01000193); // FNV prime}+ // eslint-disable-next-line no-bitwisereturn (hash >>> 0).toString(36).toUpperCase(); // Convert to Base36}export default class Chatbot {@@ -46,46 +48,39 @@ export default class Chatbot {public embodimentSettings;private agent: Agent;- private systemMessage = "";+ private systemMessage = '';private model = DEFAULT_MODEL;private modelInfo: any;private function_call_order = 0;private contextWindow = 1024 * 128;private maxOutputTokens = 4096;- private client_ip = "";- private toolCallId = "";- private logId = "";- private teamId = "";+ private client_ip = '';+ private toolCallId = '';+ private logId = '';+ private teamId = '';private passThroughNotifications = {};private isAgentChat = false;constructor(req: Request | any) {- this.agentId = req._agent.id; //from AgentLoader middleware+ this.agentId = req._agent.id; // from AgentLoader middlewarethis.sessionID = req.sessionID;- this.conversationID = req.headers["x-conversation-id"] || req.sessionID;- this.domain = req._agent.domain; //req.hostname;+ this.conversationID = req.headers['x-conversation-id'] || req.sessionID;+ this.domain = req._agent.domain; // req.hostname;this.agent = req._agent;- this.client_ip = req.headers["x-forwarded-for"] || req.socket.remoteAddress;+ this.client_ip = req.headers['x-forwarded-for'] || req.socket.remoteAddress;this.teamId = req._agent.teamId;- this.isAgentChat = req.headers["x-ai-agent"] === "true";+ this.isAgentChat = req.headers['x-ai-agent'] === 'true';}public async init() {// wait for agent settings and embodiments to be readyawait this.agent.agentSettings?.ready();await this.agent.agentSettings?.embodiments?.ready();- this.systemMessage =- this.agent.data.behavior ||- this.agent.data.description ||- this.agent.data.shortDescription ||- "";+ this.systemMessage = this.agent.data.behavior || this.agent.data.description || this.agent.data.shortDescription || '';this.model =- this.agent.agentSettings?.get("chatGptModel") ||- this.agent.agentSettings?.embodiments?.get(- EMBODIMENT_TYPES.ChatBot,- "chatGptModel"- ) ||+ this.agent.agentSettings?.get('chatGptModel') ||+ this.agent.agentSettings?.embodiments?.get(EMBODIMENT_TYPES.ChatBot, 'chatGptModel') ||this.model;// Initialize basic modelInfo since LLMRegistry is deprecated@@ -99,7 +94,7 @@ export default class Chatbot {// Keep original model ID// this.model stays as is since SRE handles model resolution- console.log("modelInfo", this.model, this.modelInfo);+ // console.log('modelInfo', this.model, this.modelInfo);}/**@@ -112,8 +107,8 @@ export default class Chatbot {domain: this.domain,function_call_order: this.function_call_order,agentVersion: this.agent.version,- //sessionID: this.sessionID,- //conversationID: this.conversationID,+ // sessionID: this.sessionID,+ // conversationID: this.conversationID,embodimentSettings: this.embodimentSettings,systemMessage: this.systemMessage,model: this.model,@@ -131,8 +126,8 @@ export default class Chatbot {this.agentId = data.agentId;this.domain = data.domain;this.function_call_order = data.function_call_order;- //this.sessionID = data.sessionID;- //this.conversationID = data.conversationID;+ // this.sessionID = data.sessionID;+ // this.conversationID = data.conversationID;this.embodimentSettings = data.embodimentSettings;this.systemMessage = data.systemMessage;this.model = data.model;@@ -147,21 +142,13 @@ export default class Chatbot {* @param errorType - Type of error for categorization* @param callback - Callback function to send response*/- private sendErrorMessage(- error: any,- errorType: string,- callback: (response: ChatbotResponse) => void- ) {- const errorMessage =- error?.message ||- error?.code ||- error ||- "An error occurred. Please try again later.";+ private sendErrorMessage(error: any, errorType: string, callback: (response: ChatbotResponse) => void) {+ const errorMessage = error?.message || error?.code || error || 'An error occurred. Please try again later.';callback({content: errorMessage,isError: true,- errorType: errorType,+ errorType,});}@@ -185,24 +172,20 @@ export default class Chatbot {this.function_call_order++;this.logId = AgentLogger.log(this.agent, null, {- sourceId: "chat",- componentId: "CHATBOT",+ sourceId: 'chat',+ componentId: 'CHATBOT',domain: this.domain,input: message,inputTimestamp: new Date().toISOString(),sessionID: conversationID,});- this.toolCallId = Math.round(Math.random() * Math.pow(10, 6))+ this.toolCallId = Math.round(Math.random() * 10 ** 6).toString(36).toUpperCase();try {- const spec = await getOpenAPIJSONForAI(- this.domain,- this.agent.usingTestDomain ? "" : "latest",- isAgentChatRequest- );+ const spec = await getOpenAPIJSONForAI(this.domain, this.agent.usingTestDomain ? '' : 'latest', isAgentChatRequest);// Adapt the model based on the user's plan, especially to support certain OpenAI models for legacy users with limited tokens without their own API key.const conversation = new Conversation(this.model, spec, {@@ -212,24 +195,18 @@ export default class Chatbot {store: contextStore,});- conversation.on("error", (error) => {- console.error("Error in conversation:", error);+ conversation.on('error', error => {+ // console.error('Error in conversation:', error);// Send error as normal content with error flag instead of throwing- this.sendErrorMessage(error, "conversation_error", callback);+ this.sendErrorMessage(error, 'conversation_error', callback);});- conversation.on("toolInfo", (toolInfo) =>- this.toolsInfoHandler(toolInfo, callback)- );+ conversation.on('toolInfo', toolInfo => this.toolsInfoHandler(toolInfo, callback));- conversation.on("beforeToolCall", (toolInfo, llmResponse) =>- this.beforeToolCallHandler(toolInfo, llmResponse, callback)- );+ conversation.on('beforeToolCall', (toolInfo, llmResponse) => this.beforeToolCallHandler(toolInfo, llmResponse, callback));- conversation.on("afterToolCall", (toolInfo, toolResponse) =>- this.afterToolCallHandler(toolInfo, toolResponse, callback)- );+ conversation.on('afterToolCall', (toolInfo, toolResponse) => this.afterToolCallHandler(toolInfo, toolResponse, callback));// TODO: We need to stream the "thinking" content correctly. Currently, when using callback({..., debug: thinking}), it prints each chunk on a separate line, which doesn't preserve the original format. We need to fix this to maintain the original flow of the "thinking" content.// conversation.on('thinking', (thinking) => {@@ -237,37 +214,37 @@ export default class Chatbot {// });// Print the thinking content at once- conversation.on("thoughtProcess", (thinking) => {+ conversation.on('thoughtProcess', thinking => {callback({title: `[${this.toolCallId}] Thought Process`,debug: thinking,});});- conversation.on("content", (content) => {+ conversation.on('content', content => {try {- if (content?.indexOf("}{") >= 0) {+ let processedContent = content;+ if (processedContent?.indexOf('}{') >= 0) {// workaround to avoid broken json chunks parsing in the frontend// since all the json chunks are streamed in the same response, we use "}{" to separate them// if a content is equal to '}{' or contains it, we replace it with '} {' to avoid false new chunk- content = content.replace(/}{/g, "} {");+ processedContent = processedContent.replace(/}{/g, '} {');}- callback({ content });+ callback({ content: processedContent });} catch (e) {// Send content processing error as normal message with error flag- this.sendErrorMessage(e, "content_processing_error", callback);+ this.sendErrorMessage(e, 'content_processing_error', callback);}});- const isStickyDebug =- this.agent.debugSessionEnabled || headers["X-MONITOR-ID"];- const dbgHeaders = isStickyDebug ? { "x-hash-id": this.client_ip } : {};+ const isStickyDebug = this.agent.debugSessionEnabled || headers['X-MONITOR-ID'];+ const dbgHeaders = isStickyDebug ? { 'x-hash-id': this.client_ip } : {};const concurrentToolCalls = this.agent.debugSessionEnabled ? 1 : 4;const result = await conversation.streamPrompt(message,- { "x-caller-session-id": conversationID, ...headers, ...dbgHeaders },+ { 'x-caller-session-id': conversationID, ...headers, ...dbgHeaders },concurrentToolCalls,- abortSignal+ abortSignal,);if (this.logId)@@ -278,37 +255,30 @@ export default class Chatbot {} catch (error: any) {if (this.logId) {AgentLogger.log(this.agent, this.logId, {- error: typeof error === "object" ? JSON.stringify(error) : error,+ error: typeof error === 'object' ? JSON.stringify(error) : error,});}// Send error message as normal system message with error flag- this.sendErrorMessage(error, "system_error", callback);+ this.sendErrorMessage(error, 'system_error', callback);} finally {- this.logId = "";- this.toolCallId = "";+ this.logId = '';+ this.toolCallId = '';}}- private async toolsInfoHandler(- toolsInfo,- callback: (response: ChatbotResponse) => void- ) {+ private async toolsInfoHandler(toolsInfo, callback: (response: ChatbotResponse) => void) {if (this.agent.usingTestDomain || this.isAgentChat) {for (const tool of toolsInfo) {const toolHash = tool.id ? fnv1aHash(tool.id) : this.toolCallId;const dbgJson = {title: `[${toolHash}] Function Call : ${tool.name}`,- debug: `${tool.name} (${- tool?.arguments && typeof tool?.arguments === "object"- ? JSON.stringify(tool?.arguments)- : tool?.arguments- })`,+ debug: `${tool.name} (${tool?.arguments && typeof tool?.arguments === 'object' ? JSON.stringify(tool?.arguments) : tool?.arguments})`,};if (this.agent.debugSessionEnabled) {- //attach to UI debugger- dbgJson["function"] = "updateStatus";- dbgJson["parameters"] = ["Debugger: Attaching To Agent ..."];+ // attach to UI debugger+ (dbgJson as any).function = 'updateStatus';+ (dbgJson as any).parameters = ['Debugger: Attaching To Agent ...'];}callback(dbgJson);@@ -320,11 +290,7 @@ export default class Chatbot {}}- private async beforeToolCallHandler(- { tool, args },- llmResponse,- callback: (response: ChatbotResponse) => void- ) {+ private async beforeToolCallHandler({ tool, args }, llmResponse, callback: (response: ChatbotResponse) => void) {if (this.logId)AgentLogger.log(this.agent, this.logId, {output: llmResponse,@@ -334,35 +300,29 @@ export default class Chatbot {if (this.agent.usingTestDomain || this.isAgentChat) {if (this.agent.debugSessionEnabled) {await delay(100);- const dbgFunction = `${tool.name} (${- args && typeof args === "object" ? JSON.stringify(args) : args- })`;+ const dbgFunction = `${tool.name} (${args && typeof args === 'object' ? JSON.stringify(args) : args})`;- let dbgJson = {+ const dbgJson = {title: `[${toolHash}] Function Call : ${tool.name}`,debug: `Debugging ${dbgFunction.substring(0, 50)} ...`,};- dbgJson["function"] = "callParentFunction";- dbgJson["parameters"] = ["debugLastAction", [], 200];+ (dbgJson as any).function = 'callParentFunction';+ (dbgJson as any).parameters = ['debugLastAction', [], 200];callback(dbgJson);}}if (this.agent.debugSessionEnabled) {- await delay(3000); //give some time to the UI debugger to attach - FIXME : find a better way to do this+ await delay(3000); // give some time to the UI debugger to attach - FIXME : find a better way to do this}}- private async afterToolCallHandler(- { tool, args },- toolResponse,- callback: (response: ChatbotResponse) => void- ) {+ private async afterToolCallHandler({ tool }, toolResponse, callback: (response: ChatbotResponse) => void) {const toolHash = tool.id ? fnv1aHash(tool.id) : this.toolCallId;if (this.agent.usingTestDomain || this.isAgentChat) {- //workaround to avoid broken debug message in the frontend- //replace all "}{" with "} {";- const _toolResponse = toolResponse.replace(/}\{/g, "}_{");+ // workaround to avoid broken debug message in the frontend+ // replace all "}{" with "} {";+ const _toolResponse = toolResponse.replace(/}\{/g, '}_{');const chunkSize = 500;for (let i = 0, len = _toolResponse.length; i < len; i += chunkSize) {const chunk = _toolResponse.substr(i, chunkSize);@@ -412,13 +372,7 @@ export default class Chatbot {return this.processChatMessage({ message, headers, callback, abortSignal });} */- public async *exportAllConversations({- dateRange,- env,- }: {- dateRange?: string;- env?: string;- }): AsyncGenerator<ConversationStreamYield> {+ public async *exportAllConversations({ dateRange, env }: { dateRange?: string; env?: string }): AsyncGenerator<ConversationStreamYield> {const contextStore = new FsChatbotContextStore({agentId: this.agentId,conversationID: this.conversationID,diff --git a/packages/runtime/src/modules/embodiment/services/FsChatbotContextStore.class/FsChatbotContextExporter.class.ts b/packages/runtime/src/modules/embodiment/services/FsChatbotContextStore.class/FsChatbotContextExporter.class.tsindex 3e736829..ec7dada5 100644--- a/packages/runtime/src/modules/embodiment/services/FsChatbotContextStore.class/FsChatbotContextExporter.class.ts+++ b/packages/runtime/src/modules/embodiment/services/FsChatbotContextStore.class/FsChatbotContextExporter.class.ts@@ -1,8 +1,9 @@-import * as fs from "fs";-import path from "path";+import * as fs from 'fs';+import path from 'path';-import * as chatUtils from "@embodiment/utils/chat.utils";-import { fsExists } from "@embodiment/utils/general.utils";+import * as chatUtils from '@embodiment/utils/chat.utils';+import { ChatConversationsEnv } from '@embodiment/types/chat.types';+import { fsExists } from '@embodiment/utils/general.utils';export type ConversationStreamYield = {stream: fs.ReadStream;@@ -13,13 +14,7 @@ export class FsChatbotContextExporter {private sessionsPath: string;private agentId: string;- constructor({- sessionsPath,- agentId,- }: {- sessionsPath: string;- agentId: string;- }) {+ constructor({ sessionsPath, agentId }: { sessionsPath: string; agentId: string }) {this.sessionsPath = sessionsPath;this.agentId = agentId;}@@ -29,38 +24,29 @@ export class FsChatbotContextExporter {* @param param0* @returns*/- public async *streamConversations({- dateRange,- env,- }: {- dateRange?: string;- env?: chatUtils.ChatConversationsEnv;- }): AsyncGenerator<ConversationStreamYield> {+ public async *streamConversations({ dateRange, env }: { dateRange?: string; env?: ChatConversationsEnv }): AsyncGenerator<ConversationStreamYield> {// TODO covert to stream-based export. will implement it NOWconst folderPath = path.join(this.sessionsPath, this.agentId);- const testConvprefix = chatUtils.CHAT_PREFIXES["test"];- const prodConvprefix = chatUtils.CHAT_PREFIXES["prod"];+ const testConvprefix = chatUtils.CHAT_PREFIXES.test;+ const prodConvprefix = chatUtils.CHAT_PREFIXES.prod;// check if the folder existsif (!(await fsExists(folderPath))) return;const conversations = await fs.promises.readdir(folderPath);- const filteredConversations = conversations.filter((conversation) => {+ const filteredConversations = conversations.filter(conversation => {// first, filter out by prefix envif (- env === "test"+ env === 'test'? !conversation.startsWith(testConvprefix)- : conversation.startsWith(testConvprefix) ||- !conversation.startsWith(prodConvprefix)+ : conversation.startsWith(testConvprefix) || !conversation.startsWith(prodConvprefix))return false;- if (!conversation.endsWith(".json")) return false;+ if (!conversation.endsWith('.json')) return false;// then, filter out by date rangeif (dateRange && chatUtils.isValidDateRange(dateRange)) {- const conversationDate = chatUtils- .parseDateFromConvId(conversation)- .getTime();+ const conversationDate = chatUtils.parseDateFromConvId(conversation).getTime();const { start, end } = chatUtils.parseDateRange(dateRange);if (conversationDate < start || conversationDate > end) return false;}@@ -71,8 +57,8 @@ export class FsChatbotContextExporter {for (const file of filteredConversations) {const fullPath = path.join(this.sessionsPath, this.agentId, file);yield {- stream: fs.createReadStream(fullPath, { encoding: "utf8" }),- convId: file.replace(".json", ""),+ stream: fs.createReadStream(fullPath, { encoding: 'utf8' }),+ convId: file.replace('.json', ''),};}}diff --git a/packages/runtime/src/modules/embodiment/services/FsChatbotContextStore.class/index.ts b/packages/runtime/src/modules/embodiment/services/FsChatbotContextStore.class/index.tsindex eed4e30d..d3c47d26 100644--- a/packages/runtime/src/modules/embodiment/services/FsChatbotContextStore.class/index.ts+++ b/packages/runtime/src/modules/embodiment/services/FsChatbotContextStore.class/index.ts@@ -1,12 +1,12 @@-import fs from "fs";-import path from "path";+import fs from 'fs';+import path from 'path';-import type { ILLMContextStore } from "@smythos/sre";+import type { ILLMContextStore } from '@smythos/sre';-import { EStorageTypes } from "@embodiment/types/fileStorage.types";-import { fsExists } from "@embodiment/utils/general.utils";+import { EStorageTypes } from '@embodiment/types/fileStorage.types';+import { fsExists } from '@embodiment/utils/general.utils';-import { FsChatbotContextExporter } from "./FsChatbotContextExporter.class";+import { FsChatbotContextExporter } from './FsChatbotContextExporter.class';export class FsChatbotContextStore implements ILLMContextStore {private agentId: string;@@ -17,17 +17,9 @@ export class FsChatbotContextStore implements ILLMContextStore {storageType = EStorageTypes.Local;private sessionsPath: string;- constructor({- agentId,- conversationID,- dataPath,- }: {- agentId: string;- conversationID: string;- dataPath?: string;- }) {+ constructor({ agentId, conversationID, dataPath }: { agentId: string; conversationID: string; dataPath?: string }) {if (!dataPath) {- throw new Error("dataPath is required.");+ throw new Error('dataPath is required.');}if (!fs.existsSync(dataPath)) {@@ -37,7 +29,7 @@ export class FsChatbotContextStore implements ILLMContextStore {this.dataFolder = dataPath;this.agentId = agentId;this.conversationID = conversationID;- this.sessionsPath = path.join(dataPath, "chat_sessions");+ this.sessionsPath = path.join(dataPath, 'chat_sessions');this.exporter = new FsChatbotContextExporter({sessionsPath: this.sessionsPath,agentId,@@ -46,49 +38,36 @@ export class FsChatbotContextStore implements ILLMContextStore {public async save(messages: any[]): Promise<void> {try {- const filePath = this.getConversationFilePath(- this.agentId,- this.conversationID- );+ const filePath = this.getConversationFilePath(this.agentId, this.conversationID);await this.ensureDirectoryExistence(filePath);- await fs.promises.writeFile(- filePath,- JSON.stringify(messages, null, 2),- "utf-8"- );+ await fs.promises.writeFile(filePath, JSON.stringify(messages, null, 2), 'utf-8');} catch (error) {// Saving is not critical, so we can simply log the error and continue without interrupting the process.- console.warn("Error saving Conversation: ", error);+ console.warn('Error saving Conversation: ', error);}}public async load(count?: number): Promise<any[]> {- const conversations = await this.getConversationById(- this.agentId,- this.conversationID- );+ const conversations = await this.getConversationById(this.agentId, this.conversationID);if (count === undefined) return conversations;- if (typeof count === "number" && count > 0) {+ if (typeof count === 'number' && count > 0) {return conversations.slice(-count);}}- public async getMessage(message_id: string): Promise<any> {+ public async getMessage(_messageId: string): Promise<any> {return {};}- private async getConversationById(- agentId: string,- conversationId: string- ): Promise<Record<string, any>[]> {+ private async getConversationById(agentId: string, conversationId: string): Promise<Record<string, any>[]> {const folderPath = path.join(this.sessionsPath, agentId);if (!(await fsExists(folderPath))) {return [];}- const filePath = path.join(folderPath, conversationId + ".json");+ const filePath = path.join(folderPath, `${conversationId}.json`);if (!(await fsExists(filePath))) {return [];@@ -96,7 +75,7 @@ export class FsChatbotContextStore implements ILLMContextStore {try {const fileContent = await fs.promises.readFile(filePath, {- encoding: "utf8",+ encoding: 'utf8',});return JSON.parse(fileContent);} catch (error) {@@ -104,10 +83,7 @@ export class FsChatbotContextStore implements ILLMContextStore {}}- private getConversationFilePath(- agentId: string,- conversationID: string- ): string {+ private getConversationFilePath(agentId: string, conversationID: string): string {return path.join(this.sessionsPath, agentId, `${conversationID}.json`);}diff --git a/packages/runtime/src/modules/embodiment/types/chat.types.ts b/packages/runtime/src/modules/embodiment/types/chat.types.tsindex d6f09f01..5afa6531 100644--- a/packages/runtime/src/modules/embodiment/types/chat.types.ts+++ b/packages/runtime/src/modules/embodiment/types/chat.types.ts@@ -1,28 +1 @@-export enum EChatMessageRole {- User = 'user',- System = 'system',- Assistant = 'assistant',-}--export interface IMetadataFile {- id: string;- label: string;- summary: string;- teamId: string;- agentId: string;- chunkSize: number;- lastChunkId: number;-}--export interface IChatMessage {- content: string;- timestamp?: number;- role: EChatMessageRole;-}--export interface IChatStorage {- exists: (fileName: string) => Promise<boolean>;- read: (fileName: string) => Promise<string | null>;- write: (fileName: string, data: string, metadata: Record<any, any>) => Promise<void>;- setParams: (params: { teamId: string; userId: string; agentId: string; conversationId: string }) => void;-}+export type ChatConversationsEnv = 'test' | 'prod';diff --git a/packages/runtime/src/modules/embodiment/types/chatgpt.types.ts b/packages/runtime/src/modules/embodiment/types/chatgpt.types.tsindex ccecb046..48085612 100644--- a/packages/runtime/src/modules/embodiment/types/chatgpt.types.ts+++ b/packages/runtime/src/modules/embodiment/types/chatgpt.types.ts@@ -6,132 +6,92 @@/*** Authentication methods supported by ChatGPT plugins*/-export type ChatGPTAuthType = 'none' | 'oauth' | 'service_http';+type ChatGPTAuthType = 'none' | 'oauth' | 'service_http';/*** Base authentication interface*/-export interface ChatGPTAuthBase {- type: ChatGPTAuthType;+interface ChatGPTAuthBase {+ type: ChatGPTAuthType;}/*** No authentication required*/-export interface ChatGPTAuthNone extends ChatGPTAuthBase {- type: 'none';+interface ChatGPTAuthNone extends ChatGPTAuthBase {+ type: 'none';}/*** OAuth authentication configuration*/-export interface ChatGPTAuthOAuth extends ChatGPTAuthBase {- type: 'oauth';- client_url: string;- scope: string;- authorization_url: string;- authorization_content_type: string;- verification_tokens?: {- openai?: string;- };+interface ChatGPTAuthOAuth extends ChatGPTAuthBase {+ type: 'oauth';+ client_url: string;+ scope: string;+ authorization_url: string;+ authorization_content_type: string;+ verification_tokens?: {+ openai?: string;+ };}/*** Service HTTP authentication (Bearer token)*/-export interface ChatGPTAuthServiceHttp extends ChatGPTAuthBase {- type: 'service_http';- authorization_type: 'bearer';- verification_tokens?: {- openai?: string;- };+interface ChatGPTAuthServiceHttp extends ChatGPTAuthBase {+ type: 'service_http';+ authorization_type: 'bearer';+ verification_tokens?: {+ openai?: string;+ };}/*** Union type for all authentication methods*/-export type ChatGPTAuth = ChatGPTAuthNone | ChatGPTAuthOAuth | ChatGPTAuthServiceHttp;+type ChatGPTAuth = ChatGPTAuthNone | ChatGPTAuthOAuth | ChatGPTAuthServiceHttp;/*** API configuration for the plugin*/-export interface ChatGPTAPI {- type: 'openapi';- url: string;- is_user_authenticated: boolean;+interface ChatGPTAPI {+ type: 'openapi';+ url: string;+ is_user_authenticated: boolean;}/*** Complete ChatGPT Plugin Manifest structure*/export interface ChatGPTManifest {- /** Schema version of the manifest */- schema_version: 'v1';+ /** Schema version of the manifest */+ schema_version: 'v1';- /** Human-readable name for the plugin */- name_for_human: string;+ /** Human-readable name for the plugin */+ name_for_human: string;- /** Name used by the model to reference the plugin */- name_for_model: string;+ /** Name used by the model to reference the plugin */+ name_for_model: string;- /** Human-readable description of the plugin */- description_for_human: string;+ /** Human-readable description of the plugin */+ description_for_human: string;- /** Model-focused description of the plugin's capabilities */- description_for_model: string;+ /** Model-focused description of the plugin's capabilities */+ description_for_model: string;- /** Authentication configuration */- auth: ChatGPTAuth;+ /** Authentication configuration */+ auth: ChatGPTAuth;- /** API specification */- api: ChatGPTAPI;+ /** API specification */+ api: ChatGPTAPI;- /** URL to the plugin's logo */- logo_url: string;+ /** URL to the plugin's logo */+ logo_url: string;- /** Contact email for the plugin */- contact_email: string;+ /** Contact email for the plugin */+ contact_email: string;- /** URL to legal information about the plugin */- legal_info_url: string;-}--/**- * Template variables used for generating the manifest- */-export interface ChatGPTManifestTemplate {- human_name: string;- model_name: string;- human_description: string;- model_description: string;- icon_url: string;- contact_email: string;- legal_info_url: string;- domain: string;-}--/**- * ChatGPT embodiment properties from agent configuration- */-export interface ChatGPTEmbodimentProperties {- /** Description for the model */- modelDescription?: string;-- /** Human-readable name */- humanName?: string;-- /** Model name */- modelName?: string;-- /** Human-readable description */- humanDescription?: string;-- /** Contact email */- contactEmail?: string;-- /** Legal information URL */- legalInfoUrl?: string;-- /** Logo URL */- logoUrl?: string;+ /** URL to legal information about the plugin */+ legal_info_url: string;}diff --git a/packages/runtime/src/modules/embodiment/types/fileStorage.types.ts b/packages/runtime/src/modules/embodiment/types/fileStorage.types.tsindex adf5b812..249563e9 100644--- a/packages/runtime/src/modules/embodiment/types/fileStorage.types.ts+++ b/packages/runtime/src/modules/embodiment/types/fileStorage.types.ts@@ -1,4 +1,3 @@export enum EStorageTypes {- Local = 'local',- Remote = 'remote',+ Local = 'local',}diff --git a/packages/runtime/src/modules/embodiment/utils/apiError.ts b/packages/runtime/src/modules/embodiment/utils/apiError.tsindex 95b231ee..6779e08a 100644--- a/packages/runtime/src/modules/embodiment/utils/apiError.ts+++ b/packages/runtime/src/modules/embodiment/utils/apiError.ts@@ -8,33 +8,33 @@*/class ApiError extends Error {- statusCode: number | null | undefined;+ statusCode: number | null | undefined;- isOperational: boolean;+ isOperational: boolean;- stack: string | undefined;+ stack: string | undefined;- errKey: string | undefined;+ errKey: string | undefined;- isApiError: boolean;+ isApiError: boolean;- /**- *- * @param statusCode - http status code of the error- * @param message - error message- * @param isOperational - whether the error should be shown in production or not (if not, internal server error will be shown)- * @param stack - error stack trace- * @param errKey - error code to be used in the response- */+ /**+ *+ * @param statusCode - http status code of the error+ * @param message - error message+ * @param isOperational - whether the error should be shown in production or not (if not, internal server error will be shown)+ * @param stack - error stack trace+ * @param errKey - error code to be used in the response+ */- // eslint-disable-next-line default-param-last- constructor(statusCode: number | null | undefined, message: string, errKey?: string, isOperational = true, stack?: string) {- super(message);- this.statusCode = statusCode;- this.isOperational = isOperational === undefined ? true : isOperational;- this.errKey = errKey;- this.isApiError = true;- }+ // eslint-disable-next-line default-param-last+ constructor(statusCode: number | null | undefined, message: string, errKey?: string, isOperational = true, stack?: string) {+ super(message);+ this.statusCode = statusCode;+ this.isOperational = isOperational === undefined ? true : isOperational;+ this.errKey = errKey;+ this.isApiError = true;+ }}export default ApiError;diff --git a/packages/runtime/src/modules/embodiment/utils/chat.utils.ts b/packages/runtime/src/modules/embodiment/utils/chat.utils.tsindex 4430f81b..9f3c054b 100644--- a/packages/runtime/src/modules/embodiment/utils/chat.utils.ts+++ b/packages/runtime/src/modules/embodiment/utils/chat.utils.ts@@ -1,33 +1,31 @@import crypto from 'crypto';++import { ChatConversationsEnv } from '@embodiment/types/chat.types';import { getCurrentFormattedDate, toDateFromFormattedDateStr } from './date-time.utils';-export type ChatConversationsEnv = 'test' | 'prod';+export const CHAT_PREFIXES: Record<ChatConversationsEnv, string> = {- test: 'chat-test-',- prod: 'chat-',+ test: 'chat-test-',+ prod: 'chat-',};export const buildConversationId = (uid?: string, isTestConv = false) => {- const prefix = isTestConv ? CHAT_PREFIXES.test : CHAT_PREFIXES.prod;- const convId = uid ?? `${prefix}${getCurrentFormattedDate()}-${crypto.randomBytes(8).toString('hex')}`;- return `${prefix}${getCurrentFormattedDate()}-${convId}`;+ const prefix = isTestConv ? CHAT_PREFIXES.test : CHAT_PREFIXES.prod;+ const convId = uid ?? `${prefix}${getCurrentFormattedDate()}-${crypto.randomBytes(8).toString('hex')}`;+ return `${prefix}${getCurrentFormattedDate()}-${convId}`;};export const parseDateFromConvId = (convId: string) => {- const match = convId.match(/\d{4}-\d{2}-\d{2}-\d{2}-\d{2}-\d{2}/);-- if (!match) return null;- return toDateFromFormattedDateStr(match[0]);-};+ const match = convId.match(/\d{4}-\d{2}-\d{2}-\d{2}-\d{2}-\d{2}/);-export const getChatPrefixByEnv = (env: ChatConversationsEnv) => {- return CHAT_PREFIXES[env];+ if (!match) return null;+ return toDateFromFormattedDateStr(match[0]);};export const parseDateRange = (dateRange: string) => {- const [start, end] = dateRange.split(',');- return { start: parseInt(start), end: parseInt(end) };+ const [start, end] = dateRange.split(',');+ return { start: parseInt(start), end: parseInt(end) };};export const isValidDateRange = (dateRange: string) => {- if (!dateRange) return false;- const { start, end } = parseDateRange(dateRange);- return !isNaN(start) && !isNaN(end) && start < end;+ if (!dateRange) return false;+ const { start, end } = parseDateRange(dateRange);+ return !isNaN(start) && !isNaN(end) && start < end;};diff --git a/packages/runtime/src/modules/embodiment/utils/date-time.utils copy.ts b/packages/runtime/src/modules/embodiment/utils/date-time.utils copy.tsdeleted file mode 100644index 9184e5d5..00000000--- a/packages/runtime/src/modules/embodiment/utils/date-time.utils copy.ts+++ /dev/null@@ -1,27 +0,0 @@-export function getCurrentFormattedDate() {- const date = new Date();- const year = date.getFullYear();- const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based- const day = String(date.getDate()).padStart(2, '0');- const hours = String(date.getHours()).padStart(2, '0');- const minutes = String(date.getMinutes()).padStart(2, '0');- const seconds = String(date.getSeconds()).padStart(2, '0');- return `${year}-${month}-${day}-${hours}-${minutes}-${seconds}`;-}--export function toDateFromFormattedDateStr(formattedDate: string) {- const [year, month, day, hour, minute, second] = formattedDate.split('-').map(Number);- return new Date(year, month - 1, day, hour, minute, second);-}--export function getDayFormattedDate() {- const date = new Date();- const year = date.getFullYear();- const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based- const day = String(date.getDate()).padStart(2, '0');- return `${year}-${month}-${day}`;-}--export function delay(ms) {- return new Promise((r) => setTimeout(r, ms));-}diff --git a/packages/runtime/src/modules/embodiment/utils/date-time.utils.ts b/packages/runtime/src/modules/embodiment/utils/date-time.utils.tsindex 9184e5d5..a5438697 100644--- a/packages/runtime/src/modules/embodiment/utils/date-time.utils.ts+++ b/packages/runtime/src/modules/embodiment/utils/date-time.utils.ts@@ -1,27 +1,27 @@export function getCurrentFormattedDate() {- const date = new Date();- const year = date.getFullYear();- const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based- const day = String(date.getDate()).padStart(2, '0');- const hours = String(date.getHours()).padStart(2, '0');- const minutes = String(date.getMinutes()).padStart(2, '0');- const seconds = String(date.getSeconds()).padStart(2, '0');- return `${year}-${month}-${day}-${hours}-${minutes}-${seconds}`;+ const date = new Date();+ const year = date.getFullYear();+ const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based+ const day = String(date.getDate()).padStart(2, '0');+ const hours = String(date.getHours()).padStart(2, '0');+ const minutes = String(date.getMinutes()).padStart(2, '0');+ const seconds = String(date.getSeconds()).padStart(2, '0');+ return `${year}-${month}-${day}-${hours}-${minutes}-${seconds}`;}export function toDateFromFormattedDateStr(formattedDate: string) {- const [year, month, day, hour, minute, second] = formattedDate.split('-').map(Number);- return new Date(year, month - 1, day, hour, minute, second);+ const [year, month, day, hour, minute, second] = formattedDate.split('-').map(Number);+ return new Date(year, month - 1, day, hour, minute, second);}-export function getDayFormattedDate() {- const date = new Date();- const year = date.getFullYear();- const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based- const day = String(date.getDate()).padStart(2, '0');- return `${year}-${month}-${day}`;+function getDayFormattedDate() {+ const date = new Date();+ const year = date.getFullYear();+ const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based+ const day = String(date.getDate()).padStart(2, '0');+ return `${year}-${month}-${day}`;}export function delay(ms) {- return new Promise((r) => setTimeout(r, ms));+ return new Promise(r => setTimeout(r, ms));}diff --git a/packages/runtime/src/modules/embodiment/utils/general.utils.ts b/packages/runtime/src/modules/embodiment/utils/general.utils.tsindex 75de713d..b7974a80 100644--- a/packages/runtime/src/modules/embodiment/utils/general.utils.ts+++ b/packages/runtime/src/modules/embodiment/utils/general.utils.ts@@ -1,52 +1,50 @@import fs from 'fs/promises';-export function uid() {- return (Date.now() + Math.random()).toString(36).replace('.', '').toUpperCase();+function uid() {+ return (Date.now() + Math.random()).toString(36).replace('.', '').toUpperCase();}-export const hasKeyTemplateVar = (str: string = ''): boolean => {- if (!str || typeof str !== 'string') return false;- return (str?.match(/{{KEY\((.*?)\)}}/g) ?? []).length > 0;+const hasKeyTemplateVar = (str = ''): boolean => {+ if (!str || typeof str !== 'string') return false;+ return (str?.match(/{{KEY\((.*?)\)}}/g) ?? []).length > 0;};-export function parseTemplate(str, obj, { escapeString = true, processUnmatched = true, unmached = '' } = {}) {- try {- const parsed = str?.replace(/{{(.*?)}}/g, function (match, varName) {- // if key template var, return as is- if (hasKeyTemplateVar(match)) return match;-- let objVal = obj[varName.trim()];-- if (typeof objVal === 'object') {- objVal = JSON.stringify(objVal);- } else {- if (escapeString && typeof objVal === 'string') {- //escape double quotes, slashes ...- objVal = objVal?.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t');- }- }-- // Need to consider boolean 'false' as a valid value- // const val = objVal || match;- const val = objVal !== undefined ? objVal : match;-- return typeof val == 'string' || typeof val == 'number' ? val : JSON.stringify(val);- });-- //replace unmached vars with default value, make sure to ignore the key template var- return str == parsed && processUnmatched ? parsed?.replace(/{{(?!KEY\().*?}}/g, unmached) : parsed;- } catch (err) {- console.log('Error on parse template: ', err);-- return str;- }+function parseTemplate(str, obj, { escapeString = true, processUnmatched = true, unmached = '' } = {}) {+ try {+ const parsed = str?.replace(/{{(.*?)}}/g, function (match, varName) {+ // if key template var, return as is+ if (hasKeyTemplateVar(match)) return match;++ let objVal = obj[varName.trim()];++ if (typeof objVal === 'object') {+ objVal = JSON.stringify(objVal);+ } else if (escapeString && typeof objVal === 'string') {+ // escape double quotes, slashes ...+ objVal = objVal?.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t');+ }++ // Need to consider boolean 'false' as a valid value+ // const val = objVal || match;+ const val = objVal !== undefined ? objVal : match;++ return typeof val == 'string' || typeof val == 'number' ? val : JSON.stringify(val);+ });++ // replace unmached vars with default value, make sure to ignore the key template var+ return str == parsed && processUnmatched ? parsed?.replace(/{{(?!KEY\().*?}}/g, unmached) : parsed;+ } catch (err) {+ console.log('Error on parse template: ', err);++ return str;+ }}export const fsExists = async (path: string) => {- try {- await fs.access(path);- return true;- } catch {- return false;- }+ try {+ await fs.access(path);+ return true;+ } catch {+ return false;+ }};diff --git a/packages/runtime/src/services/code-sandbox.service.ts b/packages/runtime/src/services/code-sandbox.service.tsdeleted file mode 100644index 9d26a950..00000000--- a/packages/runtime/src/services/code-sandbox.service.ts+++ /dev/null@@ -1,102 +0,0 @@-import { ChildProcess, spawn } from "child_process";-import path from "path";--import { Logger } from "@smythos/sre";--const console = Logger("code-sandbox-service");--export class CodeSandboxService {- private static instance: CodeSandboxService;- private sandboxProcess: ChildProcess | null = null;- private readonly sandboxPort = 5055;-- static getInstance(): CodeSandboxService {- if (!CodeSandboxService.instance) {- CodeSandboxService.instance = new CodeSandboxService();- }- return CodeSandboxService.instance;- }-- async start(): Promise<void> {- try {- const scriptPath = path.join(- process.cwd(),- "..",- "code-sandbox",- "index.js"- );-- console.info(`Starting code sandbox service on port ${this.sandboxPort}`);-- this.sandboxProcess = spawn("node", [scriptPath], {- stdio: ["inherit", "pipe", "pipe"],- env: { ...process.env },- });-- this.sandboxProcess.stdout?.on("data", (data) => {- console.info(`[Code Sandbox] ${data.toString().trim()}`);- });-- this.sandboxProcess.stderr?.on("data", (data) => {- console.error(`[Code Sandbox Error] ${data.toString().trim()}`);- });-- this.sandboxProcess.on("exit", (code, signal) => {- console.warn(- `Code sandbox process exited with code ${code} and signal ${signal}`- );- this.sandboxProcess = null;- });-- this.sandboxProcess.on("error", (error) => {- console.error("Failed to start code sandbox process:", error);- });-- // Give it a moment to start- await new Promise((resolve) => setTimeout(resolve, 2000));-- console.info("Code sandbox service started successfully");- } catch (error) {- console.error("Failed to start code sandbox service:", error);- throw error;- }- }-- async stop(): Promise<void> {- if (this.sandboxProcess) {- console.info("Stopping code sandbox service");- this.sandboxProcess.kill("SIGTERM");-- // Wait for graceful shutdown, then force kill if needed- await new Promise((resolve) => {- if (!this.sandboxProcess) {- resolve(undefined);- return;- }-- const timeout = setTimeout(() => {- if (this.sandboxProcess) {- console.warn("Force killing code sandbox process");- this.sandboxProcess.kill("SIGKILL");- }- resolve(undefined);- }, 5000);-- this.sandboxProcess.on("exit", () => {- clearTimeout(timeout);- resolve(undefined);- });- });-- this.sandboxProcess = null;- }- }-- isRunning(): boolean {- return this.sandboxProcess !== null && !this.sandboxProcess.killed;- }-- getSandboxUrl(): string {- return `http://localhost:${this.sandboxPort}`;- }-}diff --git a/packages/runtime/static/embodiment/chatBot/chatbot-v2-stable.js b/packages/runtime/static/embodiment/chatBot/chatbot-v2-stable.jsdeleted file mode 100644index 57e3c5fa..00000000--- a/packages/runtime/static/embodiment/chatBot/chatbot-v2-stable.js+++ /dev/null@@ -1,37786 +0,0 @@-(function webpackUniversalModuleDefinition(root, factory) {- if(typeof exports === 'object' && typeof module === 'object')- module.exports = factory();- else if(typeof define === 'function' && define.amd)- define("SmythChatbot", [], factory);- else if(typeof exports === 'object')- exports["SmythChatbot"] = factory();- else- root["SmythChatbot"] = factory();-})(self, () => {-return /******/ (() => { // webpackBootstrap-/******/ var __webpack_modules__ = ({--/***/ 375:-/***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {--"use strict";--// NAMESPACE OBJECT: ./node_modules/micromark/lib/constructs.js-var constructs_namespaceObject = {};-__webpack_require__.r(constructs_namespaceObject);-__webpack_require__.d(constructs_namespaceObject, {- attentionMarkers: () => (attentionMarkers),- contentInitial: () => (contentInitial),- disable: () => (disable),- document: () => (constructs_document),- flow: () => (constructs_flow),- flowInitial: () => (flowInitial),- insideSpan: () => (insideSpan),- string: () => (constructs_string),- text: () => (constructs_text)-});--// NAMESPACE OBJECT: ./node_modules/property-information/lib/util/types.js-var types_namespaceObject = {};-__webpack_require__.r(types_namespaceObject);-__webpack_require__.d(types_namespaceObject, {- boolean: () => (types_boolean),- booleanish: () => (booleanish),- commaOrSpaceSeparated: () => (commaOrSpaceSeparated),- commaSeparated: () => (commaSeparated),- number: () => (number),- overloadedBoolean: () => (overloadedBoolean),- spaceSeparated: () => (spaceSeparated)-});--// EXTERNAL MODULE: ./node_modules/react-dom/client.js-var client = __webpack_require__(745);-// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js-var injectStylesIntoStyleTag = __webpack_require__(379);-var injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag);-// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/styleDomAPI.js-var styleDomAPI = __webpack_require__(795);-var styleDomAPI_default = /*#__PURE__*/__webpack_require__.n(styleDomAPI);-// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/insertBySelector.js-var insertBySelector = __webpack_require__(569);-var insertBySelector_default = /*#__PURE__*/__webpack_require__.n(insertBySelector);-// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js-var setAttributesWithoutAttributes = __webpack_require__(565);-var setAttributesWithoutAttributes_default = /*#__PURE__*/__webpack_require__.n(setAttributesWithoutAttributes);-// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/insertStyleElement.js-var insertStyleElement = __webpack_require__(216);-var insertStyleElement_default = /*#__PURE__*/__webpack_require__.n(insertStyleElement);-// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/styleTagTransform.js-var styleTagTransform = __webpack_require__(589);-var styleTagTransform_default = /*#__PURE__*/__webpack_require__.n(styleTagTransform);-// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./src/index.css-var cjs_js_src = __webpack_require__(424);-;// CONCATENATED MODULE: ./src/index.css------------var options = {};--options.styleTagTransform = (styleTagTransform_default());-options.setAttributes = (setAttributesWithoutAttributes_default());-- options.insert = insertBySelector_default().bind(null, "head");--options.domAPI = (styleDomAPI_default());-options.insertStyleElement = (insertStyleElement_default());--var update = injectStylesIntoStyleTag_default()(cjs_js_src/* default */.Z, options);----- /* harmony default export */ const src = (cjs_js_src/* default */.Z && cjs_js_src/* default */.Z.locals ? cjs_js_src/* default */.Z.locals : undefined);--// EXTERNAL MODULE: ./node_modules/react/index.js-var react = __webpack_require__(294);-// EXTERNAL MODULE: ./node_modules/prop-types/index.js-var prop_types = __webpack_require__(697);-var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);-;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/type.js-var type_DEFAULT_COLOR = '#4fa94d';-var type_DEFAULT_WAI_ARIA_ATTRIBUTE = {- 'aria-busy': true,- role: 'status',-};--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Audio.js-var __assign = (undefined && undefined.__assign) || function () {- __assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return __assign.apply(this, arguments);-};----var Audio = function (_a) {- var _b = _a.height, height = _b === void 0 ? '100' : _b, _c = _a.width, width = _c === void 0 ? '100' : _c, _d = _a.color, color = _d === void 0 ? DEFAULT_COLOR : _d, _e = _a.ariaLabel, ariaLabel = _e === void 0 ? 'audio-loading' : _e, _f = _a.wrapperStyle, wrapperStyle = _f === void 0 ? {} : _f, wrapperClass = _a.wrapperClass, _g = _a.visible, visible = _g === void 0 ? true : _g;- return (React.createElement("div", __assign({ style: __assign(__assign({}, getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "data-testid": "audio-loading", "aria-label": ariaLabel }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("svg", { height: "".concat(height), width: "".concat(width), fill: color, viewBox: "0 0 55 80", xmlns: "http://www.w3.org/2000/svg", "data-testid": "audio-svg" },- React.createElement("g", { transform: "matrix(1 0 0 -1 0 80)" },- React.createElement("rect", { width: "10", height: "20", rx: "3" },- React.createElement("animate", { attributeName: "height", begin: "0s", dur: "4.3s", values: "20;45;57;80;64;32;66;45;64;23;66;13;64;56;34;34;2;23;76;79;20", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("rect", { x: "15", width: "10", height: "80", rx: "3" },- React.createElement("animate", { attributeName: "height", begin: "0s", dur: "2s", values: "80;55;33;5;75;23;73;33;12;14;60;80", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("rect", { x: "30", width: "10", height: "50", rx: "3" },- React.createElement("animate", { attributeName: "height", begin: "0s", dur: "1.4s", values: "50;34;78;23;56;23;34;76;80;54;21;50", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("rect", { x: "45", width: "10", height: "30", rx: "3" },- React.createElement("animate", { attributeName: "height", begin: "0s", dur: "2s", values: "30;45;13;80;56;72;45;76;34;23;67;30", calcMode: "linear", repeatCount: "indefinite" }))))));-};-/* harmony default export */ const loader_Audio = ((/* unused pure expression or super */ null && (Audio)));--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/BallTriangle.js-var BallTriangle_assign = (undefined && undefined.__assign) || function () {- BallTriangle_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return BallTriangle_assign.apply(this, arguments);-};----var BallTriangle = function (_a) {- var _b = _a.height, height = _b === void 0 ? 100 : _b, _c = _a.width, width = _c === void 0 ? 100 : _c, _d = _a.radius, radius = _d === void 0 ? 5 : _d, _e = _a.color, color = _e === void 0 ? DEFAULT_COLOR : _e, _f = _a.ariaLabel, ariaLabel = _f === void 0 ? 'ball-triangle-loading' : _f, wrapperClass = _a.wrapperClass, wrapperStyle = _a.wrapperStyle, _g = _a.visible, visible = _g === void 0 ? true : _g;- return (React.createElement("div", BallTriangle_assign({ style: BallTriangle_assign(BallTriangle_assign({}, getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "data-testid": "ball-triangle-loading", "aria-label": ariaLabel }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("svg", { height: height, width: width, stroke: color, viewBox: "0 0 57 57", xmlns: "http://www.w3.org/2000/svg", "data-testid": "ball-triangle-svg" },- React.createElement("g", { fill: "none", fillRule: "evenodd" },- React.createElement("g", { transform: "translate(1 1)", strokeWidth: "2" },- React.createElement("circle", { cx: "5", cy: "50", r: radius },- React.createElement("animate", { attributeName: "cy", begin: "0s", dur: "2.2s", values: "50;5;50;50", calcMode: "linear", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "cx", begin: "0s", dur: "2.2s", values: "5;27;49;5", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("circle", { cx: "27", cy: "5", r: radius },- React.createElement("animate", { attributeName: "cy", begin: "0s", dur: "2.2s", from: "5", to: "5", values: "5;50;50;5", calcMode: "linear", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "cx", begin: "0s", dur: "2.2s", from: "27", to: "27", values: "27;49;5;27", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("circle", { cx: "49", cy: "50", r: radius },- React.createElement("animate", { attributeName: "cy", begin: "0s", dur: "2.2s", values: "50;50;5;50", calcMode: "linear", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "cx", from: "49", to: "49", begin: "0s", dur: "2.2s", values: "49;5;27;49", calcMode: "linear", repeatCount: "indefinite" })))))));-};-/* harmony default export */ const loader_BallTriangle = ((/* unused pure expression or super */ null && (BallTriangle)));--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Bars.js-var Bars_assign = (undefined && undefined.__assign) || function () {- Bars_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return Bars_assign.apply(this, arguments);-};----var Bars = function (_a) {- var _b = _a.height, height = _b === void 0 ? 80 : _b, _c = _a.width, width = _c === void 0 ? 80 : _c, _d = _a.color, color = _d === void 0 ? DEFAULT_COLOR : _d, _e = _a.ariaLabel, ariaLabel = _e === void 0 ? 'bars-loading' : _e, wrapperStyle = _a.wrapperStyle, wrapperClass = _a.wrapperClass, _f = _a.visible, visible = _f === void 0 ? true : _f;- return (React.createElement("div", Bars_assign({ style: Bars_assign(Bars_assign({}, getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "data-testid": "bars-loading", "aria-label": ariaLabel }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("svg", { width: width, height: height, fill: color, viewBox: "0 0 135 140", xmlns: "http://www.w3.org/2000/svg", "data-testid": "bars-svg" },- React.createElement("rect", { y: "10", width: "15", height: "120", rx: "6" },- React.createElement("animate", { attributeName: "height", begin: "0.5s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "y", begin: "0.5s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("rect", { x: "30", y: "10", width: "15", height: "120", rx: "6" },- React.createElement("animate", { attributeName: "height", begin: "0.25s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "y", begin: "0.25s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("rect", { x: "60", width: "15", height: "140", rx: "6" },- React.createElement("animate", { attributeName: "height", begin: "0s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "y", begin: "0s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("rect", { x: "90", y: "10", width: "15", height: "120", rx: "6" },- React.createElement("animate", { attributeName: "height", begin: "0.25s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "y", begin: "0.25s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("rect", { x: "120", y: "10", width: "15", height: "120", rx: "6" },- React.createElement("animate", { attributeName: "height", begin: "0.5s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "y", begin: "0.5s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })))));-};-/* harmony default export */ const loader_Bars = ((/* unused pure expression or super */ null && (Bars)));--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Circles.js-var Circles_assign = (undefined && undefined.__assign) || function () {- Circles_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return Circles_assign.apply(this, arguments);-};----var Circles = function (_a) {- var _b = _a.height, height = _b === void 0 ? 80 : _b, _c = _a.width, width = _c === void 0 ? 80 : _c, _d = _a.color, color = _d === void 0 ? DEFAULT_COLOR : _d, _e = _a.ariaLabel, ariaLabel = _e === void 0 ? 'circles-loading' : _e, wrapperStyle = _a.wrapperStyle, wrapperClass = _a.wrapperClass, _f = _a.visible, visible = _f === void 0 ? true : _f;- return (React.createElement("div", Circles_assign({ style: Circles_assign(Circles_assign({}, getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "aria-label": ariaLabel, "data-testid": "circles-loading" }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("svg", { width: width, height: height, viewBox: "0 0 135 135", xmlns: "http://www.w3.org/2000/svg", fill: color, "data-testid": "circles-svg" },- React.createElement("path", { d: "M67.447 58c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10zm9.448 9.447c0 5.523 4.477 10 10 10 5.522 0 10-4.477 10-10s-4.478-10-10-10c-5.523 0-10 4.477-10 10zm-9.448 9.448c-5.523 0-10 4.477-10 10 0 5.522 4.477 10 10 10s10-4.478 10-10c0-5.523-4.477-10-10-10zM58 67.447c0-5.523-4.477-10-10-10s-10 4.477-10 10 4.477 10 10 10 10-4.477 10-10z" },- React.createElement("animateTransform", { attributeName: "transform", type: "rotate", from: "0 67 67", to: "-360 67 67", dur: "2.5s", repeatCount: "indefinite" })),- React.createElement("path", { d: "M28.19 40.31c6.627 0 12-5.374 12-12 0-6.628-5.373-12-12-12-6.628 0-12 5.372-12 12 0 6.626 5.372 12 12 12zm30.72-19.825c4.686 4.687 12.284 4.687 16.97 0 4.686-4.686 4.686-12.284 0-16.97-4.686-4.687-12.284-4.687-16.97 0-4.687 4.686-4.687 12.284 0 16.97zm35.74 7.705c0 6.627 5.37 12 12 12 6.626 0 12-5.373 12-12 0-6.628-5.374-12-12-12-6.63 0-12 5.372-12 12zm19.822 30.72c-4.686 4.686-4.686 12.284 0 16.97 4.687 4.686 12.285 4.686 16.97 0 4.687-4.686 4.687-12.284 0-16.97-4.685-4.687-12.283-4.687-16.97 0zm-7.704 35.74c-6.627 0-12 5.37-12 12 0 6.626 5.373 12 12 12s12-5.374 12-12c0-6.63-5.373-12-12-12zm-30.72 19.822c-4.686-4.686-12.284-4.686-16.97 0-4.686 4.687-4.686 12.285 0 16.97 4.686 4.687 12.284 4.687 16.97 0 4.687-4.685 4.687-12.283 0-16.97zm-35.74-7.704c0-6.627-5.372-12-12-12-6.626 0-12 5.373-12 12s5.374 12 12 12c6.628 0 12-5.373 12-12zm-19.823-30.72c4.687-4.686 4.687-12.284 0-16.97-4.686-4.686-12.284-4.686-16.97 0-4.687 4.686-4.687 12.284 0 16.97 4.686 4.687 12.284 4.687 16.97 0z" },- React.createElement("animateTransform", { attributeName: "transform", type: "rotate", from: "0 67 67", to: "360 67 67", dur: "8s", repeatCount: "indefinite" })))));-};-/* harmony default export */ const loader_Circles = ((/* unused pure expression or super */ null && (Circles)));--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/CirclesWithBar.js-var CirclesWithBar_assign = (undefined && undefined.__assign) || function () {- CirclesWithBar_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return CirclesWithBar_assign.apply(this, arguments);-};----var CirclesWithBar = function (_a) {- var _b = _a.wrapperStyle, wrapperStyle = _b === void 0 ? {} : _b, _c = _a.visible, visible = _c === void 0 ? true : _c, _d = _a.wrapperClass, wrapperClass = _d === void 0 ? '' : _d, _e = _a.height, height = _e === void 0 ? 100 : _e, _f = _a.width, width = _f === void 0 ? 100 : _f, _g = _a.color, color = _g === void 0 ? DEFAULT_COLOR : _g, outerCircleColor = _a.outerCircleColor, innerCircleColor = _a.innerCircleColor, barColor = _a.barColor, _h = _a.ariaLabel, ariaLabel = _h === void 0 ? 'circles-with-bar-loading' : _h;- return (React.createElement("div", CirclesWithBar_assign({ style: CirclesWithBar_assign(CirclesWithBar_assign({}, getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "aria-label": ariaLabel }, DEFAULT_WAI_ARIA_ATTRIBUTE, { "data-testid": "circles-with-bar-wrapper" }),- React.createElement("svg", { version: "1.1", id: "L1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", height: "".concat(height), width: "".concat(width), viewBox: "0 0 100 100", enableBackground: "new 0 0 100 100", xmlSpace: "preserve", "data-testid": "circles-with-bar-svg" },- React.createElement("circle", { fill: "none", stroke: "".concat(outerCircleColor || color), strokeWidth: "6", strokeMiterlimit: "15", strokeDasharray: "14.2472,14.2472", cx: "50", cy: "50", r: "47" },- React.createElement("animateTransform", { attributeName: "transform", attributeType: "XML", type: "rotate", dur: "5s", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" })),- React.createElement("circle", { fill: "none", stroke: "".concat(innerCircleColor || color), strokeWidth: "1", strokeMiterlimit: "10", strokeDasharray: "10,10", cx: "50", cy: "50", r: "39" },- React.createElement("animateTransform", { attributeName: "transform", attributeType: "XML", type: "rotate", dur: "5s", from: "0 50 50", to: "-360 50 50", repeatCount: "indefinite" })),- React.createElement("g", { fill: "".concat(barColor || color), "data-testid": "circles-with-bar-svg-bar" },- React.createElement("rect", { x: "30", y: "35", width: "5", height: "30" },- React.createElement("animateTransform", { attributeName: "transform", dur: "1s", type: "translate", values: "0 5 ; 0 -5; 0 5", repeatCount: "indefinite", begin: "0.1" })),- React.createElement("rect", { x: "40", y: "35", width: "5", height: "30" },- React.createElement("animateTransform", { attributeName: "transform", dur: "1s", type: "translate", values: "0 5 ; 0 -5; 0 5", repeatCount: "indefinite", begin: "0.2" })),- React.createElement("rect", { x: "50", y: "35", width: "5", height: "30" },- React.createElement("animateTransform", { attributeName: "transform", dur: "1s", type: "translate", values: "0 5 ; 0 -5; 0 5", repeatCount: "indefinite", begin: "0.3" })),- React.createElement("rect", { x: "60", y: "35", width: "5", height: "30" },- React.createElement("animateTransform", { attributeName: "transform", dur: "1s", type: "translate", values: "0 5 ; 0 -5; 0 5", repeatCount: "indefinite", begin: "0.4" })),- React.createElement("rect", { x: "70", y: "35", width: "5", height: "30" },- React.createElement("animateTransform", { attributeName: "transform", dur: "1s", type: "translate", values: "0 5 ; 0 -5; 0 5", repeatCount: "indefinite", begin: "0.5" }))))));-};-/* harmony default export */ const loader_CirclesWithBar = ((/* unused pure expression or super */ null && (CirclesWithBar)));--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Grid.js-var Grid_assign = (undefined && undefined.__assign) || function () {- Grid_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return Grid_assign.apply(this, arguments);-};----var Grid = function (_a) {- var _b = _a.height, height = _b === void 0 ? 80 : _b, _c = _a.width, width = _c === void 0 ? 80 : _c, _d = _a.radius, radius = _d === void 0 ? 12.5 : _d, _e = _a.color, color = _e === void 0 ? DEFAULT_COLOR : _e, _f = _a.ariaLabel, ariaLabel = _f === void 0 ? 'grid-loading' : _f, wrapperStyle = _a.wrapperStyle, wrapperClass = _a.wrapperClass, _g = _a.visible, visible = _g === void 0 ? true : _g;- return (React.createElement("div", Grid_assign({ style: Grid_assign(Grid_assign({}, getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "data-testid": "grid-loading", "aria-label": ariaLabel }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("svg", { width: width, height: height, viewBox: "0 0 105 105", fill: color, "data-testid": "grid-svg" },- React.createElement("circle", { cx: "12.5", cy: "12.5", r: "".concat(radius) },- React.createElement("animate", { attributeName: "fill-opacity", begin: "0s", dur: "1s", values: "1;.2;1", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("circle", { cx: "12.5", cy: "52.5", r: "".concat(radius) },- React.createElement("animate", { attributeName: "fill-opacity", begin: "100ms", dur: "1s", values: "1;.2;1", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("circle", { cx: "52.5", cy: "12.5", r: "".concat(radius) },- React.createElement("animate", { attributeName: "fill-opacity", begin: "300ms", dur: "1s", values: "1;.2;1", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("circle", { cx: "52.5", cy: "52.5", r: "".concat(radius) },- React.createElement("animate", { attributeName: "fill-opacity", begin: "600ms", dur: "1s", values: "1;.2;1", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("circle", { cx: "92.5", cy: "12.5", r: "".concat(radius) },- React.createElement("animate", { attributeName: "fill-opacity", begin: "800ms", dur: "1s", values: "1;.2;1", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("circle", { cx: "92.5", cy: "52.5", r: "".concat(radius) },- React.createElement("animate", { attributeName: "fill-opacity", begin: "400ms", dur: "1s", values: "1;.2;1", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("circle", { cx: "12.5", cy: "92.5", r: "".concat(radius) },- React.createElement("animate", { attributeName: "fill-opacity", begin: "700ms", dur: "1s", values: "1;.2;1", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("circle", { cx: "52.5", cy: "92.5", r: "".concat(radius) },- React.createElement("animate", { attributeName: "fill-opacity", begin: "500ms", dur: "1s", values: "1;.2;1", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("circle", { cx: "92.5", cy: "92.5", r: "".concat(radius) },- React.createElement("animate", { attributeName: "fill-opacity", begin: "200ms", dur: "1s", values: "1;.2;1", calcMode: "linear", repeatCount: "indefinite" })))));-};-/* harmony default export */ const loader_Grid = ((/* unused pure expression or super */ null && (Grid)));--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Hearts.js-var Hearts_assign = (undefined && undefined.__assign) || function () {- Hearts_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return Hearts_assign.apply(this, arguments);-};----var Hearts = function (_a) {- var _b = _a.height, height = _b === void 0 ? 80 : _b, _c = _a.width, width = _c === void 0 ? 80 : _c, _d = _a.color, color = _d === void 0 ? DEFAULT_COLOR : _d, _e = _a.ariaLabel, ariaLabel = _e === void 0 ? 'hearts-loading' : _e, wrapperStyle = _a.wrapperStyle, wrapperClass = _a.wrapperClass, _f = _a.visible, visible = _f === void 0 ? true : _f;- return (React.createElement("div", Hearts_assign({ style: Hearts_assign(Hearts_assign({}, getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "data-testid": "hearts-loading", "aria-label": ariaLabel }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("svg", { width: width, height: height, viewBox: "0 0 140 64", xmlns: "http://www.w3.org/2000/svg", fill: color, "data-testid": "hearts-svg" },- React.createElement("path", { d: "M30.262 57.02L7.195 40.723c-5.84-3.976-7.56-12.06-3.842-18.063 3.715-6 11.467-7.65 17.306-3.68l4.52 3.76 2.6-5.274c3.717-6.002 11.47-7.65 17.305-3.68 5.84 3.97 7.56 12.054 3.842 18.062L34.49 56.118c-.897 1.512-2.793 1.915-4.228.9z", attributeName: "fill-opacity", from: "0", to: ".5" },- React.createElement("animate", { attributeName: "fill-opacity", begin: "0s", dur: "1.4s", values: "0.5;1;0.5", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("path", { d: "M105.512 56.12l-14.44-24.272c-3.716-6.008-1.996-14.093 3.843-18.062 5.835-3.97 13.588-2.322 17.306 3.68l2.6 5.274 4.52-3.76c5.84-3.97 13.592-2.32 17.307 3.68 3.718 6.003 1.998 14.088-3.842 18.064L109.74 57.02c-1.434 1.014-3.33.61-4.228-.9z", attributeName: "fill-opacity", from: "0", to: ".5" },- React.createElement("animate", { attributeName: "fill-opacity", begin: "0.7s", dur: "1.4s", values: "0.5;1;0.5", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("path", { d: "M67.408 57.834l-23.01-24.98c-5.864-6.15-5.864-16.108 0-22.248 5.86-6.14 15.37-6.14 21.234 0L70 16.168l4.368-5.562c5.863-6.14 15.375-6.14 21.235 0 5.863 6.14 5.863 16.098 0 22.247l-23.007 24.98c-1.43 1.556-3.757 1.556-5.188 0z" }))));-};-/* harmony default export */ const loader_Hearts = ((/* unused pure expression or super */ null && (Hearts)));--// EXTERNAL MODULE: ./node_modules/react-is/index.js-var react_is = __webpack_require__(864);-// EXTERNAL MODULE: ./node_modules/shallowequal/index.js-var shallowequal = __webpack_require__(774);-var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal);-;// CONCATENATED MODULE: ./node_modules/@emotion/stylis/dist/stylis.browser.esm.js-function stylis_min (W) {- function M(d, c, e, h, a) {- for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {- g = e.charCodeAt(l);- l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);-- if (0 === b + n + v + m) {- if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {- switch (g) {- case 32:- case 9:- case 59:- case 13:- case 10:- break;-- default:- f += e.charAt(l);- }-- g = 59;- }-- switch (g) {- case 123:- f = f.trim();- q = f.charCodeAt(0);- k = 1;-- for (t = ++l; l < B;) {- switch (g = e.charCodeAt(l)) {- case 123:- k++;- break;-- case 125:- k--;- break;-- case 47:- switch (g = e.charCodeAt(l + 1)) {- case 42:- case 47:- a: {- for (u = l + 1; u < J; ++u) {- switch (e.charCodeAt(u)) {- case 47:- if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {- l = u + 1;- break a;- }-- break;-- case 10:- if (47 === g) {- l = u + 1;- break a;- }-- }- }-- l = u;- }-- }-- break;-- case 91:- g++;-- case 40:- g++;-- case 34:- case 39:- for (; l++ < J && e.charCodeAt(l) !== g;) {- }-- }-- if (0 === k) break;- l++;- }-- k = e.substring(t, l);- 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));-- switch (q) {- case 64:- 0 < r && (f = f.replace(N, ''));- g = f.charCodeAt(1);-- switch (g) {- case 100:- case 109:- case 115:- case 45:- r = c;- break;-- default:- r = O;- }-- k = M(c, r, k, g, a + 1);- t = k.length;- 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));- if (0 < t) switch (g) {- case 115:- f = f.replace(da, ea);-- case 100:- case 109:- case 45:- k = f + '{' + k + '}';- break;-- case 107:- f = f.replace(fa, '$1 $2');- k = f + '{' + k + '}';- k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;- break;-- default:- k = f + k, 112 === h && (k = (p += k, ''));- } else k = '';- break;-- default:- k = M(c, X(c, f, I), k, h, a + 1);- }-- F += k;- k = I = r = u = q = 0;- f = '';- g = e.charCodeAt(++l);- break;-- case 125:- case 59:- f = (0 < r ? f.replace(N, '') : f).trim();- if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\x00\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {- case 0:- break;-- case 64:- if (105 === g || 99 === g) {- G += f + e.charAt(l);- break;- }-- default:- 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));- }- I = r = u = q = 0;- f = '';- g = e.charCodeAt(++l);- }- }-- switch (g) {- case 13:- case 10:- 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\x00');- 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);- z = 1;- D++;- break;-- case 59:- case 125:- if (0 === b + n + v + m) {- z++;- break;- }-- default:- z++;- y = e.charAt(l);-- switch (g) {- case 9:- case 32:- if (0 === n + m + b) switch (x) {- case 44:- case 58:- case 9:- case 32:- y = '';- break;-- default:- 32 !== g && (y = ' ');- }- break;-- case 0:- y = '\\0';- break;-- case 12:- y = '\\f';- break;-- case 11:- y = '\\v';- break;-- case 38:- 0 === n + b + m && (r = I = 1, y = '\f' + y);- break;-- case 108:- if (0 === n + b + m + E && 0 < u) switch (l - u) {- case 2:- 112 === x && 58 === e.charCodeAt(l - 3) && (E = x);-- case 8:- 111 === K && (E = K);- }- break;-- case 58:- 0 === n + b + m && (u = l);- break;-- case 44:- 0 === b + v + n + m && (r = 1, y += '\r');- break;-- case 34:- case 39:- 0 === b && (n = n === g ? 0 : 0 === n ? g : n);- break;-- case 91:- 0 === n + b + v && m++;- break;-- case 93:- 0 === n + b + v && m--;- break;-- case 41:- 0 === n + b + m && v--;- break;-- case 40:- if (0 === n + b + m) {- if (0 === q) switch (2 * x + 3 * K) {- case 533:- break;-- default:- q = 1;- }- v++;- }-- break;-- case 64:- 0 === b + v + n + m + u + k && (k = 1);- break;-- case 42:- case 47:- if (!(0 < n + m + v)) switch (b) {- case 0:- switch (2 * g + 3 * e.charCodeAt(l + 1)) {- case 235:- b = 47;- break;-- case 220:- t = l, b = 42;- }-- break;-- case 42:- 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);- }- }-- 0 === b && (f += y);- }-- K = x;- x = g;- l++;- }-- t = p.length;-- if (0 < t) {- r = c;- if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;- p = r.join(',') + '{' + p + '}';-- if (0 !== w * E) {- 2 !== w || L(p, 2) || (E = 0);-- switch (E) {- case 111:- p = p.replace(ha, ':-moz-$1') + p;- break;-- case 112:- p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;- }-- E = 0;- }- }-- return G + p + F;- }-- function X(d, c, e) {- var h = c.trim().split(ia);- c = h;- var a = h.length,- m = d.length;-- switch (m) {- case 0:- case 1:- var b = 0;-- for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {- c[b] = Z(d, c[b], e).trim();- }-- break;-- default:- var v = b = 0;-- for (c = []; b < a; ++b) {- for (var n = 0; n < m; ++n) {- c[v++] = Z(d[n] + ' ', h[b], e).trim();- }- }-- }-- return c;- }-- function Z(d, c, e) {- var h = c.charCodeAt(0);- 33 > h && (h = (c = c.trim()).charCodeAt(0));-- switch (h) {- case 38:- return c.replace(F, '$1' + d.trim());-- case 58:- return d.trim() + c.replace(F, '$1' + d.trim());-- default:- if (0 < 1 * e && 0 < c.indexOf('\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());- }-- return d + c;- }-- function P(d, c, e, h) {- var a = d + ';',- m = 2 * c + 3 * e + 4 * h;-- if (944 === m) {- d = a.indexOf(':', 9) + 1;- var b = a.substring(d, a.length - 1).trim();- b = a.substring(0, d).trim() + b + ';';- return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;- }-- if (0 === w || 2 === w && !L(a, 1)) return a;-- switch (m) {- case 1015:- return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;-- case 951:- return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;-- case 963:- return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;-- case 1009:- if (100 !== a.charCodeAt(4)) break;-- case 969:- case 942:- return '-webkit-' + a + a;-- case 978:- return '-webkit-' + a + '-moz-' + a + a;-- case 1019:- case 983:- return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;-- case 883:- if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;- if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;- break;-- case 932:- if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {- case 103:- return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;-- case 115:- return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;-- case 98:- return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;- }- return '-webkit-' + a + '-ms-' + a + a;-- case 964:- return '-webkit-' + a + '-ms-flex-' + a + a;-- case 1023:- if (99 !== a.charCodeAt(8)) break;- b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');- return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;-- case 1005:- return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;-- case 1e3:- b = a.substring(13).trim();- c = b.indexOf('-') + 1;-- switch (b.charCodeAt(0) + b.charCodeAt(c)) {- case 226:- b = a.replace(G, 'tb');- break;-- case 232:- b = a.replace(G, 'tb-rl');- break;-- case 220:- b = a.replace(G, 'lr');- break;-- default:- return a;- }-- return '-webkit-' + a + '-ms-' + b + a;-- case 1017:- if (-1 === a.indexOf('sticky', 9)) break;-- case 975:- c = (a = d).length - 10;- b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();-- switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {- case 203:- if (111 > b.charCodeAt(8)) break;-- case 115:- a = a.replace(b, '-webkit-' + b) + ';' + a;- break;-- case 207:- case 102:- a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;- }-- return a + ';';-- case 938:- if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {- case 105:- return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;-- case 115:- return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;-- default:- return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;- }- break;-- case 973:- case 989:- if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;-- case 931:- case 953:- if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;- break;-- case 962:- if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;- }-- return a;- }-- function L(d, c) {- var e = d.indexOf(1 === c ? ':' : '{'),- h = d.substring(0, 3 !== c ? e : 10);- e = d.substring(e + 1, d.length - 1);- return R(2 !== c ? h : h.replace(na, '$1'), e, c);- }-- function ea(d, c) {- var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));- return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';- }-- function H(d, c, e, h, a, m, b, v, n, q) {- for (var g = 0, x = c, w; g < A; ++g) {- switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {- case void 0:- case !1:- case !0:- case null:- break;-- default:- x = w;- }- }-- if (x !== c) return x;- }-- function T(d) {- switch (d) {- case void 0:- case null:- A = S.length = 0;- break;-- default:- if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) {- T(d[c]);- } else Y = !!d | 0;- }-- return T;- }-- function U(d) {- d = d.prefix;- void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);- return U;- }-- function B(d, c) {- var e = d;- 33 > e.charCodeAt(0) && (e = e.trim());- V = e;- e = [V];-- if (0 < A) {- var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);- void 0 !== h && 'string' === typeof h && (c = h);- }-- var a = M(O, e, c, 0, 0);- 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));- V = '';- E = 0;- z = D = 1;- return a;- }-- var ca = /^\0+/g,- N = /[\0\r\f]/g,- aa = /: */g,- ka = /zoo|gra/,- ma = /([,: ])(transform)/g,- ia = /,\r+?/g,- F = /([\t\r\n ])*\f?&/g,- fa = /@(k\w+)\s*(\S*)\s*/,- Q = /::(place)/g,- ha = /:(read-only)/g,- G = /[svh]\w+-[tblr]{2}/,- da = /\(\s*(.*)\s*\)/g,- oa = /([\s\S]*?);/g,- ba = /-self|flex-/g,- na = /[^]*?(:[rp][el]a[\w-]+)[^]*/,- la = /stretch|:\s*\w+\-(?:conte|avail)/,- ja = /([^-])(image-set\()/,- z = 1,- D = 1,- E = 0,- w = 1,- O = [],- S = [],- A = 0,- R = null,- Y = 0,- V = '';- B.use = T;- B.set = U;- void 0 !== W && U(W);- return B;-}--/* harmony default export */ const stylis_browser_esm = (stylis_min);--;// CONCATENATED MODULE: ./node_modules/@emotion/unitless/dist/unitless.browser.esm.js-var unitlessKeys = {- animationIterationCount: 1,- borderImageOutset: 1,- borderImageSlice: 1,- borderImageWidth: 1,- boxFlex: 1,- boxFlexGroup: 1,- boxOrdinalGroup: 1,- columnCount: 1,- columns: 1,- flex: 1,- flexGrow: 1,- flexPositive: 1,- flexShrink: 1,- flexNegative: 1,- flexOrder: 1,- gridRow: 1,- gridRowEnd: 1,- gridRowSpan: 1,- gridRowStart: 1,- gridColumn: 1,- gridColumnEnd: 1,- gridColumnSpan: 1,- gridColumnStart: 1,- msGridRow: 1,- msGridRowSpan: 1,- msGridColumn: 1,- msGridColumnSpan: 1,- fontWeight: 1,- lineHeight: 1,- opacity: 1,- order: 1,- orphans: 1,- tabSize: 1,- widows: 1,- zIndex: 1,- zoom: 1,- WebkitLineClamp: 1,- // SVG-related properties- fillOpacity: 1,- floodOpacity: 1,- stopOpacity: 1,- strokeDasharray: 1,- strokeDashoffset: 1,- strokeMiterlimit: 1,- strokeOpacity: 1,- strokeWidth: 1-};--/* harmony default export */ const unitless_browser_esm = (unitlessKeys);--;// CONCATENATED MODULE: ./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js-function memoize(fn) {- var cache = Object.create(null);- return function (arg) {- if (cache[arg] === undefined) cache[arg] = fn(arg);- return cache[arg];- };-}----;// CONCATENATED MODULE: ./node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js---var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23--var isPropValid = /* #__PURE__ */memoize(function (prop) {- return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111- /* o */- && prop.charCodeAt(1) === 110- /* n */- && prop.charCodeAt(2) < 91;-}-/* Z+1 */-);----// EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js-var hoist_non_react_statics_cjs = __webpack_require__(679);-var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);-;// CONCATENATED MODULE: ./node_modules/styled-components/dist/styled-components.browser.esm.js-function y(){return(y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var v=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},g=function(t){return null!==t&&"object"==typeof t&&"[object Object]"===(t.toString?t.toString():Object.prototype.toString.call(t))&&!(0,react_is.typeOf)(t)},S=Object.freeze([]),w=Object.freeze({});function E(e){return"function"==typeof e}function b(e){return false||e.displayName||e.name||"Component"}function _(e){return e&&"string"==typeof e.styledComponentId}var N="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",A="5.3.11",C="undefined"!=typeof window&&"HTMLElement"in window,I=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&(void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!=="production")),P={},O= false?0:{};function R(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach((function(t){e=e.replace(/%[a-z]/,t)})),e}function D(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw true?new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):"")):0}var j=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&D(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=0,c=t.length;a<c;a++)this.tag.insertRule(i,t[a])&&(this.groupSizes[e]++,i++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+=this.tag.getRule(s)+"/*!sc*/\n";return t},e}(),T=new Map,x=new Map,k=1,V=function(e){if(T.has(e))return T.get(e);for(;x.has(k);)k++;var t=k++;return false&&0,T.set(e,t),x.set(t,e),t},B=function(e){return x.get(e)},z=function(e,t){t>=k&&(k=t+1),T.set(e,t),x.set(t,e)},M="style["+N+'][data-styled-version="5.3.11"]',G=new RegExp("^"+N+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),L=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r)},F=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],o=0,s=n.length;o<s;o++){var i=n[o].trim();if(i){var a=i.match(G);if(a){var c=0|parseInt(a[1],10),u=a[2];0!==c&&(z(u,c),L(e,u,a[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(i)}}},Y=function(){return true?__webpack_require__.nc:0},q=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(N))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(N,"active"),r.setAttribute("data-styled-version","5.3.11");var i=Y();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},H=function(){function e(e){var t=this.element=q(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}D(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),$=function(){function e(e){var t=this.element=q(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),W=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),U=C,J={isServer:!C,useCSSOMInjection:!I},X=function(){function e(e,t,n){void 0===e&&(e=w),void 0===t&&(t={}),this.options=y({},J,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&C&&U&&(U=!1,function(e){for(var t=document.querySelectorAll(M),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(N)&&(F(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return V(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(y({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new W(o):r?new H(o):new $(o),new j(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(V(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(V(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(V(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var s=B(o);if(void 0!==s){var i=e.names.get(s),a=t.getGroup(o);if(i&&a&&i.size){var c=N+".g"+o+'[id="'+s+'"]',u="";void 0!==i&&i.forEach((function(e){e.length>0&&(u+=e+",")})),r+=""+a+c+'{content:"'+u+'"}/*!sc*/\n'}}}return r}(this)},e}(),Z=/(a)(d)/gi,K=function(e){return String.fromCharCode(e+(e>25?39:97))};function Q(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=K(t%52)+n;return(K(t%52)+n).replace(Z,"$1-$2")}var ee=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},te=function(e){return ee(5381,e)};function ne(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(E(n)&&!_(n))return!1}return!0}var re=te("5.3.11"),oe=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic= true&&(void 0===n||n.isStatic)&&ne(e),this.componentId=t,this.baseHash=ee(re,t),this.baseStyle=n,X.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var s=_e(this.rules,e,t,n).join(""),i=Q(ee(this.baseHash,s)>>>0);if(!t.hasNameForId(r,i)){var a=n(s,"."+i,void 0,r);t.insertRules(r,i,a)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,u=ee(this.baseHash,n.hash),l="",d=0;d<c;d++){var h=this.rules[d];if("string"==typeof h)l+=h, false&&(0);else if(h){var p=_e(h,e,t,n),f=Array.isArray(p)?p.join(""):p;u=ee(u,f+d),l+=f}}if(l){var m=Q(u>>>0);if(!t.hasNameForId(r,m)){var y=n(l,"."+m,void 0,r);t.insertRules(r,m,y)}o.push(m)}}return o.join(" ")},e}(),se=/^\s*\/\/.*$/gm,ie=[":","[",".","#"];function ae(e){var t,n,r,o,s=void 0===e?w:e,i=s.options,a=void 0===i?w:i,c=s.plugins,u=void 0===c?S:c,l=new stylis_browser_esm(a),d=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,s,i,a,c,u,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){d.push(e)})),f=function(e,r,s){return 0===r&&-1!==ie.indexOf(s[n.length])||s.match(o)?e:"."+t};function m(e,s,i,a){void 0===a&&(a="&");var c=e.replace(se,""),u=s&&i?i+" "+s+" { "+c+" }":c;return t=a,n=s,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),l(i||!s?"":s,u)}return l.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,f))},p,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||D(15),ee(e,t.name)}),5381).toString():"",m}var ce=react.createContext(),ue=ce.Consumer,le=react.createContext(),de=(le.Consumer,new X),he=ae();function pe(){return (0,react.useContext)(ce)||de}function fe(){return (0,react.useContext)(le)||he}function me(e){var t=(0,react.useState)(e.stylisPlugins),n=t[0],s=t[1],c=pe(),u=(0,react.useMemo)((function(){var t=c;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=(0,react.useMemo)((function(){return ae({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return (0,react.useEffect)((function(){shallowequal_default()(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),react.createElement(ce.Provider,{value:u},react.createElement(le.Provider,{value:l}, false?0:e.children))}var ye=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=he);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return D(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=he),this.name+e.hash},e}(),ve=/([A-Z])/,ge=/([A-Z])/g,Se=/^ms-/,we=function(e){return"-"+e.toLowerCase()};function Ee(e){return ve.test(e)?e.replace(ge,we).replace(Se,"-ms-"):e}var be=function(e){return null==e||!1===e||""===e};function _e(e,n,r,o){if(Array.isArray(e)){for(var s,i=[],a=0,c=e.length;a<c;a+=1)""!==(s=_e(e[a],n,r,o))&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));return i}if(be(e))return"";if(_(e))return"."+e.styledComponentId;if(E(e)){if("function"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!n)return e;var u=e(n);return false&&0,_e(u,n,r,o)}var l;return e instanceof ye?r?(e.inject(r,o),e.getName(o)):e:g(e)?function e(t,n){var r,o,s=[];for(var i in t)t.hasOwnProperty(i)&&!be(t[i])&&(Array.isArray(t[i])&&t[i].isCss||E(t[i])?s.push(Ee(i)+":",t[i],";"):g(t[i])?s.push.apply(s,e(t[i],i)):s.push(Ee(i)+": "+(r=i,null==(o=t[i])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in unitless_browser_esm||r.startsWith("--")?String(o).trim():o+"px")+";"));return n?[n+" {"].concat(s,["}"]):s}(e):e.toString()}var Ne=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Ae(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return E(e)||g(e)?Ne(_e(v(S,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:Ne(_e(v(e,n)))}var Ce=/invalid hook call/i,Ie=new Set,Pe=function(e,t){if(false){ var o, n, r; }},Oe=function(e,t,n){return void 0===n&&(n=w),e.theme!==n.theme&&e.theme||t||n.theme},Re=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,De=/(^-|-$)/g;function je(e){return e.replace(Re,"-").replace(De,"")}var Te=function(e){return Q(te(e)>>>0)};function xe(e){return"string"==typeof e&&( true||0)}var ke=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Ve=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Be(e,t,n){var r=e[n];ke(t)&&ke(r)?ze(r,t):e[n]=t}function ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,s=n;o<s.length;o++){var i=s[o];if(ke(i))for(var a in i)Ve(a)&&Be(e,i[a],a)}return e}var Me=react.createContext(),Ge=Me.Consumer;function Le(e){var t=s(Me),n=i((function(){return function(e,t){if(!e)return D(14);if(E(e)){var n=e(t);return true?n:0}return Array.isArray(e)||"object"!=typeof e?D(8):t?y({},t,{},e):e}(e.theme,t)}),[e.theme,t]);return e.children?r.createElement(Me.Provider,{value:n},e.children):null}var Fe={};function Ye(e,t,n){var o=_(e),i=!xe(e),a=t.attrs,c=void 0===a?S:a,l=t.componentId,d=void 0===l?function(e,t){var n="string"!=typeof e?"sc":je(e);Fe[n]=(Fe[n]||0)+1;var r=n+"-"+Te("5.3.11"+n+Fe[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):l,h=t.displayName,p=void 0===h?function(e){return xe(e)?"styled."+e:"Styled("+b(e)+")"}(e):h,v=t.displayName&&t.componentId?je(t.displayName)+"-"+t.componentId:t.componentId||d,g=o&&e.attrs?Array.prototype.concat(e.attrs,c).filter(Boolean):c,N=t.shouldForwardProp;o&&e.shouldForwardProp&&(N=t.shouldForwardProp?function(n,r,o){return e.shouldForwardProp(n,r,o)&&t.shouldForwardProp(n,r,o)}:e.shouldForwardProp);var A,C=new oe(n,v,o?e.componentStyle:void 0),I=C.isStatic&&0===c.length,P=function(e,t){return function(e,t,n,r){var o=e.attrs,i=e.componentStyle,a=e.defaultProps,c=e.foldedComponentIds,l=e.shouldForwardProp,d=e.styledComponentId,h=e.target,p=function(e,t,n){void 0===e&&(e=w);var r=y({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,s,i=e;for(t in E(i)&&(i=i(r)),i)r[t]=o[t]="className"===t?(n=o[t],s=i[t],n&&s?n+" "+s:n||s):i[t]})),[r,o]}(Oe(t,(0,react.useContext)(Me),a)||w,t,o),m=p[0],v=p[1],g=function(e,t,n,r){var o=pe(),s=fe(),i=t?e.generateAndInjectStyles(w,o,s):e.generateAndInjectStyles(n,o,s);return false&&0,i}(i,r,m, false?0:void 0),S=n,b=v.$as||t.$as||v.as||t.as||h,_=xe(b),N=v!==t?y({},t,{},v):t,A={};for(var C in N)"$"!==C[0]&&"as"!==C&&("forwardedAs"===C?A.as=N[C]:(l?l(C,isPropValid,b):!_||isPropValid(C))&&(A[C]=N[C]));return t.style&&v.style!==t.style&&(A.style=y({},t.style,{},v.style)),A.className=Array.prototype.concat(c,d,g!==d?g:null,t.className,v.className).filter(Boolean).join(" "),A.ref=S,(0,react.createElement)(b,A)}(A,e,t,I)};return P.displayName=p,(A=react.forwardRef(P)).attrs=g,A.componentStyle=C,A.displayName=p,A.shouldForwardProp=N,A.foldedComponentIds=o?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):S,A.styledComponentId=v,A.target=o?e.target:e,A.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return{};var n,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["componentId"]),s=r&&r+"-"+(xe(e)?e:je(b(e)));return Ye(e,y({},o,{attrs:g,componentId:s}),n)},Object.defineProperty(A,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=o?ze({},e.defaultProps,t):t}}), false&&(0),Object.defineProperty(A,"toString",{value:function(){return"."+A.styledComponentId}}),i&&hoist_non_react_statics_cjs_default()(A,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),A}var qe=function(e){return function e(t,r,o){if(void 0===o&&(o=w),!(0,react_is.isValidElementType)(r))return D(1,String(r));var s=function(){return t(r,o,Ae.apply(void 0,arguments))};return s.withConfig=function(n){return e(t,r,y({},o,{},n))},s.attrs=function(n){return e(t,r,y({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},s}(Ye,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","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","noscript","object","ol","optgroup","option","output","p","param","picture","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","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){qe[e]=qe(e)}));var He=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=ne(e),X.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(_e(this.rules,t,n,r).join(""),""),s=this.componentId+e;n.insertRules(s,s,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&X.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function $e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var i=Ae.apply(void 0,[e].concat(n)),a="sc-global-"+Te(JSON.stringify(i)),u=new He(i,a);function d(e){var t=pe(),n=fe(),o=s(Me),d=c(t.allocateGSInstance(a)).current;return false&&0, false&&0,t.server&&h(d,e,t,o,n),l((function(){if(!t.server)return h(d,e,t,o,n),function(){return u.removeStyles(d,t)}}),[d,e,t,o,n]),null}function h(e,t,n,r,o){if(u.isStatic)u.renderStyles(e,P,n,o);else{var s=y({},t,{theme:Oe(t,r,d.defaultProps)});u.renderStyles(e,s,n,o)}}return false&&0,r.memo(d)}function We(e){ false&&0;for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Ae.apply(void 0,[e].concat(n)).join(""),s=Te(o);return new ye(s,o)}var Ue=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=Y();return"<style "+[n&&'nonce="'+n+'"',N+'="true"','data-styled-version="5.3.11"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?D(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return D(2);var n=((t={})[N]="",t["data-styled-version"]="5.3.11",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),o=Y();return o&&(n.nonce=o),[react.createElement("style",y({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new X({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?D(2):react.createElement(me,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return D(3)},e}(),Je=function(e){var t=r.forwardRef((function(t,n){var o=s(Me),i=e.defaultProps,a=Oe(t,o,i);return false&&0,r.createElement(e,y({},t,{theme:a,ref:n}))}));return m(t,e),t.displayName="WithTheme("+b(e)+")",t},Xe=function(){return s(Me)},Ze={StyleSheet:X,masterSheet:de}; false&&0, false&&(0);/* harmony default export */ const styled_components_browser_esm = (qe);-//# sourceMappingURL=styled-components.browser.esm.js.map--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/InfinitySpin.js-var __makeTemplateObject = (undefined && undefined.__makeTemplateObject) || function (cooked, raw) {- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }- return cooked;-};----var len = 242.776657104492;-var time = 1.6;-var anim = We(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n 12.5% {\n stroke-dasharray: ", "px, ", "px;\n stroke-dashoffset: -", "px;\n }\n 43.75% {\n stroke-dasharray: ", "px, ", "px;\n stroke-dashoffset: -", "px;\n }\n 100% {\n stroke-dasharray: ", "px, ", "px;\n stroke-dashoffset: -", "px;\n }\n"], ["\n 12.5% {\n stroke-dasharray: ", "px, ", "px;\n stroke-dashoffset: -", "px;\n }\n 43.75% {\n stroke-dasharray: ", "px, ", "px;\n stroke-dashoffset: -", "px;\n }\n 100% {\n stroke-dasharray: ", "px, ", "px;\n stroke-dashoffset: -", "px;\n }\n"])), len * 0.14, len, len * 0.11, len * 0.35, len, len * 0.35, len * 0.01, len, len * 0.99);-var Path = styled_components_browser_esm.path(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n stroke-dasharray: ", "px, ", ";\n stroke-dashoffset: 0;\n animation: ", " ", "s linear infinite;\n"], ["\n stroke-dasharray: ", "px, ", ";\n stroke-dashoffset: 0;\n animation: ", " ", "s linear infinite;\n"])), len * 0.01, len, anim, time);-var InfinitySpin = function (_a) {- var _b = _a.color, color = _b === void 0 ? DEFAULT_COLOR : _b, _c = _a.width, width = _c === void 0 ? '200' : _c;- return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "".concat(width), height: "".concat(Number(width) * 0.5), viewBox: "0 0 ".concat(width, " ").concat(Number(200 * 0.5)), "data-testid": "infinity-spin" },- React.createElement(Path, { "data-testid": "infinity-spin-path-1", stroke: color, fill: "none", strokeWidth: "4", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10", d: "M93.9,46.4c9.3,9.5,13.8,17.9,23.5,17.9s17.5-7.8,17.5-17.5s-7.8-17.6-17.5-17.5c-9.7,0.1-13.3,7.2-22.1,17.1 c-8.9,8.8-15.7,17.9-25.4,17.9s-17.5-7.8-17.5-17.5s7.8-17.5,17.5-17.5S86.2,38.6,93.9,46.4z" }),- React.createElement("path", { "data-testid": "infinity-spin-path-2", opacity: "0.07", fill: "none", stroke: color, strokeWidth: "4", strokeLinecap: "round", strokeLinejoin: "round", strokeMiterlimit: "10", d: "M93.9,46.4c9.3,9.5,13.8,17.9,23.5,17.9s17.5-7.8,17.5-17.5s-7.8-17.6-17.5-17.5c-9.7,0.1-13.3,7.2-22.1,17.1 c-8.9,8.8-15.7,17.9-25.4,17.9s-17.5-7.8-17.5-17.5s7.8-17.5,17.5-17.5S86.2,38.6,93.9,46.4z" })));-};-/* harmony default export */ const loader_InfinitySpin = ((/* unused pure expression or super */ null && (InfinitySpin)));-var templateObject_1, templateObject_2;--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/LineWave.js-var LineWave_assign = (undefined && undefined.__assign) || function () {- LineWave_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return LineWave_assign.apply(this, arguments);-};----var LineWave = function (_a) {- var _b = _a.wrapperStyle, wrapperStyle = _b === void 0 ? {} : _b, _c = _a.visible, visible = _c === void 0 ? true : _c, _d = _a.wrapperClass, wrapperClass = _d === void 0 ? '' : _d, _e = _a.height, height = _e === void 0 ? 100 : _e, _f = _a.width, width = _f === void 0 ? 100 : _f, _g = _a.color, color = _g === void 0 ? DEFAULT_COLOR : _g, _h = _a.ariaLabel, ariaLabel = _h === void 0 ? 'line-wave-loading' : _h, firstLineColor = _a.firstLineColor, middleLineColor = _a.middleLineColor, lastLineColor = _a.lastLineColor;- return (React.createElement("div", LineWave_assign({ style: LineWave_assign(LineWave_assign({}, getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "data-testid": "line-wave-wrapper", "aria-label": ariaLabel }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("svg", { version: "1.1", height: "".concat(height), width: "".concat(width), xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 100 100", enableBackground: "new 0 0 0 0", xmlSpace: "preserve", "data-testid": "line-wave-svg" },- React.createElement("rect", { x: "20", y: "50", width: "4", height: "10", fill: firstLineColor || color },- React.createElement("animateTransform", { attributeType: "xml", attributeName: "transform", type: "translate", values: "0 0; 0 20; 0 0", begin: "0", dur: "0.6s", repeatCount: "indefinite" })),- React.createElement("rect", { x: "30", y: "50", width: "4", height: "10", fill: middleLineColor || color },- React.createElement("animateTransform", { attributeType: "xml", attributeName: "transform", type: "translate", values: "0 0; 0 20; 0 0", begin: "0.2s", dur: "0.6s", repeatCount: "indefinite" })),- React.createElement("rect", { x: "40", y: "50", width: "4", height: "10", fill: lastLineColor || color },- React.createElement("animateTransform", { attributeType: "xml", attributeName: "transform", type: "translate", values: "0 0; 0 20; 0 0", begin: "0.4s", dur: "0.6s", repeatCount: "indefinite" })))));-};-/* harmony default export */ const loader_LineWave = ((/* unused pure expression or super */ null && (LineWave)));--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/MutatingDots.js-var MutatingDots_assign = (undefined && undefined.__assign) || function () {- MutatingDots_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return MutatingDots_assign.apply(this, arguments);-};----var MutatingDots = function (_a) {- var _b = _a.height, height = _b === void 0 ? 90 : _b, _c = _a.width, width = _c === void 0 ? 80 : _c, _d = _a.radius, radius = _d === void 0 ? 12.5 : _d, _e = _a.color, color = _e === void 0 ? DEFAULT_COLOR : _e, _f = _a.secondaryColor, secondaryColor = _f === void 0 ? DEFAULT_COLOR : _f, _g = _a.ariaLabel, ariaLabel = _g === void 0 ? 'mutating-dots-loading' : _g, wrapperStyle = _a.wrapperStyle, wrapperClass = _a.wrapperClass, _h = _a.visible, visible = _h === void 0 ? true : _h;- return (React.createElement("div", MutatingDots_assign({ style: MutatingDots_assign(MutatingDots_assign({}, getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "data-testid": "mutating-dots-loading", "aria-label": ariaLabel }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("svg", { id: "goo-loader", width: width, height: height, "data-testid": "mutating-dots-svg" },- React.createElement("filter", { id: "fancy-goo" },- React.createElement("feGaussianBlur", { in: "SourceGraphic", stdDeviation: "6", result: "blur" }),- React.createElement("feColorMatrix", { in: "blur", mode: "matrix", values: "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9", result: "goo" }),- React.createElement("feComposite", { in: "SourceGraphic", in2: "goo", operator: "atop" })),- React.createElement("g", { filter: "url(#fancy-goo)" },- React.createElement("animateTransform", { id: "mainAnim", attributeName: "transform", attributeType: "XML", type: "rotate", from: "0 50 50", to: "359 50 50", dur: "1.2s", repeatCount: "indefinite" }),- React.createElement("circle", { cx: "50%", cy: "40", r: radius, fill: color },- React.createElement("animate", { id: "cAnim1", attributeType: "XML", attributeName: "cy", dur: "0.6s", begin: "0;cAnim1.end+0.2s", calcMode: "spline", values: "40;20;40", keyTimes: "0;0.3;1", keySplines: "0.09, 0.45, 0.16, 1;0.09, 0.45, 0.16, 1" })),- React.createElement("circle", { cx: "50%", cy: "60", r: radius, fill: secondaryColor },- React.createElement("animate", { id: "cAnim2", attributeType: "XML", attributeName: "cy", dur: "0.6s", begin: "0.4s;cAnim2.end+0.2s", calcMode: "spline", values: "60;80;60", keyTimes: "0;0.3;1", keySplines: "0.09, 0.45, 0.16, 1;0.09, 0.45, 0.16, 1" }))))));-};-/* harmony default export */ const loader_MutatingDots = ((/* unused pure expression or super */ null && (MutatingDots)));--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/helpers.js-var helpers_getDefaultStyle = function (visible) { return ({- display: visible ? 'flex' : 'none',-}); };--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Oval.js-var Oval_assign = (undefined && undefined.__assign) || function () {- Oval_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return Oval_assign.apply(this, arguments);-};----var RADIUS = 20;-var getPath = function (radius) {- return ['M' + radius + ' 0c0-9.94-8.06', radius, radius, radius].join('-');-};-var getViewBoxSize = function (strokeWidth, secondaryStrokeWidth, radius) {- var maxStrokeWidth = Math.max(strokeWidth, secondaryStrokeWidth);- var startingPoint = -radius - maxStrokeWidth / 2 + 1;- var endpoint = radius * 2 + maxStrokeWidth;- return [startingPoint, startingPoint, endpoint, endpoint].join(' ');-};-var Oval = function (_a) {- var _b = _a.height, height = _b === void 0 ? 80 : _b, _c = _a.width, width = _c === void 0 ? 80 : _c, _d = _a.color, color = _d === void 0 ? type_DEFAULT_COLOR : _d, _e = _a.secondaryColor, secondaryColor = _e === void 0 ? type_DEFAULT_COLOR : _e, _f = _a.ariaLabel, ariaLabel = _f === void 0 ? 'oval-loading' : _f, wrapperStyle = _a.wrapperStyle, wrapperClass = _a.wrapperClass, _g = _a.visible, visible = _g === void 0 ? true : _g, _h = _a.strokeWidth, strokeWidth = _h === void 0 ? 2 : _h, strokeWidthSecondary = _a.strokeWidthSecondary;- return (react.createElement("div", Oval_assign({ style: Oval_assign(Oval_assign({}, helpers_getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "data-testid": "oval-loading", "aria-label": ariaLabel }, type_DEFAULT_WAI_ARIA_ATTRIBUTE),- react.createElement("svg", { width: width, height: height, viewBox: getViewBoxSize(Number(strokeWidth), Number(strokeWidthSecondary || strokeWidth), RADIUS), xmlns: "http://www.w3.org/2000/svg", stroke: color, "data-testid": "oval-svg" },- react.createElement("g", { fill: "none", fillRule: "evenodd" },- react.createElement("g", { transform: "translate(1 1)", strokeWidth: Number(strokeWidthSecondary || strokeWidth), "data-testid": "oval-secondary-group" },- react.createElement("circle", { strokeOpacity: ".5", cx: "0", cy: "0", r: RADIUS, stroke: secondaryColor, strokeWidth: strokeWidth }),- react.createElement("path", { d: getPath(RADIUS) },- react.createElement("animateTransform", { attributeName: "transform", type: "rotate", from: "0 0 0", to: "360 0 0", dur: "1s", repeatCount: "indefinite" })))))));-};-/* harmony default export */ const loader_Oval = (Oval);--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Puff.js-var Puff_assign = (undefined && undefined.__assign) || function () {- Puff_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return Puff_assign.apply(this, arguments);-};----var Puff = function (_a) {- var _b = _a.height, height = _b === void 0 ? 80 : _b, _c = _a.width, width = _c === void 0 ? 80 : _c, _d = _a.radius, radius = _d === void 0 ? 1 : _d, _e = _a.color, color = _e === void 0 ? DEFAULT_COLOR : _e, _f = _a.ariaLabel, ariaLabel = _f === void 0 ? 'puff-loading' : _f, wrapperStyle = _a.wrapperStyle, wrapperClass = _a.wrapperClass, _g = _a.visible, visible = _g === void 0 ? true : _g;- return (React.createElement("div", Puff_assign({ style: Puff_assign(Puff_assign({}, getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "data-testid": "puff-loading", "aria-label": ariaLabel }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("svg", { width: width, height: height, viewBox: "0 0 44 44", xmlns: "http://www.w3.org/2000/svg", stroke: color, "data-testid": "puff-svg" },- React.createElement("g", { fill: "none", fillRule: "evenodd", strokeWidth: "2" },- React.createElement("circle", { cx: "22", cy: "22", r: radius },- React.createElement("animate", { attributeName: "r", begin: "0s", dur: "1.8s", values: "1; 20", calcMode: "spline", keyTimes: "0; 1", keySplines: "0.165, 0.84, 0.44, 1", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "strokeOpacity", begin: "0s", dur: "1.8s", values: "1; 0", calcMode: "spline", keyTimes: "0; 1", keySplines: "0.3, 0.61, 0.355, 1", repeatCount: "indefinite" })),- React.createElement("circle", { cx: "22", cy: "22", r: radius },- React.createElement("animate", { attributeName: "r", begin: "-0.9s", dur: "1.8s", values: "1; 20", calcMode: "spline", keyTimes: "0; 1", keySplines: "0.165, 0.84, 0.44, 1", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "strokeOpacity", begin: "-0.9s", dur: "1.8s", values: "1; 0", calcMode: "spline", keyTimes: "0; 1", keySplines: "0.3, 0.61, 0.355, 1", repeatCount: "indefinite" }))))));-};-/* harmony default export */ const loader_Puff = ((/* unused pure expression or super */ null && (Puff)));--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/RevolvingDot.js-var RevolvingDot_assign = (undefined && undefined.__assign) || function () {- RevolvingDot_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return RevolvingDot_assign.apply(this, arguments);-};----var RevolvingDot = function (_a) {- var _b = _a.radius, radius = _b === void 0 ? 45 : _b, _c = _a.strokeWidth, strokeWidth = _c === void 0 ? 5 : _c, _d = _a.color, color = _d === void 0 ? DEFAULT_COLOR : _d, secondaryColor = _a.secondaryColor, _e = _a.ariaLabel, ariaLabel = _e === void 0 ? 'revolving-dot-loading' : _e, wrapperStyle = _a.wrapperStyle, wrapperClass = _a.wrapperClass, _f = _a.visible, visible = _f === void 0 ? true : _f;- return (React.createElement("div", RevolvingDot_assign({ style: RevolvingDot_assign(RevolvingDot_assign({}, getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "aria-label": ariaLabel, "data-testid": "revolving-dot-loading" }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("svg", { version: "1.1", width: "calc(".concat(radius, " * 2.5)"), height: "calc(".concat(radius, " * 2.5)"), xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", "data-testid": "revolving-dot-svg" },- React.createElement("circle", { fill: "none", stroke: secondaryColor || color, strokeWidth: strokeWidth, cx: "calc(".concat(radius, " * 1.28)"), cy: "calc(".concat(radius, " * 1.28)"), r: radius, style: { opacity: 0.5 } }),- React.createElement("circle", { fill: color, stroke: color, strokeWidth: "3", cx: "calc(".concat(radius, " * 1.28)"), cy: "calc(".concat(radius, " / 3.5)"), r: "calc(".concat(radius, " / 5)"), style: { transformOrigin: '50% 50%' } },- React.createElement("animateTransform", { attributeName: "transform", dur: "2s", type: "rotate", from: "0", to: "360", repeatCount: "indefinite" })))));-};-/* harmony default export */ const loader_RevolvingDot = ((/* unused pure expression or super */ null && (RevolvingDot)));--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Rings.js-var Rings_assign = (undefined && undefined.__assign) || function () {- Rings_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return Rings_assign.apply(this, arguments);-};----var Rings = function (_a) {- var _b = _a.height, height = _b === void 0 ? 80 : _b, _c = _a.width, width = _c === void 0 ? 80 : _c, _d = _a.radius, radius = _d === void 0 ? 6 : _d, _e = _a.color, color = _e === void 0 ? DEFAULT_COLOR : _e, _f = _a.ariaLabel, ariaLabel = _f === void 0 ? 'rings-loading' : _f, wrapperStyle = _a.wrapperStyle, wrapperClass = _a.wrapperClass, _g = _a.visible, visible = _g === void 0 ? true : _g;- return (React.createElement("div", Rings_assign({ style: Rings_assign(Rings_assign({}, getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "data-testid": "rings-loading", "aria-label": ariaLabel }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("svg", { width: width, height: height, viewBox: "0 0 45 45", xmlns: "http://www.w3.org/2000/svg", stroke: color, "data-testid": "rings-svg" },- React.createElement("g", { fill: "none", fillRule: "evenodd", transform: "translate(1 1)", strokeWidth: "2" },- React.createElement("circle", { cx: "22", cy: "22", r: radius, strokeOpacity: "0" },- React.createElement("animate", { attributeName: "r", begin: "1.5s", dur: "3s", values: "6;22", calcMode: "linear", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "stroke-opacity", begin: "1.5s", dur: "3s", values: "1;0", calcMode: "linear", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "stroke-width", begin: "1.5s", dur: "3s", values: "2;0", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("circle", { cx: "22", cy: "22", r: radius, strokeOpacity: "0" },- React.createElement("animate", { attributeName: "r", begin: "3s", dur: "3s", values: "6;22", calcMode: "linear", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "strokeOpacity", begin: "3s", dur: "3s", values: "1;0", calcMode: "linear", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "strokeWidth", begin: "3s", dur: "3s", values: "2;0", calcMode: "linear", repeatCount: "indefinite" })),- React.createElement("circle", { cx: "22", cy: "22", r: Number(radius) + 2 },- React.createElement("animate", { attributeName: "r", begin: "0s", dur: "1.5s", values: "6;1;2;3;4;5;6", calcMode: "linear", repeatCount: "indefinite" }))))));-};-/* harmony default export */ const loader_Rings = ((/* unused pure expression or super */ null && (Rings)));--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/RotatingSquare.js-var RotatingSquare_assign = (undefined && undefined.__assign) || function () {- RotatingSquare_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return RotatingSquare_assign.apply(this, arguments);-};----var RotatingSquare = function (_a) {- var _b = _a.wrapperClass, wrapperClass = _b === void 0 ? '' : _b, _c = _a.color, color = _c === void 0 ? DEFAULT_COLOR : _c, _d = _a.height, height = _d === void 0 ? 100 : _d, _e = _a.width, width = _e === void 0 ? 100 : _e, _f = _a.strokeWidth, strokeWidth = _f === void 0 ? 4 : _f, _g = _a.ariaLabel, ariaLabel = _g === void 0 ? 'rotating-square-loading' : _g, _h = _a.wrapperStyle, wrapperStyle = _h === void 0 ? {} : _h, _j = _a.visible, visible = _j === void 0 ? true : _j;- return (React.createElement("div", RotatingSquare_assign({ style: RotatingSquare_assign(RotatingSquare_assign({}, getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "data-testid": "rotating-square-wrapper", "aria-label": ariaLabel }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 100 100", enableBackground: "new 0 0 100 100", height: "".concat(height), width: "".concat(width), "data-testid": "rotating-square-svg", xmlSpace: "preserve" },- React.createElement("rect", { fill: "none", stroke: color, strokeWidth: strokeWidth, x: "25", y: "25", width: "50", height: "50" },- React.createElement("animateTransform", { attributeName: "transform", dur: "0.5s", from: "0 50 50", to: "180 50 50", type: "rotate", id: "strokeBox", attributeType: "XML", begin: "rectBox.end" })),- React.createElement("rect", { x: "27", y: "27", fill: color, width: "46", height: "50" },- React.createElement("animate", { attributeName: "height", dur: "1.3s", attributeType: "XML", from: "50", to: "0", id: "rectBox", fill: "freeze", begin: "0s;strokeBox.end" })))));-};-/* harmony default export */ const loader_RotatingSquare = ((/* unused pure expression or super */ null && (RotatingSquare)));--;// CONCATENATED MODULE: ./node_modules/styled-tools/dist/es/prop.js-/**- * Returns the value of `props[path]` or `defaultValue`- * @example- * import styled from "styled-components";- * import { prop } from "styled-tools";- *- * const Button = styled.button`- * color: ${prop("color", "red")};- * `;- */-var prop = function prop(path, defaultValue) {- return function () {- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};-- if (typeof props[path] !== "undefined") {- return props[path];- }-- if (path && path.indexOf(".") > 0) {- var paths = path.split(".");- var length = paths.length;- var object = props[paths[0]];- var index = 1;-- while (object != null && index < length) {- object = object[paths[index]];- index += 1;- }-- if (typeof object !== "undefined") {- return object;- }- }-- return defaultValue;- };-};--/* harmony default export */ const es_prop = (prop);-;// CONCATENATED MODULE: ./node_modules/styled-tools/dist/es/ifProp.js-function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }--/* eslint-disable no-use-before-define */---var parseFunction = function parseFunction(props, test) {- return Boolean(test(props));-};--var parseObject = function parseObject(props, test) {- var keys = Object.keys(test);- var length = keys.length;-- for (var index = 0; index < length; index += 1) {- var key = keys[index];- var expected = test[key];- var value = es_prop(key)(props);-- if (expected !== value) {- return false;- }- }-- return true;-};--var parseString = function parseString(props, test) {- return Boolean(es_prop(test)(props));-};--var parseMap = {- function: parseFunction,- object: parseObject,- string: parseString-};-/**- * Returns `pass` if prop is truthy. Otherwise returns `fail`- * @example- * import styled from "styled-components";- * import { ifProp, palette } from "styled-tools";- *- * const Button = styled.button`- * background-color: ${ifProp("transparent", "transparent", palette(0))};- * color: ${ifProp(["transparent", "accent"], palette("secondary"))};- * font-size: ${ifProp({ size: "large" }, "20px", ifProp({ size: "medium" }, "16px", "12px"))};- * `;- */--var ifProp_ifProp = function ifProp(test) {- var pass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";- var fail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";- return function () {- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};- var result = true;-- if (Array.isArray(test)) {- var length = test.length;- var index = 0;-- while (result && index < length) {- result = parseMap[_typeof(test[index])](props, test[index]);- index += 1;- }- } else {- result = parseMap[_typeof(test)](props, test);- }-- var value = result ? pass : fail;- return typeof value === "function" ? value(props) : value;- };-};--/* harmony default export */ const es_ifProp = ((/* unused pure expression or super */ null && (ifProp_ifProp)));-;// CONCATENATED MODULE: ./node_modules/styled-tools/dist/es/ifNotProp.js---/**- * Returns `pass` if prop is falsy. Otherwise returns `fail`- * @example- * import styled from "styled-components";- * import { ifNotProp } from "styled-tools";- *- * const Button = styled.button`- * font-size: ${ifNotProp("large", "20px", "30px")};- * `;- */-var ifNotProp = function ifNotProp(test, pass, fail) {- return ifProp(test, fail, pass);-};--/* harmony default export */ const es_ifNotProp = ((/* unused pure expression or super */ null && (ifNotProp)));-;// CONCATENATED MODULE: ./node_modules/styled-tools/dist/es/index.js---------------;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/RotatingLines.js-var RotatingLines_makeTemplateObject = (undefined && undefined.__makeTemplateObject) || function (cooked, raw) {- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }- return cooked;-};-var RotatingLines_assign = (undefined && undefined.__assign) || function () {- RotatingLines_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return RotatingLines_assign.apply(this, arguments);-};-----var spin = We(RotatingLines_templateObject_1 || (RotatingLines_templateObject_1 = RotatingLines_makeTemplateObject(["\n to {\n transform: rotate(360deg);\n }\n"], ["\n to {\n transform: rotate(360deg);\n }\n"])));-var POINTS = [0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330];-var Svg = styled_components_browser_esm.svg(RotatingLines_templateObject_2 || (RotatingLines_templateObject_2 = RotatingLines_makeTemplateObject(["\n animation: ", " 0.75s steps(12, end) infinite;\n animation-duration: ", "s;\n"], ["\n animation: ", " 0.75s steps(12, end) infinite;\n animation-duration: ", "s;\n"])), spin, es_prop('speed', '0.75'));-var Polyline = styled_components_browser_esm.polyline(templateObject_3 || (templateObject_3 = RotatingLines_makeTemplateObject(["\n stroke-width: ", "px;\n stroke-linecap: round;\n\n &:nth-child(12n + 0) {\n stroke-opacity: 0.08;\n }\n\n &:nth-child(12n + 1) {\n stroke-opacity: 0.17;\n }\n\n &:nth-child(12n + 2) {\n stroke-opacity: 0.25;\n }\n\n &:nth-child(12n + 3) {\n stroke-opacity: 0.33;\n }\n\n &:nth-child(12n + 4) {\n stroke-opacity: 0.42;\n }\n\n &:nth-child(12n + 5) {\n stroke-opacity: 0.5;\n }\n\n &:nth-child(12n + 6) {\n stroke-opacity: 0.58;\n }\n\n &:nth-child(12n + 7) {\n stroke-opacity: 0.66;\n }\n\n &:nth-child(12n + 8) {\n stroke-opacity: 0.75;\n }\n\n &:nth-child(12n + 9) {\n stroke-opacity: 0.83;\n }\n\n &:nth-child(12n + 11) {\n stroke-opacity: 0.92;\n }\n"], ["\n stroke-width: ", "px;\n stroke-linecap: round;\n\n &:nth-child(12n + 0) {\n stroke-opacity: 0.08;\n }\n\n &:nth-child(12n + 1) {\n stroke-opacity: 0.17;\n }\n\n &:nth-child(12n + 2) {\n stroke-opacity: 0.25;\n }\n\n &:nth-child(12n + 3) {\n stroke-opacity: 0.33;\n }\n\n &:nth-child(12n + 4) {\n stroke-opacity: 0.42;\n }\n\n &:nth-child(12n + 5) {\n stroke-opacity: 0.5;\n }\n\n &:nth-child(12n + 6) {\n stroke-opacity: 0.58;\n }\n\n &:nth-child(12n + 7) {\n stroke-opacity: 0.66;\n }\n\n &:nth-child(12n + 8) {\n stroke-opacity: 0.75;\n }\n\n &:nth-child(12n + 9) {\n stroke-opacity: 0.83;\n }\n\n &:nth-child(12n + 11) {\n stroke-opacity: 0.92;\n }\n"])), function (props) { return props.width; });-function RotatingLines(_a) {- var _b = _a.strokeColor, strokeColor = _b === void 0 ? type_DEFAULT_COLOR : _b, _c = _a.strokeWidth, strokeWidth = _c === void 0 ? '5' : _c, _d = _a.animationDuration, animationDuration = _d === void 0 ? '0.75' : _d, _e = _a.width, width = _e === void 0 ? '96' : _e, _f = _a.visible, visible = _f === void 0 ? true : _f, _g = _a.ariaLabel, ariaLabel = _g === void 0 ? 'rotating-lines-loading' : _g;- var lines = (0,react.useCallback)(function () {- return POINTS.map(function (point) { return (react.createElement(Polyline, { key: point, points: "24,12 24,4", width: strokeWidth, transform: "rotate(".concat(point, ", 24, 24)") })); });- }, [strokeWidth]);- return !visible ? null : (react.createElement(Svg, RotatingLines_assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", width: width, stroke: strokeColor, speed: animationDuration, "data-testid": "rotating-lines-svg", "aria-label": ariaLabel }, type_DEFAULT_WAI_ARIA_ATTRIBUTE), lines()));-}-var RotatingLines_templateObject_1, RotatingLines_templateObject_2, templateObject_3;--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/TailSpin.js-var TailSpin_assign = (undefined && undefined.__assign) || function () {- TailSpin_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return TailSpin_assign.apply(this, arguments);-};----var TailSpin = function (_a) {- var _b = _a.height, height = _b === void 0 ? 80 : _b, _c = _a.width, width = _c === void 0 ? 80 : _c, _d = _a.strokeWidth, strokeWidth = _d === void 0 ? 2 : _d, _e = _a.radius, radius = _e === void 0 ? 1 : _e, _f = _a.color, color = _f === void 0 ? DEFAULT_COLOR : _f, _g = _a.ariaLabel, ariaLabel = _g === void 0 ? 'tail-spin-loading' : _g, wrapperStyle = _a.wrapperStyle, wrapperClass = _a.wrapperClass, _h = _a.visible, visible = _h === void 0 ? true : _h;- var strokeWidthNum = parseInt(String(strokeWidth));- var viewBoxValue = strokeWidthNum + 36;- var halfStrokeWidth = strokeWidthNum / 2;- var processedRadius = halfStrokeWidth + parseInt(String(radius)) - 1;- return (React.createElement("div", TailSpin_assign({ style: TailSpin_assign(TailSpin_assign({}, getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "data-testid": "tail-spin-loading", "aria-label": ariaLabel }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("svg", { width: width, height: height, viewBox: "0 0 ".concat(viewBoxValue, " ").concat(viewBoxValue), xmlns: "http://www.w3.org/2000/svg", "data-testid": "tail-spin-svg" },- React.createElement("defs", null,- React.createElement("linearGradient", { x1: "8.042%", y1: "0%", x2: "65.682%", y2: "23.865%", id: "a" },- React.createElement("stop", { stopColor: color, stopOpacity: "0", offset: "0%" }),- React.createElement("stop", { stopColor: color, stopOpacity: ".631", offset: "63.146%" }),- React.createElement("stop", { stopColor: color, offset: "100%" }))),- React.createElement("g", { fill: "none", fillRule: "evenodd" },- React.createElement("g", { transform: "translate(".concat(halfStrokeWidth, " ").concat(halfStrokeWidth, ")") },- React.createElement("path", { d: "M36 18c0-9.94-8.06-18-18-18", id: "Oval-2", stroke: color, strokeWidth: strokeWidth },- React.createElement("animateTransform", { attributeName: "transform", type: "rotate", from: "0 18 18", to: "360 18 18", dur: "0.9s", repeatCount: "indefinite" })),- React.createElement("circle", { fill: "#fff", cx: "36", cy: "18", r: processedRadius },- React.createElement("animateTransform", { attributeName: "transform", type: "rotate", from: "0 18 18", to: "360 18 18", dur: "0.9s", repeatCount: "indefinite" })))))));-};-/* harmony default export */ const loader_TailSpin = ((/* unused pure expression or super */ null && (TailSpin)));--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/ThreeCircles.js-var ThreeCircles_assign = (undefined && undefined.__assign) || function () {- ThreeCircles_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return ThreeCircles_assign.apply(this, arguments);-};----var ThreeCircles = function (_a) {- var _b = _a.wrapperStyle, wrapperStyle = _b === void 0 ? {} : _b, _c = _a.visible, visible = _c === void 0 ? true : _c, _d = _a.wrapperClass, wrapperClass = _d === void 0 ? '' : _d, _e = _a.height, height = _e === void 0 ? 100 : _e, _f = _a.width, width = _f === void 0 ? 100 : _f, _g = _a.color, color = _g === void 0 ? DEFAULT_COLOR : _g, _h = _a.ariaLabel, ariaLabel = _h === void 0 ? 'three-circles-loading' : _h, outerCircleColor = _a.outerCircleColor, innerCircleColor = _a.innerCircleColor, middleCircleColor = _a.middleCircleColor;- return (React.createElement("div", ThreeCircles_assign({ style: ThreeCircles_assign(ThreeCircles_assign({}, getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "data-testid": "three-circles-wrapper", "aria-label": ariaLabel }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("svg", { version: "1.1", height: "".concat(height), width: "".concat(width), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 100", enableBackground: "new 0 0 100 100", xmlSpace: "preserve", "data-testid": "three-circles-svg" },- React.createElement("path", { fill: outerCircleColor || color, d: "M31.6,3.5C5.9,13.6-6.6,42.7,3.5,68.4c10.1,25.7,39.2,38.3,64.9,28.1l-3.1-7.9c-21.3,8.4-45.4-2-53.8-23.3\n c-8.4-21.3,2-45.4,23.3-53.8L31.6,3.5z" },- React.createElement("animateTransform", { attributeName: "transform", attributeType: "XML", type: "rotate", dur: "2s", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" })),- React.createElement("path", { fill: middleCircleColor || color, d: "M42.3,39.6c5.7-4.3,13.9-3.1,18.1,2.7c4.3,5.7,3.1,13.9-2.7,18.1l4.1,5.5c8.8-6.5,10.6-19,4.1-27.7\n c-6.5-8.8-19-10.6-27.7-4.1L42.3,39.6z" },- React.createElement("animateTransform", { attributeName: "transform", attributeType: "XML", type: "rotate", dur: "1s", from: "0 50 50", to: "-360 50 50", repeatCount: "indefinite" })),- React.createElement("path", { fill: innerCircleColor || color, d: "M82,35.7C74.1,18,53.4,10.1,35.7,18S10.1,46.6,18,64.3l7.6-3.4c-6-13.5,0-29.3,13.5-35.3s29.3,0,35.3,13.5\n L82,35.7z" },- React.createElement("animateTransform", { attributeName: "transform", attributeType: "XML", type: "rotate", dur: "2s", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" })))));-};-/* harmony default export */ const loader_ThreeCircles = ((/* unused pure expression or super */ null && (ThreeCircles)));--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/ThreeDots.js-var ThreeDots_assign = (undefined && undefined.__assign) || function () {- ThreeDots_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return ThreeDots_assign.apply(this, arguments);-};----var ThreeDots = function (_a) {- var _b = _a.height, height = _b === void 0 ? 80 : _b, _c = _a.width, width = _c === void 0 ? 80 : _c, _d = _a.radius, radius = _d === void 0 ? 9 : _d, _e = _a.color, color = _e === void 0 ? type_DEFAULT_COLOR : _e, _f = _a.ariaLabel, ariaLabel = _f === void 0 ? 'three-dots-loading' : _f, wrapperStyle = _a.wrapperStyle, wrapperClass = _a.wrapperClass, _g = _a.visible, visible = _g === void 0 ? true : _g;- return (react.createElement("div", ThreeDots_assign({ style: ThreeDots_assign(ThreeDots_assign({}, helpers_getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "data-testid": "three-dots-loading", "aria-label": ariaLabel }, type_DEFAULT_WAI_ARIA_ATTRIBUTE),- react.createElement("svg", { width: width, height: height, viewBox: "0 0 120 30", xmlns: "http://www.w3.org/2000/svg", fill: color, "data-testid": "three-dots-svg" },- react.createElement("circle", { cx: "15", cy: "15", r: Number(radius) + 6 },- react.createElement("animate", { attributeName: "r", from: "15", to: "15", begin: "0s", dur: "0.8s", values: "15;9;15", calcMode: "linear", repeatCount: "indefinite" }),- react.createElement("animate", { attributeName: "fill-opacity", from: "1", to: "1", begin: "0s", dur: "0.8s", values: "1;.5;1", calcMode: "linear", repeatCount: "indefinite" })),- react.createElement("circle", { cx: "60", cy: "15", r: radius, attributeName: "fill-opacity", from: "1", to: "0.3" },- react.createElement("animate", { attributeName: "r", from: "9", to: "9", begin: "0s", dur: "0.8s", values: "9;15;9", calcMode: "linear", repeatCount: "indefinite" }),- react.createElement("animate", { attributeName: "fill-opacity", from: "0.5", to: "0.5", begin: "0s", dur: "0.8s", values: ".5;1;.5", calcMode: "linear", repeatCount: "indefinite" })),- react.createElement("circle", { cx: "105", cy: "15", r: Number(radius) + 6 },- react.createElement("animate", { attributeName: "r", from: "15", to: "15", begin: "0s", dur: "0.8s", values: "15;9;15", calcMode: "linear", repeatCount: "indefinite" }),- react.createElement("animate", { attributeName: "fill-opacity", from: "1", to: "1", begin: "0s", dur: "0.8s", values: "1;.5;1", calcMode: "linear", repeatCount: "indefinite" })))));-};-/* harmony default export */ const loader_ThreeDots = (ThreeDots);--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Triangle.js-var Triangle_makeTemplateObject = (undefined && undefined.__makeTemplateObject) || function (cooked, raw) {- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }- return cooked;-};-var Triangle_assign = (undefined && undefined.__assign) || function () {- Triangle_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return Triangle_assign.apply(this, arguments);-};-----var dash = We(Triangle_templateObject_1 || (Triangle_templateObject_1 = Triangle_makeTemplateObject(["\n to {\n stroke-dashoffset: 136;\n }\n"], ["\n to {\n stroke-dashoffset: 136;\n }\n"])));-var Polygon = styled_components_browser_esm.polygon(Triangle_templateObject_2 || (Triangle_templateObject_2 = Triangle_makeTemplateObject(["\n stroke-dasharray: 17;\n animation: ", " 2.5s cubic-bezier(0.35, 0.04, 0.63, 0.95) infinite;\n"], ["\n stroke-dasharray: 17;\n animation: ", " 2.5s cubic-bezier(0.35, 0.04, 0.63, 0.95) infinite;\n"])), dash);-var SVG = styled_components_browser_esm.svg(Triangle_templateObject_3 || (Triangle_templateObject_3 = Triangle_makeTemplateObject(["\n transform-origin: 50% 65%;\n"], ["\n transform-origin: 50% 65%;\n"])));-var Triangle = function (_a) {- var _b = _a.height, height = _b === void 0 ? 80 : _b, _c = _a.width, width = _c === void 0 ? 80 : _c, _d = _a.color, color = _d === void 0 ? DEFAULT_COLOR : _d, _e = _a.ariaLabel, ariaLabel = _e === void 0 ? 'triangle-loading' : _e, wrapperStyle = _a.wrapperStyle, wrapperClass = _a.wrapperClass, _f = _a.visible, visible = _f === void 0 ? true : _f;- return (React.createElement("div", Triangle_assign({ style: Triangle_assign(Triangle_assign({}, getDefaultStyle(visible)), wrapperStyle), className: "".concat(wrapperClass), "data-testid": "triangle-loading", "aria-label": ariaLabel }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement(SVG, { id: "triangle", width: width, height: height, viewBox: "-3 -4 39 39", "data-testid": "triangle-svg" },- React.createElement(Polygon, { fill: "transparent", stroke: color, strokeWidth: "1", points: "16,0 32,32 0,32" }))));-};-/* harmony default export */ const loader_Triangle = ((/* unused pure expression or super */ null && (Triangle)));-var Triangle_templateObject_1, Triangle_templateObject_2, Triangle_templateObject_3;--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Watch.js-var Watch_assign = (undefined && undefined.__assign) || function () {- Watch_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return Watch_assign.apply(this, arguments);-};----var Watch = function (_a) {- var _b = _a.height, height = _b === void 0 ? 80 : _b, _c = _a.width, width = _c === void 0 ? 80 : _c, _d = _a.radius, radius = _d === void 0 ? 48 : _d, _e = _a.color, color = _e === void 0 ? DEFAULT_COLOR : _e, _f = _a.ariaLabel, ariaLabel = _f === void 0 ? 'watch-loading' : _f, wrapperStyle = _a.wrapperStyle, wrapperClass = _a.wrapperClass, _g = _a.visible, visible = _g === void 0 ? true : _g;- return (React.createElement("div", Watch_assign({ style: Watch_assign(Watch_assign({}, getDefaultStyle(visible)), wrapperStyle), className: wrapperClass, "data-testid": "watch-loading", "aria-label": ariaLabel }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("svg", { width: width, height: height, version: "1.1", id: "L2", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 100 100", enableBackground: "new 0 0 100 100", xmlSpace: "preserve", "data-testid": "watch-svg" },- React.createElement("circle", { fill: "none", stroke: color, strokeWidth: "4", strokeMiterlimit: "10", cx: "50", cy: "50", r: radius }),- React.createElement("line", { fill: "none", strokeLinecap: "round", stroke: color, strokeWidth: "4", strokeMiterlimit: "10", x1: "50", y1: "50", x2: "85", y2: "50.5" },- React.createElement("animateTransform", { attributeName: "transform", dur: "2s", type: "rotate", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" })),- React.createElement("line", { fill: "none", strokeLinecap: "round", stroke: color, strokeWidth: "4", strokeMiterlimit: "10", x1: "50", y1: "50", x2: "49.5", y2: "74" },- React.createElement("animateTransform", { attributeName: "transform", dur: "15s", type: "rotate", from: "0 50 50", to: "360 50 50", repeatCount: "indefinite" })))));-};-/* harmony default export */ const loader_Watch = ((/* unused pure expression or super */ null && (Watch)));--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/FallingLines.js-var FallingLines_assign = (undefined && undefined.__assign) || function () {- FallingLines_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return FallingLines_assign.apply(this, arguments);-};---var FallingLines = function (_a) {- var _b = _a.color, color = _b === void 0 ? DEFAULT_COLOR : _b, _c = _a.width, width = _c === void 0 ? '100' : _c, _d = _a.visible, visible = _d === void 0 ? true : _d;- return visible ? (React.createElement("svg", FallingLines_assign({ xmlns: "http://www.w3.org/2000/svg", width: width, height: width, viewBox: "0 0 100 100", "data-testid": "falling-lines" }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("rect", { y: "25", width: "10", height: "50", rx: "4", ry: "4", fill: color, "data-testid": "falling-lines-rect-1" },- React.createElement("animate", { attributeName: "x", values: "10;100", dur: "1.2s", repeatCount: "indefinite" }),- React.createElement("animateTransform", { attributeName: "transform", type: "rotate", from: "0 10 70", to: "-60 100 70", dur: "1.2s", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "opacity", values: "0;1;0", dur: "1.2s", repeatCount: "indefinite" })),- React.createElement("rect", { y: "25", width: "10", height: "50", rx: "4", ry: "4", fill: color },- React.createElement("animate", { attributeName: "x", values: "10;100", dur: "1.2s", begin: "0.4s", repeatCount: "indefinite" }),- React.createElement("animateTransform", { attributeName: "transform", type: "rotate", from: "0 10 70", to: "-60 100 70", dur: "1.2s", begin: "0.4s", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "opacity", values: "0;1;0", dur: "1.2s", begin: "0.4s", repeatCount: "indefinite" })),- React.createElement("rect", { y: "25", width: "10", height: "50", rx: "4", ry: "4", fill: color, "data-testid": "falling-lines-rect-2" },- React.createElement("animate", { attributeName: "x", values: "10;100", dur: "1.2s", begin: "0.8s", repeatCount: "indefinite" }),- React.createElement("animateTransform", { attributeName: "transform", type: "rotate", from: "0 10 70", to: "-60 100 70", dur: "1.2s", begin: "0.8s", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "opacity", values: "0;1;0", dur: "1.2s", begin: "0.8s", repeatCount: "indefinite" })))) : null;-};-/* harmony default export */ const loader_FallingLines = ((/* unused pure expression or super */ null && (FallingLines)));--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Vortex.js-var Vortex_assign = (undefined && undefined.__assign) || function () {- Vortex_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return Vortex_assign.apply(this, arguments);-};---var Vortex = function (_a) {- var _b = _a.visible, visible = _b === void 0 ? true : _b, _c = _a.height, height = _c === void 0 ? '80' : _c, _d = _a.width, width = _d === void 0 ? '80' : _d, _e = _a.ariaLabel, ariaLabel = _e === void 0 ? 'vortex-loading' : _e, wrapperStyle = _a.wrapperStyle, wrapperClass = _a.wrapperClass, _f = _a.colors, colors = _f === void 0 ? ['#1B5299', '#EF8354', '#DB5461', '#1B5299', '#EF8354', '#DB5461'] : _f;- return !visible ? null : (React.createElement("svg", Vortex_assign({ height: height, width: width, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", "data-testid": "vortex-svg", "aria-label": ariaLabel, style: wrapperStyle, className: wrapperClass }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("g", { transform: "translate(50,50)" },- React.createElement("g", { transform: "scale(0.7)" },- React.createElement("g", { transform: "translate(-50,-50)" },- React.createElement("g", { transform: "rotate(137.831 50 50)" },- React.createElement("animateTransform", { attributeName: "transform", type: "rotate", repeatCount: "indefinite", values: "360 50 50;0 50 50", keyTimes: "0;1", dur: "1", keySplines: "0.5 0.5 0.5 0.5", calcMode: "spline" }),- React.createElement("path", { fill: colors[0], d: "M30.4,9.7c-7.4,10.9-11.8,23.8-12.3,37.9c0.2,1,0.5,1.9,0.7,2.8c1.4-5.2,3.4-10.3,6.2-15.1 c2.6-4.4,5.6-8.4,9-12c0.7-0.7,1.4-1.4,2.1-2.1c7.4-7,16.4-12,26-14.6C51.5,3.6,40.2,4.9,30.4,9.7z" }),- React.createElement("path", { fill: colors[1], d: "M24.8,64.2c-2.6-4.4-4.5-9.1-5.9-13.8c-0.3-0.9-0.5-1.9-0.7-2.8c-2.4-9.9-2.2-20.2,0.4-29.8 C10.6,25.5,6,36,5.3,46.8C11,58.6,20,68.9,31.9,76.3c0.9,0.3,1.9,0.5,2.8,0.8C31,73.3,27.6,69,24.8,64.2z" }),- React.createElement("path", { fill: colors[2], d: "M49.6,78.9c-5.1,0-10.1-0.6-14.9-1.8c-1-0.2-1.9-0.5-2.8-0.8c-9.8-2.9-18.5-8.2-25.6-15.2 c2.8,10.8,9.5,20,18.5,26c13.1,0.9,26.6-1.7,38.9-8.3c0.7-0.7,1.4-1.4,2.1-2.1C60.7,78.2,55.3,78.9,49.6,78.9z" }),- React.createElement("path", { fill: colors[3], d: "M81.1,49.6c-1.4,5.2-3.4,10.3-6.2,15.1c-2.6,4.4-5.6,8.4-9,12c-0.7,0.7-1.4,1.4-2.1,2.1 c-7.4,7-16.4,12-26,14.6c10.7,3,22.1,1.7,31.8-3.1c7.4-10.9,11.8-23.8,12.3-37.9C81.6,51.5,81.4,50.6,81.1,49.6z" }),- React.createElement("path", { fill: colors[4], d: "M75.2,12.9c-13.1-0.9-26.6,1.7-38.9,8.3c-0.7,0.7-1.4,1.4-2.1,2.1c5.2-1.4,10.6-2.2,16.2-2.2 c5.1,0,10.1,0.6,14.9,1.8c1,0.2,1.9,0.5,2.8,0.8c9.8,2.9,18.5,8.2,25.6,15.2C90.9,28.1,84.2,18.9,75.2,12.9z" }),- React.createElement("path", { fill: colors[5], d: "M94.7,53.2C89,41.4,80,31.1,68.1,23.7c-0.9-0.3-1.9-0.5-2.8-0.8c3.8,3.8,7.2,8.1,10,13 c2.6,4.4,4.5,9.1,5.9,13.8c0.3,0.9,0.5,1.9,0.7,2.8c2.4,9.9,2.2,20.2-0.4,29.8C89.4,74.5,94,64,94.7,53.2z" })))))));-};-/* harmony default export */ const loader_Vortex = ((/* unused pure expression or super */ null && (Vortex)));--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/RotatingTriangles.js-var RotatingTriangles_assign = (undefined && undefined.__assign) || function () {- RotatingTriangles_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return RotatingTriangles_assign.apply(this, arguments);-};---function RotatingTriangles(_a) {- var _b = _a.visible, visible = _b === void 0 ? true : _b, _c = _a.height, height = _c === void 0 ? '80' : _c, _d = _a.width, width = _d === void 0 ? '80' : _d, _e = _a.wrapperClass, wrapperClass = _e === void 0 ? '' : _e, _f = _a.wrapperStyle, wrapperStyle = _f === void 0 ? {} : _f, _g = _a.ariaLabel, ariaLabel = _g === void 0 ? 'rotating-triangle-loading' : _g, _h = _a.colors, colors = _h === void 0 ? ['#1B5299', '#EF8354', '#DB5461'] : _h;- return !visible ? null : (React.createElement("svg", RotatingTriangles_assign({ width: width, height: height, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", className: wrapperClass, style: wrapperStyle, "aria-label": ariaLabel, "data-testid": 'rotating-triangle-svg' }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("g", { transform: "translate(50,42)" },- React.createElement("g", { transform: "scale(0.8)" },- React.createElement("g", { transform: "translate(-50,-50)" },- React.createElement("polygon", { "ng-attr-fill": "{{config.c1}}", points: "72.5,50 50,11 27.5,50 50,50", fill: colors[0], transform: "rotate(186 50 38.5)" },- React.createElement("animateTransform", { attributeName: "transform", type: "rotate", calcMode: "linear", values: "0 50 38.5;360 50 38.5", keyTimes: "0;1", dur: "1s", begin: "0s", repeatCount: "indefinite" })),- React.createElement("polygon", { "ng-attr-fill": "{{config.c2}}", points: "5,89 50,89 27.5,50", fill: colors[1], transform: "rotate(186 27.5 77.5)" },- React.createElement("animateTransform", { attributeName: "transform", type: "rotate", calcMode: "linear", values: "0 27.5 77.5;360 27.5 77.5", keyTimes: "0;1", dur: "1s", begin: "0s", repeatCount: "indefinite" })),- React.createElement("polygon", { "ng-attr-fill": "{{config.c3}}", points: "72.5,50 50,89 95,89", fill: colors[2], transform: "rotate(186 72.2417 77.5)" },- React.createElement("animateTransform", { attributeName: "transform", type: "rotate", calcMode: "linear", values: "0 72.5 77.5;360 72 77.5", keyTimes: "0;1", dur: "1s", begin: "0s", repeatCount: "indefinite" })))))));-}--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Radio.js-var Radio_assign = (undefined && undefined.__assign) || function () {- Radio_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return Radio_assign.apply(this, arguments);-};---function Radio(_a) {- var _b = _a.visible, visible = _b === void 0 ? true : _b, _c = _a.height, height = _c === void 0 ? '80' : _c, _d = _a.width, width = _d === void 0 ? '80' : _d, _e = _a.wrapperClass, wrapperClass = _e === void 0 ? '' : _e, _f = _a.wrapperStyle, wrapperStyle = _f === void 0 ? {} : _f, _g = _a.ariaLabel, ariaLabel = _g === void 0 ? 'radio-loading' : _g, _h = _a.colors, colors = _h === void 0 ? [DEFAULT_COLOR, DEFAULT_COLOR, DEFAULT_COLOR] : _h;- return !visible ? null : (React.createElement("svg", Radio_assign({ width: width, height: height, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", className: wrapperClass, style: wrapperStyle, "aria-label": ariaLabel, "data-testid": "radio-bar-svg" }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("circle", { cx: "28", cy: "75", r: "11", "ng-attr-fill": "{{config.c1}}", fill: colors[0] },- React.createElement("animate", { attributeName: "fill-opacity", calcMode: "linear", values: "0;1;1", keyTimes: "0;0.2;1", dur: "1", begin: "0s", repeatCount: "indefinite" })),- React.createElement("path", { d: "M28 47A28 28 0 0 1 56 75", fill: "none", "ng-attr-stroke": "{{config.c2}}", strokeWidth: "10", stroke: colors[1] },- React.createElement("animate", { attributeName: "stroke-opacity", calcMode: "linear", values: "0;1;1", keyTimes: "0;0.2;1", dur: "1", begin: "0.1s", repeatCount: "indefinite" })),- React.createElement("path", { d: "M28 25A50 50 0 0 1 78 75", fill: "none", "ng-attr-stroke": "{{config.c3}}", strokeWidth: "10", stroke: colors[2] },- React.createElement("animate", { attributeName: "stroke-opacity", calcMode: "linear", values: "0;1;1", keyTimes: "0;0.2;1", dur: "1", begin: "0.2s", repeatCount: "indefinite" }))));-}--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/ProgressBar.js-var ProgressBar_assign = (undefined && undefined.__assign) || function () {- ProgressBar_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return ProgressBar_assign.apply(this, arguments);-};---function ProgressBar(_a) {- var _b = _a.visible, visible = _b === void 0 ? true : _b, _c = _a.height, height = _c === void 0 ? '80' : _c, _d = _a.width, width = _d === void 0 ? '80' : _d, _e = _a.wrapperClass, wrapperClass = _e === void 0 ? '' : _e, _f = _a.wrapperStyle, wrapperStyle = _f === void 0 ? {} : _f, _g = _a.ariaLabel, ariaLabel = _g === void 0 ? 'progress-bar-loading' : _g, _h = _a.borderColor, borderColor = _h === void 0 ? '#F4442E' : _h, _j = _a.barColor, barColor = _j === void 0 ? '#51E5FF' : _j;- return !visible ? null : (React.createElement("svg", ProgressBar_assign({ width: width, height: height, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", className: wrapperClass, style: wrapperStyle, "aria-label": ariaLabel, "data-testid": 'progress-bar-svg' }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("defs", null,- React.createElement("clipPath", { "ng-attr-id": "{{config.cpid}}", x: "0", y: "0", width: "100", height: "100", id: "lds-progress-cpid-5009611b8a418" },- React.createElement("rect", { x: "0", y: "0", width: "66.6667", height: "100" },- React.createElement("animate", { attributeName: "width", calcMode: "linear", values: "0;100;100", keyTimes: "0;0.5;1", dur: "1", begin: "0s", repeatCount: "indefinite" }),- React.createElement("animate", { attributeName: "x", calcMode: "linear", values: "0;0;100", keyTimes: "0;0.5;1", dur: "1", begin: "0s", repeatCount: "indefinite" })))),- React.createElement("path", { fill: "none", "ng-attr-stroke": "{{config.c1}}", strokeWidth: "2.7928", d: "M82,63H18c-7.2,0-13-5.8-13-13v0c0-7.2,5.8-13,13-13h64c7.2,0,13,5.8,13,13v0C95,57.2,89.2,63,82,63z", stroke: borderColor }),- React.createElement("path", { "ng-attr-fill": "{{config.c2}}", "ng-attr-clip-path": "url(#{{config.cpid}})", d: "M81.3,58.7H18.7c-4.8,0-8.7-3.9-8.7-8.7v0c0-4.8,3.9-8.7,8.7-8.7h62.7c4.8,0,8.7,3.9,8.7,8.7v0C90,54.8,86.1,58.7,81.3,58.7z", fill: barColor, clipPath: "url(#lds-progress-cpid-5009611b8a418)" })));-}--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/MagnifyingGlass.js-var MagnifyingGlass_assign = (undefined && undefined.__assign) || function () {- MagnifyingGlass_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return MagnifyingGlass_assign.apply(this, arguments);-};---function MagnifyingGlass(_a) {- var _b = _a.visible, visible = _b === void 0 ? true : _b, _c = _a.height, height = _c === void 0 ? '80' : _c, _d = _a.width, width = _d === void 0 ? '80' : _d, _e = _a.wrapperClass, wrapperClass = _e === void 0 ? '' : _e, _f = _a.wrapperStyle, wrapperStyle = _f === void 0 ? {} : _f, _g = _a.ariaLabel, ariaLabel = _g === void 0 ? 'magnifying-glass-loading' : _g, _h = _a.glassColor, glassColor = _h === void 0 ? '#c0efff' : _h, _j = _a.color, color = _j === void 0 ? '#e15b64' : _j;- return !visible ? null : (React.createElement("svg", MagnifyingGlass_assign({ width: width, height: height, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", className: wrapperClass, style: wrapperStyle, "aria-label": ariaLabel, "data-testid": 'magnifying-glass-svg' }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("g", { transform: "translate(50,50)" },- React.createElement("g", { "ng-attr-transform": "scale({{config.scale}})", transform: "scale(0.82)" },- React.createElement("g", { transform: "translate(-50,-50)" },- React.createElement("g", { transform: "translate(16.3636 -20)" },- React.createElement("animateTransform", { attributeName: "transform", type: "translate", calcMode: "linear", values: "-20 -20;20 -20;0 20;-20 -20", keyTimes: "0;0.33;0.66;1", dur: "1s", begin: "0s", repeatCount: "indefinite" }),- React.createElement("path", { "ng-attr-fill": "{{config.glass}}", d: "M44.19,26.158c-4.817,0-9.345,1.876-12.751,5.282c-3.406,3.406-5.282,7.934-5.282,12.751 c0,4.817,1.876,9.345,5.282,12.751c3.406,3.406,7.934,5.282,12.751,5.282s9.345-1.876,12.751-5.282 c3.406-3.406,5.282-7.934,5.282-12.751c0-4.817-1.876-9.345-5.282-12.751C53.536,28.033,49.007,26.158,44.19,26.158z", fill: glassColor }),- React.createElement("path", { "ng-attr-fill": "{{config.frame}}", d: "M78.712,72.492L67.593,61.373l-3.475-3.475c1.621-2.352,2.779-4.926,3.475-7.596c1.044-4.008,1.044-8.23,0-12.238 c-1.048-4.022-3.146-7.827-6.297-10.979C56.572,22.362,50.381,20,44.19,20C38,20,31.809,22.362,27.085,27.085 c-9.447,9.447-9.447,24.763,0,34.21C31.809,66.019,38,68.381,44.19,68.381c4.798,0,9.593-1.425,13.708-4.262l9.695,9.695 l4.899,4.899C73.351,79.571,74.476,80,75.602,80s2.251-0.429,3.11-1.288C80.429,76.994,80.429,74.209,78.712,72.492z M56.942,56.942 c-3.406,3.406-7.934,5.282-12.751,5.282s-9.345-1.876-12.751-5.282c-3.406-3.406-5.282-7.934-5.282-12.751 c0-4.817,1.876-9.345,5.282-12.751c3.406-3.406,7.934-5.282,12.751-5.282c4.817,0,9.345,1.876,12.751,5.282 c3.406,3.406,5.282,7.934,5.282,12.751C62.223,49.007,60.347,53.536,56.942,56.942z", fill: color })))))));-}--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/FidgetSpinner.js-var FidgetSpinner_assign = (undefined && undefined.__assign) || function () {- FidgetSpinner_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return FidgetSpinner_assign.apply(this, arguments);-};---function FidgetSpinner(_a) {- var _b = _a.width, width = _b === void 0 ? '80' : _b, _c = _a.height, height = _c === void 0 ? '80' : _c, _d = _a.backgroundColor, backgroundColor = _d === void 0 ? DEFAULT_COLOR : _d, _e = _a.ballColors, ballColors = _e === void 0 ? ['#fc636b', '#6a67ce', '#ffb900'] : _e, _f = _a.wrapperClass, wrapperClass = _f === void 0 ? '' : _f, _g = _a.wrapperStyle, wrapperStyle = _g === void 0 ? {} : _g, _h = _a.ariaLabel, ariaLabel = _h === void 0 ? 'fidget-spinner-loader' : _h, _j = _a.visible, visible = _j === void 0 ? true : _j;- return !visible ? null : (React.createElement("svg", FidgetSpinner_assign({ width: width, height: height, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", className: wrapperClass, style: wrapperStyle, "aria-label": ariaLabel, "data-testid": "fidget-spinner-svg" }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("g", { transform: "rotate(6 50 50)" },- React.createElement("g", { transform: "translate(50 50)" },- React.createElement("g", { "ng-attr-transform": "scale({{config.r}})", transform: "scale(0.9)" },- React.createElement("g", { transform: "translate(-50 -58)" },- React.createElement("path", { "ng-attr-fill": "{{config.c2}}", d: "M27.1,79.4c-1.1,0.6-2.4,1-3.7,1c-2.6,0-5.1-1.4-6.4-3.7c-2-3.5-0.8-8,2.7-10.1c1.1-0.6,2.4-1,3.7-1c2.6,0,5.1,1.4,6.4,3.7 C31.8,72.9,30.6,77.4,27.1,79.4z", fill: ballColors[0] }),- React.createElement("path", { "ng-attr-fill": "{{config.c3}}", d: "M72.9,79.4c1.1,0.6,2.4,1,3.7,1c2.6,0,5.1-1.4,6.4-3.7c2-3.5,0.8-8-2.7-10.1c-1.1-0.6-2.4-1-3.7-1c-2.6,0-5.1,1.4-6.4,3.7 C68.2,72.9,69.4,77.4,72.9,79.4z", fill: ballColors[1] }),- React.createElement("circle", { "ng-attr-fill": "{{config.c4}}", cx: "50", cy: "27", r: "7.4", fill: ballColors[2] }),- React.createElement("path", { "ng-attr-fill": "{{config.c1}}", d: "M86.5,57.5c-3.1-1.9-6.4-2.8-9.8-2.8c-0.5,0-0.9,0-1.4,0c-0.4,0-0.8,0-1.1,0c-2.1,0-4.2-0.4-6.2-1.2 c-0.8-3.6-2.8-6.9-5.4-9.3c0.4-2.5,1.3-4.8,2.7-6.9c2-2.9,3.2-6.5,3.2-10.4c0-10.2-8.2-18.4-18.4-18.4c-0.3,0-0.6,0-0.9,0 C39.7,9,32,16.8,31.6,26.2c-0.2,4.1,1,7.9,3.2,11c1.4,2.1,2.3,4.5,2.7,6.9c-2.6,2.5-4.6,5.7-5.4,9.3c-1.9,0.7-4,1.1-6.1,1.1 c-0.4,0-0.8,0-1.2,0c-0.5,0-0.9-0.1-1.4-0.1c-3.1,0-6.3,0.8-9.2,2.5c-9.1,5.2-12,17-6.3,25.9c3.5,5.4,9.5,8.4,15.6,8.4 c2.9,0,5.8-0.7,8.5-2.1c3.6-1.9,6.3-4.9,8-8.3c1.1-2.3,2.7-4.2,4.6-5.8c1.7,0.5,3.5,0.8,5.4,0.8c1.9,0,3.7-0.3,5.4-0.8 c1.9,1.6,3.5,3.5,4.6,5.7c1.5,3.2,4,6,7.4,8c2.9,1.7,6.1,2.5,9.2,2.5c6.6,0,13.1-3.6,16.4-10C97.3,73.1,94.4,62.5,86.5,57.5z M29.6,83.7c-1.9,1.1-4,1.6-6.1,1.6c-4.2,0-8.4-2.2-10.6-6.1c-3.4-5.9-1.4-13.4,4.5-16.8c1.9-1.1,4-1.6,6.1-1.6 c4.2,0,8.4,2.2,10.6,6.1C37.5,72.8,35.4,80.3,29.6,83.7z M50,39.3c-6.8,0-12.3-5.5-12.3-12.3S43.2,14.7,50,14.7 c6.8,0,12.3,5.5,12.3,12.3S56.8,39.3,50,39.3z M87.2,79.2c-2.3,3.9-6.4,6.1-10.6,6.1c-2.1,0-4.2-0.5-6.1-1.6 c-5.9-3.4-7.9-10.9-4.5-16.8c2.3-3.9,6.4-6.1,10.6-6.1c2.1,0,4.2,0.5,6.1,1.6C88.6,65.8,90.6,73.3,87.2,79.2z", fill: backgroundColor })))),- React.createElement("animateTransform", { attributeName: "transform", type: "rotate", calcMode: "linear", values: "0 50 50;360 50 50", keyTimes: "0;1", dur: "1s", begin: "0s", repeatCount: "indefinite" }))));-}--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Dna.js-var Dna_assign = (undefined && undefined.__assign) || function () {- Dna_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return Dna_assign.apply(this, arguments);-};---function DNA(_a) {- var _b = _a.visible, visible = _b === void 0 ? true : _b, _c = _a.width, width = _c === void 0 ? '80' : _c, _d = _a.height, height = _d === void 0 ? '80' : _d, _e = _a.wrapperClass, wrapperClass = _e === void 0 ? '' : _e, _f = _a.wrapperStyle, wrapperStyle = _f === void 0 ? {} : _f, _g = _a.ariaLabel, ariaLabel = _g === void 0 ? 'dna-loading' : _g;- return !visible ? null : (React.createElement("svg", Dna_assign({ xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", width: width, height: height, viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", className: wrapperClass, style: wrapperStyle, "aria-label": ariaLabel, "data-testid": 'dna-svg' }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("circle", { cx: "6.451612903225806", cy: "60.6229", r: "3.41988", fill: "rgba(233, 12, 89, 0.5125806451612902)" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-0.5s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "0s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "rgba(233, 12, 89, 0.5125806451612902);#ff0033;rgba(233, 12, 89, 0.5125806451612902)", dur: "2s", repeatCount: "indefinite", begin: "-0.5s" })),- React.createElement("circle", { cx: "6.451612903225806", cy: "39.3771", r: "2.58012", fill: "#46dff0" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-1.5s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-1s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "#46dff0;rgba(53, 58, 57, 0.1435483870967742);#46dff0", dur: "2s", repeatCount: "indefinite", begin: "-0.5s" })),- React.createElement("circle", { cx: "16.129032258064512", cy: "68.1552", r: "3.17988", fill: "rgba(233, 12, 89, 0.5125806451612902)" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-0.7s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-0.2s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "rgba(233, 12, 89, 0.5125806451612902);#ff0033;rgba(233, 12, 89, 0.5125806451612902)", dur: "2s", repeatCount: "indefinite", begin: "-0.7s" })),- React.createElement("circle", { cx: "16.129032258064512", cy: "31.8448", r: "2.82012", fill: "#46dff0" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-1.7s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-1.2s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "#46dff0;rgba(53, 58, 57, 0.1435483870967742);#46dff0", dur: "2s", repeatCount: "indefinite", begin: "-0.7s" })),- React.createElement("circle", { cx: "25.806451612903224", cy: "69.3634", r: "2.93988", fill: "rgba(233, 12, 89, 0.5125806451612902)" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-0.9s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-0.4s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "rgba(233, 12, 89, 0.5125806451612902);#ff0033;rgba(233, 12, 89, 0.5125806451612902)", dur: "2s", repeatCount: "indefinite", begin: "-0.9s" })),- React.createElement("circle", { cx: "25.806451612903224", cy: "30.6366", r: "3.06012", fill: "#46dff0" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-1.9s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-1.4s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "#46dff0;rgba(53, 58, 57, 0.1435483870967742);#46dff0", dur: "2s", repeatCount: "indefinite", begin: "-0.9s" })),- React.createElement("circle", { cx: "35.48387096774193", cy: "65.3666", r: "2.69988", fill: "rgba(233, 12, 89, 0.5125806451612902)" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-1.1s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-0.6s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "rgba(233, 12, 89, 0.5125806451612902);#ff0033;rgba(233, 12, 89, 0.5125806451612902)", dur: "2s", repeatCount: "indefinite", begin: "-1.1s" })),- React.createElement("circle", { cx: "35.48387096774193", cy: "34.6334", r: "3.30012", fill: "#46dff0" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-2.1s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-1.6s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "#46dff0;rgba(53, 58, 57, 0.1435483870967742);#46dff0", dur: "2s", repeatCount: "indefinite", begin: "-1.1s" })),- React.createElement("circle", { cx: "45.16129032258064", cy: "53.8474", r: "2.45988", fill: "rgba(233, 12, 89, 0.5125806451612902)" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-1.3s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-0.8s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "rgba(233, 12, 89, 0.5125806451612902);#ff0033;rgba(233, 12, 89, 0.5125806451612902)", dur: "2s", repeatCount: "indefinite", begin: "-1.3s" })),- React.createElement("circle", { cx: "45.16129032258064", cy: "46.1526", r: "3.54012", fill: "#46dff0" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-2.3s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-1.8s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "#46dff0;rgba(53, 58, 57, 0.1435483870967742);#46dff0", dur: "2s", repeatCount: "indefinite", begin: "-1.3s" })),- React.createElement("circle", { cx: "54.838709677419345", cy: "39.3771", r: "2.58012", fill: "rgba(233, 12, 89, 0.5125806451612902)" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-1.5s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-1s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "rgba(233, 12, 89, 0.5125806451612902);#ff0033;rgba(233, 12, 89, 0.5125806451612902)", dur: "2s", repeatCount: "indefinite", begin: "-1.5s" })),- React.createElement("circle", { cx: "54.838709677419345", cy: "60.6229", r: "3.41988", fill: "#46dff0" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-2.5s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-2s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "#46dff0;rgba(53, 58, 57, 0.1435483870967742);#46dff0", dur: "2s", repeatCount: "indefinite", begin: "-1.5s" })),- React.createElement("circle", { cx: "64.51612903225805", cy: "31.8448", r: "2.82012", fill: "rgba(233, 12, 89, 0.5125806451612902)" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-1.7s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-1.2s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "rgba(233, 12, 89, 0.5125806451612902);#ff0033;rgba(233, 12, 89, 0.5125806451612902)", dur: "2s", repeatCount: "indefinite", begin: "-1.7s" })),- React.createElement("circle", { cx: "64.51612903225805", cy: "68.1552", r: "3.17988", fill: "#46dff0" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-2.7s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-2.2s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "#46dff0;rgba(53, 58, 57, 0.1435483870967742);#46dff0", dur: "2s", repeatCount: "indefinite", begin: "-1.7s" })),- React.createElement("circle", { cx: "74.19354838709677", cy: "30.6366", r: "3.06012", fill: "rgba(233, 12, 89, 0.5125806451612902)" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-1.9s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-1.4s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "rgba(233, 12, 89, 0.5125806451612902);#ff0033;rgba(233, 12, 89, 0.5125806451612902)", dur: "2s", repeatCount: "indefinite", begin: "-1.9s" })),- React.createElement("circle", { cx: "74.19354838709677", cy: "69.3634", r: "2.93988", fill: "#46dff0" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-2.9s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-2.4s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "#46dff0;rgba(53, 58, 57, 0.1435483870967742);#46dff0", dur: "2s", repeatCount: "indefinite", begin: "-1.9s" })),- React.createElement("circle", { cx: "83.87096774193547", cy: "34.6334", r: "3.30012", fill: "rgba(233, 12, 89, 0.5125806451612902)" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-2.1s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-1.6s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "rgba(233, 12, 89, 0.5125806451612902);#ff0033;rgba(233, 12, 89, 0.5125806451612902)", dur: "2s", repeatCount: "indefinite", begin: "-2.1s" })),- React.createElement("circle", { cx: "83.87096774193547", cy: "65.3666", r: "2.69988", fill: "#46dff0" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-3.1s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-2.6s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "#46dff0;rgba(53, 58, 57, 0.1435483870967742);#46dff0", dur: "2s", repeatCount: "indefinite", begin: "-2.1s" })),- React.createElement("circle", { cx: "93.54838709677418", cy: "46.1526", r: "3.54012", fill: "rgba(233, 12, 89, 0.5125806451612902)" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-2.3s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-1.8s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "rgba(233, 12, 89, 0.5125806451612902);#ff0033;rgba(233, 12, 89, 0.5125806451612902)", dur: "2s", repeatCount: "indefinite", begin: "-2.3s" })),- React.createElement("circle", { cx: "93.54838709677418", cy: "53.8474", r: "2.45988", fill: "#46dff0" },- React.createElement("animate", { attributeName: "r", keyTimes: "0;0.5;1", values: "2.4000000000000004;3.5999999999999996;2.4000000000000004", dur: "2s", repeatCount: "indefinite", begin: "-3.3s" }),- React.createElement("animate", { attributeName: "cy", keyTimes: "0;0.5;1", values: "30.5;69.5;30.5", dur: "2s", repeatCount: "indefinite", begin: "-2.8s", keySplines: "0.5 0 0.5 1;0.5 0 0.5 1", calcMode: "spline" }),- React.createElement("animate", { attributeName: "fill", keyTimes: "0;0.5;1", values: "#46dff0;rgba(53, 58, 57, 0.1435483870967742);#46dff0", dur: "2s", repeatCount: "indefinite", begin: "-2.3s" }))));-}--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Discuss.js-var Discuss_assign = (undefined && undefined.__assign) || function () {- Discuss_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return Discuss_assign.apply(this, arguments);-};---function Discuss(_a) {- var _b = _a.visible, visible = _b === void 0 ? true : _b, _c = _a.width, width = _c === void 0 ? '80' : _c, _d = _a.height, height = _d === void 0 ? '80' : _d, _e = _a.wrapperClass, wrapperClass = _e === void 0 ? '' : _e, _f = _a.wrapperStyle, wrapperStyle = _f === void 0 ? {} : _f, _g = _a.ariaLabel, ariaLabel = _g === void 0 ? 'discuss-loading' : _g, _h = _a.colors, colors = _h === void 0 ? ['#ff727d', '#ff727d'] : _h;- return !visible ? null : (React.createElement("svg", Discuss_assign({ width: width, height: height, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", className: wrapperClass, style: wrapperStyle, "aria-label": ariaLabel, "data-testid": 'discuss-svg' }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("path", { "ng-attr-d": "{{config.d}}", "ng-attr-stroke-width": "{{config.width}}", "ng-attr-stroke": "{{config.stroke}}", fill: "none", d: "M82 50A32 32 0 1 1 23.533421623214014 32.01333190873183 L21.71572875253809 21.7157287525381 L32.013331908731814 23.53342162321403 A32 32 0 0 1 82 50", strokeWidth: "5", stroke: colors[0] }),- React.createElement("circle", { cx: "50", cy: "50", "ng-attr-r": "{{config.radius2}}", "ng-attr-stroke-width": "{{config.width}}", "ng-attr-stroke": "{{config.stroke}}", "ng-attr-stroke-dasharray": "{{config.dasharray}}", fill: "none", strokeLinecap: "round", r: "20", strokeWidth: "5", stroke: colors[1], strokeDasharray: "31.41592653589793 31.41592653589793", transform: "rotate(96 50 50)" },- React.createElement("animateTransform", { attributeName: "transform", type: "rotate", calcMode: "linear", values: "0 50 50;360 50 50", keyTimes: "0;1", dur: "1s", begin: "0s", repeatCount: "indefinite" }))));-}--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/ColorRing.js-var ColorRing_assign = (undefined && undefined.__assign) || function () {- ColorRing_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return ColorRing_assign.apply(this, arguments);-};---function ColorRing(_a) {- var _b = _a.visible, visible = _b === void 0 ? true : _b, _c = _a.width, width = _c === void 0 ? '80' : _c, _d = _a.height, height = _d === void 0 ? '80' : _d, _e = _a.colors, colors = _e === void 0 ? ['#e15b64', '#f47e60', '#f8b26a', '#abbd81', '#849b87'] : _e, _f = _a.wrapperClass, wrapperClass = _f === void 0 ? '' : _f, _g = _a.wrapperStyle, wrapperStyle = _g === void 0 ? {} : _g, _h = _a.ariaLabel, ariaLabel = _h === void 0 ? 'color-ring-loading' : _h;- return !visible ? null : (React.createElement("svg", ColorRing_assign({ xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", width: width, height: height, viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", className: wrapperClass, style: wrapperStyle, "aria-label": ariaLabel, "data-testid": "color-ring-svg" }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("defs", null,- React.createElement("mask", { id: "ldio-4offds5dlws-mask" },- React.createElement("circle", { cx: "50", cy: "50", r: "26", stroke: "#fff", strokeLinecap: "round", strokeDasharray: "122.52211349000194 40.840704496667314", strokeWidth: "9", transform: "rotate(198.018 50 50)" },- React.createElement("animateTransform", { attributeName: "transform", type: "rotate", values: "0 50 50;360 50 50", keyTimes: "0;1", dur: "1s", repeatCount: "indefinite" })))),- React.createElement("g", { mask: "url(#ldio-4offds5dlws-mask)" },- React.createElement("rect", { x: "14.5", y: "0", width: "15", height: "100", fill: colors[0] },- React.createElement("animate", { attributeName: "fill", values: colors.join(';').toString(), keyTimes: "0;0.25;0.5;0.75;1", dur: "1s", repeatCount: "indefinite", begin: "-0.8s" })),- React.createElement("rect", { x: "28.5", y: "0", width: "15", height: "100", fill: colors[1] },- React.createElement("animate", { attributeName: "fill", values: colors.join(';').toString(), keyTimes: "0;0.25;0.5;0.75;1", dur: "1s", repeatCount: "indefinite", begin: "-0.6s" })),- React.createElement("rect", { x: "42.5", y: "0", width: "15", height: "100", fill: colors[2] },- React.createElement("animate", { attributeName: "fill", values: colors.join(';').toString(), keyTimes: "0;0.25;0.5;0.75;1", dur: "1s", repeatCount: "indefinite", begin: "-0.4s" })),- React.createElement("rect", { x: "56.5", y: "0", width: "15", height: "100", fill: colors[3] },- React.createElement("animate", { attributeName: "fill", values: colors.join(';').toString(), keyTimes: "0;0.25;0.5;0.75;1", dur: "1s", repeatCount: "indefinite", begin: "-0.2s" })),- React.createElement("rect", { x: "70.5", y: "0", width: "15", height: "100", fill: colors[4] },- React.createElement("animate", { attributeName: "fill", values: colors.join(';').toString(), keyTimes: "0;0.25;0.5;0.75;1", dur: "1s", repeatCount: "indefinite", begin: "0s" })))));-}--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Comment.js-var Comment_assign = (undefined && undefined.__assign) || function () {- Comment_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return Comment_assign.apply(this, arguments);-};---function Comment(_a) {- var _b = _a.visible, visible = _b === void 0 ? true : _b, _c = _a.width, width = _c === void 0 ? '80' : _c, _d = _a.height, height = _d === void 0 ? '80' : _d, _e = _a.backgroundColor, backgroundColor = _e === void 0 ? '#ff6d00' : _e, _f = _a.color, color = _f === void 0 ? '#fff' : _f, _g = _a.wrapperClass, wrapperClass = _g === void 0 ? '' : _g, _h = _a.wrapperStyle, wrapperStyle = _h === void 0 ? {} : _h, _j = _a.ariaLabel, ariaLabel = _j === void 0 ? 'comment-loading' : _j;- return !visible ? null : (React.createElement("svg", Comment_assign({ width: width, height: height, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", className: wrapperClass, style: wrapperStyle, "aria-label": ariaLabel, "data-testid": 'comment-svg' }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("path", { d: "M78,19H22c-6.6,0-12,5.4-12,12v31c0,6.6,5.4,12,12,12h37.2c0.4,3,1.8,5.6,3.7,7.6c2.4,2.5,5.1,4.1,9.1,4 c-1.4-2.1-2-7.2-2-10.3c0-0.4,0-0.8,0-1.3h8c6.6,0,12-5.4,12-12V31C90,24.4,84.6,19,78,19z", "ng-attr-fill": "{{config.c1}}", fill: backgroundColor }),- React.createElement("circle", { cx: "30", cy: "47", r: "5", "ng-attr-fill": "{{config.c2}}", fill: color },- React.createElement("animate", { attributeName: "opacity", calcMode: "linear", values: "0;1;1", keyTimes: "0;0.2;1", dur: "1", begin: "0s", repeatCount: "indefinite" })),- React.createElement("circle", { cx: "50", cy: "47", r: "5", "ng-attr-fill": "{{config.c3}}", fill: color },- React.createElement("animate", { attributeName: "opacity", calcMode: "linear", values: "0;0;1;1", keyTimes: "0;0.2;0.4;1", dur: "1", begin: "0s", repeatCount: "indefinite" })),- React.createElement("circle", { cx: "70", cy: "47", r: "5", "ng-attr-fill": "{{config.c4}}", fill: color },- React.createElement("animate", { attributeName: "opacity", calcMode: "linear", values: "0;0;1;1", keyTimes: "0;0.4;0.6;1", dur: "1", begin: "0s", repeatCount: "indefinite" }))));-}--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Blocks.js-var Blocks_assign = (undefined && undefined.__assign) || function () {- Blocks_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return Blocks_assign.apply(this, arguments);-};---function Blocks(_a) {- var _b = _a.visible, visible = _b === void 0 ? true : _b, _c = _a.width, width = _c === void 0 ? '80' : _c, _d = _a.height, height = _d === void 0 ? '80' : _d, _e = _a.wrapperClass, wrapperClass = _e === void 0 ? '' : _e, _f = _a.wrapperStyle, wrapperStyle = _f === void 0 ? {} : _f, _g = _a.ariaLabel, ariaLabel = _g === void 0 ? 'blocks-loading' : _g;- return !visible ? null : (React.createElement("svg", Blocks_assign({ width: width, height: height, className: wrapperClass, style: wrapperStyle, xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", "aria-label": ariaLabel, "data-testid": "blocks-svg" }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("rect", { x: "17", y: "17", width: "20", height: "20", fill: "#577c9b" },- React.createElement("animate", { attributeName: "fill", values: "#0dceff;#577c9b;#577c9b", keyTimes: "0;0.125;1", dur: "1s", repeatCount: "indefinite", begin: "0s", calcMode: "discrete" })),- React.createElement("rect", { x: "40", y: "17", width: "20", height: "20", fill: "#577c9b" },- React.createElement("animate", { attributeName: "fill", values: "#0dceff;#577c9b;#577c9b", keyTimes: "0;0.125;1", dur: "1s", repeatCount: "indefinite", begin: "0.125s", calcMode: "discrete" })),- React.createElement("rect", { x: "63", y: "17", width: "20", height: "20", fill: "#577c9b" },- React.createElement("animate", { attributeName: "fill", values: "#0dceff;#577c9b;#577c9b", keyTimes: "0;0.125;1", dur: "1s", repeatCount: "indefinite", begin: "0.25s", calcMode: "discrete" })),- React.createElement("rect", { x: "17", y: "40", width: "20", height: "20", fill: "#577c9b" },- React.createElement("animate", { attributeName: "fill", values: "#0dceff;#577c9b;#577c9b", keyTimes: "0;0.125;1", dur: "1s", repeatCount: "indefinite", begin: "0.875s", calcMode: "discrete" })),- React.createElement("rect", { x: "63", y: "40", width: "20", height: "20", fill: "#577c9b" },- React.createElement("animate", { attributeName: "fill", values: "#0dceff;#577c9b;#577c9b", keyTimes: "0;0.125;1", dur: "1s", repeatCount: "indefinite", begin: "0.375s", calcMode: "discrete" })),- React.createElement("rect", { x: "17", y: "63", width: "20", height: "20", fill: "#577c9b" },- React.createElement("animate", { attributeName: "fill", values: "#0dceff;#577c9b;#577c9b", keyTimes: "0;0.125;1", dur: "1s", repeatCount: "indefinite", begin: "0.75s", calcMode: "discrete" })),- React.createElement("rect", { x: "40", y: "63", width: "20", height: "20", fill: "#577c9b" },- React.createElement("animate", { attributeName: "fill", values: "#0dceff;#577c9b;#577c9b", keyTimes: "0;0.125;1", dur: "1s", repeatCount: "indefinite", begin: "0.625s", calcMode: "discrete" })),- React.createElement("rect", { x: "63", y: "63", width: "20", height: "20", fill: "#577c9b" },- React.createElement("animate", { attributeName: "fill", values: "#0dceff;#577c9b;#577c9b", keyTimes: "0;0.125;1", dur: "1s", repeatCount: "indefinite", begin: "0.5s", calcMode: "discrete" }))));-}--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/loader/Hourglass.js-var Hourglass_assign = (undefined && undefined.__assign) || function () {- Hourglass_assign = Object.assign || function(t) {- for (var s, i = 1, n = arguments.length; i < n; i++) {- s = arguments[i];- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))- t[p] = s[p];- }- return t;- };- return Hourglass_assign.apply(this, arguments);-};---function Hourglass(_a) {- var _b = _a.visible, visible = _b === void 0 ? true : _b, _c = _a.width, width = _c === void 0 ? '80' : _c, _d = _a.height, height = _d === void 0 ? '80' : _d, _e = _a.wrapperClass, wrapperClass = _e === void 0 ? '' : _e, _f = _a.wrapperStyle, wrapperStyle = _f === void 0 ? {} : _f, _g = _a.ariaLabel, ariaLabel = _g === void 0 ? 'hourglass-loading' : _g, _h = _a.colors, colors = _h === void 0 ? ['#306cce', '#72a1ed'] : _h;- return !visible ? null : (React.createElement("svg", Hourglass_assign({ width: width, height: height, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 350 350", preserveAspectRatio: "xMidYMid", className: wrapperClass, style: wrapperStyle, "aria-label": ariaLabel, "data-testid": "hourglass-svg" }, DEFAULT_WAI_ARIA_ATTRIBUTE),- React.createElement("animateTransform", { attributeName: "transform", type: "rotate", values: "0; 0; -30; 360; 360", keyTimes: "0; 0.40; 0.55; 0.65; 1", dur: "3s", begin: "0s", calcMode: "linear", repeatCount: "indefinite" }),- React.createElement("g", null,- React.createElement("path", { fill: colors[0], stroke: colors[0], d: "M324.658,20.572v-2.938C324.658,7.935,316.724,0,307.025,0H40.313c-9.699,0-17.635,7.935-17.635,17.634v2.938\n\t\t\t\tc0,9.699,7.935,17.634,17.635,17.634h6.814c3.5,0,3.223,3.267,3.223,4.937c0,19.588,8.031,42.231,14.186,56.698\n\t\t\t\tc12.344,29.012,40.447,52.813,63.516,69.619c4.211,3.068,3.201,5.916,0.756,7.875c-22.375,17.924-51.793,40.832-64.271,70.16\n\t\t\t\tc-6.059,14.239-13.934,36.4-14.18,55.772c-0.025,1.987,0.771,5.862-3.979,5.862h-6.064c-9.699,0-17.635,7.936-17.635,17.634v2.94\n\t\t\t\tc0,9.698,7.935,17.634,17.635,17.634h266.713c9.699,0,17.633-7.936,17.633-17.634v-2.94c0-9.698-7.934-17.634-17.633-17.634\n\t\t\t\th-3.816c-7,0-6.326-5.241-6.254-7.958c0.488-18.094-4.832-38.673-12.617-54.135c-17.318-34.389-44.629-56.261-61.449-68.915\n\t\t\t\tc-3.65-2.745-4.018-6.143,0-8.906c17.342-11.929,44.131-34.526,61.449-68.916c8.289-16.464,13.785-38.732,12.447-57.621\n\t\t\t\tc-0.105-1.514-0.211-4.472,3.758-4.472h6.482C316.725,38.206,324.658,30.272,324.658,20.572z M270.271,93.216\n\t\t\t\tc-16.113,31.998-41.967,54.881-64.455,68.67c-1.354,0.831-3.936,2.881-3.936,8.602v6.838c0,6.066,2.752,7.397,4.199,8.286\n\t\t\t\tc22.486,13.806,48.143,36.636,64.191,68.508c7.414,14.727,11.266,32.532,10.885,46.702c-0.078,2.947,1.053,8.308-6.613,8.308\n\t\t\t\tH72.627c-6.75,0-6.475-3.37-6.459-5.213c0.117-12.895,4.563-30.757,12.859-50.255c14.404-33.854,44.629-54.988,64.75-67.577\n\t\t\t\tc0.896-0.561,2.629-1.567,2.629-6.922v-10.236c0-5.534-2.656-7.688-4.057-8.57c-20.098-12.688-49.256-33.618-63.322-66.681\n\t\t\t\tc-8.383-19.702-12.834-37.732-12.861-50.657c-0.002-1.694,0.211-4.812,3.961-4.812h206.582c4.168,0,4.127,3.15,4.264,4.829\n\t\t\t\tC282.156,57.681,278.307,77.257,270.271,93.216z" }),- React.createElement("g", null,- React.createElement("path", { fill: colors[1], stroke: colors[1], d: "M169.541,196.2l-68.748,86.03c-2.27,2.842-1.152,5.166,2.484,5.166h140.781c3.637,0,4.756-2.324,2.484-5.166\n\t\t\t\tl-68.746-86.03C175.525,193.358,171.811,193.358,169.541,196.2z" }),- React.createElement("animate", { attributeName: "opacity", values: "0; 0; 1; 1; 0; 0", keyTimes: "0; 0.1; 0.4; 0.6; 0.61; 1", dur: "3s", repeatCount: "indefinite" })),- React.createElement("g", null,- React.createElement("path", { fill: colors[1], stroke: colors[1], d: "M168.986,156.219c2.576,2.568,6.789,2.568,9.363,0l34.576-34.489c2.574-2.568,1.707-4.67-1.932-4.67H136.34\n\t\t\t\tc-3.637,0-4.506,2.102-1.932,4.67L168.986,156.219z" }),- React.createElement("animate", { attributeName: "opacity", values: "1; 1; 0; 0; 1; 1", keyTimes: "0; 0.1; 0.4; 0.65; 0.66; 1", dur: "3s", repeatCount: "indefinite" })))));-}--;// CONCATENATED MODULE: ./node_modules/react-loader-spinner/dist/esm/index.js-------------------------------------// EXTERNAL MODULE: ./node_modules/react-light-accordion/build/index.js-var build = __webpack_require__(388);-// EXTERNAL MODULE: ./node_modules/prismjs/prism.js-var prism = __webpack_require__(660);-var prism_default = /*#__PURE__*/__webpack_require__.n(prism);-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/styles/prism/twilight.js-/* harmony default export */ const twilight = ({- "code[class*=\"language-\"]": {- "color": "white",- "background": "none",- "fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",- "fontSize": "1em",- "textAlign": "left",- "textShadow": "0 -.1em .2em black",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "lineHeight": "1.5",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none"- },- "pre[class*=\"language-\"]": {- "color": "white",- "background": "hsl(0, 0%, 8%)",- "fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",- "fontSize": "1em",- "textAlign": "left",- "textShadow": "0 -.1em .2em black",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "lineHeight": "1.5",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none",- "borderRadius": ".5em",- "border": ".3em solid hsl(0, 0%, 33%)",- "boxShadow": "1px 1px .5em black inset",- "margin": ".5em 0",- "overflow": "auto",- "padding": "1em"- },- ":not(pre) > code[class*=\"language-\"]": {- "background": "hsl(0, 0%, 8%)",- "borderRadius": ".3em",- "border": ".13em solid hsl(0, 0%, 33%)",- "boxShadow": "1px 1px .3em -.1em black inset",- "padding": ".15em .2em .05em",- "whiteSpace": "normal"- },- "pre[class*=\"language-\"]::-moz-selection": {- "background": "hsla(0, 0%, 93%, 0.15)",- "textShadow": "none"- },- "pre[class*=\"language-\"]::selection": {- "background": "hsla(0, 0%, 93%, 0.15)",- "textShadow": "none"- },- "pre[class*=\"language-\"] ::-moz-selection": {- "textShadow": "none",- "background": "hsla(0, 0%, 93%, 0.15)"- },- "code[class*=\"language-\"]::-moz-selection": {- "textShadow": "none",- "background": "hsla(0, 0%, 93%, 0.15)"- },- "code[class*=\"language-\"] ::-moz-selection": {- "textShadow": "none",- "background": "hsla(0, 0%, 93%, 0.15)"- },- "pre[class*=\"language-\"] ::selection": {- "textShadow": "none",- "background": "hsla(0, 0%, 93%, 0.15)"- },- "code[class*=\"language-\"]::selection": {- "textShadow": "none",- "background": "hsla(0, 0%, 93%, 0.15)"- },- "code[class*=\"language-\"] ::selection": {- "textShadow": "none",- "background": "hsla(0, 0%, 93%, 0.15)"- },- "comment": {- "color": "hsl(0, 0%, 47%)"- },- "prolog": {- "color": "hsl(0, 0%, 47%)"- },- "doctype": {- "color": "hsl(0, 0%, 47%)"- },- "cdata": {- "color": "hsl(0, 0%, 47%)"- },- "punctuation": {- "Opacity": ".7"- },- "namespace": {- "Opacity": ".7"- },- "tag": {- "color": "hsl(14, 58%, 55%)"- },- "boolean": {- "color": "hsl(14, 58%, 55%)"- },- "number": {- "color": "hsl(14, 58%, 55%)"- },- "deleted": {- "color": "hsl(14, 58%, 55%)"- },- "keyword": {- "color": "hsl(53, 89%, 79%)"- },- "property": {- "color": "hsl(53, 89%, 79%)"- },- "selector": {- "color": "hsl(53, 89%, 79%)"- },- "constant": {- "color": "hsl(53, 89%, 79%)"- },- "symbol": {- "color": "hsl(53, 89%, 79%)"- },- "builtin": {- "color": "hsl(53, 89%, 79%)"- },- "attr-name": {- "color": "hsl(76, 21%, 52%)"- },- "attr-value": {- "color": "hsl(76, 21%, 52%)"- },- "string": {- "color": "hsl(76, 21%, 52%)"- },- "char": {- "color": "hsl(76, 21%, 52%)"- },- "operator": {- "color": "hsl(76, 21%, 52%)"- },- "entity": {- "color": "hsl(76, 21%, 52%)",- "cursor": "help"- },- "url": {- "color": "hsl(76, 21%, 52%)"- },- ".language-css .token.string": {- "color": "hsl(76, 21%, 52%)"- },- ".style .token.string": {- "color": "hsl(76, 21%, 52%)"- },- "variable": {- "color": "hsl(76, 21%, 52%)"- },- "inserted": {- "color": "hsl(76, 21%, 52%)"- },- "atrule": {- "color": "hsl(218, 22%, 55%)"- },- "regex": {- "color": "hsl(42, 75%, 65%)"- },- "important": {- "color": "hsl(42, 75%, 65%)",- "fontWeight": "bold"- },- "bold": {- "fontWeight": "bold"- },- "italic": {- "fontStyle": "italic"- },- ".language-markup .token.tag": {- "color": "hsl(33, 33%, 52%)"- },- ".language-markup .token.attr-name": {- "color": "hsl(33, 33%, 52%)"- },- ".language-markup .token.punctuation": {- "color": "hsl(33, 33%, 52%)"- },- "": {- "position": "relative",- "zIndex": "1"- },- ".line-highlight.line-highlight": {- "background": "linear-gradient(to right, hsla(0, 0%, 33%, .1) 70%, hsla(0, 0%, 33%, 0))",- "borderBottom": "1px dashed hsl(0, 0%, 33%)",- "borderTop": "1px dashed hsl(0, 0%, 33%)",- "marginTop": "0.75em",- "zIndex": "0"- },- ".line-highlight.line-highlight:before": {- "backgroundColor": "hsl(215, 15%, 59%)",- "color": "hsl(24, 20%, 95%)"- },- ".line-highlight.line-highlight[data-end]:after": {- "backgroundColor": "hsl(215, 15%, 59%)",- "color": "hsl(24, 20%, 95%)"- }-});-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/styles/prism/dark.js-/* harmony default export */ const dark = ({- "code[class*=\"language-\"]": {- "color": "white",- "background": "none",- "textShadow": "0 -.1em .2em black",- "fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",- "fontSize": "1em",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "lineHeight": "1.5",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none"- },- "pre[class*=\"language-\"]": {- "color": "white",- "background": "hsl(30, 20%, 25%)",- "textShadow": "0 -.1em .2em black",- "fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",- "fontSize": "1em",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "lineHeight": "1.5",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none",- "padding": "1em",- "margin": ".5em 0",- "overflow": "auto",- "border": ".3em solid hsl(30, 20%, 40%)",- "borderRadius": ".5em",- "boxShadow": "1px 1px .5em black inset"- },- ":not(pre) > code[class*=\"language-\"]": {- "background": "hsl(30, 20%, 25%)",- "padding": ".15em .2em .05em",- "borderRadius": ".3em",- "border": ".13em solid hsl(30, 20%, 40%)",- "boxShadow": "1px 1px .3em -.1em black inset",- "whiteSpace": "normal"- },- "comment": {- "color": "hsl(30, 20%, 50%)"- },- "prolog": {- "color": "hsl(30, 20%, 50%)"- },- "doctype": {- "color": "hsl(30, 20%, 50%)"- },- "cdata": {- "color": "hsl(30, 20%, 50%)"- },- "punctuation": {- "Opacity": ".7"- },- "namespace": {- "Opacity": ".7"- },- "property": {- "color": "hsl(350, 40%, 70%)"- },- "tag": {- "color": "hsl(350, 40%, 70%)"- },- "boolean": {- "color": "hsl(350, 40%, 70%)"- },- "number": {- "color": "hsl(350, 40%, 70%)"- },- "constant": {- "color": "hsl(350, 40%, 70%)"- },- "symbol": {- "color": "hsl(350, 40%, 70%)"- },- "selector": {- "color": "hsl(75, 70%, 60%)"- },- "attr-name": {- "color": "hsl(75, 70%, 60%)"- },- "string": {- "color": "hsl(75, 70%, 60%)"- },- "char": {- "color": "hsl(75, 70%, 60%)"- },- "builtin": {- "color": "hsl(75, 70%, 60%)"- },- "inserted": {- "color": "hsl(75, 70%, 60%)"- },- "operator": {- "color": "hsl(40, 90%, 60%)"- },- "entity": {- "color": "hsl(40, 90%, 60%)",- "cursor": "help"- },- "url": {- "color": "hsl(40, 90%, 60%)"- },- ".language-css .token.string": {- "color": "hsl(40, 90%, 60%)"- },- ".style .token.string": {- "color": "hsl(40, 90%, 60%)"- },- "variable": {- "color": "hsl(40, 90%, 60%)"- },- "atrule": {- "color": "hsl(350, 40%, 70%)"- },- "attr-value": {- "color": "hsl(350, 40%, 70%)"- },- "keyword": {- "color": "hsl(350, 40%, 70%)"- },- "regex": {- "color": "#e90"- },- "important": {- "color": "#e90",- "fontWeight": "bold"- },- "bold": {- "fontWeight": "bold"- },- "italic": {- "fontStyle": "italic"- },- "deleted": {- "color": "red"- }-});-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/styles/prism/atom-dark.js-/* harmony default export */ const atom_dark = ({- "code[class*=\"language-\"]": {- "color": "#c5c8c6",- "textShadow": "0 1px rgba(0, 0, 0, 0.3)",- "fontFamily": "Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",- "direction": "ltr",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "lineHeight": "1.5",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none"- },- "pre[class*=\"language-\"]": {- "color": "#c5c8c6",- "textShadow": "0 1px rgba(0, 0, 0, 0.3)",- "fontFamily": "Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",- "direction": "ltr",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "lineHeight": "1.5",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none",- "padding": "1em",- "margin": ".5em 0",- "overflow": "auto",- "borderRadius": "0.3em",- "background": "#1d1f21"- },- ":not(pre) > code[class*=\"language-\"]": {- "background": "#1d1f21",- "padding": ".1em",- "borderRadius": ".3em"- },- "comment": {- "color": "#7C7C7C"- },- "prolog": {- "color": "#7C7C7C"- },- "doctype": {- "color": "#7C7C7C"- },- "cdata": {- "color": "#7C7C7C"- },- "punctuation": {- "color": "#c5c8c6"- },- ".namespace": {- "Opacity": ".7"- },- "property": {- "color": "#96CBFE"- },- "keyword": {- "color": "#96CBFE"- },- "tag": {- "color": "#96CBFE"- },- "class-name": {- "color": "#FFFFB6",- "textDecoration": "underline"- },- "boolean": {- "color": "#99CC99"- },- "constant": {- "color": "#99CC99"- },- "symbol": {- "color": "#f92672"- },- "deleted": {- "color": "#f92672"- },- "number": {- "color": "#FF73FD"- },- "selector": {- "color": "#A8FF60"- },- "attr-name": {- "color": "#A8FF60"- },- "string": {- "color": "#A8FF60"- },- "char": {- "color": "#A8FF60"- },- "builtin": {- "color": "#A8FF60"- },- "inserted": {- "color": "#A8FF60"- },- "variable": {- "color": "#C6C5FE"- },- "operator": {- "color": "#EDEDED"- },- "entity": {- "color": "#FFFFB6",- "cursor": "help"- },- "url": {- "color": "#96CBFE"- },- ".language-css .token.string": {- "color": "#87C38A"- },- ".style .token.string": {- "color": "#87C38A"- },- "atrule": {- "color": "#F9EE98"- },- "attr-value": {- "color": "#F9EE98"- },- "function": {- "color": "#DAD085"- },- "regex": {- "color": "#E9C062"- },- "important": {- "color": "#fd971f",- "fontWeight": "bold"- },- "bold": {- "fontWeight": "bold"- },- "italic": {- "fontStyle": "italic"- }-});-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/styles/prism/darcula.js-/* harmony default export */ const darcula = ({- "code[class*=\"language-\"]": {- "color": "#a9b7c6",- "fontFamily": "Consolas, Monaco, 'Andale Mono', monospace",- "direction": "ltr",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "lineHeight": "1.5",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none"- },- "pre[class*=\"language-\"]": {- "color": "#a9b7c6",- "fontFamily": "Consolas, Monaco, 'Andale Mono', monospace",- "direction": "ltr",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "lineHeight": "1.5",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none",- "padding": "1em",- "margin": ".5em 0",- "overflow": "auto",- "background": "#2b2b2b"- },- "pre[class*=\"language-\"]::-moz-selection": {- "color": "inherit",- "background": "rgba(33, 66, 131, .85)"- },- "pre[class*=\"language-\"] ::-moz-selection": {- "color": "inherit",- "background": "rgba(33, 66, 131, .85)"- },- "code[class*=\"language-\"]::-moz-selection": {- "color": "inherit",- "background": "rgba(33, 66, 131, .85)"- },- "code[class*=\"language-\"] ::-moz-selection": {- "color": "inherit",- "background": "rgba(33, 66, 131, .85)"- },- "pre[class*=\"language-\"]::selection": {- "color": "inherit",- "background": "rgba(33, 66, 131, .85)"- },- "pre[class*=\"language-\"] ::selection": {- "color": "inherit",- "background": "rgba(33, 66, 131, .85)"- },- "code[class*=\"language-\"]::selection": {- "color": "inherit",- "background": "rgba(33, 66, 131, .85)"- },- "code[class*=\"language-\"] ::selection": {- "color": "inherit",- "background": "rgba(33, 66, 131, .85)"- },- ":not(pre) > code[class*=\"language-\"]": {- "background": "#2b2b2b",- "padding": ".1em",- "borderRadius": ".3em"- },- "comment": {- "color": "#808080"- },- "prolog": {- "color": "#808080"- },- "cdata": {- "color": "#808080"- },- "delimiter": {- "color": "#cc7832"- },- "boolean": {- "color": "#cc7832"- },- "keyword": {- "color": "#cc7832"- },- "selector": {- "color": "#cc7832"- },- "important": {- "color": "#cc7832"- },- "atrule": {- "color": "#cc7832"- },- "operator": {- "color": "#a9b7c6"- },- "punctuation": {- "color": "#a9b7c6"- },- "attr-name": {- "color": "#a9b7c6"- },- "tag": {- "color": "#e8bf6a"- },- "tag.punctuation": {- "color": "#e8bf6a"- },- "doctype": {- "color": "#e8bf6a"- },- "builtin": {- "color": "#e8bf6a"- },- "entity": {- "color": "#6897bb"- },- "number": {- "color": "#6897bb"- },- "symbol": {- "color": "#6897bb"- },- "property": {- "color": "#9876aa"- },- "constant": {- "color": "#9876aa"- },- "variable": {- "color": "#9876aa"- },- "string": {- "color": "#6a8759"- },- "char": {- "color": "#6a8759"- },- "attr-value": {- "color": "#a5c261"- },- "attr-value.punctuation": {- "color": "#a5c261"- },- "attr-value.punctuation:first-child": {- "color": "#a9b7c6"- },- "url": {- "color": "#287bde",- "textDecoration": "underline"- },- "function": {- "color": "#ffc66d"- },- "regex": {- "background": "#364135"- },- "bold": {- "fontWeight": "bold"- },- "italic": {- "fontStyle": "italic"- },- "inserted": {- "background": "#294436"- },- "deleted": {- "background": "#484a4a"- },- "code.language-css .token.property": {- "color": "#a9b7c6"- },- "code.language-css .token.property + .token.punctuation": {- "color": "#a9b7c6"- },- "code.language-css .token.id": {- "color": "#ffc66d"- },- "code.language-css .token.selector > .token.class": {- "color": "#ffc66d"- },- "code.language-css .token.selector > .token.attribute": {- "color": "#ffc66d"- },- "code.language-css .token.selector > .token.pseudo-class": {- "color": "#ffc66d"- },- "code.language-css .token.selector > .token.pseudo-element": {- "color": "#ffc66d"- }-});-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/styles/prism/coy.js-/* harmony default export */ const coy = ({- "code[class*=\"language-\"]": {- "color": "black",- "background": "none",- "fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",- "fontSize": "1em",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "lineHeight": "1.5",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none",- "maxHeight": "inherit",- "height": "inherit",- "padding": "0 1em",- "display": "block",- "overflow": "auto"- },- "pre[class*=\"language-\"]": {- "color": "black",- "background": "none",- "fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",- "fontSize": "1em",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "lineHeight": "1.5",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none",- "position": "relative",- "margin": ".5em 0",- "overflow": "visible",- "padding": "1px",- "backgroundColor": "#fdfdfd",- "WebkitBoxSizing": "border-box",- "MozBoxSizing": "border-box",- "boxSizing": "border-box",- "marginBottom": "1em"- },- "pre[class*=\"language-\"] > code": {- "position": "relative",- "zIndex": "1",- "borderLeft": "10px solid #358ccb",- "boxShadow": "-1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf",- "backgroundColor": "#fdfdfd",- "backgroundImage": "linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%)",- "backgroundSize": "3em 3em",- "backgroundOrigin": "content-box",- "backgroundAttachment": "local"- },- ":not(pre) > code[class*=\"language-\"]": {- "backgroundColor": "#fdfdfd",- "WebkitBoxSizing": "border-box",- "MozBoxSizing": "border-box",- "boxSizing": "border-box",- "marginBottom": "1em",- "position": "relative",- "padding": ".2em",- "borderRadius": "0.3em",- "color": "#c92c2c",- "border": "1px solid rgba(0, 0, 0, 0.1)",- "display": "inline",- "whiteSpace": "normal"- },- "pre[class*=\"language-\"]:before": {- "content": "''",- "display": "block",- "position": "absolute",- "bottom": "0.75em",- "left": "0.18em",- "width": "40%",- "height": "20%",- "maxHeight": "13em",- "boxShadow": "0px 13px 8px #979797",- "WebkitTransform": "rotate(-2deg)",- "MozTransform": "rotate(-2deg)",- "msTransform": "rotate(-2deg)",- "OTransform": "rotate(-2deg)",- "transform": "rotate(-2deg)"- },- "pre[class*=\"language-\"]:after": {- "content": "''",- "display": "block",- "position": "absolute",- "bottom": "0.75em",- "left": "auto",- "width": "40%",- "height": "20%",- "maxHeight": "13em",- "boxShadow": "0px 13px 8px #979797",- "WebkitTransform": "rotate(2deg)",- "MozTransform": "rotate(2deg)",- "msTransform": "rotate(2deg)",- "OTransform": "rotate(2deg)",- "transform": "rotate(2deg)",- "right": "0.75em"- },- "comment": {- "color": "#7D8B99"- },- "block-comment": {- "color": "#7D8B99"- },- "prolog": {- "color": "#7D8B99"- },- "doctype": {- "color": "#7D8B99"- },- "cdata": {- "color": "#7D8B99"- },- "punctuation": {- "color": "#5F6364"- },- "property": {- "color": "#c92c2c"- },- "tag": {- "color": "#c92c2c"- },- "boolean": {- "color": "#c92c2c"- },- "number": {- "color": "#c92c2c"- },- "function-name": {- "color": "#c92c2c"- },- "constant": {- "color": "#c92c2c"- },- "symbol": {- "color": "#c92c2c"- },- "deleted": {- "color": "#c92c2c"- },- "selector": {- "color": "#2f9c0a"- },- "attr-name": {- "color": "#2f9c0a"- },- "string": {- "color": "#2f9c0a"- },- "char": {- "color": "#2f9c0a"- },- "function": {- "color": "#2f9c0a"- },- "builtin": {- "color": "#2f9c0a"- },- "inserted": {- "color": "#2f9c0a"- },- "operator": {- "color": "#a67f59",- "background": "rgba(255, 255, 255, 0.5)"- },- "entity": {- "color": "#a67f59",- "background": "rgba(255, 255, 255, 0.5)",- "cursor": "help"- },- "url": {- "color": "#a67f59",- "background": "rgba(255, 255, 255, 0.5)"- },- "variable": {- "color": "#a67f59",- "background": "rgba(255, 255, 255, 0.5)"- },- "atrule": {- "color": "#1990b8"- },- "attr-value": {- "color": "#1990b8"- },- "keyword": {- "color": "#1990b8"- },- "class-name": {- "color": "#1990b8"- },- "regex": {- "color": "#e90"- },- "important": {- "color": "#e90",- "fontWeight": "normal"- },- ".language-css .token.string": {- "color": "#a67f59",- "background": "rgba(255, 255, 255, 0.5)"- },- ".style .token.string": {- "color": "#a67f59",- "background": "rgba(255, 255, 255, 0.5)"- },- "bold": {- "fontWeight": "bold"- },- "italic": {- "fontStyle": "italic"- },- "namespace": {- "Opacity": ".7"- },- "pre[class*=\"language-\"].line-numbers.line-numbers": {- "paddingLeft": "0"- },- "pre[class*=\"language-\"].line-numbers.line-numbers code": {- "paddingLeft": "3.8em"- },- "pre[class*=\"language-\"].line-numbers.line-numbers .line-numbers-rows": {- "left": "0"- },- "pre[class*=\"language-\"][data-line]": {- "paddingTop": "0",- "paddingBottom": "0",- "paddingLeft": "0"- },- "pre[data-line] code": {- "position": "relative",- "paddingLeft": "4em"- },- "pre .line-highlight": {- "marginTop": "0"- }-});-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/styles/prism/one-dark.js-/* harmony default export */ const one_dark = ({- "code[class*=\"language-\"]": {- "background": "hsl(220, 13%, 18%)",- "color": "hsl(220, 14%, 71%)",- "textShadow": "0 1px rgba(0, 0, 0, 0.3)",- "fontFamily": "\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace",- "direction": "ltr",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "lineHeight": "1.5",- "MozTabSize": "2",- "OTabSize": "2",- "tabSize": "2",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none"- },- "pre[class*=\"language-\"]": {- "background": "hsl(220, 13%, 18%)",- "color": "hsl(220, 14%, 71%)",- "textShadow": "0 1px rgba(0, 0, 0, 0.3)",- "fontFamily": "\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace",- "direction": "ltr",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "lineHeight": "1.5",- "MozTabSize": "2",- "OTabSize": "2",- "tabSize": "2",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none",- "padding": "1em",- "margin": "0.5em 0",- "overflow": "auto",- "borderRadius": "0.3em"- },- "code[class*=\"language-\"]::-moz-selection": {- "background": "hsl(220, 13%, 28%)",- "color": "inherit",- "textShadow": "none"- },- "code[class*=\"language-\"] *::-moz-selection": {- "background": "hsl(220, 13%, 28%)",- "color": "inherit",- "textShadow": "none"- },- "pre[class*=\"language-\"] *::-moz-selection": {- "background": "hsl(220, 13%, 28%)",- "color": "inherit",- "textShadow": "none"- },- "code[class*=\"language-\"]::selection": {- "background": "hsl(220, 13%, 28%)",- "color": "inherit",- "textShadow": "none"- },- "code[class*=\"language-\"] *::selection": {- "background": "hsl(220, 13%, 28%)",- "color": "inherit",- "textShadow": "none"- },- "pre[class*=\"language-\"] *::selection": {- "background": "hsl(220, 13%, 28%)",- "color": "inherit",- "textShadow": "none"- },- ":not(pre) > code[class*=\"language-\"]": {- "padding": "0.2em 0.3em",- "borderRadius": "0.3em",- "whiteSpace": "normal"- },- "comment": {- "color": "hsl(220, 10%, 40%)",- "fontStyle": "italic"- },- "prolog": {- "color": "hsl(220, 10%, 40%)"- },- "cdata": {- "color": "hsl(220, 10%, 40%)"- },- "doctype": {- "color": "hsl(220, 14%, 71%)"- },- "punctuation": {- "color": "hsl(220, 14%, 71%)"- },- "entity": {- "color": "hsl(220, 14%, 71%)",- "cursor": "help"- },- "attr-name": {- "color": "hsl(29, 54%, 61%)"- },- "class-name": {- "color": "hsl(29, 54%, 61%)"- },- "boolean": {- "color": "hsl(29, 54%, 61%)"- },- "constant": {- "color": "hsl(29, 54%, 61%)"- },- "number": {- "color": "hsl(29, 54%, 61%)"- },- "atrule": {- "color": "hsl(29, 54%, 61%)"- },- "keyword": {- "color": "hsl(286, 60%, 67%)"- },- "property": {- "color": "hsl(355, 65%, 65%)"- },- "tag": {- "color": "hsl(355, 65%, 65%)"- },- "symbol": {- "color": "hsl(355, 65%, 65%)"- },- "deleted": {- "color": "hsl(355, 65%, 65%)"- },- "important": {- "color": "hsl(355, 65%, 65%)"- },- "selector": {- "color": "hsl(95, 38%, 62%)"- },- "string": {- "color": "hsl(95, 38%, 62%)"- },- "char": {- "color": "hsl(95, 38%, 62%)"- },- "builtin": {- "color": "hsl(95, 38%, 62%)"- },- "inserted": {- "color": "hsl(95, 38%, 62%)"- },- "regex": {- "color": "hsl(95, 38%, 62%)"- },- "attr-value": {- "color": "hsl(95, 38%, 62%)"- },- "attr-value > .token.punctuation": {- "color": "hsl(95, 38%, 62%)"- },- "variable": {- "color": "hsl(207, 82%, 66%)"- },- "operator": {- "color": "hsl(207, 82%, 66%)"- },- "function": {- "color": "hsl(207, 82%, 66%)"- },- "url": {- "color": "hsl(187, 47%, 55%)"- },- "attr-value > .token.punctuation.attr-equals": {- "color": "hsl(220, 14%, 71%)"- },- "special-attr > .token.attr-value > .token.value.css": {- "color": "hsl(220, 14%, 71%)"- },- ".language-css .token.selector": {- "color": "hsl(355, 65%, 65%)"- },- ".language-css .token.property": {- "color": "hsl(220, 14%, 71%)"- },- ".language-css .token.function": {- "color": "hsl(187, 47%, 55%)"- },- ".language-css .token.url > .token.function": {- "color": "hsl(187, 47%, 55%)"- },- ".language-css .token.url > .token.string.url": {- "color": "hsl(95, 38%, 62%)"- },- ".language-css .token.important": {- "color": "hsl(286, 60%, 67%)"- },- ".language-css .token.atrule .token.rule": {- "color": "hsl(286, 60%, 67%)"- },- ".language-javascript .token.operator": {- "color": "hsl(286, 60%, 67%)"- },- ".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation": {- "color": "hsl(5, 48%, 51%)"- },- ".language-json .token.operator": {- "color": "hsl(220, 14%, 71%)"- },- ".language-json .token.null.keyword": {- "color": "hsl(29, 54%, 61%)"- },- ".language-markdown .token.url": {- "color": "hsl(220, 14%, 71%)"- },- ".language-markdown .token.url > .token.operator": {- "color": "hsl(220, 14%, 71%)"- },- ".language-markdown .token.url-reference.url > .token.string": {- "color": "hsl(220, 14%, 71%)"- },- ".language-markdown .token.url > .token.content": {- "color": "hsl(207, 82%, 66%)"- },- ".language-markdown .token.url > .token.url": {- "color": "hsl(187, 47%, 55%)"- },- ".language-markdown .token.url-reference.url": {- "color": "hsl(187, 47%, 55%)"- },- ".language-markdown .token.blockquote.punctuation": {- "color": "hsl(220, 10%, 40%)",- "fontStyle": "italic"- },- ".language-markdown .token.hr.punctuation": {- "color": "hsl(220, 10%, 40%)",- "fontStyle": "italic"- },- ".language-markdown .token.code-snippet": {- "color": "hsl(95, 38%, 62%)"- },- ".language-markdown .token.bold .token.content": {- "color": "hsl(29, 54%, 61%)"- },- ".language-markdown .token.italic .token.content": {- "color": "hsl(286, 60%, 67%)"- },- ".language-markdown .token.strike .token.content": {- "color": "hsl(355, 65%, 65%)"- },- ".language-markdown .token.strike .token.punctuation": {- "color": "hsl(355, 65%, 65%)"- },- ".language-markdown .token.list.punctuation": {- "color": "hsl(355, 65%, 65%)"- },- ".language-markdown .token.title.important > .token.punctuation": {- "color": "hsl(355, 65%, 65%)"- },- "bold": {- "fontWeight": "bold"- },- "italic": {- "fontStyle": "italic"- },- "namespace": {- "Opacity": "0.8"- },- "token.tab:not(:empty):before": {- "color": "hsla(220, 14%, 71%, 0.15)",- "textShadow": "none"- },- "token.cr:before": {- "color": "hsla(220, 14%, 71%, 0.15)",- "textShadow": "none"- },- "token.lf:before": {- "color": "hsla(220, 14%, 71%, 0.15)",- "textShadow": "none"- },- "token.space:before": {- "color": "hsla(220, 14%, 71%, 0.15)",- "textShadow": "none"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item": {- "marginRight": "0.4em"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button": {- "background": "hsl(220, 13%, 26%)",- "color": "hsl(220, 9%, 55%)",- "padding": "0.1em 0.4em",- "borderRadius": "0.3em"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a": {- "background": "hsl(220, 13%, 26%)",- "color": "hsl(220, 9%, 55%)",- "padding": "0.1em 0.4em",- "borderRadius": "0.3em"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span": {- "background": "hsl(220, 13%, 26%)",- "color": "hsl(220, 9%, 55%)",- "padding": "0.1em 0.4em",- "borderRadius": "0.3em"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover": {- "background": "hsl(220, 13%, 28%)",- "color": "hsl(220, 14%, 71%)"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus": {- "background": "hsl(220, 13%, 28%)",- "color": "hsl(220, 14%, 71%)"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover": {- "background": "hsl(220, 13%, 28%)",- "color": "hsl(220, 14%, 71%)"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus": {- "background": "hsl(220, 13%, 28%)",- "color": "hsl(220, 14%, 71%)"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover": {- "background": "hsl(220, 13%, 28%)",- "color": "hsl(220, 14%, 71%)"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus": {- "background": "hsl(220, 13%, 28%)",- "color": "hsl(220, 14%, 71%)"- },- ".line-highlight.line-highlight": {- "background": "hsla(220, 100%, 80%, 0.04)"- },- ".line-highlight.line-highlight:before": {- "background": "hsl(220, 13%, 26%)",- "color": "hsl(220, 14%, 71%)",- "padding": "0.1em 0.6em",- "borderRadius": "0.3em",- "boxShadow": "0 2px 0 0 rgba(0, 0, 0, 0.2)"- },- ".line-highlight.line-highlight[data-end]:after": {- "background": "hsl(220, 13%, 26%)",- "color": "hsl(220, 14%, 71%)",- "padding": "0.1em 0.6em",- "borderRadius": "0.3em",- "boxShadow": "0 2px 0 0 rgba(0, 0, 0, 0.2)"- },- "pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before": {- "backgroundColor": "hsla(220, 100%, 80%, 0.04)"- },- ".line-numbers.line-numbers .line-numbers-rows": {- "borderRightColor": "hsla(220, 14%, 71%, 0.15)"- },- ".command-line .command-line-prompt": {- "borderRightColor": "hsla(220, 14%, 71%, 0.15)"- },- ".line-numbers .line-numbers-rows > span:before": {- "color": "hsl(220, 14%, 45%)"- },- ".command-line .command-line-prompt > span:before": {- "color": "hsl(220, 14%, 45%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-1": {- "color": "hsl(355, 65%, 65%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-5": {- "color": "hsl(355, 65%, 65%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-9": {- "color": "hsl(355, 65%, 65%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-2": {- "color": "hsl(95, 38%, 62%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-6": {- "color": "hsl(95, 38%, 62%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-10": {- "color": "hsl(95, 38%, 62%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-3": {- "color": "hsl(207, 82%, 66%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-7": {- "color": "hsl(207, 82%, 66%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-11": {- "color": "hsl(207, 82%, 66%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-4": {- "color": "hsl(286, 60%, 67%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-8": {- "color": "hsl(286, 60%, 67%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-12": {- "color": "hsl(286, 60%, 67%)"- },- "pre.diff-highlight > code .token.token.deleted:not(.prefix)": {- "backgroundColor": "hsla(353, 100%, 66%, 0.15)"- },- "pre > code.diff-highlight .token.token.deleted:not(.prefix)": {- "backgroundColor": "hsla(353, 100%, 66%, 0.15)"- },- "pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection": {- "backgroundColor": "hsla(353, 95%, 66%, 0.25)"- },- "pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection": {- "backgroundColor": "hsla(353, 95%, 66%, 0.25)"- },- "pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection": {- "backgroundColor": "hsla(353, 95%, 66%, 0.25)"- },- "pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection": {- "backgroundColor": "hsla(353, 95%, 66%, 0.25)"- },- "pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection": {- "backgroundColor": "hsla(353, 95%, 66%, 0.25)"- },- "pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection": {- "backgroundColor": "hsla(353, 95%, 66%, 0.25)"- },- "pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection": {- "backgroundColor": "hsla(353, 95%, 66%, 0.25)"- },- "pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection": {- "backgroundColor": "hsla(353, 95%, 66%, 0.25)"- },- "pre.diff-highlight > code .token.token.inserted:not(.prefix)": {- "backgroundColor": "hsla(137, 100%, 55%, 0.15)"- },- "pre > code.diff-highlight .token.token.inserted:not(.prefix)": {- "backgroundColor": "hsla(137, 100%, 55%, 0.15)"- },- "pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection": {- "backgroundColor": "hsla(135, 73%, 55%, 0.25)"- },- "pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection": {- "backgroundColor": "hsla(135, 73%, 55%, 0.25)"- },- "pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection": {- "backgroundColor": "hsla(135, 73%, 55%, 0.25)"- },- "pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection": {- "backgroundColor": "hsla(135, 73%, 55%, 0.25)"- },- "pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection": {- "backgroundColor": "hsla(135, 73%, 55%, 0.25)"- },- "pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection": {- "backgroundColor": "hsla(135, 73%, 55%, 0.25)"- },- "pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection": {- "backgroundColor": "hsla(135, 73%, 55%, 0.25)"- },- "pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection": {- "backgroundColor": "hsla(135, 73%, 55%, 0.25)"- },- ".prism-previewer.prism-previewer:before": {- "borderColor": "hsl(224, 13%, 17%)"- },- ".prism-previewer-gradient.prism-previewer-gradient div": {- "borderColor": "hsl(224, 13%, 17%)",- "borderRadius": "0.3em"- },- ".prism-previewer-color.prism-previewer-color:before": {- "borderRadius": "0.3em"- },- ".prism-previewer-easing.prism-previewer-easing:before": {- "borderRadius": "0.3em"- },- ".prism-previewer.prism-previewer:after": {- "borderTopColor": "hsl(224, 13%, 17%)"- },- ".prism-previewer-flipped.prism-previewer-flipped.after": {- "borderBottomColor": "hsl(224, 13%, 17%)"- },- ".prism-previewer-angle.prism-previewer-angle:before": {- "background": "hsl(219, 13%, 22%)"- },- ".prism-previewer-time.prism-previewer-time:before": {- "background": "hsl(219, 13%, 22%)"- },- ".prism-previewer-easing.prism-previewer-easing": {- "background": "hsl(219, 13%, 22%)"- },- ".prism-previewer-angle.prism-previewer-angle circle": {- "stroke": "hsl(220, 14%, 71%)",- "strokeOpacity": "1"- },- ".prism-previewer-time.prism-previewer-time circle": {- "stroke": "hsl(220, 14%, 71%)",- "strokeOpacity": "1"- },- ".prism-previewer-easing.prism-previewer-easing circle": {- "stroke": "hsl(220, 14%, 71%)",- "fill": "transparent"- },- ".prism-previewer-easing.prism-previewer-easing path": {- "stroke": "hsl(220, 14%, 71%)"- },- ".prism-previewer-easing.prism-previewer-easing line": {- "stroke": "hsl(220, 14%, 71%)"- }-});-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/styles/prism/one-light.js-/* harmony default export */ const one_light = ({- "code[class*=\"language-\"]": {- "background": "hsl(230, 1%, 98%)",- "color": "hsl(230, 8%, 24%)",- "fontFamily": "\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace",- "direction": "ltr",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "lineHeight": "1.5",- "MozTabSize": "2",- "OTabSize": "2",- "tabSize": "2",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none"- },- "pre[class*=\"language-\"]": {- "background": "hsl(230, 1%, 98%)",- "color": "hsl(230, 8%, 24%)",- "fontFamily": "\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace",- "direction": "ltr",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "lineHeight": "1.5",- "MozTabSize": "2",- "OTabSize": "2",- "tabSize": "2",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none",- "padding": "1em",- "margin": "0.5em 0",- "overflow": "auto",- "borderRadius": "0.3em"- },- "code[class*=\"language-\"]::-moz-selection": {- "background": "hsl(230, 1%, 90%)",- "color": "inherit"- },- "code[class*=\"language-\"] *::-moz-selection": {- "background": "hsl(230, 1%, 90%)",- "color": "inherit"- },- "pre[class*=\"language-\"] *::-moz-selection": {- "background": "hsl(230, 1%, 90%)",- "color": "inherit"- },- "code[class*=\"language-\"]::selection": {- "background": "hsl(230, 1%, 90%)",- "color": "inherit"- },- "code[class*=\"language-\"] *::selection": {- "background": "hsl(230, 1%, 90%)",- "color": "inherit"- },- "pre[class*=\"language-\"] *::selection": {- "background": "hsl(230, 1%, 90%)",- "color": "inherit"- },- ":not(pre) > code[class*=\"language-\"]": {- "padding": "0.2em 0.3em",- "borderRadius": "0.3em",- "whiteSpace": "normal"- },- "comment": {- "color": "hsl(230, 4%, 64%)",- "fontStyle": "italic"- },- "prolog": {- "color": "hsl(230, 4%, 64%)"- },- "cdata": {- "color": "hsl(230, 4%, 64%)"- },- "doctype": {- "color": "hsl(230, 8%, 24%)"- },- "punctuation": {- "color": "hsl(230, 8%, 24%)"- },- "entity": {- "color": "hsl(230, 8%, 24%)",- "cursor": "help"- },- "attr-name": {- "color": "hsl(35, 99%, 36%)"- },- "class-name": {- "color": "hsl(35, 99%, 36%)"- },- "boolean": {- "color": "hsl(35, 99%, 36%)"- },- "constant": {- "color": "hsl(35, 99%, 36%)"- },- "number": {- "color": "hsl(35, 99%, 36%)"- },- "atrule": {- "color": "hsl(35, 99%, 36%)"- },- "keyword": {- "color": "hsl(301, 63%, 40%)"- },- "property": {- "color": "hsl(5, 74%, 59%)"- },- "tag": {- "color": "hsl(5, 74%, 59%)"- },- "symbol": {- "color": "hsl(5, 74%, 59%)"- },- "deleted": {- "color": "hsl(5, 74%, 59%)"- },- "important": {- "color": "hsl(5, 74%, 59%)"- },- "selector": {- "color": "hsl(119, 34%, 47%)"- },- "string": {- "color": "hsl(119, 34%, 47%)"- },- "char": {- "color": "hsl(119, 34%, 47%)"- },- "builtin": {- "color": "hsl(119, 34%, 47%)"- },- "inserted": {- "color": "hsl(119, 34%, 47%)"- },- "regex": {- "color": "hsl(119, 34%, 47%)"- },- "attr-value": {- "color": "hsl(119, 34%, 47%)"- },- "attr-value > .token.punctuation": {- "color": "hsl(119, 34%, 47%)"- },- "variable": {- "color": "hsl(221, 87%, 60%)"- },- "operator": {- "color": "hsl(221, 87%, 60%)"- },- "function": {- "color": "hsl(221, 87%, 60%)"- },- "url": {- "color": "hsl(198, 99%, 37%)"- },- "attr-value > .token.punctuation.attr-equals": {- "color": "hsl(230, 8%, 24%)"- },- "special-attr > .token.attr-value > .token.value.css": {- "color": "hsl(230, 8%, 24%)"- },- ".language-css .token.selector": {- "color": "hsl(5, 74%, 59%)"- },- ".language-css .token.property": {- "color": "hsl(230, 8%, 24%)"- },- ".language-css .token.function": {- "color": "hsl(198, 99%, 37%)"- },- ".language-css .token.url > .token.function": {- "color": "hsl(198, 99%, 37%)"- },- ".language-css .token.url > .token.string.url": {- "color": "hsl(119, 34%, 47%)"- },- ".language-css .token.important": {- "color": "hsl(301, 63%, 40%)"- },- ".language-css .token.atrule .token.rule": {- "color": "hsl(301, 63%, 40%)"- },- ".language-javascript .token.operator": {- "color": "hsl(301, 63%, 40%)"- },- ".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation": {- "color": "hsl(344, 84%, 43%)"- },- ".language-json .token.operator": {- "color": "hsl(230, 8%, 24%)"- },- ".language-json .token.null.keyword": {- "color": "hsl(35, 99%, 36%)"- },- ".language-markdown .token.url": {- "color": "hsl(230, 8%, 24%)"- },- ".language-markdown .token.url > .token.operator": {- "color": "hsl(230, 8%, 24%)"- },- ".language-markdown .token.url-reference.url > .token.string": {- "color": "hsl(230, 8%, 24%)"- },- ".language-markdown .token.url > .token.content": {- "color": "hsl(221, 87%, 60%)"- },- ".language-markdown .token.url > .token.url": {- "color": "hsl(198, 99%, 37%)"- },- ".language-markdown .token.url-reference.url": {- "color": "hsl(198, 99%, 37%)"- },- ".language-markdown .token.blockquote.punctuation": {- "color": "hsl(230, 4%, 64%)",- "fontStyle": "italic"- },- ".language-markdown .token.hr.punctuation": {- "color": "hsl(230, 4%, 64%)",- "fontStyle": "italic"- },- ".language-markdown .token.code-snippet": {- "color": "hsl(119, 34%, 47%)"- },- ".language-markdown .token.bold .token.content": {- "color": "hsl(35, 99%, 36%)"- },- ".language-markdown .token.italic .token.content": {- "color": "hsl(301, 63%, 40%)"- },- ".language-markdown .token.strike .token.content": {- "color": "hsl(5, 74%, 59%)"- },- ".language-markdown .token.strike .token.punctuation": {- "color": "hsl(5, 74%, 59%)"- },- ".language-markdown .token.list.punctuation": {- "color": "hsl(5, 74%, 59%)"- },- ".language-markdown .token.title.important > .token.punctuation": {- "color": "hsl(5, 74%, 59%)"- },- "bold": {- "fontWeight": "bold"- },- "italic": {- "fontStyle": "italic"- },- "namespace": {- "Opacity": "0.8"- },- "token.tab:not(:empty):before": {- "color": "hsla(230, 8%, 24%, 0.2)"- },- "token.cr:before": {- "color": "hsla(230, 8%, 24%, 0.2)"- },- "token.lf:before": {- "color": "hsla(230, 8%, 24%, 0.2)"- },- "token.space:before": {- "color": "hsla(230, 8%, 24%, 0.2)"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item": {- "marginRight": "0.4em"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button": {- "background": "hsl(230, 1%, 90%)",- "color": "hsl(230, 6%, 44%)",- "padding": "0.1em 0.4em",- "borderRadius": "0.3em"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a": {- "background": "hsl(230, 1%, 90%)",- "color": "hsl(230, 6%, 44%)",- "padding": "0.1em 0.4em",- "borderRadius": "0.3em"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span": {- "background": "hsl(230, 1%, 90%)",- "color": "hsl(230, 6%, 44%)",- "padding": "0.1em 0.4em",- "borderRadius": "0.3em"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover": {- "background": "hsl(230, 1%, 78%)",- "color": "hsl(230, 8%, 24%)"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus": {- "background": "hsl(230, 1%, 78%)",- "color": "hsl(230, 8%, 24%)"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover": {- "background": "hsl(230, 1%, 78%)",- "color": "hsl(230, 8%, 24%)"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus": {- "background": "hsl(230, 1%, 78%)",- "color": "hsl(230, 8%, 24%)"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover": {- "background": "hsl(230, 1%, 78%)",- "color": "hsl(230, 8%, 24%)"- },- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus": {- "background": "hsl(230, 1%, 78%)",- "color": "hsl(230, 8%, 24%)"- },- ".line-highlight.line-highlight": {- "background": "hsla(230, 8%, 24%, 0.05)"- },- ".line-highlight.line-highlight:before": {- "background": "hsl(230, 1%, 90%)",- "color": "hsl(230, 8%, 24%)",- "padding": "0.1em 0.6em",- "borderRadius": "0.3em",- "boxShadow": "0 2px 0 0 rgba(0, 0, 0, 0.2)"- },- ".line-highlight.line-highlight[data-end]:after": {- "background": "hsl(230, 1%, 90%)",- "color": "hsl(230, 8%, 24%)",- "padding": "0.1em 0.6em",- "borderRadius": "0.3em",- "boxShadow": "0 2px 0 0 rgba(0, 0, 0, 0.2)"- },- "pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before": {- "backgroundColor": "hsla(230, 8%, 24%, 0.05)"- },- ".line-numbers.line-numbers .line-numbers-rows": {- "borderRightColor": "hsla(230, 8%, 24%, 0.2)"- },- ".command-line .command-line-prompt": {- "borderRightColor": "hsla(230, 8%, 24%, 0.2)"- },- ".line-numbers .line-numbers-rows > span:before": {- "color": "hsl(230, 1%, 62%)"- },- ".command-line .command-line-prompt > span:before": {- "color": "hsl(230, 1%, 62%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-1": {- "color": "hsl(5, 74%, 59%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-5": {- "color": "hsl(5, 74%, 59%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-9": {- "color": "hsl(5, 74%, 59%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-2": {- "color": "hsl(119, 34%, 47%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-6": {- "color": "hsl(119, 34%, 47%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-10": {- "color": "hsl(119, 34%, 47%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-3": {- "color": "hsl(221, 87%, 60%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-7": {- "color": "hsl(221, 87%, 60%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-11": {- "color": "hsl(221, 87%, 60%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-4": {- "color": "hsl(301, 63%, 40%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-8": {- "color": "hsl(301, 63%, 40%)"- },- ".rainbow-braces .token.token.punctuation.brace-level-12": {- "color": "hsl(301, 63%, 40%)"- },- "pre.diff-highlight > code .token.token.deleted:not(.prefix)": {- "backgroundColor": "hsla(353, 100%, 66%, 0.15)"- },- "pre > code.diff-highlight .token.token.deleted:not(.prefix)": {- "backgroundColor": "hsla(353, 100%, 66%, 0.15)"- },- "pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection": {- "backgroundColor": "hsla(353, 95%, 66%, 0.25)"- },- "pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection": {- "backgroundColor": "hsla(353, 95%, 66%, 0.25)"- },- "pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection": {- "backgroundColor": "hsla(353, 95%, 66%, 0.25)"- },- "pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection": {- "backgroundColor": "hsla(353, 95%, 66%, 0.25)"- },- "pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection": {- "backgroundColor": "hsla(353, 95%, 66%, 0.25)"- },- "pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection": {- "backgroundColor": "hsla(353, 95%, 66%, 0.25)"- },- "pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection": {- "backgroundColor": "hsla(353, 95%, 66%, 0.25)"- },- "pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection": {- "backgroundColor": "hsla(353, 95%, 66%, 0.25)"- },- "pre.diff-highlight > code .token.token.inserted:not(.prefix)": {- "backgroundColor": "hsla(137, 100%, 55%, 0.15)"- },- "pre > code.diff-highlight .token.token.inserted:not(.prefix)": {- "backgroundColor": "hsla(137, 100%, 55%, 0.15)"- },- "pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection": {- "backgroundColor": "hsla(135, 73%, 55%, 0.25)"- },- "pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection": {- "backgroundColor": "hsla(135, 73%, 55%, 0.25)"- },- "pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection": {- "backgroundColor": "hsla(135, 73%, 55%, 0.25)"- },- "pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection": {- "backgroundColor": "hsla(135, 73%, 55%, 0.25)"- },- "pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection": {- "backgroundColor": "hsla(135, 73%, 55%, 0.25)"- },- "pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection": {- "backgroundColor": "hsla(135, 73%, 55%, 0.25)"- },- "pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection": {- "backgroundColor": "hsla(135, 73%, 55%, 0.25)"- },- "pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection": {- "backgroundColor": "hsla(135, 73%, 55%, 0.25)"- },- ".prism-previewer.prism-previewer:before": {- "borderColor": "hsl(0, 0, 95%)"- },- ".prism-previewer-gradient.prism-previewer-gradient div": {- "borderColor": "hsl(0, 0, 95%)",- "borderRadius": "0.3em"- },- ".prism-previewer-color.prism-previewer-color:before": {- "borderRadius": "0.3em"- },- ".prism-previewer-easing.prism-previewer-easing:before": {- "borderRadius": "0.3em"- },- ".prism-previewer.prism-previewer:after": {- "borderTopColor": "hsl(0, 0, 95%)"- },- ".prism-previewer-flipped.prism-previewer-flipped.after": {- "borderBottomColor": "hsl(0, 0, 95%)"- },- ".prism-previewer-angle.prism-previewer-angle:before": {- "background": "hsl(0, 0%, 100%)"- },- ".prism-previewer-time.prism-previewer-time:before": {- "background": "hsl(0, 0%, 100%)"- },- ".prism-previewer-easing.prism-previewer-easing": {- "background": "hsl(0, 0%, 100%)"- },- ".prism-previewer-angle.prism-previewer-angle circle": {- "stroke": "hsl(230, 8%, 24%)",- "strokeOpacity": "1"- },- ".prism-previewer-time.prism-previewer-time circle": {- "stroke": "hsl(230, 8%, 24%)",- "strokeOpacity": "1"- },- ".prism-previewer-easing.prism-previewer-easing circle": {- "stroke": "hsl(230, 8%, 24%)",- "fill": "transparent"- },- ".prism-previewer-easing.prism-previewer-easing path": {- "stroke": "hsl(230, 8%, 24%)"- },- ".prism-previewer-easing.prism-previewer-easing line": {- "stroke": "hsl(230, 8%, 24%)"- }-});-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/styles/prism/prism.js-/* harmony default export */ const prism_prism = ({- "code[class*=\"language-\"]": {- "color": "black",- "background": "none",- "textShadow": "0 1px white",- "fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",- "fontSize": "1em",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "lineHeight": "1.5",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none"- },- "pre[class*=\"language-\"]": {- "color": "black",- "background": "#f5f2f0",- "textShadow": "0 1px white",- "fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",- "fontSize": "1em",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "lineHeight": "1.5",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none",- "padding": "1em",- "margin": ".5em 0",- "overflow": "auto"- },- "pre[class*=\"language-\"]::-moz-selection": {- "textShadow": "none",- "background": "#b3d4fc"- },- "pre[class*=\"language-\"] ::-moz-selection": {- "textShadow": "none",- "background": "#b3d4fc"- },- "code[class*=\"language-\"]::-moz-selection": {- "textShadow": "none",- "background": "#b3d4fc"- },- "code[class*=\"language-\"] ::-moz-selection": {- "textShadow": "none",- "background": "#b3d4fc"- },- "pre[class*=\"language-\"]::selection": {- "textShadow": "none",- "background": "#b3d4fc"- },- "pre[class*=\"language-\"] ::selection": {- "textShadow": "none",- "background": "#b3d4fc"- },- "code[class*=\"language-\"]::selection": {- "textShadow": "none",- "background": "#b3d4fc"- },- "code[class*=\"language-\"] ::selection": {- "textShadow": "none",- "background": "#b3d4fc"- },- ":not(pre) > code[class*=\"language-\"]": {- "background": "#f5f2f0",- "padding": ".1em",- "borderRadius": ".3em",- "whiteSpace": "normal"- },- "comment": {- "color": "slategray"- },- "prolog": {- "color": "slategray"- },- "doctype": {- "color": "slategray"- },- "cdata": {- "color": "slategray"- },- "punctuation": {- "color": "#999"- },- "namespace": {- "Opacity": ".7"- },- "property": {- "color": "#905"- },- "tag": {- "color": "#905"- },- "boolean": {- "color": "#905"- },- "number": {- "color": "#905"- },- "constant": {- "color": "#905"- },- "symbol": {- "color": "#905"- },- "deleted": {- "color": "#905"- },- "selector": {- "color": "#690"- },- "attr-name": {- "color": "#690"- },- "string": {- "color": "#690"- },- "char": {- "color": "#690"- },- "builtin": {- "color": "#690"- },- "inserted": {- "color": "#690"- },- "operator": {- "color": "#9a6e3a",- "background": "hsla(0, 0%, 100%, .5)"- },- "entity": {- "color": "#9a6e3a",- "background": "hsla(0, 0%, 100%, .5)",- "cursor": "help"- },- "url": {- "color": "#9a6e3a",- "background": "hsla(0, 0%, 100%, .5)"- },- ".language-css .token.string": {- "color": "#9a6e3a",- "background": "hsla(0, 0%, 100%, .5)"- },- ".style .token.string": {- "color": "#9a6e3a",- "background": "hsla(0, 0%, 100%, .5)"- },- "atrule": {- "color": "#07a"- },- "attr-value": {- "color": "#07a"- },- "keyword": {- "color": "#07a"- },- "function": {- "color": "#DD4A68"- },- "class-name": {- "color": "#DD4A68"- },- "regex": {- "color": "#e90"- },- "important": {- "color": "#e90",- "fontWeight": "bold"- },- "variable": {- "color": "#e90"- },- "bold": {- "fontWeight": "bold"- },- "italic": {- "fontStyle": "italic"- }-});-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/styles/prism/material-oceanic.js-/* harmony default export */ const material_oceanic = ({- "code[class*=\"language-\"]": {- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "color": "#c3cee3",- "background": "#263238",- "fontFamily": "Roboto Mono, monospace",- "fontSize": "1em",- "lineHeight": "1.5em",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none"- },- "pre[class*=\"language-\"]": {- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "color": "#c3cee3",- "background": "#263238",- "fontFamily": "Roboto Mono, monospace",- "fontSize": "1em",- "lineHeight": "1.5em",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none",- "overflow": "auto",- "position": "relative",- "margin": "0.5em 0",- "padding": "1.25em 1em"- },- "code[class*=\"language-\"]::-moz-selection": {- "background": "#363636"- },- "pre[class*=\"language-\"]::-moz-selection": {- "background": "#363636"- },- "code[class*=\"language-\"] ::-moz-selection": {- "background": "#363636"- },- "pre[class*=\"language-\"] ::-moz-selection": {- "background": "#363636"- },- "code[class*=\"language-\"]::selection": {- "background": "#363636"- },- "pre[class*=\"language-\"]::selection": {- "background": "#363636"- },- "code[class*=\"language-\"] ::selection": {- "background": "#363636"- },- "pre[class*=\"language-\"] ::selection": {- "background": "#363636"- },- ":not(pre) > code[class*=\"language-\"]": {- "whiteSpace": "normal",- "borderRadius": "0.2em",- "padding": "0.1em"- },- ".language-css > code": {- "color": "#fd9170"- },- ".language-sass > code": {- "color": "#fd9170"- },- ".language-scss > code": {- "color": "#fd9170"- },- "[class*=\"language-\"] .namespace": {- "Opacity": "0.7"- },- "atrule": {- "color": "#c792ea"- },- "attr-name": {- "color": "#ffcb6b"- },- "attr-value": {- "color": "#c3e88d"- },- "attribute": {- "color": "#c3e88d"- },- "boolean": {- "color": "#c792ea"- },- "builtin": {- "color": "#ffcb6b"- },- "cdata": {- "color": "#80cbc4"- },- "char": {- "color": "#80cbc4"- },- "class": {- "color": "#ffcb6b"- },- "class-name": {- "color": "#f2ff00"- },- "color": {- "color": "#f2ff00"- },- "comment": {- "color": "#546e7a"- },- "constant": {- "color": "#c792ea"- },- "deleted": {- "color": "#f07178"- },- "doctype": {- "color": "#546e7a"- },- "entity": {- "color": "#f07178"- },- "function": {- "color": "#c792ea"- },- "hexcode": {- "color": "#f2ff00"- },- "id": {- "color": "#c792ea",- "fontWeight": "bold"- },- "important": {- "color": "#c792ea",- "fontWeight": "bold"- },- "inserted": {- "color": "#80cbc4"- },- "keyword": {- "color": "#c792ea",- "fontStyle": "italic"- },- "number": {- "color": "#fd9170"- },- "operator": {- "color": "#89ddff"- },- "prolog": {- "color": "#546e7a"- },- "property": {- "color": "#80cbc4"- },- "pseudo-class": {- "color": "#c3e88d"- },- "pseudo-element": {- "color": "#c3e88d"- },- "punctuation": {- "color": "#89ddff"- },- "regex": {- "color": "#f2ff00"- },- "selector": {- "color": "#f07178"- },- "string": {- "color": "#c3e88d"- },- "symbol": {- "color": "#c792ea"- },- "tag": {- "color": "#f07178"- },- "unit": {- "color": "#f07178"- },- "url": {- "color": "#fd9170"- },- "variable": {- "color": "#f07178"- }-});-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/styles/prism/material-light.js-/* harmony default export */ const material_light = ({- "code[class*=\"language-\"]": {- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "color": "#90a4ae",- "background": "#fafafa",- "fontFamily": "Roboto Mono, monospace",- "fontSize": "1em",- "lineHeight": "1.5em",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none"- },- "pre[class*=\"language-\"]": {- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "color": "#90a4ae",- "background": "#fafafa",- "fontFamily": "Roboto Mono, monospace",- "fontSize": "1em",- "lineHeight": "1.5em",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none",- "overflow": "auto",- "position": "relative",- "margin": "0.5em 0",- "padding": "1.25em 1em"- },- "code[class*=\"language-\"]::-moz-selection": {- "background": "#cceae7",- "color": "#263238"- },- "pre[class*=\"language-\"]::-moz-selection": {- "background": "#cceae7",- "color": "#263238"- },- "code[class*=\"language-\"] ::-moz-selection": {- "background": "#cceae7",- "color": "#263238"- },- "pre[class*=\"language-\"] ::-moz-selection": {- "background": "#cceae7",- "color": "#263238"- },- "code[class*=\"language-\"]::selection": {- "background": "#cceae7",- "color": "#263238"- },- "pre[class*=\"language-\"]::selection": {- "background": "#cceae7",- "color": "#263238"- },- "code[class*=\"language-\"] ::selection": {- "background": "#cceae7",- "color": "#263238"- },- "pre[class*=\"language-\"] ::selection": {- "background": "#cceae7",- "color": "#263238"- },- ":not(pre) > code[class*=\"language-\"]": {- "whiteSpace": "normal",- "borderRadius": "0.2em",- "padding": "0.1em"- },- ".language-css > code": {- "color": "#f76d47"- },- ".language-sass > code": {- "color": "#f76d47"- },- ".language-scss > code": {- "color": "#f76d47"- },- "[class*=\"language-\"] .namespace": {- "Opacity": "0.7"- },- "atrule": {- "color": "#7c4dff"- },- "attr-name": {- "color": "#39adb5"- },- "attr-value": {- "color": "#f6a434"- },- "attribute": {- "color": "#f6a434"- },- "boolean": {- "color": "#7c4dff"- },- "builtin": {- "color": "#39adb5"- },- "cdata": {- "color": "#39adb5"- },- "char": {- "color": "#39adb5"- },- "class": {- "color": "#39adb5"- },- "class-name": {- "color": "#6182b8"- },- "comment": {- "color": "#aabfc9"- },- "constant": {- "color": "#7c4dff"- },- "deleted": {- "color": "#e53935"- },- "doctype": {- "color": "#aabfc9"- },- "entity": {- "color": "#e53935"- },- "function": {- "color": "#7c4dff"- },- "hexcode": {- "color": "#f76d47"- },- "id": {- "color": "#7c4dff",- "fontWeight": "bold"- },- "important": {- "color": "#7c4dff",- "fontWeight": "bold"- },- "inserted": {- "color": "#39adb5"- },- "keyword": {- "color": "#7c4dff"- },- "number": {- "color": "#f76d47"- },- "operator": {- "color": "#39adb5"- },- "prolog": {- "color": "#aabfc9"- },- "property": {- "color": "#39adb5"- },- "pseudo-class": {- "color": "#f6a434"- },- "pseudo-element": {- "color": "#f6a434"- },- "punctuation": {- "color": "#39adb5"- },- "regex": {- "color": "#6182b8"- },- "selector": {- "color": "#e53935"- },- "string": {- "color": "#f6a434"- },- "symbol": {- "color": "#7c4dff"- },- "tag": {- "color": "#e53935"- },- "unit": {- "color": "#f76d47"- },- "url": {- "color": "#e53935"- },- "variable": {- "color": "#e53935"- }-});-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/styles/prism/material-dark.js-/* harmony default export */ const material_dark = ({- "code[class*=\"language-\"]": {- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "color": "#eee",- "background": "#2f2f2f",- "fontFamily": "Roboto Mono, monospace",- "fontSize": "1em",- "lineHeight": "1.5em",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none"- },- "pre[class*=\"language-\"]": {- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "color": "#eee",- "background": "#2f2f2f",- "fontFamily": "Roboto Mono, monospace",- "fontSize": "1em",- "lineHeight": "1.5em",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none",- "overflow": "auto",- "position": "relative",- "margin": "0.5em 0",- "padding": "1.25em 1em"- },- "code[class*=\"language-\"]::-moz-selection": {- "background": "#363636"- },- "pre[class*=\"language-\"]::-moz-selection": {- "background": "#363636"- },- "code[class*=\"language-\"] ::-moz-selection": {- "background": "#363636"- },- "pre[class*=\"language-\"] ::-moz-selection": {- "background": "#363636"- },- "code[class*=\"language-\"]::selection": {- "background": "#363636"- },- "pre[class*=\"language-\"]::selection": {- "background": "#363636"- },- "code[class*=\"language-\"] ::selection": {- "background": "#363636"- },- "pre[class*=\"language-\"] ::selection": {- "background": "#363636"- },- ":not(pre) > code[class*=\"language-\"]": {- "whiteSpace": "normal",- "borderRadius": "0.2em",- "padding": "0.1em"- },- ".language-css > code": {- "color": "#fd9170"- },- ".language-sass > code": {- "color": "#fd9170"- },- ".language-scss > code": {- "color": "#fd9170"- },- "[class*=\"language-\"] .namespace": {- "Opacity": "0.7"- },- "atrule": {- "color": "#c792ea"- },- "attr-name": {- "color": "#ffcb6b"- },- "attr-value": {- "color": "#a5e844"- },- "attribute": {- "color": "#a5e844"- },- "boolean": {- "color": "#c792ea"- },- "builtin": {- "color": "#ffcb6b"- },- "cdata": {- "color": "#80cbc4"- },- "char": {- "color": "#80cbc4"- },- "class": {- "color": "#ffcb6b"- },- "class-name": {- "color": "#f2ff00"- },- "comment": {- "color": "#616161"- },- "constant": {- "color": "#c792ea"- },- "deleted": {- "color": "#ff6666"- },- "doctype": {- "color": "#616161"- },- "entity": {- "color": "#ff6666"- },- "function": {- "color": "#c792ea"- },- "hexcode": {- "color": "#f2ff00"- },- "id": {- "color": "#c792ea",- "fontWeight": "bold"- },- "important": {- "color": "#c792ea",- "fontWeight": "bold"- },- "inserted": {- "color": "#80cbc4"- },- "keyword": {- "color": "#c792ea"- },- "number": {- "color": "#fd9170"- },- "operator": {- "color": "#89ddff"- },- "prolog": {- "color": "#616161"- },- "property": {- "color": "#80cbc4"- },- "pseudo-class": {- "color": "#a5e844"- },- "pseudo-element": {- "color": "#a5e844"- },- "punctuation": {- "color": "#89ddff"- },- "regex": {- "color": "#f2ff00"- },- "selector": {- "color": "#ff6666"- },- "string": {- "color": "#a5e844"- },- "symbol": {- "color": "#c792ea"- },- "tag": {- "color": "#ff6666"- },- "unit": {- "color": "#fd9170"- },- "url": {- "color": "#ff6666"- },- "variable": {- "color": "#ff6666"- }-});-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/styles/prism/tomorrow.js-/* harmony default export */ const tomorrow = ({- "code[class*=\"language-\"]": {- "color": "#ccc",- "background": "none",- "fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",- "fontSize": "1em",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "lineHeight": "1.5",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none"- },- "pre[class*=\"language-\"]": {- "color": "#ccc",- "background": "#2d2d2d",- "fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",- "fontSize": "1em",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "lineHeight": "1.5",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none",- "padding": "1em",- "margin": ".5em 0",- "overflow": "auto"- },- ":not(pre) > code[class*=\"language-\"]": {- "background": "#2d2d2d",- "padding": ".1em",- "borderRadius": ".3em",- "whiteSpace": "normal"- },- "comment": {- "color": "#999"- },- "block-comment": {- "color": "#999"- },- "prolog": {- "color": "#999"- },- "doctype": {- "color": "#999"- },- "cdata": {- "color": "#999"- },- "punctuation": {- "color": "#ccc"- },- "tag": {- "color": "#e2777a"- },- "attr-name": {- "color": "#e2777a"- },- "namespace": {- "color": "#e2777a"- },- "deleted": {- "color": "#e2777a"- },- "function-name": {- "color": "#6196cc"- },- "boolean": {- "color": "#f08d49"- },- "number": {- "color": "#f08d49"- },- "function": {- "color": "#f08d49"- },- "property": {- "color": "#f8c555"- },- "class-name": {- "color": "#f8c555"- },- "constant": {- "color": "#f8c555"- },- "symbol": {- "color": "#f8c555"- },- "selector": {- "color": "#cc99cd"- },- "important": {- "color": "#cc99cd",- "fontWeight": "bold"- },- "atrule": {- "color": "#cc99cd"- },- "keyword": {- "color": "#cc99cd"- },- "builtin": {- "color": "#cc99cd"- },- "string": {- "color": "#7ec699"- },- "char": {- "color": "#7ec699"- },- "attr-value": {- "color": "#7ec699"- },- "regex": {- "color": "#7ec699"- },- "variable": {- "color": "#7ec699"- },- "operator": {- "color": "#67cdcc"- },- "entity": {- "color": "#67cdcc",- "cursor": "help"- },- "url": {- "color": "#67cdcc"- },- "bold": {- "fontWeight": "bold"- },- "italic": {- "fontStyle": "italic"- },- "inserted": {- "color": "green"- }-});-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/styles/prism/vs.js-/* harmony default export */ const vs = ({- "code[class*=\"language-\"]": {- "color": "#393A34",- "fontFamily": "\"Consolas\", \"Bitstream Vera Sans Mono\", \"Courier New\", Courier, monospace",- "direction": "ltr",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "fontSize": ".9em",- "lineHeight": "1.2em",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none"- },- "pre[class*=\"language-\"]": {- "color": "#393A34",- "fontFamily": "\"Consolas\", \"Bitstream Vera Sans Mono\", \"Courier New\", Courier, monospace",- "direction": "ltr",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "fontSize": ".9em",- "lineHeight": "1.2em",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none",- "padding": "1em",- "margin": ".5em 0",- "overflow": "auto",- "border": "1px solid #dddddd",- "backgroundColor": "white"- },- "pre > code[class*=\"language-\"]": {- "fontSize": "1em"- },- "pre[class*=\"language-\"]::-moz-selection": {- "background": "#C1DEF1"- },- "pre[class*=\"language-\"] ::-moz-selection": {- "background": "#C1DEF1"- },- "code[class*=\"language-\"]::-moz-selection": {- "background": "#C1DEF1"- },- "code[class*=\"language-\"] ::-moz-selection": {- "background": "#C1DEF1"- },- "pre[class*=\"language-\"]::selection": {- "background": "#C1DEF1"- },- "pre[class*=\"language-\"] ::selection": {- "background": "#C1DEF1"- },- "code[class*=\"language-\"]::selection": {- "background": "#C1DEF1"- },- "code[class*=\"language-\"] ::selection": {- "background": "#C1DEF1"- },- ":not(pre) > code[class*=\"language-\"]": {- "padding": ".2em",- "paddingTop": "1px",- "paddingBottom": "1px",- "background": "#f8f8f8",- "border": "1px solid #dddddd"- },- "comment": {- "color": "#008000",- "fontStyle": "italic"- },- "prolog": {- "color": "#008000",- "fontStyle": "italic"- },- "doctype": {- "color": "#008000",- "fontStyle": "italic"- },- "cdata": {- "color": "#008000",- "fontStyle": "italic"- },- "namespace": {- "Opacity": ".7"- },- "string": {- "color": "#A31515"- },- "punctuation": {- "color": "#393A34"- },- "operator": {- "color": "#393A34"- },- "url": {- "color": "#36acaa"- },- "symbol": {- "color": "#36acaa"- },- "number": {- "color": "#36acaa"- },- "boolean": {- "color": "#36acaa"- },- "variable": {- "color": "#36acaa"- },- "constant": {- "color": "#36acaa"- },- "inserted": {- "color": "#36acaa"- },- "atrule": {- "color": "#0000ff"- },- "keyword": {- "color": "#0000ff"- },- "attr-value": {- "color": "#0000ff"- },- ".language-autohotkey .token.selector": {- "color": "#0000ff"- },- ".language-json .token.boolean": {- "color": "#0000ff"- },- ".language-json .token.number": {- "color": "#0000ff"- },- "code[class*=\"language-css\"]": {- "color": "#0000ff"- },- "function": {- "color": "#393A34"- },- "deleted": {- "color": "#9a050f"- },- ".language-autohotkey .token.tag": {- "color": "#9a050f"- },- "selector": {- "color": "#800000"- },- ".language-autohotkey .token.keyword": {- "color": "#00009f"- },- "important": {- "color": "#e90",- "fontWeight": "bold"- },- "bold": {- "fontWeight": "bold"- },- "italic": {- "fontStyle": "italic"- },- "class-name": {- "color": "#2B91AF"- },- ".language-json .token.property": {- "color": "#2B91AF"- },- "tag": {- "color": "#800000"- },- "attr-name": {- "color": "#ff0000"- },- "property": {- "color": "#ff0000"- },- "regex": {- "color": "#ff0000"- },- "entity": {- "color": "#ff0000"- },- "directive.tag.tag": {- "background": "#ffff00",- "color": "#393A34"- },- ".line-numbers.line-numbers .line-numbers-rows": {- "borderRightColor": "#a5a5a5"- },- ".line-numbers .line-numbers-rows > span:before": {- "color": "#2B91AF"- },- ".line-highlight.line-highlight": {- "background": "linear-gradient(to right, rgba(193, 222, 241, 0.2) 70%, rgba(221, 222, 241, 0))"- }-});-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/styles/prism/okaidia.js-/* harmony default export */ const okaidia = ({- "code[class*=\"language-\"]": {- "color": "#f8f8f2",- "background": "none",- "textShadow": "0 1px rgba(0, 0, 0, 0.3)",- "fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",- "fontSize": "1em",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "lineHeight": "1.5",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none"- },- "pre[class*=\"language-\"]": {- "color": "#f8f8f2",- "background": "#272822",- "textShadow": "0 1px rgba(0, 0, 0, 0.3)",- "fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",- "fontSize": "1em",- "textAlign": "left",- "whiteSpace": "pre",- "wordSpacing": "normal",- "wordBreak": "normal",- "wordWrap": "normal",- "lineHeight": "1.5",- "MozTabSize": "4",- "OTabSize": "4",- "tabSize": "4",- "WebkitHyphens": "none",- "MozHyphens": "none",- "msHyphens": "none",- "hyphens": "none",- "padding": "1em",- "margin": ".5em 0",- "overflow": "auto",- "borderRadius": "0.3em"- },- ":not(pre) > code[class*=\"language-\"]": {- "background": "#272822",- "padding": ".1em",- "borderRadius": ".3em",- "whiteSpace": "normal"- },- "comment": {- "color": "#8292a2"- },- "prolog": {- "color": "#8292a2"- },- "doctype": {- "color": "#8292a2"- },- "cdata": {- "color": "#8292a2"- },- "punctuation": {- "color": "#f8f8f2"- },- "namespace": {- "Opacity": ".7"- },- "property": {- "color": "#f92672"- },- "tag": {- "color": "#f92672"- },- "constant": {- "color": "#f92672"- },- "symbol": {- "color": "#f92672"- },- "deleted": {- "color": "#f92672"- },- "boolean": {- "color": "#ae81ff"- },- "number": {- "color": "#ae81ff"- },- "selector": {- "color": "#a6e22e"- },- "attr-name": {- "color": "#a6e22e"- },- "string": {- "color": "#a6e22e"- },- "char": {- "color": "#a6e22e"- },- "builtin": {- "color": "#a6e22e"- },- "inserted": {- "color": "#a6e22e"- },- "operator": {- "color": "#f8f8f2"- },- "entity": {- "color": "#f8f8f2",- "cursor": "help"- },- "url": {- "color": "#f8f8f2"- },- ".language-css .token.string": {- "color": "#f8f8f2"- },- ".style .token.string": {- "color": "#f8f8f2"- },- "variable": {- "color": "#f8f8f2"- },- "atrule": {- "color": "#e6db74"- },- "attr-value": {- "color": "#e6db74"- },- "function": {- "color": "#e6db74"- },- "class-name": {- "color": "#e6db74"- },- "keyword": {- "color": "#66d9ef"- },- "regex": {- "color": "#fd971f"- },- "important": {- "color": "#fd971f",- "fontWeight": "bold"- },- "bold": {- "fontWeight": "bold"- },- "italic": {- "fontStyle": "italic"- }-});-;// CONCATENATED MODULE: ./src/constants.js-var _import$meta$env, _import$meta$env2;---// supported request methods-var REQUEST_METHODS = (/* unused pure expression or super */ null && (["get", "post", "put", "patch", "delete", "head", "options", "trace"]));-var REQUEST_CONTENT_TYPES = {- formData: "application/x-www-form-urlencoded",- formDataWithFile: "multipart/form-data",- json: "application/json"-};-var ERROR_MESSAGES = {- GENERIC_ERROR: "Sorry, I was unable to process your request.",- SOMETHING_WRONG: "Something went wrong. Please try again later.",- CONNECTION_FAILED: "Connection failed. Please try again later."-};-var PLUGIN_URL = "";-var constants_API_URL = ((_import$meta$env = /* unsupported import.meta.env */ undefined) === null || _import$meta$env === void 0 ? void 0 : _import$meta$env.VITE_API_URL) || "";-var SYNTAX_HIGHLIGHT_THEMES = [{- name: "twilight",- value: twilight-}, {- name: "dark",- value: dark-}, {- name: "atomDark",- value: atom_dark-}, {- name: "darcula",- value: darcula-}, {- name: "coy",- value: coy-}, {- name: "oneDark",- value: one_dark,- isDefault: true-}, {- name: "oneLight",- value: one_light-}, {- name: "prism",- value: prism_prism-}, {- name: "materialOceanic",- value: material_oceanic-}, {- name: "materialLight",- value: material_light-}, {- name: "materialDark",- value: material_dark-}, {- name: "tomorrow",- value: tomorrow-}, {- name: "vs",- value: vs-}, {- name: "okaidia",- value: okaidia-}];-var AUTH_METHODS = {- API_KEY: "api-key-bearer",- OAUTH: "oauth-oidc"-};-var DEFAULT_CHATBOT_CONTAINER_ID = "smyth-chatbot";-var EMBODIMENT_PORT = ((_import$meta$env2 = /* unsupported import.meta.env */ undefined) === null || _import$meta$env2 === void 0 ? void 0 : _import$meta$env2.VITE_EMBODIMENT_PORT) || 3001;-;// CONCATENATED MODULE: ./src/services/api.js-function api_typeof(o) { "@babel/helpers - typeof"; return api_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, api_typeof(o); }-function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == api_typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(api_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }-function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }-function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }-/* eslint-disable no-undef */---var getPluginManifest = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(domain, headers) {- var normalizedDomain, _yield$axios$get, data;- return _regeneratorRuntime().wrap(function _callee$(_context) {- while (1) switch (_context.prev = _context.next) {- case 0:- // remove forward slash from the end of the domain- // domain = domain ? domain.replace(/\/$/, "") : null;- // Normalize the domain to always include https protocol if not present- normalizedDomain = domain && !domain.startsWith("http://") && !domain.startsWith("https://") ? "https://".concat(domain) : domain;- _context.prev = 1;- _context.next = 4;- return axios.get("".concat(normalizedDomain || API_URL, "/chatbot/chat-configs"), {- headers: headers- });- case 4:- _yield$axios$get = _context.sent;- data = _yield$axios$get.data;- return _context.abrupt("return", data);- case 9:- _context.prev = 9;- _context.t0 = _context["catch"](1);- return _context.abrupt("return", domain);- case 12:- case "end":- return _context.stop();- }- }, _callee, null, [[1, 9]]);- }));- return function getPluginManifest(_x, _x2) {- return _ref.apply(this, arguments);- };-}()));-var getPort = function getPort(port) {- var _window, _window2;- var host = (_window = window) === null || _window === void 0 || (_window = _window.location) === null || _window === void 0 ? void 0 : _window.host;- var defaultPort = EMBODIMENT_PORT;- if (host.includes("localhost")) {- // when running this app directly for development- return port || defaultPort;- }- return port || ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.location) === null || _window2 === void 0 ? void 0 : _window2.port) || defaultPort;-};-var getNormalizedDomain = function getNormalizedDomain(domain, port) {- return domain && !domain.startsWith("http://") && !domain.startsWith("https://") ? domain.includes("localhost") || domain.includes("localagent") ? "http://".concat(domain, ":").concat(getPort(port)) : "https://".concat(domain) : domain;-};-;// CONCATENATED MODULE: ./src/services/openai-helper.js-function openai_helper_typeof(o) { "@babel/helpers - typeof"; return openai_helper_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, openai_helper_typeof(o); }-function openai_helper_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ openai_helper_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == openai_helper_typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(openai_helper_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }-function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }-function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }-function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }-function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return openai_helper_typeof(key) === "symbol" ? key : String(key); }-function _toPrimitive(input, hint) { if (openai_helper_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (openai_helper_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }-function openai_helper_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }-function openai_helper_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { openai_helper_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { openai_helper_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }---function callOpenAi(_x) {- return _callOpenAi.apply(this, arguments);-}-function _callOpenAi() {- _callOpenAi = openai_helper_asyncToGenerator( /*#__PURE__*/openai_helper_regeneratorRuntime().mark(function _callee(_ref) {- var message, domain, headers, signal, port, params, authToken, requestHeaders, response, newToken;- return openai_helper_regeneratorRuntime().wrap(function _callee$(_context) {- while (1) switch (_context.prev = _context.next) {- case 0:- message = _ref.message, domain = _ref.domain, headers = _ref.headers, signal = _ref.signal, port = _ref.port;- _context.prev = 1;- params = {- message: message- }; // Get the auth token from localStorage- authToken = localStorage.getItem("authToken"); // Prepare headers- console.log("window._smyth_req_headers", window._smyth_req_headers);- requestHeaders = _objectSpread(_objectSpread({- "Content-Type": "application/json"- }, window._smyth_req_headers || {}), headers); // Add the auth token to headers if it exists- if (authToken) {- requestHeaders["X-Auth-Token"] = authToken;- }- _context.prev = 7;- _context.next = 10;- return fetch("".concat(getNormalizedDomain(domain, port) || constants_API_URL, "/chatbot/chat-stream"), {- method: "POST",- credentials: "include",- headers: requestHeaders,- body: JSON.stringify(params),- signal: signal- });- case 10:- response = _context.sent;- // Check for and store new auth token from response headers- newToken = response.headers.get("x-auth-token");- if (newToken) {- localStorage.setItem("authToken", newToken);- }- return _context.abrupt("return", response);- case 16:- _context.prev = 16;- _context.t0 = _context["catch"](7);- if (!(_context.t0.name === "AbortError")) {- _context.next = 21;- break;- }- console.log("Request was aborted");- throw _context.t0;- case 21:- throw new Error(_context.t0);- case 22:- _context.next = 27;- break;- case 24:- _context.prev = 24;- _context.t1 = _context["catch"](1);- return _context.abrupt("return", null);- case 27:- case "end":- return _context.stop();- }- }, _callee, null, [[1, 24], [7, 16]]);- }));- return _callOpenAi.apply(this, arguments);-}-// EXTERNAL MODULE: ./node_modules/is-buffer/index.js-var is_buffer = __webpack_require__(738);-;// CONCATENATED MODULE: ./node_modules/unist-util-stringify-position/lib/index.js-/**- * @typedef {import('unist').Node} Node- * @typedef {import('unist').Point} Point- * @typedef {import('unist').Position} Position- */--/**- * @typedef NodeLike- * @property {string} type- * @property {PositionLike | null | undefined} [position]- *- * @typedef PositionLike- * @property {PointLike | null | undefined} [start]- * @property {PointLike | null | undefined} [end]- *- * @typedef PointLike- * @property {number | null | undefined} [line]- * @property {number | null | undefined} [column]- * @property {number | null | undefined} [offset]- */--/**- * Serialize the positional info of a point, position (start and end points),- * or node.- *- * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value]- * Node, position, or point.- * @returns {string}- * Pretty printed positional info of a node (`string`).- *- * In the format of a range `ls:cs-le:ce` (when given `node` or `position`)- * or a point `l:c` (when given `point`), where `l` stands for line, `c` for- * column, `s` for `start`, and `e` for end.- * An empty string (`''`) is returned if the given value is neither `node`,- * `position`, nor `point`.- */-function stringifyPosition(value) {- // Nothing.- if (!value || typeof value !== 'object') {- return ''- }-- // Node.- if ('position' in value || 'type' in value) {- return position(value.position)- }-- // Position.- if ('start' in value || 'end' in value) {- return position(value)- }-- // Point.- if ('line' in value || 'column' in value) {- return point(value)- }-- // ?- return ''-}--/**- * @param {Point | PointLike | null | undefined} point- * @returns {string}- */-function point(point) {- return index(point && point.line) + ':' + index(point && point.column)-}--/**- * @param {Position | PositionLike | null | undefined} pos- * @returns {string}- */-function position(pos) {- return point(pos && pos.start) + '-' + point(pos && pos.end)-}--/**- * @param {number | null | undefined} value- * @returns {number}- */-function index(value) {- return value && typeof value === 'number' ? value : 1-}--;// CONCATENATED MODULE: ./node_modules/vfile-message/lib/index.js-/**- * @typedef {import('unist').Node} Node- * @typedef {import('unist').Position} Position- * @typedef {import('unist').Point} Point- * @typedef {object & {type: string, position?: Position | undefined}} NodeLike- */----/**- * Message.- */-class VFileMessage extends Error {- /**- * Create a message for `reason` at `place` from `origin`.- *- * When an error is passed in as `reason`, the `stack` is copied.- *- * @param {string | Error | VFileMessage} reason- * Reason for message, uses the stack and message of the error if given.- *- * > 👉 **Note**: you should use markdown.- * @param {Node | NodeLike | Position | Point | null | undefined} [place]- * Place in file where the message occurred.- * @param {string | null | undefined} [origin]- * Place in code where the message originates (example:- * `'my-package:my-rule'` or `'my-rule'`).- * @returns- * Instance of `VFileMessage`.- */- // To do: next major: expose `undefined` everywhere instead of `null`.- constructor(reason, place, origin) {- /** @type {[string | null, string | null]} */- const parts = [null, null]- /** @type {Position} */- let position = {- // @ts-expect-error: we always follows the structure of `position`.- start: {line: null, column: null},- // @ts-expect-error: "- end: {line: null, column: null}- }-- super()-- if (typeof place === 'string') {- origin = place- place = undefined- }-- if (typeof origin === 'string') {- const index = origin.indexOf(':')-- if (index === -1) {- parts[1] = origin- } else {- parts[0] = origin.slice(0, index)- parts[1] = origin.slice(index + 1)- }- }-- if (place) {- // Node.- if ('type' in place || 'position' in place) {- if (place.position) {- // To do: next major: deep clone.- // @ts-expect-error: looks like a position.- position = place.position- }- }- // Position.- else if ('start' in place || 'end' in place) {- // @ts-expect-error: looks like a position.- // To do: next major: deep clone.- position = place- }- // Point.- else if ('line' in place || 'column' in place) {- // To do: next major: deep clone.- position.start = place- }- }-- // Fields from `Error`.- /**- * Serialized positional info of error.- *- * On normal errors, this would be something like `ParseError`, buit in- * `VFile` messages we use this space to show where an error happened.- */- this.name = stringifyPosition(place) || '1:1'-- /**- * Reason for message.- *- * @type {string}- */- this.message = typeof reason === 'object' ? reason.message : reason-- /**- * Stack of message.- *- * This is used by normal errors to show where something happened in- * programming code, irrelevant for `VFile` messages,- *- * @type {string}- */- this.stack = ''-- if (typeof reason === 'object' && reason.stack) {- this.stack = reason.stack- }-- /**- * Reason for message.- *- * > 👉 **Note**: you should use markdown.- *- * @type {string}- */- this.reason = this.message-- /* eslint-disable no-unused-expressions */- /**- * State of problem.- *- * * `true` — marks associated file as no longer processable (error)- * * `false` — necessitates a (potential) change (warning)- * * `null | undefined` — for things that might not need changing (info)- *- * @type {boolean | null | undefined}- */- this.fatal-- /**- * Starting line of error.- *- * @type {number | null}- */- this.line = position.start.line-- /**- * Starting column of error.- *- * @type {number | null}- */- this.column = position.start.column-- /**- * Full unist position.- *- * @type {Position | null}- */- this.position = position-- /**- * Namespace of message (example: `'my-package'`).- *- * @type {string | null}- */- this.source = parts[0]-- /**- * Category of message (example: `'my-rule'`).- *- * @type {string | null}- */- this.ruleId = parts[1]-- /**- * Path of a file (used throughout the `VFile` ecosystem).- *- * @type {string | null}- */- this.file-- // The following fields are “well known”.- // Not standard.- // Feel free to add other non-standard fields to your messages.-- /**- * Specify the source value that’s being reported, which is deemed- * incorrect.- *- * @type {string | null}- */- this.actual-- /**- * Suggest acceptable values that can be used instead of `actual`.- *- * @type {Array<string> | null}- */- this.expected-- /**- * Link to docs for the message.- *- * > 👉 **Note**: this must be an absolute URL that can be passed as `x`- * > to `new URL(x)`.- *- * @type {string | null}- */- this.url-- /**- * Long form description of the message (you should use markdown).- *- * @type {string | null}- */- this.note- /* eslint-enable no-unused-expressions */- }-}--VFileMessage.prototype.file = ''-VFileMessage.prototype.name = ''-VFileMessage.prototype.reason = ''-VFileMessage.prototype.message = ''-VFileMessage.prototype.stack = ''-VFileMessage.prototype.fatal = null-VFileMessage.prototype.column = null-VFileMessage.prototype.line = null-VFileMessage.prototype.source = null-VFileMessage.prototype.ruleId = null-VFileMessage.prototype.position = null--;// CONCATENATED MODULE: ./node_modules/vfile/lib/minpath.browser.js-// A derivative work based on:-// <https://github.com/browserify/path-browserify>.-// Which is licensed:-//-// MIT License-//-// Copyright (c) 2013 James Halliday-//-// Permission is hereby granted, free of charge, to any person obtaining a copy of-// this software and associated documentation files (the "Software"), to deal in-// the Software without restriction, including without limitation the rights to-// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of-// the Software, and to permit persons to whom the Software is furnished to do so,-// subject to the following conditions:-//-// The above copyright notice and this permission notice shall be included in all-// copies or substantial portions of the Software.-//-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS-// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR-// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER-// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN-// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.-// A derivative work based on:-//-// Parts of that are extracted from Node’s internal `path` module:-// <https://github.com/nodejs/node/blob/master/lib/path.js>.-// Which is licensed:-//-// Copyright Joyent, Inc. and other Node contributors.-//-// Permission is hereby granted, free of charge, to any person obtaining a-// copy of this software and associated documentation files (the-// "Software"), to deal in the Software without restriction, including-// without limitation the rights to use, copy, modify, merge, publish,-// distribute, sublicense, and/or sell copies of the Software, and to permit-// persons to whom the Software is furnished to do so, subject to the-// following conditions:-//-// The above copyright notice and this permission notice shall be included-// in all copies or substantial portions of the Software.-//-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE-// USE OR OTHER DEALINGS IN THE SOFTWARE.--const path = {basename, dirname, extname, join, sep: '/'}--/* eslint-disable max-depth, complexity */--/**- * Get the basename from a path.- *- * @param {string} path- * File path.- * @param {string | undefined} [ext]- * Extension to strip.- * @returns {string}- * Stem or basename.- */-function basename(path, ext) {- if (ext !== undefined && typeof ext !== 'string') {- throw new TypeError('"ext" argument must be a string')- }-- assertPath(path)- let start = 0- let end = -1- let index = path.length- /** @type {boolean | undefined} */- let seenNonSlash-- if (ext === undefined || ext.length === 0 || ext.length > path.length) {- while (index--) {- if (path.charCodeAt(index) === 47 /* `/` */) {- // If we reached a path separator that was not part of a set of path- // separators at the end of the string, stop now.- if (seenNonSlash) {- start = index + 1- break- }- } else if (end < 0) {- // We saw the first non-path separator, mark this as the end of our- // path component.- seenNonSlash = true- end = index + 1- }- }-- return end < 0 ? '' : path.slice(start, end)- }-- if (ext === path) {- return ''- }-- let firstNonSlashEnd = -1- let extIndex = ext.length - 1-- while (index--) {- if (path.charCodeAt(index) === 47 /* `/` */) {- // If we reached a path separator that was not part of a set of path- // separators at the end of the string, stop now.- if (seenNonSlash) {- start = index + 1- break- }- } else {- if (firstNonSlashEnd < 0) {- // We saw the first non-path separator, remember this index in case- // we need it if the extension ends up not matching.- seenNonSlash = true- firstNonSlashEnd = index + 1- }-- if (extIndex > -1) {- // Try to match the explicit extension.- if (path.charCodeAt(index) === ext.charCodeAt(extIndex--)) {- if (extIndex < 0) {- // We matched the extension, so mark this as the end of our path- // component- end = index- }- } else {- // Extension does not match, so our result is the entire path- // component- extIndex = -1- end = firstNonSlashEnd- }- }- }- }-- if (start === end) {- end = firstNonSlashEnd- } else if (end < 0) {- end = path.length- }-- return path.slice(start, end)-}--/**- * Get the dirname from a path.- *- * @param {string} path- * File path.- * @returns {string}- * File path.- */-function dirname(path) {- assertPath(path)-- if (path.length === 0) {- return '.'- }-- let end = -1- let index = path.length- /** @type {boolean | undefined} */- let unmatchedSlash-- // Prefix `--` is important to not run on `0`.- while (--index) {- if (path.charCodeAt(index) === 47 /* `/` */) {- if (unmatchedSlash) {- end = index- break- }- } else if (!unmatchedSlash) {- // We saw the first non-path separator- unmatchedSlash = true- }- }-- return end < 0- ? path.charCodeAt(0) === 47 /* `/` */- ? '/'- : '.'- : end === 1 && path.charCodeAt(0) === 47 /* `/` */- ? '//'- : path.slice(0, end)-}--/**- * Get an extname from a path.- *- * @param {string} path- * File path.- * @returns {string}- * Extname.- */-function extname(path) {- assertPath(path)-- let index = path.length-- let end = -1- let startPart = 0- let startDot = -1- // Track the state of characters (if any) we see before our first dot and- // after any path separator we find.- let preDotState = 0- /** @type {boolean | undefined} */- let unmatchedSlash-- while (index--) {- const code = path.charCodeAt(index)-- if (code === 47 /* `/` */) {- // If we reached a path separator that was not part of a set of path- // separators at the end of the string, stop now.- if (unmatchedSlash) {- startPart = index + 1- break- }-- continue- }-- if (end < 0) {- // We saw the first non-path separator, mark this as the end of our- // extension.- unmatchedSlash = true- end = index + 1- }-- if (code === 46 /* `.` */) {- // If this is our first dot, mark it as the start of our extension.- if (startDot < 0) {- startDot = index- } else if (preDotState !== 1) {- preDotState = 1- }- } else if (startDot > -1) {- // We saw a non-dot and non-path separator before our dot, so we should- // have a good chance at having a non-empty extension.- preDotState = -1- }- }-- if (- startDot < 0 ||- end < 0 ||- // We saw a non-dot character immediately before the dot.- preDotState === 0 ||- // The (right-most) trimmed path component is exactly `..`.- (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)- ) {- return ''- }-- return path.slice(startDot, end)-}--/**- * Join segments from a path.- *- * @param {Array<string>} segments- * Path segments.- * @returns {string}- * File path.- */-function join(...segments) {- let index = -1- /** @type {string | undefined} */- let joined-- while (++index < segments.length) {- assertPath(segments[index])-- if (segments[index]) {- joined =- joined === undefined ? segments[index] : joined + '/' + segments[index]- }- }-- return joined === undefined ? '.' : normalize(joined)-}--/**- * Normalize a basic file path.- *- * @param {string} path- * File path.- * @returns {string}- * File path.- */-// Note: `normalize` is not exposed as `path.normalize`, so some code is-// manually removed from it.-function normalize(path) {- assertPath(path)-- const absolute = path.charCodeAt(0) === 47 /* `/` */-- // Normalize the path according to POSIX rules.- let value = normalizeString(path, !absolute)-- if (value.length === 0 && !absolute) {- value = '.'- }-- if (value.length > 0 && path.charCodeAt(path.length - 1) === 47 /* / */) {- value += '/'- }-- return absolute ? '/' + value : value-}--/**- * Resolve `.` and `..` elements in a path with directory names.- *- * @param {string} path- * File path.- * @param {boolean} allowAboveRoot- * Whether `..` can move above root.- * @returns {string}- * File path.- */-function normalizeString(path, allowAboveRoot) {- let result = ''- let lastSegmentLength = 0- let lastSlash = -1- let dots = 0- let index = -1- /** @type {number | undefined} */- let code- /** @type {number} */- let lastSlashIndex-- while (++index <= path.length) {- if (index < path.length) {- code = path.charCodeAt(index)- } else if (code === 47 /* `/` */) {- break- } else {- code = 47 /* `/` */- }-- if (code === 47 /* `/` */) {- if (lastSlash === index - 1 || dots === 1) {- // Empty.- } else if (lastSlash !== index - 1 && dots === 2) {- if (- result.length < 2 ||- lastSegmentLength !== 2 ||- result.charCodeAt(result.length - 1) !== 46 /* `.` */ ||- result.charCodeAt(result.length - 2) !== 46 /* `.` */- ) {- if (result.length > 2) {- lastSlashIndex = result.lastIndexOf('/')-- if (lastSlashIndex !== result.length - 1) {- if (lastSlashIndex < 0) {- result = ''- lastSegmentLength = 0- } else {- result = result.slice(0, lastSlashIndex)- lastSegmentLength = result.length - 1 - result.lastIndexOf('/')- }-- lastSlash = index- dots = 0- continue- }- } else if (result.length > 0) {- result = ''- lastSegmentLength = 0- lastSlash = index- dots = 0- continue- }- }-- if (allowAboveRoot) {- result = result.length > 0 ? result + '/..' : '..'- lastSegmentLength = 2- }- } else {- if (result.length > 0) {- result += '/' + path.slice(lastSlash + 1, index)- } else {- result = path.slice(lastSlash + 1, index)- }-- lastSegmentLength = index - lastSlash - 1- }-- lastSlash = index- dots = 0- } else if (code === 46 /* `.` */ && dots > -1) {- dots++- } else {- dots = -1- }- }-- return result-}--/**- * Make sure `path` is a string.- *- * @param {string} path- * File path.- * @returns {asserts path is string}- * Nothing.- */-function assertPath(path) {- if (typeof path !== 'string') {- throw new TypeError(- 'Path must be a string. Received ' + JSON.stringify(path)- )- }-}--/* eslint-enable max-depth, complexity */--;// CONCATENATED MODULE: ./node_modules/vfile/lib/minproc.browser.js-// Somewhat based on:-// <https://github.com/defunctzombie/node-process/blob/master/browser.js>.-// But I don’t think one tiny line of code can be copyrighted. 😅-const proc = {cwd}--function cwd() {- return '/'-}--;// CONCATENATED MODULE: ./node_modules/vfile/lib/minurl.shared.js-/**- * @typedef URL- * @property {string} hash- * @property {string} host- * @property {string} hostname- * @property {string} href- * @property {string} origin- * @property {string} password- * @property {string} pathname- * @property {string} port- * @property {string} protocol- * @property {string} search- * @property {any} searchParams- * @property {string} username- * @property {() => string} toString- * @property {() => string} toJSON- */--/**- * Check if `fileUrlOrPath` looks like a URL.- *- * @param {unknown} fileUrlOrPath- * File path or URL.- * @returns {fileUrlOrPath is URL}- * Whether it’s a URL.- */-// From: <https://github.com/nodejs/node/blob/fcf8ba4/lib/internal/url.js#L1501>-function isUrl(fileUrlOrPath) {- return (- fileUrlOrPath !== null &&- typeof fileUrlOrPath === 'object' &&- // @ts-expect-error: indexable.- fileUrlOrPath.href &&- // @ts-expect-error: indexable.- fileUrlOrPath.origin- )-}--;// CONCATENATED MODULE: ./node_modules/vfile/lib/minurl.browser.js-/// <reference lib="dom" />----// See: <https://github.com/nodejs/node/blob/fcf8ba4/lib/internal/url.js>--/**- * @param {string | URL} path- * File URL.- * @returns {string}- * File URL.- */-function urlToPath(path) {- if (typeof path === 'string') {- path = new URL(path)- } else if (!isUrl(path)) {- /** @type {NodeJS.ErrnoException} */- const error = new TypeError(- 'The "path" argument must be of type string or an instance of URL. Received `' +- path +- '`'- )- error.code = 'ERR_INVALID_ARG_TYPE'- throw error- }-- if (path.protocol !== 'file:') {- /** @type {NodeJS.ErrnoException} */- const error = new TypeError('The URL must be of scheme file')- error.code = 'ERR_INVALID_URL_SCHEME'- throw error- }-- return getPathFromURLPosix(path)-}--/**- * Get a path from a POSIX URL.- *- * @param {URL} url- * URL.- * @returns {string}- * File path.- */-function getPathFromURLPosix(url) {- if (url.hostname !== '') {- /** @type {NodeJS.ErrnoException} */- const error = new TypeError(- 'File URL host must be "localhost" or empty on darwin'- )- error.code = 'ERR_INVALID_FILE_URL_HOST'- throw error- }-- const pathname = url.pathname- let index = -1-- while (++index < pathname.length) {- if (- pathname.charCodeAt(index) === 37 /* `%` */ &&- pathname.charCodeAt(index + 1) === 50 /* `2` */- ) {- const third = pathname.charCodeAt(index + 2)- if (third === 70 /* `F` */ || third === 102 /* `f` */) {- /** @type {NodeJS.ErrnoException} */- const error = new TypeError(- 'File URL path must not include encoded / characters'- )- error.code = 'ERR_INVALID_FILE_URL_PATH'- throw error- }- }- }-- return decodeURIComponent(pathname)-}----;// CONCATENATED MODULE: ./node_modules/vfile/lib/index.js-/**- * @typedef {import('unist').Node} Node- * @typedef {import('unist').Position} Position- * @typedef {import('unist').Point} Point- * @typedef {import('./minurl.shared.js').URL} URL- * @typedef {import('../index.js').Data} Data- * @typedef {import('../index.js').Value} Value- */--/**- * @typedef {Record<string, unknown> & {type: string, position?: Position | undefined}} NodeLike- *- * @typedef {'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex'} BufferEncoding- * Encodings supported by the buffer class.- *- * This is a copy of the types from Node, copied to prevent Node globals from- * being needed.- * Copied from: <https://github.com/DefinitelyTyped/DefinitelyTyped/blob/90a4ec8/types/node/buffer.d.ts#L170>- *- * @typedef {Options | URL | Value | VFile} Compatible- * Things that can be passed to the constructor.- *- * @typedef VFileCoreOptions- * Set multiple values.- * @property {Value | null | undefined} [value]- * Set `value`.- * @property {string | null | undefined} [cwd]- * Set `cwd`.- * @property {Array<string> | null | undefined} [history]- * Set `history`.- * @property {URL | string | null | undefined} [path]- * Set `path`.- * @property {string | null | undefined} [basename]- * Set `basename`.- * @property {string | null | undefined} [stem]- * Set `stem`.- * @property {string | null | undefined} [extname]- * Set `extname`.- * @property {string | null | undefined} [dirname]- * Set `dirname`.- * @property {Data | null | undefined} [data]- * Set `data`.- *- * @typedef Map- * Raw source map.- *- * See:- * <https://github.com/mozilla/source-map/blob/58819f0/source-map.d.ts#L15-L23>.- * @property {number} version- * Which version of the source map spec this map is following.- * @property {Array<string>} sources- * An array of URLs to the original source files.- * @property {Array<string>} names- * An array of identifiers which can be referenced by individual mappings.- * @property {string | undefined} [sourceRoot]- * The URL root from which all sources are relative.- * @property {Array<string> | undefined} [sourcesContent]- * An array of contents of the original source files.- * @property {string} mappings- * A string of base64 VLQs which contain the actual mappings.- * @property {string} file- * The generated file this source map is associated with.- *- * @typedef {{[key: string]: unknown} & VFileCoreOptions} Options- * Configuration.- *- * A bunch of keys that will be shallow copied over to the new file.- *- * @typedef {Record<string, unknown>} ReporterSettings- * Configuration for reporters.- */--/**- * @template {ReporterSettings} Settings- * Options type.- * @callback Reporter- * Type for a reporter.- * @param {Array<VFile>} files- * Files to report.- * @param {Settings} options- * Configuration.- * @returns {string}- * Report.- */--------/**- * Order of setting (least specific to most), we need this because otherwise- * `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a- * stem can be set.- *- * @type {Array<'basename' | 'dirname' | 'extname' | 'history' | 'path' | 'stem'>}- */-const order = ['history', 'path', 'basename', 'stem', 'extname', 'dirname']--class VFile {- /**- * Create a new virtual file.- *- * `options` is treated as:- *- * * `string` or `Buffer` — `{value: options}`- * * `URL` — `{path: options}`- * * `VFile` — shallow copies its data over to the new file- * * `object` — all fields are shallow copied over to the new file- *- * Path related fields are set in the following order (least specific to- * most specific): `history`, `path`, `basename`, `stem`, `extname`,- * `dirname`.- *- * You cannot set `dirname` or `extname` without setting either `history`,- * `path`, `basename`, or `stem` too.- *- * @param {Compatible | null | undefined} [value]- * File value.- * @returns- * New instance.- */- constructor(value) {- /** @type {Options | VFile} */- let options-- if (!value) {- options = {}- } else if (typeof value === 'string' || buffer(value)) {- options = {value}- } else if (isUrl(value)) {- options = {path: value}- } else {- options = value- }-- /**- * Place to store custom information (default: `{}`).- *- * It’s OK to store custom data directly on the file but moving it to- * `data` is recommended.- *- * @type {Data}- */- this.data = {}-- /**- * List of messages associated with the file.- *- * @type {Array<VFileMessage>}- */- this.messages = []-- /**- * List of filepaths the file moved between.- *- * The first is the original path and the last is the current path.- *- * @type {Array<string>}- */- this.history = []-- /**- * Base of `path` (default: `process.cwd()` or `'/'` in browsers).- *- * @type {string}- */- this.cwd = proc.cwd()-- /* eslint-disable no-unused-expressions */- /**- * Raw value.- *- * @type {Value}- */- this.value-- // The below are non-standard, they are “well-known”.- // As in, used in several tools.-- /**- * Whether a file was saved to disk.- *- * This is used by vfile reporters.- *- * @type {boolean}- */- this.stored-- /**- * Custom, non-string, compiled, representation.- *- * This is used by unified to store non-string results.- * One example is when turning markdown into React nodes.- *- * @type {unknown}- */- this.result-- /**- * Source map.- *- * This type is equivalent to the `RawSourceMap` type from the `source-map`- * module.- *- * @type {Map | null | undefined}- */- this.map- /* eslint-enable no-unused-expressions */-- // Set path related properties in the correct order.- let index = -1-- while (++index < order.length) {- const prop = order[index]-- // Note: we specifically use `in` instead of `hasOwnProperty` to accept- // `vfile`s too.- if (- prop in options &&- options[prop] !== undefined &&- options[prop] !== null- ) {- // @ts-expect-error: TS doesn’t understand basic reality.- this[prop] = prop === 'history' ? [...options[prop]] : options[prop]- }- }-- /** @type {string} */- let prop-- // Set non-path related properties.- for (prop in options) {- // @ts-expect-error: fine to set other things.- if (!order.includes(prop)) {- // @ts-expect-error: fine to set other things.- this[prop] = options[prop]- }- }- }-- /**- * Get the full path (example: `'~/index.min.js'`).- *- * @returns {string}- */- get path() {- return this.history[this.history.length - 1]- }-- /**- * Set the full path (example: `'~/index.min.js'`).- *- * Cannot be nullified.- * You can set a file URL (a `URL` object with a `file:` protocol) which will- * be turned into a path with `url.fileURLToPath`.- *- * @param {string | URL} path- */- set path(path) {- if (isUrl(path)) {- path = urlToPath(path)- }-- assertNonEmpty(path, 'path')-- if (this.path !== path) {- this.history.push(path)- }- }-- /**- * Get the parent path (example: `'~'`).- */- get dirname() {- return typeof this.path === 'string' ? path.dirname(this.path) : undefined- }-- /**- * Set the parent path (example: `'~'`).- *- * Cannot be set if there’s no `path` yet.- */- set dirname(dirname) {- lib_assertPath(this.basename, 'dirname')- this.path = path.join(dirname || '', this.basename)- }-- /**- * Get the basename (including extname) (example: `'index.min.js'`).- */- get basename() {- return typeof this.path === 'string' ? path.basename(this.path) : undefined- }-- /**- * Set basename (including extname) (`'index.min.js'`).- *- * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`- * on windows).- * Cannot be nullified (use `file.path = file.dirname` instead).- */- set basename(basename) {- assertNonEmpty(basename, 'basename')- assertPart(basename, 'basename')- this.path = path.join(this.dirname || '', basename)- }-- /**- * Get the extname (including dot) (example: `'.js'`).- */- get extname() {- return typeof this.path === 'string' ? path.extname(this.path) : undefined- }-- /**- * Set the extname (including dot) (example: `'.js'`).- *- * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`- * on windows).- * Cannot be set if there’s no `path` yet.- */- set extname(extname) {- assertPart(extname, 'extname')- lib_assertPath(this.dirname, 'extname')-- if (extname) {- if (extname.charCodeAt(0) !== 46 /* `.` */) {- throw new Error('`extname` must start with `.`')- }-- if (extname.includes('.', 1)) {- throw new Error('`extname` cannot contain multiple dots')- }- }-- this.path = path.join(this.dirname, this.stem + (extname || ''))- }-- /**- * Get the stem (basename w/o extname) (example: `'index.min'`).- */- get stem() {- return typeof this.path === 'string'- ? path.basename(this.path, this.extname)- : undefined- }-- /**- * Set the stem (basename w/o extname) (example: `'index.min'`).- *- * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`- * on windows).- * Cannot be nullified (use `file.path = file.dirname` instead).- */- set stem(stem) {- assertNonEmpty(stem, 'stem')- assertPart(stem, 'stem')- this.path = path.join(this.dirname || '', stem + (this.extname || ''))- }-- /**- * Serialize the file.- *- * @param {BufferEncoding | null | undefined} [encoding='utf8']- * Character encoding to understand `value` as when it’s a `Buffer`- * (default: `'utf8'`).- * @returns {string}- * Serialized file.- */- toString(encoding) {- return (this.value || '').toString(encoding || undefined)- }-- /**- * Create a warning message associated with the file.- *- * Its `fatal` is set to `false` and `file` is set to the current file path.- * Its added to `file.messages`.- *- * @param {string | Error | VFileMessage} reason- * Reason for message, uses the stack and message of the error if given.- * @param {Node | NodeLike | Position | Point | null | undefined} [place]- * Place in file where the message occurred.- * @param {string | null | undefined} [origin]- * Place in code where the message originates (example:- * `'my-package:my-rule'` or `'my-rule'`).- * @returns {VFileMessage}- * Message.- */- message(reason, place, origin) {- const message = new VFileMessage(reason, place, origin)-- if (this.path) {- message.name = this.path + ':' + message.name- message.file = this.path- }-- message.fatal = false-- this.messages.push(message)-- return message- }-- /**- * Create an info message associated with the file.- *- * Its `fatal` is set to `null` and `file` is set to the current file path.- * Its added to `file.messages`.- *- * @param {string | Error | VFileMessage} reason- * Reason for message, uses the stack and message of the error if given.- * @param {Node | NodeLike | Position | Point | null | undefined} [place]- * Place in file where the message occurred.- * @param {string | null | undefined} [origin]- * Place in code where the message originates (example:- * `'my-package:my-rule'` or `'my-rule'`).- * @returns {VFileMessage}- * Message.- */- info(reason, place, origin) {- const message = this.message(reason, place, origin)-- message.fatal = null-- return message- }-- /**- * Create a fatal error associated with the file.- *- * Its `fatal` is set to `true` and `file` is set to the current file path.- * Its added to `file.messages`.- *- * > 👉 **Note**: a fatal error means that a file is no longer processable.- *- * @param {string | Error | VFileMessage} reason- * Reason for message, uses the stack and message of the error if given.- * @param {Node | NodeLike | Position | Point | null | undefined} [place]- * Place in file where the message occurred.- * @param {string | null | undefined} [origin]- * Place in code where the message originates (example:- * `'my-package:my-rule'` or `'my-rule'`).- * @returns {never}- * Message.- * @throws {VFileMessage}- * Message.- */- fail(reason, place, origin) {- const message = this.message(reason, place, origin)-- message.fatal = true-- throw message- }-}--/**- * Assert that `part` is not a path (as in, does not contain `path.sep`).- *- * @param {string | null | undefined} part- * File path part.- * @param {string} name- * Part name.- * @returns {void}- * Nothing.- */-function assertPart(part, name) {- if (part && part.includes(path.sep)) {- throw new Error(- '`' + name + '` cannot be a path: did not expect `' + path.sep + '`'- )- }-}--/**- * Assert that `part` is not empty.- *- * @param {string | undefined} part- * Thing.- * @param {string} name- * Part name.- * @returns {asserts part is string}- * Nothing.- */-function assertNonEmpty(part, name) {- if (!part) {- throw new Error('`' + name + '` cannot be empty')- }-}--/**- * Assert `path` exists.- *- * @param {string | undefined} path- * Path.- * @param {string} name- * Dependency name.- * @returns {asserts path is string}- * Nothing.- */-function lib_assertPath(path, name) {- if (!path) {- throw new Error('Setting `' + name + '` requires `path` to be set too')- }-}--/**- * Assert `value` is a buffer.- *- * @param {unknown} value- * thing.- * @returns {value is Buffer}- * Whether `value` is a Node.js buffer.- */-function buffer(value) {- return is_buffer(value)-}--;// CONCATENATED MODULE: ./node_modules/bail/index.js-/**- * Throw a given error.- *- * @param {Error|null|undefined} [error]- * Maybe error.- * @returns {asserts error is null|undefined}- */-function bail(error) {- if (error) {- throw error- }-}--// EXTERNAL MODULE: ./node_modules/extend/index.js-var extend = __webpack_require__(470);-;// CONCATENATED MODULE: ./node_modules/is-plain-obj/index.js-function isPlainObject(value) {- if (typeof value !== 'object' || value === null) {- return false;- }-- const prototype = Object.getPrototypeOf(value);- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);-}--;// CONCATENATED MODULE: ./node_modules/trough/index.js-/**- * @typedef {(error?: Error|null|undefined, ...output: Array<any>) => void} Callback- * @typedef {(...input: Array<any>) => any} Middleware- *- * @typedef {(...input: Array<any>) => void} Run- * Call all middleware.- * @typedef {(fn: Middleware) => Pipeline} Use- * Add `fn` (middleware) to the list.- * @typedef {{run: Run, use: Use}} Pipeline- * Middleware.- */--/**- * Create new middleware.- *- * @returns {Pipeline}- */-function trough() {- /** @type {Array<Middleware>} */- const fns = []- /** @type {Pipeline} */- const pipeline = {run, use}-- return pipeline-- /** @type {Run} */- function run(...values) {- let middlewareIndex = -1- /** @type {Callback} */- const callback = values.pop()-- if (typeof callback !== 'function') {- throw new TypeError('Expected function as last argument, not ' + callback)- }-- next(null, ...values)-- /**- * Run the next `fn`, or we’re done.- *- * @param {Error|null|undefined} error- * @param {Array<any>} output- */- function next(error, ...output) {- const fn = fns[++middlewareIndex]- let index = -1-- if (error) {- callback(error)- return- }-- // Copy non-nullish input into values.- while (++index < values.length) {- if (output[index] === null || output[index] === undefined) {- output[index] = values[index]- }- }-- // Save the newly created `output` for the next call.- values = output-- // Next or done.- if (fn) {- wrap(fn, next)(...output)- } else {- callback(null, ...output)- }- }- }-- /** @type {Use} */- function use(middelware) {- if (typeof middelware !== 'function') {- throw new TypeError(- 'Expected `middelware` to be a function, not ' + middelware- )- }-- fns.push(middelware)- return pipeline- }-}--/**- * Wrap `middleware`.- * Can be sync or async; return a promise, receive a callback, or return new- * values and errors.- *- * @param {Middleware} middleware- * @param {Callback} callback- */-function wrap(middleware, callback) {- /** @type {boolean} */- let called-- return wrapped-- /**- * Call `middleware`.- * @this {any}- * @param {Array<any>} parameters- * @returns {void}- */- function wrapped(...parameters) {- const fnExpectsCallback = middleware.length > parameters.length- /** @type {any} */- let result-- if (fnExpectsCallback) {- parameters.push(done)- }-- try {- result = middleware.apply(this, parameters)- } catch (error) {- const exception = /** @type {Error} */ (error)-- // Well, this is quite the pickle.- // `middleware` received a callback and called it synchronously, but that- // threw an error.- // The only thing left to do is to throw the thing instead.- if (fnExpectsCallback && called) {- throw exception- }-- return done(exception)- }-- if (!fnExpectsCallback) {- if (result instanceof Promise) {- result.then(then, done)- } else if (result instanceof Error) {- done(result)- } else {- then(result)- }- }- }-- /**- * Call `callback`, only once.- * @type {Callback}- */- function done(error, ...output) {- if (!called) {- called = true- callback(error, ...output)- }- }-- /**- * Call `done` with one value.- *- * @param {any} [value]- */- function then(value) {- done(null, value)- }-}--;// CONCATENATED MODULE: ./node_modules/unified/lib/index.js-/**- * @typedef {import('unist').Node} Node- * @typedef {import('vfile').VFileCompatible} VFileCompatible- * @typedef {import('vfile').VFileValue} VFileValue- * @typedef {import('..').Processor} Processor- * @typedef {import('..').Plugin} Plugin- * @typedef {import('..').Preset} Preset- * @typedef {import('..').Pluggable} Pluggable- * @typedef {import('..').PluggableList} PluggableList- * @typedef {import('..').Transformer} Transformer- * @typedef {import('..').Parser} Parser- * @typedef {import('..').Compiler} Compiler- * @typedef {import('..').RunCallback} RunCallback- * @typedef {import('..').ProcessCallback} ProcessCallback- *- * @typedef Context- * @property {Node} tree- * @property {VFile} file- */---------// Expose a frozen processor.-const unified = base().freeze()--const own = {}.hasOwnProperty--// Function to create the first processor.-/**- * @returns {Processor}- */-function base() {- const transformers = trough()- /** @type {Processor['attachers']} */- const attachers = []- /** @type {Record<string, unknown>} */- let namespace = {}- /** @type {boolean|undefined} */- let frozen- let freezeIndex = -1-- // Data management.- // @ts-expect-error: overloads are handled.- processor.data = data- processor.Parser = undefined- processor.Compiler = undefined-- // Lock.- processor.freeze = freeze-- // Plugins.- processor.attachers = attachers- // @ts-expect-error: overloads are handled.- processor.use = use-- // API.- processor.parse = parse- processor.stringify = stringify- // @ts-expect-error: overloads are handled.- processor.run = run- processor.runSync = runSync- // @ts-expect-error: overloads are handled.- processor.process = process- processor.processSync = processSync-- // Expose.- return processor-- // Create a new processor based on the processor in the current scope.- /** @type {Processor} */- function processor() {- const destination = base()- let index = -1-- while (++index < attachers.length) {- destination.use(...attachers[index])- }-- destination.data(extend(true, {}, namespace))-- return destination- }-- /**- * @param {string|Record<string, unknown>} [key]- * @param {unknown} [value]- * @returns {unknown}- */- function data(key, value) {- if (typeof key === 'string') {- // Set `key`.- if (arguments.length === 2) {- assertUnfrozen('data', frozen)- namespace[key] = value- return processor- }-- // Get `key`.- return (own.call(namespace, key) && namespace[key]) || null- }-- // Set space.- if (key) {- assertUnfrozen('data', frozen)- namespace = key- return processor- }-- // Get space.- return namespace- }-- /** @type {Processor['freeze']} */- function freeze() {- if (frozen) {- return processor- }-- while (++freezeIndex < attachers.length) {- const [attacher, ...options] = attachers[freezeIndex]-- if (options[0] === false) {- continue- }-- if (options[0] === true) {- options[0] = undefined- }-- /** @type {Transformer|void} */- const transformer = attacher.call(processor, ...options)-- if (typeof transformer === 'function') {- transformers.use(transformer)- }- }-- frozen = true- freezeIndex = Number.POSITIVE_INFINITY-- return processor- }-- /**- * @param {Pluggable|null|undefined} [value]- * @param {...unknown} options- * @returns {Processor}- */- function use(value, ...options) {- /** @type {Record<string, unknown>|undefined} */- let settings-- assertUnfrozen('use', frozen)-- if (value === null || value === undefined) {- // Empty.- } else if (typeof value === 'function') {- addPlugin(value, ...options)- } else if (typeof value === 'object') {- if (Array.isArray(value)) {- addList(value)- } else {- addPreset(value)- }- } else {- throw new TypeError('Expected usable value, not `' + value + '`')- }-- if (settings) {- namespace.settings = Object.assign(namespace.settings || {}, settings)- }-- return processor-- /**- * @param {import('..').Pluggable<unknown[]>} value- * @returns {void}- */- function add(value) {- if (typeof value === 'function') {- addPlugin(value)- } else if (typeof value === 'object') {- if (Array.isArray(value)) {- const [plugin, ...options] = value- addPlugin(plugin, ...options)- } else {- addPreset(value)- }- } else {- throw new TypeError('Expected usable value, not `' + value + '`')- }- }-- /**- * @param {Preset} result- * @returns {void}- */- function addPreset(result) {- addList(result.plugins)-- if (result.settings) {- settings = Object.assign(settings || {}, result.settings)- }- }-- /**- * @param {PluggableList|null|undefined} [plugins]- * @returns {void}- */- function addList(plugins) {- let index = -1-- if (plugins === null || plugins === undefined) {- // Empty.- } else if (Array.isArray(plugins)) {- while (++index < plugins.length) {- const thing = plugins[index]- add(thing)- }- } else {- throw new TypeError('Expected a list of plugins, not `' + plugins + '`')- }- }-- /**- * @param {Plugin} plugin- * @param {...unknown} [value]- * @returns {void}- */- function addPlugin(plugin, value) {- let index = -1- /** @type {Processor['attachers'][number]|undefined} */- let entry-- while (++index < attachers.length) {- if (attachers[index][0] === plugin) {- entry = attachers[index]- break- }- }-- if (entry) {- if (isPlainObject(entry[1]) && isPlainObject(value)) {- value = extend(true, entry[1], value)- }-- entry[1] = value- } else {- // @ts-expect-error: fine.- attachers.push([...arguments])- }- }- }-- /** @type {Processor['parse']} */- function parse(doc) {- processor.freeze()- const file = vfile(doc)- const Parser = processor.Parser- assertParser('parse', Parser)-- if (newable(Parser, 'parse')) {- // @ts-expect-error: `newable` checks this.- return new Parser(String(file), file).parse()- }-- // @ts-expect-error: `newable` checks this.- return Parser(String(file), file) // eslint-disable-line new-cap- }-- /** @type {Processor['stringify']} */- function stringify(node, doc) {- processor.freeze()- const file = vfile(doc)- const Compiler = processor.Compiler- assertCompiler('stringify', Compiler)- assertNode(node)-- if (newable(Compiler, 'compile')) {- // @ts-expect-error: `newable` checks this.- return new Compiler(node, file).compile()- }-- // @ts-expect-error: `newable` checks this.- return Compiler(node, file) // eslint-disable-line new-cap- }-- /**- * @param {Node} node- * @param {VFileCompatible|RunCallback} [doc]- * @param {RunCallback} [callback]- * @returns {Promise<Node>|void}- */- function run(node, doc, callback) {- assertNode(node)- processor.freeze()-- if (!callback && typeof doc === 'function') {- callback = doc- doc = undefined- }-- if (!callback) {- return new Promise(executor)- }-- executor(null, callback)-- /**- * @param {null|((node: Node) => void)} resolve- * @param {(error: Error) => void} reject- * @returns {void}- */- function executor(resolve, reject) {- // @ts-expect-error: `doc` can’t be a callback anymore, we checked.- transformers.run(node, vfile(doc), done)-- /**- * @param {Error|null} error- * @param {Node} tree- * @param {VFile} file- * @returns {void}- */- function done(error, tree, file) {- tree = tree || node- if (error) {- reject(error)- } else if (resolve) {- resolve(tree)- } else {- // @ts-expect-error: `callback` is defined if `resolve` is not.- callback(null, tree, file)- }- }- }- }-- /** @type {Processor['runSync']} */- function runSync(node, file) {- /** @type {Node|undefined} */- let result- /** @type {boolean|undefined} */- let complete-- processor.run(node, file, done)-- assertDone('runSync', 'run', complete)-- // @ts-expect-error: we either bailed on an error or have a tree.- return result-- /**- * @param {Error|null} [error]- * @param {Node} [tree]- * @returns {void}- */- function done(error, tree) {- bail(error)- result = tree- complete = true- }- }-- /**- * @param {VFileCompatible} doc- * @param {ProcessCallback} [callback]- * @returns {Promise<VFile>|undefined}- */- function process(doc, callback) {- processor.freeze()- assertParser('process', processor.Parser)- assertCompiler('process', processor.Compiler)-- if (!callback) {- return new Promise(executor)- }-- executor(null, callback)-- /**- * @param {null|((file: VFile) => void)} resolve- * @param {(error?: Error|null|undefined) => void} reject- * @returns {void}- */- function executor(resolve, reject) {- const file = vfile(doc)-- processor.run(processor.parse(file), file, (error, tree, file) => {- if (error || !tree || !file) {- done(error)- } else {- /** @type {unknown} */- const result = processor.stringify(tree, file)-- if (result === undefined || result === null) {- // Empty.- } else if (looksLikeAVFileValue(result)) {- file.value = result- } else {- file.result = result- }-- done(error, file)- }- })-- /**- * @param {Error|null|undefined} [error]- * @param {VFile|undefined} [file]- * @returns {void}- */- function done(error, file) {- if (error || !file) {- reject(error)- } else if (resolve) {- resolve(file)- } else {- // @ts-expect-error: `callback` is defined if `resolve` is not.- callback(null, file)- }- }- }- }-- /** @type {Processor['processSync']} */- function processSync(doc) {- /** @type {boolean|undefined} */- let complete-- processor.freeze()- assertParser('processSync', processor.Parser)- assertCompiler('processSync', processor.Compiler)-- const file = vfile(doc)-- processor.process(file, done)-- assertDone('processSync', 'process', complete)-- return file-- /**- * @param {Error|null|undefined} [error]- * @returns {void}- */- function done(error) {- complete = true- bail(error)- }- }-}--/**- * Check if `value` is a constructor.- *- * @param {unknown} value- * @param {string} name- * @returns {boolean}- */-function newable(value, name) {- return (- typeof value === 'function' &&- // Prototypes do exist.- // type-coverage:ignore-next-line- value.prototype &&- // A function with keys in its prototype is probably a constructor.- // Classes’ prototype methods are not enumerable, so we check if some value- // exists in the prototype.- // type-coverage:ignore-next-line- (keys(value.prototype) || name in value.prototype)- )-}--/**- * Check if `value` is an object with keys.- *- * @param {Record<string, unknown>} value- * @returns {boolean}- */-function keys(value) {- /** @type {string} */- let key-- for (key in value) {- if (own.call(value, key)) {- return true- }- }-- return false-}--/**- * Assert a parser is available.- *- * @param {string} name- * @param {unknown} value- * @returns {asserts value is Parser}- */-function assertParser(name, value) {- if (typeof value !== 'function') {- throw new TypeError('Cannot `' + name + '` without `Parser`')- }-}--/**- * Assert a compiler is available.- *- * @param {string} name- * @param {unknown} value- * @returns {asserts value is Compiler}- */-function assertCompiler(name, value) {- if (typeof value !== 'function') {- throw new TypeError('Cannot `' + name + '` without `Compiler`')- }-}--/**- * Assert the processor is not frozen.- *- * @param {string} name- * @param {unknown} frozen- * @returns {asserts frozen is false}- */-function assertUnfrozen(name, frozen) {- if (frozen) {- throw new Error(- 'Cannot call `' +- name +- '` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.'- )- }-}--/**- * Assert `node` is a unist node.- *- * @param {unknown} node- * @returns {asserts node is Node}- */-function assertNode(node) {- // `isPlainObj` unfortunately uses `any` instead of `unknown`.- // type-coverage:ignore-next-line- if (!isPlainObject(node) || typeof node.type !== 'string') {- throw new TypeError('Expected node, got `' + node + '`')- // Fine.- }-}--/**- * Assert that `complete` is `true`.- *- * @param {string} name- * @param {string} asyncName- * @param {unknown} complete- * @returns {asserts complete is true}- */-function assertDone(name, asyncName, complete) {- if (!complete) {- throw new Error(- '`' + name + '` finished async. Use `' + asyncName + '` instead'- )- }-}--/**- * @param {VFileCompatible} [value]- * @returns {VFile}- */-function vfile(value) {- return looksLikeAVFile(value) ? value : new VFile(value)-}--/**- * @param {VFileCompatible} [value]- * @returns {value is VFile}- */-function looksLikeAVFile(value) {- return Boolean(- value &&- typeof value === 'object' &&- 'message' in value &&- 'messages' in value- )-}--/**- * @param {unknown} [value]- * @returns {value is VFileValue}- */-function looksLikeAVFileValue(value) {- return typeof value === 'string' || is_buffer(value)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-string/lib/index.js-/**- * @typedef {import('mdast').Root|import('mdast').Content} Node- *- * @typedef Options- * Configuration (optional).- * @property {boolean | null | undefined} [includeImageAlt=true]- * Whether to use `alt` for `image`s.- * @property {boolean | null | undefined} [includeHtml=true]- * Whether to use `value` of HTML.- */--/** @type {Options} */-const emptyOptions = {}--/**- * Get the text content of a node or list of nodes.- *- * Prefers the node’s plain-text fields, otherwise serializes its children,- * and if the given value is an array, serialize the nodes in it.- *- * @param {unknown} value- * Thing to serialize, typically `Node`.- * @param {Options | null | undefined} [options]- * Configuration (optional).- * @returns {string}- * Serialized `value`.- */-function lib_toString(value, options) {- const settings = options || emptyOptions- const includeImageAlt =- typeof settings.includeImageAlt === 'boolean'- ? settings.includeImageAlt- : true- const includeHtml =- typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true-- return one(value, includeImageAlt, includeHtml)-}--/**- * One node or several nodes.- *- * @param {unknown} value- * Thing to serialize.- * @param {boolean} includeImageAlt- * Include image `alt`s.- * @param {boolean} includeHtml- * Include HTML.- * @returns {string}- * Serialized node.- */-function one(value, includeImageAlt, includeHtml) {- if (node(value)) {- if ('value' in value) {- return value.type === 'html' && !includeHtml ? '' : value.value- }-- if (includeImageAlt && 'alt' in value && value.alt) {- return value.alt- }-- if ('children' in value) {- return lib_all(value.children, includeImageAlt, includeHtml)- }- }-- if (Array.isArray(value)) {- return lib_all(value, includeImageAlt, includeHtml)- }-- return ''-}--/**- * Serialize a list of nodes.- *- * @param {Array<unknown>} values- * Thing to serialize.- * @param {boolean} includeImageAlt- * Include image `alt`s.- * @param {boolean} includeHtml- * Include HTML.- * @returns {string}- * Serialized nodes.- */-function lib_all(values, includeImageAlt, includeHtml) {- /** @type {Array<string>} */- const result = []- let index = -1-- while (++index < values.length) {- result[index] = one(values[index], includeImageAlt, includeHtml)- }-- return result.join('')-}--/**- * Check if `value` looks like a node.- *- * @param {unknown} value- * Thing.- * @returns {value is Node}- * Whether `value` is a node.- */-function node(value) {- return Boolean(value && typeof value === 'object')-}--;// CONCATENATED MODULE: ./node_modules/micromark-util-chunked/index.js-/**- * Like `Array#splice`, but smarter for giant arrays.- *- * `Array#splice` takes all items to be inserted as individual argument which- * causes a stack overflow in V8 when trying to insert 100k items for instance.- *- * Otherwise, this does not return the removed items, and takes `items` as an- * array instead of rest parameters.- *- * @template {unknown} T- * Item type.- * @param {Array<T>} list- * List to operate on.- * @param {number} start- * Index to remove/insert at (can be negative).- * @param {number} remove- * Number of items to remove.- * @param {Array<T>} items- * Items to inject into `list`.- * @returns {void}- * Nothing.- */-function splice(list, start, remove, items) {- const end = list.length- let chunkStart = 0- /** @type {Array<unknown>} */- let parameters-- // Make start between zero and `end` (included).- if (start < 0) {- start = -start > end ? 0 : end + start- } else {- start = start > end ? end : start- }- remove = remove > 0 ? remove : 0-- // No need to chunk the items if there’s only a couple (10k) items.- if (items.length < 10000) {- parameters = Array.from(items)- parameters.unshift(start, remove)- // @ts-expect-error Hush, it’s fine.- list.splice(...parameters)- } else {- // Delete `remove` items starting from `start`- if (remove) list.splice(start, remove)-- // Insert the items in chunks to not cause stack overflows.- while (chunkStart < items.length) {- parameters = items.slice(chunkStart, chunkStart + 10000)- parameters.unshift(start, 0)- // @ts-expect-error Hush, it’s fine.- list.splice(...parameters)- chunkStart += 10000- start += 10000- }- }-}--/**- * Append `items` (an array) at the end of `list` (another array).- * When `list` was empty, returns `items` instead.- *- * This prevents a potentially expensive operation when `list` is empty,- * and adds items in batches to prevent V8 from hanging.- *- * @template {unknown} T- * Item type.- * @param {Array<T>} list- * List to operate on.- * @param {Array<T>} items- * Items to add to `list`.- * @returns {Array<T>}- * Either `list` or `items`.- */-function push(list, items) {- if (list.length > 0) {- splice(list, list.length, 0, items)- return list- }- return items-}--;// CONCATENATED MODULE: ./node_modules/micromark-util-combine-extensions/index.js-/**- * @typedef {import('micromark-util-types').Extension} Extension- * @typedef {import('micromark-util-types').Handles} Handles- * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension- * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension- */----const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty--/**- * Combine multiple syntax extensions into one.- *- * @param {Array<Extension>} extensions- * List of syntax extensions.- * @returns {NormalizedExtension}- * A single combined extension.- */-function combineExtensions(extensions) {- /** @type {NormalizedExtension} */- const all = {}- let index = -1-- while (++index < extensions.length) {- syntaxExtension(all, extensions[index])- }-- return all-}--/**- * Merge `extension` into `all`.- *- * @param {NormalizedExtension} all- * Extension to merge into.- * @param {Extension} extension- * Extension to merge.- * @returns {void}- */-function syntaxExtension(all, extension) {- /** @type {keyof Extension} */- let hook-- for (hook in extension) {- const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined- /** @type {Record<string, unknown>} */- const left = maybe || (all[hook] = {})- /** @type {Record<string, unknown> | undefined} */- const right = extension[hook]- /** @type {string} */- let code-- if (right) {- for (code in right) {- if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = []- const value = right[code]- constructs(- // @ts-expect-error Looks like a list.- left[code],- Array.isArray(value) ? value : value ? [value] : []- )- }- }- }-}--/**- * Merge `list` into `existing` (both lists of constructs).- * Mutates `existing`.- *- * @param {Array<unknown>} existing- * @param {Array<unknown>} list- * @returns {void}- */-function constructs(existing, list) {- let index = -1- /** @type {Array<unknown>} */- const before = []-- while (++index < list.length) {- // @ts-expect-error Looks like an object.- ;(list[index].add === 'after' ? existing : before).push(list[index])- }-- splice(existing, 0, 0, before)-}--/**- * Combine multiple HTML extensions into one.- *- * @param {Array<HtmlExtension>} htmlExtensions- * List of HTML extensions.- * @returns {HtmlExtension}- * A single combined HTML extension.- */-function micromark_util_combine_extensions_combineHtmlExtensions(htmlExtensions) {- /** @type {HtmlExtension} */- const handlers = {}- let index = -1-- while (++index < htmlExtensions.length) {- htmlExtension(handlers, htmlExtensions[index])- }-- return handlers-}--/**- * Merge `extension` into `all`.- *- * @param {HtmlExtension} all- * Extension to merge into.- * @param {HtmlExtension} extension- * Extension to merge.- * @returns {void}- */-function htmlExtension(all, extension) {- /** @type {keyof HtmlExtension} */- let hook-- for (hook in extension) {- const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined- const left = maybe || (all[hook] = {})- const right = extension[hook]- /** @type {keyof Handles} */- let type-- if (right) {- for (type in right) {- // @ts-expect-error assume document vs regular handler are managed correctly.- left[type] = right[type]- }- }- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-util-character/lib/unicode-punctuation-regex.js-// This module is generated by `script/`.-//-// CommonMark handles attention (emphasis, strong) markers based on what comes-// before or after them.-// One such difference is if those characters are Unicode punctuation.-// This script is generated from the Unicode data.--/**- * Regular expression that matches a unicode punctuation character.- */-const unicodePunctuationRegex =- /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\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-\u2E4F\u2E52-\u2E5D\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]/--;// CONCATENATED MODULE: ./node_modules/micromark-util-character/index.js-/**- * @typedef {import('micromark-util-types').Code} Code- */----/**- * Check whether the character code represents an ASCII alpha (`a` through `z`,- * case insensitive).- *- * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha.- *- * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`)- * to U+005A (`Z`).- *- * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`)- * to U+007A (`z`).- *- * @param code- * Code.- * @returns- * Whether it matches.- */-const asciiAlpha = regexCheck(/[A-Za-z]/)--/**- * Check whether the character code represents an ASCII alphanumeric (`a`- * through `z`, case insensitive, or `0` through `9`).- *- * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha- * (see `asciiAlpha`).- *- * @param code- * Code.- * @returns- * Whether it matches.- */-const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/)--/**- * Check whether the character code represents an ASCII atext.- *- * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in- * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`),- * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F- * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E- * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE- * (`{`) to U+007E TILDE (`~`).- *- * See:- * **\[RFC5322]**:- * [Internet Message Format](https://tools.ietf.org/html/rfc5322).- * P. Resnick.- * IETF.- *- * @param code- * Code.- * @returns- * Whether it matches.- */-const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/)--/**- * Check whether a character code is an ASCII control character.- *- * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)- * to U+001F (US), or U+007F (DEL).- *- * @param {Code} code- * Code.- * @returns {boolean}- * Whether it matches.- */-function asciiControl(code) {- return (- // Special whitespace codes (which have negative values), C0 and Control- // character DEL- code !== null && (code < 32 || code === 127)- )-}--/**- * Check whether the character code represents an ASCII digit (`0` through `9`).- *- * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to- * U+0039 (`9`).- *- * @param code- * Code.- * @returns- * Whether it matches.- */-const asciiDigit = regexCheck(/\d/)--/**- * Check whether the character code represents an ASCII hex digit (`a` through- * `f`, case insensitive, or `0` through `9`).- *- * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex- * digit, or an ASCII lower hex digit.- *- * An **ASCII upper hex digit** is a character in the inclusive range U+0041- * (`A`) to U+0046 (`F`).- *- * An **ASCII lower hex digit** is a character in the inclusive range U+0061- * (`a`) to U+0066 (`f`).- *- * @param code- * Code.- * @returns- * Whether it matches.- */-const asciiHexDigit = regexCheck(/[\dA-Fa-f]/)--/**- * Check whether the character code represents ASCII punctuation.- *- * An **ASCII punctuation** is a character in the inclusive ranges U+0021- * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT- * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT- * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`).- *- * @param code- * Code.- * @returns- * Whether it matches.- */-const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/)--/**- * Check whether a character code is a markdown line ending.- *- * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN- * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).- *- * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE- * RETURN (CR) are replaced by these virtual characters depending on whether- * they occurred together.- *- * @param {Code} code- * Code.- * @returns {boolean}- * Whether it matches.- */-function markdownLineEnding(code) {- return code !== null && code < -2-}--/**- * Check whether a character code is a markdown line ending (see- * `markdownLineEnding`) or markdown space (see `markdownSpace`).- *- * @param {Code} code- * Code.- * @returns {boolean}- * Whether it matches.- */-function markdownLineEndingOrSpace(code) {- return code !== null && (code < 0 || code === 32)-}--/**- * Check whether a character code is a markdown space.- *- * A **markdown space** is the concrete character U+0020 SPACE (SP) and the- * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).- *- * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is- * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL- * SPACE (VS) characters, depending on the column at which the tab occurred.- *- * @param {Code} code- * Code.- * @returns {boolean}- * Whether it matches.- */-function markdownSpace(code) {- return code === -2 || code === -1 || code === 32-}--// Size note: removing ASCII from the regex and using `asciiPunctuation` here-// In fact adds to the bundle size.-/**- * Check whether the character code represents Unicode punctuation.- *- * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation,- * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf`- * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po`- * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII- * punctuation (see `asciiPunctuation`).- *- * See:- * **\[UNICODE]**:- * [The Unicode Standard](https://www.unicode.org/versions/).- * Unicode Consortium.- *- * @param code- * Code.- * @returns- * Whether it matches.- */-const unicodePunctuation = regexCheck(unicodePunctuationRegex)--/**- * Check whether the character code represents Unicode whitespace.- *- * Note that this does handle micromark specific markdown whitespace characters.- * See `markdownLineEndingOrSpace` to check that.- *- * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator,- * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF),- * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**).- *- * See:- * **\[UNICODE]**:- * [The Unicode Standard](https://www.unicode.org/versions/).- * Unicode Consortium.- *- * @param code- * Code.- * @returns- * Whether it matches.- */-const unicodeWhitespace = regexCheck(/\s/)--/**- * Create a code check from a regex.- *- * @param {RegExp} regex- * @returns {(code: Code) => boolean}- */-function regexCheck(regex) {- return check-- /**- * Check whether a code matches the bound regex.- *- * @param {Code} code- * Character code.- * @returns {boolean}- * Whether the character code matches the bound regex.- */- function check(code) {- return code !== null && regex.test(String.fromCharCode(code))- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-factory-space/index.js-/**- * @typedef {import('micromark-util-types').Effects} Effects- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenType} TokenType- */----// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`.--/**- * Parse spaces and tabs.- *- * There is no `nok` parameter:- *- * * spaces in markdown are often optional, in which case this factory can be- * used and `ok` will be switched to whether spaces were found or not- * * one line ending or space can be detected with `markdownSpace(code)` right- * before using `factorySpace`- *- * ###### Examples- *- * Where `␉` represents a tab (plus how much it expands) and `␠` represents a- * single space.- *- * ```markdown- * ␉- * ␠␠␠␠- * ␉␠- * ```- *- * @param {Effects} effects- * Context.- * @param {State} ok- * State switched to when successful.- * @param {TokenType} type- * Type (`' \t'`).- * @param {number | undefined} [max=Infinity]- * Max (exclusive).- * @returns- * Start state.- */-function factorySpace(effects, ok, type, max) {- const limit = max ? max - 1 : Number.POSITIVE_INFINITY- let size = 0- return start-- /** @type {State} */- function start(code) {- if (markdownSpace(code)) {- effects.enter(type)- return prefix(code)- }- return ok(code)- }-- /** @type {State} */- function prefix(code) {- if (markdownSpace(code) && size++ < limit) {- effects.consume(code)- return prefix- }- effects.exit(type)- return ok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark/lib/initialize/content.js-/**- * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct- * @typedef {import('micromark-util-types').Initializer} Initializer- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').Token} Token- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- */----/** @type {InitialConstruct} */-const content = {- tokenize: initializeContent-}--/**- * @this {TokenizeContext}- * @type {Initializer}- */-function initializeContent(effects) {- const contentStart = effects.attempt(- this.parser.constructs.contentInitial,- afterContentStartConstruct,- paragraphInitial- )- /** @type {Token} */- let previous- return contentStart-- /** @type {State} */- function afterContentStartConstruct(code) {- if (code === null) {- effects.consume(code)- return- }- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- return factorySpace(effects, contentStart, 'linePrefix')- }-- /** @type {State} */- function paragraphInitial(code) {- effects.enter('paragraph')- return lineStart(code)- }-- /** @type {State} */- function lineStart(code) {- const token = effects.enter('chunkText', {- contentType: 'text',- previous- })- if (previous) {- previous.next = token- }- previous = token- return data(code)- }-- /** @type {State} */- function data(code) {- if (code === null) {- effects.exit('chunkText')- effects.exit('paragraph')- effects.consume(code)- return- }- if (markdownLineEnding(code)) {- effects.consume(code)- effects.exit('chunkText')- return lineStart- }-- // Data.- effects.consume(code)- return data- }-}--;// CONCATENATED MODULE: ./node_modules/micromark/lib/initialize/document.js-/**- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').ContainerState} ContainerState- * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct- * @typedef {import('micromark-util-types').Initializer} Initializer- * @typedef {import('micromark-util-types').Point} Point- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').Token} Token- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */--/**- * @typedef {[Construct, ContainerState]} StackItem- */-----/** @type {InitialConstruct} */-const document_document = {- tokenize: initializeDocument-}--/** @type {Construct} */-const containerConstruct = {- tokenize: tokenizeContainer-}--/**- * @this {TokenizeContext}- * @type {Initializer}- */-function initializeDocument(effects) {- const self = this- /** @type {Array<StackItem>} */- const stack = []- let continued = 0- /** @type {TokenizeContext | undefined} */- let childFlow- /** @type {Token | undefined} */- let childToken- /** @type {number} */- let lineStartOffset- return start-- /** @type {State} */- function start(code) {- // First we iterate through the open blocks, starting with the root- // document, and descending through last children down to the last open- // block.- // Each block imposes a condition that the line must satisfy if the block is- // to remain open.- // For example, a block quote requires a `>` character.- // A paragraph requires a non-blank line.- // In this phase we may match all or just some of the open blocks.- // But we cannot close unmatched blocks yet, because we may have a lazy- // continuation line.- if (continued < stack.length) {- const item = stack[continued]- self.containerState = item[1]- return effects.attempt(- item[0].continuation,- documentContinue,- checkNewContainers- )(code)- }-- // Done.- return checkNewContainers(code)- }-- /** @type {State} */- function documentContinue(code) {- continued++-- // Note: this field is called `_closeFlow` but it also closes containers.- // Perhaps a good idea to rename it but it’s already used in the wild by- // extensions.- if (self.containerState._closeFlow) {- self.containerState._closeFlow = undefined- if (childFlow) {- closeFlow()- }-- // Note: this algorithm for moving events around is similar to the- // algorithm when dealing with lazy lines in `writeToChild`.- const indexBeforeExits = self.events.length- let indexBeforeFlow = indexBeforeExits- /** @type {Point | undefined} */- let point-- // Find the flow chunk.- while (indexBeforeFlow--) {- if (- self.events[indexBeforeFlow][0] === 'exit' &&- self.events[indexBeforeFlow][1].type === 'chunkFlow'- ) {- point = self.events[indexBeforeFlow][1].end- break- }- }- exitContainers(continued)-- // Fix positions.- let index = indexBeforeExits- while (index < self.events.length) {- self.events[index][1].end = Object.assign({}, point)- index++- }-- // Inject the exits earlier (they’re still also at the end).- splice(- self.events,- indexBeforeFlow + 1,- 0,- self.events.slice(indexBeforeExits)- )-- // Discard the duplicate exits.- self.events.length = index- return checkNewContainers(code)- }- return start(code)- }-- /** @type {State} */- function checkNewContainers(code) {- // Next, after consuming the continuation markers for existing blocks, we- // look for new block starts (e.g. `>` for a block quote).- // If we encounter a new block start, we close any blocks unmatched in- // step 1 before creating the new block as a child of the last matched- // block.- if (continued === stack.length) {- // No need to `check` whether there’s a container, of `exitContainers`- // would be moot.- // We can instead immediately `attempt` to parse one.- if (!childFlow) {- return documentContinued(code)- }-- // If we have concrete content, such as block HTML or fenced code,- // we can’t have containers “pierce” into them, so we can immediately- // start.- if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {- return flowStart(code)- }-- // If we do have flow, it could still be a blank line,- // but we’d be interrupting it w/ a new container if there’s a current- // construct.- // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer- // needed in [email protected]).- self.interrupt = Boolean(- childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack- )- }-- // Check if there is a new container.- self.containerState = {}- return effects.check(- containerConstruct,- thereIsANewContainer,- thereIsNoNewContainer- )(code)- }-- /** @type {State} */- function thereIsANewContainer(code) {- if (childFlow) closeFlow()- exitContainers(continued)- return documentContinued(code)- }-- /** @type {State} */- function thereIsNoNewContainer(code) {- self.parser.lazy[self.now().line] = continued !== stack.length- lineStartOffset = self.now().offset- return flowStart(code)- }-- /** @type {State} */- function documentContinued(code) {- // Try new containers.- self.containerState = {}- return effects.attempt(- containerConstruct,- containerContinue,- flowStart- )(code)- }-- /** @type {State} */- function containerContinue(code) {- continued++- stack.push([self.currentConstruct, self.containerState])- // Try another.- return documentContinued(code)- }-- /** @type {State} */- function flowStart(code) {- if (code === null) {- if (childFlow) closeFlow()- exitContainers(0)- effects.consume(code)- return- }- childFlow = childFlow || self.parser.flow(self.now())- effects.enter('chunkFlow', {- contentType: 'flow',- previous: childToken,- _tokenizer: childFlow- })- return flowContinue(code)- }-- /** @type {State} */- function flowContinue(code) {- if (code === null) {- writeToChild(effects.exit('chunkFlow'), true)- exitContainers(0)- effects.consume(code)- return- }- if (markdownLineEnding(code)) {- effects.consume(code)- writeToChild(effects.exit('chunkFlow'))- // Get ready for the next line.- continued = 0- self.interrupt = undefined- return start- }- effects.consume(code)- return flowContinue- }-- /**- * @param {Token} token- * @param {boolean | undefined} [eof]- * @returns {void}- */- function writeToChild(token, eof) {- const stream = self.sliceStream(token)- if (eof) stream.push(null)- token.previous = childToken- if (childToken) childToken.next = token- childToken = token- childFlow.defineSkip(token.start)- childFlow.write(stream)-- // Alright, so we just added a lazy line:- //- // ```markdown- // > a- // b.- //- // Or:- //- // > ~~~c- // d- //- // Or:- //- // > | e |- // f- // ```- //- // The construct in the second example (fenced code) does not accept lazy- // lines, so it marked itself as done at the end of its first line, and- // then the content construct parses `d`.- // Most constructs in markdown match on the first line: if the first line- // forms a construct, a non-lazy line can’t “unmake” it.- //- // The construct in the third example is potentially a GFM table, and- // those are *weird*.- // It *could* be a table, from the first line, if the following line- // matches a condition.- // In this case, that second line is lazy, which “unmakes” the first line- // and turns the whole into one content block.- //- // We’ve now parsed the non-lazy and the lazy line, and can figure out- // whether the lazy line started a new flow block.- // If it did, we exit the current containers between the two flow blocks.- if (self.parser.lazy[token.start.line]) {- let index = childFlow.events.length- while (index--) {- if (- // The token starts before the line ending…- childFlow.events[index][1].start.offset < lineStartOffset &&- // …and either is not ended yet…- (!childFlow.events[index][1].end ||- // …or ends after it.- childFlow.events[index][1].end.offset > lineStartOffset)- ) {- // Exit: there’s still something open, which means it’s a lazy line- // part of something.- return- }- }-- // Note: this algorithm for moving events around is similar to the- // algorithm when closing flow in `documentContinue`.- const indexBeforeExits = self.events.length- let indexBeforeFlow = indexBeforeExits- /** @type {boolean | undefined} */- let seen- /** @type {Point | undefined} */- let point-- // Find the previous chunk (the one before the lazy line).- while (indexBeforeFlow--) {- if (- self.events[indexBeforeFlow][0] === 'exit' &&- self.events[indexBeforeFlow][1].type === 'chunkFlow'- ) {- if (seen) {- point = self.events[indexBeforeFlow][1].end- break- }- seen = true- }- }- exitContainers(continued)-- // Fix positions.- index = indexBeforeExits- while (index < self.events.length) {- self.events[index][1].end = Object.assign({}, point)- index++- }-- // Inject the exits earlier (they’re still also at the end).- splice(- self.events,- indexBeforeFlow + 1,- 0,- self.events.slice(indexBeforeExits)- )-- // Discard the duplicate exits.- self.events.length = index- }- }-- /**- * @param {number} size- * @returns {void}- */- function exitContainers(size) {- let index = stack.length-- // Exit open containers.- while (index-- > size) {- const entry = stack[index]- self.containerState = entry[1]- entry[0].exit.call(self, effects)- }- stack.length = size- }- function closeFlow() {- childFlow.write([null])- childToken = undefined- childFlow = undefined- self.containerState._closeFlow = undefined- }-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeContainer(effects, ok, nok) {- // Always populated by defaults.-- return factorySpace(- effects,- effects.attempt(this.parser.constructs.document, ok, nok),- 'linePrefix',- this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4- )-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/blank-line.js-/**- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */----/** @type {Construct} */-const blankLine = {- tokenize: tokenizeBlankLine,- partial: true-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeBlankLine(effects, ok, nok) {- return start-- /**- * Start of blank line.- *- * > 👉 **Note**: `␠` represents a space character.- *- * ```markdown- * > | ␠␠␊- * ^- * > | ␊- * ^- * ```- *- * @type {State}- */- function start(code) {- return markdownSpace(code)- ? factorySpace(effects, after, 'linePrefix')(code)- : after(code)- }-- /**- * At eof/eol, after optional whitespace.- *- * > 👉 **Note**: `␠` represents a space character.- *- * ```markdown- * > | ␠␠␊- * ^- * > | ␊- * ^- * ```- *- * @type {State}- */- function after(code) {- return code === null || markdownLineEnding(code) ? ok(code) : nok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js-/**- * @typedef {import('micromark-util-types').Chunk} Chunk- * @typedef {import('micromark-util-types').Event} Event- * @typedef {import('micromark-util-types').Token} Token- */---/**- * Tokenize subcontent.- *- * @param {Array<Event>} events- * List of events.- * @returns {boolean}- * Whether subtokens were found.- */-function subtokenize(events) {- /** @type {Record<string, number>} */- const jumps = {}- let index = -1- /** @type {Event} */- let event- /** @type {number | undefined} */- let lineIndex- /** @type {number} */- let otherIndex- /** @type {Event} */- let otherEvent- /** @type {Array<Event>} */- let parameters- /** @type {Array<Event>} */- let subevents- /** @type {boolean | undefined} */- let more- while (++index < events.length) {- while (index in jumps) {- index = jumps[index]- }- event = events[index]-- // Add a hook for the GFM tasklist extension, which needs to know if text- // is in the first content of a list item.- if (- index &&- event[1].type === 'chunkFlow' &&- events[index - 1][1].type === 'listItemPrefix'- ) {- subevents = event[1]._tokenizer.events- otherIndex = 0- if (- otherIndex < subevents.length &&- subevents[otherIndex][1].type === 'lineEndingBlank'- ) {- otherIndex += 2- }- if (- otherIndex < subevents.length &&- subevents[otherIndex][1].type === 'content'- ) {- while (++otherIndex < subevents.length) {- if (subevents[otherIndex][1].type === 'content') {- break- }- if (subevents[otherIndex][1].type === 'chunkText') {- subevents[otherIndex][1]._isInFirstContentOfListItem = true- otherIndex++- }- }- }- }-- // Enter.- if (event[0] === 'enter') {- if (event[1].contentType) {- Object.assign(jumps, subcontent(events, index))- index = jumps[index]- more = true- }- }- // Exit.- else if (event[1]._container) {- otherIndex = index- lineIndex = undefined- while (otherIndex--) {- otherEvent = events[otherIndex]- if (- otherEvent[1].type === 'lineEnding' ||- otherEvent[1].type === 'lineEndingBlank'- ) {- if (otherEvent[0] === 'enter') {- if (lineIndex) {- events[lineIndex][1].type = 'lineEndingBlank'- }- otherEvent[1].type = 'lineEnding'- lineIndex = otherIndex- }- } else {- break- }- }- if (lineIndex) {- // Fix position.- event[1].end = Object.assign({}, events[lineIndex][1].start)-- // Switch container exit w/ line endings.- parameters = events.slice(lineIndex, index)- parameters.unshift(event)- splice(events, lineIndex, index - lineIndex + 1, parameters)- }- }- }- return !more-}--/**- * Tokenize embedded tokens.- *- * @param {Array<Event>} events- * @param {number} eventIndex- * @returns {Record<string, number>}- */-function subcontent(events, eventIndex) {- const token = events[eventIndex][1]- const context = events[eventIndex][2]- let startPosition = eventIndex - 1- /** @type {Array<number>} */- const startPositions = []- const tokenizer =- token._tokenizer || context.parser[token.contentType](token.start)- const childEvents = tokenizer.events- /** @type {Array<[number, number]>} */- const jumps = []- /** @type {Record<string, number>} */- const gaps = {}- /** @type {Array<Chunk>} */- let stream- /** @type {Token | undefined} */- let previous- let index = -1- /** @type {Token | undefined} */- let current = token- let adjust = 0- let start = 0- const breaks = [start]-- // Loop forward through the linked tokens to pass them in order to the- // subtokenizer.- while (current) {- // Find the position of the event for this token.- while (events[++startPosition][1] !== current) {- // Empty.- }- startPositions.push(startPosition)- if (!current._tokenizer) {- stream = context.sliceStream(current)- if (!current.next) {- stream.push(null)- }- if (previous) {- tokenizer.defineSkip(current.start)- }- if (current._isInFirstContentOfListItem) {- tokenizer._gfmTasklistFirstContentOfListItem = true- }- tokenizer.write(stream)- if (current._isInFirstContentOfListItem) {- tokenizer._gfmTasklistFirstContentOfListItem = undefined- }- }-- // Unravel the next token.- previous = current- current = current.next- }-- // Now, loop back through all events (and linked tokens), to figure out which- // parts belong where.- current = token- while (++index < childEvents.length) {- if (- // Find a void token that includes a break.- childEvents[index][0] === 'exit' &&- childEvents[index - 1][0] === 'enter' &&- childEvents[index][1].type === childEvents[index - 1][1].type &&- childEvents[index][1].start.line !== childEvents[index][1].end.line- ) {- start = index + 1- breaks.push(start)- // Help GC.- current._tokenizer = undefined- current.previous = undefined- current = current.next- }- }-- // Help GC.- tokenizer.events = []-- // If there’s one more token (which is the cases for lines that end in an- // EOF), that’s perfect: the last point we found starts it.- // If there isn’t then make sure any remaining content is added to it.- if (current) {- // Help GC.- current._tokenizer = undefined- current.previous = undefined- } else {- breaks.pop()- }-- // Now splice the events from the subtokenizer into the current events,- // moving back to front so that splice indices aren’t affected.- index = breaks.length- while (index--) {- const slice = childEvents.slice(breaks[index], breaks[index + 1])- const start = startPositions.pop()- jumps.unshift([start, start + slice.length - 1])- splice(events, start, 2, slice)- }- index = -1- while (++index < jumps.length) {- gaps[adjust + jumps[index][0]] = adjust + jumps[index][1]- adjust += jumps[index][1] - jumps[index][0] - 1- }- return gaps-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/content.js-/**- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').Resolver} Resolver- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').Token} Token- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */-----/**- * No name because it must not be turned off.- * @type {Construct}- */-const content_content = {- tokenize: tokenizeContent,- resolve: resolveContent-}--/** @type {Construct} */-const continuationConstruct = {- tokenize: tokenizeContinuation,- partial: true-}--/**- * Content is transparent: it’s parsed right now. That way, definitions are also- * parsed right now: before text in paragraphs (specifically, media) are parsed.- *- * @type {Resolver}- */-function resolveContent(events) {- subtokenize(events)- return events-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeContent(effects, ok) {- /** @type {Token | undefined} */- let previous- return chunkStart-- /**- * Before a content chunk.- *- * ```markdown- * > | abc- * ^- * ```- *- * @type {State}- */- function chunkStart(code) {- effects.enter('content')- previous = effects.enter('chunkContent', {- contentType: 'content'- })- return chunkInside(code)- }-- /**- * In a content chunk.- *- * ```markdown- * > | abc- * ^^^- * ```- *- * @type {State}- */- function chunkInside(code) {- if (code === null) {- return contentEnd(code)- }-- // To do: in `markdown-rs`, each line is parsed on its own, and everything- // is stitched together resolving.- if (markdownLineEnding(code)) {- return effects.check(- continuationConstruct,- contentContinue,- contentEnd- )(code)- }-- // Data.- effects.consume(code)- return chunkInside- }-- /**- *- *- * @type {State}- */- function contentEnd(code) {- effects.exit('chunkContent')- effects.exit('content')- return ok(code)- }-- /**- *- *- * @type {State}- */- function contentContinue(code) {- effects.consume(code)- effects.exit('chunkContent')- previous.next = effects.enter('chunkContent', {- contentType: 'content',- previous- })- previous = previous.next- return chunkInside- }-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeContinuation(effects, ok, nok) {- const self = this- return startLookahead-- /**- *- *- * @type {State}- */- function startLookahead(code) {- effects.exit('chunkContent')- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- return factorySpace(effects, prefixed, 'linePrefix')- }-- /**- *- *- * @type {State}- */- function prefixed(code) {- if (code === null || markdownLineEnding(code)) {- return nok(code)- }-- // Always populated by defaults.-- const tail = self.events[self.events.length - 1]- if (- !self.parser.constructs.disable.null.includes('codeIndented') &&- tail &&- tail[1].type === 'linePrefix' &&- tail[2].sliceSerialize(tail[1], true).length >= 4- ) {- return ok(code)- }- return effects.interrupt(self.parser.constructs.flow, nok, ok)(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark/lib/initialize/flow.js-/**- * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct- * @typedef {import('micromark-util-types').Initializer} Initializer- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- */-----/** @type {InitialConstruct} */-const flow = {- tokenize: initializeFlow-}--/**- * @this {TokenizeContext}- * @type {Initializer}- */-function initializeFlow(effects) {- const self = this- const initial = effects.attempt(- // Try to parse a blank line.- blankLine,- atBlankEnding,- // Try to parse initial flow (essentially, only code).- effects.attempt(- this.parser.constructs.flowInitial,- afterConstruct,- factorySpace(- effects,- effects.attempt(- this.parser.constructs.flow,- afterConstruct,- effects.attempt(content_content, afterConstruct)- ),- 'linePrefix'- )- )- )- return initial-- /** @type {State} */- function atBlankEnding(code) {- if (code === null) {- effects.consume(code)- return- }- effects.enter('lineEndingBlank')- effects.consume(code)- effects.exit('lineEndingBlank')- self.currentConstruct = undefined- return initial- }-- /** @type {State} */- function afterConstruct(code) {- if (code === null) {- effects.consume(code)- return- }- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- self.currentConstruct = undefined- return initial- }-}--;// CONCATENATED MODULE: ./node_modules/micromark/lib/initialize/text.js-/**- * @typedef {import('micromark-util-types').Code} Code- * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct- * @typedef {import('micromark-util-types').Initializer} Initializer- * @typedef {import('micromark-util-types').Resolver} Resolver- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- */--const resolver = {- resolveAll: createResolver()-}-const string = initializeFactory('string')-const text_text = initializeFactory('text')--/**- * @param {'string' | 'text'} field- * @returns {InitialConstruct}- */-function initializeFactory(field) {- return {- tokenize: initializeText,- resolveAll: createResolver(- field === 'text' ? resolveAllLineSuffixes : undefined- )- }-- /**- * @this {TokenizeContext}- * @type {Initializer}- */- function initializeText(effects) {- const self = this- const constructs = this.parser.constructs[field]- const text = effects.attempt(constructs, start, notText)- return start-- /** @type {State} */- function start(code) {- return atBreak(code) ? text(code) : notText(code)- }-- /** @type {State} */- function notText(code) {- if (code === null) {- effects.consume(code)- return- }- effects.enter('data')- effects.consume(code)- return data- }-- /** @type {State} */- function data(code) {- if (atBreak(code)) {- effects.exit('data')- return text(code)- }-- // Data.- effects.consume(code)- return data- }-- /**- * @param {Code} code- * @returns {boolean}- */- function atBreak(code) {- if (code === null) {- return true- }- const list = constructs[code]- let index = -1- if (list) {- // Always populated by defaults.-- while (++index < list.length) {- const item = list[index]- if (!item.previous || item.previous.call(self, self.previous)) {- return true- }- }- }- return false- }- }-}--/**- * @param {Resolver | undefined} [extraResolver]- * @returns {Resolver}- */-function createResolver(extraResolver) {- return resolveAllText-- /** @type {Resolver} */- function resolveAllText(events, context) {- let index = -1- /** @type {number | undefined} */- let enter-- // A rather boring computation (to merge adjacent `data` events) which- // improves mm performance by 29%.- while (++index <= events.length) {- if (enter === undefined) {- if (events[index] && events[index][1].type === 'data') {- enter = index- index++- }- } else if (!events[index] || events[index][1].type !== 'data') {- // Don’t do anything if there is one data token.- if (index !== enter + 2) {- events[enter][1].end = events[index - 1][1].end- events.splice(enter + 2, index - enter - 2)- index = enter + 2- }- enter = undefined- }- }- return extraResolver ? extraResolver(events, context) : events- }-}--/**- * A rather ugly set of instructions which again looks at chunks in the input- * stream.- * The reason to do this here is that it is *much* faster to parse in reverse.- * And that we can’t hook into `null` to split the line suffix before an EOF.- * To do: figure out if we can make this into a clean utility, or even in core.- * As it will be useful for GFMs literal autolink extension (and maybe even- * tables?)- *- * @type {Resolver}- */-function resolveAllLineSuffixes(events, context) {- let eventIndex = 0 // Skip first.-- while (++eventIndex <= events.length) {- if (- (eventIndex === events.length ||- events[eventIndex][1].type === 'lineEnding') &&- events[eventIndex - 1][1].type === 'data'- ) {- const data = events[eventIndex - 1][1]- const chunks = context.sliceStream(data)- let index = chunks.length- let bufferIndex = -1- let size = 0- /** @type {boolean | undefined} */- let tabs- while (index--) {- const chunk = chunks[index]- if (typeof chunk === 'string') {- bufferIndex = chunk.length- while (chunk.charCodeAt(bufferIndex - 1) === 32) {- size++- bufferIndex--- }- if (bufferIndex) break- bufferIndex = -1- }- // Number- else if (chunk === -2) {- tabs = true- size++- } else if (chunk === -1) {- // Empty- } else {- // Replacement character, exit.- index++- break- }- }- if (size) {- const token = {- type:- eventIndex === events.length || tabs || size < 2- ? 'lineSuffix'- : 'hardBreakTrailing',- start: {- line: data.end.line,- column: data.end.column - size,- offset: data.end.offset - size,- _index: data.start._index + index,- _bufferIndex: index- ? bufferIndex- : data.start._bufferIndex + bufferIndex- },- end: Object.assign({}, data.end)- }- data.end = Object.assign({}, token.start)- if (data.start.offset === data.end.offset) {- Object.assign(data, token)- } else {- events.splice(- eventIndex,- 0,- ['enter', token, context],- ['exit', token, context]- )- eventIndex += 2- }- }- eventIndex++- }- }- return events-}--;// CONCATENATED MODULE: ./node_modules/micromark-util-resolve-all/index.js-/**- * @typedef {import('micromark-util-types').Event} Event- * @typedef {import('micromark-util-types').Resolver} Resolver- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- */--/**- * Call all `resolveAll`s.- *- * @param {Array<{resolveAll?: Resolver | undefined}>} constructs- * List of constructs, optionally with `resolveAll`s.- * @param {Array<Event>} events- * List of events.- * @param {TokenizeContext} context- * Context used by `tokenize`.- * @returns {Array<Event>}- * Changed events.- */-function resolveAll(constructs, events, context) {- /** @type {Array<Resolver>} */- const called = []- let index = -1-- while (++index < constructs.length) {- const resolve = constructs[index].resolveAll-- if (resolve && !called.includes(resolve)) {- events = resolve(events, context)- called.push(resolve)- }- }-- return events-}--;// CONCATENATED MODULE: ./node_modules/micromark/lib/create-tokenizer.js-/**- * @typedef {import('micromark-util-types').Chunk} Chunk- * @typedef {import('micromark-util-types').Code} Code- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord- * @typedef {import('micromark-util-types').Effects} Effects- * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct- * @typedef {import('micromark-util-types').ParseContext} ParseContext- * @typedef {import('micromark-util-types').Point} Point- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').Token} Token- * @typedef {import('micromark-util-types').TokenType} TokenType- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- */--/**- * @callback Restore- * @returns {void}- *- * @typedef Info- * @property {Restore} restore- * @property {number} from- *- * @callback ReturnHandle- * Handle a successful run.- * @param {Construct} construct- * @param {Info} info- * @returns {void}- */-----/**- * Create a tokenizer.- * Tokenizers deal with one type of data (e.g., containers, flow, text).- * The parser is the object dealing with it all.- * `initialize` works like other constructs, except that only its `tokenize`- * function is used, in which case it doesn’t receive an `ok` or `nok`.- * `from` can be given to set the point before the first character, although- * when further lines are indented, they must be set with `defineSkip`.- *- * @param {ParseContext} parser- * @param {InitialConstruct} initialize- * @param {Omit<Point, '_bufferIndex' | '_index'> | undefined} [from]- * @returns {TokenizeContext}- */-function createTokenizer(parser, initialize, from) {- /** @type {Point} */- let point = Object.assign(- from- ? Object.assign({}, from)- : {- line: 1,- column: 1,- offset: 0- },- {- _index: 0,- _bufferIndex: -1- }- )- /** @type {Record<string, number>} */- const columnStart = {}- /** @type {Array<Construct>} */- const resolveAllConstructs = []- /** @type {Array<Chunk>} */- let chunks = []- /** @type {Array<Token>} */- let stack = []- /** @type {boolean | undefined} */- let consumed = true-- /**- * Tools used for tokenizing.- *- * @type {Effects}- */- const effects = {- consume,- enter,- exit,- attempt: constructFactory(onsuccessfulconstruct),- check: constructFactory(onsuccessfulcheck),- interrupt: constructFactory(onsuccessfulcheck, {- interrupt: true- })- }-- /**- * State and tools for resolving and serializing.- *- * @type {TokenizeContext}- */- const context = {- previous: null,- code: null,- containerState: {},- events: [],- parser,- sliceStream,- sliceSerialize,- now,- defineSkip,- write- }-- /**- * The state function.- *- * @type {State | void}- */- let state = initialize.tokenize.call(context, effects)-- /**- * Track which character we expect to be consumed, to catch bugs.- *- * @type {Code}- */- let expectedCode- if (initialize.resolveAll) {- resolveAllConstructs.push(initialize)- }- return context-- /** @type {TokenizeContext['write']} */- function write(slice) {- chunks = push(chunks, slice)- main()-- // Exit if we’re not done, resolve might change stuff.- if (chunks[chunks.length - 1] !== null) {- return []- }- addResult(initialize, 0)-- // Otherwise, resolve, and exit.- context.events = resolveAll(resolveAllConstructs, context.events, context)- return context.events- }-- //- // Tools.- //-- /** @type {TokenizeContext['sliceSerialize']} */- function sliceSerialize(token, expandTabs) {- return serializeChunks(sliceStream(token), expandTabs)- }-- /** @type {TokenizeContext['sliceStream']} */- function sliceStream(token) {- return sliceChunks(chunks, token)- }-- /** @type {TokenizeContext['now']} */- function now() {- // This is a hot path, so we clone manually instead of `Object.assign({}, point)`- const {line, column, offset, _index, _bufferIndex} = point- return {- line,- column,- offset,- _index,- _bufferIndex- }- }-- /** @type {TokenizeContext['defineSkip']} */- function defineSkip(value) {- columnStart[value.line] = value.column- accountForPotentialSkip()- }-- //- // State management.- //-- /**- * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by- * `consume`).- * Here is where we walk through the chunks, which either include strings of- * several characters, or numerical character codes.- * The reason to do this in a loop instead of a call is so the stack can- * drain.- *- * @returns {void}- */- function main() {- /** @type {number} */- let chunkIndex- while (point._index < chunks.length) {- const chunk = chunks[point._index]-- // If we’re in a buffer chunk, loop through it.- if (typeof chunk === 'string') {- chunkIndex = point._index- if (point._bufferIndex < 0) {- point._bufferIndex = 0- }- while (- point._index === chunkIndex &&- point._bufferIndex < chunk.length- ) {- go(chunk.charCodeAt(point._bufferIndex))- }- } else {- go(chunk)- }- }- }-- /**- * Deal with one code.- *- * @param {Code} code- * @returns {void}- */- function go(code) {- consumed = undefined- expectedCode = code- state = state(code)- }-- /** @type {Effects['consume']} */- function consume(code) {- if (markdownLineEnding(code)) {- point.line++- point.column = 1- point.offset += code === -3 ? 2 : 1- accountForPotentialSkip()- } else if (code !== -1) {- point.column++- point.offset++- }-- // Not in a string chunk.- if (point._bufferIndex < 0) {- point._index++- } else {- point._bufferIndex++-- // At end of string chunk.- // @ts-expect-error Points w/ non-negative `_bufferIndex` reference- // strings.- if (point._bufferIndex === chunks[point._index].length) {- point._bufferIndex = -1- point._index++- }- }-- // Expose the previous character.- context.previous = code-- // Mark as consumed.- consumed = true- }-- /** @type {Effects['enter']} */- function enter(type, fields) {- /** @type {Token} */- // @ts-expect-error Patch instead of assign required fields to help GC.- const token = fields || {}- token.type = type- token.start = now()- context.events.push(['enter', token, context])- stack.push(token)- return token- }-- /** @type {Effects['exit']} */- function exit(type) {- const token = stack.pop()- token.end = now()- context.events.push(['exit', token, context])- return token- }-- /**- * Use results.- *- * @type {ReturnHandle}- */- function onsuccessfulconstruct(construct, info) {- addResult(construct, info.from)- }-- /**- * Discard results.- *- * @type {ReturnHandle}- */- function onsuccessfulcheck(_, info) {- info.restore()- }-- /**- * Factory to attempt/check/interrupt.- *- * @param {ReturnHandle} onreturn- * @param {{interrupt?: boolean | undefined} | undefined} [fields]- */- function constructFactory(onreturn, fields) {- return hook-- /**- * Handle either an object mapping codes to constructs, a list of- * constructs, or a single construct.- *- * @param {Array<Construct> | Construct | ConstructRecord} constructs- * @param {State} returnState- * @param {State | undefined} [bogusState]- * @returns {State}- */- function hook(constructs, returnState, bogusState) {- /** @type {Array<Construct>} */- let listOfConstructs- /** @type {number} */- let constructIndex- /** @type {Construct} */- let currentConstruct- /** @type {Info} */- let info- return Array.isArray(constructs) /* c8 ignore next 1 */- ? handleListOfConstructs(constructs)- : 'tokenize' in constructs- ? // @ts-expect-error Looks like a construct.- handleListOfConstructs([constructs])- : handleMapOfConstructs(constructs)-- /**- * Handle a list of construct.- *- * @param {ConstructRecord} map- * @returns {State}- */- function handleMapOfConstructs(map) {- return start-- /** @type {State} */- function start(code) {- const def = code !== null && map[code]- const all = code !== null && map.null- const list = [- // To do: add more extension tests.- /* c8 ignore next 2 */- ...(Array.isArray(def) ? def : def ? [def] : []),- ...(Array.isArray(all) ? all : all ? [all] : [])- ]- return handleListOfConstructs(list)(code)- }- }-- /**- * Handle a list of construct.- *- * @param {Array<Construct>} list- * @returns {State}- */- function handleListOfConstructs(list) {- listOfConstructs = list- constructIndex = 0- if (list.length === 0) {- return bogusState- }- return handleConstruct(list[constructIndex])- }-- /**- * Handle a single construct.- *- * @param {Construct} construct- * @returns {State}- */- function handleConstruct(construct) {- return start-- /** @type {State} */- function start(code) {- // To do: not needed to store if there is no bogus state, probably?- // Currently doesn’t work because `inspect` in document does a check- // w/o a bogus, which doesn’t make sense. But it does seem to help perf- // by not storing.- info = store()- currentConstruct = construct- if (!construct.partial) {- context.currentConstruct = construct- }-- // Always populated by defaults.-- if (- construct.name &&- context.parser.constructs.disable.null.includes(construct.name)- ) {- return nok(code)- }- return construct.tokenize.call(- // If we do have fields, create an object w/ `context` as its- // prototype.- // This allows a “live binding”, which is needed for `interrupt`.- fields ? Object.assign(Object.create(context), fields) : context,- effects,- ok,- nok- )(code)- }- }-- /** @type {State} */- function ok(code) {- consumed = true- onreturn(currentConstruct, info)- return returnState- }-- /** @type {State} */- function nok(code) {- consumed = true- info.restore()- if (++constructIndex < listOfConstructs.length) {- return handleConstruct(listOfConstructs[constructIndex])- }- return bogusState- }- }- }-- /**- * @param {Construct} construct- * @param {number} from- * @returns {void}- */- function addResult(construct, from) {- if (construct.resolveAll && !resolveAllConstructs.includes(construct)) {- resolveAllConstructs.push(construct)- }- if (construct.resolve) {- splice(- context.events,- from,- context.events.length - from,- construct.resolve(context.events.slice(from), context)- )- }- if (construct.resolveTo) {- context.events = construct.resolveTo(context.events, context)- }- }-- /**- * Store state.- *- * @returns {Info}- */- function store() {- const startPoint = now()- const startPrevious = context.previous- const startCurrentConstruct = context.currentConstruct- const startEventsIndex = context.events.length- const startStack = Array.from(stack)- return {- restore,- from: startEventsIndex- }-- /**- * Restore state.- *- * @returns {void}- */- function restore() {- point = startPoint- context.previous = startPrevious- context.currentConstruct = startCurrentConstruct- context.events.length = startEventsIndex- stack = startStack- accountForPotentialSkip()- }- }-- /**- * Move the current point a bit forward in the line when it’s on a column- * skip.- *- * @returns {void}- */- function accountForPotentialSkip() {- if (point.line in columnStart && point.column < 2) {- point.column = columnStart[point.line]- point.offset += columnStart[point.line] - 1- }- }-}--/**- * Get the chunks from a slice of chunks in the range of a token.- *- * @param {Array<Chunk>} chunks- * @param {Pick<Token, 'end' | 'start'>} token- * @returns {Array<Chunk>}- */-function sliceChunks(chunks, token) {- const startIndex = token.start._index- const startBufferIndex = token.start._bufferIndex- const endIndex = token.end._index- const endBufferIndex = token.end._bufferIndex- /** @type {Array<Chunk>} */- let view- if (startIndex === endIndex) {- // @ts-expect-error `_bufferIndex` is used on string chunks.- view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)]- } else {- view = chunks.slice(startIndex, endIndex)- if (startBufferIndex > -1) {- const head = view[0]- if (typeof head === 'string') {- view[0] = head.slice(startBufferIndex)- } else {- view.shift()- }- }- if (endBufferIndex > 0) {- // @ts-expect-error `_bufferIndex` is used on string chunks.- view.push(chunks[endIndex].slice(0, endBufferIndex))- }- }- return view-}--/**- * Get the string value of a slice of chunks.- *- * @param {Array<Chunk>} chunks- * @param {boolean | undefined} [expandTabs=false]- * @returns {string}- */-function serializeChunks(chunks, expandTabs) {- let index = -1- /** @type {Array<string>} */- const result = []- /** @type {boolean | undefined} */- let atTab- while (++index < chunks.length) {- const chunk = chunks[index]- /** @type {string} */- let value- if (typeof chunk === 'string') {- value = chunk- } else- switch (chunk) {- case -5: {- value = '\r'- break- }- case -4: {- value = '\n'- break- }- case -3: {- value = '\r' + '\n'- break- }- case -2: {- value = expandTabs ? ' ' : '\t'- break- }- case -1: {- if (!expandTabs && atTab) continue- value = ' '- break- }- default: {- // Currently only replacement character.- value = String.fromCharCode(chunk)- }- }- atTab = chunk === -2- result.push(value)- }- return result.join('')-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/thematic-break.js-/**- * @typedef {import('micromark-util-types').Code} Code- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */----/** @type {Construct} */-const thematicBreak = {- name: 'thematicBreak',- tokenize: tokenizeThematicBreak-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeThematicBreak(effects, ok, nok) {- let size = 0- /** @type {NonNullable<Code>} */- let marker- return start-- /**- * Start of thematic break.- *- * ```markdown- * > | ***- * ^- * ```- *- * @type {State}- */- function start(code) {- effects.enter('thematicBreak')- // To do: parse indent like `markdown-rs`.- return before(code)- }-- /**- * After optional whitespace, at marker.- *- * ```markdown- * > | ***- * ^- * ```- *- * @type {State}- */- function before(code) {- marker = code- return atBreak(code)- }-- /**- * After something, before something else.- *- * ```markdown- * > | ***- * ^- * ```- *- * @type {State}- */- function atBreak(code) {- if (code === marker) {- effects.enter('thematicBreakSequence')- return sequence(code)- }- if (size >= 3 && (code === null || markdownLineEnding(code))) {- effects.exit('thematicBreak')- return ok(code)- }- return nok(code)- }-- /**- * In sequence.- *- * ```markdown- * > | ***- * ^- * ```- *- * @type {State}- */- function sequence(code) {- if (code === marker) {- effects.consume(code)- size++- return sequence- }- effects.exit('thematicBreakSequence')- return markdownSpace(code)- ? factorySpace(effects, atBreak, 'whitespace')(code)- : atBreak(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/list.js-/**- * @typedef {import('micromark-util-types').Code} Code- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').ContainerState} ContainerState- * @typedef {import('micromark-util-types').Exiter} Exiter- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */-------/** @type {Construct} */-const list = {- name: 'list',- tokenize: tokenizeListStart,- continuation: {- tokenize: tokenizeListContinuation- },- exit: tokenizeListEnd-}--/** @type {Construct} */-const listItemPrefixWhitespaceConstruct = {- tokenize: tokenizeListItemPrefixWhitespace,- partial: true-}--/** @type {Construct} */-const indentConstruct = {- tokenize: tokenizeIndent,- partial: true-}--// To do: `markdown-rs` parses list items on their own and later stitches them-// together.--/**- * @type {Tokenizer}- * @this {TokenizeContext}- */-function tokenizeListStart(effects, ok, nok) {- const self = this- const tail = self.events[self.events.length - 1]- let initialSize =- tail && tail[1].type === 'linePrefix'- ? tail[2].sliceSerialize(tail[1], true).length- : 0- let size = 0- return start-- /** @type {State} */- function start(code) {- const kind =- self.containerState.type ||- (code === 42 || code === 43 || code === 45- ? 'listUnordered'- : 'listOrdered')- if (- kind === 'listUnordered'- ? !self.containerState.marker || code === self.containerState.marker- : asciiDigit(code)- ) {- if (!self.containerState.type) {- self.containerState.type = kind- effects.enter(kind, {- _container: true- })- }- if (kind === 'listUnordered') {- effects.enter('listItemPrefix')- return code === 42 || code === 45- ? effects.check(thematicBreak, nok, atMarker)(code)- : atMarker(code)- }- if (!self.interrupt || code === 49) {- effects.enter('listItemPrefix')- effects.enter('listItemValue')- return inside(code)- }- }- return nok(code)- }-- /** @type {State} */- function inside(code) {- if (asciiDigit(code) && ++size < 10) {- effects.consume(code)- return inside- }- if (- (!self.interrupt || size < 2) &&- (self.containerState.marker- ? code === self.containerState.marker- : code === 41 || code === 46)- ) {- effects.exit('listItemValue')- return atMarker(code)- }- return nok(code)- }-- /**- * @type {State}- **/- function atMarker(code) {- effects.enter('listItemMarker')- effects.consume(code)- effects.exit('listItemMarker')- self.containerState.marker = self.containerState.marker || code- return effects.check(- blankLine,- // Can’t be empty when interrupting.- self.interrupt ? nok : onBlank,- effects.attempt(- listItemPrefixWhitespaceConstruct,- endOfPrefix,- otherPrefix- )- )- }-- /** @type {State} */- function onBlank(code) {- self.containerState.initialBlankLine = true- initialSize++- return endOfPrefix(code)- }-- /** @type {State} */- function otherPrefix(code) {- if (markdownSpace(code)) {- effects.enter('listItemPrefixWhitespace')- effects.consume(code)- effects.exit('listItemPrefixWhitespace')- return endOfPrefix- }- return nok(code)- }-- /** @type {State} */- function endOfPrefix(code) {- self.containerState.size =- initialSize +- self.sliceSerialize(effects.exit('listItemPrefix'), true).length- return ok(code)- }-}--/**- * @type {Tokenizer}- * @this {TokenizeContext}- */-function tokenizeListContinuation(effects, ok, nok) {- const self = this- self.containerState._closeFlow = undefined- return effects.check(blankLine, onBlank, notBlank)-- /** @type {State} */- function onBlank(code) {- self.containerState.furtherBlankLines =- self.containerState.furtherBlankLines ||- self.containerState.initialBlankLine-- // We have a blank line.- // Still, try to consume at most the items size.- return factorySpace(- effects,- ok,- 'listItemIndent',- self.containerState.size + 1- )(code)- }-- /** @type {State} */- function notBlank(code) {- if (self.containerState.furtherBlankLines || !markdownSpace(code)) {- self.containerState.furtherBlankLines = undefined- self.containerState.initialBlankLine = undefined- return notInCurrentItem(code)- }- self.containerState.furtherBlankLines = undefined- self.containerState.initialBlankLine = undefined- return effects.attempt(indentConstruct, ok, notInCurrentItem)(code)- }-- /** @type {State} */- function notInCurrentItem(code) {- // While we do continue, we signal that the flow should be closed.- self.containerState._closeFlow = true- // As we’re closing flow, we’re no longer interrupting.- self.interrupt = undefined- // Always populated by defaults.-- return factorySpace(- effects,- effects.attempt(list, ok, nok),- 'linePrefix',- self.parser.constructs.disable.null.includes('codeIndented')- ? undefined- : 4- )(code)- }-}--/**- * @type {Tokenizer}- * @this {TokenizeContext}- */-function tokenizeIndent(effects, ok, nok) {- const self = this- return factorySpace(- effects,- afterPrefix,- 'listItemIndent',- self.containerState.size + 1- )-- /** @type {State} */- function afterPrefix(code) {- const tail = self.events[self.events.length - 1]- return tail &&- tail[1].type === 'listItemIndent' &&- tail[2].sliceSerialize(tail[1], true).length === self.containerState.size- ? ok(code)- : nok(code)- }-}--/**- * @type {Exiter}- * @this {TokenizeContext}- */-function tokenizeListEnd(effects) {- effects.exit(this.containerState.type)-}--/**- * @type {Tokenizer}- * @this {TokenizeContext}- */-function tokenizeListItemPrefixWhitespace(effects, ok, nok) {- const self = this-- // Always populated by defaults.-- return factorySpace(- effects,- afterPrefix,- 'listItemPrefixWhitespace',- self.parser.constructs.disable.null.includes('codeIndented')- ? undefined- : 4 + 1- )-- /** @type {State} */- function afterPrefix(code) {- const tail = self.events[self.events.length - 1]- return !markdownSpace(code) &&- tail &&- tail[1].type === 'listItemPrefixWhitespace'- ? ok(code)- : nok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/block-quote.js-/**- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').Exiter} Exiter- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */----/** @type {Construct} */-const blockQuote = {- name: 'blockQuote',- tokenize: tokenizeBlockQuoteStart,- continuation: {- tokenize: tokenizeBlockQuoteContinuation- },- exit-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeBlockQuoteStart(effects, ok, nok) {- const self = this- return start-- /**- * Start of block quote.- *- * ```markdown- * > | > a- * ^- * ```- *- * @type {State}- */- function start(code) {- if (code === 62) {- const state = self.containerState- if (!state.open) {- effects.enter('blockQuote', {- _container: true- })- state.open = true- }- effects.enter('blockQuotePrefix')- effects.enter('blockQuoteMarker')- effects.consume(code)- effects.exit('blockQuoteMarker')- return after- }- return nok(code)- }-- /**- * After `>`, before optional whitespace.- *- * ```markdown- * > | > a- * ^- * ```- *- * @type {State}- */- function after(code) {- if (markdownSpace(code)) {- effects.enter('blockQuotePrefixWhitespace')- effects.consume(code)- effects.exit('blockQuotePrefixWhitespace')- effects.exit('blockQuotePrefix')- return ok- }- effects.exit('blockQuotePrefix')- return ok(code)- }-}--/**- * Start of block quote continuation.- *- * ```markdown- * | > a- * > | > b- * ^- * ```- *- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeBlockQuoteContinuation(effects, ok, nok) {- const self = this- return contStart-- /**- * Start of block quote continuation.- *- * Also used to parse the first block quote opening.- *- * ```markdown- * | > a- * > | > b- * ^- * ```- *- * @type {State}- */- function contStart(code) {- if (markdownSpace(code)) {- // Always populated by defaults.-- return factorySpace(- effects,- contBefore,- 'linePrefix',- self.parser.constructs.disable.null.includes('codeIndented')- ? undefined- : 4- )(code)- }- return contBefore(code)- }-- /**- * At `>`, after optional whitespace.- *- * Also used to parse the first block quote opening.- *- * ```markdown- * | > a- * > | > b- * ^- * ```- *- * @type {State}- */- function contBefore(code) {- return effects.attempt(blockQuote, ok, nok)(code)- }-}--/** @type {Exiter} */-function exit(effects) {- effects.exit('blockQuote')-}--;// CONCATENATED MODULE: ./node_modules/micromark-factory-destination/index.js-/**- * @typedef {import('micromark-util-types').Effects} Effects- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenType} TokenType- */---/**- * Parse destinations.- *- * ###### Examples- *- * ```markdown- * <a>- * <a\>b>- * <a b>- * <a)>- * a- * a\)b- * a(b)c- * a(b)- * ```- *- * @param {Effects} effects- * Context.- * @param {State} ok- * State switched to when successful.- * @param {State} nok- * State switched to when unsuccessful.- * @param {TokenType} type- * Type for whole (`<a>` or `b`).- * @param {TokenType} literalType- * Type when enclosed (`<a>`).- * @param {TokenType} literalMarkerType- * Type for enclosing (`<` and `>`).- * @param {TokenType} rawType- * Type when not enclosed (`b`).- * @param {TokenType} stringType- * Type for the value (`a` or `b`).- * @param {number | undefined} [max=Infinity]- * Depth of nested parens (inclusive).- * @returns {State}- * Start state.- */ // eslint-disable-next-line max-params-function factoryDestination(- effects,- ok,- nok,- type,- literalType,- literalMarkerType,- rawType,- stringType,- max-) {- const limit = max || Number.POSITIVE_INFINITY- let balance = 0- return start-- /**- * Start of destination.- *- * ```markdown- * > | <aa>- * ^- * > | aa- * ^- * ```- *- * @type {State}- */- function start(code) {- if (code === 60) {- effects.enter(type)- effects.enter(literalType)- effects.enter(literalMarkerType)- effects.consume(code)- effects.exit(literalMarkerType)- return enclosedBefore- }-- // ASCII control, space, closing paren.- if (code === null || code === 32 || code === 41 || asciiControl(code)) {- return nok(code)- }- effects.enter(type)- effects.enter(rawType)- effects.enter(stringType)- effects.enter('chunkString', {- contentType: 'string'- })- return raw(code)- }-- /**- * After `<`, at an enclosed destination.- *- * ```markdown- * > | <aa>- * ^- * ```- *- * @type {State}- */- function enclosedBefore(code) {- if (code === 62) {- effects.enter(literalMarkerType)- effects.consume(code)- effects.exit(literalMarkerType)- effects.exit(literalType)- effects.exit(type)- return ok- }- effects.enter(stringType)- effects.enter('chunkString', {- contentType: 'string'- })- return enclosed(code)- }-- /**- * In enclosed destination.- *- * ```markdown- * > | <aa>- * ^- * ```- *- * @type {State}- */- function enclosed(code) {- if (code === 62) {- effects.exit('chunkString')- effects.exit(stringType)- return enclosedBefore(code)- }- if (code === null || code === 60 || markdownLineEnding(code)) {- return nok(code)- }- effects.consume(code)- return code === 92 ? enclosedEscape : enclosed- }-- /**- * After `\`, at a special character.- *- * ```markdown- * > | <a\*a>- * ^- * ```- *- * @type {State}- */- function enclosedEscape(code) {- if (code === 60 || code === 62 || code === 92) {- effects.consume(code)- return enclosed- }- return enclosed(code)- }-- /**- * In raw destination.- *- * ```markdown- * > | aa- * ^- * ```- *- * @type {State}- */- function raw(code) {- if (- !balance &&- (code === null || code === 41 || markdownLineEndingOrSpace(code))- ) {- effects.exit('chunkString')- effects.exit(stringType)- effects.exit(rawType)- effects.exit(type)- return ok(code)- }- if (balance < limit && code === 40) {- effects.consume(code)- balance++- return raw- }- if (code === 41) {- effects.consume(code)- balance--- return raw- }-- // ASCII control (but *not* `\0`) and space and `(`.- // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it- // doesn’t.- if (code === null || code === 32 || code === 40 || asciiControl(code)) {- return nok(code)- }- effects.consume(code)- return code === 92 ? rawEscape : raw- }-- /**- * After `\`, at special character.- *- * ```markdown- * > | a\*a- * ^- * ```- *- * @type {State}- */- function rawEscape(code) {- if (code === 40 || code === 41 || code === 92) {- effects.consume(code)- return raw- }- return raw(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-factory-label/index.js-/**- * @typedef {import('micromark-util-types').Effects} Effects- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').TokenType} TokenType- */---/**- * Parse labels.- *- * > 👉 **Note**: labels in markdown are capped at 999 characters in the string.- *- * ###### Examples- *- * ```markdown- * [a]- * [a- * b]- * [a\]b]- * ```- *- * @this {TokenizeContext}- * Tokenize context.- * @param {Effects} effects- * Context.- * @param {State} ok- * State switched to when successful.- * @param {State} nok- * State switched to when unsuccessful.- * @param {TokenType} type- * Type of the whole label (`[a]`).- * @param {TokenType} markerType- * Type for the markers (`[` and `]`).- * @param {TokenType} stringType- * Type for the identifier (`a`).- * @returns {State}- * Start state.- */ // eslint-disable-next-line max-params-function factoryLabel(effects, ok, nok, type, markerType, stringType) {- const self = this- let size = 0- /** @type {boolean} */- let seen- return start-- /**- * Start of label.- *- * ```markdown- * > | [a]- * ^- * ```- *- * @type {State}- */- function start(code) {- effects.enter(type)- effects.enter(markerType)- effects.consume(code)- effects.exit(markerType)- effects.enter(stringType)- return atBreak- }-- /**- * In label, at something, before something else.- *- * ```markdown- * > | [a]- * ^- * ```- *- * @type {State}- */- function atBreak(code) {- if (- size > 999 ||- code === null ||- code === 91 ||- (code === 93 && !seen) ||- // To do: remove in the future once we’ve switched from- // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,- // which doesn’t need this.- // Hidden footnotes hook.- /* c8 ignore next 3 */- (code === 94 &&- !size &&- '_hiddenFootnoteSupport' in self.parser.constructs)- ) {- return nok(code)- }- if (code === 93) {- effects.exit(stringType)- effects.enter(markerType)- effects.consume(code)- effects.exit(markerType)- effects.exit(type)- return ok- }-- // To do: indent? Link chunks and EOLs together?- if (markdownLineEnding(code)) {- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- return atBreak- }- effects.enter('chunkString', {- contentType: 'string'- })- return labelInside(code)- }-- /**- * In label, in text.- *- * ```markdown- * > | [a]- * ^- * ```- *- * @type {State}- */- function labelInside(code) {- if (- code === null ||- code === 91 ||- code === 93 ||- markdownLineEnding(code) ||- size++ > 999- ) {- effects.exit('chunkString')- return atBreak(code)- }- effects.consume(code)- if (!seen) seen = !markdownSpace(code)- return code === 92 ? labelEscape : labelInside- }-- /**- * After `\`, at a special character.- *- * ```markdown- * > | [a\*a]- * ^- * ```- *- * @type {State}- */- function labelEscape(code) {- if (code === 91 || code === 92 || code === 93) {- effects.consume(code)- size++- return labelInside- }- return labelInside(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-factory-title/index.js-/**- * @typedef {import('micromark-util-types').Code} Code- * @typedef {import('micromark-util-types').Effects} Effects- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenType} TokenType- */----/**- * Parse titles.- *- * ###### Examples- *- * ```markdown- * "a"- * 'b'- * (c)- * "a- * b"- * 'a- * b'- * (a\)b)- * ```- *- * @param {Effects} effects- * Context.- * @param {State} ok- * State switched to when successful.- * @param {State} nok- * State switched to when unsuccessful.- * @param {TokenType} type- * Type of the whole title (`"a"`, `'b'`, `(c)`).- * @param {TokenType} markerType- * Type for the markers (`"`, `'`, `(`, and `)`).- * @param {TokenType} stringType- * Type for the value (`a`).- * @returns {State}- * Start state.- */ // eslint-disable-next-line max-params-function factoryTitle(effects, ok, nok, type, markerType, stringType) {- /** @type {NonNullable<Code>} */- let marker- return start-- /**- * Start of title.- *- * ```markdown- * > | "a"- * ^- * ```- *- * @type {State}- */- function start(code) {- if (code === 34 || code === 39 || code === 40) {- effects.enter(type)- effects.enter(markerType)- effects.consume(code)- effects.exit(markerType)- marker = code === 40 ? 41 : code- return begin- }- return nok(code)- }-- /**- * After opening marker.- *- * This is also used at the closing marker.- *- * ```markdown- * > | "a"- * ^- * ```- *- * @type {State}- */- function begin(code) {- if (code === marker) {- effects.enter(markerType)- effects.consume(code)- effects.exit(markerType)- effects.exit(type)- return ok- }- effects.enter(stringType)- return atBreak(code)- }-- /**- * At something, before something else.- *- * ```markdown- * > | "a"- * ^- * ```- *- * @type {State}- */- function atBreak(code) {- if (code === marker) {- effects.exit(stringType)- return begin(marker)- }- if (code === null) {- return nok(code)- }-- // Note: blank lines can’t exist in content.- if (markdownLineEnding(code)) {- // To do: use `space_or_tab_eol_with_options`, connect.- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- return factorySpace(effects, atBreak, 'linePrefix')- }- effects.enter('chunkString', {- contentType: 'string'- })- return inside(code)- }-- /**- *- *- * @type {State}- */- function inside(code) {- if (code === marker || code === null || markdownLineEnding(code)) {- effects.exit('chunkString')- return atBreak(code)- }- effects.consume(code)- return code === 92 ? escape : inside- }-- /**- * After `\`, at a special character.- *- * ```markdown- * > | "a\*b"- * ^- * ```- *- * @type {State}- */- function escape(code) {- if (code === marker || code === 92) {- effects.consume(code)- return inside- }- return inside(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-factory-whitespace/index.js-/**- * @typedef {import('micromark-util-types').Effects} Effects- * @typedef {import('micromark-util-types').State} State- */----/**- * Parse spaces and tabs.- *- * There is no `nok` parameter:- *- * * line endings or spaces in markdown are often optional, in which case this- * factory can be used and `ok` will be switched to whether spaces were found- * or not- * * one line ending or space can be detected with- * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace`- *- * @param {Effects} effects- * Context.- * @param {State} ok- * State switched to when successful.- * @returns- * Start state.- */-function factoryWhitespace(effects, ok) {- /** @type {boolean} */- let seen- return start-- /** @type {State} */- function start(code) {- if (markdownLineEnding(code)) {- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- seen = true- return start- }- if (markdownSpace(code)) {- return factorySpace(- effects,- start,- seen ? 'linePrefix' : 'lineSuffix'- )(code)- }- return ok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-util-normalize-identifier/index.js-/**- * Normalize an identifier (as found in references, definitions).- *- * Collapses markdown whitespace, trim, and then lower- and uppercase.- *- * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their- * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different- * uppercase character (U+0398 (`Θ`)).- * So, to get a canonical form, we perform both lower- and uppercase.- *- * Using uppercase last makes sure keys will never interact with default- * prototypal values (such as `constructor`): nothing in the prototype of- * `Object` is uppercase.- *- * @param {string} value- * Identifier to normalize.- * @returns {string}- * Normalized identifier.- */-function normalizeIdentifier(value) {- return (- value- // Collapse markdown whitespace.- .replace(/[\t\n\r ]+/g, ' ')- // Trim.- .replace(/^ | $/g, '')- // Some characters are considered “uppercase”, but if their lowercase- // counterpart is uppercased will result in a different uppercase- // character.- // Hence, to get that form, we perform both lower- and uppercase.- // Upper case makes sure keys will not interact with default prototypal- // methods: no method is uppercase.- .toLowerCase()- .toUpperCase()- )-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/definition.js-/**- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */---------/** @type {Construct} */-const definition = {- name: 'definition',- tokenize: tokenizeDefinition-}--/** @type {Construct} */-const titleBefore = {- tokenize: tokenizeTitleBefore,- partial: true-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeDefinition(effects, ok, nok) {- const self = this- /** @type {string} */- let identifier- return start-- /**- * At start of a definition.- *- * ```markdown- * > | [a]: b "c"- * ^- * ```- *- * @type {State}- */- function start(code) {- // Do not interrupt paragraphs (but do follow definitions).- // To do: do `interrupt` the way `markdown-rs` does.- // To do: parse whitespace the way `markdown-rs` does.- effects.enter('definition')- return before(code)- }-- /**- * After optional whitespace, at `[`.- *- * ```markdown- * > | [a]: b "c"- * ^- * ```- *- * @type {State}- */- function before(code) {- // To do: parse whitespace the way `markdown-rs` does.-- return factoryLabel.call(- self,- effects,- labelAfter,- // Note: we don’t need to reset the way `markdown-rs` does.- nok,- 'definitionLabel',- 'definitionLabelMarker',- 'definitionLabelString'- )(code)- }-- /**- * After label.- *- * ```markdown- * > | [a]: b "c"- * ^- * ```- *- * @type {State}- */- function labelAfter(code) {- identifier = normalizeIdentifier(- self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)- )- if (code === 58) {- effects.enter('definitionMarker')- effects.consume(code)- effects.exit('definitionMarker')- return markerAfter- }- return nok(code)- }-- /**- * After marker.- *- * ```markdown- * > | [a]: b "c"- * ^- * ```- *- * @type {State}- */- function markerAfter(code) {- // Note: whitespace is optional.- return markdownLineEndingOrSpace(code)- ? factoryWhitespace(effects, destinationBefore)(code)- : destinationBefore(code)- }-- /**- * Before destination.- *- * ```markdown- * > | [a]: b "c"- * ^- * ```- *- * @type {State}- */- function destinationBefore(code) {- return factoryDestination(- effects,- destinationAfter,- // Note: we don’t need to reset the way `markdown-rs` does.- nok,- 'definitionDestination',- 'definitionDestinationLiteral',- 'definitionDestinationLiteralMarker',- 'definitionDestinationRaw',- 'definitionDestinationString'- )(code)- }-- /**- * After destination.- *- * ```markdown- * > | [a]: b "c"- * ^- * ```- *- * @type {State}- */- function destinationAfter(code) {- return effects.attempt(titleBefore, after, after)(code)- }-- /**- * After definition.- *- * ```markdown- * > | [a]: b- * ^- * > | [a]: b "c"- * ^- * ```- *- * @type {State}- */- function after(code) {- return markdownSpace(code)- ? factorySpace(effects, afterWhitespace, 'whitespace')(code)- : afterWhitespace(code)- }-- /**- * After definition, after optional whitespace.- *- * ```markdown- * > | [a]: b- * ^- * > | [a]: b "c"- * ^- * ```- *- * @type {State}- */- function afterWhitespace(code) {- if (code === null || markdownLineEnding(code)) {- effects.exit('definition')-- // Note: we don’t care about uniqueness.- // It’s likely that that doesn’t happen very frequently.- // It is more likely that it wastes precious time.- self.parser.defined.push(identifier)-- // To do: `markdown-rs` interrupt.- // // You’d be interrupting.- // tokenizer.interrupt = true- return ok(code)- }- return nok(code)- }-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeTitleBefore(effects, ok, nok) {- return titleBefore-- /**- * After destination, at whitespace.- *- * ```markdown- * > | [a]: b- * ^- * > | [a]: b "c"- * ^- * ```- *- * @type {State}- */- function titleBefore(code) {- return markdownLineEndingOrSpace(code)- ? factoryWhitespace(effects, beforeMarker)(code)- : nok(code)- }-- /**- * At title.- *- * ```markdown- * | [a]: b- * > | "c"- * ^- * ```- *- * @type {State}- */- function beforeMarker(code) {- return factoryTitle(- effects,- titleAfter,- nok,- 'definitionTitle',- 'definitionTitleMarker',- 'definitionTitleString'- )(code)- }-- /**- * After title.- *- * ```markdown- * > | [a]: b "c"- * ^- * ```- *- * @type {State}- */- function titleAfter(code) {- return markdownSpace(code)- ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code)- : titleAfterOptionalWhitespace(code)- }-- /**- * After title, after optional whitespace.- *- * ```markdown- * > | [a]: b "c"- * ^- * ```- *- * @type {State}- */- function titleAfterOptionalWhitespace(code) {- return code === null || markdownLineEnding(code) ? ok(code) : nok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/code-indented.js-/**- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */----/** @type {Construct} */-const codeIndented = {- name: 'codeIndented',- tokenize: tokenizeCodeIndented-}--/** @type {Construct} */-const furtherStart = {- tokenize: tokenizeFurtherStart,- partial: true-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeCodeIndented(effects, ok, nok) {- const self = this- return start-- /**- * Start of code (indented).- *- * > **Parsing note**: it is not needed to check if this first line is a- * > filled line (that it has a non-whitespace character), because blank lines- * > are parsed already, so we never run into that.- *- * ```markdown- * > | aaa- * ^- * ```- *- * @type {State}- */- function start(code) {- // To do: manually check if interrupting like `markdown-rs`.-- effects.enter('codeIndented')- // To do: use an improved `space_or_tab` function like `markdown-rs`,- // so that we can drop the next state.- return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code)- }-- /**- * At start, after 1 or 4 spaces.- *- * ```markdown- * > | aaa- * ^- * ```- *- * @type {State}- */- function afterPrefix(code) {- const tail = self.events[self.events.length - 1]- return tail &&- tail[1].type === 'linePrefix' &&- tail[2].sliceSerialize(tail[1], true).length >= 4- ? atBreak(code)- : nok(code)- }-- /**- * At a break.- *- * ```markdown- * > | aaa- * ^ ^- * ```- *- * @type {State}- */- function atBreak(code) {- if (code === null) {- return after(code)- }- if (markdownLineEnding(code)) {- return effects.attempt(furtherStart, atBreak, after)(code)- }- effects.enter('codeFlowValue')- return inside(code)- }-- /**- * In code content.- *- * ```markdown- * > | aaa- * ^^^^- * ```- *- * @type {State}- */- function inside(code) {- if (code === null || markdownLineEnding(code)) {- effects.exit('codeFlowValue')- return atBreak(code)- }- effects.consume(code)- return inside- }-- /** @type {State} */- function after(code) {- effects.exit('codeIndented')- // To do: allow interrupting like `markdown-rs`.- // Feel free to interrupt.- // tokenizer.interrupt = false- return ok(code)- }-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeFurtherStart(effects, ok, nok) {- const self = this- return furtherStart-- /**- * At eol, trying to parse another indent.- *- * ```markdown- * > | aaa- * ^- * | bbb- * ```- *- * @type {State}- */- function furtherStart(code) {- // To do: improve `lazy` / `pierce` handling.- // If this is a lazy line, it can’t be code.- if (self.parser.lazy[self.now().line]) {- return nok(code)- }- if (markdownLineEnding(code)) {- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- return furtherStart- }-- // To do: the code here in `micromark-js` is a bit different from- // `markdown-rs` because there it can attempt spaces.- // We can’t yet.- //- // To do: use an improved `space_or_tab` function like `markdown-rs`,- // so that we can drop the next state.- return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code)- }-- /**- * At start, after 1 or 4 spaces.- *- * ```markdown- * > | aaa- * ^- * ```- *- * @type {State}- */- function afterPrefix(code) {- const tail = self.events[self.events.length - 1]- return tail &&- tail[1].type === 'linePrefix' &&- tail[2].sliceSerialize(tail[1], true).length >= 4- ? ok(code)- : markdownLineEnding(code)- ? furtherStart(code)- : nok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/heading-atx.js-/**- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').Resolver} Resolver- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').Token} Token- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */-----/** @type {Construct} */-const headingAtx = {- name: 'headingAtx',- tokenize: tokenizeHeadingAtx,- resolve: resolveHeadingAtx-}--/** @type {Resolver} */-function resolveHeadingAtx(events, context) {- let contentEnd = events.length - 2- let contentStart = 3- /** @type {Token} */- let content- /** @type {Token} */- let text-- // Prefix whitespace, part of the opening.- if (events[contentStart][1].type === 'whitespace') {- contentStart += 2- }-- // Suffix whitespace, part of the closing.- if (- contentEnd - 2 > contentStart &&- events[contentEnd][1].type === 'whitespace'- ) {- contentEnd -= 2- }- if (- events[contentEnd][1].type === 'atxHeadingSequence' &&- (contentStart === contentEnd - 1 ||- (contentEnd - 4 > contentStart &&- events[contentEnd - 2][1].type === 'whitespace'))- ) {- contentEnd -= contentStart + 1 === contentEnd ? 2 : 4- }- if (contentEnd > contentStart) {- content = {- type: 'atxHeadingText',- start: events[contentStart][1].start,- end: events[contentEnd][1].end- }- text = {- type: 'chunkText',- start: events[contentStart][1].start,- end: events[contentEnd][1].end,- contentType: 'text'- }- splice(events, contentStart, contentEnd - contentStart + 1, [- ['enter', content, context],- ['enter', text, context],- ['exit', text, context],- ['exit', content, context]- ])- }- return events-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeHeadingAtx(effects, ok, nok) {- let size = 0- return start-- /**- * Start of a heading (atx).- *- * ```markdown- * > | ## aa- * ^- * ```- *- * @type {State}- */- function start(code) {- // To do: parse indent like `markdown-rs`.- effects.enter('atxHeading')- return before(code)- }-- /**- * After optional whitespace, at `#`.- *- * ```markdown- * > | ## aa- * ^- * ```- *- * @type {State}- */- function before(code) {- effects.enter('atxHeadingSequence')- return sequenceOpen(code)- }-- /**- * In opening sequence.- *- * ```markdown- * > | ## aa- * ^- * ```- *- * @type {State}- */- function sequenceOpen(code) {- if (code === 35 && size++ < 6) {- effects.consume(code)- return sequenceOpen- }-- // Always at least one `#`.- if (code === null || markdownLineEndingOrSpace(code)) {- effects.exit('atxHeadingSequence')- return atBreak(code)- }- return nok(code)- }-- /**- * After something, before something else.- *- * ```markdown- * > | ## aa- * ^- * ```- *- * @type {State}- */- function atBreak(code) {- if (code === 35) {- effects.enter('atxHeadingSequence')- return sequenceFurther(code)- }- if (code === null || markdownLineEnding(code)) {- effects.exit('atxHeading')- // To do: interrupt like `markdown-rs`.- // // Feel free to interrupt.- // tokenizer.interrupt = false- return ok(code)- }- if (markdownSpace(code)) {- return factorySpace(effects, atBreak, 'whitespace')(code)- }-- // To do: generate `data` tokens, add the `text` token later.- // Needs edit map, see: `markdown.rs`.- effects.enter('atxHeadingText')- return data(code)- }-- /**- * In further sequence (after whitespace).- *- * Could be normal “visible” hashes in the heading or a final sequence.- *- * ```markdown- * > | ## aa ##- * ^- * ```- *- * @type {State}- */- function sequenceFurther(code) {- if (code === 35) {- effects.consume(code)- return sequenceFurther- }- effects.exit('atxHeadingSequence')- return atBreak(code)- }-- /**- * In text.- *- * ```markdown- * > | ## aa- * ^- * ```- *- * @type {State}- */- function data(code) {- if (code === null || code === 35 || markdownLineEndingOrSpace(code)) {- effects.exit('atxHeadingText')- return atBreak(code)- }- effects.consume(code)- return data- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/setext-underline.js-/**- * @typedef {import('micromark-util-types').Code} Code- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').Resolver} Resolver- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */----/** @type {Construct} */-const setextUnderline = {- name: 'setextUnderline',- tokenize: tokenizeSetextUnderline,- resolveTo: resolveToSetextUnderline-}--/** @type {Resolver} */-function resolveToSetextUnderline(events, context) {- // To do: resolve like `markdown-rs`.- let index = events.length- /** @type {number | undefined} */- let content- /** @type {number | undefined} */- let text- /** @type {number | undefined} */- let definition-- // Find the opening of the content.- // It’ll always exist: we don’t tokenize if it isn’t there.- while (index--) {- if (events[index][0] === 'enter') {- if (events[index][1].type === 'content') {- content = index- break- }- if (events[index][1].type === 'paragraph') {- text = index- }- }- // Exit- else {- if (events[index][1].type === 'content') {- // Remove the content end (if needed we’ll add it later)- events.splice(index, 1)- }- if (!definition && events[index][1].type === 'definition') {- definition = index- }- }- }- const heading = {- type: 'setextHeading',- start: Object.assign({}, events[text][1].start),- end: Object.assign({}, events[events.length - 1][1].end)- }-- // Change the paragraph to setext heading text.- events[text][1].type = 'setextHeadingText'-- // If we have definitions in the content, we’ll keep on having content,- // but we need move it.- if (definition) {- events.splice(text, 0, ['enter', heading, context])- events.splice(definition + 1, 0, ['exit', events[content][1], context])- events[content][1].end = Object.assign({}, events[definition][1].end)- } else {- events[content][1] = heading- }-- // Add the heading exit at the end.- events.push(['exit', heading, context])- return events-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeSetextUnderline(effects, ok, nok) {- const self = this- /** @type {NonNullable<Code>} */- let marker- return start-- /**- * At start of heading (setext) underline.- *- * ```markdown- * | aa- * > | ==- * ^- * ```- *- * @type {State}- */- function start(code) {- let index = self.events.length- /** @type {boolean | undefined} */- let paragraph- // Find an opening.- while (index--) {- // Skip enter/exit of line ending, line prefix, and content.- // We can now either have a definition or a paragraph.- if (- self.events[index][1].type !== 'lineEnding' &&- self.events[index][1].type !== 'linePrefix' &&- self.events[index][1].type !== 'content'- ) {- paragraph = self.events[index][1].type === 'paragraph'- break- }- }-- // To do: handle lazy/pierce like `markdown-rs`.- // To do: parse indent like `markdown-rs`.- if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) {- effects.enter('setextHeadingLine')- marker = code- return before(code)- }- return nok(code)- }-- /**- * After optional whitespace, at `-` or `=`.- *- * ```markdown- * | aa- * > | ==- * ^- * ```- *- * @type {State}- */- function before(code) {- effects.enter('setextHeadingLineSequence')- return inside(code)- }-- /**- * In sequence.- *- * ```markdown- * | aa- * > | ==- * ^- * ```- *- * @type {State}- */- function inside(code) {- if (code === marker) {- effects.consume(code)- return inside- }- effects.exit('setextHeadingLineSequence')- return markdownSpace(code)- ? factorySpace(effects, after, 'lineSuffix')(code)- : after(code)- }-- /**- * After sequence, after optional whitespace.- *- * ```markdown- * | aa- * > | ==- * ^- * ```- *- * @type {State}- */- function after(code) {- if (code === null || markdownLineEnding(code)) {- effects.exit('setextHeadingLine')- return ok(code)- }- return nok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-util-html-tag-name/index.js-/**- * List of lowercase HTML “block” tag names.- *- * The list, when parsing HTML (flow), results in more relaxed rules (condition- * 6).- * Because they are known blocks, the HTML-like syntax doesn’t have to be- * strictly parsed.- * For tag names not in this list, a more strict algorithm (condition 7) is used- * to detect whether the HTML-like syntax is seen as HTML (flow) or not.- *- * This is copied from:- * <https://spec.commonmark.org/0.30/#html-blocks>.- *- * > 👉 **Note**: `search` was added in `[email protected]`.- */-const htmlBlockNames = [- 'address',- 'article',- 'aside',- 'base',- 'basefont',- 'blockquote',- 'body',- 'caption',- 'center',- 'col',- 'colgroup',- 'dd',- 'details',- 'dialog',- 'dir',- 'div',- 'dl',- 'dt',- 'fieldset',- 'figcaption',- 'figure',- 'footer',- 'form',- 'frame',- 'frameset',- 'h1',- 'h2',- 'h3',- 'h4',- 'h5',- 'h6',- 'head',- 'header',- 'hr',- 'html',- 'iframe',- 'legend',- 'li',- 'link',- 'main',- 'menu',- 'menuitem',- 'nav',- 'noframes',- 'ol',- 'optgroup',- 'option',- 'p',- 'param',- 'search',- 'section',- 'summary',- 'table',- 'tbody',- 'td',- 'tfoot',- 'th',- 'thead',- 'title',- 'tr',- 'track',- 'ul'-]--/**- * List of lowercase HTML “raw” tag names.- *- * The list, when parsing HTML (flow), results in HTML that can include lines- * without exiting, until a closing tag also in this list is found (condition- * 1).- *- * This module is copied from:- * <https://spec.commonmark.org/0.30/#html-blocks>.- *- * > 👉 **Note**: `textarea` was added in `[email protected]`.- */-const htmlRawNames = ['pre', 'script', 'style', 'textarea']--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/html-flow.js-/**- * @typedef {import('micromark-util-types').Code} Code- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').Resolver} Resolver- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */------/** @type {Construct} */-const htmlFlow = {- name: 'htmlFlow',- tokenize: tokenizeHtmlFlow,- resolveTo: resolveToHtmlFlow,- concrete: true-}--/** @type {Construct} */-const blankLineBefore = {- tokenize: tokenizeBlankLineBefore,- partial: true-}-const nonLazyContinuationStart = {- tokenize: tokenizeNonLazyContinuationStart,- partial: true-}--/** @type {Resolver} */-function resolveToHtmlFlow(events) {- let index = events.length- while (index--) {- if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') {- break- }- }- if (index > 1 && events[index - 2][1].type === 'linePrefix') {- // Add the prefix start to the HTML token.- events[index][1].start = events[index - 2][1].start- // Add the prefix start to the HTML line token.- events[index + 1][1].start = events[index - 2][1].start- // Remove the line prefix.- events.splice(index - 2, 2)- }- return events-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeHtmlFlow(effects, ok, nok) {- const self = this- /** @type {number} */- let marker- /** @type {boolean} */- let closingTag- /** @type {string} */- let buffer- /** @type {number} */- let index- /** @type {Code} */- let markerB- return start-- /**- * Start of HTML (flow).- *- * ```markdown- * > | <x />- * ^- * ```- *- * @type {State}- */- function start(code) {- // To do: parse indent like `markdown-rs`.- return before(code)- }-- /**- * At `<`, after optional whitespace.- *- * ```markdown- * > | <x />- * ^- * ```- *- * @type {State}- */- function before(code) {- effects.enter('htmlFlow')- effects.enter('htmlFlowData')- effects.consume(code)- return open- }-- /**- * After `<`, at tag name or other stuff.- *- * ```markdown- * > | <x />- * ^- * > | <!doctype>- * ^- * > | <!--xxx-->- * ^- * ```- *- * @type {State}- */- function open(code) {- if (code === 33) {- effects.consume(code)- return declarationOpen- }- if (code === 47) {- effects.consume(code)- closingTag = true- return tagCloseStart- }- if (code === 63) {- effects.consume(code)- marker = 3- // To do:- // tokenizer.concrete = true- // To do: use `markdown-rs` style interrupt.- // While we’re in an instruction instead of a declaration, we’re on a `?`- // right now, so we do need to search for `>`, similar to declarations.- return self.interrupt ? ok : continuationDeclarationInside- }-- // ASCII alphabetical.- if (asciiAlpha(code)) {- effects.consume(code)- // @ts-expect-error: not null.- buffer = String.fromCharCode(code)- return tagName- }- return nok(code)- }-- /**- * After `<!`, at declaration, comment, or CDATA.- *- * ```markdown- * > | <!doctype>- * ^- * > | <!--xxx-->- * ^- * > | <![CDATA[>&<]]>- * ^- * ```- *- * @type {State}- */- function declarationOpen(code) {- if (code === 45) {- effects.consume(code)- marker = 2- return commentOpenInside- }- if (code === 91) {- effects.consume(code)- marker = 5- index = 0- return cdataOpenInside- }-- // ASCII alphabetical.- if (asciiAlpha(code)) {- effects.consume(code)- marker = 4- // // Do not form containers.- // tokenizer.concrete = true- return self.interrupt ? ok : continuationDeclarationInside- }- return nok(code)- }-- /**- * After `<!-`, inside a comment, at another `-`.- *- * ```markdown- * > | <!--xxx-->- * ^- * ```- *- * @type {State}- */- function commentOpenInside(code) {- if (code === 45) {- effects.consume(code)- // // Do not form containers.- // tokenizer.concrete = true- return self.interrupt ? ok : continuationDeclarationInside- }- return nok(code)- }-- /**- * After `<![`, inside CDATA, expecting `CDATA[`.- *- * ```markdown- * > | <![CDATA[>&<]]>- * ^^^^^^- * ```- *- * @type {State}- */- function cdataOpenInside(code) {- const value = 'CDATA['- if (code === value.charCodeAt(index++)) {- effects.consume(code)- if (index === value.length) {- // // Do not form containers.- // tokenizer.concrete = true- return self.interrupt ? ok : continuation- }- return cdataOpenInside- }- return nok(code)- }-- /**- * After `</`, in closing tag, at tag name.- *- * ```markdown- * > | </x>- * ^- * ```- *- * @type {State}- */- function tagCloseStart(code) {- if (asciiAlpha(code)) {- effects.consume(code)- // @ts-expect-error: not null.- buffer = String.fromCharCode(code)- return tagName- }- return nok(code)- }-- /**- * In tag name.- *- * ```markdown- * > | <ab>- * ^^- * > | </ab>- * ^^- * ```- *- * @type {State}- */- function tagName(code) {- if (- code === null ||- code === 47 ||- code === 62 ||- markdownLineEndingOrSpace(code)- ) {- const slash = code === 47- const name = buffer.toLowerCase()- if (!slash && !closingTag && htmlRawNames.includes(name)) {- marker = 1- // // Do not form containers.- // tokenizer.concrete = true- return self.interrupt ? ok(code) : continuation(code)- }- if (htmlBlockNames.includes(buffer.toLowerCase())) {- marker = 6- if (slash) {- effects.consume(code)- return basicSelfClosing- }-- // // Do not form containers.- // tokenizer.concrete = true- return self.interrupt ? ok(code) : continuation(code)- }- marker = 7- // Do not support complete HTML when interrupting.- return self.interrupt && !self.parser.lazy[self.now().line]- ? nok(code)- : closingTag- ? completeClosingTagAfter(code)- : completeAttributeNameBefore(code)- }-- // ASCII alphanumerical and `-`.- if (code === 45 || asciiAlphanumeric(code)) {- effects.consume(code)- buffer += String.fromCharCode(code)- return tagName- }- return nok(code)- }-- /**- * After closing slash of a basic tag name.- *- * ```markdown- * > | <div/>- * ^- * ```- *- * @type {State}- */- function basicSelfClosing(code) {- if (code === 62) {- effects.consume(code)- // // Do not form containers.- // tokenizer.concrete = true- return self.interrupt ? ok : continuation- }- return nok(code)- }-- /**- * After closing slash of a complete tag name.- *- * ```markdown- * > | <x/>- * ^- * ```- *- * @type {State}- */- function completeClosingTagAfter(code) {- if (markdownSpace(code)) {- effects.consume(code)- return completeClosingTagAfter- }- return completeEnd(code)- }-- /**- * At an attribute name.- *- * At first, this state is used after a complete tag name, after whitespace,- * where it expects optional attributes or the end of the tag.- * It is also reused after attributes, when expecting more optional- * attributes.- *- * ```markdown- * > | <a />- * ^- * > | <a :b>- * ^- * > | <a _b>- * ^- * > | <a b>- * ^- * > | <a >- * ^- * ```- *- * @type {State}- */- function completeAttributeNameBefore(code) {- if (code === 47) {- effects.consume(code)- return completeEnd- }-- // ASCII alphanumerical and `:` and `_`.- if (code === 58 || code === 95 || asciiAlpha(code)) {- effects.consume(code)- return completeAttributeName- }- if (markdownSpace(code)) {- effects.consume(code)- return completeAttributeNameBefore- }- return completeEnd(code)- }-- /**- * In attribute name.- *- * ```markdown- * > | <a :b>- * ^- * > | <a _b>- * ^- * > | <a b>- * ^- * ```- *- * @type {State}- */- function completeAttributeName(code) {- // ASCII alphanumerical and `-`, `.`, `:`, and `_`.- if (- code === 45 ||- code === 46 ||- code === 58 ||- code === 95 ||- asciiAlphanumeric(code)- ) {- effects.consume(code)- return completeAttributeName- }- return completeAttributeNameAfter(code)- }-- /**- * After attribute name, at an optional initializer, the end of the tag, or- * whitespace.- *- * ```markdown- * > | <a b>- * ^- * > | <a b=c>- * ^- * ```- *- * @type {State}- */- function completeAttributeNameAfter(code) {- if (code === 61) {- effects.consume(code)- return completeAttributeValueBefore- }- if (markdownSpace(code)) {- effects.consume(code)- return completeAttributeNameAfter- }- return completeAttributeNameBefore(code)- }-- /**- * Before unquoted, double quoted, or single quoted attribute value, allowing- * whitespace.- *- * ```markdown- * > | <a b=c>- * ^- * > | <a b="c">- * ^- * ```- *- * @type {State}- */- function completeAttributeValueBefore(code) {- if (- code === null ||- code === 60 ||- code === 61 ||- code === 62 ||- code === 96- ) {- return nok(code)- }- if (code === 34 || code === 39) {- effects.consume(code)- markerB = code- return completeAttributeValueQuoted- }- if (markdownSpace(code)) {- effects.consume(code)- return completeAttributeValueBefore- }- return completeAttributeValueUnquoted(code)- }-- /**- * In double or single quoted attribute value.- *- * ```markdown- * > | <a b="c">- * ^- * > | <a b='c'>- * ^- * ```- *- * @type {State}- */- function completeAttributeValueQuoted(code) {- if (code === markerB) {- effects.consume(code)- markerB = null- return completeAttributeValueQuotedAfter- }- if (code === null || markdownLineEnding(code)) {- return nok(code)- }- effects.consume(code)- return completeAttributeValueQuoted- }-- /**- * In unquoted attribute value.- *- * ```markdown- * > | <a b=c>- * ^- * ```- *- * @type {State}- */- function completeAttributeValueUnquoted(code) {- if (- code === null ||- code === 34 ||- code === 39 ||- code === 47 ||- code === 60 ||- code === 61 ||- code === 62 ||- code === 96 ||- markdownLineEndingOrSpace(code)- ) {- return completeAttributeNameAfter(code)- }- effects.consume(code)- return completeAttributeValueUnquoted- }-- /**- * After double or single quoted attribute value, before whitespace or the- * end of the tag.- *- * ```markdown- * > | <a b="c">- * ^- * ```- *- * @type {State}- */- function completeAttributeValueQuotedAfter(code) {- if (code === 47 || code === 62 || markdownSpace(code)) {- return completeAttributeNameBefore(code)- }- return nok(code)- }-- /**- * In certain circumstances of a complete tag where only an `>` is allowed.- *- * ```markdown- * > | <a b="c">- * ^- * ```- *- * @type {State}- */- function completeEnd(code) {- if (code === 62) {- effects.consume(code)- return completeAfter- }- return nok(code)- }-- /**- * After `>` in a complete tag.- *- * ```markdown- * > | <x>- * ^- * ```- *- * @type {State}- */- function completeAfter(code) {- if (code === null || markdownLineEnding(code)) {- // // Do not form containers.- // tokenizer.concrete = true- return continuation(code)- }- if (markdownSpace(code)) {- effects.consume(code)- return completeAfter- }- return nok(code)- }-- /**- * In continuation of any HTML kind.- *- * ```markdown- * > | <!--xxx-->- * ^- * ```- *- * @type {State}- */- function continuation(code) {- if (code === 45 && marker === 2) {- effects.consume(code)- return continuationCommentInside- }- if (code === 60 && marker === 1) {- effects.consume(code)- return continuationRawTagOpen- }- if (code === 62 && marker === 4) {- effects.consume(code)- return continuationClose- }- if (code === 63 && marker === 3) {- effects.consume(code)- return continuationDeclarationInside- }- if (code === 93 && marker === 5) {- effects.consume(code)- return continuationCdataInside- }- if (markdownLineEnding(code) && (marker === 6 || marker === 7)) {- effects.exit('htmlFlowData')- return effects.check(- blankLineBefore,- continuationAfter,- continuationStart- )(code)- }- if (code === null || markdownLineEnding(code)) {- effects.exit('htmlFlowData')- return continuationStart(code)- }- effects.consume(code)- return continuation- }-- /**- * In continuation, at eol.- *- * ```markdown- * > | <x>- * ^- * | asd- * ```- *- * @type {State}- */- function continuationStart(code) {- return effects.check(- nonLazyContinuationStart,- continuationStartNonLazy,- continuationAfter- )(code)- }-- /**- * In continuation, at eol, before non-lazy content.- *- * ```markdown- * > | <x>- * ^- * | asd- * ```- *- * @type {State}- */- function continuationStartNonLazy(code) {- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- return continuationBefore- }-- /**- * In continuation, before non-lazy content.- *- * ```markdown- * | <x>- * > | asd- * ^- * ```- *- * @type {State}- */- function continuationBefore(code) {- if (code === null || markdownLineEnding(code)) {- return continuationStart(code)- }- effects.enter('htmlFlowData')- return continuation(code)- }-- /**- * In comment continuation, after one `-`, expecting another.- *- * ```markdown- * > | <!--xxx-->- * ^- * ```- *- * @type {State}- */- function continuationCommentInside(code) {- if (code === 45) {- effects.consume(code)- return continuationDeclarationInside- }- return continuation(code)- }-- /**- * In raw continuation, after `<`, at `/`.- *- * ```markdown- * > | <script>console.log(1)</script>- * ^- * ```- *- * @type {State}- */- function continuationRawTagOpen(code) {- if (code === 47) {- effects.consume(code)- buffer = ''- return continuationRawEndTag- }- return continuation(code)- }-- /**- * In raw continuation, after `</`, in a raw tag name.- *- * ```markdown- * > | <script>console.log(1)</script>- * ^^^^^^- * ```- *- * @type {State}- */- function continuationRawEndTag(code) {- if (code === 62) {- const name = buffer.toLowerCase()- if (htmlRawNames.includes(name)) {- effects.consume(code)- return continuationClose- }- return continuation(code)- }- if (asciiAlpha(code) && buffer.length < 8) {- effects.consume(code)- // @ts-expect-error: not null.- buffer += String.fromCharCode(code)- return continuationRawEndTag- }- return continuation(code)- }-- /**- * In cdata continuation, after `]`, expecting `]>`.- *- * ```markdown- * > | <![CDATA[>&<]]>- * ^- * ```- *- * @type {State}- */- function continuationCdataInside(code) {- if (code === 93) {- effects.consume(code)- return continuationDeclarationInside- }- return continuation(code)- }-- /**- * In declaration or instruction continuation, at `>`.- *- * ```markdown- * > | <!-->- * ^- * > | <?>- * ^- * > | <!q>- * ^- * > | <!--ab-->- * ^- * > | <![CDATA[>&<]]>- * ^- * ```- *- * @type {State}- */- function continuationDeclarationInside(code) {- if (code === 62) {- effects.consume(code)- return continuationClose- }-- // More dashes.- if (code === 45 && marker === 2) {- effects.consume(code)- return continuationDeclarationInside- }- return continuation(code)- }-- /**- * In closed continuation: everything we get until the eol/eof is part of it.- *- * ```markdown- * > | <!doctype>- * ^- * ```- *- * @type {State}- */- function continuationClose(code) {- if (code === null || markdownLineEnding(code)) {- effects.exit('htmlFlowData')- return continuationAfter(code)- }- effects.consume(code)- return continuationClose- }-- /**- * Done.- *- * ```markdown- * > | <!doctype>- * ^- * ```- *- * @type {State}- */- function continuationAfter(code) {- effects.exit('htmlFlow')- // // Feel free to interrupt.- // tokenizer.interrupt = false- // // No longer concrete.- // tokenizer.concrete = false- return ok(code)- }-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeNonLazyContinuationStart(effects, ok, nok) {- const self = this- return start-- /**- * At eol, before continuation.- *- * ```markdown- * > | * ```js- * ^- * | b- * ```- *- * @type {State}- */- function start(code) {- if (markdownLineEnding(code)) {- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- return after- }- return nok(code)- }-- /**- * A continuation.- *- * ```markdown- * | * ```js- * > | b- * ^- * ```- *- * @type {State}- */- function after(code) {- return self.parser.lazy[self.now().line] ? nok(code) : ok(code)- }-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeBlankLineBefore(effects, ok, nok) {- return start-- /**- * Before eol, expecting blank line.- *- * ```markdown- * > | <div>- * ^- * |- * ```- *- * @type {State}- */- function start(code) {- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- return effects.attempt(blankLine, ok, nok)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/code-fenced.js-/**- * @typedef {import('micromark-util-types').Code} Code- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */----/** @type {Construct} */-const nonLazyContinuation = {- tokenize: tokenizeNonLazyContinuation,- partial: true-}--/** @type {Construct} */-const codeFenced = {- name: 'codeFenced',- tokenize: tokenizeCodeFenced,- concrete: true-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeCodeFenced(effects, ok, nok) {- const self = this- /** @type {Construct} */- const closeStart = {- tokenize: tokenizeCloseStart,- partial: true- }- let initialPrefix = 0- let sizeOpen = 0- /** @type {NonNullable<Code>} */- let marker- return start-- /**- * Start of code.- *- * ```markdown- * > | ~~~js- * ^- * | alert(1)- * | ~~~- * ```- *- * @type {State}- */- function start(code) {- // To do: parse whitespace like `markdown-rs`.- return beforeSequenceOpen(code)- }-- /**- * In opening fence, after prefix, at sequence.- *- * ```markdown- * > | ~~~js- * ^- * | alert(1)- * | ~~~- * ```- *- * @type {State}- */- function beforeSequenceOpen(code) {- const tail = self.events[self.events.length - 1]- initialPrefix =- tail && tail[1].type === 'linePrefix'- ? tail[2].sliceSerialize(tail[1], true).length- : 0- marker = code- effects.enter('codeFenced')- effects.enter('codeFencedFence')- effects.enter('codeFencedFenceSequence')- return sequenceOpen(code)- }-- /**- * In opening fence sequence.- *- * ```markdown- * > | ~~~js- * ^- * | alert(1)- * | ~~~- * ```- *- * @type {State}- */- function sequenceOpen(code) {- if (code === marker) {- sizeOpen++- effects.consume(code)- return sequenceOpen- }- if (sizeOpen < 3) {- return nok(code)- }- effects.exit('codeFencedFenceSequence')- return markdownSpace(code)- ? factorySpace(effects, infoBefore, 'whitespace')(code)- : infoBefore(code)- }-- /**- * In opening fence, after the sequence (and optional whitespace), before info.- *- * ```markdown- * > | ~~~js- * ^- * | alert(1)- * | ~~~- * ```- *- * @type {State}- */- function infoBefore(code) {- if (code === null || markdownLineEnding(code)) {- effects.exit('codeFencedFence')- return self.interrupt- ? ok(code)- : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)- }- effects.enter('codeFencedFenceInfo')- effects.enter('chunkString', {- contentType: 'string'- })- return info(code)- }-- /**- * In info.- *- * ```markdown- * > | ~~~js- * ^- * | alert(1)- * | ~~~- * ```- *- * @type {State}- */- function info(code) {- if (code === null || markdownLineEnding(code)) {- effects.exit('chunkString')- effects.exit('codeFencedFenceInfo')- return infoBefore(code)- }- if (markdownSpace(code)) {- effects.exit('chunkString')- effects.exit('codeFencedFenceInfo')- return factorySpace(effects, metaBefore, 'whitespace')(code)- }- if (code === 96 && code === marker) {- return nok(code)- }- effects.consume(code)- return info- }-- /**- * In opening fence, after info and whitespace, before meta.- *- * ```markdown- * > | ~~~js eval- * ^- * | alert(1)- * | ~~~- * ```- *- * @type {State}- */- function metaBefore(code) {- if (code === null || markdownLineEnding(code)) {- return infoBefore(code)- }- effects.enter('codeFencedFenceMeta')- effects.enter('chunkString', {- contentType: 'string'- })- return meta(code)- }-- /**- * In meta.- *- * ```markdown- * > | ~~~js eval- * ^- * | alert(1)- * | ~~~- * ```- *- * @type {State}- */- function meta(code) {- if (code === null || markdownLineEnding(code)) {- effects.exit('chunkString')- effects.exit('codeFencedFenceMeta')- return infoBefore(code)- }- if (code === 96 && code === marker) {- return nok(code)- }- effects.consume(code)- return meta- }-- /**- * At eol/eof in code, before a non-lazy closing fence or content.- *- * ```markdown- * > | ~~~js- * ^- * > | alert(1)- * ^- * | ~~~- * ```- *- * @type {State}- */- function atNonLazyBreak(code) {- return effects.attempt(closeStart, after, contentBefore)(code)- }-- /**- * Before code content, not a closing fence, at eol.- *- * ```markdown- * | ~~~js- * > | alert(1)- * ^- * | ~~~- * ```- *- * @type {State}- */- function contentBefore(code) {- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- return contentStart- }-- /**- * Before code content, not a closing fence.- *- * ```markdown- * | ~~~js- * > | alert(1)- * ^- * | ~~~- * ```- *- * @type {State}- */- function contentStart(code) {- return initialPrefix > 0 && markdownSpace(code)- ? factorySpace(- effects,- beforeContentChunk,- 'linePrefix',- initialPrefix + 1- )(code)- : beforeContentChunk(code)- }-- /**- * Before code content, after optional prefix.- *- * ```markdown- * | ~~~js- * > | alert(1)- * ^- * | ~~~- * ```- *- * @type {State}- */- function beforeContentChunk(code) {- if (code === null || markdownLineEnding(code)) {- return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)- }- effects.enter('codeFlowValue')- return contentChunk(code)- }-- /**- * In code content.- *- * ```markdown- * | ~~~js- * > | alert(1)- * ^^^^^^^^- * | ~~~- * ```- *- * @type {State}- */- function contentChunk(code) {- if (code === null || markdownLineEnding(code)) {- effects.exit('codeFlowValue')- return beforeContentChunk(code)- }- effects.consume(code)- return contentChunk- }-- /**- * After code.- *- * ```markdown- * | ~~~js- * | alert(1)- * > | ~~~- * ^- * ```- *- * @type {State}- */- function after(code) {- effects.exit('codeFenced')- return ok(code)- }-- /**- * @this {TokenizeContext}- * @type {Tokenizer}- */- function tokenizeCloseStart(effects, ok, nok) {- let size = 0- return startBefore-- /**- *- *- * @type {State}- */- function startBefore(code) {- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- return start- }-- /**- * Before closing fence, at optional whitespace.- *- * ```markdown- * | ~~~js- * | alert(1)- * > | ~~~- * ^- * ```- *- * @type {State}- */- function start(code) {- // Always populated by defaults.-- // To do: `enter` here or in next state?- effects.enter('codeFencedFence')- return markdownSpace(code)- ? factorySpace(- effects,- beforeSequenceClose,- 'linePrefix',- self.parser.constructs.disable.null.includes('codeIndented')- ? undefined- : 4- )(code)- : beforeSequenceClose(code)- }-- /**- * In closing fence, after optional whitespace, at sequence.- *- * ```markdown- * | ~~~js- * | alert(1)- * > | ~~~- * ^- * ```- *- * @type {State}- */- function beforeSequenceClose(code) {- if (code === marker) {- effects.enter('codeFencedFenceSequence')- return sequenceClose(code)- }- return nok(code)- }-- /**- * In closing fence sequence.- *- * ```markdown- * | ~~~js- * | alert(1)- * > | ~~~- * ^- * ```- *- * @type {State}- */- function sequenceClose(code) {- if (code === marker) {- size++- effects.consume(code)- return sequenceClose- }- if (size >= sizeOpen) {- effects.exit('codeFencedFenceSequence')- return markdownSpace(code)- ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code)- : sequenceCloseAfter(code)- }- return nok(code)- }-- /**- * After closing fence sequence, after optional whitespace.- *- * ```markdown- * | ~~~js- * | alert(1)- * > | ~~~- * ^- * ```- *- * @type {State}- */- function sequenceCloseAfter(code) {- if (code === null || markdownLineEnding(code)) {- effects.exit('codeFencedFence')- return ok(code)- }- return nok(code)- }- }-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeNonLazyContinuation(effects, ok, nok) {- const self = this- return start-- /**- *- *- * @type {State}- */- function start(code) {- if (code === null) {- return nok(code)- }- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- return lineStart- }-- /**- *- *- * @type {State}- */- function lineStart(code) {- return self.parser.lazy[self.now().line] ? nok(code) : ok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.dom.js-/// <reference lib="dom" />--/* eslint-env browser */--const index_dom_element = document.createElement('i')--/**- * @param {string} value- * @returns {string|false}- */-function decodeNamedCharacterReference(value) {- const characterReference = '&' + value + ';'- index_dom_element.innerHTML = characterReference- const char = index_dom_element.textContent-- // Some named character references do not require the closing semicolon- // (`¬`, for instance), which leads to situations where parsing the assumed- // named reference of `¬it;` will result in the string `¬it;`.- // When we encounter a trailing semicolon after parsing, and the character- // reference to decode was not a semicolon (`;`), we can assume that the- // matching was not complete.- // @ts-expect-error: TypeScript is wrong that `textContent` on elements can- // yield `null`.- if (char.charCodeAt(char.length - 1) === 59 /* `;` */ && value !== 'semi') {- return false- }-- // If the decoded string is equal to the input, the character reference was- // not valid.- // @ts-expect-error: TypeScript is wrong that `textContent` on elements can- // yield `null`.- return char === characterReference ? false : char-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/character-reference.js-/**- * @typedef {import('micromark-util-types').Code} Code- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */----/** @type {Construct} */-const characterReference = {- name: 'characterReference',- tokenize: tokenizeCharacterReference-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeCharacterReference(effects, ok, nok) {- const self = this- let size = 0- /** @type {number} */- let max- /** @type {(code: Code) => boolean} */- let test- return start-- /**- * Start of character reference.- *- * ```markdown- * > | a&b- * ^- * > | a{b- * ^- * > | a	b- * ^- * ```- *- * @type {State}- */- function start(code) {- effects.enter('characterReference')- effects.enter('characterReferenceMarker')- effects.consume(code)- effects.exit('characterReferenceMarker')- return open- }-- /**- * After `&`, at `#` for numeric references or alphanumeric for named- * references.- *- * ```markdown- * > | a&b- * ^- * > | a{b- * ^- * > | a	b- * ^- * ```- *- * @type {State}- */- function open(code) {- if (code === 35) {- effects.enter('characterReferenceMarkerNumeric')- effects.consume(code)- effects.exit('characterReferenceMarkerNumeric')- return numeric- }- effects.enter('characterReferenceValue')- max = 31- test = asciiAlphanumeric- return value(code)- }-- /**- * After `#`, at `x` for hexadecimals or digit for decimals.- *- * ```markdown- * > | a{b- * ^- * > | a	b- * ^- * ```- *- * @type {State}- */- function numeric(code) {- if (code === 88 || code === 120) {- effects.enter('characterReferenceMarkerHexadecimal')- effects.consume(code)- effects.exit('characterReferenceMarkerHexadecimal')- effects.enter('characterReferenceValue')- max = 6- test = asciiHexDigit- return value- }- effects.enter('characterReferenceValue')- max = 7- test = asciiDigit- return value(code)- }-- /**- * After markers (`&#x`, `&#`, or `&`), in value, before `;`.- *- * The character reference kind defines what and how many characters are- * allowed.- *- * ```markdown- * > | a&b- * ^^^- * > | a{b- * ^^^- * > | a	b- * ^- * ```- *- * @type {State}- */- function value(code) {- if (code === 59 && size) {- const token = effects.exit('characterReferenceValue')- if (- test === asciiAlphanumeric &&- !decodeNamedCharacterReference(self.sliceSerialize(token))- ) {- return nok(code)- }-- // To do: `markdown-rs` uses a different name:- // `CharacterReferenceMarkerSemi`.- effects.enter('characterReferenceMarker')- effects.consume(code)- effects.exit('characterReferenceMarker')- effects.exit('characterReference')- return ok- }- if (test(code) && size++ < max) {- effects.consume(code)- return value- }- return nok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/character-escape.js-/**- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */---/** @type {Construct} */-const characterEscape = {- name: 'characterEscape',- tokenize: tokenizeCharacterEscape-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeCharacterEscape(effects, ok, nok) {- return start-- /**- * Start of character escape.- *- * ```markdown- * > | a\*b- * ^- * ```- *- * @type {State}- */- function start(code) {- effects.enter('characterEscape')- effects.enter('escapeMarker')- effects.consume(code)- effects.exit('escapeMarker')- return inside- }-- /**- * After `\`, at punctuation.- *- * ```markdown- * > | a\*b- * ^- * ```- *- * @type {State}- */- function inside(code) {- // ASCII punctuation.- if (asciiPunctuation(code)) {- effects.enter('characterEscapeValue')- effects.consume(code)- effects.exit('characterEscapeValue')- effects.exit('characterEscape')- return ok- }- return nok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/line-ending.js-/**- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */----/** @type {Construct} */-const lineEnding = {- name: 'lineEnding',- tokenize: tokenizeLineEnding-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeLineEnding(effects, ok) {- return start-- /** @type {State} */- function start(code) {- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- return factorySpace(effects, ok, 'linePrefix')- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/label-end.js-/**- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').Event} Event- * @typedef {import('micromark-util-types').Resolver} Resolver- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').Token} Token- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */----------/** @type {Construct} */-const labelEnd = {- name: 'labelEnd',- tokenize: tokenizeLabelEnd,- resolveTo: resolveToLabelEnd,- resolveAll: resolveAllLabelEnd-}--/** @type {Construct} */-const resourceConstruct = {- tokenize: tokenizeResource-}-/** @type {Construct} */-const referenceFullConstruct = {- tokenize: tokenizeReferenceFull-}-/** @type {Construct} */-const referenceCollapsedConstruct = {- tokenize: tokenizeReferenceCollapsed-}--/** @type {Resolver} */-function resolveAllLabelEnd(events) {- let index = -1- while (++index < events.length) {- const token = events[index][1]- if (- token.type === 'labelImage' ||- token.type === 'labelLink' ||- token.type === 'labelEnd'- ) {- // Remove the marker.- events.splice(index + 1, token.type === 'labelImage' ? 4 : 2)- token.type = 'data'- index++- }- }- return events-}--/** @type {Resolver} */-function resolveToLabelEnd(events, context) {- let index = events.length- let offset = 0- /** @type {Token} */- let token- /** @type {number | undefined} */- let open- /** @type {number | undefined} */- let close- /** @type {Array<Event>} */- let media-- // Find an opening.- while (index--) {- token = events[index][1]- if (open) {- // If we see another link, or inactive link label, we’ve been here before.- if (- token.type === 'link' ||- (token.type === 'labelLink' && token._inactive)- ) {- break- }-- // Mark other link openings as inactive, as we can’t have links in- // links.- if (events[index][0] === 'enter' && token.type === 'labelLink') {- token._inactive = true- }- } else if (close) {- if (- events[index][0] === 'enter' &&- (token.type === 'labelImage' || token.type === 'labelLink') &&- !token._balanced- ) {- open = index- if (token.type !== 'labelLink') {- offset = 2- break- }- }- } else if (token.type === 'labelEnd') {- close = index- }- }- const group = {- type: events[open][1].type === 'labelLink' ? 'link' : 'image',- start: Object.assign({}, events[open][1].start),- end: Object.assign({}, events[events.length - 1][1].end)- }- const label = {- type: 'label',- start: Object.assign({}, events[open][1].start),- end: Object.assign({}, events[close][1].end)- }- const text = {- type: 'labelText',- start: Object.assign({}, events[open + offset + 2][1].end),- end: Object.assign({}, events[close - 2][1].start)- }- media = [- ['enter', group, context],- ['enter', label, context]- ]-- // Opening marker.- media = push(media, events.slice(open + 1, open + offset + 3))-- // Text open.- media = push(media, [['enter', text, context]])-- // Always populated by defaults.-- // Between.- media = push(- media,- resolveAll(- context.parser.constructs.insideSpan.null,- events.slice(open + offset + 4, close - 3),- context- )- )-- // Text close, marker close, label close.- media = push(media, [- ['exit', text, context],- events[close - 2],- events[close - 1],- ['exit', label, context]- ])-- // Reference, resource, or so.- media = push(media, events.slice(close + 1))-- // Media close.- media = push(media, [['exit', group, context]])- splice(events, open, events.length, media)- return events-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeLabelEnd(effects, ok, nok) {- const self = this- let index = self.events.length- /** @type {Token} */- let labelStart- /** @type {boolean} */- let defined-- // Find an opening.- while (index--) {- if (- (self.events[index][1].type === 'labelImage' ||- self.events[index][1].type === 'labelLink') &&- !self.events[index][1]._balanced- ) {- labelStart = self.events[index][1]- break- }- }- return start-- /**- * Start of label end.- *- * ```markdown- * > | [a](b) c- * ^- * > | [a][b] c- * ^- * > | [a][] b- * ^- * > | [a] b- * ```- *- * @type {State}- */- function start(code) {- // If there is not an okay opening.- if (!labelStart) {- return nok(code)- }-- // If the corresponding label (link) start is marked as inactive,- // it means we’d be wrapping a link, like this:- //- // ```markdown- // > | a [b [c](d) e](f) g.- // ^- // ```- //- // We can’t have that, so it’s just balanced brackets.- if (labelStart._inactive) {- return labelEndNok(code)- }- defined = self.parser.defined.includes(- normalizeIdentifier(- self.sliceSerialize({- start: labelStart.end,- end: self.now()- })- )- )- effects.enter('labelEnd')- effects.enter('labelMarker')- effects.consume(code)- effects.exit('labelMarker')- effects.exit('labelEnd')- return after- }-- /**- * After `]`.- *- * ```markdown- * > | [a](b) c- * ^- * > | [a][b] c- * ^- * > | [a][] b- * ^- * > | [a] b- * ^- * ```- *- * @type {State}- */- function after(code) {- // Note: `markdown-rs` also parses GFM footnotes here, which for us is in- // an extension.-- // Resource (`[asd](fgh)`)?- if (code === 40) {- return effects.attempt(- resourceConstruct,- labelEndOk,- defined ? labelEndOk : labelEndNok- )(code)- }-- // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?- if (code === 91) {- return effects.attempt(- referenceFullConstruct,- labelEndOk,- defined ? referenceNotFull : labelEndNok- )(code)- }-- // Shortcut (`[asd]`) reference?- return defined ? labelEndOk(code) : labelEndNok(code)- }-- /**- * After `]`, at `[`, but not at a full reference.- *- * > 👉 **Note**: we only get here if the label is defined.- *- * ```markdown- * > | [a][] b- * ^- * > | [a] b- * ^- * ```- *- * @type {State}- */- function referenceNotFull(code) {- return effects.attempt(- referenceCollapsedConstruct,- labelEndOk,- labelEndNok- )(code)- }-- /**- * Done, we found something.- *- * ```markdown- * > | [a](b) c- * ^- * > | [a][b] c- * ^- * > | [a][] b- * ^- * > | [a] b- * ^- * ```- *- * @type {State}- */- function labelEndOk(code) {- // Note: `markdown-rs` does a bunch of stuff here.- return ok(code)- }-- /**- * Done, it’s nothing.- *- * There was an okay opening, but we didn’t match anything.- *- * ```markdown- * > | [a](b c- * ^- * > | [a][b c- * ^- * > | [a] b- * ^- * ```- *- * @type {State}- */- function labelEndNok(code) {- labelStart._balanced = true- return nok(code)- }-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeResource(effects, ok, nok) {- return resourceStart-- /**- * At a resource.- *- * ```markdown- * > | [a](b) c- * ^- * ```- *- * @type {State}- */- function resourceStart(code) {- effects.enter('resource')- effects.enter('resourceMarker')- effects.consume(code)- effects.exit('resourceMarker')- return resourceBefore- }-- /**- * In resource, after `(`, at optional whitespace.- *- * ```markdown- * > | [a](b) c- * ^- * ```- *- * @type {State}- */- function resourceBefore(code) {- return markdownLineEndingOrSpace(code)- ? factoryWhitespace(effects, resourceOpen)(code)- : resourceOpen(code)- }-- /**- * In resource, after optional whitespace, at `)` or a destination.- *- * ```markdown- * > | [a](b) c- * ^- * ```- *- * @type {State}- */- function resourceOpen(code) {- if (code === 41) {- return resourceEnd(code)- }- return factoryDestination(- effects,- resourceDestinationAfter,- resourceDestinationMissing,- 'resourceDestination',- 'resourceDestinationLiteral',- 'resourceDestinationLiteralMarker',- 'resourceDestinationRaw',- 'resourceDestinationString',- 32- )(code)- }-- /**- * In resource, after destination, at optional whitespace.- *- * ```markdown- * > | [a](b) c- * ^- * ```- *- * @type {State}- */- function resourceDestinationAfter(code) {- return markdownLineEndingOrSpace(code)- ? factoryWhitespace(effects, resourceBetween)(code)- : resourceEnd(code)- }-- /**- * At invalid destination.- *- * ```markdown- * > | [a](<<) b- * ^- * ```- *- * @type {State}- */- function resourceDestinationMissing(code) {- return nok(code)- }-- /**- * In resource, after destination and whitespace, at `(` or title.- *- * ```markdown- * > | [a](b ) c- * ^- * ```- *- * @type {State}- */- function resourceBetween(code) {- if (code === 34 || code === 39 || code === 40) {- return factoryTitle(- effects,- resourceTitleAfter,- nok,- 'resourceTitle',- 'resourceTitleMarker',- 'resourceTitleString'- )(code)- }- return resourceEnd(code)- }-- /**- * In resource, after title, at optional whitespace.- *- * ```markdown- * > | [a](b "c") d- * ^- * ```- *- * @type {State}- */- function resourceTitleAfter(code) {- return markdownLineEndingOrSpace(code)- ? factoryWhitespace(effects, resourceEnd)(code)- : resourceEnd(code)- }-- /**- * In resource, at `)`.- *- * ```markdown- * > | [a](b) d- * ^- * ```- *- * @type {State}- */- function resourceEnd(code) {- if (code === 41) {- effects.enter('resourceMarker')- effects.consume(code)- effects.exit('resourceMarker')- effects.exit('resource')- return ok- }- return nok(code)- }-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeReferenceFull(effects, ok, nok) {- const self = this- return referenceFull-- /**- * In a reference (full), at the `[`.- *- * ```markdown- * > | [a][b] d- * ^- * ```- *- * @type {State}- */- function referenceFull(code) {- return factoryLabel.call(- self,- effects,- referenceFullAfter,- referenceFullMissing,- 'reference',- 'referenceMarker',- 'referenceString'- )(code)- }-- /**- * In a reference (full), after `]`.- *- * ```markdown- * > | [a][b] d- * ^- * ```- *- * @type {State}- */- function referenceFullAfter(code) {- return self.parser.defined.includes(- normalizeIdentifier(- self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)- )- )- ? ok(code)- : nok(code)- }-- /**- * In reference (full) that was missing.- *- * ```markdown- * > | [a][b d- * ^- * ```- *- * @type {State}- */- function referenceFullMissing(code) {- return nok(code)- }-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeReferenceCollapsed(effects, ok, nok) {- return referenceCollapsedStart-- /**- * In reference (collapsed), at `[`.- *- * > 👉 **Note**: we only get here if the label is defined.- *- * ```markdown- * > | [a][] d- * ^- * ```- *- * @type {State}- */- function referenceCollapsedStart(code) {- // We only attempt a collapsed label if there’s a `[`.-- effects.enter('reference')- effects.enter('referenceMarker')- effects.consume(code)- effects.exit('referenceMarker')- return referenceCollapsedOpen- }-- /**- * In reference (collapsed), at `]`.- *- * > 👉 **Note**: we only get here if the label is defined.- *- * ```markdown- * > | [a][] d- * ^- * ```- *- * @type {State}- */- function referenceCollapsedOpen(code) {- if (code === 93) {- effects.enter('referenceMarker')- effects.consume(code)- effects.exit('referenceMarker')- effects.exit('reference')- return ok- }- return nok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/label-start-image.js-/**- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */----/** @type {Construct} */-const labelStartImage = {- name: 'labelStartImage',- tokenize: tokenizeLabelStartImage,- resolveAll: labelEnd.resolveAll-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeLabelStartImage(effects, ok, nok) {- const self = this- return start-- /**- * Start of label (image) start.- *- * ```markdown- * > | a ![b] c- * ^- * ```- *- * @type {State}- */- function start(code) {- effects.enter('labelImage')- effects.enter('labelImageMarker')- effects.consume(code)- effects.exit('labelImageMarker')- return open- }-- /**- * After `!`, at `[`.- *- * ```markdown- * > | a ![b] c- * ^- * ```- *- * @type {State}- */- function open(code) {- if (code === 91) {- effects.enter('labelMarker')- effects.consume(code)- effects.exit('labelMarker')- effects.exit('labelImage')- return after- }- return nok(code)- }-- /**- * After `![`.- *- * ```markdown- * > | a ![b] c- * ^- * ```- *- * This is needed in because, when GFM footnotes are enabled, images never- * form when started with a `^`.- * Instead, links form:- *- * ```markdown- * - *- * ![^a][b]- *- * [b]: c- * ```- *- * ```html- * <p>!<a href=\"b\">^a</a></p>- * <p>!<a href=\"c\">^a</a></p>- * ```- *- * @type {State}- */- function after(code) {- // To do: use a new field to do this, this is still needed for- // `micromark-extension-gfm-footnote`, but the `label-start-link`- // behavior isn’t.- // Hidden footnotes hook.- /* c8 ignore next 3 */- return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs- ? nok(code)- : ok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-util-classify-character/index.js-/**- * @typedef {import('micromark-util-types').Code} Code- */---/**- * Classify whether a code represents whitespace, punctuation, or something- * else.- *- * Used for attention (emphasis, strong), whose sequences can open or close- * based on the class of surrounding characters.- *- * > 👉 **Note**: eof (`null`) is seen as whitespace.- *- * @param {Code} code- * Code.- * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}- * Group.- */-function classifyCharacter(code) {- if (- code === null ||- markdownLineEndingOrSpace(code) ||- unicodeWhitespace(code)- ) {- return 1- }- if (unicodePunctuation(code)) {- return 2- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/attention.js-/**- * @typedef {import('micromark-util-types').Code} Code- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').Event} Event- * @typedef {import('micromark-util-types').Point} Point- * @typedef {import('micromark-util-types').Resolver} Resolver- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').Token} Token- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */-----/** @type {Construct} */-const attention = {- name: 'attention',- tokenize: tokenizeAttention,- resolveAll: resolveAllAttention-}--/**- * Take all events and resolve attention to emphasis or strong.- *- * @type {Resolver}- */-function resolveAllAttention(events, context) {- let index = -1- /** @type {number} */- let open- /** @type {Token} */- let group- /** @type {Token} */- let text- /** @type {Token} */- let openingSequence- /** @type {Token} */- let closingSequence- /** @type {number} */- let use- /** @type {Array<Event>} */- let nextEvents- /** @type {number} */- let offset-- // Walk through all events.- //- // Note: performance of this is fine on an mb of normal markdown, but it’s- // a bottleneck for malicious stuff.- while (++index < events.length) {- // Find a token that can close.- if (- events[index][0] === 'enter' &&- events[index][1].type === 'attentionSequence' &&- events[index][1]._close- ) {- open = index-- // Now walk back to find an opener.- while (open--) {- // Find a token that can open the closer.- if (- events[open][0] === 'exit' &&- events[open][1].type === 'attentionSequence' &&- events[open][1]._open &&- // If the markers are the same:- context.sliceSerialize(events[open][1]).charCodeAt(0) ===- context.sliceSerialize(events[index][1]).charCodeAt(0)- ) {- // If the opening can close or the closing can open,- // and the close size *is not* a multiple of three,- // but the sum of the opening and closing size *is* multiple of three,- // then don’t match.- if (- (events[open][1]._close || events[index][1]._open) &&- (events[index][1].end.offset - events[index][1].start.offset) % 3 &&- !(- (events[open][1].end.offset -- events[open][1].start.offset +- events[index][1].end.offset -- events[index][1].start.offset) %- 3- )- ) {- continue- }-- // Number of markers to use from the sequence.- use =- events[open][1].end.offset - events[open][1].start.offset > 1 &&- events[index][1].end.offset - events[index][1].start.offset > 1- ? 2- : 1- const start = Object.assign({}, events[open][1].end)- const end = Object.assign({}, events[index][1].start)- movePoint(start, -use)- movePoint(end, use)- openingSequence = {- type: use > 1 ? 'strongSequence' : 'emphasisSequence',- start,- end: Object.assign({}, events[open][1].end)- }- closingSequence = {- type: use > 1 ? 'strongSequence' : 'emphasisSequence',- start: Object.assign({}, events[index][1].start),- end- }- text = {- type: use > 1 ? 'strongText' : 'emphasisText',- start: Object.assign({}, events[open][1].end),- end: Object.assign({}, events[index][1].start)- }- group = {- type: use > 1 ? 'strong' : 'emphasis',- start: Object.assign({}, openingSequence.start),- end: Object.assign({}, closingSequence.end)- }- events[open][1].end = Object.assign({}, openingSequence.start)- events[index][1].start = Object.assign({}, closingSequence.end)- nextEvents = []-- // If there are more markers in the opening, add them before.- if (events[open][1].end.offset - events[open][1].start.offset) {- nextEvents = push(nextEvents, [- ['enter', events[open][1], context],- ['exit', events[open][1], context]- ])- }-- // Opening.- nextEvents = push(nextEvents, [- ['enter', group, context],- ['enter', openingSequence, context],- ['exit', openingSequence, context],- ['enter', text, context]- ])-- // Always populated by defaults.-- // Between.- nextEvents = push(- nextEvents,- resolveAll(- context.parser.constructs.insideSpan.null,- events.slice(open + 1, index),- context- )- )-- // Closing.- nextEvents = push(nextEvents, [- ['exit', text, context],- ['enter', closingSequence, context],- ['exit', closingSequence, context],- ['exit', group, context]- ])-- // If there are more markers in the closing, add them after.- if (events[index][1].end.offset - events[index][1].start.offset) {- offset = 2- nextEvents = push(nextEvents, [- ['enter', events[index][1], context],- ['exit', events[index][1], context]- ])- } else {- offset = 0- }- splice(events, open - 1, index - open + 3, nextEvents)- index = open + nextEvents.length - offset - 2- break- }- }- }- }-- // Remove remaining sequences.- index = -1- while (++index < events.length) {- if (events[index][1].type === 'attentionSequence') {- events[index][1].type = 'data'- }- }- return events-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeAttention(effects, ok) {- const attentionMarkers = this.parser.constructs.attentionMarkers.null- const previous = this.previous- const before = classifyCharacter(previous)-- /** @type {NonNullable<Code>} */- let marker- return start-- /**- * Before a sequence.- *- * ```markdown- * > | **- * ^- * ```- *- * @type {State}- */- function start(code) {- marker = code- effects.enter('attentionSequence')- return inside(code)- }-- /**- * In a sequence.- *- * ```markdown- * > | **- * ^^- * ```- *- * @type {State}- */- function inside(code) {- if (code === marker) {- effects.consume(code)- return inside- }- const token = effects.exit('attentionSequence')-- // To do: next major: move this to resolver, just like `markdown-rs`.- const after = classifyCharacter(code)-- // Always populated by defaults.-- const open =- !after || (after === 2 && before) || attentionMarkers.includes(code)- const close =- !before || (before === 2 && after) || attentionMarkers.includes(previous)- token._open = Boolean(marker === 42 ? open : open && (before || !close))- token._close = Boolean(marker === 42 ? close : close && (after || !open))- return ok(code)- }-}--/**- * Move a point a bit.- *- * Note: `move` only works inside lines! It’s not possible to move past other- * chunks (replacement characters, tabs, or line endings).- *- * @param {Point} point- * @param {number} offset- * @returns {void}- */-function movePoint(point, offset) {- point.column += offset- point.offset += offset- point._bufferIndex += offset-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/autolink.js-/**- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */---/** @type {Construct} */-const autolink = {- name: 'autolink',- tokenize: tokenizeAutolink-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeAutolink(effects, ok, nok) {- let size = 0- return start-- /**- * Start of an autolink.- *- * ```markdown- * > | a<https://example.com>b- * ^- * > | a<[email protected]>b- * ^- * ```- *- * @type {State}- */- function start(code) {- effects.enter('autolink')- effects.enter('autolinkMarker')- effects.consume(code)- effects.exit('autolinkMarker')- effects.enter('autolinkProtocol')- return open- }-- /**- * After `<`, at protocol or atext.- *- * ```markdown- * > | a<https://example.com>b- * ^- * > | a<[email protected]>b- * ^- * ```- *- * @type {State}- */- function open(code) {- if (asciiAlpha(code)) {- effects.consume(code)- return schemeOrEmailAtext- }- return emailAtext(code)- }-- /**- * At second byte of protocol or atext.- *- * ```markdown- * > | a<https://example.com>b- * ^- * > | a<[email protected]>b- * ^- * ```- *- * @type {State}- */- function schemeOrEmailAtext(code) {- // ASCII alphanumeric and `+`, `-`, and `.`.- if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {- // Count the previous alphabetical from `open` too.- size = 1- return schemeInsideOrEmailAtext(code)- }- return emailAtext(code)- }-- /**- * In ambiguous protocol or atext.- *- * ```markdown- * > | a<https://example.com>b- * ^- * > | a<[email protected]>b- * ^- * ```- *- * @type {State}- */- function schemeInsideOrEmailAtext(code) {- if (code === 58) {- effects.consume(code)- size = 0- return urlInside- }-- // ASCII alphanumeric and `+`, `-`, and `.`.- if (- (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) &&- size++ < 32- ) {- effects.consume(code)- return schemeInsideOrEmailAtext- }- size = 0- return emailAtext(code)- }-- /**- * After protocol, in URL.- *- * ```markdown- * > | a<https://example.com>b- * ^- * ```- *- * @type {State}- */- function urlInside(code) {- if (code === 62) {- effects.exit('autolinkProtocol')- effects.enter('autolinkMarker')- effects.consume(code)- effects.exit('autolinkMarker')- effects.exit('autolink')- return ok- }-- // ASCII control, space, or `<`.- if (code === null || code === 32 || code === 60 || asciiControl(code)) {- return nok(code)- }- effects.consume(code)- return urlInside- }-- /**- * In email atext.- *- * ```markdown- * > | a<[email protected]>b- * ^- * ```- *- * @type {State}- */- function emailAtext(code) {- if (code === 64) {- effects.consume(code)- return emailAtSignOrDot- }- if (asciiAtext(code)) {- effects.consume(code)- return emailAtext- }- return nok(code)- }-- /**- * In label, after at-sign or dot.- *- * ```markdown- * > | a<[email protected]>b- * ^ ^- * ```- *- * @type {State}- */- function emailAtSignOrDot(code) {- return asciiAlphanumeric(code) ? emailLabel(code) : nok(code)- }-- /**- * In label, where `.` and `>` are allowed.- *- * ```markdown- * > | a<[email protected]>b- * ^- * ```- *- * @type {State}- */- function emailLabel(code) {- if (code === 46) {- effects.consume(code)- size = 0- return emailAtSignOrDot- }- if (code === 62) {- // Exit, then change the token type.- effects.exit('autolinkProtocol').type = 'autolinkEmail'- effects.enter('autolinkMarker')- effects.consume(code)- effects.exit('autolinkMarker')- effects.exit('autolink')- return ok- }- return emailValue(code)- }-- /**- * In label, where `.` and `>` are *not* allowed.- *- * Though, this is also used in `emailLabel` to parse other values.- *- * ```markdown- * > | a<[email protected]>b- * ^- * ```- *- * @type {State}- */- function emailValue(code) {- // ASCII alphanumeric or `-`.- if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {- const next = code === 45 ? emailValue : emailLabel- effects.consume(code)- return next- }- return nok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/html-text.js-/**- * @typedef {import('micromark-util-types').Code} Code- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */----/** @type {Construct} */-const htmlText = {- name: 'htmlText',- tokenize: tokenizeHtmlText-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeHtmlText(effects, ok, nok) {- const self = this- /** @type {NonNullable<Code> | undefined} */- let marker- /** @type {number} */- let index- /** @type {State} */- let returnState- return start-- /**- * Start of HTML (text).- *- * ```markdown- * > | a <b> c- * ^- * ```- *- * @type {State}- */- function start(code) {- effects.enter('htmlText')- effects.enter('htmlTextData')- effects.consume(code)- return open- }-- /**- * After `<`, at tag name or other stuff.- *- * ```markdown- * > | a <b> c- * ^- * > | a <!doctype> c- * ^- * > | a <!--b--> c- * ^- * ```- *- * @type {State}- */- function open(code) {- if (code === 33) {- effects.consume(code)- return declarationOpen- }- if (code === 47) {- effects.consume(code)- return tagCloseStart- }- if (code === 63) {- effects.consume(code)- return instruction- }-- // ASCII alphabetical.- if (asciiAlpha(code)) {- effects.consume(code)- return tagOpen- }- return nok(code)- }-- /**- * After `<!`, at declaration, comment, or CDATA.- *- * ```markdown- * > | a <!doctype> c- * ^- * > | a <!--b--> c- * ^- * > | a <![CDATA[>&<]]> c- * ^- * ```- *- * @type {State}- */- function declarationOpen(code) {- if (code === 45) {- effects.consume(code)- return commentOpenInside- }- if (code === 91) {- effects.consume(code)- index = 0- return cdataOpenInside- }- if (asciiAlpha(code)) {- effects.consume(code)- return declaration- }- return nok(code)- }-- /**- * In a comment, after `<!-`, at another `-`.- *- * ```markdown- * > | a <!--b--> c- * ^- * ```- *- * @type {State}- */- function commentOpenInside(code) {- if (code === 45) {- effects.consume(code)- return commentEnd- }- return nok(code)- }-- /**- * In comment.- *- * ```markdown- * > | a <!--b--> c- * ^- * ```- *- * @type {State}- */- function comment(code) {- if (code === null) {- return nok(code)- }- if (code === 45) {- effects.consume(code)- return commentClose- }- if (markdownLineEnding(code)) {- returnState = comment- return lineEndingBefore(code)- }- effects.consume(code)- return comment- }-- /**- * In comment, after `-`.- *- * ```markdown- * > | a <!--b--> c- * ^- * ```- *- * @type {State}- */- function commentClose(code) {- if (code === 45) {- effects.consume(code)- return commentEnd- }- return comment(code)- }-- /**- * In comment, after `--`.- *- * ```markdown- * > | a <!--b--> c- * ^- * ```- *- * @type {State}- */- function commentEnd(code) {- return code === 62- ? end(code)- : code === 45- ? commentClose(code)- : comment(code)- }-- /**- * After `<![`, in CDATA, expecting `CDATA[`.- *- * ```markdown- * > | a <![CDATA[>&<]]> b- * ^^^^^^- * ```- *- * @type {State}- */- function cdataOpenInside(code) {- const value = 'CDATA['- if (code === value.charCodeAt(index++)) {- effects.consume(code)- return index === value.length ? cdata : cdataOpenInside- }- return nok(code)- }-- /**- * In CDATA.- *- * ```markdown- * > | a <![CDATA[>&<]]> b- * ^^^- * ```- *- * @type {State}- */- function cdata(code) {- if (code === null) {- return nok(code)- }- if (code === 93) {- effects.consume(code)- return cdataClose- }- if (markdownLineEnding(code)) {- returnState = cdata- return lineEndingBefore(code)- }- effects.consume(code)- return cdata- }-- /**- * In CDATA, after `]`, at another `]`.- *- * ```markdown- * > | a <![CDATA[>&<]]> b- * ^- * ```- *- * @type {State}- */- function cdataClose(code) {- if (code === 93) {- effects.consume(code)- return cdataEnd- }- return cdata(code)- }-- /**- * In CDATA, after `]]`, at `>`.- *- * ```markdown- * > | a <![CDATA[>&<]]> b- * ^- * ```- *- * @type {State}- */- function cdataEnd(code) {- if (code === 62) {- return end(code)- }- if (code === 93) {- effects.consume(code)- return cdataEnd- }- return cdata(code)- }-- /**- * In declaration.- *- * ```markdown- * > | a <!b> c- * ^- * ```- *- * @type {State}- */- function declaration(code) {- if (code === null || code === 62) {- return end(code)- }- if (markdownLineEnding(code)) {- returnState = declaration- return lineEndingBefore(code)- }- effects.consume(code)- return declaration- }-- /**- * In instruction.- *- * ```markdown- * > | a <?b?> c- * ^- * ```- *- * @type {State}- */- function instruction(code) {- if (code === null) {- return nok(code)- }- if (code === 63) {- effects.consume(code)- return instructionClose- }- if (markdownLineEnding(code)) {- returnState = instruction- return lineEndingBefore(code)- }- effects.consume(code)- return instruction- }-- /**- * In instruction, after `?`, at `>`.- *- * ```markdown- * > | a <?b?> c- * ^- * ```- *- * @type {State}- */- function instructionClose(code) {- return code === 62 ? end(code) : instruction(code)- }-- /**- * After `</`, in closing tag, at tag name.- *- * ```markdown- * > | a </b> c- * ^- * ```- *- * @type {State}- */- function tagCloseStart(code) {- // ASCII alphabetical.- if (asciiAlpha(code)) {- effects.consume(code)- return tagClose- }- return nok(code)- }-- /**- * After `</x`, in a tag name.- *- * ```markdown- * > | a </b> c- * ^- * ```- *- * @type {State}- */- function tagClose(code) {- // ASCII alphanumerical and `-`.- if (code === 45 || asciiAlphanumeric(code)) {- effects.consume(code)- return tagClose- }- return tagCloseBetween(code)- }-- /**- * In closing tag, after tag name.- *- * ```markdown- * > | a </b> c- * ^- * ```- *- * @type {State}- */- function tagCloseBetween(code) {- if (markdownLineEnding(code)) {- returnState = tagCloseBetween- return lineEndingBefore(code)- }- if (markdownSpace(code)) {- effects.consume(code)- return tagCloseBetween- }- return end(code)- }-- /**- * After `<x`, in opening tag name.- *- * ```markdown- * > | a <b> c- * ^- * ```- *- * @type {State}- */- function tagOpen(code) {- // ASCII alphanumerical and `-`.- if (code === 45 || asciiAlphanumeric(code)) {- effects.consume(code)- return tagOpen- }- if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {- return tagOpenBetween(code)- }- return nok(code)- }-- /**- * In opening tag, after tag name.- *- * ```markdown- * > | a <b> c- * ^- * ```- *- * @type {State}- */- function tagOpenBetween(code) {- if (code === 47) {- effects.consume(code)- return end- }-- // ASCII alphabetical and `:` and `_`.- if (code === 58 || code === 95 || asciiAlpha(code)) {- effects.consume(code)- return tagOpenAttributeName- }- if (markdownLineEnding(code)) {- returnState = tagOpenBetween- return lineEndingBefore(code)- }- if (markdownSpace(code)) {- effects.consume(code)- return tagOpenBetween- }- return end(code)- }-- /**- * In attribute name.- *- * ```markdown- * > | a <b c> d- * ^- * ```- *- * @type {State}- */- function tagOpenAttributeName(code) {- // ASCII alphabetical and `-`, `.`, `:`, and `_`.- if (- code === 45 ||- code === 46 ||- code === 58 ||- code === 95 ||- asciiAlphanumeric(code)- ) {- effects.consume(code)- return tagOpenAttributeName- }- return tagOpenAttributeNameAfter(code)- }-- /**- * After attribute name, before initializer, the end of the tag, or- * whitespace.- *- * ```markdown- * > | a <b c> d- * ^- * ```- *- * @type {State}- */- function tagOpenAttributeNameAfter(code) {- if (code === 61) {- effects.consume(code)- return tagOpenAttributeValueBefore- }- if (markdownLineEnding(code)) {- returnState = tagOpenAttributeNameAfter- return lineEndingBefore(code)- }- if (markdownSpace(code)) {- effects.consume(code)- return tagOpenAttributeNameAfter- }- return tagOpenBetween(code)- }-- /**- * Before unquoted, double quoted, or single quoted attribute value, allowing- * whitespace.- *- * ```markdown- * > | a <b c=d> e- * ^- * ```- *- * @type {State}- */- function tagOpenAttributeValueBefore(code) {- if (- code === null ||- code === 60 ||- code === 61 ||- code === 62 ||- code === 96- ) {- return nok(code)- }- if (code === 34 || code === 39) {- effects.consume(code)- marker = code- return tagOpenAttributeValueQuoted- }- if (markdownLineEnding(code)) {- returnState = tagOpenAttributeValueBefore- return lineEndingBefore(code)- }- if (markdownSpace(code)) {- effects.consume(code)- return tagOpenAttributeValueBefore- }- effects.consume(code)- return tagOpenAttributeValueUnquoted- }-- /**- * In double or single quoted attribute value.- *- * ```markdown- * > | a <b c="d"> e- * ^- * ```- *- * @type {State}- */- function tagOpenAttributeValueQuoted(code) {- if (code === marker) {- effects.consume(code)- marker = undefined- return tagOpenAttributeValueQuotedAfter- }- if (code === null) {- return nok(code)- }- if (markdownLineEnding(code)) {- returnState = tagOpenAttributeValueQuoted- return lineEndingBefore(code)- }- effects.consume(code)- return tagOpenAttributeValueQuoted- }-- /**- * In unquoted attribute value.- *- * ```markdown- * > | a <b c=d> e- * ^- * ```- *- * @type {State}- */- function tagOpenAttributeValueUnquoted(code) {- if (- code === null ||- code === 34 ||- code === 39 ||- code === 60 ||- code === 61 ||- code === 96- ) {- return nok(code)- }- if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {- return tagOpenBetween(code)- }- effects.consume(code)- return tagOpenAttributeValueUnquoted- }-- /**- * After double or single quoted attribute value, before whitespace or the end- * of the tag.- *- * ```markdown- * > | a <b c="d"> e- * ^- * ```- *- * @type {State}- */- function tagOpenAttributeValueQuotedAfter(code) {- if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {- return tagOpenBetween(code)- }- return nok(code)- }-- /**- * In certain circumstances of a tag where only an `>` is allowed.- *- * ```markdown- * > | a <b c="d"> e- * ^- * ```- *- * @type {State}- */- function end(code) {- if (code === 62) {- effects.consume(code)- effects.exit('htmlTextData')- effects.exit('htmlText')- return ok- }- return nok(code)- }-- /**- * At eol.- *- * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about- * > empty tokens.- *- * ```markdown- * > | a <!--a- * ^- * | b-->- * ```- *- * @type {State}- */- function lineEndingBefore(code) {- effects.exit('htmlTextData')- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- return lineEndingAfter- }-- /**- * After eol, at optional whitespace.- *- * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about- * > empty tokens.- *- * ```markdown- * | a <!--a- * > | b-->- * ^- * ```- *- * @type {State}- */- function lineEndingAfter(code) {- // Always populated by defaults.-- return markdownSpace(code)- ? factorySpace(- effects,- lineEndingAfterPrefix,- 'linePrefix',- self.parser.constructs.disable.null.includes('codeIndented')- ? undefined- : 4- )(code)- : lineEndingAfterPrefix(code)- }-- /**- * After eol, after optional whitespace.- *- * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about- * > empty tokens.- *- * ```markdown- * | a <!--a- * > | b-->- * ^- * ```- *- * @type {State}- */- function lineEndingAfterPrefix(code) {- effects.enter('htmlTextData')- return returnState(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/label-start-link.js-/**- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */----/** @type {Construct} */-const labelStartLink = {- name: 'labelStartLink',- tokenize: tokenizeLabelStartLink,- resolveAll: labelEnd.resolveAll-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeLabelStartLink(effects, ok, nok) {- const self = this- return start-- /**- * Start of label (link) start.- *- * ```markdown- * > | a [b] c- * ^- * ```- *- * @type {State}- */- function start(code) {- effects.enter('labelLink')- effects.enter('labelMarker')- effects.consume(code)- effects.exit('labelMarker')- effects.exit('labelLink')- return after- }-- /** @type {State} */- function after(code) {- // To do: this isn’t needed in `micromark-extension-gfm-footnote`,- // remove.- // Hidden footnotes hook.- /* c8 ignore next 3 */- return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs- ? nok(code)- : ok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/hard-break-escape.js-/**- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */---/** @type {Construct} */-const hardBreakEscape = {- name: 'hardBreakEscape',- tokenize: tokenizeHardBreakEscape-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeHardBreakEscape(effects, ok, nok) {- return start-- /**- * Start of a hard break (escape).- *- * ```markdown- * > | a\- * ^- * | b- * ```- *- * @type {State}- */- function start(code) {- effects.enter('hardBreakEscape')- effects.consume(code)- return after- }-- /**- * After `\`, at eol.- *- * ```markdown- * > | a\- * ^- * | b- * ```- *- * @type {State}- */- function after(code) {- if (markdownLineEnding(code)) {- effects.exit('hardBreakEscape')- return ok(code)- }- return nok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-core-commonmark/lib/code-text.js-/**- * @typedef {import('micromark-util-types').Construct} Construct- * @typedef {import('micromark-util-types').Previous} Previous- * @typedef {import('micromark-util-types').Resolver} Resolver- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').Token} Token- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */---/** @type {Construct} */-const codeText = {- name: 'codeText',- tokenize: tokenizeCodeText,- resolve: resolveCodeText,- previous-}--// To do: next major: don’t resolve, like `markdown-rs`.-/** @type {Resolver} */-function resolveCodeText(events) {- let tailExitIndex = events.length - 4- let headEnterIndex = 3- /** @type {number} */- let index- /** @type {number | undefined} */- let enter-- // If we start and end with an EOL or a space.- if (- (events[headEnterIndex][1].type === 'lineEnding' ||- events[headEnterIndex][1].type === 'space') &&- (events[tailExitIndex][1].type === 'lineEnding' ||- events[tailExitIndex][1].type === 'space')- ) {- index = headEnterIndex-- // And we have data.- while (++index < tailExitIndex) {- if (events[index][1].type === 'codeTextData') {- // Then we have padding.- events[headEnterIndex][1].type = 'codeTextPadding'- events[tailExitIndex][1].type = 'codeTextPadding'- headEnterIndex += 2- tailExitIndex -= 2- break- }- }- }-- // Merge adjacent spaces and data.- index = headEnterIndex - 1- tailExitIndex++- while (++index <= tailExitIndex) {- if (enter === undefined) {- if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') {- enter = index- }- } else if (- index === tailExitIndex ||- events[index][1].type === 'lineEnding'- ) {- events[enter][1].type = 'codeTextData'- if (index !== enter + 2) {- events[enter][1].end = events[index - 1][1].end- events.splice(enter + 2, index - enter - 2)- tailExitIndex -= index - enter - 2- index = enter + 2- }- enter = undefined- }- }- return events-}--/**- * @this {TokenizeContext}- * @type {Previous}- */-function previous(code) {- // If there is a previous code, there will always be a tail.- return (- code !== 96 ||- this.events[this.events.length - 1][1].type === 'characterEscape'- )-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeCodeText(effects, ok, nok) {- const self = this- let sizeOpen = 0- /** @type {number} */- let size- /** @type {Token} */- let token- return start-- /**- * Start of code (text).- *- * ```markdown- * > | `a`- * ^- * > | \`a`- * ^- * ```- *- * @type {State}- */- function start(code) {- effects.enter('codeText')- effects.enter('codeTextSequence')- return sequenceOpen(code)- }-- /**- * In opening sequence.- *- * ```markdown- * > | `a`- * ^- * ```- *- * @type {State}- */- function sequenceOpen(code) {- if (code === 96) {- effects.consume(code)- sizeOpen++- return sequenceOpen- }- effects.exit('codeTextSequence')- return between(code)- }-- /**- * Between something and something else.- *- * ```markdown- * > | `a`- * ^^- * ```- *- * @type {State}- */- function between(code) {- // EOF.- if (code === null) {- return nok(code)- }-- // To do: next major: don’t do spaces in resolve, but when compiling,- // like `markdown-rs`.- // Tabs don’t work, and virtual spaces don’t make sense.- if (code === 32) {- effects.enter('space')- effects.consume(code)- effects.exit('space')- return between- }-- // Closing fence? Could also be data.- if (code === 96) {- token = effects.enter('codeTextSequence')- size = 0- return sequenceClose(code)- }- if (markdownLineEnding(code)) {- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- return between- }-- // Data.- effects.enter('codeTextData')- return data(code)- }-- /**- * In data.- *- * ```markdown- * > | `a`- * ^- * ```- *- * @type {State}- */- function data(code) {- if (- code === null ||- code === 32 ||- code === 96 ||- markdownLineEnding(code)- ) {- effects.exit('codeTextData')- return between(code)- }- effects.consume(code)- return data- }-- /**- * In closing sequence.- *- * ```markdown- * > | `a`- * ^- * ```- *- * @type {State}- */- function sequenceClose(code) {- // More.- if (code === 96) {- effects.consume(code)- size++- return sequenceClose- }-- // Done!- if (size === sizeOpen) {- effects.exit('codeTextSequence')- effects.exit('codeText')- return ok(code)- }-- // More or less accents: mark as data.- token.type = 'codeTextData'- return data(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark/lib/constructs.js-/**- * @typedef {import('micromark-util-types').Extension} Extension- */-----/** @satisfies {Extension['document']} */-const constructs_document = {- [42]: list,- [43]: list,- [45]: list,- [48]: list,- [49]: list,- [50]: list,- [51]: list,- [52]: list,- [53]: list,- [54]: list,- [55]: list,- [56]: list,- [57]: list,- [62]: blockQuote-}--/** @satisfies {Extension['contentInitial']} */-const contentInitial = {- [91]: definition-}--/** @satisfies {Extension['flowInitial']} */-const flowInitial = {- [-2]: codeIndented,- [-1]: codeIndented,- [32]: codeIndented-}--/** @satisfies {Extension['flow']} */-const constructs_flow = {- [35]: headingAtx,- [42]: thematicBreak,- [45]: [setextUnderline, thematicBreak],- [60]: htmlFlow,- [61]: setextUnderline,- [95]: thematicBreak,- [96]: codeFenced,- [126]: codeFenced-}--/** @satisfies {Extension['string']} */-const constructs_string = {- [38]: characterReference,- [92]: characterEscape-}--/** @satisfies {Extension['text']} */-const constructs_text = {- [-5]: lineEnding,- [-4]: lineEnding,- [-3]: lineEnding,- [33]: labelStartImage,- [38]: characterReference,- [42]: attention,- [60]: [autolink, htmlText],- [91]: labelStartLink,- [92]: [hardBreakEscape, characterEscape],- [93]: labelEnd,- [95]: attention,- [96]: codeText-}--/** @satisfies {Extension['insideSpan']} */-const insideSpan = {- null: [attention, resolver]-}--/** @satisfies {Extension['attentionMarkers']} */-const attentionMarkers = {- null: [42, 95]-}--/** @satisfies {Extension['disable']} */-const disable = {- null: []-}--;// CONCATENATED MODULE: ./node_modules/micromark/lib/parse.js-/**- * @typedef {import('micromark-util-types').Create} Create- * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension- * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct- * @typedef {import('micromark-util-types').ParseContext} ParseContext- * @typedef {import('micromark-util-types').ParseOptions} ParseOptions- */----------/**- * @param {ParseOptions | null | undefined} [options]- * @returns {ParseContext}- */-function parse(options) {- const settings = options || {}- const constructs =- /** @type {FullNormalizedExtension} */- combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])])-- /** @type {ParseContext} */- const parser = {- defined: [],- lazy: {},- constructs,- content: create(content),- document: create(document_document),- flow: create(flow),- string: create(string),- text: create(text_text)- }- return parser-- /**- * @param {InitialConstruct} initial- */- function create(initial) {- return creator- /** @type {Create} */- function creator(from) {- return createTokenizer(parser, initial, from)- }- }-}--;// CONCATENATED MODULE: ./node_modules/micromark/lib/preprocess.js-/**- * @typedef {import('micromark-util-types').Chunk} Chunk- * @typedef {import('micromark-util-types').Code} Code- * @typedef {import('micromark-util-types').Encoding} Encoding- * @typedef {import('micromark-util-types').Value} Value- */--/**- * @callback Preprocessor- * @param {Value} value- * @param {Encoding | null | undefined} [encoding]- * @param {boolean | null | undefined} [end=false]- * @returns {Array<Chunk>}- */--const search = /[\0\t\n\r]/g--/**- * @returns {Preprocessor}- */-function preprocess() {- let column = 1- let buffer = ''- /** @type {boolean | undefined} */- let start = true- /** @type {boolean | undefined} */- let atCarriageReturn- return preprocessor-- /** @type {Preprocessor} */- function preprocessor(value, encoding, end) {- /** @type {Array<Chunk>} */- const chunks = []- /** @type {RegExpMatchArray | null} */- let match- /** @type {number} */- let next- /** @type {number} */- let startPosition- /** @type {number} */- let endPosition- /** @type {Code} */- let code-- // @ts-expect-error `Buffer` does allow an encoding.- value = buffer + value.toString(encoding)- startPosition = 0- buffer = ''- if (start) {- // To do: `markdown-rs` actually parses BOMs (byte order mark).- if (value.charCodeAt(0) === 65279) {- startPosition++- }- start = undefined- }- while (startPosition < value.length) {- search.lastIndex = startPosition- match = search.exec(value)- endPosition =- match && match.index !== undefined ? match.index : value.length- code = value.charCodeAt(endPosition)- if (!match) {- buffer = value.slice(startPosition)- break- }- if (code === 10 && startPosition === endPosition && atCarriageReturn) {- chunks.push(-3)- atCarriageReturn = undefined- } else {- if (atCarriageReturn) {- chunks.push(-5)- atCarriageReturn = undefined- }- if (startPosition < endPosition) {- chunks.push(value.slice(startPosition, endPosition))- column += endPosition - startPosition- }- switch (code) {- case 0: {- chunks.push(65533)- column++- break- }- case 9: {- next = Math.ceil(column / 4) * 4- chunks.push(-2)- while (column++ < next) chunks.push(-1)- break- }- case 10: {- chunks.push(-4)- column = 1- break- }- default: {- atCarriageReturn = true- column = 1- }- }- }- startPosition = endPosition + 1- }- if (end) {- if (atCarriageReturn) chunks.push(-5)- if (buffer) chunks.push(buffer)- chunks.push(null)- }- return chunks- }-}--;// CONCATENATED MODULE: ./node_modules/micromark/lib/postprocess.js-/**- * @typedef {import('micromark-util-types').Event} Event- */----/**- * @param {Array<Event>} events- * @returns {Array<Event>}- */-function postprocess(events) {- while (!subtokenize(events)) {- // Empty- }- return events-}--;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js-/**- * Turn the number (in string form as either hexa- or plain decimal) coming from- * a numeric character reference into a character.- *- * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes- * non-characters and control characters safe.- *- * @param {string} value- * Value to decode.- * @param {number} base- * Numeric base.- * @returns {string}- * Character.- */-function decodeNumericCharacterReference(value, base) {- const code = Number.parseInt(value, base)- if (- // C0 except for HT, LF, FF, CR, space.- code < 9 ||- code === 11 ||- (code > 13 && code < 32) ||- // Control character (DEL) of C0, and C1 controls.- (code > 126 && code < 160) ||- // Lone high surrogates and low surrogates.- (code > 55295 && code < 57344) ||- // Noncharacters.- (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ ||- (code & 65535) === 65535 ||- (code & 65535) === 65534 /* eslint-enable no-bitwise */ ||- // Out of range- code > 1114111- ) {- return '\uFFFD'- }- return String.fromCharCode(code)-}--;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-string/index.js---const characterEscapeOrReference =- /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi--/**- * Decode markdown strings (which occur in places such as fenced code info- * strings, destinations, labels, and titles).- *- * The “string” content type allows character escapes and -references.- * This decodes those.- *- * @param {string} value- * Value to decode.- * @returns {string}- * Decoded value.- */-function decodeString(value) {- return value.replace(characterEscapeOrReference, decode)-}--/**- * @param {string} $0- * @param {string} $1- * @param {string} $2- * @returns {string}- */-function decode($0, $1, $2) {- if ($1) {- // Escape.- return $1- }-- // Reference.- const head = $2.charCodeAt(0)- if (head === 35) {- const head = $2.charCodeAt(1)- const hex = head === 120 || head === 88- return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10)- }- return decodeNamedCharacterReference($2) || $0-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-from-markdown/lib/index.js-/**- * @typedef {import('micromark-util-types').Encoding} Encoding- * @typedef {import('micromark-util-types').Event} Event- * @typedef {import('micromark-util-types').ParseOptions} ParseOptions- * @typedef {import('micromark-util-types').Token} Token- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Value} Value- *- * @typedef {import('unist').Parent} UnistParent- * @typedef {import('unist').Point} Point- *- * @typedef {import('mdast').PhrasingContent} PhrasingContent- * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent- * @typedef {import('mdast').Content} Content- * @typedef {import('mdast').Break} Break- * @typedef {import('mdast').Blockquote} Blockquote- * @typedef {import('mdast').Code} Code- * @typedef {import('mdast').Definition} Definition- * @typedef {import('mdast').Emphasis} Emphasis- * @typedef {import('mdast').Heading} Heading- * @typedef {import('mdast').HTML} HTML- * @typedef {import('mdast').Image} Image- * @typedef {import('mdast').ImageReference} ImageReference- * @typedef {import('mdast').InlineCode} InlineCode- * @typedef {import('mdast').Link} Link- * @typedef {import('mdast').LinkReference} LinkReference- * @typedef {import('mdast').List} List- * @typedef {import('mdast').ListItem} ListItem- * @typedef {import('mdast').Paragraph} Paragraph- * @typedef {import('mdast').Root} Root- * @typedef {import('mdast').Strong} Strong- * @typedef {import('mdast').Text} Text- * @typedef {import('mdast').ThematicBreak} ThematicBreak- * @typedef {import('mdast').ReferenceType} ReferenceType- * @typedef {import('../index.js').CompileData} CompileData- */--/**- * @typedef {Root | Content} Node- * @typedef {Extract<Node, UnistParent>} Parent- *- * @typedef {Omit<UnistParent, 'type' | 'children'> & {type: 'fragment', children: Array<PhrasingContent>}} Fragment- */--/**- * @callback Transform- * Extra transform, to change the AST afterwards.- * @param {Root} tree- * Tree to transform.- * @returns {Root | undefined | null | void}- * New tree or nothing (in which case the current tree is used).- *- * @callback Handle- * Handle a token.- * @param {CompileContext} this- * Context.- * @param {Token} token- * Current token.- * @returns {void}- * Nothing.- *- * @typedef {Record<string, Handle>} Handles- * Token types mapping to handles- *- * @callback OnEnterError- * Handle the case where the `right` token is open, but it is closed (by the- * `left` token) or because we reached the end of the document.- * @param {Omit<CompileContext, 'sliceSerialize'>} this- * Context.- * @param {Token | undefined} left- * Left token.- * @param {Token} right- * Right token.- * @returns {void}- * Nothing.- *- * @callback OnExitError- * Handle the case where the `right` token is open but it is closed by- * exiting the `left` token.- * @param {Omit<CompileContext, 'sliceSerialize'>} this- * Context.- * @param {Token} left- * Left token.- * @param {Token} right- * Right token.- * @returns {void}- * Nothing.- *- * @typedef {[Token, OnEnterError | undefined]} TokenTuple- * Open token on the stack, with an optional error handler for when- * that token isn’t closed properly.- */--/**- * @typedef Config- * Configuration.- *- * We have our defaults, but extensions will add more.- * @property {Array<string>} canContainEols- * Token types where line endings are used.- * @property {Handles} enter- * Opening handles.- * @property {Handles} exit- * Closing handles.- * @property {Array<Transform>} transforms- * Tree transforms.- *- * @typedef {Partial<Config>} Extension- * Change how markdown tokens from micromark are turned into mdast.- *- * @typedef CompileContext- * mdast compiler context.- * @property {Array<Node | Fragment>} stack- * Stack of nodes.- * @property {Array<TokenTuple>} tokenStack- * Stack of tokens.- * @property {<Key extends keyof CompileData>(key: Key) => CompileData[Key]} getData- * Get data from the key/value store.- * @property {<Key extends keyof CompileData>(key: Key, value?: CompileData[Key]) => void} setData- * Set data into the key/value store.- * @property {(this: CompileContext) => void} buffer- * Capture some of the output data.- * @property {(this: CompileContext) => string} resume- * Stop capturing and access the output data.- * @property {<Kind extends Node>(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter- * Enter a token.- * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit- * Exit a token.- * @property {TokenizeContext['sliceSerialize']} sliceSerialize- * Get the string value of a token.- * @property {Config} config- * Configuration.- *- * @typedef FromMarkdownOptions- * Configuration for how to build mdast.- * @property {Array<Extension | Array<Extension>> | null | undefined} [mdastExtensions]- * Extensions for this utility to change how tokens are turned into a tree.- *- * @typedef {ParseOptions & FromMarkdownOptions} Options- * Configuration.- */--// To do: micromark: create a registry of tokens?-// To do: next major: don’t return given `Node` from `enter`.-// To do: next major: remove setter/getter.-----------const lib_own = {}.hasOwnProperty--/**- * @param value- * Markdown to parse.- * @param encoding- * Character encoding for when `value` is `Buffer`.- * @param options- * Configuration.- * @returns- * mdast tree.- */-const fromMarkdown =- /**- * @type {(- * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) &- * ((value: Value, options?: Options | null | undefined) => Root)- * )}- */-- /**- * @param {Value} value- * @param {Encoding | Options | null | undefined} [encoding]- * @param {Options | null | undefined} [options]- * @returns {Root}- */- function (value, encoding, options) {- if (typeof encoding !== 'string') {- options = encoding- encoding = undefined- }- return compiler(options)(- postprocess(- parse(options).document().write(preprocess()(value, encoding, true))- )- )- }--/**- * Note this compiler only understand complete buffering, not streaming.- *- * @param {Options | null | undefined} [options]- */-function compiler(options) {- /** @type {Config} */- const config = {- transforms: [],- canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'],- enter: {- autolink: opener(link),- autolinkProtocol: onenterdata,- autolinkEmail: onenterdata,- atxHeading: opener(heading),- blockQuote: opener(blockQuote),- characterEscape: onenterdata,- characterReference: onenterdata,- codeFenced: opener(codeFlow),- codeFencedFenceInfo: buffer,- codeFencedFenceMeta: buffer,- codeIndented: opener(codeFlow, buffer),- codeText: opener(codeText, buffer),- codeTextData: onenterdata,- data: onenterdata,- codeFlowValue: onenterdata,- definition: opener(definition),- definitionDestinationString: buffer,- definitionLabelString: buffer,- definitionTitleString: buffer,- emphasis: opener(emphasis),- hardBreakEscape: opener(hardBreak),- hardBreakTrailing: opener(hardBreak),- htmlFlow: opener(html, buffer),- htmlFlowData: onenterdata,- htmlText: opener(html, buffer),- htmlTextData: onenterdata,- image: opener(image),- label: buffer,- link: opener(link),- listItem: opener(listItem),- listItemValue: onenterlistitemvalue,- listOrdered: opener(list, onenterlistordered),- listUnordered: opener(list),- paragraph: opener(paragraph),- reference: onenterreference,- referenceString: buffer,- resourceDestinationString: buffer,- resourceTitleString: buffer,- setextHeading: opener(heading),- strong: opener(strong),- thematicBreak: opener(thematicBreak)- },- exit: {- atxHeading: closer(),- atxHeadingSequence: onexitatxheadingsequence,- autolink: closer(),- autolinkEmail: onexitautolinkemail,- autolinkProtocol: onexitautolinkprotocol,- blockQuote: closer(),- characterEscapeValue: onexitdata,- characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,- characterReferenceMarkerNumeric: onexitcharacterreferencemarker,- characterReferenceValue: onexitcharacterreferencevalue,- codeFenced: closer(onexitcodefenced),- codeFencedFence: onexitcodefencedfence,- codeFencedFenceInfo: onexitcodefencedfenceinfo,- codeFencedFenceMeta: onexitcodefencedfencemeta,- codeFlowValue: onexitdata,- codeIndented: closer(onexitcodeindented),- codeText: closer(onexitcodetext),- codeTextData: onexitdata,- data: onexitdata,- definition: closer(),- definitionDestinationString: onexitdefinitiondestinationstring,- definitionLabelString: onexitdefinitionlabelstring,- definitionTitleString: onexitdefinitiontitlestring,- emphasis: closer(),- hardBreakEscape: closer(onexithardbreak),- hardBreakTrailing: closer(onexithardbreak),- htmlFlow: closer(onexithtmlflow),- htmlFlowData: onexitdata,- htmlText: closer(onexithtmltext),- htmlTextData: onexitdata,- image: closer(onexitimage),- label: onexitlabel,- labelText: onexitlabeltext,- lineEnding: onexitlineending,- link: closer(onexitlink),- listItem: closer(),- listOrdered: closer(),- listUnordered: closer(),- paragraph: closer(),- referenceString: onexitreferencestring,- resourceDestinationString: onexitresourcedestinationstring,- resourceTitleString: onexitresourcetitlestring,- resource: onexitresource,- setextHeading: closer(onexitsetextheading),- setextHeadingLineSequence: onexitsetextheadinglinesequence,- setextHeadingText: onexitsetextheadingtext,- strong: closer(),- thematicBreak: closer()- }- }- configure(config, (options || {}).mdastExtensions || [])-- /** @type {CompileData} */- const data = {}- return compile-- /**- * Turn micromark events into an mdast tree.- *- * @param {Array<Event>} events- * Events.- * @returns {Root}- * mdast tree.- */- function compile(events) {- /** @type {Root} */- let tree = {- type: 'root',- children: []- }- /** @type {Omit<CompileContext, 'sliceSerialize'>} */- const context = {- stack: [tree],- tokenStack: [],- config,- enter,- exit,- buffer,- resume,- setData,- getData- }- /** @type {Array<number>} */- const listStack = []- let index = -1- while (++index < events.length) {- // We preprocess lists to add `listItem` tokens, and to infer whether- // items the list itself are spread out.- if (- events[index][1].type === 'listOrdered' ||- events[index][1].type === 'listUnordered'- ) {- if (events[index][0] === 'enter') {- listStack.push(index)- } else {- const tail = listStack.pop()- index = prepareList(events, tail, index)- }- }- }- index = -1- while (++index < events.length) {- const handler = config[events[index][0]]- if (lib_own.call(handler, events[index][1].type)) {- handler[events[index][1].type].call(- Object.assign(- {- sliceSerialize: events[index][2].sliceSerialize- },- context- ),- events[index][1]- )- }- }-- // Handle tokens still being open.- if (context.tokenStack.length > 0) {- const tail = context.tokenStack[context.tokenStack.length - 1]- const handler = tail[1] || defaultOnError- handler.call(context, undefined, tail[0])- }-- // Figure out `root` position.- tree.position = {- start: lib_point(- events.length > 0- ? events[0][1].start- : {- line: 1,- column: 1,- offset: 0- }- ),- end: lib_point(- events.length > 0- ? events[events.length - 2][1].end- : {- line: 1,- column: 1,- offset: 0- }- )- }-- // Call transforms.- index = -1- while (++index < config.transforms.length) {- tree = config.transforms[index](tree) || tree- }- return tree- }-- /**- * @param {Array<Event>} events- * @param {number} start- * @param {number} length- * @returns {number}- */- function prepareList(events, start, length) {- let index = start - 1- let containerBalance = -1- let listSpread = false- /** @type {Token | undefined} */- let listItem- /** @type {number | undefined} */- let lineIndex- /** @type {number | undefined} */- let firstBlankLineIndex- /** @type {boolean | undefined} */- let atMarker- while (++index <= length) {- const event = events[index]- if (- event[1].type === 'listUnordered' ||- event[1].type === 'listOrdered' ||- event[1].type === 'blockQuote'- ) {- if (event[0] === 'enter') {- containerBalance++- } else {- containerBalance--- }- atMarker = undefined- } else if (event[1].type === 'lineEndingBlank') {- if (event[0] === 'enter') {- if (- listItem &&- !atMarker &&- !containerBalance &&- !firstBlankLineIndex- ) {- firstBlankLineIndex = index- }- atMarker = undefined- }- } else if (- event[1].type === 'linePrefix' ||- event[1].type === 'listItemValue' ||- event[1].type === 'listItemMarker' ||- event[1].type === 'listItemPrefix' ||- event[1].type === 'listItemPrefixWhitespace'- ) {- // Empty.- } else {- atMarker = undefined- }- if (- (!containerBalance &&- event[0] === 'enter' &&- event[1].type === 'listItemPrefix') ||- (containerBalance === -1 &&- event[0] === 'exit' &&- (event[1].type === 'listUnordered' ||- event[1].type === 'listOrdered'))- ) {- if (listItem) {- let tailIndex = index- lineIndex = undefined- while (tailIndex--) {- const tailEvent = events[tailIndex]- if (- tailEvent[1].type === 'lineEnding' ||- tailEvent[1].type === 'lineEndingBlank'- ) {- if (tailEvent[0] === 'exit') continue- if (lineIndex) {- events[lineIndex][1].type = 'lineEndingBlank'- listSpread = true- }- tailEvent[1].type = 'lineEnding'- lineIndex = tailIndex- } else if (- tailEvent[1].type === 'linePrefix' ||- tailEvent[1].type === 'blockQuotePrefix' ||- tailEvent[1].type === 'blockQuotePrefixWhitespace' ||- tailEvent[1].type === 'blockQuoteMarker' ||- tailEvent[1].type === 'listItemIndent'- ) {- // Empty- } else {- break- }- }- if (- firstBlankLineIndex &&- (!lineIndex || firstBlankLineIndex < lineIndex)- ) {- listItem._spread = true- }-- // Fix position.- listItem.end = Object.assign(- {},- lineIndex ? events[lineIndex][1].start : event[1].end- )- events.splice(lineIndex || index, 0, ['exit', listItem, event[2]])- index++- length++- }-- // Create a new list item.- if (event[1].type === 'listItemPrefix') {- listItem = {- type: 'listItem',- _spread: false,- start: Object.assign({}, event[1].start),- // @ts-expect-error: we’ll add `end` in a second.- end: undefined- }- // @ts-expect-error: `listItem` is most definitely defined, TS...- events.splice(index, 0, ['enter', listItem, event[2]])- index++- length++- firstBlankLineIndex = undefined- atMarker = true- }- }- }- events[start][1]._spread = listSpread- return length- }-- /**- * Set data.- *- * @template {keyof CompileData} Key- * Field type.- * @param {Key} key- * Key of field.- * @param {CompileData[Key]} [value]- * New value.- * @returns {void}- * Nothing.- */- function setData(key, value) {- data[key] = value- }-- /**- * Get data.- *- * @template {keyof CompileData} Key- * Field type.- * @param {Key} key- * Key of field.- * @returns {CompileData[Key]}- * Value.- */- function getData(key) {- return data[key]- }-- /**- * Create an opener handle.- *- * @param {(token: Token) => Node} create- * Create a node.- * @param {Handle} [and]- * Optional function to also run.- * @returns {Handle}- * Handle.- */- function opener(create, and) {- return open-- /**- * @this {CompileContext}- * @param {Token} token- * @returns {void}- */- function open(token) {- enter.call(this, create(token), token)- if (and) and.call(this, token)- }- }-- /**- * @this {CompileContext}- * @returns {void}- */- function buffer() {- this.stack.push({- type: 'fragment',- children: []- })- }-- /**- * @template {Node} Kind- * Node type.- * @this {CompileContext}- * Context.- * @param {Kind} node- * Node to enter.- * @param {Token} token- * Corresponding token.- * @param {OnEnterError | undefined} [errorHandler]- * Handle the case where this token is open, but it is closed by something else.- * @returns {Kind}- * The given node.- */- function enter(node, token, errorHandler) {- const parent = this.stack[this.stack.length - 1]- // @ts-expect-error: Assume `Node` can exist as a child of `parent`.- parent.children.push(node)- this.stack.push(node)- this.tokenStack.push([token, errorHandler])- // @ts-expect-error: `end` will be patched later.- node.position = {- start: lib_point(token.start)- }- return node- }-- /**- * Create a closer handle.- *- * @param {Handle} [and]- * Optional function to also run.- * @returns {Handle}- * Handle.- */- function closer(and) {- return close-- /**- * @this {CompileContext}- * @param {Token} token- * @returns {void}- */- function close(token) {- if (and) and.call(this, token)- exit.call(this, token)- }- }-- /**- * @this {CompileContext}- * Context.- * @param {Token} token- * Corresponding token.- * @param {OnExitError | undefined} [onExitError]- * Handle the case where another token is open.- * @returns {Node}- * The closed node.- */- function exit(token, onExitError) {- const node = this.stack.pop()- const open = this.tokenStack.pop()- if (!open) {- throw new Error(- 'Cannot close `' +- token.type +- '` (' +- stringifyPosition({- start: token.start,- end: token.end- }) +- '): it’s not open'- )- } else if (open[0].type !== token.type) {- if (onExitError) {- onExitError.call(this, token, open[0])- } else {- const handler = open[1] || defaultOnError- handler.call(this, token, open[0])- }- }- node.position.end = lib_point(token.end)- return node- }-- /**- * @this {CompileContext}- * @returns {string}- */- function resume() {- return lib_toString(this.stack.pop())- }-- //- // Handlers.- //-- /**- * @this {CompileContext}- * @type {Handle}- */- function onenterlistordered() {- setData('expectingFirstListItemValue', true)- }-- /**- * @this {CompileContext}- * @type {Handle}- */- function onenterlistitemvalue(token) {- if (getData('expectingFirstListItemValue')) {- const ancestor = this.stack[this.stack.length - 2]- ancestor.start = Number.parseInt(this.sliceSerialize(token), 10)- setData('expectingFirstListItemValue')- }- }-- /**- * @this {CompileContext}- * @type {Handle}- */- function onexitcodefencedfenceinfo() {- const data = this.resume()- const node = this.stack[this.stack.length - 1]- node.lang = data- }-- /**- * @this {CompileContext}- * @type {Handle}- */- function onexitcodefencedfencemeta() {- const data = this.resume()- const node = this.stack[this.stack.length - 1]- node.meta = data- }-- /**- * @this {CompileContext}- * @type {Handle}- */- function onexitcodefencedfence() {- // Exit if this is the closing fence.- if (getData('flowCodeInside')) return- this.buffer()- setData('flowCodeInside', true)- }-- /**- * @this {CompileContext}- * @type {Handle}- */- function onexitcodefenced() {- const data = this.resume()- const node = this.stack[this.stack.length - 1]- node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '')- setData('flowCodeInside')- }-- /**- * @this {CompileContext}- * @type {Handle}- */- function onexitcodeindented() {- const data = this.resume()- const node = this.stack[this.stack.length - 1]- node.value = data.replace(/(\r?\n|\r)$/g, '')- }-- /**- * @this {CompileContext}- * @type {Handle}- */- function onexitdefinitionlabelstring(token) {- const label = this.resume()- const node = this.stack[this.stack.length - 1]- node.label = label- node.identifier = normalizeIdentifier(- this.sliceSerialize(token)- ).toLowerCase()- }-- /**- * @this {CompileContext}- * @type {Handle}- */- function onexitdefinitiontitlestring() {- const data = this.resume()- const node = this.stack[this.stack.length - 1]- node.title = data- }-- /**- * @this {CompileContext}- * @type {Handle}- */- function onexitdefinitiondestinationstring() {- const data = this.resume()- const node = this.stack[this.stack.length - 1]- node.url = data- }-- /**- * @this {CompileContext}- * @type {Handle}- */- function onexitatxheadingsequence(token) {- const node = this.stack[this.stack.length - 1]- if (!node.depth) {- const depth = this.sliceSerialize(token).length- node.depth = depth- }- }-- /**- * @this {CompileContext}- * @type {Handle}- */- function onexitsetextheadingtext() {- setData('setextHeadingSlurpLineEnding', true)- }-- /**- * @this {CompileContext}- * @type {Handle}- */- function onexitsetextheadinglinesequence(token) {- const node = this.stack[this.stack.length - 1]- node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2- }-- /**- * @this {CompileContext}- * @type {Handle}- */- function onexitsetextheading() {- setData('setextHeadingSlurpLineEnding')- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onenterdata(token) {- const node = this.stack[this.stack.length - 1]- let tail = node.children[node.children.length - 1]- if (!tail || tail.type !== 'text') {- // Add a new text node.- tail = text()- // @ts-expect-error: we’ll add `end` later.- tail.position = {- start: lib_point(token.start)- }- // @ts-expect-error: Assume `parent` accepts `text`.- node.children.push(tail)- }- this.stack.push(tail)- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onexitdata(token) {- const tail = this.stack.pop()- tail.value += this.sliceSerialize(token)- tail.position.end = lib_point(token.end)- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onexitlineending(token) {- const context = this.stack[this.stack.length - 1]- // If we’re at a hard break, include the line ending in there.- if (getData('atHardBreak')) {- const tail = context.children[context.children.length - 1]- tail.position.end = lib_point(token.end)- setData('atHardBreak')- return- }- if (- !getData('setextHeadingSlurpLineEnding') &&- config.canContainEols.includes(context.type)- ) {- onenterdata.call(this, token)- onexitdata.call(this, token)- }- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onexithardbreak() {- setData('atHardBreak', true)- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onexithtmlflow() {- const data = this.resume()- const node = this.stack[this.stack.length - 1]- node.value = data- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onexithtmltext() {- const data = this.resume()- const node = this.stack[this.stack.length - 1]- node.value = data- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onexitcodetext() {- const data = this.resume()- const node = this.stack[this.stack.length - 1]- node.value = data- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onexitlink() {- const node = this.stack[this.stack.length - 1]- // Note: there are also `identifier` and `label` fields on this link node!- // These are used / cleaned here.- // To do: clean.- if (getData('inReference')) {- /** @type {ReferenceType} */- const referenceType = getData('referenceType') || 'shortcut'- node.type += 'Reference'- // @ts-expect-error: mutate.- node.referenceType = referenceType- // @ts-expect-error: mutate.- delete node.url- delete node.title- } else {- // @ts-expect-error: mutate.- delete node.identifier- // @ts-expect-error: mutate.- delete node.label- }- setData('referenceType')- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onexitimage() {- const node = this.stack[this.stack.length - 1]- // Note: there are also `identifier` and `label` fields on this link node!- // These are used / cleaned here.- // To do: clean.- if (getData('inReference')) {- /** @type {ReferenceType} */- const referenceType = getData('referenceType') || 'shortcut'- node.type += 'Reference'- // @ts-expect-error: mutate.- node.referenceType = referenceType- // @ts-expect-error: mutate.- delete node.url- delete node.title- } else {- // @ts-expect-error: mutate.- delete node.identifier- // @ts-expect-error: mutate.- delete node.label- }- setData('referenceType')- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onexitlabeltext(token) {- const string = this.sliceSerialize(token)- const ancestor = this.stack[this.stack.length - 2]- // @ts-expect-error: stash this on the node, as it might become a reference- // later.- ancestor.label = decodeString(string)- // @ts-expect-error: same as above.- ancestor.identifier = normalizeIdentifier(string).toLowerCase()- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onexitlabel() {- const fragment = this.stack[this.stack.length - 1]- const value = this.resume()- const node = this.stack[this.stack.length - 1]- // Assume a reference.- setData('inReference', true)- if (node.type === 'link') {- /** @type {Array<StaticPhrasingContent>} */- // @ts-expect-error: Assume static phrasing content.- const children = fragment.children- node.children = children- } else {- node.alt = value- }- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onexitresourcedestinationstring() {- const data = this.resume()- const node = this.stack[this.stack.length - 1]- node.url = data- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onexitresourcetitlestring() {- const data = this.resume()- const node = this.stack[this.stack.length - 1]- node.title = data- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onexitresource() {- setData('inReference')- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onenterreference() {- setData('referenceType', 'collapsed')- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onexitreferencestring(token) {- const label = this.resume()- const node = this.stack[this.stack.length - 1]- // @ts-expect-error: stash this on the node, as it might become a reference- // later.- node.label = label- // @ts-expect-error: same as above.- node.identifier = normalizeIdentifier(- this.sliceSerialize(token)- ).toLowerCase()- setData('referenceType', 'full')- }-- /**- * @this {CompileContext}- * @type {Handle}- */-- function onexitcharacterreferencemarker(token) {- setData('characterReferenceType', token.type)- }-- /**- * @this {CompileContext}- * @type {Handle}- */- function onexitcharacterreferencevalue(token) {- const data = this.sliceSerialize(token)- const type = getData('characterReferenceType')- /** @type {string} */- let value- if (type) {- value = decodeNumericCharacterReference(- data,- type === 'characterReferenceMarkerNumeric' ? 10 : 16- )- setData('characterReferenceType')- } else {- const result = decodeNamedCharacterReference(data)- value = result- }- const tail = this.stack.pop()- tail.value += value- tail.position.end = lib_point(token.end)- }-- /**- * @this {CompileContext}- * @type {Handle}- */- function onexitautolinkprotocol(token) {- onexitdata.call(this, token)- const node = this.stack[this.stack.length - 1]- node.url = this.sliceSerialize(token)- }-- /**- * @this {CompileContext}- * @type {Handle}- */- function onexitautolinkemail(token) {- onexitdata.call(this, token)- const node = this.stack[this.stack.length - 1]- node.url = 'mailto:' + this.sliceSerialize(token)- }-- //- // Creaters.- //-- /** @returns {Blockquote} */- function blockQuote() {- return {- type: 'blockquote',- children: []- }- }-- /** @returns {Code} */- function codeFlow() {- return {- type: 'code',- lang: null,- meta: null,- value: ''- }- }-- /** @returns {InlineCode} */- function codeText() {- return {- type: 'inlineCode',- value: ''- }- }-- /** @returns {Definition} */- function definition() {- return {- type: 'definition',- identifier: '',- label: null,- title: null,- url: ''- }- }-- /** @returns {Emphasis} */- function emphasis() {- return {- type: 'emphasis',- children: []- }- }-- /** @returns {Heading} */- function heading() {- // @ts-expect-error `depth` will be set later.- return {- type: 'heading',- depth: undefined,- children: []- }- }-- /** @returns {Break} */- function hardBreak() {- return {- type: 'break'- }- }-- /** @returns {HTML} */- function html() {- return {- type: 'html',- value: ''- }- }-- /** @returns {Image} */- function image() {- return {- type: 'image',- title: null,- url: '',- alt: null- }- }-- /** @returns {Link} */- function link() {- return {- type: 'link',- title: null,- url: '',- children: []- }- }-- /**- * @param {Token} token- * @returns {List}- */- function list(token) {- return {- type: 'list',- ordered: token.type === 'listOrdered',- start: null,- spread: token._spread,- children: []- }- }-- /**- * @param {Token} token- * @returns {ListItem}- */- function listItem(token) {- return {- type: 'listItem',- spread: token._spread,- checked: null,- children: []- }- }-- /** @returns {Paragraph} */- function paragraph() {- return {- type: 'paragraph',- children: []- }- }-- /** @returns {Strong} */- function strong() {- return {- type: 'strong',- children: []- }- }-- /** @returns {Text} */- function text() {- return {- type: 'text',- value: ''- }- }-- /** @returns {ThematicBreak} */- function thematicBreak() {- return {- type: 'thematicBreak'- }- }-}--/**- * Copy a point-like value.- *- * @param {Point} d- * Point-like value.- * @returns {Point}- * unist point.- */-function lib_point(d) {- return {- line: d.line,- column: d.column,- offset: d.offset- }-}--/**- * @param {Config} combined- * @param {Array<Extension | Array<Extension>>} extensions- * @returns {void}- */-function configure(combined, extensions) {- let index = -1- while (++index < extensions.length) {- const value = extensions[index]- if (Array.isArray(value)) {- configure(combined, value)- } else {- extension(combined, value)- }- }-}--/**- * @param {Config} combined- * @param {Extension} extension- * @returns {void}- */-function extension(combined, extension) {- /** @type {keyof Extension} */- let key- for (key in extension) {- if (lib_own.call(extension, key)) {- if (key === 'canContainEols') {- const right = extension[key]- if (right) {- combined[key].push(...right)- }- } else if (key === 'transforms') {- const right = extension[key]- if (right) {- combined[key].push(...right)- }- } else if (key === 'enter' || key === 'exit') {- const right = extension[key]- if (right) {- Object.assign(combined[key], right)- }- }- }- }-}--/** @type {OnEnterError} */-function defaultOnError(left, right) {- if (left) {- throw new Error(- 'Cannot close `' +- left.type +- '` (' +- stringifyPosition({- start: left.start,- end: left.end- }) +- '): a different token (`' +- right.type +- '`, ' +- stringifyPosition({- start: right.start,- end: right.end- }) +- ') is open'- )- } else {- throw new Error(- 'Cannot close document, a token (`' +- right.type +- '`, ' +- stringifyPosition({- start: right.start,- end: right.end- }) +- ') is still open'- )- }-}--;// CONCATENATED MODULE: ./node_modules/remark-parse/lib/index.js-/**- * @typedef {import('mdast').Root} Root- * @typedef {import('mdast-util-from-markdown').Options} Options- */----/**- * @this {import('unified').Processor}- * @type {import('unified').Plugin<[Options?] | void[], string, Root>}- */-function remarkParse(options) {- /** @type {import('unified').ParserFunction<Root>} */- const parser = (doc) => {- // Assume options.- const settings = /** @type {Options} */ (this.data('settings'))-- return fromMarkdown(- doc,- Object.assign({}, settings, options, {- // Note: these options are not in the readme.- // The goal is for them to be set by plugins on `data` instead of being- // passed by users.- extensions: this.data('micromarkExtensions') || [],- mdastExtensions: this.data('fromMarkdownExtensions') || []- })- )- }-- Object.assign(this, {Parser: parser})-}--;// CONCATENATED MODULE: ./node_modules/micromark-util-sanitize-uri/index.js---/**- * Make a value safe for injection as a URL.- *- * This encodes unsafe characters with percent-encoding and skips already- * encoded sequences (see `normalizeUri`).- * Further unsafe characters are encoded as character references (see- * `micromark-util-encode`).- *- * A regex of allowed protocols can be given, in which case the URL is- * sanitized.- * For example, `/^(https?|ircs?|mailto|xmpp)$/i` can be used for `a[href]`, or- * `/^https?$/i` for `img[src]` (this is what `github.com` allows).- * If the URL includes an unknown protocol (one not matched by `protocol`, such- * as a dangerous example, `javascript:`), the value is ignored.- *- * @param {string | undefined} url- * URI to sanitize.- * @param {RegExp | null | undefined} [protocol]- * Allowed protocols.- * @returns {string}- * Sanitized URI.- */-function sanitizeUri(url, protocol) {- const value = encode(normalizeUri(url || ''))- if (!protocol) {- return value- }- const colon = value.indexOf(':')- const questionMark = value.indexOf('?')- const numberSign = value.indexOf('#')- const slash = value.indexOf('/')- if (- // If there is no protocol, it’s relative.- colon < 0 ||- // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.- (slash > -1 && colon > slash) ||- (questionMark > -1 && colon > questionMark) ||- (numberSign > -1 && colon > numberSign) ||- // It is a protocol, it should be allowed.- protocol.test(value.slice(0, colon))- ) {- return value- }- return ''-}--/**- * Normalize a URL.- *- * Encode unsafe characters with percent-encoding, skipping already encoded- * sequences.- *- * @param {string} value- * URI to normalize.- * @returns {string}- * Normalized URI.- */-function normalizeUri(value) {- /** @type {Array<string>} */- const result = []- let index = -1- let start = 0- let skip = 0- while (++index < value.length) {- const code = value.charCodeAt(index)- /** @type {string} */- let replace = ''-- // A correct percent encoded value.- if (- code === 37 &&- asciiAlphanumeric(value.charCodeAt(index + 1)) &&- asciiAlphanumeric(value.charCodeAt(index + 2))- ) {- skip = 2- }- // ASCII.- else if (code < 128) {- if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code))) {- replace = String.fromCharCode(code)- }- }- // Astral.- else if (code > 55295 && code < 57344) {- const next = value.charCodeAt(index + 1)-- // A correct surrogate pair.- if (code < 56320 && next > 56319 && next < 57344) {- replace = String.fromCharCode(code, next)- skip = 1- }- // Lone surrogate.- else {- replace = '\uFFFD'- }- }- // Unicode.- else {- replace = String.fromCharCode(code)- }- if (replace) {- result.push(value.slice(start, index), encodeURIComponent(replace))- start = index + skip + 1- replace = ''- }- if (skip) {- index += skip- skip = 0- }- }- return result.join('') + value.slice(start)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/footer.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('hast').ElementContent} ElementContent- *- * @typedef {import('./state.js').State} State- */----/**- * Generate a hast footer for called footnote definitions.- *- * @param {State} state- * Info passed around.- * @returns {Element | undefined}- * `section` element or `undefined`.- */-function footer(state) {- /** @type {Array<ElementContent>} */- const listItems = []- let index = -1-- while (++index < state.footnoteOrder.length) {- const def = state.footnoteById[state.footnoteOrder[index]]-- if (!def) {- continue- }-- const content = state.all(def)- const id = String(def.identifier).toUpperCase()- const safeId = normalizeUri(id.toLowerCase())- let referenceIndex = 0- /** @type {Array<ElementContent>} */- const backReferences = []-- while (++referenceIndex <= state.footnoteCounts[id]) {- /** @type {Element} */- const backReference = {- type: 'element',- tagName: 'a',- properties: {- href:- '#' +- state.clobberPrefix +- 'fnref-' +- safeId +- (referenceIndex > 1 ? '-' + referenceIndex : ''),- dataFootnoteBackref: true,- className: ['data-footnote-backref'],- ariaLabel: state.footnoteBackLabel- },- children: [{type: 'text', value: '↩'}]- }-- if (referenceIndex > 1) {- backReference.children.push({- type: 'element',- tagName: 'sup',- children: [{type: 'text', value: String(referenceIndex)}]- })- }-- if (backReferences.length > 0) {- backReferences.push({type: 'text', value: ' '})- }-- backReferences.push(backReference)- }-- const tail = content[content.length - 1]-- if (tail && tail.type === 'element' && tail.tagName === 'p') {- const tailTail = tail.children[tail.children.length - 1]- if (tailTail && tailTail.type === 'text') {- tailTail.value += ' '- } else {- tail.children.push({type: 'text', value: ' '})- }-- tail.children.push(...backReferences)- } else {- content.push(...backReferences)- }-- /** @type {Element} */- const listItem = {- type: 'element',- tagName: 'li',- properties: {id: state.clobberPrefix + 'fn-' + safeId},- children: state.wrap(content, true)- }-- state.patch(def, listItem)-- listItems.push(listItem)- }-- if (listItems.length === 0) {- return- }-- return {- type: 'element',- tagName: 'section',- properties: {dataFootnotes: true, className: ['footnotes']},- children: [- {- type: 'element',- tagName: state.footnoteLabelTagName,- properties: {- // To do: use structured clone.- ...JSON.parse(JSON.stringify(state.footnoteLabelProperties)),- id: 'footnote-label'- },- children: [{type: 'text', value: state.footnoteLabel}]- },- {type: 'text', value: '\n'},- {- type: 'element',- tagName: 'ol',- properties: {},- children: state.wrap(listItems, true)- },- {type: 'text', value: '\n'}- ]- }-}--;// CONCATENATED MODULE: ./node_modules/unist-util-is/lib/index.js-/**- * @typedef {import('unist').Node} Node- * @typedef {import('unist').Parent} Parent- */--/**- * @typedef {Record<string, unknown>} Props- * @typedef {null | undefined | string | Props | TestFunctionAnything | Array<string | Props | TestFunctionAnything>} Test- * Check for an arbitrary node, unaware of TypeScript inferral.- *- * @callback TestFunctionAnything- * Check if a node passes a test, unaware of TypeScript inferral.- * @param {unknown} this- * The given context.- * @param {Node} node- * A node.- * @param {number | null | undefined} [index]- * The node’s position in its parent.- * @param {Parent | null | undefined} [parent]- * The node’s parent.- * @returns {boolean | void}- * Whether this node passes the test.- */--/**- * @template {Node} Kind- * Node type.- * @typedef {Kind['type'] | Partial<Kind> | TestFunctionPredicate<Kind> | Array<Kind['type'] | Partial<Kind> | TestFunctionPredicate<Kind>>} PredicateTest- * Check for a node that can be inferred by TypeScript.- */--/**- * Check if a node passes a certain test.- *- * @template {Node} Kind- * Node type.- * @callback TestFunctionPredicate- * Complex test function for a node that can be inferred by TypeScript.- * @param {Node} node- * A node.- * @param {number | null | undefined} [index]- * The node’s position in its parent.- * @param {Parent | null | undefined} [parent]- * The node’s parent.- * @returns {node is Kind}- * Whether this node passes the test.- */--/**- * @callback AssertAnything- * Check that an arbitrary value is a node, unaware of TypeScript inferral.- * @param {unknown} [node]- * Anything (typically a node).- * @param {number | null | undefined} [index]- * The node’s position in its parent.- * @param {Parent | null | undefined} [parent]- * The node’s parent.- * @returns {boolean}- * Whether this is a node and passes a test.- */--/**- * Check if a node is a node and passes a certain node test.- *- * @template {Node} Kind- * Node type.- * @callback AssertPredicate- * Check that an arbitrary value is a specific node, aware of TypeScript.- * @param {unknown} [node]- * Anything (typically a node).- * @param {number | null | undefined} [index]- * The node’s position in its parent.- * @param {Parent | null | undefined} [parent]- * The node’s parent.- * @returns {node is Kind}- * Whether this is a node and passes a test.- */--/**- * Check if `node` is a `Node` and whether it passes the given test.- *- * @param node- * Thing to check, typically `Node`.- * @param test- * A check for a specific node.- * @param index- * The node’s position in its parent.- * @param parent- * The node’s parent.- * @returns- * Whether `node` is a node and passes a test.- */-const is =- /**- * @type {(- * (() => false) &- * (<Kind extends Node = Node>(node: unknown, test: PredicateTest<Kind>, index: number, parent: Parent, context?: unknown) => node is Kind) &- * (<Kind extends Node = Node>(node: unknown, test: PredicateTest<Kind>, index?: null | undefined, parent?: null | undefined, context?: unknown) => node is Kind) &- * ((node: unknown, test: Test, index: number, parent: Parent, context?: unknown) => boolean) &- * ((node: unknown, test?: Test, index?: null | undefined, parent?: null | undefined, context?: unknown) => boolean)- * )}- */- (- /**- * @param {unknown} [node]- * @param {Test} [test]- * @param {number | null | undefined} [index]- * @param {Parent | null | undefined} [parent]- * @param {unknown} [context]- * @returns {boolean}- */- // eslint-disable-next-line max-params- function is(node, test, index, parent, context) {- const check = convert(test)-- if (- index !== undefined &&- index !== null &&- (typeof index !== 'number' ||- index < 0 ||- index === Number.POSITIVE_INFINITY)- ) {- throw new Error('Expected positive finite index')- }-- if (- parent !== undefined &&- parent !== null &&- (!is(parent) || !parent.children)- ) {- throw new Error('Expected parent node')- }-- if (- (parent === undefined || parent === null) !==- (index === undefined || index === null)- ) {- throw new Error('Expected both parent and index')- }-- // @ts-expect-error Looks like a node.- return node && node.type && typeof node.type === 'string'- ? Boolean(check.call(context, node, index, parent))- : false- }- )--/**- * Generate an assertion from a test.- *- * Useful if you’re going to test many nodes, for example when creating a- * utility where something else passes a compatible test.- *- * The created function is a bit faster because it expects valid input only:- * a `node`, `index`, and `parent`.- *- * @param test- * * when nullish, checks if `node` is a `Node`.- * * when `string`, works like passing `(node) => node.type === test`.- * * when `function` checks if function passed the node is true.- * * when `object`, checks that all keys in test are in node, and that they have (strictly) equal values.- * * when `array`, checks if any one of the subtests pass.- * @returns- * An assertion.- */-const convert =- /**- * @type {(- * (<Kind extends Node>(test: PredicateTest<Kind>) => AssertPredicate<Kind>) &- * ((test?: Test) => AssertAnything)- * )}- */- (- /**- * @param {Test} [test]- * @returns {AssertAnything}- */- function (test) {- if (test === undefined || test === null) {- return ok- }-- if (typeof test === 'string') {- return typeFactory(test)- }-- if (typeof test === 'object') {- return Array.isArray(test) ? anyFactory(test) : propsFactory(test)- }-- if (typeof test === 'function') {- return castFactory(test)- }-- throw new Error('Expected function, string, or object as test')- }- )--/**- * @param {Array<string | Props | TestFunctionAnything>} tests- * @returns {AssertAnything}- */-function anyFactory(tests) {- /** @type {Array<AssertAnything>} */- const checks = []- let index = -1-- while (++index < tests.length) {- checks[index] = convert(tests[index])- }-- return castFactory(any)-- /**- * @this {unknown}- * @param {Array<unknown>} parameters- * @returns {boolean}- */- function any(...parameters) {- let index = -1-- while (++index < checks.length) {- if (checks[index].call(this, ...parameters)) return true- }-- return false- }-}--/**- * Turn an object into a test for a node with a certain fields.- *- * @param {Props} check- * @returns {AssertAnything}- */-function propsFactory(check) {- return castFactory(all)-- /**- * @param {Node} node- * @returns {boolean}- */- function all(node) {- /** @type {string} */- let key-- for (key in check) {- // @ts-expect-error: hush, it sure works as an index.- if (node[key] !== check[key]) return false- }-- return true- }-}--/**- * Turn a string into a test for a node with a certain type.- *- * @param {string} check- * @returns {AssertAnything}- */-function typeFactory(check) {- return castFactory(type)-- /**- * @param {Node} node- */- function type(node) {- return node && node.type === check- }-}--/**- * Turn a custom test into a test for a node that passes that test.- *- * @param {TestFunctionAnything} check- * @returns {AssertAnything}- */-function castFactory(check) {- return assertion-- /**- * @this {unknown}- * @param {unknown} node- * @param {Array<unknown>} parameters- * @returns {boolean}- */- function assertion(node, ...parameters) {- return Boolean(- node &&- typeof node === 'object' &&- 'type' in node &&- // @ts-expect-error: fine.- Boolean(check.call(this, node, ...parameters))- )- }-}--function ok() {- return true-}--;// CONCATENATED MODULE: ./node_modules/unist-util-visit-parents/lib/color.browser.js-/**- * @param {string} d- * @returns {string}- */-function color(d) {- return d-}--;// CONCATENATED MODULE: ./node_modules/unist-util-visit-parents/lib/index.js-/**- * @typedef {import('unist').Node} Node- * @typedef {import('unist').Parent} Parent- * @typedef {import('unist-util-is').Test} Test- */--/**- * @typedef {boolean | 'skip'} Action- * Union of the action types.- *- * @typedef {number} Index- * Move to the sibling at `index` next (after node itself is completely- * traversed).- *- * Useful if mutating the tree, such as removing the node the visitor is- * currently on, or any of its previous siblings.- * Results less than 0 or greater than or equal to `children.length` stop- * traversing the parent.- *- * @typedef {[(Action | null | undefined | void)?, (Index | null | undefined)?]} ActionTuple- * List with one or two values, the first an action, the second an index.- *- * @typedef {Action | ActionTuple | Index | null | undefined | void} VisitorResult- * Any value that can be returned from a visitor.- */--/**- * @template {Node} [Visited=Node]- * Visited node type.- * @template {Parent} [Ancestor=Parent]- * Ancestor type.- * @callback Visitor- * Handle a node (matching `test`, if given).- *- * Visitors are free to transform `node`.- * They can also transform the parent of node (the last of `ancestors`).- *- * Replacing `node` itself, if `SKIP` is not returned, still causes its- * descendants to be walked (which is a bug).- *- * When adding or removing previous siblings of `node` (or next siblings, in- * case of reverse), the `Visitor` should return a new `Index` to specify the- * sibling to traverse after `node` is traversed.- * Adding or removing next siblings of `node` (or previous siblings, in case- * of reverse) is handled as expected without needing to return a new `Index`.- *- * Removing the children property of an ancestor still results in them being- * traversed.- * @param {Visited} node- * Found node.- * @param {Array<Ancestor>} ancestors- * Ancestors of `node`.- * @returns {VisitorResult}- * What to do next.- *- * An `Index` is treated as a tuple of `[CONTINUE, Index]`.- * An `Action` is treated as a tuple of `[Action]`.- *- * Passing a tuple back only makes sense if the `Action` is `SKIP`.- * When the `Action` is `EXIT`, that action can be returned.- * When the `Action` is `CONTINUE`, `Index` can be returned.- */--/**- * @template {Node} [Tree=Node]- * Tree type.- * @template {Test} [Check=string]- * Test type.- * @typedef {Visitor<import('./complex-types.js').Matches<import('./complex-types.js').InclusiveDescendant<Tree>, Check>, Extract<import('./complex-types.js').InclusiveDescendant<Tree>, Parent>>} BuildVisitor- * Build a typed `Visitor` function from a tree and a test.- *- * It will infer which values are passed as `node` and which as `parents`.- */-----/**- * Continue traversing as normal.- */-const CONTINUE = true--/**- * Stop traversing immediately.- */-const EXIT = false--/**- * Do not traverse this node’s children.- */-const SKIP = 'skip'--/**- * Visit nodes, with ancestral information.- *- * This algorithm performs *depth-first* *tree traversal* in *preorder*- * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).- *- * You can choose for which nodes `visitor` is called by passing a `test`.- * For complex tests, you should test yourself in `visitor`, as it will be- * faster and will have improved type information.- *- * Walking the tree is an intensive task.- * Make use of the return values of the visitor when possible.- * Instead of walking a tree multiple times, walk it once, use `unist-util-is`- * to check if a node matches, and then perform different operations.- *- * You can change the tree.- * See `Visitor` for more info.- *- * @param tree- * Tree to traverse.- * @param test- * `unist-util-is`-compatible test- * @param visitor- * Handle each node.- * @param reverse- * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).- * @returns- * Nothing.- */-const visitParents =- /**- * @type {(- * (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: BuildVisitor<Tree, Check>, reverse?: boolean | null | undefined) => void) &- * (<Tree extends Node>(tree: Tree, visitor: BuildVisitor<Tree>, reverse?: boolean | null | undefined) => void)- * )}- */- (- /**- * @param {Node} tree- * @param {Test} test- * @param {Visitor<Node>} visitor- * @param {boolean | null | undefined} [reverse]- * @returns {void}- */- function (tree, test, visitor, reverse) {- if (typeof test === 'function' && typeof visitor !== 'function') {- reverse = visitor- // @ts-expect-error no visitor given, so `visitor` is test.- visitor = test- test = null- }-- const is = convert(test)- const step = reverse ? -1 : 1-- factory(tree, undefined, [])()-- /**- * @param {Node} node- * @param {number | undefined} index- * @param {Array<Parent>} parents- */- function factory(node, index, parents) {- /** @type {Record<string, unknown>} */- // @ts-expect-error: hush- const value = node && typeof node === 'object' ? node : {}-- if (typeof value.type === 'string') {- const name =- // `hast`- typeof value.tagName === 'string'- ? value.tagName- : // `xast`- typeof value.name === 'string'- ? value.name- : undefined-- Object.defineProperty(visit, 'name', {- value:- 'node (' + color(node.type + (name ? '<' + name + '>' : '')) + ')'- })- }-- return visit-- function visit() {- /** @type {ActionTuple} */- let result = []- /** @type {ActionTuple} */- let subresult- /** @type {number} */- let offset- /** @type {Array<Parent>} */- let grandparents-- if (!test || is(node, index, parents[parents.length - 1] || null)) {- result = toResult(visitor(node, parents))-- if (result[0] === EXIT) {- return result- }- }-- // @ts-expect-error looks like a parent.- if (node.children && result[0] !== SKIP) {- // @ts-expect-error looks like a parent.- offset = (reverse ? node.children.length : -1) + step- // @ts-expect-error looks like a parent.- grandparents = parents.concat(node)-- // @ts-expect-error looks like a parent.- while (offset > -1 && offset < node.children.length) {- // @ts-expect-error looks like a parent.- subresult = factory(node.children[offset], offset, grandparents)()-- if (subresult[0] === EXIT) {- return subresult- }-- offset =- typeof subresult[1] === 'number' ? subresult[1] : offset + step- }- }-- return result- }- }- }- )--/**- * Turn a return value into a clean result.- *- * @param {VisitorResult} value- * Valid return values from visitors.- * @returns {ActionTuple}- * Clean result.- */-function toResult(value) {- if (Array.isArray(value)) {- return value- }-- if (typeof value === 'number') {- return [CONTINUE, value]- }-- return [value]-}--;// CONCATENATED MODULE: ./node_modules/unist-util-visit/lib/index.js-/**- * @typedef {import('unist').Node} Node- * @typedef {import('unist').Parent} Parent- * @typedef {import('unist-util-is').Test} Test- * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult- */--/**- * Check if `Child` can be a child of `Ancestor`.- *- * Returns the ancestor when `Child` can be a child of `Ancestor`, or returns- * `never`.- *- * @template {Node} Ancestor- * Node type.- * @template {Node} Child- * Node type.- * @typedef {(- * Ancestor extends Parent- * ? Child extends Ancestor['children'][number]- * ? Ancestor- * : never- * : never- * )} ParentsOf- */--/**- * @template {Node} [Visited=Node]- * Visited node type.- * @template {Parent} [Ancestor=Parent]- * Ancestor type.- * @callback Visitor- * Handle a node (matching `test`, if given).- *- * Visitors are free to transform `node`.- * They can also transform `parent`.- *- * Replacing `node` itself, if `SKIP` is not returned, still causes its- * descendants to be walked (which is a bug).- *- * When adding or removing previous siblings of `node` (or next siblings, in- * case of reverse), the `Visitor` should return a new `Index` to specify the- * sibling to traverse after `node` is traversed.- * Adding or removing next siblings of `node` (or previous siblings, in case- * of reverse) is handled as expected without needing to return a new `Index`.- *- * Removing the children property of `parent` still results in them being- * traversed.- * @param {Visited} node- * Found node.- * @param {Visited extends Node ? number | null : never} index- * Index of `node` in `parent`.- * @param {Ancestor extends Node ? Ancestor | null : never} parent- * Parent of `node`.- * @returns {VisitorResult}- * What to do next.- *- * An `Index` is treated as a tuple of `[CONTINUE, Index]`.- * An `Action` is treated as a tuple of `[Action]`.- *- * Passing a tuple back only makes sense if the `Action` is `SKIP`.- * When the `Action` is `EXIT`, that action can be returned.- * When the `Action` is `CONTINUE`, `Index` can be returned.- */--/**- * Build a typed `Visitor` function from a node and all possible parents.- *- * It will infer which values are passed as `node` and which as `parent`.- *- * @template {Node} Visited- * Node type.- * @template {Parent} Ancestor- * Parent type.- * @typedef {Visitor<Visited, ParentsOf<Ancestor, Visited>>} BuildVisitorFromMatch- */--/**- * Build a typed `Visitor` function from a list of descendants and a test.- *- * It will infer which values are passed as `node` and which as `parent`.- *- * @template {Node} Descendant- * Node type.- * @template {Test} Check- * Test type.- * @typedef {(- * BuildVisitorFromMatch<- * import('unist-util-visit-parents/complex-types.js').Matches<Descendant, Check>,- * Extract<Descendant, Parent>- * >- * )} BuildVisitorFromDescendants- */--/**- * Build a typed `Visitor` function from a tree and a test.- *- * It will infer which values are passed as `node` and which as `parent`.- *- * @template {Node} [Tree=Node]- * Node type.- * @template {Test} [Check=string]- * Test type.- * @typedef {(- * BuildVisitorFromDescendants<- * import('unist-util-visit-parents/complex-types.js').InclusiveDescendant<Tree>,- * Check- * >- * )} BuildVisitor- */----/**- * Visit nodes.- *- * This algorithm performs *depth-first* *tree traversal* in *preorder*- * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).- *- * You can choose for which nodes `visitor` is called by passing a `test`.- * For complex tests, you should test yourself in `visitor`, as it will be- * faster and will have improved type information.- *- * Walking the tree is an intensive task.- * Make use of the return values of the visitor when possible.- * Instead of walking a tree multiple times, walk it once, use `unist-util-is`- * to check if a node matches, and then perform different operations.- *- * You can change the tree.- * See `Visitor` for more info.- *- * @param tree- * Tree to traverse.- * @param test- * `unist-util-is`-compatible test- * @param visitor- * Handle each node.- * @param reverse- * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).- * @returns- * Nothing.- */-const visit =- /**- * @type {(- * (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: BuildVisitor<Tree, Check>, reverse?: boolean | null | undefined) => void) &- * (<Tree extends Node>(tree: Tree, visitor: BuildVisitor<Tree>, reverse?: boolean | null | undefined) => void)- * )}- */- (- /**- * @param {Node} tree- * @param {Test} test- * @param {Visitor} visitor- * @param {boolean | null | undefined} [reverse]- * @returns {void}- */- function (tree, test, visitor, reverse) {- if (typeof test === 'function' && typeof visitor !== 'function') {- reverse = visitor- visitor = test- test = null- }-- visitParents(tree, test, overload, reverse)-- /**- * @param {Node} node- * @param {Array<Parent>} parents- */- function overload(node, parents) {- const parent = parents[parents.length - 1]- return visitor(- node,- parent ? parent.children.indexOf(node) : null,- parent- )- }- }- )----;// CONCATENATED MODULE: ./node_modules/unist-util-position/lib/index.js-/**- * @typedef {import('unist').Position} Position- * @typedef {import('unist').Node} Node- * @typedef {import('unist').Point} Point- */--/**- * @typedef NodeLike- * @property {string} type- * @property {PositionLike | null | undefined} [position]- *- * @typedef PositionLike- * @property {PointLike | null | undefined} [start]- * @property {PointLike | null | undefined} [end]- *- * @typedef PointLike- * @property {number | null | undefined} [line]- * @property {number | null | undefined} [column]- * @property {number | null | undefined} [offset]- */--/**- * Get the starting point of `node`.- *- * @param node- * Node.- * @returns- * Point.- */-const pointStart = unist_util_position_lib_point('start')--/**- * Get the ending point of `node`.- *- * @param node- * Node.- * @returns- * Point.- */-const pointEnd = unist_util_position_lib_point('end')--/**- * Get the positional info of `node`.- *- * @param {NodeLike | Node | null | undefined} [node]- * Node.- * @returns {Position}- * Position.- */-function lib_position(node) {- return {start: pointStart(node), end: pointEnd(node)}-}--/**- * Get the positional info of `node`.- *- * @param {'start' | 'end'} type- * Side.- * @returns- * Getter.- */-function unist_util_position_lib_point(type) {- return point-- /**- * Get the point info of `node` at a bound side.- *- * @param {NodeLike | Node | null | undefined} [node]- * @returns {Point}- */- function point(node) {- const point = (node && node.position && node.position[type]) || {}-- // To do: next major: don’t return points when invalid.- return {- // @ts-expect-error: in practice, null is allowed.- line: point.line || null,- // @ts-expect-error: in practice, null is allowed.- column: point.column || null,- // @ts-expect-error: in practice, null is allowed.- offset: point.offset > -1 ? point.offset : null- }- }-}--;// CONCATENATED MODULE: ./node_modules/unist-util-generated/lib/index.js-/**- * @typedef PointLike- * @property {number | null | undefined} [line]- * @property {number | null | undefined} [column]- * @property {number | null | undefined} [offset]- *- * @typedef PositionLike- * @property {PointLike | null | undefined} [start]- * @property {PointLike | null | undefined} [end]- *- * @typedef NodeLike- * @property {PositionLike | null | undefined} [position]- */--/**- * Check if `node` is generated.- *- * @param {NodeLike | null | undefined} [node]- * Node to check.- * @returns {boolean}- * Whether `node` is generated (does not have positional info).- */-function generated(node) {- return (- !node ||- !node.position ||- !node.position.start ||- !node.position.start.line ||- !node.position.start.column ||- !node.position.end ||- !node.position.end.line ||- !node.position.end.column- )-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-definitions/lib/index.js-/**- * @typedef {import('mdast').Root} Root- * @typedef {import('mdast').Content} Content- * @typedef {import('mdast').Definition} Definition- */--/**- * @typedef {Root | Content} Node- *- * @callback GetDefinition- * Get a definition by identifier.- * @param {string | null | undefined} [identifier]- * Identifier of definition.- * @returns {Definition | null}- * Definition corresponding to `identifier` or `null`.- */----const mdast_util_definitions_lib_own = {}.hasOwnProperty--/**- * Find definitions in `tree`.- *- * Uses CommonMark precedence, which means that earlier definitions are- * preferred over duplicate later definitions.- *- * @param {Node} tree- * Tree to check.- * @returns {GetDefinition}- * Getter.- */-function definitions(tree) {- /** @type {Record<string, Definition>} */- const cache = Object.create(null)-- if (!tree || !tree.type) {- throw new Error('mdast-util-definitions expected node')- }-- visit(tree, 'definition', (definition) => {- const id = clean(definition.identifier)- if (id && !mdast_util_definitions_lib_own.call(cache, id)) {- cache[id] = definition- }- })-- return definition-- /** @type {GetDefinition} */- function definition(identifier) {- const id = clean(identifier)- // To do: next major: return `undefined` when not found.- return id && mdast_util_definitions_lib_own.call(cache, id) ? cache[id] : null- }-}--/**- * @param {string | null | undefined} [value]- * @returns {string}- */-function clean(value) {- return String(value || '').toUpperCase()-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/blockquote.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('mdast').Blockquote} Blockquote- * @typedef {import('../state.js').State} State- */--/**- * Turn an mdast `blockquote` node into hast.- *- * @param {State} state- * Info passed around.- * @param {Blockquote} node- * mdast node.- * @returns {Element}- * hast node.- */-function blockquote(state, node) {- /** @type {Element} */- const result = {- type: 'element',- tagName: 'blockquote',- properties: {},- children: state.wrap(state.all(node), true)- }- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/break.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('hast').Text} Text- * @typedef {import('mdast').Break} Break- * @typedef {import('../state.js').State} State- */--/**- * Turn an mdast `break` node into hast.- *- * @param {State} state- * Info passed around.- * @param {Break} node- * mdast node.- * @returns {Array<Element | Text>}- * hast element content.- */-function hardBreak(state, node) {- /** @type {Element} */- const result = {type: 'element', tagName: 'br', properties: {}, children: []}- state.patch(node, result)- return [state.applyData(node, result), {type: 'text', value: '\n'}]-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/code.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('hast').Properties} Properties- * @typedef {import('mdast').Code} Code- * @typedef {import('../state.js').State} State-- */--/**- * Turn an mdast `code` node into hast.- *- * @param {State} state- * Info passed around.- * @param {Code} node- * mdast node.- * @returns {Element}- * hast node.- */-function code(state, node) {- const value = node.value ? node.value + '\n' : ''- // To do: next major, use `node.lang` w/o regex, the splitting’s been going- // on for years in remark now.- const lang = node.lang ? node.lang.match(/^[^ \t]+(?=[ \t]|$)/) : null- /** @type {Properties} */- const properties = {}-- if (lang) {- properties.className = ['language-' + lang]- }-- // Create `<code>`.- /** @type {Element} */- let result = {- type: 'element',- tagName: 'code',- properties,- children: [{type: 'text', value}]- }-- if (node.meta) {- result.data = {meta: node.meta}- }-- state.patch(node, result)- result = state.applyData(node, result)-- // Create `<pre>`.- result = {type: 'element', tagName: 'pre', properties: {}, children: [result]}- state.patch(node, result)- return result-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/delete.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('mdast').Delete} Delete- * @typedef {import('../state.js').State} State-- */--/**- * Turn an mdast `delete` node into hast.- *- * @param {State} state- * Info passed around.- * @param {Delete} node- * mdast node.- * @returns {Element}- * hast node.- */-function strikethrough(state, node) {- /** @type {Element} */- const result = {- type: 'element',- tagName: 'del',- properties: {},- children: state.all(node)- }- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/emphasis.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('mdast').Emphasis} Emphasis- * @typedef {import('../state.js').State} State- */--/**- * Turn an mdast `emphasis` node into hast.- *- * @param {State} state- * Info passed around.- * @param {Emphasis} node- * mdast node.- * @returns {Element}- * hast node.- */-function emphasis(state, node) {- /** @type {Element} */- const result = {- type: 'element',- tagName: 'em',- properties: {},- children: state.all(node)- }- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js-/**- * @typedef {import('mdast').FootnoteReference} FootnoteReference- * @typedef {import('hast').Element} Element- * @typedef {import('../state.js').State} State- */----/**- * Turn an mdast `footnoteReference` node into hast.- *- * @param {State} state- * Info passed around.- * @param {FootnoteReference} node- * mdast node.- * @returns {Element}- * hast node.- */-function footnoteReference(state, node) {- const id = String(node.identifier).toUpperCase()- const safeId = normalizeUri(id.toLowerCase())- const index = state.footnoteOrder.indexOf(id)- /** @type {number} */- let counter-- if (index === -1) {- state.footnoteOrder.push(id)- state.footnoteCounts[id] = 1- counter = state.footnoteOrder.length- } else {- state.footnoteCounts[id]++- counter = index + 1- }-- const reuseCounter = state.footnoteCounts[id]-- /** @type {Element} */- const link = {- type: 'element',- tagName: 'a',- properties: {- href: '#' + state.clobberPrefix + 'fn-' + safeId,- id:- state.clobberPrefix +- 'fnref-' +- safeId +- (reuseCounter > 1 ? '-' + reuseCounter : ''),- dataFootnoteRef: true,- ariaDescribedBy: ['footnote-label']- },- children: [{type: 'text', value: String(counter)}]- }- state.patch(node, link)-- /** @type {Element} */- const sup = {- type: 'element',- tagName: 'sup',- properties: {},- children: [link]- }- state.patch(node, sup)- return state.applyData(node, sup)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/footnote.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('mdast').Footnote} Footnote- * @typedef {import('../state.js').State} State- */----// To do: when both:-// * <https://github.com/micromark/micromark-extension-footnote>-// * <https://github.com/syntax-tree/mdast-util-footnote>-// …are archived, remove this (also from mdast).-// These inline notes are not used in GFM.--/**- * Turn an mdast `footnote` node into hast.- *- * @param {State} state- * Info passed around.- * @param {Footnote} node- * mdast node.- * @returns {Element}- * hast node.- */-function footnote(state, node) {- const footnoteById = state.footnoteById- let no = 1-- while (no in footnoteById) no++-- const identifier = String(no)-- footnoteById[identifier] = {- type: 'footnoteDefinition',- identifier,- children: [{type: 'paragraph', children: node.children}],- position: node.position- }-- return footnoteReference(state, {- type: 'footnoteReference',- identifier,- position: node.position- })-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/heading.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('mdast').Heading} Heading- * @typedef {import('../state.js').State} State- */--/**- * Turn an mdast `heading` node into hast.- *- * @param {State} state- * Info passed around.- * @param {Heading} node- * mdast node.- * @returns {Element}- * hast node.- */-function heading(state, node) {- /** @type {Element} */- const result = {- type: 'element',- tagName: 'h' + node.depth,- properties: {},- children: state.all(node)- }- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/html.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('mdast').HTML} Html- * @typedef {import('../state.js').State} State- * @typedef {import('../../index.js').Raw} Raw- */--/**- * Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise- * nothing).- *- * @param {State} state- * Info passed around.- * @param {Html} node- * mdast node.- * @returns {Raw | Element | null}- * hast node.- */-function html(state, node) {- if (state.dangerous) {- /** @type {Raw} */- const result = {type: 'raw', value: node.value}- state.patch(node, result)- return state.applyData(node, result)- }-- // To do: next major: return `undefined`.- return null-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/revert.js-/**- * @typedef {import('hast').ElementContent} ElementContent- *- * @typedef {import('mdast').Content} Content- * @typedef {import('mdast').Reference} Reference- * @typedef {import('mdast').Root} Root- *- * @typedef {import('./state.js').State} State- */--/**- * @typedef {Root | Content} Nodes- * @typedef {Extract<Nodes, Reference>} References- */--// To do: next major: always return array.--/**- * Return the content of a reference without definition as plain text.- *- * @param {State} state- * Info passed around.- * @param {References} node- * Reference node (image, link).- * @returns {ElementContent | Array<ElementContent>}- * hast content.- */-function revert(state, node) {- const subtype = node.referenceType- let suffix = ']'-- if (subtype === 'collapsed') {- suffix += '[]'- } else if (subtype === 'full') {- suffix += '[' + (node.label || node.identifier) + ']'- }-- if (node.type === 'imageReference') {- return {type: 'text', value: '![' + node.alt + suffix}- }-- const contents = state.all(node)- const head = contents[0]-- if (head && head.type === 'text') {- head.value = '[' + head.value- } else {- contents.unshift({type: 'text', value: '['})- }-- const tail = contents[contents.length - 1]-- if (tail && tail.type === 'text') {- tail.value += suffix- } else {- contents.push({type: 'text', value: suffix})- }-- return contents-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/image-reference.js-/**- * @typedef {import('hast').ElementContent} ElementContent- * @typedef {import('hast').Element} Element- * @typedef {import('hast').Properties} Properties- * @typedef {import('mdast').ImageReference} ImageReference- * @typedef {import('../state.js').State} State- */-----/**- * Turn an mdast `imageReference` node into hast.- *- * @param {State} state- * Info passed around.- * @param {ImageReference} node- * mdast node.- * @returns {ElementContent | Array<ElementContent>}- * hast node.- */-function imageReference(state, node) {- const def = state.definition(node.identifier)-- if (!def) {- return revert(state, node)- }-- /** @type {Properties} */- const properties = {src: normalizeUri(def.url || ''), alt: node.alt}-- if (def.title !== null && def.title !== undefined) {- properties.title = def.title- }-- /** @type {Element} */- const result = {type: 'element', tagName: 'img', properties, children: []}- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/image.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('hast').Properties} Properties- * @typedef {import('mdast').Image} Image- * @typedef {import('../state.js').State} State- */----/**- * Turn an mdast `image` node into hast.- *- * @param {State} state- * Info passed around.- * @param {Image} node- * mdast node.- * @returns {Element}- * hast node.- */-function image_image(state, node) {- /** @type {Properties} */- const properties = {src: normalizeUri(node.url)}-- if (node.alt !== null && node.alt !== undefined) {- properties.alt = node.alt- }-- if (node.title !== null && node.title !== undefined) {- properties.title = node.title- }-- /** @type {Element} */- const result = {type: 'element', tagName: 'img', properties, children: []}- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/inline-code.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('hast').Text} Text- * @typedef {import('mdast').InlineCode} InlineCode- * @typedef {import('../state.js').State} State- */--/**- * Turn an mdast `inlineCode` node into hast.- *- * @param {State} state- * Info passed around.- * @param {InlineCode} node- * mdast node.- * @returns {Element}- * hast node.- */-function inlineCode(state, node) {- /** @type {Text} */- const text = {type: 'text', value: node.value.replace(/\r?\n|\r/g, ' ')}- state.patch(node, text)-- /** @type {Element} */- const result = {- type: 'element',- tagName: 'code',- properties: {},- children: [text]- }- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/link-reference.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('hast').ElementContent} ElementContent- * @typedef {import('hast').Properties} Properties- * @typedef {import('mdast').LinkReference} LinkReference- * @typedef {import('../state.js').State} State- */-----/**- * Turn an mdast `linkReference` node into hast.- *- * @param {State} state- * Info passed around.- * @param {LinkReference} node- * mdast node.- * @returns {ElementContent | Array<ElementContent>}- * hast node.- */-function linkReference(state, node) {- const def = state.definition(node.identifier)-- if (!def) {- return revert(state, node)- }-- /** @type {Properties} */- const properties = {href: normalizeUri(def.url || '')}-- if (def.title !== null && def.title !== undefined) {- properties.title = def.title- }-- /** @type {Element} */- const result = {- type: 'element',- tagName: 'a',- properties,- children: state.all(node)- }- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/link.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('hast').Properties} Properties- * @typedef {import('mdast').Link} Link- * @typedef {import('../state.js').State} State- */----/**- * Turn an mdast `link` node into hast.- *- * @param {State} state- * Info passed around.- * @param {Link} node- * mdast node.- * @returns {Element}- * hast node.- */-function link_link(state, node) {- /** @type {Properties} */- const properties = {href: normalizeUri(node.url)}-- if (node.title !== null && node.title !== undefined) {- properties.title = node.title- }-- /** @type {Element} */- const result = {- type: 'element',- tagName: 'a',- properties,- children: state.all(node)- }- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/list-item.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('hast').ElementContent} ElementContent- * @typedef {import('hast').Properties} Properties- * @typedef {import('mdast').Content} Content- * @typedef {import('mdast').ListItem} ListItem- * @typedef {import('mdast').Parent} Parent- * @typedef {import('mdast').Root} Root- * @typedef {import('../state.js').State} State- */--/**- * @typedef {Root | Content} Nodes- * @typedef {Extract<Nodes, Parent>} Parents- */--/**- * Turn an mdast `listItem` node into hast.- *- * @param {State} state- * Info passed around.- * @param {ListItem} node- * mdast node.- * @param {Parents | null | undefined} parent- * Parent of `node`.- * @returns {Element}- * hast node.- */-function listItem(state, node, parent) {- const results = state.all(node)- const loose = parent ? listLoose(parent) : listItemLoose(node)- /** @type {Properties} */- const properties = {}- /** @type {Array<ElementContent>} */- const children = []-- if (typeof node.checked === 'boolean') {- const head = results[0]- /** @type {Element} */- let paragraph-- if (head && head.type === 'element' && head.tagName === 'p') {- paragraph = head- } else {- paragraph = {type: 'element', tagName: 'p', properties: {}, children: []}- results.unshift(paragraph)- }-- if (paragraph.children.length > 0) {- paragraph.children.unshift({type: 'text', value: ' '})- }-- paragraph.children.unshift({- type: 'element',- tagName: 'input',- properties: {type: 'checkbox', checked: node.checked, disabled: true},- children: []- })-- // According to github-markdown-css, this class hides bullet.- // See: <https://github.com/sindresorhus/github-markdown-css>.- properties.className = ['task-list-item']- }-- let index = -1-- while (++index < results.length) {- const child = results[index]-- // Add eols before nodes, except if this is a loose, first paragraph.- if (- loose ||- index !== 0 ||- child.type !== 'element' ||- child.tagName !== 'p'- ) {- children.push({type: 'text', value: '\n'})- }-- if (child.type === 'element' && child.tagName === 'p' && !loose) {- children.push(...child.children)- } else {- children.push(child)- }- }-- const tail = results[results.length - 1]-- // Add a final eol.- if (tail && (loose || tail.type !== 'element' || tail.tagName !== 'p')) {- children.push({type: 'text', value: '\n'})- }-- /** @type {Element} */- const result = {type: 'element', tagName: 'li', properties, children}- state.patch(node, result)- return state.applyData(node, result)-}--/**- * @param {Parents} node- * @return {Boolean}- */-function listLoose(node) {- let loose = false- if (node.type === 'list') {- loose = node.spread || false- const children = node.children- let index = -1-- while (!loose && ++index < children.length) {- loose = listItemLoose(children[index])- }- }-- return loose-}--/**- * @param {ListItem} node- * @return {Boolean}- */-function listItemLoose(node) {- const spread = node.spread-- return spread === undefined || spread === null- ? node.children.length > 1- : spread-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/list.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('hast').Properties} Properties- * @typedef {import('mdast').List} List- * @typedef {import('../state.js').State} State- */--/**- * Turn an mdast `list` node into hast.- *- * @param {State} state- * Info passed around.- * @param {List} node- * mdast node.- * @returns {Element}- * hast node.- */-function list_list(state, node) {- /** @type {Properties} */- const properties = {}- const results = state.all(node)- let index = -1-- if (typeof node.start === 'number' && node.start !== 1) {- properties.start = node.start- }-- // Like GitHub, add a class for custom styling.- while (++index < results.length) {- const child = results[index]-- if (- child.type === 'element' &&- child.tagName === 'li' &&- child.properties &&- Array.isArray(child.properties.className) &&- child.properties.className.includes('task-list-item')- ) {- properties.className = ['contains-task-list']- break- }- }-- /** @type {Element} */- const result = {- type: 'element',- tagName: node.ordered ? 'ol' : 'ul',- properties,- children: state.wrap(results, true)- }- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/paragraph.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('mdast').Paragraph} Paragraph- * @typedef {import('../state.js').State} State- */--/**- * Turn an mdast `paragraph` node into hast.- *- * @param {State} state- * Info passed around.- * @param {Paragraph} node- * mdast node.- * @returns {Element}- * hast node.- */-function paragraph(state, node) {- /** @type {Element} */- const result = {- type: 'element',- tagName: 'p',- properties: {},- children: state.all(node)- }- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/root.js-/**- * @typedef {import('hast').Root} HastRoot- * @typedef {import('hast').Element} HastElement- * @typedef {import('mdast').Root} MdastRoot- * @typedef {import('../state.js').State} State- */--/**- * Turn an mdast `root` node into hast.- *- * @param {State} state- * Info passed around.- * @param {MdastRoot} node- * mdast node.- * @returns {HastRoot | HastElement}- * hast node.- */-function root(state, node) {- /** @type {HastRoot} */- const result = {type: 'root', children: state.wrap(state.all(node))}- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/strong.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('mdast').Strong} Strong- * @typedef {import('../state.js').State} State- */--/**- * Turn an mdast `strong` node into hast.- *- * @param {State} state- * Info passed around.- * @param {Strong} node- * mdast node.- * @returns {Element}- * hast node.- */-function strong(state, node) {- /** @type {Element} */- const result = {- type: 'element',- tagName: 'strong',- properties: {},- children: state.all(node)- }- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/table.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('mdast').Table} Table- * @typedef {import('../state.js').State} State- */----/**- * Turn an mdast `table` node into hast.- *- * @param {State} state- * Info passed around.- * @param {Table} node- * mdast node.- * @returns {Element}- * hast node.- */-function table(state, node) {- const rows = state.all(node)- const firstRow = rows.shift()- /** @type {Array<Element>} */- const tableContent = []-- if (firstRow) {- /** @type {Element} */- const head = {- type: 'element',- tagName: 'thead',- properties: {},- children: state.wrap([firstRow], true)- }- state.patch(node.children[0], head)- tableContent.push(head)- }-- if (rows.length > 0) {- /** @type {Element} */- const body = {- type: 'element',- tagName: 'tbody',- properties: {},- children: state.wrap(rows, true)- }-- const start = pointStart(node.children[1])- const end = pointEnd(node.children[node.children.length - 1])- if (start.line && end.line) body.position = {start, end}- tableContent.push(body)- }-- /** @type {Element} */- const result = {- type: 'element',- tagName: 'table',- properties: {},- children: state.wrap(tableContent, true)- }- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/table-row.js-/**- * @typedef {import('hast').Properties} Properties- * @typedef {import('hast').Element} Element- * @typedef {import('hast').ElementContent} ElementContent- * @typedef {import('mdast').Content} Content- * @typedef {import('mdast').Parent} Parent- * @typedef {import('mdast').Root} Root- * @typedef {import('mdast').TableRow} TableRow- * @typedef {import('../state.js').State} State- */--/**- * @typedef {Root | Content} Nodes- * @typedef {Extract<Nodes, Parent>} Parents- */--/**- * Turn an mdast `tableRow` node into hast.- *- * @param {State} state- * Info passed around.- * @param {TableRow} node- * mdast node.- * @param {Parents | null | undefined} parent- * Parent of `node`.- * @returns {Element}- * hast node.- */-function tableRow(state, node, parent) {- const siblings = parent ? parent.children : undefined- // Generate a body row when without parent.- const rowIndex = siblings ? siblings.indexOf(node) : 1- const tagName = rowIndex === 0 ? 'th' : 'td'- const align = parent && parent.type === 'table' ? parent.align : undefined- const length = align ? align.length : node.children.length- let cellIndex = -1- /** @type {Array<ElementContent>} */- const cells = []-- while (++cellIndex < length) {- // Note: can also be undefined.- const cell = node.children[cellIndex]- /** @type {Properties} */- const properties = {}- const alignValue = align ? align[cellIndex] : undefined-- if (alignValue) {- properties.align = alignValue- }-- /** @type {Element} */- let result = {type: 'element', tagName, properties, children: []}-- if (cell) {- result.children = state.all(cell)- state.patch(cell, result)- result = state.applyData(node, result)- }-- cells.push(result)- }-- /** @type {Element} */- const result = {- type: 'element',- tagName: 'tr',- properties: {},- children: state.wrap(cells, true)- }- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/table-cell.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('mdast').TableCell} TableCell- * @typedef {import('../state.js').State} State- */--/**- * Turn an mdast `tableCell` node into hast.- *- * @param {State} state- * Info passed around.- * @param {TableCell} node- * mdast node.- * @returns {Element}- * hast node.- */-function tableCell(state, node) {- // Note: this function is normally not called: see `table-row` for how rows- // and their cells are compiled.- /** @type {Element} */- const result = {- type: 'element',- tagName: 'td', // Assume body cell.- properties: {},- children: state.all(node)- }- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/trim-lines/index.js-const tab = 9 /* `\t` */-const space = 32 /* ` ` */--/**- * Remove initial and final spaces and tabs at the line breaks in `value`.- * Does not trim initial and final spaces and tabs of the value itself.- *- * @param {string} value- * Value to trim.- * @returns {string}- * Trimmed value.- */-function trimLines(value) {- const source = String(value)- const search = /\r?\n|\r/g- let match = search.exec(source)- let last = 0- /** @type {Array<string>} */- const lines = []-- while (match) {- lines.push(- trimLine(source.slice(last, match.index), last > 0, true),- match[0]- )-- last = match.index + match[0].length- match = search.exec(source)- }-- lines.push(trimLine(source.slice(last), last > 0, false))-- return lines.join('')-}--/**- * @param {string} value- * Line to trim.- * @param {boolean} start- * Whether to trim the start of the line.- * @param {boolean} end- * Whether to trim the end of the line.- * @returns {string}- * Trimmed line.- */-function trimLine(value, start, end) {- let startIndex = 0- let endIndex = value.length-- if (start) {- let code = value.codePointAt(startIndex)-- while (code === tab || code === space) {- startIndex++- code = value.codePointAt(startIndex)- }- }-- if (end) {- let code = value.codePointAt(endIndex - 1)-- while (code === tab || code === space) {- endIndex--- code = value.codePointAt(endIndex - 1)- }- }-- return endIndex > startIndex ? value.slice(startIndex, endIndex) : ''-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/text.js-/**- * @typedef {import('hast').Element} HastElement- * @typedef {import('hast').Text} HastText- * @typedef {import('mdast').Text} MdastText- * @typedef {import('../state.js').State} State- */----/**- * Turn an mdast `text` node into hast.- *- * @param {State} state- * Info passed around.- * @param {MdastText} node- * mdast node.- * @returns {HastText | HastElement}- * hast node.- */-function handlers_text_text(state, node) {- /** @type {HastText} */- const result = {type: 'text', value: trimLines(String(node.value))}- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js-/**- * @typedef {import('hast').Element} Element- * @typedef {import('mdast').ThematicBreak} ThematicBreak- * @typedef {import('../state.js').State} State- */--/**- * Turn an mdast `thematicBreak` node into hast.- *- * @param {State} state- * Info passed around.- * @param {ThematicBreak} node- * mdast node.- * @returns {Element}- * hast node.- */-function thematic_break_thematicBreak(state, node) {- /** @type {Element} */- const result = {- type: 'element',- tagName: 'hr',- properties: {},- children: []- }- state.patch(node, result)- return state.applyData(node, result)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/handlers/index.js--------------------------/**- * Default handlers for nodes.- */-const handlers = {- blockquote: blockquote,- break: hardBreak,- code: code,- delete: strikethrough,- emphasis: emphasis,- footnoteReference: footnoteReference,- footnote: footnote,- heading: heading,- html: html,- imageReference: imageReference,- image: image_image,- inlineCode: inlineCode,- linkReference: linkReference,- link: link_link,- listItem: listItem,- list: list_list,- paragraph: paragraph,- root: root,- strong: strong,- table: table,- tableCell: tableCell,- tableRow: tableRow,- text: handlers_text_text,- thematicBreak: thematic_break_thematicBreak,- toml: ignore,- yaml: ignore,- definition: ignore,- footnoteDefinition: ignore-}--// Return nothing for nodes that are ignored.-function ignore() {- // To do: next major: return `undefined`.- return null-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/state.js-/**- * @typedef {import('hast').Content} HastContent- * @typedef {import('hast').Element} HastElement- * @typedef {import('hast').ElementContent} HastElementContent- * @typedef {import('hast').Properties} HastProperties- * @typedef {import('hast').Root} HastRoot- * @typedef {import('hast').Text} HastText- *- * @typedef {import('mdast').Content} MdastContent- * @typedef {import('mdast').Definition} MdastDefinition- * @typedef {import('mdast').FootnoteDefinition} MdastFootnoteDefinition- * @typedef {import('mdast').Parent} MdastParent- * @typedef {import('mdast').Root} MdastRoot- */--/**- * @typedef {HastRoot | HastContent} HastNodes- * @typedef {MdastRoot | MdastContent} MdastNodes- * @typedef {Extract<MdastNodes, MdastParent>} MdastParents- *- * @typedef EmbeddedHastFields- * hast fields.- * @property {string | null | undefined} [hName]- * Generate a specific element with this tag name instead.- * @property {HastProperties | null | undefined} [hProperties]- * Generate an element with these properties instead.- * @property {Array<HastElementContent> | null | undefined} [hChildren]- * Generate an element with this content instead.- *- * @typedef {Record<string, unknown> & EmbeddedHastFields} MdastData- * mdast data with embedded hast fields.- *- * @typedef {MdastNodes & {data?: MdastData | null | undefined}} MdastNodeWithData- * mdast node with embedded hast data.- *- * @typedef PointLike- * Point-like value.- * @property {number | null | undefined} [line]- * Line.- * @property {number | null | undefined} [column]- * Column.- * @property {number | null | undefined} [offset]- * Offset.- *- * @typedef PositionLike- * Position-like value.- * @property {PointLike | null | undefined} [start]- * Point-like value.- * @property {PointLike | null | undefined} [end]- * Point-like value.- *- * @callback Handler- * Handle a node.- * @param {State} state- * Info passed around.- * @param {any} node- * mdast node to handle.- * @param {MdastParents | null | undefined} parent- * Parent of `node`.- * @returns {HastElementContent | Array<HastElementContent> | null | undefined}- * hast node.- *- * @callback HFunctionProps- * Signature of `state` for when props are passed.- * @param {MdastNodes | PositionLike | null | undefined} node- * mdast node or unist position.- * @param {string} tagName- * HTML tag name.- * @param {HastProperties} props- * Properties.- * @param {Array<HastElementContent> | null | undefined} [children]- * hast content.- * @returns {HastElement}- * Compiled element.- *- * @callback HFunctionNoProps- * Signature of `state` for when no props are passed.- * @param {MdastNodes | PositionLike | null | undefined} node- * mdast node or unist position.- * @param {string} tagName- * HTML tag name.- * @param {Array<HastElementContent> | null | undefined} [children]- * hast content.- * @returns {HastElement}- * Compiled element.- *- * @typedef HFields- * Info on `state`.- * @property {boolean} dangerous- * Whether HTML is allowed.- * @property {string} clobberPrefix- * Prefix to use to prevent DOM clobbering.- * @property {string} footnoteLabel- * Label to use to introduce the footnote section.- * @property {string} footnoteLabelTagName- * HTML used for the footnote label.- * @property {HastProperties} footnoteLabelProperties- * Properties on the HTML tag used for the footnote label.- * @property {string} footnoteBackLabel- * Label to use from backreferences back to their footnote call.- * @property {(identifier: string) => MdastDefinition | null} definition- * Definition cache.- * @property {Record<string, MdastFootnoteDefinition>} footnoteById- * Footnote definitions by their identifier.- * @property {Array<string>} footnoteOrder- * Identifiers of order when footnote calls first appear in tree order.- * @property {Record<string, number>} footnoteCounts- * Counts for how often the same footnote was called.- * @property {Handlers} handlers- * Applied handlers.- * @property {Handler} unknownHandler- * Handler for any none not in `passThrough` or otherwise handled.- * @property {(from: MdastNodes, node: HastNodes) => void} patch- * Copy a node’s positional info.- * @property {<Type extends HastNodes>(from: MdastNodes, to: Type) => Type | HastElement} applyData- * Honor the `data` of `from`, and generate an element instead of `node`.- * @property {(node: MdastNodes, parent: MdastParents | null | undefined) => HastElementContent | Array<HastElementContent> | null | undefined} one- * Transform an mdast node to hast.- * @property {(node: MdastNodes) => Array<HastElementContent>} all- * Transform the children of an mdast parent to hast.- * @property {<Type extends HastContent>(nodes: Array<Type>, loose?: boolean | null | undefined) => Array<Type | HastText>} wrap- * Wrap `nodes` with line endings between each node, adds initial/final line endings when `loose`.- * @property {(left: MdastNodeWithData | PositionLike | null | undefined, right: HastElementContent) => HastElementContent} augment- * Like `state` but lower-level and usable on non-elements.- * Deprecated: use `patch` and `applyData`.- * @property {Array<string>} passThrough- * List of node types to pass through untouched (except for their children).- *- * @typedef Options- * Configuration (optional).- * @property {boolean | null | undefined} [allowDangerousHtml=false]- * Whether to persist raw HTML in markdown in the hast tree.- * @property {string | null | undefined} [clobberPrefix='user-content-']- * Prefix to use before the `id` attribute on footnotes to prevent it from- * *clobbering*.- * @property {string | null | undefined} [footnoteBackLabel='Back to content']- * Label to use from backreferences back to their footnote call (affects- * screen readers).- * @property {string | null | undefined} [footnoteLabel='Footnotes']- * Label to use for the footnotes section (affects screen readers).- * @property {HastProperties | null | undefined} [footnoteLabelProperties={className: ['sr-only']}]- * Properties to use on the footnote label (note that `id: 'footnote-label'`- * is always added as footnote calls use it with `aria-describedby` to- * provide an accessible label).- * @property {string | null | undefined} [footnoteLabelTagName='h2']- * Tag name to use for the footnote label.- * @property {Handlers | null | undefined} [handlers]- * Extra handlers for nodes.- * @property {Array<string> | null | undefined} [passThrough]- * List of custom mdast node types to pass through (keep) in hast (note that- * the node itself is passed, but eventual children are transformed).- * @property {Handler | null | undefined} [unknownHandler]- * Handler for all unknown nodes.- *- * @typedef {Record<string, Handler>} Handlers- * Handle nodes.- *- * @typedef {HFunctionProps & HFunctionNoProps & HFields} State- * Info passed around.- */--------const state_own = {}.hasOwnProperty--/**- * Create `state` from an mdast tree.- *- * @param {MdastNodes} tree- * mdast node to transform.- * @param {Options | null | undefined} [options]- * Configuration.- * @returns {State}- * `state` function.- */-function createState(tree, options) {- const settings = options || {}- const dangerous = settings.allowDangerousHtml || false- /** @type {Record<string, MdastFootnoteDefinition>} */- const footnoteById = {}-- // To do: next major: add `options` to state, remove:- // `dangerous`, `clobberPrefix`, `footnoteLabel`, `footnoteLabelTagName`,- // `footnoteLabelProperties`, `footnoteBackLabel`, `passThrough`,- // `unknownHandler`.-- // To do: next major: move to `state.options.allowDangerousHtml`.- state.dangerous = dangerous- // To do: next major: move to `state.options`.- state.clobberPrefix =- settings.clobberPrefix === undefined || settings.clobberPrefix === null- ? 'user-content-'- : settings.clobberPrefix- // To do: next major: move to `state.options`.- state.footnoteLabel = settings.footnoteLabel || 'Footnotes'- // To do: next major: move to `state.options`.- state.footnoteLabelTagName = settings.footnoteLabelTagName || 'h2'- // To do: next major: move to `state.options`.- state.footnoteLabelProperties = settings.footnoteLabelProperties || {- className: ['sr-only']- }- // To do: next major: move to `state.options`.- state.footnoteBackLabel = settings.footnoteBackLabel || 'Back to content'- // To do: next major: move to `state.options`.- state.unknownHandler = settings.unknownHandler- // To do: next major: move to `state.options`.- state.passThrough = settings.passThrough-- state.handlers = {...handlers, ...settings.handlers}-- // To do: next major: replace utility with `definitionById` object, so we- // only walk once (as we need footnotes too).- state.definition = definitions(tree)- state.footnoteById = footnoteById- /** @type {Array<string>} */- state.footnoteOrder = []- /** @type {Record<string, number>} */- state.footnoteCounts = {}-- state.patch = patch- state.applyData = applyData- state.one = oneBound- state.all = allBound- state.wrap = state_wrap- // To do: next major: remove `augment`.- state.augment = augment-- visit(tree, 'footnoteDefinition', (definition) => {- const id = String(definition.identifier).toUpperCase()-- // Mimick CM behavior of link definitions.- // See: <https://github.com/syntax-tree/mdast-util-definitions/blob/8290999/index.js#L26>.- if (!state_own.call(footnoteById, id)) {- footnoteById[id] = definition- }- })-- // @ts-expect-error Hush, it’s fine!- return state-- /**- * Finalise the created `right`, a hast node, from `left`, an mdast node.- *- * @param {MdastNodeWithData | PositionLike | null | undefined} left- * @param {HastElementContent} right- * @returns {HastElementContent}- */- /* c8 ignore start */- // To do: next major: remove.- function augment(left, right) {- // Handle `data.hName`, `data.hProperties, `data.hChildren`.- if (left && 'data' in left && left.data) {- /** @type {MdastData} */- const data = left.data-- if (data.hName) {- if (right.type !== 'element') {- right = {- type: 'element',- tagName: '',- properties: {},- children: []- }- }-- right.tagName = data.hName- }-- if (right.type === 'element' && data.hProperties) {- right.properties = {...right.properties, ...data.hProperties}- }-- if ('children' in right && right.children && data.hChildren) {- right.children = data.hChildren- }- }-- if (left) {- const ctx = 'type' in left ? left : {position: left}-- if (!generated(ctx)) {- // @ts-expect-error: fine.- right.position = {start: pointStart(ctx), end: pointEnd(ctx)}- }- }-- return right- }- /* c8 ignore stop */-- /**- * Create an element for `node`.- *- * @type {HFunctionProps}- */- /* c8 ignore start */- // To do: next major: remove.- function state(node, tagName, props, children) {- if (Array.isArray(props)) {- children = props- props = {}- }-- // @ts-expect-error augmenting an element yields an element.- return augment(node, {- type: 'element',- tagName,- properties: props || {},- children: children || []- })- }- /* c8 ignore stop */-- /**- * Transform an mdast node into a hast node.- *- * @param {MdastNodes} node- * mdast node.- * @param {MdastParents | null | undefined} [parent]- * Parent of `node`.- * @returns {HastElementContent | Array<HastElementContent> | null | undefined}- * Resulting hast node.- */- function oneBound(node, parent) {- // @ts-expect-error: that’s a state :)- return state_one(state, node, parent)- }-- /**- * Transform the children of an mdast node into hast nodes.- *- * @param {MdastNodes} parent- * mdast node to compile- * @returns {Array<HastElementContent>}- * Resulting hast nodes.- */- function allBound(parent) {- // @ts-expect-error: that’s a state :)- return state_all(state, parent)- }-}--/**- * Copy a node’s positional info.- *- * @param {MdastNodes} from- * mdast node to copy from.- * @param {HastNodes} to- * hast node to copy into.- * @returns {void}- * Nothing.- */-function patch(from, to) {- if (from.position) to.position = lib_position(from)-}--/**- * Honor the `data` of `from` and maybe generate an element instead of `to`.- *- * @template {HastNodes} Type- * Node type.- * @param {MdastNodes} from- * mdast node to use data from.- * @param {Type} to- * hast node to change.- * @returns {Type | HastElement}- * Nothing.- */-function applyData(from, to) {- /** @type {Type | HastElement} */- let result = to-- // Handle `data.hName`, `data.hProperties, `data.hChildren`.- if (from && from.data) {- const hName = from.data.hName- const hChildren = from.data.hChildren- const hProperties = from.data.hProperties-- if (typeof hName === 'string') {- // Transforming the node resulted in an element with a different name- // than wanted:- if (result.type === 'element') {- result.tagName = hName- }- // Transforming the node resulted in a non-element, which happens for- // raw, text, and root nodes (unless custom handlers are passed).- // The intent is likely to keep the content around (otherwise: pass- // `hChildren`).- else {- result = {- type: 'element',- tagName: hName,- properties: {},- children: []- }-- // To do: next major: take the children from the `root`, or inject the- // raw/text/comment or so into the element?- // if ('children' in node) {- // // @ts-expect-error: assume `children` are allowed in elements.- // result.children = node.children- // } else {- // // @ts-expect-error: assume `node` is allowed in elements.- // result.children.push(node)- // }- }- }-- if (result.type === 'element' && hProperties) {- result.properties = {...result.properties, ...hProperties}- }-- if (- 'children' in result &&- result.children &&- hChildren !== null &&- hChildren !== undefined- ) {- // @ts-expect-error: assume valid children are defined.- result.children = hChildren- }- }-- return result-}--/**- * Transform an mdast node into a hast node.- *- * @param {State} state- * Info passed around.- * @param {MdastNodes} node- * mdast node.- * @param {MdastParents | null | undefined} [parent]- * Parent of `node`.- * @returns {HastElementContent | Array<HastElementContent> | null | undefined}- * Resulting hast node.- */-// To do: next major: do not expose, keep bound.-function state_one(state, node, parent) {- const type = node && node.type-- // Fail on non-nodes.- if (!type) {- throw new Error('Expected node, got `' + node + '`')- }-- if (state_own.call(state.handlers, type)) {- return state.handlers[type](state, node, parent)- }-- if (state.passThrough && state.passThrough.includes(type)) {- // To do: next major: deep clone.- // @ts-expect-error: types of passed through nodes are expected to be added manually.- return 'children' in node ? {...node, children: state_all(state, node)} : node- }-- if (state.unknownHandler) {- return state.unknownHandler(state, node, parent)- }-- return defaultUnknownHandler(state, node)-}--/**- * Transform the children of an mdast node into hast nodes.- *- * @param {State} state- * Info passed around.- * @param {MdastNodes} parent- * mdast node to compile- * @returns {Array<HastElementContent>}- * Resulting hast nodes.- */-// To do: next major: do not expose, keep bound.-function state_all(state, parent) {- /** @type {Array<HastElementContent>} */- const values = []-- if ('children' in parent) {- const nodes = parent.children- let index = -1- while (++index < nodes.length) {- const result = state_one(state, nodes[index], parent)-- // To do: see if we van clean this? Can we merge texts?- if (result) {- if (index && nodes[index - 1].type === 'break') {- if (!Array.isArray(result) && result.type === 'text') {- result.value = result.value.replace(/^\s+/, '')- }-- if (!Array.isArray(result) && result.type === 'element') {- const head = result.children[0]-- if (head && head.type === 'text') {- head.value = head.value.replace(/^\s+/, '')- }- }- }-- if (Array.isArray(result)) {- values.push(...result)- } else {- values.push(result)- }- }- }- }-- return values-}--/**- * Transform an unknown node.- *- * @param {State} state- * Info passed around.- * @param {MdastNodes} node- * Unknown mdast node.- * @returns {HastText | HastElement}- * Resulting hast node.- */-function defaultUnknownHandler(state, node) {- const data = node.data || {}- /** @type {HastText | HastElement} */- const result =- 'value' in node &&- !(state_own.call(data, 'hProperties') || state_own.call(data, 'hChildren'))- ? {type: 'text', value: node.value}- : {- type: 'element',- tagName: 'div',- properties: {},- children: state_all(state, node)- }-- state.patch(node, result)- return state.applyData(node, result)-}--/**- * Wrap `nodes` with line endings between each node.- *- * @template {HastContent} Type- * Node type.- * @param {Array<Type>} nodes- * List of nodes to wrap.- * @param {boolean | null | undefined} [loose=false]- * Whether to add line endings at start and end.- * @returns {Array<Type | HastText>}- * Wrapped nodes.- */-function state_wrap(nodes, loose) {- /** @type {Array<Type | HastText>} */- const result = []- let index = -1-- if (loose) {- result.push({type: 'text', value: '\n'})- }-- while (++index < nodes.length) {- if (index) result.push({type: 'text', value: '\n'})- result.push(nodes[index])- }-- if (loose && nodes.length > 0) {- result.push({type: 'text', value: '\n'})- }-- return result-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-hast/lib/index.js-/**- * @typedef {import('hast').Content} HastContent- * @typedef {import('hast').Root} HastRoot- *- * @typedef {import('mdast').Content} MdastContent- * @typedef {import('mdast').Root} MdastRoot- *- * @typedef {import('./state.js').Options} Options- */--/**- * @typedef {HastRoot | HastContent} HastNodes- * @typedef {MdastRoot | MdastContent} MdastNodes- */-----/**- * Transform mdast to hast.- *- * ##### Notes- *- * ###### HTML- *- * Raw HTML is available in mdast as `html` nodes and can be embedded in hast- * as semistandard `raw` nodes.- * Most utilities ignore `raw` nodes but two notable ones don’t:- *- * * `hast-util-to-html` also has an option `allowDangerousHtml` which will- * output the raw HTML.- * This is typically discouraged as noted by the option name but is useful- * if you completely trust authors- * * `hast-util-raw` can handle the raw embedded HTML strings by parsing them- * into standard hast nodes (`element`, `text`, etc).- * This is a heavy task as it needs a full HTML parser, but it is the only- * way to support untrusted content- *- * ###### Footnotes- *- * Many options supported here relate to footnotes.- * Footnotes are not specified by CommonMark, which we follow by default.- * They are supported by GitHub, so footnotes can be enabled in markdown with- * `mdast-util-gfm`.- *- * The options `footnoteBackLabel` and `footnoteLabel` define natural language- * that explains footnotes, which is hidden for sighted users but shown to- * assistive technology.- * When your page is not in English, you must define translated values.- *- * Back references use ARIA attributes, but the section label itself uses a- * heading that is hidden with an `sr-only` class.- * To show it to sighted users, define different attributes in- * `footnoteLabelProperties`.- *- * ###### Clobbering- *- * Footnotes introduces a problem, as it links footnote calls to footnote- * definitions on the page through `id` attributes generated from user content,- * which results in DOM clobbering.- *- * DOM clobbering is this:- *- * ```html- * <p id=x></p>- * <script>alert(x) // `x` now refers to the DOM `p#x` element</script>- * ```- *- * Elements by their ID are made available by browsers on the `window` object,- * which is a security risk.- * Using a prefix solves this problem.- *- * More information on how to handle clobbering and the prefix is explained in- * Example: headings (DOM clobbering) in `rehype-sanitize`.- *- * ###### Unknown nodes- *- * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.- * The default behavior for unknown nodes is:- *- * * when the node has a `value` (and doesn’t have `data.hName`,- * `data.hProperties`, or `data.hChildren`, see later), create a hast `text`- * node- * * otherwise, create a `<div>` element (which could be changed with- * `data.hName`), with its children mapped from mdast to hast as well- *- * This behavior can be changed by passing an `unknownHandler`.- *- * @param {MdastNodes} tree- * mdast tree.- * @param {Options | null | undefined} [options]- * Configuration.- * @returns {HastNodes | null | undefined}- * hast tree.- */-// To do: next major: always return a single `root`.-function toHast(tree, options) {- const state = createState(tree, options)- const node = state.one(tree, null)- const foot = footer(state)-- if (foot) {- // @ts-expect-error If there’s a footer, there were definitions, meaning block- // content.- // So assume `node` is a parent node.- node.children.push({type: 'text', value: '\n'}, foot)- }-- // To do: next major: always return root?- return Array.isArray(node) ? {type: 'root', children: node} : node-}--;// CONCATENATED MODULE: ./node_modules/remark-rehype/lib/index.js-/**- * @typedef {import('hast').Root} HastRoot- * @typedef {import('mdast').Root} MdastRoot- * @typedef {import('mdast-util-to-hast').Options} Options- * @typedef {import('unified').Processor<any, any, any, any>} Processor- *- * @typedef {import('mdast-util-to-hast')} DoNotTouchAsThisImportIncludesRawInTree- */----// Note: the `<MdastRoot, HastRoot>` overload doesn’t seem to work :'(--/**- * Plugin that turns markdown into HTML to support rehype.- *- * * If a destination processor is given, that processor runs with a new HTML- * (hast) tree (bridge-mode).- * As the given processor runs with a hast tree, and rehype plugins support- * hast, that means rehype plugins can be used with the given processor.- * The hast tree is discarded in the end.- * It’s highly unlikely that you want to do this.- * * The common case is to not pass a destination processor, in which case the- * current processor continues running with a new HTML (hast) tree- * (mutate-mode).- * As the current processor continues with a hast tree, and rehype plugins- * support hast, that means rehype plugins can be used after- * `remark-rehype`.- * It’s likely that this is what you want to do.- *- * @param destination- * Optional unified processor.- * @param options- * Options passed to `mdast-util-to-hast`.- */-const remarkRehype =- /** @type {(import('unified').Plugin<[Processor, Options?]|[null|undefined, Options?]|[Options]|[], MdastRoot>)} */- (- function (destination, options) {- return destination && 'run' in destination- ? bridge(destination, options)- : mutate(destination || options)- }- )--/* harmony default export */ const lib = (remarkRehype);--/**- * Bridge-mode.- * Runs the destination with the new hast tree.- *- * @type {import('unified').Plugin<[Processor, Options?], MdastRoot>}- */-function bridge(destination, options) {- return (node, file, next) => {- destination.run(toHast(node, options), file, (error) => {- next(error)- })- }-}--/**- * Mutate-mode.- * Further plugins run on the hast tree.- *- * @type {import('unified').Plugin<[Options?]|void[], MdastRoot, HastRoot>}- */-function mutate(options) {- // @ts-expect-error: assume a corresponding node is returned by `toHast`.- return (node) => toHast(node, options)-}--;// CONCATENATED MODULE: ./node_modules/property-information/lib/util/schema.js-/**- * @typedef {import('./info.js').Info} Info- * @typedef {Record<string, Info>} Properties- * @typedef {Record<string, string>} Normal- */--class Schema {- /**- * @constructor- * @param {Properties} property- * @param {Normal} normal- * @param {string} [space]- */- constructor(property, normal, space) {- this.property = property- this.normal = normal- if (space) {- this.space = space- }- }-}--/** @type {Properties} */-Schema.prototype.property = {}-/** @type {Normal} */-Schema.prototype.normal = {}-/** @type {string|null} */-Schema.prototype.space = null--;// CONCATENATED MODULE: ./node_modules/property-information/lib/util/merge.js-/**- * @typedef {import('./schema.js').Properties} Properties- * @typedef {import('./schema.js').Normal} Normal- */----/**- * @param {Schema[]} definitions- * @param {string} [space]- * @returns {Schema}- */-function merge(definitions, space) {- /** @type {Properties} */- const property = {}- /** @type {Normal} */- const normal = {}- let index = -1-- while (++index < definitions.length) {- Object.assign(property, definitions[index].property)- Object.assign(normal, definitions[index].normal)- }-- return new Schema(property, normal, space)-}--;// CONCATENATED MODULE: ./node_modules/property-information/lib/normalize.js-/**- * @param {string} value- * @returns {string}- */-function normalize_normalize(value) {- return value.toLowerCase()-}--;// CONCATENATED MODULE: ./node_modules/property-information/lib/util/info.js-class Info {- /**- * @constructor- * @param {string} property- * @param {string} attribute- */- constructor(property, attribute) {- /** @type {string} */- this.property = property- /** @type {string} */- this.attribute = attribute- }-}--/** @type {string|null} */-Info.prototype.space = null-Info.prototype.boolean = false-Info.prototype.booleanish = false-Info.prototype.overloadedBoolean = false-Info.prototype.number = false-Info.prototype.commaSeparated = false-Info.prototype.spaceSeparated = false-Info.prototype.commaOrSpaceSeparated = false-Info.prototype.mustUseProperty = false-Info.prototype.defined = false--;// CONCATENATED MODULE: ./node_modules/property-information/lib/util/types.js-let powers = 0--const types_boolean = increment()-const booleanish = increment()-const overloadedBoolean = increment()-const number = increment()-const spaceSeparated = increment()-const commaSeparated = increment()-const commaOrSpaceSeparated = increment()--function increment() {- return 2 ** ++powers-}--;// CONCATENATED MODULE: ./node_modules/property-information/lib/util/defined-info.js----/** @type {Array<keyof types>} */-// @ts-expect-error: hush.-const checks = Object.keys(types_namespaceObject)--class DefinedInfo extends Info {- /**- * @constructor- * @param {string} property- * @param {string} attribute- * @param {number|null} [mask]- * @param {string} [space]- */- constructor(property, attribute, mask, space) {- let index = -1-- super(property, attribute)-- mark(this, 'space', space)-- if (typeof mask === 'number') {- while (++index < checks.length) {- const check = checks[index]- mark(this, checks[index], (mask & types_namespaceObject[check]) === types_namespaceObject[check])- }- }- }-}--DefinedInfo.prototype.defined = true--/**- * @param {DefinedInfo} values- * @param {string} key- * @param {unknown} value- */-function mark(values, key, value) {- if (value) {- // @ts-expect-error: assume `value` matches the expected value of `key`.- values[key] = value- }-}--;// CONCATENATED MODULE: ./node_modules/property-information/lib/util/create.js-/**- * @typedef {import('./schema.js').Properties} Properties- * @typedef {import('./schema.js').Normal} Normal- *- * @typedef {Record<string, string>} Attributes- *- * @typedef {Object} Definition- * @property {Record<string, number|null>} properties- * @property {(attributes: Attributes, property: string) => string} transform- * @property {string} [space]- * @property {Attributes} [attributes]- * @property {Array<string>} [mustUseProperty]- */------const create_own = {}.hasOwnProperty--/**- * @param {Definition} definition- * @returns {Schema}- */-function create(definition) {- /** @type {Properties} */- const property = {}- /** @type {Normal} */- const normal = {}- /** @type {string} */- let prop-- for (prop in definition.properties) {- if (create_own.call(definition.properties, prop)) {- const value = definition.properties[prop]- const info = new DefinedInfo(- prop,- definition.transform(definition.attributes || {}, prop),- value,- definition.space- )-- if (- definition.mustUseProperty &&- definition.mustUseProperty.includes(prop)- ) {- info.mustUseProperty = true- }-- property[prop] = info-- normal[normalize_normalize(prop)] = prop- normal[normalize_normalize(info.attribute)] = prop- }- }-- return new Schema(property, normal, definition.space)-}--;// CONCATENATED MODULE: ./node_modules/property-information/lib/xlink.js---const xlink = create({- space: 'xlink',- transform(_, prop) {- return 'xlink:' + prop.slice(5).toLowerCase()- },- properties: {- xLinkActuate: null,- xLinkArcRole: null,- xLinkHref: null,- xLinkRole: null,- xLinkShow: null,- xLinkTitle: null,- xLinkType: null- }-})--;// CONCATENATED MODULE: ./node_modules/property-information/lib/xml.js---const xml = create({- space: 'xml',- transform(_, prop) {- return 'xml:' + prop.slice(3).toLowerCase()- },- properties: {xmlLang: null, xmlBase: null, xmlSpace: null}-})--;// CONCATENATED MODULE: ./node_modules/property-information/lib/util/case-sensitive-transform.js-/**- * @param {Record<string, string>} attributes- * @param {string} attribute- * @returns {string}- */-function caseSensitiveTransform(attributes, attribute) {- return attribute in attributes ? attributes[attribute] : attribute-}--;// CONCATENATED MODULE: ./node_modules/property-information/lib/util/case-insensitive-transform.js---/**- * @param {Record<string, string>} attributes- * @param {string} property- * @returns {string}- */-function caseInsensitiveTransform(attributes, property) {- return caseSensitiveTransform(attributes, property.toLowerCase())-}--;// CONCATENATED MODULE: ./node_modules/property-information/lib/xmlns.js----const xmlns = create({- space: 'xmlns',- attributes: {xmlnsxlink: 'xmlns:xlink'},- transform: caseInsensitiveTransform,- properties: {xmlns: null, xmlnsXLink: null}-})--;// CONCATENATED MODULE: ./node_modules/property-information/lib/aria.js----const aria = create({- transform(_, prop) {- return prop === 'role' ? prop : 'aria-' + prop.slice(4).toLowerCase()- },- properties: {- ariaActiveDescendant: null,- ariaAtomic: booleanish,- ariaAutoComplete: null,- ariaBusy: booleanish,- ariaChecked: booleanish,- ariaColCount: number,- ariaColIndex: number,- ariaColSpan: number,- ariaControls: spaceSeparated,- ariaCurrent: null,- ariaDescribedBy: spaceSeparated,- ariaDetails: null,- ariaDisabled: booleanish,- ariaDropEffect: spaceSeparated,- ariaErrorMessage: null,- ariaExpanded: booleanish,- ariaFlowTo: spaceSeparated,- ariaGrabbed: booleanish,- ariaHasPopup: null,- ariaHidden: booleanish,- ariaInvalid: null,- ariaKeyShortcuts: null,- ariaLabel: null,- ariaLabelledBy: spaceSeparated,- ariaLevel: number,- ariaLive: null,- ariaModal: booleanish,- ariaMultiLine: booleanish,- ariaMultiSelectable: booleanish,- ariaOrientation: null,- ariaOwns: spaceSeparated,- ariaPlaceholder: null,- ariaPosInSet: number,- ariaPressed: booleanish,- ariaReadOnly: booleanish,- ariaRelevant: null,- ariaRequired: booleanish,- ariaRoleDescription: spaceSeparated,- ariaRowCount: number,- ariaRowIndex: number,- ariaRowSpan: number,- ariaSelected: booleanish,- ariaSetSize: number,- ariaSort: null,- ariaValueMax: number,- ariaValueMin: number,- ariaValueNow: number,- ariaValueText: null,- role: null- }-})--;// CONCATENATED MODULE: ./node_modules/property-information/lib/html.js-----const html_html = create({- space: 'html',- attributes: {- acceptcharset: 'accept-charset',- classname: 'class',- htmlfor: 'for',- httpequiv: 'http-equiv'- },- transform: caseInsensitiveTransform,- mustUseProperty: ['checked', 'multiple', 'muted', 'selected'],- properties: {- // Standard Properties.- abbr: null,- accept: commaSeparated,- acceptCharset: spaceSeparated,- accessKey: spaceSeparated,- action: null,- allow: null,- allowFullScreen: types_boolean,- allowPaymentRequest: types_boolean,- allowUserMedia: types_boolean,- alt: null,- as: null,- async: types_boolean,- autoCapitalize: null,- autoComplete: spaceSeparated,- autoFocus: types_boolean,- autoPlay: types_boolean,- blocking: spaceSeparated,- capture: types_boolean,- charSet: null,- checked: types_boolean,- cite: null,- className: spaceSeparated,- cols: number,- colSpan: null,- content: null,- contentEditable: booleanish,- controls: types_boolean,- controlsList: spaceSeparated,- coords: number | commaSeparated,- crossOrigin: null,- data: null,- dateTime: null,- decoding: null,- default: types_boolean,- defer: types_boolean,- dir: null,- dirName: null,- disabled: types_boolean,- download: overloadedBoolean,- draggable: booleanish,- encType: null,- enterKeyHint: null,- fetchPriority: null,- form: null,- formAction: null,- formEncType: null,- formMethod: null,- formNoValidate: types_boolean,- formTarget: null,- headers: spaceSeparated,- height: number,- hidden: types_boolean,- high: number,- href: null,- hrefLang: null,- htmlFor: spaceSeparated,- httpEquiv: spaceSeparated,- id: null,- imageSizes: null,- imageSrcSet: null,- inert: types_boolean,- inputMode: null,- integrity: null,- is: null,- isMap: types_boolean,- itemId: null,- itemProp: spaceSeparated,- itemRef: spaceSeparated,- itemScope: types_boolean,- itemType: spaceSeparated,- kind: null,- label: null,- lang: null,- language: null,- list: null,- loading: null,- loop: types_boolean,- low: number,- manifest: null,- max: null,- maxLength: number,- media: null,- method: null,- min: null,- minLength: number,- multiple: types_boolean,- muted: types_boolean,- name: null,- nonce: null,- noModule: types_boolean,- noValidate: types_boolean,- onAbort: null,- onAfterPrint: null,- onAuxClick: null,- onBeforeMatch: null,- onBeforePrint: null,- onBeforeUnload: null,- onBlur: null,- onCancel: null,- onCanPlay: null,- onCanPlayThrough: null,- onChange: null,- onClick: null,- onClose: null,- onContextLost: null,- onContextMenu: null,- onContextRestored: null,- onCopy: null,- onCueChange: null,- onCut: null,- onDblClick: null,- onDrag: null,- onDragEnd: null,- onDragEnter: null,- onDragExit: null,- onDragLeave: null,- onDragOver: null,- onDragStart: null,- onDrop: null,- onDurationChange: null,- onEmptied: null,- onEnded: null,- onError: null,- onFocus: null,- onFormData: null,- onHashChange: null,- onInput: null,- onInvalid: null,- onKeyDown: null,- onKeyPress: null,- onKeyUp: null,- onLanguageChange: null,- onLoad: null,- onLoadedData: null,- onLoadedMetadata: null,- onLoadEnd: null,- onLoadStart: null,- onMessage: null,- onMessageError: null,- onMouseDown: null,- onMouseEnter: null,- onMouseLeave: null,- onMouseMove: null,- onMouseOut: null,- onMouseOver: null,- onMouseUp: null,- onOffline: null,- onOnline: null,- onPageHide: null,- onPageShow: null,- onPaste: null,- onPause: null,- onPlay: null,- onPlaying: null,- onPopState: null,- onProgress: null,- onRateChange: null,- onRejectionHandled: null,- onReset: null,- onResize: null,- onScroll: null,- onScrollEnd: null,- onSecurityPolicyViolation: null,- onSeeked: null,- onSeeking: null,- onSelect: null,- onSlotChange: null,- onStalled: null,- onStorage: null,- onSubmit: null,- onSuspend: null,- onTimeUpdate: null,- onToggle: null,- onUnhandledRejection: null,- onUnload: null,- onVolumeChange: null,- onWaiting: null,- onWheel: null,- open: types_boolean,- optimum: number,- pattern: null,- ping: spaceSeparated,- placeholder: null,- playsInline: types_boolean,- popover: null,- popoverTarget: null,- popoverTargetAction: null,- poster: null,- preload: null,- readOnly: types_boolean,- referrerPolicy: null,- rel: spaceSeparated,- required: types_boolean,- reversed: types_boolean,- rows: number,- rowSpan: number,- sandbox: spaceSeparated,- scope: null,- scoped: types_boolean,- seamless: types_boolean,- selected: types_boolean,- shape: null,- size: number,- sizes: null,- slot: null,- span: number,- spellCheck: booleanish,- src: null,- srcDoc: null,- srcLang: null,- srcSet: null,- start: number,- step: null,- style: null,- tabIndex: number,- target: null,- title: null,- translate: null,- type: null,- typeMustMatch: types_boolean,- useMap: null,- value: booleanish,- width: number,- wrap: null,-- // Legacy.- // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis- align: null, // Several. Use CSS `text-align` instead,- aLink: null, // `<body>`. Use CSS `a:active {color}` instead- archive: spaceSeparated, // `<object>`. List of URIs to archives- axis: null, // `<td>` and `<th>`. Use `scope` on `<th>`- background: null, // `<body>`. Use CSS `background-image` instead- bgColor: null, // `<body>` and table elements. Use CSS `background-color` instead- border: number, // `<table>`. Use CSS `border-width` instead,- borderColor: null, // `<table>`. Use CSS `border-color` instead,- bottomMargin: number, // `<body>`- cellPadding: null, // `<table>`- cellSpacing: null, // `<table>`- char: null, // Several table elements. When `align=char`, sets the character to align on- charOff: null, // Several table elements. When `char`, offsets the alignment- classId: null, // `<object>`- clear: null, // `<br>`. Use CSS `clear` instead- code: null, // `<object>`- codeBase: null, // `<object>`- codeType: null, // `<object>`- color: null, // `<font>` and `<hr>`. Use CSS instead- compact: types_boolean, // Lists. Use CSS to reduce space between items instead- declare: types_boolean, // `<object>`- event: null, // `<script>`- face: null, // `<font>`. Use CSS instead- frame: null, // `<table>`- frameBorder: null, // `<iframe>`. Use CSS `border` instead- hSpace: number, // `<img>` and `<object>`- leftMargin: number, // `<body>`- link: null, // `<body>`. Use CSS `a:link {color: *}` instead- longDesc: null, // `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`- lowSrc: null, // `<img>`. Use a `<picture>`- marginHeight: number, // `<body>`- marginWidth: number, // `<body>`- noResize: types_boolean, // `<frame>`- noHref: types_boolean, // `<area>`. Use no href instead of an explicit `nohref`- noShade: types_boolean, // `<hr>`. Use background-color and height instead of borders- noWrap: types_boolean, // `<td>` and `<th>`- object: null, // `<applet>`- profile: null, // `<head>`- prompt: null, // `<isindex>`- rev: null, // `<link>`- rightMargin: number, // `<body>`- rules: null, // `<table>`- scheme: null, // `<meta>`- scrolling: booleanish, // `<frame>`. Use overflow in the child context- standby: null, // `<object>`- summary: null, // `<table>`- text: null, // `<body>`. Use CSS `color` instead- topMargin: number, // `<body>`- valueType: null, // `<param>`- version: null, // `<html>`. Use a doctype.- vAlign: null, // Several. Use CSS `vertical-align` instead- vLink: null, // `<body>`. Use CSS `a:visited {color}` instead- vSpace: number, // `<img>` and `<object>`-- // Non-standard Properties.- allowTransparency: null,- autoCorrect: null,- autoSave: null,- disablePictureInPicture: types_boolean,- disableRemotePlayback: types_boolean,- prefix: null,- property: null,- results: number,- security: null,- unselectable: null- }-})--;// CONCATENATED MODULE: ./node_modules/property-information/lib/svg.js-----const svg = create({- space: 'svg',- attributes: {- accentHeight: 'accent-height',- alignmentBaseline: 'alignment-baseline',- arabicForm: 'arabic-form',- baselineShift: 'baseline-shift',- capHeight: 'cap-height',- className: 'class',- clipPath: 'clip-path',- clipRule: 'clip-rule',- colorInterpolation: 'color-interpolation',- colorInterpolationFilters: 'color-interpolation-filters',- colorProfile: 'color-profile',- colorRendering: 'color-rendering',- crossOrigin: 'crossorigin',- dataType: 'datatype',- dominantBaseline: 'dominant-baseline',- enableBackground: 'enable-background',- fillOpacity: 'fill-opacity',- fillRule: 'fill-rule',- floodColor: 'flood-color',- floodOpacity: 'flood-opacity',- fontFamily: 'font-family',- fontSize: 'font-size',- fontSizeAdjust: 'font-size-adjust',- fontStretch: 'font-stretch',- fontStyle: 'font-style',- fontVariant: 'font-variant',- fontWeight: 'font-weight',- glyphName: 'glyph-name',- glyphOrientationHorizontal: 'glyph-orientation-horizontal',- glyphOrientationVertical: 'glyph-orientation-vertical',- hrefLang: 'hreflang',- horizAdvX: 'horiz-adv-x',- horizOriginX: 'horiz-origin-x',- horizOriginY: 'horiz-origin-y',- imageRendering: 'image-rendering',- letterSpacing: 'letter-spacing',- lightingColor: 'lighting-color',- markerEnd: 'marker-end',- markerMid: 'marker-mid',- markerStart: 'marker-start',- navDown: 'nav-down',- navDownLeft: 'nav-down-left',- navDownRight: 'nav-down-right',- navLeft: 'nav-left',- navNext: 'nav-next',- navPrev: 'nav-prev',- navRight: 'nav-right',- navUp: 'nav-up',- navUpLeft: 'nav-up-left',- navUpRight: 'nav-up-right',- onAbort: 'onabort',- onActivate: 'onactivate',- onAfterPrint: 'onafterprint',- onBeforePrint: 'onbeforeprint',- onBegin: 'onbegin',- onCancel: 'oncancel',- onCanPlay: 'oncanplay',- onCanPlayThrough: 'oncanplaythrough',- onChange: 'onchange',- onClick: 'onclick',- onClose: 'onclose',- onCopy: 'oncopy',- onCueChange: 'oncuechange',- onCut: 'oncut',- onDblClick: 'ondblclick',- onDrag: 'ondrag',- onDragEnd: 'ondragend',- onDragEnter: 'ondragenter',- onDragExit: 'ondragexit',- onDragLeave: 'ondragleave',- onDragOver: 'ondragover',- onDragStart: 'ondragstart',- onDrop: 'ondrop',- onDurationChange: 'ondurationchange',- onEmptied: 'onemptied',- onEnd: 'onend',- onEnded: 'onended',- onError: 'onerror',- onFocus: 'onfocus',- onFocusIn: 'onfocusin',- onFocusOut: 'onfocusout',- onHashChange: 'onhashchange',- onInput: 'oninput',- onInvalid: 'oninvalid',- onKeyDown: 'onkeydown',- onKeyPress: 'onkeypress',- onKeyUp: 'onkeyup',- onLoad: 'onload',- onLoadedData: 'onloadeddata',- onLoadedMetadata: 'onloadedmetadata',- onLoadStart: 'onloadstart',- onMessage: 'onmessage',- onMouseDown: 'onmousedown',- onMouseEnter: 'onmouseenter',- onMouseLeave: 'onmouseleave',- onMouseMove: 'onmousemove',- onMouseOut: 'onmouseout',- onMouseOver: 'onmouseover',- onMouseUp: 'onmouseup',- onMouseWheel: 'onmousewheel',- onOffline: 'onoffline',- onOnline: 'ononline',- onPageHide: 'onpagehide',- onPageShow: 'onpageshow',- onPaste: 'onpaste',- onPause: 'onpause',- onPlay: 'onplay',- onPlaying: 'onplaying',- onPopState: 'onpopstate',- onProgress: 'onprogress',- onRateChange: 'onratechange',- onRepeat: 'onrepeat',- onReset: 'onreset',- onResize: 'onresize',- onScroll: 'onscroll',- onSeeked: 'onseeked',- onSeeking: 'onseeking',- onSelect: 'onselect',- onShow: 'onshow',- onStalled: 'onstalled',- onStorage: 'onstorage',- onSubmit: 'onsubmit',- onSuspend: 'onsuspend',- onTimeUpdate: 'ontimeupdate',- onToggle: 'ontoggle',- onUnload: 'onunload',- onVolumeChange: 'onvolumechange',- onWaiting: 'onwaiting',- onZoom: 'onzoom',- overlinePosition: 'overline-position',- overlineThickness: 'overline-thickness',- paintOrder: 'paint-order',- panose1: 'panose-1',- pointerEvents: 'pointer-events',- referrerPolicy: 'referrerpolicy',- renderingIntent: 'rendering-intent',- shapeRendering: 'shape-rendering',- stopColor: 'stop-color',- stopOpacity: 'stop-opacity',- strikethroughPosition: 'strikethrough-position',- strikethroughThickness: 'strikethrough-thickness',- strokeDashArray: 'stroke-dasharray',- strokeDashOffset: 'stroke-dashoffset',- strokeLineCap: 'stroke-linecap',- strokeLineJoin: 'stroke-linejoin',- strokeMiterLimit: 'stroke-miterlimit',- strokeOpacity: 'stroke-opacity',- strokeWidth: 'stroke-width',- tabIndex: 'tabindex',- textAnchor: 'text-anchor',- textDecoration: 'text-decoration',- textRendering: 'text-rendering',- transformOrigin: 'transform-origin',- typeOf: 'typeof',- underlinePosition: 'underline-position',- underlineThickness: 'underline-thickness',- unicodeBidi: 'unicode-bidi',- unicodeRange: 'unicode-range',- unitsPerEm: 'units-per-em',- vAlphabetic: 'v-alphabetic',- vHanging: 'v-hanging',- vIdeographic: 'v-ideographic',- vMathematical: 'v-mathematical',- vectorEffect: 'vector-effect',- vertAdvY: 'vert-adv-y',- vertOriginX: 'vert-origin-x',- vertOriginY: 'vert-origin-y',- wordSpacing: 'word-spacing',- writingMode: 'writing-mode',- xHeight: 'x-height',- // These were camelcased in Tiny. Now lowercased in SVG 2- playbackOrder: 'playbackorder',- timelineBegin: 'timelinebegin'- },- transform: caseSensitiveTransform,- properties: {- about: commaOrSpaceSeparated,- accentHeight: number,- accumulate: null,- additive: null,- alignmentBaseline: null,- alphabetic: number,- amplitude: number,- arabicForm: null,- ascent: number,- attributeName: null,- attributeType: null,- azimuth: number,- bandwidth: null,- baselineShift: null,- baseFrequency: null,- baseProfile: null,- bbox: null,- begin: null,- bias: number,- by: null,- calcMode: null,- capHeight: number,- className: spaceSeparated,- clip: null,- clipPath: null,- clipPathUnits: null,- clipRule: null,- color: null,- colorInterpolation: null,- colorInterpolationFilters: null,- colorProfile: null,- colorRendering: null,- content: null,- contentScriptType: null,- contentStyleType: null,- crossOrigin: null,- cursor: null,- cx: null,- cy: null,- d: null,- dataType: null,- defaultAction: null,- descent: number,- diffuseConstant: number,- direction: null,- display: null,- dur: null,- divisor: number,- dominantBaseline: null,- download: types_boolean,- dx: null,- dy: null,- edgeMode: null,- editable: null,- elevation: number,- enableBackground: null,- end: null,- event: null,- exponent: number,- externalResourcesRequired: null,- fill: null,- fillOpacity: number,- fillRule: null,- filter: null,- filterRes: null,- filterUnits: null,- floodColor: null,- floodOpacity: null,- focusable: null,- focusHighlight: null,- fontFamily: null,- fontSize: null,- fontSizeAdjust: null,- fontStretch: null,- fontStyle: null,- fontVariant: null,- fontWeight: null,- format: null,- fr: null,- from: null,- fx: null,- fy: null,- g1: commaSeparated,- g2: commaSeparated,- glyphName: commaSeparated,- glyphOrientationHorizontal: null,- glyphOrientationVertical: null,- glyphRef: null,- gradientTransform: null,- gradientUnits: null,- handler: null,- hanging: number,- hatchContentUnits: null,- hatchUnits: null,- height: null,- href: null,- hrefLang: null,- horizAdvX: number,- horizOriginX: number,- horizOriginY: number,- id: null,- ideographic: number,- imageRendering: null,- initialVisibility: null,- in: null,- in2: null,- intercept: number,- k: number,- k1: number,- k2: number,- k3: number,- k4: number,- kernelMatrix: commaOrSpaceSeparated,- kernelUnitLength: null,- keyPoints: null, // SEMI_COLON_SEPARATED- keySplines: null, // SEMI_COLON_SEPARATED- keyTimes: null, // SEMI_COLON_SEPARATED- kerning: null,- lang: null,- lengthAdjust: null,- letterSpacing: null,- lightingColor: null,- limitingConeAngle: number,- local: null,- markerEnd: null,- markerMid: null,- markerStart: null,- markerHeight: null,- markerUnits: null,- markerWidth: null,- mask: null,- maskContentUnits: null,- maskUnits: null,- mathematical: null,- max: null,- media: null,- mediaCharacterEncoding: null,- mediaContentEncodings: null,- mediaSize: number,- mediaTime: null,- method: null,- min: null,- mode: null,- name: null,- navDown: null,- navDownLeft: null,- navDownRight: null,- navLeft: null,- navNext: null,- navPrev: null,- navRight: null,- navUp: null,- navUpLeft: null,- navUpRight: null,- numOctaves: null,- observer: null,- offset: null,- onAbort: null,- onActivate: null,- onAfterPrint: null,- onBeforePrint: null,- onBegin: null,- onCancel: null,- onCanPlay: null,- onCanPlayThrough: null,- onChange: null,- onClick: null,- onClose: null,- onCopy: null,- onCueChange: null,- onCut: null,- onDblClick: null,- onDrag: null,- onDragEnd: null,- onDragEnter: null,- onDragExit: null,- onDragLeave: null,- onDragOver: null,- onDragStart: null,- onDrop: null,- onDurationChange: null,- onEmptied: null,- onEnd: null,- onEnded: null,- onError: null,- onFocus: null,- onFocusIn: null,- onFocusOut: null,- onHashChange: null,- onInput: null,- onInvalid: null,- onKeyDown: null,- onKeyPress: null,- onKeyUp: null,- onLoad: null,- onLoadedData: null,- onLoadedMetadata: null,- onLoadStart: null,- onMessage: null,- onMouseDown: null,- onMouseEnter: null,- onMouseLeave: null,- onMouseMove: null,- onMouseOut: null,- onMouseOver: null,- onMouseUp: null,- onMouseWheel: null,- onOffline: null,- onOnline: null,- onPageHide: null,- onPageShow: null,- onPaste: null,- onPause: null,- onPlay: null,- onPlaying: null,- onPopState: null,- onProgress: null,- onRateChange: null,- onRepeat: null,- onReset: null,- onResize: null,- onScroll: null,- onSeeked: null,- onSeeking: null,- onSelect: null,- onShow: null,- onStalled: null,- onStorage: null,- onSubmit: null,- onSuspend: null,- onTimeUpdate: null,- onToggle: null,- onUnload: null,- onVolumeChange: null,- onWaiting: null,- onZoom: null,- opacity: null,- operator: null,- order: null,- orient: null,- orientation: null,- origin: null,- overflow: null,- overlay: null,- overlinePosition: number,- overlineThickness: number,- paintOrder: null,- panose1: null,- path: null,- pathLength: number,- patternContentUnits: null,- patternTransform: null,- patternUnits: null,- phase: null,- ping: spaceSeparated,- pitch: null,- playbackOrder: null,- pointerEvents: null,- points: null,- pointsAtX: number,- pointsAtY: number,- pointsAtZ: number,- preserveAlpha: null,- preserveAspectRatio: null,- primitiveUnits: null,- propagate: null,- property: commaOrSpaceSeparated,- r: null,- radius: null,- referrerPolicy: null,- refX: null,- refY: null,- rel: commaOrSpaceSeparated,- rev: commaOrSpaceSeparated,- renderingIntent: null,- repeatCount: null,- repeatDur: null,- requiredExtensions: commaOrSpaceSeparated,- requiredFeatures: commaOrSpaceSeparated,- requiredFonts: commaOrSpaceSeparated,- requiredFormats: commaOrSpaceSeparated,- resource: null,- restart: null,- result: null,- rotate: null,- rx: null,- ry: null,- scale: null,- seed: null,- shapeRendering: null,- side: null,- slope: null,- snapshotTime: null,- specularConstant: number,- specularExponent: number,- spreadMethod: null,- spacing: null,- startOffset: null,- stdDeviation: null,- stemh: null,- stemv: null,- stitchTiles: null,- stopColor: null,- stopOpacity: null,- strikethroughPosition: number,- strikethroughThickness: number,- string: null,- stroke: null,- strokeDashArray: commaOrSpaceSeparated,- strokeDashOffset: null,- strokeLineCap: null,- strokeLineJoin: null,- strokeMiterLimit: number,- strokeOpacity: number,- strokeWidth: null,- style: null,- surfaceScale: number,- syncBehavior: null,- syncBehaviorDefault: null,- syncMaster: null,- syncTolerance: null,- syncToleranceDefault: null,- systemLanguage: commaOrSpaceSeparated,- tabIndex: number,- tableValues: null,- target: null,- targetX: number,- targetY: number,- textAnchor: null,- textDecoration: null,- textRendering: null,- textLength: null,- timelineBegin: null,- title: null,- transformBehavior: null,- type: null,- typeOf: commaOrSpaceSeparated,- to: null,- transform: null,- transformOrigin: null,- u1: null,- u2: null,- underlinePosition: number,- underlineThickness: number,- unicode: null,- unicodeBidi: null,- unicodeRange: null,- unitsPerEm: number,- values: null,- vAlphabetic: number,- vMathematical: number,- vectorEffect: null,- vHanging: number,- vIdeographic: number,- version: null,- vertAdvY: number,- vertOriginX: number,- vertOriginY: number,- viewBox: null,- viewTarget: null,- visibility: null,- width: null,- widths: null,- wordSpacing: null,- writingMode: null,- x: null,- x1: null,- x2: null,- xChannelSelector: null,- xHeight: number,- y: null,- y1: null,- y2: null,- yChannelSelector: null,- z: null,- zoomAndPan: null- }-})--;// CONCATENATED MODULE: ./node_modules/property-information/index.js-/**- * @typedef {import('./lib/util/info.js').Info} Info- * @typedef {import('./lib/util/schema.js').Schema} Schema- */-------------const property_information_html = merge([xml, xlink, xmlns, aria, html_html], 'html')-const property_information_svg = merge([xml, xlink, xmlns, aria, svg], 'svg')--;// CONCATENATED MODULE: ./node_modules/react-markdown/lib/rehype-filter.js---/**- * @typedef {import('unist').Node} Node- * @typedef {import('hast').Root} Root- * @typedef {import('hast').Element} Element- *- * @callback AllowElement- * @param {Element} element- * @param {number} index- * @param {Element|Root} parent- * @returns {boolean|undefined}- *- * @typedef Options- * @property {Array<string>} [allowedElements]- * @property {Array<string>} [disallowedElements=[]]- * @property {AllowElement} [allowElement]- * @property {boolean} [unwrapDisallowed=false]- */--/**- * @type {import('unified').Plugin<[Options], Root>}- */-function rehypeFilter(options) {- if (options.allowedElements && options.disallowedElements) {- throw new TypeError(- 'Only one of `allowedElements` and `disallowedElements` should be defined'- )- }-- if (- options.allowedElements ||- options.disallowedElements ||- options.allowElement- ) {- return (tree) => {- visit(tree, 'element', (node, index, parent_) => {- const parent = /** @type {Element|Root} */ (parent_)- /** @type {boolean|undefined} */- let remove-- if (options.allowedElements) {- remove = !options.allowedElements.includes(node.tagName)- } else if (options.disallowedElements) {- remove = options.disallowedElements.includes(node.tagName)- }-- if (!remove && options.allowElement && typeof index === 'number') {- remove = !options.allowElement(node, index, parent)- }-- if (remove && typeof index === 'number') {- if (options.unwrapDisallowed && node.children) {- parent.children.splice(index, 1, ...node.children)- } else {- parent.children.splice(index, 1)- }-- return index- }-- return undefined- })- }- }-}--// EXTERNAL MODULE: ./node_modules/react-markdown/node_modules/react-is/index.js-var node_modules_react_is = __webpack_require__(143);-;// CONCATENATED MODULE: ./node_modules/hast-util-whitespace/index.js-/**- * Check if the given value is *inter-element whitespace*.- *- * @param {unknown} thing- * Thing to check (typically `Node` or `string`).- * @returns {boolean}- * Whether the `value` is inter-element whitespace (`boolean`): consisting of- * zero or more of space, tab (`\t`), line feed (`\n`), carriage return- * (`\r`), or form feed (`\f`).- * If a node is passed it must be a `Text` node, whose `value` field is- * checked.- */-function whitespace(thing) {- /** @type {string} */- const value =- // @ts-expect-error looks like a node.- thing && typeof thing === 'object' && thing.type === 'text'- ? // @ts-expect-error looks like a text.- thing.value || ''- : thing-- // HTML whitespace expression.- // See <https://infra.spec.whatwg.org/#ascii-whitespace>.- return typeof value === 'string' && value.replace(/[ \t\n\f\r]/g, '') === ''-}--;// CONCATENATED MODULE: ./node_modules/property-information/lib/find.js-/**- * @typedef {import('./util/schema.js').Schema} Schema- */------const valid = /^data[-\w.:]+$/i-const find_dash = /-[a-z]/g-const cap = /[A-Z]/g--/**- * @param {Schema} schema- * @param {string} value- * @returns {Info}- */-function find(schema, value) {- const normal = normalize_normalize(value)- let prop = value- let Type = Info-- if (normal in schema.normal) {- return schema.property[schema.normal[normal]]- }-- if (normal.length > 4 && normal.slice(0, 4) === 'data' && valid.test(value)) {- // Attribute or property.- if (value.charAt(4) === '-') {- // Turn it into a property.- const rest = value.slice(5).replace(find_dash, camelcase)- prop = 'data' + rest.charAt(0).toUpperCase() + rest.slice(1)- } else {- // Turn it into an attribute.- const rest = value.slice(4)-- if (!find_dash.test(rest)) {- let dashes = rest.replace(cap, kebab)-- if (dashes.charAt(0) !== '-') {- dashes = '-' + dashes- }-- value = 'data' + dashes- }- }-- Type = DefinedInfo- }-- return new Type(prop, value)-}--/**- * @param {string} $0- * @returns {string}- */-function kebab($0) {- return '-' + $0.toLowerCase()-}--/**- * @param {string} $0- * @returns {string}- */-function camelcase($0) {- return $0.charAt(1).toUpperCase()-}--;// CONCATENATED MODULE: ./node_modules/property-information/lib/hast-to-react.js-/**- * `hast` is close to `React`, but differs in a couple of cases.- *- * To get a React property from a hast property, check if it is in- * `hastToReact`, if it is, then use the corresponding value,- * otherwise, use the hast property.- *- * @type {Record<string, string>}- */-const hastToReact = {- classId: 'classID',- dataType: 'datatype',- itemId: 'itemID',- strokeDashArray: 'strokeDasharray',- strokeDashOffset: 'strokeDashoffset',- strokeLineCap: 'strokeLinecap',- strokeLineJoin: 'strokeLinejoin',- strokeMiterLimit: 'strokeMiterlimit',- typeOf: 'typeof',- xLinkActuate: 'xlinkActuate',- xLinkArcRole: 'xlinkArcrole',- xLinkHref: 'xlinkHref',- xLinkRole: 'xlinkRole',- xLinkShow: 'xlinkShow',- xLinkTitle: 'xlinkTitle',- xLinkType: 'xlinkType',- xmlnsXLink: 'xmlnsXlink'-}--;// CONCATENATED MODULE: ./node_modules/space-separated-tokens/index.js-/**- * Parse space-separated tokens to an array of strings.- *- * @param {string} value- * Space-separated tokens.- * @returns {Array<string>}- * List of tokens.- */-function space_separated_tokens_parse(value) {- const input = String(value || '').trim()- return input ? input.split(/[ \t\n\r\f]+/g) : []-}--/**- * Serialize an array of strings as space separated-tokens.- *- * @param {Array<string|number>} values- * List of tokens.- * @returns {string}- * Space-separated tokens.- */-function stringify(values) {- return values.join(' ').trim()-}--;// CONCATENATED MODULE: ./node_modules/comma-separated-tokens/index.js-/**- * @typedef Options- * Configuration for `stringify`.- * @property {boolean} [padLeft=true]- * Whether to pad a space before a token.- * @property {boolean} [padRight=false]- * Whether to pad a space after a token.- */--/**- * @typedef {Options} StringifyOptions- * Please use `StringifyOptions` instead.- */--/**- * Parse comma-separated tokens to an array.- *- * @param {string} value- * Comma-separated tokens.- * @returns {Array<string>}- * List of tokens.- */-function comma_separated_tokens_parse(value) {- /** @type {Array<string>} */- const tokens = []- const input = String(value || '')- let index = input.indexOf(',')- let start = 0- /** @type {boolean} */- let end = false-- while (!end) {- if (index === -1) {- index = input.length- end = true- }-- const token = input.slice(start, index).trim()-- if (token || !end) {- tokens.push(token)- }-- start = index + 1- index = input.indexOf(',', start)- }-- return tokens-}--/**- * Serialize an array of strings or numbers to comma-separated tokens.- *- * @param {Array<string|number>} values- * List of tokens.- * @param {Options} [options]- * Configuration for `stringify` (optional).- * @returns {string}- * Comma-separated tokens.- */-function comma_separated_tokens_stringify(values, options) {- const settings = options || {}-- // Ensure the last empty entry is seen.- const input = values[values.length - 1] === '' ? [...values, ''] : values-- return input- .join(- (settings.padRight ? ' ' : '') +- ',' +- (settings.padLeft === false ? '' : ' ')- )- .trim()-}--// EXTERNAL MODULE: ./node_modules/style-to-object/index.js-var style_to_object = __webpack_require__(848);-;// CONCATENATED MODULE: ./node_modules/style-to-object/index.mjs---/* harmony default export */ const node_modules_style_to_object = (style_to_object);--;// CONCATENATED MODULE: ./node_modules/react-markdown/lib/uri-transformer.js-const protocols = ['http', 'https', 'mailto', 'tel']--/**- * @param {string} uri- * @returns {string}- */-function uriTransformer(uri) {- const url = (uri || '').trim()- const first = url.charAt(0)-- if (first === '#' || first === '/') {- return url- }-- const colon = url.indexOf(':')- if (colon === -1) {- return url- }-- let index = -1-- while (++index < protocols.length) {- const protocol = protocols[index]-- if (- colon === protocol.length &&- url.slice(0, protocol.length).toLowerCase() === protocol- ) {- return url- }- }-- index = url.indexOf('?')- if (index !== -1 && colon > index) {- return url- }-- index = url.indexOf('#')- if (index !== -1 && colon > index) {- return url- }-- // eslint-disable-next-line no-script-url- return 'javascript:void(0)'-}--;// CONCATENATED MODULE: ./node_modules/react-markdown/lib/ast-to-react.js-/**- * @template T- * @typedef {import('react').ComponentType<T>} ComponentType<T>- */--/**- * @template {import('react').ElementType} T- * @typedef {import('react').ComponentPropsWithoutRef<T>} ComponentPropsWithoutRef<T>- */--/**- * @typedef {import('react').ReactNode} ReactNode- * @typedef {import('unist').Position} Position- * @typedef {import('hast').Element} Element- * @typedef {import('hast').ElementContent} ElementContent- * @typedef {import('hast').Root} Root- * @typedef {import('hast').Text} Text- * @typedef {import('hast').Comment} Comment- * @typedef {import('hast').DocType} Doctype- * @typedef {import('property-information').Info} Info- * @typedef {import('property-information').Schema} Schema- * @typedef {import('./complex-types.js').ReactMarkdownProps} ReactMarkdownProps- *- * @typedef Raw- * @property {'raw'} type- * @property {string} value- *- * @typedef Context- * @property {Options} options- * @property {Schema} schema- * @property {number} listDepth- *- * @callback TransformLink- * @param {string} href- * @param {Array<ElementContent>} children- * @param {string?} title- * @returns {string}- *- * @callback TransformImage- * @param {string} src- * @param {string} alt- * @param {string?} title- * @returns {string}- *- * @typedef {import('react').HTMLAttributeAnchorTarget} TransformLinkTargetType- *- * @callback TransformLinkTarget- * @param {string} href- * @param {Array<ElementContent>} children- * @param {string?} title- * @returns {TransformLinkTargetType|undefined}- *- * @typedef {keyof JSX.IntrinsicElements} ReactMarkdownNames- *- * To do: is `data-sourcepos` typeable?- *- * @typedef {ComponentPropsWithoutRef<'code'> & ReactMarkdownProps & {inline?: boolean}} CodeProps- * @typedef {ComponentPropsWithoutRef<'h1'> & ReactMarkdownProps & {level: number}} HeadingProps- * @typedef {ComponentPropsWithoutRef<'li'> & ReactMarkdownProps & {checked: boolean|null, index: number, ordered: boolean}} LiProps- * @typedef {ComponentPropsWithoutRef<'ol'> & ReactMarkdownProps & {depth: number, ordered: true}} OrderedListProps- * @typedef {ComponentPropsWithoutRef<'td'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: false}} TableDataCellProps- * @typedef {ComponentPropsWithoutRef<'th'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: true}} TableHeaderCellProps- * @typedef {ComponentPropsWithoutRef<'tr'> & ReactMarkdownProps & {isHeader: boolean}} TableRowProps- * @typedef {ComponentPropsWithoutRef<'ul'> & ReactMarkdownProps & {depth: number, ordered: false}} UnorderedListProps- *- * @typedef {ComponentType<CodeProps>} CodeComponent- * @typedef {ComponentType<HeadingProps>} HeadingComponent- * @typedef {ComponentType<LiProps>} LiComponent- * @typedef {ComponentType<OrderedListProps>} OrderedListComponent- * @typedef {ComponentType<TableDataCellProps>} TableDataCellComponent- * @typedef {ComponentType<TableHeaderCellProps>} TableHeaderCellComponent- * @typedef {ComponentType<TableRowProps>} TableRowComponent- * @typedef {ComponentType<UnorderedListProps>} UnorderedListComponent- *- * @typedef SpecialComponents- * @property {CodeComponent|ReactMarkdownNames} code- * @property {HeadingComponent|ReactMarkdownNames} h1- * @property {HeadingComponent|ReactMarkdownNames} h2- * @property {HeadingComponent|ReactMarkdownNames} h3- * @property {HeadingComponent|ReactMarkdownNames} h4- * @property {HeadingComponent|ReactMarkdownNames} h5- * @property {HeadingComponent|ReactMarkdownNames} h6- * @property {LiComponent|ReactMarkdownNames} li- * @property {OrderedListComponent|ReactMarkdownNames} ol- * @property {TableDataCellComponent|ReactMarkdownNames} td- * @property {TableHeaderCellComponent|ReactMarkdownNames} th- * @property {TableRowComponent|ReactMarkdownNames} tr- * @property {UnorderedListComponent|ReactMarkdownNames} ul- *- * @typedef {Partial<Omit<import('./complex-types.js').NormalComponents, keyof SpecialComponents> & SpecialComponents>} Components- *- * @typedef Options- * @property {boolean} [sourcePos=false]- * @property {boolean} [rawSourcePos=false]- * @property {boolean} [skipHtml=false]- * @property {boolean} [includeElementIndex=false]- * @property {null|false|TransformLink} [transformLinkUri]- * @property {TransformImage} [transformImageUri]- * @property {TransformLinkTargetType|TransformLinkTarget} [linkTarget]- * @property {Components} [components]- */-----------const ast_to_react_own = {}.hasOwnProperty--// The table-related elements that must not contain whitespace text according-// to React.-const tableElements = new Set(['table', 'thead', 'tbody', 'tfoot', 'tr'])--/**- * @param {Context} context- * @param {Element|Root} node- */-function childrenToReact(context, node) {- /** @type {Array<ReactNode>} */- const children = []- let childIndex = -1- /** @type {Comment|Doctype|Element|Raw|Text} */- let child-- while (++childIndex < node.children.length) {- child = node.children[childIndex]-- if (child.type === 'element') {- children.push(toReact(context, child, childIndex, node))- } else if (child.type === 'text') {- // Currently, a warning is triggered by react for *any* white space in- // tables.- // So we drop it.- // See: <https://github.com/facebook/react/pull/7081>.- // See: <https://github.com/facebook/react/pull/7515>.- // See: <https://github.com/remarkjs/remark-react/issues/64>.- // See: <https://github.com/remarkjs/react-markdown/issues/576>.- if (- node.type !== 'element' ||- !tableElements.has(node.tagName) ||- !whitespace(child)- ) {- children.push(child.value)- }- } else if (child.type === 'raw' && !context.options.skipHtml) {- // Default behavior is to show (encoded) HTML.- children.push(child.value)- }- }-- return children-}--/**- * @param {Context} context- * @param {Element} node- * @param {number} index- * @param {Element|Root} parent- */-function toReact(context, node, index, parent) {- const options = context.options- const transform =- options.transformLinkUri === undefined- ? uriTransformer- : options.transformLinkUri- const parentSchema = context.schema- /** @type {ReactMarkdownNames} */- // @ts-expect-error assume a known HTML/SVG element.- const name = node.tagName- /** @type {Record<string, unknown>} */- const properties = {}- let schema = parentSchema- /** @type {string} */- let property-- if (parentSchema.space === 'html' && name === 'svg') {- schema = property_information_svg- context.schema = schema- }-- if (node.properties) {- for (property in node.properties) {- if (ast_to_react_own.call(node.properties, property)) {- addProperty(properties, property, node.properties[property], context)- }- }- }-- if (name === 'ol' || name === 'ul') {- context.listDepth++- }-- const children = childrenToReact(context, node)-- if (name === 'ol' || name === 'ul') {- context.listDepth--- }-- // Restore parent schema.- context.schema = parentSchema-- // Nodes created by plugins do not have positional info, in which case we use- // an object that matches the position interface.- const position = node.position || {- start: {line: null, column: null, offset: null},- end: {line: null, column: null, offset: null}- }- const component =- options.components && ast_to_react_own.call(options.components, name)- ? options.components[name]- : name- const basic = typeof component === 'string' || component === react.Fragment-- if (!node_modules_react_is.isValidElementType(component)) {- throw new TypeError(- `Component for name \`${name}\` not defined or is not renderable`- )- }-- properties.key = index-- if (name === 'a' && options.linkTarget) {- properties.target =- typeof options.linkTarget === 'function'- ? options.linkTarget(- String(properties.href || ''),- node.children,- typeof properties.title === 'string' ? properties.title : null- )- : options.linkTarget- }-- if (name === 'a' && transform) {- properties.href = transform(- String(properties.href || ''),- node.children,- typeof properties.title === 'string' ? properties.title : null- )- }-- if (- !basic &&- name === 'code' &&- parent.type === 'element' &&- parent.tagName !== 'pre'- ) {- properties.inline = true- }-- if (- !basic &&- (name === 'h1' ||- name === 'h2' ||- name === 'h3' ||- name === 'h4' ||- name === 'h5' ||- name === 'h6')- ) {- properties.level = Number.parseInt(name.charAt(1), 10)- }-- if (name === 'img' && options.transformImageUri) {- properties.src = options.transformImageUri(- String(properties.src || ''),- String(properties.alt || ''),- typeof properties.title === 'string' ? properties.title : null- )- }-- if (!basic && name === 'li' && parent.type === 'element') {- const input = getInputElement(node)- properties.checked =- input && input.properties ? Boolean(input.properties.checked) : null- properties.index = getElementsBeforeCount(parent, node)- properties.ordered = parent.tagName === 'ol'- }-- if (!basic && (name === 'ol' || name === 'ul')) {- properties.ordered = name === 'ol'- properties.depth = context.listDepth- }-- if (name === 'td' || name === 'th') {- if (properties.align) {- if (!properties.style) properties.style = {}- // @ts-expect-error assume `style` is an object- properties.style.textAlign = properties.align- delete properties.align- }-- if (!basic) {- properties.isHeader = name === 'th'- }- }-- if (!basic && name === 'tr' && parent.type === 'element') {- properties.isHeader = Boolean(parent.tagName === 'thead')- }-- // If `sourcePos` is given, pass source information (line/column info from markdown source).- if (options.sourcePos) {- properties['data-sourcepos'] = flattenPosition(position)- }-- if (!basic && options.rawSourcePos) {- properties.sourcePosition = node.position- }-- // If `includeElementIndex` is given, pass node index info to components.- if (!basic && options.includeElementIndex) {- properties.index = getElementsBeforeCount(parent, node)- properties.siblingCount = getElementsBeforeCount(parent)- }-- if (!basic) {- properties.node = node- }-- // Ensure no React warnings are emitted for void elements w/ children.- return children.length > 0- ? react.createElement(component, properties, children)- : react.createElement(component, properties)-}--/**- * @param {Element|Root} node- * @returns {Element?}- */-function getInputElement(node) {- let index = -1-- while (++index < node.children.length) {- const child = node.children[index]-- if (child.type === 'element' && child.tagName === 'input') {- return child- }- }-- return null-}--/**- * @param {Element|Root} parent- * @param {Element} [node]- * @returns {number}- */-function getElementsBeforeCount(parent, node) {- let index = -1- let count = 0-- while (++index < parent.children.length) {- if (parent.children[index] === node) break- if (parent.children[index].type === 'element') count++- }-- return count-}--/**- * @param {Record<string, unknown>} props- * @param {string} prop- * @param {unknown} value- * @param {Context} ctx- */-function addProperty(props, prop, value, ctx) {- const info = find(ctx.schema, prop)- let result = value-- // Ignore nullish and `NaN` values.- // eslint-disable-next-line no-self-compare- if (result === null || result === undefined || result !== result) {- return- }-- // Accept `array`.- // Most props are space-separated.- if (Array.isArray(result)) {- result = info.commaSeparated ? comma_separated_tokens_stringify(result) : stringify(result)- }-- if (info.property === 'style' && typeof result === 'string') {- result = parseStyle(result)- }-- if (info.space && info.property) {- props[- ast_to_react_own.call(hastToReact, info.property)- ? hastToReact[info.property]- : info.property- ] = result- } else if (info.attribute) {- props[info.attribute] = result- }-}--/**- * @param {string} value- * @returns {Record<string, string>}- */-function parseStyle(value) {- /** @type {Record<string, string>} */- const result = {}-- try {- node_modules_style_to_object(value, iterator)- } catch {- // Silent.- }-- return result-- /**- * @param {string} name- * @param {string} v- */- function iterator(name, v) {- const k = name.slice(0, 4) === '-ms-' ? `ms-${name.slice(4)}` : name- result[k.replace(/-([a-z])/g, styleReplacer)] = v- }-}--/**- * @param {unknown} _- * @param {string} $1- */-function styleReplacer(_, $1) {- return $1.toUpperCase()-}--/**- * @param {Position|{start: {line: null, column: null, offset: null}, end: {line: null, column: null, offset: null}}} pos- * @returns {string}- */-function flattenPosition(pos) {- return [- pos.start.line,- ':',- pos.start.column,- '-',- pos.end.line,- ':',- pos.end.column- ]- .map(String)- .join('')-}--;// CONCATENATED MODULE: ./node_modules/react-markdown/lib/react-markdown.js-/**- * @typedef {import('react').ReactNode} ReactNode- * @typedef {import('react').ReactElement<{}>} ReactElement- * @typedef {import('unified').PluggableList} PluggableList- * @typedef {import('hast').Root} Root- * @typedef {import('./rehype-filter.js').Options} FilterOptions- * @typedef {import('./ast-to-react.js').Options} TransformOptions- *- * @typedef CoreOptions- * @property {string} children- *- * @typedef PluginOptions- * @property {PluggableList} [remarkPlugins=[]]- * @property {PluggableList} [rehypePlugins=[]]- * @property {import('remark-rehype').Options | undefined} [remarkRehypeOptions={}]- *- * @typedef LayoutOptions- * @property {string} [className]- *- * @typedef {CoreOptions & PluginOptions & LayoutOptions & FilterOptions & TransformOptions} ReactMarkdownOptions- *- * @typedef Deprecation- * @property {string} id- * @property {string} [to]- */------------const react_markdown_own = {}.hasOwnProperty-const changelog =- 'https://github.com/remarkjs/react-markdown/blob/main/changelog.md'--/** @type {Record<string, Deprecation>} */-const deprecated = {- plugins: {to: 'remarkPlugins', id: 'change-plugins-to-remarkplugins'},- renderers: {to: 'components', id: 'change-renderers-to-components'},- astPlugins: {id: 'remove-buggy-html-in-markdown-parser'},- allowDangerousHtml: {id: 'remove-buggy-html-in-markdown-parser'},- escapeHtml: {id: 'remove-buggy-html-in-markdown-parser'},- source: {to: 'children', id: 'change-source-to-children'},- allowNode: {- to: 'allowElement',- id: 'replace-allownode-allowedtypes-and-disallowedtypes'- },- allowedTypes: {- to: 'allowedElements',- id: 'replace-allownode-allowedtypes-and-disallowedtypes'- },- disallowedTypes: {- to: 'disallowedElements',- id: 'replace-allownode-allowedtypes-and-disallowedtypes'- },- includeNodeIndex: {- to: 'includeElementIndex',- id: 'change-includenodeindex-to-includeelementindex'- }-}--/**- * React component to render markdown.- *- * @param {ReactMarkdownOptions} options- * @returns {ReactElement}- */-function ReactMarkdown(options) {- for (const key in deprecated) {- if (react_markdown_own.call(deprecated, key) && react_markdown_own.call(options, key)) {- const deprecation = deprecated[key]- console.warn(- `[react-markdown] Warning: please ${- deprecation.to ? `use \`${deprecation.to}\` instead of` : 'remove'- } \`${key}\` (see <${changelog}#${deprecation.id}> for more info)`- )- delete deprecated[key]- }- }-- const processor = unified()- .use(remarkParse)- .use(options.remarkPlugins || [])- .use(lib, {- ...options.remarkRehypeOptions,- allowDangerousHtml: true- })- .use(options.rehypePlugins || [])- .use(rehypeFilter, options)-- const file = new VFile()-- if (typeof options.children === 'string') {- file.value = options.children- } else if (options.children !== undefined && options.children !== null) {- console.warn(- `[react-markdown] Warning: please pass a string as \`children\` (not: \`${options.children}\`)`- )- }-- const hastNode = processor.runSync(processor.parse(file), file)-- if (hastNode.type !== 'root') {- throw new TypeError('Expected a `root` node')- }-- /** @type {ReactElement} */- let result = react.createElement(- react.Fragment,- {},- childrenToReact({options, schema: property_information_html, listDepth: 0}, hastNode)- )-- if (options.className) {- result = react.createElement('div', {className: options.className}, result)- }-- return result-}--ReactMarkdown.propTypes = {- // Core options:- children: prop_types.string,- // Layout options:- className: prop_types.string,- // Filter options:- allowElement: prop_types.func,- allowedElements: prop_types.arrayOf(prop_types.string),- disallowedElements: prop_types.arrayOf(prop_types.string),- unwrapDisallowed: prop_types.bool,- // Plugin options:- remarkPlugins: prop_types.arrayOf(- prop_types.oneOfType([- prop_types.object,- prop_types.func,- prop_types.arrayOf(- prop_types.oneOfType([- prop_types.bool,- prop_types.string,- prop_types.object,- prop_types.func,- prop_types.arrayOf(- // prettier-ignore- // type-coverage:ignore-next-line- prop_types.any- )- ])- )- ])- ),- rehypePlugins: prop_types.arrayOf(- prop_types.oneOfType([- prop_types.object,- prop_types.func,- prop_types.arrayOf(- prop_types.oneOfType([- prop_types.bool,- prop_types.string,- prop_types.object,- prop_types.func,- prop_types.arrayOf(- // prettier-ignore- // type-coverage:ignore-next-line- prop_types.any- )- ])- )- ])- ),- // Transform options:- sourcePos: prop_types.bool,- rawSourcePos: prop_types.bool,- skipHtml: prop_types.bool,- includeElementIndex: prop_types.bool,- transformLinkUri: prop_types.oneOfType([prop_types.func, prop_types.bool]),- linkTarget: prop_types.oneOfType([prop_types.func, prop_types.string]),- transformImageUri: prop_types.func,- components: prop_types.object-}--;// CONCATENATED MODULE: ./node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js-/**- * @typedef {import('micromark-util-types').Code} Code- * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord- * @typedef {import('micromark-util-types').Event} Event- * @typedef {import('micromark-util-types').Extension} Extension- * @typedef {import('micromark-util-types').Previous} Previous- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */---const wwwPrefix = {- tokenize: tokenizeWwwPrefix,- partial: true-}-const domain = {- tokenize: tokenizeDomain,- partial: true-}-const syntax_path = {- tokenize: tokenizePath,- partial: true-}-const trail = {- tokenize: tokenizeTrail,- partial: true-}-const emailDomainDotTrail = {- tokenize: tokenizeEmailDomainDotTrail,- partial: true-}-const wwwAutolink = {- tokenize: tokenizeWwwAutolink,- previous: previousWww-}-const protocolAutolink = {- tokenize: tokenizeProtocolAutolink,- previous: previousProtocol-}-const emailAutolink = {- tokenize: tokenizeEmailAutolink,- previous: previousEmail-}--/** @type {ConstructRecord} */-const syntax_text = {}--// To do: next major: expose functions that yields extension.--/**- * Extension for `micromark` that can be passed in `extensions` to enable GFM- * autolink literal syntax.- *- * @type {Extension}- */-const gfmAutolinkLiteral = {- text: syntax_text-}--/** @type {Code} */-let syntax_code = 48--// Add alphanumerics.-while (syntax_code < 123) {- syntax_text[syntax_code] = emailAutolink- syntax_code++- if (syntax_code === 58) syntax_code = 65- else if (syntax_code === 91) syntax_code = 97-}-syntax_text[43] = emailAutolink-syntax_text[45] = emailAutolink-syntax_text[46] = emailAutolink-syntax_text[95] = emailAutolink-syntax_text[72] = [emailAutolink, protocolAutolink]-syntax_text[104] = [emailAutolink, protocolAutolink]-syntax_text[87] = [emailAutolink, wwwAutolink]-syntax_text[119] = [emailAutolink, wwwAutolink]--// To do: perform email autolink literals on events, afterwards.-// That’s where `markdown-rs` and `cmark-gfm` perform it.-// It should look for `@`, then for atext backwards, and then for a label-// forwards.-// To do: `mailto:`, `xmpp:` protocol as prefix.--/**- * Email autolink literal.- *- * ```markdown- * > | a [email protected] b- * ^^^^^^^^^^^^^^^^^^^- * ```- *- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeEmailAutolink(effects, ok, nok) {- const self = this- /** @type {boolean | undefined} */- let dot- /** @type {boolean} */- let data- return start-- /**- * Start of email autolink literal.- *- * ```markdown- * > | a [email protected] b- * ^- * ```- *- * @type {State}- */- function start(code) {- if (- !gfmAtext(code) ||- !previousEmail.call(self, self.previous) ||- previousUnbalanced(self.events)- ) {- return nok(code)- }- effects.enter('literalAutolink')- effects.enter('literalAutolinkEmail')- return atext(code)- }-- /**- * In email atext.- *- * ```markdown- * > | a [email protected] b- * ^- * ```- *- * @type {State}- */- function atext(code) {- if (gfmAtext(code)) {- effects.consume(code)- return atext- }- if (code === 64) {- effects.consume(code)- return emailDomain- }- return nok(code)- }-- /**- * In email domain.- *- * The reference code is a bit overly complex as it handles the `@`, of which- * there may be just one.- * Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L318>- *- * ```markdown- * > | a [email protected] b- * ^- * ```- *- * @type {State}- */- function emailDomain(code) {- // Dot followed by alphanumerical (not `-` or `_`).- if (code === 46) {- return effects.check(- emailDomainDotTrail,- emailDomainAfter,- emailDomainDot- )(code)- }-- // Alphanumerical, `-`, and `_`.- if (code === 45 || code === 95 || asciiAlphanumeric(code)) {- data = true- effects.consume(code)- return emailDomain- }-- // To do: `/` if xmpp.-- // Note: normally we’d truncate trailing punctuation from the link.- // However, email autolink literals cannot contain any of those markers,- // except for `.`, but that can only occur if it isn’t trailing.- // So we can ignore truncating!- return emailDomainAfter(code)- }-- /**- * In email domain, on dot that is not a trail.- *- * ```markdown- * > | a [email protected] b- * ^- * ```- *- * @type {State}- */- function emailDomainDot(code) {- effects.consume(code)- dot = true- return emailDomain- }-- /**- * After email domain.- *- * ```markdown- * > | a [email protected] b- * ^- * ```- *- * @type {State}- */- function emailDomainAfter(code) {- // Domain must not be empty, must include a dot, and must end in alphabetical.- // Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L332>.- if (data && dot && asciiAlpha(self.previous)) {- effects.exit('literalAutolinkEmail')- effects.exit('literalAutolink')- return ok(code)- }- return nok(code)- }-}--/**- * `www` autolink literal.- *- * ```markdown- * > | a www.example.org b- * ^^^^^^^^^^^^^^^- * ```- *- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeWwwAutolink(effects, ok, nok) {- const self = this- return wwwStart-- /**- * Start of www autolink literal.- *- * ```markdown- * > | www.example.com/a?b#c- * ^- * ```- *- * @type {State}- */- function wwwStart(code) {- if (- (code !== 87 && code !== 119) ||- !previousWww.call(self, self.previous) ||- previousUnbalanced(self.events)- ) {- return nok(code)- }- effects.enter('literalAutolink')- effects.enter('literalAutolinkWww')- // Note: we *check*, so we can discard the `www.` we parsed.- // If it worked, we consider it as a part of the domain.- return effects.check(- wwwPrefix,- effects.attempt(domain, effects.attempt(syntax_path, wwwAfter), nok),- nok- )(code)- }-- /**- * After a www autolink literal.- *- * ```markdown- * > | www.example.com/a?b#c- * ^- * ```- *- * @type {State}- */- function wwwAfter(code) {- effects.exit('literalAutolinkWww')- effects.exit('literalAutolink')- return ok(code)- }-}--/**- * Protocol autolink literal.- *- * ```markdown- * > | a https://example.org b- * ^^^^^^^^^^^^^^^^^^^- * ```- *- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeProtocolAutolink(effects, ok, nok) {- const self = this- let buffer = ''- let seen = false- return protocolStart-- /**- * Start of protocol autolink literal.- *- * ```markdown- * > | https://example.com/a?b#c- * ^- * ```- *- * @type {State}- */- function protocolStart(code) {- if (- (code === 72 || code === 104) &&- previousProtocol.call(self, self.previous) &&- !previousUnbalanced(self.events)- ) {- effects.enter('literalAutolink')- effects.enter('literalAutolinkHttp')- buffer += String.fromCodePoint(code)- effects.consume(code)- return protocolPrefixInside- }- return nok(code)- }-- /**- * In protocol.- *- * ```markdown- * > | https://example.com/a?b#c- * ^^^^^- * ```- *- * @type {State}- */- function protocolPrefixInside(code) {- // `5` is size of `https`- if (asciiAlpha(code) && buffer.length < 5) {- // @ts-expect-error: definitely number.- buffer += String.fromCodePoint(code)- effects.consume(code)- return protocolPrefixInside- }- if (code === 58) {- const protocol = buffer.toLowerCase()- if (protocol === 'http' || protocol === 'https') {- effects.consume(code)- return protocolSlashesInside- }- }- return nok(code)- }-- /**- * In slashes.- *- * ```markdown- * > | https://example.com/a?b#c- * ^^- * ```- *- * @type {State}- */- function protocolSlashesInside(code) {- if (code === 47) {- effects.consume(code)- if (seen) {- return afterProtocol- }- seen = true- return protocolSlashesInside- }- return nok(code)- }-- /**- * After protocol, before domain.- *- * ```markdown- * > | https://example.com/a?b#c- * ^- * ```- *- * @type {State}- */- function afterProtocol(code) {- // To do: this is different from `markdown-rs`:- // https://github.com/wooorm/markdown-rs/blob/b3a921c761309ae00a51fe348d8a43adbc54b518/src/construct/gfm_autolink_literal.rs#L172-L182- return code === null ||- asciiControl(code) ||- markdownLineEndingOrSpace(code) ||- unicodeWhitespace(code) ||- unicodePunctuation(code)- ? nok(code)- : effects.attempt(domain, effects.attempt(syntax_path, protocolAfter), nok)(code)- }-- /**- * After a protocol autolink literal.- *- * ```markdown- * > | https://example.com/a?b#c- * ^- * ```- *- * @type {State}- */- function protocolAfter(code) {- effects.exit('literalAutolinkHttp')- effects.exit('literalAutolink')- return ok(code)- }-}--/**- * `www` prefix.- *- * ```markdown- * > | a www.example.org b- * ^^^^- * ```- *- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeWwwPrefix(effects, ok, nok) {- let size = 0- return wwwPrefixInside-- /**- * In www prefix.- *- * ```markdown- * > | www.example.com- * ^^^^- * ```- *- * @type {State}- */- function wwwPrefixInside(code) {- if ((code === 87 || code === 119) && size < 3) {- size++- effects.consume(code)- return wwwPrefixInside- }- if (code === 46 && size === 3) {- effects.consume(code)- return wwwPrefixAfter- }- return nok(code)- }-- /**- * After www prefix.- *- * ```markdown- * > | www.example.com- * ^- * ```- *- * @type {State}- */- function wwwPrefixAfter(code) {- // If there is *anything*, we can link.- return code === null ? nok(code) : ok(code)- }-}--/**- * Domain.- *- * ```markdown- * > | a https://example.org b- * ^^^^^^^^^^^- * ```- *- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeDomain(effects, ok, nok) {- /** @type {boolean | undefined} */- let underscoreInLastSegment- /** @type {boolean | undefined} */- let underscoreInLastLastSegment- /** @type {boolean | undefined} */- let seen- return domainInside-- /**- * In domain.- *- * ```markdown- * > | https://example.com/a- * ^^^^^^^^^^^- * ```- *- * @type {State}- */- function domainInside(code) {- // Check whether this marker, which is a trailing punctuation- // marker, optionally followed by more trailing markers, and then- // followed by an end.- if (code === 46 || code === 95) {- return effects.check(trail, domainAfter, domainAtPunctuation)(code)- }-- // GH documents that only alphanumerics (other than `-`, `.`, and `_`) can- // occur, which sounds like ASCII only, but they also support `www.點看.com`,- // so that’s Unicode.- // Instead of some new production for Unicode alphanumerics, markdown- // already has that for Unicode punctuation and whitespace, so use those.- // Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L12>.- if (- code === null ||- markdownLineEndingOrSpace(code) ||- unicodeWhitespace(code) ||- (code !== 45 && unicodePunctuation(code))- ) {- return domainAfter(code)- }- seen = true- effects.consume(code)- return domainInside- }-- /**- * In domain, at potential trailing punctuation, that was not trailing.- *- * ```markdown- * > | https://example.com- * ^- * ```- *- * @type {State}- */- function domainAtPunctuation(code) {- // There is an underscore in the last segment of the domain- if (code === 95) {- underscoreInLastSegment = true- }- // Otherwise, it’s a `.`: save the last segment underscore in the- // penultimate segment slot.- else {- underscoreInLastLastSegment = underscoreInLastSegment- underscoreInLastSegment = undefined- }- effects.consume(code)- return domainInside- }-- /**- * After domain.- *- * ```markdown- * > | https://example.com/a- * ^- * ```- *- * @type {State} */- function domainAfter(code) {- // Note: that’s GH says a dot is needed, but it’s not true:- // <https://github.com/github/cmark-gfm/issues/279>- if (underscoreInLastLastSegment || underscoreInLastSegment || !seen) {- return nok(code)- }- return ok(code)- }-}--/**- * Path.- *- * ```markdown- * > | a https://example.org/stuff b- * ^^^^^^- * ```- *- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizePath(effects, ok) {- let sizeOpen = 0- let sizeClose = 0- return pathInside-- /**- * In path.- *- * ```markdown- * > | https://example.com/a- * ^^- * ```- *- * @type {State}- */- function pathInside(code) {- if (code === 40) {- sizeOpen++- effects.consume(code)- return pathInside- }-- // To do: `markdown-rs` also needs this.- // If this is a paren, and there are less closings than openings,- // we don’t check for a trail.- if (code === 41 && sizeClose < sizeOpen) {- return pathAtPunctuation(code)- }-- // Check whether this trailing punctuation marker is optionally- // followed by more trailing markers, and then followed- // by an end.- if (- code === 33 ||- code === 34 ||- code === 38 ||- code === 39 ||- code === 41 ||- code === 42 ||- code === 44 ||- code === 46 ||- code === 58 ||- code === 59 ||- code === 60 ||- code === 63 ||- code === 93 ||- code === 95 ||- code === 126- ) {- return effects.check(trail, ok, pathAtPunctuation)(code)- }- if (- code === null ||- markdownLineEndingOrSpace(code) ||- unicodeWhitespace(code)- ) {- return ok(code)- }- effects.consume(code)- return pathInside- }-- /**- * In path, at potential trailing punctuation, that was not trailing.- *- * ```markdown- * > | https://example.com/a"b- * ^- * ```- *- * @type {State}- */- function pathAtPunctuation(code) {- // Count closing parens.- if (code === 41) {- sizeClose++- }- effects.consume(code)- return pathInside- }-}--/**- * Trail.- *- * This calls `ok` if this *is* the trail, followed by an end, which means- * the entire trail is not part of the link.- * It calls `nok` if this *is* part of the link.- *- * ```markdown- * > | https://example.com").- * ^^^- * ```- *- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeTrail(effects, ok, nok) {- return trail-- /**- * In trail of domain or path.- *- * ```markdown- * > | https://example.com").- * ^- * ```- *- * @type {State}- */- function trail(code) {- // Regular trailing punctuation.- if (- code === 33 ||- code === 34 ||- code === 39 ||- code === 41 ||- code === 42 ||- code === 44 ||- code === 46 ||- code === 58 ||- code === 59 ||- code === 63 ||- code === 95 ||- code === 126- ) {- effects.consume(code)- return trail- }-- // `&` followed by one or more alphabeticals and then a `;`, is- // as a whole considered as trailing punctuation.- // In all other cases, it is considered as continuation of the URL.- if (code === 38) {- effects.consume(code)- return trailCharRefStart- }-- // Needed because we allow literals after `[`, as we fix:- // <https://github.com/github/cmark-gfm/issues/278>.- // Check that it is not followed by `(` or `[`.- if (code === 93) {- effects.consume(code)- return trailBracketAfter- }- if (- // `<` is an end.- code === 60 ||- // So is whitespace.- code === null ||- markdownLineEndingOrSpace(code) ||- unicodeWhitespace(code)- ) {- return ok(code)- }- return nok(code)- }-- /**- * In trail, after `]`.- *- * > 👉 **Note**: this deviates from `cmark-gfm` to fix a bug.- * > See end of <https://github.com/github/cmark-gfm/issues/278> for more.- *- * ```markdown- * > | https://example.com](- * ^- * ```- *- * @type {State}- */- function trailBracketAfter(code) {- // Whitespace or something that could start a resource or reference is the end.- // Switch back to trail otherwise.- if (- code === null ||- code === 40 ||- code === 91 ||- markdownLineEndingOrSpace(code) ||- unicodeWhitespace(code)- ) {- return ok(code)- }- return trail(code)- }-- /**- * In character-reference like trail, after `&`.- *- * ```markdown- * > | https://example.com&).- * ^- * ```- *- * @type {State}- */- function trailCharRefStart(code) {- // When non-alpha, it’s not a trail.- return asciiAlpha(code) ? trailCharRefInside(code) : nok(code)- }-- /**- * In character-reference like trail.- *- * ```markdown- * > | https://example.com&).- * ^- * ```- *- * @type {State}- */- function trailCharRefInside(code) {- // Switch back to trail if this is well-formed.- if (code === 59) {- effects.consume(code)- return trail- }- if (asciiAlpha(code)) {- effects.consume(code)- return trailCharRefInside- }-- // It’s not a trail.- return nok(code)- }-}--/**- * Dot in email domain trail.- *- * This calls `ok` if this *is* the trail, followed by an end, which means- * the trail is not part of the link.- * It calls `nok` if this *is* part of the link.- *- * ```markdown- * > | [email protected].- * ^- * ```- *- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeEmailDomainDotTrail(effects, ok, nok) {- return start-- /**- * Dot.- *- * ```markdown- * > | [email protected].- * ^ ^- * ```- *- * @type {State}- */- function start(code) {- // Must be dot.- effects.consume(code)- return after- }-- /**- * After dot.- *- * ```markdown- * > | [email protected].- * ^ ^- * ```- *- * @type {State}- */- function after(code) {- // Not a trail if alphanumeric.- return asciiAlphanumeric(code) ? nok(code) : ok(code)- }-}--/**- * See:- * <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L156>.- *- * @type {Previous}- */-function previousWww(code) {- return (- code === null ||- code === 40 ||- code === 42 ||- code === 95 ||- code === 91 ||- code === 93 ||- code === 126 ||- markdownLineEndingOrSpace(code)- )-}--/**- * See:- * <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L214>.- *- * @type {Previous}- */-function previousProtocol(code) {- return !asciiAlpha(code)-}--/**- * @this {TokenizeContext}- * @type {Previous}- */-function previousEmail(code) {- // Do not allow a slash “inside” atext.- // The reference code is a bit weird, but that’s what it results in.- // Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L307>.- // Other than slash, every preceding character is allowed.- return !(code === 47 || gfmAtext(code))-}--/**- * @param {Code} code- * @returns {boolean}- */-function gfmAtext(code) {- return (- code === 43 ||- code === 45 ||- code === 46 ||- code === 95 ||- asciiAlphanumeric(code)- )-}--/**- * @param {Array<Event>} events- * @returns {boolean}- */-function previousUnbalanced(events) {- let index = events.length- let result = false- while (index--) {- const token = events[index][1]- if (- (token.type === 'labelLink' || token.type === 'labelImage') &&- !token._balanced- ) {- result = true- break- }-- // If we’ve seen this token, and it was marked as not having any unbalanced- // bracket before it, we can exit.- if (token._gfmAutolinkLiteralWalkedInto) {- result = false- break- }- }- if (events.length > 0 && !result) {- // Mark the last token as “walked into” w/o finding- // anything.- events[events.length - 1][1]._gfmAutolinkLiteralWalkedInto = true- }- return result-}--;// CONCATENATED MODULE: ./node_modules/micromark-extension-gfm-footnote/lib/syntax.js-/**- * @typedef {import('micromark-util-types').Event} Event- * @typedef {import('micromark-util-types').Exiter} Exiter- * @typedef {import('micromark-util-types').Extension} Extension- * @typedef {import('micromark-util-types').Resolver} Resolver- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').Token} Token- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */------const indent = {- tokenize: syntax_tokenizeIndent,- partial: true-}--// To do: micromark should support a `_hiddenGfmFootnoteSupport`, which only-// affects label start (image).-// That will let us drop `tokenizePotentialGfmFootnote*`.-// It currently has a `_hiddenFootnoteSupport`, which affects that and more.-// That can be removed when `micromark-extension-footnote` is archived.--/**- * Create an extension for `micromark` to enable GFM footnote syntax.- *- * @returns {Extension}- * Extension for `micromark` that can be passed in `extensions` to- * enable GFM footnote syntax.- */-function gfmFootnote() {- /** @type {Extension} */- return {- document: {- [91]: {- tokenize: tokenizeDefinitionStart,- continuation: {- tokenize: tokenizeDefinitionContinuation- },- exit: gfmFootnoteDefinitionEnd- }- },- text: {- [91]: {- tokenize: tokenizeGfmFootnoteCall- },- [93]: {- add: 'after',- tokenize: tokenizePotentialGfmFootnoteCall,- resolveTo: resolveToPotentialGfmFootnoteCall- }- }- }-}--// To do: remove after micromark update.-/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizePotentialGfmFootnoteCall(effects, ok, nok) {- const self = this- let index = self.events.length- /** @type {Array<string>} */- // @ts-expect-error It’s fine!- const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = [])- /** @type {Token} */- let labelStart-- // Find an opening.- while (index--) {- const token = self.events[index][1]- if (token.type === 'labelImage') {- labelStart = token- break- }-- // Exit if we’ve walked far enough.- if (- token.type === 'gfmFootnoteCall' ||- token.type === 'labelLink' ||- token.type === 'label' ||- token.type === 'image' ||- token.type === 'link'- ) {- break- }- }- return start-- /**- * @type {State}- */- function start(code) {- if (!labelStart || !labelStart._balanced) {- return nok(code)- }- const id = normalizeIdentifier(- self.sliceSerialize({- start: labelStart.end,- end: self.now()- })- )- if (id.codePointAt(0) !== 94 || !defined.includes(id.slice(1))) {- return nok(code)- }- effects.enter('gfmFootnoteCallLabelMarker')- effects.consume(code)- effects.exit('gfmFootnoteCallLabelMarker')- return ok(code)- }-}--// To do: remove after micromark update.-/** @type {Resolver} */-function resolveToPotentialGfmFootnoteCall(events, context) {- let index = events.length- /** @type {Token | undefined} */- let labelStart-- // Find an opening.- while (index--) {- if (- events[index][1].type === 'labelImage' &&- events[index][0] === 'enter'- ) {- labelStart = events[index][1]- break- }- }- // Change the `labelImageMarker` to a `data`.- events[index + 1][1].type = 'data'- events[index + 3][1].type = 'gfmFootnoteCallLabelMarker'-- // The whole (without `!`):- /** @type {Token} */- const call = {- type: 'gfmFootnoteCall',- start: Object.assign({}, events[index + 3][1].start),- end: Object.assign({}, events[events.length - 1][1].end)- }- // The `^` marker- /** @type {Token} */- const marker = {- type: 'gfmFootnoteCallMarker',- start: Object.assign({}, events[index + 3][1].end),- end: Object.assign({}, events[index + 3][1].end)- }- // Increment the end 1 character.- marker.end.column++- marker.end.offset++- marker.end._bufferIndex++- /** @type {Token} */- const string = {- type: 'gfmFootnoteCallString',- start: Object.assign({}, marker.end),- end: Object.assign({}, events[events.length - 1][1].start)- }- /** @type {Token} */- const chunk = {- type: 'chunkString',- contentType: 'string',- start: Object.assign({}, string.start),- end: Object.assign({}, string.end)- }-- /** @type {Array<Event>} */- const replacement = [- // Take the `labelImageMarker` (now `data`, the `!`)- events[index + 1],- events[index + 2],- ['enter', call, context],- // The `[`- events[index + 3],- events[index + 4],- // The `^`.- ['enter', marker, context],- ['exit', marker, context],- // Everything in between.- ['enter', string, context],- ['enter', chunk, context],- ['exit', chunk, context],- ['exit', string, context],- // The ending (`]`, properly parsed and labelled).- events[events.length - 2],- events[events.length - 1],- ['exit', call, context]- ]- events.splice(index, events.length - index + 1, ...replacement)- return events-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeGfmFootnoteCall(effects, ok, nok) {- const self = this- /** @type {Array<string>} */- // @ts-expect-error It’s fine!- const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = [])- let size = 0- /** @type {boolean} */- let data-- // Note: the implementation of `markdown-rs` is different, because it houses- // core *and* extensions in one project.- // Therefore, it can include footnote logic inside `label-end`.- // We can’t do that, but luckily, we can parse footnotes in a simpler way than- // needed for labels.- return start-- /**- * Start of footnote label.- *- * ```markdown- * > | a [^b] c- * ^- * ```- *- * @type {State}- */- function start(code) {- effects.enter('gfmFootnoteCall')- effects.enter('gfmFootnoteCallLabelMarker')- effects.consume(code)- effects.exit('gfmFootnoteCallLabelMarker')- return callStart- }-- /**- * After `[`, at `^`.- *- * ```markdown- * > | a [^b] c- * ^- * ```- *- * @type {State}- */- function callStart(code) {- if (code !== 94) return nok(code)- effects.enter('gfmFootnoteCallMarker')- effects.consume(code)- effects.exit('gfmFootnoteCallMarker')- effects.enter('gfmFootnoteCallString')- effects.enter('chunkString').contentType = 'string'- return callData- }-- /**- * In label.- *- * ```markdown- * > | a [^b] c- * ^- * ```- *- * @type {State}- */- function callData(code) {- if (- // Too long.- size > 999 ||- // Closing brace with nothing.- (code === 93 && !data) ||- // Space or tab is not supported by GFM for some reason.- // `\n` and `[` not being supported makes sense.- code === null ||- code === 91 ||- markdownLineEndingOrSpace(code)- ) {- return nok(code)- }- if (code === 93) {- effects.exit('chunkString')- const token = effects.exit('gfmFootnoteCallString')- if (!defined.includes(normalizeIdentifier(self.sliceSerialize(token)))) {- return nok(code)- }- effects.enter('gfmFootnoteCallLabelMarker')- effects.consume(code)- effects.exit('gfmFootnoteCallLabelMarker')- effects.exit('gfmFootnoteCall')- return ok- }- if (!markdownLineEndingOrSpace(code)) {- data = true- }- size++- effects.consume(code)- return code === 92 ? callEscape : callData- }-- /**- * On character after escape.- *- * ```markdown- * > | a [^b\c] d- * ^- * ```- *- * @type {State}- */- function callEscape(code) {- if (code === 91 || code === 92 || code === 93) {- effects.consume(code)- size++- return callData- }- return callData(code)- }-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeDefinitionStart(effects, ok, nok) {- const self = this- /** @type {Array<string>} */- // @ts-expect-error It’s fine!- const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = [])- /** @type {string} */- let identifier- let size = 0- /** @type {boolean | undefined} */- let data- return start-- /**- * Start of GFM footnote definition.- *- * ```markdown- * > | [^a]: b- * ^- * ```- *- * @type {State}- */- function start(code) {- effects.enter('gfmFootnoteDefinition')._container = true- effects.enter('gfmFootnoteDefinitionLabel')- effects.enter('gfmFootnoteDefinitionLabelMarker')- effects.consume(code)- effects.exit('gfmFootnoteDefinitionLabelMarker')- return labelAtMarker- }-- /**- * In label, at caret.- *- * ```markdown- * > | [^a]: b- * ^- * ```- *- * @type {State}- */- function labelAtMarker(code) {- if (code === 94) {- effects.enter('gfmFootnoteDefinitionMarker')- effects.consume(code)- effects.exit('gfmFootnoteDefinitionMarker')- effects.enter('gfmFootnoteDefinitionLabelString')- effects.enter('chunkString').contentType = 'string'- return labelInside- }- return nok(code)- }-- /**- * In label.- *- * > 👉 **Note**: `cmark-gfm` prevents whitespace from occurring in footnote- * > definition labels.- *- * ```markdown- * > | [^a]: b- * ^- * ```- *- * @type {State}- */- function labelInside(code) {- if (- // Too long.- size > 999 ||- // Closing brace with nothing.- (code === 93 && !data) ||- // Space or tab is not supported by GFM for some reason.- // `\n` and `[` not being supported makes sense.- code === null ||- code === 91 ||- markdownLineEndingOrSpace(code)- ) {- return nok(code)- }- if (code === 93) {- effects.exit('chunkString')- const token = effects.exit('gfmFootnoteDefinitionLabelString')- identifier = normalizeIdentifier(self.sliceSerialize(token))- effects.enter('gfmFootnoteDefinitionLabelMarker')- effects.consume(code)- effects.exit('gfmFootnoteDefinitionLabelMarker')- effects.exit('gfmFootnoteDefinitionLabel')- return labelAfter- }- if (!markdownLineEndingOrSpace(code)) {- data = true- }- size++- effects.consume(code)- return code === 92 ? labelEscape : labelInside- }-- /**- * After `\`, at a special character.- *- * > 👉 **Note**: `cmark-gfm` currently does not support escaped brackets:- * > <https://github.com/github/cmark-gfm/issues/240>- *- * ```markdown- * > | [^a\*b]: c- * ^- * ```- *- * @type {State}- */- function labelEscape(code) {- if (code === 91 || code === 92 || code === 93) {- effects.consume(code)- size++- return labelInside- }- return labelInside(code)- }-- /**- * After definition label.- *- * ```markdown- * > | [^a]: b- * ^- * ```- *- * @type {State}- */- function labelAfter(code) {- if (code === 58) {- effects.enter('definitionMarker')- effects.consume(code)- effects.exit('definitionMarker')- if (!defined.includes(identifier)) {- defined.push(identifier)- }-- // Any whitespace after the marker is eaten, forming indented code- // is not possible.- // No space is also fine, just like a block quote marker.- return factorySpace(- effects,- whitespaceAfter,- 'gfmFootnoteDefinitionWhitespace'- )- }- return nok(code)- }-- /**- * After definition prefix.- *- * ```markdown- * > | [^a]: b- * ^- * ```- *- * @type {State}- */- function whitespaceAfter(code) {- // `markdown-rs` has a wrapping token for the prefix that is closed here.- return ok(code)- }-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeDefinitionContinuation(effects, ok, nok) {- /// Start of footnote definition continuation.- ///- /// ```markdown- /// | [^a]: b- /// > | c- /// ^- /// ```- //- // Either a blank line, which is okay, or an indented thing.- return effects.check(blankLine, ok, effects.attempt(indent, ok, nok))-}--/** @type {Exiter} */-function gfmFootnoteDefinitionEnd(effects) {- effects.exit('gfmFootnoteDefinition')-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function syntax_tokenizeIndent(effects, ok, nok) {- const self = this- return factorySpace(- effects,- afterPrefix,- 'gfmFootnoteDefinitionIndent',- 4 + 1- )-- /**- * @type {State}- */- function afterPrefix(code) {- const tail = self.events[self.events.length - 1]- return tail &&- tail[1].type === 'gfmFootnoteDefinitionIndent' &&- tail[2].sliceSerialize(tail[1], true).length === 4- ? ok(code)- : nok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js-/**- * @typedef {import('micromark-util-types').Event} Event- * @typedef {import('micromark-util-types').Extension} Extension- * @typedef {import('micromark-util-types').Resolver} Resolver- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').Token} Token- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- *- * @typedef Options- * Configuration (optional).- * @property {boolean} [singleTilde=true]- * Whether to support strikethrough with a single tilde.- *- * Single tildes work on github.com, but are technically prohibited by the- * GFM spec.- */-----/**- * Create an extension for `micromark` to enable GFM strikethrough syntax.- *- * @param {Options | null | undefined} [options]- * Configuration.- * @returns {Extension}- * Extension for `micromark` that can be passed in `extensions`, to- * enable GFM strikethrough syntax.- */-function gfmStrikethrough(options) {- const options_ = options || {}- let single = options_.singleTilde- const tokenizer = {- tokenize: tokenizeStrikethrough,- resolveAll: resolveAllStrikethrough- }- if (single === null || single === undefined) {- single = true- }- return {- text: {- [126]: tokenizer- },- insideSpan: {- null: [tokenizer]- },- attentionMarkers: {- null: [126]- }- }-- /**- * Take events and resolve strikethrough.- *- * @type {Resolver}- */- function resolveAllStrikethrough(events, context) {- let index = -1-- // Walk through all events.- while (++index < events.length) {- // Find a token that can close.- if (- events[index][0] === 'enter' &&- events[index][1].type === 'strikethroughSequenceTemporary' &&- events[index][1]._close- ) {- let open = index-- // Now walk back to find an opener.- while (open--) {- // Find a token that can open the closer.- if (- events[open][0] === 'exit' &&- events[open][1].type === 'strikethroughSequenceTemporary' &&- events[open][1]._open &&- // If the sizes are the same:- events[index][1].end.offset - events[index][1].start.offset ===- events[open][1].end.offset - events[open][1].start.offset- ) {- events[index][1].type = 'strikethroughSequence'- events[open][1].type = 'strikethroughSequence'-- /** @type {Token} */- const strikethrough = {- type: 'strikethrough',- start: Object.assign({}, events[open][1].start),- end: Object.assign({}, events[index][1].end)- }-- /** @type {Token} */- const text = {- type: 'strikethroughText',- start: Object.assign({}, events[open][1].end),- end: Object.assign({}, events[index][1].start)- }-- // Opening.- /** @type {Array<Event>} */- const nextEvents = [- ['enter', strikethrough, context],- ['enter', events[open][1], context],- ['exit', events[open][1], context],- ['enter', text, context]- ]- const insideSpan = context.parser.constructs.insideSpan.null- if (insideSpan) {- // Between.- splice(- nextEvents,- nextEvents.length,- 0,- resolveAll(insideSpan, events.slice(open + 1, index), context)- )- }-- // Closing.- splice(nextEvents, nextEvents.length, 0, [- ['exit', text, context],- ['enter', events[index][1], context],- ['exit', events[index][1], context],- ['exit', strikethrough, context]- ])- splice(events, open - 1, index - open + 3, nextEvents)- index = open + nextEvents.length - 2- break- }- }- }- }- index = -1- while (++index < events.length) {- if (events[index][1].type === 'strikethroughSequenceTemporary') {- events[index][1].type = 'data'- }- }- return events- }-- /**- * @this {TokenizeContext}- * @type {Tokenizer}- */- function tokenizeStrikethrough(effects, ok, nok) {- const previous = this.previous- const events = this.events- let size = 0- return start-- /** @type {State} */- function start(code) {- if (- previous === 126 &&- events[events.length - 1][1].type !== 'characterEscape'- ) {- return nok(code)- }- effects.enter('strikethroughSequenceTemporary')- return more(code)- }-- /** @type {State} */- function more(code) {- const before = classifyCharacter(previous)- if (code === 126) {- // If this is the third marker, exit.- if (size > 1) return nok(code)- effects.consume(code)- size++- return more- }- if (size < 2 && !single) return nok(code)- const token = effects.exit('strikethroughSequenceTemporary')- const after = classifyCharacter(code)- token._open = !after || (after === 2 && Boolean(before))- token._close = !before || (before === 2 && Boolean(after))- return ok(code)- }- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-extension-gfm-table/lib/edit-map.js-/**- * @typedef {import('micromark-util-types').Event} Event- */--// Port of `edit_map.rs` from `markdown-rs`.-// This should move to `markdown-js` later.--// Deal with several changes in events, batching them together.-//-// Preferably, changes should be kept to a minimum.-// Sometimes, it’s needed to change the list of events, because parsing can be-// messy, and it helps to expose a cleaner interface of events to the compiler-// and other users.-// It can also help to merge many adjacent similar events.-// And, in other cases, it’s needed to parse subcontent: pass some events-// through another tokenizer and inject the result.--/**- * @typedef {[number, number, Array<Event>]} Change- * @typedef {[number, number, number]} Jump- */--/**- * Tracks a bunch of edits.- */-class EditMap {- /**- * Create a new edit map.- */- constructor() {- /**- * Record of changes.- *- * @type {Array<Change>}- */- this.map = []- }-- /**- * Create an edit: a remove and/or add at a certain place.- *- * @param {number} index- * @param {number} remove- * @param {Array<Event>} add- * @returns {void}- */- add(index, remove, add) {- addImpl(this, index, remove, add)- }-- // To do: not used here.- // /**- // * Create an edit: but insert `add` before existing additions.- // *- // * @param {number} index- // * @param {number} remove- // * @param {Array<Event>} add- // * @returns {void}- // */- // addBefore(index, remove, add) {- // addImpl(this, index, remove, add, true)- // }-- /**- * Done, change the events.- *- * @param {Array<Event>} events- * @returns {void}- */- consume(events) {- this.map.sort((a, b) => a[0] - b[0])-- /* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */- if (this.map.length === 0) {- return- }-- // To do: if links are added in events, like they are in `markdown-rs`,- // this is needed.- // // Calculate jumps: where items in the current list move to.- // /** @type {Array<Jump>} */- // const jumps = []- // let index = 0- // let addAcc = 0- // let removeAcc = 0- // while (index < this.map.length) {- // const [at, remove, add] = this.map[index]- // removeAcc += remove- // addAcc += add.length- // jumps.push([at, removeAcc, addAcc])- // index += 1- // }- //- // . shiftLinks(events, jumps)-- let index = this.map.length- /** @type {Array<Array<Event>>} */- const vecs = []- while (index > 0) {- index -= 1- vecs.push(events.slice(this.map[index][0] + this.map[index][1]))- // eslint-disable-next-line unicorn/no-array-push-push- vecs.push(this.map[index][2])-- // Truncate rest.- events.length = this.map[index][0]- }- vecs.push([...events])- events.length = 0- let slice = vecs.pop()- while (slice) {- events.push(...slice)- slice = vecs.pop()- }-- // Truncate everything.- this.map.length = 0- }-}--/**- * Create an edit.- *- * @param {EditMap} editMap- * @param {number} at- * @param {number} remove- * @param {Array<Event>} add- * @returns {void}- */-function addImpl(editMap, at, remove, add) {- let index = 0-- /* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */- if (remove === 0 && add.length === 0) {- return- }- while (index < editMap.map.length) {- if (editMap.map[index][0] === at) {- editMap.map[index][1] += remove-- // To do: before not used.- // if (before) {- // add.push(...editMap.map[index][2])- // editMap.map[index][2] = add- // } else {- editMap.map[index][2].push(...add)- // }-- return- }- index += 1- }- editMap.map.push([at, remove, add])-}--// /**-// * Shift `previous` and `next` links according to `jumps`.-// *-// * This fixes links in case there are events removed or added between them.-// *-// * @param {Array<Event>} events-// * @param {Array<Jump>} jumps-// */-// function shiftLinks(events, jumps) {-// let jumpIndex = 0-// let index = 0-// let add = 0-// let rm = 0--// while (index < events.length) {-// const rmCurr = rm--// while (jumpIndex < jumps.length && jumps[jumpIndex][0] <= index) {-// add = jumps[jumpIndex][2]-// rm = jumps[jumpIndex][1]-// jumpIndex += 1-// }--// // Ignore items that will be removed.-// if (rm > rmCurr) {-// index += rm - rmCurr-// } else {-// console.log('to do: links?', add, rmCurr)-// // ?-// // if let Some(link) = &events[index].link {-// // if let Some(next) = link.next {-// // events[next].link.as_mut().unwrap().previous = Some(index + add - rm);-// // while jumpIndex < jumps.len() && jumps[jumpIndex].0 <= next {-// // add = jumps[jumpIndex].2;-// // rm = jumps[jumpIndex].1;-// // jumpIndex += 1;-// // }-// // events[index].link.as_mut().unwrap().next = Some(next + add - rm);-// // index = next;-// // continue;-// // }-// // }-// index += 1-// }-// }-// }--;// CONCATENATED MODULE: ./node_modules/micromark-extension-gfm-table/lib/infer.js-/**- * @typedef {import('micromark-util-types').Event} Event- */--/**- * @typedef {'left' | 'center' | 'right' | 'none'} Align- */--/**- * Figure out the alignment of a GFM table.- *- * @param {Array<Event>} events- * @param {number} index- * @returns {Array<Align>}- */-function gfmTableAlign(events, index) {- let inDelimiterRow = false- /** @type {Array<Align>} */- const align = []- while (index < events.length) {- const event = events[index]- if (inDelimiterRow) {- if (event[0] === 'enter') {- // Start of alignment value: set a new column.- // To do: `markdown-rs` uses `tableDelimiterCellValue`.- if (event[1].type === 'tableContent') {- align.push(- events[index + 1][1].type === 'tableDelimiterMarker'- ? 'left'- : 'none'- )- }- }- // Exits:- // End of alignment value: change the column.- // To do: `markdown-rs` uses `tableDelimiterCellValue`.- else if (event[1].type === 'tableContent') {- if (events[index - 1][1].type === 'tableDelimiterMarker') {- const alignIndex = align.length - 1- align[alignIndex] = align[alignIndex] === 'left' ? 'center' : 'right'- }- }- // Done!- else if (event[1].type === 'tableDelimiterRow') {- break- }- } else if (event[0] === 'enter' && event[1].type === 'tableDelimiterRow') {- inDelimiterRow = true- }- index += 1- }- return align-}--;// CONCATENATED MODULE: ./node_modules/micromark-extension-gfm-table/lib/syntax.js-/**- * @typedef {import('micromark-util-types').Event} Event- * @typedef {import('micromark-util-types').Extension} Extension- * @typedef {import('micromark-util-types').Point} Point- * @typedef {import('micromark-util-types').Resolver} Resolver- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').Token} Token- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */--/**- * @typedef {[number, number, number, number]} Range- * Cell info.- *- * @typedef {0 | 1 | 2 | 3} RowKind- * Where we are: `1` for head row, `2` for delimiter row, `3` for body row.- */-------// To do: next major: expose functions.--/**- * Extension for `micromark` that can be passed in `extensions` to enable GFM- * table syntax.- *- * @type {Extension}- */-const gfmTable = {- flow: {- null: {- tokenize: tokenizeTable,- resolveAll: resolveTable- }- }-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeTable(effects, ok, nok) {- const self = this- let size = 0- let sizeB = 0- /** @type {boolean | undefined} */- let seen- return start-- /**- * Start of a GFM table.- *- * If there is a valid table row or table head before, then we try to parse- * another row.- * Otherwise, we try to parse a head.- *- * ```markdown- * > | | a |- * ^- * | | - |- * > | | b |- * ^- * ```- * @type {State}- */- function start(code) {- let index = self.events.length - 1- while (index > -1) {- const type = self.events[index][1].type- if (- type === 'lineEnding' ||- // Note: markdown-rs uses `whitespace` instead of `linePrefix`- type === 'linePrefix'- )- index--- else break- }- const tail = index > -1 ? self.events[index][1].type : null- const next =- tail === 'tableHead' || tail === 'tableRow' ? bodyRowStart : headRowBefore-- // Don’t allow lazy body rows.- if (next === bodyRowStart && self.parser.lazy[self.now().line]) {- return nok(code)- }- return next(code)- }-- /**- * Before table head row.- *- * ```markdown- * > | | a |- * ^- * | | - |- * | | b |- * ```- *- * @type {State}- */- function headRowBefore(code) {- effects.enter('tableHead')- effects.enter('tableRow')- return headRowStart(code)- }-- /**- * Before table head row, after whitespace.- *- * ```markdown- * > | | a |- * ^- * | | - |- * | | b |- * ```- *- * @type {State}- */- function headRowStart(code) {- if (code === 124) {- return headRowBreak(code)- }-- // To do: micromark-js should let us parse our own whitespace in extensions,- // like `markdown-rs`:- //- // ```js- // // 4+ spaces.- // if (markdownSpace(code)) {- // return nok(code)- // }- // ```-- seen = true- // Count the first character, that isn’t a pipe, double.- sizeB += 1- return headRowBreak(code)- }-- /**- * At break in table head row.- *- * ```markdown- * > | | a |- * ^- * ^- * ^- * | | - |- * | | b |- * ```- *- * @type {State}- */- function headRowBreak(code) {- if (code === null) {- // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.- return nok(code)- }- if (markdownLineEnding(code)) {- // If anything other than one pipe (ignoring whitespace) was used, it’s fine.- if (sizeB > 1) {- sizeB = 0- // To do: check if this works.- // Feel free to interrupt:- self.interrupt = true- effects.exit('tableRow')- effects.enter('lineEnding')- effects.consume(code)- effects.exit('lineEnding')- return headDelimiterStart- }-- // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.- return nok(code)- }- if (markdownSpace(code)) {- // To do: check if this is fine.- // effects.attempt(State::Next(StateName::GfmTableHeadRowBreak), State::Nok)- // State::Retry(space_or_tab(tokenizer))- return factorySpace(effects, headRowBreak, 'whitespace')(code)- }- sizeB += 1- if (seen) {- seen = false- // Header cell count.- size += 1- }- if (code === 124) {- effects.enter('tableCellDivider')- effects.consume(code)- effects.exit('tableCellDivider')- // Whether a delimiter was seen.- seen = true- return headRowBreak- }-- // Anything else is cell data.- effects.enter('data')- return headRowData(code)- }-- /**- * In table head row data.- *- * ```markdown- * > | | a |- * ^- * | | - |- * | | b |- * ```- *- * @type {State}- */- function headRowData(code) {- if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {- effects.exit('data')- return headRowBreak(code)- }- effects.consume(code)- return code === 92 ? headRowEscape : headRowData- }-- /**- * In table head row escape.- *- * ```markdown- * > | | a\-b |- * ^- * | | ---- |- * | | c |- * ```- *- * @type {State}- */- function headRowEscape(code) {- if (code === 92 || code === 124) {- effects.consume(code)- return headRowData- }- return headRowData(code)- }-- /**- * Before delimiter row.- *- * ```markdown- * | | a |- * > | | - |- * ^- * | | b |- * ```- *- * @type {State}- */- function headDelimiterStart(code) {- // Reset `interrupt`.- self.interrupt = false-- // Note: in `markdown-rs`, we need to handle piercing here too.- if (self.parser.lazy[self.now().line]) {- return nok(code)- }- effects.enter('tableDelimiterRow')- // Track if we’ve seen a `:` or `|`.- seen = false- if (markdownSpace(code)) {- return factorySpace(- effects,- headDelimiterBefore,- 'linePrefix',- self.parser.constructs.disable.null.includes('codeIndented')- ? undefined- : 4- )(code)- }- return headDelimiterBefore(code)- }-- /**- * Before delimiter row, after optional whitespace.- *- * Reused when a `|` is found later, to parse another cell.- *- * ```markdown- * | | a |- * > | | - |- * ^- * | | b |- * ```- *- * @type {State}- */- function headDelimiterBefore(code) {- if (code === 45 || code === 58) {- return headDelimiterValueBefore(code)- }- if (code === 124) {- seen = true- // If we start with a pipe, we open a cell marker.- effects.enter('tableCellDivider')- effects.consume(code)- effects.exit('tableCellDivider')- return headDelimiterCellBefore- }-- // More whitespace / empty row not allowed at start.- return headDelimiterNok(code)- }-- /**- * After `|`, before delimiter cell.- *- * ```markdown- * | | a |- * > | | - |- * ^- * ```- *- * @type {State}- */- function headDelimiterCellBefore(code) {- if (markdownSpace(code)) {- return factorySpace(effects, headDelimiterValueBefore, 'whitespace')(code)- }- return headDelimiterValueBefore(code)- }-- /**- * Before delimiter cell value.- *- * ```markdown- * | | a |- * > | | - |- * ^- * ```- *- * @type {State}- */- function headDelimiterValueBefore(code) {- // Align: left.- if (code === 58) {- sizeB += 1- seen = true- effects.enter('tableDelimiterMarker')- effects.consume(code)- effects.exit('tableDelimiterMarker')- return headDelimiterLeftAlignmentAfter- }-- // Align: none.- if (code === 45) {- sizeB += 1- // To do: seems weird that this *isn’t* left aligned, but that state is used?- return headDelimiterLeftAlignmentAfter(code)- }- if (code === null || markdownLineEnding(code)) {- return headDelimiterCellAfter(code)- }- return headDelimiterNok(code)- }-- /**- * After delimiter cell left alignment marker.- *- * ```markdown- * | | a |- * > | | :- |- * ^- * ```- *- * @type {State}- */- function headDelimiterLeftAlignmentAfter(code) {- if (code === 45) {- effects.enter('tableDelimiterFiller')- return headDelimiterFiller(code)- }-- // Anything else is not ok after the left-align colon.- return headDelimiterNok(code)- }-- /**- * In delimiter cell filler.- *- * ```markdown- * | | a |- * > | | - |- * ^- * ```- *- * @type {State}- */- function headDelimiterFiller(code) {- if (code === 45) {- effects.consume(code)- return headDelimiterFiller- }-- // Align is `center` if it was `left`, `right` otherwise.- if (code === 58) {- seen = true- effects.exit('tableDelimiterFiller')- effects.enter('tableDelimiterMarker')- effects.consume(code)- effects.exit('tableDelimiterMarker')- return headDelimiterRightAlignmentAfter- }- effects.exit('tableDelimiterFiller')- return headDelimiterRightAlignmentAfter(code)- }-- /**- * After delimiter cell right alignment marker.- *- * ```markdown- * | | a |- * > | | -: |- * ^- * ```- *- * @type {State}- */- function headDelimiterRightAlignmentAfter(code) {- if (markdownSpace(code)) {- return factorySpace(effects, headDelimiterCellAfter, 'whitespace')(code)- }- return headDelimiterCellAfter(code)- }-- /**- * After delimiter cell.- *- * ```markdown- * | | a |- * > | | -: |- * ^- * ```- *- * @type {State}- */- function headDelimiterCellAfter(code) {- if (code === 124) {- return headDelimiterBefore(code)- }- if (code === null || markdownLineEnding(code)) {- // Exit when:- // * there was no `:` or `|` at all (it’s a thematic break or setext- // underline instead)- // * the header cell count is not the delimiter cell count- if (!seen || size !== sizeB) {- return headDelimiterNok(code)- }-- // Note: in markdown-rs`, a reset is needed here.- effects.exit('tableDelimiterRow')- effects.exit('tableHead')- // To do: in `markdown-rs`, resolvers need to be registered manually.- // effects.register_resolver(ResolveName::GfmTable)- return ok(code)- }- return headDelimiterNok(code)- }-- /**- * In delimiter row, at a disallowed byte.- *- * ```markdown- * | | a |- * > | | x |- * ^- * ```- *- * @type {State}- */- function headDelimiterNok(code) {- // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.- return nok(code)- }-- /**- * Before table body row.- *- * ```markdown- * | | a |- * | | - |- * > | | b |- * ^- * ```- *- * @type {State}- */- function bodyRowStart(code) {- // Note: in `markdown-rs` we need to manually take care of a prefix,- // but in `micromark-js` that is done for us, so if we’re here, we’re- // never at whitespace.- effects.enter('tableRow')- return bodyRowBreak(code)- }-- /**- * At break in table body row.- *- * ```markdown- * | | a |- * | | - |- * > | | b |- * ^- * ^- * ^- * ```- *- * @type {State}- */- function bodyRowBreak(code) {- if (code === 124) {- effects.enter('tableCellDivider')- effects.consume(code)- effects.exit('tableCellDivider')- return bodyRowBreak- }- if (code === null || markdownLineEnding(code)) {- effects.exit('tableRow')- return ok(code)- }- if (markdownSpace(code)) {- return factorySpace(effects, bodyRowBreak, 'whitespace')(code)- }-- // Anything else is cell content.- effects.enter('data')- return bodyRowData(code)- }-- /**- * In table body row data.- *- * ```markdown- * | | a |- * | | - |- * > | | b |- * ^- * ```- *- * @type {State}- */- function bodyRowData(code) {- if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {- effects.exit('data')- return bodyRowBreak(code)- }- effects.consume(code)- return code === 92 ? bodyRowEscape : bodyRowData- }-- /**- * In table body row escape.- *- * ```markdown- * | | a |- * | | ---- |- * > | | b\-c |- * ^- * ```- *- * @type {State}- */- function bodyRowEscape(code) {- if (code === 92 || code === 124) {- effects.consume(code)- return bodyRowData- }- return bodyRowData(code)- }-}--/** @type {Resolver} */-// eslint-disable-next-line complexity-function resolveTable(events, context) {- let index = -1- let inFirstCellAwaitingPipe = true- /** @type {RowKind} */- let rowKind = 0- /** @type {Range} */- let lastCell = [0, 0, 0, 0]- /** @type {Range} */- let cell = [0, 0, 0, 0]- let afterHeadAwaitingFirstBodyRow = false- let lastTableEnd = 0- /** @type {Token | undefined} */- let currentTable- /** @type {Token | undefined} */- let currentBody- /** @type {Token | undefined} */- let currentCell- const map = new EditMap()- while (++index < events.length) {- const event = events[index]- const token = event[1]- if (event[0] === 'enter') {- // Start of head.- if (token.type === 'tableHead') {- afterHeadAwaitingFirstBodyRow = false-- // Inject previous (body end and) table end.- if (lastTableEnd !== 0) {- flushTableEnd(map, context, lastTableEnd, currentTable, currentBody)- currentBody = undefined- lastTableEnd = 0- }-- // Inject table start.- currentTable = {- type: 'table',- start: Object.assign({}, token.start),- // Note: correct end is set later.- end: Object.assign({}, token.end)- }- map.add(index, 0, [['enter', currentTable, context]])- } else if (- token.type === 'tableRow' ||- token.type === 'tableDelimiterRow'- ) {- inFirstCellAwaitingPipe = true- currentCell = undefined- lastCell = [0, 0, 0, 0]- cell = [0, index + 1, 0, 0]-- // Inject table body start.- if (afterHeadAwaitingFirstBodyRow) {- afterHeadAwaitingFirstBodyRow = false- currentBody = {- type: 'tableBody',- start: Object.assign({}, token.start),- // Note: correct end is set later.- end: Object.assign({}, token.end)- }- map.add(index, 0, [['enter', currentBody, context]])- }- rowKind = token.type === 'tableDelimiterRow' ? 2 : currentBody ? 3 : 1- }- // Cell data.- else if (- rowKind &&- (token.type === 'data' ||- token.type === 'tableDelimiterMarker' ||- token.type === 'tableDelimiterFiller')- ) {- inFirstCellAwaitingPipe = false-- // First value in cell.- if (cell[2] === 0) {- if (lastCell[1] !== 0) {- cell[0] = cell[1]- currentCell = flushCell(- map,- context,- lastCell,- rowKind,- undefined,- currentCell- )- lastCell = [0, 0, 0, 0]- }- cell[2] = index- }- } else if (token.type === 'tableCellDivider') {- if (inFirstCellAwaitingPipe) {- inFirstCellAwaitingPipe = false- } else {- if (lastCell[1] !== 0) {- cell[0] = cell[1]- currentCell = flushCell(- map,- context,- lastCell,- rowKind,- undefined,- currentCell- )- }- lastCell = cell- cell = [lastCell[1], index, 0, 0]- }- }- }- // Exit events.- else if (token.type === 'tableHead') {- afterHeadAwaitingFirstBodyRow = true- lastTableEnd = index- } else if (- token.type === 'tableRow' ||- token.type === 'tableDelimiterRow'- ) {- lastTableEnd = index- if (lastCell[1] !== 0) {- cell[0] = cell[1]- currentCell = flushCell(- map,- context,- lastCell,- rowKind,- index,- currentCell- )- } else if (cell[1] !== 0) {- currentCell = flushCell(map, context, cell, rowKind, index, currentCell)- }- rowKind = 0- } else if (- rowKind &&- (token.type === 'data' ||- token.type === 'tableDelimiterMarker' ||- token.type === 'tableDelimiterFiller')- ) {- cell[3] = index- }- }- if (lastTableEnd !== 0) {- flushTableEnd(map, context, lastTableEnd, currentTable, currentBody)- }- map.consume(context.events)-- // To do: move this into `html`, when events are exposed there.- // That’s what `markdown-rs` does.- // That needs updates to `mdast-util-gfm-table`.- index = -1- while (++index < context.events.length) {- const event = context.events[index]- if (event[0] === 'enter' && event[1].type === 'table') {- event[1]._align = gfmTableAlign(context.events, index)- }- }- return events-}--/// Generate a cell.-/**- *- * @param {EditMap} map- * @param {TokenizeContext} context- * @param {Range} range- * @param {RowKind} rowKind- * @param {number | undefined} rowEnd- * @param {Token | undefined} previousCell- * @returns {Token | undefined}- */-// eslint-disable-next-line max-params-function flushCell(map, context, range, rowKind, rowEnd, previousCell) {- // `markdown-rs` uses:- // rowKind === 2 ? 'tableDelimiterCell' : 'tableCell'- const groupName =- rowKind === 1- ? 'tableHeader'- : rowKind === 2- ? 'tableDelimiter'- : 'tableData'- // `markdown-rs` uses:- // rowKind === 2 ? 'tableDelimiterCellValue' : 'tableCellText'- const valueName = 'tableContent'-- // Insert an exit for the previous cell, if there is one.- //- // ```markdown- // > | | aa | bb | cc |- // ^-- exit- // ^^^^-- this cell- // ```- if (range[0] !== 0) {- previousCell.end = Object.assign({}, getPoint(context.events, range[0]))- map.add(range[0], 0, [['exit', previousCell, context]])- }-- // Insert enter of this cell.- //- // ```markdown- // > | | aa | bb | cc |- // ^-- enter- // ^^^^-- this cell- // ```- const now = getPoint(context.events, range[1])- previousCell = {- type: groupName,- start: Object.assign({}, now),- // Note: correct end is set later.- end: Object.assign({}, now)- }- map.add(range[1], 0, [['enter', previousCell, context]])-- // Insert text start at first data start and end at last data end, and- // remove events between.- //- // ```markdown- // > | | aa | bb | cc |- // ^-- enter- // ^-- exit- // ^^^^-- this cell- // ```- if (range[2] !== 0) {- const relatedStart = getPoint(context.events, range[2])- const relatedEnd = getPoint(context.events, range[3])- /** @type {Token} */- const valueToken = {- type: valueName,- start: Object.assign({}, relatedStart),- end: Object.assign({}, relatedEnd)- }- map.add(range[2], 0, [['enter', valueToken, context]])- if (rowKind !== 2) {- // Fix positional info on remaining events- const start = context.events[range[2]]- const end = context.events[range[3]]- start[1].end = Object.assign({}, end[1].end)- start[1].type = 'chunkText'- start[1].contentType = 'text'-- // Remove if needed.- if (range[3] > range[2] + 1) {- const a = range[2] + 1- const b = range[3] - range[2] - 1- map.add(a, b, [])- }- }- map.add(range[3] + 1, 0, [['exit', valueToken, context]])- }-- // Insert an exit for the last cell, if at the row end.- //- // ```markdown- // > | | aa | bb | cc |- // ^-- exit- // ^^^^^^-- this cell (the last one contains two “between” parts)- // ```- if (rowEnd !== undefined) {- previousCell.end = Object.assign({}, getPoint(context.events, rowEnd))- map.add(rowEnd, 0, [['exit', previousCell, context]])- previousCell = undefined- }- return previousCell-}--/**- * Generate table end (and table body end).- *- * @param {EditMap} map- * @param {TokenizeContext} context- * @param {number} index- * @param {Token} table- * @param {Token | undefined} tableBody- */-// eslint-disable-next-line max-params-function flushTableEnd(map, context, index, table, tableBody) {- /** @type {Array<Event>} */- const exits = []- const related = getPoint(context.events, index)- if (tableBody) {- tableBody.end = Object.assign({}, related)- exits.push(['exit', tableBody, context])- }- table.end = Object.assign({}, related)- exits.push(['exit', table, context])- map.add(index + 1, 0, exits)-}--/**- * @param {Array<Event>} events- * @param {number} index- * @returns {readonly Point}- */-function getPoint(events, index) {- const event = events[index]- const side = event[0] === 'enter' ? 'start' : 'end'- return event[1][side]-}--;// CONCATENATED MODULE: ./node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js-/**- * @typedef {import('micromark-util-types').Extension} Extension- * @typedef {import('micromark-util-types').State} State- * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext- * @typedef {import('micromark-util-types').Tokenizer} Tokenizer- */----const tasklistCheck = {- tokenize: tokenizeTasklistCheck-}--// To do: next major: expose function to make extension.--/**- * Extension for `micromark` that can be passed in `extensions`, to- * enable GFM task list items syntax.- *- * @type {Extension}- */-const gfmTaskListItem = {- text: {- [91]: tasklistCheck- }-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function tokenizeTasklistCheck(effects, ok, nok) {- const self = this- return open-- /**- * At start of task list item check.- *- * ```markdown- * > | * [x] y.- * ^- * ```- *- * @type {State}- */- function open(code) {- if (- // Exit if there’s stuff before.- self.previous !== null ||- // Exit if not in the first content that is the first child of a list- // item.- !self._gfmTasklistFirstContentOfListItem- ) {- return nok(code)- }- effects.enter('taskListCheck')- effects.enter('taskListCheckMarker')- effects.consume(code)- effects.exit('taskListCheckMarker')- return inside- }-- /**- * In task list item check.- *- * ```markdown- * > | * [x] y.- * ^- * ```- *- * @type {State}- */- function inside(code) {- // Currently we match how GH works in files.- // To match how GH works in comments, use `markdownSpace` (`[\t ]`) instead- // of `markdownLineEndingOrSpace` (`[\t\n\r ]`).- if (markdownLineEndingOrSpace(code)) {- effects.enter('taskListCheckValueUnchecked')- effects.consume(code)- effects.exit('taskListCheckValueUnchecked')- return close- }- if (code === 88 || code === 120) {- effects.enter('taskListCheckValueChecked')- effects.consume(code)- effects.exit('taskListCheckValueChecked')- return close- }- return nok(code)- }-- /**- * At close of task list item check.- *- * ```markdown- * > | * [x] y.- * ^- * ```- *- * @type {State}- */- function close(code) {- if (code === 93) {- effects.enter('taskListCheckMarker')- effects.consume(code)- effects.exit('taskListCheckMarker')- effects.exit('taskListCheck')- return after- }- return nok(code)- }-- /**- * @type {State}- */- function after(code) {- // EOL in paragraph means there must be something else after it.- if (markdownLineEnding(code)) {- return ok(code)- }-- // Space or tab?- // Check what comes after.- if (markdownSpace(code)) {- return effects.check(- {- tokenize: spaceThenNonSpace- },- ok,- nok- )(code)- }-- // EOF, or non-whitespace, both wrong.- return nok(code)- }-}--/**- * @this {TokenizeContext}- * @type {Tokenizer}- */-function spaceThenNonSpace(effects, ok, nok) {- return factorySpace(effects, after, 'whitespace')-- /**- * After whitespace, after task list item check.- *- * ```markdown- * > | * [x] y.- * ^- * ```- *- * @type {State}- */- function after(code) {- // EOF means there was nothing, so bad.- // EOL means there’s content after it, so good.- // Impossible to have more spaces.- // Anything else is good.- return code === null ? nok(code) : ok(code)- }-}--;// CONCATENATED MODULE: ./node_modules/micromark-extension-gfm/index.js-/**- * @typedef {import('micromark-extension-gfm-footnote').HtmlOptions} HtmlOptions- * @typedef {import('micromark-extension-gfm-strikethrough').Options} Options- * @typedef {import('micromark-util-types').Extension} Extension- * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension- */----------/**- * Create an extension for `micromark` to enable GFM syntax.- *- * @param {Options | null | undefined} [options]- * Configuration (optional).- *- * Passed to `micromark-extens-gfm-strikethrough`.- * @returns {Extension}- * Extension for `micromark` that can be passed in `extensions` to enable GFM- * syntax.- */-function gfm(options) {- return combineExtensions([- gfmAutolinkLiteral,- gfmFootnote(),- gfmStrikethrough(options),- gfmTable,- gfmTaskListItem- ])-}--/**- * Create an extension for `micromark` to support GFM when serializing to HTML.- *- * @param {HtmlOptions | null | undefined} [options]- * Configuration.- *- * Passed to `micromark-extens-gfm-footnote`.- * @returns {HtmlExtension}- * Extension for `micromark` that can be passed in `htmlExtensions` to- * support GFM when serializing to HTML.- */-function gfmHtml(options) {- return combineHtmlExtensions([- gfmAutolinkLiteralHtml,- gfmFootnoteHtml(options),- gfmStrikethroughHtml,- gfmTableHtml,- gfmTagfilterHtml,- gfmTaskListItemHtml- ])-}--;// CONCATENATED MODULE: ./node_modules/ccount/index.js-/**- * Count how often a character (or substring) is used in a string.- *- * @param {string} value- * Value to search in.- * @param {string} character- * Character (or substring) to look for.- * @return {number}- * Number of times `character` occurred in `value`.- */-function ccount(value, character) {- const source = String(value)-- if (typeof character !== 'string') {- throw new TypeError('Expected character')- }-- let count = 0- let index = source.indexOf(character)-- while (index !== -1) {- count++- index = source.indexOf(character, index + character.length)- }-- return count-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js-function escapeStringRegexp(string) {- if (typeof string !== 'string') {- throw new TypeError('Expected a string');- }-- // Escape characters with special meaning either inside or outside character sets.- // Use a simple backslash escape when it’s always valid, and a `\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.- return string- .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')- .replace(/-/g, '\\x2d');-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-find-and-replace/lib/index.js-/**- * @typedef {import('mdast').Parent} MdastParent- * @typedef {import('mdast').Root} Root- * @typedef {import('mdast').Content} Content- * @typedef {import('mdast').PhrasingContent} PhrasingContent- * @typedef {import('mdast').Text} Text- * @typedef {import('unist-util-visit-parents').Test} Test- * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult- */--/**- * @typedef {Content | Root} Node- * @typedef {Extract<Node, MdastParent>} Parent- * @typedef {Exclude<Parent, Root>} ContentParent- *- * @typedef RegExpMatchObject- * Info on the match.- * @property {number} index- * The index of the search at which the result was found.- * @property {string} input- * A copy of the search string in the text node.- * @property {[Root, ...Array<ContentParent>, Text]} stack- * All ancestors of the text node, where the last node is the text itself.- *- * @callback ReplaceFunction- * Callback called when a search matches.- * @param {...any} parameters- * The parameters are the result of corresponding search expression:- *- * * `value` (`string`) — whole match- * * `...capture` (`Array<string>`) — matches from regex capture groups- * * `match` (`RegExpMatchObject`) — info on the match- * @returns {Array<PhrasingContent> | PhrasingContent | string | false | undefined | null}- * Thing to replace with.- *- * * when `null`, `undefined`, `''`, remove the match- * * …or when `false`, do not replace at all- * * …or when `string`, replace with a text node of that value- * * …or when `Node` or `Array<Node>`, replace with those nodes- *- * @typedef {string | RegExp} Find- * Pattern to find.- *- * Strings are escaped and then turned into global expressions.- *- * @typedef {Array<FindAndReplaceTuple>} FindAndReplaceList- * Several find and replaces, in array form.- * @typedef {Record<string, Replace>} FindAndReplaceSchema- * Several find and replaces, in object form.- * @typedef {[Find, Replace]} FindAndReplaceTuple- * Find and replace in tuple form.- * @typedef {string | ReplaceFunction} Replace- * Thing to replace with.- * @typedef {[RegExp, ReplaceFunction]} Pair- * Normalized find and replace.- * @typedef {Array<Pair>} Pairs- * All find and replaced.- *- * @typedef Options- * Configuration.- * @property {Test | null | undefined} [ignore]- * Test for which nodes to ignore.- */------const mdast_util_find_and_replace_lib_own = {}.hasOwnProperty--/**- * Find patterns in a tree and replace them.- *- * The algorithm searches the tree in *preorder* for complete values in `Text`- * nodes.- * Partial matches are not supported.- *- * @param tree- * Tree to change.- * @param find- * Patterns to find.- * @param replace- * Things to replace with (when `find` is `Find`) or configuration.- * @param options- * Configuration (when `find` is not `Find`).- * @returns- * Given, modified, tree.- */-// To do: next major: remove `find` & `replace` combo, remove schema.-const findAndReplace =- /**- * @type {(- * (<Tree extends Node>(tree: Tree, find: Find, replace?: Replace | null | undefined, options?: Options | null | undefined) => Tree) &- * (<Tree extends Node>(tree: Tree, schema: FindAndReplaceSchema | FindAndReplaceList, options?: Options | null | undefined) => Tree)- * )}- **/- (- /**- * @template {Node} Tree- * @param {Tree} tree- * @param {Find | FindAndReplaceSchema | FindAndReplaceList} find- * @param {Replace | Options | null | undefined} [replace]- * @param {Options | null | undefined} [options]- * @returns {Tree}- */- function (tree, find, replace, options) {- /** @type {Options | null | undefined} */- let settings- /** @type {FindAndReplaceSchema|FindAndReplaceList} */- let schema-- if (typeof find === 'string' || find instanceof RegExp) {- // @ts-expect-error don’t expect options twice.- schema = [[find, replace]]- settings = options- } else {- schema = find- // @ts-expect-error don’t expect replace twice.- settings = replace- }-- if (!settings) {- settings = {}- }-- const ignored = convert(settings.ignore || [])- const pairs = toPairs(schema)- let pairIndex = -1-- while (++pairIndex < pairs.length) {- visitParents(tree, 'text', visitor)- }-- // To do next major: don’t return the given tree.- return tree-- /** @type {import('unist-util-visit-parents/complex-types.js').BuildVisitor<Root, 'text'>} */- function visitor(node, parents) {- let index = -1- /** @type {Parent | undefined} */- let grandparent-- while (++index < parents.length) {- const parent = parents[index]-- if (- ignored(- parent,- // @ts-expect-error: TS doesn’t understand but it’s perfect.- grandparent ? grandparent.children.indexOf(parent) : undefined,- grandparent- )- ) {- return- }-- grandparent = parent- }-- if (grandparent) {- return handler(node, parents)- }- }-- /**- * Handle a text node which is not in an ignored parent.- *- * @param {Text} node- * Text node.- * @param {Array<Parent>} parents- * Parents.- * @returns {VisitorResult}- * Result.- */- function handler(node, parents) {- const parent = parents[parents.length - 1]- const find = pairs[pairIndex][0]- const replace = pairs[pairIndex][1]- let start = 0- // @ts-expect-error: TS is wrong, some of these children can be text.- const index = parent.children.indexOf(node)- let change = false- /** @type {Array<PhrasingContent>} */- let nodes = []-- find.lastIndex = 0-- let match = find.exec(node.value)-- while (match) {- const position = match.index- /** @type {RegExpMatchObject} */- const matchObject = {- index: match.index,- input: match.input,- // @ts-expect-error: stack is fine.- stack: [...parents, node]- }- let value = replace(...match, matchObject)-- if (typeof value === 'string') {- value = value.length > 0 ? {type: 'text', value} : undefined- }-- // It wasn’t a match after all.- if (value !== false) {- if (start !== position) {- nodes.push({- type: 'text',- value: node.value.slice(start, position)- })- }-- if (Array.isArray(value)) {- nodes.push(...value)- } else if (value) {- nodes.push(value)- }-- start = position + match[0].length- change = true- }-- if (!find.global) {- break- }-- match = find.exec(node.value)- }-- if (change) {- if (start < node.value.length) {- nodes.push({type: 'text', value: node.value.slice(start)})- }-- parent.children.splice(index, 1, ...nodes)- } else {- nodes = [node]- }-- return index + nodes.length- }- }- )--/**- * Turn a schema into pairs.- *- * @param {FindAndReplaceSchema | FindAndReplaceList} schema- * Schema.- * @returns {Pairs}- * Clean pairs.- */-function toPairs(schema) {- /** @type {Pairs} */- const result = []-- if (typeof schema !== 'object') {- throw new TypeError('Expected array or object as schema')- }-- if (Array.isArray(schema)) {- let index = -1-- while (++index < schema.length) {- result.push([- toExpression(schema[index][0]),- toFunction(schema[index][1])- ])- }- } else {- /** @type {string} */- let key-- for (key in schema) {- if (mdast_util_find_and_replace_lib_own.call(schema, key)) {- result.push([toExpression(key), toFunction(schema[key])])- }- }- }-- return result-}--/**- * Turn a find into an expression.- *- * @param {Find} find- * Find.- * @returns {RegExp}- * Expression.- */-function toExpression(find) {- return typeof find === 'string' ? new RegExp(escapeStringRegexp(find), 'g') : find-}--/**- * Turn a replace into a function.- *- * @param {Replace} replace- * Replace.- * @returns {ReplaceFunction}- * Function.- */-function toFunction(replace) {- return typeof replace === 'function' ? replace : () => replace-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-gfm-autolink-literal/lib/index.js-/**- * @typedef {import('mdast').Link} Link- * @typedef {import('mdast').PhrasingContent} PhrasingContent- *- * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext- * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension- * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle- * @typedef {import('mdast-util-from-markdown').Transform} FromMarkdownTransform- *- * @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName- * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension- *- * @typedef {import('mdast-util-find-and-replace').ReplaceFunction} ReplaceFunction- * @typedef {import('mdast-util-find-and-replace').RegExpMatchObject} RegExpMatchObject- */------/** @type {ConstructName} */-const inConstruct = 'phrasing'-/** @type {Array<ConstructName>} */-const notInConstruct = ['autolink', 'link', 'image', 'label']--// To do: next major: expose functions instead of extensions.--/**- * Extension for `mdast-util-from-markdown` to enable GFM autolink literals.- *- * @type {FromMarkdownExtension}- */-const gfmAutolinkLiteralFromMarkdown = {- transforms: [transformGfmAutolinkLiterals],- enter: {- literalAutolink: enterLiteralAutolink,- literalAutolinkEmail: enterLiteralAutolinkValue,- literalAutolinkHttp: enterLiteralAutolinkValue,- literalAutolinkWww: enterLiteralAutolinkValue- },- exit: {- literalAutolink: exitLiteralAutolink,- literalAutolinkEmail: exitLiteralAutolinkEmail,- literalAutolinkHttp: exitLiteralAutolinkHttp,- literalAutolinkWww: exitLiteralAutolinkWww- }-}--/**- * Extension for `mdast-util-to-markdown` to enable GFM autolink literals.- *- * @type {ToMarkdownExtension}- */-const gfmAutolinkLiteralToMarkdown = {- unsafe: [- {- character: '@',- before: '[+\\-.\\w]',- after: '[\\-.\\w]',- inConstruct,- notInConstruct- },- {- character: '.',- before: '[Ww]',- after: '[\\-.\\w]',- inConstruct,- notInConstruct- },- {character: ':', before: '[ps]', after: '\\/', inConstruct, notInConstruct}- ]-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function enterLiteralAutolink(token) {- this.enter({type: 'link', title: null, url: '', children: []}, token)-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function enterLiteralAutolinkValue(token) {- this.config.enter.autolinkProtocol.call(this, token)-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function exitLiteralAutolinkHttp(token) {- this.config.exit.autolinkProtocol.call(this, token)-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function exitLiteralAutolinkWww(token) {- this.config.exit.data.call(this, token)- const node = /** @type {Link} */ (this.stack[this.stack.length - 1])- node.url = 'http://' + this.sliceSerialize(token)-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function exitLiteralAutolinkEmail(token) {- this.config.exit.autolinkEmail.call(this, token)-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function exitLiteralAutolink(token) {- this.exit(token)-}--/** @type {FromMarkdownTransform} */-function transformGfmAutolinkLiterals(tree) {- findAndReplace(- tree,- [- [/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, findUrl],- [/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g, findEmail]- ],- {ignore: ['link', 'linkReference']}- )-}--/**- * @type {ReplaceFunction}- * @param {string} _- * @param {string} protocol- * @param {string} domain- * @param {string} path- * @param {RegExpMatchObject} match- * @returns {Link | Array<PhrasingContent> | false}- */-// eslint-disable-next-line max-params-function findUrl(_, protocol, domain, path, match) {- let prefix = ''-- // Not an expected previous character.- if (!lib_previous(match)) {- return false- }-- // Treat `www` as part of the domain.- if (/^w/i.test(protocol)) {- domain = protocol + domain- protocol = ''- prefix = 'http://'- }-- if (!isCorrectDomain(domain)) {- return false- }-- const parts = splitUrl(domain + path)-- if (!parts[0]) return false-- /** @type {Link} */- const result = {- type: 'link',- title: null,- url: prefix + protocol + parts[0],- children: [{type: 'text', value: protocol + parts[0]}]- }-- if (parts[1]) {- return [result, {type: 'text', value: parts[1]}]- }-- return result-}--/**- * @type {ReplaceFunction}- * @param {string} _- * @param {string} atext- * @param {string} label- * @param {RegExpMatchObject} match- * @returns {Link | false}- */-function findEmail(_, atext, label, match) {- if (- // Not an expected previous character.- !lib_previous(match, true) ||- // Label ends in not allowed character.- /[-\d_]$/.test(label)- ) {- return false- }-- return {- type: 'link',- title: null,- url: 'mailto:' + atext + '@' + label,- children: [{type: 'text', value: atext + '@' + label}]- }-}--/**- * @param {string} domain- * @returns {boolean}- */-function isCorrectDomain(domain) {- const parts = domain.split('.')-- if (- parts.length < 2 ||- (parts[parts.length - 1] &&- (/_/.test(parts[parts.length - 1]) ||- !/[a-zA-Z\d]/.test(parts[parts.length - 1]))) ||- (parts[parts.length - 2] &&- (/_/.test(parts[parts.length - 2]) ||- !/[a-zA-Z\d]/.test(parts[parts.length - 2])))- ) {- return false- }-- return true-}--/**- * @param {string} url- * @returns {[string, string | undefined]}- */-function splitUrl(url) {- const trailExec = /[!"&'),.:;<>?\]}]+$/.exec(url)-- if (!trailExec) {- return [url, undefined]- }-- url = url.slice(0, trailExec.index)-- let trail = trailExec[0]- let closingParenIndex = trail.indexOf(')')- const openingParens = ccount(url, '(')- let closingParens = ccount(url, ')')-- while (closingParenIndex !== -1 && openingParens > closingParens) {- url += trail.slice(0, closingParenIndex + 1)- trail = trail.slice(closingParenIndex + 1)- closingParenIndex = trail.indexOf(')')- closingParens++- }-- return [url, trail]-}--/**- * @param {RegExpMatchObject} match- * @param {boolean | null | undefined} [email=false]- * @returns {boolean}- */-function lib_previous(match, email) {- const code = match.input.charCodeAt(match.index - 1)-- return (- (match.index === 0 ||- unicodeWhitespace(code) ||- unicodePunctuation(code)) &&- (!email || code !== 47)- )-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-markdown/lib/util/association.js-/**- * @typedef {import('../types.js').AssociationId} AssociationId- */----/**- * Get an identifier from an association to match it to others.- *- * Associations are nodes that match to something else through an ID:- * <https://github.com/syntax-tree/mdast#association>.- *- * The `label` of an association is the string value: character escapes and- * references work, and casing is intact.- * The `identifier` is used to match one association to another:- * controversially, character escapes and references don’t work in this- * matching: `©` does not match `©`, and `\+` does not match `+`.- *- * But casing is ignored (and whitespace) is trimmed and collapsed: ` A\nb`- * matches `a b`.- * So, we do prefer the label when figuring out how we’re going to serialize:- * it has whitespace, casing, and we can ignore most useless character- * escapes and all character references.- *- * @type {AssociationId}- */-function association(node) {- if (node.label || !node.identifier) {- return node.label || ''- }-- return decodeString(node.identifier)-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-markdown/lib/util/container-flow.js-/**- * @typedef {import('../types.js').FlowContent} FlowContent- * @typedef {import('../types.js').Node} Node- * @typedef {import('../types.js').Parent} Parent- * @typedef {import('../types.js').State} State- * @typedef {import('../types.js').TrackFields} TrackFields- */--/**- * @param {Parent & {children: Array<FlowContent>}} parent- * Parent of flow nodes.- * @param {State} state- * Info passed around about the current state.- * @param {TrackFields} info- * Info on where we are in the document we are generating.- * @returns {string}- * Serialized children, joined by (blank) lines.- */-function containerFlow(parent, state, info) {- const indexStack = state.indexStack- const children = parent.children || []- const tracker = state.createTracker(info)- /** @type {Array<string>} */- const results = []- let index = -1-- indexStack.push(-1)-- while (++index < children.length) {- const child = children[index]-- indexStack[indexStack.length - 1] = index-- results.push(- tracker.move(- state.handle(child, parent, state, {- before: '\n',- after: '\n',- ...tracker.current()- })- )- )-- if (child.type !== 'list') {- state.bulletLastUsed = undefined- }-- if (index < children.length - 1) {- results.push(- tracker.move(between(child, children[index + 1], parent, state))- )- }- }-- indexStack.pop()-- return results.join('')-}--/**- * @param {Node} left- * @param {Node} right- * @param {Parent} parent- * @param {State} state- * @returns {string}- */-function between(left, right, parent, state) {- let index = state.join.length-- while (index--) {- const result = state.join[index](left, right, parent, state)-- if (result === true || result === 1) {- break- }-- if (typeof result === 'number') {- return '\n'.repeat(1 + result)- }-- if (result === false) {- return '\n\n<!---->\n\n'- }- }-- return '\n\n'-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-markdown/lib/util/indent-lines.js-/**- * @typedef {import('../types.js').IndentLines} IndentLines- */--const eol = /\r?\n|\r/g--/**- * @type {IndentLines}- */-function indentLines(value, map) {- /** @type {Array<string>} */- const result = []- let start = 0- let line = 0- /** @type {RegExpExecArray | null} */- let match-- while ((match = eol.exec(value))) {- one(value.slice(start, match.index))- result.push(match[0])- start = match.index + match[0].length- line++- }-- one(value.slice(start))-- return result.join('')-- /**- * @param {string} value- */- function one(value) {- result.push(map(value, line, !value))- }-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js-/**- * @typedef {import('../types.js').Unsafe} Unsafe- */--/**- * @param {Unsafe} pattern- * @returns {RegExp}- */-function patternCompile(pattern) {- if (!pattern._compiled) {- const before =- (pattern.atBreak ? '[\\r\\n][\\t ]*' : '') +- (pattern.before ? '(?:' + pattern.before + ')' : '')-- pattern._compiled = new RegExp(- (before ? '(' + before + ')' : '') +- (/[|\\{}()[\]^$+*?.-]/.test(pattern.character) ? '\\' : '') +- pattern.character +- (pattern.after ? '(?:' + pattern.after + ')' : ''),- 'g'- )- }-- return pattern._compiled-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js-/**- * @typedef {import('../types.js').Unsafe} Unsafe- * @typedef {import('../types.js').ConstructName} ConstructName- */--/**- * @param {Array<ConstructName>} stack- * @param {Unsafe} pattern- * @returns {boolean}- */-function patternInScope(stack, pattern) {- return (- listInScope(stack, pattern.inConstruct, true) &&- !listInScope(stack, pattern.notInConstruct, false)- )-}--/**- * @param {Array<ConstructName>} stack- * @param {Unsafe['inConstruct']} list- * @param {boolean} none- * @returns {boolean}- */-function listInScope(stack, list, none) {- if (typeof list === 'string') {- list = [list]- }-- if (!list || list.length === 0) {- return none- }-- let index = -1-- while (++index < list.length) {- if (stack.includes(list[index])) {- return true- }- }-- return false-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-markdown/lib/util/safe.js-/**- * @typedef {import('../types.js').State} State- * @typedef {import('../types.js').SafeConfig} SafeConfig- */-----/**- * Make a string safe for embedding in markdown constructs.- *- * In markdown, almost all punctuation characters can, in certain cases,- * result in something.- * Whether they do is highly subjective to where they happen and in what- * they happen.- *- * To solve this, `mdast-util-to-markdown` tracks:- *- * * Characters before and after something;- * * What “constructs” we are in.- *- * This information is then used by this function to escape or encode- * special characters.- *- * @param {State} state- * Info passed around about the current state.- * @param {string | null | undefined} input- * Raw value to make safe.- * @param {SafeConfig} config- * Configuration.- * @returns {string}- * Serialized markdown safe for embedding.- */-function safe(state, input, config) {- const value = (config.before || '') + (input || '') + (config.after || '')- /** @type {Array<number>} */- const positions = []- /** @type {Array<string>} */- const result = []- /** @type {Record<number, {before: boolean, after: boolean}>} */- const infos = {}- let index = -1-- while (++index < state.unsafe.length) {- const pattern = state.unsafe[index]-- if (!patternInScope(state.stack, pattern)) {- continue- }-- const expression = patternCompile(pattern)- /** @type {RegExpExecArray | null} */- let match-- while ((match = expression.exec(value))) {- const before = 'before' in pattern || Boolean(pattern.atBreak)- const after = 'after' in pattern- const position = match.index + (before ? match[1].length : 0)-- if (positions.includes(position)) {- if (infos[position].before && !before) {- infos[position].before = false- }-- if (infos[position].after && !after) {- infos[position].after = false- }- } else {- positions.push(position)- infos[position] = {before, after}- }- }- }-- positions.sort(numerical)-- let start = config.before ? config.before.length : 0- const end = value.length - (config.after ? config.after.length : 0)- index = -1-- while (++index < positions.length) {- const position = positions[index]-- // Character before or after matched:- if (position < start || position >= end) {- continue- }-- // If this character is supposed to be escaped because it has a condition on- // the next character, and the next character is definitly being escaped,- // then skip this escape.- if (- (position + 1 < end &&- positions[index + 1] === position + 1 &&- infos[position].after &&- !infos[position + 1].before &&- !infos[position + 1].after) ||- (positions[index - 1] === position - 1 &&- infos[position].before &&- !infos[position - 1].before &&- !infos[position - 1].after)- ) {- continue- }-- if (start !== position) {- // If we have to use a character reference, an ampersand would be more- // correct, but as backslashes only care about punctuation, either will- // do the trick- result.push(escapeBackslashes(value.slice(start, position), '\\'))- }-- start = position-- if (- /[!-/:-@[-`{-~]/.test(value.charAt(position)) &&- (!config.encode || !config.encode.includes(value.charAt(position)))- ) {- // Character escape.- result.push('\\')- } else {- // Character reference.- result.push(- '&#x' + value.charCodeAt(position).toString(16).toUpperCase() + ';'- )- start++- }- }-- result.push(escapeBackslashes(value.slice(start, end), config.after))-- return result.join('')-}--/**- * @param {number} a- * @param {number} b- * @returns {number}- */-function numerical(a, b) {- return a - b-}--/**- * @param {string} value- * @param {string} after- * @returns {string}- */-function escapeBackslashes(value, after) {- const expression = /\\(?=[!-/:-@[-`{-~])/g- /** @type {Array<number>} */- const positions = []- /** @type {Array<string>} */- const results = []- const whole = value + after- let index = -1- let start = 0- /** @type {RegExpExecArray | null} */- let match-- while ((match = expression.exec(whole))) {- positions.push(match.index)- }-- while (++index < positions.length) {- if (start !== positions[index]) {- results.push(value.slice(start, positions[index]))- }-- results.push('\\')- start = positions[index]- }-- results.push(value.slice(start))-- return results.join('')-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-markdown/lib/util/track.js-/**- * @typedef {import('../types.js').CreateTracker} CreateTracker- * @typedef {import('../types.js').TrackCurrent} TrackCurrent- * @typedef {import('../types.js').TrackMove} TrackMove- * @typedef {import('../types.js').TrackShift} TrackShift- */--/**- * Track positional info in the output.- *- * @type {CreateTracker}- */-function track(config) {- // Defaults are used to prevent crashes when older utilities somehow activate- // this code.- /* c8 ignore next 5 */- const options = config || {}- const now = options.now || {}- let lineShift = options.lineShift || 0- let line = now.line || 1- let column = now.column || 1-- return {move, current, shift}-- /**- * Get the current tracked info.- *- * @type {TrackCurrent}- */- function current() {- return {now: {line, column}, lineShift}- }-- /**- * Define an increased line shift (the typical indent for lines).- *- * @type {TrackShift}- */- function shift(value) {- lineShift += value- }-- /**- * Move past some generated markdown.- *- * @type {TrackMove}- */- function move(input) {- // eslint-disable-next-line unicorn/prefer-default-parameters- const value = input || ''- const chunks = value.split(/\r?\n|\r/g)- const tail = chunks[chunks.length - 1]- line += chunks.length - 1- column =- chunks.length === 1 ? column + tail.length : 1 + tail.length + lineShift- return value- }-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-gfm-footnote/lib/index.js-/**- * @typedef {import('mdast').FootnoteReference} FootnoteReference- * @typedef {import('mdast').FootnoteDefinition} FootnoteDefinition- * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext- * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension- * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle- * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension- * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle- * @typedef {import('mdast-util-to-markdown').Map} Map- */---------lib_footnoteReference.peek = footnoteReferencePeek--// To do: next major: rename `context` -> `state`, `safeOptions` to `info`, use-// utilities on `state`.--/**- * Create an extension for `mdast-util-from-markdown` to enable GFM footnotes- * in markdown.- *- * @returns {FromMarkdownExtension}- * Extension for `mdast-util-from-markdown`.- */-function gfmFootnoteFromMarkdown() {- return {- enter: {- gfmFootnoteDefinition: enterFootnoteDefinition,- gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,- gfmFootnoteCall: enterFootnoteCall,- gfmFootnoteCallString: enterFootnoteCallString- },- exit: {- gfmFootnoteDefinition: exitFootnoteDefinition,- gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,- gfmFootnoteCall: exitFootnoteCall,- gfmFootnoteCallString: exitFootnoteCallString- }- }-}--/**- * Create an extension for `mdast-util-to-markdown` to enable GFM footnotes- * in markdown.- *- * @returns {ToMarkdownExtension}- * Extension for `mdast-util-to-markdown`.- */-function gfmFootnoteToMarkdown() {- return {- // This is on by default already.- unsafe: [{character: '[', inConstruct: ['phrasing', 'label', 'reference']}],- handlers: {footnoteDefinition, footnoteReference: lib_footnoteReference}- }-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function enterFootnoteDefinition(token) {- this.enter(- {type: 'footnoteDefinition', identifier: '', label: '', children: []},- token- )-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function enterFootnoteDefinitionLabelString() {- this.buffer()-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function exitFootnoteDefinitionLabelString(token) {- const label = this.resume()- const node = /** @type {FootnoteDefinition} */ (- this.stack[this.stack.length - 1]- )- node.label = label- node.identifier = normalizeIdentifier(- this.sliceSerialize(token)- ).toLowerCase()-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function exitFootnoteDefinition(token) {- this.exit(token)-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function enterFootnoteCall(token) {- this.enter({type: 'footnoteReference', identifier: '', label: ''}, token)-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function enterFootnoteCallString() {- this.buffer()-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function exitFootnoteCallString(token) {- const label = this.resume()- const node = /** @type {FootnoteDefinition} */ (- this.stack[this.stack.length - 1]- )- node.label = label- node.identifier = normalizeIdentifier(- this.sliceSerialize(token)- ).toLowerCase()-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function exitFootnoteCall(token) {- this.exit(token)-}--/**- * @type {ToMarkdownHandle}- * @param {FootnoteReference} node- */-function lib_footnoteReference(node, _, context, safeOptions) {- const tracker = track(safeOptions)- let value = tracker.move('[^')- const exit = context.enter('footnoteReference')- const subexit = context.enter('reference')- value += tracker.move(- safe(context, association(node), {- ...tracker.current(),- before: value,- after: ']'- })- )- subexit()- exit()- value += tracker.move(']')- return value-}--/** @type {ToMarkdownHandle} */-function footnoteReferencePeek() {- return '['-}--/**- * @type {ToMarkdownHandle}- * @param {FootnoteDefinition} node- */-function footnoteDefinition(node, _, context, safeOptions) {- const tracker = track(safeOptions)- let value = tracker.move('[^')- const exit = context.enter('footnoteDefinition')- const subexit = context.enter('label')- value += tracker.move(- safe(context, association(node), {- ...tracker.current(),- before: value,- after: ']'- })- )- subexit()- value += tracker.move(- ']:' + (node.children && node.children.length > 0 ? ' ' : '')- )- tracker.shift(4)- value += tracker.move(- indentLines(containerFlow(node, context, tracker.current()), map)- )- exit()-- return value-}--/** @type {Map} */-function map(line, index, blank) {- if (index === 0) {- return line- }-- return (blank ? '' : ' ') + line-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js-/**- * @typedef {import('../types.js').Handle} Handle- * @typedef {import('../types.js').Info} Info- * @typedef {import('../types.js').Parent} Parent- * @typedef {import('../types.js').PhrasingContent} PhrasingContent- * @typedef {import('../types.js').State} State- */--/**- * Serialize the children of a parent that contains phrasing children.- *- * These children will be joined flush together.- *- * @param {Parent & {children: Array<PhrasingContent>}} parent- * Parent of flow nodes.- * @param {State} state- * Info passed around about the current state.- * @param {Info} info- * Info on where we are in the document we are generating.- * @returns {string}- * Serialized children, joined together.- */-function containerPhrasing(parent, state, info) {- const indexStack = state.indexStack- const children = parent.children || []- /** @type {Array<string>} */- const results = []- let index = -1- let before = info.before-- indexStack.push(-1)- let tracker = state.createTracker(info)-- while (++index < children.length) {- const child = children[index]- /** @type {string} */- let after-- indexStack[indexStack.length - 1] = index-- if (index + 1 < children.length) {- /** @type {Handle} */- // @ts-expect-error: hush, it’s actually a `zwitch`.- let handle = state.handle.handlers[children[index + 1].type]- /** @type {Handle} */- // @ts-expect-error: hush, it’s actually a `zwitch`.- if (handle && handle.peek) handle = handle.peek- after = handle- ? handle(children[index + 1], parent, state, {- before: '',- after: '',- ...tracker.current()- }).charAt(0)- : ''- } else {- after = info.after- }-- // In some cases, html (text) can be found in phrasing right after an eol.- // When we’d serialize that, in most cases that would be seen as html- // (flow).- // As we can’t escape or so to prevent it from happening, we take a somewhat- // reasonable approach: replace that eol with a space.- // See: <https://github.com/syntax-tree/mdast-util-to-markdown/issues/15>- if (- results.length > 0 &&- (before === '\r' || before === '\n') &&- child.type === 'html'- ) {- results[results.length - 1] = results[results.length - 1].replace(- /(\r?\n|\r)$/,- ' '- )- before = ' '-- // To do: does this work to reset tracker?- tracker = state.createTracker(info)- tracker.move(results.join(''))- }-- results.push(- tracker.move(- state.handle(child, parent, state, {- ...tracker.current(),- before,- after- })- )- )-- before = results[results.length - 1].slice(-1)- }-- indexStack.pop()-- return results.join('')-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-gfm-strikethrough/lib/index.js-/**- * @typedef {import('mdast').Delete} Delete- *- * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext- * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension- * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle- *- * @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName- * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension- * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle- */-----// To do: next major: expose functions.-// To do: next major: use `state`, state utilities.--/**- * List of constructs that occur in phrasing (paragraphs, headings), but cannot- * contain strikethrough.- * So they sort of cancel each other out.- * Note: could use a better name.- *- * Note: keep in sync with: <https://github.com/syntax-tree/mdast-util-to-markdown/blob/8ce8dbf/lib/unsafe.js#L14>- *- * @type {Array<ConstructName>}- */-const constructsWithoutStrikethrough = [- 'autolink',- 'destinationLiteral',- 'destinationRaw',- 'reference',- 'titleQuote',- 'titleApostrophe'-]--handleDelete.peek = peekDelete--/**- * Extension for `mdast-util-from-markdown` to enable GFM strikethrough.- *- * @type {FromMarkdownExtension}- */-const gfmStrikethroughFromMarkdown = {- canContainEols: ['delete'],- enter: {strikethrough: enterStrikethrough},- exit: {strikethrough: exitStrikethrough}-}--/**- * Extension for `mdast-util-to-markdown` to enable GFM strikethrough.- *- * @type {ToMarkdownExtension}- */-const gfmStrikethroughToMarkdown = {- unsafe: [- {- character: '~',- inConstruct: 'phrasing',- notInConstruct: constructsWithoutStrikethrough- }- ],- handlers: {delete: handleDelete}-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function enterStrikethrough(token) {- this.enter({type: 'delete', children: []}, token)-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function exitStrikethrough(token) {- this.exit(token)-}--/**- * @type {ToMarkdownHandle}- * @param {Delete} node- */-function handleDelete(node, _, context, safeOptions) {- const tracker = track(safeOptions)- const exit = context.enter('strikethrough')- let value = tracker.move('~~')- value += containerPhrasing(node, context, {- ...tracker.current(),- before: value,- after: '~'- })- value += tracker.move('~~')- exit()- return value-}--/** @type {ToMarkdownHandle} */-function peekDelete() {- return '~'-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-markdown/lib/handle/inline-code.js-/**- * @typedef {import('mdast').InlineCode} InlineCode- * @typedef {import('../types.js').Parent} Parent- * @typedef {import('../types.js').State} State- */----inline_code_inlineCode.peek = inlineCodePeek--/**- * @param {InlineCode} node- * @param {Parent | undefined} _- * @param {State} state- * @returns {string}- */-function inline_code_inlineCode(node, _, state) {- let value = node.value || ''- let sequence = '`'- let index = -1-- // If there is a single grave accent on its own in the code, use a fence of- // two.- // If there are two in a row, use one.- while (new RegExp('(^|[^`])' + sequence + '([^`]|$)').test(value)) {- sequence += '`'- }-- // If this is not just spaces or eols (tabs don’t count), and either the- // first or last character are a space, eol, or tick, then pad with spaces.- if (- /[^ \r\n]/.test(value) &&- ((/^[ \r\n]/.test(value) && /[ \r\n]$/.test(value)) || /^`|`$/.test(value))- ) {- value = ' ' + value + ' '- }-- // We have a potential problem: certain characters after eols could result in- // blocks being seen.- // For example, if someone injected the string `'\n# b'`, then that would- // result in an ATX heading.- // We can’t escape characters in `inlineCode`, but because eols are- // transformed to spaces when going from markdown to HTML anyway, we can swap- // them out.- while (++index < state.unsafe.length) {- const pattern = state.unsafe[index]- const expression = patternCompile(pattern)- /** @type {RegExpExecArray | null} */- let match-- // Only look for `atBreak`s.- // Btw: note that `atBreak` patterns will always start the regex at LF or- // CR.- if (!pattern.atBreak) continue-- while ((match = expression.exec(value))) {- let position = match.index-- // Support CRLF (patterns only look for one of the characters).- if (- value.charCodeAt(position) === 10 /* `\n` */ &&- value.charCodeAt(position - 1) === 13 /* `\r` */- ) {- position--- }-- value = value.slice(0, position) + ' ' + value.slice(match.index + 1)- }- }-- return sequence + value + sequence-}--/**- * @returns {string}- */-function inlineCodePeek() {- return '`'-}--;// CONCATENATED MODULE: ./node_modules/markdown-table/index.js-/**- * @typedef Options- * Configuration (optional).- * @property {string|null|ReadonlyArray<string|null|undefined>} [align]- * One style for all columns, or styles for their respective columns.- * Each style is either `'l'` (left), `'r'` (right), or `'c'` (center).- * Other values are treated as `''`, which doesn’t place the colon in the- * alignment row but does align left.- * *Only the lowercased first character is used, so `Right` is fine.*- * @property {boolean} [padding=true]- * Whether to add a space of padding between delimiters and cells.- *- * When `true`, there is padding:- *- * ```markdown- * | Alpha | B |- * | ----- | ----- |- * | C | Delta |- * ```- *- * When `false`, there is no padding:- *- * ```markdown- * |Alpha|B |- * |-----|-----|- * |C |Delta|- * ```- * @property {boolean} [delimiterStart=true]- * Whether to begin each row with the delimiter.- *- * > 👉 **Note**: please don’t use this: it could create fragile structures- * > that aren’t understandable to some markdown parsers.- *- * When `true`, there are starting delimiters:- *- * ```markdown- * | Alpha | B |- * | ----- | ----- |- * | C | Delta |- * ```- *- * When `false`, there are no starting delimiters:- *- * ```markdown- * Alpha | B |- * ----- | ----- |- * C | Delta |- * ```- * @property {boolean} [delimiterEnd=true]- * Whether to end each row with the delimiter.- *- * > 👉 **Note**: please don’t use this: it could create fragile structures- * > that aren’t understandable to some markdown parsers.- *- * When `true`, there are ending delimiters:- *- * ```markdown- * | Alpha | B |- * | ----- | ----- |- * | C | Delta |- * ```- *- * When `false`, there are no ending delimiters:- *- * ```markdown- * | Alpha | B- * | ----- | ------ * | C | Delta- * ```- * @property {boolean} [alignDelimiters=true]- * Whether to align the delimiters.- * By default, they are aligned:- *- * ```markdown- * | Alpha | B |- * | ----- | ----- |- * | C | Delta |- * ```- *- * Pass `false` to make them staggered:- *- * ```markdown- * | Alpha | B |- * | - | - |- * | C | Delta |- * ```- * @property {(value: string) => number} [stringLength]- * Function to detect the length of table cell content.- * This is used when aligning the delimiters (`|`) between table cells.- * Full-width characters and emoji mess up delimiter alignment when viewing- * the markdown source.- * To fix this, you can pass this function, which receives the cell content- * and returns its “visible” size.- * Note that what is and isn’t visible depends on where the text is displayed.- *- * Without such a function, the following:- *- * ```js- * markdownTable([- * ['Alpha', 'Bravo'],- * ['中文', 'Charlie'],- * ['👩❤️👩', 'Delta']- * ])- * ```- *- * Yields:- *- * ```markdown- * | Alpha | Bravo |- * | - | - |- * | 中文 | Charlie |- * | 👩❤️👩 | Delta |- * ```- *- * With [`string-width`](https://github.com/sindresorhus/string-width):- *- * ```js- * import stringWidth from 'string-width'- *- * markdownTable(- * [- * ['Alpha', 'Bravo'],- * ['中文', 'Charlie'],- * ['👩❤️👩', 'Delta']- * ],- * {stringLength: stringWidth}- * )- * ```- *- * Yields:- *- * ```markdown- * | Alpha | Bravo |- * | ----- | ------- |- * | 中文 | Charlie |- * | 👩❤️👩 | Delta |- * ```- */--/**- * @typedef {Options} MarkdownTableOptions- * @todo- * Remove next major.- */--/**- * Generate a markdown ([GFM](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables)) table..- *- * @param {ReadonlyArray<ReadonlyArray<string|null|undefined>>} table- * Table data (matrix of strings).- * @param {Options} [options]- * Configuration (optional).- * @returns {string}- */-function markdownTable(table, options = {}) {- const align = (options.align || []).concat()- const stringLength = options.stringLength || defaultStringLength- /** @type {Array<number>} Character codes as symbols for alignment per column. */- const alignments = []- /** @type {Array<Array<string>>} Cells per row. */- const cellMatrix = []- /** @type {Array<Array<number>>} Sizes of each cell per row. */- const sizeMatrix = []- /** @type {Array<number>} */- const longestCellByColumn = []- let mostCellsPerRow = 0- let rowIndex = -1-- // This is a superfluous loop if we don’t align delimiters, but otherwise we’d- // do superfluous work when aligning, so optimize for aligning.- while (++rowIndex < table.length) {- /** @type {Array<string>} */- const row = []- /** @type {Array<number>} */- const sizes = []- let columnIndex = -1-- if (table[rowIndex].length > mostCellsPerRow) {- mostCellsPerRow = table[rowIndex].length- }-- while (++columnIndex < table[rowIndex].length) {- const cell = serialize(table[rowIndex][columnIndex])-- if (options.alignDelimiters !== false) {- const size = stringLength(cell)- sizes[columnIndex] = size-- if (- longestCellByColumn[columnIndex] === undefined ||- size > longestCellByColumn[columnIndex]- ) {- longestCellByColumn[columnIndex] = size- }- }-- row.push(cell)- }-- cellMatrix[rowIndex] = row- sizeMatrix[rowIndex] = sizes- }-- // Figure out which alignments to use.- let columnIndex = -1-- if (typeof align === 'object' && 'length' in align) {- while (++columnIndex < mostCellsPerRow) {- alignments[columnIndex] = toAlignment(align[columnIndex])- }- } else {- const code = toAlignment(align)-- while (++columnIndex < mostCellsPerRow) {- alignments[columnIndex] = code- }- }-- // Inject the alignment row.- columnIndex = -1- /** @type {Array<string>} */- const row = []- /** @type {Array<number>} */- const sizes = []-- while (++columnIndex < mostCellsPerRow) {- const code = alignments[columnIndex]- let before = ''- let after = ''-- if (code === 99 /* `c` */) {- before = ':'- after = ':'- } else if (code === 108 /* `l` */) {- before = ':'- } else if (code === 114 /* `r` */) {- after = ':'- }-- // There *must* be at least one hyphen-minus in each alignment cell.- let size =- options.alignDelimiters === false- ? 1- : Math.max(- 1,- longestCellByColumn[columnIndex] - before.length - after.length- )-- const cell = before + '-'.repeat(size) + after-- if (options.alignDelimiters !== false) {- size = before.length + size + after.length-- if (size > longestCellByColumn[columnIndex]) {- longestCellByColumn[columnIndex] = size- }-- sizes[columnIndex] = size- }-- row[columnIndex] = cell- }-- // Inject the alignment row.- cellMatrix.splice(1, 0, row)- sizeMatrix.splice(1, 0, sizes)-- rowIndex = -1- /** @type {Array<string>} */- const lines = []-- while (++rowIndex < cellMatrix.length) {- const row = cellMatrix[rowIndex]- const sizes = sizeMatrix[rowIndex]- columnIndex = -1- /** @type {Array<string>} */- const line = []-- while (++columnIndex < mostCellsPerRow) {- const cell = row[columnIndex] || ''- let before = ''- let after = ''-- if (options.alignDelimiters !== false) {- const size =- longestCellByColumn[columnIndex] - (sizes[columnIndex] || 0)- const code = alignments[columnIndex]-- if (code === 114 /* `r` */) {- before = ' '.repeat(size)- } else if (code === 99 /* `c` */) {- if (size % 2) {- before = ' '.repeat(size / 2 + 0.5)- after = ' '.repeat(size / 2 - 0.5)- } else {- before = ' '.repeat(size / 2)- after = before- }- } else {- after = ' '.repeat(size)- }- }-- if (options.delimiterStart !== false && !columnIndex) {- line.push('|')- }-- if (- options.padding !== false &&- // Don’t add the opening space if we’re not aligning and the cell is- // empty: there will be a closing space.- !(options.alignDelimiters === false && cell === '') &&- (options.delimiterStart !== false || columnIndex)- ) {- line.push(' ')- }-- if (options.alignDelimiters !== false) {- line.push(before)- }-- line.push(cell)-- if (options.alignDelimiters !== false) {- line.push(after)- }-- if (options.padding !== false) {- line.push(' ')- }-- if (- options.delimiterEnd !== false ||- columnIndex !== mostCellsPerRow - 1- ) {- line.push('|')- }- }-- lines.push(- options.delimiterEnd === false- ? line.join('').replace(/ +$/, '')- : line.join('')- )- }-- return lines.join('\n')-}--/**- * @param {string|null|undefined} [value]- * @returns {string}- */-function serialize(value) {- return value === null || value === undefined ? '' : String(value)-}--/**- * @param {string} value- * @returns {number}- */-function defaultStringLength(value) {- return value.length-}--/**- * @param {string|null|undefined} value- * @returns {number}- */-function toAlignment(value) {- const code = typeof value === 'string' ? value.codePointAt(0) : 0-- return code === 67 /* `C` */ || code === 99 /* `c` */- ? 99 /* `c` */- : code === 76 /* `L` */ || code === 108 /* `l` */- ? 108 /* `l` */- : code === 82 /* `R` */ || code === 114 /* `r` */- ? 114 /* `r` */- : 0-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-gfm-table/lib/index.js-/**- * @typedef {import('mdast').Table} Table- * @typedef {import('mdast').TableRow} TableRow- * @typedef {import('mdast').TableCell} TableCell- * @typedef {import('mdast').InlineCode} InlineCode- *- * @typedef {import('markdown-table').MarkdownTableOptions} MarkdownTableOptions- *- * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext- * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension- * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle- *- * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension- * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle- * @typedef {import('mdast-util-to-markdown').Context} ToMarkdownContext- * @typedef {import('mdast-util-to-markdown').SafeOptions} SafeOptions- */--/**- * @typedef Options- * Configuration.- * @property {boolean | null | undefined} [tableCellPadding=true]- * Whether to add a space of padding between delimiters and cells.- * @property {boolean | null | undefined} [tablePipeAlign=true]- * Whether to align the delimiters.- * @property {MarkdownTableOptions['stringLength'] | null | undefined} [stringLength]- * Function to detect the length of table cell content, used when aligning- * the delimiters between cells- */------// To do: next major: use `state` and `state` utilities from `mdast-util-to-markdown`.-// To do: next major: use `defaultHandlers.inlineCode`.-// To do: next major: expose functions.--/**- * Extension for `mdast-util-from-markdown` to enable GFM tables.- *- * @type {FromMarkdownExtension}- */-const gfmTableFromMarkdown = {- enter: {- table: enterTable,- tableData: enterCell,- tableHeader: enterCell,- tableRow: enterRow- },- exit: {- codeText: exitCodeText,- table: exitTable,- tableData: lib_exit,- tableHeader: lib_exit,- tableRow: lib_exit- }-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function enterTable(token) {- /** @type {Array<'left' | 'right' | 'center' | 'none'>} */- // @ts-expect-error: `align` is custom.- const align = token._align- this.enter(- {- type: 'table',- align: align.map((d) => (d === 'none' ? null : d)),- children: []- },- token- )- this.setData('inTable', true)-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function exitTable(token) {- this.exit(token)- this.setData('inTable')-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function enterRow(token) {- this.enter({type: 'tableRow', children: []}, token)-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function lib_exit(token) {- this.exit(token)-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function enterCell(token) {- this.enter({type: 'tableCell', children: []}, token)-}--// Overwrite the default code text data handler to unescape escaped pipes when-// they are in tables.-/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function exitCodeText(token) {- let value = this.resume()-- if (this.getData('inTable')) {- value = value.replace(/\\([\\|])/g, replace)- }-- const node = /** @type {InlineCode} */ (this.stack[this.stack.length - 1])- node.value = value- this.exit(token)-}--/**- * @param {string} $0- * @param {string} $1- * @returns {string}- */-function replace($0, $1) {- // Pipes work, backslashes don’t (but can’t escape pipes).- return $1 === '|' ? $1 : $0-}--/**- * Create an extension for `mdast-util-to-markdown` to enable GFM tables in- * markdown.- *- * @param {Options | null | undefined} [options]- * Configuration.- * @returns {ToMarkdownExtension}- * Extension for `mdast-util-to-markdown` to enable GFM tables.- */-function gfmTableToMarkdown(options) {- const settings = options || {}- const padding = settings.tableCellPadding- const alignDelimiters = settings.tablePipeAlign- const stringLength = settings.stringLength- const around = padding ? ' ' : '|'-- return {- unsafe: [- {character: '\r', inConstruct: 'tableCell'},- {character: '\n', inConstruct: 'tableCell'},- // A pipe, when followed by a tab or space (padding), or a dash or colon- // (unpadded delimiter row), could result in a table.- {atBreak: true, character: '|', after: '[\t :-]'},- // A pipe in a cell must be encoded.- {character: '|', inConstruct: 'tableCell'},- // A colon must be followed by a dash, in which case it could start a- // delimiter row.- {atBreak: true, character: ':', after: '-'},- // A delimiter row can also start with a dash, when followed by more- // dashes, a colon, or a pipe.- // This is a stricter version than the built in check for lists, thematic- // breaks, and setex heading underlines though:- // <https://github.com/syntax-tree/mdast-util-to-markdown/blob/51a2038/lib/unsafe.js#L57>- {atBreak: true, character: '-', after: '[:|-]'}- ],- handlers: {- table: handleTable,- tableRow: handleTableRow,- tableCell: handleTableCell,- inlineCode: inlineCodeWithTable- }- }-- /**- * @type {ToMarkdownHandle}- * @param {Table} node- */- function handleTable(node, _, context, safeOptions) {- return serializeData(- handleTableAsData(node, context, safeOptions),- node.align- )- }-- /**- * This function isn’t really used normally, because we handle rows at the- * table level.- * But, if someone passes in a table row, this ensures we make somewhat sense.- *- * @type {ToMarkdownHandle}- * @param {TableRow} node- */- function handleTableRow(node, _, context, safeOptions) {- const row = handleTableRowAsData(node, context, safeOptions)- const value = serializeData([row])- // `markdown-table` will always add an align row- return value.slice(0, value.indexOf('\n'))- }-- /**- * @type {ToMarkdownHandle}- * @param {TableCell} node- */- function handleTableCell(node, _, context, safeOptions) {- const exit = context.enter('tableCell')- const subexit = context.enter('phrasing')- const value = containerPhrasing(node, context, {- ...safeOptions,- before: around,- after: around- })- subexit()- exit()- return value- }-- /**- * @param {Array<Array<string>>} matrix- * @param {Array<string | null | undefined> | null | undefined} [align]- */- function serializeData(matrix, align) {- return markdownTable(matrix, {- align,- // @ts-expect-error: `markdown-table` types should support `null`.- alignDelimiters,- // @ts-expect-error: `markdown-table` types should support `null`.- padding,- // @ts-expect-error: `markdown-table` types should support `null`.- stringLength- })- }-- /**- * @param {Table} node- * @param {ToMarkdownContext} context- * @param {SafeOptions} safeOptions- */- function handleTableAsData(node, context, safeOptions) {- const children = node.children- let index = -1- /** @type {Array<Array<string>>} */- const result = []- const subexit = context.enter('table')-- while (++index < children.length) {- result[index] = handleTableRowAsData(- children[index],- context,- safeOptions- )- }-- subexit()-- return result- }-- /**- * @param {TableRow} node- * @param {ToMarkdownContext} context- * @param {SafeOptions} safeOptions- */- function handleTableRowAsData(node, context, safeOptions) {- const children = node.children- let index = -1- /** @type {Array<string>} */- const result = []- const subexit = context.enter('tableRow')-- while (++index < children.length) {- // Note: the positional info as used here is incorrect.- // Making it correct would be impossible due to aligning cells?- // And it would need copy/pasting `markdown-table` into this project.- result[index] = handleTableCell(- children[index],- node,- context,- safeOptions- )- }-- subexit()-- return result- }-- /**- * @type {ToMarkdownHandle}- * @param {InlineCode} node- */- function inlineCodeWithTable(node, parent, context) {- let value = inline_code_inlineCode(node, parent, context)-- if (context.stack.includes('tableCell')) {- value = value.replace(/\|/g, '\\$&')- }-- return value- }-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-markdown/lib/util/check-bullet.js-/**- * @typedef {import('../types.js').State} State- * @typedef {import('../types.js').Options} Options- */--/**- * @param {State} state- * @returns {Exclude<Options['bullet'], null | undefined>}- */-function checkBullet(state) {- const marker = state.options.bullet || '*'-- if (marker !== '*' && marker !== '+' && marker !== '-') {- throw new Error(- 'Cannot serialize items with `' +- marker +- '` for `options.bullet`, expected `*`, `+`, or `-`'- )- }-- return marker-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js-/**- * @typedef {import('../types.js').State} State- * @typedef {import('../types.js').Options} Options- */--/**- * @param {State} state- * @returns {Exclude<Options['listItemIndent'], null | undefined>}- */-function checkListItemIndent(state) {- const style = state.options.listItemIndent || 'tab'-- // To do: remove in a major.- // @ts-expect-error: deprecated.- if (style === 1 || style === '1') {- return 'one'- }-- if (style !== 'tab' && style !== 'one' && style !== 'mixed') {- throw new Error(- 'Cannot serialize items with `' +- style +- '` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`'- )- }-- return style-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-to-markdown/lib/handle/list-item.js-/**- * @typedef {import('mdast').ListItem} ListItem- * @typedef {import('../types.js').Map} Map- * @typedef {import('../types.js').Parent} Parent- * @typedef {import('../types.js').State} State- * @typedef {import('../types.js').Info} Info- */-----/**- * @param {ListItem} node- * @param {Parent | undefined} parent- * @param {State} state- * @param {Info} info- * @returns {string}- */-function list_item_listItem(node, parent, state, info) {- const listItemIndent = checkListItemIndent(state)- let bullet = state.bulletCurrent || checkBullet(state)-- // Add the marker value for ordered lists.- if (parent && parent.type === 'list' && parent.ordered) {- bullet =- (typeof parent.start === 'number' && parent.start > -1- ? parent.start- : 1) +- (state.options.incrementListMarker === false- ? 0- : parent.children.indexOf(node)) +- bullet- }-- let size = bullet.length + 1-- if (- listItemIndent === 'tab' ||- (listItemIndent === 'mixed' &&- ((parent && parent.type === 'list' && parent.spread) || node.spread))- ) {- size = Math.ceil(size / 4) * 4- }-- const tracker = state.createTracker(info)- tracker.move(bullet + ' '.repeat(size - bullet.length))- tracker.shift(size)- const exit = state.enter('listItem')- const value = state.indentLines(- state.containerFlow(node, tracker.current()),- map- )- exit()-- return value-- /** @type {Map} */- function map(line, index, blank) {- if (index) {- return (blank ? '' : ' '.repeat(size)) + line- }-- return (blank ? bullet : bullet + ' '.repeat(size - bullet.length)) + line- }-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-gfm-task-list-item/lib/index.js-/**- * @typedef {import('mdast').Content} Content- * @typedef {import('mdast').ListItem} ListItem- * @typedef {import('mdast').Paragraph} Paragraph- * @typedef {import('mdast').Parent} Parent- * @typedef {import('mdast').Root} Root- * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext- * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension- * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle- * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension- * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle- */--/**- * @typedef {Extract<Root | Content, Parent>} Parents- */-----// To do: next major: rename `context` -> `state`, `safeOptions` -> `info`, use-// `track` from `state`.-// To do: next major: replace exports with functions.-// To do: next major: use `defaulthandlers.listItem`.--/**- * Extension for `mdast-util-from-markdown` to enable GFM task list items.- *- * @type {FromMarkdownExtension}- */-const gfmTaskListItemFromMarkdown = {- exit: {- taskListCheckValueChecked: exitCheck,- taskListCheckValueUnchecked: exitCheck,- paragraph: exitParagraphWithTaskListItem- }-}--/**- * Extension for `mdast-util-to-markdown` to enable GFM task list items.- *- * @type {ToMarkdownExtension}- */-const gfmTaskListItemToMarkdown = {- unsafe: [{atBreak: true, character: '-', after: '[:|-]'}],- handlers: {listItem: listItemWithTaskListItem}-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function exitCheck(token) {- const node = /** @type {ListItem} */ (this.stack[this.stack.length - 2])- // We’re always in a paragraph, in a list item.- node.checked = token.type === 'taskListCheckValueChecked'-}--/**- * @this {CompileContext}- * @type {FromMarkdownHandle}- */-function exitParagraphWithTaskListItem(token) {- const parent = /** @type {Parents} */ (this.stack[this.stack.length - 2])-- if (- parent &&- parent.type === 'listItem' &&- typeof parent.checked === 'boolean'- ) {- const node = /** @type {Paragraph} */ (this.stack[this.stack.length - 1])- const head = node.children[0]-- if (head && head.type === 'text') {- const siblings = parent.children- let index = -1- /** @type {Paragraph | undefined} */- let firstParaghraph-- while (++index < siblings.length) {- const sibling = siblings[index]- if (sibling.type === 'paragraph') {- firstParaghraph = sibling- break- }- }-- if (firstParaghraph === node) {- // Must start with a space or a tab.- head.value = head.value.slice(1)-- if (head.value.length === 0) {- node.children.shift()- } else if (- node.position &&- head.position &&- typeof head.position.start.offset === 'number'- ) {- head.position.start.column++- head.position.start.offset++- node.position.start = Object.assign({}, head.position.start)- }- }- }- }-- this.exit(token)-}--/**- * @type {ToMarkdownHandle}- * @param {ListItem} node- */-function listItemWithTaskListItem(node, parent, context, safeOptions) {- const head = node.children[0]- const checkable =- typeof node.checked === 'boolean' && head && head.type === 'paragraph'- const checkbox = '[' + (node.checked ? 'x' : ' ') + '] '- const tracker = track(safeOptions)-- if (checkable) {- tracker.move(checkbox)- }-- let value = list_item_listItem(node, parent, context, {- ...safeOptions,- ...tracker.current()- })-- if (checkable) {- value = value.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/, check)- }-- return value-- /**- * @param {string} $0- * @returns {string}- */- function check($0) {- return $0 + checkbox- }-}--;// CONCATENATED MODULE: ./node_modules/mdast-util-gfm/lib/index.js-/**- * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension- * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension- */--/**- * @typedef {import('mdast-util-gfm-table').Options} Options- * Configuration.- */--------/**- * Create an extension for `mdast-util-from-markdown` to enable GFM (autolink- * literals, footnotes, strikethrough, tables, tasklists).- *- * @returns {Array<FromMarkdownExtension>}- * Extension for `mdast-util-from-markdown` to enable GFM (autolink literals,- * footnotes, strikethrough, tables, tasklists).- */-function gfmFromMarkdown() {- return [- gfmAutolinkLiteralFromMarkdown,- gfmFootnoteFromMarkdown(),- gfmStrikethroughFromMarkdown,- gfmTableFromMarkdown,- gfmTaskListItemFromMarkdown- ]-}--/**- * Create an extension for `mdast-util-to-markdown` to enable GFM (autolink- * literals, footnotes, strikethrough, tables, tasklists).- *- * @param {Options | null | undefined} [options]- * Configuration.- * @returns {ToMarkdownExtension}- * Extension for `mdast-util-to-markdown` to enable GFM (autolink literals,- * footnotes, strikethrough, tables, tasklists).- */-function gfmToMarkdown(options) {- return {- extensions: [- gfmAutolinkLiteralToMarkdown,- gfmFootnoteToMarkdown(),- gfmStrikethroughToMarkdown,- gfmTableToMarkdown(options),- gfmTaskListItemToMarkdown- ]- }-}--;// CONCATENATED MODULE: ./node_modules/remark-gfm/index.js-/**- * @typedef {import('mdast').Root} Root- * @typedef {import('micromark-extension-gfm').Options & import('mdast-util-gfm').Options} Options- */-----/**- * Plugin to support GFM (autolink literals, footnotes, strikethrough, tables, tasklists).- *- * @type {import('unified').Plugin<[Options?]|void[], Root>}- */-function remarkGfm(options = {}) {- const data = this.data()-- add('micromarkExtensions', gfm(options))- add('fromMarkdownExtensions', gfmFromMarkdown())- add('toMarkdownExtensions', gfmToMarkdown(options))-- /**- * @param {string} field- * @param {unknown} value- */- function add(field, value) {- const list = /** @type {unknown[]} */ (- // Other extensions- /* c8 ignore next 2 */- data[field] ? data[field] : (data[field] = [])- )-- list.push(value)- }-}--;// CONCATENATED MODULE: ./src/components/typewriter/index.jsx-/* provided dependency */ var typewriter_React = __webpack_require__(294);-function typewriter_typeof(o) { "@babel/helpers - typeof"; return typewriter_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, typewriter_typeof(o); }-function typewriter_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }-function typewriter_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? typewriter_ownKeys(Object(t), !0).forEach(function (r) { typewriter_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : typewriter_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }-function typewriter_defineProperty(obj, key, value) { key = typewriter_toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }-function typewriter_toPropertyKey(arg) { var key = typewriter_toPrimitive(arg, "string"); return typewriter_typeof(key) === "symbol" ? key : String(key); }-function typewriter_toPrimitive(input, hint) { if (typewriter_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typewriter_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }-function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }-function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }-function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }-function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }-function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }-function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }-----var Typewriter = function Typewriter(_ref) {- var message = _ref.message,- speed = _ref.speed,- setCurrentMessage = _ref.setCurrentMessage,- setIsTyped = _ref.setIsTyped;- var _useState = (0,react.useState)(""),- _useState2 = _slicedToArray(_useState, 2),- displayedText = _useState2[0],- setDisplayedText = _useState2[1];- var _useState3 = (0,react.useState)(0),- _useState4 = _slicedToArray(_useState3, 2),- currentIndex = _useState4[0],- setCurrentIndex = _useState4[1];- (0,react.useEffect)(function () {- var timer = setInterval(function () {- var _message$content;- if (currentIndex < (message === null || message === void 0 || (_message$content = message.content) === null || _message$content === void 0 ? void 0 : _message$content.length)) {- setDisplayedText(function (prevText) {- var _message$content2;- return prevText + (message === null || message === void 0 || (_message$content2 = message.content) === null || _message$content2 === void 0 ? void 0 : _message$content2[currentIndex]);- });- setCurrentMessage(function (prevMessage) {- var _message$content3;- return typewriter_objectSpread(typewriter_objectSpread({}, prevMessage), {}, {- content: prevMessage.content + (message === null || message === void 0 || (_message$content3 = message.content) === null || _message$content3 === void 0 ? void 0 : _message$content3[currentIndex])- });- });- setCurrentIndex(function (prevIndex) {- return prevIndex + 1;- });- } else {- setIsTyped(message);- clearInterval(timer);- }- }, speed);- return function () {- clearInterval(timer);- };- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [message === null || message === void 0 ? void 0 : message.content, speed, currentIndex]);- return /*#__PURE__*/typewriter_React.createElement("div", null, /*#__PURE__*/typewriter_React.createElement(ReactMarkdown, {- remarkPlugins: [remarkGfm]- }, displayedText));-};--// setprop types for the component-Typewriter.propTypes = {- message: (prop_types_default()).object.isRequired,- speed: (prop_types_default()).number.isRequired,- setCurrentMessage: (prop_types_default()).func.isRequired,- setIsTyped: (prop_types_default()).func.isRequired-};-/* harmony default export */ const typewriter = (Typewriter);-// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./src/components/chatbox/styles.scss-var styles = __webpack_require__(519);-;// CONCATENATED MODULE: ./src/components/chatbox/styles.scss------------var styles_options = {};--styles_options.styleTagTransform = (styleTagTransform_default());-styles_options.setAttributes = (setAttributesWithoutAttributes_default());-- styles_options.insert = insertBySelector_default().bind(null, "head");--styles_options.domAPI = (styleDomAPI_default());-styles_options.insertStyleElement = (insertStyleElement_default());--var styles_update = injectStylesIntoStyleTag_default()(styles/* default */.Z, styles_options);----- /* harmony default export */ const chatbox_styles = (styles/* default */.Z && styles/* default */.Z.locals ? styles/* default */.Z.locals : undefined);--;// CONCATENATED MODULE: ./src/components/user-message/index.jsx-/* provided dependency */ var user_message_React = __webpack_require__(294);-/* eslint-disable react/prop-types */---var UserMessage = function UserMessage(props) {- var _props$colors, _props$colors2, _props$colors3;- var _props$message = props.message,- id = _props$message.id,- content = _props$message.content;- var humanBubbleClass = props.humanBubbleClass;- var renderContent = function renderContent(_content) {- // split the content by new line- var contentArray = _content.split("\n");- // render the content with <br /> tag- return contentArray.map(function (item, index) {- return /*#__PURE__*/user_message_React.createElement("span", {- key: index- }, item, /*#__PURE__*/user_message_React.createElement("br", null));- });- };- return /*#__PURE__*/user_message_React.createElement("div", {- className: "chat-message user",- key: id- }, /*#__PURE__*/user_message_React.createElement("div", {- className: "chat-content".concat(" ", humanBubbleClass),- style: {- color: (_props$colors = props.colors) === null || _props$colors === void 0 || (_props$colors = _props$colors.humanBubbleColors) === null || _props$colors === void 0 ? void 0 : _props$colors.textColor,- background: "linear-gradient(to right, ".concat((_props$colors2 = props.colors) === null || _props$colors2 === void 0 || (_props$colors2 = _props$colors2.humanBubbleColors) === null || _props$colors2 === void 0 ? void 0 : _props$colors2.backgroundColorStart, ", ").concat((_props$colors3 = props.colors) === null || _props$colors3 === void 0 || (_props$colors3 = _props$colors3.humanBubbleColors) === null || _props$colors3 === void 0 ? void 0 : _props$colors3.backgroundColorEnd, ")")- }- }, /*#__PURE__*/user_message_React.createElement("div", {- className: "chat-text"- }, renderContent(content))));-};-UserMessage.propTypes = {- message: prop_types_default().shape({- id: (prop_types_default()).number.isRequired,- content: (prop_types_default()).string.isRequired- }).isRequired,- humanBubbleClass: (prop_types_default()).string-};-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js-function _objectWithoutPropertiesLoose(source, excluded) {- if (source == null) return {};- var target = {};- var sourceKeys = Object.keys(source);- var key, i;- for (i = 0; i < sourceKeys.length; i++) {- key = sourceKeys[i];- if (excluded.indexOf(key) >= 0) continue;- target[key] = source[key];- }- return target;-}-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js--function _objectWithoutProperties(source, excluded) {- if (source == null) return {};- var target = _objectWithoutPropertiesLoose(source, excluded);- var key, i;- if (Object.getOwnPropertySymbols) {- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);- for (i = 0; i < sourceSymbolKeys.length; i++) {- key = sourceSymbolKeys[i];- if (excluded.indexOf(key) >= 0) continue;- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;- target[key] = source[key];- }- }- return target;-}-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js-function arrayLikeToArray_arrayLikeToArray(arr, len) {- if (len == null || len > arr.length) len = arr.length;- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];- return arr2;-}-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js--function _arrayWithoutHoles(arr) {- if (Array.isArray(arr)) return arrayLikeToArray_arrayLikeToArray(arr);-}-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js-function _iterableToArray(iter) {- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);-}-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js--function unsupportedIterableToArray_unsupportedIterableToArray(o, minLen) {- if (!o) return;- if (typeof o === "string") return arrayLikeToArray_arrayLikeToArray(o, minLen);- var n = Object.prototype.toString.call(o).slice(8, -1);- if (n === "Object" && o.constructor) n = o.constructor.name;- if (n === "Map" || n === "Set") return Array.from(o);- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray_arrayLikeToArray(o, minLen);-}-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js-function _nonIterableSpread() {- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");-}-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js-----function _toConsumableArray(arr) {- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || unsupportedIterableToArray_unsupportedIterableToArray(arr) || _nonIterableSpread();-}-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js-function typeof_typeof(o) {- "@babel/helpers - typeof";-- return typeof_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {- return typeof o;- } : function (o) {- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;- }, typeof_typeof(o);-}-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js--function toPrimitive_toPrimitive(input, hint) {- if (typeof_typeof(input) !== "object" || input === null) return input;- var prim = input[Symbol.toPrimitive];- if (prim !== undefined) {- var res = prim.call(input, hint || "default");- if (typeof_typeof(res) !== "object") return res;- throw new TypeError("@@toPrimitive must return a primitive value.");- }- return (hint === "string" ? String : Number)(input);-}-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js---function toPropertyKey_toPropertyKey(arg) {- var key = toPrimitive_toPrimitive(arg, "string");- return typeof_typeof(key) === "symbol" ? key : String(key);-}-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js--function defineProperty_defineProperty(obj, key, value) {- key = toPropertyKey_toPropertyKey(key);- if (key in obj) {- Object.defineProperty(obj, key, {- value: value,- enumerable: true,- configurable: true,- writable: true- });- } else {- obj[key] = value;- }- return obj;-}-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js-function _extends() {- _extends = Object.assign ? Object.assign.bind() : function (target) {- for (var i = 1; i < arguments.length; i++) {- var source = arguments[i];- for (var key in source) {- if (Object.prototype.hasOwnProperty.call(source, key)) {- target[key] = source[key];- }- }- }- return target;- };- return _extends.apply(this, arguments);-}-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/create-element.js----function create_element_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }--function create_element_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? create_element_ownKeys(Object(source), !0).forEach(function (key) { defineProperty_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : create_element_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }-- // Get all possible permutations of all power sets-//-// Super simple, non-algorithmic solution since the-// number of class names will not be greater than 4--function powerSetPermutations(arr) {- var arrLength = arr.length;- if (arrLength === 0 || arrLength === 1) return arr;-- if (arrLength === 2) {- // prettier-ignore- return [arr[0], arr[1], "".concat(arr[0], ".").concat(arr[1]), "".concat(arr[1], ".").concat(arr[0])];- }-- if (arrLength === 3) {- return [arr[0], arr[1], arr[2], "".concat(arr[0], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[0]), "".concat(arr[1], ".").concat(arr[2]), "".concat(arr[2], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[1], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[2], ".").concat(arr[1]), "".concat(arr[1], ".").concat(arr[0], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[2], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[0], ".").concat(arr[1]), "".concat(arr[2], ".").concat(arr[1], ".").concat(arr[0])];- }-- if (arrLength >= 4) {- // Currently does not support more than 4 extra- // class names (after `.token` has been removed)- return [arr[0], arr[1], arr[2], arr[3], "".concat(arr[0], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[3]), "".concat(arr[1], ".").concat(arr[0]), "".concat(arr[1], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[3]), "".concat(arr[2], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[1]), "".concat(arr[2], ".").concat(arr[3]), "".concat(arr[3], ".").concat(arr[0]), "".concat(arr[3], ".").concat(arr[1]), "".concat(arr[3], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[1], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[1], ".").concat(arr[3]), "".concat(arr[0], ".").concat(arr[2], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[2], ".").concat(arr[3]), "".concat(arr[0], ".").concat(arr[3], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[3], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[0], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[0], ".").concat(arr[3]), "".concat(arr[1], ".").concat(arr[2], ".").concat(arr[0]), "".concat(arr[1], ".").concat(arr[2], ".").concat(arr[3]), "".concat(arr[1], ".").concat(arr[3], ".").concat(arr[0]), "".concat(arr[1], ".").concat(arr[3], ".").concat(arr[2]), "".concat(arr[2], ".").concat(arr[0], ".").concat(arr[1]), "".concat(arr[2], ".").concat(arr[0], ".").concat(arr[3]), "".concat(arr[2], ".").concat(arr[1], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[1], ".").concat(arr[3]), "".concat(arr[2], ".").concat(arr[3], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[3], ".").concat(arr[1]), "".concat(arr[3], ".").concat(arr[0], ".").concat(arr[1]), "".concat(arr[3], ".").concat(arr[0], ".").concat(arr[2]), "".concat(arr[3], ".").concat(arr[1], ".").concat(arr[0]), "".concat(arr[3], ".").concat(arr[1], ".").concat(arr[2]), "".concat(arr[3], ".").concat(arr[2], ".").concat(arr[0]), "".concat(arr[3], ".").concat(arr[2], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[1], ".").concat(arr[2], ".").concat(arr[3]), "".concat(arr[0], ".").concat(arr[1], ".").concat(arr[3], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[2], ".").concat(arr[1], ".").concat(arr[3]), "".concat(arr[0], ".").concat(arr[2], ".").concat(arr[3], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[3], ".").concat(arr[1], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[3], ".").concat(arr[2], ".").concat(arr[1]), "".concat(arr[1], ".").concat(arr[0], ".").concat(arr[2], ".").concat(arr[3]), "".concat(arr[1], ".").concat(arr[0], ".").concat(arr[3], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[2], ".").concat(arr[0], ".").concat(arr[3]), "".concat(arr[1], ".").concat(arr[2], ".").concat(arr[3], ".").concat(arr[0]), "".concat(arr[1], ".").concat(arr[3], ".").concat(arr[0], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[3], ".").concat(arr[2], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[0], ".").concat(arr[1], ".").concat(arr[3]), "".concat(arr[2], ".").concat(arr[0], ".").concat(arr[3], ".").concat(arr[1]), "".concat(arr[2], ".").concat(arr[1], ".").concat(arr[0], ".").concat(arr[3]), "".concat(arr[2], ".").concat(arr[1], ".").concat(arr[3], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[3], ".").concat(arr[0], ".").concat(arr[1]), "".concat(arr[2], ".").concat(arr[3], ".").concat(arr[1], ".").concat(arr[0]), "".concat(arr[3], ".").concat(arr[0], ".").concat(arr[1], ".").concat(arr[2]), "".concat(arr[3], ".").concat(arr[0], ".").concat(arr[2], ".").concat(arr[1]), "".concat(arr[3], ".").concat(arr[1], ".").concat(arr[0], ".").concat(arr[2]), "".concat(arr[3], ".").concat(arr[1], ".").concat(arr[2], ".").concat(arr[0]), "".concat(arr[3], ".").concat(arr[2], ".").concat(arr[0], ".").concat(arr[1]), "".concat(arr[3], ".").concat(arr[2], ".").concat(arr[1], ".").concat(arr[0])];- }-}--var classNameCombinations = {};--function getClassNameCombinations(classNames) {- if (classNames.length === 0 || classNames.length === 1) return classNames;- var key = classNames.join('.');-- if (!classNameCombinations[key]) {- classNameCombinations[key] = powerSetPermutations(classNames);- }-- return classNameCombinations[key];-}--function createStyleObject(classNames) {- var elementStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};- var stylesheet = arguments.length > 2 ? arguments[2] : undefined;- var nonTokenClassNames = classNames.filter(function (className) {- return className !== 'token';- });- var classNamesCombinations = getClassNameCombinations(nonTokenClassNames);- return classNamesCombinations.reduce(function (styleObject, className) {- return create_element_objectSpread(create_element_objectSpread({}, styleObject), stylesheet[className]);- }, elementStyle);-}-function createClassNameString(classNames) {- return classNames.join(' ');-}-function createChildren(stylesheet, useInlineStyles) {- var childrenCount = 0;- return function (children) {- childrenCount += 1;- return children.map(function (child, i) {- return createElement({- node: child,- stylesheet: stylesheet,- useInlineStyles: useInlineStyles,- key: "code-segment-".concat(childrenCount, "-").concat(i)- });- });- };-}-function createElement(_ref) {- var node = _ref.node,- stylesheet = _ref.stylesheet,- _ref$style = _ref.style,- style = _ref$style === void 0 ? {} : _ref$style,- useInlineStyles = _ref.useInlineStyles,- key = _ref.key;- var properties = node.properties,- type = node.type,- TagName = node.tagName,- value = node.value;-- if (type === 'text') {- return value;- } else if (TagName) {- var childrenCreator = createChildren(stylesheet, useInlineStyles);- var props;-- if (!useInlineStyles) {- props = create_element_objectSpread(create_element_objectSpread({}, properties), {}, {- className: createClassNameString(properties.className)- });- } else {- var allStylesheetSelectors = Object.keys(stylesheet).reduce(function (classes, selector) {- selector.split('.').forEach(function (className) {- if (!classes.includes(className)) classes.push(className);- });- return classes;- }, []); // For compatibility with older versions of react-syntax-highlighter-- var startingClassName = properties.className && properties.className.includes('token') ? ['token'] : [];- var className = properties.className && startingClassName.concat(properties.className.filter(function (className) {- return !allStylesheetSelectors.includes(className);- }));- props = create_element_objectSpread(create_element_objectSpread({}, properties), {}, {- className: createClassNameString(className) || undefined,- style: createStyleObject(properties.className, Object.assign({}, properties.style, style), stylesheet)- });- }-- var children = childrenCreator(node.children);- return /*#__PURE__*/react.createElement(TagName, _extends({- key: key- }, props), children);- }-}-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js-/* harmony default export */ const checkForListedLanguage = (function (astGenerator, language) {- var langs = astGenerator.listLanguages();- return langs.indexOf(language) !== -1;-});-;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/highlight.js----var _excluded = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "startingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "code", "astGenerator"];--function highlight_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }--function highlight_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? highlight_ownKeys(Object(source), !0).forEach(function (key) { defineProperty_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : highlight_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }-----var newLineRegex = /\n/g;--function getNewLines(str) {- return str.match(newLineRegex);-}--function getAllLineNumbers(_ref) {- var lines = _ref.lines,- startingLineNumber = _ref.startingLineNumber,- style = _ref.style;- return lines.map(function (_, i) {- var number = i + startingLineNumber;- return /*#__PURE__*/react.createElement("span", {- key: "line-".concat(i),- className: "react-syntax-highlighter-line-number",- style: typeof style === 'function' ? style(number) : style- }, "".concat(number, "\n"));- });-}--function AllLineNumbers(_ref2) {- var codeString = _ref2.codeString,- codeStyle = _ref2.codeStyle,- _ref2$containerStyle = _ref2.containerStyle,- containerStyle = _ref2$containerStyle === void 0 ? {- "float": 'left',- paddingRight: '10px'- } : _ref2$containerStyle,- _ref2$numberStyle = _ref2.numberStyle,- numberStyle = _ref2$numberStyle === void 0 ? {} : _ref2$numberStyle,- startingLineNumber = _ref2.startingLineNumber;- return /*#__PURE__*/react.createElement("code", {- style: Object.assign({}, codeStyle, containerStyle)- }, getAllLineNumbers({- lines: codeString.replace(/\n$/, '').split('\n'),- style: numberStyle,- startingLineNumber: startingLineNumber- }));-}--function getEmWidthOfNumber(num) {- return "".concat(num.toString().length, ".25em");-}--function getInlineLineNumber(lineNumber, inlineLineNumberStyle) {- return {- type: 'element',- tagName: 'span',- properties: {- key: "line-number--".concat(lineNumber),- className: ['comment', 'linenumber', 'react-syntax-highlighter-line-number'],- style: inlineLineNumberStyle- },- children: [{- type: 'text',- value: lineNumber- }]- };-}--function assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber) {- // minimally necessary styling for line numbers- var defaultLineNumberStyle = {- display: 'inline-block',- minWidth: getEmWidthOfNumber(largestLineNumber),- paddingRight: '1em',- textAlign: 'right',- userSelect: 'none'- }; // prep custom styling-- var customLineNumberStyle = typeof lineNumberStyle === 'function' ? lineNumberStyle(lineNumber) : lineNumberStyle; // combine-- var assembledStyle = highlight_objectSpread(highlight_objectSpread({}, defaultLineNumberStyle), customLineNumberStyle);-- return assembledStyle;-}--function createLineElement(_ref3) {- var children = _ref3.children,- lineNumber = _ref3.lineNumber,- lineNumberStyle = _ref3.lineNumberStyle,- largestLineNumber = _ref3.largestLineNumber,- showInlineLineNumbers = _ref3.showInlineLineNumbers,- _ref3$lineProps = _ref3.lineProps,- lineProps = _ref3$lineProps === void 0 ? {} : _ref3$lineProps,- _ref3$className = _ref3.className,- className = _ref3$className === void 0 ? [] : _ref3$className,- showLineNumbers = _ref3.showLineNumbers,- wrapLongLines = _ref3.wrapLongLines;- var properties = typeof lineProps === 'function' ? lineProps(lineNumber) : lineProps;- properties['className'] = className;-- if (lineNumber && showInlineLineNumbers) {- var inlineLineNumberStyle = assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber);- children.unshift(getInlineLineNumber(lineNumber, inlineLineNumberStyle));- }-- if (wrapLongLines & showLineNumbers) {- properties.style = highlight_objectSpread(highlight_objectSpread({}, properties.style), {}, {- display: 'flex'- });- }-- return {- type: 'element',- tagName: 'span',- properties: properties,- children: children- };-}--function flattenCodeTree(tree) {- var className = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];- var newTree = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];-- if (tree.type === 'root') {- return flattenCodeTree(tree.children, className, newTree);- }-- for (var i = 0; i < tree.length; i++) {- var node = tree[i];-- if (node.type === 'text') {- newTree.push(createLineElement({- children: [node],- className: _toConsumableArray(new Set(className))- }));- } else if (node.children) {- var classNames = className.concat(node.properties.className);- flattenCodeTree(node.children, classNames).forEach(function (i) {- return newTree.push(i);- });- }- }-- return newTree;-}--function processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines) {- var _ref4;-- var tree = flattenCodeTree(codeTree.value);- var newTree = [];- var lastLineBreakIndex = -1;- var index = 0;-- function createWrappedLine(children, lineNumber) {- var className = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];- return createLineElement({- children: children,- lineNumber: lineNumber,- lineNumberStyle: lineNumberStyle,- largestLineNumber: largestLineNumber,- showInlineLineNumbers: showInlineLineNumbers,- lineProps: lineProps,- className: className,- showLineNumbers: showLineNumbers,- wrapLongLines: wrapLongLines- });- }-- function createUnwrappedLine(children, lineNumber) {- if (showLineNumbers && lineNumber && showInlineLineNumbers) {- var inlineLineNumberStyle = assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber);- children.unshift(getInlineLineNumber(lineNumber, inlineLineNumberStyle));- }-- return children;- }-- function createLine(children, lineNumber) {- var className = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];- return wrapLines || className.length > 0 ? createWrappedLine(children, lineNumber, className) : createUnwrappedLine(children, lineNumber);- }-- var _loop = function _loop() {- var node = tree[index];- var value = node.children[0].value;- var newLines = getNewLines(value);-- if (newLines) {- var splitValue = value.split('\n');- splitValue.forEach(function (text, i) {- var lineNumber = showLineNumbers && newTree.length + startingLineNumber;- var newChild = {- type: 'text',- value: "".concat(text, "\n")- }; // if it's the first line-- if (i === 0) {- var _children = tree.slice(lastLineBreakIndex + 1, index).concat(createLineElement({- children: [newChild],- className: node.properties.className- }));-- var _line = createLine(_children, lineNumber);-- newTree.push(_line); // if it's the last line- } else if (i === splitValue.length - 1) {- var stringChild = tree[index + 1] && tree[index + 1].children && tree[index + 1].children[0];- var lastLineInPreviousSpan = {- type: 'text',- value: "".concat(text)- };-- if (stringChild) {- var newElem = createLineElement({- children: [lastLineInPreviousSpan],- className: node.properties.className- });- tree.splice(index + 1, 0, newElem);- } else {- var _children2 = [lastLineInPreviousSpan];-- var _line2 = createLine(_children2, lineNumber, node.properties.className);-- newTree.push(_line2);- } // if it's neither the first nor the last line-- } else {- var _children3 = [newChild];-- var _line3 = createLine(_children3, lineNumber, node.properties.className);-- newTree.push(_line3);- }- });- lastLineBreakIndex = index;- }-- index++;- };-- while (index < tree.length) {- _loop();- }-- if (lastLineBreakIndex !== tree.length - 1) {- var children = tree.slice(lastLineBreakIndex + 1, tree.length);-- if (children && children.length) {- var lineNumber = showLineNumbers && newTree.length + startingLineNumber;- var line = createLine(children, lineNumber);- newTree.push(line);- }- }-- return wrapLines ? newTree : (_ref4 = []).concat.apply(_ref4, newTree);-}--function defaultRenderer(_ref5) {- var rows = _ref5.rows,- stylesheet = _ref5.stylesheet,- useInlineStyles = _ref5.useInlineStyles;- return rows.map(function (node, i) {- return createElement({- node: node,- stylesheet: stylesheet,- useInlineStyles: useInlineStyles,- key: "code-segement".concat(i)- });- });-} // only highlight.js has the highlightAuto method---function isHighlightJs(astGenerator) {- return astGenerator && typeof astGenerator.highlightAuto !== 'undefined';-}--function getCodeTree(_ref6) {- var astGenerator = _ref6.astGenerator,- language = _ref6.language,- code = _ref6.code,- defaultCodeValue = _ref6.defaultCodeValue;-- // figure out whether we're using lowlight/highlight or refractor/prism- // then attempt highlighting accordingly- // lowlight/highlight?- if (isHighlightJs(astGenerator)) {- var hasLanguage = checkForListedLanguage(astGenerator, language);-- if (language === 'text') {- return {- value: defaultCodeValue,- language: 'text'- };- } else if (hasLanguage) {- return astGenerator.highlight(language, code);- } else {- return astGenerator.highlightAuto(code);- }- } // must be refractor/prism, then--- try {- return language && language !== 'text' ? {- value: astGenerator.highlight(code, language)- } : {- value: defaultCodeValue- };- } catch (e) {- return {- value: defaultCodeValue- };- }-}--/* harmony default export */ function highlight(defaultAstGenerator, defaultStyle) {- return function SyntaxHighlighter(_ref7) {- var language = _ref7.language,- children = _ref7.children,- _ref7$style = _ref7.style,- style = _ref7$style === void 0 ? defaultStyle : _ref7$style,- _ref7$customStyle = _ref7.customStyle,- customStyle = _ref7$customStyle === void 0 ? {} : _ref7$customStyle,- _ref7$codeTagProps = _ref7.codeTagProps,- codeTagProps = _ref7$codeTagProps === void 0 ? {- className: language ? "language-".concat(language) : undefined,- style: highlight_objectSpread(highlight_objectSpread({}, style['code[class*="language-"]']), style["code[class*=\"language-".concat(language, "\"]")])- } : _ref7$codeTagProps,- _ref7$useInlineStyles = _ref7.useInlineStyles,- useInlineStyles = _ref7$useInlineStyles === void 0 ? true : _ref7$useInlineStyles,- _ref7$showLineNumbers = _ref7.showLineNumbers,- showLineNumbers = _ref7$showLineNumbers === void 0 ? false : _ref7$showLineNumbers,- _ref7$showInlineLineN = _ref7.showInlineLineNumbers,- showInlineLineNumbers = _ref7$showInlineLineN === void 0 ? true : _ref7$showInlineLineN,- _ref7$startingLineNum = _ref7.startingLineNumber,- startingLineNumber = _ref7$startingLineNum === void 0 ? 1 : _ref7$startingLineNum,- lineNumberContainerStyle = _ref7.lineNumberContainerStyle,- _ref7$lineNumberStyle = _ref7.lineNumberStyle,- lineNumberStyle = _ref7$lineNumberStyle === void 0 ? {} : _ref7$lineNumberStyle,- wrapLines = _ref7.wrapLines,- _ref7$wrapLongLines = _ref7.wrapLongLines,- wrapLongLines = _ref7$wrapLongLines === void 0 ? false : _ref7$wrapLongLines,- _ref7$lineProps = _ref7.lineProps,- lineProps = _ref7$lineProps === void 0 ? {} : _ref7$lineProps,- renderer = _ref7.renderer,- _ref7$PreTag = _ref7.PreTag,- PreTag = _ref7$PreTag === void 0 ? 'pre' : _ref7$PreTag,- _ref7$CodeTag = _ref7.CodeTag,- CodeTag = _ref7$CodeTag === void 0 ? 'code' : _ref7$CodeTag,- _ref7$code = _ref7.code,- code = _ref7$code === void 0 ? (Array.isArray(children) ? children[0] : children) || '' : _ref7$code,- astGenerator = _ref7.astGenerator,- rest = _objectWithoutProperties(_ref7, _excluded);-- astGenerator = astGenerator || defaultAstGenerator;- var allLineNumbers = showLineNumbers ? /*#__PURE__*/react.createElement(AllLineNumbers, {- containerStyle: lineNumberContainerStyle,- codeStyle: codeTagProps.style || {},- numberStyle: lineNumberStyle,- startingLineNumber: startingLineNumber,- codeString: code- }) : null;- var defaultPreStyle = style.hljs || style['pre[class*="language-"]'] || {- backgroundColor: '#fff'- };- var generatorClassName = isHighlightJs(astGenerator) ? 'hljs' : 'prismjs';- var preProps = useInlineStyles ? Object.assign({}, rest, {- style: Object.assign({}, defaultPreStyle, customStyle)- }) : Object.assign({}, rest, {- className: rest.className ? "".concat(generatorClassName, " ").concat(rest.className) : generatorClassName,- style: Object.assign({}, customStyle)- });-- if (wrapLongLines) {- codeTagProps.style = highlight_objectSpread(highlight_objectSpread({}, codeTagProps.style), {}, {- whiteSpace: 'pre-wrap'- });- } else {- codeTagProps.style = highlight_objectSpread(highlight_objectSpread({}, codeTagProps.style), {}, {- whiteSpace: 'pre'- });- }-- if (!astGenerator) {- return /*#__PURE__*/react.createElement(PreTag, preProps, allLineNumbers, /*#__PURE__*/react.createElement(CodeTag, codeTagProps, code));- }- /*- * Some custom renderers rely on individual row elements so we need to turn wrapLines on- * if renderer is provided and wrapLines is undefined.- */--- if (wrapLines === undefined && renderer || wrapLongLines) wrapLines = true;- renderer = renderer || defaultRenderer;- var defaultCodeValue = [{- type: 'text',- value: code- }];- var codeTree = getCodeTree({- astGenerator: astGenerator,- language: language,- code: code,- defaultCodeValue: defaultCodeValue- });-- if (codeTree.language === null) {- codeTree.value = defaultCodeValue;- } // determine largest line number so that we can force minWidth on all linenumber elements--- var lineCount = codeTree.value.length;-- if (lineCount === 1 && codeTree.value[0].type === 'text') {- // Since codeTree for an unparsable text (e.g. 'a\na\na') is [{ type: 'text', value: 'a\na\na' }]- lineCount = codeTree.value[0].value.split('\n').length;- }-- var largestLineNumber = lineCount + startingLineNumber;- var rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);- return /*#__PURE__*/react.createElement(PreTag, preProps, /*#__PURE__*/react.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({- rows: rows,- stylesheet: style,- useInlineStyles: useInlineStyles- })));- };-}-;// CONCATENATED MODULE: ./node_modules/hast-util-parse-selector/lib/index.js-/**- * @typedef {import('hast').Properties} Properties- * @typedef {import('hast').Element} Element- */--const lib_search = /[#.]/g--/**- * Create a hast element from a simple CSS selector.- *- * @template {string} Selector- * Type of selector.- * @template {string} [DefaultTagName='div']- * Type of default tag name.- * @param {Selector | null | undefined} [selector]- * Simple CSS selector.- *- * Can contain a tag name (`foo`), classes (`.bar`), and an ID (`#baz`).- * Multiple classes are allowed.- * Uses the last ID if multiple IDs are found.- * @param {DefaultTagName | null | undefined} [defaultTagName='div']- * Tag name to use if `selector` does not specify one (default: `'div'`).- * @returns {Element & {tagName: import('./extract.js').ExtractTagName<Selector, DefaultTagName>}}- * Built element.- */-function parseSelector(selector, defaultTagName) {- const value = selector || ''- /** @type {Properties} */- const props = {}- let start = 0- /** @type {string | undefined} */- let previous- /** @type {string | undefined} */- let tagName-- while (start < value.length) {- lib_search.lastIndex = start- const match = lib_search.exec(value)- const subvalue = value.slice(start, match ? match.index : value.length)-- if (subvalue) {- if (!previous) {- tagName = subvalue- } else if (previous === '#') {- props.id = subvalue- } else if (Array.isArray(props.className)) {- props.className.push(subvalue)- } else {- props.className = [subvalue]- }-- start += subvalue.length- }-- if (match) {- previous = match[0]- start++- }- }-- return {- type: 'element',- // @ts-expect-error: fine.- tagName: tagName || defaultTagName || 'div',- properties: props,- children: []- }-}--;// CONCATENATED MODULE: ./node_modules/hastscript/lib/core.js-/**- * @typedef {import('hast').Root} Root- * @typedef {import('hast').Content} Content- * @typedef {import('hast').Element} Element- * @typedef {import('hast').Properties} Properties- * @typedef {import('property-information').Info} Info- * @typedef {import('property-information').Schema} Schema- */--/**- * @typedef {Content | Root} Node- * Any concrete `hast` node.- * @typedef {Root | Element} HResult- * Result from a `h` (or `s`) call.- *- * @typedef {string | number} HStyleValue- * Value for a CSS style field.- * @typedef {Record<string, HStyleValue>} HStyle- * Supported value of a `style` prop.- * @typedef {string | number | boolean | null | undefined} HPrimitiveValue- * Primitive property value.- * @typedef {Array<string | number>} HArrayValue- * List of property values for space- or comma separated values (such as `className`).- * @typedef {HPrimitiveValue | HArrayValue} HPropertyValue- * Primitive value or list value.- * @typedef {{[property: string]: HPropertyValue | HStyle}} HProperties- * Acceptable value for element properties.- *- * @typedef {string | number | null | undefined} HPrimitiveChild- * Primitive children, either ignored (nullish), or turned into text nodes.- * @typedef {Array<Node | HPrimitiveChild>} HArrayChild- * List of children.- * @typedef {Node | HPrimitiveChild | HArrayChild} HChild- * Acceptable child value.- */-------const buttonTypes = new Set(['menu', 'submit', 'reset', 'button'])--const core_own = {}.hasOwnProperty--/**- * @param {Schema} schema- * @param {string} defaultTagName- * @param {Array<string>} [caseSensitive]- */-function core(schema, defaultTagName, caseSensitive) {- const adjust = caseSensitive && createAdjustMap(caseSensitive)-- const h =- /**- * @type {{- * (): Root- * (selector: null | undefined, ...children: Array<HChild>): Root- * (selector: string, properties?: HProperties, ...children: Array<HChild>): Element- * (selector: string, ...children: Array<HChild>): Element- * }}- */- (- /**- * Hyperscript compatible DSL for creating virtual hast trees.- *- * @param {string | null} [selector]- * @param {HProperties | HChild} [properties]- * @param {Array<HChild>} children- * @returns {HResult}- */- function (selector, properties, ...children) {- let index = -1- /** @type {HResult} */- let node-- if (selector === undefined || selector === null) {- node = {type: 'root', children: []}- // @ts-expect-error Properties are not supported for roots.- children.unshift(properties)- } else {- node = parseSelector(selector, defaultTagName)- // Normalize the name.- node.tagName = node.tagName.toLowerCase()- if (adjust && core_own.call(adjust, node.tagName)) {- node.tagName = adjust[node.tagName]- }-- // Handle props.- if (isProperties(properties, node.tagName)) {- /** @type {string} */- let key-- for (key in properties) {- if (core_own.call(properties, key)) {- // @ts-expect-error `node.properties` is set.- core_addProperty(schema, node.properties, key, properties[key])- }- }- } else {- children.unshift(properties)- }- }-- // Handle children.- while (++index < children.length) {- addChild(node.children, children[index])- }-- if (node.type === 'element' && node.tagName === 'template') {- node.content = {type: 'root', children: node.children}- node.children = []- }-- return node- }- )-- return h-}--/**- * @param {HProperties | HChild} value- * @param {string} name- * @returns {value is HProperties}- */-function isProperties(value, name) {- if (- value === null ||- value === undefined ||- typeof value !== 'object' ||- Array.isArray(value)- ) {- return false- }-- if (name === 'input' || !value.type || typeof value.type !== 'string') {- return true- }-- if ('children' in value && Array.isArray(value.children)) {- return false- }-- if (name === 'button') {- return buttonTypes.has(value.type.toLowerCase())- }-- return !('value' in value)-}--/**- * @param {Schema} schema- * @param {Properties} properties- * @param {string} key- * @param {HStyle | HPropertyValue} value- * @returns {void}- */-function core_addProperty(schema, properties, key, value) {- const info = find(schema, key)- let index = -1- /** @type {HPropertyValue} */- let result-- // Ignore nullish and NaN values.- if (value === undefined || value === null) return-- if (typeof value === 'number') {- // Ignore NaN.- if (Number.isNaN(value)) return-- result = value- }- // Booleans.- else if (typeof value === 'boolean') {- result = value- }- // Handle list values.- else if (typeof value === 'string') {- if (info.spaceSeparated) {- result = space_separated_tokens_parse(value)- } else if (info.commaSeparated) {- result = comma_separated_tokens_parse(value)- } else if (info.commaOrSpaceSeparated) {- result = space_separated_tokens_parse(comma_separated_tokens_parse(value).join(' '))- } else {- result = parsePrimitive(info, info.property, value)- }- } else if (Array.isArray(value)) {- result = value.concat()- } else {- result = info.property === 'style' ? style(value) : String(value)- }-- if (Array.isArray(result)) {- /** @type {Array<string | number>} */- const finalResult = []-- while (++index < result.length) {- // @ts-expect-error Assume no booleans in array.- finalResult[index] = parsePrimitive(info, info.property, result[index])- }-- result = finalResult- }-- // Class names (which can be added both on the `selector` and here).- if (info.property === 'className' && Array.isArray(properties.className)) {- // @ts-expect-error Assume no booleans in `className`.- result = properties.className.concat(result)- }-- properties[info.property] = result-}--/**- * @param {Array<Content>} nodes- * @param {HChild} value- * @returns {void}- */-function addChild(nodes, value) {- let index = -1-- if (value === undefined || value === null) {- // Empty.- } else if (typeof value === 'string' || typeof value === 'number') {- nodes.push({type: 'text', value: String(value)})- } else if (Array.isArray(value)) {- while (++index < value.length) {- addChild(nodes, value[index])- }- } else if (typeof value === 'object' && 'type' in value) {- if (value.type === 'root') {- addChild(nodes, value.children)- } else {- nodes.push(value)- }- } else {- throw new Error('Expected node, nodes, or string, got `' + value + '`')- }-}--/**- * Parse a single primitives.- *- * @param {Info} info- * @param {string} name- * @param {HPrimitiveValue} value- * @returns {HPrimitiveValue}- */-function parsePrimitive(info, name, value) {- if (typeof value === 'string') {- if (info.number && value && !Number.isNaN(Number(value))) {- return Number(value)- }-- if (- (info.boolean || info.overloadedBoolean) &&- (value === '' || normalize_normalize(value) === normalize_normalize(name))- ) {- return true- }- }-- return value-}--/**- * Serialize a `style` object as a string.- *- * @param {HStyle} value- * Style object.- * @returns {string}- * CSS string.- */-function style(value) {- /** @type {Array<string>} */- const result = []- /** @type {string} */- let key-- for (key in value) {- if (core_own.call(value, key)) {- result.push([key, value[key]].join(': '))- }- }-- return result.join('; ')-}--/**- * Create a map to adjust casing.- *- * @param {Array<string>} values- * List of properly cased keys.- * @returns {Record<string, string>}- * Map of lowercase keys to uppercase keys.- */-function createAdjustMap(values) {- /** @type {Record<string, string>} */- const result = {}- let index = -1-- while (++index < values.length) {- result[values[index].toLowerCase()] = values[index]- }-- return result-}--;// CONCATENATED MODULE: ./node_modules/hastscript/lib/html.js-/**- * @typedef {import('./core.js').HChild} Child- * Acceptable child value.- * @typedef {import('./core.js').HProperties} Properties- * Acceptable value for element properties.- * @typedef {import('./core.js').HResult} Result- * Result from a `h` (or `s`) call.- *- * @typedef {import('./jsx-classic.js').Element} h.JSX.Element- * @typedef {import('./jsx-classic.js').IntrinsicAttributes} h.JSX.IntrinsicAttributes- * @typedef {import('./jsx-classic.js').IntrinsicElements} h.JSX.IntrinsicElements- * @typedef {import('./jsx-classic.js').ElementChildrenAttribute} h.JSX.ElementChildrenAttribute- */-----const h = core(property_information_html, 'div')--;// CONCATENATED MODULE: ./node_modules/character-entities-legacy/index.js-/**- * List of legacy HTML named character references that don’t need a trailing semicolon.- *- * @type {Array<string>}- */-const characterEntitiesLegacy = [- 'AElig',- 'AMP',- 'Aacute',- 'Acirc',- 'Agrave',- 'Aring',- 'Atilde',- 'Auml',- 'COPY',- 'Ccedil',- 'ETH',- 'Eacute',- 'Ecirc',- 'Egrave',- 'Euml',- 'GT',- 'Iacute',- 'Icirc',- 'Igrave',- 'Iuml',- 'LT',- 'Ntilde',- 'Oacute',- 'Ocirc',- 'Ograve',- 'Oslash',- 'Otilde',- 'Ouml',- 'QUOT',- 'REG',- 'THORN',- 'Uacute',- 'Ucirc',- 'Ugrave',- 'Uuml',- 'Yacute',- 'aacute',- 'acirc',- 'acute',- 'aelig',- 'agrave',- 'amp',- 'aring',- 'atilde',- 'auml',- 'brvbar',- 'ccedil',- 'cedil',- 'cent',- 'copy',- 'curren',- 'deg',- 'divide',- 'eacute',- 'ecirc',- 'egrave',- 'eth',- 'euml',- 'frac12',- 'frac14',- 'frac34',- 'gt',- 'iacute',- 'icirc',- 'iexcl',- 'igrave',- 'iquest',- 'iuml',- 'laquo',- 'lt',- 'macr',- 'micro',- 'middot',- 'nbsp',- 'not',- 'ntilde',- 'oacute',- 'ocirc',- 'ograve',- 'ordf',- 'ordm',- 'oslash',- 'otilde',- 'ouml',- 'para',- 'plusmn',- 'pound',- 'quot',- 'raquo',- 'reg',- 'sect',- 'shy',- 'sup1',- 'sup2',- 'sup3',- 'szlig',- 'thorn',- 'times',- 'uacute',- 'ucirc',- 'ugrave',- 'uml',- 'uuml',- 'yacute',- 'yen',- 'yuml'-]--;// CONCATENATED MODULE: ./node_modules/character-reference-invalid/index.js-/**- * Map of invalid numeric character references to their replacements, according to HTML.- *- * @type {Record<number, string>}- */-const characterReferenceInvalid = {- 0: '�',- 128: '€',- 130: '‚',- 131: 'ƒ',- 132: '„',- 133: '…',- 134: '†',- 135: '‡',- 136: 'ˆ',- 137: '‰',- 138: 'Š',- 139: '‹',- 140: 'Œ',- 142: 'Ž',- 145: '‘',- 146: '’',- 147: '“',- 148: '”',- 149: '•',- 150: '–',- 151: '—',- 152: '˜',- 153: '™',- 154: 'š',- 155: '›',- 156: 'œ',- 158: 'ž',- 159: 'Ÿ'-}--;// CONCATENATED MODULE: ./node_modules/is-decimal/index.js-/**- * Check if the given character code, or the character code at the first- * character, is decimal.- *- * @param {string|number} character- * @returns {boolean} Whether `character` is a decimal- */-function isDecimal(character) {- const code =- typeof character === 'string' ? character.charCodeAt(0) : character-- return code >= 48 && code <= 57 /* 0-9 */-}--;// CONCATENATED MODULE: ./node_modules/is-hexadecimal/index.js-/**- * Check if the given character code, or the character code at the first- * character, is hexadecimal.- *- * @param {string|number} character- * @returns {boolean} Whether `character` is hexadecimal- */-function isHexadecimal(character) {- const code =- typeof character === 'string' ? character.charCodeAt(0) : character-- return (- (code >= 97 /* a */ && code <= 102) /* z */ ||- (code >= 65 /* A */ && code <= 70) /* Z */ ||- (code >= 48 /* A */ && code <= 57) /* Z */- )-}--;// CONCATENATED MODULE: ./node_modules/is-alphabetical/index.js-/**- * Check if the given character code, or the character code at the first- * character, is alphabetical.- *- * @param {string|number} character- * @returns {boolean} Whether `character` is alphabetical.- */-function isAlphabetical(character) {- const code =- typeof character === 'string' ? character.charCodeAt(0) : character-- return (- (code >= 97 && code <= 122) /* a-z */ ||- (code >= 65 && code <= 90) /* A-Z */- )-}--;// CONCATENATED MODULE: ./node_modules/is-alphanumerical/index.js----/**- * Check if the given character code, or the character code at the first- * character, is alphanumerical.- *- * @param {string|number} character- * @returns {boolean} Whether `character` is alphanumerical.- */-function isAlphanumerical(character) {- return isAlphabetical(character) || isDecimal(character)-}--;// CONCATENATED MODULE: ./node_modules/parse-entities/lib/index.js-/**- * @typedef {import('unist').Point} Point- * @typedef {import('unist').Position} Position- */---------const fromCharCode = String.fromCharCode--// Warning messages.-const messages = [- '',- /* 1: Non terminated (named) */- 'Named character references must be terminated by a semicolon',- /* 2: Non terminated (numeric) */- 'Numeric character references must be terminated by a semicolon',- /* 3: Empty (named) */- 'Named character references cannot be empty',- /* 4: Empty (numeric) */- 'Numeric character references cannot be empty',- /* 5: Unknown (named) */- 'Named character references must be known',- /* 6: Disallowed (numeric) */- 'Numeric character references cannot be disallowed',- /* 7: Prohibited (numeric) */- 'Numeric character references cannot be outside the permissible Unicode range'-]--/**- * Parse HTML character references.- *- * @param {string} value- * @param {import('../index.js').Options} [options={}]- */-function parseEntities(value, options = {}) {- const additional =- typeof options.additional === 'string'- ? options.additional.charCodeAt(0)- : options.additional- /** @type {Array<string>} */- const result = []- let index = 0- let lines = -1- let queue = ''- /** @type {Point|undefined} */- let point- /** @type {Array<number>|undefined} */- let indent-- if (options.position) {- if ('start' in options.position || 'indent' in options.position) {- // @ts-expect-error: points don’t have indent.- indent = options.position.indent- // @ts-expect-error: points don’t have indent.- point = options.position.start- } else {- point = options.position- }- }-- let line = (point ? point.line : 0) || 1- let column = (point ? point.column : 0) || 1-- // Cache the current point.- let previous = now()- /** @type {number|undefined} */- let character-- // Ensure the algorithm walks over the first character (inclusive).- index---- while (++index <= value.length) {- // If the previous character was a newline.- if (character === 10 /* `\n` */) {- column = (indent ? indent[lines] : 0) || 1- }-- character = value.charCodeAt(index)-- if (character === 38 /* `&` */) {- const following = value.charCodeAt(index + 1)-- // The behavior depends on the identity of the next character.- if (- following === 9 /* `\t` */ ||- following === 10 /* `\n` */ ||- following === 12 /* `\f` */ ||- following === 32 /* ` ` */ ||- following === 38 /* `&` */ ||- following === 60 /* `<` */ ||- Number.isNaN(following) ||- (additional && following === additional)- ) {- // Not a character reference.- // No characters are consumed, and nothing is returned.- // This is not an error, either.- queue += fromCharCode(character)- column++- continue- }-- const start = index + 1- let begin = start- let end = start- /** @type {string} */- let type-- if (following === 35 /* `#` */) {- // Numerical reference.- end = ++begin-- // The behavior further depends on the next character.- const following = value.charCodeAt(end)-- if (following === 88 /* `X` */ || following === 120 /* `x` */) {- // ASCII hexadecimal digits.- type = 'hexadecimal'- end = ++begin- } else {- // ASCII decimal digits.- type = 'decimal'- }- } else {- // Named reference.- type = 'named'- }-- let characterReferenceCharacters = ''- let characterReference = ''- let characters = ''- // Each type of character reference accepts different characters.- // This test is used to detect whether a reference has ended (as the semicolon- // is not strictly needed).- const test =- type === 'named'- ? isAlphanumerical- : type === 'decimal'- ? isDecimal- : isHexadecimal-- end---- while (++end <= value.length) {- const following = value.charCodeAt(end)-- if (!test(following)) {- break- }-- characters += fromCharCode(following)-- // Check if we can match a legacy named reference.- // If so, we cache that as the last viable named reference.- // This ensures we do not need to walk backwards later.- if (type === 'named' && characterEntitiesLegacy.includes(characters)) {- characterReferenceCharacters = characters- // @ts-expect-error: always able to decode.- characterReference = decodeNamedCharacterReference(characters)- }- }-- let terminated = value.charCodeAt(end) === 59 /* `;` */-- if (terminated) {- end++-- const namedReference =- type === 'named' ? decodeNamedCharacterReference(characters) : false-- if (namedReference) {- characterReferenceCharacters = characters- characterReference = namedReference- }- }-- let diff = 1 + end - start- let reference = ''-- if (!terminated && options.nonTerminated === false) {- // Empty.- } else if (!characters) {- // An empty (possible) reference is valid, unless it’s numeric (thus an- // ampersand followed by an octothorp).- if (type !== 'named') {- warning(4 /* Empty (numeric) */, diff)- }- } else if (type === 'named') {- // An ampersand followed by anything unknown, and not terminated, is- // invalid.- if (terminated && !characterReference) {- warning(5 /* Unknown (named) */, 1)- } else {- // If there’s something after an named reference which is not known,- // cap the reference.- if (characterReferenceCharacters !== characters) {- end = begin + characterReferenceCharacters.length- diff = 1 + end - begin- terminated = false- }-- // If the reference is not terminated, warn.- if (!terminated) {- const reason = characterReferenceCharacters- ? 1 /* Non terminated (named) */- : 3 /* Empty (named) */-- if (options.attribute) {- const following = value.charCodeAt(end)-- if (following === 61 /* `=` */) {- warning(reason, diff)- characterReference = ''- } else if (isAlphanumerical(following)) {- characterReference = ''- } else {- warning(reason, diff)- }- } else {- warning(reason, diff)- }- }- }-- reference = characterReference- } else {- if (!terminated) {- // All nonterminated numeric references are not rendered, and emit a- // warning.- warning(2 /* Non terminated (numeric) */, diff)- }-- // When terminated and numerical, parse as either hexadecimal or- // decimal.- let referenceCode = Number.parseInt(- characters,- type === 'hexadecimal' ? 16 : 10- )-- // Emit a warning when the parsed number is prohibited, and replace with- // replacement character.- if (prohibited(referenceCode)) {- warning(7 /* Prohibited (numeric) */, diff)- reference = fromCharCode(65533 /* `�` */)- } else if (referenceCode in characterReferenceInvalid) {- // Emit a warning when the parsed number is disallowed, and replace by- // an alternative.- warning(6 /* Disallowed (numeric) */, diff)- reference = characterReferenceInvalid[referenceCode]- } else {- // Parse the number.- let output = ''-- // Emit a warning when the parsed number should not be used.- if (disallowed(referenceCode)) {- warning(6 /* Disallowed (numeric) */, diff)- }-- // Serialize the number.- if (referenceCode > 0xffff) {- referenceCode -= 0x10000- output += fromCharCode((referenceCode >>> (10 & 0x3ff)) | 0xd800)- referenceCode = 0xdc00 | (referenceCode & 0x3ff)- }-- reference = output + fromCharCode(referenceCode)- }- }-- // Found it!- // First eat the queued characters as normal text, then eat a reference.- if (reference) {- flush()-- previous = now()- index = end - 1- column += end - start + 1- result.push(reference)- const next = now()- next.offset++-- if (options.reference) {- options.reference.call(- options.referenceContext,- reference,- {start: previous, end: next},- value.slice(start - 1, end)- )- }-- previous = next- } else {- // If we could not find a reference, queue the checked characters (as- // normal characters), and move the pointer to their end.- // This is possible because we can be certain neither newlines nor- // ampersands are included.- characters = value.slice(start - 1, end)- queue += characters- column += characters.length- index = end - 1- }- } else {- // Handle anything other than an ampersand, including newlines and EOF.- if (character === 10 /* `\n` */) {- line++- lines++- column = 0- }-- if (Number.isNaN(character)) {- flush()- } else {- queue += fromCharCode(character)- column++- }- }- }-- // Return the reduced nodes.- return result.join('')-- // Get current position.- function now() {- return {- line,- column,- offset: index + ((point ? point.offset : 0) || 0)- }- }-- /**- * Handle the warning.- *- * @param {1|2|3|4|5|6|7} code- * @param {number} offset- */- function warning(code, offset) {- /** @type {ReturnType<now>} */- let position-- if (options.warning) {- position = now()- position.column += offset- position.offset += offset-- options.warning.call(- options.warningContext,- messages[code],- position,- code- )- }- }-- /**- * Flush `queue` (normal text).- * Macro invoked before each reference and at the end of `value`.- * Does nothing when `queue` is empty.- */- function flush() {- if (queue) {- result.push(queue)-- if (options.text) {- options.text.call(options.textContext, queue, {- start: previous,- end: now()- })- }-- queue = ''- }- }-}--/**- * Check if `character` is outside the permissible unicode range.- *- * @param {number} code- * @returns {boolean}- */-function prohibited(code) {- return (code >= 0xd800 && code <= 0xdfff) || code > 0x10ffff-}--/**- * Check if `character` is disallowed.- *- * @param {number} code- * @returns {boolean}- */-function disallowed(code) {- return (- (code >= 0x0001 && code <= 0x0008) ||- code === 0x000b ||- (code >= 0x000d && code <= 0x001f) ||- (code >= 0x007f && code <= 0x009f) ||- (code >= 0xfdd0 && code <= 0xfdef) ||- (code & 0xffff) === 0xffff ||- (code & 0xffff) === 0xfffe- )-}--;// CONCATENATED MODULE: ./node_modules/refractor/lib/prism-core.js-// @ts-nocheck--// This is a slimmed down version of `prism-core.js`, to remove globals,-// document, workers, `util.encode`, `Token.stringify`--// Private helper vars-var lang = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i-var uniqueId = 0--// The grammar object for plaintext-var plainTextGrammar = {}--var prism_core_ = {- /**- * A namespace for utility methods.- *- * All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may- * change or disappear at any time.- *- * @namespace- * @memberof Prism- */- util: {- /**- * Returns the name of the type of the given value.- *- * @param {any} o- * @returns {string}- * @example- * type(null) === 'Null'- * type(undefined) === 'Undefined'- * type(123) === 'Number'- * type('foo') === 'String'- * type(true) === 'Boolean'- * type([1, 2]) === 'Array'- * type({}) === 'Object'- * type(String) === 'Function'- * type(/abc+/) === 'RegExp'- */- type: function (o) {- return Object.prototype.toString.call(o).slice(8, -1)- },-- /**- * Returns a unique number for the given object. Later calls will still return the same number.- *- * @param {Object} obj- * @returns {number}- */- objId: function (obj) {- if (!obj['__id']) {- Object.defineProperty(obj, '__id', {value: ++uniqueId})- }- return obj['__id']- },-- /**- * Creates a deep clone of the given object.- *- * The main intended use of this function is to clone language definitions.- *- * @param {T} o- * @param {Record<number, any>} [visited]- * @returns {T}- * @template T- */- clone: function deepClone(o, visited) {- visited = visited || {}-- var clone- var id- switch (prism_core_.util.type(o)) {- case 'Object':- id = prism_core_.util.objId(o)- if (visited[id]) {- return visited[id]- }- clone = /** @type {Record<string, any>} */ ({})- visited[id] = clone-- for (var key in o) {- if (o.hasOwnProperty(key)) {- clone[key] = deepClone(o[key], visited)- }- }-- return /** @type {any} */ (clone)-- case 'Array':- id = prism_core_.util.objId(o)- if (visited[id]) {- return visited[id]- }- clone = []- visited[id] = clone-- o.forEach(function (v, i) {- clone[i] = deepClone(v, visited)- })-- return /** @type {any} */ (clone)-- default:- return o- }- }- },-- /**- * This namespace contains all currently loaded languages and the some helper functions to create and modify languages.- *- * @namespace- * @memberof Prism- * @public- */- languages: {- /**- * The grammar for plain, unformatted text.- */- plain: plainTextGrammar,- plaintext: plainTextGrammar,- text: plainTextGrammar,- txt: plainTextGrammar,-- /**- * Creates a deep copy of the language with the given id and appends the given tokens.- *- * If a token in `redef` also appears in the copied language, then the existing token in the copied language- * will be overwritten at its original position.- *- * ## Best practices- *- * Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)- * doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to- * understand the language definition because, normally, the order of tokens matters in Prism grammars.- *- * Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.- * Furthermore, all non-overwriting tokens should be placed after the overwriting ones.- *- * @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.- * @param {Grammar} redef The new tokens to append.- * @returns {Grammar} The new language created.- * @public- * @example- * Prism.languages['css-with-colors'] = Prism.languages.extend('css', {- * // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token- * // at its original position- * 'comment': { ... },- * // CSS doesn't have a 'color' token, so this token will be appended- * 'color': /\b(?:red|green|blue)\b/- * });- */- extend: function (id, redef) {- var lang = prism_core_.util.clone(prism_core_.languages[id])-- for (var key in redef) {- lang[key] = redef[key]- }-- return lang- },-- /**- * Inserts tokens _before_ another token in a language definition or any other grammar.- *- * ## Usage- *- * This helper method makes it easy to modify existing languages. For example, the CSS language definition- * not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded- * in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the- * appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do- * this:- *- * ```js- * Prism.languages.markup.style = {- * // token- * };- * ```- *- * then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens- * before existing tokens. For the CSS example above, you would use it like this:- *- * ```js- * Prism.languages.insertBefore('markup', 'cdata', {- * 'style': {- * // token- * }- * });- * ```- *- * ## Special cases- *- * If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar- * will be ignored.- *- * This behavior can be used to insert tokens after `before`:- *- * ```js- * Prism.languages.insertBefore('markup', 'comment', {- * 'comment': Prism.languages.markup.comment,- * // tokens after 'comment'- * });- * ```- *- * ## Limitations- *- * The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object- * properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave- * differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily- * deleting properties which is necessary to insert at arbitrary positions.- *- * To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.- * Instead, it will create a new object and replace all references to the target object with the new one. This- * can be done without temporarily deleting properties, so the iteration order is well-defined.- *- * However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if- * you hold the target object in a variable, then the value of the variable will not change.- *- * ```js- * var oldMarkup = Prism.languages.markup;- * var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });- *- * assert(oldMarkup !== Prism.languages.markup);- * assert(newMarkup === Prism.languages.markup);- * ```- *- * @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the- * object to be modified.- * @param {string} before The key to insert before.- * @param {Grammar} insert An object containing the key-value pairs to be inserted.- * @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the- * object to be modified.- *- * Defaults to `Prism.languages`.- * @returns {Grammar} The new grammar object.- * @public- */- insertBefore: function (inside, before, insert, root) {- root = root || /** @type {any} */ (prism_core_.languages)- var grammar = root[inside]- /** @type {Grammar} */- var ret = {}-- for (var token in grammar) {- if (grammar.hasOwnProperty(token)) {- if (token == before) {- for (var newToken in insert) {- if (insert.hasOwnProperty(newToken)) {- ret[newToken] = insert[newToken]- }- }- }-- // Do not insert token which also occur in insert. See #1525- if (!insert.hasOwnProperty(token)) {- ret[token] = grammar[token]- }- }- }-- var old = root[inside]- root[inside] = ret-- // Update references in other language definitions- prism_core_.languages.DFS(prism_core_.languages, function (key, value) {- if (value === old && key != inside) {- this[key] = ret- }- })-- return ret- },-- // Traverse a language definition with Depth First Search- DFS: function DFS(o, callback, type, visited) {- visited = visited || {}-- var objId = prism_core_.util.objId-- for (var i in o) {- if (o.hasOwnProperty(i)) {- callback.call(o, i, o[i], type || i)-- var property = o[i]- var propertyType = prism_core_.util.type(property)-- if (propertyType === 'Object' && !visited[objId(property)]) {- visited[objId(property)] = true- DFS(property, callback, null, visited)- } else if (propertyType === 'Array' && !visited[objId(property)]) {- visited[objId(property)] = true- DFS(property, callback, i, visited)- }- }- }- }- },-- plugins: {},-- /**- * Low-level function, only use if you know what you’re doing. It accepts a string of text as input- * and the language definitions to use, and returns a string with the HTML produced.- *- * The following hooks will be run:- * 1. `before-tokenize`- * 2. `after-tokenize`- * 3. `wrap`: On each {@link Token}.- *- * @param {string} text A string with the code to be highlighted.- * @param {Grammar} grammar An object containing the tokens to use.- *- * Usually a language definition like `Prism.languages.markup`.- * @param {string} language The name of the language definition passed to `grammar`.- * @returns {string} The highlighted HTML.- * @memberof Prism- * @public- * @example- * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');- */- highlight: function (text, grammar, language) {- var env = {- code: text,- grammar: grammar,- language: language- }- prism_core_.hooks.run('before-tokenize', env)- if (!env.grammar) {- throw new Error('The language "' + env.language + '" has no grammar.')- }- env.tokens = prism_core_.tokenize(env.code, env.grammar)- prism_core_.hooks.run('after-tokenize', env)- return Token.stringify(prism_core_.util.encode(env.tokens), env.language)- },-- /**- * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input- * and the language definitions to use, and returns an array with the tokenized code.- *- * When the language definition includes nested tokens, the function is called recursively on each of these tokens.- *- * This method could be useful in other contexts as well, as a very crude parser.- *- * @param {string} text A string with the code to be highlighted.- * @param {Grammar} grammar An object containing the tokens to use.- *- * Usually a language definition like `Prism.languages.markup`.- * @returns {TokenStream} An array of strings and tokens, a token stream.- * @memberof Prism- * @public- * @example- * let code = `var foo = 0;`;- * let tokens = Prism.tokenize(code, Prism.languages.javascript);- * tokens.forEach(token => {- * if (token instanceof Prism.Token && token.type === 'number') {- * console.log(`Found numeric literal: ${token.content}`);- * }- * });- */- tokenize: function (text, grammar) {- var rest = grammar.rest- if (rest) {- for (var token in rest) {- grammar[token] = rest[token]- }-- delete grammar.rest- }-- var tokenList = new LinkedList()- addAfter(tokenList, tokenList.head, text)-- matchGrammar(text, tokenList, grammar, tokenList.head, 0)-- return toArray(tokenList)- },-- /**- * @namespace- * @memberof Prism- * @public- */- hooks: {- all: {},-- /**- * Adds the given callback to the list of callbacks for the given hook.- *- * The callback will be invoked when the hook it is registered for is run.- * Hooks are usually directly run by a highlight function but you can also run hooks yourself.- *- * One callback function can be registered to multiple hooks and the same hook multiple times.- *- * @param {string} name The name of the hook.- * @param {HookCallback} callback The callback function which is given environment variables.- * @public- */- add: function (name, callback) {- var hooks = prism_core_.hooks.all-- hooks[name] = hooks[name] || []-- hooks[name].push(callback)- },-- /**- * Runs a hook invoking all registered callbacks with the given environment variables.- *- * Callbacks will be invoked synchronously and in the order in which they were registered.- *- * @param {string} name The name of the hook.- * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.- * @public- */- run: function (name, env) {- var callbacks = prism_core_.hooks.all[name]-- if (!callbacks || !callbacks.length) {- return- }-- for (var i = 0, callback; (callback = callbacks[i++]); ) {- callback(env)- }- }- },-- Token: Token-}--// Typescript note:-// The following can be used to import the Token type in JSDoc:-//-// @typedef {InstanceType<import("./prism-core")["Token"]>} Token--/**- * Creates a new token.- *- * @param {string} type See {@link Token#type type}- * @param {string | TokenStream} content See {@link Token#content content}- * @param {string|string[]} [alias] The alias(es) of the token.- * @param {string} [matchedStr=""] A copy of the full string this token was created from.- * @class- * @global- * @public- */-function Token(type, content, alias, matchedStr) {- /**- * The type of the token.- *- * This is usually the key of a pattern in a {@link Grammar}.- *- * @type {string}- * @see GrammarToken- * @public- */- this.type = type- /**- * The strings or tokens contained by this token.- *- * This will be a token stream if the pattern matched also defined an `inside` grammar.- *- * @type {string | TokenStream}- * @public- */- this.content = content- /**- * The alias(es) of the token.- *- * @type {string|string[]}- * @see GrammarToken- * @public- */- this.alias = alias- // Copy of the full string this token was created from- this.length = (matchedStr || '').length | 0-}--/**- * A token stream is an array of strings and {@link Token Token} objects.- *- * Token streams have to fulfill a few properties that are assumed by most functions (mostly internal ones) that process- * them.- *- * 1. No adjacent strings.- * 2. No empty strings.- *- * The only exception here is the token stream that only contains the empty string and nothing else.- *- * @typedef {Array<string | Token>} TokenStream- * @global- * @public- */--/**- * @param {RegExp} pattern- * @param {number} pos- * @param {string} text- * @param {boolean} lookbehind- * @returns {RegExpExecArray | null}- */-function matchPattern(pattern, pos, text, lookbehind) {- pattern.lastIndex = pos- var match = pattern.exec(text)- if (match && lookbehind && match[1]) {- // change the match to remove the text matched by the Prism lookbehind group- var lookbehindLength = match[1].length- match.index += lookbehindLength- match[0] = match[0].slice(lookbehindLength)- }- return match-}--/**- * @param {string} text- * @param {LinkedList<string | Token>} tokenList- * @param {any} grammar- * @param {LinkedListNode<string | Token>} startNode- * @param {number} startPos- * @param {RematchOptions} [rematch]- * @returns {void}- * @private- *- * @typedef RematchOptions- * @property {string} cause- * @property {number} reach- */-function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) {- for (var token in grammar) {- if (!grammar.hasOwnProperty(token) || !grammar[token]) {- continue- }-- var patterns = grammar[token]- patterns = Array.isArray(patterns) ? patterns : [patterns]-- for (var j = 0; j < patterns.length; ++j) {- if (rematch && rematch.cause == token + ',' + j) {- return- }-- var patternObj = patterns[j]- var inside = patternObj.inside- var lookbehind = !!patternObj.lookbehind- var greedy = !!patternObj.greedy- var alias = patternObj.alias-- if (greedy && !patternObj.pattern.global) {- // Without the global flag, lastIndex won't work- var flags = patternObj.pattern.toString().match(/[imsuy]*$/)[0]- patternObj.pattern = RegExp(patternObj.pattern.source, flags + 'g')- }-- /** @type {RegExp} */- var pattern = patternObj.pattern || patternObj-- for (- // iterate the token list and keep track of the current token/string position- var currentNode = startNode.next, pos = startPos;- currentNode !== tokenList.tail;- pos += currentNode.value.length, currentNode = currentNode.next- ) {- if (rematch && pos >= rematch.reach) {- break- }-- var str = currentNode.value-- if (tokenList.length > text.length) {- // Something went terribly wrong, ABORT, ABORT!- return- }-- if (str instanceof Token) {- continue- }-- var removeCount = 1 // this is the to parameter of removeBetween- var match-- if (greedy) {- match = matchPattern(pattern, pos, text, lookbehind)- if (!match || match.index >= text.length) {- break- }-- var from = match.index- var to = match.index + match[0].length- var p = pos-- // find the node that contains the match- p += currentNode.value.length- while (from >= p) {- currentNode = currentNode.next- p += currentNode.value.length- }- // adjust pos (and p)- p -= currentNode.value.length- pos = p-- // the current node is a Token, then the match starts inside another Token, which is invalid- if (currentNode.value instanceof Token) {- continue- }-- // find the last node which is affected by this match- for (- var k = currentNode;- k !== tokenList.tail && (p < to || typeof k.value === 'string');- k = k.next- ) {- removeCount++- p += k.value.length- }- removeCount---- // replace with the new match- str = text.slice(pos, p)- match.index -= pos- } else {- match = matchPattern(pattern, 0, str, lookbehind)- if (!match) {- continue- }- }-- // eslint-disable-next-line no-redeclare- var from = match.index- var matchStr = match[0]- var before = str.slice(0, from)- var after = str.slice(from + matchStr.length)-- var reach = pos + str.length- if (rematch && reach > rematch.reach) {- rematch.reach = reach- }-- var removeFrom = currentNode.prev-- if (before) {- removeFrom = addAfter(tokenList, removeFrom, before)- pos += before.length- }-- removeRange(tokenList, removeFrom, removeCount)-- var wrapped = new Token(- token,- inside ? prism_core_.tokenize(matchStr, inside) : matchStr,- alias,- matchStr- )- currentNode = addAfter(tokenList, removeFrom, wrapped)-- if (after) {- addAfter(tokenList, currentNode, after)- }-- if (removeCount > 1) {- // at least one Token object was removed, so we have to do some rematching- // this can only happen if the current pattern is greedy-- /** @type {RematchOptions} */- var nestedRematch = {- cause: token + ',' + j,- reach: reach- }- matchGrammar(- text,- tokenList,- grammar,- currentNode.prev,- pos,- nestedRematch- )-- // the reach might have been extended because of the rematching- if (rematch && nestedRematch.reach > rematch.reach) {- rematch.reach = nestedRematch.reach- }- }- }- }- }-}--/**- * @typedef LinkedListNode- * @property {T} value- * @property {LinkedListNode<T> | null} prev The previous node.- * @property {LinkedListNode<T> | null} next The next node.- * @template T- * @private- */--/**- * @template T- * @private- */-function LinkedList() {- /** @type {LinkedListNode<T>} */- var head = {value: null, prev: null, next: null}- /** @type {LinkedListNode<T>} */- var tail = {value: null, prev: head, next: null}- head.next = tail-- /** @type {LinkedListNode<T>} */- this.head = head- /** @type {LinkedListNode<T>} */- this.tail = tail- this.length = 0-}--/**- * Adds a new node with the given value to the list.- *- * @param {LinkedList<T>} list- * @param {LinkedListNode<T>} node- * @param {T} value- * @returns {LinkedListNode<T>} The added node.- * @template T- */-function addAfter(list, node, value) {- // assumes that node != list.tail && values.length >= 0- var next = node.next-- var newNode = {value: value, prev: node, next: next}- node.next = newNode- next.prev = newNode- list.length++-- return newNode-}-/**- * Removes `count` nodes after the given node. The given node will not be removed.- *- * @param {LinkedList<T>} list- * @param {LinkedListNode<T>} node- * @param {number} count- * @template T- */-function removeRange(list, node, count) {- var next = node.next- for (var i = 0; i < count && next !== list.tail; i++) {- next = next.next- }- node.next = next- next.prev = node- list.length -= i-}-/**- * @param {LinkedList<T>} list- * @returns {T[]}- * @template T- */-function toArray(list) {- var array = []- var node = list.head.next- while (node !== list.tail) {- array.push(node.value)- node = node.next- }- return array-}--const Prism = prism_core_--// some additional documentation/types--/**- * The expansion of a simple `RegExp` literal to support additional properties.- *- * @typedef GrammarToken- * @property {RegExp} pattern The regular expression of the token.- * @property {boolean} [lookbehind=false] If `true`, then the first capturing group of `pattern` will (effectively)- * behave as a lookbehind group meaning that the captured text will not be part of the matched text of the new token.- * @property {boolean} [greedy=false] Whether the token is greedy.- * @property {string|string[]} [alias] An optional alias or list of aliases.- * @property {Grammar} [inside] The nested grammar of this token.- *- * The `inside` grammar will be used to tokenize the text value of each token of this kind.- *- * This can be used to make nested and even recursive language definitions.- *- * Note: This can cause infinite recursion. Be careful when you embed different languages or even the same language into- * each another.- * @global- * @public- */--/**- * @typedef Grammar- * @type {Object<string, RegExp | GrammarToken | Array<RegExp | GrammarToken>>}- * @property {Grammar} [rest] An optional grammar object that will be appended to this grammar.- * @global- * @public- */--/**- * A function which will invoked after an element was successfully highlighted.- *- * @callback HighlightCallback- * @param {Element} element The element successfully highlighted.- * @returns {void}- * @global- * @public- */--/**- * @callback HookCallback- * @param {Object<string, any>} env The environment variables of the hook.- * @returns {void}- * @global- * @public- */--;// CONCATENATED MODULE: ./node_modules/refractor/lib/core.js-/**- * @typedef _Token A hidden Prism token- * @property {string} type- * @property {string} content- * @property {string} alias- * @property {number} length- *- * @typedef _Env A hidden Prism environment- * @property {string} type- * @property {string} tag- * @property {Text|RefractorElement|Array<Text|RefractorElement>} content- * @property {Array<string>} classes- * @property {Record<string, string>} attributes- * @property {string} language- *- * @typedef {import('hast').Root} Root- * @typedef {import('hast').Element} Element- * @typedef {import('hast').Text} Text- * @typedef {Omit<Element, 'children'> & {children: Array<RefractorElement|Text>}} RefractorElement- * @typedef {Omit<Root, 'children'> & {children: Array<RefractorElement|Text>}} RefractorRoot- *- * @typedef {import('prismjs').Languages} Languages- * @typedef {import('prismjs').Grammar} Grammar Whatever this is, Prism handles it.- * @typedef {((prism: unknown) => void) & {displayName: string, aliases?: Array<string>}} Syntax A refractor syntax function- *- * @typedef Refractor Virtual syntax highlighting- * @property {highlight} highlight- * @property {alias} alias- * @property {register} register- * @property {registered} registered- * @property {listLanguages} listLanguages- * @property {Languages} languages- */--// Load all stuff in `prism.js` itself, except for `prism-file-highlight.js`.-// The wrapped non-leaky grammars are loaded instead of Prism’s originals.-----const lib_core_own = {}.hasOwnProperty--// Inherit.-function Refractor() {}--Refractor.prototype = Prism--/** @type {Refractor} */-// @ts-expect-error: TS is wrong.-const refractor = new Refractor()--// Create.-refractor.highlight = core_highlight-refractor.register = register-refractor.alias = alias-refractor.registered = registered-refractor.listLanguages = listLanguages--// @ts-expect-error Overwrite Prism.-refractor.util.encode = core_encode-// @ts-expect-error Overwrite Prism.-refractor.Token.stringify = core_stringify--/**- * Highlight `value` (code) as `language` (programming language).- *- * @param {string} value- * Code to highlight.- * @param {string|Grammar} language- * Programming language name, alias, or grammar.- * @returns {RefractorRoot}- * Node representing highlighted code.- */-function core_highlight(value, language) {- if (typeof value !== 'string') {- throw new TypeError('Expected `string` for `value`, got `' + value + '`')- }-- /** @type {Grammar} */- let grammar- /** @type {string|undefined} */- let name-- // `name` is a grammar object.- // This was called internally by Prism.js before 1.28.0.- /* c8 ignore next 2 */- if (language && typeof language === 'object') {- grammar = language- } else {- name = language-- if (typeof name !== 'string') {- throw new TypeError('Expected `string` for `name`, got `' + name + '`')- }-- if (lib_core_own.call(refractor.languages, name)) {- grammar = refractor.languages[name]- } else {- throw new Error('Unknown language: `' + name + '` is not registered')- }- }-- return {- type: 'root',- // @ts-expect-error: we hacked Prism to accept and return the things we want.- children: Prism.highlight.call(refractor, value, grammar, name)- }-}--/**- * Register a syntax.- *- * @param {Syntax} syntax- * Language function made for refractor, as in, the files in- * `refractor/lang/*.js`.- * @returns {void}- */-function register(syntax) {- if (typeof syntax !== 'function' || !syntax.displayName) {- throw new Error('Expected `function` for `syntax`, got `' + syntax + '`')- }-- // Do not duplicate registrations.- if (!lib_core_own.call(refractor.languages, syntax.displayName)) {- syntax(refractor)- }-}--/**- * Register aliases for already registered languages.- *- * @param {Record<string, string|Array<string>>|string} language- * @param {string|Array<string>} [alias]- * @returns {void}- */-function alias(language, alias) {- const languages = refractor.languages- /** @type {Record<string, string|Array<string>>} */- let map = {}-- if (typeof language === 'string') {- if (alias) {- map[language] = alias- }- } else {- map = language- }-- /** @type {string} */- let key-- for (key in map) {- if (lib_core_own.call(map, key)) {- const value = map[key]- const list = typeof value === 'string' ? [value] : value- let index = -1-- while (++index < list.length) {- languages[list[index]] = languages[key]- }- }- }-}--/**- * Check whether an `alias` or `language` is registered.- *- * @param {string} aliasOrLanguage- * @returns {boolean}- */-function registered(aliasOrLanguage) {- if (typeof aliasOrLanguage !== 'string') {- throw new TypeError(- 'Expected `string` for `aliasOrLanguage`, got `' + aliasOrLanguage + '`'- )- }-- return lib_core_own.call(refractor.languages, aliasOrLanguage)-}--/**- * List all registered languages (names and aliases).- *- * @returns {Array<string>}- */-function listLanguages() {- const languages = refractor.languages- /** @type {Array<string>} */- const list = []- /** @type {string} */- let language-- for (language in languages) {- if (- lib_core_own.call(languages, language) &&- typeof languages[language] === 'object'- ) {- list.push(language)- }- }-- return list-}--/**- * @param {string|_Token|Array<string|_Token>} value- * @param {string} language- * @returns {Text|RefractorElement|Array<Text|RefractorElement>}- */-function core_stringify(value, language) {- if (typeof value === 'string') {- return {type: 'text', value}- }-- if (Array.isArray(value)) {- /** @type {Array<Text|RefractorElement>} */- const result = []- let index = -1-- while (++index < value.length) {- if (- value[index] !== '' &&- value[index] !== null &&- value[index] !== undefined- ) {- // @ts-expect-error Assume no sub-arrays.- result.push(core_stringify(value[index], language))- }- }-- return result- }-- /** @type {_Env} */- const env = {- type: value.type,- content: core_stringify(value.content, language),- tag: 'span',- classes: ['token', value.type],- attributes: {},- language- }-- if (value.alias) {- env.classes.push(- ...(typeof value.alias === 'string' ? [value.alias] : value.alias)- )- }-- // @ts-expect-error Prism.- refractor.hooks.run('wrap', env)-- // @ts-expect-error Hush, it’s fine.- return h(- env.tag + '.' + env.classes.join('.'),- attributes(env.attributes),- env.content- )-}--/**- * @template {unknown} T- * @param {T} tokens- * @returns {T}- */-function core_encode(tokens) {- return tokens-}--/**- * @param {Record<string, string>} attrs- * @returns {Record<string, string>}- */-function attributes(attrs) {- /** @type {string} */- let key-- for (key in attrs) {- if (lib_core_own.call(attrs, key)) {- attrs[key] = parseEntities(attrs[key])- }- }-- return attrs-}--;// CONCATENATED MODULE: ./node_modules/react-syntax-highlighter/dist/esm/prism-light.js---var SyntaxHighlighter = highlight(refractor, {});--SyntaxHighlighter.registerLanguage = function (_, language) {- return refractor.register(language);-};--SyntaxHighlighter.alias = function (name, aliases) {- return refractor.alias(name, aliases);-};--/* harmony default export */ const prism_light = (SyntaxHighlighter);-;// CONCATENATED MODULE: ./src/components/system-message/index.jsx-/* provided dependency */ var system_message_React = __webpack_require__(294);-var system_message_excluded = ["children", "className", "node"];-function system_message_extends() { system_message_extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return system_message_extends.apply(this, arguments); }-function system_message_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = system_message_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }-function system_message_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }-/* eslint-disable react/prop-types */-------var SystemMessage = function SystemMessage(_ref) {- var _colors$botBubbleColo, _colors$botBubbleColo2, _colors$botBubbleColo3;- var message = _ref.message,- errorMessage = _ref.errorMessage,- botBubbleClass = _ref.botBubbleClass,- colors = _ref.colors,- syntaxHighlightTheme = _ref.syntaxHighlightTheme;- if (errorMessage && (message === null || message === void 0 ? void 0 : message.id) === message.id) {- return null;- }- if (!(message !== null && message !== void 0 && message.content)) {- return null;- }- return /*#__PURE__*/system_message_React.createElement(system_message_React.Fragment, null, /*#__PURE__*/system_message_React.createElement("div", {- className: "chat-message system",- key: message.id- }, /*#__PURE__*/system_message_React.createElement("div", {- className: "chat-content ".concat(botBubbleClass),- style: {- color: colors === null || colors === void 0 || (_colors$botBubbleColo = colors.botBubbleColors) === null || _colors$botBubbleColo === void 0 ? void 0 : _colors$botBubbleColo.textColor,- background: "linear-gradient(to right, ".concat(colors === null || colors === void 0 || (_colors$botBubbleColo2 = colors.botBubbleColors) === null || _colors$botBubbleColo2 === void 0 ? void 0 : _colors$botBubbleColo2.backgroundColorStart, ", ").concat(colors === null || colors === void 0 || (_colors$botBubbleColo3 = colors.botBubbleColors) === null || _colors$botBubbleColo3 === void 0 ? void 0 : _colors$botBubbleColo3.backgroundColorEnd, ")")- }- }, /*#__PURE__*/system_message_React.createElement("div", {- className: "chat-text",- key: syntaxHighlightTheme- }, /*#__PURE__*/system_message_React.createElement(ReactMarkdown, {- remarkPlugins: [remarkGfm],- components: {- code: function code(props) {- var _SYNTAX_HIGHLIGHT_THE, _SYNTAX_HIGHLIGHT_THE2;- // eslint-disable-next-line no-unused-vars- var children = props.children,- className = props.className,- node = props.node,- rest = system_message_objectWithoutProperties(props, system_message_excluded);- var match = /language-(\w+)/.exec(className || "");- return match ? /*#__PURE__*/system_message_React.createElement(prism_light, system_message_extends({}, rest, {- key: syntaxHighlightTheme- // wrapLongLines={true}- ,- PreTag: "div"- // eslint-disable-next-line react/no-children-prop- ,- children: String(children).replace(/\n$/, ""),- language: match[1],- style: ((_SYNTAX_HIGHLIGHT_THE = SYNTAX_HIGHLIGHT_THEMES.find(function (theme) {- return theme.name === syntaxHighlightTheme;- })) === null || _SYNTAX_HIGHLIGHT_THE === void 0 ? void 0 : _SYNTAX_HIGHLIGHT_THE.value) || ((_SYNTAX_HIGHLIGHT_THE2 = SYNTAX_HIGHLIGHT_THEMES.find(function (theme) {- return theme.isDefault;- })) === null || _SYNTAX_HIGHLIGHT_THE2 === void 0 ? void 0 : _SYNTAX_HIGHLIGHT_THE2.value)- })) : /*#__PURE__*/system_message_React.createElement("code", system_message_extends({}, rest, {- className: className- }), children);- }- }- }, message === null || message === void 0 ? void 0 : message.content)))));-};-SystemMessage.propTypes = {- message: prop_types_default().shape({- id: (prop_types_default()).number.isRequired,- content: (prop_types_default()).string.isRequired- }).isRequired,- errorMessage: (prop_types_default()).string,- botBubbleClass: (prop_types_default()).string-};-;// CONCATENATED MODULE: ./src/assets/svgs.jsx-/* provided dependency */ var svgs_React = __webpack_require__(294);-function svgs_extends() { svgs_extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return svgs_extends.apply(this, arguments); }-/* eslint-disable react/prop-types */-var ReloadIcon = function ReloadIcon() {- return /*#__PURE__*/svgs_React.createElement("svg", {- stroke: "currentColor",- fill: "none",- strokeWidth: "3",- viewBox: "0 0 24 24",- strokeLinecap: "round",- strokeLinejoin: "round",- className: "flex-shrink-0 icon-xs",- height: "0.85em",- width: "0.85em",- xmlns: "http://www.w3.org/2000/svg"- }, /*#__PURE__*/svgs_React.createElement("polyline", {- points: "1 4 1 10 7 10"- }), /*#__PURE__*/svgs_React.createElement("polyline", {- points: "23 20 23 14 17 14"- }), /*#__PURE__*/svgs_React.createElement("path", {- d: "M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"- }));-};-var ExpandIcon = function ExpandIcon() {- return /*#__PURE__*/svgs_React.createElement("svg", {- width: "20",- height: "20",- viewBox: "0 0 24 24",- fill: "none",- xmlns: "http://www.w3.org/2000/svg"- }, /*#__PURE__*/svgs_React.createElement("path", {- d: "M14 10L21 3M21 3H16.5M21 3V7.5M10 14L3 21M3 21H7.5M3 21L3 16.5",- stroke: "#000000",- strokeWidth: "2",- strokeLinecap: "round",- strokeLinejoin: "round"- }));-};-var CloseIcon = function CloseIcon() {- return /*#__PURE__*/svgs_React.createElement("svg", {- width: "20",- height: "20",- viewBox: "0 0 24 24",- fill: "none",- xmlns: "http://www.w3.org/2000/svg"- }, /*#__PURE__*/svgs_React.createElement("path", {- d: "M20.7457 3.32851C20.3552 2.93798 19.722 2.93798 19.3315 3.32851L12.0371 10.6229L4.74275 3.32851C4.35223 2.93798 3.71906 2.93798 3.32854 3.32851C2.93801 3.71903 2.93801 4.3522 3.32854 4.74272L10.6229 12.0371L3.32856 19.3314C2.93803 19.722 2.93803 20.3551 3.32856 20.7457C3.71908 21.1362 4.35225 21.1362 4.74277 20.7457L12.0371 13.4513L19.3315 20.7457C19.722 21.1362 20.3552 21.1362 20.7457 20.7457C21.1362 20.3551 21.1362 19.722 20.7457 19.3315L13.4513 12.0371L20.7457 4.74272C21.1362 4.3522 21.1362 3.71903 20.7457 3.32851Z",- fill: "#0F0F0F"- }));-};-var DownArrowIcon = function DownArrowIcon(_ref) {- var color = _ref.color;- return /*#__PURE__*/svgs_React.createElement("svg", {- width: "20",- height: "20",- viewBox: "0 0 1024 1024",- version: "1.1",- xmlns: "http://www.w3.org/2000/svg"- }, /*#__PURE__*/svgs_React.createElement("path", {- d: "M903.232 256l56.768 50.432L512 768 64 306.432 120.768 256 512 659.072z",- fill: color || "#fff"- }));-};-var ChatIcon = function ChatIcon(_ref2) {- var color = _ref2.color;- return /*#__PURE__*/svgs_React.createElement("svg", {- fill: color || "#fff",- height: "28",- width: "28",- version: "1.1",- id: "Layer_1",- xmlns: "http://www.w3.org/2000/svg",- viewBox: "0 0 50 50",- enableBackground: "new 0 0 50 50"- }, /*#__PURE__*/svgs_React.createElement("path", {- d: "M15.526,33.729c0.068,0.042,0.084,0.07,0.096,0.135c0.094,0.511-0.497,1.623-0.96,2.229\r\nc-0.209,0.274-0.263,0.637-0.142,0.959s0.398,0.561,0.736,0.63c0.278,0.056,0.544,0.081,0.798,0.081\r\nc1.558,0,2.649-0.962,3.341-1.571c0.148-0.131,0.339-0.3,0.465-0.39c1.468,0.337,3.729,0.604,5.163,0.604\r\nc0.798,0,1.597-0.057,2.384-0.156c1.198,0.388,2.5,0.608,3.865,0.608c0.947,0,2.359-0.161,3.367-0.378\r\nc0.053,0.046,0.108,0.098,0.169,0.151c0.479,0.423,1.283,1.132,2.45,1.132c0.19,0,0.389-0.019,0.598-0.061\r\nc0.337-0.069,0.614-0.307,0.736-0.629c0.121-0.322,0.067-0.686-0.142-0.959c-0.283-0.373-0.542-0.897-0.575-1.149\r\nc2.445-1.558,3.902-4.041,3.902-6.663c0-1.615-0.563-3.122-1.522-4.412c-0.13-6.704-6.908-12.127-15.233-12.127\r\nc-8.406,0-15.245,5.527-15.245,12.321C9.778,27.889,11.927,31.494,15.526,33.729z M36.73,33.322\r\nc-0.446,0.277-0.731,0.695-0.824,1.208c-0.023,0.126-0.033,0.253-0.031,0.38c-0.31-0.253-0.664-0.477-1.115-0.477\r\nc-0.081,0-0.231,0.019-0.311,0.038c-0.847,0.209-2.302,0.386-3.177,0.386c-4.69,0-8.506-2.94-8.506-6.556\r\nc0-3.614,3.815-6.555,8.506-6.555s8.506,2.94,8.506,6.555C39.778,30.289,38.667,32.119,36.73,33.322z M25.023,13.763\r\nc6.232,0,11.458,3.375,12.862,7.9c-1.807-1.196-4.108-1.916-6.613-1.916c-5.793,0-10.506,3.838-10.506,8.555\r\nc0,2.363,1.183,4.506,3.092,6.055c-1.252-0.092-2.744-0.304-3.715-0.544c-0.844-0.21-1.494,0.369-2.071,0.878\r\nc-0.239,0.211-0.465,0.403-0.688,0.564c0.198-0.563,0.31-1.174,0.205-1.749c-0.114-0.627-0.463-1.138-1.009-1.477\r\nc-3.007-1.867-4.803-4.838-4.803-7.946C11.778,18.393,17.72,13.763,25.023,13.763z"- }));-};-var SendIcon = function SendIcon() {- return /*#__PURE__*/svgs_React.createElement("svg", {- width: "24",- height: "24",- viewBox: "0 0 24 24",- fill: "none",- xmlns: "http://www.w3.org/2000/svg"- }, /*#__PURE__*/svgs_React.createElement("path", {- d: "M20.33 3.66996C20.1408 3.48213 19.9035 3.35008 19.6442 3.28833C19.3849 3.22659 19.1135 3.23753 18.86 3.31996L4.23 8.19996C3.95867 8.28593 3.71891 8.45039 3.54099 8.67255C3.36307 8.89471 3.25498 9.16462 3.23037 9.44818C3.20576 9.73174 3.26573 10.0162 3.40271 10.2657C3.5397 10.5152 3.74754 10.7185 4 10.85L10.07 13.85L13.07 19.94C13.1906 20.1783 13.3751 20.3785 13.6029 20.518C13.8307 20.6575 14.0929 20.7309 14.36 20.73H14.46C14.7461 20.7089 15.0192 20.6023 15.2439 20.4239C15.4686 20.2456 15.6345 20.0038 15.72 19.73L20.67 5.13996C20.7584 4.88789 20.7734 4.6159 20.7132 4.35565C20.653 4.09541 20.5201 3.85762 20.33 3.66996ZM4.85 9.57996L17.62 5.31996L10.53 12.41L4.85 9.57996ZM14.43 19.15L11.59 13.47L18.68 6.37996L14.43 19.15Z",- fill: "#ffffff"- }));-};-var SmythLogo = function SmythLogo() {- return /*#__PURE__*/svgs_React.createElement("svg", {- width: "40",- height: "40",- viewBox: "0 0 40 40",- fill: "none",- xmlns: "http://www.w3.org/2000/svg"- }, /*#__PURE__*/svgs_React.createElement("path", {- d: "M11.7607 16.6788L11.7336 10.9913C11.7066 6.84852 13.9213 3.00711 17.517 0.942341L17.8995 0.709761C19.1707 -0.0282536 20.7294 -0.0282536 22.0013 0.709761L32.1592 6.575C30.4638 5.64536 28.3858 5.67244 26.7043 6.64304L18.5834 11.3322L13.6068 14.203L13.1146 14.4904C13.1007 14.4904 13.1007 14.5043 13.0875 14.5043C12.3085 14.9826 11.8163 15.7894 11.7614 16.6781",- fill: "#2AAD8E"- }), /*#__PURE__*/svgs_React.createElement("path", {- d: "M37.7736 23.1565V25.0706C37.7736 28.215 36.0921 31.1275 33.3712 32.7132L22.4336 39.0568C26.0292 36.992 28.244 33.1506 28.2169 29.0079L28.1898 23.3204V23.2794C28.2037 23.2385 28.2037 23.1836 28.2037 23.1426V16.8261C28.2037 15.8694 27.6976 14.98 26.8638 14.4746L28.2037 15.2536L35.7234 19.6011C36.9946 20.3391 37.7743 21.693 37.7743 23.1558L37.7736 23.1565Z",- fill: "#45C9A9"- }), /*#__PURE__*/svgs_React.createElement("path", {- d: "M28.2166 29.0091C28.2437 33.1518 26.0289 36.9932 22.4333 39.058L22.0507 39.2905C20.7795 40.0286 19.2209 40.0286 17.9489 39.2905L7.79102 33.4253C9.48642 34.355 11.5644 34.3279 13.2459 33.3573L21.3669 28.6682L26.3434 25.7973L26.8357 25.5099C26.8495 25.5099 26.8495 25.496 26.8627 25.496C27.6417 25.0177 28.134 24.2109 28.1888 23.3223L28.2159 29.0097L28.2166 29.0091Z",- fill: "#2AAD8E"- }), /*#__PURE__*/svgs_React.createElement("path", {- d: "M21.367 28.6672L13.2461 33.3564C11.5645 34.327 9.48658 34.3547 7.79118 33.4244C7.75022 33.3973 7.70926 33.3834 7.6683 33.3564L2.22656 30.2127L11.7971 24.7168L13.1371 25.4958C13.151 25.4958 13.151 25.5097 13.1642 25.5097L18.633 28.6679C19.4807 29.1602 20.52 29.1602 21.367 28.6679V28.6672Z",- fill: "#13947D"- }), /*#__PURE__*/svgs_React.createElement("path", {- d: "M13.1361 25.4962L11.7962 24.7173L4.27649 20.3697C3.00526 19.6317 2.22559 18.2779 2.22559 16.815V14.9009C2.22559 11.7565 3.90712 8.84406 6.62797 7.25834L17.5663 0.914062C13.9706 2.97883 11.7559 6.82026 11.783 10.963L11.81 16.6505V16.6915C11.7962 16.7324 11.7962 16.7873 11.7962 16.8282V23.1447C11.7962 24.1014 12.3023 24.9901 13.1361 25.4962Z",- fill: "#45C9A9"- }), /*#__PURE__*/svgs_React.createElement("path", {- d: "M37.7733 9.7586L28.2027 15.2545L26.8628 14.4755C26.8489 14.4755 26.8489 14.4616 26.8357 14.4616L21.3669 11.3034C20.5192 10.8111 19.4799 10.8111 18.6328 11.3034L26.7538 6.61424C28.4353 5.64364 30.5133 5.61656 32.2087 6.5462C32.2497 6.57328 32.2906 6.58716 32.3316 6.61424L37.7733 9.7586Z",- fill: "#13947D"- }));-};-var AttachmentIcon = function AttachmentIcon(props) {- return /*#__PURE__*/svgs_React.createElement("svg", svgs_extends({- width: "24px",- height: "24px",- viewBox: "0 0 24 24",- fill: "none",- xmlns: "http://www.w3.org/2000/svg"- }, props), /*#__PURE__*/svgs_React.createElement("path", {- d: "M20 10.9696L11.9628 18.5497C10.9782 19.4783 9.64274 20 8.25028 20C6.85782 20 5.52239 19.4783 4.53777 18.5497C3.55315 17.6211 3 16.3616 3 15.0483C3 13.7351 3.55315 12.4756 4.53777 11.547M14.429 6.88674L7.00403 13.8812C6.67583 14.1907 6.49144 14.6106 6.49144 15.0483C6.49144 15.4861 6.67583 15.9059 7.00403 16.2154C7.33224 16.525 7.77738 16.6989 8.24154 16.6989C8.70569 16.6989 9.15083 16.525 9.47904 16.2154L13.502 12.4254M8.55638 7.75692L12.575 3.96687C13.2314 3.34779 14.1217 3 15.05 3C15.9783 3 16.8686 3.34779 17.525 3.96687C18.1814 4.58595 18.5502 5.4256 18.5502 6.30111C18.5502 7.17662 18.1814 8.01628 17.525 8.63535L16.5 9.601",- stroke: "#000000",- strokeWidth: "1.5",- strokeLinecap: "round",- strokeLinejoin: "round"- }));-};-var RightArrowIcon = function RightArrowIcon() {- return /*#__PURE__*/svgs_React.createElement("svg", {- width: "17",- height: "17",- viewBox: "0 0 17 17",- fill: "none",- xmlns: "http://www.w3.org/2000/svg"- }, /*#__PURE__*/svgs_React.createElement("path", {- d: "M1.5 8.5H15.5M15.5 8.5L8.5 1.5M15.5 8.5L8.5 15.5",- stroke: "white",- strokeWidth: "1.6",- strokeLinecap: "round",- strokeLinejoin: "round"- }));-};-var StopIcon = function StopIcon() {- return /*#__PURE__*/svgs_React.createElement("svg", {- xmlns: "http://www.w3.org/2000/svg",- viewBox: "0 0 24 24"- }, " ", /*#__PURE__*/svgs_React.createElement("g", null, " ", /*#__PURE__*/svgs_React.createElement("path", {- fill: "none",- d: "M0 0h24v24H0z"- }), " ", /*#__PURE__*/svgs_React.createElement("path", {- fill: "#fff",- d: "M6 7v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z"- }), " "), " ");-};-// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./src/components/error-message/styles.scss-var error_message_styles = __webpack_require__(195);-;// CONCATENATED MODULE: ./src/components/error-message/styles.scss------------var error_message_styles_options = {};--error_message_styles_options.styleTagTransform = (styleTagTransform_default());-error_message_styles_options.setAttributes = (setAttributesWithoutAttributes_default());-- error_message_styles_options.insert = insertBySelector_default().bind(null, "head");--error_message_styles_options.domAPI = (styleDomAPI_default());-error_message_styles_options.insertStyleElement = (insertStyleElement_default());--var error_message_styles_update = injectStylesIntoStyleTag_default()(error_message_styles/* default */.Z, error_message_styles_options);----- /* harmony default export */ const components_error_message_styles = (error_message_styles/* default */.Z && error_message_styles/* default */.Z.locals ? error_message_styles/* default */.Z.locals : undefined);--;// CONCATENATED MODULE: ./src/components/error-message/index.jsx-function error_message_typeof(o) { "@babel/helpers - typeof"; return error_message_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, error_message_typeof(o); }-function error_message_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }-function error_message_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? error_message_ownKeys(Object(t), !0).forEach(function (r) { error_message_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : error_message_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }-function error_message_defineProperty(obj, key, value) { key = error_message_toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }-function error_message_toPropertyKey(arg) { var key = error_message_toPrimitive(arg, "string"); return error_message_typeof(key) === "symbol" ? key : String(key); }-function error_message_toPrimitive(input, hint) { if (error_message_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (error_message_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }-/* eslint-disable react-hooks/exhaustive-deps */-/* eslint-disable react/prop-types */-------var ErrorMessage = function ErrorMessage(_ref) {- var errorText = _ref.errorText,- defaultMessage = _ref.defaultMessage,- setErrorMessage = _ref.setErrorMessage,- handleUserInputSubmit = _ref.handleUserInputSubmit,- _setCurrentMessage = _ref.setCurrentMessage,- _setIsTyped = _ref.setIsTyped;- return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {- className: "chat-message system"- }, /*#__PURE__*/react.createElement("div", {- className: "chat-content"- }, /*#__PURE__*/react.createElement("div", {- className: "text"- }, /*#__PURE__*/react.createElement(typewriter, {- message: error_message_objectSpread(error_message_objectSpread({}, defaultMessage), {}, {- content: errorText || ERROR_MESSAGES.GENERIC_ERROR- }),- speed: 10,- setCurrentMessage: function setCurrentMessage(text) {- return _setCurrentMessage(text);- },- setIsTyped: function setIsTyped(message) {- return _setIsTyped(message);- }- }), /*#__PURE__*/react.createElement("button", {- type: "button",- onClick: function onClick() {- setErrorMessage("");- handleUserInputSubmit(false);- },- className: "regenerate-button"- }, /*#__PURE__*/react.createElement(ReloadIcon, null), "Retry")))));-};-ErrorMessage.propTypes = {- logo: (prop_types_default()).string,- pluginDomain: (prop_types_default()).string,- name: (prop_types_default()).string,- humanBubbleClass: (prop_types_default()).string,- botBubbleClass: (prop_types_default()).string,- introMessage: (prop_types_default()).string,- domain: (prop_types_default()).string-};-// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/react-light-accordion/demo/css/index.css-var css = __webpack_require__(245);-;// CONCATENATED MODULE: ./node_modules/react-light-accordion/demo/css/index.css------------var css_options = {};--css_options.styleTagTransform = (styleTagTransform_default());-css_options.setAttributes = (setAttributesWithoutAttributes_default());-- css_options.insert = insertBySelector_default().bind(null, "head");--css_options.domAPI = (styleDomAPI_default());-css_options.insertStyleElement = (insertStyleElement_default());--var css_update = injectStylesIntoStyleTag_default()(css/* default */.Z, css_options);----- /* harmony default export */ const demo_css = (css/* default */.Z && css/* default */.Z.locals ? css/* default */.Z.locals : undefined);--// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/prismjs/themes/prism.css-var themes_prism = __webpack_require__(183);-;// CONCATENATED MODULE: ./node_modules/prismjs/themes/prism.css------------var prism_options = {};--prism_options.styleTagTransform = (styleTagTransform_default());-prism_options.setAttributes = (setAttributesWithoutAttributes_default());-- prism_options.insert = insertBySelector_default().bind(null, "head");--prism_options.domAPI = (styleDomAPI_default());-prism_options.insertStyleElement = (insertStyleElement_default());--var prism_update = injectStylesIntoStyleTag_default()(themes_prism/* default */.Z, prism_options);----- /* harmony default export */ const prismjs_themes_prism = (themes_prism/* default */.Z && themes_prism/* default */.Z.locals ? themes_prism/* default */.Z.locals : undefined);--;// CONCATENATED MODULE: ./src/services/chat-configurations.js-function chat_configurations_typeof(o) { "@babel/helpers - typeof"; return chat_configurations_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, chat_configurations_typeof(o); }-function chat_configurations_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ chat_configurations_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == chat_configurations_typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(chat_configurations_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }-function chat_configurations_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }-function chat_configurations_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { chat_configurations_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { chat_configurations_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }---var fetchSettings = /*#__PURE__*/function () {- var _ref = chat_configurations_asyncToGenerator( /*#__PURE__*/chat_configurations_regeneratorRuntime().mark(function _callee(domain) {- var response;- return chat_configurations_regeneratorRuntime().wrap(function _callee$(_context) {- while (1) switch (_context.prev = _context.next) {- case 0:- _context.prev = 0;- _context.next = 3;- return fetch("".concat(getNormalizedDomain(domain) || constants_API_URL, "/chatbot/params"), {- method: "GET",- headers: {- "Content-Type": "application/json"- },- credentials: "include"- });- case 3:- response = _context.sent;- return _context.abrupt("return", response.json());- case 7:- _context.prev = 7;- _context.t0 = _context["catch"](0);- throw new Error(_context.t0);- case 10:- case "end":- return _context.stop();- }- }, _callee, null, [[0, 7]]);- }));- return function fetchSettings(_x) {- return _ref.apply(this, arguments);- };-}();-var verifyApiKey = /*#__PURE__*/function () {- var _ref2 = chat_configurations_asyncToGenerator( /*#__PURE__*/chat_configurations_regeneratorRuntime().mark(function _callee2(domain, apiKey) {- var response;- return chat_configurations_regeneratorRuntime().wrap(function _callee2$(_context2) {- while (1) switch (_context2.prev = _context2.next) {- case 0:- _context2.prev = 0;- _context2.next = 3;- return fetch("".concat(getNormalizedDomain(domain) || constants_API_URL, "/chatbot/verify-chat-key"), {- method: "POST",- body: JSON.stringify({- apiKey: apiKey- }),- credentials: "include",- headers: {- "Content-Type": "application/json"- }- });- case 3:- response = _context2.sent;- return _context2.abrupt("return", response.json());- case 7:- _context2.prev = 7;- _context2.t0 = _context2["catch"](0);- throw new Error(_context2.t0);- case 10:- case "end":- return _context2.stop();- }- }, _callee2, null, [[0, 7]]);- }));- return function verifyApiKey(_x2, _x3) {- return _ref2.apply(this, arguments);- };-}();-// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./src/components/auth-overlay/styles.scss-var auth_overlay_styles = __webpack_require__(759);-;// CONCATENATED MODULE: ./src/components/auth-overlay/styles.scss------------var auth_overlay_styles_options = {};--auth_overlay_styles_options.styleTagTransform = (styleTagTransform_default());-auth_overlay_styles_options.setAttributes = (setAttributesWithoutAttributes_default());-- auth_overlay_styles_options.insert = insertBySelector_default().bind(null, "head");--auth_overlay_styles_options.domAPI = (styleDomAPI_default());-auth_overlay_styles_options.insertStyleElement = (insertStyleElement_default());--var auth_overlay_styles_update = injectStylesIntoStyleTag_default()(auth_overlay_styles/* default */.Z, auth_overlay_styles_options);----- /* harmony default export */ const components_auth_overlay_styles = (auth_overlay_styles/* default */.Z && auth_overlay_styles/* default */.Z.locals ? auth_overlay_styles/* default */.Z.locals : undefined);--;// CONCATENATED MODULE: ./src/components/auth-overlay/index.jsx-/* provided dependency */ var auth_overlay_React = __webpack_require__(294);-function auth_overlay_typeof(o) { "@babel/helpers - typeof"; return auth_overlay_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, auth_overlay_typeof(o); }-function auth_overlay_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ auth_overlay_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == auth_overlay_typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(auth_overlay_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }-function auth_overlay_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }-function auth_overlay_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { auth_overlay_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { auth_overlay_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }-function auth_overlay_slicedToArray(arr, i) { return auth_overlay_arrayWithHoles(arr) || auth_overlay_iterableToArrayLimit(arr, i) || auth_overlay_unsupportedIterableToArray(arr, i) || auth_overlay_nonIterableRest(); }-function auth_overlay_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }-function auth_overlay_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return auth_overlay_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return auth_overlay_arrayLikeToArray(o, minLen); }-function auth_overlay_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }-function auth_overlay_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }-function auth_overlay_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }--------var AuthOverlay = function AuthOverlay(_ref) {- var name = _ref.name,- method = _ref.method,- domain = _ref.domain,- onAuthSuccess = _ref.onAuthSuccess,- authorizationUrl = _ref.authorizationUrl,- isAuthVerificationLoading = _ref.isAuthVerificationLoading;- return /*#__PURE__*/auth_overlay_React.createElement("div", {- className: "auth-overlay-wrapper"- }, method === AUTH_METHODS.API_KEY && /*#__PURE__*/auth_overlay_React.createElement(ApiKeyOverlay, {- domain: domain,- onAuthSuccess: onAuthSuccess- }), method === AUTH_METHODS.OAUTH && /*#__PURE__*/auth_overlay_React.createElement(OAuthOverlay, {- authorizationUrl: authorizationUrl,- isAuthVerificationLoading: isAuthVerificationLoading,- name: name,- domain: domain- }));-};-var ApiKeyOverlay = function ApiKeyOverlay(_ref2) {- var domain = _ref2.domain,- onAuthSuccess = _ref2.onAuthSuccess;- var _useState = (0,react.useState)(false),- _useState2 = auth_overlay_slicedToArray(_useState, 2),- isLoading = _useState2[0],- setIsLoading = _useState2[1];- var _useState3 = (0,react.useState)(""),- _useState4 = auth_overlay_slicedToArray(_useState3, 2),- errorMessage = _useState4[0],- setErrorMessage = _useState4[1];- var _useState5 = (0,react.useState)(""),- _useState6 = auth_overlay_slicedToArray(_useState5, 2),- inputValue = _useState6[0],- setInputValue = _useState6[1];- var handleApiKeySubmit = /*#__PURE__*/function () {- var _ref3 = auth_overlay_asyncToGenerator( /*#__PURE__*/auth_overlay_regeneratorRuntime().mark(function _callee() {- var response;- return auth_overlay_regeneratorRuntime().wrap(function _callee$(_context) {- while (1) switch (_context.prev = _context.next) {- case 0:- if (!(inputValue.trim() === "")) {- _context.next = 3;- break;- }- setErrorMessage("Please enter your authentication token");- return _context.abrupt("return");- case 3:- _context.prev = 3;- setIsLoading(true);- _context.next = 7;- return verifyApiKey(domain, inputValue);- case 7:- response = _context.sent;- if (response.success) {- onAuthSuccess();- } else {- setErrorMessage("Invalid Auth token. Please check and re-enter your credentials.");- }- _context.next = 15;- break;- case 11:- _context.prev = 11;- _context.t0 = _context["catch"](3);- setErrorMessage("Invalid Auth token. Please check and re-enter your credentials.");- console.error("Error saving API key", _context.t0);- case 15:- _context.prev = 15;- setIsLoading(false);- return _context.finish(15);- case 18:- case "end":- return _context.stop();- }- }, _callee, null, [[3, 11, 15, 18]]);- }));- return function handleApiKeySubmit() {- return _ref3.apply(this, arguments);- };- }();- var handleKeyDown = function handleKeyDown(event) {- if (event.key === "Enter") {- handleApiKeySubmit();- }- };- var handleInputChange = function handleInputChange(event) {- setInputValue(event.target.value);- setErrorMessage(""); // Reset error message when input changes- };-- return /*#__PURE__*/auth_overlay_React.createElement("div", {- className: "api-key-overlay-wrapper"- }, /*#__PURE__*/auth_overlay_React.createElement("div", {- className: "api-key-overlay"- }, /*#__PURE__*/auth_overlay_React.createElement("p", null, "Please provide your unique authentication token to chat with your agent."), /*#__PURE__*/auth_overlay_React.createElement("div", {- className: "input-wrapper"- }, /*#__PURE__*/auth_overlay_React.createElement("input", {- type: "password",- placeholder: "Enter your OAuth token here",- onKeyDown: handleKeyDown,- onChange: handleInputChange,- value: inputValue,- disabled: isLoading- }), /*#__PURE__*/auth_overlay_React.createElement("button", {- className: "submit-button",- onClick: handleApiKeySubmit,- disabled: isLoading- }, isLoading ? /*#__PURE__*/auth_overlay_React.createElement(loader_Oval, {- color: "#fff",- height: 20,- width: 20,- radius: 10,- strokeWidth: 3,- strokeWidthSecondary: 3- }) : /*#__PURE__*/auth_overlay_React.createElement(RightArrowIcon, null))), errorMessage && /*#__PURE__*/auth_overlay_React.createElement("p", {- className: "error-message"- }, errorMessage)));-};-var OAuthOverlay = function OAuthOverlay(_ref4) {- var authorizationUrl = _ref4.authorizationUrl,- isAuthVerificationLoading = _ref4.isAuthVerificationLoading,- name = _ref4.name,- domain = _ref4.domain;- var handleSignIn = function handleSignIn() {- // open link in new tab, so that when user signs in this window gets focus- window.open(authorizationUrl, "_blank");- };- return /*#__PURE__*/auth_overlay_React.createElement("div", {- className: "oauth-overlay-wrapper"- }, /*#__PURE__*/auth_overlay_React.createElement("div", {- className: "oauth-overlay"- }, /*#__PURE__*/auth_overlay_React.createElement("p", null, "Authorize Access to ", name || "your agent", ". This will allow you to use our AI chatbot service securely."), /*#__PURE__*/auth_overlay_React.createElement("button", {- onClick: handleSignIn,- disabled: isAuthVerificationLoading- }, isAuthVerificationLoading ? /*#__PURE__*/auth_overlay_React.createElement(loader_Oval, {- color: "#fff",- height: 20,- width: 20,- radius: 10,- strokeWidth: 2,- strokeWidthSecondary: 2- }) : /*#__PURE__*/auth_overlay_React.createElement(auth_overlay_React.Fragment, null, /*#__PURE__*/auth_overlay_React.createElement("span", null, "Sign in with "), /*#__PURE__*/auth_overlay_React.createElement("span", {- className: "domain-text"- }, domain), /*#__PURE__*/auth_overlay_React.createElement(RightArrowIcon, null)))));-};-AuthOverlay.propTypes = {- name: (prop_types_default()).string,- domain: (prop_types_default()).string,- onAuthSuccess: (prop_types_default()).func,- authorizationUrl: (prop_types_default()).string,- method: (prop_types_default()).string.isRequired,- isAuthVerificationLoading: (prop_types_default()).bool-};-ApiKeyOverlay.propTypes = {- domain: (prop_types_default()).string,- onAuthSuccess: (prop_types_default()).func-};-OAuthOverlay.propTypes = {- authorizationUrl: (prop_types_default()).string,- isAuthVerificationLoading: (prop_types_default()).bool,- name: (prop_types_default()).string,- domain: (prop_types_default()).string-};-;// CONCATENATED MODULE: ./src/components/chatbox/index.jsx-function chatbox_typeof(o) { "@babel/helpers - typeof"; return chatbox_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, chatbox_typeof(o); }-var chatbox_excluded = ["isBoxOpen", "isChatOnly", "domain"];-function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = chatbox_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }-function chatbox_toConsumableArray(arr) { return chatbox_arrayWithoutHoles(arr) || chatbox_iterableToArray(arr) || chatbox_unsupportedIterableToArray(arr) || chatbox_nonIterableSpread(); }-function chatbox_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }-function chatbox_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }-function chatbox_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return chatbox_arrayLikeToArray(arr); }-function chatbox_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ chatbox_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == chatbox_typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(chatbox_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }-function chatbox_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }-function chatbox_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { chatbox_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { chatbox_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }-function chatbox_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }-function chatbox_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? chatbox_ownKeys(Object(t), !0).forEach(function (r) { chatbox_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : chatbox_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }-function chatbox_defineProperty(obj, key, value) { key = chatbox_toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }-function chatbox_toPropertyKey(arg) { var key = chatbox_toPrimitive(arg, "string"); return chatbox_typeof(key) === "symbol" ? key : String(key); }-function chatbox_toPrimitive(input, hint) { if (chatbox_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (chatbox_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }-function chatbox_slicedToArray(arr, i) { return chatbox_arrayWithHoles(arr) || chatbox_iterableToArrayLimit(arr, i) || chatbox_unsupportedIterableToArray(arr, i) || chatbox_nonIterableRest(); }-function chatbox_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }-function chatbox_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return chatbox_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return chatbox_arrayLikeToArray(o, minLen); }-function chatbox_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }-function chatbox_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }-function chatbox_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }-function chatbox_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = chatbox_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }-function chatbox_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }-/* eslint-disable react-hooks/exhaustive-deps */-/* eslint-disable react/prop-types */-----------------var _defaultMessage = {- id: 1,- type: "system",- content: "",- isTyped: false-};-var ChatBox = function ChatBox(_ref) {- var _defaultSettings$colo4, _defaultSettings$colo5, _defaultSettings$colo6, _defaultSettings$colo7, _defaultSettings$colo8, _defaultSettings$colo9, _defaultSettings$auth, _defaultSettings$auth2, _defaultSettings$colo10, _defaultSettings$colo11, _defaultSettings$colo12, _defaultSettings$colo13, _defaultSettings$colo14, _defaultSettings$colo15;- var _ref$isBoxOpen = _ref.isBoxOpen,- isBoxOpen = _ref$isBoxOpen === void 0 ? false : _ref$isBoxOpen,- _ref$isChatOnly = _ref.isChatOnly,- isChatOnly = _ref$isChatOnly === void 0 ? false : _ref$isChatOnly,- domain = _ref.domain,- props = chatbox_objectWithoutProperties(_ref, chatbox_excluded);- var _inputRef = react.useRef(null);- var _useState = (0,react.useState)(false),- _useState2 = chatbox_slicedToArray(_useState, 2),- _setIsTyped = _useState2[1];- var _useState3 = (0,react.useState)(""),- _useState4 = chatbox_slicedToArray(_useState3, 2),- _setCurrentMessage = _useState4[1];- var _useState5 = (0,react.useState)([]),- _useState6 = chatbox_slicedToArray(_useState5, 2),- messages = _useState6[0],- setMessages = _useState6[1];- var _useState7 = (0,react.useState)(null),- _useState8 = chatbox_slicedToArray(_useState7, 2),- devPort = _useState8[0],- setDevPort = _useState8[1];- var _useState9 = (0,react.useState)([]),- _useState10 = chatbox_slicedToArray(_useState9, 2),- debugInfo = _useState10[0],- setDebugInfo = _useState10[1];- var _useState11 = (0,react.useState)(isBoxOpen || isChatOnly),- _useState12 = chatbox_slicedToArray(_useState11, 2),- isOpen = _useState12[0],- setIsOpen = _useState12[1];- var _useState13 = (0,react.useState)(""),- _useState14 = chatbox_slicedToArray(_useState13, 2),- userInput = _useState14[0],- setUserInput = _useState14[1];- var _useState15 = (0,react.useState)(false),- _useState16 = chatbox_slicedToArray(_useState15, 2),- isLoading = _useState16[0],- setIsLoading = _useState16[1];- var _useState17 = (0,react.useState)(""),- _useState18 = chatbox_slicedToArray(_useState17, 2),- errorMessage = _useState18[0],- setErrorMessage = _useState18[1];- var _useState19 = (0,react.useState)(false),- _useState20 = chatbox_slicedToArray(_useState19, 2),- isOpenStyle = _useState20[0],- setIsOpenStyle = _useState20[1];- var _useState21 = (0,react.useState)([]),- _useState22 = chatbox_slicedToArray(_useState21, 2),- executedIndices = _useState22[0],- setExecutedIndices = _useState22[1];- var _useState23 = (0,react.useState)(false),- _useState24 = chatbox_slicedToArray(_useState23, 2),- isFunctionCall = _useState24[0],- setIsFunctionCall = _useState24[1];- var _useState25 = (0,react.useState)(false),- _useState26 = chatbox_slicedToArray(_useState25, 2),- hasUserScrolled = _useState26[0],- setHasUserScrolled = _useState26[1];- var _useState27 = (0,react.useState)(true),- _useState28 = chatbox_slicedToArray(_useState27, 2),- canSendNewMessage = _useState28[0],- setCanSendNewMessage = _useState28[1];- var _useState29 = (0,react.useState)(chatbox_objectSpread({}, props)),- _useState30 = chatbox_slicedToArray(_useState29, 2),- defaultSettings = _useState30[0],- setDefaultSettings = _useState30[1];- var _useState31 = (0,react.useState)(_defaultMessage),- _useState32 = chatbox_slicedToArray(_useState31, 2),- defaultMessage = _useState32[0],- setDefaultMessage = _useState32[1];- var _useState33 = (0,react.useState)(false),- _useState34 = chatbox_slicedToArray(_useState33, 2),- isDefaultSettingsLoading = _useState34[0],- setIsDefaultSettingsLoading = _useState34[1];- var _useState35 = (0,react.useState)(false),- _useState36 = chatbox_slicedToArray(_useState35, 2),- isAuthVerificationLoading = _useState36[0],- setIsAuthVerificationLoading = _useState36[1];- var _useState37 = (0,react.useState)(),- _useState38 = chatbox_slicedToArray(_useState37, 2),- apiHeaders = _useState38[0],- setApiHeaders = _useState38[1];- var _useState39 = (0,react.useState)(false),- _useState40 = chatbox_slicedToArray(_useState39, 2),- isGenerating = _useState40[0],- setIsGenerating = _useState40[1];- var _useState41 = (0,react.useState)(false),- _useState42 = chatbox_slicedToArray(_useState41, 2),- userStoppedGeneration = _useState42[0],- setUserStoppedGeneration = _useState42[1];- var abortControllerRef = (0,react.useRef)(null);- var MemoizedUserMessage = /*#__PURE__*/react.memo(UserMessage);- var MemoizedSystemMessage = /*#__PURE__*/react.memo(SystemMessage);- var chatBoxRef = (0,react.useRef)(null);- var chatEndRef = (0,react.useRef)(null);- (0,react.useEffect)(function () {- adjustHeight();- }, [userInput, canSendNewMessage]);- var adjustHeight = function adjustHeight() {- var textarea = _inputRef.current;- if (!textarea) return;- var maxHeight = parseInt(getComputedStyle(textarea).lineHeight, 10) * 4;- textarea.style.height = "auto"; // Resetting height to recalculate- var updatedHeight = Math.min(textarea.scrollHeight, maxHeight);- textarea.style.height = updatedHeight === 0 ? "28px" : "".concat(updatedHeight, "px");- textarea.style.overflowY = textarea.scrollHeight > maxHeight ? "scroll" : "hidden";- };- (0,react.useEffect)(function () {- prism_default().highlightAll();- }, [messages]);-- /**- * Add event listener to detect if the window has regained focus- * if yes call the fetchSettings function to get the latest settings- */-- (0,react.useEffect)(function () {- var handleFocus = /*#__PURE__*/function () {- var _ref2 = chatbox_asyncToGenerator( /*#__PURE__*/chatbox_regeneratorRuntime().mark(function _callee() {- var _settings;- return chatbox_regeneratorRuntime().wrap(function _callee$(_context) {- while (1) switch (_context.prev = _context.next) {- case 0:- if (defaultSettings !== null && defaultSettings !== void 0 && defaultSettings.authRequired) {- _context.next = 2;- break;- }- return _context.abrupt("return");- case 2:- _context.prev = 2;- setIsAuthVerificationLoading(true);- _context.next = 6;- return fetchSettings(domain || (defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.domain));- case 6:- _settings = _context.sent;- setDefaultSettings(chatbox_objectSpread(chatbox_objectSpread({- domain: domain- }, _settings), {}, {- logo: _settings.icon || _settings.logo || props.logo- }, props));- setApiHeaders(_settings.headers);- setDevPort(_settings === null || _settings === void 0 ? void 0 : _settings.port);- // Save X-Auth-Token to localStorage- if (_settings.headers && _settings.headers["X-Auth-Token"]) {- localStorage.setItem("authToken", _settings.headers["X-Auth-Token"]);- }- _context.next = 16;- break;- case 13:- _context.prev = 13;- _context.t0 = _context["catch"](2);- console.log("error, ", _context.t0);- case 16:- _context.prev = 16;- setIsAuthVerificationLoading(false);- return _context.finish(16);- case 19:- case "end":- return _context.stop();- }- }, _callee, null, [[2, 13, 16, 19]]);- }));- return function handleFocus() {- return _ref2.apply(this, arguments);- };- }();- window.addEventListener("focus", handleFocus);- return function () {- window.removeEventListener("focus", handleFocus);- };- }, [defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.authRequired]);- (0,react.useEffect)(function () {- function fetchData() {- return _fetchData.apply(this, arguments);- }- function _fetchData() {- _fetchData = chatbox_asyncToGenerator( /*#__PURE__*/chatbox_regeneratorRuntime().mark(function _callee2() {- var _settings;- return chatbox_regeneratorRuntime().wrap(function _callee2$(_context2) {- while (1) switch (_context2.prev = _context2.next) {- case 0:- _context2.prev = 0;- setIsLoading(true);- setIsDefaultSettingsLoading(true);-- // load default params/settings- _context2.next = 5;- return fetchSettings(domain || (defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.domain));- case 5:- _settings = _context2.sent;- setDefaultSettings(chatbox_objectSpread(chatbox_objectSpread({- domain: domain- }, _settings), {}, {- logo: _settings.icon || _settings.logo || props.logo- }, props));- setDevPort(_settings === null || _settings === void 0 ? void 0 : _settings.port);- setApiHeaders(_settings.headers);- setIsDefaultSettingsLoading(false);-- // if chatbotEnabled from _settings or props is false, we'll log it in console- if (!(_settings !== null && _settings !== void 0 && _settings.chatbotEnabled) || Object.keys(props).find(function (p) {- return p === "chatbotEnabled";- }) && !(props !== null && props !== void 0 && props.chatbotEnabled)) {- console.error("Chatbot is disabled for this domain (".concat(window.location.hostname, ")"));- }- setDefaultMessage(chatbox_objectSpread(chatbox_objectSpread({}, defaultMessage), {}, {- content: (defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.introMessage) || "Hi, I am ".concat((_settings === null || _settings === void 0 ? void 0 : _settings.name) || "your AI assistant", ". How can I help you?")- }));- _context2.next = 17;- break;- case 14:- _context2.prev = 14;- _context2.t0 = _context2["catch"](0);- setErrorMessage("Something went wrong! Please try again.");- case 17:- _context2.prev = 17;- setIsLoading(false);- setIsDefaultSettingsLoading(false);- return _context2.finish(17);- case 21:- case "end":- return _context2.stop();- }- }, _callee2, null, [[0, 14, 17, 21]]);- }));- return _fetchData.apply(this, arguments);- }- fetchData();- }, []);- (0,react.useEffect)(function () {- debugInfo === null || debugInfo === void 0 || debugInfo.forEach(function (item, index) {- if (!executedIndices.includes(index)) {- if (item["function"]) {- executeDebugFunction(item);- setExecutedIndices(function (prevIndices) {- return [].concat(chatbox_toConsumableArray(prevIndices), [index]);- });- }- }- });- }, [debugInfo]);- (0,react.useEffect)(function () {- var handleScroll = function handleScroll(e) {- var _e$target = e.target,- scrollTop = _e$target.scrollTop,- clientHeight = _e$target.clientHeight,- scrollHeight = _e$target.scrollHeight;- if (scrollTop + clientHeight < scrollHeight) {- if (!hasUserScrolled) {- setHasUserScrolled(true);- }- }- };- if (chatBoxRef.current) {- chatBoxRef.current.addEventListener("scroll", handleScroll);- }- return function () {- if (chatBoxRef.current) {- chatBoxRef.current.removeEventListener("scroll", handleScroll);- }- };- }, [chatBoxRef.current]);- var scrollToBottom = function scrollToBottom() {- return;- };-- // Scroll to the bottom every time messages change- (0,react.useEffect)(function () {- var _chatEndRef$current;- (_chatEndRef$current = chatEndRef.current) === null || _chatEndRef$current === void 0 || _chatEndRef$current.scrollIntoView({- behavior: "smooth"- });- }, [messages]);- var executeDebugFunction = function executeDebugFunction(debugInfo) {- var functionName = debugInfo["function"],- parameters = debugInfo.parameters;- if (typeof window[functionName] === "function") {- window[functionName].apply(window, parameters);- } else {- console.warn("The function ".concat(functionName, " does not exist on the window object."));- }- };- var inputChangeHandler = function inputChangeHandler(e) {- if (e.key === "Enter") {- if (e.shiftKey) {- // Allow the newline- } else {- e.preventDefault();- handleUserInputSubmit();- scrollToBottom();- }- }- };- var renderInitialMessage = function renderInitialMessage() {- var _defaultSettings$colo, _defaultSettings$colo2, _defaultSettings$colo3;- return /*#__PURE__*/react.createElement("div", {- className: "chat-message system",- key: defaultMessage.id- }, /*#__PURE__*/react.createElement("div", {- className: "chat-content".concat(" ", (defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.botBubbleClass) || ""),- style: {- color: defaultSettings === null || defaultSettings === void 0 || (_defaultSettings$colo = defaultSettings.colors) === null || _defaultSettings$colo === void 0 || (_defaultSettings$colo = _defaultSettings$colo.botBubbleColors) === null || _defaultSettings$colo === void 0 ? void 0 : _defaultSettings$colo.textColor,- background: "linear-gradient(to right, ".concat(defaultSettings === null || defaultSettings === void 0 || (_defaultSettings$colo2 = defaultSettings.colors) === null || _defaultSettings$colo2 === void 0 || (_defaultSettings$colo2 = _defaultSettings$colo2.botBubbleColors) === null || _defaultSettings$colo2 === void 0 ? void 0 : _defaultSettings$colo2.backgroundColorStart, ", ").concat(defaultSettings === null || defaultSettings === void 0 || (_defaultSettings$colo3 = defaultSettings.colors) === null || _defaultSettings$colo3 === void 0 || (_defaultSettings$colo3 = _defaultSettings$colo3.botBubbleColors) === null || _defaultSettings$colo3 === void 0 ? void 0 : _defaultSettings$colo3.backgroundColorEnd, ")")- }- }, /*#__PURE__*/react.createElement("div", {- className: "text"- }, /*#__PURE__*/react.createElement(typewriter, {- message: defaultMessage,- speed: 20,- setCurrentMessage: function setCurrentMessage(text) {- return _setCurrentMessage(text);- },- setIsTyped: function setIsTyped(message) {- return _setIsTyped(message);- }- }))));- };- var renderErrorMessage = function renderErrorMessage() {- setTimeout(function () {- var _chatEndRef$current2;- (_chatEndRef$current2 = chatEndRef.current) === null || _chatEndRef$current2 === void 0 || _chatEndRef$current2.scrollIntoView({- behavior: "smooth"- });- }, 300);- return /*#__PURE__*/react.createElement(ErrorMessage, {- errorText: errorMessage,- defaultMessage: defaultMessage,- setErrorMessage: setErrorMessage,- handleUserInputSubmit: handleUserInputSubmit,- setCurrentMessage: _setCurrentMessage,- setIsTyped: _setIsTyped- });- };- var handleUserInputSubmit = /*#__PURE__*/function () {- var _ref3 = chatbox_asyncToGenerator( /*#__PURE__*/chatbox_regeneratorRuntime().mark(function _callee3() {- var shouldSetUserMessage,- _aiInput,- userMessage,- systemMessage,- openAiResponse,- _yield$openAiResponse,- error,- reader,- accumulatedData,- _yield$reader$read,- done,- value,- jsonObjects,- links,- images,- _args3 = arguments;- return chatbox_regeneratorRuntime().wrap(function _callee3$(_context3) {- while (1) switch (_context3.prev = _context3.next) {- case 0:- shouldSetUserMessage = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : true;- setCanSendNewMessage(false);- setIsGenerating(true);- setErrorMessage("");- setUserStoppedGeneration(false);- _aiInput = userInput;- if (userInput) {- _context3.next = 9;- break;- }- setIsGenerating(false);- return _context3.abrupt("return");- case 9:- _inputRef.current.value = "";-- // Create a new AbortController for this request- abortControllerRef.current = new AbortController();-- // Create userMessage only if not regenerating or the flag is true- userMessage = shouldSetUserMessage ? {- id: messages.length + 1,- type: "user",- content: userInput === null || userInput === void 0 ? void 0 : userInput.trim(),- updatedAt: new Date().getTime()- } : null;- systemMessage = {- id: shouldSetUserMessage ? messages.length + 2 : messages.length,- type: "system",- content: "",- isTyped: false,- updatedAt: new Date().getTime()- };- if (shouldSetUserMessage) {- setMessages([].concat(chatbox_toConsumableArray(messages), [userMessage, systemMessage]));- }- _context3.prev = 14;- setIsLoading(true);- // Response of ChatGpt- _context3.next = 18;- return callOpenAi({- port: devPort,- message: _aiInput,- headers: apiHeaders,- domain: defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.domain,- signal: abortControllerRef.current.signal- });- case 18:- openAiResponse = _context3.sent;- setIsLoading(false);- if (!(!openAiResponse || (openAiResponse === null || openAiResponse === void 0 ? void 0 : openAiResponse.status) !== 200)) {- _context3.next = 30;- break;- }- setCanSendNewMessage(true);- setIsGenerating(false);- if (!openAiResponse) {- _context3.next = 29;- break;- }- _context3.next = 26;- return openAiResponse.json();- case 26:- _yield$openAiResponse = _context3.sent;- error = _yield$openAiResponse.error;- setErrorMessage(error || "Something went wrong! Please try again.");- case 29:- return _context3.abrupt("return");- case 30:- //#region #1 streaming response- reader = openAiResponse.body.getReader();- accumulatedData = ""; // eslint-disable-next-line no-constant-condition- case 32:- if (false) {}- _context3.next = 35;- return reader.read();- case 35:- _yield$reader$read = _context3.sent;- done = _yield$reader$read.done;- value = _yield$reader$read.value;- // Convert the chunk to text and accumulate- accumulatedData += new TextDecoder().decode(value);- if (done) {- _context3.next = 45;- break;- }- // - data as it arrives- jsonObjects = splitDataToJSONObjects(accumulatedData);- handleJSONObjects(jsonObjects, systemMessage);-- // Reset accumulatedData for next iteration- accumulatedData = "";- _context3.next = 48;- break;- case 45:- setCanSendNewMessage(true);- setIsGenerating(false);- return _context3.abrupt("break", 50);- case 48:- _context3.next = 32;- break;- case 50:- _context3.next = 55;- break;- case 52:- _context3.prev = 52;- _context3.t0 = _context3["catch"](14);- if (_context3.t0.name === "AbortError") {- console.log("Request was aborted");- } else {- setCanSendNewMessage(true);- setIsGenerating(false);- setErrorMessage("Something went wrong! Please try again.");- console.log(_context3.t0);- }- case 55:- _context3.prev = 55;- setIsLoading(false);- setIsGenerating(false);- abortControllerRef.current = null; // Clear the AbortController- // Select all anchor (link) elements in the document- links = document.querySelectorAll("a");- images = document.querySelectorAll("img"); // Loop through each link and add the target="_blank" attribute- links.forEach(function (link) {- link.setAttribute("target", "_blank");- });- images.forEach(function (img) {- img.setAttribute("onerror", "this.style.display='none'");- });- return _context3.finish(55);- case 64:- case "end":- return _context3.stop();- }- }, _callee3, null, [[14, 52, 55, 64]]);- }));- return function handleUserInputSubmit() {- return _ref3.apply(this, arguments);- };- }();- var renderAllMessages = react.useCallback(function () {- var skipLastMessage = false;-- // Check if the last message has both content and errorMessage- if (messages.length > 0) {- var lastMessage = messages[messages.length - 1];- if (lastMessage && lastMessage.content && errorMessage) {- skipLastMessage = true;- }- }- return messages.sort(function (a, b) {- return a.updatedAt - b.updatedAt;- }).map(function (message, index) {- // Skip rendering the last message if the condition is met- if (skipLastMessage && index === messages.length - 1) {- return null;- }- if (message && message.type === "system") {- return /*#__PURE__*/react.createElement(MemoizedSystemMessage, {- key: index,- message: message,- debugInfo: debugInfo,- errorMessage: errorMessage,- botBubbleClass: defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.botBubbleClass,- colors: defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.colors,- syntaxHighlightTheme: defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.syntaxHighlightTheme- });- } else if (message && message.type === "user") {- return /*#__PURE__*/react.createElement(MemoizedUserMessage, {- key: index,- message: message,- humanBubbleClass: defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.humanBubbleClass,- colors: defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.colors- });- } else if (message && message.type === "debug") {- return /*#__PURE__*/react.createElement(DebugAccordion, {- key: message.id + message.title + index,- debugInfo: message,- title: message.title || "Debug"- });- }- return null; // Handle other cases where message is not valid- });- }, [messages, errorMessage]);- var renderedMessages = react.useMemo(function () {- return renderAllMessages();- }, [messages, errorMessage]);- var chatboxToggler = function chatboxToggler() {- setIsOpen(function (isOpen) {- return !isOpen;- });- setTimeout(function () {- var _chatEndRef$current3;- (_chatEndRef$current3 = chatEndRef.current) === null || _chatEndRef$current3 === void 0 || _chatEndRef$current3.scrollIntoView({- behavior: "smooth"- });- }, 100);- };- var splitDataToJSONObjects = (0,react.useCallback)(function (data) {- var jsonStrings = data.split("}{").map(function (str, index, array) {- if (index !== 0) str = "{" + str;- if (index !== array.length - 1) str += "}";- return str;- });-- // Convert JSON strings to objects- return jsonStrings.map(function (str) {- try {- return JSON.parse(str);- } catch (error) {- setErrorMessage("Something went wrong! Please try again.");- console.error("Error parsing JSON:", error);- return null;- }- }).filter(Boolean); // Removing any null values- }, []);- var handleJSONObjects = (0,react.useCallback)(function (jsonObjects, systemMessage) {- var newDebugInfo = [];- var _iterator = _createForOfIteratorHelper(jsonObjects),- _step;- try {- var _loop = function _loop() {- var jsonObject = _step.value;- if (jsonObject.error) {- setErrorMessage(jsonObject.error);- return {- v: void 0- };- }- if (jsonObject.debug) {- newDebugInfo.push({- debug: jsonObject.debug,- systemId: systemMessage.id,- title: jsonObject.title || "",- "function": jsonObject["function"],- parameters: jsonObject.parameters,- isInvoked: false,- updatedAt: new Date().getTime()- });- setMessages(function (prevMessages) {- // Check if an object with the same title exists- var existingMessageIndex = prevMessages.findIndex(function (message) {- return message.title && message.title === jsonObject.title;- });- if (existingMessageIndex > -1) {- var _updatedMessages$exis;- // If found, create a copy of the array and modify the content of the found object- var updatedMessages = chatbox_toConsumableArray(prevMessages);- (_updatedMessages$exis = updatedMessages[existingMessageIndex]) === null || _updatedMessages$exis === void 0 || (_updatedMessages$exis = _updatedMessages$exis.content) === null || _updatedMessages$exis === void 0 || _updatedMessages$exis.push(jsonObject.debug);- return updatedMessages;- } else {- // If not found, add the new object to the array- return [].concat(chatbox_toConsumableArray(prevMessages), [{- id: prevMessages.length + 1,- type: "debug",- content: [jsonObject.debug],- isTyped: false,- systemId: systemMessage.id,- title: jsonObject.title || "",- "function": jsonObject["function"],- parameters: jsonObject.parameters,- isInvoked: false,- updatedAt: new Date().getTime()- }]);- }- });- setDebugInfo(function (prevDebugInfo) {- return [].concat(chatbox_toConsumableArray(prevDebugInfo), newDebugInfo);- });- }- if (jsonObject.function_call && !isFunctionCall) {- setIsFunctionCall(true);- }- if (jsonObject.content && jsonObject.content !== "") {- if (!isFunctionCall) {- setIsFunctionCall(false);- }- setMessages(function (prevMessages) {- var updatedMessages = chatbox_toConsumableArray(prevMessages);- var systemMsgIndex = updatedMessages.findIndex(function (msg) {- return msg.id === systemMessage.id;- });- if (systemMsgIndex !== -1) {- updatedMessages[systemMsgIndex].content += jsonObject.content;- updatedMessages[systemMsgIndex].updatedAt = new Date().getTime();- }- return updatedMessages;- });- scrollToBottom();- }- },- _ret;- for (_iterator.s(); !(_step = _iterator.n()).done;) {- _ret = _loop();- if (_ret) return _ret.v;- }- } catch (err) {- _iterator.e(err);- } finally {- _iterator.f();- }- }, []);- var onAuthSuccess = function onAuthSuccess() {- setDefaultSettings(chatbox_objectSpread(chatbox_objectSpread({}, defaultSettings), {}, {- authRequired: false- }));- };- var handleStopGenerating = function handleStopGenerating() {- if (abortControllerRef.current) {- abortControllerRef.current.abort();- }- setIsLoading(false);- setIsGenerating(false);- setIsFunctionCall(false);- setCanSendNewMessage(true);- setUserStoppedGeneration(true);- };- return /*#__PURE__*/react.createElement(react.Fragment, null, (defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.chatbotEnabled) && !isDefaultSettingsLoading && !isChatOnly && /*#__PURE__*/react.createElement("button", {- className: "chatbot-toggler",- style: {- backgroundColor: defaultSettings === null || defaultSettings === void 0 || (_defaultSettings$colo4 = defaultSettings.colors) === null || _defaultSettings$colo4 === void 0 || (_defaultSettings$colo4 = _defaultSettings$colo4.chatTogglerColors) === null || _defaultSettings$colo4 === void 0 ? void 0 : _defaultSettings$colo4.backgroundColor,- color: defaultSettings === null || defaultSettings === void 0 || (_defaultSettings$colo5 = defaultSettings.colors) === null || _defaultSettings$colo5 === void 0 || (_defaultSettings$colo5 = _defaultSettings$colo5.chatTogglerColors) === null || _defaultSettings$colo5 === void 0 ? void 0 : _defaultSettings$colo5.textColor- },- onClick: chatboxToggler- }, isOpen ? /*#__PURE__*/react.createElement(DownArrowIcon, {- color: defaultSettings === null || defaultSettings === void 0 || (_defaultSettings$colo6 = defaultSettings.colors) === null || _defaultSettings$colo6 === void 0 || (_defaultSettings$colo6 = _defaultSettings$colo6.chatTogglerColors) === null || _defaultSettings$colo6 === void 0 ? void 0 : _defaultSettings$colo6.textColor- }) : /*#__PURE__*/react.createElement(ChatIcon, {- color: defaultSettings === null || defaultSettings === void 0 || (_defaultSettings$colo7 = defaultSettings.colors) === null || _defaultSettings$colo7 === void 0 || (_defaultSettings$colo7 = _defaultSettings$colo7.chatTogglerColors) === null || _defaultSettings$colo7 === void 0 ? void 0 : _defaultSettings$colo7.textColor- })), isDefaultSettingsLoading && !isChatOnly && /*#__PURE__*/react.createElement(loader_Oval, {- height: 50,- width: 50,- color: "#45c98d",- wrapperStyle: {},- wrapperClass: "chatbot-toggler toggler-spinner",- visible: true,- ariaLabel: "oval-loading",- secondaryColor: "#45c98d",- strokeWidth: 3,- strokeWidthSecondary: 3- }), /*#__PURE__*/react.createElement("div", {- className: (isOpenStyle ? "enlarge-box-wrapper".concat(" ", "chat-box-wrapper") : "chat-box-wrapper") + (isChatOnly ? " chat-only" : ""),- style: {- display: isOpen ? "block" : "none"- }- }, /*#__PURE__*/react.createElement("div", {- className: "chatbox"- }, /*#__PURE__*/react.createElement("div", {- className: "chat-header",- style: {- backgroundColor: defaultSettings === null || defaultSettings === void 0 || (_defaultSettings$colo8 = defaultSettings.colors) === null || _defaultSettings$colo8 === void 0 || (_defaultSettings$colo8 = _defaultSettings$colo8.chatWindowColors) === null || _defaultSettings$colo8 === void 0 ? void 0 : _defaultSettings$colo8.headerBackgroundColor- }- }, /*#__PURE__*/react.createElement("div", {- className: "chat-brand"- }, defaultSettings !== null && defaultSettings !== void 0 && defaultSettings.logo ? /*#__PURE__*/react.createElement("img", {- src: defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.logo,- alt: "",- className: "chatbox-logo"- }) : /*#__PURE__*/react.createElement(SmythLogo, null), /*#__PURE__*/react.createElement("div", {- className: "btn-wrapper"- }, /*#__PURE__*/react.createElement("button", {- className: "close-icon",- onClick: function onClick() {- return setIsOpenStyle(!isOpenStyle);- }- }, /*#__PURE__*/react.createElement(ExpandIcon, null)), /*#__PURE__*/react.createElement("button", {- className: "close-icon",- onClick: function onClick() {- return setIsOpen(false);- }- }, /*#__PURE__*/react.createElement(CloseIcon, null))))), /*#__PURE__*/react.createElement("div", {- ref: chatBoxRef,- className: "chat-body",- style: {- backgroundColor: defaultSettings === null || defaultSettings === void 0 || (_defaultSettings$colo9 = defaultSettings.colors) === null || _defaultSettings$colo9 === void 0 || (_defaultSettings$colo9 = _defaultSettings$colo9.chatWindowColors) === null || _defaultSettings$colo9 === void 0 ? void 0 : _defaultSettings$colo9.backgroundColor- }- }, defaultSettings.authRequired ? /*#__PURE__*/react.createElement(AuthOverlay, {- name: defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.name,- method: (_defaultSettings$auth = defaultSettings.auth) === null || _defaultSettings$auth === void 0 ? void 0 : _defaultSettings$auth.method,- domain: domain || (defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.domain),- onAuthSuccess: onAuthSuccess,- isAuthVerificationLoading: isAuthVerificationLoading,- authorizationUrl: defaultSettings === null || defaultSettings === void 0 || (_defaultSettings$auth2 = defaultSettings.auth) === null || _defaultSettings$auth2 === void 0 ? void 0 : _defaultSettings$auth2.authorizationUrl- }) : /*#__PURE__*/react.createElement(react.Fragment, null, (defaultMessage === null || defaultMessage === void 0 ? void 0 : defaultMessage.content) && renderInitialMessage(), renderedMessages, /*#__PURE__*/react.createElement("div", {- ref: chatEndRef- }), isLoading && !isFunctionCall && /*#__PURE__*/react.createElement(loader_ThreeDots, {- height: "44",- width: "44",- radius: "9",- color: (defaultSettings === null || defaultSettings === void 0 || (_defaultSettings$colo10 = defaultSettings.colors) === null || _defaultSettings$colo10 === void 0 || (_defaultSettings$colo10 = _defaultSettings$colo10.botBubbleColors) === null || _defaultSettings$colo10 === void 0 ? void 0 : _defaultSettings$colo10.backgroundColorStart) || "#45c98d",- ariaLabel: "three-dots-loading",- wrapperClassName: "",- visible: true- }), !isLoading && isFunctionCall && /*#__PURE__*/react.createElement("div", {- style: {- display: "inline-flex",- alignItems: "center",- gap: "6px",- background: "#fff",- borderRadius: "6px",- padding: "8px",- border: "1px solid",- fontSize: "14px"- }- }, /*#__PURE__*/react.createElement("span", {- id: "plugin-call-message"- }, defaultSettings !== null && defaultSettings !== void 0 && defaultSettings.pluginCallMessage ? defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.pluginCallMessage : defaultSettings !== null && defaultSettings !== void 0 && defaultSettings.name ? "Contacting ".concat(defaultSettings === null || defaultSettings === void 0 ? void 0 : defaultSettings.name) : "Contacting Engine"), /*#__PURE__*/react.createElement(RotatingLines, {- strokeColor: "black",- strokeWidth: "3",- animationDuration: "0.5",- width: "20",- visible: true- })), errorMessage && !userStoppedGeneration && renderErrorMessage())), /*#__PURE__*/react.createElement("div", {- className: "chat-footer",- style: {- backgroundColor: defaultSettings === null || defaultSettings === void 0 || (_defaultSettings$colo11 = defaultSettings.colors) === null || _defaultSettings$colo11 === void 0 || (_defaultSettings$colo11 = _defaultSettings$colo11.chatWindowColors) === null || _defaultSettings$colo11 === void 0 ? void 0 : _defaultSettings$colo11.footerBackgroundColor- }- }, /*#__PURE__*/react.createElement("div", {- className: "chat-input"- }, /*#__PURE__*/react.createElement("textarea", {- placeholder: "Type a message...",- autoFocus: true,- ref: _inputRef,- onChange: function onChange(e) {- return setUserInput(e.target.value);- },- disabled: !(defaultMessage !== null && defaultMessage !== void 0 && defaultMessage.content) || !canSendNewMessage || defaultSettings.authRequired,- onKeyDown: function onKeyDown(e) {- return inputChangeHandler(e);- },- rows: 1,- style: {- lineHeight: "24px"- }- }), isGenerating ? /*#__PURE__*/react.createElement("button", {- className: "chat-stop",- type: "button",- onClick: handleStopGenerating,- title: "Stop Generating",- style: {- backgroundColor: defaultSettings === null || defaultSettings === void 0 || (_defaultSettings$colo12 = defaultSettings.colors) === null || _defaultSettings$colo12 === void 0 || (_defaultSettings$colo12 = _defaultSettings$colo12.sendButtonColors) === null || _defaultSettings$colo12 === void 0 ? void 0 : _defaultSettings$colo12.backgroundColor,- color: defaultSettings === null || defaultSettings === void 0 || (_defaultSettings$colo13 = defaultSettings.colors) === null || _defaultSettings$colo13 === void 0 || (_defaultSettings$colo13 = _defaultSettings$colo13.sendButtonColors) === null || _defaultSettings$colo13 === void 0 ? void 0 : _defaultSettings$colo13.textColor- }- }, /*#__PURE__*/react.createElement(StopIcon, null)) : /*#__PURE__*/react.createElement("button", {- disabled: !canSendNewMessage || defaultSettings.authRequired,- className: "chat-send",- type: "button",- onClick: function onClick() {- return handleUserInputSubmit();- },- style: {- backgroundColor: defaultSettings === null || defaultSettings === void 0 || (_defaultSettings$colo14 = defaultSettings.colors) === null || _defaultSettings$colo14 === void 0 || (_defaultSettings$colo14 = _defaultSettings$colo14.sendButtonColors) === null || _defaultSettings$colo14 === void 0 ? void 0 : _defaultSettings$colo14.backgroundColor,- color: defaultSettings === null || defaultSettings === void 0 || (_defaultSettings$colo15 = defaultSettings.colors) === null || _defaultSettings$colo15 === void 0 || (_defaultSettings$colo15 = _defaultSettings$colo15.sendButtonColors) === null || _defaultSettings$colo15 === void 0 ? void 0 : _defaultSettings$colo15.textColor,- cursor: !canSendNewMessage || defaultSettings.authRequired ? "not-allowed" : "pointer"- }- }, /*#__PURE__*/react.createElement(SendIcon, null)))))));-};-ChatBox.propTypes = {- logo: (prop_types_default()).string,- pluginDomain: (prop_types_default()).string,- name: (prop_types_default()).string,- humanBubbleClass: (prop_types_default()).string,- botBubbleClass: (prop_types_default()).string,- introMessage: (prop_types_default()).string,- domain: (prop_types_default()).string,- chatbotEnabled: (prop_types_default()).bool-};-var DebugAccordion = function DebugAccordion(_ref4) {- var _debugInfo$content;- var debugInfo = _ref4.debugInfo,- title = _ref4.title;- return /*#__PURE__*/react.createElement("div", {- className: "debug-section"- }, /*#__PURE__*/react.createElement(build.Accordion, {- atomic: true,- key: debugInfo.systemId- }, /*#__PURE__*/react.createElement(build.AccordionItem, {- title: title- }, debugInfo === null || debugInfo === void 0 || (_debugInfo$content = debugInfo.content) === null || _debugInfo$content === void 0 ? void 0 : _debugInfo$content.map(function (item, index) {- return /*#__PURE__*/react.createElement("p", {- key: index- }, item);- }))));-};-DebugAccordion.propTypes = {- debugInfo: (prop_types_default()).any-};-;// CONCATENATED MODULE: ./src/main.jsx-/* provided dependency */ var main_React = __webpack_require__(294);-var main_import$meta$env;-----function renderChatBot(props) {- var chatbotId = props.containerId || DEFAULT_CHATBOT_CONTAINER_ID;- client.createRoot(document.getElementById(chatbotId)).render( /*#__PURE__*/main_React.createElement(ChatBox, props));-}-window.ChatBot = {- init: function init(props) {- var chatbotId = props.containerId || DEFAULT_CHATBOT_CONTAINER_ID;- if (!document.getElementById(chatbotId)) {- // if the chatbot container is not found, create it- var div = document.createElement("div");- div.id = chatbotId;- document.body.appendChild(div);- }- renderChatBot(props);- }-};-if (((main_import$meta$env = /* unsupported import.meta.env */ undefined) === null || main_import$meta$env === void 0 ? void 0 : main_import$meta$env.VITE_APP_ENV) === "development") {- window.ChatBot.init({- isChatOnly: true,- icon: "./ink-logo.png",- containerId: "smyth-chatbot-v2",- domain: /* unsupported import.meta.env.VITE_API_URL */ undefined.VITE_API_URL- //"cm6jhab3k001tdkt0pec7g2uz.localagent.stage.smyth.ai"- });-}--/***/ }),--/***/ 183:-/***/ ((module, __webpack_exports__, __webpack_require__) => {--"use strict";-/* harmony export */ __webpack_require__.d(__webpack_exports__, {-/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)-/* harmony export */ });-/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(537);-/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);-/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(645);-/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);-// Imports---var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));-// Module-___CSS_LOADER_EXPORT___.push([module.id, `/**- * prism.js default theme for JavaScript, CSS and HTML- * Based on dabblet (http://dabblet.com)- * @author Lea Verou- */--code[class*="language-"],-pre[class*="language-"] {- color: black;- background: none;- text-shadow: 0 1px white;- font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;- font-size: 1em;- text-align: left;- white-space: pre;- word-spacing: normal;- word-break: normal;- word-wrap: normal;- line-height: 1.5;-- -moz-tab-size: 4;- -o-tab-size: 4;- tab-size: 4;-- -webkit-hyphens: none;- -moz-hyphens: none;- -ms-hyphens: none;- hyphens: none;-}--pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,-code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {- text-shadow: none;- background: #b3d4fc;-}--pre[class*="language-"]::selection, pre[class*="language-"] ::selection,-code[class*="language-"]::selection, code[class*="language-"] ::selection {- text-shadow: none;- background: #b3d4fc;-}--@media print {- code[class*="language-"],- pre[class*="language-"] {- text-shadow: none;- }-}--/* Code blocks */-pre[class*="language-"] {- padding: 1em;- margin: .5em 0;- overflow: auto;-}--:not(pre) > code[class*="language-"],-pre[class*="language-"] {- background: #f5f2f0;-}--/* Inline code */-:not(pre) > code[class*="language-"] {- padding: .1em;- border-radius: .3em;- white-space: normal;-}--.token.comment,-.token.prolog,-.token.doctype,-.token.cdata {- color: slategray;-}--.token.punctuation {- color: #999;-}--.token.namespace {- opacity: .7;-}--.token.property,-.token.tag,-.token.boolean,-.token.number,-.token.constant,-.token.symbol,-.token.deleted {- color: #905;-}--.token.selector,-.token.attr-name,-.token.string,-.token.char,-.token.builtin,-.token.inserted {- color: #690;-}--.token.operator,-.token.entity,-.token.url,-.language-css .token.string,-.style .token.string {- color: #9a6e3a;- /* This background color was intended by the author of this theme. */- background: hsla(0, 0%, 100%, .5);-}--.token.atrule,-.token.attr-value,-.token.keyword {- color: #07a;-}--.token.function,-.token.class-name {- color: #DD4A68;-}--.token.regex,-.token.important,-.token.variable {- color: #e90;-}--.token.important,-.token.bold {- font-weight: bold;-}-.token.italic {- font-style: italic;-}--.token.entity {- cursor: help;-}-`, "",{"version":3,"sources":["webpack://./node_modules/prismjs/themes/prism.css"],"names":[],"mappings":"AAAA;;;;EAIE;;AAEF;;CAEC,YAAY;CACZ,gBAAgB;CAChB,wBAAwB;CACxB,sEAAsE;CACtE,cAAc;CACd,gBAAgB;CAChB,gBAAgB;CAChB,oBAAoB;CACpB,kBAAkB;CAClB,iBAAiB;CACjB,gBAAgB;;CAEhB,gBAAgB;CAChB,cAAc;CACd,WAAW;;CAEX,qBAAqB;CACrB,kBAAkB;CAClB,iBAAiB;CACjB,aAAa;AACd;;AAEA;;CAEC,iBAAiB;CACjB,mBAAmB;AACpB;;AAEA;;CAEC,iBAAiB;CACjB,mBAAmB;AACpB;;AAEA;CACC;;EAEC,iBAAiB;CAClB;AACD;;AAEA,gBAAgB;AAChB;CACC,YAAY;CACZ,cAAc;CACd,cAAc;AACf;;AAEA;;CAEC,mBAAmB;AACpB;;AAEA,gBAAgB;AAChB;CACC,aAAa;CACb,mBAAmB;CACnB,mBAAmB;AACpB;;AAEA;;;;CAIC,gBAAgB;AACjB;;AAEA;CACC,WAAW;AACZ;;AAEA;CACC,WAAW;AACZ;;AAEA;;;;;;;CAOC,WAAW;AACZ;;AAEA;;;;;;CAMC,WAAW;AACZ;;AAEA;;;;;CAKC,cAAc;CACd,oEAAoE;CACpE,iCAAiC;AAClC;;AAEA;;;CAGC,WAAW;AACZ;;AAEA;;CAEC,cAAc;AACf;;AAEA;;;CAGC,WAAW;AACZ;;AAEA;;CAEC,iBAAiB;AAClB;AACA;CACC,kBAAkB;AACnB;;AAEA;CACC,YAAY;AACb","sourcesContent":["/**\n * prism.js default theme for JavaScript, CSS and HTML\n * Based on dabblet (http://dabblet.com)\n * @author Lea Verou\n */\n\ncode[class*=\"language-\"],\npre[class*=\"language-\"] {\n\tcolor: black;\n\tbackground: none;\n\ttext-shadow: 0 1px white;\n\tfont-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;\n\tfont-size: 1em;\n\ttext-align: left;\n\twhite-space: pre;\n\tword-spacing: normal;\n\tword-break: normal;\n\tword-wrap: normal;\n\tline-height: 1.5;\n\n\t-moz-tab-size: 4;\n\t-o-tab-size: 4;\n\ttab-size: 4;\n\n\t-webkit-hyphens: none;\n\t-moz-hyphens: none;\n\t-ms-hyphens: none;\n\thyphens: none;\n}\n\npre[class*=\"language-\"]::-moz-selection, pre[class*=\"language-\"] ::-moz-selection,\ncode[class*=\"language-\"]::-moz-selection, code[class*=\"language-\"] ::-moz-selection {\n\ttext-shadow: none;\n\tbackground: #b3d4fc;\n}\n\npre[class*=\"language-\"]::selection, pre[class*=\"language-\"] ::selection,\ncode[class*=\"language-\"]::selection, code[class*=\"language-\"] ::selection {\n\ttext-shadow: none;\n\tbackground: #b3d4fc;\n}\n\n@media print {\n\tcode[class*=\"language-\"],\n\tpre[class*=\"language-\"] {\n\t\ttext-shadow: none;\n\t}\n}\n\n/* Code blocks */\npre[class*=\"language-\"] {\n\tpadding: 1em;\n\tmargin: .5em 0;\n\toverflow: auto;\n}\n\n:not(pre) > code[class*=\"language-\"],\npre[class*=\"language-\"] {\n\tbackground: #f5f2f0;\n}\n\n/* Inline code */\n:not(pre) > code[class*=\"language-\"] {\n\tpadding: .1em;\n\tborder-radius: .3em;\n\twhite-space: normal;\n}\n\n.token.comment,\n.token.prolog,\n.token.doctype,\n.token.cdata {\n\tcolor: slategray;\n}\n\n.token.punctuation {\n\tcolor: #999;\n}\n\n.token.namespace {\n\topacity: .7;\n}\n\n.token.property,\n.token.tag,\n.token.boolean,\n.token.number,\n.token.constant,\n.token.symbol,\n.token.deleted {\n\tcolor: #905;\n}\n\n.token.selector,\n.token.attr-name,\n.token.string,\n.token.char,\n.token.builtin,\n.token.inserted {\n\tcolor: #690;\n}\n\n.token.operator,\n.token.entity,\n.token.url,\n.language-css .token.string,\n.style .token.string {\n\tcolor: #9a6e3a;\n\t/* This background color was intended by the author of this theme. */\n\tbackground: hsla(0, 0%, 100%, .5);\n}\n\n.token.atrule,\n.token.attr-value,\n.token.keyword {\n\tcolor: #07a;\n}\n\n.token.function,\n.token.class-name {\n\tcolor: #DD4A68;\n}\n\n.token.regex,\n.token.important,\n.token.variable {\n\tcolor: #e90;\n}\n\n.token.important,\n.token.bold {\n\tfont-weight: bold;\n}\n.token.italic {\n\tfont-style: italic;\n}\n\n.token.entity {\n\tcursor: help;\n}\n"],"sourceRoot":""}]);-// Exports-/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);---/***/ }),--/***/ 245:-/***/ ((module, __webpack_exports__, __webpack_require__) => {--"use strict";-/* harmony export */ __webpack_require__.d(__webpack_exports__, {-/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)-/* harmony export */ });-/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(537);-/* harmony import */ var _css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);-/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(645);-/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);-// Imports---var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));-// Module-___CSS_LOADER_EXPORT___.push([module.id, `.accordion {- border-radius: 5px;- border: 1px solid #d9d9d9;-}-.accordion .accordion-item:first-child .title {- border-top-left-radius: 5px;- border-top-right-radius: 5px;-}-.accordion .accordion-item:last-child .title {- border-bottom-left-radius: 5px;- border-bottom-right-radius: 5px;-}-.accordion .accordion-item .title {- background-color: #f6f6f6;- color: #444;- cursor: pointer;- padding: 18px;- width: 100%;- text-align: left;- border: none;- outline: none;- -webkit-transition: 0.4s;- -o-transition: 0.4s;- transition: 0.4s;-}-.accordion .accordion-item .title:after {- content: '\\2795';- font-size: 13px;- color: #777;- float: right;- margin-left: 5px;-}-.accordion .accordion-item .panel {- max-height: 0;- -webkit-transition: max-height 0.15s ease-out;- -o-transition: max-height 0.15s ease-out;- transition: max-height 0.15s ease-out;- overflow: hidden;-}-.accordion .accordion-item.active .title {- background-color: #eee;-}-.accordion .accordion-item.active .title:after {- content: '\\2796';-}-.accordion .accordion-item.active .panel {- max-height: 500px;- -webkit-transition: max-height 0.25s ease-in;- -o-transition: max-height 0.25s ease-in;- transition: max-height 0.25s ease-in;-}-/*# sourceMappingURL=index.css.map*/-`, "",{"version":3,"sources":["webpack:///src/lib/style/index.css","webpack://./node_modules/react-light-accordion/demo/css/index.css"],"names":[],"mappings":"AAAA;ECCE,kBAAkB;EAClB,yBAAyB;AAC3B;AACA;EACE,2BAA2B;EAC3B,4BAA4B;AAC9B;AACA;EACE,8BAA8B;EAC9B,+BAA+B;AACjC;AACA;EACE,yBAAyB;EACzB,WAAW;EACX,eAAe;EACf,aAAa;EACb,WAAW;EACX,gBAAgB;EAChB,YAAY;EACZ,aAAa;EACb,wBAAwB;EACxB,mBAAmB;EACnB,gBAAgB;AAClB;AACA;EACE,gBAAgB;EAChB,eAAe;EACf,WAAW;EACX,YAAY;EACZ,gBAAgB;AAClB;AACA;EACE,aAAa;EACb,6CAA6C;EAC7C,wCAAwC;EACxC,qCAAqC;EACrC,gBAAgB;AAClB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,gBAAgB;AAClB;AACA;EACE,iBAAiB;EACjB,4CAA4C;EAC5C,uCAAuC;EACvC,oCAAoC;AACtC;AACA,mCAAmC","sourcesContent":[".accordion {\n border-radius: 5px;\n border: 1px solid #d9d9d9; }\n .accordion .accordion-item:first-child .title {\n border-top-left-radius: 5px;\n border-top-right-radius: 5px; }\n .accordion .accordion-item:last-child .title {\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px; }\n .accordion .accordion-item .title {\n background-color: #f6f6f6;\n color: #444;\n cursor: pointer;\n padding: 18px;\n width: 100%;\n text-align: left;\n border: none;\n outline: none;\n -webkit-transition: 0.4s;\n -o-transition: 0.4s;\n transition: 0.4s; }\n .accordion .accordion-item .title:after {\n content: '\\02795';\n /* Unicode character for \"plus\" sign (+) */\n font-size: 13px;\n color: #777;\n float: right;\n margin-left: 5px; }\n .accordion .accordion-item .panel {\n max-height: 0;\n -webkit-transition: max-height 0.15s ease-out;\n -o-transition: max-height 0.15s ease-out;\n transition: max-height 0.15s ease-out;\n overflow: hidden; }\n .accordion .accordion-item.active .title {\n background-color: #eeeeee; }\n .accordion .accordion-item.active .title:after {\n content: '\\2796';\n /* Unicode character for \"minus\" sign (-) */ }\n .accordion .accordion-item.active .panel {\n max-height: 500px;\n -webkit-transition: max-height 0.25s ease-in;\n -o-transition: max-height 0.25s ease-in;\n transition: max-height 0.25s ease-in; }\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib/style/index.css",".accordion {\n border-radius: 5px;\n border: 1px solid #d9d9d9;\n}\n.accordion .accordion-item:first-child .title {\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n}\n.accordion .accordion-item:last-child .title {\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n}\n.accordion .accordion-item .title {\n background-color: #f6f6f6;\n color: #444;\n cursor: pointer;\n padding: 18px;\n width: 100%;\n text-align: left;\n border: none;\n outline: none;\n -webkit-transition: 0.4s;\n -o-transition: 0.4s;\n transition: 0.4s;\n}\n.accordion .accordion-item .title:after {\n content: '\\2795';\n font-size: 13px;\n color: #777;\n float: right;\n margin-left: 5px;\n}\n.accordion .accordion-item .panel {\n max-height: 0;\n -webkit-transition: max-height 0.15s ease-out;\n -o-transition: max-height 0.15s ease-out;\n transition: max-height 0.15s ease-out;\n overflow: hidden;\n}\n.accordion .accordion-item.active .title {\n background-color: #eee;\n}\n.accordion .accordion-item.active .title:after {\n content: '\\2796';\n}\n.accordion .accordion-item.active .panel {\n max-height: 500px;\n -webkit-transition: max-height 0.25s ease-in;\n -o-transition: max-height 0.25s ease-in;\n transition: max-height 0.25s ease-in;\n}\n/*# sourceMappingURL=index.css.map*/\n"],"sourceRoot":""}]);-// Exports-/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);---/***/ }),--/***/ 424:-/***/ ((module, __webpack_exports__, __webpack_require__) => {--"use strict";-/* harmony export */ __webpack_require__.d(__webpack_exports__, {-/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)-/* harmony export */ });-/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(537);-/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);-/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(645);-/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);-// Imports---var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));-// Module-___CSS_LOADER_EXPORT___.push([module.id, ``, "",{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}]);-// Exports-/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);---/***/ }),--/***/ 759:-/***/ ((module, __webpack_exports__, __webpack_require__) => {--"use strict";-/* harmony export */ __webpack_require__.d(__webpack_exports__, {-/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)-/* harmony export */ });-/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(537);-/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);-/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(645);-/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);-// Imports---var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));-// Module-___CSS_LOADER_EXPORT___.push([module.id, `.auth-overlay-wrapper{top:0;left:0;width:100%;height:100%;z-index:100;display:flex;padding:2rem 1rem;position:absolute;box-sizing:border-box;justify-content:center;background-color:#fff;backdrop-filter:blur(5px)}.auth-overlay-wrapper .oauth-overlay,.auth-overlay-wrapper .api-key-overlay{color:#333;display:flex;padding:1rem 1rem;border-radius:8px;text-align:center;align-items:center;flex-direction:column;justify-content:center;border:1px solid #d9d9d9;display:flex;position:relative;align-items:center}.auth-overlay-wrapper .oauth-overlay p,.auth-overlay-wrapper .api-key-overlay p{text-align:left}.auth-overlay-wrapper .oauth-overlay button,.auth-overlay-wrapper .api-key-overlay button{all:unset;color:#333;cursor:pointer;font-weight:500;border-radius:6px;padding:.5rem 2rem;background-color:#45c98d}.auth-overlay-wrapper .oauth-overlay input,.auth-overlay-wrapper .api-key-overlay input{all:unset;color:#333;padding:12px;text-align:left;border-radius:8px;background:#f5f5f5;width:calc(100% - 24px);border:1px solid #d9d9d9}.auth-overlay-wrapper .oauth-overlay .error-message,.auth-overlay-wrapper .api-key-overlay .error-message{color:#900b09;font-size:16px;margin-top:.5rem}.auth-overlay-wrapper .oauth-overlay .input-wrapper,.auth-overlay-wrapper .api-key-overlay .input-wrapper{width:100%;display:flex;position:relative;align-items:center}.auth-overlay-wrapper .oauth-overlay .input-wrapper input,.auth-overlay-wrapper .api-key-overlay .input-wrapper input{flex-grow:1;padding-right:30px}.auth-overlay-wrapper .oauth-overlay .input-wrapper .loader,.auth-overlay-wrapper .api-key-overlay .input-wrapper .loader{top:50%;right:10px;position:absolute;transform:translateY(-50%)}.auth-overlay-wrapper .oauth-overlay .input-wrapper .submit-button,.auth-overlay-wrapper .api-key-overlay .input-wrapper .submit-button{right:0;width:48px;height:100%;display:flex;cursor:pointer;position:absolute;align-items:center;padding:0 !important;justify-content:center;border-radius:0 8px 8px 0}.auth-overlay-wrapper .oauth-overlay{align-items:stretch;box-sizing:border-box}.auth-overlay-wrapper .oauth-overlay button{gap:10px;padding:12px;display:flex;color:#fff;font-weight:600;align-items:center;justify-content:center;background-color:#45c9a9;max-width:100%}.auth-overlay-wrapper .oauth-overlay button:disabled{background-color:#d9d9d9;cursor:not-allowed}.auth-overlay-wrapper .oauth-overlay button .domain-text{max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;vertical-align:bottom}`, "",{"version":3,"sources":["webpack://./src/components/auth-overlay/styles.scss"],"names":[],"mappings":"AAAA,sBACE,KAAA,CACA,MAAA,CACA,UAAA,CACA,WAAA,CACA,WAAA,CACA,YAAA,CACA,iBAAA,CACA,iBAAA,CACA,qBAAA,CACA,sBAAA,CACA,qBAAA,CACA,yBAAA,CACA,4EAEE,UAAA,CACA,YAAA,CACA,iBAAA,CACA,iBAAA,CACA,iBAAA,CACA,kBAAA,CACA,qBAAA,CACA,sBAAA,CACA,wBAAA,CAuBA,YAAA,CACA,iBAAA,CACA,kBAAA,CAxBA,gFACE,eAAA,CAEF,0FACE,SAAA,CACA,UAAA,CACA,cAAA,CACA,eAAA,CACA,iBAAA,CACA,kBAAA,CACA,wBAAA,CAEF,wFACE,SAAA,CACA,UAAA,CACA,YAAA,CACA,eAAA,CACA,iBAAA,CACA,kBAAA,CACA,uBAAA,CACA,wBAAA,CAKF,0GACE,aAAA,CACA,cAAA,CACA,gBAAA,CAEF,0GACE,UAAA,CACA,YAAA,CACA,iBAAA,CACA,kBAAA,CACA,sHACE,WAAA,CACA,kBAAA,CAGF,0HACE,OAAA,CACA,UAAA,CACA,iBAAA,CACA,0BAAA,CAEF,wIACE,OAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,cAAA,CACA,iBAAA,CACA,kBAAA,CACA,oBAAA,CACA,sBAAA,CACA,yBAAA,CAIN,qCACE,mBAAA,CACA,qBAAA,CACA,4CACE,QAAA,CACA,YAAA,CACA,YAAA,CACA,UAAA,CACA,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,wBAAA,CACA,cAAA,CACA,qDACE,wBAAA,CACA,kBAAA,CAGF,yDACE,eAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,oBAAA,CACA,qBAAA","sourcesContent":[".auth-overlay-wrapper {\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n z-index: 100;\r\n display: flex;\r\n padding: 2rem 1rem;\r\n position: absolute;\r\n box-sizing: border-box;\r\n justify-content: center;\r\n background-color: #fff;\r\n backdrop-filter: blur(5px);\r\n .oauth-overlay,\r\n .api-key-overlay {\r\n color: #333;\r\n display: flex;\r\n padding: 1rem 1rem;\r\n border-radius: 8px;\r\n text-align: center;\r\n align-items: center;\r\n flex-direction: column;\r\n justify-content: center;\r\n border: 1px solid #d9d9d9;\r\n p {\r\n text-align: left;\r\n }\r\n button {\r\n all: unset;\r\n color: #333;\r\n cursor: pointer;\r\n font-weight: 500;\r\n border-radius: 6px;\r\n padding: 0.5rem 2rem;\r\n background-color: #45c98d;\r\n }\r\n input {\r\n all: unset;\r\n color: #333;\r\n padding: 12px;\r\n text-align: left;\r\n border-radius: 8px;\r\n background: #f5f5f5;\r\n width: calc(100% - 24px); // Subtracting padding from both sides\r\n border: 1px solid #d9d9d9;\r\n }\r\n display: flex;\r\n position: relative;\r\n align-items: center;\r\n .error-message {\r\n color: #900B09;\r\n font-size: 16px;\r\n margin-top: .5rem;\r\n }\r\n .input-wrapper {\r\n width: 100%;\r\n display: flex;\r\n position: relative;\r\n align-items: center;\r\n input {\r\n flex-grow: 1;\r\n padding-right: 30px; // Make room for the loader\r\n }\r\n\r\n .loader {\r\n top: 50%;\r\n right: 10px;\r\n position: absolute;\r\n transform: translateY(-50%);\r\n }\r\n .submit-button {\r\n right: 0;\r\n width: 48px;\r\n height: 100%;\r\n display: flex;\r\n cursor: pointer;\r\n position: absolute;\r\n align-items: center;\r\n padding: 0 !important;\r\n justify-content: center;\r\n border-radius: 0 8px 8px 0;\r\n }\r\n }\r\n }\r\n .oauth-overlay {\r\n align-items: stretch;\r\n box-sizing: border-box;\r\n button {\r\n gap: 10px;\r\n padding: 12px;\r\n display: flex;\r\n color: #fff;\r\n font-weight: 600;\r\n align-items: center;\r\n justify-content: center;\r\n background-color: #45C9A9;\r\n max-width: 100%; // Ensure the button doesn't exceed its container width\r\n &:disabled {\r\n background-color: #d9d9d9;\r\n cursor: not-allowed;\r\n }\r\n\r\n .domain-text {\r\n max-width: 200px; // Adjust this value as needed\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n display: inline-block;\r\n vertical-align: bottom;\r\n }\r\n }\r\n }\r\n}\r\n"],"sourceRoot":""}]);-// Exports-/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);---/***/ }),--/***/ 519:-/***/ ((module, __webpack_exports__, __webpack_require__) => {--"use strict";-/* harmony export */ __webpack_require__.d(__webpack_exports__, {-/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)-/* harmony export */ });-/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(537);-/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);-/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(645);-/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);-// Imports---var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));-// Module-___CSS_LOADER_EXPORT___.push([module.id, `.chat-box-wrapper{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%;z-index:99999999;scrollbar-width:thin;scrollbar-color:#a29e9f #f1f1f1;position:fixed;bottom:6rem;right:3rem;width:450px;max-width:calc(100% - 3rem);height:85vh;display:flex;flex-direction:column;box-shadow:rgba(150,150,150,.2) 0px 10px 30px 0px,rgba(150,150,150,.2) 0px 0px 0px 1px;border-radius:1rem;overflow:hidden;background:#fff}.chat-box-wrapper ::-webkit-scrollbar{width:8px}.chat-box-wrapper ::-webkit-scrollbar-thumb{background-color:#a29e9f;border-radius:5px;box-shadow:inset 0 0 5px rgba(0,0,0,.2)}.chat-box-wrapper ::-webkit-scrollbar-track{background-color:#f1f1f1}.chat-box-wrapper.chat-only{top:0;left:0;width:100%;height:100%;border:none;max-width:100%;position:static;border-radius:0;box-shadow:none}.chat-box-wrapper.chat-only .chat-header{display:none}.chat-box-wrapper.chat-only .chatbox .chat-footer{border-top:none;padding:0 10px 10px}.chat-box-wrapper h1{font-size:3.2em;line-height:1.1}.chat-box-wrapper a{font-weight:500;color:#646cff;text-decoration:inherit}.chat-box-wrapper a:hover{color:#535bf2}@media screen and (max-width: 540px){.chat-box-wrapper{right:1rem;max-width:calc(100% - 2rem)}}.chat-box-wrapper .chatbox{display:flex;flex-direction:column;height:100%}.chat-box-wrapper .chatbox .chat-header{flex:0 0 auto;border-bottom:1px solid #ddd}.chat-box-wrapper .chatbox .chat-header .chat-brand{display:flex;justify-content:space-between;padding:1rem}.chat-box-wrapper .chatbox .chat-header .chat-brand .chatbox-logo{width:auto;object-fit:contain;height:36px}.chat-box-wrapper .chatbox .chat-header .chat-brand .btn-wrapper{display:flex;justify-content:space-between;gap:.5rem}.chat-box-wrapper .chatbox .chat-header .chat-brand .btn-wrapper .close-icon{display:flex;align-items:center;border:none;outline:none;background:rgba(0,0,0,0);cursor:pointer}.chat-box-wrapper .chatbox .chat-header .chat-brand .btn-wrapper .close-icon img{width:16px;cursor:pointer}.chat-box-wrapper .chatbox .chat-body{flex:1 1 auto;overflow-y:auto;padding:2rem 1rem;position:relative}.chat-box-wrapper .chatbox .chat-body .chat-message{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:1rem}.chat-box-wrapper .chatbox .chat-body .chat-message .chat-content{padding:.5rem 1rem;border-radius:.5rem;background-color:#f1f1f0;max-width:80%;word-break:break-word}.chat-box-wrapper .chatbox .chat-body .chat-message .chat-content .timestamp{font-size:.75rem;color:#999;margin-top:.25rem}.chat-box-wrapper .chatbox .chat-body .chat-message.user{align-items:flex-end}.chat-box-wrapper .chatbox .chat-body .chat-message.user .chat-content{background:#45c98d;color:#fff}.chat-box-wrapper .chatbox .chat-body .chat-message.user .chat-content .timestamp{color:#fff}.chat-box-wrapper .chatbox .chat-body .chat-message img{max-width:100%;width:100%;margin:12px auto;display:block}.chat-box-wrapper .chatbox .chat-footer{display:flex;flex:0 0 auto;padding:1rem;justify-content:space-between;border-top:1px solid #ddd}.chat-box-wrapper .chatbox .chat-footer .chat-input{flex:1 1 auto;display:flex;align-items:end;justify-content:space-between;border-radius:.5rem;background-color:rgba(0,0,0,0);padding:.5rem;padding-right:0;border:1px solid #ddd;position:relative;max-width:100%}.chat-box-wrapper .chatbox .chat-footer .chat-input textarea{flex:1 1 auto;border:none;outline:none;padding-right:3.5rem;background-color:rgba(0,0,0,0);font-size:1rem;color:#333;resize:none;font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;scrollbar-width:thin;scrollbar-color:#aaa rgba(0,0,0,0)}.chat-box-wrapper .chatbox .chat-footer .chat-input textarea::placeholder{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif}.chat-box-wrapper .chatbox .chat-footer .chat-input .chat-send,.chat-box-wrapper .chatbox .chat-footer .chat-input .chat-stop{margin-left:1rem;border:none;outline:none;background-color:rgba(0,0,0,0);background:#45c98d;cursor:pointer;font-weight:bold;color:#fff;border-radius:4px;height:100%;display:flex;justify-content:center;align-items:center;padding:8px;width:40px;height:32px;position:absolute;right:8px;bottom:50%;transform:translateY(50%);min-height:24px}.chat-box-wrapper .chatbox .chat-footer .chat-input .chat-send:disabled,.chat-box-wrapper .chatbox .chat-footer .chat-input .chat-stop:disabled{background:#d9d9d9;cursor:not-allowed}.chat-box-wrapper .chatbox .chat-footer .chat-input .chat-send img,.chat-box-wrapper .chatbox .chat-footer .chat-input .chat-stop img{width:75%}.chat-box-wrapper .collapsibleWrapper .collapsibleButton{background-color:#555;color:#fff;cursor:pointer;width:100%;text-align:left}.chat-box-wrapper .collapsibleWrapper .collapsibleContent{max-height:0;overflow:hidden;transition:max-height .2s ease-out}.chat-box-wrapper .collapsibleWrapper .button:active+.collapsibleContent{max-height:100vh}.chat-box-wrapper .accordion .accordion-item.active .panel{overflow-y:auto}.chat-box-wrapper .accordion .accordion-item .title{padding:12px}.enlarge-box-wrapper{left:3rem;width:unset;transition:left .3s ease-out,width .3s ease-out}.chatbot-toggler{position:fixed;z-index:99999999;bottom:1rem;right:3rem;width:50px;height:50px;border-radius:50%;background:#45c98d;color:#fff;box-shadow:0 0 10px rgba(0,0,0,.3);cursor:pointer;display:flex;justify-content:center;align-items:center;border:none;font-weight:bold;padding:0}@media screen and (max-width: 540px){.chatbot-toggler{right:1rem}}.chatbot-toggler img{width:24px}.chatbot-toggler.toggler-spinner{background:#fff}.regenerate-button{background-color:#fff;color:#000;padding:8px 16px;border:none;border-radius:5px;cursor:pointer;font-size:14px;transition:background-color .3s ease;display:flex;align-items:center;gap:6px;justify-content:center;box-shadow:0 0 4px rgba(0,0,0,.1);font-weight:600}.regenerate-button:hover{box-shadow:0 0 8px rgba(0,0,0,.1)}.icon-button-container{display:flex;align-items:center;gap:10px}.debug-section{margin-bottom:1rem}.debug-section p{padding:0 1rem !important;font-size:13px}.chat-text pre div{overflow:auto !important}.chat-text pre :not(pre)>code[class*=language-],.chat-text pre pre[class*=language-]{background:rgba(0,0,0,0) !important;text-shadow:none !important}.chat-text pre .token.operator,.chat-text pre .token.entity,.chat-text pre .token.url,.chat-text pre .language-css .token.string,.chat-text pre .style .token.string{background:rgba(0,0,0,0) !important}.chat-stop{margin-left:1rem;border:none;outline:none;background-color:#ff4d4f;cursor:pointer;font-weight:bold;color:#fff;border-radius:4px;height:100%;display:flex;justify-content:center;align-items:center;padding:8px 16px;font-size:14px}`, "",{"version":3,"sources":["webpack://./src/components/chatbox/styles.scss"],"names":[],"mappings":"AAAA,kBACE,6DAAA,CACA,eAAA,CACA,eAAA,CACA,mBAAA,CACA,iCAAA,CACA,kCAAA,CACA,iCAAA,CACA,6BAAA,CACA,gBAAA,CAmBA,oBAAA,CACA,+BAAA,CAmCA,cAAA,CACA,WAAA,CACA,UAAA,CACA,WAAA,CACA,2BAAA,CACA,WAAA,CACA,YAAA,CACA,qBAAA,CACA,sFAAA,CAEA,kBAAA,CACA,eAAA,CACA,eAAA,CAhEA,sCACE,SAAA,CAIF,4CACE,wBAAA,CACA,iBAAA,CACA,uCAAA,CAIF,4CACE,wBAAA,CAMF,4BACE,KAAA,CACA,MAAA,CACA,UAAA,CACA,WAAA,CACA,WAAA,CACA,cAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,yCACE,YAAA,CAGA,kDACE,eAAA,CACA,mBAAA,CAIN,qBACE,eAAA,CACA,eAAA,CAEF,oBACE,eAAA,CACA,aAAA,CACA,uBAAA,CAEF,0BACE,aAAA,CAgBF,qCA7EF,kBA8EI,UAAA,CACA,2BAAA,CAAA,CAEF,2BACE,YAAA,CACA,qBAAA,CACA,WAAA,CACA,wCACE,aAAA,CACA,4BAAA,CACA,oDACE,YAAA,CACA,6BAAA,CACA,YAAA,CACA,kEACE,UAAA,CACA,kBAAA,CACA,WAAA,CAEF,iEACE,YAAA,CACA,6BAAA,CACA,SAAA,CACA,6EACE,YAAA,CACA,kBAAA,CACA,WAAA,CACA,YAAA,CACA,wBAAA,CACA,cAAA,CACA,iFACE,UAAA,CACA,cAAA,CAMV,sCACE,aAAA,CACA,eAAA,CACA,iBAAA,CAEA,iBAAA,CAEA,oDACE,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,kBAAA,CACA,kEACE,kBAAA,CACA,mBAAA,CACA,wBAAA,CACA,aAAA,CACA,qBAAA,CACA,6EACE,gBAAA,CACA,UAAA,CACA,iBAAA,CAGJ,yDACE,oBAAA,CACA,uEACE,kBAAA,CACA,UAAA,CACA,kFACE,UAAA,CAIN,wDACE,cAAA,CACA,UAAA,CACA,gBAAA,CACA,aAAA,CAIN,wCACE,YAAA,CACA,aAAA,CACA,YAAA,CACA,6BAAA,CACA,yBAAA,CACA,oDACE,aAAA,CACA,YAAA,CACA,eAAA,CACA,6BAAA,CACA,mBAAA,CACA,8BAAA,CACA,aAAA,CACA,eAAA,CACA,qBAAA,CACA,iBAAA,CACA,cAAA,CACA,6DACE,aAAA,CACA,WAAA,CACA,YAAA,CACA,oBAAA,CACA,8BAAA,CACA,cAAA,CACA,UAAA,CACA,WAAA,CACA,6DAAA,CAIA,oBAAA,CACA,kCAAA,CAJA,0EACE,6DAAA,CAKJ,8HAEE,gBAAA,CACA,WAAA,CACA,YAAA,CACA,8BAAA,CACA,kBAAA,CACA,cAAA,CACA,gBAAA,CACA,UAAA,CACA,iBAAA,CACA,WAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,SAAA,CACA,UAAA,CACA,yBAAA,CACA,eAAA,CACA,gJACE,kBAAA,CACA,kBAAA,CAEF,sIACE,SAAA,CAQR,yDACE,qBAAA,CACA,UAAA,CACA,cAAA,CACA,UAAA,CACA,eAAA,CAGF,0DACE,YAAA,CACA,eAAA,CACA,kCAAA,CAGF,yEACE,gBAAA,CAIJ,2DACE,eAAA,CAGF,oDACE,YAAA,CAGJ,qBACE,SAAA,CACA,WAAA,CACA,+CAAA,CAGF,iBACE,cAAA,CACA,gBAAA,CACA,WAAA,CACA,UAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,kBAAA,CACA,UAAA,CACA,kCAAA,CACA,cAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CACA,gBAAA,CACA,SAAA,CACA,qCAlBF,iBAmBI,UAAA,CAAA,CAEF,qBACE,UAAA,CAEF,iCACE,eAAA,CAGJ,mBACE,qBAAA,CACA,UAAA,CACA,gBAAA,CACA,WAAA,CACA,iBAAA,CACA,cAAA,CACA,cAAA,CACA,oCAAA,CACA,YAAA,CACA,kBAAA,CACA,OAAA,CACA,sBAAA,CACA,iCAAA,CACA,eAAA,CAEA,yBACE,iCAAA,CAGJ,uBACE,YAAA,CACA,kBAAA,CACA,QAAA,CAEF,eACE,kBAAA,CACA,iBACE,yBAAA,CACA,cAAA,CAMA,mBACE,wBAAA,CAEF,qFAEE,mCAAA,CACA,2BAAA,CAEF,qKAKE,mCAAA,CAKN,WACE,gBAAA,CACA,WAAA,CACA,YAAA,CACA,wBAAA,CACA,cAAA,CACA,gBAAA,CACA,UAAA,CACA,iBAAA,CACA,WAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,gBAAA,CACA,cAAA","sourcesContent":[".chat-box-wrapper {\r\n font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;\r\n line-height: 1.5;\r\n font-weight: 400;\r\n font-synthesis: none;\r\n text-rendering: optimizeLegibility;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n -webkit-text-size-adjust: 100%;\r\n z-index: 99999999;\r\n\r\n /* Style the scrollbar track */\r\n ::-webkit-scrollbar {\r\n width: 8px; /* Width of the scrollbar */\r\n }\r\n\r\n /* Style the scrollbar thumb */\r\n ::-webkit-scrollbar-thumb {\r\n background-color: rgb(162, 158, 159); /* Color of the scrollbar thumb */\r\n border-radius: 5px; /* Rounded corners for the thumb */\r\n box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); /* Inner shadow effect */\r\n }\r\n\r\n /* Style the scrollbar track */\r\n ::-webkit-scrollbar-track {\r\n background-color: #f1f1f1; /* Color of the scrollbar track */\r\n }\r\n\r\n scrollbar-width: thin;\r\n scrollbar-color: rgb(162, 158, 159) #f1f1f1; // Firefox\r\n\r\n &.chat-only {\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n border: none;\r\n max-width: 100%;\r\n position: static;\r\n border-radius: 0;\r\n box-shadow: none;\r\n .chat-header {\r\n display: none;\r\n }\r\n .chatbox {\r\n .chat-footer {\r\n border-top: none;\r\n padding: 0 10px 10px;\r\n }\r\n }\r\n }\r\n h1 {\r\n font-size: 3.2em;\r\n line-height: 1.1;\r\n }\r\n a {\r\n font-weight: 500;\r\n color: #646cff;\r\n text-decoration: inherit;\r\n }\r\n a:hover {\r\n color: #535bf2;\r\n }\r\n\r\n position: fixed;\r\n bottom: 6rem;\r\n right: 3rem;\r\n width: 450px;\r\n max-width: calc(100% - 3rem);\r\n height: 85vh;\r\n display: flex;\r\n flex-direction: column;\r\n box-shadow: rgba(150, 150, 150, 0.2) 0px 10px 30px 0px,\r\n rgba(150, 150, 150, 0.2) 0px 0px 0px 1px;\r\n border-radius: 1rem;\r\n overflow: hidden;\r\n background: #fff;\r\n @media screen and (max-width: 540px) {\r\n right: 1rem;\r\n max-width: calc(100% - 2rem);\r\n }\r\n .chatbox {\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n .chat-header {\r\n flex: 0 0 auto;\r\n border-bottom: 1px solid #ddd;\r\n .chat-brand {\r\n display: flex;\r\n justify-content: space-between;\r\n padding: 1rem;\r\n .chatbox-logo {\r\n width: auto;\r\n object-fit: contain;\r\n height: 36px;\r\n }\r\n .btn-wrapper {\r\n display: flex;\r\n justify-content: space-between;\r\n gap: 0.5rem;\r\n .close-icon {\r\n display: flex;\r\n align-items: center;\r\n border: none;\r\n outline: none;\r\n background: transparent;\r\n cursor: pointer;\r\n img {\r\n width: 16px;\r\n cursor: pointer;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n .chat-body {\r\n flex: 1 1 auto;\r\n overflow-y: auto;\r\n padding: 2rem 1rem;\r\n // scrollbar-gutter: stable;\r\n position: relative;\r\n\r\n .chat-message {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: flex-start;\r\n margin-bottom: 1rem;\r\n .chat-content {\r\n padding: 0.5rem 1rem;\r\n border-radius: 0.5rem;\r\n background-color: #f1f1f0;\r\n max-width: 80%;\r\n word-break: break-word;\r\n .timestamp {\r\n font-size: 0.75rem;\r\n color: #999;\r\n margin-top: 0.25rem;\r\n }\r\n }\r\n &.user {\r\n align-items: flex-end;\r\n .chat-content {\r\n background: #45c98d;\r\n color: #fff;\r\n .timestamp {\r\n color: #fff;\r\n }\r\n }\r\n }\r\n img {\r\n max-width: 100%;\r\n width: 100%;\r\n margin: 12px auto;\r\n display: block;\r\n }\r\n }\r\n }\r\n .chat-footer {\r\n display: flex;\r\n flex: 0 0 auto;\r\n padding: 1rem;\r\n justify-content: space-between;\r\n border-top: 1px solid #ddd;\r\n .chat-input {\r\n flex: 1 1 auto;\r\n display: flex;\r\n align-items: end;\r\n justify-content: space-between;\r\n border-radius: 0.5rem;\r\n background-color: transparent;\r\n padding: 0.5rem;\r\n padding-right: 0;\r\n border: 1px solid #ddd;\r\n position: relative;\r\n max-width: 100%;\r\n textarea {\r\n flex: 1 1 auto;\r\n border: none;\r\n outline: none;\r\n padding-right: 3.5rem;\r\n background-color: transparent;\r\n font-size: 1rem;\r\n color: #333;\r\n resize: none;\r\n font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;\r\n &::placeholder {\r\n font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;\r\n }\r\n scrollbar-width: thin;\r\n scrollbar-color: #aaa transparent;\r\n }\r\n .chat-send,\r\n .chat-stop {\r\n margin-left: 1rem;\r\n border: none;\r\n outline: none;\r\n background-color: transparent;\r\n background: #45c98d;\r\n cursor: pointer;\r\n font-weight: bold;\r\n color: #fff;\r\n border-radius: 4px;\r\n height: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n padding: 8px;\r\n width: 40px;\r\n height: 32px;\r\n position: absolute;\r\n right: 8px;\r\n bottom: 50%;\r\n transform: translateY(50%);\r\n min-height: 24px;\r\n &:disabled {\r\n background: #d9d9d9;\r\n cursor: not-allowed;\r\n }\r\n img {\r\n width: 75%;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n .collapsibleWrapper {\r\n .collapsibleButton {\r\n background-color: #555;\r\n color: white;\r\n cursor: pointer;\r\n width: 100%;\r\n text-align: left;\r\n }\r\n\r\n .collapsibleContent {\r\n max-height: 0;\r\n overflow: hidden;\r\n transition: max-height 0.2s ease-out;\r\n }\r\n\r\n .button:active + .collapsibleContent {\r\n max-height: 100vh;\r\n }\r\n }\r\n\r\n .accordion .accordion-item.active .panel {\r\n overflow-y: auto;\r\n }\r\n\r\n .accordion .accordion-item .title {\r\n padding: 12px;\r\n }\r\n}\r\n.enlarge-box-wrapper {\r\n left: 3rem;\r\n width: unset;\r\n transition: left 0.3s ease-out, width 0.3s ease-out;\r\n}\r\n\r\n.chatbot-toggler {\r\n position: fixed;\r\n z-index: 99999999;\r\n bottom: 1rem;\r\n right: 3rem;\r\n width: 50px;\r\n height: 50px;\r\n border-radius: 50%;\r\n background: #45c98d;\r\n color: #fff;\r\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);\r\n cursor: pointer;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n border: none;\r\n font-weight: bold;\r\n padding: 0;\r\n @media screen and (max-width: 540px) {\r\n right: 1rem;\r\n }\r\n img {\r\n width: 24px;\r\n }\r\n &.toggler-spinner {\r\n background: #fff;\r\n }\r\n}\r\n.regenerate-button {\r\n background-color: #fff;\r\n color: #000;\r\n padding: 8px 16px;\r\n border: none;\r\n border-radius: 5px;\r\n cursor: pointer;\r\n font-size: 14px;\r\n transition: background-color 0.3s ease;\r\n display: flex;\r\n align-items: center;\r\n gap: 6px;\r\n justify-content: center;\r\n box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);\r\n font-weight: 600;\r\n\r\n &:hover {\r\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);\r\n }\r\n}\r\n.icon-button-container {\r\n display: flex;\r\n align-items: center;\r\n gap: 10px;\r\n}\r\n.debug-section {\r\n margin-bottom: 1rem;\r\n p {\r\n padding: 0 1rem !important;\r\n font-size: 13px;\r\n }\r\n}\r\n\r\n.chat-text {\r\n pre {\r\n div {\r\n overflow: auto !important;\r\n }\r\n :not(pre) > code[class*=\"language-\"],\r\n pre[class*=\"language-\"] {\r\n background: transparent !important;\r\n text-shadow: none !important;\r\n }\r\n .token.operator,\r\n .token.entity,\r\n .token.url,\r\n .language-css .token.string,\r\n .style .token.string {\r\n background: transparent !important;\r\n }\r\n }\r\n}\r\n\r\n.chat-stop {\r\n margin-left: 1rem;\r\n border: none;\r\n outline: none;\r\n background-color: #ff4d4f;\r\n cursor: pointer;\r\n font-weight: bold;\r\n color: #fff;\r\n border-radius: 4px;\r\n height: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n padding: 8px 16px;\r\n font-size: 14px;\r\n}\r\n"],"sourceRoot":""}]);-// Exports-/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);---/***/ }),--/***/ 195:-/***/ ((module, __webpack_exports__, __webpack_require__) => {--"use strict";-/* harmony export */ __webpack_require__.d(__webpack_exports__, {-/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)-/* harmony export */ });-/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(537);-/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);-/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(645);-/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);-// Imports---var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));-// Module-___CSS_LOADER_EXPORT___.push([module.id, `.chat-box-wrapper .chatbox{display:flex;flex-direction:column;height:100%}.chat-box-wrapper .chatbox .chat-body{flex:1 1 auto;overflow-y:auto;padding:2rem 1rem}.chat-box-wrapper .chatbox .chat-body .chat-message{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:1rem}.chat-box-wrapper .chatbox .chat-body .chat-message .chat-content{padding:.5rem 1rem;border-radius:.5rem;background-color:#f1f1f0;max-width:80%;word-break:break-word}.chat-box-wrapper .chatbox .chat-body .chat-message .chat-content .timestamp{font-size:.75rem;color:#999;margin-top:.25rem}.chat-box-wrapper .chatbox .chat-body .chat-message.user{align-items:flex-end}.chat-box-wrapper .chatbox .chat-body .chat-message.user .chat-content{background:#45c98d;color:#fff}.chat-box-wrapper .chatbox .chat-body .chat-message.user .chat-content .timestamp{color:#fff}.chat-box-wrapper .chatbox .chat-body .chat-message img{max-width:100%;width:100%;margin:12px auto;display:block}.chat-box-wrapper pre>div:first-child{border:unset !important}.regenerate-button{background-color:#fff;color:#000;padding:8px 16px;border:none;border-radius:5px;cursor:pointer;font-size:14px;transition:background-color .3s ease;display:flex;align-items:center;gap:6px;justify-content:center;box-shadow:0 0 4px rgba(0,0,0,.1);font-weight:600}.regenerate-button:hover{box-shadow:0 0 8px rgba(0,0,0,.1)}`, "",{"version":3,"sources":["webpack://./src/components/error-message/styles.scss"],"names":[],"mappings":"AACE,2BACE,YAAA,CACA,qBAAA,CACA,WAAA,CACA,sCACE,aAAA,CACA,eAAA,CACA,iBAAA,CAGA,oDACE,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,kBAAA,CACA,kEACE,kBAAA,CACA,mBAAA,CACA,wBAAA,CACA,aAAA,CACA,qBAAA,CACA,6EACE,gBAAA,CACA,UAAA,CACA,iBAAA,CAGJ,yDACE,oBAAA,CACA,uEACE,kBAAA,CACA,UAAA,CACA,kFACE,UAAA,CAIN,wDACE,cAAA,CACA,UAAA,CACA,gBAAA,CACA,aAAA,CAKR,sCACE,uBAAA,CAGJ,mBACE,qBAAA,CACA,UAAA,CACA,gBAAA,CACA,WAAA,CACA,iBAAA,CACA,cAAA,CACA,cAAA,CACA,oCAAA,CACA,YAAA,CACA,kBAAA,CACA,OAAA,CACA,sBAAA,CACA,iCAAA,CACA,eAAA,CAEA,yBACE,iCAAA","sourcesContent":[".chat-box-wrapper {\r\n .chatbox {\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n .chat-body {\r\n flex: 1 1 auto;\r\n overflow-y: auto;\r\n padding: 2rem 1rem;\r\n // scrollbar-gutter: stable;\r\n\r\n .chat-message {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: flex-start;\r\n margin-bottom: 1rem;\r\n .chat-content {\r\n padding: 0.5rem 1rem;\r\n border-radius: 0.5rem;\r\n background-color: #f1f1f0;\r\n max-width: 80%;\r\n word-break: break-word;\r\n .timestamp {\r\n font-size: 0.75rem;\r\n color: #999;\r\n margin-top: 0.25rem;\r\n }\r\n }\r\n &.user {\r\n align-items: flex-end;\r\n .chat-content {\r\n background: #45c98d;\r\n color: #fff;\r\n .timestamp {\r\n color: #fff;\r\n }\r\n }\r\n }\r\n img {\r\n max-width: 100%;\r\n width: 100%;\r\n margin: 12px auto;\r\n display: block;\r\n }\r\n }\r\n }\r\n }\r\n pre > div:first-child {\r\n border: unset !important;\r\n }\r\n}\r\n.regenerate-button {\r\n background-color: #fff;\r\n color: #000;\r\n padding: 8px 16px;\r\n border: none;\r\n border-radius: 5px;\r\n cursor: pointer;\r\n font-size: 14px;\r\n transition: background-color 0.3s ease;\r\n display: flex;\r\n align-items: center;\r\n gap: 6px;\r\n justify-content: center;\r\n box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);\r\n font-weight: 600;\r\n\r\n &:hover {\r\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);\r\n }\r\n}\r\n"],"sourceRoot":""}]);-// Exports-/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);---/***/ }),--/***/ 645:-/***/ ((module) => {--"use strict";---/*- MIT License http://www.opensource.org/licenses/mit-license.php- Author Tobias Koppers @sokra-*/-module.exports = function (cssWithMappingToString) {- var list = [];-- // return the list of modules as css string- list.toString = function toString() {- return this.map(function (item) {- var content = "";- var needLayer = typeof item[5] !== "undefined";- if (item[4]) {- content += "@supports (".concat(item[4], ") {");- }- if (item[2]) {- content += "@media ".concat(item[2], " {");- }- if (needLayer) {- content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");- }- content += cssWithMappingToString(item);- if (needLayer) {- content += "}";- }- if (item[2]) {- content += "}";- }- if (item[4]) {- content += "}";- }- return content;- }).join("");- };-- // import a list of modules into the list- list.i = function i(modules, media, dedupe, supports, layer) {- if (typeof modules === "string") {- modules = [[null, modules, undefined]];- }- var alreadyImportedModules = {};- if (dedupe) {- for (var k = 0; k < this.length; k++) {- var id = this[k][0];- if (id != null) {- alreadyImportedModules[id] = true;- }- }- }- for (var _k = 0; _k < modules.length; _k++) {- var item = [].concat(modules[_k]);- if (dedupe && alreadyImportedModules[item[0]]) {- continue;- }- if (typeof layer !== "undefined") {- if (typeof item[5] === "undefined") {- item[5] = layer;- } else {- item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");- item[5] = layer;- }- }- if (media) {- if (!item[2]) {- item[2] = media;- } else {- item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");- item[2] = media;- }- }- if (supports) {- if (!item[4]) {- item[4] = "".concat(supports);- } else {- item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");- item[4] = supports;- }- }- list.push(item);- }- };- return list;-};--/***/ }),--/***/ 537:-/***/ ((module) => {--"use strict";---module.exports = function (item) {- var content = item[1];- var cssMapping = item[3];- if (!cssMapping) {- return content;- }- if (typeof btoa === "function") {- var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));- var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);- var sourceMapping = "/*# ".concat(data, " */");- return [content].concat([sourceMapping]).join("\n");- }- return [content].join("\n");-};--/***/ }),--/***/ 470:-/***/ ((module) => {--"use strict";---var hasOwn = Object.prototype.hasOwnProperty;-var toStr = Object.prototype.toString;-var defineProperty = Object.defineProperty;-var gOPD = Object.getOwnPropertyDescriptor;--var isArray = function isArray(arr) {- if (typeof Array.isArray === 'function') {- return Array.isArray(arr);- }-- return toStr.call(arr) === '[object Array]';-};--var isPlainObject = function isPlainObject(obj) {- if (!obj || toStr.call(obj) !== '[object Object]') {- return false;- }-- var hasOwnConstructor = hasOwn.call(obj, 'constructor');- var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');- // Not own constructor property must be Object- if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {- return false;- }-- // Own properties are enumerated firstly, so to speed up,- // if last one is own, then all properties are own.- var key;- for (key in obj) { /**/ }-- return typeof key === 'undefined' || hasOwn.call(obj, key);-};--// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target-var setProperty = function setProperty(target, options) {- if (defineProperty && options.name === '__proto__') {- defineProperty(target, options.name, {- enumerable: true,- configurable: true,- value: options.newValue,- writable: true- });- } else {- target[options.name] = options.newValue;- }-};--// Return undefined instead of __proto__ if '__proto__' is not an own property-var getProperty = function getProperty(obj, name) {- if (name === '__proto__') {- if (!hasOwn.call(obj, name)) {- return void 0;- } else if (gOPD) {- // In early versions of node, obj['__proto__'] is buggy when obj has- // __proto__ as an own property. Object.getOwnPropertyDescriptor() works.- return gOPD(obj, name).value;- }- }-- return obj[name];-};--module.exports = function extend() {- var options, name, src, copy, copyIsArray, clone;- var target = arguments[0];- var i = 1;- var length = arguments.length;- var deep = false;-- // Handle a deep copy situation- if (typeof target === 'boolean') {- deep = target;- target = arguments[1] || {};- // skip the boolean and the target- i = 2;- }- if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {- target = {};- }-- for (; i < length; ++i) {- options = arguments[i];- // Only deal with non-null/undefined values- if (options != null) {- // Extend the base object- for (name in options) {- src = getProperty(target, name);- copy = getProperty(options, name);-- // Prevent never-ending loop- if (target !== copy) {- // Recurse if we're merging plain objects or arrays- if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {- if (copyIsArray) {- copyIsArray = false;- clone = src && isArray(src) ? src : [];- } else {- clone = src && isPlainObject(src) ? src : {};- }-- // Never move original objects, clone them- setProperty(target, { name: name, newValue: extend(deep, clone, copy) });-- // Don't bring in undefined values- } else if (typeof copy !== 'undefined') {- setProperty(target, { name: name, newValue: copy });- }- }- }- }- }-- // Return the modified object- return target;-};---/***/ }),--/***/ 679:-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {--"use strict";---var reactIs = __webpack_require__(864);--/**- * Copyright 2015, Yahoo! Inc.- * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.- */-var REACT_STATICS = {- childContextTypes: true,- contextType: true,- contextTypes: true,- defaultProps: true,- displayName: true,- getDefaultProps: true,- getDerivedStateFromError: true,- getDerivedStateFromProps: true,- mixins: true,- propTypes: true,- type: true-};-var KNOWN_STATICS = {- name: true,- length: true,- prototype: true,- caller: true,- callee: true,- arguments: true,- arity: true-};-var FORWARD_REF_STATICS = {- '$$typeof': true,- render: true,- defaultProps: true,- displayName: true,- propTypes: true-};-var MEMO_STATICS = {- '$$typeof': true,- compare: true,- defaultProps: true,- displayName: true,- propTypes: true,- type: true-};-var TYPE_STATICS = {};-TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;-TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;--function getStatics(component) {- // React v16.11 and below- if (reactIs.isMemo(component)) {- return MEMO_STATICS;- } // React v16.12 and above--- return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;-}--var defineProperty = Object.defineProperty;-var getOwnPropertyNames = Object.getOwnPropertyNames;-var getOwnPropertySymbols = Object.getOwnPropertySymbols;-var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;-var getPrototypeOf = Object.getPrototypeOf;-var objectPrototype = Object.prototype;-function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {- if (typeof sourceComponent !== 'string') {- // don't hoist over string (html) components- if (objectPrototype) {- var inheritedComponent = getPrototypeOf(sourceComponent);-- if (inheritedComponent && inheritedComponent !== objectPrototype) {- hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);- }- }-- var keys = getOwnPropertyNames(sourceComponent);-- if (getOwnPropertySymbols) {- keys = keys.concat(getOwnPropertySymbols(sourceComponent));- }-- var targetStatics = getStatics(targetComponent);- var sourceStatics = getStatics(sourceComponent);-- for (var i = 0; i < keys.length; ++i) {- var key = keys[i];-- if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {- var descriptor = getOwnPropertyDescriptor(sourceComponent, key);-- try {- // Avoid failures from read-only properties- defineProperty(targetComponent, key, descriptor);- } catch (e) {}- }- }- }-- return targetComponent;-}--module.exports = hoistNonReactStatics;---/***/ }),--/***/ 139:-/***/ ((module) => {--// http://www.w3.org/TR/CSS21/grammar.html-// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027-var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;--var NEWLINE_REGEX = /\n/g;-var WHITESPACE_REGEX = /^\s*/;--// declaration-var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;-var COLON_REGEX = /^:\s*/;-var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;-var SEMICOLON_REGEX = /^[;\s]*/;--// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill-var TRIM_REGEX = /^\s+|\s+$/g;--// strings-var NEWLINE = '\n';-var FORWARD_SLASH = '/';-var ASTERISK = '*';-var EMPTY_STRING = '';--// types-var TYPE_COMMENT = 'comment';-var TYPE_DECLARATION = 'declaration';--/**- * @param {String} style- * @param {Object} [options]- * @return {Object[]}- * @throws {TypeError}- * @throws {Error}- */-module.exports = function(style, options) {- if (typeof style !== 'string') {- throw new TypeError('First argument must be a string');- }-- if (!style) return [];-- options = options || {};-- /**- * Positional.- */- var lineno = 1;- var column = 1;-- /**- * Update lineno and column based on `str`.- *- * @param {String} str- */- function updatePosition(str) {- var lines = str.match(NEWLINE_REGEX);- if (lines) lineno += lines.length;- var i = str.lastIndexOf(NEWLINE);- column = ~i ? str.length - i : column + str.length;- }-- /**- * Mark position and patch `node.position`.- *- * @return {Function}- */- function position() {- var start = { line: lineno, column: column };- return function(node) {- node.position = new Position(start);- whitespace();- return node;- };- }-- /**- * Store position information for a node.- *- * @constructor- * @property {Object} start- * @property {Object} end- * @property {undefined|String} source- */- function Position(start) {- this.start = start;- this.end = { line: lineno, column: column };- this.source = options.source;- }-- /**- * Non-enumerable source string.- */- Position.prototype.content = style;-- var errorsList = [];-- /**- * Error `msg`.- *- * @param {String} msg- * @throws {Error}- */- function error(msg) {- var err = new Error(- options.source + ':' + lineno + ':' + column + ': ' + msg- );- err.reason = msg;- err.filename = options.source;- err.line = lineno;- err.column = column;- err.source = style;-- if (options.silent) {- errorsList.push(err);- } else {- throw err;- }- }-- /**- * Match `re` and return captures.- *- * @param {RegExp} re- * @return {undefined|Array}- */- function match(re) {- var m = re.exec(style);- if (!m) return;- var str = m[0];- updatePosition(str);- style = style.slice(str.length);- return m;- }-- /**- * Parse whitespace.- */- function whitespace() {- match(WHITESPACE_REGEX);- }-- /**- * Parse comments.- *- * @param {Object[]} [rules]- * @return {Object[]}- */- function comments(rules) {- var c;- rules = rules || [];- while ((c = comment())) {- if (c !== false) {- rules.push(c);- }- }- return rules;- }-- /**- * Parse comment.- *- * @return {Object}- * @throws {Error}- */- function comment() {- var pos = position();- if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;-- var i = 2;- while (- EMPTY_STRING != style.charAt(i) &&- (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))- ) {- ++i;- }- i += 2;-- if (EMPTY_STRING === style.charAt(i - 1)) {- return error('End of comment missing');- }-- var str = style.slice(2, i - 2);- column += 2;- updatePosition(str);- style = style.slice(i);- column += 2;-- return pos({- type: TYPE_COMMENT,- comment: str- });- }-- /**- * Parse declaration.- *- * @return {Object}- * @throws {Error}- */- function declaration() {- var pos = position();-- // prop- var prop = match(PROPERTY_REGEX);- if (!prop) return;- comment();-- // :- if (!match(COLON_REGEX)) return error("property missing ':'");-- // val- var val = match(VALUE_REGEX);-- var ret = pos({- type: TYPE_DECLARATION,- property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),- value: val- ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))- : EMPTY_STRING- });-- // ;- match(SEMICOLON_REGEX);-- return ret;- }-- /**- * Parse declarations.- *- * @return {Object[]}- */- function declarations() {- var decls = [];-- comments(decls);-- // declarations- var decl;- while ((decl = declaration())) {- if (decl !== false) {- decls.push(decl);- comments(decls);- }- }-- return decls;- }-- whitespace();- return declarations();-};--/**- * Trim `str`.- *- * @param {String} str- * @return {String}- */-function trim(str) {- return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;-}---/***/ }),--/***/ 738:-/***/ ((module) => {--/*!- * Determine if an object is a Buffer- *- * @author Feross Aboukhadijeh <https://feross.org>- * @license MIT- */--module.exports = function isBuffer (obj) {- return obj != null && obj.constructor != null &&- typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)-}---/***/ }),--/***/ 660:-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {---/* **********************************************- Begin prism-core.js-********************************************** */--/// <reference lib="WebWorker"/>--var _self = (typeof window !== 'undefined')- ? window // if in browser- : (- (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope)- ? self // if in worker- : {} // if in node js- );--/**- * Prism: Lightweight, robust, elegant syntax highlighting- *- * @license MIT <https://opensource.org/licenses/MIT>- * @author Lea Verou <https://lea.verou.me>- * @namespace- * @public- */-var Prism = (function (_self) {-- // Private helper vars- var lang = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i;- var uniqueId = 0;-- // The grammar object for plaintext- var plainTextGrammar = {};--- var _ = {- /**- * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the- * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load- * additional languages or plugins yourself.- *- * By setting this value to `true`, Prism will not automatically highlight all code elements on the page.- *- * You obviously have to change this value before the automatic highlighting started. To do this, you can add an- * empty Prism object into the global scope before loading the Prism script like this:- *- * ```js- * window.Prism = window.Prism || {};- * Prism.manual = true;- * // add a new <script> to load Prism's script- * ```- *- * @default false- * @type {boolean}- * @memberof Prism- * @public- */- manual: _self.Prism && _self.Prism.manual,- /**- * By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses- * `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your- * own worker, you don't want it to do this.- *- * By setting this value to `true`, Prism will not add its own listeners to the worker.- *- * You obviously have to change this value before Prism executes. To do this, you can add an- * empty Prism object into the global scope before loading the Prism script like this:- *- * ```js- * window.Prism = window.Prism || {};- * Prism.disableWorkerMessageHandler = true;- * // Load Prism's script- * ```- *- * @default false- * @type {boolean}- * @memberof Prism- * @public- */- disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler,-- /**- * A namespace for utility methods.- *- * All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may- * change or disappear at any time.- *- * @namespace- * @memberof Prism- */- util: {- encode: function encode(tokens) {- if (tokens instanceof Token) {- return new Token(tokens.type, encode(tokens.content), tokens.alias);- } else if (Array.isArray(tokens)) {- return tokens.map(encode);- } else {- return tokens.replace(/&/g, '&').replace(/</g, '<').replace(/\u00a0/g, ' ');- }- },-- /**- * Returns the name of the type of the given value.- *- * @param {any} o- * @returns {string}- * @example- * type(null) === 'Null'- * type(undefined) === 'Undefined'- * type(123) === 'Number'- * type('foo') === 'String'- * type(true) === 'Boolean'- * type([1, 2]) === 'Array'- * type({}) === 'Object'- * type(String) === 'Function'- * type(/abc+/) === 'RegExp'- */- type: function (o) {- return Object.prototype.toString.call(o).slice(8, -1);- },-- /**- * Returns a unique number for the given object. Later calls will still return the same number.- *- * @param {Object} obj- * @returns {number}- */- objId: function (obj) {- if (!obj['__id']) {- Object.defineProperty(obj, '__id', { value: ++uniqueId });- }- return obj['__id'];- },-- /**- * Creates a deep clone of the given object.- *- * The main intended use of this function is to clone language definitions.- *- * @param {T} o- * @param {Record<number, any>} [visited]- * @returns {T}- * @template T- */- clone: function deepClone(o, visited) {- visited = visited || {};-- var clone; var id;- switch (_.util.type(o)) {- case 'Object':- id = _.util.objId(o);- if (visited[id]) {- return visited[id];- }- clone = /** @type {Record<string, any>} */ ({});- visited[id] = clone;-- for (var key in o) {- if (o.hasOwnProperty(key)) {- clone[key] = deepClone(o[key], visited);- }- }-- return /** @type {any} */ (clone);-- case 'Array':- id = _.util.objId(o);- if (visited[id]) {- return visited[id];- }- clone = [];- visited[id] = clone;-- (/** @type {Array} */(/** @type {any} */(o))).forEach(function (v, i) {- clone[i] = deepClone(v, visited);- });-- return /** @type {any} */ (clone);-- default:- return o;- }- },-- /**- * Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class.- *- * If no language is set for the element or the element is `null` or `undefined`, `none` will be returned.- *- * @param {Element} element- * @returns {string}- */- getLanguage: function (element) {- while (element) {- var m = lang.exec(element.className);- if (m) {- return m[1].toLowerCase();- }- element = element.parentElement;- }- return 'none';- },-- /**- * Sets the Prism `language-xxxx` class of the given element.- *- * @param {Element} element- * @param {string} language- * @returns {void}- */- setLanguage: function (element, language) {- // remove all `language-xxxx` classes- // (this might leave behind a leading space)- element.className = element.className.replace(RegExp(lang, 'gi'), '');-- // add the new `language-xxxx` class- // (using `classList` will automatically clean up spaces for us)- element.classList.add('language-' + language);- },-- /**- * Returns the script element that is currently executing.- *- * This does __not__ work for line script element.- *- * @returns {HTMLScriptElement | null}- */- currentScript: function () {- if (typeof document === 'undefined') {- return null;- }- if ('currentScript' in document && 1 < 2 /* hack to trip TS' flow analysis */) {- return /** @type {any} */ (document.currentScript);- }-- // IE11 workaround- // we'll get the src of the current script by parsing IE11's error stack trace- // this will not work for inline scripts-- try {- throw new Error();- } catch (err) {- // Get file src url from stack. Specifically works with the format of stack traces in IE.- // A stack will look like this:- //- // Error- // at _.util.currentScript (http://localhost/components/prism-core.js:119:5)- // at Global code (http://localhost/components/prism-core.js:606:1)-- var src = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(err.stack) || [])[1];- if (src) {- var scripts = document.getElementsByTagName('script');- for (var i in scripts) {- if (scripts[i].src == src) {- return scripts[i];- }- }- }- return null;- }- },-- /**- * Returns whether a given class is active for `element`.- *- * The class can be activated if `element` or one of its ancestors has the given class and it can be deactivated- * if `element` or one of its ancestors has the negated version of the given class. The _negated version_ of the- * given class is just the given class with a `no-` prefix.- *- * Whether the class is active is determined by the closest ancestor of `element` (where `element` itself is- * closest ancestor) that has the given class or the negated version of it. If neither `element` nor any of its- * ancestors have the given class or the negated version of it, then the default activation will be returned.- *- * In the paradoxical situation where the closest ancestor contains __both__ the given class and the negated- * version of it, the class is considered active.- *- * @param {Element} element- * @param {string} className- * @param {boolean} [defaultActivation=false]- * @returns {boolean}- */- isActive: function (element, className, defaultActivation) {- var no = 'no-' + className;-- while (element) {- var classList = element.classList;- if (classList.contains(className)) {- return true;- }- if (classList.contains(no)) {- return false;- }- element = element.parentElement;- }- return !!defaultActivation;- }- },-- /**- * This namespace contains all currently loaded languages and the some helper functions to create and modify languages.- *- * @namespace- * @memberof Prism- * @public- */- languages: {- /**- * The grammar for plain, unformatted text.- */- plain: plainTextGrammar,- plaintext: plainTextGrammar,- text: plainTextGrammar,- txt: plainTextGrammar,-- /**- * Creates a deep copy of the language with the given id and appends the given tokens.- *- * If a token in `redef` also appears in the copied language, then the existing token in the copied language- * will be overwritten at its original position.- *- * ## Best practices- *- * Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)- * doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to- * understand the language definition because, normally, the order of tokens matters in Prism grammars.- *- * Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.- * Furthermore, all non-overwriting tokens should be placed after the overwriting ones.- *- * @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.- * @param {Grammar} redef The new tokens to append.- * @returns {Grammar} The new language created.- * @public- * @example- * Prism.languages['css-with-colors'] = Prism.languages.extend('css', {- * // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token- * // at its original position- * 'comment': { ... },- * // CSS doesn't have a 'color' token, so this token will be appended- * 'color': /\b(?:red|green|blue)\b/- * });- */- extend: function (id, redef) {- var lang = _.util.clone(_.languages[id]);-- for (var key in redef) {- lang[key] = redef[key];- }-- return lang;- },-- /**- * Inserts tokens _before_ another token in a language definition or any other grammar.- *- * ## Usage- *- * This helper method makes it easy to modify existing languages. For example, the CSS language definition- * not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded- * in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the- * appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do- * this:- *- * ```js- * Prism.languages.markup.style = {- * // token- * };- * ```- *- * then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens- * before existing tokens. For the CSS example above, you would use it like this:- *- * ```js- * Prism.languages.insertBefore('markup', 'cdata', {- * 'style': {- * // token- * }- * });- * ```- *- * ## Special cases- *- * If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar- * will be ignored.- *- * This behavior can be used to insert tokens after `before`:- *- * ```js- * Prism.languages.insertBefore('markup', 'comment', {- * 'comment': Prism.languages.markup.comment,- * // tokens after 'comment'- * });- * ```- *- * ## Limitations- *- * The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object- * properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave- * differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily- * deleting properties which is necessary to insert at arbitrary positions.- *- * To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.- * Instead, it will create a new object and replace all references to the target object with the new one. This- * can be done without temporarily deleting properties, so the iteration order is well-defined.- *- * However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if- * you hold the target object in a variable, then the value of the variable will not change.- *- * ```js- * var oldMarkup = Prism.languages.markup;- * var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });- *- * assert(oldMarkup !== Prism.languages.markup);- * assert(newMarkup === Prism.languages.markup);- * ```- *- * @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the- * object to be modified.- * @param {string} before The key to insert before.- * @param {Grammar} insert An object containing the key-value pairs to be inserted.- * @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the- * object to be modified.- *- * Defaults to `Prism.languages`.- * @returns {Grammar} The new grammar object.- * @public- */- insertBefore: function (inside, before, insert, root) {- root = root || /** @type {any} */ (_.languages);- var grammar = root[inside];- /** @type {Grammar} */- var ret = {};-- for (var token in grammar) {- if (grammar.hasOwnProperty(token)) {-- if (token == before) {- for (var newToken in insert) {- if (insert.hasOwnProperty(newToken)) {- ret[newToken] = insert[newToken];- }- }- }-- // Do not insert token which also occur in insert. See #1525- if (!insert.hasOwnProperty(token)) {- ret[token] = grammar[token];- }- }- }-- var old = root[inside];- root[inside] = ret;-- // Update references in other language definitions- _.languages.DFS(_.languages, function (key, value) {- if (value === old && key != inside) {- this[key] = ret;- }- });-- return ret;- },-- // Traverse a language definition with Depth First Search- DFS: function DFS(o, callback, type, visited) {- visited = visited || {};-- var objId = _.util.objId;-- for (var i in o) {- if (o.hasOwnProperty(i)) {- callback.call(o, i, o[i], type || i);-- var property = o[i];- var propertyType = _.util.type(property);-- if (propertyType === 'Object' && !visited[objId(property)]) {- visited[objId(property)] = true;- DFS(property, callback, null, visited);- } else if (propertyType === 'Array' && !visited[objId(property)]) {- visited[objId(property)] = true;- DFS(property, callback, i, visited);- }- }- }- }- },-- plugins: {},-- /**- * This is the most high-level function in Prism’s API.- * It fetches all the elements that have a `.language-xxxx` class and then calls {@link Prism.highlightElement} on- * each one of them.- *- * This is equivalent to `Prism.highlightAllUnder(document, async, callback)`.- *- * @param {boolean} [async=false] Same as in {@link Prism.highlightAllUnder}.- * @param {HighlightCallback} [callback] Same as in {@link Prism.highlightAllUnder}.- * @memberof Prism- * @public- */- highlightAll: function (async, callback) {- _.highlightAllUnder(document, async, callback);- },-- /**- * Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls- * {@link Prism.highlightElement} on each one of them.- *- * The following hooks will be run:- * 1. `before-highlightall`- * 2. `before-all-elements-highlight`- * 3. All hooks of {@link Prism.highlightElement} for each element.- *- * @param {ParentNode} container The root element, whose descendants that have a `.language-xxxx` class will be highlighted.- * @param {boolean} [async=false] Whether each element is to be highlighted asynchronously using Web Workers.- * @param {HighlightCallback} [callback] An optional callback to be invoked on each element after its highlighting is done.- * @memberof Prism- * @public- */- highlightAllUnder: function (container, async, callback) {- var env = {- callback: callback,- container: container,- selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'- };-- _.hooks.run('before-highlightall', env);-- env.elements = Array.prototype.slice.apply(env.container.querySelectorAll(env.selector));-- _.hooks.run('before-all-elements-highlight', env);-- for (var i = 0, element; (element = env.elements[i++]);) {- _.highlightElement(element, async === true, env.callback);- }- },-- /**- * Highlights the code inside a single element.- *- * The following hooks will be run:- * 1. `before-sanity-check`- * 2. `before-highlight`- * 3. All hooks of {@link Prism.highlight}. These hooks will be run by an asynchronous worker if `async` is `true`.- * 4. `before-insert`- * 5. `after-highlight`- * 6. `complete`- *- * Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for- * the element's language.- *- * @param {Element} element The element containing the code.- * It must have a class of `language-xxxx` to be processed, where `xxxx` is a valid language identifier.- * @param {boolean} [async=false] Whether the element is to be highlighted asynchronously using Web Workers- * to improve performance and avoid blocking the UI when highlighting very large chunks of code. This option is- * [disabled by default](https://prismjs.com/faq.html#why-is-asynchronous-highlighting-disabled-by-default).- *- * Note: All language definitions required to highlight the code must be included in the main `prism.js` file for- * asynchronous highlighting to work. You can build your own bundle on the- * [Download page](https://prismjs.com/download.html).- * @param {HighlightCallback} [callback] An optional callback to be invoked after the highlighting is done.- * Mostly useful when `async` is `true`, since in that case, the highlighting is done asynchronously.- * @memberof Prism- * @public- */- highlightElement: function (element, async, callback) {- // Find language- var language = _.util.getLanguage(element);- var grammar = _.languages[language];-- // Set language on the element, if not present- _.util.setLanguage(element, language);-- // Set language on the parent, for styling- var parent = element.parentElement;- if (parent && parent.nodeName.toLowerCase() === 'pre') {- _.util.setLanguage(parent, language);- }-- var code = element.textContent;-- var env = {- element: element,- language: language,- grammar: grammar,- code: code- };-- function insertHighlightedCode(highlightedCode) {- env.highlightedCode = highlightedCode;-- _.hooks.run('before-insert', env);-- env.element.innerHTML = env.highlightedCode;-- _.hooks.run('after-highlight', env);- _.hooks.run('complete', env);- callback && callback.call(env.element);- }-- _.hooks.run('before-sanity-check', env);-- // plugins may change/add the parent/element- parent = env.element.parentElement;- if (parent && parent.nodeName.toLowerCase() === 'pre' && !parent.hasAttribute('tabindex')) {- parent.setAttribute('tabindex', '0');- }-- if (!env.code) {- _.hooks.run('complete', env);- callback && callback.call(env.element);- return;- }-- _.hooks.run('before-highlight', env);-- if (!env.grammar) {- insertHighlightedCode(_.util.encode(env.code));- return;- }-- if (async && _self.Worker) {- var worker = new Worker(_.filename);-- worker.onmessage = function (evt) {- insertHighlightedCode(evt.data);- };-- worker.postMessage(JSON.stringify({- language: env.language,- code: env.code,- immediateClose: true- }));- } else {- insertHighlightedCode(_.highlight(env.code, env.grammar, env.language));- }- },-- /**- * Low-level function, only use if you know what you’re doing. It accepts a string of text as input- * and the language definitions to use, and returns a string with the HTML produced.- *- * The following hooks will be run:- * 1. `before-tokenize`- * 2. `after-tokenize`- * 3. `wrap`: On each {@link Token}.- *- * @param {string} text A string with the code to be highlighted.- * @param {Grammar} grammar An object containing the tokens to use.- *- * Usually a language definition like `Prism.languages.markup`.- * @param {string} language The name of the language definition passed to `grammar`.- * @returns {string} The highlighted HTML.- * @memberof Prism- * @public- * @example- * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');- */- highlight: function (text, grammar, language) {- var env = {- code: text,- grammar: grammar,- language: language- };- _.hooks.run('before-tokenize', env);- if (!env.grammar) {- throw new Error('The language "' + env.language + '" has no grammar.');- }- env.tokens = _.tokenize(env.code, env.grammar);- _.hooks.run('after-tokenize', env);- return Token.stringify(_.util.encode(env.tokens), env.language);- },-- /**- * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input- * and the language definitions to use, and returns an array with the tokenized code.- *- * When the language definition includes nested tokens, the function is called recursively on each of these tokens.- *- * This method could be useful in other contexts as well, as a very crude parser.- *- * @param {string} text A string with the code to be highlighted.- * @param {Grammar} grammar An object containing the tokens to use.- *- * Usually a language definition like `Prism.languages.markup`.- * @returns {TokenStream} An array of strings and tokens, a token stream.- * @memberof Prism- * @public- * @example- * let code = `var foo = 0;`;- * let tokens = Prism.tokenize(code, Prism.languages.javascript);- * tokens.forEach(token => {- * if (token instanceof Prism.Token && token.type === 'number') {- * console.log(`Found numeric literal: ${token.content}`);- * }- * });- */- tokenize: function (text, grammar) {- var rest = grammar.rest;- if (rest) {- for (var token in rest) {- grammar[token] = rest[token];- }-- delete grammar.rest;- }-- var tokenList = new LinkedList();- addAfter(tokenList, tokenList.head, text);-- matchGrammar(text, tokenList, grammar, tokenList.head, 0);-- return toArray(tokenList);- },-- /**- * @namespace- * @memberof Prism- * @public- */- hooks: {- all: {},-- /**- * Adds the given callback to the list of callbacks for the given hook.- *- * The callback will be invoked when the hook it is registered for is run.- * Hooks are usually directly run by a highlight function but you can also run hooks yourself.- *- * One callback function can be registered to multiple hooks and the same hook multiple times.- *- * @param {string} name The name of the hook.- * @param {HookCallback} callback The callback function which is given environment variables.- * @public- */- add: function (name, callback) {- var hooks = _.hooks.all;-- hooks[name] = hooks[name] || [];-- hooks[name].push(callback);- },-- /**- * Runs a hook invoking all registered callbacks with the given environment variables.- *- * Callbacks will be invoked synchronously and in the order in which they were registered.- *- * @param {string} name The name of the hook.- * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.- * @public- */- run: function (name, env) {- var callbacks = _.hooks.all[name];-- if (!callbacks || !callbacks.length) {- return;- }-- for (var i = 0, callback; (callback = callbacks[i++]);) {- callback(env);- }- }- },-- Token: Token- };- _self.Prism = _;--- // Typescript note:- // The following can be used to import the Token type in JSDoc:- //- // @typedef {InstanceType<import("./prism-core")["Token"]>} Token-- /**- * Creates a new token.- *- * @param {string} type See {@link Token#type type}- * @param {string | TokenStream} content See {@link Token#content content}- * @param {string|string[]} [alias] The alias(es) of the token.- * @param {string} [matchedStr=""] A copy of the full string this token was created from.- * @class- * @global- * @public- */- function Token(type, content, alias, matchedStr) {- /**- * The type of the token.- *- * This is usually the key of a pattern in a {@link Grammar}.- *- * @type {string}- * @see GrammarToken- * @public- */- this.type = type;- /**- * The strings or tokens contained by this token.- *- * This will be a token stream if the pattern matched also defined an `inside` grammar.- *- * @type {string | TokenStream}- * @public- */- this.content = content;- /**- * The alias(es) of the token.- *- * @type {string|string[]}- * @see GrammarToken- * @public- */- this.alias = alias;- // Copy of the full string this token was created from- this.length = (matchedStr || '').length | 0;- }-- /**- * A token stream is an array of strings and {@link Token Token} objects.- *- * Token streams have to fulfill a few properties that are assumed by most functions (mostly internal ones) that process- * them.- *- * 1. No adjacent strings.- * 2. No empty strings.- *- * The only exception here is the token stream that only contains the empty string and nothing else.- *- * @typedef {Array<string | Token>} TokenStream- * @global- * @public- */-- /**- * Converts the given token or token stream to an HTML representation.- *- * The following hooks will be run:- * 1. `wrap`: On each {@link Token}.- *- * @param {string | Token | TokenStream} o The token or token stream to be converted.- * @param {string} language The name of current language.- * @returns {string} The HTML representation of the token or token stream.- * @memberof Token- * @static- */- Token.stringify = function stringify(o, language) {- if (typeof o == 'string') {- return o;- }- if (Array.isArray(o)) {- var s = '';- o.forEach(function (e) {- s += stringify(e, language);- });- return s;- }-- var env = {- type: o.type,- content: stringify(o.content, language),- tag: 'span',- classes: ['token', o.type],- attributes: {},- language: language- };-- var aliases = o.alias;- if (aliases) {- if (Array.isArray(aliases)) {- Array.prototype.push.apply(env.classes, aliases);- } else {- env.classes.push(aliases);- }- }-- _.hooks.run('wrap', env);-- var attributes = '';- for (var name in env.attributes) {- attributes += ' ' + name + '="' + (env.attributes[name] || '').replace(/"/g, '"') + '"';- }-- return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + attributes + '>' + env.content + '</' + env.tag + '>';- };-- /**- * @param {RegExp} pattern- * @param {number} pos- * @param {string} text- * @param {boolean} lookbehind- * @returns {RegExpExecArray | null}- */- function matchPattern(pattern, pos, text, lookbehind) {- pattern.lastIndex = pos;- var match = pattern.exec(text);- if (match && lookbehind && match[1]) {- // change the match to remove the text matched by the Prism lookbehind group- var lookbehindLength = match[1].length;- match.index += lookbehindLength;- match[0] = match[0].slice(lookbehindLength);- }- return match;- }-- /**- * @param {string} text- * @param {LinkedList<string | Token>} tokenList- * @param {any} grammar- * @param {LinkedListNode<string | Token>} startNode- * @param {number} startPos- * @param {RematchOptions} [rematch]- * @returns {void}- * @private- *- * @typedef RematchOptions- * @property {string} cause- * @property {number} reach- */- function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) {- for (var token in grammar) {- if (!grammar.hasOwnProperty(token) || !grammar[token]) {- continue;- }-- var patterns = grammar[token];- patterns = Array.isArray(patterns) ? patterns : [patterns];-- for (var j = 0; j < patterns.length; ++j) {- if (rematch && rematch.cause == token + ',' + j) {- return;- }-- var patternObj = patterns[j];- var inside = patternObj.inside;- var lookbehind = !!patternObj.lookbehind;- var greedy = !!patternObj.greedy;- var alias = patternObj.alias;-- if (greedy && !patternObj.pattern.global) {- // Without the global flag, lastIndex won't work- var flags = patternObj.pattern.toString().match(/[imsuy]*$/)[0];- patternObj.pattern = RegExp(patternObj.pattern.source, flags + 'g');- }-- /** @type {RegExp} */- var pattern = patternObj.pattern || patternObj;-- for ( // iterate the token list and keep track of the current token/string position- var currentNode = startNode.next, pos = startPos;- currentNode !== tokenList.tail;- pos += currentNode.value.length, currentNode = currentNode.next- ) {-- if (rematch && pos >= rematch.reach) {- break;- }-- var str = currentNode.value;-- if (tokenList.length > text.length) {- // Something went terribly wrong, ABORT, ABORT!- return;- }-- if (str instanceof Token) {- continue;- }-- var removeCount = 1; // this is the to parameter of removeBetween- var match;-- if (greedy) {- match = matchPattern(pattern, pos, text, lookbehind);- if (!match || match.index >= text.length) {- break;- }-- var from = match.index;- var to = match.index + match[0].length;- var p = pos;-- // find the node that contains the match- p += currentNode.value.length;- while (from >= p) {- currentNode = currentNode.next;- p += currentNode.value.length;- }- // adjust pos (and p)- p -= currentNode.value.length;- pos = p;-- // the current node is a Token, then the match starts inside another Token, which is invalid- if (currentNode.value instanceof Token) {- continue;- }-- // find the last node which is affected by this match- for (- var k = currentNode;- k !== tokenList.tail && (p < to || typeof k.value === 'string');- k = k.next- ) {- removeCount++;- p += k.value.length;- }- removeCount--;-- // replace with the new match- str = text.slice(pos, p);- match.index -= pos;- } else {- match = matchPattern(pattern, 0, str, lookbehind);- if (!match) {- continue;- }- }-- // eslint-disable-next-line no-redeclare- var from = match.index;- var matchStr = match[0];- var before = str.slice(0, from);- var after = str.slice(from + matchStr.length);-- var reach = pos + str.length;- if (rematch && reach > rematch.reach) {- rematch.reach = reach;- }-- var removeFrom = currentNode.prev;-- if (before) {- removeFrom = addAfter(tokenList, removeFrom, before);- pos += before.length;- }-- removeRange(tokenList, removeFrom, removeCount);-- var wrapped = new Token(token, inside ? _.tokenize(matchStr, inside) : matchStr, alias, matchStr);- currentNode = addAfter(tokenList, removeFrom, wrapped);-- if (after) {- addAfter(tokenList, currentNode, after);- }-- if (removeCount > 1) {- // at least one Token object was removed, so we have to do some rematching- // this can only happen if the current pattern is greedy-- /** @type {RematchOptions} */- var nestedRematch = {- cause: token + ',' + j,- reach: reach- };- matchGrammar(text, tokenList, grammar, currentNode.prev, pos, nestedRematch);-- // the reach might have been extended because of the rematching- if (rematch && nestedRematch.reach > rematch.reach) {- rematch.reach = nestedRematch.reach;- }- }- }- }- }- }-- /**- * @typedef LinkedListNode- * @property {T} value- * @property {LinkedListNode<T> | null} prev The previous node.- * @property {LinkedListNode<T> | null} next The next node.- * @template T- * @private- */-- /**- * @template T- * @private- */- function LinkedList() {- /** @type {LinkedListNode<T>} */- var head = { value: null, prev: null, next: null };- /** @type {LinkedListNode<T>} */- var tail = { value: null, prev: head, next: null };- head.next = tail;-- /** @type {LinkedListNode<T>} */- this.head = head;- /** @type {LinkedListNode<T>} */- this.tail = tail;- this.length = 0;- }-- /**- * Adds a new node with the given value to the list.- *- * @param {LinkedList<T>} list- * @param {LinkedListNode<T>} node- * @param {T} value- * @returns {LinkedListNode<T>} The added node.- * @template T- */- function addAfter(list, node, value) {- // assumes that node != list.tail && values.length >= 0- var next = node.next;-- var newNode = { value: value, prev: node, next: next };- node.next = newNode;- next.prev = newNode;- list.length++;-- return newNode;- }- /**- * Removes `count` nodes after the given node. The given node will not be removed.- *- * @param {LinkedList<T>} list- * @param {LinkedListNode<T>} node- * @param {number} count- * @template T- */- function removeRange(list, node, count) {- var next = node.next;- for (var i = 0; i < count && next !== list.tail; i++) {- next = next.next;- }- node.next = next;- next.prev = node;- list.length -= i;- }- /**- * @param {LinkedList<T>} list- * @returns {T[]}- * @template T- */- function toArray(list) {- var array = [];- var node = list.head.next;- while (node !== list.tail) {- array.push(node.value);- node = node.next;- }- return array;- }--- if (!_self.document) {- if (!_self.addEventListener) {- // in Node.js- return _;- }-- if (!_.disableWorkerMessageHandler) {- // In worker- _self.addEventListener('message', function (evt) {- var message = JSON.parse(evt.data);- var lang = message.language;- var code = message.code;- var immediateClose = message.immediateClose;-- _self.postMessage(_.highlight(code, _.languages[lang], lang));- if (immediateClose) {- _self.close();- }- }, false);- }-- return _;- }-- // Get current script and highlight- var script = _.util.currentScript();-- if (script) {- _.filename = script.src;-- if (script.hasAttribute('data-manual')) {- _.manual = true;- }- }-- function highlightAutomaticallyCallback() {- if (!_.manual) {- _.highlightAll();- }- }-- if (!_.manual) {- // If the document state is "loading", then we'll use DOMContentLoaded.- // If the document state is "interactive" and the prism.js script is deferred, then we'll also use the- // DOMContentLoaded event because there might be some plugins or languages which have also been deferred and they- // might take longer one animation frame to execute which can create a race condition where only some plugins have- // been loaded when Prism.highlightAll() is executed, depending on how fast resources are loaded.- // See https://github.com/PrismJS/prism/issues/2102- var readyState = document.readyState;- if (readyState === 'loading' || readyState === 'interactive' && script && script.defer) {- document.addEventListener('DOMContentLoaded', highlightAutomaticallyCallback);- } else {- if (window.requestAnimationFrame) {- window.requestAnimationFrame(highlightAutomaticallyCallback);- } else {- window.setTimeout(highlightAutomaticallyCallback, 16);- }- }- }-- return _;--}(_self));--if ( true && module.exports) {- module.exports = Prism;-}--// hack for components to work correctly in node.js-if (typeof __webpack_require__.g !== 'undefined') {- __webpack_require__.g.Prism = Prism;-}--// some additional documentation/types--/**- * The expansion of a simple `RegExp` literal to support additional properties.- *- * @typedef GrammarToken- * @property {RegExp} pattern The regular expression of the token.- * @property {boolean} [lookbehind=false] If `true`, then the first capturing group of `pattern` will (effectively)- * behave as a lookbehind group meaning that the captured text will not be part of the matched text of the new token.- * @property {boolean} [greedy=false] Whether the token is greedy.- * @property {string|string[]} [alias] An optional alias or list of aliases.- * @property {Grammar} [inside] The nested grammar of this token.- *- * The `inside` grammar will be used to tokenize the text value of each token of this kind.- *- * This can be used to make nested and even recursive language definitions.- *- * Note: This can cause infinite recursion. Be careful when you embed different languages or even the same language into- * each another.- * @global- * @public- */--/**- * @typedef Grammar- * @type {Object<string, RegExp | GrammarToken | Array<RegExp | GrammarToken>>}- * @property {Grammar} [rest] An optional grammar object that will be appended to this grammar.- * @global- * @public- */--/**- * A function which will invoked after an element was successfully highlighted.- *- * @callback HighlightCallback- * @param {Element} element The element successfully highlighted.- * @returns {void}- * @global- * @public- */--/**- * @callback HookCallback- * @param {Object<string, any>} env The environment variables of the hook.- * @returns {void}- * @global- * @public- */---/* **********************************************- Begin prism-markup.js-********************************************** */--Prism.languages.markup = {- 'comment': {- pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,- greedy: true- },- 'prolog': {- pattern: /<\?[\s\S]+?\?>/,- greedy: true- },- 'doctype': {- // https://www.w3.org/TR/xml/#NT-doctypedecl- pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,- greedy: true,- inside: {- 'internal-subset': {- pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,- lookbehind: true,- greedy: true,- inside: null // see below- },- 'string': {- pattern: /"[^"]*"|'[^']*'/,- greedy: true- },- 'punctuation': /^<!|>$|[[\]]/,- 'doctype-tag': /^DOCTYPE/i,- 'name': /[^\s<>'"]+/- }- },- 'cdata': {- pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,- greedy: true- },- 'tag': {- pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,- greedy: true,- inside: {- 'tag': {- pattern: /^<\/?[^\s>\/]+/,- inside: {- 'punctuation': /^<\/?/,- 'namespace': /^[^\s>\/:]+:/- }- },- 'special-attr': [],- 'attr-value': {- pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,- inside: {- 'punctuation': [- {- pattern: /^=/,- alias: 'attr-equals'- },- {- pattern: /^(\s*)["']|["']$/,- lookbehind: true- }- ]- }- },- 'punctuation': /\/?>/,- 'attr-name': {- pattern: /[^\s>\/]+/,- inside: {- 'namespace': /^[^\s>\/:]+:/- }- }-- }- },- 'entity': [- {- pattern: /&[\da-z]{1,8};/i,- alias: 'named-entity'- },- /&#x?[\da-f]{1,8};/i- ]-};--Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] =- Prism.languages.markup['entity'];-Prism.languages.markup['doctype'].inside['internal-subset'].inside = Prism.languages.markup;--// Plugin to make entity title show the real entity, idea by Roman Komarov-Prism.hooks.add('wrap', function (env) {-- if (env.type === 'entity') {- env.attributes['title'] = env.content.replace(/&/, '&');- }-});--Object.defineProperty(Prism.languages.markup.tag, 'addInlined', {- /**- * Adds an inlined language to markup.- *- * An example of an inlined language is CSS with `<style>` tags.- *- * @param {string} tagName The name of the tag that contains the inlined language. This name will be treated as- * case insensitive.- * @param {string} lang The language key.- * @example- * addInlined('style', 'css');- */- value: function addInlined(tagName, lang) {- var includedCdataInside = {};- includedCdataInside['language-' + lang] = {- pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,- lookbehind: true,- inside: Prism.languages[lang]- };- includedCdataInside['cdata'] = /^<!\[CDATA\[|\]\]>$/i;-- var inside = {- 'included-cdata': {- pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,- inside: includedCdataInside- }- };- inside['language-' + lang] = {- pattern: /[\s\S]+/,- inside: Prism.languages[lang]- };-- var def = {};- def[tagName] = {- pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function () { return tagName; }), 'i'),- lookbehind: true,- greedy: true,- inside: inside- };-- Prism.languages.insertBefore('markup', 'cdata', def);- }-});-Object.defineProperty(Prism.languages.markup.tag, 'addAttribute', {- /**- * Adds an pattern to highlight languages embedded in HTML attributes.- *- * An example of an inlined language is CSS with `style` attributes.- *- * @param {string} attrName The name of the tag that contains the inlined language. This name will be treated as- * case insensitive.- * @param {string} lang The language key.- * @example- * addAttribute('style', 'css');- */- value: function (attrName, lang) {- Prism.languages.markup.tag.inside['special-attr'].push({- pattern: RegExp(- /(^|["'\s])/.source + '(?:' + attrName + ')' + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,- 'i'- ),- lookbehind: true,- inside: {- 'attr-name': /^[^\s=]+/,- 'attr-value': {- pattern: /=[\s\S]+/,- inside: {- 'value': {- pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,- lookbehind: true,- alias: [lang, 'language-' + lang],- inside: Prism.languages[lang]- },- 'punctuation': [- {- pattern: /^=/,- alias: 'attr-equals'- },- /"|'/- ]- }- }- }- });- }-});--Prism.languages.html = Prism.languages.markup;-Prism.languages.mathml = Prism.languages.markup;-Prism.languages.svg = Prism.languages.markup;--Prism.languages.xml = Prism.languages.extend('markup', {});-Prism.languages.ssml = Prism.languages.xml;-Prism.languages.atom = Prism.languages.xml;-Prism.languages.rss = Prism.languages.xml;---/* **********************************************- Begin prism-css.js-********************************************** */--(function (Prism) {-- var string = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;-- Prism.languages.css = {- 'comment': /\/\*[\s\S]*?\*\//,- 'atrule': {- pattern: RegExp('@[\\w-](?:' + /[^;{\s"']|\s+(?!\s)/.source + '|' + string.source + ')*?' + /(?:;|(?=\s*\{))/.source),- inside: {- 'rule': /^@[\w-]+/,- 'selector-function-argument': {- pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,- lookbehind: true,- alias: 'selector'- },- 'keyword': {- pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,- lookbehind: true- }- // See rest below- }- },- 'url': {- // https://drafts.csswg.org/css-values-3/#urls- pattern: RegExp('\\burl\\((?:' + string.source + '|' + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ')\\)', 'i'),- greedy: true,- inside: {- 'function': /^url/i,- 'punctuation': /^\(|\)$/,- 'string': {- pattern: RegExp('^' + string.source + '$'),- alias: 'url'- }- }- },- 'selector': {- pattern: RegExp('(^|[{}\\s])[^{}\\s](?:[^{};"\'\\s]|\\s+(?![\\s{])|' + string.source + ')*(?=\\s*\\{)'),- lookbehind: true- },- 'string': {- pattern: string,- greedy: true- },- 'property': {- pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,- lookbehind: true- },- 'important': /!important\b/i,- 'function': {- pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,- lookbehind: true- },- 'punctuation': /[(){};:,]/- };-- Prism.languages.css['atrule'].inside.rest = Prism.languages.css;-- var markup = Prism.languages.markup;- if (markup) {- markup.tag.addInlined('style', 'css');- markup.tag.addAttribute('style', 'css');- }--}(Prism));---/* **********************************************- Begin prism-clike.js-********************************************** */--Prism.languages.clike = {- 'comment': [- {- pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,- lookbehind: true,- greedy: true- },- {- pattern: /(^|[^\\:])\/\/.*/,- lookbehind: true,- greedy: true- }- ],- 'string': {- pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,- greedy: true- },- 'class-name': {- pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,- lookbehind: true,- inside: {- 'punctuation': /[.\\]/- }- },- 'keyword': /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,- 'boolean': /\b(?:false|true)\b/,- 'function': /\b\w+(?=\()/,- 'number': /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,- 'operator': /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,- 'punctuation': /[{}[\];(),.:]/-};---/* **********************************************- Begin prism-javascript.js-********************************************** */--Prism.languages.javascript = Prism.languages.extend('clike', {- 'class-name': [- Prism.languages.clike['class-name'],- {- pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,- lookbehind: true- }- ],- 'keyword': [- {- pattern: /((?:^|\})\s*)catch\b/,- lookbehind: true- },- {- pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,- lookbehind: true- },- ],- // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)- 'function': /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,- 'number': {- pattern: RegExp(- /(^|[^\w$])/.source +- '(?:' +- (- // constant- /NaN|Infinity/.source +- '|' +- // binary integer- /0[bB][01]+(?:_[01]+)*n?/.source +- '|' +- // octal integer- /0[oO][0-7]+(?:_[0-7]+)*n?/.source +- '|' +- // hexadecimal integer- /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source +- '|' +- // decimal bigint- /\d+(?:_\d+)*n/.source +- '|' +- // decimal number (integer or float) but no bigint- /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source- ) +- ')' +- /(?![\w$])/.source- ),- lookbehind: true- },- 'operator': /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/-});--Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;--Prism.languages.insertBefore('javascript', 'keyword', {- 'regex': {- pattern: RegExp(- // lookbehind- // eslint-disable-next-line regexp/no-dupe-characters-character-class- /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source +- // Regex pattern:- // There are 2 regex patterns here. The RegExp set notation proposal added support for nested character- // classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible- // with the only syntax, so we have to define 2 different regex patterns.- /\//.source +- '(?:' +- /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source +- '|' +- // `v` flag syntax. This supports 3 levels of nested character classes.- /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source +- ')' +- // lookahead- /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source- ),- lookbehind: true,- greedy: true,- inside: {- 'regex-source': {- pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,- lookbehind: true,- alias: 'language-regex',- inside: Prism.languages.regex- },- 'regex-delimiter': /^\/|\/$/,- 'regex-flags': /^[a-z]+$/,- }- },- // This must be declared before keyword because we use "function" inside the look-forward- 'function-variable': {- pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,- alias: 'function'- },- 'parameter': [- {- pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,- lookbehind: true,- inside: Prism.languages.javascript- },- {- pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,- lookbehind: true,- inside: Prism.languages.javascript- },- {- pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,- lookbehind: true,- inside: Prism.languages.javascript- },- {- pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,- lookbehind: true,- inside: Prism.languages.javascript- }- ],- 'constant': /\b[A-Z](?:[A-Z_]|\dx?)*\b/-});--Prism.languages.insertBefore('javascript', 'string', {- 'hashbang': {- pattern: /^#!.*/,- greedy: true,- alias: 'comment'- },- 'template-string': {- pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,- greedy: true,- inside: {- 'template-punctuation': {- pattern: /^`|`$/,- alias: 'string'- },- 'interpolation': {- pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,- lookbehind: true,- inside: {- 'interpolation-punctuation': {- pattern: /^\$\{|\}$/,- alias: 'punctuation'- },- rest: Prism.languages.javascript- }- },- 'string': /[\s\S]+/- }- },- 'string-property': {- pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,- lookbehind: true,- greedy: true,- alias: 'property'- }-});--Prism.languages.insertBefore('javascript', 'operator', {- 'literal-property': {- pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,- lookbehind: true,- alias: 'property'- },-});--if (Prism.languages.markup) {- Prism.languages.markup.tag.addInlined('script', 'javascript');-- // add attribute support for all DOM events.- // https://developer.mozilla.org/en-US/docs/Web/Events#Standard_events- Prism.languages.markup.tag.addAttribute(- /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,- 'javascript'- );-}--Prism.languages.js = Prism.languages.javascript;---/* **********************************************- Begin prism-file-highlight.js-********************************************** */--(function () {-- if (typeof Prism === 'undefined' || typeof document === 'undefined') {- return;- }-- // https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill- if (!Element.prototype.matches) {- Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;- }-- var LOADING_MESSAGE = 'Loading…';- var FAILURE_MESSAGE = function (status, message) {- return '✖ Error ' + status + ' while fetching file: ' + message;- };- var FAILURE_EMPTY_MESSAGE = '✖ Error: File does not exist or is empty';-- var EXTENSIONS = {- 'js': 'javascript',- 'py': 'python',- 'rb': 'ruby',- 'ps1': 'powershell',- 'psm1': 'powershell',- 'sh': 'bash',- 'bat': 'batch',- 'h': 'c',- 'tex': 'latex'- };-- var STATUS_ATTR = 'data-src-status';- var STATUS_LOADING = 'loading';- var STATUS_LOADED = 'loaded';- var STATUS_FAILED = 'failed';-- var SELECTOR = 'pre[data-src]:not([' + STATUS_ATTR + '="' + STATUS_LOADED + '"])'- + ':not([' + STATUS_ATTR + '="' + STATUS_LOADING + '"])';-- /**- * Loads the given file.- *- * @param {string} src The URL or path of the source file to load.- * @param {(result: string) => void} success- * @param {(reason: string) => void} error- */- function loadFile(src, success, error) {- var xhr = new XMLHttpRequest();- xhr.open('GET', src, true);- xhr.onreadystatechange = function () {- if (xhr.readyState == 4) {- if (xhr.status < 400 && xhr.responseText) {- success(xhr.responseText);- } else {- if (xhr.status >= 400) {- error(FAILURE_MESSAGE(xhr.status, xhr.statusText));- } else {- error(FAILURE_EMPTY_MESSAGE);- }- }- }- };- xhr.send(null);- }-- /**- * Parses the given range.- *- * This returns a range with inclusive ends.- *- * @param {string | null | undefined} range- * @returns {[number, number | undefined] | undefined}- */- function parseRange(range) {- var m = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(range || '');- if (m) {- var start = Number(m[1]);- var comma = m[2];- var end = m[3];-- if (!comma) {- return [start, start];- }- if (!end) {- return [start, undefined];- }- return [start, Number(end)];- }- return undefined;- }-- Prism.hooks.add('before-highlightall', function (env) {- env.selector += ', ' + SELECTOR;- });-- Prism.hooks.add('before-sanity-check', function (env) {- var pre = /** @type {HTMLPreElement} */ (env.element);- if (pre.matches(SELECTOR)) {- env.code = ''; // fast-path the whole thing and go to complete-- pre.setAttribute(STATUS_ATTR, STATUS_LOADING); // mark as loading-- // add code element with loading message- var code = pre.appendChild(document.createElement('CODE'));- code.textContent = LOADING_MESSAGE;-- var src = pre.getAttribute('data-src');-- var language = env.language;- if (language === 'none') {- // the language might be 'none' because there is no language set;- // in this case, we want to use the extension as the language- var extension = (/\.(\w+)$/.exec(src) || [, 'none'])[1];- language = EXTENSIONS[extension] || extension;- }-- // set language classes- Prism.util.setLanguage(code, language);- Prism.util.setLanguage(pre, language);-- // preload the language- var autoloader = Prism.plugins.autoloader;- if (autoloader) {- autoloader.loadLanguages(language);- }-- // load file- loadFile(- src,- function (text) {- // mark as loaded- pre.setAttribute(STATUS_ATTR, STATUS_LOADED);-- // handle data-range- var range = parseRange(pre.getAttribute('data-range'));- if (range) {- var lines = text.split(/\r\n?|\n/g);-- // the range is one-based and inclusive on both ends- var start = range[0];- var end = range[1] == null ? lines.length : range[1];-- if (start < 0) { start += lines.length; }- start = Math.max(0, Math.min(start - 1, lines.length));- if (end < 0) { end += lines.length; }- end = Math.max(0, Math.min(end, lines.length));-- text = lines.slice(start, end).join('\n');-- // add data-start for line numbers- if (!pre.hasAttribute('data-start')) {- pre.setAttribute('data-start', String(start + 1));- }- }-- // highlight code- code.textContent = text;- Prism.highlightElement(code);- },- function (error) {- // mark as failed- pre.setAttribute(STATUS_ATTR, STATUS_FAILED);-- code.textContent = error;- }- );- }- });-- Prism.plugins.fileHighlight = {- /**- * Executes the File Highlight plugin for all matching `pre` elements under the given container.- *- * Note: Elements which are already loaded or currently loading will not be touched by this method.- *- * @param {ParentNode} [container=document]- */- highlight: function highlight(container) {- var elements = (container || document).querySelectorAll(SELECTOR);-- for (var i = 0, element; (element = elements[i++]);) {- Prism.highlightElement(element);- }- }- };-- var logged = false;- /** @deprecated Use `Prism.plugins.fileHighlight.highlight` instead. */- Prism.fileHighlight = function () {- if (!logged) {- console.warn('Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead.');- logged = true;- }- Prism.plugins.fileHighlight.highlight.apply(this, arguments);- };--}());---/***/ }),--/***/ 703:-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {--"use strict";-/**- * Copyright (c) 2013-present, Facebook, Inc.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- */----var ReactPropTypesSecret = __webpack_require__(414);--function emptyFunction() {}-function emptyFunctionWithReset() {}-emptyFunctionWithReset.resetWarningCache = emptyFunction;--module.exports = function() {- function shim(props, propName, componentName, location, propFullName, secret) {- if (secret === ReactPropTypesSecret) {- // It is still safe when called from React.- return;- }- var err = new Error(- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +- 'Use PropTypes.checkPropTypes() to call them. ' +- 'Read more at http://fb.me/use-check-prop-types'- );- err.name = 'Invariant Violation';- throw err;- };- shim.isRequired = shim;- function getShim() {- return shim;- };- // Important!- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.- var ReactPropTypes = {- array: shim,- bigint: shim,- bool: shim,- func: shim,- number: shim,- object: shim,- string: shim,- symbol: shim,-- any: shim,- arrayOf: getShim,- element: shim,- elementType: shim,- instanceOf: getShim,- node: shim,- objectOf: getShim,- oneOf: getShim,- oneOfType: getShim,- shape: getShim,- exact: getShim,-- checkPropTypes: emptyFunctionWithReset,- resetWarningCache: emptyFunction- };-- ReactPropTypes.PropTypes = ReactPropTypes;-- return ReactPropTypes;-};---/***/ }),--/***/ 697:-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {--/**- * Copyright (c) 2013-present, Facebook, Inc.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- */--if (false) { var throwOnDirectAccess, ReactIs; } else {- // By explicitly using `prop-types` you are opting into new production behavior.- // http://fb.me/prop-types-in-prod- module.exports = __webpack_require__(703)();-}---/***/ }),--/***/ 414:-/***/ ((module) => {--"use strict";-/**- * Copyright (c) 2013-present, Facebook, Inc.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- */----var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';--module.exports = ReactPropTypesSecret;---/***/ }),--/***/ 448:-/***/ ((__unused_webpack_module, exports, __webpack_require__) => {--"use strict";-/**- * @license React- * react-dom.production.min.js- *- * Copyright (c) Facebook, Inc. and its affiliates.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- */-/*- Modernizr 3.0.0pre (Custom Build) | MIT-*/-var aa=__webpack_require__(294),ca=__webpack_require__(840);function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var da=new Set,ea={};function fa(a,b){ha(a,b);ha(a+"Capture",b)}-function ha(a,b){ea[a]=b;for(a=0;a<b.length;a++)da.add(b[a])}-var ia=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),ja=Object.prototype.hasOwnProperty,ka=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,la=-{},ma={};function oa(a){if(ja.call(ma,a))return!0;if(ja.call(la,a))return!1;if(ka.test(a))return ma[a]=!0;la[a]=!0;return!1}function pa(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}-function qa(a,b,c,d){if(null===b||"undefined"===typeof b||pa(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};-"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});-["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});-["checked","multiple","muted","selected"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}-"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(ra,-sa);z[b]=new v(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});-z.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});-function ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1])qa(b,c,e,d)&&(c=null),d||null===e?oa(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c)))}-var ua=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,va=Symbol.for("react.element"),wa=Symbol.for("react.portal"),ya=Symbol.for("react.fragment"),za=Symbol.for("react.strict_mode"),Aa=Symbol.for("react.profiler"),Ba=Symbol.for("react.provider"),Ca=Symbol.for("react.context"),Da=Symbol.for("react.forward_ref"),Ea=Symbol.for("react.suspense"),Fa=Symbol.for("react.suspense_list"),Ga=Symbol.for("react.memo"),Ha=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");-var Ia=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var Ja=Symbol.iterator;function Ka(a){if(null===a||"object"!==typeof a)return null;a=Ja&&a[Ja]||a["@@iterator"];return"function"===typeof a?a:null}var A=Object.assign,La;function Ma(a){if(void 0===La)try{throw Error();}catch(c){var b=c.stack.trim().match(/\n( *(at )?)/);La=b&&b[1]||""}return"\n"+La+a}var Na=!1;-function Oa(a,b){if(!a||Na)return"";Na=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,"props",{set:function(){throw Error();}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(l){var d=l}Reflect.construct(a,[],b)}else{try{b.call()}catch(l){d=l}a.call(b.prototype)}else{try{throw Error();}catch(l){d=l}a()}}catch(l){if(l&&d&&"string"===typeof l.stack){for(var e=l.stack.split("\n"),-f=d.stack.split("\n"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h]){var k="\n"+e[g].replace(" at new "," at ");a.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?Ma(a):""}-function Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return""}}-function Qa(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ya:return"Fragment";case wa:return"Portal";case Aa:return"Profiler";case za:return"StrictMode";case Ea:return"Suspense";case Fa:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||"Context")+".Consumer";case Ba:return(a._context.displayName||"Context")+".Provider";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||-b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||"Memo";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}-function Ra(a){var b=a.type;switch(a.tag){case 24:return"Cache";case 9:return(b.displayName||"Context")+".Consumer";case 10:return(b._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=b.render,a=a.displayName||a.name||"",b.displayName||(""!==a?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return b;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa(b);case 8:return b===za?"StrictMode":"Mode";case 22:return"Offscreen";-case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof b)return b.displayName||b.name||null;if("string"===typeof b)return b}return null}function Sa(a){switch(typeof a){case "boolean":case "number":case "string":case "undefined":return a;case "object":return a;default:return""}}-function Ta(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}-function Ua(a){var b=Ta(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=-null;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Ta(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}-function Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,"checked",b,!1)}-function bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?cb(a,b.type,c):b.hasOwnProperty("defaultValue")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}-function db(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}-function cb(a,b,c){if("number"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}var eb=Array.isArray;-function fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+Sa(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}-function gb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(p(91));return A({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function hb(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(p(92));if(eb(c)){if(1<c.length)throw Error(p(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:Sa(c)}}-function ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}function kb(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}-function lb(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?kb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}-var mb,nb=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else{mb=mb||document.createElement("div");mb.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});-function ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}-var pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,-zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=["Webkit","ms","Moz","O"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(""+b).trim():b+"px"}-function sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=rb(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});-function ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if("object"!==typeof b.dangerouslySetInnerHTML||!("__html"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(p(62));}}-function vb(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;-function Bb(a){if(a=Cb(a)){if("function"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a<b.length;a++)Bb(b[a])}}function Gb(a,b){return a(b)}function Hb(){}var Ib=!1;function Jb(a,b,c){if(Ib)return a(b,c);Ib=!0;try{return Gb(a,b,c)}finally{if(Ib=!1,null!==zb||null!==Ab)Hb(),Fb()}}-function Kb(a,b){var c=a.stateNode;if(null===c)return null;var d=Db(c);if(null===d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==-typeof c)throw Error(p(231,b,typeof c));return c}var Lb=!1;if(ia)try{var Mb={};Object.defineProperty(Mb,"passive",{get:function(){Lb=!0}});window.addEventListener("test",Mb,Mb);window.removeEventListener("test",Mb,Mb)}catch(a){Lb=!1}function Nb(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(m){this.onError(m)}}var Ob=!1,Pb=null,Qb=!1,Rb=null,Sb={onError:function(a){Ob=!0;Pb=a}};function Tb(a,b,c,d,e,f,g,h,k){Ob=!1;Pb=null;Nb.apply(Sb,arguments)}-function Ub(a,b,c,d,e,f,g,h,k){Tb.apply(this,arguments);if(Ob){if(Ob){var l=Pb;Ob=!1;Pb=null}else throw Error(p(198));Qb||(Qb=!0,Rb=l)}}function Vb(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&4098)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function Wb(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function Xb(a){if(Vb(a)!==a)throw Error(p(188));}-function Yb(a){var b=a.alternate;if(!b){b=Vb(a);if(null===b)throw Error(p(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return Xb(e),a;if(f===d)return Xb(e),b;f=f.sibling}throw Error(p(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===-c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(p(189));}}if(c.alternate!==d)throw Error(p(190));}if(3!==c.tag)throw Error(p(188));return c.stateNode.current===c?a:b}function Zb(a){a=Yb(a);return null!==a?$b(a):null}function $b(a){if(5===a.tag||6===a.tag)return a;for(a=a.child;null!==a;){var b=$b(a);if(null!==b)return b;a=a.sibling}return null}-var ac=ca.unstable_scheduleCallback,bc=ca.unstable_cancelCallback,cc=ca.unstable_shouldYield,dc=ca.unstable_requestPaint,B=ca.unstable_now,ec=ca.unstable_getCurrentPriorityLevel,fc=ca.unstable_ImmediatePriority,gc=ca.unstable_UserBlockingPriority,hc=ca.unstable_NormalPriority,ic=ca.unstable_LowPriority,jc=ca.unstable_IdlePriority,kc=null,lc=null;function mc(a){if(lc&&"function"===typeof lc.onCommitFiberRoot)try{lc.onCommitFiberRoot(kc,a,void 0,128===(a.current.flags&128))}catch(b){}}-var oc=Math.clz32?Math.clz32:nc,pc=Math.log,qc=Math.LN2;function nc(a){a>>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;-function tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;-default:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-oc(b),e=1<<c,d|=a[c],b&=~e;return d}-function vc(a,b){switch(a){case 1:case 2:case 4:return b+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return b+5E3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}-function wc(a,b){for(var c=a.suspendedLanes,d=a.pingedLanes,e=a.expirationTimes,f=a.pendingLanes;0<f;){var g=31-oc(f),h=1<<g,k=e[g];if(-1===k){if(0===(h&c)||0!==(h&d))e[g]=vc(h,b)}else k<=b&&(a.expiredLanes|=h);f&=~h}}function xc(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function yc(){var a=rc;rc<<=1;0===(rc&4194240)&&(rc=64);return a}function zc(a){for(var b=[],c=0;31>c;c++)b.push(a);return b}-function Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0<c;){var e=31-oc(c),f=1<<e;b[e]=0;d[e]=-1;a[e]=-1;c&=~f}}-function Cc(a,b){var c=a.entangledLanes|=b;for(a=a.entanglements;c;){var d=31-oc(c),e=1<<d;e&b|a[d]&b&&(a[d]|=b);c&=~e}}var C=0;function Dc(a){a&=-a;return 1<a?4<a?0!==(a&268435455)?16:536870912:4:1}var Ec,Fc,Gc,Hc,Ic,Jc=!1,Kc=[],Lc=null,Mc=null,Nc=null,Oc=new Map,Pc=new Map,Qc=[],Rc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");-function Sc(a,b){switch(a){case "focusin":case "focusout":Lc=null;break;case "dragenter":case "dragleave":Mc=null;break;case "mouseover":case "mouseout":Nc=null;break;case "pointerover":case "pointerout":Oc.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":Pc.delete(b.pointerId)}}-function Tc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a={blockedOn:b,domEventName:c,eventSystemFlags:d,nativeEvent:f,targetContainers:[e]},null!==b&&(b=Cb(b),null!==b&&Fc(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a}-function Uc(a,b,c,d,e){switch(b){case "focusin":return Lc=Tc(Lc,a,b,c,d,e),!0;case "dragenter":return Mc=Tc(Mc,a,b,c,d,e),!0;case "mouseover":return Nc=Tc(Nc,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;Oc.set(f,Tc(Oc.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,Pc.set(f,Tc(Pc.get(f)||null,a,b,c,d,e)),!0}return!1}-function Vc(a){var b=Wc(a.target);if(null!==b){var c=Vb(b);if(null!==c)if(b=c.tag,13===b){if(b=Wb(c),null!==b){a.blockedOn=b;Ic(a.priority,function(){Gc(c)});return}}else if(3===b&&c.stateNode.current.memoizedState.isDehydrated){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}-function Xc(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=Yc(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null===c){c=a.nativeEvent;var d=new c.constructor(c.type,c);wb=d;c.target.dispatchEvent(d);wb=null}else return b=Cb(c),null!==b&&Fc(b),a.blockedOn=c,!1;b.shift()}return!0}function Zc(a,b,c){Xc(a)&&c.delete(b)}function $c(){Jc=!1;null!==Lc&&Xc(Lc)&&(Lc=null);null!==Mc&&Xc(Mc)&&(Mc=null);null!==Nc&&Xc(Nc)&&(Nc=null);Oc.forEach(Zc);Pc.forEach(Zc)}-function ad(a,b){a.blockedOn===b&&(a.blockedOn=null,Jc||(Jc=!0,ca.unstable_scheduleCallback(ca.unstable_NormalPriority,$c)))}-function bd(a){function b(b){return ad(b,a)}if(0<Kc.length){ad(Kc[0],a);for(var c=1;c<Kc.length;c++){var d=Kc[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==Lc&&ad(Lc,a);null!==Mc&&ad(Mc,a);null!==Nc&&ad(Nc,a);Oc.forEach(b);Pc.forEach(b);for(c=0;c<Qc.length;c++)d=Qc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<Qc.length&&(c=Qc[0],null===c.blockedOn);)Vc(c),null===c.blockedOn&&Qc.shift()}var cd=ua.ReactCurrentBatchConfig,dd=!0;-function ed(a,b,c,d){var e=C,f=cd.transition;cd.transition=null;try{C=1,fd(a,b,c,d)}finally{C=e,cd.transition=f}}function gd(a,b,c,d){var e=C,f=cd.transition;cd.transition=null;try{C=4,fd(a,b,c,d)}finally{C=e,cd.transition=f}}-function fd(a,b,c,d){if(dd){var e=Yc(a,b,c,d);if(null===e)hd(a,b,d,id,c),Sc(a,d);else if(Uc(e,a,b,c,d))d.stopPropagation();else if(Sc(a,d),b&4&&-1<Rc.indexOf(a)){for(;null!==e;){var f=Cb(e);null!==f&&Ec(f);f=Yc(a,b,c,d);null===f&&hd(a,b,d,id,c);if(f===e)break;e=f}null!==e&&d.stopPropagation()}else hd(a,b,d,null,c)}}var id=null;-function Yc(a,b,c,d){id=null;a=xb(d);a=Wc(a);if(null!==a)if(b=Vb(a),null===b)a=null;else if(c=b.tag,13===c){a=Wb(b);if(null!==a)return a;a=null}else if(3===c){if(b.stateNode.current.memoizedState.isDehydrated)return 3===b.tag?b.stateNode.containerInfo:null;a=null}else b!==a&&(a=null);id=a;return null}-function jd(a){switch(a){case "cancel":case "click":case "close":case "contextmenu":case "copy":case "cut":case "auxclick":case "dblclick":case "dragend":case "dragstart":case "drop":case "focusin":case "focusout":case "input":case "invalid":case "keydown":case "keypress":case "keyup":case "mousedown":case "mouseup":case "paste":case "pause":case "play":case "pointercancel":case "pointerdown":case "pointerup":case "ratechange":case "reset":case "resize":case "seeked":case "submit":case "touchcancel":case "touchend":case "touchstart":case "volumechange":case "change":case "selectionchange":case "textInput":case "compositionstart":case "compositionend":case "compositionupdate":case "beforeblur":case "afterblur":case "beforeinput":case "blur":case "fullscreenchange":case "focus":case "hashchange":case "popstate":case "select":case "selectstart":return 1;case "drag":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "mousemove":case "mouseout":case "mouseover":case "pointermove":case "pointerout":case "pointerover":case "scroll":case "toggle":case "touchmove":case "wheel":case "mouseenter":case "mouseleave":case "pointerenter":case "pointerleave":return 4;-case "message":switch(ec()){case fc:return 1;case gc:return 4;case hc:case ic:return 16;case jc:return 536870912;default:return 16}default:return 16}}var kd=null,ld=null,md=null;function nd(){if(md)return md;var a,b=ld,c=b.length,d,e="value"in kd?kd.value:kd.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return md=e.slice(a,1<d?1-d:void 0)}-function od(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function pd(){return!0}function qd(){return!1}-function rd(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?pd:qd;this.isPropagationStopped=qd;return this}A(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&-(a.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd});return b}-var sd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},td=rd(sd),ud=A({},sd,{view:0,detail:0}),vd=rd(ud),wd,xd,yd,Ad=A({},ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in-a)return a.movementX;a!==yd&&(yd&&"mousemove"===a.type?(wd=a.screenX-yd.screenX,xd=a.screenY-yd.screenY):xd=wd=0,yd=a);return wd},movementY:function(a){return"movementY"in a?a.movementY:xd}}),Bd=rd(Ad),Cd=A({},Ad,{dataTransfer:0}),Dd=rd(Cd),Ed=A({},ud,{relatedTarget:0}),Fd=rd(Ed),Gd=A({},sd,{animationName:0,elapsedTime:0,pseudoElement:0}),Hd=rd(Gd),Id=A({},sd,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Jd=rd(Id),Kd=A({},sd,{data:0}),Ld=rd(Kd),Md={Esc:"Escape",-Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",-119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Od={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pd(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Od[a])?!!b[a]:!1}function zd(){return Pd}-var Qd=A({},ud,{key:function(a){if(a.key){var b=Md[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=od(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Nd[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(a){return"keypress"===a.type?od(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===-a.type?od(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),Rd=rd(Qd),Sd=A({},Ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=rd(Sd),Ud=A({},ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd}),Vd=rd(Ud),Wd=A({},sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd=rd(Wd),Yd=A({},Ad,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},-deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd=rd(Yd),$d=[9,13,27,32],ae=ia&&"CompositionEvent"in window,be=null;ia&&"documentMode"in document&&(be=document.documentMode);var ce=ia&&"TextEvent"in window&&!be,de=ia&&(!ae||be&&8<be&&11>=be),ee=String.fromCharCode(32),fe=!1;-function ge(a,b){switch(a){case "keyup":return-1!==$d.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return!0;default:return!1}}function he(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case "compositionend":return he(b);case "keypress":if(32!==b.which)return null;fe=!0;return ee;case "textInput":return a=b.data,a===ee&&fe?null:a;default:return null}}-function ke(a,b){if(ie)return"compositionend"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return de&&"ko"!==b.locale?null:b.data;default:return null}}-var le={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function me(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!le[a.type]:"textarea"===b?!0:!1}function ne(a,b,c,d){Eb(d);b=oe(b,"onChange");0<b.length&&(c=new td("onChange","change",null,c,d),a.push({event:c,listeners:b}))}var pe=null,qe=null;function re(a){se(a,0)}function te(a){var b=ue(a);if(Wa(b))return a}-function ve(a,b){if("change"===a)return b}var we=!1;if(ia){var xe;if(ia){var ye="oninput"in document;if(!ye){var ze=document.createElement("div");ze.setAttribute("oninput","return;");ye="function"===typeof ze.oninput}xe=ye}else xe=!1;we=xe&&(!document.documentMode||9<document.documentMode)}function Ae(){pe&&(pe.detachEvent("onpropertychange",Be),qe=pe=null)}function Be(a){if("value"===a.propertyName&&te(qe)){var b=[];ne(b,qe,a,xb(a));Jb(re,b)}}-function Ce(a,b,c){"focusin"===a?(Ae(),pe=b,qe=c,pe.attachEvent("onpropertychange",Be)):"focusout"===a&&Ae()}function De(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return te(qe)}function Ee(a,b){if("click"===a)return te(b)}function Fe(a,b){if("input"===a||"change"===a)return te(b)}function Ge(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var He="function"===typeof Object.is?Object.is:Ge;-function Ie(a,b){if(He(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++){var e=c[d];if(!ja.call(b,e)||!He(a[e],b[e]))return!1}return!0}function Je(a){for(;a&&a.firstChild;)a=a.firstChild;return a}-function Ke(a,b){var c=Je(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}-function Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}-function Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),"selectionStart"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,-d);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});"function"===typeof c.focus&&c.focus();for(c=0;c<b.length;c++)a=b[c],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}-var Pe=ia&&"documentMode"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;-function Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,"selectionStart"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,"onSelect"),0<d.length&&(b=new td("onSelect","select",null,b,c),a.push({event:b,listeners:d}),b.target=Qe)))}-function Ve(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var We={animationend:Ve("Animation","AnimationEnd"),animationiteration:Ve("Animation","AnimationIteration"),animationstart:Ve("Animation","AnimationStart"),transitionend:Ve("Transition","TransitionEnd")},Xe={},Ye={};-ia&&(Ye=document.createElement("div").style,"AnimationEvent"in window||(delete We.animationend.animation,delete We.animationiteration.animation,delete We.animationstart.animation),"TransitionEvent"in window||delete We.transitionend.transition);function Ze(a){if(Xe[a])return Xe[a];if(!We[a])return a;var b=We[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Ye)return Xe[a]=b[c];return a}var $e=Ze("animationend"),af=Ze("animationiteration"),bf=Ze("animationstart"),cf=Ze("transitionend"),df=new Map,ef="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");-function ff(a,b){df.set(a,b);fa(b,[a])}for(var gf=0;gf<ef.length;gf++){var hf=ef[gf],jf=hf.toLowerCase(),kf=hf[0].toUpperCase()+hf.slice(1);ff(jf,"on"+kf)}ff($e,"onAnimationEnd");ff(af,"onAnimationIteration");ff(bf,"onAnimationStart");ff("dblclick","onDoubleClick");ff("focusin","onFocus");ff("focusout","onBlur");ff(cf,"onTransitionEnd");ha("onMouseEnter",["mouseout","mouseover"]);ha("onMouseLeave",["mouseout","mouseover"]);ha("onPointerEnter",["pointerout","pointerover"]);-ha("onPointerLeave",["pointerout","pointerover"]);fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));fa("onBeforeInput",["compositionend","keypress","textInput","paste"]);fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));-fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lf="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),mf=new Set("cancel close invalid load scroll toggle".split(" ").concat(lf));-function nf(a,b,c){var d=a.type||"unknown-event";a.currentTarget=c;Ub(d,b,void 0,a);a.currentTarget=null}-function se(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;nf(e,h,l);f=k}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;nf(e,h,l);f=k}}}if(Qb)throw a=Rb,Qb=!1,Rb=null,a;}-function D(a,b){var c=b[of];void 0===c&&(c=b[of]=new Set);var d=a+"__bubble";c.has(d)||(pf(b,a,2,!1),c.add(d))}function qf(a,b,c){var d=0;b&&(d|=4);pf(c,a,d,b)}var rf="_reactListening"+Math.random().toString(36).slice(2);function sf(a){if(!a[rf]){a[rf]=!0;da.forEach(function(b){"selectionchange"!==b&&(mf.has(b)||qf(b,!1,a),qf(b,!0,a))});var b=9===a.nodeType?a:a.ownerDocument;null===b||b[rf]||(b[rf]=!0,qf("selectionchange",!1,b))}}-function pf(a,b,c,d){switch(jd(b)){case 1:var e=ed;break;case 4:e=gd;break;default:e=fd}c=e.bind(null,b,c,a);e=void 0;!Lb||"touchstart"!==b&&"touchmove"!==b&&"wheel"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)}-function hd(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&k.parentNode===e)return;g=g.return}for(;null!==h;){g=Wc(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode}}d=d.return}Jb(function(){var d=f,e=xb(c),g=[];-a:{var h=df.get(a);if(void 0!==h){var k=td,n=a;switch(a){case "keypress":if(0===od(c))break a;case "keydown":case "keyup":k=Rd;break;case "focusin":n="focus";k=Fd;break;case "focusout":n="blur";k=Fd;break;case "beforeblur":case "afterblur":k=Fd;break;case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=Bd;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k=-Dd;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=Vd;break;case $e:case af:case bf:k=Hd;break;case cf:k=Xd;break;case "scroll":k=vd;break;case "wheel":k=Zd;break;case "copy":case "cut":case "paste":k=Jd;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=Td}var t=0!==(b&4),J=!t&&"scroll"===a,x=t?null!==h?h+"Capture":null:h;t=[];for(var w=d,u;null!==-w;){u=w;var F=u.stateNode;5===u.tag&&null!==F&&(u=F,null!==x&&(F=Kb(w,x),null!=F&&t.push(tf(w,F,u))));if(J)break;w=w.return}0<t.length&&(h=new k(h,n,null,c,e),g.push({event:h,listeners:t}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===a;k="mouseout"===a||"pointerout"===a;if(h&&c!==wb&&(n=c.relatedTarget||c.fromElement)&&(Wc(n)||n[uf]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(n=c.relatedTarget||c.toElement,k=d,n=n?Wc(n):null,null!==-n&&(J=Vb(n),n!==J||5!==n.tag&&6!==n.tag))n=null}else k=null,n=d;if(k!==n){t=Bd;F="onMouseLeave";x="onMouseEnter";w="mouse";if("pointerout"===a||"pointerover"===a)t=Td,F="onPointerLeave",x="onPointerEnter",w="pointer";J=null==k?h:ue(k);u=null==n?h:ue(n);h=new t(F,w+"leave",k,c,e);h.target=J;h.relatedTarget=u;F=null;Wc(e)===d&&(t=new t(x,w+"enter",n,c,e),t.target=u,t.relatedTarget=J,F=t);J=F;if(k&&n)b:{t=k;x=n;w=0;for(u=t;u;u=vf(u))w++;u=0;for(F=x;F;F=vf(F))u++;for(;0<w-u;)t=vf(t),w--;for(;0<u-w;)x=-vf(x),u--;for(;w--;){if(t===x||null!==x&&t===x.alternate)break b;t=vf(t);x=vf(x)}t=null}else t=null;null!==k&&wf(g,h,k,t,!1);null!==n&&null!==J&&wf(g,J,n,t,!0)}}}a:{h=d?ue(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===k&&"file"===h.type)var na=ve;else if(me(h))if(we)na=Fe;else{na=De;var xa=Ce}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(na=Ee);if(na&&(na=na(a,d))){ne(g,na,c,e);break a}xa&&xa(a,h,d);"focusout"===a&&(xa=h._wrapperState)&&-xa.controlled&&"number"===h.type&&cb(h,"number",h.value)}xa=d?ue(d):window;switch(a){case "focusin":if(me(xa)||"true"===xa.contentEditable)Qe=xa,Re=d,Se=null;break;case "focusout":Se=Re=Qe=null;break;case "mousedown":Te=!0;break;case "contextmenu":case "mouseup":case "dragend":Te=!1;Ue(g,c,e);break;case "selectionchange":if(Pe)break;case "keydown":case "keyup":Ue(g,c,e)}var $a;if(ae)b:{switch(a){case "compositionstart":var ba="onCompositionStart";break b;case "compositionend":ba="onCompositionEnd";-break b;case "compositionupdate":ba="onCompositionUpdate";break b}ba=void 0}else ie?ge(a,c)&&(ba="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(ba="onCompositionStart");ba&&(de&&"ko"!==c.locale&&(ie||"onCompositionStart"!==ba?"onCompositionEnd"===ba&&ie&&($a=nd()):(kd=e,ld="value"in kd?kd.value:kd.textContent,ie=!0)),xa=oe(d,ba),0<xa.length&&(ba=new Ld(ba,a,null,c,e),g.push({event:ba,listeners:xa}),$a?ba.data=$a:($a=he(c),null!==$a&&(ba.data=$a))));if($a=ce?je(a,c):ke(a,c))d=oe(d,"onBeforeInput"),-0<d.length&&(e=new Ld("onBeforeInput","beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=$a)}se(g,b)})}function tf(a,b,c){return{instance:a,listener:b,currentTarget:c}}function oe(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==f&&(e=f,f=Kb(a,c),null!=f&&d.unshift(tf(a,f,e)),f=Kb(a,b),null!=f&&d.push(tf(a,f,e)));a=a.return}return d}function vf(a){if(null===a)return null;do a=a.return;while(a&&5!==a.tag);return a?a:null}-function wf(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,l=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==l&&(h=l,e?(k=Kb(c,f),null!=k&&g.unshift(tf(c,k,h))):e||(k=Kb(c,f),null!=k&&g.push(tf(c,k,h))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}var xf=/\r\n?/g,yf=/\u0000|\uFFFD/g;function zf(a){return("string"===typeof a?a:""+a).replace(xf,"\n").replace(yf,"")}function Af(a,b,c){b=zf(b);if(zf(a)!==b&&c)throw Error(p(425));}function Bf(){}-var Cf=null,Df=null;function Ef(a,b){return"textarea"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}-var Ff="function"===typeof setTimeout?setTimeout:void 0,Gf="function"===typeof clearTimeout?clearTimeout:void 0,Hf="function"===typeof Promise?Promise:void 0,Jf="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof Hf?function(a){return Hf.resolve(null).then(a).catch(If)}:Ff;function If(a){setTimeout(function(){throw a;})}-function Kf(a,b){var c=b,d=0;do{var e=c.nextSibling;a.removeChild(c);if(e&&8===e.nodeType)if(c=e.data,"/$"===c){if(0===d){a.removeChild(e);bd(b);return}d--}else"$"!==c&&"$?"!==c&&"$!"!==c||d++;c=e}while(c);bd(b)}function Lf(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break;if(8===b){b=a.data;if("$"===b||"$!"===b||"$?"===b)break;if("/$"===b)return null}}return a}-function Mf(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if("$"===c||"$!"===c||"$?"===c){if(0===b)return a;b--}else"/$"===c&&b++}a=a.previousSibling}return null}var Nf=Math.random().toString(36).slice(2),Of="__reactFiber$"+Nf,Pf="__reactProps$"+Nf,uf="__reactContainer$"+Nf,of="__reactEvents$"+Nf,Qf="__reactListeners$"+Nf,Rf="__reactHandles$"+Nf;-function Wc(a){var b=a[Of];if(b)return b;for(var c=a.parentNode;c;){if(b=c[uf]||c[Of]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Mf(a);null!==a;){if(c=a[Of])return c;a=Mf(a)}return b}a=c;c=a.parentNode}return null}function Cb(a){a=a[Of]||a[uf];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function ue(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(p(33));}function Db(a){return a[Pf]||null}var Sf=[],Tf=-1;function Uf(a){return{current:a}}-function E(a){0>Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}-function Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||"Unknown",e));return A({},c,d)}-function cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}-function jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a<c.length;a++){var d=c[a];do d=d(!0);while(null!==d)}eg=null;fg=!1}catch(e){throw null!==eg&&(eg=eg.slice(a+1)),ac(fc,jg),e;}finally{C=b,gg=!1}}return null}var kg=[],lg=0,mg=null,ng=0,og=[],pg=0,qg=null,rg=1,sg="";function tg(a,b){kg[lg++]=ng;kg[lg++]=mg;mg=a;ng=b}-function ug(a,b,c){og[pg++]=rg;og[pg++]=sg;og[pg++]=qg;qg=a;var d=rg;a=sg;var e=32-oc(d)-1;d&=~(1<<e);c+=1;var f=32-oc(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;rg=1<<32-oc(b)+e|c<<e|d;sg=f+a}else rg=1<<f|c<<e|d,sg=a}function vg(a){null!==a.return&&(tg(a,1),ug(a,1,0))}function wg(a){for(;a===mg;)mg=kg[--lg],kg[lg]=null,ng=kg[--lg],kg[lg]=null;for(;a===qg;)qg=og[--pg],og[pg]=null,sg=og[--pg],og[pg]=null,rg=og[--pg],og[pg]=null}var xg=null,yg=null,I=!1,zg=null;-function Ag(a,b){var c=Bg(5,null,null,0);c.elementType="DELETED";c.stateNode=b;c.return=a;b=a.deletions;null===b?(a.deletions=[c],a.flags|=16):b.push(c)}-function Cg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,xg=a,yg=Lf(b.firstChild),!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,xg=a,yg=null,!0):!1;case 13:return b=8!==b.nodeType?null:b,null!==b?(c=null!==qg?{id:rg,overflow:sg}:null,a.memoizedState={dehydrated:b,treeContext:c,retryLane:1073741824},c=Bg(18,null,null,0),c.stateNode=b,c.return=a,a.child=c,xg=a,yg=-null,!0):!1;default:return!1}}function Dg(a){return 0!==(a.mode&1)&&0===(a.flags&128)}function Eg(a){if(I){var b=yg;if(b){var c=b;if(!Cg(a,b)){if(Dg(a))throw Error(p(418));b=Lf(c.nextSibling);var d=xg;b&&Cg(a,b)?Ag(d,c):(a.flags=a.flags&-4097|2,I=!1,xg=a)}}else{if(Dg(a))throw Error(p(418));a.flags=a.flags&-4097|2;I=!1;xg=a}}}function Fg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;xg=a}-function Gg(a){if(a!==xg)return!1;if(!I)return Fg(a),I=!0,!1;var b;(b=3!==a.tag)&&!(b=5!==a.tag)&&(b=a.type,b="head"!==b&&"body"!==b&&!Ef(a.type,a.memoizedProps));if(b&&(b=yg)){if(Dg(a))throw Hg(),Error(p(418));for(;b;)Ag(a,b),b=Lf(b.nextSibling)}Fg(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(p(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){yg=Lf(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==c&&"$?"!==c||b++}a=a.nextSibling}yg=-null}}else yg=xg?Lf(a.stateNode.nextSibling):null;return!0}function Hg(){for(var a=yg;a;)a=Lf(a.nextSibling)}function Ig(){yg=xg=null;I=!1}function Jg(a){null===zg?zg=[a]:zg.push(a)}var Kg=ua.ReactCurrentBatchConfig;function Lg(a,b){if(a&&a.defaultProps){b=A({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}var Mg=Uf(null),Ng=null,Og=null,Pg=null;function Qg(){Pg=Og=Ng=null}function Rg(a){var b=Mg.current;E(Mg);a._currentValue=b}-function Sg(a,b,c){for(;null!==a;){var d=a.alternate;(a.childLanes&b)!==b?(a.childLanes|=b,null!==d&&(d.childLanes|=b)):null!==d&&(d.childLanes&b)!==b&&(d.childLanes|=b);if(a===c)break;a=a.return}}function Tg(a,b){Ng=a;Pg=Og=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(Ug=!0),a.firstContext=null)}-function Vg(a){var b=a._currentValue;if(Pg!==a)if(a={context:a,memoizedValue:b,next:null},null===Og){if(null===Ng)throw Error(p(308));Og=a;Ng.dependencies={lanes:0,firstContext:a}}else Og=Og.next=a;return b}var Wg=null;function Xg(a){null===Wg?Wg=[a]:Wg.push(a)}function Yg(a,b,c,d){var e=b.interleaved;null===e?(c.next=c,Xg(b)):(c.next=e.next,e.next=c);b.interleaved=c;return Zg(a,d)}-function Zg(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}var $g=!1;function ah(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}-function bh(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function ch(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}}-function dh(a,b,c){var d=a.updateQueue;if(null===d)return null;d=d.shared;if(0!==(K&2)){var e=d.pending;null===e?b.next=b:(b.next=e.next,e.next=b);d.pending=b;return Zg(a,c)}e=d.interleaved;null===e?(b.next=b,Xg(d)):(b.next=e.next,e.next=b);d.interleaved=b;return Zg(a,c)}function eh(a,b,c){b=b.updateQueue;if(null!==b&&(b=b.shared,0!==(c&4194240))){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}-function fh(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=-b;c.lastBaseUpdate=b}-function gh(a,b,c,d){var e=a.updateQueue;$g=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var m=a.alternate;null!==m&&(m=m.updateQueue,h=m.lastBaseUpdate,h!==g&&(null===h?m.firstBaseUpdate=l:h.next=l,m.lastBaseUpdate=k))}if(null!==f){var q=e.baseState;g=0;m=l=k=null;h=f;do{var r=h.lane,y=h.eventTime;if((d&r)===r){null!==m&&(m=m.next={eventTime:y,lane:0,tag:h.tag,payload:h.payload,callback:h.callback,-next:null});a:{var n=a,t=h;r=b;y=c;switch(t.tag){case 1:n=t.payload;if("function"===typeof n){q=n.call(y,q,r);break a}q=n;break a;case 3:n.flags=n.flags&-65537|128;case 0:n=t.payload;r="function"===typeof n?n.call(y,q,r):n;if(null===r||void 0===r)break a;q=A({},q,r);break a;case 2:$g=!0}}null!==h.callback&&0!==h.lane&&(a.flags|=64,r=e.effects,null===r?e.effects=[h]:r.push(h))}else y={eventTime:y,lane:r,tag:h.tag,payload:h.payload,callback:h.callback,next:null},null===m?(l=m=y,k=q):m=m.next=y,g|=r;-h=h.next;if(null===h)if(h=e.shared.pending,null===h)break;else r=h,h=r.next,r.next=null,e.lastBaseUpdate=r,e.shared.pending=null}while(1);null===m&&(k=q);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=m;b=e.shared.interleaved;if(null!==b){e=b;do g|=e.lane,e=e.next;while(e!==b)}else null===f&&(e.shared.lanes=0);hh|=g;a.lanes=g;a.memoizedState=q}}-function ih(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if("function"!==typeof e)throw Error(p(191,e));e.call(d)}}}var jh=(new aa.Component).refs;function kh(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:A({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)}-var nh={isMounted:function(a){return(a=a._reactInternals)?Vb(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=L(),e=lh(a),f=ch(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=dh(a,f,e);null!==b&&(mh(b,a,e,d),eh(b,a,e))},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=L(),e=lh(a),f=ch(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=dh(a,f,e);null!==b&&(mh(b,a,e,d),eh(b,a,e))},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=L(),d=-lh(a),e=ch(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=b);b=dh(a,e,d);null!==b&&(mh(b,a,d,c),eh(b,a,d))}};function oh(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!Ie(c,d)||!Ie(e,f):!0}-function ph(a,b,c){var d=!1,e=Vf;var f=b.contextType;"object"===typeof f&&null!==f?f=Vg(f):(e=Zf(b)?Xf:H.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Yf(a,e):Vf);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=nh;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}-function qh(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&nh.enqueueReplaceState(b,b.state,null)}-function rh(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=jh;ah(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=Vg(f):(f=Zf(b)?Xf:H.current,e.context=Yf(a,f));e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(kh(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||(b=e.state,-"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&nh.enqueueReplaceState(e,e.state,null),gh(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4194308)}-function sh(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(p(309));var d=c.stateNode}if(!d)throw Error(p(147,a));var e=d,f=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===f)return b.ref;b=function(a){var b=e.refs;b===jh&&(b=e.refs={});null===a?delete b[f]:b[f]=a};b._stringRef=f;return b}if("string"!==typeof a)throw Error(p(284));if(!c._owner)throw Error(p(290,a));}return a}-function th(a,b){a=Object.prototype.toString.call(b);throw Error(p(31,"[object Object]"===a?"object with keys {"+Object.keys(b).join(", ")+"}":a));}function uh(a){var b=a._init;return b(a._payload)}-function vh(a){function b(b,c){if(a){var d=b.deletions;null===d?(b.deletions=[c],b.flags|=16):d.push(c)}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=wh(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return b.flags|=1048576,c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags|=2,c):d;b.flags|=2;return c}function g(b){a&&-null===b.alternate&&(b.flags|=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=xh(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){var f=c.type;if(f===ya)return m(a,b,c.props.children,d,c.key);if(null!==b&&(b.elementType===f||"object"===typeof f&&null!==f&&f.$$typeof===Ha&&uh(f)===b.type))return d=e(b,c.props),d.ref=sh(a,b,c),d.return=a,d;d=yh(c.type,c.key,c.props,null,a.mode,d);d.ref=sh(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||-b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=zh(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function m(a,b,c,d,f){if(null===b||7!==b.tag)return b=Ah(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function q(a,b,c){if("string"===typeof b&&""!==b||"number"===typeof b)return b=xh(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case va:return c=yh(b.type,b.key,b.props,null,a.mode,c),-c.ref=sh(a,null,b),c.return=a,c;case wa:return b=zh(b,a.mode,c),b.return=a,b;case Ha:var d=b._init;return q(a,d(b._payload),c)}if(eb(b)||Ka(b))return b=Ah(b,a.mode,c,null),b.return=a,b;th(a,b)}return null}function r(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c&&""!==c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case va:return c.key===e?k(a,b,c,d):null;case wa:return c.key===e?l(a,b,c,d):null;case Ha:return e=c._init,r(a,-b,e(c._payload),d)}if(eb(c)||Ka(c))return null!==e?null:m(a,b,c,d,null);th(a,c)}return null}function y(a,b,c,d,e){if("string"===typeof d&&""!==d||"number"===typeof d)return a=a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case va:return a=a.get(null===d.key?c:d.key)||null,k(b,a,d,e);case wa:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e);case Ha:var f=d._init;return y(a,b,c,f(d._payload),e)}if(eb(d)||Ka(d))return a=a.get(c)||null,m(b,a,d,e,null);th(b,d)}return null}-function n(e,g,h,k){for(var l=null,m=null,u=g,w=g=0,x=null;null!==u&&w<h.length;w++){u.index>w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;w<h.length;w++)u=q(e,h[w],k),null!==u&&(g=f(u,g,w),null===m?l=u:m.sibling=u,m=u);I&&tg(e,w);return l}for(u=d(e,u);w<h.length;w++)x=y(u,e,w,h[w],k),null!==x&&(a&&null!==x.alternate&&u.delete(null===-x.key?w:x.key),g=f(x,g,w),null===m?l=x:m.sibling=x,m=x);a&&u.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function t(e,g,h,k){var l=Ka(h);if("function"!==typeof l)throw Error(p(150));h=l.call(h);if(null==h)throw Error(p(151));for(var u=l=null,m=g,w=g=0,x=null,n=h.next();null!==m&&!n.done;w++,n=h.next()){m.index>w?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,-m),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){"object"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if("object"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=-f.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||"object"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==-d;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=zh(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f)}return"string"===typeof f&&""!==f||"number"===typeof f?(f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):-(c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p(174));return a}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a)}E(Eh);G(Eh,b)}function Jh(){E(Eh);E(Fh);E(Gh)}-function Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c))}function Lh(a){Fh.current===a&&(E(Eh),E(Fh))}var M=Uf(0);-function Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Nh=[];-function Oh(){for(var a=0;a<Nh.length;a++)Nh[a]._workInProgressVersionPrimary=null;Nh.length=0}var Ph=ua.ReactCurrentDispatcher,Qh=ua.ReactCurrentBatchConfig,Rh=0,N=null,O=null,P=null,Sh=!1,Th=!1,Uh=0,Vh=0;function Q(){throw Error(p(321));}function Wh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!He(a[c],b[c]))return!1;return!0}-function Xh(a,b,c,d,e,f){Rh=f;N=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;Ph.current=null===a||null===a.memoizedState?Yh:Zh;a=c(d,e);if(Th){f=0;do{Th=!1;Uh=0;if(25<=f)throw Error(p(301));f+=1;P=O=null;b.updateQueue=null;Ph.current=$h;a=c(d,e)}while(Th)}Ph.current=ai;b=null!==O&&null!==O.next;Rh=0;P=O=N=null;Sh=!1;if(b)throw Error(p(300));return a}function bi(){var a=0!==Uh;Uh=0;return a}-function ci(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===P?N.memoizedState=P=a:P=P.next=a;return P}function di(){if(null===O){var a=N.alternate;a=null!==a?a.memoizedState:null}else a=O.next;var b=null===P?N.memoizedState:P.next;if(null!==b)P=b,O=a;else{if(null===a)throw Error(p(310));O=a;a={memoizedState:O.memoizedState,baseState:O.baseState,baseQueue:O.baseQueue,queue:O.queue,next:null};null===P?N.memoizedState=P=a:P=P.next=a}return P}-function ei(a,b){return"function"===typeof b?b(a):b}-function fi(a){var b=di(),c=b.queue;if(null===c)throw Error(p(311));c.lastRenderedReducer=a;var d=O,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){f=e.next;d=d.baseState;var h=g=null,k=null,l=f;do{var m=l.lane;if((Rh&m)===m)null!==k&&(k=k.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),d=l.hasEagerState?l.eagerState:a(d,l.action);else{var q={lane:m,action:l.action,hasEagerState:l.hasEagerState,-eagerState:l.eagerState,next:null};null===k?(h=k=q,g=d):k=k.next=q;N.lanes|=m;hh|=m}l=l.next}while(null!==l&&l!==f);null===k?g=d:k.next=h;He(d,b.memoizedState)||(Ug=!0);b.memoizedState=d;b.baseState=g;b.baseQueue=k;c.lastRenderedState=d}a=c.interleaved;if(null!==a){e=a;do f=e.lane,N.lanes|=f,hh|=f,e=e.next;while(e!==a)}else null===e&&(c.lanes=0);return[b.memoizedState,c.dispatch]}-function gi(a){var b=di(),c=b.queue;if(null===c)throw Error(p(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(Ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}function hi(){}-function ii(a,b){var c=N,d=di(),e=b(),f=!He(d.memoizedState,e);f&&(d.memoizedState=e,Ug=!0);d=d.queue;ji(ki.bind(null,c,d,a),[a]);if(d.getSnapshot!==b||f||null!==P&&P.memoizedState.tag&1){c.flags|=2048;li(9,mi.bind(null,c,d,e,b),void 0,null);if(null===R)throw Error(p(349));0!==(Rh&30)||ni(c,b,e)}return e}function ni(a,b,c){a.flags|=16384;a={getSnapshot:b,value:c};b=N.updateQueue;null===b?(b={lastEffect:null,stores:null},N.updateQueue=b,b.stores=[a]):(c=b.stores,null===c?b.stores=[a]:c.push(a))}-function mi(a,b,c,d){b.value=c;b.getSnapshot=d;oi(b)&&pi(a)}function ki(a,b,c){return c(function(){oi(b)&&pi(a)})}function oi(a){var b=a.getSnapshot;a=a.value;try{var c=b();return!He(a,c)}catch(d){return!0}}function pi(a){var b=Zg(a,1);null!==b&&mh(b,a,1,-1)}-function qi(a){var b=ci();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ei,lastRenderedState:a};b.queue=a;a=a.dispatch=ri.bind(null,N,a);return[b.memoizedState,a]}-function li(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=N.updateQueue;null===b?(b={lastEffect:null,stores:null},N.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function si(){return di().memoizedState}function ti(a,b,c,d){var e=ci();N.flags|=a;e.memoizedState=li(1|b,c,void 0,void 0===d?null:d)}-function ui(a,b,c,d){var e=di();d=void 0===d?null:d;var f=void 0;if(null!==O){var g=O.memoizedState;f=g.destroy;if(null!==d&&Wh(d,g.deps)){e.memoizedState=li(b,c,f,d);return}}N.flags|=a;e.memoizedState=li(1|b,c,f,d)}function vi(a,b){return ti(8390656,8,a,b)}function ji(a,b){return ui(2048,8,a,b)}function wi(a,b){return ui(4,2,a,b)}function xi(a,b){return ui(4,4,a,b)}-function yi(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function zi(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ui(4,4,yi.bind(null,b,a),c)}function Ai(){}function Bi(a,b){var c=di();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Wh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}-function Ci(a,b){var c=di();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Wh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Di(a,b,c){if(0===(Rh&21))return a.baseState&&(a.baseState=!1,Ug=!0),a.memoizedState=c;He(c,b)||(c=yc(),N.lanes|=c,hh|=c,a.baseState=!0);return b}function Ei(a,b){var c=C;C=0!==c&&4>c?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b()}finally{C=c,Qh.transition=d}}function Fi(){return di().memoizedState}-function Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d)}}-function ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d))}}-function Hi(a){var b=a.alternate;return a===N||null!==b&&b===N}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}-var ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308,-4,yi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ti(4194308,4,a,b)},useInsertionEffect:function(a,b){return ti(4,2,a,b)},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=-ci();a={current:a};return b.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===R)throw Error(p(349));0!==(Rh&30)||ni(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d,-f,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=":"+b+"R"+c;c=Uh++;0<c&&(b+="H"+c.toString(32));b+=":"}else c=Vh++,b=":"+b+"r"+c.toString(32)+":";return a.memoizedState=b},unstable_isNewReconciler:!1},Zh={readContext:Vg,useCallback:Bi,useContext:Vg,useEffect:ji,useImperativeHandle:zi,useInsertionEffect:wi,useLayoutEffect:xi,useMemo:Ci,useReducer:fi,useRef:si,useState:function(){return fi(ei)},-useDebugValue:Ai,useDeferredValue:function(a){var b=di();return Di(b,O.memoizedState,a)},useTransition:function(){var a=fi(ei)[0],b=di().memoizedState;return[a,b]},useMutableSource:hi,useSyncExternalStore:ii,useId:Fi,unstable_isNewReconciler:!1},$h={readContext:Vg,useCallback:Bi,useContext:Vg,useEffect:ji,useImperativeHandle:zi,useInsertionEffect:wi,useLayoutEffect:xi,useMemo:Ci,useReducer:gi,useRef:si,useState:function(){return gi(ei)},useDebugValue:Ai,useDeferredValue:function(a){var b=di();return null===-O?b.memoizedState=a:Di(b,O.memoizedState,a)},useTransition:function(){var a=gi(ei)[0],b=di().memoizedState;return[a,b]},useMutableSource:hi,useSyncExternalStore:ii,useId:Fi,unstable_isNewReconciler:!1};function Ki(a,b){try{var c="",d=b;do c+=Pa(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack}return{value:a,source:b,stack:e,digest:null}}function Li(a,b,c){return{value:a,source:null,stack:null!=c?c:null,digest:null!=b?b:null}}-function Mi(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Ni="function"===typeof WeakMap?WeakMap:Map;function Oi(a,b,c){c=ch(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Pi||(Pi=!0,Qi=d);Mi(a,b)};return c}-function Ri(a,b,c){c=ch(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){return d(e)};c.callback=function(){Mi(a,b)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){Mi(a,b);"function"!==typeof d&&(null===Si?Si=new Set([this]):Si.add(this));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}-function Ti(a,b,c){var d=a.pingCache;if(null===d){d=a.pingCache=new Ni;var e=new Set;d.set(b,e)}else e=d.get(b),void 0===e&&(e=new Set,d.set(b,e));e.has(c)||(e.add(c),a=Ui.bind(null,a,b,c),b.then(a,a))}function Vi(a){do{var b;if(b=13===a.tag)b=a.memoizedState,b=null!==b?null!==b.dehydrated?!0:!1:!0;if(b)return a;a=a.return}while(null!==a);return null}-function Wi(a,b,c,d,e){if(0===(a.mode&1))return a===b?a.flags|=65536:(a.flags|=128,c.flags|=131072,c.flags&=-52805,1===c.tag&&(null===c.alternate?c.tag=17:(b=ch(-1,1),b.tag=2,dh(c,b,1))),c.lanes|=1),a;a.flags|=65536;a.lanes=e;return a}var Xi=ua.ReactCurrentOwner,Ug=!1;function Yi(a,b,c,d){b.child=null===a?Ch(b,null,c,d):Bh(b,a.child,c,d)}-function Zi(a,b,c,d,e){c=c.render;var f=b.ref;Tg(b,e);d=Xh(a,b,c,d,f,e);c=bi();if(null!==a&&!Ug)return b.updateQueue=a.updateQueue,b.flags&=-2053,a.lanes&=~e,$i(a,b,e);I&&c&&vg(b);b.flags|=1;Yi(a,b,d,e);return b.child}-function aj(a,b,c,d,e){if(null===a){var f=c.type;if("function"===typeof f&&!bj(f)&&void 0===f.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=f,cj(a,b,f,d,e);a=yh(c.type,null,d,b,b.mode,e);a.ref=b.ref;a.return=b;return b.child=a}f=a.child;if(0===(a.lanes&e)){var g=f.memoizedProps;c=c.compare;c=null!==c?c:Ie;if(c(g,d)&&a.ref===b.ref)return $i(a,b,e)}b.flags|=1;a=wh(f,d);a.ref=b.ref;a.return=b;return b.child=a}-function cj(a,b,c,d,e){if(null!==a){var f=a.memoizedProps;if(Ie(f,d)&&a.ref===b.ref)if(Ug=!1,b.pendingProps=d=f,0!==(a.lanes&e))0!==(a.flags&131072)&&(Ug=!0);else return b.lanes=a.lanes,$i(a,b,e)}return dj(a,b,c,d,e)}-function ej(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if("hidden"===d.mode)if(0===(b.mode&1))b.memoizedState={baseLanes:0,cachePool:null,transitions:null},G(fj,gj),gj|=c;else{if(0===(c&1073741824))return a=null!==f?f.baseLanes|c:c,b.lanes=b.childLanes=1073741824,b.memoizedState={baseLanes:a,cachePool:null,transitions:null},b.updateQueue=null,G(fj,gj),gj|=a,null;b.memoizedState={baseLanes:0,cachePool:null,transitions:null};d=null!==f?f.baseLanes:c;G(fj,gj);gj|=d}else null!==-f?(d=f.baseLanes|c,b.memoizedState=null):d=c,G(fj,gj),gj|=d;Yi(a,b,e,c);return b.child}function hj(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=512,b.flags|=2097152}function dj(a,b,c,d,e){var f=Zf(c)?Xf:H.current;f=Yf(b,f);Tg(b,e);c=Xh(a,b,c,d,f,e);d=bi();if(null!==a&&!Ug)return b.updateQueue=a.updateQueue,b.flags&=-2053,a.lanes&=~e,$i(a,b,e);I&&d&&vg(b);b.flags|=1;Yi(a,b,c,e);return b.child}-function ij(a,b,c,d,e){if(Zf(c)){var f=!0;cg(b)}else f=!1;Tg(b,e);if(null===b.stateNode)jj(a,b),ph(b,c,d),rh(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=Vg(l):(l=Zf(c)?Xf:H.current,l=Yf(b,l));var m=c.getDerivedStateFromProps,q="function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate;q||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||-(h!==d||k!==l)&&qh(b,g,d,l);$g=!1;var r=b.memoizedState;g.state=r;gh(b,d,g,e);k=b.memoizedState;h!==d||r!==k||Wf.current||$g?("function"===typeof m&&(kh(b,c,m,d),k=b.memoizedState),(h=$g||oh(b,c,h,d,r,k,l))?(q||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.flags|=4194308)):-("function"===typeof g.componentDidMount&&(b.flags|=4194308),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4194308),d=!1)}else{g=b.stateNode;bh(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:Lg(b.type,h);g.props=l;q=b.pendingProps;r=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=Vg(k):(k=Zf(c)?Xf:H.current,k=Yf(b,k));var y=c.getDerivedStateFromProps;(m="function"===typeof y||"function"===typeof g.getSnapshotBeforeUpdate)||-"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==q||r!==k)&&qh(b,g,d,k);$g=!1;r=b.memoizedState;g.state=r;gh(b,d,g,e);var n=b.memoizedState;h!==q||r!==n||Wf.current||$g?("function"===typeof y&&(kh(b,c,y,d),n=b.memoizedState),(l=$g||oh(b,c,l,d,r,n,k)||!1)?(m||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,n,k),"function"===typeof g.UNSAFE_componentWillUpdate&&-g.UNSAFE_componentWillUpdate(d,n,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=1024)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=1024),b.memoizedProps=d,b.memoizedState=n),g.props=d,g.state=n,g.context=k,d=l):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&r===-a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=1024),d=!1)}return kj(a,b,c,d,f,e)}-function kj(a,b,c,d,e,f){hj(a,b);var g=0!==(b.flags&128);if(!d&&!g)return e&&dg(b,c,!1),$i(a,b,f);d=b.stateNode;Xi.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.flags|=1;null!==a&&g?(b.child=Bh(b,a.child,null,f),b.child=Bh(b,null,h,f)):Yi(a,b,h,f);b.memoizedState=d.state;e&&dg(b,c,!0);return b.child}function lj(a){var b=a.stateNode;b.pendingContext?ag(a,b.pendingContext,b.pendingContext!==b.context):b.context&&ag(a,b.context,!1);Ih(a,b.containerInfo)}-function mj(a,b,c,d,e){Ig();Jg(e);b.flags|=256;Yi(a,b,c,d);return b.child}var nj={dehydrated:null,treeContext:null,retryLane:0};function oj(a){return{baseLanes:a,cachePool:null,transitions:null}}-function pj(a,b,c){var d=b.pendingProps,e=M.current,f=!1,g=0!==(b.flags&128),h;(h=g)||(h=null!==a&&null===a.memoizedState?!1:0!==(e&2));if(h)f=!0,b.flags&=-129;else if(null===a||null!==a.memoizedState)e|=1;G(M,e&1);if(null===a){Eg(b);a=b.memoizedState;if(null!==a&&(a=a.dehydrated,null!==a))return 0===(b.mode&1)?b.lanes=1:"$!"===a.data?b.lanes=8:b.lanes=1073741824,null;g=d.children;a=d.fallback;return f?(d=b.mode,f=b.child,g={mode:"hidden",children:g},0===(d&1)&&null!==f?(f.childLanes=0,f.pendingProps=-g):f=qj(g,d,0,null),a=Ah(a,d,c,null),f.return=b,a.return=b,f.sibling=a,b.child=f,b.child.memoizedState=oj(c),b.memoizedState=nj,a):rj(b,g)}e=a.memoizedState;if(null!==e&&(h=e.dehydrated,null!==h))return sj(a,b,g,d,h,e,c);if(f){f=d.fallback;g=b.mode;e=a.child;h=e.sibling;var k={mode:"hidden",children:d.children};0===(g&1)&&b.child!==e?(d=b.child,d.childLanes=0,d.pendingProps=k,b.deletions=null):(d=wh(e,k),d.subtreeFlags=e.subtreeFlags&14680064);null!==h?f=wh(h,f):(f=Ah(f,g,c,null),f.flags|=2);f.return=-b;d.return=b;d.sibling=f;b.child=d;d=f;f=b.child;g=a.child.memoizedState;g=null===g?oj(c):{baseLanes:g.baseLanes|c,cachePool:null,transitions:g.transitions};f.memoizedState=g;f.childLanes=a.childLanes&~c;b.memoizedState=nj;return d}f=a.child;a=f.sibling;d=wh(f,{mode:"visible",children:d.children});0===(b.mode&1)&&(d.lanes=c);d.return=b;d.sibling=null;null!==a&&(c=b.deletions,null===c?(b.deletions=[a],b.flags|=16):c.push(a));b.child=d;b.memoizedState=null;return d}-function rj(a,b){b=qj({mode:"visible",children:b},a.mode,0,null);b.return=a;return a.child=b}function tj(a,b,c,d){null!==d&&Jg(d);Bh(b,a.child,null,c);a=rj(b,b.pendingProps.children);a.flags|=2;b.memoizedState=null;return a}-function sj(a,b,c,d,e,f,g){if(c){if(b.flags&256)return b.flags&=-257,d=Li(Error(p(422))),tj(a,b,g,d);if(null!==b.memoizedState)return b.child=a.child,b.flags|=128,null;f=d.fallback;e=b.mode;d=qj({mode:"visible",children:d.children},e,0,null);f=Ah(f,e,g,null);f.flags|=2;d.return=b;f.return=b;d.sibling=f;b.child=d;0!==(b.mode&1)&&Bh(b,a.child,null,g);b.child.memoizedState=oj(g);b.memoizedState=nj;return f}if(0===(b.mode&1))return tj(a,b,g,null);if("$!"===e.data){d=e.nextSibling&&e.nextSibling.dataset;-if(d)var h=d.dgst;d=h;f=Error(p(419));d=Li(f,d,void 0);return tj(a,b,g,d)}h=0!==(g&a.childLanes);if(Ug||h){d=R;if(null!==d){switch(g&-g){case 4:e=2;break;case 16:e=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:e=32;break;case 536870912:e=268435456;break;default:e=0}e=0!==(e&(d.suspendedLanes|g))?0:e;-0!==e&&e!==f.retryLane&&(f.retryLane=e,Zg(a,e),mh(d,a,e,-1))}uj();d=Li(Error(p(421)));return tj(a,b,g,d)}if("$?"===e.data)return b.flags|=128,b.child=a.child,b=vj.bind(null,a),e._reactRetry=b,null;a=f.treeContext;yg=Lf(e.nextSibling);xg=b;I=!0;zg=null;null!==a&&(og[pg++]=rg,og[pg++]=sg,og[pg++]=qg,rg=a.id,sg=a.overflow,qg=b);b=rj(b,d.children);b.flags|=4096;return b}function wj(a,b,c){a.lanes|=b;var d=a.alternate;null!==d&&(d.lanes|=b);Sg(a.return,b,c)}-function xj(a,b,c,d,e){var f=a.memoizedState;null===f?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e}:(f.isBackwards=b,f.rendering=null,f.renderingStartTime=0,f.last=d,f.tail=c,f.tailMode=e)}-function yj(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;Yi(a,b,d.children,c);d=M.current;if(0!==(d&2))d=d&1|2,b.flags|=128;else{if(null!==a&&0!==(a.flags&128))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&wj(a,c,b);else if(19===a.tag)wj(a,c,b);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}G(M,d);if(0===(b.mode&1))b.memoizedState=-null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===Mh(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);xj(b,!1,e,c,f);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===Mh(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}xj(b,!0,c,null,f);break;case "together":xj(b,!1,null,null,void 0);break;default:b.memoizedState=null}return b.child}-function jj(a,b){0===(b.mode&1)&&null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2)}function $i(a,b,c){null!==a&&(b.dependencies=a.dependencies);hh|=b.lanes;if(0===(c&b.childLanes))return null;if(null!==a&&b.child!==a.child)throw Error(p(153));if(null!==b.child){a=b.child;c=wh(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=wh(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}-function zj(a,b,c){switch(b.tag){case 3:lj(b);Ig();break;case 5:Kh(b);break;case 1:Zf(b.type)&&cg(b);break;case 4:Ih(b,b.stateNode.containerInfo);break;case 10:var d=b.type._context,e=b.memoizedProps.value;G(Mg,d._currentValue);d._currentValue=e;break;case 13:d=b.memoizedState;if(null!==d){if(null!==d.dehydrated)return G(M,M.current&1),b.flags|=128,null;if(0!==(c&b.child.childLanes))return pj(a,b,c);G(M,M.current&1);a=$i(a,b,c);return null!==a?a.sibling:null}G(M,M.current&1);break;case 19:d=0!==(c&-b.childLanes);if(0!==(a.flags&128)){if(d)return yj(a,b,c);b.flags|=128}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);G(M,M.current);if(d)break;else return null;case 22:case 23:return b.lanes=0,ej(a,b,c)}return $i(a,b,c)}var Aj,Bj,Cj,Dj;-Aj=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};Bj=function(){};-Cj=function(a,b,c,d){var e=a.memoizedProps;if(e!==d){a=b.stateNode;Hh(Eh.current);var f=null;switch(c){case "input":e=Ya(a,e);d=Ya(a,d);f=[];break;case "select":e=A({},e,{value:void 0});d=A({},d,{value:void 0});f=[];break;case "textarea":e=gb(a,e);d=gb(a,d);f=[];break;default:"function"!==typeof e.onClick&&"function"===typeof d.onClick&&(a.onclick=Bf)}ub(c,d);var g;c=null;for(l in e)if(!d.hasOwnProperty(l)&&e.hasOwnProperty(l)&&null!=e[l])if("style"===l){var h=e[l];for(g in h)h.hasOwnProperty(g)&&-(c||(c={}),c[g]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(ea.hasOwnProperty(l)?f||(f=[]):(f=f||[]).push(l,null));for(l in d){var k=d[l];h=null!=e?e[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if("style"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]="");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||(c={}),c[g]=k[g])}else c||(f||(f=[]),f.push(l,-c)),c=k;else"dangerouslySetInnerHTML"===l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(f=f||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(f=f||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(ea.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&D("scroll",a),f||h===k||(f=[])):(f=f||[]).push(l,k))}c&&(f=f||[]).push("style",c);var l=f;if(b.updateQueue=l)b.flags|=4}};Dj=function(a,b,c,d){c!==d&&(b.flags|=4)};-function Ej(a,b){if(!I)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}-function S(a){var b=null!==a.alternate&&a.alternate.child===a.child,c=0,d=0;if(b)for(var e=a.child;null!==e;)c|=e.lanes|e.childLanes,d|=e.subtreeFlags&14680064,d|=e.flags&14680064,e.return=a,e=e.sibling;else for(e=a.child;null!==e;)c|=e.lanes|e.childLanes,d|=e.subtreeFlags,d|=e.flags,e.return=a,e=e.sibling;a.subtreeFlags|=d;a.childLanes=c;return b}-function Fj(a,b,c){var d=b.pendingProps;wg(b);switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return S(b),null;case 1:return Zf(b.type)&&$f(),S(b),null;case 3:d=b.stateNode;Jh();E(Wf);E(H);Oh();d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)Gg(b)?b.flags|=4:null===a||a.memoizedState.isDehydrated&&0===(b.flags&256)||(b.flags|=1024,null!==zg&&(Gj(zg),zg=null));Bj(a,b);S(b);return null;case 5:Lh(b);var e=Hh(Gh.current);-c=b.type;if(null!==a&&null!=b.stateNode)Cj(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=512,b.flags|=2097152);else{if(!d){if(null===b.stateNode)throw Error(p(166));S(b);return null}a=Hh(Eh.current);if(Gg(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[Of]=b;d[Pf]=f;a=0!==(b.mode&1);switch(c){case "dialog":D("cancel",d);D("close",d);break;case "iframe":case "object":case "embed":D("load",d);break;case "video":case "audio":for(e=0;e<lf.length;e++)D(lf[e],d);break;case "source":D("error",d);break;case "img":case "image":case "link":D("error",-d);D("load",d);break;case "details":D("toggle",d);break;case "input":Za(d,f);D("invalid",d);break;case "select":d._wrapperState={wasMultiple:!!f.multiple};D("invalid",d);break;case "textarea":hb(d,f),D("invalid",d)}ub(c,f);e=null;for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];"children"===g?"string"===typeof h?d.textContent!==h&&(!0!==f.suppressHydrationWarning&&Af(d.textContent,h,a),e=["children",h]):"number"===typeof h&&d.textContent!==""+h&&(!0!==f.suppressHydrationWarning&&Af(d.textContent,-h,a),e=["children",""+h]):ea.hasOwnProperty(g)&&null!=h&&"onScroll"===g&&D("scroll",d)}switch(c){case "input":Va(d);db(d,f,!0);break;case "textarea":Va(d);jb(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&(d.onclick=Bf)}d=e;b.updateQueue=d;null!==d&&(b.flags|=4)}else{g=9===e.nodeType?e:e.ownerDocument;"http://www.w3.org/1999/xhtml"===a&&(a=kb(c));"http://www.w3.org/1999/xhtml"===a?"script"===c?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):-"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case "dialog":D("cancel",a);D("close",a);e=d;break;case "iframe":case "object":case "embed":D("load",a);e=d;break;case "video":case "audio":for(e=0;e<lf.length;e++)D(lf[e],a);e=d;break;case "source":D("error",a);e=d;break;case "img":case "image":case "link":D("error",-a);D("load",a);e=d;break;case "details":D("toggle",a);e=d;break;case "input":Za(a,d);e=Ya(a,d);D("invalid",a);break;case "option":e=d;break;case "select":a._wrapperState={wasMultiple:!!d.multiple};e=A({},d,{value:void 0});D("invalid",a);break;case "textarea":hb(a,d);e=gb(a,d);D("invalid",a);break;default:e=d}ub(c,e);h=e;for(f in h)if(h.hasOwnProperty(f)){var k=h[f];"style"===f?sb(a,k):"dangerouslySetInnerHTML"===f?(k=k?k.__html:void 0,null!=k&&nb(a,k)):"children"===f?"string"===typeof k?("textarea"!==-c||""!==k)&&ob(a,k):"number"===typeof k&&ob(a,""+k):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(ea.hasOwnProperty(f)?null!=k&&"onScroll"===f&&D("scroll",a):null!=k&&ta(a,f,k,g))}switch(c){case "input":Va(a);db(a,d,!1);break;case "textarea":Va(a);jb(a);break;case "option":null!=d.value&&a.setAttribute("value",""+Sa(d.value));break;case "select":a.multiple=!!d.multiple;f=d.value;null!=f?fb(a,!!d.multiple,f,!1):null!=d.defaultValue&&fb(a,!!d.multiple,d.defaultValue,-!0);break;default:"function"===typeof e.onClick&&(a.onclick=Bf)}switch(c){case "button":case "input":case "select":case "textarea":d=!!d.autoFocus;break a;case "img":d=!0;break a;default:d=!1}}d&&(b.flags|=4)}null!==b.ref&&(b.flags|=512,b.flags|=2097152)}S(b);return null;case 6:if(a&&null!=b.stateNode)Dj(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(p(166));c=Hh(Gh.current);Hh(Eh.current);if(Gg(b)){d=b.stateNode;c=b.memoizedProps;d[Of]=b;if(f=d.nodeValue!==c)if(a=-xg,null!==a)switch(a.tag){case 3:Af(d.nodeValue,c,0!==(a.mode&1));break;case 5:!0!==a.memoizedProps.suppressHydrationWarning&&Af(d.nodeValue,c,0!==(a.mode&1))}f&&(b.flags|=4)}else d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[Of]=b,b.stateNode=d}S(b);return null;case 13:E(M);d=b.memoizedState;if(null===a||null!==a.memoizedState&&null!==a.memoizedState.dehydrated){if(I&&null!==yg&&0!==(b.mode&1)&&0===(b.flags&128))Hg(),Ig(),b.flags|=98560,f=!1;else if(f=Gg(b),null!==d&&null!==d.dehydrated){if(null===-a){if(!f)throw Error(p(318));f=b.memoizedState;f=null!==f?f.dehydrated:null;if(!f)throw Error(p(317));f[Of]=b}else Ig(),0===(b.flags&128)&&(b.memoizedState=null),b.flags|=4;S(b);f=!1}else null!==zg&&(Gj(zg),zg=null),f=!0;if(!f)return b.flags&65536?b:null}if(0!==(b.flags&128))return b.lanes=c,b;d=null!==d;d!==(null!==a&&null!==a.memoizedState)&&d&&(b.child.flags|=8192,0!==(b.mode&1)&&(null===a||0!==(M.current&1)?0===T&&(T=3):uj()));null!==b.updateQueue&&(b.flags|=4);S(b);return null;case 4:return Jh(),-Bj(a,b),null===a&&sf(b.stateNode.containerInfo),S(b),null;case 10:return Rg(b.type._context),S(b),null;case 17:return Zf(b.type)&&$f(),S(b),null;case 19:E(M);f=b.memoizedState;if(null===f)return S(b),null;d=0!==(b.flags&128);g=f.rendering;if(null===g)if(d)Ej(f,!1);else{if(0!==T||null!==a&&0!==(a.flags&128))for(a=b.child;null!==a;){g=Mh(a);if(null!==g){b.flags|=128;Ej(f,!1);d=g.updateQueue;null!==d&&(b.updateQueue=d,b.flags|=4);b.subtreeFlags=0;d=c;for(c=b.child;null!==c;)f=c,a=d,f.flags&=14680066,-g=f.alternate,null===g?(f.childLanes=0,f.lanes=a,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=g.childLanes,f.lanes=g.lanes,f.child=g.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=g.memoizedProps,f.memoizedState=g.memoizedState,f.updateQueue=g.updateQueue,f.type=g.type,a=g.dependencies,f.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext}),c=c.sibling;G(M,M.current&1|2);return b.child}a=-a.sibling}null!==f.tail&&B()>Hj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304)}else{if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&"hidden"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=-b,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}-function Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(),-null;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj="function"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if("function"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Nj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Oj=!1;-function Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=-q.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;-case 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent="":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Oj;Oj=!1;return n}-function Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f)}e=e.next}while(e!==d)}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}"function"===typeof b?b(a):b.current=a}}-function Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag}-function Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}-function Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}-function Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling}-function ak(a,b,c){if(lc&&"function"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0;-Zj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next}while(e!==d)}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,"function"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==-c.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c)}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj);b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}-function dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;d<c.length;d++){var e=c[d];try{var f=a,g=b,h=g;a:for(;null!==h;){switch(h.tag){case 5:X=h.stateNode;Yj=!1;break a;case 3:X=h.stateNode.containerInfo;Yj=!0;break a;case 4:X=h.stateNode.containerInfo;Yj=!0;break a}h=h.return}if(null===X)throw Error(p(160));ak(f,g,e);X=null;Yj=!1;var k=e.alternate;null!==k&&(k.return=null);e.return=null}catch(l){W(e,b,l)}}if(b.subtreeFlags&12854)for(b=b.child;null!==b;)ek(b,a),b=b.sibling}-function ek(a,b){var c=a.alternate,d=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:dk(b,a);fk(a);if(d&4){try{Qj(3,a,a.return),Rj(3,a)}catch(t){W(a,a.return,t)}try{Qj(5,a,a.return)}catch(t){W(a,a.return,t)}}break;case 1:dk(b,a);fk(a);d&512&&null!==c&&Mj(c,c.return);break;case 5:dk(b,a);fk(a);d&512&&null!==c&&Mj(c,c.return);if(a.flags&32){var e=a.stateNode;try{ob(e,"")}catch(t){W(a,a.return,t)}}if(d&4&&(e=a.stateNode,null!=e)){var f=a.memoizedProps,g=null!==c?c.memoizedProps:f,h=a.type,k=a.updateQueue;-a.updateQueue=null;if(null!==k)try{"input"===h&&"radio"===f.type&&null!=f.name&&ab(e,f);vb(h,g);var l=vb(h,f);for(g=0;g<k.length;g+=2){var m=k[g],q=k[g+1];"style"===m?sb(e,q):"dangerouslySetInnerHTML"===m?nb(e,q):"children"===m?ob(e,q):ta(e,m,q,l)}switch(h){case "input":bb(e,f);break;case "textarea":ib(e,f);break;case "select":var r=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=!!f.multiple;var y=f.value;null!=y?fb(e,!!f.multiple,y,!1):r!==!!f.multiple&&(null!=f.defaultValue?fb(e,!!f.multiple,-f.defaultValue,!0):fb(e,!!f.multiple,f.multiple?[]:"",!1))}e[Pf]=f}catch(t){W(a,a.return,t)}}break;case 6:dk(b,a);fk(a);if(d&4){if(null===a.stateNode)throw Error(p(162));e=a.stateNode;f=a.memoizedProps;try{e.nodeValue=f}catch(t){W(a,a.return,t)}}break;case 3:dk(b,a);fk(a);if(d&4&&null!==c&&c.memoizedState.isDehydrated)try{bd(b.containerInfo)}catch(t){W(a,a.return,t)}break;case 4:dk(b,a);fk(a);break;case 13:dk(b,a);fk(a);e=a.child;e.flags&8192&&(f=null!==e.memoizedState,e.stateNode.isHidden=f,!f||-null!==e.alternate&&null!==e.alternate.memoizedState||(gk=B()));d&4&&bk(a);break;case 22:m=null!==c&&null!==c.memoizedState;a.mode&1?(U=(l=U)||m,dk(b,a),U=l):dk(b,a);fk(a);if(d&8192){l=null!==a.memoizedState;if((a.stateNode.isHidden=l)&&!m&&0!==(a.mode&1))for(V=a,m=a.child;null!==m;){for(q=V=m;null!==V;){r=V;y=r.child;switch(r.tag){case 0:case 11:case 14:case 15:Qj(4,r,r.return);break;case 1:Mj(r,r.return);var n=r.stateNode;if("function"===typeof n.componentWillUnmount){d=r;c=r.return;try{b=d,n.props=-b.memoizedProps,n.state=b.memoizedState,n.componentWillUnmount()}catch(t){W(d,c,t)}}break;case 5:Mj(r,r.return);break;case 22:if(null!==r.memoizedState){hk(q);continue}}null!==y?(y.return=r,V=y):hk(q)}m=m.sibling}a:for(m=null,q=a;;){if(5===q.tag){if(null===m){m=q;try{e=q.stateNode,l?(f=e.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(h=q.stateNode,k=q.memoizedProps.style,g=void 0!==k&&null!==k&&k.hasOwnProperty("display")?k.display:null,h.style.display=-rb("display",g))}catch(t){W(a,a.return,t)}}}else if(6===q.tag){if(null===m)try{q.stateNode.nodeValue=l?"":q.memoizedProps}catch(t){W(a,a.return,t)}}else if((22!==q.tag&&23!==q.tag||null===q.memoizedState||q===a)&&null!==q.child){q.child.return=q;q=q.child;continue}if(q===a)break a;for(;null===q.sibling;){if(null===q.return||q.return===a)break a;m===q&&(m=null);q=q.return}m===q&&(m=null);q.sibling.return=q.return;q=q.sibling}}break;case 19:dk(b,a);fk(a);d&4&&bk(a);break;case 21:break;default:dk(b,-a),fk(a)}}function fk(a){var b=a.flags;if(b&2){try{a:{for(var c=a.return;null!==c;){if(Uj(c)){var d=c;break a}c=c.return}throw Error(p(160));}switch(d.tag){case 5:var e=d.stateNode;d.flags&32&&(ob(e,""),d.flags&=-33);var f=Vj(a);Xj(a,f,e);break;case 3:case 4:var g=d.stateNode.containerInfo,h=Vj(a);Wj(a,h,g);break;default:throw Error(p(161));}}catch(k){W(a,a.return,k)}a.flags&=-3}b&4096&&(a.flags&=-4097)}function ik(a,b,c){V=a;jk(a,b,c)}-function jk(a,b,c){for(var d=0!==(a.mode&1);null!==V;){var e=V,f=e.child;if(22===e.tag&&d){var g=null!==e.memoizedState||Kj;if(!g){var h=e.alternate,k=null!==h&&null!==h.memoizedState||U;h=Kj;var l=U;Kj=g;if((U=k)&&!l)for(V=e;null!==V;)g=V,k=g.child,22===g.tag&&null!==g.memoizedState?kk(e):null!==k?(k.return=g,V=k):kk(e);for(;null!==f;)V=f,jk(f,b,c),f=f.sibling;V=e;Kj=h;U=l}lk(a,b,c)}else 0!==(e.subtreeFlags&8772)&&null!==f?(f.return=e,V=f):lk(a,b,c)}}-function lk(a){for(;null!==V;){var b=V;if(0!==(b.flags&8772)){var c=b.alternate;try{if(0!==(b.flags&8772))switch(b.tag){case 0:case 11:case 15:U||Rj(5,b);break;case 1:var d=b.stateNode;if(b.flags&4&&!U)if(null===c)d.componentDidMount();else{var e=b.elementType===b.type?c.memoizedProps:Lg(b.type,c.memoizedProps);d.componentDidUpdate(e,c.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var f=b.updateQueue;null!==f&&ih(b,f,d);break;case 3:var g=b.updateQueue;if(null!==g){c=null;if(null!==b.child)switch(b.child.tag){case 5:c=-b.child.stateNode;break;case 1:c=b.child.stateNode}ih(b,g,c)}break;case 5:var h=b.stateNode;if(null===c&&b.flags&4){c=h;var k=b.memoizedProps;switch(b.type){case "button":case "input":case "select":case "textarea":k.autoFocus&&c.focus();break;case "img":k.src&&(c.src=k.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(null===b.memoizedState){var l=b.alternate;if(null!==l){var m=l.memoizedState;if(null!==m){var q=m.dehydrated;null!==q&&bd(q)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;-default:throw Error(p(163));}U||b.flags&512&&Sj(b)}catch(r){W(b,b.return,r)}}if(b===a){V=null;break}c=b.sibling;if(null!==c){c.return=b.return;V=c;break}V=b.return}}function hk(a){for(;null!==V;){var b=V;if(b===a){V=null;break}var c=b.sibling;if(null!==c){c.return=b.return;V=c;break}V=b.return}}-function kk(a){for(;null!==V;){var b=V;try{switch(b.tag){case 0:case 11:case 15:var c=b.return;try{Rj(4,b)}catch(k){W(b,c,k)}break;case 1:var d=b.stateNode;if("function"===typeof d.componentDidMount){var e=b.return;try{d.componentDidMount()}catch(k){W(b,e,k)}}var f=b.return;try{Sj(b)}catch(k){W(b,f,k)}break;case 5:var g=b.return;try{Sj(b)}catch(k){W(b,g,k)}}}catch(k){W(b,b.return,k)}if(b===a){V=null;break}var h=b.sibling;if(null!==h){h.return=b.return;V=h;break}V=b.return}}-var mk=Math.ceil,nk=ua.ReactCurrentDispatcher,ok=ua.ReactCurrentOwner,pk=ua.ReactCurrentBatchConfig,K=0,R=null,Y=null,Z=0,gj=0,fj=Uf(0),T=0,qk=null,hh=0,rk=0,sk=0,tk=null,uk=null,gk=0,Hj=Infinity,vk=null,Pi=!1,Qi=null,Si=null,wk=!1,xk=null,yk=0,zk=0,Ak=null,Bk=-1,Ck=0;function L(){return 0!==(K&6)?B():-1!==Bk?Bk:Bk=B()}-function lh(a){if(0===(a.mode&1))return 1;if(0!==(K&2)&&0!==Z)return Z&-Z;if(null!==Kg.transition)return 0===Ck&&(Ck=yc()),Ck;a=C;if(0!==a)return a;a=window.event;a=void 0===a?16:jd(a.type);return a}function mh(a,b,c,d){if(50<zk)throw zk=0,Ak=null,Error(p(185));Ac(a,c,d);if(0===(K&2)||a!==R)a===R&&(0===(K&2)&&(rk|=c),4===T&&Dk(a,Z)),Ek(a,d),1===c&&0===K&&0===(b.mode&1)&&(Hj=B()+500,fg&&jg())}-function Ek(a,b){var c=a.callbackNode;wc(a,b);var d=uc(a,a===R?Z:0);if(0===d)null!==c&&bc(c),a.callbackNode=null,a.callbackPriority=0;else if(b=d&-d,a.callbackPriority!==b){null!=c&&bc(c);if(1===b)0===a.tag?ig(Fk.bind(null,a)):hg(Fk.bind(null,a)),Jf(function(){0===(K&6)&&jg()}),c=null;else{switch(Dc(d)){case 1:c=fc;break;case 4:c=gc;break;case 16:c=hc;break;case 536870912:c=jc;break;default:c=hc}c=Gk(c,Hk.bind(null,a))}a.callbackPriority=b;a.callbackNode=c}}-function Hk(a,b){Bk=-1;Ck=0;if(0!==(K&6))throw Error(p(327));var c=a.callbackNode;if(Ik()&&a.callbackNode!==c)return null;var d=uc(a,a===R?Z:0);if(0===d)return null;if(0!==(d&30)||0!==(d&a.expiredLanes)||b)b=Jk(a,d);else{b=d;var e=K;K|=2;var f=Kk();if(R!==a||Z!==b)vk=null,Hj=B()+500,Lk(a,b);do try{Mk();break}catch(h){Nk(a,h)}while(1);Qg();nk.current=f;K=e;null!==Y?b=0:(R=null,Z=0,b=T)}if(0!==b){2===b&&(e=xc(a),0!==e&&(d=e,b=Ok(a,e)));if(1===b)throw c=qk,Lk(a,0),Dk(a,d),Ek(a,B()),c;if(6===b)Dk(a,d);-else{e=a.current.alternate;if(0===(d&30)&&!Pk(e)&&(b=Jk(a,d),2===b&&(f=xc(a),0!==f&&(d=f,b=Ok(a,f))),1===b))throw c=qk,Lk(a,0),Dk(a,d),Ek(a,B()),c;a.finishedWork=e;a.finishedLanes=d;switch(b){case 0:case 1:throw Error(p(345));case 2:Qk(a,uk,vk);break;case 3:Dk(a,d);if((d&130023424)===d&&(b=gk+500-B(),10<b)){if(0!==uc(a,0))break;e=a.suspendedLanes;if((e&d)!==d){L();a.pingedLanes|=a.suspendedLanes&e;break}a.timeoutHandle=Ff(Qk.bind(null,a,uk,vk),b);break}Qk(a,uk,vk);break;case 4:Dk(a,d);if((d&4194240)===-d)break;b=a.eventTimes;for(e=-1;0<d;){var g=31-oc(d);f=1<<g;g=b[g];g>e&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10<d){a.timeoutHandle=Ff(Qk.bind(null,a,uk,vk),d);break}Qk(a,uk,vk);break;case 5:Qk(a,uk,vk);break;default:throw Error(p(329));}}}Ek(a,B());return a.callbackNode===c?Hk.bind(null,a):null}-function Ok(a,b){var c=tk;a.current.memoizedState.isDehydrated&&(Lk(a,b).flags|=256);a=Jk(a,b);2!==a&&(b=uk,uk=c,null!==b&&Gj(b));return a}function Gj(a){null===uk?uk=a:uk.push.apply(uk,a)}-function Pk(a){for(var b=a;;){if(b.flags&16384){var c=b.updateQueue;if(null!==c&&(c=c.stores,null!==c))for(var d=0;d<c.length;d++){var e=c[d],f=e.getSnapshot;e=e.value;try{if(!He(f(),e))return!1}catch(g){return!1}}}c=b.child;if(b.subtreeFlags&16384&&null!==c)c.return=b,b=c;else{if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return!0;b=b.return}b.sibling.return=b.return;b=b.sibling}}return!0}-function Dk(a,b){b&=~sk;b&=~rk;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-oc(b),d=1<<c;a[c]=-1;b&=~d}}function Fk(a){if(0!==(K&6))throw Error(p(327));Ik();var b=uc(a,0);if(0===(b&1))return Ek(a,B()),null;var c=Jk(a,b);if(0!==a.tag&&2===c){var d=xc(a);0!==d&&(b=d,c=Ok(a,d))}if(1===c)throw c=qk,Lk(a,0),Dk(a,b),Ek(a,B()),c;if(6===c)throw Error(p(345));a.finishedWork=a.current.alternate;a.finishedLanes=b;Qk(a,uk,vk);Ek(a,B());return null}-function Rk(a,b){var c=K;K|=1;try{return a(b)}finally{K=c,0===K&&(Hj=B()+500,fg&&jg())}}function Sk(a){null!==xk&&0===xk.tag&&0===(K&6)&&Ik();var b=K;K|=1;var c=pk.transition,d=C;try{if(pk.transition=null,C=1,a)return a()}finally{C=d,pk.transition=c,K=b,0===(K&6)&&jg()}}function Ij(){gj=fj.current;E(fj)}-function Lk(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Gf(c));if(null!==Y)for(c=Y.return;null!==c;){var d=c;wg(d);switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&$f();break;case 3:Jh();E(Wf);E(H);Oh();break;case 5:Lh(d);break;case 4:Jh();break;case 13:E(M);break;case 19:E(M);break;case 10:Rg(d.type._context);break;case 22:case 23:Ij()}c=c.return}R=a;Y=a=wh(a.current,null);Z=gj=b;T=0;qk=null;sk=rk=hh=0;uk=tk=null;if(null!==Wg){for(b=-0;b<Wg.length;b++)if(c=Wg[b],d=c.interleaved,null!==d){c.interleaved=null;var e=d.next,f=c.pending;if(null!==f){var g=f.next;f.next=e;d.next=g}c.pending=d}Wg=null}return a}-function Nk(a,b){do{var c=Y;try{Qg();Ph.current=ai;if(Sh){for(var d=N.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next}Sh=!1}Rh=0;P=O=N=null;Th=!1;Uh=0;ok.current=null;if(null===c||null===c.return){T=1;qk=b;Y=null;break}a:{var f=a,g=c.return,h=c,k=b;b=Z;h.flags|=32768;if(null!==k&&"object"===typeof k&&"function"===typeof k.then){var l=k,m=h,q=m.tag;if(0===(m.mode&1)&&(0===q||11===q||15===q)){var r=m.alternate;r?(m.updateQueue=r.updateQueue,m.memoizedState=r.memoizedState,-m.lanes=r.lanes):(m.updateQueue=null,m.memoizedState=null)}var y=Vi(g);if(null!==y){y.flags&=-257;Wi(y,g,h,f,b);y.mode&1&&Ti(f,l,b);b=y;k=l;var n=b.updateQueue;if(null===n){var t=new Set;t.add(k);b.updateQueue=t}else n.add(k);break a}else{if(0===(b&1)){Ti(f,l,b);uj();break a}k=Error(p(426))}}else if(I&&h.mode&1){var J=Vi(g);if(null!==J){0===(J.flags&65536)&&(J.flags|=256);Wi(J,g,h,f,b);Jg(Ki(k,h));break a}}f=k=Ki(k,h);4!==T&&(T=2);null===tk?tk=[f]:tk.push(f);f=g;do{switch(f.tag){case 3:f.flags|=65536;-b&=-b;f.lanes|=b;var x=Oi(f,k,b);fh(f,x);break a;case 1:h=k;var w=f.type,u=f.stateNode;if(0===(f.flags&128)&&("function"===typeof w.getDerivedStateFromError||null!==u&&"function"===typeof u.componentDidCatch&&(null===Si||!Si.has(u)))){f.flags|=65536;b&=-b;f.lanes|=b;var F=Ri(f,h,b);fh(f,F);break a}}f=f.return}while(null!==f)}Tk(c)}catch(na){b=na;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}function Kk(){var a=nk.current;nk.current=ai;return null===a?ai:a}-function uj(){if(0===T||3===T||2===T)T=4;null===R||0===(hh&268435455)&&0===(rk&268435455)||Dk(R,Z)}function Jk(a,b){var c=K;K|=2;var d=Kk();if(R!==a||Z!==b)vk=null,Lk(a,b);do try{Uk();break}catch(e){Nk(a,e)}while(1);Qg();K=c;nk.current=d;if(null!==Y)throw Error(p(261));R=null;Z=0;return T}function Uk(){for(;null!==Y;)Vk(Y)}function Mk(){for(;null!==Y&&!cc();)Vk(Y)}function Vk(a){var b=Wk(a.alternate,a,gj);a.memoizedProps=a.pendingProps;null===b?Tk(a):Y=b;ok.current=null}-function Tk(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&32768)){if(c=Fj(c,b,gj),null!==c){Y=c;return}}else{c=Jj(c,b);if(null!==c){c.flags&=32767;Y=c;return}if(null!==a)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{T=6;Y=null;return}}b=b.sibling;if(null!==b){Y=b;return}Y=b=a}while(null!==b);0===T&&(T=5)}function Qk(a,b,c){var d=C,e=pk.transition;try{pk.transition=null,C=1,Xk(a,b,c,d)}finally{pk.transition=e,C=d}return null}-function Xk(a,b,c,d){do Ik();while(null!==xk);if(0!==(K&6))throw Error(p(327));c=a.finishedWork;var e=a.finishedLanes;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(p(177));a.callbackNode=null;a.callbackPriority=0;var f=c.lanes|c.childLanes;Bc(a,f);a===R&&(Y=R=null,Z=0);0===(c.subtreeFlags&2064)&&0===(c.flags&2064)||wk||(wk=!0,Gk(hc,function(){Ik();return null}));f=0!==(c.flags&15990);if(0!==(c.subtreeFlags&15990)||f){f=pk.transition;pk.transition=null;-var g=C;C=1;var h=K;K|=4;ok.current=null;Pj(a,c);ek(c,a);Oe(Df);dd=!!Cf;Df=Cf=null;a.current=c;ik(c,a,e);dc();K=h;C=g;pk.transition=f}else a.current=c;wk&&(wk=!1,xk=a,yk=e);f=a.pendingLanes;0===f&&(Si=null);mc(c.stateNode,d);Ek(a,B());if(null!==b)for(d=a.onRecoverableError,c=0;c<b.length;c++)e=b[c],d(e.value,{componentStack:e.stack,digest:e.digest});if(Pi)throw Pi=!1,a=Qi,Qi=null,a;0!==(yk&1)&&0!==a.tag&&Ik();f=a.pendingLanes;0!==(f&1)?a===Ak?zk++:(zk=0,Ak=a):zk=0;jg();return null}-function Ik(){if(null!==xk){var a=Dc(yk),b=pk.transition,c=C;try{pk.transition=null;C=16>a?16:a;if(null===xk)var d=!1;else{a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;k<h.length;k++){var l=h[k];for(V=l;null!==V;){var m=V;switch(m.tag){case 0:case 11:case 15:Qj(8,m,f)}var q=m.child;if(null!==q)q.return=m,V=q;else for(;null!==V;){m=V;var r=m.sibling,y=m.return;Tj(m);if(m===-l){V=null;break}if(null!==r){r.return=y;V=r;break}V=y}}}var n=f.alternate;if(null!==n){var t=n.child;if(null!==t){n.child=null;do{var J=t.sibling;t.sibling=null;t=J}while(null!==t)}}V=f}}if(0!==(f.subtreeFlags&2064)&&null!==g)g.return=f,V=g;else b:for(;null!==V;){f=V;if(0!==(f.flags&2048))switch(f.tag){case 0:case 11:case 15:Qj(9,f,f.return)}var x=f.sibling;if(null!==x){x.return=f.return;V=x;break b}V=f.return}}var w=a.current;for(V=w;null!==V;){g=V;var u=g.child;if(0!==(g.subtreeFlags&2064)&&null!==-u)u.return=g,V=u;else b:for(g=w;null!==V;){h=V;if(0!==(h.flags&2048))try{switch(h.tag){case 0:case 11:case 15:Rj(9,h)}}catch(na){W(h,h.return,na)}if(h===g){V=null;break b}var F=h.sibling;if(null!==F){F.return=h.return;V=F;break b}V=h.return}}K=e;jg();if(lc&&"function"===typeof lc.onPostCommitFiberRoot)try{lc.onPostCommitFiberRoot(kc,a)}catch(na){}d=!0}return d}finally{C=c,pk.transition=b}}return!1}function Yk(a,b,c){b=Ki(c,b);b=Oi(a,b,1);a=dh(a,b,1);b=L();null!==a&&(Ac(a,1,b),Ek(a,b))}-function W(a,b,c){if(3===a.tag)Yk(a,a,c);else for(;null!==b;){if(3===b.tag){Yk(b,a,c);break}else if(1===b.tag){var d=b.stateNode;if("function"===typeof b.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===Si||!Si.has(d))){a=Ki(c,a);a=Ri(b,a,1);b=dh(b,a,1);a=L();null!==b&&(Ac(b,1,a),Ek(b,a));break}}b=b.return}}-function Ui(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=L();a.pingedLanes|=a.suspendedLanes&c;R===a&&(Z&c)===c&&(4===T||3===T&&(Z&130023424)===Z&&500>B()-gk?Lk(a,0):sk|=c);Ek(a,b)}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c))}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c)}-function ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Zk(a,c)}var Wk;-Wk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;"object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=-null,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a}throw Error(p(306,-d,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=-f,b.memoizedState=f,b.flags&256){e=Ki(Error(p(423)),b);b=mj(a,b,d,c,e);break a}else if(d!==e){e=Ki(Error(p(424)),b);b=mj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=$i(a,b,c);break a}Yi(a,b,d,c)}b=b.child}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),-hj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;-g=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return,-c,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Yi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c),-b.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c)}throw Error(p(156,b.tag));};function Gk(a,b){return ac(a,b)}-function al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new al(a,b,c,d)}function bj(a){a=a.prototype;return!(!a||!a.isReactComponent)}-function $k(a){if("function"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}-function wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};-c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}-function yh(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)bj(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ya:return Ah(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return qj(c,e,f,b);default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;-break a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,""));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Ah(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function qj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function xh(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}-function zh(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}-function bl(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=-null}function cl(a,b,c,d,e,f,g,h,k){a=new bl(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(f);return a}function dl(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:wa,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}-function el(a){if(!a)return Vf;a=a._reactInternals;a:{if(Vb(a)!==a||1!==a.tag)throw Error(p(170));var b=a;do{switch(b.tag){case 3:b=b.stateNode.context;break a;case 1:if(Zf(b.type)){b=b.stateNode.__reactInternalMemoizedMergedChildContext;break a}}b=b.return}while(null!==b);throw Error(p(171));}if(1===a.tag){var c=a.type;if(Zf(c))return bg(a,c,b)}return b}-function fl(a,b,c,d,e,f,g,h,k){a=cl(c,d,!0,a,e,f,g,h,k);a.context=el(null);c=a.current;d=L();e=lh(c);f=ch(d,e);f.callback=void 0!==b&&null!==b?b:null;dh(c,f,e);a.current.lanes=e;Ac(a,e,d);Ek(a,d);return a}function gl(a,b,c,d){var e=b.current,f=L(),g=lh(e);c=el(c);null===b.context?b.context=c:b.pendingContext=c;b=ch(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);a=dh(e,b,g);null!==a&&(mh(a,e,g,f),eh(a,e,g));return g}-function hl(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function il(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function jl(a,b){il(a,b);(a=a.alternate)&&il(a,b)}function kl(){return null}var ll="function"===typeof reportError?reportError:function(a){console.error(a)};function ml(a){this._internalRoot=a}-nl.prototype.render=ml.prototype.render=function(a){var b=this._internalRoot;if(null===b)throw Error(p(409));gl(a,b,null,null)};nl.prototype.unmount=ml.prototype.unmount=function(){var a=this._internalRoot;if(null!==a){this._internalRoot=null;var b=a.containerInfo;Sk(function(){gl(null,a,null,null)});b[uf]=null}};function nl(a){this._internalRoot=a}-nl.prototype.unstable_scheduleHydration=function(a){if(a){var b=Hc();a={blockedOn:null,target:a,priority:b};for(var c=0;c<Qc.length&&0!==b&&b<Qc[c].priority;c++);Qc.splice(c,0,a);0===c&&Vc(a)}};function ol(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType)}function pl(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function ql(){}-function rl(a,b,c,d,e){if(e){if("function"===typeof d){var f=d;d=function(){var a=hl(g);f.call(a)}}var g=fl(b,d,a,0,null,!1,!1,"",ql);a._reactRootContainer=g;a[uf]=g.current;sf(8===a.nodeType?a.parentNode:a);Sk();return g}for(;e=a.lastChild;)a.removeChild(e);if("function"===typeof d){var h=d;d=function(){var a=hl(k);h.call(a)}}var k=cl(a,0,!1,null,null,!1,!1,"",ql);a._reactRootContainer=k;a[uf]=k.current;sf(8===a.nodeType?a.parentNode:a);Sk(function(){gl(b,k,c,d)});return k}-function sl(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f;if("function"===typeof e){var h=e;e=function(){var a=hl(g);h.call(a)}}gl(b,g,a,e)}else g=rl(c,b,a,e,d);return hl(g)}Ec=function(a){switch(a.tag){case 3:var b=a.stateNode;if(b.current.memoizedState.isDehydrated){var c=tc(b.pendingLanes);0!==c&&(Cc(b,c|1),Ek(b,B()),0===(K&6)&&(Hj=B()+500,jg()))}break;case 13:Sk(function(){var b=Zg(a,1);if(null!==b){var c=L();mh(b,a,1,c)}}),jl(a,1)}};-Fc=function(a){if(13===a.tag){var b=Zg(a,134217728);if(null!==b){var c=L();mh(b,a,134217728,c)}jl(a,134217728)}};Gc=function(a){if(13===a.tag){var b=lh(a),c=Zg(a,b);if(null!==c){var d=L();mh(c,a,b,d)}jl(a,b)}};Hc=function(){return C};Ic=function(a,b){var c=C;try{return C=a,b()}finally{C=c}};-yb=function(a,b,c){switch(b){case "input":bb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Db(d);if(!e)throw Error(p(90));Wa(d);bb(d,e)}}}break;case "textarea":ib(a,c);break;case "select":b=c.value,null!=b&&fb(a,!!c.multiple,b,!1)}};Gb=Rk;Hb=Sk;-var tl={usingClientEntryPoint:!1,Events:[Cb,ue,Db,Eb,Fb,Rk]},ul={findFiberByHostInstance:Wc,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"};-var vl={bundleType:ul.bundleType,version:ul.version,rendererPackageName:ul.rendererPackageName,rendererConfig:ul.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ua.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=Zb(a);return null===a?null:a.stateNode},findFiberByHostInstance:ul.findFiberByHostInstance||-kl,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var wl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wl.isDisabled&&wl.supportsFiber)try{kc=wl.inject(vl),lc=wl}catch(a){}}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tl;-exports.createPortal=function(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ol(b))throw Error(p(200));return dl(a,b,null,c)};exports.createRoot=function(a,b){if(!ol(a))throw Error(p(299));var c=!1,d="",e=ll;null!==b&&void 0!==b&&(!0===b.unstable_strictMode&&(c=!0),void 0!==b.identifierPrefix&&(d=b.identifierPrefix),void 0!==b.onRecoverableError&&(e=b.onRecoverableError));b=cl(a,1,!1,null,null,c,!1,d,e);a[uf]=b.current;sf(8===a.nodeType?a.parentNode:a);return new ml(b)};-exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(p(188));a=Object.keys(a).join(",");throw Error(p(268,a));}a=Zb(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a){return Sk(a)};exports.hydrate=function(a,b,c){if(!pl(b))throw Error(p(200));return sl(null,a,b,!0,c)};-exports.hydrateRoot=function(a,b,c){if(!ol(a))throw Error(p(405));var d=null!=c&&c.hydratedSources||null,e=!1,f="",g=ll;null!==c&&void 0!==c&&(!0===c.unstable_strictMode&&(e=!0),void 0!==c.identifierPrefix&&(f=c.identifierPrefix),void 0!==c.onRecoverableError&&(g=c.onRecoverableError));b=fl(b,null,a,1,null!=c?c:null,e,!1,f,g);a[uf]=b.current;sf(a);if(d)for(a=0;a<d.length;a++)c=d[a],e=c._getVersion,e=e(c._source),null==b.mutableSourceEagerHydrationData?b.mutableSourceEagerHydrationData=[c,e]:b.mutableSourceEagerHydrationData.push(c,-e);return new nl(b)};exports.render=function(a,b,c){if(!pl(b))throw Error(p(200));return sl(null,a,b,!1,c)};exports.unmountComponentAtNode=function(a){if(!pl(a))throw Error(p(40));return a._reactRootContainer?(Sk(function(){sl(null,null,a,!1,function(){a._reactRootContainer=null;a[uf]=null})}),!0):!1};exports.unstable_batchedUpdates=Rk;-exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!pl(c))throw Error(p(200));if(null==a||void 0===a._reactInternals)throw Error(p(38));return sl(a,b,c,!1,d)};exports.version="18.2.0-next-9e3b772b8-20220608";---/***/ }),--/***/ 745:-/***/ ((__unused_webpack_module, exports, __webpack_require__) => {--"use strict";---var m = __webpack_require__(935);-if (true) {- exports.createRoot = m.createRoot;- exports.hydrateRoot = m.hydrateRoot;-} else { var i; }---/***/ }),--/***/ 935:-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {--"use strict";---function checkDCE() {- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */- if (- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'- ) {- return;- }- if (false) {}- try {- // Verify that the code above has been dead code eliminated (DCE'd).- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);- } catch (err) {- // DevTools shouldn't crash React, no matter what.- // We should still report in case we break this code.- console.error(err);- }-}--if (true) {- // DCE check should happen before ReactDOM bundle executes so that- // DevTools can report bad minification during injection.- checkDCE();- module.exports = __webpack_require__(448);-} else {}---/***/ }),--/***/ 921:-/***/ ((__unused_webpack_module, exports) => {--"use strict";-/** @license React v16.13.1- * react-is.production.min.js- *- * Copyright (c) Facebook, Inc. and its affiliates.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- */--var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?-Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;-function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;-exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};-exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};-exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;---/***/ }),--/***/ 864:-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {--"use strict";---if (true) {- module.exports = __webpack_require__(921);-} else {}---/***/ }),--/***/ 388:-/***/ (function(module, __unused_webpack_exports, __webpack_require__) {--!function(e,t){if(true)module.exports=t(__webpack_require__(294),__webpack_require__(935));else { var r, n; }}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(t,n){t.exports=e},function(e,t,n){e.exports=n(2)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(4);n.d(t,"Accordion",function(){return r.a}),n.d(t,"AccordionItem",function(){return o.a}),t.default=r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=n(0),u=n.n(c),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={},n}return i(t,e),a(t,[{key:"renderChildren",value:function(){var e=this;return u.a.Children.map(this.props.children,function(t){return u.a.cloneElement(t,{atomic:e.props.atomic})})}},{key:"render",value:function(){return u.a.createElement("div",{className:"accordion"},this.renderChildren())}}]),t}(c.Component);t.a=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=n(0),u=n.n(c),a=n(5),s=n.n(a),f=n(6),p=n.n(f),l=n(11),d=n.n(l),h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleDocumentClick=function(e){n.mounted&&!s.a.findDOMNode(n).contains(e.target)&&n.state.isOpen&&n.setState({isOpen:!1})},n.onClick=function(){n.setState({isOpen:!n.state.isOpen})},n.state={isOpen:!1},n.mounted=!0,n}return i(t,e),h(t,[{key:"componentDidMount",value:function(){this.props.atomic&&(document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,!1))}},{key:"componentWillUnmount",value:function(){this.mounted=!1,document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,!1)}},{key:"render",value:function(){var e=d()(["accordion-item",{active:this.state.isOpen}]);return u.a.createElement("div",{className:e},u.a.createElement("button",{className:"title",onClick:this.onClick},this.props.title),u.a.createElement("div",{className:"panel"},this.props.children))}}]),t}(c.Component);m.propTypes={title:p.a.string},m.defaultProps={title:"TITLE"},t.a=m},function(e,n){e.exports=t},function(e,t,n){e.exports=n(7)()},function(e,t,n){"use strict";var r=n(8),o=n(9),i=n(10);e.exports=function(){function e(e,t,n,r,c,u){u!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";function r(e,t,n,r,i,c,u,a){if(o(t),!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[n,r,i,c,u,a],p=0;s=new Error(t.replace(/%s/g,function(){return f[p++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var o=function(e){};e.exports=r},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var r,o;!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===o)for(var c in r)i.call(r,c)&&r[c]&&e.push(c)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!==typeof e&&e.exports?e.exports=n:(r=[],void 0!==(o=function(){return n}.apply(t,r))&&(e.exports=o))}()}])});-//# sourceMappingURL=index.js.map--/***/ }),--/***/ 471:-/***/ ((__unused_webpack_module, exports) => {--"use strict";-/**- * @license React- * react-is.production.min.js- *- * Copyright (c) Facebook, Inc. and its affiliates.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- */-var b=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),h=Symbol.for("react.context"),k=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),n=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),t=Symbol.for("react.offscreen"),u;u=Symbol.for("react.module.reference");-function v(a){if("object"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;-exports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};-exports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};-exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||"object"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;---/***/ }),--/***/ 143:-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {--"use strict";---if (true) {- module.exports = __webpack_require__(471);-} else {}---/***/ }),--/***/ 408:-/***/ ((__unused_webpack_module, exports) => {--"use strict";-/**- * @license React- * react.production.min.js- *- * Copyright (c) Facebook, Inc. and its affiliates.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- */-var l=Symbol.for("react.element"),n=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),z=Symbol.iterator;function A(a){if(null===a||"object"!==typeof a)return null;a=z&&a[z]||a["@@iterator"];return"function"===typeof a?a:null}-var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};-E.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;-H.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};-function M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];c.children=f}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===c[d]&&(c[d]=g[d]);return{$$typeof:l,type:a,key:k,ref:h,props:c,_owner:K.current}}-function N(a,b){return{$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return"object"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}var P=/\/+/g;function Q(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}-function R(a,b,e,d,c){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case l:case n:h=!0}}if(h)return h=a,c=c(h),a=""===d?"."+Q(h,0):d,I(c)?(e="",null!=a&&(e=a.replace(P,"$&/")+"/"),R(c,b,e,"",function(a){return a})):null!=c&&(O(c)&&(c=N(c,e+(!c.key||h&&h.key===c.key?"":(""+c.key).replace(P,"$&/")+"/")+a)),b.push(c)),1;h=0;d=""===d?".":d+":";if(I(a))for(var g=0;g<a.length;g++){k=-a[g];var f=d+Q(k,g);h+=R(k,b,e,f,c)}else if(f=A(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=d+Q(k,g++),h+=R(k,b,e,f,c);else if("object"===k)throw b=String(a),Error("Objects are not valid as a React child (found: "+("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");return h}-function S(a,b,e){if(null==a)return a;var d=[],c=0;R(a,d,"","",function(a){return b.call(e,a,c++)});return d}function T(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}-var U={current:null},V={transition:null},W={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:V,ReactCurrentOwner:K};exports.Children={map:S,forEach:function(a,b,e){S(a,function(){b.apply(this,arguments)},e)},count:function(a){var b=0;S(a,function(){b++});return b},toArray:function(a){return S(a,function(a){return a})||[]},only:function(a){if(!O(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};exports.Component=E;exports.Fragment=p;-exports.Profiler=r;exports.PureComponent=G;exports.StrictMode=q;exports.Suspense=w;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W;-exports.cloneElement=function(a,b,e){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var d=C({},a.props),c=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=K.current);void 0!==b.key&&(c=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)J.call(b,f)&&!L.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){g=Array(f);-for(var m=0;m<f;m++)g[m]=arguments[m+2];d.children=g}return{$$typeof:l,type:a.type,key:c,ref:k,props:d,_owner:h}};exports.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};-exports.forwardRef=function(a){return{$$typeof:v,render:a}};exports.isValidElement=O;exports.lazy=function(a){return{$$typeof:y,_payload:{_status:-1,_result:a},_init:T}};exports.memo=function(a,b){return{$$typeof:x,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=V.transition;V.transition={};try{a()}finally{V.transition=b}};exports.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.");};-exports.useCallback=function(a,b){return U.current.useCallback(a,b)};exports.useContext=function(a){return U.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return U.current.useDeferredValue(a)};exports.useEffect=function(a,b){return U.current.useEffect(a,b)};exports.useId=function(){return U.current.useId()};exports.useImperativeHandle=function(a,b,e){return U.current.useImperativeHandle(a,b,e)};-exports.useInsertionEffect=function(a,b){return U.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return U.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return U.current.useMemo(a,b)};exports.useReducer=function(a,b,e){return U.current.useReducer(a,b,e)};exports.useRef=function(a){return U.current.useRef(a)};exports.useState=function(a){return U.current.useState(a)};exports.useSyncExternalStore=function(a,b,e){return U.current.useSyncExternalStore(a,b,e)};-exports.useTransition=function(){return U.current.useTransition()};exports.version="18.2.0";---/***/ }),--/***/ 294:-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {--"use strict";---if (true) {- module.exports = __webpack_require__(408);-} else {}---/***/ }),--/***/ 53:-/***/ ((__unused_webpack_module, exports) => {--"use strict";-/**- * @license React- * scheduler.production.min.js- *- * Copyright (c) Facebook, Inc. and its affiliates.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- */-function f(a,b){var c=a.length;a.push(b);a:for(;0<c;){var d=c-1>>>1,e=a[d];if(0<g(e,b))a[d]=b,a[c]=e,c=d;else break a}}function h(a){return 0===a.length?null:a[0]}function k(a){if(0===a.length)return null;var b=a[0],c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length,w=e>>>1;d<w;){var m=2*(d+1)-1,C=a[m],n=m+1,x=a[n];if(0>g(C,c))n<e&&0>g(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(n<e&&0>g(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}-function g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if("object"===typeof performance&&"function"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D="function"===typeof setTimeout?setTimeout:null,E="function"===typeof clearTimeout?clearTimeout:null,F="undefined"!==typeof setImmediate?setImmediate:null;-"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}-function J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if("function"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;-function M(){return exports.unstable_now()-Q<P?!1:!0}function R(){if(null!==O){var a=exports.unstable_now();Q=a;var b=!0;try{b=O(!0,a)}finally{b?S():(N=!1,O=null)}}else N=!1}var S;if("function"===typeof F)S=function(){F(R)};else if("undefined"!==typeof MessageChannel){var T=new MessageChannel,U=T.port2;T.port1.onmessage=R;S=function(){U.postMessage(null)}}else S=function(){D(R,0)};function I(a){O=a;N||(N=!0,S())}function K(a,b){L=D(function(){a(exports.unstable_now())},b)}-exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){A||z||(A=!0,I(J))};-exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<a?Math.floor(1E3/a):5};exports.unstable_getCurrentPriorityLevel=function(){return y};exports.unstable_getFirstCallbackNode=function(){return h(r)};exports.unstable_next=function(a){switch(y){case 1:case 2:case 3:var b=3;break;default:b=y}var c=y;y=b;try{return a()}finally{y=c}};exports.unstable_pauseExecution=function(){};-exports.unstable_requestPaint=function(){};exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=y;y=a;try{return b()}finally{y=c}};-exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:u++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};-exports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};---/***/ }),--/***/ 840:-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {--"use strict";---if (true) {- module.exports = __webpack_require__(53);-} else {}---/***/ }),--/***/ 774:-/***/ ((module) => {--//--module.exports = function shallowEqual(objA, objB, compare, compareContext) {- var ret = compare ? compare.call(compareContext, objA, objB) : void 0;-- if (ret !== void 0) {- return !!ret;- }-- if (objA === objB) {- return true;- }-- if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) {- return false;- }-- var keysA = Object.keys(objA);- var keysB = Object.keys(objB);-- if (keysA.length !== keysB.length) {- return false;- }-- var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);-- // Test for A's keys different from B.- for (var idx = 0; idx < keysA.length; idx++) {- var key = keysA[idx];-- if (!bHasOwnProperty(key)) {- return false;- }-- var valueA = objA[key];- var valueB = objB[key];-- ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;-- if (ret === false || (ret === void 0 && valueA !== valueB)) {- return false;- }- }-- return true;-};---/***/ }),--/***/ 379:-/***/ ((module) => {--"use strict";---var stylesInDOM = [];-function getIndexByIdentifier(identifier) {- var result = -1;- for (var i = 0; i < stylesInDOM.length; i++) {- if (stylesInDOM[i].identifier === identifier) {- result = i;- break;- }- }- return result;-}-function modulesToDom(list, options) {- var idCountMap = {};- var identifiers = [];- for (var i = 0; i < list.length; i++) {- var item = list[i];- var id = options.base ? item[0] + options.base : item[0];- var count = idCountMap[id] || 0;- var identifier = "".concat(id, " ").concat(count);- idCountMap[id] = count + 1;- var indexByIdentifier = getIndexByIdentifier(identifier);- var obj = {- css: item[1],- media: item[2],- sourceMap: item[3],- supports: item[4],- layer: item[5]- };- if (indexByIdentifier !== -1) {- stylesInDOM[indexByIdentifier].references++;- stylesInDOM[indexByIdentifier].updater(obj);- } else {- var updater = addElementStyle(obj, options);- options.byIndex = i;- stylesInDOM.splice(i, 0, {- identifier: identifier,- updater: updater,- references: 1- });- }- identifiers.push(identifier);- }- return identifiers;-}-function addElementStyle(obj, options) {- var api = options.domAPI(options);- api.update(obj);- var updater = function updater(newObj) {- if (newObj) {- if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {- return;- }- api.update(obj = newObj);- } else {- api.remove();- }- };- return updater;-}-module.exports = function (list, options) {- options = options || {};- list = list || [];- var lastIdentifiers = modulesToDom(list, options);- return function update(newList) {- newList = newList || [];- for (var i = 0; i < lastIdentifiers.length; i++) {- var identifier = lastIdentifiers[i];- var index = getIndexByIdentifier(identifier);- stylesInDOM[index].references--;- }- var newLastIdentifiers = modulesToDom(newList, options);- for (var _i = 0; _i < lastIdentifiers.length; _i++) {- var _identifier = lastIdentifiers[_i];- var _index = getIndexByIdentifier(_identifier);- if (stylesInDOM[_index].references === 0) {- stylesInDOM[_index].updater();- stylesInDOM.splice(_index, 1);- }- }- lastIdentifiers = newLastIdentifiers;- };-};--/***/ }),--/***/ 569:-/***/ ((module) => {--"use strict";---var memo = {};--/* istanbul ignore next */-function getTarget(target) {- if (typeof memo[target] === "undefined") {- var styleTarget = document.querySelector(target);-- // Special case to return head of iframe instead of iframe itself- if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {- try {- // This will throw an exception if access to iframe is blocked- // due to cross-origin restrictions- styleTarget = styleTarget.contentDocument.head;- } catch (e) {- // istanbul ignore next- styleTarget = null;- }- }- memo[target] = styleTarget;- }- return memo[target];-}--/* istanbul ignore next */-function insertBySelector(insert, style) {- var target = getTarget(insert);- if (!target) {- throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");- }- target.appendChild(style);-}-module.exports = insertBySelector;--/***/ }),--/***/ 216:-/***/ ((module) => {--"use strict";---/* istanbul ignore next */-function insertStyleElement(options) {- var element = document.createElement("style");- options.setAttributes(element, options.attributes);- options.insert(element, options.options);- return element;-}-module.exports = insertStyleElement;--/***/ }),--/***/ 565:-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {--"use strict";---/* istanbul ignore next */-function setAttributesWithoutAttributes(styleElement) {- var nonce = true ? __webpack_require__.nc : 0;- if (nonce) {- styleElement.setAttribute("nonce", nonce);- }-}-module.exports = setAttributesWithoutAttributes;--/***/ }),--/***/ 795:-/***/ ((module) => {--"use strict";---/* istanbul ignore next */-function apply(styleElement, options, obj) {- var css = "";- if (obj.supports) {- css += "@supports (".concat(obj.supports, ") {");- }- if (obj.media) {- css += "@media ".concat(obj.media, " {");- }- var needLayer = typeof obj.layer !== "undefined";- if (needLayer) {- css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");- }- css += obj.css;- if (needLayer) {- css += "}";- }- if (obj.media) {- css += "}";- }- if (obj.supports) {- css += "}";- }- var sourceMap = obj.sourceMap;- if (sourceMap && typeof btoa !== "undefined") {- css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");- }-- // For old IE- /* istanbul ignore if */- options.styleTagTransform(css, styleElement, options.options);-}-function removeStyleElement(styleElement) {- // istanbul ignore if- if (styleElement.parentNode === null) {- return false;- }- styleElement.parentNode.removeChild(styleElement);-}--/* istanbul ignore next */-function domAPI(options) {- if (typeof document === "undefined") {- return {- update: function update() {},- remove: function remove() {}- };- }- var styleElement = options.insertStyleElement(options);- return {- update: function update(obj) {- apply(styleElement, options, obj);- },- remove: function remove() {- removeStyleElement(styleElement);- }- };-}-module.exports = domAPI;--/***/ }),--/***/ 589:-/***/ ((module) => {--"use strict";---/* istanbul ignore next */-function styleTagTransform(css, styleElement) {- if (styleElement.styleSheet) {- styleElement.styleSheet.cssText = css;- } else {- while (styleElement.firstChild) {- styleElement.removeChild(styleElement.firstChild);- }- styleElement.appendChild(document.createTextNode(css));- }-}-module.exports = styleTagTransform;--/***/ }),--/***/ 848:-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {--var parse = __webpack_require__(139);--/**- * Parses inline style to object.- *- * @example- * // returns { 'line-height': '42' }- * StyleToObject('line-height: 42;');- *- * @param {String} style - The inline style.- * @param {Function} [iterator] - The iterator function.- * @return {null|Object}- */-function StyleToObject(style, iterator) {- var output = null;- if (!style || typeof style !== 'string') {- return output;- }-- var declaration;- var declarations = parse(style);- var hasIterator = typeof iterator === 'function';- var property;- var value;-- for (var i = 0, len = declarations.length; i < len; i++) {- declaration = declarations[i];- property = declaration.property;- value = declaration.value;-- if (hasIterator) {- iterator(property, value, declaration);- } else if (value) {- output || (output = {});- output[property] = value;- }- }-- return output;-}--module.exports = StyleToObject;-module.exports["default"] = StyleToObject; // ESM support---/***/ })--/******/ });-/************************************************************************/-/******/ // The module cache-/******/ var __webpack_module_cache__ = {};-/******/-/******/ // The require function-/******/ function __webpack_require__(moduleId) {-/******/ // Check if module is in cache-/******/ var cachedModule = __webpack_module_cache__[moduleId];-/******/ if (cachedModule !== undefined) {-/******/ return cachedModule.exports;-/******/ }-/******/ // Create a new module (and put it into the cache)-/******/ var module = __webpack_module_cache__[moduleId] = {-/******/ id: moduleId,-/******/ // no module.loaded needed-/******/ exports: {}-/******/ };-/******/-/******/ // Execute the module function-/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);-/******/-/******/ // Return the exports of the module-/******/ return module.exports;-/******/ }-/******/-/************************************************************************/-/******/ /* webpack/runtime/compat get default export */-/******/ (() => {-/******/ // getDefaultExport function for compatibility with non-harmony modules-/******/ __webpack_require__.n = (module) => {-/******/ var getter = module && module.__esModule ?-/******/ () => (module['default']) :-/******/ () => (module);-/******/ __webpack_require__.d(getter, { a: getter });-/******/ return getter;-/******/ };-/******/ })();-/******/-/******/ /* webpack/runtime/define property getters */-/******/ (() => {-/******/ // define getter functions for harmony exports-/******/ __webpack_require__.d = (exports, definition) => {-/******/ for(var key in definition) {-/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {-/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });-/******/ }-/******/ }-/******/ };-/******/ })();-/******/-/******/ /* webpack/runtime/global */-/******/ (() => {-/******/ __webpack_require__.g = (function() {-/******/ if (typeof globalThis === 'object') return globalThis;-/******/ try {-/******/ return this || new Function('return this')();-/******/ } catch (e) {-/******/ if (typeof window === 'object') return window;-/******/ }-/******/ })();-/******/ })();-/******/-/******/ /* webpack/runtime/hasOwnProperty shorthand */-/******/ (() => {-/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))-/******/ })();-/******/-/******/ /* webpack/runtime/make namespace object */-/******/ (() => {-/******/ // define __esModule on exports-/******/ __webpack_require__.r = (exports) => {-/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {-/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });-/******/ }-/******/ Object.defineProperty(exports, '__esModule', { value: true });-/******/ };-/******/ })();-/******/-/******/ /* webpack/runtime/nonce */-/******/ (() => {-/******/ __webpack_require__.nc = undefined;-/******/ })();-/******/-/************************************************************************/-/******/-/******/ // startup-/******/ // Load entry module and return exports-/******/ __webpack_require__(375);-/******/ // This entry module is referenced by other modules so it can't be inlined-/******/ __webpack_require__(294);-/******/ var __webpack_exports__ = __webpack_require__(935);-/******/-/******/ return __webpack_exports__;-/******/ })()-;-});-//# sourceMappingURL=chatbot.js.map\ No newline at end of filediff --git a/packages/runtime/static/embodiment/chatBot/chatbot-v2.min.js b/packages/runtime/static/embodiment/chatBot/chatbot-v2.min.jsdeleted file mode 100644index 501a6da0..00000000--- a/packages/runtime/static/embodiment/chatBot/chatbot-v2.min.js+++ /dev/null@@ -1,3 +0,0 @@-/*! For license information please see chatbot.js.LICENSE.txt */-!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("SmythChatbot",[],t):"object"==typeof exports?exports.SmythChatbot=t():e.SmythChatbot=t()}(self,(()=>(()=>{var e={375:(e,t,n)=>{"use strict";var r={};n.r(r),n.d(r,{attentionMarkers:()=>Xr,contentInitial:()=>qr,disable:()=>Jr,document:()=>Vr,flow:()=>Gr,flowInitial:()=>Yr,insideSpan:()=>Kr,string:()=>Qr,text:()=>Zr});var o={};n.r(o),n.d(o,{boolean:()=>qo,booleanish:()=>Yo,commaOrSpaceSeparated:()=>Xo,commaSeparated:()=>Ko,number:()=>Qo,overloadedBoolean:()=>Go,spaceSeparated:()=>Zo});var a=n(745),i=n(379),l=n.n(i),c=n(795),s=n.n(c),u=n(569),f=n.n(u),d=n(565),p=n.n(d),h=n(216),g=n.n(h),m=n(589),b=n.n(m),y=n(424),v={};v.styleTagTransform=b(),v.setAttributes=p(),v.insert=f().bind(null,"head"),v.domAPI=s(),v.insertStyleElement=g(),l()(y.Z,v),y.Z&&y.Z.locals&&y.Z.locals;var A=n(294),k=n(697),w=n.n(k),x="#4fa94d",C={"aria-busy":!0,role:"status"},S=n(864),E=n(774),O=n.n(E);const z=function(e){function t(e,r,c,s,d){for(var p,h,g,m,A,w=0,x=0,C=0,S=0,E=0,L=0,_=g=p=0,N=0,M=0,I=0,D=0,R=c.length,H=R-1,U="",W="",$="",V="";N<R;){if(h=c.charCodeAt(N),N===H&&0!==x+S+C+w&&(0!==x&&(h=47===x?10:47),S=C=w=0,R++,H++),0===x+S+C+w){if(N===H&&(0<M&&(U=U.replace(f,"")),0<U.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:U+=c.charAt(N)}h=59}switch(h){case 123:for(p=(U=U.trim()).charCodeAt(0),g=1,D=++N;N<R;){switch(h=c.charCodeAt(N)){case 123:g++;break;case 125:g--;break;case 47:switch(h=c.charCodeAt(N+1)){case 42:case 47:e:{for(_=N+1;_<H;++_)switch(c.charCodeAt(_)){case 47:if(42===h&&42===c.charCodeAt(_-1)&&N+2!==_){N=_+1;break e}break;case 10:if(47===h){N=_+1;break e}}N=_}}break;case 91:h++;case 40:h++;case 34:case 39:for(;N++<H&&c.charCodeAt(N)!==h;);}if(0===g)break;N++}if(g=c.substring(D,N),0===p&&(p=(U=U.replace(u,"").trim()).charCodeAt(0)),64===p){switch(0<M&&(U=U.replace(f,"")),h=U.charCodeAt(1)){case 100:case 109:case 115:case 45:M=r;break;default:M=T}if(D=(g=t(r,M,g,h,d+1)).length,0<B&&(A=l(3,g,M=n(T,U,I),r,z,O,D,h,d,s),U=M.join(""),void 0!==A&&0===(D=(g=A.trim()).length)&&(h=0,g="")),0<D)switch(h){case 115:U=U.replace(k,i);case 100:case 109:case 45:g=U+"{"+g+"}";break;case 107:g=(U=U.replace(b,"$1 $2"))+"{"+g+"}",g=1===F||2===F&&a("@"+g,3)?"@-webkit-"+g+"@"+g:"@"+g;break;default:g=U+g,112===s&&(W+=g,g="")}else g=""}else g=t(r,n(r,U,I),g,s,d+1);$+=g,g=I=M=_=p=0,U="",h=c.charCodeAt(++N);break;case 125:case 59:if(1<(D=(U=(0<M?U.replace(f,""):U).trim()).length))switch(0===_&&(p=U.charCodeAt(0),45===p||96<p&&123>p)&&(D=(U=U.replace(" ",":")).length),0<B&&void 0!==(A=l(1,U,r,e,z,O,W.length,s,d,s))&&0===(D=(U=A.trim()).length)&&(U="\0\0"),p=U.charCodeAt(0),h=U.charCodeAt(1),p){case 0:break;case 64:if(105===h||99===h){V+=U+c.charAt(N);break}default:58!==U.charCodeAt(D-1)&&(W+=o(U,p,h,U.charCodeAt(2)))}I=M=_=p=0,U="",h=c.charCodeAt(++N)}}switch(h){case 13:case 10:47===x?x=0:0===1+p&&107!==s&&0<U.length&&(M=1,U+="\0"),0<B*j&&l(0,U,r,e,z,O,W.length,s,d,s),O=1,z++;break;case 59:case 125:if(0===x+S+C+w){O++;break}default:switch(O++,m=c.charAt(N),h){case 9:case 32:if(0===S+w+x)switch(E){case 44:case 58:case 9:case 32:m="";break;default:32!==h&&(m=" ")}break;case 0:m="\\0";break;case 12:m="\\f";break;case 11:m="\\v";break;case 38:0===S+x+w&&(M=I=1,m="\f"+m);break;case 108:if(0===S+x+w+P&&0<_)switch(N-_){case 2:112===E&&58===c.charCodeAt(N-3)&&(P=E);case 8:111===L&&(P=L)}break;case 58:0===S+x+w&&(_=N);break;case 44:0===x+C+S+w&&(M=1,m+="\r");break;case 34:case 39:0===x&&(S=S===h?0:0===S?h:S);break;case 91:0===S+x+C&&w++;break;case 93:0===S+x+C&&w--;break;case 41:0===S+x+w&&C--;break;case 40:0===S+x+w&&(0===p&&(2*E+3*L==533||(p=1)),C++);break;case 64:0===x+C+S+w+_+g&&(g=1);break;case 42:case 47:if(!(0<S+w+C))switch(x){case 0:switch(2*h+3*c.charCodeAt(N+1)){case 235:x=47;break;case 220:D=N,x=42}break;case 42:47===h&&42===E&&D+2!==N&&(33===c.charCodeAt(D+2)&&(W+=c.substring(D,N+1)),m="",x=0)}}0===x&&(U+=m)}L=E,E=h,N++}if(0<(D=W.length)){if(M=r,0<B&&void 0!==(A=l(2,W,M,e,z,O,D,s,d,s))&&0===(W=A).length)return V+W+$;if(W=M.join(",")+"{"+W+"}",0!=F*P){switch(2!==F||a(W,2)||(P=0),P){case 111:W=W.replace(v,":-moz-$1")+W;break;case 112:W=W.replace(y,"::-webkit-input-$1")+W.replace(y,"::-moz-$1")+W.replace(y,":-ms-input-$1")+W}P=0}}return V+W+$}function n(e,t,n){var o=t.trim().split(g);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var l=0;for(e=0===i?"":e[0]+" ";l<a;++l)t[l]=r(e,t[l],n).trim();break;default:var c=l=0;for(t=[];l<a;++l)for(var s=0;s<i;++s)t[c++]=r(e[s]+" ",o[l],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,n,r){var i=e+";",l=2*t+3*n+4*r;if(944===l){e=i.indexOf(":",9)+1;var c=i.substring(e,i.length-1).trim();return c=i.substring(0,e).trim()+c+";",1===F||2===F&&a(c,1)?"-webkit-"+c+c:c}if(0===F||2===F&&!a(i,1))return i;switch(l){case 1015:return 97===i.charCodeAt(10)?"-webkit-"+i+i:i;case 951:return 116===i.charCodeAt(3)?"-webkit-"+i+i:i;case 963:return 110===i.charCodeAt(5)?"-webkit-"+i+i:i;case 1009:if(100!==i.charCodeAt(4))break;case 969:case 942:return"-webkit-"+i+i;case 978:return"-webkit-"+i+"-moz-"+i+i;case 1019:case 983:return"-webkit-"+i+"-moz-"+i+"-ms-"+i+i;case 883:if(45===i.charCodeAt(8))return"-webkit-"+i+i;if(0<i.indexOf("image-set(",11))return i.replace(E,"$1-webkit-$2")+i;break;case 932:if(45===i.charCodeAt(4))switch(i.charCodeAt(5)){case 103:return"-webkit-box-"+i.replace("-grow","")+"-webkit-"+i+"-ms-"+i.replace("grow","positive")+i;case 115:return"-webkit-"+i+"-ms-"+i.replace("shrink","negative")+i;case 98:return"-webkit-"+i+"-ms-"+i.replace("basis","preferred-size")+i}return"-webkit-"+i+"-ms-"+i+i;case 964:return"-webkit-"+i+"-ms-flex-"+i+i;case 1023:if(99!==i.charCodeAt(8))break;return"-webkit-box-pack"+(c=i.substring(i.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+i+"-ms-flex-pack"+c+i;case 1005:return p.test(i)?i.replace(d,":-webkit-")+i.replace(d,":-moz-")+i:i;case 1e3:switch(t=(c=i.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=i.replace(A,"tb");break;case 232:c=i.replace(A,"tb-rl");break;case 220:c=i.replace(A,"lr");break;default:return i}return"-webkit-"+i+"-ms-"+c+i;case 1017:if(-1===i.indexOf("sticky",9))break;case 975:switch(t=(i=e).length-10,l=(c=(33===i.charCodeAt(t)?i.substring(0,t):i).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(111>c.charCodeAt(8))break;case 115:i=i.replace(c,"-webkit-"+c)+";"+i;break;case 207:case 102:i=i.replace(c,"-webkit-"+(102<l?"inline-":"")+"box")+";"+i.replace(c,"-webkit-"+c)+";"+i.replace(c,"-ms-"+c+"box")+";"+i}return i+";";case 938:if(45===i.charCodeAt(5))switch(i.charCodeAt(6)){case 105:return c=i.replace("-items",""),"-webkit-"+i+"-webkit-box-"+c+"-ms-flex-"+c+i;case 115:return"-webkit-"+i+"-ms-flex-item-"+i.replace(x,"")+i;default:return"-webkit-"+i+"-ms-flex-line-pack"+i.replace("align-content","").replace(x,"")+i}break;case 973:case 989:if(45!==i.charCodeAt(3)||122===i.charCodeAt(4))break;case 931:case 953:if(!0===S.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):i.replace(c,"-webkit-"+c)+i.replace(c,"-moz-"+c.replace("fill-",""))+i;break;case 962:if(i="-webkit-"+i+(102===i.charCodeAt(5)?"-ms-"+i:"")+i,211===n+r&&105===i.charCodeAt(13)&&0<i.indexOf("transform",10))return i.substring(0,i.indexOf(";",27)+1).replace(h,"$1-webkit-$2")+i}return i}function a(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),_(2!==t?r:r.replace(C,"$1"),n,t)}function i(e,t){var n=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(w," or ($1)").substring(4):"("+t+")"}function l(e,t,n,r,o,a,i,l,c,u){for(var f,d=0,p=t;d<B;++d)switch(f=L[d].call(s,e,p,n,r,o,a,i,l,c,u)){case void 0:case!1:case!0:case null:break;default:p=f}if(p!==t)return p}function c(e){return void 0!==(e=e.prefix)&&(_=null,e?"function"!=typeof e?F=1:(F=2,_=e):F=0),c}function s(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<B){var o=l(-1,n,r,r,z,O,0,0,0,0);void 0!==o&&"string"==typeof o&&(n=o)}var a=t(T,r,n,0,0);return 0<B&&void 0!==(o=l(-2,a,r,r,z,O,a.length,0,0,0))&&(a=o),P=0,O=z=1,a}var u=/^\0+/g,f=/[\0\r\f]/g,d=/: */g,p=/zoo|gra/,h=/([,: ])(transform)/g,g=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,b=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,v=/:(read-only)/g,A=/[svh]\w+-[tblr]{2}/,k=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,x=/-self|flex-/g,C=/[^]*?(:[rp][el]a[\w-]+)[^]*/,S=/stretch|:\s*\w+\-(?:conte|avail)/,E=/([^-])(image-set\()/,O=1,z=1,P=0,F=1,T=[],L=[],B=0,_=null,j=0;return s.use=function e(t){switch(t){case void 0:case null:B=L.length=0;break;default:if("function"==typeof t)L[B++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else j=0|!!t}return e},s.set=c,void 0!==e&&c(e),s},P={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function F(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var T=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,L=F((function(e){return T.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),B=n(679),_=n.n(B);function j(){return(j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var N=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},M=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!(0,S.typeOf)(e)},I=Object.freeze([]),D=Object.freeze({});function R(e){return"function"==typeof e}function H(e){return e.displayName||e.name||"Component"}function U(e){return e&&"string"==typeof e.styledComponentId}var W="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",$="undefined"!=typeof window&&"HTMLElement"in window,V=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&(void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY));function q(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var Y=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&q(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var a=r;a<o;a++)this.groupSizes[a]=0}for(var i=this.indexOfGroup(e+1),l=0,c=t.length;l<c;l++)this.tag.insertRule(i,t[l])&&(this.groupSizes[e]++,i++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,a=r;a<o;a++)t+=this.tag.getRule(a)+"/*!sc*/\n";return t},e}(),G=new Map,Q=new Map,Z=1,K=function(e){if(G.has(e))return G.get(e);for(;Q.has(Z);)Z++;var t=Z++;return G.set(e,t),Q.set(t,e),t},X=function(e){return Q.get(e)},J=function(e,t){t>=Z&&(Z=t+1),G.set(e,t),Q.set(t,e)},ee="style["+W+'][data-styled-version="5.3.11"]',te=new RegExp("^"+W+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),ne=function(e,t,n){for(var r,o=n.split(","),a=0,i=o.length;a<i;a++)(r=o[a])&&e.registerName(t,r)},re=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],o=0,a=n.length;o<a;o++){var i=n[o].trim();if(i){var l=i.match(te);if(l){var c=0|parseInt(l[1],10),s=l[2];0!==c&&(J(s,c),ne(e,s,l[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(i)}}},oe=function(){return n.nc},ae=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(W))return r}}(n),a=void 0!==o?o.nextSibling:null;r.setAttribute(W,"active"),r.setAttribute("data-styled-version","5.3.11");var i=oe();return i&&r.setAttribute("nonce",i),n.insertBefore(r,a),r},ie=function(){function e(e){var t=this.element=ae(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}q(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),le=function(){function e(e){var t=this.element=ae(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),ce=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),se=$,ue={isServer:!$,useCSSOMInjection:!V},fe=function(){function e(e,t,n){void 0===e&&(e=D),void 0===t&&(t={}),this.options=j({},ue,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&$&&se&&(se=!1,function(e){for(var t=document.querySelectorAll(ee),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(W)&&(re(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return K(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(j({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new ce(o):r?new ie(o):new le(o),new Y(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(K(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(K(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(K(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var a=X(o);if(void 0!==a){var i=e.names.get(a),l=t.getGroup(o);if(i&&l&&i.size){var c=W+".g"+o+'[id="'+a+'"]',s="";void 0!==i&&i.forEach((function(e){e.length>0&&(s+=e+",")})),r+=""+l+c+'{content:"'+s+'"}/*!sc*/\n'}}}return r}(this)},e}(),de=/(a)(d)/gi,pe=function(e){return String.fromCharCode(e+(e>25?39:97))};function he(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=pe(t%52)+n;return(pe(t%52)+n).replace(de,"$1-$2")}var ge=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},me=function(e){return ge(5381,e)};function be(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(R(n)&&!U(n))return!1}return!0}var ye=me("5.3.11"),ve=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&be(e),this.componentId=t,this.baseHash=ge(ye,t),this.baseStyle=n,fe.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var a=Ne(this.rules,e,t,n).join(""),i=he(ge(this.baseHash,a)>>>0);if(!t.hasNameForId(r,i)){var l=n(a,"."+i,void 0,r);t.insertRules(r,i,l)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,s=ge(this.baseHash,n.hash),u="",f=0;f<c;f++){var d=this.rules[f];if("string"==typeof d)u+=d;else if(d){var p=Ne(d,e,t,n),h=Array.isArray(p)?p.join(""):p;s=ge(s,h+f),u+=h}}if(u){var g=he(s>>>0);if(!t.hasNameForId(r,g)){var m=n(u,"."+g,void 0,r);t.insertRules(r,g,m)}o.push(g)}}return o.join(" ")},e}(),Ae=/^\s*\/\/.*$/gm,ke=[":","[",".","#"];function we(e){var t,n,r,o,a=void 0===e?D:e,i=a.options,l=void 0===i?D:i,c=a.plugins,s=void 0===c?I:c,u=new z(l),f=[],d=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,a,i,l,c,s,u,f){switch(n){case 1:if(0===u&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===s)return r+"/*|*/";break;case 3:switch(s){case 102:case 112:return e(o[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),p=function(e,r,a){return 0===r&&-1!==ke.indexOf(a[n.length])||a.match(o)?e:"."+t};function h(e,a,i,l){void 0===l&&(l="&");var c=e.replace(Ae,""),s=a&&i?i+" "+a+" { "+c+" }":c;return t=l,n=a,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),u(i||!a?"":a,s)}return u.use([].concat(s,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,p))},d,function(e){if(-2===e){var t=f;return f=[],t}}])),h.hash=s.length?s.reduce((function(e,t){return t.name||q(15),ge(e,t.name)}),5381).toString():"",h}var xe=A.createContext(),Ce=(xe.Consumer,A.createContext()),Se=(Ce.Consumer,new fe),Ee=we();function Oe(){return(0,A.useContext)(xe)||Se}function ze(e){var t=(0,A.useState)(e.stylisPlugins),n=t[0],r=t[1],o=Oe(),a=(0,A.useMemo)((function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),i=(0,A.useMemo)((function(){return we({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return(0,A.useEffect)((function(){O()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),A.createElement(xe.Provider,{value:a},A.createElement(Ce.Provider,{value:i},e.children))}var Pe=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Ee);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return q(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Ee),this.name+e.hash},e}(),Fe=/([A-Z])/,Te=/([A-Z])/g,Le=/^ms-/,Be=function(e){return"-"+e.toLowerCase()};function _e(e){return Fe.test(e)?e.replace(Te,Be).replace(Le,"-ms-"):e}var je=function(e){return null==e||!1===e||""===e};function Ne(e,t,n,r){if(Array.isArray(e)){for(var o,a=[],i=0,l=e.length;i<l;i+=1)""!==(o=Ne(e[i],t,n,r))&&(Array.isArray(o)?a.push.apply(a,o):a.push(o));return a}return je(e)?"":U(e)?"."+e.styledComponentId:R(e)?"function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t?e:Ne(e(t),t,n,r):e instanceof Pe?n?(e.inject(n,r),e.getName(r)):e:M(e)?function e(t,n){var r,o,a=[];for(var i in t)t.hasOwnProperty(i)&&!je(t[i])&&(Array.isArray(t[i])&&t[i].isCss||R(t[i])?a.push(_e(i)+":",t[i],";"):M(t[i])?a.push.apply(a,e(t[i],i)):a.push(_e(i)+": "+(r=i,(null==(o=t[i])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in P||r.startsWith("--")?String(o).trim():o+"px")+";")));return n?[n+" {"].concat(a,["}"]):a}(e):e.toString();var c}var Me=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Ie(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return R(e)||M(e)?Me(Ne(N(I,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:Me(Ne(N(e,n)))}new Set;var De=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Re=/(^-|-$)/g;function He(e){return e.replace(De,"-").replace(Re,"")}var Ue=function(e){return he(me(e)>>>0)};function We(e){return"string"==typeof e&&!0}var $e=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Ve=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function qe(e,t,n){var r=e[n];$e(t)&&$e(r)?Ye(r,t):e[n]=t}function Ye(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,a=n;o<a.length;o++){var i=a[o];if($e(i))for(var l in i)Ve(l)&&qe(e,i[l],l)}return e}var Ge=A.createContext();Ge.Consumer;var Qe={};function Ze(e,t,n){var r=U(e),o=!We(e),a=t.attrs,i=void 0===a?I:a,l=t.componentId,c=void 0===l?function(e,t){var n="string"!=typeof e?"sc":He(e);Qe[n]=(Qe[n]||0)+1;var r=n+"-"+Ue("5.3.11"+n+Qe[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):l,s=t.displayName,u=void 0===s?function(e){return We(e)?"styled."+e:"Styled("+H(e)+")"}(e):s,f=t.displayName&&t.componentId?He(t.displayName)+"-"+t.componentId:t.componentId||c,d=r&&e.attrs?Array.prototype.concat(e.attrs,i).filter(Boolean):i,p=t.shouldForwardProp;r&&e.shouldForwardProp&&(p=t.shouldForwardProp?function(n,r,o){return e.shouldForwardProp(n,r,o)&&t.shouldForwardProp(n,r,o)}:e.shouldForwardProp);var h,g=new ve(n,f,r?e.componentStyle:void 0),m=g.isStatic&&0===i.length,b=function(e,t){return function(e,t,n,r){var o=e.attrs,a=e.componentStyle,i=e.defaultProps,l=e.foldedComponentIds,c=e.shouldForwardProp,s=e.styledComponentId,u=e.target,f=function(e,t,n){void 0===e&&(e=D);var r=j({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,a,i=e;for(t in R(i)&&(i=i(r)),i)r[t]=o[t]="className"===t?(n=o[t],a=i[t],n&&a?n+" "+a:n||a):i[t]})),[r,o]}(function(e,t,n){return void 0===n&&(n=D),e.theme!==n.theme&&e.theme||t||n.theme}(t,(0,A.useContext)(Ge),i)||D,t,o),d=f[0],p=f[1],h=function(e,t,n,r){var o=Oe(),a=(0,A.useContext)(Ce)||Ee;return t?e.generateAndInjectStyles(D,o,a):e.generateAndInjectStyles(n,o,a)}(a,r,d),g=n,m=p.$as||t.$as||p.as||t.as||u,b=We(m),y=p!==t?j({},t,{},p):t,v={};for(var k in y)"$"!==k[0]&&"as"!==k&&("forwardedAs"===k?v.as=y[k]:(c?c(k,L,m):!b||L(k))&&(v[k]=y[k]));return t.style&&p.style!==t.style&&(v.style=j({},t.style,{},p.style)),v.className=Array.prototype.concat(l,s,h!==s?h:null,t.className,p.className).filter(Boolean).join(" "),v.ref=g,(0,A.createElement)(m,v)}(h,e,t,m)};return b.displayName=u,(h=A.forwardRef(b)).attrs=d,h.componentStyle=g,h.displayName=u,h.shouldForwardProp=p,h.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):I,h.styledComponentId=f,h.target=r?e.target:e,h.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["componentId"]),a=r&&r+"-"+(We(e)?e:He(H(e)));return Ze(e,j({},o,{attrs:d,componentId:a}),n)},Object.defineProperty(h,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Ye({},e.defaultProps,t):t}}),Object.defineProperty(h,"toString",{value:function(){return"."+h.styledComponentId}}),o&&_()(h,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),h}var Ke,Xe=function(e){return function e(t,n,r){if(void 0===r&&(r=D),!(0,S.isValidElementType)(n))return q(1,String(n));var o=function(){return t(n,r,Ie.apply(void 0,arguments))};return o.withConfig=function(o){return e(t,n,j({},r,{},o))},o.attrs=function(o){return e(t,n,j({},r,{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o}(Ze,e)};function Je(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Ie.apply(void 0,[e].concat(n)).join(""),a=Ue(o);return new Pe(a,o)}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","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","noscript","object","ol","optgroup","option","output","p","param","picture","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","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Xe[e]=Xe(e)})),(Ke=function(e,t){this.rules=e,this.componentId=t,this.isStatic=be(e),fe.registerId(this.componentId+1)}.prototype).createStyles=function(e,t,n,r){var o=r(Ne(this.rules,t,n,r).join(""),""),a=this.componentId+e;n.insertRules(a,a,o)},Ke.removeStyles=function(e,t){t.clearRules(this.componentId+e)},Ke.renderStyles=function(e,t,n,r){e>2&&fe.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},function(){var e=function(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=oe();return"<style "+[n&&'nonce="'+n+'"',W+'="true"','data-styled-version="5.3.11"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?q(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return q(2);var n=((t={})[W]="",t["data-styled-version"]="5.3.11",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=oe();return r&&(n.nonce=r),[A.createElement("style",j({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new fe({isServer:!0}),this.sealed=!1}.prototype;e.collectStyles=function(e){return this.sealed?q(2):A.createElement(ze,{sheet:this.instance},e)},e.interleaveWithNodeStream=function(e){return q(3)}}();const et=Xe;var tt,nt,rt=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},ot=242.776657104492,at=Je(tt||(tt=rt(["\n 12.5% {\n stroke-dasharray: ","px, ","px;\n stroke-dashoffset: -","px;\n }\n 43.75% {\n stroke-dasharray: ","px, ","px;\n stroke-dashoffset: -","px;\n }\n 100% {\n stroke-dasharray: ","px, ","px;\n stroke-dashoffset: -","px;\n }\n"],["\n 12.5% {\n stroke-dasharray: ","px, ","px;\n stroke-dashoffset: -","px;\n }\n 43.75% {\n stroke-dasharray: ","px, ","px;\n stroke-dashoffset: -","px;\n }\n 100% {\n stroke-dasharray: ","px, ","px;\n stroke-dashoffset: -","px;\n }\n"])),.14*ot,ot,.11*ot,.35*ot,ot,.35*ot,.01*ot,ot,.99*ot);et.path(nt||(nt=rt(["\n stroke-dasharray: ","px, ",";\n stroke-dashoffset: 0;\n animation: "," ","s linear infinite;\n"],["\n stroke-dasharray: ","px, ",";\n stroke-dashoffset: 0;\n animation: "," ","s linear infinite;\n"])),.01*ot,ot,at,1.6);var it=function(e){return{display:e?"flex":"none"}},lt=function(){return lt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},lt.apply(this,arguments)},ct=function(e,t,n){var r=Math.max(e,t),o=-n-r/2+1,a=2*n+r;return[o,o,a,a].join(" ")};const st=function(e){var t,n=e.height,r=void 0===n?80:n,o=e.width,a=void 0===o?80:o,i=e.color,l=void 0===i?x:i,c=e.secondaryColor,s=void 0===c?x:c,u=e.ariaLabel,f=void 0===u?"oval-loading":u,d=e.wrapperStyle,p=e.wrapperClass,h=e.visible,g=void 0===h||h,m=e.strokeWidth,b=void 0===m?2:m,y=e.strokeWidthSecondary;return A.createElement("div",lt({style:lt(lt({},it(g)),d),className:p,"data-testid":"oval-loading","aria-label":f},C),A.createElement("svg",{width:a,height:r,viewBox:ct(Number(b),Number(y||b),20),xmlns:"http://www.w3.org/2000/svg",stroke:l,"data-testid":"oval-svg"},A.createElement("g",{fill:"none",fillRule:"evenodd"},A.createElement("g",{transform:"translate(1 1)",strokeWidth:Number(y||b),"data-testid":"oval-secondary-group"},A.createElement("circle",{strokeOpacity:".5",cx:"0",cy:"0",r:20,stroke:s,strokeWidth:b}),A.createElement("path",{d:(t=20,["M"+t+" 0c0-9.94-8.06",t,t,t].join("-"))},A.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 0 0",to:"360 0 0",dur:"1s",repeatCount:"indefinite"}))))))};var ut,ft,dt,pt=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},ht=function(){return ht=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ht.apply(this,arguments)},gt=Je(ut||(ut=pt(["\n to {\n transform: rotate(360deg);\n }\n"],["\n to {\n transform: rotate(360deg);\n }\n"]))),mt=[0,30,60,90,120,150,180,210,240,270,300,330],bt=et.svg(ft||(ft=pt(["\n animation: "," 0.75s steps(12, end) infinite;\n animation-duration: ","s;\n"],["\n animation: "," 0.75s steps(12, end) infinite;\n animation-duration: ","s;\n"])),gt,function(e,t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(void 0!==n[e])return n[e];if(e&&e.indexOf(".")>0){for(var r=e.split("."),o=r.length,a=n[r[0]],i=1;null!=a&&i<o;)a=a[r[i]],i+=1;if(void 0!==a)return a}return t}}("speed","0.75")),yt=et.polyline(dt||(dt=pt(["\n stroke-width: ","px;\n stroke-linecap: round;\n\n &:nth-child(12n + 0) {\n stroke-opacity: 0.08;\n }\n\n &:nth-child(12n + 1) {\n stroke-opacity: 0.17;\n }\n\n &:nth-child(12n + 2) {\n stroke-opacity: 0.25;\n }\n\n &:nth-child(12n + 3) {\n stroke-opacity: 0.33;\n }\n\n &:nth-child(12n + 4) {\n stroke-opacity: 0.42;\n }\n\n &:nth-child(12n + 5) {\n stroke-opacity: 0.5;\n }\n\n &:nth-child(12n + 6) {\n stroke-opacity: 0.58;\n }\n\n &:nth-child(12n + 7) {\n stroke-opacity: 0.66;\n }\n\n &:nth-child(12n + 8) {\n stroke-opacity: 0.75;\n }\n\n &:nth-child(12n + 9) {\n stroke-opacity: 0.83;\n }\n\n &:nth-child(12n + 11) {\n stroke-opacity: 0.92;\n }\n"],["\n stroke-width: ","px;\n stroke-linecap: round;\n\n &:nth-child(12n + 0) {\n stroke-opacity: 0.08;\n }\n\n &:nth-child(12n + 1) {\n stroke-opacity: 0.17;\n }\n\n &:nth-child(12n + 2) {\n stroke-opacity: 0.25;\n }\n\n &:nth-child(12n + 3) {\n stroke-opacity: 0.33;\n }\n\n &:nth-child(12n + 4) {\n stroke-opacity: 0.42;\n }\n\n &:nth-child(12n + 5) {\n stroke-opacity: 0.5;\n }\n\n &:nth-child(12n + 6) {\n stroke-opacity: 0.58;\n }\n\n &:nth-child(12n + 7) {\n stroke-opacity: 0.66;\n }\n\n &:nth-child(12n + 8) {\n stroke-opacity: 0.75;\n }\n\n &:nth-child(12n + 9) {\n stroke-opacity: 0.83;\n }\n\n &:nth-child(12n + 11) {\n stroke-opacity: 0.92;\n }\n"])),(function(e){return e.width}));function vt(e){var t=e.strokeColor,n=void 0===t?x:t,r=e.strokeWidth,o=void 0===r?"5":r,a=e.animationDuration,i=void 0===a?"0.75":a,l=e.width,c=void 0===l?"96":l,s=e.visible,u=void 0===s||s,f=e.ariaLabel,d=void 0===f?"rotating-lines-loading":f,p=(0,A.useCallback)((function(){return mt.map((function(e){return A.createElement(yt,{key:e,points:"24,12 24,4",width:o,transform:"rotate(".concat(e,", 24, 24)")})}))}),[o]);return u?A.createElement(bt,ht({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:c,stroke:n,speed:i,"data-testid":"rotating-lines-svg","aria-label":d},C),p()):null}var At=function(){return At=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},At.apply(this,arguments)};const kt=function(e){var t=e.height,n=void 0===t?80:t,r=e.width,o=void 0===r?80:r,a=e.radius,i=void 0===a?9:a,l=e.color,c=void 0===l?x:l,s=e.ariaLabel,u=void 0===s?"three-dots-loading":s,f=e.wrapperStyle,d=e.wrapperClass,p=e.visible,h=void 0===p||p;return A.createElement("div",At({style:At(At({},it(h)),f),className:d,"data-testid":"three-dots-loading","aria-label":u},C),A.createElement("svg",{width:o,height:n,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:c,"data-testid":"three-dots-svg"},A.createElement("circle",{cx:"15",cy:"15",r:Number(i)+6},A.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),A.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),A.createElement("circle",{cx:"60",cy:"15",r:i,attributeName:"fill-opacity",from:"1",to:"0.3"},A.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),A.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),A.createElement("circle",{cx:"105",cy:"15",r:Number(i)+6},A.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),A.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"}))))};var wt,xt,Ct,St=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},Et=Je(wt||(wt=St(["\n to {\n stroke-dashoffset: 136;\n }\n"],["\n to {\n stroke-dashoffset: 136;\n }\n"])));et.polygon(xt||(xt=St(["\n stroke-dasharray: 17;\n animation: "," 2.5s cubic-bezier(0.35, 0.04, 0.63, 0.95) infinite;\n"],["\n stroke-dasharray: 17;\n animation: "," 2.5s cubic-bezier(0.35, 0.04, 0.63, 0.95) infinite;\n"])),Et),et.svg(Ct||(Ct=St(["\n transform-origin: 50% 65%;\n"],["\n transform-origin: 50% 65%;\n"])));var Ot=n(388),zt=n(660),Pt=n.n(zt),Ft="",Tt=[{name:"twilight",value:{'code[class*="language-"]':{color:"white",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",textShadow:"0 -.1em .2em black",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"white",background:"hsl(0, 0%, 8%)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",textShadow:"0 -.1em .2em black",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",borderRadius:".5em",border:".3em solid hsl(0, 0%, 33%)",boxShadow:"1px 1px .5em black inset",margin:".5em 0",overflow:"auto",padding:"1em"},':not(pre) > code[class*="language-"]':{background:"hsl(0, 0%, 8%)",borderRadius:".3em",border:".13em solid hsl(0, 0%, 33%)",boxShadow:"1px 1px .3em -.1em black inset",padding:".15em .2em .05em",whiteSpace:"normal"},'pre[class*="language-"]::-moz-selection':{background:"hsla(0, 0%, 93%, 0.15)",textShadow:"none"},'pre[class*="language-"]::selection':{background:"hsla(0, 0%, 93%, 0.15)",textShadow:"none"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"]::selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"] ::selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},comment:{color:"hsl(0, 0%, 47%)"},prolog:{color:"hsl(0, 0%, 47%)"},doctype:{color:"hsl(0, 0%, 47%)"},cdata:{color:"hsl(0, 0%, 47%)"},punctuation:{Opacity:".7"},namespace:{Opacity:".7"},tag:{color:"hsl(14, 58%, 55%)"},boolean:{color:"hsl(14, 58%, 55%)"},number:{color:"hsl(14, 58%, 55%)"},deleted:{color:"hsl(14, 58%, 55%)"},keyword:{color:"hsl(53, 89%, 79%)"},property:{color:"hsl(53, 89%, 79%)"},selector:{color:"hsl(53, 89%, 79%)"},constant:{color:"hsl(53, 89%, 79%)"},symbol:{color:"hsl(53, 89%, 79%)"},builtin:{color:"hsl(53, 89%, 79%)"},"attr-name":{color:"hsl(76, 21%, 52%)"},"attr-value":{color:"hsl(76, 21%, 52%)"},string:{color:"hsl(76, 21%, 52%)"},char:{color:"hsl(76, 21%, 52%)"},operator:{color:"hsl(76, 21%, 52%)"},entity:{color:"hsl(76, 21%, 52%)",cursor:"help"},url:{color:"hsl(76, 21%, 52%)"},".language-css .token.string":{color:"hsl(76, 21%, 52%)"},".style .token.string":{color:"hsl(76, 21%, 52%)"},variable:{color:"hsl(76, 21%, 52%)"},inserted:{color:"hsl(76, 21%, 52%)"},atrule:{color:"hsl(218, 22%, 55%)"},regex:{color:"hsl(42, 75%, 65%)"},important:{color:"hsl(42, 75%, 65%)",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},".language-markup .token.tag":{color:"hsl(33, 33%, 52%)"},".language-markup .token.attr-name":{color:"hsl(33, 33%, 52%)"},".language-markup .token.punctuation":{color:"hsl(33, 33%, 52%)"},"":{position:"relative",zIndex:"1"},".line-highlight.line-highlight":{background:"linear-gradient(to right, hsla(0, 0%, 33%, .1) 70%, hsla(0, 0%, 33%, 0))",borderBottom:"1px dashed hsl(0, 0%, 33%)",borderTop:"1px dashed hsl(0, 0%, 33%)",marginTop:"0.75em",zIndex:"0"},".line-highlight.line-highlight:before":{backgroundColor:"hsl(215, 15%, 59%)",color:"hsl(24, 20%, 95%)"},".line-highlight.line-highlight[data-end]:after":{backgroundColor:"hsl(215, 15%, 59%)",color:"hsl(24, 20%, 95%)"}}},{name:"dark",value:{'code[class*="language-"]':{color:"white",background:"none",textShadow:"0 -.1em .2em black",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"white",background:"hsl(30, 20%, 25%)",textShadow:"0 -.1em .2em black",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",border:".3em solid hsl(30, 20%, 40%)",borderRadius:".5em",boxShadow:"1px 1px .5em black inset"},':not(pre) > code[class*="language-"]':{background:"hsl(30, 20%, 25%)",padding:".15em .2em .05em",borderRadius:".3em",border:".13em solid hsl(30, 20%, 40%)",boxShadow:"1px 1px .3em -.1em black inset",whiteSpace:"normal"},comment:{color:"hsl(30, 20%, 50%)"},prolog:{color:"hsl(30, 20%, 50%)"},doctype:{color:"hsl(30, 20%, 50%)"},cdata:{color:"hsl(30, 20%, 50%)"},punctuation:{Opacity:".7"},namespace:{Opacity:".7"},property:{color:"hsl(350, 40%, 70%)"},tag:{color:"hsl(350, 40%, 70%)"},boolean:{color:"hsl(350, 40%, 70%)"},number:{color:"hsl(350, 40%, 70%)"},constant:{color:"hsl(350, 40%, 70%)"},symbol:{color:"hsl(350, 40%, 70%)"},selector:{color:"hsl(75, 70%, 60%)"},"attr-name":{color:"hsl(75, 70%, 60%)"},string:{color:"hsl(75, 70%, 60%)"},char:{color:"hsl(75, 70%, 60%)"},builtin:{color:"hsl(75, 70%, 60%)"},inserted:{color:"hsl(75, 70%, 60%)"},operator:{color:"hsl(40, 90%, 60%)"},entity:{color:"hsl(40, 90%, 60%)",cursor:"help"},url:{color:"hsl(40, 90%, 60%)"},".language-css .token.string":{color:"hsl(40, 90%, 60%)"},".style .token.string":{color:"hsl(40, 90%, 60%)"},variable:{color:"hsl(40, 90%, 60%)"},atrule:{color:"hsl(350, 40%, 70%)"},"attr-value":{color:"hsl(350, 40%, 70%)"},keyword:{color:"hsl(350, 40%, 70%)"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},deleted:{color:"red"}}},{name:"atomDark",value:{'code[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",background:"#1d1f21"},':not(pre) > code[class*="language-"]':{background:"#1d1f21",padding:".1em",borderRadius:".3em"},comment:{color:"#7C7C7C"},prolog:{color:"#7C7C7C"},doctype:{color:"#7C7C7C"},cdata:{color:"#7C7C7C"},punctuation:{color:"#c5c8c6"},".namespace":{Opacity:".7"},property:{color:"#96CBFE"},keyword:{color:"#96CBFE"},tag:{color:"#96CBFE"},"class-name":{color:"#FFFFB6",textDecoration:"underline"},boolean:{color:"#99CC99"},constant:{color:"#99CC99"},symbol:{color:"#f92672"},deleted:{color:"#f92672"},number:{color:"#FF73FD"},selector:{color:"#A8FF60"},"attr-name":{color:"#A8FF60"},string:{color:"#A8FF60"},char:{color:"#A8FF60"},builtin:{color:"#A8FF60"},inserted:{color:"#A8FF60"},variable:{color:"#C6C5FE"},operator:{color:"#EDEDED"},entity:{color:"#FFFFB6",cursor:"help"},url:{color:"#96CBFE"},".language-css .token.string":{color:"#87C38A"},".style .token.string":{color:"#87C38A"},atrule:{color:"#F9EE98"},"attr-value":{color:"#F9EE98"},function:{color:"#DAD085"},regex:{color:"#E9C062"},important:{color:"#fd971f",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}},{name:"darcula",value:{'code[class*="language-"]':{color:"#a9b7c6",fontFamily:"Consolas, Monaco, 'Andale Mono', monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#a9b7c6",fontFamily:"Consolas, Monaco, 'Andale Mono', monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#2b2b2b"},'pre[class*="language-"]::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"] ::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"]::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"] ::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"]::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"] ::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"]::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"] ::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},':not(pre) > code[class*="language-"]':{background:"#2b2b2b",padding:".1em",borderRadius:".3em"},comment:{color:"#808080"},prolog:{color:"#808080"},cdata:{color:"#808080"},delimiter:{color:"#cc7832"},boolean:{color:"#cc7832"},keyword:{color:"#cc7832"},selector:{color:"#cc7832"},important:{color:"#cc7832"},atrule:{color:"#cc7832"},operator:{color:"#a9b7c6"},punctuation:{color:"#a9b7c6"},"attr-name":{color:"#a9b7c6"},tag:{color:"#e8bf6a"},"tag.punctuation":{color:"#e8bf6a"},doctype:{color:"#e8bf6a"},builtin:{color:"#e8bf6a"},entity:{color:"#6897bb"},number:{color:"#6897bb"},symbol:{color:"#6897bb"},property:{color:"#9876aa"},constant:{color:"#9876aa"},variable:{color:"#9876aa"},string:{color:"#6a8759"},char:{color:"#6a8759"},"attr-value":{color:"#a5c261"},"attr-value.punctuation":{color:"#a5c261"},"attr-value.punctuation:first-child":{color:"#a9b7c6"},url:{color:"#287bde",textDecoration:"underline"},function:{color:"#ffc66d"},regex:{background:"#364135"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#294436"},deleted:{background:"#484a4a"},"code.language-css .token.property":{color:"#a9b7c6"},"code.language-css .token.property + .token.punctuation":{color:"#a9b7c6"},"code.language-css .token.id":{color:"#ffc66d"},"code.language-css .token.selector > .token.class":{color:"#ffc66d"},"code.language-css .token.selector > .token.attribute":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-class":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-element":{color:"#ffc66d"}}},{name:"coy",value:{'code[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",maxHeight:"inherit",height:"inherit",padding:"0 1em",display:"block",overflow:"auto"},'pre[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",position:"relative",margin:".5em 0",overflow:"visible",padding:"1px",backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",marginBottom:"1em"},'pre[class*="language-"] > code':{position:"relative",zIndex:"1",borderLeft:"10px solid #358ccb",boxShadow:"-1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf",backgroundColor:"#fdfdfd",backgroundImage:"linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%)",backgroundSize:"3em 3em",backgroundOrigin:"content-box",backgroundAttachment:"local"},':not(pre) > code[class*="language-"]':{backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",marginBottom:"1em",position:"relative",padding:".2em",borderRadius:"0.3em",color:"#c92c2c",border:"1px solid rgba(0, 0, 0, 0.1)",display:"inline",whiteSpace:"normal"},'pre[class*="language-"]:before':{content:"''",display:"block",position:"absolute",bottom:"0.75em",left:"0.18em",width:"40%",height:"20%",maxHeight:"13em",boxShadow:"0px 13px 8px #979797",WebkitTransform:"rotate(-2deg)",MozTransform:"rotate(-2deg)",msTransform:"rotate(-2deg)",OTransform:"rotate(-2deg)",transform:"rotate(-2deg)"},'pre[class*="language-"]:after':{content:"''",display:"block",position:"absolute",bottom:"0.75em",left:"auto",width:"40%",height:"20%",maxHeight:"13em",boxShadow:"0px 13px 8px #979797",WebkitTransform:"rotate(2deg)",MozTransform:"rotate(2deg)",msTransform:"rotate(2deg)",OTransform:"rotate(2deg)",transform:"rotate(2deg)",right:"0.75em"},comment:{color:"#7D8B99"},"block-comment":{color:"#7D8B99"},prolog:{color:"#7D8B99"},doctype:{color:"#7D8B99"},cdata:{color:"#7D8B99"},punctuation:{color:"#5F6364"},property:{color:"#c92c2c"},tag:{color:"#c92c2c"},boolean:{color:"#c92c2c"},number:{color:"#c92c2c"},"function-name":{color:"#c92c2c"},constant:{color:"#c92c2c"},symbol:{color:"#c92c2c"},deleted:{color:"#c92c2c"},selector:{color:"#2f9c0a"},"attr-name":{color:"#2f9c0a"},string:{color:"#2f9c0a"},char:{color:"#2f9c0a"},function:{color:"#2f9c0a"},builtin:{color:"#2f9c0a"},inserted:{color:"#2f9c0a"},operator:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},entity:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)",cursor:"help"},url:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},variable:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},atrule:{color:"#1990b8"},"attr-value":{color:"#1990b8"},keyword:{color:"#1990b8"},"class-name":{color:"#1990b8"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"normal"},".language-css .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},".style .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:".7"},'pre[class*="language-"].line-numbers.line-numbers':{paddingLeft:"0"},'pre[class*="language-"].line-numbers.line-numbers code':{paddingLeft:"3.8em"},'pre[class*="language-"].line-numbers.line-numbers .line-numbers-rows':{left:"0"},'pre[class*="language-"][data-line]':{paddingTop:"0",paddingBottom:"0",paddingLeft:"0"},"pre[data-line] code":{position:"relative",paddingLeft:"4em"},"pre .line-highlight":{marginTop:"0"}}},{name:"oneDark",value:{'code[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"]::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},prolog:{color:"hsl(220, 10%, 40%)"},cdata:{color:"hsl(220, 10%, 40%)"},doctype:{color:"hsl(220, 14%, 71%)"},punctuation:{color:"hsl(220, 14%, 71%)"},entity:{color:"hsl(220, 14%, 71%)",cursor:"help"},"attr-name":{color:"hsl(29, 54%, 61%)"},"class-name":{color:"hsl(29, 54%, 61%)"},boolean:{color:"hsl(29, 54%, 61%)"},constant:{color:"hsl(29, 54%, 61%)"},number:{color:"hsl(29, 54%, 61%)"},atrule:{color:"hsl(29, 54%, 61%)"},keyword:{color:"hsl(286, 60%, 67%)"},property:{color:"hsl(355, 65%, 65%)"},tag:{color:"hsl(355, 65%, 65%)"},symbol:{color:"hsl(355, 65%, 65%)"},deleted:{color:"hsl(355, 65%, 65%)"},important:{color:"hsl(355, 65%, 65%)"},selector:{color:"hsl(95, 38%, 62%)"},string:{color:"hsl(95, 38%, 62%)"},char:{color:"hsl(95, 38%, 62%)"},builtin:{color:"hsl(95, 38%, 62%)"},inserted:{color:"hsl(95, 38%, 62%)"},regex:{color:"hsl(95, 38%, 62%)"},"attr-value":{color:"hsl(95, 38%, 62%)"},"attr-value > .token.punctuation":{color:"hsl(95, 38%, 62%)"},variable:{color:"hsl(207, 82%, 66%)"},operator:{color:"hsl(207, 82%, 66%)"},function:{color:"hsl(207, 82%, 66%)"},url:{color:"hsl(187, 47%, 55%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(220, 14%, 71%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(220, 14%, 71%)"},".language-css .token.selector":{color:"hsl(355, 65%, 65%)"},".language-css .token.property":{color:"hsl(220, 14%, 71%)"},".language-css .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.string.url":{color:"hsl(95, 38%, 62%)"},".language-css .token.important":{color:"hsl(286, 60%, 67%)"},".language-css .token.atrule .token.rule":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.operator":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(5, 48%, 51%)"},".language-json .token.operator":{color:"hsl(220, 14%, 71%)"},".language-json .token.null.keyword":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.url":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.operator":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.content":{color:"hsl(207, 82%, 66%)"},".language-markdown .token.url > .token.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.url-reference.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(95, 38%, 62%)"},".language-markdown .token.bold .token.content":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.italic .token.content":{color:"hsl(286, 60%, 67%)"},".language-markdown .token.strike .token.content":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.list.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(355, 65%, 65%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.cr:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.lf:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.space:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},".line-highlight.line-highlight":{background:"hsla(220, 100%, 80%, 0.04)"},".line-highlight.line-highlight:before":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(220, 100%, 80%, 0.04)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".command-line .command-line-prompt":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(220, 14%, 45%)"},".command-line .command-line-prompt > span:before":{color:"hsl(220, 14%, 45%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(286, 60%, 67%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(224, 13%, 17%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(224, 13%, 17%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(224, 13%, 17%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(224, 13%, 17%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(219, 13%, 22%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(220, 14%, 71%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(220, 14%, 71%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(220, 14%, 71%)"}},isDefault:!0},{name:"oneLight",value:{'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}}},{name:"prism",value:{'code[class*="language-"]':{color:"black",background:"none",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"#f5f2f0",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}},{name:"materialOceanic",value:{'code[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#c3cee3",background:"#263238",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#c3cee3",background:"#263238",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",overflow:"auto",position:"relative",margin:"0.5em 0",padding:"1.25em 1em"},'code[class*="language-"]::-moz-selection':{background:"#363636"},'pre[class*="language-"]::-moz-selection':{background:"#363636"},'code[class*="language-"] ::-moz-selection':{background:"#363636"},'pre[class*="language-"] ::-moz-selection':{background:"#363636"},'code[class*="language-"]::selection':{background:"#363636"},'pre[class*="language-"]::selection':{background:"#363636"},'code[class*="language-"] ::selection':{background:"#363636"},'pre[class*="language-"] ::selection':{background:"#363636"},':not(pre) > code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#fd9170"},".language-sass > code":{color:"#fd9170"},".language-scss > code":{color:"#fd9170"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#c792ea"},"attr-name":{color:"#ffcb6b"},"attr-value":{color:"#c3e88d"},attribute:{color:"#c3e88d"},boolean:{color:"#c792ea"},builtin:{color:"#ffcb6b"},cdata:{color:"#80cbc4"},char:{color:"#80cbc4"},class:{color:"#ffcb6b"},"class-name":{color:"#f2ff00"},color:{color:"#f2ff00"},comment:{color:"#546e7a"},constant:{color:"#c792ea"},deleted:{color:"#f07178"},doctype:{color:"#546e7a"},entity:{color:"#f07178"},function:{color:"#c792ea"},hexcode:{color:"#f2ff00"},id:{color:"#c792ea",fontWeight:"bold"},important:{color:"#c792ea",fontWeight:"bold"},inserted:{color:"#80cbc4"},keyword:{color:"#c792ea",fontStyle:"italic"},number:{color:"#fd9170"},operator:{color:"#89ddff"},prolog:{color:"#546e7a"},property:{color:"#80cbc4"},"pseudo-class":{color:"#c3e88d"},"pseudo-element":{color:"#c3e88d"},punctuation:{color:"#89ddff"},regex:{color:"#f2ff00"},selector:{color:"#f07178"},string:{color:"#c3e88d"},symbol:{color:"#c792ea"},tag:{color:"#f07178"},unit:{color:"#f07178"},url:{color:"#fd9170"},variable:{color:"#f07178"}}},{name:"materialLight",value:{'code[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#90a4ae",background:"#fafafa",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#90a4ae",background:"#fafafa",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",overflow:"auto",position:"relative",margin:"0.5em 0",padding:"1.25em 1em"},'code[class*="language-"]::-moz-selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"]::-moz-selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"] ::-moz-selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"] ::-moz-selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"]::selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"]::selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"] ::selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"] ::selection':{background:"#cceae7",color:"#263238"},':not(pre) > code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#f76d47"},".language-sass > code":{color:"#f76d47"},".language-scss > code":{color:"#f76d47"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#7c4dff"},"attr-name":{color:"#39adb5"},"attr-value":{color:"#f6a434"},attribute:{color:"#f6a434"},boolean:{color:"#7c4dff"},builtin:{color:"#39adb5"},cdata:{color:"#39adb5"},char:{color:"#39adb5"},class:{color:"#39adb5"},"class-name":{color:"#6182b8"},comment:{color:"#aabfc9"},constant:{color:"#7c4dff"},deleted:{color:"#e53935"},doctype:{color:"#aabfc9"},entity:{color:"#e53935"},function:{color:"#7c4dff"},hexcode:{color:"#f76d47"},id:{color:"#7c4dff",fontWeight:"bold"},important:{color:"#7c4dff",fontWeight:"bold"},inserted:{color:"#39adb5"},keyword:{color:"#7c4dff"},number:{color:"#f76d47"},operator:{color:"#39adb5"},prolog:{color:"#aabfc9"},property:{color:"#39adb5"},"pseudo-class":{color:"#f6a434"},"pseudo-element":{color:"#f6a434"},punctuation:{color:"#39adb5"},regex:{color:"#6182b8"},selector:{color:"#e53935"},string:{color:"#f6a434"},symbol:{color:"#7c4dff"},tag:{color:"#e53935"},unit:{color:"#f76d47"},url:{color:"#e53935"},variable:{color:"#e53935"}}},{name:"materialDark",value:{'code[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#eee",background:"#2f2f2f",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#eee",background:"#2f2f2f",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",overflow:"auto",position:"relative",margin:"0.5em 0",padding:"1.25em 1em"},'code[class*="language-"]::-moz-selection':{background:"#363636"},'pre[class*="language-"]::-moz-selection':{background:"#363636"},'code[class*="language-"] ::-moz-selection':{background:"#363636"},'pre[class*="language-"] ::-moz-selection':{background:"#363636"},'code[class*="language-"]::selection':{background:"#363636"},'pre[class*="language-"]::selection':{background:"#363636"},'code[class*="language-"] ::selection':{background:"#363636"},'pre[class*="language-"] ::selection':{background:"#363636"},':not(pre) > code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#fd9170"},".language-sass > code":{color:"#fd9170"},".language-scss > code":{color:"#fd9170"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#c792ea"},"attr-name":{color:"#ffcb6b"},"attr-value":{color:"#a5e844"},attribute:{color:"#a5e844"},boolean:{color:"#c792ea"},builtin:{color:"#ffcb6b"},cdata:{color:"#80cbc4"},char:{color:"#80cbc4"},class:{color:"#ffcb6b"},"class-name":{color:"#f2ff00"},comment:{color:"#616161"},constant:{color:"#c792ea"},deleted:{color:"#ff6666"},doctype:{color:"#616161"},entity:{color:"#ff6666"},function:{color:"#c792ea"},hexcode:{color:"#f2ff00"},id:{color:"#c792ea",fontWeight:"bold"},important:{color:"#c792ea",fontWeight:"bold"},inserted:{color:"#80cbc4"},keyword:{color:"#c792ea"},number:{color:"#fd9170"},operator:{color:"#89ddff"},prolog:{color:"#616161"},property:{color:"#80cbc4"},"pseudo-class":{color:"#a5e844"},"pseudo-element":{color:"#a5e844"},punctuation:{color:"#89ddff"},regex:{color:"#f2ff00"},selector:{color:"#ff6666"},string:{color:"#a5e844"},symbol:{color:"#c792ea"},tag:{color:"#ff6666"},unit:{color:"#fd9170"},url:{color:"#ff6666"},variable:{color:"#ff6666"}}},{name:"tomorrow",value:{'code[class*="language-"]':{color:"#ccc",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#ccc",background:"#2d2d2d",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},':not(pre) > code[class*="language-"]':{background:"#2d2d2d",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#999"},"block-comment":{color:"#999"},prolog:{color:"#999"},doctype:{color:"#999"},cdata:{color:"#999"},punctuation:{color:"#ccc"},tag:{color:"#e2777a"},"attr-name":{color:"#e2777a"},namespace:{color:"#e2777a"},deleted:{color:"#e2777a"},"function-name":{color:"#6196cc"},boolean:{color:"#f08d49"},number:{color:"#f08d49"},function:{color:"#f08d49"},property:{color:"#f8c555"},"class-name":{color:"#f8c555"},constant:{color:"#f8c555"},symbol:{color:"#f8c555"},selector:{color:"#cc99cd"},important:{color:"#cc99cd",fontWeight:"bold"},atrule:{color:"#cc99cd"},keyword:{color:"#cc99cd"},builtin:{color:"#cc99cd"},string:{color:"#7ec699"},char:{color:"#7ec699"},"attr-value":{color:"#7ec699"},regex:{color:"#7ec699"},variable:{color:"#7ec699"},operator:{color:"#67cdcc"},entity:{color:"#67cdcc",cursor:"help"},url:{color:"#67cdcc"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{color:"green"}}},{name:"vs",value:{'code[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",border:"1px solid #dddddd",backgroundColor:"white"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{background:"#C1DEF1"},'pre[class*="language-"] ::-moz-selection':{background:"#C1DEF1"},'code[class*="language-"]::-moz-selection':{background:"#C1DEF1"},'code[class*="language-"] ::-moz-selection':{background:"#C1DEF1"},'pre[class*="language-"]::selection':{background:"#C1DEF1"},'pre[class*="language-"] ::selection':{background:"#C1DEF1"},'code[class*="language-"]::selection':{background:"#C1DEF1"},'code[class*="language-"] ::selection':{background:"#C1DEF1"},':not(pre) > code[class*="language-"]':{padding:".2em",paddingTop:"1px",paddingBottom:"1px",background:"#f8f8f8",border:"1px solid #dddddd"},comment:{color:"#008000",fontStyle:"italic"},prolog:{color:"#008000",fontStyle:"italic"},doctype:{color:"#008000",fontStyle:"italic"},cdata:{color:"#008000",fontStyle:"italic"},namespace:{Opacity:".7"},string:{color:"#A31515"},punctuation:{color:"#393A34"},operator:{color:"#393A34"},url:{color:"#36acaa"},symbol:{color:"#36acaa"},number:{color:"#36acaa"},boolean:{color:"#36acaa"},variable:{color:"#36acaa"},constant:{color:"#36acaa"},inserted:{color:"#36acaa"},atrule:{color:"#0000ff"},keyword:{color:"#0000ff"},"attr-value":{color:"#0000ff"},".language-autohotkey .token.selector":{color:"#0000ff"},".language-json .token.boolean":{color:"#0000ff"},".language-json .token.number":{color:"#0000ff"},'code[class*="language-css"]':{color:"#0000ff"},function:{color:"#393A34"},deleted:{color:"#9a050f"},".language-autohotkey .token.tag":{color:"#9a050f"},selector:{color:"#800000"},".language-autohotkey .token.keyword":{color:"#00009f"},important:{color:"#e90",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},"class-name":{color:"#2B91AF"},".language-json .token.property":{color:"#2B91AF"},tag:{color:"#800000"},"attr-name":{color:"#ff0000"},property:{color:"#ff0000"},regex:{color:"#ff0000"},entity:{color:"#ff0000"},"directive.tag.tag":{background:"#ffff00",color:"#393A34"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#a5a5a5"},".line-numbers .line-numbers-rows > span:before":{color:"#2B91AF"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(193, 222, 241, 0.2) 70%, rgba(221, 222, 241, 0))"}}},{name:"okaidia",value:{'code[class*="language-"]':{color:"#f8f8f2",background:"none",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#272822",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#272822",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#8292a2"},prolog:{color:"#8292a2"},doctype:{color:"#8292a2"},cdata:{color:"#8292a2"},punctuation:{color:"#f8f8f2"},namespace:{Opacity:".7"},property:{color:"#f92672"},tag:{color:"#f92672"},constant:{color:"#f92672"},symbol:{color:"#f92672"},deleted:{color:"#f92672"},boolean:{color:"#ae81ff"},number:{color:"#ae81ff"},selector:{color:"#a6e22e"},"attr-name":{color:"#a6e22e"},string:{color:"#a6e22e"},char:{color:"#a6e22e"},builtin:{color:"#a6e22e"},inserted:{color:"#a6e22e"},operator:{color:"#f8f8f2"},entity:{color:"#f8f8f2",cursor:"help"},url:{color:"#f8f8f2"},".language-css .token.string":{color:"#f8f8f2"},".style .token.string":{color:"#f8f8f2"},variable:{color:"#f8f8f2"},atrule:{color:"#e6db74"},"attr-value":{color:"#e6db74"},function:{color:"#e6db74"},"class-name":{color:"#e6db74"},keyword:{color:"#66d9ef"},regex:{color:"#fd971f"},important:{color:"#fd971f",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}],Lt=function(e){return!e||e.startsWith("http://")||e.startsWith("https://")?e:e.includes("localhost")||e.includes("localagent")?"http://".concat(e,":3000"):"https://".concat(e)};function Bt(e){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bt(e)}function _t(){_t=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof b?t:b,i=Object.create(a.prototype),l=new F(r||[]);return o(i,"_invoke",{value:E(e,n,l)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",g="completed",m={};function b(){}function y(){}function v(){}var A={};s(A,i,(function(){return this}));var k=Object.getPrototypeOf,w=k&&k(k(T([])));w&&w!==n&&r.call(w,i)&&(A=w);var x=v.prototype=b.prototype=Object.create(A);function C(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,l){var c=f(e[o],e,a);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==Bt(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,l)}))}l(c.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function E(t,n,r){var o=d;return function(a,i){if(o===h)throw new Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var l=r.delegate;if(l){var c=O(l,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var s=f(t,n,r);if("normal"===s.type){if(o=r.done?g:p,s.arg===m)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=g,r.method="throw",r.arg=s.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function z(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(z,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(Bt(t)+" is not iterable")}return y.prototype=v,o(x,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},C(S.prototype),s(S.prototype,l,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},C(x),s(x,c,"Generator"),s(x,i,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=T,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return l.type="throw",l.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function jt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jt(Object(n),!0).forEach((function(t){var r,o,a;r=e,o=t,a=n[t],(o=function(e){var t=function(e,t){if("object"!==Bt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Bt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Bt(t)?t:String(t)}(o))in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mt(e,t,n,r,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function It(e,t,n,r){return Dt.apply(this,arguments)}function Dt(){return e=_t().mark((function e(t,n,r,o){var a,i,l,c,s;return _t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,a={message:t},i=localStorage.getItem("authToken"),l=Nt({"Content-Type":"application/json"},r),i&&(l["X-Auth-Token"]=i),e.prev=5,e.next=8,fetch("".concat(Lt(n)||Ft,"/chatbot/chat-stream"),{method:"POST",credentials:"include",headers:l,body:JSON.stringify(a),signal:o});case 8:return c=e.sent,(s=c.headers.get("x-auth-token"))&&localStorage.setItem("authToken",s),e.abrupt("return",c);case 14:if(e.prev=14,e.t0=e.catch(5),"AbortError"!==e.t0.name){e.next=19;break}throw console.log("Request was aborted"),e.t0;case 19:throw new Error(e.t0);case 20:e.next=25;break;case 22:return e.prev=22,e.t1=e.catch(0),e.abrupt("return",null);case 25:case"end":return e.stop()}}),e,null,[[0,22],[5,14]])})),Dt=function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){Mt(a,r,o,i,l,"next",e)}function l(e){Mt(a,r,o,i,l,"throw",e)}i(void 0)}))},Dt.apply(this,arguments);var e}var Rt=n(738);function Ht(e){return e&&"object"==typeof e?"position"in e||"type"in e?Wt(e.position):"start"in e||"end"in e?Wt(e):"line"in e||"column"in e?Ut(e):"":""}function Ut(e){return $t(e&&e.line)+":"+$t(e&&e.column)}function Wt(e){return Ut(e&&e.start)+"-"+Ut(e&&e.end)}function $t(e){return e&&"number"==typeof e?e:1}class Vt extends Error{constructor(e,t,n){const r=[null,null];let o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),"string"==typeof t&&(n=t,t=void 0),"string"==typeof n){const e=n.indexOf(":");-1===e?r[1]=n:(r[0]=n.slice(0,e),r[1]=n.slice(e+1))}t&&("type"in t||"position"in t?t.position&&(o=t.position):"start"in t||"end"in t?o=t:("line"in t||"column"in t)&&(o.start=t)),this.name=Ht(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="","object"==typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.position=o,this.source=r[0],this.ruleId=r[1],this.file,this.actual,this.expected,this.url,this.note}}Vt.prototype.file="",Vt.prototype.name="",Vt.prototype.reason="",Vt.prototype.message="",Vt.prototype.stack="",Vt.prototype.fatal=null,Vt.prototype.column=null,Vt.prototype.line=null,Vt.prototype.source=null,Vt.prototype.ruleId=null,Vt.prototype.position=null;const qt=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Kt(e);let n,r=0,o=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.charCodeAt(a)){if(n){r=a+1;break}}else o<0&&(n=!0,o=a+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let i=-1,l=t.length-1;for(;a--;)if(47===e.charCodeAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1),l>-1&&(e.charCodeAt(a)===t.charCodeAt(l--)?l<0&&(o=a):(l=-1,o=i));return r===o?o=i:o<0&&(o=e.length),e.slice(r,o)},Yt=function(e){if(Kt(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.charCodeAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)},Gt=function(e){Kt(e);let t,n=e.length,r=-1,o=0,a=-1,i=0;for(;n--;){const l=e.charCodeAt(n);if(47!==l)r<0&&(t=!0,r=n+1),46===l?a<0?a=n:1!==i&&(i=1):a>-1&&(i=-1);else if(t){o=n+1;break}}return a<0||r<0||0===i||1===i&&a===r-1&&a===o+1?"":e.slice(a,r)},Qt=function(...e){let t,n=-1;for(;++n<e.length;)Kt(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Kt(e);const t=47===e.charCodeAt(0);let n=function(e,t){let n,r,o="",a=0,i=-1,l=0,c=-1;for(;++c<=e.length;){if(c<e.length)n=e.charCodeAt(c);else{if(47===n)break;n=47}if(47===n){if(i===c-1||1===l);else if(i!==c-1&&2===l){if(o.length<2||2!==a||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",a=0):(o=o.slice(0,r),a=o.length-1-o.lastIndexOf("/")),i=c,l=0;continue}}else if(o.length>0){o="",a=0,i=c,l=0;continue}t&&(o=o.length>0?o+"/..":"..",a=2)}else o.length>0?o+="/"+e.slice(i+1,c):o=e.slice(i+1,c),a=c-i-1;i=c,l=0}else 46===n&&l>-1?l++:l=-1}return o}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},Zt="/";function Kt(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Xt=function(){return"/"};function Jt(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}const en=["history","path","basename","stem","extname","dirname"];class tn{constructor(e){let t;t=e?"string"==typeof e||function(e){return Rt(e)}(e)?{value:e}:Jt(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=Xt(),this.value,this.stored,this.result,this.map;let n,r=-1;for(;++r<en.length;){const e=en[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)en.includes(n)||(this[n]=t[n])}get path(){return this.history[this.history.length-1]}set path(e){Jt(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!Jt(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.charCodeAt(n)&&50===t.charCodeAt(n+1)){const e=t.charCodeAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),rn(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?Yt(this.path):void 0}set dirname(e){on(this.basename,"dirname"),this.path=Qt(e||"",this.basename)}get basename(){return"string"==typeof this.path?qt(this.path):void 0}set basename(e){rn(e,"basename"),nn(e,"basename"),this.path=Qt(this.dirname||"",e)}get extname(){return"string"==typeof this.path?Gt(this.path):void 0}set extname(e){if(nn(e,"extname"),on(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Qt(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?qt(this.path,this.extname):void 0}set stem(e){rn(e,"stem"),nn(e,"stem"),this.path=Qt(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e||void 0)}message(e,t,n){const r=new Vt(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=null,r}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}}function nn(e,t){if(e&&e.includes(Zt))throw new Error("`"+t+"` cannot be a path: did not expect `"+Zt+"`")}function rn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function on(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function an(e){if(e)throw e}var ln=n(470);function cn(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}const sn=function e(){const t=function(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(a,...i){const l=e[++n];let c=-1;if(a)r(a);else{for(;++c<t.length;)null!==i[c]&&void 0!==i[c]||(i[c]=t[c]);t=i,l?function(e,t){let n;return function(...t){const a=e.length>t.length;let i;a&&t.push(r);try{i=e.apply(this,t)}catch(e){if(a&&n)throw e;return r(e)}a||(i instanceof Promise?i.then(o,r):i instanceof Error?r(i):o(i))};function r(e,...r){n||(n=!0,t(e,...r))}function o(e){r(null,e)}}(l,o)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}(),n=[];let r,o={},a=-1;return i.data=function(e,t){return"string"==typeof e?2===arguments.length?(hn("data",r),o[e]=t,i):un.call(o,e)&&o[e]||null:e?(hn("data",r),o=e,i):o},i.Parser=void 0,i.Compiler=void 0,i.freeze=function(){if(r)return i;for(;++a<n.length;){const[e,...r]=n[a];if(!1===r[0])continue;!0===r[0]&&(r[0]=void 0);const o=e.call(i,...r);"function"==typeof o&&t.use(o)}return r=!0,a=Number.POSITIVE_INFINITY,i},i.attachers=n,i.use=function(e,...t){let a;if(hn("use",r),null==e);else if("function"==typeof e)u(e,...t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?s(e):c(e)}return a&&(o.settings=Object.assign(o.settings||{},a)),i;function l(e){if("function"==typeof e)u(e);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;u(t,...n)}else c(e)}}function c(e){s(e.plugins),e.settings&&(a=Object.assign(a||{},e.settings))}function s(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)l(e[t])}}function u(e,t){let r,o=-1;for(;++o<n.length;)if(n[o][0]===e){r=n[o];break}r?(cn(r[1])&&cn(t)&&(t=ln(!0,r[1],t)),r[1]=t):n.push([...arguments])}},i.parse=function(e){i.freeze();const t=bn(e),n=i.Parser;return dn("parse",n),fn(n,"parse")?new n(String(t),t).parse():n(String(t),t)},i.stringify=function(e,t){i.freeze();const n=bn(t),r=i.Compiler;return pn("stringify",r),gn(e),fn(r,"compile")?new r(e,n).compile():r(e,n)},i.run=function(e,n,r){if(gn(e),i.freeze(),r||"function"!=typeof n||(r=n,n=void 0),!r)return new Promise(o);function o(o,a){t.run(e,bn(n),(function(t,n,i){n=n||e,t?a(t):o?o(n):r(null,n,i)}))}o(null,r)},i.runSync=function(e,t){let n,r;return i.run(e,t,(function(e,t){an(e),n=t,r=!0})),mn("runSync","run",r),n},i.process=function(e,t){if(i.freeze(),dn("process",i.Parser),pn("process",i.Compiler),!t)return new Promise(n);function n(n,r){const o=bn(e);function a(e,o){e||!o?r(e):n?n(o):t(null,o)}i.run(i.parse(o),o,((e,t,n)=>{if(!e&&t&&n){const o=i.stringify(t,n);null==o||("string"==typeof(r=o)||Rt(r)?n.value=o:n.result=o),a(e,n)}else a(e);var r}))}n(null,t)},i.processSync=function(e){let t;i.freeze(),dn("processSync",i.Parser),pn("processSync",i.Compiler);const n=bn(e);return i.process(n,(function(e){t=!0,an(e)})),mn("processSync","process",t),n},i;function i(){const t=e();let r=-1;for(;++r<n.length;)t.use(...n[r]);return t.data(ln(!0,{},o)),t}}().freeze(),un={}.hasOwnProperty;function fn(e,t){return"function"==typeof e&&e.prototype&&(function(e){let t;for(t in e)if(un.call(e,t))return!0;return!1}(e.prototype)||t in e.prototype)}function dn(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function pn(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function hn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function gn(e){if(!cn(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function mn(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function bn(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new tn(e)}const yn={};function vn(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return An(e.children,t,n)}return Array.isArray(e)?An(e,t,n):""}function An(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=vn(e[o],t,n);return r.join("")}function kn(e,t,n,r){const o=e.length;let a,i=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function wn(e,t){return e.length>0?(kn(e,e.length,0,t),e):t}const xn={}.hasOwnProperty;function Cn(e){const t={};let n=-1;for(;++n<e.length;)Sn(t,e[n]);return t}function Sn(e,t){let n;for(n in t){const r=(xn.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){xn.call(r,a)||(r[a]=[]);const e=o[a];En(r[a],Array.isArray(e)?e:e?[e]:[])}}}function En(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);kn(e,0,0,r)}const On=Dn(/[A-Za-z]/),zn=Dn(/[\dA-Za-z]/),Pn=Dn(/[#-'*+\--9=?A-Z^-~]/);function Fn(e){return null!==e&&(e<32||127===e)}const Tn=Dn(/\d/),Ln=Dn(/[\dA-Fa-f]/),Bn=Dn(/[!-/:-@[-`{-~]/);function _n(e){return null!==e&&e<-2}function jn(e){return null!==e&&(e<0||32===e)}function Nn(e){return-2===e||-1===e||32===e}const Mn=Dn(/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\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-\u2E4F\u2E52-\u2E5D\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]/),In=Dn(/\s/);function Dn(e){return function(t){return null!==t&&e.test(String.fromCharCode(t))}}function Rn(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return function(r){return Nn(r)?(e.enter(n),i(r)):t(r)};function i(r){return Nn(r)&&a++<o?(e.consume(r),i):(e.exit(n),t(r))}}const Hn={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Rn(e,t,"linePrefix");e.consume(n)}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):_n(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}},Un={tokenize:function(e){const t=this,n=[];let r,o,a,i=0;return l;function l(r){if(i<n.length){const o=n[i];return t.containerState=o[1],e.attempt(o[0].continuation,c,s)(r)}return s(r)}function c(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&y();const n=t.events.length;let o,a=n;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){o=t.events[a][1].end;break}b(i);let l=n;for(;l<t.events.length;)t.events[l][1].end=Object.assign({},o),l++;return kn(t.events,a+1,0,t.events.slice(n)),t.events.length=l,s(e)}return l(e)}function s(o){if(i===n.length){if(!r)return d(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Wn,u,f)(o)}function u(e){return r&&y(),b(i),d(e)}function f(e){return t.parser.lazy[t.now().line]=i!==n.length,a=t.now().offset,h(e)}function d(n){return t.containerState={},e.attempt(Wn,p,h)(n)}function p(e){return i++,n.push([t.currentConstruct,t.containerState]),d(e)}function h(n){return null===n?(r&&y(),b(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:r}),g(n))}function g(n){return null===n?(m(e.exit("chunkFlow"),!0),b(0),void e.consume(n)):_n(n)?(e.consume(n),m(e.exit("chunkFlow")),i=0,t.interrupt=void 0,l):(e.consume(n),g)}function m(e,n){const l=t.sliceStream(e);if(n&&l.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(l),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<a&&(!r.events[e][1].end||r.events[e][1].end.offset>a))return;const n=t.events.length;let o,l,c=n;for(;c--;)if("exit"===t.events[c][0]&&"chunkFlow"===t.events[c][1].type){if(o){l=t.events[c][1].end;break}o=!0}for(b(i),e=n;e<t.events.length;)t.events[e][1].end=Object.assign({},l),e++;kn(t.events,c+1,0,t.events.slice(n)),t.events.length=e}}function b(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Wn={tokenize:function(e,t,n){return Rn(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},$n={tokenize:function(e,t,n){return function(t){return Nn(t)?Rn(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||_n(e)?t(e):n(e)}},partial:!0};function Vn(e){const t={};let n,r,o,a,i,l,c,s=-1;for(;++s<e.length;){for(;s in t;)s=t[s];if(n=e[s],s&&"chunkFlow"===n[1].type&&"listItemPrefix"===e[s-1][1].type&&(l=n[1]._tokenizer.events,o=0,o<l.length&&"lineEndingBlank"===l[o][1].type&&(o+=2),o<l.length&&"content"===l[o][1].type))for(;++o<l.length&&"content"!==l[o][1].type;)"chunkText"===l[o][1].type&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,qn(e,s)),s=t[s],c=!0);else if(n[1]._container){for(o=s,r=void 0;o--&&(a=e[o],"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type);)"enter"===a[0]&&(r&&(e[r][1].type="lineEndingBlank"),a[1].type="lineEnding",r=o);r&&(n[1].end=Object.assign({},e[r][1].start),i=e.slice(r,s),i.unshift(n),kn(e,r,s-r+1,i))}}return!c}function qn(e,t){const n=e[t][1],r=e[t][2];let o=t-1;const a=[],i=n._tokenizer||r.parser[n.contentType](n.start),l=i.events,c=[],s={};let u,f,d=-1,p=n,h=0,g=0;const m=[g];for(;p;){for(;e[++o][1]!==p;);a.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),f&&i.defineSkip(p.start),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(u),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++d<l.length;)"exit"===l[d][0]&&"enter"===l[d-1][0]&&l[d][1].type===l[d-1][1].type&&l[d][1].start.line!==l[d][1].end.line&&(g=d+1,m.push(g),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(i.events=[],p?(p._tokenizer=void 0,p.previous=void 0):m.pop(),d=m.length;d--;){const t=l.slice(m[d],m[d+1]),n=a.pop();c.unshift([n,n+t.length-1]),kn(e,n,2,t)}for(d=-1;++d<c.length;)s[h+c[d][0]]=h+c[d][1],h+=c[d][1]-c[d][0]-1;return s}const Yn={tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):_n(t)?e.check(Gn,a,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}},resolve:function(e){return Vn(e),e}},Gn={tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Rn(e,o,"linePrefix")};function o(o){if(null===o||_n(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}},partial:!0},Qn={tokenize:function(e){const t=this,n=e.attempt($n,(function(r){if(null!==r)return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n;e.consume(r)}),e.attempt(this.parser.constructs.flowInitial,r,Rn(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Yn,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}},Zn={resolveAll:er()},Kn=Jn("string"),Xn=Jn("text");function Jn(e){return{tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,a,i);return a;function a(e){return c(e)?o(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),l;t.consume(e)}function l(e){return c(e)?(t.exit("data"),o(e)):(t.consume(e),l)}function c(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}},resolveAll:er("text"===e?tr:void 0)}}function er(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function tr(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let a,i=o.length,l=-1,c=0;for(;i--;){const e=o[i];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)c++,l--;if(l)break;l=-1}else if(-2===e)a=!0,c++;else if(-1!==e){i++;break}}if(c){const o={type:n===e.length||a||c<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-c,offset:r.end.offset-c,_index:r.start._index+i,_bufferIndex:i?l:r.start._bufferIndex+l},end:Object.assign({},r.end)};r.end=Object.assign({},o.start),r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}function nr(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}function rr(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},a=[];let i=[],l=[],c=!0;const s={consume:function(e){_n(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,v()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=e,c=!0},enter:function(e,t){const n=t||{};return n.type=e,n.start=h(),u.events.push(["enter",n,u]),l.push(n),n},exit:function(e){const t=l.pop();return t.end=h(),u.events.push(["exit",t,u]),t},attempt:b((function(e,t){y(e,t.from)})),check:b(m),interrupt:b(m,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let i;if("string"==typeof a)i=a;else switch(a){case-5:i="\r";break;case-4:i="\n";break;case-3:i="\r\n";break;case-2:i=t?" ":"\t";break;case-1:if(!t&&o)continue;i=" ";break;default:i=String.fromCharCode(a)}o=-2===a,r.push(i)}return r.join("")}(p(e),t)},now:h,defineSkip:function(e){o[e.line]=e.column,v()},write:function(e){return i=wn(i,e),function(){let e;for(;r._index<i.length;){const t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)g(t.charCodeAt(r._bufferIndex));else g(t)}}(),null!==i[i.length-1]?[]:(y(t,0),u.events=nr(a,u.events,u),u.events)}};let f,d=t.tokenize.call(u,s);return t.resolveAll&&a.push(t),u;function p(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let i;if(n===o)i=[e[n].slice(r,a)];else{if(i=e.slice(n,o),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}a>0&&i.push(e[o].slice(0,a))}return i}(i,e)}function h(){const{line:e,column:t,offset:n,_index:o,_bufferIndex:a}=r;return{line:e,column:t,offset:n,_index:o,_bufferIndex:a}}function g(e){c=void 0,f=e,d=d(e)}function m(e,t){t.restore()}function b(e,t){return function(n,o,a){let i,f,d,p;return Array.isArray(n)?g(n):"tokenize"in n?g([n]):function(e){return function(t){const n=null!==t&&e[t],r=null!==t&&e.null;return g([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function g(e){return i=e,f=0,0===e.length?a:m(e[f])}function m(e){return function(n){return p=function(){const e=h(),t=u.previous,n=u.currentConstruct,o=u.events.length,a=Array.from(l);return{restore:function(){r=e,u.previous=t,u.currentConstruct=n,u.events.length=o,l=a,v()},from:o}}(),d=e,e.partial||(u.currentConstruct=e),e.name&&u.parser.constructs.disable.null.includes(e.name)?y():e.tokenize.call(t?Object.assign(Object.create(u),t):u,s,b,y)(n)}}function b(t){return c=!0,e(d,p),o}function y(e){return c=!0,p.restore(),++f<i.length?m(i[f]):a}}}function y(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&kn(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const or={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,a(e)}(t)};function a(a){return a===r?(e.enter("thematicBreakSequence"),i(a)):o>=3&&(null===a||_n(a))?(e.exit("thematicBreak"),t(a)):n(a)}function i(t){return t===r?(e.consume(t),o++,i):(e.exit("thematicBreakSequence"),Nn(t)?Rn(e,a,"whitespace")(t):a(t))}}},ar={name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,i=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:Tn(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(or,n,c)(t):c(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(t)}return n(t)};function l(t){return Tn(t)&&++i<10?(e.consume(t),l):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),c(t)):n(t)}function c(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check($n,r.interrupt?n:s,e.attempt(ir,f,u))}function s(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function u(t){return Nn(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check($n,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Rn(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){return r.containerState.furtherBlankLines||!Nn(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(lr,t,o)(n))}));function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Rn(e,e.attempt(ar,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)}},ir={tokenize:function(e,t,n){const r=this;return Rn(e,(function(e){const o=r.events[r.events.length-1];return!Nn(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},lr={tokenize:function(e,t,n){const r=this;return Rn(e,(function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0},cr={name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return Nn(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){const r=this;return function(t){return Nn(t)?Rn(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):o(t)};function o(r){return e.attempt(cr,t,n)(r)}}},exit:function(e){e.exit("blockQuote")}};function sr(e,t,n,r,o,a,i,l,c){const s=c||Number.POSITIVE_INFINITY;let u=0;return function(t){return 60===t?(e.enter(r),e.enter(o),e.enter(a),e.consume(t),e.exit(a),f):null===t||32===t||41===t||Fn(t)?n(t):(e.enter(r),e.enter(i),e.enter(l),e.enter("chunkString",{contentType:"string"}),h(t))};function f(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(l),f(t)):null===t||60===t||_n(t)?n(t):(e.consume(t),92===t?p:d)}function p(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function h(o){return u||null!==o&&41!==o&&!jn(o)?u<s&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||Fn(o)?n(o):(e.consume(o),92===o?g:h):(e.exit("chunkString"),e.exit(l),e.exit(i),e.exit(r),t(o))}function g(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function ur(e,t,n,r,o,a){const i=this;let l,c=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(a),s};function s(f){return c>999||null===f||91===f||93===f&&!l||94===f&&!c&&"_hiddenFootnoteSupport"in i.parser.constructs?n(f):93===f?(e.exit(a),e.enter(o),e.consume(f),e.exit(o),e.exit(r),t):_n(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(t){return null===t||91===t||93===t||_n(t)||c++>999?(e.exit("chunkString"),s(t)):(e.consume(t),l||(l=!Nn(t)),92===t?f:u)}function f(t){return 91===t||92===t||93===t?(e.consume(t),c++,u):u(t)}}function fr(e,t,n,r,o,a){let i;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(o),e.consume(t),e.exit(o),i=40===t?41:t,l):n(t)};function l(n){return n===i?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(a),c(n))}function c(t){return t===i?(e.exit(a),l(i)):null===t?n(t):_n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Rn(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(t))}function s(t){return t===i||null===t||_n(t)?(e.exit("chunkString"),c(t)):(e.consume(t),92===t?u:s)}function u(t){return t===i||92===t?(e.consume(t),s):s(t)}}function dr(e,t){let n;return function r(o){return _n(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Nn(o)?Rn(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}function pr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const hr={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return ur.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function a(t){return o=pr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i):n(t)}function i(t){return jn(t)?dr(e,l)(t):l(t)}function l(t){return sr(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function c(t){return e.attempt(gr,s,s)(t)}function s(t){return Nn(t)?Rn(e,u,"whitespace")(t):u(t)}function u(a){return null===a||_n(a)?(e.exit("definition"),r.parser.defined.push(o),t(a)):n(a)}}},gr={tokenize:function(e,t,n){return function(t){return jn(t)?dr(e,r)(t):n(t)};function r(t){return fr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return Nn(t)?Rn(e,a,"whitespace")(t):a(t)}function a(e){return null===e||_n(e)?t(e):n(e)}},partial:!0},mr={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Rn(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?a(e):n(e)}function a(t){return null===t?l(t):_n(t)?e.attempt(br,a,l)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||_n(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),i)}function l(n){return e.exit("codeIndented"),t(n)}}},br={tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):_n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):Rn(e,a,"linePrefix",5)(t)}function a(e){const a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):_n(e)?o(e):n(e)}},partial:!0},yr={name:"headingAtx",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||jn(t)?(e.exit("atxHeadingSequence"),a(t)):n(t)}function a(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||_n(n)?(e.exit("atxHeading"),t(n)):Nn(n)?Rn(e,a,"whitespace")(n):(e.enter("atxHeadingText"),l(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),a(t))}function l(t){return null===t||35===t||jn(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),l)}},resolve:function(e,t){let n,r,o=e.length-2,a=3;return"whitespace"===e[a][1].type&&(a+=2),o-2>a&&"whitespace"===e[o][1].type&&(o-=2),"atxHeadingSequence"===e[o][1].type&&(a===o-1||o-4>a&&"whitespace"===e[o-2][1].type)&&(o-=a+1===o?2:4),o>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[o][1].end},r={type:"chunkText",start:e[a][1].start,end:e[o][1].end,contentType:"text"},kn(e,a,o-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}},vr={name:"setextUnderline",tokenize:function(e,t,n){const r=this;let o;return function(t){let i,l=r.events.length;for(;l--;)if("lineEnding"!==r.events[l][1].type&&"linePrefix"!==r.events[l][1].type&&"content"!==r.events[l][1].type){i="paragraph"===r.events[l][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!i?n(t):(e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),a(t)}(t))};function a(t){return t===o?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),Nn(t)?Rn(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||_n(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){let n,r,o,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){n=a;break}"paragraph"===e[a][1].type&&(r=a)}else"content"===e[a][1].type&&e.splice(a,1),o||"definition"!==e[a][1].type||(o=a);const i={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",i,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[o][1].end)):e[n][1]=i,e.push(["exit",i,t]),e}},Ar=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],kr=["pre","script","style","textarea"],wr={name:"htmlFlow",tokenize:function(e,t,n){const r=this;let o,a,i,l,c;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),s}(t)};function s(l){return 33===l?(e.consume(l),u):47===l?(e.consume(l),a=!0,p):63===l?(e.consume(l),o=3,r.interrupt?t:_):On(l)?(e.consume(l),i=String.fromCharCode(l),h):n(l)}function u(a){return 45===a?(e.consume(a),o=2,f):91===a?(e.consume(a),o=5,l=0,d):On(a)?(e.consume(a),o=4,r.interrupt?t:_):n(a)}function f(o){return 45===o?(e.consume(o),r.interrupt?t:_):n(o)}function d(o){return o==="CDATA[".charCodeAt(l++)?(e.consume(o),6===l?r.interrupt?t:E:d):n(o)}function p(t){return On(t)?(e.consume(t),i=String.fromCharCode(t),h):n(t)}function h(l){if(null===l||47===l||62===l||jn(l)){const c=47===l,s=i.toLowerCase();return c||a||!kr.includes(s)?Ar.includes(i.toLowerCase())?(o=6,c?(e.consume(l),g):r.interrupt?t(l):E(l)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(l):a?m(l):b(l)):(o=1,r.interrupt?t(l):E(l))}return 45===l||zn(l)?(e.consume(l),i+=String.fromCharCode(l),h):n(l)}function g(o){return 62===o?(e.consume(o),r.interrupt?t:E):n(o)}function m(t){return Nn(t)?(e.consume(t),m):C(t)}function b(t){return 47===t?(e.consume(t),C):58===t||95===t||On(t)?(e.consume(t),y):Nn(t)?(e.consume(t),b):C(t)}function y(t){return 45===t||46===t||58===t||95===t||zn(t)?(e.consume(t),y):v(t)}function v(t){return 61===t?(e.consume(t),A):Nn(t)?(e.consume(t),v):b(t)}function A(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),c=t,k):Nn(t)?(e.consume(t),A):w(t)}function k(t){return t===c?(e.consume(t),c=null,x):null===t||_n(t)?n(t):(e.consume(t),k)}function w(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||jn(t)?v(t):(e.consume(t),w)}function x(e){return 47===e||62===e||Nn(e)?b(e):n(e)}function C(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||_n(t)?E(t):Nn(t)?(e.consume(t),S):n(t)}function E(t){return 45===t&&2===o?(e.consume(t),F):60===t&&1===o?(e.consume(t),T):62===t&&4===o?(e.consume(t),j):63===t&&3===o?(e.consume(t),_):93===t&&5===o?(e.consume(t),B):!_n(t)||6!==o&&7!==o?null===t||_n(t)?(e.exit("htmlFlowData"),O(t)):(e.consume(t),E):(e.exit("htmlFlowData"),e.check(xr,N,O)(t))}function O(t){return e.check(Cr,z,N)(t)}function z(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return null===t||_n(t)?O(t):(e.enter("htmlFlowData"),E(t))}function F(t){return 45===t?(e.consume(t),_):E(t)}function T(t){return 47===t?(e.consume(t),i="",L):E(t)}function L(t){if(62===t){const n=i.toLowerCase();return kr.includes(n)?(e.consume(t),j):E(t)}return On(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),L):E(t)}function B(t){return 93===t?(e.consume(t),_):E(t)}function _(t){return 62===t?(e.consume(t),j):45===t&&2===o?(e.consume(t),_):E(t)}function j(t){return null===t||_n(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),j)}function N(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0},xr={tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt($n,t,n)}},partial:!0},Cr={tokenize:function(e,t,n){const r=this;return function(t){return _n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},Sr={tokenize:function(e,t,n){const r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},Er={name:"codeFenced",tokenize:function(e,t,n){const r=this,o={tokenize:function(e,t,n){let o=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(t){return e.enter("codeFencedFence"),Nn(t)?Rn(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===a?(e.enter("codeFencedFenceSequence"),s(t)):n(t)}function s(t){return t===a?(o++,e.consume(t),s):o>=l?(e.exit("codeFencedFenceSequence"),Nn(t)?Rn(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||_n(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0};let a,i=0,l=0;return function(t){return function(t){const n=r.events[r.events.length-1];return i=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,a=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(t)}(t)};function c(t){return t===a?(l++,e.consume(t),c):l<3?n(t):(e.exit("codeFencedFenceSequence"),Nn(t)?Rn(e,s,"whitespace")(t):s(t))}function s(n){return null===n||_n(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Sr,p,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||_n(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(t)):Nn(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Rn(e,f,"whitespace")(t)):96===t&&t===a?n(t):(e.consume(t),u)}function f(t){return null===t||_n(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||_n(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(t)):96===t&&t===a?n(t):(e.consume(t),d)}function p(t){return e.attempt(o,y,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),g}function g(t){return i>0&&Nn(t)?Rn(e,m,"linePrefix",i+1)(t):m(t)}function m(t){return null===t||_n(t)?e.check(Sr,p,y)(t):(e.enter("codeFlowValue"),b(t))}function b(t){return null===t||_n(t)?(e.exit("codeFlowValue"),m(t)):(e.consume(t),b)}function y(n){return e.exit("codeFenced"),t(n)}},concrete:!0},Or=document.createElement("i");function zr(e){const t="&"+e+";";Or.innerHTML=t;const n=Or.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}const Pr={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,a,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),l};function l(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,a=zn,s(t))}function c(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=Ln,s):(e.enter("characterReferenceValue"),o=7,a=Tn,s(t))}function s(l){if(59===l&&i){const o=e.exit("characterReferenceValue");return a!==zn||zr(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)}return a(l)&&i++<o?(e.consume(l),s):n(l)}}},Fr={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Bn(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},Tr={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Rn(e,t,"linePrefix")}}},Lr={name:"labelEnd",tokenize:function(e,t,n){const r=this;let o,a,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){o=r.events[i][1];break}return function(t){return o?o._inactive?u(t):(a=r.parser.defined.includes(pr(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l):n(t)};function l(t){return 40===t?e.attempt(Br,s,a?s:u)(t):91===t?e.attempt(_r,s,a?c:u)(t):a?s(t):u(t)}function c(t){return e.attempt(jr,s,u)(t)}function s(e){return t(e)}function u(e){return o._balanced=!0,n(e)}},resolveTo:function(e,t){let n,r,o,a,i=e.length,l=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){l=2;break}}else"labelEnd"===n.type&&(o=i);const c={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[o][1].end)},u={type:"labelText",start:Object.assign({},e[r+l+2][1].end),end:Object.assign({},e[o-2][1].start)};return a=[["enter",c,t],["enter",s,t]],a=wn(a,e.slice(r+1,r+l+3)),a=wn(a,[["enter",u,t]]),a=wn(a,nr(t.parser.constructs.insideSpan.null,e.slice(r+l+4,o-3),t)),a=wn(a,[["exit",u,t],e[o-2],e[o-1],["exit",s,t]]),a=wn(a,e.slice(o+1)),a=wn(a,[["exit",c,t]]),kn(e,r,e.length,a),e},resolveAll:function(e){let t=-1;for(;++t<e.length;){const n=e[t][1];"labelImage"!==n.type&&"labelLink"!==n.type&&"labelEnd"!==n.type||(e.splice(t+1,"labelImage"===n.type?4:2),n.type="data",t++)}return e}},Br={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return jn(t)?dr(e,o)(t):o(t)}function o(t){return 41===t?s(t):sr(e,a,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return jn(t)?dr(e,l)(t):s(t)}function i(e){return n(e)}function l(t){return 34===t||39===t||40===t?fr(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):s(t)}function c(t){return jn(t)?dr(e,s)(t):s(t)}function s(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},_r={tokenize:function(e,t,n){const r=this;return function(t){return ur.call(r,e,o,a,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(pr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function a(e){return n(e)}}},jr={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},Nr={name:"labelStartImage",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),a):n(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:Lr.resolveAll};function Mr(e){return null===e||jn(e)||In(e)?1:Mn(e)?2:void 0}const Ir={name:"attention",tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Mr(r);let a;return function(t){return a=t,e.enter("attentionSequence"),i(t)};function i(l){if(l===a)return e.consume(l),i;const c=e.exit("attentionSequence"),s=Mr(l),u=!s||2===s&&o||n.includes(l),f=!o||2===o&&s||n.includes(r);return c._open=Boolean(42===a?u:u&&(o||!f)),c._close=Boolean(42===a?f:f&&(s||!u)),t(l)}},resolveAll:function(e,t){let n,r,o,a,i,l,c,s,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const f=Object.assign({},e[n][1].end),d=Object.assign({},e[u][1].start);Dr(f,-l),Dr(d,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[n][1].end)},i={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[u][1].start),end:d},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[u][1].start)},r={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},i.end)},e[n][1].end=Object.assign({},a.start),e[u][1].start=Object.assign({},i.end),c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=wn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=wn(c,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",o,t]]),c=wn(c,nr(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),c=wn(c,[["exit",o,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(s=2,c=wn(c,[["enter",e[u][1],t],["exit",e[u][1],t]])):s=0,kn(e,n-1,u-n+3,c),u=n+c.length-s-2;break}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e}};function Dr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Rr={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return On(t)?(e.consume(t),a):c(t)}function a(e){return 43===e||45===e||46===e||zn(e)?(r=1,i(e)):c(e)}function i(t){return 58===t?(e.consume(t),r=0,l):(43===t||45===t||46===t||zn(t))&&r++<32?(e.consume(t),i):(r=0,c(t))}function l(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||Fn(r)?n(r):(e.consume(r),l)}function c(t){return 64===t?(e.consume(t),s):Pn(t)?(e.consume(t),c):n(t)}function s(e){return zn(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,s):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):f(n)}function f(t){if((45===t||zn(t))&&r++<63){const n=45===t?f:u;return e.consume(t),n}return n(t)}}},Hr={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,a,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),l};function l(t){return 33===t?(e.consume(t),c):47===t?(e.consume(t),A):63===t?(e.consume(t),y):On(t)?(e.consume(t),x):n(t)}function c(t){return 45===t?(e.consume(t),s):91===t?(e.consume(t),a=0,p):On(t)?(e.consume(t),b):n(t)}function s(t){return 45===t?(e.consume(t),d):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),f):_n(t)?(i=u,L(t)):(e.consume(t),u)}function f(t){return 45===t?(e.consume(t),d):u(t)}function d(e){return 62===e?T(e):45===e?f(e):u(e)}function p(t){return t==="CDATA[".charCodeAt(a++)?(e.consume(t),6===a?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),g):_n(t)?(i=h,L(t)):(e.consume(t),h)}function g(t){return 93===t?(e.consume(t),m):h(t)}function m(t){return 62===t?T(t):93===t?(e.consume(t),m):h(t)}function b(t){return null===t||62===t?T(t):_n(t)?(i=b,L(t)):(e.consume(t),b)}function y(t){return null===t?n(t):63===t?(e.consume(t),v):_n(t)?(i=y,L(t)):(e.consume(t),y)}function v(e){return 62===e?T(e):y(e)}function A(t){return On(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||zn(t)?(e.consume(t),k):w(t)}function w(t){return _n(t)?(i=w,L(t)):Nn(t)?(e.consume(t),w):T(t)}function x(t){return 45===t||zn(t)?(e.consume(t),x):47===t||62===t||jn(t)?C(t):n(t)}function C(t){return 47===t?(e.consume(t),T):58===t||95===t||On(t)?(e.consume(t),S):_n(t)?(i=C,L(t)):Nn(t)?(e.consume(t),C):T(t)}function S(t){return 45===t||46===t||58===t||95===t||zn(t)?(e.consume(t),S):E(t)}function E(t){return 61===t?(e.consume(t),O):_n(t)?(i=E,L(t)):Nn(t)?(e.consume(t),E):C(t)}function O(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,z):_n(t)?(i=O,L(t)):Nn(t)?(e.consume(t),O):(e.consume(t),P)}function z(t){return t===o?(e.consume(t),o=void 0,F):null===t?n(t):_n(t)?(i=z,L(t)):(e.consume(t),z)}function P(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||jn(t)?C(t):(e.consume(t),P)}function F(e){return 47===e||62===e||jn(e)?C(e):n(e)}function T(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function L(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),B}function B(t){return Nn(t)?Rn(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):_(t)}function _(t){return e.enter("htmlTextData"),i(t)}}},Ur={name:"labelStartLink",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:Lr.resolveAll},Wr={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return _n(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},$r={name:"codeText",tokenize:function(e,t,n){let r,o,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),a++,i):(e.exit("codeTextSequence"),l(t))}function l(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):96===t?(o=e.enter("codeTextSequence"),r=0,s(t)):_n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||_n(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),c)}function s(n){return 96===n?(e.consume(n),r++,s):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",c(n))}},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}for(t=o-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}},Vr={42:ar,43:ar,45:ar,48:ar,49:ar,50:ar,51:ar,52:ar,53:ar,54:ar,55:ar,56:ar,57:ar,62:cr},qr={91:hr},Yr={[-2]:mr,[-1]:mr,32:mr},Gr={35:yr,42:or,45:[vr,or],60:wr,61:vr,95:or,96:Er,126:Er},Qr={38:Pr,92:Fr},Zr={[-5]:Tr,[-4]:Tr,[-3]:Tr,33:Nr,38:Pr,42:Ir,60:[Rr,Hr],91:Ur,92:[Wr,Fr],93:Lr,95:Ir,96:$r},Kr={null:[Ir,Zn]},Xr={null:[42,95]},Jr={null:[]},eo=/[\0\t\n\r]/g;function to(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535==(65535&n)||65534==(65535&n)||n>1114111?"�":String.fromCharCode(n)}const no=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ro(e){return e.replace(no,oo)}function oo(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return to(n.slice(t?2:1),t?16:10)}return zr(n)||e}const ao={}.hasOwnProperty,io=function(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(A),autolinkProtocol:d,autolinkEmail:d,atxHeading:i(b),blockQuote:i((function(){return{type:"blockquote",children:[]}})),characterEscape:d,characterReference:d,codeFenced:i(m),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:i(m,l),codeText:i((function(){return{type:"inlineCode",value:""}}),l),codeTextData:d,data:d,codeFlowValue:d,definition:i((function(){return{type:"definition",identifier:"",label:null,title:null,url:""}})),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:i((function(){return{type:"emphasis",children:[]}})),hardBreakEscape:i(y),hardBreakTrailing:i(y),htmlFlow:i(v,l),htmlFlowData:d,htmlText:i(v,l),htmlTextData:d,image:i((function(){return{type:"image",title:null,url:"",alt:null}})),label:l,link:i(A),listItem:i((function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}})),listItemValue:function(e){a("expectingFirstListItemValue")&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),o("expectingFirstListItemValue"))},listOrdered:i(k,(function(){o("expectingFirstListItemValue",!0)})),listUnordered:i(k),paragraph:i((function(){return{type:"paragraph",children:[]}})),reference:function(){o("referenceType","collapsed")},referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:i(b),strong:i((function(){return{type:"strong",children:[]}})),thematicBreak:i((function(){return{type:"thematicBreak"}}))},exit:{atxHeading:s(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}},autolink:s(),autolinkEmail:function(e){p.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){p.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:s(),characterEscapeValue:p,characterReferenceMarkerHexadecimal:g,characterReferenceMarkerNumeric:g,characterReferenceValue:function(e){const t=this.sliceSerialize(e),n=a("characterReferenceType");let r;n?(r=to(t,"characterReferenceMarkerNumeric"===n?10:16),o("characterReferenceType")):r=zr(t);const i=this.stack.pop();i.value+=r,i.position.end=lo(e.end)},codeFenced:s((function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),o("flowCodeInside")})),codeFencedFence:function(){a("flowCodeInside")||(this.buffer(),o("flowCodeInside",!0))},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:p,codeIndented:s((function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")})),codeText:s((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),codeTextData:p,data:p,definition:s(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=pr(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:s(),hardBreakEscape:s(h),hardBreakTrailing:s(h),htmlFlow:s((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),htmlFlowData:p,htmlText:s((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),htmlTextData:p,image:s((function(){const e=this.stack[this.stack.length-1];if(a("inReference")){const t=a("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;o("referenceType")})),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(o("inReference",!0),"link"===n.type){const t=e.children;n.children=t}else n.alt=t},labelText:function(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=ro(t),n.identifier=pr(t).toLowerCase()},lineEnding:function(e){const n=this.stack[this.stack.length-1];if(a("atHardBreak"))return n.children[n.children.length-1].position.end=lo(e.end),void o("atHardBreak");!a("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(n.type)&&(d.call(this,e),p.call(this,e))},link:s((function(){const e=this.stack[this.stack.length-1];if(a("inReference")){const t=a("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;o("referenceType")})),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=pr(this.sliceSerialize(e)).toLowerCase(),o("referenceType","full")},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){o("inReference")},setextHeading:s((function(){o("setextHeadingSlurpLineEnding")})),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2},setextHeadingText:function(){o("setextHeadingSlurpLineEnding",!0)},strong:s(),thematicBreak:s()}};co(t,(e||{}).mdastExtensions||[]);const n={};return function(e){let n={type:"root",children:[]};const i={stack:[n],tokenStack:[],config:t,enter:c,exit:u,buffer:l,resume:f,setData:o,getData:a},s=[];let d=-1;for(;++d<e.length;)"listOrdered"!==e[d][1].type&&"listUnordered"!==e[d][1].type||("enter"===e[d][0]?s.push(d):d=r(e,s.pop(),d));for(d=-1;++d<e.length;){const n=t[e[d][0]];ao.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},i),e[d][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||uo).call(i,void 0,e[0])}for(n.position={start:lo(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:lo(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)n=t.transforms[d](n)||n;return n};function r(e,t,n){let r,o,a,i,l=t-1,c=-1,s=!1;for(;++l<=n;){const t=e[l];if("listUnordered"===t[1].type||"listOrdered"===t[1].type||"blockQuote"===t[1].type?("enter"===t[0]?c++:c--,i=void 0):"lineEndingBlank"===t[1].type?"enter"===t[0]&&(!r||i||c||a||(a=l),i=void 0):"linePrefix"===t[1].type||"listItemValue"===t[1].type||"listItemMarker"===t[1].type||"listItemPrefix"===t[1].type||"listItemPrefixWhitespace"===t[1].type||(i=void 0),!c&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===c&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=l;for(o=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",s=!0),t[1].type="lineEnding",o=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}a&&(!o||a<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||l,0,["exit",r,t[2]]),l++,n++}"listItemPrefix"===t[1].type&&(r={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0},e.splice(l,0,["enter",r,t[2]]),l++,n++,a=void 0,i=!0)}}return e[t][1]._spread=s,n}function o(e,t){n[e]=t}function a(e){return n[e]}function i(e,t){return function(n){c.call(this,e(n),n),t&&t.call(this,n)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(e,t,n){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:lo(t.start)},e}function s(e){return function(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Ht({start:e.start,end:e.end})+"): it’s not open");return r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||uo).call(this,e,r[0])),n.position.end=lo(e.end),n}function f(){return function(e,t){return vn(e,"boolean"!=typeof yn.includeImageAlt||yn.includeImageAlt,"boolean"!=typeof yn.includeHtml||yn.includeHtml)}(this.stack.pop())}function d(e){const t=this.stack[this.stack.length-1];let n=t.children[t.children.length-1];n&&"text"===n.type||(n={type:"text",value:""},n.position={start:lo(e.start)},t.children.push(n)),this.stack.push(n)}function p(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=lo(e.end)}function h(){o("atHardBreak",!0)}function g(e){o("characterReferenceType",e.type)}function m(){return{type:"code",lang:null,meta:null,value:""}}function b(){return{type:"heading",depth:void 0,children:[]}}function y(){return{type:"break"}}function v(){return{type:"html",value:""}}function A(){return{type:"link",title:null,url:"",children:[]}}function k(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}(n)(function(e){for(;!Vn(e););return e}(function(e){const t={defined:[],lazy:{},constructs:Cn([r,...(e||{}).extensions||[]]),content:n(Hn),document:n(Un),flow:n(Qn),string:n(Kn),text:n(Xn)};return t;function n(e){return function(n){return rr(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,a,i){const l=[];let c,s,u,f,d;for(o=n+o.toString(a),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(eo.lastIndex=u,c=eo.exec(o),f=c&&void 0!==c.index?c.index:o.length,d=o.charCodeAt(f),!c){n=o.slice(u);break}if(10===d&&u===f&&e)l.push(-3),e=void 0;else switch(e&&(l.push(-5),e=void 0),u<f&&(l.push(o.slice(u,f)),t+=f-u),d){case 0:l.push(65533),t++;break;case 9:for(s=4*Math.ceil(t/4),l.push(-2);t++<s;)l.push(-1);break;case 10:l.push(-4),t=1;break;default:e=!0,t=1}u=f+1}return i&&(e&&l.push(-5),n&&l.push(n),l.push(null)),l}}()(e,t,!0))))};function lo(e){return{line:e.line,column:e.column,offset:e.offset}}function co(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?co(e,r):so(e,r)}}function so(e,t){let n;for(n in t)if(ao.call(t,n))if("canContainEols"===n){const r=t[n];r&&e[n].push(...r)}else if("transforms"===n){const r=t[n];r&&e[n].push(...r)}else if("enter"===n||"exit"===n){const r=t[n];r&&Object.assign(e[n],r)}}function uo(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ht({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ht({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ht({start:t.start,end:t.end})+") is still open")}function fo(e){Object.assign(this,{Parser:t=>{const n=this.data("settings");return io(t,Object.assign({},n,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function po(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let i="";if(37===a&&zn(e.charCodeAt(n+1))&&zn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){const t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(i=String.fromCharCode(a,t),o=1):i="�"}else i=String.fromCharCode(a);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+o+1,i=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}const ho=function(e){if(null==e)return mo;if("string"==typeof e)return t=e,go((function(e){return e&&e.type===t}));var t;if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ho(e[n]);return go((function(...e){let n=-1;for(;++n<t.length;)if(t[n].call(this,...e))return!0;return!1}))}(e):function(e){return go((function(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0}))}(e);if("function"==typeof e)return go(e);throw new Error("Expected function, string, or object as test")};function go(e){return function(t,...n){return Boolean(t&&"object"==typeof t&&"type"in t&&Boolean(e.call(this,t,...n)))}}function mo(){return!0}const bo=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null);const o=ho(t),a=r?-1:1;!function e(i,l,c){const s=i&&"object"==typeof i?i:{};if("string"==typeof s.type){const e="string"==typeof s.tagName?s.tagName:"string"==typeof s.name?s.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){let s,u,f,d=[];if((!t||o(i,l,c[c.length-1]||null))&&(d=function(e){return Array.isArray(e)?e:"number"==typeof e?[!0,e]:[e]}(n(i,c)),!1===d[0]))return d;if(i.children&&"skip"!==d[0])for(u=(r?i.children.length:-1)+a,f=c.concat(i);u>-1&&u<i.children.length;){if(s=e(i.children[u],u,f)(),!1===s[0])return s;u="number"==typeof s[1]?s[1]:u+a}return d}}(e,void 0,[])()},yo=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),bo(e,t,(function(e,t){const r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}),r)},vo=ko("start"),Ao=ko("end");function ko(e){return function(t){const n=t&&t.position&&t.position[e]||{};return{line:n.line||null,column:n.column||null,offset:n.offset>-1?n.offset:null}}}const wo={}.hasOwnProperty;function xo(e){return String(e||"").toUpperCase()}function Co(e,t){const n=String(t.identifier).toUpperCase(),r=po(n.toLowerCase()),o=e.footnoteOrder.indexOf(n);let a;-1===o?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,a=e.footnoteOrder.length):(e.footnoteCounts[n]++,a=o+1);const i=e.footnoteCounts[n],l={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function So(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return{type:"text",value:"!["+t.alt+r};const o=e.all(t),a=o[0];a&&"text"===a.type?a.value="["+a.value:o.unshift({type:"text",value:"["});const i=o[o.length-1];return i&&"text"===i.type?i.value+=r:o.push({type:"text",value:r}),o}function Eo(e){const t=e.spread;return null==t?e.children.length>1:t}const Oo=9,zo=32;function Po(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(Fo(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(Fo(t.slice(o),o>0,!1)),a.join("")}function Fo(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;t===Oo||t===zo;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;t===Oo||t===zo;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const To={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,o={};r&&(o.className=["language-"+r]);let a={type:"element",tagName:"code",properties:o,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:Co,footnote:function(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const o=String(r);return n[o]={type:"footnoteDefinition",identifier:o,children:[{type:"paragraph",children:t.children}],position:t.position},Co(e,{type:"footnoteReference",identifier:o,position:t.position})},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null},imageReference:function(e,t){const n=e.definition(t.identifier);if(!n)return So(e,t);const r={src:po(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(r.title=n.title);const o={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:po(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=e.definition(t.identifier);if(!n)return So(e,t);const r={href:po(n.url||"")};null!==n.title&&void 0!==n.title&&(r.title=n.title);const o={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:po(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Eo(n[r])}return t}(n):Eo(t),a={},i=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const e=r[l];(o||0!==l||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?i.push(e):i.push(...e.children)}const c=r[r.length-1];c&&(o||"element"!==c.type||"p"!==c.tagName)&&i.push({type:"text",value:"\n"});const s={type:"element",tagName:"li",properties:a,children:i};return e.patch(t,s),e.applyData(t,s)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=vo(t.children[1]),i=Ao(t.children[t.children.length-1]);a.line&&i.line&&(r.position={start:a,end:i}),o.push(r)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,i=a?a.length:t.children.length;let l=-1;const c=[];for(;++l<i;){const n=t.children[l],r={},i=a?a[l]:void 0;i&&(r.align=i);let s={type:"element",tagName:o,properties:r,children:[]};n&&(s.children=e.all(n),e.patch(n,s),s=e.applyData(t,s)),c.push(s)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,s),e.applyData(t,s)},text:function(e,t){const n={type:"text",value:Po(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Lo,yaml:Lo,definition:Lo,footnoteDefinition:Lo};function Lo(){return null}const Bo={}.hasOwnProperty;function _o(e,t){var n;e.position&&(t.position={start:vo(n=e),end:Ao(n)})}function jo(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:[]}),"element"===n.type&&o&&(n.properties={...n.properties,...o}),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function No(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return Bo.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?{...t,children:Mo(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):function(e,t){const n=t.data||{},r=!("value"in t)||Bo.call(n,"hProperties")||Bo.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:Mo(e,t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}(e,t)}function Mo(e,t){const n=[];if("children"in t){const r=t.children;let o=-1;for(;++o<r.length;){const a=No(e,r[o],t);if(a){if(o&&"break"===r[o-1].type&&(Array.isArray(a)||"text"!==a.type||(a.value=a.value.replace(/^\s+/,"")),!Array.isArray(a)&&"element"===a.type)){const e=a.children[0];e&&"text"===e.type&&(e.value=e.value.replace(/^\s+/,""))}Array.isArray(a)?n.push(...a):n.push(a)}}}return n}function Io(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Do(e,t){const n=function(e,t){const n=t||{},r=n.allowDangerousHtml||!1,o={};return i.dangerous=r,i.clobberPrefix=void 0===n.clobberPrefix||null===n.clobberPrefix?"user-content-":n.clobberPrefix,i.footnoteLabel=n.footnoteLabel||"Footnotes",i.footnoteLabelTagName=n.footnoteLabelTagName||"h2",i.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},i.footnoteBackLabel=n.footnoteBackLabel||"Back to content",i.unknownHandler=n.unknownHandler,i.passThrough=n.passThrough,i.handlers={...To,...n.handlers},i.definition=function(e){const t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return yo(e,"definition",(e=>{const n=xo(e.identifier);n&&!wo.call(t,n)&&(t[n]=e)})),function(e){const n=xo(e);return n&&wo.call(t,n)?t[n]:null}}(e),i.footnoteById=o,i.footnoteOrder=[],i.footnoteCounts={},i.patch=_o,i.applyData=jo,i.one=function(e,t){return No(i,e,t)},i.all=function(e){return Mo(i,e)},i.wrap=Io,i.augment=a,yo(e,"footnoteDefinition",(e=>{const t=String(e.identifier).toUpperCase();Bo.call(o,t)||(o[t]=e)})),i;function a(e,t){if(e&&"data"in e&&e.data){const n=e.data;n.hName&&("element"!==t.type&&(t={type:"element",tagName:"",properties:{},children:[]}),t.tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties={...t.properties,...n.hProperties}),"children"in t&&t.children&&n.hChildren&&(t.children=n.hChildren)}if(e){const r="type"in e?e:{position:e};!((n=r)&&n.position&&n.position.start&&n.position.start.line&&n.position.start.column&&n.position.end&&n.position.end.line&&n.position.end.column)||(t.position={start:vo(r),end:Ao(r)})}var n;return t}function i(e,t,n,r){return Array.isArray(n)&&(r=n,n={}),a(e,{type:"element",tagName:t,properties:n||{},children:r||[]})}}(e,t),r=n.one(e,null),o=function(e){const t=[];let n=-1;for(;++n<e.footnoteOrder.length;){const r=e.footnoteById[e.footnoteOrder[n]];if(!r)continue;const o=e.all(r),a=String(r.identifier).toUpperCase(),i=po(a.toLowerCase());let l=0;const c=[];for(;++l<=e.footnoteCounts[a];){const t={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};l>1&&t.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(l)}]}),c.length>0&&c.push({type:"text",value:" "}),c.push(t)}const s=o[o.length-1];if(s&&"element"===s.type&&"p"===s.tagName){const e=s.children[s.children.length-1];e&&"text"===e.type?e.value+=" ":s.children.push({type:"text",value:" "}),s.children.push(...c)}else o.push(...c);const u={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+i},children:e.wrap(o,!0)};e.patch(r,u),t.push(u)}if(0!==t.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:"\n"}]}}(n);return o&&r.children.push({type:"text",value:"\n"},o),Array.isArray(r)?{type:"root",children:r}:r}const Ro=function(e,t){return e&&"run"in e?function(e,t){return(n,r,o)=>{e.run(Do(n,t),r,(e=>{o(e)}))}}(e,t):function(e){return t=>Do(t,e)}(e||t)};class Ho{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function Uo(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Ho(n,r,t)}function Wo(e){return e.toLowerCase()}Ho.prototype.property={},Ho.prototype.normal={},Ho.prototype.space=null;class $o{constructor(e,t){this.property=e,this.attribute=t}}$o.prototype.space=null,$o.prototype.boolean=!1,$o.prototype.booleanish=!1,$o.prototype.overloadedBoolean=!1,$o.prototype.number=!1,$o.prototype.commaSeparated=!1,$o.prototype.spaceSeparated=!1,$o.prototype.commaOrSpaceSeparated=!1,$o.prototype.mustUseProperty=!1,$o.prototype.defined=!1;let Vo=0;const qo=Jo(),Yo=Jo(),Go=Jo(),Qo=Jo(),Zo=Jo(),Ko=Jo(),Xo=Jo();function Jo(){return 2**++Vo}const ea=Object.keys(o);class ta extends $o{constructor(e,t,n,r){let a=-1;if(super(e,t),na(this,"space",r),"number"==typeof n)for(;++a<ea.length;){const e=ea[a];na(this,ea[a],(n&o[e])===o[e])}}}function na(e,t,n){n&&(e[t]=n)}ta.prototype.defined=!0;const ra={}.hasOwnProperty;function oa(e){const t={},n={};let r;for(r in e.properties)if(ra.call(e.properties,r)){const o=e.properties[r],a=new ta(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Wo(r)]=r,n[Wo(a.attribute)]=r}return new Ho(t,n,e.space)}const aa=oa({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),ia=oa({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function la(e,t){return t in e?e[t]:t}function ca(e,t){return la(e,t.toLowerCase())}const sa=oa({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:ca,properties:{xmlns:null,xmlnsXLink:null}}),ua=oa({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Yo,ariaAutoComplete:null,ariaBusy:Yo,ariaChecked:Yo,ariaColCount:Qo,ariaColIndex:Qo,ariaColSpan:Qo,ariaControls:Zo,ariaCurrent:null,ariaDescribedBy:Zo,ariaDetails:null,ariaDisabled:Yo,ariaDropEffect:Zo,ariaErrorMessage:null,ariaExpanded:Yo,ariaFlowTo:Zo,ariaGrabbed:Yo,ariaHasPopup:null,ariaHidden:Yo,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Zo,ariaLevel:Qo,ariaLive:null,ariaModal:Yo,ariaMultiLine:Yo,ariaMultiSelectable:Yo,ariaOrientation:null,ariaOwns:Zo,ariaPlaceholder:null,ariaPosInSet:Qo,ariaPressed:Yo,ariaReadOnly:Yo,ariaRelevant:null,ariaRequired:Yo,ariaRoleDescription:Zo,ariaRowCount:Qo,ariaRowIndex:Qo,ariaRowSpan:Qo,ariaSelected:Yo,ariaSetSize:Qo,ariaSort:null,ariaValueMax:Qo,ariaValueMin:Qo,ariaValueNow:Qo,ariaValueText:null,role:null}}),fa=oa({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:ca,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ko,acceptCharset:Zo,accessKey:Zo,action:null,allow:null,allowFullScreen:qo,allowPaymentRequest:qo,allowUserMedia:qo,alt:null,as:null,async:qo,autoCapitalize:null,autoComplete:Zo,autoFocus:qo,autoPlay:qo,blocking:Zo,capture:qo,charSet:null,checked:qo,cite:null,className:Zo,cols:Qo,colSpan:null,content:null,contentEditable:Yo,controls:qo,controlsList:Zo,coords:Qo|Ko,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qo,defer:qo,dir:null,dirName:null,disabled:qo,download:Go,draggable:Yo,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qo,formTarget:null,headers:Zo,height:Qo,hidden:qo,high:Qo,href:null,hrefLang:null,htmlFor:Zo,httpEquiv:Zo,id:null,imageSizes:null,imageSrcSet:null,inert:qo,inputMode:null,integrity:null,is:null,isMap:qo,itemId:null,itemProp:Zo,itemRef:Zo,itemScope:qo,itemType:Zo,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qo,low:Qo,manifest:null,max:null,maxLength:Qo,media:null,method:null,min:null,minLength:Qo,multiple:qo,muted:qo,name:null,nonce:null,noModule:qo,noValidate:qo,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:qo,optimum:Qo,pattern:null,ping:Zo,placeholder:null,playsInline:qo,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qo,referrerPolicy:null,rel:Zo,required:qo,reversed:qo,rows:Qo,rowSpan:Qo,sandbox:Zo,scope:null,scoped:qo,seamless:qo,selected:qo,shape:null,size:Qo,sizes:null,slot:null,span:Qo,spellCheck:Yo,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Qo,step:null,style:null,tabIndex:Qo,target:null,title:null,translate:null,type:null,typeMustMatch:qo,useMap:null,value:Yo,width:Qo,wrap:null,align:null,aLink:null,archive:Zo,axis:null,background:null,bgColor:null,border:Qo,borderColor:null,bottomMargin:Qo,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:qo,declare:qo,event:null,face:null,frame:null,frameBorder:null,hSpace:Qo,leftMargin:Qo,link:null,longDesc:null,lowSrc:null,marginHeight:Qo,marginWidth:Qo,noResize:qo,noHref:qo,noShade:qo,noWrap:qo,object:null,profile:null,prompt:null,rev:null,rightMargin:Qo,rules:null,scheme:null,scrolling:Yo,standby:null,summary:null,text:null,topMargin:Qo,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Qo,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:qo,disableRemotePlayback:qo,prefix:null,property:null,results:Qo,security:null,unselectable:null}}),da=oa({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:la,properties:{about:Xo,accentHeight:Qo,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Qo,amplitude:Qo,arabicForm:null,ascent:Qo,attributeName:null,attributeType:null,azimuth:Qo,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Qo,by:null,calcMode:null,capHeight:Qo,className:Zo,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Qo,diffuseConstant:Qo,direction:null,display:null,dur:null,divisor:Qo,dominantBaseline:null,download:qo,dx:null,dy:null,edgeMode:null,editable:null,elevation:Qo,enableBackground:null,end:null,event:null,exponent:Qo,externalResourcesRequired:null,fill:null,fillOpacity:Qo,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ko,g2:Ko,glyphName:Ko,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Qo,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Qo,horizOriginX:Qo,horizOriginY:Qo,id:null,ideographic:Qo,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Qo,k:Qo,k1:Qo,k2:Qo,k3:Qo,k4:Qo,kernelMatrix:Xo,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Qo,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Qo,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Qo,overlineThickness:Qo,paintOrder:null,panose1:null,path:null,pathLength:Qo,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Zo,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Qo,pointsAtY:Qo,pointsAtZ:Qo,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Xo,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Xo,rev:Xo,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Xo,requiredFeatures:Xo,requiredFonts:Xo,requiredFormats:Xo,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Qo,specularExponent:Qo,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Qo,strikethroughThickness:Qo,string:null,stroke:null,strokeDashArray:Xo,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Qo,strokeOpacity:Qo,strokeWidth:null,style:null,surfaceScale:Qo,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Xo,tabIndex:Qo,tableValues:null,target:null,targetX:Qo,targetY:Qo,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Xo,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Qo,underlineThickness:Qo,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Qo,values:null,vAlphabetic:Qo,vMathematical:Qo,vectorEffect:null,vHanging:Qo,vIdeographic:Qo,version:null,vertAdvY:Qo,vertOriginX:Qo,vertOriginY:Qo,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Qo,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),pa=Uo([ia,aa,sa,ua,fa],"html"),ha=Uo([ia,aa,sa,ua,da],"svg");function ga(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{yo(t,"element",((t,n,r)=>{const o=r;let a;if(e.allowedElements?a=!e.allowedElements.includes(t.tagName):e.disallowedElements&&(a=e.disallowedElements.includes(t.tagName)),!a&&e.allowElement&&"number"==typeof n&&(a=!e.allowElement(t,n,o)),a&&"number"==typeof n)return e.unwrapDisallowed&&t.children?o.children.splice(n,1,...t.children):o.children.splice(n,1),n}))}}var ma=n(143);function ba(e){const t=e&&"object"==typeof e&&"text"===e.type?e.value||"":e;return"string"==typeof t&&""===t.replace(/[ \t\n\f\r]/g,"")}const ya=/^data[-\w.:]+$/i,va=/-[a-z]/g,Aa=/[A-Z]/g;function ka(e,t){const n=Wo(t);let r=t,o=$o;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&ya.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(va,xa);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!va.test(e)){let n=e.replace(Aa,wa);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=ta}return new o(r,t)}function wa(e){return"-"+e.toLowerCase()}function xa(e){return e.charAt(1).toUpperCase()}const Ca={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};function Sa(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ea(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){-1===r&&(r=n.length,a=!0);const e=n.slice(o,r).trim();!e&&a||t.push(e),o=r+1,r=n.indexOf(",",o)}return t}const Oa=n(848),za=["http","https","mailto","tel"];function Pa(e){const t=(e||"").trim(),n=t.charAt(0);if("#"===n||"/"===n)return t;const r=t.indexOf(":");if(-1===r)return t;let o=-1;for(;++o<za.length;){const e=za[o];if(r===e.length&&t.slice(0,e.length).toLowerCase()===e)return t}return o=t.indexOf("?"),-1!==o&&r>o?t:(o=t.indexOf("#"),-1!==o&&r>o?t:"javascript:void(0)")}const Fa={}.hasOwnProperty,Ta=new Set(["table","thead","tbody","tfoot","tr"]);function La(e,t){const n=[];let r,o=-1;for(;++o<t.children.length;)r=t.children[o],"element"===r.type?n.push(Ba(e,r,o,t)):"text"===r.type?"element"===t.type&&Ta.has(t.tagName)&&ba(r)||n.push(r.value):"raw"!==r.type||e.options.skipHtml||n.push(r.value);return n}function Ba(e,t,n,r){const o=e.options,a=void 0===o.transformLinkUri?Pa:o.transformLinkUri,i=e.schema,l=t.tagName,c={};let s,u=i;if("html"===i.space&&"svg"===l&&(u=ha,e.schema=u),t.properties)for(s in t.properties)Fa.call(t.properties,s)&&ja(c,s,t.properties[s],e);"ol"!==l&&"ul"!==l||e.listDepth++;const f=La(e,t);"ol"!==l&&"ul"!==l||e.listDepth--,e.schema=i;const d=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},p=o.components&&Fa.call(o.components,l)?o.components[l]:l,h="string"==typeof p||p===A.Fragment;if(!ma.isValidElementType(p))throw new TypeError(`Component for name \`${l}\` not defined or is not renderable`);if(c.key=n,"a"===l&&o.linkTarget&&(c.target="function"==typeof o.linkTarget?o.linkTarget(String(c.href||""),t.children,"string"==typeof c.title?c.title:null):o.linkTarget),"a"===l&&a&&(c.href=a(String(c.href||""),t.children,"string"==typeof c.title?c.title:null)),h||"code"!==l||"element"!==r.type||"pre"===r.tagName||(c.inline=!0),h||"h1"!==l&&"h2"!==l&&"h3"!==l&&"h4"!==l&&"h5"!==l&&"h6"!==l||(c.level=Number.parseInt(l.charAt(1),10)),"img"===l&&o.transformImageUri&&(c.src=o.transformImageUri(String(c.src||""),String(c.alt||""),"string"==typeof c.title?c.title:null)),!h&&"li"===l&&"element"===r.type){const e=function(e){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if("element"===n.type&&"input"===n.tagName)return n}return null}(t);c.checked=e&&e.properties?Boolean(e.properties.checked):null,c.index=_a(r,t),c.ordered="ol"===r.tagName}var g;return h||"ol"!==l&&"ul"!==l||(c.ordered="ol"===l,c.depth=e.listDepth),"td"!==l&&"th"!==l||(c.align&&(c.style||(c.style={}),c.style.textAlign=c.align,delete c.align),h||(c.isHeader="th"===l)),h||"tr"!==l||"element"!==r.type||(c.isHeader=Boolean("thead"===r.tagName)),o.sourcePos&&(c["data-sourcepos"]=[(g=d).start.line,":",g.start.column,"-",g.end.line,":",g.end.column].map(String).join("")),!h&&o.rawSourcePos&&(c.sourcePosition=t.position),!h&&o.includeElementIndex&&(c.index=_a(r,t),c.siblingCount=_a(r)),h||(c.node=t),f.length>0?A.createElement(p,c,f):A.createElement(p,c)}function _a(e,t){let n=-1,r=0;for(;++n<e.children.length&&e.children[n]!==t;)"element"===e.children[n].type&&r++;return r}function ja(e,t,n,r){const o=ka(r.schema,t);let a=n;null!=a&&a==a&&(Array.isArray(a)&&(a=o.commaSeparated?function(e,t){const n={};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}(a):a.join(" ").trim()),"style"===o.property&&"string"==typeof a&&(a=function(e){const t={};try{Oa(e,(function(e,n){const r="-ms-"===e.slice(0,4)?`ms-${e.slice(4)}`:e;t[r.replace(/-([a-z])/g,Na)]=n}))}catch{}return t}(a)),o.space&&o.property?e[Fa.call(Ca,o.property)?Ca[o.property]:o.property]=a:o.attribute&&(e[o.attribute]=a))}function Na(e,t){return t.toUpperCase()}const Ma={}.hasOwnProperty,Ia={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function Da(e){for(const t in Ia)if(Ma.call(Ia,t)&&Ma.call(e,t)){const e=Ia[t];console.warn(`[react-markdown] Warning: please ${e.to?`use \`${e.to}\` instead of`:"remove"} \`${t}\` (see <https://github.com/remarkjs/react-markdown/blob/main/changelog.md#${e.id}> for more info)`),delete Ia[t]}const t=sn().use(fo).use(e.remarkPlugins||[]).use(Ro,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(ga,e),n=new tn;"string"==typeof e.children?n.value=e.children:void 0!==e.children&&null!==e.children&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if("root"!==r.type)throw new TypeError("Expected a `root` node");let o=A.createElement(A.Fragment,{},La({options:e,schema:pa,listDepth:0},r));return e.className&&(o=A.createElement("div",{className:e.className},o)),o}Da.propTypes={children:k.string,className:k.string,allowElement:k.func,allowedElements:k.arrayOf(k.string),disallowedElements:k.arrayOf(k.string),unwrapDisallowed:k.bool,remarkPlugins:k.arrayOf(k.oneOfType([k.object,k.func,k.arrayOf(k.oneOfType([k.bool,k.string,k.object,k.func,k.arrayOf(k.any)]))])),rehypePlugins:k.arrayOf(k.oneOfType([k.object,k.func,k.arrayOf(k.oneOfType([k.bool,k.string,k.object,k.func,k.arrayOf(k.any)]))])),sourcePos:k.bool,rawSourcePos:k.bool,skipHtml:k.bool,includeElementIndex:k.bool,transformLinkUri:k.oneOfType([k.func,k.bool]),linkTarget:k.oneOfType([k.func,k.string]),transformImageUri:k.func,components:k.object};const Ra={tokenize:function(e,t,n){let r=0;return function t(a){return(87===a||119===a)&&r<3?(r++,e.consume(a),t):46===a&&3===r?(e.consume(a),o):n(a)};function o(e){return null===e?n(e):t(e)}},partial:!0},Ha={tokenize:function(e,t,n){let r,o,a;return i;function i(t){return 46===t||95===t?e.check(Wa,c,l)(t):null===t||jn(t)||In(t)||45!==t&&Mn(t)?c(t):(a=!0,e.consume(t),i)}function l(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),i}function c(e){return o||r||!a?n(e):t(e)}},partial:!0},Ua={tokenize:function(e,t){let n=0,r=0;return o;function o(i){return 40===i?(n++,e.consume(i),o):41===i&&r<n?a(i):33===i||34===i||38===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||60===i||63===i||93===i||95===i||126===i?e.check(Wa,t,a)(i):null===i||jn(i)||In(i)?t(i):(e.consume(i),o)}function a(t){return 41===t&&r++,e.consume(t),o}},partial:!0},Wa={tokenize:function(e,t,n){return r;function r(i){return 33===i||34===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||63===i||95===i||126===i?(e.consume(i),r):38===i?(e.consume(i),a):93===i?(e.consume(i),o):60===i||null===i||jn(i)||In(i)?t(i):n(i)}function o(e){return null===e||40===e||91===e||jn(e)||In(e)?t(e):r(e)}function a(e){return On(e)?i(e):n(e)}function i(t){return 59===t?(e.consume(t),r):On(t)?(e.consume(t),i):n(t)}},partial:!0},$a={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return zn(e)?n(e):t(e)}},partial:!0},Va={tokenize:function(e,t,n){const r=this;return function(t){return 87!==t&&119!==t||!Ka.call(r,r.previous)||ti(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ra,e.attempt(Ha,e.attempt(Ua,o),n),n)(t))};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:Ka},qa={tokenize:function(e,t,n){const r=this;let o="",a=!1;return function(t){return 72!==t&&104!==t||!Xa.call(r,r.previous)||ti(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),i)};function i(t){if(On(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),i;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),l}return n(t)}function l(t){return 47===t?(e.consume(t),a?c:(a=!0,l)):n(t)}function c(t){return null===t||Fn(t)||jn(t)||In(t)||Mn(t)?n(t):e.attempt(Ha,e.attempt(Ua,s),n)(t)}function s(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:Xa},Ya={tokenize:function(e,t,n){const r=this;let o,a;return function(t){return ei(t)&&Ja.call(r,r.previous)&&!ti(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(t)):n(t)};function i(t){return ei(t)?(e.consume(t),i):64===t?(e.consume(t),l):n(t)}function l(t){return 46===t?e.check($a,s,c)(t):45===t||95===t||zn(t)?(a=!0,e.consume(t),l):s(t)}function c(t){return e.consume(t),o=!0,l}function s(i){return a&&o&&On(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:Ja},Ga={},Qa={text:Ga};let Za=48;for(;Za<123;)Ga[Za]=Ya,Za++,58===Za?Za=65:91===Za&&(Za=97);function Ka(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||jn(e)}function Xa(e){return!On(e)}function Ja(e){return!(47===e||ei(e))}function ei(e){return 43===e||45===e||46===e||95===e||zn(e)}function ti(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Ga[43]=Ya,Ga[45]=Ya,Ga[46]=Ya,Ga[95]=Ya,Ga[72]=[Ya,qa],Ga[104]=[Ya,qa],Ga[87]=[Ya,Va],Ga[119]=[Ya,Va];const ni={tokenize:function(e,t,n){const r=this;return Rn(e,(function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function ri(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){i=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!i||!i._balanced)return n(o);const l=pr(r.sliceSerialize({start:i.end,end:r.now()}));return 94===l.codePointAt(0)&&a.includes(l.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)):n(o)}}function oi(e,t){let n,r=e.length;for(;r--;)if("labelImage"===e[r][1].type&&"enter"===e[r][0]){n=e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},c=[e[r+1],e[r+2],["enter",o,t],e[r+3],e[r+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",o,t]];return e.splice(r,e.length-r+1,...c),e}function ai(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,i=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),l};function l(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(l){if(i>999||93===l&&!a||null===l||91===l||jn(l))return n(l);if(93===l){e.exit("chunkString");const a=e.exit("gfmFootnoteCallString");return o.includes(pr(r.sliceSerialize(a)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(l)}return jn(l)||(a=!0),i++,e.consume(l),92===l?s:c}function s(t){return 91===t||92===t||93===t?(e.consume(t),i++,c):c(t)}}function ii(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,i,l=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),c};function c(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",s):n(t)}function s(t){if(l>999||93===t&&!i||null===t||91===t||jn(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return a=pr(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return jn(t)||(i=!0),l++,e.consume(t),92===t?u:s}function u(t){return 91===t||92===t||93===t?(e.consume(t),l++,s):s(t)}function f(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(a)||o.push(a),Rn(e,d,"gfmFootnoteDefinitionWhitespace")):n(t)}function d(e){return t(e)}}function li(e,t,n){return e.check($n,t,e.attempt(ni,t,n))}function ci(e){e.exit("gfmFootnoteDefinition")}function si(e){let t=(e||{}).singleTilde;const n={tokenize:function(e,n,r){const o=this.previous,a=this.events;let i=0;return function(t){return 126===o&&"characterEscape"!==a[a.length-1][1].type?r(t):(e.enter("strikethroughSequenceTemporary"),l(t))};function l(a){const c=Mr(o);if(126===a)return i>1?r(a):(e.consume(a),i++,l);if(i<2&&!t)return r(a);const s=e.exit("strikethroughSequenceTemporary"),u=Mr(a);return s._open=!u||2===u&&Boolean(c),s._close=!c||2===c&&Boolean(u),n(a)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",a,t]],l=t.parser.constructs.insideSpan.null;l&&kn(i,i.length,0,nr(l,e.slice(r+1,n),t)),kn(i,i.length,0,[["exit",a,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),kn(e,r-1,n-r+3,i),n=r+i.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class ui{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0!==n||0!==r.length){for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}}(this,e,t,n)}consume(e){if(this.map.sort(((e,t)=>e[0]-t[0])),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1])),n.push(this.map[t][2]),e.length=this.map[t][0];n.push([...e]),e.length=0;let r=n.pop();for(;r;)e.push(...r),r=n.pop();this.map.length=0}}function fi(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}const di={flow:{null:{tokenize:function(e,t,n){const r=this;let o,a=0,i=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,a="tableHead"===o||"tableRow"===o?A:l;return a===A&&r.parser.lazy[r.now().line]?n(e):a(e)};function l(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){return 124===e||(o=!0,i+=1),c(e)}(t)}function c(t){return null===t?n(t):_n(t)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f):n(t):Nn(t)?Rn(e,c,"whitespace")(t):(i+=1,o&&(o=!1,a+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,c):(e.enter("data"),s(t)))}function s(t){return null===t||124===t||jn(t)?(e.exit("data"),c(t)):(e.consume(t),92===t?u:s)}function u(t){return 92===t||124===t?(e.consume(t),s):s(t)}function f(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,Nn(t)?Rn(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):d(t))}function d(t){return 45===t||58===t?h(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):v(t)}function p(t){return Nn(t)?Rn(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(i+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),g):45===t?(i+=1,g(t)):null===t||_n(t)?y(t):v(t)}function g(t){return 45===t?(e.enter("tableDelimiterFiller"),m(t)):v(t)}function m(t){return 45===t?(e.consume(t),m):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(t))}function b(t){return Nn(t)?Rn(e,y,"whitespace")(t):y(t)}function y(n){return 124===n?d(n):(null===n||_n(n))&&o&&a===i?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function A(t){return e.enter("tableRow"),k(t)}function k(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),k):null===n||_n(n)?(e.exit("tableRow"),t(n)):Nn(n)?Rn(e,k,"whitespace")(n):(e.enter("data"),w(n))}function w(t){return null===t||124===t||jn(t)?(e.exit("data"),k(t)):(e.consume(t),92===t?x:w)}function x(t){return 92===t||124===t?(e.consume(t),w):w(t)}},resolveAll:function(e,t){let n,r,o,a=-1,i=!0,l=0,c=[0,0,0,0],s=[0,0,0,0],u=!1,f=0;const d=new ui;for(;++a<e.length;){const p=e[a],h=p[1];"enter"===p[0]?"tableHead"===h.type?(u=!1,0!==f&&(hi(d,t,f,n,r),r=void 0,f=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},d.add(a,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(i=!0,o=void 0,c=[0,0,0,0],s=[0,a+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},d.add(a,0,[["enter",r,t]])),l="tableDelimiterRow"===h.type?2:r?3:1):!l||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(i?i=!1:(0!==c[1]&&(s[0]=s[1],o=pi(d,t,c,l,void 0,o)),c=s,s=[c[1],a,0,0])):(i=!1,0===s[2]&&(0!==c[1]&&(s[0]=s[1],o=pi(d,t,c,l,void 0,o),c=[0,0,0,0]),s[2]=a)):"tableHead"===h.type?(u=!0,f=a):"tableRow"===h.type||"tableDelimiterRow"===h.type?(f=a,0!==c[1]?(s[0]=s[1],o=pi(d,t,c,l,a,o)):0!==s[1]&&(o=pi(d,t,s,l,a,o)),l=0):!l||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(s[3]=a)}for(0!==f&&hi(d,t,f,n,r),d.consume(t.events),a=-1;++a<t.events.length;){const e=t.events[a];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=fi(t.events,a))}return e}}}};function pi(e,t,n,r,o,a){const i=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(a.end=Object.assign({},gi(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const l=gi(t.events,n[1]);if(a={type:i,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),0!==n[2]){const o=gi(t.events,n[2]),a=gi(t.events,n[3]),i={type:"tableContent",start:Object.assign({},o),end:Object.assign({},a)};if(e.add(n[2],0,[["enter",i,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",i,t]])}return void 0!==o&&(a.end=Object.assign({},gi(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function hi(e,t,n,r,o){const a=[],i=gi(t.events,n);o&&(o.end=Object.assign({},i),a.push(["exit",o,t])),r.end=Object.assign({},i),a.push(["exit",r,t]),e.add(n+1,0,a)}function gi(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const mi={tokenize:function(e,t,n){const r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o):n(t)};function o(t){return jn(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):n(t)}function i(r){return _n(r)?t(r):Nn(r)?e.check({tokenize:yi},t,n)(r):n(r)}}},bi={text:{91:mi}};function yi(e,t,n){return Rn(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}function vi(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}const Ai={}.hasOwnProperty;function ki(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function wi(e){return"function"==typeof e?e:()=>e}const xi="phrasing",Ci=["autolink","link","image","label"],Si={transforms:[function(e){!function(e,t,n,r){let o,a;"string"==typeof t||t instanceof RegExp?(a=[[t,n]],o=r):(a=t,o=n),o||(o={});const i=ho(o.ignore||[]),l=function(e){const t=[];if("object"!=typeof e)throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let n=-1;for(;++n<e.length;)t.push([ki(e[n][0]),wi(e[n][1])])}else{let n;for(n in e)Ai.call(e,n)&&t.push([ki(n),wi(e[n])])}return t}(a);let c=-1;for(;++c<l.length;)bo(e,"text",s);return e;function s(e,t){let n,r=-1;for(;++r<t.length;){const e=t[r];if(i(e,n?n.children.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=l[c][0],o=l[c][1];let a=0;const i=n.children.indexOf(e);let s=!1,u=[];r.lastIndex=0;let f=r.exec(e.value);for(;f;){const n=f.index,i={index:f.index,input:f.input,stack:[...t,e]};let l=o(...f,i);if("string"==typeof l&&(l=l.length>0?{type:"text",value:l}:void 0),!1!==l&&(a!==n&&u.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(l)?u.push(...l):l&&u.push(l),a=n+f[0].length,s=!0),!r.global)break;f=r.exec(e.value)}return s?(a<e.value.length&&u.push({type:"text",value:e.value.slice(a)}),n.children.splice(i,1,...u)):u=[e],i+u.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,zi],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,Pi]],{ignore:["link","linkReference"]})}],enter:{literalAutolink:function(e){this.enter({type:"link",title:null,url:"",children:[]},e)},literalAutolinkEmail:Oi,literalAutolinkHttp:Oi,literalAutolinkWww:Oi},exit:{literalAutolink:function(e){this.exit(e)},literalAutolinkEmail:function(e){this.config.exit.autolinkEmail.call(this,e)},literalAutolinkHttp:function(e){this.config.exit.autolinkProtocol.call(this,e)},literalAutolinkWww:function(e){this.config.exit.data.call(this,e);this.stack[this.stack.length-1].url="http://"+this.sliceSerialize(e)}}},Ei={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xi,notInConstruct:Ci},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xi,notInConstruct:Ci},{character:":",before:"[ps]",after:"\\/",inConstruct:xi,notInConstruct:Ci}]};function Oi(e){this.config.enter.autolinkProtocol.call(this,e)}function zi(e,t,n,r,o){let a="";if(!Fi(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!function(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(n))return!1;const i=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=vi(e,"(");let a=vi(e,")");for(;-1!==r&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}(n+r);if(!i[0])return!1;const l={type:"link",title:null,url:a+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[l,{type:"text",value:i[1]}]:l}function Pi(e,t,n,r){return!(!Fi(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Fi(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||In(n)||Mn(n))&&(!t||47!==n)}function Ti(e){return e.label||!e.identifier?e.label||"":ro(e.identifier)}function Li(e,t,n,r){let o=r.join.length;for(;o--;){const a=r.join[o](e,t,n,r);if(!0===a||1===a)break;if("number"==typeof a)return"\n".repeat(1+a);if(!1===a)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}const Bi=/\r?\n|\r/g;function _i(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function ji(e,t){return Ni(e,t.inConstruct,!0)&&!Ni(e,t.notInConstruct,!1)}function Ni(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Mi(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),o=[],a=[],i={};let l=-1;for(;++l<e.unsafe.length;){const t=e.unsafe[l];if(!ji(e.stack,t))continue;const n=_i(t);let a;for(;a=n.exec(r);){const e="before"in t||Boolean(t.atBreak),n="after"in t,r=a.index+(e?a[1].length:0);o.includes(r)?(i[r].before&&!e&&(i[r].before=!1),i[r].after&&!n&&(i[r].after=!1)):(o.push(r),i[r]={before:e,after:n})}}o.sort(Ii);let c=n.before?n.before.length:0;const s=r.length-(n.after?n.after.length:0);for(l=-1;++l<o.length;){const e=o[l];e<c||e>=s||e+1<s&&o[l+1]===e+1&&i[e].after&&!i[e+1].before&&!i[e+1].after||o[l-1]===e-1&&i[e].before&&!i[e-1].before&&!i[e-1].after||(c!==e&&a.push(Di(r.slice(c,e),"\\")),c=e,!/[!-/:-@[-`{-~]/.test(r.charAt(e))||n.encode&&n.encode.includes(r.charAt(e))?(a.push("&#x"+r.charCodeAt(e).toString(16).toUpperCase()+";"),c++):a.push("\\"))}return a.push(Di(r.slice(c,s),n.after)),a.join("")}function Ii(e,t){return e-t}function Di(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],o=[],a=e+t;let i,l=-1,c=0;for(;i=n.exec(a);)r.push(i.index);for(;++l<r.length;)c!==r[l]&&o.push(e.slice(c,r[l])),o.push("\\"),c=r[l];return o.push(e.slice(c)),o.join("")}function Ri(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,o=n.line||1,a=n.column||1;return{move:function(e){const t=e||"",n=t.split(/\r?\n|\r/g),i=n[n.length-1];return o+=n.length-1,a=1===n.length?a+i.length:1+i.length+r,t},current:function(){return{now:{line:o,column:a},lineShift:r}},shift:function(e){r+=e}}}function Hi(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ui(){this.buffer()}function Wi(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=pr(this.sliceSerialize(e)).toLowerCase()}function $i(e){this.exit(e)}function Vi(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function qi(){this.buffer()}function Yi(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=pr(this.sliceSerialize(e)).toLowerCase()}function Gi(e){this.exit(e)}function Qi(e,t,n,r){const o=Ri(r);let a=o.move("[^");const i=n.enter("footnoteReference"),l=n.enter("reference");return a+=o.move(Mi(n,Ti(e),{...o.current(),before:a,after:"]"})),l(),i(),a+=o.move("]"),a}function Zi(e,t,n,r){const o=Ri(r);let a=o.move("[^");const i=n.enter("footnoteDefinition"),l=n.enter("label");return a+=o.move(Mi(n,Ti(e),{...o.current(),before:a,after:"]"})),l(),a+=o.move("]:"+(e.children&&e.children.length>0?" ":"")),o.shift(4),a+=o.move(function(e,t){const n=[];let r,o=0,a=0;for(;r=Bi.exec(e);)i(e.slice(o,r.index)),n.push(r[0]),o=r.index+r[0].length,a++;return i(e.slice(o)),n.join("");function i(e){n.push(t(e,a,!e))}}(function(e,t,n){const r=t.indexStack,o=e.children||[],a=t.createTracker(n),i=[];let l=-1;for(r.push(-1);++l<o.length;){const n=o[l];r[r.length-1]=l,i.push(a.move(t.handle(n,e,t,{before:"\n",after:"\n",...a.current()}))),"list"!==n.type&&(t.bulletLastUsed=void 0),l<o.length-1&&i.push(a.move(Li(n,o[l+1],e,t)))}return r.pop(),i.join("")}(e,n,o.current()),Ki)),i(),a}function Ki(e,t,n){return 0===t?e:(n?"":" ")+e}function Xi(e,t,n){const r=t.indexStack,o=e.children||[],a=[];let i=-1,l=n.before;r.push(-1);let c=t.createTracker(n);for(;++i<o.length;){const s=o[i];let u;if(r[r.length-1]=i,i+1<o.length){let n=t.handle.handlers[o[i+1].type];n&&n.peek&&(n=n.peek),u=n?n(o[i+1],e,t,{before:"",after:"",...c.current()}).charAt(0):""}else u=n.after;a.length>0&&("\r"===l||"\n"===l)&&"html"===s.type&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/," "),l=" ",c=t.createTracker(n),c.move(a.join(""))),a.push(c.move(t.handle(s,e,t,{...c.current(),before:l,after:u}))),l=a[a.length-1].slice(-1)}return r.pop(),a.join("")}Qi.peek=function(){return"["},tl.peek=function(){return"~"};const Ji={canContainEols:["delete"],enter:{strikethrough:function(e){this.enter({type:"delete",children:[]},e)}},exit:{strikethrough:function(e){this.exit(e)}}},el={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"]}],handlers:{delete:tl}};function tl(e,t,n,r){const o=Ri(r),a=n.enter("strikethrough");let i=o.move("~~");return i+=Xi(e,n,{...o.current(),before:i,after:"~"}),i+=o.move("~~"),a(),i}function nl(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const e=n.unsafe[a],t=_i(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function rl(e){return e.length}function ol(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}nl.peek=function(){return"`"};const al={enter:{table:function(e){const t=e._align;this.enter({type:"table",align:t.map((e=>"none"===e?null:e)),children:[]},e),this.setData("inTable",!0)},tableData:ll,tableHeader:ll,tableRow:function(e){this.enter({type:"tableRow",children:[]},e)}},exit:{codeText:function(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,cl));this.stack[this.stack.length-1].value=t,this.exit(e)},table:function(e){this.exit(e),this.setData("inTable")},tableData:il,tableHeader:il,tableRow:il}};function il(e){this.exit(e)}function ll(e){this.enter({type:"tableCell",children:[]},e)}function cl(e,t){return"|"===t?t:e}function sl(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(e,t,n,r){return l(function(e,t,n){const r=e.children;let o=-1;const a=[],i=t.enter("table");for(;++o<r.length;)a[o]=c(r[o],t,n);return i(),a}(e,n,r),e.align)},tableRow:function(e,t,n,r){const o=l([c(e,n,r)]);return o.slice(0,o.indexOf("\n"))},tableCell:i,inlineCode:function(e,t,n){let r=nl(e,0,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r}}};function i(e,t,n,r){const o=n.enter("tableCell"),i=n.enter("phrasing"),l=Xi(e,n,{...r,before:a,after:a});return i(),o(),l}function l(e,t){return function(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||rl,o=[],a=[],i=[],l=[];let c=0,s=-1;for(;++s<e.length;){const n=[],o=[];let f=-1;for(e[s].length>c&&(c=e[s].length);++f<e[s].length;){const a=null==(u=e[s][f])?"":String(u);if(!1!==t.alignDelimiters){const e=r(a);o[f]=e,(void 0===l[f]||e>l[f])&&(l[f]=e)}n.push(a)}a[s]=n,i[s]=o}var u;let f=-1;if("object"==typeof n&&"length"in n)for(;++f<c;)o[f]=ol(n[f]);else{const e=ol(n);for(;++f<c;)o[f]=e}f=-1;const d=[],p=[];for(;++f<c;){const e=o[f];let n="",r="";99===e?(n=":",r=":"):108===e?n=":":114===e&&(r=":");let a=!1===t.alignDelimiters?1:Math.max(1,l[f]-n.length-r.length);const i=n+"-".repeat(a)+r;!1!==t.alignDelimiters&&(a=n.length+a+r.length,a>l[f]&&(l[f]=a),p[f]=a),d[f]=i}a.splice(1,0,d),i.splice(1,0,p),s=-1;const h=[];for(;++s<a.length;){const e=a[s],n=i[s];f=-1;const r=[];for(;++f<c;){const a=e[f]||"";let i="",s="";if(!1!==t.alignDelimiters){const e=l[f]-(n[f]||0),t=o[f];114===t?i=" ".repeat(e):99===t?e%2?(i=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(i=" ".repeat(e/2),s=i):s=" ".repeat(e)}!1===t.delimiterStart||f||r.push("|"),!1===t.padding||!1===t.alignDelimiters&&""===a||!1===t.delimiterStart&&!f||r.push(" "),!1!==t.alignDelimiters&&r.push(i),r.push(a),!1!==t.alignDelimiters&&r.push(s),!1!==t.padding&&r.push(" "),!1===t.delimiterEnd&&f===c-1||r.push("|")}h.push(!1===t.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return h.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function c(e,t,n){const r=e.children;let o=-1;const a=[],l=t.enter("tableRow");for(;++o<r.length;)a[o]=i(r[o],0,t,n);return l(),a}}const ul={exit:{taskListCheckValueChecked:dl,taskListCheckValueUnchecked:dl,paragraph:function(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1],n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,a=-1;for(;++a<r.length;){const e=r[a];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}}},fl={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:function(e,t,n,r){const o=e.children[0],a="boolean"==typeof e.checked&&o&&"paragraph"===o.type,i="["+(e.checked?"x":" ")+"] ",l=Ri(r);a&&l.move(i);let c=function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let a=n.bulletCurrent||function(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(n);t&&"list"===t.type&&t.ordered&&(a=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+a);let i=a.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(i=4*Math.ceil(i/4));const l=n.createTracker(r);l.move(a+" ".repeat(i-a.length)),l.shift(i);const c=n.enter("listItem"),s=n.indentLines(n.containerFlow(e,l.current()),(function(e,t,n){return t?(n?"":" ".repeat(i))+e:(n?a:a+" ".repeat(i-a.length))+e}));return c(),s}(e,t,n,{...r,...l.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+i}))),c}}};function dl(e){this.stack[this.stack.length-2].checked="taskListCheckValueChecked"===e.type}function pl(e={}){const t=this.data();function n(e,n){(t[e]?t[e]:t[e]=[]).push(n)}n("micromarkExtensions",function(e){return Cn([Qa,{document:{91:{tokenize:ii,continuation:{tokenize:li},exit:ci}},text:{91:{tokenize:ai},93:{add:"after",tokenize:ri,resolveTo:oi}}},si(e),di,bi])}(e)),n("fromMarkdownExtensions",[Si,{enter:{gfmFootnoteDefinition:Hi,gfmFootnoteDefinitionLabelString:Ui,gfmFootnoteCall:Vi,gfmFootnoteCallString:qi},exit:{gfmFootnoteDefinition:$i,gfmFootnoteDefinitionLabelString:Wi,gfmFootnoteCall:Gi,gfmFootnoteCallString:Yi}},Ji,al,ul]),n("toMarkdownExtensions",function(e){return{extensions:[Ei,{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:Zi,footnoteReference:Qi}},el,sl(e),fl]}}(e))}var hl=n(294);function gl(e){return gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gl(e)}function ml(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ml(Object(n),!0).forEach((function(t){var r,o,a;r=e,o=t,a=n[t],(o=function(e){var t=function(e,t){if("object"!==gl(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==gl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===gl(t)?t:String(t)}(o))in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ml(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return vl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vl(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Al=function(e){var t=e.message,n=e.speed,r=e.setCurrentMessage,o=e.setIsTyped,a=yl((0,A.useState)(""),2),i=a[0],l=a[1],c=yl((0,A.useState)(0),2),s=c[0],u=c[1];return(0,A.useEffect)((function(){var e=setInterval((function(){var n;s<(null==t||null===(n=t.content)||void 0===n?void 0:n.length)?(l((function(e){var n;return e+(null==t||null===(n=t.content)||void 0===n?void 0:n[s])})),r((function(e){var n;return bl(bl({},e),{},{content:e.content+(null==t||null===(n=t.content)||void 0===n?void 0:n[s])})})),u((function(e){return e+1}))):(o(t),clearInterval(e))}),n);return function(){clearInterval(e)}}),[null==t?void 0:t.content,n,s]),hl.createElement("div",null,hl.createElement(Da,{remarkPlugins:[pl]},i))};Al.propTypes={message:w().object.isRequired,speed:w().number.isRequired,setCurrentMessage:w().func.isRequired,setIsTyped:w().func.isRequired};const kl=Al;var wl=n(519),xl={};xl.styleTagTransform=b(),xl.setAttributes=p(),xl.insert=f().bind(null,"head"),xl.domAPI=s(),xl.insertStyleElement=g(),l()(wl.Z,xl),wl.Z&&wl.Z.locals&&wl.Z.locals;var Cl=n(294),Sl=function(e){var t,n,r,o=e.message,a=o.id,i=o.content,l=e.humanBubbleClass;return Cl.createElement("div",{className:"chat-message user",key:a},Cl.createElement("div",{className:"chat-content".concat(" ",l),style:{color:null===(t=e.colors)||void 0===t||null===(t=t.humanBubbleColors)||void 0===t?void 0:t.textColor,background:"linear-gradient(to right, ".concat(null===(n=e.colors)||void 0===n||null===(n=n.humanBubbleColors)||void 0===n?void 0:n.backgroundColorStart,", ").concat(null===(r=e.colors)||void 0===r||null===(r=r.humanBubbleColors)||void 0===r?void 0:r.backgroundColorEnd,")")}},Cl.createElement("div",{className:"chat-text"},i.split("\n").map((function(e,t){return Cl.createElement("span",{key:t},e,Cl.createElement("br",null))})))))};function El(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ol(e){return Ol="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ol(e)}function zl(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Ol(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Ol(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ol(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pl(){return Pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pl.apply(this,arguments)}function Fl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fl(Object(n),!0).forEach((function(t){zl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Sl.propTypes={message:w().shape({id:w().number.isRequired,content:w().string.isRequired}).isRequired,humanBubbleClass:w().string};var Ll={};function Bl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return function(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return Ll[r]||(Ll[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),Ll[r]}(e.filter((function(e){return"token"!==e}))).reduce((function(e,t){return Tl(Tl({},e),n[t])}),t)}function _l(e){return e.join(" ")}function jl(e){var t=e.node,n=e.stylesheet,r=e.style,o=void 0===r?{}:r,a=e.useInlineStyles,i=e.key,l=t.properties,c=t.type,s=t.tagName,u=t.value;if("text"===c)return u;if(s){var f,d=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,o){return jl({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(o)})}))}}(n,a);if(a){var p=Object.keys(n).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),h=l.className&&l.className.includes("token")?["token"]:[],g=l.className&&h.concat(l.className.filter((function(e){return!p.includes(e)})));f=Tl(Tl({},l),{},{className:_l(g)||void 0,style:Bl(l.className,Object.assign({},l.style,o),n)})}else f=Tl(Tl({},l),{},{className:_l(l.className)});var m=d(t.children);return A.createElement(s,Pl({key:i},f),m)}}var Nl=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function Ml(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Il(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ml(Object(n),!0).forEach((function(t){zl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ml(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Dl=/\n/g;function Rl(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,o=void 0===r?{float:"left",paddingRight:"10px"}:r,a=e.numberStyle,i=void 0===a?{}:a,l=e.startingLineNumber;return A.createElement("code",{style:Object.assign({},n,o)},function(e){var t=e.startingLineNumber,n=e.style;return e.lines.map((function(e,r){var o=r+t;return A.createElement("span",{key:"line-".concat(r),className:"react-syntax-highlighter-line-number",style:"function"==typeof n?n(o):n},"".concat(o,"\n"))}))}({lines:t.replace(/\n$/,"").split("\n"),style:i,startingLineNumber:l}))}function Hl(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function Ul(e,t,n){var r,o={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},a="function"==typeof e?e(t):e;return Il(Il({},o),a)}function Wl(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,o=e.largestLineNumber,a=e.showInlineLineNumbers,i=e.lineProps,l=void 0===i?{}:i,c=e.className,s=void 0===c?[]:c,u=e.showLineNumbers,f=e.wrapLongLines,d="function"==typeof l?l(n):l;if(d.className=s,n&&a){var p=Ul(r,n,o);t.unshift(Hl(n,p))}return f&u&&(d.style=Il(Il({},d.style),{},{display:"flex"})),{type:"element",tagName:"span",properties:d,children:t}}function $l(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if("root"===e.type)return $l(e.children,n,r);for(var o=0;o<e.length;o++){var a=e[o];if("text"===a.type)r.push(Wl({children:[a],className:(t=new Set(n),function(e){if(Array.isArray(e))return El(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return El(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?El(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}));else if(a.children){var i=n.concat(a.properties.className);$l(a.children,i).forEach((function(e){return r.push(e)}))}}return r}function Vl(e,t,n,r,o,a,i,l,c){var s,u=$l(e.value),f=[],d=-1,p=0;function h(e,a){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||s.length>0?function(e,t){return Wl({children:e,lineNumber:t,lineNumberStyle:l,largestLineNumber:i,showInlineLineNumbers:o,lineProps:n,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:r,wrapLongLines:c})}(e,a,s):function(e,t){if(r&&t&&o){var n=Ul(l,t,i);e.unshift(Hl(t,n))}return e}(e,a)}for(var g=function(){var e=u[p],t=e.children[0].value;if(t.match(Dl)){var n=t.split("\n");n.forEach((function(t,o){var i=r&&f.length+a,l={type:"text",value:"".concat(t,"\n")};if(0===o){var c=h(u.slice(d+1,p).concat(Wl({children:[l],className:e.properties.className})),i);f.push(c)}else if(o===n.length-1){var s=u[p+1]&&u[p+1].children&&u[p+1].children[0],g={type:"text",value:"".concat(t)};if(s){var m=Wl({children:[g],className:e.properties.className});u.splice(p+1,0,m)}else{var b=h([g],i,e.properties.className);f.push(b)}}else{var y=h([l],i,e.properties.className);f.push(y)}})),d=p}p++};p<u.length;)g();if(d!==u.length-1){var m=u.slice(d+1,u.length);if(m&&m.length){var b=h(m,r&&f.length+a);f.push(b)}}return t?f:(s=[]).concat.apply(s,f)}function ql(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map((function(e,t){return jl({node:e,stylesheet:n,useInlineStyles:r,key:"code-segement".concat(t)})}))}function Yl(e){return e&&void 0!==e.highlightAuto}const Gl=/[#.]/g,Ql=new Set(["menu","submit","reset","button"]),Zl={}.hasOwnProperty;function Kl(e,t,n,r){const o=ka(e,n);let a,i=-1;if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;a=r}else a="boolean"==typeof r?r:"string"==typeof r?o.spaceSeparated?Sa(r):o.commaSeparated?Ea(r):o.commaOrSpaceSeparated?Sa(Ea(r).join(" ")):Jl(o,o.property,r):Array.isArray(r)?r.concat():"style"===o.property?function(e){const t=[];let n;for(n in e)Zl.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(a)){const e=[];for(;++i<a.length;)e[i]=Jl(o,o.property,a[i]);a=e}"className"===o.property&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function Xl(e,t){let n=-1;if(null==t);else if("string"==typeof t||"number"==typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)Xl(e,t[n]);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?Xl(e,t.children):e.push(t)}}function Jl(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||Wo(n)===Wo(t)))return!0}return n}const ec=(rc=pa,function(e,t,...n){let r,o=-1;if(null==e)r={type:"root",children:[]},n.unshift(t);else if(r=function(e,t){const n=e||"",r={};let o,a,i=0;for(;i<n.length;){Gl.lastIndex=i;const e=Gl.exec(n),t=n.slice(i,e?e.index:n.length);t&&(o?"#"===o?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:a=t,i+=t.length),e&&(o=e[0],i++)}return{type:"element",tagName:a||"div",properties:r,children:[]}}(e),r.tagName=r.tagName.toLowerCase(),a=t,i=r.tagName,null==a||"object"!=typeof a||Array.isArray(a)||"input"!==i&&a.type&&"string"==typeof a.type&&("children"in a&&Array.isArray(a.children)||("button"===i?!Ql.has(a.type.toLowerCase()):"value"in a)))n.unshift(t);else{let e;for(e in t)Zl.call(t,e)&&Kl(rc,r.properties,e,t[e])}for(var a,i;++o<n.length;)Xl(r.children,n[o]);return"element"===r.type&&"template"===r.tagName&&(r.content={type:"root",children:r.children},r.children=[]),r}),tc=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],nc={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};var rc;function oc(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function ac(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function ic(e){return function(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||oc(e)}const lc=String.fromCharCode,cc=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function sc(e,t={}){const n="string"==typeof t.additional?t.additional.charCodeAt(0):t.additional,r=[];let o,a,i=0,l=-1,c="";t.position&&("start"in t.position||"indent"in t.position?(a=t.position.indent,o=t.position.start):o=t.position);let s,u=(o?o.line:0)||1,f=(o?o.column:0)||1,d=h();for(i--;++i<=e.length;)if(10===s&&(f=(a?a[l]:0)||1),s=e.charCodeAt(i),38===s){const o=e.charCodeAt(i+1);if(9===o||10===o||12===o||32===o||38===o||60===o||Number.isNaN(o)||n&&o===n){c+=lc(s),f++;continue}const a=i+1;let l,u=a,b=a;if(35===o){b=++u;const t=e.charCodeAt(b);88===t||120===t?(l="hexadecimal",b=++u):l="decimal"}else l="named";let y="",v="",A="";const k="named"===l?ic:"decimal"===l?oc:ac;for(b--;++b<=e.length;){const t=e.charCodeAt(b);if(!k(t))break;A+=lc(t),"named"===l&&tc.includes(A)&&(y=A,v=zr(A))}let w=59===e.charCodeAt(b);if(w){b++;const e="named"===l&&zr(A);e&&(y=A,v=e)}let x=1+b-a,C="";if(w||!1!==t.nonTerminated)if(A)if("named"===l){if(w&&!v)g(5,1);else if(y!==A&&(b=u+y.length,x=1+b-u,w=!1),!w){const n=y?1:3;if(t.attribute){const t=e.charCodeAt(b);61===t?(g(n,x),v=""):ic(t)?v="":g(n,x)}else g(n,x)}C=v}else{w||g(2,x);let e=Number.parseInt(A,"hexadecimal"===l?16:10);if((p=e)>=55296&&p<=57343||p>1114111)g(7,x),C=lc(65533);else if(e in nc)g(6,x),C=nc[e];else{let t="";uc(e)&&g(6,x),e>65535&&(e-=65536,t+=lc(e>>>10|55296),e=56320|1023&e),C=t+lc(e)}}else"named"!==l&&g(4,x);if(C){m(),d=h(),i=b-1,f+=b-a+1,r.push(C);const n=h();n.offset++,t.reference&&t.reference.call(t.referenceContext,C,{start:d,end:n},e.slice(a-1,b)),d=n}else A=e.slice(a-1,b),c+=A,f+=A.length,i=b-1}else 10===s&&(u++,l++,f=0),Number.isNaN(s)?m():(c+=lc(s),f++);var p;return r.join("");function h(){return{line:u,column:f,offset:i+((o?o.offset:0)||0)}}function g(e,n){let r;t.warning&&(r=h(),r.column+=n,r.offset+=n,t.warning.call(t.warningContext,cc[e],r,e))}function m(){c&&(r.push(c),t.text&&t.text.call(t.textContext,c,{start:d,end:h()}),c="")}}function uc(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)}var fc=0,dc={},pc={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++fc}),e.__id},clone:function e(t,n){var r,o;switch(n=n||{},pc.util.type(t)){case"Object":if(o=pc.util.objId(t),n[o])return n[o];for(var a in r={},n[o]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return o=pc.util.objId(t),n[o]?n[o]:(r=[],n[o]=r,t.forEach((function(t,o){r[o]=e(t,n)})),r);default:return t}}},languages:{plain:dc,plaintext:dc,text:dc,txt:dc,extend:function(e,t){var n=pc.util.clone(pc.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var o=(r=r||pc.languages)[e],a={};for(var i in o)if(o.hasOwnProperty(i)){if(i==t)for(var l in n)n.hasOwnProperty(l)&&(a[l]=n[l]);n.hasOwnProperty(i)||(a[i]=o[i])}var c=r[e];return r[e]=a,pc.languages.DFS(pc.languages,(function(t,n){n===c&&t!=e&&(this[t]=a)})),a},DFS:function e(t,n,r,o){o=o||{};var a=pc.util.objId;for(var i in t)if(t.hasOwnProperty(i)){n.call(t,i,t[i],r||i);var l=t[i],c=pc.util.type(l);"Object"!==c||o[a(l)]?"Array"!==c||o[a(l)]||(o[a(l)]=!0,e(l,n,i,o)):(o[a(l)]=!0,e(l,n,null,o))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(pc.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=pc.tokenize(r.code,r.grammar),pc.hooks.run("after-tokenize",r),hc.stringify(pc.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new bc;return yc(o,o.head,e),mc(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=pc.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=pc.hooks.all[e];if(n&&n.length)for(var r,o=0;r=n[o++];)r(t)}},Token:hc};function hc(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function gc(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var a=o[1].length;o.index+=a,o[0]=o[0].slice(a)}return o}function mc(e,t,n,r,o,a){for(var i in n)if(n.hasOwnProperty(i)&&n[i]){var l=n[i];l=Array.isArray(l)?l:[l];for(var c=0;c<l.length;++c){if(a&&a.cause==i+","+c)return;var s=l[c],u=s.inside,f=!!s.lookbehind,d=!!s.greedy,p=s.alias;if(d&&!s.pattern.global){var h=s.pattern.toString().match(/[imsuy]*$/)[0];s.pattern=RegExp(s.pattern.source,h+"g")}for(var g=s.pattern||s,m=r.next,b=o;m!==t.tail&&!(a&&b>=a.reach);b+=m.value.length,m=m.next){var y=m.value;if(t.length>e.length)return;if(!(y instanceof hc)){var v,A=1;if(d){if(!(v=gc(g,b,e,f))||v.index>=e.length)break;var k=v.index,w=v.index+v[0].length,x=b;for(x+=m.value.length;k>=x;)x+=(m=m.next).value.length;if(b=x-=m.value.length,m.value instanceof hc)continue;for(var C=m;C!==t.tail&&(x<w||"string"==typeof C.value);C=C.next)A++,x+=C.value.length;A--,y=e.slice(b,x),v.index-=b}else if(!(v=gc(g,0,y,f)))continue;k=v.index;var S=v[0],E=y.slice(0,k),O=y.slice(k+S.length),z=b+y.length;a&&z>a.reach&&(a.reach=z);var P=m.prev;if(E&&(P=yc(t,P,E),b+=E.length),vc(t,P,A),m=yc(t,P,new hc(i,u?pc.tokenize(S,u):S,p,S)),O&&yc(t,m,O),A>1){var F={cause:i+","+c,reach:z};mc(e,t,n,m.prev,b,F),a&&F.reach>a.reach&&(a.reach=F.reach)}}}}}}function bc(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function yc(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function vc(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}const Ac=pc,kc={}.hasOwnProperty;function wc(){}wc.prototype=Ac;const xc=new wc;xc.highlight=function(e,t){if("string"!=typeof e)throw new TypeError("Expected `string` for `value`, got `"+e+"`");let n,r;if(t&&"object"==typeof t)n=t;else{if(r=t,"string"!=typeof r)throw new TypeError("Expected `string` for `name`, got `"+r+"`");if(!kc.call(xc.languages,r))throw new Error("Unknown language: `"+r+"` is not registered");n=xc.languages[r]}return{type:"root",children:Ac.highlight.call(xc,e,n,r)}},xc.register=function(e){if("function"!=typeof e||!e.displayName)throw new Error("Expected `function` for `syntax`, got `"+e+"`");kc.call(xc.languages,e.displayName)||e(xc)},xc.alias=function(e,t){const n=xc.languages;let r,o={};for(r in"string"==typeof e?t&&(o[e]=t):o=e,o)if(kc.call(o,r)){const e=o[r],t="string"==typeof e?[e]:e;let a=-1;for(;++a<t.length;)n[t[a]]=n[r]}},xc.registered=function(e){if("string"!=typeof e)throw new TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return kc.call(xc.languages,e)},xc.listLanguages=function(){const e=xc.languages,t=[];let n;for(n in e)kc.call(e,n)&&"object"==typeof e[n]&&t.push(n);return t},xc.util.encode=function(e){return e},xc.Token.stringify=function e(t,n){if("string"==typeof t)return{type:"text",value:t};if(Array.isArray(t)){const r=[];let o=-1;for(;++o<t.length;)""!==t[o]&&null!==t[o]&&void 0!==t[o]&&r.push(e(t[o],n));return r}const r={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n};return t.alias&&r.classes.push(..."string"==typeof t.alias?[t.alias]:t.alias),xc.hooks.run("wrap",r),ec(r.tag+"."+r.classes.join("."),function(e){let t;for(t in e)kc.call(e,t)&&(e[t]=sc(e[t]));return e}(r.attributes),r.content)};var Cc,Sc,Ec=(Cc=xc,Sc={},function(e){var t=e.language,n=e.children,r=e.style,o=void 0===r?Sc:r,a=e.customStyle,i=void 0===a?{}:a,l=e.codeTagProps,c=void 0===l?{className:t?"language-".concat(t):void 0,style:Il(Il({},o['code[class*="language-"]']),o['code[class*="language-'.concat(t,'"]')])}:l,s=e.useInlineStyles,u=void 0===s||s,f=e.showLineNumbers,d=void 0!==f&&f,p=e.showInlineLineNumbers,h=void 0===p||p,g=e.startingLineNumber,m=void 0===g?1:g,b=e.lineNumberContainerStyle,y=e.lineNumberStyle,v=void 0===y?{}:y,k=e.wrapLines,w=e.wrapLongLines,x=void 0!==w&&w,C=e.lineProps,S=void 0===C?{}:C,E=e.renderer,O=e.PreTag,z=void 0===O?"pre":O,P=e.CodeTag,F=void 0===P?"code":P,T=e.code,L=void 0===T?(Array.isArray(n)?n[0]:n)||"":T,B=e.astGenerator,_=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Nl);B=B||Cc;var j=d?A.createElement(Rl,{containerStyle:b,codeStyle:c.style||{},numberStyle:v,startingLineNumber:m,codeString:L}):null,N=o.hljs||o['pre[class*="language-"]']||{backgroundColor:"#fff"},M=Yl(B)?"hljs":"prismjs",I=u?Object.assign({},_,{style:Object.assign({},N,i)}):Object.assign({},_,{className:_.className?"".concat(M," ").concat(_.className):M,style:Object.assign({},i)});if(c.style=Il(Il({},c.style),{},x?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"}),!B)return A.createElement(z,I,j,A.createElement(F,c,L));(void 0===k&&E||x)&&(k=!0),E=E||ql;var D=[{type:"text",value:L}],R=function(e){var t=e.astGenerator,n=e.language,r=e.code,o=e.defaultCodeValue;if(Yl(t)){var a=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,n);return"text"===n?{value:o,language:"text"}:a?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:o}}catch(e){return{value:o}}}({astGenerator:B,language:t,code:L,defaultCodeValue:D});null===R.language&&(R.value=D);var H=R.value.length;1===H&&"text"===R.value[0].type&&(H=R.value[0].value.split("\n").length);var U=Vl(R,k,S,d,h,m,H+m,v,x);return A.createElement(z,I,A.createElement(F,c,!h&&j,E({rows:U,stylesheet:o,useInlineStyles:u})))});Ec.registerLanguage=function(e,t){return xc.register(t)},Ec.alias=function(e,t){return xc.alias(e,t)};const Oc=Ec;var zc=n(294),Pc=["children","className","node"];function Fc(){return Fc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fc.apply(this,arguments)}var Tc=function(e){var t,n,r,o=e.message,a=e.errorMessage,i=e.botBubbleClass,l=e.colors,c=e.syntaxHighlightTheme;return a&&(null==o?void 0:o.id)===o.id?null:null!=o&&o.content?zc.createElement(zc.Fragment,null,zc.createElement("div",{className:"chat-message system",key:o.id},zc.createElement("div",{className:"chat-content ".concat(i),style:{color:null==l||null===(t=l.botBubbleColors)||void 0===t?void 0:t.textColor,background:"linear-gradient(to right, ".concat(null==l||null===(n=l.botBubbleColors)||void 0===n?void 0:n.backgroundColorStart,", ").concat(null==l||null===(r=l.botBubbleColors)||void 0===r?void 0:r.backgroundColorEnd,")")}},zc.createElement("div",{className:"chat-text",key:c},zc.createElement(Da,{remarkPlugins:[pl],components:{code:function(e){var t,n,r=e.children,o=e.className,a=(e.node,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Pc)),i=/language-(\w+)/.exec(o||"");return i?zc.createElement(Oc,Fc({},a,{key:c,PreTag:"div",children:String(r).replace(/\n$/,""),language:i[1],style:(null===(t=Tt.find((function(e){return e.name===c})))||void 0===t?void 0:t.value)||(null===(n=Tt.find((function(e){return e.isDefault})))||void 0===n?void 0:n.value)})):zc.createElement("code",Fc({},a,{className:o}),r)}}},null==o?void 0:o.content))))):null};Tc.propTypes={message:w().shape({id:w().number.isRequired,content:w().string.isRequired}).isRequired,errorMessage:w().string,botBubbleClass:w().string};var Lc=n(294),Bc=function(){return Lc.createElement("svg",{stroke:"currentColor",fill:"none",strokeWidth:"3",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 icon-xs",height:"0.85em",width:"0.85em",xmlns:"http://www.w3.org/2000/svg"},Lc.createElement("polyline",{points:"1 4 1 10 7 10"}),Lc.createElement("polyline",{points:"23 20 23 14 17 14"}),Lc.createElement("path",{d:"M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"}))},_c=function(){return Lc.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Lc.createElement("path",{d:"M14 10L21 3M21 3H16.5M21 3V7.5M10 14L3 21M3 21H7.5M3 21L3 16.5",stroke:"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))},jc=function(){return Lc.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Lc.createElement("path",{d:"M20.7457 3.32851C20.3552 2.93798 19.722 2.93798 19.3315 3.32851L12.0371 10.6229L4.74275 3.32851C4.35223 2.93798 3.71906 2.93798 3.32854 3.32851C2.93801 3.71903 2.93801 4.3522 3.32854 4.74272L10.6229 12.0371L3.32856 19.3314C2.93803 19.722 2.93803 20.3551 3.32856 20.7457C3.71908 21.1362 4.35225 21.1362 4.74277 20.7457L12.0371 13.4513L19.3315 20.7457C19.722 21.1362 20.3552 21.1362 20.7457 20.7457C21.1362 20.3551 21.1362 19.722 20.7457 19.3315L13.4513 12.0371L20.7457 4.74272C21.1362 4.3522 21.1362 3.71903 20.7457 3.32851Z",fill:"#0F0F0F"}))},Nc=function(e){var t=e.color;return Lc.createElement("svg",{width:"20",height:"20",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},Lc.createElement("path",{d:"M903.232 256l56.768 50.432L512 768 64 306.432 120.768 256 512 659.072z",fill:t||"#fff"}))},Mc=function(e){var t=e.color;return Lc.createElement("svg",{fill:t||"#fff",height:"28",width:"28",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",enableBackground:"new 0 0 50 50"},Lc.createElement("path",{d:"M15.526,33.729c0.068,0.042,0.084,0.07,0.096,0.135c0.094,0.511-0.497,1.623-0.96,2.229\r\nc-0.209,0.274-0.263,0.637-0.142,0.959s0.398,0.561,0.736,0.63c0.278,0.056,0.544,0.081,0.798,0.081\r\nc1.558,0,2.649-0.962,3.341-1.571c0.148-0.131,0.339-0.3,0.465-0.39c1.468,0.337,3.729,0.604,5.163,0.604\r\nc0.798,0,1.597-0.057,2.384-0.156c1.198,0.388,2.5,0.608,3.865,0.608c0.947,0,2.359-0.161,3.367-0.378\r\nc0.053,0.046,0.108,0.098,0.169,0.151c0.479,0.423,1.283,1.132,2.45,1.132c0.19,0,0.389-0.019,0.598-0.061\r\nc0.337-0.069,0.614-0.307,0.736-0.629c0.121-0.322,0.067-0.686-0.142-0.959c-0.283-0.373-0.542-0.897-0.575-1.149\r\nc2.445-1.558,3.902-4.041,3.902-6.663c0-1.615-0.563-3.122-1.522-4.412c-0.13-6.704-6.908-12.127-15.233-12.127\r\nc-8.406,0-15.245,5.527-15.245,12.321C9.778,27.889,11.927,31.494,15.526,33.729z M36.73,33.322\r\nc-0.446,0.277-0.731,0.695-0.824,1.208c-0.023,0.126-0.033,0.253-0.031,0.38c-0.31-0.253-0.664-0.477-1.115-0.477\r\nc-0.081,0-0.231,0.019-0.311,0.038c-0.847,0.209-2.302,0.386-3.177,0.386c-4.69,0-8.506-2.94-8.506-6.556\r\nc0-3.614,3.815-6.555,8.506-6.555s8.506,2.94,8.506,6.555C39.778,30.289,38.667,32.119,36.73,33.322z M25.023,13.763\r\nc6.232,0,11.458,3.375,12.862,7.9c-1.807-1.196-4.108-1.916-6.613-1.916c-5.793,0-10.506,3.838-10.506,8.555\r\nc0,2.363,1.183,4.506,3.092,6.055c-1.252-0.092-2.744-0.304-3.715-0.544c-0.844-0.21-1.494,0.369-2.071,0.878\r\nc-0.239,0.211-0.465,0.403-0.688,0.564c0.198-0.563,0.31-1.174,0.205-1.749c-0.114-0.627-0.463-1.138-1.009-1.477\r\nc-3.007-1.867-4.803-4.838-4.803-7.946C11.778,18.393,17.72,13.763,25.023,13.763z"}))},Ic=function(){return Lc.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Lc.createElement("path",{d:"M20.33 3.66996C20.1408 3.48213 19.9035 3.35008 19.6442 3.28833C19.3849 3.22659 19.1135 3.23753 18.86 3.31996L4.23 8.19996C3.95867 8.28593 3.71891 8.45039 3.54099 8.67255C3.36307 8.89471 3.25498 9.16462 3.23037 9.44818C3.20576 9.73174 3.26573 10.0162 3.40271 10.2657C3.5397 10.5152 3.74754 10.7185 4 10.85L10.07 13.85L13.07 19.94C13.1906 20.1783 13.3751 20.3785 13.6029 20.518C13.8307 20.6575 14.0929 20.7309 14.36 20.73H14.46C14.7461 20.7089 15.0192 20.6023 15.2439 20.4239C15.4686 20.2456 15.6345 20.0038 15.72 19.73L20.67 5.13996C20.7584 4.88789 20.7734 4.6159 20.7132 4.35565C20.653 4.09541 20.5201 3.85762 20.33 3.66996ZM4.85 9.57996L17.62 5.31996L10.53 12.41L4.85 9.57996ZM14.43 19.15L11.59 13.47L18.68 6.37996L14.43 19.15Z",fill:"#ffffff"}))},Dc=function(){return Lc.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Lc.createElement("path",{d:"M11.7607 16.6788L11.7336 10.9913C11.7066 6.84852 13.9213 3.00711 17.517 0.942341L17.8995 0.709761C19.1707 -0.0282536 20.7294 -0.0282536 22.0013 0.709761L32.1592 6.575C30.4638 5.64536 28.3858 5.67244 26.7043 6.64304L18.5834 11.3322L13.6068 14.203L13.1146 14.4904C13.1007 14.4904 13.1007 14.5043 13.0875 14.5043C12.3085 14.9826 11.8163 15.7894 11.7614 16.6781",fill:"#2AAD8E"}),Lc.createElement("path",{d:"M37.7736 23.1565V25.0706C37.7736 28.215 36.0921 31.1275 33.3712 32.7132L22.4336 39.0568C26.0292 36.992 28.244 33.1506 28.2169 29.0079L28.1898 23.3204V23.2794C28.2037 23.2385 28.2037 23.1836 28.2037 23.1426V16.8261C28.2037 15.8694 27.6976 14.98 26.8638 14.4746L28.2037 15.2536L35.7234 19.6011C36.9946 20.3391 37.7743 21.693 37.7743 23.1558L37.7736 23.1565Z",fill:"#45C9A9"}),Lc.createElement("path",{d:"M28.2166 29.0091C28.2437 33.1518 26.0289 36.9932 22.4333 39.058L22.0507 39.2905C20.7795 40.0286 19.2209 40.0286 17.9489 39.2905L7.79102 33.4253C9.48642 34.355 11.5644 34.3279 13.2459 33.3573L21.3669 28.6682L26.3434 25.7973L26.8357 25.5099C26.8495 25.5099 26.8495 25.496 26.8627 25.496C27.6417 25.0177 28.134 24.2109 28.1888 23.3223L28.2159 29.0097L28.2166 29.0091Z",fill:"#2AAD8E"}),Lc.createElement("path",{d:"M21.367 28.6672L13.2461 33.3564C11.5645 34.327 9.48658 34.3547 7.79118 33.4244C7.75022 33.3973 7.70926 33.3834 7.6683 33.3564L2.22656 30.2127L11.7971 24.7168L13.1371 25.4958C13.151 25.4958 13.151 25.5097 13.1642 25.5097L18.633 28.6679C19.4807 29.1602 20.52 29.1602 21.367 28.6679V28.6672Z",fill:"#13947D"}),Lc.createElement("path",{d:"M13.1361 25.4962L11.7962 24.7173L4.27649 20.3697C3.00526 19.6317 2.22559 18.2779 2.22559 16.815V14.9009C2.22559 11.7565 3.90712 8.84406 6.62797 7.25834L17.5663 0.914062C13.9706 2.97883 11.7559 6.82026 11.783 10.963L11.81 16.6505V16.6915C11.7962 16.7324 11.7962 16.7873 11.7962 16.8282V23.1447C11.7962 24.1014 12.3023 24.9901 13.1361 25.4962Z",fill:"#45C9A9"}),Lc.createElement("path",{d:"M37.7733 9.7586L28.2027 15.2545L26.8628 14.4755C26.8489 14.4755 26.8489 14.4616 26.8357 14.4616L21.3669 11.3034C20.5192 10.8111 19.4799 10.8111 18.6328 11.3034L26.7538 6.61424C28.4353 5.64364 30.5133 5.61656 32.2087 6.5462C32.2497 6.57328 32.2906 6.58716 32.3316 6.61424L37.7733 9.7586Z",fill:"#13947D"}))},Rc=function(){return Lc.createElement("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Lc.createElement("path",{d:"M1.5 8.5H15.5M15.5 8.5L8.5 1.5M15.5 8.5L8.5 15.5",stroke:"white",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}))},Hc=function(){return Lc.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}," ",Lc.createElement("g",null," ",Lc.createElement("path",{fill:"none",d:"M0 0h24v24H0z"})," ",Lc.createElement("path",{fill:"#fff",d:"M6 7v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z"})," ")," ")},Uc=n(195),Wc={};function $c(e){return $c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$c(e)}function Vc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vc(Object(n),!0).forEach((function(t){var r,o,a;r=e,o=t,a=n[t],(o=function(e){var t=function(e,t){if("object"!==$c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==$c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===$c(t)?t:String(t)}(o))in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Wc.styleTagTransform=b(),Wc.setAttributes=p(),Wc.insert=f().bind(null,"head"),Wc.domAPI=s(),Wc.insertStyleElement=g(),l()(Uc.Z,Wc),Uc.Z&&Uc.Z.locals&&Uc.Z.locals;var Yc=function(e){var t=e.errorText,n=e.defaultMessage,r=e.setErrorMessage,o=e.handleUserInputSubmit,a=e.setCurrentMessage,i=e.setIsTyped;return A.createElement(A.Fragment,null,A.createElement("div",{className:"chat-message system"},A.createElement("div",{className:"chat-content"},A.createElement("div",{className:"text"},A.createElement(kl,{message:qc(qc({},n),{},{content:t||"Sorry, I was unable to process your request."}),speed:10,setCurrentMessage:function(e){return a(e)},setIsTyped:function(e){return i(e)}}),A.createElement("button",{type:"button",onClick:function(){r(""),o(!1)},className:"regenerate-button"},A.createElement(Bc,null),"Retry")))))};Yc.propTypes={logo:w().string,pluginDomain:w().string,name:w().string,humanBubbleClass:w().string,botBubbleClass:w().string,introMessage:w().string,domain:w().string};var Gc=n(245),Qc={};Qc.styleTagTransform=b(),Qc.setAttributes=p(),Qc.insert=f().bind(null,"head"),Qc.domAPI=s(),Qc.insertStyleElement=g(),l()(Gc.Z,Qc),Gc.Z&&Gc.Z.locals&&Gc.Z.locals;var Zc=n(183),Kc={};function Xc(e){return Xc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xc(e)}function Jc(){Jc=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof b?t:b,i=Object.create(a.prototype),l=new F(r||[]);return o(i,"_invoke",{value:E(e,n,l)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",g="completed",m={};function b(){}function y(){}function v(){}var A={};s(A,i,(function(){return this}));var k=Object.getPrototypeOf,w=k&&k(k(T([])));w&&w!==n&&r.call(w,i)&&(A=w);var x=v.prototype=b.prototype=Object.create(A);function C(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,l){var c=f(e[o],e,a);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==Xc(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,l)}))}l(c.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function E(t,n,r){var o=d;return function(a,i){if(o===h)throw new Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var l=r.delegate;if(l){var c=O(l,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var s=f(t,n,r);if("normal"===s.type){if(o=r.done?g:p,s.arg===m)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=g,r.method="throw",r.arg=s.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function z(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(z,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(Xc(t)+" is not iterable")}return y.prototype=v,o(x,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},C(S.prototype),s(S.prototype,l,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},C(x),s(x,c,"Generator"),s(x,i,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=T,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return l.type="throw",l.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function es(e,t,n,r,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function ts(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){es(a,r,o,i,l,"next",e)}function l(e){es(a,r,o,i,l,"throw",e)}i(void 0)}))}}Kc.styleTagTransform=b(),Kc.setAttributes=p(),Kc.insert=f().bind(null,"head"),Kc.domAPI=s(),Kc.insertStyleElement=g(),l()(Zc.Z,Kc),Zc.Z&&Zc.Z.locals&&Zc.Z.locals;var ns=function(){var e=ts(Jc().mark((function e(t){var n;return Jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("".concat(Lt(t)||Ft,"/chatbot/params"),{method:"GET",headers:{"Content-Type":"application/json"},credentials:"include"});case 3:return n=e.sent,e.abrupt("return",n.json());case 7:throw e.prev=7,e.t0=e.catch(0),new Error(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),rs=function(){var e=ts(Jc().mark((function e(t,n){var r;return Jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("".concat(Lt(t)||Ft,"/chatbot/verify-chat-key"),{method:"POST",body:JSON.stringify({apiKey:n}),credentials:"include",headers:{"Content-Type":"application/json"}});case 3:return r=e.sent,e.abrupt("return",r.json());case 7:throw e.prev=7,e.t0=e.catch(0),new Error(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,n){return e.apply(this,arguments)}}(),os=n(759),as={};as.styleTagTransform=b(),as.setAttributes=p(),as.insert=f().bind(null,"head"),as.domAPI=s(),as.insertStyleElement=g(),l()(os.Z,as),os.Z&&os.Z.locals&&os.Z.locals;var is=n(294);function ls(e){return ls="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ls(e)}function cs(){cs=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof b?t:b,i=Object.create(a.prototype),l=new F(r||[]);return o(i,"_invoke",{value:E(e,n,l)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",g="completed",m={};function b(){}function y(){}function v(){}var A={};s(A,i,(function(){return this}));var k=Object.getPrototypeOf,w=k&&k(k(T([])));w&&w!==n&&r.call(w,i)&&(A=w);var x=v.prototype=b.prototype=Object.create(A);function C(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,l){var c=f(e[o],e,a);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==ls(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,l)}))}l(c.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function E(t,n,r){var o=d;return function(a,i){if(o===h)throw new Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var l=r.delegate;if(l){var c=O(l,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var s=f(t,n,r);if("normal"===s.type){if(o=r.done?g:p,s.arg===m)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=g,r.method="throw",r.arg=s.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function z(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(z,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(ls(t)+" is not iterable")}return y.prototype=v,o(x,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},C(S.prototype),s(S.prototype,l,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},C(x),s(x,c,"Generator"),s(x,i,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=T,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return l.type="throw",l.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function ss(e,t,n,r,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function us(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return fs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fs(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ds=function(e){var t=e.name,n=e.method,r=e.domain,o=e.onAuthSuccess,a=e.authorizationUrl,i=e.isAuthVerificationLoading;return is.createElement("div",{className:"auth-overlay-wrapper"},"api-key-bearer"===n&&is.createElement(ps,{domain:r,onAuthSuccess:o}),"oauth-oidc"===n&&is.createElement(hs,{authorizationUrl:a,isAuthVerificationLoading:i,name:t,domain:r}))},ps=function(e){var t=e.domain,n=e.onAuthSuccess,r=us((0,A.useState)(!1),2),o=r[0],a=r[1],i=us((0,A.useState)(""),2),l=i[0],c=i[1],s=us((0,A.useState)(""),2),u=s[0],f=s[1],d=function(){var e,r=(e=cs().mark((function e(){return cs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==u.trim()){e.next=3;break}return c("Please enter your authentication token"),e.abrupt("return");case 3:return e.prev=3,a(!0),e.next=7,rs(t,u);case 7:e.sent.success?n():c("Invalid Auth token. Please check and re-enter your credentials."),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(3),c("Invalid Auth token. Please check and re-enter your credentials."),console.error("Error saving API key",e.t0);case 15:return e.prev=15,a(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[3,11,15,18]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){ss(a,r,o,i,l,"next",e)}function l(e){ss(a,r,o,i,l,"throw",e)}i(void 0)}))});return function(){return r.apply(this,arguments)}}();return is.createElement("div",{className:"api-key-overlay-wrapper"},is.createElement("div",{className:"api-key-overlay"},is.createElement("p",null,"Please provide your unique authentication token to chat with your agent."),is.createElement("div",{className:"input-wrapper"},is.createElement("input",{type:"password",placeholder:"Enter your OAuth token here",onKeyDown:function(e){"Enter"===e.key&&d()},onChange:function(e){f(e.target.value),c("")},value:u,disabled:o}),is.createElement("button",{className:"submit-button",onClick:d,disabled:o},o?is.createElement(st,{color:"#fff",height:20,width:20,radius:10,strokeWidth:3,strokeWidthSecondary:3}):is.createElement(Rc,null))),l&&is.createElement("p",{className:"error-message"},l)))},hs=function(e){var t=e.authorizationUrl,n=e.isAuthVerificationLoading,r=e.name,o=e.domain;return is.createElement("div",{className:"oauth-overlay-wrapper"},is.createElement("div",{className:"oauth-overlay"},is.createElement("p",null,"Authorize Access to ",r||"your agent",". This will allow you to use our AI chatbot service securely."),is.createElement("button",{onClick:function(){window.open(t,"_blank")},disabled:n},n?is.createElement(st,{color:"#fff",height:20,width:20,radius:10,strokeWidth:2,strokeWidthSecondary:2}):is.createElement(is.Fragment,null,is.createElement("span",null,"Sign in with "),is.createElement("span",{className:"domain-text"},o),is.createElement(Rc,null)))))};function gs(e){return gs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gs(e)}ds.propTypes={name:w().string,domain:w().string,onAuthSuccess:w().func,authorizationUrl:w().string,method:w().string.isRequired,isAuthVerificationLoading:w().bool},ps.propTypes={domain:w().string,onAuthSuccess:w().func},hs.propTypes={authorizationUrl:w().string,isAuthVerificationLoading:w().bool,name:w().string,domain:w().string};var ms=["isBoxOpen","isChatOnly","domain"];function bs(e){return function(e){if(Array.isArray(e))return Ss(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Cs(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ys(){ys=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof b?t:b,i=Object.create(a.prototype),l=new F(r||[]);return o(i,"_invoke",{value:E(e,n,l)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",h="executing",g="completed",m={};function b(){}function y(){}function v(){}var A={};s(A,i,(function(){return this}));var k=Object.getPrototypeOf,w=k&&k(k(T([])));w&&w!==n&&r.call(w,i)&&(A=w);var x=v.prototype=b.prototype=Object.create(A);function C(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,l){var c=f(e[o],e,a);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==gs(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,l)}))}l(c.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function E(t,n,r){var o=d;return function(a,i){if(o===h)throw new Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var l=r.delegate;if(l){var c=O(l,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var s=f(t,n,r);if("normal"===s.type){if(o=r.done?g:p,s.arg===m)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=g,r.method="throw",r.arg=s.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function z(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(z,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(gs(t)+" is not iterable")}return y.prototype=v,o(x,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},C(S.prototype),s(S.prototype,l,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},C(x),s(x,c,"Generator"),s(x,i,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=T,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return l.type="throw",l.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function vs(e,t,n,r,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function As(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){vs(a,r,o,i,l,"next",e)}function l(e){vs(a,r,o,i,l,"throw",e)}i(void 0)}))}}function ks(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ws(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ks(Object(n),!0).forEach((function(t){var r,o,a;r=e,o=t,a=n[t],(o=function(e){var t=function(e,t){if("object"!==gs(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==gs(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===gs(t)?t:String(t)}(o))in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ks(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xs(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||Cs(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cs(e,t){if(e){if("string"==typeof e)return Ss(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ss(e,t):void 0}}function Ss(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Es={id:1,type:"system",content:"",isTyped:!1},Os=function(e){var t,n,r,o,a,i,l,c,s,u,f,d,p,h,g=e.isBoxOpen,m=void 0!==g&&g,b=e.isChatOnly,y=void 0!==b&&b,v=e.domain,k=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,ms),w=A.useRef(null),x=xs((0,A.useState)(!1),2)[1],C=xs((0,A.useState)(""),2)[1],S=xs((0,A.useState)([]),2),E=S[0],O=S[1],z=xs((0,A.useState)([]),2),P=z[0],F=z[1],T=xs((0,A.useState)(m||y),2),L=T[0],B=T[1],_=xs((0,A.useState)(""),2),j=_[0],N=_[1],M=xs((0,A.useState)(!1),2),I=M[0],D=M[1],R=xs((0,A.useState)(""),2),H=R[0],U=R[1],W=xs((0,A.useState)(!1),2),$=W[0],V=W[1],q=xs((0,A.useState)([]),2),Y=q[0],G=q[1],Q=xs((0,A.useState)(!1),2),Z=Q[0],K=Q[1],X=xs((0,A.useState)(!1),2),J=X[0],ee=X[1],te=xs((0,A.useState)(!0),2),ne=te[0],re=te[1],oe=xs((0,A.useState)(ws({},k)),2),ae=oe[0],ie=oe[1],le=xs((0,A.useState)(Es),2),ce=le[0],se=le[1],ue=xs((0,A.useState)(!1),2),fe=ue[0],de=ue[1],pe=xs((0,A.useState)(!1),2),he=pe[0],ge=pe[1],me=xs((0,A.useState)(),2),be=me[0],ye=me[1],ve=xs((0,A.useState)(!1),2),Ae=ve[0],ke=ve[1],we=xs((0,A.useState)(!1),2),xe=we[0],Ce=we[1],Se=(0,A.useRef)(null),Ee=A.memo(Sl),Oe=A.memo(Tc),ze=(0,A.useRef)(null),Pe=(0,A.useRef)(null);(0,A.useEffect)((function(){Fe()}),[j,ne]);var Fe=function(){var e=w.current;if(e){var t=4*parseInt(getComputedStyle(e).lineHeight,10);e.style.height="auto";var n=Math.min(e.scrollHeight,t);e.style.height=0===n?"28px":"".concat(n,"px"),e.style.overflowY=e.scrollHeight>t?"scroll":"hidden"}};(0,A.useEffect)((function(){Pt().highlightAll()}),[E]),(0,A.useEffect)((function(){var e=function(){var e=As(ys().mark((function e(){var t;return ys().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=ae&&ae.authRequired){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,ge(!0),e.next=6,ns(v||(null==ae?void 0:ae.domain));case 6:t=e.sent,ie(ws(ws({domain:v},t),{},{logo:t.icon||t.logo||k.logo},k)),ye(t.headers),t.headers&&t.headers["X-Auth-Token"]&&localStorage.setItem("authToken",t.headers["X-Auth-Token"]),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),console.log("error, ",e.t0);case 15:return e.prev=15,ge(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[2,12,15,18]])})));return function(){return e.apply(this,arguments)}}();return window.addEventListener("focus",e),function(){window.removeEventListener("focus",e)}}),[null==ae?void 0:ae.authRequired]),(0,A.useEffect)((function(){function e(){return(e=As(ys().mark((function e(){var t;return ys().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,D(!0),de(!0),e.next=5,ns(v||(null==ae?void 0:ae.domain));case 5:t=e.sent,ie(ws(ws({domain:v},t),{},{logo:t.icon||t.logo||k.logo},k)),ye(t.headers),de(!1),null!=t&&t.chatbotEnabled&&(!Object.keys(k).find((function(e){return"chatbotEnabled"===e}))||null!=k&&k.chatbotEnabled)||console.error("Chatbot is disabled for this domain (".concat(window.location.hostname,")")),se(ws(ws({},ce),{},{content:(null==ae?void 0:ae.introMessage)||"Hi, I am ".concat((null==t?void 0:t.name)||"your AI assistant",". How can I help you?")})),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(0),U("Something went wrong! Please try again.");case 16:return e.prev=16,D(!1),de(!1),e.finish(16);case 20:case"end":return e.stop()}}),e,null,[[0,13,16,20]])})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]),(0,A.useEffect)((function(){null==P||P.forEach((function(e,t){Y.includes(t)||e.function&&(_e(e),G((function(e){return[].concat(bs(e),[t])})))}))}),[P]),(0,A.useEffect)((function(){var e=function(e){var t=e.target;t.scrollTop+t.clientHeight<t.scrollHeight&&(J||ee(!0))};return ze.current&&ze.current.addEventListener("scroll",e),function(){ze.current&&ze.current.removeEventListener("scroll",e)}}),[ze.current]),(0,A.useEffect)((function(){var e;null===(e=Pe.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})}),[E]);var Te,Le,Be,_e=function(e){var t=e.function,n=e.parameters;"function"==typeof window[t]?window[t].apply(window,n):console.warn("The function ".concat(t," does not exist on the window object."))},je=function(){var e=As(ys().mark((function e(){var t,n,r,o,a,i,l,c,s,u,f,d,p,h,g,m=arguments;return ys().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=!(m.length>0&&void 0!==m[0])||m[0],re(!1),ke(!0),U(""),Ce(!1),n=j,j){e.next=9;break}return ke(!1),e.abrupt("return");case 9:return w.current.value="",Se.current=new AbortController,r=t?{id:E.length+1,type:"user",content:null==j?void 0:j.trim(),updatedAt:(new Date).getTime()}:null,o={id:t?E.length+2:E.length,type:"system",content:"",isTyped:!1,updatedAt:(new Date).getTime()},t&&O([].concat(bs(E),[r,o])),e.prev=14,D(!0),e.next=18,It(n,null==ae?void 0:ae.domain,be,Se.current.signal);case 18:if(a=e.sent,D(!1),a&&200===(null==a?void 0:a.status)){e.next=30;break}if(re(!0),ke(!1),!a){e.next=29;break}return e.next=26,a.json();case 26:i=e.sent,l=i.error,U(l||"Something went wrong! Please try again.");case 29:return e.abrupt("return");case 30:c=a.body.getReader(),s="";case 32:return e.next=35,c.read();case 35:if(u=e.sent,f=u.done,d=u.value,s+=(new TextDecoder).decode(d),f){e.next=45;break}p=Ie(s),De(p,o),s="",e.next=48;break;case 45:return re(!0),ke(!1),e.abrupt("break",50);case 48:e.next=32;break;case 50:e.next=55;break;case 52:e.prev=52,e.t0=e.catch(14),"AbortError"===e.t0.name?console.log("Request was aborted"):(re(!0),ke(!1),U("Something went wrong! Please try again."),console.log(e.t0));case 55:return e.prev=55,D(!1),ke(!1),Se.current=null,h=document.querySelectorAll("a"),g=document.querySelectorAll("img"),h.forEach((function(e){e.setAttribute("target","_blank")})),g.forEach((function(e){e.setAttribute("onerror","this.style.display='none'")})),e.finish(55);case 64:case"end":return e.stop()}}),e,null,[[14,52,55,64]])})));return function(){return e.apply(this,arguments)}}(),Ne=A.useCallback((function(){var e=!1;if(E.length>0){var t=E[E.length-1];t&&t.content&&H&&(e=!0)}return E.sort((function(e,t){return e.updatedAt-t.updatedAt})).map((function(t,n){return e&&n===E.length-1?null:t&&"system"===t.type?A.createElement(Oe,{key:n,message:t,debugInfo:P,errorMessage:H,botBubbleClass:null==ae?void 0:ae.botBubbleClass,colors:null==ae?void 0:ae.colors,syntaxHighlightTheme:null==ae?void 0:ae.syntaxHighlightTheme}):t&&"user"===t.type?A.createElement(Ee,{key:n,message:t,humanBubbleClass:null==ae?void 0:ae.humanBubbleClass,colors:null==ae?void 0:ae.colors}):t&&"debug"===t.type?A.createElement(zs,{key:t.id+t.title+n,debugInfo:t,title:t.title||"Debug"}):null}))}),[E,H]),Me=A.useMemo((function(){return Ne()}),[E,H]),Ie=(0,A.useCallback)((function(e){var t=e.split("}{").map((function(e,t,n){return 0!==t&&(e="{"+e),t!==n.length-1&&(e+="}"),e}));return t.map((function(e){try{return JSON.parse(e)}catch(e){return U("Something went wrong! Please try again."),console.error("Error parsing JSON:",e),null}})).filter(Boolean)}),[]),De=(0,A.useCallback)((function(e,t){var n,r=[],o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Cs(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}(e);try{var a,i=function(){var e=n.value;if(e.error)return U(e.error),{v:void 0};e.debug&&(r.push({debug:e.debug,systemId:t.id,title:e.title||"",function:e.function,parameters:e.parameters,isInvoked:!1,updatedAt:(new Date).getTime()}),O((function(n){var r=n.findIndex((function(t){return t.title&&t.title===e.title}));if(r>-1){var o,a=bs(n);return null===(o=a[r])||void 0===o||null===(o=o.content)||void 0===o||o.push(e.debug),a}return[].concat(bs(n),[{id:n.length+1,type:"debug",content:[e.debug],isTyped:!1,systemId:t.id,title:e.title||"",function:e.function,parameters:e.parameters,isInvoked:!1,updatedAt:(new Date).getTime()}])})),F((function(e){return[].concat(bs(e),r)}))),e.function_call&&!Z&&K(!0),e.content&&""!==e.content&&(Z||K(!1),O((function(n){var r=bs(n),o=r.findIndex((function(e){return e.id===t.id}));return-1!==o&&(r[o].content+=e.content,r[o].updatedAt=(new Date).getTime()),r})))};for(o.s();!(n=o.n()).done;)if(a=i())return a.v}catch(e){o.e(e)}finally{o.f()}}),[]);return A.createElement("div",null,(null==ae?void 0:ae.chatbotEnabled)&&!fe&&A.createElement("button",{className:"chatbot-toggler",style:{backgroundColor:null==ae||null===(t=ae.colors)||void 0===t||null===(t=t.chatTogglerColors)||void 0===t?void 0:t.backgroundColor,color:null==ae||null===(n=ae.colors)||void 0===n||null===(n=n.chatTogglerColors)||void 0===n?void 0:n.textColor},onClick:function(){B((function(e){return!e})),setTimeout((function(){var e;null===(e=Pe.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})}),100)}},L?A.createElement(Nc,{color:null==ae||null===(r=ae.colors)||void 0===r||null===(r=r.chatTogglerColors)||void 0===r?void 0:r.textColor}):A.createElement(Mc,{color:null==ae||null===(o=ae.colors)||void 0===o||null===(o=o.chatTogglerColors)||void 0===o?void 0:o.textColor})),fe&&A.createElement(st,{height:50,width:50,color:"#45c98d",wrapperStyle:{},wrapperClass:"chatbot-toggler toggler-spinner",visible:!0,ariaLabel:"oval-loading",secondaryColor:"#45c98d",strokeWidth:3,strokeWidthSecondary:3}),A.createElement("div",{className:($?"enlarge-box-wrapper".concat(" ","chat-box-wrapper"):"chat-box-wrapper")+(y?" chat-only":""),style:{display:L?"block":"none"}},A.createElement("div",{className:"chatbox"},A.createElement("div",{className:"chat-header",style:{backgroundColor:null==ae||null===(a=ae.colors)||void 0===a||null===(a=a.chatWindowColors)||void 0===a?void 0:a.headerBackgroundColor}},A.createElement("div",{className:"chat-brand"},null!=ae&&ae.logo?A.createElement("img",{src:null==ae?void 0:ae.logo,alt:"",className:"chatbox-logo"}):A.createElement(Dc,null),A.createElement("div",{className:"btn-wrapper"},A.createElement("button",{className:"close-icon",onClick:function(){return V(!$)}},A.createElement(_c,null)),A.createElement("button",{className:"close-icon",onClick:function(){return B(!1)}},A.createElement(jc,null))))),A.createElement("div",{ref:ze,className:"chat-body",style:{backgroundColor:null==ae||null===(i=ae.colors)||void 0===i||null===(i=i.chatWindowColors)||void 0===i?void 0:i.backgroundColor}},ae.authRequired?A.createElement(ds,{name:null==ae?void 0:ae.name,method:null===(l=ae.auth)||void 0===l?void 0:l.method,domain:v||(null==ae?void 0:ae.domain),onAuthSuccess:function(){ie(ws(ws({},ae),{},{authRequired:!1}))},isAuthVerificationLoading:he,authorizationUrl:null==ae||null===(c=ae.auth)||void 0===c?void 0:c.authorizationUrl}):A.createElement(A.Fragment,null,(null==ce?void 0:ce.content)&&A.createElement("div",{className:"chat-message system",key:ce.id},A.createElement("div",{className:"chat-content".concat(" ",(null==ae?void 0:ae.botBubbleClass)||""),style:{color:null==ae||null===(Te=ae.colors)||void 0===Te||null===(Te=Te.botBubbleColors)||void 0===Te?void 0:Te.textColor,background:"linear-gradient(to right, ".concat(null==ae||null===(Le=ae.colors)||void 0===Le||null===(Le=Le.botBubbleColors)||void 0===Le?void 0:Le.backgroundColorStart,", ").concat(null==ae||null===(Be=ae.colors)||void 0===Be||null===(Be=Be.botBubbleColors)||void 0===Be?void 0:Be.backgroundColorEnd,")")}},A.createElement("div",{className:"text"},A.createElement(kl,{message:ce,speed:20,setCurrentMessage:function(e){return C(e)},setIsTyped:function(e){return x(e)}})))),Me,A.createElement("div",{ref:Pe}),I&&!Z&&A.createElement(kt,{height:"44",width:"44",radius:"9",color:(null==ae||null===(s=ae.colors)||void 0===s||null===(s=s.botBubbleColors)||void 0===s?void 0:s.backgroundColorStart)||"#45c98d",ariaLabel:"three-dots-loading",wrapperClassName:"",visible:!0}),!I&&Z&&A.createElement("div",{style:{display:"inline-flex",alignItems:"center",gap:"6px",background:"#fff",borderRadius:"6px",padding:"8px",border:"1px solid",fontSize:"14px"}},A.createElement("span",{id:"plugin-call-message"},null!=ae&&ae.pluginCallMessage?null==ae?void 0:ae.pluginCallMessage:null!=ae&&ae.name?"Contacting ".concat(null==ae?void 0:ae.name):"Contacting Engine"),A.createElement(vt,{strokeColor:"black",strokeWidth:"3",animationDuration:"0.5",width:"20",visible:!0})),H&&!xe&&(setTimeout((function(){var e;null===(e=Pe.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})}),300),A.createElement(Yc,{errorText:H,defaultMessage:ce,setErrorMessage:U,handleUserInputSubmit:je,setCurrentMessage:C,setIsTyped:x})))),A.createElement("div",{className:"chat-footer",style:{backgroundColor:null==ae||null===(u=ae.colors)||void 0===u||null===(u=u.chatWindowColors)||void 0===u?void 0:u.footerBackgroundColor}},A.createElement("div",{className:"chat-input"},A.createElement("textarea",{placeholder:"Type a message...",autoFocus:!0,ref:w,onChange:function(e){return N(e.target.value)},disabled:!(null!=ce&&ce.content)||!ne||ae.authRequired,onKeyDown:function(e){return function(e){"Enter"===e.key&&(e.shiftKey||(e.preventDefault(),je()))}(e)},rows:1,style:{lineHeight:"24px"}}),Ae?A.createElement("button",{className:"chat-stop",type:"button",onClick:function(){Se.current&&Se.current.abort(),D(!1),ke(!1),K(!1),re(!0),Ce(!0)},title:"Stop Generating",style:{backgroundColor:null==ae||null===(f=ae.colors)||void 0===f||null===(f=f.sendButtonColors)||void 0===f?void 0:f.backgroundColor,color:null==ae||null===(d=ae.colors)||void 0===d||null===(d=d.sendButtonColors)||void 0===d?void 0:d.textColor}},A.createElement(Hc,null)):A.createElement("button",{disabled:!ne||ae.authRequired,className:"chat-send",type:"button",onClick:function(){return je()},style:{backgroundColor:null==ae||null===(p=ae.colors)||void 0===p||null===(p=p.sendButtonColors)||void 0===p?void 0:p.backgroundColor,color:null==ae||null===(h=ae.colors)||void 0===h||null===(h=h.sendButtonColors)||void 0===h?void 0:h.textColor,cursor:!ne||ae.authRequired?"not-allowed":"pointer"}},A.createElement(Ic,null)))))))};Os.propTypes={logo:w().string,pluginDomain:w().string,name:w().string,humanBubbleClass:w().string,botBubbleClass:w().string,introMessage:w().string,domain:w().string,chatbotEnabled:w().bool};var zs=function(e){var t,n=e.debugInfo,r=e.title;return A.createElement("div",{className:"debug-section"},A.createElement(Ot.Accordion,{atomic:!0,key:n.systemId},A.createElement(Ot.AccordionItem,{title:r},null==n||null===(t=n.content)||void 0===t?void 0:t.map((function(e,t){return A.createElement("p",{key:t},e)})))))};zs.propTypes={debugInfo:w().any};var Ps,Fs=n(294);window.ChatBot={init:function(e){a.createRoot(document.getElementById("smyth-chatbot")).render(Fs.createElement(Os,e))},createDiv:(Ps=document.createElement("div"),Ps.id="smyth-chatbot",void document.body.appendChild(Ps))}},183:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(537),o=n.n(r),a=n(645),i=n.n(a)()(o());i.push([e.id,'/**\n * prism.js default theme for JavaScript, CSS and HTML\n * Based on dabblet (http://dabblet.com)\n * @author Lea Verou\n */\n\ncode[class*="language-"],\npre[class*="language-"] {\n\tcolor: black;\n\tbackground: none;\n\ttext-shadow: 0 1px white;\n\tfont-family: Consolas, Monaco, \'Andale Mono\', \'Ubuntu Mono\', monospace;\n\tfont-size: 1em;\n\ttext-align: left;\n\twhite-space: pre;\n\tword-spacing: normal;\n\tword-break: normal;\n\tword-wrap: normal;\n\tline-height: 1.5;\n\n\t-moz-tab-size: 4;\n\t-o-tab-size: 4;\n\ttab-size: 4;\n\n\t-webkit-hyphens: none;\n\t-moz-hyphens: none;\n\t-ms-hyphens: none;\n\thyphens: none;\n}\n\npre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,\ncode[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {\n\ttext-shadow: none;\n\tbackground: #b3d4fc;\n}\n\npre[class*="language-"]::selection, pre[class*="language-"] ::selection,\ncode[class*="language-"]::selection, code[class*="language-"] ::selection {\n\ttext-shadow: none;\n\tbackground: #b3d4fc;\n}\n\n@media print {\n\tcode[class*="language-"],\n\tpre[class*="language-"] {\n\t\ttext-shadow: none;\n\t}\n}\n\n/* Code blocks */\npre[class*="language-"] {\n\tpadding: 1em;\n\tmargin: .5em 0;\n\toverflow: auto;\n}\n\n:not(pre) > code[class*="language-"],\npre[class*="language-"] {\n\tbackground: #f5f2f0;\n}\n\n/* Inline code */\n:not(pre) > code[class*="language-"] {\n\tpadding: .1em;\n\tborder-radius: .3em;\n\twhite-space: normal;\n}\n\n.token.comment,\n.token.prolog,\n.token.doctype,\n.token.cdata {\n\tcolor: slategray;\n}\n\n.token.punctuation {\n\tcolor: #999;\n}\n\n.token.namespace {\n\topacity: .7;\n}\n\n.token.property,\n.token.tag,\n.token.boolean,\n.token.number,\n.token.constant,\n.token.symbol,\n.token.deleted {\n\tcolor: #905;\n}\n\n.token.selector,\n.token.attr-name,\n.token.string,\n.token.char,\n.token.builtin,\n.token.inserted {\n\tcolor: #690;\n}\n\n.token.operator,\n.token.entity,\n.token.url,\n.language-css .token.string,\n.style .token.string {\n\tcolor: #9a6e3a;\n\t/* This background color was intended by the author of this theme. */\n\tbackground: hsla(0, 0%, 100%, .5);\n}\n\n.token.atrule,\n.token.attr-value,\n.token.keyword {\n\tcolor: #07a;\n}\n\n.token.function,\n.token.class-name {\n\tcolor: #DD4A68;\n}\n\n.token.regex,\n.token.important,\n.token.variable {\n\tcolor: #e90;\n}\n\n.token.important,\n.token.bold {\n\tfont-weight: bold;\n}\n.token.italic {\n\tfont-style: italic;\n}\n\n.token.entity {\n\tcursor: help;\n}\n',"",{version:3,sources:["webpack://./node_modules/prismjs/themes/prism.css"],names:[],mappings:"AAAA;;;;EAIE;;AAEF;;CAEC,YAAY;CACZ,gBAAgB;CAChB,wBAAwB;CACxB,sEAAsE;CACtE,cAAc;CACd,gBAAgB;CAChB,gBAAgB;CAChB,oBAAoB;CACpB,kBAAkB;CAClB,iBAAiB;CACjB,gBAAgB;;CAEhB,gBAAgB;CAChB,cAAc;CACd,WAAW;;CAEX,qBAAqB;CACrB,kBAAkB;CAClB,iBAAiB;CACjB,aAAa;AACd;;AAEA;;CAEC,iBAAiB;CACjB,mBAAmB;AACpB;;AAEA;;CAEC,iBAAiB;CACjB,mBAAmB;AACpB;;AAEA;CACC;;EAEC,iBAAiB;CAClB;AACD;;AAEA,gBAAgB;AAChB;CACC,YAAY;CACZ,cAAc;CACd,cAAc;AACf;;AAEA;;CAEC,mBAAmB;AACpB;;AAEA,gBAAgB;AAChB;CACC,aAAa;CACb,mBAAmB;CACnB,mBAAmB;AACpB;;AAEA;;;;CAIC,gBAAgB;AACjB;;AAEA;CACC,WAAW;AACZ;;AAEA;CACC,WAAW;AACZ;;AAEA;;;;;;;CAOC,WAAW;AACZ;;AAEA;;;;;;CAMC,WAAW;AACZ;;AAEA;;;;;CAKC,cAAc;CACd,oEAAoE;CACpE,iCAAiC;AAClC;;AAEA;;;CAGC,WAAW;AACZ;;AAEA;;CAEC,cAAc;AACf;;AAEA;;;CAGC,WAAW;AACZ;;AAEA;;CAEC,iBAAiB;AAClB;AACA;CACC,kBAAkB;AACnB;;AAEA;CACC,YAAY;AACb",sourcesContent:['/**\n * prism.js default theme for JavaScript, CSS and HTML\n * Based on dabblet (http://dabblet.com)\n * @author Lea Verou\n */\n\ncode[class*="language-"],\npre[class*="language-"] {\n\tcolor: black;\n\tbackground: none;\n\ttext-shadow: 0 1px white;\n\tfont-family: Consolas, Monaco, \'Andale Mono\', \'Ubuntu Mono\', monospace;\n\tfont-size: 1em;\n\ttext-align: left;\n\twhite-space: pre;\n\tword-spacing: normal;\n\tword-break: normal;\n\tword-wrap: normal;\n\tline-height: 1.5;\n\n\t-moz-tab-size: 4;\n\t-o-tab-size: 4;\n\ttab-size: 4;\n\n\t-webkit-hyphens: none;\n\t-moz-hyphens: none;\n\t-ms-hyphens: none;\n\thyphens: none;\n}\n\npre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,\ncode[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {\n\ttext-shadow: none;\n\tbackground: #b3d4fc;\n}\n\npre[class*="language-"]::selection, pre[class*="language-"] ::selection,\ncode[class*="language-"]::selection, code[class*="language-"] ::selection {\n\ttext-shadow: none;\n\tbackground: #b3d4fc;\n}\n\n@media print {\n\tcode[class*="language-"],\n\tpre[class*="language-"] {\n\t\ttext-shadow: none;\n\t}\n}\n\n/* Code blocks */\npre[class*="language-"] {\n\tpadding: 1em;\n\tmargin: .5em 0;\n\toverflow: auto;\n}\n\n:not(pre) > code[class*="language-"],\npre[class*="language-"] {\n\tbackground: #f5f2f0;\n}\n\n/* Inline code */\n:not(pre) > code[class*="language-"] {\n\tpadding: .1em;\n\tborder-radius: .3em;\n\twhite-space: normal;\n}\n\n.token.comment,\n.token.prolog,\n.token.doctype,\n.token.cdata {\n\tcolor: slategray;\n}\n\n.token.punctuation {\n\tcolor: #999;\n}\n\n.token.namespace {\n\topacity: .7;\n}\n\n.token.property,\n.token.tag,\n.token.boolean,\n.token.number,\n.token.constant,\n.token.symbol,\n.token.deleted {\n\tcolor: #905;\n}\n\n.token.selector,\n.token.attr-name,\n.token.string,\n.token.char,\n.token.builtin,\n.token.inserted {\n\tcolor: #690;\n}\n\n.token.operator,\n.token.entity,\n.token.url,\n.language-css .token.string,\n.style .token.string {\n\tcolor: #9a6e3a;\n\t/* This background color was intended by the author of this theme. */\n\tbackground: hsla(0, 0%, 100%, .5);\n}\n\n.token.atrule,\n.token.attr-value,\n.token.keyword {\n\tcolor: #07a;\n}\n\n.token.function,\n.token.class-name {\n\tcolor: #DD4A68;\n}\n\n.token.regex,\n.token.important,\n.token.variable {\n\tcolor: #e90;\n}\n\n.token.important,\n.token.bold {\n\tfont-weight: bold;\n}\n.token.italic {\n\tfont-style: italic;\n}\n\n.token.entity {\n\tcursor: help;\n}\n'],sourceRoot:""}]);const l=i},245:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(537),o=n.n(r),a=n(645),i=n.n(a)()(o());i.push([e.id,".accordion {\n border-radius: 5px;\n border: 1px solid #d9d9d9;\n}\n.accordion .accordion-item:first-child .title {\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n}\n.accordion .accordion-item:last-child .title {\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n}\n.accordion .accordion-item .title {\n background-color: #f6f6f6;\n color: #444;\n cursor: pointer;\n padding: 18px;\n width: 100%;\n text-align: left;\n border: none;\n outline: none;\n -webkit-transition: 0.4s;\n -o-transition: 0.4s;\n transition: 0.4s;\n}\n.accordion .accordion-item .title:after {\n content: '\\2795';\n font-size: 13px;\n color: #777;\n float: right;\n margin-left: 5px;\n}\n.accordion .accordion-item .panel {\n max-height: 0;\n -webkit-transition: max-height 0.15s ease-out;\n -o-transition: max-height 0.15s ease-out;\n transition: max-height 0.15s ease-out;\n overflow: hidden;\n}\n.accordion .accordion-item.active .title {\n background-color: #eee;\n}\n.accordion .accordion-item.active .title:after {\n content: '\\2796';\n}\n.accordion .accordion-item.active .panel {\n max-height: 500px;\n -webkit-transition: max-height 0.25s ease-in;\n -o-transition: max-height 0.25s ease-in;\n transition: max-height 0.25s ease-in;\n}\n/*# sourceMappingURL=index.css.map*/\n","",{version:3,sources:["webpack:///src/lib/style/index.css","webpack://./node_modules/react-light-accordion/demo/css/index.css"],names:[],mappings:"AAAA;ECCE,kBAAkB;EAClB,yBAAyB;AAC3B;AACA;EACE,2BAA2B;EAC3B,4BAA4B;AAC9B;AACA;EACE,8BAA8B;EAC9B,+BAA+B;AACjC;AACA;EACE,yBAAyB;EACzB,WAAW;EACX,eAAe;EACf,aAAa;EACb,WAAW;EACX,gBAAgB;EAChB,YAAY;EACZ,aAAa;EACb,wBAAwB;EACxB,mBAAmB;EACnB,gBAAgB;AAClB;AACA;EACE,gBAAgB;EAChB,eAAe;EACf,WAAW;EACX,YAAY;EACZ,gBAAgB;AAClB;AACA;EACE,aAAa;EACb,6CAA6C;EAC7C,wCAAwC;EACxC,qCAAqC;EACrC,gBAAgB;AAClB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,gBAAgB;AAClB;AACA;EACE,iBAAiB;EACjB,4CAA4C;EAC5C,uCAAuC;EACvC,oCAAoC;AACtC;AACA,mCAAmC",sourcesContent:[".accordion {\n border-radius: 5px;\n border: 1px solid #d9d9d9; }\n .accordion .accordion-item:first-child .title {\n border-top-left-radius: 5px;\n border-top-right-radius: 5px; }\n .accordion .accordion-item:last-child .title {\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px; }\n .accordion .accordion-item .title {\n background-color: #f6f6f6;\n color: #444;\n cursor: pointer;\n padding: 18px;\n width: 100%;\n text-align: left;\n border: none;\n outline: none;\n -webkit-transition: 0.4s;\n -o-transition: 0.4s;\n transition: 0.4s; }\n .accordion .accordion-item .title:after {\n content: '\\02795';\n /* Unicode character for \"plus\" sign (+) */\n font-size: 13px;\n color: #777;\n float: right;\n margin-left: 5px; }\n .accordion .accordion-item .panel {\n max-height: 0;\n -webkit-transition: max-height 0.15s ease-out;\n -o-transition: max-height 0.15s ease-out;\n transition: max-height 0.15s ease-out;\n overflow: hidden; }\n .accordion .accordion-item.active .title {\n background-color: #eeeeee; }\n .accordion .accordion-item.active .title:after {\n content: '\\2796';\n /* Unicode character for \"minus\" sign (-) */ }\n .accordion .accordion-item.active .panel {\n max-height: 500px;\n -webkit-transition: max-height 0.25s ease-in;\n -o-transition: max-height 0.25s ease-in;\n transition: max-height 0.25s ease-in; }\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib/style/index.css",".accordion {\n border-radius: 5px;\n border: 1px solid #d9d9d9;\n}\n.accordion .accordion-item:first-child .title {\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n}\n.accordion .accordion-item:last-child .title {\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n}\n.accordion .accordion-item .title {\n background-color: #f6f6f6;\n color: #444;\n cursor: pointer;\n padding: 18px;\n width: 100%;\n text-align: left;\n border: none;\n outline: none;\n -webkit-transition: 0.4s;\n -o-transition: 0.4s;\n transition: 0.4s;\n}\n.accordion .accordion-item .title:after {\n content: '\\2795';\n font-size: 13px;\n color: #777;\n float: right;\n margin-left: 5px;\n}\n.accordion .accordion-item .panel {\n max-height: 0;\n -webkit-transition: max-height 0.15s ease-out;\n -o-transition: max-height 0.15s ease-out;\n transition: max-height 0.15s ease-out;\n overflow: hidden;\n}\n.accordion .accordion-item.active .title {\n background-color: #eee;\n}\n.accordion .accordion-item.active .title:after {\n content: '\\2796';\n}\n.accordion .accordion-item.active .panel {\n max-height: 500px;\n -webkit-transition: max-height 0.25s ease-in;\n -o-transition: max-height 0.25s ease-in;\n transition: max-height 0.25s ease-in;\n}\n/*# sourceMappingURL=index.css.map*/\n"],sourceRoot:""}]);const l=i},424:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(537),o=n.n(r),a=n(645),i=n.n(a)()(o());i.push([e.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]);const l=i},759:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(537),o=n.n(r),a=n(645),i=n.n(a)()(o());i.push([e.id,".auth-overlay-wrapper{top:0;left:0;width:100%;height:100%;z-index:100;display:flex;padding:2rem 1rem;position:absolute;box-sizing:border-box;justify-content:center;background-color:#fff;backdrop-filter:blur(5px)}.auth-overlay-wrapper .oauth-overlay,.auth-overlay-wrapper .api-key-overlay{color:#333;display:flex;padding:1rem 1rem;border-radius:8px;text-align:center;align-items:center;flex-direction:column;justify-content:center;border:1px solid #d9d9d9;display:flex;position:relative;align-items:center}.auth-overlay-wrapper .oauth-overlay p,.auth-overlay-wrapper .api-key-overlay p{text-align:left}.auth-overlay-wrapper .oauth-overlay button,.auth-overlay-wrapper .api-key-overlay button{all:unset;color:#333;cursor:pointer;font-weight:500;border-radius:6px;padding:.5rem 2rem;background-color:#45c98d}.auth-overlay-wrapper .oauth-overlay input,.auth-overlay-wrapper .api-key-overlay input{all:unset;color:#333;padding:12px;text-align:left;border-radius:8px;background:#f5f5f5;width:calc(100% - 24px);border:1px solid #d9d9d9}.auth-overlay-wrapper .oauth-overlay .error-message,.auth-overlay-wrapper .api-key-overlay .error-message{color:#900b09;font-size:16px;margin-top:.5rem}.auth-overlay-wrapper .oauth-overlay .input-wrapper,.auth-overlay-wrapper .api-key-overlay .input-wrapper{width:100%;display:flex;position:relative;align-items:center}.auth-overlay-wrapper .oauth-overlay .input-wrapper input,.auth-overlay-wrapper .api-key-overlay .input-wrapper input{flex-grow:1;padding-right:30px}.auth-overlay-wrapper .oauth-overlay .input-wrapper .loader,.auth-overlay-wrapper .api-key-overlay .input-wrapper .loader{top:50%;right:10px;position:absolute;transform:translateY(-50%)}.auth-overlay-wrapper .oauth-overlay .input-wrapper .submit-button,.auth-overlay-wrapper .api-key-overlay .input-wrapper .submit-button{right:0;width:48px;height:100%;display:flex;cursor:pointer;position:absolute;align-items:center;padding:0 !important;justify-content:center;border-radius:0 8px 8px 0}.auth-overlay-wrapper .oauth-overlay{align-items:stretch;box-sizing:border-box}.auth-overlay-wrapper .oauth-overlay button{gap:10px;padding:12px;display:flex;color:#fff;font-weight:600;align-items:center;justify-content:center;background-color:#45c9a9;max-width:100%}.auth-overlay-wrapper .oauth-overlay button:disabled{background-color:#d9d9d9;cursor:not-allowed}.auth-overlay-wrapper .oauth-overlay button .domain-text{max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;vertical-align:bottom}","",{version:3,sources:["webpack://./src/components/auth-overlay/styles.scss"],names:[],mappings:"AAAA,sBACE,KAAA,CACA,MAAA,CACA,UAAA,CACA,WAAA,CACA,WAAA,CACA,YAAA,CACA,iBAAA,CACA,iBAAA,CACA,qBAAA,CACA,sBAAA,CACA,qBAAA,CACA,yBAAA,CACA,4EAEE,UAAA,CACA,YAAA,CACA,iBAAA,CACA,iBAAA,CACA,iBAAA,CACA,kBAAA,CACA,qBAAA,CACA,sBAAA,CACA,wBAAA,CAuBA,YAAA,CACA,iBAAA,CACA,kBAAA,CAxBA,gFACE,eAAA,CAEF,0FACE,SAAA,CACA,UAAA,CACA,cAAA,CACA,eAAA,CACA,iBAAA,CACA,kBAAA,CACA,wBAAA,CAEF,wFACE,SAAA,CACA,UAAA,CACA,YAAA,CACA,eAAA,CACA,iBAAA,CACA,kBAAA,CACA,uBAAA,CACA,wBAAA,CAKF,0GACE,aAAA,CACA,cAAA,CACA,gBAAA,CAEF,0GACE,UAAA,CACA,YAAA,CACA,iBAAA,CACA,kBAAA,CACA,sHACE,WAAA,CACA,kBAAA,CAGF,0HACE,OAAA,CACA,UAAA,CACA,iBAAA,CACA,0BAAA,CAEF,wIACE,OAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,cAAA,CACA,iBAAA,CACA,kBAAA,CACA,oBAAA,CACA,sBAAA,CACA,yBAAA,CAIN,qCACE,mBAAA,CACA,qBAAA,CACA,4CACE,QAAA,CACA,YAAA,CACA,YAAA,CACA,UAAA,CACA,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,wBAAA,CACA,cAAA,CACA,qDACE,wBAAA,CACA,kBAAA,CAGF,yDACE,eAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,oBAAA,CACA,qBAAA",sourcesContent:[".auth-overlay-wrapper {\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n z-index: 100;\r\n display: flex;\r\n padding: 2rem 1rem;\r\n position: absolute;\r\n box-sizing: border-box;\r\n justify-content: center;\r\n background-color: #fff;\r\n backdrop-filter: blur(5px);\r\n .oauth-overlay,\r\n .api-key-overlay {\r\n color: #333;\r\n display: flex;\r\n padding: 1rem 1rem;\r\n border-radius: 8px;\r\n text-align: center;\r\n align-items: center;\r\n flex-direction: column;\r\n justify-content: center;\r\n border: 1px solid #d9d9d9;\r\n p {\r\n text-align: left;\r\n }\r\n button {\r\n all: unset;\r\n color: #333;\r\n cursor: pointer;\r\n font-weight: 500;\r\n border-radius: 6px;\r\n padding: 0.5rem 2rem;\r\n background-color: #45c98d;\r\n }\r\n input {\r\n all: unset;\r\n color: #333;\r\n padding: 12px;\r\n text-align: left;\r\n border-radius: 8px;\r\n background: #f5f5f5;\r\n width: calc(100% - 24px); // Subtracting padding from both sides\r\n border: 1px solid #d9d9d9;\r\n }\r\n display: flex;\r\n position: relative;\r\n align-items: center;\r\n .error-message {\r\n color: #900B09;\r\n font-size: 16px;\r\n margin-top: .5rem;\r\n }\r\n .input-wrapper {\r\n width: 100%;\r\n display: flex;\r\n position: relative;\r\n align-items: center;\r\n input {\r\n flex-grow: 1;\r\n padding-right: 30px; // Make room for the loader\r\n }\r\n\r\n .loader {\r\n top: 50%;\r\n right: 10px;\r\n position: absolute;\r\n transform: translateY(-50%);\r\n }\r\n .submit-button {\r\n right: 0;\r\n width: 48px;\r\n height: 100%;\r\n display: flex;\r\n cursor: pointer;\r\n position: absolute;\r\n align-items: center;\r\n padding: 0 !important;\r\n justify-content: center;\r\n border-radius: 0 8px 8px 0;\r\n }\r\n }\r\n }\r\n .oauth-overlay {\r\n align-items: stretch;\r\n box-sizing: border-box;\r\n button {\r\n gap: 10px;\r\n padding: 12px;\r\n display: flex;\r\n color: #fff;\r\n font-weight: 600;\r\n align-items: center;\r\n justify-content: center;\r\n background-color: #45C9A9;\r\n max-width: 100%; // Ensure the button doesn't exceed its container width\r\n &:disabled {\r\n background-color: #d9d9d9;\r\n cursor: not-allowed;\r\n }\r\n\r\n .domain-text {\r\n max-width: 200px; // Adjust this value as needed\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n display: inline-block;\r\n vertical-align: bottom;\r\n }\r\n }\r\n }\r\n}\r\n"],sourceRoot:""}]);const l=i},519:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(537),o=n.n(r),a=n(645),i=n.n(a)()(o());i.push([e.id,".chat-box-wrapper{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%;z-index:99999999;scrollbar-width:thin;scrollbar-color:#a29e9f #f1f1f1;position:fixed;bottom:6rem;right:3rem;width:450px;max-width:calc(100% - 3rem);height:85vh;display:flex;flex-direction:column;box-shadow:rgba(150,150,150,.2) 0px 10px 30px 0px,rgba(150,150,150,.2) 0px 0px 0px 1px;border-radius:1rem;overflow:hidden;background:#fff}.chat-box-wrapper ::-webkit-scrollbar{width:8px}.chat-box-wrapper ::-webkit-scrollbar-thumb{background-color:#a29e9f;border-radius:5px;box-shadow:inset 0 0 5px rgba(0,0,0,.2)}.chat-box-wrapper ::-webkit-scrollbar-track{background-color:#f1f1f1}.chat-box-wrapper.chat-only{top:0;left:0;width:100%;height:100%;max-width:100%;border-radius:0}.chat-box-wrapper.chat-only .chat-header{display:none}.chat-box-wrapper.chat-only .chatbox .chat-footer{padding:0;border-top:none}.chat-box-wrapper h1{font-size:3.2em;line-height:1.1}.chat-box-wrapper a{font-weight:500;color:#646cff;text-decoration:inherit}.chat-box-wrapper a:hover{color:#535bf2}@media screen and (max-width: 540px){.chat-box-wrapper{right:1rem;max-width:calc(100% - 2rem)}}.chat-box-wrapper .chatbox{display:flex;flex-direction:column;height:100%}.chat-box-wrapper .chatbox .chat-header{flex:0 0 auto;border-bottom:1px solid #ddd}.chat-box-wrapper .chatbox .chat-header .chat-brand{display:flex;justify-content:space-between;padding:1rem}.chat-box-wrapper .chatbox .chat-header .chat-brand .chatbox-logo{width:auto;object-fit:contain;height:36px}.chat-box-wrapper .chatbox .chat-header .chat-brand .btn-wrapper{display:flex;justify-content:space-between;gap:.5rem}.chat-box-wrapper .chatbox .chat-header .chat-brand .btn-wrapper .close-icon{display:flex;align-items:center;border:none;outline:none;background:rgba(0,0,0,0);cursor:pointer}.chat-box-wrapper .chatbox .chat-header .chat-brand .btn-wrapper .close-icon img{width:16px;cursor:pointer}.chat-box-wrapper .chatbox .chat-body{flex:1 1 auto;overflow-y:auto;padding:2rem 1rem;position:relative}.chat-box-wrapper .chatbox .chat-body .chat-message{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:1rem}.chat-box-wrapper .chatbox .chat-body .chat-message .chat-content{padding:.5rem 1rem;border-radius:.5rem;background-color:#f1f1f0;max-width:80%;word-break:break-word}.chat-box-wrapper .chatbox .chat-body .chat-message .chat-content .timestamp{font-size:.75rem;color:#999;margin-top:.25rem}.chat-box-wrapper .chatbox .chat-body .chat-message.user{align-items:flex-end}.chat-box-wrapper .chatbox .chat-body .chat-message.user .chat-content{background:#45c98d;color:#fff}.chat-box-wrapper .chatbox .chat-body .chat-message.user .chat-content .timestamp{color:#fff}.chat-box-wrapper .chatbox .chat-body .chat-message img{max-width:100%;width:100%;margin:12px auto;display:block}.chat-box-wrapper .chatbox .chat-footer{display:flex;flex:0 0 auto;padding:1rem;justify-content:space-between;border-top:1px solid #ddd}.chat-box-wrapper .chatbox .chat-footer .chat-input{flex:1 1 auto;display:flex;align-items:end;justify-content:space-between;border-radius:.5rem;background-color:rgba(0,0,0,0);padding:.5rem;padding-right:0;border:1px solid #ddd;position:relative;max-width:100%}.chat-box-wrapper .chatbox .chat-footer .chat-input textarea{flex:1 1 auto;border:none;outline:none;padding-right:3.5rem;background-color:rgba(0,0,0,0);font-size:1rem;color:#333;resize:none;font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;scrollbar-width:thin;scrollbar-color:#aaa rgba(0,0,0,0)}.chat-box-wrapper .chatbox .chat-footer .chat-input textarea::placeholder{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif}.chat-box-wrapper .chatbox .chat-footer .chat-input .chat-send,.chat-box-wrapper .chatbox .chat-footer .chat-input .chat-stop{margin-left:1rem;border:none;outline:none;background-color:rgba(0,0,0,0);background:#45c98d;cursor:pointer;font-weight:bold;color:#fff;border-radius:4px;height:100%;display:flex;justify-content:center;align-items:center;padding:8px;width:40px;height:32px;position:absolute;right:8px;bottom:50%;transform:translateY(50%);min-height:24px}.chat-box-wrapper .chatbox .chat-footer .chat-input .chat-send:disabled,.chat-box-wrapper .chatbox .chat-footer .chat-input .chat-stop:disabled{background:#d9d9d9;cursor:not-allowed}.chat-box-wrapper .chatbox .chat-footer .chat-input .chat-send img,.chat-box-wrapper .chatbox .chat-footer .chat-input .chat-stop img{width:75%}.chat-box-wrapper .collapsibleWrapper .collapsibleButton{background-color:#555;color:#fff;cursor:pointer;width:100%;text-align:left}.chat-box-wrapper .collapsibleWrapper .collapsibleContent{max-height:0;overflow:hidden;transition:max-height .2s ease-out}.chat-box-wrapper .collapsibleWrapper .button:active+.collapsibleContent{max-height:100vh}.chat-box-wrapper .accordion .accordion-item.active .panel{overflow-y:auto}.chat-box-wrapper .accordion .accordion-item .title{padding:12px}.enlarge-box-wrapper{left:3rem;width:unset;transition:left .3s ease-out,width .3s ease-out}.chatbot-toggler{position:fixed;z-index:99999999;bottom:1rem;right:3rem;width:50px;height:50px;border-radius:50%;background:#45c98d;color:#fff;box-shadow:0 0 10px rgba(0,0,0,.3);cursor:pointer;display:flex;justify-content:center;align-items:center;border:none;font-weight:bold;padding:0}@media screen and (max-width: 540px){.chatbot-toggler{right:1rem}}.chatbot-toggler img{width:24px}.chatbot-toggler.toggler-spinner{background:#fff}.regenerate-button{background-color:#fff;color:#000;padding:8px 16px;border:none;border-radius:5px;cursor:pointer;font-size:14px;transition:background-color .3s ease;display:flex;align-items:center;gap:6px;justify-content:center;box-shadow:0 0 4px rgba(0,0,0,.1);font-weight:600}.regenerate-button:hover{box-shadow:0 0 8px rgba(0,0,0,.1)}.icon-button-container{display:flex;align-items:center;gap:10px}.debug-section{margin-bottom:1rem}.debug-section p{padding:0 1rem !important;font-size:13px}.chat-text pre div{overflow:auto !important}.chat-text pre :not(pre)>code[class*=language-],.chat-text pre pre[class*=language-]{background:rgba(0,0,0,0) !important;text-shadow:none !important}.chat-text pre .token.operator,.chat-text pre .token.entity,.chat-text pre .token.url,.chat-text pre .language-css .token.string,.chat-text pre .style .token.string{background:rgba(0,0,0,0) !important}.chat-stop{margin-left:1rem;border:none;outline:none;background-color:#ff4d4f;cursor:pointer;font-weight:bold;color:#fff;border-radius:4px;height:100%;display:flex;justify-content:center;align-items:center;padding:8px 16px;font-size:14px}","",{version:3,sources:["webpack://./src/components/chatbox/styles.scss"],names:[],mappings:"AAAA,kBACE,6DAAA,CACA,eAAA,CACA,eAAA,CACA,mBAAA,CACA,iCAAA,CACA,kCAAA,CACA,iCAAA,CACA,6BAAA,CACA,gBAAA,CAmBA,oBAAA,CACA,+BAAA,CAgCA,cAAA,CACA,WAAA,CACA,UAAA,CACA,WAAA,CACA,2BAAA,CACA,WAAA,CACA,YAAA,CACA,qBAAA,CACA,sFAAA,CAEA,kBAAA,CACA,eAAA,CACA,eAAA,CA7DA,sCACE,SAAA,CAIF,4CACE,wBAAA,CACA,iBAAA,CACA,uCAAA,CAIF,4CACE,wBAAA,CAMF,4BACE,KAAA,CACA,MAAA,CACA,UAAA,CACA,WAAA,CACA,cAAA,CACA,eAAA,CACA,yCACE,YAAA,CAGA,kDACE,SAAA,CACA,eAAA,CAIN,qBACE,eAAA,CACA,eAAA,CAEF,oBACE,eAAA,CACA,aAAA,CACA,uBAAA,CAEF,0BACE,aAAA,CAgBF,qCA1EF,kBA2EI,UAAA,CACA,2BAAA,CAAA,CAEF,2BACE,YAAA,CACA,qBAAA,CACA,WAAA,CACA,wCACE,aAAA,CACA,4BAAA,CACA,oDACE,YAAA,CACA,6BAAA,CACA,YAAA,CACA,kEACE,UAAA,CACA,kBAAA,CACA,WAAA,CAEF,iEACE,YAAA,CACA,6BAAA,CACA,SAAA,CACA,6EACE,YAAA,CACA,kBAAA,CACA,WAAA,CACA,YAAA,CACA,wBAAA,CACA,cAAA,CACA,iFACE,UAAA,CACA,cAAA,CAMV,sCACE,aAAA,CACA,eAAA,CACA,iBAAA,CAEA,iBAAA,CAEA,oDACE,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,kBAAA,CACA,kEACE,kBAAA,CACA,mBAAA,CACA,wBAAA,CACA,aAAA,CACA,qBAAA,CACA,6EACE,gBAAA,CACA,UAAA,CACA,iBAAA,CAGJ,yDACE,oBAAA,CACA,uEACE,kBAAA,CACA,UAAA,CACA,kFACE,UAAA,CAIN,wDACE,cAAA,CACA,UAAA,CACA,gBAAA,CACA,aAAA,CAIN,wCACE,YAAA,CACA,aAAA,CACA,YAAA,CACA,6BAAA,CACA,yBAAA,CACA,oDACE,aAAA,CACA,YAAA,CACA,eAAA,CACA,6BAAA,CACA,mBAAA,CACA,8BAAA,CACA,aAAA,CACA,eAAA,CACA,qBAAA,CACA,iBAAA,CACA,cAAA,CACA,6DACE,aAAA,CACA,WAAA,CACA,YAAA,CACA,oBAAA,CACA,8BAAA,CACA,cAAA,CACA,UAAA,CACA,WAAA,CACA,6DAAA,CAIA,oBAAA,CACA,kCAAA,CAJA,0EACE,6DAAA,CAKJ,8HAEE,gBAAA,CACA,WAAA,CACA,YAAA,CACA,8BAAA,CACA,kBAAA,CACA,cAAA,CACA,gBAAA,CACA,UAAA,CACA,iBAAA,CACA,WAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,SAAA,CACA,UAAA,CACA,yBAAA,CACA,eAAA,CACA,gJACE,kBAAA,CACA,kBAAA,CAEF,sIACE,SAAA,CAQR,yDACE,qBAAA,CACA,UAAA,CACA,cAAA,CACA,UAAA,CACA,eAAA,CAGF,0DACE,YAAA,CACA,eAAA,CACA,kCAAA,CAGF,yEACE,gBAAA,CAIJ,2DACE,eAAA,CAGF,oDACE,YAAA,CAGJ,qBACE,SAAA,CACA,WAAA,CACA,+CAAA,CAGF,iBACE,cAAA,CACA,gBAAA,CACA,WAAA,CACA,UAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,kBAAA,CACA,UAAA,CACA,kCAAA,CACA,cAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CACA,gBAAA,CACA,SAAA,CACA,qCAlBF,iBAmBI,UAAA,CAAA,CAEF,qBACE,UAAA,CAEF,iCACE,eAAA,CAGJ,mBACE,qBAAA,CACA,UAAA,CACA,gBAAA,CACA,WAAA,CACA,iBAAA,CACA,cAAA,CACA,cAAA,CACA,oCAAA,CACA,YAAA,CACA,kBAAA,CACA,OAAA,CACA,sBAAA,CACA,iCAAA,CACA,eAAA,CAEA,yBACE,iCAAA,CAGJ,uBACE,YAAA,CACA,kBAAA,CACA,QAAA,CAEF,eACE,kBAAA,CACA,iBACE,yBAAA,CACA,cAAA,CAMA,mBACE,wBAAA,CAEF,qFAEE,mCAAA,CACA,2BAAA,CAEF,qKAKE,mCAAA,CAKN,WACE,gBAAA,CACA,WAAA,CACA,YAAA,CACA,wBAAA,CACA,cAAA,CACA,gBAAA,CACA,UAAA,CACA,iBAAA,CACA,WAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,gBAAA,CACA,cAAA",sourcesContent:['.chat-box-wrapper {\r\n font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;\r\n line-height: 1.5;\r\n font-weight: 400;\r\n font-synthesis: none;\r\n text-rendering: optimizeLegibility;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n -webkit-text-size-adjust: 100%;\r\n z-index: 99999999;\r\n\r\n /* Style the scrollbar track */\r\n ::-webkit-scrollbar {\r\n width: 8px; /* Width of the scrollbar */\r\n }\r\n\r\n /* Style the scrollbar thumb */\r\n ::-webkit-scrollbar-thumb {\r\n background-color: rgb(162, 158, 159); /* Color of the scrollbar thumb */\r\n border-radius: 5px; /* Rounded corners for the thumb */\r\n box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); /* Inner shadow effect */\r\n }\r\n\r\n /* Style the scrollbar track */\r\n ::-webkit-scrollbar-track {\r\n background-color: #f1f1f1; /* Color of the scrollbar track */\r\n }\r\n\r\n scrollbar-width: thin;\r\n scrollbar-color: rgb(162, 158, 159) #f1f1f1; // Firefox\r\n\r\n &.chat-only {\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n max-width: 100%;\r\n border-radius: 0;\r\n .chat-header {\r\n display: none;\r\n }\r\n .chatbox {\r\n .chat-footer {\r\n padding: 0;\r\n border-top: none;\r\n }\r\n }\r\n }\r\n h1 {\r\n font-size: 3.2em;\r\n line-height: 1.1;\r\n }\r\n a {\r\n font-weight: 500;\r\n color: #646cff;\r\n text-decoration: inherit;\r\n }\r\n a:hover {\r\n color: #535bf2;\r\n }\r\n\r\n position: fixed;\r\n bottom: 6rem;\r\n right: 3rem;\r\n width: 450px;\r\n max-width: calc(100% - 3rem);\r\n height: 85vh;\r\n display: flex;\r\n flex-direction: column;\r\n box-shadow: rgba(150, 150, 150, 0.2) 0px 10px 30px 0px,\r\n rgba(150, 150, 150, 0.2) 0px 0px 0px 1px;\r\n border-radius: 1rem;\r\n overflow: hidden;\r\n background: #fff;\r\n @media screen and (max-width: 540px) {\r\n right: 1rem;\r\n max-width: calc(100% - 2rem);\r\n }\r\n .chatbox {\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n .chat-header {\r\n flex: 0 0 auto;\r\n border-bottom: 1px solid #ddd;\r\n .chat-brand {\r\n display: flex;\r\n justify-content: space-between;\r\n padding: 1rem;\r\n .chatbox-logo {\r\n width: auto;\r\n object-fit: contain;\r\n height: 36px;\r\n }\r\n .btn-wrapper {\r\n display: flex;\r\n justify-content: space-between;\r\n gap: 0.5rem;\r\n .close-icon {\r\n display: flex;\r\n align-items: center;\r\n border: none;\r\n outline: none;\r\n background: transparent;\r\n cursor: pointer;\r\n img {\r\n width: 16px;\r\n cursor: pointer;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n .chat-body {\r\n flex: 1 1 auto;\r\n overflow-y: auto;\r\n padding: 2rem 1rem;\r\n // scrollbar-gutter: stable;\r\n position: relative;\r\n\r\n .chat-message {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: flex-start;\r\n margin-bottom: 1rem;\r\n .chat-content {\r\n padding: 0.5rem 1rem;\r\n border-radius: 0.5rem;\r\n background-color: #f1f1f0;\r\n max-width: 80%;\r\n word-break: break-word;\r\n .timestamp {\r\n font-size: 0.75rem;\r\n color: #999;\r\n margin-top: 0.25rem;\r\n }\r\n }\r\n &.user {\r\n align-items: flex-end;\r\n .chat-content {\r\n background: #45c98d;\r\n color: #fff;\r\n .timestamp {\r\n color: #fff;\r\n }\r\n }\r\n }\r\n img {\r\n max-width: 100%;\r\n width: 100%;\r\n margin: 12px auto;\r\n display: block;\r\n }\r\n }\r\n }\r\n .chat-footer {\r\n display: flex;\r\n flex: 0 0 auto;\r\n padding: 1rem;\r\n justify-content: space-between;\r\n border-top: 1px solid #ddd;\r\n .chat-input {\r\n flex: 1 1 auto;\r\n display: flex;\r\n align-items: end;\r\n justify-content: space-between;\r\n border-radius: 0.5rem;\r\n background-color: transparent;\r\n padding: 0.5rem;\r\n padding-right: 0;\r\n border: 1px solid #ddd;\r\n position: relative;\r\n max-width: 100%;\r\n textarea {\r\n flex: 1 1 auto;\r\n border: none;\r\n outline: none;\r\n padding-right: 3.5rem;\r\n background-color: transparent;\r\n font-size: 1rem;\r\n color: #333;\r\n resize: none;\r\n font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;\r\n &::placeholder {\r\n font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;\r\n }\r\n scrollbar-width: thin;\r\n scrollbar-color: #aaa transparent;\r\n }\r\n .chat-send,\r\n .chat-stop {\r\n margin-left: 1rem;\r\n border: none;\r\n outline: none;\r\n background-color: transparent;\r\n background: #45c98d;\r\n cursor: pointer;\r\n font-weight: bold;\r\n color: #fff;\r\n border-radius: 4px;\r\n height: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n padding: 8px;\r\n width: 40px;\r\n height: 32px;\r\n position: absolute;\r\n right: 8px;\r\n bottom: 50%;\r\n transform: translateY(50%);\r\n min-height: 24px;\r\n &:disabled {\r\n background: #d9d9d9;\r\n cursor: not-allowed;\r\n }\r\n img {\r\n width: 75%;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n .collapsibleWrapper {\r\n .collapsibleButton {\r\n background-color: #555;\r\n color: white;\r\n cursor: pointer;\r\n width: 100%;\r\n text-align: left;\r\n }\r\n\r\n .collapsibleContent {\r\n max-height: 0;\r\n overflow: hidden;\r\n transition: max-height 0.2s ease-out;\r\n }\r\n\r\n .button:active + .collapsibleContent {\r\n max-height: 100vh;\r\n }\r\n }\r\n\r\n .accordion .accordion-item.active .panel {\r\n overflow-y: auto;\r\n }\r\n\r\n .accordion .accordion-item .title {\r\n padding: 12px;\r\n }\r\n}\r\n.enlarge-box-wrapper {\r\n left: 3rem;\r\n width: unset;\r\n transition: left 0.3s ease-out, width 0.3s ease-out;\r\n}\r\n\r\n.chatbot-toggler {\r\n position: fixed;\r\n z-index: 99999999;\r\n bottom: 1rem;\r\n right: 3rem;\r\n width: 50px;\r\n height: 50px;\r\n border-radius: 50%;\r\n background: #45c98d;\r\n color: #fff;\r\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);\r\n cursor: pointer;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n border: none;\r\n font-weight: bold;\r\n padding: 0;\r\n @media screen and (max-width: 540px) {\r\n right: 1rem;\r\n }\r\n img {\r\n width: 24px;\r\n }\r\n &.toggler-spinner {\r\n background: #fff;\r\n }\r\n}\r\n.regenerate-button {\r\n background-color: #fff;\r\n color: #000;\r\n padding: 8px 16px;\r\n border: none;\r\n border-radius: 5px;\r\n cursor: pointer;\r\n font-size: 14px;\r\n transition: background-color 0.3s ease;\r\n display: flex;\r\n align-items: center;\r\n gap: 6px;\r\n justify-content: center;\r\n box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);\r\n font-weight: 600;\r\n\r\n &:hover {\r\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);\r\n }\r\n}\r\n.icon-button-container {\r\n display: flex;\r\n align-items: center;\r\n gap: 10px;\r\n}\r\n.debug-section {\r\n margin-bottom: 1rem;\r\n p {\r\n padding: 0 1rem !important;\r\n font-size: 13px;\r\n }\r\n}\r\n\r\n.chat-text {\r\n pre {\r\n div {\r\n overflow: auto !important;\r\n }\r\n :not(pre) > code[class*="language-"],\r\n pre[class*="language-"] {\r\n background: transparent !important;\r\n text-shadow: none !important;\r\n }\r\n .token.operator,\r\n .token.entity,\r\n .token.url,\r\n .language-css .token.string,\r\n .style .token.string {\r\n background: transparent !important;\r\n }\r\n }\r\n}\r\n\r\n.chat-stop {\r\n margin-left: 1rem;\r\n border: none;\r\n outline: none;\r\n background-color: #ff4d4f;\r\n cursor: pointer;\r\n font-weight: bold;\r\n color: #fff;\r\n border-radius: 4px;\r\n height: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n padding: 8px 16px;\r\n font-size: 14px;\r\n}\r\n'],sourceRoot:""}]);const l=i},195:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(537),o=n.n(r),a=n(645),i=n.n(a)()(o());i.push([e.id,".chat-box-wrapper .chatbox{display:flex;flex-direction:column;height:100%}.chat-box-wrapper .chatbox .chat-body{flex:1 1 auto;overflow-y:auto;padding:2rem 1rem}.chat-box-wrapper .chatbox .chat-body .chat-message{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:1rem}.chat-box-wrapper .chatbox .chat-body .chat-message .chat-content{padding:.5rem 1rem;border-radius:.5rem;background-color:#f1f1f0;max-width:80%;word-break:break-word}.chat-box-wrapper .chatbox .chat-body .chat-message .chat-content .timestamp{font-size:.75rem;color:#999;margin-top:.25rem}.chat-box-wrapper .chatbox .chat-body .chat-message.user{align-items:flex-end}.chat-box-wrapper .chatbox .chat-body .chat-message.user .chat-content{background:#45c98d;color:#fff}.chat-box-wrapper .chatbox .chat-body .chat-message.user .chat-content .timestamp{color:#fff}.chat-box-wrapper .chatbox .chat-body .chat-message img{max-width:100%;width:100%;margin:12px auto;display:block}.chat-box-wrapper pre>div:first-child{border:unset !important}.regenerate-button{background-color:#fff;color:#000;padding:8px 16px;border:none;border-radius:5px;cursor:pointer;font-size:14px;transition:background-color .3s ease;display:flex;align-items:center;gap:6px;justify-content:center;box-shadow:0 0 4px rgba(0,0,0,.1);font-weight:600}.regenerate-button:hover{box-shadow:0 0 8px rgba(0,0,0,.1)}","",{version:3,sources:["webpack://./src/components/error-message/styles.scss"],names:[],mappings:"AACE,2BACE,YAAA,CACA,qBAAA,CACA,WAAA,CACA,sCACE,aAAA,CACA,eAAA,CACA,iBAAA,CAGA,oDACE,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,kBAAA,CACA,kEACE,kBAAA,CACA,mBAAA,CACA,wBAAA,CACA,aAAA,CACA,qBAAA,CACA,6EACE,gBAAA,CACA,UAAA,CACA,iBAAA,CAGJ,yDACE,oBAAA,CACA,uEACE,kBAAA,CACA,UAAA,CACA,kFACE,UAAA,CAIN,wDACE,cAAA,CACA,UAAA,CACA,gBAAA,CACA,aAAA,CAKR,sCACE,uBAAA,CAGJ,mBACE,qBAAA,CACA,UAAA,CACA,gBAAA,CACA,WAAA,CACA,iBAAA,CACA,cAAA,CACA,cAAA,CACA,oCAAA,CACA,YAAA,CACA,kBAAA,CACA,OAAA,CACA,sBAAA,CACA,iCAAA,CACA,eAAA,CAEA,yBACE,iCAAA",sourcesContent:[".chat-box-wrapper {\r\n .chatbox {\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n .chat-body {\r\n flex: 1 1 auto;\r\n overflow-y: auto;\r\n padding: 2rem 1rem;\r\n // scrollbar-gutter: stable;\r\n\r\n .chat-message {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: flex-start;\r\n margin-bottom: 1rem;\r\n .chat-content {\r\n padding: 0.5rem 1rem;\r\n border-radius: 0.5rem;\r\n background-color: #f1f1f0;\r\n max-width: 80%;\r\n word-break: break-word;\r\n .timestamp {\r\n font-size: 0.75rem;\r\n color: #999;\r\n margin-top: 0.25rem;\r\n }\r\n }\r\n &.user {\r\n align-items: flex-end;\r\n .chat-content {\r\n background: #45c98d;\r\n color: #fff;\r\n .timestamp {\r\n color: #fff;\r\n }\r\n }\r\n }\r\n img {\r\n max-width: 100%;\r\n width: 100%;\r\n margin: 12px auto;\r\n display: block;\r\n }\r\n }\r\n }\r\n }\r\n pre > div:first-child {\r\n border: unset !important;\r\n }\r\n}\r\n.regenerate-button {\r\n background-color: #fff;\r\n color: #000;\r\n padding: 8px 16px;\r\n border: none;\r\n border-radius: 5px;\r\n cursor: pointer;\r\n font-size: 14px;\r\n transition: background-color 0.3s ease;\r\n display: flex;\r\n align-items: center;\r\n gap: 6px;\r\n justify-content: center;\r\n box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);\r\n font-weight: 600;\r\n\r\n &:hover {\r\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);\r\n }\r\n}\r\n"],sourceRoot:""}]);const l=i},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var l=0;l<this.length;l++){var c=this[l][0];null!=c&&(i[c]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);r&&i[u[0]]||(void 0!==a&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=a),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},537:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),a="/*# ".concat(o," */");return[t].concat([a]).join("\n")}return[t].join("\n")}},470:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},i=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,o=t.call(e,"constructor"),a=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!a)return!1;for(r in e);return void 0===r||t.call(e,r)},l=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,s,u,f=arguments[0],d=1,p=arguments.length,h=!1;for("boolean"==typeof f&&(h=f,f=arguments[1]||{},d=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)r=c(f,n),f!==(o=c(t,n))&&(h&&o&&(i(o)||(s=a(o)))?(s?(s=!1,u=r&&a(r)?r:[]):u=r&&i(r)?r:{},l(f,{name:n,newValue:e(h,u,o)})):void 0!==o&&l(f,{name:n,newValue:o}));return f}},679:(e,t,n)=>{"use strict";var r=n(864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function c(e){return r.isMemo(e)?i:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var s=Object.defineProperty,u=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var i=u(n);f&&(i=i.concat(f(n)));for(var l=c(t),g=c(n),m=0;m<i.length;++m){var b=i[m];if(!(a[b]||r&&r[b]||g&&g[b]||l&&l[b])){var y=d(n,b);try{s(t,b,y)}catch(e){}}}}return t}},139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,s="";function u(e){return e?e.replace(c,s):s}e.exports=function(e,c){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];c=c||{};var f=1,d=1;function p(e){var t=e.match(n);t&&(f+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function h(){var e={line:f,column:d};return function(t){return t.position=new g(e),v(),t}}function g(e){this.start=e,this.end={line:f,column:d},this.source=c.source}g.prototype.content=e;var m=[];function b(t){var n=new Error(c.source+":"+f+":"+d+": "+t);if(n.reason=t,n.filename=c.source,n.line=f,n.column=d,n.source=e,!c.silent)throw n;m.push(n)}function y(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function v(){y(r)}function A(e){var t;for(e=e||[];t=k();)!1!==t&&e.push(t);return e}function k(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;s!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,s===e.charAt(n-1))return b("End of comment missing");var r=e.slice(2,n-2);return d+=2,p(r),e=e.slice(n),d+=2,t({type:"comment",comment:r})}}function w(){var e=h(),n=y(o);if(n){if(k(),!y(a))return b("property missing ':'");var r=y(i),c=e({type:"declaration",property:u(n[0].replace(t,s)),value:r?u(r[0].replace(t,s)):s});return y(l),c}}return v(),function(){var e,t=[];for(A(t);e=w();)!1!==e&&(t.push(e),A(t));return t}()}},738:e=>{e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},660:(e,t,n)=>{var r=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,a;switch(n=n||{},o.util.type(t)){case"Object":if(a=o.util.objId(t),n[a])return n[a];for(var i in r={},n[a]=r,t)t.hasOwnProperty(i)&&(r[i]=e(t[i],n));return r;case"Array":return a=o.util.objId(t),n[a]?n[a]:(r=[],n[a]=r,t.forEach((function(t,o){r[o]=e(t,n)})),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var a=(r=r||o.languages)[e],i={};for(var l in a)if(a.hasOwnProperty(l)){if(l==t)for(var c in n)n.hasOwnProperty(c)&&(i[c]=n[c]);n.hasOwnProperty(l)||(i[l]=a[l])}var s=r[e];return r[e]=i,o.languages.DFS(o.languages,(function(t,n){n===s&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,r,a){a=a||{};var i=o.util.objId;for(var l in t)if(t.hasOwnProperty(l)){n.call(t,l,t[l],r||l);var c=t[l],s=o.util.type(c);"Object"!==s||a[i(c)]?"Array"!==s||a[i(c)]||(a[i(c)]=!0,e(c,n,l,a)):(a[i(c)]=!0,e(c,n,null,a))}}},plugins:{},highlightAll:function(e,t){o.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var a,i=0;a=r.elements[i++];)o.highlightElement(a,!0===t,r.callback)},highlightElement:function(t,n,r){var a=o.util.getLanguage(t),i=o.languages[a];o.util.setLanguage(t,a);var l=t.parentElement;l&&"pre"===l.nodeName.toLowerCase()&&o.util.setLanguage(l,a);var c={element:t,language:a,grammar:i,code:t.textContent};function s(e){c.highlightedCode=e,o.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,o.hooks.run("after-highlight",c),o.hooks.run("complete",c),r&&r.call(c.element)}if(o.hooks.run("before-sanity-check",c),(l=c.element.parentElement)&&"pre"===l.nodeName.toLowerCase()&&!l.hasAttribute("tabindex")&&l.setAttribute("tabindex","0"),!c.code)return o.hooks.run("complete",c),void(r&&r.call(c.element));if(o.hooks.run("before-highlight",c),c.grammar)if(n&&e.Worker){var u=new Worker(o.filename);u.onmessage=function(e){s(e.data)},u.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else s(o.highlight(c.code,c.grammar,c.language));else s(o.util.encode(c.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(o.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),a.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new c;return s(o,o.head,e),l(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,a=0;r=n[a++];)r(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function i(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var a=o[1].length;o.index+=a,o[0]=o[0].slice(a)}return o}function l(e,t,n,r,c,f){for(var d in n)if(n.hasOwnProperty(d)&&n[d]){var p=n[d];p=Array.isArray(p)?p:[p];for(var h=0;h<p.length;++h){if(f&&f.cause==d+","+h)return;var g=p[h],m=g.inside,b=!!g.lookbehind,y=!!g.greedy,v=g.alias;if(y&&!g.pattern.global){var A=g.pattern.toString().match(/[imsuy]*$/)[0];g.pattern=RegExp(g.pattern.source,A+"g")}for(var k=g.pattern||g,w=r.next,x=c;w!==t.tail&&!(f&&x>=f.reach);x+=w.value.length,w=w.next){var C=w.value;if(t.length>e.length)return;if(!(C instanceof a)){var S,E=1;if(y){if(!(S=i(k,x,e,b))||S.index>=e.length)break;var O=S.index,z=S.index+S[0].length,P=x;for(P+=w.value.length;O>=P;)P+=(w=w.next).value.length;if(x=P-=w.value.length,w.value instanceof a)continue;for(var F=w;F!==t.tail&&(P<z||"string"==typeof F.value);F=F.next)E++,P+=F.value.length;E--,C=e.slice(x,P),S.index-=x}else if(!(S=i(k,0,C,b)))continue;O=S.index;var T=S[0],L=C.slice(0,O),B=C.slice(O+T.length),_=x+C.length;f&&_>f.reach&&(f.reach=_);var j=w.prev;if(L&&(j=s(t,j,L),x+=L.length),u(t,j,E),w=s(t,j,new a(d,m?o.tokenize(T,m):T,v,T)),B&&s(t,w,B),E>1){var N={cause:d+","+h,reach:_};l(e,t,n,w.prev,x,N),f&&N.reach>f.reach&&(f.reach=N.reach)}}}}}}function c(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function u(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}if(e.Prism=o,a.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach((function(t){r+=e(t,n)})),r}var a={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(a.classes,i):a.classes.push(i)),o.hooks.run("wrap",a);var l="";for(var c in a.attributes)l+=" "+c+'="'+(a.attributes[c]||"").replace(/"/g,""")+'"';return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+l+">"+a.content+"</"+a.tag+">"},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,i=n.immediateClose;e.postMessage(o.highlight(a,o.languages[r],r)),i&&e.close()}),!1),o):o;var f=o.util.currentScript();function d(){o.manual||o.highlightAll()}if(f&&(o.filename=f.src,f.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var p=document.readyState;"loading"===p||"interactive"===p&&f&&f.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=r),void 0!==n.g&&(n.g.Prism=r),r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};o["language-"+t]={pattern:/[\s\S]+/,inside:r.languages[t]};var a={};a[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:o},r.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(e,t){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:r.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(){if(void 0!==r&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},t="data-src-status",n="loading",o="loaded",a="pre[data-src]:not(["+t+'="'+o+'"]):not(['+t+'="'+n+'"])';r.hooks.add("before-highlightall",(function(e){e.selector+=", "+a})),r.hooks.add("before-sanity-check",(function(i){var l=i.element;if(l.matches(a)){i.code="",l.setAttribute(t,n);var c=l.appendChild(document.createElement("CODE"));c.textContent="Loading…";var s=l.getAttribute("data-src"),u=i.language;if("none"===u){var f=(/\.(\w+)$/.exec(s)||[,"none"])[1];u=e[f]||f}r.util.setLanguage(c,u),r.util.setLanguage(l,u);var d=r.plugins.autoloader;d&&d.loadLanguages(u),function(e,n,a){var i=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status<400&&i.responseText?function(e){l.setAttribute(t,o);var n=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],o=t[3];return r?o?[n,Number(o)]:[n,void 0]:[n,n]}}(l.getAttribute("data-range"));if(n){var a=e.split(/\r\n?|\n/g),i=n[0],s=null==n[1]?a.length:n[1];i<0&&(i+=a.length),i=Math.max(0,Math.min(i-1,a.length)),s<0&&(s+=a.length),s=Math.max(0,Math.min(s,a.length)),e=a.slice(i,s).join("\n"),l.hasAttribute("data-start")||l.setAttribute("data-start",String(i+1))}c.textContent=e,r.highlightElement(c)}(i.responseText):i.status>=400?a("✖ Error "+i.status+" while fetching file: "+i.statusText):a("✖ Error: File does not exist or is empty"))},i.send(null)}(s,0,(function(e){l.setAttribute(t,"failed"),c.textContent=e}))}})),r.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(a),o=0;t=n[o++];)r.highlightElement(t)}};var i=!1;r.fileHighlight=function(){i||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),i=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}}()},703:(e,t,n)=>{"use strict";var r=n(414);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},448:(e,t,n)=>{"use strict";var r=n(294),o=n(840);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,l={};function c(e,t){s(e,t),s(e+"Capture",t)}function s(e,t){for(l[e]=t,e=0;e<t.length;e++)i.add(t[e])}var u=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),f=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},h={};function g(e,t,n,r,o,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var b=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function v(e,t,n,r){var o=m.hasOwnProperty(t)?m[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!f.call(h,e)||!f.call(p,e)&&(d.test(e)?h[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(b,y);m[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(b,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(b,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var A=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),w=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),O=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),L=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var B=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var _=Symbol.iterator;function j(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=_&&e[_]||e["@@iterator"])?e:null}var N,M=Object.assign;function I(e){if(void 0===N)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);N=t&&t[1]||""}return"\n"+N+e}var D=!1;function R(e,t){if(!e||D)return"";D=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var o=t.stack.split("\n"),a=r.stack.split("\n"),i=o.length-1,l=a.length-1;1<=i&&0<=l&&o[i]!==a[l];)l--;for(;1<=i&&0<=l;i--,l--)if(o[i]!==a[l]){if(1!==i||1!==l)do{if(i--,0>--l||o[i]!==a[l]){var c="\n"+o[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=i&&0<=l);break}}}finally{D=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?I(e):""}function H(e){switch(e.tag){case 5:return I(e.type);case 16:return I("Lazy");case 13:return I("Suspense");case 19:return I("SuspenseList");case 0:case 2:case 15:return R(e.type,!1);case 11:return R(e.type.render,!1);case 1:return R(e.type,!0);default:return""}}function U(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return"Fragment";case w:return"Portal";case S:return"Profiler";case C:return"StrictMode";case P:return"Suspense";case F:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case E:return(e._context.displayName||"Context")+".Provider";case z:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case T:return null!==(t=e.displayName||null)?t:U(e.type)||"Memo";case L:t=e._payload,e=e._init;try{return U(e(t))}catch(e){}}return null}function W(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(t);case 8:return t===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function $(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function q(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Y(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=V(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function G(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return M({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Z(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=$(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function K(e,t){null!=(t=t.checked)&&v(e,"checked",t,!1)}function X(e,t){K(e,t);var n=$(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,$(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&G(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+$(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return M({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:$(n)}}function ae(e,t){var n=$(t.value),r=$(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function le(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ce(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?le(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var se,ue,fe=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((se=se||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=se.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function de(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(pe).forEach((function(e){he.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var be=M({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(be[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function ve(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ae=null;function ke(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var we=null,xe=null,Ce=null;function Se(e){if(e=Ao(e)){if("function"!=typeof we)throw Error(a(280));var t=e.stateNode;t&&(t=wo(t),we(e.stateNode,e.type,t))}}function Ee(e){xe?Ce?Ce.push(e):Ce=[e]:xe=e}function Oe(){if(xe){var e=xe,t=Ce;if(Ce=xe=null,Se(e),t)for(e=0;e<t.length;e++)Se(t[e])}}function ze(e,t){return e(t)}function Pe(){}var Fe=!1;function Te(e,t,n){if(Fe)return e(t,n);Fe=!0;try{return ze(e,t,n)}finally{Fe=!1,(null!==xe||null!==Ce)&&(Pe(),Oe())}}function Le(e,t){var n=e.stateNode;if(null===n)return null;var r=wo(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Be=!1;if(u)try{var _e={};Object.defineProperty(_e,"passive",{get:function(){Be=!0}}),window.addEventListener("test",_e,_e),window.removeEventListener("test",_e,_e)}catch(ue){Be=!1}function je(e,t,n,r,o,a,i,l,c){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){this.onError(e)}}var Ne=!1,Me=null,Ie=!1,De=null,Re={onError:function(e){Ne=!0,Me=e}};function He(e,t,n,r,o,a,i,l,c){Ne=!1,Me=null,je.apply(Re,arguments)}function Ue(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function We(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function $e(e){if(Ue(e)!==e)throw Error(a(188))}function Ve(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ue(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return $e(o),e;if(i===r)return $e(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var l=!1,c=o.child;c;){if(c===n){l=!0,n=o,r=i;break}if(c===r){l=!0,r=o,n=i;break}c=c.sibling}if(!l){for(c=i.child;c;){if(c===n){l=!0,n=i,r=o;break}if(c===r){l=!0,r=i,n=o;break}c=c.sibling}if(!l)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?qe(e):null}function qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=qe(e);if(null!==t)return t;e=e.sibling}return null}var Ye=o.unstable_scheduleCallback,Ge=o.unstable_cancelCallback,Qe=o.unstable_shouldYield,Ze=o.unstable_requestPaint,Ke=o.unstable_now,Xe=o.unstable_getCurrentPriorityLevel,Je=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,nt=o.unstable_LowPriority,rt=o.unstable_IdlePriority,ot=null,at=null,it=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(lt(e)/ct|0)|0},lt=Math.log,ct=Math.LN2,st=64,ut=4194304;function ft(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,i=268435455&n;if(0!==i){var l=i&~o;0!==l?r=ft(l):0!=(a&=i)&&(r=ft(a))}else 0!=(i=n&~o)?r=ft(i):0!==a&&(r=ft(a));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&o)&&((o=r&-r)>=(a=t&-t)||16===o&&0!=(4194240&a)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-it(t)),r|=e[n],t&=~o;return r}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ht(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=st;return 0==(4194240&(st<<=1))&&(st=64),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function bt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-it(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-it(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var vt=0;function At(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var kt,wt,xt,Ct,St,Et=!1,Ot=[],zt=null,Pt=null,Ft=null,Tt=new Map,Lt=new Map,Bt=[],_t="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function jt(e,t){switch(e){case"focusin":case"focusout":zt=null;break;case"dragenter":case"dragleave":Pt=null;break;case"mouseover":case"mouseout":Ft=null;break;case"pointerover":case"pointerout":Tt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lt.delete(t.pointerId)}}function Nt(e,t,n,r,o,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[o]},null!==t&&null!==(t=Ao(t))&&wt(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Mt(e){var t=vo(e.target);if(null!==t){var n=Ue(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=We(n)))return e.blockedOn=t,void St(e.priority,(function(){xt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function It(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Ao(n))&&wt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Ae=r,n.target.dispatchEvent(r),Ae=null,t.shift()}return!0}function Dt(e,t,n){It(e)&&n.delete(t)}function Rt(){Et=!1,null!==zt&&It(zt)&&(zt=null),null!==Pt&&It(Pt)&&(Pt=null),null!==Ft&&It(Ft)&&(Ft=null),Tt.forEach(Dt),Lt.forEach(Dt)}function Ht(e,t){e.blockedOn===t&&(e.blockedOn=null,Et||(Et=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Rt)))}function Ut(e){function t(t){return Ht(t,e)}if(0<Ot.length){Ht(Ot[0],e);for(var n=1;n<Ot.length;n++){var r=Ot[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==zt&&Ht(zt,e),null!==Pt&&Ht(Pt,e),null!==Ft&&Ht(Ft,e),Tt.forEach(t),Lt.forEach(t),n=0;n<Bt.length;n++)(r=Bt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Bt.length&&null===(n=Bt[0]).blockedOn;)Mt(n),null===n.blockedOn&&Bt.shift()}var Wt=A.ReactCurrentBatchConfig,$t=!0;function Vt(e,t,n,r){var o=vt,a=Wt.transition;Wt.transition=null;try{vt=1,Yt(e,t,n,r)}finally{vt=o,Wt.transition=a}}function qt(e,t,n,r){var o=vt,a=Wt.transition;Wt.transition=null;try{vt=4,Yt(e,t,n,r)}finally{vt=o,Wt.transition=a}}function Yt(e,t,n,r){if($t){var o=Qt(e,t,n,r);if(null===o)$r(e,t,r,Gt,n),jt(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return zt=Nt(zt,e,t,n,r,o),!0;case"dragenter":return Pt=Nt(Pt,e,t,n,r,o),!0;case"mouseover":return Ft=Nt(Ft,e,t,n,r,o),!0;case"pointerover":var a=o.pointerId;return Tt.set(a,Nt(Tt.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":return a=o.pointerId,Lt.set(a,Nt(Lt.get(a)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(jt(e,r),4&t&&-1<_t.indexOf(e)){for(;null!==o;){var a=Ao(o);if(null!==a&&kt(a),null===(a=Qt(e,t,n,r))&&$r(e,t,r,Gt,n),a===o)break;o=a}null!==o&&r.stopPropagation()}else $r(e,t,r,null,n)}}var Gt=null;function Qt(e,t,n,r){if(Gt=null,null!==(e=vo(e=ke(r))))if(null===(t=Ue(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=We(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gt=e,null}function Zt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case Je:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Kt=null,Xt=null,Jt=null;function en(){if(Jt)return Jt;var e,t,n=Xt,r=n.length,o="value"in Kt?Kt.value:Kt.textContent,a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return Jt=o.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,o,a){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(o):o[i]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return M(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,ln,cn,sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(sn),fn=M({},sn,{view:0,detail:0}),dn=on(fn),pn=M({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cn&&(cn&&"mousemove"===e.type?(an=e.screenX-cn.screenX,ln=e.screenY-cn.screenY):ln=an=0,cn=e),an)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),hn=on(pn),gn=on(M({},pn,{dataTransfer:0})),mn=on(M({},fn,{relatedTarget:0})),bn=on(M({},sn,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=M({},sn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vn=on(yn),An=on(M({},sn,{data:0})),kn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=xn[e])&&!!t[e]}function Sn(){return Cn}var En=M({},fn,{key:function(e){if(e.key){var t=kn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?wn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),On=on(En),zn=on(M({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Pn=on(M({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sn})),Fn=on(M({},sn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Tn=M({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ln=on(Tn),Bn=[9,13,27,32],_n=u&&"CompositionEvent"in window,jn=null;u&&"documentMode"in document&&(jn=document.documentMode);var Nn=u&&"TextEvent"in window&&!jn,Mn=u&&(!_n||jn&&8<jn&&11>=jn),In=String.fromCharCode(32),Dn=!1;function Rn(e,t){switch(e){case"keyup":return-1!==Bn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1,Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function Vn(e,t,n,r){Ee(r),0<(t=qr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Yn=null;function Gn(e){Ir(e,0)}function Qn(e){if(Y(ko(e)))return e}function Zn(e,t){if("change"===e)return t}var Kn=!1;if(u){var Xn;if(u){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"==typeof er.oninput}Xn=Jn}else Xn=!1;Kn=Xn&&(!document.documentMode||9<document.documentMode)}function tr(){qn&&(qn.detachEvent("onpropertychange",nr),Yn=qn=null)}function nr(e){if("value"===e.propertyName&&Qn(Yn)){var t=[];Vn(t,Yn,e,ke(e)),Te(Gn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Yn=n,(qn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Qn(Yn)}function ar(e,t){if("click"===e)return Qn(t)}function ir(e,t){if("input"===e||"change"===e)return Qn(t)}var lr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function cr(e,t){if(lr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!f.call(t,o)||!lr(e[o],t[o]))return!1}return!0}function sr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=sr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=sr(r)}}function fr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dr(){for(var e=window,t=G();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=G((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function hr(e){var t=dr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&fr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(r.start,o);r=void 0===r.end?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=ur(n,a);var i=ur(n,r);o&&i&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gr=u&&"documentMode"in document&&11>=document.documentMode,mr=null,br=null,yr=null,vr=!1;function Ar(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;vr||null==mr||mr!==G(r)||(r="selectionStart"in(r=mr)&&pr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&cr(yr,r)||(yr=r,0<(r=qr(br,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}function kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var wr={animationend:kr("Animation","AnimationEnd"),animationiteration:kr("Animation","AnimationIteration"),animationstart:kr("Animation","AnimationStart"),transitionend:kr("Transition","TransitionEnd")},xr={},Cr={};function Sr(e){if(xr[e])return xr[e];if(!wr[e])return e;var t,n=wr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Cr)return xr[e]=n[t];return e}u&&(Cr=document.createElement("div").style,"AnimationEvent"in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),"TransitionEvent"in window||delete wr.transitionend.transition);var Er=Sr("animationend"),Or=Sr("animationiteration"),zr=Sr("animationstart"),Pr=Sr("transitionend"),Fr=new Map,Tr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Lr(e,t){Fr.set(e,t),c(t,[e])}for(var Br=0;Br<Tr.length;Br++){var _r=Tr[Br];Lr(_r.toLowerCase(),"on"+(_r[0].toUpperCase()+_r.slice(1)))}Lr(Er,"onAnimationEnd"),Lr(Or,"onAnimationIteration"),Lr(zr,"onAnimationStart"),Lr("dblclick","onDoubleClick"),Lr("focusin","onFocus"),Lr("focusout","onBlur"),Lr(Pr,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Nr=new Set("cancel close invalid load scroll toggle".split(" ").concat(jr));function Mr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,l,c,s){if(He.apply(this,arguments),Ne){if(!Ne)throw Error(a(198));var u=Me;Ne=!1,Me=null,Ie||(Ie=!0,De=u)}}(r,t,void 0,e),e.currentTarget=null}function Ir(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],c=l.instance,s=l.currentTarget;if(l=l.listener,c!==a&&o.isPropagationStopped())break e;Mr(o,l,s),a=c}else for(i=0;i<r.length;i++){if(c=(l=r[i]).instance,s=l.currentTarget,l=l.listener,c!==a&&o.isPropagationStopped())break e;Mr(o,l,s),a=c}}}if(Ie)throw e=De,Ie=!1,De=null,e}function Dr(e,t){var n=t[mo];void 0===n&&(n=t[mo]=new Set);var r=e+"__bubble";n.has(r)||(Wr(t,e,2,!1),n.add(r))}function Rr(e,t,n){var r=0;t&&(r|=4),Wr(n,e,r,t)}var Hr="_reactListening"+Math.random().toString(36).slice(2);function Ur(e){if(!e[Hr]){e[Hr]=!0,i.forEach((function(t){"selectionchange"!==t&&(Nr.has(t)||Rr(t,!1,e),Rr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Hr]||(t[Hr]=!0,Rr("selectionchange",!1,t))}}function Wr(e,t,n,r){switch(Zt(t)){case 1:var o=Vt;break;case 4:o=qt;break;default:o=Yt}n=o.bind(null,t,n,e),o=void 0,!Be||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function $r(e,t,n,r,o){var a=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var l=r.stateNode.containerInfo;if(l===o||8===l.nodeType&&l.parentNode===o)break;if(4===i)for(i=r.return;null!==i;){var c=i.tag;if((3===c||4===c)&&((c=i.stateNode.containerInfo)===o||8===c.nodeType&&c.parentNode===o))return;i=i.return}for(;null!==l;){if(null===(i=vo(l)))return;if(5===(c=i.tag)||6===c){r=a=i;continue e}l=l.parentNode}}r=r.return}Te((function(){var r=a,o=ke(n),i=[];e:{var l=Fr.get(e);if(void 0!==l){var c=un,s=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":c=On;break;case"focusin":s="focus",c=mn;break;case"focusout":s="blur",c=mn;break;case"beforeblur":case"afterblur":c=mn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=hn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=Pn;break;case Er:case Or:case zr:c=bn;break;case Pr:c=Fn;break;case"scroll":c=dn;break;case"wheel":c=Ln;break;case"copy":case"cut":case"paste":c=vn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=zn}var u=0!=(4&t),f=!u&&"scroll"===e,d=u?null!==l?l+"Capture":null:l;u=[];for(var p,h=r;null!==h;){var g=(p=h).stateNode;if(5===p.tag&&null!==g&&(p=g,null!==d&&null!=(g=Le(h,d))&&u.push(Vr(h,g,p))),f)break;h=h.return}0<u.length&&(l=new c(l,s,null,n,o),i.push({event:l,listeners:u}))}}if(0==(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===Ae||!(s=n.relatedTarget||n.fromElement)||!vo(s)&&!s[go])&&(c||l)&&(l=o.window===o?o:(l=o.ownerDocument)?l.defaultView||l.parentWindow:window,c?(c=r,null!==(s=(s=n.relatedTarget||n.toElement)?vo(s):null)&&(s!==(f=Ue(s))||5!==s.tag&&6!==s.tag)&&(s=null)):(c=null,s=r),c!==s)){if(u=hn,g="onMouseLeave",d="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=zn,g="onPointerLeave",d="onPointerEnter",h="pointer"),f=null==c?l:ko(c),p=null==s?l:ko(s),(l=new u(g,h+"leave",c,n,o)).target=f,l.relatedTarget=p,g=null,vo(o)===r&&((u=new u(d,h+"enter",s,n,o)).target=p,u.relatedTarget=f,g=u),f=g,c&&s)e:{for(d=s,h=0,p=u=c;p;p=Yr(p))h++;for(p=0,g=d;g;g=Yr(g))p++;for(;0<h-p;)u=Yr(u),h--;for(;0<p-h;)d=Yr(d),p--;for(;h--;){if(u===d||null!==d&&u===d.alternate)break e;u=Yr(u),d=Yr(d)}u=null}else u=null;null!==c&&Gr(i,l,c,u,!1),null!==s&&null!==f&&Gr(i,f,s,u,!0)}if("select"===(c=(l=r?ko(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===c&&"file"===l.type)var m=Zn;else if($n(l))if(Kn)m=ir;else{m=or;var b=rr}else(c=l.nodeName)&&"input"===c.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(m=ar);switch(m&&(m=m(e,r))?Vn(i,m,n,o):(b&&b(e,l,r),"focusout"===e&&(b=l._wrapperState)&&b.controlled&&"number"===l.type&&ee(l,"number",l.value)),b=r?ko(r):window,e){case"focusin":($n(b)||"true"===b.contentEditable)&&(mr=b,br=r,yr=null);break;case"focusout":yr=br=mr=null;break;case"mousedown":vr=!0;break;case"contextmenu":case"mouseup":case"dragend":vr=!1,Ar(i,n,o);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":Ar(i,n,o)}var y;if(_n)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else Un?Rn(e,n)&&(v="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(v="onCompositionStart");v&&(Mn&&"ko"!==n.locale&&(Un||"onCompositionStart"!==v?"onCompositionEnd"===v&&Un&&(y=en()):(Xt="value"in(Kt=o)?Kt.value:Kt.textContent,Un=!0)),0<(b=qr(r,v)).length&&(v=new An(v,e,null,n,o),i.push({event:v,listeners:b}),(y||null!==(y=Hn(n)))&&(v.data=y))),(y=Nn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Dn=!0,In);case"textInput":return(e=t.data)===In&&Dn?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!_n&&Rn(e,t)?(e=en(),Jt=Xt=Kt=null,Un=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Mn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=qr(r,"onBeforeInput")).length&&(o=new An("onBeforeInput","beforeinput",null,n,o),i.push({event:o,listeners:r}),o.data=y)}Ir(i,t)}))}function Vr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,a=o.stateNode;5===o.tag&&null!==a&&(o=a,null!=(a=Le(e,n))&&r.unshift(Vr(e,a,o)),null!=(a=Le(e,t))&&r.push(Vr(e,a,o))),e=e.return}return r}function Yr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Gr(e,t,n,r,o){for(var a=t._reactName,i=[];null!==n&&n!==r;){var l=n,c=l.alternate,s=l.stateNode;if(null!==c&&c===r)break;5===l.tag&&null!==s&&(l=s,o?null!=(c=Le(n,a))&&i.unshift(Vr(n,c,l)):o||null!=(c=Le(n,a))&&i.push(Vr(n,c,l))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var Qr=/\r\n?/g,Zr=/\u0000|\uFFFD/g;function Kr(e){return("string"==typeof e?e:""+e).replace(Qr,"\n").replace(Zr,"")}function Xr(e,t,n){if(t=Kr(t),Kr(e)!==t&&n)throw Error(a(425))}function Jr(){}var eo=null,to=null;function no(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ro="function"==typeof setTimeout?setTimeout:void 0,oo="function"==typeof clearTimeout?clearTimeout:void 0,ao="function"==typeof Promise?Promise:void 0,io="function"==typeof queueMicrotask?queueMicrotask:void 0!==ao?function(e){return ao.resolve(null).then(e).catch(lo)}:ro;function lo(e){setTimeout((function(){throw e}))}function co(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Ut(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Ut(t)}function so(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function uo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var fo=Math.random().toString(36).slice(2),po="__reactFiber$"+fo,ho="__reactProps$"+fo,go="__reactContainer$"+fo,mo="__reactEvents$"+fo,bo="__reactListeners$"+fo,yo="__reactHandles$"+fo;function vo(e){var t=e[po];if(t)return t;for(var n=e.parentNode;n;){if(t=n[go]||n[po]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=uo(e);null!==e;){if(n=e[po])return n;e=uo(e)}return t}n=(e=n).parentNode}return null}function Ao(e){return!(e=e[po]||e[go])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ko(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function wo(e){return e[ho]||null}var xo=[],Co=-1;function So(e){return{current:e}}function Eo(e){0>Co||(e.current=xo[Co],xo[Co]=null,Co--)}function Oo(e,t){Co++,xo[Co]=e.current,e.current=t}var zo={},Po=So(zo),Fo=So(!1),To=zo;function Lo(e,t){var n=e.type.contextTypes;if(!n)return zo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Bo(e){return null!=e.childContextTypes}function _o(){Eo(Fo),Eo(Po)}function jo(e,t,n){if(Po.current!==zo)throw Error(a(168));Oo(Po,t),Oo(Fo,n)}function No(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(a(108,W(e)||"Unknown",o));return M({},n,r)}function Mo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||zo,To=Po.current,Oo(Po,e),Oo(Fo,Fo.current),!0}function Io(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=No(e,t,To),r.__reactInternalMemoizedMergedChildContext=e,Eo(Fo),Eo(Po),Oo(Po,e)):Eo(Fo),Oo(Fo,n)}var Do=null,Ro=!1,Ho=!1;function Uo(e){null===Do?Do=[e]:Do.push(e)}function Wo(){if(!Ho&&null!==Do){Ho=!0;var e=0,t=vt;try{var n=Do;for(vt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Do=null,Ro=!1}catch(t){throw null!==Do&&(Do=Do.slice(e+1)),Ye(Je,Wo),t}finally{vt=t,Ho=!1}}return null}var $o=[],Vo=0,qo=null,Yo=0,Go=[],Qo=0,Zo=null,Ko=1,Xo="";function Jo(e,t){$o[Vo++]=Yo,$o[Vo++]=qo,qo=e,Yo=t}function ea(e,t,n){Go[Qo++]=Ko,Go[Qo++]=Xo,Go[Qo++]=Zo,Zo=e;var r=Ko;e=Xo;var o=32-it(r)-1;r&=~(1<<o),n+=1;var a=32-it(t)+o;if(30<a){var i=o-o%5;a=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Ko=1<<32-it(t)+o|n<<o|r,Xo=a+e}else Ko=1<<a|n<<o|r,Xo=e}function ta(e){null!==e.return&&(Jo(e,1),ea(e,1,0))}function na(e){for(;e===qo;)qo=$o[--Vo],$o[Vo]=null,Yo=$o[--Vo],$o[Vo]=null;for(;e===Zo;)Zo=Go[--Qo],Go[Qo]=null,Xo=Go[--Qo],Go[Qo]=null,Ko=Go[--Qo],Go[Qo]=null}var ra=null,oa=null,aa=!1,ia=null;function la(e,t){var n=Ls(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ca(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ra=e,oa=so(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ra=e,oa=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Zo?{id:Ko,overflow:Xo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ls(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ra=e,oa=null,!0);default:return!1}}function sa(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function ua(e){if(aa){var t=oa;if(t){var n=t;if(!ca(e,t)){if(sa(e))throw Error(a(418));t=so(n.nextSibling);var r=ra;t&&ca(e,t)?la(r,n):(e.flags=-4097&e.flags|2,aa=!1,ra=e)}}else{if(sa(e))throw Error(a(418));e.flags=-4097&e.flags|2,aa=!1,ra=e}}}function fa(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ra=e}function da(e){if(e!==ra)return!1;if(!aa)return fa(e),aa=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!no(e.type,e.memoizedProps)),t&&(t=oa)){if(sa(e))throw pa(),Error(a(418));for(;t;)la(e,t),t=so(t.nextSibling)}if(fa(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){oa=so(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}oa=null}}else oa=ra?so(e.stateNode.nextSibling):null;return!0}function pa(){for(var e=oa;e;)e=so(e.nextSibling)}function ha(){oa=ra=null,aa=!1}function ga(e){null===ia?ia=[e]:ia.push(e)}var ma=A.ReactCurrentBatchConfig;function ba(e,t){if(e&&e.defaultProps){for(var n in t=M({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var ya=So(null),va=null,Aa=null,ka=null;function wa(){ka=Aa=va=null}function xa(e){var t=ya.current;Eo(ya),e._currentValue=t}function Ca(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Sa(e,t){va=e,ka=Aa=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Al=!0),e.firstContext=null)}function Ea(e){var t=e._currentValue;if(ka!==e)if(e={context:e,memoizedValue:t,next:null},null===Aa){if(null===va)throw Error(a(308));Aa=e,va.dependencies={lanes:0,firstContext:e}}else Aa=Aa.next=e;return t}var Oa=null;function za(e){null===Oa?Oa=[e]:Oa.push(e)}function Pa(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,za(t)):(n.next=o.next,o.next=n),t.interleaved=n,Fa(e,r)}function Fa(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ta=!1;function La(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ba(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function _a(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ja(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Pc)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Fa(e,n)}return null===(o=r.interleaved)?(t.next=t,za(r)):(t.next=o.next,o.next=t),r.interleaved=t,Fa(e,n)}function Na(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Ma(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?o=a=i:a=a.next=i,n=n.next}while(null!==n);null===a?o=a=t:a=a.next=t}else o=a=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ia(e,t,n,r){var o=e.updateQueue;Ta=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var c=l,s=c.next;c.next=null,null===i?a=s:i.next=s,i=c;var u=e.alternate;null!==u&&(l=(u=u.updateQueue).lastBaseUpdate)!==i&&(null===l?u.firstBaseUpdate=s:l.next=s,u.lastBaseUpdate=c)}if(null!==a){var f=o.baseState;for(i=0,u=s=c=null,l=a;;){var d=l.lane,p=l.eventTime;if((r&d)===d){null!==u&&(u=u.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var h=e,g=l;switch(d=t,p=n,g.tag){case 1:if("function"==typeof(h=g.payload)){f=h.call(p,f,d);break e}f=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(d="function"==typeof(h=g.payload)?h.call(p,f,d):h))break e;f=M({},f,d);break e;case 2:Ta=!0}}null!==l.callback&&0!==l.lane&&(e.flags|=64,null===(d=o.effects)?o.effects=[l]:d.push(l))}else p={eventTime:p,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===u?(s=u=p,c=f):u=u.next=p,i|=d;if(null===(l=l.next)){if(null===(l=o.shared.pending))break;l=(d=l).next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}if(null===u&&(c=f),o.baseState=c,o.firstBaseUpdate=s,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{i|=o.lane,o=o.next}while(o!==t)}else null===a&&(o.shared.lanes=0);Mc|=i,e.lanes=i,e.memoizedState=f}}function Da(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(a(191,o));o.call(r)}}}var Ra=(new r.Component).refs;function Ha(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:M({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Ua={isMounted:function(e){return!!(e=e._reactInternals)&&Ue(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ts(),o=ns(e),a=_a(r,o);a.payload=t,null!=n&&(a.callback=n),null!==(t=ja(e,a,o))&&(rs(t,e,o,r),Na(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ts(),o=ns(e),a=_a(r,o);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=ja(e,a,o))&&(rs(t,e,o,r),Na(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ts(),r=ns(e),o=_a(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=ja(e,o,r))&&(rs(t,e,r,n),Na(t,e,r))}};function Wa(e,t,n,r,o,a,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,i):!(t.prototype&&t.prototype.isPureReactComponent&&cr(n,r)&&cr(o,a))}function $a(e,t,n){var r=!1,o=zo,a=t.contextType;return"object"==typeof a&&null!==a?a=Ea(a):(o=Bo(t)?To:Po.current,a=(r=null!=(r=t.contextTypes))?Lo(e,o):zo),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Ua,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function Va(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ua.enqueueReplaceState(t,t.state,null)}function qa(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Ra,La(e);var a=t.contextType;"object"==typeof a&&null!==a?o.context=Ea(a):(a=Bo(t)?To:Po.current,o.context=Lo(e,a)),o.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(Ha(e,t,a,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&Ua.enqueueReplaceState(o,o.state,null),Ia(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function Ya(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=r,i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=o.refs;t===Ra&&(t=o.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Ga(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Qa(e){return(0,e._init)(e._payload)}function Za(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=_s(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function l(t){return e&&null===t.alternate&&(t.flags|=2),t}function c(e,t,n,r){return null===t||6!==t.tag?((t=Is(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function s(e,t,n,r){var a=n.type;return a===x?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===L&&Qa(a)===t.type)?((r=o(t,n.props)).ref=Ya(e,t,n),r.return=e,r):((r=js(n.type,n.key,n.props,null,e.mode,r)).ref=Ya(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Ds(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,a){return null===t||7!==t.tag?((t=Ns(n,e.mode,r,a)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Is(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case k:return(n=js(t.type,t.key,t.props,null,e.mode,n)).ref=Ya(e,null,t),n.return=e,n;case w:return(t=Ds(t,e.mode,n)).return=e,t;case L:return d(e,(0,t._init)(t._payload),n)}if(te(t)||j(t))return(t=Ns(t,e.mode,n,null)).return=e,t;Ga(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:c(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case k:return n.key===o?s(e,t,n,r):null;case w:return n.key===o?u(e,t,n,r):null;case L:return p(e,t,(o=n._init)(n._payload),r)}if(te(n)||j(n))return null!==o?null:f(e,t,n,r,null);Ga(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return c(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case k:return s(t,e=e.get(null===r.key?n:r.key)||null,r,o);case w:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case L:return h(e,t,n,(0,r._init)(r._payload),o)}if(te(r)||j(r))return f(t,e=e.get(n)||null,r,o,null);Ga(t,r)}return null}function g(o,a,l,c){for(var s=null,u=null,f=a,g=a=0,m=null;null!==f&&g<l.length;g++){f.index>g?(m=f,f=null):m=f.sibling;var b=p(o,f,l[g],c);if(null===b){null===f&&(f=m);break}e&&f&&null===b.alternate&&t(o,f),a=i(b,a,g),null===u?s=b:u.sibling=b,u=b,f=m}if(g===l.length)return n(o,f),aa&&Jo(o,g),s;if(null===f){for(;g<l.length;g++)null!==(f=d(o,l[g],c))&&(a=i(f,a,g),null===u?s=f:u.sibling=f,u=f);return aa&&Jo(o,g),s}for(f=r(o,f);g<l.length;g++)null!==(m=h(f,o,g,l[g],c))&&(e&&null!==m.alternate&&f.delete(null===m.key?g:m.key),a=i(m,a,g),null===u?s=m:u.sibling=m,u=m);return e&&f.forEach((function(e){return t(o,e)})),aa&&Jo(o,g),s}function m(o,l,c,s){var u=j(c);if("function"!=typeof u)throw Error(a(150));if(null==(c=u.call(c)))throw Error(a(151));for(var f=u=null,g=l,m=l=0,b=null,y=c.next();null!==g&&!y.done;m++,y=c.next()){g.index>m?(b=g,g=null):b=g.sibling;var v=p(o,g,y.value,s);if(null===v){null===g&&(g=b);break}e&&g&&null===v.alternate&&t(o,g),l=i(v,l,m),null===f?u=v:f.sibling=v,f=v,g=b}if(y.done)return n(o,g),aa&&Jo(o,m),u;if(null===g){for(;!y.done;m++,y=c.next())null!==(y=d(o,y.value,s))&&(l=i(y,l,m),null===f?u=y:f.sibling=y,f=y);return aa&&Jo(o,m),u}for(g=r(o,g);!y.done;m++,y=c.next())null!==(y=h(g,o,m,y.value,s))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),l=i(y,l,m),null===f?u=y:f.sibling=y,f=y);return e&&g.forEach((function(e){return t(o,e)})),aa&&Jo(o,m),u}return function e(r,a,i,c){if("object"==typeof i&&null!==i&&i.type===x&&null===i.key&&(i=i.props.children),"object"==typeof i&&null!==i){switch(i.$$typeof){case k:e:{for(var s=i.key,u=a;null!==u;){if(u.key===s){if((s=i.type)===x){if(7===u.tag){n(r,u.sibling),(a=o(u,i.props.children)).return=r,r=a;break e}}else if(u.elementType===s||"object"==typeof s&&null!==s&&s.$$typeof===L&&Qa(s)===u.type){n(r,u.sibling),(a=o(u,i.props)).ref=Ya(r,u,i),a.return=r,r=a;break e}n(r,u);break}t(r,u),u=u.sibling}i.type===x?((a=Ns(i.props.children,r.mode,c,i.key)).return=r,r=a):((c=js(i.type,i.key,i.props,null,r.mode,c)).ref=Ya(r,a,i),c.return=r,r=c)}return l(r);case w:e:{for(u=i.key;null!==a;){if(a.key===u){if(4===a.tag&&a.stateNode.containerInfo===i.containerInfo&&a.stateNode.implementation===i.implementation){n(r,a.sibling),(a=o(a,i.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Ds(i,r.mode,c)).return=r,r=a}return l(r);case L:return e(r,a,(u=i._init)(i._payload),c)}if(te(i))return g(r,a,i,c);if(j(i))return m(r,a,i,c);Ga(r,i)}return"string"==typeof i&&""!==i||"number"==typeof i?(i=""+i,null!==a&&6===a.tag?(n(r,a.sibling),(a=o(a,i)).return=r,r=a):(n(r,a),(a=Is(i,r.mode,c)).return=r,r=a),l(r)):n(r,a)}}var Ka=Za(!0),Xa=Za(!1),Ja={},ei=So(Ja),ti=So(Ja),ni=So(Ja);function ri(e){if(e===Ja)throw Error(a(174));return e}function oi(e,t){switch(Oo(ni,t),Oo(ti,e),Oo(ei,Ja),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ce(null,"");break;default:t=ce(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Eo(ei),Oo(ei,t)}function ai(){Eo(ei),Eo(ti),Eo(ni)}function ii(e){ri(ni.current);var t=ri(ei.current),n=ce(t,e.type);t!==n&&(Oo(ti,e),Oo(ei,n))}function li(e){ti.current===e&&(Eo(ei),Eo(ti))}var ci=So(0);function si(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ui=[];function fi(){for(var e=0;e<ui.length;e++)ui[e]._workInProgressVersionPrimary=null;ui.length=0}var di=A.ReactCurrentDispatcher,pi=A.ReactCurrentBatchConfig,hi=0,gi=null,mi=null,bi=null,yi=!1,vi=!1,Ai=0,ki=0;function wi(){throw Error(a(321))}function xi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function Ci(e,t,n,r,o,i){if(hi=i,gi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,di.current=null===e||null===e.memoizedState?ll:cl,e=n(r,o),vi){i=0;do{if(vi=!1,Ai=0,25<=i)throw Error(a(301));i+=1,bi=mi=null,t.updateQueue=null,di.current=sl,e=n(r,o)}while(vi)}if(di.current=il,t=null!==mi&&null!==mi.next,hi=0,bi=mi=gi=null,yi=!1,t)throw Error(a(300));return e}function Si(){var e=0!==Ai;return Ai=0,e}function Ei(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===bi?gi.memoizedState=bi=e:bi=bi.next=e,bi}function Oi(){if(null===mi){var e=gi.alternate;e=null!==e?e.memoizedState:null}else e=mi.next;var t=null===bi?gi.memoizedState:bi.next;if(null!==t)bi=t,mi=e;else{if(null===e)throw Error(a(310));e={memoizedState:(mi=e).memoizedState,baseState:mi.baseState,baseQueue:mi.baseQueue,queue:mi.queue,next:null},null===bi?gi.memoizedState=bi=e:bi=bi.next=e}return bi}function zi(e,t){return"function"==typeof t?t(e):t}function Pi(e){var t=Oi(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=mi,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var l=o.next;o.next=i.next,i.next=l}r.baseQueue=o=i,n.pending=null}if(null!==o){i=o.next,r=r.baseState;var c=l=null,s=null,u=i;do{var f=u.lane;if((hi&f)===f)null!==s&&(s=s.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===s?(c=s=d,l=r):s=s.next=d,gi.lanes|=f,Mc|=f}u=u.next}while(null!==u&&u!==i);null===s?l=r:s.next=c,lr(r,t.memoizedState)||(Al=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=s,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{i=o.lane,gi.lanes|=i,Mc|=i,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Fi(e){var t=Oi(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var l=o=o.next;do{i=e(i,l.action),l=l.next}while(l!==o);lr(i,t.memoizedState)||(Al=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Ti(){}function Li(e,t){var n=gi,r=Oi(),o=t(),i=!lr(r.memoizedState,o);if(i&&(r.memoizedState=o,Al=!0),r=r.queue,$i(ji.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||null!==bi&&1&bi.memoizedState.tag){if(n.flags|=2048,Di(9,_i.bind(null,n,r,o,t),void 0,null),null===Fc)throw Error(a(349));0!=(30&hi)||Bi(n,t,o)}return o}function Bi(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=gi.updateQueue)?(t={lastEffect:null,stores:null},gi.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function _i(e,t,n,r){t.value=n,t.getSnapshot=r,Ni(t)&&Mi(e)}function ji(e,t,n){return n((function(){Ni(t)&&Mi(e)}))}function Ni(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lr(e,n)}catch(e){return!0}}function Mi(e){var t=Fa(e,1);null!==t&&rs(t,e,1,-1)}function Ii(e){var t=Ei();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:e},t.queue=e,e=e.dispatch=nl.bind(null,gi,e),[t.memoizedState,e]}function Di(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=gi.updateQueue)?(t={lastEffect:null,stores:null},gi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ri(){return Oi().memoizedState}function Hi(e,t,n,r){var o=Ei();gi.flags|=e,o.memoizedState=Di(1|t,n,void 0,void 0===r?null:r)}function Ui(e,t,n,r){var o=Oi();r=void 0===r?null:r;var a=void 0;if(null!==mi){var i=mi.memoizedState;if(a=i.destroy,null!==r&&xi(r,i.deps))return void(o.memoizedState=Di(t,n,a,r))}gi.flags|=e,o.memoizedState=Di(1|t,n,a,r)}function Wi(e,t){return Hi(8390656,8,e,t)}function $i(e,t){return Ui(2048,8,e,t)}function Vi(e,t){return Ui(4,2,e,t)}function qi(e,t){return Ui(4,4,e,t)}function Yi(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Gi(e,t,n){return n=null!=n?n.concat([e]):null,Ui(4,4,Yi.bind(null,t,e),n)}function Qi(){}function Zi(e,t){var n=Oi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ki(e,t){var n=Oi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Xi(e,t,n){return 0==(21&hi)?(e.baseState&&(e.baseState=!1,Al=!0),e.memoizedState=n):(lr(n,t)||(n=gt(),gi.lanes|=n,Mc|=n,e.baseState=!0),t)}function Ji(e,t){var n=vt;vt=0!==n&&4>n?n:4,e(!0);var r=pi.transition;pi.transition={};try{e(!1),t()}finally{vt=n,pi.transition=r}}function el(){return Oi().memoizedState}function tl(e,t,n){var r=ns(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rl(e)?ol(t,n):null!==(n=Pa(e,t,n,r))&&(rs(n,e,r,ts()),al(n,t,r))}function nl(e,t,n){var r=ns(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rl(e))ol(t,o);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var i=t.lastRenderedState,l=a(i,n);if(o.hasEagerState=!0,o.eagerState=l,lr(l,i)){var c=t.interleaved;return null===c?(o.next=o,za(t)):(o.next=c.next,c.next=o),void(t.interleaved=o)}}catch(e){}null!==(n=Pa(e,t,o,r))&&(rs(n,e,r,o=ts()),al(n,t,r))}}function rl(e){var t=e.alternate;return e===gi||null!==t&&t===gi}function ol(e,t){vi=yi=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function al(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var il={readContext:Ea,useCallback:wi,useContext:wi,useEffect:wi,useImperativeHandle:wi,useInsertionEffect:wi,useLayoutEffect:wi,useMemo:wi,useReducer:wi,useRef:wi,useState:wi,useDebugValue:wi,useDeferredValue:wi,useTransition:wi,useMutableSource:wi,useSyncExternalStore:wi,useId:wi,unstable_isNewReconciler:!1},ll={readContext:Ea,useCallback:function(e,t){return Ei().memoizedState=[e,void 0===t?null:t],e},useContext:Ea,useEffect:Wi,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Hi(4194308,4,Yi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hi(4,2,e,t)},useMemo:function(e,t){var n=Ei();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ei();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=tl.bind(null,gi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ei().memoizedState=e},useState:Ii,useDebugValue:Qi,useDeferredValue:function(e){return Ei().memoizedState=e},useTransition:function(){var e=Ii(!1),t=e[0];return e=Ji.bind(null,e[1]),Ei().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=gi,o=Ei();if(aa){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Fc)throw Error(a(349));0!=(30&hi)||Bi(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Wi(ji.bind(null,r,i,e),[e]),r.flags|=2048,Di(9,_i.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ei(),t=Fc.identifierPrefix;if(aa){var n=Xo;t=":"+t+"R"+(n=(Ko&~(1<<32-it(Ko)-1)).toString(32)+n),0<(n=Ai++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ki++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},cl={readContext:Ea,useCallback:Zi,useContext:Ea,useEffect:$i,useImperativeHandle:Gi,useInsertionEffect:Vi,useLayoutEffect:qi,useMemo:Ki,useReducer:Pi,useRef:Ri,useState:function(){return Pi(zi)},useDebugValue:Qi,useDeferredValue:function(e){return Xi(Oi(),mi.memoizedState,e)},useTransition:function(){return[Pi(zi)[0],Oi().memoizedState]},useMutableSource:Ti,useSyncExternalStore:Li,useId:el,unstable_isNewReconciler:!1},sl={readContext:Ea,useCallback:Zi,useContext:Ea,useEffect:$i,useImperativeHandle:Gi,useInsertionEffect:Vi,useLayoutEffect:qi,useMemo:Ki,useReducer:Fi,useRef:Ri,useState:function(){return Fi(zi)},useDebugValue:Qi,useDeferredValue:function(e){var t=Oi();return null===mi?t.memoizedState=e:Xi(t,mi.memoizedState,e)},useTransition:function(){return[Fi(zi)[0],Oi().memoizedState]},useMutableSource:Ti,useSyncExternalStore:Li,useId:el,unstable_isNewReconciler:!1};function ul(e,t){try{var n="",r=t;do{n+=H(r),r=r.return}while(r);var o=n}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o,digest:null}}function fl(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function dl(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var pl="function"==typeof WeakMap?WeakMap:Map;function hl(e,t,n){(n=_a(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vc||(Vc=!0,qc=r),dl(0,t)},n}function gl(e,t,n){(n=_a(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){dl(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){dl(0,t),"function"!=typeof r&&(null===Yc?Yc=new Set([this]):Yc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ml(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new pl;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Es.bind(null,e,t,n),t.then(e,e))}function bl(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function yl(e,t,n,r,o){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=_a(-1,1)).tag=2,ja(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var vl=A.ReactCurrentOwner,Al=!1;function kl(e,t,n,r){t.child=null===e?Xa(t,null,n,r):Ka(t,e.child,n,r)}function wl(e,t,n,r,o){n=n.render;var a=t.ref;return Sa(t,o),r=Ci(e,t,n,r,a,o),n=Si(),null===e||Al?(aa&&n&&ta(t),t.flags|=1,kl(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Vl(e,t,o))}function xl(e,t,n,r,o){if(null===e){var a=n.type;return"function"!=typeof a||Bs(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=js(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Cl(e,t,a,r,o))}if(a=e.child,0==(e.lanes&o)){var i=a.memoizedProps;if((n=null!==(n=n.compare)?n:cr)(i,r)&&e.ref===t.ref)return Vl(e,t,o)}return t.flags|=1,(e=_s(a,r)).ref=t.ref,e.return=t,t.child=e}function Cl(e,t,n,r,o){if(null!==e){var a=e.memoizedProps;if(cr(a,r)&&e.ref===t.ref){if(Al=!1,t.pendingProps=r=a,0==(e.lanes&o))return t.lanes=e.lanes,Vl(e,t,o);0!=(131072&e.flags)&&(Al=!0)}}return Ol(e,t,n,r,o)}function Sl(e,t,n){var r=t.pendingProps,o=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Oo(_c,Bc),Bc|=n;else{if(0==(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Oo(_c,Bc),Bc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Oo(_c,Bc),Bc|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Oo(_c,Bc),Bc|=r;return kl(e,t,o,n),t.child}function El(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ol(e,t,n,r,o){var a=Bo(n)?To:Po.current;return a=Lo(t,a),Sa(t,o),n=Ci(e,t,n,r,a,o),r=Si(),null===e||Al?(aa&&r&&ta(t),t.flags|=1,kl(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Vl(e,t,o))}function zl(e,t,n,r,o){if(Bo(n)){var a=!0;Mo(t)}else a=!1;if(Sa(t,o),null===t.stateNode)$l(e,t),$a(t,n,r),qa(t,n,r,o),r=!0;else if(null===e){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,s=n.contextType;s="object"==typeof s&&null!==s?Ea(s):Lo(t,s=Bo(n)?To:Po.current);var u=n.getDerivedStateFromProps,f="function"==typeof u||"function"==typeof i.getSnapshotBeforeUpdate;f||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==r||c!==s)&&Va(t,i,r,s),Ta=!1;var d=t.memoizedState;i.state=d,Ia(t,r,i,o),c=t.memoizedState,l!==r||d!==c||Fo.current||Ta?("function"==typeof u&&(Ha(t,n,u,r),c=t.memoizedState),(l=Ta||Wa(t,n,l,r,d,c,s))?(f||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=s,r=l):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Ba(e,t),l=t.memoizedProps,s=t.type===t.elementType?l:ba(t.type,l),i.props=s,f=t.pendingProps,d=i.context,c="object"==typeof(c=n.contextType)&&null!==c?Ea(c):Lo(t,c=Bo(n)?To:Po.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==f||d!==c)&&Va(t,i,r,c),Ta=!1,d=t.memoizedState,i.state=d,Ia(t,r,i,o);var h=t.memoizedState;l!==f||d!==h||Fo.current||Ta?("function"==typeof p&&(Ha(t,n,p,r),h=t.memoizedState),(s=Ta||Wa(t,n,s,r,d,h,c)||!1)?(u||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,h,c),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,h,c)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=c,r=s):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Pl(e,t,n,r,a,o)}function Pl(e,t,n,r,o,a){El(e,t);var i=0!=(128&t.flags);if(!r&&!i)return o&&Io(t,n,!1),Vl(e,t,a);r=t.stateNode,vl.current=t;var l=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=Ka(t,e.child,null,a),t.child=Ka(t,null,l,a)):kl(e,t,l,a),t.memoizedState=r.state,o&&Io(t,n,!0),t.child}function Fl(e){var t=e.stateNode;t.pendingContext?jo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&jo(0,t.context,!1),oi(e,t.containerInfo)}function Tl(e,t,n,r,o){return ha(),ga(o),t.flags|=256,kl(e,t,n,r),t.child}var Ll,Bl,_l,jl,Nl={dehydrated:null,treeContext:null,retryLane:0};function Ml(e){return{baseLanes:e,cachePool:null,transitions:null}}function Il(e,t,n){var r,o=t.pendingProps,i=ci.current,l=!1,c=0!=(128&t.flags);if((r=c)||(r=(null===e||null!==e.memoizedState)&&0!=(2&i)),r?(l=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),Oo(ci,1&i),null===e)return ua(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(c=o.children,e=o.fallback,l?(o=t.mode,l=t.child,c={mode:"hidden",children:c},0==(1&o)&&null!==l?(l.childLanes=0,l.pendingProps=c):l=Ms(c,o,0,null),e=Ns(e,o,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Ml(n),t.memoizedState=Nl,e):Dl(t,c));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,n,r,o,i,l){if(n)return 256&t.flags?(t.flags&=-257,Rl(e,t,l,r=fl(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Ms({mode:"visible",children:r.children},o,0,null),(i=Ns(i,o,l,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,0!=(1&t.mode)&&Ka(t,e.child,null,l),t.child.memoizedState=Ml(l),t.memoizedState=Nl,i);if(0==(1&t.mode))return Rl(e,t,l,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var c=r.dgst;return r=c,Rl(e,t,l,r=fl(i=Error(a(419)),r,void 0))}if(c=0!=(l&e.childLanes),Al||c){if(null!==(r=Fc)){switch(l&-l){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!=(o&(r.suspendedLanes|l))?0:o)&&o!==i.retryLane&&(i.retryLane=o,Fa(e,o),rs(r,e,o,-1))}return ms(),Rl(e,t,l,r=fl(Error(a(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=zs.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,oa=so(o.nextSibling),ra=t,aa=!0,ia=null,null!==e&&(Go[Qo++]=Ko,Go[Qo++]=Xo,Go[Qo++]=Zo,Ko=e.id,Xo=e.overflow,Zo=t),(t=Dl(t,r.children)).flags|=4096,t)}(e,t,c,o,r,i,n);if(l){l=o.fallback,c=t.mode,r=(i=e.child).sibling;var s={mode:"hidden",children:o.children};return 0==(1&c)&&t.child!==i?((o=t.child).childLanes=0,o.pendingProps=s,t.deletions=null):(o=_s(i,s)).subtreeFlags=14680064&i.subtreeFlags,null!==r?l=_s(r,l):(l=Ns(l,c,n,null)).flags|=2,l.return=t,o.return=t,o.sibling=l,t.child=o,o=l,l=t.child,c=null===(c=e.child.memoizedState)?Ml(n):{baseLanes:c.baseLanes|n,cachePool:null,transitions:c.transitions},l.memoizedState=c,l.childLanes=e.childLanes&~n,t.memoizedState=Nl,o}return e=(l=e.child).sibling,o=_s(l,{mode:"visible",children:o.children}),0==(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Dl(e,t){return(t=Ms({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Rl(e,t,n,r){return null!==r&&ga(r),Ka(t,e.child,null,n),(e=Dl(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Hl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ca(e.return,t,n)}function Ul(e,t,n,r,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o)}function Wl(e,t,n){var r=t.pendingProps,o=r.revealOrder,a=r.tail;if(kl(e,t,r.children,n),0!=(2&(r=ci.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Hl(e,n,t);else if(19===e.tag)Hl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Oo(ci,r),0==(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===si(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ul(t,!1,o,n,a);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===si(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ul(t,!0,n,null,a);break;case"together":Ul(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $l(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Mc|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=_s(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=_s(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function ql(e,t){if(!aa)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Yl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gl(e,t,n){var r=t.pendingProps;switch(na(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Yl(t),null;case 1:case 17:return Bo(t.type)&&_o(),Yl(t),null;case 3:return r=t.stateNode,ai(),Eo(Fo),Eo(Po),fi(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(da(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==ia&&(ls(ia),ia=null))),Bl(e,t),Yl(t),null;case 5:li(t);var o=ri(ni.current);if(n=t.type,null!==e&&null!=t.stateNode)_l(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return Yl(t),null}if(e=ri(ei.current),da(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[po]=t,r[ho]=i,e=0!=(1&t.mode),n){case"dialog":Dr("cancel",r),Dr("close",r);break;case"iframe":case"object":case"embed":Dr("load",r);break;case"video":case"audio":for(o=0;o<jr.length;o++)Dr(jr[o],r);break;case"source":Dr("error",r);break;case"img":case"image":case"link":Dr("error",r),Dr("load",r);break;case"details":Dr("toggle",r);break;case"input":Z(r,i),Dr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Dr("invalid",r);break;case"textarea":oe(r,i),Dr("invalid",r)}for(var c in ye(n,i),o=null,i)if(i.hasOwnProperty(c)){var s=i[c];"children"===c?"string"==typeof s?r.textContent!==s&&(!0!==i.suppressHydrationWarning&&Xr(r.textContent,s,e),o=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==i.suppressHydrationWarning&&Xr(r.textContent,s,e),o=["children",""+s]):l.hasOwnProperty(c)&&null!=s&&"onScroll"===c&&Dr("scroll",r)}switch(n){case"input":q(r),J(r,i,!0);break;case"textarea":q(r),ie(r);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(r.onclick=Jr)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{c=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=le(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[po]=t,e[ho]=r,Ll(e,t,!1,!1),t.stateNode=e;e:{switch(c=ve(n,r),n){case"dialog":Dr("cancel",e),Dr("close",e),o=r;break;case"iframe":case"object":case"embed":Dr("load",e),o=r;break;case"video":case"audio":for(o=0;o<jr.length;o++)Dr(jr[o],e);o=r;break;case"source":Dr("error",e),o=r;break;case"img":case"image":case"link":Dr("error",e),Dr("load",e),o=r;break;case"details":Dr("toggle",e),o=r;break;case"input":Z(e,r),o=Q(e,r),Dr("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=M({},r,{value:void 0}),Dr("invalid",e);break;case"textarea":oe(e,r),o=re(e,r),Dr("invalid",e)}for(i in ye(n,o),s=o)if(s.hasOwnProperty(i)){var u=s[i];"style"===i?me(e,u):"dangerouslySetInnerHTML"===i?null!=(u=u?u.__html:void 0)&&fe(e,u):"children"===i?"string"==typeof u?("textarea"!==n||""!==u)&&de(e,u):"number"==typeof u&&de(e,""+u):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(l.hasOwnProperty(i)?null!=u&&"onScroll"===i&&Dr("scroll",e):null!=u&&v(e,i,u,c))}switch(n){case"input":q(e),J(e,r,!1);break;case"textarea":q(e),ie(e);break;case"option":null!=r.value&&e.setAttribute("value",""+$(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?ne(e,!!r.multiple,i,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=Jr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Yl(t),null;case 6:if(e&&null!=t.stateNode)jl(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(n=ri(ni.current),ri(ei.current),da(t)){if(r=t.stateNode,n=t.memoizedProps,r[po]=t,(i=r.nodeValue!==n)&&null!==(e=ra))switch(e.tag){case 3:Xr(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Xr(r.nodeValue,n,0!=(1&e.mode))}i&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[po]=t,t.stateNode=r}return Yl(t),null;case 13:if(Eo(ci),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(aa&&null!==oa&&0!=(1&t.mode)&&0==(128&t.flags))pa(),ha(),t.flags|=98560,i=!1;else if(i=da(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(a(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(a(317));i[po]=t}else ha(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Yl(t),i=!1}else null!==ia&&(ls(ia),ia=null),i=!0;if(!i)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!=(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&ci.current)?0===jc&&(jc=3):ms())),null!==t.updateQueue&&(t.flags|=4),Yl(t),null);case 4:return ai(),Bl(e,t),null===e&&Ur(t.stateNode.containerInfo),Yl(t),null;case 10:return xa(t.type._context),Yl(t),null;case 19:if(Eo(ci),null===(i=t.memoizedState))return Yl(t),null;if(r=0!=(128&t.flags),null===(c=i.rendering))if(r)ql(i,!1);else{if(0!==jc||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(c=si(e))){for(t.flags|=128,ql(i,!1),null!==(r=c.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(i=n).flags&=14680066,null===(c=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,e=c.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Oo(ci,1&ci.current|2),t.child}e=e.sibling}null!==i.tail&&Ke()>Wc&&(t.flags|=128,r=!0,ql(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=si(c))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),ql(i,!0),null===i.tail&&"hidden"===i.tailMode&&!c.alternate&&!aa)return Yl(t),null}else 2*Ke()-i.renderingStartTime>Wc&&1073741824!==n&&(t.flags|=128,r=!0,ql(i,!1),t.lanes=4194304);i.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=i.last)?n.sibling=c:t.child=c,i.last=c)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ke(),t.sibling=null,n=ci.current,Oo(ci,r?1&n|2:1&n),t):(Yl(t),null);case 22:case 23:return ds(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Bc)&&(Yl(t),6&t.subtreeFlags&&(t.flags|=8192)):Yl(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Ql(e,t){switch(na(t),t.tag){case 1:return Bo(t.type)&&_o(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ai(),Eo(Fo),Eo(Po),fi(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return li(t),null;case 13:if(Eo(ci),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));ha()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Eo(ci),null;case 4:return ai(),null;case 10:return xa(t.type._context),null;case 22:case 23:return ds(),null;default:return null}}Ll=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Bl=function(){},_l=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ri(ei.current);var a,i=null;switch(n){case"input":o=Q(e,o),r=Q(e,r),i=[];break;case"select":o=M({},o,{value:void 0}),r=M({},r,{value:void 0}),i=[];break;case"textarea":o=re(e,o),r=re(e,r),i=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Jr)}for(u in ye(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var c=o[u];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(l.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var s=r[u];if(c=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&s!==c&&(null!=s||null!=c))if("style"===u)if(c){for(a in c)!c.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in s)s.hasOwnProperty(a)&&c[a]!==s[a]&&(n||(n={}),n[a]=s[a])}else n||(i||(i=[]),i.push(u,n)),n=s;else"dangerouslySetInnerHTML"===u?(s=s?s.__html:void 0,c=c?c.__html:void 0,null!=s&&c!==s&&(i=i||[]).push(u,s)):"children"===u?"string"!=typeof s&&"number"!=typeof s||(i=i||[]).push(u,""+s):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(l.hasOwnProperty(u)?(null!=s&&"onScroll"===u&&Dr("scroll",e),i||c===s||(i=[])):(i=i||[]).push(u,s))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}},jl=function(e,t,n,r){n!==r&&(t.flags|=4)};var Zl=!1,Kl=!1,Xl="function"==typeof WeakSet?WeakSet:Set,Jl=null;function ec(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Ss(e,t,n)}else n.current=null}function tc(e,t,n){try{n()}catch(n){Ss(e,t,n)}}var nc=!1;function rc(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,void 0!==a&&tc(t,n,a)}o=o.next}while(o!==r)}}function oc(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ac(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function ic(e){var t=e.alternate;null!==t&&(e.alternate=null,ic(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[po],delete t[ho],delete t[mo],delete t[bo],delete t[yo]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function lc(e){return 5===e.tag||3===e.tag||4===e.tag}function cc(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||lc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function sc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(sc(e,t,n),e=e.sibling;null!==e;)sc(e,t,n),e=e.sibling}function uc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(uc(e,t,n),e=e.sibling;null!==e;)uc(e,t,n),e=e.sibling}var fc=null,dc=!1;function pc(e,t,n){for(n=n.child;null!==n;)hc(e,t,n),n=n.sibling}function hc(e,t,n){if(at&&"function"==typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(ot,n)}catch(e){}switch(n.tag){case 5:Kl||ec(n,t);case 6:var r=fc,o=dc;fc=null,pc(e,t,n),dc=o,null!==(fc=r)&&(dc?(e=fc,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):fc.removeChild(n.stateNode));break;case 18:null!==fc&&(dc?(e=fc,n=n.stateNode,8===e.nodeType?co(e.parentNode,n):1===e.nodeType&&co(e,n),Ut(e)):co(fc,n.stateNode));break;case 4:r=fc,o=dc,fc=n.stateNode.containerInfo,dc=!0,pc(e,t,n),fc=r,dc=o;break;case 0:case 11:case 14:case 15:if(!Kl&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){o=r=r.next;do{var a=o,i=a.destroy;a=a.tag,void 0!==i&&(0!=(2&a)||0!=(4&a))&&tc(n,t,i),o=o.next}while(o!==r)}pc(e,t,n);break;case 1:if(!Kl&&(ec(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Ss(n,t,e)}pc(e,t,n);break;case 21:pc(e,t,n);break;case 22:1&n.mode?(Kl=(r=Kl)||null!==n.memoizedState,pc(e,t,n),Kl=r):pc(e,t,n);break;default:pc(e,t,n)}}function gc(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xl),t.forEach((function(t){var r=Ps.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function mc(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,l=t,c=l;e:for(;null!==c;){switch(c.tag){case 5:fc=c.stateNode,dc=!1;break e;case 3:case 4:fc=c.stateNode.containerInfo,dc=!0;break e}c=c.return}if(null===fc)throw Error(a(160));hc(i,l,o),fc=null,dc=!1;var s=o.alternate;null!==s&&(s.return=null),o.return=null}catch(e){Ss(o,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)bc(t,e),t=t.sibling}function bc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(mc(t,e),yc(e),4&r){try{rc(3,e,e.return),oc(3,e)}catch(t){Ss(e,e.return,t)}try{rc(5,e,e.return)}catch(t){Ss(e,e.return,t)}}break;case 1:mc(t,e),yc(e),512&r&&null!==n&&ec(n,n.return);break;case 5:if(mc(t,e),yc(e),512&r&&null!==n&&ec(n,n.return),32&e.flags){var o=e.stateNode;try{de(o,"")}catch(t){Ss(e,e.return,t)}}if(4&r&&null!=(o=e.stateNode)){var i=e.memoizedProps,l=null!==n?n.memoizedProps:i,c=e.type,s=e.updateQueue;if(e.updateQueue=null,null!==s)try{"input"===c&&"radio"===i.type&&null!=i.name&&K(o,i),ve(c,l);var u=ve(c,i);for(l=0;l<s.length;l+=2){var f=s[l],d=s[l+1];"style"===f?me(o,d):"dangerouslySetInnerHTML"===f?fe(o,d):"children"===f?de(o,d):v(o,f,d,u)}switch(c){case"input":X(o,i);break;case"textarea":ae(o,i);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;null!=h?ne(o,!!i.multiple,h,!1):p!==!!i.multiple&&(null!=i.defaultValue?ne(o,!!i.multiple,i.defaultValue,!0):ne(o,!!i.multiple,i.multiple?[]:"",!1))}o[ho]=i}catch(t){Ss(e,e.return,t)}}break;case 6:if(mc(t,e),yc(e),4&r){if(null===e.stateNode)throw Error(a(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(t){Ss(e,e.return,t)}}break;case 3:if(mc(t,e),yc(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ut(t.containerInfo)}catch(t){Ss(e,e.return,t)}break;case 4:default:mc(t,e),yc(e);break;case 13:mc(t,e),yc(e),8192&(o=e.child).flags&&(i=null!==o.memoizedState,o.stateNode.isHidden=i,!i||null!==o.alternate&&null!==o.alternate.memoizedState||(Uc=Ke())),4&r&&gc(e);break;case 22:if(f=null!==n&&null!==n.memoizedState,1&e.mode?(Kl=(u=Kl)||f,mc(t,e),Kl=u):mc(t,e),yc(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!f&&0!=(1&e.mode))for(Jl=e,f=e.child;null!==f;){for(d=Jl=f;null!==Jl;){switch(h=(p=Jl).child,p.tag){case 0:case 11:case 14:case 15:rc(4,p,p.return);break;case 1:ec(p,p.return);var g=p.stateNode;if("function"==typeof g.componentWillUnmount){r=p,n=p.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(e){Ss(r,n,e)}}break;case 5:ec(p,p.return);break;case 22:if(null!==p.memoizedState){wc(d);continue}}null!==h?(h.return=p,Jl=h):wc(d)}f=f.sibling}e:for(f=null,d=e;;){if(5===d.tag){if(null===f){f=d;try{o=d.stateNode,u?"function"==typeof(i=o.style).setProperty?i.setProperty("display","none","important"):i.display="none":(c=d.stateNode,l=null!=(s=d.memoizedProps.style)&&s.hasOwnProperty("display")?s.display:null,c.style.display=ge("display",l))}catch(t){Ss(e,e.return,t)}}}else if(6===d.tag){if(null===f)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(t){Ss(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:mc(t,e),yc(e),4&r&&gc(e);case 21:}}function yc(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(lc(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(de(o,""),r.flags&=-33),uc(e,cc(e),o);break;case 3:case 4:var i=r.stateNode.containerInfo;sc(e,cc(e),i);break;default:throw Error(a(161))}}catch(t){Ss(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function vc(e,t,n){Jl=e,Ac(e,t,n)}function Ac(e,t,n){for(var r=0!=(1&e.mode);null!==Jl;){var o=Jl,a=o.child;if(22===o.tag&&r){var i=null!==o.memoizedState||Zl;if(!i){var l=o.alternate,c=null!==l&&null!==l.memoizedState||Kl;l=Zl;var s=Kl;if(Zl=i,(Kl=c)&&!s)for(Jl=o;null!==Jl;)c=(i=Jl).child,22===i.tag&&null!==i.memoizedState?xc(o):null!==c?(c.return=i,Jl=c):xc(o);for(;null!==a;)Jl=a,Ac(a,t,n),a=a.sibling;Jl=o,Zl=l,Kl=s}kc(e)}else 0!=(8772&o.subtreeFlags)&&null!==a?(a.return=o,Jl=a):kc(e)}}function kc(e){for(;null!==Jl;){var t=Jl;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Kl||oc(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Kl)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:ba(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&Da(t,i,r);break;case 3:var l=t.updateQueue;if(null!==l){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Da(t,l,n)}break;case 5:var c=t.stateNode;if(null===n&&4&t.flags){n=c;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var f=u.memoizedState;if(null!==f){var d=f.dehydrated;null!==d&&Ut(d)}}}break;default:throw Error(a(163))}Kl||512&t.flags&&ac(t)}catch(e){Ss(t,t.return,e)}}if(t===e){Jl=null;break}if(null!==(n=t.sibling)){n.return=t.return,Jl=n;break}Jl=t.return}}function wc(e){for(;null!==Jl;){var t=Jl;if(t===e){Jl=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Jl=n;break}Jl=t.return}}function xc(e){for(;null!==Jl;){var t=Jl;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{oc(4,t)}catch(e){Ss(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(e){Ss(t,o,e)}}var a=t.return;try{ac(t)}catch(e){Ss(t,a,e)}break;case 5:var i=t.return;try{ac(t)}catch(e){Ss(t,i,e)}}}catch(e){Ss(t,t.return,e)}if(t===e){Jl=null;break}var l=t.sibling;if(null!==l){l.return=t.return,Jl=l;break}Jl=t.return}}var Cc,Sc=Math.ceil,Ec=A.ReactCurrentDispatcher,Oc=A.ReactCurrentOwner,zc=A.ReactCurrentBatchConfig,Pc=0,Fc=null,Tc=null,Lc=0,Bc=0,_c=So(0),jc=0,Nc=null,Mc=0,Ic=0,Dc=0,Rc=null,Hc=null,Uc=0,Wc=1/0,$c=null,Vc=!1,qc=null,Yc=null,Gc=!1,Qc=null,Zc=0,Kc=0,Xc=null,Jc=-1,es=0;function ts(){return 0!=(6&Pc)?Ke():-1!==Jc?Jc:Jc=Ke()}function ns(e){return 0==(1&e.mode)?1:0!=(2&Pc)&&0!==Lc?Lc&-Lc:null!==ma.transition?(0===es&&(es=gt()),es):0!==(e=vt)?e:e=void 0===(e=window.event)?16:Zt(e.type)}function rs(e,t,n,r){if(50<Kc)throw Kc=0,Xc=null,Error(a(185));bt(e,n,r),0!=(2&Pc)&&e===Fc||(e===Fc&&(0==(2&Pc)&&(Ic|=n),4===jc&&cs(e,Lc)),os(e,r),1===n&&0===Pc&&0==(1&t.mode)&&(Wc=Ke()+500,Ro&&Wo()))}function os(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-it(a),l=1<<i,c=o[i];-1===c?0!=(l&n)&&0==(l&r)||(o[i]=pt(l,t)):c<=t&&(e.expiredLanes|=l),a&=~l}}(e,t);var r=dt(e,e===Fc?Lc:0);if(0===r)null!==n&&Ge(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ge(n),1===t)0===e.tag?function(e){Ro=!0,Uo(e)}(ss.bind(null,e)):Uo(ss.bind(null,e)),io((function(){0==(6&Pc)&&Wo()})),n=null;else{switch(At(r)){case 1:n=Je;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Fs(n,as.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function as(e,t){if(Jc=-1,es=0,0!=(6&Pc))throw Error(a(327));var n=e.callbackNode;if(xs()&&e.callbackNode!==n)return null;var r=dt(e,e===Fc?Lc:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=bs(e,r);else{t=r;var o=Pc;Pc|=2;var i=gs();for(Fc===e&&Lc===t||($c=null,Wc=Ke()+500,ps(e,t));;)try{vs();break}catch(t){hs(e,t)}wa(),Ec.current=i,Pc=o,null!==Tc?t=0:(Fc=null,Lc=0,t=jc)}if(0!==t){if(2===t&&0!==(o=ht(e))&&(r=o,t=is(e,o)),1===t)throw n=Nc,ps(e,0),cs(e,r),os(e,Ke()),n;if(6===t)cs(e,r);else{if(o=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],a=o.getSnapshot;o=o.value;try{if(!lr(a(),o))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=bs(e,r))&&0!==(i=ht(e))&&(r=i,t=is(e,i)),1===t))throw n=Nc,ps(e,0),cs(e,r),os(e,Ke()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:ws(e,Hc,$c);break;case 3:if(cs(e,r),(130023424&r)===r&&10<(t=Uc+500-Ke())){if(0!==dt(e,0))break;if(((o=e.suspendedLanes)&r)!==r){ts(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ro(ws.bind(null,e,Hc,$c),t);break}ws(e,Hc,$c);break;case 4:if(cs(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var l=31-it(r);i=1<<l,(l=t[l])>o&&(o=l),r&=~i}if(r=o,10<(r=(120>(r=Ke()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sc(r/1960))-r)){e.timeoutHandle=ro(ws.bind(null,e,Hc,$c),r);break}ws(e,Hc,$c);break;default:throw Error(a(329))}}}return os(e,Ke()),e.callbackNode===n?as.bind(null,e):null}function is(e,t){var n=Rc;return e.current.memoizedState.isDehydrated&&(ps(e,t).flags|=256),2!==(e=bs(e,t))&&(t=Hc,Hc=n,null!==t&&ls(t)),e}function ls(e){null===Hc?Hc=e:Hc.push.apply(Hc,e)}function cs(e,t){for(t&=~Dc,t&=~Ic,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-it(t),r=1<<n;e[n]=-1,t&=~r}}function ss(e){if(0!=(6&Pc))throw Error(a(327));xs();var t=dt(e,0);if(0==(1&t))return os(e,Ke()),null;var n=bs(e,t);if(0!==e.tag&&2===n){var r=ht(e);0!==r&&(t=r,n=is(e,r))}if(1===n)throw n=Nc,ps(e,0),cs(e,t),os(e,Ke()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ws(e,Hc,$c),os(e,Ke()),null}function us(e,t){var n=Pc;Pc|=1;try{return e(t)}finally{0===(Pc=n)&&(Wc=Ke()+500,Ro&&Wo())}}function fs(e){null!==Qc&&0===Qc.tag&&0==(6&Pc)&&xs();var t=Pc;Pc|=1;var n=zc.transition,r=vt;try{if(zc.transition=null,vt=1,e)return e()}finally{vt=r,zc.transition=n,0==(6&(Pc=t))&&Wo()}}function ds(){Bc=_c.current,Eo(_c)}function ps(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oo(n)),null!==Tc)for(n=Tc.return;null!==n;){var r=n;switch(na(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&_o();break;case 3:ai(),Eo(Fo),Eo(Po),fi();break;case 5:li(r);break;case 4:ai();break;case 13:case 19:Eo(ci);break;case 10:xa(r.type._context);break;case 22:case 23:ds()}n=n.return}if(Fc=e,Tc=e=_s(e.current,null),Lc=Bc=t,jc=0,Nc=null,Dc=Ic=Mc=0,Hc=Rc=null,null!==Oa){for(t=0;t<Oa.length;t++)if(null!==(r=(n=Oa[t]).interleaved)){n.interleaved=null;var o=r.next,a=n.pending;if(null!==a){var i=a.next;a.next=o,r.next=i}n.pending=r}Oa=null}return e}function hs(e,t){for(;;){var n=Tc;try{if(wa(),di.current=il,yi){for(var r=gi.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}yi=!1}if(hi=0,bi=mi=gi=null,vi=!1,Ai=0,Oc.current=null,null===n||null===n.return){jc=1,Nc=t,Tc=null;break}e:{var i=e,l=n.return,c=n,s=t;if(t=Lc,c.flags|=32768,null!==s&&"object"==typeof s&&"function"==typeof s.then){var u=s,f=c,d=f.tag;if(0==(1&f.mode)&&(0===d||11===d||15===d)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=bl(l);if(null!==h){h.flags&=-257,yl(h,l,c,0,t),1&h.mode&&ml(i,u,t),s=u;var g=(t=h).updateQueue;if(null===g){var m=new Set;m.add(s),t.updateQueue=m}else g.add(s);break e}if(0==(1&t)){ml(i,u,t),ms();break e}s=Error(a(426))}else if(aa&&1&c.mode){var b=bl(l);if(null!==b){0==(65536&b.flags)&&(b.flags|=256),yl(b,l,c,0,t),ga(ul(s,c));break e}}i=s=ul(s,c),4!==jc&&(jc=2),null===Rc?Rc=[i]:Rc.push(i),i=l;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,Ma(i,hl(0,s,t));break e;case 1:c=s;var y=i.type,v=i.stateNode;if(0==(128&i.flags)&&("function"==typeof y.getDerivedStateFromError||null!==v&&"function"==typeof v.componentDidCatch&&(null===Yc||!Yc.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t,Ma(i,gl(i,c,t));break e}}i=i.return}while(null!==i)}ks(n)}catch(e){t=e,Tc===n&&null!==n&&(Tc=n=n.return);continue}break}}function gs(){var e=Ec.current;return Ec.current=il,null===e?il:e}function ms(){0!==jc&&3!==jc&&2!==jc||(jc=4),null===Fc||0==(268435455&Mc)&&0==(268435455&Ic)||cs(Fc,Lc)}function bs(e,t){var n=Pc;Pc|=2;var r=gs();for(Fc===e&&Lc===t||($c=null,ps(e,t));;)try{ys();break}catch(t){hs(e,t)}if(wa(),Pc=n,Ec.current=r,null!==Tc)throw Error(a(261));return Fc=null,Lc=0,jc}function ys(){for(;null!==Tc;)As(Tc)}function vs(){for(;null!==Tc&&!Qe();)As(Tc)}function As(e){var t=Cc(e.alternate,e,Bc);e.memoizedProps=e.pendingProps,null===t?ks(e):Tc=t,Oc.current=null}function ks(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Gl(n,t,Bc)))return void(Tc=n)}else{if(null!==(n=Ql(n,t)))return n.flags&=32767,void(Tc=n);if(null===e)return jc=6,void(Tc=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Tc=t);Tc=t=e}while(null!==t);0===jc&&(jc=5)}function ws(e,t,n){var r=vt,o=zc.transition;try{zc.transition=null,vt=1,function(e,t,n,r){do{xs()}while(null!==Qc);if(0!=(6&Pc))throw Error(a(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-it(n),a=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~a}}(e,i),e===Fc&&(Tc=Fc=null,Lc=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Gc||(Gc=!0,Fs(tt,(function(){return xs(),null}))),i=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||i){i=zc.transition,zc.transition=null;var l=vt;vt=1;var c=Pc;Pc|=4,Oc.current=null,function(e,t){if(eo=$t,pr(e=dr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(e){n=null;break e}var l=0,c=-1,s=-1,u=0,f=0,d=e,p=null;t:for(;;){for(var h;d!==n||0!==o&&3!==d.nodeType||(c=l+o),d!==i||0!==r&&3!==d.nodeType||(s=l+r),3===d.nodeType&&(l+=d.nodeValue.length),null!==(h=d.firstChild);)p=d,d=h;for(;;){if(d===e)break t;if(p===n&&++u===o&&(c=l),p===i&&++f===r&&(s=l),null!==(h=d.nextSibling))break;p=(d=p).parentNode}d=h}n=-1===c||-1===s?null:{start:c,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(to={focusedElem:e,selectionRange:n},$t=!1,Jl=t;null!==Jl;)if(e=(t=Jl).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Jl=e;else for(;null!==Jl;){t=Jl;try{var g=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var m=g.memoizedProps,b=g.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:ba(t.type,m),b);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var A=t.stateNode.containerInfo;1===A.nodeType?A.textContent="":9===A.nodeType&&A.documentElement&&A.removeChild(A.documentElement);break;default:throw Error(a(163))}}catch(e){Ss(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Jl=e;break}Jl=t.return}g=nc,nc=!1}(e,n),bc(n,e),hr(to),$t=!!eo,to=eo=null,e.current=n,vc(n,e,o),Ze(),Pc=c,vt=l,zc.transition=i}else e.current=n;if(Gc&&(Gc=!1,Qc=e,Zc=o),0===(i=e.pendingLanes)&&(Yc=null),function(e){if(at&&"function"==typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(ot,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),os(e,Ke()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((o=t[n]).value,{componentStack:o.stack,digest:o.digest});if(Vc)throw Vc=!1,e=qc,qc=null,e;0!=(1&Zc)&&0!==e.tag&&xs(),0!=(1&(i=e.pendingLanes))?e===Xc?Kc++:(Kc=0,Xc=e):Kc=0,Wo()}(e,t,n,r)}finally{zc.transition=o,vt=r}return null}function xs(){if(null!==Qc){var e=At(Zc),t=zc.transition,n=vt;try{if(zc.transition=null,vt=16>e?16:e,null===Qc)var r=!1;else{if(e=Qc,Qc=null,Zc=0,0!=(6&Pc))throw Error(a(331));var o=Pc;for(Pc|=4,Jl=e.current;null!==Jl;){var i=Jl,l=i.child;if(0!=(16&Jl.flags)){var c=i.deletions;if(null!==c){for(var s=0;s<c.length;s++){var u=c[s];for(Jl=u;null!==Jl;){var f=Jl;switch(f.tag){case 0:case 11:case 15:rc(8,f,i)}var d=f.child;if(null!==d)d.return=f,Jl=d;else for(;null!==Jl;){var p=(f=Jl).sibling,h=f.return;if(ic(f),f===u){Jl=null;break}if(null!==p){p.return=h,Jl=p;break}Jl=h}}}var g=i.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var b=m.sibling;m.sibling=null,m=b}while(null!==m)}}Jl=i}}if(0!=(2064&i.subtreeFlags)&&null!==l)l.return=i,Jl=l;else e:for(;null!==Jl;){if(0!=(2048&(i=Jl).flags))switch(i.tag){case 0:case 11:case 15:rc(9,i,i.return)}var y=i.sibling;if(null!==y){y.return=i.return,Jl=y;break e}Jl=i.return}}var v=e.current;for(Jl=v;null!==Jl;){var A=(l=Jl).child;if(0!=(2064&l.subtreeFlags)&&null!==A)A.return=l,Jl=A;else e:for(l=v;null!==Jl;){if(0!=(2048&(c=Jl).flags))try{switch(c.tag){case 0:case 11:case 15:oc(9,c)}}catch(e){Ss(c,c.return,e)}if(c===l){Jl=null;break e}var k=c.sibling;if(null!==k){k.return=c.return,Jl=k;break e}Jl=c.return}}if(Pc=o,Wo(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(ot,e)}catch(e){}r=!0}return r}finally{vt=n,zc.transition=t}}return!1}function Cs(e,t,n){e=ja(e,t=hl(0,t=ul(n,t),1),1),t=ts(),null!==e&&(bt(e,1,t),os(e,t))}function Ss(e,t,n){if(3===e.tag)Cs(e,e,n);else for(;null!==t;){if(3===t.tag){Cs(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Yc||!Yc.has(r))){t=ja(t,e=gl(t,e=ul(n,e),1),1),e=ts(),null!==t&&(bt(t,1,e),os(t,e));break}}t=t.return}}function Es(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ts(),e.pingedLanes|=e.suspendedLanes&n,Fc===e&&(Lc&n)===n&&(4===jc||3===jc&&(130023424&Lc)===Lc&&500>Ke()-Uc?ps(e,0):Dc|=n),os(e,t)}function Os(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ut,0==(130023424&(ut<<=1))&&(ut=4194304)));var n=ts();null!==(e=Fa(e,t))&&(bt(e,t,n),os(e,n))}function zs(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Os(e,n)}function Ps(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),Os(e,n)}function Fs(e,t){return Ye(e,t)}function Ts(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ls(e,t,n,r){return new Ts(e,t,n,r)}function Bs(e){return!(!(e=e.prototype)||!e.isReactComponent)}function _s(e,t){var n=e.alternate;return null===n?((n=Ls(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function js(e,t,n,r,o,i){var l=2;if(r=e,"function"==typeof e)Bs(e)&&(l=1);else if("string"==typeof e)l=5;else e:switch(e){case x:return Ns(n.children,o,i,t);case C:l=8,o|=8;break;case S:return(e=Ls(12,n,t,2|o)).elementType=S,e.lanes=i,e;case P:return(e=Ls(13,n,t,o)).elementType=P,e.lanes=i,e;case F:return(e=Ls(19,n,t,o)).elementType=F,e.lanes=i,e;case B:return Ms(n,o,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case E:l=10;break e;case O:l=9;break e;case z:l=11;break e;case T:l=14;break e;case L:l=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Ls(l,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Ns(e,t,n,r){return(e=Ls(7,e,r,t)).lanes=n,e}function Ms(e,t,n,r){return(e=Ls(22,e,r,t)).elementType=B,e.lanes=n,e.stateNode={isHidden:!1},e}function Is(e,t,n){return(e=Ls(6,e,null,t)).lanes=n,e}function Ds(e,t,n){return(t=Ls(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Rs(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Hs(e,t,n,r,o,a,i,l,c){return e=new Rs(e,t,n,l,c),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Ls(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},La(a),e}function Us(e){if(!e)return zo;e:{if(Ue(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Bo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(Bo(n))return No(e,n,t)}return t}function Ws(e,t,n,r,o,a,i,l,c){return(e=Hs(n,r,!0,e,0,a,0,l,c)).context=Us(null),n=e.current,(a=_a(r=ts(),o=ns(n))).callback=null!=t?t:null,ja(n,a,o),e.current.lanes=o,bt(e,o,r),os(e,r),e}function $s(e,t,n,r){var o=t.current,a=ts(),i=ns(o);return n=Us(n),null===t.context?t.context=n:t.pendingContext=n,(t=_a(a,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=ja(o,t,i))&&(rs(e,o,i,a),Na(e,o,i)),i}function Vs(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function qs(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Ys(e,t){qs(e,t),(e=e.alternate)&&qs(e,t)}Cc=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Fo.current)Al=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return Al=!1,function(e,t,n){switch(t.tag){case 3:Fl(t),ha();break;case 5:ii(t);break;case 1:Bo(t.type)&&Mo(t);break;case 4:oi(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Oo(ya,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Oo(ci,1&ci.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Il(e,t,n):(Oo(ci,1&ci.current),null!==(e=Vl(e,t,n))?e.sibling:null);Oo(ci,1&ci.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Wl(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Oo(ci,ci.current),r)break;return null;case 22:case 23:return t.lanes=0,Sl(e,t,n)}return Vl(e,t,n)}(e,t,n);Al=0!=(131072&e.flags)}else Al=!1,aa&&0!=(1048576&t.flags)&&ea(t,Yo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;$l(e,t),e=t.pendingProps;var o=Lo(t,Po.current);Sa(t,n),o=Ci(null,t,r,e,o,n);var i=Si();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Bo(r)?(i=!0,Mo(t)):i=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,La(t),o.updater=Ua,t.stateNode=o,o._reactInternals=t,qa(t,r,e,n),t=Pl(null,t,r,!0,i,n)):(t.tag=0,aa&&i&&ta(t),kl(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch($l(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return Bs(e)?1:0;if(null!=e){if((e=e.$$typeof)===z)return 11;if(e===T)return 14}return 2}(r),e=ba(r,e),o){case 0:t=Ol(null,t,r,e,n);break e;case 1:t=zl(null,t,r,e,n);break e;case 11:t=wl(null,t,r,e,n);break e;case 14:t=xl(null,t,r,ba(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ol(e,t,r,o=t.elementType===r?o:ba(r,o),n);case 1:return r=t.type,o=t.pendingProps,zl(e,t,r,o=t.elementType===r?o:ba(r,o),n);case 3:e:{if(Fl(t),null===e)throw Error(a(387));r=t.pendingProps,o=(i=t.memoizedState).element,Ba(e,t),Ia(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Tl(e,t,r,n,o=ul(Error(a(423)),t));break e}if(r!==o){t=Tl(e,t,r,n,o=ul(Error(a(424)),t));break e}for(oa=so(t.stateNode.containerInfo.firstChild),ra=t,aa=!0,ia=null,n=Xa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ha(),r===o){t=Vl(e,t,n);break e}kl(e,t,r,n)}t=t.child}return t;case 5:return ii(t),null===e&&ua(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,l=o.children,no(r,o)?l=null:null!==i&&no(r,i)&&(t.flags|=32),El(e,t),kl(e,t,l,n),t.child;case 6:return null===e&&ua(t),null;case 13:return Il(e,t,n);case 4:return oi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ka(t,null,r,n):kl(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,wl(e,t,r,o=t.elementType===r?o:ba(r,o),n);case 7:return kl(e,t,t.pendingProps,n),t.child;case 8:case 12:return kl(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Oo(ya,r._currentValue),r._currentValue=l,null!==i)if(lr(i.value,l)){if(i.children===o.children&&!Fo.current){t=Vl(e,t,n);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var c=i.dependencies;if(null!==c){l=i.child;for(var s=c.firstContext;null!==s;){if(s.context===r){if(1===i.tag){(s=_a(-1,n&-n)).tag=2;var u=i.updateQueue;if(null!==u){var f=(u=u.shared).pending;null===f?s.next=s:(s.next=f.next,f.next=s),u.pending=s}}i.lanes|=n,null!==(s=i.alternate)&&(s.lanes|=n),Ca(i.return,n,t),c.lanes|=n;break}s=s.next}}else if(10===i.tag)l=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(l=i.return))throw Error(a(341));l.lanes|=n,null!==(c=l.alternate)&&(c.lanes|=n),Ca(l,n,t),l=i.sibling}else l=i.child;if(null!==l)l.return=i;else for(l=i;null!==l;){if(l===t){l=null;break}if(null!==(i=l.sibling)){i.return=l.return,l=i;break}l=l.return}i=l}kl(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Sa(t,n),r=r(o=Ea(o)),t.flags|=1,kl(e,t,r,n),t.child;case 14:return o=ba(r=t.type,t.pendingProps),xl(e,t,r,o=ba(r.type,o),n);case 15:return Cl(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ba(r,o),$l(e,t),t.tag=1,Bo(r)?(e=!0,Mo(t)):e=!1,Sa(t,n),$a(t,r,o),qa(t,r,o,n),Pl(null,t,r,!0,e,n);case 19:return Wl(e,t,n);case 22:return Sl(e,t,n)}throw Error(a(156,t.tag))};var Gs="function"==typeof reportError?reportError:function(e){console.error(e)};function Qs(e){this._internalRoot=e}function Zs(e){this._internalRoot=e}function Ks(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Xs(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Js(){}function eu(e,t,n,r,o){var a=n._reactRootContainer;if(a){var i=a;if("function"==typeof o){var l=o;o=function(){var e=Vs(i);l.call(e)}}$s(t,i,e,o)}else i=function(e,t,n,r,o){if(o){if("function"==typeof r){var a=r;r=function(){var e=Vs(i);a.call(e)}}var i=Ws(t,r,e,0,null,!1,0,"",Js);return e._reactRootContainer=i,e[go]=i.current,Ur(8===e.nodeType?e.parentNode:e),fs(),i}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var l=r;r=function(){var e=Vs(c);l.call(e)}}var c=Hs(e,0,!1,null,0,!1,0,"",Js);return e._reactRootContainer=c,e[go]=c.current,Ur(8===e.nodeType?e.parentNode:e),fs((function(){$s(t,c,n,r)})),c}(n,t,e,o,r);return Vs(i)}Zs.prototype.render=Qs.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));$s(e,t,null,null)},Zs.prototype.unmount=Qs.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;fs((function(){$s(null,e,null,null)})),t[go]=null}},Zs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Bt.length&&0!==t&&t<Bt[n].priority;n++);Bt.splice(n,0,e),0===n&&Mt(e)}},kt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ft(t.pendingLanes);0!==n&&(yt(t,1|n),os(t,Ke()),0==(6&Pc)&&(Wc=Ke()+500,Wo()))}break;case 13:fs((function(){var t=Fa(e,1);if(null!==t){var n=ts();rs(t,e,1,n)}})),Ys(e,1)}},wt=function(e){if(13===e.tag){var t=Fa(e,134217728);null!==t&&rs(t,e,134217728,ts()),Ys(e,134217728)}},xt=function(e){if(13===e.tag){var t=ns(e),n=Fa(e,t);null!==n&&rs(n,e,t,ts()),Ys(e,t)}},Ct=function(){return vt},St=function(e,t){var n=vt;try{return vt=e,t()}finally{vt=n}},we=function(e,t,n){switch(t){case"input":if(X(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=wo(r);if(!o)throw Error(a(90));Y(r),X(r,o)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},ze=us,Pe=fs;var tu={usingClientEntryPoint:!1,Events:[Ao,ko,wo,Ee,Oe,us]},nu={findFiberByHostInstance:vo,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ru={bundleType:nu.bundleType,version:nu.version,rendererPackageName:nu.rendererPackageName,rendererConfig:nu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ve(e))?null:e.stateNode},findFiberByHostInstance:nu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ou=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ou.isDisabled&&ou.supportsFiber)try{ot=ou.inject(ru),at=ou}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ks(t))throw Error(a(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:w,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Ks(e))throw Error(a(299));var n=!1,r="",o=Gs;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Hs(e,1,!1,null,0,n,0,r,o),e[go]=t.current,Ur(8===e.nodeType?e.parentNode:e),new Qs(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return null===(e=Ve(t))?null:e.stateNode},t.flushSync=function(e){return fs(e)},t.hydrate=function(e,t,n){if(!Xs(t))throw Error(a(200));return eu(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Ks(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,o=!1,i="",l=Gs;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onRecoverableError&&(l=n.onRecoverableError)),t=Ws(t,null,e,1,null!=n?n:null,o,0,i,l),e[go]=t.current,Ur(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Zs(t)},t.render=function(e,t,n){if(!Xs(t))throw Error(a(200));return eu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Xs(e))throw Error(a(40));return!!e._reactRootContainer&&(fs((function(){eu(null,null,e,!1,(function(){e._reactRootContainer=null,e[go]=null}))})),!0)},t.unstable_batchedUpdates=us,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Xs(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return eu(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},745:(e,t,n)=>{"use strict";var r=n(935);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},935:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(448)},921:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,A=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case f:case a:case l:case i:case p:return e;default:switch(e=e&&e.$$typeof){case s:case d:case m:case g:case c:return e;default:return t}}case o:return t}}}function w(e){return k(e)===f}t.AsyncMode=u,t.ConcurrentMode=f,t.ContextConsumer=s,t.ContextProvider=c,t.Element=r,t.ForwardRef=d,t.Fragment=a,t.Lazy=m,t.Memo=g,t.Portal=o,t.Profiler=l,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return w(e)||k(e)===u},t.isConcurrentMode=w,t.isContextConsumer=function(e){return k(e)===s},t.isContextProvider=function(e){return k(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===d},t.isFragment=function(e){return k(e)===a},t.isLazy=function(e){return k(e)===m},t.isMemo=function(e){return k(e)===g},t.isPortal=function(e){return k(e)===o},t.isProfiler=function(e){return k(e)===l},t.isStrictMode=function(e){return k(e)===i},t.isSuspense=function(e){return k(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===l||e===i||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===c||e.$$typeof===s||e.$$typeof===d||e.$$typeof===y||e.$$typeof===v||e.$$typeof===A||e.$$typeof===b)},t.typeOf=k},864:(e,t,n)=>{"use strict";e.exports=n(921)},388:function(e,t,n){var r,o;e.exports=(r=n(294),o=n(935),function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t){e.exports=r},function(e,t,n){e.exports=n(2)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n(4);n.d(t,"Accordion",(function(){return r.a})),n.d(t,"AccordionItem",(function(){return o.a})),t.default=r.a},function(e,t,n){"use strict";var r=n(0),o=n.n(r),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"renderChildren",value:function(){var e=this;return o.a.Children.map(this.props.children,(function(t){return o.a.cloneElement(t,{atomic:e.props.atomic})}))}},{key:"render",value:function(){return o.a.createElement("div",{className:"accordion"},this.renderChildren())}}]),t}(r.Component);t.a=i},function(e,t,n){"use strict";var r=n(0),o=n.n(r),a=n(5),i=n.n(a),l=n(6),c=n.n(l),s=n(11),u=n.n(s),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleDocumentClick=function(e){n.mounted&&!i.a.findDOMNode(n).contains(e.target)&&n.state.isOpen&&n.setState({isOpen:!1})},n.onClick=function(){n.setState({isOpen:!n.state.isOpen})},n.state={isOpen:!1},n.mounted=!0,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),f(t,[{key:"componentDidMount",value:function(){this.props.atomic&&(document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,!1))}},{key:"componentWillUnmount",value:function(){this.mounted=!1,document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,!1)}},{key:"render",value:function(){var e=u()(["accordion-item",{active:this.state.isOpen}]);return o.a.createElement("div",{className:e},o.a.createElement("button",{className:"title",onClick:this.onClick},this.props.title),o.a.createElement("div",{className:"panel"},this.props.children))}}]),t}(r.Component);d.propTypes={title:c.a.string},d.defaultProps={title:"TITLE"},t.a=d},function(e,t){e.exports=o},function(e,t,n){e.exports=n(7)()},function(e,t,n){"use strict";var r=n(8),o=n(9),a=n(10);e.exports=function(){function e(e,t,n,r,i,l){l!==a&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,o,a,i,l,c){if(r(t),!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,a,i,l,c],f=0;(s=new Error(t.replace(/%s/g,(function(){return u[f++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var r;!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===a)for(var i in r)o.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}var o={}.hasOwnProperty;void 0!==e&&e.exports?e.exports=n:void 0!==(r=function(){return n}.apply(t,[]))&&(e.exports=r)}()}]))},471:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case a:case l:case i:case d:case p:return e;default:switch(e=e&&e.$$typeof){case u:case s:case f:case g:case h:case c:return e;default:return t}}case o:return t}}}n=Symbol.for("react.module.reference"),t.ContextConsumer=s,t.ContextProvider=c,t.Element=r,t.ForwardRef=f,t.Fragment=a,t.Lazy=g,t.Memo=h,t.Portal=o,t.Profiler=l,t.StrictMode=i,t.Suspense=d,t.SuspenseList=p,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return b(e)===s},t.isContextProvider=function(e){return b(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return b(e)===f},t.isFragment=function(e){return b(e)===a},t.isLazy=function(e){return b(e)===g},t.isMemo=function(e){return b(e)===h},t.isPortal=function(e){return b(e)===o},t.isProfiler=function(e){return b(e)===l},t.isStrictMode=function(e){return b(e)===i},t.isSuspense=function(e){return b(e)===d},t.isSuspenseList=function(e){return b(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===l||e===i||e===d||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===h||e.$$typeof===c||e.$$typeof===s||e.$$typeof===f||e.$$typeof===n||void 0!==e.getModuleId)},t.typeOf=b},143:(e,t,n)=>{"use strict";e.exports=n(471)},408:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator,h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function b(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}function y(){}function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=b.prototype;var A=v.prototype=new y;A.constructor=v,g(A,b.prototype),A.isPureReactComponent=!0;var k=Array.isArray,w=Object.prototype.hasOwnProperty,x={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,r){var o,a={},i=null,l=null;if(null!=t)for(o in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(i=""+t.key),t)w.call(t,o)&&!C.hasOwnProperty(o)&&(a[o]=t[o]);var c=arguments.length-2;if(1===c)a.children=r;else if(1<c){for(var s=Array(c),u=0;u<c;u++)s[u]=arguments[u+2];a.children=s}if(e&&e.defaultProps)for(o in c=e.defaultProps)void 0===a[o]&&(a[o]=c[o]);return{$$typeof:n,type:e,key:i,ref:l,props:a,_owner:x.current}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var O=/\/+/g;function z(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function P(e,t,o,a,i){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var c=!1;if(null===e)c=!0;else switch(l){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case n:case r:c=!0}}if(c)return i=i(c=e),e=""===a?"."+z(c,0):a,k(i)?(o="",null!=e&&(o=e.replace(O,"$&/")+"/"),P(i,t,o,"",(function(e){return e}))):null!=i&&(E(i)&&(i=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,o+(!i.key||c&&c.key===i.key?"":(""+i.key).replace(O,"$&/")+"/")+e)),t.push(i)),1;if(c=0,a=""===a?".":a+":",k(e))for(var s=0;s<e.length;s++){var u=a+z(l=e[s],s);c+=P(l,t,o,u,i)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),s=0;!(l=e.next()).done;)c+=P(l=l.value,t,o,u=a+z(l,s++),i);else if("object"===l)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function F(e,t,n){if(null==e)return e;var r=[],o=0;return P(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function T(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var L={current:null},B={transition:null},_={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:B,ReactCurrentOwner:x};t.Children={map:F,forEach:function(e,t,n){F(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return F(e,(function(){t++})),t},toArray:function(e){return F(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=b,t.Fragment=o,t.Profiler=i,t.PureComponent=v,t.StrictMode=a,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=g({},e.props),a=e.key,i=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,l=x.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(s in t)w.call(t,s)&&!C.hasOwnProperty(s)&&(o[s]=void 0===t[s]&&void 0!==c?c[s]:t[s])}var s=arguments.length-2;if(1===s)o.children=r;else if(1<s){c=Array(s);for(var u=0;u<s;u++)c[u]=arguments[u+2];o.children=c}return{$$typeof:n,type:e.type,key:a,ref:i,props:o,_owner:l}},t.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:s,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:T}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=B.transition;B.transition={};try{e()}finally{B.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return L.current.useCallback(e,t)},t.useContext=function(e){return L.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return L.current.useDeferredValue(e)},t.useEffect=function(e,t){return L.current.useEffect(e,t)},t.useId=function(){return L.current.useId()},t.useImperativeHandle=function(e,t,n){return L.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return L.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return L.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return L.current.useMemo(e,t)},t.useReducer=function(e,t,n){return L.current.useReducer(e,t,n)},t.useRef=function(e){return L.current.useRef(e)},t.useState=function(e){return L.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return L.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return L.current.useTransition()},t.version="18.2.0"},294:(e,t,n)=>{"use strict";e.exports=n(408)},53:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<a(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var l=2*(r+1)-1,c=e[l],s=l+1,u=e[s];if(0>a(c,n))s<o&&0>a(u,c)?(e[r]=u,e[s]=n,r=s):(e[r]=c,e[l]=n,r=l);else{if(!(s<o&&0>a(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}var s=[],u=[],f=1,d=null,p=3,h=!1,g=!1,m=!1,b="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function A(e){for(var t=r(u);null!==t;){if(null===t.callback)o(u);else{if(!(t.startTime<=e))break;o(u),t.sortIndex=t.expirationTime,n(s,t)}t=r(u)}}function k(e){if(m=!1,A(e),!g)if(null!==r(s))g=!0,B(w);else{var t=r(u);null!==t&&_(k,t.startTime-e)}}function w(e,n){g=!1,m&&(m=!1,y(E),E=-1),h=!0;var a=p;try{for(A(n),d=r(s);null!==d&&(!(d.expirationTime>n)||e&&!P());){var i=d.callback;if("function"==typeof i){d.callback=null,p=d.priorityLevel;var l=i(d.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?d.callback=l:d===r(s)&&o(s),A(n)}else o(s);d=r(s)}if(null!==d)var c=!0;else{var f=r(u);null!==f&&_(k,f.startTime-n),c=!1}return c}finally{d=null,p=a,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var x,C=!1,S=null,E=-1,O=5,z=-1;function P(){return!(t.unstable_now()-z<O)}function F(){if(null!==S){var e=t.unstable_now();z=e;var n=!0;try{n=S(!0,e)}finally{n?x():(C=!1,S=null)}}else C=!1}if("function"==typeof v)x=function(){v(F)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,L=T.port2;T.port1.onmessage=F,x=function(){L.postMessage(null)}}else x=function(){b(F,0)};function B(e){S=e,C||(C=!0,x())}function _(e,n){E=b((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||h||(g=!0,B(w))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(s)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,o,a){var i=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?i+a:i,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:f++,callback:o,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>i?(e.sortIndex=a,n(u,e),null===r(s)&&e===r(u)&&(m?(y(E),E=-1):m=!0,_(k,a-i))):(e.sortIndex=l,n(s,e),g||h||(g=!0,B(w))),e},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},840:(e,t,n)=>{"use strict";e.exports=n(53)},774:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var s=a[c];if(!l(s))return!1;var u=e[s],f=t[s];if(!1===(o=n?n.call(r,u,f,s):void 0)||void 0===o&&u!==f)return!1}return!0}},379:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},i=[],l=0;l<e.length;l++){var c=e[l],s=r.base?c[0]+r.base:c[0],u=a[s]||0,f="".concat(s," ").concat(u);a[s]=u+1;var d=n(f),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)t[d].references++,t[d].updater(p);else{var h=o(p,r);r.byIndex=l,t.splice(l,0,{identifier:f,updater:h,references:1})}i.push(f)}return i}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var l=n(a[i]);t[l].references--}for(var c=r(e,o),s=0;s<a.length;s++){var u=n(a[s]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}a=c}}},569:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},848:(e,t,n)=>{var r=n(139);function o(e,t){var n,o=null;if(!e||"string"!=typeof e)return o;for(var a,i,l=r(e),c="function"==typeof t,s=0,u=l.length;s<u;s++)a=(n=l[s]).property,i=n.value,c?t(a,i,n):i&&(o||(o={}),o[a]=i);return o}e.exports=o,e.exports.default=o}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={id:r,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0,n(375),n(294),n(935)})()));-//# sourceMappingURL=chatbot.js.map\ No newline at end of filediff --git a/packages/runtime/static/embodiment/formPreview/form-preview-minified.js b/packages/runtime/static/embodiment/formPreview/form-preview-minified.jsdeleted file mode 100644index afff8674..00000000--- a/packages/runtime/static/embodiment/formPreview/form-preview-minified.js+++ /dev/null@@ -1,36 +0,0 @@--(function() {- var style = document.createElement('style');- style.textContent = "#form-preview-container *,#form-preview-container :before,#form-preview-container :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }#form-preview-container ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }#form-preview-container *,#form-preview-container :before,#form-preview-container :after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}#form-preview-container :before,#form-preview-container :after{--tw-content: \"\"}html #form-preview-container,#form-preview-container :host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body #form-preview-container{margin:0;line-height:inherit}#form-preview-container hr{height:0;color:inherit;border-top-width:1px}#form-preview-container abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}#form-preview-container h1,#form-preview-container h2,#form-preview-container h3,#form-preview-container h4,#form-preview-container h5,#form-preview-container h6{font-size:inherit;font-weight:inherit}#form-preview-container a{color:inherit;text-decoration:inherit}#form-preview-container b,#form-preview-container strong{font-weight:bolder}#form-preview-container code,#form-preview-container kbd,#form-preview-container samp,#form-preview-container pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}#form-preview-container small{font-size:80%}#form-preview-container sub,#form-preview-container sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}#form-preview-container sub{bottom:-.25em}#form-preview-container sup{top:-.5em}#form-preview-container table{text-indent:0;border-color:inherit;border-collapse:collapse}#form-preview-container button,#form-preview-container input,#form-preview-container optgroup,#form-preview-container select,#form-preview-container textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}#form-preview-container button,#form-preview-container select{text-transform:none}#form-preview-container button,#form-preview-container input:where([type=button]),#form-preview-container input:where([type=reset]),#form-preview-container input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}#form-preview-container :-moz-focusring{outline:auto}#form-preview-container :-moz-ui-invalid{box-shadow:none}#form-preview-container progress{vertical-align:baseline}#form-preview-container ::-webkit-inner-spin-button,#form-preview-container ::-webkit-outer-spin-button{height:auto}#form-preview-container [type=search]{-webkit-appearance:textfield;outline-offset:-2px}#form-preview-container ::-webkit-search-decoration{-webkit-appearance:none}#form-preview-container ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}#form-preview-container summary{display:list-item}#form-preview-container blockquote,#form-preview-container dl,#form-preview-container dd,#form-preview-container h1,#form-preview-container h2,#form-preview-container h3,#form-preview-container h4,#form-preview-container h5,#form-preview-container h6,#form-preview-container hr,#form-preview-container figure,#form-preview-container p,#form-preview-container pre{margin:0}#form-preview-container fieldset{margin:0;padding:0}#form-preview-container legend{padding:0}#form-preview-container ol,#form-preview-container ul,#form-preview-container menu{list-style:none;margin:0;padding:0}#form-preview-container dialog{padding:0}#form-preview-container textarea{resize:vertical}#form-preview-container input::-moz-placeholder,#form-preview-container textarea::-moz-placeholder{opacity:1;color:#9ca3af}#form-preview-container input::placeholder,#form-preview-container textarea::placeholder{opacity:1;color:#9ca3af}#form-preview-container button,#form-preview-container [role=button]{cursor:pointer}#form-preview-container :disabled{cursor:default}#form-preview-container img,#form-preview-container svg,#form-preview-container video,#form-preview-container canvas,#form-preview-container audio,#form-preview-container iframe,#form-preview-container embed,#form-preview-container object{display:block;vertical-align:middle}#form-preview-container img,#form-preview-container video{max-width:100%;height:auto}#form-preview-container [hidden]:where(:not([hidden=until-found])){display:none}#form-preview-container .container{width:100%}@media (min-width: 640px){#form-preview-container .container{max-width:640px}}@media (min-width: 768px){#form-preview-container .container{max-width:768px}}@media (min-width: 1024px){#form-preview-container .container{max-width:1024px}}@media (min-width: 1280px){#form-preview-container .container{max-width:1280px}}@media (min-width: 1536px){#form-preview-container .container{max-width:1536px}}#form-preview-container .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}#form-preview-container .pointer-events-none{pointer-events:none}#form-preview-container .fixed{position:fixed}#form-preview-container .absolute{position:absolute}#form-preview-container .relative{position:relative}#form-preview-container .-right-1{right:-.25rem}#form-preview-container .-top-1{top:-.25rem}#form-preview-container .bottom-6{bottom:1.5rem}#form-preview-container .right-2{right:.5rem}#form-preview-container .right-6{right:1.5rem}#form-preview-container .top-1\\/2{top:50%}#form-preview-container .top-2{top:.5rem}#form-preview-container .z-50{z-index:50}#form-preview-container .m-auto{margin:auto}#form-preview-container .mx-auto{margin-left:auto;margin-right:auto}#form-preview-container .mb-1{margin-bottom:.25rem}#form-preview-container .mb-2{margin-bottom:.5rem}#form-preview-container .mb-3{margin-bottom:.75rem}#form-preview-container .mb-4{margin-bottom:1rem}#form-preview-container .mb-6{margin-bottom:1.5rem}#form-preview-container .mb-8{margin-bottom:2rem}#form-preview-container .ml-1{margin-left:.25rem}#form-preview-container .ml-2{margin-left:.5rem}#form-preview-container .ml-auto{margin-left:auto}#form-preview-container .mr-2{margin-right:.5rem}#form-preview-container .mr-4{margin-right:1rem}#form-preview-container .mt-1{margin-top:.25rem}#form-preview-container .mt-2{margin-top:.5rem}#form-preview-container .mt-4{margin-top:1rem}#form-preview-container .mt-5{margin-top:1.25rem}#form-preview-container .mt-8{margin-top:2rem}#form-preview-container .block{display:block}#form-preview-container .inline{display:inline}#form-preview-container .flex{display:flex}#form-preview-container .inline-flex{display:inline-flex}#form-preview-container .hidden{display:none}#form-preview-container .h-1{height:.25rem}#form-preview-container .h-10{height:2.5rem}#form-preview-container .h-12{height:3rem}#form-preview-container .h-14{height:3.5rem}#form-preview-container .h-16{height:4rem}#form-preview-container .h-4{height:1rem}#form-preview-container .h-5{height:1.25rem}#form-preview-container .h-8{height:2rem}#form-preview-container .h-9{height:2.25rem}#form-preview-container .h-\\[560px\\]{height:560px}#form-preview-container .h-\\[80vh\\]{height:80vh}#form-preview-container .h-full{height:100%}#form-preview-container .max-h-\\[150px\\]{max-height:150px}#form-preview-container .min-h-screen{min-height:100vh}#form-preview-container .w-10{width:2.5rem}#form-preview-container .w-12{width:3rem}#form-preview-container .w-14{width:3.5rem}#form-preview-container .w-16{width:4rem}#form-preview-container .w-4{width:1rem}#form-preview-container .w-5{width:1.25rem}#form-preview-container .w-8{width:2rem}#form-preview-container .w-\\[380px\\]{width:380px}#form-preview-container .w-fit{width:-moz-fit-content;width:fit-content}#form-preview-container .w-full{width:100%}#form-preview-container .w-max{width:-moz-max-content;width:max-content}#form-preview-container .max-w-\\[150px\\]{max-width:150px}#form-preview-container .max-w-full{max-width:100%}#form-preview-container .flex-1{flex:1 1 0%}#form-preview-container .origin-bottom-right{transform-origin:bottom right}#form-preview-container .-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#form-preview-container .translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#form-preview-container .translate-y-4{--tw-translate-y: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#form-preview-container .rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#form-preview-container .scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#form-preview-container .scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#form-preview-container .scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#form-preview-container .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}#form-preview-container .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}#form-preview-container .animate-spin{animation:spin 1s linear infinite}#form-preview-container .cursor-default{cursor:default}#form-preview-container .cursor-pointer{cursor:pointer}#form-preview-container .resize-none{resize:none}#form-preview-container .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}#form-preview-container .flex-row{flex-direction:row}#form-preview-container .flex-col{flex-direction:column}#form-preview-container .items-start{align-items:flex-start}#form-preview-container .items-end{align-items:flex-end}#form-preview-container .items-center{align-items:center}#form-preview-container .justify-center{justify-content:center}#form-preview-container .justify-between{justify-content:space-between}#form-preview-container .gap-2{gap:.5rem}#form-preview-container .gap-3{gap:.75rem}#form-preview-container .gap-4{gap:1rem}#form-preview-container .overflow-auto{overflow:auto}#form-preview-container .overflow-hidden{overflow:hidden}#form-preview-container .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#form-preview-container .rounded{border-radius:.25rem}#form-preview-container .rounded-2xl{border-radius:1rem}#form-preview-container .rounded-full{border-radius:9999px}#form-preview-container .rounded-lg{border-radius:.5rem}#form-preview-container .rounded-md{border-radius:.375rem}#form-preview-container .border{border-width:1px}#form-preview-container .border-2{border-width:2px}#form-preview-container .border-b{border-bottom-width:1px}#form-preview-container .border-b-2{border-bottom-width:2px}#form-preview-container .border-solid{border-style:solid}#form-preview-container .border-dashed{border-style:dashed}#form-preview-container .border-\\[\\#288a68\\]{--tw-border-opacity: 1;border-color:rgb(40 138 104 / var(--tw-border-opacity, 1))}#form-preview-container .border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}#form-preview-container .border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}#form-preview-container .border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}#form-preview-container .border-transparent{border-color:transparent}#form-preview-container .border-b-gray-500{--tw-border-opacity: 1;border-bottom-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}#form-preview-container .bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}#form-preview-container .bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}#form-preview-container .bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}#form-preview-container .bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}#form-preview-container .bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}#form-preview-container .bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}#form-preview-container .bg-smythos-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}#form-preview-container .bg-transparent{background-color:transparent}#form-preview-container .bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}#form-preview-container .object-cover{-o-object-fit:cover;object-fit:cover}#form-preview-container .p-1{padding:.25rem}#form-preview-container .p-2{padding:.5rem}#form-preview-container .p-2\\.5{padding:.625rem}#form-preview-container .p-4{padding:1rem}#form-preview-container .p-6{padding:1.5rem}#form-preview-container .p-\\[9\\.5px\\]{padding:9.5px}#form-preview-container .px-4{padding-left:1rem;padding-right:1rem}#form-preview-container .px-\\[10px\\]{padding-left:10px;padding-right:10px}#form-preview-container .py-12{padding-top:3rem;padding-bottom:3rem}#form-preview-container .py-2{padding-top:.5rem;padding-bottom:.5rem}#form-preview-container .py-3{padding-top:.75rem;padding-bottom:.75rem}#form-preview-container .py-4{padding-top:1rem;padding-bottom:1rem}#form-preview-container .py-8{padding-top:2rem;padding-bottom:2rem}#form-preview-container .pb-2{padding-bottom:.5rem}#form-preview-container .text-left{text-align:left}#form-preview-container .text-center{text-align:center}#form-preview-container .text-2xl{font-size:1.5rem;line-height:2rem}#form-preview-container .text-3xl{font-size:1.875rem;line-height:2.25rem}#form-preview-container .text-base{font-size:1rem;line-height:1.5rem}#form-preview-container .text-lg{font-size:1.125rem;line-height:1.75rem}#form-preview-container .text-sm{font-size:.875rem;line-height:1.25rem}#form-preview-container .text-xl{font-size:1.25rem;line-height:1.75rem}#form-preview-container .text-xs{font-size:.75rem;line-height:1rem}#form-preview-container .font-bold{font-weight:700}#form-preview-container .font-medium{font-weight:500}#form-preview-container .font-normal{font-weight:400}#form-preview-container .font-semibold{font-weight:600}#form-preview-container .lowercase{text-transform:lowercase}#form-preview-container .text-\\[\\#1E1E1E\\]{--tw-text-opacity: 1;color:rgb(30 30 30 / var(--tw-text-opacity, 1))}#form-preview-container .text-\\[\\#3E3E3E\\]{--tw-text-opacity: 1;color:rgb(62 62 62 / var(--tw-text-opacity, 1))}#form-preview-container .text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}#form-preview-container .text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}#form-preview-container .text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}#form-preview-container .text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}#form-preview-container .text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}#form-preview-container .text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}#form-preview-container .text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}#form-preview-container .text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}#form-preview-container .text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}#form-preview-container .text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}#form-preview-container .text-smythos-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}#form-preview-container .text-v2-gray-dark{--tw-text-opacity: 1;color:rgb(66 66 66 / var(--tw-text-opacity, 1))}#form-preview-container .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}#form-preview-container .opacity-0{opacity:0}#form-preview-container .opacity-100{opacity:1}#form-preview-container .opacity-50{opacity:.5}#form-preview-container .shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#form-preview-container .shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#form-preview-container .outline-none{outline:2px solid transparent;outline-offset:2px}#form-preview-container .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)}#form-preview-container .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#form-preview-container .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#form-preview-container .transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#form-preview-container .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#form-preview-container .duration-200{transition-duration:.2s}#form-preview-container .duration-300{transition-duration:.3s}#form-preview-container .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}#form-preview-container .placeholder\\:text-sm::-moz-placeholder{font-size:.875rem;line-height:1.25rem}#form-preview-container .placeholder\\:text-sm::placeholder{font-size:.875rem;line-height:1.25rem}#form-preview-container .placeholder\\:font-normal::-moz-placeholder{font-weight:400}#form-preview-container .placeholder\\:font-normal::placeholder{font-weight:400}#form-preview-container .focus-within\\:border-b-2:focus-within{border-bottom-width:2px}#form-preview-container .focus-within\\:border-b-blue-500:focus-within{--tw-border-opacity: 1;border-bottom-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}#form-preview-container .hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}#form-preview-container .hover\\:bg-smyth-blue:hover{--tw-bg-opacity: 1;background-color:rgb(19 85 182 / var(--tw-bg-opacity, 1))}#form-preview-container .hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}#form-preview-container .hover\\:underline:hover{text-decoration-line:underline}#form-preview-container .hover\\:opacity-100:hover{opacity:1}#form-preview-container .focus\\:border-b-2:focus{border-bottom-width:2px}#form-preview-container .focus\\:border-cyan-500:focus{--tw-border-opacity: 1;border-color:rgb(6 182 212 / var(--tw-border-opacity, 1))}#form-preview-container .focus\\:border-b-blue-500:focus{--tw-border-opacity: 1;border-bottom-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}#form-preview-container .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#form-preview-container .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(0px + 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)}#form-preview-container .focus\\:ring-cyan-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(6 182 212 / var(--tw-ring-opacity, 1))}#form-preview-container .focus\\:ring-offset-0:focus{--tw-ring-offset-width: 0px}#form-preview-container .focus-visible\\:border-b-2:focus-visible{border-bottom-width:2px}#form-preview-container .focus-visible\\:border-b-blue-500:focus-visible{--tw-border-opacity: 1;border-bottom-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}#form-preview-container .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}#form-preview-container .disabled\\:opacity-50:disabled{opacity:.5}#form-preview-container .group:hover .group-hover\\:bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}#form-preview-container .group:hover .group-hover\\:opacity-100{opacity:1}@media (prefers-color-scheme: dark){#form-preview-container .dark\\:border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}#form-preview-container .dark\\:bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}#form-preview-container .dark\\:text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}#form-preview-container .dark\\:text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}#form-preview-container .dark\\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}#form-preview-container .dark\\:placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}#form-preview-container .dark\\:placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}#form-preview-container .dark\\:focus\\:border-cyan-500:focus{--tw-border-opacity: 1;border-color:rgb(6 182 212 / var(--tw-border-opacity, 1))}#form-preview-container .dark\\:focus\\:ring-cyan-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(6 182 212 / var(--tw-ring-opacity, 1))}}#form-preview-container .\\[\\&\\:hover_actionicons\\]\\:opacity-100:hover actionicons{opacity:1}\n";- document.head.appendChild(style);-})();--!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,l=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,i=(e,t)=>{for(var n in t||(t={}))a.call(t,n)&&l(e,n,t[n]);if(r)for(var n of r(t))o.call(t,n)&&l(e,n,t[n]);return e},s=(e,r)=>t(e,n(r)),u=(e,t)=>{var n={};for(var l in e)a.call(e,l)&&t.indexOf(l)<0&&(n[l]=e[l]);if(null!=e&&r)for(var l of r(e))t.indexOf(l)<0&&o.call(e,l)&&(n[l]=e[l]);return n},c=(e,t,n)=>new Promise((r,a)=>{var o=e=>{try{i(n.next(e))}catch(fv){a(fv)}},l=e=>{try{i(n.throw(e))}catch(fv){a(fv)}},i=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,l);i((n=n.apply(e,t)).next())});function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var f={exports:{}},p={},h={exports:{}},m={},g=Symbol.for("react.element"),b=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),k=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),_=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),C=Symbol.iterator;var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,N={};function F(e,t,n){this.props=e,this.context=t,this.refs=N,this.updater=n||O}function P(){}function z(e,t,n){this.props=e,this.context=t,this.refs=N,this.updater=n||O}F.prototype.isReactComponent={},F.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},F.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},P.prototype=F.prototype;var L=z.prototype=new P;L.constructor=z,T(L,F.prototype),L.isPureReactComponent=!0;var M=Array.isArray,A=Object.prototype.hasOwnProperty,D={current:null},I={key:!0,ref:!0,__self:!0,__source:!0};function R(e,t,n){var r,a={},o=null,l=null;if(null!=t)for(r in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(o=""+t.key),t)A.call(t,r)&&!I.hasOwnProperty(r)&&(a[r]=t[r]);var i=arguments.length-2;if(1===i)a.children=n;else if(1<i){for(var s=Array(i),u=0;u<i;u++)s[u]=arguments[u+2];a.children=s}if(e&&e.defaultProps)for(r in i=e.defaultProps)void 0===a[r]&&(a[r]=i[r]);return{$$typeof:g,type:e,key:o,ref:l,props:a,_owner:D.current}}function $(e){return"object"==typeof e&&null!==e&&e.$$typeof===g}var U=/\/+/g;function V(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function B(e,t,n,r,a){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var l=!1;if(null===e)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case g:case b:l=!0}}if(l)return a=a(l=e),e=""===r?"."+V(l,0):r,M(a)?(n="",null!=e&&(n=e.replace(U,"$&/")+"/"),B(a,t,n,"",function(e){return e})):null!=a&&($(a)&&(a=function(e,t){return{$$typeof:g,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(U,"$&/")+"/")+e)),t.push(a)),1;if(l=0,r=""===r?".":r+":",M(e))for(var i=0;i<e.length;i++){var s=r+V(o=e[i],i);l+=B(o,t,n,s,a)}else if(s=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=C&&e[C]||e["@@iterator"])?e:null}(e),"function"==typeof s)for(e=s.call(e),i=0;!(o=e.next()).done;)l+=B(o=o.value,t,n,s=r+V(o,i++),a);else if("object"===o)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function W(e,t,n){if(null==e)return e;var r=[],a=0;return B(e,r,"","",function(e){return t.call(n,e,a++)}),r}function H(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var Q={current:null},q={transition:null},G={ReactCurrentDispatcher:Q,ReactCurrentBatchConfig:q,ReactCurrentOwner:D};function Z(){throw Error("act(...) is not supported in production builds of React.")}m.Children={map:W,forEach:function(e,t,n){W(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return W(e,function(){t++}),t},toArray:function(e){return W(e,function(e){return e})||[]},only:function(e){if(!$(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},m.Component=F,m.Fragment=v,m.Profiler=x,m.PureComponent=z,m.StrictMode=y,m.Suspense=E,m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,m.act=Z,m.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=T({},e.props),a=e.key,o=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,l=D.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(s in t)A.call(t,s)&&!I.hasOwnProperty(s)&&(r[s]=void 0===t[s]&&void 0!==i?i[s]:t[s])}var s=arguments.length-2;if(1===s)r.children=n;else if(1<s){i=Array(s);for(var u=0;u<s;u++)i[u]=arguments[u+2];r.children=i}return{$$typeof:g,type:e.type,key:a,ref:o,props:r,_owner:l}},m.createContext=function(e){return(e={$$typeof:k,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:w,_context:e},e.Consumer=e},m.createElement=R,m.createFactory=function(e){var t=R.bind(null,e);return t.type=e,t},m.createRef=function(){return{current:null}},m.forwardRef=function(e){return{$$typeof:S,render:e}},m.isValidElement=$,m.lazy=function(e){return{$$typeof:j,_payload:{_status:-1,_result:e},_init:H}},m.memo=function(e,t){return{$$typeof:_,type:e,compare:void 0===t?null:t}},m.startTransition=function(e){var t=q.transition;q.transition={};try{e()}finally{q.transition=t}},m.unstable_act=Z,m.useCallback=function(e,t){return Q.current.useCallback(e,t)},m.useContext=function(e){return Q.current.useContext(e)},m.useDebugValue=function(){},m.useDeferredValue=function(e){return Q.current.useDeferredValue(e)},m.useEffect=function(e,t){return Q.current.useEffect(e,t)},m.useId=function(){return Q.current.useId()},m.useImperativeHandle=function(e,t,n){return Q.current.useImperativeHandle(e,t,n)},m.useInsertionEffect=function(e,t){return Q.current.useInsertionEffect(e,t)},m.useLayoutEffect=function(e,t){return Q.current.useLayoutEffect(e,t)},m.useMemo=function(e,t){return Q.current.useMemo(e,t)},m.useReducer=function(e,t,n){return Q.current.useReducer(e,t,n)},m.useRef=function(e){return Q.current.useRef(e)},m.useState=function(e){return Q.current.useState(e)},m.useSyncExternalStore=function(e,t,n){return Q.current.useSyncExternalStore(e,t,n)},m.useTransition=function(){return Q.current.useTransition()},m.version="18.3.1",h.exports=m;var K=h.exports;const Y=d(K);-/**- * @license React- * react-jsx-runtime.production.min.js- *- * Copyright (c) Facebook, Inc. and its affiliates.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- */var J=K,X=Symbol.for("react.element"),ee=Symbol.for("react.fragment"),te=Object.prototype.hasOwnProperty,ne=J.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,re={key:!0,ref:!0,__self:!0,__source:!0};function ae(e,t,n){var r,a={},o=null,l=null;for(r in void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(l=t.ref),t)te.call(t,r)&&!re.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:X,type:e,key:o,ref:l,props:a,_owner:ne.current}}p.Fragment=ee,p.jsx=ae,p.jsxs=ae,f.exports=p;var oe=f.exports,le={},ie={exports:{}},se={},ue={exports:{}},ce={};-/**- * @license React- * scheduler.production.min.js- *- * Copyright (c) Facebook, Inc. and its affiliates.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- */-!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<a(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,l=o>>>1;r<l;){var i=2*(r+1)-1,s=e[i],u=i+1,c=e[u];if(0>a(s,n))u<o&&0>a(c,s)?(e[r]=c,e[u]=n,r=u):(e[r]=s,e[i]=n,r=i);else{if(!(u<o&&0>a(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,i=l.now();e.unstable_now=function(){return l.now()-i}}var s=[],u=[],c=1,d=null,f=3,p=!1,h=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function y(e){for(var a=n(u);null!==a;){if(null===a.callback)r(u);else{if(!(a.startTime<=e))break;r(u),a.sortIndex=a.expirationTime,t(s,a)}a=n(u)}}function x(e){if(m=!1,y(e),!h)if(null!==n(s))h=!0,P(w);else{var t=n(u);null!==t&&z(x,t.startTime-e)}}function w(t,a){h=!1,m&&(m=!1,b(_),_=-1),p=!0;var o=f;try{for(y(a),d=n(s);null!==d&&(!(d.expirationTime>a)||t&&!O());){var l=d.callback;if("function"==typeof l){d.callback=null,f=d.priorityLevel;var i=l(d.expirationTime<=a);a=e.unstable_now(),"function"==typeof i?d.callback=i:d===n(s)&&r(s),y(a)}else r(s);d=n(s)}if(null!==d)var c=!0;else{var g=n(u);null!==g&&z(x,g.startTime-a),c=!1}return c}finally{d=null,f=o,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,S=!1,E=null,_=-1,j=5,C=-1;function O(){return!(e.unstable_now()-C<j)}function T(){if(null!==E){var t=e.unstable_now();C=t;var n=!0;try{n=E(!0,t)}finally{n?k():(S=!1,E=null)}}else S=!1}if("function"==typeof v)k=function(){v(T)};else if("undefined"!=typeof MessageChannel){var N=new MessageChannel,F=N.port2;N.port1.onmessage=T,k=function(){F.postMessage(null)}}else k=function(){g(T,0)};function P(e){E=e,S||(S=!0,k())}function z(t,n){_=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){h||p||(h=!0,P(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,a,o){var l=e.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?l+o:l:o=l,r){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return r={id:c++,callback:a,priorityLevel:r,startTime:o,expirationTime:i=o+i,sortIndex:-1},o>l?(r.sortIndex=o,t(u,r),null===n(s)&&r===n(u)&&(m?(b(_),_=-1):m=!0,z(x,o-l))):(r.sortIndex=i,t(s,r),h||p||(h=!0,P(w))),r},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(ce),ue.exports=ce;var de=ue.exports,fe=K,pe=de;-/**- * @license React- * react-dom.production.min.js- *- * Copyright (c) Facebook, Inc. and its affiliates.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- */function he(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var me=new Set,ge={};function be(e,t){ve(e,t),ve(e+"Capture",t)}function ve(e,t){for(ge[e]=t,e=0;e<t.length;e++)me.add(t[e])}var ye=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),xe=Object.prototype.hasOwnProperty,we=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ke={},Se={};function Ee(e,t,n,r,a,o,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var _e={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_e[e]=new Ee(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_e[t]=new Ee(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){_e[e]=new Ee(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_e[e]=new Ee(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){_e[e]=new Ee(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){_e[e]=new Ee(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){_e[e]=new Ee(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){_e[e]=new Ee(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){_e[e]=new Ee(e,5,!1,e.toLowerCase(),null,!1,!1)});var je=/[\-:]([a-z])/g;function Ce(e){return e[1].toUpperCase()}function Oe(e,t,n,r){var a=_e.hasOwnProperty(t)?_e[t]:null;(null!==a?0!==a.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!xe.call(Se,e)||!xe.call(ke,e)&&(we.test(e)?Se[e]=!0:(ke[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(je,Ce);_e[t]=new Ee(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(je,Ce);_e[t]=new Ee(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(je,Ce);_e[t]=new Ee(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){_e[e]=new Ee(e,1,!1,e.toLowerCase(),null,!1,!1)}),_e.xlinkHref=new Ee("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){_e[e]=new Ee(e,1,!1,e.toLowerCase(),null,!0,!0)});var Te=fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ne=Symbol.for("react.element"),Fe=Symbol.for("react.portal"),Pe=Symbol.for("react.fragment"),ze=Symbol.for("react.strict_mode"),Le=Symbol.for("react.profiler"),Me=Symbol.for("react.provider"),Ae=Symbol.for("react.context"),De=Symbol.for("react.forward_ref"),Ie=Symbol.for("react.suspense"),Re=Symbol.for("react.suspense_list"),$e=Symbol.for("react.memo"),Ue=Symbol.for("react.lazy"),Ve=Symbol.for("react.offscreen"),Be=Symbol.iterator;function We(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Be&&e[Be]||e["@@iterator"])?e:null}var He,Qe=Object.assign;function qe(e){if(void 0===He)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);He=t&&t[1]||""}return"\n"+He+e}var Ge=!1;function Ze(e,t){if(!e||Ge)return"";Ge=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"==typeof u.stack){for(var a=u.stack.split("\n"),o=r.stack.split("\n"),l=a.length-1,i=o.length-1;1<=l&&0<=i&&a[l]!==o[i];)i--;for(;1<=l&&0<=i;l--,i--)if(a[l]!==o[i]){if(1!==l||1!==i)do{if(l--,0>--i||a[l]!==o[i]){var s="\n"+a[l].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}}while(1<=l&&0<=i);break}}}finally{Ge=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?qe(e):""}function Ke(e){switch(e.tag){case 5:return qe(e.type);case 16:return qe("Lazy");case 13:return qe("Suspense");case 19:return qe("SuspenseList");case 0:case 2:case 15:return e=Ze(e.type,!1);case 11:return e=Ze(e.type.render,!1);case 1:return e=Ze(e.type,!0);default:return""}}function Ye(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Pe:return"Fragment";case Fe:return"Portal";case Le:return"Profiler";case ze:return"StrictMode";case Ie:return"Suspense";case Re:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Ae:return(e.displayName||"Context")+".Consumer";case Me:return(e._context.displayName||"Context")+".Provider";case De:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case $e:return null!==(t=e.displayName||null)?t:Ye(e.type)||"Memo";case Ue:t=e._payload,e=e._init;try{return Ye(e(t))}catch(n){}}return null}function Je(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ye(t);case 8:return t===ze?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function Xe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function et(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function tt(e){e._valueTracker||(e._valueTracker=function(e){var t=et(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function nt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=et(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function rt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function at(e,t){var n=t.checked;return Qe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ot(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Xe(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function lt(e,t){null!=(t=t.checked)&&Oe(e,"checked",t,!1)}function it(e,t){lt(e,t);var n=Xe(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ut(e,t.type,n):t.hasOwnProperty("defaultValue")&&ut(e,t.type,Xe(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function st(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ut(e,t,n){"number"===t&&rt(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ct=Array.isArray;function dt(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Xe(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function ft(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(he(91));return Qe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function pt(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(he(92));if(ct(n)){if(1<n.length)throw Error(he(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Xe(n)}}function ht(e,t){var n=Xe(t.value),r=Xe(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function mt(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function gt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function bt(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?gt(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var vt,yt,xt=(yt=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((vt=vt||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=vt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return yt(e,t)})}:yt);function wt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var kt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},St=["Webkit","ms","Moz","O"];function Et(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||kt.hasOwnProperty(e)&&kt[e]?(""+t).trim():t+"px"}function _t(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=Et(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(kt).forEach(function(e){St.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),kt[t]=kt[e]})});var jt=Qe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ct(e,t){if(t){if(jt[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(he(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(he(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(he(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(he(62))}}function Ot(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Tt=null;function Nt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ft=null,Pt=null,zt=null;function Lt(e){if(e=To(e)){if("function"!=typeof Ft)throw Error(he(280));var t=e.stateNode;t&&(t=Fo(t),Ft(e.stateNode,e.type,t))}}function Mt(e){Pt?zt?zt.push(e):zt=[e]:Pt=e}function At(){if(Pt){var e=Pt,t=zt;if(zt=Pt=null,Lt(e),t)for(e=0;e<t.length;e++)Lt(t[e])}}function Dt(e,t){return e(t)}function It(){}var Rt=!1;function $t(e,t,n){if(Rt)return e(t,n);Rt=!0;try{return Dt(e,t,n)}finally{Rt=!1,(null!==Pt||null!==zt)&&(It(),At())}}function Ut(e,t){var n=e.stateNode;if(null===n)return null;var r=Fo(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(he(231,t,typeof n));return n}var Vt=!1;if(ye)try{var Bt={};Object.defineProperty(Bt,"passive",{get:function(){Vt=!0}}),window.addEventListener("test",Bt,Bt),window.removeEventListener("test",Bt,Bt)}catch(yt){Vt=!1}function Wt(e,t,n,r,a,o,l,i,s){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Ht=!1,Qt=null,qt=!1,Gt=null,Zt={onError:function(e){Ht=!0,Qt=e}};function Kt(e,t,n,r,a,o,l,i,s){Ht=!1,Qt=null,Wt.apply(Zt,arguments)}function Yt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Jt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Xt(e){if(Yt(e)!==e)throw Error(he(188))}function en(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Yt(e)))throw Error(he(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(null===a)break;var o=a.alternate;if(null===o){if(null!==(r=a.return)){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return Xt(a),e;if(o===r)return Xt(a),t;o=o.sibling}throw Error(he(188))}if(n.return!==r.return)n=a,r=o;else{for(var l=!1,i=a.child;i;){if(i===n){l=!0,n=a,r=o;break}if(i===r){l=!0,r=a,n=o;break}i=i.sibling}if(!l){for(i=o.child;i;){if(i===n){l=!0,n=o,r=a;break}if(i===r){l=!0,r=o,n=a;break}i=i.sibling}if(!l)throw Error(he(189))}}if(n.alternate!==r)throw Error(he(190))}if(3!==n.tag)throw Error(he(188));return n.stateNode.current===n?e:t}(e))?tn(e):null}function tn(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=tn(e);if(null!==t)return t;e=e.sibling}return null}var nn=pe.unstable_scheduleCallback,rn=pe.unstable_cancelCallback,an=pe.unstable_shouldYield,on=pe.unstable_requestPaint,ln=pe.unstable_now,sn=pe.unstable_getCurrentPriorityLevel,un=pe.unstable_ImmediatePriority,cn=pe.unstable_UserBlockingPriority,dn=pe.unstable_NormalPriority,fn=pe.unstable_LowPriority,pn=pe.unstable_IdlePriority,hn=null,mn=null;var gn=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(bn(e)/vn|0)|0},bn=Math.log,vn=Math.LN2;var yn=64,xn=4194304;function wn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function kn(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,a=e.suspendedLanes,o=e.pingedLanes,l=268435455&n;if(0!==l){var i=l&~a;0!==i?r=wn(i):0!==(o&=l)&&(r=wn(o))}else 0!==(l=n&~a)?r=wn(l):0!==o&&(r=wn(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&a)&&((a=r&-r)>=(o=t&-t)||16===a&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)a=1<<(n=31-gn(t)),r|=e[n],t&=~a;return r}function Sn(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function En(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function _n(){var e=yn;return!(4194240&(yn<<=1))&&(yn=64),e}function jn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Cn(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-gn(t)]=n}function On(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-gn(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}var Tn=0;function Nn(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var Fn,Pn,zn,Ln,Mn,An=!1,Dn=[],In=null,Rn=null,$n=null,Un=new Map,Vn=new Map,Bn=[],Wn="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Hn(e,t){switch(e){case"focusin":case"focusout":In=null;break;case"dragenter":case"dragleave":Rn=null;break;case"mouseover":case"mouseout":$n=null;break;case"pointerover":case"pointerout":Un.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vn.delete(t.pointerId)}}function Qn(e,t,n,r,a,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[a]},null!==t&&(null!==(t=To(t))&&Pn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function qn(e){var t=Oo(e.target);if(null!==t){var n=Yt(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Jt(n)))return e.blockedOn=t,void Mn(e.priority,function(){zn(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Gn(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=or(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=To(n))&&Pn(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Tt=r,n.target.dispatchEvent(r),Tt=null,t.shift()}return!0}function Zn(e,t,n){Gn(e)&&n.delete(t)}function Kn(){An=!1,null!==In&&Gn(In)&&(In=null),null!==Rn&&Gn(Rn)&&(Rn=null),null!==$n&&Gn($n)&&($n=null),Un.forEach(Zn),Vn.forEach(Zn)}function Yn(e,t){e.blockedOn===t&&(e.blockedOn=null,An||(An=!0,pe.unstable_scheduleCallback(pe.unstable_NormalPriority,Kn)))}function Jn(e){function t(t){return Yn(t,e)}if(0<Dn.length){Yn(Dn[0],e);for(var n=1;n<Dn.length;n++){var r=Dn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==In&&Yn(In,e),null!==Rn&&Yn(Rn,e),null!==$n&&Yn($n,e),Un.forEach(t),Vn.forEach(t),n=0;n<Bn.length;n++)(r=Bn[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Bn.length&&null===(n=Bn[0]).blockedOn;)qn(n),null===n.blockedOn&&Bn.shift()}var Xn=Te.ReactCurrentBatchConfig,er=!0;function tr(e,t,n,r){var a=Tn,o=Xn.transition;Xn.transition=null;try{Tn=1,rr(e,t,n,r)}finally{Tn=a,Xn.transition=o}}function nr(e,t,n,r){var a=Tn,o=Xn.transition;Xn.transition=null;try{Tn=4,rr(e,t,n,r)}finally{Tn=a,Xn.transition=o}}function rr(e,t,n,r){if(er){var a=or(e,t,n,r);if(null===a)Xa(e,t,r,ar,n),Hn(e,r);else if(function(e,t,n,r,a){switch(t){case"focusin":return In=Qn(In,e,t,n,r,a),!0;case"dragenter":return Rn=Qn(Rn,e,t,n,r,a),!0;case"mouseover":return $n=Qn($n,e,t,n,r,a),!0;case"pointerover":var o=a.pointerId;return Un.set(o,Qn(Un.get(o)||null,e,t,n,r,a)),!0;case"gotpointercapture":return o=a.pointerId,Vn.set(o,Qn(Vn.get(o)||null,e,t,n,r,a)),!0}return!1}(a,e,t,n,r))r.stopPropagation();else if(Hn(e,r),4&t&&-1<Wn.indexOf(e)){for(;null!==a;){var o=To(a);if(null!==o&&Fn(o),null===(o=or(e,t,n,r))&&Xa(e,t,r,ar,n),o===a)break;a=o}null!==a&&r.stopPropagation()}else Xa(e,t,r,null,n)}}var ar=null;function or(e,t,n,r){if(ar=null,null!==(e=Oo(e=Nt(r))))if(null===(t=Yt(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Jt(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ar=e,null}function lr(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(sn()){case un:return 1;case cn:return 4;case dn:case fn:return 16;case pn:return 536870912;default:return 16}default:return 16}}var ir=null,sr=null,ur=null;function cr(){if(ur)return ur;var e,t,n=sr,r=n.length,a="value"in ir?ir.value:ir.textContent,o=a.length;for(e=0;e<r&&n[e]===a[e];e++);var l=r-e;for(t=1;t<=l&&n[r-t]===a[o-t];t++);return ur=a.slice(e,1<t?1-t:void 0)}function dr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function fr(){return!0}function pr(){return!1}function hr(e){function t(t,n,r,a,o){for(var l in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(l)&&(t=e[l],this[l]=t?t(a):a[l]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?fr:pr,this.isPropagationStopped=pr,this}return Qe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=fr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=fr)},persist:function(){},isPersistent:fr}),t}var mr,gr,br,vr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yr=hr(vr),xr=Qe({},vr,{view:0,detail:0}),wr=hr(xr),kr=Qe({},xr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lr,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==br&&(br&&"mousemove"===e.type?(mr=e.screenX-br.screenX,gr=e.screenY-br.screenY):gr=mr=0,br=e),mr)},movementY:function(e){return"movementY"in e?e.movementY:gr}}),Sr=hr(kr),Er=hr(Qe({},kr,{dataTransfer:0})),_r=hr(Qe({},xr,{relatedTarget:0})),jr=hr(Qe({},vr,{animationName:0,elapsedTime:0,pseudoElement:0})),Cr=Qe({},vr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Or=hr(Cr),Tr=hr(Qe({},vr,{data:0})),Nr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Pr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Pr[e])&&!!t[e]}function Lr(){return zr}var Mr=Qe({},xr,{key:function(e){if(e.key){var t=Nr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=dr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Fr[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lr,charCode:function(e){return"keypress"===e.type?dr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?dr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Ar=hr(Mr),Dr=hr(Qe({},kr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ir=hr(Qe({},xr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lr})),Rr=hr(Qe({},vr,{propertyName:0,elapsedTime:0,pseudoElement:0})),$r=Qe({},kr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ur=hr($r),Vr=[9,13,27,32],Br=ye&&"CompositionEvent"in window,Wr=null;ye&&"documentMode"in document&&(Wr=document.documentMode);var Hr=ye&&"TextEvent"in window&&!Wr,Qr=ye&&(!Br||Wr&&8<Wr&&11>=Wr),qr=String.fromCharCode(32),Gr=!1;function Zr(e,t){switch(e){case"keyup":return-1!==Vr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Yr=!1;var Jr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Jr[e.type]:"textarea"===t}function ea(e,t,n,r){Mt(r),0<(t=to(t,"onChange")).length&&(n=new yr("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ta=null,na=null;function ra(e){qa(e,0)}function aa(e){if(nt(No(e)))return e}function oa(e,t){if("change"===e)return t}var la=!1;if(ye){var ia;if(ye){var sa="oninput"in document;if(!sa){var ua=document.createElement("div");ua.setAttribute("oninput","return;"),sa="function"==typeof ua.oninput}ia=sa}else ia=!1;la=ia&&(!document.documentMode||9<document.documentMode)}function ca(){ta&&(ta.detachEvent("onpropertychange",da),na=ta=null)}function da(e){if("value"===e.propertyName&&aa(na)){var t=[];ea(t,na,e,Nt(e)),$t(ra,t)}}function fa(e,t,n){"focusin"===e?(ca(),na=n,(ta=t).attachEvent("onpropertychange",da)):"focusout"===e&&ca()}function pa(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return aa(na)}function ha(e,t){if("click"===e)return aa(t)}function ma(e,t){if("input"===e||"change"===e)return aa(t)}var ga="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ba(e,t){if(ga(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var a=n[r];if(!xe.call(t,a)||!ga(e[a],t[a]))return!1}return!0}function va(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ya(e,t){var n,r=va(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=va(r)}}function xa(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?xa(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function wa(){for(var e=window,t=rt();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=rt((e=t.contentWindow).document)}return t}function ka(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Sa(e){var t=wa(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&xa(n.ownerDocument.documentElement,n)){if(null!==r&&ka(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var a=n.textContent.length,o=Math.min(r.start,a);r=void 0===r.end?o:Math.min(r.end,a),!e.extend&&o>r&&(a=r,r=o,o=a),a=ya(n,o);var l=ya(n,r);a&&l&&(1!==e.rangeCount||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&((t=t.createRange()).setStart(a.node,a.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ea=ye&&"documentMode"in document&&11>=document.documentMode,_a=null,ja=null,Ca=null,Oa=!1;function Ta(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Oa||null==_a||_a!==rt(r)||("selectionStart"in(r=_a)&&ka(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},Ca&&ba(Ca,r)||(Ca=r,0<(r=to(ja,"onSelect")).length&&(t=new yr("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=_a)))}function Na(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Fa={animationend:Na("Animation","AnimationEnd"),animationiteration:Na("Animation","AnimationIteration"),animationstart:Na("Animation","AnimationStart"),transitionend:Na("Transition","TransitionEnd")},Pa={},za={};function La(e){if(Pa[e])return Pa[e];if(!Fa[e])return e;var t,n=Fa[e];for(t in n)if(n.hasOwnProperty(t)&&t in za)return Pa[e]=n[t];return e}ye&&(za=document.createElement("div").style,"AnimationEvent"in window||(delete Fa.animationend.animation,delete Fa.animationiteration.animation,delete Fa.animationstart.animation),"TransitionEvent"in window||delete Fa.transitionend.transition);var Ma=La("animationend"),Aa=La("animationiteration"),Da=La("animationstart"),Ia=La("transitionend"),Ra=new Map,$a="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ua(e,t){Ra.set(e,t),be(t,[e])}for(var Va=0;Va<$a.length;Va++){var Ba=$a[Va];Ua(Ba.toLowerCase(),"on"+(Ba[0].toUpperCase()+Ba.slice(1)))}Ua(Ma,"onAnimationEnd"),Ua(Aa,"onAnimationIteration"),Ua(Da,"onAnimationStart"),Ua("dblclick","onDoubleClick"),Ua("focusin","onFocus"),Ua("focusout","onBlur"),Ua(Ia,"onTransitionEnd"),ve("onMouseEnter",["mouseout","mouseover"]),ve("onMouseLeave",["mouseout","mouseover"]),ve("onPointerEnter",["pointerout","pointerover"]),ve("onPointerLeave",["pointerout","pointerover"]),be("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),be("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),be("onBeforeInput",["compositionend","keypress","textInput","paste"]),be("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),be("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),be("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wa="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ha=new Set("cancel close invalid load scroll toggle".split(" ").concat(Wa));function Qa(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,a,o,l,i,s){if(Kt.apply(this,arguments),Ht){if(!Ht)throw Error(he(198));var u=Qt;Ht=!1,Qt=null,qt||(qt=!0,Gt=u)}}(r,t,void 0,e),e.currentTarget=null}function qa(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var l=r.length-1;0<=l;l--){var i=r[l],s=i.instance,u=i.currentTarget;if(i=i.listener,s!==o&&a.isPropagationStopped())break e;Qa(a,i,u),o=s}else for(l=0;l<r.length;l++){if(s=(i=r[l]).instance,u=i.currentTarget,i=i.listener,s!==o&&a.isPropagationStopped())break e;Qa(a,i,u),o=s}}}if(qt)throw e=Gt,qt=!1,Gt=null,e}function Ga(e,t){var n=t[_o];void 0===n&&(n=t[_o]=new Set);var r=e+"__bubble";n.has(r)||(Ja(t,e,2,!1),n.add(r))}function Za(e,t,n){var r=0;t&&(r|=4),Ja(n,e,r,t)}var Ka="_reactListening"+Math.random().toString(36).slice(2);function Ya(e){if(!e[Ka]){e[Ka]=!0,me.forEach(function(t){"selectionchange"!==t&&(Ha.has(t)||Za(t,!1,e),Za(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Ka]||(t[Ka]=!0,Za("selectionchange",!1,t))}}function Ja(e,t,n,r){switch(lr(t)){case 1:var a=tr;break;case 4:a=nr;break;default:a=rr}n=a.bind(null,t,n,e),a=void 0,!Vt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Xa(e,t,n,r,a){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var l=r.tag;if(3===l||4===l){var i=r.stateNode.containerInfo;if(i===a||8===i.nodeType&&i.parentNode===a)break;if(4===l)for(l=r.return;null!==l;){var s=l.tag;if((3===s||4===s)&&((s=l.stateNode.containerInfo)===a||8===s.nodeType&&s.parentNode===a))return;l=l.return}for(;null!==i;){if(null===(l=Oo(i)))return;if(5===(s=l.tag)||6===s){r=o=l;continue e}i=i.parentNode}}r=r.return}$t(function(){var r=o,a=Nt(n),l=[];e:{var i=Ra.get(e);if(void 0!==i){var s=yr,u=e;switch(e){case"keypress":if(0===dr(n))break e;case"keydown":case"keyup":s=Ar;break;case"focusin":u="focus",s=_r;break;case"focusout":u="blur",s=_r;break;case"beforeblur":case"afterblur":s=_r;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=Sr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=Er;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=Ir;break;case Ma:case Aa:case Da:s=jr;break;case Ia:s=Rr;break;case"scroll":s=wr;break;case"wheel":s=Ur;break;case"copy":case"cut":case"paste":s=Or;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=Dr}var c=!!(4&t),d=!c&&"scroll"===e,f=c?null!==i?i+"Capture":null:i;c=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=Ut(h,f))&&c.push(eo(h,m,p)))),d)break;h=h.return}0<c.length&&(i=new s(i,u,null,n,a),l.push({event:i,listeners:c}))}}if(!(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(i="mouseover"===e||"pointerover"===e)||n===Tt||!(u=n.relatedTarget||n.fromElement)||!Oo(u)&&!u[Eo])&&(s||i)&&(i=a.window===a?a:(i=a.ownerDocument)?i.defaultView||i.parentWindow:window,s?(s=r,null!==(u=(u=n.relatedTarget||n.toElement)?Oo(u):null)&&(u!==(d=Yt(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(s=null,u=r),s!==u)){if(c=Sr,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=Dr,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==s?i:No(s),p=null==u?i:No(u),(i=new c(m,h+"leave",s,n,a)).target=d,i.relatedTarget=p,m=null,Oo(a)===r&&((c=new c(f,h+"enter",u,n,a)).target=p,c.relatedTarget=d,m=c),d=m,s&&u)e:{for(f=u,h=0,p=c=s;p;p=no(p))h++;for(p=0,m=f;m;m=no(m))p++;for(;0<h-p;)c=no(c),h--;for(;0<p-h;)f=no(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=no(c),f=no(f)}c=null}else c=null;null!==s&&ro(l,i,s,c,!1),null!==u&&null!==d&&ro(l,d,u,c,!0)}if("select"===(s=(i=r?No(r):window).nodeName&&i.nodeName.toLowerCase())||"input"===s&&"file"===i.type)var g=oa;else if(Xr(i))if(la)g=ma;else{g=pa;var b=fa}else(s=i.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(g=ha);switch(g&&(g=g(e,r))?ea(l,g,n,a):(b&&b(e,i,r),"focusout"===e&&(b=i._wrapperState)&&b.controlled&&"number"===i.type&&ut(i,"number",i.value)),b=r?No(r):window,e){case"focusin":(Xr(b)||"true"===b.contentEditable)&&(_a=b,ja=r,Ca=null);break;case"focusout":Ca=ja=_a=null;break;case"mousedown":Oa=!0;break;case"contextmenu":case"mouseup":case"dragend":Oa=!1,Ta(l,n,a);break;case"selectionchange":if(Ea)break;case"keydown":case"keyup":Ta(l,n,a)}var v;if(Br)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else Yr?Zr(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(Qr&&"ko"!==n.locale&&(Yr||"onCompositionStart"!==y?"onCompositionEnd"===y&&Yr&&(v=cr()):(sr="value"in(ir=a)?ir.value:ir.textContent,Yr=!0)),0<(b=to(r,y)).length&&(y=new Tr(y,e,null,n,a),l.push({event:y,listeners:b}),v?y.data=v:null!==(v=Kr(n))&&(y.data=v))),(v=Hr?function(e,t){switch(e){case"compositionend":return Kr(t);case"keypress":return 32!==t.which?null:(Gr=!0,qr);case"textInput":return(e=t.data)===qr&&Gr?null:e;default:return null}}(e,n):function(e,t){if(Yr)return"compositionend"===e||!Br&&Zr(e,t)?(e=cr(),ur=sr=ir=null,Yr=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Qr&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=to(r,"onBeforeInput")).length&&(a=new Tr("onBeforeInput","beforeinput",null,n,a),l.push({event:a,listeners:r}),a.data=v))}qa(l,t)})}function eo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function to(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,o=a.stateNode;5===a.tag&&null!==o&&(a=o,null!=(o=Ut(e,n))&&r.unshift(eo(e,o,a)),null!=(o=Ut(e,t))&&r.push(eo(e,o,a))),e=e.return}return r}function no(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function ro(e,t,n,r,a){for(var o=t._reactName,l=[];null!==n&&n!==r;){var i=n,s=i.alternate,u=i.stateNode;if(null!==s&&s===r)break;5===i.tag&&null!==u&&(i=u,a?null!=(s=Ut(n,o))&&l.unshift(eo(n,s,i)):a||null!=(s=Ut(n,o))&&l.push(eo(n,s,i))),n=n.return}0!==l.length&&e.push({event:t,listeners:l})}var ao=/\r\n?/g,oo=/\u0000|\uFFFD/g;function lo(e){return("string"==typeof e?e:""+e).replace(ao,"\n").replace(oo,"")}function io(e,t,n){if(t=lo(t),lo(e)!==t&&n)throw Error(he(425))}function so(){}var uo=null,co=null;function fo(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var po="function"==typeof setTimeout?setTimeout:void 0,ho="function"==typeof clearTimeout?clearTimeout:void 0,mo="function"==typeof Promise?Promise:void 0,go="function"==typeof queueMicrotask?queueMicrotask:void 0!==mo?function(e){return mo.resolve(null).then(e).catch(bo)}:po;function bo(e){setTimeout(function(){throw e})}function vo(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&8===a.nodeType)if("/$"===(n=a.data)){if(0===r)return e.removeChild(a),void Jn(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=a}while(n);Jn(t)}function yo(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function xo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var wo=Math.random().toString(36).slice(2),ko="__reactFiber$"+wo,So="__reactProps$"+wo,Eo="__reactContainer$"+wo,_o="__reactEvents$"+wo,jo="__reactListeners$"+wo,Co="__reactHandles$"+wo;function Oo(e){var t=e[ko];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Eo]||n[ko]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=xo(e);null!==e;){if(n=e[ko])return n;e=xo(e)}return t}n=(e=n).parentNode}return null}function To(e){return!(e=e[ko]||e[Eo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function No(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(he(33))}function Fo(e){return e[So]||null}var Po=[],zo=-1;function Lo(e){return{current:e}}function Mo(e){0>zo||(e.current=Po[zo],Po[zo]=null,zo--)}function Ao(e,t){zo++,Po[zo]=e.current,e.current=t}var Do={},Io=Lo(Do),Ro=Lo(!1),$o=Do;function Uo(e,t){var n=e.type.contextTypes;if(!n)return Do;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,o={};for(a in n)o[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Vo(e){return null!=(e=e.childContextTypes)}function Bo(){Mo(Ro),Mo(Io)}function Wo(e,t,n){if(Io.current!==Do)throw Error(he(168));Ao(Io,t),Ao(Ro,n)}function Ho(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var a in r=r.getChildContext())if(!(a in t))throw Error(he(108,Je(e)||"Unknown",a));return Qe({},n,r)}function Qo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Do,$o=Io.current,Ao(Io,e),Ao(Ro,Ro.current),!0}function qo(e,t,n){var r=e.stateNode;if(!r)throw Error(he(169));n?(e=Ho(e,t,$o),r.__reactInternalMemoizedMergedChildContext=e,Mo(Ro),Mo(Io),Ao(Io,e)):Mo(Ro),Ao(Ro,n)}var Go=null,Zo=!1,Ko=!1;function Yo(e){null===Go?Go=[e]:Go.push(e)}function Jo(){if(!Ko&&null!==Go){Ko=!0;var e=0,t=Tn;try{var n=Go;for(Tn=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Go=null,Zo=!1}catch(a){throw null!==Go&&(Go=Go.slice(e+1)),nn(un,Jo),a}finally{Tn=t,Ko=!1}}return null}var Xo=[],el=0,tl=null,nl=0,rl=[],al=0,ol=null,ll=1,il="";function sl(e,t){Xo[el++]=nl,Xo[el++]=tl,tl=e,nl=t}function ul(e,t,n){rl[al++]=ll,rl[al++]=il,rl[al++]=ol,ol=e;var r=ll;e=il;var a=32-gn(r)-1;r&=~(1<<a),n+=1;var o=32-gn(t)+a;if(30<o){var l=a-a%5;o=(r&(1<<l)-1).toString(32),r>>=l,a-=l,ll=1<<32-gn(t)+a|n<<a|r,il=o+e}else ll=1<<o|n<<a|r,il=e}function cl(e){null!==e.return&&(sl(e,1),ul(e,1,0))}function dl(e){for(;e===tl;)tl=Xo[--el],Xo[el]=null,nl=Xo[--el],Xo[el]=null;for(;e===ol;)ol=rl[--al],rl[al]=null,il=rl[--al],rl[al]=null,ll=rl[--al],rl[al]=null}var fl=null,pl=null,hl=!1,ml=null;function gl(e,t){var n=$c(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function bl(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,fl=e,pl=yo(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,fl=e,pl=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==ol?{id:ll,overflow:il}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=$c(18,null,null,0)).stateNode=t,n.return=e,e.child=n,fl=e,pl=null,!0);default:return!1}}function vl(e){return!(!(1&e.mode)||128&e.flags)}function yl(e){if(hl){var t=pl;if(t){var n=t;if(!bl(e,t)){if(vl(e))throw Error(he(418));t=yo(n.nextSibling);var r=fl;t&&bl(e,t)?gl(r,n):(e.flags=-4097&e.flags|2,hl=!1,fl=e)}}else{if(vl(e))throw Error(he(418));e.flags=-4097&e.flags|2,hl=!1,fl=e}}}function xl(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;fl=e}function wl(e){if(e!==fl)return!1;if(!hl)return xl(e),hl=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!fo(e.type,e.memoizedProps)),t&&(t=pl)){if(vl(e))throw kl(),Error(he(418));for(;t;)gl(e,t),t=yo(t.nextSibling)}if(xl(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(he(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){pl=yo(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}pl=null}}else pl=fl?yo(e.stateNode.nextSibling):null;return!0}function kl(){for(var e=pl;e;)e=yo(e.nextSibling)}function Sl(){pl=fl=null,hl=!1}function El(e){null===ml?ml=[e]:ml.push(e)}var _l=Te.ReactCurrentBatchConfig;function jl(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(he(309));var r=n.stateNode}if(!r)throw Error(he(147,e));var a=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=a.refs;null===e?delete t[o]:t[o]=e})._stringRef=o,t)}if("string"!=typeof e)throw Error(he(284));if(!n._owner)throw Error(he(290,e))}return e}function Cl(e,t){throw e=Object.prototype.toString.call(t),Error(he(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ol(e){return(0,e._init)(e._payload)}function Tl(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t){return(e=Vc(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function l(t){return e&&null===t.alternate&&(t.flags|=2),t}function i(e,t,n,r){return null===t||6!==t.tag?((t=Qc(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function s(e,t,n,r){var o=n.type;return o===Pe?c(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===Ue&&Ol(o)===t.type)?((r=a(t,n.props)).ref=jl(e,t,n),r.return=e,r):((r=Bc(n.type,n.key,n.props,null,e.mode,r)).ref=jl(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=qc(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function c(e,t,n,r,o){return null===t||7!==t.tag?((t=Wc(n,e.mode,r,o)).return=e,t):((t=a(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Qc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Ne:return(n=Bc(t.type,t.key,t.props,null,e.mode,n)).ref=jl(e,null,t),n.return=e,n;case Fe:return(t=qc(t,e.mode,n)).return=e,t;case Ue:return d(e,(0,t._init)(t._payload),n)}if(ct(t)||We(t))return(t=Wc(t,e.mode,n,null)).return=e,t;Cl(e,t)}return null}function f(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==a?null:i(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Ne:return n.key===a?s(e,t,n,r):null;case Fe:return n.key===a?u(e,t,n,r):null;case Ue:return f(e,t,(a=n._init)(n._payload),r)}if(ct(n)||We(n))return null!==a?null:c(e,t,n,r,null);Cl(e,n)}return null}function p(e,t,n,r,a){if("string"==typeof r&&""!==r||"number"==typeof r)return i(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Ne:return s(t,e=e.get(null===r.key?n:r.key)||null,r,a);case Fe:return u(t,e=e.get(null===r.key?n:r.key)||null,r,a);case Ue:return p(e,t,n,(0,r._init)(r._payload),a)}if(ct(r)||We(r))return c(t,e=e.get(n)||null,r,a,null);Cl(t,r)}return null}return function i(s,u,c,h){if("object"==typeof c&&null!==c&&c.type===Pe&&null===c.key&&(c=c.props.children),"object"==typeof c&&null!==c){switch(c.$$typeof){case Ne:e:{for(var m=c.key,g=u;null!==g;){if(g.key===m){if((m=c.type)===Pe){if(7===g.tag){n(s,g.sibling),(u=a(g,c.props.children)).return=s,s=u;break e}}else if(g.elementType===m||"object"==typeof m&&null!==m&&m.$$typeof===Ue&&Ol(m)===g.type){n(s,g.sibling),(u=a(g,c.props)).ref=jl(s,g,c),u.return=s,s=u;break e}n(s,g);break}t(s,g),g=g.sibling}c.type===Pe?((u=Wc(c.props.children,s.mode,h,c.key)).return=s,s=u):((h=Bc(c.type,c.key,c.props,null,s.mode,h)).ref=jl(s,u,c),h.return=s,s=h)}return l(s);case Fe:e:{for(g=c.key;null!==u;){if(u.key===g){if(4===u.tag&&u.stateNode.containerInfo===c.containerInfo&&u.stateNode.implementation===c.implementation){n(s,u.sibling),(u=a(u,c.children||[])).return=s,s=u;break e}n(s,u);break}t(s,u),u=u.sibling}(u=qc(c,s.mode,h)).return=s,s=u}return l(s);case Ue:return i(s,u,(g=c._init)(c._payload),h)}if(ct(c))return function(a,l,i,s){for(var u=null,c=null,h=l,m=l=0,g=null;null!==h&&m<i.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var b=f(a,h,i[m],s);if(null===b){null===h&&(h=g);break}e&&h&&null===b.alternate&&t(a,h),l=o(b,l,m),null===c?u=b:c.sibling=b,c=b,h=g}if(m===i.length)return n(a,h),hl&&sl(a,m),u;if(null===h){for(;m<i.length;m++)null!==(h=d(a,i[m],s))&&(l=o(h,l,m),null===c?u=h:c.sibling=h,c=h);return hl&&sl(a,m),u}for(h=r(a,h);m<i.length;m++)null!==(g=p(h,a,m,i[m],s))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),l=o(g,l,m),null===c?u=g:c.sibling=g,c=g);return e&&h.forEach(function(e){return t(a,e)}),hl&&sl(a,m),u}(s,u,c,h);if(We(c))return function(a,l,i,s){var u=We(i);if("function"!=typeof u)throw Error(he(150));if(null==(i=u.call(i)))throw Error(he(151));for(var c=u=null,h=l,m=l=0,g=null,b=i.next();null!==h&&!b.done;m++,b=i.next()){h.index>m?(g=h,h=null):g=h.sibling;var v=f(a,h,b.value,s);if(null===v){null===h&&(h=g);break}e&&h&&null===v.alternate&&t(a,h),l=o(v,l,m),null===c?u=v:c.sibling=v,c=v,h=g}if(b.done)return n(a,h),hl&&sl(a,m),u;if(null===h){for(;!b.done;m++,b=i.next())null!==(b=d(a,b.value,s))&&(l=o(b,l,m),null===c?u=b:c.sibling=b,c=b);return hl&&sl(a,m),u}for(h=r(a,h);!b.done;m++,b=i.next())null!==(b=p(h,a,m,b.value,s))&&(e&&null!==b.alternate&&h.delete(null===b.key?m:b.key),l=o(b,l,m),null===c?u=b:c.sibling=b,c=b);return e&&h.forEach(function(e){return t(a,e)}),hl&&sl(a,m),u}(s,u,c,h);Cl(s,c)}return"string"==typeof c&&""!==c||"number"==typeof c?(c=""+c,null!==u&&6===u.tag?(n(s,u.sibling),(u=a(u,c)).return=s,s=u):(n(s,u),(u=Qc(c,s.mode,h)).return=s,s=u),l(s)):n(s,u)}}var Nl=Tl(!0),Fl=Tl(!1),Pl=Lo(null),zl=null,Ll=null,Ml=null;function Al(){Ml=Ll=zl=null}function Dl(e){var t=Pl.current;Mo(Pl),e._currentValue=t}function Il(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Rl(e,t){zl=e,Ml=Ll=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Os=!0),e.firstContext=null)}function $l(e){var t=e._currentValue;if(Ml!==e)if(e={context:e,memoizedValue:t,next:null},null===Ll){if(null===zl)throw Error(he(308));Ll=e,zl.dependencies={lanes:0,firstContext:e}}else Ll=Ll.next=e;return t}var Ul=null;function Vl(e){null===Ul?Ul=[e]:Ul.push(e)}function Bl(e,t,n,r){var a=t.interleaved;return null===a?(n.next=n,Vl(t)):(n.next=a.next,a.next=n),t.interleaved=n,Wl(e,r)}function Wl(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Hl=!1;function Ql(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ql(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Gl(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zl(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Du){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,Wl(e,n)}return null===(a=r.interleaved)?(t.next=t,Vl(r)):(t.next=a.next,a.next=t),r.interleaved=t,Wl(e,n)}function Kl(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,On(e,n)}}function Yl(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?a=o=l:o=o.next=l,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Jl(e,t,n,r){var a=e.updateQueue;Hl=!1;var o=a.firstBaseUpdate,l=a.lastBaseUpdate,i=a.shared.pending;if(null!==i){a.shared.pending=null;var s=i,u=s.next;s.next=null,null===l?o=u:l.next=u,l=s;var c=e.alternate;null!==c&&((i=(c=c.updateQueue).lastBaseUpdate)!==l&&(null===i?c.firstBaseUpdate=u:i.next=u,c.lastBaseUpdate=s))}if(null!==o){var d=a.baseState;for(l=0,c=u=s=null,i=o;;){var f=i.lane,p=i.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var h=e,m=i;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(p,d,f):h))break e;d=Qe({},d,f);break e;case 2:Hl=!0}}null!==i.callback&&0!==i.lane&&(e.flags|=64,null===(f=a.effects)?a.effects=[i]:f.push(i))}else p={eventTime:p,lane:f,tag:i.tag,payload:i.payload,callback:i.callback,next:null},null===c?(u=c=p,s=d):c=c.next=p,l|=f;if(null===(i=i.next)){if(null===(i=a.shared.pending))break;i=(f=i).next,f.next=null,a.lastBaseUpdate=f,a.shared.pending=null}}if(null===c&&(s=d),a.baseState=s,a.firstBaseUpdate=u,a.lastBaseUpdate=c,null!==(t=a.shared.interleaved)){a=t;do{l|=a.lane,a=a.next}while(a!==t)}else null===o&&(a.shared.lanes=0);Hu|=l,e.lanes=l,e.memoizedState=d}}function Xl(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(null!==a){if(r.callback=null,r=n,"function"!=typeof a)throw Error(he(191,a));a.call(r)}}}var ei={},ti=Lo(ei),ni=Lo(ei),ri=Lo(ei);function ai(e){if(e===ei)throw Error(he(174));return e}function oi(e,t){switch(Ao(ri,t),Ao(ni,e),Ao(ti,ei),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:bt(null,"");break;default:t=bt(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Mo(ti),Ao(ti,t)}function li(){Mo(ti),Mo(ni),Mo(ri)}function ii(e){ai(ri.current);var t=ai(ti.current),n=bt(t,e.type);t!==n&&(Ao(ni,e),Ao(ti,n))}function si(e){ni.current===e&&(Mo(ti),Mo(ni))}var ui=Lo(0);function ci(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var di=[];function fi(){for(var e=0;e<di.length;e++)di[e]._workInProgressVersionPrimary=null;di.length=0}var pi=Te.ReactCurrentDispatcher,hi=Te.ReactCurrentBatchConfig,mi=0,gi=null,bi=null,vi=null,yi=!1,xi=!1,wi=0,ki=0;function Si(){throw Error(he(321))}function Ei(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ga(e[n],t[n]))return!1;return!0}function _i(e,t,n,r,a,o){if(mi=o,gi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,pi.current=null===e||null===e.memoizedState?ss:us,e=n(r,a),xi){o=0;do{if(xi=!1,wi=0,25<=o)throw Error(he(301));o+=1,vi=bi=null,t.updateQueue=null,pi.current=cs,e=n(r,a)}while(xi)}if(pi.current=is,t=null!==bi&&null!==bi.next,mi=0,vi=bi=gi=null,yi=!1,t)throw Error(he(300));return e}function ji(){var e=0!==wi;return wi=0,e}function Ci(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===vi?gi.memoizedState=vi=e:vi=vi.next=e,vi}function Oi(){if(null===bi){var e=gi.alternate;e=null!==e?e.memoizedState:null}else e=bi.next;var t=null===vi?gi.memoizedState:vi.next;if(null!==t)vi=t,bi=e;else{if(null===e)throw Error(he(310));e={memoizedState:(bi=e).memoizedState,baseState:bi.baseState,baseQueue:bi.baseQueue,queue:bi.queue,next:null},null===vi?gi.memoizedState=vi=e:vi=vi.next=e}return vi}function Ti(e,t){return"function"==typeof t?t(e):t}function Ni(e){var t=Oi(),n=t.queue;if(null===n)throw Error(he(311));n.lastRenderedReducer=e;var r=bi,a=r.baseQueue,o=n.pending;if(null!==o){if(null!==a){var l=a.next;a.next=o.next,o.next=l}r.baseQueue=a=o,n.pending=null}if(null!==a){o=a.next,r=r.baseState;var i=l=null,s=null,u=o;do{var c=u.lane;if((mi&c)===c)null!==s&&(s=s.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===s?(i=s=d,l=r):s=s.next=d,gi.lanes|=c,Hu|=c}u=u.next}while(null!==u&&u!==o);null===s?l=r:s.next=i,ga(r,t.memoizedState)||(Os=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=s,n.lastRenderedState=r}if(null!==(e=n.interleaved)){a=e;do{o=a.lane,gi.lanes|=o,Hu|=o,a=a.next}while(a!==e)}else null===a&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Fi(e){var t=Oi(),n=t.queue;if(null===n)throw Error(he(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(null!==a){n.pending=null;var l=a=a.next;do{o=e(o,l.action),l=l.next}while(l!==a);ga(o,t.memoizedState)||(Os=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Pi(){}function zi(e,t){var n=gi,r=Oi(),a=t(),o=!ga(r.memoizedState,a);if(o&&(r.memoizedState=a,Os=!0),r=r.queue,Hi(Ai.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==vi&&1&vi.memoizedState.tag){if(n.flags|=2048,$i(9,Mi.bind(null,n,r,a,t),void 0,null),null===Iu)throw Error(he(349));30&mi||Li(n,t,a)}return a}function Li(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=gi.updateQueue)?(t={lastEffect:null,stores:null},gi.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Mi(e,t,n,r){t.value=n,t.getSnapshot=r,Di(t)&&Ii(e)}function Ai(e,t,n){return n(function(){Di(t)&&Ii(e)})}function Di(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ga(e,n)}catch(r){return!0}}function Ii(e){var t=Wl(e,1);null!==t&&dc(t,e,1,-1)}function Ri(e){var t=Ci();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:e},t.queue=e,e=e.dispatch=rs.bind(null,gi,e),[t.memoizedState,e]}function $i(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=gi.updateQueue)?(t={lastEffect:null,stores:null},gi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ui(){return Oi().memoizedState}function Vi(e,t,n,r){var a=Ci();gi.flags|=e,a.memoizedState=$i(1|t,n,void 0,void 0===r?null:r)}function Bi(e,t,n,r){var a=Oi();r=void 0===r?null:r;var o=void 0;if(null!==bi){var l=bi.memoizedState;if(o=l.destroy,null!==r&&Ei(r,l.deps))return void(a.memoizedState=$i(t,n,o,r))}gi.flags|=e,a.memoizedState=$i(1|t,n,o,r)}function Wi(e,t){return Vi(8390656,8,e,t)}function Hi(e,t){return Bi(2048,8,e,t)}function Qi(e,t){return Bi(4,2,e,t)}function qi(e,t){return Bi(4,4,e,t)}function Gi(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Zi(e,t,n){return n=null!=n?n.concat([e]):null,Bi(4,4,Gi.bind(null,t,e),n)}function Ki(){}function Yi(e,t){var n=Oi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ei(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ji(e,t){var n=Oi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ei(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Xi(e,t,n){return 21&mi?(ga(n,t)||(n=_n(),gi.lanes|=n,Hu|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Os=!0),e.memoizedState=n)}function es(e,t){var n=Tn;Tn=0!==n&&4>n?n:4,e(!0);var r=hi.transition;hi.transition={};try{e(!1),t()}finally{Tn=n,hi.transition=r}}function ts(){return Oi().memoizedState}function ns(e,t,n){var r=cc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},as(e))os(t,n);else if(null!==(n=Bl(e,t,n,r))){dc(n,e,r,uc()),ls(n,t,r)}}function rs(e,t,n){var r=cc(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(as(e))os(t,a);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var l=t.lastRenderedState,i=o(l,n);if(a.hasEagerState=!0,a.eagerState=i,ga(i,l)){var s=t.interleaved;return null===s?(a.next=a,Vl(t)):(a.next=s.next,s.next=a),void(t.interleaved=a)}}catch(u){}null!==(n=Bl(e,t,a,r))&&(dc(n,e,r,a=uc()),ls(n,t,r))}}function as(e){var t=e.alternate;return e===gi||null!==t&&t===gi}function os(e,t){xi=yi=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ls(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,On(e,n)}}var is={readContext:$l,useCallback:Si,useContext:Si,useEffect:Si,useImperativeHandle:Si,useInsertionEffect:Si,useLayoutEffect:Si,useMemo:Si,useReducer:Si,useRef:Si,useState:Si,useDebugValue:Si,useDeferredValue:Si,useTransition:Si,useMutableSource:Si,useSyncExternalStore:Si,useId:Si,unstable_isNewReconciler:!1},ss={readContext:$l,useCallback:function(e,t){return Ci().memoizedState=[e,void 0===t?null:t],e},useContext:$l,useEffect:Wi,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Vi(4194308,4,Gi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Vi(4,2,e,t)},useMemo:function(e,t){var n=Ci();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ci();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ns.bind(null,gi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ci().memoizedState=e},useState:Ri,useDebugValue:Ki,useDeferredValue:function(e){return Ci().memoizedState=e},useTransition:function(){var e=Ri(!1),t=e[0];return e=es.bind(null,e[1]),Ci().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=gi,a=Ci();if(hl){if(void 0===n)throw Error(he(407));n=n()}else{if(n=t(),null===Iu)throw Error(he(349));30&mi||Li(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Wi(Ai.bind(null,r,o,e),[e]),r.flags|=2048,$i(9,Mi.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ci(),t=Iu.identifierPrefix;if(hl){var n=il;t=":"+t+"R"+(n=(ll&~(1<<32-gn(ll)-1)).toString(32)+n),0<(n=wi++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ki++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},us={readContext:$l,useCallback:Yi,useContext:$l,useEffect:Hi,useImperativeHandle:Zi,useInsertionEffect:Qi,useLayoutEffect:qi,useMemo:Ji,useReducer:Ni,useRef:Ui,useState:function(){return Ni(Ti)},useDebugValue:Ki,useDeferredValue:function(e){return Xi(Oi(),bi.memoizedState,e)},useTransition:function(){return[Ni(Ti)[0],Oi().memoizedState]},useMutableSource:Pi,useSyncExternalStore:zi,useId:ts,unstable_isNewReconciler:!1},cs={readContext:$l,useCallback:Yi,useContext:$l,useEffect:Hi,useImperativeHandle:Zi,useInsertionEffect:Qi,useLayoutEffect:qi,useMemo:Ji,useReducer:Fi,useRef:Ui,useState:function(){return Fi(Ti)},useDebugValue:Ki,useDeferredValue:function(e){var t=Oi();return null===bi?t.memoizedState=e:Xi(t,bi.memoizedState,e)},useTransition:function(){return[Fi(Ti)[0],Oi().memoizedState]},useMutableSource:Pi,useSyncExternalStore:zi,useId:ts,unstable_isNewReconciler:!1};function ds(e,t){if(e&&e.defaultProps){for(var n in t=Qe({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function fs(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Qe({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ps={isMounted:function(e){return!!(e=e._reactInternals)&&Yt(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=uc(),a=cc(e),o=Gl(r,a);o.payload=t,null!=n&&(o.callback=n),null!==(t=Zl(e,o,a))&&(dc(t,e,a,r),Kl(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=uc(),a=cc(e),o=Gl(r,a);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Zl(e,o,a))&&(dc(t,e,a,r),Kl(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=uc(),r=cc(e),a=Gl(n,r);a.tag=2,null!=t&&(a.callback=t),null!==(t=Zl(e,a,r))&&(dc(t,e,r,n),Kl(t,e,r))}};function hs(e,t,n,r,a,o,l){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,l):!t.prototype||!t.prototype.isPureReactComponent||(!ba(n,r)||!ba(a,o))}function ms(e,t,n){var r=!1,a=Do,o=t.contextType;return"object"==typeof o&&null!==o?o=$l(o):(a=Vo(t)?$o:Io.current,o=(r=null!=(r=t.contextTypes))?Uo(e,a):Do),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ps,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=o),t}function gs(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ps.enqueueReplaceState(t,t.state,null)}function bs(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},Ql(e);var o=t.contextType;"object"==typeof o&&null!==o?a.context=$l(o):(o=Vo(t)?$o:Io.current,a.context=Uo(e,o)),a.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(fs(e,t,o,n),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&ps.enqueueReplaceState(a,a.state,null),Jl(e,n,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.flags|=4194308)}function vs(e,t){try{var n="",r=t;do{n+=Ke(r),r=r.return}while(r);var a=n}catch(o){a="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:a,digest:null}}function ys(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function xs(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ws="function"==typeof WeakMap?WeakMap:Map;function ks(e,t,n){(n=Gl(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Xu||(Xu=!0,ec=r),xs(0,t)},n}function Ss(e,t,n){(n=Gl(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return r(a)},n.callback=function(){xs(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){xs(0,t),"function"!=typeof r&&(null===tc?tc=new Set([this]):tc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function Es(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ws;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(a.add(n),e=Lc.bind(null,e,t,n),t.then(e,e))}function _s(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function js(e,t,n,r,a){return 1&e.mode?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Gl(-1,1)).tag=2,Zl(n,t,1))),n.lanes|=1),e)}var Cs=Te.ReactCurrentOwner,Os=!1;function Ts(e,t,n,r){t.child=null===e?Fl(t,null,n,r):Nl(t,e.child,n,r)}function Ns(e,t,n,r,a){n=n.render;var o=t.ref;return Rl(t,a),r=_i(e,t,n,r,o,a),n=ji(),null===e||Os?(hl&&n&&cl(t),t.flags|=1,Ts(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Xs(e,t,a))}function Fs(e,t,n,r,a){if(null===e){var o=n.type;return"function"!=typeof o||Uc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Bc(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Ps(e,t,o,r,a))}if(o=e.child,0===(e.lanes&a)){var l=o.memoizedProps;if((n=null!==(n=n.compare)?n:ba)(l,r)&&e.ref===t.ref)return Xs(e,t,a)}return t.flags|=1,(e=Vc(o,r)).ref=t.ref,e.return=t,t.child=e}function Ps(e,t,n,r,a){if(null!==e){var o=e.memoizedProps;if(ba(o,r)&&e.ref===t.ref){if(Os=!1,t.pendingProps=r=o,0===(e.lanes&a))return t.lanes=e.lanes,Xs(e,t,a);131072&e.flags&&(Os=!0)}}return Ms(e,t,n,r,a)}function zs(e,t,n){var r=t.pendingProps,a=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ao(Vu,Uu),Uu|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Ao(Vu,Uu),Uu|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ao(Vu,Uu),Uu|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ao(Vu,Uu),Uu|=r;return Ts(e,t,a,n),t.child}function Ls(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ms(e,t,n,r,a){var o=Vo(n)?$o:Io.current;return o=Uo(t,o),Rl(t,a),n=_i(e,t,n,r,o,a),r=ji(),null===e||Os?(hl&&r&&cl(t),t.flags|=1,Ts(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Xs(e,t,a))}function As(e,t,n,r,a){if(Vo(n)){var o=!0;Qo(t)}else o=!1;if(Rl(t,a),null===t.stateNode)Js(e,t),ms(t,n,r),bs(t,n,r,a),r=!0;else if(null===e){var l=t.stateNode,i=t.memoizedProps;l.props=i;var s=l.context,u=n.contextType;"object"==typeof u&&null!==u?u=$l(u):u=Uo(t,u=Vo(n)?$o:Io.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof l.getSnapshotBeforeUpdate;d||"function"!=typeof l.UNSAFE_componentWillReceiveProps&&"function"!=typeof l.componentWillReceiveProps||(i!==r||s!==u)&&gs(t,l,r,u),Hl=!1;var f=t.memoizedState;l.state=f,Jl(t,r,l,a),s=t.memoizedState,i!==r||f!==s||Ro.current||Hl?("function"==typeof c&&(fs(t,n,c,r),s=t.memoizedState),(i=Hl||hs(t,n,i,r,f,s,u))?(d||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||("function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount()),"function"==typeof l.componentDidMount&&(t.flags|=4194308)):("function"==typeof l.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),l.props=r,l.state=s,l.context=u,r=i):("function"==typeof l.componentDidMount&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,ql(e,t),i=t.memoizedProps,u=t.type===t.elementType?i:ds(t.type,i),l.props=u,d=t.pendingProps,f=l.context,"object"==typeof(s=n.contextType)&&null!==s?s=$l(s):s=Uo(t,s=Vo(n)?$o:Io.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof l.getSnapshotBeforeUpdate)||"function"!=typeof l.UNSAFE_componentWillReceiveProps&&"function"!=typeof l.componentWillReceiveProps||(i!==d||f!==s)&&gs(t,l,r,s),Hl=!1,f=t.memoizedState,l.state=f,Jl(t,r,l,a);var h=t.memoizedState;i!==d||f!==h||Ro.current||Hl?("function"==typeof p&&(fs(t,n,p,r),h=t.memoizedState),(u=Hl||hs(t,n,u,r,f,h,s)||!1)?(c||"function"!=typeof l.UNSAFE_componentWillUpdate&&"function"!=typeof l.componentWillUpdate||("function"==typeof l.componentWillUpdate&&l.componentWillUpdate(r,h,s),"function"==typeof l.UNSAFE_componentWillUpdate&&l.UNSAFE_componentWillUpdate(r,h,s)),"function"==typeof l.componentDidUpdate&&(t.flags|=4),"function"==typeof l.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof l.componentDidUpdate||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof l.getSnapshotBeforeUpdate||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),l.props=r,l.state=h,l.context=s,r=u):("function"!=typeof l.componentDidUpdate||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof l.getSnapshotBeforeUpdate||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ds(e,t,n,r,o,a)}function Ds(e,t,n,r,a,o){Ls(e,t);var l=!!(128&t.flags);if(!r&&!l)return a&&qo(t,n,!1),Xs(e,t,o);r=t.stateNode,Cs.current=t;var i=l&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&l?(t.child=Nl(t,e.child,null,o),t.child=Nl(t,null,i,o)):Ts(e,t,i,o),t.memoizedState=r.state,a&&qo(t,n,!0),t.child}function Is(e){var t=e.stateNode;t.pendingContext?Wo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Wo(0,t.context,!1),oi(e,t.containerInfo)}function Rs(e,t,n,r,a){return Sl(),El(a),t.flags|=256,Ts(e,t,n,r),t.child}var $s,Us,Vs,Bs,Ws={dehydrated:null,treeContext:null,retryLane:0};function Hs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Qs(e,t,n){var r,a=t.pendingProps,o=ui.current,l=!1,i=!!(128&t.flags);if((r=i)||(r=(null===e||null!==e.memoizedState)&&!!(2&o)),r?(l=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Ao(ui,1&o),null===e)return yl(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=a.children,e=a.fallback,l?(a=t.mode,l=t.child,i={mode:"hidden",children:i},1&a||null===l?l=Hc(i,a,0,null):(l.childLanes=0,l.pendingProps=i),e=Wc(e,a,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Hs(n),t.memoizedState=Ws,e):qs(t,i));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,a,o,l){if(n)return 256&t.flags?(t.flags&=-257,Gs(e,t,l,r=ys(Error(he(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,a=t.mode,r=Hc({mode:"visible",children:r.children},a,0,null),(o=Wc(o,a,l,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,1&t.mode&&Nl(t,e.child,null,l),t.child.memoizedState=Hs(l),t.memoizedState=Ws,o);if(!(1&t.mode))return Gs(e,t,l,null);if("$!"===a.data){if(r=a.nextSibling&&a.nextSibling.dataset)var i=r.dgst;return r=i,Gs(e,t,l,r=ys(o=Error(he(419)),r,void 0))}if(i=0!==(l&e.childLanes),Os||i){if(null!==(r=Iu)){switch(l&-l){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}0!==(a=0!==(a&(r.suspendedLanes|l))?0:a)&&a!==o.retryLane&&(o.retryLane=a,Wl(e,a),dc(r,e,a,-1))}return Ec(),Gs(e,t,l,r=ys(Error(he(421))))}return"$?"===a.data?(t.flags|=128,t.child=e.child,t=Ac.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,pl=yo(a.nextSibling),fl=t,hl=!0,ml=null,null!==e&&(rl[al++]=ll,rl[al++]=il,rl[al++]=ol,ll=e.id,il=e.overflow,ol=t),t=qs(t,r.children),t.flags|=4096,t)}(e,t,i,a,r,o,n);if(l){l=a.fallback,i=t.mode,r=(o=e.child).sibling;var s={mode:"hidden",children:a.children};return 1&i||t.child===o?(a=Vc(o,s)).subtreeFlags=14680064&o.subtreeFlags:((a=t.child).childLanes=0,a.pendingProps=s,t.deletions=null),null!==r?l=Vc(r,l):(l=Wc(l,i,n,null)).flags|=2,l.return=t,a.return=t,a.sibling=l,t.child=a,a=l,l=t.child,i=null===(i=e.child.memoizedState)?Hs(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},l.memoizedState=i,l.childLanes=e.childLanes&~n,t.memoizedState=Ws,a}return e=(l=e.child).sibling,a=Vc(l,{mode:"visible",children:a.children}),!(1&t.mode)&&(a.lanes=n),a.return=t,a.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=a,t.memoizedState=null,a}function qs(e,t){return(t=Hc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Gs(e,t,n,r){return null!==r&&El(r),Nl(t,e.child,null,n),(e=qs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Zs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Il(e.return,t,n)}function Ks(e,t,n,r,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=a)}function Ys(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;if(Ts(e,t,r.children,n),2&(r=ui.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Zs(e,n,t);else if(19===e.tag)Zs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ao(ui,r),1&t.mode)switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===ci(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Ks(t,!1,a,n,o);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===ci(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Ks(t,!0,n,null,o);break;case"together":Ks(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Js(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Xs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Hu|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(he(153));if(null!==t.child){for(n=Vc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Vc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function eu(e,t){if(!hl)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function tu(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=14680064&a.subtreeFlags,r|=14680064&a.flags,a.return=e,a=a.sibling;else for(a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function nu(e,t,n){var r=t.pendingProps;switch(dl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tu(t),null;case 1:case 17:return Vo(t.type)&&Bo(),tu(t),null;case 3:return r=t.stateNode,li(),Mo(Ro),Mo(Io),fi(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(wl(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ml&&(mc(ml),ml=null))),Us(e,t),tu(t),null;case 5:si(t);var a=ai(ri.current);if(n=t.type,null!==e&&null!=t.stateNode)Vs(e,t,n,r,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(he(166));return tu(t),null}if(e=ai(ti.current),wl(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[ko]=t,r[So]=o,e=!!(1&t.mode),n){case"dialog":Ga("cancel",r),Ga("close",r);break;case"iframe":case"object":case"embed":Ga("load",r);break;case"video":case"audio":for(a=0;a<Wa.length;a++)Ga(Wa[a],r);break;case"source":Ga("error",r);break;case"img":case"image":case"link":Ga("error",r),Ga("load",r);break;case"details":Ga("toggle",r);break;case"input":ot(r,o),Ga("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ga("invalid",r);break;case"textarea":pt(r,o),Ga("invalid",r)}for(var l in Ct(n,o),a=null,o)if(o.hasOwnProperty(l)){var i=o[l];"children"===l?"string"==typeof i?r.textContent!==i&&(!0!==o.suppressHydrationWarning&&io(r.textContent,i,e),a=["children",i]):"number"==typeof i&&r.textContent!==""+i&&(!0!==o.suppressHydrationWarning&&io(r.textContent,i,e),a=["children",""+i]):ge.hasOwnProperty(l)&&null!=i&&"onScroll"===l&&Ga("scroll",r)}switch(n){case"input":tt(r),st(r,o,!0);break;case"textarea":tt(r),mt(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=so)}r=a,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===a.nodeType?a:a.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=gt(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[ko]=t,e[So]=r,$s(e,t,!1,!1),t.stateNode=e;e:{switch(l=Ot(n,r),n){case"dialog":Ga("cancel",e),Ga("close",e),a=r;break;case"iframe":case"object":case"embed":Ga("load",e),a=r;break;case"video":case"audio":for(a=0;a<Wa.length;a++)Ga(Wa[a],e);a=r;break;case"source":Ga("error",e),a=r;break;case"img":case"image":case"link":Ga("error",e),Ga("load",e),a=r;break;case"details":Ga("toggle",e),a=r;break;case"input":ot(e,r),a=at(e,r),Ga("invalid",e);break;case"option":default:a=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=Qe({},r,{value:void 0}),Ga("invalid",e);break;case"textarea":pt(e,r),a=ft(e,r),Ga("invalid",e)}for(o in Ct(n,a),i=a)if(i.hasOwnProperty(o)){var s=i[o];"style"===o?_t(e,s):"dangerouslySetInnerHTML"===o?null!=(s=s?s.__html:void 0)&&xt(e,s):"children"===o?"string"==typeof s?("textarea"!==n||""!==s)&&wt(e,s):"number"==typeof s&&wt(e,""+s):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(ge.hasOwnProperty(o)?null!=s&&"onScroll"===o&&Ga("scroll",e):null!=s&&Oe(e,o,s,l))}switch(n){case"input":tt(e),st(e,r,!1);break;case"textarea":tt(e),mt(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Xe(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?dt(e,!!r.multiple,o,!1):null!=r.defaultValue&&dt(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=so)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return tu(t),null;case 6:if(e&&null!=t.stateNode)Bs(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(he(166));if(n=ai(ri.current),ai(ti.current),wl(t)){if(r=t.stateNode,n=t.memoizedProps,r[ko]=t,(o=r.nodeValue!==n)&&null!==(e=fl))switch(e.tag){case 3:io(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&io(r.nodeValue,n,!!(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[ko]=t,t.stateNode=r}return tu(t),null;case 13:if(Mo(ui),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(hl&&null!==pl&&1&t.mode&&!(128&t.flags))kl(),Sl(),t.flags|=98560,o=!1;else if(o=wl(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(he(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(he(317));o[ko]=t}else Sl(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;tu(t),o=!1}else null!==ml&&(mc(ml),ml=null),o=!0;if(!o)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&ui.current?0===Bu&&(Bu=3):Ec())),null!==t.updateQueue&&(t.flags|=4),tu(t),null);case 4:return li(),Us(e,t),null===e&&Ya(t.stateNode.containerInfo),tu(t),null;case 10:return Dl(t.type._context),tu(t),null;case 19:if(Mo(ui),null===(o=t.memoizedState))return tu(t),null;if(r=!!(128&t.flags),null===(l=o.rendering))if(r)eu(o,!1);else{if(0!==Bu||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=ci(e))){for(t.flags|=128,eu(o,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(l=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ao(ui,1&ui.current|2),t.child}e=e.sibling}null!==o.tail&&ln()>Yu&&(t.flags|=128,r=!0,eu(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ci(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),eu(o,!0),null===o.tail&&"hidden"===o.tailMode&&!l.alternate&&!hl)return tu(t),null}else 2*ln()-o.renderingStartTime>Yu&&1073741824!==n&&(t.flags|=128,r=!0,eu(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=o.last)?n.sibling=l:t.child=l,o.last=l)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=ln(),t.sibling=null,n=ui.current,Ao(ui,r?1&n|2:1&n),t):(tu(t),null);case 22:case 23:return xc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Uu)&&(tu(t),6&t.subtreeFlags&&(t.flags|=8192)):tu(t),null;case 24:case 25:return null}throw Error(he(156,t.tag))}function ru(e,t){switch(dl(t),t.tag){case 1:return Vo(t.type)&&Bo(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return li(),Mo(Ro),Mo(Io),fi(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return si(t),null;case 13:if(Mo(ui),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(he(340));Sl()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Mo(ui),null;case 4:return li(),null;case 10:return Dl(t.type._context),null;case 22:case 23:return xc(),null;default:return null}}$s=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Us=function(){},Vs=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,ai(ti.current);var o,l=null;switch(n){case"input":a=at(e,a),r=at(e,r),l=[];break;case"select":a=Qe({},a,{value:void 0}),r=Qe({},r,{value:void 0}),l=[];break;case"textarea":a=ft(e,a),r=ft(e,r),l=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(e.onclick=so)}for(u in Ct(n,r),n=null,a)if(!r.hasOwnProperty(u)&&a.hasOwnProperty(u)&&null!=a[u])if("style"===u){var i=a[u];for(o in i)i.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(ge.hasOwnProperty(u)?l||(l=[]):(l=l||[]).push(u,null));for(u in r){var s=r[u];if(i=null!=a?a[u]:void 0,r.hasOwnProperty(u)&&s!==i&&(null!=s||null!=i))if("style"===u)if(i){for(o in i)!i.hasOwnProperty(o)||s&&s.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in s)s.hasOwnProperty(o)&&i[o]!==s[o]&&(n||(n={}),n[o]=s[o])}else n||(l||(l=[]),l.push(u,n)),n=s;else"dangerouslySetInnerHTML"===u?(s=s?s.__html:void 0,i=i?i.__html:void 0,null!=s&&i!==s&&(l=l||[]).push(u,s)):"children"===u?"string"!=typeof s&&"number"!=typeof s||(l=l||[]).push(u,""+s):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(ge.hasOwnProperty(u)?(null!=s&&"onScroll"===u&&Ga("scroll",e),l||i===s||(l=[])):(l=l||[]).push(u,s))}n&&(l=l||[]).push("style",n);var u=l;(t.updateQueue=u)&&(t.flags|=4)}},Bs=function(e,t,n,r){n!==r&&(t.flags|=4)};var au=!1,ou=!1,lu="function"==typeof WeakSet?WeakSet:Set,iu=null;function su(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){zc(e,t,r)}else n.current=null}function uu(e,t,n){try{n()}catch(r){zc(e,t,r)}}var cu=!1;function du(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var a=r=r.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,void 0!==o&&uu(t,n,o)}a=a.next}while(a!==r)}}function fu(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function pu(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function hu(e){var t=e.alternate;null!==t&&(e.alternate=null,hu(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[ko],delete t[So],delete t[_o],delete t[jo],delete t[Co])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function mu(e){return 5===e.tag||3===e.tag||4===e.tag}function gu(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||mu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function bu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=so));else if(4!==r&&null!==(e=e.child))for(bu(e,t,n),e=e.sibling;null!==e;)bu(e,t,n),e=e.sibling}function vu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(vu(e,t,n),e=e.sibling;null!==e;)vu(e,t,n),e=e.sibling}var yu=null,xu=!1;function wu(e,t,n){for(n=n.child;null!==n;)ku(e,t,n),n=n.sibling}function ku(e,t,n){if(mn&&"function"==typeof mn.onCommitFiberUnmount)try{mn.onCommitFiberUnmount(hn,n)}catch(i){}switch(n.tag){case 5:ou||su(n,t);case 6:var r=yu,a=xu;yu=null,wu(e,t,n),xu=a,null!==(yu=r)&&(xu?(e=yu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):yu.removeChild(n.stateNode));break;case 18:null!==yu&&(xu?(e=yu,n=n.stateNode,8===e.nodeType?vo(e.parentNode,n):1===e.nodeType&&vo(e,n),Jn(e)):vo(yu,n.stateNode));break;case 4:r=yu,a=xu,yu=n.stateNode.containerInfo,xu=!0,wu(e,t,n),yu=r,xu=a;break;case 0:case 11:case 14:case 15:if(!ou&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){a=r=r.next;do{var o=a,l=o.destroy;o=o.tag,void 0!==l&&(2&o||4&o)&&uu(n,t,l),a=a.next}while(a!==r)}wu(e,t,n);break;case 1:if(!ou&&(su(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(i){zc(n,t,i)}wu(e,t,n);break;case 21:wu(e,t,n);break;case 22:1&n.mode?(ou=(r=ou)||null!==n.memoizedState,wu(e,t,n),ou=r):wu(e,t,n);break;default:wu(e,t,n)}}function Su(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new lu),t.forEach(function(t){var r=Dc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Eu(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var a=n[r];try{var o=e,l=t,i=l;e:for(;null!==i;){switch(i.tag){case 5:yu=i.stateNode,xu=!1;break e;case 3:case 4:yu=i.stateNode.containerInfo,xu=!0;break e}i=i.return}if(null===yu)throw Error(he(160));ku(o,l,a),yu=null,xu=!1;var s=a.alternate;null!==s&&(s.return=null),a.return=null}catch(u){zc(a,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)_u(t,e),t=t.sibling}function _u(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Eu(t,e),ju(e),4&r){try{du(3,e,e.return),fu(3,e)}catch(m){zc(e,e.return,m)}try{du(5,e,e.return)}catch(m){zc(e,e.return,m)}}break;case 1:Eu(t,e),ju(e),512&r&&null!==n&&su(n,n.return);break;case 5:if(Eu(t,e),ju(e),512&r&&null!==n&&su(n,n.return),32&e.flags){var a=e.stateNode;try{wt(a,"")}catch(m){zc(e,e.return,m)}}if(4&r&&null!=(a=e.stateNode)){var o=e.memoizedProps,l=null!==n?n.memoizedProps:o,i=e.type,s=e.updateQueue;if(e.updateQueue=null,null!==s)try{"input"===i&&"radio"===o.type&&null!=o.name&<(a,o),Ot(i,l);var u=Ot(i,o);for(l=0;l<s.length;l+=2){var c=s[l],d=s[l+1];"style"===c?_t(a,d):"dangerouslySetInnerHTML"===c?xt(a,d):"children"===c?wt(a,d):Oe(a,c,d,u)}switch(i){case"input":it(a,o);break;case"textarea":ht(a,o);break;case"select":var f=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var p=o.value;null!=p?dt(a,!!o.multiple,p,!1):f!==!!o.multiple&&(null!=o.defaultValue?dt(a,!!o.multiple,o.defaultValue,!0):dt(a,!!o.multiple,o.multiple?[]:"",!1))}a[So]=o}catch(m){zc(e,e.return,m)}}break;case 6:if(Eu(t,e),ju(e),4&r){if(null===e.stateNode)throw Error(he(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(m){zc(e,e.return,m)}}break;case 3:if(Eu(t,e),ju(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Jn(t.containerInfo)}catch(m){zc(e,e.return,m)}break;case 4:default:Eu(t,e),ju(e);break;case 13:Eu(t,e),ju(e),8192&(a=e.child).flags&&(o=null!==a.memoizedState,a.stateNode.isHidden=o,!o||null!==a.alternate&&null!==a.alternate.memoizedState||(Ku=ln())),4&r&&Su(e);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&e.mode?(ou=(u=ou)||c,Eu(t,e),ou=u):Eu(t,e),ju(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!c&&1&e.mode)for(iu=e,c=e.child;null!==c;){for(d=iu=c;null!==iu;){switch(p=(f=iu).child,f.tag){case 0:case 11:case 14:case 15:du(4,f,f.return);break;case 1:su(f,f.return);var h=f.stateNode;if("function"==typeof h.componentWillUnmount){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(m){zc(r,n,m)}}break;case 5:su(f,f.return);break;case 22:if(null!==f.memoizedState){Nu(d);continue}}null!==p?(p.return=f,iu=p):Nu(d)}c=c.sibling}e:for(c=null,d=e;;){if(5===d.tag){if(null===c){c=d;try{a=d.stateNode,u?"function"==typeof(o=a.style).setProperty?o.setProperty("display","none","important"):o.display="none":(i=d.stateNode,l=null!=(s=d.memoizedProps.style)&&s.hasOwnProperty("display")?s.display:null,i.style.display=Et("display",l))}catch(m){zc(e,e.return,m)}}}else if(6===d.tag){if(null===c)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){zc(e,e.return,m)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Eu(t,e),ju(e),4&r&&Su(e);case 21:}}function ju(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(mu(n)){var r=n;break e}n=n.return}throw Error(he(160))}switch(r.tag){case 5:var a=r.stateNode;32&r.flags&&(wt(a,""),r.flags&=-33),vu(e,gu(e),a);break;case 3:case 4:var o=r.stateNode.containerInfo;bu(e,gu(e),o);break;default:throw Error(he(161))}}catch(l){zc(e,e.return,l)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Cu(e,t,n){iu=e,Ou(e)}function Ou(e,t,n){for(var r=!!(1&e.mode);null!==iu;){var a=iu,o=a.child;if(22===a.tag&&r){var l=null!==a.memoizedState||au;if(!l){var i=a.alternate,s=null!==i&&null!==i.memoizedState||ou;i=au;var u=ou;if(au=l,(ou=s)&&!u)for(iu=a;null!==iu;)s=(l=iu).child,22===l.tag&&null!==l.memoizedState?Fu(a):null!==s?(s.return=l,iu=s):Fu(a);for(;null!==o;)iu=o,Ou(o),o=o.sibling;iu=a,au=i,ou=u}Tu(e)}else 8772&a.subtreeFlags&&null!==o?(o.return=a,iu=o):Tu(e)}}function Tu(e){for(;null!==iu;){var t=iu;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:ou||fu(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!ou)if(null===n)r.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:ds(t.type,n.memoizedProps);r.componentDidUpdate(a,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Xl(t,o,r);break;case 3:var l=t.updateQueue;if(null!==l){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Xl(t,l,n)}break;case 5:var i=t.stateNode;if(null===n&&4&t.flags){n=i;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var c=u.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&Jn(d)}}}break;default:throw Error(he(163))}ou||512&t.flags&&pu(t)}catch(f){zc(t,t.return,f)}}if(t===e){iu=null;break}if(null!==(n=t.sibling)){n.return=t.return,iu=n;break}iu=t.return}}function Nu(e){for(;null!==iu;){var t=iu;if(t===e){iu=null;break}var n=t.sibling;if(null!==n){n.return=t.return,iu=n;break}iu=t.return}}function Fu(e){for(;null!==iu;){var t=iu;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{fu(4,t)}catch(s){zc(t,n,s)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var a=t.return;try{r.componentDidMount()}catch(s){zc(t,a,s)}}var o=t.return;try{pu(t)}catch(s){zc(t,o,s)}break;case 5:var l=t.return;try{pu(t)}catch(s){zc(t,l,s)}}}catch(s){zc(t,t.return,s)}if(t===e){iu=null;break}var i=t.sibling;if(null!==i){i.return=t.return,iu=i;break}iu=t.return}}var Pu,zu=Math.ceil,Lu=Te.ReactCurrentDispatcher,Mu=Te.ReactCurrentOwner,Au=Te.ReactCurrentBatchConfig,Du=0,Iu=null,Ru=null,$u=0,Uu=0,Vu=Lo(0),Bu=0,Wu=null,Hu=0,Qu=0,qu=0,Gu=null,Zu=null,Ku=0,Yu=1/0,Ju=null,Xu=!1,ec=null,tc=null,nc=!1,rc=null,ac=0,oc=0,lc=null,ic=-1,sc=0;function uc(){return 6&Du?ln():-1!==ic?ic:ic=ln()}function cc(e){return 1&e.mode?2&Du&&0!==$u?$u&-$u:null!==_l.transition?(0===sc&&(sc=_n()),sc):0!==(e=Tn)?e:e=void 0===(e=window.event)?16:lr(e.type):1}function dc(e,t,n,r){if(50<oc)throw oc=0,lc=null,Error(he(185));Cn(e,n,r),2&Du&&e===Iu||(e===Iu&&(!(2&Du)&&(Qu|=n),4===Bu&&gc(e,$u)),fc(e,r),1===n&&0===Du&&!(1&t.mode)&&(Yu=ln()+500,Zo&&Jo()))}function fc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,o=e.pendingLanes;0<o;){var l=31-gn(o),i=1<<l,s=a[l];-1===s?0!==(i&n)&&0===(i&r)||(a[l]=Sn(i,t)):s<=t&&(e.expiredLanes|=i),o&=~i}}(e,t);var r=kn(e,e===Iu?$u:0);if(0===r)null!==n&&rn(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&rn(n),1===t)0===e.tag?function(e){Zo=!0,Yo(e)}(bc.bind(null,e)):Yo(bc.bind(null,e)),go(function(){!(6&Du)&&Jo()}),n=null;else{switch(Nn(r)){case 1:n=un;break;case 4:n=cn;break;case 16:default:n=dn;break;case 536870912:n=pn}n=Ic(n,pc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function pc(e,t){if(ic=-1,sc=0,6&Du)throw Error(he(327));var n=e.callbackNode;if(Fc()&&e.callbackNode!==n)return null;var r=kn(e,e===Iu?$u:0);if(0===r)return null;if(30&r||0!==(r&e.expiredLanes)||t)t=_c(e,r);else{t=r;var a=Du;Du|=2;var o=Sc();for(Iu===e&&$u===t||(Ju=null,Yu=ln()+500,wc(e,t));;)try{Cc();break}catch(i){kc(e,i)}Al(),Lu.current=o,Du=a,null!==Ru?t=0:(Iu=null,$u=0,t=Bu)}if(0!==t){if(2===t&&(0!==(a=En(e))&&(r=a,t=hc(e,a))),1===t)throw n=Wu,wc(e,0),gc(e,r),fc(e,ln()),n;if(6===t)gc(e,r);else{if(a=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var a=n[r],o=a.getSnapshot;a=a.value;try{if(!ga(o(),a))return!1}catch(l){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(a)||(t=_c(e,r),2===t&&(o=En(e),0!==o&&(r=o,t=hc(e,o))),1!==t)))throw n=Wu,wc(e,0),gc(e,r),fc(e,ln()),n;switch(e.finishedWork=a,e.finishedLanes=r,t){case 0:case 1:throw Error(he(345));case 2:case 5:Nc(e,Zu,Ju);break;case 3:if(gc(e,r),(130023424&r)===r&&10<(t=Ku+500-ln())){if(0!==kn(e,0))break;if(((a=e.suspendedLanes)&r)!==r){uc(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=po(Nc.bind(null,e,Zu,Ju),t);break}Nc(e,Zu,Ju);break;case 4:if(gc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,a=-1;0<r;){var l=31-gn(r);o=1<<l,(l=t[l])>a&&(a=l),r&=~o}if(r=a,10<(r=(120>(r=ln()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*zu(r/1960))-r)){e.timeoutHandle=po(Nc.bind(null,e,Zu,Ju),r);break}Nc(e,Zu,Ju);break;default:throw Error(he(329))}}}return fc(e,ln()),e.callbackNode===n?pc.bind(null,e):null}function hc(e,t){var n=Gu;return e.current.memoizedState.isDehydrated&&(wc(e,t).flags|=256),2!==(e=_c(e,t))&&(t=Zu,Zu=n,null!==t&&mc(t)),e}function mc(e){null===Zu?Zu=e:Zu.push.apply(Zu,e)}function gc(e,t){for(t&=~qu,t&=~Qu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-gn(t),r=1<<n;e[n]=-1,t&=~r}}function bc(e){if(6&Du)throw Error(he(327));Fc();var t=kn(e,0);if(!(1&t))return fc(e,ln()),null;var n=_c(e,t);if(0!==e.tag&&2===n){var r=En(e);0!==r&&(t=r,n=hc(e,r))}if(1===n)throw n=Wu,wc(e,0),gc(e,t),fc(e,ln()),n;if(6===n)throw Error(he(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Nc(e,Zu,Ju),fc(e,ln()),null}function vc(e,t){var n=Du;Du|=1;try{return e(t)}finally{0===(Du=n)&&(Yu=ln()+500,Zo&&Jo())}}function yc(e){null!==rc&&0===rc.tag&&!(6&Du)&&Fc();var t=Du;Du|=1;var n=Au.transition,r=Tn;try{if(Au.transition=null,Tn=1,e)return e()}finally{Tn=r,Au.transition=n,!(6&(Du=t))&&Jo()}}function xc(){Uu=Vu.current,Mo(Vu)}function wc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ho(n)),null!==Ru)for(n=Ru.return;null!==n;){var r=n;switch(dl(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Bo();break;case 3:li(),Mo(Ro),Mo(Io),fi();break;case 5:si(r);break;case 4:li();break;case 13:case 19:Mo(ui);break;case 10:Dl(r.type._context);break;case 22:case 23:xc()}n=n.return}if(Iu=e,Ru=e=Vc(e.current,null),$u=Uu=t,Bu=0,Wu=null,qu=Qu=Hu=0,Zu=Gu=null,null!==Ul){for(t=0;t<Ul.length;t++)if(null!==(r=(n=Ul[t]).interleaved)){n.interleaved=null;var a=r.next,o=n.pending;if(null!==o){var l=o.next;o.next=a,r.next=l}n.pending=r}Ul=null}return e}function kc(e,t){for(;;){var n=Ru;try{if(Al(),pi.current=is,yi){for(var r=gi.memoizedState;null!==r;){var a=r.queue;null!==a&&(a.pending=null),r=r.next}yi=!1}if(mi=0,vi=bi=gi=null,xi=!1,wi=0,Mu.current=null,null===n||null===n.return){Bu=1,Wu=t,Ru=null;break}e:{var o=e,l=n.return,i=n,s=t;if(t=$u,i.flags|=32768,null!==s&&"object"==typeof s&&"function"==typeof s.then){var u=s,c=i,d=c.tag;if(!(1&c.mode||0!==d&&11!==d&&15!==d)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=_s(l);if(null!==p){p.flags&=-257,js(p,l,i,0,t),1&p.mode&&Es(o,u,t),s=u;var h=(t=p).updateQueue;if(null===h){var m=new Set;m.add(s),t.updateQueue=m}else h.add(s);break e}if(!(1&t)){Es(o,u,t),Ec();break e}s=Error(he(426))}else if(hl&&1&i.mode){var g=_s(l);if(null!==g){!(65536&g.flags)&&(g.flags|=256),js(g,l,i,0,t),El(vs(s,i));break e}}o=s=vs(s,i),4!==Bu&&(Bu=2),null===Gu?Gu=[o]:Gu.push(o),o=l;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Yl(o,ks(0,s,t));break e;case 1:i=s;var b=o.type,v=o.stateNode;if(!(128&o.flags||"function"!=typeof b.getDerivedStateFromError&&(null===v||"function"!=typeof v.componentDidCatch||null!==tc&&tc.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t,Yl(o,Ss(o,i,t));break e}}o=o.return}while(null!==o)}Tc(n)}catch(y){t=y,Ru===n&&null!==n&&(Ru=n=n.return);continue}break}}function Sc(){var e=Lu.current;return Lu.current=is,null===e?is:e}function Ec(){0!==Bu&&3!==Bu&&2!==Bu||(Bu=4),null===Iu||!(268435455&Hu)&&!(268435455&Qu)||gc(Iu,$u)}function _c(e,t){var n=Du;Du|=2;var r=Sc();for(Iu===e&&$u===t||(Ju=null,wc(e,t));;)try{jc();break}catch(a){kc(e,a)}if(Al(),Du=n,Lu.current=r,null!==Ru)throw Error(he(261));return Iu=null,$u=0,Bu}function jc(){for(;null!==Ru;)Oc(Ru)}function Cc(){for(;null!==Ru&&!an();)Oc(Ru)}function Oc(e){var t=Pu(e.alternate,e,Uu);e.memoizedProps=e.pendingProps,null===t?Tc(e):Ru=t,Mu.current=null}function Tc(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=ru(n,t)))return n.flags&=32767,void(Ru=n);if(null===e)return Bu=6,void(Ru=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=nu(n,t,Uu)))return void(Ru=n);if(null!==(t=t.sibling))return void(Ru=t);Ru=t=e}while(null!==t);0===Bu&&(Bu=5)}function Nc(e,t,n){var r=Tn,a=Au.transition;try{Au.transition=null,Tn=1,function(e,t,n,r){do{Fc()}while(null!==rc);if(6&Du)throw Error(he(327));n=e.finishedWork;var a=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(he(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var a=31-gn(n),o=1<<a;t[a]=0,r[a]=-1,e[a]=-1,n&=~o}}(e,o),e===Iu&&(Ru=Iu=null,$u=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||nc||(nc=!0,Ic(dn,function(){return Fc(),null})),o=!!(15990&n.flags),!!(15990&n.subtreeFlags)||o){o=Au.transition,Au.transition=null;var l=Tn;Tn=1;var i=Du;Du|=4,Mu.current=null,function(e,t){if(uo=er,ka(e=wa())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(x){n=null;break e}var l=0,i=-1,s=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==a&&3!==d.nodeType||(i=l+a),d!==o||0!==r&&3!==d.nodeType||(s=l+r),3===d.nodeType&&(l+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===a&&(i=l),f===o&&++c===r&&(s=l),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===i||-1===s?null:{start:i,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(co={focusedElem:e,selectionRange:n},er=!1,iu=t;null!==iu;)if(e=(t=iu).child,1028&t.subtreeFlags&&null!==e)e.return=t,iu=e;else for(;null!==iu;){t=iu;try{var h=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var m=h.memoizedProps,g=h.memoizedState,b=t.stateNode,v=b.getSnapshotBeforeUpdate(t.elementType===t.type?m:ds(t.type,m),g);b.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var y=t.stateNode.containerInfo;1===y.nodeType?y.textContent="":9===y.nodeType&&y.documentElement&&y.removeChild(y.documentElement);break;default:throw Error(he(163))}}catch(x){zc(t,t.return,x)}if(null!==(e=t.sibling)){e.return=t.return,iu=e;break}iu=t.return}h=cu,cu=!1}(e,n),_u(n,e),Sa(co),er=!!uo,co=uo=null,e.current=n,Cu(n),on(),Du=i,Tn=l,Au.transition=o}else e.current=n;if(nc&&(nc=!1,rc=e,ac=a),o=e.pendingLanes,0===o&&(tc=null),function(e){if(mn&&"function"==typeof mn.onCommitFiberRoot)try{mn.onCommitFiberRoot(hn,e,void 0,!(128&~e.current.flags))}catch(t){}}(n.stateNode),fc(e,ln()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],r(a.value,{componentStack:a.stack,digest:a.digest});if(Xu)throw Xu=!1,e=ec,ec=null,e;!!(1&ac)&&0!==e.tag&&Fc(),o=e.pendingLanes,1&o?e===lc?oc++:(oc=0,lc=e):oc=0,Jo()}(e,t,n,r)}finally{Au.transition=a,Tn=r}return null}function Fc(){if(null!==rc){var e=Nn(ac),t=Au.transition,n=Tn;try{if(Au.transition=null,Tn=16>e?16:e,null===rc)var r=!1;else{if(e=rc,rc=null,ac=0,6&Du)throw Error(he(331));var a=Du;for(Du|=4,iu=e.current;null!==iu;){var o=iu,l=o.child;if(16&iu.flags){var i=o.deletions;if(null!==i){for(var s=0;s<i.length;s++){var u=i[s];for(iu=u;null!==iu;){var c=iu;switch(c.tag){case 0:case 11:case 15:du(8,c,o)}var d=c.child;if(null!==d)d.return=c,iu=d;else for(;null!==iu;){var f=(c=iu).sibling,p=c.return;if(hu(c),c===u){iu=null;break}if(null!==f){f.return=p,iu=f;break}iu=p}}}var h=o.alternate;if(null!==h){var m=h.child;if(null!==m){h.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}iu=o}}if(2064&o.subtreeFlags&&null!==l)l.return=o,iu=l;else e:for(;null!==iu;){if(2048&(o=iu).flags)switch(o.tag){case 0:case 11:case 15:du(9,o,o.return)}var b=o.sibling;if(null!==b){b.return=o.return,iu=b;break e}iu=o.return}}var v=e.current;for(iu=v;null!==iu;){var y=(l=iu).child;if(2064&l.subtreeFlags&&null!==y)y.return=l,iu=y;else e:for(l=v;null!==iu;){if(2048&(i=iu).flags)try{switch(i.tag){case 0:case 11:case 15:fu(9,i)}}catch(w){zc(i,i.return,w)}if(i===l){iu=null;break e}var x=i.sibling;if(null!==x){x.return=i.return,iu=x;break e}iu=i.return}}if(Du=a,Jo(),mn&&"function"==typeof mn.onPostCommitFiberRoot)try{mn.onPostCommitFiberRoot(hn,e)}catch(w){}r=!0}return r}finally{Tn=n,Au.transition=t}}return!1}function Pc(e,t,n){e=Zl(e,t=ks(0,t=vs(n,t),1),1),t=uc(),null!==e&&(Cn(e,1,t),fc(e,t))}function zc(e,t,n){if(3===e.tag)Pc(e,e,n);else for(;null!==t;){if(3===t.tag){Pc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===tc||!tc.has(r))){t=Zl(t,e=Ss(t,e=vs(n,e),1),1),e=uc(),null!==t&&(Cn(t,1,e),fc(t,e));break}}t=t.return}}function Lc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=uc(),e.pingedLanes|=e.suspendedLanes&n,Iu===e&&($u&n)===n&&(4===Bu||3===Bu&&(130023424&$u)===$u&&500>ln()-Ku?wc(e,0):qu|=n),fc(e,t)}function Mc(e,t){0===t&&(1&e.mode?(t=xn,!(130023424&(xn<<=1))&&(xn=4194304)):t=1);var n=uc();null!==(e=Wl(e,t))&&(Cn(e,t,n),fc(e,n))}function Ac(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Mc(e,n)}function Dc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(he(314))}null!==r&&r.delete(t),Mc(e,n)}function Ic(e,t){return nn(e,t)}function Rc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $c(e,t,n,r){return new Rc(e,t,n,r)}function Uc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Vc(e,t){var n=e.alternate;return null===n?((n=$c(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Bc(e,t,n,r,a,o){var l=2;if(r=e,"function"==typeof e)Uc(e)&&(l=1);else if("string"==typeof e)l=5;else e:switch(e){case Pe:return Wc(n.children,a,o,t);case ze:l=8,a|=8;break;case Le:return(e=$c(12,n,t,2|a)).elementType=Le,e.lanes=o,e;case Ie:return(e=$c(13,n,t,a)).elementType=Ie,e.lanes=o,e;case Re:return(e=$c(19,n,t,a)).elementType=Re,e.lanes=o,e;case Ve:return Hc(n,a,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Me:l=10;break e;case Ae:l=9;break e;case De:l=11;break e;case $e:l=14;break e;case Ue:l=16,r=null;break e}throw Error(he(130,null==e?e:typeof e,""))}return(t=$c(l,n,t,a)).elementType=e,t.type=r,t.lanes=o,t}function Wc(e,t,n,r){return(e=$c(7,e,r,t)).lanes=n,e}function Hc(e,t,n,r){return(e=$c(22,e,r,t)).elementType=Ve,e.lanes=n,e.stateNode={isHidden:!1},e}function Qc(e,t,n){return(e=$c(6,e,null,t)).lanes=n,e}function qc(e,t,n){return(t=$c(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Gc(e,t,n,r,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jn(0),this.expirationTimes=jn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jn(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Zc(e,t,n,r,a,o,l,i,s){return e=new Gc(e,t,n,i,s),1===t?(t=1,!0===o&&(t|=8)):t=0,o=$c(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ql(o),e}function Kc(e){if(!e)return Do;e:{if(Yt(e=e._reactInternals)!==e||1!==e.tag)throw Error(he(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Vo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(he(171))}if(1===e.tag){var n=e.type;if(Vo(n))return Ho(e,n,t)}return t}function Yc(e,t,n,r,a,o,l,i,s){return(e=Zc(n,r,!0,e,0,o,0,i,s)).context=Kc(null),n=e.current,(o=Gl(r=uc(),a=cc(n))).callback=null!=t?t:null,Zl(n,o,a),e.current.lanes=a,Cn(e,a,r),fc(e,r),e}function Jc(e,t,n,r){var a=t.current,o=uc(),l=cc(a);return n=Kc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Gl(o,l)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Zl(a,t,l))&&(dc(e,a,l,o),Kl(e,a,l)),l}function Xc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function ed(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function td(e,t){ed(e,t),(e=e.alternate)&&ed(e,t)}Pu=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ro.current)Os=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return Os=!1,function(e,t,n){switch(t.tag){case 3:Is(t),Sl();break;case 5:ii(t);break;case 1:Vo(t.type)&&Qo(t);break;case 4:oi(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,a=t.memoizedProps.value;Ao(Pl,r._currentValue),r._currentValue=a;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ao(ui,1&ui.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Qs(e,t,n):(Ao(ui,1&ui.current),null!==(e=Xs(e,t,n))?e.sibling:null);Ao(ui,1&ui.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return Ys(e,t,n);t.flags|=128}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),Ao(ui,ui.current),r)break;return null;case 22:case 23:return t.lanes=0,zs(e,t,n)}return Xs(e,t,n)}(e,t,n);Os=!!(131072&e.flags)}else Os=!1,hl&&1048576&t.flags&&ul(t,nl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Js(e,t),e=t.pendingProps;var a=Uo(t,Io.current);Rl(t,n),a=_i(null,t,r,e,a,n);var o=ji();return t.flags|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Vo(r)?(o=!0,Qo(t)):o=!1,t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,Ql(t),a.updater=ps,t.stateNode=a,a._reactInternals=t,bs(t,r,e,n),t=Ds(null,t,r,!0,o,n)):(t.tag=0,hl&&o&&cl(t),Ts(null,t,a,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Js(e,t),e=t.pendingProps,r=(a=r._init)(r._payload),t.type=r,a=t.tag=function(e){if("function"==typeof e)return Uc(e)?1:0;if(null!=e){if((e=e.$$typeof)===De)return 11;if(e===$e)return 14}return 2}(r),e=ds(r,e),a){case 0:t=Ms(null,t,r,e,n);break e;case 1:t=As(null,t,r,e,n);break e;case 11:t=Ns(null,t,r,e,n);break e;case 14:t=Fs(null,t,r,ds(r.type,e),n);break e}throw Error(he(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,Ms(e,t,r,a=t.elementType===r?a:ds(r,a),n);case 1:return r=t.type,a=t.pendingProps,As(e,t,r,a=t.elementType===r?a:ds(r,a),n);case 3:e:{if(Is(t),null===e)throw Error(he(387));r=t.pendingProps,a=(o=t.memoizedState).element,ql(e,t),Jl(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Rs(e,t,r,n,a=vs(Error(he(423)),t));break e}if(r!==a){t=Rs(e,t,r,n,a=vs(Error(he(424)),t));break e}for(pl=yo(t.stateNode.containerInfo.firstChild),fl=t,hl=!0,ml=null,n=Fl(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Sl(),r===a){t=Xs(e,t,n);break e}Ts(e,t,r,n)}t=t.child}return t;case 5:return ii(t),null===e&&yl(t),r=t.type,a=t.pendingProps,o=null!==e?e.memoizedProps:null,l=a.children,fo(r,a)?l=null:null!==o&&fo(r,o)&&(t.flags|=32),Ls(e,t),Ts(e,t,l,n),t.child;case 6:return null===e&&yl(t),null;case 13:return Qs(e,t,n);case 4:return oi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Nl(t,null,r,n):Ts(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,Ns(e,t,r,a=t.elementType===r?a:ds(r,a),n);case 7:return Ts(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ts(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,o=t.memoizedProps,l=a.value,Ao(Pl,r._currentValue),r._currentValue=l,null!==o)if(ga(o.value,l)){if(o.children===a.children&&!Ro.current){t=Xs(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var i=o.dependencies;if(null!==i){l=o.child;for(var s=i.firstContext;null!==s;){if(s.context===r){if(1===o.tag){(s=Gl(-1,n&-n)).tag=2;var u=o.updateQueue;if(null!==u){var c=(u=u.shared).pending;null===c?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}o.lanes|=n,null!==(s=o.alternate)&&(s.lanes|=n),Il(o.return,n,t),i.lanes|=n;break}s=s.next}}else if(10===o.tag)l=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(l=o.return))throw Error(he(341));l.lanes|=n,null!==(i=l.alternate)&&(i.lanes|=n),Il(l,n,t),l=o.sibling}else l=o.child;if(null!==l)l.return=o;else for(l=o;null!==l;){if(l===t){l=null;break}if(null!==(o=l.sibling)){o.return=l.return,l=o;break}l=l.return}o=l}Ts(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=t.pendingProps.children,Rl(t,n),r=r(a=$l(a)),t.flags|=1,Ts(e,t,r,n),t.child;case 14:return a=ds(r=t.type,t.pendingProps),Fs(e,t,r,a=ds(r.type,a),n);case 15:return Ps(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:ds(r,a),Js(e,t),t.tag=1,Vo(r)?(e=!0,Qo(t)):e=!1,Rl(t,n),ms(t,r,a),bs(t,r,a,n),Ds(null,t,r,!0,e,n);case 19:return Ys(e,t,n);case 22:return zs(e,t,n)}throw Error(he(156,t.tag))};var nd="function"==typeof reportError?reportError:function(e){console.error(e)};function rd(e){this._internalRoot=e}function ad(e){this._internalRoot=e}function od(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function ld(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function id(){}function sd(e,t,n,r,a){var o=n._reactRootContainer;if(o){var l=o;if("function"==typeof a){var i=a;a=function(){var e=Xc(l);i.call(e)}}Jc(t,l,e,a)}else l=function(e,t,n,r,a){if(a){if("function"==typeof r){var o=r;r=function(){var e=Xc(l);o.call(e)}}var l=Yc(t,r,e,0,null,!1,0,"",id);return e._reactRootContainer=l,e[Eo]=l.current,Ya(8===e.nodeType?e.parentNode:e),yc(),l}for(;a=e.lastChild;)e.removeChild(a);if("function"==typeof r){var i=r;r=function(){var e=Xc(s);i.call(e)}}var s=Zc(e,0,!1,null,0,!1,0,"",id);return e._reactRootContainer=s,e[Eo]=s.current,Ya(8===e.nodeType?e.parentNode:e),yc(function(){Jc(t,s,n,r)}),s}(n,t,e,a,r);return Xc(l)}ad.prototype.render=rd.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(he(409));Jc(e,t,null,null)},ad.prototype.unmount=rd.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;yc(function(){Jc(null,e,null,null)}),t[Eo]=null}},ad.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ln();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Bn.length&&0!==t&&t<Bn[n].priority;n++);Bn.splice(n,0,e),0===n&&qn(e)}},Fn=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=wn(t.pendingLanes);0!==n&&(On(t,1|n),fc(t,ln()),!(6&Du)&&(Yu=ln()+500,Jo()))}break;case 13:yc(function(){var t=Wl(e,1);if(null!==t){var n=uc();dc(t,e,1,n)}}),td(e,1)}},Pn=function(e){if(13===e.tag){var t=Wl(e,134217728);if(null!==t)dc(t,e,134217728,uc());td(e,134217728)}},zn=function(e){if(13===e.tag){var t=cc(e),n=Wl(e,t);if(null!==n)dc(n,e,t,uc());td(e,t)}},Ln=function(){return Tn},Mn=function(e,t){var n=Tn;try{return Tn=e,t()}finally{Tn=n}},Ft=function(e,t,n){switch(t){case"input":if(it(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=Fo(r);if(!a)throw Error(he(90));nt(r),it(r,a)}}}break;case"textarea":ht(e,n);break;case"select":null!=(t=n.value)&&dt(e,!!n.multiple,t,!1)}},Dt=vc,It=yc;var ud={usingClientEntryPoint:!1,Events:[To,No,Fo,Mt,At,vc]},cd={findFiberByHostInstance:Oo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},dd={bundleType:cd.bundleType,version:cd.version,rendererPackageName:cd.rendererPackageName,rendererConfig:cd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Te.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=en(e))?null:e.stateNode},findFiberByHostInstance:cd.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var fd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fd.isDisabled&&fd.supportsFiber)try{hn=fd.inject(dd),mn=fd}catch(yt){}}se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ud,se.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!od(t))throw Error(he(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Fe,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},se.createRoot=function(e,t){if(!od(e))throw Error(he(299));var n=!1,r="",a=nd;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(a=t.onRecoverableError)),t=Zc(e,1,!1,null,0,n,0,r,a),e[Eo]=t.current,Ya(8===e.nodeType?e.parentNode:e),new rd(t)},se.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(he(188));throw e=Object.keys(e).join(","),Error(he(268,e))}return e=null===(e=en(t))?null:e.stateNode},se.flushSync=function(e){return yc(e)},se.hydrate=function(e,t,n){if(!ld(t))throw Error(he(200));return sd(null,e,t,!0,n)},se.hydrateRoot=function(e,t,n){if(!od(e))throw Error(he(405));var r=null!=n&&n.hydratedSources||null,a=!1,o="",l=nd;if(null!=n&&(!0===n.unstable_strictMode&&(a=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(l=n.onRecoverableError)),t=Yc(t,null,e,1,null!=n?n:null,a,0,o,l),e[Eo]=t.current,Ya(e),r)for(e=0;e<r.length;e++)a=(a=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new ad(t)},se.render=function(e,t,n){if(!ld(t))throw Error(he(200));return sd(null,e,t,!1,n)},se.unmountComponentAtNode=function(e){if(!ld(e))throw Error(he(40));return!!e._reactRootContainer&&(yc(function(){sd(null,null,e,!1,function(){e._reactRootContainer=null,e[Eo]=null})}),!0)},se.unstable_batchedUpdates=vc,se.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ld(n))throw Error(he(200));if(null==e||void 0===e._reactInternals)throw Error(he(38));return sd(e,t,n,!1,r)},se.version="18.3.1-next-f1338f8080-20240426",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),ie.exports=se;var pd=ie.exports;le.createRoot=pd.createRoot,le.hydrateRoot=pd.hydrateRoot;const hd=()=>oe.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[oe.jsx("path",{d:"M11.7607 16.6788L11.7336 10.9913C11.7066 6.84852 13.9213 3.00711 17.517 0.942341L17.8995 0.709761C19.1707 -0.0282536 20.7294 -0.0282536 22.0013 0.709761L32.1592 6.575C30.4638 5.64536 28.3858 5.67244 26.7043 6.64304L18.5834 11.3322L13.6068 14.203L13.1146 14.4904C13.1007 14.4904 13.1007 14.5043 13.0875 14.5043C12.3085 14.9826 11.8163 15.7894 11.7614 16.6781",fill:"#2AAD8E"}),oe.jsx("path",{d:"M37.7736 23.1565V25.0706C37.7736 28.215 36.0921 31.1275 33.3712 32.7132L22.4336 39.0568C26.0292 36.992 28.244 33.1506 28.2169 29.0079L28.1898 23.3204V23.2794C28.2037 23.2385 28.2037 23.1836 28.2037 23.1426V16.8261C28.2037 15.8694 27.6976 14.98 26.8638 14.4746L28.2037 15.2536L35.7234 19.6011C36.9946 20.3391 37.7743 21.693 37.7743 23.1558L37.7736 23.1565Z",fill:"#45C9A9"}),oe.jsx("path",{d:"M28.2166 29.0091C28.2437 33.1518 26.0289 36.9932 22.4333 39.058L22.0507 39.2905C20.7795 40.0286 19.2209 40.0286 17.9489 39.2905L7.79102 33.4253C9.48642 34.355 11.5644 34.3279 13.2459 33.3573L21.3669 28.6682L26.3434 25.7973L26.8357 25.5099C26.8495 25.5099 26.8495 25.496 26.8627 25.496C27.6417 25.0177 28.134 24.2109 28.1888 23.3223L28.2159 29.0097L28.2166 29.0091Z",fill:"#2AAD8E"}),oe.jsx("path",{d:"M21.367 28.6672L13.2461 33.3564C11.5645 34.327 9.48658 34.3547 7.79118 33.4244C7.75022 33.3973 7.70926 33.3834 7.6683 33.3564L2.22656 30.2127L11.7971 24.7168L13.1371 25.4958C13.151 25.4958 13.151 25.5097 13.1642 25.5097L18.633 28.6679C19.4807 29.1602 20.52 29.1602 21.367 28.6679V28.6672Z",fill:"#13947D"}),oe.jsx("path",{d:"M13.1361 25.4962L11.7962 24.7173L4.27649 20.3697C3.00526 19.6317 2.22559 18.2779 2.22559 16.815V14.9009C2.22559 11.7565 3.90712 8.84406 6.62797 7.25834L17.5663 0.914062C13.9706 2.97883 11.7559 6.82026 11.783 10.963L11.81 16.6505V16.6915C11.7962 16.7324 11.7962 16.7873 11.7962 16.8282V23.1447C11.7962 24.1014 12.3023 24.9901 13.1361 25.4962Z",fill:"#45C9A9"}),oe.jsx("path",{d:"M37.7733 9.7586L28.2027 15.2545L26.8628 14.4755C26.8489 14.4755 26.8489 14.4616 26.8357 14.4616L21.3669 11.3034C20.5192 10.8111 19.4799 10.8111 18.6328 11.3034L26.7538 6.61424C28.4353 5.64364 30.5133 5.61656 32.2087 6.5462C32.2497 6.57328 32.2906 6.58716 32.3316 6.61424L37.7733 9.7586Z",fill:"#13947D"})]});var md={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},gd=Y.createContext&&Y.createContext(md),bd=["attr","size","title"];function vd(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function yd(){return yd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yd.apply(this,arguments)}function xd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xd(Object(n),!0).forEach(function(t){kd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kd(e,t,n){var r;return(t="symbol"==typeof(r=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sd(e){return e&&e.map((e,t)=>Y.createElement(e.tag,wd({key:t},e.attr),Sd(e.child)))}function Ed(e){return t=>Y.createElement(_d,yd({attr:wd({},e.attr)},t),Sd(e.child))}function _d(e){var t=t=>{var n,{attr:r,size:a,title:o}=e,l=vd(e,bd),i=a||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),Y.createElement("svg",yd({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,l,{className:n,style:wd(wd({color:e.color||t.color},t.style),e.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),o&&Y.createElement("title",null,o),e.children)};return void 0!==gd?Y.createElement(gd.Consumer,null,e=>t(e)):t(md)}function jd(e){return Ed({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.03 3.97a.75.75 0 0 1 0 1.06l-6.22 6.22H21a.75.75 0 0 1 0 1.5H4.81l6.22 6.22a.75.75 0 1 1-1.06 1.06l-7.5-7.5a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"},child:[]}]})(e)}function Cd(e){this._maxSize=e,this.clear()}Cd.prototype.clear=function(){this._size=0,this._values=Object.create(null)},Cd.prototype.get=function(e){return this._values[e]},Cd.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Od=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Td=/^\d+$/,Nd=/^\d/,Fd=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Pd=/^\s*(['"]?)(.*?)(\1)\s*$/,zd=new Cd(512),Ld=new Cd(512),Md=new Cd(512),Ad={Cache:Cd,split:Id,normalizePath:Dd,setter:function(e){var t=Dd(e);return Ld.get(e)||Ld.set(e,function(e,n){for(var r=0,a=t.length,o=e;r<a-1;){var l=t[r];if("__proto__"===l||"constructor"===l||"prototype"===l)return e;o=o[t[r++]]}o[t[r]]=n})},getter:function(e,t){var n=Dd(e);return Md.get(e)||Md.set(e,function(e){for(var r=0,a=n.length;r<a;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(Rd(t)||Td.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,a,o,l,i=e.length;for(a=0;a<i;a++)(r=e[a])&&($d(r)&&(r='"'+r+'"'),o=!(l=Rd(r))&&/^\d+$/.test(r),t.call(n,r,l,o,a,e))}(Array.isArray(e)?e:Id(e),t,n)}};function Dd(e){return zd.get(e)||zd.set(e,Id(e).map(function(e){return e.replace(Pd,"$2")}))}function Id(e){return e.match(Od)||[""]}function Rd(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function $d(e){return!Rd(e)&&(function(e){return e.match(Nd)&&!e.match(Td)}(e)||function(e){return Fd.test(e)}(e))}const Ud=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Vd=e=>e.match(Ud)||[],Bd=(e,t)=>Vd(e).join(t).toLowerCase(),Wd=e=>Vd(e).reduce((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,"");var Hd=Wd,Qd=e=>Bd(e,"_"),qd={exports:{}};function Gd(e,t){var n=e.length,r=new Array(n),a={},o=n,l=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var a=e[n];t.has(a[0])||t.set(a[0],new Set),t.has(a[1])||t.set(a[1],new Set),t.get(a[0]).add(a[1])}return t}(t),i=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!i.has(e[0])||!i.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});o--;)a[o]||s(e[o],o,new Set);return r;function s(e,t,o){if(o.has(e)){var u;try{u=", node was:"+JSON.stringify(e)}catch(f){u=""}throw new Error("Cyclic dependency"+u)}if(!i.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!a[t]){a[t]=!0;var c=l.get(e)||new Set;if(t=(c=Array.from(c)).length){o.add(e);do{var d=c[--t];s(d,i.get(d),o)}while(t);o.delete(e)}r[--n]=e}}}qd.exports=function(e){return Gd(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var a=e[n];t.add(a[0]),t.add(a[1])}return Array.from(t)}(e),e)},qd.exports.array=Gd;const Zd=d(qd.exports),Kd=Object.prototype.toString,Yd=Error.prototype.toString,Jd=RegExp.prototype.toString,Xd="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",ef=/^Symbol\((.*)\)(.*)$/;function tf(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return Xd.call(e).replace(ef,"Symbol($1)");const r=Kd.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+Yd.call(e)+"]":"RegExp"===r?Jd.call(e):null}function nf(e,t){let n=tf(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=tf(this[e],t);return null!==r?r:n},2)}function rf(e){return null==e?[]:[].concat(e)}let af,of,lf,sf=/\$\{\s*(\w+)\s*\}/g;af=Symbol.toStringTag;class uf{constructor(e,t,n,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[af]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],rf(e).forEach(e=>{if(cf.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}of=Symbol.hasInstance,lf=Symbol.toStringTag;class cf extends Error{static formatError(e,t){const n=t.label||t.path||"this";return t=Object.assign({},t,{path:n,originalPath:t.path}),"string"==typeof e?e.replace(sf,(e,n)=>nf(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r,a){const o=new uf(e,t,n,r);if(a)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[lf]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,cf)}static[of](e){return uf[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let df={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const a=null!=r&&r!==n?` (cast from the value \`${nf(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${nf(n,!0)}\``+a:`${e} must match the configured type. The validated value was: \`${nf(n,!0)}\``+a}},ff={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},pf={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},hf={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},mf={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},gf={notType:e=>{const{path:t,value:n,spec:r}=e,a=r.types.length;if(Array.isArray(n)){if(n.length<a)return`${t} tuple value has too few items, expected a length of ${a} but got ${n.length} for value: \`${nf(n,!0)}\``;if(n.length>a)return`${t} tuple value has too many items, expected a length of ${a} but got ${n.length} for value: \`${nf(n,!0)}\``}return cf.formatError(df.notType,e)}};Object.assign(Object.create(null),{mixed:df,string:ff,number:pf,date:hf,object:mf,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:{isValue:"${path} field must be ${value}"},tuple:gf});const bf=e=>e&&e.__isYupSchema__;class vf{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:a}=t,o="function"==typeof n?n:(...e)=>e.every(e=>e===n);return new vf(e,(e,t)=>{var n;let l=o(...e)?r:a;return null!=(n=null==l?void 0:l(t))?n:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn(n,e,t);if(void 0===r||r===e)return e;if(!bf(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}const yf="$",xf=".";class wf{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===yf,this.isValue=this.key[0]===xf,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?yf:this.isValue?xf:"";this.path=this.key.slice(n.length),this.getter=this.path&&Ad.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}wf.prototype.__isYupRef=!0;const kf=e=>null==e;function Sf(e){function t({value:t,path:n="",options:r,originalValue:a,schema:o},l,i){const{name:s,test:u,params:c,message:d,skipAbsent:f}=e;let{parent:p,context:h,abortEarly:m=o.spec.abortEarly,disableStackTrace:g=o.spec.disableStackTrace}=r;const b={value:t,parent:p,context:h};function v(e={}){const r=Ef(Object.assign({value:t,originalValue:a,label:o.spec.label,path:e.path||n,spec:o.spec,disableStackTrace:e.disableStackTrace||g},c,e.params),b),l=new cf(cf.formatError(e.message||d,r),t,r.path,e.type||s,r.disableStackTrace);return l.params=r,l}const y=m?l:i;let x={path:n,parent:p,type:s,from:r.from,createError:v,resolve:e=>_f(e,b),options:r,originalValue:a,schema:o};const w=e=>{cf.isError(e)?y(e):e?i(null):y(v())},k=e=>{cf.isError(e)?y(e):l(e)};if(f&&kf(t))return w(!0);let S;try{var E;if(S=u.call(x,t,x),"function"==typeof(null==(E=S)?void 0:E.then)){if(r.sync)throw new Error(`Validation test of type: "${x.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(S).then(w,k)}}catch(_){return void k(_)}w(S)}return t.OPTIONS=e,t}function Ef(e,t){if(!e)return e;for(const n of Object.keys(e))e[n]=_f(e[n],t);return e}function _f(e,t){return wf.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function jf(e,t,n,r=n){let a,o,l;return t?(Ad.forEach(t,(i,s,u)=>{let c=s?i.slice(1,i.length-1):i,d="tuple"===(e=e.resolve({context:r,parent:a,value:n})).type,f=u?parseInt(c,10):0;if(e.innerType||d){if(d&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${l}" must contain an index to the tuple element, e.g. "${l}[0]"`);if(n&&f>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${i}, in the path: ${t}. because there is no value at that index. `);a=n,n=n&&n[f],e=d?e.spec.types[f]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${l} which is a type: "${e.type}")`);a=n,n=n&&n[c],e=e.fields[c]}o=c,l=s?"["+i+"]":"."+i}),{schema:e,parent:a,parentPath:o}):{parent:a,parentPath:t,schema:e}}class Cf extends Set{describe(){const e=[];for(const t of this.values())e.push(wf.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new Cf(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function Of(e,t=new Map){if(bf(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Of(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,a]of e.entries())n.set(r,Of(a,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Of(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[r,a]of Object.entries(e))n[r]=Of(a,t)}return n}function Tf(e){if(null==e||!e.length)return;const t=[];let n="",r=!1,a=!1;for(let o=0;o<e.length;o++){const l=e[o];"["!==l||a?"]"!==l||a?'"'!==l?"."!==l||r||a?n+=l:n&&(t.push(n),n=""):a=!a:(n&&(/^\d+$/.test(n)?t.push(n):t.push(n.replace(/^"|"$/g,"")),n=""),r=!1):(n&&(t.push(...n.split(".").filter(Boolean)),n=""),r=!0)}return n&&t.push(...n.split(".").filter(Boolean)),t}function Nf(e,t){var n;if((null==(n=e.inner)||!n.length)&&e.errors.length)return function(e,t){const n=t?`${t}.${e.path}`:e.path;return e.errors.map(e=>({message:e,path:Tf(n)}))}(e,t);const r=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>Nf(e,r))}class Ff{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Cf,this._blacklist=new Cf,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(df.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=Of(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=Object.assign({},t.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,r,a;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(a=e.disableStackTrace)?a:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({value:e},t)),r="ignore-optionality"===t.assert,a=n._cast(e,t);if(!1!==t.assert&&!n.isType(a)){if(r&&kf(a))return a;let o=nf(e),l=nf(a);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${o} \n`+(l!==o?`result of cast: ${l}`:""))}return a}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((t,n)=>n.call(this,t,e,this),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,r){let{path:a,originalValue:o=e,strict:l=this.spec.strict}=t,i=e;l||(i=this._cast(i,Object.assign({assert:!1},t)));let s=[];for(let u of Object.values(this.internalTests))u&&s.push(u);this.runTests({path:a,value:i,originalValue:o,options:t,tests:s},n,e=>{if(e.length)return r(e,i);this.runTests({path:a,value:i,originalValue:o,options:t,tests:this.tests},n,r)})}runTests(e,t,n){let r=!1,{tests:a,value:o,originalValue:l,path:i,options:s}=e,u=e=>{r||(r=!0,t(e,o))},c=e=>{r||(r=!0,n(e,o))},d=a.length,f=[];if(!d)return c([]);let p={value:o,originalValue:l,path:i,options:s,schema:this};for(let h=0;h<a.length;h++){(0,a[h])(p,u,function(e){e&&(Array.isArray(e)?f.push(...e):f.push(e)),--d<=0&&c(f)})}}asNestedTest({key:e,index:t,parent:n,parentPath:r,originalParent:a,options:o}){const l=null!=e?e:t;if(null==l)throw TypeError("Must include `key` or `index` for nested validations");const i="number"==typeof l;let s=n[l];const u=Object.assign({},o,{strict:!0,parent:n,value:s,originalValue:a[l],key:void 0,[i?"index":"key"]:l,path:i||l.includes(".")?`${r||""}[${i?l:`"${l}"`}]`:(r?`${r}.`:"")+e});return(e,t,n)=>this.resolve(u)._validate(s,u,t,n)}validate(e,t){var n;let r=this.resolve(Object.assign({},t,{value:e})),a=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return new Promise((n,o)=>r._validate(e,t,(e,t)=>{cf.isError(e)&&(e.value=t),o(e)},(e,t)=>{e.length?o(new cf(e,t,void 0,void 0,a)):n(t)}))}validateSync(e,t){var n;let r,a=this.resolve(Object.assign({},t,{value:e})),o=null!=(n=null==t?void 0:t.disableStackTrace)?n:a.spec.disableStackTrace;return a._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw cf.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new cf(t,e,void 0,void 0,o);r=n}),r}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(cf.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(n){if(cf.isError(n))return!1;throw n}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):Of(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=Sf({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=Sf({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=df.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=df.notNull){return this.nullability(!1,e)}required(e=df.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=df.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=Sf(t),a=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(a)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0}),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=rf(e).map(e=>new wf(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new vf(r,t):vf.fromOptions(r,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=Sf({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=df.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=Sf({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=df.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=Sf({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:r,optional:a,nullable:o}=t.spec;return{meta:r,label:n,optional:a,nullable:o,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.filter((e,t,n)=>n.findIndex(t=>t.OPTIONS.name===e.OPTIONS.name)===t).map(t=>{const n=t.OPTIONS.params&&e?Ef(Object.assign({},t.OPTIONS.params),e):t.OPTIONS.params;return{name:t.OPTIONS.name,params:n}})}}get"~standard"(){const e=this;return{version:1,vendor:"yup",validate(t){return c(this,null,function*(){try{return{value:yield e.validate(t,{abortEarly:!1})}}catch(n){if(n instanceof cf)return{issues:Nf(n)};throw n}})}}}}Ff.prototype.__isYupSchema__=!0;for(const hy of["validate","validateSync"])Ff.prototype[`${hy}At`]=function(e,t,n={}){const{parent:r,parentPath:a,schema:o}=jf(this,e,t,n.context);return o[hy](r&&r[a],Object.assign({},n,{parent:r,path:e}))};for(const hy of["equals","is"])Ff.prototype[hy]=Ff.prototype.oneOf;for(const hy of["not","nope"])Ff.prototype[hy]=Ff.prototype.notOneOf;const Pf=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function zf(e){var t,n;const r=Pf.exec(e);return r?{year:Lf(r[1]),month:Lf(r[2],1)-1,day:Lf(r[3],1),hour:Lf(r[4]),minute:Lf(r[5]),second:Lf(r[6]),millisecond:r[7]?Lf(r[7].substring(0,3)):0,precision:null!=(t=null==(n=r[7])?void 0:n.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Lf(r[10]),minuteOffset:Lf(r[11])}:null}function Lf(e,t=0){return Number(e)||t}let Mf=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Af=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Df=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,If=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),Rf=e=>kf(e)||e===e.trim(),$f={}.toString();function Uf(){return new Vf}class Vf extends Ff{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation(()=>{this.transform((e,t,n)=>{if(!n.spec.coerce||n.isType(e))return e;if(Array.isArray(e))return e;const r=null!=e&&e.toString?e.toString():e;return r===$f?e:r})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||df.required,name:"required",skipAbsent:!0,test:e=>!!e.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e))}length(e,t=ff.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=ff.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=ff.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,r,a=!1;return t&&("object"==typeof t?({excludeEmptyString:a=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||ff.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&a||-1!==t.search(e)})}email(e=ff.email){return this.matches(Mf,{name:"email",message:e,excludeEmptyString:!0})}url(e=ff.url){return this.matches(Af,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=ff.uuid){return this.matches(Df,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:n}=e):r=e),this.matches(If,{name:"datetime",message:r||ff.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||ff.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=zf(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:r||ff.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=zf(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=ff.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:Rf})}lowercase(e=ff.lowercase){return this.transform(e=>kf(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>kf(e)||e===e.toLowerCase()})}uppercase(e=ff.uppercase){return this.transform(e=>kf(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>kf(e)||e===e.toUpperCase()})}}Uf.prototype=Vf.prototype;function Bf(){return new Wf}class Wf extends Ff{constructor(){super({type:"number",check:e=>(e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!(e=>e!=+e)(e))}),this.withMutation(()=>{this.transform((e,t,n)=>{if(!n.spec.coerce)return e;let r=e;if("string"==typeof r){if(r=r.replace(/\s/g,""),""===r)return NaN;r=+r}return n.isType(r)||null===r?r:parseFloat(r)})})}min(e,t=pf.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t>=this.resolve(e)}})}max(e,t=pf.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t<=this.resolve(e)}})}lessThan(e,t=pf.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(t){return t<this.resolve(e)}})}moreThan(e,t=pf.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(t){return t>this.resolve(e)}})}positive(e=pf.positive){return this.moreThan(0,e)}negative(e=pf.negative){return this.lessThan(0,e)}integer(e=pf.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(e=>kf(e)?e:0|e)}round(e){var t;let n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(t=>kf(t)?t:Math[e](t))}}Bf.prototype=Wf.prototype;let Hf=new Date("");class Qf extends Ff{constructor(){super({type:"date",check(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}}),this.withMutation(()=>{this.transform((e,t,n)=>!n.spec.coerce||n.isType(e)||null===e?e:(e=function(e){const t=zf(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?Qf.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(wf.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=hf.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=hf.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function qf(e,t){let n=1/0;return e.some((e,r)=>{var a;if(null!=(a=t.path)&&a.includes(e))return n=r,!0}),n}function Gf(e){return(t,n)=>qf(e,t)-qf(e,n)}Qf.INVALID_DATE=Hf;const Zf=(e,t,n)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(a){}return n.isType(r)?r:e};function Kf(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Kf(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=Kf(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(Kf)}):"optional"in e?e.optional():e}let Yf=e=>"[object Object]"===Object.prototype.toString.call(e);function Jf(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const Xf=Gf([]);function ep(e){return new tp(e)}class tp extends Ff{constructor(e){super({type:"object",check:e=>Yf(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=Xf,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let a=this.fields,o=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(r).filter(e=>!this._nodes.includes(e))),i={},s=Object.assign({},t,{parent:i,__validating:t.__validating||!1}),u=!1;for(const c of l){let e=a[c],n=c in r;if(e){let n,a=r[c];s.path=(t.path?`${t.path}.`:"")+c,e=e.resolve({value:a,context:t.context,parent:i});let o=e instanceof Ff?e.spec:void 0,l=null==o?void 0:o.strict;if(null!=o&&o.strip){u=u||c in r;continue}n=t.__validating&&l?r[c]:e.cast(r[c],s),void 0!==n&&(i[c]=n)}else n&&!o&&(i[c]=r[c]);n===c in i&&i[c]===r[c]||(u=!0)}return u?i:r}_validate(e,t={},n,r){let{from:a=[],originalValue:o=e,recursive:l=this.spec.recursive}=t;t.from=[{schema:this,value:o},...a],t.__validating=!0,t.originalValue=o,super._validate(e,t,n,(e,a)=>{if(!l||!Yf(a))return void r(e,a);o=o||a;let i=[];for(let n of this._nodes){let e=this.fields[n];e&&!wf.isRef(e)&&i.push(e.asNestedTest({options:t,key:n,parent:a,parentPath:t.path,originalParent:o}))}this.runTests({tests:i,value:a,originalValue:o,options:t},n,t=>{r(t.sort(this._sortErrors).concat(e),a)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[r,a]of Object.entries(this.fields)){const e=n[r];n[r]=void 0===e?a:e}return t.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(n=>{var r;const a=this.fields[n];let o=e;null!=(r=o)&&r.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[n]})),t[n]=a&&"getDefault"in a?a.getDefault(o):void 0}),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],r=new Set,a=new Set(t.map(([e,t])=>`${e}-${t}`));function o(e,t){let o=Ad.split(e)[0];r.add(o),a.has(`${t}-${o}`)||n.push([t,o])}for(const l of Object.keys(e)){let t=e[l];r.add(l),wf.isRef(t)&&t.isSibling?o(t.path,l):bf(t)&&"deps"in t&&t.deps.forEach(e=>o(e,l))}return Zd.array(Array.from(r),n).reverse()}(e,t),n._sortErrors=Gf(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation(n=>{let r=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),r)})}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return Kf(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter(([t,n])=>e.includes(t)&&e.includes(n)))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let r=Ad.getter(e,!0);return this.transform(a=>{if(!a)return a;let o=a;return((e,t)=>{const n=[...Ad.normalizePath(t)];if(1===n.length)return n[0]in e;let r=n.pop(),a=Ad.getter(Ad.join(n),!0)(e);return!(!a||!(r in a))})(a,e)&&(o=Object.assign({},a),n||delete o[e],o[t]=r(a)),o})}json(){return this.transform(Zf)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||mf.exact,test(e){if(null==e)return!0;const t=Jf(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=mf.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=Jf(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=mf.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const n={};for(const r of Object.keys(t))n[e(r)]=t[r];return n})}camelCase(){return this.transformKeys(Hd)}snakeCase(){return this.transformKeys(Qd)}constantCase(){return this.transformKeys(e=>Qd(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[a,o]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[a]})),n.fields[a]=o.describe(t)}return n}}ep.prototype=tp.prototype;const np=e=>{const t={".html":"text/html",".css":"text/css",".js":"application/javascript",".json":"application/json",".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png",".gif":"image/gif",".svg":"image/svg+xml",".webp":"image/webp",".bmp":"image/bmp",".tif":"image/tiff",".tiff":"image/tiff",".ico":"image/vnd.microsoft.icon",".avif":"image/avif",".heif":"image/heif",".heic":"image/heic",".mp4":"video/mp4",".mp3":"audio/mpeg",".wav":"audio/wav",".pdf":"application/pdf",".txt":"text/plain",".xml":"application/xml",".zip":"application/zip",".tar":"application/x-tar",".gz":"application/gzip"},n=function(e){try{const t=new URL(e).pathname,n=t.lastIndexOf(".");return-1===n||n===t.length-1?"":t.slice(n).toLowerCase()}catch(t){return console.error("Invalid URL:",t),""}}(e);return n?{mimetype:t[n]}:{mimetype:""}};const rp=(e,t)=>!e||e.startsWith("http://")||e.startsWith("https://")?e:e.includes("localhost")||e.includes("localagent")?`http://${e}:${(e=>{var t,n;const r="7002";return(null==(t=null==window?void 0:window.location)?void 0:t.host).includes("localhost")?e||r:e||(null==(n=null==window?void 0:window.location)?void 0:n.port)||r})(t)}`:`https://${e}`;function ap(e){return Ed({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(e)}function op(e){return Ed({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"},child:[]}]})(e)}const lp=e=>{var t=e,{accept:n,onValueChange:r,value:a}=t,o=u(t,["accept","onValueChange","value"]);const[l,d]=K.useState({url:"",isLoaded:!1,isError:!1}),{attachmentFile:f,fileInputRef:p,isDragging:h,handlers:m,clearAttachment:g}=(({onFileSelect:e,maxSize:t=5242880,acceptedTypes:n=["image/*"]}={})=>{const[r,a]=K.useState(null),[o,l]=K.useState(!1),i=K.useRef(0),s=K.useRef(null),u=r=>!(r.size>t||!n.some(e=>{const[t,n]=e.split("/");return"*"===n?r.type.startsWith(t):r.type===e})||(a(r),null==e||e(r),0));return{attachmentFile:r,fileInputRef:s,isDragging:o,handlers:{handleDragEnter:e=>{e.preventDefault(),e.stopPropagation(),i.current+=1,1===i.current&&l(!0)},handleDragLeave:e=>{e.preventDefault(),e.stopPropagation(),i.current-=1,0===i.current&&l(!1)},handleDragOver:e=>{e.preventDefault(),e.stopPropagation()},handleDrop:e=>{e.preventDefault(),e.stopPropagation(),i.current=0,l(!1);const t=e.dataTransfer.files[0];t&&u(t)},handleFileChange:e=>{var t;const n=null==(t=e.target.files)?void 0:t[0];n&&u(n)},handlePaste:e=>{var t;const n=null==(t=e.clipboardData)?void 0:t.items;if(n)for(const r of n)if(r.type.startsWith("image/")){const t=r.getAsFile();if(t){u(t),e.preventDefault();break}}},handleFileSelect:u},clearAttachment:()=>{a(null),s.current&&(s.current.value="")}}})({onFileSelect:e=>c(this,null,function*(){try{const t=new FileReader,n=new Promise(e=>{t.onloadend=()=>{const n=t.result;r(n),e(!0)}});t.readAsDataURL(e),yield n}catch(t){console.error("Error processing file:",t)}}),acceptedTypes:[n||""]});return K.useEffect(()=>{const e=setTimeout(()=>{const e=/^(https?:\/\/[^\s/$.?#].[^\s]*\.(?:jpg|jpeg|png|gif|bmp|webp|svg|tiff|tif|ico|heic|heif|avif)(?:\?[^\s]*)?|data:image\/[a-zA-Z]+;base64,[^\s]+)$/.test(a);d({url:e?a:"",isLoaded:!1,isError:!1})},500);return()=>{clearTimeout(e)}},[a]),oe.jsxs("div",{className:`rounded-lg p-[9.5px] flex gap-2 transition-all duration-300 text-gray-900 border border-solid border-gray-300 border-b-gray-500 focus-within:border-b-2 focus-within:border-b-blue-500 ${h?"border-2 border-dashed border-[#288a68]":""} ${f?"items-end":"items-center"}`,onDragEnter:m.handleDragEnter,onDragOver:m.handleDragOver,onDragLeave:m.handleDragLeave,onDrop:m.handleDrop,children:[oe.jsxs("div",{className:"flex flex-col items-start gap-4 w-full",children:[f&&oe.jsxs("div",{className:"relative group w-max",children:["image/*"===n?oe.jsx("img",{src:URL.createObjectURL(f),alt:"attachment preview",className:"w-16 h-16 rounded-lg relative group border border-solid border-gray-200 object-cover"}):"audio/*"===n||"video/*"===n?oe.jsx("div",{className:"p-1 rounded-lg relative group border border-solid border-gray-200 flex items-center justify-center",children:oe.jsx("span",{className:"text-gray-500",children:f.name})}):"/*"===n?oe.jsxs("div",{className:"p-2 rounded-lg relative group border border-solid border-gray-200 flex items-center justify-center gap-2 bg-gray-50 hover:bg-gray-100 transition-colors",children:[oe.jsx("i",{className:"fas fa-file text-gray-500","aria-hidden":"true"}),oe.jsx("span",{className:"text-gray-600 font-medium text-sm truncate max-w-[150px]",children:f.name}),oe.jsxs("span",{className:"text-xs text-gray-400 ml-1",children:["(",Math.round(f.size/1024)," KB)"]})]}):null,oe.jsxs("button",{type:"button",onClick:()=>{g(),r("")},className:"shadow-sm opacity-0 group-hover:opacity-100 transition-opacity absolute -right-1 -top-1 border border-solid border-gray-200 rounded-full w-4 h-4 bg-gray-100 flex items-center justify-center group-hover:bg-white",children:[oe.jsx("span",{className:"sr-only",children:"Remove attachment"}),oe.jsx("i",{className:"fas fa-times text-xs"})]})]}),!f&&l.url&&oe.jsx("img",{src:l.url,alt:"attachment preview",onLoad:()=>d(s(i({},l),{isLoaded:!0})),onError:()=>d(s(i({},l),{isError:!0})),className:`w-16 h-16 rounded-lg relative group border border-solid border-gray-200 object-cover ${l.isLoaded?"opacity-100":"opacity-50 animate-pulse bg-gray-200"} ${l.isError?"hidden":""}`}),!f&&oe.jsx("input",{className:"flex-1 outline-none w-full bg-transparent text-gray-900 text-sm font-normal placeholder:text-sm placeholder:font-normal focus:outline-none focus:ring-0",value:a,onChange:e=>{r(e.currentTarget.value)},onPaste:m.handlePaste,name:null==o?void 0:o.name,id:null==o?void 0:o.id,onBlur:null==o?void 0:o.onBlur,onFocus:null==o?void 0:o.onFocus})]}),oe.jsx("input",{type:"file",ref:p,className:"hidden",accept:n,onChange:m.handleFileChange}),(()=>oe.jsx("div",{className:"flex items-center gap-2",children:oe.jsx("button",{type:"button",onClick:()=>{var e;return null==(e=p.current)?void 0:e.click()},className:"text-gray-500 hover:text-gray-700 transition-colors",children:oe.jsx(op,{fontSize:18})})}))()]})};function ip(e,t){const n=t.split(".");let r=e;for(const a of n){if("boolean"==typeof r||"string"==typeof r)return r;if(null==r||"object"!=typeof r)return;r=r[a]}return r}function sp(e,t){let n=function(e){const t=e,{theme:n,clearTheme:r,applyTheme:a}=t;return u(t,["theme","clearTheme","applyTheme"])}(e);return t&&(n=i(i({},t),e)),n}const up={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};function cp(e,t){return t}function dp(e,t){return e.filter(e=>void 0!==e)}var fp,pp;function hp(e){return"object"!=typeof e||null===e?0:Array.isArray(e)?2:function(e){if(!bp.includes(Object.prototype.toString.call(e)))return!1;const{constructor:t}=e;if(void 0===t)return!0;const n=t.prototype;if(null===n||"object"!=typeof n||!bp.includes(Object.prototype.toString.call(n)))return!1;if(!n.hasOwnProperty("isPrototypeOf"))return!1;return!0}(e)?1:e instanceof Set?3:e instanceof Map?4:5}function mp(e,t){return"object"==typeof e&&Object.prototype.propertyIsEnumerable.call(e,t)}function gp(e){var t;let n=0,r=null==(t=e[0])?void 0:t[Symbol.iterator]();return{[Symbol.iterator]:()=>({next(){for(var t;;){if(void 0===r)return{done:!0,value:void 0};const a=r.next();if(!0!==a.done)return{done:!1,value:a.value};n+=1,r=null==(t=e[n])?void 0:t[Symbol.iterator]()}}})}}(pp=fp||(fp={}))[pp.NOT=0]="NOT",pp[pp.RECORD=1]="RECORD",pp[pp.ARRAY=2]="ARRAY",pp[pp.SET=3]="SET",pp[pp.MAP=4]="MAP",pp[pp.OTHER=5]="OTHER";const bp=["[object Object]","[object Module]"];const vp={mergeRecords:function(e,t,n){const r={};for(const a of function(e){const t=new Set;for(const n of e)for(const e of[...Object.keys(n),...Object.getOwnPropertySymbols(n)])t.add(e);return t}(e)){const o=[];for(const t of e)mp(t,a)&&o.push(t[a]);if(0===o.length)continue;const l=t.metaDataUpdater(n,{key:a,parents:e}),i=xp(o,t,l);i!==up.skip&&("__proto__"===a?Object.defineProperty(r,a,{value:i,configurable:!0,enumerable:!0,writable:!0}):r[a]=i)}return r},mergeArrays:function(e){return e.flat()},mergeSets:function(e){return new Set(gp(e))},mergeMaps:function(e){return new Map(gp(e))},mergeOthers:function(e){return e.at(-1)}};function yp(e,t){const n=function(e,t){var n,r,a;return{defaultMergeFunctions:vp,mergeFunctions:i(i({},vp),Object.fromEntries(Object.entries(e).filter(([e,t])=>Object.hasOwn(vp,e)).map(([e,t])=>!1===t?[e,vp.mergeOthers]:[e,t]))),metaDataUpdater:null!=(n=e.metaDataUpdater)?n:cp,deepmerge:t,useImplicitDefaultMerging:null!=(r=e.enableImplicitDefaultMerging)&&r,filterValues:!1===e.filterValues?void 0:null!=(a=e.filterValues)?a:dp,actions:up}}(e,r);function r(...e){return xp(e,n,t)}return r}function xp(e,t,n){var r,a;const o=null!=(a=null==(r=t.filterValues)?void 0:r.call(t,e,n))?a:e;if(0===o.length)return;if(1===o.length)return wp(o,t,n);const l=hp(o[0]);if(0!==l&&5!==l)for(let i=1;i<o.length;i++)if(hp(o[i])!==l)return wp(o,t,n);switch(l){case 1:return function(e,t,n){const r=t.mergeFunctions.mergeRecords(e,t,n);if(r===up.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords)return t.defaultMergeFunctions.mergeRecords(e,t,n);return r}(o,t,n);case 2:return function(e,t,n){const r=t.mergeFunctions.mergeArrays(e,t,n);if(r===up.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays)return t.defaultMergeFunctions.mergeArrays(e);return r}(o,t,n);case 3:return function(e,t,n){const r=t.mergeFunctions.mergeSets(e,t,n);if(r===up.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets)return t.defaultMergeFunctions.mergeSets(e);return r}(o,t,n);case 4:return function(e,t,n){const r=t.mergeFunctions.mergeMaps(e,t,n);if(r===up.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps)return t.defaultMergeFunctions.mergeMaps(e);return r}(o,t,n);default:return wp(o,t,n)}}function wp(e,t,n){const r=t.mergeFunctions.mergeOthers(e,t,n);return r===up.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):r}function kp(e){var t,n,r;if(Array.isArray(e)){for(n=Array(t=e.length);t--;)n[t]=(r=e[t])&&"object"==typeof r?kp(r):r;return n}if("[object Object]"===Object.prototype.toString.call(e)){for(t in n={},e)"__proto__"===t?Object.defineProperty(n,t,{value:kp(e[t]),configurable:!0,enumerable:!0,writable:!0}):n[t]=(r=e[t])&&"object"==typeof r?kp(r):r;return n}return e}const Sp=void 0,Ep=void 0,_p=void 0;function jp(){return Ep}function Cp(){return _p}function Op(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e))return e.length===t.length&&e.every((e,n)=>Op(e,t[n]));if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Object.prototype.hasOwnProperty.call(t,n)&&Op(e[n],t[n]))}return e!=e&&t!=t}const Tp=(e,t)=>{var n;if(0===e.length)return t.classGroupId;const r=e[0],a=t.nextPart.get(r),o=a?Tp(e.slice(1),a):void 0;if(o)return o;if(0===t.validators.length)return;const l=e.join("-");return null==(n=t.validators.find(({validator:e})=>e(l)))?void 0:n.classGroupId},Np=/^\[(.+)\]$/,Fp=e=>{if(Np.test(e)){const t=Np.exec(e)[1],n=null==t?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Pp=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const a in n)zp(n[a],r,a,t);return r},zp=(e,t,n,r)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:Lp(t,e)).classGroupId=n)}if("function"==typeof e)return Mp(e)?void zp(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach(([e,a])=>{zp(a,Lp(t,e),n,r)})})},Lp=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},Mp=e=>e.isThemeGetter,Ap=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(a(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):a(e,t)}}},Dp=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,a=0,o=0;for(let s=0;s<e.length;s++){let l=e[s];if(0===r&&0===a){if(":"===l){t.push(e.slice(o,s)),o=s+1;continue}if("/"===l){n=s;continue}}"["===l?r++:"]"===l?r--:"("===l?a++:")"===l&&a--}const l=0===t.length?e:e.substring(o),i=Ip(l);return{modifiers:t,hasImportantModifier:i!==l,baseClassName:i,maybePostfixModifierPosition:n&&n>o?n-o:void 0}};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},Ip=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,Rp=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const n=[];let r=[];return e.forEach(e=>{"["===e[0]||t[e]?(n.push(...r.sort(),e),r=[]):r.push(e)}),n.push(...r.sort()),n}},$p=e=>i({cache:Ap(e.cacheSize),parseClassName:Dp(e),sortModifiers:Rp(e)},(e=>{const t=Pp(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),Tp(n,t)||Fp(e)},getConflictingClassGroupIds:(e,t)=>{const a=n[e]||[];return t&&r[e]?[...a,...r[e]]:a}}})(e)),Up=/\s+/;function Vp(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Bp(e))&&(r&&(r+=" "),r+=t);return r}const Bp=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Bp(e[r]))&&(n&&(n+=" "),n+=t);return n};function Wp(e,...t){let n,r,a,o=function(i){const s=t.reduce((e,t)=>t(e),e());return n=$p(s),r=n.cache.get,a=n.cache.set,o=l,l(i)};function l(e){const t=r(e);if(t)return t;const o=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:o}=t,l=[],i=e.trim().split(Up);let s="";for(let u=i.length-1;u>=0;u-=1){const e=i[u],{isExternal:t,modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(e);if(t){s=e+(s.length>0?" "+s:s);continue}let h=!!p,m=r(h?f.substring(0,p):f);if(!m){if(!h){s=e+(s.length>0?" "+s:s);continue}if(m=r(f),!m){s=e+(s.length>0?" "+s:s);continue}h=!1}const g=o(c).join(":"),b=d?g+"!":g,v=b+m;if(l.includes(v))continue;l.push(v);const y=a(m,h);for(let n=0;n<y.length;++n){const e=y[n];l.push(b+e)}s=e+(s.length>0?" "+s:s)}return s})(e,n);return a(e,o),o}return function(){return o(Vp.apply(null,arguments))}}const Hp=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},Qp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Gp=/^\d+\/\d+$/,Zp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Yp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Jp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,eh=e=>Gp.test(e),th=e=>Boolean(e)&&!Number.isNaN(Number(e)),nh=e=>Boolean(e)&&Number.isInteger(Number(e)),rh=e=>e.endsWith("%")&&th(e.slice(0,-1)),ah=e=>Zp.test(e),oh=()=>!0,lh=e=>Kp.test(e)&&!Yp.test(e),ih=()=>!1,sh=e=>Jp.test(e),uh=e=>Xp.test(e),ch=e=>!fh(e)&&!vh(e),dh=e=>_h(e,Fh,ih),fh=e=>Qp.test(e),ph=e=>_h(e,Ph,lh),hh=e=>_h(e,zh,th),mh=e=>_h(e,Ch,ih),gh=e=>_h(e,Th,uh),bh=e=>_h(e,ih,sh),vh=e=>qp.test(e),yh=e=>jh(e,Ph),xh=e=>jh(e,Lh),wh=e=>jh(e,Ch),kh=e=>jh(e,Fh),Sh=e=>jh(e,Th),Eh=e=>jh(e,Mh,!0),_h=(e,t,n)=>{const r=Qp.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},jh=(e,t,n=!1)=>{const r=qp.exec(e);return!!r&&(r[1]?t(r[1]):n)},Ch=e=>"position"===e,Oh=new Set(["image","url"]),Th=e=>Oh.has(e),Nh=new Set(["length","size","percentage"]),Fh=e=>Nh.has(e),Ph=e=>"length"===e,zh=e=>"number"===e,Lh=e=>"family-name"===e,Mh=e=>"shadow"===e,Ah=()=>{const e=Hp("color"),t=Hp("font"),n=Hp("text"),r=Hp("font-weight"),a=Hp("tracking"),o=Hp("leading"),l=Hp("breakpoint"),i=Hp("container"),s=Hp("spacing"),u=Hp("radius"),c=Hp("shadow"),d=Hp("inset-shadow"),f=Hp("drop-shadow"),p=Hp("blur"),h=Hp("perspective"),m=Hp("aspect"),g=Hp("ease"),b=Hp("animate"),v=()=>[eh,"px","full","auto",vh,fh,s],y=()=>[nh,"none","subgrid",vh,fh],x=()=>["auto",{span:["full",nh,vh,fh]},vh,fh],w=()=>[nh,"auto",vh,fh],k=()=>["auto","min","max","fr",vh,fh],S=()=>[vh,fh,s],E=()=>[vh,fh,s],_=()=>["px",...E()],j=()=>["px","auto",...E()],C=()=>[eh,"auto","px","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",vh,fh,s],O=()=>[e,vh,fh],T=()=>[rh,ph],N=()=>["","none","full",u,vh,fh],F=()=>["",th,yh,ph],P=()=>["","none",p,vh,fh],z=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",vh,fh],L=()=>["none",th,vh,fh],M=()=>["none",th,vh,fh],A=()=>[th,vh,fh],D=()=>[eh,"full","px",vh,fh,s];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ah],breakpoint:[ah],color:[oh],container:[ah],"drop-shadow":[ah],ease:["in","out","in-out"],font:[ch],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ah],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ah],shadow:[ah],spacing:[th],text:[ah],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",eh,fh,vh,m]}],container:["container"],columns:[{columns:[th,fh,vh,i]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",fh,vh]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:v()}],"inset-x":[{"inset-x":v()}],"inset-y":[{"inset-y":v()}],start:[{start:v()}],end:[{end:v()}],top:[{top:v()}],right:[{right:v()}],bottom:[{bottom:v()}],left:[{left:v()}],visibility:["visible","invisible","collapse"],z:[{z:[nh,"auto",vh,fh]}],basis:[{basis:[eh,"full","auto",vh,fh,i,s]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[th,eh,"auto","initial","none",fh]}],grow:[{grow:["",th,vh,fh]}],shrink:[{shrink:["",th,vh,fh]}],order:[{order:[nh,"first","last","none",vh,fh]}],"grid-cols":[{"grid-cols":y()}],"col-start-end":[{col:x()}],"col-start":[{"col-start":w()}],"col-end":[{"col-end":w()}],"grid-rows":[{"grid-rows":y()}],"row-start-end":[{row:x()}],"row-start":[{"row-start":w()}],"row-end":[{"row-end":w()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","stretch","baseline"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","stretch","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:C()}],w:[{w:[i,"screen",...C()]}],"min-w":[{"min-w":[i,"screen","none",...C()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[l]},...C()]}],h:[{h:["screen",...C()]}],"min-h":[{"min-h":["screen","none",...C()]}],"max-h":[{"max-h":["screen",...C()]}],"font-size":[{text:["base",n,yh,ph]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,vh,hh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rh,fh]}],"font-family":[{font:[xh,fh,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,vh,fh]}],"line-clamp":[{"line-clamp":[th,"none",vh,hh]}],leading:[{leading:[vh,fh,o,s]}],"list-image":[{"list-image":["none",vh,fh]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",vh,fh]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[th,"from-font","auto",vh,ph]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[th,"auto",vh,fh]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:["px",...E()]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",vh,fh]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",vh,fh]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",wh,mh]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",kh,dh]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},nh,vh,fh],radial:["",vh,fh],conic:[nh,vh,fh]},Sh,gh]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[th,vh,fh]}],"outline-w":[{outline:["",th,yh,ph]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",c,Eh,bh]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",vh,fh,d]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[th,ph]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":O()}],opacity:[{opacity:[th,vh,fh]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none",vh,fh]}],blur:[{blur:P()}],brightness:[{brightness:[th,vh,fh]}],contrast:[{contrast:[th,vh,fh]}],"drop-shadow":[{"drop-shadow":["","none",f,vh,fh]}],grayscale:[{grayscale:["",th,vh,fh]}],"hue-rotate":[{"hue-rotate":[th,vh,fh]}],invert:[{invert:["",th,vh,fh]}],saturate:[{saturate:[th,vh,fh]}],sepia:[{sepia:["",th,vh,fh]}],"backdrop-filter":[{"backdrop-filter":["","none",vh,fh]}],"backdrop-blur":[{"backdrop-blur":P()}],"backdrop-brightness":[{"backdrop-brightness":[th,vh,fh]}],"backdrop-contrast":[{"backdrop-contrast":[th,vh,fh]}],"backdrop-grayscale":[{"backdrop-grayscale":["",th,vh,fh]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[th,vh,fh]}],"backdrop-invert":[{"backdrop-invert":["",th,vh,fh]}],"backdrop-opacity":[{"backdrop-opacity":[th,vh,fh]}],"backdrop-saturate":[{"backdrop-saturate":[th,vh,fh]}],"backdrop-sepia":[{"backdrop-sepia":["",th,vh,fh]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",vh,fh]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[th,"initial",vh,fh]}],ease:[{ease:["linear","initial",g,vh,fh]}],delay:[{delay:[th,vh,fh]}],animate:[{animate:["none",b,vh,fh]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,vh,fh]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:L()}],"rotate-x":[{"rotate-x":L()}],"rotate-y":[{"rotate-y":L()}],"rotate-z":[{"rotate-z":L()}],scale:[{scale:M()}],"scale-x":[{"scale-x":M()}],"scale-y":[{"scale-y":M()}],"scale-z":[{"scale-z":M()}],"scale-3d":["scale-3d"],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[vh,fh,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:D()}],"translate-x":[{"translate-x":D()}],"translate-y":[{"translate-y":D()}],"translate-z":[{"translate-z":D()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",vh,fh]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",vh,fh]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[th,yh,ph,hh]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},Dh=(e,t,n)=>{void 0!==n&&(e[t]=n)},Ih=(e,t)=>{if(t)for(const n in t)Dh(e,n,t[n])},Rh=(e,t)=>{if(t)for(const n in t)$h(e,t,n)},$h=(e,t,n)=>{const r=t[n];void 0!==r&&(e[n]=e[n]?e[n].concat(r):r)},Uh=(e,...t)=>"function"==typeof e?Wp(Ah,e,...t):Wp(()=>((e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:a={},override:o={}})=>(Dh(e,"cacheSize",t),Dh(e,"prefix",n),Dh(e,"experimentalParseClassName",r),Ih(e.theme,o.theme),Ih(e.classGroups,o.classGroups),Ih(e.conflictingClassGroups,o.conflictingClassGroups),Ih(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Dh(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),Rh(e.theme,a.theme),Rh(e.classGroups,a.classGroups),Rh(e.conflictingClassGroups,a.conflictingClassGroups),Rh(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),$h(e,a,"orderSensitiveModifiers"),e))(Ah(),e),...t),Vh=new Map;function Bh(...e){const t=jp(),n=`${t}.${Cp()}`,r=Vh.get(n);if(r)return r(...e);const a=Uh({extend:{classGroups:{"bg-image":["bg-arrow-down-icon","bg-check-icon","bg-dash-icon","bg-dot-icon"],shadow:["shadow-sm-light"]}},prefix:t});return Vh.set(n,a),a(...e)}function Wh(...e){return function(e,t){const n=K.useRef(),r=K.useRef();n.current&&Op(n.current,t)||(n.current=t,r.current=e());return r.current}(()=>function([e,...t],n,r){const a=Sp,o=jp(),l=Cp(),i=(null==t?void 0:t.length)?null==t?void 0:t.filter(e=>void 0!==e):void 0,s=(null==n?void 0:n.length)?null==n?void 0:n.filter(e=>void 0!==e):void 0,u=(null==r?void 0:r.length)?null==r?void 0:r.filter(e=>void 0!==e):void 0,c=(null==s?void 0:s.length)||!1===a||4===l||o?kp(e):e;if(null==s?void 0:s.length){const e=qh(c,!1);let t=!1;for(const n of s)n&&(t=!0),Hh(e,n);t&&function(e,t){function n(e,t){if(!0===t){if("object"!=typeof e||null===e)return"";for(const r in e)e[r]=n(e[r],t)}if("object"==typeof t&&null!==t)for(const r in t)e[r]=n(e[r],t[r]);return e}n(e,t)}(c,e)}let d=c;(null==i?void 0:i.length)&&(d=(f=Bh,yp({mergeOthers:(e,t)=>{if(e.some(e=>"string"==typeof e)){const t=e.filter(e=>"string"==typeof e),n=new Set,r=[];for(const e of t){const t=[...new Set(e.split(/\s+/))];r.push(t.filter(e=>!n.has(e)).join(" "));for(const e of t)n.add(e)}return f(r)}return t.actions.defaultMerge}}))(c,...i));var f;if((null==u?void 0:u.length)&&(null==i?void 0:i.length)){const e=qh(c,"merge");let n=!1;for(const t of u)"merge"!==t&&(n=!0),Qh(e,t);n&&function(e,t,n){function r(e,t,n){if("replace"===n){if("object"!=typeof e||null===e)return t;for(const a in e)e[a]=r(e[a],t[a],n)}if("object"==typeof n&&null!==n)for(const a in n)e[a]=r(e[a],t[a],n[a]);return e}r(e,t,n)}(d,function(...e){return yp({})(...e)}(c,...t),e)}return d}(...e),e)}function Hh(e,t){!function e(t,n){if("boolean"==typeof n){if("object"!=typeof t||null===t)return n;for(const r in t)t[r]=e(t[r],n)}if("object"==typeof n&&null!==n)for(const r in n)t[r]=e(t[r],n[r]);return t}(e,t)}function Qh(e,t){!function e(t,n){if("string"==typeof n){if("object"!=typeof t||null===t)return n;for(const r in t)t[r]=e(t[r],n)}if("object"==typeof n&&null!==n)for(const r in n)t[r]=e(t[r],n[r]);return t}(e,t)}function qh(e,t){if(null===e||"object"!=typeof e)return t;const n={};for(const r in e)n[r]=qh(e[r],t);return n}const Gh=K.createContext(void 0);function Zh(){var e;return null!=(e=K.useContext(Gh))?e:{}}const Kh={root:{base:"flex h-fit items-center gap-1 font-semibold",color:{info:"bg-cyan-100 text-cyan-800 hover:bg-cyan-200 dark:bg-cyan-200 dark:text-cyan-800 dark:hover:bg-cyan-300",gray:"bg-gray-100 text-gray-800 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600",failure:"bg-red-100 text-red-800 hover:bg-red-200 dark:bg-red-200 dark:text-red-900 dark:hover:bg-red-300",success:"bg-green-100 text-green-800 hover:bg-green-200 dark:bg-green-200 dark:text-green-900 dark:hover:bg-green-300",warning:"bg-yellow-100 text-yellow-800 hover:bg-yellow-200 dark:bg-yellow-200 dark:text-yellow-900 dark:hover:bg-yellow-300",indigo:"bg-indigo-100 text-indigo-800 hover:bg-indigo-200 dark:bg-indigo-200 dark:text-indigo-900 dark:hover:bg-indigo-300",purple:"bg-purple-100 text-purple-800 hover:bg-purple-200 dark:bg-purple-200 dark:text-purple-900 dark:hover:bg-purple-300",pink:"bg-pink-100 text-pink-800 hover:bg-pink-200 dark:bg-pink-200 dark:text-pink-900 dark:hover:bg-pink-300",blue:"bg-blue-100 text-blue-800 hover:bg-blue-200 dark:bg-blue-200 dark:text-blue-900 dark:hover:bg-blue-300",cyan:"bg-cyan-100 text-cyan-800 hover:bg-cyan-200 dark:bg-cyan-200 dark:text-cyan-900 dark:hover:bg-cyan-300",dark:"bg-gray-600 text-gray-100 hover:bg-gray-500 dark:bg-gray-900 dark:text-gray-200 dark:hover:bg-gray-700",light:"bg-gray-200 text-gray-800 hover:bg-gray-300 dark:bg-gray-400 dark:text-gray-900 dark:hover:bg-gray-500",green:"bg-green-100 text-green-800 hover:bg-green-200 dark:bg-green-200 dark:text-green-900 dark:hover:bg-green-300",lime:"bg-lime-100 text-lime-800 hover:bg-lime-200 dark:bg-lime-200 dark:text-lime-900 dark:hover:bg-lime-300",red:"bg-red-100 text-red-800 hover:bg-red-200 dark:bg-red-200 dark:text-red-900 dark:hover:bg-red-300",teal:"bg-teal-100 text-teal-800 hover:bg-teal-200 dark:bg-teal-200 dark:text-teal-900 dark:hover:bg-teal-300",yellow:"bg-yellow-100 text-yellow-800 hover:bg-yellow-200 dark:bg-yellow-200 dark:text-yellow-900 dark:hover:bg-yellow-300"},size:{xs:"p-1 text-xs",sm:"p-1.5 text-sm"}},icon:{off:"rounded px-2 py-0.5",on:"rounded-full p-1.5",size:{xs:"h-3 w-3",sm:"h-3.5 w-3.5"}}},Yh=K.forwardRef((e,t)=>{var n,r;const a=Zh(),o=Wh([Kh,null==(n=a.theme)?void 0:n.badge,e.theme],[ip(a.clearTheme,"badge"),e.clearTheme],[ip(a.applyTheme,"badge"),e.applyTheme]),l=sp(e,null==(r=a.props)?void 0:r.badge),{children:c,color:d="info",icon:f,size:p="xs",className:h}=l,m=u(l,["children","color","icon","size","className"]);return oe.jsxs("span",s(i({ref:t,className:Bh(o.root.base,o.root.color[d],o.root.size[p],o.icon[f?"on":"off"],h),"data-testid":"flowbite-badge"},m),{children:[f&&oe.jsx(f,{"aria-hidden":!0,className:o.icon.size[p],"data-testid":"flowbite-badge-icon"}),c&&oe.jsx("span",{children:c})]}))});Yh.displayName="Badge";const Jh={base:"flex",addon:"inline-flex items-center rounded-l-md border border-r-0 border-gray-300 bg-gray-200 px-3 text-sm text-gray-900 dark:border-gray-600 dark:bg-gray-600 dark:text-gray-400",field:{base:"relative w-full",icon:{base:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",svg:"h-5 w-5 text-gray-500 dark:text-gray-400"},rightIcon:{base:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",svg:"h-5 w-5 text-gray-500 dark:text-gray-400"},input:{base:"block w-full border focus:outline-none focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50",sizes:{sm:"p-2 sm:text-xs",md:"p-2.5 text-sm",lg:"p-4 sm:text-base"},colors:{gray:"border-gray-300 bg-gray-50 text-gray-900 placeholder-gray-500 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-primary-500 dark:focus:ring-primary-500",info:"border-cyan-500 bg-cyan-50 text-cyan-900 placeholder-cyan-700 focus:border-cyan-500 focus:ring-cyan-500 dark:border-cyan-400 dark:bg-cyan-100 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",failure:"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:border-red-500 focus:ring-red-500 dark:border-red-400 dark:bg-red-100 dark:focus:border-red-500 dark:focus:ring-red-500",warning:"border-yellow-500 bg-yellow-50 text-yellow-900 placeholder-yellow-700 focus:border-yellow-500 focus:ring-yellow-500 dark:border-yellow-400 dark:bg-yellow-100 dark:focus:border-yellow-500 dark:focus:ring-yellow-500",success:"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:bg-green-100 dark:focus:border-green-500 dark:focus:ring-green-500"},withRightIcon:{on:"pr-10",off:""},withIcon:{on:"pl-10",off:""},withAddon:{on:"rounded-r-lg",off:"rounded-lg"},withShadow:{on:"shadow-sm dark:shadow-sm-light",off:""}}}},Xh=K.forwardRef((e,t)=>{var n,r;const a=Zh(),o=Wh([Jh,null==(n=a.theme)?void 0:n.textInput,e.theme],[ip(a.clearTheme,"textInput"),e.clearTheme],[ip(a.applyTheme,"textInput"),e.applyTheme]),l=sp(e,null==(r=a.props)?void 0:r.textInput),{addon:c,className:d,color:f="gray",icon:p,rightIcon:h,shadow:m,sizing:g="md",type:b="text"}=l,v=u(l,["addon","className","color","icon","rightIcon","shadow","sizing","type"]);return oe.jsxs("div",{className:Bh(o.base,d),children:[c&&oe.jsx("span",{className:o.addon,children:c}),oe.jsxs("div",{className:o.field.base,children:[p&&oe.jsx("div",{className:o.field.icon.base,children:oe.jsx(p,{className:o.field.icon.svg})}),h&&oe.jsx("div",{"data-testid":"right-icon",className:o.field.rightIcon.base,children:oe.jsx(h,{className:o.field.rightIcon.svg})}),oe.jsx("input",s(i({className:Bh(o.field.input.base,o.field.input.colors[f],o.field.input.sizes[g],o.field.input.withIcon[p?"on":"off"],o.field.input.withRightIcon[h?"on":"off"],o.field.input.withAddon[c?"on":"off"],o.field.input.withShadow[m?"on":"off"]),type:b},v),{ref:t}))]})]})});Xh.displayName="TextInput";const em={base:"block w-full cursor-pointer rounded-lg border file:-ms-4 file:me-4 file:cursor-pointer file:border-none file:bg-gray-800 file:py-2.5 file:pe-4 file:ps-8 file:text-sm file:font-medium file:leading-[inherit] file:text-white hover:file:bg-gray-700 focus:outline-none focus:ring-1 dark:file:bg-gray-600 dark:hover:file:bg-gray-500",sizes:{sm:"text-xs",md:"text-sm",lg:"text-lg"},colors:{gray:"border-gray-300 bg-gray-50 text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-400 dark:placeholder-gray-400 dark:focus:border-primary-500 dark:focus:ring-primary-500",info:"border-cyan-500 bg-cyan-50 text-cyan-900 placeholder-cyan-700 focus:border-cyan-500 focus:ring-cyan-500 dark:border-cyan-400 dark:bg-cyan-100 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",failure:"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:border-red-500 focus:ring-red-500 dark:border-red-400 dark:bg-red-100 dark:focus:border-red-500 dark:focus:ring-red-500",warning:"border-yellow-500 bg-yellow-50 text-yellow-900 placeholder-yellow-700 focus:border-yellow-500 focus:ring-yellow-500 dark:border-yellow-400 dark:bg-yellow-100 dark:focus:border-yellow-500 dark:focus:ring-yellow-500",success:"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:bg-green-100 dark:focus:border-green-500 dark:focus:ring-green-500"}},tm=K.forwardRef((e,t)=>{var n,r;const a=Zh(),o=Wh([em,null==(n=a.theme)?void 0:n.fileInput,e.theme],[ip(a.clearTheme,"fileInput"),e.clearTheme],[ip(a.applyTheme,"fileInput"),e.applyTheme]),l=sp(e,null==(r=a.props)?void 0:r.fileInput),{className:s,color:c="gray",sizing:d="md"}=l,f=u(l,["className","color","sizing"]);return oe.jsx("input",i({ref:t,type:"file",className:Bh(o.base,o.colors[c],o.sizes[d],s)},f))});tm.displayName="FileInput";const nm={base:"block w-full rounded-lg border p-2.5 text-sm focus:outline-none focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50",colors:{gray:"border-gray-300 bg-gray-50 text-gray-900 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-primary-500 dark:focus:ring-primary-500",info:"border-cyan-500 bg-cyan-50 text-cyan-900 placeholder-cyan-700 focus:border-cyan-500 focus:ring-cyan-500 dark:border-cyan-400 dark:bg-cyan-100 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",failure:"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:border-red-500 focus:ring-red-500 dark:border-red-400 dark:bg-red-100 dark:focus:border-red-500 dark:focus:ring-red-500",warning:"border-yellow-500 bg-yellow-50 text-yellow-900 placeholder-yellow-700 focus:border-yellow-500 focus:ring-yellow-500 dark:border-yellow-400 dark:bg-yellow-100 dark:focus:border-yellow-500 dark:focus:ring-yellow-500",success:"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:bg-green-100 dark:focus:border-green-500 dark:focus:ring-green-500"},withShadow:{on:"shadow-sm dark:shadow-sm-light",off:""}},rm=K.forwardRef((e,t)=>{var n,r;const a=Zh(),o=Wh([nm,null==(n=a.theme)?void 0:n.textarea,e.theme],[ip(a.clearTheme,"textarea"),e.clearTheme],[ip(a.applyTheme,"textarea"),e.applyTheme]),l=sp(e,null==(r=a.props)?void 0:r.textarea),{className:s,color:c="gray",shadow:d}=l,f=u(l,["className","color","shadow"]);return oe.jsx("textarea",i({ref:t,className:Bh(o.base,o.colors[c],o.withShadow[d?"on":"off"],s)},f))});rm.displayName="Textarea";const am=e=>{var t=e,{input:n,error:r,onFileChange:a,fileOps:o={inputVersion:"v1"},inputSize:l,addTypeBadge:s}=t,c=u(t,["input","error","onFileChange","fileOps","inputSize","addTypeBadge"]);let d=null;const f=o.onChange||a,p=e=>{switch(e){case"Image":return"image/*";case"Audio":return"audio/*";case"Video":return"video/*";case"Binary":return"/*";default:return}};switch(n.type){case"String":case"Text":const e=c,{type:t,accept:r,alt:a,capture:l,onChange:s}=e,h=u(e,["type","accept","alt","capture","onChange"]),m={value:h.value,disabled:h.disabled,placeholder:h.placeholder,className:h.className+" max-h-[150px] w-full bg-white border-b text-gray-900 rounded block outline-none focus:outline-none focus:ring-0 focus:ring-offset-0 focus:ring-shadow-none text-sm font-normal placeholder:text-sm placeholder:font-normal px-[10px] border-gray-300 focus:border-b-2 focus:border-b-blue-500 focus-visible:border-b-2 focus-visible:border-b-blue-500 resize-none",style:h.style,onChange:e=>{s&&s(e)}};d=oe.jsx("textarea",i({name:n.name,rows:1,ref:e=>{e&&(e.style.height="auto",e.style.height=`${e.scrollHeight+3}px`)},onInput:e=>{const t=e.target;t.style.height="auto",t.style.height=`${t.scrollHeight+3}px`}},m));break;case"Number":d=oe.jsx("input",i({name:n.name,type:"number",className:"h-9 w-full bg-white border text-gray-900 rounded block outline-none focus:outline-none focus:ring-0 focus:ring-offset-0 focus:ring-shadow-none text-sm font-normal placeholder:text-sm placeholder:font-normal px-[10px] border-gray-300 border-b-gray-500 focus:border-b-2 focus:border-b-blue-500 focus-visible:border-b-2 focus-visible:border-b-blue-500"},c));break;case"Binary":case"Image":case"Audio":case"Video":d="v1"===o.inputVersion?oe.jsx(tm,{accept:p(n.type),onChange:e=>{f&&f(e)}}):oe.jsx(lp,i({accept:p(n.type),onValueChange:e=>{f&&f(e)}},c));break;default:d=oe.jsx("input",i({name:n.name,type:"text",className:"h-9 w-full bg-white border text-gray-900 rounded block outline-none focus:outline-none focus:ring-0 focus:ring-offset-0 focus:ring-shadow-none text-sm font-normal placeholder:text-sm placeholder:font-normal px-[10px] border-gray-300 border-b-gray-500 focus:border-b-2 focus:border-b-blue-500 focus-visible:border-b-2 focus-visible:border-b-blue-500"},c))}return oe.jsxs("div",{children:[oe.jsxs("label",{className:"text-gray-700 mb-1 text-sm flex items-center",htmlFor:n.name,children:[oe.jsxs("span",{className:"text-[#1E1E1E] text-base font-medium",children:[n.name," ",n.optional?"":oe.jsx("span",{className:"text-red-500",children:"*"})]}),s&&oe.jsx(Yh,{color:"gray",className:"ml-2 w-fit",children:n.type})]}),d,r&&oe.jsx("p",{className:"text-red-500 text-sm",children:r})]},n.name)},om=K.createContext(void 0),lm=({children:e,mode:t})=>{const n=K.useRef(null),[r,a]=K.useState(!0),[o,l]=K.useState(null),[i,s]=K.useState([]),[u,d]=K.useState("form"),[f,p]=K.useState(null),[h,m]=K.useState(null),[g,b]=K.useState([]),[v,y]=K.useState({isLoading:!1,isSuccess:!1,isError:!1,error:null,data:null}),[x,w]=K.useState({domain:"",isLoading:!1,isSuccess:!1,isError:!1,error:null,data:null}),[k,S]=K.useState([]);K.useEffect(()=>{var e,t;if(null==(e=x.data)?void 0:e.components){const e=(t=x.data.components,Object.values(t).filter(e=>{var t;return e.inputs&&e.inputs.length>0&&(null==(t=e.data)?void 0:t.endpoint)}).map(e=>{var t,n,r;return{skillId:e.id,inputsTypes:e.inputs||[],autoFillDataJson:{},details:{name:e.title||e.name||"Unnamed Skill",description:(null==(t=e.data)?void 0:t.description)||e.description||"",endpoint:(null==(n=e.data)?void 0:n.endpoint)||"",method:(null==(r=e.data)?void 0:r.method)||"POST"}}}));S(e)}else S([])},[x.data]),K.useEffect(()=>{var e,n,r,a,o,l;function i(e){b([...e])}return b([...(null==(r=null==(n=null==(e=t.props.defaultSkill)?void 0:e.details)?void 0:n.skillErrors)?void 0:r.errors)||[]]),null==(l=null==(o=null==(a=t.props.defaultSkill)?void 0:a.details)?void 0:o.skillErrors)||l.on("changed",i),()=>{var e,n,r;null==(r=null==(n=null==(e=t.props.defaultSkill)?void 0:e.details)?void 0:n.skillErrors)||r.off("changed",i)}},[t]);const E=K.useCallback(e=>c(this,null,function*(){w({domain:e,isLoading:!0,isSuccess:!1,isError:!1,error:null,data:null});try{let t,n;if(t=yield fetch(`${rp(e)||""}/form-preview/params`,{method:"GET",headers:{"Content-Type":"application/json"}}),!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const r=yield t.json();if(!r)throw new Error("Failed to fetch agent data");return n=r,w({domain:e,isLoading:!1,isSuccess:!0,isError:!1,error:null,data:n}),n}catch(t){const n=t instanceof Error?t:new Error(String(t));throw w({domain:e,isLoading:!1,isSuccess:!1,isError:!0,error:n,data:null}),n}}),[w]),_=K.useCallback(e=>c(this,null,function*(){var t,r;y({isLoading:!0,isSuccess:!1,isError:!1,error:null,data:null}),null==(t=n.current)||t.abort(),n.current=new AbortController;try{const t=yield fetch(`${rp(x.domain)||""}/form-preview/call-skill`,{method:"POST",body:JSON.stringify({payload:e,componentId:null==o?void 0:o.skillId,version:"dev"}),signal:null==(r=n.current)?void 0:r.signal,headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const a=yield t.json();return m(a),y({isLoading:!1,isSuccess:!0,isError:!1,error:null,data:a}),a}catch(a){const e=a instanceof Error?a:new Error(String(a));throw"AbortError"!==e.name&&y({isLoading:!1,isSuccess:!1,isError:!0,error:e,data:null}),e}}),[x.domain,null==o?void 0:o.skillId,y,m,n]),j={selectedSkill:o,setSelectedSkill:l,requests:i,setRequests:s,mode:t,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),callSkill:_,callSkillState:v,resetCallSkill:()=>{y({isLoading:!1,isSuccess:!1,isError:!1,error:null,data:null})},view:u,setView:d,lastFormValues:f,setLastFormValues:p,abortController:n,lastResponse:h,agentSkillErrors:g,agentData:x,fetchAgentData:E,availableSkills:k,isWidget:r,setIsWidget:a};return oe.jsx(om.Provider,{value:j,children:e})},im=()=>{const e=K.useContext(om);if(void 0===e)throw new Error("useEndpointFormPreview must be used within a EndpointFormPreviewProvider");return e};function sm({type:e="button",label:t,handleClick:n,onMouseDown:r,className:a,disabled:o,loading:l,fullWidth:u,children:c,dataAttributes:d,onMouseEnter:f,onMouseLeave:p,btnRef:h}){return oe.jsx("button",s(i({disabled:o,onClick:l?void 0:n,onMouseDown:r,className:`flex items-center justify-center text-sm font-normal border border-solid text-base px-4 py-2 text-center rounded-md transition-all duration-200 outline-none focus:outline-none focus:ring-0 focus:ring-offset-0 focus:ring-shadow-none ${(()=>{const e=["bg-smythos-blue-500 text-white border-transparent hover:bg-smyth-blue"];return u&&e.push("w-full justify-center"),a&&e.push(a),e.join(" ")})()}`,ref:h,type:e},d),{onMouseEnter:f,onMouseLeave:p,children:oe.jsx(oe.Fragment,{children:oe.jsxs("div",{className:"inline-flex items-center justify-center w-full",children:[l&&oe.jsx("div",{id:"loader",className:"mr-2 circular-loader-blue"}),t||c]})})}))}var um=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===cm}(e)}(e)};var cm="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function dm(e,t){return!1!==t.clone&&t.isMergeableObject(e)?pm((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function fm(e,t,n){return e.concat(t).map(function(e){return dm(e,n)})}function pm(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||fm,n.isMergeableObject=n.isMergeableObject||um;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(t){r[t]=dm(e[t],n)}),Object.keys(t).forEach(function(a){n.isMergeableObject(t[a])&&e[a]?r[a]=pm(e[a],t[a],n):r[a]=dm(t[a],n)}),r}(e,t,n):dm(t,n)}pm.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return pm(e,n,t)},{})};var hm=pm,mm="object"==typeof global&&global&&global.Object===Object&&global,gm="object"==typeof self&&self&&self.Object===Object&&self,bm=mm||gm||Function("return this")(),vm=bm.Symbol,ym=Object.prototype,xm=ym.hasOwnProperty,wm=ym.toString,km=vm?vm.toStringTag:void 0;var Sm=Object.prototype.toString;var Em=vm?vm.toStringTag:void 0;function _m(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Em&&Em in Object(e)?function(e){var t=xm.call(e,km),n=e[km];try{e[km]=void 0;var r=!0}catch(o){}var a=wm.call(e);return r&&(t?e[km]=n:delete e[km]),a}(e):function(e){return Sm.call(e)}(e)}function jm(e,t){return function(n){return e(t(n))}}var Cm=jm(Object.getPrototypeOf,Object);function Om(e){return null!=e&&"object"==typeof e}var Tm=Function.prototype,Nm=Object.prototype,Fm=Tm.toString,Pm=Nm.hasOwnProperty,zm=Fm.call(Object);function Lm(e){if(!Om(e)||"[object Object]"!=_m(e))return!1;var t=Cm(e);if(null===t)return!0;var n=Pm.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Fm.call(n)==zm}function Mm(e,t){return e===t||e!=e&&t!=t}function Am(e,t){for(var n=e.length;n--;)if(Mm(e[n][0],t))return n;return-1}var Dm=Array.prototype.splice;function Im(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Rm(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}Im.prototype.clear=function(){this.__data__=[],this.size=0},Im.prototype.delete=function(e){var t=this.__data__,n=Am(t,e);return!(n<0)&&(n==t.length-1?t.pop():Dm.call(t,n,1),--this.size,!0)},Im.prototype.get=function(e){var t=this.__data__,n=Am(t,e);return n<0?void 0:t[n][1]},Im.prototype.has=function(e){return Am(this.__data__,e)>-1},Im.prototype.set=function(e,t){var n=this.__data__,r=Am(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function $m(e){if(!Rm(e))return!1;var t=_m(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var Um,Vm=bm["__core-js_shared__"],Bm=(Um=/[^.]+$/.exec(Vm&&Vm.keys&&Vm.keys.IE_PROTO||""))?"Symbol(src)_1."+Um:"";var Wm=Function.prototype.toString;function Hm(e){if(null!=e){try{return Wm.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Qm=/^\[object .+?Constructor\]$/,qm=Function.prototype,Gm=Object.prototype,Zm=qm.toString,Km=Gm.hasOwnProperty,Ym=RegExp("^"+Zm.call(Km).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Jm(e){return!(!Rm(e)||(t=e,Bm&&Bm in t))&&($m(e)?Ym:Qm).test(Hm(e));var t}function Xm(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Jm(n)?n:void 0}var eg=Xm(bm,"Map"),tg=Xm(Object,"create");var ng=Object.prototype.hasOwnProperty;var rg=Object.prototype.hasOwnProperty;function ag(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function og(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function lg(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ag.prototype.clear=function(){this.__data__=tg?tg(null):{},this.size=0},ag.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ag.prototype.get=function(e){var t=this.__data__;if(tg){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ng.call(t,e)?t[e]:void 0},ag.prototype.has=function(e){var t=this.__data__;return tg?void 0!==t[e]:rg.call(t,e)},ag.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=tg&&void 0===t?"__lodash_hash_undefined__":t,this},lg.prototype.clear=function(){this.size=0,this.__data__={hash:new ag,map:new(eg||Im),string:new ag}},lg.prototype.delete=function(e){var t=og(this,e).delete(e);return this.size-=t?1:0,t},lg.prototype.get=function(e){return og(this,e).get(e)},lg.prototype.has=function(e){return og(this,e).has(e)},lg.prototype.set=function(e,t){var n=og(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function ig(e){var t=this.__data__=new Im(e);this.size=t.size}ig.prototype.clear=function(){this.__data__=new Im,this.size=0},ig.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ig.prototype.get=function(e){return this.__data__.get(e)},ig.prototype.has=function(e){return this.__data__.has(e)},ig.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Im){var r=n.__data__;if(!eg||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new lg(r)}return n.set(e,t),this.size=n.size,this};var sg=function(){try{var e=Xm(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();function ug(e,t,n){"__proto__"==t&&sg?sg(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var cg=Object.prototype.hasOwnProperty;function dg(e,t,n){var r=e[t];cg.call(e,t)&&Mm(r,n)&&(void 0!==n||t in e)||ug(e,t,n)}function fg(e,t,n,r){var a=!n;n||(n={});for(var o=-1,l=t.length;++o<l;){var i=t[o],s=void 0;void 0===s&&(s=e[i]),a?ug(n,i,s):dg(n,i,s)}return n}function pg(e){return Om(e)&&"[object Arguments]"==_m(e)}var hg=Object.prototype,mg=hg.hasOwnProperty,gg=hg.propertyIsEnumerable,bg=pg(function(){return arguments}())?pg:function(e){return Om(e)&&mg.call(e,"callee")&&!gg.call(e,"callee")},vg=Array.isArray;var yg="object"==typeof exports&&exports&&!exports.nodeType&&exports,xg=yg&&"object"==typeof module&&module&&!module.nodeType&&module,wg=xg&&xg.exports===yg?bm.Buffer:void 0,kg=(wg?wg.isBuffer:void 0)||function(){return!1},Sg=/^(?:0|[1-9]\d*)$/;function Eg(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Sg.test(e))&&e>-1&&e%1==0&&e<t}function _g(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var jg={};function Cg(e){return function(t){return e(t)}}jg["[object Float32Array]"]=jg["[object Float64Array]"]=jg["[object Int8Array]"]=jg["[object Int16Array]"]=jg["[object Int32Array]"]=jg["[object Uint8Array]"]=jg["[object Uint8ClampedArray]"]=jg["[object Uint16Array]"]=jg["[object Uint32Array]"]=!0,jg["[object Arguments]"]=jg["[object Array]"]=jg["[object ArrayBuffer]"]=jg["[object Boolean]"]=jg["[object DataView]"]=jg["[object Date]"]=jg["[object Error]"]=jg["[object Function]"]=jg["[object Map]"]=jg["[object Number]"]=jg["[object Object]"]=jg["[object RegExp]"]=jg["[object Set]"]=jg["[object String]"]=jg["[object WeakMap]"]=!1;var Og="object"==typeof exports&&exports&&!exports.nodeType&&exports,Tg=Og&&"object"==typeof module&&module&&!module.nodeType&&module,Ng=Tg&&Tg.exports===Og&&mm.process,Fg=function(){try{var e=Tg&&Tg.require&&Tg.require("util").types;return e||Ng&&Ng.binding&&Ng.binding("util")}catch(t){}}(),Pg=Fg&&Fg.isTypedArray,zg=Pg?Cg(Pg):function(e){return Om(e)&&_g(e.length)&&!!jg[_m(e)]},Lg=Object.prototype.hasOwnProperty;function Mg(e,t){var n=vg(e),r=!n&&bg(e),a=!n&&!r&&kg(e),o=!n&&!r&&!a&&zg(e),l=n||r||a||o,i=l?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=i.length;for(var u in e)!t&&!Lg.call(e,u)||l&&("length"==u||a&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Eg(u,s))||i.push(u);return i}var Ag=Object.prototype;function Dg(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ag)}var Ig=jm(Object.keys,Object),Rg=Object.prototype.hasOwnProperty;function $g(e){return null!=e&&_g(e.length)&&!$m(e)}function Ug(e){return $g(e)?Mg(e):function(e){if(!Dg(e))return Ig(e);var t=[];for(var n in Object(e))Rg.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var Vg=Object.prototype.hasOwnProperty;function Bg(e){if(!Rm(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Dg(e),n=[];for(var r in e)("constructor"!=r||!t&&Vg.call(e,r))&&n.push(r);return n}function Wg(e){return $g(e)?Mg(e,!0):Bg(e)}var Hg="object"==typeof exports&&exports&&!exports.nodeType&&exports,Qg=Hg&&"object"==typeof module&&module&&!module.nodeType&&module,qg=Qg&&Qg.exports===Hg?bm.Buffer:void 0,Gg=qg?qg.allocUnsafe:void 0;function Zg(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Kg(){return[]}var Yg=Object.prototype.propertyIsEnumerable,Jg=Object.getOwnPropertySymbols,Xg=Jg?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,o=[];++n<r;){var l=e[n];t(l,n,e)&&(o[a++]=l)}return o}(Jg(e),function(t){return Yg.call(e,t)}))}:Kg;function eb(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}var tb=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)eb(t,Xg(e)),e=Cm(e);return t}:Kg;function nb(e,t,n){var r=t(e);return vg(e)?r:eb(r,n(e))}function rb(e){return nb(e,Ug,Xg)}function ab(e){return nb(e,Wg,tb)}var ob=Xm(bm,"DataView"),lb=Xm(bm,"Promise"),ib=Xm(bm,"Set"),sb=Xm(bm,"WeakMap"),ub="[object Map]",cb="[object Promise]",db="[object Set]",fb="[object WeakMap]",pb="[object DataView]",hb=Hm(ob),mb=Hm(eg),gb=Hm(lb),bb=Hm(ib),vb=Hm(sb),yb=_m;(ob&&yb(new ob(new ArrayBuffer(1)))!=pb||eg&&yb(new eg)!=ub||lb&&yb(lb.resolve())!=cb||ib&&yb(new ib)!=db||sb&&yb(new sb)!=fb)&&(yb=function(e){var t=_m(e),n="[object Object]"==t?e.constructor:void 0,r=n?Hm(n):"";if(r)switch(r){case hb:return pb;case mb:return ub;case gb:return cb;case bb:return db;case vb:return fb}return t});var xb=Object.prototype.hasOwnProperty;var wb=bm.Uint8Array;function kb(e){var t=new e.constructor(e.byteLength);return new wb(t).set(new wb(e)),t}var Sb=/\w*$/;var Eb=vm?vm.prototype:void 0,_b=Eb?Eb.valueOf:void 0;function jb(e,t,n){var r,a,o,l=e.constructor;switch(t){case"[object ArrayBuffer]":return kb(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return function(e,t){var n=t?kb(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?kb(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return(o=new(a=e).constructor(a.source,Sb.exec(a))).lastIndex=a.lastIndex,o;case"[object Symbol]":return r=e,_b?Object(_b.call(r)):{}}}var Cb=Object.create,Ob=function(){function e(){}return function(t){if(!Rm(t))return{};if(Cb)return Cb(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var Tb=Fg&&Fg.isMap,Nb=Tb?Cg(Tb):function(e){return Om(e)&&"[object Map]"==yb(e)};var Fb=Fg&&Fg.isSet,Pb=Fb?Cg(Fb):function(e){return Om(e)&&"[object Set]"==yb(e)},zb="[object Arguments]",Lb="[object Function]",Mb="[object Object]",Ab={};function Db(e,t,n,r,a,o){var l,i=1&t,s=2&t,u=4&t;if(void 0!==l)return l;if(!Rm(e))return e;var c=vg(e);if(c){if(l=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&xb.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!i)return Zg(e,l)}else{var d=yb(e),f=d==Lb||"[object GeneratorFunction]"==d;if(kg(e))return function(e,t){if(t)return e.slice();var n=e.length,r=Gg?Gg(n):new e.constructor(n);return e.copy(r),r}(e,i);if(d==Mb||d==zb||f&&!a){if(l=s||f?{}:function(e){return"function"!=typeof e.constructor||Dg(e)?{}:Ob(Cm(e))}(e),!i)return s?function(e,t){return fg(e,tb(e),t)}(e,function(e,t){return e&&fg(t,Wg(t),e)}(l,e)):function(e,t){return fg(e,Xg(e),t)}(e,function(e,t){return e&&fg(t,Ug(t),e)}(l,e))}else{if(!Ab[d])return a?e:{};l=jb(e,d,i)}}o||(o=new ig);var p=o.get(e);if(p)return p;o.set(e,l),Pb(e)?e.forEach(function(r){l.add(Db(r,t,n,r,e,o))}):Nb(e)&&e.forEach(function(r,a){l.set(a,Db(r,t,n,a,e,o))});var h=c?void 0:(u?s?ab:rb:s?Wg:Ug)(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(h||e,function(r,a){h&&(r=e[a=r]),dg(l,a,Db(r,t,n,a,e,o))}),l}Ab[zb]=Ab["[object Array]"]=Ab["[object ArrayBuffer]"]=Ab["[object DataView]"]=Ab["[object Boolean]"]=Ab["[object Date]"]=Ab["[object Float32Array]"]=Ab["[object Float64Array]"]=Ab["[object Int8Array]"]=Ab["[object Int16Array]"]=Ab["[object Int32Array]"]=Ab["[object Map]"]=Ab["[object Number]"]=Ab[Mb]=Ab["[object RegExp]"]=Ab["[object Set]"]=Ab["[object String]"]=Ab["[object Symbol]"]=Ab["[object Uint8Array]"]=Ab["[object Uint8ClampedArray]"]=Ab["[object Uint16Array]"]=Ab["[object Uint32Array]"]=!0,Ab["[object Error]"]=Ab[Lb]=Ab["[object WeakMap]"]=!1;function Ib(e){return Db(e,5)}var Rb=Array.isArray,$b=Object.keys,Ub=Object.prototype.hasOwnProperty,Vb="undefined"!=typeof Element;function Bb(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var n,r,a,o=Rb(e),l=Rb(t);if(o&&l){if((r=e.length)!=t.length)return!1;for(n=r;0!==n--;)if(!Bb(e[n],t[n]))return!1;return!0}if(o!=l)return!1;var i=e instanceof Date,s=t instanceof Date;if(i!=s)return!1;if(i&&s)return e.getTime()==t.getTime();var u=e instanceof RegExp,c=t instanceof RegExp;if(u!=c)return!1;if(u&&c)return e.toString()==t.toString();var d=$b(e);if((r=d.length)!==$b(t).length)return!1;for(n=r;0!==n--;)if(!Ub.call(t,d[n]))return!1;if(Vb&&e instanceof Element&&t instanceof Element)return e===t;for(n=r;0!==n--;)if(!("_owner"===(a=d[n])&&e.$$typeof||Bb(e[a],t[a])))return!1;return!0}return e!=e&&t!=t}var Wb=function(e,t){try{return Bb(e,t)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||-2146828260===n.number)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}};const Hb=d(Wb);function Qb(e){return Db(e,4)}function qb(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}function Gb(e){return"symbol"==typeof e||Om(e)&&"[object Symbol]"==_m(e)}function Zb(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var l=e.apply(this,r);return n.cache=o.set(a,l)||o,l};return n.cache=new(Zb.Cache||lg),n}Zb.Cache=lg;var Kb,Yb,Jb,Xb=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ev=/\\(\\)?/g,tv=(Kb=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Xb,function(e,n,r,a){t.push(r?a.replace(ev,"$1"):n||e)}),t},Yb=Zb(Kb,function(e){return 500===Jb.size&&Jb.clear(),e}),Jb=Yb.cache,Yb);function nv(e){if("string"==typeof e||Gb(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var rv=vm?vm.prototype:void 0,av=rv?rv.toString:void 0;function ov(e){if("string"==typeof e)return e;if(vg(e))return qb(e,ov)+"";if(Gb(e))return av?av.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function lv(e){return vg(e)?qb(e,nv):Gb(e)?[e]:Zg(tv(function(e){return null==e?"":ov(e)}(e)))}var iv={exports:{}},sv={},uv="function"==typeof Symbol&&Symbol.for,cv=uv?Symbol.for("react.element"):60103,dv=uv?Symbol.for("react.portal"):60106,fv=uv?Symbol.for("react.fragment"):60107,pv=uv?Symbol.for("react.strict_mode"):60108,hv=uv?Symbol.for("react.profiler"):60114,mv=uv?Symbol.for("react.provider"):60109,gv=uv?Symbol.for("react.context"):60110,bv=uv?Symbol.for("react.async_mode"):60111,vv=uv?Symbol.for("react.concurrent_mode"):60111,yv=uv?Symbol.for("react.forward_ref"):60112,xv=uv?Symbol.for("react.suspense"):60113,wv=uv?Symbol.for("react.suspense_list"):60120,kv=uv?Symbol.for("react.memo"):60115,Sv=uv?Symbol.for("react.lazy"):60116,Ev=uv?Symbol.for("react.block"):60121,_v=uv?Symbol.for("react.fundamental"):60117,jv=uv?Symbol.for("react.responder"):60118,Cv=uv?Symbol.for("react.scope"):60119;function Ov(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case cv:switch(e=e.type){case bv:case vv:case fv:case hv:case pv:case xv:return e;default:switch(e=e&&e.$$typeof){case gv:case yv:case Sv:case kv:case mv:return e;default:return t}}case dv:return t}}}function Tv(e){return Ov(e)===vv}sv.AsyncMode=bv,sv.ConcurrentMode=vv,sv.ContextConsumer=gv,sv.ContextProvider=mv,sv.Element=cv,sv.ForwardRef=yv,sv.Fragment=fv,sv.Lazy=Sv,sv.Memo=kv,sv.Portal=dv,sv.Profiler=hv,sv.StrictMode=pv,sv.Suspense=xv,sv.isAsyncMode=function(e){return Tv(e)||Ov(e)===bv},sv.isConcurrentMode=Tv,sv.isContextConsumer=function(e){return Ov(e)===gv},sv.isContextProvider=function(e){return Ov(e)===mv},sv.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===cv},sv.isForwardRef=function(e){return Ov(e)===yv},sv.isFragment=function(e){return Ov(e)===fv},sv.isLazy=function(e){return Ov(e)===Sv},sv.isMemo=function(e){return Ov(e)===kv},sv.isPortal=function(e){return Ov(e)===dv},sv.isProfiler=function(e){return Ov(e)===hv},sv.isStrictMode=function(e){return Ov(e)===pv},sv.isSuspense=function(e){return Ov(e)===xv},sv.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===fv||e===vv||e===hv||e===pv||e===xv||e===wv||"object"==typeof e&&null!==e&&(e.$$typeof===Sv||e.$$typeof===kv||e.$$typeof===mv||e.$$typeof===gv||e.$$typeof===yv||e.$$typeof===_v||e.$$typeof===jv||e.$$typeof===Cv||e.$$typeof===Ev)},sv.typeOf=Ov,iv.exports=sv;var Nv=iv.exports,Fv={};function Pv(){return Pv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pv.apply(this,arguments)}function zv(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}Fv[Nv.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Fv[Nv.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var Lv=K.createContext(void 0);Lv.displayName="FormikContext";var Mv=Lv.Provider;Lv.Consumer;var Av=function(e){return"function"==typeof e},Dv=function(e){return null!==e&&"object"==typeof e},Iv=function(e){return String(Math.floor(Number(e)))===e},Rv=function(e){return"[object String]"===Object.prototype.toString.call(e)},$v=function(e){return Dv(e)&&Av(e.then)};function Uv(e,t,n,r){void 0===r&&(r=0);for(var a=lv(t);e&&r<a.length;)e=e[a[r++]];return r===a.length||e?void 0===e?n:e:n}function Vv(e,t,n){for(var r=Qb(e),a=r,o=0,l=lv(t);o<l.length-1;o++){var i=l[o],s=Uv(e,l.slice(0,o+1));if(s&&(Dv(s)||Array.isArray(s)))a=a[i]=Qb(s);else{var u=l[o+1];a=a[i]=Iv(u)&&Number(u)>=0?[]:{}}}return(0===o?e:a)[l[o]]===n?e:(void 0===n?delete a[l[o]]:a[l[o]]=n,0===o&&void 0===n&&delete r[l[o]],r)}function Bv(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var a=0,o=Object.keys(e);a<o.length;a++){var l=o[a],i=e[l];Dv(i)?n.get(i)||(n.set(i,!0),r[l]=Array.isArray(i)?[]:{},Bv(i,t,n,r[l])):r[l]=t}return r}var Wv={},Hv={};function Qv(e){var t=e.validateOnChange,n=void 0===t||t,r=e.validateOnBlur,a=void 0===r||r,o=e.validateOnMount,l=void 0!==o&&o,i=e.isInitialValid,s=e.enableReinitialize,u=void 0!==s&&s,c=e.onSubmit,d=zv(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=Pv({validateOnChange:n,validateOnBlur:a,validateOnMount:l,onSubmit:c},d),p=K.useRef(f.initialValues),h=K.useRef(f.initialErrors||Wv),m=K.useRef(f.initialTouched||Hv),g=K.useRef(f.initialStatus),b=K.useRef(!1),v=K.useRef({});K.useEffect(function(){return b.current=!0,function(){b.current=!1}},[]);var y=K.useState(0)[1],x=K.useRef({values:Ib(f.initialValues),errors:Ib(f.initialErrors)||Wv,touched:Ib(f.initialTouched)||Hv,status:Ib(f.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),w=x.current,k=K.useCallback(function(e){var t=x.current;x.current=function(e,t){switch(t.type){case"SET_VALUES":return Pv({},e,{values:t.payload});case"SET_TOUCHED":return Pv({},e,{touched:t.payload});case"SET_ERRORS":return Hb(e.errors,t.payload)?e:Pv({},e,{errors:t.payload});case"SET_STATUS":return Pv({},e,{status:t.payload});case"SET_ISSUBMITTING":return Pv({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return Pv({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return Pv({},e,{values:Vv(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Pv({},e,{touched:Vv(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Pv({},e,{errors:Vv(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return Pv({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return Pv({},e,{touched:Bv(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return Pv({},e,{isSubmitting:!1});default:return e}}(t,e),t!==x.current&&y(function(e){return e+1})},[]),S=K.useCallback(function(e,t){return new Promise(function(n,r){var a=f.validate(e,t);null==a?n(Wv):$v(a)?a.then(function(e){n(e||Wv)},function(e){r(e)}):n(a)})},[f.validate]),E=K.useCallback(function(e,t){var n=f.validationSchema,r=Av(n)?n(t):n,a=t&&r.validateAt?r.validateAt(t,e):function(e,t,n){void 0===n&&(n=!1);var r=Gv(e);return t[n?"validateSync":"validate"](r,{abortEarly:!1,context:r})}(e,r);return new Promise(function(e,t){a.then(function(){e(Wv)},function(n){"ValidationError"===n.name?e(function(e){var t={};if(e.inner){if(0===e.inner.length)return Vv(t,e.path,e.message);var n=e.inner,r=Array.isArray(n),a=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var l=o;Uv(t,l.path)||(t=Vv(t,l.path,l.message))}}return t}(n)):t(n)})})},[f.validationSchema]),_=K.useCallback(function(e,t){return new Promise(function(n){return n(v.current[e].validate(t))})},[]),j=K.useCallback(function(e){var t=Object.keys(v.current).filter(function(e){return Av(v.current[e].validate)}),n=t.length>0?t.map(function(t){return _(t,Uv(e,t))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then(function(e){return e.reduce(function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=Vv(e,t[r],n)),e},{})})},[_]),C=K.useCallback(function(e){return Promise.all([j(e),f.validationSchema?E(e):{},f.validate?S(e):{}]).then(function(e){var t=e[0],n=e[1],r=e[2];return hm.all([t,n,r],{arrayMerge:Zv})})},[f.validate,f.validationSchema,j,S,E]),O=Yv(function(e){return void 0===e&&(e=w.values),k({type:"SET_ISVALIDATING",payload:!0}),C(e).then(function(e){return b.current&&(k({type:"SET_ISVALIDATING",payload:!1}),k({type:"SET_ERRORS",payload:e})),e})});K.useEffect(function(){l&&!0===b.current&&Hb(p.current,f.initialValues)&&O(p.current)},[l,O]);var T=K.useCallback(function(e){var t=e&&e.values?e.values:p.current,n=e&&e.errors?e.errors:h.current?h.current:f.initialErrors||{},r=e&&e.touched?e.touched:m.current?m.current:f.initialTouched||{},a=e&&e.status?e.status:g.current?g.current:f.initialStatus;p.current=t,h.current=n,m.current=r,g.current=a;var o=function(){k({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:a,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(f.onReset){var l=f.onReset(w.values,G);$v(l)?l.then(o):o()}else o()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);K.useEffect(function(){!0!==b.current||Hb(p.current,f.initialValues)||u&&(p.current=f.initialValues,T(),l&&O(p.current))},[u,f.initialValues,T,l,O]),K.useEffect(function(){u&&!0===b.current&&!Hb(h.current,f.initialErrors)&&(h.current=f.initialErrors||Wv,k({type:"SET_ERRORS",payload:f.initialErrors||Wv}))},[u,f.initialErrors]),K.useEffect(function(){u&&!0===b.current&&!Hb(m.current,f.initialTouched)&&(m.current=f.initialTouched||Hv,k({type:"SET_TOUCHED",payload:f.initialTouched||Hv}))},[u,f.initialTouched]),K.useEffect(function(){u&&!0===b.current&&!Hb(g.current,f.initialStatus)&&(g.current=f.initialStatus,k({type:"SET_STATUS",payload:f.initialStatus}))},[u,f.initialStatus,f.initialTouched]);var N=Yv(function(e){if(v.current[e]&&Av(v.current[e].validate)){var t=Uv(w.values,e),n=v.current[e].validate(t);return $v(n)?(k({type:"SET_ISVALIDATING",payload:!0}),n.then(function(e){return e}).then(function(t){k({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),k({type:"SET_ISVALIDATING",payload:!1})})):(k({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return f.validationSchema?(k({type:"SET_ISVALIDATING",payload:!0}),E(w.values,e).then(function(e){return e}).then(function(t){k({type:"SET_FIELD_ERROR",payload:{field:e,value:Uv(t,e)}}),k({type:"SET_ISVALIDATING",payload:!1})})):Promise.resolve()}),F=K.useCallback(function(e,t){var n=t.validate;v.current[e]={validate:n}},[]),P=K.useCallback(function(e){delete v.current[e]},[]),z=Yv(function(e,t){return k({type:"SET_TOUCHED",payload:e}),(void 0===t?a:t)?O(w.values):Promise.resolve()}),L=K.useCallback(function(e){k({type:"SET_ERRORS",payload:e})},[]),M=Yv(function(e,t){var r=Av(e)?e(w.values):e;return k({type:"SET_VALUES",payload:r}),(void 0===t?n:t)?O(r):Promise.resolve()}),A=K.useCallback(function(e,t){k({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})},[]),D=Yv(function(e,t,r){return k({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?n:r)?O(Vv(w.values,e,t)):Promise.resolve()}),I=K.useCallback(function(e,t){var n,r=t,a=e;if(!Rv(e)){e.persist&&e.persist();var o=e.target?e.target:e.currentTarget,l=o.type,i=o.name,s=o.id,u=o.value,c=o.checked;o.outerHTML;var d=o.options,f=o.multiple;r=t||(i||s),a=/number|range/.test(l)?(n=parseFloat(u),isNaN(n)?"":n):/checkbox/.test(l)?function(e,t,n){if("boolean"==typeof e)return Boolean(t);var r=[],a=!1,o=-1;if(Array.isArray(e))r=e,a=(o=e.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);if(t&&n&&!a)return r.concat(n);if(!a)return r;return r.slice(0,o).concat(r.slice(o+1))}(Uv(w.values,r),c,u):d&&f?function(e){return Array.from(e).filter(function(e){return e.selected}).map(function(e){return e.value})}(d):u}r&&D(r,a)},[D,w.values]),R=Yv(function(e){if(Rv(e))return function(t){return I(t,e)};I(e)}),$=Yv(function(e,t,n){return void 0===t&&(t=!0),k({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?a:n)?O(w.values):Promise.resolve()}),U=K.useCallback(function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,a=n.id;n.outerHTML,$(t||(r||a),!0)},[$]),V=Yv(function(e){if(Rv(e))return function(t){return U(t,e)};U(e)}),B=K.useCallback(function(e){Av(e)?k({type:"SET_FORMIK_STATE",payload:e}):k({type:"SET_FORMIK_STATE",payload:function(){return e}})},[]),W=K.useCallback(function(e){k({type:"SET_STATUS",payload:e})},[]),H=K.useCallback(function(e){k({type:"SET_ISSUBMITTING",payload:e})},[]),Q=Yv(function(){return k({type:"SUBMIT_ATTEMPT"}),O().then(function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var n;try{if(void 0===(n=Z()))return}catch(r){throw r}return Promise.resolve(n).then(function(e){return b.current&&k({type:"SUBMIT_SUCCESS"}),e}).catch(function(e){if(b.current)throw k({type:"SUBMIT_FAILURE"}),e})}if(b.current&&(k({type:"SUBMIT_FAILURE"}),t))throw e})}),q=Yv(function(e){e&&e.preventDefault&&Av(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&Av(e.stopPropagation)&&e.stopPropagation(),Q().catch(function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)})}),G={resetForm:T,validateForm:O,validateField:N,setErrors:L,setFieldError:A,setFieldTouched:$,setFieldValue:D,setStatus:W,setSubmitting:H,setTouched:z,setValues:M,setFormikState:B,submitForm:Q},Z=Yv(function(){return c(w.values,G)}),Y=Yv(function(e){e&&e.preventDefault&&Av(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&Av(e.stopPropagation)&&e.stopPropagation(),T()}),J=K.useCallback(function(e){return{value:Uv(w.values,e),error:Uv(w.errors,e),touched:!!Uv(w.touched,e),initialValue:Uv(p.current,e),initialTouched:!!Uv(m.current,e),initialError:Uv(h.current,e)}},[w.errors,w.touched,w.values]),X=K.useCallback(function(e){return{setValue:function(t,n){return D(e,t,n)},setTouched:function(t,n){return $(e,t,n)},setError:function(t){return A(e,t)}}},[D,$,A]),ee=K.useCallback(function(e){var t=Dv(e),n=t?e.name:e,r=Uv(w.values,n),a={name:n,value:r,onChange:R,onBlur:V};if(t){var o=e.type,l=e.value,i=e.as,s=e.multiple;"checkbox"===o?void 0===l?a.checked=!!r:(a.checked=!(!Array.isArray(r)||!~r.indexOf(l)),a.value=l):"radio"===o?(a.checked=r===l,a.value=l):"select"===i&&s&&(a.value=a.value||[],a.multiple=!0)}return a},[V,R,w.values]),te=K.useMemo(function(){return!Hb(p.current,w.values)},[p.current,w.values]),ne=K.useMemo(function(){return void 0!==i?te?w.errors&&0===Object.keys(w.errors).length:!1!==i&&Av(i)?i(f):i:w.errors&&0===Object.keys(w.errors).length},[i,te,w.errors,f]);return Pv({},w,{initialValues:p.current,initialErrors:h.current,initialTouched:m.current,initialStatus:g.current,handleBlur:V,handleChange:R,handleReset:Y,handleSubmit:q,resetForm:T,setErrors:L,setFormikState:B,setFieldTouched:$,setFieldValue:D,setFieldError:A,setStatus:W,setSubmitting:H,setTouched:z,setValues:M,submitForm:Q,validateForm:O,validateField:N,isValid:ne,dirty:te,unregisterField:P,registerField:F,getFieldProps:ee,getFieldMeta:J,getFieldHelpers:X,validateOnBlur:a,validateOnChange:n,validateOnMount:l})}function qv(e){var t=Qv(e),n=e.component,r=e.children,a=e.render,o=e.innerRef;return K.useImperativeHandle(o,function(){return t}),K.createElement(Mv,{value:t},n?K.createElement(n,t):a?a(t):r?Av(r)?r(t):function(e){return 0===K.Children.count(e)}(r)?null:K.Children.only(r):null)}function Gv(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);!0===Array.isArray(e[r])?t[r]=e[r].map(function(e){return!0===Array.isArray(e)||Lm(e)?Gv(e):""!==e?e:void 0}):Lm(e[r])?t[r]=Gv(e[r]):t[r]=""!==e[r]?e[r]:void 0}return t}function Zv(e,t,n){var r=e.slice();return t.forEach(function(t,a){if(void 0===r[a]){var o=!1!==n.clone&&n.isMergeableObject(t);r[a]=o?hm(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[a]=hm(e[a],t,n):-1===e.indexOf(t)&&r.push(t)}),r}var Kv="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?K.useLayoutEffect:K.useEffect;function Yv(e){var t=K.useRef(e);return Kv(function(){t.current=e}),K.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(void 0,n)},[])}var Jv=K.forwardRef(function(e,t){var n=e.action,r=zv(e,["action"]),a=null!=n?n:"#",o=K.useContext(Lv),l=o.handleReset,i=o.handleSubmit;return K.createElement("form",Pv({onSubmit:i,ref:t,onReset:l,action:a},r))});Jv.displayName="Form";const Xv=({setIsFormVisible:e})=>{const t=K.useRef(null),{selectedSkill:n,callSkill:r,callSkillState:a,setLastFormValues:o,agentSkillErrors:l}=im(),u=(d=(null==n?void 0:n.inputsTypes)||[],ep().shape(d.reduce((e,t)=>{let n;switch(t.type){case"String":case"Text":default:n=Uf();break;case"Number":n=Bf();break;case"Binary":n=Uf().matches(/^(https?:\/\/[^\s/$.?#].[^\s]*|ftp:\/\/[^\s/$.?#].[^\s]*|data:[a-zA-Z]+\/[a-zA-Z0-9.-]+;base64,[^\s]+)$/,"Invalid URL");break;case"Image":n=Uf().matches(/^(https?:\/\/[^\s/$.?#].[^\s]*\.(?:jpg|jpeg|png|gif|bmp|webp|svg|tiff|tif|ico|heic|heif|avif)(?:\?[^\s]*)?|data:image\/[a-zA-Z]+;base64,[^\s]+)$/,"Invalid image URL");break;case"Audio":n=Uf().matches(/^(https?:\/\/[^\s/$.?#].[^\s]*\.(?:mp3|wav|flac|aac|ogg|m4a|wma|aiff|alac|opus)(?:\?[^\s"']*)?|data:audio\/[a-zA-Z0-9.-]+;base64,[^\s]+)$/,"Invalid audio URL");break;case"Video":n=Uf().matches(/^(https?:\/\/[^\s/$.?#].[^\s]*\.(?:mp4|mkv|mov|avi|wmv|flv|webm|m4v|3gp|ogg|ts|m3u8)(?:\?[^\s"']*)?|data:video\/[a-zA-Z0-9.-]+;base64,[^\s]+)$/,"Invalid video URL")}return t.optional||(n=n.required(`${t.name} is required`)),s(i({},e),{[t.name]:n})},{})));var d;K.useEffect(()=>{!a.isLoading&&l.length>0&&e(!0)},[a.isLoading,l]),K.useEffect(()=>{t.current&&t.current.focus()},[t]);const f=null==n?void 0:n.inputsTypes.reduce((e,t)=>{var r;return s(i({},e),{[t.name]:(null==(r=null==n?void 0:n.autoFillDataJson)?void 0:r[t.name])||""})},{});return oe.jsxs("div",{children:[oe.jsx(qv,{initialValues:f,validationSchema:u,onSubmit:(t,n)=>c(this,[t,n],function*(t,{}){e(!1);try{yield r(t),o(t)}catch(n){o(t)}}),enableReinitialize:!0,children:({setFieldValue:e,values:r,errors:o,handleChange:s,handleBlur:u,touched:c})=>oe.jsxs(Jv,{className:"flex flex-col justify-between mt-2 gap-4",children:[null==n?void 0:n.inputsTypes.map(t=>oe.jsx(am,i({placeholder:"value",input:t,error:o[t.name]&&c[t.name]&&(console.log(c,o)||!0)&&"string"==typeof o[t.name]&&o[t.name],value:r[t.name]||"",onChange:s,onBlur:u,onFocus:e=>{var a;r[t.name]===(null==(a=null==n?void 0:n.autoFillDataJson)?void 0:a[t.name])&&e.target.select()},fileOps:{inputVersion:"v2",onChange:n=>{e(t.name,n)}}},t),t.name)),oe.jsx("div",{className:"flex gap-3 mt-4 ",children:oe.jsx(sm,{type:"submit",className:"justify-center flex-1",disabled:a.isLoading||l.length>0,btnRef:t,label:"Run",fullWidth:!0,dataAttributes:{"data-test":"form-preview-run-button"}})})]})}),oe.jsx("div",{className:"flex flex-col gap-2 mt-4",children:l.map(e=>oe.jsx("div",{className:"text-gray-500",children:e.error_message},e.error_slug))})]})};function ey(e){return Ed({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"},child:[]}]})(e)}function ty(e){return Ed({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"},child:[]}]})(e)}function ny(e){return Ed({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"},child:[]}]})(e)}function ry(e){return Ed({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M384 336l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l140.1 0L400 115.9 400 320c0 8.8-7.2 16-16 16zM192 384l192 0c35.3 0 64-28.7 64-64l0-204.1c0-12.7-5.1-24.9-14.1-33.9L366.1 14.1c-9-9-21.2-14.1-33.9-14.1L192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-32-48 0 0 32c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l32 0 0-48-32 0z"},child:[]}]})(e)}const ay=({asset:e})=>{const[t,n]=K.useState({isContentLoaded:!1,fileType:""}),[r,a]=K.useState(!1),o=()=>{n(s(i({},t),{isContentLoaded:!0}))};let l;switch(K.useEffect(()=>{!function(e){c(this,null,function*(){try{const r=yield np(e.trim());if(!r.mimetype)return;let a=((t=r.mimetype)?t.startsWith("image/")?"image":t.startsWith("audio/")?"audio":t.startsWith("video/")?"video":t.startsWith("text/")?"text":t.startsWith("application/")?t.split("/")[1]:"other":"unknown")||"";n(e=>s(i({},e),{fileType:a}))}catch(r){console.error(r)}var t})}(e)},[e]),t.fileType){case"image":l=oe.jsx("div",{children:oe.jsx("img",{src:e,className:"max-w-full m-auto rounded-lg",onError:o,onLoad:o})});break;case"audio":l=oe.jsx("audio",{controls:!0,crossOrigin:"anonymous",src:e,className:"max-w-full m-auto",onError:o,onCanPlay:o});break;case"video":l=oe.jsxs("video",{controls:!0,className:"max-w-full m-auto",onError:o,onCanPlay:o,children:[oe.jsx("source",{src:e,type:"video/mp4"}),"Your browser does not support the video tag."]});break;case"pdf":l=oe.jsx("embed",{src:e+"#toolbar=0",type:"application/pdf",className:"w-full h-[80vh]",onError:o,onLoad:o});break;default:l=oe.jsx("div",{className:"text-center",children:oe.jsx("a",{href:e,target:"_blank",download:!0,className:"btn btn-primary fallback-file-download-link font-medium text-blue-600 dark:text-blue-500 hover:underline",children:"Download File"})})}return oe.jsxs("div",{className:"mt-5 relative",children:[!t.isContentLoaded&&oe.jsx("div",{className:"h-1 mt-1",children:oe.jsx("div",{"data-role":"progress","data-type":"line","data-small":"true","data-cls-back":"bg-gray-300",className:"file-preloader h-1"})}),oe.jsx("div",{className:`mt-4 transition-opacity duration-300 ${!t.isContentLoaded&&"opacity-0"}`,children:l}),oe.jsxs("div",{className:"mt-5 relative",children:[oe.jsx(Xh,{name:"rawContent",type:"text",defaultValue:e,readOnly:!0,className:"text-gray-800"}),oe.jsx("div",{className:"absolute right-2 flex gap-2 top-1/2 -translate-y-1/2",children:oe.jsx("span",{onClick:()=>{navigator.clipboard.writeText(e),a(!0)},onMouseLeave:()=>{a(!1)},className:"cursor-pointer rounded-lg p-2 h-full flex items-center text-sm border border-solid border-gray-200 bg-gray-50 text-gray-900",children:r?oe.jsx(ny,{}):oe.jsx(ty,{})})})]})]})},oy=()=>{var e,t;const{callSkillState:n,lastResponse:r,mode:a,agentSkillErrors:o}=im(),[l,i]=K.useState(!1),s=K.useRef(null),u=a.props.dbg_url;K.useEffect(()=>{s.current&&(s.current.style.height="auto",s.current.style.height=Math.min(s.current.scrollHeight,400)+"px")},[s]);function c(e){return"string"==typeof e?e:JSON.stringify(e,null,2)}const d=K.useMemo(()=>(null==r?void 0:r.response)?(e=>{var t,n;const r=(null==(n=null==(t=e.match(/\b(?:https?|ftp):\/\/[^\s/$.?#].[^\s]*(?:\.(?:jpg|jpeg|png|gif|bmp|webp|svg|mp3|wav|flac|aac|mp4|mkv|mov|avi|webm|ogg|m4a|m4v|m3u8|ts|wmv))(?:\?[^\s"']*)?\b|\bsmythfs:\/\/[^\s/$.?#].[^\s"']*\b/g))?void 0:t.map(e=>e.trim()))?void 0:n.map(e=>e.startsWith("smythfs://")?`${u}/file-proxy?url=${e}`:e))||[];return[...new Set(r)]})(c(null==r?void 0:r.response)):[],[r]);return oe.jsxs("div",{children:[o.length>0&&oe.jsx("div",{className:"flex flex-col gap-2 mt-4",children:o.map(e=>oe.jsx("div",{className:"text-gray-500",children:e.error_message},e.error_slug))}),oe.jsxs("div",{className:"mt-8",children:[r&&oe.jsxs("div",{children:[oe.jsx("h3",{className:"font-semibold",children:"Agent Output"}),oe.jsx("div",{className:"text-sm",children:oe.jsxs("div",{children:[d.map(e=>oe.jsx(ay,{asset:e},e)),oe.jsxs("div",{className:"mt-5 relative",children:[oe.jsx(rm,{ref:s,readOnly:!0,className:" text-gray-800 resize-none",defaultValue:c(null==r?void 0:r.response),rows:10}),oe.jsxs("div",{className:"absolute right-2 flex gap-2 top-2 [&:hover_actionicons]:opacity-100",children:[oe.jsx("span",{onClick:()=>{const e=new Blob([null==r?void 0:r.response],{type:"text/plain"}),t=URL.createObjectURL(e),n=document.createElement("a");n.href=t,n.download="output.txt",n.click()},className:"cursor-pointer rounded-lg p-2 h-full flex items-center text-sm border border-solid border-gray-200 bg-gray-50 text-gray-900 opacity-50 hover:opacity-100",children:oe.jsx(ap,{})}),oe.jsx("span",{onClick:()=>{navigator.clipboard.writeText(c(null==r?void 0:r.response)),i(!0)},onMouseLeave:()=>{i(!1)},className:"cursor-pointer rounded-lg p-2 h-full flex items-center text-sm border border-solid border-gray-200 bg-gray-50 text-gray-900 opacity-50 hover:opacity-100",children:l?oe.jsx(ey,{}):oe.jsx(ry,{})})]})]})]})})]}),n.isError&&oe.jsxs("div",{children:[oe.jsx("h3",{className:"font-semibold",children:"Error"}),oe.jsx("div",{children:"string"==typeof(null==(e=null==n?void 0:n.error)?void 0:e.error)?null==(t=null==n?void 0:n.error)?void 0:t.error:"We encountered an error while processing your request. Please try again later."})]})]})]})};function ly(e){return Ed({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm39.25,56.75A6,6,0,0,0,177.5,87l22.62-22.63a6,6,0,0,0-8.48-8.48L169,78.5a6,6,0,0,0,4.24,10.25ZM224,122H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z"},child:[]}]})(e)}function iy(e){return oe.jsxs("svg",{className:`mr-4 ${e.className}`,width:"24",height:"24",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[oe.jsx("g",{clipPath:"url(#clip0_15811_12327)",children:oe.jsx("g",{clipPath:"url(#clip1_15811_12327)",children:oe.jsx("path",{d:"M4.948 2.89844L16.0007 10.0037L4.948 17.109V2.89844Z",stroke:"#374151",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})}),oe.jsxs("defs",{children:[oe.jsx("clipPath",{id:"clip0_15811_12327",children:oe.jsx("rect",{width:"20",height:"20",fill:"#374151"})}),oe.jsxs("clipPath",{id:"clip1_15811_12327",children:[oe.jsx("rect",{width:"20",height:"20",fill:"#374151"}),"s"]})]})]})}const sy=({showBackButton:e=!0,onBackButtonClick:t})=>{const[n,r]=K.useState(!0),[a,o]=K.useState("auto"),l=K.useRef(null),{selectedSkill:i,callSkillState:s,resetCallSkill:u,view:c,setView:d,abortController:f,isWidget:p}=im();return K.useEffect(()=>{o(n?"auto":0)},[n,null==i?void 0:i.inputsTypes]),K.useEffect(()=>{(s.isSuccess||s.isError)&&d("view_response")},[s.isSuccess,s.isError]),oe.jsxs("div",{children:[e&&oe.jsxs("button",{onClick:t,className:"mb-4 cursor-pointer flex items-center gap-2",children:[oe.jsx(jd,{className:"w-4 h-4 text-smythos-blue-500"})," Skills List"]}),oe.jsxs("div",{className:`${s.isLoading&&"hidden"}`,children:[oe.jsxs("button",{onClick:()=>{"view_response"===c&&r(!n)},className:`flex items-center justify-between w-full ${"view_response"!==c&&"cursor-default pointer-events-none"}`,children:[oe.jsx("h3",{className:"font-semibold",children:"Inputs and Files"}),"view_response"===c&&oe.jsx("svg",{className:"w-4 h-4 transition-transform duration-200 "+(n?"rotate-180":""),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:oe.jsx("path",{d:"M19 9l-7 7-7-7"})})]}),oe.jsx("div",{ref:l,className:"transition-all duration-200 overflow-hidden",style:{height:"number"==typeof a?`${a}px`:a},children:(null==i?void 0:i.inputsTypes)&&oe.jsx(Xv,{setIsFormVisible:r})})]}),oe.jsx("div",{className:"mt-4",children:i&&s.isLoading&&oe.jsxs("button",{className:`\n bg-slate-100 px-4 py-3 rounded-lg flex items-center justify-between w-full ${p?"flex-col":"flex-row"}\n `,children:[oe.jsxs("div",{className:"flex items-center",children:[oe.jsx(iy,{className:""+(p?"w-16":"")}),oe.jsxs("div",{className:"flex flex-col text-left",children:[oe.jsx("h4",{className:"font-bold text-[#3E3E3E] text-sm",children:i.details.name}),oe.jsx("p",{className:"text-gray-500 text-xs",children:i.details.description})]})]}),oe.jsx("div",{className:"flex flex-col "+(p?"mt-4":""),children:oe.jsxs("div",{className:" p-2 rounded-md flex items-center gap-2",children:[oe.jsx("span",{className:"text-gray-500",children:"Processing..."}),oe.jsx(ly,{className:"animate-spin",size:18})]})})]},i.skillId)}),s.isLoading&&oe.jsx("button",{onClick:()=>{var e;null==(e=f.current)||e.abort(),u(),d("form"),r(!0)},className:"bg-transparent font-bold border border-gray-300 text-gray-500 px-4 py-3 rounded-md w-full mt-8",children:"Stop Testing"}),"view_response"===c&&oe.jsx(oy,{})]})},uy=({classes:e,size:t="md"})=>oe.jsxs(oe.Fragment,{children:[oe.jsxs("svg",{"aria-hidden":"true",className:"inline text-gray-200 animate-spin dark:text-gray-600 fill-v2-blue "+(e?" "+e:" "+{sm:"w-4 h-4 mr-2",md:"w-8 h-8 mr-2",lg:"w-12 h-12 mr-2"}[t]),viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[oe.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),oe.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),oe.jsx("span",{className:"sr-only",children:"Loading..."})]}),cy=()=>{const e=im(),{availableSkills:t,mode:n}=e,[r,a]=K.useState(null),[o,l]=K.useState(!1),[i,s]=K.useState(!0),u=K.useCallback(n=>{l(!0);try{const r=t.find(e=>e.skillId===n);if(!r)throw new Error("Skill not found in available skills");e.setSelectedSkill({skillId:r.skillId,inputsTypes:r.inputsTypes,formData:{},details:r.details,autoFillDataJson:r.autoFillDataJson}),l(!1)}catch(r){l(!1),console.error("Failed to set selected skill:",r)}},[t,e]),c=K.useCallback(e=>{var r;try{const o=t.find(t=>t.skillId===e)||null;a(o);const l=document.getElementById(e);if(!l)return;null==(r=n.props.workspace)||r.scrollToComponent(l)}catch(o){console.error("Failed to scroll to skill:",o)}},[t,n.props.workspace]),d=K.useCallback(()=>{},[]);return K.useEffect(()=>{a((null==t?void 0:t[0])||null),1===t.length&&!e.selectedSkill&&i&&(u(t[0].skillId),s(!1))},[t,e.selectedSkill,i]),K.useEffect(()=>{var e;return null==(e=n.props.workspace)||e.addEventListener("AgentSaved",d),()=>{var e;null==(e=n.props.workspace)||e.removeEventListener("AgentSaved",d)}},[n]),K.useEffect(()=>{var n,r;if(1===t.length&&!e.selectedSkill){const n=t[0];e.setSelectedSkill({skillId:n.skillId,inputsTypes:n.inputsTypes,formData:{},details:n.details,autoFillDataJson:n.autoFillDataJson})}const a=document.getElementById("embodiment-sidebar-title");a&&e.selectedSkill&&(a.textContent=(null==(r=null==(n=e.selectedSkill)?void 0:n.details)?void 0:r.name)||"Agent Skills")},[t,e.selectedSkill]),oe.jsx("div",{className:"endpoint-form-preview-sidebar",children:o?oe.jsx("div",{className:"flex justify-center items-center h-full",children:oe.jsx(uy,{})}):e.selectedSkill&&t.length>0?oe.jsx(sy,{showBackButton:t.length>1,onBackButtonClick:()=>e.setSelectedSkill(null)}):0===t.length?oe.jsx("div",{className:"text-gray-600 py-4",children:oe.jsxs("p",{children:[oe.jsx("b",{children:"No testable skills available."}),oe.jsx("br",{}),"Please add skills to your agent and configure inputs to test."]})}):oe.jsxs("div",{children:[oe.jsx("p",{className:"pb-2",children:"Select one of your agent's skills from the list, then click Test."}),oe.jsxs("div",{className:"flex gap-2",children:[oe.jsx("select",{className:"h-9 w-full bg-white border text-gray-900 rounded block outline-none focus:outline-none focus:ring-0 focus:ring-offset-0 focus:ring-shadow-none text-sm font-normal placeholder:text-sm placeholder:font-normal px-[10px] border-gray-300 border-b-gray-500 focus:border-b-2 focus:border-b-blue-500 focus-visible:border-b-2 focus-visible:border-b-blue-500 appearance-none cursor-pointer",value:null==r?void 0:r.skillId,onChange:e=>c(e.target.value),children:t.map(e=>oe.jsx("option",{value:e.skillId,className:"py-2",children:e.details.name},e.skillId))}),oe.jsx(sm,{handleClick:()=>u((null==r?void 0:r.skillId)||""),disabled:!r,children:"Test"})]})]})})};function dy(e){const{domain:t,widget:n=!0}=e,[r,a]=K.useState(!1),{agentData:o,fetchAgentData:l,availableSkills:i,setIsWidget:s,selectedSkill:u}=im(),c=K.useRef(null);K.useEffect(()=>{!t||o.isLoading||o.isSuccess||o.isError||l(t).catch(e=>{console.error("Failed to fetch agent data:",e)})},[t,l]),K.useEffect(()=>{s(n)},[n]),K.useEffect(()=>{r&&u&&c.current&&c.current.scrollTo({top:0,behavior:"smooth"})},[r,u]);const d=()=>{if(!t)return oe.jsx("div",{className:"flex items-center justify-center h-full",children:oe.jsxs("div",{className:"text-center",children:[oe.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error"}),oe.jsx("p",{className:"text-gray-600",children:"Domain is required"})]})});if(o.isLoading)return oe.jsx("div",{className:"flex items-center justify-center h-full",children:oe.jsxs("div",{className:"text-center",children:[oe.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-b-2 border-blue-500 mx-auto mb-3"}),oe.jsx("p",{className:"text-gray-600 text-sm",children:"Preparing form preview..."})]})});if(o.isError)return oe.jsx("div",{className:"flex items-center justify-center h-full",children:oe.jsxs("div",{className:"text-center",children:[oe.jsx("h1",{className:"text-lg font-bold text-red-600 mb-2",children:"Error"}),oe.jsx("p",{className:"text-gray-600 text-sm",children:o.error instanceof Error?o.error.message:"Failed to load agent data"})]})});if(!o.data)return oe.jsx("div",{className:"flex items-center justify-center h-full",children:oe.jsxs("div",{className:"text-center",children:[oe.jsx("h1",{className:"text-lg font-bold text-red-600 mb-2",children:"Not Found"}),oe.jsx("p",{className:"text-gray-600 text-sm",children:"Agent not found"})]})});const e=oe.jsxs(oe.Fragment,{children:[oe.jsx("h2",{id:"embodiment-sidebar-title",className:"font-semibold text-gray-900 mb-6 "+(n?"text-base":"text-xl"),children:"Agent Skills"}),0===i.length?oe.jsxs("div",{className:"text-center py-12",children:[oe.jsx("div",{className:"mb-4 w-12 h-12 text-v2-gray-dark text-center mx-auto",children:oe.jsxs("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[oe.jsx("g",{clipPath:"url(#clip0_15811_12327)",children:oe.jsx("g",{clipPath:"url(#clip1_15811_12327)",children:oe.jsx("path",{d:"M4.948 2.89844L16.0007 10.0037L4.948 17.109V2.89844Z",stroke:"#374151",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})}),oe.jsxs("defs",{children:[oe.jsx("clipPath",{id:"clip0_15811_12327",children:oe.jsx("rect",{width:"20",height:"20",fill:"#374151"})}),oe.jsxs("clipPath",{id:"clip1_15811_12327",children:[oe.jsx("rect",{width:"20",height:"20",fill:"#374151"}),"s"]})]})]})}),oe.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Testable Skills"}),oe.jsx("p",{className:"text-gray-600",children:"This agent doesn't have any skills with configured inputs that can be tested."})]}):oe.jsx(cy,{})]});return n?e:oe.jsxs(oe.Fragment,{children:[oe.jsxs("div",{className:"mb-8",children:[oe.jsxs("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:["Form Preview: ",o.data.name||"Unnamed Agent"]}),o.data.description&&oe.jsx("p",{className:"text-gray-600",children:o.data.description})]}),oe.jsx("div",{className:"bg-white rounded-lg shadow-sm border",children:oe.jsx("div",{className:"p-6",children:e})})]})};return n?oe.jsxs(oe.Fragment,{children:[oe.jsxs("div",{className:"fixed bottom-6 right-6 z-50 w-[380px] h-[560px] rounded-2xl shadow-xl border bg-white overflow-hidden flex flex-col transform transition-all duration-300 ease-out origin-bottom-right "+(r?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-95 translate-y-4 pointer-events-none"),children:[oe.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b",children:[oe.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-white font-semibold",children:oe.jsx(hd,{})}),oe.jsx("button",{type:"button",onClick:()=>a(!1),className:"ml-auto p-1 rounded hover:bg-gray-100","aria-label":"Minimize",children:oe.jsx("svg",{className:"w-5 h-5 text-gray-500",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:oe.jsx("path",{d:"M5 12h14"})})})]}),oe.jsx("div",{className:"flex-1 overflow-auto p-4",ref:c,children:oe.jsx("div",{children:d()})})]}),oe.jsx("button",{type:"button",onClick:()=>a(!0),className:"fixed bottom-6 right-6 z-50 w-14 h-14 rounded-full bg-emerald-100 shadow-xl text-white flex items-center justify-center transform transition-all duration-300 ease-out "+(r?"opacity-0 scale-75 translate-y-4 pointer-events-none":"opacity-100 scale-100 translate-y-0"),"aria-label":"Open widget",children:oe.jsx(hd,{})})]}):oe.jsx("div",{className:"min-h-screen bg-gray-50",children:oe.jsx("div",{className:"container mx-auto px-4 py-8",children:d()})})}function fy(e){const{domain:t}=e,n={name:"embed",props:{agentId:"",domain:t,dbg_url:"",defaultSkill:{skillId:"",inputsTypes:[],autoFillDataJson:{},details:{name:"",description:"",endpoint:"",method:"POST"}},getAvailableSkills:()=>[]}};return oe.jsx(lm,{mode:n,children:oe.jsx(dy,i({},e))})}const py="form-preview-container";window.FormPreview={init:e=>{if(!document.getElementById(py)){const e=document.createElement("div");e.id=py,document.body.appendChild(e)}(e=>{const t=document.getElementById(py);if(!t)throw new Error("Root element not found");le.createRoot(t).render(oe.jsx(fy,i({},e)))})(e)}}});diff --git a/packages/runtime/tests/README.md b/packages/runtime/tests/README.mdnew file mode 100644index 00000000..eb1bd19e--- /dev/null+++ b/packages/runtime/tests/README.md@@ -0,0 +1,97 @@+# SmythOS Runtime Server - Test Suite++Simple, focused tests following KISS principle and OSS best practices.++## Test Structure++```+tests/+├── setup.ts # Simple test utilities+├── mocks/+│ └── sre.mock.ts # Basic SRE library mocks+├── core/+│ ├── utils/ # Utility function tests+│ └── middlewares/ # Middleware tests+├── services/ # Service tests+└── integration/ # API integration tests (using supertest)+```++## Running Tests++```bash+# Run all tests+pnpm test++# Watch mode+pnpm test:watch+```++## Writing Tests - KISS Approach++### Keep It Simple++```typescript+describe('MyFunction', () => {+ it('handles valid input', () => {+ const result = myFunction('input');+ expect(result).toBe('output');+ });++ it('handles edge cases', () => {+ expect(myFunction('')).toBe(null);+ expect(myFunction(null)).toBe(null);+ });+});+```++### Mock Only What You Need++```typescript+vi.mock('@smythos/sre', () => ({+ Logger: vi.fn(() => ({ error: vi.fn() })),+}));+```++### Test One Thing at a Time++- Each test should verify one behavior+- Use descriptive test names+- Follow Arrange-Act-Assert pattern++## Testing Philosophy++- Focus on critical paths and business logic+- Quality over quantity+- Test behavior, not implementation details++## Best Practices++1. **Simple is better than complex**+2. **Test behavior, not implementation**+3. **Mock external dependencies only**+4. **Use realistic test data**+5. **Keep tests fast and independent**++## Common Patterns++```typescript+// Simple service test+it('processes valid requests', async () => {+ const result = await service.process(validInput);+ expect(result.status).toBe('success');+});++// API integration test with supertest+it('returns health status', async () => {+ await request(app).get('/health').expect(200).expect({ status: 'ok' });+});+```++## When Tests Fail++1. Read the error message carefully+2. Check your mocks are set up correctly+3. Verify async operations are awaited+4. Ensure test isolation (no shared state)++Keep tests simple, focused, and valuable.diff --git a/packages/runtime/tests/core/middlewares/error.mw.test.ts b/packages/runtime/tests/core/middlewares/error.mw.test.tsnew file mode 100644index 00000000..fde0f81b--- /dev/null+++ b/packages/runtime/tests/core/middlewares/error.mw.test.ts@@ -0,0 +1,91 @@+/**+ * Error middleware tests - KISS approach+ */+import { describe, it, expect, vi, beforeEach } from 'vitest';+import { createMockRequest, createMockResponse, createMockNext } from '../../setup';++vi.mock('@smythos/sre', () => ({+ Logger: vi.fn(() => ({ error: vi.fn() })),+}));++vi.mock('@core/config', () => ({+ default: { env: { NODE_ENV: 'test' } },+}));++describe('Error Middleware', () => {+ let errorHandler: any;+ let notFoundHandler: any;++ beforeEach(async () => {+ vi.resetModules();+ const module = await import('@core/middlewares/error.mw');+ errorHandler = module.errorHandler;+ notFoundHandler = module.notFoundHandler;+ });++ describe('errorHandler', () => {+ it('handles operational errors', () => {+ const mockReq = createMockRequest({+ method: 'GET',+ path: '/api/test',+ ip: '127.0.0.1',+ get: vi.fn(() => 'test-user-agent'),+ });+ const mockRes = createMockResponse();+ const mockNext = createMockNext();++ const error = new Error('Test error');+ (error as any).statusCode = 400;+ (error as any).isOperational = true;++ errorHandler(error, mockReq, mockRes, mockNext);++ expect(mockRes.status).toHaveBeenCalledWith(400);+ expect(mockRes.json).toHaveBeenCalledWith({+ success: false,+ code: 400,+ message: 'Test error',+ });+ });++ it('defaults to 500 for non-operational errors', () => {+ const mockReq = createMockRequest({+ method: 'GET',+ path: '/api/test',+ ip: '127.0.0.1',+ get: vi.fn(() => 'test-user-agent'),+ });+ const mockRes = createMockResponse();+ const mockNext = createMockNext();++ const error = new Error('Programming error');++ errorHandler(error, mockReq, mockRes, mockNext);++ expect(mockRes.status).toHaveBeenCalledWith(500);+ expect(mockRes.json).toHaveBeenCalledWith({+ success: false,+ code: 500,+ message: 'Internal Server Error',+ });+ });+ });++ describe('notFoundHandler', () => {+ it('creates 404 error', () => {+ const mockReq = createMockRequest({ method: 'GET', path: '/missing' });+ const mockRes = createMockResponse();+ const mockNext = createMockNext();++ notFoundHandler(mockReq, mockRes, mockNext);++ expect(mockNext).toHaveBeenCalledWith(+ expect.objectContaining({+ message: 'Path not found: GET /missing',+ statusCode: 404,+ isOperational: true,+ }),+ );+ });+ });+});diff --git a/packages/runtime/tests/core/middlewares/rateLimiter.mw.test.ts b/packages/runtime/tests/core/middlewares/rateLimiter.mw.test.tsnew file mode 100644index 00000000..921c4c84--- /dev/null+++ b/packages/runtime/tests/core/middlewares/rateLimiter.mw.test.ts@@ -0,0 +1,131 @@+/**+ * Rate limiter tests - KISS approach+ */+import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';+import { createMockRequest, createMockResponse, createMockNext } from '../../setup';++vi.mock('@core/config', () => ({+ default: {+ env: {+ REQ_LIMIT_PER_MINUTE: 10,+ MAX_CONCURRENT_REQUESTS: 5,+ },+ },+}));++vi.mock('@smythos/sre', () => ({+ Logger: vi.fn(() => ({ log: vi.fn(), error: vi.fn() })),+}));++describe('Rate Limiter Middleware', () => {+ let RateLimiter: any;++ beforeEach(async () => {+ vi.useFakeTimers();+ vi.resetModules();++ const module = await import('@core/middlewares/rateLimiter.mw');+ RateLimiter = module.default;+ });++ afterEach(() => {+ vi.useRealTimers();+ });++ it('allows requests from localhost', () => {+ const mockReq = createMockRequest({ ip: '127.0.0.1' });+ const mockRes = createMockResponse();+ const mockNext = createMockNext();++ RateLimiter(mockReq, mockRes, mockNext);++ expect(mockNext).toHaveBeenCalled();+ expect(mockRes.status).not.toHaveBeenCalled();+ });++ it('allows requests within limit', () => {+ const mockReq = createMockRequest({ ip: '203.0.113.1' });+ const mockRes = createMockResponse();+ const mockNext = createMockNext();++ // Make 5 requests (within limit)+ for (let i = 0; i < 5; i++) {+ RateLimiter(mockReq, mockRes, mockNext);+ }++ expect(mockNext).toHaveBeenCalledTimes(5);+ expect(mockRes.status).not.toHaveBeenCalled();+ });++ it('blocks requests exceeding rate limit', () => {+ const mockReq = createMockRequest({ ip: '203.0.113.1' });+ const mockRes = createMockResponse();+ const mockNext = createMockNext();++ // Fill up the rate limit+ for (let i = 0; i < 10; i++) {+ RateLimiter(mockReq, mockRes, mockNext);+ }++ // Clear mocks for the blocking request+ mockNext.mockClear();+ mockRes.status.mockClear();++ // This should be blocked+ RateLimiter(mockReq, mockRes, mockNext);++ expect(mockNext).not.toHaveBeenCalled();+ expect(mockRes.status).toHaveBeenCalledWith(429);+ expect(mockRes.json).toHaveBeenCalledWith(+ expect.objectContaining({+ error: 'Too Many Requests',+ }),+ );+ });++ it('handles time-based rate limiting', () => {+ // This test verifies the concept without relying on internal timer implementation+ const mockReq = createMockRequest({ ip: '203.0.113.1' });+ const mockRes = createMockResponse();+ const mockNext = createMockNext();++ // Make a request - should be allowed+ RateLimiter(mockReq, mockRes, mockNext);++ expect(mockNext).toHaveBeenCalled();+ expect(mockRes.status).not.toHaveBeenCalled();+ });++ it('handles concurrent request limiting', () => {+ const mockReq = createMockRequest({+ ip: '203.0.113.1',+ connection: { remoteAddress: '203.0.113.1' },+ });+ const mockRes = createMockResponse() as any;+ mockRes.on = vi.fn();+ mockRes.removeListener = vi.fn();+ const mockNext = createMockNext();++ // Fill concurrent limit+ for (let i = 0; i < 5; i++) {+ const req = createMockRequest({ ip: '203.0.113.1' });+ const res = createMockResponse() as any;+ res.on = vi.fn();+ res.removeListener = vi.fn();+ const next = createMockNext();++ RateLimiter(req, res, next);+ }++ // This should be blocked+ RateLimiter(mockReq, mockRes, mockNext);++ expect(mockNext).not.toHaveBeenCalled();+ expect(mockRes.status).toHaveBeenCalledWith(429);+ expect(mockRes.json).toHaveBeenCalledWith(+ expect.objectContaining({+ message: 'Too many concurrent requests. Please try again later.',+ }),+ );+ });+});diff --git a/packages/runtime/tests/core/utils/chat.utils.test.ts b/packages/runtime/tests/core/utils/chat.utils.test.tsnew file mode 100644index 00000000..66afbec7--- /dev/null+++ b/packages/runtime/tests/core/utils/chat.utils.test.ts@@ -0,0 +1,189 @@+/**+ * Unit tests for chat utilities+ */+import { describe, it, expect, beforeEach, vi } from 'vitest';+import crypto from 'crypto';+import {+ buildConversationId,+ parseDateFromConvId,+ getChatPrefixByEnv,+ parseDateRange,+ isValidDateRange,+ CHAT_PREFIXES,+} from '@core/utils/chat.utils';++// Mock crypto+vi.mock('crypto', () => ({+ default: {+ randomBytes: vi.fn(() => ({+ toString: vi.fn(() => 'abcd1234'),+ })),+ },+}));++// Mock date-time utils+vi.mock('@core/utils/date-time.utils', () => ({+ getCurrentFormattedDate: vi.fn(() => '2023-12-25-15-30-45'),+ toDateFromFormattedDateStr: vi.fn((dateStr: string) => {+ const [year, month, day, hour, minute, second] = dateStr.split('-').map(Number);+ return new Date(year, month - 1, day, hour, minute, second);+ }),+}));++describe('Chat Utils', () => {+ beforeEach(() => {+ vi.clearAllMocks();+ });++ describe('CHAT_PREFIXES', () => {+ it('should have correct prefixes for test and prod environments', () => {+ expect(CHAT_PREFIXES.test).toBe('chat-test-');+ expect(CHAT_PREFIXES.prod).toBe('chat-');+ });+ });++ describe('buildConversationId', () => {+ it('should build conversation ID with prod prefix by default', () => {+ const result = buildConversationId();+ expect(result).toBe('chat-2023-12-25-15-30-45-chat-2023-12-25-15-30-45-abcd1234');+ });++ it('should build conversation ID with test prefix when isTestConv is true', () => {+ const result = buildConversationId(undefined, true);+ expect(result).toBe('chat-test-2023-12-25-15-30-45-chat-test-2023-12-25-15-30-45-abcd1234');+ });++ it('should use provided uid when given', () => {+ const customUid = 'custom-uid-123';+ const result = buildConversationId(customUid, false);+ expect(result).toBe('chat-2023-12-25-15-30-45-custom-uid-123');+ });++ it('should use test prefix with custom uid', () => {+ const customUid = 'custom-test-uid';+ const result = buildConversationId(customUid, true);+ expect(result).toBe('chat-test-2023-12-25-15-30-45-custom-test-uid');+ });++ it('should call crypto.randomBytes when no uid provided', () => {+ buildConversationId();+ expect(crypto.randomBytes).toHaveBeenCalledWith(8);+ });+ });++ describe('parseDateFromConvId', () => {+ it('should parse date from conversation ID', () => {+ const convId = 'chat-2023-12-25-15-30-45-some-suffix';+ const result = parseDateFromConvId(convId);++ expect(result).toBeInstanceOf(Date);+ expect(result?.getFullYear()).toBe(2023);+ expect(result?.getMonth()).toBe(11); // December (0-based)+ expect(result?.getDate()).toBe(25);+ });++ it('should return null for invalid conversation ID format', () => {+ expect(parseDateFromConvId('invalid-format')).toBeNull();+ expect(parseDateFromConvId('chat-invalid-date')).toBeNull();+ expect(parseDateFromConvId('')).toBeNull();+ });++ it('should parse date from test conversation ID', () => {+ const convId = 'chat-test-2024-01-01-12-00-00-test-suffix';+ const result = parseDateFromConvId(convId);++ expect(result).toBeInstanceOf(Date);+ expect(result?.getFullYear()).toBe(2024);+ expect(result?.getMonth()).toBe(0); // January (0-based)+ expect(result?.getDate()).toBe(1);+ });+ });++ describe('getChatPrefixByEnv', () => {+ it('should return correct prefix for test environment', () => {+ const result = getChatPrefixByEnv('test');+ expect(result).toBe('chat-test-');+ });++ it('should return correct prefix for prod environment', () => {+ const result = getChatPrefixByEnv('prod');+ expect(result).toBe('chat-');+ });+ });++ describe('parseDateRange', () => {+ it('should parse valid date range string', () => {+ const result = parseDateRange('1609459200000,1609545600000');+ expect(result).toEqual({+ start: 1609459200000,+ end: 1609545600000,+ });+ });++ it('should handle single comma separated values', () => {+ const result = parseDateRange('123,456');+ expect(result).toEqual({+ start: 123,+ end: 456,+ });+ });++ it('should handle invalid numbers gracefully', () => {+ const result = parseDateRange('invalid,range');+ expect(result).toEqual({+ start: NaN,+ end: NaN,+ });+ });+ });++ describe('isValidDateRange', () => {+ it('should return true for valid date ranges', () => {+ expect(isValidDateRange('100,200')).toBe(true);+ expect(isValidDateRange('1609459200000,1609545600000')).toBe(true);+ expect(isValidDateRange('0,1')).toBe(true);+ });++ it('should return false for invalid date ranges', () => {+ expect(isValidDateRange('200,100')).toBe(false); // start > end+ expect(isValidDateRange('100,100')).toBe(false); // start === end+ expect(isValidDateRange('invalid,range')).toBe(false); // NaN values+ expect(isValidDateRange('100')).toBe(false); // Missing comma+ expect(isValidDateRange('')).toBe(false); // Empty string+ expect(isValidDateRange('100,')).toBe(false); // Missing end+ expect(isValidDateRange(',200')).toBe(false); // Missing start+ });++ it('should return false for null or undefined input', () => {+ expect(isValidDateRange(null as any)).toBe(false);+ expect(isValidDateRange(undefined as any)).toBe(false);+ });++ it('should handle edge cases', () => {+ expect(isValidDateRange('0,0')).toBe(false); // Equal values+ expect(isValidDateRange('-100,-50')).toBe(true); // Negative numbers+ expect(isValidDateRange('-100,50')).toBe(true); // Negative to positive+ });+ });++ describe('integration tests', () => {+ it('should create conversation ID that can be parsed for date', () => {+ const convId = buildConversationId();+ const parsedDate = parseDateFromConvId(convId);++ expect(parsedDate).toBeInstanceOf(Date);+ expect(parsedDate?.getFullYear()).toBe(2023);+ expect(parsedDate?.getMonth()).toBe(11); // December+ expect(parsedDate?.getDate()).toBe(25);+ });++ it('should handle test environment end-to-end', () => {+ const convId = buildConversationId(undefined, true);+ const parsedDate = parseDateFromConvId(convId);+ const prefix = getChatPrefixByEnv('test');++ expect(convId.startsWith(prefix)).toBe(true);+ expect(parsedDate).toBeInstanceOf(Date);+ });+ });+});diff --git a/packages/runtime/tests/core/utils/date-time.utils.test.ts b/packages/runtime/tests/core/utils/date-time.utils.test.tsnew file mode 100644index 00000000..3723c00c--- /dev/null+++ b/packages/runtime/tests/core/utils/date-time.utils.test.ts@@ -0,0 +1,157 @@+/**+ * Unit tests for date-time utilities+ */+import { describe, it, expect, beforeEach, vi } from 'vitest';+import { getCurrentFormattedDate, toDateFromFormattedDateStr, getDayFormattedDate, delay } from '@core/utils/date-time.utils';++describe('Date-Time Utils', () => {+ beforeEach(() => {+ vi.clearAllMocks();+ });++ describe('getCurrentFormattedDate', () => {+ it('should return a formatted date string in YYYY-MM-DD-HH-MM-SS format', () => {+ const result = getCurrentFormattedDate();+ expect(result).toMatch(/^\d{4}-\d{2}-\d{2}-\d{2}-\d{2}-\d{2}$/);+ });++ it('should return current date and time', () => {+ const before = new Date();+ const result = getCurrentFormattedDate();+ const after = new Date();++ const [year, month, day] = result.split('-').map(Number);+ expect(year).toBe(before.getFullYear());+ expect(month).toBeGreaterThanOrEqual(before.getMonth() + 1);+ expect(month).toBeLessThanOrEqual(after.getMonth() + 1);+ expect(day).toBeGreaterThanOrEqual(before.getDate());+ expect(day).toBeLessThanOrEqual(after.getDate());+ });++ it('should pad single-digit values with zeros', () => {+ vi.useFakeTimers();+ vi.setSystemTime(new Date('2023-01-05 09:08:07'));++ const result = getCurrentFormattedDate();+ expect(result).toBe('2023-01-05-09-08-07');++ vi.useRealTimers();+ });+ });++ describe('toDateFromFormattedDateStr', () => {+ it('should convert formatted date string to Date object', () => {+ const formattedDate = '2023-12-25-15-30-45';+ const result = toDateFromFormattedDateStr(formattedDate);++ expect(result).toBeInstanceOf(Date);+ expect(result.getFullYear()).toBe(2023);+ expect(result.getMonth()).toBe(11); // December (0-based)+ expect(result.getDate()).toBe(25);+ expect(result.getHours()).toBe(15);+ expect(result.getMinutes()).toBe(30);+ expect(result.getSeconds()).toBe(45);+ });++ it('should handle edge case dates', () => {+ const formattedDate = '2024-02-29-23-59-59'; // Leap year+ const result = toDateFromFormattedDateStr(formattedDate);++ expect(result.getFullYear()).toBe(2024);+ expect(result.getMonth()).toBe(1); // February (0-based)+ expect(result.getDate()).toBe(29);+ expect(result.getHours()).toBe(23);+ expect(result.getMinutes()).toBe(59);+ expect(result.getSeconds()).toBe(59);+ });+ });++ describe('getDayFormattedDate', () => {+ it('should return a formatted date string in YYYY-MM-DD format', () => {+ const result = getDayFormattedDate();+ expect(result).toMatch(/^\d{4}-\d{2}-\d{2}$/);+ });++ it('should return current date only', () => {+ const now = new Date();+ const result = getDayFormattedDate();++ const [year, month, day] = result.split('-').map(Number);+ expect(year).toBe(now.getFullYear());+ expect(month).toBe(now.getMonth() + 1);+ expect(day).toBe(now.getDate());+ });++ it('should pad single-digit values with zeros', () => {+ vi.useFakeTimers();+ vi.setSystemTime(new Date('2023-01-05'));++ const result = getDayFormattedDate();+ expect(result).toBe('2023-01-05');++ vi.useRealTimers();+ });+ });++ describe('delay', () => {+ it('should resolve after the specified milliseconds', async () => {+ vi.useFakeTimers();++ const promise = delay(1000);+ expect(promise).toBeInstanceOf(Promise);++ vi.advanceTimersByTime(500);+ // Promise should still be pending+ let resolved = false;+ promise.then(() => {+ resolved = true;+ });+ await Promise.resolve(); // Allow microtasks to run+ expect(resolved).toBe(false);++ vi.advanceTimersByTime(500);+ await promise;+ expect(resolved).toBe(true);++ vi.useRealTimers();+ });++ it('should work with zero delay', async () => {+ const start = Date.now();+ await delay(0);+ const end = Date.now();++ // Should resolve almost immediately+ expect(end - start).toBeLessThan(10);+ });++ it('should work with non-integer values', async () => {+ vi.useFakeTimers();++ const promise = delay(100.5);+ vi.advanceTimersByTime(100.5);+ await promise;++ // Should not throw an error+ expect(true).toBe(true);++ vi.useRealTimers();+ });+ });++ describe('integration tests', () => {+ it('should create round-trip date conversion', () => {+ const original = getCurrentFormattedDate();+ const converted = toDateFromFormattedDateStr(original);+ const backToString = getCurrentFormattedDate();++ // The dates should be very close (within a second or two)+ const originalParts = original.split('-').map(Number);+ const backParts = backToString.split('-').map(Number);++ expect(originalParts[0]).toBe(backParts[0]); // Year+ expect(originalParts[1]).toBe(backParts[1]); // Month+ expect(originalParts[2]).toBe(backParts[2]); // Day+ });+ });+});diff --git a/packages/runtime/tests/core/utils/general.utils.test.ts b/packages/runtime/tests/core/utils/general.utils.test.tsnew file mode 100644index 00000000..04fec523--- /dev/null+++ b/packages/runtime/tests/core/utils/general.utils.test.ts@@ -0,0 +1,64 @@+/**+ * Tests for general utilities - following KISS principle+ */+import { describe, it, expect, vi } from 'vitest';+import { uid, hasKeyTemplateVar, parseTemplate, fsExists } from '@core/utils/general.utils';++vi.mock('fs/promises', () => ({+ default: { access: vi.fn() },+}));++describe('General Utils', () => {+ describe('uid', () => {+ it('generates unique strings', () => {+ const id1 = uid();+ const id2 = uid();++ expect(id1).not.toBe(id2);+ expect(id1).toMatch(/^[A-Z0-9]+$/);+ });+ });++ describe('hasKeyTemplateVar', () => {+ it('detects KEY template variables', () => {+ expect(hasKeyTemplateVar('{{KEY(test)}}')).toBe(true);+ expect(hasKeyTemplateVar('{{normal}}')).toBe(false);+ expect(hasKeyTemplateVar('')).toBe(false);+ });+ });++ describe('parseTemplate', () => {+ it('replaces template variables', () => {+ const result = parseTemplate('Hello {{name}}', { name: 'John' });+ expect(result).toBe('Hello John');+ });++ it('preserves KEY variables', () => {+ const result = parseTemplate('{{KEY(secret)}} {{name}}', { name: 'John' });+ expect(result).toBe('{{KEY(secret)}} John');+ });++ it('handles false values', () => {+ const result = parseTemplate('{{active}}', { active: false });+ expect(result).toBe('false');+ });+ });++ describe('fsExists', () => {+ it('returns true when file exists', async () => {+ const fs = await import('fs/promises');+ (fs.default.access as any).mockResolvedValue(undefined);++ const result = await fsExists('/test/path');+ expect(result).toBe(true);+ });++ it('returns false when file does not exist', async () => {+ const fs = await import('fs/promises');+ (fs.default.access as any).mockRejectedValue(new Error('ENOENT'));++ const result = await fsExists('/missing');+ expect(result).toBe(false);+ });+ });+});diff --git a/packages/runtime/tests/integration/api.test.ts b/packages/runtime/tests/integration/api.test.tsnew file mode 100644index 00000000..0dd19a1e--- /dev/null+++ b/packages/runtime/tests/integration/api.test.ts@@ -0,0 +1,68 @@+/**+ * Simple API integration tests+ */+import express from 'express';+import request from 'supertest';+import { describe, it } from 'vitest';++describe('API Integration', () => {+ const createTestApp = () => {+ const app = express();+ app.use(express.json());++ // Simple test routes+ app.get('/health', (req, res) => {+ res.json({ status: 'ok' });+ });++ app.get('/models', (req, res) => {+ res.setHeader('x-models-hash', 'test-hash');+ res.json({ 'gpt-4': { name: 'GPT-4' } });+ });++ app.get('/models/custom/:teamId', (req, res) => {+ const { teamId } = req.params;+ if (teamId === 'invalid') {+ return res.status(403).json({ error: 'Access denied' });+ }+ res.json({ 'custom-model': { name: 'Custom' } });+ });++ return app;+ };++ it('returns health status', async () => {+ const app = createTestApp();++ await request(app).get('/health').expect(200).expect({ status: 'ok' });+ });++ it('returns models with hash header', async () => {+ const app = createTestApp();++ const response = await request(app)+ .get('/models')+ .expect(200)+ .expect('x-models-hash', 'test-hash')+ .expect({ 'gpt-4': { name: 'GPT-4' } });+ });++ it('handles team access control', async () => {+ const app = createTestApp();++ // Valid team+ await request(app)+ .get('/models/custom/team123')+ .expect(200)+ .expect({ 'custom-model': { name: 'Custom' } });++ // Invalid team+ await request(app).get('/models/custom/invalid').expect(403).expect({ error: 'Access denied' });+ });++ it('handles 404 for unknown routes', async () => {+ const app = createTestApp();++ await request(app).get('/unknown').expect(404);+ });+});diff --git a/packages/runtime/tests/mocks/sre.mock.ts b/packages/runtime/tests/mocks/sre.mock.tsnew file mode 100644index 00000000..a0bde438--- /dev/null+++ b/packages/runtime/tests/mocks/sre.mock.ts@@ -0,0 +1,42 @@+import { vi } from 'vitest';+/**+ * Simple SRE library mocks+ */++// Mock SRE exports - simple and focused+vi.mock('@smythos/sre', () => ({+ Logger: vi.fn(() => ({+ info: vi.fn(),+ warn: vi.fn(),+ error: vi.fn(),+ })),++ AgentProcess: {+ load: vi.fn(() => ({+ run: vi.fn().mockResolvedValue({ data: { result: 'success' } }),+ })),+ },++ ConnectorService: {+ getCacheConnector: vi.fn(() => ({+ user: vi.fn(() => ({+ set: vi.fn().mockResolvedValue(true),+ })),+ })),+ getModelsProviderConnector: vi.fn(() => ({+ requester: vi.fn(() => ({+ getModels: vi.fn().mockResolvedValue({+ 'gpt-4': { name: 'GPT-4' },+ }),+ getCustomModels: vi.fn().mockResolvedValue({}),+ })),+ })),+ },++ AccessCandidate: {+ user: vi.fn(id => ({ type: 'user', id })),+ team: vi.fn(id => ({ type: 'team', id })),+ },++ version: '1.0.0-test',+}));diff --git a/packages/runtime/tests/services/agent.test.ts b/packages/runtime/tests/services/agent.test.tsnew file mode 100644index 00000000..a696b69a--- /dev/null+++ b/packages/runtime/tests/services/agent.test.ts@@ -0,0 +1,57 @@+/**+ * Simple agent service tests+ */+import { describe, it, expect, vi, beforeEach } from 'vitest';+import { createMockRequest, createMockAgent } from '../setup';+import '../mocks/sre.mock';++describe('Agent Services', () => {+ describe('processAgentRequest', () => {+ let processAgentRequest: any;++ beforeEach(async () => {+ vi.resetModules();+ const module = await import('@agent-runner/services/agent-request-handler');+ processAgentRequest = module.processAgentRequest;+ });++ it('returns 404 for missing agent', async () => {+ const result = await processAgentRequest(null, createMockRequest());+ expect(result).toEqual({ status: 404, data: 'Agent not found' });+ });++ it('blocks debug headers', async () => {+ const agent = createMockAgent();+ const req = createMockRequest({+ header: vi.fn(name => (name === 'X-DEBUG-RUN' ? 'true' : undefined)),+ socket: { on: vi.fn() },+ });++ const result = await processAgentRequest(agent, req);+ expect(result).toEqual({ status: 403, data: 'Debug functions are not supported' });+ });++ it('rejects invalid paths', async () => {+ const agent = createMockAgent();+ const req = createMockRequest({+ path: '/invalid',+ socket: { on: vi.fn() },+ });++ const result = await processAgentRequest(agent, req);+ expect(result.status).toBe(404);+ });++ it('processes valid requests', async () => {+ const agent = createMockAgent();+ const req = createMockRequest({+ path: '/api/test',+ socket: { on: vi.fn() },+ _agent: agent,+ });++ const result = await processAgentRequest(agent, req);+ expect(result).toEqual({ status: 200, data: { result: 'success' } });+ });+ });+});diff --git a/packages/runtime/tests/setup.ts b/packages/runtime/tests/setup.tsnew file mode 100644index 00000000..ff042622--- /dev/null+++ b/packages/runtime/tests/setup.ts@@ -0,0 +1,39 @@+import { vi } from 'vitest';+/**+ * Test setup and utilities following KISS principle+ */++// Simple test environment setup+process.env.NODE_ENV = 'test';+process.env.PORT = '5053';+process.env.SESSION_SECRET = 'test-secret';+process.env.LOGTO_M2M_APP_ID = 'test-app-id';+process.env.LOGTO_M2M_APP_SECRET = 'test-secret';+process.env.LOGTO_SERVER = 'https://test-auth.example.com';+process.env.LOGTO_API_RESOURCE = 'https://test-api.example.com';+process.env.MIDDLEWARE_API_BASE_URL = 'https://test-middleware.example.com';++// Simple mock factories+export const createMockRequest = (overrides = {}) => ({+ headers: {},+ header: vi.fn(() => undefined),+ path: '/api/test',+ hostname: 'localhost',+ socket: { on: vi.fn() },+ ...overrides,+});++export const createMockResponse = () => ({+ status: vi.fn().mockReturnThis(),+ send: vi.fn().mockReturnThis(),+ json: vi.fn().mockReturnThis(),+ setHeader: vi.fn().mockReturnThis(),+ locals: {},+});++export const createMockNext = () => vi.fn();++export const createMockAgent = (overrides = {}) => ({+ id: 'test-agent-id',+ ...overrides,+});diff --git a/packages/runtime/vitest.config.ts b/packages/runtime/vitest.config.tsindex b9aee37c..0d778522 100644--- a/packages/runtime/vitest.config.ts+++ b/packages/runtime/vitest.config.ts@@ -1,19 +1,13 @@-import { defineConfig } from "vitest/config";-import tsconfigPaths from "vite-tsconfig-paths";+import tsconfigPaths from 'vite-tsconfig-paths';+import { defineConfig } from 'vitest/config';export default defineConfig({plugins: [tsconfigPaths()],test: {globals: true,- environment: "node",- include: ["tests/**/*.test.ts"],- exclude: ["node_modules"],- coverage: {- reporter: ["text", "text-summary", "html"],- reportsDirectory: "./coverage",- include: ["src/**/*.{ts,tsx}"],- exclude: ["node_modules"],- },+ environment: 'node',+ include: ['tests/**/*.test.ts'],+ exclude: ['node_modules'],testTimeout: 30_000,},