Commit e033d7ff by Manuel Ruiz Toribio

Merge remote-tracking branch 'origin/developJC' into developmanu

parents 39bb9c8c 48bd69f0
......@@ -15,14 +15,16 @@
#--------------------------------------------------------------------
CI_ENVIRONMENT = production
CI_ENVIRONMENT = production
#--------------------------------------------------------------------
# APP
#--------------------------------------------------------------------
app.baseURL = 'https://tbw2223-12-mrtjcmh.oa.r.appspot.com'
#app.baseURL = 'https://tbw2223-12-mrtjcmh.oa.r.appspot.com'
#app.baseURL = 'https://tbw2223-12-mrtjcmh.oa.r.appspot.com'
# If you have trouble with `.`, you could also use `_`.
# app_baseURL = 'http://localhost'
app_baseURL = 'http://localhost'
# app.forceGlobalSecureRequests = false
# app.CSPEnabled = false
......@@ -31,18 +33,18 @@ CI_ENVIRONMENT = production
# DATABASE
#--------------------------------------------------------------------
#database.default.hostname = localhost
#database.default.database = webapp
#database.default.username = webapp_user
#database.default.password = FOE6f35AUtbL015D
#database.default.DBDriver = MySQLi
database.default.hostname = localhost
database.default.database = webapp
database.default.username = webapp_user
database.default.password = FOE6f35AUtbL015D
database.default.DBDriver = MySQLi
database.default.hostname = 34.65.71.245
database.default.database = webapp
database.default.username = mrtjcmh
database.default.password = d7c+}rB+Ezouc<ak
database.default.DBDriver = MySQLi
#database.default.hostname = 34.65.71.245
#database.default.database = webapp
#database.default.username = mrtjcmh
#database.default.password = d7c+}rB+Ezouc<ak
#database.default.DBDriver = MySQLi
# database.default.hostname = localhost
# database.default.database = ci4
......
......@@ -3,6 +3,7 @@
namespace Config;
use App\Controllers\RecipesController;
// Create a new instance of our RouteCollection class.
$routes = Services::routes();
......@@ -45,8 +46,6 @@ $routes->get('/recipes/delete/(:num)', 'RecipesController::delete/$1');
$routes->get('/logout', 'User::logout');
// Ruta para ver una receta
$routes->get('/recipe/(:num)', 'RecipesController::view_recipe/$1');
//$routes->get('/recipe/(:num)', 'RecipesController::view_recipe/$1');
// Ruta para obtener una imagen de una receta dado un id
......
......@@ -8,7 +8,8 @@ class InsertRecipeController extends Controller
{
public function index()
{
return view('templates/header')
$data['vista'] = 'insert';
return view('templates/header', $data)
. view('pages/insertRecipe')
. view('templates/footer');
}
......
......@@ -22,7 +22,7 @@ public function index()
throw new PageNotFoundException($page);
}
$data['title'] = ucfirst($page); // Capitalize the first letter
$data['vista'] = 'home';
return view('templates/header', $data)
.view('pages/' . $page)
.view('templates/footer');
......
......@@ -33,8 +33,9 @@ class RecipesController extends Controller
'photoUser' => $photo,
];
return view('templates/header', $data)
. view('pages/recipe_view')
$data2['vista'] = 'view';
return view('templates/header',$data2)
. view('pages/recipe_view', $data)
. view('templates/footer');
}
......@@ -83,26 +84,8 @@ class RecipesController extends Controller
}
}
// En tu controlador de recetas
/* public function filter_recipes() {
$vegan = $this->request->getPost('is_vegan') == 'Order one' ? 1 : 0;
$origin = $this->request->getPost('origin');
$season = $this->request->getPost('season');
$recipesModel = new \App\Models\RecipesModel();
$recipes = $recipesModel->getFilteredRecipes($vegan, $origin, $season);
$data = [];
$data['recipes'] = $recipes;
$data['recipesModel'] = $recipesModel;
echo view('home', $data);
} */
public function getFilteredRecipes()
{
public function getFilteredRecipes()
{
$model = new RecipesModel();
$filters = $this->request->getPost();
......@@ -110,6 +93,6 @@ public function getFilteredRecipes()
$recipes = $model->filterRecipes($filters);
return $this->response->setJSON($recipes);
}
}
}
\ No newline at end of file
......@@ -7,7 +7,9 @@ class User extends BaseController
{
$userModel = new \App\Models\UserModel();
$data['users'] = $userModel->findAll();
return view('templates/header')
$data2['vista'] = 'list';
return view('templates/header',$data2)
. view('user/list', $data)
. view('templates/footer');
}
......@@ -78,7 +80,8 @@ class User extends BaseController
}
public function user_ok()
{
return view('templates/header')
$data['vista'] = 'home';
return view('templates/header', $data)
. view('pages/home')
. view('templates/footer');
}
......@@ -180,14 +183,16 @@ class User extends BaseController
public function personalRecipes()
{
return view('templates/header')
$data['vista'] = 'profile';
return view('templates/header', $data)
. view('pages/userRecipes')
. view('templates/footer');
}
public function myprofile()
{
return view('templates/header')
$data['vista'] = 'profile';
return view('templates/header', $data)
. view('pages/profile_view')
. view('templates/footer');
}
......
......@@ -23,7 +23,7 @@
<!-- Inicio de la tarjeta de la receta -->
<div class="card info-card sales-card"
<div class="card info-card sales-card recipe-card"
onclick="window.location.href='<?php echo base_url('recipe/' . $row->id); ?>'">
<a href="<?php echo base_url('recipe/' . $row->id); ?>">
</a>
......@@ -34,16 +34,6 @@
</div>
<div class="col-lg-9 col-md-8 col-sm-12">
<div class="filter">
<a class="icon" href="#" data-bs-toggle="dropdown"><i class="bi bi-three-dots"></i></a>
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
<li class="dropdown-header text-start">
<h6>Opciones</h6>
</li>
<li><a class="dropdown-item" href="#">Guardar</a></li>
<li><a class="dropdown-item" href="#">Compartir</a></li>
</ul>
</div>
<div class="card-body">
<h5 class="card-title">
......
......@@ -16,7 +16,8 @@
background-size: 100% auto;
}
</style>
<script src="https://code.jquery.com/jquery-3.6.4.min.js" integrity="sha256-oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl+cbzUq8=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.6.4.min.js"
integrity="sha256-oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl+cbzUq8=" crossorigin="anonymous"></script>
</head>
......@@ -27,24 +28,29 @@
style="margin-bottom: 20px; margin-top: 0px;">
</a>
<div class="col-md-8">
<div class="container" id="container">
<div class="container login-container" id="container">
<div class="form-container sign-up-container">
<!-- FORMULARIO REGISTER -->
<form action=<?= base_url('/register'); ?> method="post" style="flex-direction: column; padding: 0 30px;">
<h1>Crear cuenta</h1>
<form action=<?= base_url('/register'); ?> method="post"
style="flex-direction: column; padding: 0 30px;">
<h1 class="mobile-text">Crear cuenta</h1>
<div class="social-container">
<a href="https://accounts.google.com/" class="social"><img
<a href="https://accounts.google.com/" class="social mobile-icon"><img
src="<?= base_url("iconos/google.ico") ?>" width="53" height="53"></a>
<a href="https://www.facebook.com/" class="social"><img
<a href="https://www.facebook.com/" class="social mobile-icon"><img
src="<?= base_url("iconos/facebook.ico") ?>" width="52" height="52"></a>
<a href="https://appleid.apple.com/" class="social"><img
<a href="https://appleid.apple.com/" class="social mobile-icon"><img
src="<?= base_url("iconos/apple.ico") ?>" width="52" height="52"></a>
</div>
<span>o usa tu correo</span>
<input style="background-color: #eee;" id="username-register-form" class="form-control" name="username" type="text" placeholder="Nombre" />
<input style="background-color: #eee;" id="email-register-form" class="form-control" name="email" type="email" placeholder="Email" />
<input style="background-color: #eee;" id="password-register-form" class="form-control" name="password" type="password" id="password" placeholder="Contraseña" />
<input style="background-color: #eee;" id="username-register-form" class="form-control"
name="username" type="text" placeholder="Nombre" />
<input style="background-color: #eee;" id="email-register-form" class="form-control" name="email"
type="email" placeholder="Email" />
<input style="background-color: #eee;" id="password-register-form" class="form-control"
name="password" type="password" id="password" placeholder="Contraseña" />
<span class="error">
<?= \Config\Services::validation()->listErrors(); ?>
......@@ -60,42 +66,49 @@
<span class="register-error">Error</span>
<a href="#" class="switch-form" id="signin-link">Iniciar Sesión</a>
<button id="signup-button" type="submit">Registrarse</button>
</form>
</div>
<div class="form-container sign-in-container">
<div class="form-container sign-in-container open">
<!-- FORMULARIO LOGIN -->
<form action=<?= base_url('/login'); ?> method="post" style="flex-direction: column; padding: 0 30px;">
<h1>Iniciar Sesión</h1>
<h1 class="mobile-text">Iniciar Sesión</h1>
<div class="social-container">
<a href="https://accounts.google.com/" class="social"><img
<a href="https://accounts.google.com/" class="social mobile-icon"><img
src="<?= base_url("iconos/google.ico") ?>" width="53" height="53"></a>
<a href="https://www.facebook.com/" class="social"><img
<a href="https://www.facebook.com/" class="social mobile-icon"><img
src="<?= base_url("iconos/facebook.ico") ?>" width="52" height="52"></a>
<a href="https://appleid.apple.com/" class="social"><img
<a href="https://appleid.apple.com/" class="social mobile-icon"><img
src="<?= base_url("iconos/apple.ico") ?>" width="52" height="52"></a>
</div>
<span>o usa tu correo</span>
<input style="background-color: #eee;" id="email-form" class="form-control" name="email" type="email" placeholder="Email" />
<input style="background-color: #eee;" id="password-form" class="form-control" name="password" type="password"
placeholder="Contraseña" />
<input style="background-color: #eee;" id="email-form" class="form-control" name="email"
type="email" placeholder="Email" />
<input style="background-color: #eee;" id="password-form" class="form-control" name="password"
type="password" placeholder="Contraseña" />
<span class="login-error">Credenciales incorrectas</span>
<a href="#" class="switch-form" id="signup-link">Crear cuenta</a>
<button id="signin-button" type="submit">Iniciar Sesión</button>
</form>
</div>
<div class="overlay-container">
<div class="overlay">
<div class="overlay-panel overlay-left">
<h1>¡Bienvenido a Wa2Eat!</h1>
<h1 class="mobile-text">¡Bienvenido a Wa2Eat!</h1>
<h8>Únete a la mayor comunidad de recetas en línea</h8>
<button class="ghost" id="signIn" style="margin-top: 10px;">Iniciar Sesión</button>
</div>
<div class="overlay-panel overlay-right">
<h1>¡Bienvenido de nuevo!</h1>
<h1 class="mobile-text">¡Bienvenido de nuevo!</h1>
<h8>Introduce tus credenciales y comienza a navegar</h8>
<button class="ghost" id="signUp" style="margin-top: 10px;">Registrarse</button>
</div>
......
......@@ -7,6 +7,8 @@ function getYoutubeVideoId($url)
}
?>
<link rel="stylesheet" href="<?= base_url("css/recipe_view.css") ?>">
<main id="main" class="main">
<section class="section dashboard">
......@@ -47,7 +49,6 @@ function getYoutubeVideoId($url)
<img src="../imagenes/ingredientes/<?php echo $ingredient->icon; ?>"
alt="<?php echo $ingredient->name; ?>" />
<span>
<?php echo $ingredient->name; ?>:
<?php echo $ingredient->amount; ?>
</span>
</li>
......
<?php $session = session(); ?>
<main id="main" class="main">
......@@ -11,12 +12,13 @@
foreach ($recipes as $row) {
$ingredients = $recipesModel->get_recipe_ingredients($row->id);
?>
<?php if ( $session->get('user')->email == $row->email_user): ?>
<!-- Inicio de la tarjeta de la receta -->
<?php if ($session->get('user')->email == $row->email_user): ?>
<div class="card info-card sales-card"
<!-- Inicio de la tarjeta de la receta -->
<div class="card info-card sales-card recipe-card"
onclick="window.location.href='<?php echo base_url('recipe/' . $row->id); ?>'">
<a href="<?php echo base_url('recipe/' . $row->id); ?>">
</a>
<div class="row flex-nowrap">
......@@ -26,16 +28,6 @@
</div>
<div class="col-lg-9 col-md-8 col-sm-12">
<div class="filter">
<a class="icon" href="#" data-bs-toggle="dropdown"><i class="bi bi-three-dots"></i></a>
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
<li class="dropdown-header text-start">
<h6>Opciones</h6>
</li>
<li><a class="dropdown-item" href="#">Guardar</a></li>
<li><a class="dropdown-item" href="#">Compartir</a></li>
</ul>
</div>
<div class="card-body">
<h5 class="card-title">
......@@ -57,8 +49,10 @@
</div>
</div>
</div>
<?php endif; ?>
<!-- Fin de la tarjeta de la receta -->
<?php endif; ?>
<?php
}
}
......
......@@ -23,19 +23,19 @@
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Vendor CSS Files -->
<link href="<?= base_url("bootstrap/css/bootstrap.min.css") ?>" rel="stylesheet">
<link href="<?= base_url("bootstrap/bootstrap-icons/bootstrap-icons.css") ?>" rel="stylesheet">
<link href="<?= base_url("bootstrap/boxicons/css/boxicons.min.css") ?>" rel="stylesheet">
<link href="<?= base_url("bootstrap/quill/quill.snow.css") ?>" rel="stylesheet">
<link href="<?= base_url("bootstrap/quill/quill.bubble.css") ?>" rel="stylesheet">
<link href="<?= base_url("bootstrap/remixicon/remixicon.css") ?>" rel="stylesheet">
<link href="<?= base_url("bootstrap/simple-datatables/style.css") ?>" rel="stylesheet">
<link href="<?= base_url("/bootstrap/css/bootstrap.min.css") ?>" rel="stylesheet">
<link href="<?= base_url("/bootstrap/bootstrap-icons/bootstrap-icons.css") ?>" rel="stylesheet">
<link href="<?= base_url("/bootstrap/boxicons/css/boxicons.min.css") ?>" rel="stylesheet">
<link href="<?= base_url("/bootstrap/quill/quill.snow.css") ?>" rel="stylesheet">
<link href="<?= base_url("/bootstrap/quill/quill.bubble.css") ?>" rel="stylesheet">
<link href="<?= base_url("/bootstrap/remixicon/remixicon.css") ?>" rel="stylesheet">
<link href="<?= base_url("/bootstrap/simple-datatables/style.css") ?>" rel="stylesheet">
<!-- Template Main CSS File -->
<link href="<?= base_url("css/style.css") ?>" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.6.4.min.js"
integrity="sha256-oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl+cbzUq8=" crossorigin="anonymous"></script>
<script src="js/main.js"></script>
<script src="<?= base_url("js/main.js") ?>"></script>
</head>
......@@ -91,7 +91,8 @@
<a class="nav-link nav-profile d-flex align-items-center pe-0" href="#" data-bs-toggle="dropdown">
<?php if ($session->has('user') && !is_null($session->get('user')->photo)): ?>
<img src="data:image/jpeg;base64,<?= base64_encode($session->get('user')->photo) ?>" alt="Profile" class="rounded-circle">
<img src="data:image/jpeg;base64,<?= base64_encode($session->get('user')->photo) ?>" alt="Profile"
class="rounded-circle">
<?php else: ?>
<img src="<?= base_url("imagenes/profile.png") ?>" alt="Profile" class="rounded-circle">
<?php endif; ?>
......@@ -186,8 +187,10 @@
</a>
</li><!-- End Dashboard Nav -->
<?php if ($vista == 'home'): ?>
<div id="catFilters">
<!-- Filtro 1-->
<!-- Filtro Vegano-->
<li class="nav-item">
<a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="collapse" href="#">
<i class="bi bi-layout-text-window-reverse"></i><span>Filtro Vegano</span><i
......@@ -202,9 +205,9 @@
</li>
</ul>
</ul>
</li><!-- Fin Filtro 1 -->
</li><!-- Fin Filtro Vegano -->
<!-- Filtro 1-->
<!-- Filtro Origen-->
<li class="nav-item">
<a class="nav-link collapsed" data-bs-target="#tables-nav2" data-bs-toggle="collapse" href="#">
<i class="bi bi-layout-text-window-reverse"></i><span>Filtro Origen</span><i
......@@ -258,6 +261,7 @@
</li><!-- Fin Filtro Origen -->
<!-- Filtro Temporada -->
<li class="nav-item">
<a class="nav-link collapsed" data-bs-target="#tables-nav3" data-bs-toggle="collapse" href="#">
<i class="bi bi-layout-text-window-reverse"></i><span>Filtro Temporada</span><i
......@@ -293,7 +297,11 @@
</ul>
</ul>
</li><!-- Fin Filtro Estaciones -->
</li><!-- Fin Filtro Temporada -->
</div>
<?php endif; ?>
</div>
......@@ -332,7 +340,7 @@
</aside><!-- End Sidebar-->
<!-- <script>
<!-- <script>
$(document).ready(function() {
$('.filter-checkbox').click(function() {
var filters = {
......
......@@ -105,8 +105,8 @@ input {
.container {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 14px 28px rgba(0,0,0,0.25),
0 10px 10px rgba(0,0,0,0.22);
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25),
0 10px 10px rgba(0, 0, 0, 0.22);
position: relative;
overflow: hidden;
width: 1400px;
......@@ -146,12 +146,15 @@ input {
}
@keyframes show {
0%, 49.99% {
0%,
49.99% {
opacity: 0;
z-index: 1;
}
50%, 100% {
50%,
100% {
opacity: 1;
z-index: 5;
}
......@@ -168,7 +171,7 @@ input {
z-index: 100;
}
.container.right-panel-active .overlay-container{
.container.right-panel-active .overlay-container {
transform: translateX(-100%);
}
......@@ -263,7 +266,7 @@ footer a {
text-decoration: none;
}
#signin-button{
#signin-button {
border-radius: 20px;
border: 1px solid #FFFFFF;
......@@ -279,7 +282,7 @@ footer a {
}
#signup-button{
#signup-button {
border-radius: 20px;
border: 1px solid #FFFFFF;
......@@ -294,3 +297,31 @@ footer a {
margin-top: 10px;
}
.switch-form {
display: none;
}
@media only screen and (max-width: 600px) {
.container:not(.mobile) .sign-in-container,
.container:not(.mobile) .sign-up-container {
display: none;
}
.container.mobile .sign-in-container,
.container.mobile .sign-up-container {
display: block;
width: 100%;
position: relative;
opacity: 1;
transform: none;
}
.container.mobile .overlay-container {
display: none;
}
.switch-form {
display: block;
}
}
......@@ -2563,3 +2563,21 @@ ul.autumn-cboxtags li input[type="checkbox"] {
opacity: 0;
}
@media (max-width: 600px) {
.recipe-card .row {
/* Cambia la dirección de los elementos de fila a columna */
flex-direction: column;
}
.recipe-card .imagen-container {
/* Ajusta la imagen para que ocupe todo el ancho en pantallas pequeñas */
width: 100%;
}
.recipe-card .col-lg-9 {
/* Ajusta el cuerpo de la tarjeta para que ocupe todo el ancho en pantallas pequeñas */
width: 100%;
}
}
\ No newline at end of file
const signUpButton = document.getElementById('signUp');
const signInButton = document.getElementById('signIn');
const container = document.getElementById('container');
const signInContainer = document.querySelector('.sign-in-container');
const signUpContainer = document.querySelector('.sign-up-container');
signUpButton.addEventListener('click', () => {
container.classList.add("right-panel-active");
......@@ -87,3 +89,62 @@ $("#signup-button").on("click", function(e){
})
$(document).ready(function() {
const signInButton = $('#signIn');
const signUpButton = $('#signUp');
const container = $('#container');
const signInContainer = $('.sign-in-container');
const signUpContainer = $('.sign-up-container');
if ($(window).width() < 500) {
signInButton.on('click', function() {
signUpContainer.removeClass('open');
signInContainer.addClass('open');
});
signUpButton.on('click', function() {
signInContainer.removeClass('open');
signUpContainer.addClass('open');
});
signInContainer.addClass('open');
}
});
document.getElementById('signup-link').addEventListener('click', function(event) {
event.preventDefault();
document.getElementById('signUp').click();
});
$(window).resize(function() {
var width = $(window).width();
if(width <= 600) {
$('#container').addClass('mobile');
$('.sign-up-container').hide();
$('.sign-in-container').show();
} else {
$('#container').removeClass('mobile');
}
}).resize(); // Trigger resize function on page load
$('#signup-link').click(function(e) {
e.preventDefault();
if ($('#container').hasClass('mobile')) {
$('.sign-in-container').hide();
$('.sign-up-container').show();
} else {
// Code to slide forms goes here
}
});
$('#signin-link').click(function(e) {
e.preventDefault();
if ($('#container').hasClass('mobile')) {
$('.sign-up-container').hide();
$('.sign-in-container').show();
} else {
// Code to slide forms goes here
}
});
......@@ -422,58 +422,4 @@ recipesSearch.addEventListener('keydown', function (event) {
/*
function search_recipe(query) {
if (query.trim() === '') {
document.querySelector('#recipe_dropdown').style.display = 'none';
return;
}
var xhr = new XMLHttpRequest();
xhr.open('POST', '/search_recipe', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
try {
var searchResults = JSON.parse(xhr.responseText);
const recipeList = document.querySelector('#recipe_list');
recipeList.innerHTML = '';
if (searchResults.length > 0) {
document.querySelector('#recipe_dropdown').style.display = 'block';
} else {
document.querySelector('#recipe_dropdown').style.display = 'none';
}
searchResults.forEach((recipe) => {
const listItem = document.createElement('li');
listItem.classList.add('recipe-item');
const nameElement = document.createElement('span');
nameElement.textContent = recipe.name;
listItem.appendChild(nameElement);
recipeList.appendChild(listItem);
});
} catch (error) {
console.error('Error parsing JSON response:', error);
}
} else if (xhr.readyState === 4) {
console.error('Error in request:', xhr.status, xhr.statusText);
}
};
xhr.send('query=' + encodeURIComponent(query));
}
document.addEventListener('click', function (event) {
if (!event.target.closest('.search-bar')) {
document.querySelector('#recipe_dropdown').style.display = 'none';
}
});
*/
})();
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
/*!
* Bootstrap v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,(function(){"use strict";const t="transitionend",e=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},i=t=>{const i=e(t);return i&&document.querySelector(i)?i:null},n=t=>{const i=e(t);return i?document.querySelector(i):null},s=e=>{e.dispatchEvent(new Event(t))},o=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),r=t=>o(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,a=t=>{if(!o(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},l=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),c=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?c(t.parentNode):null},h=()=>{},d=t=>{t.offsetHeight},u=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,f=[],p=()=>"rtl"===document.documentElement.dir,g=t=>{var e;e=()=>{const e=u();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(f.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of f)t()})),f.push(e)):e()},m=t=>{"function"==typeof t&&t()},_=(e,i,n=!0)=>{if(!n)return void m(e);const o=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(i)+5;let r=!1;const a=({target:n})=>{n===i&&(r=!0,i.removeEventListener(t,a),m(e))};i.addEventListener(t,a),setTimeout((()=>{r||s(i)}),o)},b=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},v=/[^.]*(?=\..*)\.|.*/,y=/\..*/,w=/::\d+$/,A={};let E=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},C=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function O(t,e){return e&&`${e}::${E++}`||t.uidEvent||E++}function x(t){const e=O(t);return t.uidEvent=e,A[e]=A[e]||{},A[e]}function k(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function L(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=N(t);return C.has(o)||(o=t),[n,s,o]}function D(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=L(e,i,n);if(e in T){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=x(t),c=l[a]||(l[a]={}),h=k(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=O(r,e.replace(v,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return j(s,{delegateTarget:r}),n.oneOff&&P.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return j(n,{delegateTarget:t}),i.oneOff&&P.off(t,n.type,e),e.apply(t,[n])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function S(t,e,i,n,s){const o=k(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function I(t,e,i,n){const s=e[i]||{};for(const o of Object.keys(s))if(o.includes(n)){const n=s[o];S(t,e,i,n.callable,n.delegationSelector)}}function N(t){return t=t.replace(y,""),T[t]||t}const P={on(t,e,i,n){D(t,e,i,n,!1)},one(t,e,i,n){D(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=L(e,i,n),a=r!==e,l=x(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))I(t,l,i,e.slice(1));for(const i of Object.keys(c)){const n=i.replace(w,"");if(!a||e.includes(n)){const e=c[i];S(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;S(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=u();let s=null,o=!0,r=!0,a=!1;e!==N(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=j(l,i),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function j(t,e){for(const[i,n]of Object.entries(e||{}))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}const M=new Map,H={set(t,e,i){M.has(t)||M.set(t,new Map);const n=M.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>M.has(t)&&M.get(t).get(e)||null,remove(t,e){if(!M.has(t))return;const i=M.get(t);i.delete(e),0===i.size&&M.delete(t)}};function $(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function W(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const B={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${W(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${W(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=$(t.dataset[n])}return e},getDataAttribute:(t,e)=>$(t.getAttribute(`data-bs-${W(e)}`))};class F{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=o(e)?B.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...o(e)?B.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const n of Object.keys(e)){const s=e[n],r=t[n],a=o(r)?"element":null==(i=r)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(a))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${a}" but expected type "${s}".`)}var i}}class z extends F{constructor(t,e){super(),(t=r(t))&&(this._element=t,this._config=this._getConfig(e),H.set(this._element,this.constructor.DATA_KEY,this))}dispose(){H.remove(this._element,this.constructor.DATA_KEY),P.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){_(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return H.get(r(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.2.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const q=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;P.on(document,i,`[data-bs-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),l(this))return;const o=n(this)||this.closest(`.${s}`);t.getOrCreateInstance(o)[e]()}))};class R extends z{static get NAME(){return"alert"}close(){if(P.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),P.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=R.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}q(R,"close"),g(R);const V='[data-bs-toggle="button"]';class K extends z{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=K.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}P.on(document,"click.bs.button.data-api",V,(t=>{t.preventDefault();const e=t.target.closest(V);K.getOrCreateInstance(e).toggle()})),g(K);const Q={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!l(t)&&a(t)))}},X={endCallback:null,leftCallback:null,rightCallback:null},Y={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class U extends F{constructor(t,e){super(),this._element=t,t&&U.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return X}static get DefaultType(){return Y}static get NAME(){return"swipe"}dispose(){P.off(this._element,".bs.swipe")}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),m(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&m(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(P.on(this._element,"pointerdown.bs.swipe",(t=>this._start(t))),P.on(this._element,"pointerup.bs.swipe",(t=>this._end(t))),this._element.classList.add("pointer-event")):(P.on(this._element,"touchstart.bs.swipe",(t=>this._start(t))),P.on(this._element,"touchmove.bs.swipe",(t=>this._move(t))),P.on(this._element,"touchend.bs.swipe",(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const G="next",J="prev",Z="left",tt="right",et="slid.bs.carousel",it="carousel",nt="active",st={ArrowLeft:tt,ArrowRight:Z},ot={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},rt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class at extends z{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Q.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===it&&this.cycle()}static get Default(){return ot}static get DefaultType(){return rt}static get NAME(){return"carousel"}next(){this._slide(G)}nextWhenVisible(){!document.hidden&&a(this._element)&&this.next()}prev(){this._slide(J)}pause(){this._isSliding&&s(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?P.one(this._element,et,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void P.one(this._element,et,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?G:J;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&P.on(this._element,"keydown.bs.carousel",(t=>this._keydown(t))),"hover"===this._config.pause&&(P.on(this._element,"mouseenter.bs.carousel",(()=>this.pause())),P.on(this._element,"mouseleave.bs.carousel",(()=>this._maybeEnableCycle()))),this._config.touch&&U.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of Q.find(".carousel-item img",this._element))P.on(t,"dragstart.bs.carousel",(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(Z)),rightCallback:()=>this._slide(this._directionToOrder(tt)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new U(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=st[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=Q.findOne(".active",this._indicatorsElement);e.classList.remove(nt),e.removeAttribute("aria-current");const i=Q.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(nt),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===G,s=e||b(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>P.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r("slide.bs.carousel").defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";s.classList.add(c),d(s),i.classList.add(l),s.classList.add(l),this._queueCallback((()=>{s.classList.remove(l,c),s.classList.add(nt),i.classList.remove(nt,c,l),this._isSliding=!1,r(et)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Q.findOne(".active.carousel-item",this._element)}_getItems(){return Q.find(".carousel-item",this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return p()?t===Z?J:G:t===Z?G:J}_orderToDirection(t){return p()?t===J?Z:tt:t===J?tt:Z}static jQueryInterface(t){return this.each((function(){const e=at.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}P.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",(function(t){const e=n(this);if(!e||!e.classList.contains(it))return;t.preventDefault();const i=at.getOrCreateInstance(e),s=this.getAttribute("data-bs-slide-to");return s?(i.to(s),void i._maybeEnableCycle()):"next"===B.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),P.on(window,"load.bs.carousel.data-api",(()=>{const t=Q.find('[data-bs-ride="carousel"]');for(const e of t)at.getOrCreateInstance(e)})),g(at);const lt="show",ct="collapse",ht="collapsing",dt='[data-bs-toggle="collapse"]',ut={parent:null,toggle:!0},ft={parent:"(null|element)",toggle:"boolean"};class pt extends z{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const n=Q.find(dt);for(const t of n){const e=i(t),n=Q.find(e).filter((t=>t===this._element));null!==e&&n.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return ut}static get DefaultType(){return ft}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>pt.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(P.trigger(this._element,"show.bs.collapse").defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(ct),this._element.classList.add(ht),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(ht),this._element.classList.add(ct,lt),this._element.style[e]="",P.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(P.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,d(this._element),this._element.classList.add(ht),this._element.classList.remove(ct,lt);for(const t of this._triggerArray){const e=n(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(ht),this._element.classList.add(ct),P.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(lt)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=r(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(dt);for(const e of t){const t=n(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=Q.find(":scope .collapse .collapse",this._config.parent);return Q.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=pt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}P.on(document,"click.bs.collapse.data-api",dt,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=i(this),n=Q.find(e);for(const t of n)pt.getOrCreateInstance(t,{toggle:!1}).toggle()})),g(pt);var gt="top",mt="bottom",_t="right",bt="left",vt="auto",yt=[gt,mt,_t,bt],wt="start",At="end",Et="clippingParents",Tt="viewport",Ct="popper",Ot="reference",xt=yt.reduce((function(t,e){return t.concat([e+"-"+wt,e+"-"+At])}),[]),kt=[].concat(yt,[vt]).reduce((function(t,e){return t.concat([e,e+"-"+wt,e+"-"+At])}),[]),Lt="beforeRead",Dt="read",St="afterRead",It="beforeMain",Nt="main",Pt="afterMain",jt="beforeWrite",Mt="write",Ht="afterWrite",$t=[Lt,Dt,St,It,Nt,Pt,jt,Mt,Ht];function Wt(t){return t?(t.nodeName||"").toLowerCase():null}function Bt(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ft(t){return t instanceof Bt(t).Element||t instanceof Element}function zt(t){return t instanceof Bt(t).HTMLElement||t instanceof HTMLElement}function qt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Bt(t).ShadowRoot||t instanceof ShadowRoot)}const Rt={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];zt(s)&&Wt(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});zt(n)&&Wt(n)&&(Object.assign(n.style,o),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function Vt(t){return t.split("-")[0]}var Kt=Math.max,Qt=Math.min,Xt=Math.round;function Yt(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function Ut(){return!/^((?!chrome|android).)*safari/i.test(Yt())}function Gt(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&zt(t)&&(s=t.offsetWidth>0&&Xt(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Xt(n.height)/t.offsetHeight||1);var r=(Ft(t)?Bt(t):window).visualViewport,a=!Ut()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,h=n.width/s,d=n.height/o;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function Jt(t){var e=Gt(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function Zt(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&qt(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function te(t){return Bt(t).getComputedStyle(t)}function ee(t){return["table","td","th"].indexOf(Wt(t))>=0}function ie(t){return((Ft(t)?t.ownerDocument:t.document)||window.document).documentElement}function ne(t){return"html"===Wt(t)?t:t.assignedSlot||t.parentNode||(qt(t)?t.host:null)||ie(t)}function se(t){return zt(t)&&"fixed"!==te(t).position?t.offsetParent:null}function oe(t){for(var e=Bt(t),i=se(t);i&&ee(i)&&"static"===te(i).position;)i=se(i);return i&&("html"===Wt(i)||"body"===Wt(i)&&"static"===te(i).position)?e:i||function(t){var e=/firefox/i.test(Yt());if(/Trident/i.test(Yt())&&zt(t)&&"fixed"===te(t).position)return null;var i=ne(t);for(qt(i)&&(i=i.host);zt(i)&&["html","body"].indexOf(Wt(i))<0;){var n=te(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function re(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ae(t,e,i){return Kt(t,Qt(e,i))}function le(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function ce(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}const he={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=Vt(i.placement),l=re(a),c=[bt,_t].indexOf(a)>=0?"height":"width";if(o&&r){var h=function(t,e){return le("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:ce(t,yt))}(s.padding,i),d=Jt(o),u="y"===l?gt:bt,f="y"===l?mt:_t,p=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],g=r[l]-i.rects.reference[l],m=oe(o),_=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,b=p/2-g/2,v=h[u],y=_-d[c]-h[f],w=_/2-d[c]/2+b,A=ae(v,w,y),E=l;i.modifiersData[n]=((e={})[E]=A,e.centerOffset=A-w,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Zt(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function de(t){return t.split("-")[1]}var ue={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fe(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,d=t.isFixed,u=r.x,f=void 0===u?0:u,p=r.y,g=void 0===p?0:p,m="function"==typeof h?h({x:f,y:g}):{x:f,y:g};f=m.x,g=m.y;var _=r.hasOwnProperty("x"),b=r.hasOwnProperty("y"),v=bt,y=gt,w=window;if(c){var A=oe(i),E="clientHeight",T="clientWidth";A===Bt(i)&&"static"!==te(A=ie(i)).position&&"absolute"===a&&(E="scrollHeight",T="scrollWidth"),(s===gt||(s===bt||s===_t)&&o===At)&&(y=mt,g-=(d&&A===w&&w.visualViewport?w.visualViewport.height:A[E])-n.height,g*=l?1:-1),s!==bt&&(s!==gt&&s!==mt||o!==At)||(v=_t,f-=(d&&A===w&&w.visualViewport?w.visualViewport.width:A[T])-n.width,f*=l?1:-1)}var C,O=Object.assign({position:a},c&&ue),x=!0===h?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:Xt(e*n)/n||0,y:Xt(i*n)/n||0}}({x:f,y:g}):{x:f,y:g};return f=x.x,g=x.y,l?Object.assign({},O,((C={})[y]=b?"0":"",C[v]=_?"0":"",C.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",C)):Object.assign({},O,((e={})[y]=b?g+"px":"",e[v]=_?f+"px":"",e.transform="",e))}const pe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:Vt(e.placement),variation:de(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,fe(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,fe(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var ge={passive:!0};const me={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=Bt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,ge)})),a&&l.addEventListener("resize",i.update,ge),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,ge)})),a&&l.removeEventListener("resize",i.update,ge)}},data:{}};var _e={left:"right",right:"left",bottom:"top",top:"bottom"};function be(t){return t.replace(/left|right|bottom|top/g,(function(t){return _e[t]}))}var ve={start:"end",end:"start"};function ye(t){return t.replace(/start|end/g,(function(t){return ve[t]}))}function we(t){var e=Bt(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ae(t){return Gt(ie(t)).left+we(t).scrollLeft}function Ee(t){var e=te(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function Te(t){return["html","body","#document"].indexOf(Wt(t))>=0?t.ownerDocument.body:zt(t)&&Ee(t)?t:Te(ne(t))}function Ce(t,e){var i;void 0===e&&(e=[]);var n=Te(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=Bt(n),r=s?[o].concat(o.visualViewport||[],Ee(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(Ce(ne(r)))}function Oe(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function xe(t,e,i){return e===Tt?Oe(function(t,e){var i=Bt(t),n=ie(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=Ut();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+Ae(t),y:l}}(t,i)):Ft(e)?function(t,e){var i=Gt(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):Oe(function(t){var e,i=ie(t),n=we(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=Kt(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=Kt(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+Ae(t),l=-n.scrollTop;return"rtl"===te(s||i).direction&&(a+=Kt(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(ie(t)))}function ke(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?Vt(s):null,r=s?de(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case gt:e={x:a,y:i.y-n.height};break;case mt:e={x:a,y:i.y+i.height};break;case _t:e={x:i.x+i.width,y:l};break;case bt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?re(o):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case wt:e[c]=e[c]-(i[h]/2-n[h]/2);break;case At:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function Le(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.strategy,r=void 0===o?t.strategy:o,a=i.boundary,l=void 0===a?Et:a,c=i.rootBoundary,h=void 0===c?Tt:c,d=i.elementContext,u=void 0===d?Ct:d,f=i.altBoundary,p=void 0!==f&&f,g=i.padding,m=void 0===g?0:g,_=le("number"!=typeof m?m:ce(m,yt)),b=u===Ct?Ot:Ct,v=t.rects.popper,y=t.elements[p?b:u],w=function(t,e,i,n){var s="clippingParents"===e?function(t){var e=Ce(ne(t)),i=["absolute","fixed"].indexOf(te(t).position)>=0&&zt(t)?oe(t):t;return Ft(i)?e.filter((function(t){return Ft(t)&&Zt(t,i)&&"body"!==Wt(t)})):[]}(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce((function(e,i){var s=xe(t,i,n);return e.top=Kt(s.top,e.top),e.right=Qt(s.right,e.right),e.bottom=Qt(s.bottom,e.bottom),e.left=Kt(s.left,e.left),e}),xe(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(Ft(y)?y:y.contextElement||ie(t.elements.popper),l,h,r),A=Gt(t.elements.reference),E=ke({reference:A,element:v,strategy:"absolute",placement:s}),T=Oe(Object.assign({},v,E)),C=u===Ct?T:A,O={top:w.top-C.top+_.top,bottom:C.bottom-w.bottom+_.bottom,left:w.left-C.left+_.left,right:C.right-w.right+_.right},x=t.modifiersData.offset;if(u===Ct&&x){var k=x[s];Object.keys(O).forEach((function(t){var e=[_t,mt].indexOf(t)>=0?1:-1,i=[gt,mt].indexOf(t)>=0?"y":"x";O[t]+=k[i]*e}))}return O}function De(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?kt:l,h=de(n),d=h?a?xt:xt.filter((function(t){return de(t)===h})):yt,u=d.filter((function(t){return c.indexOf(t)>=0}));0===u.length&&(u=d);var f=u.reduce((function(e,i){return e[i]=Le(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[Vt(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}const Se={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,g=i.allowedAutoPlacements,m=e.options.placement,_=Vt(m),b=l||(_!==m&&p?function(t){if(Vt(t)===vt)return[];var e=be(t);return[ye(t),e,ye(e)]}(m):[be(m)]),v=[m].concat(b).reduce((function(t,i){return t.concat(Vt(i)===vt?De(e,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):i)}),[]),y=e.rects.reference,w=e.rects.popper,A=new Map,E=!0,T=v[0],C=0;C<v.length;C++){var O=v[C],x=Vt(O),k=de(O)===wt,L=[gt,mt].indexOf(x)>=0,D=L?"width":"height",S=Le(e,{placement:O,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),I=L?k?_t:bt:k?mt:gt;y[D]>w[D]&&(I=be(I));var N=be(I),P=[];if(o&&P.push(S[x]<=0),a&&P.push(S[I]<=0,S[N]<=0),P.every((function(t){return t}))){T=O,E=!1;break}A.set(O,P)}if(E)for(var j=function(t){var e=v.find((function(e){var i=A.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},M=p?3:1;M>0&&"break"!==j(M);M--);e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Ie(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function Ne(t){return[gt,_t,mt,bt].some((function(e){return t[e]>=0}))}const Pe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=Le(e,{elementContext:"reference"}),a=Le(e,{altBoundary:!0}),l=Ie(r,n),c=Ie(a,s,o),h=Ne(l),d=Ne(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},je={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=kt.reduce((function(t,i){return t[i]=function(t,e,i){var n=Vt(t),s=[bt,gt].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[bt,_t].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}(i,e.rects,o),t}),{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}},Me={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=ke({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},He={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,f=void 0===u||u,p=i.tetherOffset,g=void 0===p?0:p,m=Le(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),_=Vt(e.placement),b=de(e.placement),v=!b,y=re(_),w="x"===y?"y":"x",A=e.modifiersData.popperOffsets,E=e.rects.reference,T=e.rects.popper,C="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,O="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),x=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(A){if(o){var L,D="y"===y?gt:bt,S="y"===y?mt:_t,I="y"===y?"height":"width",N=A[y],P=N+m[D],j=N-m[S],M=f?-T[I]/2:0,H=b===wt?E[I]:T[I],$=b===wt?-T[I]:-E[I],W=e.elements.arrow,B=f&&W?Jt(W):{width:0,height:0},F=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},z=F[D],q=F[S],R=ae(0,E[I],B[I]),V=v?E[I]/2-M-R-z-O.mainAxis:H-R-z-O.mainAxis,K=v?-E[I]/2+M+R+q+O.mainAxis:$+R+q+O.mainAxis,Q=e.elements.arrow&&oe(e.elements.arrow),X=Q?"y"===y?Q.clientTop||0:Q.clientLeft||0:0,Y=null!=(L=null==x?void 0:x[y])?L:0,U=N+K-Y,G=ae(f?Qt(P,N+V-Y-X):P,N,f?Kt(j,U):j);A[y]=G,k[y]=G-N}if(a){var J,Z="x"===y?gt:bt,tt="x"===y?mt:_t,et=A[w],it="y"===w?"height":"width",nt=et+m[Z],st=et-m[tt],ot=-1!==[gt,bt].indexOf(_),rt=null!=(J=null==x?void 0:x[w])?J:0,at=ot?nt:et-E[it]-T[it]-rt+O.altAxis,lt=ot?et+E[it]+T[it]-rt-O.altAxis:st,ct=f&&ot?function(t,e,i){var n=ae(t,e,i);return n>i?i:n}(at,et,lt):ae(f?at:nt,et,f?lt:st);A[w]=ct,k[w]=ct-et}e.modifiersData[n]=k}},requiresIfExists:["offset"]};function $e(t,e,i){void 0===i&&(i=!1);var n,s,o=zt(e),r=zt(e)&&function(t){var e=t.getBoundingClientRect(),i=Xt(e.width)/t.offsetWidth||1,n=Xt(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=ie(e),l=Gt(t,r,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&(("body"!==Wt(e)||Ee(a))&&(c=(n=e)!==Bt(n)&&zt(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:we(n)),zt(e)?((h=Gt(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=Ae(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function We(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||s(t)})),n}var Be={placement:"bottom",modifiers:[],strategy:"absolute"};function Fe(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function ze(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,s=e.defaultOptions,o=void 0===s?Be:s;return function(t,e,i){void 0===i&&(i=o);var s,r,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Be,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,h={state:a,setOptions:function(i){var s="function"==typeof i?i(a.options):i;d(),a.options=Object.assign({},o,a.options,s),a.scrollParents={reference:Ft(t)?Ce(t):t.contextElement?Ce(t.contextElement):[],popper:Ce(e)};var r,c,u=function(t){var e=We(t);return $t.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}((r=[].concat(n,a.options.modifiers),c=r.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return a.orderedModifiers=u.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,s=t.effect;if("function"==typeof s){var o=s({state:a,name:e,instance:h,options:n});l.push(o||function(){})}})),h.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(Fe(e,i)){a.rects={reference:$e(e,oe(i),"fixed"===a.options.strategy),popper:Jt(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var s=a.orderedModifiers[n],o=s.fn,r=s.options,l=void 0===r?{}:r,d=s.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:h})||a)}else a.reset=!1,n=-1}}},update:(s=function(){return new Promise((function(t){h.forceUpdate(),t(a)}))},function(){return r||(r=new Promise((function(t){Promise.resolve().then((function(){r=void 0,t(s())}))}))),r}),destroy:function(){d(),c=!0}};if(!Fe(t,e))return h;function d(){l.forEach((function(t){return t()})),l=[]}return h.setOptions(i).then((function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)})),h}}var qe=ze(),Re=ze({defaultModifiers:[me,Me,pe,Rt]}),Ve=ze({defaultModifiers:[me,Me,pe,Rt,je,Se,He,he,Pe]});const Ke=Object.freeze(Object.defineProperty({__proto__:null,popperGenerator:ze,detectOverflow:Le,createPopperBase:qe,createPopper:Ve,createPopperLite:Re,top:gt,bottom:mt,right:_t,left:bt,auto:vt,basePlacements:yt,start:wt,end:At,clippingParents:Et,viewport:Tt,popper:Ct,reference:Ot,variationPlacements:xt,placements:kt,beforeRead:Lt,read:Dt,afterRead:St,beforeMain:It,main:Nt,afterMain:Pt,beforeWrite:jt,write:Mt,afterWrite:Ht,modifierPhases:$t,applyStyles:Rt,arrow:he,computeStyles:pe,eventListeners:me,flip:Se,hide:Pe,offset:je,popperOffsets:Me,preventOverflow:He},Symbol.toStringTag,{value:"Module"})),Qe="dropdown",Xe="ArrowUp",Ye="ArrowDown",Ue="click.bs.dropdown.data-api",Ge="keydown.bs.dropdown.data-api",Je="show",Ze='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',ti=`${Ze}.show`,ei=".dropdown-menu",ii=p()?"top-end":"top-start",ni=p()?"top-start":"top-end",si=p()?"bottom-end":"bottom-start",oi=p()?"bottom-start":"bottom-end",ri=p()?"left-start":"right-start",ai=p()?"right-start":"left-start",li={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},ci={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class hi extends z{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=Q.next(this._element,ei)[0]||Q.prev(this._element,ei)[0]||Q.findOne(ei,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return li}static get DefaultType(){return ci}static get NAME(){return Qe}toggle(){return this._isShown()?this.hide():this.show()}show(){if(l(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!P.trigger(this._element,"show.bs.dropdown",t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))P.on(t,"mouseover",h);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Je),this._element.classList.add(Je),P.trigger(this._element,"shown.bs.dropdown",t)}}hide(){if(l(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!P.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))P.off(t,"mouseover",h);this._popper&&this._popper.destroy(),this._menu.classList.remove(Je),this._element.classList.remove(Je),this._element.setAttribute("aria-expanded","false"),B.removeDataAttribute(this._menu,"popper"),P.trigger(this._element,"hidden.bs.dropdown",t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!o(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Qe.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===Ke)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:o(this._config.reference)?t=r(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=Ve(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Je)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return ri;if(t.classList.contains("dropstart"))return ai;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?ni:ii:e?oi:si}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(B.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=Q.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>a(t)));i.length&&b(i,e,t===Ye,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=hi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=Q.find(ti);for(const i of e){const e=hi.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,n=[Xe,Ye].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(Ze)?this:Q.prev(this,Ze)[0]||Q.next(this,Ze)[0]||Q.findOne(Ze,t.delegateTarget.parentNode),o=hi.getOrCreateInstance(s);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}P.on(document,Ge,Ze,hi.dataApiKeydownHandler),P.on(document,Ge,ei,hi.dataApiKeydownHandler),P.on(document,Ue,hi.clearMenus),P.on(document,"keyup.bs.dropdown.data-api",hi.clearMenus),P.on(document,Ue,Ze,(function(t){t.preventDefault(),hi.getOrCreateInstance(this).toggle()})),g(hi);const di=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ui=".sticky-top",fi="padding-right",pi="margin-right";class gi{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,fi,(e=>e+t)),this._setElementAttributes(di,fi,(e=>e+t)),this._setElementAttributes(ui,pi,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,fi),this._resetElementAttributes(di,fi),this._resetElementAttributes(ui,pi)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&B.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=B.getDataAttribute(t,e);null!==i?(B.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(o(t))e(t);else for(const i of Q.find(t,this._element))e(i)}}const mi="show",_i="mousedown.bs.backdrop",bi={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},vi={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class yi extends F{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return bi}static get DefaultType(){return vi}static get NAME(){return"backdrop"}show(t){if(!this._config.isVisible)return void m(t);this._append();const e=this._getElement();this._config.isAnimated&&d(e),e.classList.add(mi),this._emulateAnimation((()=>{m(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(mi),this._emulateAnimation((()=>{this.dispose(),m(t)}))):m(t)}dispose(){this._isAppended&&(P.off(this._element,_i),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=r(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),P.on(t,_i,(()=>{m(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){_(t,this._getElement(),this._config.isAnimated)}}const wi=".bs.focustrap",Ai="backward",Ei={autofocus:!0,trapElement:null},Ti={autofocus:"boolean",trapElement:"element"};class Ci extends F{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Ei}static get DefaultType(){return Ti}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),P.off(document,wi),P.on(document,"focusin.bs.focustrap",(t=>this._handleFocusin(t))),P.on(document,"keydown.tab.bs.focustrap",(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,P.off(document,wi))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=Q.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===Ai?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Ai:"forward")}}const Oi="hidden.bs.modal",xi="show.bs.modal",ki="modal-open",Li="show",Di="modal-static",Si={backdrop:!0,focus:!0,keyboard:!0},Ii={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ni extends z{constructor(t,e){super(t,e),this._dialog=Q.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new gi,this._addEventListeners()}static get Default(){return Si}static get DefaultType(){return Ii}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||P.trigger(this._element,xi,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(ki),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(P.trigger(this._element,"hide.bs.modal").defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Li),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const t of[window,this._dialog])P.off(t,".bs.modal");this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new yi({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ci({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=Q.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),d(this._element),this._element.classList.add(Li),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,P.trigger(this._element,"shown.bs.modal",{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){P.on(this._element,"keydown.dismiss.bs.modal",(t=>{if("Escape"===t.key)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),P.on(window,"resize.bs.modal",(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),P.on(this._element,"mousedown.dismiss.bs.modal",(t=>{P.one(this._element,"click.dismiss.bs.modal",(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(ki),this._resetAdjustments(),this._scrollBar.reset(),P.trigger(this._element,Oi)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(P.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Di)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Di),this._queueCallback((()=>{this._element.classList.remove(Di),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=p()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=p()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=Ni.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}P.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){const e=n(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),P.one(e,xi,(t=>{t.defaultPrevented||P.one(e,Oi,(()=>{a(this)&&this.focus()}))}));const i=Q.findOne(".modal.show");i&&Ni.getInstance(i).hide(),Ni.getOrCreateInstance(e).toggle(this)})),q(Ni),g(Ni);const Pi="show",ji="showing",Mi="hiding",Hi=".offcanvas.show",$i="hidePrevented.bs.offcanvas",Wi="hidden.bs.offcanvas",Bi={backdrop:!0,keyboard:!0,scroll:!1},Fi={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class zi extends z{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Bi}static get DefaultType(){return Fi}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||P.trigger(this._element,"show.bs.offcanvas",{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new gi).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ji),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Pi),this._element.classList.remove(ji),P.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(P.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Mi),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(Pi,Mi),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new gi).reset(),P.trigger(this._element,Wi)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new yi({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():P.trigger(this._element,$i)}:null})}_initializeFocusTrap(){return new Ci({trapElement:this._element})}_addEventListeners(){P.on(this._element,"keydown.dismiss.bs.offcanvas",(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():P.trigger(this._element,$i))}))}static jQueryInterface(t){return this.each((function(){const e=zi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}P.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(t){const e=n(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),l(this))return;P.one(e,Wi,(()=>{a(this)&&this.focus()}));const i=Q.findOne(Hi);i&&i!==e&&zi.getInstance(i).hide(),zi.getOrCreateInstance(e).toggle(this)})),P.on(window,"load.bs.offcanvas.data-api",(()=>{for(const t of Q.find(Hi))zi.getOrCreateInstance(t).show()})),P.on(window,"resize.bs.offcanvas",(()=>{for(const t of Q.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&zi.getOrCreateInstance(t).hide()})),q(zi),g(zi);const qi=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Ri=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Vi=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Ki=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!qi.has(i)||Boolean(Ri.test(t.nodeValue)||Vi.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},Qi={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Xi={allowList:Qi,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Yi={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Ui={entry:"(string|element|function|null)",selector:"(string|element)"};class Gi extends F{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Xi}static get DefaultType(){return Yi}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},Ui)}_setContent(t,e,i){const n=Q.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?o(e)?this._putElementInTemplate(r(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[i]||[]);for(const e of n)Ki(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return"function"==typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Ji=new Set(["sanitize","allowList","sanitizeFn"]),Zi="fade",tn="show",en=".modal",nn="hide.bs.modal",sn="hover",on="focus",rn={AUTO:"auto",TOP:"top",RIGHT:p()?"left":"right",BOTTOM:"bottom",LEFT:p()?"right":"left"},an={allowList:Qi,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},ln={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class cn extends z{constructor(t,e){if(void 0===Ke)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return an}static get DefaultType(){return ln}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),P.off(this._element.closest(en),nn,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=P.trigger(this._element,this.constructor.eventName("show")),e=(c(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),P.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(tn),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))P.on(t,"mouseover",h);this._queueCallback((()=>{P.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!P.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(tn),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))P.off(t,"mouseover",h);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),P.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Zi,tn),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(Zi),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Gi({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Zi)}_isShown(){return this.tip&&this.tip.classList.contains(tn)}_createPopper(t){const e="function"==typeof this._config.placement?this._config.placement.call(this,t,this._element):this._config.placement,i=rn[e.toUpperCase()];return Ve(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)P.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===sn?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===sn?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");P.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?on:sn]=!0,e._enter()})),P.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?on:sn]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},P.on(this._element.closest(en),nn,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=B.getDataAttributes(this._element);for(const t of Object.keys(e))Ji.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:r(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=cn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}g(cn);const hn={...cn.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},dn={...cn.DefaultType,content:"(null|string|element|function)"};class un extends cn{static get Default(){return hn}static get DefaultType(){return dn}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=un.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}g(un);const fn="click.bs.scrollspy",pn="active",gn="[href]",mn={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},_n={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class bn extends z{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return mn}static get DefaultType(){return _n}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=r(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(P.off(this._config.target,fn),P.on(this._config.target,fn,gn,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(i(o),!n)return}else s||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=Q.find(gn,this._config.target);for(const e of t){if(!e.hash||l(e))continue;const t=Q.findOne(e.hash,this._element);a(t)&&(this._targetLinks.set(e.hash,e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(pn),this._activateParents(t),P.trigger(this._element,"activate.bs.scrollspy",{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))Q.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(pn);else for(const e of Q.parents(t,".nav, .list-group"))for(const t of Q.prev(e,".nav-link, .nav-item > .nav-link, .list-group-item"))t.classList.add(pn)}_clearActiveClass(t){t.classList.remove(pn);const e=Q.find("[href].active",t);for(const t of e)t.classList.remove(pn)}static jQueryInterface(t){return this.each((function(){const e=bn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}P.on(window,"load.bs.scrollspy.data-api",(()=>{for(const t of Q.find('[data-bs-spy="scroll"]'))bn.getOrCreateInstance(t)})),g(bn);const vn="ArrowLeft",yn="ArrowRight",wn="ArrowUp",An="ArrowDown",En="active",Tn="fade",Cn="show",On='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',xn=`.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle), ${On}`;class kn extends z{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),P.on(this._element,"keydown.bs.tab",(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?P.trigger(e,"hide.bs.tab",{relatedTarget:t}):null;P.trigger(t,"show.bs.tab",{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(En),this._activate(n(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),P.trigger(t,"shown.bs.tab",{relatedTarget:e})):t.classList.add(Cn)}),t,t.classList.contains(Tn)))}_deactivate(t,e){t&&(t.classList.remove(En),t.blur(),this._deactivate(n(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),P.trigger(t,"hidden.bs.tab",{relatedTarget:e})):t.classList.remove(Cn)}),t,t.classList.contains(Tn)))}_keydown(t){if(![vn,yn,wn,An].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[yn,An].includes(t.key),i=b(this._getChildren().filter((t=>!l(t))),t.target,e,!0);i&&(i.focus({preventScroll:!0}),kn.getOrCreateInstance(i).show())}_getChildren(){return Q.find(xn,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=n(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const n=(t,n)=>{const s=Q.findOne(t,i);s&&s.classList.toggle(n,e)};n(".dropdown-toggle",En),n(".dropdown-menu",Cn),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(En)}_getInnerElement(t){return t.matches(xn)?t:Q.findOne(xn,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=kn.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}P.on(document,"click.bs.tab",On,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),l(this)||kn.getOrCreateInstance(this).show()})),P.on(window,"load.bs.tab",(()=>{for(const t of Q.find('.active[data-bs-toggle="tab"], .active[data-bs-toggle="pill"], .active[data-bs-toggle="list"]'))kn.getOrCreateInstance(t)})),g(kn);const Ln="hide",Dn="show",Sn="showing",In={animation:"boolean",autohide:"boolean",delay:"number"},Nn={animation:!0,autohide:!0,delay:5e3};class Pn extends z{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Nn}static get DefaultType(){return In}static get NAME(){return"toast"}show(){P.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Ln),d(this._element),this._element.classList.add(Dn,Sn),this._queueCallback((()=>{this._element.classList.remove(Sn),P.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(P.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.add(Sn),this._queueCallback((()=>{this._element.classList.add(Ln),this._element.classList.remove(Sn,Dn),P.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Dn),super.dispose()}isShown(){return this._element.classList.contains(Dn)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){P.on(this._element,"mouseover.bs.toast",(t=>this._onInteraction(t,!0))),P.on(this._element,"mouseout.bs.toast",(t=>this._onInteraction(t,!1))),P.on(this._element,"focusin.bs.toast",(t=>this._onInteraction(t,!0))),P.on(this._element,"focusout.bs.toast",(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Pn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return q(Pn),g(Pn),{Alert:R,Button:K,Carousel:at,Collapse:pt,Dropdown:hi,Modal:Ni,Offcanvas:zi,Popover:un,ScrollSpy:bn,Tab:kn,Toast:Pn,Tooltip:cn}}));
//# sourceMappingURL=bootstrap.bundle.min.js.map
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
/*!
* Bootstrap v5.3.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
import*as Popper from"@popperjs/core";const MAX_UID=1e6,MILLISECONDS_MULTIPLIER=1e3,TRANSITION_END="transitionend",parseSelector=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e),toType=e=>null==e?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),getUID=e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e},getTransitionDurationFromElement=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const i=Number.parseFloat(t),s=Number.parseFloat(n);return i||s?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0},triggerTransitionEnd=e=>{e.dispatchEvent(new Event(TRANSITION_END))},isElement=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),getElement=e=>isElement(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(parseSelector(e)):null,isVisible=e=>{if(!isElement(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)return!1;if(null===t)return!1}return t},isDisabled=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),findShadowRoot=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?findShadowRoot(e.parentNode):null},noop=()=>{},reflow=e=>{e.offsetHeight},getjQuery=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,DOMContentLoadedCallbacks=[],onDOMContentLoaded=e=>{"loading"===document.readyState?(DOMContentLoadedCallbacks.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of DOMContentLoadedCallbacks)e()})),DOMContentLoadedCallbacks.push(e)):e()},isRTL=()=>"rtl"===document.documentElement.dir,defineJQueryPlugin=e=>{var t;t=()=>{const t=getjQuery();if(t){const n=e.NAME,i=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=i,e.jQueryInterface)}},"loading"===document.readyState?(DOMContentLoadedCallbacks.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of DOMContentLoadedCallbacks)e()})),DOMContentLoadedCallbacks.push(t)):t()},execute=(e,t=[],n=e)=>"function"==typeof e?e(...t):n,executeAfterTransition=(e,t,n=!0)=>{if(!n)return void execute(e);const i=getTransitionDurationFromElement(t)+5;let s=!1;const o=({target:n})=>{n===t&&(s=!0,t.removeEventListener(TRANSITION_END,o),execute(e))};t.addEventListener(TRANSITION_END,o),setTimeout((()=>{s||triggerTransitionEnd(t)}),i)},getNextActiveElement=(e,t,n,i)=>{const s=e.length;let o=e.indexOf(t);return-1===o?!n&&i?e[s-1]:e[0]:(o+=n?1:-1,i&&(o=(o+s)%s),e[Math.max(0,Math.min(o,s-1))])},namespaceRegex=/[^.]*(?=\..*)\.|.*/,stripNameRegex=/\..*/,stripUidRegex=/::\d+$/,eventRegistry={};let uidEvent=1;const customEvents={mouseenter:"mouseover",mouseleave:"mouseout"},nativeEvents=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function makeEventUid(e,t){return t&&`${t}::${uidEvent++}`||e.uidEvent||uidEvent++}function getElementEvents(e){const t=makeEventUid(e);return e.uidEvent=t,eventRegistry[t]=eventRegistry[t]||{},eventRegistry[t]}function bootstrapHandler(e,t){return function n(i){return hydrateObj(i,{delegateTarget:e}),n.oneOff&&EventHandler.off(e,i.type,t),t.apply(e,[i])}}function bootstrapDelegationHandler(e,t,n){return function i(s){const o=e.querySelectorAll(t);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return hydrateObj(s,{delegateTarget:r}),i.oneOff&&EventHandler.off(e,s.type,t,n),n.apply(r,[s])}}function findHandler(e,t,n=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===n))}function normalizeParameters(e,t,n){const i="string"==typeof t,s=i?n:t||n;let o=getTypeEvent(e);return nativeEvents.has(o)||(o=e),[i,s,o]}function addHandler(e,t,n,i,s){if("string"!=typeof t||!e)return;let[o,r,a]=normalizeParameters(t,n,i);if(t in customEvents){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};r=e(r)}const l=getElementEvents(e),c=l[a]||(l[a]={}),_=findHandler(c,r,o?n:null);if(_)return void(_.oneOff=_.oneOff&&s);const d=makeEventUid(r,t.replace(namespaceRegex,"")),h=o?bootstrapDelegationHandler(e,n,r):bootstrapHandler(e,r);h.delegationSelector=o?n:null,h.callable=r,h.oneOff=s,h.uidEvent=d,c[d]=h,e.addEventListener(a,h,o)}function removeHandler(e,t,n,i,s){const o=findHandler(t[n],i,s);o&&(e.removeEventListener(n,o,Boolean(s)),delete t[n][o.uidEvent])}function removeNamespacedHandlers(e,t,n,i){const s=t[n]||{};for(const[o,r]of Object.entries(s))o.includes(i)&&removeHandler(e,t,n,r.callable,r.delegationSelector)}function getTypeEvent(e){return e=e.replace(stripNameRegex,""),customEvents[e]||e}const EventHandler={on(e,t,n,i){addHandler(e,t,n,i,!1)},one(e,t,n,i){addHandler(e,t,n,i,!0)},off(e,t,n,i){if("string"!=typeof t||!e)return;const[s,o,r]=normalizeParameters(t,n,i),a=r!==t,l=getElementEvents(e),c=l[r]||{},_=t.startsWith(".");if(void 0===o){if(_)for(const n of Object.keys(l))removeNamespacedHandlers(e,l,n,t.slice(1));for(const[n,i]of Object.entries(c)){const s=n.replace(stripUidRegex,"");a&&!t.includes(s)||removeHandler(e,l,r,i.callable,i.delegationSelector)}}else{if(!Object.keys(c).length)return;removeHandler(e,l,r,o,s?n:null)}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const i=getjQuery();let s=null,o=!0,r=!0,a=!1;t!==getTypeEvent(t)&&i&&(s=i.Event(t,n),i(e).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());let l=new Event(t,{bubbles:o,cancelable:!0});return l=hydrateObj(l,n),a&&l.preventDefault(),r&&e.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function hydrateObj(e,t={}){for(const[n,i]of Object.entries(t))try{e[n]=i}catch(t){Object.defineProperty(e,n,{configurable:!0,get:()=>i})}return e}const elementMap=new Map,Data={set(e,t,n){elementMap.has(e)||elementMap.set(e,new Map);const i=elementMap.get(e);i.has(t)||0===i.size?i.set(t,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(e,t)=>elementMap.has(e)&&elementMap.get(e).get(t)||null,remove(e,t){if(!elementMap.has(e))return;const n=elementMap.get(e);n.delete(t),0===n.size&&elementMap.delete(e)}};function normalizeData(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function normalizeDataKey(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}const Manipulator={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${normalizeDataKey(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${normalizeDataKey(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter((e=>e.startsWith("bs")&&!e.startsWith("bsConfig")));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),t[n]=normalizeData(e.dataset[i])}return t},getDataAttribute:(e,t)=>normalizeData(e.getAttribute(`data-bs-${normalizeDataKey(t)}`))};class Config{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=isElement(t)?Manipulator.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...isElement(t)?Manipulator.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[i,s]of Object.entries(t)){const t=e[i],o=isElement(t)?"element":null==(n=t)?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${o}" but expected type "${s}".`)}var n}}const VERSION="5.3.0-alpha1";class BaseComponent extends Config{constructor(e,t){super(),(e=getElement(e))&&(this._element=e,this._config=this._getConfig(t),Data.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Data.remove(this._element,this.constructor.DATA_KEY),EventHandler.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){executeAfterTransition(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return Data.get(getElement(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return VERSION}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const getSelector=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return parseSelector(t)},SelectorEngine={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const n=[];let i=e.parentNode.closest(t);for(;i;)n.push(i),i=i.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((e=>`${e}:not([tabindex^="-"])`)).join(",");return this.find(t,e).filter((e=>!isDisabled(e)&&isVisible(e)))},getSelectorFromElement(e){const t=getSelector(e);return t&&SelectorEngine.findOne(t)?t:null},getElementFromSelector(e){const t=getSelector(e);return t?SelectorEngine.findOne(t):null},getMultipleElementsFromSelector(e){const t=getSelector(e);return t?SelectorEngine.find(t):[]}},enableDismissTrigger=(e,t="hide")=>{const n=`click.dismiss${e.EVENT_KEY}`,i=e.NAME;EventHandler.on(document,n,`[data-bs-dismiss="${i}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),isDisabled(this))return;const s=SelectorEngine.getElementFromSelector(this)||this.closest(`.${i}`);e.getOrCreateInstance(s)[t]()}))},NAME$f="alert",DATA_KEY$a="bs.alert",EVENT_KEY$b=".bs.alert",EVENT_CLOSE="close.bs.alert",EVENT_CLOSED="closed.bs.alert",CLASS_NAME_FADE$5="fade",CLASS_NAME_SHOW$8="show";class Alert extends BaseComponent{static get NAME(){return NAME$f}close(){if(EventHandler.trigger(this._element,EVENT_CLOSE).defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove(),EventHandler.trigger(this._element,EVENT_CLOSED),this.dispose()}static jQueryInterface(e){return this.each((function(){const t=Alert.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}enableDismissTrigger(Alert,"close"),defineJQueryPlugin(Alert);const NAME$e="button",DATA_KEY$9="bs.button",EVENT_KEY$a=".bs.button",DATA_API_KEY$6=".data-api",CLASS_NAME_ACTIVE$3="active",SELECTOR_DATA_TOGGLE$5='[data-bs-toggle="button"]',EVENT_CLICK_DATA_API$6="click.bs.button.data-api";class Button extends BaseComponent{static get NAME(){return NAME$e}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const t=Button.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}EventHandler.on(document,EVENT_CLICK_DATA_API$6,SELECTOR_DATA_TOGGLE$5,(e=>{e.preventDefault();const t=e.target.closest(SELECTOR_DATA_TOGGLE$5);Button.getOrCreateInstance(t).toggle()})),defineJQueryPlugin(Button);const NAME$d="swipe",EVENT_KEY$9=".bs.swipe",EVENT_TOUCHSTART="touchstart.bs.swipe",EVENT_TOUCHMOVE="touchmove.bs.swipe",EVENT_TOUCHEND="touchend.bs.swipe",EVENT_POINTERDOWN="pointerdown.bs.swipe",EVENT_POINTERUP="pointerup.bs.swipe",POINTER_TYPE_TOUCH="touch",POINTER_TYPE_PEN="pen",CLASS_NAME_POINTER_EVENT="pointer-event",SWIPE_THRESHOLD=40,Default$c={endCallback:null,leftCallback:null,rightCallback:null},DefaultType$c={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Swipe extends Config{constructor(e,t){super(),this._element=e,e&&Swipe.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Default$c}static get DefaultType(){return DefaultType$c}static get NAME(){return NAME$d}dispose(){EventHandler.off(this._element,".bs.swipe")}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),execute(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&execute(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(EventHandler.on(this._element,EVENT_POINTERDOWN,(e=>this._start(e))),EventHandler.on(this._element,EVENT_POINTERUP,(e=>this._end(e))),this._element.classList.add("pointer-event")):(EventHandler.on(this._element,EVENT_TOUCHSTART,(e=>this._start(e))),EventHandler.on(this._element,EVENT_TOUCHMOVE,(e=>this._move(e))),EventHandler.on(this._element,EVENT_TOUCHEND,(e=>this._end(e))))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const NAME$c="carousel",DATA_KEY$8="bs.carousel",EVENT_KEY$8=".bs.carousel",DATA_API_KEY$5=".data-api",ARROW_LEFT_KEY$1="ArrowLeft",ARROW_RIGHT_KEY$1="ArrowRight",TOUCHEVENT_COMPAT_WAIT=500,ORDER_NEXT="next",ORDER_PREV="prev",DIRECTION_LEFT="left",DIRECTION_RIGHT="right",EVENT_SLIDE="slide.bs.carousel",EVENT_SLID="slid.bs.carousel",EVENT_KEYDOWN$1="keydown.bs.carousel",EVENT_MOUSEENTER$1="mouseenter.bs.carousel",EVENT_MOUSELEAVE$1="mouseleave.bs.carousel",EVENT_DRAG_START="dragstart.bs.carousel",EVENT_LOAD_DATA_API$3="load.bs.carousel.data-api",EVENT_CLICK_DATA_API$5="click.bs.carousel.data-api",CLASS_NAME_CAROUSEL="carousel",CLASS_NAME_ACTIVE$2="active",CLASS_NAME_SLIDE="slide",CLASS_NAME_END="carousel-item-end",CLASS_NAME_START="carousel-item-start",CLASS_NAME_NEXT="carousel-item-next",CLASS_NAME_PREV="carousel-item-prev",SELECTOR_ACTIVE=".active",SELECTOR_ITEM=".carousel-item",SELECTOR_ACTIVE_ITEM=".active.carousel-item",SELECTOR_ITEM_IMG=".carousel-item img",SELECTOR_INDICATORS=".carousel-indicators",SELECTOR_DATA_SLIDE="[data-bs-slide], [data-bs-slide-to]",SELECTOR_DATA_RIDE='[data-bs-ride="carousel"]',KEY_TO_DIRECTION={ArrowLeft:"right",ArrowRight:"left"},Default$b={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},DefaultType$b={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Carousel extends BaseComponent{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=SelectorEngine.findOne(SELECTOR_INDICATORS,this._element),this._addEventListeners(),"carousel"===this._config.ride&&this.cycle()}static get Default(){return Default$b}static get DefaultType(){return DefaultType$b}static get NAME(){return NAME$c}next(){this._slide("next")}nextWhenVisible(){!document.hidden&&isVisible(this._element)&&this.next()}prev(){this._slide("prev")}pause(){this._isSliding&&triggerTransitionEnd(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?EventHandler.one(this._element,EVENT_SLID,(()=>this.cycle())):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void EventHandler.one(this._element,EVENT_SLID,(()=>this.to(e)));const n=this._getItemIndex(this._getActive());if(n===e)return;const i=e>n?"next":"prev";this._slide(i,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&EventHandler.on(this._element,EVENT_KEYDOWN$1,(e=>this._keydown(e))),"hover"===this._config.pause&&(EventHandler.on(this._element,EVENT_MOUSEENTER$1,(()=>this.pause())),EventHandler.on(this._element,EVENT_MOUSELEAVE$1,(()=>this._maybeEnableCycle()))),this._config.touch&&Swipe.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of SelectorEngine.find(SELECTOR_ITEM_IMG,this._element))EventHandler.on(e,EVENT_DRAG_START,(e=>e.preventDefault()));const e={leftCallback:()=>this._slide(this._directionToOrder("left")),rightCallback:()=>this._slide(this._directionToOrder("right")),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new Swipe(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=KEY_TO_DIRECTION[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=SelectorEngine.findOne(".active",this._indicatorsElement);t.classList.remove("active"),t.removeAttribute("aria-current");const n=SelectorEngine.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add("active"),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const n=this._getActive(),i="next"===e,s=t||getNextActiveElement(this._getItems(),n,i,this._config.wrap);if(s===n)return;const o=this._getItemIndex(s),r=t=>EventHandler.trigger(this._element,t,{relatedTarget:s,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:o});if(r(EVENT_SLIDE).defaultPrevented)return;if(!n||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=i?CLASS_NAME_START:CLASS_NAME_END,c=i?CLASS_NAME_NEXT:CLASS_NAME_PREV;s.classList.add(c),reflow(s),n.classList.add(l),s.classList.add(l),this._queueCallback((()=>{s.classList.remove(l,c),s.classList.add("active"),n.classList.remove("active",c,l),this._isSliding=!1,r(EVENT_SLID)}),n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM,this._element)}_getItems(){return SelectorEngine.find(SELECTOR_ITEM,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return isRTL()?"left"===e?"prev":"next":"left"===e?"next":"prev"}_orderToDirection(e){return isRTL()?"prev"===e?"left":"right":"prev"===e?"right":"left"}static jQueryInterface(e){return this.each((function(){const t=Carousel.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)}))}}EventHandler.on(document,EVENT_CLICK_DATA_API$5,SELECTOR_DATA_SLIDE,(function(e){const t=SelectorEngine.getElementFromSelector(this);if(!t||!t.classList.contains("carousel"))return;e.preventDefault();const n=Carousel.getOrCreateInstance(t),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===Manipulator.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())})),EventHandler.on(window,EVENT_LOAD_DATA_API$3,(()=>{const e=SelectorEngine.find(SELECTOR_DATA_RIDE);for(const t of e)Carousel.getOrCreateInstance(t)})),defineJQueryPlugin(Carousel);const NAME$b="collapse",DATA_KEY$7="bs.collapse",EVENT_KEY$7=".bs.collapse",DATA_API_KEY$4=".data-api",EVENT_SHOW$6="show.bs.collapse",EVENT_SHOWN$6="shown.bs.collapse",EVENT_HIDE$6="hide.bs.collapse",EVENT_HIDDEN$6="hidden.bs.collapse",EVENT_CLICK_DATA_API$4="click.bs.collapse.data-api",CLASS_NAME_SHOW$7="show",CLASS_NAME_COLLAPSE="collapse",CLASS_NAME_COLLAPSING="collapsing",CLASS_NAME_COLLAPSED="collapsed",CLASS_NAME_DEEPER_CHILDREN=":scope .collapse .collapse",CLASS_NAME_HORIZONTAL="collapse-horizontal",WIDTH="width",HEIGHT="height",SELECTOR_ACTIVES=".collapse.show, .collapse.collapsing",SELECTOR_DATA_TOGGLE$4='[data-bs-toggle="collapse"]',Default$a={parent:null,toggle:!0},DefaultType$a={parent:"(null|element)",toggle:"boolean"};class Collapse extends BaseComponent{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);for(const e of n){const t=SelectorEngine.getSelectorFromElement(e),n=SelectorEngine.find(t).filter((e=>e===this._element));null!==t&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Default$a}static get DefaultType(){return DefaultType$a}static get NAME(){return NAME$b}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(SELECTOR_ACTIVES).filter((e=>e!==this._element)).map((e=>Collapse.getOrCreateInstance(e,{toggle:!1})))),e.length&&e[0]._isTransitioning)return;if(EventHandler.trigger(this._element,EVENT_SHOW$6).defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove("collapse"),this._element.classList.add("collapsing"),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove("collapsing"),this._element.classList.add("collapse","show"),this._element.style[t]="",EventHandler.trigger(this._element,EVENT_SHOWN$6)}),this._element,!0),this._element.style[t]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(EventHandler.trigger(this._element,EVENT_HIDE$6).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,reflow(this._element),this._element.classList.add("collapsing"),this._element.classList.remove("collapse","show");for(const e of this._triggerArray){const t=SelectorEngine.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[e]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove("collapsing"),this._element.classList.add("collapse"),EventHandler.trigger(this._element,EVENT_HIDDEN$6)}),this._element,!0)}_isShown(e=this._element){return e.classList.contains("show")}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=getElement(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?WIDTH:HEIGHT}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$4);for(const t of e){const e=SelectorEngine.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN,this._config.parent);return SelectorEngine.find(e,this._config.parent).filter((e=>!t.includes(e)))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const n of e)n.classList.toggle("collapsed",!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each((function(){const n=Collapse.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e]()}}))}}EventHandler.on(document,EVENT_CLICK_DATA_API$4,SELECTOR_DATA_TOGGLE$4,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of SelectorEngine.getMultipleElementsFromSelector(this))Collapse.getOrCreateInstance(e,{toggle:!1}).toggle()})),defineJQueryPlugin(Collapse);const NAME$a="dropdown",DATA_KEY$6="bs.dropdown",EVENT_KEY$6=".bs.dropdown",DATA_API_KEY$3=".data-api",ESCAPE_KEY$2="Escape",TAB_KEY$1="Tab",ARROW_UP_KEY$1="ArrowUp",ARROW_DOWN_KEY$1="ArrowDown",RIGHT_MOUSE_BUTTON=2,EVENT_HIDE$5="hide.bs.dropdown",EVENT_HIDDEN$5="hidden.bs.dropdown",EVENT_SHOW$5="show.bs.dropdown",EVENT_SHOWN$5="shown.bs.dropdown",EVENT_CLICK_DATA_API$3="click.bs.dropdown.data-api",EVENT_KEYDOWN_DATA_API="keydown.bs.dropdown.data-api",EVENT_KEYUP_DATA_API="keyup.bs.dropdown.data-api",CLASS_NAME_SHOW$6="show",CLASS_NAME_DROPUP="dropup",CLASS_NAME_DROPEND="dropend",CLASS_NAME_DROPSTART="dropstart",CLASS_NAME_DROPUP_CENTER="dropup-center",CLASS_NAME_DROPDOWN_CENTER="dropdown-center",SELECTOR_DATA_TOGGLE$3='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',SELECTOR_DATA_TOGGLE_SHOWN=`${SELECTOR_DATA_TOGGLE$3}.show`,SELECTOR_MENU=".dropdown-menu",SELECTOR_NAVBAR=".navbar",SELECTOR_NAVBAR_NAV=".navbar-nav",SELECTOR_VISIBLE_ITEMS=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",PLACEMENT_TOP=isRTL()?"top-end":"top-start",PLACEMENT_TOPEND=isRTL()?"top-start":"top-end",PLACEMENT_BOTTOM=isRTL()?"bottom-end":"bottom-start",PLACEMENT_BOTTOMEND=isRTL()?"bottom-start":"bottom-end",PLACEMENT_RIGHT=isRTL()?"left-start":"right-start",PLACEMENT_LEFT=isRTL()?"right-start":"left-start",PLACEMENT_TOPCENTER="top",PLACEMENT_BOTTOMCENTER="bottom",Default$9={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},DefaultType$9={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Dropdown extends BaseComponent{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=SelectorEngine.next(this._element,SELECTOR_MENU)[0]||SelectorEngine.prev(this._element,SELECTOR_MENU)[0]||SelectorEngine.findOne(SELECTOR_MENU,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Default$9}static get DefaultType(){return DefaultType$9}static get NAME(){return NAME$a}toggle(){return this._isShown()?this.hide():this.show()}show(){if(isDisabled(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!EventHandler.trigger(this._element,EVENT_SHOW$5,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const e of[].concat(...document.body.children))EventHandler.on(e,"mouseover",noop);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add("show"),this._element.classList.add("show"),EventHandler.trigger(this._element,EVENT_SHOWN$5,e)}}hide(){if(isDisabled(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!EventHandler.trigger(this._element,EVENT_HIDE$5,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))EventHandler.off(e,"mouseover",noop);this._popper&&this._popper.destroy(),this._menu.classList.remove("show"),this._element.classList.remove("show"),this._element.setAttribute("aria-expanded","false"),Manipulator.removeDataAttribute(this._menu,"popper"),EventHandler.trigger(this._element,EVENT_HIDDEN$5,e)}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!isElement(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${NAME$a.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(void 0===Popper)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=this._parent:isElement(this._config.reference)?e=getElement(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Popper.createPopper(e,this._menu,t)}_isShown(){return this._menu.classList.contains("show")}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return PLACEMENT_RIGHT;if(e.classList.contains("dropstart"))return PLACEMENT_LEFT;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?PLACEMENT_TOPEND:PLACEMENT_TOP:t?PLACEMENT_BOTTOMEND:PLACEMENT_BOTTOM}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(Manipulator.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...execute(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const n=SelectorEngine.find(SELECTOR_VISIBLE_ITEMS,this._menu).filter((e=>isVisible(e)));n.length&&getNextActiveElement(n,t,e===ARROW_DOWN_KEY$1,!n.includes(t)).focus()}static jQueryInterface(e){return this.each((function(){const t=Dropdown.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN);for(const n of t){const t=Dropdown.getInstance(n);if(!t||!1===t._config.autoClose)continue;const i=e.composedPath(),s=i.includes(t._menu);if(i.includes(t._element)||"inside"===t._config.autoClose&&!s||"outside"===t._config.autoClose&&s)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const o={relatedTarget:t._element};"click"===e.type&&(o.clickEvent=e),t._completeHide(o)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),n="Escape"===e.key,i=[ARROW_UP_KEY$1,ARROW_DOWN_KEY$1].includes(e.key);if(!i&&!n)return;if(t&&!n)return;e.preventDefault();const s=this.matches(SELECTOR_DATA_TOGGLE$3)?this:SelectorEngine.prev(this,SELECTOR_DATA_TOGGLE$3)[0]||SelectorEngine.next(this,SELECTOR_DATA_TOGGLE$3)[0]||SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3,e.delegateTarget.parentNode),o=Dropdown.getOrCreateInstance(s);if(i)return e.stopPropagation(),o.show(),void o._selectMenuItem(e);o._isShown()&&(e.stopPropagation(),o.hide(),s.focus())}}EventHandler.on(document,EVENT_KEYDOWN_DATA_API,SELECTOR_DATA_TOGGLE$3,Dropdown.dataApiKeydownHandler),EventHandler.on(document,EVENT_KEYDOWN_DATA_API,SELECTOR_MENU,Dropdown.dataApiKeydownHandler),EventHandler.on(document,EVENT_CLICK_DATA_API$3,Dropdown.clearMenus),EventHandler.on(document,EVENT_KEYUP_DATA_API,Dropdown.clearMenus),EventHandler.on(document,EVENT_CLICK_DATA_API$3,SELECTOR_DATA_TOGGLE$3,(function(e){e.preventDefault(),Dropdown.getOrCreateInstance(this).toggle()})),defineJQueryPlugin(Dropdown);const SELECTOR_FIXED_CONTENT=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",SELECTOR_STICKY_CONTENT=".sticky-top",PROPERTY_PADDING="padding-right",PROPERTY_MARGIN="margin-right";class ScrollBarHelper{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"padding-right",(t=>t+e)),this._setElementAttributes(SELECTOR_FIXED_CONTENT,"padding-right",(t=>t+e)),this._setElementAttributes(".sticky-top","margin-right",(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"padding-right"),this._resetElementAttributes(SELECTOR_FIXED_CONTENT,"padding-right"),this._resetElementAttributes(".sticky-top","margin-right")}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,n){const i=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+i)return;this._saveInitialAttribute(e,t);const s=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${n(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(e,t){const n=e.style.getPropertyValue(t);n&&Manipulator.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const n=Manipulator.getDataAttribute(e,t);null!==n?(Manipulator.removeDataAttribute(e,t),e.style.setProperty(t,n)):e.style.removeProperty(t)}))}_applyManipulationCallback(e,t){if(isElement(e))t(e);else for(const n of SelectorEngine.find(e,this._element))t(n)}}const NAME$9="backdrop",CLASS_NAME_FADE$4="fade",CLASS_NAME_SHOW$5="show",EVENT_MOUSEDOWN="mousedown.bs.backdrop",Default$8={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},DefaultType$8={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Backdrop extends Config{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return Default$8}static get DefaultType(){return DefaultType$8}static get NAME(){return NAME$9}show(e){if(!this._config.isVisible)return void execute(e);this._append();const t=this._getElement();this._config.isAnimated&&reflow(t),t.classList.add("show"),this._emulateAnimation((()=>{execute(e)}))}hide(e){this._config.isVisible?(this._getElement().classList.remove("show"),this._emulateAnimation((()=>{this.dispose(),execute(e)}))):execute(e)}dispose(){this._isAppended&&(EventHandler.off(this._element,EVENT_MOUSEDOWN),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=getElement(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),EventHandler.on(e,EVENT_MOUSEDOWN,(()=>{execute(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(e){executeAfterTransition(e,this._getElement(),this._config.isAnimated)}}const NAME$8="focustrap",DATA_KEY$5="bs.focustrap",EVENT_KEY$5=".bs.focustrap",EVENT_FOCUSIN$2="focusin.bs.focustrap",EVENT_KEYDOWN_TAB="keydown.tab.bs.focustrap",TAB_KEY="Tab",TAB_NAV_FORWARD="forward",TAB_NAV_BACKWARD="backward",Default$7={autofocus:!0,trapElement:null},DefaultType$7={autofocus:"boolean",trapElement:"element"};class FocusTrap extends Config{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Default$7}static get DefaultType(){return DefaultType$7}static get NAME(){return NAME$8}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),EventHandler.off(document,EVENT_KEY$5),EventHandler.on(document,EVENT_FOCUSIN$2,(e=>this._handleFocusin(e))),EventHandler.on(document,EVENT_KEYDOWN_TAB,(e=>this._handleKeydown(e))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,EventHandler.off(document,EVENT_KEY$5))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const n=SelectorEngine.focusableChildren(t);0===n.length?t.focus():"backward"===this._lastTabNavDirection?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?"backward":"forward")}}const NAME$7="modal",DATA_KEY$4="bs.modal",EVENT_KEY$4=".bs.modal",DATA_API_KEY$2=".data-api",ESCAPE_KEY$1="Escape",EVENT_HIDE$4="hide.bs.modal",EVENT_HIDE_PREVENTED$1="hidePrevented.bs.modal",EVENT_HIDDEN$4="hidden.bs.modal",EVENT_SHOW$4="show.bs.modal",EVENT_SHOWN$4="shown.bs.modal",EVENT_RESIZE$1="resize.bs.modal",EVENT_CLICK_DISMISS="click.dismiss.bs.modal",EVENT_MOUSEDOWN_DISMISS="mousedown.dismiss.bs.modal",EVENT_KEYDOWN_DISMISS$1="keydown.dismiss.bs.modal",EVENT_CLICK_DATA_API$2="click.bs.modal.data-api",CLASS_NAME_OPEN="modal-open",CLASS_NAME_FADE$3="fade",CLASS_NAME_SHOW$4="show",CLASS_NAME_STATIC="modal-static",OPEN_SELECTOR$1=".modal.show",SELECTOR_DIALOG=".modal-dialog",SELECTOR_MODAL_BODY=".modal-body",SELECTOR_DATA_TOGGLE$2='[data-bs-toggle="modal"]',Default$6={backdrop:!0,focus:!0,keyboard:!0},DefaultType$6={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Modal extends BaseComponent{constructor(e,t){super(e,t),this._dialog=SelectorEngine.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new ScrollBarHelper,this._addEventListeners()}static get Default(){return Default$6}static get DefaultType(){return DefaultType$6}static get NAME(){return NAME$7}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||EventHandler.trigger(this._element,EVENT_SHOW$4,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add("modal-open"),this._adjustDialog(),this._backdrop.show((()=>this._showElement(e))))}hide(){this._isShown&&!this._isTransitioning&&(EventHandler.trigger(this._element,EVENT_HIDE$4).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove("show"),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const e of[window,this._dialog])EventHandler.off(e,".bs.modal");this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Backdrop({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new FocusTrap({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=SelectorEngine.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),reflow(this._element),this._element.classList.add("show"),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,EventHandler.trigger(this._element,EVENT_SHOWN$4,{relatedTarget:e})}),this._dialog,this._isAnimated())}_addEventListeners(){EventHandler.on(this._element,EVENT_KEYDOWN_DISMISS$1,(e=>{if("Escape"===e.key)return this._config.keyboard?(e.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),EventHandler.on(window,EVENT_RESIZE$1,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),EventHandler.on(this._element,EVENT_MOUSEDOWN_DISMISS,(e=>{EventHandler.one(this._element,EVENT_CLICK_DISMISS,(t=>{this._element===e.target&&this._element===t.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove("modal-open"),this._resetAdjustments(),this._scrollBar.reset(),EventHandler.trigger(this._element,EVENT_HIDDEN$4)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(EventHandler.trigger(this._element,EVENT_HIDE_PREVENTED$1).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains("modal-static")||(e||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static"),this._queueCallback((()=>{this._element.classList.remove("modal-static"),this._queueCallback((()=>{this._element.style.overflowY=t}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),n=t>0;if(n&&!e){const e=isRTL()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!n&&e){const e=isRTL()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each((function(){const n=Modal.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e](t)}}))}}EventHandler.on(document,EVENT_CLICK_DATA_API$2,SELECTOR_DATA_TOGGLE$2,(function(e){const t=SelectorEngine.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),EventHandler.one(t,EVENT_SHOW$4,(e=>{e.defaultPrevented||EventHandler.one(t,EVENT_HIDDEN$4,(()=>{isVisible(this)&&this.focus()}))}));const n=SelectorEngine.findOne(".modal.show");n&&Modal.getInstance(n).hide(),Modal.getOrCreateInstance(t).toggle(this)})),enableDismissTrigger(Modal),defineJQueryPlugin(Modal);const NAME$6="offcanvas",DATA_KEY$3="bs.offcanvas",EVENT_KEY$3=".bs.offcanvas",DATA_API_KEY$1=".data-api",EVENT_LOAD_DATA_API$2="load.bs.offcanvas.data-api",ESCAPE_KEY="Escape",CLASS_NAME_SHOW$3="show",CLASS_NAME_SHOWING$1="showing",CLASS_NAME_HIDING="hiding",CLASS_NAME_BACKDROP="offcanvas-backdrop",OPEN_SELECTOR=".offcanvas.show",EVENT_SHOW$3="show.bs.offcanvas",EVENT_SHOWN$3="shown.bs.offcanvas",EVENT_HIDE$3="hide.bs.offcanvas",EVENT_HIDE_PREVENTED="hidePrevented.bs.offcanvas",EVENT_HIDDEN$3="hidden.bs.offcanvas",EVENT_RESIZE="resize.bs.offcanvas",EVENT_CLICK_DATA_API$1="click.bs.offcanvas.data-api",EVENT_KEYDOWN_DISMISS="keydown.dismiss.bs.offcanvas",SELECTOR_DATA_TOGGLE$1='[data-bs-toggle="offcanvas"]',Default$5={backdrop:!0,keyboard:!0,scroll:!1},DefaultType$5={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Offcanvas extends BaseComponent{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Default$5}static get DefaultType(){return DefaultType$5}static get NAME(){return NAME$6}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||EventHandler.trigger(this._element,EVENT_SHOW$3,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new ScrollBarHelper).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add("showing"),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add("show"),this._element.classList.remove("showing"),EventHandler.trigger(this._element,EVENT_SHOWN$3,{relatedTarget:e})}),this._element,!0))}hide(){this._isShown&&(EventHandler.trigger(this._element,EVENT_HIDE$3).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add("hiding"),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove("show","hiding"),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new ScrollBarHelper).reset(),EventHandler.trigger(this._element,EVENT_HIDDEN$3)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new Backdrop({className:CLASS_NAME_BACKDROP,isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():EventHandler.trigger(this._element,EVENT_HIDE_PREVENTED)}:null})}_initializeFocusTrap(){return new FocusTrap({trapElement:this._element})}_addEventListeners(){EventHandler.on(this._element,EVENT_KEYDOWN_DISMISS,(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():EventHandler.trigger(this._element,EVENT_HIDE_PREVENTED))}))}static jQueryInterface(e){return this.each((function(){const t=Offcanvas.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}EventHandler.on(document,EVENT_CLICK_DATA_API$1,SELECTOR_DATA_TOGGLE$1,(function(e){const t=SelectorEngine.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),isDisabled(this))return;EventHandler.one(t,EVENT_HIDDEN$3,(()=>{isVisible(this)&&this.focus()}));const n=SelectorEngine.findOne(OPEN_SELECTOR);n&&n!==t&&Offcanvas.getInstance(n).hide(),Offcanvas.getOrCreateInstance(t).toggle(this)})),EventHandler.on(window,EVENT_LOAD_DATA_API$2,(()=>{for(const e of SelectorEngine.find(OPEN_SELECTOR))Offcanvas.getOrCreateInstance(e).show()})),EventHandler.on(window,EVENT_RESIZE,(()=>{for(const e of SelectorEngine.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&Offcanvas.getOrCreateInstance(e).hide()})),enableDismissTrigger(Offcanvas),defineJQueryPlugin(Offcanvas);const uriAttributes=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),ARIA_ATTRIBUTE_PATTERN=/^aria-[\w-]*$/i,SAFE_URL_PATTERN=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,DATA_URL_PATTERN=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,allowedAttribute=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!uriAttributes.has(n)||Boolean(SAFE_URL_PATTERN.test(e.nodeValue)||DATA_URL_PATTERN.test(e.nodeValue)):t.filter((e=>e instanceof RegExp)).some((e=>e.test(n)))},DefaultAllowlist={"*":["class","dir","id","lang","role",ARIA_ATTRIBUTE_PATTERN],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function sanitizeHtml(e,t,n){if(!e.length)return e;if(n&&"function"==typeof n)return n(e);const i=(new window.DOMParser).parseFromString(e,"text/html"),s=[].concat(...i.body.querySelectorAll("*"));for(const e of s){const n=e.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){e.remove();continue}const i=[].concat(...e.attributes),s=[].concat(t["*"]||[],t[n]||[]);for(const t of i)allowedAttribute(t,s)||e.removeAttribute(t.nodeName)}return i.body.innerHTML}const NAME$5="TemplateFactory",Default$4={allowList:DefaultAllowlist,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},DefaultType$4={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},DefaultContentType={entry:"(string|element|function|null)",selector:"(string|element)"};class TemplateFactory extends Config{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return Default$4}static get DefaultType(){return DefaultType$4}static get NAME(){return NAME$5}getContent(){return Object.values(this._config.content).map((e=>this._resolvePossibleFunction(e))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,n]of Object.entries(this._config.content))this._setContent(e,n,t);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},DefaultContentType)}_setContent(e,t,n){const i=SelectorEngine.findOne(n,e);i&&((t=this._resolvePossibleFunction(t))?isElement(t)?this._putElementInTemplate(getElement(t),i):this._config.html?i.innerHTML=this._maybeSanitize(t):i.textContent=t:i.remove())}_maybeSanitize(e){return this._config.sanitize?sanitizeHtml(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return execute(e,[this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const NAME$4="tooltip",DISALLOWED_ATTRIBUTES=new Set(["sanitize","allowList","sanitizeFn"]),CLASS_NAME_FADE$2="fade",CLASS_NAME_MODAL="modal",CLASS_NAME_SHOW$2="show",SELECTOR_TOOLTIP_INNER=".tooltip-inner",SELECTOR_MODAL=".modal",EVENT_MODAL_HIDE="hide.bs.modal",TRIGGER_HOVER="hover",TRIGGER_FOCUS="focus",TRIGGER_CLICK="click",TRIGGER_MANUAL="manual",EVENT_HIDE$2="hide",EVENT_HIDDEN$2="hidden",EVENT_SHOW$2="show",EVENT_SHOWN$2="shown",EVENT_INSERTED="inserted",EVENT_CLICK$1="click",EVENT_FOCUSIN$1="focusin",EVENT_FOCUSOUT$1="focusout",EVENT_MOUSEENTER="mouseenter",EVENT_MOUSELEAVE="mouseleave",AttachmentMap={AUTO:"auto",TOP:"top",RIGHT:isRTL()?"left":"right",BOTTOM:"bottom",LEFT:isRTL()?"right":"left"},Default$3={allowList:DefaultAllowlist,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},DefaultType$3={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Tooltip extends BaseComponent{constructor(e,t){if(void 0===Popper)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Default$3}static get DefaultType(){return DefaultType$3}static get NAME(){return NAME$4}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),EventHandler.off(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const e=EventHandler.trigger(this._element,this.constructor.eventName("show")),t=(findShadowRoot(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(n),EventHandler.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add("show"),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))EventHandler.on(e,"mouseover",noop);this._queueCallback((()=>{EventHandler.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!EventHandler.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove("show"),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))EventHandler.off(e,"mouseover",noop);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),EventHandler.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove("fade","show"),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=getUID(this.constructor.NAME).toString();return t.setAttribute("id",n),this._isAnimated()&&t.classList.add("fade"),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new TemplateFactory({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains("fade")}_isShown(){return this.tip&&this.tip.classList.contains("show")}_createPopper(e){const t=execute(this._config.placement,[this,e,this._element]),n=AttachmentMap[t.toUpperCase()];return Popper.createPopper(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_resolvePossibleFunction(e){return execute(e,[this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...t,...execute(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if("click"===t)EventHandler.on(this._element,this.constructor.eventName("click"),this._config.selector,(e=>{this._initializeOnDelegatedTarget(e).toggle()}));else if("manual"!==t){const e="hover"===t?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n="hover"===t?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");EventHandler.on(this._element,e,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?"focus":"hover"]=!0,t._enter()})),EventHandler.on(this._element,n,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?"focus":"hover"]=t._element.contains(e.relatedTarget),t._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},EventHandler.on(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=Manipulator.getDataAttributes(this._element);for(const e of Object.keys(t))DISALLOWED_ATTRIBUTES.has(e)&&delete t[e];return e={...t,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:getElement(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,n]of Object.entries(this._config))this.constructor.Default[t]!==n&&(e[t]=n);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each((function(){const t=Tooltip.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}defineJQueryPlugin(Tooltip);const NAME$3="popover",SELECTOR_TITLE=".popover-header",SELECTOR_CONTENT=".popover-body",Default$2={...Tooltip.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},DefaultType$2={...Tooltip.DefaultType,content:"(null|string|element|function)"};class Popover extends Tooltip{static get Default(){return Default$2}static get DefaultType(){return DefaultType$2}static get NAME(){return NAME$3}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[SELECTOR_TITLE]:this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each((function(){const t=Popover.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}defineJQueryPlugin(Popover);const NAME$2="scrollspy",DATA_KEY$2="bs.scrollspy",EVENT_KEY$2=".bs.scrollspy",DATA_API_KEY=".data-api",EVENT_ACTIVATE="activate.bs.scrollspy",EVENT_CLICK="click.bs.scrollspy",EVENT_LOAD_DATA_API$1="load.bs.scrollspy.data-api",CLASS_NAME_DROPDOWN_ITEM="dropdown-item",CLASS_NAME_ACTIVE$1="active",SELECTOR_DATA_SPY='[data-bs-spy="scroll"]',SELECTOR_TARGET_LINKS="[href]",SELECTOR_NAV_LIST_GROUP=".nav, .list-group",SELECTOR_NAV_LINKS=".nav-link",SELECTOR_NAV_ITEMS=".nav-item",SELECTOR_LIST_ITEMS=".list-group-item",SELECTOR_LINK_ITEMS=".nav-link, .nav-item > .nav-link, .list-group-item",SELECTOR_DROPDOWN=".dropdown",SELECTOR_DROPDOWN_TOGGLE$1=".dropdown-toggle",Default$1={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},DefaultType$1={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class ScrollSpy extends BaseComponent{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Default$1}static get DefaultType(){return DefaultType$1}static get NAME(){return NAME$2}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=getElement(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map((e=>Number.parseFloat(e)))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(EventHandler.off(this._config.target,EVENT_CLICK),EventHandler.on(this._config.target,EVENT_CLICK,"[href]",(e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const n=this._rootElement||window,i=t.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:i,behavior:"smooth"});n.scrollTop=i}})))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((e=>this._observerCallback(e)),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),n=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},i=(this._rootElement||document.documentElement).scrollTop,s=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(o));continue}const e=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&e){if(n(o),!i)return}else s||e||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=SelectorEngine.find("[href]",this._config.target);for(const t of e){if(!t.hash||isDisabled(t))continue;const e=SelectorEngine.findOne(t.hash,this._element);isVisible(e)&&(this._targetLinks.set(t.hash,t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add("active"),this._activateParents(e),EventHandler.trigger(this._element,EVENT_ACTIVATE,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))SelectorEngine.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add("active");else for(const t of SelectorEngine.parents(e,".nav, .list-group"))for(const e of SelectorEngine.prev(t,SELECTOR_LINK_ITEMS))e.classList.add("active")}_clearActiveClass(e){e.classList.remove("active");const t=SelectorEngine.find("[href].active",e);for(const e of t)e.classList.remove("active")}static jQueryInterface(e){return this.each((function(){const t=ScrollSpy.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}EventHandler.on(window,EVENT_LOAD_DATA_API$1,(()=>{for(const e of SelectorEngine.find(SELECTOR_DATA_SPY))ScrollSpy.getOrCreateInstance(e)})),defineJQueryPlugin(ScrollSpy);const NAME$1="tab",DATA_KEY$1="bs.tab",EVENT_KEY$1=".bs.tab",EVENT_HIDE$1="hide.bs.tab",EVENT_HIDDEN$1="hidden.bs.tab",EVENT_SHOW$1="show.bs.tab",EVENT_SHOWN$1="shown.bs.tab",EVENT_CLICK_DATA_API="click.bs.tab",EVENT_KEYDOWN="keydown.bs.tab",EVENT_LOAD_DATA_API="load.bs.tab",ARROW_LEFT_KEY="ArrowLeft",ARROW_RIGHT_KEY="ArrowRight",ARROW_UP_KEY="ArrowUp",ARROW_DOWN_KEY="ArrowDown",CLASS_NAME_ACTIVE="active",CLASS_NAME_FADE$1="fade",CLASS_NAME_SHOW$1="show",CLASS_DROPDOWN="dropdown",SELECTOR_DROPDOWN_TOGGLE=".dropdown-toggle",SELECTOR_DROPDOWN_MENU=".dropdown-menu",NOT_SELECTOR_DROPDOWN_TOGGLE=":not(.dropdown-toggle)",SELECTOR_TAB_PANEL='.list-group, .nav, [role="tablist"]',SELECTOR_OUTER=".nav-item, .list-group-item",SELECTOR_INNER='.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle)',SELECTOR_DATA_TOGGLE='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',SELECTOR_INNER_ELEM=`${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`,SELECTOR_DATA_TOGGLE_ACTIVE='.active[data-bs-toggle="tab"], .active[data-bs-toggle="pill"], .active[data-bs-toggle="list"]';class Tab extends BaseComponent{constructor(e){super(e),this._parent=this._element.closest(SELECTOR_TAB_PANEL),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),EventHandler.on(this._element,EVENT_KEYDOWN,(e=>this._keydown(e))))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),n=t?EventHandler.trigger(t,EVENT_HIDE$1,{relatedTarget:e}):null;EventHandler.trigger(e,EVENT_SHOW$1,{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){e&&(e.classList.add("active"),this._activate(SelectorEngine.getElementFromSelector(e)),this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),EventHandler.trigger(e,EVENT_SHOWN$1,{relatedTarget:t})):e.classList.add("show")}),e,e.classList.contains("fade")))}_deactivate(e,t){e&&(e.classList.remove("active"),e.blur(),this._deactivate(SelectorEngine.getElementFromSelector(e)),this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),EventHandler.trigger(e,EVENT_HIDDEN$1,{relatedTarget:t})):e.classList.remove("show")}),e,e.classList.contains("fade")))}_keydown(e){if(![ARROW_LEFT_KEY,ARROW_RIGHT_KEY,ARROW_UP_KEY,ARROW_DOWN_KEY].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=[ARROW_RIGHT_KEY,ARROW_DOWN_KEY].includes(e.key),n=getNextActiveElement(this._getChildren().filter((e=>!isDisabled(e))),e.target,t,!0);n&&(n.focus({preventScroll:!0}),Tab.getOrCreateInstance(n).show())}_getChildren(){return SelectorEngine.find(SELECTOR_INNER_ELEM,this._parent)}_getActiveElem(){return this._getChildren().find((e=>this._elemIsActive(e)))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=SelectorEngine.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`#${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains("dropdown"))return;const i=(e,i)=>{const s=SelectorEngine.findOne(e,n);s&&s.classList.toggle(i,t)};i(".dropdown-toggle","active"),i(".dropdown-menu","show"),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains("active")}_getInnerElement(e){return e.matches(SELECTOR_INNER_ELEM)?e:SelectorEngine.findOne(SELECTOR_INNER_ELEM,e)}_getOuterElement(e){return e.closest(SELECTOR_OUTER)||e}static jQueryInterface(e){return this.each((function(){const t=Tab.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}EventHandler.on(document,"click.bs.tab",SELECTOR_DATA_TOGGLE,(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),isDisabled(this)||Tab.getOrCreateInstance(this).show()})),EventHandler.on(window,"load.bs.tab",(()=>{for(const e of SelectorEngine.find(SELECTOR_DATA_TOGGLE_ACTIVE))Tab.getOrCreateInstance(e)})),defineJQueryPlugin(Tab);const NAME="toast",DATA_KEY="bs.toast",EVENT_KEY=".bs.toast",EVENT_MOUSEOVER="mouseover.bs.toast",EVENT_MOUSEOUT="mouseout.bs.toast",EVENT_FOCUSIN="focusin.bs.toast",EVENT_FOCUSOUT="focusout.bs.toast",EVENT_HIDE="hide.bs.toast",EVENT_HIDDEN="hidden.bs.toast",EVENT_SHOW="show.bs.toast",EVENT_SHOWN="shown.bs.toast",CLASS_NAME_FADE="fade",CLASS_NAME_HIDE="hide",CLASS_NAME_SHOW="show",CLASS_NAME_SHOWING="showing",DefaultType={animation:"boolean",autohide:"boolean",delay:"number"},Default={animation:!0,autohide:!0,delay:5e3};class Toast extends BaseComponent{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Default}static get DefaultType(){return DefaultType}static get NAME(){return NAME}show(){EventHandler.trigger(this._element,EVENT_SHOW).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove("hide"),reflow(this._element),this._element.classList.add("show","showing"),this._queueCallback((()=>{this._element.classList.remove("showing"),EventHandler.trigger(this._element,EVENT_SHOWN),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(EventHandler.trigger(this._element,EVENT_HIDE).defaultPrevented||(this._element.classList.add("showing"),this._queueCallback((()=>{this._element.classList.add("hide"),this._element.classList.remove("showing","show"),EventHandler.trigger(this._element,EVENT_HIDDEN)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove("show"),super.dispose()}isShown(){return this._element.classList.contains("show")}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){EventHandler.on(this._element,EVENT_MOUSEOVER,(e=>this._onInteraction(e,!0))),EventHandler.on(this._element,EVENT_MOUSEOUT,(e=>this._onInteraction(e,!1))),EventHandler.on(this._element,EVENT_FOCUSIN,(e=>this._onInteraction(e,!0))),EventHandler.on(this._element,EVENT_FOCUSOUT,(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=Toast.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}enableDismissTrigger(Toast),defineJQueryPlugin(Toast);export{Alert,Button,Carousel,Collapse,Dropdown,Modal,Offcanvas,Popover,ScrollSpy,Tab,Toast,Tooltip};
//# sourceMappingURL=bootstrap.esm.min.js.map
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
/*!
* Bootstrap v5.3.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const s in t)if("default"!==s){const i=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>t[s]})}return e.default=t,Object.freeze(e)}const s=e(t),i="transitionend",n=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),o=t=>{t.dispatchEvent(new Event(i))},r=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),a=t=>r(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(n(t)):null,l=t=>{if(!r(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),s=t.closest("details:not([open])");if(!s)return e;if(s!==t){const e=t.closest("summary");if(e&&e.parentNode!==s)return!1;if(null===e)return!1}return e},c=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),h=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?h(t.parentNode):null},d=()=>{},u=t=>{t.offsetHeight},_=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,g=[],f=()=>"rtl"===document.documentElement.dir,m=t=>{var e;e=()=>{const e=_();if(e){const s=t.NAME,i=e.fn[s];e.fn[s]=t.jQueryInterface,e.fn[s].Constructor=t,e.fn[s].noConflict=()=>(e.fn[s]=i,t.jQueryInterface)}},"loading"===document.readyState?(g.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of g)t()})),g.push(e)):e()},p=(t,e=[],s=t)=>"function"==typeof t?t(...e):s,b=(t,e,s=!0)=>{if(!s)return void p(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:s}=window.getComputedStyle(t);const i=Number.parseFloat(e),n=Number.parseFloat(s);return i||n?(e=e.split(",")[0],s=s.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(s))):0})(e)+5;let r=!1;const a=({target:s})=>{s===e&&(r=!0,e.removeEventListener(i,a),p(t))};e.addEventListener(i,a),setTimeout((()=>{r||o(e)}),n)},v=(t,e,s,i)=>{const n=t.length;let o=t.indexOf(e);return-1===o?!s&&i?t[n-1]:t[0]:(o+=s?1:-1,i&&(o=(o+n)%n),t[Math.max(0,Math.min(o,n-1))])},y=/[^.]*(?=\..*)\.|.*/,w=/\..*/,A=/::\d+$/,E={};let C=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},k=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function S(t,e){return e&&`${e}::${C++}`||t.uidEvent||C++}function L(t){const e=S(t);return t.uidEvent=e,E[e]=E[e]||{},E[e]}function O(t,e,s=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===s))}function I(t,e,s){const i="string"==typeof e,n=i?s:e||s;let o=x(t);return k.has(o)||(o=t),[i,n,o]}function D(t,e,s,i,n){if("string"!=typeof e||!t)return;let[o,r,a]=I(e,s,i);if(e in T){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=L(t),c=l[a]||(l[a]={}),h=O(c,r,o?s:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=S(r,e.replace(y,"")),u=o?function(t,e,s){return function i(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return j(n,{delegateTarget:r}),i.oneOff&&M.off(t,n.type,e,s),s.apply(r,[n])}}(t,s,r):function(t,e){return function s(i){return j(i,{delegateTarget:t}),s.oneOff&&M.off(t,i.type,e),e.apply(t,[i])}}(t,r);u.delegationSelector=o?s:null,u.callable=r,u.oneOff=n,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function N(t,e,s,i,n){const o=O(e[s],i,n);o&&(t.removeEventListener(s,o,Boolean(n)),delete e[s][o.uidEvent])}function P(t,e,s,i){const n=e[s]||{};for(const[o,r]of Object.entries(n))o.includes(i)&&N(t,e,s,r.callable,r.delegationSelector)}function x(t){return t=t.replace(w,""),T[t]||t}const M={on(t,e,s,i){D(t,e,s,i,!1)},one(t,e,s,i){D(t,e,s,i,!0)},off(t,e,s,i){if("string"!=typeof e||!t)return;const[n,o,r]=I(e,s,i),a=r!==e,l=L(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const s of Object.keys(l))P(t,l,s,e.slice(1));for(const[s,i]of Object.entries(c)){const n=s.replace(A,"");a&&!e.includes(n)||N(t,l,r,i.callable,i.delegationSelector)}}else{if(!Object.keys(c).length)return;N(t,l,r,o,n?s:null)}},trigger(t,e,s){if("string"!=typeof e||!t)return null;const i=_();let n=null,o=!0,r=!0,a=!1;e!==x(e)&&i&&(n=i.Event(e,s),i(t).trigger(n),o=!n.isPropagationStopped(),r=!n.isImmediatePropagationStopped(),a=n.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=j(l,s),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&n&&n.preventDefault(),l}};function j(t,e={}){for(const[s,i]of Object.entries(e))try{t[s]=i}catch(e){Object.defineProperty(t,s,{configurable:!0,get:()=>i})}return t}const F=new Map,$={set(t,e,s){F.has(t)||F.set(t,new Map);const i=F.get(t);i.has(e)||0===i.size?i.set(e,s):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(t,e)=>F.has(t)&&F.get(t).get(e)||null,remove(t,e){if(!F.has(t))return;const s=F.get(t);s.delete(e),0===s.size&&F.delete(t)}};function z(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function H(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const B={setDataAttribute(t,e,s){t.setAttribute(`data-bs-${H(e)}`,s)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${H(e)}`)},getDataAttributes(t){if(!t)return{};const e={},s=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const i of s){let s=i.replace(/^bs/,"");s=s.charAt(0).toLowerCase()+s.slice(1,s.length),e[s]=z(t.dataset[i])}return e},getDataAttribute:(t,e)=>z(t.getAttribute(`data-bs-${H(e)}`))};class q{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const s=r(e)?B.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof s?s:{},...r(e)?B.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[i,n]of Object.entries(e)){const e=t[i],o=r(e)?"element":null==(s=e)?`${s}`:Object.prototype.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(n).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${o}" but expected type "${n}".`)}var s}}class W extends q{constructor(t,e){super(),(t=a(t))&&(this._element=t,this._config=this._getConfig(e),$.set(this._element,this.constructor.DATA_KEY,this))}dispose(){$.remove(this._element,this.constructor.DATA_KEY),M.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,s=!0){b(t,e,s)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return $.get(a(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.0-alpha1"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const R=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let s=t.getAttribute("href");if(!s||!s.includes("#")&&!s.startsWith("."))return null;s.includes("#")&&!s.startsWith("#")&&(s=`#${s.split("#")[1]}`),e=s&&"#"!==s?s.trim():null}return n(e)},V={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const s=[];let i=t.parentNode.closest(e);for(;i;)s.push(i),i=i.parentNode.closest(e);return s},prev(t,e){let s=t.previousElementSibling;for(;s;){if(s.matches(e))return[s];s=s.previousElementSibling}return[]},next(t,e){let s=t.nextElementSibling;for(;s;){if(s.matches(e))return[s];s=s.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!c(t)&&l(t)))},getSelectorFromElement(t){const e=R(t);return e&&V.findOne(e)?e:null},getElementFromSelector(t){const e=R(t);return e?V.findOne(e):null},getMultipleElementsFromSelector(t){const e=R(t);return e?V.find(e):[]}},K=(t,e="hide")=>{const s=`click.dismiss${t.EVENT_KEY}`,i=t.NAME;M.on(document,s,`[data-bs-dismiss="${i}"]`,(function(s){if(["A","AREA"].includes(this.tagName)&&s.preventDefault(),c(this))return;const n=V.getElementFromSelector(this)||this.closest(`.${i}`);t.getOrCreateInstance(n)[e]()}))};class Q extends W{static get NAME(){return"alert"}close(){if(M.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),M.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Q.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}K(Q,"close"),m(Q);const X='[data-bs-toggle="button"]';class Y extends W{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=Y.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}M.on(document,"click.bs.button.data-api",X,(t=>{t.preventDefault();const e=t.target.closest(X);Y.getOrCreateInstance(e).toggle()})),m(Y);const U={endCallback:null,leftCallback:null,rightCallback:null},G={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class J extends q{constructor(t,e){super(),this._element=t,t&&J.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return U}static get DefaultType(){return G}static get NAME(){return"swipe"}dispose(){M.off(this._element,".bs.swipe")}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),p(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&p(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(M.on(this._element,"pointerdown.bs.swipe",(t=>this._start(t))),M.on(this._element,"pointerup.bs.swipe",(t=>this._end(t))),this._element.classList.add("pointer-event")):(M.on(this._element,"touchstart.bs.swipe",(t=>this._start(t))),M.on(this._element,"touchmove.bs.swipe",(t=>this._move(t))),M.on(this._element,"touchend.bs.swipe",(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Z="next",tt="prev",et="left",st="right",it="slid.bs.carousel",nt="carousel",ot="active",rt={ArrowLeft:st,ArrowRight:et},at={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},lt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class ct extends W{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=V.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===nt&&this.cycle()}static get Default(){return at}static get DefaultType(){return lt}static get NAME(){return"carousel"}next(){this._slide(Z)}nextWhenVisible(){!document.hidden&&l(this._element)&&this.next()}prev(){this._slide(tt)}pause(){this._isSliding&&o(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?M.one(this._element,it,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void M.one(this._element,it,(()=>this.to(t)));const s=this._getItemIndex(this._getActive());if(s===t)return;const i=t>s?Z:tt;this._slide(i,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&M.on(this._element,"keydown.bs.carousel",(t=>this._keydown(t))),"hover"===this._config.pause&&(M.on(this._element,"mouseenter.bs.carousel",(()=>this.pause())),M.on(this._element,"mouseleave.bs.carousel",(()=>this._maybeEnableCycle()))),this._config.touch&&J.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of V.find(".carousel-item img",this._element))M.on(t,"dragstart.bs.carousel",(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(et)),rightCallback:()=>this._slide(this._directionToOrder(st)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new J(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=rt[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=V.findOne(".active",this._indicatorsElement);e.classList.remove(ot),e.removeAttribute("aria-current");const s=V.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);s&&(s.classList.add(ot),s.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const s=this._getActive(),i=t===Z,n=e||v(this._getItems(),s,i,this._config.wrap);if(n===s)return;const o=this._getItemIndex(n),r=e=>M.trigger(this._element,e,{relatedTarget:n,direction:this._orderToDirection(t),from:this._getItemIndex(s),to:o});if(r("slide.bs.carousel").defaultPrevented)return;if(!s||!n)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=n;const l=i?"carousel-item-start":"carousel-item-end",c=i?"carousel-item-next":"carousel-item-prev";n.classList.add(c),u(n),s.classList.add(l),n.classList.add(l),this._queueCallback((()=>{n.classList.remove(l,c),n.classList.add(ot),s.classList.remove(ot,c,l),this._isSliding=!1,r(it)}),s,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return V.findOne(".active.carousel-item",this._element)}_getItems(){return V.find(".carousel-item",this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return f()?t===et?tt:Z:t===et?Z:tt}_orderToDirection(t){return f()?t===tt?et:st:t===tt?st:et}static jQueryInterface(t){return this.each((function(){const e=ct.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}M.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",(function(t){const e=V.getElementFromSelector(this);if(!e||!e.classList.contains(nt))return;t.preventDefault();const s=ct.getOrCreateInstance(e),i=this.getAttribute("data-bs-slide-to");return i?(s.to(i),void s._maybeEnableCycle()):"next"===B.getDataAttribute(this,"slide")?(s.next(),void s._maybeEnableCycle()):(s.prev(),void s._maybeEnableCycle())})),M.on(window,"load.bs.carousel.data-api",(()=>{const t=V.find('[data-bs-ride="carousel"]');for(const e of t)ct.getOrCreateInstance(e)})),m(ct);const ht="show",dt="collapse",ut="collapsing",_t='[data-bs-toggle="collapse"]',gt={parent:null,toggle:!0},ft={parent:"(null|element)",toggle:"boolean"};class mt extends W{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const s=V.find(_t);for(const t of s){const e=V.getSelectorFromElement(t),s=V.find(e).filter((t=>t===this._element));null!==e&&s.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return gt}static get DefaultType(){return ft}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>mt.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(M.trigger(this._element,"show.bs.collapse").defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(dt),this._element.classList.add(ut),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const s=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(ut),this._element.classList.add(dt,ht),this._element.style[e]="",M.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[e]=`${this._element[s]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(M.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,u(this._element),this._element.classList.add(ut),this._element.classList.remove(dt,ht);for(const t of this._triggerArray){const e=V.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(ut),this._element.classList.add(dt),M.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(ht)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=a(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(_t);for(const e of t){const t=V.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=V.find(":scope .collapse .collapse",this._config.parent);return V.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const s of t)s.classList.toggle("collapsed",!e),s.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const s=mt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===s[t])throw new TypeError(`No method named "${t}"`);s[t]()}}))}}M.on(document,"click.bs.collapse.data-api",_t,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of V.getMultipleElementsFromSelector(this))mt.getOrCreateInstance(t,{toggle:!1}).toggle()})),m(mt);const pt="dropdown",bt="ArrowUp",vt="ArrowDown",yt="click.bs.dropdown.data-api",wt="keydown.bs.dropdown.data-api",At="show",Et='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Ct=`${Et}.show`,Tt=".dropdown-menu",kt=f()?"top-end":"top-start",St=f()?"top-start":"top-end",Lt=f()?"bottom-end":"bottom-start",Ot=f()?"bottom-start":"bottom-end",It=f()?"left-start":"right-start",Dt=f()?"right-start":"left-start",Nt={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Pt={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class xt extends W{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=V.next(this._element,Tt)[0]||V.prev(this._element,Tt)[0]||V.findOne(Tt,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Nt}static get DefaultType(){return Pt}static get NAME(){return pt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(c(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!M.trigger(this._element,"show.bs.dropdown",t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))M.on(t,"mouseover",d);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(At),this._element.classList.add(At),M.trigger(this._element,"shown.bs.dropdown",t)}}hide(){if(c(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!M.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))M.off(t,"mouseover",d);this._popper&&this._popper.destroy(),this._menu.classList.remove(At),this._element.classList.remove(At),this._element.setAttribute("aria-expanded","false"),B.removeDataAttribute(this._menu,"popper"),M.trigger(this._element,"hidden.bs.dropdown",t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!r(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${pt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===s)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:r(this._config.reference)?t=a(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=s.createPopper(t,this._menu,e)}_isShown(){return this._menu.classList.contains(At)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return It;if(t.classList.contains("dropstart"))return Dt;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?St:kt:e?Ot:Lt}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(B.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...p(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const s=V.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>l(t)));s.length&&v(s,e,t===vt,!s.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=xt.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=V.find(Ct);for(const s of e){const e=xt.getInstance(s);if(!e||!1===e._config.autoClose)continue;const i=t.composedPath(),n=i.includes(e._menu);if(i.includes(e._element)||"inside"===e._config.autoClose&&!n||"outside"===e._config.autoClose&&n)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),s="Escape"===t.key,i=[bt,vt].includes(t.key);if(!i&&!s)return;if(e&&!s)return;t.preventDefault();const n=this.matches(Et)?this:V.prev(this,Et)[0]||V.next(this,Et)[0]||V.findOne(Et,t.delegateTarget.parentNode),o=xt.getOrCreateInstance(n);if(i)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),n.focus())}}M.on(document,wt,Et,xt.dataApiKeydownHandler),M.on(document,wt,Tt,xt.dataApiKeydownHandler),M.on(document,yt,xt.clearMenus),M.on(document,"keyup.bs.dropdown.data-api",xt.clearMenus),M.on(document,yt,Et,(function(t){t.preventDefault(),xt.getOrCreateInstance(this).toggle()})),m(xt);const Mt=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",jt=".sticky-top",Ft="padding-right",$t="margin-right";class zt{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Ft,(e=>e+t)),this._setElementAttributes(Mt,Ft,(e=>e+t)),this._setElementAttributes(jt,$t,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Ft),this._resetElementAttributes(Mt,Ft),this._resetElementAttributes(jt,$t)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,s){const i=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+i)return;this._saveInitialAttribute(t,e);const n=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${s(Number.parseFloat(n))}px`)}))}_saveInitialAttribute(t,e){const s=t.style.getPropertyValue(e);s&&B.setDataAttribute(t,e,s)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const s=B.getDataAttribute(t,e);null!==s?(B.removeDataAttribute(t,e),t.style.setProperty(e,s)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(r(t))e(t);else for(const s of V.find(t,this._element))e(s)}}const Ht="show",Bt="mousedown.bs.backdrop",qt={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Wt={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Rt extends q{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return qt}static get DefaultType(){return Wt}static get NAME(){return"backdrop"}show(t){if(!this._config.isVisible)return void p(t);this._append();const e=this._getElement();this._config.isAnimated&&u(e),e.classList.add(Ht),this._emulateAnimation((()=>{p(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Ht),this._emulateAnimation((()=>{this.dispose(),p(t)}))):p(t)}dispose(){this._isAppended&&(M.off(this._element,Bt),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=a(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),M.on(t,Bt,(()=>{p(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){b(t,this._getElement(),this._config.isAnimated)}}const Vt=".bs.focustrap",Kt="backward",Qt={autofocus:!0,trapElement:null},Xt={autofocus:"boolean",trapElement:"element"};class Yt extends q{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Qt}static get DefaultType(){return Xt}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),M.off(document,Vt),M.on(document,"focusin.bs.focustrap",(t=>this._handleFocusin(t))),M.on(document,"keydown.tab.bs.focustrap",(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,M.off(document,Vt))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const s=V.focusableChildren(e);0===s.length?e.focus():this._lastTabNavDirection===Kt?s[s.length-1].focus():s[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Kt:"forward")}}const Ut="hidden.bs.modal",Gt="show.bs.modal",Jt="modal-open",Zt="show",te="modal-static",ee={backdrop:!0,focus:!0,keyboard:!0},se={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class ie extends W{constructor(t,e){super(t,e),this._dialog=V.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new zt,this._addEventListeners()}static get Default(){return ee}static get DefaultType(){return se}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||M.trigger(this._element,Gt,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Jt),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(M.trigger(this._element,"hide.bs.modal").defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Zt),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const t of[window,this._dialog])M.off(t,".bs.modal");this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Rt({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Yt({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=V.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),u(this._element),this._element.classList.add(Zt),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,M.trigger(this._element,"shown.bs.modal",{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){M.on(this._element,"keydown.dismiss.bs.modal",(t=>{if("Escape"===t.key)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),M.on(window,"resize.bs.modal",(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),M.on(this._element,"mousedown.dismiss.bs.modal",(t=>{M.one(this._element,"click.dismiss.bs.modal",(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Jt),this._resetAdjustments(),this._scrollBar.reset(),M.trigger(this._element,Ut)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(M.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(te)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(te),this._queueCallback((()=>{this._element.classList.remove(te),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),s=e>0;if(s&&!t){const t=f()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!s&&t){const t=f()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const s=ie.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===s[t])throw new TypeError(`No method named "${t}"`);s[t](e)}}))}}M.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){const e=V.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),M.one(e,Gt,(t=>{t.defaultPrevented||M.one(e,Ut,(()=>{l(this)&&this.focus()}))}));const s=V.findOne(".modal.show");s&&ie.getInstance(s).hide(),ie.getOrCreateInstance(e).toggle(this)})),K(ie),m(ie);const ne="show",oe="showing",re="hiding",ae=".offcanvas.show",le="hidePrevented.bs.offcanvas",ce="hidden.bs.offcanvas",he={backdrop:!0,keyboard:!0,scroll:!1},de={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class ue extends W{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return he}static get DefaultType(){return de}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||M.trigger(this._element,"show.bs.offcanvas",{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new zt).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(oe),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(ne),this._element.classList.remove(oe),M.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(M.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(re),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(ne,re),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new zt).reset(),M.trigger(this._element,ce)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Rt({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():M.trigger(this._element,le)}:null})}_initializeFocusTrap(){return new Yt({trapElement:this._element})}_addEventListeners(){M.on(this._element,"keydown.dismiss.bs.offcanvas",(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():M.trigger(this._element,le))}))}static jQueryInterface(t){return this.each((function(){const e=ue.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}M.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(t){const e=V.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this))return;M.one(e,ce,(()=>{l(this)&&this.focus()}));const s=V.findOne(ae);s&&s!==e&&ue.getInstance(s).hide(),ue.getOrCreateInstance(e).toggle(this)})),M.on(window,"load.bs.offcanvas.data-api",(()=>{for(const t of V.find(ae))ue.getOrCreateInstance(t).show()})),M.on(window,"resize.bs.offcanvas",(()=>{for(const t of V.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&ue.getOrCreateInstance(t).hide()})),K(ue),m(ue);const _e=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),ge=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,fe=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,me=(t,e)=>{const s=t.nodeName.toLowerCase();return e.includes(s)?!_e.has(s)||Boolean(ge.test(t.nodeValue)||fe.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(s)))},pe={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},be={allowList:pe,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},ve={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ye={entry:"(string|element|function|null)",selector:"(string|element)"};class we extends q{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return be}static get DefaultType(){return ve}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,s]of Object.entries(this._config.content))this._setContent(t,s,e);const e=t.children[0],s=this._resolvePossibleFunction(this._config.extraClass);return s&&e.classList.add(...s.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,s]of Object.entries(t))super._typeCheckConfig({selector:e,entry:s},ye)}_setContent(t,e,s){const i=V.findOne(s,t);i&&((e=this._resolvePossibleFunction(e))?r(e)?this._putElementInTemplate(a(e),i):this._config.html?i.innerHTML=this._maybeSanitize(e):i.textContent=e:i.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,s){if(!t.length)return t;if(s&&"function"==typeof s)return s(t);const i=(new window.DOMParser).parseFromString(t,"text/html"),n=[].concat(...i.body.querySelectorAll("*"));for(const t of n){const s=t.nodeName.toLowerCase();if(!Object.keys(e).includes(s)){t.remove();continue}const i=[].concat(...t.attributes),n=[].concat(e["*"]||[],e[s]||[]);for(const e of i)me(e,n)||t.removeAttribute(e.nodeName)}return i.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return p(t,[this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Ae=new Set(["sanitize","allowList","sanitizeFn"]),Ee="fade",Ce="show",Te=".modal",ke="hide.bs.modal",Se="hover",Le="focus",Oe={AUTO:"auto",TOP:"top",RIGHT:f()?"left":"right",BOTTOM:"bottom",LEFT:f()?"right":"left"},Ie={allowList:pe,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},De={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Ne extends W{constructor(t,e){if(void 0===s)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Ie}static get DefaultType(){return De}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),M.off(this._element.closest(Te),ke,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=M.trigger(this._element,this.constructor.eventName("show")),e=(h(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const s=this._getTipElement();this._element.setAttribute("aria-describedby",s.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(s),M.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(s),s.classList.add(Ce),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))M.on(t,"mouseover",d);this._queueCallback((()=>{M.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!M.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(Ce),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))M.off(t,"mouseover",d);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),M.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Ee,Ce),e.classList.add(`bs-${this.constructor.NAME}-auto`);const s=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",s),this._isAnimated()&&e.classList.add(Ee),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new we({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Ee)}_isShown(){return this.tip&&this.tip.classList.contains(Ce)}_createPopper(t){const e=p(this._config.placement,[this,t,this._element]),i=Oe[e.toUpperCase()];return s.createPopper(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return p(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...p(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)M.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===Se?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),s=e===Se?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");M.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Le:Se]=!0,e._enter()})),M.on(this._element,s,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Le:Se]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},M.on(this._element.closest(Te),ke,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=B.getDataAttributes(this._element);for(const t of Object.keys(e))Ae.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:a(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,s]of Object.entries(this._config))this.constructor.Default[e]!==s&&(t[e]=s);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=Ne.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}m(Ne);const Pe={...Ne.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},xe={...Ne.DefaultType,content:"(null|string|element|function)"};class Me extends Ne{static get Default(){return Pe}static get DefaultType(){return xe}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=Me.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}m(Me);const je="click.bs.scrollspy",Fe="active",$e="[href]",ze={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},He={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Be extends W{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return ze}static get DefaultType(){return He}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=a(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(M.off(this._config.target,je),M.on(this._config.target,je,$e,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const s=this._rootElement||window,i=e.offsetTop-this._element.offsetTop;if(s.scrollTo)return void s.scrollTo({top:i,behavior:"smooth"});s.scrollTop=i}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),s=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},i=(this._rootElement||document.documentElement).scrollTop,n=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(n&&t){if(s(o),!i)return}else n||t||s(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=V.find($e,this._config.target);for(const e of t){if(!e.hash||c(e))continue;const t=V.findOne(e.hash,this._element);l(t)&&(this._targetLinks.set(e.hash,e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Fe),this._activateParents(t),M.trigger(this._element,"activate.bs.scrollspy",{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))V.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Fe);else for(const e of V.parents(t,".nav, .list-group"))for(const t of V.prev(e,".nav-link, .nav-item > .nav-link, .list-group-item"))t.classList.add(Fe)}_clearActiveClass(t){t.classList.remove(Fe);const e=V.find("[href].active",t);for(const t of e)t.classList.remove(Fe)}static jQueryInterface(t){return this.each((function(){const e=Be.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}M.on(window,"load.bs.scrollspy.data-api",(()=>{for(const t of V.find('[data-bs-spy="scroll"]'))Be.getOrCreateInstance(t)})),m(Be);const qe="ArrowLeft",We="ArrowRight",Re="ArrowUp",Ve="ArrowDown",Ke="active",Qe="fade",Xe="show",Ye='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Ue=`.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle), ${Ye}`;class Ge extends W{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),M.on(this._element,"keydown.bs.tab",(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),s=e?M.trigger(e,"hide.bs.tab",{relatedTarget:t}):null;M.trigger(t,"show.bs.tab",{relatedTarget:e}).defaultPrevented||s&&s.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Ke),this._activate(V.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),M.trigger(t,"shown.bs.tab",{relatedTarget:e})):t.classList.add(Xe)}),t,t.classList.contains(Qe)))}_deactivate(t,e){t&&(t.classList.remove(Ke),t.blur(),this._deactivate(V.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),M.trigger(t,"hidden.bs.tab",{relatedTarget:e})):t.classList.remove(Xe)}),t,t.classList.contains(Qe)))}_keydown(t){if(![qe,We,Re,Ve].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[We,Ve].includes(t.key),s=v(this._getChildren().filter((t=>!c(t))),t.target,e,!0);s&&(s.focus({preventScroll:!0}),Ge.getOrCreateInstance(s).show())}_getChildren(){return V.find(Ue,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),s=this._getOuterElement(t);t.setAttribute("aria-selected",e),s!==t&&this._setAttributeIfNotExists(s,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=V.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}_toggleDropDown(t,e){const s=this._getOuterElement(t);if(!s.classList.contains("dropdown"))return;const i=(t,i)=>{const n=V.findOne(t,s);n&&n.classList.toggle(i,e)};i(".dropdown-toggle",Ke),i(".dropdown-menu",Xe),s.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,s){t.hasAttribute(e)||t.setAttribute(e,s)}_elemIsActive(t){return t.classList.contains(Ke)}_getInnerElement(t){return t.matches(Ue)?t:V.findOne(Ue,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=Ge.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}M.on(document,"click.bs.tab",Ye,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this)||Ge.getOrCreateInstance(this).show()})),M.on(window,"load.bs.tab",(()=>{for(const t of V.find('.active[data-bs-toggle="tab"], .active[data-bs-toggle="pill"], .active[data-bs-toggle="list"]'))Ge.getOrCreateInstance(t)})),m(Ge);const Je="hide",Ze="show",ts="showing",es={animation:"boolean",autohide:"boolean",delay:"number"},ss={animation:!0,autohide:!0,delay:5e3};class is extends W{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return ss}static get DefaultType(){return es}static get NAME(){return"toast"}show(){M.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Je),u(this._element),this._element.classList.add(Ze,ts),this._queueCallback((()=>{this._element.classList.remove(ts),M.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(M.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.add(ts),this._queueCallback((()=>{this._element.classList.add(Je),this._element.classList.remove(ts,Ze),M.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Ze),super.dispose()}isShown(){return this._element.classList.contains(Ze)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const s=t.relatedTarget;this._element===s||this._element.contains(s)||this._maybeScheduleHide()}_setListeners(){M.on(this._element,"mouseover.bs.toast",(t=>this._onInteraction(t,!0))),M.on(this._element,"mouseout.bs.toast",(t=>this._onInteraction(t,!1))),M.on(this._element,"focusin.bs.toast",(t=>this._onInteraction(t,!0))),M.on(this._element,"focusout.bs.toast",(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=is.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return K(is),m(is),{Alert:Q,Button:Y,Carousel:ct,Collapse:mt,Dropdown:xt,Modal:ie,Offcanvas:ue,Popover:Me,ScrollSpy:Be,Tab:Ge,Toast:is,Tooltip:Ne}}));
//# sourceMappingURL=bootstrap.min.js.map
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
const ingredientSearch = document.querySelector('#ingredient_search');
const selectedIngredients = document.querySelector('#selected_ingredients');
const cancelQuantityBtn = document.getElementById("cancel_quantity");
cancelQuantityBtn.onclick = function () {
$("#quantityModal").modal("hide");
};
const recipeForm = document.querySelector("form.my-form");
recipeForm.addEventListener("submit", function (event) {
const selectedIngredients = Array.from(document.querySelectorAll(".selected-ingredient"));
const ingredientsData = selectedIngredients.map((ingredientElem) => {
return {
id: ingredientElem.dataset.ingredientId,
amount: ingredientElem.querySelector(".ingredient-amount").textContent,
};
});
const hiddenInput = document.createElement("input");
hiddenInput.type = "hidden";
hiddenInput.name = "selected_ingredients";
hiddenInput.value = JSON.stringify(ingredientsData);
recipeForm.appendChild(hiddenInput);
});
// Array para almacenar palabras clave seleccionadas
let ingredients = [];
function searchIngredients(query) {
fetch('/search_ingredient', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Requested-With': 'XMLHttpRequest'
},
body: 'query=' + encodeURIComponent(query)
})
.then((response) => response.json())
.then((searchResults) => {
// Limpiar la lista de ingredientes coincidentes anterior
const ingredientsList = document.querySelector('#ingredients_list');
ingredientsList.innerHTML = '';
// Agregar ingredientes coincidentes a la lista desplegable
searchResults.forEach((ingredient) => {
const listItem = document.createElement('li');
listItem.classList.add('ingredient-item', 'd-flex', 'align-items-center', 'p-2', 'mb-1', 'bg-light', 'rounded');
const iconElement = document.createElement('img');
iconElement.setAttribute('src', '../imagenes/ingredientes/' + ingredient.icon);
iconElement.setAttribute('alt', ingredient.name + ' icon');
iconElement.classList.add('ingredient-icon', 'mr-2');
listItem.appendChild(iconElement);
const nameElement = document.createElement('span');
nameElement.textContent = ingredient.name;
nameElement.classList.add('ingredient-name', 'flex-grow-1');
listItem.appendChild(nameElement);
listItem.setAttribute('data-id', ingredient.id);
listItem.setAttribute('title', 'Haz clic para seleccionar ' + ingredient.name); // Añade información adicional al ingrediente
listItem.addEventListener('click', function () {
$("#quantityModal").modal("show");
const saveQuantityBtn = document.getElementById("save_quantity");
saveQuantityBtn.onclick = function () {
const quantity = document.getElementById("ingredient_quantity").value;
if (quantity) {
addIngredient(ingredient.name, ingredient.id, quantity, ingredient.icon);
$("#quantityModal").modal("hide");
document.getElementById("ingredient_quantity").value = "";
}
};
});
ingredientsList.appendChild(listItem);
});
});
}
// Función para agregar un ingrediente
function addIngredient(ingredientName, ingredientId, quantity, icon) {
// Agregar el ingrediente al array y actualizar el campo de selección
if (ingredientName && !ingredients.find(ing => ing.name === ingredientName)) {
ingredients.push({ name: ingredientName, id: ingredientId, quantity: quantity, icon: icon });
updateSelectedIngredients();
ingredientSearch.value = '';
}
}
// Función para eliminar una palabra clave
function removeIngredient(ingredient) {
// Eliminar la palabra clave del array y actualizar el campo de selección
ingredients = ingredients.filter(function (value) {
return value != ingredient;
});
updateSelectedIngredients();
}
// Función para actualizar el campo de selección de palabras clave
function updateSelectedIngredients() {
// Limpiar el campo de selección
selectedIngredients.innerHTML = '';
// Agregar cada ingrediente seleccionado al campo de selección
ingredients.forEach(function (ingredient) {
const ingredientElement = document.createElement('div');
ingredientElement.classList.add('selected-ingredient');
ingredientElement.setAttribute('data-ingredient-id', ingredient.id);
// Crear el elemento de imagen para el icono del ingrediente
const iconElement = document.createElement('img');
iconElement.classList.add('ingredient-icon');
iconElement.src = '../imagenes/ingredientes/' + ingredient.icon;
ingredientElement.appendChild(iconElement);
// Agregar el nombre del ingrediente y la cantidad
const ingredientNameAndQuantity = document.createElement('span');
ingredientNameAndQuantity.textContent = `${ingredient.name} (${ingredient.quantity})`;
ingredientNameAndQuantity.classList.add('ingredient-amount');
ingredientElement.appendChild(ingredientNameAndQuantity);
// Agregar el botón para eliminar el ingrediente
const removeBtn = document.createElement('button');
removeBtn.classList.add('btn', 'btn-danger', 'btn-sm');
removeBtn.textContent = 'x';
removeBtn.addEventListener('click', function () {
removeIngredient(ingredient);
});
ingredientElement.appendChild(removeBtn);
selectedIngredients.appendChild(ingredientElement);
});
}
// Agregar evento para agregar ingredientes cuando se presiona Enter en el campo de búsqueda
ingredientSearch.addEventListener('input', function (event) {
// Llamar a la función searchIngredients para buscar y mostrar ingredientes coincidentes
searchIngredients(event.target.value);
});
var inputPhoto = document.getElementById('photo');
var imageUploadContainer = document.querySelector('.image-upload-container');
inputPhoto.addEventListener('change', function (event) {
displayImagePreview(event.target.files[0]);
});
imageUploadContainer.addEventListener('dragover', function (event) {
event.preventDefault();
event.stopPropagation();
event.dataTransfer.dropEffect = 'copy';
});
imageUploadContainer.addEventListener('drop', function (event) {
event.preventDefault();
event.stopPropagation();
if (event.dataTransfer.files.length > 0) {
displayImagePreview(event.dataTransfer.files[0]);
inputPhoto.files = event.dataTransfer.files;
}
});
function displayImagePreview(file) {
var reader = new FileReader();
reader.onload = function () {
var output = document.getElementById('image-preview');
output.src = reader.result;
output.style.display = 'block';
}
reader.readAsDataURL(file);
}
document.getElementById('photo').addEventListener('change', function (event) {
var reader = new FileReader();
reader.onload = function () {
var output = document.getElementById('image-preview');
output.src = reader.result;
output.style.display = 'block';
}
reader.readAsDataURL(event.target.files[0]);
});
const signUpButton = document.getElementById('signUp');
const signInButton = document.getElementById('signIn');
const container = document.getElementById('container');
signUpButton.addEventListener('click', () => {
container.classList.add("right-panel-active");
});
signInButton.addEventListener('click', () => {
container.classList.remove("right-panel-active");
});
document.querySelector('form').addEventListener('submit', function(event) {
var passwordInput = document.querySelector('#password');
if (passwordInput.value.length <= 8) {
alert('La contraseña debe tener más de 8 caracteres');
event.preventDefault();
}
});
$("#signin-button").on("click", function(e){
e.preventDefault();
// Get form data
var formData = {
email: $('#email-form').val(),
password: $('#password-form').val()
};
$.ajax({
type: 'POST',
url: '/loginAjax',
data: formData,
dataType: 'json',
success: function(response) {
// Handle success response
console.log(response);
window.location.assign('/home');
},
error: function(xhr, status, error) {
// Handle error response
console.log(xhr.responseText);
$('.login-error').fadeIn(1000, function() {
// Fade out the error message after 2 seconds
setTimeout(function() {
$('.login-error').fadeOut();
}, 2000);
});
}
});
})
$("#signup-button").on("click", function(e){
e.preventDefault();
// Get form data
var formData = {
email: $('#email-register-form').val(),
password: $('#password-register-form').val(),
username: $('#username-register-form').val()
};
$.ajax({
type: 'POST',
url: '/registerAjax',
data: formData,
dataType: 'json',
success: function(response) {
// Handle success response
console.log(response);
window.location.assign('/home');
},
error: function(xhr, status, error) {
// Handle error response
var errorMessage = JSON.parse(xhr.responseText).text;
console.log("Error: " + errorMessage);
$('.register-error').text(errorMessage).fadeIn(1000, function() {
// Fade out the error message after 2 seconds
setTimeout(function() {
$('.register-error').fadeOut();
}, 2000);
});
}
});
})
(function () {
const recipesSearch = document.querySelector('#search-query');
function search_recipe(query) {
fetch('/search_recipe', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Requested-With': 'XMLHttpRequest'
},
body: 'query=' + encodeURIComponent(query)
})
.then((response) => response.json())
.then((searchResults) => {
// Limpiar la lista de recetas coincidentes anterior
const recipeList = document.querySelector('#recipe_list');
recipeList.innerHTML = '';
// Agregar recetas coincidentes a la lista desplegable
searchResults.forEach((recipe) => {
const listItem = document.createElement('li');
listItem.classList.add('recipe-item', 'd-flex', 'align-items-center', 'p-2', 'mb-1', 'bg-light', 'rounded');
const nameElement = document.createElement('span');
nameElement.textContent = recipe.name;
nameElement.classList.add('recipe-name', 'flex-grow-1');
listItem.appendChild(nameElement);
listItem.setAttribute('data-id', recipe.id);
listItem.setAttribute('title', 'Haz clic para seleccionar ' + recipe.name);
listItem.setAttribute('href', '/recipe/' + recipe.id);
listItem.addEventListener('click', function () {
window.location.href = this.getAttribute('href');
});
recipeList.appendChild(listItem);
});
});
}
// Agregar evento para ir a una receta cuando se seleccione
recipesSearch.addEventListener('input', function (event) {
// Llamar a la función search_recipe para buscar y mostrar recetas coincidentes
search_recipe(event.target.value);
});
recipesSearch.addEventListener('keydown', function (event) {
if (event.keyCode === 13) { // Verificar si la tecla presionada es Enter (código 13)
event.preventDefault(); // Prevenir el comportamiento predeterminado del Enter (enviar formulario, etc.)
const recipeList = document.querySelector('#recipe_list');
const firstRecipe = recipeList.querySelector('li'); // Obtener el primer elemento de la lista
if (firstRecipe) { // Verificar si hay al menos una receta en la lista
const recipeLink = firstRecipe.getAttribute('href');
if (recipeLink) {
window.location.href = recipeLink; // Redirigir a la primera receta
}
}
}
});
"use strict";
/**
* Easy selector helper function
*/
const select = (el, all = false) => {
el = el.trim()
if (all) {
return [...document.querySelectorAll(el)]
} else {
return document.querySelector(el)
}
}
/**
* Easy event listener function
*/
const on = (type, el, listener, all = false) => {
if (all) {
select(el, all).forEach(e => e.addEventListener(type, listener))
} else {
select(el, all).addEventListener(type, listener)
}
}
/**
* Easy on scroll event listener
*/
const onscroll = (el, listener) => {
el.addEventListener('scroll', listener)
}
/**
* Sidebar toggle
*/
if (select('.toggle-sidebar-btn')) {
on('click', '.toggle-sidebar-btn', function (e) {
select('body').classList.toggle('toggle-sidebar')
})
}
/**
* Search bar toggle
*/
if (select('.search-bar-toggle')) {
on('click', '.search-bar-toggle', function (e) {
select('.search-bar').classList.toggle('search-bar-show')
})
}
/**
* Navbar links active state on scroll
*/
let navbarlinks = select('#navbar .scrollto', true)
const navbarlinksActive = () => {
let position = window.scrollY + 200
navbarlinks.forEach(navbarlink => {
if (!navbarlink.hash) return
let section = select(navbarlink.hash)
if (!section) return
if (position >= section.offsetTop && position <= (section.offsetTop + section.offsetHeight)) {
navbarlink.classList.add('active')
} else {
navbarlink.classList.remove('active')
}
})
}
window.addEventListener('load', navbarlinksActive)
onscroll(document, navbarlinksActive)
/**
* Toggle .header-scrolled class to #header when page is scrolled
*/
let selectHeader = select('#header')
if (selectHeader) {
const headerScrolled = () => {
if (window.scrollY > 100) {
selectHeader.classList.add('header-scrolled')
} else {
selectHeader.classList.remove('header-scrolled')
}
}
window.addEventListener('load', headerScrolled)
onscroll(document, headerScrolled)
}
/**
* Back to top button
*/
let backtotop = select('.back-to-top')
if (backtotop) {
const toggleBacktotop = () => {
if (window.scrollY > 100) {
backtotop.classList.add('active')
} else {
backtotop.classList.remove('active')
}
}
window.addEventListener('load', toggleBacktotop)
onscroll(document, toggleBacktotop)
}
/**
* Initiate tooltips
*/
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
})
/**
* Initiate quill editors
*/
if (select('.quill-editor-default')) {
new Quill('.quill-editor-default', {
theme: 'snow'
});
}
if (select('.quill-editor-bubble')) {
new Quill('.quill-editor-bubble', {
theme: 'bubble'
});
}
if (select('.quill-editor-full')) {
new Quill(".quill-editor-full", {
modules: {
toolbar: [
[{
font: []
}, {
size: []
}],
["bold", "italic", "underline", "strike"],
[{
color: []
},
{
background: []
}
],
[{
script: "super"
},
{
script: "sub"
}
],
[{
list: "ordered"
},
{
list: "bullet"
},
{
indent: "-1"
},
{
indent: "+1"
}
],
["direction", {
align: []
}],
["link", "image", "video"],
["clean"]
]
},
theme: "snow"
});
}
/**
* Initiate TinyMCE Editor
*/
const useDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
const isSmallScreen = window.matchMedia('(max-width: 1023.5px)').matches;
tinymce.init({
selector: 'textarea.tinymce-editor',
plugins: 'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media template codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help charmap quickbars emoticons',
editimage_cors_hosts: ['picsum.photos'],
menubar: 'file edit view insert format tools table help',
toolbar: 'undo redo | bold italic underline strikethrough | fontfamily fontsize blocks | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview save print | insertfile image media template link anchor codesample | ltr rtl',
toolbar_sticky: true,
toolbar_sticky_offset: isSmallScreen ? 102 : 108,
autosave_ask_before_unload: true,
autosave_interval: '30s',
autosave_prefix: '{path}{query}-{id}-',
autosave_restore_when_empty: false,
autosave_retention: '2m',
image_advtab: true,
link_list: [{
title: 'My page 1',
value: 'https://www.tiny.cloud'
},
{
title: 'My page 2',
value: 'http://www.moxiecode.com'
}
],
image_list: [{
title: 'My page 1',
value: 'https://www.tiny.cloud'
},
{
title: 'My page 2',
value: 'http://www.moxiecode.com'
}
],
image_class_list: [{
title: 'None',
value: ''
},
{
title: 'Some class',
value: 'class-name'
}
],
importcss_append: true,
file_picker_callback: (callback, value, meta) => {
/* Provide file and text for the link dialog */
if (meta.filetype === 'file') {
callback('https://www.google.com/logos/google.jpg', {
text: 'My text'
});
}
/* Provide image and alt text for the image dialog */
if (meta.filetype === 'image') {
callback('https://www.google.com/logos/google.jpg', {
alt: 'My alt text'
});
}
/* Provide alternative source and posted for the media dialog */
if (meta.filetype === 'media') {
callback('movie.mp4', {
source2: 'alt.ogg',
poster: 'https://www.google.com/logos/google.jpg'
});
}
},
templates: [{
title: 'New Table',
description: 'creates a new table',
content: '<div class="mceTmpl"><table width="98%%" border="0" cellspacing="0" cellpadding="0"><tr><th scope="col"> </th><th scope="col"> </th></tr><tr><td> </td><td> </td></tr></table></div>'
},
{
title: 'Starting my story',
description: 'A cure for writers block',
content: 'Once upon a time...'
},
{
title: 'New list with dates',
description: 'New List with dates',
content: '<div class="mceTmpl"><span class="cdate">cdate</span><br><span class="mdate">mdate</span><h2>My List</h2><ul><li></li><li></li></ul></div>'
}
],
template_cdate_format: '[Date Created (CDATE): %m/%d/%Y : %H:%M:%S]',
template_mdate_format: '[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S]',
height: 600,
image_caption: true,
quickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable',
noneditable_class: 'mceNonEditable',
toolbar_mode: 'sliding',
contextmenu: 'link image table',
skin: useDarkMode ? 'oxide-dark' : 'oxide',
content_css: useDarkMode ? 'dark' : 'default',
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }'
});
/**
* Initiate Bootstrap validation check
*/
var needsValidation = document.querySelectorAll('.needs-validation')
Array.prototype.slice.call(needsValidation)
.forEach(function (form) {
form.addEventListener('submit', function (event) {
if (!form.checkValidity()) {
event.preventDefault()
event.stopPropagation()
}
form.classList.add('was-validated')
}, false)
})
/**
* Initiate Datatables
*/
const datatables = select('.datatable', true)
datatables.forEach(datatable => {
new simpleDatatables.DataTable(datatable);
})
/**
* Autoresize echart charts
*/
const mainContainer = select('#main');
if (mainContainer) {
setTimeout(() => {
new ResizeObserver(function () {
select('.echart', true).forEach(getEchart => {
echarts.getInstanceByDom(getEchart).resize();
})
}).observe(mainContainer);
}, 200);
}
})();
\ No newline at end of file
This diff could not be displayed because it is too large.
/**
* Template Name: NiceAdmin
* Updated: Mar 09 2023 with Bootstrap v5.2.3
* Template URL: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/
* Author: BootstrapMade.com
* License: https://bootstrapmade.com/license/
*/
(function() {
"use strict";
/**
* Easy selector helper function
*/
const select = (el, all = false) => {
el = el.trim()
if (all) {
return [...document.querySelectorAll(el)]
} else {
return document.querySelector(el)
}
}
/**
* Easy event listener function
*/
const on = (type, el, listener, all = false) => {
if (all) {
select(el, all).forEach(e => e.addEventListener(type, listener))
} else {
select(el, all).addEventListener(type, listener)
}
}
/**
* Easy on scroll event listener
*/
const onscroll = (el, listener) => {
el.addEventListener('scroll', listener)
}
/**
* Sidebar toggle
*/
if (select('.toggle-sidebar-btn')) {
on('click', '.toggle-sidebar-btn', function(e) {
select('body').classList.toggle('toggle-sidebar')
})
}
/**
* Search bar toggle
*/
if (select('.search-bar-toggle')) {
on('click', '.search-bar-toggle', function(e) {
select('.search-bar').classList.toggle('search-bar-show')
})
}
/**
* Navbar links active state on scroll
*/
let navbarlinks = select('#navbar .scrollto', true)
const navbarlinksActive = () => {
let position = window.scrollY + 200
navbarlinks.forEach(navbarlink => {
if (!navbarlink.hash) return
let section = select(navbarlink.hash)
if (!section) return
if (position >= section.offsetTop && position <= (section.offsetTop + section.offsetHeight)) {
navbarlink.classList.add('active')
} else {
navbarlink.classList.remove('active')
}
})
}
window.addEventListener('load', navbarlinksActive)
onscroll(document, navbarlinksActive)
/**
* Toggle .header-scrolled class to #header when page is scrolled
*/
let selectHeader = select('#header')
if (selectHeader) {
const headerScrolled = () => {
if (window.scrollY > 100) {
selectHeader.classList.add('header-scrolled')
} else {
selectHeader.classList.remove('header-scrolled')
}
}
window.addEventListener('load', headerScrolled)
onscroll(document, headerScrolled)
}
/**
* Back to top button
*/
let backtotop = select('.back-to-top')
if (backtotop) {
const toggleBacktotop = () => {
if (window.scrollY > 100) {
backtotop.classList.add('active')
} else {
backtotop.classList.remove('active')
}
}
window.addEventListener('load', toggleBacktotop)
onscroll(document, toggleBacktotop)
}
/**
* Initiate tooltips
*/
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
var tooltipList = tooltipTriggerList.map(function(tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
})
/**
* Initiate quill editors
*/
if (select('.quill-editor-default')) {
new Quill('.quill-editor-default', {
theme: 'snow'
});
}
if (select('.quill-editor-bubble')) {
new Quill('.quill-editor-bubble', {
theme: 'bubble'
});
}
if (select('.quill-editor-full')) {
new Quill(".quill-editor-full", {
modules: {
toolbar: [
[{
font: []
}, {
size: []
}],
["bold", "italic", "underline", "strike"],
[{
color: []
},
{
background: []
}
],
[{
script: "super"
},
{
script: "sub"
}
],
[{
list: "ordered"
},
{
list: "bullet"
},
{
indent: "-1"
},
{
indent: "+1"
}
],
["direction", {
align: []
}],
["link", "image", "video"],
["clean"]
]
},
theme: "snow"
});
}
/**
* Initiate TinyMCE Editor
*/
const useDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
const isSmallScreen = window.matchMedia('(max-width: 1023.5px)').matches;
tinymce.init({
selector: 'textarea.tinymce-editor',
plugins: 'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media template codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help charmap quickbars emoticons',
editimage_cors_hosts: ['picsum.photos'],
menubar: 'file edit view insert format tools table help',
toolbar: 'undo redo | bold italic underline strikethrough | fontfamily fontsize blocks | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview save print | insertfile image media template link anchor codesample | ltr rtl',
toolbar_sticky: true,
toolbar_sticky_offset: isSmallScreen ? 102 : 108,
autosave_ask_before_unload: true,
autosave_interval: '30s',
autosave_prefix: '{path}{query}-{id}-',
autosave_restore_when_empty: false,
autosave_retention: '2m',
image_advtab: true,
link_list: [{
title: 'My page 1',
value: 'https://www.tiny.cloud'
},
{
title: 'My page 2',
value: 'http://www.moxiecode.com'
}
],
image_list: [{
title: 'My page 1',
value: 'https://www.tiny.cloud'
},
{
title: 'My page 2',
value: 'http://www.moxiecode.com'
}
],
image_class_list: [{
title: 'None',
value: ''
},
{
title: 'Some class',
value: 'class-name'
}
],
importcss_append: true,
file_picker_callback: (callback, value, meta) => {
/* Provide file and text for the link dialog */
if (meta.filetype === 'file') {
callback('https://www.google.com/logos/google.jpg', {
text: 'My text'
});
}
/* Provide image and alt text for the image dialog */
if (meta.filetype === 'image') {
callback('https://www.google.com/logos/google.jpg', {
alt: 'My alt text'
});
}
/* Provide alternative source and posted for the media dialog */
if (meta.filetype === 'media') {
callback('movie.mp4', {
source2: 'alt.ogg',
poster: 'https://www.google.com/logos/google.jpg'
});
}
},
templates: [{
title: 'New Table',
description: 'creates a new table',
content: '<div class="mceTmpl"><table width="98%%" border="0" cellspacing="0" cellpadding="0"><tr><th scope="col"> </th><th scope="col"> </th></tr><tr><td> </td><td> </td></tr></table></div>'
},
{
title: 'Starting my story',
description: 'A cure for writers block',
content: 'Once upon a time...'
},
{
title: 'New list with dates',
description: 'New List with dates',
content: '<div class="mceTmpl"><span class="cdate">cdate</span><br><span class="mdate">mdate</span><h2>My List</h2><ul><li></li><li></li></ul></div>'
}
],
template_cdate_format: '[Date Created (CDATE): %m/%d/%Y : %H:%M:%S]',
template_mdate_format: '[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S]',
height: 600,
image_caption: true,
quickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable',
noneditable_class: 'mceNonEditable',
toolbar_mode: 'sliding',
contextmenu: 'link image table',
skin: useDarkMode ? 'oxide-dark' : 'oxide',
content_css: useDarkMode ? 'dark' : 'default',
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }'
});
/**
* Initiate Bootstrap validation check
*/
var needsValidation = document.querySelectorAll('.needs-validation')
Array.prototype.slice.call(needsValidation)
.forEach(function(form) {
form.addEventListener('submit', function(event) {
if (!form.checkValidity()) {
event.preventDefault()
event.stopPropagation()
}
form.classList.add('was-validated')
}, false)
})
/**
* Initiate Datatables
*/
const datatables = select('.datatable', true)
datatables.forEach(datatable => {
new simpleDatatables.DataTable(datatable);
})
/**
* Autoresize echart charts
*/
const mainContainer = select('#main');
if (mainContainer) {
setTimeout(() => {
new ResizeObserver(function() {
select('.echart', true).forEach(getEchart => {
echarts.getInstanceByDom(getEchart).resize();
})
}).observe(mainContainer);
}, 200);
}
})();
\ No newline at end of file
(function (f) { if (typeof exports === "object" && typeof module !== "undefined") { module.exports = f() } else if (typeof define === "function" && define.amd) { define([], f) } else { var g; if (typeof window !== "undefined") { g = window } else if (typeof global !== "undefined") { g = global } else if (typeof self !== "undefined") { g = self } else { g = this } g.simpleDatatables = f() } })(function () {
var define, module, exports; return (function () { function r(e, n, t) { function o(i, f) { if (!n[i]) { if (!e[i]) { var c = "function" == typeof require && require; if (!f && c) return c(i, !0); if (u) return u(i, !0); var a = new Error("Cannot find module '" + i + "'"); throw a.code = "MODULE_NOT_FOUND", a } var p = n[i] = { exports: {} }; e[i][0].call(p.exports, function (r) { var n = e[i][1][r]; return o(n || r) }, p, p.exports, r, e, n, t) } return n[i].exports } for (var u = "function" == typeof require && require, i = 0; i < t.length; i++)o(t[i]); return o } return r })()({
1: [function (require, module, exports) {
(function (global) {
(function () {
"use strict"; const t = t => "[object Object]" === Object.prototype.toString.call(t), e = e => { let s = !1; try { s = JSON.parse(e) } catch (t) { return !1 } return !(null === s || !Array.isArray(s) && !t(s)) && s }, s = (t, e) => { const s = document.createElement(t); if (e && "object" == typeof e) for (const t in e) "html" === t ? s.innerHTML = e[t] : s.setAttribute(t, e[t]); return s }, i = t => ["#text", "#comment"].includes(t.nodeName) ? t.data : t.childNodes ? t.childNodes.map((t => i(t))).join("") : "", n = function (t) { return t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;") }, a = function (t, e) { let s = 0, i = 0; for (; s < t + 1;) { e[i].hidden || (s += 1), i += 1 } return i - 1 }, o = function (t, e) { let s = t, i = 0; for (; i < t;) { e[t].hidden && (s -= 1), i++ } return s }; function r(t, e, s) { var i; return "#text" === t.nodeName ? i = s.document.createTextNode(t.data) : "#comment" === t.nodeName ? i = s.document.createComment(t.data) : (e ? i = s.document.createElementNS("http://www.w3.org/2000/svg", t.nodeName) : "svg" === t.nodeName.toLowerCase() ? (i = s.document.createElementNS("http://www.w3.org/2000/svg", "svg"), e = !0) : i = s.document.createElement(t.nodeName), t.attributes && Object.entries(t.attributes).forEach((function (t) { var e = t[0], s = t[1]; return i.setAttribute(e, s) })), t.childNodes && t.childNodes.forEach((function (t) { return i.appendChild(r(t, e, s)) })), s.valueDiffing && (t.value && (i instanceof HTMLButtonElement || i instanceof HTMLDataElement || i instanceof HTMLInputElement || i instanceof HTMLLIElement || i instanceof HTMLMeterElement || i instanceof HTMLOptionElement || i instanceof HTMLProgressElement || i instanceof HTMLParamElement) && (i.value = t.value), t.checked && i instanceof HTMLInputElement && (i.checked = t.checked), t.selected && i instanceof HTMLOptionElement && (i.selected = t.selected))), i } var l = function (t, e) { for (e = e.slice(); e.length > 0;) { var s = e.splice(0, 1)[0]; t = t.childNodes[s] } return t }; function d(t, e, s) { var i, n, a, o = e[s._const.action], d = e[s._const.route];[s._const.addElement, s._const.addTextElement].includes(o) || (i = l(t, d)); var c = { diff: e, node: i }; if (s.preDiffApply(c)) return !0; switch (o) { case s._const.addAttribute: if (!(i && i instanceof Element)) return !1; i.setAttribute(e[s._const.name], e[s._const.value]); break; case s._const.modifyAttribute: if (!(i && i instanceof Element)) return !1; i.setAttribute(e[s._const.name], e[s._const.newValue]), i instanceof HTMLInputElement && "value" === e[s._const.name] && (i.value = e[s._const.newValue]); break; case s._const.removeAttribute: if (!(i && i instanceof Element)) return !1; i.removeAttribute(e[s._const.name]); break; case s._const.modifyTextElement: if (!(i && i instanceof Text)) return !1; s.textDiff(i, i.data, e[s._const.oldValue], e[s._const.newValue]); break; case s._const.modifyValue: if (!i || void 0 === i.value) return !1; i.value = e[s._const.newValue]; break; case s._const.modifyComment: if (!(i && i instanceof Comment)) return !1; s.textDiff(i, i.data, e[s._const.oldValue], e[s._const.newValue]); break; case s._const.modifyChecked: if (!i || void 0 === i.checked) return !1; i.checked = e[s._const.newValue]; break; case s._const.modifySelected: if (!i || void 0 === i.selected) return !1; i.selected = e[s._const.newValue]; break; case s._const.replaceElement: i.parentNode.replaceChild(r(e[s._const.newValue], "svg" === e[s._const.newValue].nodeName.toLowerCase(), s), i); break; case s._const.relocateGroup: Array.apply(void 0, new Array(e[s._const.groupLength])).map((function () { return i.removeChild(i.childNodes[e[s._const.from]]) })).forEach((function (t, n) { 0 === n && (a = i.childNodes[e[s._const.to]]), i.insertBefore(t, a || null) })); break; case s._const.removeElement: i.parentNode.removeChild(i); break; case s._const.addElement: var h = (u = d.slice()).splice(u.length - 1, 1)[0]; if (!((i = l(t, u)) instanceof Element)) return !1; i.insertBefore(r(e[s._const.element], "http://www.w3.org/2000/svg" === i.namespaceURI, s), i.childNodes[h] || null); break; case s._const.removeTextElement: if (!i || 3 !== i.nodeType) return !1; i.parentNode.removeChild(i); break; case s._const.addTextElement: var u; if (h = (u = d.slice()).splice(u.length - 1, 1)[0], n = s.document.createTextNode(e[s._const.value]), !(i = l(t, u)).childNodes) return !1; i.insertBefore(n, i.childNodes[h] || null); break; default: console.log("unknown action") }return s.postDiffApply({ diff: c.diff, node: c.node, newNode: n }), !0 } function c(t, e, s) { var i = t[e]; t[e] = t[s], t[s] = i } var h = function (t) { var e = []; return e.push(t.nodeName), "#text" !== t.nodeName && "#comment" !== t.nodeName && t.attributes && (t.attributes.class && e.push("".concat(t.nodeName, ".").concat(t.attributes.class.replace(/ /g, "."))), t.attributes.id && e.push("".concat(t.nodeName, "#").concat(t.attributes.id))), e }, u = function (t) { var e = {}, s = {}; return t.forEach((function (t) { h(t).forEach((function (t) { var i = t in e; i || t in s ? i && (delete e[t], s[t] = !0) : e[t] = !0 })) })), e }, p = function (t, e) { var s = u(t), i = u(e), n = {}; return Object.keys(s).forEach((function (t) { i[t] && (n[t] = !0) })), n }, f = function (t) { return delete t.outerDone, delete t.innerDone, delete t.valueDone, !t.childNodes || t.childNodes.every(f) }, m = function (t) { if (Object.prototype.hasOwnProperty.call(t, "data")) return { nodeName: "#text" === t.nodeName ? "#text" : "#comment", data: t.data }; var e = { nodeName: t.nodeName }; return Object.prototype.hasOwnProperty.call(t, "attributes") && (e.attributes = t.attributes), Object.prototype.hasOwnProperty.call(t, "checked") && (e.checked = t.checked), Object.prototype.hasOwnProperty.call(t, "value") && (e.value = t.value), Object.prototype.hasOwnProperty.call(t, "selected") && (e.selected = t.selected), Object.prototype.hasOwnProperty.call(t, "childNodes") && (e.childNodes = t.childNodes.map((function (t) { return m(t) }))), e }, g = function (t, e) { if (!["nodeName", "value", "checked", "selected", "data"].every((function (s) { return t[s] === e[s] }))) return !1; if (Object.prototype.hasOwnProperty.call(t, "data")) return !0; if (Boolean(t.attributes) !== Boolean(e.attributes)) return !1; if (Boolean(t.childNodes) !== Boolean(e.childNodes)) return !1; if (t.attributes) { var s = Object.keys(t.attributes), i = Object.keys(e.attributes); if (s.length !== i.length) return !1; if (!s.every((function (s) { return t.attributes[s] === e.attributes[s] }))) return !1 } if (t.childNodes) { if (t.childNodes.length !== e.childNodes.length) return !1; if (!t.childNodes.every((function (t, s) { return g(t, e.childNodes[s]) }))) return !1 } return !0 }, b = function (t, e, s, i, n) { if (void 0 === n && (n = !1), !t || !e) return !1; if (t.nodeName !== e.nodeName) return !1; if (["#text", "#comment"].includes(t.nodeName)) return !!n || t.data === e.data; if (t.nodeName in s) return !0; if (t.attributes && e.attributes) { if (t.attributes.id) { if (t.attributes.id !== e.attributes.id) return !1; if ("".concat(t.nodeName, "#").concat(t.attributes.id) in s) return !0 } if (t.attributes.class && t.attributes.class === e.attributes.class && "".concat(t.nodeName, ".").concat(t.attributes.class.replace(/ /g, ".")) in s) return !0 } if (i) return !0; var a = t.childNodes ? t.childNodes.slice().reverse() : [], o = e.childNodes ? e.childNodes.slice().reverse() : []; if (a.length !== o.length) return !1; if (n) return a.every((function (t, e) { return t.nodeName === o[e].nodeName })); var r = p(a, o); return a.every((function (t, e) { return b(t, o[e], r, !0, !0) })) }, v = function (t, e) { return Array.apply(void 0, new Array(t)).map((function () { return e })) }, _ = function (t, e) { for (var s = t.childNodes ? t.childNodes : [], i = e.childNodes ? e.childNodes : [], n = v(s.length, !1), a = v(i.length, !1), o = [], r = function () { return arguments[1] }, l = !1, d = function () { var t = function (t, e, s, i) { var n = 0, a = [], o = t.length, r = e.length, l = Array.apply(void 0, new Array(o + 1)).map((function () { return [] })), d = p(t, e), c = o === r; c && t.some((function (t, s) { var i = h(t), n = h(e[s]); return i.length !== n.length ? (c = !1, !0) : (i.some((function (t, e) { if (t !== n[e]) return c = !1, !0 })), !c || void 0) })); for (var u = 0; u < o; u++)for (var f = t[u], m = 0; m < r; m++) { var g = e[m]; s[u] || i[m] || !b(f, g, d, c) ? l[u + 1][m + 1] = 0 : (l[u + 1][m + 1] = l[u][m] ? l[u][m] + 1 : 1, l[u + 1][m + 1] >= n && (n = l[u + 1][m + 1], a = [u + 1, m + 1])) } return 0 !== n && { oldValue: a[0] - n, newValue: a[1] - n, length: n } }(s, i, n, a); t ? (o.push(t), Array.apply(void 0, new Array(t.length)).map(r).forEach((function (e) { return function (t, e, s, i) { t[s.oldValue + i] = !0, e[s.newValue + i] = !0 }(n, a, t, e) }))) : l = !0 }; !l;)d(); return t.subsets = o, t.subsetsAge = 100, o }, w = function () { function t() { this.list = [] } return t.prototype.add = function (t) { var e; (e = this.list).push.apply(e, t) }, t.prototype.forEach = function (t) { this.list.forEach((function (e) { return t(e) })) }, t }(), y = function () { function t(t) { void 0 === t && (t = {}); var e = this; Object.entries(t).forEach((function (t) { var s = t[0], i = t[1]; return e[s] = i })) } return t.prototype.toString = function () { return JSON.stringify(this) }, t.prototype.setValue = function (t, e) { return this[t] = e, this }, t }(); function x(t, e) { var s, i, n = t; for (e = e.slice(); e.length > 0;)i = e.splice(0, 1)[0], s = n, n = n.childNodes ? n.childNodes[i] : void 0; return { node: n, parentNode: s, nodeIndex: i } } function N(t, e, s) { return e.forEach((function (e) { !function (t, e, s) { var i, n, a, o; if (![s._const.addElement, s._const.addTextElement].includes(e[s._const.action])) { var r = x(t, e[s._const.route]); n = r.node, a = r.parentNode, o = r.nodeIndex } var l, d, c = [], h = { diff: e, node: n }; if (s.preVirtualDiffApply(h)) return !0; switch (e[s._const.action]) { case s._const.addAttribute: n.attributes || (n.attributes = {}), n.attributes[e[s._const.name]] = e[s._const.value], "checked" === e[s._const.name] ? n.checked = !0 : "selected" === e[s._const.name] ? n.selected = !0 : "INPUT" === n.nodeName && "value" === e[s._const.name] && (n.value = e[s._const.value]); break; case s._const.modifyAttribute: n.attributes[e[s._const.name]] = e[s._const.newValue]; break; case s._const.removeAttribute: delete n.attributes[e[s._const.name]], 0 === Object.keys(n.attributes).length && delete n.attributes, "checked" === e[s._const.name] ? n.checked = !1 : "selected" === e[s._const.name] ? delete n.selected : "INPUT" === n.nodeName && "value" === e[s._const.name] && delete n.value; break; case s._const.modifyTextElement: n.data = e[s._const.newValue]; break; case s._const.modifyValue: n.value = e[s._const.newValue]; break; case s._const.modifyComment: n.data = e[s._const.newValue]; break; case s._const.modifyChecked: n.checked = e[s._const.newValue]; break; case s._const.modifySelected: n.selected = e[s._const.newValue]; break; case s._const.replaceElement: l = e[s._const.newValue], a.childNodes[o] = l; break; case s._const.relocateGroup: n.childNodes.splice(e[s._const.from], e[s._const.groupLength]).reverse().forEach((function (t) { return n.childNodes.splice(e[s._const.to], 0, t) })), n.subsets && n.subsets.forEach((function (t) { if (e[s._const.from] < e[s._const.to] && t.oldValue <= e[s._const.to] && t.oldValue > e[s._const.from]) t.oldValue -= e[s._const.groupLength], (i = t.oldValue + t.length - e[s._const.to]) > 0 && (c.push({ oldValue: e[s._const.to] + e[s._const.groupLength], newValue: t.newValue + t.length - i, length: i }), t.length -= i); else if (e[s._const.from] > e[s._const.to] && t.oldValue > e[s._const.to] && t.oldValue < e[s._const.from]) { var i; t.oldValue += e[s._const.groupLength], (i = t.oldValue + t.length - e[s._const.to]) > 0 && (c.push({ oldValue: e[s._const.to] + e[s._const.groupLength], newValue: t.newValue + t.length - i, length: i }), t.length -= i) } else t.oldValue === e[s._const.from] && (t.oldValue = e[s._const.to]) })); break; case s._const.removeElement: a.childNodes.splice(o, 1), a.subsets && a.subsets.forEach((function (t) { t.oldValue > o ? t.oldValue -= 1 : t.oldValue === o ? t.delete = !0 : t.oldValue < o && t.oldValue + t.length > o && (t.oldValue + t.length - 1 === o ? t.length-- : (c.push({ newValue: t.newValue + o - t.oldValue, oldValue: o, length: t.length - o + t.oldValue - 1 }), t.length = o - t.oldValue)) })), n = a; break; case s._const.addElement: var u = (d = e[s._const.route].slice()).splice(d.length - 1, 1)[0]; n = null === (i = x(t, d)) || void 0 === i ? void 0 : i.node, l = e[s._const.element], n.childNodes || (n.childNodes = []), u >= n.childNodes.length ? n.childNodes.push(l) : n.childNodes.splice(u, 0, l), n.subsets && n.subsets.forEach((function (t) { if (t.oldValue >= u) t.oldValue += 1; else if (t.oldValue < u && t.oldValue + t.length > u) { var e = t.oldValue + t.length - u; c.push({ newValue: t.newValue + t.length - e, oldValue: u + 1, length: e }), t.length -= e } })); break; case s._const.removeTextElement: a.childNodes.splice(o, 1), "TEXTAREA" === a.nodeName && delete a.value, a.subsets && a.subsets.forEach((function (t) { t.oldValue > o ? t.oldValue -= 1 : t.oldValue === o ? t.delete = !0 : t.oldValue < o && t.oldValue + t.length > o && (t.oldValue + t.length - 1 === o ? t.length-- : (c.push({ newValue: t.newValue + o - t.oldValue, oldValue: o, length: t.length - o + t.oldValue - 1 }), t.length = o - t.oldValue)) })), n = a; break; case s._const.addTextElement: var p = (d = e[s._const.route].slice()).splice(d.length - 1, 1)[0]; (l = {}).nodeName = "#text", l.data = e[s._const.value], (n = x(t, d).node).childNodes || (n.childNodes = []), p >= n.childNodes.length ? n.childNodes.push(l) : n.childNodes.splice(p, 0, l), "TEXTAREA" === n.nodeName && (n.value = e[s._const.newValue]), n.subsets && n.subsets.forEach((function (t) { if (t.oldValue >= p && (t.oldValue += 1), t.oldValue < p && t.oldValue + t.length > p) { var e = t.oldValue + t.length - p; c.push({ newValue: t.newValue + t.length - e, oldValue: p + 1, length: e }), t.length -= e } })); break; default: console.log("unknown action") }n.subsets && (n.subsets = n.subsets.filter((function (t) { return !t.delete && t.oldValue !== t.newValue })), c.length && (n.subsets = n.subsets.concat(c))), s.postVirtualDiffApply({ node: h.node, diff: h.diff, newNode: l }) }(t, e, s) })), !0 } function D(t, e) { void 0 === e && (e = {}); var s = { nodeName: t.nodeName }; return t instanceof Text || t instanceof Comment ? s.data = t.data : (t.attributes && t.attributes.length > 0 && (s.attributes = {}, Array.prototype.slice.call(t.attributes).forEach((function (t) { return s.attributes[t.name] = t.value }))), t instanceof HTMLTextAreaElement ? s.value = t.value : t.childNodes && t.childNodes.length > 0 && (s.childNodes = [], Array.prototype.slice.call(t.childNodes).forEach((function (t) { return s.childNodes.push(D(t, e)) }))), e.valueDiffing && (t instanceof HTMLInputElement && ["radio", "checkbox"].includes(t.type.toLowerCase()) && void 0 !== t.checked ? s.checked = t.checked : (t instanceof HTMLButtonElement || t instanceof HTMLDataElement || t instanceof HTMLInputElement || t instanceof HTMLLIElement || t instanceof HTMLMeterElement || t instanceof HTMLOptionElement || t instanceof HTMLProgressElement || t instanceof HTMLParamElement) && (s.value = t.value), t instanceof HTMLOptionElement && (s.selected = t.selected))), s } var M = /<\s*\/*[a-zA-Z:_][a-zA-Z0-9:_\-.]*\s*(?:"[^"]*"['"]*|'[^']*'['"]*|[^'"/>])*\/*\s*>|<!--(?:.|\n|\r)*?-->/g, E = Object.create ? Object.create(null) : {}, O = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g; function V(t) { return t.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&") } var $ = { area: !0, base: !0, br: !0, col: !0, embed: !0, hr: !0, img: !0, input: !0, keygen: !0, link: !0, menuItem: !0, meta: !0, param: !0, source: !0, track: !0, wbr: !0 }, C = function (t) { var e = { nodeName: "", attributes: {} }, s = !1, i = t.match(/<\/?([^\s]+?)[/\s>]/); if (i && (e.nodeName = i[1].toUpperCase(), ($[i[1]] || "/" === t.charAt(t.length - 2)) && (s = !0), e.nodeName.startsWith("!--"))) { var n = t.indexOf("--\x3e"); return { type: "comment", node: { nodeName: "#comment", data: -1 !== n ? t.slice(4, n) : "" }, voidElement: s } } for (var a = new RegExp(O), o = null, r = !1; !r;)if (null === (o = a.exec(t))) r = !0; else if (o[0].trim()) if (o[1]) { var l = o[1].trim(), d = [l, ""]; l.indexOf("=") > -1 && (d = l.split("=")), e.attributes[d[0]] = d[1], a.lastIndex-- } else o[2] && (e.attributes[o[2]] = o[3].trim().substring(1, o[3].length - 1)); return { type: "tag", node: e, voidElement: s } }, L = function (t, e) { void 0 === e && (e = { components: E }); var s, i = [], n = -1, a = [], o = !1; if (0 !== t.indexOf("<")) { var r = t.indexOf("<"); i.push({ nodeName: "#text", data: -1 === r ? t : t.substring(0, r) }) } return t.replace(M, (function (r, l) { if (o) { if (r !== "</".concat(s.node.nodeName, ">")) return ""; o = !1 } var d = "/" !== r.charAt(1), c = r.startsWith("\x3c!--"), h = l + r.length, u = t.charAt(h); if (c) { var p = C(r).node; if (n < 0) return i.push(p), ""; var f = a[n]; return f && p.nodeName && (f.node.childNodes || (f.node.childNodes = []), f.node.childNodes.push(p)), "" } if (d) { s = C(r), n++, "tag" === s.type && e.components[s.node.nodeName] && (s.type = "component", o = !0), s.voidElement || o || !u || "<" === u || (s.node.childNodes || (s.node.childNodes = []), s.node.childNodes.push({ nodeName: "#text", data: V(t.slice(h, t.indexOf("<", h))) })), 0 === n && s.node.nodeName && i.push(s.node); var m = a[n - 1]; m && s.node.nodeName && (m.node.childNodes || (m.node.childNodes = []), m.node.childNodes.push(s.node)), a[n] = s } if ((!d || s.voidElement) && (n > -1 && (s.voidElement || s.node.nodeName === r.slice(2, -1).toUpperCase()) && --n > -1 && (s = a[n]), !o && "<" !== u && u)) { var g = -1 === n ? i : a[n].node.childNodes || [], b = t.indexOf("<", h), v = V(t.slice(h, -1 === b ? void 0 : b)); g.push({ nodeName: "#text", data: v }) } return "" })), i[0] }, S = function () { function t(t, e, s) { this.options = s, this.t1 = "undefined" != typeof Element && t instanceof Element ? D(t, this.options) : "string" == typeof t ? L(t, this.options) : JSON.parse(JSON.stringify(t)), this.t2 = "undefined" != typeof Element && e instanceof Element ? D(e, this.options) : "string" == typeof e ? L(e, this.options) : JSON.parse(JSON.stringify(e)), this.diffcount = 0, this.foundAll = !1, this.debug && (this.t1Orig = "undefined" != typeof Element && t instanceof Element ? D(t, this.options) : "string" == typeof t ? L(t, this.options) : JSON.parse(JSON.stringify(t)), this.t2Orig = "undefined" != typeof Element && e instanceof Element ? D(e, this.options) : "string" == typeof e ? L(e, this.options) : JSON.parse(JSON.stringify(e))), this.tracker = new w } return t.prototype.init = function () { return this.findDiffs(this.t1, this.t2) }, t.prototype.findDiffs = function (t, e) { var s; do { if (this.options.debug && (this.diffcount += 1, this.diffcount > this.options.diffcap)) throw new Error("surpassed diffcap:".concat(JSON.stringify(this.t1Orig), " -> ").concat(JSON.stringify(this.t2Orig))); 0 === (s = this.findNextDiff(t, e, [])).length && (g(t, e) || (this.foundAll ? console.error("Could not find remaining diffs!") : (this.foundAll = !0, f(t), s = this.findNextDiff(t, e, [])))), s.length > 0 && (this.foundAll = !1, this.tracker.add(s), N(t, s, this.options)) } while (s.length > 0); return this.tracker.list }, t.prototype.findNextDiff = function (t, e, s) { var i, n; if (this.options.maxDepth && s.length > this.options.maxDepth) return []; if (!t.outerDone) { if (i = this.findOuterDiff(t, e, s), this.options.filterOuterDiff && (n = this.options.filterOuterDiff(t, e, i)) && (i = n), i.length > 0) return t.outerDone = !0, i; t.outerDone = !0 } if (Object.prototype.hasOwnProperty.call(t, "data")) return []; if (!t.innerDone) { if ((i = this.findInnerDiff(t, e, s)).length > 0) return i; t.innerDone = !0 } if (this.options.valueDiffing && !t.valueDone) { if ((i = this.findValueDiff(t, e, s)).length > 0) return t.valueDone = !0, i; t.valueDone = !0 } return [] }, t.prototype.findOuterDiff = function (t, e, s) { var i, n, a, o, r, l, d = []; if (t.nodeName !== e.nodeName) { if (!s.length) throw new Error("Top level nodes have to be of the same kind."); return [(new y).setValue(this.options._const.action, this.options._const.replaceElement).setValue(this.options._const.oldValue, m(t)).setValue(this.options._const.newValue, m(e)).setValue(this.options._const.route, s)] } if (s.length && this.options.diffcap < Math.abs((t.childNodes || []).length - (e.childNodes || []).length)) return [(new y).setValue(this.options._const.action, this.options._const.replaceElement).setValue(this.options._const.oldValue, m(t)).setValue(this.options._const.newValue, m(e)).setValue(this.options._const.route, s)]; if (Object.prototype.hasOwnProperty.call(t, "data") && t.data !== e.data) return "#text" === t.nodeName ? [(new y).setValue(this.options._const.action, this.options._const.modifyTextElement).setValue(this.options._const.route, s).setValue(this.options._const.oldValue, t.data).setValue(this.options._const.newValue, e.data)] : [(new y).setValue(this.options._const.action, this.options._const.modifyComment).setValue(this.options._const.route, s).setValue(this.options._const.oldValue, t.data).setValue(this.options._const.newValue, e.data)]; for (n = t.attributes ? Object.keys(t.attributes).sort() : [], a = e.attributes ? Object.keys(e.attributes).sort() : [], o = n.length, l = 0; l < o; l++)i = n[l], -1 === (r = a.indexOf(i)) ? d.push((new y).setValue(this.options._const.action, this.options._const.removeAttribute).setValue(this.options._const.route, s).setValue(this.options._const.name, i).setValue(this.options._const.value, t.attributes[i])) : (a.splice(r, 1), t.attributes[i] !== e.attributes[i] && d.push((new y).setValue(this.options._const.action, this.options._const.modifyAttribute).setValue(this.options._const.route, s).setValue(this.options._const.name, i).setValue(this.options._const.oldValue, t.attributes[i]).setValue(this.options._const.newValue, e.attributes[i]))); for (o = a.length, l = 0; l < o; l++)i = a[l], d.push((new y).setValue(this.options._const.action, this.options._const.addAttribute).setValue(this.options._const.route, s).setValue(this.options._const.name, i).setValue(this.options._const.value, e.attributes[i])); return d }, t.prototype.findInnerDiff = function (t, e, s) { var i = t.childNodes ? t.childNodes.slice() : [], n = e.childNodes ? e.childNodes.slice() : [], a = Math.max(i.length, n.length), o = Math.abs(i.length - n.length), r = [], l = 0; if (!this.options.maxChildCount || a < this.options.maxChildCount) { var d = Boolean(t.subsets && t.subsetsAge--), c = d ? t.subsets : t.childNodes && e.childNodes ? _(t, e) : []; if (c.length > 0 && (r = this.attemptGroupRelocation(t, e, c, s, d)).length > 0) return r } for (var h = 0; h < a; h += 1) { var u = i[h], p = n[h]; if (o && (u && !p ? "#text" === u.nodeName ? (r.push((new y).setValue(this.options._const.action, this.options._const.removeTextElement).setValue(this.options._const.route, s.concat(l)).setValue(this.options._const.value, u.data)), l -= 1) : (r.push((new y).setValue(this.options._const.action, this.options._const.removeElement).setValue(this.options._const.route, s.concat(l)).setValue(this.options._const.element, m(u))), l -= 1) : p && !u && ("#text" === p.nodeName ? r.push((new y).setValue(this.options._const.action, this.options._const.addTextElement).setValue(this.options._const.route, s.concat(l)).setValue(this.options._const.value, p.data)) : r.push((new y).setValue(this.options._const.action, this.options._const.addElement).setValue(this.options._const.route, s.concat(l)).setValue(this.options._const.element, m(p))))), u && p) if (!this.options.maxChildCount || a < this.options.maxChildCount) r = r.concat(this.findNextDiff(u, p, s.concat(l))); else if (!g(u, p)) if (i.length > n.length) "#text" === u.nodeName ? r.push((new y).setValue(this.options._const.action, this.options._const.removeTextElement).setValue(this.options._const.route, s.concat(l)).setValue(this.options._const.value, u.data)) : r.push((new y).setValue(this.options._const.action, this.options._const.removeElement).setValue(this.options._const.element, m(u)).setValue(this.options._const.route, s.concat(l))), i.splice(h, 1), h -= 1, l -= 1, o -= 1; else if (i.length < n.length) { var f = m(p); r = r.concat([(new y).setValue(this.options._const.action, this.options._const.addElement).setValue(this.options._const.element, f).setValue(this.options._const.route, s.concat(l))]), i.splice(h, 0, f), o -= 1 } else r = r.concat([(new y).setValue(this.options._const.action, this.options._const.replaceElement).setValue(this.options._const.oldValue, m(u)).setValue(this.options._const.newValue, m(p)).setValue(this.options._const.route, s.concat(l))]); l += 1 } return t.innerDone = !0, r }, t.prototype.attemptGroupRelocation = function (t, e, s, i, n) { for (var a, o, r, l, d, c, h = function (t, e, s) { var i = t.childNodes ? v(t.childNodes.length, !0) : [], n = e.childNodes ? v(e.childNodes.length, !0) : [], a = 0; return s.forEach((function (t) { for (var e = t.oldValue + t.length, s = t.newValue + t.length, o = t.oldValue; o < e; o += 1)i[o] = a; for (o = t.newValue; o < s; o += 1)n[o] = a; a += 1 })), { gaps1: i, gaps2: n } }(t, e, s), u = h.gaps1, p = h.gaps2, f = Math.min(u.length, p.length), g = [], _ = 0, w = 0; _ < f; w += 1, _ += 1)if (!n || !0 !== u[_] && !0 !== p[_]) if (!0 === u[_]) if ("#text" === (l = t.childNodes[w]).nodeName) if ("#text" === e.childNodes[_].nodeName) { if (l.data !== e.childNodes[_].data) { for (c = w; t.childNodes.length > c + 1 && "#text" === t.childNodes[c + 1].nodeName;)if (c += 1, e.childNodes[_].data === t.childNodes[c].data) { d = !0; break } if (!d) return g.push((new y).setValue(this.options._const.action, this.options._const.modifyTextElement).setValue(this.options._const.route, i.concat(_)).setValue(this.options._const.oldValue, l.data).setValue(this.options._const.newValue, e.childNodes[_].data)), g } } else g.push((new y).setValue(this.options._const.action, this.options._const.removeTextElement).setValue(this.options._const.route, i.concat(_)).setValue(this.options._const.value, l.data)), u.splice(_, 1), f = Math.min(u.length, p.length), _ -= 1; else g.push((new y).setValue(this.options._const.action, this.options._const.removeElement).setValue(this.options._const.route, i.concat(_)).setValue(this.options._const.element, m(l))), u.splice(_, 1), f = Math.min(u.length, p.length), _ -= 1; else if (!0 === p[_]) "#text" === (l = e.childNodes[_]).nodeName ? (g.push((new y).setValue(this.options._const.action, this.options._const.addTextElement).setValue(this.options._const.route, i.concat(_)).setValue(this.options._const.value, l.data)), u.splice(_, 0, !0), f = Math.min(u.length, p.length), w -= 1) : (g.push((new y).setValue(this.options._const.action, this.options._const.addElement).setValue(this.options._const.route, i.concat(_)).setValue(this.options._const.element, m(l))), u.splice(_, 0, !0), f = Math.min(u.length, p.length), w -= 1); else if (u[_] !== p[_]) { if (g.length > 0) return g; if (r = s[u[_]], (o = Math.min(r.newValue, t.childNodes.length - r.length)) !== r.oldValue) { a = !1; for (var x = 0; x < r.length; x += 1)b(t.childNodes[o + x], t.childNodes[r.oldValue + x], {}, !1, !0) || (a = !0); if (a) return [(new y).setValue(this.options._const.action, this.options._const.relocateGroup).setValue(this.options._const.groupLength, r.length).setValue(this.options._const.from, r.oldValue).setValue(this.options._const.to, o).setValue(this.options._const.route, i)] } } return g }, t.prototype.findValueDiff = function (t, e, s) { var i = []; return t.selected !== e.selected && i.push((new y).setValue(this.options._const.action, this.options._const.modifySelected).setValue(this.options._const.oldValue, t.selected).setValue(this.options._const.newValue, e.selected).setValue(this.options._const.route, s)), (t.value || e.value) && t.value !== e.value && "OPTION" !== t.nodeName && i.push((new y).setValue(this.options._const.action, this.options._const.modifyValue).setValue(this.options._const.oldValue, t.value || "").setValue(this.options._const.newValue, e.value || "").setValue(this.options._const.route, s)), t.checked !== e.checked && i.push((new y).setValue(this.options._const.action, this.options._const.modifyChecked).setValue(this.options._const.oldValue, t.checked).setValue(this.options._const.newValue, e.checked).setValue(this.options._const.route, s)), i }, t }(), k = { debug: !1, diffcap: 10, maxDepth: !1, maxChildCount: 50, valueDiffing: !0, textDiff: function (t, e, s, i) { t.data = i }, preVirtualDiffApply: function () { }, postVirtualDiffApply: function () { }, preDiffApply: function () { }, postDiffApply: function () { }, filterOuterDiff: null, compress: !1, _const: !1, document: !("undefined" == typeof window || !window.document) && window.document, components: [] }, T = function () { function t(t) { if (void 0 === t && (t = {}), Object.entries(k).forEach((function (e) { var s = e[0], i = e[1]; Object.prototype.hasOwnProperty.call(t, s) || (t[s] = i) })), !t._const) { var e = ["addAttribute", "modifyAttribute", "removeAttribute", "modifyTextElement", "relocateGroup", "removeElement", "addElement", "removeTextElement", "addTextElement", "replaceElement", "modifyValue", "modifyChecked", "modifySelected", "modifyComment", "action", "route", "oldValue", "newValue", "element", "group", "groupLength", "from", "to", "name", "value", "data", "attributes", "nodeName", "childNodes", "checked", "selected"], s = {}; t.compress ? e.forEach((function (t, e) { return s[t] = e })) : e.forEach((function (t) { return s[t] = t })), t._const = s } this.options = t } return t.prototype.apply = function (t, e) { return function (t, e, s) { return e.every((function (e) { return d(t, e, s) })) }(t, e, this.options) }, t.prototype.undo = function (t, e) { return function (t, e, s) { (e = e.slice()).reverse(), e.forEach((function (e) { !function (t, e, s) { switch (e[s._const.action]) { case s._const.addAttribute: e[s._const.action] = s._const.removeAttribute, d(t, e, s); break; case s._const.modifyAttribute: c(e, s._const.oldValue, s._const.newValue), d(t, e, s); break; case s._const.removeAttribute: e[s._const.action] = s._const.addAttribute, d(t, e, s); break; case s._const.modifyTextElement: case s._const.modifyValue: case s._const.modifyComment: case s._const.modifyChecked: case s._const.modifySelected: case s._const.replaceElement: c(e, s._const.oldValue, s._const.newValue), d(t, e, s); break; case s._const.relocateGroup: c(e, s._const.from, s._const.to), d(t, e, s); break; case s._const.removeElement: e[s._const.action] = s._const.addElement, d(t, e, s); break; case s._const.addElement: e[s._const.action] = s._const.removeElement, d(t, e, s); break; case s._const.removeTextElement: e[s._const.action] = s._const.addTextElement, d(t, e, s); break; case s._const.addTextElement: e[s._const.action] = s._const.removeTextElement, d(t, e, s); break; default: console.log("unknown action") } }(t, e, s) })) }(t, e, this.options) }, t.prototype.diff = function (t, e) { return new S(t, e, this.options).init() }, t }(); const A = (t, e, s, { classes: i, format: n, hiddenHeader: a, sortable: o, scrollY: r, type: l }, { noColumnWidths: d, unhideHeader: c }) => ({ nodeName: "TR", childNodes: t.map(((t, h) => { const u = e[h] || { type: l, format: n, sortable: !0, searchable: !0 }; if (u.hidden) return; const p = {}; if (u.sortable && o && (!r.length || c) && (u.filter ? p["data-filterable"] = "true" : p["data-sortable"] = "true"), u.headerClass && (p.class = u.headerClass), s.sort && s.sort.column === h) { const t = "asc" === s.sort.dir ? i.ascending : i.descending; p.class = p.class ? `${p.class} ${t}` : t, p["aria-sort"] = "asc" === s.sort.dir ? "ascending" : "descending" } else s.filters[h] && (p.class = p.class ? `${p.class} ${i.filterActive}` : i.filterActive); let f = ""; s.widths[h] && !d && (f += `width: ${s.widths[h]}%;`), r.length && !c && (f += "padding-bottom: 0;padding-top: 0;border: 0;"), f.length && (p.style = f), u.headerClass && (p.class = u.headerClass); const m = "html" === t.type ? t.data : [{ nodeName: "#text", data: t.text ?? String(t.data) }]; return { nodeName: "TH", attributes: p, childNodes: !a && !r.length || c ? u.sortable && o ? [{ nodeName: "a", attributes: { href: "#", class: u.filter ? i.filter : i.sorter }, childNodes: m }] : m : [{ nodeName: "#text", data: "" }] } })).filter((t => t)) }), P = (t, e, s, i, n, a, { classes: o, hiddenHeader: r, header: l, footer: d, format: c, sortable: h, scrollY: u, type: p, rowRender: f, tabIndex: m }, { noColumnWidths: g, unhideHeader: b, renderHeader: v }) => { const _ = { nodeName: "TABLE", attributes: { ...t }, childNodes: [{ nodeName: "TBODY", childNodes: s.map((({ row: t, index: e }) => { const s = { nodeName: "TR", attributes: { "data-index": String(e) }, childNodes: t.map(((t, s) => { const a = i[s] || { type: p, format: c, sortable: !0, searchable: !0 }; if (a.hidden) return; const o = "html" === a.type ? { nodeName: "TD", childNodes: t.data } : { nodeName: "TD", childNodes: [{ nodeName: "#text", data: t.text ?? String(t.data) }] }; if (l || d || !n.widths[s] || g || (o.attributes = { style: `width: ${n.widths[s]}%;` }), a.cellClass && (o.attributes || (o.attributes = {}), o.attributes.class = a.cellClass), a.render) { const i = a.render(t.data, o, e, s); if (i) { if ("string" != typeof i) return i; { const t = L(`<td>${i}</td>`); 1 === t.childNodes.length && ["#text", "#comment"].includes(t.childNodes[0].nodeName) ? o.childNodes[0].data = i : o.childNodes = t.childNodes } } } return o })).filter((t => t)) }; if (e === a && (s.attributes.class = o.cursor), f) { const i = f(t, s, e); if (i) { if ("string" != typeof i) return i; { const t = L(`<tr>${i}</tr>`); !t.childNodes || 1 === t.childNodes.length && ["#text", "#comment"].includes(t.childNodes[0].nodeName) ? s.childNodes[0].data = i : s.childNodes = t.childNodes } } } return s })) }] }; if (_.attributes.class = _.attributes.class ? `${_.attributes.class} ${o.table}` : o.table, l || d || v) { const t = A(e, i, n, { classes: o, hiddenHeader: r, sortable: h, scrollY: u }, { noColumnWidths: g, unhideHeader: b }); if (l || v) { const e = { nodeName: "THEAD", childNodes: [t] }; !u.length && !r || b || (e.attributes = { style: "height: 0px;" }), _.childNodes.unshift(e) } if (d) { const e = { nodeName: "TFOOT", childNodes: [l ? structuredClone(t) : t] }; !u.length && !r || b || (e.attributes = { style: "height: 0px;" }), _.childNodes.push(e) } } return !1 !== m && (_.attributes.tabindex = String(m)), _ }; "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self; var H = {}, R = { get exports() { return H }, set exports(t) { H = t } }; R.exports = function () { var t = 1e3, e = 6e4, s = 36e5, i = "millisecond", n = "second", a = "minute", o = "hour", r = "day", l = "week", d = "month", c = "quarter", h = "year", u = "date", p = "Invalid Date", f = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, m = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, g = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function (t) { var e = ["th", "st", "nd", "rd"], s = t % 100; return "[" + t + (e[(s - 20) % 10] || e[s] || e[0]) + "]" } }, b = function (t, e, s) { var i = String(t); return !i || i.length >= e ? t : "" + Array(e + 1 - i.length).join(s) + t }, v = { s: b, z: function (t) { var e = -t.utcOffset(), s = Math.abs(e), i = Math.floor(s / 60), n = s % 60; return (e <= 0 ? "+" : "-") + b(i, 2, "0") + ":" + b(n, 2, "0") }, m: function t(e, s) { if (e.date() < s.date()) return -t(s, e); var i = 12 * (s.year() - e.year()) + (s.month() - e.month()), n = e.clone().add(i, d), a = s - n < 0, o = e.clone().add(i + (a ? -1 : 1), d); return +(-(i + (s - n) / (a ? n - o : o - n)) || 0) }, a: function (t) { return t < 0 ? Math.ceil(t) || 0 : Math.floor(t) }, p: function (t) { return { M: d, y: h, w: l, d: r, D: u, h: o, m: a, s: n, ms: i, Q: c }[t] || String(t || "").toLowerCase().replace(/s$/, "") }, u: function (t) { return void 0 === t } }, _ = "en", w = {}; w[_] = g; var y = function (t) { return t instanceof M }, x = function t(e, s, i) { var n; if (!e) return _; if ("string" == typeof e) { var a = e.toLowerCase(); w[a] && (n = a), s && (w[a] = s, n = a); var o = e.split("-"); if (!n && o.length > 1) return t(o[0]) } else { var r = e.name; w[r] = e, n = r } return !i && n && (_ = n), n || !i && _ }, N = function (t, e) { if (y(t)) return t.clone(); var s = "object" == typeof e ? e : {}; return s.date = t, s.args = arguments, new M(s) }, D = v; D.l = x, D.i = y, D.w = function (t, e) { return N(t, { locale: e.$L, utc: e.$u, x: e.$x, $offset: e.$offset }) }; var M = function () { function g(t) { this.$L = x(t.locale, null, !0), this.parse(t) } var b = g.prototype; return b.parse = function (t) { this.$d = function (t) { var e = t.date, s = t.utc; if (null === e) return new Date(NaN); if (D.u(e)) return new Date; if (e instanceof Date) return new Date(e); if ("string" == typeof e && !/Z$/i.test(e)) { var i = e.match(f); if (i) { var n = i[2] - 1 || 0, a = (i[7] || "0").substring(0, 3); return s ? new Date(Date.UTC(i[1], n, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, a)) : new Date(i[1], n, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, a) } } return new Date(e) }(t), this.$x = t.x || {}, this.init() }, b.init = function () { var t = this.$d; this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds() }, b.$utils = function () { return D }, b.isValid = function () { return !(this.$d.toString() === p) }, b.isSame = function (t, e) { var s = N(t); return this.startOf(e) <= s && s <= this.endOf(e) }, b.isAfter = function (t, e) { return N(t) < this.startOf(e) }, b.isBefore = function (t, e) { return this.endOf(e) < N(t) }, b.$g = function (t, e, s) { return D.u(t) ? this[e] : this.set(s, t) }, b.unix = function () { return Math.floor(this.valueOf() / 1e3) }, b.valueOf = function () { return this.$d.getTime() }, b.startOf = function (t, e) { var s = this, i = !!D.u(e) || e, c = D.p(t), p = function (t, e) { var n = D.w(s.$u ? Date.UTC(s.$y, e, t) : new Date(s.$y, e, t), s); return i ? n : n.endOf(r) }, f = function (t, e) { return D.w(s.toDate()[t].apply(s.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e)), s) }, m = this.$W, g = this.$M, b = this.$D, v = "set" + (this.$u ? "UTC" : ""); switch (c) { case h: return i ? p(1, 0) : p(31, 11); case d: return i ? p(1, g) : p(0, g + 1); case l: var _ = this.$locale().weekStart || 0, w = (m < _ ? m + 7 : m) - _; return p(i ? b - w : b + (6 - w), g); case r: case u: return f(v + "Hours", 0); case o: return f(v + "Minutes", 1); case a: return f(v + "Seconds", 2); case n: return f(v + "Milliseconds", 3); default: return this.clone() } }, b.endOf = function (t) { return this.startOf(t, !1) }, b.$set = function (t, e) { var s, l = D.p(t), c = "set" + (this.$u ? "UTC" : ""), p = (s = {}, s[r] = c + "Date", s[u] = c + "Date", s[d] = c + "Month", s[h] = c + "FullYear", s[o] = c + "Hours", s[a] = c + "Minutes", s[n] = c + "Seconds", s[i] = c + "Milliseconds", s)[l], f = l === r ? this.$D + (e - this.$W) : e; if (l === d || l === h) { var m = this.clone().set(u, 1); m.$d[p](f), m.init(), this.$d = m.set(u, Math.min(this.$D, m.daysInMonth())).$d } else p && this.$d[p](f); return this.init(), this }, b.set = function (t, e) { return this.clone().$set(t, e) }, b.get = function (t) { return this[D.p(t)]() }, b.add = function (i, c) { var u, p = this; i = Number(i); var f = D.p(c), m = function (t) { var e = N(p); return D.w(e.date(e.date() + Math.round(t * i)), p) }; if (f === d) return this.set(d, this.$M + i); if (f === h) return this.set(h, this.$y + i); if (f === r) return m(1); if (f === l) return m(7); var g = (u = {}, u[a] = e, u[o] = s, u[n] = t, u)[f] || 1, b = this.$d.getTime() + i * g; return D.w(b, this) }, b.subtract = function (t, e) { return this.add(-1 * t, e) }, b.format = function (t) { var e = this, s = this.$locale(); if (!this.isValid()) return s.invalidDate || p; var i = t || "YYYY-MM-DDTHH:mm:ssZ", n = D.z(this), a = this.$H, o = this.$m, r = this.$M, l = s.weekdays, d = s.months, c = function (t, s, n, a) { return t && (t[s] || t(e, i)) || n[s].slice(0, a) }, h = function (t) { return D.s(a % 12 || 12, t, "0") }, u = s.meridiem || function (t, e, s) { var i = t < 12 ? "AM" : "PM"; return s ? i.toLowerCase() : i }, f = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: r + 1, MM: D.s(r + 1, 2, "0"), MMM: c(s.monthsShort, r, d, 3), MMMM: c(d, r), D: this.$D, DD: D.s(this.$D, 2, "0"), d: String(this.$W), dd: c(s.weekdaysMin, this.$W, l, 2), ddd: c(s.weekdaysShort, this.$W, l, 3), dddd: l[this.$W], H: String(a), HH: D.s(a, 2, "0"), h: h(1), hh: h(2), a: u(a, o, !0), A: u(a, o, !1), m: String(o), mm: D.s(o, 2, "0"), s: String(this.$s), ss: D.s(this.$s, 2, "0"), SSS: D.s(this.$ms, 3, "0"), Z: n }; return i.replace(m, (function (t, e) { return e || f[t] || n.replace(":", "") })) }, b.utcOffset = function () { return 15 * -Math.round(this.$d.getTimezoneOffset() / 15) }, b.diff = function (i, u, p) { var f, m = D.p(u), g = N(i), b = (g.utcOffset() - this.utcOffset()) * e, v = this - g, _ = D.m(this, g); return _ = (f = {}, f[h] = _ / 12, f[d] = _, f[c] = _ / 3, f[l] = (v - b) / 6048e5, f[r] = (v - b) / 864e5, f[o] = v / s, f[a] = v / e, f[n] = v / t, f)[m] || v, p ? _ : D.a(_) }, b.daysInMonth = function () { return this.endOf(d).$D }, b.$locale = function () { return w[this.$L] }, b.locale = function (t, e) { if (!t) return this.$L; var s = this.clone(), i = x(t, e, !0); return i && (s.$L = i), s }, b.clone = function () { return D.w(this.$d, this) }, b.toDate = function () { return new Date(this.valueOf()) }, b.toJSON = function () { return this.isValid() ? this.toISOString() : null }, b.toISOString = function () { return this.$d.toISOString() }, b.toString = function () { return this.$d.toUTCString() }, g }(), E = M.prototype; return N.prototype = E, [["$ms", i], ["$s", n], ["$m", a], ["$H", o], ["$W", r], ["$M", d], ["$y", h], ["$D", u]].forEach((function (t) { E[t[1]] = function (e) { return this.$g(e, t[0], t[1]) } })), N.extend = function (t, e) { return t.$i || (t(e, M, N), t.$i = !0), N }, N.locale = x, N.isDayjs = y, N.unix = function (t) { return N(1e3 * t) }, N.en = w[_], N.Ls = w, N.p = {}, N }(); var I = H, Y = {}, j = { get exports() { return Y }, set exports(t) { Y = t } }; j.exports = function () { var t = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, e = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, s = /\d\d/, i = /\d\d?/, n = /\d*[^-_:/,()\s\d]+/, a = {}, o = function (t) { return (t = +t) + (t > 68 ? 1900 : 2e3) }, r = function (t) { return function (e) { this[t] = +e } }, l = [/[+-]\d\d:?(\d\d)?|Z/, function (t) { (this.zone || (this.zone = {})).offset = function (t) { if (!t) return 0; if ("Z" === t) return 0; var e = t.match(/([+-]|\d\d)/g), s = 60 * e[1] + (+e[2] || 0); return 0 === s ? 0 : "+" === e[0] ? -s : s }(t) }], d = function (t) { var e = a[t]; return e && (e.indexOf ? e : e.s.concat(e.f)) }, c = function (t, e) { var s, i = a.meridiem; if (i) { for (var n = 1; n <= 24; n += 1)if (t.indexOf(i(n, 0, e)) > -1) { s = n > 12; break } } else s = t === (e ? "pm" : "PM"); return s }, h = { A: [n, function (t) { this.afternoon = c(t, !1) }], a: [n, function (t) { this.afternoon = c(t, !0) }], S: [/\d/, function (t) { this.milliseconds = 100 * +t }], SS: [s, function (t) { this.milliseconds = 10 * +t }], SSS: [/\d{3}/, function (t) { this.milliseconds = +t }], s: [i, r("seconds")], ss: [i, r("seconds")], m: [i, r("minutes")], mm: [i, r("minutes")], H: [i, r("hours")], h: [i, r("hours")], HH: [i, r("hours")], hh: [i, r("hours")], D: [i, r("day")], DD: [s, r("day")], Do: [n, function (t) { var e = a.ordinal, s = t.match(/\d+/); if (this.day = s[0], e) for (var i = 1; i <= 31; i += 1)e(i).replace(/\[|\]/g, "") === t && (this.day = i) }], M: [i, r("month")], MM: [s, r("month")], MMM: [n, function (t) { var e = d("months"), s = (d("monthsShort") || e.map((function (t) { return t.slice(0, 3) }))).indexOf(t) + 1; if (s < 1) throw new Error; this.month = s % 12 || s }], MMMM: [n, function (t) { var e = d("months").indexOf(t) + 1; if (e < 1) throw new Error; this.month = e % 12 || e }], Y: [/[+-]?\d+/, r("year")], YY: [s, function (t) { this.year = o(t) }], YYYY: [/\d{4}/, r("year")], Z: l, ZZ: l }; function u(s) { var i, n; i = s, n = a && a.formats; for (var o = (s = i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function (e, s, i) { var a = i && i.toUpperCase(); return s || n[i] || t[i] || n[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function (t, e, s) { return e || s.slice(1) })) }))).match(e), r = o.length, l = 0; l < r; l += 1) { var d = o[l], c = h[d], u = c && c[0], p = c && c[1]; o[l] = p ? { regex: u, parser: p } : d.replace(/^\[|\]$/g, "") } return function (t) { for (var e = {}, s = 0, i = 0; s < r; s += 1) { var n = o[s]; if ("string" == typeof n) i += n.length; else { var a = n.regex, l = n.parser, d = t.slice(i), c = a.exec(d)[0]; l.call(e, c), t = t.replace(c, "") } } return function (t) { var e = t.afternoon; if (void 0 !== e) { var s = t.hours; e ? s < 12 && (t.hours += 12) : 12 === s && (t.hours = 0), delete t.afternoon } }(e), e } } return function (t, e, s) { s.p.customParseFormat = !0, t && t.parseTwoDigitYear && (o = t.parseTwoDigitYear); var i = e.prototype, n = i.parse; i.parse = function (t) { var e = t.date, i = t.utc, o = t.args; this.$u = i; var r = o[1]; if ("string" == typeof r) { var l = !0 === o[2], d = !0 === o[3], c = l || d, h = o[2]; d && (h = o[2]), a = this.$locale(), !l && h && (a = s.Ls[h]), this.$d = function (t, e, s) { try { if (["x", "X"].indexOf(e) > -1) return new Date(("X" === e ? 1e3 : 1) * t); var i = u(e)(t), n = i.year, a = i.month, o = i.day, r = i.hours, l = i.minutes, d = i.seconds, c = i.milliseconds, h = i.zone, p = new Date, f = o || (n || a ? 1 : p.getDate()), m = n || p.getFullYear(), g = 0; n && !a || (g = a > 0 ? a - 1 : p.getMonth()); var b = r || 0, v = l || 0, _ = d || 0, w = c || 0; return h ? new Date(Date.UTC(m, g, f, b, v, _, w + 60 * h.offset * 1e3)) : s ? new Date(Date.UTC(m, g, f, b, v, _, w)) : new Date(m, g, f, b, v, _, w) } catch (t) { return new Date("") } }(e, r, i), this.init(), h && !0 !== h && (this.$L = this.locale(h).$L), c && e != this.format(r) && (this.$d = new Date("")), a = {} } else if (r instanceof Array) for (var p = r.length, f = 1; f <= p; f += 1) { o[1] = r[f - 1]; var m = s.apply(this, o); if (m.isValid()) { this.$d = m.$d, this.$L = m.$L, this.init(); break } f === p && (this.$d = new Date("")) } else n.call(this, t) } } }(); var q = Y; I.extend(q); const B = (t, e) => { let s; if (e) switch (e) { case "ISO_8601": s = t; break; case "RFC_2822": s = I(t.slice(5), "DD MMM YYYY HH:mm:ss ZZ").unix(); break; case "MYSQL": s = I(t, "YYYY-MM-DD hh:mm:ss").unix(); break; case "UNIX": s = I(t).unix(); break; default: s = I(t, e, !0).valueOf() }return s }, F = (t, e) => { if (t?.constructor === Object && Object.prototype.hasOwnProperty.call(t, "data") && !Object.keys(t).find((t => !["text", "order", "data"].includes(t)))) return t; const s = { data: t }; switch (e.type) { case "string": "string" != typeof t && (s.text = String(s.data), s.order = s.text); break; case "date": e.format && (s.order = B(String(s.data), e.format)); break; case "number": s.text = String(s.data), s.data = parseInt(s.data, 10); break; case "html": { const t = Array.isArray(s.data) ? { nodeName: "TD", childNodes: s.data } : L(`<td>${String(s.data)}</td>`); s.data = t.childNodes || []; const e = i(t); s.text = e, s.order = e; break } case "boolean": "string" == typeof s.data && (s.data = s.data.toLowerCase().trim()), s.data = !["false", !1, null, void 0, 0].includes(s.data), s.order = s.data ? 1 : 0, s.text = String(s.data); break; case "other": s.text = "", s.order = 0; break; default: s.text = JSON.stringify(s.data) }return s }, z = t => { if (t instanceof Object && t.constructor === Object && t.hasOwnProperty("data") && ("string" == typeof t.text || "string" == typeof t.data)) return t; const e = { data: t }; if ("string" == typeof t) { if (t.length) { const s = L(`<th>${t}</th>`); if (s.childNodes && (1 !== s.childNodes.length || "#text" !== s.childNodes[0].nodeName)) { e.data = s.childNodes, e.type = "html"; const t = i(s); e.text = t } } } else[null, void 0].includes(t) ? e.text = "" : e.text = JSON.stringify(t); return e }, U = (t, e, s, n, a) => { const o = { data: [], headings: [] }; t.headings ? o.headings = t.headings.map((t => z(t))) : e?.tHead ? o.headings = Array.from(e.tHead.querySelectorAll("th")).map(((t, e) => { const o = (t => { const e = D(t, { valueDiffing: !1 }); let s; return s = !e.childNodes || 1 === e.childNodes.length && "#text" === e.childNodes[0].nodeName ? { data: t.innerText, type: "string" } : { data: e.childNodes, type: "html", text: i(e) }, s })(t); s[e] || (s[e] = { type: n, format: a, searchable: !0, sortable: !0 }); const r = s[e]; return "false" !== t.dataset.sortable?.trim().toLowerCase() && "false" !== t.dataset.sort?.trim().toLowerCase() || (r.sortable = !1), "false" === t.dataset.searchable?.trim().toLowerCase() && (r.searchable = !1), "true" !== t.dataset.hidden?.trim().toLowerCase() && "true" !== t.getAttribute("hidden")?.trim().toLowerCase() || (r.hidden = !0), ["number", "string", "html", "date", "boolean", "other"].includes(t.dataset.type) && (r.type = t.dataset.type, "date" === r.type && t.dataset.format && (r.format = t.dataset.format)), o })) : t.data?.length ? o.headings = t.data[0].map((t => z(""))) : e?.tBodies.length && (o.headings = Array.from(e.tBodies[0].rows[0].cells).map((t => z("")))); for (let t = 0; t < o.headings.length; t++)s[t] || (s[t] = { type: n, format: a, sortable: !0, searchable: !0 }); if (t.data ? o.data = t.data.map((t => t.map(((t, e) => F(t, s[e]))))) : e?.tBodies?.length && (o.data = Array.from(e.tBodies[0].rows).map((t => Array.from(t.cells).map(((t, e) => { const i = t.dataset.content ? F(t.dataset.content, s[e]) : ((t, e) => { let s; switch (e.type) { case "string": s = { data: t.innerText }; break; case "date": { const i = t.innerText; s = { data: i, order: B(i, e.format) }; break } case "number": s = { data: parseInt(t.innerText, 10), text: t.innerText }; break; case "boolean": { const e = !["false", "0", "null", "undefined"].includes(t.innerText.toLowerCase().trim()); s = { data: e, order: e ? 1 : 0, text: e ? "1" : "0" }; break } default: s = { data: D(t, { valueDiffing: !1 }).childNodes || [], text: t.innerText, order: t.innerText } }return s })(t, s[e]); return t.dataset.order && (i.order = isNaN(parseFloat(t.dataset.order)) ? t.dataset.order : parseFloat(t.dataset.order)), i }))))), o.data.length && o.data[0].length !== o.headings.length) throw new Error("Data heading length mismatch."); return o }; class J { constructor(t) { this.dt = t, this.cursor = !1 } setCursor(t = !1) { if (t === this.cursor) return; const e = this.cursor; if (this.cursor = t, this.dt._renderTable(), !1 !== t && this.dt.options.scrollY) { const t = this.dt.dom.querySelector(`tr.${this.dt.options.classes.cursor}`); t && t.scrollIntoView({ block: "nearest" }) } this.dt.emit("datatable.cursormove", this.cursor, e) } add(t) { const e = t.map(((t, e) => { const s = this.dt.columns.settings[e]; return F(t, s) })); this.dt.data.data.push(e), this.dt.data.data.length && (this.dt.hasRows = !0), this.dt.update(!0) } remove(t) { if (!Array.isArray(t)) return this.remove([t]); this.dt.data.data = this.dt.data.data.filter(((e, s) => !t.includes(s))), this.dt.data.data.length || (this.dt.hasRows = !1), this.dt.update(!0) } findRowIndex(t, e) { return this.dt.data.data.findIndex((s => (s[t].text ?? String(s[t].data)).toLowerCase().includes(String(e).toLowerCase()))) } findRow(t, e) { const s = this.findRowIndex(t, e); if (s < 0) return { index: -1, row: null, cols: [] }; const i = this.dt.data.data[s], n = i.map((t => t.data)); return { index: s, row: i, cols: n } } updateRow(t, e) { const s = e.map(((t, e) => { const s = this.dt.columns.settings[e]; return F(t, s) })); this.dt.data.data.splice(t, 1, s), this.dt.update(!0) } } class W { constructor(t) { this.dt = t, this.init() } init() { [this.settings, this._state] = ((t = [], e, s) => { let i = [], n = !1; const a = []; return t.forEach((t => { (Array.isArray(t.select) ? t.select : [t.select]).forEach((o => { i[o] || (i[o] = { type: t.type || e, sortable: !0, searchable: !0 }); const r = i[o]; t.render && (r.render = t.render), t.format ? r.format = t.format : "date" === t.type && (r.format = s), t.cellClass && (r.cellClass = t.cellClass), t.headerClass && (r.headerClass = t.headerClass), t.locale && (r.locale = t.locale), !1 === t.sortable ? r.sortable = !1 : (t.numeric && (r.numeric = t.numeric), t.caseFirst && (r.caseFirst = t.caseFirst)), !1 === t.searchable ? r.searchable = !1 : t.sensitivity && (r.sensitivity = t.sensitivity), (r.searchable || r.sortable) && t.ignorePunctuation && (r.ignorePunctuation = t.ignorePunctuation), t.hidden && (r.hidden = !0), t.filter && (r.filter = t.filter), t.sortSequence && (r.sortSequence = t.sortSequence), t.sort && (t.filter ? a[o] = t.sort : n = { column: o, dir: t.sort }) })) })), i = i.map((t => t || { type: e, format: "date" === e ? s : void 0, sortable: !0, searchable: !0 })), [i, { filters: a, sort: n, widths: [] }] })(this.dt.options.columns, this.dt.options.type, this.dt.options.format) } swap(t) { if (2 === t.length) { const e = this.dt.data.headings.map(((t, e) => e)), s = t[0], i = t[1], n = e[i]; return e[i] = e[s], e[s] = n, this.order(e) } } order(t) { this.dt.data.headings = t.map((t => this.dt.data.headings[t])), this.dt.data.data = this.dt.data.data.map((e => t.map((t => e[t])))), this.settings = t.map((t => this.settings[t])), this.dt.update() } hide(t) { t.length && (t.forEach((t => { this.settings[t] || (this.settings[t] = { type: "string" }); this.settings[t].hidden = !0 })), this.dt.update()) } show(t) { t.length && (t.forEach((t => { this.settings[t] || (this.settings[t] = { type: "string", sortable: !0 }); delete this.settings[t].hidden })), this.dt.update()) } visible(t) { return void 0 === t && (t = [...Array(this.dt.data.headings.length).keys()]), Array.isArray(t) ? t.map((t => !this.settings[t]?.hidden)) : !this.settings[t]?.hidden } add(t) { const e = this.dt.data.headings.length; if (this.dt.data.headings = this.dt.data.headings.concat([z(t.heading)]), this.dt.data.data = this.dt.data.data.map(((e, s) => e.concat([F(t.data[s], t)]))), this.settings[e] = { type: t.type || "string", sortable: !0, searchable: !0 }, t.type || t.format || t.sortable || t.render || t.filter) { const s = this.settings[e]; t.render && (s.render = t.render), t.format && (s.format = t.format), t.cellClass && (s.cellClass = t.cellClass), t.headerClass && (s.headerClass = t.headerClass), t.locale && (s.locale = t.locale), !1 === t.sortable ? s.sortable = !1 : (t.numeric && (s.numeric = t.numeric), t.caseFirst && (s.caseFirst = t.caseFirst)), !1 === t.searchable ? s.searchable = !1 : t.sensitivity && (s.sensitivity = t.sensitivity), (s.searchable || s.sortable) && t.ignorePunctuation && (s.ignorePunctuation = t.ignorePunctuation), t.hidden && (s.hidden = !0), t.filter && (s.filter = t.filter), t.sortSequence && (s.sortSequence = t.sortSequence) } this.dt.update(!0) } remove(t) { if (!Array.isArray(t)) return this.remove([t]); this.dt.data.headings = this.dt.data.headings.filter(((e, s) => !t.includes(s))), this.dt.data.data = this.dt.data.data.map((e => e.filter(((e, s) => !t.includes(s))))), this.dt.update(!0) } filter(t, e = !1) { if (!this.settings[t]?.filter?.length) return; const s = this._state.filters[t]; let i; if (s) { let e = !1; i = this.settings[t].filter.find((t => !!e || (t === s && (e = !0), !1))) } else { const e = this.settings[t].filter; i = e ? e[0] : void 0 } i ? this._state.filters[t] = i : s && (this._state.filters[t] = void 0), this.dt._currentPage = 1, this.dt.update(), e || this.dt.emit("datatable.filter", t, i) } sort(t, e, s = !1) { const i = this.settings[t]; if (s || this.dt.emit("datatable.sorting", t, e), !e) { const t = !!this._state.sort && this._state.sort?.dir, s = i?.sortSequence || ["asc", "desc"]; if (t) { const i = s.indexOf(t); e = -1 === i ? "asc" : i === s.length - 1 ? s[0] : s[i + 1] } else e = s.length ? s[0] : "asc" } const n = !!["string", "html"].includes(i.type) && new Intl.Collator(i.locale || this.dt.options.locale, { usage: "sort", numeric: i.numeric || this.dt.options.numeric, caseFirst: i.caseFirst || this.dt.options.caseFirst, ignorePunctuation: i.ignorePunctuation || this.dt.options.ignorePunctuation }); this.dt.data.data.sort(((s, i) => { let a = s[t].order || s[t].data, o = i[t].order || i[t].data; if ("desc" === e) { const t = a; a = o, o = t } return n ? n.compare(String(a), String(o)) : a < o ? -1 : a > o ? 1 : 0 })), this._state.sort = { column: t, dir: e }, this.dt._searchQueries.length ? (this.dt.multiSearch(this.dt._searchQueries), this.dt.emit("datatable.sort", t, e)) : s || (this.dt._currentPage = 1, this.dt.update(), this.dt.emit("datatable.sort", t, e)) } _measureWidths() { const t = this.dt.data.headings.filter(((t, e) => !this.settings[e]?.hidden)); if ((this.dt.options.scrollY.length || this.dt.options.fixedColumns) && t?.length) { this._state.widths = []; const t = { noPaging: !0 }; if (this.dt.options.header || this.dt.options.footer) { this.dt.options.scrollY.length && (t.unhideHeader = !0), this.dt.headerDOM && this.dt.headerDOM.parentElement.removeChild(this.dt.headerDOM), t.noColumnWidths = !0, this.dt._renderTable(t); const e = Array.from(this.dt.dom.querySelector("thead, tfoot")?.firstElementChild?.querySelectorAll("th") || []); let s = 0; const i = this.dt.data.headings.map(((t, i) => { if (this.settings[i]?.hidden) return 0; const n = e[s].offsetWidth; return s += 1, n })), n = i.reduce(((t, e) => t + e), 0); this._state.widths = i.map((t => t / n * 100)) } else { t.renderHeader = !0, this.dt._renderTable(t); const e = Array.from(this.dt.dom.querySelector("thead, tfoot")?.firstElementChild?.querySelectorAll("th") || []); let s = 0; const i = this.dt.data.headings.map(((t, i) => { if (this.settings[i]?.hidden) return 0; const n = e[s].offsetWidth; return s += 1, n })), n = i.reduce(((t, e) => t + e), 0); this._state.widths = i.map((t => t / n * 100)) } this.dt._renderTable() } } } const Q = { sortable: !0, locale: "en", numeric: !0, caseFirst: "false", searchable: !0, sensitivity: "base", ignorePunctuation: !0, destroyable: !0, data: {}, type: "html", format: "YYYY-MM-DD", columns: [], paging: !0, perPage: 10, perPageSelect: [5, 10, 15, 20, 25], nextPrev: !0, firstLast: !1, prevText: "‹", nextText: "›", firstText: "«", lastText: "»", ellipsisText: "…", truncatePager: !0, pagerDelta: 2, scrollY: "", fixedColumns: !0, fixedHeight: !1, footer: !1, header: !0, hiddenHeader: !1, rowNavigation: !1, tabIndex: !1, pagerRender: !1, rowRender: !1, tableRender: !1, labels: { placeholder: "Search...", searchTitle: "Search within table", perPage: "entries per page", noRows: "No entries found", noResults: "No results match your search query", info: "Showing {start} to {end} of {rows} entries" }, template: (t, e) => `<div class='${t.classes.top}'>\n ${t.paging && t.perPageSelect ? `<div class='${t.classes.dropdown}'>\n <label>\n <select class='${t.classes.selector}'></select> ${t.labels.perPage}\n </label>\n </div>` : ""}\n ${t.searchable ? `<div class='${t.classes.search}'>\n <input class='${t.classes.input}' placeholder='${t.labels.placeholder}' type='search' title='${t.labels.searchTitle}'${e.id ? ` aria-controls="${e.id}"` : ""}>\n </div>` : ""}\n</div>\n<div class='${t.classes.container}'${t.scrollY.length ? ` style='height: ${t.scrollY}; overflow-Y: auto;'` : ""}></div>\n<div class='${t.classes.bottom}'>\n ${t.paging ? `<div class='${t.classes.info}'></div>` : ""}\n <nav class='${t.classes.pagination}'></nav>\n</div>`, classes: { active: "datatable-active", ascending: "datatable-ascending", bottom: "datatable-bottom", container: "datatable-container", cursor: "datatable-cursor", descending: "datatable-descending", disabled: "datatable-disabled", dropdown: "datatable-dropdown", ellipsis: "datatable-ellipsis", filter: "datatable-filter", filterActive: "datatable-filter-active", empty: "datatable-empty", headercontainer: "datatable-headercontainer", hidden: "datatable-hidden", info: "datatable-info", input: "datatable-input", loading: "datatable-loading", pagination: "datatable-pagination", paginationList: "datatable-pagination-list", paginationListItem: "datatable-pagination-list-item", paginationListItemLink: "datatable-pagination-list-item-link", search: "datatable-search", selector: "datatable-selector", sorter: "datatable-sorter", table: "datatable-table", top: "datatable-top", wrapper: "datatable-wrapper" } }, Z = (t, e, s, i = {}) => ({ nodeName: "LI", attributes: { class: i.active && !i.hidden ? `${s.classes.paginationListItem} ${s.classes.active}` : i.hidden ? `${s.classes.paginationListItem} ${s.classes.hidden} ${s.classes.disabled}` : s.classes.paginationListItem }, childNodes: [{ nodeName: "A", attributes: { "data-page": String(t), class: s.classes.paginationListItemLink }, childNodes: [{ nodeName: "#text", data: e }] }] }), X = (t, e, s, i, n) => { let a = []; if (n.firstLast && a.push(Z(1, n.firstText, n)), n.nextPrev) { const e = t ? 1 : s - 1; a.push(Z(e, n.prevText, n, { hidden: t })) } let o = [...Array(i).keys()].map((t => Z(t + 1, String(t + 1), n, { active: t === s - 1 }))); if (n.truncatePager && (o = ((t, e, s, i) => { const n = i.pagerDelta, a = i.classes, o = i.ellipsisText, r = 2 * n; let l = e - n, d = e + n; e < 4 - n + r ? d = 3 + r : e > s - (3 - n + r) && (l = s - (2 + r)); const c = []; for (let e = 1; e <= s; e++)if (1 == e || e == s || e >= l && e <= d) { const s = t[e - 1]; c.push(s) } let h; const u = []; return c.forEach((e => { const s = parseInt(e.childNodes[0].attributes["data-page"], 10); if (h) { const e = parseInt(h.childNodes[0].attributes["data-page"], 10); if (s - e == 2) u.push(t[e]); else if (s - e != 1) { const t = { nodeName: "LI", attributes: { class: `${a.paginationListItem} ${a.ellipsis} ${a.disabled}` }, childNodes: [{ nodeName: "A", attributes: { class: a.paginationListItemLink }, childNodes: [{ nodeName: "#text", data: o }] }] }; u.push(t) } } u.push(e), h = e })), u })(o, s, i, n)), a = a.concat(o), n.nextPrev) { const t = e ? i : s + 1; a.push(Z(t, n.nextText, n, { hidden: e })) } n.firstLast && a.push(Z(i, n.lastText, n)); return { nodeName: "UL", attributes: { class: n.classes.paginationList }, childNodes: o.length > 1 ? a : [] } }; const G = { classes: { row: "datatable-editor-row", form: "datatable-editor-form", item: "datatable-editor-item", menu: "datatable-editor-menu", save: "datatable-editor-save", block: "datatable-editor-block", close: "datatable-editor-close", inner: "datatable-editor-inner", input: "datatable-editor-input", label: "datatable-editor-label", modal: "datatable-editor-modal", action: "datatable-editor-action", header: "datatable-editor-header", wrapper: "datatable-editor-wrapper", editable: "datatable-editor-editable", container: "datatable-editor-container", separator: "datatable-editor-separator" }, labels: { editCell: "Edit Cell", editRow: "Edit Row", removeRow: "Remove Row", reallyRemove: "Are you sure?" }, inline: !0, hiddenColumns: !1, contextMenu: !0, clickEvent: "dblclick", excludeColumns: [], menuItems: [{ text: t => t.options.labels.editCell, action: (t, e) => { if (!(t.event.target instanceof Element)) return; const s = t.event.target.closest("td"); return t.editCell(s) } }, { text: t => t.options.labels.editRow, action: (t, e) => { if (!(t.event.target instanceof Element)) return; const s = t.event.target.closest("tr"); return t.editRow(s) } }, { separator: !0 }, { text: t => t.options.labels.removeRow, action: (t, e) => { if (t.event.target instanceof Element && confirm(t.options.labels.reallyRemove)) { const e = t.event.target.closest("tr"); t.removeRow(e) } } }] }; class K { constructor(t, e = {}) { this.dt = t, this.options = { ...G, ...e } } init() { this.initialized || (this.dt.wrapperDOM.classList.add(this.options.classes.editable), this.options.inline && (this.originalRowRender = this.dt.options.rowRender, this.dt.options.rowRender = (t, e, s) => { let i = this.rowRender(t, e, s); return this.originalRowRender && (i = this.originalRowRender(t, i, s)), i }), this.options.contextMenu && (this.containerDOM = s("div", { id: this.options.classes.container }), this.wrapperDOM = s("div", { class: this.options.classes.wrapper }), this.menuDOM = s("ul", { class: this.options.classes.menu }), this.options.menuItems && this.options.menuItems.length && this.options.menuItems.forEach((t => { const e = s("li", { class: t.separator ? this.options.classes.separator : this.options.classes.item }); if (!t.separator) { const i = s("a", { class: this.options.classes.action, href: t.url || "#", html: "function" == typeof t.text ? t.text(this) : t.text }); e.appendChild(i), t.action && "function" == typeof t.action && i.addEventListener("click", (e => { e.preventDefault(), t.action(this, e) })) } this.menuDOM.appendChild(e) })), this.wrapperDOM.appendChild(this.menuDOM), this.containerDOM.appendChild(this.wrapperDOM), this.update()), this.data = {}, this.closed = !0, this.editing = !1, this.editingRow = !1, this.editingCell = !1, this.bindEvents(), setTimeout((() => { this.initialized = !0, this.dt.emit("editable.init") }), 10)) } bindEvents() { this.events = { context: this.context.bind(this), update: this.update.bind(this), dismiss: this.dismiss.bind(this), keydown: this.keydown.bind(this), click: this.click.bind(this) }, this.dt.dom.addEventListener(this.options.clickEvent, this.events.click), document.addEventListener("click", this.events.dismiss), document.addEventListener("keydown", this.events.keydown), this.options.contextMenu && (this.dt.dom.addEventListener("contextmenu", this.events.context), this.events.reset = function (t, e = 300) { let s; return (...i) => { clearTimeout(s), s = window.setTimeout((() => t()), e) } }((() => this.events.update()), 50), window.addEventListener("resize", this.events.reset), window.addEventListener("scroll", this.events.reset)) } context(t) { const e = t.target; if (!(e instanceof Element)) return; this.event = t; const s = e.closest("tbody td"); if (this.options.contextMenu && !this.disabled && s) { t.preventDefault(); let e = t.pageX, s = t.pageY; e > this.limits.x && (e -= this.rect.width), s > this.limits.y && (s -= this.rect.height), this.wrapperDOM.style.top = `${s}px`, this.wrapperDOM.style.left = `${e}px`, this.openMenu(), this.update() } } click(t) { const e = t.target; if (e instanceof Element) if (this.editing && this.data && this.editingCell) { const t = this.modalDOM ? this.modalDOM.querySelector(`input.${this.options.classes.input}[type=text]`) : this.dt.wrapperDOM.querySelector(`input.${this.options.classes.input}[type=text]`); this.saveCell(t.value) } else if (!this.editing) { const s = e.closest("tbody td"); s && (this.editCell(s), t.preventDefault()) } } keydown(t) { if (this.modalDOM) { if ("Escape" === t.key) this.closeModal(); else if ("Enter" === t.key) if (this.editingCell) { const t = this.modalDOM.querySelector(`input.${this.options.classes.input}[type=text]`); this.saveCell(t.value) } else { const t = Array.from(this.modalDOM.querySelectorAll(`input.${this.options.classes.input}[type=text]`)); this.saveRow(t.map((t => t.value.trim())), this.data.row) } } else if (this.editing && this.data) if ("Enter" === t.key) { if (this.editingCell) { const t = this.dt.wrapperDOM.querySelector(`input.${this.options.classes.input}[type=text]`); this.saveCell(t.value) } else if (this.editingRow) { const t = Array.from(this.dt.wrapperDOM.querySelectorAll(`input.${this.options.classes.input}[type=text]`)); this.saveRow(t.map((t => t.value.trim())), this.data.row) } } else "Escape" === t.key && this.saveCell(this.data.content) } editCell(t) { const e = a(t.cellIndex, this.dt.columns.settings); if (this.options.excludeColumns.includes(e)) return void this.closeMenu(); const s = parseInt(t.parentElement.dataset.index, 10), i = this.dt.data.data[s][e]; this.data = { cell: i, rowIndex: s, columnIndex: e, content: i.text || String(i.data) }, this.editing = !0, this.editingCell = !0, this.options.inline ? this.dt.update() : this.editCellModal(), this.closeMenu() } editCellModal() { const t = this.data.cell, e = this.data.columnIndex, i = this.dt.data.headings[e].text || String(this.dt.data.headings[e].data), a = [`<div class='${this.options.classes.inner}'>`, `<div class='${this.options.classes.header}'>`, "<h4>Editing cell</h4>", `<button class='${this.options.classes.close}' type='button' data-editor-close>×</button>`, " </div>", `<div class='${this.options.classes.block}'>`, `<form class='${this.options.classes.form}'>`, `<div class='${this.options.classes.row}'>`, `<label class='${this.options.classes.label}'>${n(i)}</label>`, `<input class='${this.options.classes.input}' value='${n(t.text || String(t.data) || "")}' type='text'>`, "</div>", `<div class='${this.options.classes.row}'>`, `<button class='${this.options.classes.save}' type='button' data-editor-save>Save</button>`, "</div>", "</form>", "</div>", "</div>"].join(""), o = s("div", { class: this.options.classes.modal, html: a }); this.modalDOM = o, this.openModal(); const r = o.querySelector(`input.${this.options.classes.input}[type=text]`); r.focus(), r.selectionStart = r.selectionEnd = r.value.length, o.addEventListener("click", (t => { const e = t.target; e instanceof Element && (e.hasAttribute("data-editor-close") ? this.closeModal() : e.hasAttribute("data-editor-save") && this.saveCell(r.value)) })) } saveCell(t) { const e = this.data.content, s = this.dt.columns.settings[this.data.columnIndex].type || this.dt.options.type, i = t.trim(); let n; if ("number" === s) n = { data: parseFloat(i) }; else if ("boolean" === s) n = ["", "false", "0"].includes(i) ? { data: !1, text: "false", order: 0 } : { data: !0, text: "true", order: 1 }; else if ("html" === s) n = { data: [{ nodeName: "#text", data: t }], text: t, order: t }; else if ("string" === s) n = { data: t }; else if ("date" === s) { const e = this.dt.columns.settings[this.data.columnIndex].format || this.dt.options.format; n = { data: t, order: B(String(t), e) } } else n = { data: t }; this.dt.data.data[this.data.rowIndex][this.data.columnIndex] = n, this.closeModal(); const a = this.data.rowIndex, o = this.data.columnIndex; this.data = {}, this.dt.update(!0), this.editing = !1, this.editingCell = !1, this.dt.emit("editable.save.cell", t, e, a, o) } editRow(t) { if (!t || "TR" !== t.nodeName || this.editing) return; const e = parseInt(t.dataset.index, 10), s = this.dt.data.data[e]; this.data = { row: s, rowIndex: e }, this.editing = !0, this.editingRow = !0, this.options.inline ? this.dt.update() : this.editRowModal(), this.closeMenu() } editRowModal() { const t = this.data.row, e = [`<div class='${this.options.classes.inner}'>`, `<div class='${this.options.classes.header}'>`, "<h4>Editing row</h4>", `<button class='${this.options.classes.close}' type='button' data-editor-close>×</button>`, " </div>", `<div class='${this.options.classes.block}'>`, `<form class='${this.options.classes.form}'>`, `<div class='${this.options.classes.row}'>`, `<button class='${this.options.classes.save}' type='button' data-editor-save>Save</button>`, "</div>", "</form>", "</div>", "</div>"].join(""), i = s("div", { class: this.options.classes.modal, html: e }), a = i.firstElementChild; if (!a) return; const o = a.lastElementChild?.firstElementChild; if (!o) return; t.forEach(((t, e) => { const i = this.dt.columns.settings[e]; if ((!i.hidden || i.hidden && this.options.hiddenColumns) && !this.options.excludeColumns.includes(e)) { const i = this.dt.data.headings[e].text || String(this.dt.data.headings[e].data); o.insertBefore(s("div", { class: this.options.classes.row, html: [`<div class='${this.options.classes.row}'>`, `<label class='${this.options.classes.label}'>${n(i)}</label>`, `<input class='${this.options.classes.input}' value='${n(t.text || String(t.data) || "")}' type='text'>`, "</div>"].join("") }), o.lastElementChild) } })), this.modalDOM = i, this.openModal(); const r = Array.from(o.querySelectorAll(`input.${this.options.classes.input}[type=text]`)); r.pop(), i.addEventListener("click", (t => { const e = t.target; e instanceof Element && (e.hasAttribute("data-editor-close") ? this.closeModal() : e.hasAttribute("data-editor-save") && this.saveRow(r.map((t => t.value.trim())), this.data.row)) })) } saveRow(t, e) { const s = e.map((t => t.text ?? String(t.data))); this.dt.data.data[this.data.rowIndex] = this.dt.data.data[this.data.rowIndex].map(((e, s) => { if (this.dt.columns.settings[s].hidden || this.options.excludeColumns.includes(s)) return e; const i = this.dt.columns.settings[s].type || this.dt.options.type, n = t[o(s, this.dt.columns.settings)], a = n.trim(); let r; if ("number" === i) r = { data: parseFloat(a) }; else if ("boolean" === i) r = ["", "false", "0"].includes(a) ? { data: !1, text: "false", order: 0 } : { data: !0, text: "true", order: 1 }; else if ("html" === i) r = { data: [{ nodeName: "#text", data: n }], text: n, order: n }; else if ("string" === i) r = { data: n }; else if ("date" === i) { const t = this.dt.columns.settings[s].format || this.dt.options.format; r = { data: n, order: B(String(n), t) } } else r = { data: n }; return r })), this.data = {}, this.dt.update(!0), this.closeModal(), this.dt.emit("editable.save.row", t, s, e) } openModal() { this.modalDOM && document.body.appendChild(this.modalDOM) } closeModal() { this.editing && this.modalDOM && (document.body.removeChild(this.modalDOM), this.modalDOM = this.editing = this.editingRow = this.editingCell = !1) } removeRow(t) { if (!t || "TR" !== t.nodeName || this.editing) return; const e = parseInt(t.dataset.index, 10); this.dt.rows.remove(e), this.closeMenu() } update() { const t = window.scrollX || window.pageXOffset, e = window.scrollY || window.pageYOffset; this.rect = this.wrapperDOM.getBoundingClientRect(), this.limits = { x: window.innerWidth + t - this.rect.width, y: window.innerHeight + e - this.rect.height } } dismiss(t) { const e = t.target; if (!(e instanceof Element)) return; let s = !0; this.options.contextMenu && (s = !this.wrapperDOM.contains(e), this.editing && (s = !this.wrapperDOM.contains(e) && !e.matches(`input.${this.options.classes.input}[type=text]`))), s && (this.editingCell && this.saveCell(this.data.content), this.closeMenu()) } openMenu() { if (this.editing && this.data && this.editingCell) { const t = this.modalDOM ? this.modalDOM.querySelector(`input.${this.options.classes.input}[type=text]`) : this.dt.wrapperDOM.querySelector(`input.${this.options.classes.input}[type=text]`); this.saveCell(t.value) } this.options.contextMenu && (document.body.appendChild(this.containerDOM), this.closed = !1, this.dt.emit("editable.context.open")) } closeMenu() { this.options.contextMenu && !this.closed && (this.closed = !0, document.body.removeChild(this.containerDOM), this.dt.emit("editable.context.close")) } destroy() { this.dt.dom.removeEventListener(this.options.clickEvent, this.events.click), this.dt.dom.removeEventListener("contextmenu", this.events.context), document.removeEventListener("click", this.events.dismiss), document.removeEventListener("keydown", this.events.keydown), window.removeEventListener("resize", this.events.reset), window.removeEventListener("scroll", this.events.reset), document.body.contains(this.containerDOM) && document.body.removeChild(this.containerDOM), this.options.inline && (this.dt.options.rowRender = this.originalRowRender), this.initialized = !1 } rowRender(t, e, s) { if (!this.data || this.data.rowIndex !== s) return e; if (this.editingCell) { e.childNodes[o(this.data.columnIndex, this.dt.columns.settings)].childNodes = [{ nodeName: "INPUT", attributes: { type: "text", value: this.data.content, class: this.options.classes.input } }] } else e.childNodes.forEach(((s, i) => { const o = a(i, this.dt.columns.settings), r = t[o]; if (!this.options.excludeColumns.includes(o)) { e.childNodes[i].childNodes = [{ nodeName: "INPUT", attributes: { type: "text", value: n(r.text || String(r.data) || ""), class: this.options.classes.input } }] } })); return e } } exports.DataTable = class { constructor(t, e = {}) { const s = "string" == typeof t ? document.querySelector(t) : t; s instanceof HTMLTableElement ? this.dom = s : (this.dom = document.createElement("table"), s.appendChild(this.dom)); const i = { ...Q.labels, ...e.labels }, n = { ...Q.classes, ...e.classes }; this.options = { ...Q, ...e, labels: i, classes: n }, this._initialInnerHTML = this.options.destroyable ? this.dom.innerHTML : "", this.options.tabIndex ? this.dom.tabIndex = this.options.tabIndex : this.options.rowNavigation && -1 === this.dom.tabIndex && (this.dom.tabIndex = 0), this._listeners = { onResize: () => this._onResize() }, this._dd = new T({ valueDiffing: !1 }), this.initialized = !1, this._events = {}, this._currentPage = 0, this.onFirstPage = !0, this.hasHeadings = !1, this.hasRows = !1, this._searchQueries = [], this.init() } init() { if (this.initialized || this.dom.classList.contains(this.options.classes.table)) return !1; this._virtualDOM = D(this.dom, { valueDiffing: !1 }), this._tableAttributes = { ...this._virtualDOM.attributes }, this.rows = new J(this), this.columns = new W(this), this.data = U(this.options.data, this.dom, this.columns.settings, this.options.type, this.options.format), this._render(), setTimeout((() => { this.emit("datatable.init"), this.initialized = !0 }), 10) } _render() { this.wrapperDOM = s("div", { class: `${this.options.classes.wrapper} ${this.options.classes.loading}` }), this.wrapperDOM.innerHTML = this.options.template(this.options, this.dom); const t = this.wrapperDOM.querySelector(`select.${this.options.classes.selector}`); t && this.options.paging && this.options.perPageSelect ? this.options.perPageSelect.forEach((e => { const [s, i] = Array.isArray(e) ? [e[0], e[1]] : [String(e), e], n = i === this.options.perPage, a = new Option(s, String(i), n, n); t.appendChild(a) })) : t && t.parentElement.removeChild(t), this.containerDOM = this.wrapperDOM.querySelector(`.${this.options.classes.container}`), this._pagerDOMs = [], Array.from(this.wrapperDOM.querySelectorAll(`.${this.options.classes.pagination}`)).forEach((t => { t instanceof HTMLElement && (t.innerHTML = `<ul class="${this.options.classes.paginationList}"></ul>`, this._pagerDOMs.push(t.firstElementChild)) })), this._virtualPagerDOM = { nodeName: "UL", attributes: { class: this.options.classes.paginationList } }, this._label = this.wrapperDOM.querySelector(`.${this.options.classes.info}`), this.dom.parentElement.replaceChild(this.wrapperDOM, this.dom), this.containerDOM.appendChild(this.dom), this._rect = this.dom.getBoundingClientRect(), this._fixHeight(), this.options.header || this.wrapperDOM.classList.add("no-header"), this.options.footer || this.wrapperDOM.classList.add("no-footer"), this.options.sortable && this.wrapperDOM.classList.add("sortable"), this.options.searchable && this.wrapperDOM.classList.add("searchable"), this.options.fixedHeight && this.wrapperDOM.classList.add("fixed-height"), this.options.fixedColumns && this.wrapperDOM.classList.add("fixed-columns"), this._bindEvents(), this.columns._state.sort && this.columns.sort(this.columns._state.sort.column, this.columns._state.sort.dir, !0), this.update(!0) } _renderTable(t = {}) { let e = P(this._tableAttributes, this.data.headings, (this.options.paging || this._searchQueries.length) && this._currentPage && this.pages.length && !t.noPaging ? this.pages[this._currentPage - 1] : this.data.data.map(((t, e) => ({ row: t, index: e }))), this.columns.settings, this.columns._state, this.rows.cursor, this.options, t); if (this.options.tableRender) { const t = this.options.tableRender(this.data, e, "main"); t && (e = t) } const s = this._dd.diff(this._virtualDOM, e); this._dd.apply(this.dom, s), this._virtualDOM = e } _renderPage(t = !1) { this.hasRows && this.totalPages ? (this._currentPage > this.totalPages && (this._currentPage = 1), this._renderTable(), this.onFirstPage = 1 === this._currentPage, this.onLastPage = this._currentPage === this.lastPage) : this.setMessage(this.options.labels.noRows); let e, s = 0, i = 0, n = 0; if (this.totalPages && (s = this._currentPage - 1, i = s * this.options.perPage, n = i + this.pages[s].length, i += 1, e = this._searchQueries.length ? this._searchData.length : this.data.data.length), this._label && this.options.labels.info.length) { const t = this.options.labels.info.replace("{start}", String(i)).replace("{end}", String(n)).replace("{page}", String(this._currentPage)).replace("{pages}", String(this.totalPages)).replace("{rows}", String(e)); this._label.innerHTML = e ? t : "" } if (1 == this._currentPage && this._fixHeight(), this.options.rowNavigation && this._currentPage && (!this.rows.cursor || !this.pages[this._currentPage - 1].find((t => t.index === this.rows.cursor)))) { const e = this.pages[this._currentPage - 1]; e.length && (t ? this.rows.setCursor(e[e.length - 1].index) : this.rows.setCursor(e[0].index)) } } _renderPagers() { if (!this.options.paging) return; let t = X(this.onFirstPage, this.onLastPage, this._currentPage, this.totalPages, this.options); if (this.options.pagerRender) { const e = this.options.pagerRender([this.onFirstPage, this.onLastPage, this._currentPage, this.totalPages], t); e && (t = e) } const e = this._dd.diff(this._virtualPagerDOM, t); this._pagerDOMs.forEach((t => { this._dd.apply(t, e) })), this._virtualPagerDOM = t } _renderSeparateHeader() { const t = this.dom.parentElement; this.headerDOM || (this.headerDOM = document.createElement("div"), this._virtualHeaderDOM = { nodeName: "DIV" }), t.parentElement.insertBefore(this.headerDOM, t); let e = { nodeName: "TABLE", attributes: { class: this.options.classes.table }, childNodes: [{ nodeName: "THEAD", childNodes: [A(this.data.headings, this.columns.settings, this.columns._state, this.options, { unhideHeader: !0 })] }] }; if (this.options.tableRender) { const t = this.options.tableRender(this.data, e, "header"); t && (e = t) } const s = { nodeName: "DIV", attributes: { class: this.options.classes.headercontainer }, childNodes: [e] }, i = this._dd.diff(this._virtualHeaderDOM, s); this._dd.apply(this.headerDOM, i), this._virtualHeaderDOM = s; const n = this.headerDOM.firstElementChild.clientWidth - this.dom.clientWidth; if (n) { const t = structuredClone(this._virtualHeaderDOM); t.attributes.style = `padding-right: ${n}px;`; const e = this._dd.diff(this._virtualHeaderDOM, t); this._dd.apply(this.headerDOM, e), this._virtualHeaderDOM = t } t.scrollHeight > t.clientHeight && (t.style.overflowY = "scroll") } _bindEvents() { if (this.options.perPageSelect) { const t = this.wrapperDOM.querySelector(`select.${this.options.classes.selector}`); t && t instanceof HTMLSelectElement && t.addEventListener("change", (() => { this.options.perPage = parseInt(t.value, 10), this.update(), this._fixHeight(), this.emit("datatable.perpage", this.options.perPage) }), !1) } this.options.searchable && this.wrapperDOM.addEventListener("keyup", (t => { const e = t.target; if (!(e instanceof HTMLInputElement && e.matches(`.${this.options.classes.input}`))) return; t.preventDefault(); const s = Array.from(this.wrapperDOM.querySelectorAll(`.${this.options.classes.input}`)).filter((t => t.value.length)).map((t => t.dataset.columns ? { term: t.value, columns: JSON.parse(t.dataset.columns) } : { term: t.value, columns: void 0 })); if (1 === s.length) { const t = s[0]; this.search(t.term, t.columns) } else this.multiSearch(s) })), this.wrapperDOM.addEventListener("click", (t => { const e = t.target.closest("a"); if (e) if (e.hasAttribute("data-page")) this.page(parseInt(e.getAttribute("data-page"), 10)), t.preventDefault(); else if (e.classList.contains(this.options.classes.sorter)) { const s = Array.from(e.parentElement.parentElement.children).indexOf(e.parentElement), i = a(s, this.columns.settings); this.columns.sort(i), t.preventDefault() } else if (e.classList.contains(this.options.classes.filter)) { const s = Array.from(e.parentElement.parentElement.children).indexOf(e.parentElement), i = a(s, this.columns.settings); this.columns.filter(i), t.preventDefault() } }), !1), this.options.rowNavigation ? (this.dom.addEventListener("keydown", (t => { if ("ArrowUp" === t.key) { let e; t.preventDefault(), t.stopPropagation(), this.pages[this._currentPage - 1].find((t => t.index === this.rows.cursor || (e = t, !1))), e ? this.rows.setCursor(e.index) : this.onFirstPage || this.page(this._currentPage - 1, !0) } else if ("ArrowDown" === t.key) { let e; t.preventDefault(), t.stopPropagation(); const s = this.pages[this._currentPage - 1].find((t => !!e || (t.index === this.rows.cursor && (e = !0), !1))); s ? this.rows.setCursor(s.index) : this.onLastPage || this.page(this._currentPage + 1) } else["Enter", " "].includes(t.key) && this.emit("datatable.selectrow", this.rows.cursor, t) })), this.dom.addEventListener("mousedown", (t => { const e = t.target; if (e instanceof Element && this.dom.matches(":focus")) { const s = Array.from(this.dom.querySelectorAll("body tr")).find((t => t.contains(e))); s && s instanceof HTMLElement && this.emit("datatable.selectrow", parseInt(s.dataset.index, 10), t) } }))) : this.dom.addEventListener("mousedown", (t => { const e = t.target; if (!(e instanceof Element)) return; const s = Array.from(this.dom.querySelectorAll("body tr")).find((t => t.contains(e))); s && s instanceof HTMLElement && this.emit("datatable.selectrow", parseInt(s.dataset.index, 10), t) })), window.addEventListener("resize", this._listeners.onResize) } _onResize() { this._rect = this.containerDOM.getBoundingClientRect(), this._rect.width && this.update(!0) } destroy() { this.options.destroyable && (this.dom.innerHTML = this._initialInnerHTML, this.dom.classList.remove(this.options.classes.table), this.wrapperDOM.parentElement && this.wrapperDOM.parentElement.replaceChild(this.dom, this.wrapperDOM), this.initialized = !1, window.removeEventListener("resize", this._listeners.onResize)) } update(t = !1) { t && (this.columns._measureWidths(), this.hasRows = Boolean(this.data.data.length), this.hasHeadings = Boolean(this.data.headings.length)), this.wrapperDOM.classList.remove(this.options.classes.empty), this._paginate(), this._renderPage(), this._renderPagers(), this.options.scrollY.length && this._renderSeparateHeader(), this.emit("datatable.update") } _paginate() { let t = this.data.data.map(((t, e) => ({ row: t, index: e }))); return this._searchQueries.length && (t = [], this._searchData.forEach((e => t.push({ index: e, row: this.data.data[e] })))), this.columns._state.filters.length && this.columns._state.filters.forEach(((e, s) => { e && (t = t.filter((t => "function" == typeof e ? e(t.row[s].data) : (t.row[s].text ?? t.row[s].data) === e))) })), this.options.paging && this.options.perPage > 0 ? this.pages = t.map(((e, s) => s % this.options.perPage == 0 ? t.slice(s, s + this.options.perPage) : null)).filter((t => t)) : this.pages = [t], this.totalPages = this.lastPage = this.pages.length, this._currentPage || (this._currentPage = 1), this.totalPages } _fixHeight() { this.options.fixedHeight && (this.containerDOM.style.height = null, this._rect = this.containerDOM.getBoundingClientRect(), this.containerDOM.style.height = `${this._rect.height}px`) } search(t, e) { if (!t.length) return this._currentPage = 1, this._searchQueries = [], this._searchData = [], this.update(), this.emit("datatable.search", "", []), this.wrapperDOM.classList.remove("search-results"), !1; this.multiSearch([{ term: t, columns: e || void 0 }]), this.emit("datatable.search", t, this._searchData) } multiSearch(t) { if (!this.hasRows) return !1; if (this._currentPage = 1, this._searchQueries = t, this._searchData = [], !(t = t.filter((t => t.term.length))).length) return this.update(), this.emit("datatable.multisearch", t, this._searchData), this.wrapperDOM.classList.remove("search-results"), !1; const e = t.map((t => this.columns.settings.map(((e, s) => { if (e.hidden || !e.searchable || t.columns && !t.columns.includes(s)) return !1; let i = t.term; const n = e.sensitivity || this.options.sensitivity;["base", "accent"].includes(n) && (i = i.toLowerCase()), ["base", "case"].includes(n) && (i = i.normalize("NFD").replace(/\p{Diacritic}/gu, "")); return (e.ignorePunctuation || this.options.ignorePunctuation) && (i = i.replace(/[.,/#!$%^&*;:{}=-_`~()]/g, "")), i })))); this.data.data.forEach(((t, s) => { const i = t.map(((t, e) => { let s = (t.text || String(t.data)).trim(); if (s.length) { const t = this.columns.settings[e], i = t.sensitivity || this.options.sensitivity;["base", "accent"].includes(i) && (s = s.toLowerCase()), ["base", "case"].includes(i) && (s = s.normalize("NFD").replace(/\p{Diacritic}/gu, "")); (t.ignorePunctuation || this.options.ignorePunctuation) && (s = s.replace(/[.,/#!$%^&*;:{}=-_`~()]/g, "")) } return s })); e.every((t => t.find(((t, e) => !!t && t.split(" ").find((t => i[e].includes(t))))))) && this._searchData.push(s) })), this.wrapperDOM.classList.add("search-results"), this._searchData.length ? this.update() : (this.wrapperDOM.classList.remove("search-results"), this.setMessage(this.options.labels.noResults)), this.emit("datatable.multisearch", t, this._searchData) } page(t, e = !1) { return t !== this._currentPage && (isNaN(t) || (this._currentPage = t), !(t > this.pages.length || t < 0) && (this._renderPage(e), this._renderPagers(), void this.emit("datatable.page", t))) } insert(e) { let s = []; if (Array.isArray(e)) { const t = this.data.headings.map((t => t.text ?? String(t.data))); e.forEach(((e, i) => { const n = []; Object.entries(e).forEach((([e, s]) => { const a = t.indexOf(e); a > -1 ? n[a] = F(s, this.columns.settings[a]) : this.hasHeadings || this.hasRows || 0 !== i || (n[t.length] = F(s, this.columns.settings[t.length]), t.push(e), this.data.headings.push(z(e))) })), s.push(n) })) } else t(e) && (!e.headings || this.hasHeadings || this.hasRows ? e.data && Array.isArray(e.data) && (s = e.data.map((t => t.map(((t, e) => F(t, this.columns.settings[e])))))) : this.data = U(e, void 0, this.columns.settings, this.options.type, this.options.format)); s.length && s.forEach((t => this.data.data.push(t))), this.hasHeadings = Boolean(this.data.headings.length), this.columns._state.sort && this.columns.sort(this.columns._state.sort.column, this.columns._state.sort.dir, !0), this.update(!0) } refresh() { this.options.searchable && (Array.from(this.wrapperDOM.querySelectorAll(`.${this.options.classes.input}`)).forEach((t => { t.value = "" })), this._searchQueries = []), this._currentPage = 1, this.onFirstPage = !0, this.update(!0), this.emit("datatable.refresh") } print() { const t = s("table"); let e = P(this._tableAttributes, this.data.headings, this.data.data.map(((t, e) => ({ row: t, index: e }))), this.columns.settings, this.columns._state, !1, this.options, { noColumnWidths: !0, unhideHeader: !0 }); if (this.options.tableRender) { const t = this.options.tableRender(this.data, e, "print"); t && (e = t) } const i = this._dd.diff({ nodeName: "TABLE" }, e); this._dd.apply(t, i); const n = window.open(); n.document.body.appendChild(t), n.print() } setMessage(t) { const e = this.data.headings.filter(((t, e) => !this.columns.settings[e]?.hidden)).length || 1; this.wrapperDOM.classList.add(this.options.classes.empty), this._label && (this._label.innerHTML = ""), this.totalPages = 0, this._renderPagers(); let s = { nodeName: "TABLE", attributes: { class: this.options.classes.table }, childNodes: [{ nodeName: "THEAD", childNodes: [A(this.data.headings, this.columns.settings, this.columns._state, this.options, {})] }, { nodeName: "TBODY", childNodes: [{ nodeName: "TR", childNodes: [{ nodeName: "TD", attributes: { class: this.options.classes.empty, colspan: String(e) }, childNodes: [{ nodeName: "#text", data: t }] }] }] }] }; if (this.options.tableRender) { const t = this.options.tableRender(this.data, s, "message"); t && (s = t) } const i = this._dd.diff(this._virtualDOM, s); this._dd.apply(this.dom, i), this._virtualDOM = s } on(t, e) { this._events[t] = this._events[t] || [], this._events[t].push(e) } off(t, e) { t in this._events != !1 && this._events[t].splice(this._events[t].indexOf(e), 1) } emit(t, ...e) { if (t in this._events != !1) for (let s = 0; s < this._events[t].length; s++)this._events[t][s](...e) } }, exports.convertCSV = function (e) { let s; if (!t(e)) return !1; const i = { lineDelimiter: "\n", columnDelimiter: ",", removeDoubleQuotes: !1, ...e }; if (i.data.length) { s = { data: [] }; const t = i.data.split(i.lineDelimiter); if (t.length && (i.headings && (s.headings = t[0].split(i.columnDelimiter), i.removeDoubleQuotes && (s.headings = s.headings.map((t => t.trim().replace(/(^"|"$)/g, "")))), t.shift()), t.forEach(((t, e) => { s.data[e] = []; const n = t.split(i.columnDelimiter); n.length && n.forEach((t => { i.removeDoubleQuotes && (t = t.trim().replace(/(^"|"$)/g, "")), s.data[e].push(t) })) }))), s) return s } return !1 }, exports.convertJSON = function (s) { let i; if (!t(s)) return !1; const n = { data: "", ...s }; if (n.data.length || t(n.data)) { const t = !!e(n.data) && JSON.parse(n.data); if (t ? (i = { headings: [], data: [] }, t.forEach(((t, e) => { i.data[e] = [], Object.entries(t).forEach((([t, s]) => { i.headings.includes(t) || i.headings.push(t), i.data[e].push(s) })) }))) : console.warn("That's not valid JSON!"), i) return i } return !1 }, exports.createElement = s, exports.exportCSV = function (e, s = {}) { if (!e.hasHeadings && !e.hasRows) return !1; if (!t(s)) return !1; const i = { download: !0, skipColumn: [], lineDelimiter: "\n", columnDelimiter: ",", ...s }, n = t => !i.skipColumn.includes(t) && !e.columns.settings[t]?.hidden; let a = []; const o = e.data.headings.filter(((t, e) => n(e))).map((t => t.text ?? t.data)); if (a[0] = o, i.selection) if (Array.isArray(i.selection)) for (let t = 0; t < i.selection.length; t++)a = a.concat(e.pages[i.selection[t] - 1].map((t => t.row.filter(((t, e) => n(e))).map((t => t.text ?? t.data))))); else a = a.concat(e.pages[i.selection - 1].map((t => t.row.filter(((t, e) => n(e))).map((t => t.text ?? t.data))))); else a = a.concat(e.data.data.map((t => t.filter(((t, e) => n(e))).map((t => t.text ?? t.data))))); if (a.length) { let t = ""; if (a.forEach((e => { e.forEach((e => { "string" == typeof e && (e = (e = (e = (e = (e = e.trim()).replace(/\s{2,}/g, " ")).replace(/\n/g, " ")).replace(/"/g, '""')).replace(/#/g, "%23")).includes(",") && (e = `"${e}"`), t += e + i.columnDelimiter })), t = t.trim().substring(0, t.length - 1), t += i.lineDelimiter })), t = t.trim().substring(0, t.length - 1), i.download) { const e = document.createElement("a"); e.href = encodeURI(`data:text/csv;charset=utf-8,${t}`), e.download = `${i.filename || "datatable_export"}.csv`, document.body.appendChild(e), e.click(), document.body.removeChild(e) } return t } return !1 }, exports.exportJSON = function (e, s = {}) { if (!e.hasHeadings && !e.hasRows) return !1; if (!t(s)) return !1; const i = { download: !0, skipColumn: [], replacer: null, space: 4, ...s }, n = t => !i.skipColumn.includes(t) && !e.columns.settings[t]?.hidden; let a = []; if (i.selection) if (Array.isArray(i.selection)) for (let t = 0; t < i.selection.length; t++)a = a.concat(e.pages[i.selection[t] - 1].map((t => t.row.filter(((t, e) => n(e))).map((t => t.data))))); else a = a.concat(e.pages[i.selection - 1].map((t => t.row.filter(((t, e) => n(e))).map((t => t.data))))); else a = a.concat(e.data.data.map((t => t.filter(((t, e) => n(e))).map((t => t.data))))); const o = e.data.headings.filter(((t, e) => n(e))).map((t => t.text ?? String(t.data))); if (a.length) { const t = []; a.forEach(((e, s) => { t[s] = t[s] || {}, e.forEach(((e, i) => { t[s][o[i]] = e })) })); const e = JSON.stringify(t, i.replacer, i.space); if (i.download) { const t = new Blob([e], { type: "data:application/json;charset=utf-8" }), s = URL.createObjectURL(t), n = document.createElement("a"); n.href = s, n.download = `${i.filename || "datatable_export"}.json`, document.body.appendChild(n), n.click(), document.body.removeChild(n), URL.revokeObjectURL(s) } return e } return !1 }, exports.exportSQL = function (e, s = {}) { if (!e.hasHeadings && !e.hasRows) return !1; if (!t(s)) return !1; const i = { download: !0, skipColumn: [], tableName: "myTable", ...s }, n = t => !i.skipColumn.includes(t) && !e.columns.settings[t]?.hidden; let a = []; if (i.selection) if (Array.isArray(i.selection)) for (let t = 0; t < i.selection.length; t++)a = a.concat(e.pages[i.selection[t] - 1].map((t => t.row.filter(((t, e) => n(e))).map((t => t.text ?? t.data))))); else a = a.concat(e.pages[i.selection - 1].map((t => t.row.filter(((t, e) => n(e))).map((t => t.text ?? t.data))))); else a = a.concat(e.data.data.map((t => t.filter(((t, e) => n(e))).map((t => t.data))))); const o = e.data.headings.filter(((t, e) => n(e))).map((t => t.text ?? String(t.data))); if (a.length) { let t = `INSERT INTO \`${i.tableName}\` (`; if (o.forEach((e => { t += `\`${e}\`,` })), t = t.trim().substring(0, t.length - 1), t += ") VALUES ", a.forEach((e => { t += "(", e.forEach((e => { t += "string" == typeof e ? `"${e}",` : `${e},` })), t = t.trim().substring(0, t.length - 1), t += ")," })), t = t.trim().substring(0, t.length - 1), t += ";", i.download && (t = `data:application/sql;charset=utf-8,${t}`), i.download) { const e = document.createElement("a"); e.href = encodeURI(t), e.download = `${i.filename || "datatable_export"}.sql`, document.body.appendChild(e), e.click(), document.body.removeChild(e) } return t } return !1 }, exports.exportTXT = function (e, s = {}) { if (!e.hasHeadings && !e.hasRows) return !1; if (!t(s)) return !1; const i = { download: !0, skipColumn: [], lineDelimiter: "\n", columnDelimiter: ",", ...s }, n = t => !i.skipColumn.includes(t) && !e.columns.settings[t]?.hidden; let a = []; const o = e.data.headings.filter(((t, e) => n(e))).map((t => t.text ?? t.data)); if (a[0] = o, i.selection) if (Array.isArray(i.selection)) for (let t = 0; t < i.selection.length; t++)a = a.concat(e.pages[i.selection[t] - 1].map((t => t.row.filter(((t, e) => n(e))).map((t => t.data))))); else a = a.concat(e.pages[i.selection - 1].map((t => t.row.filter(((t, e) => n(e))).map((t => t.data))))); else a = a.concat(e.data.data.map((t => t.filter(((t, e) => n(e))).map((t => t.data))))); if (a.length) { let t = ""; if (a.forEach((e => { e.forEach((e => { "string" == typeof e && (e = (e = (e = (e = (e = e.trim()).replace(/\s{2,}/g, " ")).replace(/\n/g, " ")).replace(/"/g, '""')).replace(/#/g, "%23")).includes(",") && (e = `"${e}"`), t += e + i.columnDelimiter })), t = t.trim().substring(0, t.length - 1), t += i.lineDelimiter })), t = t.trim().substring(0, t.length - 1), i.download && (t = `data:text/csv;charset=utf-8,${t}`), i.download) { const e = document.createElement("a"); e.href = encodeURI(t), e.download = `${i.filename || "datatable_export"}.txt`, document.body.appendChild(e), e.click(), document.body.removeChild(e) } return t } return !1 }, exports.isJson = e, exports.isObject = t, exports.makeEditable = function (t, e = {}) { const s = new K(t, e); return t.initialized ? s.init() : t.on("datatable.init", (() => s.init())), s };
}).call(this)
}).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
}, {}]
}, {}, [1])(1)
});
This diff could not be displayed because it is too large.
/**
* PHP Email Form Validation - v3.6
* URL: https://bootstrapmade.com/php-email-form/
* Author: BootstrapMade.com
*/
(function () {
"use strict";
let forms = document.querySelectorAll('.php-email-form');
forms.forEach( function(e) {
e.addEventListener('submit', function(event) {
event.preventDefault();
let thisForm = this;
let action = thisForm.getAttribute('action');
let recaptcha = thisForm.getAttribute('data-recaptcha-site-key');
if( ! action ) {
displayError(thisForm, 'The form action property is not set!');
return;
}
thisForm.querySelector('.loading').classList.add('d-block');
thisForm.querySelector('.error-message').classList.remove('d-block');
thisForm.querySelector('.sent-message').classList.remove('d-block');
let formData = new FormData( thisForm );
if ( recaptcha ) {
if(typeof grecaptcha !== "undefined" ) {
grecaptcha.ready(function() {
try {
grecaptcha.execute(recaptcha, {action: 'php_email_form_submit'})
.then(token => {
formData.set('recaptcha-response', token);
php_email_form_submit(thisForm, action, formData);
})
} catch(error) {
displayError(thisForm, error);
}
});
} else {
displayError(thisForm, 'The reCaptcha javascript API url is not loaded!')
}
} else {
php_email_form_submit(thisForm, action, formData);
}
});
});
function php_email_form_submit(thisForm, action, formData) {
fetch(action, {
method: 'POST',
body: formData,
headers: {'X-Requested-With': 'XMLHttpRequest'}
})
.then(response => {
if( response.ok ) {
return response.text();
} else {
throw new Error(`${response.status} ${response.statusText} ${response.url}`);
}
})
.then(data => {
thisForm.querySelector('.loading').classList.remove('d-block');
if (data.trim() == 'OK') {
thisForm.querySelector('.sent-message').classList.add('d-block');
thisForm.reset();
} else {
throw new Error(data ? data : 'Form submission failed and no error message returned from: ' + action);
}
})
.catch((error) => {
displayError(thisForm, error);
});
}
function displayError(thisForm, error) {
thisForm.querySelector('.loading').classList.remove('d-block');
thisForm.querySelector('.error-message').innerHTML = error;
thisForm.querySelector('.error-message').classList.add('d-block');
}
})();
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment