diff --git a/app/Transformers/V2/AccountTransformer.php b/app/Transformers/V2/AccountTransformer.php index 175704ca03..74b198976b 100644 --- a/app/Transformers/V2/AccountTransformer.php +++ b/app/Transformers/V2/AccountTransformer.php @@ -144,15 +144,15 @@ class AccountTransformer extends AbstractTransformer 'currency_symbol' => $currency->symbol, 'currency_decimal_places' => (int)$currency->decimal_places, - 'native_id' => (string)$this->default->id, - 'native_code' => $this->default->code, - 'native_symbol' => $this->default->symbol, - 'native_decimal_places' => (int)$this->default->decimal_places, + 'native_currency_id' => (string)$this->default->id, + 'native_currency_code' => $this->default->code, + 'native_currency_symbol' => $this->default->symbol, + 'native_currency_decimal_places' => (int)$this->default->decimal_places, // balance: - 'current_balance' => $balance, - 'native_current_balance' => $nativeBalance, - 'current_balance_date' => $this->getDate(), + 'current_balance' => $balance, + 'native_current_balance' => $nativeBalance, + 'current_balance_date' => $this->getDate(), // more meta @@ -173,7 +173,7 @@ class AccountTransformer extends AbstractTransformer // 'longitude' => $longitude, // 'latitude' => $latitude, // 'zoom_level' => $zoomLevel, - 'links' => [ + 'links' => [ [ 'rel' => 'self', 'uri' => '/accounts/' . $account->id, diff --git a/app/Transformers/V2/BillTransformer.php b/app/Transformers/V2/BillTransformer.php index 3693384e3e..e4b529c61c 100644 --- a/app/Transformers/V2/BillTransformer.php +++ b/app/Transformers/V2/BillTransformer.php @@ -107,6 +107,7 @@ class BillTransformer extends AbstractTransformer } $this->default = app('amount')->getDefaultCurrency(); $this->converter = new ExchangeRateConverter(); + // grab all paid dates: if (null !== $this->parameters->get('start') && null !== $this->parameters->get('end')) { $journals = TransactionJournal::whereIn('bill_id', $bills) @@ -128,6 +129,7 @@ class BillTransformer extends AbstractTransformer } /** @var TransactionJournal $journal */ foreach ($journals as $journal) { + app('log')->debug(sprintf('Processing journal #%d', $journal->id)); $transaction = $transactions[(int)$journal->id] ?? []; $billId = (int)$journal->bill_id; $currencyId = (int)$transaction['transaction_currency_id'] ?? 0; @@ -139,7 +141,9 @@ class BillTransformer extends AbstractTransformer $foreignCurrencyName = null; $foreignCurrencySymbol = null; $foreignCurrencyDp = null; + app('log')->debug('Foreign currency is NULL'); if (null !== $transaction['foreign_currency_id']) { + app('log')->debug(sprintf('Foreign currency is #%d', $transaction['foreign_currency_id'])); $foreignCurrencyId = (int)$transaction['foreign_currency_id']; $currencies[$foreignCurrencyId] = $currencies[$foreignCurrencyId] ?? TransactionCurrency::find($foreignCurrencyId); $foreignCurrencyCode = $currencies[$foreignCurrencyId]->code; @@ -157,10 +161,10 @@ class BillTransformer extends AbstractTransformer 'currency_name' => $currencies[$currencyId]->name, 'currency_symbol' => $currencies[$currencyId]->symbol, 'currency_decimal_places' => (int)$currencies[$currencyId]->decimal_places, - 'native_id' => (int)$currencies[$currencyId]->id, - 'native_code' => $currencies[$currencyId]->code, - 'native_symbol' => $currencies[$currencyId]->symbol, - 'native_decimal_places' => (int)$currencies[$currencyId]->decimal_places, + 'native_currency_id' => (int)$currencies[$currencyId]->id, + 'native_currency_code' => $currencies[$currencyId]->code, + 'native_currency_symbol' => $currencies[$currencyId]->symbol, + 'native_currency_decimal_places' => (int)$currencies[$currencyId]->decimal_places, 'foreign_currency_id' => $foreignCurrencyId, 'foreign_currency_code' => $foreignCurrencyCode, 'foreign_currency_name' => $foreignCurrencyName, @@ -169,7 +173,9 @@ class BillTransformer extends AbstractTransformer 'amount' => $transaction['amount'], 'foreign_amount' => $transaction['foreign_amount'], 'native_amount' => $this->converter->convert($currencies[$currencyId], $this->default, $journal->date, $transaction['amount']), - 'foreign_native_amount' => null === $transaction['foreign_amount'] ? null : $this->converter->convert($currencies[$foreignCurrencyId], $this->default, $journal->date, $transaction['foreign_amount']), + 'foreign_native_amount' => '' === (string)$transaction['foreign_amount'] ? null : $this->converter->convert( + $currencies[$foreignCurrencyId], + $this->default, $journal->date, $transaction['foreign_amount']), ]; } } @@ -199,40 +205,40 @@ class BillTransformer extends AbstractTransformer $nextExpectedMatchDiff = $this->getNextExpectedMatchDiff($nextExpectedMatch, $payDates); return [ - 'id' => (int)$bill->id, - 'created_at' => $bill->created_at->toAtomString(), - 'updated_at' => $bill->updated_at->toAtomString(), - 'name' => $bill->name, - 'amount_min' => app('steam')->bcround($bill->amount_min, $currency->decimal_places), - 'amount_max' => app('steam')->bcround($bill->amount_max, $currency->decimal_places), - 'native_amount_min' => $this->converter->convert($currency, $this->default, $date, $bill->amount_min), - 'native_amount_max' => $this->converter->convert($currency, $this->default, $date, $bill->amount_max), - 'currency_id' => (string)$bill->transaction_currency_id, - 'currency_code' => $currency->code, - 'currency_name' => $currency->name, - 'currency_symbol' => $currency->symbol, - 'currency_decimal_places' => (int)$currency->decimal_places, - 'native_id' => $this->default->id, - 'native_code' => $this->default->code, - 'native_name' => $this->default->name, - 'native_symbol' => $this->default->symbol, - 'native_decimal_places' => (int)$this->default->decimal_places, - 'date' => $bill->date->toAtomString(), - 'end_date' => $bill->end_date?->toAtomString(), - 'extension_date' => $bill->extension_date?->toAtomString(), - 'repeat_freq' => $bill->repeat_freq, - 'skip' => (int)$bill->skip, - 'active' => $bill->active, - 'order' => (int)$bill->order, - 'notes' => $this->notes[(int)$bill->id] ?? null, - 'object_group_id' => $group ? $group['object_group_id'] : null, - 'object_group_order' => $group ? $group['object_group_order'] : null, - 'object_group_title' => $group ? $group['object_group_title'] : null, - 'next_expected_match' => $nextExpectedMatch->toAtomString(), - 'next_expected_match_diff' => $nextExpectedMatchDiff, - 'pay_dates' => $payDates, - 'paid_dates' => $paidData, - 'links' => [ + 'id' => (int)$bill->id, + 'created_at' => $bill->created_at->toAtomString(), + 'updated_at' => $bill->updated_at->toAtomString(), + 'name' => $bill->name, + 'amount_min' => app('steam')->bcround($bill->amount_min, $currency->decimal_places), + 'amount_max' => app('steam')->bcround($bill->amount_max, $currency->decimal_places), + 'native_amount_min' => $this->converter->convert($currency, $this->default, $date, $bill->amount_min), + 'native_amount_max' => $this->converter->convert($currency, $this->default, $date, $bill->amount_max), + 'currency_id' => (string)$bill->transaction_currency_id, + 'currency_code' => $currency->code, + 'currency_name' => $currency->name, + 'currency_symbol' => $currency->symbol, + 'currency_decimal_places' => (int)$currency->decimal_places, + 'native_currency_id' => $this->default->id, + 'native_currency_code' => $this->default->code, + 'native_currency_name' => $this->default->name, + 'native_currency_symbol' => $this->default->symbol, + 'native_currency_decimal_places' => (int)$this->default->decimal_places, + 'date' => $bill->date->toAtomString(), + 'end_date' => $bill->end_date?->toAtomString(), + 'extension_date' => $bill->extension_date?->toAtomString(), + 'repeat_freq' => $bill->repeat_freq, + 'skip' => (int)$bill->skip, + 'active' => $bill->active, + 'order' => (int)$bill->order, + 'notes' => $this->notes[(int)$bill->id] ?? null, + 'object_group_id' => $group ? $group['object_group_id'] : null, + 'object_group_order' => $group ? $group['object_group_order'] : null, + 'object_group_title' => $group ? $group['object_group_title'] : null, + 'next_expected_match' => $nextExpectedMatch->toAtomString(), + 'next_expected_match_diff' => $nextExpectedMatchDiff, + 'pay_dates' => $payDates, + 'paid_dates' => $paidData, + 'links' => [ [ 'rel' => 'self', 'uri' => sprintf('/bills/%d', $bill->id), diff --git a/app/Transformers/V2/PiggyBankTransformer.php b/app/Transformers/V2/PiggyBankTransformer.php index 7b649a925b..82e9b05de6 100644 --- a/app/Transformers/V2/PiggyBankTransformer.php +++ b/app/Transformers/V2/PiggyBankTransformer.php @@ -198,38 +198,38 @@ class PiggyBankTransformer extends AbstractTransformer } return [ - 'id' => (string)$piggyBank->id, - 'created_at' => $piggyBank->created_at->toAtomString(), - 'updated_at' => $piggyBank->updated_at->toAtomString(), - 'account_id' => (string)$piggyBank->account_id, - 'account_name' => $accountName, - 'name' => $piggyBank->name, - 'currency_id' => (string)$currency->id, - 'currency_code' => $currency->code, - 'currency_symbol' => $currency->symbol, - 'currency_decimal_places' => (int)$currency->decimal_places, - 'native_id' => (string)$this->default->id, - 'native_code' => $this->default->code, - 'native_symbol' => $this->default->symbol, - 'native_decimal_places' => (int)$this->default->decimal_places, - 'current_amount' => $currentAmount, - 'native_current_amount' => $nativeCurrentAmount, - 'target_amount' => $targetAmount, - 'native_target_amount' => $nativeTargetAmount, - 'percentage' => $percentage, - 'left_to_save' => $leftToSave, - 'native_left_to_save' => $nativeLeftToSave, - 'save_per_month' => $savePerMonth, - 'native_save_per_month' => $nativeSavePerMonth, - 'start_date' => $startDate, - 'target_date' => $targetDate, - 'order' => (int)$piggyBank->order, - 'active' => $piggyBank->active, - 'notes' => $note, - 'object_group_id' => $group ? $group['object_group_id'] : null, - 'object_group_order' => $group ? $group['object_group_order'] : null, - 'object_group_title' => $group ? $group['object_group_title'] : null, - 'links' => [ + 'id' => (string)$piggyBank->id, + 'created_at' => $piggyBank->created_at->toAtomString(), + 'updated_at' => $piggyBank->updated_at->toAtomString(), + 'account_id' => (string)$piggyBank->account_id, + 'account_name' => $accountName, + 'name' => $piggyBank->name, + 'currency_id' => (string)$currency->id, + 'currency_code' => $currency->code, + 'currency_symbol' => $currency->symbol, + 'currency_decimal_places' => (int)$currency->decimal_places, + 'native_currency_id' => (string)$this->default->id, + 'native_currency_code' => $this->default->code, + 'native_currency_symbol' => $this->default->symbol, + 'native_currency_decimal_places' => (int)$this->default->decimal_places, + 'current_amount' => $currentAmount, + 'native_current_amount' => $nativeCurrentAmount, + 'target_amount' => $targetAmount, + 'native_target_amount' => $nativeTargetAmount, + 'percentage' => $percentage, + 'left_to_save' => $leftToSave, + 'native_left_to_save' => $nativeLeftToSave, + 'save_per_month' => $savePerMonth, + 'native_save_per_month' => $nativeSavePerMonth, + 'start_date' => $startDate, + 'target_date' => $targetDate, + 'order' => (int)$piggyBank->order, + 'active' => $piggyBank->active, + 'notes' => $note, + 'object_group_id' => $group ? $group['object_group_id'] : null, + 'object_group_order' => $group ? $group['object_group_order'] : null, + 'object_group_title' => $group ? $group['object_group_title'] : null, + 'links' => [ [ 'rel' => 'self', 'uri' => '/piggy_banks/' . $piggyBank->id, diff --git a/app/Transformers/V2/TransactionGroupTransformer.php b/app/Transformers/V2/TransactionGroupTransformer.php index fcb4b89501..b6668b9433 100644 --- a/app/Transformers/V2/TransactionGroupTransformer.php +++ b/app/Transformers/V2/TransactionGroupTransformer.php @@ -36,7 +36,6 @@ use FireflyIII\Support\Http\Api\ExchangeRateConverter; use FireflyIII\Support\NullArrayObject; use Illuminate\Support\Collection; use Illuminate\Support\Facades\DB; -use Illuminate\Support\Facades\Log; use stdClass; /** @@ -192,11 +191,11 @@ class TransactionGroupTransformer extends AbstractTransformer 'currency_decimal_places' => (int)$transaction['currency_decimal_places'], // converted to native currency - 'native_id' => (string)$this->default->id, - 'native_code' => $this->default->code, - 'native_name' => $this->default->name, - 'native_symbol' => $this->default->symbol, - 'native_decimal_places' => (int)$this->default->decimal_places, + 'native_currency_id' => (string)$this->default->id, + 'native_currency_code' => $this->default->code, + 'native_currency_name' => $this->default->name, + 'native_currency_symbol' => $this->default->symbol, + 'native_currency_decimal_places' => (int)$this->default->decimal_places, // foreign currency amount: 'foreign_currency_id' => $this->stringFromArray($transaction, 'foreign_currency_id', null), diff --git a/public/.well-known/security.txt b/public/.well-known/security.txt index 96058bf3b1..b0a9e45f39 100644 --- a/public/.well-known/security.txt +++ b/public/.well-known/security.txt @@ -8,7 +8,7 @@ Hash: SHA256 # # 1. Your security report must be related to Firefly III or the associated tools # 2. There is no bug bounty program -# 3. Don't report denial of service attacks on the login form +# 3. Please don't report denial of service attacks on the login form # Contact: mailto:james@firefly-iii.org @@ -19,20 +19,23 @@ Policy: https://docs.firefly-iii.org/firefly-iii/support/ # # Thank you for your time! # +# Cheers, +# James +# -----BEGIN PGP SIGNATURE----- -iQJKBAABCAA0FiEEAvQEbEsjbgYJVxYStJoyS36tbYAFAmUEl4MWHGphbWVzQGZp -cmVmbHktaWlpLm9yZwAKCRC0mjJLfq1tgKipEADC1bsgtE7YNY+2W/qkX3sBlKc3 -E8tDV/dr7D+jWMpV81poGyDzEe8sytJ5DmZWGTFiQez6jxZN5czT5KxZ7fMQOzbw -kjT+S6CxKrvD2H05pe5v2ziY+lfDIVe4kI1vxYRB6bgTYi0pfGJF9woSH4qhwMMa -5cai0Rj6Ew9pHPx06BvcHOoNjOcmqPWRoBt5a1LOK8EqSMJHbdUv8deAbQSkO/8t -gDEA7FVRXXB0QRIraOR2cMtU2uW/o7NymDzZeaqWR9+g4eWeosRJjLA4K05akPx+ -3mrKG0qV76dBexfMC99IEfjgk+xiffxg2iiKh37uBbsgK74aakAujYta1q4SsX8d -BXMvBpSi6mFuw13tgeueQS7IKqZsbh3vb6M325Dkv+hRe1e/Tw+qE9OWNFBQ2WS4 -H+sJZ8u1Ke++BctttaNkAkOZF0l8+f7+aEZhEaIan31hq0Y1KpFNPLiPMvMEDDBZ -9OhqIZaWmpZv0vUu/pK+0IU5ESRAU8dSPLi1anj+LWSF+YkaOW8gmA5Di0Oiqta8 -xRDOaDSDgLN9ESd5gF8rca263AXeH1iPoPRHWPEFWgQPTcxVruwAhe7P+0dclCMx -8eIaHoc21VGk299lwiCy4X9Wxp2+tQFH9iQG+Lnd/koxnufE6vGEIBLMzPxij6L4 -2oFicDqAMXd0Ls8kWA== -=8skS +iQJKBAABCAA0FiEEAvQEbEsjbgYJVxYStJoyS36tbYAFAmUGj9gWHGphbWVzQGZp +cmVmbHktaWlpLm9yZwAKCRC0mjJLfq1tgA0WD/9cHNSphMqPx05Tkak5kNKsmyYW +YXZ4kcw5haLwcxk4ipudCzYLWejcXI7z/WVdYQrZVMw6Kaz6Z/ZgJQk6mQXTeb3L +WcmxmiKGQk5twnmIy7vpoBgt2QH70lhP/x+FH0w1j22RM5b66gj/BZBYowtmUI1L +HIwsTvtjBGZA8aJSPmtRGULJ45/GDZYi/Hjx49hPPLjIE8VP53Wa7L284i4R+gG9 +IEle9kqb2OUUp0+CmIXSKAvtFpDHt9Yc0AE6PU0WpSg3LI6NqyUiM2CdKvyKvtIV +Y15LoJTkTuORzudP1HCImfcQUdJgrMe1DGz2siHqxTJVDUwzEVc6mOkGnefhIpFy +jN0ik6pCSkLNsSYImQZq9H6d9yiPPYSR3JFjTDtEVnANjlT08ywPdsyWgvNaHHh1 +eMRy9+X24g9cQ7MqU77Y8p2/v3IudWbEsi+M1FUm4W0TE/MsNv9xydRvB6M41eVc +raYnk8cVmEzpjsyxi9lAqpk4+qYD04JecYCPxkX6XxkFxzswS20LR4VVOamfKgv1 +yIzg1sCMArHeq0OC1k6lskB8DTXvw5+838iw4h8I0T6MAqXj4RKv8C45w7+uSlG9 +oXhpUweiiRzyZPWbWXU7jC9BvDyqfuxq9jn4LFDzAOV0raLz6QThiUcR3f7h2Rvo +KiDjx3KprWU+swTosw== +=1jlJ -----END PGP SIGNATURE----- diff --git a/public/.well-known/security.txt.sig b/public/.well-known/security.txt.sig index b18c99117b..6f4360e7f6 100644 --- a/public/.well-known/security.txt.sig +++ b/public/.well-known/security.txt.sig @@ -1,17 +1,17 @@ -----BEGIN PGP SIGNATURE----- -iQJKBAABCAA0FiEEAvQEbEsjbgYJVxYStJoyS36tbYAFAmUEl4MWHGphbWVzQGZp -cmVmbHktaWlpLm9yZwAKCRC0mjJLfq1tgKipEADC1bsgtE7YNY+2W/qkX3sBlKc3 -E8tDV/dr7D+jWMpV81poGyDzEe8sytJ5DmZWGTFiQez6jxZN5czT5KxZ7fMQOzbw -kjT+S6CxKrvD2H05pe5v2ziY+lfDIVe4kI1vxYRB6bgTYi0pfGJF9woSH4qhwMMa -5cai0Rj6Ew9pHPx06BvcHOoNjOcmqPWRoBt5a1LOK8EqSMJHbdUv8deAbQSkO/8t -gDEA7FVRXXB0QRIraOR2cMtU2uW/o7NymDzZeaqWR9+g4eWeosRJjLA4K05akPx+ -3mrKG0qV76dBexfMC99IEfjgk+xiffxg2iiKh37uBbsgK74aakAujYta1q4SsX8d -BXMvBpSi6mFuw13tgeueQS7IKqZsbh3vb6M325Dkv+hRe1e/Tw+qE9OWNFBQ2WS4 -H+sJZ8u1Ke++BctttaNkAkOZF0l8+f7+aEZhEaIan31hq0Y1KpFNPLiPMvMEDDBZ -9OhqIZaWmpZv0vUu/pK+0IU5ESRAU8dSPLi1anj+LWSF+YkaOW8gmA5Di0Oiqta8 -xRDOaDSDgLN9ESd5gF8rca263AXeH1iPoPRHWPEFWgQPTcxVruwAhe7P+0dclCMx -8eIaHoc21VGk299lwiCy4X9Wxp2+tQFH9iQG+Lnd/koxnufE6vGEIBLMzPxij6L4 -2oFicDqAMXd0Ls8kWA== -=8skS +iQJKBAABCAA0FiEEAvQEbEsjbgYJVxYStJoyS36tbYAFAmUGj9gWHGphbWVzQGZp +cmVmbHktaWlpLm9yZwAKCRC0mjJLfq1tgA0WD/9cHNSphMqPx05Tkak5kNKsmyYW +YXZ4kcw5haLwcxk4ipudCzYLWejcXI7z/WVdYQrZVMw6Kaz6Z/ZgJQk6mQXTeb3L +WcmxmiKGQk5twnmIy7vpoBgt2QH70lhP/x+FH0w1j22RM5b66gj/BZBYowtmUI1L +HIwsTvtjBGZA8aJSPmtRGULJ45/GDZYi/Hjx49hPPLjIE8VP53Wa7L284i4R+gG9 +IEle9kqb2OUUp0+CmIXSKAvtFpDHt9Yc0AE6PU0WpSg3LI6NqyUiM2CdKvyKvtIV +Y15LoJTkTuORzudP1HCImfcQUdJgrMe1DGz2siHqxTJVDUwzEVc6mOkGnefhIpFy +jN0ik6pCSkLNsSYImQZq9H6d9yiPPYSR3JFjTDtEVnANjlT08ywPdsyWgvNaHHh1 +eMRy9+X24g9cQ7MqU77Y8p2/v3IudWbEsi+M1FUm4W0TE/MsNv9xydRvB6M41eVc +raYnk8cVmEzpjsyxi9lAqpk4+qYD04JecYCPxkX6XxkFxzswS20LR4VVOamfKgv1 +yIzg1sCMArHeq0OC1k6lskB8DTXvw5+838iw4h8I0T6MAqXj4RKv8C45w7+uSlG9 +oXhpUweiiRzyZPWbWXU7jC9BvDyqfuxq9jn4LFDzAOV0raLz6QThiUcR3f7h2Rvo +KiDjx3KprWU+swTosw== +=1jlJ -----END PGP SIGNATURE----- diff --git a/public/build/assets/dashboard-1fecd60d.js b/public/build/assets/dashboard-4ff29763.js similarity index 87% rename from public/build/assets/dashboard-1fecd60d.js rename to public/build/assets/dashboard-4ff29763.js index f62dbb86ff..4f3f816cfa 100644 --- a/public/build/assets/dashboard-1fecd60d.js +++ b/public/build/assets/dashboard-4ff29763.js @@ -15,7 +15,7 @@ ${a?'Expression: "'+a+`" * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */const elementMap=new Map,Data={set(t,e,a){elementMap.has(t)||elementMap.set(t,new Map);const n=elementMap.get(t);if(!n.has(e)&&n.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`);return}n.set(e,a)},get(t,e){return elementMap.has(t)&&elementMap.get(t).get(e)||null},remove(t,e){if(!elementMap.has(t))return;const a=elementMap.get(t);a.delete(e),a.size===0&&elementMap.delete(t)}},MAX_UID=1e6,MILLISECONDS_MULTIPLIER=1e3,TRANSITION_END="transitionend",parseSelector=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(e,a)=>`#${CSS.escape(a)}`)),t),toType=t=>t==null?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),getUID=t=>{do t+=Math.floor(Math.random()*MAX_UID);while(document.getElementById(t));return t},getTransitionDurationFromElement=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:a}=window.getComputedStyle(t);const n=Number.parseFloat(e),r=Number.parseFloat(a);return!n&&!r?0:(e=e.split(",")[0],a=a.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(a))*MILLISECONDS_MULTIPLIER)},triggerTransitionEnd=t=>{t.dispatchEvent(new Event(TRANSITION_END))},isElement=t=>!t||typeof t!="object"?!1:(typeof t.jquery<"u"&&(t=t[0]),typeof t.nodeType<"u"),getElement=t=>isElement(t)?t.jquery?t[0]:t:typeof t=="string"&&t.length>0?document.querySelector(parseSelector(t)):null,isVisible=t=>{if(!isElement(t)||t.getClientRects().length===0)return!1;const e=getComputedStyle(t).getPropertyValue("visibility")==="visible",a=t.closest("details:not([open])");if(!a)return e;if(a!==t){const n=t.closest("summary");if(n&&n.parentNode!==a||n===null)return!1}return e},isDisabled=t=>!t||t.nodeType!==Node.ELEMENT_NODE||t.classList.contains("disabled")?!0:typeof t.disabled<"u"?t.disabled:t.hasAttribute("disabled")&&t.getAttribute("disabled")!=="false",findShadowRoot=t=>{if(!document.documentElement.attachShadow)return null;if(typeof t.getRootNode=="function"){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?findShadowRoot(t.parentNode):null},noop$3=()=>{},reflow=t=>{t.offsetHeight},getjQuery=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,DOMContentLoadedCallbacks=[],onDOMContentLoaded=t=>{document.readyState==="loading"?(DOMContentLoadedCallbacks.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of DOMContentLoadedCallbacks)e()}),DOMContentLoadedCallbacks.push(t)):t()},isRTL=()=>document.documentElement.dir==="rtl",defineJQueryPlugin=t=>{onDOMContentLoaded(()=>{const e=getjQuery();if(e){const a=t.NAME,n=e.fn[a];e.fn[a]=t.jQueryInterface,e.fn[a].Constructor=t,e.fn[a].noConflict=()=>(e.fn[a]=n,t.jQueryInterface)}})},execute=(t,e=[],a=t)=>typeof t=="function"?t(...e):a,executeAfterTransition=(t,e,a=!0)=>{if(!a){execute(t);return}const n=5,r=getTransitionDurationFromElement(e)+n;let i=!1;const o=({target:s})=>{s===e&&(i=!0,e.removeEventListener(TRANSITION_END,o),execute(t))};e.addEventListener(TRANSITION_END,o),setTimeout(()=>{i||triggerTransitionEnd(e)},r)},getNextActiveElement=(t,e,a,n)=>{const r=t.length;let i=t.indexOf(e);return i===-1?!a&&n?t[r-1]:t[0]:(i+=a?1:-1,n&&(i=(i+r)%r),t[Math.max(0,Math.min(i,r-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(t,e){return e&&`${e}::${uidEvent++}`||t.uidEvent||uidEvent++}function getElementEvents(t){const e=makeEventUid(t);return t.uidEvent=e,eventRegistry[e]=eventRegistry[e]||{},eventRegistry[e]}function bootstrapHandler(t,e){return function a(n){return hydrateObj(n,{delegateTarget:t}),a.oneOff&&EventHandler.off(t,n.type,e),e.apply(t,[n])}}function bootstrapDelegationHandler(t,e,a){return function n(r){const i=t.querySelectorAll(e);for(let{target:o}=r;o&&o!==this;o=o.parentNode)for(const s of i)if(s===o)return hydrateObj(r,{delegateTarget:o}),n.oneOff&&EventHandler.off(t,r.type,e,a),a.apply(o,[r])}}function findHandler(t,e,a=null){return Object.values(t).find(n=>n.callable===e&&n.delegationSelector===a)}function normalizeParameters(t,e,a){const n=typeof e=="string",r=n?a:e||a;let i=getTypeEvent(t);return nativeEvents.has(i)||(i=t),[n,r,i]}function addHandler(t,e,a,n,r){if(typeof e!="string"||!t)return;let[i,o,s]=normalizeParameters(e,a,n);e in customEvents&&(o=(p=>function(v){if(!v.relatedTarget||v.relatedTarget!==v.delegateTarget&&!v.delegateTarget.contains(v.relatedTarget))return p.call(this,v)})(o));const l=getElementEvents(t),u=l[s]||(l[s]={}),c=findHandler(u,o,i?a:null);if(c){c.oneOff=c.oneOff&&r;return}const d=makeEventUid(o,e.replace(namespaceRegex,"")),h=i?bootstrapDelegationHandler(t,a,o):bootstrapHandler(t,o);h.delegationSelector=i?a:null,h.callable=o,h.oneOff=r,h.uidEvent=d,u[d]=h,t.addEventListener(s,h,i)}function removeHandler(t,e,a,n,r){const i=findHandler(e[a],n,r);i&&(t.removeEventListener(a,i,!!r),delete e[a][i.uidEvent])}function removeNamespacedHandlers(t,e,a,n){const r=e[a]||{};for(const[i,o]of Object.entries(r))i.includes(n)&&removeHandler(t,e,a,o.callable,o.delegationSelector)}function getTypeEvent(t){return t=t.replace(stripNameRegex,""),customEvents[t]||t}const EventHandler={on(t,e,a,n){addHandler(t,e,a,n,!1)},one(t,e,a,n){addHandler(t,e,a,n,!0)},off(t,e,a,n){if(typeof e!="string"||!t)return;const[r,i,o]=normalizeParameters(e,a,n),s=o!==e,l=getElementEvents(t),u=l[o]||{},c=e.startsWith(".");if(typeof i<"u"){if(!Object.keys(u).length)return;removeHandler(t,l,o,i,r?a:null);return}if(c)for(const d of Object.keys(l))removeNamespacedHandlers(t,l,d,e.slice(1));for(const[d,h]of Object.entries(u)){const m=d.replace(stripUidRegex,"");(!s||e.includes(m))&&removeHandler(t,l,o,h.callable,h.delegationSelector)}},trigger(t,e,a){if(typeof e!="string"||!t)return null;const n=getjQuery(),r=getTypeEvent(e),i=e!==r;let o=null,s=!0,l=!0,u=!1;i&&n&&(o=n.Event(e,a),n(t).trigger(o),s=!o.isPropagationStopped(),l=!o.isImmediatePropagationStopped(),u=o.isDefaultPrevented());const c=hydrateObj(new Event(e,{bubbles:s,cancelable:!0}),a);return u&&c.preventDefault(),l&&t.dispatchEvent(c),c.defaultPrevented&&o&&o.preventDefault(),c}};function hydrateObj(t,e={}){for(const[a,n]of Object.entries(e))try{t[a]=n}catch{Object.defineProperty(t,a,{configurable:!0,get(){return n}})}return t}function normalizeData(t){if(t==="true")return!0;if(t==="false")return!1;if(t===Number(t).toString())return Number(t);if(t===""||t==="null")return null;if(typeof t!="string")return t;try{return JSON.parse(decodeURIComponent(t))}catch{return t}}function normalizeDataKey(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const Manipulator={setDataAttribute(t,e,a){t.setAttribute(`data-bs-${normalizeDataKey(e)}`,a)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${normalizeDataKey(e)}`)},getDataAttributes(t){if(!t)return{};const e={},a=Object.keys(t.dataset).filter(n=>n.startsWith("bs")&&!n.startsWith("bsConfig"));for(const n of a){let r=n.replace(/^bs/,"");r=r.charAt(0).toLowerCase()+r.slice(1,r.length),e[r]=normalizeData(t.dataset[n])}return e},getDataAttribute(t,e){return normalizeData(t.getAttribute(`data-bs-${normalizeDataKey(e)}`))}};let Config$1=class{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,a){const n=isElement(a)?Manipulator.getDataAttribute(a,"config"):{};return{...this.constructor.Default,...typeof n=="object"?n:{},...isElement(a)?Manipulator.getDataAttributes(a):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,a=this.constructor.DefaultType){for(const[n,r]of Object.entries(a)){const i=e[n],o=isElement(i)?"element":toType(i);if(!new RegExp(r).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${o}" but expected type "${r}".`)}}};const VERSION="5.3.2";class BaseComponent extends Config$1{constructor(e,a){super(),e=getElement(e),e&&(this._element=e,this._config=this._getConfig(a),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,a,n=!0){executeAfterTransition(e,a,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,a={}){return this.getInstance(e)||new this(e,typeof a=="object"?a: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=t=>{let e=t.getAttribute("data-bs-target");if(!e||e==="#"){let a=t.getAttribute("href");if(!a||!a.includes("#")&&!a.startsWith("."))return null;a.includes("#")&&!a.startsWith("#")&&(a=`#${a.split("#")[1]}`),e=a&&a!=="#"?parseSelector(a.trim()):null}return e},SelectorEngine={find(t,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,t))},findOne(t,e=document.documentElement){return Element.prototype.querySelector.call(e,t)},children(t,e){return[].concat(...t.children).filter(a=>a.matches(e))},parents(t,e){const a=[];let n=t.parentNode.closest(e);for(;n;)a.push(n),n=n.parentNode.closest(e);return a},prev(t,e){let a=t.previousElementSibling;for(;a;){if(a.matches(e))return[a];a=a.previousElementSibling}return[]},next(t,e){let a=t.nextElementSibling;for(;a;){if(a.matches(e))return[a];a=a.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(a=>`${a}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(a=>!isDisabled(a)&&isVisible(a))},getSelectorFromElement(t){const e=getSelector(t);return e&&SelectorEngine.findOne(e)?e:null},getElementFromSelector(t){const e=getSelector(t);return e?SelectorEngine.findOne(e):null},getMultipleElementsFromSelector(t){const e=getSelector(t);return e?SelectorEngine.find(e):[]}},enableDismissTrigger=(t,e="hide")=>{const a=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;EventHandler.on(document,a,`[data-bs-dismiss="${n}"]`,function(r){if(["A","AREA"].includes(this.tagName)&&r.preventDefault(),isDisabled(this))return;const i=SelectorEngine.getElementFromSelector(this)||this.closest(`.${n}`);t.getOrCreateInstance(i)[e]()})},NAME$f="alert",DATA_KEY$a="bs.alert",EVENT_KEY$b=`.${DATA_KEY$a}`,EVENT_CLOSE=`close${EVENT_KEY$b}`,EVENT_CLOSED=`closed${EVENT_KEY$b}`,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(CLASS_NAME_SHOW$8);const a=this._element.classList.contains(CLASS_NAME_FADE$5);this._queueCallback(()=>this._destroyElement(),this._element,a)}_destroyElement(){this._element.remove(),EventHandler.trigger(this._element,EVENT_CLOSED),this.dispose()}static jQueryInterface(e){return this.each(function(){const a=Alert.getOrCreateInstance(this);if(typeof e=="string"){if(a[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);a[e](this)}})}}enableDismissTrigger(Alert,"close");defineJQueryPlugin(Alert);const NAME$e="button",DATA_KEY$9="bs.button",EVENT_KEY$a=`.${DATA_KEY$9}`,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${EVENT_KEY$a}${DATA_API_KEY$6}`;class Button extends BaseComponent{static get NAME(){return NAME$e}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(CLASS_NAME_ACTIVE$3))}static jQueryInterface(e){return this.each(function(){const a=Button.getOrCreateInstance(this);e==="toggle"&&a[e]()})}}EventHandler.on(document,EVENT_CLICK_DATA_API$6,SELECTOR_DATA_TOGGLE$5,t=>{t.preventDefault();const e=t.target.closest(SELECTOR_DATA_TOGGLE$5);Button.getOrCreateInstance(e).toggle()});defineJQueryPlugin(Button);const NAME$d="swipe",EVENT_KEY$9=".bs.swipe",EVENT_TOUCHSTART=`touchstart${EVENT_KEY$9}`,EVENT_TOUCHMOVE=`touchmove${EVENT_KEY$9}`,EVENT_TOUCHEND=`touchend${EVENT_KEY$9}`,EVENT_POINTERDOWN=`pointerdown${EVENT_KEY$9}`,EVENT_POINTERUP=`pointerup${EVENT_KEY$9}`,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$1{constructor(e,a){super(),this._element=e,!(!e||!Swipe.isSupported())&&(this._config=this._getConfig(a),this._deltaX=0,this._supportPointerEvents=!!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,EVENT_KEY$9)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.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<=SWIPE_THRESHOLD)return;const a=e/this._deltaX;this._deltaX=0,a&&execute(a>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(CLASS_NAME_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&&(e.pointerType===POINTER_TYPE_PEN||e.pointerType===POINTER_TYPE_TOUCH)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const NAME$c="carousel",DATA_KEY$8="bs.carousel",EVENT_KEY$8=`.${DATA_KEY$8}`,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${EVENT_KEY$8}`,EVENT_SLID=`slid${EVENT_KEY$8}`,EVENT_KEYDOWN$1=`keydown${EVENT_KEY$8}`,EVENT_MOUSEENTER$1=`mouseenter${EVENT_KEY$8}`,EVENT_MOUSELEAVE$1=`mouseleave${EVENT_KEY$8}`,EVENT_DRAG_START=`dragstart${EVENT_KEY$8}`,EVENT_LOAD_DATA_API$3=`load${EVENT_KEY$8}${DATA_API_KEY$5}`,EVENT_CLICK_DATA_API$5=`click${EVENT_KEY$8}${DATA_API_KEY$5}`,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=SELECTOR_ACTIVE+SELECTOR_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={[ARROW_LEFT_KEY$1]:DIRECTION_RIGHT,[ARROW_RIGHT_KEY$1]:DIRECTION_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,a){super(e,a),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(),this._config.ride===CLASS_NAME_CAROUSEL&&this.cycle()}static get Default(){return Default$b}static get DefaultType(){return DefaultType$b}static get NAME(){return NAME$c}next(){this._slide(ORDER_NEXT)}nextWhenVisible(){!document.hidden&&isVisible(this._element)&&this.next()}prev(){this._slide(ORDER_PREV)}pause(){this._isSliding&&triggerTransitionEnd(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){EventHandler.one(this._element,EVENT_SLID,()=>this.cycle());return}this.cycle()}}to(e){const a=this._getItems();if(e>a.length-1||e<0)return;if(this._isSliding){EventHandler.one(this._element,EVENT_SLID,()=>this.to(e));return}const n=this._getItemIndex(this._getActive());if(n===e)return;const r=e>n?ORDER_NEXT:ORDER_PREV;this._slide(r,a[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)),this._config.pause==="hover"&&(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 n of SelectorEngine.find(SELECTOR_ITEM_IMG,this._element))EventHandler.on(n,EVENT_DRAG_START,r=>r.preventDefault());const a={leftCallback:()=>this._slide(this._directionToOrder(DIRECTION_LEFT)),rightCallback:()=>this._slide(this._directionToOrder(DIRECTION_RIGHT)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),TOUCHEVENT_COMPAT_WAIT+this._config.interval))}};this._swipeHelper=new Swipe(this._element,a)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const a=KEY_TO_DIRECTION[e.key];a&&(e.preventDefault(),this._slide(this._directionToOrder(a)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const a=SelectorEngine.findOne(SELECTOR_ACTIVE,this._indicatorsElement);a.classList.remove(CLASS_NAME_ACTIVE$2),a.removeAttribute("aria-current");const n=SelectorEngine.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(CLASS_NAME_ACTIVE$2),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const a=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=a||this._config.defaultInterval}_slide(e,a=null){if(this._isSliding)return;const n=this._getActive(),r=e===ORDER_NEXT,i=a||getNextActiveElement(this._getItems(),n,r,this._config.wrap);if(i===n)return;const o=this._getItemIndex(i),s=m=>EventHandler.trigger(this._element,m,{relatedTarget:i,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:o});if(s(EVENT_SLIDE).defaultPrevented||!n||!i)return;const u=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=i;const c=r?CLASS_NAME_START:CLASS_NAME_END,d=r?CLASS_NAME_NEXT:CLASS_NAME_PREV;i.classList.add(d),reflow(i),n.classList.add(c),i.classList.add(c);const h=()=>{i.classList.remove(c,d),i.classList.add(CLASS_NAME_ACTIVE$2),n.classList.remove(CLASS_NAME_ACTIVE$2,d,c),this._isSliding=!1,s(EVENT_SLID)};this._queueCallback(h,n,this._isAnimated()),u&&this.cycle()}_isAnimated(){return this._element.classList.contains(CLASS_NAME_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()?e===DIRECTION_LEFT?ORDER_PREV:ORDER_NEXT:e===DIRECTION_LEFT?ORDER_NEXT:ORDER_PREV}_orderToDirection(e){return isRTL()?e===ORDER_PREV?DIRECTION_LEFT:DIRECTION_RIGHT:e===ORDER_PREV?DIRECTION_RIGHT:DIRECTION_LEFT}static jQueryInterface(e){return this.each(function(){const a=Carousel.getOrCreateInstance(this,e);if(typeof e=="number"){a.to(e);return}if(typeof e=="string"){if(a[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);a[e]()}})}}EventHandler.on(document,EVENT_CLICK_DATA_API$5,SELECTOR_DATA_SLIDE,function(t){const e=SelectorEngine.getElementFromSelector(this);if(!e||!e.classList.contains(CLASS_NAME_CAROUSEL))return;t.preventDefault();const a=Carousel.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");if(n){a.to(n),a._maybeEnableCycle();return}if(Manipulator.getDataAttribute(this,"slide")==="next"){a.next(),a._maybeEnableCycle();return}a.prev(),a._maybeEnableCycle()});EventHandler.on(window,EVENT_LOAD_DATA_API$3,()=>{const t=SelectorEngine.find(SELECTOR_DATA_RIDE);for(const e of t)Carousel.getOrCreateInstance(e)});defineJQueryPlugin(Carousel);const NAME$b="collapse",DATA_KEY$7="bs.collapse",EVENT_KEY$7=`.${DATA_KEY$7}`,DATA_API_KEY$4=".data-api",EVENT_SHOW$6=`show${EVENT_KEY$7}`,EVENT_SHOWN$6=`shown${EVENT_KEY$7}`,EVENT_HIDE$6=`hide${EVENT_KEY$7}`,EVENT_HIDDEN$6=`hidden${EVENT_KEY$7}`,EVENT_CLICK_DATA_API$4=`click${EVENT_KEY$7}${DATA_API_KEY$4}`,CLASS_NAME_SHOW$7="show",CLASS_NAME_COLLAPSE="collapse",CLASS_NAME_COLLAPSING="collapsing",CLASS_NAME_COLLAPSED="collapsed",CLASS_NAME_DEEPER_CHILDREN=`:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_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,a){super(e,a),this._isTransitioning=!1,this._triggerArray=[];const n=SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);for(const r of n){const i=SelectorEngine.getSelectorFromElement(r),o=SelectorEngine.find(i).filter(s=>s===this._element);i!==null&&o.length&&this._triggerArray.push(r)}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(s=>s!==this._element).map(s=>Collapse.getOrCreateInstance(s,{toggle:!1}))),e.length&&e[0]._isTransitioning||EventHandler.trigger(this._element,EVENT_SHOW$6).defaultPrevented)return;for(const s of e)s.hide();const n=this._getDimension();this._element.classList.remove(CLASS_NAME_COLLAPSE),this._element.classList.add(CLASS_NAME_COLLAPSING),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const r=()=>{this._isTransitioning=!1,this._element.classList.remove(CLASS_NAME_COLLAPSING),this._element.classList.add(CLASS_NAME_COLLAPSE,CLASS_NAME_SHOW$7),this._element.style[n]="",EventHandler.trigger(this._element,EVENT_SHOWN$6)},o=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback(r,this._element,!0),this._element.style[n]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!this._isShown()||EventHandler.trigger(this._element,EVENT_HIDE$6).defaultPrevented)return;const a=this._getDimension();this._element.style[a]=`${this._element.getBoundingClientRect()[a]}px`,reflow(this._element),this._element.classList.add(CLASS_NAME_COLLAPSING),this._element.classList.remove(CLASS_NAME_COLLAPSE,CLASS_NAME_SHOW$7);for(const r of this._triggerArray){const i=SelectorEngine.getElementFromSelector(r);i&&!this._isShown(i)&&this._addAriaAndCollapsedClass([r],!1)}this._isTransitioning=!0;const n=()=>{this._isTransitioning=!1,this._element.classList.remove(CLASS_NAME_COLLAPSING),this._element.classList.add(CLASS_NAME_COLLAPSE),EventHandler.trigger(this._element,EVENT_HIDDEN$6)};this._element.style[a]="",this._queueCallback(n,this._element,!0)}_isShown(e=this._element){return e.classList.contains(CLASS_NAME_SHOW$7)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=getElement(e.parent),e}_getDimension(){return this._element.classList.contains(CLASS_NAME_HORIZONTAL)?WIDTH:HEIGHT}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$4);for(const a of e){const n=SelectorEngine.getElementFromSelector(a);n&&this._addAriaAndCollapsedClass([a],this._isShown(n))}}_getFirstLevelChildren(e){const a=SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN,this._config.parent);return SelectorEngine.find(e,this._config.parent).filter(n=>!a.includes(n))}_addAriaAndCollapsedClass(e,a){if(e.length)for(const n of e)n.classList.toggle(CLASS_NAME_COLLAPSED,!a),n.setAttribute("aria-expanded",a)}static jQueryInterface(e){const a={};return typeof e=="string"&&/show|hide/.test(e)&&(a.toggle=!1),this.each(function(){const n=Collapse.getOrCreateInstance(this,a);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e]()}})}}EventHandler.on(document,EVENT_CLICK_DATA_API$4,SELECTOR_DATA_TOGGLE$4,function(t){(t.target.tagName==="A"||t.delegateTarget&&t.delegateTarget.tagName==="A")&&t.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=`.${DATA_KEY$6}`,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${EVENT_KEY$6}`,EVENT_HIDDEN$5=`hidden${EVENT_KEY$6}`,EVENT_SHOW$5=`show${EVENT_KEY$6}`,EVENT_SHOWN$5=`shown${EVENT_KEY$6}`,EVENT_CLICK_DATA_API$3=`click${EVENT_KEY$6}${DATA_API_KEY$3}`,EVENT_KEYDOWN_DATA_API=`keydown${EVENT_KEY$6}${DATA_API_KEY$3}`,EVENT_KEYUP_DATA_API=`keyup${EVENT_KEY$6}${DATA_API_KEY$3}`,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}.${CLASS_NAME_SHOW$6}`,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,a){super(e,a),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(SELECTOR_NAVBAR_NAV))for(const n of[].concat(...document.body.children))EventHandler.on(n,"mouseover",noop$3);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(CLASS_NAME_SHOW$6),this._element.classList.add(CLASS_NAME_SHOW$6),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 n of[].concat(...document.body.children))EventHandler.off(n,"mouseover",noop$3);this._popper&&this._popper.destroy(),this._menu.classList.remove(CLASS_NAME_SHOW$6),this._element.classList.remove(CLASS_NAME_SHOW$6),this._element.setAttribute("aria-expanded","false"),Manipulator.removeDataAttribute(this._menu,"popper"),EventHandler.trigger(this._element,EVENT_HIDDEN$5,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!isElement(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${NAME$a.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof Popper>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:isElement(this._config.reference)?e=getElement(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const a=this._getPopperConfig();this._popper=createPopper(e,this._menu,a)}_isShown(){return this._menu.classList.contains(CLASS_NAME_SHOW$6)}_getPlacement(){const e=this._parent;if(e.classList.contains(CLASS_NAME_DROPEND))return PLACEMENT_RIGHT;if(e.classList.contains(CLASS_NAME_DROPSTART))return PLACEMENT_LEFT;if(e.classList.contains(CLASS_NAME_DROPUP_CENTER))return PLACEMENT_TOPCENTER;if(e.classList.contains(CLASS_NAME_DROPDOWN_CENTER))return PLACEMENT_BOTTOMCENTER;const a=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(CLASS_NAME_DROPUP)?a?PLACEMENT_TOPEND:PLACEMENT_TOP:a?PLACEMENT_BOTTOMEND:PLACEMENT_BOTTOM}_detectNavbar(){return this._element.closest(SELECTOR_NAVBAR)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(a=>Number.parseInt(a,10)):typeof e=="function"?a=>e(a,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||this._config.display==="static")&&(Manipulator.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...execute(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:a}){const n=SelectorEngine.find(SELECTOR_VISIBLE_ITEMS,this._menu).filter(r=>isVisible(r));n.length&&getNextActiveElement(n,a,e===ARROW_DOWN_KEY$1,!n.includes(a)).focus()}static jQueryInterface(e){return this.each(function(){const a=Dropdown.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof a[e]>"u")throw new TypeError(`No method named "${e}"`);a[e]()}})}static clearMenus(e){if(e.button===RIGHT_MOUSE_BUTTON||e.type==="keyup"&&e.key!==TAB_KEY$1)return;const a=SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN);for(const n of a){const r=Dropdown.getInstance(n);if(!r||r._config.autoClose===!1)continue;const i=e.composedPath(),o=i.includes(r._menu);if(i.includes(r._element)||r._config.autoClose==="inside"&&!o||r._config.autoClose==="outside"&&o||r._menu.contains(e.target)&&(e.type==="keyup"&&e.key===TAB_KEY$1||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const s={relatedTarget:r._element};e.type==="click"&&(s.clickEvent=e),r._completeHide(s)}}static dataApiKeydownHandler(e){const a=/input|textarea/i.test(e.target.tagName),n=e.key===ESCAPE_KEY$2,r=[ARROW_UP_KEY$1,ARROW_DOWN_KEY$1].includes(e.key);if(!r&&!n||a&&!n)return;e.preventDefault();const i=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(i);if(r){e.stopPropagation(),o.show(),o._selectMenuItem(e);return}o._isShown()&&(e.stopPropagation(),o.hide(),i.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(t){t.preventDefault(),Dropdown.getOrCreateInstance(this).toggle()});defineJQueryPlugin(Dropdown);const NAME$9="backdrop",CLASS_NAME_FADE$4="fade",CLASS_NAME_SHOW$5="show",EVENT_MOUSEDOWN=`mousedown.bs.${NAME$9}`,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$1{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){execute(e);return}this._append();const a=this._getElement();this._config.isAnimated&&reflow(a),a.classList.add(CLASS_NAME_SHOW$5),this._emulateAnimation(()=>{execute(e)})}hide(e){if(!this._config.isVisible){execute(e);return}this._getElement().classList.remove(CLASS_NAME_SHOW$5),this._emulateAnimation(()=>{this.dispose(),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(CLASS_NAME_FADE$4),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=`.${DATA_KEY$5}`,EVENT_FOCUSIN$2=`focusin${EVENT_KEY$5}`,EVENT_KEYDOWN_TAB=`keydown.tab${EVENT_KEY$5}`,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$1{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:a}=this._config;if(e.target===document||e.target===a||a.contains(e.target))return;const n=SelectorEngine.focusableChildren(a);n.length===0?a.focus():this._lastTabNavDirection===TAB_NAV_BACKWARD?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){e.key===TAB_KEY&&(this._lastTabNavDirection=e.shiftKey?TAB_NAV_BACKWARD:TAB_NAV_FORWARD)}}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,PROPERTY_PADDING,a=>a+e),this._setElementAttributes(SELECTOR_FIXED_CONTENT,PROPERTY_PADDING,a=>a+e),this._setElementAttributes(SELECTOR_STICKY_CONTENT,PROPERTY_MARGIN,a=>a-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,PROPERTY_PADDING),this._resetElementAttributes(SELECTOR_FIXED_CONTENT,PROPERTY_PADDING),this._resetElementAttributes(SELECTOR_STICKY_CONTENT,PROPERTY_MARGIN)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,a,n){const r=this.getWidth(),i=o=>{if(o!==this._element&&window.innerWidth>o.clientWidth+r)return;this._saveInitialAttribute(o,a);const s=window.getComputedStyle(o).getPropertyValue(a);o.style.setProperty(a,`${n(Number.parseFloat(s))}px`)};this._applyManipulationCallback(e,i)}_saveInitialAttribute(e,a){const n=e.style.getPropertyValue(a);n&&Manipulator.setDataAttribute(e,a,n)}_resetElementAttributes(e,a){const n=r=>{const i=Manipulator.getDataAttribute(r,a);if(i===null){r.style.removeProperty(a);return}Manipulator.removeDataAttribute(r,a),r.style.setProperty(a,i)};this._applyManipulationCallback(e,n)}_applyManipulationCallback(e,a){if(isElement(e)){a(e);return}for(const n of SelectorEngine.find(e,this._element))a(n)}}const NAME$7="modal",DATA_KEY$4="bs.modal",EVENT_KEY$4=`.${DATA_KEY$4}`,DATA_API_KEY$2=".data-api",ESCAPE_KEY$1="Escape",EVENT_HIDE$4=`hide${EVENT_KEY$4}`,EVENT_HIDE_PREVENTED$1=`hidePrevented${EVENT_KEY$4}`,EVENT_HIDDEN$4=`hidden${EVENT_KEY$4}`,EVENT_SHOW$4=`show${EVENT_KEY$4}`,EVENT_SHOWN$4=`shown${EVENT_KEY$4}`,EVENT_RESIZE$1=`resize${EVENT_KEY$4}`,EVENT_CLICK_DISMISS=`click.dismiss${EVENT_KEY$4}`,EVENT_MOUSEDOWN_DISMISS=`mousedown.dismiss${EVENT_KEY$4}`,EVENT_KEYDOWN_DISMISS$1=`keydown.dismiss${EVENT_KEY$4}`,EVENT_CLICK_DATA_API$2=`click${EVENT_KEY$4}${DATA_API_KEY$2}`,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,a){super(e,a),this._dialog=SelectorEngine.findOne(SELECTOR_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(CLASS_NAME_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(CLASS_NAME_SHOW$4),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){EventHandler.off(window,EVENT_KEY$4),EventHandler.off(this._dialog,EVENT_KEY$4),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Backdrop({isVisible:!!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 a=SelectorEngine.findOne(SELECTOR_MODAL_BODY,this._dialog);a&&(a.scrollTop=0),reflow(this._element),this._element.classList.add(CLASS_NAME_SHOW$4);const n=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,EventHandler.trigger(this._element,EVENT_SHOWN$4,{relatedTarget:e})};this._queueCallback(n,this._dialog,this._isAnimated())}_addEventListeners(){EventHandler.on(this._element,EVENT_KEYDOWN_DISMISS$1,e=>{if(e.key===ESCAPE_KEY$1){if(this._config.keyboard){this.hide();return}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,a=>{if(!(this._element!==e.target||this._element!==a.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_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(CLASS_NAME_OPEN),this._resetAdjustments(),this._scrollBar.reset(),EventHandler.trigger(this._element,EVENT_HIDDEN$4)})}_isAnimated(){return this._element.classList.contains(CLASS_NAME_FADE$3)}_triggerBackdropTransition(){if(EventHandler.trigger(this._element,EVENT_HIDE_PREVENTED$1).defaultPrevented)return;const a=this._element.scrollHeight>document.documentElement.clientHeight,n=this._element.style.overflowY;n==="hidden"||this._element.classList.contains(CLASS_NAME_STATIC)||(a||(this._element.style.overflowY="hidden"),this._element.classList.add(CLASS_NAME_STATIC),this._queueCallback(()=>{this._element.classList.remove(CLASS_NAME_STATIC),this._queueCallback(()=>{this._element.style.overflowY=n},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,a=this._scrollBar.getWidth(),n=a>0;if(n&&!e){const r=isRTL()?"paddingLeft":"paddingRight";this._element.style[r]=`${a}px`}if(!n&&e){const r=isRTL()?"paddingRight":"paddingLeft";this._element.style[r]=`${a}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,a){return this.each(function(){const n=Modal.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e](a)}})}}EventHandler.on(document,EVENT_CLICK_DATA_API$2,SELECTOR_DATA_TOGGLE$2,function(t){const e=SelectorEngine.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),EventHandler.one(e,EVENT_SHOW$4,r=>{r.defaultPrevented||EventHandler.one(e,EVENT_HIDDEN$4,()=>{isVisible(this)&&this.focus()})});const a=SelectorEngine.findOne(OPEN_SELECTOR$1);a&&Modal.getInstance(a).hide(),Modal.getOrCreateInstance(e).toggle(this)});enableDismissTrigger(Modal);defineJQueryPlugin(Modal);const NAME$6="offcanvas",DATA_KEY$3="bs.offcanvas",EVENT_KEY$3=`.${DATA_KEY$3}`,DATA_API_KEY$1=".data-api",EVENT_LOAD_DATA_API$2=`load${EVENT_KEY$3}${DATA_API_KEY$1}`,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${EVENT_KEY$3}`,EVENT_SHOWN$3=`shown${EVENT_KEY$3}`,EVENT_HIDE$3=`hide${EVENT_KEY$3}`,EVENT_HIDE_PREVENTED=`hidePrevented${EVENT_KEY$3}`,EVENT_HIDDEN$3=`hidden${EVENT_KEY$3}`,EVENT_RESIZE=`resize${EVENT_KEY$3}`,EVENT_CLICK_DATA_API$1=`click${EVENT_KEY$3}${DATA_API_KEY$1}`,EVENT_KEYDOWN_DISMISS=`keydown.dismiss${EVENT_KEY$3}`,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,a){super(e,a),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){if(this._isShown||EventHandler.trigger(this._element,EVENT_SHOW$3,{relatedTarget:e}).defaultPrevented)return;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(CLASS_NAME_SHOWING$1);const n=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(CLASS_NAME_SHOW$3),this._element.classList.remove(CLASS_NAME_SHOWING$1),EventHandler.trigger(this._element,EVENT_SHOWN$3,{relatedTarget:e})};this._queueCallback(n,this._element,!0)}hide(){if(!this._isShown||EventHandler.trigger(this._element,EVENT_HIDE$3).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(CLASS_NAME_HIDING),this._backdrop.hide();const a=()=>{this._element.classList.remove(CLASS_NAME_SHOW$3,CLASS_NAME_HIDING),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new ScrollBarHelper().reset(),EventHandler.trigger(this._element,EVENT_HIDDEN$3)};this._queueCallback(a,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=()=>{if(this._config.backdrop==="static"){EventHandler.trigger(this._element,EVENT_HIDE_PREVENTED);return}this.hide()},a=!!this._config.backdrop;return new Backdrop({className:CLASS_NAME_BACKDROP,isVisible:a,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:a?e:null})}_initializeFocusTrap(){return new FocusTrap({trapElement:this._element})}_addEventListeners(){EventHandler.on(this._element,EVENT_KEYDOWN_DISMISS,e=>{if(e.key===ESCAPE_KEY){if(this._config.keyboard){this.hide();return}EventHandler.trigger(this._element,EVENT_HIDE_PREVENTED)}})}static jQueryInterface(e){return this.each(function(){const a=Offcanvas.getOrCreateInstance(this,e);if(typeof e=="string"){if(a[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);a[e](this)}})}}EventHandler.on(document,EVENT_CLICK_DATA_API$1,SELECTOR_DATA_TOGGLE$1,function(t){const e=SelectorEngine.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),isDisabled(this))return;EventHandler.one(e,EVENT_HIDDEN$3,()=>{isVisible(this)&&this.focus()});const a=SelectorEngine.findOne(OPEN_SELECTOR);a&&a!==e&&Offcanvas.getInstance(a).hide(),Offcanvas.getOrCreateInstance(e).toggle(this)});EventHandler.on(window,EVENT_LOAD_DATA_API$2,()=>{for(const t of SelectorEngine.find(OPEN_SELECTOR))Offcanvas.getOrCreateInstance(t).show()});EventHandler.on(window,EVENT_RESIZE,()=>{for(const t of SelectorEngine.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(t).position!=="fixed"&&Offcanvas.getOrCreateInstance(t).hide()});enableDismissTrigger(Offcanvas);defineJQueryPlugin(Offcanvas);const ARIA_ATTRIBUTE_PATTERN=/^aria-[\w-]*$/i,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:[]},uriAttributes=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),SAFE_URL_PATTERN=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,allowedAttribute=(t,e)=>{const a=t.nodeName.toLowerCase();return e.includes(a)?uriAttributes.has(a)?!!SAFE_URL_PATTERN.test(t.nodeValue):!0:e.filter(n=>n instanceof RegExp).some(n=>n.test(a))};function sanitizeHtml(t,e,a){if(!t.length)return t;if(a&&typeof a=="function")return a(t);const r=new window.DOMParser().parseFromString(t,"text/html"),i=[].concat(...r.body.querySelectorAll("*"));for(const o of i){const s=o.nodeName.toLowerCase();if(!Object.keys(e).includes(s)){o.remove();continue}const l=[].concat(...o.attributes),u=[].concat(e["*"]||[],e[s]||[]);for(const c of l)allowedAttribute(c,u)||o.removeAttribute(c.nodeName)}return r.body.innerHTML}const NAME$5="TemplateFactory",Default$4={allowList:DefaultAllowlist,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},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$1{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[r,i]of Object.entries(this._config.content))this._setContent(e,i,r);const a=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&a.classList.add(...n.split(" ")),a}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[a,n]of Object.entries(e))super._typeCheckConfig({selector:a,entry:n},DefaultContentType)}_setContent(e,a,n){const r=SelectorEngine.findOne(n,e);if(r){if(a=this._resolvePossibleFunction(a),!a){r.remove();return}if(isElement(a)){this._putElementInTemplate(getElement(a),r);return}if(this._config.html){r.innerHTML=this._maybeSanitize(a);return}r.textContent=a}}_maybeSanitize(e){return this._config.sanitize?sanitizeHtml(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return execute(e,[this])}_putElementInTemplate(e,a){if(this._config.html){a.innerHTML="",a.append(e);return}a.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=`.${CLASS_NAME_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,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'1;S.splice(0,1));}return function(S,P,M,C,E){var T,x,A,L,I,W,z,U,B,V,H,G,K,Y,J,Q,ee,Z=S.s==P.s?1:-1,X=S.c,q=P.c;if(!X||!X[0]||!q||!q[0])return new _(!S.s||!P.s||(X?q&&X[0]==q[0]:!q)?NaN:X&&X[0]==0||!q?Z*0:Z/0);for(U=new _(Z),B=U.c=[],x=S.e-P.e,Z=M+x+1,E||(E=BASE,x=bitFloor(S.e/LOG_BASE)-bitFloor(P.e/LOG_BASE),Z=Z/LOG_BASE|0),A=0;q[A]==(X[A]||0);A++);if(q[A]>(X[A]||0)&&x--,Z<0)B.push(1),L=!0;else{for(Y=X.length,Q=q.length,A=0,Z+=2,I=mathfloor(E/(q[0]+1)),I>1&&(q=g(q,I,E),X=g(X,I,E),Q=q.length,Y=X.length),K=Q,V=X.slice(0,Q),H=V.length;H 1;S.splice(0,1));}return function(S,P,M,C,E){var T,x,A,L,I,W,z,U,B,V,H,G,K,Y,J,Q,ee,Z=S.s==P.s?1:-1,X=S.c,q=P.c;if(!X||!X[0]||!q||!q[0])return new _(!S.s||!P.s||(X?q&&X[0]==q[0]:!q)?NaN:X&&X[0]==0||!q?Z*0:Z/0);for(U=new _(Z),B=U.c=[],x=S.e-P.e,Z=M+x+1,E||(E=BASE,x=bitFloor(S.e/LOG_BASE)-bitFloor(P.e/LOG_BASE),Z=Z/LOG_BASE|0),A=0;q[A]==(X[A]||0);A++);if(q[A]>(X[A]||0)&&x--,Z<0)B.push(1),L=!0;else{for(Y=X.length,Q=q.length,A=0,Z+=2,I=mathfloor(E/(q[0]+1)),I>1&&(q=g(q,I,E),X=g(X,I,E),Q=q.length,Y=X.length),K=Q,V=X.slice(0,Q),H=V.length;H=E/2&&J++;do{if(I=0,T=b(q,V,Q,H),T<0){if(G=V[0],Q!=H&&(G=G*E+(V[1]||0)),I=mathfloor(G/J),I>1)for(I>=E&&(I=E-1),W=g(q,I,E),z=W.length,H=V.length;b(W,V,z,H)==1;)I--,$(W,Q
0)for(;b--;A[$++]=0);for(b=BASE-1;S>E;){if(A[--S]i[o]^a?1:-1;return l==u?0:l>u^a?1:-1}function intCheck(t,e,a,n){if(te||i&&o&&l&&!s&&!u||n&&o&&l||!a&&l||!r)return 1;if(!n&&!i&&!u&&t=a&&u<=n&&r.push(u);if(r.length<2)return[{time:a,pos:0},{time:n,pos:1}];for(o=0,s=r.length;or-i)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const a=this.getDataTimestamps(),n=this.getLabelTimestamps();return a.length&&n.length?e=this.normalize(a.concat(n)):e=a.length?a:n,e=this._cache.all=e,e}getDecimalForValue(e){return(interpolate$1(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const a=this._offsets,n=this.getDecimalForPixel(e)/a.factor-a.end;return interpolate$1(this._table,n*this._tableRange+this._minPos,!0)}}R(TimeSeriesScale,"id","timeseries"),R(TimeSeriesScale,"defaults",TimeScale.defaults);function getDefaultChartSettings(t){return t==="sankey"?{type:"sankey",data:{datasets:[]}}:t==="pie"?{type:"pie",data:{datasets:[]}}:t==="column"?{type:"bar",data:{labels:[],datasets:[]},options:{plugins:{tooltip:{callbacks:{label:function(e){let a=e.dataset.currency_code;return formatMoney(e.raw,a)}}}},maintainAspectRatio:!1,scales:{}}}:t==="line"?{options:{plugins:{tooltip:{callbacks:{label:function(e){let a=e.dataset.currency_code;return formatMoney(e.raw,a)}}}},maintainAspectRatio:!1,scales:{x:{type:"time",time:{tooltipFormat:"PP"}}}},type:"line",data:{labels:[],datasets:[]}}:{}}let blue=new Color("#36a2eb"),red=new Color("#ff6384"),green=new Color("#4bc0c0"),orange=new Color("#ff9f40"),purple=new Color("#9966ff"),yellow=new Color("#ffcd56"),grey=new Color("#c9cbcf"),index=0;window.theme==="dark"&&(red.darken(.3).desaturate(.3),green.darken(.3).desaturate(.3),blue.darken(.3).desaturate(.3),orange.darken(.3).desaturate(.3));let allColors=[red,orange,blue,green,purple,yellow,grey,green];function getColors(t,e){let a={borderColor:red.rgbString(),backgroundColor:red.rgbString()},n;switch(t){default:let i=Math.floor(index/2)%allColors.length;n=new Color(allColors[i].rgbString()),n.lighten(.38),a={borderColor:allColors[i].hexString(),backgroundColor:n.hexString()};break;case"spent":n=new Color(blue.rgbString()),n.lighten(.38),a={borderColor:blue.rgbString(),backgroundColor:n.rgbString()};break;case"left":n=new Color(green.rgbString()),n.lighten(.38),a={borderColor:green.rgbString(),backgroundColor:n.rgbString()};break;case"overspent":n=new Color(red.rgbString()),n.lighten(.22),a={borderColor:red.rgbString(),backgroundColor:n.rgbString()};break}return index++,e==="border"?a.borderColor:e==="background"?a.backgroundColor:"#FF0000"}let currencies$2=[],chart$3=null,chartData$2=null,afterPromises$5=!1;const CHART_CACHE_KEY="dashboard-accounts-chart",ACCOUNTS_CACHE_KEY="dashboard-accounts-data",accounts=()=>({loading:!1,loadingAccounts:!1,accountList:[],autoConversion:!1,chartOptions:null,switchAutoConversion(){this.autoConversion=!this.autoConversion,setVariable("autoConversion",this.autoConversion)},getFreshData(){const t=window.store.get("cacheValid");let e=window.store.get(CHART_CACHE_KEY);if(t&&typeof e<"u"){this.drawChart(this.generateOptions(e)),this.loading=!1;return}new Dashboard$2().dashboard(new Date(window.store.get("start")),new Date(window.store.get("end")),null).then(n=>{this.chartData=n.data,window.store.set(CHART_CACHE_KEY,n.data),this.drawChart(this.generateOptions(this.chartData)),this.loading=!1})},generateOptions(t){currencies$2=[];let e=getDefaultChartSettings("line");for(let a=0;a=E/2&&J++;do{if(I=0,T=b(q,V,Q,H),T<0){if(G=V[0],Q!=H&&(G=G*E+(V[1]||0)),I=mathfloor(G/J),I>1)for(I>=E&&(I=E-1),W=g(q,I,E),z=W.length,H=V.length;b(W,V,z,H)==1;)I--,$(W,Q
0)for(;b--;A[$++]=0);for(b=BASE-1;S>E;){if(A[--S]i[o]^a?1:-1;return l==u?0:l>u^a?1:-1}function intCheck(t,e,a,n){if(te||i&&o&&l&&!s&&!u||n&&o&&l||!a&&l||!r)return 1;if(!n&&!i&&!u&&t